/** * Bootstrap seam that compiles the effective provider environment (issue #1136). * * Reads the fixed `runtime.yaml` locations, decides legacy vs runtime-v1 mode (failing fast on * a mixed configuration), and compiles the matching configuration format into the shared * engine-options bundle. This is the single place the bootstrap consults; the engine, runners * and provider SDK stay format-agnostic. * * Lives in `infra/config/runtime-provider` (not `features`) so that infra entry points such as * `workflowPreview` can consult it without an `infra → features` upward dependency. */ import { type CompiledProviderEnvironment, type LegacyProviderEnvironmentInput } from './environment.js'; import { type ProviderConfigMode, type LegacyProviderSignal } from './mode.js'; import { type WorkflowConfig } from '../../../core/models/index.js'; import type { WorkflowCallResolver } from '../../../core/workflow/types.js'; import { type CompanionFixPolicy, type CompanionReviewMode } from '../../../core/models/companion-types.js'; import type { StepProviderOptions } from '../../../core/models/workflow-types.js'; import type { ProviderOptionsOriginResolver, ProviderOptionsSource } from '../../../core/workflow/provider-options-trace.js'; export interface ResolvedRuntimeEnvironment { providerEnvironment: CompiledProviderEnvironment; /** Provider options resolved from config.yaml and environment variables. */ configProviderOptions?: StepProviderOptions; companionEnabled: boolean; companionReviewMode: CompanionReviewMode; companionFixPolicy: CompanionFixPolicy; providerConfigMode: ProviderConfigMode; } export interface ResolveProviderEnvironmentInput { /** Project root; its `.takt/runtime.yaml` overrides the global one. */ projectCwd: string; /** Execution directory used for trusted relative paths from global runtime profiles. */ executionCwd?: string; /** Provider engine-options the legacy path already resolved (used verbatim in legacy mode). */ legacy: LegacyProviderEnvironmentInput; /** Legacy provider settings detected in the current run (for mixed-config fail-fast). */ legacySignals: LegacyProviderSignal[]; /** Workflow whose runtime targets may be selected during this execution. */ workflow?: WorkflowConfig; /** Resolver for child workflows in the execution bundle. */ workflowCallResolver?: WorkflowCallResolver; /** Resolved legacy provider options used as the runtime-mode config layer. */ providerOptionsSource?: ProviderOptionsSource; /** Origin resolver for the resolved legacy provider options. */ providerOptionsOriginResolver?: ProviderOptionsOriginResolver; } export declare function resolveCompiledProviderEnvironment(input: ResolveProviderEnvironmentInput): CompiledProviderEnvironment; export declare function resolveRuntimeEnvironment(input: ResolveProviderEnvironmentInput): ResolvedRuntimeEnvironment; /** * Resolve the compiled provider environment for auxiliary entry points (preview / doctor) that * carry no CLI or task overrides. Display and validation must resolve * provider/model/personaProviders/providerRouting/autoRouting through the same compiled bundle as * execution, so a runtime-v1 environment surfaces the runtime.yaml `profiles.default` values * instead of legacy defaults, and a mixed configuration fails fast at these entries too. */ export declare function resolveAuxiliaryProviderEnvironment(projectCwd: string, workflow: Pick & Partial>): CompiledProviderEnvironment; export declare function resolveAuxiliaryRuntimeEnvironment(projectCwd: string, _workflow: Pick & Partial>): ResolvedRuntimeEnvironment; //# sourceMappingURL=provider-environment.d.ts.map