@every-env/cli
Version:
Multi-agent orchestrator for AI-powered development workflows
40 lines • 1.46 kB
TypeScript
import { ChildProcess } from 'child_process';
import { EventEmitter } from 'events';
import { Agent } from '../types/config.js';
export interface AgentOptions {
workingDir?: string;
env?: Record<string, string>;
timeout?: number;
retries?: number;
stdio?: 'inherit' | 'pipe' | Array<'inherit' | 'pipe' | 'ignore'>;
}
export interface AgentResult {
agentId: string;
status: 'success' | 'failed' | 'timeout';
outputFile?: string;
duration: number;
stdout: string[];
stderr: string[];
error?: string;
}
export declare abstract class BaseAgent extends EventEmitter {
protected config: Agent;
protected options: AgentOptions;
protected process?: ChildProcess;
protected startTime?: number;
protected stdout: string[];
protected stderr: string[];
protected outputSize: number;
protected processTimeout?: NodeJS.Timeout;
constructor(config: Agent, options?: AgentOptions);
abstract run(prompt: string, outputPath: string): Promise<AgentResult>;
/**
* Stops the running process gracefully
*/
stop(): Promise<void>;
protected spawnProcess(command: string, args: string[], prompt: string): Promise<number>;
protected setupProcessHandlers(): void;
protected sendPrompt(prompt: string): void;
protected buildResult(status: 'success' | 'failed' | 'timeout', outputFile?: string, error?: string): AgentResult;
}
//# sourceMappingURL=base-agent.d.ts.map