export interface TelemetryOptions { /** Print first-run notice to stderr. Set false for backend services. */ showFirstRunNotice?: boolean; /** Service name for backend services. */ serviceName?: string; /** * Buffer events and flush via a detached child process on shutdown. * Use for short-lived CLI processes so they can exit immediately without * waiting on the PostHog HTTP request. */ detachedFlush?: boolean; } /** * Initialize telemetry. Call once at process startup. * Reads/creates ~/.dokkimi/telemetry.json, optionally prints first-run notice, * and initializes the PostHog client if enabled. */ export declare function initTelemetry(options?: TelemetryOptions): void; /** * Track an event. Synchronous, fire-and-forget. * No-ops if telemetry is disabled or not initialized. */ export declare function trackEvent(event: string, properties?: Record): void; /** * Flush buffered events and shut down. * * In detached mode, spawns a short-lived unref'd child process that owns the * PostHog HTTP request and returns immediately so the caller can exit. * Otherwise awaits an inline flush capped at SHUTDOWN_TIMEOUT_MS. */ export declare function shutdownTelemetry(): Promise; /** * Enable or disable telemetry. Writes to ~/.dokkimi/telemetry.json. */ export declare function setTelemetryEnabled(value: boolean): void; /** * Check if telemetry is currently enabled. */ export declare function isTelemetryEnabled(): boolean;