import { type DependencyPinningSourceInput } from "../esm/package-registry.js"; export interface DependencyResolutionObservation { readonly packageName: string; /** Exact caller-observed package declaration, or null when absent. */ readonly declaration: string | null; } /** * Validate cached observations against the exact immutable dependency map. * This rejects malformed, duplicate, or cross-snapshot metadata before replay. */ export declare function validateDependencyResolutionObservations(value: unknown, dependencies?: Readonly>): readonly DependencyResolutionObservation[] | null; export interface ImportDependencyResolutionContext { projectDir?: string | null; projectId?: string | null; dependencyPinningSource?: DependencyPinningSourceInput; dependencyPinningCacheKey?: string; dependencyPinningDependencies?: Readonly>; /** * Records unresolved imports as inert cache metadata. Replays still pass * through this resolver so current snapshot authority and scheduler TTLs * remain the only gates for platform persistence. */ onDependencyResolutionObserved?: (observation: DependencyResolutionObservation) => void; /** Record unresolved metadata without scheduling a platform write. */ dependencyResolutionObservationOnly?: boolean; } /** * Decide whether pinning applies to this rewrite. * * A cache key means the snapshot already decided, and that decision is * authoritative: re-deciding here would let a mid-render configuration change * split a single render across two policies. Only the keyless fallback path * consults the rollout cohort. "on:unknown" means the dependency state could * not be established (unreadable package.json), so it falls back to * conservative flag-off behavior. */ export declare function isPinningEnabledForRewrite(ctx: ImportDependencyResolutionContext): boolean; /** * Return an exact dependency pin when one is present. Non-exact declarations * and known undeclared imports are handed to the bounded platform scheduler. * * An enabled snapshot without a dependency map is intentionally treated as * unknown: it must not be mistaken for an empty, verified package.json. */ export declare function resolveDependencyPinForImport(packageName: string, ctx: ImportDependencyResolutionContext): string | undefined; //# sourceMappingURL=dependency-resolution.d.ts.map