JasonQQ/dsh-btw-plugin

Codex-style /btw command for DeepSeek Harness: side questions answered in a conversation-seeded subagent context, without polluting the main context

Project Overview项目介绍

A DSH plugin adding a Codex-style /btw command. Invoke /btw <question> to ask a side question in a sub-context seeded with the main conversation's completed turns; the answer returns as a command result card and never enters the main model history, keeping context clean. The child is launched via ctx.subagents.start("fork", …), with config keys provider (fork inherits parent context, spawn is fully standalone) and optional maxDepth. Caveat: /btw only works in profiles that mount both @deepseek-ai/dsh-commands and @deepseek-ai/dsh-subagent.

DSH 插件,提供 Codex 风格的 /btw 命令。用法:在会话中输入 /btw <问题>,即可在子上下文(注入主对话已完成回合)中回答旁支问题,结果以命令卡片形式返回,永不进入主模型历史。子代理通过 ctx.subagents.start("fork", …) 启动,配置项包括 providerfork 继承父上下文,spawn 完全独立)与 maxDepth。注意:/btw 仅在同时挂载 @deepseek-ai/dsh-commands@deepseek-ai/dsh-subagent 的 profile 中可用。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:JasonQQ/dsh-btw-plugin

JasonQQ/dsh-btw-plugin 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

@jasonqq/dsh-btw-plugin

A Codex-style /btw command for DeepSeek Harness.

/btw <question> answers a side question in a sub-context seeded with the main conversation, and shows the answer in the chat without ever adding it to the main conversation's model history. Ask "by the way…" questions freely — the main context stays clean.

How it works

  • The command is registered through @deepseek-ai/dsh-commands (the same registry that powers /compact, /goal, /plan).
  • The question is delegated through ctx.subagents.start("fork", …). The fork provider spawns a child agent seeded with the parent's completed turns, so the side question is answered with full knowledge of the main conversation.
  • The child's answer is returned as a plain command result. Command results are rendered by the UI adapter and never enter the model history — that is the "no pollution" guarantee.

Usage

In any session composer:

/btw <question>

The answer appears as a command result card. It does not become a message the main model sees, so you can reference it yourself without bloating the context.

Install

The plugin ships as a Cordis plugin and plugs into any profile that mounts @deepseek-ai/dsh-commands and @deepseek-ai/dsh-subagent (both are part of the shipped @deepseek-ai/dsh-base composition).

  1. Make the package resolvable from the profile, e.g. link it into the shared profile store:

    mkdir -p ~/.dsh/profiles/node_modules/@jasonqq
    ln -s "$PWD" ~/.dsh/profiles/node_modules/@jasonqq/dsh-btw-plugin
    
  2. Add it to the profile patch layer (~/.dsh/profiles/<profile>/cordis.patch.yml):

    - insert:
        - id: btw
          name: @jasonqq/dsh-btw-plugin
          config:
            provider: fork
    

    The profile patch is read at boot. In the desktop app, restart the app after editing it (the CLI dsh web runner hot-reloads its patches).

Configuration

Key Default Meaning
provider "fork" Subagent provider. fork seeds the child with the parent's completed turns (sees the main context); spawn starts a fully standalone child.
maxDepth (unset) Optional recursion-depth cap for the child; defaults to the harness default when omitted.

Development

npm test

The tests exercise the handler with a stubbed ctx.subagents seam — no live model or host is needed.

License

MIT

上一个 Prev dsh-profile-lab 下一个 Next orca-dsh-launcher