@fuzdev/fuz_app 0.150.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 +324 -299
- package/dist/actions/action_bridge.d.ts +5 -86
- package/dist/actions/action_bridge.d.ts.map +1 -1
- package/dist/actions/action_bridge.js +4 -84
- 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_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 -34
- 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 -298
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +155 -923
- 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 +52 -75
- 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 +70 -44
- 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_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 +5 -5
- package/dist/auth/actor_search_queries.d.ts.map +1 -1
- package/dist/auth/actor_search_queries.js +7 -7
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +3 -1
- 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 +12 -42
- package/dist/auth/all_cell_actions.d.ts +6 -4
- package/dist/auth/all_cell_actions.d.ts.map +1 -1
- package/dist/auth/all_cell_actions.js +1 -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 +3 -3
- package/dist/auth/audit_emitter.js +2 -2
- 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 +13 -21
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +10 -18
- 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/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_actions.d.ts +22 -13
- package/dist/auth/cell_actions.d.ts.map +1 -1
- package/dist/auth/cell_actions.js +105 -167
- 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_metadata.d.ts +1 -1
- package/dist/auth/cell_audit_metadata.js +1 -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 +2 -2
- package/dist/auth/cell_grant_action_specs.js +3 -3
- package/dist/auth/cell_grant_actions.d.ts +73 -11
- package/dist/auth/cell_grant_actions.d.ts.map +1 -1
- package/dist/auth/cell_grant_actions.js +63 -55
- 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 +5 -5
- package/dist/auth/credential_type_schema.js +5 -5
- 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 +99 -14
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +26 -13
- package/dist/auth/role_grant_offer_actions.d.ts +13 -7
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +14 -12
- package/dist/auth/role_grant_offer_notifications.d.ts +3 -3
- package/dist/auth/role_grant_offer_notifications.js +1 -1
- package/dist/auth/role_grant_offer_queries.d.ts +0 -5
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_queries.js +9 -41
- package/dist/auth/role_grant_queries.d.ts +17 -67
- package/dist/auth/role_grant_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_queries.js +34 -106
- 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/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 +1 -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 +9 -4
- package/dist/db/cell_ddl.d.ts +5 -142
- package/dist/db/cell_ddl.d.ts.map +1 -1
- package/dist/db/cell_ddl.js +17 -16
- 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 +12 -48
- package/dist/db/cell_queries.d.ts.map +1 -1
- package/dist/db/cell_queries.js +24 -55
- 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/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_errors.d.ts +22 -2
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +41 -3
- 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/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 +1 -1
- package/dist/http/surface.d.ts.map +1 -1
- 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 +30 -10
- package/dist/schema_meta.d.ts.map +1 -1
- package/dist/schema_meta.js +85 -21
- 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 +62 -51
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +84 -71
- 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 +179 -158
- 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 -77
- 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/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 +13 -7
- package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
- 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_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 +1 -1
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- 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/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 +9 -2
- 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 +23 -1
- 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_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 +45 -3
- 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 -96
- package/dist/actions/transports_ws_auth_guard.d.ts.map +0 -1
- package/dist/actions/transports_ws_auth_guard.js +0 -141
- 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 -239
- 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
|
@@ -11,11 +11,12 @@ import { Hono } from 'hono';
|
|
|
11
11
|
import { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
12
12
|
import { apply_route_specs } from '../http/route_spec.js';
|
|
13
13
|
import { is_public_auth } from '../http/auth_shape.js';
|
|
14
|
-
import { CREDENTIAL_TYPE_DAEMON_TOKEN, CREDENTIAL_TYPE_SESSION } from '../auth/credential_type_schema.js';
|
|
14
|
+
import { BUILTIN_CREDENTIAL_TYPES, CREDENTIAL_TYPE_DAEMON_TOKEN, CREDENTIAL_TYPE_SESSION } from '../auth/credential_type_schema.js';
|
|
15
15
|
import { ROLE_KEEPER } from '../auth/role_schema.js';
|
|
16
16
|
import { fuz_auth_guard_resolver } from '../auth/auth_guard_resolver.js';
|
|
17
17
|
import { REQUEST_CONTEXT_KEY, create_fuz_authorization_handler } from '../auth/request_context.js';
|
|
18
|
-
import {
|
|
18
|
+
import { RESOLVED_AUTH_KEY, TEST_CONTEXT_PRESET_KEY } from '../hono_context.js';
|
|
19
|
+
import { create_test_resolved_auth } from './resolved_auth.js';
|
|
19
20
|
import { create_stub_db } from './stubs.js';
|
|
20
21
|
import { create_test_account, create_test_actor, create_test_role_grant } from './entities.js';
|
|
21
22
|
/**
|
|
@@ -40,9 +41,11 @@ export const create_test_app_from_specs = (route_specs, auth_ctx, credential_typ
|
|
|
40
41
|
c.set('pending_effects', []);
|
|
41
42
|
c.set('post_commit_effects', []);
|
|
42
43
|
if (auth_ctx) {
|
|
43
|
-
c.set(
|
|
44
|
+
c.set(RESOLVED_AUTH_KEY, create_test_resolved_auth({
|
|
45
|
+
credential_type: credential_type ?? CREDENTIAL_TYPE_SESSION,
|
|
46
|
+
account_id: auth_ctx.account.id
|
|
47
|
+
}));
|
|
44
48
|
c.set(REQUEST_CONTEXT_KEY, auth_ctx);
|
|
45
|
-
c.set(CREDENTIAL_TYPE_KEY, credential_type ?? CREDENTIAL_TYPE_SESSION);
|
|
46
49
|
c.set(TEST_CONTEXT_PRESET_KEY, true);
|
|
47
50
|
}
|
|
48
51
|
await next();
|
|
@@ -61,7 +64,7 @@ export const create_auth_test_apps = (route_specs, roles) => {
|
|
|
61
64
|
for (const role of roles) {
|
|
62
65
|
by_role.set(role, create_test_app_from_specs(route_specs, create_test_request_context(role)));
|
|
63
66
|
}
|
|
64
|
-
const by_credential_type = new Map(
|
|
67
|
+
const by_credential_type = new Map(BUILTIN_CREDENTIAL_TYPES.map((credential_type) => [
|
|
65
68
|
credential_type,
|
|
66
69
|
create_test_app_from_specs(route_specs, create_test_request_context(ROLE_KEEPER), credential_type)
|
|
67
70
|
]));
|
|
@@ -100,7 +103,7 @@ export const select_auth_app = (apps, auth) => {
|
|
|
100
103
|
return apps.public;
|
|
101
104
|
const credential_types = auth.credential_types;
|
|
102
105
|
if (credential_types?.length && !credential_types.includes(CREDENTIAL_TYPE_SESSION)) {
|
|
103
|
-
const channel =
|
|
106
|
+
const channel = BUILTIN_CREDENTIAL_TYPES.find((t) => credential_types.includes(t));
|
|
104
107
|
const app = channel === undefined ? undefined : apps.by_credential_type.get(channel);
|
|
105
108
|
const roles = auth.roles;
|
|
106
109
|
if (app && (!roles?.length || roles.includes(ROLE_KEEPER)))
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
|
-
import type { ConnectionCloser } from '../actions/connection_closer.js';
|
|
2
|
+
import type { ConnectionCloser, ConnectionCloseTarget } from '../actions/connection_closer.js';
|
|
3
3
|
/**
|
|
4
|
-
* Record of a single `ConnectionCloser`
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Record of a single `ConnectionCloser` call — the `ConnectionCloseTarget` a
|
|
5
|
+
* `close_connections` was given, or `{kind: 'all'}` for
|
|
6
|
+
* `close_all_connections`.
|
|
7
7
|
*/
|
|
8
|
-
export type RecordedClose = {
|
|
9
|
-
|
|
10
|
-
id: string;
|
|
11
|
-
} | {
|
|
12
|
-
method: 'role';
|
|
13
|
-
id: string;
|
|
14
|
-
role: string;
|
|
15
|
-
} | {
|
|
16
|
-
method: 'all';
|
|
17
|
-
id: null;
|
|
8
|
+
export type RecordedClose = ConnectionCloseTarget | {
|
|
9
|
+
kind: 'all';
|
|
18
10
|
};
|
|
19
11
|
export interface RecordingCloser {
|
|
20
12
|
closer: ConnectionCloser;
|
|
@@ -32,11 +24,11 @@ export interface RecordingCloser {
|
|
|
32
24
|
*/
|
|
33
25
|
export declare const create_recording_closer: () => RecordingCloser;
|
|
34
26
|
/**
|
|
35
|
-
* Pin
|
|
27
|
+
* Pin a single recorded close call to `expected` (deep equality).
|
|
36
28
|
*
|
|
37
29
|
* Throws via `assert.ok` if `call` is `undefined` — index a recorded
|
|
38
30
|
* `calls` array directly (`calls[0]`) and let this helper handle the
|
|
39
31
|
* missing-element case.
|
|
40
32
|
*/
|
|
41
|
-
export declare const assert_close_call: (call: RecordedClose | undefined,
|
|
33
|
+
export declare const assert_close_call: (call: RecordedClose | undefined, expected: RecordedClose) => void;
|
|
42
34
|
//# sourceMappingURL=connection_closer_helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection_closer_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/connection_closer_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"connection_closer_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/connection_closer_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE/F;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,qBAAqB,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAC5B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,QAAO,eAa1C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC7B,MAAM,aAAa,GAAG,SAAS,EAC/B,UAAU,aAAa,KACrB,IAGF,CAAC"}
|
|
@@ -13,38 +13,25 @@ import { assert } from 'vitest';
|
|
|
13
13
|
export const create_recording_closer = () => {
|
|
14
14
|
const calls = [];
|
|
15
15
|
const closer = {
|
|
16
|
-
|
|
17
|
-
calls.push(
|
|
16
|
+
close_connections: (target) => {
|
|
17
|
+
calls.push(target);
|
|
18
18
|
return 1;
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
calls.push({
|
|
22
|
-
return 1;
|
|
23
|
-
},
|
|
24
|
-
close_sockets_for_account: (id) => {
|
|
25
|
-
calls.push({ method: 'account', id });
|
|
26
|
-
return 1;
|
|
27
|
-
},
|
|
28
|
-
close_sockets_for_role: (id, role) => {
|
|
29
|
-
calls.push({ method: 'role', id, role });
|
|
30
|
-
return 1;
|
|
31
|
-
},
|
|
32
|
-
close_all_sockets: () => {
|
|
33
|
-
calls.push({ method: 'all', id: null });
|
|
20
|
+
close_all_connections: () => {
|
|
21
|
+
calls.push({ kind: 'all' });
|
|
34
22
|
return 1;
|
|
35
23
|
}
|
|
36
24
|
};
|
|
37
25
|
return { closer, calls };
|
|
38
26
|
};
|
|
39
27
|
/**
|
|
40
|
-
* Pin
|
|
28
|
+
* Pin a single recorded close call to `expected` (deep equality).
|
|
41
29
|
*
|
|
42
30
|
* Throws via `assert.ok` if `call` is `undefined` — index a recorded
|
|
43
31
|
* `calls` array directly (`calls[0]`) and let this helper handle the
|
|
44
32
|
* missing-element case.
|
|
45
33
|
*/
|
|
46
|
-
export const assert_close_call = (call,
|
|
34
|
+
export const assert_close_call = (call, expected) => {
|
|
47
35
|
assert.ok(call, 'expected a recorded close call');
|
|
48
|
-
assert.
|
|
49
|
-
assert.strictEqual(call.id, id);
|
|
36
|
+
assert.deepEqual(call, expected);
|
|
50
37
|
};
|
|
@@ -2,7 +2,8 @@ import '../assert_dev_env.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Cross-impl RPC **action-manifest** introspection — a normalized,
|
|
4
4
|
* JSON-serializable dump of a backend's live RPC method set, one entry per
|
|
5
|
-
* method carrying its auth shape, side-effect flag, and
|
|
5
|
+
* method carrying its input shape, auth shape, side-effect flag, and
|
|
6
|
+
* rate-limit class.
|
|
6
7
|
*
|
|
7
8
|
* The sibling of `schema_introspect.ts`'s `SchemaSnapshot`: where that
|
|
8
9
|
* captures the live *database* shape for the schema-parity gate, this
|
|
@@ -44,6 +45,10 @@ import type { RequestResponseActionSpec } from '../../actions/action_spec.js';
|
|
|
44
45
|
*/
|
|
45
46
|
export declare const ActionManifestEntry: z.ZodObject<{
|
|
46
47
|
method: z.ZodString;
|
|
48
|
+
input: z.ZodEnum<{
|
|
49
|
+
object: "object";
|
|
50
|
+
void: "void";
|
|
51
|
+
}>;
|
|
47
52
|
side_effects: z.ZodBoolean;
|
|
48
53
|
account: z.ZodEnum<{
|
|
49
54
|
optional: "optional";
|
|
@@ -68,6 +73,10 @@ export type ActionManifestEntry = z.infer<typeof ActionManifestEntry>;
|
|
|
68
73
|
export declare const ActionManifest: z.ZodObject<{
|
|
69
74
|
methods: z.ZodArray<z.ZodObject<{
|
|
70
75
|
method: z.ZodString;
|
|
76
|
+
input: z.ZodEnum<{
|
|
77
|
+
object: "object";
|
|
78
|
+
void: "void";
|
|
79
|
+
}>;
|
|
71
80
|
side_effects: z.ZodBoolean;
|
|
72
81
|
account: z.ZodEnum<{
|
|
73
82
|
optional: "optional";
|
|
@@ -90,12 +99,14 @@ export declare const ActionManifest: z.ZodObject<{
|
|
|
90
99
|
}, z.core.$strict>;
|
|
91
100
|
export type ActionManifest = z.infer<typeof ActionManifest>;
|
|
92
101
|
/**
|
|
93
|
-
* Normalize one spec's auth + side-effects into a manifest
|
|
94
|
-
*
|
|
102
|
+
* Normalize one spec's input shape + auth + side-effects into a manifest
|
|
103
|
+
* entry. Reads the input shape off `is_void_schema(spec.input)`, pulls the
|
|
104
|
+
* four auth axes off `RouteAuth` (the same shape the Rust `AuthSpec` mirrors),
|
|
95
105
|
* and flattens optional `roles` / `credential_types` to sorted arrays.
|
|
96
106
|
*/
|
|
97
107
|
export declare const action_manifest_entry: (spec: {
|
|
98
108
|
readonly method: string;
|
|
109
|
+
readonly input: z.ZodType;
|
|
99
110
|
readonly auth: RouteAuth;
|
|
100
111
|
readonly side_effects: boolean;
|
|
101
112
|
readonly rate_limit?: RateLimitKey;
|
|
@@ -107,5 +118,5 @@ export declare const action_manifest_entry: (spec: {
|
|
|
107
118
|
* it passes (the TS spine passes its full mount; the Rust stub filters
|
|
108
119
|
* `PROTOCOL_ACTION_SPECS` first) — see the module doc.
|
|
109
120
|
*/
|
|
110
|
-
export declare const build_action_manifest: (specs: ReadonlyArray<Pick<RequestResponseActionSpec, "method" | "auth" | "side_effects" | "rate_limit">>) => ActionManifest;
|
|
121
|
+
export declare const build_action_manifest: (specs: ReadonlyArray<Pick<RequestResponseActionSpec, "method" | "input" | "auth" | "side_effects" | "rate_limit">>) => ActionManifest;
|
|
111
122
|
//# sourceMappingURL=action_manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action_manifest.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/action_manifest.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B
|
|
1
|
+
{"version":3,"file":"action_manifest.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/action_manifest.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAE9E;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;kBAqB9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,kEAAkE;AAClE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAM5D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC;CACnC,KAAG,mBASF,CAAC;AAMH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GACjC,OAAO,aAAa,CACnB,IAAI,CAAC,yBAAyB,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,cAAc,GAAG,YAAY,CAAC,CAC5F,KACC,cAED,CAAC"}
|
|
@@ -2,7 +2,8 @@ import '../assert_dev_env.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Cross-impl RPC **action-manifest** introspection — a normalized,
|
|
4
4
|
* JSON-serializable dump of a backend's live RPC method set, one entry per
|
|
5
|
-
* method carrying its auth shape, side-effect flag, and
|
|
5
|
+
* method carrying its input shape, auth shape, side-effect flag, and
|
|
6
|
+
* rate-limit class.
|
|
6
7
|
*
|
|
7
8
|
* The sibling of `schema_introspect.ts`'s `SchemaSnapshot`: where that
|
|
8
9
|
* captures the live *database* shape for the schema-parity gate, this
|
|
@@ -32,6 +33,7 @@ import '../assert_dev_env.js';
|
|
|
32
33
|
import { z } from 'zod';
|
|
33
34
|
import { AuthAxisState } from '../../http/auth_shape.js';
|
|
34
35
|
import { RateLimitKey } from '../../http/error_schemas.js';
|
|
36
|
+
import { is_void_schema } from '../../http/schema_helpers.js';
|
|
35
37
|
/**
|
|
36
38
|
* One method's normalized RPC metadata — the cross-impl-comparable unit.
|
|
37
39
|
* `roles` / `credential_types` are always present + sorted (an absent gate
|
|
@@ -44,6 +46,12 @@ import { RateLimitKey } from '../../http/error_schemas.js';
|
|
|
44
46
|
export const ActionManifestEntry = z.strictObject({
|
|
45
47
|
/** RPC method name (`spec.method`). */
|
|
46
48
|
method: z.string(),
|
|
49
|
+
/**
|
|
50
|
+
* `'void'` when the input is `z.void()` (a parameterless method), else
|
|
51
|
+
* `'object'` — the Rust spine's declared `InputShape`, which its dispatcher
|
|
52
|
+
* enforces. A `z.strictObject({})` input is `'object'`.
|
|
53
|
+
*/
|
|
54
|
+
input: z.enum(['void', 'object']),
|
|
47
55
|
/** `true` when the action declares `side_effects` (mutation; POST-only on the RPC transport). */
|
|
48
56
|
side_effects: z.boolean(),
|
|
49
57
|
/** The `account` auth axis. */
|
|
@@ -64,12 +72,14 @@ export const ActionManifest = z.strictObject({
|
|
|
64
72
|
/** Sorted copy of a readonly string list (stable cross-impl ordering). */
|
|
65
73
|
const sorted_strings = (xs) => [...(xs ?? [])].sort();
|
|
66
74
|
/**
|
|
67
|
-
* Normalize one spec's auth + side-effects into a manifest
|
|
68
|
-
*
|
|
75
|
+
* Normalize one spec's input shape + auth + side-effects into a manifest
|
|
76
|
+
* entry. Reads the input shape off `is_void_schema(spec.input)`, pulls the
|
|
77
|
+
* four auth axes off `RouteAuth` (the same shape the Rust `AuthSpec` mirrors),
|
|
69
78
|
* and flattens optional `roles` / `credential_types` to sorted arrays.
|
|
70
79
|
*/
|
|
71
80
|
export const action_manifest_entry = (spec) => ({
|
|
72
81
|
method: spec.method,
|
|
82
|
+
input: is_void_schema(spec.input) ? 'void' : 'object',
|
|
73
83
|
side_effects: spec.side_effects,
|
|
74
84
|
account: spec.auth.account,
|
|
75
85
|
actor: spec.auth.actor,
|
|
@@ -7,8 +7,9 @@ import '../assert_dev_env.js';
|
|
|
7
7
|
* fuz_app spine and the Rust `testing_spine_stub`) are each other's parity
|
|
8
8
|
* reference. After both bootstrap, dump each one's live RPC method set, diff,
|
|
9
9
|
* fail loudly on drift. The diff entries name the specific divergence (a
|
|
10
|
-
* method only one impl mounts, a per-method
|
|
11
|
-
* rate-limit-class mismatch) so the error message points at
|
|
10
|
+
* method only one impl mounts, a per-method input-shape, auth-axis,
|
|
11
|
+
* side-effect, or rate-limit-class mismatch) so the error message points at
|
|
12
|
+
* the source.
|
|
12
13
|
*
|
|
13
14
|
* ```ts
|
|
14
15
|
* const manifest_a = await capture_action_manifest(ts_handle);
|
|
@@ -16,21 +17,27 @@ import '../assert_dev_env.js';
|
|
|
16
17
|
* assert_action_manifests_equal(manifest_a, manifest_b, {a: 'ts', b: 'rust'});
|
|
17
18
|
* ```
|
|
18
19
|
*
|
|
19
|
-
* Non-coverage: the manifest captures `{method, side_effects, account,
|
|
20
|
-
* roles, credential_types, rate_limit}` — the wire-relevant auth shape
|
|
21
|
-
*
|
|
20
|
+
* Non-coverage: the manifest captures `{method, input, side_effects, account,
|
|
21
|
+
* actor, roles, credential_types, rate_limit}` — the wire-relevant auth shape
|
|
22
|
+
* plus whether the method takes params at all. It does **not** capture the
|
|
23
|
+
* input/output schemas themselves (the declared-surface wire shape is gated by
|
|
22
24
|
* `rpc_round_trip`) nor the protocol actions `heartbeat` / `cancel` (excluded
|
|
23
25
|
* by construction — see `action_manifest.ts`).
|
|
24
26
|
*
|
|
25
27
|
* @module
|
|
26
28
|
*/
|
|
27
29
|
import type { RateLimitKey } from '../../http/error_schemas.js';
|
|
28
|
-
import type { ActionManifest } from './action_manifest.js';
|
|
30
|
+
import type { ActionManifest, ActionManifestEntry } from './action_manifest.js';
|
|
29
31
|
/** Structured drift entry. `where` is the named source impl ('a' or 'b'). */
|
|
30
32
|
export type ActionManifestDiff = {
|
|
31
33
|
readonly kind: 'method_only_in';
|
|
32
34
|
readonly where: 'a' | 'b';
|
|
33
35
|
readonly method: string;
|
|
36
|
+
} | {
|
|
37
|
+
readonly kind: 'input_differs';
|
|
38
|
+
readonly method: string;
|
|
39
|
+
readonly a: ActionManifestEntry['input'];
|
|
40
|
+
readonly b: ActionManifestEntry['input'];
|
|
34
41
|
} | {
|
|
35
42
|
readonly kind: 'side_effects_differ';
|
|
36
43
|
readonly method: string;
|
|
@@ -52,7 +59,8 @@ export type ActionManifestDiff = {
|
|
|
52
59
|
* Structural diff between two manifests — empty array means parity holds.
|
|
53
60
|
*
|
|
54
61
|
* Order is deterministic: methods in sorted order, with each method's
|
|
55
|
-
* side-effect
|
|
62
|
+
* input-shape, side-effect, rate-limit, and auth-field sub-diffs grouped
|
|
63
|
+
* together.
|
|
56
64
|
*/
|
|
57
65
|
export declare const diff_action_manifests: (a: ActionManifest, b: ActionManifest) => Array<ActionManifestDiff>;
|
|
58
66
|
/** Labels used in formatted output — defaults to `'a'` and `'b'`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action_manifest_parity.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/action_manifest_parity.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B
|
|
1
|
+
{"version":3,"file":"action_manifest_parity.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/action_manifest_parity.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAWhF,6EAA6E;AAC7E,MAAM,MAAM,kBAAkB,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACvF;IACA,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACzC,QAAQ,CAAC,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;CACxC,GACD;IACA,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;CACnB,GACD;IACA,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;CAC/B,GACD;IACA,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,kBAAkB,CAAC;IACnE,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAML;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GACjC,GAAG,cAAc,EACjB,GAAG,cAAc,KACf,KAAK,CAAC,kBAAkB,CAqC1B,CAAC;AAEF,qEAAqE;AACrE,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACxC,OAAO,aAAa,CAAC,kBAAkB,CAAC,EACxC,SAAQ,wBAA6B,KACnC,MAwCF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACzC,GAAG,cAAc,EACjB,GAAG,cAAc,EACjB,SAAQ,wBAA6B,KACnC,IAUF,CAAC"}
|
|
@@ -9,7 +9,8 @@ const string_lists_equal = (a, b) => a.length === b.length && a.every((v, i) =>
|
|
|
9
9
|
* Structural diff between two manifests — empty array means parity holds.
|
|
10
10
|
*
|
|
11
11
|
* Order is deterministic: methods in sorted order, with each method's
|
|
12
|
-
* side-effect
|
|
12
|
+
* input-shape, side-effect, rate-limit, and auth-field sub-diffs grouped
|
|
13
|
+
* together.
|
|
13
14
|
*/
|
|
14
15
|
export const diff_action_manifests = (a, b) => {
|
|
15
16
|
const diffs = [];
|
|
@@ -27,6 +28,9 @@ export const diff_action_manifests = (a, b) => {
|
|
|
27
28
|
diffs.push({ kind: 'method_only_in', where: 'a', method });
|
|
28
29
|
continue;
|
|
29
30
|
}
|
|
31
|
+
if (ea.input !== eb.input) {
|
|
32
|
+
diffs.push({ kind: 'input_differs', method, a: ea.input, b: eb.input });
|
|
33
|
+
}
|
|
30
34
|
if (ea.side_effects !== eb.side_effects) {
|
|
31
35
|
diffs.push({ kind: 'side_effects_differ', method, a: ea.side_effects, b: eb.side_effects });
|
|
32
36
|
}
|
|
@@ -62,6 +66,9 @@ export const format_action_manifest_diffs = (diffs, labels = {}) => {
|
|
|
62
66
|
case 'method_only_in':
|
|
63
67
|
lines.push(` method ${d.method} only in ${where_label(d.where)}`);
|
|
64
68
|
break;
|
|
69
|
+
case 'input_differs':
|
|
70
|
+
lines.push(` ${d.method} input differs: ${label_a}=${d.a}, ${label_b}=${d.b}`);
|
|
71
|
+
break;
|
|
65
72
|
case 'side_effects_differ':
|
|
66
73
|
lines.push(` ${d.method} side_effects differs: ${label_a}=${d.a}, ${label_b}=${d.b}`);
|
|
67
74
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body_size.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/body_size.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"body_size.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/body_size.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAmG9B,OAAO,KAAK,EAAE,wBAAwB,EAAe,MAAM,YAAY,CAAC;AAGxE;;;;;GAKG;AACH,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACzE;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACrC;AAgGD,eAAO,MAAM,8BAA8B,GAAI,SAAS,wBAAwB,KAAG,IA8HlF,CAAC"}
|
|
@@ -3,8 +3,8 @@ import '../assert_dev_env.js';
|
|
|
3
3
|
* Cross-backend parity suite for the request body-size limit.
|
|
4
4
|
*
|
|
5
5
|
* `create_app_server` (TS) and the Rust spine both cap the request body at a
|
|
6
|
-
* 1 MiB default (`
|
|
7
|
-
* `
|
|
6
|
+
* 1 MiB default (`DEFAULT_BODY_LIMIT_BYTES`, the same name in TS and in
|
|
7
|
+
* `fuz_http`; a backend capping its RPC path elsewhere passes
|
|
8
8
|
* `rpc_max_body_bytes`) and reject oversized payloads with `413` and the
|
|
9
9
|
* canonical flat REST body `{error: 'payload_too_large'}`. A declared
|
|
10
10
|
* `Content-Length` over the cap is refused on the header, *before* auth,
|
|
@@ -52,17 +52,18 @@ import '../assert_dev_env.js';
|
|
|
52
52
|
* uploading then has its write fail (`EPIPE`) and can lose the 413 the server
|
|
53
53
|
* did send, so a whole over-cap body sent through `fetch` reads its answer
|
|
54
54
|
* only some of the time. Given a `base_url`, the suite speaks to the socket
|
|
55
|
-
* directly
|
|
55
|
+
* directly and holds back what the refusal doesn't need:
|
|
56
56
|
*
|
|
57
|
-
* - a **declared** over-cap length is sent as the request head alone
|
|
58
|
-
* `Content-Length` one over the cap and not one
|
|
59
|
-
* arrive within `RAW_HTTP_READ_TIMEOUT_MS`, which
|
|
60
|
-
* made on the header: a backend that reads
|
|
61
|
-
* no cap, waits for bytes that never come
|
|
57
|
+
* - a **declared** over-cap length is sent as the request head alone
|
|
58
|
+
* (`raw_http_send_head`) — `Content-Length` one over the cap and not one
|
|
59
|
+
* body byte. The 413 must arrive within `RAW_HTTP_READ_TIMEOUT_MS`, which
|
|
60
|
+
* also pins that the refusal is made on the header: a backend that reads
|
|
61
|
+
* the body before refusing, or has no cap, waits for bytes that never come
|
|
62
|
+
* and fails the case.
|
|
62
63
|
* - the **chunked** body is sent up to one byte past the cap and never
|
|
63
|
-
* terminated. The server has read every byte sent by
|
|
64
|
-
* past the cap, so nothing is left unread, and the
|
|
65
|
-
* the body's end.
|
|
64
|
+
* terminated (`raw_http_exchange`). The server has read every byte sent by
|
|
65
|
+
* the time it has counted past the cap, so nothing is left unread, and the
|
|
66
|
+
* 413 must arrive without the body's end.
|
|
66
67
|
*
|
|
67
68
|
* With `base_url: null` there is no socket and no such race (the in-process
|
|
68
69
|
* `app.request`), so the same cases send whole bodies through the fixture's
|
|
@@ -84,7 +85,7 @@ import '../assert_dev_env.js';
|
|
|
84
85
|
import { describe, test, assert } from 'vitest';
|
|
85
86
|
import { account_verify_action_spec } from '../../auth/account_action_specs.js';
|
|
86
87
|
import { ERROR_PAYLOAD_TOO_LARGE } from '../../http/error_schemas.js';
|
|
87
|
-
import { raw_http_exchange, raw_http_header_lines, raw_http_parse_json, raw_http_parse_response, RAW_HTTP_READ_TIMEOUT_MS } from '../transports/raw_http.js';
|
|
88
|
+
import { raw_http_exchange, raw_http_header_lines, raw_http_parse_json, raw_http_parse_response, raw_http_send_head, RAW_HTTP_READ_TIMEOUT_MS } from '../transports/raw_http.js';
|
|
88
89
|
import { SPINE_BODY_LIMIT_DEFAULT_BYTES, SPINE_RPC_PATH } from './spine_surface_constants.js';
|
|
89
90
|
/**
|
|
90
91
|
* Build an `account_verify` JSON-RPC envelope whose serialized length is
|
|
@@ -146,7 +147,9 @@ const exchange_withholding = async (base_url, request_bytes, withheld) => {
|
|
|
146
147
|
const response = raw_http_parse_response(received);
|
|
147
148
|
assert.ok(response, `expected a whole response with ${withheld} withheld; ` +
|
|
148
149
|
(closed_by_server
|
|
149
|
-
?
|
|
150
|
+
? received
|
|
151
|
+
? 'the server closed the connection first'
|
|
152
|
+
: 'connection refused or closed before any response'
|
|
150
153
|
: `none arrived within ${RAW_HTTP_READ_TIMEOUT_MS}ms — the backend is waiting for bytes ` +
|
|
151
154
|
`it should refuse without`) +
|
|
152
155
|
`. Received: ${received ? received.slice(0, 120) : 'nothing'}`);
|
|
@@ -182,16 +185,16 @@ export const describe_body_size_cross_tests = (options) => {
|
|
|
182
185
|
body: sized_envelope(id, content_length)
|
|
183
186
|
}));
|
|
184
187
|
}
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
origin: url.origin,
|
|
188
|
+
const response = await raw_http_send_head(base_url, {
|
|
189
|
+
path: rpc_path,
|
|
190
|
+
headers: {
|
|
191
|
+
origin: new URL(base_url).origin,
|
|
190
192
|
...headers,
|
|
191
|
-
'content-type': 'application/json'
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
'content-type': 'application/json'
|
|
194
|
+
},
|
|
195
|
+
content_length
|
|
196
|
+
});
|
|
197
|
+
return { status: response.status, body: raw_http_parse_json(response.body) };
|
|
195
198
|
};
|
|
196
199
|
/**
|
|
197
200
|
* POST a chunked body past the cap as the keeper. Over a socket the body
|
|
@@ -18,9 +18,28 @@ export interface TestBackendPaths {
|
|
|
18
18
|
readonly daemon_token_path: string;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Build the generic path layout for a cross-process test backend
|
|
22
|
-
* `prefix`
|
|
23
|
-
*
|
|
21
|
+
* Build the generic path layout for a cross-process test backend under
|
|
22
|
+
* `os.tmpdir()/<prefix>`. `prefix` must be unique across every repo that
|
|
23
|
+
* runs cross tests on the machine (e.g. `'my_app_cross_rust'`); for a
|
|
24
|
+
* default derived from the backend name, use `default_test_backend_paths`.
|
|
24
25
|
*/
|
|
25
26
|
export declare const build_test_backend_paths: (prefix: string) => TestBackendPaths;
|
|
27
|
+
/**
|
|
28
|
+
* The default per-backend tmpdir prefix: the running repo's directory name
|
|
29
|
+
* (`process.cwd()`'s basename — so run the tests from the repo root) plus the
|
|
30
|
+
* backend `name`, so the same backend name in two repos (`'rust'` in each)
|
|
31
|
+
* lands in two directories.
|
|
32
|
+
*
|
|
33
|
+
* @param name - the backend name (`BackendConfig.name`)
|
|
34
|
+
* @returns the prefix `default_test_backend_paths` passes to `build_test_backend_paths`
|
|
35
|
+
*/
|
|
36
|
+
export declare const default_test_backend_prefix: (name: string) => string;
|
|
37
|
+
/**
|
|
38
|
+
* The generic path layout under the default, repo-namespaced prefix
|
|
39
|
+
* (`default_test_backend_prefix`) — what the default backend builders use
|
|
40
|
+
* when given no `paths`.
|
|
41
|
+
*
|
|
42
|
+
* @param name - the backend name (`BackendConfig.name`)
|
|
43
|
+
*/
|
|
44
|
+
export declare const default_test_backend_paths: (name: string) => TestBackendPaths;
|
|
26
45
|
//# sourceMappingURL=build_test_backend_paths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_test_backend_paths.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/build_test_backend_paths.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"build_test_backend_paths.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/build_test_backend_paths.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAyB9B;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACnC;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,KAAG,gBASzD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,MAAM,KAAG,MACtB,CAAC;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,MAAM,MAAM,KAAG,gBACE,CAAC"}
|
|
@@ -3,23 +3,28 @@ import '../assert_dev_env.js';
|
|
|
3
3
|
* Per-backend filesystem layout under `os.tmpdir()` for cross-process
|
|
4
4
|
* tests.
|
|
5
5
|
*
|
|
6
|
-
* Isolation matters because vitest projects can run in parallel
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Isolation matters because vitest projects can run in parallel, and other
|
|
7
|
+
* repos' cross runs on the same machine share `os.tmpdir()` — a shared
|
|
8
|
+
* `root` would mix bootstrap and daemon tokens across concurrently-running
|
|
9
|
+
* backends. Each backend gets its own subtree: `default_test_backend_paths`
|
|
10
|
+
* (what the default builders use) names it after the running repo's
|
|
11
|
+
* directory plus the backend name, so two repos that both name a backend
|
|
12
|
+
* `'rust'` don't collide; `build_test_backend_paths` takes an explicit,
|
|
13
|
+
* already-unique prefix.
|
|
10
14
|
*
|
|
11
|
-
* Consumers compose: take the generic paths from
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
15
|
+
* Consumers compose: take the generic paths from either builder and add
|
|
16
|
+
* domain-specific dirs (e.g. `zzz_dir`, `scoped_dir`) under the returned
|
|
17
|
+
* `root`.
|
|
14
18
|
*
|
|
15
19
|
* @module
|
|
16
20
|
*/
|
|
17
21
|
import { tmpdir } from 'node:os';
|
|
18
|
-
import { join } from 'node:path';
|
|
22
|
+
import { basename, join } from 'node:path';
|
|
19
23
|
/**
|
|
20
|
-
* Build the generic path layout for a cross-process test backend
|
|
21
|
-
* `prefix`
|
|
22
|
-
*
|
|
24
|
+
* Build the generic path layout for a cross-process test backend under
|
|
25
|
+
* `os.tmpdir()/<prefix>`. `prefix` must be unique across every repo that
|
|
26
|
+
* runs cross tests on the machine (e.g. `'my_app_cross_rust'`); for a
|
|
27
|
+
* default derived from the backend name, use `default_test_backend_paths`.
|
|
23
28
|
*/
|
|
24
29
|
export const build_test_backend_paths = (prefix) => {
|
|
25
30
|
const root = join(tmpdir(), prefix);
|
|
@@ -31,3 +36,21 @@ export const build_test_backend_paths = (prefix) => {
|
|
|
31
36
|
daemon_token_path: join(root, 'run', 'daemon_token')
|
|
32
37
|
};
|
|
33
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* The default per-backend tmpdir prefix: the running repo's directory name
|
|
41
|
+
* (`process.cwd()`'s basename — so run the tests from the repo root) plus the
|
|
42
|
+
* backend `name`, so the same backend name in two repos (`'rust'` in each)
|
|
43
|
+
* lands in two directories.
|
|
44
|
+
*
|
|
45
|
+
* @param name - the backend name (`BackendConfig.name`)
|
|
46
|
+
* @returns the prefix `default_test_backend_paths` passes to `build_test_backend_paths`
|
|
47
|
+
*/
|
|
48
|
+
export const default_test_backend_prefix = (name) => `${basename(process.cwd())}_${name}`;
|
|
49
|
+
/**
|
|
50
|
+
* The generic path layout under the default, repo-namespaced prefix
|
|
51
|
+
* (`default_test_backend_prefix`) — what the default backend builders use
|
|
52
|
+
* when given no `paths`.
|
|
53
|
+
*
|
|
54
|
+
* @param name - the backend name (`BackendConfig.name`)
|
|
55
|
+
*/
|
|
56
|
+
export const default_test_backend_paths = (name) => build_test_backend_paths(default_test_backend_prefix(name));
|
|
@@ -9,10 +9,12 @@ import type { TestingBackdoorMethod } from './spine_surface_constants.js';
|
|
|
9
9
|
export interface BackendCapabilities {
|
|
10
10
|
/**
|
|
11
11
|
* WebSocket transport is reachable end-to-end. Gates the cross-process
|
|
12
|
-
* WS round-trip suite
|
|
13
|
-
* (`describe_ws_connection_cap_cross_tests`)
|
|
14
|
-
* `
|
|
15
|
-
*
|
|
12
|
+
* WS round-trip suite, the per-account connection-cap suite
|
|
13
|
+
* (`describe_ws_connection_cap_cross_tests`), and the front door's
|
|
14
|
+
* WS-path cases (`describe_transport_composition_cross_tests`) — the
|
|
15
|
+
* upgrade rows, and the rows that ask for no upgrade, which run in-process
|
|
16
|
+
* too; the in-process `describe_ws_round_trip_tests` runs against
|
|
17
|
+
* `register_action_ws` directly and ignores this flag.
|
|
16
18
|
*/
|
|
17
19
|
readonly ws: boolean;
|
|
18
20
|
/**
|
|
@@ -70,7 +72,9 @@ export interface BackendCapabilities {
|
|
|
70
72
|
* cases with `cell_relations`), and the fact cases of the
|
|
71
73
|
* moderation suite. Like cells, the serve route stays off the standard
|
|
72
74
|
* declared surface. The admin bare-hash route is its own flag,
|
|
73
|
-
* `fact_serving_admin_hash`.
|
|
75
|
+
* `fact_serving_admin_hash`. The suite's missing-disk-file case assumes the
|
|
76
|
+
* backend serves external facts from disk: one with X-Accel delivery on
|
|
77
|
+
* hands off with a `200` (nginx would answer the missing file) and fails it.
|
|
74
78
|
*/
|
|
75
79
|
readonly fact_serving: boolean;
|
|
76
80
|
/**
|
|
@@ -112,7 +116,7 @@ export interface BackendCapabilities {
|
|
|
112
116
|
* wrong-shape reply rejection).
|
|
113
117
|
*
|
|
114
118
|
* `true` on fuz_app's own spine presets — the Rust `testing_spine_stub` and
|
|
115
|
-
* the TS spine (`
|
|
119
|
+
* the TS spine (`ConnectionRegistry.request_connection` drives the
|
|
116
120
|
* round-trip, correlated by `register_action_ws`). A `MountFlag`: a backend
|
|
117
121
|
* states `true` once it mounts `peer/ping` on a WS endpoint **and** the HTTP
|
|
118
122
|
* RPC endpoint (the no-transport refusal).
|
|
@@ -167,7 +171,9 @@ export interface BackendCapabilities {
|
|
|
167
171
|
* catches one. `true` only on the reference spine binaries that mount the
|
|
168
172
|
* test policy (the TS spine `full_spine_mount` + the Rust
|
|
169
173
|
* `testing_spine_stub`); consumers and the in-process default app don't
|
|
170
|
-
* mount it.
|
|
174
|
+
* mount it. The same binaries mount the steward-revoke test policy
|
|
175
|
+
* (`test_cell_grant_steward_revoke_authorize`) beside it, so the flag also
|
|
176
|
+
* gates `describe_cell_grant_steward_cross_tests` (with `cell_relations`).
|
|
171
177
|
*/
|
|
172
178
|
readonly cell_gated_create: boolean;
|
|
173
179
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAkD9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IACnC
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAkD9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;;;;;;OAQG;IACH,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB;;;;;;;;OAQG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC;;;;;;;;;OASG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACjE;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,IAAI,CACjC,mBAAmB,EACjB,IAAI,GACJ,KAAK,GACL,WAAW,GACX,gBAAgB,GAChB,mBAAmB,GACnB,cAAc,GACd,yBAAyB,GACzB,OAAO,GACP,cAAc,GACd,oBAAoB,GACpB,eAAe,CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,mBAAmB,CAAC,CAAC;AAEnG;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,EAAE,mBA4BpC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,GAAI,MAAM,OAAO,EAAE,MAAM,MAAM,EAAE,IAAI,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAG,IAMrF,CAAC"}
|
|
@@ -21,8 +21,8 @@ import '../assert_dev_env.js';
|
|
|
21
21
|
* holding the suite's `role` — `CELL_EDITOR_ROLE` by default, which has no
|
|
22
22
|
* grant path, so it can't be offered and the bootstrap-cradle seed is the only
|
|
23
23
|
* path. Both legs configure that seed and register `CELL_EDITOR_ROLE` in their
|
|
24
|
-
* role registry; the
|
|
25
|
-
*
|
|
24
|
+
* role registry; the same membership is in the Rust stub's `RoleRegistry`
|
|
25
|
+
* (which the cell spec set also reads). A backend with only the builtin roles passes `ROLE_KEEPER`
|
|
26
26
|
* (no admin reach, so every arm still turns on the grant); `ROLE_ADMIN` is
|
|
27
27
|
* refused, since an admin reaches every cell whatever its grants.
|
|
28
28
|
*
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../assert_dev_env.js';
|
|
2
|
+
import type { RpcPathCapabilityGatedCrossSuiteOptions } from './setup.js';
|
|
3
|
+
export declare const describe_cell_grant_steward_cross_tests: (options: RpcPathCapabilityGatedCrossSuiteOptions) => void;
|
|
4
|
+
//# sourceMappingURL=cell_grant_steward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell_grant_steward.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/cell_grant_steward.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiD9B,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,YAAY,CAAC;AAY1E,eAAO,MAAM,uCAAuC,GACnD,SAAS,uCAAuC,KAC9C,IAgJF,CAAC"}
|