import type { Nullable } from "../types/index.js"; export type Platform = "darwin" | "linux" | "windows"; export type ServiceManager = "launchd" | "systemd" | "windows-scheduler"; export declare const SERVICE_ID = "com.github.hjdhjd.prismcast"; export declare const SERVICE_NAME = "PrismCast"; /** * Returns the current platform as a normalized string. * @returns The platform: "darwin" for macOS, "linux" for Linux, "windows" for Windows. */ export declare function getPlatform(): Platform; /** * Returns the appropriate service manager for the current platform. * @returns The service manager type, or null if the platform is not supported for service installation. */ export declare function getServiceManager(): Nullable; /** * Checks whether PrismCast is running as a managed service. This is determined by the presence of the PRISMCAST_SERVICE environment variable, which is set in the * service definition file. This allows the application to adapt its restart behavior - when running as a service, exiting will trigger an automatic restart by the * service manager, but when running standalone, the user must restart manually. * @returns True if running as a managed service, false otherwise. */ export declare function isRunningAsService(): boolean; /** * Checks whether PrismCast is running inside a Docker container. Two-tier detection: the explicit PRISMCAST_CONTAINER environment variable set in our Dockerfile is * the primary signal; the /.dockerenv marker file (created by Docker in every container) is the backup for custom images that omit the environment variable. * @returns True if running inside a container, false otherwise. */ export declare function isRunningInContainer(): boolean; /** * Returns the path where the service file should be installed for the current platform. * @returns The absolute path to the service file location. */ export declare function getServiceFilePath(): string; /** * Returns the directory containing the service file for the current platform. This directory may need to be created before writing the service file. * @returns The absolute path to the service file directory. */ export declare function getServiceFileDirectory(): string; /** * Returns the full path to the Node.js executable. This is needed for service files which require absolute paths since the service environment may not have PATH set. * We prefer symlink paths (e.g., /opt/homebrew/bin/node) over resolved paths (e.g., /opt/homebrew/Cellar/node/25.4.0/bin/node) so that Homebrew and similar package * managers can upgrade Node without breaking the service. * @returns The absolute path to the node binary, preferring symlinks when available. */ export declare function getNodeExecutablePath(): string; /** * Returns the full path to PrismCast's entry point (dist/index.js). This is needed for service files which require absolute paths. * @returns The absolute path to the PrismCast entry point. */ export declare function getPrismCastEntryPoint(): string; /** * Returns the working directory for PrismCast. This is the parent of the dist directory. * @returns The absolute path to the PrismCast working directory. */ export declare function getPrismCastWorkingDirectory(): string; /** * Returns the data directory path for PrismCast. Delegates to the centralized paths module. * @returns The absolute path to the data directory. */ export declare function getDataDirectory(): string; /** * Returns the directory path for service stdout/stderr output. This is the same as the data directory to keep all PrismCast files in one place. * @returns The absolute path to the service logs directory. */ export declare function getLogsDirectory(): string; /** * Checks if a service file exists at the expected location. * @returns True if the service file exists. */ export declare function serviceFileExists(): boolean;