Commit graph

1862 commits

Author SHA1 Message Date
iamtoruk
a8a3031b58 fix(cache): DAILY_CACHE_VERSION 30 collides with open PR #1132
Two open branches claim daily-cache version 30, so a v30 file on disk carries
unknown accounting. Bump this branch to 31 and move the Hermes
pending-rederive contract version with it, so a v30 file written under #1132's
accounting is treated as a foreign prior version: carried forward per slice,
never adopted as the finalized base.

The #946 copilot fixture seeded itself at DAILY_CACHE_VERSION - 5, a moving
target that crossed the copilot contract boundary (26) at this bump and
silently stopped granting the entitlement those tests exist to check. Pinned
to 25, which is the fixed historical version the fixture actually means.

Disclosure: the bump re-derives every day whose sources still survive, so
finalized history shifts. On the reviewer's machine Claude moved -0.78
percent. That is a corrected figure replacing a stale cached one, not a loss,
but it is a visible change to numbers users have already seen.
2026-09-02 07:32:02 -07:00
iamtoruk
6fa5dfbeb7 Merge remote-tracking branch 'origin/main' into wt1234 2026-09-02 07:06:47 -07:00
Resham Joshi
a5609728a2
Merge pull request #1236 from avs-io/codex/release-build-hermeticity
Make release builds hermetic
2026-09-02 07:05:15 -07:00
Aditya Vikram Singh
0455250526 derive versioned Claude family labels 2026-09-02 19:15:57 +05:30
Resham Joshi
27fdffa790
Merge pull request #1238 from getagentseal/ci/upgrade-path-live-sessions
ci(upgrade-path): drop liveSessions from the worker-parity comparison
2026-09-02 06:29:37 -07:00
iamtoruk
f223a64bb7 test(mac): compare the pill fade start with a tolerance
100/112 is not exactly representable; the CI runner rounds the last bit
differently from the dev machine and the equality failed on main.
2026-09-02 06:24:28 -07:00
iamtoruk
91a11cb89e ci(upgrade-path): drop liveSessions from the worker-parity comparison
The block is a wall-clock snapshot (idleSeconds, lastActivityAt), not a parse product, so serial and parallel runs legitimately differ there; same treatment the parse-workers unit test already applies.
2026-09-02 06:13:50 -07:00
Resham Joshi
2f00f9fb13
Merge pull request #1237 from getagentseal/feat/dock-popover-glance
feat(dock): glance popover with sessions, today and quota windows
2026-09-02 06:12:47 -07:00
iamtoruk
53c5c7b370 feat(dock): glance popover with hero window, sessions and today strip
The Capacity Dock hover panel becomes a glance: a provider header, the
sessions running right now as pills with their context rings, a Today
strip, and a row of quota-window percentages, separated by hairlines.
Window percentages stay plain text until 70 percent so a healthy row
reads as text rather than a wall of colour. The panel stays 350pt wide;
every block height is a whole point and is summed into the panel frame,
since the hosting view does not size itself.

Running sessions are new CLI surface. `liveSessions` is add-only on the
menubar payload: sessions whose transcript was appended inside a 120s
window, carrying the branch, the model that answered last, and the
context that turn reported. Absence means "unknown", so the section
hides rather than claiming nothing is running. The block names projects
and branches, so sharing and MCP output strip it.

