import type { Logger, LoggerLevel } from './ports/logger-port'; import type { RunnerState } from './runner'; import type { AiConfiguration } from '@forestadmin/ai-proxy'; import type { Options as SequelizeOptions } from 'sequelize'; export interface WorkflowExecutor { start(): Promise; stop(): Promise; readonly state: RunnerState; } export interface WorkflowExecutorTuningOptions { /** Interval in seconds at which the executor polls the orchestrator for pending steps. */ pollingIntervalS?: number; /** Interval in seconds at which automated inboxes are swept. Defaults to 300. */ automationPollingIntervalS?: number; /** Per-step execution timeout in seconds. */ stepTimeoutS?: number; /** Max duration in seconds of a single AI provider invocation. */ aiInvokeTimeoutS?: number; /** Timeout in seconds for draining in-flight steps when the executor stops. */ stopTimeoutS?: number; /** Max steps auto-chained per run before yielding to the next poll. `0` disables chaining. */ maxChainDepth?: number; /** Collection schema cache TTL in seconds. Lower it to pick up orchestrator schema changes sooner. */ schemaCacheTtlS?: number; /** Minimum level of the executor's logs. Defaults to `Info`. */ loggerLevel?: LoggerLevel; } export interface ExecutorOptions extends WorkflowExecutorTuningOptions { envSecret: string; authSecret: string; agentUrl: string; httpPort: number; forestServerUrl?: string; aiConfigurations?: AiConfiguration[]; logger?: Logger; forceAiError?: boolean; executorEncryptionKey?: string; manageProcessSignals?: boolean; } export type DatabaseExecutorOptions = ExecutorOptions & ({ database: SequelizeOptions & { uri: string; }; } | { database: SequelizeOptions; }); export declare function buildInMemoryExecutor(options: ExecutorOptions): WorkflowExecutor; export declare function buildDatabaseExecutor(options: DatabaseExecutorOptions): WorkflowExecutor; //# sourceMappingURL=build-workflow-executor.d.ts.map