/**
 * ╔══════════════════════════════════════════════════════════════════════╗
 * ║   OVERMIND BRIDGE — ScenarioLoader (Multi-Agent Orchestration)      ║
 * ║                                                                      ║
 * ║   Charge un scénario depuis YAML/JSON qui décrit un workflow        ║
 * ║   multi-agents : séquentiel, parallèle, conditionnel, A2A.          ║
 * ║                                                                      ║
 * ║   FORMAT JSON                                                         ║
 * ║   ──────────                                                         ║
 * ║   {                                                                   ║
 * ║     "name": "My workflow",                                            ║
 * ║     "vars": { "ticker": "BTC" },                                      ║
 * ║     "steps": [                                                        ║
 * ║       { "id": "step1", "type": "run", "agent": "scout",              ║
 * ║         "runner": "kilo", "prompt": "Analyse ${ticker}" },            ║
 * ║       { "id": "step2", "type": "a2a", "from": "scout", "to":         ║
 * ║         "analyst", "prompt": "Valide ${step1.output}" },              ║
 * ║       { "id": "step3", "type": "parallel", "steps": [...] }           ║
 * ║     ]                                                                 ║
 * ║   }                                                                   ║
 * ╚══════════════════════════════════════════════════════════════════════╝
 */
export type ScenarioStep = RunStep | A2AStep | ParallelStep | ConditionalStep | WaitStep | KanbanStep;
export interface RunStep {
    id: string;
    type: 'run';
    agent: string;
    runner: string;
    prompt: string;
    model?: string;
    mode?: string;
    path?: string;
    /** Output saved as ${stepId.output} pour les steps suivants */
    outputVar?: string;
    /** Si true, arrête le scénario si ce step échoue */
    stopOnError?: boolean;
}
export interface A2AStep {
    id: string;
    type: 'a2a';
    from: string;
    to: string;
    runner: string;
    prompt: string;
    model?: string;
    outputVar?: string;
    stopOnError?: boolean;
}
export interface ParallelStep {
    id: string;
    type: 'parallel';
    steps: ScenarioStep[];
    waitAll?: boolean;
    outputVar?: string;
}
export interface ConditionalStep {
    id: string;
    type: 'if';
    /** Expression simple : ${var} == "value" ou ${var} (truthy) */
    condition: string;
    then: ScenarioStep[];
    else?: ScenarioStep[];
}
export interface WaitStep {
    id: string;
    type: 'wait';
    ms: number;
}
/**
 * Kanban Step (v3.0) — Durable task via Hermes Kanban.
 *
 * Creates a Kanban task, optionally waits for completion, and exposes
 * the result as ${stepId.output}. If the server crashes, the Kanban
 * task survives and can be reclaimed automatically.
 */
export interface KanbanStep {
    id: string;
    type: 'kanban';
    assignee: string;
    title: string;
    body?: string;
    tenant?: string;
    wait?: boolean;
    timeoutMs?: number;
    /** Output saved as ${stepId.output} */
    outputVar?: string;
}
export interface Scenario {
    name: string;
    description?: string;
    vars?: Record<string, string>;
    steps: ScenarioStep[];
}
export interface StepResult {
    stepId: string;
    type: string;
    success: boolean;
    output?: unknown;
    error?: string;
    durationMs: number;
}
/**
 * Charge un scénario depuis un fichier. Supporte JSON et YAML.
 */
export declare function loadScenario(filePath: string): Promise<Scenario>;
export interface ScenarioRunnerContext {
    /** Variables partagées (input vars + outputs des steps précédents) */
    vars: Record<string, string>;
    /** Fonction qui exécute un appel agent.run (retourne le text) */
    runAgent: (params: {
        agentName: string;
        runner: string;
        prompt: string;
        model?: string;
        mode?: string;
        path?: string;
    }) => Promise<{
        text: string;
        sessionId?: string;
        isError: boolean;
        messageId?: string;
    }>;
    /** Fonction qui exécute un appel agent.a2a */
    runA2A: (params: {
        fromAgent: string;
        toAgent: string;
        runner: string;
        prompt: string;
        model?: string;
    }) => Promise<{
        text: string;
        sessionId?: string;
        isError: boolean;
        messageId?: string;
    }>;
    /** Logger */
    log?: (msg: string) => void;
}
/**
 * Exécute un scénario séquentiellement. Retourne tous les résultats.
 */
export declare function runScenario(scenario: Scenario, ctx: ScenarioRunnerContext): Promise<StepResult[]>;
//# sourceMappingURL=ScenarioLoader.d.ts.map