"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createRunners = createRunners;
const antigravity_1 = require("./antigravity");
const anthropicSdk_1 = require("./anthropicSdk");
const claude_1 = require("./claude");
const codex_1 = require("./codex");
const cursor_1 = require("./cursor");
const windsurf_1 = require("./windsurf");
const logger_1 = require("../logger");
const registry = {
    antigravity: new antigravity_1.AntigravityRunner(),
    'anthropic-sdk': new anthropicSdk_1.AnthropicSdkRunner(),
    claude: new claude_1.ClaudeRunner(),
    codex: new codex_1.CodexRunner(),
    cursor: new cursor_1.CursorRunner(),
    windsurf: new windsurf_1.WindsurfRunner(),
};
function createRunners(config) {
    const runners = config.agents.map((name) => registry[name]);
    const available = runners.filter((r) => r.isAvailable()).map((r) => r.name);
    const unavailable = runners.filter((r) => !r.isAvailable()).map((r) => r.name);
    logger_1.logger.info(`Configured runners (in order): ${runners.map((r) => r.name).join(', ')}`);
    if (unavailable.length > 0) {
        logger_1.logger.warn(`Runners not found on this system: ${unavailable.join(', ')} — they will be skipped`);
    }
    if (available.length === 0) {
        logger_1.logger.error('No configured runners are available on this system');
    }
    return runners;
}
//# sourceMappingURL=index.js.map