import { type RuntimeState } from './config.js'; import type { ShutdownReason } from './local-control.js'; export type StopMode = 'control-plane' | 'legacy-force-kill' | 'control-timeout-force-kill'; export interface StopAgentOptions { controlTimeoutMs?: number; exitTimeoutMs?: number; afterControlAccepted?: () => void | Promise; beforeForceKill?: () => void | Promise; isAlive?: (pid: number) => boolean; forceKill?: (pid: number) => boolean; sleep?: (milliseconds: number) => Promise; shutdownMetadata?: { jobId?: string; targetVersion?: string; }; } export declare function stopAgentProcess(state: RuntimeState, reason: ShutdownReason, options?: StopAgentOptions): Promise;