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-disk-manager

v0.1.0

Published

C-drive planner for DeepSeek Harness: scan the whole C drive, classify every big item into A/B/C/D/E/P (safe cache / relocatable / junction-movable / abandoned software / config-memory redline / personal files), LLM fallback + human confirm, then delete/m

Readme

dsh-disk-manager · C盘空间规划整理大师

一个 DSH(DeepSeek Harness)Web UI 插件,把 C 盘占用分门别类,针对每类给出不同的正确动作(删缓存 / 引导改址 / junction 搬家 / 提示废弃 / 个人文件只提醒),而不是像传统清理工具那样只会删缓存。配置/记忆类(红线)永不自动执行。

定位

现有磁盘清理工具普遍只做一件事:删缓存。但你真正的问题往往是:

  1. 软件忘了删(很久没用的大软件还霸着 C 盘);
  2. 数据放错了盘(Docker 的 WSL、大缓存本来都可以搬到 D 盘);
  3. 缓存可再生但清一次就长回来。

C盘空间规划整理大师 是统筹型参谋:扫描整 C 盘 → 把每个大户分门别类 → 针对不同类别给不同动作 → 你点选确认后才执行。

扫描范围

整 C 盘(页面统一显示),对内扫:用户区 AppData(Local+Roaming) + 整个用户 profile(Downloads/Documents/Desktop 等) + Program Files;不扫 Windows(系统目录,扫了全是红线刷屏)。

六类模型(核心)

