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-approval-gate-safe

v0.2.3

Published

DeepSeek Harness 自动审批门控(兼容加固版):Flash 模型预判写/命令是否不可回补,安全自动批准、危险转人工(fail-safe),最小人工介入,听人工审查 UI。基于 dsh-approval-gate 0.5.2,修复 DSH 0.1.2-rc.1 API 兼容与插件路由鉴权;0.2.2 补齐 Windows/PowerShell 拒绝词表与路径处理、原子写与配置损坏备份、diff 复杂度、事件/审计日志轮转、CSRF 防线;0.2.3 修复并发丢失更新(审批串行化)、下游异常终态

Downloads

617

Readme

简体中文 | English

dsh-approval-gate

DeepSeek Harness 自动审批门控 —— 最小人工介入,安全自动放行、危险转人工(fail-safe)。

Flash 模型预判每次沙箱越界:常规操作自动放行,硬风险操作(删除 / 凭据 / 远程 / 系统 / 批量)永远转人工确认;学习沉淀只针对你确认过的操作,并提供界面化人工审查入口。

✨ 特性

  • Flash 风险预判:每次沙箱越界由 Flash 模型判定(SAFE / RISKY:<类别>),可回补操作自动放行
  • 🛡️ 硬风险永远人工:删除、凭据、远程/生产、系统路径、批量不可回补五类操作直接转人工,不计数、不学习
  • 🎯 确认制学习:同一操作确认 N-1 次后自动放行;沉淀规则携带操作指纹,只放行你确认过的操作
  • 🧠 语义同类验证:措辞变化但意图相同的操作,由 Flash 对照你的确认样本语义判断,不再依赖关键词
  • 🔧 配置热更新allowlist.json 修改即时生效,无需重启
  • 人工审查 UI:自动放行时输入框上方出现绿色提示;「审批」视图(轨迹右侧)展示当前会话完整放行时间线
  • 📄 文件改动对比与撤销(v0.5.0+):审批涉及的文件可点击查看 unified diff——变动行带上下 5 行上下文、多处修改按 hunk 分区并以「N unmodified lines」分隔条折叠、绿加红删灰上下文、双行号;一键「撤销此改动」投递指令让 AI 按快照恢复文件
  • 🗂️ 会话级快照管理(v0.5.0+):快照按事件归属会话,审批视图按当前会话统计;清理支持「仅清本会话」与「清空全部」两档,避免误删其他会话未查看的 diff 记录

📸 界面速览

① 审批视图

审批视图

「审批」标签页(轨迹右侧)按时间倒序展示当前会话的自动放行与人工审批记录:每条记录含工具名(bash / edit)、判定标签(「自动放行 · Flash 判定安全」「人工通过」等)、时间与操作说明。顶部统计栏显示本会话的 diff 快照占用2.9 KB · 3 条),并提供两个清理入口:「仅清本会话」(只删除当前会话的快照,不影响其他会话未查看的 diff)与 「清空全部」(二次确认后清空所有会话,防止误删)。

② 文件改动对比(diff)

diff 对话框

点击审批记录中的文件即可打开对比面板:以 unified diff 展示改动前后差异——新增行绿底(+)、删除行红底(-)、上下文行灰底;左侧显示原/新双行号;多处修改按 hunk 分区,块间以灰色「6 unmodified lines」分隔条折叠未变更区间。顶部统计 +2 / -2 行变更 · 20 行未变。底部 「撤销此改动」 一键向对话投递撤销指令,AI 将按审批前的快照恢复文件。

③ 设置 · 自动审批

设置-自动审批

设置页「自动审批」分区提供完整配置:初始化权限预设(一键写入 cordis.patch.ymlauto-approve 预设)、当前判定管道总览(DENY → 白名单 → denyRules → Flash → 学习)、危险词黑名单(预置条目 + 自定义添加)、以及热更新说明(修改即时生效,无需重启)。

🚀 快速开始

dsh plugin --profile web add dsh-approval-gate
  1. 配置权限预设:在 ~/.dsh/profiles/web/cordis.patch.yml 添加 auto-approve 预设(详见指南
  2. 重启 dsh web
  3. 选择预设:会话权限下拉选中「自动审批(Flash)」

📖 文档

📄 License

MIT