deepseek-harness/docs/rfc/implemented
Tianyi Cui 1a57d67058 refactor(tools): tagged render-intent union for tool-call presentation
Replace the "bag of optional fields" tool-presentation types
(ToolCallPresentation / ToolResultPresentation / ToolTerminal) with a
card-tagged discriminated union — the standing FIXME(tool-presentation).
A tool declares one render intent per call/result and the ACP bridge
switches on `card`:

  ToolCallView   = generic | terminal | diff
  ToolResultView = generic | terminal

The `diff` card is new: fs write/edit now emit an ACP {type:'diff'}
content block (an editor's inline diff), which the old shapes could not
express. The bridge also relativizes a file card's title against the
session cwd (mirroring claude-agent-acp's toDisplayPath) while keeping
locations/diff paths raw, and derives the no-capability fenced console
fallback from a terminal result's output. read gains the window-in-title
(`Read foo.txt (5 - 8)`) and an always-set location line, matching the
reference adapter field-for-field.

Migrates all three producer families (tool-fs, tool-bash, tool-todo) and
the sole consumer (the ACP bridge) together — the source does not compile
piecewise. Adds snapshot coverage for the terminal _meta path (a new
capability-advertising scenario) and re-records the fs goldens to show the
diff cards. Applied-hunk (result-time, context-line) diffs need a new
result/event shape and are a follow-up.

RFC: docs/rfc/implemented/architecture/2026-07-02-tool-render-intent-union.md
2026-07-03 02:04:03 +08:00
..
architecture refactor(tools): tagged render-intent union for tool-call presentation 2026-07-03 02:04:03 +08:00
feature fix(fs): address review — rename to dsh-fs-policy, fs/*-intent events, RFC currency, ENOTDIR 2026-07-02 03:12:38 +08:00
process refactor(tools): tagged render-intent union for tool-call presentation 2026-07-03 02:04:03 +08:00
simplification fix(fs): address review — rename to dsh-fs-policy, fs/*-intent events, RFC currency, ENOTDIR 2026-07-02 03:12:38 +08:00
testing fix review findings: skip collided SCHEMA_VERSION 3; reject marker-less surface events 2026-06-24 17:45:48 +08:00
AGENTS.md fix(fs): address review — rename to dsh-fs-policy, fs/*-intent events, RFC currency, ENOTDIR 2026-07-02 03:12:38 +08:00
CLAUDE.md docs(rfc): keep implemented RFCs current; rewrite the llm-replay section in place 2026-06-19 17:06:20 +08:00