Skip to content

Releases: markelayan/billion-context-relief

v0.1.2 — agent-requested context export & delete for ACP

Choose a tag to compare

@markelayan markelayan released this 04 Oct 14:06

First public release of billion-context-relief: agent-requested context relief for DSH, as a companion to billion-context-dsh (ACP).

ACP lets an agent compress context into a summary. This plugin adds the two moves a summary can't do:

  • context_export: moves a range of completed context to a temp file without the model reading it, leaving a one-line pointer (path, span, tokens, note).
  • context_delete: drops a range entirely, leaving [DELETED REFERENCES · seqs a–b · N msgs · ~T tok · reason: …]. No summary, no file.
  • context_large_blocks: lists oversized messages, turns and ACP blocks (labels only, never content).
  • context_exports: lists and deletes export files by name (never opens them).
  • Advisor: an inform-only notice when usage is ≥ 40% and the set of large items changes, rate-limited.

Nothing is automated. Every export, delete and cleanup is an explicit agent call. This replaces the old local dsh-ctxdel plugin and its automatic deletion sweep.

Changes in this release (0.1.0 → 0.1.2)

  • 0.1.0: the four tools, the advisor, temp-dir export store (0700/0600, index.json metadata). Each replacement runs through ACP's own compress path, so results are normal ACP blocks (acp_status, search_context, decompress).
  • 0.1.1: fix: a range that starts on a tool result (or ends on a tool call) now includes the other half of the pair. ACP's resolver shrinks to a balanced remainder, so the first result used to be silently left in context.
  • 0.1.2: open-turn and protected-zone refusals now say why, instead of surfacing ACP's tool-pairing error.

Compatibility

Component Version Status
DSH 0.2.0-rc.2 ✅ compatible. Live-tested in a real DSH session.
DSH 0.1.x ❌ not supported
billion-context-dsh (ACP) github:Tyan66666/billion-context-dsh#2026-09-30_dsh-0.2-seam-port (0.2.26) ✅ tested
billion-context-dsh (ACP) npm 0.2.26 ⚠️ expected to work, not tested
Node.js >= 20 required

No runtime dependencies. billion-context-dsh is a required peer: it must be installed in the same profile and be the active compaction engine (in dsh.profile.bundles). Uses ACP's public exports makeTools, resolveSurfaceRange, shadowedSeqsOf, AlreadyCompressedRangeError and AcpCompactionEngine. Without ACP, every tool explains why it cannot act and changes nothing.

Live verification

Tested in a live DSH 0.2.0-rc.2 session:

  • 0.1.0: large-block scan, export and pointer, export list and delete, delete with the confirm gate, both blocks in acp_status, the marker found by search_context, refusals for a missing reason and for already-compressed ranges. About 25K tokens freed.
  • 0.1.1: a range starting on a tool result now takes in its call, for both export and delete.
  • 0.1.2: the refusal wording change is covered by unit tests; the live re-check is pending.

Install

# npm (https://www.npmjs.com/package/billion-context-relief)
dsh plugin --profile web add billion-context-relief
# or GitHub, pinned to this tag
dsh plugin --profile web add "billion-context-relief@github:markelayan/billion-context-relief#v0.1.2"

Reopen the sessions that should use it: a session's tool list is fixed when the session is composed.

⚠️ Warnings

  • context_delete is not undoable within the session. decompress can still read the originals from the session log, but the range stays replaced. Use context_export when unsure.
  • Exports contain raw conversation content, including anything sensitive a tool printed. They live in the OS temp dir (<tmpdir>/billion-context-relief/<session>/) and are never deleted automatically; only context_exports delete removes them, and the OS may purge its temp dir on its own schedule. Set exportRoot outside any repository if you change it.
  • Per-call minCompressRange: 0. Relief calls bypass ACP's 5,000-character minimum so single small rows can be removed. ACP's own config is untouched.
  • Protected zone. The last 5 messages, the last 5K tokens, the most recent user message and the current turn are never touched.
  • Reload after upgrading. Reload the plugin or restart DSH to load new code, then reopen sessions to get new tool schemas.

Full details: README · CHANGELOG