Watch
0
0
Fork
You've already forked hyperhive
0

drop hive and agent response fields the frontend never reads

This commit is contained in:
atlas 2026-11-13 03:25:41 +01:00 • committed by mara
commit a437f9ccd5
3 changed files with 347 additions and 598 deletions

View file

@ -8,7 +8,6 @@
export type InferenceSource = "swarm" | "agent_nix" | "local_file" | "default";
export interface AgentState {
seq: number;
label: string;
qualified_label: string;
dashboard_port: number;
@ -17,7 +16,6 @@ export interface AgentState {
turn_state_since: number;
model: string;
resolved_model: string | null;
context_window_tokens: number;
ctx_usage: TokenUsage | null;
cost_usage: TokenUsage | null;
hive_name: string | null;

View file

@ -92,7 +92,7 @@ export function syncTransientsFromSnapshot(s) {
// Snapshot ships `secs` (server-computed); reconstruct an
// approximate since_unix so the live ticker keeps progressing
// without surprising jumps when the next snapshot lands.
byKind.set(t.kind, t.since_unix ?? nowUnix - (t.secs || 0));
byKind.set(t.kind, nowUnix - (t.secs || 0));
}
}
export function applyTransientSet(ev) {
@ -193,9 +193,8 @@ function buildAgentMenu(c) {
// ─── port conflicts ──────────────────────────────────────────────────────────
// Re-derive port conflicts from the live containers map. Mirrors the
// server-side `build_port_conflicts` so the banner reacts to event
// updates instead of waiting for a /api/state refetch.
// Derive port conflicts from the live containers map, so the banner
// reacts to event updates without a /api/state refetch.
function derivePortConflicts(containers) {
const byPort = new Map();
for (const c of containers) {

View file

@ -44,12 +44,10 @@ type NodeState =
| "Cancelled"
| "Skipped";
type TerminalState = "Done" | "Failed" | "Cancelled" | "Skipped";
// Mirrors `hive_jobq_wire::GraphDep` — externally tagged on `kind`,
// values are the Rust variant names verbatim.
type GraphDep =
| { kind: "Node"; id: number; accepts: TerminalState[] }
| { kind: "Node"; id: number }
| { kind: "Resource"; name: string; count: number };
interface NodePayload {