"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const OutcomeSimulator_1 = require("./orchestrator/OutcomeSimulator");
function assert(condition, message) {
    if (!condition)
        throw new Error(message);
}
async function main() {
    const simulator = new OutcomeSimulator_1.OutcomeSimulator();
    const highRisk = simulator.simulate({
        goal: 'deploy prod com força',
        governanceRisk: 'high',
        preferredExecutors: ['codex', 'claude'],
        basePolicy: { executionMode: 'elite', swarmMode: 'consensus', maxBranches: 4, rationale: 'base' }
    });
    assert(highRisk.predictedOutcome === 'blocked', 'high risk should predict blocked');
    assert(highRisk.recommendedPolicy.swarmMode === 'none', 'high risk should reduce swarm mode');
    const noFallback = simulator.simulate({
        goal: 'task',
        governanceRisk: 'low',
        preferredExecutors: ['gemini'],
        basePolicy: { executionMode: 'performance', swarmMode: 'parallel', maxBranches: 3, rationale: 'base' }
    });
    assert(noFallback.predictedOutcome === 'partial', 'single executor should predict partial');
    const healthy = simulator.simulate({
        goal: 'task',
        governanceRisk: 'low',
        preferredExecutors: ['gemini', 'claude', 'codex'],
        basePolicy: { executionMode: 'balanced', swarmMode: 'light', maxBranches: 2, rationale: 'base' }
    });
    assert(healthy.predictedOutcome === 'success', 'multi fallback should predict success');
    assert(healthy.recommendedExecutors[0] === 'codex', 'should prioritize codex in recommended order');
    console.log('TEST_OUTCOME_SIMULATOR_OK');
}
main().catch((error) => {
    console.error(error.message || error);
    process.exit(1);
});
