import { openReceiptAttempt, reopenReceiptAttempt, type ReceiptV1 } from "@younndai/lyt-vault"; import type { InstallableProviderObjectV1, InstallProviderV1 } from "./provider-inventory.js"; export type ReconcileObjectDisposition = "already-current" | "planned" | "refused"; export interface ReconcileObjectPlanV1 { readonly object_id: string; readonly provider_package: string; readonly provider_version: string; readonly kind: InstallableProviderObjectV1["kind"]; readonly target_path: string; readonly expected_digest: string; readonly observed_digest: string | null; readonly expected_applied_digest: string; readonly trusted_legacy_digests: readonly string[]; readonly disposition: ReconcileObjectDisposition; readonly refusal_code: string | null; } export interface InstallReconcilePlanV1 { readonly schema_id: "lyt.install-reconcile-plan"; readonly schema_version: Readonly<{ major: 1; minor: 0; }>; readonly operation_id: string; readonly plan_digest: string; readonly journal_root: string; readonly objects: readonly ReconcileObjectPlanV1[]; } export interface ReconcileJournalV1 { readonly schema_id: "lyt.install-reconcile-journal"; readonly schema_version: Readonly<{ major: 1; minor: 0; }>; readonly plan: InstallReconcilePlanV1; readonly completed: readonly string[]; readonly pending: readonly string[]; readonly refused: readonly string[]; readonly active_attempt_id: string | null; readonly active_started_at: string | null; readonly status: "pending" | "complete" | "refused" | "interrupted"; } export interface InstallReconcileEnvelopeV1 { readonly schema_id: "lyt.install-reconcile-result"; readonly schema_version: Readonly<{ major: 1; minor: 0; }>; readonly success: boolean; readonly status: "planned" | "success" | "no-op" | "partial" | "refused" | "failed"; readonly operation_id: string; readonly attempt_id: string; readonly plan_digest: string; readonly plan: InstallReconcilePlanV1; readonly mutations: number; readonly completed: readonly string[]; readonly pending: readonly string[]; readonly refused: readonly string[]; readonly next_action: string | null; readonly receipt: ReceiptV1; } export interface ReconcileEngineOptions { readonly journalRoot?: string; readonly now?: () => Date; readonly newAttemptId?: () => string; readonly receiptOpen?: typeof openReceiptAttempt; readonly receiptReopen?: typeof reopenReceiptAttempt; readonly failAfterObject?: string; readonly failBeforeJournalAfterObject?: string; } export declare function defaultReconcileJournalRoot(homeDir?: string): string; export declare function buildInstallReconcileFailureEnvelopeV1(error: unknown, options?: Pick): InstallReconcileEnvelopeV1; export declare function readPackageVersion(packageName: string): string; export declare function prepareInstallReconcilePlanV1(providers: readonly InstallProviderV1[], options?: Pick): InstallReconcilePlanV1; export declare function reconcileInstallProvidersV1(providers: readonly InstallProviderV1[], input?: Readonly<{ apply: boolean; resumeOperationId?: string; }>, options?: ReconcileEngineOptions): Promise; export declare function inspectReconcileJournalV1(root: string, operationId: string): Readonly<{ valid: boolean; journal: ReconcileJournalV1 | null; error_code: string | null; }>; export declare function assertPathChainHasNoLinks(path: string, includeLeaf: boolean): void; export declare function digestBytes(value: Uint8Array): string; export declare function digestPathTree(path: string): string; //# sourceMappingURL=reconcile-engine.d.ts.map