@fuzdev/fuz_app 0.158.0 → 0.160.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 (73) hide show
  1. package/dist/actions/CLAUDE.md +7 -2
  2. package/dist/actions/protocol.d.ts +7 -0
  3. package/dist/actions/protocol.d.ts.map +1 -1
  4. package/dist/actions/protocol.js +19 -4
  5. package/dist/auth/CLAUDE.md +40 -15
  6. package/dist/auth/account_schema.d.ts +2 -2
  7. package/dist/auth/account_schema.d.ts.map +1 -1
  8. package/dist/auth/account_schema.js +1 -1
  9. package/dist/auth/audit_log_route_schema.d.ts +18 -6
  10. package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
  11. package/dist/auth/audit_log_route_schema.js +7 -3
  12. package/dist/auth/credential_type_schema.d.ts +4 -4
  13. package/dist/auth/credential_type_schema.d.ts.map +1 -1
  14. package/dist/auth/credential_type_schema.js +6 -6
  15. package/dist/auth/grant_path_schema.d.ts +4 -4
  16. package/dist/auth/grant_path_schema.d.ts.map +1 -1
  17. package/dist/auth/grant_path_schema.js +6 -6
  18. package/dist/auth/request_context.js +1 -1
  19. package/dist/auth/role_grant_offer_action_specs.d.ts +2257 -400
  20. package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
  21. package/dist/auth/role_grant_offer_action_specs.js +109 -102
  22. package/dist/auth/role_grant_offer_actions.d.ts +6 -3
  23. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  24. package/dist/auth/role_grant_offer_actions.js +15 -6
  25. package/dist/auth/role_grant_offer_ddl.d.ts +5 -4
  26. package/dist/auth/role_grant_offer_ddl.d.ts.map +1 -1
  27. package/dist/auth/role_grant_offer_ddl.js +5 -4
  28. package/dist/auth/role_grant_offer_notifications.d.ts +1364 -255
  29. package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
  30. package/dist/auth/role_grant_offer_notifications.js +100 -47
  31. package/dist/auth/role_grant_offer_schema.d.ts +90 -22
  32. package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
  33. package/dist/auth/role_grant_offer_schema.js +40 -39
  34. package/dist/auth/role_schema.d.ts +15 -2
  35. package/dist/auth/role_schema.d.ts.map +1 -1
  36. package/dist/auth/role_schema.js +17 -4
  37. package/dist/auth/role_schema_fuz.d.ts +29 -0
  38. package/dist/auth/role_schema_fuz.d.ts.map +1 -0
  39. package/dist/auth/role_schema_fuz.js +28 -0
  40. package/dist/auth/scope_kind_schema.d.ts +27 -15
  41. package/dist/auth/scope_kind_schema.d.ts.map +1 -1
  42. package/dist/auth/scope_kind_schema.js +30 -18
  43. package/dist/auth/scope_kind_schema_fuz.d.ts +30 -0
  44. package/dist/auth/scope_kind_schema_fuz.d.ts.map +1 -0
  45. package/dist/auth/scope_kind_schema_fuz.js +29 -0
  46. package/dist/auth/self_service_role_action_specs.d.ts +70 -27
  47. package/dist/auth/self_service_role_action_specs.d.ts.map +1 -1
  48. package/dist/auth/self_service_role_action_specs.js +16 -14
  49. package/dist/auth/token_scope.d.ts +3 -2
  50. package/dist/auth/token_scope.d.ts.map +1 -1
  51. package/dist/auth/token_scope.js +4 -3
  52. package/dist/http/CLAUDE.md +6 -0
  53. package/dist/http/db_routes.d.ts.map +1 -1
  54. package/dist/http/db_routes.js +8 -3
  55. package/dist/server/serve_fact_route.d.ts.map +1 -1
  56. package/dist/server/serve_fact_route.js +3 -2
  57. package/dist/server/surface_route.d.ts.map +1 -1
  58. package/dist/server/surface_route.js +3 -2
  59. package/dist/testing/CLAUDE.md +27 -16
  60. package/dist/testing/cross_backend/default_spine_surface.d.ts +1 -1
  61. package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts +15 -3
  62. package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
  63. package/dist/testing/cross_backend/role_grant_offer_notification_ws.js +60 -17
  64. package/dist/testing/cross_backend/role_grant_role_grammar.d.ts.map +1 -1
  65. package/dist/testing/cross_backend/role_grant_role_grammar.js +94 -6
  66. package/dist/testing/cross_backend/spine_suites.d.ts +4 -3
  67. package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
  68. package/dist/testing/cross_backend/spine_suites.js +2 -1
  69. package/dist/ui/CLAUDE.md +4 -4
  70. package/dist/ui/admin_accounts_state.svelte.d.ts +8 -8
  71. package/dist/ui/role_grant_offers_state.svelte.d.ts +9 -9
  72. package/dist/ui/role_grant_offers_state.svelte.js +4 -4
  73. package/package.json +1 -1
