import type { ActiveRunSnapshot } from '../types.js';
import { type BlockerClass, type FailureTaxonomyCategory, type RecoveryRecommendation } from './failure-diagnosis.js';
export type PreflightIssueCode = 'stale_relay_state' | 'missing_config' | 'unsupported_validation_command' | 'already_running' | 'repo_validation_mismatch';
export interface RelayStateObservation {
    path: string;
    present: boolean;
    stale?: boolean;
    ageMs?: number;
}
export interface RequiredConfigObservation {
    path: string;
    present: boolean;
    description?: string;
}
export interface ValidationCommandObservation {
    command: string;
    supported: boolean;
    reason?: string;
}
export interface RepoValidationObservation {
    command: string;
    meaningful: boolean;
    reason?: string;
}
export interface RuntimePreflightInput {
    cwd: string;
    requestedRunId?: string;
    requestedWorkflowFile?: string;
    relayState?: RelayStateObservation[];
    requiredConfig?: RequiredConfigObservation[];
    validationCommands?: ValidationCommandObservation[];
    repoValidation?: RepoValidationObservation;
    activeRuns?: ActiveRunSnapshot[];
}
export interface RuntimePreflightIssue {
    code: PreflightIssueCode;
    blockerClass: BlockerClass;
    taxonomyCategory: FailureTaxonomyCategory;
    blocking: boolean;
    message: string;
    recommendation: RecoveryRecommendation;
    operatorAction: string;
    rationale: string;
    /** Preflight never performs cleanup, repair, rollback, or launch side effects. */
    destructiveCleanupAllowed: false;
    evidence: unknown;
}
export interface RuntimePreflightResult {
    ok: boolean;
    issues: RuntimePreflightIssue[];
}
export declare function runRuntimePreflight(input: RuntimePreflightInput): RuntimePreflightResult;
