feat(observe): surface delegation + A2A in the live world feed via audit poll

Edge-initiated inter-agent events (gated delegation, A2A ingress) bypass the
run loop, so the world SSE now polls the append-only audit log (cursor on the
BIGINT id, seeded to max on first pass) and emits:
  - delegation.invoked -> agent.delegate {fromAgentId,toAgentId,toName,task}
  - a2a.invoked        -> a2a.invoked   {agentId}
TeamObserver renders agent.delegate as an A->B handoff in the team timeline;
adds the agent.delegate taxonomy type. Reliable live (the synthesized-run path
never streamed — active_runs + first-sight cursor jump skip it).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Omar Sobh
2026-06-29 05:55:49 -07:00
co-authored by Claude Opus 4.8
parent 7352ed47ab
commit 85b0e1ac33
3 changed files with 75 additions and 3 deletions
+3
View File
@@ -44,6 +44,8 @@ export interface TaxonomyEvents {
};
/** Observe → an external A2A caller invoked this agent (a new ingress). */
"a2a.invoked": { agentId: string; caller?: string; skill?: string; ts?: string };
/** Observe → a claw delegated a sub-task to another claw (A→B handoff). */
"agent.delegate": { fromAgentId: string; toAgentId: string; toName?: string; task?: string; ts?: string };
/** World → Live (Gource): the agent pawn retargets to nodeId and beams. */
"world.touch": { agentId: string; nodeId: string; kind?: "service" | "event"; weight?: number };
/** World → node glow/pulse intensity. */
@@ -86,6 +88,7 @@ export const TAXONOMY_TYPES: TaxonomyType[] = [
"agent.message",
"room.message",
"a2a.invoked",
"agent.delegate",
"world.touch",
"node.activity",
"topology.update",