mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
## Why The analytics client sends eligible events through HTTP. Hosts that embed Codex need a way to deliver specific event types themselves while keeping HTTP delivery for the rest of the batch. ## What changed Add `AnalyticsEventsClient::new_with_event_transport` so hosts can opt in and select eligible events by wire type. The transport receives the complete wire payload and the event's product SKU, when available. Events stay on the HTTP path unless the transport returns `Handled`, which suppresses a duplicate HTTP send. Disabled analytics and local file capture bypass the transport. Rebinding the client to a new auth context restores HTTP delivery. ## Testing Add tests for mixed batches that verify HTTP payloads and product attribution, plus coverage for auth eligibility, local capture, analytics opt-out, and auth rebinding. GitOrigin-RevId: 27ba3fe54050754b5f844f00e7e761a4d7bcb8c0