import type { ContainerStatus, HealthStatus, ServerInfo, RouterInfo, PlatformStatus, ContainerStats, PlayerListResult, DetailedServerInfo, RouterDetailInfo } from '../types/index.js'; import type { IMcRouterApiPort } from '../application/ports/outbound/IMcRouterApiPort.js'; export { execCommand, execCommandAsync } from '../infrastructure/process.js'; export { parseRconPlayerList } from '../infrastructure/adapters/DockerComposeRuntimeAdapter.js'; /** * Check if Docker is available */ export declare function checkDocker(): boolean; /** * Check if Docker Compose is available */ export declare function checkDockerCompose(): boolean; /** * Get Docker version */ export declare function getDockerVersion(): { installed: boolean; version?: string; }; /** * Get Docker Compose version */ export declare function getDockerComposeVersion(): { installed: boolean; version?: string; }; /** * Get container status */ export declare function getContainerStatus(container: string): ContainerStatus; /** * Get container health status */ export declare function getContainerHealth(container: string): HealthStatus; /** * Check mc-router health via management API * mc-router uses distroless image, so Docker healthcheck doesn't work * Instead, we check the management API on localhost:25580 */ export declare function getRouterHealthViaApi(): HealthStatus; /** * Check if container exists */ export declare function containerExists(container: string): boolean; /** * Get container's hostname label (mc-router.host) */ export declare function getContainerHostname(container: string): string; /** * Get all minecraft server containers (mc-* except mc-router) */ export declare function getMcContainers(): string[]; /** * Get running minecraft server containers */ export declare function getRunningMcContainers(): string[]; /** * Get server info for a container */ export declare function getServerInfo(container: string): ServerInfo; /** * Get router info */ export declare function getRouterInfo(): RouterInfo; /** * Get avahi-daemon status */ export declare function getAvahiStatus(): string; /** * Get full platform status * Includes both running containers and configured-but-not-running servers */ export declare function getPlatformStatus(serversDir?: string): PlatformStatus; /** * Start a container */ export declare function startContainer(container: string): boolean; /** * Stop a container */ export declare function stopContainer(container: string): boolean; /** * Get container logs */ export declare function getContainerLogs(container: string, lines?: number): string; /** * Get container resource stats (memory, CPU) */ export declare function getContainerStats(container: string): ContainerStats | null; /** * Get container uptime (time since start) */ export declare function getContainerUptime(container: string): { uptime: string; seconds: number; } | null; /** * Get online players via RCON */ export declare function getOnlinePlayers(container: string): Promise; /** * Get detailed server info */ export declare function getDetailedServerInfo(container: string, configEnv?: Record): DetailedServerInfo; /** * Get detailed server info with players (async) */ export declare function getDetailedServerInfoWithPlayers(container: string, configEnv?: Record, worldsDir?: string): Promise; /** * Get router detailed info */ export declare function getRouterDetailInfo(): RouterDetailInfo; /** * getRouterDetailInfo plus `discoveredByRouter` per route from the mc-router * management API (#768). The field stays absent when the router is not * running or the API cannot be read. */ export declare function getRouterDetailInfoAsync(options?: { routerApi?: IMcRouterApiPort; }): Promise; /** * Format bytes to human readable string */ export declare function formatBytes(bytes: number): string; /** * Get the worlds directory path */ export declare function getWorldsDir(): string; /** * Calculate the total size of a world directory recursively * @param worldName The name of the world * @param worldsDir Optional custom worlds directory path * @returns Total size in bytes */ export declare function getWorldDirectorySize(worldName: string, worldsDir?: string): Promise; /** * Get configured servers from filesystem (servers/ directory) * Returns server names (not container names) */ export declare function getConfiguredServers(serversDir?: string): string[]; /** * Get server info for a configured server (may or may not have a container) */ export declare function getServerInfoFromConfig(serverName: string): ServerInfo; /** * Get all servers (both configured and running containers) * Merges filesystem-configured servers with Docker container status */ export declare function getAllServers(serversDir?: string): string[]; /** * Get the servers directory path */ export declare function getServersDir(): string; /** * Read config.env file for a server * Returns key-value pairs of environment variables */ export declare function readServerConfigEnv(serverName: string, serversDir?: string): Record; /** * Check if a server exists (either as container or as configuration) */ export declare function serverExists(serverName: string, serversDir?: string): boolean; /** * Get detailed server info from config.env (for servers without containers) */ export declare function getDetailedServerInfoFromConfig(serverName: string, serversDir?: string, worldsDir?: string): Promise; /** * Get detailed server info (works for both running containers and config-only servers) */ export declare function getServerDetailedInfo(serverName: string, serversDir?: string, worldsDir?: string): Promise; /** * Get playit-agent container status * Returns status information about the playit.gg agent container */ export declare function getPlayitAgentStatus(): Promise; /** * Start playit-agent container * Uses docker compose with playit profile */ export declare function startPlayitAgent(): Promise<{ success: boolean; error?: string; }>; /** * Stop playit-agent container * Uses docker compose with playit profile */ export declare function stopPlayitAgent(): Promise; /** * Get server's playit.gg domain from config.env * Returns the PLAYIT_DOMAIN value if set, otherwise null */ export declare function getServerPlayitDomain(serverName: string, serversDir?: string): string | null; /** * Parse the mc-router.host label of a docker-compose.yml into a host list ([] if absent) */ export declare function parseRouterHosts(composeContent: string): string[]; /** * Decide the PLAYIT_DOMAIN after the custom hostname list was edited (pure, no I/O). * Current domain still listed → unchanged; otherwise exactly one newly added host * becomes the domain; zero or 2+ added → null (remove). No current domain → null. * Current domain absent from the previous list (set before label sync) → unchanged, * since the edit could not have removed it. */ export declare function resolvePlayitDomain(currentDomain: string | null, previousCustom: string[], nextCustom: string[]): string | null; //# sourceMappingURL=index.d.ts.map