Files
deepseek-harness/packages/examples/jsonrpc-demo
imccyu 6dde9f70f0 fix: satisfy doc gates after the examples/ relocation
Repair cross-group README links whose targets changed groups
(ui/jsonrpc, ui/app-boot -> examples; examples/* -> ui seams),
re-record the bilingual-pair consistency hashes for the docs the
rename touched on both language sides, and condense the AGENTS.md and
packages/README.md group entries. The packages/README ceiling rises
710 -> 760 for the mandated new examples/ hierarchy row (5% headroom).
2026-07-15 16:46:05 +08:00
..

@deepseek-ai/dsh-jsonrpc-demo

Bin-only app that boots an external cordis.yml; its jsonrpc entry serves SDK clients over newline-delimited stdio. The config composes the spine, backends, and serving plugin. lib/bin.js is also the single-executable runtime entry.

Config discovery

The first non-empty channel wins: $DSH_CORDIS_CONFIG, then positional argv[2]. If neither names an existing file, the bin prints one-line usage to stderr and exits 1; there is no working-directory or built-in fallback. dsh-app-boot makes plugin load failures fatal. This protocol does not use DSH_SNAPSHOT.

A config without dsh-jsonrpc is valid and serves nothing; the bin does not designate a server plugin.

Exit lifecycle

stdin EOF and SIGTERM dispose the root to quiescence and exit 0; SIGINT exits 130 after the same disposal. EOF may cut off an in-flight turn as documented in the distribution RFC. The jsonrpc plugin owns response-before-exit protocol shutdown; both paths are idempotent and safe to race.

stdout is the protocol

stdout carries only JSON-RPC frames. The bin and boot guards diagnose on stderr, and the config must omit stdout loggers.

Model Experience

Indirectly, through the plugins loaded from the external cordis.yml, which own every model-bound prompt, schema, message, and result; this bin adds none of its own.

Known Limitations and Deferred Work

  • The bin cannot prove that the config serves JSON-RPC — a valid config with no dsh-jsonrpc entry boots successfully and serves nothing.
  • No built-in or default config exists — every launch must provide DSH_CORDIS_CONFIG or a positional path, and deployment owns the complete plugin tree and stdout discipline.
  • stdin EOF cuts off in-flight work — client disappearance disposes the root immediately; callers that need orderly completion use the protocol-level shutdown request.