import { type SpecName } from "./catalog.js"; import { type VersionValue } from "../versions.js"; import type { InstructionRecord } from "../parser/instructions.js"; import type { SpecClause } from "../parser/sections.js"; import type { TypeEntry } from "../parser/types.js"; import type { Proposal } from "../parser/proposals.js"; export interface LoadedSnapshot { pin: { key: string; sha: string; spec: "core"; version: string; }; instructions: InstructionRecord[]; sections: SpecClause[]; types: TypeEntry[]; report: Record; } /** * Load (and cache) the baked snapshot for a given version selector. * Throws if the artifact is missing — that means the build pipeline * didn't run, which is a packaging error, not a user error. */ export declare function loadSnapshot(version?: VersionValue): LoadedSnapshot; /** Convenience accessors for a version. */ export declare function loadInstructions(version?: VersionValue): InstructionRecord[]; /** * Load the section index for a given spec. `core` comes from the * unified core snapshot; `js-api` / `web-api` come from their own * baked Bikeshed artifacts (separate files, same upstream pin). */ export declare function loadSections(spec?: SpecName, version?: VersionValue): SpecClause[]; export declare function loadTypes(version?: VersionValue): TypeEntry[]; /** Test/Worker seam: inject a snapshot directly, bypassing the file read. */ export declare function primeCache(version: string, snapshot: LoadedSnapshot): void; export interface LoadedProposals { pin: { key: string; sha: string; repo: "proposals"; version: string; }; proposals: Proposal[]; } export declare function loadProposals(version?: string): LoadedProposals; export declare function primeProposalsCache(version: string, loaded: LoadedProposals): void;