import { type ProviderMessageProjection } from "@b4run/sdk"; import type { AgentStreamChunk } from "./agent-adapter.js"; import { type CanonicalJsonStream } from "./canonical-json-stream.js"; type RecordValue = Record; interface CallStream { readonly args: CanonicalJsonStream; raw: string; ended: boolean; result: string | undefined; step: string; } /** Native projection state scoped to one owner's single model invocation. */ export interface ProviderStreamState { provider: string | undefined; message: RecordValue; readonly ids: Set; readonly indices: Set; readonly calls: Map; answer: ProviderMessageProjection["answer"]; } /** Creates an isolated accumulator; callers discard it after the model ends. */ export declare function createProviderStreamState(): ProviderStreamState; /** * Accumulates native SDK-shaped progress and emits provider lifecycle frames. * The canonical message id creates derived identities; runId is only the live owner. */ export declare function projectProviderChunk(state: ProviderStreamState, value: unknown, runId: string, final?: boolean, provider?: string): AgentStreamChunk[]; /** Removes only native identities and correlated native block indices from app fragments. */ export declare function ordinaryProviderChunk(state: ProviderStreamState, value: unknown): unknown; export {}; //# sourceMappingURL=provider-stream.d.ts.map