import { ChildProcess } from 'node:child_process'; export type ExecutionResultType = 'SUCCESS' | 'ERROR' | 'WARNING'; export interface ExecutionMessage { _id: string; executionId: string; content: string; createdAt: string; } export interface ExecutionState { _id: string; toolId: string; toolVersion: string; progress: number; result?: ExecutionResultType; resultMessage?: string; messages: ExecutionMessage[]; createdAt: string; updatedAt?: string; creatingUser: string; childProcess: ChildProcess | null; tmpFile: string; } export interface ExecutionEntity { _id: string; toolId: string; toolVersion: string; progress: number; result?: ExecutionResultType; resultMessage?: string; messages: ExecutionMessage[]; createdAt: string; updatedAt?: string; creatingUser: string; } export type ExecutionEventListener = (executionId: string, data: unknown) => void; export declare class ExecutionManager { private executions; private listeners; onExecutionEvent(listener: ExecutionEventListener): () => void; private emit; getExecution(executionId: string): ExecutionState | undefined; listExecutions(componentId: string): ExecutionEntity[]; abortExecution(executionId: string): ExecutionEntity | undefined; startExecution(componentId: string, executionParams: object, config: { bundlePath: string; accessToken: string; apiUrl: string; cwd: string; }): ExecutionState; } export declare function toExecutionEntity(state: ExecutionState): ExecutionEntity;