import { type ProcessInfo, type ProcessHealthStatus } from './process-detector.js'; import { type ProcessRecord, type ProcessState, type HealthStatus } from './process-registry.js'; export interface ProcessConfig { agentId: string; sessionId: string; pid: number; mode: 'sdk'; workspacePath: string; command: string; } export interface DiscoveredProcess extends ProcessInfo { managementStatus: 'managed' | 'orphan' | 'unknown'; sessionId?: string; } export interface TerminationResult { success: boolean; agentId: string; pid: number; level: number; terminated: number; failed: number; message: string; } export interface ReclamationResult { success: boolean; pid: number; action: 'adopted' | 'terminated' | 'failed'; } export declare class AgentProcessManager { private static instance; private readonly registry; private constructor(); static getInstance(): AgentProcessManager; startProcess(config: ProcessConfig): Promise; discoverAllProcesses(): Promise; healthCheckAll(): Promise>; healthCheck(agentId: string): Promise; stopProcess(agentId: string): Promise; private sendSigterm; private sendForceKill; forceKill(agentId: string): Promise; reclaimOrphan(agentId: string): Promise; scanAndReclaimAll(): Promise>; markOrphaned(agentId: string): Promise; isManaged(agentId: string): boolean; getAllManagedProcesses(): ProcessRecord[]; getManagedProcessesByState(state: ProcessState): ProcessRecord[]; getUnmanagedProcesses(): Promise; rebuildRegistry(sessions: Array<{ agentId: string; sessionId: string; pid?: number; workspacePath?: string; command?: string; mode?: 'sdk'; }>): Promise; getStats(): Record; cleanupStaleRegistry(): Promise; removeProcess(agentId: string): Promise; getProcess(agentId: string): ProcessRecord | undefined; getProcessByPid(pid: number): ProcessRecord | undefined; } export declare function getAgentProcessManager(): AgentProcessManager; export type { ProcessRecord, ProcessState, HealthStatus, ProcessInfo, ProcessHealthStatus };