import Database from "better-sqlite3"; import { type JsonValue } from "./json.js"; export type StateDatabaseMode = "read-write" | "read-only"; export type OpenStateDatabaseOptions = { filePath?: string; homeDir?: string; mode?: StateDatabaseMode; checkLegacyState?: boolean; }; export type BlobRecord = { hash: Buffer; mediaType: string; byteLength: number; content: Buffer; }; export declare function workflowStatePath(homeDir?: string): string; export declare class StateDatabase { readonly filePath: string; readonly mode: StateDatabaseMode; readonly connection: Database.Database; constructor(options?: OpenStateDatabaseOptions); close(): void; transaction(operation: () => T): T; putJson(value: unknown, now?: number): Buffer; putText(value: string, now?: number): Buffer; putBlob(content: Buffer, mediaType: string, now?: number): Buffer; readBlob(hash: Buffer): BlobRecord | undefined; readJson(hash: Buffer): JsonValue; integrityCheck(): void; backup(destination: string): Promise; private configure; private prepareSchema; private initialize; private verifySchema; }