Commit graph

1190 commits

Author SHA1 Message Date
Resham Joshi
76744124ab
Merge pull request #760 from getagentseal/fix/cli-durable-totals
fix(report): CLI totals read the durable daily cache, matching the menubar exactly
2026-07-20 07:14:10 -07:00
Resham Joshi
92843bc647
Merge pull request #759 from getagentseal/fix/client-math-parity
fix(clients): display CLI values verbatim, align period windows, true Lifetime tab
2026-07-20 07:13:58 -07:00
iamtoruk
dea61bad4e fix(report): CLI totals read the durable daily cache, matching the menubar exactly 2026-07-20 06:33:56 -07:00
iamtoruk
6eb8797efa fix(clients): display CLI-computed values verbatim, align period windows across app/dash/menubar 2026-07-20 06:26:15 -07:00
Resham Joshi
ba56ad72f5
Merge pull request #758 from getagentseal/feat/rich-session-capture
feat(capture): parse-time capture of branch, LOC deltas, interruptions, titles, PR links
2026-07-20 06:03:03 -07:00
iamtoruk
8ced2ed47f feat(capture): parse-time capture of branch, LOC deltas, interruptions, titles, PR links 2026-07-20 05:56:38 -07:00
Resham Joshi
f32c00d2b1
feat(insights): workflow intelligence (corrections, time-to-first-edit, file churn, coverage) + dash wire-up (#756)
* feat(insights): workflow intelligence (corrections, time-to-first-edit, file churn, coverage) + dash wire-up

* menubar: propagate workflow-intelligence fields onto the cache-backed headline

The carry-forward headline (#755) serves totals from the durable day set
and merges only session-derived fields from the scan. The new workflow,
topReworkedFiles, and pricingCoverage fields were computed by the scan
but never propagated, so they silently defaulted on the all-provider
path (pricingCoverage rendered a dishonest 1.0). Propagate them like the
other scan-only fields and pin it with a carried-headline regression
test.
2026-07-20 05:47:46 -07:00
Resham Joshi
e99ee4bf37
doctor: surface Claude Code transcript retention (#757)
Claude Code deletes session transcripts after cleanupPeriodDays (default
30) at startup. Daily totals survive in the daily cache, but per-session
detail older than the cutoff is unrecoverable, and most users learn this
only after losing months of history. Doctor now reports the effective
retention and, below one year, warns with the exact settings.json edit
that preserves transcripts.
2026-07-20 05:25:12 -07:00
Monish Khandelwal
380be66b4f
feat(cli): add lifetime period for CLI and dashboard (#753)
Re-apply the CLI/dashboard Lifetime split from #391/#416 on current main.

- add lifetime as a first-class period (all stays last 6 months)
- wire period through cli-date, dashboard key 6, and CLI commands
- refresh cli-date and cli-json-daily regression coverage

Part of #389. Supersedes #416.
2026-07-20 05:24:33 -07:00
ozymandiashh
44df547748
test(electron): make dev-resolution tests self-sufficient on fresh clones (#689)
* test(electron): isolate dev-resolution fixtures via CODEBURN_DEV_REPO_ROOT

Rework of the #681 fix per review: instead of stubbing the real repo
dist/cli.js with snapshot-restore, the Vite-dev resolution branch gains a
CODEBURN_DEV_REPO_ROOT override (matching the CODEBURN_PATH_DIRS precedent)
so the whole fixture lives in a per-test tmpdir. With the env unset the
resolution order is byte-identical to before.

- covers all three fresh-clone failures on current main, including the
  resolveTarget dev-repo-beats-bundled case
- deletes the snapshot-restore machinery, the parent-path precondition and
  the beforeAll repo-scanning guard
- tests assert both override-set (tmpdir wins) and override-unset behavior

Closes #681

* test(electron): drop environment-coupled null assertion for unset dev-root override

The override-unset case resolved <repo>/dist/cli.js whenever a build had
run, so the toBeNull() assertion depended on the absence of a gitignored
artifact. The override-set tests already prove the new branch and the
non-Vite test covers the null path.
2026-07-20 05:23:28 -07:00
Aditya Vikram Singh
bcef34f081
menubar: linear pace on Codex quota windows — deficit/reserve, projection, run-out ETA (#726) (#728)
Co-authored-by: Aditya Vikram Singh <247195684+avs-io@users.noreply.github.com>
2026-07-20 05:21:43 -07:00
Aditya Vikram Singh
b8435073ee
quota: provider-agnostic window model with provenance, merge rule, and linear pace (#725 Part 1) (#740)
Co-authored-by: Aditya Vikram Singh <247195684+avs-io@users.noreply.github.com>
2026-07-20 05:21:39 -07:00
ihearttokyo
92b2b5ef39
fix(dashboard): Bound Daily Activity scans (#727)
Reuse one concrete six-month scan for interactive history and selected-period totals. This restores network-backed providers, removes concurrent refresh scans, and keeps non-interactive reports scoped to their requested period.
2026-07-20 05:21:35 -07:00
Resham Joshi
7f2739e130
daily-cache: never lose history the sources can no longer re-derive (v14) (#755)
* daily-cache: never lose history the sources can no longer re-derive (v14)

Session files are ephemeral (Claude Code deletes transcripts after ~30
days), so a cached day whose sources are gone exists nowhere else. Every
invalidation path (schema bump, savings-config change, timezone change,
incomplete-hydration retry) used to discard all cached days and re-derive
from surviving sources, silently truncating history to the source
retention window. Five bumps between June 22 and July 16 erased
everything before April 24 on a machine with usage since March.

Invalidations now re-derive what they can and carry forward every
(day, provider) slice they cannot, marked 'carried'. Loading a missing or
corrupt cache file adopts days from every older daily-cache file in the
cache dir (legacy, versioned, .bak copies, orphaned .tmp) as a union per
(day, provider), higher schema version winning per pair. Provider slices
now store the full per-provider breakdown (tokens, models, categories,
sessions) so carry-forwards stay exact across future rebuilds.

Merge rules hardened by adversarial review: opaque pre-v5 days (totals
without provider slices) merge all-or-nothing so partial parses cannot
double-count into them; zero-data placeholder slices neither block nor
lose carried data (session counts deduplicated by max); a partial parse
never overwrites finalized baseline slices, only fills gaps; adoption
purges today/future entries, applies retention, and clamps a stale
lastComputedDate so a purged day cannot be skipped forever.

Verified end-to-end against a copy of a real cache dir: the rebuilt v14
cache holds every (day, provider) pair present in any older cache file,
including Claude days from early April that the July rebuilds had
dropped.

* daily-cache: per-project daily rollups in the durable record (v15)

Project history previously lived only in the session layer, so it faded
with the source files even though day totals now survive. Days and
provider slices carry a projects breakdown (cost/calls/savings/sessions
per project) filled by the day aggregator and folded through carry
merges, making the By Project dimension as durable as models and
categories. Days recorded before v15 keep their totals with no project
split; nothing can reconstruct one once sources are gone.

This is the first bump to ride the v14 carry-forward: the v14 cache is
adopted losslessly and only source-backed days re-derive (verified on a
real cache dir: identical totals, zero lost pairs, project splits on
every derivable day).

Hardening from adversarial review: placeholder-aware project session
dedup so totals reconcile; migrateDays sanitizes provider slices and
nested projects from foreign caches; all foreign-keyed map access in the
merge path uses hasOwn reads and defineProperty writes, closing a real
prototype-pollution path a regression test caught when a cache key is
named __proto__.

* menubar: serve headline totals and projects from the durable day set

Review finding on this PR: the all-provider headline built cache-backed
totals and then replaced them wholesale with a rebuild from the
surviving-session parse, so current.cost/calls, the models table, and
topProjects stayed truncated to the source-retention window even though
history.daily carried the full record. The replacement existed only to
keep the estimated-cost markers alive.

The cache-backed period data is now the authority; the scan contributes
exactly what day entries lack: estimated-cost markers, unpriced-model
detection, per-session drill-downs, and a fresher project path. Project
totals come from the same day set as the headline, with ProjectDayStats
gaining a path so carried-only projects still display a friendly name.
Sessions merge by max: the cache buckets a session on its start day, the
scan counts it on any active day, and both undercount differently.

End-to-end regression test seeds a cache whose only day is carried (no
session files exist) and asserts the headline, models, and topProjects
all reflect it. Verified on a real cache dir: the 6-month headline now
equals the history sum to the cent.

* daily-cache: close residual corrupt-input gaps in v15 ingestion sanitization

v15 sanitizes provider slices and projects at ingestion and guards merge
lookups with Object.hasOwn/setOwn. Three residual gaps versus the
invariant (no JSON-parseable cache content may throw or produce
NaN/garbage), plus one found in review:

- Day-level models/categories were not sanitized: a day with
  models:'bad' survived load and buildPeriodDataFromDays iterated the
  string per-character, yielding NaN in period model totals. Day-level
  maps now reuse the same sanitizers as slice-level maps.
- Map keys shadowing Object.prototype (constructor, toString, ...) still
  entered the cache from foreign files; modelTotals[name] ?? init in
  buildPeriodDataFromDays resolves such a key to the inherited prototype
  member and produces NaN. All sanitized maps now drop these keys at
  ingestion (deliberate tradeoff: such names are reclassified invalid).
- Top-level lastComputedDate was unvalidated; a non-string later hit
  .slice() in the gap-start parse and threw. Kept only when it is a
  YYYY-MM-DD string, else null (forces a plain re-backfill).
- Stale savingsConfigHash comment still described pre-v14 discard
  behavior; reworded to re-derive + carry forward.

3 regression tests, each verified to fail on the pre-fix code. Relevant
suites 71/71 green, tsc clean. Valid-input behavior unchanged except the
prototype-key reclassification above.

---------

Co-authored-by: ozymandiashh <234437643+ozymandiashh@users.noreply.github.com>
2026-07-20 05:21:22 -07:00
Resham Joshi
2312fd2eb0
Merge pull request #751 from ozymandiashh/pr/714-delta
Some checks are pending
CI / semgrep (push) Waiting to run
fix(yield): case-insensitive canonical repo grouping via realpathSync.native
2026-07-19 17:25:39 -07:00
Resham Joshi
49b377616b
Merge pull request #750 from ozymandiashh/pr/747-kimicode
feat(kimicode): Kimi Code CLI provider, parse ~/.kimi-code wire sessions
2026-07-19 16:27:14 -07:00
Resham Joshi
3472885629
Merge pull request #752 from getagentseal/perf/single-pass-scanner
Some checks are pending
CI / semgrep (push) Waiting to run
perf(parser): single-pass field extraction in the large-line JSONL scanner
2026-07-19 01:24:17 -07:00
iamtoruk
56ea38917f perf(parser): single-pass field extraction in the large-line JSONL scanner 2026-07-18 17:23:34 -07:00
ozymandiashh
2c9871b2f2 fix(yield): case-insensitive canonical repo grouping via realpathSync.native
Follow-up to #719, closing the two deltas flagged in the #714 discussion:

- fs.realpathSync preserves the caller's path casing on case-insensitive
  filesystems (macOS APFS, Windows), so the same repo reached through
  differently cased paths produced distinct canonical keys and split into
  separate groups. fs.realpathSync.native returns the on-disk casing, making
  the canonical key truly canonical. Regression test creates a real repo,
  references it through altered casing (guarded to case-insensitive
  filesystems), and asserts one group.

- Documents the accepted residual: a main repo moved on disk after
  'git worktree add' leaves git's linked-worktree metadata stale, so its
  worktrees may not unify; that is git-state staleness, not a grouping bug.
2026-07-19 03:12:03 +03:00
ozymandiashh
0232595847 docs(kimicode): subagent accounting verified at kimi-code source, no double count 2026-07-19 03:11:29 +03:00
ozymandiashh
2b95aef7e5 feat(kimicode): Kimi Code CLI provider, parse ~/.kimi-code wire sessions (#747)
Adds a provider for Kimi Code CLI (MoonshotAI/kimi-code, the successor of
kimi-cli), reading ~/.kimi-code/sessions/wd_*/session_*/: state.json for
session metadata and per-agent agents/<id>/wire.jsonl event streams.

- Usage from usage.record events: inputOther->input, output->output,
  inputCacheRead->cacheRead, inputCacheCreation->cacheWrite. The store has
  no cost fields, so cost is computed from tokens and flagged estimated.
- Real model attribution: usage.record.model carries the config ALIAS; the
  real model id lives on llm.request events. Rows resolve the alias through
  the alias->model map first, with the nearest preceding request as
  fallback, so aliases never leak into reports.
- Subagent wire files parse as separate sources under one session without
  double counting; multi-turn continuations in one wire.jsonl are one
  session with multiple turns; retry-only failed sessions parse to zero
  usage; malformed JSONL lines are skipped.
- Tool calls feed the tool breakdown; tool state resets at turn boundaries
  so a failed turn cannot bleed its tools into the next row.
- KIMI_CODE_HOME override, eager registration, PROVIDER_ENV_VARS and
  PROVIDER_PARSE_VERSIONS entries, probeRoots for doctor, docs page.
2026-07-19 02:52:37 +03:00
Resham Joshi
916119da21
Merge pull request #749 from getagentseal/perf/incremental-append-parse
Some checks are pending
CI / semgrep (push) Waiting to run
perf(parser): incremental parse of append-grown session files
2026-07-18 16:36:36 -07:00
Resham Joshi
8892553d3a
Merge pull request #748 from getagentseal/fix/app-spawn-storm
perf(app): spawn concurrency cap, background prefetch, Today default
2026-07-18 16:36:31 -07:00
iamtoruk
f26bf69f88 perf(app): cap CLI spawn concurrency, background-priority prefetch, default to today 2026-07-18 16:28:30 -07:00
iamtoruk
8326aee4a6 perf(parser): parse appended session files from the cached offset instead of byte 0 2026-07-18 16:26:12 -07:00
Resham Joshi
d00b33b13d
Merge pull request #746 from ozymandiashh/pr/741-robustness
Some checks are pending
CI / semgrep (push) Waiting to run
fix(telemetry): cap cli_error per kind per day, flush app_close on quit
2026-07-18 14:32:55 -07:00
Resham Joshi
5a8a1d0fa4
Merge pull request #745 from ozymandiashh/pr/741-skills
fix(classifier): attribute skills to skillBreakdown regardless of turn category
2026-07-18 14:32:52 -07:00
ozymandiashh
db39157ea6 fix(telemetry): cap cli_error per kind per day, flush app_close on quit
Two robustness fixes from the #741 telemetry audit:

- cli_error had no rate limit: one install emitted 804 timeout events in a
  single day (56% of all events ever received). track() now caps cli_error
  at 20 per kind per calendar day. The day and per-kind counts persist in
  the telemetry state file (defensively loaded), so app relaunches within
  the same day cannot reset the budget; other event names are unaffected.

- app_close almost never fired (1 close vs 48 opens): the quit path raced
  the outbound POST. before-quit now defers quit once, tracks the close and
  flushes with a bounded wait (1500ms race), then quits. Every step of the
  handler is independently guarded so a synchronous failure can neither
  skip the flush nor wedge quitting, and a full queue evicts its oldest
  event rather than dropping app_close. Disabled or not-onboarded telemetry
  quits instantly.
2026-07-18 23:06:30 +03:00
Resham Joshi
906cb2d550
Merge pull request #735 from ozymandiashh/feat/quickdesk-provider
feat(quickdesk): Amazon Quick Desktop provider (~/.quickwork)
2026-07-18 12:57:08 -07:00
ozymandiashh
56e836fa9e fix(classifier): attribute skills to skillBreakdown regardless of turn category
Skill attribution was gated on the turn classifying as 'general', but
classifyByToolPattern checks hasSkill last, so any turn invoking the Skill
tool alongside Read/Bash/Edit/MCP got a real category and its skill was
silently dropped. Skill turns virtually always carry other tools, which is
why skills came back empty in all 25 usage snapshots (#741) while mcpServers
populated.

subCategory is now set for any turn with Skill tool_use; category assignment
is untouched. The claude parse version is bumped so cached session summaries
(which lack skill attribution) re-parse on upgrade.
2026-07-18 22:54:49 +03:00
Resham Joshi
1850276bd1
Merge pull request #742 from getagentseal/fix/usage-snapshot-providers
Some checks are pending
CI / semgrep (push) Waiting to run
Per-provider usage capture, placeholder guard, path-id display fallback
2026-07-18 04:41:27 -07:00
iamtoruk
b71ec34a21 fix(usage): per-provider snapshot capture, placeholder guard, path-id display fallback 2026-07-18 03:37:42 -07:00
Resham Joshi
9d5f745b5b
Merge pull request #739 from getagentseal/docs/desktop-release-flow
Some checks are pending
CI / semgrep (push) Waiting to run
docs: desktop release flow + Linux build targets
2026-07-17 15:09:01 -07:00
iamtoruk
b8db765fd1 docs: desktop release flow + widened Linux build targets
RELEASING.md: the desktop app is released manually under desktop-v<version>
tags (build on macOS, gh release upload --clobber); no CI yet.

DISTRIBUTION.md: document building deb/rpm and both arches from a macOS host,
and that the rpm target needs 'brew install rpm' (rpmbuild) — it emits
codeburn-desktop-<version>.x86_64.rpm, the name the website links.
2026-07-17 15:00:31 -07:00
Resham Joshi
dafe19e815
Merge pull request #738 from getagentseal/fix/stamp-and-update-button
fix: clean build stamp + splash without hash + About update check
2026-07-17 14:30:38 -07:00
iamtoruk
0a76626d21 fix(app): clean build stamp, splash without hash, About checks for updates
- build stamp ignores the pricing-snapshot files the build regenerates,
  so a release checkout no longer shows a false -dirty
- splash shows just the flame, CodeBurn, and the version (dropped the
  commit-hash line); the clean build id stays in About only
- About 'Check for updates' uses the in-app checker and reports inline
  ('You're on the latest' / 'Update available: X · Download') instead
  of blindly opening the releases page

392/392.
2026-07-17 14:30:00 -07:00
Resham Joshi
8fdace7292
Merge pull request #737 from getagentseal/brand/binary-restore
Some checks are pending
CI / semgrep (push) Waiting to run
brand: restore binary 0101 flame across all surfaces
2026-07-17 14:16:45 -07:00
Resham Joshi
69ab1fc96c
Merge pull request #736 from getagentseal/feat/telemetry-usage-detail
feat: telemetry captures model x purpose, MCP servers, skills
2026-07-17 14:16:30 -07:00
iamtoruk
a6c475b657 feat(app): usage telemetry captures model x purpose, MCP servers, and skills
The once-daily usage_snapshot now includes each top model's primary
task category (which model for what purpose, one cheap by-model call
per day), plus MCP servers and skills used (names + coarse usage
buckets). Names + buckets only, no prompts/paths/dollars; graceful
degradation if the by-model fetch fails. /telemetry page updated.
2026-07-17 14:15:54 -07:00
iamtoruk
6b8d8eb7b1 brand: restore binary 0101 flame across all surfaces
Per owner decision: the binary 'burning code' flame is the mark
everywhere, matching the app's identity as a code-cost tool. Desktop
app icon + FlameMark (splash/sidebar/About/dock), menubar dock icon,
brand logo, and local dashboard all use the binary flame.
2026-07-17 14:14:40 -07:00
ozymandiashh
bdb1475251 feat(quickdesk): Amazon Quick Desktop provider, parse ~/.quickwork sessions and metrics (#707)
Adds an eager provider for Amazon Quick Desktop (aws.amazon.com/quick/desktop),
which stores local data under ~/.quickwork. Usage source of truth is the
per-day EMF metrics JSONL (Model, InputTokens, OutputTokens, CostUSD,
session_id); real CostUSD passes through the cache like kiro/devin/hermes.
sessions.db (SQLite, read-only) enriches calls with titles, first user
message, and tool names, and provides estimated usage (quickdesk-auto,
costIsEstimated) for sessions that predate metrics coverage. Multi-profile
layout via profiles.json entries plus the migrated legacy root; honors
QUICKWORK_HOME; schema-tolerant (sqlite_master and PRAGMA introspection,
per-line JSONL error isolation). The on-disk schema is reverse-engineered and
documented as such in docs/providers/quickdesk.md.
2026-07-18 00:02:01 +03:00
Resham Joshi
2a01273b7a
Merge pull request #734 from getagentseal/chore/desktop-0.9.17
chore(app): desktop 0.9.17
2026-07-17 13:56:30 -07:00
iamtoruk
7946b4f369 chore(app): desktop 0.9.17
Patch release: Windows bundled-CLI fix (was not-found on 100% of
Windows), enriched cli_error telemetry, and the unified solid-flame
brand. CLI/menubar stay 0.9.16 (no changes needing an npm/menubar
republish; the desktop bundles current main's CLI).
2026-07-17 13:55:48 -07:00
Resham Joshi
75de4ef07c
Merge pull request #733 from getagentseal/fix/windows-cli-and-error-telemetry
fix: resolve bundled CLI on Windows (100% not-found) + enrich cli_error telemetry
2026-07-17 13:52:16 -07:00
iamtoruk
707d621d7a fix(app): resolve bundled CLI on Windows + enrich cli_error telemetry
path.startsWith('/') POSIX guard rejected the Windows bundled-CLI path
(C:\...\launch.js), so 100% of Windows installs got not-found
(confirmed in telemetry: 84 events, all win32/x64). Use path.isAbsolute
everywhere. cli_error now carries {cmd, kind, detail?} for
self-diagnosing errors, never paths/args/stderr.
2026-07-17 13:51:35 -07:00
Resham Joshi
d2ff8a72f6
Merge pull request #732 from getagentseal/brand/solid-flame-all
brand: original solid flame across all surfaces
2026-07-17 13:34:26 -07:00
iamtoruk
862206ea81 brand: original solid flame across all surfaces
Retires the binary-digit flame (which muddied below ~256px) in favor
of the original solid flame everywhere: desktop app icon + FlameMark
(splash, sidebar, About, dock), menubar dock icon, brand logo. One
consistent mark that stays crisp at every size, matching the website
favicon and local dashboard.
2026-07-17 13:33:27 -07:00
Resham Joshi
9df2b81ded
Merge pull request #731 from getagentseal/brand/dash-solid-flame
brand: solid flame for the local dashboard mark
2026-07-17 13:29:08 -07:00
iamtoruk
8af30ea323 brand: local dashboard uses the solid flame mark (crisp at 24px)
The dashboard header logo and favicon render at 24px where the binary
flame muddies; use the solid flame like the site favicon. Menubar dock
icon keeps the binary squircle (large-icon context).
2026-07-17 13:28:20 -07:00
Resham Joshi
15cd9af1b8
Merge pull request #730 from getagentseal/brand/binary-flame-logos
brand: binary-flame logo for local dashboard + menubar icon
2026-07-17 13:11:13 -07:00