You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Ghost agent runs well but is a black box: tool calls and model turns exist only inside conversation history + free-form tracing spans — nothing queryable, nothing live. And the chat display is missing the basics users expect (context meter, distill-on-long-context, attachments). This epic makes the harness observable and upgrades the display.
Grounding (code-mapped): run loop sidecar/src/ghost/agent.rs:193-846 (tool dispatch at :647, token Stats at :510-515), event enum ghost/types.rs:6-52, chat SSE ghost/api.rs:50-110, chat UI sidecar/static/shell.html served at GET /shell (main.rs:2990, include_str!), audit-log pattern to copy sidecar/src/audit.rs.
Status discovery
#42 / #46 are already architecturally done — the chat IS a sidecar-served UI (/shell) embedded via a web pane (now a native WebContentsView per #128). Remaining scope is browser-session auth (open the same URL in an external browser with a token). They stay open, re-scoped to that.
P1 — Structured log events: capture tool calls and model turns as discrete events #71 structured log events: new event layer capturing tool_call {name, input, output_summary, duration_ms} + model_turn {model, prompt_tokens, completion_tokens} from the run loop into an in-memory ring + rolling JSONL (~/.hyperia/logs/events.<date>.jsonl), following audit.rs.
Why
The Ghost agent runs well but is a black box: tool calls and model turns exist only inside conversation history + free-form tracing spans — nothing queryable, nothing live. And the chat display is missing the basics users expect (context meter, distill-on-long-context, attachments). This epic makes the harness observable and upgrades the display.
Grounding (code-mapped): run loop
sidecar/src/ghost/agent.rs:193-846(tool dispatch at :647, token Stats at :510-515), event enumghost/types.rs:6-52, chat SSEghost/api.rs:50-110, chat UIsidecar/static/shell.htmlserved atGET /shell(main.rs:2990,include_str!), audit-log pattern to copysidecar/src/audit.rs.Status discovery
#42 / #46 are already architecturally done — the chat IS a sidecar-served UI (
/shell) embedded via a web pane (now a native WebContentsView per #128). Remaining scope is browser-session auth (open the same URL in an external browser with a token). They stay open, re-scoped to that.Phases
post_split(main.rs:691) /post_new_tab(main.rs:2920) with window/tab/pane omitted must default to the CALLER's pane (CallerIdentity::Pane), not the focused pane. Small, high-value.tool_call {name, input, output_summary, duration_ms}+model_turn {model, prompt_tokens, completion_tokens}from the run loop into an in-memory ring + rolling JSONL (~/.hyperia/logs/events.<date>.jsonl), followingaudit.rs.GET /api/logs/streambroadcasting new events (same SSE machinery as ghost chat).GET /api/logs?type=&tool=&session=&since_ms=mirroring/api/audit/search.GhostEvent::Statstokens as a header meter ({used}k / {limit}k, green/yellow/red at 50/80%) inshell.html; sidecar exposes the model's context limit.tab_snapshotbase64 into agent context.Linked issues (kept open, tracked here)
#119, #71, #72, #73, #43, #44, #45, #41, #124, #53, #120, #42, #46
Work lands on
canary. Related: #128 (WebContentsView — the chat panel renders through it).