PlanExitTool
public static final class PlanExitTool extends ToolBase
源码Source
io/agentscope/harness/agent/tool/PlanModeTools.java:150–210计划 Exit 工具,封装可被智能体调用的能力。位于 io.agentscope.harness.agent.tool 包,继承自 ToolBase。核心成员包括 checkPermissions、callAsync、PlanExitTool。
plan_exit: request approval, then leave plan mode for BUILD.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public PlanExitTool(PlanModeManager manager) | 初始化 `PlanExitTool` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Mono<PermissionDecision> checkPermissions(Map<String, Object> toolInput, PermissionContextState context) | 检查权限。 Always ASK: leaving plan mode is a deliberate hand-off that the user confirms. |
public Mono<ToolResultBlock> callAsync(ToolCallParam param) | 调用异步。 Runs only after the user approves the ASK above. |
构造器详情Constructor Detail
PlanExitTool
public PlanExitTool(PlanModeManager manager)
初始化 PlanExitTool 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
manager | PlanModeManager | 管理器(类型 `PlanModeManager`)。The manager. |
源码Source
io/agentscope/harness/agent/tool/PlanModeTools.java:153–178方法详情Method Detail
checkPermissions
public Mono<PermissionDecision> checkPermissions(Map<String, Object> toolInput, PermissionContextState context)
检查权限。
Always ASK: leaving plan mode is a deliberate hand-off that the user confirms.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolInput | Map<String, Object> | 工具输入(类型 `Map`)。The tool input. |
context | PermissionContextState | 上下文(类型 `PermissionContextState`)。The context. |
Mono<PermissionDecision>返回Mono。Returns mono.
源码Source
io/agentscope/harness/agent/tool/PlanModeTools.java:185–192callAsync
public Mono<ToolResultBlock> callAsync(ToolCallParam param)
调用异步。
Runs only after the user approves the ASK above.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
param | ToolCallParam | 参数(类型 `ToolCallParam`)。The param. |
Mono<ToolResultBlock>返回Mono。Returns mono.
源码Source
io/agentscope/harness/agent/tool/PlanModeTools.java:195–209