2nd dokployH
Find a file
Tianyi Cui 6d37b6c33d fix(acp): server crashed on connect — drop export default, read optional service cwd-independently
Two independent bugs made the ACP server crash the moment an editor (Zed)
connected, despite 178 green unit tests at 100% coverage:

1. `session/new` threw `cannot get property "agents" without inject`. Root
   cause: a stray `export default apply` made the cordis Loader's
   `unwrapExports` (`exports.default ?? exports`) collapse the module to the
   bare `apply` function, discarding the sibling `inject`/`name`/`Config`
   named exports. The plugin fiber was built with empty `inject`, so every
   `ctx.<service>` read in `apply` threw at load. Fix: remove the default
   export so the Loader uses the namespace.

2. `session/load` threw `cannot get property "sessionPersistence" without
   inject`. `AgentLoop.resume` read `this.ctx.sessionPersistence` (a service
   it deliberately does NOT inject); the property proxy's ancestor-only fiber
   walk fails through the bridge's traceable shadow. Fix: read it via
   `this.ctx.get('sessionPersistence', false)`, the topology-independent
   global-store lookup.

Why the suite missed both: every test mounted the plugin by hand
(`ctx.plugin({name,inject,apply})`), bypassing `unwrapExports` entirely, and
the only test driving these RPCs was key-gated (skipped in CI). Added a no-key
`session/new` e2e that boots the real example through the real Loader — it
fails loudly on bug #1 without an API key. Set `TSX_TSCONFIG_PATH` in the e2e
spawn so the subprocess resolves workspace `paths` from a temp cwd (it was
silently falling back to a stale built `lib/`).

Docs: post-mortem 0001; AGENTS.md "line coverage is not behavior coverage" +
with-key/smoke-test philosophy; packages/AGENTS.md plugin-export-shape and
ctx.get rules; dsh-code-review SKILL checks.
2026-06-18 03:12:37 +08:00
.agents/skills/dsh-code-review fix(acp): server crashed on connect — drop export default, read optional service cwd-independently 2026-06-18 03:12:37 +08:00
.claude docs: accuracy sweep, architecture restructure, two ADRs, review skill 2026-06-13 22:05:34 +08:00
.github/workflows Merge pull request #33 from deepseek-ai/split/session-persistence 2026-06-17 15:01:52 +08:00
docs fix(acp): server crashed on connect — drop export default, read optional service cwd-independently 2026-06-18 03:12:37 +08:00
examples fix(acp): server crashed on connect — drop export default, read optional service cwd-independently 2026-06-18 03:12:37 +08:00
packages fix(acp): server crashed on connect — drop export default, read optional service cwd-independently 2026-06-18 03:12:37 +08:00
scripts Merge branch 'feat/acp-1-max-tokens-turn-end' into feat/acp-2-bridge 2026-06-17 15:20: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 fix(acp): server crashed on connect — drop export default, read optional service cwd-independently 2026-06-18 03:12: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 feat(acp): ACP bridge — drive the coding agent from an editor over JSON-RPC stdio 2026-06-16 18:44:31 +08:00
lefthook.yml feat: generate module dependency graph with freshness gate 2026-06-16 21:00:24 +08:00
LICENSE Initialize repo with README, AGENTS.md, and CLAUDE.md symlink 2026-06-10 22:58:56 +08:00
package.json Merge branch 'feat/acp-1-max-tokens-turn-end' into feat/acp-2-bridge 2026-06-17 15:20:36 +08:00
pnpm-lock.yaml Merge branch 'feat/acp-1-max-tokens-turn-end' into feat/acp-2-bridge 2026-06-17 15:20: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(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: 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.