export interface StreamResult { /** Most recent payload delivered on this channel, or null if none received yet. */ latest: T | null; /** * All payloads accumulated on this channel. * * - `mode: 'append'` deliveries are pushed to the tail (continuous stream). * - `mode: 'replace'` deliveries collapse `all` to a single-element array * containing the latest payload — matching the channel's * "full replacement" semantics. */ all: T[]; /** * Truthy after the channel has delivered an envelope with * `complete: true`. Subscribers flip into a "channel closed" * rendering state based on this signal; further deliveries on a * completed channel are still accumulated, since the underlying * wire doesn't enforce quiescence. */ isComplete: boolean; } /** * Subscribe to deliveries on a named stream channel. * * Honors the channel's per-delivery `mode` ('append' vs 'replace') * and the optional `complete` terminal marker. Channels declared * `mode: 'replace'` on the spec typically emit every delivery with * `mode: 'replace'` — this hook folds them into a single-latest * value without accumulating history. * * @param channelName - Channel name from the GguiSession's streamSpec * @returns { latest, all, isComplete } */ export declare function useStream(channelName: string): StreamResult; //# sourceMappingURL=useStream.d.ts.map