Files
deepseek-harness/packages/sdk
Tianyi Cui cf2b9e211d fix(sdk-client): address ds-review-bot findings
- api: resolve a relative workspace cwd to absolute before the handshake —
  the child spawns relative to the parent cwd, but the wire cwd is resolved
  again inside the child, so a relative value double-resolved
  (worker -> worker/worker).
- api: make the documented handshake retry real — HarnessClient.close() is
  permanent, so a failed initialize now reaps the runtime and swaps in a
  fresh client; DeepSeekHarness.close() is terminal and stops the respawns.
- api: validate session.event envelopes, assistant/message content, and
  session.finished reasons at the wire boundary — a malformed runtime
  surfaces as SdkProtocolError instead of type-invalid TurnResult data or a
  TypeError out of finalResponse.
- client: a throwing subscribe() filter fails and detaches only its own
  subscription (normalized to Error); sibling fan-out and the transport read
  loop are undisturbed.
- client: NotificationSubscription.close() drops its queued notifications,
  matching its documented contract; runtime-death fail() still leaves
  already-delivered items drainable.
- client: subscribe() after close()/runtime death returns a born-failed
  subscription so next() rejects instead of parking forever.
- client/transport: bounded requests abandon via AbortSignal — the transport
  drops the pending entry at timeout, so repeated bounded calls against a
  hung method retain no per-call state.

One test per finding; per-file coverage stays 100% on both packages.
2026-07-27 17:48:07 +08:00
..
2026-07-26 05:06:39 +08:00

SDK packages

English | 中文

Developer tooling for creating, editing, building, and running DeepSeek Harness projects, plus the client SDK stack for driving a harness runtime from another process.

The feature Agent Note owns the developer workflow; the architecture Agent Note owns the package and project-editing boundaries; the TypeScript SDK Agent Note owns the client SDK stack.

Package Role
helper Project aggregate, edit session, builtin features, project documents, templates, package managers, and prompt abstraction
scripts The dsh-sdk launcher: start, dev, build, and interactive config
create-sdk The npm create @deepseek-ai/sdk initializer
sdk-protocol Shared SDK runtime wire protocol: the newline-delimited JSON-RPC transport + named request/notification types
sdk-client TypeScript client SDK: drive a harness runtime subprocess over stdio JSON-RPC (the Python SDK's design twin)

@deepseek-ai/create-sdk is the one package-name exception to the repository's @deepseek-ai/dsh-* rule: npm's scoped initializer convention requires that name for npm create @deepseek-ai/sdk.

Generated projects keep cordis.yml as the only runtime plugin tree. dsh-sdk dev adds TypeScript and local-workspace resolution around that same file; it does not create a development-only config.