Commit Graph
711 Commits
Author SHA1 Message Date
Tianyi Cui cf550f3feb Merge PR #138 into simplification RFC sweep
# Conflicts:
#	docs/rfc/README.md
2026-07-04 10:49:33 +08:00
Tianyi Cui 1546c6060a Merge branch 'worktree-hooks-h-retro' into worktree-hooks-i-snapshots 2026-07-04 03:31:31 +08:00
Tianyi Cui f63ca8f00f Merge branch 'worktree-hooks-g-stream-chunk' into worktree-hooks-h-retro 2026-07-04 03:26:19 +08:00
Tianyi Cui 81c27bed36 Merge branch 'worktree-hooks-f-bridges' into worktree-hooks-g-stream-chunk
# Conflicts:
#	docs/rfc/README.md
2026-07-04 03:21:00 +08:00
Tianyi Cui 38cd1a150c Merge branch 'worktree-hooks-e-protocol' into worktree-hooks-f-bridges
# Conflicts:
#	examples/acp-agent/cordis.snapshot.yml
#	examples/acp-agent/cordis.yml
2026-07-04 03:09:37 +08:00
Tianyi Cui 7d69d759f6 Merge branch 'worktree-hooks-d-subagent' into worktree-hooks-e-protocol
# Conflicts:
#	docs/module-graph.md
#	pnpm-lock.yaml
2026-07-04 03:01:22 +08:00
Tianyi Cui 92be2724bd Merge branch 'worktree-hooks-c-interception' into worktree-hooks-d-subagent 2026-07-04 02:48:41 +08:00
Tianyi Cui 9033837081 Merge branch 'worktree-hooks-b-bash-seam' into worktree-hooks-c-interception
# Conflicts:
#	docs/architecture.md
#	docs/cordis-catalog/events-and-services.md
#	docs/core-data-structures/tools.md
#	packages/core/tools/README.md
#	packages/core/tools/src/index.ts
2026-07-04 02:44:26 +08:00
Tianyi Cui 955e8d2913 docs: propose simplification RFCs 2026-07-04 02:39:50 +08:00
Tianyi Cui 89f3c484c1 Merge branch 'worktree-hooks-a-taxonomy' into worktree-hooks-b-bash-seam
# Conflicts:
#	docs/rfc/README.md
2026-07-04 02:26:19 +08:00
Tianyi Cui c5ed5ff490 Merge remote-tracking branch 'origin/master' into worktree-hooks-a-taxonomy
# Conflicts:
#	docs/rfc/README.md
2026-07-04 02:15:52 +08:00
Tianyi Cui b735c766c6 Merge pull request #134 from deepseek-harness/codex/fs-directory-listing
feat(fs): add directory listing seam
2026-07-04 01:31:10 +08:00
Tianyi Cui ecd5ca6ce6 Merge branch 'master' into codex/fs-directory-listing 2026-07-04 01:27:42 +08:00
Tianyi Cui 43ab04d944 Merge pull request #137 from deepseek-harness/docs/update-readme-for-sdk
docs: refresh SDK README and demo naming
2026-07-04 01:27:02 +08:00
Tianyi Cui 571f5b383a Merge branch 'master' into docs/update-readme-for-sdk 2026-07-04 01:20:27 +08:00
Tianyi Cui db885271ed docs: polish Chinese README summary 2026-07-04 01:18:32 +08:00
Tianyi Cui 51640362b5 docs: rename coding demo to repl 2026-07-04 01:07:26 +08:00
Tianyi Cui 4cf2ade4ba docs: clarify top-level demos 2026-07-04 00:57:49 +08:00
Tianyi Cui ca91d7c2da scripts: ignore local artifacts in constraints 2026-07-04 00:57:35 +08:00
Tianyi Cui bf1966326e Merge remote-tracking branch 'origin/master' into codex/fs-directory-listing
# Conflicts:
#	docs/rfc/README.md
#	packages/fs/fs-local/src/index.ts
2026-07-04 00:56:17 +08:00
Tianyi Cui bae8bf4990 scripts: lint only package directories 2026-07-04 00:54:31 +08:00
Tianyi Cui 26f8d1b9b6 Merge pull request #136 from deepseek-harness/tool-presentation-submodule
refactor(tools): move render-intent vocabulary to presentation.ts
2026-07-04 00:52:34 +08:00
Tianyi Cui 39cdb3ea28 docs: add translation review guidance 2026-07-04 00:51:25 +08:00
Tianyi Cui ed022780a2 docs: rebrand README for DeepSeek Harness SDK
Replace outdated references to 'DeepSeek Code' with the correct
product name 'DeepSeek Harness SDK'. Update demo commands to
reflect the SDK nature (demo:agent, demo:acp) rather than the
old coding-agent product.
2026-07-04 00:42:59 +08:00
Tianyi Cui 74f61c89e3 test(hooks): snapshot the CC + Codex hook matrix end-to-end
Load both hook bridges in the ACP example (dsh-hooks-claude → ./hooks.json,
dsh-hooks-codex → ./codex-hooks.json) so the full-transcript snapshot tier can
exercise each dialect against the real app. An absent config file is a silent
no-op, so a scenario carries only the file it needs and the other bridge
vanishes — verified byte-identical against every pre-existing snapshot.

