import { PromptResult, Result, StreamChunk, ToolCallJSON, UserContentInput } from "smoltalk"; import type { RuntimeContext } from "./state/context.js"; import type { StateStack } from "./state/stateStack.js"; import { GraphState } from "./types.js"; export declare function isGenerator(variable: any): boolean; export declare function handleStreamingResponse(args: { ctx: RuntimeContext; completion: AsyncGenerator; prompt: string | UserContentInput; /** The branch-local stack, if this call runs inside a fork/race branch. * Used to discover scoped `callback("onStream")` registrations on the * right frame chain — passed straight through to the callback machinery. */ stateStack?: StateStack; }): Promise | undefined>;