Skip to main content

dsh-plugin-bridge

49Stars3Forks1Issues5Watchers

Add /bridge command to DeepSeek Harness WebUI for migrating existing sessions to another tool preset non-invasively while preserving the original session.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
context-migrationcordisdeepseek-harnessdshdsh-pluginpreset-migrationsession-migration

Install

cmdweb profile
$ dsh plugin --profile web add dsh-plugin-bridge

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin Totoro-qaq/dsh-plugin-bridge for me: review the repository at https://github.com/Totoro-qaq/dsh-plugin-bridge first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

plugin_id: dsh-plugin-bridge analyzer_model: deepseek-reasoner ai_summary: Adds a /bridge command to DeepSeek Harness WebUI that compresses ongoing conversations into a fixed five-paragraph summary and continues in a new session under a different tool preset, while preserving the original session in place.

One-Line Positioning

Adds a /bridge command to DeepSeek Harness WebUI: compresses an ongoing conversation into a fixed five-paragraph summary and starts a new session under a different tool preset to continue, while the original session remains untouched.

Core Capabilities

  • Enter /bridge in any conversation's input box to migrate that session to a different tool preset (minimal / standard / code, etc.), keeping the original session intact
  • Before migrating, preview a handover summary (target / current state / key decisions & agreements / key files / next steps), then execute with --go to confirm
  • Summary is written to a local temp file that can be directly edited, then run with --file to use the "edit then execute" path, avoiding back-and-forth with the model
  • Target session defaults to first restating understanding, then pausing for your confirmation; add --continue to merge restatement and next steps in the same request round
  • Existing vision analysis entries are copied verbatim into the summary without going through the summary worker rewriting; unresolved original images under rc.8 can be sent with the first round prompt to visual targets
  • Built-in /bridge --doctor self-check: directly lists which gateway methods are exposed by the current host, current mode, and active configuration

Technical Implementation

  • Language: TypeScript (Node.js, ESM)
  • Key Dependencies: @deepseek-ai/cordis (peer), @deepseek-ai/schemastery (config schema)
  • Architecture Pattern: Injects commands and apiProxy cordis services into the host process; command registration uses effect disposer, commands disappear with the fiber on unmount
  • Execution Engine: In-process ctx.apiProxy (not via HTTP, but CLI also goes through loopback HTTP using the same code path), entire migration chain stays within the process
  • Entry Files: src/index.ts (apply registers /bridge command) / src/command.ts (command dispatch: preview / migrate / doctor)

Use Cases

You're halfway through a conversation in "General" mode and realize you need to write code—the mode switch is locked (because different preset tool sets are incompatible, leaving ghost calls). Bridge is the exit: compress current progress into a summary, start a new session with the new preset to continue, original session stays in place. Not suitable for just starting a session (nothing to carry) or if you just want to switch models or adjust thinking intensity (that's already possible within the session).

Prerequisites & Compatibility

DependencyMin VersionDescription
DSH0.1.0-rc.6+rc.6 / rc.7 / rc.8 all verified interface by interface; rc.8 adds optional capability for persistent image attachment reading
Node.js≥ 22Repository CI covers Node 22 / 24
PlatformCross-platformNo native modules, no OS restrictions
Native ModulesNonePure Node standard library (fs / os / path)

Installation

dsh plugin --profile web add github:Totoro-qaq/dsh-plugin-bridge

Configuration Options

Works out of the box with defaults. When customization is needed, edit the dsh-plugin-bridge block in ~/.dsh/profiles/web/cordis.patch.yml, or set the corresponding environment variables.

ConfigTypeDescriptionDefault
modelTierflash / current / proModel tier for compression summary worker; pro has smaller failure variance, flash not recommended for migrating to minimalpro
sourceCharBudgetnumberTotal character budget for compression sourcing (~30K tokens input)60000
summaryCharBudgetnumberCharacter budget for handover summary body (~900 tokens)2400
goalRoundsnumberUpper limit for autonomous rounds with new session set as goal; upstream default 256 rounds runs empty automatically, Bridge forces a close1
injectgoal / prompt / bothSummary injection method: goal is a recoverable target, prompt is the first round prompt; both attaches bothboth
langzh / en / autoSummary output language; auto follows conversation contentauto
workerProviderstringForce specify the provider where compression model is located (for deployments that switched providers)""
workerModelstringForce specify the compression model name""
previewTimeoutMsnumberTimeout upper limit for /bridge <preset> waiting for compression worker180000 (3 minutes)

