2nd dokployH
Find a file
Tianyi Cui ab19fed77c Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai
The first real LlmAdapter implementations, shipped as a deliberate pair:
same models and wire protocol, completely different internals, so the
StreamChunk protocol is verified across independent implementations.

- dsh-llm-deepseek: hand-rolled fetch + SSE parser + chunk-translation
  state machine against the official chat-completions format (thinking
  mode via top-level thinking/reasoning_effort; the empty-string
  reasoning_content first chunk; usage attached to the finish chunk or
  trailing; reasoning_content passback on tool-call turns; disjoint
  cache-token accounting).
- dsh-llm-pi-ai: the same endpoint through @earendil-works/pi-ai,
  mapping its event vocabulary (parsed tool arguments, in-stream error
  events, folded reasoning tokens) onto the same chunks.

The agent loop now honors the in-band error path: an adapter that ends
its stream with finish {kind:error|aborted} (the only option for
adapters that can't throw mid-stream, like pi-ai) is translated into a
step error, so the turn ends error/aborted with a logged error event
instead of a normal completed assistant message. This makes the
StreamChunk error contract real for both adapters; docs/architecture.md
and the StreamChunk doc are updated accordingly.

New yarn test:e2e (vitest.e2e.config.ts, *.e2e.ts) runs key-gated
real-API matrices for both adapters across V4 Flash/Pro and all
thinking/effort levels; it self-skips without DEEPSEEK_API_KEY. Unit
suites run against local node:http mock SSE servers at 100% per-file
coverage.
2026-06-13 18:30:03 +08:00
.github/workflows Fix CI: order steps by artifact dependency, resolve fresh-clone builds 2026-06-11 23:10:43 +08:00
docs Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +08:00
examples Add branded ID types: CallId, SessionId, AgentId 2026-06-11 15:17:56 +08:00
packages Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +08:00
scripts Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +08:00
vendor Replace dumble with tsdown for JS bundling 2026-06-11 22:34:43 +08:00
.gitignore Add bash execution: dsh-bash seam, dsh-bash-local impl, dsh-tool-bash tools 2026-06-13 18:28:10 +08:00
.yarnrc.yml Set up monorepo infra: Yarn 4 workspaces, tsc -b + dumble build, vitest 2026-06-11 10:52:45 +08:00
AGENTS.md Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +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 two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +08:00
lefthook.yml Add lefthook git hooks with a vendor-manifest guard 2026-06-11 15:07:55 +08:00
LICENSE Initialize repo with README, AGENTS.md, and CLAUDE.md symlink 2026-06-10 22:58:56 +08:00
package.json Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +08:00
README.md Document the codebase thoroughly and tighten type safety 2026-06-11 13:01:00 +08:00
tsconfig.base.json Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +08:00
tsconfig.build.json Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +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 Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +08:00
tsdown.config.ts Replace dumble with tsdown for JS bundling 2026-06-11 22:34:43 +08:00
vitest.config.ts Document why vite-tsconfig-paths can't be replaced by resolve.tsconfigPaths 2026-06-11 23:24:41 +08:00
vitest.e2e.config.ts Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +08:00
yarn.config.cjs Add repo hygiene gates: knip, publint, yarn constraints 2026-06-11 15:04:50 +08:00
yarn.lock Add two DeepSeek LLM adapters: dsh-llm-deepseek and dsh-llm-pi-ai 2026-06-13 18:30:03 +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.

yarn install
yarn test        # vitest
yarn demo        # runnable echo-agent example

For agent instructions see AGENTS.md. For the architecture design see docs/architecture.md. Each subdirectory has its own README.md with local context: packages/, vendor/.