@fuzdev/fuz_app 0.180.0 → 0.182.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/dist/actions/CLAUDE.md +38 -20
- package/dist/actions/action_rpc.d.ts +25 -6
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +56 -48
- package/dist/actions/action_types.d.ts +31 -13
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/action_types.js +1 -1
- package/dist/actions/notification_sender.d.ts +83 -0
- package/dist/actions/notification_sender.d.ts.map +1 -0
- package/dist/actions/notification_sender.js +85 -0
- package/dist/actions/perform_action.d.ts +13 -4
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +27 -18
- package/dist/actions/register_action_ws.d.ts +20 -2
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +17 -5
- package/dist/actions/ws_socket_session.d.ts +3 -0
- package/dist/actions/ws_socket_session.d.ts.map +1 -1
- package/dist/actions/ws_socket_session.js +3 -2
- package/dist/auth/CLAUDE.md +84 -59
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +30 -3
- package/dist/auth/account_queries.d.ts +213 -2
- package/dist/auth/account_queries.d.ts.map +1 -1
- package/dist/auth/account_queries.js +255 -2
- package/dist/auth/account_route_schema.d.ts +26 -16
- package/dist/auth/account_route_schema.d.ts.map +1 -1
- package/dist/auth/account_route_schema.js +10 -24
- package/dist/auth/account_routes.d.ts +5 -7
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +110 -89
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +117 -25
- package/dist/auth/api_token_queries.d.ts +29 -12
- package/dist/auth/api_token_queries.d.ts.map +1 -1
- package/dist/auth/api_token_queries.js +42 -27
- package/dist/auth/audit_log_route_schema.d.ts +1 -1
- package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.d.ts +1 -1
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +10 -12
- package/dist/auth/audit_log_schema.js +4 -4
- package/dist/auth/bearer_auth.d.ts +4 -3
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bearer_auth.js +37 -32
- package/dist/auth/bootstrap_account.d.ts +65 -37
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +115 -66
- package/dist/auth/bootstrap_route_schema.d.ts +6 -2
- package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
- package/dist/auth/bootstrap_route_schema.js +7 -2
- package/dist/auth/bootstrap_routes.d.ts +50 -33
- package/dist/auth/bootstrap_routes.d.ts.map +1 -1
- package/dist/auth/bootstrap_routes.js +109 -87
- package/dist/auth/bootstrap_token_store.d.ts +60 -0
- package/dist/auth/bootstrap_token_store.d.ts.map +1 -0
- package/dist/auth/bootstrap_token_store.js +39 -0
- package/dist/auth/credential_headers.d.ts +71 -0
- package/dist/auth/credential_headers.d.ts.map +1 -0
- package/dist/auth/credential_headers.js +100 -0
- package/dist/auth/daemon_token.d.ts +13 -1
- package/dist/auth/daemon_token.d.ts.map +1 -1
- package/dist/auth/daemon_token.js +14 -2
- package/dist/auth/daemon_token_middleware.d.ts +10 -11
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +39 -30
- package/dist/auth/deps.d.ts +10 -11
- package/dist/auth/deps.d.ts.map +1 -1
- package/dist/auth/invite_queries.d.ts +18 -0
- package/dist/auth/invite_queries.d.ts.map +1 -1
- package/dist/auth/invite_queries.js +24 -0
- package/dist/auth/request_context.d.ts +97 -76
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +93 -104
- package/dist/auth/resolved_auth.d.ts +10 -5
- package/dist/auth/resolved_auth.d.ts.map +1 -1
- package/dist/auth/resolved_auth.js +2 -2
- package/dist/auth/role_grant_offer_action_specs.d.ts +2 -2
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +5 -3
- package/dist/auth/role_grant_offer_actions.d.ts +7 -11
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +97 -106
- package/dist/auth/role_grant_offer_ddl.d.ts +7 -1
- package/dist/auth/role_grant_offer_ddl.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_ddl.js +9 -2
- package/dist/auth/role_grant_offer_notifications.d.ts +87 -38
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +75 -22
- package/dist/auth/role_grant_offer_queries.d.ts +143 -9
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_queries.js +266 -66
- package/dist/auth/role_grant_offer_schema.js +1 -1
- package/dist/auth/role_grant_queries.d.ts +57 -10
- package/dist/auth/role_grant_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_queries.js +81 -22
- package/dist/auth/role_grant_sql.d.ts +21 -0
- package/dist/auth/role_grant_sql.d.ts.map +1 -1
- package/dist/auth/role_grant_sql.js +21 -0
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +9 -2
- package/dist/auth/session_cookie.d.ts +105 -25
- package/dist/auth/session_cookie.d.ts.map +1 -1
- package/dist/auth/session_cookie.js +124 -15
- package/dist/auth/session_middleware.d.ts +83 -54
- package/dist/auth/session_middleware.d.ts.map +1 -1
- package/dist/auth/session_middleware.js +92 -66
- package/dist/auth/session_queries.d.ts +95 -14
- package/dist/auth/session_queries.d.ts.map +1 -1
- package/dist/auth/session_queries.js +98 -19
- package/dist/auth/signup_route_schema.d.ts +5 -5
- package/dist/auth/signup_route_schema.d.ts.map +1 -1
- package/dist/auth/signup_route_schema.js +4 -4
- package/dist/auth/signup_routes.d.ts.map +1 -1
- package/dist/auth/signup_routes.js +17 -14
- package/dist/auth/standard_rpc_actions.d.ts +6 -19
- package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
- package/dist/auth/standard_rpc_actions.js +5 -6
- package/dist/auth/token_scope.d.ts +6 -8
- package/dist/auth/token_scope.d.ts.map +1 -1
- package/dist/auth/token_scope.js +6 -9
- package/dist/dev/setup.d.ts +6 -1
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +42 -34
- package/dist/hono_context.d.ts +21 -0
- package/dist/hono_context.d.ts.map +1 -1
- package/dist/hono_context.js +17 -0
- package/dist/http/CLAUDE.md +156 -48
- package/dist/http/auth_shape.d.ts +4 -4
- package/dist/http/common_routes.js +1 -1
- package/dist/http/db_routes.d.ts +4 -3
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +14 -14
- package/dist/http/dev_route_error_check.d.ts +6 -3
- package/dist/http/dev_route_error_check.d.ts.map +1 -1
- package/dist/http/dev_route_error_check.js +6 -3
- package/dist/http/dev_set_cookie_check.d.ts +53 -0
- package/dist/http/dev_set_cookie_check.d.ts.map +1 -0
- package/dist/http/dev_set_cookie_check.js +80 -0
- package/dist/http/error_schemas.d.ts +45 -22
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +53 -26
- package/dist/http/header_lines.d.ts +42 -0
- package/dist/http/header_lines.d.ts.map +1 -0
- package/dist/http/header_lines.js +80 -0
- package/dist/http/host.d.ts +12 -9
- package/dist/http/host.d.ts.map +1 -1
- package/dist/http/host.js +25 -20
- package/dist/http/origin.d.ts +7 -22
- package/dist/http/origin.d.ts.map +1 -1
- package/dist/http/origin.js +11 -25
- package/dist/http/proxy.d.ts +1 -0
- package/dist/http/proxy.d.ts.map +1 -1
- package/dist/http/proxy.js +3 -0
- package/dist/http/request_headers.d.ts +95 -0
- package/dist/http/request_headers.d.ts.map +1 -0
- package/dist/http/request_headers.js +110 -0
- package/dist/http/request_target.d.ts +134 -0
- package/dist/http/request_target.d.ts.map +1 -0
- package/dist/http/request_target.js +193 -0
- package/dist/http/route_error_check.d.ts +4 -11
- package/dist/http/route_error_check.d.ts.map +1 -1
- package/dist/http/route_error_check.js +4 -21
- package/dist/http/route_result.d.ts +127 -23
- package/dist/http/route_result.d.ts.map +1 -1
- package/dist/http/route_result.js +97 -19
- package/dist/http/route_spec.d.ts +299 -83
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +548 -71
- package/dist/http/simple_request.d.ts +19 -14
- package/dist/http/simple_request.d.ts.map +1 -1
- package/dist/http/simple_request.js +17 -29
- package/dist/http/surface.d.ts +2 -0
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +4 -1
- package/dist/realtime/outbound_budget.d.ts +1 -2
- package/dist/realtime/outbound_budget.d.ts.map +1 -1
- package/dist/realtime/outbound_budget.js +1 -2
- package/dist/realtime/sse.d.ts +47 -17
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +115 -93
- package/dist/realtime/sse_constants.d.ts +7 -1
- package/dist/realtime/sse_constants.d.ts.map +1 -1
- package/dist/realtime/sse_constants.js +12 -1
- package/dist/realtime/sse_registry.d.ts +3 -3
- package/dist/realtime/sse_registry.js +3 -3
- package/dist/runtime/deps.d.ts +20 -4
- package/dist/runtime/deps.d.ts.map +1 -1
- package/dist/runtime/mock.d.ts +7 -1
- package/dist/runtime/mock.d.ts.map +1 -1
- package/dist/runtime/mock.js +33 -3
- package/dist/runtime/node.d.ts.map +1 -1
- package/dist/runtime/node.js +2 -1
- package/dist/runtime/secure_file.d.ts +71 -10
- package/dist/runtime/secure_file.d.ts.map +1 -1
- package/dist/runtime/secure_file.js +91 -11
- package/dist/server/app_backend.d.ts +0 -8
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +4 -4
- package/dist/server/app_server.d.ts +54 -33
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +69 -41
- package/dist/server/serve_fact_route.d.ts +3 -3
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +59 -55
- package/dist/server/static.d.ts +20 -0
- package/dist/server/static.d.ts.map +1 -1
- package/dist/server/static.js +56 -8
- package/dist/server/unmatched_route.d.ts +42 -0
- package/dist/server/unmatched_route.d.ts.map +1 -0
- package/dist/server/unmatched_route.js +64 -0
- package/dist/testing/CLAUDE.md +406 -1202
- package/dist/testing/app_server.d.ts +3 -1
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +5 -9
- package/dist/testing/auth_apps.d.ts.map +1 -1
- package/dist/testing/auth_apps.js +3 -2
- package/dist/testing/cross_backend/account_lifecycle.d.ts +11 -4
- package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
- package/dist/testing/cross_backend/account_lifecycle.js +320 -6
- package/dist/testing/cross_backend/build_test_backend_paths.d.ts +4 -1
- package/dist/testing/cross_backend/build_test_backend_paths.d.ts.map +1 -1
- package/dist/testing/cross_backend/build_test_backend_paths.js +1 -1
- package/dist/testing/cross_backend/capabilities.d.ts +68 -5
- package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
- package/dist/testing/cross_backend/capabilities.js +20 -4
- package/dist/testing/cross_backend/cell_gated_create.js +1 -1
- package/dist/testing/cross_backend/conformance_case.d.ts +63 -21
- package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.d.ts +54 -12
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +179 -23
- package/dist/testing/cross_backend/cookie_attributes.js +1 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts +7 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.js +3 -3
- package/dist/testing/cross_backend/credential_conformance.d.ts +196 -0
- package/dist/testing/cross_backend/credential_conformance.d.ts.map +1 -0
- package/dist/testing/cross_backend/credential_conformance.js +296 -0
- package/dist/testing/cross_backend/credential_conformance.json +1284 -0
- package/dist/testing/cross_backend/credential_conformance_wire.d.ts +40 -0
- package/dist/testing/cross_backend/credential_conformance_wire.d.ts.map +1 -0
- package/dist/testing/cross_backend/credential_conformance_wire.js +293 -0
- package/dist/testing/cross_backend/credential_header_robustness.d.ts +1 -3
- package/dist/testing/cross_backend/credential_header_robustness.d.ts.map +1 -1
- package/dist/testing/cross_backend/credential_header_robustness.js +24 -55
- package/dist/testing/cross_backend/credential_wire.d.ts +112 -0
- package/dist/testing/cross_backend/credential_wire.d.ts.map +1 -0
- package/dist/testing/cross_backend/credential_wire.js +188 -0
- package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_backend_configs.js +22 -2
- package/dist/testing/cross_backend/default_spine_surface.d.ts +1 -26
- package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_spine_surface.js +3 -7
- package/dist/testing/cross_backend/differential.d.ts +1 -1
- package/dist/testing/cross_backend/differential.d.ts.map +1 -1
- package/dist/testing/cross_backend/differential.js +3 -2
- package/dist/testing/cross_backend/differential_normalize.d.ts +23 -6
- package/dist/testing/cross_backend/differential_normalize.d.ts.map +1 -1
- package/dist/testing/cross_backend/differential_normalize.js +11 -5
- package/dist/testing/cross_backend/full_spine_mount.d.ts +4 -10
- package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
- package/dist/testing/cross_backend/full_spine_mount.js +11 -4
- package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/identity_parity.js +4 -0
- package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/in_process_setup.js +78 -4
- package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
- package/dist/testing/cross_backend/login_security.js +13 -10
- package/dist/testing/cross_backend/peer_ping_ws.d.ts +1 -1
- package/dist/testing/cross_backend/peer_ping_ws.js +2 -2
- package/dist/testing/cross_backend/request_header_conformance.d.ts +174 -0
- package/dist/testing/cross_backend/request_header_conformance.d.ts.map +1 -0
- package/dist/testing/cross_backend/request_header_conformance.js +196 -0
- package/dist/testing/cross_backend/request_header_conformance.json +1158 -0
- package/dist/testing/cross_backend/request_header_conformance_wire.d.ts +39 -0
- package/dist/testing/cross_backend/request_header_conformance_wire.d.ts.map +1 -0
- package/dist/testing/cross_backend/request_header_conformance_wire.js +284 -0
- package/dist/testing/cross_backend/request_target_conformance.d.ts +298 -0
- package/dist/testing/cross_backend/request_target_conformance.d.ts.map +1 -0
- package/dist/testing/cross_backend/request_target_conformance.js +186 -0
- package/dist/testing/cross_backend/request_target_conformance.json +3765 -0
- package/dist/testing/cross_backend/request_target_conformance_wire.d.ts +32 -0
- package/dist/testing/cross_backend/request_target_conformance_wire.d.ts.map +1 -0
- package/dist/testing/cross_backend/request_target_conformance_wire.js +278 -0
- package/dist/testing/cross_backend/role_grant_offer_lifecycle.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_lifecycle.js +173 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts +5 -4
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.js +185 -31
- package/dist/testing/cross_backend/rpc_adversarial.d.ts +6 -4
- package/dist/testing/cross_backend/rpc_adversarial.d.ts.map +1 -1
- package/dist/testing/cross_backend/rpc_adversarial.js +5 -2
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +6 -7
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_consumer_surface.js +4 -5
- package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/session_cap.js +82 -34
- package/dist/testing/cross_backend/session_cookie_effect.d.ts +43 -0
- package/dist/testing/cross_backend/session_cookie_effect.d.ts.map +1 -0
- package/dist/testing/cross_backend/session_cookie_effect.js +103 -0
- package/dist/testing/cross_backend/session_login.d.ts +24 -0
- package/dist/testing/cross_backend/session_login.d.ts.map +1 -0
- package/dist/testing/cross_backend/session_login.js +31 -0
- package/dist/testing/cross_backend/setup.d.ts +117 -0
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +193 -9
- package/dist/testing/cross_backend/simple_request.d.ts.map +1 -1
- package/dist/testing/cross_backend/simple_request.js +5 -0
- package/dist/testing/cross_backend/spine_suites.d.ts +9 -1
- package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_suites.js +88 -5
- package/dist/testing/cross_backend/spine_surface_constants.d.ts +1 -1
- package/dist/testing/cross_backend/spine_surface_constants.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_surface_constants.js +1 -0
- package/dist/testing/cross_backend/sse_round_trip.d.ts +8 -5
- package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/sse_round_trip.js +205 -64
- package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_backdoor.js +5 -2
- package/dist/testing/cross_backend/testing_credential_read.d.ts +165 -0
- package/dist/testing/cross_backend/testing_credential_read.d.ts.map +1 -0
- package/dist/testing/cross_backend/testing_credential_read.js +175 -0
- package/dist/testing/cross_backend/testing_reset_actions.d.ts +19 -0
- package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.js +22 -6
- package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
- package/dist/testing/cross_backend/token_lifetime.js +58 -2
- package/dist/testing/cross_backend/transport_composition.d.ts +2 -4
- package/dist/testing/cross_backend/transport_composition.d.ts.map +1 -1
- package/dist/testing/cross_backend/transport_composition.js +13 -10
- package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/ts_spine_backend_config.js +5 -3
- package/dist/testing/cross_backend/ws_endpoint.d.ts +11 -1
- package/dist/testing/cross_backend/ws_endpoint.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_endpoint.js +19 -2
- package/dist/testing/cross_backend/ws_role_gated.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_role_gated.js +2 -3
- package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +28 -12
- package/dist/testing/cross_backend/xfail.d.ts +44 -11
- package/dist/testing/cross_backend/xfail.d.ts.map +1 -1
- package/dist/testing/cross_backend/xfail.js +68 -23
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +4 -3
- package/dist/testing/integration.d.ts +1 -2
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +14 -8
- package/dist/testing/integration_helpers.d.ts +50 -3
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +87 -9
- package/dist/testing/middleware.d.ts +3 -1
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +14 -7
- package/dist/testing/resolved_auth.d.ts +3 -1
- package/dist/testing/resolved_auth.d.ts.map +1 -1
- package/dist/testing/resolved_auth.js +4 -4
- package/dist/testing/round_trip.d.ts +6 -2
- package/dist/testing/round_trip.d.ts.map +1 -1
- package/dist/testing/round_trip.js +17 -6
- package/dist/testing/rpc_envelope_cases.d.ts.map +1 -1
- package/dist/testing/rpc_envelope_cases.js +7 -0
- package/dist/testing/rpc_helpers.d.ts +4 -2
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +6 -1
- package/dist/testing/rpc_round_trip.d.ts +13 -2
- package/dist/testing/rpc_round_trip.d.ts.map +1 -1
- package/dist/testing/rpc_round_trip.js +25 -6
- package/dist/testing/schema_generators.d.ts +2 -2
- package/dist/testing/schema_generators.d.ts.map +1 -1
- package/dist/testing/schema_generators.js +4 -4
- package/dist/testing/stubs.d.ts +2 -2
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +13 -10
- package/dist/testing/transports/fetch_transport.d.ts +6 -3
- package/dist/testing/transports/fetch_transport.d.ts.map +1 -1
- package/dist/testing/transports/fetch_transport.js +31 -19
- package/dist/testing/transports/raw_http.d.ts +61 -1
- package/dist/testing/transports/raw_http.d.ts.map +1 -1
- package/dist/testing/transports/raw_http.js +61 -1
- package/dist/testing/transports/ws_raw_client.d.ts +20 -0
- package/dist/testing/transports/ws_raw_client.d.ts.map +1 -1
- package/dist/testing/transports/ws_raw_client.js +10 -4
- package/dist/testing/transports/ws_transport.d.ts +21 -1
- package/dist/testing/transports/ws_transport.d.ts.map +1 -1
- package/dist/testing/transports/ws_transport.js +58 -20
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +8 -4
- package/package.json +1 -1
|
@@ -44,13 +44,12 @@
|
|
|
44
44
|
* transaction, a failure row on the pool). `audit.notify` (SSE/WS broadcast)
|
|
45
45
|
* fires post-commit in both paths.
|
|
46
46
|
*
|
|
47
|
-
* WS notifications
|
|
48
|
-
* `notification_sender`
|
|
47
|
+
* WS notifications go through the handler context's sender
|
|
48
|
+
* (`ctx.notification_sender`), queued post-commit (`queue_offer_notification`,
|
|
49
|
+
* `queue_supersede_notifications`): offer lifecycle transitions notify the
|
|
49
50
|
* counterparty, `role_grant_revoke` notifies the revokee (`role_grant_revoked`)
|
|
50
|
-
* plus each superseded
|
|
51
|
-
*
|
|
52
|
-
* against its spec's schema before it is sent, a mismatch logged
|
|
53
|
-
* (`create_validated_notification_sender`). `role_grant_revoke` of a global
|
|
51
|
+
* plus both parties of each superseded pending offer, and an accept each
|
|
52
|
+
* superseded sibling's grantor. `role_grant_revoke` of a global
|
|
54
53
|
* grant also closes the revokee's connections gated on the role through
|
|
55
54
|
* `deps.connection_closer`, after the commit.
|
|
56
55
|
*
|
|
@@ -63,12 +62,12 @@ import { queue_connection_close } from '../actions/connection_closer.js';
|
|
|
63
62
|
import { builtin_role_specs, is_builtin_role, ROLE_ADMIN, ROLE_KEEPER, role_has_grant_path } from './role_schema.js';
|
|
64
63
|
import { GRANT_PATH_ADMIN } from './grant_path_schema.js';
|
|
65
64
|
import { ROLE_GRANT_OFFER_DEFAULT_TTL_MS, to_role_grant_offer_json } from './role_grant_offer_schema.js';
|
|
66
|
-
import { query_role_grant_offer_create, query_role_grant_offer_decline, query_role_grant_offer_retract, query_role_grant_offer_list, query_role_grant_offer_history_for_account, query_accept_offer, RoleGrantOfferActorAccountMismatchError, RoleGrantOfferActorMismatchError, RoleGrantOfferAlreadyTerminalError, RoleGrantOfferBuiltinRefusedError, RoleGrantOfferExpiredError, RoleGrantOfferNotFoundError, RoleGrantOfferSelfTargetError, query_role_grant_offer_supersede_outgoing } from './role_grant_offer_queries.js';
|
|
67
|
-
import { query_account_has_active_global_role, query_account_has_global_role,
|
|
68
|
-
import {
|
|
65
|
+
import { query_role_grant_offer_create, query_role_grant_offer_decline, query_role_grant_offer_retract, query_role_grant_offer_list, query_role_grant_offer_history_for_account, query_accept_offer, RoleGrantOfferActorAccountMismatchError, RoleGrantOfferActorMismatchError, RoleGrantOfferGrantorNotActiveError, RoleGrantOfferRecipientNotActiveError, RoleGrantOfferAlreadyTerminalError, RoleGrantOfferBuiltinRefusedError, RoleGrantOfferExpiredError, RoleGrantOfferNotFoundError, RoleGrantOfferSelfTargetError, query_role_grant_offer_lock_for_revoke, query_role_grant_offer_supersede_outgoing } from './role_grant_offer_queries.js';
|
|
66
|
+
import { query_account_has_active_global_role, query_account_has_global_role, query_count_active_accounts_with_global_role_locked, query_create_role_grant, query_role_grant_find_active_role_for_actor, query_revoke_role_grant } from './role_grant_queries.js';
|
|
67
|
+
import { query_account_lock_for_revoke, query_active_actors_by_account } from './account_queries.js';
|
|
69
68
|
import { has_scoped_role } from './request_context.js';
|
|
70
|
-
import { build_role_grant_offer_accepted_notification, build_role_grant_offer_declined_notification, build_role_grant_offer_received_notification, build_role_grant_offer_retracted_notification,
|
|
71
|
-
import { ERROR_INSUFFICIENT_PERMISSIONS, ERROR_ROLE_GRANT_NOT_FOUND, ERROR_ROLE_NOT_WEB_GRANTABLE } from '../http/error_schemas.js';
|
|
69
|
+
import { build_role_grant_offer_accepted_notification, build_role_grant_offer_declined_notification, build_role_grant_offer_received_notification, build_role_grant_offer_retracted_notification, build_role_grant_revoked_notification, queue_offer_notification, queue_supersede_notifications } from './role_grant_offer_notifications.js';
|
|
70
|
+
import { ERROR_AUTHENTICATION_REQUIRED, ERROR_INSUFFICIENT_PERMISSIONS, ERROR_ROLE_GRANT_NOT_FOUND, ERROR_ROLE_NOT_WEB_GRANTABLE } from '../http/error_schemas.js';
|
|
72
71
|
import { ERROR_CANNOT_REVOKE_KEEPER_ADMIN, ERROR_CANNOT_REVOKE_LAST_ADMIN, ERROR_ROLE_GRANT_BUILTIN_SCOPED, ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH, ERROR_ROLE_GRANT_OFFER_ACTOR_MISMATCH, ERROR_ROLE_GRANT_OFFER_EXPIRED, ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED, ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_ROLE_NOT_GRANTABLE, ERROR_ROLE_GRANT_OFFER_SELF_TARGET, ERROR_ROLE_GRANT_OFFER_TERMINAL, role_grant_offer_create_action_spec, role_grant_offer_accept_action_spec, role_grant_offer_decline_action_spec, role_grant_offer_retract_action_spec, role_grant_offer_list_action_spec, role_grant_offer_history_action_spec, role_grant_revoke_action_spec, role_grant_assign_action_spec } from './role_grant_offer_action_specs.js';
|
|
73
72
|
// -- Helpers ----------------------------------------------------------------
|
|
74
73
|
/**
|
|
@@ -109,17 +108,12 @@ const default_authorize = async (auth, _input, _deps, _ctx) => {
|
|
|
109
108
|
* Create the role-grant-offer RPC actions: the offer-lifecycle methods plus
|
|
110
109
|
* `role_grant_revoke` and the immediate `role_grant_assign`.
|
|
111
110
|
*
|
|
112
|
-
* @param deps - `RevokingActionFactoryDeps
|
|
111
|
+
* @param deps - `RevokingActionFactoryDeps`: `log`, `audit`, and the `connection_closer` a revoked global grant closes the revokee's role-gated connections through. WS notifications go through the handler context's `notification_sender`, not a dep
|
|
113
112
|
* @param options - role registry, default TTL, authorization override
|
|
114
113
|
* @returns the `RpcAction` array to spread into a `create_rpc_endpoint` call
|
|
115
114
|
*/
|
|
116
115
|
export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
117
116
|
const { log, audit, connection_closer } = deps;
|
|
118
|
-
// under DEV each notification sent is checked against its spec's params
|
|
119
|
-
// schema, a mismatch logged, as DEV output validation does
|
|
120
|
-
const notification_sender = deps.notification_sender
|
|
121
|
-
? create_validated_notification_sender(deps.notification_sender, log)
|
|
122
|
-
: null;
|
|
123
117
|
const role_specs = options.roles?.role_specs ?? builtin_role_specs;
|
|
124
118
|
const default_ttl_ms = options.default_ttl_ms ?? ROLE_GRANT_OFFER_DEFAULT_TTL_MS;
|
|
125
119
|
const authorize = options.authorize ?? default_authorize;
|
|
@@ -181,6 +175,26 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
181
175
|
});
|
|
182
176
|
return error;
|
|
183
177
|
};
|
|
178
|
+
// The refusal for a recipient that is missing or soft-deleted: an actor
|
|
179
|
+
// named that is no active actor of the account is the mismatch, else the
|
|
180
|
+
// account is not found. Offer-create and assign answer a deleted recipient
|
|
181
|
+
// exactly as a missing one, so the call says nothing a missing id wouldn't.
|
|
182
|
+
const recipient_not_found_error = (to_actor_id) => to_actor_id != null
|
|
183
|
+
? jsonrpc_errors.invalid_params('to_actor_id does not belong to to_account_id', {
|
|
184
|
+
reason: ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH
|
|
185
|
+
})
|
|
186
|
+
: jsonrpc_errors.not_found('account');
|
|
187
|
+
// The recipient's active actors, refusing a recipient that can't receive a
|
|
188
|
+
// role: a missing or soft-deleted account (no active actor), or a named
|
|
189
|
+
// actor that is not one of them. Runs after every authority gate, so a
|
|
190
|
+
// caller refused the conferral learns nothing of the recipient.
|
|
191
|
+
const require_active_recipient = async (ctx, to_account_id, to_actor_id) => {
|
|
192
|
+
const actors = await query_active_actors_by_account(ctx, to_account_id);
|
|
193
|
+
if (to_actor_id != null ? !actors.some((a) => a.id === to_actor_id) : actors.length === 0) {
|
|
194
|
+
throw recipient_not_found_error(to_actor_id);
|
|
195
|
+
}
|
|
196
|
+
return actors;
|
|
197
|
+
};
|
|
184
198
|
// Returns {offer} only — no auto-accept. Recipient must call
|
|
185
199
|
// role_grant_offer_accept; admin tests drive the full consent flow over
|
|
186
200
|
// RPC (see testing/admin_integration.ts `offer_and_accept`), or seed
|
|
@@ -224,6 +238,8 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
224
238
|
reason: ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED
|
|
225
239
|
});
|
|
226
240
|
}
|
|
241
|
+
// Both parties' rules live in the query, after every authority gate above,
|
|
242
|
+
// so a caller refused the conferral learns nothing of the recipient.
|
|
227
243
|
let offer;
|
|
228
244
|
try {
|
|
229
245
|
offer = await query_role_grant_offer_create(ctx, {
|
|
@@ -244,10 +260,19 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
244
260
|
reason: ERROR_ROLE_GRANT_OFFER_SELF_TARGET
|
|
245
261
|
});
|
|
246
262
|
}
|
|
247
|
-
if (err instanceof RoleGrantOfferActorAccountMismatchError
|
|
263
|
+
if (err instanceof RoleGrantOfferActorAccountMismatchError ||
|
|
264
|
+
err instanceof RoleGrantOfferRecipientNotActiveError) {
|
|
248
265
|
await emit_create_failure_audit(ctx, auth, input);
|
|
249
|
-
|
|
250
|
-
|
|
266
|
+
// a named actor is the mismatch, else the account is not found —
|
|
267
|
+
// the answers `role_grant_assign` gives the same recipient
|
|
268
|
+
throw recipient_not_found_error(input.to_actor_id);
|
|
269
|
+
}
|
|
270
|
+
// The caller's own account was deleted while the request was in flight:
|
|
271
|
+
// refused as the dead credential it now is, as `account_token_create`
|
|
272
|
+
// refuses it, with no audit row from an account that is gone.
|
|
273
|
+
if (err instanceof RoleGrantOfferGrantorNotActiveError) {
|
|
274
|
+
throw jsonrpc_errors.unauthenticated('unauthenticated', {
|
|
275
|
+
reason: ERROR_AUTHENTICATION_REQUIRED
|
|
251
276
|
});
|
|
252
277
|
}
|
|
253
278
|
throw err;
|
|
@@ -268,11 +293,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
268
293
|
}
|
|
269
294
|
});
|
|
270
295
|
const offer_json = to_role_grant_offer_json(offer);
|
|
271
|
-
|
|
272
|
-
emit_after_commit(ctx, () => {
|
|
273
|
-
notification_sender.send_to_account(offer.to_account_id, build_role_grant_offer_received_notification({ offer: offer_json }));
|
|
274
|
-
});
|
|
275
|
-
}
|
|
296
|
+
queue_offer_notification(ctx, offer.to_account_id, build_role_grant_offer_received_notification({ offer: offer_json }));
|
|
276
297
|
return { offer: offer_json };
|
|
277
298
|
};
|
|
278
299
|
const accept_handler = async (input, ctx) => {
|
|
@@ -304,47 +325,36 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
304
325
|
if (err instanceof RoleGrantOfferBuiltinRefusedError) {
|
|
305
326
|
throw await refuse_builtin_accept(ctx, auth, err);
|
|
306
327
|
}
|
|
328
|
+
// The caller's own account was deleted while the request was in flight:
|
|
329
|
+
// refused as the dead credential it now is, as offer-create refuses a
|
|
330
|
+
// grantor deleted in flight, with no audit row from an account that is gone.
|
|
331
|
+
if (err instanceof RoleGrantOfferRecipientNotActiveError) {
|
|
332
|
+
throw jsonrpc_errors.unauthenticated('unauthenticated', {
|
|
333
|
+
reason: ERROR_AUTHENTICATION_REQUIRED
|
|
334
|
+
});
|
|
335
|
+
}
|
|
307
336
|
throw err;
|
|
308
337
|
}
|
|
309
|
-
// Look up the grantor's account_id inside the transaction so the
|
|
310
|
-
// post-commit notification has a valid target. One cheap SELECT by
|
|
311
|
-
// PK — the alternative (widening `query_accept_offer` again) would
|
|
312
|
-
// bleed transport concerns into the query layer. A replay
|
|
313
|
-
// (`created: false`) notifies nothing, so it skips the lookup.
|
|
314
|
-
const grantor_actor = notification_sender && result.created
|
|
315
|
-
? await query_actor_by_id(ctx, result.offer.from_actor_id)
|
|
316
|
-
: null;
|
|
317
|
-
const grantor_account_id = grantor_actor?.account_id ?? null;
|
|
318
338
|
const offer_json = to_role_grant_offer_json(result.offer);
|
|
319
|
-
const supersede_payloads = result.superseded_offers.map((sib) => ({
|
|
320
|
-
offer: to_role_grant_offer_json(sib),
|
|
321
|
-
from_account_id: sib.from_account_id
|
|
322
|
-
}));
|
|
323
339
|
// Audit events are written in-transaction by query_accept_offer; wire
|
|
324
340
|
// them through `audit.notify` post-commit so SSE/WS broadcasts fire.
|
|
325
|
-
// WS notifications
|
|
326
|
-
// grantor sees "accepted" and each superseded grantor sees
|
|
327
|
-
// only once the accept has durably committed — and never if
|
|
328
|
-
// back (the dispatch site discards `post_commit_effects` on
|
|
329
|
-
// A replay (or a race loser) wrote nothing — the accept that
|
|
330
|
-
// grant already audited it and notified the grantor — so it
|
|
331
|
-
// nothing; repeating the notification would let any replay send
|
|
332
|
-
// without bound.
|
|
341
|
+
// The WS notifications are queued behind them on the same post-commit
|
|
342
|
+
// queue, so the grantor sees "accepted" and each superseded grantor sees
|
|
343
|
+
// "supersede" only once the accept has durably committed — and never if
|
|
344
|
+
// it rolls back (the dispatch site discards `post_commit_effects` on
|
|
345
|
+
// rollback). A replay (or a race loser) wrote nothing — the accept that
|
|
346
|
+
// minted the grant already audited it and notified the grantor — so it
|
|
347
|
+
// queues nothing; repeating the notification would let any replay send
|
|
348
|
+
// them without bound. Only the siblings' grantors hear the supersede: their
|
|
349
|
+
// recipient is the caller, whose answer lists `superseded_offer_ids`.
|
|
333
350
|
if (result.created) {
|
|
334
351
|
emit_after_commit(ctx, () => {
|
|
335
352
|
fan_out_audit_events(result.audit_events, audit);
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
notification_sender.send_to_account(sib.from_account_id, build_role_grant_offer_supersede_notification({
|
|
342
|
-
offer: sib.offer,
|
|
343
|
-
reason: 'sibling_accepted',
|
|
344
|
-
cause_id: result.offer.id
|
|
345
|
-
}));
|
|
346
|
-
}
|
|
347
|
-
}
|
|
353
|
+
});
|
|
354
|
+
queue_offer_notification(ctx, result.from_account_id, build_role_grant_offer_accepted_notification({ offer: offer_json }));
|
|
355
|
+
queue_supersede_notifications(ctx, result.superseded_offers, 'sibling_accepted', {
|
|
356
|
+
grantor: { kind: 'id', id: result.offer.id },
|
|
357
|
+
recipient: null
|
|
348
358
|
});
|
|
349
359
|
}
|
|
350
360
|
return {
|
|
@@ -385,15 +395,10 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
385
395
|
}
|
|
386
396
|
});
|
|
387
397
|
const offer_json = to_role_grant_offer_json(declined);
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
// in the RETURNING above.
|
|
393
|
-
emit_after_commit(ctx, () => {
|
|
394
|
-
notification_sender.send_to_account(declined.from_account_id, build_role_grant_offer_declined_notification({ offer: offer_json }));
|
|
395
|
-
});
|
|
396
|
-
}
|
|
398
|
+
// Grantor's account_id rides on `declined.from_account_id` from the
|
|
399
|
+
// decline RETURNING — no second SELECT needed. The decline reason rides
|
|
400
|
+
// along on `offer.decline_reason` — the DB set it in the RETURNING above.
|
|
401
|
+
queue_offer_notification(ctx, declined.from_account_id, build_role_grant_offer_declined_notification({ offer: offer_json }));
|
|
397
402
|
// the terminal offer, as accept answers its own
|
|
398
403
|
return { offer: offer_json };
|
|
399
404
|
};
|
|
@@ -427,11 +432,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
427
432
|
}
|
|
428
433
|
});
|
|
429
434
|
const offer_json = to_role_grant_offer_json(retracted);
|
|
430
|
-
|
|
431
|
-
emit_after_commit(ctx, () => {
|
|
432
|
-
notification_sender.send_to_account(retracted.to_account_id, build_role_grant_offer_retracted_notification({ offer: offer_json }));
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
+
queue_offer_notification(ctx, retracted.to_account_id, build_role_grant_offer_retracted_notification({ offer: offer_json }));
|
|
435
436
|
// the terminal offer, as accept answers its own
|
|
436
437
|
return { offer: offer_json };
|
|
437
438
|
};
|
|
@@ -504,13 +505,20 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
504
505
|
});
|
|
505
506
|
}
|
|
506
507
|
if ((await query_account_has_active_global_role(ctx, target_account_id, ROLE_ADMIN)) &&
|
|
507
|
-
(await
|
|
508
|
+
(await query_count_active_accounts_with_global_role_locked(ctx, ROLE_ADMIN, input.role_grant_id)) === 0) {
|
|
508
509
|
await emit_revoke_failure();
|
|
509
510
|
throw jsonrpc_errors.forbidden("cannot revoke the last admin's admin grant", {
|
|
510
511
|
reason: ERROR_CANNOT_REVOKE_LAST_ADMIN
|
|
511
512
|
});
|
|
512
513
|
}
|
|
513
514
|
}
|
|
515
|
+
// The revokee's account row, then every offer the revoke supersedes — the
|
|
516
|
+
// revokee's incoming siblings and its outgoing offers — in one statement in
|
|
517
|
+
// id order, before the grant is touched (`query_account_lock_for_revoke`
|
|
518
|
+
// and `query_role_grant_offer_lock_for_revoke` have why). After the guard,
|
|
519
|
+
// which holds an admin revokee's row already.
|
|
520
|
+
await query_account_lock_for_revoke(ctx, input.actor_id);
|
|
521
|
+
await query_role_grant_offer_lock_for_revoke(ctx, input.actor_id, role_grant_row.role, role_grant_row.scope_id);
|
|
514
522
|
const result = await query_revoke_role_grant(ctx, input.role_grant_id, input.actor_id, auth.actor.id, input.reason ?? null);
|
|
515
523
|
if (!result) {
|
|
516
524
|
// Raced with another revoker or the role_grant was revoked between
|
|
@@ -563,30 +571,21 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
563
571
|
}
|
|
564
572
|
});
|
|
565
573
|
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
for (const sib of superseded) {
|
|
582
|
-
notification_sender.send_to_account(sib.from_account_id, build_role_grant_offer_supersede_notification({
|
|
583
|
-
offer: sib.offer,
|
|
584
|
-
reason: 'role_grant_revoked',
|
|
585
|
-
cause_id
|
|
586
|
-
}));
|
|
587
|
-
}
|
|
588
|
-
});
|
|
589
|
-
}
|
|
574
|
+
queue_offer_notification(ctx, target_account_id, build_role_grant_revoked_notification({
|
|
575
|
+
role_grant_id: result.id,
|
|
576
|
+
role: result.role,
|
|
577
|
+
scope_kind: result.scope_kind,
|
|
578
|
+
scope_id: result.scope_id,
|
|
579
|
+
reason: input.reason ?? null
|
|
580
|
+
}));
|
|
581
|
+
// Both parties of each superseded offer: the revokee is the recipient of
|
|
582
|
+
// its incoming siblings and the grantor of its outgoing offers, and the
|
|
583
|
+
// other party of each is told as well.
|
|
584
|
+
const revoked_grant = { kind: 'id', id: result.id };
|
|
585
|
+
queue_supersede_notifications(ctx, result.superseded_offers, 'role_grant_revoked', {
|
|
586
|
+
grantor: revoked_grant,
|
|
587
|
+
recipient: revoked_grant
|
|
588
|
+
});
|
|
590
589
|
return { ok: true, revoked: true };
|
|
591
590
|
};
|
|
592
591
|
// The immediate admin-only conferral path — the consent-free sibling of
|
|
@@ -655,22 +654,14 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
|
|
|
655
654
|
// active actor of `to_account_id`; otherwise the account's sole active
|
|
656
655
|
// actor is used (a multi-actor account must name one). A missing /
|
|
657
656
|
// actorless account 404-masks.
|
|
658
|
-
const actors = await
|
|
657
|
+
const actors = await require_active_recipient(ctx, input.to_account_id, input.to_actor_id);
|
|
659
658
|
let target_actor_id;
|
|
660
659
|
if (input.to_actor_id != null) {
|
|
661
|
-
if (!actors.some((a) => a.id === input.to_actor_id)) {
|
|
662
|
-
throw jsonrpc_errors.invalid_params('to_actor_id does not belong to to_account_id', {
|
|
663
|
-
reason: ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH
|
|
664
|
-
});
|
|
665
|
-
}
|
|
666
660
|
target_actor_id = input.to_actor_id;
|
|
667
661
|
}
|
|
668
662
|
else if (actors.length === 1) {
|
|
669
663
|
target_actor_id = actors[0].id;
|
|
670
664
|
}
|
|
671
|
-
else if (actors.length === 0) {
|
|
672
|
-
throw jsonrpc_errors.not_found('account');
|
|
673
|
-
}
|
|
674
665
|
else {
|
|
675
666
|
throw jsonrpc_errors.invalid_params('to_actor_id is required for a multi-actor account');
|
|
676
667
|
}
|
|
@@ -54,7 +54,13 @@ export declare const role_grant_offer_expr: (alias: string) => import("../db/sql
|
|
|
54
54
|
* `DeclinedOffer` shape every offer-superseding cascade returns (the revoke
|
|
55
55
|
* cascades in `auth/role_grant_queries.ts`, decline + accept-supersede in
|
|
56
56
|
* `auth/role_grant_offer_queries.ts`). The CTE must be named `updated` and
|
|
57
|
-
* `RETURNING` the full offer row.
|
|
57
|
+
* `RETURNING` the full offer row, and the tail ends the statement.
|
|
58
|
+
*
|
|
59
|
+
* Ordered oldest first, by `created_at` then `id`: an `UPDATE … RETURNING`
|
|
60
|
+
* comes back in no fixed order, and the callers emit an audit row and a
|
|
61
|
+
* notification per row in the order returned, so without it two runs (or the
|
|
62
|
+
* two spines) write the same cascade in different orders. Twin of the Rust
|
|
63
|
+
* `updated_offer_select`.
|
|
58
64
|
*/
|
|
59
65
|
export declare const ROLE_GRANT_OFFER_WITH_GRANTOR_SELECT: string;
|
|
60
66
|
export declare const ROLE_GRANT_OFFER_SCHEMA = "\nCREATE TABLE IF NOT EXISTS role_grant_offer (\n id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n from_actor_id UUID NOT NULL REFERENCES actor(id) ON DELETE CASCADE,\n to_account_id UUID NOT NULL REFERENCES account(id) ON DELETE CASCADE,\n to_actor_id UUID NULL REFERENCES actor(id) ON DELETE CASCADE,\n role TEXT NOT NULL,\n scope_kind TEXT NULL,\n scope_id UUID NULL,\n message TEXT NULL,\n created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n expires_at TIMESTAMPTZ NOT NULL,\n accepted_at TIMESTAMPTZ NULL,\n declined_at TIMESTAMPTZ NULL,\n decline_reason TEXT NULL,\n retracted_at TIMESTAMPTZ NULL,\n superseded_at TIMESTAMPTZ NULL,\n resulting_role_grant_id UUID NULL REFERENCES role_grant(id) ON DELETE SET NULL,\n CONSTRAINT role_grant_offer_single_terminal CHECK (\n (accepted_at IS NOT NULL)::int\n + (declined_at IS NOT NULL)::int\n + (retracted_at IS NOT NULL)::int\n + (superseded_at IS NOT NULL)::int\n <= 1\n ),\n CONSTRAINT role_grant_offer_role_grant_iff_accepted CHECK (\n (accepted_at IS NOT NULL) = (resulting_role_grant_id IS NOT NULL)\n ),\n CONSTRAINT role_grant_offer_reason_iff_declined CHECK (\n decline_reason IS NULL OR declined_at IS NOT NULL\n ),\n CONSTRAINT role_grant_offer_scope_kind_paired CHECK (\n (scope_kind IS NULL) = (scope_id IS NULL)\n )\n)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role_grant_offer_ddl.d.ts","sourceRoot":"","sources":["../../src/lib/auth/role_grant_offer_ddl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,mHAAmH;AACnH,eAAO,MAAM,oCAAoC,yCAAyC,CAAC;AAE3F;;;;;;GAMG;AACH,eAAO,MAAM,wCAAwC,WAAW,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,4QAkBmB,CAAC;AAEzD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,8DAQhC,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"role_grant_offer_ddl.d.ts","sourceRoot":"","sources":["../../src/lib/auth/role_grant_offer_ddl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,mHAAmH;AACnH,eAAO,MAAM,oCAAoC,yCAAyC,CAAC;AAE3F;;;;;;GAMG;AACH,eAAO,MAAM,wCAAwC,WAAW,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,4QAkBmB,CAAC;AAEzD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,8DAQhC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oCAAoC,QAOnB,CAAC;AAK/B,eAAO,MAAM,uBAAuB,qzCAkClC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qCAAqC,2XAYpB,CAAC;AAE/B,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B,kOAMX,CAAC"}
|
|
@@ -81,11 +81,18 @@ export const role_grant_offer_expr = iso8601_timestamp_expr(ROLE_GRANT_OFFER_COL
|
|
|
81
81
|
* `DeclinedOffer` shape every offer-superseding cascade returns (the revoke
|
|
82
82
|
* cascades in `auth/role_grant_queries.ts`, decline + accept-supersede in
|
|
83
83
|
* `auth/role_grant_offer_queries.ts`). The CTE must be named `updated` and
|
|
84
|
-
* `RETURNING` the full offer row.
|
|
84
|
+
* `RETURNING` the full offer row, and the tail ends the statement.
|
|
85
|
+
*
|
|
86
|
+
* Ordered oldest first, by `created_at` then `id`: an `UPDATE … RETURNING`
|
|
87
|
+
* comes back in no fixed order, and the callers emit an audit row and a
|
|
88
|
+
* notification per row in the order returned, so without it two runs (or the
|
|
89
|
+
* two spines) write the same cascade in different orders. Twin of the Rust
|
|
90
|
+
* `updated_offer_select`.
|
|
85
91
|
*/
|
|
86
92
|
export const ROLE_GRANT_OFFER_WITH_GRANTOR_SELECT = `SELECT ${qualify_columns(ROLE_GRANT_OFFER_COLUMNS, 'u', role_grant_offer_expr('u'))}, grantor.account_id AS from_account_id
|
|
87
93
|
FROM updated u
|
|
88
|
-
JOIN actor grantor ON grantor.id = u.from_actor_id
|
|
94
|
+
JOIN actor grantor ON grantor.id = u.from_actor_id
|
|
95
|
+
ORDER BY u.created_at, u.id`;
|
|
89
96
|
// Frozen v1 body — `expire_audited_at` is added by the appended
|
|
90
97
|
// `role_grant_offer_expire_audited_at` migration (with its partial sweep
|
|
91
98
|
// index), so a fresh bootstrap and an old deployed DB converge on one shape.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Role grant offer WebSocket notification specs, builders, and the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Role grant offer WebSocket notification specs, builders, and the helpers
|
|
3
|
+
* the handlers queue them with (`queue_offer_notification`,
|
|
4
|
+
* `queue_supersede_notifications`).
|
|
5
5
|
*
|
|
6
6
|
* These `RemoteNotificationActionSpec`s cover the consentful-role-grants
|
|
7
7
|
* lifecycle events the server pushes to affected accounts:
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* - `role_grant_offer_retracted` → recipient's sockets when a grantor retracts
|
|
11
11
|
* - `role_grant_offer_accepted` → grantor's sockets when the recipient accepts
|
|
12
12
|
* - `role_grant_offer_declined` → grantor's sockets when the recipient declines
|
|
13
|
-
* - `role_grant_offer_supersede` →
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* - `role_grant_offer_supersede` → each live party to a pending offer a
|
|
14
|
+
* cascade ended — a sibling accept, a revoke, an account removal — but the
|
|
15
|
+
* one the cascade's own answer or socket close already covers
|
|
16
16
|
* - `role_grant_revoked` → revokee's sockets when one of their active
|
|
17
17
|
* role_grants is revoked by the `role_grant_revoke` action (companion to the
|
|
18
18
|
* `role_grant_revoke` audit event)
|
|
@@ -29,10 +29,9 @@
|
|
|
29
29
|
* action set of an RPC list that carries the role_grant_offer actions, so the
|
|
30
30
|
* surface lists them on the WS endpoint as `remote_notification` methods. An
|
|
31
31
|
* inbound frame for one is still answered `method_not_found`, as no handler is
|
|
32
|
-
* registered. Under DEV,
|
|
33
|
-
* `
|
|
34
|
-
* against its spec's `input
|
|
35
|
-
* production sends unchecked.
|
|
32
|
+
* registered. Under DEV, `perform_action` hands every action handler a sender
|
|
33
|
+
* wrapped in `create_validated_notification_sender`, so each params object
|
|
34
|
+
* sent is checked against its spec's `input`; production sends unchecked.
|
|
36
35
|
*
|
|
37
36
|
* @module
|
|
38
37
|
*/
|
|
@@ -42,23 +41,9 @@ import { type Uuid } from '../primitive_schemas.js';
|
|
|
42
41
|
import type { Action } from '../actions/action_types.js';
|
|
43
42
|
import type { EventSpec } from '../realtime/sse.js';
|
|
44
43
|
import type { JsonrpcNotification } from '../http/jsonrpc.js';
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*
|
|
49
|
-
* `ConnectionRegistry` satisfies this interface — its
|
|
50
|
-
* `send_to_account(account_id, message)` signature accepts the broader
|
|
51
|
-
* `JsonrpcMessageFromServerToClient` type, which is contravariantly
|
|
52
|
-
* compatible with `JsonrpcNotification` here. The interface stays local so
|
|
53
|
-
* handlers don't couple to the concrete registry, and tests can inject a
|
|
54
|
-
* capturing stub with no WS machinery.
|
|
55
|
-
*
|
|
56
|
-
* Returns the number of sockets the notification was sent to — callers
|
|
57
|
-
* typically ignore it (used by telemetry / tests).
|
|
58
|
-
*/
|
|
59
|
-
export interface NotificationSender {
|
|
60
|
-
send_to_account: (account_id: Uuid, message: JsonrpcNotification) => number;
|
|
61
|
-
}
|
|
44
|
+
import { type EmitAfterCommitContext } from '../http/pending_effects.js';
|
|
45
|
+
import type { NotificationSender } from '../actions/notification_sender.js';
|
|
46
|
+
import { type SupersededOffer } from './role_grant_offer_schema.js';
|
|
62
47
|
export declare const ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD = "role_grant_offer_received";
|
|
63
48
|
export declare const ROLE_GRANT_OFFER_RETRACTED_NOTIFICATION_METHOD = "role_grant_offer_retracted";
|
|
64
49
|
export declare const ROLE_GRANT_OFFER_ACCEPTED_NOTIFICATION_METHOD = "role_grant_offer_accepted";
|
|
@@ -158,14 +143,17 @@ export declare const RoleGrantOfferDeclinedParams: import("@fuzdev/fuz_schema/sc
|
|
|
158
143
|
}>;
|
|
159
144
|
export type RoleGrantOfferDeclinedParams = Infer<typeof RoleGrantOfferDeclinedParams>;
|
|
160
145
|
/**
|
|
161
|
-
* Params for `role_grant_offer_supersede
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* the
|
|
166
|
-
* the
|
|
167
|
-
*
|
|
168
|
-
*
|
|
146
|
+
* Params for `role_grant_offer_supersede`, sent to a party of a pending offer
|
|
147
|
+
* a cascade ended: a sibling accept (`reason: 'sibling_accepted'`), a revoke of
|
|
148
|
+
* the recipient's grant or of any grant of the grantor's actor
|
|
149
|
+
* (`reason: 'role_grant_revoked'`), or the removal of either party's account
|
|
150
|
+
* (`reason: 'account_deleted'`). `cause_id` points at the accepted offer, the
|
|
151
|
+
* revoked role_grant, or the removed account respectively — the `cause_id` of
|
|
152
|
+
* the offer's `role_grant_offer_supersede` audit row — except on a recipient's
|
|
153
|
+
* frame of its grantor's account removal, where it is the offer's grantor
|
|
154
|
+
* actor (`from_actor_id`), an id the recipient already holds. The audit
|
|
155
|
+
* metadata's reason set is wider: a consumer's scope teardown audits
|
|
156
|
+
* `scope_destroyed`, which no notification carries.
|
|
169
157
|
*/
|
|
170
158
|
export declare const RoleGrantOfferSupersedeParams: import("@fuzdev/fuz_schema/schema.ts").ObjectSchema<{
|
|
171
159
|
offer: import("@fuzdev/fuz_schema/schema.ts").ObjectSchema<{
|
|
@@ -186,7 +174,7 @@ export declare const RoleGrantOfferSupersedeParams: import("@fuzdev/fuz_schema/s
|
|
|
186
174
|
superseded_at: import("@fuzdev/fuz_schema/schema.ts").NullableSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>>;
|
|
187
175
|
resulting_role_grant_id: import("@fuzdev/fuz_schema/schema.ts").NullableSchema<import("@fuzdev/fuz_schema/schema.ts").BrandSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>, "Uuid">>;
|
|
188
176
|
}>;
|
|
189
|
-
reason: import("@fuzdev/fuz_schema/schema.ts").OneOfSchema<readonly ["sibling_accepted", "role_grant_revoked", "
|
|
177
|
+
reason: import("@fuzdev/fuz_schema/schema.ts").OneOfSchema<readonly ["sibling_accepted", "role_grant_revoked", "account_deleted"]>;
|
|
190
178
|
cause_id: import("@fuzdev/fuz_schema/schema.ts").BrandSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>, "Uuid">;
|
|
191
179
|
}>;
|
|
192
180
|
export type RoleGrantOfferSupersedeParams = Infer<typeof RoleGrantOfferSupersedeParams>;
|
|
@@ -351,7 +339,7 @@ export declare const role_grant_offer_supersede_notification_spec: {
|
|
|
351
339
|
superseded_at: import("@fuzdev/fuz_schema/schema.ts").NullableSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>>;
|
|
352
340
|
resulting_role_grant_id: import("@fuzdev/fuz_schema/schema.ts").NullableSchema<import("@fuzdev/fuz_schema/schema.ts").BrandSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>, "Uuid">>;
|
|
353
341
|
}>;
|
|
354
|
-
reason: import("@fuzdev/fuz_schema/schema.ts").OneOfSchema<readonly ["sibling_accepted", "role_grant_revoked", "
|
|
342
|
+
reason: import("@fuzdev/fuz_schema/schema.ts").OneOfSchema<readonly ["sibling_accepted", "role_grant_revoked", "account_deleted"]>;
|
|
355
343
|
cause_id: import("@fuzdev/fuz_schema/schema.ts").BrandSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>, "Uuid">;
|
|
356
344
|
}>;
|
|
357
345
|
output: import("@fuzdev/fuz_schema/schema.ts").VoidSchema;
|
|
@@ -398,7 +386,8 @@ export declare const role_grant_offer_notification_specs: Array<EventSpec>;
|
|
|
398
386
|
* a mismatch logged as an error the way DEV output validation logs one; the
|
|
399
387
|
* notification is sent either way, unchanged. A method that is no
|
|
400
388
|
* role_grant_offer notification passes unchecked. In production the sender is
|
|
401
|
-
* returned as it is.
|
|
389
|
+
* returned as it is. `perform_action` wraps the sender of every handler
|
|
390
|
+
* context, so every send site is checked whichever factory it sits in.
|
|
402
391
|
*
|
|
403
392
|
* @param sender - the sender to wrap
|
|
404
393
|
* @param log - where a mismatch is logged
|
|
@@ -411,4 +400,64 @@ export declare const build_role_grant_offer_accepted_notification: (params: Role
|
|
|
411
400
|
export declare const build_role_grant_offer_declined_notification: (params: RoleGrantOfferDeclinedParams) => JsonrpcNotification;
|
|
412
401
|
export declare const build_role_grant_offer_supersede_notification: (params: RoleGrantOfferSupersedeParams) => JsonrpcNotification;
|
|
413
402
|
export declare const build_role_grant_revoked_notification: (params: RoleGrantRevokedParams) => JsonrpcNotification;
|
|
403
|
+
/**
|
|
404
|
+
* What the queue helpers read of a handler context; `ActionContext` satisfies
|
|
405
|
+
* it.
|
|
406
|
+
*/
|
|
407
|
+
export interface NotificationQueueContext extends EmitAfterCommitContext {
|
|
408
|
+
notification_sender: NotificationSender;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Queue `message` to every socket bound to `account_id`, sent once the
|
|
412
|
+
* handler's transaction commits and dropped when it rolls back, so a
|
|
413
|
+
* notification never announces state that never landed.
|
|
414
|
+
*
|
|
415
|
+
* Twin of the Rust spine's `queue_offer_notification`.
|
|
416
|
+
*
|
|
417
|
+
* @param ctx - the handler context, whose sender the send goes through
|
|
418
|
+
* @param account_id - the recipient account
|
|
419
|
+
* @param message - the notification, from one of the builders above
|
|
420
|
+
*/
|
|
421
|
+
export declare const queue_offer_notification: (ctx: NotificationQueueContext, account_id: Uuid, message: JsonrpcNotification) => void;
|
|
422
|
+
/**
|
|
423
|
+
* The `cause_id` a party of a superseded offer is sent: an id the cascade
|
|
424
|
+
* names (`id` — the accepted offer, the revoked role_grant, the removed
|
|
425
|
+
* account), or the offer's own grantor actor (`from_actor`, an id its
|
|
426
|
+
* recipient already holds). Twin of the Rust `SupersedeCause`.
|
|
427
|
+
*/
|
|
428
|
+
export type SupersedeCause = {
|
|
429
|
+
kind: 'id';
|
|
430
|
+
id: Uuid;
|
|
431
|
+
} | {
|
|
432
|
+
kind: 'from_actor';
|
|
433
|
+
};
|
|
434
|
+
/**
|
|
435
|
+
* Which parties of a superseded offer a cascade tells, and the `cause_id`
|
|
436
|
+
* each is sent; `null` leaves that party out. A party the cascade's own answer
|
|
437
|
+
* covers (the accepting recipient) or whose account it removes (its
|
|
438
|
+
* connections close) is left out by the call site, which knows which side
|
|
439
|
+
* that party is on. A recipient told of its grantor's account removal is sent
|
|
440
|
+
* the grantor's actor, never the account id, which no recipient sees
|
|
441
|
+
* otherwise. Twin of the Rust `SupersedeAudience`.
|
|
442
|
+
*/
|
|
443
|
+
export interface SupersedeAudience {
|
|
444
|
+
grantor: SupersedeCause | null;
|
|
445
|
+
recipient: SupersedeCause | null;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Queue a `role_grant_offer_supersede` notification to the parties of each
|
|
449
|
+
* superseded offer `audience` names, each with its own `cause_id` — the
|
|
450
|
+
* grantor (`from_account_id`, off the cascade's `RETURNING`) and the recipient
|
|
451
|
+
* (`to_account_id`). Sent in the cascade's row order, which is the order of
|
|
452
|
+
* its audit rows, each offer's parties together and its grantor ahead of its
|
|
453
|
+
* recipient — one fixed order, so both spines send a cascade's frames alike.
|
|
454
|
+
*
|
|
455
|
+
* Twin of the Rust spine's `queue_supersede_notifications`.
|
|
456
|
+
*
|
|
457
|
+
* @param ctx - the handler context, whose sender the sends go through
|
|
458
|
+
* @param superseded - the offers the cascade superseded
|
|
459
|
+
* @param reason - why they were superseded
|
|
460
|
+
* @param audience - which party of each offer is told, and the `cause_id` it is sent
|
|
461
|
+
*/
|
|
462
|
+
export declare const queue_supersede_notifications: (ctx: NotificationQueueContext, superseded: ReadonlyArray<SupersededOffer>, reason: RoleGrantOfferSupersedeParams["reason"], audience: SupersedeAudience) => void;
|
|
414
463
|
//# sourceMappingURL=role_grant_offer_notifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role_grant_offer_notifications.d.ts","sourceRoot":"","sources":["../../src/lib/auth/role_grant_offer_notifications.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"role_grant_offer_notifications.d.ts","sourceRoot":"","sources":["../../src/lib/auth/role_grant_offer_notifications.ts"],"names":[],"mappings":"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"}
|