import { PipelineStep } from "@warpgogol/pipeline-core"; import type { PipelineStepContext } from "@warpgogol/pipeline-core"; interface BetterSqliteDatabase { pragma: (sql: string) => unknown; close: () => void; } export declare abstract class CrossDbReadOnlyStep extends PipelineStep { #private; /** SHA-256 hex of each opened file, keyed by the caller's provided logical name. */ protected readonly inputHashes: Map; /** Absolute paths of each opened file, keyed by logical name (for MANIFEST). */ protected readonly inputPaths: Map; /** * Opens a SQLite file read-only, sets WAL + FK pragmas, and tracks it * for automatic close. **Must only be called inside `withReadOnlyDbs`**; * otherwise the DB would leak (we refuse at runtime to fail loudly). * * @param logicalName stable key used in MANIFEST / logs (e.g. 'scoresDb') * @param absolutePath absolute file path */ protected openReadOnly(logicalName: string, absolutePath: string): BetterSqliteDatabase; /** * Runs `fn` and, regardless of success or failure, closes every DB that * was opened via `openReadOnly`. Also computes streaming SHA-256 hashes * for every opened file (after the callback, so hashes reflect end-of-read * state). * * Returns whatever `fn` returns — prefer this form over capturing values * via outer `let` variables, because TypeScript cannot narrow a * closure-assigned `let` after an `await` boundary. * * State is cleared at entry, so re-running the same step instance is safe. */ protected withReadOnlyDbs(fn: () => Promise): Promise; /** Convenience: dump the hashes as an object for MANIFEST records. */ protected hashesAsObject(): Record; } export {}; //# sourceMappingURL=cross-db-read-only-step.d.ts.map