dsh-side-branch

uitested: passnpmMIT

Read-only side branch in the right sidebar: quote text to ask follow-ups without polluting the model context of the main session; every follow-up rebuilds the branch from the latest settled turns of the main session, and writes are refused at the tool-execution layer so the prompt prefix stays cache

下载量 / Downloads
1,217
依赖体积 / node_modules
1.15 MB
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

Install

dsh plugin --profile web add dsh-side-branch

Sandbox test results

StageResult
1 install✓
2 list✓
3 mount✓
4 boot—

Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).

README

Side Ask · DSH Side Branch

![npm version](https://www.npmjs.com/package/dsh-side-branch)

![npm downloads](https://www.npmjs.com/package/dsh-side-branch)

![License](LICENSE)

![DSH](https://github.com/deepseek-ai/deepseek-harness)

English | [简体中文](./docs/README.zh-CN.md)

Quote any passage in the main session and ask about it in a read-only branch in the right sidebar. The answer streams there — and never enters the main session's model context.

You know the moment: the agent is mid-refactor and you just want to ask "where else is this function used?" — without the main session remembering the question, and without re-processing a long, expensive context for a side query.

  • Ask about the current conversation without adding a token to it.
  • Point the branch at a cheaper model while the main session keeps the expensive one.
  • Let a long task keep running, and ask something unrelated on the side.
dsh plugin --profile web add dsh-side-branch
# then restart DSH — client plugins load at startup; refreshing the browser is not enough

--profile should be the profile you actually run (web, desktop, …). Requires Node.js ≥ 20 and pnpm on your PATH.

Written by the agent itself. Every line of code in this repository was written by DSH in a real session. The author's part was the workflow: setting the direction, reviewing the plans, and verifying the behaviour by hand. See [How this was built](#how-this-was-built).

<p align="center">

<img src="assets/panel-answering.png" alt="The branch streams its answer in the right sidebar" width="700">

</p>

What makes it different

The answer never comes back. The host never writes the branch's output into the parent session. What you ask in the branch stays in the branch — the main agent will not suddenly "know" what you discussed on the side.

It cannot touch your files. Read-only is enforced when a tool is called, not by hiding tools from the prompt. ctx.tools.guard() passes six side-effect-free tools (read, glob, grep, web_search, web_fetch, lsp) and refuses everything else. Because the tools stay in the prompt, the branch's prompt prefix is byte-identical to the main session's, so it keeps hitting the parent's prefix cache — measured 97%–98%, which is what makes a side question nearly free. Why it works this way, and what it costs, is in [docs/TECHNICAL.md](docs/TECHNICAL.md).

It follows the main session. Every follow-up rebuilds the branch from the main session's latest settled turns and replays the branch's own earlier questions and answers into it. A turn the main session just finished is already visible; something you asked three rounds ago is still remembered.

You can inspect what it was given. Expand Inherited from the main session to see, turn by turn, what the branch actually received — plus the preamble injected into its prompt, verbatim.

Install

# npm
dsh plugin --profile web add dsh-side-branch

# or straight from GitHub
dsh plugin --profile web add github:wucl12/dsh-side-branch

Use the profile you actually run (web, desktop, …). Then restart DSH — client plugins load at startup, and refreshing the browser is not enough.

Prerequisites: Node.js ≥ 20, and pnpm on your PATH (dsh plugin forwards to pnpm).

Also available from a marketplace — dsh-market and the awesome-dsh-plugin catalog both list it.

🤖 Prompt for AI agents: if you are the agent installing this plugin or reading its source, read [AGENTS.md](AGENTS.md) first — it carries the hard constraints, the architecture, and the installation guide.

How to use

1. Ask via selection: select text in the main session and click the pop-up Quote and ask. The branch opens in the right panel with the passage quoted. That passage is recorded with the round as a collapsible quote block, and the composer's quote slot clears itself so the next question starts clean.

2. Quick entry: the ↗ button to the right of the main session's input opens the panel directly (can be disabled in settings).

3. Independent settings: inside the panel you can give the current branch its own model and reasoning effort, without following the main session.

<p align="center">

<img src="assets/selection-entry.png" alt="Select text in the main session to open the branch" width="700">

</p>

<p align="center">

<img src="assets/sidebar-guide.png" alt="The Side Ask entry in the right sidebar guide" width="700">

</p>

Compatibility

DSH · Status

0.1.5-rc.2 · ✅ verified

0.1.7-rc.2 · ✅ verified (archive gate)

0.2.0-rc.2 · ✅ verified — loads, /side-branch routes register, panel exercised by hand

0.2.1-rc.3 · ✅ verified — loads, /side-branch routes register and answer (200 / 405 + Allow), and the served client bundle carries the scoped quote entry

The version-dependent seams (the archive gate, unarchiveSession) are feature-detected at runtime rather than compared by version number, which is why one published version serves all four. Details in [docs/TECHNICAL.md](docs/TECHNICAL.md).

The quote entry added in 0.2.2 needs the conversation-surface markers DSH renders around a session's body ([data-conversation-content], or [data-conversation-scroll] on older hosts). On a host that renders neither, the entry stays hidden rather than guessing — everything else in the plugin is unaffected.

Security & limitations

  • Read-only boundaries: "read-only" here means no system side effects (no writing files, no running commands). web_fetch / web_search still have network access,

…(truncated)

Rendered from the README published on npm. Formatted only, not edited.

Versions

Published on npm::3,最后更新 2026-10-25

Links

GitHub · Homepage · npm

Same category