import { MATERIALIZED_CONTENT_MODE } from "./materialization-fs.js"; import type { EccMaterializationDeps, EccMaterializationPlan, EccMaterializationRequest, EccMaterializationResult } from "./materialization-types.js"; /** * AIH-direct per-component materialization (F1), receipt-bound (F5). * * The v3.4 R8 lifecycle, extended from a fixed profile to an authored * selection: preview-first, atomic apply, deterministic second apply, repair * only owned unmodified bytes, uninstall only matching owned bytes, and * operator content always survives. * * Every operation is driven by an explicit resolved input against a * caller-supplied destination root. Nothing here reads a policy, resolves a * selection, or knows a target adapter — those arrive in their own rows, and * keeping them out is what makes this engine testable against a fixture root. * * `apply` IS the reconcile: it materializes the request and subtracts every * receipt entry the request no longer carries, because ownership that outlives * its selection is exactly the defect receipts exist to prevent. * * Planning happens entirely in `materialization-plan.ts` and commits entirely * through `materialization-fs.ts`, which re-pins each destination immediately * before its own side effect and rolls back everything it already applied if a * later step fails. */ export { eccMaterializationReceiptPath } from "./materialization-receipt.js"; export type { EccMaterializationAction, EccMaterializationAdvisory, EccMaterializationComponentInput, EccMaterializationDeps, EccMaterializationFileInput, EccMaterializationFilePlan, EccMaterializationLedgerUpdate, EccMaterializationPlan, EccMaterializationRequest, EccMaterializationResult, EccMaterializationStep, } from "./materialization-types.js"; /** The full plan — what would be written and what would be subtracted — with no writes at all. */ export declare function previewEccMaterialization(request: EccMaterializationRequest): EccMaterializationPlan; /** * Materialize the request and subtract whatever it no longer carries. Content * is written before the ownership record, the complete record is validated * before the first byte moves, and an existing destination AIH does not own — * or one hand-edited after AIH wrote it — refuses by path and component instead * of being absorbed. */ export declare function applyEccMaterialization(request: EccMaterializationRequest, deps?: EccMaterializationDeps): EccMaterializationResult; /** * Subtract every owned component. Only bytes that still match the receipt are * removed; anything else degrades to an advisory that names the component and * the path. A malformed record refuses every claim and removes nothing. */ export declare function uninstallEccMaterialization(root: string, deps?: EccMaterializationDeps): EccMaterializationResult; /** * Restore owned files whose live bytes still match the receipt — and only * those. A drifted file is reported by component and path and never * overwritten; a request that contradicts the receipt is an update, not a * repair, and refuses. A destination several components share is rebuilt once, * from every fragment that owns part of it. */ export declare function repairEccMaterialization(request: EccMaterializationRequest, deps?: EccMaterializationDeps): EccMaterializationResult; /** Re-exported so a caller can name the content mode this engine writes with. */ export { MATERIALIZED_CONTENT_MODE };