一次工具调用的关卡顺序

tools 注册表 · dsh-v0.2.1-rc.3

一次工具调用的关卡顺序 tools 注册表 · dsh-v0.2.1-rc.3 01 / 一次调用 EX / 策略与审批 03 / 内容收尾 04 / Session 日志 准备 把关 执行与结算 准入检查 只有 ask 进入 tool call · assistant 块 · 一次调用 › 准备 tool call assistant 块 prepare · createExecution · 一次调用 › 准备 prepare createExecution pre-execute · tools/pre-execute · 一次调用 › 准入检查 › 把关 pre-execute tools/pre-execute guards · 只能否决 · 一次调用 › 准入检查 › 把关 guards 只能否决 execute + 正文 · tools/execute · 一次调用 › 执行与结算 execute + 正文 tools/execute post-execute · project → policy · 一次调用 › 执行与结算 post-execute project → policy approval · 一次性询问 · 策略与审批 › 只有 ask 进入 › 把关 · 无通道即拒绝 approval 一次性询问 无通道即拒绝 denied · 拒绝也是结果 · 策略与审批 › 只有 ask 进入 › 执行与结算 denied 拒绝也是结果 finalizeContent · tools/result → 冻结 · 内容收尾 › 执行与结算 finalizeContent tools/result → 冻结 tool/call · 执行前记录 · Session 日志 › 准备 tool/call 执行前记录 tool/result · 唯一模型结果 · Session 日志 › 执行与结算 tool/result 唯一模型结果 approved rejected / cancelled execute(input) 仍走 post normalized result tools/result 通知 deny allow 最后一步 ask allow 图例 Agent 逻辑 策略 上下文 / 追踪