import { type CaseEducationalLevel, type CaseNode, type CurationStatus } from '../types/sparkContracts';
import { type KnowledgeScope } from './scopedKnowledgeStore';
export interface ListOptions {
    status?: CurationStatus;
    /** Restrict to cases whose tag set overlaps with at least one of these. */
    anyOfTags?: string[];
    educationalLevel?: CaseEducationalLevel;
}
export interface PublishOptions {
    /** Reviewer name. Stamped onto `curatedBy` and `curatedAt`. */
    reviewer: string;
}
export interface ArchiveOptions {
    reason: string;
}
/**
 * CaseLibrary — local file-backed case storage. Single instance per
 * storage path; cross-process writers explicitly out of scope (matches
 * ragStore / baselineStore / projectMemory).
 */
export declare class CaseLibrary {
    private readonly storagePath;
    private readonly cases;
    private loaded;
    constructor(storagePath: string);
    load(): void;
    /**
     * Save (insert or replace) a case. Throws when the record arrives
     * with `status='published'` — the only legitimate path to publish
     * is the dedicated `publishCase()` call so the gate cannot be
     * bypassed by a field update.
     */
    saveCase(record: CaseNode, scope?: KnowledgeScope): void;
    getCase(caseId: string, scope?: KnowledgeScope): CaseNode | undefined;
    removeCase(caseId: string, scope?: KnowledgeScope): boolean;
    listCases(opts?: ListOptions, scope?: KnowledgeScope): CaseNode[];
    /**
     * Advance a case to `status='published'`. Enforces the double-control
     * gate:
     *   - Case must already exist (we publish a known record).
     *   - `redactionState === 'redacted'` — anonymizer must have run.
     *   - Reviewer name supplied — curator signoff is mandatory.
     *
     * Returns the published case so callers can render the new state
     * without a follow-up read. Stamps `curatedBy` / `curatedAt` from
     * the reviewer + wall clock.
     */
    publishCase(caseId: string, opts: PublishOptions, scope?: KnowledgeScope): CaseNode;
    /**
     * Archive a case: drops the trace artifact pointer (so the artifact
     * store can evict the underlying file) while keeping the case
     * metadata in place for backward references. Records the supplied
     * reason on `traceUnavailableReason` so consumers see why the trace
     * is gone.
     */
    archiveCase(caseId: string, opts: ArchiveOptions, scope?: KnowledgeScope): CaseNode;
    /** Stats by status — useful for the admin dashboard. */
    getStats(scope?: KnowledgeScope): Record<CurationStatus, number>;
    private persist;
}
//# sourceMappingURL=caseLibrary.d.ts.map