import { RiddleProofPublicStateSummary } from './public-state.js';
import { RiddleProofRunState, RiddleProofStatus, RiddleProofTerminalMetadata, RiddleProofEvidenceBundle, RiddleProofRunResult } from './types.js';

declare function isTerminalStatus(status: RiddleProofStatus): boolean;
declare function isProtectedFinalStatus(status: unknown): boolean;
declare function isSuccessfulStatus(status: RiddleProofStatus): boolean;
declare function compactRecord<T extends Record<string, unknown>>(input: T): Partial<T>;
declare function nonEmptyString(value: unknown): string | undefined;
declare function recordValue(value: unknown): Record<string, unknown> | undefined;
interface TerminalMetadataInput {
    riddleState?: Record<string, unknown> | null;
    engineResult?: Record<string, unknown> | null;
    checkpointDetails?: Record<string, unknown> | null;
}
declare function normalizeTerminalMetadata(input: TerminalMetadataInput): RiddleProofTerminalMetadata;
declare function applyTerminalMetadata<T extends RiddleProofRunState>(state: T, metadata: RiddleProofTerminalMetadata): T;
interface RiddleProofShipControlState {
    ship_held: boolean;
    shipping_disabled: boolean;
    ship_authorized: boolean;
}
declare function publicStateForRunState(input: {
    state: RiddleProofRunState;
    status?: RiddleProofStatus;
    raw?: Record<string, unknown>;
}): RiddleProofPublicStateSummary;
declare function publicMergeRecommendationForRunState(input: {
    state: RiddleProofRunState;
    status?: RiddleProofStatus;
    raw?: Record<string, unknown>;
}): string | undefined;
declare function shipControlStateFor(input: {
    state: RiddleProofRunState;
    status?: RiddleProofStatus;
    raw?: Record<string, unknown>;
}): RiddleProofShipControlState;
declare function applyShipControlState<T extends RiddleProofRunState>(state: T, input?: {
    status?: RiddleProofStatus;
    raw?: Record<string, unknown>;
}): T;
declare function createRunResult(input: {
    state: RiddleProofRunState;
    status?: RiddleProofStatus;
    state_path?: string | null;
    last_summary?: string | null;
    metadata?: RiddleProofTerminalMetadata;
    evidence_bundle?: RiddleProofEvidenceBundle;
    raw?: Record<string, unknown>;
}): RiddleProofRunResult;

export { type RiddleProofShipControlState, type TerminalMetadataInput, applyShipControlState, applyTerminalMetadata, compactRecord, createRunResult, isProtectedFinalStatus, isSuccessfulStatus, isTerminalStatus, nonEmptyString, normalizeTerminalMetadata, publicMergeRecommendationForRunState, publicStateForRunState, recordValue, shipControlStateFor };
