dsh-acp-enhanced
Enhanced ACP server for DeepSeek Harness: block & reasoning streaming, usage telemetry, model/effort switching, permission presets, session resume/archive, per-session MCP servers, and Zed file/terminal forwarding.
Install
dsh plugin --profile web add dsh-acp-enhanced
Sandbox test results
| Stage | Result |
|---|---|
| 1 install | ✓ |
| 2 list | ✓ |
| 3 mount | ✓ |
| 4 boot | — |
Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).
README
[中文](README-zh.md) | English · [Changelog](CHANGELOG.md)
dsh-acp-enhanced
An enhanced Agent Client Protocol (ACP) server for
DeepSeek Harness (dsh), built for ACP
editors like Zed. It is a drop-in replacement for the official @deepseek-ai/dsh-acp
bridge: the official bridge only streams plain text, this one exposes the Web GUI's
capabilities — streaming, telemetry, model/permission control, session management, MCP —
over the ACP wire.
Features
Output & telemetry
- Token-level streaming, on by default: the reply and the model's thinking reach the
editor while it is still writing (agent_message_chunk / agent_thought_chunk,
coalesced on a 75 ms timer). The one cost of sending text before its block commits is
that a mid-block retry cannot take its abandoned partial back: a visible
_[stream interrupted — retrying]_ marker separates it from the retried attempt. Set
streamDeltas: false on the acp-enhanced row (DSH_ACP_STREAM_DELTAS=false) for the
older block-granularity behaviour, where cancelled/retried attempts never leak torn
output at all but nothing renders until the block commits
- Full telemetry: context usage ring plus cache hit rate / TPS / input-output-reasoning
tokens / tool timing / turn counts (usage_update._meta carries the full breakdown). The
ring's denominator is the routed model's declared contextWindow, folded from the session
log so a resumed thread keeps it (the harness logs request/context once and does not
re-emit it for an unchanged route). dsh's own dsh-compaction-basic row auto-compacts at
~80% of that window and is mounted by the standard/ptc/cordis presets (never
minimal); /compact forces it manually. A route whose adapter declares no contextWindow has no denominator,
so the ring reports used === size.
- Image support (multimodal): when the dsh composition mounts an attachment store
(dsh-attachment-local, mounted by default in dsh-base), promptCapabilities.image
is advertised and pasted/uploaded images are ingested into the harness's durable attachment
store — a vision-capable model (e.g. deepseek-v4-flash-vision-exp) reads them natively,
in wire order with surrounding text. Older stacks (no attachment store) automatically
downgrade: image is not advertised and an image prompt is refused with a clear error.
Model & permissions
- Model switching: live
provider/modelcatalog dropdown (ACP grouped-select wire shape) - Reasoning effort:
reasoning_effortdropdown — only when the routed model exposes
selectable efforts; each model remembers the effort it last used (persisted per profile),
so switching back restores it, and a first-time model falls back to its own default — or
its first offered effort — instead of an empty "unknown" selection
- Permission presets: read-only / workspace-write / full-access session modes
- Approval: native allow-once / reject-once prompts per tool call
- Agent presets: per-session model-facing composition (tools + prompt sections)
from the dsh agent-preset roster. standard is the full coding agent (default),
minimal (极简模式) is a bare persistent shell with no subagent/web/todo/plan
tools — nothing from the host layer leaks into a minimal agent; ptc and cordis
ship alongside. Your own presets are declared in the profile (see
[Your own presets](#your-own-presets)) — dsh 0.1.7 no longer discovers
~/.dsh/.agent-presets.
Choose via the agent_preset config option, the /preset command, or the
DSH_ACP_PRESET env var (per-session default); switching is only allowed while the
session is still blank (no turn has run), so history never straddles two tool sets.
A configured preset this roster no longer has does not close the panel: a blank
session composes under the roster default and says so on stderr.
Zed deep integration
- Tool cards: one-line summary in the collapsed header —
Read <path>, the
model's own intent line for shell commands (description, Codex-style — the
exact command stays one click away), Search: <pattern>, Fetch: <url>, etc.
The card body follows the ACP best practice: file edits render as a real
diff, bash/pwsh commands as a real terminal card (codex-acp wire
shape: command line + output + exit pill inside a terminal panel — no more
raw-JSON cards), other executors as a syntax-highlighted code block, and
touched files as clickable locations that open the file — with rawInput
/ rawOutput kept one click away for transparency, plus per-kind icons and a
proper in-progress → completed/failed status lifecycle
- Zed files & terminal:
zed_read_text_file/zed_write_text_file/zed_terminal
put file edits into Zed's "edited files" area (diff + accept/reject) and commands into a
real Zed terminal
- Native form questions:
ask_user_question→elicitation/createform, click an
option — or type a custom answer when none of them fit: options render with their
descriptions, each option-backed question gets a free-text "Custom answer" field, and a
custom answer replaces the single selection / accompanies a multi-select (same semantics
as dsh's native question card)
- Plan panel: plan mode toggle → "planning" status bar in Zed
Sessions
- Resume & archive:
session/loadrestores past threads (full replay);session/list
lists the thread archive (titled, sorted by last activity); session/close drops the
in-memory record so a later session/load resumes from the persisted log; live title
updates. session/delete is deliberately not advertised — the harness declares no
public persistence delete (see [Compatibility](#compatibility))
- Multi-root workspaces:
sessionCapabilities.additionalDirectoriesis advertised,
so Zed no longer shows "this agent doesn't currently su
…(truncated)
Rendered from the README published on npm. Formatted only, not edited.
Versions
Published on npm::21,最后更新 2026-11-04