/** * Compatibility adapter for the historical V2 pipeline executor API. * * Execution now belongs to `workflow/execute.ts`; this module only compiles the * V2 surface to WorkflowIR and maps the unified result/error shapes back to the * public legacy contract. */ import { Context, Effect, Layer } from 'effect'; import type { AgentMessage, AgentResponse, AnyAgentInstance } from '../agent/agent'; import type { Tracer } from '../tracing'; import type { HookEvent, HookType } from '../hooks/types'; import type { CheckpointManager } from './checkpoint/manager'; import type { PipelineContext } from './context'; import { PipelineExecutionError } from './errors'; import type { PipelineConfigV2 } from './pipeline'; /** Minimal agent manager interface retained for public compatibility. */ export interface AgentManagerLike { getAgent(id: string): AnyAgentInstance | undefined; hasAgent(id: string): boolean; } /** Minimal hook manager interface retained for public compatibility. */ export interface HookManagerLike { executeHooks(hookName: HookType, event: HookEvent): Promise; executeHooksAndMerge(hookName: HookType, event: HookEvent): Promise<{ abort?: boolean; skip?: boolean; metadata?: Record; }>; } export interface PipelineResult { success: boolean; status?: 'completed' | 'failed' | 'paused' | 'aborted'; context: PipelineContext; executedNodes: string[]; finalOutput?: unknown; error?: Error; abortedBy?: string; runId?: string; pauseRequest?: { prompt: string; choices?: string[]; schema?: Record; metadata?: Record; }; } export interface ExecutorOptions { agentManager: AgentManagerLike; hookManager?: HookManagerLike; tracer?: Tracer; pipelineManager?: { getPipeline: (id: string) => { execute: (input: unknown) => Promise; } | undefined; }; checkpointManager?: CheckpointManager; } export interface ExtendedExecutionOptions extends ExecutorOptions { conversationId?: string; history?: Array<{ role: string; content: string; }>; runId?: string; startStep?: number; restoredContext?: PipelineContext; } export interface ExecutorService { executePipelineV2(config: PipelineConfigV2, input: string, options: ExtendedExecutionOptions): Effect.Effect; } export declare const ExecutorService: Context.Tag; export declare function executePipelineV2Effect(config: PipelineConfigV2, input: string, options: ExtendedExecutionOptions): Effect.Effect; export declare const ExecutorServiceLive: Layer.Layer; export type { AgentMessage }; //# sourceMappingURL=executor.d.ts.map