Repository navigation
Releases
v0.2.0 — /ask 模式:一轮只读问答
/ask 模式 0.2.0 —— 一轮只读问答
/ask <问题> 只回答这一个问题:只读、引用实读内容、不改动任何东西;模式随该轮结束自动释放,下一条不带 /ask 的消息就是普通干活。改动类工具由单调工具守卫真的拦下,而不是只靠提示词。
/ask <question> answers one question read-only — cited, no edits — and the mode ends with its turn, so the next message is ordinary work again. A monotonic tool guard enforces that instead of asking politely.
演示 / Demo
在 dsh-helper 工作台里的实录(1.6 倍速):/ask 问题 只读回答并拒绝写入,随后一条普通消息"执行"就真的创建了文件。
以 dsh-helper 工作台为家:多个 dsh 实例并排运行,每个实例独立的 profile 与插件。
安装 / Install
# 本地目录 / from a checkout
dsh plugin --profile web add link:/absolute/path/to/dsh-helper-plugin-command-ask
# 从 GitHub(可钉住本版本)/ from GitHub, pinned
dsh plugin --profile web add github:x102201/dsh-helper-plugin-command-ask#v0.2.0⚠️ 从 0.1.x 升级 / upgrading from 0.1.x
0.1.x 把模式写成了插件自有事件类型 ask/mode。仓库外插件不能扩充 harness 的事件词汇表,于是跑过 /ask 的会话在重启后会加载失败(unknown to this harness and not marked ignorable; refusing to interpret the log)。
0.2.0 不再写任何自有事件:模式改为从 /ask 的 command/run/command/done 记录与 turn/end 折叠得到,每次开关还会立即落盘。升级后请用附带脚本修复既有日志(默认干跑,--apply 才写,可选 --backup):
node scripts/repair-ask-mode-logs.mjs --sessions <DSH_HOME>/sessions
node scripts/repair-ask-mode-logs.mjs --sessions <DSH_HOME>/sessions --apply --backup <dir>0.1.x wrote a plugin-defined ask/mode event; an out-of-tree plugin cannot extend the harness vocabulary, so any session that had ever run /ask failed to load after a restart. 0.2.0 writes no vocabulary of its own and ships scripts/repair-ask-mode-logs.mjs to repair existing logs in place (marking the records ignorable, never removing them).
验证 / Verification
node --test: 82/82 通过 (unit + integration)- 实时验证:22/22,含两轮真实模型回合、守卫实际拦截、重启/恢复(含硬杀)
- 安装:
link:、github:/git 远端、打包 tarball 三种方式均实测,--dump-config与启动均通过
完整记录 / full transcripts: VERIFICATION.zh.md · VERIFICATION.md
变更 / Changes
/ask <问题>语义:从「常驻模式直到/ask off」改为逐轮(scope: turn默认;scope: session保留旧的常驻行为)- 新增
scope配置键;narrate/supersedePlanMode在逐轮下默认关闭 - 状态改为折叠 harness 已知事件(
command/run、command/done、turn/end),投影stateVersion: 2 - 每次开关调用
ctx.sessions.flush()立即落盘 - 新增
scripts/repair-ask-mode-logs.mjs、scripts/verify-live.mjs的词汇表断言
