/** * Worker enumeration helpers: discover the compose project name and list * worker replicas via the Docker Engine API. * * Extracted from worker-scaler.ts (#714) so both the scaler and the * orchestrator's RelayBridge can enumerate workers without dragging in the * scale-write paths, env-file rewriting, etc. Pure move — no behavior change. */ import { DockerEngineClient } from './docker-engine-client.js'; import type { ContainerState } from './docker-engine-types.js'; export interface WorkerReplica { id: string; number: number; name: string; state: ContainerState; networkIds: string[]; } /** * Discover the compose project name by inspecting the orchestrator's own * container. Falls back to COMPOSE_PROJECT_NAME env var. Throws if neither * resolves — happens when running outside compose (dev mode, raw docker run). */ export declare function computeProjectName(client: DockerEngineClient): Promise; /** * Enumerate worker containers for the given compose project. Includes * stopped/exited replicas. Containers with missing or non-numeric * `com.docker.compose.container-number` labels are skipped with a warning — * defensive against manually-added containers. */ export declare function enumerateWorkers(client: DockerEngineClient, project: string): Promise; //# sourceMappingURL=worker-enumeration.d.ts.map