npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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