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-code-review

v0.1.1

Published

代码审查模式 (Code Review Mode) agent preset for the dsh web GUI: a read-only code-review agent — reviews correctness, bugs, security, performance, style and test coverage, and outputs a structured review report with severity ranking and file/line locations. Th

Readme

dsh-code-review

DSH Web GUI 的代码审查模式 agent preset 插件(host-only:启动时同步预设 + 系统提示通告)。

新建会话的预设选择器出现「代码审查模式」:只读代码审查 Agent——审查正确性、缺陷、安全、 性能、规范与测试覆盖、设计坏味道,输出带严重程度分级与文件定位的结构化报告。

快速开始

npm 安装(已发布)

dsh plugin --profile web add dsh-code-review

本地源码安装(开发调试,需先构建)

cd packages/dsh-code-review
pnpm install
pnpm run build
# 挂载(在插件目录内运行,file:$PWD 自动展开为当前绝对路径;必须 file: 而非 link:):
dsh plugin --profile web add file:$PWD

安装后重启 dsh web 进程,新建会话的预设选择器出现「代码审查模式」即生效。

⚠️ 必须用 file: 而不是 link:link: 只建 junction、不安装本包依赖,运行时 import 解析不到依赖会让 dsh web 启动即崩溃。

能力

| 项目 | 说明 | | --- | --- | | 同步预设 | 启动时把 presets/code-review 同步到 ~/.dsh/.agent-presets/code-review(幂等;升级插件自动更新) | | 选择即用 | 新建会话选「代码审查模式」→ 只读代码审查 Agent | | 审查范围 | 正确性、缺陷、安全、性能、规范与测试覆盖、设计坏味道 | | 输出格式 | 严重程度分级(critical / high / medium / low / nit)+ 文件定位(路径 + 行号)+ 具体修复建议 | | 只读约束 | 默认只读:read/grep/glob 与只读 shell 命令;不修改文件、不运行变更命令、不提交(除非用户明确要求) | | 同步安全 | .dsh-code-review.sync 归属标记:用户手写的预设内容永不被覆盖;junction/符号链接不跟随;写入走临时目录原子替换 |

配置

无独立配置项。预设根目录按 DSH_HOME 解析(DSH_HOME 环境变量,默认 ~/.dsh)。

原理一句话

该模式是一个只读代码审查 Agent 预设:基于官方 Standard 预设的完整工具面 (shell / fs / 搜索 / 后台任务 / skills / goals / plan mode / 子代理 / web 搜索), 只把 persona 替换为代码审查 Agent;插件本体(host half)在启动时把 preset 文件同步进 ~/.dsh/.agent-presets,无需手工拷贝。详见 presets/code-review/agent.cordis.ymlsrc/sync.ts

文档

| 文档 | 内容 | | --- | --- | | presets/code-review/agent.cordis.yml | 预设本体(persona / 工具面声明) | | presets/code-review/NOTICE | 派生来源声明(Standard preset / dsh-liangshen) | | ../../docs/PACKAGE-TEMPLATE.md | 本仓库插件包统一规范 |

测试

node test/code-review-sync.test.js   # 预设校验 + 同步生命周期/归属/链接防护(9 条)

构建与检查:

pnpm install          # 首次 / 依赖变更后
pnpm run typecheck    # tsc --noEmit
pnpm run build        # node build.mjs:lib/index.js + lib/types
pnpm publish --dry-run  # 发布预演

pnpm 11 默认拦截依赖的构建脚本(esbuild 的 postinstall),已在 pnpm-workspace.yaml 配置 onlyBuiltDependencies: [esbuild]minimumReleaseAge: 0。lib/ 为构建产物:改 src 后必须 pnpm run build 再测。

版本与兼容

包名 dsh-code-review · Apache-2.0(同步机制派生自 @linxin666/dsh-liangshen,Apache-2.0; 预设改编自 DSH 内置 Standard preset,MIT,见 NOTICEpresets/code-review/NOTICE) · 目标 DSH 0.1.5-rc.2(隔离环境实测:标准链安装/卸载/启动挂载均通过)。

  • 0.1.1(当前):修复 critical——persona 配置键 textprefix(旧键让 dsh-persona Config 校验失败、整个插件树挂载抛错);同步重写为归属标记 + 源哈希(用户内容拒覆盖、 legacy 字节一致子集自动接管、二次修改拒绝并提示删标记强刷);junction 不跟随;临时目录 原子替换;移除 retire 死代码;校验器放宽裸包名误报并新增 persona 行 prefix 防回归规则; 通告文案 DSH_HOME 动态解析。
  • 0.1.0:初版(预设同步 + 系统提示通告)。

目录结构

packages/dsh-code-review/
├── package.json           # 包清单 + dsh.bundle.patch 声明
├── cordis.patch.yml       # bundle 插件行(insert code-review)
├── build.mjs              # esbuild 构建 host bundle + tsc 声明
├── presets/code-review/   # 预设(preset.yml + agent.cordis.yml + NOTICE)
├── src/
│   ├── index.ts           # 插件体:同步预设 + 系统提示通告
│   ├── sync.ts            # 幂等预设同步(派生自 @linxin666/dsh-liangshen)
│   ├── schema.ts          # agent.cordis.yml 结构校验(同上)
│   ├── dsh-home.ts        # DSH_HOME 解析(同上)
│   └── mount-once.ts      # 进程内单实例守卫(同上)
├── lib/                   # 构建产物(lib/index.js + lib/types)
├── LICENSE                # Apache-2.0
├── NOTICE                 # 派生来源声明
└── README.md