mcp-subagents
Version:
Multi-Agent AI Orchestration via Model Context Protocol - Access specialized CLI AI agents (Aider, Qwen, Gemini, Goose, etc.) with intelligent fallback and configuration
26 lines • 772 B
JavaScript
import { AgentExecutionError } from '../errors.js';
export class BaseAgent {
name;
config;
constructor(name, config) {
this.name = name;
this.config = config;
}
validateCommand(command) {
if (command.length === 0) {
throw new AgentExecutionError('Empty command generated', this.name);
}
const invalidArgs = command.filter(arg => arg === undefined || arg === null);
if (invalidArgs.length > 0) {
throw new AgentExecutionError('Invalid command arguments', this.name);
}
return command;
}
getAutoAcceptFlag() {
return this.config.autoAcceptFlag;
}
getModelFlag() {
return this.config.modelFlag;
}
}
//# sourceMappingURL=base.js.map