capsule-ai-cli
Version:
The AI Model Orchestrator - Intelligent multi-model workflows with device-locked licensing
28 lines • 1.37 kB
TypeScript
import { ToolCall, ToolExecution, ToolProgress } from './types.js';
import { EventEmitter } from 'events';
export interface ToolExecutorEvents {
'execution:start': (execution: ToolExecution) => void;
'execution:progress': (executionId: string, progress: ToolProgress) => void;
'execution:complete': (execution: ToolExecution) => void;
'execution:error': (execution: ToolExecution) => void;
}
export declare class ToolExecutor extends EventEmitter {
private executions;
private abortControllers;
constructor();
emit<K extends keyof ToolExecutorEvents>(event: K, ...args: Parameters<ToolExecutorEvents[K]>): boolean;
on<K extends keyof ToolExecutorEvents>(event: K, listener: ToolExecutorEvents[K]): this;
execute(toolCall: ToolCall, options?: {
workingDirectory?: string;
requireApproval?: boolean;
onApproval?: () => Promise<boolean>;
}): Promise<ToolExecution>;
executeSequence(toolCalls: ToolCall[], options?: Parameters<typeof this.execute>[1]): Promise<ToolExecution[]>;
cancel(executionId: string): boolean;
getExecution(executionId: string): ToolExecution | undefined;
getAllExecutions(): ToolExecution[];
clearCompleted(): void;
formatExecution(execution: ToolExecution): string;
}
export declare const toolExecutor: ToolExecutor;
//# sourceMappingURL=executor.d.ts.map