v0.0.14 - Self Winding
tokenuse 0.0.14, named Self Winding, keeps Copilot AI-credit gauges fresh on their own, understands work and enterprise Copilot seats (including a second account side by side), replaces Copilot CLI estimates with exact per-request usage, and stops stale limit gauges from posing as current.
Highlights
- Copilot AI-credit limits refresh automatically every 15 minutes and on each manual reload once the explicit Config-page sync has created a sidecar; deleting the
limits/copilot*.jsonfiles opts back out. - Copilot quota sync is multi-account: it discovers every signed-in GitHub identity, writes one sidecar per account, routes GitHub Enterprise Cloud data-residency tenants (
*.ghe.com) to their regional endpoints, and shows side-by-side gauges labeled with each login. - Copilot Business and Enterprise seats display proper plan names, and Business seats whose payload hides per-seat credits show an "AI Credits · managed by your organization" row instead of an empty section.
- Copilot CLI usage is exact where the CLI records it: real per-request models, token counts, and cache read/write buckets supersede the old character-count estimates.
- Limit gauges whose reset time has passed dim with an "as of" note and drop off after a week, in both the TUI and the desktop app.
- The desktop app's Copilot sync works when launched from Finder: executable lookups now cover Homebrew and user-local install directories, and every quota request carries a timeout so a stalled connection cannot wedge the background refresher.
Automatic Copilot Refresh
The first Copilot sync remains an explicit, confirmed Config-page action. From then on the sidecar's existence is the opt-in: the shared background refresher re-fetches the quota payload every 15 minutes and at the start of each manual reload, the same pattern the Claude and Codex subscription syncs follow with their keychain cookies. Auto-refresh failures are silent and keep the previous sidecar; the manual action still surfaces errors. All quota-sync requests (Copilot, Claude, Codex) now carry a 20-second HTTP timeout, and gh auth token calls are bounded at 10 seconds, so the refresher thread that drives every reload can no longer hang on a stalled connection or a locked keyring.
Work and Enterprise Seats
The sync discovers every local GitHub identity — host-keyed entries in the github-copilot credential files, each host signed into the GitHub CLI, accounts stored by the Copilot CLI itself, and token environment variables — and syncs each one against its own host, since tokens are region-locked. A single account keeps the existing copilot.json unchanged; multiple accounts each get a labeled sidecar, and their gauges render side by side with the login in the row name.
Enterprise seats with per-seat credit quotas parse exactly as before and now display as Copilot Enterprise (a real seat payload is pinned by a regression test). Business seats that return only zero-entitlement placeholder quotas — GitHub never exposes the org credit pool to a member — render a labeled org-managed row with the plan name instead of nothing.
Exact Copilot CLI Usage
Newer Copilot CLI builds record one usage row per model request with the real serving model, token counts, and cache read/write buckets. Those rows now become individual calls with cache-aware pricing, superseding both the character-count turn estimates and the data.db session aggregates for the sessions they cover. A one-off archive migration zeroes previously imported estimates for superseded sessions, so upgraded archives reconcile exactly with the CLI's own ledger instead of double counting. Sessions from older CLI builds keep the estimate path.
Stale Gauges
A limit gauge whose reset time has already passed no longer renders as if current: it dims and swaps its reset time for an "as of <date> · stale" note, and a week later it leaves the Usage console entirely. Windows without a reset date go stale a week after their last observation and hide a week after that. Reports and exports keep the full snapshot history.
Notes
- Local usage analysis remains local-only. Network calls are limited to explicit Config-page downloads, opt-in quota sync actions (re-run by the background refresher only after the explicit first sync), local CLI advice generation selected by the user, or maintainer refresh and release paths.
- The release tag should be
v0.0.14and must match the root Cargo package, desktop Cargo package, desktoppackage.json, and Tauri config versions.
Full Changelog: https://github.com/russmckendrick/tokenuse/compare/v0.0.13...v0.0.14
Full Changelog: https://github.com/russmckendrick/tokenuse/compare/v0.0.13...v0.0.14