2nd dokployH
Find a file
Tianyi Cui efee449cfe feat(session-persistence): preserve interrupted turns on crash; don't truncate (review #33)
A crash can leave a durable log whose final turn never closed. The old
behavior truncated everything after the last turn/end as a "crash tail".
But a single turn can be HUGE in a long-horizon task (many steps, large
tool output), so truncating it silently destroys real, durably-written
work — truncating a turn is wrong.

New crash recovery (ADR 0018): load() PRESERVES the interrupted turn's
events and CLOSES the orphaned turn by durably appending synthetic
boundary events — a step/end if a step was open, then a turn/end carrying
the new merge-extensible TurnEndReason {kind:'interrupted'}. load()
returns the balanced log, so a resumed session is immediately usable. Only
a never-fully-written TORN tail fragment is discarded; corruption in the
committed region is still unloadable.

- dsh-session: TurnEndReason {kind:'interrupted'} + shared
  interruptedTurnClosers() repair helper.
- JSONL backend: scanLog preserves the longest contiguous prefix
  (including a partial final turn); loadCore truncates a torn fragment and
  durably writes the closers, returning the balanced log.
- runPersistenceContract gains a crash-recovery test (both backends + mock).
- Docs: ADR 0018/0017, architecture.md, package READMEs.

Also (review #33): RFC 013 records the "move event vocabulary to Zod"
question (merge-extensible maps → runtime schema registry) + blast radius;
deferred, not done here.
2026-06-16 21:27:50 +08:00
.agents/skills/dsh-code-review feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
.claude docs: accuracy sweep, architecture restructure, two ADRs, review skill 2026-06-13 22:05:34 +08:00
.github/workflows Merge branch 'split/turn-enclosure' into split/session-persistence 2026-06-16 17:01:36 +08:00
docs feat(session-persistence): preserve interrupted turns on crash; don't truncate (review #33) 2026-06-16 21:27:50 +08:00
examples Merge branch 'split/turn-enclosure' into split/session-persistence 2026-06-16 17:01:36 +08:00
packages feat(session-persistence): preserve interrupted turns on crash; don't truncate (review #33) 2026-06-16 21:27:50 +08:00
scripts Merge branch 'split/turn-enclosure' into split/session-persistence 2026-06-16 17:01:36 +08:00
vendor feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
.gitignore Merge branch 'split/turn-enclosure' into split/session-persistence 2026-06-16 17:01:36 +08:00
AGENTS.md feat: migrate to pnpm 2026-06-16 14:55:37 +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 Add examples/coding-agent and the docs cookbook 2026-06-13 18:30:50 +08:00
lefthook.yml feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
LICENSE Initialize repo with README, AGENTS.md, and CLAUDE.md symlink 2026-06-10 22:58:56 +08:00
package.json feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
pnpm-lock.yaml Merge branch 'split/turn-enclosure' into split/session-persistence 2026-06-16 17:01:36 +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(session-persistence): abstract seam + JSONL backend + wiring 2026-06-15 21:05:46 +08:00
tsconfig.build.json feat(session-persistence): abstract seam + JSONL backend + wiring 2026-06-15 21:05:46 +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(session-persistence): abstract seam + JSONL backend + wiring 2026-06-15 21:05:46 +08:00
tsdown.config.ts feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
vitest.config.ts feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
vitest.e2e.config.ts feat: migrate to pnpm 2026-06-16 14:55:37 +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.