deepseek-harness/docs/rfc/implemented/process
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
..
2026-06-11-doc-sync-enforcement.md Merge remote-tracking branch 'origin/master' into feat/adr0016-type-build-check 2026-06-22 00:35:51 +08:00
2026-06-11-quality-gates.md Use explicit ts specifiers for declarations 2026-06-22 06:11:00 +08:00
2026-06-11-tsdown-over-dumble.md Merge remote-tracking branch 'origin/master' into feat/adr0016-type-build-check 2026-06-22 00:35:51 +08:00
2026-06-11-vendor-cordis-as-source.md docs(rfc): classify RFCs by kind via path-encoded subdirectories 2026-06-20 22:29:45 +08:00
2026-06-16-pnpm-over-yarn.md docs(rfc): classify RFCs by kind via path-encoded subdirectories 2026-06-20 22:29:45 +08:00
2026-06-17-ts-build-config.md docs: update rewriteRelativeImportExtensions to current rfc 2026-06-22 09:03:28 +08:00
2026-06-18-markdown-cross-link-lint.md docs(rfc): classify RFCs by kind via path-encoded subdirectories 2026-06-20 22:29:45 +08:00
2026-06-20-core-data-structures-catalog.md refactor(tools): tagged render-intent union for tool-call presentation 2026-07-03 02:04:03 +08:00
2026-06-20-generated-cordis-catalog.md fix(compact): address PR 110 review findings 2026-06-29 16:02:27 +08:00
2026-06-20-rfc-classification.md docs(rfc): classify RFCs by kind via path-encoded subdirectories 2026-06-20 22:29:45 +08:00
2026-07-02-tool-schema-catalog.md fix(docs): address Codex review — document the subagent_fork alias, harden dispose 2026-07-02 03:16:17 +08:00