Commit Graph
5560 Commits
Author SHA1 Message Date
Tianyi Cui c3873464ba refactor(scripts): consolidate gate scripts on mdast fences, parseArgs, and globSync
Implements the gate-consolidation Agent Note from the NIH dependency audit:

- Shared markdownFences helper in scripts/markdown.ts (mdast code-node visit);
  doc-typecheck and verify-type-equiv extract fences through it; md-fences.ts
  and the duplicated extractEquivBlocks regex scanner are deleted;
  markdownProseLines derives fenced lines from parsed code-node positions
  instead of a second fence regex.
- publint-all.ts and verify-built-package-invariants.mjs parse argv with
  node:util parseArgs instead of hand-stepped parseOptions copies.
- Five straggler readdirSync walks become globSync: verify-runtime-closure,
  dev-web discoverPluginDirs, verify-package-paths realPackageNames,
  verify-client-domain-graph listSources, publint-all addPath. The
  dirent-diagnostic walks in check-workspace-constraints.ts and clean.ts stay.

Behavior parity verified: pnpm run doc-sync and every rewritten gate produce
byte-identical output before and after on this tree.

Moves the owning Agent Note proposed -> implemented and re-records its pair.
2026-07-26 23:14:28 +08:00
Tianyi Cui 32ae16fa59 Merge origin/master into worktree/archive-agent-notes-20260726 2026-07-26 23:11:33 +08:00
Tianyi Cui a8a1ada183 docs: move execa Agent Note to implemented; update inbound links and README contracts
- proposed/testing -> implemented/testing with the lifecycle rewrite
  (Proposal->Decision in present tense, Acceptance criteria + Risks
  folded into Consequences); zh counterpart mirrored and both pairs
  re-recorded.
- the rejected NIH-audit roll-up pair now links the implemented/ path.
- loader-smoke README: captured output is bounded by execa's default
  100 MB maxBuffer, no longer unbounded.
- acp-snapshot README: harness.ts now also imports vitest (vi.waitFor),
  so the vitest-run-only constraint names both modules.
- jsonrpc keyless smoke: raise the invalid-env case's subprocess
  deadline to 25s (the 9s pick starved a cold tsx boot on slow NFS).
2026-07-26 23:10:38 +08:00
Tianyi Cui 4dfbd2cbd7 Merge pull request #657 from deepseek-harness/worktree-tasks-service-seam
refactor(tasks): split the task registry into seam and local implementation
2026-07-26 23:09:25 +08:00
Tianyi Cui 0dca9684d5 docs(graphs): retain archived rationale link 2026-07-26 23:08:47 +08:00
Tianyi Cui 98980900d0 Merge origin/master into worktree/archive-agent-notes-20260726
# Conflicts:
#	.agents/notes/implemented/testing/2026-07-24-web-gui-browser-e2e-lane.i18n.yaml
#	.agents/notes/implemented/testing/2026-07-24-web-gui-browser-e2e-lane.md
#	.agents/notes/implemented/testing/2026-07-24-web-gui-browser-e2e-lane.zh.md
2026-07-26 23:07:21 +08:00
Tianyi Cui 37140bf823 docs(notes): archive low-value decision records 2026-07-26 23:06:00 +08:00
Tianyi Cui 8e739eee26 Merge branch 'code-mode-ui/shiki' into code-mode-ui/trajectory-spans 2026-07-26 23:03:17 +08:00
Tianyi Cui ad27fd76b5 Merge branch 'code-mode-ui/dispatch-spill' into code-mode-ui/shiki 2026-07-26 23:03:07 +08:00
Tianyi Cui f8be35943c test(snapshots): refresh cordis-inspect-jsdoc — shapeDispatchLog left the public surface 2026-07-26 23:02:35 +08:00
Tianyi Cui d167af3fb7 Merge branch 'master' into worktree-tasks-service-seam 2026-07-26 22:57:38 +08:00
Tianyi Cui 0bcf4886ff Merge branch 'code-mode-ui/shiki' into code-mode-ui/trajectory-spans 2026-07-26 22:54:50 +08:00
Tianyi Cui 46139d9816 Merge branch 'code-mode-ui/dispatch-spill' into code-mode-ui/shiki 2026-07-26 22:54:19 +08:00
Tianyi Cui 0b797a776f docs: note the private capability-closure shape for the dispatch-log invoker 2026-07-26 22:53:47 +08:00
Tianyi Cui 443e2bc509 refactor(tools): shapeDispatchLog off the public registry surface
Responding to review on #661: a public method on the generic ToolRegistry
service whose only caller is the run_code bridge was ad-hoc surface
widening. The bridge now receives it as a registry-private capability
closure in RunCodeBridgeOptions (the requireRuntime idiom, alongside the
cap), the method is private, and it leaves the generated service
catalog/API surfaces.

