"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SquadRouter = void 0;
const IntentClassifier_1 = require("./IntentClassifier");
class SquadRouter {
    registry;
    constructor(registry) {
        this.registry = registry;
    }
    route(task, input) {
        if (task.intent === IntentClassifier_1.TaskIntent.ENGINEERING_BUILD) {
            return {
                squads: this.pick(['ai-builder', 'automated-code-review-squad']),
                rationale: 'Build complexo deve priorizar AI Builder + code review.'
            };
        }
        if (task.intent === IntentClassifier_1.TaskIntent.RESEARCH_ANALYSIS) {
            return {
                squads: this.pick(['capital-ai', 'advisory-board', 'data-squad']),
                rationale: 'Research estratégico pede análise, conselho e dados.'
            };
        }
        return {
            squads: this.registry.all().slice(0, 2),
            rationale: 'Fallback genérico de squads.'
        };
    }
    pick(ids) {
        const all = this.registry.all();
        return all.filter(s => ids.some(id => s.id.includes(id)));
    }
}
exports.SquadRouter = SquadRouter;
