Class: A2A::SSE::RestStream

Inherits:
Stream
  • Object
show all
Defined in:
lib/a2a/sse/rest_stream.rb

Overview

SSE stream for the HTTP+JSON/REST binding.

Per the A2A spec, REST streaming returns SSE where each ‘data:` line is a bare StreamResponse JSON object (no envelope wrapping).

This is essentially just an alias for Stream — the base class already emits bare JSON. We keep this as a named class for symmetry with JsonRpcStream and to make binding code self-documenting.

Usage:

stream = A2A::SSE::RestStream.new

Async do
  stream.event({ "task" => { ... } })
  stream.finish
end

[200, A2A::SSE::Stream.headers, stream]

Constant Summary

Constants inherited from Stream

Stream::SSE_HEADERS

Method Summary

Methods inherited from Stream

#event, #finish, headers