* feat(sdk): report why a session agent was disposed A request for a session whose agent left the registry now states whether the whole runtime is shutting down, the SDK server is shutting down, or only the agent loop was unloaded. During runtime shutdown it names the last process event observed before teardown; for an agent-loop unload it gives the time and the plugin whose unload began first. The liveness check reads the registry as optional, so both stages of root disposal report the same failure. Refs #8737 * fix(sdk): keep the runtime observation out of the plugin entry exports The static gates reject a new read of the Cordis root context, a value export from a function plugin entry, and new assertions to unknown. The plugin entry now passes the server an observation built from the root fiber it already holds, the helper lives in the internal process-events module, and the new tests complete the handshake instead of casting the server. Refs #8737 * fix(sdk): keep the process-event record from throwing and state the unload origin as an observation A rejection value without a string form made the failure text throw inside a prepended listener, which would end the dispatch before the listener that owns the event. The text now falls back to a fixed marker. The plugin named for an agent-loop unload is the first one unloading at that time, which overlapping unloads can make unrelated, so the message and README say that. Refs #8737 * feat(python-sdk): log the runtime's stderr lines as they arrive The runtime writes its fatal report, including the stack of an unhandled rejection that ends the process, to its own stderr. The SDK kept those lines in memory and attached them only to initialization, timeout, and transport failures, so a host saw none of it for an ordinary JSON-RPC error. Each line now also goes to the Python logger deepseek_harness.runtime at INFO. Refs #8737
DeepSeek Harness Python SDK
English | 中文
Python packages for driving DeepSeek Harness as a subprocess. The client SDK communicates with the bundled runtime over newline-delimited JSON-RPC on stdio.
Packages
| Directory | Dist / module | Role |
|---|---|---|
| sdk | deepseek-harness-sdk / deepseek_harness |
High-level turns API and lower-level JSON-RPC client |
| sdk-runtime | deepseek-harness-runtime-bin / deepseek_harness_runtime |
Bundled dsh CLI executable and native sidecars |
Behavior
The SDK starts the matching bundled dsh --profile sdk runtime unless the caller selects another dsh executable or profile. The runnable minimal example selects the shipped standalone sdk-minimal profile; the same runtime also packages dsh web and its frontend assets for separate CLI use. Every launch requires an explicitly selected Harness home; Python never silently reads ~/.dsh. The SDK reference and runtime carrier reference own runtime selection, profiles, patches, and external plugin management.
Contributor workflows
The Python contributor workflows cover building runtime artifacts, validating the packages, source-mode development, and distribution.