new hive-ag3nt::stats module reads turn_stats.sqlite read-only and aggregates over 24h/7d/30d windows (hourly/daily buckets) — turn rate, p50/p95/avg duration, ctx tokens (avg/max), cost token components, top tools, wake mix, result mix. served by the agent itself so per-MCP extensions can register more providers without the host knowing their schemas. /stats route + /api/stats?window=... on the per-agent web ui. chart.js v4.4.4 pulled from jsdelivr (SRI hash deferred). nav links: 📊 chip on the dashboard container row + 📊 stats → on the per-agent header. todo housekeeping: softened damocles-area note at the top, new reverse-proxy + deferred reminder-rollup items, removed the two telemetry-ui items absorbed by this page.
20 lines
531 B
Rust
20 lines
531 B
Rust
//! Shared in-container harness code used by both `hive-ag3nt` (agent) and
|
|
//! `hive-m1nd` (manager) binaries.
|
|
|
|
pub mod client;
|
|
pub mod events;
|
|
pub mod login;
|
|
pub mod login_session;
|
|
pub mod mcp;
|
|
pub mod paths;
|
|
pub mod plugins;
|
|
pub mod stats;
|
|
pub mod turn;
|
|
pub mod turn_stats;
|
|
pub mod web_ui;
|
|
|
|
/// Default socket path inside the container — bind-mounted by `hive-c0re`.
|
|
pub const DEFAULT_SOCKET: &str = "/run/hive/mcp.sock";
|
|
|
|
/// Default web UI port — used when `HIVE_PORT` env is unset.
|
|
pub const DEFAULT_WEB_PORT: u16 = 8042;
|