type WorkflowAction = "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "status" | "sync" | "run";
type WorkflowStage = Exclude<WorkflowAction, "status" | "sync" | "run">;
declare const WORKFLOW_STAGE_ORDER: WorkflowStage[];
interface WorkflowParams {
    action: WorkflowAction;
    repo?: string;
    branch?: string;
    change_request?: string;
    commit_message?: string;
    prod_url?: string;
    capture_script?: string;
    success_criteria?: string;
    assertions?: unknown;
    assertions_json?: string;
    verification_mode?: string;
    resume_session?: string;
    target_image_url?: string;
    target_image_hash?: string;
    viewport_matrix?: unknown;
    viewport_matrix_json?: string;
    deterministic_setup?: unknown;
    deterministic_setup_json?: string;
    reference?: "prod" | "before" | "both";
    base_branch?: string;
    before_ref?: string;
    allow_static_preview_fallback?: boolean;
    context?: string;
    reviewer?: string;
    mode?: "server" | "static" | "audit" | (string & {});
    implementation_mode?: "change" | "none" | (string & {});
    require_diff?: boolean;
    allow_code_changes?: boolean;
    build_command?: string;
    build_output?: string;
    server_image?: string;
    server_command?: string;
    server_port?: number;
    server_path?: string;
    use_auth?: boolean;
    auth_localStorage_json?: string;
    auth_cookies_json?: string;
    auth_headers_json?: string;
    color_scheme?: "dark" | "light";
    wait_for_selector?: string;
    discord_channel?: string;
    discord_thread_id?: string;
    discord_message_id?: string;
    discord_source_url?: string;
    recon_assessment_json?: string;
    proof_plan?: string;
    author_packet_json?: string;
    implementation_notes?: string;
    proof_assessment_json?: string;
    state_path?: string;
    auto_approve?: boolean;
    continue_from_checkpoint?: boolean;
    ship_after_verify?: boolean;
    ship_mode?: "none" | "ship";
    leave_draft?: boolean;
    cleanup_merged_pr?: boolean;
    fetch_base?: boolean;
    update_base_checkout?: boolean;
    advance_stage?: WorkflowStage;
}
declare function previewModeFromWorkflowMode(value: unknown): "server" | "static" | undefined;
declare function noImplementationModeFor(params?: unknown, state?: unknown): boolean;
interface PluginConfig {
    riddleProofDir?: string;
    statePath?: string;
    defaultReviewer?: string;
}
declare const CHECKPOINT_CONTRACT_VERSION = "riddle-proof-run.checkpoint.v1";
declare const BUNDLED_RIDDLE_PROOF_DIR: string;
declare const RIDDLE_PROOF_DIR_CANDIDATES: string[];
interface CheckpointInputContract {
    name: string;
    type: "json" | "string" | "boolean" | "external_action";
    required?: boolean;
    description: string;
}
interface ShipGateValidation {
    ok: boolean;
    reasons: string[];
    required_baselines: string[];
    evidence: {
        reference: string;
        verification_mode: string | null;
        prod_url: string | null;
        before_cdn: string | null;
        prod_cdn: string | null;
        after_cdn: string | null;
        verify_status: string | null;
        proof_assessment_decision: string | null;
        proof_assessment_source: string | null;
        visual_delta_required: boolean;
        visual_delta_status: string | null;
        visual_delta_passed: boolean | null;
        hard_blockers?: string[];
    };
}
declare function resolveRiddleProofDir(config?: PluginConfig): string;
declare function resolveConfig(config?: PluginConfig, params?: Partial<Pick<WorkflowParams, "action" | "state_path">>): {
    riddleProofDir: string;
    statePath: string;
    argsPath: string;
    defaultReviewer: string;
};
declare function ensureAction(action: string): WorkflowAction;
declare function workflowFile(riddleProofDir: string, action: WorkflowStage): string;
declare function buildSetupArgs(params: WorkflowParams, config: ReturnType<typeof resolveConfig>): {
    repo: string | undefined;
    branch: string;
    change_request: string;
    commit_message: string;
    prod_url: string;
    capture_script: string;
    success_criteria: string;
    assertions_json: string;
    verification_mode: string;
    resume_session: string;
    target_image_url: string;
    target_image_hash: string;
    viewport_matrix_json: string;
    deterministic_setup_json: string;
    reference: "before" | "prod" | "both";
    base_branch: string;
    before_ref: string;
    allow_static_preview_fallback: string;
    context: string;
    reviewer: string;
    mode: string;
    implementation_mode: string | (string & {});
    require_diff: boolean | undefined;
    allow_code_changes: boolean | undefined;
    build_command: string;
    build_output: string;
    server_image: string;
    server_command: string;
    server_port: string;
    server_path: string;
    server_path_source: string;
    use_auth: string;
    auth_localStorage_json: string;
    auth_cookies_json: string;
    auth_headers_json: string;
    color_scheme: string;
    wait_for_selector: string;
    discord_channel: string;
    discord_thread_id: string;
    discord_message_id: string;
    discord_source_url: string;
    ship_mode: string;
    leave_draft: string;
};
declare function readState(statePath: string): any;
declare function writeState(statePath: string, state: Record<string, unknown>): void;
declare function ensureStageLoopState(state?: any): any;
declare function clearStageDecisionRequest(state?: any): any;
declare function recordStageAttempt(state: any, stage: WorkflowStage, entry?: {
    status?: string;
    checkpoint?: string | null;
    summary?: string | null;
    requestedAdvanceStage?: WorkflowStage | null;
    haltedForApproval?: boolean;
    autoApproved?: boolean;
    retryable?: boolean;
    checkpointDisposition?: string | null;
    error?: string | null;
    details?: Record<string, unknown>;
}): {
    attempt: number;
    stage: WorkflowStage;
    status: string;
    checkpoint: string | null;
    summary: string | null;
    requested_advance_stage: WorkflowStage | null;
    halted_for_approval: boolean;
    auto_approved: boolean;
    retryable: boolean;
    checkpoint_disposition: string | null;
    error: string | null;
    details: Record<string, unknown>;
    attempted_at: string;
};
declare function setStageDecisionRequest(state: any, request: {
    stage: WorkflowStage;
    checkpoint: string;
    summary: string;
    nextActions?: string[];
    advanceOptions?: WorkflowStage[];
    recommendedAdvanceStage?: WorkflowStage | null;
    continueWithStage?: WorkflowStage | null;
    blocking?: boolean;
    details?: Record<string, unknown>;
    checkpointContract?: Record<string, unknown>;
}): any;
declare function checkpointContinueStage(state: any): WorkflowStage | null;
declare function invalidateVerifyEvidence(state?: any): {
    invalidated: boolean;
    hadAfterCdn?: undefined;
    hadVerifyResults?: undefined;
    hadMergeRecommendation?: undefined;
    hadProofSummary?: undefined;
    hadVerifyStatus?: undefined;
    hadVerifySummary?: undefined;
    hadVerifyDecisionRequest?: undefined;
    hadEvidenceNotes?: undefined;
    hadProofAssessment?: undefined;
    hadProofAssessmentRequest?: undefined;
} | {
    invalidated: boolean;
    hadAfterCdn: boolean;
    hadVerifyResults: boolean;
    hadMergeRecommendation: boolean;
    hadProofSummary: boolean;
    hadVerifyStatus: boolean;
    hadVerifySummary: boolean;
    hadVerifyDecisionRequest: boolean;
    hadEvidenceNotes: boolean;
    hadProofAssessment: boolean;
    hadProofAssessmentRequest: boolean;
};
declare function visualDeltaRequiredForState(state?: any): boolean;
declare function visualDeltaForState(state?: any): Record<string, any>;
declare function visualDeltaShipGateReason(state?: any): string | null;
declare function proofAssessmentHardBlockersForState(state?: any): string[];
declare function requiredBaselineLabelsForState(state?: any): string[];
declare function validateShipGate(state?: any): ShipGateValidation;
declare function buildCheckpointContract(state: any, request: {
    statePath?: string;
    stage: WorkflowStage;
    checkpoint: string;
    summary: string;
    nextActions?: string[];
    advanceOptions?: WorkflowStage[];
    recommendedAdvanceStage?: WorkflowStage | null;
    continueWithStage?: WorkflowStage | null;
    blocking?: boolean;
}): Record<string, unknown>;
declare function mergeStateFromParams(statePath: string, params: WorkflowParams): any;
declare function summarizeState(state: any): {
    stage: string;
    summary: string;
    state: null;
} | {
    stage: any;
    summary: string;
    state: {
        workspace_ready: boolean;
        repo: any;
        branch: any;
        mode: any;
        workflow_mode: any;
        implementation_mode: any;
        require_diff: any;
        allow_code_changes: any;
        no_implementation_mode: boolean;
        reference: any;
        before_ref: any;
        allow_static_preview_fallback: boolean;
        commit_message: any;
        author_status: any;
        author_summary: any;
        author_request: any;
        proof_plan_status: any;
        proof_plan: any;
        proof_plan_request: any;
        proof_profile_applied: boolean;
        proof_profile: any;
        recon_status: any;
        recon_assessment: any;
        recon_assessment_request: any;
        recon_assessment_source: any;
        recon_decision_request: any;
        recon_attempts_used: any;
        recon_attempts_max: any;
        recon_hypothesis: any;
        implementation_status: any;
        implementation_summary: any;
        implementation_detection_summary: any;
        implementation_detection: any;
        implementation_environment_issues: any;
        verify_status: any;
        verify_summary: any;
        verify_decision_request: any;
        proof_assessment: any;
        proof_assessment_request: any;
        proof_assessment_source: any;
        merge_recommendation: any;
        before_cdn: any;
        after_cdn: any;
        prod_cdn: any;
        pr_url: any;
        pr_branch: any;
        pr_state: any;
        ship_commit: any;
        ship_remote_head: any;
        merge_commit: any;
        merged_at: any;
        ship_push: any;
        ship_report: any;
        cleanup_report: any;
        proof_comment_url: any;
        proof_assessment_comment_url: any;
        marked_ready: any;
        left_draft: any;
        ci_status: any;
        reviewer: any;
        active_checkpoint: any;
        active_checkpoint_stage: any;
        continue_with_stage: WorkflowStage | null;
        stage_decision_request: any;
        stage_attempt_counts: {
            [k: string]: number;
        };
        explicit_stage_gate: boolean;
        last_requested_advance_stage: any;
        recon_results: any;
        verify_results: any;
        proof_session: any;
        parent_proof_session: any;
        proof_session_artifact_url: any;
    };
};

