Tianyi Cui 0d6bfd8856 refactor(process): split the process manager out of the bash executor 1 month ago
..
tests b78daaad8c fix(session-query): keep model tools opt-in 1 month ago
README.md b78daaad8c fix(session-query): keep model tools opt-in 1 month ago
advanced.cordis.snapshot.yml d139948ed2 feat(persistence): compress JSONL logs with Zstandard 1 month ago
advanced.cordis.yml 0e06d0691d feat(examples): default agent configs to DeepSeek Pro Max Thinking 1 month ago
both-mode.cordis.snapshot.yml d139948ed2 feat(persistence): compress JSONL logs with Zstandard 1 month ago
both-mode.cordis.yml 0e06d0691d feat(examples): default agent configs to DeepSeek Pro Max Thinking 1 month ago
code-mode-workspace-context.cordis.snapshot.yml 82ce9dfe0e Merge branch 'master' into codex/jsonl-zstd-persistence 1 month ago
code-mode-workspace-context.cordis.yml 0e06d0691d feat(examples): default agent configs to DeepSeek Pro Max Thinking 1 month ago
code-mode.cordis.snapshot.yml d139948ed2 feat(persistence): compress JSONL logs with Zstandard 1 month ago
code-mode.cordis.yml 0e06d0691d feat(examples): default agent configs to DeepSeek Pro Max Thinking 1 month ago
composition.md 0d6bfd8856 refactor(process): split the process manager out of the bash executor 1 month ago
cordis.snapshot.yml 7eec0d81ec test(snapshot): reconcile replay overlays with the merged configs and fixtures 1 month ago
cordis.yml 0d6bfd8856 refactor(process): split the process manager out of the bash executor 1 month ago
depth-two.cordis.snapshot.yml 7eec0d81ec test(snapshot): reconcile replay overlays with the merged configs and fixtures 1 month ago
depth-two.cordis.yml 46d60d6d90 fix(tool-subagent): enforce depth only at runtime 1 month ago
fs.cordis.snapshot.yml 7eec0d81ec test(snapshot): reconcile replay overlays with the merged configs and fixtures 1 month ago
fs.cordis.yml 2e7cdddb89 Merge remote-tracking branch 'origin/master' into cross-family-fs-sandbox 1 month ago
package.json e819a586b0 refactor(acp): reduce bridge to automation protocol 1 month ago
packed-chunks.cordis.snapshot.yml f4ad731079 test(snapshot): add the packed-chunks opt-in replay scenario 1 month ago
packed-chunks.cordis.yml f4ad731079 test(snapshot): add the packed-chunks opt-in replay scenario 1 month ago
pty-snapshot-backend.mjs 58cde5103a feat: add persistent PTY sessions 1 month ago
pty.cordis.snapshot.yml 57a47b1fb3 fix(pty): close review lifecycle gaps 1 month ago
pty.cordis.yml 58cde5103a feat: add persistent PTY sessions 1 month ago
retry.cordis.snapshot.yml 207aab9d8d fix(llm): classify empty model completions as retryable EMPTY_RESPONSE 1 month ago
retry.cordis.yml 207aab9d8d fix(llm): classify empty model completions as retryable EMPTY_RESPONSE 1 month ago
session-query.cordis.snapshot.yml b78daaad8c fix(session-query): keep model tools opt-in 1 month ago
session-query.cordis.yml b78daaad8c fix(session-query): keep model tools opt-in 1 month ago
session-sandbox-root.cordis.snapshot.yml 7e5d5795a5 test(sandbox): adapt scenarios to latest master 1 month ago
session-sandbox-root.cordis.yml 7677d49c93 test(snapshot): cover session-scoped sandbox roots 1 month ago
workspace-context.cordis.snapshot.yml 82ce9dfe0e Merge branch 'master' into codex/jsonl-zstd-persistence 1 month ago
workspace-context.cordis.yml 0e06d0691d feat(examples): default agent configs to DeepSeek Pro Max Thinking 1 month ago

README.md

acp-agent example

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 acp   # same protocol with the Code Mode tool transport

The leaf loads the ACP app, DeepSeek adapter, sandboxed bash and filesystem stacks, one-shot approval policy, compaction, subagents, workflows, hooks, a derived session-query index, and repeat guard. The app creates one fresh agent per session/new, persists sessions to JSONL, and keeps stdout protocol-pure. session-query.cordis.yml explicitly opts into the workspace-authorized query tools and generic timeout/spill policies for their dedicated snapshot; fs.cordis.yml adds spill storage for filesystem scenarios, while code-mode.cordis.yml adds run_code and its generated TypeScript SDK.

Protocol channel

Stdout carries only newline-delimited ACP JSON-RPC. @deepseek-ai/dsh-acp-demo installs no stdout logger; leaf additions 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 deployment and tests.

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.

Snapshot tests

This example owns the ACP snapshot suite. It boots the real automation server, replays committed model streams through dsh-llm-replay, and compares both normalized protocol output and re-persisted session logs. Recording uses the real model; refresh reuses committed replay input. Overrides cover throw/hang behavior, and optional workspace/ fixtures seed world-state checks.

Most scenarios pin backend behavior rather than ACP-specific behavior; the automation-only ACP decision owns why that coverage remains transport-coupled.