import { RiddleProofProfileResult, RiddleProofProfileStatus, RiddleProofProfileCheckResult } from './profile.js';
import { JsonValue } from './types.js';
import './public-state.js';

declare const RIDDLE_PROOF_CHANGE_CONTRACT_VERSION: "riddle-proof.change-contract.v1";
declare const RIDDLE_PROOF_CHANGE_RESULT_VERSION: "riddle-proof.change-result.v1";
declare const RIDDLE_PROOF_CHANGE_RECEIPT_VERSION: "riddle-proof.change-receipt.v1";
type RiddleProofChangeSide = "before" | "after";
type RiddleProofChangeStatus = RiddleProofProfileStatus;
type RiddleProofChangeDeltaStatus = "passed" | "failed" | "proof_insufficient" | "configuration_error";
type RiddleProofChangeProfileCheckStatus = RiddleProofProfileCheckResult["status"];
interface RiddleProofChangeGroupContract {
    label?: string;
    required_status?: RiddleProofProfileStatus | RiddleProofProfileStatus[];
}
interface RiddleProofProfileStatusTransitionDelta {
    type: "profile_status_transition";
    label?: string;
    before_status?: RiddleProofProfileStatus | RiddleProofProfileStatus[];
    after_status?: RiddleProofProfileStatus | RiddleProofProfileStatus[];
}
interface RiddleProofCheckStatusTransitionDelta {
    type: "check_status_transition";
    label?: string;
    check_label?: string;
    check_type?: string;
    before_status?: RiddleProofChangeProfileCheckStatus | RiddleProofChangeProfileCheckStatus[];
    after_status?: RiddleProofChangeProfileCheckStatus | RiddleProofChangeProfileCheckStatus[];
}
type RiddleProofChangeDelta = RiddleProofProfileStatusTransitionDelta | RiddleProofCheckStatusTransitionDelta;
interface RiddleProofChangeContract {
    version?: typeof RIDDLE_PROOF_CHANGE_CONTRACT_VERSION;
    name: string;
    before?: RiddleProofChangeGroupContract;
    after?: RiddleProofChangeGroupContract;
    deltas: RiddleProofChangeDelta[];
    metadata?: Record<string, JsonValue>;
}
interface RiddleProofChangeGroupResult {
    side: RiddleProofChangeSide;
    label: string;
    ok: boolean;
    profile_name?: string;
    status: RiddleProofProfileStatus | "missing";
    required_status: RiddleProofProfileStatus[];
    summary?: string;
    message?: string;
}
interface RiddleProofChangeDeltaResult {
    type: RiddleProofChangeDelta["type"];
    label: string;
    status: RiddleProofChangeDeltaStatus;
    before_observed?: JsonValue;
    after_observed?: JsonValue;
    message?: string;
}
interface RiddleProofChangeResult {
    version: typeof RIDDLE_PROOF_CHANGE_RESULT_VERSION;
    contract_name: string;
    status: RiddleProofChangeStatus;
    groups: {
        before: RiddleProofChangeGroupResult;
        after: RiddleProofChangeGroupResult;
    };
    deltas: RiddleProofChangeDeltaResult[];
    summary: string;
    metadata?: Record<string, JsonValue>;
}
interface AssessRiddleProofChangeInput {
    before_result?: RiddleProofProfileResult;
    after_result?: RiddleProofProfileResult;
}
type RiddleProofChangeReceiptVerdict = "mergeable" | "not_mergeable" | "environment_blocked" | "needs_human_review" | "configuration_error" | "proof_insufficient";
type RiddleProofChangeReceiptArtifactKind = "image" | "data" | "artifact";
interface RiddleProofChangeReceiptArtifact {
    side: RiddleProofChangeSide;
    name: string;
    kind: RiddleProofChangeReceiptArtifactKind;
    url?: string;
    path?: string;
    source?: string;
}
interface RiddleProofChangeReceiptCheckCounts {
    total: number;
    passed: number;
    failed: number;
    skipped: number;
    needs_human_review: number;
}
interface RiddleProofChangeReceiptSide {
    side: RiddleProofChangeSide;
    source: string;
    profile_name: string;
    status: RiddleProofProfileStatus;
    summary: string;
    route?: JsonValue;
    captured_at?: string;
    checks: RiddleProofChangeReceiptCheckCounts;
    screenshots: RiddleProofChangeReceiptArtifact[];
    artifacts: RiddleProofChangeReceiptArtifact[];
}
interface RiddleProofChangeReceiptDelta {
    type: RiddleProofChangeDeltaResult["type"];
    label: string;
    status: RiddleProofChangeDeltaStatus;
    before_observed?: JsonValue;
    after_observed?: JsonValue;
    message?: string;
}
interface RiddleProofChangeReceipt {
    version: typeof RIDDLE_PROOF_CHANGE_RECEIPT_VERSION;
    contract_name: string;
    profile_name?: string;
    status: RiddleProofChangeStatus;
    verdict: RiddleProofChangeReceiptVerdict;
    summary: string;
    before: RiddleProofChangeReceiptSide;
    after: RiddleProofChangeReceiptSide;
    deltas: RiddleProofChangeReceiptDelta[];
    proves: string[];
    does_not_prove: string[];
    metadata?: Record<string, JsonValue>;
}
interface CreateRiddleProofChangeReceiptInput {
    contract: RiddleProofChangeContract;
    result: RiddleProofChangeResult;
    before_result: RiddleProofProfileResult;
    after_result: RiddleProofProfileResult;
    before_source: string;
    after_source: string;
    profile_name?: string;
}
declare function assessRiddleProofChange(contract: RiddleProofChangeContract, input: AssessRiddleProofChangeInput): RiddleProofChangeResult;
declare function createRiddleProofChangeReceipt(input: CreateRiddleProofChangeReceiptInput): RiddleProofChangeReceipt;
declare function riddleProofChangeReceiptMarkdown(receipt: RiddleProofChangeReceipt): string;
declare function riddleProofChangeReceiptHtml(receipt: RiddleProofChangeReceipt): string;

export { type AssessRiddleProofChangeInput, type CreateRiddleProofChangeReceiptInput, RIDDLE_PROOF_CHANGE_CONTRACT_VERSION, RIDDLE_PROOF_CHANGE_RECEIPT_VERSION, RIDDLE_PROOF_CHANGE_RESULT_VERSION, type RiddleProofChangeContract, type RiddleProofChangeDelta, type RiddleProofChangeDeltaResult, type RiddleProofChangeDeltaStatus, type RiddleProofChangeGroupContract, type RiddleProofChangeGroupResult, type RiddleProofChangeProfileCheckStatus, type RiddleProofChangeReceipt, type RiddleProofChangeReceiptArtifact, type RiddleProofChangeReceiptArtifactKind, type RiddleProofChangeReceiptCheckCounts, type RiddleProofChangeReceiptDelta, type RiddleProofChangeReceiptSide, type RiddleProofChangeReceiptVerdict, type RiddleProofChangeResult, type RiddleProofChangeSide, type RiddleProofChangeStatus, type RiddleProofCheckStatusTransitionDelta, type RiddleProofProfileStatusTransitionDelta, assessRiddleProofChange, createRiddleProofChangeReceipt, riddleProofChangeReceiptHtml, riddleProofChangeReceiptMarkdown };