Add a scenario per hook point × its headline Decision outcome, both dialects:
UserPromptSubmit block (authored, keyless) + context-fold, PreToolUse deny/ask,
PostToolUse block/context, Stop force-continue. The mid-turn scenarios are
recorded against the real API with the hook active, so the model's reaction to
a denied/blocked/force-continued turn is part of the replayed transcript.

SessionStart and SubagentStart are deliberately excluded (detached best-effort
inject races the log position — a recorded golden fails 10/10 on its own
replay), as is SubagentStop (observe-only, zero transcript footprint — a golden
could never be proven to fail). Both stay on the bridges' unit coverage. See
docs/rfc/implemented/testing/2026-07-04-hook-snapshot-matrix.md.
2026-07-04 00:40:35 +08:00
Tianyi Cui fb78a844af docs(tools): fix cross-module JSDoc links and the catalog source list
Codex review of the vocabulary relocation found two doc-accuracy issues:

- presentation.ts's JSDoc used {@link ToolDefinition...}, which the
  TypeScript language service cannot resolve because presentation.ts
  deliberately does not import index.ts (that would create the cycle the
  split avoids). Demote those three to plain `ToolDefinition` code text;
  same-file and imported @links (TerminalResultView, ContentBlock) stay.
- docs/core-data-structures/tools.md's source header listed only index.ts
  and schema.ts; add presentation.ts, which now owns the presentation
  vocabulary the page documents.
2026-07-04 00:39:09 +08:00
Tianyi Cui 539051b2c9 refactor(tools): move render-intent vocabulary to presentation.ts
The tool render-intent vocabulary (ToolCallView/ToolResultView + members,
FileLocation, FileDiff, ToolCallKind) is the UI-facing surface of
dsh-tools; it lived inline in index.ts alongside the registry and
execution core. Move it to its own presentation.ts module so index.ts is
the registry + execute waterfall and the presentation vocabulary is a
separate, one-directional dependency.

presentation.ts owns ONLY render-intent types and references none of the
execution types; index.ts imports the view types for ToolDefinition's
presentCall/presentResult signatures (clean acyclic index -> presentation).
The opaque `meta` presentation channel (ToolExecuteReturn, ToolResult,
ToolExecutionResult) is execution plumbing and stays in index.ts.

Public surface unchanged: index.ts re-exports the vocabulary, so consumers
(tool-fs/tool-bash/tool-web/tool-todo, the ACP bridge) keep importing from
@deepseek-ai/dsh-tools with zero churn. No producer/bridge/test edits; a
pure internal relocation with no observable-output change (snapshot goldens
untouched).
2026-07-04 00:20:06 +08:00
Tianyi Cui 4e70489c73 docs(AGENTS): collapse the section to its theme; drop the two Defensive-patterns additions
The bulleted lessons and the two Defensive-patterns traps did not earn their
place. Reduce the new section to its one load-bearing sentence — gates prove
lines ran, not semantics/doc-accuracy/that a test guards anything; layer
judgment on top and lean on an independent reviewer for what gates can't see —
and drop the spawn-narrowing and AgentLoop.create-meta bullets entirely.
2026-07-04 00:04:48 +08:00
Tianyi Cui 9e71c886e3 Merge pull request #133 from deepseek-harness/docs/i18n-translate-skill
docs: bilingual docs contract, translation skill, and pairing gate
2026-07-03 23:54:32 +08:00
Tianyi Cui 19db3aa28a Merge branch 'master' into docs/i18n-translate-skill 2026-07-03 23:50:53 +08:00
Tianyi Cui c699e948e6 docs(AGENTS): fix review findings — correct resume async, cut stack-locked lessons
Address ds-review-bot review on #131:

- Blocking: "Both are synchronous" was wrong for `resume`
  (`ctx.agents.resume`/`AgentLoop.resume` return `Promise<AgentHandle>` and
  await the persisted load). State the true split: `create` is synchronous,
  `resume` is async.
