"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DynamicAgentExecutor = void 0;
class DynamicAgentExecutor {
    taskExecutor;
    constructor(taskExecutor) {
        this.taskExecutor = taskExecutor;
    }
    async execute(agent, goal, taskId) {
        const prompt = `[Agente Dinâmico]\n${agent.name} (${agent.role})\n\n[Capabilities]\n${agent.capabilities.join(', ')}\n\n[Objetivo]\n${goal}`;
        const result = await this.taskExecutor.execute('codex', prompt, `${taskId}_dynamic_${agent.id}`);
        return result.stdout || result.stderr || '';
    }
}
exports.DynamicAgentExecutor = DynamicAgentExecutor;
