2nd dokployH
Find a file
Tianyi Cui 81d434896d feat(acp-example): snapshot harness, normalizers, wiring, and handshake scenario
Adds the snapshot-test harness and the keyless replay pipeline end-to-end.

- snapshot-harness.ts: boots the real acp-agent subprocess via the cordis
  Loader (preserving TSX_TSCONFIG_PATH so unbuilt dsh-* imports resolve from a
  temp cwd), tees raw stdout into an SDK ClientSideConnection, interprets a
  per-scenario input.json DSL (initialize / newSession capturing the random
  sessionId / prompt / cancel), closes stdin to trigger graceful shutdown, and
  harvests the persisted session.jsonl. Failure-safe: a finally block SIGKILLs
  a live child, awaits its exit, and removes both temp dirs even on a thrown
  step or harvest. Raw bytes are buffered and decoded once (no multibyte split).
- snapshot-normalize.ts (+ spec): two pure normalizers (stdout frames + session
  JSONL) scrub cwd, session ids / UUIDs, and JSON-RPC ids, and zero time /
  createdAt — but keep `seq` (deterministic by contract). normalizeStdout throws
  on a non-JSON line (the stdout-purity check).
- start.ts: selects cordis.snapshot.yml (replay, providerless) or
  cordis.snapshot-record.yml (record, real adapter) from DSH_SNAPSHOT, skips
  .env in replay, and disposes the ctx on stdin end so persistence flushes
  before exit (harvest-after-flush, not on the prompt response).
- acp.snapshot.ts: asserts the normalized stdout golden (and, for model
  scenarios, the re-persisted JSONL golden) via toMatchFileSnapshot; record mode
  writes the harvested log back to the scenario fixture; an orphan-fixture guard
  fails on an unregistered scenario dir.
- handshake scenario: initialize + session/new (no model call; a header-only
  session.jsonl, since session/new persists no events).
- vitest.snapshot.config.ts, test:snapshot / test:snapshot:record scripts, a
  pre-push snapshot job, and the knip entry.

Incorporates Codex review: record-fixture writeback, failure-safe teardown,
seq-not-scrubbed, harvest-after-flush. Per docs/rfc/implemented/2026-06-19.
2026-06-19 03:36:12 +08:00
.agents/skills/dsh-code-review fix(acp): address Codex review — strict ctx.get, correct fiber-ownership doc + test 2026-06-18 03:48:33 +08:00
.claude docs: accuracy sweep, architecture restructure, two ADRs, review skill 2026-06-13 22:05:34 +08:00
.github/workflows docs: unify ADR/RFC trees into one lifecycle-organized RFC tree 2026-06-18 02:18:24 +08:00
docs refactor(acp-example): derive llm-replay script from the session JSONL 2026-06-19 02:44:33 +08:00
examples feat(acp-example): snapshot harness, normalizers, wiring, and handshake scenario 2026-06-19 03:36:12 +08:00
packages Merge remote-tracking branch 'origin/master' into chore/classify-markers 2026-06-18 23:19:02 +08:00
scripts Merge remote-tracking branch 'origin/master' into feat/acp-2-bridge 2026-06-18 03:31:04 +08:00
vendor fix: downgrade 4 TODOs to XXX per repo standard 2026-06-18 07:16:33 +08:00
.gitignore Merge branch 'split/turn-enclosure' into split/session-persistence 2026-06-16 17:01:36 +08:00
AGENTS.md feat(acp): show the command in execute titles; test via the real bash tool; RFC for terminal rendering 2026-06-18 11:23:12 +08:00
CLAUDE.md Initialize repo with README, AGENTS.md, and CLAUDE.md symlink 2026-06-10 22:58:56 +08:00
eslint.config.mjs Replace dumble with tsdown for JS bundling 2026-06-11 22:34:43 +08:00
knip.json feat(acp-example): snapshot harness, normalizers, wiring, and handshake scenario 2026-06-19 03:36:12 +08:00
lefthook.yml feat(acp-example): snapshot harness, normalizers, wiring, and handshake scenario 2026-06-19 03:36:12 +08:00
LICENSE Initialize repo with README, AGENTS.md, and CLAUDE.md symlink 2026-06-10 22:58:56 +08:00
package.json feat(acp-example): snapshot harness, normalizers, wiring, and handshake scenario 2026-06-19 03:36:12 +08:00
pnpm-lock.yaml feat(acp): show the command in execute titles; test via the real bash tool; RFC for terminal rendering 2026-06-18 11:23:12 +08:00
pnpm-workspace.yaml docs: tighten allowBuilds comments 2026-06-16 16:25:24 +08:00
README.md feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
tsconfig.base.json feat(acp): ACP bridge — drive the coding agent from an editor over JSON-RPC stdio 2026-06-16 18:44:31 +08:00
tsconfig.build.json feat(acp): ACP bridge — drive the coding agent from an editor over JSON-RPC stdio 2026-06-16 18:44:31 +08:00
tsconfig.json Fix CI: order steps by artifact dependency, resolve fresh-clone builds 2026-06-11 23:10:43 +08:00
tsconfig.test.json Set up monorepo infra: Yarn 4 workspaces, tsc -b + dumble build, vitest 2026-06-11 10:52:45 +08:00
tsconfig.typecheck.json feat(acp): ACP bridge — drive the coding agent from an editor over JSON-RPC stdio 2026-06-16 18:44:31 +08:00
tsdown.config.ts feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
vitest.config.ts feat(acp-example): add record/replay llm/stream plugin for snapshot tests 2026-06-19 01:10:30 +08:00
vitest.e2e.config.ts feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
vitest.snapshot.config.ts feat(acp-example): snapshot harness, normalizers, wiring, and handshake scenario 2026-06-19 03:36:12 +08:00

DeepSeek Harness

Monorepo for the DeepSeek Harness group.

Projects

  • DeepSeek Code — DeepSeek's coding agent product.

Development

This monorepo is built on the Cordis framework (vendored as source under vendor/), microkernel-style: everything is a plugin.

pnpm install
pnpm run test          # vitest
pnpm run demo:echo     # runnable echo-agent example (no API key needed)
pnpm run demo:coding   # the real DeepSeek coding agent (needs DEEPSEEK_API_KEY)

For humans, start with the development guide for local setup, hooks, environment variables, and quality gates, then read the architecture design before package work. Local context lives in packages/ and vendor/.

For agents, follow AGENTS.md.