import type { GatewayServiceRuntime } from "./service-runtime.js"; export declare function resolveLaunchAgentPlistPath(env: Record): string; export declare function resolveGatewayLogPaths(env: Record): { logDir: string; stdoutPath: string; stderrPath: string; }; export declare function readLaunchAgentProgramArguments(env: Record): Promise<{ programArguments: string[]; workingDirectory?: string; environment?: Record; sourcePath?: string; } | null>; export declare function buildLaunchAgentPlist({ label, comment, programArguments, workingDirectory, stdoutPath, stderrPath, environment, }: { label?: string; comment?: string; programArguments: string[]; workingDirectory?: string; stdoutPath: string; stderrPath: string; environment?: Record; }): string; export type LaunchctlPrintInfo = { state?: string; pid?: number; lastExitStatus?: number; lastExitReason?: string; }; export declare function parseLaunchctlPrint(output: string): LaunchctlPrintInfo; export declare function isLaunchAgentLoaded(args: { env?: Record; }): Promise; export declare function isLaunchAgentListed(args: { env?: Record; }): Promise; export declare function launchAgentPlistExists(env: Record): Promise; export declare function readLaunchAgentRuntime(env: Record): Promise; export declare function repairLaunchAgentBootstrap(args: { env?: Record; }): Promise<{ ok: boolean; detail?: string; }>; export type LegacyLaunchAgent = { label: string; plistPath: string; loaded: boolean; exists: boolean; }; export declare function findLegacyLaunchAgents(env: Record): Promise; export declare function uninstallLegacyLaunchAgents({ env, stdout, }: { env: Record; stdout: NodeJS.WritableStream; }): Promise; export declare function uninstallLaunchAgent({ env, stdout, }: { env: Record; stdout: NodeJS.WritableStream; }): Promise; export declare function stopLaunchAgent({ stdout, env, }: { stdout: NodeJS.WritableStream; env?: Record; }): Promise; export declare function installLaunchAgent({ env, stdout, programArguments, workingDirectory, environment, description, }: { env: Record; stdout: NodeJS.WritableStream; programArguments: string[]; workingDirectory?: string; environment?: Record; description?: string; }): Promise<{ plistPath: string; }>; export declare function restartLaunchAgent({ stdout, env, }: { stdout: NodeJS.WritableStream; env?: Record; }): Promise;