Skip to content

v0.22.0 — Session-scoped dedup (TP-69m)

Choose a tag to compare

@Shahinyanm Shahinyanm released this 18 Apr 08:54

Added

Session-scoped dedup (TP-69m) — four mechanics, one release.

The ContextRegistry (remembers "this file is already in your context") used to die with the MCP server process. After /clear, compaction, or any fresh server instance, the agent would re-read everything from scratch. Now it's per-session and disk-backed.

  1. ContextRegistry.toSnapshot() / loadSnapshot() — JSON round-trip, silent on corruption.
  2. SessionRegistryManager — LRU cap of live registries (default 8), disk-backed at .token-pilot/context-registries/<id>.json, rejects unsafe session ids (traversal/slashes) into ephemeral in-memory copies.
  3. smart_read, read_symbol, read_range, smart_read_many now pick their registry per tool call via pickRegistry(args). Flushes after every successful dedup-aware call; flushAll on shutdown.
  4. force: true escape hatch on the four dedup tools — mandatory because a pointer to a compacted-out turn would otherwise be an un-escapable pit.

Schema additions (optional): session_id: string, force: boolean. Backwards-compatible — callers that don't pass either get the legacy process-scoped dedup.

Numbers

879 tests green, tsc --noEmit clean.

Full changelog in CHANGELOG.md.