zeroed-07/dsh-memory-guard ↗★ 0

dsh-memory-guard

监控主机内存与会话日志,拦截超大参数并清理冷日志 适合需要防止大内存占用、拦截超限工具调用并自动压缩清理历史日志的系统管理员。

套件
dsh-memory-guard
相容性
待驗證
版本
0.1.2
授權
MIT
最近更新
2026年10月24日

同名套件的其他儲存庫

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zeroed-07/dsh-memory-guard

Configuration

Edit the config block in the installed cordis.patch.yml (or the bundle row in your profile composition), then restart DSH.

KeyDefaultMeaning
guardEnabledtrueSet false to disable rejection while keeping monitoring
guardExemptTools[]Tool names that bypass the size guard, e.g. ["write"]
maxToolArgBytes2097152 (2 MiB)Reject tool calls whose arguments estimate above this
noticeToolArgBytes524288 (512 KiB)Only record, do not alert
heapWarnRatio / heapCriticalRatio0.75 / 0.90Host heap yellow / red
sessionLogWarnBytes / sessionLogCriticalBytes50 MiB / 200 MiBPer-session log yellow / red
maxEventWarnBytes / maxEventCriticalBytes8 MiB / 32 MiBAlready-persisted event yellow / red
vacuumMinBytes10485760 (10 MiB)Do not consider smaller logs for vacuum
notifyCooldownMs300000Per session + code alert cooldown
sampleIntervalMs / scanIntervalMs3000 / 15000Heap sampling / session scan interval