/**
 * systemd service manager implementation.
 *
 * Generates unit files and manages service lifecycle via systemctl,
 * journalctl, and loginctl commands. Supports both system-level
 * (/etc/systemd/system/) and user-level (~/.config/systemd/user/) services.
 */
import type { DiscoveredInstance, ServiceConfig, ServiceManager, ServiceStatus, LogOptions } from './types.js';
/**
 * Check whether linger is already enabled for a user.
 *
 * Uses `loginctl show-user <user>` which is readable by any user. Returns
 * true if the user's `Linger` property reads `yes`. Returns false on any
 * parse failure, missing binary, or unknown user — the caller is expected
 * to attempt `enable-linger` in that case.
 *
 * Exported (package-private) for testing.
 */
export declare function isLingerEnabled(user: string): boolean;
export declare class SystemdServiceManager implements ServiceManager {
    /**
     * Generate a systemd unit file from a service config.
     * Visible for testing.
     */
    generateUnitFile(config: ServiceConfig): string;
    /** Resolve the unit file path based on service level. */
    private unitFilePath;
    /** Build systemctl command args, inserting --user for user-level services. */
    private systemctlArgs;
    /** Run a systemctl command. */
    private systemctl;
    install(config: ServiceConfig): Promise<void>;
    uninstall(config: ServiceConfig): Promise<void>;
    start(config: ServiceConfig): Promise<void>;
    stop(config: ServiceConfig): Promise<void>;
    restart(config: ServiceConfig): Promise<void>;
    status(config: ServiceConfig): Promise<ServiceStatus>;
    logs(config: ServiceConfig, options: LogOptions): Promise<void>;
    isInstalled(config: ServiceConfig): Promise<boolean>;
    list(isUserLevel: boolean): Promise<DiscoveredInstance[]>;
}
//# sourceMappingURL=systemd.d.ts.map