hyperhive/hive-ag3nt/src
müde 8f5752980f turn_stats: per-turn analytics sink
new sqlite table at /state/hyperhive-turn-stats.sqlite on each
agent's state dir. one row per claude turn captures identity
(model, wake_from, result_kind), timing (started/ended_at,
duration_ms), cost (input/output/cache_read/cache_creation token
counts), behaviour (tool_call_count + per-tool breakdown JSON),
and post-turn snapshot metrics (open_threads_count,
open_reminders_count).

wire additions:
- AgentRequest/ManagerRequest::CountPendingReminders +
  Broker::count_pending_reminders_for(agent)
- Bus::observe_stream + take_tool_calls — pumps the existing
  stdout stream-json, picks out tool_use blocks, accumulates per
  turn. bin loops fold the breakdown into each row.
- TurnStats::open_default + TurnStatRow + record() — best-effort
  inserts; failures log + don't block the harness.

both ag3nt and m1nd bins capture started_at + duration via
Instant::elapsed, fetch open-thread + reminder counts from
hive-c0re via the existing socket (post-turn, best-effort), and
record one row at turn_end. record_kind splits ok / failed /
prompt_too_long; failures carry the error message in note.

todo entries for host-side vacuum sweep + reading the table back
into agent/dashboard badges.
2026-05-17 23:00:41 +02:00
..
bin turn_stats: per-turn analytics sink 2026-05-17 23:00:41 +02:00
client.rs retry hive socket up to 5x over 60s, surface retry count to claude 2026-05-16 15:28:18 +02:00
events.rs turn_stats: per-turn analytics sink 2026-05-17 23:00:41 +02:00
lib.rs turn_stats: per-turn analytics sink 2026-05-17 23:00:41 +02:00
login.rs refactor: per-agent state paths (/agents/{label}/state), centralize in paths.rs 2026-05-16 15:18:32 +02:00
login_session.rs login: default command is claude auth login 2026-05-15 13:32:51 +02:00
mcp.rs turn_stats: per-turn analytics sink 2026-05-17 23:00:41 +02:00
paths.rs refactor: per-agent state paths (/agents/{label}/state), centralize in paths.rs 2026-05-16 15:18:32 +02:00
plugins.rs add claudePluginsAutoUpdate NixOS option, default false 2026-05-17 02:59:51 +02:00
turn.rs turn_stats: per-turn analytics sink 2026-05-17 23:00:41 +02:00
turn_stats.rs turn_stats: per-turn analytics sink 2026-05-17 23:00:41 +02:00
web_ui.rs agent ui: event-driven status / model / token_usage / turn_state 2026-05-17 22:49:55 +02:00