/**
 * PersistedShadowImportTarget.ts — a DURABLE, on-disk AS-IS import sink for the
 * pre-click cutover integrity gate (spec §2.4; feedback-factory-migration.md §2.5).
 *
 * Why this exists (and why it is NOT `InMemoryImportTarget`):
 *
 * `cutoverReadiness.ts` hard-gates the operator's IRREVERSIBLE cutover click on
 * `ready = integrity.passed && parity.cleared && !parity.stale`. The integrity leg
 * greens ONLY when `recordIntegrityReport(passingReport)` is called. The existing
 * import-DRYRUN route is deliberately walled off from that path (its report goes to
 * `importDryRunReportPath`, never `integrityReportPath`) precisely so an EPHEMERAL,
 * in-memory rehearsal can never quietly green an irreversible gate.
 *
 * The pre-click integrity gate therefore needs a target that is a step more real than
 * the in-memory dry-run: a **persisted** shadow the import physically lands in and is
 * read back FROM DISK, so the recorded integrity report corresponds to a durable,
 * inspectable artifact — not an in-process Map that vanishes with the process. The
 * shadow is a VERIFICATION target, never canonical: the canonical production import
 * (Portal's apply-clusters / the real Prisma write) happens AFTER the click. This
 * mirrors `InMemoryImportTarget`'s contract exactly (same `ImportTarget` interface,
 * same dup-PK refusal, same `schemaDescriptor() === null` → the runner derives the
 * dry-run schema), differing ONLY in where the rows live.
 *
 * Backing store: two newline-delimited JSON files (`clusters.jsonl`, `feedback.jsonl`)
 * under a caller-supplied directory. JSONL (not SQLite) keeps the target dependency-free
 * so the out-of-process integrity-pass runner bundles cleanly (no native module). Each
 * AS-IS import APPENDS one row; `readBack*` parses the file. Duplicate PKs are refused
 * before the append (mirrors the DB @id constraint the real adapter would hit). The
 * shadow directory is disposable — `dispose()` removes it after the gate has run.
 */
import { type ImportTarget, type RawRow } from './importRunner.js';
import type { SchemaDescriptor } from './importIntegrity.js';
export declare class PersistedShadowImportTarget implements ImportTarget {
    private readonly dir;
    private readonly clustersPath;
    private readonly feedbackPath;
    private readonly clusterIds;
    private readonly feedbackIds;
    constructor(dir: string);
    private readJsonl;
    importClusterAsIs(row: RawRow): void;
    importFeedbackAsIs(row: RawRow): void;
    readBackClusters(): RawRow[];
    readBackFeedback(): RawRow[];
    /**
     * No real schema descriptor — like the in-memory dry-run target, the runner derives
     * the target schema from readback + the canonical accepted-status contract. (A future
     * real Prisma adapter would return its actual descriptor here.)
     */
    schemaDescriptor(): SchemaDescriptor | null;
    /** Remove the on-disk shadow. Call after the integrity gate has run + the report is recorded. */
    dispose(): void;
}
//# sourceMappingURL=PersistedShadowImportTarget.d.ts.map