import { z } from "zod"; import type { Cli } from "../internals/clis.js"; import type { EccComponentId, EccComponentSelection, EccMcpComponentId } from "./components.js"; import { type EccManifestOperation } from "./materialize.js"; import { type RegistrationLedger, type RegistrationUnion } from "./registration.js"; export type EccProjectStatus = "live" | "missing"; export interface EccLedgerReconciliation { prior: RegistrationLedger; ledger: RegistrationLedger; desired: RegistrationUnion; retiredProjects: string[]; full: boolean; removedComponents: EccComponentId[]; removedMcps: EccMcpComponentId[]; } export interface EccReconciliationOptions { projectStatus?: (root: string) => EccProjectStatus; droppedTargets?: readonly Cli[]; } export interface EccInstallStateCandidate { target: Cli; scope: "home" | "project"; root: string; statePath: string; projectRoot?: string; } declare const EccInstallOperationSchema: z.ZodObject<{ kind: z.ZodString; moduleId: z.ZodString; sourceRelativePath: z.ZodString; destinationPath: z.ZodString; strategy: z.ZodString; ownership: z.ZodString; scaffoldOnly: z.ZodBoolean; }, z.core.$loose>; declare const EccInstallStateSchema: z.ZodObject<{ schemaVersion: z.ZodLiteral<"ecc.install.v1">; installedAt: z.ZodString; lastValidatedAt: z.ZodOptional; target: z.ZodObject<{ id: z.ZodString; target: z.ZodOptional; kind: z.ZodOptional>; root: z.ZodString; installStatePath: z.ZodString; }, z.core.$strict>; request: z.ZodObject<{ profile: z.ZodNullable; modules: z.ZodArray; includeComponents: z.ZodArray; excludeComponents: z.ZodArray; legacyLanguages: z.ZodArray; legacyMode: z.ZodBoolean; }, z.core.$strict>; resolution: z.ZodObject<{ selectedModules: z.ZodArray; skippedModules: z.ZodArray; }, z.core.$strict>; source: z.ZodObject<{ repoVersion: z.ZodNullable; repoCommit: z.ZodNullable; manifestVersion: z.ZodNumber; }, z.core.$strict>; operations: z.ZodArray>; }, z.core.$strict>; export type EccInstallOperation = z.infer & EccManifestOperation; export type EccInstallState = z.infer & { operations: EccInstallOperation[]; }; export interface EccInstallStateReconciliation { state: EccInstallState; kept: EccInstallOperation[]; removed: EccInstallOperation[]; nextText: string; } export declare function reconcileEccRegistrationLedger(ledger: RegistrationLedger, options?: EccReconciliationOptions): EccLedgerReconciliation; export declare function eccInstallStateCandidates(home: string, reconciliation: EccLedgerReconciliation): EccInstallStateCandidate[]; export declare function parseEccInstallState(text: string, statePath: string): EccInstallState; export declare function reconcileEccInstallState(state: EccInstallState, selection: EccComponentSelection): EccInstallStateReconciliation; export {};