OpenViking
volcengine
Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Siom126/dsh-plugin-storage-inspector
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Storage analyzer & read-only cross-project dependency governance for DeepSeek Harness (DSH).
A single settings section with two tabs — Storage and Dependency governance — plus a disk-usage badge on the sidebar.
package.json, fingerprints each project's Node major (.nvmrc > .node-version > engines.node), reads npm lockfiles (v2/v3) and builds a cross-project drift matrix — identical, drift-minor, drift-major, bucket-conflict — reported as blocked / warn / candidate / info findings. This half never writes: no project file is modified, no private CAS, no symlinks.No model-facing tools and no outbound network calls: the host half only registers local routes under /api/storage-inspector/*.
dsh plugin add github:Siom126/dsh-plugin-storage-inspector
The repository declares a dsh.bundle manifest (cordis.patch.yml mounts storage-inspector), so the one command above is enough. Restart DSH or refresh the page; the panel appears under 设置 → 存储空间分析 and as a sidebar icon.
本地开发 / Local development (link a working copy instead of the GitHub source):
// ~/.dsh/profiles/<profile>/package.json
{
"dependencies": {
"dsh-plugin-storage-inspector": "link:/absolute/path/to/dsh-plugin-storage-inspector"
},
"dsh": {
"profile": { "bundles": ["...", "dsh-plugin-storage-inspector"] }
}
}
then make ~/.dsh/profiles/<profile>/node_modules/dsh-plugin-storage-inspector point at the same directory (a symlink is enough) and restart DSH.
| 能力 | 是否写磁盘 |
|---|---|
| 存储统计、文件分类、大文件排行、会话体积 | 否,只 stat / 遍历 |
| 依赖治理(项目发现、环境指纹、锁文件解析、漂移矩阵) | 否,全程只读 |
清理(POST /api/storage-inspector/cleanup/execute) |
是,fs.rm -rf 白名单内的目标 |
清理是显式动作:先 GET /api/storage-inspector/cleanup/targets 拿到分组目标,用户勾选后才会提交删除。每个目标在删除前都要通过 lib/cleaner.js 的 isPathSafeToClean():
/、~、~/Desktop、~/Documents、~/Downloads、~/Library、~/.dsh、~/.dsh/profiles 等关键路径一律拒绝;dist、build、.next、node_modules、venv、vendor、target 等);~/.dsh/sessions 与 ~/.dsh/storages/session_projcache/sessions 之下。*.jsonl.zstd)体积、投影缓存 session_projcache 体积与创建更新时间。Code(.ts/.js/.py/.go/.rs/.vue/.html/.css …)、Dependencies(node_modules/venv/vendor/target)、Build(dist/build/.next/.output)、VCS & Metadata(.git/.agent-teams/.vscode)、Docs & Configs(.md/.json/.yaml/.pdf/.docx)、Media & Assets(图片、视频、音频、压缩包)。~/.dsh/attachments),以及各数据类别占比色块。settings.section),同时可从侧栏图标全屏打开;随 DSH 深色/浅色主题切换。Layer 1 项目发现(受管目录遍历、深度 ≤ 4、黑名单跳过、realpath 去重)→ Layer 2 环境指纹(.nvmrc > .node-version > engines.node,置信度 exact/multi/missing)→ Layer 3 依赖事实(解析 package-lock.json v2/v3 的精确版本;pnpm/yarn 等未受管锁文件保守跳过,不臆测)→ Layer 4 只读分析(分桶冲突、主版本漂移、兄弟模板克隆)。identical / drift-minor / drift-major / bucket-conflict。blocked(跨 Node 分桶冲突)、warn(主版本断层)、candidate(次版本漂移/克隆)、info,每条发现带证据链与收敛建议。dsh-plugin-storage-inspector/
├── package.json # dsh.bundle manifest + client 声明
├── cordis.patch.yml # Cordis loader 挂载补丁
├── index.js # 宿主入口:注册 WebServer 前缀路由 + connection.fetch
├── client.js # 客户端:settings.section、侧栏徽标、双 Tab 面板
├── lib/
│ ├── project-discovery.js # Layer 1 项目发现
│ ├── runtime-fingerprint.js # Layer 2 Node 环境指纹与分桶
│ ├── lockfile.js # Layer 3 锁文件事实提取(npm v2/v3)
│ ├── governance-analyzer.js # Layer 4 漂移矩阵与治理发现
│ ├── governance-store.js # 单飞锁 + TTL 缓存
│ ├── scanner.js # 物理目录递归扫描与文件分类
│ ├── workspace-store.js # 工作区/会话体积聚合
│ ├── cleaner.js # 清理目标扫描、路径白名单校验与执行
│ └── api-handler.js # HTTP 路由(存储 + 清理 + 依赖治理)
├── tests/ # node --test:governance / cleaner / system-disk
└── docs/ # 依赖治理规范与发布计划
GET /api/storage-inspector/data · GET|POST /api/storage-inspector/refresh · GET /api/storage-inspector/workspace · GET /api/storage-inspector/disk · GET /api/storage-inspector/cleanup/targets · POST /api/storage-inspector/cleanup/execute · GET /api/storage-inspector/deps/overview · GET /api/storage-inspector/deps/project · POST /api/storage-inspector/deps/refresh
npm test # node --test tests/**/*.test.mjs — 28 passing
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: storage-analyzer。