| 类别 | 含义 | 动作 | 风险 | |---|---|---|---| | A 无忧缓存 | Cache/GPUCache/Code Cache/Temp/log/*.updater | 删 或 junction 搬 | 无(可再生) | | B 官方可改址 | Docker/npm/pnpm/pip/浏览器 profile | 走官方设置改到别的盘 | 低(官方支持) | | C 可junction搬 | 剪映/Notion/Trae/Cursor 等纯可再生缓存 | junction 搬到别的盘 | 低(可再生) | | D 冷废弃软件 | 大体积 + 超过 N 天(默认180)没用 | 提示「你可能很久没用它了」 | 只提示 | | E 配置/记忆(红线) | Config/Storage/IndexedDB/MEMORY/.openviking/.qclaw | 只展示,绝不执行 | 高(绝不碰) | | P 个人文件 | Downloads/Documents/Desktop 等用户自己的数据 | 只提醒大文件,可手动搬,绝不自动删 | 高(用户数据) |

冷废弃(D)已修正误判:已装软件(Docker、Typora、NVIDIA 等)的安装目录只在安装当天写一次 mtime,之后天天运行也不会更新,旧逻辑会按"lastAccess 超 180 天"误判成废弃。现在扫描时会快照一次运行中进程 + 命中 Docker/WSL 等常用白名单 → 在跑/常用的软件永不进入「冷废弃」。

环境要求

  • Windows(扫描与执行依赖 PowerShell;junction/删除用系统原生能力)。
  • Node.js ≥ 22(DSH 运行时)。
  • DeepSeek Harness web profile(插件安装进 web 使用)。
  • 可选:DSH 自带 LLM(用于未知目录的 LLM 兜底分类)。

分类引擎:静态规则 + LLM 兜底 + 人工确认

不同电脑软件千差万别,不能靠死规则硬吃。分类引擎是三级:

  1. 静态规则库 core/riskmap.mjs —— 覆盖常见几十种软件/目录特征 + 扫描区(zone)判定,零成本、确定性。
  2. 本地分类缓存 —— 用户确认过一次的分类写入 ~/.dsh-disk-manager/classify-cache.json,下次同类直接命中,越用越聪明。
  3. LLM 兜底 —— 未命中的未知目录,打包特征(目录名/大小/子目录名)送 DSH 自带 LLM 判断类别,再让用户确认后才生效。

强红线:任何 config/storage/indexeddb/memory/database/.openviking/.qclaw 特征、以及所有点目录(.xxx),即使 LLM 判错,也会被回退为 E(只展示,不执行)。

架构速览

┌─────────────── client.js (Web 设置页, React.createElement 无构建) ───────────────┐
│  一句话总结 · 「开始扫描C盘」按钮 → connection.api.sessions.prompt("/disk_scan")   │
│  通用设置: 启用/目标盘/冷废弃天数/扫描范围 → settingsScope.set()                  │
└───────────────────────────────┬──────────────────────────────────────────────────┘
                                │ host 端工具 + 斜杠命令
┌───────────────────────────────▼──────────────────────────────────────────────────┐
│ index.mjs        工具注册(disk_scan/drives/preview/execute/classify/undo)        │
│                   + /disk_scan 命令(host 直跑,复用 runScan)                      │
│ config.mjs       配置(~/.dsh-disk-manager/config.json) + 分类缓存               │
│ core/                                                                           │
│   scanner.mjs    PowerShell 批量量体积 → {name,path,sizeMB,subdirs,lastAccess}   │
│   active.mjs     进程快照 + 常用白名单(修冷废弃误判)                             │
│   riskmap.mjs    静态规则库:目录名→A/B/C/D/E 特征映射                             │
│   classify.mjs   规则→缓存→LLM 三级分类                                          │
│   safety.mjs     红线判定 + dry-run + undo                                        │
│   executor.mjs   删/junction/改址执行                                             │
└──────────────────────────────────────────────────────────────────────────────────┘

安全防线

  • E 红线/程序本体/系统目录/点目录 永远只展示,无执行入口;
  • P 个人文件只提醒,绝不自动删(仅允许手动 junction 搬);
  • 执行前 disk_preview 生成 dry-run 预览;
  • 可生成 undo 日志(disk_undo 查看);
  • junction 迁移用原生 New-Item -ItemType Junction,已验证可回读。

工具(对话里驱动)

| 工具 | 作用 | |---|---| | disk_drives | 列出当前机器可用盘符(C/D/E...),供选择迁移目标盘 | | disk_scan | 扫描整 C 盘,量体积,按 A/B/C/D/E/P 分组返回报告 | | disk_preview | 对选中项 dry-run 预览(列出"将做什么") | | disk_execute | 真正执行(删/junction/引导改址);E/未分类不执行,P 不可删 | | disk_classify_confirm | 用户确认 LLM 判断的类别,写入本地缓存 | | disk_undo | 查看 undo 日志,便于回滚 | | /disk_scan | 斜杠命令:host 直跑扫描,不经模型;等价于 disk_scan,供设置页按钮调用 |

安装

dsh plugin --profile web add dsh-disk-manager

安装后重启 DSH。设置页出现「C盘空间规划整理大师」标签;点「开始扫描C盘」一键扫描,或在对话里直接运行 /disk_scan / 调用 disk_scan 工具。

配置文件

~/.dsh-disk-manager/config.json,首次使用需在设置页或工具里选好目标盘。参考 config.example.json。

目录结构

dsh-disk-manager/
├── package.json          # dsh.client.web 注入 + npm 元数据
├── index.mjs             # 主入口 + 工具注册 + /disk_scan 命令
├── client.js             # Web 设置页
├── config.mjs            # 用户配置 + 分类缓存读写
├── cordis.patch.yml
├── screenshots.json      # 注册表截图声明
├── assets/screenshots/   # 产品截图
└── core/
    ├── scanner.mjs       # 扫描引擎(PowerShell 后端)
    ├── active.mjs        # 进程在跑检测 + 常用软件白名单(修冷废弃误判)
    ├── riskmap.mjs       # 静态规则库(五类特征映射)
    ├── classify.mjs      # 分类引擎(规则→缓存→LLM)
    ├── safety.mjs        # 红线判定 + dry-run + undo
    └── executor.mjs      # 执行引擎(删/junction/改址)

开发

npm install
node dev-run.mjs      # 只读自测扫描+分类
node dev-tool.mjs     # 模拟 ctx 走通 apply + disk_scan

License

MIT