agentao

10 Server User-Interaction Bridge

Parent doc: ACP Client And Project-Local Servers

Issue index: ACP Client Project-Local Servers Issues

Goal

定义当外部 ACP server 请求用户确认或请求用户输入时,Agentao 如何以异步、可控、不破坏当前 CLI 输入体验的方式桥接这些交互。

Scope

Deliverables

Dependencies

Design Notes

建议区分两类 interaction:

建议内部模型字段:

Runtime Behavior

State

每个 server runtime 增加状态:

典型流转:

Visibility

interaction 不应抢占式弹出输入框,而应:

  1. 进入 pending registry
  2. 写入 inbox
  3. 在 CLI 空闲时显示

示例:

<message from="planner">Permission request: allow tool X with args ...</message>

或:

<message from="planner">Input requested: Please provide branch name</message>

CLI Response Model

用户通过显式命令响应:

设计要求:

Timeout Policy

v1 建议保守策略:

同时用户仍可使用:

来取消当前 server 的整轮活跃请求。

Tests

Acceptance Criteria

  1. 外部 ACP server 请求用户参与时不会破坏当前交互界面
  2. 用户能显式看见并处理待确认或待输入请求
  3. 超时和取消行为可预期

Out Of Scope