import { RiddleProofRunParams, RiddleProofRunState, RiddleProofBlocker, RiddleProofCheckpointVisibility, RiddleProofCheckpointResponse, RiddleProofRunStatusSnapshot, RiddleProofRunResult } from './types.js';

type RiddleProofShipMode = "none" | "ship";
type RiddleProofCheckpointMode = "auto" | "yield";
interface RiddleProofWorkflowParams extends Record<string, unknown> {
    action: string;
    state_path?: string;
    leave_draft?: boolean;
    cleanup_merged_pr?: boolean;
    fetch_base?: boolean;
    update_base_checkout?: boolean;
}
interface RiddleProofEngineResult extends Record<string, unknown> {
    ok?: boolean;
    state_path?: string;
    checkpoint?: string | null;
    checkpointContract?: Record<string, unknown> | null;
    decisionRequest?: Record<string, unknown> | null;
    state?: Record<string, unknown> | null;
    summary?: string;
    shipGate?: Record<string, unknown> | null;
}
interface RiddleProofEngine {
    execute(params: RiddleProofWorkflowParams): Promise<RiddleProofEngineResult>;
}
interface RiddleProofEngineHarnessConfig {
    riddleProofDir?: string;
    defaultReviewer?: string;
    riddleEngineModuleUrl?: string;
    stateDir?: string;
    defaultMaxIterations?: number;
    defaultShipMode?: RiddleProofShipMode;
}
interface RiddleProofAgentPayload {
    ok?: boolean;
    payload?: Record<string, unknown>;
    summary?: string;
    blocker?: RiddleProofBlocker;
    diffDetected?: boolean;
    changedFiles?: string[];
    testsRun?: string[];
    implementationNotes?: string;
    details?: Record<string, unknown>;
}
interface RiddleProofEngineHarnessContext {
    request: RiddleProofRunParams;
    state: RiddleProofRunState;
    engineResult: RiddleProofEngineResult;
    fullRiddleState: Record<string, unknown> | null;
    checkpoint: string;
}
interface RiddleProofAgentAdapter {
    assessRecon(context: RiddleProofEngineHarnessContext): Promise<RiddleProofAgentPayload>;
    authorProofPacket(context: RiddleProofEngineHarnessContext): Promise<RiddleProofAgentPayload>;
    implementChange(context: RiddleProofEngineHarnessContext & {
        workdir?: string | null;
    }): Promise<RiddleProofAgentPayload>;
    assessProof(context: RiddleProofEngineHarnessContext): Promise<RiddleProofAgentPayload>;
}
interface RunRiddleProofEngineHarnessInput {
    request: RiddleProofRunParams;
    engine?: RiddleProofEngine | (() => Promise<RiddleProofEngine>);
    agent?: RiddleProofAgentAdapter;
    config?: RiddleProofEngineHarnessConfig;
    state?: RiddleProofRunState;
    state_path?: string;
    resume_params?: RiddleProofWorkflowParams;
    checkpoint_mode?: RiddleProofCheckpointMode;
    checkpoint_visibility?: RiddleProofCheckpointVisibility;
    checkpoint_response?: RiddleProofCheckpointResponse | Record<string, unknown>;
    max_iterations?: number;
    dry_run?: boolean;
    auto_approve?: boolean;
}
declare function createDisabledRiddleProofAgentAdapter(): RiddleProofAgentAdapter;
declare function readRiddleProofRunStatus(state_path: string): RiddleProofRunStatusSnapshot | null;
declare function runRiddleProofEngineHarness(input: RunRiddleProofEngineHarnessInput): Promise<RiddleProofRunResult>;

type engineHarness_RiddleProofAgentAdapter = RiddleProofAgentAdapter;
type engineHarness_RiddleProofAgentPayload = RiddleProofAgentPayload;
type engineHarness_RiddleProofCheckpointMode = RiddleProofCheckpointMode;
type engineHarness_RiddleProofEngine = RiddleProofEngine;
type engineHarness_RiddleProofEngineHarnessConfig = RiddleProofEngineHarnessConfig;
type engineHarness_RiddleProofEngineHarnessContext = RiddleProofEngineHarnessContext;
type engineHarness_RiddleProofEngineResult = RiddleProofEngineResult;
type engineHarness_RiddleProofShipMode = RiddleProofShipMode;
type engineHarness_RiddleProofWorkflowParams = RiddleProofWorkflowParams;
type engineHarness_RunRiddleProofEngineHarnessInput = RunRiddleProofEngineHarnessInput;
declare const engineHarness_createDisabledRiddleProofAgentAdapter: typeof createDisabledRiddleProofAgentAdapter;
declare const engineHarness_readRiddleProofRunStatus: typeof readRiddleProofRunStatus;
declare const engineHarness_runRiddleProofEngineHarness: typeof runRiddleProofEngineHarness;
declare namespace engineHarness {
  export { type engineHarness_RiddleProofAgentAdapter as RiddleProofAgentAdapter, type engineHarness_RiddleProofAgentPayload as RiddleProofAgentPayload, type engineHarness_RiddleProofCheckpointMode as RiddleProofCheckpointMode, type engineHarness_RiddleProofEngine as RiddleProofEngine, type engineHarness_RiddleProofEngineHarnessConfig as RiddleProofEngineHarnessConfig, type engineHarness_RiddleProofEngineHarnessContext as RiddleProofEngineHarnessContext, type engineHarness_RiddleProofEngineResult as RiddleProofEngineResult, type engineHarness_RiddleProofShipMode as RiddleProofShipMode, type engineHarness_RiddleProofWorkflowParams as RiddleProofWorkflowParams, type engineHarness_RunRiddleProofEngineHarnessInput as RunRiddleProofEngineHarnessInput, engineHarness_createDisabledRiddleProofAgentAdapter as createDisabledRiddleProofAgentAdapter, engineHarness_readRiddleProofRunStatus as readRiddleProofRunStatus, engineHarness_runRiddleProofEngineHarness as runRiddleProofEngineHarness };
}

export { type RiddleProofAgentAdapter as R, type RiddleProofAgentPayload as a, type RiddleProofCheckpointMode as b, type RiddleProofEngine as c, type RiddleProofEngineHarnessConfig as d, type RiddleProofEngineHarnessContext as e, type RiddleProofEngineResult as f, type RiddleProofShipMode as g, type RiddleProofWorkflowParams as h, type RunRiddleProofEngineHarnessInput as i, createDisabledRiddleProofAgentAdapter as j, runRiddleProofEngineHarness as k, engineHarness as l, readRiddleProofRunStatus as r };
