@fuzdev/fuz_app 0.64.0 → 0.65.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.
Files changed (111) hide show
  1. package/dist/actions/CLAUDE.md +513 -928
  2. package/dist/actions/broadcast_api.d.ts +1 -1
  3. package/dist/actions/broadcast_api.js +1 -1
  4. package/dist/actions/cancel.d.ts +2 -2
  5. package/dist/actions/cancel.js +3 -3
  6. package/dist/actions/connection_closer.d.ts +1 -4
  7. package/dist/actions/connection_closer.d.ts.map +1 -1
  8. package/dist/actions/connection_closer.js +1 -4
  9. package/dist/actions/register_action_ws.d.ts +2 -2
  10. package/dist/actions/register_ws_endpoint.d.ts +1 -1
  11. package/dist/actions/transports_ws_auth_guard.d.ts +1 -2
  12. package/dist/actions/transports_ws_auth_guard.d.ts.map +1 -1
  13. package/dist/actions/transports_ws_auth_guard.js +1 -2
  14. package/dist/auth/CLAUDE.md +591 -1871
  15. package/dist/auth/account_schema.d.ts +1 -1
  16. package/dist/auth/account_schema.d.ts.map +1 -1
  17. package/dist/auth/api_token_queries.js +1 -1
  18. package/dist/auth/audit_log_ddl.d.ts +1 -1
  19. package/dist/auth/audit_log_ddl.d.ts.map +1 -1
  20. package/dist/auth/audit_log_ddl.js +1 -1
  21. package/dist/auth/bootstrap_account.d.ts.map +1 -1
  22. package/dist/auth/bootstrap_account.js +1 -5
  23. package/dist/auth/bootstrap_routes.d.ts +7 -1
  24. package/dist/auth/bootstrap_routes.d.ts.map +1 -1
  25. package/dist/auth/bootstrap_routes.js +15 -11
  26. package/dist/auth/keyring.d.ts +6 -6
  27. package/dist/auth/keyring.js +8 -8
  28. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  29. package/dist/auth/role_grant_offer_actions.js +4 -2
  30. package/dist/db/create_db.d.ts.map +1 -1
  31. package/dist/db/create_db.js +13 -0
  32. package/dist/dev/setup.d.ts +2 -2
  33. package/dist/dev/setup.js +3 -3
  34. package/dist/http/CLAUDE.md +224 -498
  35. package/dist/http/error_schemas.d.ts +0 -4
  36. package/dist/http/error_schemas.d.ts.map +1 -1
  37. package/dist/http/error_schemas.js +0 -4
  38. package/dist/http/ip_canonical.d.ts +5 -4
  39. package/dist/http/ip_canonical.d.ts.map +1 -1
  40. package/dist/http/ip_canonical.js +8 -4
  41. package/dist/http/origin.d.ts +1 -1
  42. package/dist/http/origin.js +1 -1
  43. package/dist/runtime/mock.js +1 -1
  44. package/dist/server/app_server.d.ts +41 -10
  45. package/dist/server/app_server.d.ts.map +1 -1
  46. package/dist/server/app_server.js +10 -4
  47. package/dist/server/env.d.ts +7 -7
  48. package/dist/server/env.d.ts.map +1 -1
  49. package/dist/server/env.js +14 -14
  50. package/dist/server/static.d.ts +4 -4
  51. package/dist/server/static.js +7 -7
  52. package/dist/testing/CLAUDE.md +220 -46
  53. package/dist/testing/admin_integration.d.ts +18 -23
  54. package/dist/testing/admin_integration.d.ts.map +1 -1
  55. package/dist/testing/admin_integration.js +159 -201
  56. package/dist/testing/app_server.d.ts +125 -38
  57. package/dist/testing/app_server.d.ts.map +1 -1
  58. package/dist/testing/app_server.js +140 -42
  59. package/dist/testing/audit_completeness.d.ts +23 -22
  60. package/dist/testing/audit_completeness.d.ts.map +1 -1
  61. package/dist/testing/audit_completeness.js +199 -156
  62. package/dist/testing/bootstrap_success.d.ts +28 -0
  63. package/dist/testing/bootstrap_success.d.ts.map +1 -0
  64. package/dist/testing/bootstrap_success.js +144 -0
  65. package/dist/testing/cross_backend/capabilities.d.ts +64 -0
  66. package/dist/testing/cross_backend/capabilities.d.ts.map +1 -0
  67. package/dist/testing/cross_backend/capabilities.js +47 -0
  68. package/dist/testing/cross_backend/setup.d.ts +215 -0
  69. package/dist/testing/cross_backend/setup.d.ts.map +1 -0
  70. package/dist/testing/cross_backend/setup.js +101 -0
  71. package/dist/testing/data_exposure.d.ts +14 -15
  72. package/dist/testing/data_exposure.d.ts.map +1 -1
  73. package/dist/testing/data_exposure.js +127 -146
  74. package/dist/testing/db_entities.d.ts +11 -1
  75. package/dist/testing/db_entities.d.ts.map +1 -1
  76. package/dist/testing/db_entities.js +13 -1
  77. package/dist/testing/integration.d.ts +35 -21
  78. package/dist/testing/integration.d.ts.map +1 -1
  79. package/dist/testing/integration.js +231 -291
  80. package/dist/testing/integration_helpers.d.ts +16 -6
  81. package/dist/testing/integration_helpers.d.ts.map +1 -1
  82. package/dist/testing/integration_helpers.js +7 -7
  83. package/dist/testing/mock_fs.d.ts.map +1 -1
  84. package/dist/testing/mock_fs.js +0 -2
  85. package/dist/testing/rate_limiting.d.ts.map +1 -1
  86. package/dist/testing/rate_limiting.js +9 -0
  87. package/dist/testing/role_grant_helpers.d.ts +31 -0
  88. package/dist/testing/role_grant_helpers.d.ts.map +1 -0
  89. package/dist/testing/role_grant_helpers.js +46 -0
  90. package/dist/testing/round_trip.d.ts +21 -16
  91. package/dist/testing/round_trip.d.ts.map +1 -1
  92. package/dist/testing/round_trip.js +65 -86
  93. package/dist/testing/rpc_round_trip.d.ts +24 -21
  94. package/dist/testing/rpc_round_trip.d.ts.map +1 -1
  95. package/dist/testing/rpc_round_trip.js +91 -104
  96. package/dist/testing/schema_introspect.d.ts +106 -0
  97. package/dist/testing/schema_introspect.d.ts.map +1 -0
  98. package/dist/testing/schema_introspect.js +123 -0
  99. package/dist/testing/schema_parity.d.ts +144 -0
  100. package/dist/testing/schema_parity.d.ts.map +1 -0
  101. package/dist/testing/schema_parity.js +233 -0
  102. package/dist/testing/standard.d.ts +57 -25
  103. package/dist/testing/standard.d.ts.map +1 -1
  104. package/dist/testing/standard.js +62 -5
  105. package/dist/testing/stubs.d.ts +11 -3
  106. package/dist/testing/stubs.d.ts.map +1 -1
  107. package/dist/testing/stubs.js +24 -21
  108. package/dist/testing/transports/surface_source.d.ts +51 -0
  109. package/dist/testing/transports/surface_source.d.ts.map +1 -0
  110. package/dist/testing/transports/surface_source.js +19 -0
  111. package/package.json +4 -4