package/dist/ui/CLAUDE.md CHANGED
@@ -60,8 +60,8 @@ because `$state.raw` expects reference swaps.
60
60
  reducer — `subscribe(subscribe_fn)` is a thin subscription adapter over
61
61
  it. Six methods land on the reducer: `role_grant_offer_received` /
62
62
  `_retracted` / `_accepted` / `_declined` / `_supersede` all merge a
63
- `{offer}` payload; `role_grant_revoke` is ignored at this layer (role_grant
64
- lifecycle lives in auth/role_grants state). The six notification specs and
63
+ `{offer}` payload; `role_grant_revoked` is ignored at this layer (role_grant
64
+ lifecycle lives in auth/role_grants state). The notification specs and
65
65
  their payload shapes are defined in `auth/role_grant_offer_notifications.ts`
66
66
  (see `auth/CLAUDE.md` §WS notifications).
67
67
 
@@ -407,8 +407,8 @@ destructive actions.
407
407
  `incoming` (recipient-side pending, soonest-expiry first),
408
408
  `outgoing` (grantor-side pending, newest-created first), `history`
409
409
  (all known, newest-created first). Reducer `apply_notification`
410
- handles the six role-grant-offer notification methods;
411
- `role_grant_revoke` is deliberately ignored here (auth/role_grants
410
+ handles the role-grant-offer notification methods;
411
+ `role_grant_revoked` is deliberately ignored here (auth/role_grants
412
412
  concern). `reset()` clears every slot + the Map.
413
413
 
414
414
  ## State primitives
@@ -101,22 +101,22 @@ export declare class AdminAccountsState {
101
101
  #private;
102
102
  readonly list: AsyncSlot<void, string>;
103
103
  readonly grant: KeyedAsyncSlot<string, {
104
- id: string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">;
105
- from_actor_id: string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">;
106
- to_account_id: string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">;
107
- to_actor_id: (string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">) | null;
108
- role: string;
109
- scope_kind: string | null;
110
- scope_id: (string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">) | null;
111
104
  message: string | null;
105
+ id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">;
112
106
  created_at: string;
113
107
  expires_at: string;
108
+ role: string;
109
+ scope_kind: string | null;
110
+ scope_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid"> | null;
111
+ from_actor_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">;
112
+ to_account_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">;
113
+ to_actor_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid"> | null;
114
114
  accepted_at: string | null;
115
115
  declined_at: string | null;
116
116
  decline_reason: string | null;
117
117
  retracted_at: string | null;
118
118
  superseded_at: string | null;
119
- resulting_role_grant_id: (string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">) | null;
119
+ resulting_role_grant_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid"> | null;
120
120
  }, string>;
121
121
  readonly revoke: KeyedAsyncSlot<string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">, void, string>;
122
122
  readonly retract: KeyedAsyncSlot<string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">, void, string>;
@@ -2,7 +2,7 @@
2
2
  * Reactive state for the consentful-role-grants offer flow.
3
3
  *
4
4
  * Maintains one offer cache keyed by id, seeded by the RPC list/history
5
- * actions and kept live by the six role-grant-offer WebSocket notifications.
5
+ * actions and kept live by the role-grant-offer WebSocket notifications.
6
6
  * `incoming` (recipient-side pending) and `outgoing` (grantor-side pending)
7
7
  * are derived views; `history` is the full cache ordered newest-first for
8
8
  * the grantor/admin history view.
@@ -99,22 +99,22 @@ export declare class RoleGrantOffersState {
99
99
  readonly list: AsyncSlot<void, string>;
100
100
  readonly list_history: AsyncSlot<void, string>;
101
101
  readonly create: AsyncSlot<{
102
- id: string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">;
103
- from_actor_id: string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">;
104
- to_account_id: string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">;
105
- to_actor_id: (string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">) | null;
106
- role: string;
107
- scope_kind: string | null;
108
- scope_id: (string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">) | null;
109
102
  message: string | null;
103
+ id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">;
110
104
  created_at: string;
111
105
  expires_at: string;
106
+ role: string;
107
+ scope_kind: string | null;
108
+ scope_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid"> | null;
109
+ from_actor_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">;
110
+ to_account_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid">;
111
+ to_actor_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid"> | null;
112
112
  accepted_at: string | null;
113
113
  declined_at: string | null;
114
114
  decline_reason: string | null;
115
115
  retracted_at: string | null;
116
116
  superseded_at: string | null;
117
- resulting_role_grant_id: (string & import("@fuzdev/fuz_schema/schema.js").Brand<"Uuid">) | null;
117
+ resulting_role_grant_id: import("@fuzdev/fuz_schema/schema.js").Branded<string, "Uuid"> | null;
118
118
  }, string>;
119
119
  /** Per-offer accept, keyed by offer id. */
120
120
  readonly accept: KeyedAsyncSlot<string, void, string>;
@@ -2,7 +2,7 @@
2
2
  * Reactive state for the consentful-role-grants offer flow.
3
3
  *
4
4
  * Maintains one offer cache keyed by id, seeded by the RPC list/history
5
- * actions and kept live by the six role-grant-offer WebSocket notifications.
5
+ * actions and kept live by the role-grant-offer WebSocket notifications.
6
6
  * `incoming` (recipient-side pending) and `outgoing` (grantor-side pending)
7
7
  * are derived views; `history` is the full cache ordered newest-first for
8
8
  * the grantor/admin history view.
@@ -33,7 +33,7 @@ import { AsyncSlot } from './async_slot.svelte.js';
33
33
  import { KeyedAsyncSlot } from './keyed_async_slot.svelte.js';
34
34
  import { is_iso8601_seconds_live } from '../timestamp.js';
35
35
  import { GRANT_SCOPE_PAIRED_MESSAGE, is_grant_scope_paired } from '../auth/role_grant_offer_action_specs.js';
36
- import { ROLE_GRANT_OFFER_ACCEPTED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_DECLINED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_RETRACTED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_SUPERSEDE_NOTIFICATION_METHOD, ROLE_GRANT_REVOKE_NOTIFICATION_METHOD } from '../auth/role_grant_offer_notifications.js';
36
+ import { ROLE_GRANT_OFFER_ACCEPTED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_DECLINED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_RETRACTED_NOTIFICATION_METHOD, ROLE_GRANT_OFFER_SUPERSEDE_NOTIFICATION_METHOD, ROLE_GRANT_REVOKED_NOTIFICATION_METHOD } from '../auth/role_grant_offer_notifications.js';
37
37
  /**
38
38
  * Svelte context for `RoleGrantOffersState`.
39
39
  * Use `role_grant_offers_state_context.set(state)` in the provider and
@@ -203,8 +203,8 @@ export class RoleGrantOffersState {
203
203
  this.#merge_offers([offer]);
204
204
  return;
205
205
  }
206
- case ROLE_GRANT_REVOKE_NOTIFICATION_METHOD:
207
- // role_grant_revoke is a role-grant-lifecycle event — the offer cache
206
+ case ROLE_GRANT_REVOKED_NOTIFICATION_METHOD:
207
+ // role_grant_revoked is a role-grant-lifecycle event — the offer cache
208
208
  // is unaffected. Consumers handle it in an auth/role_grants state.
209
209
  return;
210
210
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_app",
3
- "version": "0.158.0",
3
+ "version": "0.160.0",
4
4
  "description": "fullstack app library",
5
5
  "glyph": "🗝",
6
6
  "logo": "logo.svg",