import type { ReadDeclarationResult } from './reader'; import { type Diagnostic } from './types'; /** A resolved mount-table entry (RFC §6). */ export interface ResolvedMount { name: string; /** Package root directory (realpath'd for auto-mounts). */ root: string; /** Artifact directory, `/dist` for auto-mounts. */ artifactDir: string; /** Whether `dist/client/manifest.json` exists. */ built: boolean; } /** * Winner of the recursive supply merge for one (package, major) group * (RFC §7, per-major amendment): elections are keyed by the MAJOR of the * provider's resolved version, so coexisting majors are isolated islands, * each with its own winner. */ export interface SupplyGroup { /** Major of the group's resolved version; 'unknown' when unresolvable. */ major: number | 'unknown'; provider: string; /** Provider's resolved installed version, null when unresolvable. */ version: string | null; } /** Per-package election result: one winner per major group. */ export interface SupplyEntry { /** Group winners, highest major first ('unknown' last). */ groups: SupplyGroup[]; } export interface ResolveMountsResult { supply: Record; mounts: Record; diagnostics: Diagnostic[]; } export interface ResolverEnvLinks { [moduleName: string]: string; } /** * Consumer-side group selection (RFC §7, per-major amendment): the group * whose winner satisfies `range`; multiple satisfying groups → highest * major; no range (or a workspace placeholder) → highest major group; * range satisfied by no group → highest major group (the caller diagnoses * the violation as E_VERSION). Groups whose version cannot be checked * against the range (unparsable either side) rank after satisfying groups * but before violating ones, per the RFC §11 skip-the-gate rule. */ export declare function selectSupplyGroup(entry: SupplyEntry, range?: string): SupplyGroup | null; /** * Resolves the mount table and the recursive supply merge for a root * module's declaration (RFC §6 + §7 phases 1–2). * * - `envLinks` entries override auto-mounting; their values follow today's * `ModuleConfig.links` semantics (artifact directory, resolved relative * to `rootDir`). * - Auto-mounts resolve via Node resolution from the DECLARING module's * own location and are realpath'd once. */ export declare function resolveMounts(rootDir: string, rootPackage: ReadDeclarationResult, envLinks?: ResolverEnvLinks): ResolveMountsResult;