Releases: Byggarepop/TokenSaver
Releases · Byggarepop/TokenSaver
v1.15.2
Fixed
- Tool descriptions and the runtime low-saving nudge no longer reference tools removed in
the 3-tool strip.MinifyFile,OutlineCSharpFile, and the nudge pointed the model at
focus_method, andTraceDiRegistrationsreferencedtrace_implementors— none of which
are registered tools, so a model following that guidance reached for a tool that doesn't
exist and fell back to reading the whole file. They now point atoutline_c_sharp_file
plus a narrowRead.OutlineCSharpFileandMinifyFilealso lead with an imperative
trigger ("call this first before reading a C#/VB file over ~50 lines") so the host model
reaches for them earlier. Descriptions only — no behaviour change (#103).
v1.15.1
Fixed
OutlineCSharpFileon.razorfiles now reports correct// L..line ranges.
The Razor preprocessor previously rebuilt the@code/@functionsC# into a fresh
synthetic class, so every member's line number was offset by however far the@code
block sat in the file — a narrowReadof a printed range landed on the wrong lines.
Extraction is now line-aligned: each extracted line keeps its original position, so
the ranges map straight back to the real.razorfile. (Surfaced once the warm-start
flow — outline then Read the line-range — became the primary path.)
v1.15.0
Changed — stripped to a warm-start tool set
- Reduced the advertised MCP surface from 11 tools to 3:
OutlineCSharpFile
(structural warm start),MinifyFile(whole-file, all languages), and
TraceDiRegistrations(DI wiring — the one discovery grep can't do cleanly).
The focus/trace family (FocusMethod,FocusMultipleMethods,
FocusMethodsAcrossFiles,FocusType,FocusCallers,TraceCallers,
TraceImplementors,MapProject) is no longer registered as an MCP tool (#99). - Fixed per-session overhead dropped 4,134 → 1,415 tokens (−66%):
ServerInstructionsrewritten for the 3-tool set, 8 tool schemas removed, and a
legacy duplicatefocus_methodregistration (FocusedEmissionTool) deleted.
Rationale: a controlled A/B (outline-only vs full toolset vs no-MCP) showed the
focus/trace tools added no measured token value on scoped tasks; the durable win
is a cheap structural warm start, after whichGrep+ a narrowReadof the
outline's line-ranges does the rest. On a real cheaper-model task this flips the
session ledger from net-negative to net-positive. - Removed the Markdown emitter.
Documentation
- Reframed the README, NuGet readme, viewer pages,
llms.txt, and registry
description around the warm start: it curbs wasteful reading, with the biggest win
on smaller/cheaper models (~8%) and large files. Dropped the "30–95% for everyone"
framing — the win scales inversely with model capability (~1% top-tier, ~5–7%
mid-tier, ~8% cheaper).
v1.14.1
Improvements
- Fixed MCP context overhead trimmed:
ServerInstructionscompacted from 2,207 to 1,583 tokens with no rule removed — selection rules now precede the supported-types table so clients that truncate long instructions keep the behavior-critical part — and emitter result banners collapsed from 2–5 lines to a single line, with a shortersession:header line (#94)
Fixes
v1.14.0
New Tools
trace_di_registrations— discover everyAdd/TryAdd/AddKeyedregistration for a type across the project; detects generic,typeof(), and factory-lambda forms (#86)map_project— project-wide type-to-file map with kind and base list; opt-in viaTOKENSAVER_ENABLE_MAP_PROJECT=1(#87, #89)
Improvements
- Agentic-mode optimizations: parse cache avoids re-parsing the same syntax tree across consecutive tool calls (#87)
trace_di_registrationsnow recognizesTryAddKeyed*registrations (#88)docs/tools.jsonis now the single source of truth for tool metadata; README and viewer tool grid are generated from it (#90)
Fixes
- Removed duplicate tool cards in Capabilities.razor that caused a build failure (#91)
Other
- Added MIT License
- Startup log lines now show both UTC and local time (#85)
v1.13.7
Fixed
- Telemetry uploads are now idempotent, ending duplicate dashboard rows.
The durable startup resend re-POSTs every pending row, and a client can spawn
several MCP server processes at once, so the same logical event could be
POSTed more than once — the payload carried no identifier and the dashboard
inserted every POST as a new row. Each recorded event now carries a stable
EventId(GUID) that is sent with the upload; the dashboard dedupes on it via
a unique index plus an idempotent insert, so a re-send collapses to a no-op.
Older clients that send noEventId, and older dashboards that ignore the
field, keep working unchanged.
v1.13.6
Added
- Telemetry uploads are now durable. The dashboard upload was fire-and-forget
with no retry and an ignored HTTP status, so a transient failure or a process exit
mid-flight silently dropped a row that was recorded locally. Eachreport.jsonrow
now carries an upload-tracking flag: a confirmed2xx— or a permanent4xx
rejection that retrying can't fix — settles the row, while a transient failure
(5xx/429/ network) leaves it pending. On startup the server resends any
still-pending row. Rows written before this change are left untouched (never
resent), so there is no mass re-upload of history. Rows the dashboard would
reject — chiefly an honest negative saving where a focused view costs more than
the bare relevant-code baseline (TokensWithTool > TokensWithoutTool) — are
skipped client-side and settled locally rather than sent for a guaranteed 400.
Fixed
- NOT FOUND rows no longer log a bogus 0% saving. A focus miss returns a
small members outline (plus the partial/inherited hint), not the whole file,
yet telemetry loggedwhole-file → whole-file(0% saved). It now logs
whole-file → actual response, crediting the real saving versus the model
reading the whole file to discover the member isn't there. Applies to the
NOT FOUND paths offocus_method,focus_multiple_methods,focus_type,
andfocus_callers.
v1.13.5
Added
- Focus misses now hint where to look. When
focus_methodor
focus_multiple_methodsreturns NOT FOUND and the file's type ispartial,
the response notes the member may be in a sibling file in the same
namespace/folder; when the type has a base list, it notes the member may be
inherited and points at the base type's file. Turns a bare NOT FOUND into an
actionable next step instead of a dead end.
v1.13.4
Fixed
- Cache hits no longer overstate savings against the whole-file baseline. A
cached re-serve logged the raw whole-file token count as its baseline (e.g.
8,201 → 246, 97%) while the original call recorded the conservative
relevant-code baseline (303 → 246, 19%) — re-crediting a whole-file saving the
session ledger and in-chat header never re-credit, and inflating the
dashboard's aggregate totals on every repeat view. The cache now stores the
same conservative baseline the first call logged, so a cache-hit row is
identical to the original. Applies tofocus_method,focus_multiple_methods,
focus_type, andfocus_callers.
Changed
- Cache-hit telemetry rows are tagged with the originating tool. A re-served
result logged a bareCachetool name, hiding which tool produced it; rows are
now labelled<tool> Cache(e.g.Focused Emitter (multi) Cache).
v1.13.3
Added
- Reports now record the TokenSaver version that produced them. Each
uploaded report carries anMcpVersionfield resolved from the running
build, so the dashboard can attribute savings to a specific release and tell
old clients from new ones. The viewer stores it in a new nullable column and
surfaces it in the admin log. Existing databases are migrated in place by a
guardedALTER TABLE ... ADD COLUMNon startup — additive and idempotent, so
rows ingested before this field keep a null version and no data is touched.
Changed
- Session savings are honest about repeat views of the same file. The
session ledger added each call's whole-file baseline every time, so viewing
one file several ways (a different method, or outline-then-minify) credited the
whole-file saving once per view — inflating a real ~50% into an apparent ~90%.
The ledger now tracks which sources have already been counted and adds the
whole-file baseline only on first sighting; later distinct views add only their
own output. Repeat views drop the "% saved" headline and state the baseline was
already counted, so per-call lines can no longer be summed into an overstated
total. (Identical repeat calls were already served from cache without touching
the ledger.)
Fixed
- A comma-containing
focus_methodname now auto-routes to
focus_multiple_methods. Passing"A,B"asmethodNamewas treated as a
single missing method, dumping the whole outline as a "not found" reply; it is
now split and routed to the multi-method tool.