Today's totals needed no CLI change; the app simply was not decoding the
cache token counts the payload already carried.
2026-09-02 06:09:06 -07:00
Aditya Vikram Singh
279a6983e3 make upgrade cache discovery version agnostic 2026-09-02 16:44:51 +05:30
Aditya Vikram Singh
4bebc37f2c repair Hermes ledger migration fidelity 2026-09-02 16:18:05 +05:30
Aditya Vikram Singh
38e6e19f29 harden provider period and cache contracts 2026-09-02 16:18:05 +05:30
Aditya Vikram Singh
15ad054ea0 fix release build hermeticity 2026-09-02 16:17:28 +05:30
Aditya Vikram Singh
7106db2c0e fix menubar provider usage contracts 2026-09-02 16:17:28 +05:30
Resham Joshi
41f44edc7f
Merge pull request #1224 from getagentseal/ci/snap-upload-manual-review
Some checks failed
CI / semgrep (push) Has been cancelled
macOS Menubar CI / test (push) Has been cancelled
Tests / test (22) (push) Has been cancelled
Tests / test (22.13.0) (push) Has been cancelled
Tests / desktop (push) Has been cancelled
Windows Menubar CI / check (ubuntu-latest) (push) Has been cancelled
Windows Menubar CI / check (windows-latest) (push) Has been cancelled
ci(snap): treat the store's manual-review queue as a successful upload
2026-09-01 10:25:10 -07:00
iamtoruk
cad365610b ci(snap): treat the store's manual-review queue as a successful upload 2026-09-01 10:18:22 -07:00
Resham Joshi
cacc4e797d
Merge pull request #1223 from getagentseal/snap/narrow-session-grants
snap: narrow session-log grants to what the parsers read and drop the Copilot credential root
2026-09-01 10:02:37 -07:00
iamtoruk
a5289c2731 snap: narrow session-log grants to what the parsers read and drop the Copilot credential root 2026-09-01 09:56:03 -07:00
Resham Joshi
10f5564cc5
Merge pull request #1222 from avs-io/codex/grok-provider
feat(menubar): add native Grok Build quota provider
2026-09-01 06:54:42 -07:00
Aditya Vikram Singh
3664152d37 feat(mac): add native Grok Build provider 2026-09-01 18:46:02 +05:30
Resham Joshi
7d5bcd4d9a
Merge pull request #1216 from MiguelMachado-dev/fix/budget-test-future-timestamp
test(budget): seed current-month spend in the past, not at noon UTC
2026-09-01 05:11:26 -07:00
iamtoruk
56c34f7512 test(budget): compute the month start in UTC to match the CLI child
The fixture clamped to a local-time month start while the child is pinned
to TZ=UTC, so the clamp only worked at offset zero and the flake survived
the first minutes of each month everywhere else.
2026-09-01 05:11:00 -07:00
Resham Joshi
043ffd4822
Merge pull request #1214 from MiguelMachado-dev/feat/zero-cost-provider-visibility
feat(menubar): keep token-only and flat-rate providers visible in agent tabs
2026-09-01 05:08:32 -07:00
Resham Joshi
eae2b95fdf
Merge pull request #1213 from MiguelMachado-dev/fix/hermes-recorded-cost-fallback
fix(hermes): don't trust a $0 estimated cost — calculate from tokens
2026-09-01 05:07:30 -07:00
iamtoruk
12b20a2900 fix(app): let the Providers pane read hasUsage so token-only providers stay listed
The Electron Settings pane still filtered on cost, the exact gap this
change exists to close; it now reads the hasUsage field the payload
carries, falling back to cost for older CLIs.
2026-09-01 05:07:05 -07:00
iamtoruk
2620cbb2bc fix(hermes): bump the parse version so cached zero-estimate sessions re-cost
The cost rule changed, so sessions whose state.db fingerprint has not
moved must be re-parsed or they keep serving the stale placeholder zero.
2026-09-01 05:06:20 -07:00
Resham Joshi
fecbcd6e1c
Merge pull request #1212 from MiguelMachado-dev/fix/menubar-presence-deadlock
fix(mac): avoid provider presence deadlock
2026-09-01 04:58:38 -07:00
iamtoruk
c436787239 fix(mac): document the main-queue serialization and harden the deadlock test cleanup
The lock no longer covers the defaults write, so the main-queue hop is
what keeps the read-modify-write atomic; say so where the next reader
would be tempted to make it async. The regression test now cleans up its
observer and defaults domain on every exit and waits up to 5 seconds, so
a loaded runner cannot fake a deadlock.
2026-09-01 04:58:16 -07:00
Resham Joshi
e4602260a8
Merge pull request #1210 from getagentseal/fix/dock-integral-metrics
Some checks are pending
CI / semgrep (push) Waiting to run
macOS Menubar CI / test (push) Waiting to run
Tests / test (22) (push) Waiting to run
Tests / test (22.13.0) (push) Waiting to run
Tests / desktop (push) Waiting to run
fix(menubar): round Capacity Dock metrics to whole points to stop perpetual relayout
2026-09-01 01:36:47 -07:00
Miguel Machado
a9d9065747 test(budget): seed current-month spend in the past, not at noon UTC
currentMonthTimestamp seeded at today 12:00 UTC, which is in the future
for the 12 hours before it. Rows timestamped in the future don't surface
in the overview, so every CI run between 00:00 and 12:00 UTC failed
'keeps overview budget lines only on unfiltered overviews' with
'No usage found'.

Seed five minutes back, pinned to month start on the 1st so the row
can't slip into the previous month.
2026-08-31 23:39:09 -03:00
Miguel Machado
fee0f63fd0 feat(menubar): keep token-only and flat-rate providers visible in agent tabs
Agent tabs filtered strictly on cost > 0, so a provider whose sessions
carry tokens but no recorded dollar cost (Hermes on a flat subscription,
free-tier models, unpriced models) vanished from the strip entirely.

The menubar payload now carries an activity signal per provider, and the
strip keys visibility off it: providers with real usage stay listed, while
providers merely discovered on disk stay hidden. Older payloads without
the signal keep the previous detected-provider behavior.

Applies consistently across the mac menubar, the Electron renderer, and
the Windows payload types.
2026-08-31 22:43:13 -03:00
Miguel Machado
c114424519 fix(hermes): don't trust a $0 estimated cost — calculate from tokens
Hermes writes estimated_cost_usd = 0.0 (not NULL) when cost_status is
'unknown' (no pricing data) or 'included' (flat subscription, e.g. Codex
plan). resolveHermesCost treated any non-null estimate as a recorded
amount, so every subscription-backed Hermes session reported $0.00 with
real token counts underneath.

