import { QualityIntelligence } from "@oscharko-dev/keiko-contracts";
export declare const QUALITY_INTELLIGENCE_CANDIDATES_SCHEMA_VERSION: 1;
export interface QualityIntelligenceCandidateRow {
    readonly id: string;
    readonly title: string;
    readonly preconditions: readonly string[];
    readonly steps: readonly string[];
    readonly expectedResults: readonly string[];
    readonly priority: QualityIntelligence.QualityIntelligencePriority;
    readonly riskClass: QualityIntelligence.QualityIntelligenceRiskClass;
    readonly tags: readonly string[];
    readonly status: QualityIntelligence.QualityIntelligenceTestCaseStatus;
    readonly derivedFromAtomIds: readonly string[];
}
export interface QualityIntelligenceCandidatesArtifact {
    readonly qiCandidatesSchemaVersion: typeof QUALITY_INTELLIGENCE_CANDIDATES_SCHEMA_VERSION;
    readonly runId: string;
    readonly generatedAt: string;
    readonly candidates: readonly QualityIntelligenceCandidateRow[];
    readonly editedRevisions?: readonly QualityIntelligence.QualityIntelligenceCandidateEditedRevision[];
}
export interface QualityIntelligenceCandidatesStoreOptions {
    readonly evidenceDir: string;
}
export interface RecordQualityIntelligenceCandidatesInput {
    readonly runId: string;
    readonly generatedAt: string;
    readonly candidates: readonly QualityIntelligence.QualityIntelligenceTestCaseCandidate[];
    readonly editedRevisions?: readonly QualityIntelligence.QualityIntelligenceCandidateEditedRevision[] | undefined;
    readonly evidenceDir: string;
    /**
     * Required defence-in-depth redactor applied to every string leaf before persist. The server
     * passes the live audit redactor (`deps.redactor`); tests pass an explicit identity. Making it
     * mandatory keeps a forgetful caller from writing an unredacted candidate body to disk (#284).
     */
    readonly redact: (value: unknown) => unknown;
}
/**
 * Persist the generated candidate bodies for a run. Redacts every string leaf first, then writes
 * the companion artifact atomically. Returns the on-disk location.
 */
export declare const recordQualityIntelligenceCandidates: (input: RecordQualityIntelligenceCandidatesInput) => string;
export declare const loadQualityIntelligenceCandidates: (runId: string, options: QualityIntelligenceCandidatesStoreOptions) => QualityIntelligenceCandidatesArtifact | undefined;
export declare const deleteQualityIntelligenceCandidates: (runId: string, options: QualityIntelligenceCandidatesStoreOptions) => boolean;
type EditableFields = QualityIntelligence.QualityIntelligenceCandidateEditableFields;
type EditProvenance = QualityIntelligence.QualityIntelligenceCandidateEditProvenance;
export type QualityIntelligenceCandidateEditErrorReason = "artifact-not-found" | "candidate-not-found" | "no-edited-fields";
export type ApplyQualityIntelligenceCandidateEditResult = {
    readonly ok: true;
    readonly candidate: QualityIntelligenceCandidateRow;
    readonly changed: boolean;
} | {
    readonly ok: false;
    readonly reason: QualityIntelligenceCandidateEditErrorReason;
};
export interface ApplyQualityIntelligenceCandidateEditInput {
    readonly runId: string;
    readonly candidateId: string;
    readonly editedFields: EditableFields;
    readonly provenance: EditProvenance;
    readonly evidenceDir: string;
    readonly redact: (value: unknown) => unknown;
}
export declare const applyQualityIntelligenceCandidateEdit: (input: ApplyQualityIntelligenceCandidateEditInput) => ApplyQualityIntelligenceCandidateEditResult;
export {};
//# sourceMappingURL=candidatesArtifact.d.ts.map