Parent doc: ACP Client And Project-Local Servers
Issue index: ACP Client Project-Local Servers Issues
定义当外部 ACP server 请求用户确认或请求用户输入时,Agentao 如何以异步、可控、不破坏当前 CLI 输入体验的方式桥接这些交互。
waiting_for_user 状态/acp approve <name> <request-id>/acp reject <name> <request-id>/acp reply <name> <request-id> <text>agentao/cli/app.pyagentao/cli/commands.pyagentao/cli/commands_ext.pyagentao/cli/transport.pyconfirm_tool() 和 ask_user() 交互agentao/cli/transport.pyagentao/cli/app.pypending interaction_agentao.cn/ask_user建议区分两类 interaction:
permission
input
建议内部模型字段:
request_idserversession_idkindpromptdetailscreated_atdeadline_at每个 server runtime 增加状态:
waiting_for_user典型流转:
busy -> waiting_for_user -> busybusy -> waiting_for_user -> readywaiting_for_user -> failedwaiting_for_user -> stoppinginteraction 不应抢占式弹出输入框,而应:
示例:
<message from="planner">Permission request: allow tool X with args ...</message>
或:
<message from="planner">Input requested: Please provide branch name</message>
用户通过显式命令响应:
/acp approve <name> <request-id>/acp reject <name> <request-id>/acp reply <name> <request-id> <text>设计要求:
v1 建议保守策略:
rejectcancel同时用户仍可使用:
/acp cancel <name>来取消当前 server 的整轮活跃请求。
max_iterations 的 ACP 扩展设计