/**
 * Activation readiness for a routine, composed from the target-aware execution
 * context ({@link resolveJobExecutionContext}) plus the harness/target checks a
 * caller can perform on this box (agent installed). This is the gate `add`,
 * `edit`, `doctor`, and `resume` all run before activating a routine: ready →
 * active, any proven blocker → saved paused with a stable code + repair command.
 *
 * Structural context readiness is synchronous for the scheduler. Interactive
 * add/edit/doctor/resume additionally call the live variant below, which probes
 * authentication and Codex's native workspace-trust record before activation.
 */
import type { JobConfig } from './scheduling/routines.js';
import { type RoutineReadinessResult, type RoutineReadiness } from './routine-context.js';
/**
 * Fire-time auth preflight: read the daemon-warmed auth-health cache for the
 * exact (agent, version) a routine has resolved to run, and return an
 * `agent_auth_failed` blocker when that account is provably signed out — so the
 * daemon records a terminal `blocked` run (with the re-login repair) instead of
 * spawning a doomed run that 401s and burns a session (PHNX-3415).
 *
 * Cache-only (no network, no prompt — the daemon refreshes the cache
 * periodically and `fleet ping` writes it), and fails OPEN on a missing or
 * non-blocking verdict so a stale/absent probe never wedges a routine. It is
 * checked AFTER version rotation resolves the account (`launch.chain[0]`), so it
 * judges the identity the run will actually use, never a rotated-past dead pin.
 */
export declare function fireTimeAuthReadiness(agent: string, version: string): RoutineReadiness | null;
/**
 * Evaluate whether a routine is ready to activate on this box. `probeAgent`
 * defaults to "is a version of the routine's agent resolvable" via
 * {@link resolveVersion}; pass a stub in tests to exercise the availability path
 * without an installed harness.
 */
export declare function evaluateActivationReadiness(config: JobConfig, deps?: {
    probeAgent?: (agent: string) => boolean;
}): RoutineReadinessResult;
/** One-line human summary of a blocked readiness result, with its repair. */
export declare function formatReadinessBlocker(result: RoutineReadinessResult): string;
interface RemoteProjectDefinition {
    name: string;
    root?: string;
    defaultPath?: string;
}
/** Parse the target HOME sentinel and the project catalog returned by one SSH call. */
export declare function parseRemoteProjectSnapshot(stdout: string): {
    home: string;
    projects: RemoteProjectDefinition[];
} | undefined;
/** Build a target-native probe that creates and removes a file in the workspace. */
export declare function buildRemoteWorkspaceProbe(cwd: string, windows: boolean): string;
/** A successful probe must contain the exact requested postcondition, not merely exit zero. */
export declare function probeOutputHasSentinel(stdout: string, sentinel: string): boolean;
/**
 * Interactive setup/repair readiness. Unlike the scheduler's deterministic
 * structural gate, this completes a real local auth request and reads Codex's
 * native trust record before add/edit/resume can activate the definition.
 */
export declare function evaluateActivationReadinessLive(config: JobConfig): Promise<RoutineReadinessResult>;
/** Resolve and probe the actual SSH target used by a host-placed routine. */
export declare function evaluateHostActivationReadiness(config: JobConfig): Promise<RoutineReadinessResult>;
export {};
