dsh-two-stage-promotion
v0.1.0
Published
二阶段晋升模式 agent preset for the dsh web GUI: a two-phase promotion preset — phase 1 exposes the builtin Minimal exact two-tool surface (persistent bash plus str_replace_editor) with no runtime contexts or injected instructions (Minimal-aligned trajectory anc
Downloads
120
Readme
dsh-two-stage-promotion
二阶段晋升模式 —— dsh web GUI 的 agent preset 插件(host half),不带浏览器 half。
- 阶段一(锚定):首轮模型请求仅暴露官方 Minimal 精确双工具(持久
bash+str_replace_editor)、单行 persona、无运行时上下文、无注入指令,锚定 Minimal 推理轨迹; - 晋升:首块 Minimal 风格推理(含
we且无let me)或首个工具调用触发晋升,四步兜底;无工具首轮在响应后自动晋升; - 阶段二(完整):晋升后 wire 切换为 PTC Mode(单一
run_code,覆盖完整工具注册表),workspace 指令与 skill 目录延迟一步注入。
宿主启动时,插件把包内 presets/ 树同步到 ~/.dsh/.agent-presets,新会话的预设选择器中即可选「二阶段晋升模式」。
新旧 DSH 双版本兼容
preset 插件(presets/two-stage-promotion/tool-bootstrap.mjs)对 Session API 做特性检测:
const events = Array.isArray(session?.events)
? session.events // 旧版 DSH(< 0.1.2-rc.1)
: typeof session?.snapshotEvents === 'function'
? session.snapshotEvents() // 新版 DSH(>= 0.1.2-rc.1,含 0.1.2-rc.1)
: []engines.dsh 声明为 >=0.1.2-alpha.4,同时覆盖新旧两个 DSH 版本。
安装(本地 file: 依赖)
# profile 目录,例如 ~/.dsh/profiles/web
cd ~/.dsh/profiles/web
pnpm install
# 编辑 package.json:
# dependencies: { "dsh-two-stage-promotion": "file:<绝对或相对路径>" }
# dsh.profile.bundles: 加入 "dsh-two-stage-promotion"
pnpm install重启 dsh web 服务后生效。
注:pnpm v11 对
file:依赖创建的是符号链接——直接改本包源码, 重启 dsh web 即生效;只有改本包的package.json(依赖/版本)才需要回 profile 重新pnpm install。
结构
lib/index.js 宿主插件:启动时同步 presets/ → ~/.dsh/.agent-presets
presets/two-stage-promotion/ 预设本体(agent.cordis.yml + tool-bootstrap.mjs 等)
cordis.patch.yml profile bundle patch(插入宿主插件行)出处
派生自 @linxin666/dsh-liangshen(Apache-2.0),
后者又派生自xiaobright/dsh-anchored-standard(MIT)。 详见 NOTICE。
