DeepSHPlugins
dsh-disk-audit 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-disk-audit

生態與開發TypeScriptMIT

dsh 資料目錄磁碟佔用審計:總大小、按目錄拆分、最大檔案、超大檔案告警(會話日誌可達數百 MB)與清理建議——CLI + agent 可呼叫 disk_audit 工具,dsh-disk-audit/v1 報告,零執行時依賴、只讀。

2 Starszoahdev 更新時間 2026-08-18
訪問 GitHub 倉庫
dsh-disk-audit 專案預覽

專案介紹

中文

dsh 資料目錄磁碟佔用審計:總大小、按目錄拆分、最大檔案、超大檔案告警(會話日誌可達數百 MB)與清理建議——CLI + agent 可呼叫 disk_audit 工具,dsh-disk-audit/v1 報告,零執行時依賴、只讀。

English

Disk-usage audit for dsh data directories: total size, per-directory breakdown, largest files, oversized-file warnings (session logs can hit hundreds of MB) and cleanup suggestions — CLI plus an agent-callable disk_audit tool, dsh-disk-audit/v1 reports, zero runtime deps, read-only.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
zoahdev
倉庫
zoahdev/dsh-disk-audit
GitHub Stars
2
Forks
0
開發語言
TypeScript
許可證
MIT
最近推送
2026-08-18
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

57/ 100
維護活躍
84
文件與實用資訊
100
生態關注度
14
安裝便捷訊號
80
專案宣告訊號
100

README 含完整安裝與使用說明;關注度尚低(2)。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add github:zoahdev/dsh-disk-audit

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

dsh-disk-audit

npm

CI License: MIT dsh-plugin

Disk-usage audit for DeepSeek Harness (dsh) data directories: total size, per-directory breakdown, largest directories, oversized files and cleanup suggestions.

Session logs can grow to hundreds of megabytes (the ecosystem has even seen the ~512 MB stringify cap). This plugin tells you where the space went before it becomes a problem. Zero runtime dependencies, read-only.

Install

dsh plugin add dsh-disk-audit

Or run standalone:

npx dsh-disk-audit ~/.dsh

CLI

dsh-disk-audit [dir] [options]

  --json                   print the machine-readable dsh-disk-audit/v1 report
  --large-file <bytes>     warn threshold per file (default 104857600 = 100 MB)
  --skip-node-modules      do not descend into node_modules trees
  --help                   show this help

Exit codes: 0 clean, 1 warnings (oversized files / total above threshold), 2 usage/IO error.

npx dsh-disk-audit ~/.dsh
npx dsh-disk-audit ~/.dsh --json --large-file 52428800

In-harness usage (agent-callable)

Ask your dsh agent:

看看我的 dsh 数据目录占了多少磁盘,最大的文件是哪些。
Audit disk usage of my dsh data directory: disk_audit.

The tool returns a dsh-disk-audit/v1 report:

{
  "schema": "dsh-disk-audit/v1",
  "target": "~/.dsh",
  "ok": false,
  "totalBytes": 157286400,
  "totalFiles": 1842,
  "dirs": [ { "dir": "~/.dsh/sessions", "sizeBytes": 146800640, "files": 42 } ],
  "largestFiles": [ { "path": "~/.dsh/sessions/big.jsonl", "sizeBytes": 134217728 } ],
  "warnings": ["1 file(s) at or above 100 MB"],
  "suggestions": ["Export/compress the largest session logs before they hit the stringify cap"]
}

Why it exists

  • Session logs are append-only and can silently eat gigabytes; no other plugin reports disk usage by directory.
  • Catching a 500 MB session log before it hits the stringify cap is a lot cheaper than recovering after.
  • Zero runtime dependencies, read-only by construction — it never deletes or moves anything.

Development

pnpm install
pnpm typecheck
pnpm build
pnpm test
pnpm test:integration

CI runs the dsh-plugin-doctor preflight, unit tests, packed-artifact integration (real disk_audit invocation), and a fresh-profile dsh web boot smoke on Windows.

License

MIT © 2026 zoahdev


dsh-disk-audit(中文)

DeepSeek Harness(dsh)数据目录的磁盘占用审计:总大小、按目录拆分、最大目录、超大文件与清理建议。

会话日志是追加式的,能悄悄涨到几百 MB(社区甚至见过 ~512 MB 的 stringify 上限)。本插件在你遇到问题前先告诉你空间去哪了。零运行时依赖、只读。

安装

dsh plugin add dsh-disk-audit

独立使用:

npx dsh-disk-audit ~/.dsh

CLI

dsh-disk-audit [dir] [options]

  --json                   输出机器可读 dsh-disk-audit/v1 报告
  --large-file <bytes>     单文件告警阈值(默认 104857600 = 100 MB)
  --skip-node-modules      不进入 node_modules 树
  --help                   帮助

退出码:0 干净,1 有警告(超大文件 / 总量超阈值),2 用法/IO 错误。

npx dsh-disk-audit ~/.dsh
npx dsh-disk-audit ~/.dsh --json --large-file 52428800

在 harness 内使用(agent 可调用)

对 agent 说:

看看我的 dsh 数据目录占了多少磁盘,最大的文件是哪些。

工具返回 dsh-disk-audit/v1 报告(结构见英文版 JSON 示例)。

为什么需要它

  • 会话日志追加式增长,能悄悄吃掉几个 GB;没有其他插件按目录报告磁盘占用。
  • 在 500 MB 会话日志撞上 stringify 上限之前发现它,比事后恢复便宜得多。
  • 零运行时依赖、天然只读——永不删除或移动任何东西。

开发

pnpm install
pnpm typecheck
pnpm build
pnpm test
pnpm test:integration

CI 跑 dsh-plugin-doctor 预检、单元测试、打包集成(真实 disk_audit 调用)、Windows 全新 profile 的 dsh web 启动冒烟。

许可证

MIT © 2026 zoahdev

Related ecosystem tools

FAQ

  • How do I install? dsh plugin add dsh-disk-audit or run the CLI directly (see README).
  • Does it need an API key? No.
  • Is it read-only? Yes by default; any write/apply is an explicit flag.

Examples

See the README for full CLI usage. Quick start:

npx dsh-disk-audit --help

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案