Scan your whole stack
From OX Research Newsroom
Are you using @lukstei/dsh-session-handoff?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.2.2-rc.5.17
@lukstei/dsh-session-handoff was last scanned on 29 Nov 2026 at version 0.2.2-rc.5.17. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.2-rc.5.17 LATEST | 29 Nov 2026 | No rules fired |
| 0.2.2-rc.5.16 | 28 Nov 2026 | No rules fired |
| 0.2.2-rc.5.15 | 28 Nov 2026 | No rules fired |
| 0.2.2-rc.5.14 | 28 Nov 2026 | Not shown |
| 0.2.2-rc.5.13 | 28 Nov 2026 | Not shown |
Findings for v0.2.2-rc.5.17. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.2.2-rc.5.17; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Adds a /handoff command that turns a session log into a short resume brief. /handoff starts a new session beside the current one with the brief loaded, on the same model or on a model picked from a list.
Adds /handoff, which starts a new session beside the current one with a resume brief loaded. A gauge by the send button tells you when the context is big enough to be worth it. Full guide with demo and controls: lukstei.github.io/dsh-plugins/#dsh-session-handoff.
dsh plugin --profile <web|desktop> add @lukstei/dsh-session-handoff
/handoff to pick a model.Install into a profile and restart the harness:
dsh plugin --profile <profile> add @lukstei/dsh-session-handoff
The shipped cordis.patch.yml mounts id: session-handoff with default thresholds (see Configuration to override them in your profile cordis.patch.yml).
Required Host services (inject): commands, llm, sessionQuery, workingDirectory, sessionController, sessionTitle, workspaceRegistry. Workspace dependency: @lukstei/dsh-scratch-dir (scratchDirectory()).
The client half needs @deepseek-ai/dsh-api-session-controller and @lukstei/dsh-client-split-view. Build it with pnpm build (emits dist/client.js); rebuild and restart after changing src/client/. The client bundle is marked immediately because no route lazily pulls it in; without stage-one prefetch its watcher would never register.
/handoff
/handoff google/gemini-4
Typed in the composer, a bare /handoff opens the same provider-grouped model list as /model, with the current model highlighted; picking a row starts the new session on that model with the brief loaded. The argued form (<provider>/<model>, split at the first slash) skips the list. The Host checks the route against the registered LLM providers and the provider's own model resolution, so a typo returns an error before any session is created. Because it creates a new session, it also works across native and ACP models, where an in-place model switch is blocked. Reasoning effort is the model's default. The handoff ring sends the bare line straight to the Host, which keeps the source's model and skips the list. The client half also needs @deepseek-ai/dsh-client-ui-commands and @deepseek-ai/dsh-client-ui-model-selection.
Server-side and client-side entries.
Server-side (inject: commands, llm, sessionQuery, workingDirectory, sessionController, sessionTitle, workspaceRegistry):
| Plugin / service | Required? | Provided by | Effect without it |
|---|---|---|---|
commands |
Required | @deepseek-ai/dsh-commands | Plugin stays pending; never applies. No /handoff. |
llm |
Required | @deepseek-ai/dsh-llm | Plugin stays pending; never applies. |
sessionQuery |
Required | @deepseek-ai/dsh-session-query | Plugin stays pending; never applies. |
workingDirectory |
Required | @deepseek-ai/dsh-working-directory | Plugin stays pending; never applies. |
sessionController |
Required | @deepseek-ai/dsh-api-session-controller | Plugin stays pending; never applies. |
sessionTitle |
Required | @deepseek-ai/dsh-session-title | Plugin stays pending; never applies. |
workspaceRegistry |
Required | @deepseek-ai/dsh-workspace | Plugin stays pending; never applies. |
Client-side (inject: sessions, splitView, slots, commandUi, modelDirectories, conversation; all required):
| Plugin / service | Required? | Provided by | Effect without it |
|---|---|---|---|
sessions |
Required | @deepseek-ai/dsh-api-session-controller | Plugin stays pending; never applies. |
splitView |
Required | @lukstei/dsh-client-split-view (also in dsh.client.inject) |
Plugin stays pending; never applies. The client entry (launch into a pane) does not activate; the host /handoff command still works. |
| slots | Required | @deepseek-ai/dsh-client-ui-renderer | Plugin stays pending; never applies. |
| commandUi | Required | @deepseek-ai/dsh-client-ui-commands | Plugin stays pending; never applies. |
| modelDirectories | Required | @deepseek-ai/dsh-client-ui-model-selection | Plugin stays pending; never applies. |
| conversation | Required | @deepseek-ai/dsh-client-ui-conversation | Plugin stays pending; never applies. |
A small gauge button beside the send button marks a session worth handing off: yellow at 100k prompt tokens, red at 150k. After 5 idle minutes the prompt cache is cold and the bars drop to 70k and 100k. Both bars are also capped at 60% and 80% of the model's context window. For ACP agent sessions, which never report usage to DSH, it reads the agent's context usage from @zaimokuza/dsh-acp-adapter once per finished turn. The adapter is an optional peer dependency: without it the ring only covers regular DSH sessions. Clicking the button runs /handoff directly; it is disabled while a turn is running or a handoff is in flight. Thresholds live in src/client/level.ts.
Code import (no mount): @lukstei/dsh-scratch-dir (scratchDirectory).
Used by: nothing.
| Input | Model of the new session |
|---|---|
/handoff (Host, e.g. from the ring) |
the source's own |
/handoff <provider>/<model> |
that model, validated first |
Any other argument is an error naming the expected form. A session with no turns returns an error. All I/O failures return { kind: "error" }.
sessionController.create() in the current workspace (falls back to cwd when the session has no workspace), same agentPreset.Handoff <first 8 id chars> when untitled) and renames the source to <title> (Resumed) unless it already ends with that. A user title pins it against auto-generated titles. Adds a Kanban link Resumed from <source id> (dsh://sessions/<id>, opens the source session) to record the origin./kanban {"action":"init","createdAt":…} against the new agent so it appears on the Kanban board. No prompt is sent, since that would seed the composer draft with the follow-up text.add-link commands against the new agent.HANDOFF.md into the new session's scratch directory and queues the read-the-brief follow-up.Handoff launched: <id>.The client opens the pane, moves any unsent composer text (including @ mentions and quotes) into the new session's composer, and shows an info notice when the source draft held file or image attachments (which stay behind). Without the client bundle the session is created but not opened.
| Section | Contents |
|---|---|
| Header | session id, chain of ancestor ids (when handed off before), cwd, creation time, event and turn counts across the chain |
## Goal |
first real user prompt of the oldest ancestor, head 500 + tail 300 chars |
## Turns |
one ### T<n> [end reason] block per turn, numbered across the chain, handoff turns skipped. each turn labels **User:** and **Assistant:**; the last turn quotes every user message and the reply in full (capped at 20,000 chars); the 4 before it quote 1200 head + 400 tail chars; the 30 before them flatten to the ask (500/300) and reply (240 chars); every cut is marked [N chars omitted]; older ones collapse to … N earlier turns omitted |
## Failures |
newest 20 tool/result errors: turn, session id when from an ancestor, tool name, reason (200 chars), plus … N older failures omitted |
## Artifacts |
deduped paths from tool call arguments (path, file_path, filePath, notebook_path) across the chain, newest 100, plus … N older paths omitted; the brief files themselves are excluded |
Every section is bounded by entry count and per-line length (paths 300 chars, tool names 80), so a brief stays near 50k characters however many times a session is handed off.
Empty sections render none. Output is deterministic for a given log. request/header, agent/inbox/spliced and reasoning blocks are excluded.
Files:
src/index.ts: command registration, model validation, deliver (write brief + queue follow-up), createBeside (launch).src/handoff.ts: renderHandoff and handoffInstruction, pure.src/launch.ts: LAUNCH_PREFIX, formatLaunchResult, launchedSessionId.src/client/index.ts: client watcher. Tests sit beside each file.Details:
input: { hint: "[provider/model]" }. Without a declared input the client sends the raw line to the model as a prompt and the handler never runs.command/done event. The client subscribes to every open session's event source and calls ctx.splitView.replaceSession() when it sees a successful command/done starting with Handoff launched:, replacing the pane in-place atomically. It then sends /kanban {"action":"done"} to the source session, as the Kanban Done button does. A source never initialised in Kanban ignores the done action.uiWorkspace.openSession(). The split view patches that method into a read-only overlay without its own composer, so prompts would keep landing in the pane underneath.ctx.splitView.replaceSession(), the client reads and clears any plain-phase, non-/handoff draft via ctx.conversation.input.for(sourceScope), then initializes the newly retained session via ctx.conversation.input.requestDraftInitialization(targetBinding, { prompt, whenDraftExists: "keep" }). Browser-owned file/image attachments are scoped to the source session and disposed when the pane swaps, so if attachmentIds was non-empty the client calls notify("info", ...) on the new session instead.append changes. A replace replays the whole window on first open and after reconnect gaps and would reopen panes the user closed; the split view restores its panes from local storage.kanban projection is initialized, which happens when /kanban runs in that session. Hence the explicit init.cwd alone is attached to no workspace and stays out of the sidebar tree until the next Host start, so the workspace id is used when available.user/message carries no turn number, so it is attributed to the most recently opened turn.readChain follows that id back through sessionQuery.readSession (cycle-guarded; a deleted parent ends the walk) and renderHandoff merges the logs oldest first. The follow-up turn and the read of its brief file add no Goal, Turn or Artifact.scratchDirectory(); an unsafe id throws and the command returns an error.Trust boundary: the session id argument and session log contents are untrusted text; output is markdown written under the scratch directory only.
@lukstei/dsh-scratch-dir — scratch path convention.@lukstei/dsh-client-split-view — pane host.One queued follow-up user message in the receiving session:
The handoff brief for session <id> is at <path>/HANDOFF.md.
Read that file now, then reply with a short Markdown summary in this exact structure and stop:
- **Goal:** <1-2 sentences>
- **State:** <1-2 sentences>
- **Next:** <1-2 sentences; if multiple options exist, list them as indented sub-bullets>
Do not start the work until the user confirms the next action. Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.