import type { PartialResponse, RouteChainEntry } from './cache.js'; export interface StreamingContext { readonly navGeneration: number; readonly currentRequestPath: string; readonly activeChain: RouteChainEntry[]; readonly nonce: string; readonly injectedCss: Set; setDeferredReader(reader: Promise | null): void; setDeferredGeneration(gen: number): void; updateInventory(inv: string): void; markCacheComplete(requestPath: string): void; } export interface StreamingPartialResponse extends PartialResponse { readonly _deferredStream?: true; inventory?: string; } export declare function readStreamingPartial(resp: Response, requestPath: string, ctx: StreamingContext, signal?: AbortSignal): Promise; export declare function hasDeferredStream(data: PartialResponse): data is StreamingPartialResponse; export declare function startDeferredStream(data: PartialResponse): void; export declare function cancelDeferredStream(data: PartialResponse): Promise; export declare function applyDeferredStates(states: (Record | null)[], requestPath: string, ctx: StreamingContext): void;