import type { ExecutionContext, IStepExecutor, StepExecutionResult } from '../types/execution-context'; import type { ConfirmableStepExecutionData, StepExecutionData } from '../types/step-execution-data'; import type { Step } from '../types/validated/execution'; import type { StepDefinition } from '../types/validated/step-definition'; import type { ErrorKind, StepStatus } from '../types/validated/step-outcome'; import type { BaseMessage, DynamicStructuredTool, StructuredToolInterface } from '@forestadmin/ai-proxy'; import { SystemMessage } from '@forestadmin/ai-proxy'; export default abstract class BaseStepExecutor implements IStepExecutor { protected readonly context: ExecutionContext; constructor(context: ExecutionContext); execute(): Promise; private buildErrorOutcome; protected abstract doExecute(): Promise; protected checkIdempotency(): Promise; private runWithTimeout; protected abstract buildOutcomeResult(outcome: { status: StepStatus; error?: string; errorKind?: ErrorKind; errorSourceStepIndex?: number; }): StepExecutionResult; protected findPendingExecution(type: string): Promise; protected patchAndReloadPendingData(pendingData?: unknown): Promise; protected handleConfirmationFlow(execution: TExec, resolveAndExecute: (execution: TExec) => Promise): Promise; protected buildContextMessage(): SystemMessage; protected buildPreviousStepsMessages(): Promise; protected resolveStepExecution(step: Step, executions: StepExecutionData[]): StepExecutionData | undefined; private static mergeLeadingSystemMessages; private static assertNoMidArraySystemMessages; protected invokeWithTools>(messages: BaseMessage[], tools: StructuredToolInterface[]): Promise<{ toolName: string; args: T; }>; private static modelName; protected invokeWithTool>(messages: BaseMessage[], tool: DynamicStructuredTool): Promise; protected withAiAssist(call: () => Promise): Promise; protected logAiDegrade(reason: unknown): void; protected getExtraLogContext(): Record; protected get logCtx(): { runId: string; stepId: string; stepIndex: number; stepType: import("../types/validated/step-definition").StepType; collection: string; }; } //# sourceMappingURL=base-step-executor.d.ts.map