/** * Provider executor with retry and fallback logic * * Handles provider execution with comprehensive retry/fallback strategies, * hook integration, and detailed attempt tracking. * * @module execution/provider-executor */ import type { ProviderAdapter } from "../../providers/adapter.js"; import type { Plugin } from "../../plugin.js"; import type { HookExecutor } from "../lifecycle/hook-executor.js"; import type { SectionData, DimensionResult, DimensionDependencies, DimensionContext, SectionDimensionContext } from "../../types.js"; /** * Handles provider execution with retry and fallback logic * * Manages: * - Primary provider execution * - Retry logic with exponential backoff * - Fallback to alternative providers * - Hook integration for custom behavior * - Detailed attempt tracking */ export declare class ProviderExecutor { private readonly adapter; private readonly plugin; private readonly hookExecutor; private readonly maxRetries; private readonly retryDelay; constructor(adapter: ProviderAdapter, plugin: Plugin, hookExecutor: HookExecutor, maxRetries: number, retryDelay: number); /** * Execute a dimension using the appropriate provider with retry/fallback logic * * @param dimension - Dimension name * @param sections - Sections to process * @param dependencies - Resolved dependencies * @param isGlobal - Whether this is a global dimension * @param dimensionContext - Dimension execution context * @returns Dimension result * @throws {AllProvidersFailed} If all providers fail */ execute(dimension: string, sections: SectionData[], dependencies: DimensionDependencies, isGlobal: boolean, dimensionContext: DimensionContext | SectionDimensionContext): Promise; /** * Create prompt for dimension execution */ private createPrompt; /** * Select provider for dimension */ private selectProvider; /** * Build chain of providers to try (primary + fallbacks) */ private buildProviderChain; /** * Execute with fallback logic (gateway vs direct mode) */ private executeWithFallbacks; /** * Execute via gateway with single attempt (gateway handles retries/fallbacks) */ private executeSingleAttemptViaGateway; /** * Execute with full retry/fallback logic (direct mode only) */ private executeWithRetryAndFallback; /** * Execute provider with retry logic */ private executeWithRetries; /** * Handle retry hook execution */ private handleRetry; /** * Handle fallback hook execution */ private handleFallback; /** * Handle dimension failure hook execution */ private handleDimensionFailure; /** * Create provider request object */ private createProviderRequest; /** * Delay execution for specified milliseconds */ private delay; } //# sourceMappingURL=provider-executor.d.ts.map