/**
 * Failure Diagnosis Engine
 *
 * Classifies runtime blockers into distinct classes and returns
 * class-specific unblocker guidance. Deterministic, no side effects.
 */
export declare const BlockerClass: {
    readonly RuntimeHandoffStall: "runtime-handoff-stall";
    readonly OpaqueProgress: "opaque-progress";
    readonly StaleRelayState: "stale-relay-state";
    readonly MissingConfig: "missing-config";
    readonly UnsupportedValidationCommand: "unsupported-validation-command";
    readonly AlreadyRunning: "already-running";
    readonly ControlFlowBreakage: "control-flow-breakage";
    readonly RepoValidationMismatch: "repo-validation-mismatch";
};
export type BlockerClass = (typeof BlockerClass)[keyof typeof BlockerClass];
export declare const FailureTaxonomyCategory: {
    readonly AgentRuntimeHandoffStalled: "agent_runtime.handoff_stalled";
    readonly AgentRuntimeProgressOpaque: "agent_runtime.progress_opaque";
    readonly EnvironmentRelayStateContaminated: "environment.relay_state_contaminated";
    readonly EnvironmentMissingConfig: "environment.missing_config";
    readonly EnvironmentAlreadyRunning: "environment.already_running";
    readonly WorkflowStructureControlFlowInvalid: "workflow_structure.control_flow_invalid";
    readonly ValidationStrategyUnsupportedCommand: "validation_strategy.unsupported_command";
    readonly ValidationStrategyRepoMismatch: "validation_strategy.repo_mismatch";
};
export type FailureTaxonomyCategory = (typeof FailureTaxonomyCategory)[keyof typeof FailureTaxonomyCategory];
export declare const RecoveryDecision: {
    readonly RestartRuntime: "restart_runtime";
    readonly ProbeBeforeRerun: "probe_before_rerun";
    readonly BlockRerun: "block_rerun";
    readonly ReplaceValidation: "replace_validation";
    readonly PatchWorkflowBeforeRerun: "patch_workflow_before_rerun";
};
export type RecoveryDecision = (typeof RecoveryDecision)[keyof typeof RecoveryDecision];
export declare const RerunMode: {
    readonly None: "none";
    readonly StepRetry: "step_retry";
    readonly FullRerun: "full_rerun";
    readonly Resume: "resume";
};
export type RerunMode = (typeof RerunMode)[keyof typeof RerunMode];
export interface DiagnosticSignal {
    /** Which subsystem reported the failure */
    source: string;
    /** Free-form error message or description */
    message: string;
    /** Optional structured metadata from the runtime */
    meta?: Record<string, unknown>;
}
export interface Diagnosis {
    blockerClass: BlockerClass;
    /** Dotted category used by Ricky's product failure taxonomy. */
    taxonomyCategory: FailureTaxonomyCategory;
    /** Human-readable label for the blocker */
    label: string;
    /** Class-specific guidance on how to unblock */
    unblocker: UnblockerGuidance;
}
export interface UnblockerGuidance {
    /** Short imperative action the operator should take */
    action: string;
    /** Why this action resolves the blocker */
    rationale: string;
    /** Conservative rerun/restart decision aligned to taxonomy. */
    recovery: RecoveryRecommendation;
    /** If true, the action can be attempted automatically */
    automatable: boolean;
}
export interface RecoveryRecommendation {
    decision: RecoveryDecision;
    rerunMode: RerunMode;
    /** Whether Ricky may start another run without operator confirmation. */
    rerunAllowed: boolean;
    /** Whether the recommendation would require cleanup, writes, repair, or rollback. */
    requiresMutation: boolean;
    reason: string;
}
/**
 * Diagnose a single signal and return a typed Diagnosis.
 * Returns `null` when the signal does not match any known blocker class.
 */
export declare function diagnose(signal: DiagnosticSignal): Diagnosis | null;
/**
 * Diagnose a batch of signals. Returns one Diagnosis per matched signal
 * (unmatched signals are silently dropped).
 */
export declare function diagnoseBatch(signals: DiagnosticSignal[]): Diagnosis[];
