/** * Local-files store schema versioning (DEC-036). * * Every initialized store carries a `/.h2a-schema.json` sentinel: * * ```json * { * "version": "1", * "createdAt": "2026-05-20T08:12:34.567Z", * "createdBy": "@sentropic/h2a@0.1.1" * } * ``` * * The version string is opaque and strictly compared against * `H2A_STORE_SCHEMA_VERSION`. A future schema bump requires: * * - a new DEC documenting the layout change, * - a migration ramp (`h2a store migrate --from --to `), * - a `H2A_STORE_SCHEMA_VERSION` bump in this file. * * The escape hatch `createLocalStore({ allowVersionMismatch: true })` is * intentionally narrow: it logs a stderr warning, skips the version check, * and **never** rewrites the sentinel. It exists so a read-only inspection * tool (e.g., a debugger) can open a store written by a newer CLI. */ export declare const H2A_STORE_SCHEMA_VERSION: "1"; export declare const H2A_STORE_SCHEMA_FILE: ".h2a-schema.json"; export interface H2AStoreSchemaSentinel { readonly version: string; readonly createdAt: string; readonly createdBy: string; } export declare class StoreSchemaMismatchError extends Error { readonly foundVersion: string; readonly expectedVersion: string; constructor(foundVersion: string, expectedVersion: string, root: string); } /** * Best-effort lookup of `@sentropic/h2a`'s own package version. We walk * up from the current module file (`dist/runtime/local-files/schema.js` at * runtime, or the TS source under tests) until we find a `package.json` * whose `name` matches. Falls back to `0.0.0-unknown` if the search fails, * which only affects the `createdBy` metadata field — it never aborts a * store init. */ export declare function readCliPackageVersion(): string; //# sourceMappingURL=schema.d.ts.map