The pattern is now named as a code smell where reviewers look: the
packages/AGENTS.md capability-interface rule gains the inverse-smell
clause (ceiling 660→675 — the list is at capacity and the clause needs
one sentence), and dsh-code-review's capability-fit check tells reviewers
to flag single-consumer public service methods and require the closure
form.
2026-07-26 22:52:15 +08:00
Tianyi Cui c8b565b12b Merge pull request #654 from deepseek-harness/web-e2e-interactions 2026-07-26 22:50:17 +08:00
Tianyi Cui c50b899015 refactor(llm-deepseek): replace hand-rolled SSE parser with eventsource-parser
Implements the approved simplification Agent Note: sse.ts now pipes the
response body through TextDecoderStream and EventSourceParserStream
(eventsource-parser/stream) and keeps only the DeepSeek protocol shim —
yield each event's data, terminate on [DONE], throw
LlmError('STREAM_CLOSED') on EOF without the sentinel. The SSE
spec-conformance tests are deleted; sse.spec.ts pins only the
[DONE]/STREAM_CLOSED/EOF contract, including the new spec-strict verdict
that an unterminated trailing event is truncation (the old parser
flushed it — a robustness nicety no real provider shape needs).

eventsource-parser@^3.1.0 becomes llm-deepseek's second runtime
dependency (already in the lockfile transitively via the MCP SDK).

Docs: the Agent Note moves proposed/ → implemented/ and is rewritten per
the lifecycle contract; the rejected NIH roll-up note's inbound links
follow. The twin-adapters note, dsh-llm LlmAdapter JSDoc (and its
type-equiv fences), cookbook, group/package READMEs, root AGENTS.md
layout line, sdk-helper comments, and the regenerated config catalog
drop the "hand-rolled fetch + SSE" claim in both languages; all eight
touched pairs re-recorded.
2026-07-26 22:45:33 +08:00
Tianyi Cui f54242474e Merge remote-tracking branch 'origin/master' into worktree/pr654-merge-20260726 2026-07-26 22:39:01 +08:00
Tianyi Cui e2882f486b fix(review): harden web replay verification
Validate replay sidecars and cross-copy failure facts, make browser console tripwires and macOS temp paths deterministic, and wait for asynchronous TUI resume details. Keep the owning docs, translations, and generated catalog aligned.
2026-07-26 22:38:33 +08:00
Tianyi Cui c4647a8609 test: adopt execa for hand-rolled subprocess plumbing, parseArgs for llm-mock-server CLI, vi.waitFor for poll loops
Implements the execa Agent Note's four sub-changes:
- execa (root devDep + loader-smoke dep) replaces the hand-rolled
  spawn-collect-timeout choreography in loader-smoke, apps/cli and
  cli-demo/acp-demo built-bin e2e, lsp-local and code-runtime-worker
  built-lib e2e, the tui pty-harness outer collector, the jsonrpc
  keyless smoke, and crash-recovery's child spawn. Genuinely custom
  parts stay custom: cli-demo's interrupt-on-marker, jsonrpc's
  line-predicate protocol driving, crash-recovery's SIGKILL-at-failpoint.
  The two loader-smoke /* v8 ignore */ OS-error branches are gone.
- llm-mock-server CLI tokenizes via node:util parseArgs; numeric
  coercion/bounds/cross-option constraints stay manual; pinned
  error-message tests updated to the parseArgs texts.
- both loadRootEnv copies in apps/web/tests are deleted: the owning
  vitest configs (web unconditionally, snapshot in record mode)
  already load the repo-root .env before these files run.
- the four poll loops (acp-snapshot harness waits + crash-recovery
  waitForFile) ride vi.waitFor with explicit {interval, timeout}.
