Commit Graph
4 Commits
Author SHA1 Message Date
Florian Schmidt 183247bab5 app: add the Avalonia desktop app
Opening the app shows the stats panel: per-provider limit bars with the
pace marker, delta, reset and projection, token totals, hourly and daily
charts, limit history with its pace line, model and project tables and
recent diagnostics (R4, D8). Pace popups stack at the bottom right
without taking focus (R5). The tray, settings, single-instance
activation, start with the OS and the Stream Deck install policy (D11)
are wired to the Core engine. Avalonia 12.1.4 and
CommunityToolkit.Mvvm 8.4.2 are the new packages D8 calls for.

Refs #1
2026-10-14 20:08:11 +02:00
Florian Schmidt cd1fd5a306 streamdeck: add the plugin, its installer and packaging
The plugin is a NativeAOT executable that speaks the Stream Deck SDK v2
WebSocket protocol itself, reads snapshot.json and draws each key as
SVG (D10). The installer finds Elgato Stream Deck or OpenDeck, stages
the shipped plugin beside the installed one, stops a running host,
swaps and rolls back on failure (D11). tools/publish.py publishes the
app, CLI and plugin for win-x64 or linux-x64 into one folder.

Refs #1
2026-10-14 20:08:11 +02:00
Florian Schmidt c2f97e9384 core: write only new history and share files on Windows
The store rewrote all of history.json, 19 MB here, on every 60 s
refresh. It now appends each refresh's changes to a journal and compacts
into monthly files and a state checkpoint at 8 MiB, so an idle refresh
writes only snapshot.json. Bucket updates are keyed, unchanged limit
samples are kept at most hourly, Codex replays are bounded by session
totals, and Claude dedupe keys expire after 60 days.

Readers of atomically replaced files allow delete sharing, and the
replace retries briefly, so the Stream Deck plugin reading snapshot.json
cannot make a refresh fail. Claude's <synthetic> entries are skipped,
and repeated diagnostics fold into one entry with a count.

Refs #1
2026-10-14 19:59:58 +02:00
Florian Schmidt 14223b05df core: add the solution, Core engine, CLI and tests
Core implements the CLI-only collectors for Claude and Codex (D2 to D4),
the history store (D5), the refresh engine (D6), pace and popup
decisions (D7, D8), the snapshot contract (D9) and the Stream Deck
installer contract (D11). finaltoken status runs one refresh and prints
the snapshot. The app and plugin projects are placeholders so the
solution file is complete before they are built in parallel.

Refs #1
2026-10-14 19:09:54 +02:00