mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
Merge remote-tracking branch 'origin/master' into dshw/pr-deepseek-harness-deepseek-harness-2731
# Conflicts: # packages/util/brand/README.i18n.yaml # packages/util/brand/README.md # packages/util/brand/README.zh.md
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/acp/README.md
|
||||
README.md: 97af6d164b265bf0e98e3c9f5a444cffad4face5
|
||||
README.zh.md: 01999462f73ae269c784cf63af51d32b80c03d3b
|
||||
README.md: 20640ec4bdc5e9e9d2ac51e1f54fb2f587652e1c
|
||||
README.zh.md: 09fd7a3f7d40ff91d3e6516bf1c4c2075affc76f
|
||||
|
||||
+33
-3
@@ -1,11 +1,41 @@
|
||||
---
|
||||
description: "The Agent Client Protocol package group: the automation-only server that exposes fresh harness agents to programmatic clients over JSON-RPC stdio."
|
||||
kind: "package-group"
|
||||
---
|
||||
|
||||
# acp/ — Agent Client Protocol automation
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
The ACP group exposes harness agents to programmatic clients over the Agent Client Protocol. It is an interoperability transport, not a presentation or human-interaction layer; the matching out-of-process subagent *client* lives in [`subagent/subagent-acp`](../subagent/subagent-acp/README.md) because it implements the subagent provider interface.
|
||||
## Summary
|
||||
|
||||
The acp group provides one package: a server that lets programs and automation run persistent DeepSeek Harness agents over the standard Agent Client Protocol. A client can create, list, resume, and close sessions; attach standard MCP servers; select model options; send text and image prompts; receive semantic updates; answer permission prompts; and cancel work without a human in the loop. The matching client for spawning such a server from another harness lives in `subagent/subagent-acp`. This page maps the group; the package README owns the per-package contract.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Packages](#packages)
|
||||
- [Related documentation](#related-documentation)
|
||||
- [Dev Note](#dev-note)
|
||||
|
||||
-----
|
||||
|
||||
<a id="packages"></a>
|
||||
## Packages
|
||||
|
||||
| Package | Role |
|
||||
|---|---|
|
||||
| [`acp/`](acp/README.md) | Automation-only ACP server. |
|
||||
| [`acp/`](acp/README.md) | Lets programs manage persistent agents over ACP, attach MCP servers, select model options, prompt and cancel work, and receive semantic updates |
|
||||
|
||||
The server contract is documented in [`acp/README.md`](acp/README.md).
|
||||
-----
|
||||
|
||||
<a id="related-documentation"></a>
|
||||
## Related documentation
|
||||
|
||||
- [dsh-subagent-acp](../subagent/subagent-acp/README.md) — the out-of-process ACP client that spawns and drives this server.
|
||||
- [ACP as an automation-only protocol](../../.agents/notes/implemented/simplification/2026-07-23-acp-automation-only-protocol.md) — the design record for the automation contract and its wire boundaries.
|
||||
- [Multiplex concurrent ACP sessions over one connection](../../.agents/notes/implemented/feature/2026-06-14-acp-multi-session.md) — per-session isolation, ownership, and teardown decisions.
|
||||
|
||||
<a id="dev-note"></a>
|
||||
## Dev Note
|
||||
|
||||
None.
|
||||
|
||||
@@ -1,11 +1,41 @@
|
||||
# acp/:Agent Client Protocol 自动化
|
||||
---
|
||||
description: "ACP(Agent Client Protocol)包组:通过 JSON-RPC stdio 将全新 harness agent 暴露给程序化客户端的仅自动化服务器。"
|
||||
kind: "package-group"
|
||||
---
|
||||
|
||||
# acp/ — Agent Client Protocol 自动化
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
ACP(Agent Client Protocol)组通过该协议将 harness 中的 agent(智能体)公开给程序化客户端。它是互操作传输层,不是展示或人机交互层;配对的进程外 subagent *客户端*在 [`subagent/subagent-acp`](../subagent/subagent-acp/README.zh.md),因为它实现的是 subagent 提供方接口。
|
||||
## 概述
|
||||
|
||||
acp 组提供一个包:一台服务器,让程序与自动化可以通过标准 Agent Client Protocol 运行持久 DeepSeek Harness agent。客户端可以创建、列出、恢复与关闭会话,挂载标准 MCP 服务器,选择模型选项,发送文本与图片提示词,接收语义更新,响应权限提示并取消工作——无需人类参与。从另一个 harness 启动这种服务器的配套客户端位于 `subagent/subagent-acp`。本页是组的映射;包 README 负责各自的包级约定。
|
||||
|
||||
## 目录
|
||||
|
||||
- [包](#packages)
|
||||
- [相关文档](#related-documentation)
|
||||
- [开发备注](#dev-note)
|
||||
|
||||
-----
|
||||
|
||||
<a id="packages"></a>
|
||||
## 包
|
||||
|
||||
| 包 | 职责 |
|
||||
|---|---|
|
||||
| [`acp/`](acp/README.zh.md) | 仅面向自动化的 ACP 服务器。 |
|
||||
| [`acp/`](acp/README.zh.md) | 让程序通过 ACP 管理持久 agent、挂载 MCP 服务器、选择模型选项、发送或取消工作并接收语义更新 |
|
||||
|
||||
服务器约定见 [`acp/README.md`](acp/README.zh.md)。
|
||||
-----
|
||||
|
||||
<a id="related-documentation"></a>
|
||||
## 相关文档
|
||||
|
||||
- [dsh-subagent-acp](../subagent/subagent-acp/README.zh.md)——spawn 并驱动本服务器的进程外 ACP 客户端。
|
||||
- [ACP 作为仅面向自动化的协议](../../.agents/notes/implemented/simplification/2026-07-23-acp-automation-only-protocol.zh.md)——自动化约定及其协议边界的决策记录。
|
||||
- [在单个连接上多路复用并发 ACP 会话](../../.agents/notes/implemented/feature/2026-06-14-acp-multi-session.zh.md)——按会话隔离、归属与清理决策。
|
||||
|
||||
<a id="dev-note"></a>
|
||||
## 开发备注
|
||||
|
||||
无。
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/acp/acp/README.md
|
||||
README.md: 0e8689632d7115bd65f4849e2ba5d402a1cb62d4
|
||||
README.zh.md: 0dcde8c2467481454181d146a1eaae2a3ebac1dc
|
||||
README.md: 5ba5b740dd35a99b57c82c4ee18753781742b7a7
|
||||
README.zh.md: 80391c879109fdc44e9b396ee4ca0016316dbad7
|
||||
|
||||
+132
-57
@@ -1,95 +1,141 @@
|
||||
---
|
||||
description: "Automation-only Agent Client Protocol server for programmatic clients and maintainers driving DeepSeek Harness agents over JSON-RPC stdio."
|
||||
kind: "package-reference"
|
||||
---
|
||||
|
||||
# @deepseek-ai/dsh-acp
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
Automation-only [Agent Client Protocol](https://agentclientprotocol.com) v1 server over JSON-RPC stdio. Trusted programmatic clients can discover standard configuration, create or resume persistent harness Agents, attach MCP servers, prompt and cancel work, receive semantic execution updates, and close one session without affecting others.
|
||||
## Summary
|
||||
|
||||
This package is not a UI integration. It emits standard ACP semantic data, never DSH presentation cards, terminal views, diffs, locations, plans, titles, todos, custom methods, custom capability flags, or DSH-specific `_meta`. Client `_meta` is accepted as protocol metadata and has no private DSH meaning.
|
||||
`dsh-acp` lets trusted programs drive persistent DeepSeek Harness agents over the standard [Agent Client Protocol](https://agentclientprotocol.com): create or resume sessions, list resumable sessions, attach standard MCP servers, select a model and reasoning effort, prompt or cancel work, receive semantic execution updates, and close one session without affecting others. It is built for automation — out-of-process subagents, test runners, and scripted controllers — rather than the DSH user interface: it emits standard ACP messages, thoughts, generic tool lifecycle, configuration, and context usage, never private DSH presentation data or methods. Session persistence enables list, resume, and close across process restarts, while deletion, fork, transcript replay, additional directories, and interactive UI surfaces remain unsupported. The repository's own ACP client is `dsh-subagent-acp`, and `pnpm dsh --profile acp` starts a ready-to-use server. Setup and usage come first; the implementation details live in a collapsible developer section below.
|
||||
|
||||
## Plugin
|
||||
## Table of Contents
|
||||
|
||||
`apply(ctx, config)` opens an ACP SDK agent app on stdin/stdout and drives `ctx.agents`. Stdout is reserved for protocol frames. Complete lifecycle support requires `ctx.sessionPersistence`.
|
||||
- [Use this package](#use-this-package)
|
||||
- [Understand the implementation](#understand-the-implementation)
|
||||
- [Further Exploration](#further-exploration)
|
||||
- [Model Experience](#model-experience)
|
||||
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
||||
- [Dev Note](#dev-note)
|
||||
|
||||
| Config | Default | Meaning |
|
||||
-----
|
||||
|
||||
<a id="use-this-package"></a>
|
||||
## Use this package
|
||||
|
||||
Use this package when a script, test runner, or another harness needs to run agent work end to end through a standard automation protocol. The common path is: start the server, create or resume a session, optionally mount MCP servers and select model options, send a prompt, consume semantic updates, and close the session.
|
||||
|
||||
### When to choose it
|
||||
|
||||
Choose it when automation should own the interaction: an out-of-process subagent, test runner, or scripted controller that manages persistent sessions, tools, model selection, and permissions. Avoid it when a human needs DSH-specific presentation cards, plans, titles, todos, terminal views, or elicitation; this server intentionally exposes only the standard ACP v1 surface.
|
||||
|
||||
### Minimal configuration
|
||||
|
||||
Every session the server creates uses the provider and model configured here. Both fields are optional so another agent or request listener can supply them; the runnable demo composition sets both. Stdout carries only protocol traffic, so keep logging off it.
|
||||
|
||||
```yaml
|
||||
- name: '@deepseek-ai/dsh-acp'
|
||||
config:
|
||||
provider: deepseek-official
|
||||
model: deepseek-v4-pro
|
||||
```
|
||||
|
||||
| Field | Default | Meaning |
|
||||
|---|---|---|
|
||||
| `provider` | — | Initial provider route for each created or resumed Agent. |
|
||||
| `model` | — | Initial exact model for each created or resumed Agent. |
|
||||
| `sessionListPageSize` | `100` | Positive maximum number of summaries in one `session/list` page. |
|
||||
| `provider` | — | Provider route for every session's agent |
|
||||
| `model` | — | Model for every session's agent |
|
||||
| `sessionListPageSize` | `100` | Maximum summaries returned in one `session/list` page |
|
||||
|
||||
`provider` and `model` may be omitted when another Agent request listener supplies the initial route. The runnable ACP composition requires both.
|
||||
The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-acp) is the exhaustive source for every accepted field and its JSDoc.
|
||||
|
||||
## Standard ACP v1 surface
|
||||
### Start a server
|
||||
|
||||
| Method or notification | Behavior |
|
||||
`pnpm dsh --profile acp` starts the shipped stdio server. The `acp` profile mounts session persistence, so clients can list, resume, and close persistent sessions. [`@deepseek-ai/dsh-subagent-acp`](../../subagent/subagent-acp/README.md) starts the same profile for out-of-process delegation.
|
||||
|
||||
<a id="protocol-contract"></a><a id="standard-acp-v1-surface"></a>
|
||||
### Protocol contract
|
||||
|
||||
One connection can run several sessions at once, each independent. The calls a client makes:
|
||||
|
||||
| Call | What you get |
|
||||
|---|---|
|
||||
| `initialize` | Negotiates stable ACP v1. Advertises standard `session/list`, `session/resume`, `session/close`, and Streamable HTTP MCP support. Image prompts are advertised only when a durable attachment store and the configured exact route support them. |
|
||||
| `authenticate` | No-op because the server advertises no authentication methods. |
|
||||
| `session/new` | Creates one Agent with an absolute primary `cwd`, validates and mounts standard stdio or HTTP MCP servers before publishing the Agent, explicitly materializes its durable header, and returns the complete configuration-option state. |
|
||||
| `session/list` | Returns deterministic newest-first pages of persisted, resumable top-level sessions. Summaries contain only `sessionId` and absolute `cwd`; cursors are opaque keyset tokens. An optional absolute `cwd` filter uses physical-directory identity when paths exist. Active sessions and subagent/fork descendants are omitted. |
|
||||
| `session/resume` | Rejects an active id, verifies the persisted canonical workspace before Agent composition, restores the log without replaying it to the client, mounts the request's MCP servers, and returns the complete configuration-option state. |
|
||||
| `session/close` | Cancels active work, drains ordered updates and continuable descendants, flushes persistence, and disposes only that Agent scope. Persisted state remains available to `session/list` and `session/resume`. |
|
||||
| `session/set_config_option` | Sets an advertised `model` or `reasoning_effort` value and returns the complete resulting state. Invalid ids and values reject as invalid params. |
|
||||
| `session/prompt` | Admits ordered text, resource links, and supported images; permits one in-flight prompt per session; and settles only after Agent idle plus ordered update delivery. |
|
||||
| `session/cancel` | Cancels the addressed prompt admission or turn through its prompt-owned cancellation path. With no ACP prompt in flight it cancels autonomous work; unknown ids are no-ops. |
|
||||
| `$/cancel_request` | Cancellation of a `session/prompt` JSON-RPC request uses the same prompt-owned path as `session/cancel`. |
|
||||
| `session/update` | Emits committed message, thought, generic tool lifecycle, configuration, and context-usage updates described below. |
|
||||
| `session/request_permission` | Requests one standard one-shot allow or reject decision after the referenced `tool_call` notification has been delivered. |
|
||||
| `initialize` | Stable ACP v1 plus `session/list`, `session/resume`, `session/close`, and Streamable HTTP MCP support; image prompts only when the durable attachment store and configured exact route support them. |
|
||||
| `authenticate` | Immediate success; the server requires no authentication. |
|
||||
| `session/new` | A fresh persistent agent whose absolute workspace and stdio or HTTP MCP servers are validated before publication, plus its complete configuration-option state. |
|
||||
| `session/list` | Deterministic newest-first pages of persisted, resumable root sessions; an optional absolute `cwd` filter uses physical-directory identity where possible. |
|
||||
| `session/resume` | A persisted inactive session whose canonical workspace is verified before composition; its log is restored without replaying old updates. |
|
||||
| `session/close` | Quiescent cancellation, update draining, descendant disposal, persistence flush, and disposal of only the addressed Agent scope. |
|
||||
| `session/set_config_option` | A serialized update to the advertised `model` or `reasoning_effort`, returning the complete resulting state. |
|
||||
| `session/prompt` | Ordered text, resource links, and supported images, one prompt at a time per session; settlement follows Agent idle and ordered update delivery. |
|
||||
| `session/cancel` / `$/cancel_request` | The prompt-owned cancellation path; without an ACP prompt in flight it cancels autonomous work, while unknown session ids are no-ops. |
|
||||
| `session/update` | Committed assistant messages and thoughts, generic tool lifecycle, configuration changes, and context usage, serialized per session. |
|
||||
| `session/request_permission` | A permission prompt with one-shot allow/reject choices; your client can answer automatically. |
|
||||
|
||||
Unsupported surfaces are omitted from capabilities or reject when addressed: `session/load`, `session/delete`, `session/fork`, additional directories, SSE and ACP-transport MCP, modes, commands, plans, terminals, client filesystem operations, and elicitation.
|
||||
Session configuration offers opaque provider/model choices from the live LLM service catalog and a `reasoning_effort` selector when the exact model declares one. A prompt snapshots that selection before asynchronous image admission and pins it across every model step in that turn; a concurrent option change applies to the next turn. ACP clients are trusted controllers: stdio MCP entries authorize their absolute commands and environment, HTTP entries authorize their absolute HTTP(S) URLs and headers, and any initial connection or discovery failure rolls back the unpublished Agent. Unsupported surfaces are omitted or reject: `session/load`, deletion, fork, additional directories, SSE or ACP-transport MCP, modes, commands, plans, terminals, client filesystem operations, and elicitation.
|
||||
|
||||
## Session configuration
|
||||
-----
|
||||
|
||||
Every new or resumed session returns standard select options:
|
||||
<a id="understand-the-implementation"></a>
|
||||
## Understand the implementation
|
||||
|
||||
- `model` groups choices by provider from the advisory LLM catalog. Values are opaque strings carrying the exact provider/model pair; clients must return them unchanged.
|
||||
- `reasoning_effort` is derived from the selected exact model and is omitted when that model does not declare reasoning choices. When the adapter exposes choices but preserves the provider's own default, a `Provider default` choice represents omitting an explicit effort.
|
||||
<details>
|
||||
<summary>Implementation internals — click to expand</summary>
|
||||
|
||||
The ACP plugin's `provider` and `model` config establish the initial selection. Adapter topology changes emit `config_option_update` with the complete current state. Mutations are serialized per session.
|
||||
This section explains how the server realizes the behavior above and points at the code that implements it; the observable behavior is fully covered in [Use this package](#use-this-package).
|
||||
|
||||
An accepted prompt snapshots the selected route before asynchronous image admission. Its per-session module associates that snapshot with the identified inbox message until claim, then pins the same provider, model, and reasoning effort across image validation, prompt variables, and every model step in that turn. A concurrent option change applies to the next ACP turn.
|
||||
### Design philosophy
|
||||
|
||||
## MCP trust and isolation
|
||||
The server is an automation transport with an intentionally standard public protocol. Three commitments shape it:
|
||||
|
||||
ACP clients are trusted automation controllers. A stdio declaration authorizes DSH to execute its absolute command in the session `cwd` with the supplied arguments and environment entries. An HTTP declaration authorizes requests to its absolute HTTP(S) URL with the supplied headers. DSH does not reinterpret client metadata or add private cwd, timeout, or transport fields.
|
||||
- **Standard semantic updates only.** The wire carries committed messages and thoughts, generic tool lifecycle, configuration, and context usage; raw provider deltas, retry attempts, DSH presentation data, and unsupported content stay off the wire.
|
||||
- **Truthful capability and configuration state.** `initialize` advertises only mounted support, topology changes publish complete configuration options, and a prompt pins the exact route it admitted.
|
||||
- **Quiescence before settlement.** Prompt and close operations settle only after their owned admission, Agent activity, ordered updates, descendants, persistence, and disposal have reached the required terminal state.
|
||||
|
||||
Server names are validated and converted to stable DSH MCP namespaces; duplicate normalized names reject before Agent publication. Environment names/values and HTTP headers are validated, including case-insensitive duplicate headers. Standard stdio and Streamable HTTP clients use `dsh-mcp-client`'s existing tool-call timeout and reconnect defaults. Initial connection and tool discovery must succeed, so any failure rolls back the unpublished Agent.
|
||||
The decision history lives in the [ACP as an automation-only protocol note](../../../.agents/notes/implemented/simplification/2026-07-23-acp-automation-only-protocol.md) and the [multi-session note](../../../.agents/notes/implemented/feature/2026-06-14-acp-multi-session.md).
|
||||
|
||||
Each Agent scope owns its MCP registrations and connections. The same server namespace may therefore exist in independent ACP sessions, while a duplicate inside one session still fails. Session close, connection loss, and plugin disposal release the scoped tools and transports.
|
||||
### Source map
|
||||
|
||||
## Semantic updates
|
||||
|
||||
Per-session delivery is serialized and drained before prompt completion:
|
||||
|
||||
| Durable DSH fact | Standard ACP update |
|
||||
| File | Role |
|
||||
|---|---|
|
||||
| Committed assistant text or image | `agent_message_chunk` with the durable message id |
|
||||
| Committed reasoning | `agent_thought_chunk` with the durable message id |
|
||||
| Durable tool call | `tool_call` with the DSH call id, canonical DSH tool name as `title`, generic `other` kind, and parsed input when valid JSON |
|
||||
| Durable tool result | `tool_call_update` with the same call id, completed/failed status, and standard content blocks |
|
||||
| Known context capacity plus measured context pressure | `usage_update` |
|
||||
| LLM adapter topology change | `config_option_update` with all options |
|
||||
| [`src/index.ts`](src/index.ts) | Plugin entry: `Config` schema, `AgentSideConnection` wiring, per-session records, admission and settlement, teardown |
|
||||
| [`src/content.ts`](src/content.ts) | Wire-content admission and projection: image validation, route recheck, prompt reconstruction, assistant block conversion |
|
||||
| [`src/codec.ts`](src/codec.ts) | Pure turn-ending to ACP `stopReason` mapping |
|
||||
| [`src/invariant.ts`](src/invariant.ts) | Invariant companion (no runtime invariant; this transport owns no durable package-local event stream) |
|
||||
|
||||
Raw model deltas, retry attempts, presentation data, and unsupported core content never enter the ACP wire. Committed images are re-read and integrity-verified before inline base64 delivery. A missing or corrupt committed image fails the correlated prompt instead of producing a placeholder.
|
||||
### Admission and prompt settlement
|
||||
|
||||
## Lifecycle and outcomes
|
||||
Each session permits one in-flight prompt. Admission validates the whole prompt batch, snapshots the selected route, rechecks the exact Agent identity and image capability, persists image attachments, and only then queues the user message — a cancellation that wins admission never enqueues a late turn. Once queued, the session module associates the snapshot with the inbox message until claim and pins the same provider, model, and reasoning effort across prompt variables and every model step in that turn. Per-session update delivery is serialized; committed images are re-read and integrity-verified, so a missing or corrupt image fails the correlated prompt instead of emitting a placeholder. Settlement precedence is explicit cancellation, committed-output failure, interval-wide Agent failure, then the correlated turn ending.
|
||||
|
||||
One connection may own several independent sessions. Exact Agent identity guards event and permission routing. Each per-session module owns its Agent handle, MCP mounts, future and turn-pinned model selections, prompt slot, update chain, and memoized close operation.
|
||||
### Teardown and connection ownership
|
||||
|
||||
Explicit close, connection loss, and plugin disposal use the same quiescent teardown. Teardown stops new work, cancels prompt admission and Agent activity, drains committed updates, disposes continuable descendants child-first, flushes the session, and releases every Agent scope. Failures are reported only after all owned teardown work settles; other frontends sharing the Context are untouched.
|
||||
Each session module owns its Agent handle, MCP mounts, future and turn-pinned model selections, prompt slot, update chain, and memoized close operation. Explicit close, client disconnect, and Cordis disposal use the same quiescent teardown: stop new work, cancel prompt admission and Agent activity, drain committed updates, dispose continuable descendants child-first, flush persistence, and release the owned Agent scope. A session close leaves persisted state available for list and resume, and other sessions or frontends sharing the Context remain untouched.
|
||||
|
||||
Prompt settlement precedence is explicit cancellation, committed-output failure, interval-wide Agent failure, then the correlated turn ending. Standard outcomes include `end_turn`, `max_tokens`, and `cancelled`; correlated model failures become standard JSON-RPC errors. No additional DSH result object is returned.
|
||||
</details>
|
||||
|
||||
## Running
|
||||
-----
|
||||
|
||||
`pnpm --dir /path/to/deepseek-harness dsh --profile acp` boots the repository's automation server profile. The generic keyless conformance test launches this profile through `dsh` and drives it using only the ACP SDK, including model selection, MCP attachment, close, process restart, list/resume, and cancellation.
|
||||
<a id="further-exploration"></a>
|
||||
## Further Exploration
|
||||
|
||||
Read these pages when the package-level contract is not enough. They move from the matching client to the design records behind the automation contract.
|
||||
|
||||
- [dsh-subagent-acp](../../subagent/subagent-acp/README.md) — the out-of-process ACP client that spawns and drives this server.
|
||||
- [ACP as an automation-only protocol](../../../.agents/notes/implemented/simplification/2026-07-23-acp-automation-only-protocol.md) — the design record for the automation contract and its wire boundaries.
|
||||
- [Multiplex concurrent ACP sessions over one connection](../../../.agents/notes/implemented/feature/2026-06-14-acp-multi-session.md) — per-session isolation, ownership, and teardown decisions.
|
||||
- [Extension cookbook](../../../docs/cookbook/extension-cookbook.md) — this package as the automation-only worked example for extension authors.
|
||||
|
||||
-----
|
||||
|
||||
<a id="model-experience"></a>
|
||||
## Model Experience
|
||||
|
||||
### Prompt content
|
||||
|
||||
#### What the model sees
|
||||
|
||||
`session/prompt` produces an ordinary logged user message. Text/image order is preserved; adjacent text is concatenated; a resource link becomes a bracketed `[resource_link name=… uri=…]` reference. Inline image base64 is discarded after durable admission. Protocol metadata, client capabilities, permission choices, session ids, and ACP configuration objects do not enter model requests.
|
||||
`session/prompt` preserves text and image order in one user message: adjacent text concatenates, and a resource link appears as a bracketed `[resource_link name=… uri=…]` reference the model may open with its own tools. Inline image base64 is discarded after batch admission, so the durable message contains only verified attachment references. Protocol metadata, client capabilities, permission choices, and session ids never enter the model request.
|
||||
|
||||
#### Token effect
|
||||
|
||||
@@ -99,9 +145,38 @@ Prompt content, tool calls/results, and durable image references remain in that
|
||||
|
||||
Append-only while the selected route and assembled prefix stay unchanged. A model change starts the next ACP turn on the new route.
|
||||
|
||||
### Permission decisions
|
||||
|
||||
#### What the model sees
|
||||
|
||||
Nothing directly. The owning tool records its allowed, rejected, cancelled, or unavailable outcome through the normal tool-result path.
|
||||
|
||||
#### Token effect
|
||||
|
||||
Only the owning tool result contributes tokens.
|
||||
|
||||
#### KV Cache effect
|
||||
|
||||
Append-only through the owning tool result.
|
||||
|
||||
## Known Limitations and Deferred Work
|
||||
|
||||
- Only one primary workspace is supported. Additional directories remain unsupported.
|
||||
- Only PNG, JPEG, WebP, and GIF prompt images are supported, subject to the attachment store and exact model route.
|
||||
- MCP resources and prompts have no DSH consumer; ACP mounts expose MCP tools only.
|
||||
- Session deletion, fork, transcript replay through `session/load`, modes, commands, plans, terminals, client filesystem operations, and elicitation remain outside this automation surface.
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
|
||||
These limits define when this package is a poor fit or needs special operational care. They are current package constraints, not a protocol comparison or a task backlog.
|
||||
|
||||
- **One primary workspace** — additional directories remain unsupported.
|
||||
- **Raster prompt images only** — PNG, JPEG, WebP, and GIF require a durable attachment store and an exact image-capable route.
|
||||
- **MCP tools only** — MCP resources and prompts have no DSH consumer.
|
||||
- **No transcript replay or interactive extensions** — session deletion, fork, `session/load`, modes, commands, plans, terminals, client filesystem operations, and elicitation remain outside this automation surface.
|
||||
|
||||
<a id="dev-note"></a>
|
||||
### Dev Note
|
||||
|
||||
<details>
|
||||
<summary>Working context for maintainers — click to expand</summary>
|
||||
|
||||
None.
|
||||
|
||||
</details>
|
||||
|
||||
+134
-61
@@ -1,97 +1,141 @@
|
||||
---
|
||||
description: "面向程序化客户端与维护者的仅自动化 Agent Client Protocol 服务器,用于通过 JSON-RPC stdio 驱动 DeepSeek Harness agent。"
|
||||
kind: "package-reference"
|
||||
---
|
||||
|
||||
# @deepseek-ai/dsh-acp
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
通过 JSON-RPC stdio 提供的仅面向自动化的 [Agent Client Protocol](https://agentclientprotocol.com) v1 服务器。受信任的程序化客户端可以发现标准配置、创建或恢复持久化的 harness Agent、挂载 MCP 服务器、提示和取消工作、接收语义执行更新,并在不影响其他会话的情况下关闭单个会话。
|
||||
## 概述
|
||||
|
||||
此包不是 UI 集成。它只发出标准 ACP 语义数据,绝不发出 DSH 展示卡片、终端视图、diff、位置、计划、标题、todo、自定义方法、自定义能力标记或 DSH 专用 `_meta`。客户端 `_meta` 仅作为协议元数据接收,不具有 DSH 私有含义。
|
||||
`dsh-acp` 让受信程序可以通过标准 [Agent Client Protocol(ACP)](https://agentclientprotocol.com) 驱动持久 DeepSeek Harness agent:创建或恢复会话、列出可恢复会话、挂载标准 MCP 服务器、选择模型与推理强度、发送或取消工作、接收语义执行更新,并关闭一个会话而不影响其他会话。它是为自动化而生的——进程外 subagent、测试运行器与脚本化控制器——而不是 DSH 用户界面:它发送标准 ACP 消息、thought、通用工具生命周期、配置与上下文用量,绝不发送 DSH 私有呈现数据或方法。会话持久化支持跨进程重启的列出、恢复与关闭,而删除、fork、转录回放、附加目录与交互式 UI 界面仍不支持。仓库自带的 ACP 客户端是 `dsh-subagent-acp`,`pnpm dsh --profile acp` 会启动一个开箱即用的服务器。设置与用法在前;实现细节放在下方可折叠的开发者章节中。
|
||||
|
||||
## 插件
|
||||
## 目录
|
||||
|
||||
`apply(ctx, config)` 在 stdin/stdout 上打开 ACP SDK agent app,并驱动 `ctx.agents`。Stdout 专用于协议帧。完整生命周期支持要求挂载 `ctx.sessionPersistence`。
|
||||
- [使用本包](#use-this-package)
|
||||
- [理解实现](#understand-the-implementation)
|
||||
- [进一步探索](#further-exploration)
|
||||
- [模型体验](#model-experience)
|
||||
- [已知限制与延期工作](#known-limitations-and-deferred-work)
|
||||
- [开发备注](#dev-note)
|
||||
|
||||
| 配置 | 默认值 | 含义 |
|
||||
-----
|
||||
|
||||
<a id="use-this-package"></a>
|
||||
## 使用本包
|
||||
|
||||
当脚本、测试运行器或另一个 harness 需要通过标准自动化协议端到端运行 agent 工作时,使用本包。常用路径是:启动服务器、创建或恢复会话、按需挂载 MCP 服务器并选择模型选项、发送提示词、消费语义更新,再关闭会话。
|
||||
|
||||
### 何时选择
|
||||
|
||||
当自动化应拥有交互时选择它:管理持久会话、工具、模型选择与权限的进程外 subagent、测试运行器或脚本化控制器。当人类需要 DSH 专用呈现卡片、计划、标题、todo、终端视图或 elicitation 时请避开;本服务器刻意只提供标准 ACP v1 界面。
|
||||
|
||||
### 最小配置
|
||||
|
||||
服务器创建的每个会话都使用此处配置的提供方与模型。两个字段都是可选的,以便由另一个 agent/request 监听器提供;可运行的演示组合会同时设置两者。Stdout 只承载协议流量,因此请让日志远离它。
|
||||
|
||||
```yaml
|
||||
- name: '@deepseek-ai/dsh-acp'
|
||||
config:
|
||||
provider: deepseek-official
|
||||
model: deepseek-v4-pro
|
||||
```
|
||||
|
||||
| 字段 | 默认值 | 含义 |
|
||||
|---|---|---|
|
||||
| `provider` | 无 | 每个新建或恢复 Agent 的初始提供方路由。 |
|
||||
| `model` | 无 | 每个新建或恢复 Agent 的初始确切模型。 |
|
||||
| `sessionListPageSize` | `100` | 单个 `session/list` 页面返回的摘要数量上限,必须为正数。 |
|
||||
| `provider` | — | 每个会话 agent 的提供方路由 |
|
||||
| `model` | — | 每个会话 agent 的模型 |
|
||||
| `sessionListPageSize` | `100` | 单页 `session/list` 返回的最大摘要数量 |
|
||||
|
||||
当另一个 Agent 请求监听器提供初始路由时,可以省略 `provider` 和 `model`。可运行 ACP 组合同时要求两者。
|
||||
生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-acp)是每个受支持字段及其 JSDoc 的穷尽式真源。
|
||||
|
||||
<a id="standard-acp-v1-surface"></a>
|
||||
### 启动服务器
|
||||
|
||||
## 标准 ACP v1 接口
|
||||
`pnpm dsh --profile acp` 会启动随附的 stdio 服务器。`acp` profile 会挂载会话持久化,因此客户端可以列出、恢复和关闭持久会话。[`@deepseek-ai/dsh-subagent-acp`](../../subagent/subagent-acp/README.zh.md) 会启动同一 profile 来执行进程外委派。
|
||||
|
||||
| 方法或通知 | 行为 |
|
||||
<a id="protocol-contract"></a><a id="standard-acp-v1-surface"></a>
|
||||
### 协议约定
|
||||
|
||||
一个连接可以同时运行多个会话,彼此独立。客户端发出的调用如下:
|
||||
|
||||
| 调用 | 你会得到什么 |
|
||||
|---|---|
|
||||
| `initialize` | 协商稳定 ACP v1。公布标准 `session/list`、`session/resume`、`session/close` 和 Streamable HTTP MCP 支持。只有持久附件存储和配置的确切路由都支持图片时,才公布图片提示词能力。 |
|
||||
| `authenticate` | 空操作,因为服务器不公布身份验证方法。 |
|
||||
| `session/new` | 使用绝对主 `cwd` 创建一个 Agent;在公布 Agent 前校验并挂载标准 stdio 或 HTTP MCP 服务器;显式实体化其持久 header;返回完整配置选项状态。 |
|
||||
| `session/list` | 按创建时间从新到旧,确定性分页返回已持久化且可恢复的顶层会话。摘要只包含 `sessionId` 和绝对 `cwd`;cursor 是不透明的 keyset token。可选绝对 `cwd` 过滤器会在路径存在时比较物理目录身份。活动会话以及 subagent/fork 后代不会出现。 |
|
||||
| `session/resume` | 拒绝活动 id;在组合 Agent 前校验持久化会话的规范工作区;恢复日志但不向客户端重放;挂载该请求的 MCP 服务器;返回完整配置选项状态。 |
|
||||
| `session/close` | 取消活动工作、drain 有序更新和可继续后代、flush 持久化,并只释放该 Agent scope。持久化状态仍可供 `session/list` 和 `session/resume` 使用。 |
|
||||
| `session/set_config_option` | 设置已公布的 `model` 或 `reasoning_effort` 值,并返回完整结果状态。无效 id 或值以 invalid params 拒绝。 |
|
||||
| `session/prompt` | 准入有序文本、资源链接和受支持图片;每个会话只允许一个进行中的提示词;只在 Agent 空闲且有序更新交付完成后结算。 |
|
||||
| `session/cancel` | 通过提示词自有取消路径取消指定的准入或轮次。没有 ACP 提示词进行时取消自主工作;未知 id 为空操作。 |
|
||||
| `$/cancel_request` | 取消 `session/prompt` JSON-RPC 请求时,使用与 `session/cancel` 相同的提示词自有路径。 |
|
||||
| `session/update` | 发出下文所述的已提交消息、思考、通用工具生命周期、配置和上下文用量更新。 |
|
||||
| `session/request_permission` | 在引用的 `tool_call` 通知交付后,请求一次标准的一次性允许或拒绝决定。 |
|
||||
| `initialize` | 稳定 ACP v1,以及 `session/list`、`session/resume`、`session/close` 与 Streamable HTTP MCP 支持;图片提示词只在持久附件存储和配置的确切路由支持时公布。 |
|
||||
| `authenticate` | 立即成功;服务器不需要身份验证。 |
|
||||
| `session/new` | 全新持久 agent;其绝对工作区与 stdio 或 HTTP MCP 服务器会在发布前通过校验,并返回完整配置选项状态。 |
|
||||
| `session/list` | 按确定的新到旧顺序分页返回已持久、可恢复的根会话;可选绝对 `cwd` 筛选会尽可能使用物理目录标识。 |
|
||||
| `session/resume` | 恢复一个已持久且非活跃的会话;组合前校验其规范工作区,并恢复日志但不回放旧更新。 |
|
||||
| `session/close` | 停稳式取消、更新 drain、后代释放、持久化 flush,并且只释放指定 Agent 作用域。 |
|
||||
| `session/set_config_option` | 串行更新公布的 `model` 或 `reasoning_effort`,并返回完整结果状态。 |
|
||||
| `session/prompt` | 有序文本、资源链接与受支持图片,每个会话一次一个提示词;Agent 空闲且有序更新交付后才结算。 |
|
||||
| `session/cancel` / `$/cancel_request` | 提示词所拥有的取消路径;没有进行中的 ACP 提示词时取消自主工作,未知会话 id 则为空操作。 |
|
||||
| `session/update` | 已提交 assistant 消息与 thought、通用工具生命周期、配置变化与上下文用量,按会话串行交付。 |
|
||||
| `session/request_permission` | 带一次性允许/拒绝选项的权限提示;你的客户端可以自动回答。 |
|
||||
|
||||
未支持的接口不会出现在能力中,或在被调用时拒绝:`session/load`、`session/delete`、`session/fork`、附加目录、SSE 和 ACP 传输 MCP、模式、命令、计划、终端、客户端文件系统操作以及 elicitation。
|
||||
会话配置从实时 LLM 服务目录提供不透明的提供方/模型选项,并在确切模型声明推理选项时提供 `reasoning_effort`。提示词会在异步图片准入前快照该选择,并在该轮的每个模型步骤中固定它;并发选项变更从下一轮开始生效。ACP 客户端是受信控制器:stdio MCP 条目授权其绝对命令与环境,HTTP 条目授权其绝对 HTTP(S) URL 与 header;初始连接或发现失败会回滚尚未发布的 Agent。不支持的界面会被省略或拒绝:`session/load`、删除、fork、附加目录、SSE 或 ACP 传输 MCP、mode、命令、计划、终端、客户端文件系统操作与 elicitation。
|
||||
|
||||
## 会话配置
|
||||
-----
|
||||
|
||||
每个新建或恢复的会话都会返回标准 select 选项:
|
||||
<a id="understand-the-implementation"></a>
|
||||
## 理解实现
|
||||
|
||||
- `model` 根据建议性 LLM catalog 按提供方分组。值是不透明字符串,携带确切的提供方/模型对;客户端必须原样返回。
|
||||
- `reasoning_effort` 来自所选确切模型;该模型未声明推理选项时省略。如果 adapter 公开选项但保留提供方自身默认值,`Provider default` 选项表示不显式指定 effort。
|
||||
<details>
|
||||
<summary>实现细节——点击展开</summary>
|
||||
|
||||
ACP 插件的 `provider` 和 `model` 配置建立初始选择。Adapter 拓扑变化会发送包含完整当前状态的 `config_option_update`。每个会话会串行处理配置变更。
|
||||
本节解释服务器如何实现上述行为,并指出实现它的代码位置;可观察行为已在[使用本包](#use-this-package)中完整说明。
|
||||
|
||||
已接受的提示词会在异步图片准入前快照所选路由。Per-session 模块会把该快照与已识别 inbox 消息关联到 claim 时刻,再把同一提供方、模型和 reasoning effort 固定到图片校验、提示词变量以及该轮次中的每个模型步骤。并发配置变更从下一个 ACP 轮次开始生效。
|
||||
### 设计理念
|
||||
|
||||
## MCP 信任与隔离
|
||||
服务器是刻意采用标准公开协议的自动化传输。三项承诺塑造了它:
|
||||
|
||||
ACP 客户端是受信任的自动化控制器。stdio 声明授权 DSH 在会话 `cwd` 中执行其绝对命令,并使用所给参数和环境项。HTTP 声明授权向其绝对 HTTP(S) URL 发送带所给 header 的请求。DSH 不重新解释客户端元数据,也不增加私有 cwd、超时或传输字段。
|
||||
- **只发送标准语义更新。** 协议承载已提交消息与 thought、通用工具生命周期、配置与上下文用量;原始提供方增量、重试尝试、DSH 呈现数据与不受支持内容不会进入协议。
|
||||
- **诚实的能力与配置状态。** `initialize` 只公布已挂载支持,拓扑变化会发布完整配置选项,提示词则固定其准入时的确切路由。
|
||||
- **停稳后才结算。** 提示词与关闭操作只在其拥有的准入、Agent 活动、有序更新、后代、持久化与释放达到所需终态后才结算。
|
||||
|
||||
服务器名称会经过校验并转换为稳定的 DSH MCP namespace;重复的规范化名称会在 Agent 公布前拒绝。环境变量名/值和 HTTP header 会被校验,其中 header 重复检查不区分大小写。标准 stdio 与 Streamable HTTP 客户端使用 `dsh-mcp-client` 现有的工具调用超时和重连默认值。初始连接和工具发现必须成功,因此任何失败都会回滚尚未公布的 Agent。
|
||||
决策历史记录在 [ACP 作为仅面向自动化的协议笔记](../../../.agents/notes/implemented/simplification/2026-07-23-acp-automation-only-protocol.zh.md) 与[多会话笔记](../../../.agents/notes/implemented/feature/2026-06-14-acp-multi-session.zh.md) 中。
|
||||
|
||||
每个 Agent scope 拥有自己的 MCP 注册和连接。因此,独立 ACP 会话可以使用相同服务器 namespace,而同一会话内的重复仍会失败。会话关闭、连接丢失和插件释放都会移除 scoped 工具和传输。
|
||||
### 源码地图
|
||||
|
||||
## 语义更新
|
||||
|
||||
每个会话会串行交付更新,并在提示词完成前 drain:
|
||||
|
||||
| 持久 DSH 事实 | 标准 ACP 更新 |
|
||||
| 文件 | 职责 |
|
||||
|---|---|
|
||||
| 已提交 assistant 文本或图片 | 携带持久消息 id 的 `agent_message_chunk` |
|
||||
| 已提交 reasoning | 携带持久消息 id 的 `agent_thought_chunk` |
|
||||
| 持久工具调用 | `tool_call`:使用 DSH call id、规范 DSH 工具名作为 `title`、通用 `other` kind,并在参数为有效 JSON 时提供解析后的输入 |
|
||||
| 持久工具结果 | `tool_call_update`:使用相同 call id、completed/failed 状态和标准内容块 |
|
||||
| 已知上下文容量和已测上下文压力 | `usage_update` |
|
||||
| LLM adapter 拓扑变化 | 包含全部选项的 `config_option_update` |
|
||||
| [`src/index.ts`](src/index.ts) | 插件入口:`Config` schema、`AgentSideConnection` 接线、按会话记录、准入与结算、清理 |
|
||||
| [`src/content.ts`](src/content.ts) | 协议内容准入与投影:图片校验、路由重查、提示词重建、assistant 块转换 |
|
||||
| [`src/codec.ts`](src/codec.ts) | 轮次结束到 ACP `stopReason` 的纯映射 |
|
||||
| [`src/invariant.ts`](src/invariant.ts) | 不变式伴生插件(无运行时不变式;本传输不拥有持久包内事件流) |
|
||||
|
||||
原始模型 delta、重试尝试、展示数据和不受支持的核心内容绝不会进入 ACP wire。已提交图片在以内联 base64 交付前会重新读取并校验完整性。已提交图片缺失或损坏会使关联提示词失败,而不会产生占位符。
|
||||
### 准入与提示词结算
|
||||
|
||||
## 生命周期与结果
|
||||
每个会话只允许一个正在处理的提示词。准入先校验整个提示词批次、快照所选路由、重新检查 Agent 是否为同一对象与图片能力、持久化图片附件,然后才把用户消息入队——赢得准入的取消绝不会入队迟到的轮次。入队后,会话模块把该快照与 inbox 消息关联到认领时刻,并在提示词变量与该轮的每个模型步骤中固定相同的提供方、模型与推理强度。按会话更新会串行交付;已提交图片会重新读取并验证完整性,因此图片缺失或损坏会让关联提示词失败,而不是发出占位符。结算优先级依次为显式取消、已提交输出失败、区间内 Agent 失败、关联轮次结束。
|
||||
|
||||
一个连接可以拥有多个独立会话。事件和权限路由会校验确切 Agent 身份。每个 per-session 模块拥有自己的 Agent handle、MCP 挂载、未来选择和轮次固定的模型选择、提示词槽位、更新链以及记忆化关闭操作。
|
||||
### 清理与连接归属
|
||||
|
||||
显式关闭、连接丢失和插件释放使用同一个完全停稳的 teardown。Teardown 会停止新工作、取消提示词准入和 Agent 活动、drain 已提交更新、按 child-first 顺序释放可继续后代、flush 会话,并释放每个 Agent scope。只有在所有自有 teardown 工作结算后才报告失败;共享该 Context 的其他前端不受影响。
|
||||
每个会话模块拥有其 Agent 句柄、MCP 挂载、未来与轮次固定的模型选择、提示词槽位、更新链和记忆化关闭操作。显式关闭、客户端断开与 Cordis 释放使用同一停稳式清理流程:停止新工作、取消提示词准入与 Agent 活动、drain 已提交更新、按子优先顺序释放可继续后代、flush 持久化并释放所拥有的 Agent 作用域。会话关闭后,持久状态仍可供列出与恢复;共享上下文的其他会话或前端不受影响。
|
||||
|
||||
提示词结算优先级依次为显式取消、已提交输出失败、区间内 Agent 失败、关联轮次结束。标准结果包括 `end_turn`、`max_tokens` 和 `cancelled`;关联模型失败成为标准 JSON-RPC error。不会返回额外 DSH 结果对象。
|
||||
</details>
|
||||
|
||||
## 运行
|
||||
-----
|
||||
|
||||
`pnpm --dir /path/to/deepseek-harness dsh --profile acp` 启动仓库的自动化服务器 profile。通用 keyless conformance 测试通过 `dsh` 启动此 profile,并只使用 ACP SDK 驱动它,覆盖模型选择、MCP 挂载、关闭、进程重启、列出/恢复和取消。
|
||||
<a id="further-exploration"></a>
|
||||
## 进一步探索
|
||||
|
||||
当包级约定不够用时阅读以下页面。它们从匹配的客户端逐步进入自动化约定背后的设计记录。
|
||||
|
||||
- [dsh-subagent-acp](../../subagent/subagent-acp/README.zh.md)——spawn 并驱动本服务器的进程外 ACP 客户端。
|
||||
- [ACP 作为仅面向自动化的协议](../../../.agents/notes/implemented/simplification/2026-07-23-acp-automation-only-protocol.zh.md)——自动化约定及其协议边界的决策记录。
|
||||
- [在单个连接上多路复用并发 ACP 会话](../../../.agents/notes/implemented/feature/2026-06-14-acp-multi-session.zh.md)——按会话隔离、归属与清理决策。
|
||||
- [扩展实操手册](../../../docs/cookbook/extension-cookbook.zh.md)——本包作为扩展作者的仅自动化完整示例。
|
||||
|
||||
-----
|
||||
|
||||
<a id="model-experience"></a>
|
||||
## 模型体验
|
||||
|
||||
### 提示词内容
|
||||
|
||||
#### 模型看到的内容
|
||||
#### 模型看到什么
|
||||
|
||||
`session/prompt` 产生普通的已记录用户消息。文本/图片顺序会保留;相邻文本会拼接;资源链接会变成带方括号的 `[resource_link name=… uri=…]` 引用。内联图片 base64 在持久准入后即被丢弃。协议元数据、客户端能力、权限选择、会话 id 和 ACP 配置对象不会进入模型请求。
|
||||
`session/prompt` 会在一条用户消息中保留文本与图片顺序:相邻文本会拼接,资源链接则表示为带方括号的 `[resource_link name=… uri=…]` 引用,模型可以使用自身工具打开它。内联图片 base64 在批量准入后即被丢弃,因此持久消息只包含经过校验的附件引用。协议元数据、客户端能力、权限选择与会话 id 绝不进入模型请求。
|
||||
|
||||
#### Token 影响
|
||||
|
||||
@@ -99,11 +143,40 @@ ACP 客户端是受信任的自动化控制器。stdio 声明授权 DSH 在会
|
||||
|
||||
#### KV Cache 影响
|
||||
|
||||
当所选路由和已组装前缀不变时仅追加。模型变更会让下一个 ACP 轮次使用新路由。
|
||||
仅追加;新用户消息位于可复用请求前缀之后,不会使先前缓存条目失效。
|
||||
|
||||
## 已知限制与暂缓事项
|
||||
### 权限决策
|
||||
|
||||
- 只支持一个主 workspace。附加目录仍不受支持。
|
||||
- 提示词图片只支持 PNG、JPEG、WebP 和 GIF,并受附件存储和确切模型路由约束。
|
||||
- MCP resource 和 prompt 没有 DSH consumer;ACP 挂载只公开 MCP 工具。
|
||||
- 会话删除、fork、通过 `session/load` 重放 transcript、模式、命令、计划、终端、客户端文件系统操作和 elicitation 仍不属于此自动化接口。
|
||||
#### 模型看到什么
|
||||
|
||||
不会直接看到任何内容。所属工具通过常规工具结果路径记录其结果:允许、拒绝、取消或不可用。
|
||||
|
||||
#### Token 影响
|
||||
|
||||
只有所属工具的结果会贡献 token。
|
||||
|
||||
#### KV Cache 影响
|
||||
|
||||
仅通过所属工具的结果追加。
|
||||
|
||||
## 已知限制与延期工作
|
||||
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
|
||||
这些限制说明本包何时不合适,或何时需要特别的运维注意。它们是当前包约束,不是协议对比或任务积压。
|
||||
|
||||
- **仅一个主 workspace**——附加目录仍不支持。
|
||||
- **仅光栅提示词图片**——PNG、JPEG、WebP 与 GIF 要求持久附件存储及确切的图片能力路由。
|
||||
- **仅 MCP 工具**——MCP resource 与 prompt 没有 DSH 消费方。
|
||||
- **没有转录回放或交互式扩展**——会话删除、fork、`session/load`、mode、命令、计划、终端、客户端文件系统操作与 elicitation 仍不属于此自动化界面。
|
||||
|
||||
<a id="dev-note"></a>
|
||||
### 开发备注
|
||||
|
||||
<details>
|
||||
<summary>维护者的工作上下文——点击展开</summary>
|
||||
|
||||
无。
|
||||
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user