- De-anchor the section: drop the "#118–#129" opening and every hooks-stack
  reference (agent/stream-chunk, PR-G, #118, ENOSPC-from-worktrees) so the
  lessons stand alone for a reader who wasn't there, matching the generalized
  style of the "Orchestrating review feedback" section above it.
- Cut bullets that duplicated existing AGENTS.md content: the standalone
  "prove regression tests RED" bullet (already stated in the Orchestrating
  section and Defensive patterns) and the ENOSPC "environmental ≠ code" bullet
  (no repo-specific rule survives generalizing).
- Generalize the survivors to their transferable rule; trim the
  regenerate-artifact bullet to the one gate-backed example.
- Collapse the double blank line before ## Architecture.
2026-07-03 23:48:32 +08:00
Tianyi Cui 5702f6244c Merge pull request #135 from deepseek-harness/fs-acp-applied-hunk-diffs
feat(tool-fs): result-time applied-hunk diffs for write/edit
2026-07-03 23:19:37 +08:00
Tianyi Cui 497ea15bdf fix(acp): relativize the completed diff card title
The result-time diff card sent view.title raw, so a completed edit/write
of an absolute in-workspace path flipped the card header back from the
relativized `Edit src/b.ts` to the absolute path — the pending card
relativizes, the result did not, and tool_call_update.title replaces the
header. Apply displayTitle to the result diff arm using the diff path,
mirroring the call-side card. Regression test proven red on the unfixed
arm.

Also record the overwrite diff-basis pre-read as a bounded follow-up
(TODO(overwrite-diff-bound) + RFC non-goal): overwriting a large file
reads the whole prior text into memory for a UI-only diff.
2026-07-03 23:14:22 +08:00
Tianyi Cui 9c6e09c0d8 Merge remote-tracking branch 'origin/master' into fs-acp-applied-hunk-diffs 2026-07-03 22:57:09 +08:00
Tianyi Cui 97de62a0ab Merge pull request #132 from deepseek-harness/fs-acp-render-intent-union
refactor(tools): tagged render-intent union for tool-call presentation
2026-07-03 22:56:48 +08:00
Tianyi Cui 8ca82d03ab refactor(tool-web): port web tools to the render-intent union
master's web_search/web_fetch tools were authored against the old
ToolCallPresentation bag; the render-intent union replaces it with a
card-tagged discriminated union. Both are simple generic cards, so they
declare card:'generic' explicitly.
2026-07-03 22:52:18 +08:00
Ziya ec05295a0c docs: equal-authority pairing with sidecar consistency records
Redesign per review: neither language is canonical. A pair is three
sibling files — foo.md, foo.zh.md, foo.i18n.yaml — and either language
may be authored first (a Chinese-first RFC is as legitimate as an
English-first one). The sidecar record holds the FULL git blob hash of
both sides as of the last confirmed-consistent state, replacing the
in-file one-directional fingerprint; editing either side without
re-confirming the pair goes red. New --write mode re-records a pair
after both sides are brought in line, making the confirmation a
reviewable yaml diff. Pairs merge whole (completeness enforced).

- gate rewritten around pair anchors (union of .zh.md and .i18n.yaml
  remnants) so half-deleted pairs are caught from either side; red/green
  proven for en-only edit, zh-only edit, missing record, and a record
  for an excluded file
- verify-rfc-classification now skips .zh.md counterparts (same RFC,
  indexed via its English filename; the pairing gate owns consistency)
- docs/i18n/README.md + translation-rules.md reframed bidirectionally
  (terminology table binds both directions; typography section governs
  the Chinese side); zh counterparts updated; skill workflow updated
- RFC amended to the shipped design, records the English-canonical
  in-file-fingerprint model as considered-and-revised; RFC translated
  (docs/rfc/.../2026-07-02-bilingual-docs-and-pairing-gate.zh.md) and
  added to the required frontier
- generated docs stay excluded with the follow-up recorded: teach the
  generators to emit Chinese, then de-list
2026-07-03 07:41:24 -07:00
Tianyi Cui 53ebf6fc54 Merge remote-tracking branch 'origin/master' into fs-acp-render-intent-union 2026-07-03 22:41:10 +08:00
Tianyi Cui 97b5b5509e Merge pull request #128 from deepseek-harness/fs-acp-policy-reject-snapshot
test(acp): snapshot the fs-policy rejection card
2026-07-03 22:40:48 +08:00
Tianyi Cui f28cb6b179 Merge remote-tracking branch 'origin/master' into fs-acp-policy-reject-snapshot 2026-07-03 22:28:01 +08:00
Tianyi Cui 5dfe09959d fix(fs): keep listDir child keys under stable parent 2026-07-03 22:02:16 +08:00
Tianyi Cui e09852f5a6 docs: correct three more result-diff comments to the whole-file case
Three comments still implied the result diff is always an applied hunk or
that write returns undefined on no-hunk: the toolResultUpdate JSDoc (a diff
result "emits the applied-hunk blocks, which replace the call-time snippet"),
the empty-diffs test comment ("an empty write returns undefined" — write now
falls back to a whole-file diff), and diffsFromMeta's JSDoc ("a bad meta
yields no diff card" — only true for edit; write falls back to a whole-file
diff). Each now states the write whole-file fallback. Regenerate the catalog.
2026-07-03 22:01:54 +08:00
Tianyi Cui e07886599c docs: finish the whole-file-diff sweep across comments and RFCs
Codex's stale-prose pass found seven more spots still describing the
result diff as ALWAYS an applied contextual hunk, or a create/binary
overwrite as rendering "only the call-time card": the DiffCallView JSDoc
and the acp bridge diff-arm comment, the FsWriteOutcome.before and
readTextForDiff JSDoc, and three RFC lines. All now say: the result diff
is the applied change — a contextual hunk when there is a before-image,
else a whole-file diff (create / undiffable binary) — and a successful
mutation always returns the result diff so the model-facing text can't
clobber it. Regenerate the cordis catalog (source line shift).
2026-07-03 21:50:52 +08:00
Tianyi Cui d753660d66 docs(fs-local): a null before-image still renders a whole-file diff card
The writeText comment still said a null `before` (a create or an
undiffable binary file) means "a consumer renders no result-time diff,
only the call-time whole-file card." That is stale since write's
presentResult renders a whole-file diff for a null before-image. Correct
it: a null `before` gives no contextual-hunk basis, so the consumer falls
back to a whole-file diff — the tool still renders a result diff card, not
the raw result text.
2026-07-03 21:38:42 +08:00
Tianyi Cui 86457689fc docs(acp): note the whole-file-diff create case in the presentResult list
The acp README's presentResult card list still described the `diff` result
as always "the APPLIED hunks computed from before/after". Qualify it like
the other surfaces: typically the applied hunks, or a whole-file diff for a
create, and a successful mutation always returns it so the result text
can't clobber the diff.
2026-07-03 21:30:11 +08:00
Tianyi Cui da1d7f281d docs(tools): DiffResultView.diffs may be a whole-file diff, not only hunks
The write-diff-card fix made write's presentResult return an args-derived
whole-file diff (oldText:null) for a create / unchanged overwrite, but the
DiffResultView contract and its mirrored docs still said `diffs` is ALWAYS
the applied contextual hunks computed from before/after. Correct the type
JSDoc, the write execute-side comment, and the four mirrored surfaces
(tools.md, tools README, acp-feature-support, adding-a-tool cookbook) to
say: typically the applied hunks, or a whole-file diff when there is no
before-image (a create) — and that a mutation returns the diff result even
when it duplicates the call-time card, since a tool_call_update.content
replace would otherwise clobber the diff with the model-facing text.
Regenerate the cordis catalog (source line shift).
2026-07-03 21:26:50 +08:00
Tianyi Cui 53b215c646 fix(tool-fs): write always renders a diff card on the completed update
A Write CREATE rendered its completed tool_call_update as the model-facing
result TEXT (`<path>…</path>…Created file`), which — because an ACP
tool_call_update.content REPLACES the call's content — clobbered the
new-file diff the pending call installed. So Zed showed the diff, then
replaced it with raw XML-ish text; only overwrite/edit looked right
(their result re-sends a diff).

write's presentResult now ALWAYS returns a diff card for a successful
write: the applied contextual hunk from `meta` when there is one
(overwrite), else an args-derived whole-file diff (`oldText: null`) for a
create or an unchanged-content overwrite. This matches claude-agent-acp,
where the create diff rides on the update and no result text replaces it.
An error still falls through to generic rendering so its message shows.
edit is unchanged (it always has a hunk; no whole-file fallback).

Re-recorded fs-write / fs-write-overwrite goldens; the create's completed
update is now a {type:'diff'} block, not the XML result text.
2026-07-03 20:52:36 +08:00
Tianyi Cui f0ae253670 Merge branch 'master' into codex/fs-directory-listing 2026-07-03 20:49:10 +08:00
Tianyi Cui d24f3ffef0 Merge pull request #114 from deepseek-harness/web-capability-seam
Add web capability seam: ctx.web, search/fetch providers, web tools
2026-07-03 20:46:55 +08:00
Tianyi Cui 57923c68ee Merge branch 'fs-acp-render-intent-union' into fs-acp-applied-hunk-diffs 2026-07-03 19:21:24 +08:00