FAQ

Q: Do I need to restart dsh web after installation?

A: Yes, required. The plugin mounts when dsh web starts; if /bridge doesn't respond in the input box after installation, it's likely because you haven't restarted. After restart, both the commands service and apiProxy service will be in place, and the command will appear.

Q: Will it still work after upgrading DSH?

A: Run /bridge --doctor first. It will list which of the 13 gateway methods are available, current preset, and active configuration; if methods are missing, it will directly name that method, and you can post that line along with your DSH version to an issue. rc.6 / rc.7 / rc.8 all verified, main chain method table is completely consistent.

Q: How much does the new session "remember" after migration?

A: At pro tier, 8 runs yield 95% usability. The most common losses are numbers being completed to common values (ports rewritten to 3000/8080, etc.), so preview step should focus on scanning numbers and paths. fix-version 0.2.4 explicitly blocks "old value resurrection" as a keyword, achieving 100% key fact hit rate across 6 independent summaries + 12 target sessions.

Q: Why not just switch preset in the original session?

A: Upstream is hard-locked at the gateway layer, and correctly so: historical tool calls are only valid under the original tool set; switching presets midway leaves "ghost calls" that the new preset cannot execute, easily causing silent degradation. Bridge chooses to move rather than circumvent the lock. The new session is clean; after restating understanding, you confirm.

Q: How much does migration cost? Will it make normal sessions more expensive?

A: When just installed without migrating, it contributes 0 prompt tokens to normal sessions—/bridge is a host slash command, doesn't register skills or tools, command results don't enter model history. Compression worker实测约 1.6K input + 0.7K output; default confirmation mode additionally costs a confirmation round that only restates, --continue merges restatement and work in the same goal round. Token main cost remains subsequent agentic work.

Q: What if numbers or paths in the summary are wrong?

A: Preview automatically writes the summary to a temp file and prints the path. Open that file directly with an editor, fix the numbers or paths, save, then run /bridge code --go --file <path> to execute with the modified summary. The file is the single source of truth, more reliable than having the model "remember what you said you wanted to change."

Q: How to rollback if unsatisfied after migration?

A: The original session hasn't been touched at all; just click back to continue the original session; archive the new session. Bridge doesn't write to the original session or touch workspace files; the new session is "another session" started under the new preset.

Q: What's the relationship with TotoroPilot?

A: TotoroPilot is a GUI popup form that calls the same migration pipeline; this plugin itself can be used directly in the official WebUI with /bridge. Both use the same migrate.ts orchestration.

Getting Started Difficulty

Beginner — one command to install, restart once, type /bridge <preset> in the input box to use; default config covers the vast majority of scenarios, only need to adjust config when compression tier or multi-round goals need tweaking.

Known Issues & Limitations

  • After installation in official WebUI, currently requires one restart, and plugins are not allowed to automatically jump to new sessions; Bridge will print the new session's exact title and session ID in the result, manual switching required
  • Default DeepSeek text model still cannot read images; Bridge only preserves existing visual evidence, never secretly runs local small vision models; when rc.8 persistent attachments cannot be reused, degrades to "unresolved" prompt
  • Preview typically takes 20-60 seconds, protected by previewTimeoutMs (default 180 seconds) limit; timeout will cancel and fall back to already-produced text
  • Migration creates a new target session (occupies one workspace slot), not in-place replacement; environments with known workspace overflow should clean up first
  • If main chain methods are missing after upgrading DSH, migration will fail—run /bridge --doctor to locate
  • Release acceptance is small-sample, fix-driven (only 1 run per cell), should not be interpreted as overall accuracy guarantee

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/Totoro-qaq/dsh-plugin-bridge)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory