Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@lukstei/dsh-session-handoff

Latest version: v0.2.2-rc.5.17

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: lukstei-user
1 Stars
0 Forks
16 Versions
2.5K Downloads
TypeScript Repo language

Scan summary

@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.

  • Releases: 16 versions; the latest 5 were published within 2 days (28 and 29 Nov 2026).
  • Findings: No rules fired in version 0.2.2-rc.5.17.
  • Downloads: 2,456 downloads.

Versions

16 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

No rules fired in 0.2.2-rc.5.17

Findings

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.

README

The publisher’s own README, as collected from the registry.

@lukstei/dsh-session-handoff

Summary

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.

Table of Contents

  • End user guide
  • Use this package
  • Understand the implementation
  • Further Exploration
  • Model Experience
  • Known Limitations and Deferred Work
  • Dev Note

End user guide

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
  1. Install and restart the harness.
  2. Work until the gauge appears beside the send button.
  3. Click it, or type /handoff to pick a model.

Use this package

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.

Plugin dependencies

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. |

Handoff ring

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.

Modes
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" }.

Launch
  1. Renders this session's brief.
  2. Creates a session via sessionController.create() in the current workspace (falls back to cwd when the session has no workspace), same agentPreset.
  3. Selects the requested model on the new agent, or replays the source's own selection.
  4. Titles it with the full source title (or 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.
  5. Runs /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.
  6. Copies the source session's kanban links by replaying its add-link commands against the new agent.
  7. Writes HANDOFF.md into the new session's scratch directory and queues the read-the-brief follow-up.
  8. Returns 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.

Brief layout
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.


Understand the implementation

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:

  • The command declares 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.
  • A slash command has no structured return channel to the client, so the Host encodes the new id in the command result text, which is persisted in the 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.
  • The pane is added through the split store, not 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.
  • Before calling 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.
  • The client reacts only to 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 membership is a session-log fact: the board lists only sessions whose kanban projection is initialized, which happens when /kanban runs in that session. Hence the explicit init.
  • A session created by 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.
  • Turn attribution: user/message carries no turn number, so it is attributed to the most recently opened turn.
  • Artifact extraction parses tool arguments as JSON; non-JSON payloads are ignored.
  • Handoff chain: a handed-off session starts with the follow-up "The handoff brief for session is at ." 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.
  • The scratch path comes from 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.


Further Exploration

  • @lukstei/dsh-scratch-dir — scratch path convention.
  • @lukstei/dsh-client-split-view — pane host.
  • Upstream: DSH module graph.

Model Experience

/handoff
What the model sees

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.

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm @lukstei/dsh-session-handoff

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229