Only trust positive estimates now; $0 falls through to the token-based
calculateCost. An explicit $0 actual_cost_usd (a real invoice amount)
still wins, and genuinely free models still land on $0 since litellm
prices them at 0.
2026-08-31 22:41:18 -03:00
Miguel Machado
da20fd0f42 fix(mac): avoid provider presence deadlock
A background credential read held the provider-presence lock while UserDefaults synchronously notified SwiftUI. SwiftUI could re-read presence while holding its own update lock, leaving each thread waiting on the other. Serialize presence writes on the main queue and release the presence lock before publishing defaults changes.
2026-08-31 22:40:50 -03:00
iamtoruk
1a74f0d3ac fix(menubar): round Capacity Dock metrics to whole points to stop perpetual relayout
At any scale except 100% the dock's dimensions were fractional (85% of 88
is 74.8), so SwiftUI's fitted content never agreed with the pixel-aligned
panel frame and the hosting view re-laid itself out at display cadence
forever: 5 to 7 percent idle CPU and hundreds of wakeups a second once
quota data existed, on every release since the dock shipped. Measured on
the same machine: 60% and 85% scale held 5 to 6 percent for an hour;
100% scale idled at 0.1 to 0.2 percent. Rounding every scaled metric to a
whole point makes all scales behave like 100%.
2026-08-31 17:57:04 -07:00
Resham Joshi
f4e9ece5bc
Merge pull request #1209 from getagentseal/fix/dock-size-60
Some checks are pending
CI / semgrep (push) Waiting to run
macOS Menubar CI / test (push) Waiting to run
Tests / desktop (push) Waiting to run
Tests / test (22) (push) Waiting to run
Tests / test (22.13.0) (push) Waiting to run
feat(menubar): let the Capacity Dock size go down to 60 percent
2026-08-31 10:58:47 -07:00
iamtoruk
23aa2a2033 test(menubar): default-scale expectation follows the 60 percent default 2026-08-31 10:57:35 -07:00
iamtoruk
86f9d6c065 feat(menubar): default the Capacity Dock size to 60 percent 2026-08-31 10:56:59 -07:00
iamtoruk
6100fce4af feat(menubar): let the Capacity Dock size go down to 60 percent 2026-08-31 10:52:59 -07:00
Resham Joshi
764326438a
Merge pull request #1208 from getagentseal/fix/menubar-idle-render
fix(menubar): stop rendering the closed popover around the clock
2026-08-31 10:48:19 -07:00
Resham Joshi
4907094af9
Merge pull request #1205 from MiguelMachado-dev/fix/capacity-dock-hover-drift
fix(mac): stop Capacity Dock hover drift
2026-08-31 10:48:15 -07:00
iamtoruk
c19d5621e3 fix(menubar): stop rendering the closed popover around the clock
The status-item popover's hosting view is created once and lives for the
app's lifetime, and the flame wordmark inside it ran a repeat-forever
shimmer, so SwiftUI re-rendered the closed popover at display cadence
continuously: 5 to 7 percent idle CPU and roughly 650 wakeups a second
(Activity Monitor showed a 12-hour energy figure near two thirds of
Chrome's). The wordmark sweep and the loading flame pulse now start and
stop with popover visibility via a store flag set by the popover
delegate.
2026-08-31 10:46:37 -07:00
Miguel Machado
1416cdd4c1 fix(mac): stop Capacity Dock hover drift 2026-08-31 14:22:20 -03:00
Resham Joshi
f54329e686
Merge pull request #1204 from MiguelMachado-dev/fix/zai-body-auth-errors
fix(mac): map Z.ai body authentication errors
2026-08-31 09:59:49 -07:00
Resham Joshi
7b79a4ba5e
Merge pull request #1197 from getagentseal/fix/dock-hover-any-frontmost
fix(menubar): Capacity Dock hover works over any frontmost app
2026-08-31 09:56:46 -07:00
Miguel Machado
b39133941f fix(mac): map Z.ai body auth errors 2026-08-31 13:51:46 -03:00
Resham Joshi
0c71cdcf31
Merge pull request #1202 from MiguelMachado-dev/feat/zai-menubar-quota
feat(mac): add Z.ai Coding Plan quota
2026-08-31 09:44:15 -07:00
Resham Joshi
10598498f6
Merge pull request #1201 from getagentseal/fix/copilot-credit-estimate
fix(plan): estimate Copilot AI credits from tokens and say when the total is incomplete (#1199)
2026-08-31 09:44:11 -07:00
Resham Joshi
9ef77a15a5
Merge pull request #1200 from getagentseal/fix/copilot-credential-discovery
fix(menubar): find Copilot credentials beyond the legacy plugin files (#1198)
2026-08-31 09:44:07 -07:00
Miguel Machado
069a163e26 feat(mac): add Z.ai quota provider 2026-08-31 12:11:55 -03:00
iamtoruk
ac6cfc045f fix(quota): skip zero-entitlement and unlimited Copilot windows instead of showing 100% used
A Free or Individual plan reports premium_interactions with entitlement 0
and 0% remaining, which both the menubar and the desktop decoder turned
into a full 100% used ring. Verified against a live quota payload.
2026-08-31 03:26:19 -07:00