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-better-plan-reviewer

v1.0.0

Published

DSH web plugin: takes over the plan review card and adds an execution-model selector at its bottom — pick which model will carry out the plan; on approve the plugin switches the session model first, then answers the review so execution runs on the chosen

Readme

dsh-better-plan-reviewer

改装 DSH 的 plan 审查界面:把贴在底部的黄色审查卡片换成悬浮对话框(居中 + 遮罩),标题用蓝色,并在底部提供执行模型 + 思考强度选择;点「确认执行」时插件先切换模型、再批准计划,然后自动发送「开始执行」让计划用新模型跑起来。还提供「暂存计划」按钮,把计划存档到 项目/.dsh/plans/ 方便开新会话执行。

功能

  • 悬浮对话框:position:fixed 居中遮罩,不再贴着底部;标题条为蓝色(--dsw-static-deepseek-500),不再是黄色 warn 风格。
  • 执行模型选择器:卡片底部,样式复用 dsh-better-model-selector 的下拉样式(搜索 + 分组列表),默认当前会话模型。
  • 思考强度选择器:当前选中的模型公布推理等级(reasoning efforts)时显示滑动条(复用 dms 样式),切换模型时随模型默认等级重置。
  • 先切换后执行:点「确认执行」→ 若模型/强度有变化,先 await 模型切换 RPC(失败则不执行、显示错误)→ 再批准计划 → 自动发送一条「开始执行」消息继续对话(仅在有切换时发送)。
  • 暂存计划:把计划 markdown 写入 <会话 cwd>/.dsh/plans/plan-<日期时间>.md(走插件 host 半的 /plan-reviewer/save-plan 路由,带 Host 头信任围栏),成功后显示落盘路径。

原理

DSH 的 plan 审查走 conversation.composer 这个 chain slot:内置 @deepseek-ai/dsh-client-ui-user-questions 在优先级 0 注册 QuestionComposer,plan-review 意图的问题渲染成审查卡片。本插件以优先级 -1 注册到同一条链,select 只认领 plan-review 形状的请求(与内置收窄规则逐条一致),普通问题流程仍落回内置组件。

  • 模型/强度切换经 ctx.modelDirectories(@deepseek-ai/dsh-client-ui-model-selection 的会话级 ModelDirectory)读写,与 composer 模型选择器、/model 弹窗共享同一份状态。
  • 「开始执行」经 sessions.binding(sessionId).session.prompt([{type:'text',text}], 'queue') 发送,等价于用户在输入框提交。
  • 「暂存计划」经 fetch('/plan-reviewer/save-plan') 打到 host 半路由,host 侧用 ctx.sessions.get(id).header.cwd 取会话权威工作目录(不信任客户端路径),写入 <cwd>/.dsh/plans/。

安装

前置:DSH 已初始化 web profile(dsh web 能正常运行),Node.js ≥ 20。

⚠️ 依赖 DSH 的 next 通道:peerDependencies 指向 @deepseek-ai/* ^0.1.0-rc.6。若你的 DSH 走 latest(0.0.1-rc.x),可能缺少 modelDirectories 等服务。

npm 安装(推荐,自动挂载):

dsh plugin --profile web add dsh-better-plan-reviewer

装完重启 dsh + 硬刷新浏览器(Cmd/Ctrl+Shift+R)。若报 minimum release age(发布不足 24 小时),重跑一次即可。

从源码安装(开发):把本目录拷贝/软链到 ~/.dsh/profiles/web/node_modules/dsh-better-plan-reviewer,并在 ~/.dsh/profiles/web/cordis.patch.yml 追加:

- insert:
    - id: dsh-better-plan-reviewer
      name: dsh-better-plan-reviewer

然后重启 dsh web + 硬刷新。

⚠️ 本插件含 host 半(/plan-reviewer/save-plan 路由)。改 client 半后浏览器硬刷新即可;改 host 半后需要重启 dsh web。

结构

dsh-better-plan-reviewer/
├── package.json       # dsh.bundle.patch + dsh.client + exports["./client"]
├── cordis.patch.yml   # 自动挂载补丁(insert 条目)
├── lib/
│   ├── index.js       # host 半:/plan-reviewer/save-plan 路由(暂存计划)
│   └── client.js      # 浏览器半:悬浮审查卡片 + 模型/强度选择 + 先切换后执行 + 暂存
└── tests/
    └── smoke.mjs      # node 直跑测试(收窄 / 接线 / 注入面 / host 路由)

已知限制

  • 已寻址子代理(subagent)会话不提供模型选择,执行模型栏隐藏。
  • 下拉/滑动条样式是 dsh-better-model-selector 样式的内联副本(bpr- 前缀),不依赖该插件安装。
  • 「暂存计划」只写文件、不批准计划;文件名用 host 本地时间 plan-YYYYMMDD-HHmmss.md,同秒冲突自动加 -2/-3 后缀。