mili1360/dsh-history-fold
Folds the oldest part of a long session's visible history into one message backed by a lossless local archive, so every later request is smaller without discarding anything.
Every request re-sends the whole visible history, so a conversation hundreds of turns deep pays for all of it on every turn and gets slower while doing so. This plugin folds the oldest slice into a single message and, before committing the fold, writes every folded message to a local archive; the replacement tells the model exactly where to look, so read_session_history style recovery stays possible. It deliberately uses the same public surface-replacement mechanism as the shipped compactor instead of patching node_modules, which is what makes a DSH upgrade unlikely to break it, and the README notes it is non-summary and recoverable by design.
Install
dsh plugin add --profile web github:mili1360/dsh-history-foldThe github: line from the README; there is no npm package. The README's acceptance test is not 'the profile boots' but 'create a new session, send one message, then check $DSH_HOME/logs/history-fold.jsonl for a profile or idle/would-fold/folded line'.
Compatibility
Developed and tested against DSH 0.1.0-rc.7, which the README states is a customised build rather than a stock upstream release, and it also supports 0.2.0 (0.2.0-rc.2), which changed four things it depends on. It touches ctx.on, ctx.effect, ctx.tokenMeter, ctx.reflect, ctx.llm and the agent/pre-step event, so another version that registers services or names events differently may need changes. Inert by default: a fresh install reads nothing, writes nothing and logs nothing until configured.
Details
- Repo: mili1360/dsh-history-fold
- Category: Sessions & Messages
- Stars: 1
- Version: MIT; version not stated in the README
Alternatives
sluminositys/dsh-nested-followups · JinkaiLiu/dsh-autonomy · mayf3/dsh-session-doctor