@mock_only Feature: A2A SSE streaming for task updates and artifacts As a CleverAgents developer I want the A2A event system to support SSE streaming So that clients can receive real-time task status and artifact updates Scenario: SSE event formatter produces valid text/event-stream output Given an A2aEvent with type "TaskStatusUpdateEvent" and plan_id "plan-001" When I format the event as SSE Then the SSE output should contain "event: TaskStatusUpdateEvent" And the SSE output should contain "id: " And the SSE output should contain "data: " And the SSE output should end with two newlines Scenario: SSE keepalive produces a comment line When I format a keepalive SSE message Then the keepalive should start with ":" Scenario: EventBusBridge translates plan status events Given an A2aEventQueue for SSE testing And a mock EventBus And an EventBusBridge connecting bus to queue When the bridge receives a PLAN_CREATED domain event Then the queue should contain a TaskStatusUpdateEvent Scenario: EventBusBridge translates artifact events Given an A2aEventQueue for SSE testing And a mock EventBus And an EventBusBridge connecting bus to queue When the bridge receives a CHECKPOINT_RESTORED domain event Then the queue should contain a TaskArtifactUpdateEvent Scenario: EventBusBridge handles closed queue gracefully Given an A2aEventQueue for SSE testing And a mock EventBus And an EventBusBridge connecting bus to queue When the queue is closed And the bridge receives a PLAN_CREATED domain event Then no error should be raised from the bridge Scenario: TaskStatusUpdateEvent type constant is defined Then the TASK_STATUS_UPDATE constant should equal "TaskStatusUpdateEvent" Scenario: TaskArtifactUpdateEvent type constant is defined Then the TASK_ARTIFACT_UPDATE constant should equal "TaskArtifactUpdateEvent" Scenario: SseEventFormatter data payload is valid JSON Given an A2aEvent with type "TaskStatusUpdateEvent" and plan_id "plan-002" When I format the event as SSE Then the SSE data line should contain valid JSON And the JSON should have key "event_type" with value "TaskStatusUpdateEvent" And the JSON should have key "plan_id" with value "plan-002"