DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-context-bridge

d

dsh-context-bridge

Manifest valid

Manual session handoff: when you decide a session has run out of usable context, one click turns its event log into a compact handoff document (goal, done, next, project facts), creates a new session

UI (client)hasBundlePatch

English · 简体中文

dsh-context-bridge

Manual session handoff for DSH. When you decide a session has run out of usable context, click one menu row: the plugin writes a compact handoff document — current goal, what is done, what is next, project facts — creates a new session seeded with it, and wakes that session so work continues. The new session can inherit the session-bus name of the one it came from.

It is not automatic. There is no threshold, no timer, no listener on the agent loop. This is deliberate: when context fills up the first move is to compact, and only after several rounds of compaction stop helping is a handoff the right last step. That judgement is yours, not a number's.

Default on: no config file means the menu row works. To turn a project off, write {"enabled": false} in <project>/.dsh-bridge.json.


How it is triggered

One place only: the row 上下文交接:生成并续接 inside a session's … menu (or the 立即交接 button in the sidebar panel). Nothing else in the plugin can start a handoff.

What it produces

A Markdown document with four sections — deliberately short, because a handoff that repeats the whole conversation would hit the same wall:

SectionContent
现在要做什么the in-progress todo, or the last turn's request and its conclusion
已经做到哪completed todos plus the latest compaction summary, clipped
下一步remaining todos, in order
项目事实working directory and the last few turns (ask → result)

Generated from the source session's own event log (sessionQuery.observeSession, read-only), not from a model call: it costs no tokens and cannot invent facts it was not given.

How the new session is started

  1. The handoff event is built as a normal user/message (host rules only require an id, role: "user", a non-empty source.kind, and an array content).
  2. agents.create({ sessionId, seed, inheritedEventCount, meta }) creates the session with that event as its first event — the host persists it.
  3. The same text is then delivered through agent.followup() so the new session starts working instead of sitting there holding a document.

If the host has no agents.create, the run fails with an explicit message and creates nothing.

Inheriting the session-bus name

If the source session is registered in dsh-session-send's roster (.dsh-bus/names.json), the new session is registered as <name>-handoff (or -handoff-2, -3, … if taken). The roster is read-only here; writing goes through the bus's own registration entry when it exposes one. No existing name is ever overwritten, and names are clipped to 64 characters.

Enabling it

// <project>/.dsh-bridge.json
{
  "enabled": true,
  "todoLimit": 12,
  "recentTurns": 3,
  "openNewSession": true
}
KeyDefaultMeaning
enabledfalsemissing file or false = the menu row refuses to run and says how to enable it
todoLimit12todos listed in the document
recentTurns3turns summarised into the document
openNewSessiontruenavigate the UI to the new session after it is created

Turning the switch on does not make anything run by itself — it only decides whether your click is allowed.

UI

  • The session … menu row and a sidebar panel icon.
  • Both are registered through the official slot registry. The client half has no DOM-mutation observer, no manual container manipulation, no layout measurement, no timers — enforced by tests/client-safety.test.mjs, which fails if any of those reappear. (A sibling plugin's menu fallback once created an insert/re-render loop that locked the renderer main thread when the model menu opened; this plugin is shaped so that bug cannot be reproduced here.)

Known limits

  • The handoff covers what is durable in the session log. Work that only lives in your head is not in it.
  • agents.create is a host API; on a host without it, the plugin reports the reason instead of pretending to succeed.
  • The new session inherits the cwd and the source session as parentSession, not the full parent history.

License

MIT

Comments

Loading…

Similar plugins

dsh-session-handoff

by MountBatten718

Hand your long DSH session over to a fresh one: /handoff summarizes the recent conversation with an LLM, creates a clean new session in the same workspace, injects the summary as its first message, and auto-opens it. The origin session is unchanged.

Terminal & ClientsSessions & MessagesManifest valid

★ 3

MIT

JavaScript

Oct 20, 2026

dsh plugin --profile web add dsh-session-handoff

by WeiYe6

Hand your long DSH session over to a clean one: /handoff summarizes the conversation with an LLM, creates a new session+agent in the same workspace, injects the handoff document, and auto-opens it.

UI & ExperienceManifest valid

★ 6

MIT

JavaScript

Aug 28, 2026

dsh plugin --profile web add dsh-session-handoff

Hand off focused context without waiting for or interrupting the active Agent: freeze a bounded Session snapshot, summarize it asynchronously with an isolated no-tool LLM, and deliver a provenance-bea

Terminal & ClientsSessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-sideband

Session handoff for DeepSeek Harness: the session menu creates a successor session that rebuilds the old session's memory, tasks and rules through an eight-section takeover packet, with light context

Sessions & MessagesManifest valid

★ 0

dsh plugin --profile web add dsh-session-handoff

by qingyou002

DSH plugin: hands a long session over to a fresh session in the same workspace on /handoff or at a token threshold, carrying the preset, model, permissions and plan mode across; the brief is written by the session's own model and the switch waits for a step boundary instead of interrupting running work.

Sessions & MessagesManifest valid

★ 0

MIT

TypeScript

Sep 28, 2026

dsh plugin --profile web add dsh-auto-handoff

改完东西必须重启?它替你重启,再把对话接回原来的会话 —— Restart the DSH desktop host when a change requires it, then hand the conversation back to the same session.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

dsh plugin --profile web add @saolence/dsh-restart-handoff