Injects the real widget bundle (<api>/widget/v1/widget.js) against any tenant/Site. Drive user
context on the fly — client (SDK) and server (the auth-context broker) — watch what the platform resolved,
and log/simulate chat-triggered drive_ui commands. This page's origin ()
must be in the Site's Allowed origins or /init returns 403.
Perfox('identify' | 'update')user_context.attributes — the tenant's opaque string→string bag. Doubles as
perfox_resolve resolver fields (e.g. membership_id) + forwarded to MCP tools.
Identify replaces identity; Update shallow-merges (missing keys preserved) — the "one field at a time" client path. Both attach to the next turn.
sk_ key signs here in-browser. A real integrator keeps
the key server-side and calls POST /conversations/:id/auth-context from its own backend.POSTs to <api>/conversations/<conv>/auth-context. On a web login transition the platform fires a hidden login turn — watch it arrive over the reply WS below.
Requires the Site's Web-Chat trigger to have UI commands enabled + an allowed events list.
Frames are logged straight off the reply WebSocket (wire tap); each built-in also gets a real
Perfox('on:ui', …, {same_origin_only:false}) handler that drives the sandbox.
open_modal commandLegend: navigate shows the target (open it manually); highlight flashes a matched element; prefill_form fills the mock inputs; open/close_modal toggles the modal; scroll_to/trigger_login/refresh_data annotate the log.