import type { DefencePipelineResult, DefenceSource } from '../defence/types.js';
/**
 * Drain any pending cloud sync requests (audit-ingest, heartbeat, kill-switch
 * alerts) before the calling process exits. Returns when all in-flight POSTs
 * have settled (resolved or rejected) OR `maxWaitMs` elapses, whichever first.
 *
 * Intended use: at the tail of short-lived CLI subcommands, immediately
 * before `process.exit()`. Long-lived processes (MCP server, brain worker,
 * dashboard daemon) don't need this — their event loop keeps the process
 * alive until the fetch resolves naturally.
 *
 * The timeout is a safety belt for slow / unreachable cloud endpoints; the
 * underlying fetches already abort at 10s.
 */
export declare function flushPendingCloudSync(maxWaitMs?: number): Promise<void>;
/** Count of in-flight cloud sync requests. Useful for tests + diagnostics. */
export declare function pendingCloudSyncCount(): number;
/**
 * Fire-and-forget: sends a heartbeat to ShieldCortex cloud so the
 * device shows as "Online" even when idle (no scans triggering syncToCloud).
 * Called by BrainWorker every 5 minutes.
 */
export declare function sendHeartbeat(): void;
/**
 * Fire-and-forget: sends audit data to ShieldCortex cloud.
 * Never blocks, never throws. Failed requests are logged and queued for retry.
 * Sends audit metadata ONLY — no content or titles.
 */
export declare function syncToCloud(result: DefencePipelineResult, source: DefenceSource, durationMs: number): void;
/**
 * Fire-and-forget: sends a kill switch alert to ShieldCortex cloud.
 * Shaped as a normal audit ingest entry so the SaaS API accepts it.
 */
export declare function sendKillSwitchAlert(meta: {
    source: string;
    phrase?: string;
    reason?: string;
    memoryCountAtTrigger?: number;
    triggeredAt: string;
}): void;
