/** * A single telemetry event recording one CLI command invocation. * No PII is stored: no slugs, entry IDs, field values, query text, or replacement strings. */ export interface TelemetryEvent { /** Stable id for deduplication in downstream analytics. */ event_id: string; /** ISO 8601 timestamp of when the command completed. */ timestamp: string; /** Top-level command name (e.g. "rtf", "open", "save", "oauth"). */ command: string; /** Subcommand name when applicable (e.g. "replace", "embed", "link-contentful"). */ subcommand?: string; /** Whether the command succeeded, errored, or exited (process.exit called). */ outcome: 'success' | 'error' | 'exit'; /** Process exit code (populated for 'exit' outcome). */ exit_code?: number; /** Error constructor name or stable reason code — NOT the message, to avoid logging PII. */ error_name?: string; /** Wall-clock duration from command start to completion in milliseconds. */ duration_ms: number; /** cms-edit package version. */ cms_edit_version: string; /** Invocation context. */ mode: 'cli' | 'hosted-mcp'; /** Deployment aggregate key (CMS_EDIT_PROJECT_KEY); never user id or email. */ project_key?: string; /** Node.js runtime version. */ node_version: string; /** process.platform value. */ platform: string; } /** * Abstraction for telemetry sinks. Swap out LocalFileTelemetryWriter for a remote * implementation in the future without changing call sites. */ export interface TelemetryWriter { record(event: TelemetryEvent): void; flush?(): Promise; } //# sourceMappingURL=types.d.ts.map