import type { ProvenanceAppendResult, ProvenanceBlobReference, ProvenanceBlobVerification, ProvenanceEvent, ProvenanceEventInput, ProvenanceVerification } from './types'; export declare class ProvenanceIntegrityError extends Error { readonly code = "PROVENANCE_INTEGRITY_ERROR"; readonly failedLine?: number; constructor(message: string, failedLine?: number); } export declare class IdempotencyConflictError extends Error { readonly code = "IDEMPOTENCY_CONFLICT"; constructor(key: string); } export declare class BlobIntegrityError extends Error { readonly code = "PROVENANCE_BLOB_INTEGRITY_ERROR"; constructor(message: string); } export interface ProvenanceStoreOptions { /** fsync ledger/blob writes. Defaults to true. */ durable?: boolean; /** Test seam; production events always use the server clock. */ clock?: () => Date; /** Test seam; production events use cryptographically random UUIDs. */ idFactory?: () => string; } /** * Server-owned append-only scientific provenance storage. * * Undo/redo history remains a separate, client-replaceable projection. This * store writes one canonical event per JSONL line and binds every event to the * previous event hash. All mutations for a notebook are serialized in-process. */ export declare class ProvenanceStore { private static readonly writeQueues; private readonly durable; private readonly clock; private readonly idFactory; constructor(options?: ProvenanceStoreOptions); getLedgerPath(notebookPath: string): string; getBlobPath(notebookPath: string, sha256: string): string; append(notebookPath: string, input: ProvenanceEventInput): Promise; read(notebookPath: string): Promise; verify(notebookPath: string): Promise; findByIdempotencyKey(notebookPath: string, idempotencyKey: string): Promise; putBlob(notebookPath: string, value: string | Buffer | Uint8Array): Promise; readBlob(notebookPath: string, sha256: string): Promise; verifyBlob(notebookPath: string, sha256: string): Promise; private normalizeNotebookPath; private normalizeInput; private canonicalClone; private hashRequest; private requestEnvelope; private inputFromEvent; private readVerified; private validateEventShape; private appendLine; private ledgerNeedsNewline; private syncDirectory; private readIfExists; private assertBlobBytes; private toBuffer; private assertSha256; private runSerialized; private isNodeError; } export type { ProvenanceActor, ProvenanceAppendResult, ProvenanceBlobReference, ProvenanceBlobVerification, ProvenanceEvent, ProvenanceEventInput, ProvenanceVerification, } from './types';