@@ -13,7 +13,7 @@
13
13
  * `ctx.notify` inside a handler — it's socket-scoped, not broadcast.
14
14
  *
15
15
  * Extracted from zzz's `backend_actions_api.ts` to stop the pattern from
16
- * drifting across zzz, zap, and undying.
16
+ * drifting across consumers.
17
17
  *
18
18
  * @module
19
19
  */
@@ -13,7 +13,7 @@
13
13
  * `ctx.notify` inside a handler — it's socket-scoped, not broadcast.
14
14
  *
15
15
  * Extracted from zzz's `backend_actions_api.ts` to stop the pattern from
16
- * drifting across zzz, zap, and undying.
16
+ * drifting across consumers.
17
17
  *
18
18
  * @module
19
19
  */
@@ -23,8 +23,8 @@
23
23
  * Wire format is snake_case `cancel` with `{request_id}`, not MCP's
24
24
  * `$/cancelRequest` with `{requestId}` — fuz_app's WS transport isn't MCP,
25
25
  * and adopting MCP's convention would leak protocol-specific framing into
26
- * the base transport. When MCP elicitation (Phase 5) lands, a translation
27
- * layer at the MCP adapter is the right seam.
26
+ * the base transport. If an MCP adapter is ever built, the translation
27
+ * layer at the adapter is the right seam.
28
28
  *
