feat(acp): the bridge approval answerer + scripted permission answers

The ACP bridge registers the first real approval answerer: an ask for an
agent it owns becomes session/request_permission attached to the already-
streamed tool call (one-shot allow_once/reject_once only), outcomes map
conservatively (unknown optionId never grants, client cancel → cancelled),
and foreign or call-less requests delegate down the waterfall. The snapshot
harness accepts scripted permissionAnswers (FIFO; an unscripted prompt
answers cancelled, fail closed) so recorded scenarios can drive the wire
keylessly.
This commit is contained in:
kingwl
2026-07-09 15:36:08 +08:00
parent ef35007d75
commit 80d8726601
18 changed files with 302 additions and 30 deletions

View File

@@ -31,7 +31,7 @@ export interface AcpConfig {
Depends on: `Stream` (`@agentclientprotocol/sdk`)
Source: [`packages/ui/acp/src/index.ts:236`](../packages/ui/acp/src/index.ts)
Source: [`packages/ui/acp/src/index.ts:241`](../packages/ui/acp/src/index.ts)
## `@deepseek-ai/dsh-acp-agent`