Skip to content

refactor(events): define orchestration SSE frames once - #632

Open
jakedipity wants to merge 2 commits into
jakedipity/agent-event-schemafrom
jakedipity/orchestration-event-schema
Open

refactor(events): define orchestration SSE frames once#632
jakedipity wants to merge 2 commits into
jakedipity/agent-event-schemafrom
jakedipity/orchestration-event-schema

Conversation

@jakedipity

@jakedipity jakedipity commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

refactor(events): define orchestration SSE frames once
The producer and consumer each declared their own copy of OrchestrationStreamEvent, and they disagreed: plan_created did not parse, and iteration_complete bound to synthesizing. aura-events now holds the single definition, matching what the server emits, and the aura copy re-exports it. RoutingMode and IterationTimings move with it.

Emitted frames are unchanged; only the parsing side is corrected.

Ref: #623


feat(events): orchestration emits the agent event schema
Orchestration carried its own OrchestratorEvent enum between the orchestrator and the SSE projection. Its variants move onto AgentEventPayload, so orchestrated and single-agent runs share one vocabulary, and StreamItem carries that payload directly.

Emitted frames are unchanged; the projection reads the same field sets under a different type.

Ref: #623

@jakedipity
jakedipity requested a review from a team as a code owner September 1, 2026 20:57
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown

Greptile Summary

The PR centralizes orchestration event payloads and SSE frame definitions in aura-events, then updates the runtime and web projection to use the shared schema.

  • Moves orchestration payload variants onto AgentEventPayload.
  • Re-exports shared routing, timing, context, and SSE frame types.
  • Updates orchestration producers, stream transport, persistence, and tests to use the unified event vocabulary.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/aura-events/src/agent.rs Extends the shared agent payload vocabulary with orchestration, task attribution, and unified outcome fields.
crates/aura-events/src/orchestration.rs Centralizes orchestration SSE frame types, constructors, routing modes, and iteration timings.
crates/aura/src/orchestration/orchestrator.rs Replaces the private orchestration event enum with enveloped shared AgentEvent payloads.
crates/aura-web-server/src/streaming/handlers.rs Projects shared AgentEvent payloads into the centralized orchestration SSE frame schema.
crates/aura/src/orchestration/stream_events.rs Re-exports the centralized orchestration stream definitions while retaining local serialization tests.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  O[Orchestration runtime] --> A[AgentEvent]
  A --> P[AgentEventPayload]
  P --> H[Web stream projection]
  H --> S[Shared OrchestrationStreamEvent]
  S --> C[CLI and SSE consumers]
Loading

Reviews (5): Last reviewed commit: "feat(events): orchestration emits the ag..." | Re-trigger Greptile

Comment thread crates/aura-events/src/orchestration.rs Outdated
@jakedipity
jakedipity force-pushed the jakedipity/orchestration-event-schema branch 2 times, most recently from 10de369 to 1e780d5 Compare September 1, 2026 21:38
@jakedipity
jakedipity changed the base branch from jakedipity/single-agent-event-producer to jakedipity/agent-event-schema September 1, 2026 21:43
@jakedipity
jakedipity force-pushed the jakedipity/agent-event-schema branch from 4a4586f to 9e0dfbd Compare September 3, 2026 19:24
@jakedipity
jakedipity force-pushed the jakedipity/orchestration-event-schema branch from 1e780d5 to 966c455 Compare September 3, 2026 20:06
@jakedipity
jakedipity force-pushed the jakedipity/agent-event-schema branch from 9e0dfbd to f6e769b Compare September 3, 2026 20:22
The producer and consumer each declared their own copy of
OrchestrationStreamEvent, and they disagreed: plan_created did not
parse, and iteration_complete bound to synthesizing. aura-events now
holds the single definition, matching what the server emits, and the
aura copy re-exports it. RoutingMode and IterationTimings move with it.

Emitted frames are unchanged; only the parsing side is corrected.

Ref: #623
Signed-off-by: Jacob Hull <jacob@planethull.com>
Orchestration carried its own OrchestratorEvent enum between the
orchestrator and the SSE projection. Its variants move onto
AgentEventPayload, so orchestrated and single-agent runs share one
vocabulary, and StreamItem carries that payload directly.

Emitted frames are unchanged; the projection reads the same field sets
under a different type.

Ref: #623
Signed-off-by: Jacob Hull <jacob@planethull.com>
@jakedipity
jakedipity force-pushed the jakedipity/orchestration-event-schema branch from 966c455 to 025fbbd Compare September 3, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants