import { type JobEntry } from '../../common/entries/job.entry'; import { type WorkflowEntry } from '../../common/entries/workflow.entry'; import { type FrontMcpLogger } from '../../common/interfaces/logger.interface'; import { type JobRegistryInterface } from '../job.registry'; import { type JobExecutionState, type JobRunRecord, type JobStateStore, type WorkflowRunRecord } from '../store/job-state.interface'; export interface ExecuteJobOptions { background?: boolean; sessionId?: string; authInfo?: Partial>; contextProviders?: unknown; } export interface ExecuteWorkflowOptions extends ExecuteJobOptions { workflowInput?: Record; } export interface InlineJobResult { runId: string; result: unknown; state: JobExecutionState; logs: string[]; } export interface BackgroundJobResult { runId: string; state: 'pending'; } /** * Manages job and workflow executions, both inline (synchronous) * and background (async with status tracking). */ export declare class JobExecutionManager { private readonly stateStore; private readonly logger; private readonly notifyFn?; constructor(stateStore: JobStateStore, logger: FrontMcpLogger, notifyFn?: (data: Record) => Promise); /** * Execute a job inline (synchronous) or in background. */ executeJob(job: JobEntry, input: unknown, opts?: ExecuteJobOptions): Promise; /** * Execute a workflow inline or in background. */ executeWorkflow(workflow: WorkflowEntry, jobRegistry: JobRegistryInterface, opts?: ExecuteWorkflowOptions): Promise; /** * Get execution status. */ getStatus(runId: string): Promise; /** * List runs with optional filters. */ listRuns(opts?: { jobId?: string; sessionId?: string; state?: JobExecutionState; limit?: number; }): Promise<(JobRunRecord | WorkflowRunRecord)[]>; private executeJobInline; private executeJobBackground; private executeWorkflowInline; private executeWorkflowBackground; private updateState; private notify; } //# sourceMappingURL=job-execution.manager.d.ts.map