Skip to content

feat: add reliable streaming with checkpoints, native Responses SSE, … - #77

Merged
gabrion-stewart merged 1 commit into
mainfrom
feat/reliable-streaming-and-checkpoints
Sep 13, 2026
Merged

gabrion-stewart merged 1 commit into
mainfrom
feat/reliable-streaming-and-checkpoints

Conversation

@gabrion-stewart

Copy link
Copy Markdown
Collaborator

…and typed output

  • Introduce application-owned checkpoint lifecycle (CheckpointSink, AgentCheckpoint, CheckpointBoundary) with awaited persistence at request/response/tool-batch/terminal boundaries, including partial streaming snapshots and cancellation/provider-failure records
  • Add fallible async ContextPolicy with explicit failure behavior and history processor integration that preserves native tool-call pairs without silent truncation
  • Replace buffered Responses streaming fallback with true incremental SSE (responses_stream.rs), adding native terminal metadata, ordered native replay, and strict terminal-status handling
  • Add TypedAgentStream and run_stream_typed recovering validator-transformed Output after terminal checkpoint success
  • Unify both streaming constructors under a worker supervisor that observes cancellation and receiver closure across the full run lifetime; committed terminal checkpoints win over later detach/cancel
  • Harden OpenAI Chat SSE: byte-buffered UTF-8 parsing, single terminal event, deterministic part closing, tool-call validation before dispatch, and premature-EOF errors
  • Run configured schema parsing, async output validators, and dynamic prompts in streaming; validation exhaustion fails closed instead of signaling valid output
  • Honor streaming parallel-tool settings with bounded, ordered results and retries; correct explicit output-tool mixed-call Early/Exhaustive decisions in both execution paths
  • Redact sensitive Debug output for thinking deltas, model responses, and native terminal metadata

…and typed output

- Introduce application-owned checkpoint lifecycle (CheckpointSink, AgentCheckpoint, CheckpointBoundary) with awaited persistence at request/response/tool-batch/terminal boundaries, including partial streaming snapshots and cancellation/provider-failure records
- Add fallible async ContextPolicy with explicit failure behavior and history processor integration that preserves native tool-call pairs without silent truncation
- Replace buffered Responses streaming fallback with true incremental SSE (responses_stream.rs), adding native terminal metadata, ordered native replay, and strict terminal-status handling
- Add TypedAgentStream and run_stream_typed recovering validator-transformed Output after terminal checkpoint success
- Unify both streaming constructors under a worker supervisor that observes cancellation and receiver closure across the full run lifetime; committed terminal checkpoints win over later detach/cancel
- Harden OpenAI Chat SSE: byte-buffered UTF-8 parsing, single terminal event, deterministic part closing, tool-call validation before dispatch, and premature-EOF errors
- Run configured schema parsing, async output validators, and dynamic prompts in streaming; validation exhaustion fails closed instead of signaling valid output
- Honor streaming parallel-tool settings with bounded, ordered results and retries; correct explicit output-tool mixed-call Early/Exhaustive decisions in both execution paths
- Redact sensitive Debug output for thinking deltas, model responses, and native terminal metadata
@gabrion-stewart
gabrion-stewart merged commit 96b693b into main Sep 13, 2026
4 checks passed
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