Introduce @deepseek-ai/dsh-sdk-app as the thin application layer for the built-in sdk profile. The bundle contributes the JSON-RPC server and startup-only profile metadata, while dsh-base continues to own the shared agent, provider, persistence, and tool composition. Publish ctx.appReady from the launcher only after the Loader tree and launcher-owned setup succeed. The stdio lifetime binding leaves stdin unread until the protocol transport claims it and defers EOF exit 0 until readiness commits, so early protocol frames remain buffered and a racing startup failure remains the nonzero process outcome. Fiber disposal cancels both pending lifecycle listeners. Register the bundle in the CLI resolver closure, generated configuration catalog, workspace graph, and built-bin smoke. Startup tests prove that base plus sdk-app exposes the SDK server without taking ownership of shared runtime plugins; focused and built-bin regressions cover early input, EOF readiness, and startup-error precedence.
@deepseek-ai/dsh-sdk-app
English | 中文
The SDK stdio application as a dsh profile bundle over dsh-base. Its patch sets the coding-agent persona, disables module HMR, mounts an app-owned zero-option command provider, and starts dsh-sdk-jsonrpc-server only after that provider accepts the invocation. dsh --profile sdk --help therefore writes help and exits without claiming stdin or stdout.
The startup provider binds stdin EOF to the launcher's bounded successful shutdown. SDK protocol shutdown, SIGINT, and SIGTERM retain their owning server or launcher paths; disposal drains the root profile tree and persistence. Stdout is reserved for newline-delimited JSON-RPC frames. A deployment selects a different complete composition through profile bundles and patch files, not another app bin.
DSH_MAX_TOKENS_AS_SUCCESS retains the SDK deployment mapping: unset or JSON true reports token-limited subagent completion as accepted, while JSON false reports it as an error. Provider/model and workspace cwd arrive through the SDK initialization request; the base profile owns adapters, tools, persistence, policy, settings, and credentials.
Model Experience
SDK coding-agent persona
What the model sees
The profile supplies You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}. before the base tool and context contributions. The exact SDK initialization route and session cwd resolve the placeholders.
Token effect
One short stable persona plus the data-dependent base prompt sections and selected tool schemas.
KV Cache effect
Stable for a fixed profile, provider, model, and tool roster. Profile changes take effect on the next process because the shipped SDK profile uses startup-only patches.
Known Limitations and Deferred Work
- A profile can omit the SDK server — a custom profile selected by the TypeScript client must retain this bundle or another
dsh-sdk-jsonrpc-serverrow; client initialization fails when no peer answers. - User plugins can violate stdout purity — profile and per-launch patches are trusted application composition. The shipped bundle writes no non-protocol stdout, but it cannot contain an arbitrary inserted plugin.
- Configuration changes require restart — the shipped
sdkprofile usespatchReload: startupso one stdio connection never observes a replacement server or Agent dependency.