"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ConsequenceForecaster_1 = require("./orchestrator/ConsequenceForecaster");
function assert(condition, message) {
    if (!condition)
        throw new Error(message);
}
async function main() {
    const f = new ConsequenceForecaster_1.ConsequenceForecaster();
    const high = f.forecast('deploy prod', 'high', { executionMode: 'performance', swarmMode: 'parallel', maxBranches: 3, rationale: 'x' }, ['codex', 'claude']);
    assert(high.selectedPath.id === 'conservative', 'high risk should choose conservative path');
    const lowSafe = f.forecast('deploy produção com compliance', 'low', { executionMode: 'balanced', swarmMode: 'light', maxBranches: 2, rationale: 'x' }, ['codex', 'claude']);
    assert(['conservative', 'balanced'].includes(lowSafe.selectedPath.id), 'safety-biased low risk should avoid aggressive path');
    assert(lowSafe.selectedPath.id !== 'aggressive', 'safety-biased low risk should avoid aggressive path');
    const lowSpeed = f.forecast('hotfix urgente', 'low', { executionMode: 'balanced', swarmMode: 'light', maxBranches: 2, rationale: 'x' }, ['codex', 'claude']);
    assert(lowSpeed.selectedPath.id !== 'conservative', 'speed-biased low risk should avoid conservative path when possible');
    assert(lowSpeed.consideredPaths.length === 3, 'should consider 3 paths');
    assert(lowSpeed.executiveSummary.includes('Viés do objetivo='), 'summary should include goal bias');
    console.log('TEST_CONSEQUENCE_FORECASTER_OK');
}
main().catch((error) => {
    console.error(error.message || error);
    process.exit(1);
});
