import { z } from "zod"; import type { BaselineAuthorization } from "../baseline-evidence/verify.js"; import { type Cli } from "../internals/clis.js"; import type { EccComponentId, EccMcpComponentId } from "./components.js"; /** * The evidence authorization tuple. Exported so a sibling ownership record can * REFERENCE this schema instead of restating it — a restatement cannot detect a * field added here, which is the likeliest direction of drift. */ export declare const AuthorizationSchema: z.ZodObject<{ componentId: z.ZodString; source: z.ZodString; pinnedSha: z.ZodString; treeSha256: z.ZodString; tier: z.ZodEnum<{ org: "org"; vendor: "vendor"; }>; issuer: z.ZodString; evidenceSha256: z.ZodString; effective: z.ZodOptional>; acceptance: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>; export interface ProjectRegistration { root: string; scope: "scoped" | "full"; components: EccComponentId[]; mcps: EccMcpComponentId[]; moduleIds?: string[]; } export interface InstalledComponentRegistration { id: EccComponentId; authorization: BaselineAuthorization; } export interface TargetRegistration { target: Cli; components: InstalledComponentRegistration[]; mcps: EccMcpComponentId[]; } export interface RegistrationLedger { schemaVersion: 1; projects: ProjectRegistration[]; targets: TargetRegistration[]; } export interface RegistrationUnion { components: EccComponentId[]; mcps: EccMcpComponentId[]; moduleIds: string[]; } export interface AtomicLedgerWriteDeps { rename?: (from: string, to: string) => void; } export interface RegistrationLedgerSnapshot { path: string; contents: Buffer; ledger: RegistrationLedger; } export declare function emptyRegistrationLedger(): RegistrationLedger; export declare function parseRegistrationLedger(text: string): RegistrationLedger; export declare function machineRegistrationUnion(ledger: RegistrationLedger): RegistrationUnion; export declare function mergeRegistrationLedger(ledger: RegistrationLedger, project: ProjectRegistration, installedTargets: readonly TargetRegistration[]): RegistrationLedger; export declare function serializeRegistrationLedger(ledger: RegistrationLedger): string; export declare function registrationLedgerPath(home: string): string; export declare function readRegistrationLedgerSnapshot(home: string): RegistrationLedgerSnapshot | undefined; export declare function readRegistrationLedger(home: string): RegistrationLedger; export declare function writeRegistrationLedgerAtomic(home: string, ledger: RegistrationLedger, deps?: AtomicLedgerWriteDeps): void;