hyperhive/frontend/packages/agent
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris 8db8bd610f feat(stats): surface first-turn ctx tokens on the per-agent stats page
Builds the read/surface half of the per-session first-turn-tokens metric
(the capture — sessions table + turn_stats.session_id — landed separately).
A fresh claude session's first turn pays the full static prefix (system
prompt + tools + CLAUDE.md + first wake) as uncached input, so its
input_tokens is a clean proxy for prompt / CLAUDE.md sprawl — watching it
over time surfaces creep.

- stats.rs: add `Snapshot.first_turn_ctx: Option<u64>` populated by
  `read_first_turn_ctx` — the agreed per-session derive (first turn,
  `ORDER BY started_at LIMIT 1`, of the most recent session that started
  in the window). Inert-until-capture: `.ok()` maps both "no fresh
  session yet" and "older db without the sessions table" to None, the
  same decoupling as read_bash_breakdown; the field is skipped from the
  JSON when None. Pre-capture rows have a NULL session_id and are excluded.
- agent stats.js: add a "first-turn ctx" summary chip, guarded on a
  numeric value so it stays hidden until capture has data.

clippy + cargo fmt clean; agent bundle builds.
2026-06-10 20:37:35 +02:00
..
src feat(stats): surface first-turn ctx tokens on the per-agent stats page 2026-06-10 20:37:35 +02:00
build.mjs refactor(frontend): base16 theme contract in a swappable colors.css 2026-06-08 21:24:07 +02:00
package.json frontend: npm dependency updates (#681) 2026-05-31 01:29:35 +02:00