Repository navigation
v0.22.0 — Session-scoped dedup (TP-69m)
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.
ContextRegistry.toSnapshot()/loadSnapshot()— JSON round-trip, silent on corruption.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.smart_read,read_symbol,read_range,smart_read_manynow pick their registry per tool call viapickRegistry(args). Flushes after every successful dedup-aware call;flushAllon shutdown.force: trueescape 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.