/**
 * Product Analytics (Statsig) & Event Tracking
 *
 * Provides anonymous usage analytics for the CLI using Statsig client SDK.
 * All data is anonymous — identified by a machine UUID only, no PII is ever sent.
 *
 * Telemetry can be disabled via:
 * - `prlt telemetry disable`
 * - `DO_NOT_TRACK=1` environment variable
 * - `PRLT_TELEMETRY_DISABLED=1` environment variable
 *
 * Privacy:
 * - Anonymous machine ID (UUID) stored in ~/.proletariat/telemetry.json
 * - No file paths, usernames, or ticket content ever sent
 * - Events are written to a local queue file and flushed on the next run
 *
 * Write-ahead log:
 * - trackEvent() writes events to ~/.proletariat/telemetry-queue.json synchronously
 * - On the next command run, queued events are flushed to Statsig and the queue is cleared
 * - Events are delayed by at most one command invocation — acceptable for analytics
 * - This adds zero latency and ensures no events are lost regardless of Statsig init timing
 * - Shutdown never flushes the queue — events persist until the next run confirms delivery
 */
/**
 * Check if telemetry is disabled by environment variables or config.
 */
export declare function isTelemetryEnabled(): boolean;
/**
 * Enable telemetry.
 */
export declare function enableTelemetry(): void;
/**
 * Disable telemetry.
 */
export declare function disableTelemetry(): void;
/**
 * Get current telemetry status for display.
 */
export declare function getTelemetryStatus(): {
    enabled: boolean;
    machineId: string;
    envOverride: boolean;
    envVar?: string;
};
/**
 * Get the anonymous machine ID for this installation.
 */
export declare function getMachineId(): string;
/**
 * Flush queued events to Statsig. Requires an initialized Statsig client.
 * Called during shutdown or at the start of the next command run.
 */
export declare function flushQueuedEvents(): void;
/**
 * Initialize the Statsig SDK and flush any queued events from previous runs.
 * Called from the init hook. The Statsig init is fire-and-forget — event
 * tracking does not depend on it (events go to the disk queue instead).
 * Statsig is still needed for feature flags.
 *
 * No-op if telemetry is disabled.
 */
export declare function initAnalytics(version: string): void;
/**
 * Track an analytics event. Writes to a local disk queue synchronously —
 * never blocks on network I/O. Events are flushed to Statsig on the next
 * command run (or during this run's shutdown if Statsig initialized in time).
 *
 * @param eventName - Event name (e.g., 'command_run')
 * @param value - Optional numeric or string value
 * @param metadata - Event-specific metadata
 */
export declare function trackEvent(eventName: string, value?: string | number | null, metadata?: Record<string, unknown> | null): void;
/**
 * Track a command execution.
 */
export declare function trackCommandRun(options: {
    command: string;
    durationMs: number;
    success: boolean;
    flags?: string[];
}): void;
/**
 * Track an agent being spawned.
 */
export declare function trackAgentSpawned(options: {
    executor: string;
    environment: string;
    action: string;
    ephemeral: boolean;
}): void;
/**
 * Track an orchestrator being started.
 */
export declare function trackOrchestratorStarted(options: {
    executor: string;
    name: string;
    displayMode: string;
}): void;
/**
 * Track work being completed.
 */
export declare function trackWorkCompleted(options: {
    durationMs: number;
    prCreated: boolean;
}): void;
/**
 * Track a PR being created.
 */
export declare function trackPRCreated(options: {
    source: 'prlt' | 'manual';
}): void;
/**
 * Track an MCP tool call.
 */
export declare function trackMCPToolCalled(options: {
    toolName: string;
    success: boolean;
}): void;
/**
 * Flush queued events (if Statsig is ready) and shut down the Statsig client.
 * No timeout, no waiting for init — events are safely on disk if Statsig
 * didn't initialize in time, and will be flushed on the next command run.
 */
export declare function shutdownAnalytics(): Promise<void>;
