Sub-issue of #488. webjs's RPC is request/response only. An action cannot return a ReadableStream / AsyncIterable and have it stream to the client (AI token streams, progress, large result sets). TanStack Start supports this via a multiplexed frame protocol (packages/start-server-core/src/frame-protocol.ts) + a raw-response marker (x-tss-raw) + late stream registration, serialized with seroval's toCrossJSONStream.
Design / approach
When an action (any verb, typically GET or POST) returns a ReadableStream / AsyncIterable / async generator, stream it over the RPC wire instead of buffering. The client stub returns an async iterable / stream the component consumes. Reuse webjs's existing streaming infra where possible (<webjs-stream> / Suspense streaming are render-side; this is RPC-result-side). Consider a framed wire (length-prefixed chunks) so a stream can interleave with the serialized envelope. Compose with #472 seeding (a streamed result is not seeded) and the verb work in #488.
Acceptance criteria
Sub-issue of #488. webjs's RPC is request/response only. An action cannot return a
ReadableStream/AsyncIterableand have it stream to the client (AI token streams, progress, large result sets). TanStack Start supports this via a multiplexed frame protocol (packages/start-server-core/src/frame-protocol.ts) + a raw-response marker (x-tss-raw) + late stream registration, serialized with seroval'stoCrossJSONStream.Design / approach
When an action (any verb, typically GET or POST) returns a
ReadableStream/AsyncIterable/ async generator, stream it over the RPC wire instead of buffering. The client stub returns an async iterable / stream the component consumes. Reuse webjs's existing streaming infra where possible (<webjs-stream>/ Suspense streaming are render-side; this is RPC-result-side). Consider a framed wire (length-prefixed chunks) so a stream can interleave with the serialized envelope. Compose with #472 seeding (a streamed result is not seeded) and the verb work in #488.Acceptance criteria
ReadableStream/AsyncIterablestreams over the RPC; the client stub yields chunks as they arrive.