import { type Server } from 'node:net'; import type { DeploymentManager, DeploymentRequest, DeploymentResult } from './deployment'; export declare const DEFAULT_CONTROL_SOCKET = "/run/forgezero/control.sock"; export type ControlRequest = { op: 'deploy'; request?: DeploymentRequest; } | { op: 'status'; } | { op: 'pause'; } | { op: 'resume'; } | { op: 'pause-key'; key: string; } | { op: 'resume-key'; key: string; } | { op: 'stop-key'; key: string; } | { op: 'start-key'; key: string; } | { op: 'cancel'; id: string; }; export type ControlResponse = { ok: true; op: 'deploy'; taskId: string; result: DeploymentResult; } | { ok: true; op: 'status'; queue: ReturnType; } | { ok: true; op: Exclude; changed: boolean; } | { ok: true; op: 'stop-key'; changed: boolean; removed: number; } | { ok: false; error: { code: string; message: string; }; }; export declare function handleControl(manager: DeploymentManager, request: ControlRequest): Promise; /** Root/operator control is deliberately separate from the tenant vault socket. */ export declare function startControlServer(manager: DeploymentManager, socketPath?: string): Server; export declare function requestControl(request: ControlRequest, socketPath?: string, timeoutMs?: number): Promise; /** Deploy includes build, health gating and a drain window; other controls stay interactive. */ export declare function controlRequestTimeout(operation: ControlRequest['op']): number;