SIGN IN SIGN UP

feat(api): add default WebSocket User-Agent and audit log events (#2504)

## Summary

Backend Realtime and Responses WebSocket connections now identify the
SDK using `User-Agent: <ClientClass>/JS <SDK version>`. This covers the
stable and beta Node `ws` transports. Caller-provided headers retain
precedence, and browser-native WebSocket transports are unchanged.

The Admin Organization audit log request and response types also include
`tenant.trusted_access.business_verification.started` and
`tenant.trusted_access.application.submitted`.

## Validation

The Realtime regression failed for both stable and beta helpers before
the fix and passed afterward. A separate handwritten Responses test
mocks `ws` and uses fake timers to verify default User-Agent values and
caller overrides on initial connections and reconnects for both stable
and beta entrypoints; removing the header makes both default cases fail.
All 423 focused Realtime, Responses, provider, and redirect tests
passed, along with lint and TypeScript checking on Node 24.

Co-authored-by: apcha-oai <228803254+apcha-oai@users.noreply.github.com>
A
Alex Chang committed
9b2f0892c9fde399163bea59d4aa9bc4ba0ae03e
Parent: 84a5495
Committed by GitHub <noreply@github.com> on 8/27/2026, 3:06:25 PM