fix(streaming): project structured output live - #7352
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThe PR projects selected structured string fields into live agent-event sinks while keeping sink and byte-stream forwarding coordinated.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/executor/utils.ts | Adds incremental top-level JSON string projection, selector handling, escape decoding, and per-turn reset behavior. |
| apps/sim/executor/execution/block-executor.ts | Connects projected subscriptions to streaming executions and explicitly records when sink events match the transformed client stream. |
| apps/sim/lib/workflows/streaming/forward-agent-stream-events.ts | Allows answer text to come from a transformed sink only when its projection matches the transformed byte stream. |
| apps/sim/lib/workflows/streaming/streaming.ts | Reuses the sink-selection contract for negotiated deployed agent-event streams. |
| apps/sim/lib/webhooks/slack-execution-stream.ts | Streams matching projected sink text through Slack while preserving its acknowledged append-only turn behavior. |
| apps/sim/lib/workflows/streaming/streaming.test.ts | The previously reported contract bypass is fixed; the new fixture is contextually checked against production streaming types. |
Sequence Diagram
sequenceDiagram
participant P as Provider stream
participant X as Block executor
participant J as JSON field projector
participant S as Event sink
participant C as Client or Slack
P->>X: Structured text_delta events
X->>J: Raw JSON chunks
J->>S: Selected string-field deltas
S->>C: Live projected answer text
P->>X: turn_end
X->>J: Reset projection state
X-->>C: Drain transformed byte stream without duplicate forwarding
Reviews (3): Last reviewed commit: "fix(streaming): match encoded output sel..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Fix all with cubic | Re-trigger cubic
|
Closing in favor of a simpler streaming contract: unstructured agent text may stream, while structured outputs remain terminal values after complete validation. Tool and thinking events can continue streaming independently. |
Summary
Type of Change
Testing
Checklist