AS AgentScopeAPI 手册 / API Reference

AllToolsDeniedEvent

public class AllToolsDeniedEvent extends AgentEvent
源码Source 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.

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。The id.
createdAtString已创建 At(类型 `String`)。The created at.
deniedToolCallsList<ToolUseBlock>已拒绝工具调用(类型 `List`)。The denied tool calls.
源码Source io/agentscope/core/event/AllToolsDeniedEvent.java:38–45

AllToolsDeniedEvent

public AllToolsDeniedEvent(List<ToolUseBlock> deniedToolCalls)

初始化 AllToolsDeniedEvent 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
deniedToolCallsList<ToolUseBlock>已拒绝工具调用(类型 `List`)。The denied tool calls.
源码Source io/agentscope/core/event/AllToolsDeniedEvent.java:47–49

方法详情Method Detail

getType

public AgentEventType getType()

获取类型。

Returns the type.

返回Returns AgentEventType
返回AgentEventType。Returns agent event type.
源码Source io/agentscope/core/event/AllToolsDeniedEvent.java:51–54

getDeniedToolCalls

public List<ToolUseBlock> getDeniedToolCalls()

获取已拒绝工具调用。

Returns the tool calls that were denied.

返回Returns List<ToolUseBlock>
返回列出。Returns list.
源码Source io/agentscope/core/event/AllToolsDeniedEvent.java:57–59

继承成员Inherited Members

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.