/**
 * Platform detection and directory resolution for KiCI service management.
 *
 * Detects the init system (systemd, launchd, Windows Services, or Compose fallback)
 * and resolves platform-appropriate directories for config, logs, and cache.
 */
import type { ServicePlatform } from './types.js';
/**
 * Detect the service management platform.
 *
 * Auto-detection order:
 * - win32 -> 'windows'
 * - darwin -> 'launchd'
 * - linux with /run/systemd/system or /sys/fs/cgroup/systemd -> 'systemd'
 * - linux without systemd -> 'compose' (Docker/Podman Compose fallback)
 *
 * @param override - Force a specific platform (e.g., from --platform flag)
 */
export declare function detectPlatform(override?: ServicePlatform): ServicePlatform;
/**
 * Check if the current process has root/admin privileges.
 *
 * - Unix: UID === 0
 * - Windows: attempts `net session` (succeeds only as admin)
 */
export declare function isRoot(): boolean;
/**
 * Name-agnostic KiCI config root — the directory that contains every
 * per-instance config subdir for this privilege level.
 *
 * Paths follow platform conventions:
 * - System Linux/macOS: /etc/kici/
 * - User Linux: ~/.config/kici/
 * - User macOS: ~/Library/Application Support/kici/
 * - System Windows: C:\ProgramData\kici\
 * - User Windows: %LOCALAPPDATA%\kici\
 *
 * Used by the instance index (`<kiciRoot>/instances.json`) which lives
 * outside any per-instance subdir, and as the base for {@link getConfigDir}.
 */
export declare function kiciConfigRoot(isUserLevel: boolean): string;
/**
 * Get the configuration directory for a specific KiCI service instance.
 *
 * Returns `<kiciConfigRoot>/<serviceName>/`. The name-scoped subdir is the
 * folder-anchored home for everything belonging to one installed instance
 * (env file, generated unit references, future per-instance state).
 *
 * Examples:
 * - System Linux: /etc/kici/<name>/
 * - User Linux: ~/.config/kici/<name>/
 * - User macOS: ~/Library/Application Support/kici/<name>/
 * - System Windows: C:\ProgramData\kici\<name>\
 * - User Windows: %LOCALAPPDATA%\kici\<name>\
 */
export declare function getConfigDir(serviceName: string, isUserLevel: boolean): string;
/**
 * Get the log directory for a specific KiCI service instance.
 *
 * The per-platform layout matches the existing matrix; the service name is
 * injected as the per-instance segment so each instance has its own log dir:
 * - System Linux/macOS: /var/log/kici/<name>/
 * - User Linux: ~/.local/share/kici/<name>/logs/
 * - User macOS: ~/Library/Logs/kici/<name>/
 * - Windows: C:\ProgramData\kici\<name>\logs\
 */
export declare function getLogDir(serviceName: string, isUserLevel: boolean): string;
/**
 * Get the cache directory for lazy dependency downloads.
 *
 * Resolution order:
 * 1. $XDG_CACHE_HOME/kici/deps/ (if set)
 * 2. Platform default:
 *    - Linux: ~/.cache/kici/deps/
 *    - macOS: ~/Library/Caches/kici/deps/
 *    - Windows: %LOCALAPPDATA%\kici\deps\
 */
export declare function getCacheDir(): string;
//# sourceMappingURL=platform-detect.d.ts.map