import type { QualityIntelligence } from "@oscharko-dev/keiko-contracts";
type QualityIntelligenceExportAdapter = QualityIntelligence.QualityIntelligenceExportAdapter;
type QualityIntelligenceLifecycleStatus = QualityIntelligence.QualityIntelligenceLifecycleStatus;
type QualityIntelligenceRunId = QualityIntelligence.QualityIntelligenceRunId;
type QualityIntelligenceValidationFindingKind = QualityIntelligence.QualityIntelligenceValidationFindingKind;
type QualityIntelligenceSeverity = QualityIntelligence.QualityIntelligenceSeverity;
type QualityIntelligenceAuditSummaryId = QualityIntelligence.QualityIntelligenceAuditSummaryId;
export declare const QUALITY_INTELLIGENCE_EVIDENCE_SCHEMA_VERSION: 1;
export interface QualityIntelligenceIntegrityHashes {
    readonly findings: string;
    readonly exports: string;
    readonly evidenceRefs: string;
    readonly atomFingerprints?: string;
    /**
     * Hash of the persisted per-envelope source fingerprints (Epic #735). Drift detection falls back
     * to these when atom-level fingerprints are absent, so a tampered set could mis-report staleness;
     * hashing them makes that tampering detectable. Optional for backward-compat with manifests
     * written before it was hashed (enforced on read only when present).
     */
    readonly sourceFingerprints?: string;
    /** Hash of the persisted coverage matrix (Epic #734) so a tampered matrix is detectable. */
    readonly coverageMatrix?: string;
}
export interface QualityIntelligenceRedactionSummary {
    readonly totalStringsScanned: number;
    readonly stringsRedacted: number;
    readonly patternsMatched: Readonly<Record<string, number>>;
}
export interface QualityIntelligenceManifestTotals {
    readonly candidates: number;
    readonly findings: number;
    readonly exports: number;
}
/**
 * Per-atom coverage status row persisted in the run manifest. Carries refs plus an optional short
 * REDACTED requirement excerpt (#790) so coverage/traceability surfaces are auditor-readable —
 * mirroring the `summaryRedacted` precedent on findings. Never raw source content: the excerpt is
 * redacted+truncated at build time and every string leaf is redacted again at persist time. Absent
 * on rows written before #790 (read paths must tolerate it).
 */
export interface QualityIntelligenceCoverageMatrixRow {
    readonly atomId: string;
    readonly status: "covered" | "weakly-covered" | "uncovered";
    readonly confidence: number;
    readonly coveringCandidateIds: readonly string[];
    readonly requirementExcerptRedacted?: string;
}
export interface QualityIntelligenceFindingRow {
    readonly id: string;
    readonly kind: QualityIntelligenceValidationFindingKind;
    readonly severity: QualityIntelligenceSeverity;
    readonly summaryRedacted: string;
    /**
     * Optional candidate this finding is scoped to (Epic #736). Present on candidate-scoped findings
     * (e.g. test-quality, logic-defect) so the UI can associate a finding with a single test case;
     * absent on run-scoped findings (e.g. policy-violation).
     */
    readonly candidateId?: string;
}
export interface QualityIntelligenceExportRow {
    readonly id: string;
    readonly targetAdapter: QualityIntelligenceExportAdapter;
    readonly integrityHash: string;
    readonly redactionAttested: boolean;
}
export interface QualityIntelligenceEvidenceRefRow {
    readonly envelopeId: string;
    readonly atomId: string;
    readonly lifecycleStatus: QualityIntelligenceLifecycleStatus;
}
/** Per-envelope content fingerprint row persisted in the manifest (Epic #735, Issue #742). */
export interface QualityIntelligenceSourceFingerprintRow {
    readonly envelopeId: string;
    readonly integrityHashSha256Hex: string;
}
/** Per-atom content fingerprint row persisted in the manifest (Epic #735, Issues #798/#799). */
export interface QualityIntelligenceAtomFingerprintRow {
    readonly atomId: string;
    readonly envelopeId: string;
    readonly canonicalHashSha256Hex: string;
}
export interface QualityIntelligenceProvenanceRefs {
    readonly envelopeIds: readonly string[];
    readonly auditSummaryId: QualityIntelligenceAuditSummaryId;
}
export interface QualityIntelligenceEvidenceManifest {
    readonly qiEvidenceSchemaVersion: typeof QUALITY_INTELLIGENCE_EVIDENCE_SCHEMA_VERSION;
    readonly runId: QualityIntelligenceRunId;
    readonly planAt: string;
    readonly completedAt: string | undefined;
    readonly status: "running" | "succeeded" | "failed" | "cancelled";
    readonly policyProfileIds: readonly string[];
    readonly retentionPolicyId: string;
    readonly modelGatewayCallCount: number;
    readonly totals: QualityIntelligenceManifestTotals;
    readonly findings: readonly QualityIntelligenceFindingRow[];
    readonly exports: readonly QualityIntelligenceExportRow[];
    readonly evidenceRefs: readonly QualityIntelligenceEvidenceRefRow[];
    readonly provenanceRefs: QualityIntelligenceProvenanceRefs;
    readonly redactionSummary: QualityIntelligenceRedactionSummary;
    readonly integrityHashes: QualityIntelligenceIntegrityHashes;
    /** Optional: per-atom coverage classification (refs + status, no raw text). Added in #738. */
    readonly coverageMatrix?: readonly QualityIntelligenceCoverageMatrixRow[];
    /** Optional: run quality score — percent of judged candidates rated "strong" [0-100]; null when the judge stage was skipped. Added in #736. */
    readonly qualityScore?: number | null;
    /** Optional: per-envelope content fingerprints for drift detection (Epic #735, Issue #742). */
    readonly sourceFingerprints?: readonly QualityIntelligenceSourceFingerprintRow[];
    /** Optional: per-atom content fingerprints for atom-aware drift detection (#798/#799). */
    readonly atomFingerprints?: readonly QualityIntelligenceAtomFingerprintRow[];
    /** Optional: model id that generated the candidates (Epic #761, Issue #763). */
    readonly modelId?: string;
    /** Optional: redaction-safe request parameter scalars (e.g. responseFormat, seed) (Epic #761). */
    readonly modelParameters?: Record<string, unknown>;
    /** Optional: seed used for deterministic sampling; null when model does not support seeding. */
    readonly seedUsed?: number | null;
}
export interface QualityIntelligenceSchemaValidationResult {
    readonly ok: boolean;
    readonly reason: string | undefined;
}
export declare function validateQualityIntelligenceEvidenceManifest(value: unknown): QualityIntelligenceSchemaValidationResult;
export {};
//# sourceMappingURL=manifestSchema.d.ts.map