Skip to content

feat(events): HITL approvals emit the agent event schema - #634

Open
jakedipity wants to merge 3 commits into
jakedipity/single-agent-event-producerfrom
jakedipity/hitl-event-schema
Open

feat(events): HITL approvals emit the agent event schema#634
jakedipity wants to merge 3 commits into
jakedipity/single-agent-event-producerfrom
jakedipity/hitl-event-schema

Conversation

@jakedipity

Copy link
Copy Markdown
Collaborator

The five approval publish sites in the decision route build AgentEvents and go through agent_events::emit, alongside the other producers that reach consumers via a broker.

Ref: #624

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

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown

Greptile Summary

The PR migrates five HITL approval lifecycle publication sites to the unified agent-event schema while preserving delivery through the existing approval broker.

  • Wraps requested, pending, and completed approval payloads in AgentEvent.
  • Routes webhook and conversational approval events through agent_events::emit.
  • Retains request-keyed delivery and the existing client-facing approval payloads.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/aura/src/hitl/route.rs Migrates five approval lifecycle publications to the agent-event emitter, whose adapter preserves the existing approval-broker payload and routing behavior.

Sequence Diagram

sequenceDiagram
    participant H as HITL decision route
    participant E as agent_events::emit
    participant B as Approval event broker
    participant S as Web or CLI stream
    H->>E: AgentEvent with approval payload
    E->>B: ApprovalLifecycleEvent keyed by request ID
    B->>S: Requested, pending, or completed event
Loading

Reviews (2): Last reviewed commit: "feat(events): HITL approvals emit the ag..." | Re-trigger Greptile

Adds aura_events::agent, the event vocabulary a running agent emits,
and aura::agent_events, which republishes it onto the request-scoped
brokers so consumers are unaffected. A differential test asserts both
paths produce identical SSE.

No producer emits the schema yet; agent_events_enabled reads
AURA_AGENT_EVENTS and is the seam producers will gate on.

Ref: #618
Signed-off-by: Jacob Hull <jacob@planethull.com>
The four single-agent emission sites — the hook's tool_requested and
tool_usage, MCP tool_start, and MCP progress — build AgentEvents and go
through agent_events::emit, which publishes to the broker each payload
belongs to. A differential test drives the same sequence through the
broker calls and through emit, asserting the SSE frames match.

emit is the seam a real event stream attaches to once a consumer reads
it directly.

Ref: #620
Signed-off-by: Jacob Hull <jacob@planethull.com>
@jakedipity
jakedipity force-pushed the jakedipity/single-agent-event-producer branch from 0ad5573 to 89cf3cc Compare September 3, 2026 19:43
The five approval publish sites in the decision route build AgentEvents
and go through agent_events::emit, alongside the other producers that
reach consumers via a broker.

Ref: #624
Signed-off-by: Jacob Hull <jacob@planethull.com>
@jakedipity
jakedipity force-pushed the jakedipity/hitl-event-schema branch from 9ee8dad to 88e586a Compare September 3, 2026 20:09
@jakedipity
jakedipity force-pushed the jakedipity/single-agent-event-producer branch 2 times, most recently from c0afcc9 to ac61392 Compare September 3, 2026 20:42
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.

1 participant