Overview
dsh-session-toolkit
README / EN
Package documentation
Registry summary
dsh.pub verifies the pinned bundle contract, runtime facts, and distribution semantics. The complete README remains in the source repository.
Read the full README on GitHubLIMITATIONS
Known limitations
- Client half is a hand-maintained single-file IIFE bundle; adding a feature touches both `lib/` and `client/client.js`. - **No gate covers identifier scope in the client half.** A block that calls `react.useState` must also call `require('react')`: `react/jsx-runtime` does not provide it, and a missing binding throws while the component renders. The slot renderer catches that throw and drops the entry, so the symptom is a button that is silently not there -- not an error anyone sees. This shipped from 2026-09-18 (`3e44642`, which added the hooks calls without adding the require) until 2026-09-22, through every gate. - **A received peer message shows up as a collapsed row, not as a readable message.** `send_to_session` records the delivery with producer attribution — `source: { kind: 'agent-message', form: 'relay', senderSessionId }` — and the client renders every non-human source through its turn-trigger row, which is collapsed until you click it. Writing `kind: 'user'` instead would render inline like a human message, but would record another agent's words as the user's in the one field the V4 format made producer-owned. The attribution wins; click the row to read the body (it still names its sender in the first line). - **Icon names are part of the integration surface.** DSH 0.1.7 renamed the `@deepseek-ai/dsh-client-ui-primitives` icons from `IconXxxOutline<size>` to `IconXxxOutlineRegular` / `IconXxxOutlineMedium` (1 px vs 1.3 px stroke; the artwork keeps the old default `size`), so the client half must use the **target harness's** names. A name that no longer exists evaluates to `undefined` and `React.createElement(undefined, …)` throws, which blanks that component's subtree **while its navigation entry still appears** (registration and rendering are separate). Every other gate stays green on this — syntax, packaging and the anchor gate all passed. Gate it with `node scripts/primitives-export.assert.mjs --harness <checkout>`: exit 1 lists every member the plugin references that the installed harness does not export. - The relocated Session-log entry depends on the official `sessionLogDownload` controller interface **and** mirrors the 0.1.6 official surface (a "⋯ More actions" menu). It is a frozen replica: run `node scripts/dsh-log-ui.drift.mjs --harness <checkout>` after a DSH upgrade — it audits both sides for the same anchors and exits non-zero on drift (§E). **Deliberate divergence:** the official header menu has since gained a second item (`feedback`); this replica carries download only. That is a decided state, not an open question — the drift gate reports it as a note rather than a failure because following a new upstream capability is itself a decision, and that decision was taken on 2026-09-22: **do not follow**. Re-open it only if the feedback entry is wanted here too. - Loose emphasis matching in `toPlainText` can drop `*` pairs in non-format positions (e.g. `a * b * c`); acceptable for agent-generated messages, boundary tightening is optional. - The aggregate `inject` union waits for every listed service; a profile missing one service delays the whole package (web profile provides all of them today). - Harness-provided dependency ranges are prerelease unions; `pnpm install` must be re-run after changing them, and the resulting install should be checked with `node scripts/dependency-skew.measure.mjs --profile <DSH_HOME>/profiles/web` (expect `SKEW_COUNT=0`; `DE-INSTANCE` = same version, different instance, which §F treats as acceptable). - `ctx.get('agentDefaultModel')`, `sessionTitle` and `workspaceRegistry` are resolved lazily at call time and degrade to `cwd`/path addressing; `tools` and `webServer` are awaited through `ctx.inject` so a late-arriving service cannot silently disable a feature (the loader creates entries concurrently, so apply-time `ctx.get` had no ordering guarantee). - **Restart probe window** — a restart is only detected when the health probe fails for `restartFailThreshold × restartPollMs
