dsh-asc
Agentic Surface Compaction (ASC) for DeepSeek Harness: the model decides when and what to compact, committed as durable session-log replacements with full replay, search, and degradation
AI 分析
通过智能压缩和确定性降级来主动管理上下文。适合长对话、高 Token 消耗,需要防止上下文溢出的用户。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:lmst2/dsh-ascドキュメント
README 全文を読む ↗Usage
After installing and restarting, no configuration is required — the plugin:
- injects the context-management discipline into the system prompt (judgment rules, tool usage, tiered compaction cadence), so the model actively manages context from the very first turn;
- injects nudge prompts on demand when context usage runs high (gated by real growth and cadence — no per-turn nagging);
- provides deterministic degradation (tool-result pruning + LLM summarization) on overflow or manual compaction, without requiring model cooperation.
The plugin provides five model tools:
| Tool | Purpose |
|---|---|
context_status | context usage, tiered checkpoints, system/dialogue composition, recommended ranges, recent surface nodes |
context_compress | replace a surface range with a checkpoint you write (batching supported; tool-call pairs auto-extended; quality gate) |
context_decompress | undo a compaction: the original text returns to the surface at the checkpoint's own position (tier-aware; full: true reaches raw content) |
context_recap | re-read checkpoint summaries without decompressing the originals |
context_search | full-text search over the whole log (including compacted content) |
Compacted content is never lost: the originals stay in the session log and can be decompressed or searched at any time.