29
29
  * @module
30
30
  */
@@ -23,8 +23,8 @@
23
23
  * Wire format is snake_case `cancel` with `{request_id}`, not MCP's
24
24
  * `$/cancelRequest` with `{requestId}` — fuz_app's WS transport isn't MCP,
25
25
  * and adopting MCP's convention would leak protocol-specific framing into
26
- * the base transport. When MCP elicitation (Phase 5) lands, a translation
27
- * layer at the MCP adapter is the right seam.
26
+ * the base transport. If an MCP adapter is ever built, the translation
27
+ * layer at the adapter is the right seam.
28
28
  *
29
29
  * @module
30
30
  */
@@ -63,7 +63,7 @@ export const cancel_action_spec = {
63
63
  * tuple shape; the dispatcher short-circuits cancel notifications before any
64
64
  * handler lookup happens.
65
65
  */
66
- export const cancel_handler = () => { }; // eslint-disable-line @typescript-eslint/no-empty-function
66
+ export const cancel_handler = () => { };
67
67
  /**
68
68
  * Protocol-action tuple — spread into the server's `actions` array (or via
69
69
  * `protocol_actions` from `actions/protocol.ts`) so the dispatcher registers the
@@ -25,10 +25,7 @@
25
25
  * Mirrors `zzz_server`'s `close_sockets_for_*` calls in
26
26
  * `account.rs::logout_inner` / `_password_inner` /
27
27
  * `handlers/account.rs::handle_account_session_revoke[_all]` /
28
- * `_token_revoke` (landed 2026-05-16); see
29
- * `~/dev/grimoire/lore/fuz_app/TODO_AUTH.md` §Audit-driven WS
30
- * revocation: handler-side belt+suspenders for the cross-backend
31
- * parity record.
28
+ * `_token_revoke` (landed 2026-05-16).
32
29
  *
33
30
  * `BackendWebsocketTransport` satisfies this interface structurally,
34
31
  * so consumers pass their transport instance directly (same shape as
@@ -1 +1 @@
1
- {"version":3,"file":"connection_closer.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/connection_closer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,yBAAyB,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,MAAM,CAAC;IAClE;;;OAGG;IACH,uBAAuB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1D;;;;;;OAMG;IACH,yBAAyB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1D"}
1
+ {"version":3,"file":"connection_closer.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/connection_closer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,yBAAyB,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,MAAM,CAAC;IAClE;;;OAGG;IACH,uBAAuB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1D;;;;;;OAMG;IACH,yBAAyB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1D"}
@@ -25,10 +25,7 @@
25
25
  * Mirrors `zzz_server`'s `close_sockets_for_*` calls in
26
26
  * `account.rs::logout_inner` / `_password_inner` /
27
27
  * `handlers/account.rs::handle_account_session_revoke[_all]` /
28
- * `_token_revoke` (landed 2026-05-16); see
29
- * `~/dev/grimoire/lore/fuz_app/TODO_AUTH.md` §Audit-driven WS
30
- * revocation: handler-side belt+suspenders for the cross-backend
31
- * parity record.
28
+ * `_token_revoke` (landed 2026-05-16).
32
29
  *
33
30
  * `BackendWebsocketTransport` satisfies this interface structurally,
34
31
  * so consumers pass their transport instance directly (same shape as
@@ -42,8 +42,8 @@ export declare const DEFAULT_SERVER_HEARTBEAT_TIMEOUT = 60000;
42
42
  *
43
43
  * Fires after the transport has registered the new connection (so
44
44
  * `connection_id` is valid) but before any client message can dispatch.
45
- * Consumers use this to bootstrap per-socket domain state — e.g. undying
46
- * spawns the per-account spirit unit and pushes an initial state snapshot.
45
+ * Consumers use this to bootstrap per-socket domain state — e.g.
46
+ * spawning a per-account unit and pushing an initial state snapshot.
47
47
  */
48
48
  export interface SocketOpenContext {
49
49
  /** The raw WebSocket context — exposed for edge cases; prefer `notify` for sends. */
@@ -25,7 +25,7 @@ import { type RegisterActionWsOptions, type RegisterActionWsResult } from './reg
25
25
  /** Options for `register_ws_endpoint`. */
26
26
  export interface RegisterWsEndpointOptions extends RegisterActionWsOptions {
27
27
  /**
28
- * Origin allowlist regexes — typically parsed from the `ALLOWED_ORIGINS`
28
+ * Origin allowlist regexes — typically parsed from the `FUZ_ALLOWED_ORIGINS`
29
29
  * env var via `parse_allowed_origins`. Passed straight to
30
30
  * `verify_request_source`.
31
31
  */
@@ -74,8 +74,7 @@ export declare const create_ws_auth_guard: (transport: BackendWebsocketTransport
74
74
  * Sibling helper to `create_ws_auth_guard` — kept separate because
75
75
  * `ws_disconnect_event_types` deliberately omits `logout` (admin-initiated
76
76
  * revocations use `session_revoke`, while `logout` is the user-initiated
77
- * case). Three consumers (tx, undying, zzz) hand-rolled this same branch
78
- * before extraction.
77
+ * case). Multiple consumers hand-rolled this same branch before extraction.
79
78
  *
80
79
  * Compose with `create_ws_auth_guard` to handle both kinds of disconnect:
81
80
  *
@@ -1 +1 @@
1
- {"version":3,"file":"transports_ws_auth_guard.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/transports_ws_auth_guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,4BAA4B,CAAC;AAE1E;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAMxD,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAChC,WAAW,yBAAyB,EACpC,KAAK,MAAM,KACT,iBA6CF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,uBAAuB,GACnC,WAAW,yBAAyB,EACpC,KAAK,MAAM,KACT,iBAaF,CAAC"}
1
+ {"version":3,"file":"transports_ws_auth_guard.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/transports_ws_auth_guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,4BAA4B,CAAC;AAE1E;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAMxD,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAChC,WAAW,yBAAyB,EACpC,KAAK,MAAM,KACT,iBA6CF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,uBAAuB,GACnC,WAAW,yBAAyB,EACpC,KAAK,MAAM,KACT,iBAaF,CAAC"}
@@ -108,8 +108,7 @@ export const create_ws_auth_guard = (transport, log) => {
108
108
  * Sibling helper to `create_ws_auth_guard` — kept separate because
109
109
  * `ws_disconnect_event_types` deliberately omits `logout` (admin-initiated
110
110
  * revocations use `session_revoke`, while `logout` is the user-initiated
111
- * case). Three consumers (tx, undying, zzz) hand-rolled this same branch
112
- * before extraction.
111
+ * case). Multiple consumers hand-rolled this same branch before extraction.
113
112
  *
114
113
  * Compose with `create_ws_auth_guard` to handle both kinds of disconnect:
115
114
  *