/** * Telemetry — Opt-in usage tracking with three privacy tiers. * * Storage: ~/.crowdlisten/telemetry.jsonl (append-only, one JSON line per event) * * Tiers: * - "off": no recording * - "anonymous": local-only, no installationId * - "community": includes installationId for aggregate insights */ import type { UserState, TelemetryLevel } from "./context/user-state.js"; export interface TelemetryEvent { ts: string; event: "tool_call"; tool: string; pack: string; duration_ms: number; success: boolean; installationId?: string; } /** * Record a telemetry event. Respects the user's telemetry level. */ export declare function recordEvent(event: Omit, level: TelemetryLevel, installationId?: string): void; /** * Check if there's a pending onboarding step. * Returns the step name or null if all complete. */ export declare function shouldOnboard(state: UserState): string | null; /** * Get onboarding prompt content for a step. */ export declare function getOnboardingPrompt(step: string): { title: string; message: string; } | null; /** * Build the tool-to-pack mapping from the registry at init time. * Used by both telemetry (to tag events) and suggestions. */ export declare function buildToolPackMap(packs: Array<{ id: string; toolNames: string[]; }>): Map;