mrzhangkris/dsh-session-pruner

mrzhangkris★ 1JavaScript最后同步: 2026-08-21

在 GitHub 打开

DSH 会话生命周期管理插件:one-shot 子代理自动清理 + 容量保底 + 连带清理 projcache,从源头杜绝缓存膨胀卡顿

README 摘要

dsh-session-pruner DSH session lifecycle management plugin — full-type session lifecycle management: one-shot subagents archived on completion, continuable subagents and main sessions archived when idle, a capacity cap, and projection-cache cleanup. Prevents session-library accumulation stalls at the source. Every session type has a defined destination: finished one-shot subagents are archived automatically, idle continuable subagents / main sessions are archived, and overflow is recycled by priority. Archive first (recoverable), delete after expiry — the GUI syncs within 30s, fully panel-configured with hot reload. 简体中文 · Apache-2.0 · npm Why DSH (DeepSeek Harness) caches a full projection of every session in session projcache.json (token stats, context pressure, ...), and the storage backend rewrites the whole file atomically on every write. When the session library accumulates thousands of subagent sessions: - The cache balloons past 100MB and each checkpoint fully re-serializes → main process CPU 250%+ - The single-threaded event loop is saturated → every session load stalls, even GET / times out Managing session lifecycle (this plugin) is the root fix: no session accumulation …

在 GitHub 查看完整 README →
工具/开发dsh-pluginagent

分类