/**
 * Cross-platform service installer for persistent ShieldCortex background service.
 *
 * Supports:
 *  - macOS: LaunchAgent plist
 *  - Linux: systemd user service
 *  - Windows: VBS script in Startup folder
 */
import { execSync } from 'child_process';
import { type ServiceMode } from './templates.js';
interface ServiceOptions {
    mode?: ServiceMode;
}
export declare function detectStaleAppendLogs(content: string): {
    stale: boolean;
    missingPath: string | null;
};
type ExecFn = (command: string, options?: Parameters<typeof execSync>[1]) => unknown;
/**
 * Load (or reload) the LaunchAgent via the modern bootstrap API.
 *
 * The legacy `launchctl load -w` lies on an already-loaded service: it prints
 * "Load failed: 5: Input/output error" to stderr yet exits 0, so install
 * claimed success while the old process kept running with the old service
 * definition (launchd caches the plist at load time). bootout + bootstrap
 * returns real exit codes and applies the plist that was just written.
 */
export declare function activateMacosService(servicePath: string, opts?: {
    exec?: ExecFn;
    retryDelayMs?: number;
    drainTimeoutMs?: number;
}): Promise<{
    reloaded: boolean;
}>;
/**
 * `enable --now` is a no-op start on an already-running unit, so reinstalls
 * kept the old process (and old code) running. enable + restart covers both
 * fresh installs and reinstalls.
 */
export declare function activateLinuxService(exec?: ExecFn): void;
export declare function installService(options?: ServiceOptions): Promise<void>;
export declare function repairService(options?: ServiceOptions): Promise<void>;
export declare function uninstallService(options?: {
    cleanLogs?: boolean;
}): Promise<void>;
export declare function serviceStatus(): Promise<void>;
export declare function handleServiceCommand(subcommand: string, args?: string[]): Promise<void>;
export {};
