/** * Docker engine control plane — DTOs shared by core, API, CLI, and web. * Mutations never imply success when blocked / dry-run. */ export declare const YSK_DOCKER_MANAGED_LABEL = "com.ysk-server.managed"; export declare const YSK_DOCKER_FEATURE_LABEL = "com.ysk-server.feature"; export declare const YSK_DOCKER_INSTANCE_LABEL = "com.ysk-server.instance"; export declare const DOCKER_PRUNE_SCOPES: readonly ["containers", "images", "volumes", "builder", "system"]; export type DockerPruneScope = (typeof DOCKER_PRUNE_SCOPES)[number]; export declare const DOCKER_RESTART_POLICIES: readonly ["no", "unless-stopped", "always", "on-failure"]; export type DockerRestartPolicy = (typeof DOCKER_RESTART_POLICIES)[number]; export declare const DOCKER_ENGINE_ACTIONS: readonly ["start", "stop", "restart"]; export type DockerEngineAction = (typeof DOCKER_ENGINE_ACTIONS)[number]; export declare const DOCKER_CONTAINER_ACTIONS: readonly ["start", "stop", "restart", "remove"]; export type DockerContainerAction = (typeof DOCKER_CONTAINER_ACTIONS)[number]; export declare const DOCKER_COMPOSE_ACTIONS: readonly ["up", "down", "restart", "rm"]; export type DockerComposeAction = (typeof DOCKER_COMPOSE_ACTIONS)[number]; export type DockerEngineStatus = { installed: boolean; daemonActive: boolean; composeAvailable: boolean; version: string | null; composeVersion: string | null; dataRoot: string | null; rootless: boolean; cgroupDriver: string | null; notes: string[]; counts: { containers: number; running: number; images: number; volumes: number; networks: number; }; disk: { dataRoot: string | null; usedBytes: number | null; availBytes: number | null; usePct: number | null; }; validatorProjects: number; }; export type DockerContainerRow = { id: string; name: string; image: string; status: string; state: string; ports: string; created: string; labels: Record; composeProject: string | null; yskManaged: boolean; yskFeature: string | null; yskInstance: string | null; }; export type DockerImageRow = { id: string; repository: string; tag: string; size: string; created: string; }; export type DockerVolumeRow = { name: string; driver: string; mountpoint: string; labels: Record; }; export type DockerNetworkRow = { id: string; name: string; driver: string; scope: string; internal: boolean; protected: boolean; }; export type DockerComposeProject = { name: string; status: string; configFiles: string; yskManaged: boolean; validatorId: string | null; }; export type DockerDfRow = { type: string; total: string; active: string; size: string; reclaimable: string; }; export type DockerDaemonSettings = { path: string; exists: boolean; logDriver: string; logMaxSize: string; logMaxFile: string; liveRestore: boolean; registryMirrors: string[]; insecureRegistries: string[]; raw: Record; }; export type DockerRunPort = { host: number; container: number; proto?: 'tcp' | 'udp'; bind?: string; }; export type DockerRunRequest = { image: string; name?: string; ports?: DockerRunPort[]; env?: Record; restart?: DockerRestartPolicy; network?: string; volumes?: Array<{ name: string; dest: string; }>; /** Optional argv after the image (image CMD when omitted). */ command?: string[]; /** Optional --entrypoint token (image ENTRYPOINT when omitted). */ entrypoint?: string; }; export declare const DOCKER_IMAGE_RE: RegExp; export declare const DOCKER_NAME_RE: RegExp; export declare function isDockerPruneScope(value: string): value is DockerPruneScope; export declare function isDockerRestartPolicy(value: string): value is DockerRestartPolicy; export declare function isDockerEngineAction(value: string): value is DockerEngineAction; export declare function isDockerContainerAction(value: string): value is DockerContainerAction; export declare function isDockerComposeAction(value: string): value is DockerComposeAction; export declare function isSafeDockerImageRef(value: string): boolean; export declare function isSafeDockerName(value: string): boolean; export declare function isSafeVolumeDest(dest: string): boolean; export declare function parseLabelMap(raw: string | undefined | null): Record; export declare function composeProjectFromLabels(labels: Record): string | null; export declare function validatorIdFromComposeProject(name: string): string | null; /** Docker stats sizes: NetIO is SI (kB/MB), MemUsage is binary (MiB/GiB). */ export declare function parseDockerStatsSize(raw: string): number | null; /** Docker stats NetIO field: `"rx / tx"`. */ export declare function parseDockerNetIo(raw: string): { rxBytes: number; txBytes: number; } | null; export declare function dockerNetIoRate(input: { prevRx: number; prevTx: number; prevAt: number; rx: number; tx: number; at: number; }): { rxRateBps: number; txRateBps: number; } | null; //# sourceMappingURL=docker.d.ts.map