import type { AgentWorkflowStep, WorkflowStep } from '../../models/types.js'; import type { ProviderLadderConfig, ProviderRoutingEntry, TagRoutingConflictPolicy } from '../../models/config-types.js'; import type { ProviderResolutionSource } from '../provider-options-trace.js'; import type { RuntimeStepResolution, StepProviderInfo } from '../types.js'; export interface PromotionRuntimeContext { cwd: string; resolveStepProviderModel: (step: WorkflowStep, runtime?: RuntimeStepResolution) => StepProviderInfo; /** * Fully-resolved runtime.yaml `ladder` stages (issue #1208). A matched target-less `{at:N}` * promotion advances the governing ladder to a later stage. Undefined when no ladder is * configured, in which case a target-less promotion is a logged no-op. */ providerLadders?: ProviderLadderConfig; /** * The same `tags` conflict policy the base resolution applies. A ladder selected off * `provider_routing.tags` must judge equal-priority conflicts identically to stage 0. */ providerRoutingTagConflictPolicy?: TagRoutingConflictPolicy; } export declare function resolvePromotionRuntime(context: PromotionRuntimeContext, step: WorkflowStep, stepIteration: number | undefined, runtime: RuntimeStepResolution | undefined): Promise; export interface PromotionLadderStage { entry: ProviderRoutingEntry; index: number; isPastLadderEnd: boolean; } /** Resolve a ladder stage using the same terminal-stage rule as execution. */ export declare function resolvePromotionLadderStage(ladder: readonly ProviderRoutingEntry[] | undefined, stageIndex: number): PromotionLadderStage | undefined; export interface PromotionProviderOptionsResolution { providerOptions: StepProviderInfo['providerOptions']; providerOptionsSources: StepProviderInfo['providerOptionsSources']; } /** * Compose a promotion target onto the already-resolved base options. This is shared with * runtime preflight so environment/CLI-protected leaves and file-preferred leaves follow the * same rule before and during execution. */ export declare function resolvePromotionProviderOptions(baseProviderInfo: Pick, promotionOptions: StepProviderInfo['providerOptions']): PromotionProviderOptionsResolution; /** * Resolve the ladder that governs this step's promotion. The base resolution already picked the * initial assignment (stage 0) at a definite priority; its source tells us which assignment path * — and therefore which ladder — to advance, so promotion continues the same ladder rather than * jumping to an unrelated one. */ export declare function resolveGoverningLadder(ladders: ProviderLadderConfig | undefined, step: AgentWorkflowStep, baseSource: ProviderResolutionSource | undefined, tagConflictPolicy: TagRoutingConflictPolicy | undefined): ProviderRoutingEntry[] | undefined; //# sourceMappingURL=promotion-runtime.d.ts.map