actions/register_ws_endpoint.ts view source
(options: RegisterWsEndpointOptions): RegisterActionWsResult import {register_ws_endpoint} from '@fuzdev/fuz_app/actions/register_ws_endpoint.js'; Mount a WebSocket endpoint with the standard upgrade stack (origin check + auth + token scope + actor resolution + optional role) and JSON-RPC dispatch.
Returns the BackendWebsocketTransport (supplied or freshly
created), same as register_action_ws — retain it to wire
create_ws_auth_guard on on_audit_event or to broadcast.
options
returns
RegisterActionWsResult mutates
options.app— applies origin/auth/scope/authorization/role middleware via `app.use`, then registers the `GET path` route via the inner `register_action_ws`options.connection_closer— adds the endpoint's transport, once the mount has succeeded, for good — pass `null` and add it yourself to hold the remover