helpers/ws.py.dox.md
ws.py helper module.ws.py because this directory is intentionally flat.ws.py owns the runtime implementation.ws.py.dox.md owns durable notes about responsibilities, contracts, side effects, and verification for that implementation.ConnectionNotFoundError (RuntimeError)_SecurityContext (no explicit base class)WsHandler (no explicit base class)
namespace(self) -> strmanager(self) -> 'WsManager'identifier(self) -> strbind_manager(self, manager: 'WsManager', namespace: str | None=...) -> Nonerequires_loopback(cls) -> boolrequires_api_key(cls) -> boolrequires_auth(cls) -> boolrequires_csrf(cls) -> bool_ws_debug_enabled() -> bool: Check A0_WS_DEBUG env var - lightweight, no heavy imports.ws_debug(message: str) -> None: Log message via :class:PrintStyle when A0_WS_DEBUG is active._default_port_for_scheme(scheme: str) -> int | Nonenormalize_origin(value: Any) -> str | None: Normalize an Origin/Referer header value to scheme://host[:port]._parse_host_header(value: Any) -> tuple[str | None, int | None]validate_ws_origin(environ: dict[str, Any]) -> tuple[bool, str | None]: Validate the browser Origin during the Socket.IO handshake._check_security(handler_cls: type[WsHandler], ctx: _SecurityContext) -> dict[str, Any] | None: Return an error payload dict if the check fails, or None on success.register_ws_namespace(socketio_server: socketio.AsyncServer, webapp: Flask, lock: ThreadLockType, manager: 'WsManager | None'=...) -> None_error_response(code: str, message: str, correlation_id: str) -> dict[str, Any]NAMESPACE, CACHE_AREA.WsHandler defines process(...).WsHandler defines requires_auth(...).WsHandler defines requires_csrf(...).WsHandler defines requires_api_key(...).WsHandler defines requires_loopback(...).abc, dataclasses, flask, helpers, helpers.errors, helpers.network, helpers.print_style, os, pathlib, socketio, threading, typing, urllib.parse, uuid.threading.Lock, os.getenv.strip.lower, _ws_debug_enabled, urlparse, normalize_origin, _parse_host_header, handler_cls.requires_loopback, handler_cls.requires_auth, handler_cls.requires_csrf, handler_cls.requires_api_key, socketio_server.on, PrintStyle.debug, value.strip, origin_parsed.hostname.lower, _default_port_for_scheme, req_host.lower, forwarded_host_raw.strip, forwarded_host_raw.split.strip, forwarded_proto_raw.strip, forwarded_proto_raw.split.strip.lower.tests/test_a0_connector_computer_use_metadata.pytests/test_a0_connector_prompt_gating.pytests/test_browser_agent_regressions.pytests/test_docker_release_plan.pytests/test_download_toast_regressions.pytests/test_git_version_label.pytests/test_host_browser_connector.pytests/test_multi_tab_isolation.pyNo child DOX files.