2026-07-26 22:29:41 +08:00
Tianyi Cui 7c038f275d Merge pull request #673 from deepseek-harness/worktree/preserve-retarget-checkpoints
docs: preserve incremental PR retarget checkpoints
2026-07-26 22:03:30 +08:00
Tianyi Cui 047e48bd8d docs: preserve incremental PR retarget checkpoints 2026-07-26 21:59:03 +08:00
Tianyi Cui 430f6441c8 Merge branch 'code-mode-ui/shiki' into code-mode-ui/trajectory-spans 2026-07-26 21:52:41 +08:00
Tianyi Cui b67ecc45fc Merge remote-tracking branch 'origin/master' into worktree/pr654-merge-20260726 2026-07-26 21:47:07 +08:00
Tianyi Cui 62c56befab Merge remote-tracking branch 'origin/master' into worktree/packed-chunks-default-rfc 2026-07-26 21:44:31 +08:00
Tianyi Cui 426da32217 Merge branch 'code-mode-ui/dispatch-spill' into code-mode-ui/shiki 2026-07-26 21:44:17 +08:00
Tianyi Cui e1d4607952 Merge pull request #650 from deepseek-harness/worktree/fix-clean-symlink-boundary
fix(build): contain clean targets within repository
2026-07-26 21:43:44 +08:00
Tianyi Cui be3f23a422 docs(session): propose packed chunk rows by default 2026-07-26 21:42:29 +08:00
Tianyi Cui a4644413e5 fix: restore master's branded-id casts in ui-workspace apply spec
A stale-lib eslint --fix pass during the merge stripped the 'as never'
casts the branded WorkspaceId/SessionId parameters require; typecheck
rejects the push. Take master's version verbatim.
2026-07-26 21:37:42 +08:00
Tianyi Cui 0f712c8ade Merge branch 'master' into code-mode-ui/dispatch-spill 2026-07-26 21:35:48 +08:00
Tianyi Cui d3dc2b9fab Merge branch 'code-mode-ui/live-parallel' into code-mode-ui/dispatch-spill
Conflict resolution: scripts/type-equiv.manifest.json takes master's new
paired-derivative format (one primary entry per pair) and re-adds this
stack's CodeDispatchLog entry in that format. zh README pairs brought
along for the dispatch-log arm (spill-policy behavior/limitations bullets,
tools limitation bullet now pointing at the shipped bounding).
2026-07-26 21:35:03 +08:00
Tianyi Cui 681af6de5e Merge remote-tracking branch 'origin/master' into worktree/fix-clean-symlink-boundary 2026-07-26 21:34:58 +08:00
Tianyi Cui 4bcb52ea12 Merge remote-tracking branch 'origin/master' into worktree/fix-clean-symlink-boundary
# Conflicts:
#	packages/support/llm-mock-server/tests/server.spec.ts
2026-07-26 21:33:44 +08:00
Tianyi Cui 5ed8554147 Merge branch 'web-e2e-interactions' of https://github.com/deepseek-harness/deepseek-harness into web-e2e-interactions 2026-07-26 21:29:48 +08:00
Tianyi Cui 709ac6b531 Merge branch 'master' into web-e2e-interactions 2026-07-26 21:29:34 +08:00
Tianyi Cui f60d353a53 Merge pull request #658 from deepseek-harness/code-mode-ui/live-parallel
feat(tools): Code Mode live dispatch lifecycle + native-contract parallel sub-calls
2026-07-26 21:29:03 +08:00
Tianyi Cui 0ba1e8320e Merge branch 'master' into web-e2e-interactions 2026-07-26 21:23:10 +08:00
Tianyi Cui 76d95fdc4b docs: bring the zh README pairs along for the parallel-dispatch contract
master's bilingual README pairing (new since this branch forked) covers
packages/core/tools and packages/client/runtime, whose EN sides this PR
edits. Translate the scheduling-contract sentences (bridge pool, SDK
overlap line, loop cross-reference, codeDispatches lifecycle) into the zh
sides — including the verbatim shared model-facing block — and re-record
both pairing records.
2026-07-26 21:19:46 +08:00
Tianyi Cui eb2760eeef Merge remote-tracking branch 'origin/master' into web-e2e-interactions 2026-07-26 21:19:26 +08:00
Tianyi Cui fc38f8c813 Merge branch 'master' into code-mode-ui/live-parallel 2026-07-26 21:04:03 +08:00
Tianyi Cui d9d55f0062 Merge pull request #653 from deepseek-harness/code-mode-ui/web-ui-v1
feat(web): Code Mode UI — sub-calls as native rows nested under the run_code row
2026-07-26 21:00:18 +08:00
Tianyi Cui 1dfb38a0b2 Merge remote-tracking branch 'origin/master' into web-e2e-interactions 2026-07-26 20:59:25 +08:00
Tianyi Cui d0aebc9f92 docs(tasks): bring the zh side of the tasks pairs along after the master merge
Master made bilingual pairing mandatory repo-wide; this PR's seam-split
edits to the tasks docs get their zh counterparts: a new pair for the
dsh-tasks-local README and minimal updates to the tasks core-data doc,
agent-spine-demo README, and the tasks family READMEs, with pairing
records re-recorded.
2026-07-26 20:59:05 +08:00
Tianyi Cui aecc16f2d8 test(web): type the Code Mode fixture group row 2026-07-26 20:53:26 +08:00
Tianyi Cui 8847fb7bd4 Merge branch 'master' into code-mode-ui/web-ui-v1 2026-07-26 20:51:41 +08:00
Tianyi Cui 733d475799 Merge pull request #648 from deepseek-harness/code-mode-ui/host-foundation
feat(tools): run_code description param + native-parity dispatch logging + web Code Mode seam
2026-07-26 20:40:03 +08:00
Tianyi Cui 3698715d88 Merge remote-tracking branch 'origin/master' into web-e2e-interactions 2026-07-26 20:39:20 +08:00
Tianyi Cui d0b87e8c0f docs: cross-link landstrip evaluation gate from sandbox note's win32 phase
The sandbox note's deferred-phases plan for the Windows chain now points
at the proposed landstrip evaluation gate, so whoever picks up that rung
finds the pending evaluation. The landstrip note itself stays proposed;
this only tracks where the pending decision lives (a permitted
keep-implemented-notes-current edit). Mirrored in the .zh.md and the
pair re-recorded.
2026-07-26 20:39:07 +08:00
Tianyi Cui f8342b0a8e test(web): cover the settings surface and workspace management
Two new keyless scenarios for the functionality master gained since this
lane's base (#644 websettings, #643 workspace browser rework), both zero
model calls:

