@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
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import '../assert_dev_env.js';
|
|
2
|
+
/**
|
|
3
|
+
* Cross-backend parity suite for the **steward-revoke seam**
|
|
4
|
+
* (`CellGrantRevokeAuthorize`) on `cell_grant_revoke`.
|
|
5
|
+
*
|
|
6
|
+
* Like the creation authorizer, the revoke hook adds no method, column, or wire
|
|
7
|
+
* shape, so the schema-snapshot and action-manifest parity gates are blind to a
|
|
8
|
+
* TS↔Rust divergence in it — the fence, the refusal shape, the audit stamp.
|
|
9
|
+
* This behavioral case is the gate that catches one.
|
|
10
|
+
*
|
|
11
|
+
* Both spines mount the same test policy (the TS spine binary via
|
|
12
|
+
* `test_cell_grant_steward_revoke_authorize`, the Rust `testing_spine_stub` via
|
|
13
|
+
* `TestCellGrantStewardRevokeAuthorize`): a scoped `participant` grant stewards
|
|
14
|
+
* its scope. A cell owner shares a private cell with `participant` at a scope;
|
|
15
|
+
* the suite asserts every spine agrees on:
|
|
16
|
+
*
|
|
17
|
+
* - **the scope's steward revokes** — a non-manager holding `participant` at
|
|
18
|
+
* the grant's scope revokes it: `{ok: true, still_admitted: false}`, the grant
|
|
19
|
+
* gone from the owner's list, and the `cell_grant_revoke` audit row stamped
|
|
20
|
+
* `steward: true`.
|
|
21
|
+
* - **another scope's steward gets the 404 mask** — `cell_grant_not_found`, the
|
|
22
|
+
* same refusal as no hook, and the grant stays.
|
|
23
|
+
* - **a scopeless role grant is fenced off** — a caller holding `participant`
|
|
24
|
+
* globally *and* at a scope still gets the 404 on a grant naming no scope:
|
|
25
|
+
* the spine never asks the hook, which would have admitted the global grant
|
|
26
|
+
* had it been asked with a null scope.
|
|
27
|
+
*
|
|
28
|
+
* Gated on `capabilities.cell_relations` (the grant verbs) and
|
|
29
|
+
* `capabilities.cell_gated_create` (the reference spines' test cell policies,
|
|
30
|
+
* which this one rides beside). The hook's in-process coverage, including the
|
|
31
|
+
* manager, self-revoke, actor-shaped and deleted-cell fences, is
|
|
32
|
+
* `auth/cell_grant_actions.authz.db.test.ts`.
|
|
33
|
+
*
|
|
34
|
+
* @module
|
|
35
|
+
*/
|
|
36
|
+
import { describe, assert } from 'vitest';
|
|
37
|
+
import { CellCreateOutput } from '../../auth/cell_action_specs.js';
|
|
38
|
+
import { CellGrantCreateOutput, CellGrantListOutput, CellGrantRevokeOutput, ERROR_CELL_GRANT_NOT_FOUND } from '../../auth/cell_grant_action_specs.js';
|
|
39
|
+
import { test_if } from './capabilities.js';
|
|
40
|
+
import { cross_rpc_call, error_reason, expect_output } from './cross_rpc.js';
|
|
41
|
+
import { list_audit_events } from './audit_cross_helpers.js';
|
|
42
|
+
import { SPINE_PARTICIPANT_ROLE, SPINE_RPC_PATH } from './spine_surface_constants.js';
|
|
43
|
+
/** The scope the shared grant is bound to. */
|
|
44
|
+
const STEWARDED_SCOPE_ID = '55555555-5555-4555-8555-555555555555';
|
|
45
|
+
/** A scope the shared grant isn't bound to. */
|
|
46
|
+
const OTHER_SCOPE_ID = '66666666-6666-4666-8666-666666666666';
|
|
47
|
+
/** The scope kind the test `participant` grants carry. */
|
|
48
|
+
const STEWARD_SCOPE_KIND = 'space';
|
|
49
|
+
export const describe_cell_grant_steward_cross_tests = (options) => {
|
|
50
|
+
const { setup_test, capabilities } = options;
|
|
51
|
+
const rpc_path = options.rpc_path ?? SPINE_RPC_PATH;
|
|
52
|
+
const enabled = capabilities.cell_relations && capabilities.cell_gated_create;
|
|
53
|
+
/** A fresh account holding `participant` at each of `scope_ids` (`null` = global). */
|
|
54
|
+
const create_participant = async (fixture, username, scope_ids) => {
|
|
55
|
+
const account = await fixture.create_account({ username });
|
|
56
|
+
for (const scope_id of scope_ids) {
|
|
57
|
+
const assigned = await cross_rpc_call(fixture.transport, rpc_path, 'role_grant_assign', scope_id === null
|
|
58
|
+
? { to_account_id: account.account.id, role: SPINE_PARTICIPANT_ROLE }
|
|
59
|
+
: {
|
|
60
|
+
to_account_id: account.account.id,
|
|
61
|
+
role: SPINE_PARTICIPANT_ROLE,
|
|
62
|
+
scope_kind: STEWARD_SCOPE_KIND,
|
|
63
|
+
scope_id
|
|
64
|
+
}, fixture.create_session_headers());
|
|
65
|
+
assert.ok(assigned.ok, `role_grant_assign failed: ${JSON.stringify(assigned.error)}`);
|
|
66
|
+
}
|
|
67
|
+
return account;
|
|
68
|
+
};
|
|
69
|
+
/** An owner's private cell shared with `participant`, at `scope_id` when given. */
|
|
70
|
+
const create_shared_cell = async (fixture, scope_id) => {
|
|
71
|
+
const owner = await fixture.create_account({ username: 'steward_cell_owner' });
|
|
72
|
+
const created = expect_output(await cross_rpc_call(fixture.transport, rpc_path, 'cell_create', { kind: 'note', data: {} }, owner.create_session_headers()), CellCreateOutput);
|
|
73
|
+
const granted = expect_output(await cross_rpc_call(fixture.transport, rpc_path, 'cell_grant_create', {
|
|
74
|
+
cell_id: created.cell.id,
|
|
75
|
+
level: 'viewer',
|
|
76
|
+
principal: { kind: 'role', role: SPINE_PARTICIPANT_ROLE, scope_id }
|
|
77
|
+
}, owner.create_session_headers()), CellGrantCreateOutput);
|
|
78
|
+
return { owner, cell_id: created.cell.id, grant_id: granted.grant.id };
|
|
79
|
+
};
|
|
80
|
+
const list_grant_ids = async (fixture, owner, cell_id) => expect_output(await cross_rpc_call(fixture.transport, rpc_path, 'cell_grant_list', { cell_id }, owner.create_session_headers()), CellGrantListOutput).grants.map((g) => g.id);
|
|
81
|
+
const revoke = (fixture, caller, grant_id) => cross_rpc_call(fixture.transport, rpc_path, 'cell_grant_revoke', { grant_id }, caller.create_session_headers());
|
|
82
|
+
describe('cell_grant_steward revoke parity', () => {
|
|
83
|
+
test_if(enabled, "the scope's steward revokes, audited steward: true", async () => {
|
|
84
|
+
const fixture = await setup_test();
|
|
85
|
+
const { owner, cell_id, grant_id } = await create_shared_cell(fixture, STEWARDED_SCOPE_ID);
|
|
86
|
+
const steward = await create_participant(fixture, 'steward_of_scope', [STEWARDED_SCOPE_ID]);
|
|
87
|
+
const revoked = expect_output(await revoke(fixture, steward, grant_id), CellGrantRevokeOutput);
|
|
88
|
+
assert.deepStrictEqual(revoked, { ok: true, still_admitted: false });
|
|
89
|
+
assert.notInclude(await list_grant_ids(fixture, owner, cell_id), grant_id);
|
|
90
|
+
const events = await list_audit_events(fixture, { event_type: 'cell_grant_revoke' }, rpc_path);
|
|
91
|
+
const event = events.find((e) => e.metadata?.grant_id === grant_id);
|
|
92
|
+
assert.ok(event, 'the revoke is audited');
|
|
93
|
+
assert.strictEqual(event.metadata?.steward, true);
|
|
94
|
+
assert.notProperty(event.metadata, 'self');
|
|
95
|
+
});
|
|
96
|
+
test_if(enabled, "another scope's steward gets the 404 mask", async () => {
|
|
97
|
+
const fixture = await setup_test();
|
|
98
|
+
const { owner, cell_id, grant_id } = await create_shared_cell(fixture, STEWARDED_SCOPE_ID);
|
|
99
|
+
const outsider = await create_participant(fixture, 'steward_elsewhere', [OTHER_SCOPE_ID]);
|
|
100
|
+
const refused = await revoke(fixture, outsider, grant_id);
|
|
101
|
+
assert.strictEqual(refused.status, 404);
|
|
102
|
+
assert.strictEqual(error_reason(refused), ERROR_CELL_GRANT_NOT_FOUND);
|
|
103
|
+
assert.include(await list_grant_ids(fixture, owner, cell_id), grant_id);
|
|
104
|
+
});
|
|
105
|
+
test_if(enabled, 'a scopeless role grant never reaches the hook', async () => {
|
|
106
|
+
const fixture = await setup_test();
|
|
107
|
+
const { owner, cell_id, grant_id } = await create_shared_cell(fixture, null);
|
|
108
|
+
// a global `participant` grant would satisfy the policy asked with a
|
|
109
|
+
// null scope, so only the fence keeps this caller out
|
|
110
|
+
const caller = await create_participant(fixture, 'steward_global', [
|
|
111
|
+
null,
|
|
112
|
+
STEWARDED_SCOPE_ID
|
|
113
|
+
]);
|
|
114
|
+
const refused = await revoke(fixture, caller, grant_id);
|
|
115
|
+
assert.strictEqual(refused.status, 404);
|
|
116
|
+
assert.strictEqual(error_reason(refused), ERROR_CELL_GRANT_NOT_FOUND);
|
|
117
|
+
assert.include(await list_grant_ids(fixture, owner, cell_id), grant_id);
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell_relations.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/cell_relations.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA+G9B,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,YAAY,CAAC;AAuE1E,eAAO,MAAM,mCAAmC,GAC/C,SAAS,uCAAuC,KAC9C,
|
|
1
|
+
{"version":3,"file":"cell_relations.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/cell_relations.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA+G9B,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,YAAY,CAAC;AAuE1E,eAAO,MAAM,mCAAmC,GAC/C,SAAS,uCAAuC,KAC9C,IAwtCF,CAAC"}
|
|
@@ -608,5 +608,26 @@ export const describe_cell_relations_cross_tests = (options) => {
|
|
|
608
608
|
assert.strictEqual(meta.item_count, 1, 'deep clone counted a non-viewable child');
|
|
609
609
|
assert.strictEqual(meta.skipped_item_count, undefined, 'deep clone leaked the hidden-child count via skipped_item_count');
|
|
610
610
|
});
|
|
611
|
+
test_if(capabilities.cell_relations, 'cell mutation audit metadata omits a null kind and path', async () => {
|
|
612
|
+
const fixture = await setup_test();
|
|
613
|
+
const owner = await fixture.create_account({ username: 'cell_audit_meta_owner' });
|
|
614
|
+
const t = fixture.fresh_transport();
|
|
615
|
+
const owner_h = owner.create_session_headers();
|
|
616
|
+
const bare = await create_cell(t, rpc_path, owner_h, { data: {} });
|
|
617
|
+
const kinded = await create_cell(t, rpc_path, owner_h, { kind: 'note', data: {} });
|
|
618
|
+
expect_output(await cross_rpc_call(t, rpc_path, 'cell_update', { cell_id: bare, data: { label: 'v2' } }, owner_h), CellUpdateOutput);
|
|
619
|
+
const metadata_of = async (event_type, cell_id) => {
|
|
620
|
+
const events = await list_audit_events(fixture, { event_type }, rpc_path);
|
|
621
|
+
const ev = events.find((e) => e.metadata?.cell_id === cell_id);
|
|
622
|
+
assert.ok(ev, `no ${event_type} audit row for ${cell_id}`);
|
|
623
|
+
return ev.metadata;
|
|
624
|
+
};
|
|
625
|
+
assert.deepStrictEqual(await metadata_of('cell_create', bare), { cell_id: bare });
|
|
626
|
+
assert.deepStrictEqual(await metadata_of('cell_update', bare), { cell_id: bare });
|
|
627
|
+
assert.deepStrictEqual(await metadata_of('cell_create', kinded), {
|
|
628
|
+
cell_id: kinded,
|
|
629
|
+
kind: 'note'
|
|
630
|
+
});
|
|
631
|
+
});
|
|
611
632
|
});
|
|
612
633
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
2
|
import type { AppSurfaceSpec, RpcEndpointSpec } from '../../http/surface.js';
|
|
3
3
|
import type { RouteSpec } from '../../http/route_spec.js';
|
|
4
|
-
import type { RpcAction } from '../../actions/
|
|
4
|
+
import type { RpcAction } from '../../actions/action_types.js';
|
|
5
5
|
import type { SessionOptions } from '../../auth/session_cookie.js';
|
|
6
6
|
import { resolve_rpc_endpoints_for_setup, type RpcEndpointsSuiteOption } from '../rpc_helpers.js';
|
|
7
7
|
import type { FetchTransport } from '../transports/fetch_transport.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conformance_table.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/conformance_table.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA8C9B,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"conformance_table.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/conformance_table.ts"],"names":[],"mappings":"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"}
|
|
@@ -31,6 +31,20 @@ export interface ActionRateLimitEnvOptions {
|
|
|
31
31
|
* flag, so the binary refuses the combination instead of the harness hiding it.
|
|
32
32
|
*/
|
|
33
33
|
export declare const action_rate_limit_env: (options: ActionRateLimitEnvOptions) => Record<string, string>;
|
|
34
|
+
/** Options for `timing_env`. */
|
|
35
|
+
export interface TimingEnvOptions {
|
|
36
|
+
/** The audit stream's keep-alive interval in ms (`AUDIT_SSE_KEEP_ALIVE_MS_ENV`). */
|
|
37
|
+
readonly audit_sse_keep_alive_ms?: number;
|
|
38
|
+
/** The WS endpoints' receive timeout in ms (`WS_RECEIVE_TIMEOUT_MS_ENV`). */
|
|
39
|
+
readonly ws_receive_timeout_ms?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The `extra_env` entries carrying the timing overrides, shared by the TS and
|
|
43
|
+
* Rust backend configs so one option drives both impls. Each value is passed
|
|
44
|
+
* through as given, so the binary refuses a bad one instead of the harness
|
|
45
|
+
* hiding it.
|
|
46
|
+
*/
|
|
47
|
+
export declare const timing_env: (options: TimingEnvOptions) => Record<string, string>;
|
|
34
48
|
/**
|
|
35
49
|
* Capabilities shared by TS-family backends — only what the family
|
|
36
50
|
* guarantees: the declared spine surface's mounts and the behavior of its
|
|
@@ -45,7 +59,7 @@ export declare const ts_default_capabilities: FamilyDefaultCapabilities;
|
|
|
45
59
|
*/
|
|
46
60
|
export declare const rust_default_capabilities: FamilyDefaultCapabilities;
|
|
47
61
|
export interface MakeDefaultTsBackendConfigOptions {
|
|
48
|
-
/** Diagnostic label; also
|
|
62
|
+
/** Diagnostic label; also names the tmpdir (`default_test_backend_paths`) when `paths` is omitted. */
|
|
49
63
|
readonly name: string;
|
|
50
64
|
/** TCP port the binary listens on. */
|
|
51
65
|
readonly port: number;
|
|
@@ -62,7 +76,7 @@ export interface MakeDefaultTsBackendConfigOptions {
|
|
|
62
76
|
* silently skips.
|
|
63
77
|
*/
|
|
64
78
|
readonly capabilities: BackendCapabilities;
|
|
65
|
-
/** Pre-computed paths; defaults to `
|
|
79
|
+
/** Pre-computed paths; defaults to `default_test_backend_paths(name)`. */
|
|
66
80
|
readonly paths?: TestBackendPaths;
|
|
67
81
|
/** Override individual bootstrap fields (username/password/token). */
|
|
68
82
|
readonly bootstrap_overrides?: Partial<BackendBootstrapConfig>;
|
|
@@ -98,7 +112,7 @@ export interface MakeDefaultTsBackendConfigOptions {
|
|
|
98
112
|
*/
|
|
99
113
|
export declare const make_default_ts_backend_config: (opts: MakeDefaultTsBackendConfigOptions) => BackendConfig;
|
|
100
114
|
export interface MakeDefaultRustBackendConfigOptions {
|
|
101
|
-
/** Diagnostic label; also
|
|
115
|
+
/** Diagnostic label; also names the tmpdir (`default_test_backend_paths`) when `paths` is omitted. */
|
|
102
116
|
readonly name: string;
|
|
103
117
|
/** TCP port the binary listens on. */
|
|
104
118
|
readonly port: number;
|
|
@@ -119,7 +133,7 @@ export interface MakeDefaultRustBackendConfigOptions {
|
|
|
119
133
|
* silently skips.
|
|
120
134
|
*/
|
|
121
135
|
readonly capabilities: BackendCapabilities;
|
|
122
|
-
/** Pre-computed paths; defaults to `
|
|
136
|
+
/** Pre-computed paths; defaults to `default_test_backend_paths(name)`. */
|
|
123
137
|
readonly paths?: TestBackendPaths;
|
|
124
138
|
/** Override individual bootstrap fields (username/password/token). */
|
|
125
139
|
readonly bootstrap_overrides?: Partial<BackendBootstrapConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default_backend_configs.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/default_backend_configs.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAqC9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,
|
|
1
|
+
{"version":3,"file":"default_backend_configs.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/default_backend_configs.ts"],"names":[],"mappings":"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"}
|
|
@@ -26,15 +26,15 @@ import '../assert_dev_env.js';
|
|
|
26
26
|
* Common across both families: `/api/rpc`, `/api/ws`, `/health`,
|
|
27
27
|
* `/api/account/bootstrap`, `cookie_name: 'fuz_session'`, the standard
|
|
28
28
|
* bootstrap block keyed off `default_test_*` constants. Builders call
|
|
29
|
-
* `
|
|
30
|
-
* is omitted.
|
|
29
|
+
* `default_test_backend_paths(name)` (a repo-namespaced tmpdir) internally
|
|
30
|
+
* when the optional `paths` is omitted.
|
|
31
31
|
*
|
|
32
32
|
* @module
|
|
33
33
|
*/
|
|
34
34
|
import { basename, dirname } from 'node:path';
|
|
35
|
-
import {
|
|
35
|
+
import { default_test_backend_paths } from './build_test_backend_paths.js';
|
|
36
36
|
import { default_test_bootstrap_token, default_test_cookie_keys, default_test_keeper_password, default_test_keeper_username } from './default_secrets.js';
|
|
37
|
-
import { ACTION_RATE_LIMIT_ENABLED_ENV, ACTION_RATE_LIMIT_MAX_ATTEMPTS_ENV, SPINE_ACCOUNT_BOOTSTRAP_PATH, SPINE_RPC_PATH, SPINE_WS_PATH } from './spine_surface_constants.js';
|
|
37
|
+
import { ACTION_RATE_LIMIT_ENABLED_ENV, ACTION_RATE_LIMIT_MAX_ATTEMPTS_ENV, AUDIT_SSE_KEEP_ALIVE_MS_ENV, SPINE_ACCOUNT_BOOTSTRAP_PATH, SPINE_RPC_PATH, SPINE_WS_PATH, WS_RECEIVE_TIMEOUT_MS_ENV } from './spine_surface_constants.js';
|
|
38
38
|
/**
|
|
39
39
|
* The `HOST` both builders bind a backend to — loopback IPv4, since
|
|
40
40
|
* `localhost` can resolve to `::1` and a backend bound there misses a client
|
|
@@ -78,6 +78,20 @@ export const action_rate_limit_env = (options) => ({
|
|
|
78
78
|
? { [ACTION_RATE_LIMIT_MAX_ATTEMPTS_ENV]: String(options.action_rate_limit_max_attempts) }
|
|
79
79
|
: {})
|
|
80
80
|
});
|
|
81
|
+
/**
|
|
82
|
+
* The `extra_env` entries carrying the timing overrides, shared by the TS and
|
|
83
|
+
* Rust backend configs so one option drives both impls. Each value is passed
|
|
84
|
+
* through as given, so the binary refuses a bad one instead of the harness
|
|
85
|
+
* hiding it.
|
|
86
|
+
*/
|
|
87
|
+
export const timing_env = (options) => ({
|
|
88
|
+
...(options.audit_sse_keep_alive_ms !== undefined
|
|
89
|
+
? { [AUDIT_SSE_KEEP_ALIVE_MS_ENV]: String(options.audit_sse_keep_alive_ms) }
|
|
90
|
+
: {}),
|
|
91
|
+
...(options.ws_receive_timeout_ms !== undefined
|
|
92
|
+
? { [WS_RECEIVE_TIMEOUT_MS_ENV]: String(options.ws_receive_timeout_ms) }
|
|
93
|
+
: {})
|
|
94
|
+
});
|
|
81
95
|
/**
|
|
82
96
|
* Capabilities shared by TS-family backends — only what the family
|
|
83
97
|
* guarantees: the declared spine surface's mounts and the behavior of its
|
|
@@ -136,7 +150,7 @@ const build_default_bootstrap = (paths, overrides) => ({
|
|
|
136
150
|
* genuinely differs.
|
|
137
151
|
*/
|
|
138
152
|
export const make_default_ts_backend_config = (opts) => {
|
|
139
|
-
const { name, port, start_command, database_url = 'memory://', extra_env, capabilities, paths =
|
|
153
|
+
const { name, port, start_command, database_url = 'memory://', extra_env, capabilities, paths = default_test_backend_paths(name), bootstrap_overrides, port_env_var = 'PORT', cookie_name = 'fuz_session', daemon_token_dir_env } = opts;
|
|
140
154
|
const bootstrap = build_default_bootstrap(paths, bootstrap_overrides);
|
|
141
155
|
return {
|
|
142
156
|
name,
|
|
@@ -155,6 +169,9 @@ export const make_default_ts_backend_config = (opts) => {
|
|
|
155
169
|
DATABASE_URL: database_url,
|
|
156
170
|
SECRET_FUZ_COOKIE_KEYS: default_test_cookie_keys,
|
|
157
171
|
FUZ_ALLOWED_ORIGINS: 'http://localhost:*',
|
|
172
|
+
// any port, so a harness can spawn on whichever is free — a wildcard,
|
|
173
|
+
// which boots only with the opt-in
|
|
174
|
+
FUZ_ALLOW_ORIGIN_WILDCARDS: 'true',
|
|
158
175
|
FUZ_BOOTSTRAP_TOKEN_PATH: paths.bootstrap_token_path,
|
|
159
176
|
...daemon_token_dir_entry(daemon_token_dir_env, bootstrap),
|
|
160
177
|
...extra_env
|
|
@@ -170,7 +187,7 @@ export const make_default_ts_backend_config = (opts) => {
|
|
|
170
187
|
* the 120s startup window for cargo's first-run build cost.
|
|
171
188
|
*/
|
|
172
189
|
export const make_default_rust_backend_config = (opts) => {
|
|
173
|
-
const { name, port, start_command, database_url, extra_env, capabilities, paths =
|
|
190
|
+
const { name, port, start_command, database_url, extra_env, capabilities, paths = default_test_backend_paths(name), bootstrap_overrides, port_env_var = 'PORT', rust_log = 'info', cookie_name = 'fuz_session', daemon_token_dir_env } = opts;
|
|
174
191
|
const bootstrap = build_default_bootstrap(paths, bootstrap_overrides);
|
|
175
192
|
return {
|
|
176
193
|
name,
|
|
@@ -189,11 +206,14 @@ export const make_default_rust_backend_config = (opts) => {
|
|
|
189
206
|
DATABASE_URL: database_url,
|
|
190
207
|
SECRET_FUZ_COOKIE_KEYS: default_test_cookie_keys,
|
|
191
208
|
FUZ_ALLOWED_ORIGINS: 'http://localhost:*',
|
|
209
|
+
// any port, so a harness can spawn on whichever is free — a wildcard,
|
|
210
|
+
// which boots only with the opt-in
|
|
211
|
+
FUZ_ALLOW_ORIGIN_WILDCARDS: 'true',
|
|
192
212
|
FUZ_BOOTSTRAP_TOKEN_PATH: paths.bootstrap_token_path,
|
|
193
213
|
// Self-wipe the auth-namespace schema before migrations on every
|
|
194
|
-
// boot. Read by `fuz_testing::
|
|
195
|
-
// which the consumer's test binary
|
|
196
|
-
// `pre_migration_hook
|
|
214
|
+
// boot. Read by the hook `fuz_testing::startup_reset_hook` builds,
|
|
215
|
+
// which the consumer's test binary passes as its
|
|
216
|
+
// `pre_migration_hook`, run between pool creation and
|
|
197
217
|
// `fuz_db::run_migrations`. The `_testing_reset` RPC action
|
|
198
218
|
// (per-test reset) is orthogonal.
|
|
199
219
|
FUZ_TESTING_RESET_DB_ON_STARTUP: 'true',
|
|
@@ -34,8 +34,8 @@ export declare const spine_session_options: SessionOptions<string>;
|
|
|
34
34
|
* suite's bootstrap-seeded role) and `SPINE_PARTICIPANT_ROLE`
|
|
35
35
|
* (`grant_paths: ['admin']`; the role-gated-participation suite's
|
|
36
36
|
* admin-grantable role). Threaded into the cell spec set's role-validity gate
|
|
37
|
-
* **and** the auth grantability gates; the
|
|
38
|
-
*
|
|
37
|
+
* **and** the auth grantability gates; the same membership is in the Rust
|
|
38
|
+
* stub's `RoleRegistry` (which the cell spec set also reads). The `participant`
|
|
39
39
|
* entry also gives the admin suite real app-role grant-path coverage
|
|
40
40
|
* (`admin_account_list.grantable_roles` carries it on both spines).
|
|
41
41
|
*/
|
|
@@ -47,12 +47,12 @@ export interface SpineRpcEndpointsOptions {
|
|
|
47
47
|
* server-initiated fan-out (`role_grant_offer_received` / `_accepted` /
|
|
48
48
|
* `_declined` / `_retracted` / `_supersede`, flat `role_grant_revoke`).
|
|
49
49
|
*
|
|
50
|
-
* **Shared-instance trap.** Pass the SAME `
|
|
51
|
-
* instance the WS endpoint registers connections against — the
|
|
52
|
-
* *is* the
|
|
50
|
+
* **Shared-instance trap.** Pass the SAME `ConnectionRegistry`
|
|
51
|
+
* instance the WS endpoint registers connections against — the registry
|
|
52
|
+
* *is* the fan-out target, so a separate instance would fan out to an
|
|
53
53
|
* empty registry and reach nobody (silently). The TS spine binary
|
|
54
|
-
* constructs one `
|
|
55
|
-
* `
|
|
54
|
+
* constructs one `ConnectionRegistry` and threads it both here and into
|
|
55
|
+
* `register_action_ws`.
|
|
56
56
|
*
|
|
57
57
|
* Omitted (the default) for the shared `create_spine_surface_spec` path —
|
|
58
58
|
* surface generation doesn't depend on it, and it must stay absent there so
|
|
@@ -26,8 +26,8 @@ export const spine_session_options = create_session_config('fuz_session');
|
|
|
26
26
|
* suite's bootstrap-seeded role) and `SPINE_PARTICIPANT_ROLE`
|
|
27
27
|
* (`grant_paths: ['admin']`; the role-gated-participation suite's
|
|
28
28
|
* admin-grantable role). Threaded into the cell spec set's role-validity gate
|
|
29
|
-
* **and** the auth grantability gates; the
|
|
30
|
-
*
|
|
29
|
+
* **and** the auth grantability gates; the same membership is in the Rust
|
|
30
|
+
* stub's `RoleRegistry` (which the cell spec set also reads). The `participant`
|
|
31
31
|
* entry also gives the admin suite real app-role grant-path coverage
|
|
32
32
|
* (`admin_account_list.grantable_roles` carries it on both spines).
|
|
33
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fact_serving.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/fact_serving.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"fact_serving.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/fact_serving.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA6E9B,OAAO,KAAK,EAAE,uCAAuC,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAElG;;;;;GAKG;AACH,MAAM,WAAW,2BAA4B,SAAQ,uCAAuC;IAC3F,QAAQ,CAAC,sBAAsB,CAAC,EAAE,SAAS,CAAC;CAC5C;AAgBD,iEAAiE;AACjE,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,uFAAuF;IACvF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAC1B,SAAS,IAAI,CAAC,WAAW,EAAE,iBAAiB,GAAG,6BAA6B,CAAC,EAC7E,UAAU,MAAM,EAChB,OAAO,iBAAiB,KACtB,OAAO,CAAC,MAAM,CAaV,CAAC;AAgDR,eAAO,MAAM,iCAAiC,GAAI,SAAS,2BAA2B,KAAG,IAoZxF,CAAC"}
|
|
@@ -16,6 +16,10 @@ import '../assert_dev_env.js';
|
|
|
16
16
|
* - **404-mask** — a missing cell and a viewable cell that doesn't reference
|
|
17
17
|
* the hash both 404 (never 403, never "exists elsewhere"), and every masked
|
|
18
18
|
* 404 is bodyless, so its shape names no branch;
|
|
19
|
+
* - **unviewable cell hides its refs** — for a private cell the caller can't
|
|
20
|
+
* view, a hash it references and one it doesn't answer the same masked 404
|
|
21
|
+
* (the view check runs first, so the work done is the same too — each
|
|
22
|
+
* spine's own suite pins that order);
|
|
19
23
|
* - **hardening headers** — a served fact carries `X-Content-Type-Options:
|
|
20
24
|
* nosniff`, the `default-src 'none'; sandbox` CSP, and `Cache-Control:
|
|
21
25
|
* private, max-age=300`, whatever its content type;
|
|
@@ -25,6 +29,9 @@ import '../assert_dev_env.js';
|
|
|
25
29
|
* `file:` URL naming another hash's file is a masked 404 on both routes,
|
|
26
30
|
* refused before any disk read (each spine's unit suite proves the bytes
|
|
27
31
|
* behind such a URL never serve);
|
|
32
|
+
* - **missing disk file** — a row whose `file:` URL addresses its own hash but
|
|
33
|
+
* whose file isn't on disk is a masked 404 (opened before any 200 commits;
|
|
34
|
+
* needs a backend serving external facts from disk, not by X-Accel);
|
|
28
35
|
* - **multi-actor fallthrough** — a multi-actor caller resolves to a null
|
|
29
36
|
* (anonymous) context on the (`acting`-less) cell-scoped route, so it can't
|
|
30
37
|
* read its own *private* fact there (admitted only by public cells). Opt-in
|
|
@@ -52,6 +59,7 @@ import '../assert_dev_env.js';
|
|
|
52
59
|
*/
|
|
53
60
|
import { describe, assert } from 'vitest';
|
|
54
61
|
import { z } from 'zod';
|
|
62
|
+
import { fact_hash_bytes } from '@fuzdev/fuz_util/fact_hash.ts';
|
|
55
63
|
import { FactHashSchema } from '../../primitive_schemas.js';
|
|
56
64
|
import { CellCreateOutput } from '../../auth/cell_action_specs.js';
|
|
57
65
|
import { FACT_CACHE_CONTROL, FACT_CONTENT_SECURITY_POLICY, FACT_X_CONTENT_TYPE_OPTIONS } from '../../server/fact_security_headers.js';
|
|
@@ -179,6 +187,30 @@ export const describe_fact_serving_cross_tests = (options) => {
|
|
|
179
187
|
const a_via_a = await fact_get(t, cell_fact_path(a_cell, hash), a.create_session_headers());
|
|
180
188
|
assert.strictEqual(a_via_a.status, 200, 'A could not read its own private fact');
|
|
181
189
|
});
|
|
190
|
+
test_if(capabilities.fact_serving, 'unviewable private cell: a referenced and an unreferenced hash answer alike', async () => {
|
|
191
|
+
const fixture = await setup_test();
|
|
192
|
+
const owner = await fixture.create_account({ username: 'fact_unviewable_owner' });
|
|
193
|
+
const other = await fixture.create_account({ username: 'fact_unviewable_other' });
|
|
194
|
+
const hash = await cross_put_fact(fixture, rpc_path, {
|
|
195
|
+
content: 'unviewable-cell-bytes',
|
|
196
|
+
holder: owner.actor.id
|
|
197
|
+
});
|
|
198
|
+
const t = fixture.fresh_transport();
|
|
199
|
+
const cell_id = await create_cell_with_ref(t, owner.create_session_headers(), hash, 'private');
|
|
200
|
+
const anon = fixture.fresh_transport({ origin: null });
|
|
201
|
+
// the view check runs before the edge check, so a caller that can't
|
|
202
|
+
// view the cell gets one answer whatever the cell references
|
|
203
|
+
for (const [label, transport, headers] of [
|
|
204
|
+
['anon', anon, {}],
|
|
205
|
+
['non-viewer', t, other.create_session_headers()]
|
|
206
|
+
]) {
|
|
207
|
+
const referenced = await fact_get(transport, cell_fact_path(cell_id, hash), headers);
|
|
208
|
+
const unreferenced = await fact_get(transport, cell_fact_path(cell_id, UNRELATED_HASH), headers);
|
|
209
|
+
assert_masked_404(referenced, `${label}: referenced hash`);
|
|
210
|
+
assert_masked_404(unreferenced, `${label}: unreferenced hash`);
|
|
211
|
+
assert.strictEqual(unreferenced.content_type, referenced.content_type, `${label}: content type differs`);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
182
214
|
test_if(capabilities.fact_serving, '404-mask: missing cell, missing edge, and edge-without-bytes all 404 alike', async () => {
|
|
183
215
|
const fixture = await setup_test();
|
|
184
216
|
const hash = await put_fact(fixture, '404-mask-bytes');
|
|
@@ -222,6 +254,22 @@ export const describe_fact_serving_cross_tests = (options) => {
|
|
|
222
254
|
const anon = fixture.fresh_transport({ origin: null });
|
|
223
255
|
assert_masked_404(await fact_get(anon, cell_fact_path(cell_id, hash), {}), 'foreign-url fact via a public cell');
|
|
224
256
|
});
|
|
257
|
+
test_if(capabilities.fact_serving, 'an external fact whose disk file is missing is a masked 404', async () => {
|
|
258
|
+
const fixture = await setup_test();
|
|
259
|
+
const owner = await fixture.create_account({ username: 'fact_missing_file_owner' });
|
|
260
|
+
const content = 'external-row-whose-file-is-missing';
|
|
261
|
+
const hex = fact_hash_bytes(new TextEncoder().encode(content)).slice('blake3:'.length);
|
|
262
|
+
const hash = await cross_put_fact(fixture, rpc_path, {
|
|
263
|
+
content,
|
|
264
|
+
content_type: 'text/plain',
|
|
265
|
+
holder: owner.actor.id,
|
|
266
|
+
external_url: `file:${hex.slice(0, 2)}/${hex.slice(2)}`
|
|
267
|
+
});
|
|
268
|
+
assert.strictEqual(hash, `blake3:${hex}`);
|
|
269
|
+
const cell_id = await create_cell_with_ref(fixture.fresh_transport(), owner.create_session_headers(), hash, 'public');
|
|
270
|
+
const anon = fixture.fresh_transport({ origin: null });
|
|
271
|
+
assert_masked_404(await fact_get(anon, cell_fact_path(cell_id, hash), {}), 'external fact with no file on disk');
|
|
272
|
+
});
|
|
225
273
|
test_if(capabilities.fact_serving && capabilities.fact_serving_admin_hash, "an external_url naming another fact's file is a masked 404 on the bare-hash route", async () => {
|
|
226
274
|
const fixture = await setup_test();
|
|
227
275
|
const hash = await put_foreign_url_fact(fixture);
|
|
@@ -35,8 +35,7 @@ import '../assert_dev_env.js';
|
|
|
35
35
|
*
|
|
36
36
|
* @module
|
|
37
37
|
*/
|
|
38
|
-
import type { RpcAction } from '../../actions/
|
|
39
|
-
import type { Action } from '../../actions/action_types.js';
|
|
38
|
+
import type { Action, RpcAction } from '../../actions/action_types.js';
|
|
40
39
|
import type { AppDeps } from '../../auth/deps.js';
|
|
41
40
|
import type { DaemonTokenState } from '../../auth/daemon_token.js';
|
|
42
41
|
import type { NotificationSender } from '../../auth/role_grant_offer_notifications.js';
|
|
@@ -53,8 +52,8 @@ export interface FullSpineMountOptions {
|
|
|
53
52
|
readonly daemon_token_state: DaemonTokenState;
|
|
54
53
|
/**
|
|
55
54
|
* WS notification sender for the role-grant-offer fan-out. Pass the SAME
|
|
56
|
-
* `
|
|
57
|
-
* (the
|
|
55
|
+
* `ConnectionRegistry` the WS endpoint registers connections against
|
|
56
|
+
* (the registry is the fan-out target). Omitted for enumeration.
|
|
58
57
|
*/
|
|
59
58
|
readonly notification_sender?: NotificationSender | null;
|
|
60
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"full_spine_mount.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/full_spine_mount.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"full_spine_mount.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/full_spine_mount.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAGvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAMvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAmC7D,6EAA6E;AAC7E,MAAM,WAAW,qBAAqB;IACrC;;;;;;OAMG;IACH,QAAQ,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACzD;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B,GACxC,MAAM,OAAO,EACb,SAAS,qBAAqB,KAC5B,KAAK,CAAC,SAAS,CAkDjB,CAAC;AAEF,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC9B,gFAAgF;IAChF,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACvC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACnC;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,GAClC,MAAM,OAAO,EACb,SAAS,qBAAqB,KAC5B,cAUF,CAAC;AAaF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B,QAAO,KAAK,CAAC,eAAe,CAOvE,CAAC"}
|
|
@@ -11,6 +11,7 @@ import { FACT_DROP_TABLES } from '../../db/fact_ddl.js';
|
|
|
11
11
|
import { create_testing_action_manifest_action, create_testing_actions, create_testing_shorten_credential_expiry_action } from './testing_reset_actions.js';
|
|
12
12
|
import { create_testing_origin_check_action } from './testing_origin_check.js';
|
|
13
13
|
import { test_cell_gated_create_authorize } from './test_cell_gated_create_authorize.js';
|
|
14
|
+
import { test_cell_grant_steward_revoke_authorize } from './test_cell_grant_steward_revoke_authorize.js';
|
|
14
15
|
import { spine_roles, spine_session_options } from './default_spine_surface.js';
|
|
15
16
|
import { SPINE_RPC_PATH } from './spine_surface_constants.js';
|
|
16
17
|
/**
|
|
@@ -60,8 +61,14 @@ export const build_full_spine_rpc_actions = (deps, options) => {
|
|
|
60
61
|
// parentless creates stay open (the other cell suites are unaffected).
|
|
61
62
|
// The handler hands the governing root's `policy` to the (pure)
|
|
62
63
|
// authorizer, whose `validate_policy` accepts or refuses each policy
|
|
63
|
-
// write.
|
|
64
|
-
|
|
64
|
+
// write. Beside it the steward-revoke test policy (twin of the Rust
|
|
65
|
+
// stub's `TestCellGrantStewardRevokeAuthorize`): a scoped `participant`
|
|
66
|
+
// grant stewards its scope, for the `cell_grant_steward` cross suite.
|
|
67
|
+
...create_all_cell_actions({
|
|
68
|
+
...deps,
|
|
69
|
+
authorize_create: test_cell_gated_create_authorize,
|
|
70
|
+
authorize_grant_revoke: test_cell_grant_steward_revoke_authorize
|
|
71
|
+
}, { roles: spine_roles }),
|
|
65
72
|
...create_actor_lookup_actions(deps),
|
|
66
73
|
...create_actor_search_actions(deps),
|
|
67
74
|
// the origin conformance table's probe — kept out of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"origin_scope.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/origin_scope.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"origin_scope.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/origin_scope.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA+C9B,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AASnE,iDAAiD;AACjD,MAAM,WAAW,2BAA4B,SAAQ,gCAAgC;IACpF,oFAAoF;IACpF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,iCAAiC,GAAI,SAAS,2BAA2B,KAAG,IA+FxF,CAAC"}
|
|
@@ -40,7 +40,7 @@ import '../assert_dev_env.js';
|
|
|
40
40
|
*/
|
|
41
41
|
import { describe, assert, test } from 'vitest';
|
|
42
42
|
import { ERROR_FORBIDDEN_ORIGIN, ERROR_PAYLOAD_TOO_LARGE } from '../../http/error_schemas.js';
|
|
43
|
-
import {
|
|
43
|
+
import { raw_http_send_head } from '../transports/raw_http.js';
|
|
44
44
|
import { test_if } from './capabilities.js';
|
|
45
45
|
import { SPINE_BODY_LIMIT_DEFAULT_BYTES } from './spine_surface_constants.js';
|
|
46
46
|
/** An origin no spine test server allows. */
|
|
@@ -110,19 +110,11 @@ export const describe_origin_scope_cross_tests = (options) => {
|
|
|
110
110
|
}
|
|
111
111
|
else {
|
|
112
112
|
// the head alone, declaring the length: the 413 must not wait on a body byte
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
`content-type: application/json\r\n` +
|
|
118
|
-
`content-length: ${over}\r\n` +
|
|
119
|
-
`\r\n`;
|
|
120
|
-
const { received } = await raw_http_exchange(base_url, request, {
|
|
121
|
-
read_timeout_ms: RAW_HTTP_READ_TIMEOUT_MS,
|
|
122
|
-
until: 'response'
|
|
113
|
+
const response = await raw_http_send_head(base_url, {
|
|
114
|
+
path: UNROUTED_PATH,
|
|
115
|
+
headers: { origin: FOREIGN_ORIGIN, 'content-type': 'application/json' },
|
|
116
|
+
content_length: over
|
|
123
117
|
});
|
|
124
|
-
const response = raw_http_parse_response(received);
|
|
125
|
-
assert.ok(response, `no whole response; received: ${received.slice(0, 200)}`);
|
|
126
118
|
status = response.status;
|
|
127
119
|
text = response.body;
|
|
128
120
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer_ping_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/peer_ping_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiD9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"peer_ping_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../../src/lib/testing/cross_backend/peer_ping_ws.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAiD9B,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AA0B1E,uDAAuD;AACvD,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC9D,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,SAAS,qBAAqB,KAAG,IAiQ5E,CAAC"}
|