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-auto-reviewer

v0.1.0

Published

DSH sandbox-permission auto-review gate: three-layer funnel, lightweight reviewer model, retry with human fallback.

Readme

dsh-auto-reviewer

中文 | English

沙箱权限自动审核门卫:在工具执行前自动拦截危险命令、放行安全操作,拿不准的交给你确认——审核由一个小型轻量模型完成,全程复用 DSH 已配置的供应商凭据,无需额外填 key。

它做什么

每次工具调用都会先经过三层判断:

工具调用
  → 1. 规则表(内置 + 你的策略文件)→ 明确放行 / 明确拦截
  → 2. 触发条件:沙箱提权(如 danger-full-access)必审、外发网络/远程操作、规则标记为可疑
  → 3. 轻量审核模型(默认 deepseek-v4-flash)→ 放行 / 拦截
  → 模型失败或超时(首试 + 3 次重试,1s/2s/4s 退避)→ 回退人工审批

配套机制:

  • 决策缓存:相同参数的调用 30 秒内复用结论,不重复消耗模型额度
  • 连续拒绝断路器:连续拦截 3 次后进入 10 分钟冷却期,期间可疑操作全部交给你人工决定
  • 可回退:只有灾难性结论(如写 C:\Windows\System32)才会直接拦截;模型的其他拒绝意见会降级为人工确认弹窗,你随时可以批准

你能看到什么

  • 绿色徽章(turn 末尾):本回合自动放行的调用,如「auto-review 放行 3」
  • 红色徽章:被拦截的调用;点「明细」展开每条决策的工具、风险等级与理由
  • 蓝色计数:发生过沙箱提权审批的调用,并标注是谁批准的(审核模型自动批准 / 你本人批准)
  • 人工审批:模型拿不准或失败的调用,走 DSH 原生审批弹窗,由你决定

安装

dsh plugin --profile web add dsh-auto-reviewer

dsh 自动完成安装与挂载,重启 DSH 生效。需要调整审核模型时,在 profile 的 patch 层覆盖:

# ~/.dsh/profiles/web/cordis.patch.yml
- id: auto-review
  config:
    provider: deepseek-official   # 审核模型供应商(复用 DSH 已配置的凭据)
    model: deepseek-v4-flash      # 审核模型

聚合安装(推荐):dsh plugin --profile web add dsh-pi-kit 全家桶,此插件随之一并挂载。

使用

全部配置都在 DSH 设置页(「设置 → 插件 → 插件配置」)即时修改、持久保存:

| 设置 | 说明 | |------|------| | 启用 | 总开关;关闭后完全退出,工具调用走 DSH 原生流程 | | 审核模型 | 供应商/模型下拉(来自 DSH 模型目录);未配置时审核请求直接回人工 | | 审核参数 | 单次超时、重试次数与间隔(1~10 次、每项 ≤180 秒)、输出上限 | | 策略文件 | 是否加载你的用户级/项目级 YAML 规则;可展开查看现行规则与装载状态 | | 缓存与断路器 | 缓存 TTL、冷却时长、连续拒绝上限(最小 2) | | 沙箱升级 | 审核通过时是否自动批准提权;关闭时提权始终由你确认(双保险) |

自定义策略文件(可选)

首次启动会自动生成带注释的模板 ~/.dsh/auto-review.yml(用户级);项目级为 <工作区>/.dsh/auto-review.yml。按 id 覆盖内置规则:

rules:
  - id: my.allow
    command: npm run lint
    decision: allow
  - id: my.deny
    command: git push
    decision: deny
    note: 推代码前先走人工
  - id: my.review
    pattern: curl\s+\S+\.sh
    decision: review
  - id: builtin.allow.ls
    disabled: true

规则四型:tool(工具名精确)/ command(命令前缀)/ path(路径前缀,支持 $workspaceRoot)/ pattern(正则)。多条命中取最严(deny > review > allow)。

开发者

pnpm install
pnpm -C packages/auto-review typecheck
pnpm -C packages/auto-review test
pnpm -C packages/auto-review build

本插件只监听 Host 的 tools/pre-execute 门卫事件,与提示音插件通过 DSH 审批缝机制联动(自动放行不打扰,回人工才响铃),二者代码零耦合。

License

MIT