import { type Clock, type KernelPaths, type WatchdogStatus } from "./types.js"; import type { ProcessRunner } from "../providers/process.js"; export interface WatchdogPaths { readonly unitBase: string; readonly servicePath: string; readonly timerPath: string; } export interface WatchdogInstallOptions { readonly workspaceRoot: string; readonly omsExecutable?: string; readonly home?: string; readonly runner?: ProcessRunner; readonly dryRun?: boolean; readonly failAfterServiceWrite?: boolean; readonly supported?: boolean; } export interface WatchdogRemoveOptions { readonly workspaceRoot: string; readonly home?: string; readonly runner?: ProcessRunner; readonly dryRun?: boolean; readonly supported?: boolean; } export declare function isSystemdUserSupported(env?: NodeJS.ProcessEnv): boolean; export declare function watchdogUnitBase(workspaceRoot: string): string; export declare function resolveWatchdogPaths(workspaceRoot: string, home?: string): WatchdogPaths; export declare function inspectWatchdog(workspaceRoot: string, home?: string, supported?: boolean): WatchdogStatus; export declare function installWatchdogTimer(options: WatchdogInstallOptions): { readonly installed: boolean; readonly paths: WatchdogPaths; readonly rolledBack: boolean; }; export declare function removeWatchdogTimer(options: WatchdogRemoveOptions): { readonly removed: boolean; }; export type WatchdogAction = "none" | "repair_monitor" | "needs_human" | "deadline_closed"; export interface WatchdogCheckResult { readonly action: WatchdogAction; readonly detail: string; readonly repair_backoff_ms?: number; } export declare function runWatchdogCheck(input: { readonly tmuxCampaignAlive: boolean; readonly monitorAlive: boolean; readonly monitorGeneration: number; readonly conductorAuthorizedSessionId: string | null; readonly conductorPaneAlive: boolean; readonly deadlinePassed: boolean; readonly campaignActive: boolean; readonly repairAttempts?: number; }): WatchdogCheckResult; export declare function applyWatchdogMonitorRepair(input: { readonly paths: KernelPaths; readonly clock: Clock; readonly owner: string; readonly processInstanceId: string; readonly expectedGeneration: number; readonly pid?: number; }): { readonly repaired: boolean; readonly generation: number; }; export declare function verifyManagedDigest(body: string): boolean;