TanStack

MemoryStreamInit

Interface: MemoryStreamInit

Defined in: packages/ai/src/stream-durability.ts:308

Explicit construction for memoryStream, for callers that don't have the incoming Request — e.g. a TanStack Start server function implementing a joinRun replay for a run id it received as call data:

ts
const durability = memoryStream({ runId })
for await (const chunk of replayRunStream(durability)) yield chunk

Properties

offset?

ts
optional offset?: string | null;

Defined in: packages/ai/src/stream-durability.ts:315

Resume offset captured by the consumer (resumeFrom() returns it). Defaults to null (a producer / from-start reader).


runId

ts
runId: string;

Defined in: packages/ai/src/stream-durability.ts:310

The run this durability adapter attaches to.