export type ServiceMode = 'user' | 'system';
export type ServiceBackend = 'systemd-user' | 'systemd-system' | 'launchd-user' | 'launchd-system' | 'schtasks-user' | 'schtasks-system';
export type ServiceSpec = Readonly<{
    label: string;
    description?: string;
    programArgs: readonly string[];
    workingDirectory?: string;
    env?: Record<string, string>;
    runAsUser?: string;
    stdoutPath?: string;
    stderrPath?: string;
}>;
export type ServiceDefinition = Readonly<{
    kind: 'systemd-service' | 'launchd-plist' | 'windows-wrapper-ps1';
    path: string;
    contents: string;
    mode: number;
}>;
export type PlannedWrite = Readonly<{
    path: string;
    contents: string;
    mode?: number;
}>;
export type PlannedCommand = Readonly<{
    cmd: string;
    args: readonly string[];
    allowFail?: boolean;
}>;
export type ServicePlan = Readonly<{
    writes: PlannedWrite[];
    commands: PlannedCommand[];
}>;
export declare function resolveServiceBackend(params?: Readonly<{
    platform?: NodeJS.Platform;
    mode?: ServiceMode;
}>): ServiceBackend;
export declare function buildServiceDefinition(params: Readonly<{
    backend: ServiceBackend;
    homeDir: string;
    spec: ServiceSpec;
}>): ServiceDefinition;
export declare function planServiceAction(params: Readonly<{
    backend: ServiceBackend;
    action: 'install' | 'uninstall' | 'start' | 'stop' | 'restart';
    label: string;
    definitionPath?: string;
    definitionContents?: string;
    taskName?: string;
    persistent?: boolean;
    uid?: number | null;
}>): ServicePlan;
export declare function applyServicePlan(plan: ServicePlan, options?: Readonly<{
    runCommands?: boolean;
}>): Promise<void>;
//# sourceMappingURL=manager.d.ts.map