export type DoctorMode = "tmux"; export type DoctorReadiness = "ready" | "partially_ready" | "not_ready"; export type DoctorProbeCommand = "openclaw" | "tmux" | "herdr" | "codex" | "claude"; export type DoctorProbeStatus = "ok" | "not_found" | "not_executable" | "version_failed" | "timeout" | "malformed_output"; export interface DoctorCommandCheck { command: string; available: boolean; version_supported?: boolean; native_profile_supported?: boolean; native_profile?: string; native_actions_available?: boolean; compatibility_warning?: string; status?: DoctorProbeStatus; } export interface DoctorCommandProbe extends DoctorCommandCheck { command: DoctorProbeCommand; status: DoctorProbeStatus; executable: string; args: readonly string[]; found: boolean; executable_ok: boolean; duration_ms: number; version?: string; output?: string; error?: string; exit_code?: number | null; signal?: NodeJS.Signals | null; } export interface DoctorProbeOptions { /** * Timeout for each command. Values above 30 seconds are clamped so a doctor * run cannot become unbounded through configuration. */ timeoutMs?: number; env?: NodeJS.ProcessEnv; cwd?: string; executables?: Partial>; } interface DoctorModeCapability { available: boolean; status: DoctorReadiness; agents: string[]; requires: string[]; missing: string[]; } interface DoctorTmuxCapability extends DoctorModeCapability { recommended: true; } interface DoctorHerdrCapability extends DoctorModeCapability { version_supported: boolean; required_version: typeof DOCTOR_SUPPORTED_HERDR_VERSION; } export interface DoctorCapabilitySummary { coreOk: boolean; transportOk: boolean; available_transports: Array<"tmux" | "herdr">; /** Retained for compatibility with existing doctor consumers. */ mode: DoctorMode; readiness: DoctorReadiness; tmux: DoctorTmuxCapability; herdr: DoctorHerdrCapability; } export declare const DOCTOR_SUPPORTED_HERDR_VERSION: "0.8.0"; export declare const DOCTOR_PROBE_COMMANDS: readonly DoctorProbeCommand[]; /** * Return the exact native lifecycle/status profile verified for a coding-agent * version. This diagnostic never controls action availability: unknown coding- * agent versions use the optimistic runtime protocol with a warning. */ export declare function doctorCodingAgentNativeProfile(command: "codex" | "claude", version: string | undefined): string | undefined; /** * Run a bounded, non-interactive version probe for one doctor dependency. * * This deliberately does not invoke a shell. Successful process execution is * not enough: the output must also contain a recognizable version. */ export declare function probeDoctorCommand(command: DoctorProbeCommand, options?: DoctorProbeOptions): DoctorCommandProbe; /** * Probe every external command used by the supported terminal transports. */ export declare function runDoctorCapabilityProbes(options?: DoctorProbeOptions): DoctorCommandProbe[]; export declare function evaluateDoctorCapabilities(checks: readonly DoctorCommandCheck[]): DoctorCapabilitySummary; export {};