import type { AgentConfig } from './config.js'; import { type LaunchHostType, type LaunchSpec } from './launch-spec.js'; export interface ServiceInstallOptions { platform?: NodeJS.Platform; startIfStopped?: boolean; persistPolicy?: boolean; launcherPath?: string | null; } export interface ServiceUninstallOptions { platform?: NodeJS.Platform; stopAgent?: boolean; persistPolicy?: boolean; } export interface ServiceInstallResult { artifactPath: string; specPath: string; changed: boolean; spec: LaunchSpec; pendingReload: boolean; } export interface ServiceInstallationSnapshot { platform: NodeJS.Platform; artifactPath: string; artifactContent: string | null; specPath: string; specContent: string | null; } export declare function getServiceArtifactPath(platform?: NodeJS.Platform): string; export declare function getServiceEnvironment(hostType?: LaunchHostType): Record; export declare function renderServiceArtifact(spec: LaunchSpec, specPath: string, platform?: NodeJS.Platform, launcherPath?: string | null): string; export declare function captureServiceInstallation(platform?: NodeJS.Platform): ServiceInstallationSnapshot; export declare function restoreServiceInstallation(snapshot: ServiceInstallationSnapshot): void; export declare function installServiceLaunchSpec(source: LaunchSpec, options?: ServiceInstallOptions): ServiceInstallResult; export declare function isServiceInstalled(platform?: NodeJS.Platform): boolean; export declare function serviceInstall(config: AgentConfig): void; export declare function serviceUninstall(options?: ServiceUninstallOptions): { pendingReload: boolean; }; export declare function stopServiceForUpgrade(spec: LaunchSpec): boolean; export declare function restartServiceAfterUpgrade(spec: LaunchSpec): boolean;