/**
 * Daemon Manager for Onebox
 *
 * Handles background monitoring, metrics collection, and automatic tasks
 */
import type { Onebox } from './onebox.js';
export declare class OneboxDaemon {
    private oneboxRef;
    private running;
    private monitoringInterval;
    private statsInterval;
    private metricsInterval;
    private statsBroadcastInterval;
    private pidFilePath;
    private lastDomainSync;
    private domainSyncInterval;
    constructor(oneboxRef: Onebox);
    /**
     * Load settings from database (call after database init)
     */
    private loadSettings;
    /**
     * Start daemon mode (background monitoring)
     */
    start(): Promise<void>;
    /**
     * Stop daemon mode
     */
    stop(): Promise<void>;
    /**
     * Start monitoring loop
     */
    startMonitoring(): void;
    /**
     * Stop monitoring loop
     */
    stopMonitoring(): void;
    /**
     * Single monitoring tick
     */
    private monitoringTick;
    /**
     * Collect metrics for all services
     */
    private collectMetrics;
    /**
     * Keep the CoreTraffic runtime aligned with Onebox's desired in-memory config.
     */
    private reapplyReverseProxyRuntimeConfig;
    /**
     * Broadcast stats (placeholder for future WebSocket integration via OpsServer)
     */
    private broadcastStats;
    /**
     * Check SSL certificate expiration
     */
    private checkSSLExpiration;
    /**
     * Process pending certificate requirements
     */
    private processCertRequirements;
    /**
     * Check certificates for renewal (30-day threshold)
     */
    private checkCertificateRenewal;
    /**
     * Clean up old invalid certificates (90+ days old)
     */
    private cleanupOldCertificates;
    /**
     * Sync Cloudflare domains if needed (every 6 hours)
     */
    private syncCloudflareDomainsIfNeeded;
    /**
     * Keep process alive
     */
    private keepAlive;
    /**
     * Get daemon status
     */
    isRunning(): boolean;
    /**
     * Write PID file
     */
    private writePidFile;
    /**
     * Remove PID file
     */
    private removePidFile;
    /**
     * Check if daemon is running
     */
    static isDaemonRunning(): Promise<boolean>;
    /**
     * Get daemon PID
     */
    static getDaemonPid(): Promise<number | null>;
    /**
     * Ensure no daemon is running
     */
    static ensureNoDaemon(): Promise<void>;
}