declare const proofRunCore_BUNDLED_RIDDLE_PROOF_DIR: typeof BUNDLED_RIDDLE_PROOF_DIR;
declare const proofRunCore_CHECKPOINT_CONTRACT_VERSION: typeof CHECKPOINT_CONTRACT_VERSION;
type proofRunCore_CheckpointInputContract = CheckpointInputContract;
type proofRunCore_PluginConfig = PluginConfig;
declare const proofRunCore_RIDDLE_PROOF_DIR_CANDIDATES: typeof RIDDLE_PROOF_DIR_CANDIDATES;
type proofRunCore_ShipGateValidation = ShipGateValidation;
declare const proofRunCore_WORKFLOW_STAGE_ORDER: typeof WORKFLOW_STAGE_ORDER;
type proofRunCore_WorkflowAction = WorkflowAction;
type proofRunCore_WorkflowParams = WorkflowParams;
type proofRunCore_WorkflowStage = WorkflowStage;
declare const proofRunCore_buildCheckpointContract: typeof buildCheckpointContract;
declare const proofRunCore_buildSetupArgs: typeof buildSetupArgs;
declare const proofRunCore_checkpointContinueStage: typeof checkpointContinueStage;
declare const proofRunCore_clearStageDecisionRequest: typeof clearStageDecisionRequest;
declare const proofRunCore_ensureAction: typeof ensureAction;
declare const proofRunCore_ensureStageLoopState: typeof ensureStageLoopState;
declare const proofRunCore_invalidateVerifyEvidence: typeof invalidateVerifyEvidence;
declare const proofRunCore_mergeStateFromParams: typeof mergeStateFromParams;
declare const proofRunCore_noImplementationModeFor: typeof noImplementationModeFor;
declare const proofRunCore_previewModeFromWorkflowMode: typeof previewModeFromWorkflowMode;
declare const proofRunCore_proofAssessmentHardBlockersForState: typeof proofAssessmentHardBlockersForState;
declare const proofRunCore_readState: typeof readState;
declare const proofRunCore_recordStageAttempt: typeof recordStageAttempt;
declare const proofRunCore_requiredBaselineLabelsForState: typeof requiredBaselineLabelsForState;
declare const proofRunCore_resolveConfig: typeof resolveConfig;
declare const proofRunCore_resolveRiddleProofDir: typeof resolveRiddleProofDir;
declare const proofRunCore_setStageDecisionRequest: typeof setStageDecisionRequest;
declare const proofRunCore_summarizeState: typeof summarizeState;
declare const proofRunCore_validateShipGate: typeof validateShipGate;
declare const proofRunCore_visualDeltaForState: typeof visualDeltaForState;
declare const proofRunCore_visualDeltaRequiredForState: typeof visualDeltaRequiredForState;
declare const proofRunCore_visualDeltaShipGateReason: typeof visualDeltaShipGateReason;
declare const proofRunCore_workflowFile: typeof workflowFile;
declare const proofRunCore_writeState: typeof writeState;
declare namespace proofRunCore {
  export { proofRunCore_BUNDLED_RIDDLE_PROOF_DIR as BUNDLED_RIDDLE_PROOF_DIR, proofRunCore_CHECKPOINT_CONTRACT_VERSION as CHECKPOINT_CONTRACT_VERSION, type proofRunCore_CheckpointInputContract as CheckpointInputContract, type proofRunCore_PluginConfig as PluginConfig, proofRunCore_RIDDLE_PROOF_DIR_CANDIDATES as RIDDLE_PROOF_DIR_CANDIDATES, type proofRunCore_ShipGateValidation as ShipGateValidation, proofRunCore_WORKFLOW_STAGE_ORDER as WORKFLOW_STAGE_ORDER, type proofRunCore_WorkflowAction as WorkflowAction, type proofRunCore_WorkflowParams as WorkflowParams, type proofRunCore_WorkflowStage as WorkflowStage, proofRunCore_buildCheckpointContract as buildCheckpointContract, proofRunCore_buildSetupArgs as buildSetupArgs, proofRunCore_checkpointContinueStage as checkpointContinueStage, proofRunCore_clearStageDecisionRequest as clearStageDecisionRequest, proofRunCore_ensureAction as ensureAction, proofRunCore_ensureStageLoopState as ensureStageLoopState, proofRunCore_invalidateVerifyEvidence as invalidateVerifyEvidence, proofRunCore_mergeStateFromParams as mergeStateFromParams, proofRunCore_noImplementationModeFor as noImplementationModeFor, proofRunCore_previewModeFromWorkflowMode as previewModeFromWorkflowMode, proofRunCore_proofAssessmentHardBlockersForState as proofAssessmentHardBlockersForState, proofRunCore_readState as readState, proofRunCore_recordStageAttempt as recordStageAttempt, proofRunCore_requiredBaselineLabelsForState as requiredBaselineLabelsForState, proofRunCore_resolveConfig as resolveConfig, proofRunCore_resolveRiddleProofDir as resolveRiddleProofDir, proofRunCore_setStageDecisionRequest as setStageDecisionRequest, proofRunCore_summarizeState as summarizeState, proofRunCore_validateShipGate as validateShipGate, proofRunCore_visualDeltaForState as visualDeltaForState, proofRunCore_visualDeltaRequiredForState as visualDeltaRequiredForState, proofRunCore_visualDeltaShipGateReason as visualDeltaShipGateReason, proofRunCore_workflowFile as workflowFile, proofRunCore_writeState as writeState };
}

export { visualDeltaShipGateReason as A, BUNDLED_RIDDLE_PROOF_DIR as B, CHECKPOINT_CONTRACT_VERSION as C, workflowFile as D, writeState as E, type PluginConfig as P, RIDDLE_PROOF_DIR_CANDIDATES as R, type ShipGateValidation as S, type WorkflowParams as W, type WorkflowStage as a, type CheckpointInputContract as b, WORKFLOW_STAGE_ORDER as c, type WorkflowAction as d, buildCheckpointContract as e, buildSetupArgs as f, checkpointContinueStage as g, clearStageDecisionRequest as h, ensureAction as i, ensureStageLoopState as j, invalidateVerifyEvidence as k, previewModeFromWorkflowMode as l, mergeStateFromParams as m, noImplementationModeFor as n, proofAssessmentHardBlockersForState as o, proofRunCore as p, readState as q, resolveConfig as r, recordStageAttempt as s, requiredBaselineLabelsForState as t, resolveRiddleProofDir as u, setStageDecisionRequest as v, summarizeState as w, validateShipGate as x, visualDeltaForState as y, visualDeltaRequiredForState as z };
