zeroed-07/dsh-memory-guard ↗★ 0
dsh-memory-guard
Host memory and session-log guard for DeepSeek Harness: tracks heap and per-session log bytes, rejects oversized tool arguments, alerts on huge persisted payloads, and vacuum-shrinks bloated cold session logs. 适合需要防止大内存占用、拦截超限工具调用并自动压缩清理历史日志的系统管理员。
Other repositories with this package name
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zeroed-07/dsh-memory-guardREADME
Read the full README ↗Configuration
Edit the config block in the installed cordis.patch.yml (or the bundle row in
your profile composition), then restart DSH.
| Key | Default | Meaning |
|---|---|---|
guardEnabled | true | Set false to disable rejection while keeping monitoring |
guardExemptTools | [] | Tool names that bypass the size guard, e.g. ["write"] |
maxToolArgBytes | 2097152 (2 MiB) | Reject tool calls whose arguments estimate above this |
noticeToolArgBytes | 524288 (512 KiB) | Only record, do not alert |
heapWarnRatio / heapCriticalRatio | 0.75 / 0.90 | Host heap yellow / red |
sessionLogWarnBytes / sessionLogCriticalBytes | 50 MiB / 200 MiB | Per-session log yellow / red |
maxEventWarnBytes / maxEventCriticalBytes | 8 MiB / 32 MiB | Already-persisted event yellow / red |
vacuumMinBytes | 10485760 (10 MiB) | Do not consider smaller logs for vacuum |
notifyCooldownMs | 300000 | Per session + code alert cooldown |
sampleIntervalMs / scanIntervalMs | 3000 / 15000 | Heap sampling / session scan interval |