@fuzdev/fuz_app 0.54.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/CLAUDE.md +214 -103
- package/dist/actions/action_bridge.d.ts +8 -5
- package/dist/actions/action_bridge.d.ts.map +1 -1
- package/dist/actions/action_bridge.js +1 -11
- package/dist/actions/action_codegen.d.ts +32 -0
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +35 -15
- package/dist/actions/action_registry.d.ts.map +1 -1
- package/dist/actions/action_registry.js +5 -2
- package/dist/actions/action_rpc.d.ts +141 -22
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +106 -187
- package/dist/actions/action_spec.d.ts +55 -16
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +16 -11
- package/dist/actions/action_types.d.ts +28 -60
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/action_types.js +13 -5
- package/dist/actions/broadcast_api.d.ts +2 -2
- package/dist/actions/broadcast_api.js +2 -2
- package/dist/actions/compile_action_registry.d.ts +50 -0
- package/dist/actions/compile_action_registry.d.ts.map +1 -0
- package/dist/actions/compile_action_registry.js +69 -0
- package/dist/actions/heartbeat.d.ts +8 -4
- package/dist/actions/heartbeat.d.ts.map +1 -1
- package/dist/actions/heartbeat.js +5 -4
- package/dist/actions/perform_action.d.ts +145 -0
- package/dist/actions/perform_action.d.ts.map +1 -0
- package/dist/actions/perform_action.js +258 -0
- package/dist/actions/register_action_ws.d.ts +46 -40
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +101 -159
- package/dist/actions/register_ws_endpoint.d.ts +15 -10
- package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
- package/dist/actions/register_ws_endpoint.js +54 -7
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports.js +0 -4
- package/dist/actions/transports_ws_auth_guard.d.ts +1 -1
- package/dist/actions/transports_ws_auth_guard.js +1 -1
- package/dist/actions/transports_ws_backend.d.ts +1 -1
- package/dist/actions/transports_ws_backend.js +1 -1
- package/dist/auth/CLAUDE.md +794 -410
- package/dist/auth/account_action_specs.d.ts +28 -7
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_action_specs.js +7 -7
- package/dist/auth/account_actions.d.ts +7 -13
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +26 -35
- package/dist/auth/account_queries.d.ts +52 -16
- package/dist/auth/account_queries.d.ts.map +1 -1
- package/dist/auth/account_queries.js +87 -38
- package/dist/auth/account_routes.d.ts +9 -11
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +118 -46
- package/dist/auth/account_schema.d.ts +46 -35
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +21 -28
- package/dist/auth/admin_action_specs.d.ts +100 -32
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +64 -33
- package/dist/auth/admin_actions.d.ts +13 -19
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +37 -41
- package/dist/auth/audit_emitter.d.ts +160 -0
- package/dist/auth/audit_emitter.d.ts.map +1 -0
- package/dist/auth/audit_emitter.js +83 -0
- package/dist/auth/audit_log_queries.d.ts +17 -48
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +20 -56
- package/dist/auth/audit_log_routes.d.ts +1 -1
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +7 -3
- package/dist/auth/audit_log_schema.d.ts +92 -32
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +75 -46
- package/dist/auth/auth_guard_resolver.d.ts +44 -0
- package/dist/auth/auth_guard_resolver.d.ts.map +1 -0
- package/dist/auth/auth_guard_resolver.js +56 -0
- package/dist/auth/bearer_auth.d.ts +9 -7
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bearer_auth.js +13 -21
- package/dist/auth/bootstrap_account.d.ts +7 -7
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +7 -7
- package/dist/auth/bootstrap_routes.d.ts.map +1 -1
- package/dist/auth/bootstrap_routes.js +11 -10
- package/dist/auth/cleanup.d.ts +20 -26
- package/dist/auth/cleanup.d.ts.map +1 -1
- package/dist/auth/cleanup.js +33 -42
- package/dist/auth/credential_type_schema.d.ts +115 -0
- package/dist/auth/credential_type_schema.d.ts.map +1 -0
- package/dist/auth/credential_type_schema.js +127 -0
- package/dist/auth/daemon_token_middleware.d.ts +23 -11
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +28 -22
- package/dist/auth/ddl.d.ts +2 -2
- package/dist/auth/ddl.d.ts.map +1 -1
- package/dist/auth/ddl.js +6 -6
- package/dist/auth/deps.d.ts +7 -18
- package/dist/auth/deps.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.d.ts +117 -0
- package/dist/auth/grant_path_schema.d.ts.map +1 -0
- package/dist/auth/grant_path_schema.js +137 -0
- package/dist/auth/invite_queries.d.ts +12 -1
- package/dist/auth/invite_queries.d.ts.map +1 -1
- package/dist/auth/invite_queries.js +12 -1
- package/dist/auth/invite_schema.d.ts +1 -1
- package/dist/auth/invite_schema.d.ts.map +1 -1
- package/dist/auth/invite_schema.js +1 -1
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +9 -4
- package/dist/auth/migrations.d.ts +37 -14
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +79 -32
- package/dist/auth/request_context.d.ts +331 -61
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +378 -95
- package/dist/auth/{permit_offer_action_specs.d.ts → role_grant_offer_action_specs.d.ts} +163 -94
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -0
- package/dist/auth/role_grant_offer_action_specs.js +262 -0
- package/dist/auth/role_grant_offer_actions.d.ts +104 -0
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -0
- package/dist/auth/role_grant_offer_actions.js +473 -0
- package/dist/auth/{permit_offer_notifications.d.ts → role_grant_offer_notifications.d.ts} +90 -70
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -0
- package/dist/auth/role_grant_offer_notifications.js +182 -0
- package/dist/auth/role_grant_offer_queries.d.ts +242 -0
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -0
- package/dist/auth/role_grant_offer_queries.js +533 -0
- package/dist/auth/role_grant_offer_schema.d.ts +150 -0
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -0
- package/dist/auth/{permit_offer_schema.js → role_grant_offer_schema.js} +60 -36
- package/dist/auth/role_grant_queries.d.ts +231 -0
- package/dist/auth/role_grant_queries.d.ts.map +1 -0
- package/dist/auth/role_grant_queries.js +320 -0
- package/dist/auth/role_schema.d.ts +150 -40
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +144 -45
- package/dist/auth/scope_kind_schema.d.ts +96 -0
- package/dist/auth/scope_kind_schema.d.ts.map +1 -0
- package/dist/auth/scope_kind_schema.js +94 -0
- package/dist/auth/self_service_role_action_specs.d.ts +6 -1
- package/dist/auth/self_service_role_action_specs.d.ts.map +1 -1
- package/dist/auth/self_service_role_action_specs.js +3 -1
- package/dist/auth/self_service_role_actions.d.ts +34 -27
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +68 -48
- package/dist/auth/session_cookie.d.ts +43 -6
- package/dist/auth/session_cookie.d.ts.map +1 -1
- package/dist/auth/session_cookie.js +31 -5
- package/dist/auth/session_middleware.d.ts +37 -3
- package/dist/auth/session_middleware.d.ts.map +1 -1
- package/dist/auth/session_middleware.js +33 -7
- package/dist/auth/signup_routes.d.ts.map +1 -1
- package/dist/auth/signup_routes.js +48 -19
- package/dist/auth/standard_action_specs.d.ts +2 -2
- package/dist/auth/standard_action_specs.js +4 -4
- package/dist/auth/standard_rpc_actions.d.ts +23 -19
- package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
- package/dist/auth/standard_rpc_actions.js +12 -12
- package/dist/db/migrate.d.ts +12 -8
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +10 -7
- package/dist/dev/setup.d.ts +2 -2
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +9 -7
- package/dist/env/load.d.ts +1 -1
- package/dist/env/load.js +1 -1
- package/dist/hono_context.d.ts +64 -5
- package/dist/hono_context.d.ts.map +1 -1
- package/dist/hono_context.js +38 -2
- package/dist/http/CLAUDE.md +264 -87
- package/dist/http/auth_shape.d.ts +191 -0
- package/dist/http/auth_shape.d.ts.map +1 -0
- package/dist/http/auth_shape.js +237 -0
- package/dist/http/common_routes.js +3 -3
- package/dist/http/db_routes.d.ts +4 -0
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +44 -7
- package/dist/http/error_schemas.d.ts +132 -19
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +132 -40
- package/dist/http/jsonrpc_errors.d.ts +27 -2
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +26 -2
- package/dist/http/pending_effects.d.ts +71 -18
- package/dist/http/pending_effects.d.ts.map +1 -1
- package/dist/http/pending_effects.js +87 -18
- package/dist/http/proxy.d.ts +52 -5
- package/dist/http/proxy.d.ts.map +1 -1
- package/dist/http/proxy.js +92 -14
- package/dist/http/route_spec.d.ts +113 -41
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +130 -52
- package/dist/http/schema_helpers.d.ts +3 -2
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +9 -2
- package/dist/http/surface.d.ts +2 -1
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +1 -2
- package/dist/http/surface_query.d.ts +39 -35
- package/dist/http/surface_query.d.ts.map +1 -1
- package/dist/http/surface_query.js +79 -36
- package/dist/primitive_schemas.d.ts +39 -0
- package/dist/primitive_schemas.d.ts.map +1 -0
- package/dist/primitive_schemas.js +40 -0
- package/dist/realtime/sse_auth_guard.d.ts +5 -5
- package/dist/realtime/sse_auth_guard.js +9 -9
- package/dist/runtime/mock.d.ts +1 -1
- package/dist/runtime/mock.js +1 -1
- package/dist/server/app_backend.d.ts +14 -11
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +12 -8
- package/dist/server/app_server.d.ts +7 -7
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +36 -31
- package/dist/server/validate_nginx.d.ts +1 -1
- package/dist/server/validate_nginx.js +1 -1
- package/dist/testing/CLAUDE.md +73 -55
- package/dist/testing/admin_integration.d.ts +5 -6
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +100 -96
- package/dist/testing/adversarial_headers.js +1 -1
- package/dist/testing/app_server.d.ts +11 -14
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +18 -17
- package/dist/testing/assertions.d.ts.map +1 -1
- package/dist/testing/assertions.js +2 -1
- package/dist/testing/attack_surface.d.ts.map +1 -1
- package/dist/testing/attack_surface.js +15 -9
- package/dist/testing/audit_completeness.d.ts +2 -2
- package/dist/testing/audit_completeness.d.ts.map +1 -1
- package/dist/testing/audit_completeness.js +53 -39
- package/dist/testing/auth_apps.d.ts +5 -4
- package/dist/testing/auth_apps.d.ts.map +1 -1
- package/dist/testing/auth_apps.js +28 -22
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +5 -5
- package/dist/testing/db.d.ts +1 -1
- package/dist/testing/db.d.ts.map +1 -1
- package/dist/testing/db.js +4 -4
- package/dist/testing/db_entities.d.ts +22 -0
- package/dist/testing/db_entities.d.ts.map +1 -0
- package/dist/testing/db_entities.js +28 -0
- package/dist/testing/entities.d.ts +10 -8
- package/dist/testing/entities.d.ts.map +1 -1
- package/dist/testing/entities.js +22 -18
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +13 -14
- package/dist/testing/integration_helpers.d.ts +8 -6
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +29 -23
- package/dist/testing/middleware.d.ts +15 -11
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +75 -32
- package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
- package/dist/testing/rpc_attack_surface.js +40 -24
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +3 -1
- package/dist/testing/rpc_round_trip.d.ts +1 -1
- package/dist/testing/rpc_round_trip.d.ts.map +1 -1
- package/dist/testing/rpc_round_trip.js +14 -13
- package/dist/testing/sse_round_trip.d.ts +3 -4
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +7 -11
- package/dist/testing/standard.d.ts +1 -1
- package/dist/testing/stubs.d.ts +25 -0
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +43 -2
- package/dist/testing/surface_invariants.d.ts +2 -2
- package/dist/testing/ws_round_trip.d.ts +12 -13
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +24 -12
- package/dist/ui/AdminAccounts.svelte +23 -20
- package/dist/ui/AdminOverview.svelte +15 -13
- package/dist/ui/AdminOverview.svelte.d.ts.map +1 -1
- package/dist/ui/{AdminPermitHistory.svelte → AdminRoleGrantHistory.svelte} +12 -12
- package/dist/ui/AdminRoleGrantHistory.svelte.d.ts +4 -0
- package/dist/ui/AdminRoleGrantHistory.svelte.d.ts.map +1 -0
- package/dist/ui/BootstrapForm.svelte +1 -1
- package/dist/ui/CLAUDE.md +65 -59
- package/dist/ui/{PermitOfferForm.svelte → RoleGrantOfferForm.svelte} +37 -22
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts +20 -0
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts.map +1 -0
- package/dist/ui/{PermitOfferHistory.svelte → RoleGrantOfferHistory.svelte} +12 -12
- package/dist/ui/{PermitOfferHistory.svelte.d.ts → RoleGrantOfferHistory.svelte.d.ts} +4 -4
- package/dist/ui/RoleGrantOfferHistory.svelte.d.ts.map +1 -0
- package/dist/ui/{PermitOfferInbox.svelte → RoleGrantOfferInbox.svelte} +14 -14
- package/dist/ui/{PermitOfferInbox.svelte.d.ts → RoleGrantOfferInbox.svelte.d.ts} +4 -4
- package/dist/ui/RoleGrantOfferInbox.svelte.d.ts.map +1 -0
- package/dist/ui/SignupForm.svelte +1 -1
- package/dist/ui/SurfaceExplorer.svelte +35 -15
- package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
- package/dist/ui/account_sessions_state.svelte.d.ts +2 -3
- package/dist/ui/account_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/account_sessions_state.svelte.js +2 -3
- package/dist/ui/admin_accounts_state.svelte.d.ts +25 -18
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.js +28 -17
- package/dist/ui/admin_rpc_adapters.d.ts +20 -20
- package/dist/ui/admin_rpc_adapters.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.js +17 -17
- package/dist/ui/admin_sessions_state.svelte.d.ts +2 -2
- package/dist/ui/admin_sessions_state.svelte.js +2 -2
- package/dist/ui/audit_log_state.svelte.d.ts +7 -7
- package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.js +6 -6
- package/dist/ui/auth_state.svelte.d.ts +3 -3
- package/dist/ui/auth_state.svelte.d.ts.map +1 -1
- package/dist/ui/auth_state.svelte.js +6 -6
- package/dist/ui/format_scope.d.ts +2 -2
- package/dist/ui/format_scope.js +2 -2
- package/dist/ui/{permit_offers_state.svelte.d.ts → role_grant_offers_state.svelte.d.ts} +39 -31
- package/dist/ui/role_grant_offers_state.svelte.d.ts.map +1 -0
- package/dist/ui/{permit_offers_state.svelte.js → role_grant_offers_state.svelte.js} +25 -19
- package/dist/ui/ui_format.js +2 -2
- package/package.json +3 -3
- package/dist/auth/permit_offer_action_specs.d.ts.map +0 -1
- package/dist/auth/permit_offer_action_specs.js +0 -227
- package/dist/auth/permit_offer_actions.d.ts +0 -110
- package/dist/auth/permit_offer_actions.d.ts.map +0 -1
- package/dist/auth/permit_offer_actions.js +0 -452
- package/dist/auth/permit_offer_notifications.d.ts.map +0 -1
- package/dist/auth/permit_offer_notifications.js +0 -182
- package/dist/auth/permit_offer_queries.d.ts +0 -183
- package/dist/auth/permit_offer_queries.d.ts.map +0 -1
- package/dist/auth/permit_offer_queries.js +0 -408
- package/dist/auth/permit_offer_schema.d.ts +0 -103
- package/dist/auth/permit_offer_schema.d.ts.map +0 -1
- package/dist/auth/permit_queries.d.ts +0 -210
- package/dist/auth/permit_queries.d.ts.map +0 -1
- package/dist/auth/permit_queries.js +0 -294
- package/dist/auth/require_keeper.d.ts +0 -20
- package/dist/auth/require_keeper.d.ts.map +0 -1
- package/dist/auth/require_keeper.js +0 -35
- package/dist/auth/route_guards.d.ts +0 -21
- package/dist/auth/route_guards.d.ts.map +0 -1
- package/dist/auth/route_guards.js +0 -32
- package/dist/auth/session_lifecycle.d.ts +0 -37
- package/dist/auth/session_lifecycle.d.ts.map +0 -1
- package/dist/auth/session_lifecycle.js +0 -29
- package/dist/ui/AdminPermitHistory.svelte.d.ts +0 -4
- package/dist/ui/AdminPermitHistory.svelte.d.ts.map +0 -1
- package/dist/ui/PermitOfferForm.svelte.d.ts +0 -14
- package/dist/ui/PermitOfferForm.svelte.d.ts.map +0 -1
- package/dist/ui/PermitOfferHistory.svelte.d.ts.map +0 -1
- package/dist/ui/PermitOfferInbox.svelte.d.ts.map +0 -1
- package/dist/ui/permit_offers_state.svelte.d.ts.map +0 -1
|
@@ -4,49 +4,48 @@
|
|
|
4
4
|
* Usable in tests, the adversarial auth runner, and future surface explorer UI.
|
|
5
5
|
* Replaces duplicated inline `.filter()` patterns.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* Categorical filters (`filter_authenticated_routes`, `filter_role_routes`,
|
|
8
|
+
* `filter_keeper_routes`) group the new flat-record `RouteAuth` shape into
|
|
9
|
+
* the legacy categorical buckets (`'authenticated'`, `'role'`, `'keeper'`)
|
|
10
|
+
* for adversarial test runners and the surface explorer. The buckets are
|
|
11
|
+
* derived views over the four axes (`account`, `actor`, `roles`,
|
|
12
|
+
* `credential_types`) — see `http/auth_shape.ts` for the canonical shape.
|
|
12
13
|
*
|
|
13
14
|
* @module
|
|
14
15
|
*/
|
|
15
16
|
import type { AppSurface, AppSurfaceRoute } from './surface.js';
|
|
16
17
|
/** Filter routes that require any form of authentication. */
|
|
17
18
|
export declare const filter_protected_routes: (surface: AppSurface) => Array<AppSurfaceRoute>;
|
|
18
|
-
/** Filter routes that are publicly accessible (no auth). */
|
|
19
|
+
/** Filter routes that are publicly accessible (no auth surface at all). */
|
|
19
20
|
export declare const filter_public_routes: (surface: AppSurface) => Array<AppSurfaceRoute>;
|
|
20
|
-
/** Filter all role-guarded routes (any role). */
|
|
21
|
-
export declare const filter_role_routes: (surface: AppSurface) => Array<AppSurfaceRoute
|
|
22
|
-
auth: {
|
|
23
|
-
type: "role";
|
|
24
|
-
role: string;
|
|
25
|
-
};
|
|
26
|
-
}>;
|
|
27
|
-
/** Filter routes that require basic authentication (no specific role). */
|
|
28
|
-
export declare const filter_authenticated_routes: (surface: AppSurface) => Array<AppSurfaceRoute & {
|
|
29
|
-
auth: {
|
|
30
|
-
type: "authenticated";
|
|
31
|
-
};
|
|
32
|
-
}>;
|
|
33
|
-
/** Filter routes that require keeper credentials. */
|
|
34
|
-
export declare const filter_keeper_routes: (surface: AppSurface) => Array<AppSurfaceRoute & {
|
|
35
|
-
auth: {
|
|
36
|
-
type: "keeper";
|
|
37
|
-
};
|
|
38
|
-
}>;
|
|
39
|
-
/** Filter routes that require a specific named role. */
|
|
40
|
-
export declare const filter_routes_for_role: (surface: AppSurface, role: string) => Array<AppSurfaceRoute & {
|
|
41
|
-
auth: {
|
|
42
|
-
type: "role";
|
|
43
|
-
role: string;
|
|
44
|
-
};
|
|
45
|
-
}>;
|
|
21
|
+
/** Filter all role-guarded routes (any role declared on `auth.roles`). */
|
|
22
|
+
export declare const filter_role_routes: (surface: AppSurface) => Array<AppSurfaceRoute>;
|
|
46
23
|
/**
|
|
47
|
-
*
|
|
24
|
+
* Filter routes that require basic authentication only — `account === 'required'`
|
|
25
|
+
* with no role / credential gate.
|
|
26
|
+
*/
|
|
27
|
+
export declare const filter_authenticated_routes: (surface: AppSurface) => Array<AppSurfaceRoute>;
|
|
28
|
+
/** Filter routes that require keeper credentials (`daemon_token`). */
|
|
29
|
+
export declare const filter_keeper_routes: (surface: AppSurface) => Array<AppSurfaceRoute>;
|
|
30
|
+
/** Filter routes whose `auth.roles` includes the named role. */
|
|
31
|
+
export declare const filter_routes_for_role: (surface: AppSurface, role: string) => Array<AppSurfaceRoute>;
|
|
32
|
+
/**
|
|
33
|
+
* Categorize a `RouteAuth` into one of the legacy auth buckets.
|
|
48
34
|
*
|
|
49
|
-
*
|
|
35
|
+
* Returns:
|
|
36
|
+
* - `'none'` for fully public routes (account === 'none' && actor === 'none')
|
|
37
|
+
* - `'keeper'` when `credential_types` includes `'daemon_token'`
|
|
38
|
+
* - `'role:<name>'` for each role declared on `auth.roles` (multi-role specs
|
|
39
|
+
* are emitted multiple times; callers that need single-bucket grouping
|
|
40
|
+
* should pre-collapse)
|
|
41
|
+
* - `'authenticated'` for `account === 'required'` without role / credential gate
|
|
42
|
+
* - `'optional'` when either axis is `'optional'` and no other bucket fits
|
|
43
|
+
* - `'other'` as a last-resort bucket for shapes that don't match above
|
|
44
|
+
*/
|
|
45
|
+
export type RouteAuthCategory = 'none' | 'authenticated' | 'optional' | 'keeper' | `role:${string}` | 'other';
|
|
46
|
+
/**
|
|
47
|
+
* Group routes by auth category (see `RouteAuthCategory`). Multi-role specs
|
|
48
|
+
* appear under each of their role buckets.
|
|
50
49
|
*/
|
|
51
50
|
export declare const routes_by_auth_type: (surface: AppSurface) => Map<string, Array<AppSurfaceRoute>>;
|
|
52
51
|
/** Filter routes whose path starts with `prefix`. */
|
|
@@ -66,12 +65,17 @@ export declare const format_route_key: (route: AppSurfaceRoute) => string;
|
|
|
66
65
|
/**
|
|
67
66
|
* Summarize route auth distribution across the surface.
|
|
68
67
|
*
|
|
69
|
-
*
|
|
68
|
+
* Categorical view over the four-axis flat record. Multi-role specs
|
|
69
|
+
* contribute one count per role they admit.
|
|
70
|
+
*
|
|
71
|
+
* @returns counts by auth category, with role counts broken out by role name
|
|
70
72
|
*/
|
|
71
73
|
export declare const surface_auth_summary: (surface: AppSurface) => {
|
|
72
74
|
none: number;
|
|
73
75
|
authenticated: number;
|
|
76
|
+
optional: number;
|
|
74
77
|
role: Map<string, number>;
|
|
75
78
|
keeper: number;
|
|
79
|
+
other: number;
|
|
76
80
|
};
|
|
77
81
|
//# sourceMappingURL=surface_query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface_query.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/surface_query.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"surface_query.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/surface_query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,cAAc,CAAC;AAQ9D,6DAA6D;AAC7D,eAAO,MAAM,uBAAuB,GAAI,SAAS,UAAU,KAAG,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AO,MAAM,sBAAsB,GAAI,SAAS,UAAU,KAAG,KAAK,CAAC,eAAe,CACtC,CAAC;AAE7C,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,GAAI,SAAS,UAAU,KAAG,KAAK,CAAC,eAAe,CAC9B,CAAC;AAEzD,iEAAiE;AACjE,eAAO,MAAM,gBAAgB,GAAI,OAAO,eAAe,KAAG,MAAyC,CAAC;AAEpG;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAChC,SAAS,UAAU,KACjB;IACF,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CAqCd,CAAC"}
|
|
@@ -4,41 +4,69 @@
|
|
|
4
4
|
* Usable in tests, the adversarial auth runner, and future surface explorer UI.
|
|
5
5
|
* Replaces duplicated inline `.filter()` patterns.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* Categorical filters (`filter_authenticated_routes`, `filter_role_routes`,
|
|
8
|
+
* `filter_keeper_routes`) group the new flat-record `RouteAuth` shape into
|
|
9
|
+
* the legacy categorical buckets (`'authenticated'`, `'role'`, `'keeper'`)
|
|
10
|
+
* for adversarial test runners and the surface explorer. The buckets are
|
|
11
|
+
* derived views over the four axes (`account`, `actor`, `roles`,
|
|
12
|
+
* `credential_types`) — see `http/auth_shape.ts` for the canonical shape.
|
|
12
13
|
*
|
|
13
14
|
* @module
|
|
14
15
|
*/
|
|
16
|
+
import { is_keeper_auth, is_plain_authenticated_auth, is_public_auth, is_role_auth, } from './auth_shape.js';
|
|
15
17
|
/** Filter routes that require any form of authentication. */
|
|
16
|
-
export const filter_protected_routes = (surface) => surface.routes.filter((r) => r.auth
|
|
17
|
-
/** Filter routes that are publicly accessible (no auth). */
|
|
18
|
-
export const filter_public_routes = (surface) => surface.routes.filter((r) => r.auth
|
|
19
|
-
/** Filter all role-guarded routes (any role). */
|
|
20
|
-
export const filter_role_routes = (surface) => surface.routes.filter((r) => r.auth
|
|
21
|
-
/** Filter routes that require basic authentication (no specific role). */
|
|
22
|
-
export const filter_authenticated_routes = (surface) => surface.routes.filter((r) => r.auth.type === 'authenticated');
|
|
23
|
-
/** Filter routes that require keeper credentials. */
|
|
24
|
-
export const filter_keeper_routes = (surface) => surface.routes.filter((r) => r.auth.type === 'keeper');
|
|
25
|
-
/** Filter routes that require a specific named role. */
|
|
26
|
-
export const filter_routes_for_role = (surface, role) => surface.routes.filter((r) => r.auth.type === 'role' && r.auth.role === role);
|
|
18
|
+
export const filter_protected_routes = (surface) => surface.routes.filter((r) => !is_public_auth(r.auth));
|
|
19
|
+
/** Filter routes that are publicly accessible (no auth surface at all). */
|
|
20
|
+
export const filter_public_routes = (surface) => surface.routes.filter((r) => is_public_auth(r.auth));
|
|
21
|
+
/** Filter all role-guarded routes (any role declared on `auth.roles`). */
|
|
22
|
+
export const filter_role_routes = (surface) => surface.routes.filter((r) => is_role_auth(r.auth));
|
|
27
23
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
24
|
+
* Filter routes that require basic authentication only — `account === 'required'`
|
|
25
|
+
* with no role / credential gate.
|
|
26
|
+
*/
|
|
27
|
+
export const filter_authenticated_routes = (surface) => surface.routes.filter((r) => is_plain_authenticated_auth(r.auth));
|
|
28
|
+
/** Filter routes that require keeper credentials (`daemon_token`). */
|
|
29
|
+
export const filter_keeper_routes = (surface) => surface.routes.filter((r) => is_keeper_auth(r.auth));
|
|
30
|
+
/** Filter routes whose `auth.roles` includes the named role. */
|
|
31
|
+
export const filter_routes_for_role = (surface, role) => surface.routes.filter((r) => r.auth.roles?.includes(role) ?? false);
|
|
32
|
+
/**
|
|
33
|
+
* Group routes by auth category (see `RouteAuthCategory`). Multi-role specs
|
|
34
|
+
* appear under each of their role buckets.
|
|
31
35
|
*/
|
|
32
36
|
export const routes_by_auth_type = (surface) => {
|
|
33
37
|
const groups = new Map();
|
|
34
|
-
|
|
35
|
-
const key = r.auth.type === 'role' ? `role:${r.auth.role}` : r.auth.type;
|
|
38
|
+
const push = (key, r) => {
|
|
36
39
|
let group = groups.get(key);
|
|
37
40
|
if (!group) {
|
|
38
41
|
group = [];
|
|
39
42
|
groups.set(key, group);
|
|
40
43
|
}
|
|
41
44
|
group.push(r);
|
|
45
|
+
};
|
|
46
|
+
for (const r of surface.routes) {
|
|
47
|
+
const auth = r.auth;
|
|
48
|
+
if (is_public_auth(auth)) {
|
|
49
|
+
push('none', r);
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (is_keeper_auth(auth)) {
|
|
53
|
+
push('keeper', r);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (is_role_auth(auth)) {
|
|
57
|
+
for (const role of auth.roles)
|
|
58
|
+
push(`role:${role}`, r);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (is_plain_authenticated_auth(auth)) {
|
|
62
|
+
push('authenticated', r);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (auth.account === 'optional' || auth.actor === 'optional') {
|
|
66
|
+
push('optional', r);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
push('other', r);
|
|
42
70
|
}
|
|
43
71
|
return groups;
|
|
44
72
|
};
|
|
@@ -59,28 +87,43 @@ export const format_route_key = (route) => `${route.method} ${route.path}`;
|
|
|
59
87
|
/**
|
|
60
88
|
* Summarize route auth distribution across the surface.
|
|
61
89
|
*
|
|
62
|
-
*
|
|
90
|
+
* Categorical view over the four-axis flat record. Multi-role specs
|
|
91
|
+
* contribute one count per role they admit.
|
|
92
|
+
*
|
|
93
|
+
* @returns counts by auth category, with role counts broken out by role name
|
|
63
94
|
*/
|
|
64
95
|
export const surface_auth_summary = (surface) => {
|
|
65
96
|
let none = 0;
|
|
66
97
|
let authenticated = 0;
|
|
98
|
+
let optional = 0;
|
|
67
99
|
const role = new Map();
|
|
68
100
|
let keeper = 0;
|
|
101
|
+
let other = 0;
|
|
69
102
|
for (const r of surface.routes) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
103
|
+
const auth = r.auth;
|
|
104
|
+
if (is_public_auth(auth)) {
|
|
105
|
+
none++;
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
if (is_keeper_auth(auth)) {
|
|
109
|
+
keeper++;
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
if (is_role_auth(auth)) {
|
|
113
|
+
for (const r_name of auth.roles) {
|
|
114
|
+
role.set(r_name, (role.get(r_name) ?? 0) + 1);
|
|
115
|
+
}
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (is_plain_authenticated_auth(auth)) {
|
|
119
|
+
authenticated++;
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (auth.account === 'optional' || auth.actor === 'optional') {
|
|
123
|
+
optional++;
|
|
124
|
+
continue;
|
|
83
125
|
}
|
|
126
|
+
other++;
|
|
84
127
|
}
|
|
85
|
-
return { none, authenticated, role, keeper };
|
|
128
|
+
return { none, authenticated, optional, role, keeper, other };
|
|
86
129
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable validator-schema primitives — `Username`, `UsernameProvided`,
|
|
3
|
+
* `Email`. Lives at the top level (not inside `auth/` or `http/`) because
|
|
4
|
+
* these shapes don't depend on or imply any domain — accounts hold a
|
|
5
|
+
* username and email, but invites, password resets, future cell-sharing,
|
|
6
|
+
* and other surfaces all reach for the same primitives without going
|
|
7
|
+
* through auth.
|
|
8
|
+
*
|
|
9
|
+
* Split out from `auth/account_schema.ts` so the auth module shrinks to
|
|
10
|
+
* entity types + client-safe JSON shapes (its real responsibility) and
|
|
11
|
+
* non-auth consumers can import these primitives without dragging the
|
|
12
|
+
* auth domain along. Future cross-domain primitives (phone, url, slug)
|
|
13
|
+
* land here too.
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
16
|
+
*/
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
/** Minimum username length (must have start + middle + end characters). */
|
|
19
|
+
export declare const USERNAME_LENGTH_MIN = 3;
|
|
20
|
+
/** Maximum username length (matches GitHub's limit). */
|
|
21
|
+
export declare const USERNAME_LENGTH_MAX = 39;
|
|
22
|
+
/** Maximum length for username input on login/lookup — more permissive than `USERNAME_LENGTH_MAX` for forward-compatibility if the creation limit is raised. */
|
|
23
|
+
export declare const USERNAME_PROVIDED_LENGTH_MAX = 255;
|
|
24
|
+
/** Username for account creation — starts with letter, alphanumeric/dash/underscore middle, ends with alphanumeric. No @ or . allowed. */
|
|
25
|
+
export declare const Username: z.ZodString;
|
|
26
|
+
export type Username = z.infer<typeof Username>;
|
|
27
|
+
/** Username submitted for login or lookup — minimal validation for forward-compatibility if format rules change. */
|
|
28
|
+
export declare const UsernameProvided: z.ZodString;
|
|
29
|
+
export type UsernameProvided = z.infer<typeof UsernameProvided>;
|
|
30
|
+
/**
|
|
31
|
+
* Email validation. Lives here rather than `@fuzdev/fuz_util` because every
|
|
32
|
+
* current consumer pairs it with `Username` (signup, invites, audit log) —
|
|
33
|
+
* keeping the two together avoids a cross-package import for the
|
|
34
|
+
* identity-primitive bundle. Promote to fuz_util if a non-identity consumer
|
|
35
|
+
* surfaces.
|
|
36
|
+
*/
|
|
37
|
+
export declare const Email: z.ZodEmail;
|
|
38
|
+
export type Email = z.infer<typeof Email>;
|
|
39
|
+
//# sourceMappingURL=primitive_schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitive_schemas.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/primitive_schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,wDAAwD;AACxD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,gKAAgK;AAChK,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,0IAA0I;AAC1I,eAAO,MAAM,QAAQ,aAIyB,CAAC;AAC/C,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,oHAAoH;AACpH,eAAO,MAAM,gBAAgB,aAAsD,CAAC;AACpF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,YAAY,CAAC;AAC/B,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable validator-schema primitives — `Username`, `UsernameProvided`,
|
|
3
|
+
* `Email`. Lives at the top level (not inside `auth/` or `http/`) because
|
|
4
|
+
* these shapes don't depend on or imply any domain — accounts hold a
|
|
5
|
+
* username and email, but invites, password resets, future cell-sharing,
|
|
6
|
+
* and other surfaces all reach for the same primitives without going
|
|
7
|
+
* through auth.
|
|
8
|
+
*
|
|
9
|
+
* Split out from `auth/account_schema.ts` so the auth module shrinks to
|
|
10
|
+
* entity types + client-safe JSON shapes (its real responsibility) and
|
|
11
|
+
* non-auth consumers can import these primitives without dragging the
|
|
12
|
+
* auth domain along. Future cross-domain primitives (phone, url, slug)
|
|
13
|
+
* land here too.
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
16
|
+
*/
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
// TODO consider `.brand()` on Username and Email for compile-time safety
|
|
19
|
+
/** Minimum username length (must have start + middle + end characters). */
|
|
20
|
+
export const USERNAME_LENGTH_MIN = 3;
|
|
21
|
+
/** Maximum username length (matches GitHub's limit). */
|
|
22
|
+
export const USERNAME_LENGTH_MAX = 39;
|
|
23
|
+
/** Maximum length for username input on login/lookup — more permissive than `USERNAME_LENGTH_MAX` for forward-compatibility if the creation limit is raised. */
|
|
24
|
+
export const USERNAME_PROVIDED_LENGTH_MAX = 255;
|
|
25
|
+
/** Username for account creation — starts with letter, alphanumeric/dash/underscore middle, ends with alphanumeric. No @ or . allowed. */
|
|
26
|
+
export const Username = z
|
|
27
|
+
.string()
|
|
28
|
+
.min(USERNAME_LENGTH_MIN)
|
|
29
|
+
.max(USERNAME_LENGTH_MAX)
|
|
30
|
+
.regex(/^[a-zA-Z][0-9a-zA-Z_-]*[0-9a-zA-Z]$/);
|
|
31
|
+
/** Username submitted for login or lookup — minimal validation for forward-compatibility if format rules change. */
|
|
32
|
+
export const UsernameProvided = z.string().min(1).max(USERNAME_PROVIDED_LENGTH_MAX);
|
|
33
|
+
/**
|
|
34
|
+
* Email validation. Lives here rather than `@fuzdev/fuz_util` because every
|
|
35
|
+
* current consumer pairs it with `Username` (signup, invites, audit log) —
|
|
36
|
+
* keeping the two together avoids a cross-package import for the
|
|
37
|
+
* identity-primitive bundle. Promote to fuz_util if a non-identity consumer
|
|
38
|
+
* surfaces.
|
|
39
|
+
*/
|
|
40
|
+
export const Email = z.email();
|
|
@@ -19,9 +19,9 @@ export declare const AUDIT_LOG_CHANNEL = "audit_log";
|
|
|
19
19
|
/**
|
|
20
20
|
* Audit event types that trigger SSE stream disconnection.
|
|
21
21
|
*
|
|
22
|
-
* `
|
|
22
|
+
* `role_grant_revoke` requires the revoked role to match the guard's `required_role`
|
|
23
23
|
* (or is skipped entirely when `required_role` is `null` — useful for streams
|
|
24
|
-
* not gated by any specific
|
|
24
|
+
* not gated by any specific role_grant).
|
|
25
25
|
* `session_revoke_all` and `password_change` close every stream for the target account.
|
|
26
26
|
* `session_revoke` closes only the stream tied to the specific revoked session
|
|
27
27
|
* (matched by the blake3 session hash in `event.metadata.session_id`) — closing
|
|
@@ -32,7 +32,7 @@ export declare const DISCONNECT_EVENT_TYPES: ReadonlySet<string>;
|
|
|
32
32
|
* Create an audit event handler that closes SSE streams on auth changes.
|
|
33
33
|
*
|
|
34
34
|
* Closes streams when:
|
|
35
|
-
* - `
|
|
35
|
+
* - `role_grant_revoke` fires for the `required_role` targeting a connected subscriber
|
|
36
36
|
* - `session_revoke_all` targets a connected subscriber (consistent invalidation)
|
|
37
37
|
* - `password_change` targets a connected subscriber (sessions revoked implicitly)
|
|
38
38
|
*
|
|
@@ -41,8 +41,8 @@ export declare const DISCONNECT_EVENT_TYPES: ReadonlySet<string>;
|
|
|
41
41
|
*
|
|
42
42
|
* @param registry - the subscriber registry to guard
|
|
43
43
|
* @param required_role - the role that grants access to the SSE endpoint,
|
|
44
|
-
* or `null` to skip `
|
|
45
|
-
* by a specific
|
|
44
|
+
* or `null` to skip `role_grant_revoke` handling entirely (for streams not gated
|
|
45
|
+
* by a specific role_grant)
|
|
46
46
|
* @param log - logger for disconnect events
|
|
47
47
|
* @returns an `on_audit_event` callback
|
|
48
48
|
*/
|
|
@@ -17,16 +17,16 @@ export const AUDIT_LOG_CHANNEL = 'audit_log';
|
|
|
17
17
|
/**
|
|
18
18
|
* Audit event types that trigger SSE stream disconnection.
|
|
19
19
|
*
|
|
20
|
-
* `
|
|
20
|
+
* `role_grant_revoke` requires the revoked role to match the guard's `required_role`
|
|
21
21
|
* (or is skipped entirely when `required_role` is `null` — useful for streams
|
|
22
|
-
* not gated by any specific
|
|
22
|
+
* not gated by any specific role_grant).
|
|
23
23
|
* `session_revoke_all` and `password_change` close every stream for the target account.
|
|
24
24
|
* `session_revoke` closes only the stream tied to the specific revoked session
|
|
25
25
|
* (matched by the blake3 session hash in `event.metadata.session_id`) — closing
|
|
26
26
|
* all of a user's streams for a single-session revoke would be over-aggressive.
|
|
27
27
|
*/
|
|
28
28
|
export const DISCONNECT_EVENT_TYPES = new Set([
|
|
29
|
-
'
|
|
29
|
+
'role_grant_revoke', // role revoked — user lost access
|
|
30
30
|
'session_revoke', // single session revoked — close only that stream
|
|
31
31
|
'session_revoke_all', // all sessions invalidated — user should be kicked
|
|
32
32
|
'password_change', // password changed — all sessions revoked implicitly
|
|
@@ -35,7 +35,7 @@ export const DISCONNECT_EVENT_TYPES = new Set([
|
|
|
35
35
|
* Create an audit event handler that closes SSE streams on auth changes.
|
|
36
36
|
*
|
|
37
37
|
* Closes streams when:
|
|
38
|
-
* - `
|
|
38
|
+
* - `role_grant_revoke` fires for the `required_role` targeting a connected subscriber
|
|
39
39
|
* - `session_revoke_all` targets a connected subscriber (consistent invalidation)
|
|
40
40
|
* - `password_change` targets a connected subscriber (sessions revoked implicitly)
|
|
41
41
|
*
|
|
@@ -44,8 +44,8 @@ export const DISCONNECT_EVENT_TYPES = new Set([
|
|
|
44
44
|
*
|
|
45
45
|
* @param registry - the subscriber registry to guard
|
|
46
46
|
* @param required_role - the role that grants access to the SSE endpoint,
|
|
47
|
-
* or `null` to skip `
|
|
48
|
-
* by a specific
|
|
47
|
+
* or `null` to skip `role_grant_revoke` handling entirely (for streams not gated
|
|
48
|
+
* by a specific role_grant)
|
|
49
49
|
* @param log - logger for disconnect events
|
|
50
50
|
* @returns an `on_audit_event` callback
|
|
51
51
|
*/
|
|
@@ -73,9 +73,9 @@ export const create_sse_auth_guard = (registry, required_role, log) => {
|
|
|
73
73
|
}
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
//
|
|
77
|
-
// stream isn't gated by a specific
|
|
78
|
-
if (event.event_type === '
|
|
76
|
+
// role_grant_revoke requires matching the specific role. `null` means the
|
|
77
|
+
// stream isn't gated by a specific role_grant, so role_grant_revoke is a no-op.
|
|
78
|
+
if (event.event_type === 'role_grant_revoke') {
|
|
79
79
|
if (required_role === null)
|
|
80
80
|
return;
|
|
81
81
|
if (event.metadata?.role !== required_role)
|
package/dist/runtime/mock.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export interface MockRuntime extends RuntimeDeps {
|
|
|
58
58
|
*
|
|
59
59
|
* @example
|
|
60
60
|
* ```ts
|
|
61
|
-
* const runtime = create_mock_runtime(['apply', '
|
|
61
|
+
* const runtime = create_mock_runtime(['apply', 'zap.ts']);
|
|
62
62
|
* runtime.mock_env.set('HOME', '/home/test');
|
|
63
63
|
* runtime.mock_fs.set('/home/test/.app/config.json', '{}');
|
|
64
64
|
*
|
package/dist/runtime/mock.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* ```ts
|
|
21
|
-
* const runtime = create_mock_runtime(['apply', '
|
|
21
|
+
* const runtime = create_mock_runtime(['apply', 'zap.ts']);
|
|
22
22
|
* runtime.mock_env.set('HOME', '/home/test');
|
|
23
23
|
* runtime.mock_fs.set('/home/test/.app/config.json', '{}');
|
|
24
24
|
*
|
|
@@ -55,17 +55,19 @@ export interface CreateAppBackendOptions {
|
|
|
55
55
|
/** Structured logger instance. Omit for default (`new Logger('server')`). */
|
|
56
56
|
log?: Logger;
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
59
|
-
* Use to broadcast audit events via SSE.
|
|
60
|
-
*
|
|
58
|
+
* Initial subscriber appended to `AppDeps.audit.on_event_chain`.
|
|
59
|
+
* Use to broadcast audit events via SSE / WS. Additional subscribers
|
|
60
|
+
* (e.g. the factory-managed audit-log SSE) are appended at server
|
|
61
|
+
* assembly via `audit.on_event_chain.push(listener)` — no shallow-copy
|
|
62
|
+
* of `AppDeps` required.
|
|
61
63
|
*/
|
|
62
64
|
on_audit_event?: (event: AuditLogEvent) => void;
|
|
63
65
|
/**
|
|
64
66
|
* Audit-log config for consumer event-type extensions. Built once at
|
|
65
|
-
* startup via `create_audit_log_config({extra_events})` and
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
67
|
+
* startup via `create_audit_log_config({extra_events})` and captured
|
|
68
|
+
* inside `AppDeps.audit` so consumer handlers cannot silently fall
|
|
69
|
+
* back to the builtin config. Omit to use `BUILTIN_AUDIT_LOG_CONFIG`
|
|
70
|
+
* (no extra events).
|
|
69
71
|
*/
|
|
70
72
|
audit_log_config?: AuditLogConfig;
|
|
71
73
|
/**
|
|
@@ -74,9 +76,10 @@ export interface CreateAppBackendOptions {
|
|
|
74
76
|
* (`namespace`, `name`, `sequence`); order is append-only so forward-only
|
|
75
77
|
* guarantees hold per-namespace.
|
|
76
78
|
*
|
|
77
|
-
*
|
|
78
|
-
* extra namespaces. This is the only
|
|
79
|
-
* — DB init belongs to the backend
|
|
79
|
+
* Names in `RESERVED_MIGRATION_NAMESPACES` (currently `['fuz_auth']`) are
|
|
80
|
+
* rejected at startup. Omit for no extra namespaces. This is the only
|
|
81
|
+
* place to splice consumer migrations — DB init belongs to the backend
|
|
82
|
+
* lifecycle, not server assembly.
|
|
80
83
|
*/
|
|
81
84
|
migration_namespaces?: ReadonlyArray<MigrationNamespace>;
|
|
82
85
|
}
|
|
@@ -89,7 +92,7 @@ export interface CreateAppBackendOptions {
|
|
|
89
92
|
*
|
|
90
93
|
* @param options - keyring, password deps, optional database URL, and optional `migration_namespaces`
|
|
91
94
|
* @returns app backend with deps, database metadata, and combined migration results
|
|
92
|
-
* @throws Error if `migration_namespaces` contains
|
|
95
|
+
* @throws Error if `migration_namespaces` contains a namespace in `RESERVED_MIGRATION_NAMESPACES`
|
|
93
96
|
*/
|
|
94
97
|
export declare const create_app_backend: (options: CreateAppBackendOptions) => Promise<AppBackend>;
|
|
95
98
|
//# sourceMappingURL=app_backend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_backend.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/app_backend.ts"],"names":[],"mappings":"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,CAAC;IACnD,2BAA2B;IAC3B,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,qBAAqB;IACrB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC;;;;;;;;;;OAUG;IACH,oBAAoB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACzD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAU,SAAS,uBAAuB,KAAG,OAAO,CAAC,UAAU,CAuC7F,CAAC"}
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
13
|
import { Logger } from '@fuzdev/fuz_util/log.js';
|
|
14
|
+
import { create_audit_emitter } from '../auth/audit_emitter.js';
|
|
14
15
|
import { run_migrations } from '../db/migrate.js';
|
|
15
|
-
import { AUTH_MIGRATION_NS,
|
|
16
|
+
import { AUTH_MIGRATION_NS, RESERVED_MIGRATION_NAMESPACES } from '../auth/migrations.js';
|
|
16
17
|
import { create_db } from '../db/create_db.js';
|
|
17
18
|
/**
|
|
18
19
|
* Initialize the backend: database + auth migrations + deps.
|
|
@@ -23,18 +24,16 @@ import { create_db } from '../db/create_db.js';
|
|
|
23
24
|
*
|
|
24
25
|
* @param options - keyring, password deps, optional database URL, and optional `migration_namespaces`
|
|
25
26
|
* @returns app backend with deps, database metadata, and combined migration results
|
|
26
|
-
* @throws Error if `migration_namespaces` contains
|
|
27
|
+
* @throws Error if `migration_namespaces` contains a namespace in `RESERVED_MIGRATION_NAMESPACES`
|
|
27
28
|
*/
|
|
28
29
|
export const create_app_backend = async (options) => {
|
|
29
30
|
const { database_url, keyring, password, stat, read_text_file, delete_file } = options;
|
|
30
31
|
const log = options.log ?? new Logger('server');
|
|
31
|
-
const on_audit_event = options.on_audit_event ?? (() => { }); // eslint-disable-line @typescript-eslint/no-empty-function
|
|
32
|
-
const { audit_log_config } = options;
|
|
33
32
|
const { db, close, db_type, db_name } = await create_db(database_url);
|
|
34
33
|
if (options.migration_namespaces?.length) {
|
|
35
34
|
for (const ns of options.migration_namespaces) {
|
|
36
|
-
if (ns.namespace
|
|
37
|
-
throw new Error(`Migration namespace "${
|
|
35
|
+
if (RESERVED_MIGRATION_NAMESPACES.includes(ns.namespace)) {
|
|
36
|
+
throw new Error(`Migration namespace "${ns.namespace}" is reserved by fuz_app — choose a different namespace`);
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
}
|
|
@@ -42,6 +41,12 @@ export const create_app_backend = async (options) => {
|
|
|
42
41
|
AUTH_MIGRATION_NS,
|
|
43
42
|
...(options.migration_namespaces ?? []),
|
|
44
43
|
]);
|
|
44
|
+
const audit = create_audit_emitter({
|
|
45
|
+
db,
|
|
46
|
+
log,
|
|
47
|
+
on_audit_event: options.on_audit_event,
|
|
48
|
+
audit_log_config: options.audit_log_config,
|
|
49
|
+
});
|
|
45
50
|
return {
|
|
46
51
|
db_type,
|
|
47
52
|
db_name,
|
|
@@ -55,8 +60,7 @@ export const create_app_backend = async (options) => {
|
|
|
55
60
|
read_text_file,
|
|
56
61
|
delete_file,
|
|
57
62
|
log,
|
|
58
|
-
|
|
59
|
-
audit_log_config,
|
|
63
|
+
audit,
|
|
60
64
|
},
|
|
61
65
|
};
|
|
62
66
|
};
|
|
@@ -133,10 +133,11 @@ export interface AppServerOptions {
|
|
|
133
133
|
/**
|
|
134
134
|
* Enable factory-managed audit log SSE.
|
|
135
135
|
*
|
|
136
|
-
* When truthy, creates an `AuditLogSse` instance internally,
|
|
137
|
-
*
|
|
138
|
-
* `
|
|
139
|
-
*
|
|
136
|
+
* When truthy, creates an `AuditLogSse` instance internally, appends the SSE
|
|
137
|
+
* listener to `backend.deps.audit.on_event_chain` (composing with the
|
|
138
|
+
* consumer's `on_audit_event` callback rather than rebuilding `AppDeps`), and
|
|
139
|
+
* auto-includes `AUDIT_LOG_EVENT_SPECS` in the surface. The result is exposed
|
|
140
|
+
* on `AppServerContext` (for route factories) and `AppServer` (for the caller).
|
|
140
141
|
*
|
|
141
142
|
* Pass `true` for defaults (admin role), or `{role: 'custom'}` for a custom role.
|
|
142
143
|
* Omit to wire audit SSE manually.
|
|
@@ -229,9 +230,8 @@ export declare const DEFAULT_MAX_BODY_SIZE: number;
|
|
|
229
230
|
* static serving. Database migrations belong to the backend lifecycle —
|
|
230
231
|
* pass `migration_namespaces` to `create_app_backend`.
|
|
231
232
|
*
|
|
232
|
-
* When `audit_log_sse` is set,
|
|
233
|
-
* `
|
|
234
|
-
* callback — `backend.deps` itself is not mutated.
|
|
233
|
+
* When `audit_log_sse` is set, the SSE registry's listener is appended to
|
|
234
|
+
* `backend.deps.audit.on_event_chain` — no shallow-copy of `AppDeps`.
|
|
235
235
|
*
|
|
236
236
|
* @returns assembled Hono app, backend, surface build, and bootstrap status
|
|
237
237
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_server.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/app_server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAC,IAAI,EAAE,KAAK,OAAO,EAAC,MAAM,MAAM,CAAC;AAGxC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAEN,KAAK,cAAc,EAEnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAC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