mrzhangkris/dsh-session-pruner ↗★ 1
dsh-session-pruner
会话生命周期管理:one-shot 完成归档/删除、可续与主会话闲置归档、容量保底、连带清理 projcache——全类型生命周期管理。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:mrzhangkris/dsh-session-pruner说明文档
阅读完整 README ↗Configuration (settings panel, hot reload)
After install, open Settings → Plugins → 会话生命周期管理 card. All 8 options save with hot reload (no restart):
| Field | Default | Description |
|---|---|---|
| Scan interval (min) | 3 | cleanup loop period |
| Capacity cap (sessions) | 400 | recycle by priority + oldest when exceeded |
| UI refresh interval (s) | 30 | GUI session list refresh period |
| Archive retention (hours) | 24 | physical delete after retention |
| Archive mode | archive | archive (recoverable) / delete directly (irreversible) |
| Continuable idle archive (days) | 0 | archive after N idle days, 0 = off |
| Main idle archive (days) | 0 | archive after N idle days, 0 = off |
| Clean main on overflow | off | main participates in capacity recycling |
Env vars (fallback, panel wins): DSH_SESSION_LIFECYCLE_INTERVAL_MS / _MAX / _CLEAN_MAIN / _ARCHIVE_HOURS / _ARCHIVE_MODE / _CONTINUABLE_IDLE_DAYS / _MAIN_IDLE_DAYS.