loster12520/dsh-btw 预览 preview

loster12520/dsh-btw

deepseek 集成版 BTW 插件

Project Overview项目介绍

dsh-btw is a native plugin built exclusively for DeepSeek Harness (DSH) that adds side question functionality that doesn’t pollute your main chat context. The recommended installation method is via the DSH CLI: you just run dsh plugin --profile web add git+https://github.com/loster12520/dsh-btw.git from any directory on your machine. This command works as a thin wrapper around pnpm, so you need to have pnpm installed and available in your system PATH before running the install command. After installation completes, you have to restart your dsh web process to load the plugin.

To use the plugin, you just type /btw followed by your question in DSH’s main input box and send it. The command will be handled by the plugin, will not trigger your main model, and will automatically open a centered modal panel to display the answer. If you just want to open the panel without asking a question immediately, you can send /btw with no arguments. Each main conversation in DSH gets its own isolated dsh-btw session, so questions from different chats never mix or interfere with each other.

This project is still a work in progress, with a version below v0.1.0, so its API, UI, and behavior are subject to breaking changes at any time. It is not recommended for production use, only for testing and personal use. The plugin restricts the side session to only read-only tools and web search, disabling all write tools to prevent unintended changes to your workspace. The source code is released under the permissive MIT license, and there’s an option to load it dynamically for development.

dsh-btw 是专为 DeepSeek Harness(DSH)开发的原生旁路问答插件,提供 /btw <问题> 斜杠命令与居中弹窗面板,可在独立会话分支中回答用户问题。该分支会同步主对话历史,但仅开放只读类工具与网页搜索权限,所有问答内容不会进入主对话上下文,不会占用主对话的 LLM 上下文 token,对齐了 Claude Code /btw 命令的语义并做了功能扩展。

用户可以在 DSH 的主输入框直接输入 /btw <你的问题> 发起旁路问答,也可以输入无参的 /btw 命令仅打开面板聚焦输入。每个主会话会独立维护 btw 分支、问答历史与同步状态,不同对话的旁路问答完全隔离。支持一键清空当前会话分支,适合用户在不干扰当前主对话流程的情况下,查询额外信息或是追问衍生问题。

该项目目前仍处于活跃开发阶段,版本低于 v0.1.0,API、UI 和功能都可能随时变动,请勿用于生产环境。推荐通过 DSH CLI 一键安装,需要本地已安装 pnpm 并将其加入 PATH 环境变量,安装后重启 dsh web 即可使用。代码开源遵循 MIT 许可证,支持动态安装调试供开发人员修改。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

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

CLI Install命令行安装

dsh plugin --profile web add git+https://github.com/loster12520/dsh-btw.git

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

READMEREADME

dsh-btw

⚠️ 仍在开发中(WIP)

本项目处于活跃开发阶段,尚未发布稳定版本(v0.1.0 以下)。API、命令行为、RPC 契约与 面板 UI 均可能随时变化;可能存在未修复的缺陷或未验证的边界情况。请勿用于生产环境, 升级前请阅读提交记录与 README 变更。欢迎提交 Issue 与 Pull Request 参与共建。

开发状态 版本 License

DSH 旁路问答插件:/btw <问题> 命令 + 居中弹窗面板。在独立会话分支中回答你的问题——分支可以查看主对话历史(创建时 seed + 每次提问注入增量),但只有只读 + web 搜索权限(write/edit/bash/pwsh/ssh_* 等写类工具全部下掉),问答内容不进入主对话上下文。对齐 Claude Code /btw 的旁路问答语义,并扩展了多轮对话、主对话增量同步、一键清空与每会话独立的居中弹窗面板。

功能

  • /btw <问题> 命令:输入框直接旁路提问,命令系统消化(log-only 记录),不触发主模型;自动打开居中 BTW 面板并展示回答。
  • /btw 无参命令:仅打开面板并聚焦输入框,不做其他事、不输出提示。
  • 居中弹窗面板:类似 antd Modal,半透明遮罩覆盖右侧内容区(排除左侧侧边栏);点击遮罩或 ✕ 关闭;多轮对话、问题/答案气泡、Ctrl+Shift+K 或「清空」按钮一键重置当前会话分支。
  • 无常驻入口:不再有会话标题栏 BTW 按钮,面板只能通过 /btw 命令打开。
  • 只读分支:分支通过 agents.create 创建为「裸 agent」,不注册进 subagent registry(GUI 不显示为子代理,不出现在子代理目录);工具白名单 read / glob / grep / read_image / web_search,其余全局工具(写文件、执行命令、SSH 等)全部不可见。
  • 查看主对话历史:分支创建时以主对话已完成 turn 为 seed;每次提问注入主对话增量(自上次同步水位之后的新消息),所以主对话的进展会持续同步到分支。
  • 每会话独立分支:每个主会话各自维护独立的 btw 分支、历史、同步水位与串行队列;不同对话的 btw 问答完全隔离、互不污染。
  • 统一问答历史:Host 维护 {id, role, text} 历史,面板轮询 btw/state 增量同步——命令路径的问答也会出现在面板,主对话命令卡片只显示一行提示。
  • 不污染主上下文:分支是独立 Session,主对话的 LLM 上下文不含任何 btw 问答。

安装与使用

方式一:dsh plugin 一键安装(推荐)

前置:本机已安装 dsh CLI(dsh plugin 是 pnpm 的薄转发器,需 pnpm 在 PATH 上)。

在任意目录执行(路径用你的本仓库路径,绝对/相对均可):

dsh plugin --profile web add <本仓库路径>

# 或从 GitHub 安装
dsh plugin --profile web add git+https://github.com/loster12520/dsh-btw.git

然后重启 dsh web(Host 半区改动需要重启;之后仅 Client 改动浏览器硬刷新即可)。

打包原理(对本仓库的配置说明):

  • dsh plugin --profile web add <路径> 等价于在 ~/.dsh/profiles/web 里执行 pnpm add <路径>, 随后按「已安装依赖的 package.json 是否声明 dsh.bundle.patch」自动把包加入 profile 的 bundle 层(dsh.profile.bundles),无需手动改任何配置。
  • 本仓库 package.json 的声明:
    • dsh.bundle.patch: "./cordis.patch.yml" —— bundle 层,挂载插件行 {id: dsh-btw, name: dsh-btw}(等价于在 profile 的 cordis.patch.yml 手写该行);
    • dsh.client: { platform: "web" } + exports["./client"](dist/client.js)—— Client 半区由 client-modules 扫描并注入浏览器;
    • main: src/host.js —— Host 半区,注册 /btw 命令与 /api/dsh-btw/* HTTP 路由(带浏览器信任围栏)。
  • 手动静态挂载(agent preset 插件行)同理可用:- id: dsh-btw / name: dsh-btw,详见 cordis.yml。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-perlica-ding 下一个 Next dsh-fs-encoding →