Repository navigation
Releases: Venshell/dsh-session-dm
Release list
v0.3.0 — session_dm_wait: stop sleeping, wait for the turn to end
dsh-session-dm v0.3.0
New: session_dm_wait
Handing work to another Session used to leave you guessing how long it would take — the only option was sleep and hope. Now you can block until it actually finishes.
session_dm_send → hands off the work
session_dm_wait → blocks until the target's turn ends, returns the reason
session_event_read → reads what it produced
session_dm_wait({ session_id, timeout_seconds? }) resolves with:
- turn end reason —
finished its turn (session seq N), plus the reason kind (completed,max-tokens, a cancel cause) - idle — the target had nothing pending, so there was nothing to wait for (happens right after resuming a cold Session)
- failure — the target's Session error, surfaced rather than swallowed
- timeout — after
timeout_seconds(default 300, capped at 3600), including whether the target is still running
Why it waits on turn/end and not on status
The host's own developer documentation is explicit:
Wait on durable events such as
turn/end… Do not pollagent/status.whenIdle()does not mean one follow-up finished: several inputs can share one running interval.
So the wait races three signals, each covering a gap the others leave:
| Signal | Covers |
|---|---|
session/event → turn/end |
the normal path; fires the moment the turn durably ends |
agent.whenIdle() |
a cold target resumed with nothing pending — no turn/end will ever arrive |
seq advanced && idle poll (1 s) |
frames the listener missed on cold resume or reconnect |
Also fixed in this release
A real hang, found while testing the wait. The timers were unref()'d, which lets Node exit the event loop while the await is still pending — the wait produced no output and the process disappeared. Active waits now keep their timers ref'd. Sharp edge #6 in the README documents it.
Everything else
session_dm_send and session_create are unchanged. The bundle still enables its own dependencies on install: it mounts the read-back tools (@deepseek-ai/dsh-tool-session-query) and opens SQLite session content search.
Install / upgrade
dsh plugin --profile <your-profile> add dsh-session-dm@0.3.0Restart the Harness afterward — plugin modules load at boot.
Full docs: README · v0.3.0 diff
v0.2.0 — cross-session DM + top-level session creation
dsh-session-dm v0.2.0
Cross-session tools for DeepSeek Harness — let one agent Session message another or start a fresh top-level Session, in the same workspace.
Tools
| Tool | What it does |
|---|---|
session_dm_send |
Deliver a message into another Session of the same workspace. A cold target is resumed by the message; a live one picks it up next turn. Authority: exact cwd match with the caller. |
session_create |
Start a new top-level Session (fresh conversation, never a subagent) in the caller's workspace and deliver a first prompt to it, via the same host API the Web UI "new conversation" button drives. Optional title. |
The bundle enables its own dependencies
Installing the bundle turns on the components cross-session work needs, including ones that ship disabled or absent in every default layer:
@deepseek-ai/dsh-tool-session-query— inserted at the host plane. This opt-in package ships in no default layer; without it the two tools deliver but the model cannot read the reply back. It providessession_search,session_event_search,session_trace,session_event_trace,session_event_read.@deepseek-ai/dsh-session-query-sqlite— overridden fromopenAt: never(content search closed) toopenAt: first-searchwith a durable index under<home>/cache/session-search.db, sosession_searchactually returns content. This opens content search profile-wide — delete that patch entry if you want it kept off.
Both rely on verified loader semantics: inserts append unconditionally (a profile layer that already inserts tool-session-query must drop one to avoid a double mount — see README), id-targeted overrides are idempotent and lose to later layers.
Install
# from npm
dsh plugin --profile <your-profile> add dsh-session-dm
# or from this release tarball
dsh plugin --profile <your-profile> add <path>\dsh-session-dm-0.2.0.tgzRestart the Harness afterward — plugin modules load at boot.
Notes
- Zero dependencies; the only import is
node:crypto. - Messages ride the durable followup inbox (the schedule service's delivery path) and carry
source.kind: "session-dm"for traceability. - GPL-3.0.
Full changelog: README · 1c01078...v0.2.0