# Conflicts: # examples/acp-agent/tests/snapshots/advanced-toolchain/session.1.jsonl # examples/acp-agent/tests/snapshots/advanced-toolchain/session.2.jsonl # examples/acp-agent/tests/snapshots/subagent-depth-two-rejection/session.1.jsonl # examples/acp-agent/tests/snapshots/subagent-depth-two-rejection/session.2.jsonl # examples/acp-agent/tests/snapshots/subagent-mixed/session.1.jsonl # examples/acp-agent/tests/snapshots/subagent-mixed/session.2.jsonl # examples/acp-agent/tests/snapshots/subagent-multi/session.1.jsonl # examples/acp-agent/tests/snapshots/subagent-multi/session.2.jsonl # examples/acp-agent/tests/snapshots/subagent-parallel/session.1.jsonl # examples/acp-agent/tests/snapshots/subagent-parallel/session.2.jsonl # examples/headless-agent/tests/snapshots/advanced-toolchain/session.1.jsonl # examples/headless-agent/tests/snapshots/advanced-toolchain/session.2.jsonl # examples/headless-agent/tests/snapshots/advanced-toolchain/session.jsonl # examples/headless-agent/tests/snapshots/compaction-recovery/session.jsonl # examples/headless-agent/tests/snapshots/pty-tools/session.jsonl |
||
|---|---|---|
| .. | ||
| tests | ||
| advanced.cordis.snapshot.yml | ||
| advanced.cordis.yml | ||
| agent-instructions.cordis.snapshot.yml | ||
| agent-instructions.cordis.yml | ||
| background-job-admission.cordis.snapshot.yml | ||
| background-job-admission.cordis.yml | ||
| both-mode.cordis.snapshot.yml | ||
| both-mode.cordis.yml | ||
| child-question.cordis.snapshot.yml | ||
| child-question.cordis.yml | ||
| code-mode-image.cordis.snapshot.yml | ||
| code-mode-image.cordis.yml | ||
| code-mode-workspace-context.cordis.snapshot.yml | ||
| code-mode-workspace-context.cordis.yml | ||
| code-mode.cordis.snapshot.yml | ||
| code-mode.cordis.yml | ||
| composition.md | ||
| cordis-tools.cordis.yml | ||
| cordis.snapshot.yml | ||
| cordis.yml | ||
| depth-two.cordis.snapshot.yml | ||
| depth-two.cordis.yml | ||
| fs.cordis.snapshot.yml | ||
| fs.cordis.yml | ||
| image-text-route.cordis.snapshot.yml | ||
| image-text-route.cordis.yml | ||
| image.cordis.snapshot.yml | ||
| image.cordis.yml | ||
| package.json | ||
| partial-landlock.cordis.snapshot.yml | ||
| partial-landlock.cordis.yml | ||
| product-subagent-both.cordis.snapshot.yml | ||
| product-subagent-both.cordis.yml | ||
| product-subagent-codex.cordis.snapshot.yml | ||
| product-subagent-codex.cordis.yml | ||
| pty-snapshot-backend.mjs | ||
| pty.cordis.snapshot.yml | ||
| pty.cordis.yml | ||
| README.i18n.yaml | ||
| README.md | ||
| README.zh.md | ||
| retry.cordis.snapshot.yml | ||
| retry.cordis.yml | ||
| session-query.cordis.snapshot.yml | ||
| session-query.cordis.yml | ||
| session-sandbox-root.cordis.snapshot.yml | ||
| session-sandbox-root.cordis.yml | ||
| session-title.cordis.snapshot.yml | ||
| session-title.cordis.yml | ||
| subagent-configured-effort.cordis.snapshot.yml | ||
| subagent-configured-effort.cordis.yml | ||
| subagent-continuable-inheritance.cordis.snapshot.yml | ||
| subagent-continuable-inheritance.cordis.yml | ||
| subagent-durability-failure.cordis.snapshot.yml | ||
| subagent-durability-failure.cordis.yml | ||
| subagent-report.cordis.snapshot.yml | ||
| subagent-report.cordis.yml | ||
| subagent-result-diagnostic.cordis.snapshot.yml | ||
| subagent-result-diagnostic.cordis.yml | ||
| web-fetch-fixture-server.mjs | ||
| web.cordis.snapshot.yml | ||
| web.cordis.yml | ||
acp-agent example
English | 中文
Automation-oriented Agent Client Protocol server over JSON-RPC stdio. It is intended for parent agents, subagent providers, and other programmatic clients, not as the product UI.
pnpm run demo:acp # needs DEEPSEEK_API_KEY (repo-root .env or env)
pnpm run demo:code-mode # same protocol with the Code Mode tool transport
The dsh launcher applies the shipped acp profile (dsh-base plus dsh-acp-app), then this leaf's cordis.yml patch. The profile supplies the ACP bridge, DeepSeek adapter, sandboxed shell and filesystem stacks, approval policy, compaction, subagents, workflows, a session-query index, and repeat guard; the leaf pins demo and snapshot values and adds hook bridges. The bridge creates one fresh agent per session/new, persists sessions to JSONL, and keeps stdout protocol-pure. Optional patch overlays add session-query tools, spill settings, Code Mode, or web fetching.
Protocol channel
Stdout carries only newline-delimited ACP JSON-RPC. @deepseek-ai/dsh-acp-app and this patch install no stdout logger; added plugins must use stderr for diagnostics.
The automation contract — supported methods, baseline prompt content, committed-text output, and the intentionally absent UI surfaces — lives in @deepseek-ai/dsh-acp.
Session workspaces and permissions
Each session/new supplies an absolute cwd. Sandboxed bash and filesystem mutations resolve workspace-write against that session cwd, so concurrent sessions can use separate project roots; platform temporary roots remain shared writable scratch space (sandbox contract). DSH_PERMISSION_MODE selects workspace-write or danger-full-access for the deployment.
Under workspace-write, a model retry requesting wider sandbox access triggers session/request_permission with allow_once and reject_once. The client decides programmatically; dismissal or an unavailable answer fails closed. The selected outcome applies only to that retry and is recorded through the normal tool-result/audit path. The server never exposes a permission picker or persists client policy.