Dsh Rewind
dpskh/dsh-rewind · skills
Fold everything since the last checkpoint mark into an auto-generated report, replacing it in context while keeping the full log.
★ 3GitHub stars
0Forks
2026-08-26Last updated
TypeScriptLanguage
MITLicense
Key features
- ctx.rewind.rewind(agent, signal) — read the session's latest mark through ctx.checkpoint
- select the surface span after it (never folding the rewind call itself, never splitting a tool-call/result pair at the trailing boundary)
- summarize the span over ctx.llm
- Failures write nothing — the region stays intact, the mark stays active, and the fold is retryable — and reject with a classified RewindError (NO_CHECKPOINT, EMPTY_REGION, UNBALANCED, FOLD_IN_PROGRESS, CHANGED, SHRINK).
- A per-session in-process lock rejects concurrent folds.
Requirements
- Shrink check is char-based — the report must be shorter than the folded region's model-visible text (measured in characters, not tokens)
- the yardstick counts every block the model reads: assistant/user text, reasoning, tool-call arguments, and tool outputs (recursively).
Install command
dsh plugin --profile web add github:dpskh/dsh-rewind