import type { VoyantGraphJsonObject } from "@voyant-travel/core/project"; import type { VoyantGraphActivatedRuntime, VoyantGraphRuntime, VoyantGraphRuntimeResourceDefinition } from "./runtime-lowering.js"; import { type ResolveVoyantGraphRuntimeValuesInput } from "./runtime-values.js"; export declare const VOYANT_GRAPH_RUNTIME_PROVIDER_ERROR_CODES: { readonly VOYANT_GRAPH_RUNTIME_PROVIDER_MISSING: "A required runtime port has no selected provider."; readonly VOYANT_GRAPH_RUNTIME_PROVIDER_AMBIGUOUS: "A runtime port has more than one selected provider."; readonly VOYANT_GRAPH_RUNTIME_PROVIDER_UNKNOWN: "A runtime port was not selected."; readonly VOYANT_GRAPH_RUNTIME_PROVIDER_FACTORY_INVALID: "A selected provider runtime export is not a factory."; }; export type VoyantGraphRuntimeProviderErrorCode = keyof typeof VOYANT_GRAPH_RUNTIME_PROVIDER_ERROR_CODES; export interface VoyantGraphRuntimeProviderIssue { code: VoyantGraphRuntimeProviderErrorCode; port: string; declarationIds: readonly string[]; } export declare class VoyantGraphRuntimeProviderError extends Error { readonly issues: readonly VoyantGraphRuntimeProviderIssue[]; constructor(issues: readonly VoyantGraphRuntimeProviderIssue[]); } export interface VoyantGraphProviderFactoryContext { unitId: string; declarationId: string; port: string; providerConfig: VoyantGraphJsonObject; resources: readonly VoyantGraphRuntimeResourceDefinition[]; getConfig: (declarationId: string) => T | undefined; getSecret: (declarationId: string) => T | undefined; getResource: (declarationId: string) => T | undefined; } export type VoyantGraphProviderFactory = (context: VoyantGraphProviderFactoryContext) => T | Promise; export interface ResolveVoyantGraphRuntimeProvidersInput extends ResolveVoyantGraphRuntimeValuesInput { resourceValues?: Readonly>; /** Resolve only these ports and the runtime values owned by their selected providers. */ ports?: readonly string[]; } export interface SelectedVoyantGraphRuntimeProvider { unitId: string; declarationId: string; port: string; selection: { role: string; value: string; }; } export interface ResolvedVoyantGraphRuntimeProviders { graphHash: string; /** Redacted selection metadata. Provider instances and runtime values are not enumerable. */ selectedProviders: readonly SelectedVoyantGraphRuntimeProvider[]; getProvider: (port: string) => Promise; /** Preflight every selected conditional provider and return the framework-owned activated view. */ activateRuntime: () => Promise; } /** Validate explicit selections, then instantiate each selected provider only on first use. */ export declare function resolveVoyantGraphRuntimeProviders(runtime: VoyantGraphRuntime, input?: ResolveVoyantGraphRuntimeProvidersInput): Promise;