"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecutionModePolicy = void 0;
const IntentClassifier_1 = require("./IntentClassifier");
class ExecutionModePolicy {
    decide(task, input) {
        const normalized = input.toLowerCase();
        if (normalized.includes('elite') || normalized.includes('máxima performance') || normalized.includes('maxima performance')) {
            return {
                executionMode: 'elite',
                swarmMode: 'consensus',
                maxBranches: 4,
                rationale: 'Modo elite explicitamente solicitado.'
            };
        }
        if (normalized.includes('performance')) {
            return {
                executionMode: 'performance',
                swarmMode: 'parallel',
                maxBranches: 3,
                rationale: 'Modo performance solicitado.'
            };
        }
        if (task.intent === IntentClassifier_1.TaskIntent.RESEARCH_ANALYSIS) {
            return {
                executionMode: 'balanced',
                swarmMode: 'parallel',
                maxBranches: 3,
                rationale: 'Research se beneficia de paralelismo leve por padrão.'
            };
        }
        if (task.intent === IntentClassifier_1.TaskIntent.ENGINEERING_BUILD) {
            return {
                executionMode: 'balanced',
                swarmMode: 'light',
                maxBranches: 2,
                rationale: 'Build complexo pede review, mas não consensus pesado por padrão.'
            };
        }
        return {
            executionMode: 'economical',
            swarmMode: 'none',
            maxBranches: 1,
            rationale: 'Tarefa simples segue rota econômica.'
        };
    }
}
exports.ExecutionModePolicy = ExecutionModePolicy;
