import type { QualityIntelligenceEvidenceAtomId, QualityIntelligenceRunId, QualityIntelligenceTestCaseId, QualityIntelligenceValidationFindingId } from "./ids.js";
export declare const QUALITY_INTELLIGENCE_EVENT_SCHEMA_VERSION: 1;
export type QualityIntelligencePlannerKind = "scripted" | "model-routed";
export declare const QUALITY_INTELLIGENCE_PLANNER_KINDS: readonly QualityIntelligencePlannerKind[];
export interface QualityIntelligenceRunStage {
    /** Stable stage name (e.g. "ingest", "design", "validate", "review"). */
    readonly name: string;
    /** Opaque descriptor identifier the runtime maps to a stage implementation. */
    readonly descriptor: string;
}
export interface QualityIntelligenceRunPlan {
    readonly id: QualityIntelligenceRunId;
    /** ISO 8601 timestamp. */
    readonly requestedAt: string;
    readonly plannerKind: QualityIntelligencePlannerKind;
    readonly stages: readonly QualityIntelligenceRunStage[];
}
export interface QualityIntelligenceRunQueuedPayload {
    readonly kind: "run:queued";
}
export interface QualityIntelligenceRunStartedPayload {
    readonly kind: "run:started";
}
export interface QualityIntelligenceStageStartedPayload {
    readonly kind: "stage:started";
    readonly stageName: string;
}
export interface QualityIntelligenceStageCompletedPayload {
    readonly kind: "stage:completed";
    readonly stageName: string;
}
export interface QualityIntelligenceStageFailedPayload {
    readonly kind: "stage:failed";
    readonly stageName: string;
    /** Non-secret single-sentence failure reason; producer-redacted. */
    readonly reasonSummary: string;
}
export interface QualityIntelligenceCandidateProposedPayload {
    readonly kind: "candidate:proposed";
    readonly candidateId: QualityIntelligenceTestCaseId;
    readonly derivedFromAtomIds: readonly QualityIntelligenceEvidenceAtomId[];
}
export interface QualityIntelligenceFindingRecordedPayload {
    readonly kind: "finding:recorded";
    readonly findingId: QualityIntelligenceValidationFindingId;
}
export interface QualityIntelligenceReviewRequestedPayload {
    readonly kind: "review:requested";
    readonly candidateId: QualityIntelligenceTestCaseId;
}
export interface QualityIntelligenceReviewCompletedPayload {
    readonly kind: "review:completed";
    readonly candidateId: QualityIntelligenceTestCaseId;
}
export interface QualityIntelligenceRunSucceededPayload {
    readonly kind: "run:succeeded";
}
export interface QualityIntelligenceRunFailedPayload {
    readonly kind: "run:failed";
    /** Non-secret single-sentence failure reason; producer-redacted. */
    readonly reasonSummary: string;
}
export interface QualityIntelligenceRunCancelledPayload {
    readonly kind: "run:cancelled";
}
export type QualityIntelligenceRunEventPayload = QualityIntelligenceRunQueuedPayload | QualityIntelligenceRunStartedPayload | QualityIntelligenceStageStartedPayload | QualityIntelligenceStageCompletedPayload | QualityIntelligenceStageFailedPayload | QualityIntelligenceCandidateProposedPayload | QualityIntelligenceFindingRecordedPayload | QualityIntelligenceReviewRequestedPayload | QualityIntelligenceReviewCompletedPayload | QualityIntelligenceRunSucceededPayload | QualityIntelligenceRunFailedPayload | QualityIntelligenceRunCancelledPayload;
export type QualityIntelligenceRunEventKind = QualityIntelligenceRunEventPayload["kind"];
export declare const QUALITY_INTELLIGENCE_RUN_EVENT_KINDS: readonly QualityIntelligenceRunEventKind[];
export interface QualityIntelligenceRunEvent {
    readonly eventSchemaVersion: typeof QUALITY_INTELLIGENCE_EVENT_SCHEMA_VERSION;
    readonly runId: QualityIntelligenceRunId;
    /** Monotonic per-run non-negative integer. */
    readonly sequence: number;
    /** ISO 8601 timestamp. */
    readonly timestamp: string;
    readonly payload: QualityIntelligenceRunEventPayload;
}
/**
 * Assert sequence numbers in `events` are strictly increasing. Returns `void` on
 * success; throws `RangeError` on the first violation (including non-integer or
 * negative values).
 */
export declare const assertRunEventSequenceMonotonic: (events: readonly QualityIntelligenceRunEvent[]) => void;
//# sourceMappingURL=runPlanAndEvents.d.ts.map