- settings-chrome: the modal shell (sidebar-foot trigger aria states,
  role=dialog, aria-current section switch to the deliberately empty
  Models, Escape + close-button paths, dialog aria golden); the Appearance
  row as the REAL theme gesture — retiring lifecycle-chrome's
  TODO(web-theme-gesture): clicking 深色 runs aria-pressed -> persisted
  dsh.theme -> body[data-ds-dark-theme] -> alias-token flip, survives
  reload, and 'system' follows the emulated OS scheme both ways; the
  Language row switches the settings-scoped copy to English (dsh.locale
  persisted, survives reload) and restores zh. Intentional reloads tear
  the SSE stream, so the spec drains exactly its own reconnect warnings —
  the tripwire still fails on unexpected connection loss.
- workspace-management: create-by-name twice through the region-header
  dialog (host-durable via ctx.workspace.list()); rename end to end —
  hover-revealed row menu (the button is display:none until the row
  hovers), duplicate-name pre-check (inline role=alert + disabled primary
  before any wire call), then workspace.rename through the real RPC,
  row update, host durability, reload survival; the flat 'In one list'
  view (section label flips, group headers drop, dsh.workspace.view
  persists across reload, grouped restored); the session hover card
  (dwell to open, closes on pointer leave). The one session row reuses
  seeded-history's committed seed — no new recording. Deliberately not
  driven: the inert menu rows and drag reorder (deferred in the note
  with re-entry triggers).

Agent Note gains scenarios 8-9 and the drag-reorder deferred item in both
languages; llm-replay README's zh side catches up with the { patches }
paragraph; pairings re-recorded.
2026-07-26 20:38:36 +08:00
Tianyi Cui fdef6b644a docs: sync Code Mode README translations 2026-07-26 20:31:37 +08:00