Repository navigation
feat(gateway): session observer digests over the utility model - #112216
Conversation
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(gateway): session observer digests over the utility model This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(gateway): session observer digests over the utility model This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
…law#112216) * feat(gateway): session observer digests over the utility model * fix(gateway): split session-observer modules and satisfy ci gates * fix(gateway): observer reads session entries without materializing agent state
What Problem This Solves
Agentic session transcripts are walls of tool noise: there is no glanceable, trustworthy answer to "what is the agent doing and how is it going" — while a run is live, or when returning to an idle session. The sidebar's heuristic narration line transcribes activity ("running vitest") but cannot judge trajectory ("third run of the same file, still failing — it may be circling").
This PR lands the server foundation of the session-observer program: a gateway service that watches observed sessions' agent-event streams and uses the agent's utility model to produce structured trajectory digests. The Control UI HUD card, sidebar subtitle integration, and settings surface build on this in the follow-up PR.
Why This Change Was Made
One narrator, server-side: a digest authored in the gateway reaches every client (web, macOS, mobile) through one
session.observerevent plus a compactGatewaySessionRow.observerDigestprojection, instead of per-client stream re-derivation. Judgment (progressing / grinding / stuck / waiting-on-user / wrapping-up / done / failed) requires a model; the existing utility-model concept (agents.defaults.utilityModel, provider-declared defaults) already owns exactly this class of short internal task.Design decisions of note:
gateway.controlUi.sessionObserver: falsedisables it gateway-wide;agents.defaults.utilityModel: ""disables all utility-model tasks.User Impact
No visible UI change yet. Control UI clients subscribed to a session begin receiving
session.observerdigest events, and session rows carry a compactobserverDigest(headline, health, updatedAt, revision) for idle-state surfaces. One new config key (gateway.controlUi.sessionObserver, default true) documented in docs/web/control-ui.md.Evidence
node scripts/run-vitest.mjs.pnpm protocol:gen,gen:swift,gen:kotlin(Swift/Kotlin models included).check-changedgate delegated to Blacksmith Testbox: runtbx_01ky1ewy19cgjmjy0n68pja0dj, exit 0 (typecheck, lint, import-cycles, boundaries, native guards).