import type { ChatTransport, UIMessage, UIMessageChunk } from "ai"; /** * Director mode: a chat transport that replays an authored (or recorded) * sequence of UI-message chunks at scripted pacing instead of calling the * agent. The thread, beats, reveals, approvals, and morphs downstream are the * REAL components rendering a real part stream — only the source of the * stream is scripted. Demo/capture tooling only; hosts opt in explicitly by * passing it through the provider (`VendoProvider transport`), it is never a * default. * * A cue's `chunk` is exactly one SSE `data:` payload of the live wire * (`UIMessageChunk`), so a capture of a real build replays verbatim. */ export interface DirectorCue { /** Milliseconds to wait after the previous cue before emitting this chunk. */ delay: number; chunk: UIMessageChunk; } export interface DirectorScript { /** Single-turn form. */ cues?: DirectorCue[]; /** * Multi-turn form: each sendMessages call (initial send, then each * approval-driven resume) plays the next turn in order; the last turn * repeats if the surface asks again. */ turns?: Array<{ cues: DirectorCue[]; }>; } export declare class ScriptedTransport implements ChatTransport { private readonly script; private readonly options; private turnIndex; constructor(script: DirectorScript, options?: { speed?: number; }); sendMessages(options: { abortSignal: AbortSignal | undefined; }): Promise>; reconnectToStream(): Promise | null>; }