v0.3.0 — real OAI streaming
Replaces the previous single-chunk fake-stream on
/openai/v1/chat/completions with stream=true. New components:
- StreamEvent + AgentAdapter.parse_stream_event — typed per-line
adapter hook for structured streaming.
- shared.runner.run_stream — async generator over the agent's
stdout. Default behaviour: one text delta per line; adapters
override parse_stream_event to decode their native event stream
(json-verbose, etc.).
- oai.py _stream_response — emits one chat.completion.chunk per
delta event, real-time. Subprocess killed on client disconnect.
Bonus: oai.py reads usage token counts through alias-aware helper
(input_tokens / inputTokens / input — same for output) so adapters
don't need to dual-write the key shape.
No breaking changes — adapters without a custom parse_stream_event
get the default line-per-delta behaviour automatically, which is
itself a strict improvement over the old buffered single-chunk path.