@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.
- package/dist/actions/CLAUDE.md +7 -2
- package/dist/actions/protocol.d.ts +7 -0
- package/dist/actions/protocol.d.ts.map +1 -1
- package/dist/actions/protocol.js +19 -4
- package/dist/auth/CLAUDE.md +40 -15
- package/dist/auth/account_schema.d.ts +2 -2
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +1 -1
- package/dist/auth/audit_log_route_schema.d.ts +18 -6
- package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_route_schema.js +7 -3
- package/dist/auth/credential_type_schema.d.ts +4 -4
- package/dist/auth/credential_type_schema.d.ts.map +1 -1
- package/dist/auth/credential_type_schema.js +6 -6
- package/dist/auth/grant_path_schema.d.ts +4 -4
- package/dist/auth/grant_path_schema.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.js +6 -6
- package/dist/auth/request_context.js +1 -1
- package/dist/auth/role_grant_offer_action_specs.d.ts +2257 -400
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +109 -102
- package/dist/auth/role_grant_offer_actions.d.ts +6 -3
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +15 -6
- package/dist/auth/role_grant_offer_ddl.d.ts +5 -4
- package/dist/auth/role_grant_offer_ddl.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_ddl.js +5 -4
- package/dist/auth/role_grant_offer_notifications.d.ts +1364 -255
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +100 -47
- package/dist/auth/role_grant_offer_schema.d.ts +90 -22
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_schema.js +40 -39
- package/dist/auth/role_schema.d.ts +15 -2
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +17 -4
- package/dist/auth/role_schema_fuz.d.ts +29 -0
- package/dist/auth/role_schema_fuz.d.ts.map +1 -0
- package/dist/auth/role_schema_fuz.js +28 -0
- package/dist/auth/scope_kind_schema.d.ts +27 -15
- package/dist/auth/scope_kind_schema.d.ts.map +1 -1
- package/dist/auth/scope_kind_schema.js +30 -18
- package/dist/auth/scope_kind_schema_fuz.d.ts +30 -0
- package/dist/auth/scope_kind_schema_fuz.d.ts.map +1 -0
- package/dist/auth/scope_kind_schema_fuz.js +29 -0
- package/dist/auth/self_service_role_action_specs.d.ts +70 -27
- package/dist/auth/self_service_role_action_specs.d.ts.map +1 -1
- package/dist/auth/self_service_role_action_specs.js +16 -14
- package/dist/auth/token_scope.d.ts +3 -2
- package/dist/auth/token_scope.d.ts.map +1 -1
- package/dist/auth/token_scope.js +4 -3
- package/dist/http/CLAUDE.md +6 -0
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +8 -3
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +3 -2
- package/dist/server/surface_route.d.ts.map +1 -1
- package/dist/server/surface_route.js +3 -2
- package/dist/testing/CLAUDE.md +27 -16
- package/dist/testing/cross_backend/default_spine_surface.d.ts +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts +15 -3
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.js +60 -17
- package/dist/testing/cross_backend/role_grant_role_grammar.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_role_grammar.js +94 -6
- package/dist/testing/cross_backend/spine_suites.d.ts +4 -3
- package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_suites.js +2 -1
- package/dist/ui/CLAUDE.md +4 -4
- package/dist/ui/admin_accounts_state.svelte.d.ts +8 -8
- package/dist/ui/role_grant_offers_state.svelte.d.ts +9 -9
- package/dist/ui/role_grant_offers_state.svelte.js +4 -4
- 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; `
|
|
64
|
-
lifecycle lives in auth/role_grants state). The
|
|
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
|
|
411
|
-
`
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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,
|
|
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
|
|
207
|
-
//
|
|
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:
|