heartmove/dsh-session-bridge ↗★ 8

dsh-session-bridge

会话桥(dsh-session-bridge):通过提示词创建新的主会话(顶层 UI 会话)、向任意会话发送消息、等待会话的下一条回复、读取会话消息,并按会话名或 id 跨工作区查找会话;此外支持监控/调度主任务(含思维链循环检测 → 自动中断并把任务转移到新会话)、子代理处置与归档/取消归档会话。

Package
dsh-session-bridge
Compatibility
Unverified
Harness peer range
>=0.1.7-0
Version
0.7.0
License
MIT
Last updated
Oct 17, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add dsh-session-bridge

Usage

ToolWhat it does
session_bridge_createCreate a main session (current or another workspace via workspaceId / cwd); optional first prompt + waitForReply; async creates return a sinceSeq anchor.
session_bridge_sendSend a message (mode=queue/steer); optional wait-for-reply; async sends return a sinceSeq anchor.
session_bridge_waitWait for new output after sinceSeq (default: latest seq at call time; -1 counts existing events): waitFor=reply (text) or waitFor=segment (any completed step, no full-turn wait); optional requireTurnEnd; falls back to the pre-existing reply with stale when nothing new arrives.
session_bridge_readRead messages — live or offline; sinceSeq paging, role filter, limit.
session_bridge_segmentsRead completed output segments (each finished assistant step) incrementally by paragraph — live or offline.
session_bridge_resumeBring a persisted session back online (idempotent).
session_bridge_findFind sessions by title / id / workspace / directory across workspaces.
session_bridge_statusRead a session's live progress (running, open turn, stall detection, pending work, latest reply) plus live/finalized chain-of-thought (reasoning param); [STALLED] is shown for running sessions only.
session_bridge_cancelStop a running session (abort active turn; clear queued/steering work unless keepInbox).
session_bridge_monitor_startStart a background watchdog on a main session (poll, nudge, correct, cancel, wrap up); supports chain-of-thought coRules (e.g. reasoning not-contains "I'm" → cancel) and chain-of-thought loop detection (on by default: a hit interrupts the session and transfers the task to a new one, with a subagent policy via loopDescendants).
session_bridge_monitor_stopStop a watchdog (keep the session itself running).
session_bridge_monitor_listList active watchdogs and their state.
session_bridge_archiveArchive a session (hidden from groupings; history and position preserved); requires stopActivity: true for a running one. Reports the id, the archive size and the newest ids.
session_bridge_unarchiveUnarchive a session (visible again at its recorded position; unknown ids are a no-op).
session_bridge_archivedList the archive set (newest first, optional limit, default 50), optionally resolving titles for the returned ids.

All tools return lossless JSON; wait-style tools never throw on timeout — they return a timedOut / aborted / stale flag.