import {RivendellApi} from './RivendellApi'; export namespace Tracking { interface TrackingEvent { action: string; appId: string; command: string; version?: string; properties?: Record; } /** * Send a tracking event to Segment via Rivendell. * Fire-and-forget: does not await, never throws. */ export function track(event: TrackingEvent): void { // Fire and forget - don't await RivendellApi.post('tracking/events', event).catch(() => { // Silently ignore tracking failures }); } }