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. 适合需要防止大内存占用、拦截超限工具调用并自动压缩清理历史日志的系统管理员。

パッケージ
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

ドキュメント

README 全文を読む ↗

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