@fuzdev/fuz_app 0.149.0 → 0.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/actions/CLAUDE.md +327 -300
- package/dist/actions/action_bridge.d.ts +5 -79
- package/dist/actions/action_bridge.d.ts.map +1 -1
- package/dist/actions/action_bridge.js +4 -74
- package/dist/actions/action_codegen.d.ts +8 -166
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +19 -95
- package/dist/actions/action_dispatcher.d.ts +10 -0
- package/dist/actions/action_dispatcher.d.ts.map +1 -1
- package/dist/actions/action_dispatcher.js +9 -6
- package/dist/actions/action_event.d.ts +1 -2
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +7 -13
- package/dist/actions/action_event_helpers.d.ts +1 -40
- package/dist/actions/action_event_helpers.d.ts.map +1 -1
- package/dist/actions/action_event_helpers.js +1 -25
- package/dist/actions/action_event_types.d.ts +1 -1
- package/dist/actions/action_event_types.d.ts.map +1 -1
- package/dist/actions/action_rpc.d.ts +10 -215
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +56 -111
- package/dist/actions/action_spec.d.ts +2 -2
- package/dist/actions/action_spec.js +2 -2
- package/dist/actions/action_types.d.ts +229 -8
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/action_types.js +56 -5
- package/dist/actions/broadcast_api.d.ts +22 -17
- package/dist/actions/broadcast_api.d.ts.map +1 -1
- package/dist/actions/broadcast_api.js +16 -27
- package/dist/actions/cancel.d.ts +4 -13
- package/dist/actions/cancel.d.ts.map +1 -1
- package/dist/actions/cancel.js +5 -17
- package/dist/actions/compile_action_registry.d.ts +1 -2
- package/dist/actions/compile_action_registry.d.ts.map +1 -1
- package/dist/actions/connection_closer.d.ts +120 -50
- package/dist/actions/connection_closer.d.ts.map +1 -1
- package/dist/actions/connection_closer.js +139 -31
- package/dist/actions/{transports_ws_backend.d.ts → connection_registry.d.ts} +120 -132
- package/dist/actions/connection_registry.d.ts.map +1 -0
- package/dist/actions/{transports_ws_backend.js → connection_registry.js} +149 -152
- package/dist/actions/frontend_rpc_client.d.ts +52 -2
- package/dist/actions/frontend_rpc_client.d.ts.map +1 -1
- package/dist/actions/frontend_rpc_client.js +42 -4
- package/dist/actions/peer_ping.d.ts +7 -9
- package/dist/actions/peer_ping.d.ts.map +1 -1
- package/dist/actions/peer_ping.js +6 -8
- package/dist/actions/peer_request.d.ts +6 -5
- package/dist/actions/peer_request.d.ts.map +1 -1
- package/dist/actions/peer_request.js +6 -5
- package/dist/actions/perform_action.d.ts +36 -28
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +60 -31
- package/dist/actions/protocol.d.ts +14 -0
- package/dist/actions/protocol.d.ts.map +1 -1
- package/dist/actions/protocol.js +18 -0
- package/dist/actions/register_action_ws.d.ts +137 -292
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +155 -903
- package/dist/actions/socket.svelte.d.ts +9 -0
- package/dist/actions/socket.svelte.d.ts.map +1 -1
- package/dist/actions/socket.svelte.js +16 -5
- package/dist/actions/transports.d.ts +88 -34
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports.js +76 -76
- package/dist/actions/transports_http.d.ts +48 -12
- package/dist/actions/transports_http.d.ts.map +1 -1
- package/dist/actions/transports_http.js +75 -44
- package/dist/actions/transports_ws.d.ts +29 -0
- package/dist/actions/transports_ws.d.ts.map +1 -1
- package/dist/actions/transports_ws.js +34 -8
- package/dist/actions/ws_endpoint_spec.d.ts +53 -76
- package/dist/actions/ws_endpoint_spec.d.ts.map +1 -1
- package/dist/actions/ws_endpoint_spec.js +27 -10
- package/dist/actions/ws_outbound_writer.d.ts +3 -3
- package/dist/actions/ws_outbound_writer.js +3 -3
- package/dist/actions/ws_socket_session.d.ts +321 -0
- package/dist/actions/ws_socket_session.d.ts.map +1 -0
- package/dist/actions/ws_socket_session.js +783 -0
- package/dist/auth/CLAUDE.md +132 -68
- package/dist/auth/account_action_specs.d.ts +2 -0
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_actions.d.ts +1 -1
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +9 -3
- package/dist/auth/account_queries.d.ts +10 -0
- package/dist/auth/account_queries.d.ts.map +1 -1
- package/dist/auth/account_queries.js +27 -17
- package/dist/auth/account_routes.d.ts +2 -1
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +14 -17
- package/dist/auth/account_schema.d.ts +5 -5
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +5 -2
- package/dist/auth/actor_lookup_actions.d.ts +1 -1
- package/dist/auth/actor_lookup_actions.d.ts.map +1 -1
- package/dist/auth/actor_lookup_actions.js +1 -1
- package/dist/auth/actor_lookup_queries.d.ts +3 -2
- package/dist/auth/actor_lookup_queries.d.ts.map +1 -1
- package/dist/auth/actor_lookup_queries.js +6 -3
- package/dist/auth/actor_search_action_specs.d.ts.map +1 -1
- package/dist/auth/actor_search_action_specs.js +2 -1
- package/dist/auth/actor_search_actions.d.ts +1 -1
- package/dist/auth/actor_search_actions.d.ts.map +1 -1
- package/dist/auth/actor_search_actions.js +1 -1
- package/dist/auth/actor_search_queries.d.ts +10 -7
- package/dist/auth/actor_search_queries.d.ts.map +1 -1
- package/dist/auth/actor_search_queries.js +18 -11
- package/dist/auth/admin_action_specs.d.ts +4 -4
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +7 -5
- package/dist/auth/admin_actions.d.ts +1 -1
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +47 -48
- package/dist/auth/all_cell_actions.d.ts +14 -3
- package/dist/auth/all_cell_actions.d.ts.map +1 -1
- package/dist/auth/all_cell_actions.js +2 -1
- package/dist/auth/api_token_queries.d.ts +1 -0
- package/dist/auth/api_token_queries.d.ts.map +1 -1
- package/dist/auth/api_token_queries.js +1 -0
- package/dist/auth/audit_emitter.d.ts +12 -6
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +11 -5
- package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_route_schema.js +3 -2
- package/dist/auth/audit_log_routes.d.ts +20 -11
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +49 -29
- package/dist/auth/audit_log_schema.d.ts +14 -21
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +19 -23
- package/dist/auth/bearer_auth.d.ts +7 -4
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bearer_auth.js +21 -15
- package/dist/auth/bootstrap_account.d.ts +25 -1
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +37 -4
- package/dist/auth/bootstrap_routes.d.ts +3 -2
- package/dist/auth/bootstrap_routes.d.ts.map +1 -1
- package/dist/auth/bootstrap_routes.js +5 -4
- package/dist/auth/cell_action_helpers.d.ts +89 -0
- package/dist/auth/cell_action_helpers.d.ts.map +1 -0
- package/dist/auth/cell_action_helpers.js +113 -0
- package/dist/auth/cell_action_specs.d.ts +215 -15
- package/dist/auth/cell_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_action_specs.js +103 -16
- package/dist/auth/cell_actions.d.ts +58 -27
- package/dist/auth/cell_actions.d.ts.map +1 -1
- package/dist/auth/cell_actions.js +206 -161
- package/dist/auth/cell_audit_actions.d.ts +1 -1
- package/dist/auth/cell_audit_actions.d.ts.map +1 -1
- package/dist/auth/cell_audit_actions.js +3 -12
- package/dist/auth/cell_audit_events.d.ts +1 -1
- package/dist/auth/cell_audit_events.d.ts.map +1 -1
- package/dist/auth/cell_audit_events.js +3 -2
- package/dist/auth/cell_audit_metadata.d.ts +12 -1
- package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.js +11 -1
- package/dist/auth/cell_field_actions.d.ts +1 -1
- package/dist/auth/cell_field_actions.d.ts.map +1 -1
- package/dist/auth/cell_field_actions.js +16 -66
- package/dist/auth/cell_grant_action_specs.d.ts +9 -2
- package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_grant_action_specs.js +10 -3
- package/dist/auth/cell_grant_actions.d.ts +105 -11
- package/dist/auth/cell_grant_actions.d.ts.map +1 -1
- package/dist/auth/cell_grant_actions.js +81 -56
- package/dist/auth/cell_grant_audit_metadata.d.ts +6 -3
- package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_grant_audit_metadata.js +7 -4
- package/dist/auth/cell_item_actions.d.ts +1 -1
- package/dist/auth/cell_item_actions.d.ts.map +1 -1
- package/dist/auth/cell_item_actions.js +21 -82
- package/dist/auth/cleanup.d.ts +1 -1
- package/dist/auth/cleanup.d.ts.map +1 -1
- package/dist/auth/cleanup.js +6 -3
- package/dist/auth/credential_deadline.d.ts +3 -3
- package/dist/auth/credential_deadline.js +3 -3
- package/dist/auth/credential_type_schema.d.ts +8 -7
- package/dist/auth/credential_type_schema.d.ts.map +1 -1
- package/dist/auth/credential_type_schema.js +8 -7
- package/dist/auth/daemon_token_middleware.d.ts +12 -6
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +28 -17
- package/dist/auth/deps.d.ts +4 -4
- package/dist/auth/fail_floor.d.ts +55 -0
- package/dist/auth/fail_floor.d.ts.map +1 -0
- package/dist/auth/fail_floor.js +63 -0
- package/dist/auth/invite_queries.d.ts +3 -15
- package/dist/auth/invite_queries.d.ts.map +1 -1
- package/dist/auth/invite_queries.js +3 -21
- package/dist/auth/middleware.d.ts +12 -7
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +42 -29
- package/dist/auth/migrations.d.ts +5 -33
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +9 -16
- package/dist/auth/request_context.d.ts +101 -71
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +137 -140
- package/dist/auth/resolved_auth.d.ts +122 -36
- package/dist/auth/resolved_auth.d.ts.map +1 -1
- package/dist/auth/resolved_auth.js +89 -38
- package/dist/auth/role_grant_offer_action_specs.d.ts +117 -16
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +51 -16
- package/dist/auth/role_grant_offer_actions.d.ts +22 -11
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +72 -19
- package/dist/auth/role_grant_offer_notifications.d.ts +6 -5
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +4 -3
- package/dist/auth/role_grant_offer_queries.d.ts +20 -5
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_queries.js +40 -37
- package/dist/auth/role_grant_queries.d.ts +44 -76
- package/dist/auth/role_grant_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_queries.js +73 -118
- package/dist/auth/role_grant_sql.d.ts +42 -0
- package/dist/auth/role_grant_sql.d.ts.map +1 -0
- package/dist/auth/role_grant_sql.js +54 -0
- package/dist/auth/role_schema.d.ts +14 -8
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +6 -3
- package/dist/auth/scope_kind_schema.d.ts +1 -1
- package/dist/auth/scope_kind_schema.js +1 -1
- package/dist/auth/self_service_role_actions.d.ts +1 -1
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +21 -1
- package/dist/auth/session_queries.d.ts +2 -1
- package/dist/auth/session_queries.d.ts.map +1 -1
- package/dist/auth/session_queries.js +2 -1
- package/dist/auth/signup_routes.d.ts +2 -1
- package/dist/auth/signup_routes.d.ts.map +1 -1
- package/dist/auth/signup_routes.js +14 -13
- package/dist/auth/standard_rpc_actions.d.ts +1 -1
- package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
- package/dist/auth/token_scope.d.ts +19 -46
- package/dist/auth/token_scope.d.ts.map +1 -1
- package/dist/auth/token_scope.js +23 -41
- package/dist/db/CLAUDE.md +18 -6
- package/dist/db/cell_ddl.d.ts +5 -134
- package/dist/db/cell_ddl.d.ts.map +1 -1
- package/dist/db/cell_ddl.js +28 -17
- package/dist/db/cell_field_queries.d.ts +0 -13
- package/dist/db/cell_field_queries.d.ts.map +1 -1
- package/dist/db/cell_field_queries.js +0 -16
- package/dist/db/cell_grant_queries.d.ts +10 -5
- package/dist/db/cell_grant_queries.d.ts.map +1 -1
- package/dist/db/cell_grant_queries.js +13 -7
- package/dist/db/cell_item_queries.d.ts +0 -7
- package/dist/db/cell_item_queries.d.ts.map +1 -1
- package/dist/db/cell_item_queries.js +0 -10
- package/dist/db/cell_queries.d.ts +65 -55
- package/dist/db/cell_queries.d.ts.map +1 -1
- package/dist/db/cell_queries.js +85 -62
- package/dist/db/cell_view_sql.d.ts +1 -6
- package/dist/db/cell_view_sql.d.ts.map +1 -1
- package/dist/db/cell_view_sql.js +1 -2
- package/dist/db/fact_ddl.d.ts +5 -30
- package/dist/db/fact_ddl.d.ts.map +1 -1
- package/dist/db/fact_ddl.js +14 -13
- package/dist/db/fact_store.d.ts +11 -0
- package/dist/db/fact_store.d.ts.map +1 -1
- package/dist/db/fact_store.js +4 -1
- package/dist/db/migrate.d.ts +44 -6
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +63 -4
- package/dist/dev/setup.d.ts +18 -14
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +42 -39
- package/dist/env/dotenv.d.ts +2 -2
- package/dist/env/dotenv.js +2 -2
- package/dist/env/update_env_variable.d.ts +33 -21
- package/dist/env/update_env_variable.d.ts.map +1 -1
- package/dist/env/update_env_variable.js +54 -35
- package/dist/hono_context.d.ts +15 -90
- package/dist/hono_context.d.ts.map +1 -1
- package/dist/hono_context.js +9 -56
- package/dist/http/CLAUDE.md +35 -20
- package/dist/http/auth_shape.d.ts +1 -8
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +6 -12
- package/dist/http/body_limit.d.ts +3 -1
- package/dist/http/body_limit.d.ts.map +1 -1
- package/dist/http/body_limit.js +6 -1
- package/dist/http/common_routes.d.ts.map +1 -1
- package/dist/http/common_routes.js +3 -2
- package/dist/http/db_routes.d.ts +3 -3
- package/dist/http/db_routes.js +3 -3
- package/dist/http/error_schemas.d.ts +1 -2
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +1 -2
- package/dist/http/health_schema.d.ts +16 -0
- package/dist/http/health_schema.d.ts.map +1 -0
- package/dist/http/health_schema.js +12 -0
- package/dist/http/jsonrpc.d.ts +9 -0
- package/dist/http/jsonrpc.d.ts.map +1 -1
- package/dist/http/jsonrpc.js +17 -0
- package/dist/http/jsonrpc_errors.d.ts +22 -2
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +70 -23
- package/dist/http/jsonrpc_helpers.d.ts +60 -17
- package/dist/http/jsonrpc_helpers.d.ts.map +1 -1
- package/dist/http/jsonrpc_helpers.js +67 -25
- package/dist/http/origin.d.ts +30 -1
- package/dist/http/origin.d.ts.map +1 -1
- package/dist/http/origin.js +46 -9
- package/dist/http/origin_wildcard.d.ts +97 -0
- package/dist/http/origin_wildcard.d.ts.map +1 -0
- package/dist/http/origin_wildcard.js +142 -0
- package/dist/http/pending_effects.d.ts +28 -0
- package/dist/http/pending_effects.d.ts.map +1 -1
- package/dist/http/pending_effects.js +32 -1
- package/dist/http/proxy.d.ts +4 -2
- package/dist/http/proxy.d.ts.map +1 -1
- package/dist/http/proxy.js +7 -2
- package/dist/http/route_spec.d.ts +4 -3
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +54 -45
- package/dist/http/surface.d.ts +4 -2
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +7 -4
- package/dist/http/surface_query.d.ts +9 -50
- package/dist/http/surface_query.d.ts.map +1 -1
- package/dist/http/surface_query.js +48 -94
- package/dist/realtime/audit_log_sse.d.ts +180 -0
- package/dist/realtime/audit_log_sse.d.ts.map +1 -0
- package/dist/realtime/audit_log_sse.js +154 -0
- package/dist/realtime/sse.d.ts +21 -6
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +33 -10
- package/dist/realtime/sse_constants.d.ts +29 -2
- package/dist/realtime/sse_constants.d.ts.map +1 -1
- package/dist/realtime/sse_constants.js +35 -2
- package/dist/realtime/{subscriber_registry.d.ts → sse_registry.d.ts} +12 -12
- package/dist/realtime/sse_registry.d.ts.map +1 -0
- package/dist/realtime/{subscriber_registry.js → sse_registry.js} +4 -4
- package/dist/schema_meta.d.ts +52 -1
- package/dist/schema_meta.d.ts.map +1 -1
- package/dist/schema_meta.js +123 -6
- package/dist/sensitivity.d.ts +9 -3
- package/dist/sensitivity.d.ts.map +1 -1
- package/dist/sensitivity.js +3 -2
- package/dist/server/app_backend.d.ts +8 -5
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +6 -12
- package/dist/server/app_server.d.ts +73 -54
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +115 -78
- package/dist/server/app_server_context.d.ts +1 -1
- package/dist/server/app_server_context.d.ts.map +1 -1
- package/dist/server/env.d.ts +24 -20
- package/dist/server/env.d.ts.map +1 -1
- package/dist/server/env.js +24 -34
- package/dist/server/serve_fact_route.d.ts +12 -16
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +59 -34
- package/dist/server/static.d.ts.map +1 -1
- package/dist/server/static.js +2 -2
- package/dist/testing/CLAUDE.md +213 -179
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +10 -19
- package/dist/testing/adversarial_headers.d.ts.map +1 -1
- package/dist/testing/adversarial_headers.js +8 -0
- package/dist/testing/app_server.d.ts +9 -75
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +31 -112
- package/dist/testing/attack_surface.d.ts.map +1 -1
- package/dist/testing/attack_surface.js +3 -4
- package/dist/testing/audit_completeness.d.ts.map +1 -1
- package/dist/testing/audit_completeness.js +4 -5
- package/dist/testing/auth_apps.d.ts +3 -3
- package/dist/testing/auth_apps.d.ts.map +1 -1
- package/dist/testing/auth_apps.js +9 -6
- package/dist/testing/connection_closer_helpers.d.ts +8 -16
- package/dist/testing/connection_closer_helpers.d.ts.map +1 -1
- package/dist/testing/connection_closer_helpers.js +7 -20
- package/dist/testing/cross_backend/action_manifest.d.ts +15 -4
- package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest.js +13 -3
- package/dist/testing/cross_backend/action_manifest_parity.d.ts +15 -7
- package/dist/testing/cross_backend/action_manifest_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest_parity.js +8 -1
- package/dist/testing/cross_backend/actor_lookup.d.ts.map +1 -1
- package/dist/testing/cross_backend/actor_lookup.js +27 -0
- package/dist/testing/cross_backend/body_size.d.ts.map +1 -1
- package/dist/testing/cross_backend/body_size.js +25 -22
- package/dist/testing/cross_backend/build_test_backend_paths.d.ts +22 -3
- package/dist/testing/cross_backend/build_test_backend_paths.d.ts.map +1 -1
- package/dist/testing/cross_backend/build_test_backend_paths.js +34 -11
- package/dist/testing/cross_backend/capabilities.d.ts +15 -8
- package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_gated_create.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_gated_create.js +109 -13
- package/dist/testing/cross_backend/cell_grant_role.js +2 -2
- package/dist/testing/cross_backend/cell_grant_steward.d.ts +4 -0
- package/dist/testing/cross_backend/cell_grant_steward.d.ts.map +1 -0
- package/dist/testing/cross_backend/cell_grant_steward.js +120 -0
- package/dist/testing/cross_backend/cell_moderate.d.ts +7 -1
- package/dist/testing/cross_backend/cell_moderate.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_moderate.js +68 -4
- package/dist/testing/cross_backend/cell_ref_admission.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_ref_admission.js +18 -9
- package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_relations.js +21 -0
- package/dist/testing/cross_backend/conformance_table.d.ts +6 -1
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +12 -10
- package/dist/testing/cross_backend/default_backend_configs.d.ts +18 -4
- package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_backend_configs.js +29 -9
- package/dist/testing/cross_backend/default_spine_surface.d.ts +7 -7
- package/dist/testing/cross_backend/default_spine_surface.js +2 -2
- package/dist/testing/cross_backend/differential.d.ts +7 -0
- package/dist/testing/cross_backend/differential.d.ts.map +1 -1
- package/dist/testing/cross_backend/differential.js +17 -0
- package/dist/testing/cross_backend/expected_schema.json +1 -0
- package/dist/testing/cross_backend/fact_serving.d.ts.map +1 -1
- package/dist/testing/cross_backend/fact_serving.js +48 -0
- package/dist/testing/cross_backend/full_spine_mount.d.ts +3 -4
- package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
- package/dist/testing/cross_backend/full_spine_mount.js +13 -5
- package/dist/testing/cross_backend/origin_scope.d.ts.map +1 -1
- package/dist/testing/cross_backend/origin_scope.js +5 -13
- package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/peer_ping_ws.js +29 -4
- package/dist/testing/cross_backend/postgres_database.d.ts +32 -0
- package/dist/testing/cross_backend/postgres_database.d.ts.map +1 -1
- package/dist/testing/cross_backend/postgres_database.js +56 -1
- package/dist/testing/cross_backend/query_shape.d.ts.map +1 -1
- package/dist/testing/cross_backend/query_shape.js +18 -1
- package/dist/testing/cross_backend/role_grant_offer_lifecycle.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_lifecycle.js +96 -2
- package/dist/testing/cross_backend/rpc_success_fixtures.js +2 -2
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +1 -1
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts +17 -5
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.js +5 -4
- package/dist/testing/cross_backend/session_cap.d.ts +8 -0
- package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/session_cap.js +66 -2
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +5 -4
- package/dist/testing/cross_backend/spine_suites.d.ts +4 -1
- package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_suites.js +21 -0
- package/dist/testing/cross_backend/spine_surface_constants.d.ts +22 -7
- package/dist/testing/cross_backend/spine_surface_constants.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_surface_constants.js +22 -7
- package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/sse_round_trip.js +4 -3
- package/dist/testing/cross_backend/standard.d.ts +6 -12
- package/dist/testing/cross_backend/standard.d.ts.map +1 -1
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts +18 -19
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts.map +1 -1
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.js +66 -42
- package/dist/testing/cross_backend/test_cell_grant_steward_revoke_authorize.d.ts +8 -0
- package/dist/testing/cross_backend/test_cell_grant_steward_revoke_authorize.d.ts.map +1 -0
- package/dist/testing/cross_backend/test_cell_grant_steward_revoke_authorize.js +22 -0
- package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_backdoor.js +4 -6
- package/dist/testing/cross_backend/testing_origin_check.d.ts +1 -1
- package/dist/testing/cross_backend/testing_origin_check.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_origin_check.js +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.d.ts +10 -5
- package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.js +7 -6
- package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_bun.js +5 -4
- package/dist/testing/cross_backend/testing_server_core.d.ts +6 -7
- package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_core.js +1 -1
- package/dist/testing/cross_backend/testing_server_node.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_node.js +13 -2
- package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
- package/dist/testing/cross_backend/token_lifetime.js +68 -0
- package/dist/testing/cross_backend/transport_composition.d.ts +1 -1
- package/dist/testing/cross_backend/transport_composition.d.ts.map +1 -1
- package/dist/testing/cross_backend/transport_composition.js +48 -6
- package/dist/testing/cross_backend/ts_spine_backend_config.d.ts +16 -2
- package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/ts_spine_backend_config.js +11 -8
- package/dist/testing/cross_backend/ws_action_rate_limit.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_action_rate_limit.js +30 -12
- package/dist/testing/cross_backend/ws_connection_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_connection_cap.js +5 -7
- package/dist/testing/cross_backend/ws_endpoint.d.ts +2 -3
- package/dist/testing/cross_backend/ws_endpoint.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_envelope.d.ts +17 -0
- package/dist/testing/cross_backend/ws_envelope.d.ts.map +1 -0
- package/dist/testing/cross_backend/ws_envelope.js +172 -0
- package/dist/testing/cross_backend/ws_inbound_dispatch.d.ts +16 -0
- package/dist/testing/cross_backend/ws_inbound_dispatch.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_inbound_dispatch.js +8 -4
- package/dist/testing/cross_backend/ws_outbound_overflow.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_outbound_overflow.js +5 -8
- package/dist/testing/cross_backend/ws_role_gated.js +2 -2
- package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +6 -4
- package/dist/{cli/daemon.d.ts → testing/daemon_info.d.ts} +15 -47
- package/dist/testing/daemon_info.d.ts.map +1 -0
- package/dist/testing/daemon_info.js +108 -0
- package/dist/testing/daemon_token_rotation.js +1 -1
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +3 -4
- package/dist/testing/db.js +2 -2
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +35 -65
- package/dist/testing/integration_helpers.d.ts +0 -15
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +2 -42
- package/dist/testing/middleware.d.ts +20 -12
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +49 -40
- package/dist/testing/rate_limiting.d.ts.map +1 -1
- package/dist/testing/rate_limiting.js +13 -22
- package/dist/testing/resolved_auth.d.ts +30 -0
- package/dist/testing/resolved_auth.d.ts.map +1 -0
- package/dist/testing/resolved_auth.js +41 -0
- package/dist/testing/rpc_envelope_cases.d.ts.map +1 -1
- package/dist/testing/rpc_envelope_cases.js +3 -0
- package/dist/testing/rpc_helpers.d.ts +1 -1
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +2 -1
- package/dist/testing/sse_round_trip.d.ts +5 -4
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +2 -2
- package/dist/testing/stubs.d.ts +2 -2
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +24 -21
- package/dist/testing/test_origin.d.ts +25 -0
- package/dist/testing/test_origin.d.ts.map +1 -0
- package/dist/testing/test_origin.js +28 -0
- package/dist/testing/transports/raw_http.d.ts +54 -0
- package/dist/testing/transports/raw_http.d.ts.map +1 -1
- package/dist/testing/transports/raw_http.js +58 -0
- package/dist/testing/transports/ws_raw_client.d.ts +8 -0
- package/dist/testing/transports/ws_raw_client.d.ts.map +1 -1
- package/dist/testing/transports/ws_raw_client.js +13 -0
- package/dist/testing/transports/ws_transport.d.ts +15 -2
- package/dist/testing/transports/ws_transport.d.ts.map +1 -1
- package/dist/testing/transports/ws_transport.js +4 -2
- package/dist/testing/ws_round_trip.d.ts +27 -25
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +34 -26
- package/dist/ui/AccountSessions.svelte +48 -19
- package/dist/ui/AccountSessions.svelte.d.ts +2 -17
- package/dist/ui/AccountSessions.svelte.d.ts.map +1 -1
- package/dist/ui/AdminAccounts.svelte +6 -1
- package/dist/ui/AdminAuditLog.svelte +61 -22
- package/dist/ui/AdminAuditLog.svelte.d.ts.map +1 -1
- package/dist/ui/AdminInvites.svelte +1 -1
- package/dist/ui/AdminOverview.svelte +76 -37
- package/dist/ui/AdminOverview.svelte.d.ts.map +1 -1
- package/dist/ui/AdminRoleGrantHistory.svelte +6 -1
- package/dist/ui/AdminSessions.svelte +1 -1
- package/dist/ui/AppShell.svelte +3 -2
- package/dist/ui/AppShell.svelte.d.ts +3 -2
- package/dist/ui/AppShell.svelte.d.ts.map +1 -1
- package/dist/ui/CLAUDE.md +121 -35
- package/dist/ui/Datatable.svelte +33 -18
- package/dist/ui/Datatable.svelte.d.ts +2 -14
- package/dist/ui/Datatable.svelte.d.ts.map +1 -1
- package/dist/ui/OpenSignupToggle.svelte +10 -1
- package/dist/ui/OpenSignupToggle.svelte.d.ts.map +1 -1
- package/dist/ui/PopoverButton.svelte +13 -8
- package/dist/ui/PopoverButton.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferForm.svelte +3 -2
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts +3 -2
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferHistory.svelte +3 -3
- package/dist/ui/RoleGrantOfferInbox.svelte +19 -15
- package/dist/ui/RoleGrantOfferInbox.svelte.d.ts.map +1 -1
- package/dist/ui/SurfaceExplorer.svelte +66 -27
- package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
- package/dist/ui/account_sessions_state.svelte.d.ts +7 -14
- package/dist/ui/account_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.d.ts +14 -9
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.js +6 -4
- package/dist/ui/admin_invites_state.svelte.d.ts +2 -2
- package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.d.ts +9 -9
- package/dist/ui/admin_rpc_adapters.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.js +9 -9
- package/dist/ui/app_settings_state.svelte.d.ts +2 -2
- package/dist/ui/app_settings_state.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.d.ts +70 -13
- package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.js +239 -47
- package/dist/ui/backend_probe.svelte.d.ts +93 -0
- package/dist/ui/backend_probe.svelte.d.ts.map +1 -0
- package/dist/ui/backend_probe.svelte.js +140 -0
- package/dist/ui/format_scope.d.ts +7 -7
- package/dist/ui/format_scope.d.ts.map +1 -1
- package/dist/ui/format_scope.js +4 -4
- package/dist/ui/keyed_async_slot.svelte.d.ts +2 -2
- package/dist/ui/keyed_async_slot.svelte.js +2 -2
- package/dist/ui/popover.svelte.d.ts +18 -19
- package/dist/ui/popover.svelte.d.ts.map +1 -1
- package/dist/ui/popover.svelte.js +103 -16
- package/dist/ui/role_grant_offers_state.svelte.d.ts +41 -46
- package/dist/ui/role_grant_offers_state.svelte.d.ts.map +1 -1
- package/dist/ui/role_grant_offers_state.svelte.js +37 -19
- package/dist/ui/ui_format.d.ts +17 -0
- package/dist/ui/ui_format.d.ts.map +1 -1
- package/dist/ui/ui_format.js +20 -0
- package/package.json +2 -1
- package/dist/actions/register_ws_endpoint.d.ts +0 -79
- package/dist/actions/register_ws_endpoint.d.ts.map +0 -1
- package/dist/actions/register_ws_endpoint.js +0 -109
- package/dist/actions/transports_ws_auth_guard.d.ts +0 -94
- package/dist/actions/transports_ws_auth_guard.d.ts.map +0 -1
- package/dist/actions/transports_ws_auth_guard.js +0 -138
- package/dist/actions/transports_ws_backend.d.ts.map +0 -1
- package/dist/cli/args.d.ts +0 -55
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js +0 -100
- package/dist/cli/config.d.ts +0 -47
- package/dist/cli/config.d.ts.map +0 -1
- package/dist/cli/config.js +0 -77
- package/dist/cli/daemon.d.ts.map +0 -1
- package/dist/cli/daemon.js +0 -181
- package/dist/cli/help.d.ts +0 -124
- package/dist/cli/help.d.ts.map +0 -1
- package/dist/cli/help.js +0 -215
- package/dist/cli/logger.d.ts +0 -46
- package/dist/cli/logger.d.ts.map +0 -1
- package/dist/cli/logger.js +0 -48
- package/dist/cli/util.d.ts +0 -36
- package/dist/cli/util.d.ts.map +0 -1
- package/dist/cli/util.js +0 -50
- package/dist/realtime/sse_auth_guard.d.ts +0 -197
- package/dist/realtime/sse_auth_guard.d.ts.map +0 -1
- package/dist/realtime/sse_auth_guard.js +0 -238
- package/dist/realtime/subscriber_registry.d.ts.map +0 -1
- package/dist/testing/bootstrap_success.d.ts +0 -29
- package/dist/testing/bootstrap_success.d.ts.map +0 -1
- package/dist/testing/bootstrap_success.js +0 -144
- package/dist/testing/mock_fs.d.ts +0 -20
- package/dist/testing/mock_fs.d.ts.map +0 -1
- package/dist/testing/mock_fs.js +0 -28
- package/dist/testing/standard.d.ts +0 -122
- package/dist/testing/standard.d.ts.map +0 -1
- package/dist/testing/standard.js +0 -73
- package/dist/testing/testing_rate_limiter.d.ts +0 -65
- package/dist/testing/testing_rate_limiter.d.ts.map +0 -1
- package/dist/testing/testing_rate_limiter.js +0 -80
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Backend WebSocket
|
|
2
|
+
* Backend WebSocket connection registry — manages server-side WebSocket connections
|
|
3
3
|
* with session tracking, revocation support, a per-account connection cap,
|
|
4
4
|
* and two-phase registration.
|
|
5
5
|
*
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Registration is split to close it:
|
|
16
16
|
*
|
|
17
|
-
* 1. `
|
|
18
|
-
* **un-admitted**. It is closeable from that instant — `
|
|
19
|
-
*
|
|
17
|
+
* 1. `ConnectionRegistry.register_pending` inserts the entry
|
|
18
|
+
* **un-admitted**. It is closeable from that instant — `close_connections`
|
|
19
|
+
* matches pending entries deliberately — and is otherwise inert: it evicts
|
|
20
20
|
* nothing, the cap does not count it, no broadcast / `send_to_account` /
|
|
21
21
|
* `request_connection` reaches it, and the count accessors and
|
|
22
|
-
* `is_registered` do not see it (`
|
|
22
|
+
* `is_registered` do not see it (`pending_connection_count` does).
|
|
23
23
|
* 2. The caller re-checks the credential against the database
|
|
24
24
|
* (`revalidate_resolved_auth` in `auth/resolved_auth.ts`).
|
|
25
|
-
* 3. `
|
|
25
|
+
* 3. `ConnectionRegistry.admit` flips the entry to admitted — or
|
|
26
26
|
* refuses when a revocation closed it in the meantime, evicting nothing.
|
|
27
27
|
* The cap's eviction happens here, so a connection that is never admitted
|
|
28
28
|
* never closes a live one, and any number of pending registrations on one
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
*
|
|
49
49
|
* Every frame the server sends a connection goes through one path —
|
|
50
50
|
* `send_to`, which responses, error frames and socket-scoped notifications
|
|
51
|
-
* use, and the fan-outs (`
|
|
51
|
+
* use, and the fan-outs (`broadcast`, `broadcast_filtered`, `send_to_account`,
|
|
52
52
|
* `request_connection`) — into the connection's `WsOutboundWriter`
|
|
53
53
|
* (`actions/ws_outbound_writer.ts`). A send never waits and never throws: one
|
|
54
54
|
* recipient that stopped reading must not slow a producer or another
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
*
|
|
76
76
|
* A socket that holds unwritten bytes past `WS_WRITE_STALL_TIMEOUT` is dropped
|
|
77
77
|
* with no close frame, and removed the same way, with one `warn` line. Every
|
|
78
|
-
* other close the
|
|
78
|
+
* other close the registry makes (a revocation, the cap, the shutdown,
|
|
79
79
|
* `close_connection`) hands the frames still waiting to the socket ahead of
|
|
80
80
|
* its close frame while the socket's buffer is below
|
|
81
81
|
* `WS_WRITE_HIGH_WATER_BYTES`, discards the rest, and cuts the socket if the
|
|
@@ -83,22 +83,22 @@
|
|
|
83
83
|
* to an otherwise idle connection just before such a close reaches the client;
|
|
84
84
|
* one queued behind a backed-up socket does not.
|
|
85
85
|
*
|
|
86
|
-
* A connection the
|
|
86
|
+
* A connection the registry closed or dropped is out of its map, so the
|
|
87
87
|
* per-account cap does not count it while its socket is still closing. What
|
|
88
88
|
* the runtime holds for such a socket is bounded by the writer
|
|
89
89
|
* (`actions/ws_outbound_writer.ts`, "Closing" and "Runtimes").
|
|
90
90
|
*
|
|
91
91
|
* The twin of the Rust `fuz_realtime` outbound queue — same budget, charge,
|
|
92
92
|
* close code and deadlines. Where they differ: the Rust spine discards every
|
|
93
|
-
* frame queued before any close, and queues every frame, where this
|
|
93
|
+
* frame queued before any close, and queues every frame, where this registry
|
|
94
94
|
* writes the first frame of a run straight through and, at a close that is
|
|
95
95
|
* not an overflow, the waiting frames its socket has room for.
|
|
96
96
|
*
|
|
97
97
|
* ## Shutdown
|
|
98
98
|
*
|
|
99
|
-
* `
|
|
99
|
+
* `close_all_connections` — the close `AppServer.close` runs — closes every
|
|
100
100
|
* connection, pending or admitted, with `WS_CLOSE_GOING_AWAY`, and leaves the
|
|
101
|
-
*
|
|
101
|
+
* registry **closing**: from then on every registration is born closed. A
|
|
102
102
|
* `register_pending` or `add_connection` inserts nothing — it aborts the
|
|
103
103
|
* caller's controller and closes the socket with `WS_CLOSE_GOING_AWAY` at once
|
|
104
104
|
* — so an upgrade still in flight when the server shuts down is closed rather
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
* in the same synchronous step that closes the live connections, so an `admit`
|
|
108
108
|
* that finds its entry gone and reads `is_closing()` sees the shutdown — a
|
|
109
109
|
* shutdown is never read as a revocation (a revocation the shutdown overtook
|
|
110
|
-
* reads as the shutdown). Closing is permanent: a closed
|
|
110
|
+
* reads as the shutdown). Closing is permanent: a closed registry hosts no
|
|
111
111
|
* further connections.
|
|
112
112
|
*
|
|
113
113
|
* @module
|
|
@@ -115,51 +115,55 @@
|
|
|
115
115
|
import type { WSContext } from 'hono/ws';
|
|
116
116
|
import { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
117
117
|
import { type Uuid } from '../primitive_schemas.js';
|
|
118
|
-
import type { JsonrpcMessageFromServerToClient, JsonrpcNotification,
|
|
119
|
-
import { type Transport, type TransportSendOptions } from './transports.js';
|
|
118
|
+
import type { JsonrpcMessageFromServerToClient, JsonrpcNotification, JsonrpcRequestParams, JsonrpcResponse, JsonrpcErrorResponse } from '../http/jsonrpc.js';
|
|
120
119
|
import { type PeerRequestOptions, type PeerRequestOutcome } from './peer_request.js';
|
|
120
|
+
import type { ConnectionCloseTarget } from './connection_closer.js';
|
|
121
121
|
/**
|
|
122
122
|
* Auth identity attached to a single WebSocket connection.
|
|
123
123
|
*
|
|
124
|
-
* One record per connection. `
|
|
124
|
+
* One record per connection. `session_hash` is set for cookie-session
|
|
125
125
|
* connections, `api_token_id` for bearer (`api_token`) connections, and
|
|
126
126
|
* both are null for daemon-token connections (reachable only via
|
|
127
|
-
* `
|
|
127
|
+
* an `account` close target). `required_roles`
|
|
128
128
|
* is what the connection's endpoint gated the upgrade on, kept per
|
|
129
129
|
* registration because endpoints with different gates can share one
|
|
130
|
-
*
|
|
130
|
+
* registry.
|
|
131
131
|
*/
|
|
132
132
|
export interface ConnectionIdentity {
|
|
133
133
|
/** Blake3 session token hash, or null for non-session credentials. */
|
|
134
|
-
|
|
134
|
+
session_hash: string | null;
|
|
135
135
|
/** Authenticated account id. Always set. */
|
|
136
136
|
account_id: Uuid;
|
|
137
137
|
/** `api_token.id` for bearer-authenticated connections, else null. */
|
|
138
138
|
api_token_id: string | null;
|
|
139
139
|
/**
|
|
140
140
|
* The roles the endpoint required at upgrade (any-of), or empty for an
|
|
141
|
-
* ungated endpoint — what `
|
|
141
|
+
* ungated endpoint — what a `role` close target matches on.
|
|
142
142
|
*/
|
|
143
143
|
required_roles: ReadonlyArray<string>;
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
146
|
+
* Whether the connection `identity` belongs to is one `target` names — the
|
|
147
|
+
* predicate `ConnectionRegistry.close_connections` runs per connection.
|
|
148
|
+
* Twin of the Rust spine's `ConnectionIdentity::matches`. The SSE closer
|
|
149
|
+
* (`create_sse_connection_closer`) does not run it: it closes by the ids its
|
|
150
|
+
* registry holds, with one gating role for the whole registry.
|
|
149
151
|
*
|
|
150
|
-
* `
|
|
151
|
-
*
|
|
152
|
-
*
|
|
152
|
+
* - `session` — `identity.session_hash` equals `target.session_hash`
|
|
153
|
+
* - `token` — `identity.api_token_id` equals `target.api_token_id`
|
|
154
|
+
* - `account` — `identity.account_id` equals `target.account_id`
|
|
155
|
+
* - `role` — the account matches and `role` is one of the endpoint's
|
|
156
|
+
* `required_roles` (an ungated connection never matches)
|
|
157
|
+
*
|
|
158
|
+
* @param identity - the connection's identity
|
|
159
|
+
* @param target - the connections to close
|
|
160
|
+
* @returns whether `target` names this connection
|
|
153
161
|
*/
|
|
154
|
-
export
|
|
155
|
-
broadcast_filtered: (message: JsonrpcMessageFromServerToClient, predicate: (identity: ConnectionIdentity) => boolean) => number;
|
|
156
|
-
}
|
|
157
|
-
/** Type guard for `FilterableBroadcastTransport`. */
|
|
158
|
-
export declare const is_filterable_broadcast_transport: (transport: Transport) => transport is FilterableBroadcastTransport;
|
|
162
|
+
export declare const connection_identity_matches: (identity: ConnectionIdentity, target: ConnectionCloseTarget) => boolean;
|
|
159
163
|
/**
|
|
160
164
|
* Default per-account WebSocket connection cap, applied by
|
|
161
|
-
* `
|
|
162
|
-
* `
|
|
165
|
+
* `ConnectionRegistry` unless overridden via
|
|
166
|
+
* `ConnectionRegistryOptions.max_connections_per_account`.
|
|
163
167
|
*
|
|
164
168
|
* Matches the account-wide ceiling the audit SSE cap implies (the default
|
|
165
169
|
* session cap, `DEFAULT_MAX_SESSIONS`, times `AUDIT_LOG_SSE_MAX_PER_SCOPE`
|
|
@@ -170,8 +174,8 @@ export declare const is_filterable_broadcast_transport: (transport: Transport) =
|
|
|
170
174
|
export declare const DEFAULT_MAX_CONNECTIONS_PER_ACCOUNT = 50;
|
|
171
175
|
/**
|
|
172
176
|
* Default byte budget of the frames waiting to be written to one connection,
|
|
173
|
-
* applied by `
|
|
174
|
-
* `
|
|
177
|
+
* applied by `ConnectionRegistry` unless overridden via
|
|
178
|
+
* `ConnectionRegistryOptions.outbound_queue_bytes`.
|
|
175
179
|
*
|
|
176
180
|
* 4 MiB — four messages at `DEFAULT_WS_MAX_MESSAGE_BYTES` as it stands, and a
|
|
177
181
|
* value of its own: it does not move with the inbound message cap. A consumer
|
|
@@ -180,8 +184,8 @@ export declare const DEFAULT_MAX_CONNECTIONS_PER_ACCOUNT = 50;
|
|
|
180
184
|
* `DEFAULT_WS_OUTBOUND_QUEUE_BYTES`.
|
|
181
185
|
*/
|
|
182
186
|
export declare const DEFAULT_WS_OUTBOUND_QUEUE_BYTES: number;
|
|
183
|
-
/** Options for `
|
|
184
|
-
export interface
|
|
187
|
+
/** Options for `ConnectionRegistry`. */
|
|
188
|
+
export interface ConnectionRegistryOptions {
|
|
185
189
|
/**
|
|
186
190
|
* Max concurrent connections per `account_id`, across every credential
|
|
187
191
|
* type (session, API token, daemon token — none exempt). The policy is
|
|
@@ -192,7 +196,7 @@ export interface BackendWebsocketTransportOptions {
|
|
|
192
196
|
* credential fill the slots ahead of the real user — revocation is the fix
|
|
193
197
|
* for a stolen credential, and evict-oldest never stands in its way.
|
|
194
198
|
*
|
|
195
|
-
* The cap is per
|
|
199
|
+
* The cap is per registry: endpoints sharing one registry share one
|
|
196
200
|
* count per account. `null` disables it.
|
|
197
201
|
*
|
|
198
202
|
* @default DEFAULT_MAX_CONNECTIONS_PER_ACCOUNT
|
|
@@ -217,26 +221,25 @@ export interface BackendWebsocketTransportOptions {
|
|
|
217
221
|
* at info — the account, how many connections were closed, and the cap —
|
|
218
222
|
* so an operator can see a client that keeps meeting it. Unset falls back
|
|
219
223
|
* to a `[ws]` logger; `null` silences it. `register_action_ws` passes its
|
|
220
|
-
* own logger to the
|
|
224
|
+
* own logger to the registry it creates.
|
|
221
225
|
*/
|
|
222
226
|
log?: Logger | null;
|
|
223
227
|
}
|
|
224
|
-
export declare class
|
|
228
|
+
export declare class ConnectionRegistry {
|
|
225
229
|
#private;
|
|
226
|
-
readonly transport_name: "backend_websocket_rpc";
|
|
227
230
|
/**
|
|
228
231
|
* @throws Error when `max_connections_per_account` is neither `null` nor a
|
|
229
232
|
* positive integer, or `outbound_queue_bytes` is not a positive integer
|
|
230
233
|
*/
|
|
231
|
-
constructor(options?:
|
|
234
|
+
constructor(options?: ConnectionRegistryOptions);
|
|
232
235
|
/**
|
|
233
236
|
* Register a connection **un-admitted** — phase one of the two-phase
|
|
234
237
|
* registration an upgrade runs (module doc).
|
|
235
238
|
*
|
|
236
|
-
* The entry is closeable at once: a `
|
|
237
|
-
* `
|
|
239
|
+
* The entry is closeable at once: a `close_connections` whose target
|
|
240
|
+
* matches `session_hash` / `account_id` / `api_token_id` removes it, aborts
|
|
238
241
|
* `abort_controller`, and closes `ws` with `WS_CLOSE_SESSION_REVOKED`
|
|
239
|
-
* (`
|
|
242
|
+
* (a `role` target, matching `required_roles`, with
|
|
240
243
|
* `WS_CLOSE_PERMISSION_REVOKED`); the later `admit` then refuses. Until admitted it evicts nothing, is not
|
|
241
244
|
* counted toward the per-account cap, and receives no message.
|
|
242
245
|
*
|
|
@@ -244,30 +247,30 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
244
247
|
* `close_connection`, and `remove_connection` drops it once its socket has
|
|
245
248
|
* closed.
|
|
246
249
|
*
|
|
247
|
-
* Once the
|
|
250
|
+
* Once the registry is closing (`close_all_connections`) the registration is
|
|
248
251
|
* born closed: nothing is inserted, `abort_controller` is aborted, and `ws`
|
|
249
252
|
* is closed with `WS_CLOSE_GOING_AWAY` before this returns. The id names
|
|
250
253
|
* nothing, so `admit` refuses it (module doc, "Shutdown").
|
|
251
254
|
*
|
|
255
|
+
* Twin of the Rust `ConnectionRegistry::register_pending`, which takes the
|
|
256
|
+
* same `ConnectionIdentity`.
|
|
257
|
+
*
|
|
252
258
|
* @param ws - the socket to close on revocation
|
|
253
|
-
* @param
|
|
254
|
-
*
|
|
255
|
-
* @param api_token_id - `api_token.id` for bearer connections, else `null`
|
|
259
|
+
* @param identity - who the connection is — what every close target and the
|
|
260
|
+
* per-account cap match on; the registry keeps a copy
|
|
256
261
|
* @param abort_controller - the socket-scoped controller to abort when the
|
|
257
|
-
*
|
|
258
|
-
* @param required_roles - the roles the endpoint gated the upgrade on, for
|
|
259
|
-
* `close_sockets_for_role`; empty for an ungated endpoint
|
|
262
|
+
* registry closes this connection (revocation or cap eviction)
|
|
260
263
|
* @returns the freshly assigned `connection_id` (branded `Uuid`)
|
|
261
264
|
* @mutates this - inserts an un-admitted entry into `#connections`, unless
|
|
262
|
-
* the
|
|
265
|
+
* the registry is closing
|
|
263
266
|
*/
|
|
264
|
-
register_pending(ws: WSContext,
|
|
267
|
+
register_pending(ws: WSContext, identity: ConnectionIdentity, abort_controller?: AbortController | null): Uuid;
|
|
265
268
|
/**
|
|
266
|
-
* The close code the
|
|
269
|
+
* The close code the registry closed a still-pending registration with —
|
|
267
270
|
* `WS_CLOSE_SESSION_REVOKED` for a credential revocation,
|
|
268
271
|
* `WS_CLOSE_PERMISSION_REVOKED` for a role close, `WS_CLOSE_GOING_AWAY`
|
|
269
272
|
* for the shutdown — read once: the record is dropped by this call (and by
|
|
270
|
-
* `remove_connection`). `null` when the
|
|
273
|
+
* `remove_connection`). `null` when the registry did not close it while
|
|
271
274
|
* pending. For a caller whose `admit` was refused, to say why; the twin of
|
|
272
275
|
* the reason the Rust `ConnectionRegistry::admit` refuses with.
|
|
273
276
|
*
|
|
@@ -303,12 +306,12 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
303
306
|
* (module doc, "Two-phase registration"). This is for a connection with
|
|
304
307
|
* nothing to revoke behind it.
|
|
305
308
|
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* socket can be closed when that specific token is
|
|
309
|
-
* tearing down the account's other sockets.
|
|
310
|
-
*
|
|
311
|
-
* `
|
|
309
|
+
* A session connection's `identity` carries its session hash for targeted
|
|
310
|
+
* revocation. A bearer token connection (`api_token`) carries the
|
|
311
|
+
* `api_token.id` so the socket can be closed when that specific token is
|
|
312
|
+
* revoked without tearing down the account's other sockets. A daemon-token
|
|
313
|
+
* connection carries `null` for both — it's only reachable via an
|
|
314
|
+
* `account` close target.
|
|
312
315
|
*
|
|
313
316
|
* Enforces the per-account cap (`max_connections_per_account`): when
|
|
314
317
|
* `account_id` already holds the maximum, its oldest admitted connections are
|
|
@@ -316,17 +319,20 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
316
319
|
* inserted. A removed connection gets no further broadcast or peer request,
|
|
317
320
|
* stops counting toward the cap at once, and has its `abort_controller`
|
|
318
321
|
* aborted; its socket is closed when the close handshake completes. The new
|
|
319
|
-
* connection is always admitted — unless the
|
|
322
|
+
* connection is always admitted — unless the registry is closing: then it
|
|
320
323
|
* is born closed, as in `register_pending`, and evicts nothing.
|
|
321
324
|
*
|
|
322
|
-
* @param
|
|
323
|
-
*
|
|
325
|
+
* @param ws - the socket to close on revocation
|
|
326
|
+
* @param identity - who the connection is — what every close target and the
|
|
327
|
+
* per-account cap match on; the registry keeps a copy
|
|
328
|
+
* @param abort_controller - the socket-scoped controller to abort when the
|
|
329
|
+
* registry closes this connection (revocation or cap eviction)
|
|
324
330
|
* @returns the freshly assigned `connection_id` (branded `Uuid`)
|
|
325
331
|
* @mutates this - inserts an admitted entry into `#connections`; past the
|
|
326
332
|
* cap, first removes the account's oldest admitted connections and closes
|
|
327
333
|
* their `WSContext`
|
|
328
334
|
*/
|
|
329
|
-
add_connection(ws: WSContext,
|
|
335
|
+
add_connection(ws: WSContext, identity: ConnectionIdentity, abort_controller?: AbortController | null): Uuid;
|
|
330
336
|
/**
|
|
331
337
|
* Remove a connection and its auth tracking data, pending or admitted, by
|
|
332
338
|
* the id `register_pending` / `add_connection` returned. Idempotent — safe
|
|
@@ -342,7 +348,7 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
342
348
|
* both. What was waiting to be written to it is dropped.
|
|
343
349
|
*
|
|
344
350
|
* For a socket that has closed (an adapter's close event): on a connection
|
|
345
|
-
* the
|
|
351
|
+
* the registry closed it also drops the close deadline, so calling it while
|
|
346
352
|
* that socket is still closing leaves a client that is not reading uncut.
|
|
347
353
|
*
|
|
348
354
|
* @mutates this - deletes the connection's entry from `#connections`, drops
|
|
@@ -353,7 +359,9 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
353
359
|
/**
|
|
354
360
|
* Close one connection, pending or admitted, with `code` and `reason` — the
|
|
355
361
|
* close `register_action_ws` makes for a heartbeat timeout, an oversized
|
|
356
|
-
* message, a failed `on_socket_open`, and a refused admission.
|
|
362
|
+
* message, a failed `on_socket_open`, and a refused admission. Not to be
|
|
363
|
+
* confused with `close_connections`, which closes every connection a
|
|
364
|
+
* `ConnectionCloseTarget` names.
|
|
357
365
|
*
|
|
358
366
|
* The connection is removed and its controller aborted at once; frames still
|
|
359
367
|
* waiting for the socket are handed to it ahead of the close frame while its
|
|
@@ -370,58 +378,30 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
370
378
|
*/
|
|
371
379
|
close_connection(connection_id: Uuid, code: number, reason: string): boolean;
|
|
372
380
|
/**
|
|
373
|
-
* Close
|
|
374
|
-
*
|
|
375
|
-
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*/
|
|
391
|
-
close_sockets_for_account(account_id: Uuid): number;
|
|
392
|
-
/**
|
|
393
|
-
* Close all sockets associated with a specific API token, including a
|
|
394
|
-
* registration still pending admission.
|
|
395
|
-
*
|
|
396
|
-
* Closes just this token's sockets, so revoking one token — or evicting
|
|
397
|
-
* one past the token cap — doesn't tear down the account's
|
|
398
|
-
* session-authenticated sockets or other tokens' sockets.
|
|
399
|
-
*
|
|
400
|
-
* @returns the number of sockets closed
|
|
401
|
-
* @mutates this - removes matching connections, aborts their registered
|
|
402
|
-
* controllers, and closes their underlying `WSContext` with
|
|
403
|
-
* `WS_CLOSE_SESSION_REVOKED`
|
|
404
|
-
*/
|
|
405
|
-
close_sockets_for_token(api_token_id: string): number;
|
|
406
|
-
/**
|
|
407
|
-
* Close the sockets of `account_id` whose endpoint required `role`,
|
|
408
|
-
* including a registration still pending admission — the close for a
|
|
409
|
-
* revoked global grant of a role the upgrade gate admitted on. Each closes
|
|
410
|
-
* with `WS_CLOSE_PERMISSION_REVOKED`, not a revocation's code: the
|
|
411
|
-
* credential is still good.
|
|
412
|
-
*
|
|
413
|
-
* **Over-closes an any-of gate.** An endpoint gated on several roles admits
|
|
414
|
-
* an account holding any one of them, but this closes on the loss of any
|
|
415
|
-
* listed role, without checking whether the account still holds another.
|
|
416
|
-
* The client can reconnect when it still qualifies. The account's sockets
|
|
417
|
-
* on endpoints that did not list `role`, and on ungated ones, stay open.
|
|
381
|
+
* Close every connection `target` names, including a registration still
|
|
382
|
+
* pending admission (`connection_identity_matches`). Not to be confused
|
|
383
|
+
* with `close_connection`, which closes one connection by id.
|
|
384
|
+
*
|
|
385
|
+
* A credential target — `session`, `token`, `account` — closes with
|
|
386
|
+
* `WS_CLOSE_SESSION_REVOKED`. A `token` close takes just that token's
|
|
387
|
+
* sockets, so revoking one token — or evicting one past the token cap —
|
|
388
|
+
* leaves the account's session sockets and other tokens' sockets open.
|
|
389
|
+
*
|
|
390
|
+
* A `role` target — a revoked global grant of a role the upgrade gate
|
|
391
|
+
* admitted on — closes with `WS_CLOSE_PERMISSION_REVOKED`, not a
|
|
392
|
+
* revocation's code: the credential is still good. It **over-closes an
|
|
393
|
+
* any-of gate**: an endpoint gated on several roles admits an account
|
|
394
|
+
* holding any one of them, but this closes on the loss of any listed role,
|
|
395
|
+
* without checking whether the account still holds another. The client can
|
|
396
|
+
* reconnect when it still qualifies. The account's sockets on endpoints
|
|
397
|
+
* that did not list `role`, and on ungated ones, stay open.
|
|
418
398
|
*
|
|
419
399
|
* @returns the number of sockets closed
|
|
420
400
|
* @mutates this - removes matching connections, aborts their registered
|
|
421
|
-
* controllers, and closes their underlying `WSContext`
|
|
422
|
-
*
|
|
401
|
+
* controllers, and closes their underlying `WSContext`
|
|
402
|
+
* @throws the first error a socket's `close` threw, after every match was attempted
|
|
423
403
|
*/
|
|
424
|
-
|
|
404
|
+
close_connections(target: ConnectionCloseTarget): number;
|
|
425
405
|
/**
|
|
426
406
|
* Close every connection, pending or admitted, with `WS_CLOSE_GOING_AWAY` —
|
|
427
407
|
* the shutdown close `AppServer.close` runs. Not a revocation: the client
|
|
@@ -431,40 +411,49 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
431
411
|
* revocation does, so its heartbeat timer stops and nothing more dispatches
|
|
432
412
|
* on it. A socket whose `close` throws does not stop the loop.
|
|
433
413
|
*
|
|
434
|
-
* Leaves the
|
|
414
|
+
* Leaves the registry closing, for good: every later registration is born
|
|
435
415
|
* closed (module doc, "Shutdown"). A second call closes nothing.
|
|
436
416
|
*
|
|
437
417
|
* @returns the number of sockets closed
|
|
438
|
-
* @mutates this - sets the
|
|
418
|
+
* @mutates this - sets the registry closing, removes every connection,
|
|
439
419
|
* aborts its registered controller, and closes its underlying `WSContext`
|
|
440
420
|
* with `WS_CLOSE_GOING_AWAY`
|
|
441
421
|
* @throws the first error a socket's `close` threw, after every connection was attempted
|
|
442
422
|
*/
|
|
443
|
-
|
|
423
|
+
close_all_connections(): number;
|
|
444
424
|
/**
|
|
445
|
-
* Whether `
|
|
425
|
+
* Whether `close_all_connections` has run — the registry is shutting down and
|
|
446
426
|
* every registration from now on is born closed (module doc, "Shutdown").
|
|
447
427
|
* For telemetry and logs: `register_action_ws` reads it to say why an
|
|
448
428
|
* upgrade was refused.
|
|
449
429
|
*/
|
|
450
430
|
is_closing(): boolean;
|
|
451
|
-
|
|
452
|
-
|
|
431
|
+
/**
|
|
432
|
+
* Broadcast a notification to every admitted connection — a registration
|
|
433
|
+
* pending admission is not a connection yet. A server→client *request* has
|
|
434
|
+
* no single target here; that is `request_connection`.
|
|
435
|
+
*
|
|
436
|
+
* A connection the message overflows is closed and not counted (module doc,
|
|
437
|
+
* "Outbound bound").
|
|
438
|
+
*
|
|
439
|
+
* @returns the number of connections that accepted the message
|
|
440
|
+
*/
|
|
441
|
+
broadcast(message: JsonrpcNotification): number;
|
|
453
442
|
/**
|
|
454
443
|
* Broadcast to admitted connections whose identity satisfies a predicate. A
|
|
455
444
|
* registration pending admission is skipped before the predicate runs.
|
|
456
445
|
*
|
|
457
446
|
* Used by the broadcast API when a consumer supplies a subscription ACL hook
|
|
458
447
|
* (e.g. an event that only reaches the account that owns the resource it reports).
|
|
459
|
-
* When no ACL is needed, callers should prefer `
|
|
460
|
-
*
|
|
448
|
+
* When no ACL is needed, callers should prefer `broadcast` to skip the
|
|
449
|
+
* per-connection predicate overhead.
|
|
461
450
|
*
|
|
462
451
|
* A connection the message overflows is closed and not counted (module doc,
|
|
463
452
|
* "Outbound bound").
|
|
464
453
|
*
|
|
465
454
|
* @returns the number of connections that accepted the message
|
|
466
455
|
*/
|
|
467
|
-
broadcast_filtered(message: JsonrpcMessageFromServerToClient, predicate: (identity: ConnectionIdentity) => boolean): number;
|
|
456
|
+
broadcast_filtered(message: JsonrpcMessageFromServerToClient, predicate: (identity: Readonly<ConnectionIdentity>) => boolean): number;
|
|
468
457
|
/**
|
|
469
458
|
* Send a message to every admitted socket bound to a specific account.
|
|
470
459
|
*
|
|
@@ -473,7 +462,7 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
473
462
|
* the filter is exactly "this account_id"; reach for `broadcast_filtered`
|
|
474
463
|
* when the ACL is an arbitrary predicate over `ConnectionIdentity`.
|
|
475
464
|
*
|
|
476
|
-
* Mirrors `
|
|
465
|
+
* Mirrors an `account` close target on the send side: every connection
|
|
477
466
|
* for the account (session, bearer, and daemon-token) receives the
|
|
478
467
|
* message.
|
|
479
468
|
*
|
|
@@ -536,7 +525,7 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
536
525
|
/**
|
|
537
526
|
* Whether a connection is still registered — and admitted: a registration
|
|
538
527
|
* pending admission answers `false`, like every other reader of the
|
|
539
|
-
*
|
|
528
|
+
* registry.
|
|
540
529
|
*
|
|
541
530
|
* `register_action_ws` checks it before dispatching each inbound message, so
|
|
542
531
|
* a socket the server has closed — revoked, superseded by the cap, or
|
|
@@ -544,23 +533,22 @@ export declare class BackendWebsocketTransport implements FilterableBroadcastTra
|
|
|
544
533
|
* is still in flight. The twin of the Rust `ConnectionRegistry::is_registered`.
|
|
545
534
|
*/
|
|
546
535
|
is_registered(connection_id: Uuid): boolean;
|
|
547
|
-
is_ready(): boolean;
|
|
548
536
|
/**
|
|
549
537
|
* Number of currently **admitted** WebSocket connections.
|
|
550
538
|
*
|
|
551
539
|
* Read-only counter intended for telemetry, logging, and tests. A
|
|
552
540
|
* registration still pending admission is not a connection yet and is
|
|
553
|
-
* counted by `
|
|
541
|
+
* counted by `pending_connection_count` instead. Includes connections
|
|
554
542
|
* that have been closed by the peer but not yet removed by the WS adapter's
|
|
555
543
|
* `onClose` callback.
|
|
556
544
|
*/
|
|
557
|
-
|
|
545
|
+
connection_count(): number;
|
|
558
546
|
/**
|
|
559
547
|
* Number of registrations awaiting admission — between `register_pending`
|
|
560
548
|
* and `admit` (or their refusal). Each lives for one credential re-check, so
|
|
561
549
|
* a count that stays high means upgrades are stalling there. For telemetry
|
|
562
550
|
* and tests.
|
|
563
551
|
*/
|
|
564
|
-
|
|
552
|
+
pending_connection_count(): number;
|
|
565
553
|
}
|
|
566
|
-
//# sourceMappingURL=
|
|
554
|
+
//# sourceMappingURL=connection_registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection_registry.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/connection_registry.ts"],"names":[],"mappings":"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"}
|