AllToolsDeniedEvent
public class AllToolsDeniedEvent extends AgentEvent
io/agentscope/core/event/AllToolsDeniedEvent.java:34–60所有工具已拒绝事件,描述执行过程中的事件。位于 io.agentscope.core.event 包,继承自 AgentEvent。核心成员包括 getType、getDeniedToolCalls、AllToolsDeniedEvent。
Emitted during the acting phase when all tool calls from the most recent reasoning step were denied (by user HITL confirmation or by permission rules).
Middlewares observing io.agentscope.core.middleware.MiddlewareBase#onActing can detect
this event and emit a RequestStopEvent with
io.agentscope.core.message.GenerateReason#ALL_TOOLS_DENIED to prevent the agent from
continuing to the next reasoning iteration.
If no middleware emits a stop, the agent continues reasoning as before (backward compatible).
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public AllToolsDeniedEvent(String id, String createdAt, List<ToolUseBlock> deniedToolCalls) | 初始化 `AllToolsDeniedEvent` 实例。 Creates a new instance. |
public AllToolsDeniedEvent(List<ToolUseBlock> deniedToolCalls) | 初始化 `AllToolsDeniedEvent` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public AgentEventType getType() | 获取类型。 Returns the type. |
public List<ToolUseBlock> getDeniedToolCalls() | 获取已拒绝工具调用。 Returns the tool calls that were denied. |
构造器详情Constructor Detail
AllToolsDeniedEvent
public AllToolsDeniedEvent(String id, String createdAt, List<ToolUseBlock> deniedToolCalls)
初始化 AllToolsDeniedEvent 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
createdAt | String | 已创建 At(类型 `String`)。The created at. |
deniedToolCalls | List<ToolUseBlock> | 已拒绝工具调用(类型 `List`)。The denied tool calls. |
io/agentscope/core/event/AllToolsDeniedEvent.java:38–45AllToolsDeniedEvent
public AllToolsDeniedEvent(List<ToolUseBlock> deniedToolCalls)
初始化 AllToolsDeniedEvent 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
deniedToolCalls | List<ToolUseBlock> | 已拒绝工具调用(类型 `List`)。The denied tool calls. |
io/agentscope/core/event/AllToolsDeniedEvent.java:47–49方法详情Method Detail
getType
public AgentEventType getType()
获取类型。
Returns the type.
AgentEventTypeio/agentscope/core/event/AllToolsDeniedEvent.java:51–54getDeniedToolCalls
public List<ToolUseBlock> getDeniedToolCalls()
获取已拒绝工具调用。
Returns the tool calls that were denied.
List<ToolUseBlock>io/agentscope/core/event/AllToolsDeniedEvent.java:57–59