import { type VarDecl } from './prompt-translator';
import { type Injector } from './llm-dispatcher';
export interface FlowV3 {
    version: 3;
    trackName: string;
    adapter: 'claude-code' | 'codex' | 'qwen' | 'gemini';
    variables: VarDecl[];
    nodes: NodeV3[];
    edges: EdgeV3[];
}
export type NodeV3 = UserInputNode | LLMNode | IfNode;
export interface NodeBase {
    id: string;
    position: {
        x: number;
        y: number;
    };
    label?: string;
}
export interface UserInputNode extends NodeBase {
    type: 'user_input';
    fields: {
        varKey: string;
        uiHint?: string;
        variants?: string[];
    }[];
}
export interface LLMNode extends NodeBase {
    type: 'llm';
    promptTemplate: string;
    inputs: string[];
    outputs: string[];
}
export interface IfNode extends NodeBase {
    type: 'if';
    conditionExpr: string;
}
export interface EdgeV3 {
    id: string;
    source: string;
    sourceHandle?: 'default' | 'true' | 'false';
    target: string | null;
}
export interface RuntimeDeps {
    projectFolder: string;
    basename: string;
    runId: string;
    injector: Injector;
    broadcast: (event: string, payload: Record<string, unknown>) => void;
    getTerminalRef?: () => object | null;
}
export interface UserInputPromise {
    resolve: (values: Record<string, unknown>) => void;
    reject: (err: Error) => void;
}
/**
 * Submit user input from frontend. Resolves the runtime's await.
 */
export declare function submitUserInputForRun(runId: string, values: Record<string, unknown>): boolean;
export declare function runFlow(flow: FlowV3, initialSnapshot: Record<string, unknown>, deps: RuntimeDeps): Promise<void>;
//# sourceMappingURL=runtime.d.ts.map