dsh-btw
Manifest validAntigravity-style /btw side questions for DeepSeek Harness: a disposable forked child agent with full tools in its own right-Sidebar tab, zero main-context growth.
dsh-btw — 侧问(/btw)
给 DeepSeek Harness 加一条 Antigravity 风格的侧问命令:开发中途问一句,它自己会去查,答案不污染主干会话的模型上下文。
/btw 那个函数签名到底是什么?用到哪些参数?
答案出现在右侧边栏的「侧问」页签里;对话流里只留一行安静的小标记。侧问跑在一个临时 fork 子 agent 里:继承当前会话已完成的轮次,工具全开,有自己的工作目录和沙箱策略,答完就释放。
安装:npm 包 @aspen138/dsh-btw@0.1.1(npm · GitHub)。收录后也可在 DSH「发现」页搜 btw / 侧问 一键安装。

它到底是什么
| 普通 fork / branch | /btw(本插件) | |
|---|---|---|
| 生命周期 | 新会话持久化、侧边栏可见、可继续跑 | 一次性子 agent,答完释放执行句柄 |
| 工具 | 完整 agent | 完整 agent:工具全开 |
| 回写 | 分支里的事属于分支 | 结果只交给调用者(delivery: 'caller'),父会话收不到完成通知 |
| 并发 | 通常要切过去 | 主轮在跑时也能起(独立子会话) |
技术上它是 ctx.subagents.startActivation({ provider: 'fork' }):fork 种子是父会话已完成轮次的前缀(进行中的那一轮不进种子),子 agent 用父会话的 preset,因此工具集、权限、沙箱语义都跟主对话一致。父会话只多出 command/run + command/done 两条 log-only 事件(类型上没有 surfaceOp),deriveMessages() 与之后的每一次请求不变。
用法
| 输入 | 结果 |
|---|---|
/btw <问题> | 起一个子 agent 去查,右侧「侧问」页签自动打开并列出问答 |
/btw | 返回用法提示 |
右上角 ◈ 侧问 N 按钮 | 重新打开「侧问」页签——页签关掉/右栏收起后都能靠它找回来 |
点击对话流里的 ◈ 侧问 … | 打开这条侧问的子会话页签(工具调用都在这) |
| 「开始」页里的「侧问」卡片 | 打开「侧问」页签 |
右上角按钮只在本会话有过侧问时出现,数量就是条目数;没问过就不占地方。截图里它长这样:

页签里每条记录有状态(正在跑 / 已答 / 失败)和「复制问答」。记录来自当前会话的命令生命周期,换会话就是另一份列表。
上下文边界
- 进入:当前会话已完成的对话(含工具结果)、模型路由、工具集与 preset。
- 不进入:问题、答案、子会话里的任何内容。父会话的模型可见序列前后一致(实测摘要一致)。
- 代价:侧问是一次完整 agent 轮(可能多轮工具),比"一次模型调用"贵得多,也慢得多(实测读文件 12s、写文件 28s)。
权限(实测结论,和"弹审批"的预期不一致)
设计预期是「侧问里的写操作弹审批」。实测下来,DSH 对文件写入没有"先审批再写"这条路:写入由子会话的沙箱策略直接裁决。
| 子 agent 的权限包 | 写工作区内 | 写工作区外 |
|---|---|---|
read-only | sandbox: file access denied under read-only mode | 同左 |
workspace-write(当前默认) | 允许 | 沙箱直接拒绝(SetNamedSecurityInfoW … Win32 5),不弹审批 |
danger-full-access | 允许 | 允许,静默 |
子 agent 在 workspace-write 下想写工作区外时的原话:「本会话是受限 subagent,审批被自动拒绝,无法提权」。审批 UI 只服务 ask 决策(例如沙箱化 shell 的升权),文件写入不在此列。
所以现在给的保障是:侧问只能改当前工作区里的东西,碰不到工作区外;它做的每一步都能在它自己的页签里看到(工具调用、命令输出、最终答案)。
配置
在 profile 的 cordis.patch.yml 里按 id: dsh-btw 覆盖(整块 config 替换,想保留的要重写):
- id: dsh-btw
config:
maxQuestionChars: 8000 # 太长的问题直接拒绝
childProvider: fork # fork=继承上下文;spawn=空白起步
approvalPolicy: ask # 子 agent 的审批策略
sideAgentPreset: read-only # 子 agent 的权限包:read-only / workspace-write / danger-full-access / inherit
disposeChild: true # 答完释放执行句柄(子会话本身仍持久)
answerMaxChars: 12000 # 答案截断上限
provider: '' # 固定子 agent 模型;空=继承父会话
model: ''
已知限制
- 不流式:答案随命令结果一次性返回(子 agent 的工作过程在它自己的会话里)。
- 审批面缺失:见上。
- 子会话持久化:每次
/btw会在父会话下留一个continuable子会话(标签是问题前 48 字),可在子智能体视图里看到;执行句柄会释放,会话文件不自动删。 - 一次一个:同一会话上一个侧问未结束时,第二个被拒绝。
- 仅 Web/桌面客户端有这套 UI;headless / ACP / JSON-RPC 没有命令入口。
开发
dsh-btw/
index.js Host:/btw 命令 → fork 子 agent → 结果
client.js Client:右侧页签类型 + 页面 + 对话流 chip
cordis.patch.yml bundle patch(权限包默认值在这里)
locale/*.json 插件管理里的标题/描述
icon.svg 插件图标
docs/ 验收截图与报告
安装:npm 包 @aspen138/dsh-btw;本地开发时用 plugin_manager install_bundle 指向本目录(link: 安装不受 files 过滤)。Host 代码改动在下次 profile recomposition 生效,Client 代码改动下次页面加载生效(客户端模块 id 必须等于包名)。
调试句柄:window.__DSH_BTW__ 暴露 { tabs, right, lastError, open }。
Comments
Loading…
Similar plugins
by JasonQQ
Codex-style /btw command for DeepSeek Harness: side questions answered in a conversation-seeded subagent context, without polluting the main context
★ 3
JavaScript
Oct 1, 2026
dsh plugin --profile web add @jasonqq/dsh-btw-pluginby andrewhmir
Ephemeral /btw side questions for the DeepSeek Harness Web GUI.
★ 3
MIT
JavaScript
Oct 22, 2026
dsh plugin --profile web add @andrewhmir/dsh-btwby gulagala001
Context-aware side questions for DeepSeek Harness, with prompt cache reuse and a native composer popover.
★ 1
MIT
JavaScript
Nov 10, 2026
dsh plugin --profile web add @gulagala001/dsh-btwby 136155330
/btw side-question command for DeepSeek Harness (dsh) — ask a context-aware question, never touch the main conversation
★ 0
MIT
TypeScript
Aug 19, 2026
dsh plugin --profile web add dsh-btwby MichengAI
Adds /btw for one-off, context-aware side questions without tool execution, with independent answer bubbles that can be copied, collapsed, or closed without adding answers to the main conversation.
★ 66
↓ 10.3k/wk
Apache-2.0
TypeScript
Nov 18, 2026
dsh plugin --profile web add @michengai/dsh-btwby WLV-ZEDD
Interactive Side-Assistant Dock to ask quick side questions via /btw with real-time thinking status and history pagination without interrupting the active agent loop.
★ 2
↓ 75/wk
MIT
JavaScript
Nov 5, 2026
dsh plugin --profile web add @wlv-zedd/dsh-btw-plugin