@fuzdev/fuz_app 0.101.1 → 0.103.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 (58) hide show
  1. package/dist/auth/CLAUDE.md +29 -17
  2. package/dist/auth/cell_action_specs.d.ts +35 -34
  3. package/dist/auth/cell_action_specs.d.ts.map +1 -1
  4. package/dist/auth/cell_action_specs.js +23 -8
  5. package/dist/auth/cell_actions.d.ts +28 -0
  6. package/dist/auth/cell_actions.d.ts.map +1 -1
  7. package/dist/auth/cell_actions.js +52 -20
  8. package/dist/auth/cell_data_schema.d.ts +14 -16
  9. package/dist/auth/cell_data_schema.d.ts.map +1 -1
  10. package/dist/auth/cell_data_schema.js +14 -16
  11. package/dist/auth/role_grant_offer_action_specs.d.ts +56 -3
  12. package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
  13. package/dist/auth/role_grant_offer_action_specs.js +48 -3
  14. package/dist/auth/role_grant_offer_actions.d.ts +9 -19
  15. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  16. package/dist/auth/role_grant_offer_actions.js +91 -36
  17. package/dist/db/CLAUDE.md +8 -5
  18. package/dist/db/cell_ddl.d.ts +11 -2
  19. package/dist/db/cell_ddl.d.ts.map +1 -1
  20. package/dist/db/cell_ddl.js +13 -1
  21. package/dist/db/cell_queries.d.ts +14 -8
  22. package/dist/db/cell_queries.d.ts.map +1 -1
  23. package/dist/db/cell_queries.js +12 -11
  24. package/dist/testing/CLAUDE.md +66 -7
  25. package/dist/testing/cross_backend/capabilities.d.ts +14 -0
  26. package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
  27. package/dist/testing/cross_backend/capabilities.js +3 -0
  28. package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
  29. package/dist/testing/cross_backend/cell_crud.js +55 -13
  30. package/dist/testing/cross_backend/cell_gated_create.d.ts +4 -0
  31. package/dist/testing/cross_backend/cell_gated_create.d.ts.map +1 -0
  32. package/dist/testing/cross_backend/cell_gated_create.js +71 -0
  33. package/dist/testing/cross_backend/cell_grant_role.js +4 -4
  34. package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
  35. package/dist/testing/cross_backend/cell_relations.js +30 -24
  36. package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
  37. package/dist/testing/cross_backend/default_backend_configs.js +7 -0
  38. package/dist/testing/cross_backend/default_spine_surface.d.ts +9 -5
  39. package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
  40. package/dist/testing/cross_backend/default_spine_surface.js +12 -6
  41. package/dist/testing/cross_backend/expected_schema.json +1 -0
  42. package/dist/testing/cross_backend/fact_serving.js +2 -2
  43. package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
  44. package/dist/testing/cross_backend/full_spine_mount.js +6 -1
  45. package/dist/testing/cross_backend/role_grant_participation.d.ts +11 -0
  46. package/dist/testing/cross_backend/role_grant_participation.d.ts.map +1 -0
  47. package/dist/testing/cross_backend/role_grant_participation.js +73 -0
  48. package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts.map +1 -1
  49. package/dist/testing/cross_backend/rust_spine_stub_backend_config.js +6 -3
  50. package/dist/testing/cross_backend/spine_surface_constants.d.ts +12 -0
  51. package/dist/testing/cross_backend/spine_surface_constants.d.ts.map +1 -1
  52. package/dist/testing/cross_backend/spine_surface_constants.js +12 -0
  53. package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts +17 -0
  54. package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts.map +1 -0
  55. package/dist/testing/cross_backend/test_cell_gated_create_authorize.js +36 -0
  56. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
  57. package/dist/testing/cross_backend/ts_spine_backend_config.js +5 -2
  58. package/package.json +1 -1
@@ -171,7 +171,10 @@ Generic-only — no app vocabulary on the wire; per-kind shape is the
171
171
  consumer's `validate_data` pass-through callback on `CellActionDeps`.
172
172
 
173
173
  - `auth/cell_data_schema.ts` — `CellData` base (`z.looseObject` with
174
- optional `kind` / `label` / `summary`); per-kind sub-API extends it.
174
+ optional `label` / `summary`); per-kind sub-API extends it. **`kind` is
175
+ not in `data`** — it is a top-level `cell.kind` column (peer to
176
+ `visibility` / `path`), the write-once capability/identity axis; a stray
177
+ `kind` inside `data` is rejected fail-loud (`ERROR_CELL_KIND_IN_DATA`).
175
178
  - `auth/cell_action_specs.ts` — `CellVisibility` enum, `CellPath` brand,
176
179
  `CellJson`, the six generic verb specs (`cell_create / get / update /
177
180
  delete / list / clone`), error reasons, and `all_cell_action_specs`
@@ -202,11 +205,17 @@ auth, ids)`: batched strict relation-read filter. Every relation read —
202
205
  reverse list verbs additionally cap the fetch by the wire `limit` so a
203
206
  heavily inbound-linked target can't force an unbounded scan.
204
207
  - `auth/cell_actions.ts` — `create_cell_actions(deps)`, the six generic
205
- handlers. `cell_create` stamps `created_by`; `path` writes are
206
- admin-only. `cell_update` gates `visibility` writes on `can_manage_cell`
207
- (`ERROR_CELL_VISIBILITY_MANAGE_ONLY`). `cell_get` bundles
208
- visibility-filtered `fields` + `items` (one over the cap for truncation
209
- detection). `cell_clone` deep-walks viewable children only.
208
+ handlers. `cell_create` stamps `created_by` + writes the top-level `kind`
209
+ column; `path` writes are admin-only. `cell_update` gates `visibility`
210
+ writes on `can_manage_cell` (`ERROR_CELL_VISIBILITY_MANAGE_ONLY`) and
211
+ **never touches `kind`** (write-once at birth — not an update field).
212
+ `cell_get` bundles visibility-filtered `fields` + `items` (one over the cap
213
+ for truncation detection). `cell_clone` deep-walks viewable children only
214
+ (each clone inherits its source's `kind`). The optional `authorize_create`
215
+ dep (`CellCreateAuthorize` — wider `auth` + `{kind, data, scope_id}` input
216
+ than `validate_data`) gates create by capability; it runs after the
217
+ validator, before the insert, deny → `cell_not_found` 404 IDOR mask.
218
+ `None`/omitted = open create (the default; mirrors `validate_data`).
210
219
  - `auth/cell_grant_actions.ts` / `cell_field_actions.ts` /
211
220
  `cell_item_actions.ts` / `cell_audit_actions.ts` — the relation + ACL +
212
221
  audit handlers, exporting `to_grant_json` / `to_field_json` /
@@ -436,7 +445,7 @@ are excluded.
436
445
  records, regardless of outcome. Default
437
446
  `default_action_account_rate_limit` is 1200/15min per actor.
438
447
 
439
- ### Admin actions — fourteen specs
448
+ ### Admin actions
440
449
 
441
450
  `create_admin_actions(deps, options?)` in `auth/admin_actions.ts`.
442
451
 
@@ -501,7 +510,7 @@ visibility — `target_account_id` is null (FK rejects missing ids), and the
501
510
  probed id is preserved under `metadata.attempted_account_id`. Every gated
502
511
  event additionally records `credential_type` in metadata (defense in depth).
503
512
 
504
- ### Role-grant-offer actions — seven specs
513
+ ### Role-grant-offer actions
505
514
 
506
515
  `create_role_grant_offer_actions(deps, options?)` in
507
516
  `auth/role_grant_offer_actions.ts`.
@@ -525,19 +534,22 @@ event additionally records `credential_type` in metadata (defense in depth).
525
534
  - `role_grant_offer_list_action_spec` — input `{account_id?}`; output `{offers}`.
526
535
  - `role_grant_offer_history_action_spec` — input `{account_id?, limit?, offset?}`; output `{offers}`.
527
536
  - `role_grant_revoke_action_spec` — input `{actor_id, role_grant_id, reason?}`; output `{ok, revoked}`.
537
+ - `role_grant_assign_action_spec` — admin-only immediate conferral (no consent step); input `{to_account_id, to_actor_id?, role, scope_id?}`; output `{ok, role_grant_id}`. Runs the same admin-grant-path gate as offer-create, resolves the target actor (named `to_actor_id` ∈ the account's active actors, else its sole active actor — multi-actor → `invalid_params`, actorless → 404), writes via the idempotent `query_create_role_grant` (`scope_kind` stays null), and emits a `role_grant_create` audit row. No WS notification in v1. Reasons: `ERROR_ROLE_NOT_WEB_GRANTABLE`, `ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH`.
528
538
 
529
539
  Every input carries `acting?: ActingActor` (registry-time invariant 2).
530
540
  `role_grant_revoke` keys on **`actor_id`**, not `account_id` — role_grants
531
541
  are actor-scoped and deriving actor from account collapses under multi-actor
532
542
  accounts.
533
543
 
534
- `role_grant_offer_create` runs the **admin-grant-path gate first** (offered
544
+ `role_grant_offer_create` runs the **admin-grantability gate first** (offered
535
545
  role's `RoleSpec.grant_paths` must include `'admin'`), then the
536
- `RoleGrantOfferCreateAuthorize` callback. Default: caller holds the offered
537
- role globally. Pre-built `authorize_admin_or_holder` admits any admin and
538
- otherwise falls back to the default — drop into `create_role_grant_offer_actions({authorize: authorize_admin_or_holder})`
539
- or `create_standard_rpc_actions` for "admins offer anything; users offer
540
- what they hold."
546
+ `RoleGrantOfferCreateAuthorize` callback. **Default `default_authorize`: the
547
+ caller must hold a _global_ `admin` grant** — conferral is admin-only, with no
548
+ holder-propagation (holding the offered role confers no power to offer it). The
549
+ global check (`has_scoped_role(_, ROLE_ADMIN, null)`) stops a scoped `admin`
550
+ escalating into global authority over the offer surface. A consumer needing
551
+ scope-aware delegation (e.g. a classroom teacher offering within their own
552
+ scope) supplies a custom `authorize` callback.
541
553
 
542
554
  Error reasons (`as const` literals):
543
555
 
@@ -589,7 +601,7 @@ Options: `roles?: RoleSchemaResult` (drives admin-grant-path lookup),
589
601
  `default_ttl_ms?` (defaults to `ROLE_GRANT_OFFER_DEFAULT_TTL_MS` = 30 days),
590
602
  `authorize?: RoleGrantOfferCreateAuthorize`.
591
603
 
592
- ### Account actions — seven self-service specs
604
+ ### Account actions — self-service
593
605
 
594
606
  `create_account_actions(deps, options?)` in `auth/account_actions.ts`.
595
607
 
@@ -625,8 +637,8 @@ arbitrary sockets.
625
637
  `create_standard_rpc_actions(deps, options)` in `auth/standard_rpc_actions.ts`
626
638
  spreads `create_admin_actions`, `create_role_grant_offer_actions`, and
627
639
  `create_account_actions` into a single `Array<RpcAction>` — the canonical
628
- fuz_app "standard" surface (28 actions: 14 admin + 7 role-grant-offer + 7
629
- account; the two app-settings methods are always wired). Frontend mirror is
640
+ fuz_app "standard" surface (admin + role-grant-offer + account; the two
641
+ app-settings methods are always wired). Frontend mirror is
630
642
  `all_standard_action_specs` in `auth/standard_action_specs.ts`.
631
643
 
632
644
  Option routing — `roles` is shared between admin + role-grant-offer;
@@ -58,12 +58,19 @@ export declare const ERROR_CELL_VISIBILITY_MANAGE_ONLY: "cell_visibility_manage_
58
58
  /** Error reason — input shape for `cell_get` lacked both `id` and `path`. */
59
59
  export declare const ERROR_CELL_GET_REQUIRES_ID_OR_PATH: "cell_get_requires_id_or_path";
60
60
  /**
61
- * Error reason — `cell_clone` `with_data_patch` would change `data.kind`.
62
- * Per-kind shape validation can pass coincidentally (e.g., one kind's
63
- * schema accepts most of another's fields), so we reject the cross-kind
64
- * patch explicitly to prevent incoherent clones.
61
+ * Error reason — a `kind` key was supplied inside `data`. `kind` is a
62
+ * top-level column (`cell.kind`), not content metadata; accepting it inside
63
+ * `data` would create two sources of truth. Rejected fail-loud at the
64
+ * create / update / clone-patch boundary so the column stays canonical.
65
65
  */
66
- export declare const ERROR_CELL_CLONE_KIND_MISMATCH: "cell_clone_kind_mismatch";
66
+ export declare const ERROR_CELL_KIND_IN_DATA: "cell_kind_in_data";
67
+ /**
68
+ * Error reason — `cell_create` was given an empty-string `kind`. `kind` is a
69
+ * non-empty capability tag or absent (`null` = typeless cell); `""` (a tag
70
+ * that tags nothing) is rejected fail-loud so `kind` stays a clean
71
+ * `null | non-empty-string` (twin of the Rust `ERROR_CELL_KIND_EMPTY`).
72
+ */
73
+ export declare const ERROR_CELL_KIND_EMPTY: "cell_kind_empty";
67
74
  /**
68
75
  * Error reason — null-auth `cell_list` caller passed a `created_by`
69
76
  * filter. The filter is a soft account-id enumeration vector ("does
@@ -130,10 +137,10 @@ export declare const CellJson: z.ZodObject<{
130
137
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
131
138
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
132
139
  data: z.ZodObject<{
133
- kind: z.ZodOptional<z.ZodString>;
134
140
  label: z.ZodOptional<z.ZodString>;
135
141
  summary: z.ZodOptional<z.ZodString>;
136
142
  }, z.core.$loose>;
143
+ kind: z.ZodNullable<z.ZodString>;
137
144
  visibility: z.ZodEnum<{
138
145
  private: "private";
139
146
  public: "public";
@@ -154,10 +161,10 @@ export type CellJson = z.infer<typeof CellJson>;
154
161
  */
155
162
  export declare const CellCreateInput: z.ZodObject<{
156
163
  data: z.ZodObject<{
157
- kind: z.ZodOptional<z.ZodString>;
158
164
  label: z.ZodOptional<z.ZodString>;
159
165
  summary: z.ZodOptional<z.ZodString>;
160
166
  }, z.core.$loose>;
167
+ kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
161
168
  visibility: z.ZodOptional<z.ZodEnum<{
162
169
  private: "private";
163
170
  public: "public";
@@ -171,10 +178,10 @@ export declare const CellCreateOutput: z.ZodObject<{
171
178
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
172
179
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
173
180
  data: z.ZodObject<{
174
- kind: z.ZodOptional<z.ZodString>;
175
181
  label: z.ZodOptional<z.ZodString>;
176
182
  summary: z.ZodOptional<z.ZodString>;
177
183
  }, z.core.$loose>;
184
+ kind: z.ZodNullable<z.ZodString>;
178
185
  visibility: z.ZodEnum<{
179
186
  private: "private";
180
187
  public: "public";
@@ -215,10 +222,10 @@ export declare const CellGetOutput: z.ZodObject<{
215
222
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
216
223
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
217
224
  data: z.ZodObject<{
218
- kind: z.ZodOptional<z.ZodString>;
219
225
  label: z.ZodOptional<z.ZodString>;
220
226
  summary: z.ZodOptional<z.ZodString>;
221
227
  }, z.core.$loose>;
228
+ kind: z.ZodNullable<z.ZodString>;
222
229
  visibility: z.ZodEnum<{
223
230
  private: "private";
224
231
  public: "public";
@@ -260,7 +267,6 @@ export type CellGetOutput = z.infer<typeof CellGetOutput>;
260
267
  export declare const CellUpdateInput: z.ZodObject<{
261
268
  cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
262
269
  data: z.ZodOptional<z.ZodObject<{
263
- kind: z.ZodOptional<z.ZodString>;
264
270
  label: z.ZodOptional<z.ZodString>;
265
271
  summary: z.ZodOptional<z.ZodString>;
266
272
  }, z.core.$loose>>;
@@ -277,10 +283,10 @@ export declare const CellUpdateOutput: z.ZodObject<{
277
283
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
278
284
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
279
285
  data: z.ZodObject<{
280
- kind: z.ZodOptional<z.ZodString>;
281
286
  label: z.ZodOptional<z.ZodString>;
282
287
  summary: z.ZodOptional<z.ZodString>;
283
288
  }, z.core.$loose>;
289
+ kind: z.ZodNullable<z.ZodString>;
284
290
  visibility: z.ZodEnum<{
285
291
  private: "private";
286
292
  public: "public";
@@ -319,7 +325,7 @@ export type CellDeleteOutput = z.infer<typeof CellDeleteOutput>;
319
325
  * `shared_with: 'me'` narrows to cells that admit the caller via a
320
326
  * `cell_grant` row (actor-shaped or role-shaped principal) AND that
321
327
  * the caller does not own. Authenticated only; combine with
322
- * `data_kind` / `path_prefix` etc. to scope further. Combining with
328
+ * `kind` / `path_prefix` etc. to scope further. Combining with
323
329
  * `created_by: <my-actor-id>` produces an empty result by definition
324
330
  * (owner is implicit, never appears as a grant principal); we don't
325
331
  * reject the combination at the schema layer because SQL emptiness is
@@ -327,7 +333,7 @@ export type CellDeleteOutput = z.infer<typeof CellDeleteOutput>;
327
333
  */
328
334
  export declare const CellListInput: z.ZodDefault<z.ZodObject<{
329
335
  ids: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
330
- data_kind: z.ZodOptional<z.ZodString>;
336
+ kind: z.ZodOptional<z.ZodString>;
331
337
  visibility: z.ZodOptional<z.ZodEnum<{
332
338
  private: "private";
333
339
  public: "public";
@@ -354,10 +360,10 @@ export declare const CellListOutput: z.ZodObject<{
354
360
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
355
361
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
356
362
  data: z.ZodObject<{
357
- kind: z.ZodOptional<z.ZodString>;
358
363
  label: z.ZodOptional<z.ZodString>;
359
364
  summary: z.ZodOptional<z.ZodString>;
360
365
  }, z.core.$loose>;
366
+ kind: z.ZodNullable<z.ZodString>;
361
367
  visibility: z.ZodEnum<{
362
368
  private: "private";
363
369
  public: "public";
@@ -396,7 +402,6 @@ export declare const CellCloneInput: z.ZodObject<{
396
402
  source_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
397
403
  deep: z.ZodOptional<z.ZodBoolean>;
398
404
  with_data_patch: z.ZodOptional<z.ZodObject<{
399
- kind: z.ZodOptional<z.ZodString>;
400
405
  label: z.ZodOptional<z.ZodString>;
401
406
  summary: z.ZodOptional<z.ZodString>;
402
407
  }, z.core.$loose>>;
@@ -408,10 +413,10 @@ export declare const CellCloneOutput: z.ZodObject<{
408
413
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
409
414
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
410
415
  data: z.ZodObject<{
411
- kind: z.ZodOptional<z.ZodString>;
412
416
  label: z.ZodOptional<z.ZodString>;
413
417
  summary: z.ZodOptional<z.ZodString>;
414
418
  }, z.core.$loose>;
419
+ kind: z.ZodNullable<z.ZodString>;
415
420
  visibility: z.ZodEnum<{
416
421
  private: "private";
417
422
  public: "public";
@@ -437,10 +442,10 @@ export declare const cell_create_action_spec: {
437
442
  side_effects: true;
438
443
  input: z.ZodObject<{
439
444
  data: z.ZodObject<{
440
- kind: z.ZodOptional<z.ZodString>;
441
445
  label: z.ZodOptional<z.ZodString>;
442
446
  summary: z.ZodOptional<z.ZodString>;
443
447
  }, z.core.$loose>;
448
+ kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
444
449
  visibility: z.ZodOptional<z.ZodEnum<{
445
450
  private: "private";
446
451
  public: "public";
@@ -453,10 +458,10 @@ export declare const cell_create_action_spec: {
453
458
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
454
459
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
455
460
  data: z.ZodObject<{
456
- kind: z.ZodOptional<z.ZodString>;
457
461
  label: z.ZodOptional<z.ZodString>;
458
462
  summary: z.ZodOptional<z.ZodString>;
459
463
  }, z.core.$loose>;
464
+ kind: z.ZodNullable<z.ZodString>;
460
465
  visibility: z.ZodEnum<{
461
466
  private: "private";
462
467
  public: "public";
@@ -493,10 +498,10 @@ export declare const cell_get_action_spec: {
493
498
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
494
499
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
495
500
  data: z.ZodObject<{
496
- kind: z.ZodOptional<z.ZodString>;
497
501
  label: z.ZodOptional<z.ZodString>;
498
502
  summary: z.ZodOptional<z.ZodString>;
499
503
  }, z.core.$loose>;
504
+ kind: z.ZodNullable<z.ZodString>;
500
505
  visibility: z.ZodEnum<{
501
506
  private: "private";
502
507
  public: "public";
@@ -542,7 +547,6 @@ export declare const cell_update_action_spec: {
542
547
  input: z.ZodObject<{
543
548
  cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
544
549
  data: z.ZodOptional<z.ZodObject<{
545
- kind: z.ZodOptional<z.ZodString>;
546
550
  label: z.ZodOptional<z.ZodString>;
547
551
  summary: z.ZodOptional<z.ZodString>;
548
552
  }, z.core.$loose>>;
@@ -558,10 +562,10 @@ export declare const cell_update_action_spec: {
558
562
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
559
563
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
560
564
  data: z.ZodObject<{
561
- kind: z.ZodOptional<z.ZodString>;
562
565
  label: z.ZodOptional<z.ZodString>;
563
566
  summary: z.ZodOptional<z.ZodString>;
564
567
  }, z.core.$loose>;
568
+ kind: z.ZodNullable<z.ZodString>;
565
569
  visibility: z.ZodEnum<{
566
570
  private: "private";
567
571
  public: "public";
@@ -609,7 +613,7 @@ export declare const cell_list_action_spec: {
609
613
  side_effects: false;
610
614
  input: z.ZodDefault<z.ZodObject<{
611
615
  ids: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
612
- data_kind: z.ZodOptional<z.ZodString>;
616
+ kind: z.ZodOptional<z.ZodString>;
613
617
  visibility: z.ZodOptional<z.ZodEnum<{
614
618
  private: "private";
615
619
  public: "public";
@@ -635,10 +639,10 @@ export declare const cell_list_action_spec: {
635
639
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
636
640
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
637
641
  data: z.ZodObject<{
638
- kind: z.ZodOptional<z.ZodString>;
639
642
  label: z.ZodOptional<z.ZodString>;
640
643
  summary: z.ZodOptional<z.ZodString>;
641
644
  }, z.core.$loose>;
645
+ kind: z.ZodNullable<z.ZodString>;
642
646
  visibility: z.ZodEnum<{
643
647
  private: "private";
644
648
  public: "public";
@@ -682,7 +686,6 @@ export declare const cell_clone_action_spec: {
682
686
  source_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
683
687
  deep: z.ZodOptional<z.ZodBoolean>;
684
688
  with_data_patch: z.ZodOptional<z.ZodObject<{
685
- kind: z.ZodOptional<z.ZodString>;
686
689
  label: z.ZodOptional<z.ZodString>;
687
690
  summary: z.ZodOptional<z.ZodString>;
688
691
  }, z.core.$loose>>;
@@ -693,10 +696,10 @@ export declare const cell_clone_action_spec: {
693
696
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
694
697
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
695
698
  data: z.ZodObject<{
696
- kind: z.ZodOptional<z.ZodString>;
697
699
  label: z.ZodOptional<z.ZodString>;
698
700
  summary: z.ZodOptional<z.ZodString>;
699
701
  }, z.core.$loose>;
702
+ kind: z.ZodNullable<z.ZodString>;
700
703
  visibility: z.ZodEnum<{
701
704
  private: "private";
702
705
  public: "public";
@@ -732,10 +735,10 @@ export declare const all_cell_action_specs: readonly [{
732
735
  side_effects: true;
733
736
  input: z.ZodObject<{
734
737
  data: z.ZodObject<{
735
- kind: z.ZodOptional<z.ZodString>;
736
738
  label: z.ZodOptional<z.ZodString>;
737
739
  summary: z.ZodOptional<z.ZodString>;
738
740
  }, z.core.$loose>;
741
+ kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
739
742
  visibility: z.ZodOptional<z.ZodEnum<{
740
743
  private: "private";
741
744
  public: "public";
@@ -748,10 +751,10 @@ export declare const all_cell_action_specs: readonly [{
748
751
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
749
752
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
750
753
  data: z.ZodObject<{
751
- kind: z.ZodOptional<z.ZodString>;
752
754
  label: z.ZodOptional<z.ZodString>;
753
755
  summary: z.ZodOptional<z.ZodString>;
754
756
  }, z.core.$loose>;
757
+ kind: z.ZodNullable<z.ZodString>;
755
758
  visibility: z.ZodEnum<{
756
759
  private: "private";
757
760
  public: "public";
@@ -787,10 +790,10 @@ export declare const all_cell_action_specs: readonly [{
787
790
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
788
791
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
789
792
  data: z.ZodObject<{
790
- kind: z.ZodOptional<z.ZodString>;
791
793
  label: z.ZodOptional<z.ZodString>;
792
794
  summary: z.ZodOptional<z.ZodString>;
793
795
  }, z.core.$loose>;
796
+ kind: z.ZodNullable<z.ZodString>;
794
797
  visibility: z.ZodEnum<{
795
798
  private: "private";
796
799
  public: "public";
@@ -835,7 +838,6 @@ export declare const all_cell_action_specs: readonly [{
835
838
  input: z.ZodObject<{
836
839
  cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
837
840
  data: z.ZodOptional<z.ZodObject<{
838
- kind: z.ZodOptional<z.ZodString>;
839
841
  label: z.ZodOptional<z.ZodString>;
840
842
  summary: z.ZodOptional<z.ZodString>;
841
843
  }, z.core.$loose>>;
@@ -851,10 +853,10 @@ export declare const all_cell_action_specs: readonly [{
851
853
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
852
854
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
853
855
  data: z.ZodObject<{
854
- kind: z.ZodOptional<z.ZodString>;
855
856
  label: z.ZodOptional<z.ZodString>;
856
857
  summary: z.ZodOptional<z.ZodString>;
857
858
  }, z.core.$loose>;
859
+ kind: z.ZodNullable<z.ZodString>;
858
860
  visibility: z.ZodEnum<{
859
861
  private: "private";
860
862
  public: "public";
@@ -900,7 +902,7 @@ export declare const all_cell_action_specs: readonly [{
900
902
  side_effects: false;
901
903
  input: z.ZodDefault<z.ZodObject<{
902
904
  ids: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
903
- data_kind: z.ZodOptional<z.ZodString>;
905
+ kind: z.ZodOptional<z.ZodString>;
904
906
  visibility: z.ZodOptional<z.ZodEnum<{
905
907
  private: "private";
906
908
  public: "public";
@@ -926,10 +928,10 @@ export declare const all_cell_action_specs: readonly [{
926
928
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
927
929
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
928
930
  data: z.ZodObject<{
929
- kind: z.ZodOptional<z.ZodString>;
930
931
  label: z.ZodOptional<z.ZodString>;
931
932
  summary: z.ZodOptional<z.ZodString>;
932
933
  }, z.core.$loose>;
934
+ kind: z.ZodNullable<z.ZodString>;
933
935
  visibility: z.ZodEnum<{
934
936
  private: "private";
935
937
  public: "public";
@@ -972,7 +974,6 @@ export declare const all_cell_action_specs: readonly [{
972
974
  source_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
973
975
  deep: z.ZodOptional<z.ZodBoolean>;
974
976
  with_data_patch: z.ZodOptional<z.ZodObject<{
975
- kind: z.ZodOptional<z.ZodString>;
976
977
  label: z.ZodOptional<z.ZodString>;
977
978
  summary: z.ZodOptional<z.ZodString>;
978
979
  }, z.core.$loose>>;
@@ -983,10 +984,10 @@ export declare const all_cell_action_specs: readonly [{
983
984
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
984
985
  path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
985
986
  data: z.ZodObject<{
986
- kind: z.ZodOptional<z.ZodString>;
987
987
  label: z.ZodOptional<z.ZodString>;
988
988
  summary: z.ZodOptional<z.ZodString>;
989
989
  }, z.core.$loose>;
990
+ kind: z.ZodNullable<z.ZodString>;
990
991
  visibility: z.ZodEnum<{
991
992
  private: "private";
992
993
  public: "public";
@@ -1 +1 @@
1
- {"version":3,"file":"cell_action_specs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_action_specs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAMtB,OAAO,EAEN,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAE3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEN,0BAA0B,EAC1B,6BAA6B,EAC7B,2BAA2B,EAE3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEN,4BAA4B,EAC5B,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAE1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEN,2BAA2B,EAC3B,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;EAAgC,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYE,CAAC;AAEtC;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWxB,CAAC"}
@@ -64,12 +64,19 @@ export const ERROR_CELL_VISIBILITY_MANAGE_ONLY = 'cell_visibility_manage_only';
64
64
  /** Error reason — input shape for `cell_get` lacked both `id` and `path`. */
65
65
  export const ERROR_CELL_GET_REQUIRES_ID_OR_PATH = 'cell_get_requires_id_or_path';
66
66
  /**
67
- * Error reason — `cell_clone` `with_data_patch` would change `data.kind`.
68
- * Per-kind shape validation can pass coincidentally (e.g., one kind's
69
- * schema accepts most of another's fields), so we reject the cross-kind
70
- * patch explicitly to prevent incoherent clones.
67
+ * Error reason — a `kind` key was supplied inside `data`. `kind` is a
68
+ * top-level column (`cell.kind`), not content metadata; accepting it inside
69
+ * `data` would create two sources of truth. Rejected fail-loud at the
70
+ * create / update / clone-patch boundary so the column stays canonical.
71
71
  */
72
- export const ERROR_CELL_CLONE_KIND_MISMATCH = 'cell_clone_kind_mismatch';
72
+ export const ERROR_CELL_KIND_IN_DATA = 'cell_kind_in_data';
73
+ /**
74
+ * Error reason — `cell_create` was given an empty-string `kind`. `kind` is a
75
+ * non-empty capability tag or absent (`null` = typeless cell); `""` (a tag
76
+ * that tags nothing) is rejected fail-loud so `kind` stays a clean
77
+ * `null | non-empty-string` (twin of the Rust `ERROR_CELL_KIND_EMPTY`).
78
+ */
79
+ export const ERROR_CELL_KIND_EMPTY = 'cell_kind_empty';
73
80
  /**
74
81
  * Error reason — null-auth `cell_list` caller passed a `created_by`
75
82
  * filter. The filter is a soft account-id enumeration vector ("does
@@ -136,6 +143,9 @@ export const CellJson = z.strictObject({
136
143
  id: Uuid,
137
144
  path: CellPath.nullable(),
138
145
  data: CellData,
146
+ kind: z.string().nullable().meta({
147
+ description: 'Capability / identity tag — a write-once top-level column (peer to `visibility` / `path`), not a field inside `data`. `null` for a typeless cell. The discriminator a creation authorizer gates on; fixed at birth.',
148
+ }),
139
149
  visibility: CellVisibility.meta({
140
150
  description: "Access-control tag. `'public'` admits everyone (including unauthenticated visitors); `'private'` (default) admits admin / owner / `cell_grant`-admitted callers. Top-level column, not inside `data`.",
141
151
  }),
@@ -157,7 +167,10 @@ export const CellJson = z.strictObject({
157
167
  */
158
168
  export const CellCreateInput = z.strictObject({
159
169
  data: CellData.meta({
160
- description: 'Cell data. Base fields (kind / label / summary) typed; extras loose. Per-kind shape is sub-API.',
170
+ description: 'Cell content. Base fields (label / summary) typed; extras loose. A `kind` key here is rejected (`ERROR_CELL_KIND_IN_DATA`) — kind is the top-level field. Per-kind shape is sub-API.',
171
+ }),
172
+ kind: z.string().nullish().meta({
173
+ description: 'Capability / identity tag, written to the top-level `cell.kind` column (not `data`). Write-once — fixed at birth, not updatable. Non-empty when present (an empty string is rejected `ERROR_CELL_KIND_EMPTY`); omit / null for a typeless cell. A creation authorizer (if mounted) gates on this.',
161
174
  }),
162
175
  visibility: CellVisibility.optional().meta({
163
176
  description: "Access-control tag. Top-level column (not in `data`). Default `'private'` when omitted.",
@@ -245,7 +258,7 @@ export const CellDeleteOutput = z.strictObject({
245
258
  * `shared_with: 'me'` narrows to cells that admit the caller via a
246
259
  * `cell_grant` row (actor-shaped or role-shaped principal) AND that
247
260
  * the caller does not own. Authenticated only; combine with
248
- * `data_kind` / `path_prefix` etc. to scope further. Combining with
261
+ * `kind` / `path_prefix` etc. to scope further. Combining with
249
262
  * `created_by: <my-actor-id>` produces an empty result by definition
250
263
  * (owner is implicit, never appears as a grant principal); we don't
251
264
  * reject the combination at the schema layer because SQL emptiness is
@@ -258,7 +271,9 @@ export const CellListInput = z
258
271
  .max(CELL_LIST_LIMIT_MAX)
259
272
  .optional()
260
273
  .meta({ description: 'Batch-fetch by id. Visibility predicate still applies.' }),
261
- data_kind: z.string().min(1).optional().meta({ description: 'Match `data.kind = ?`.' }),
274
+ kind: z.string().optional().meta({
275
+ description: 'Match `cell.kind = ?`. An empty string matches nothing — no cell carries an empty kind.',
276
+ }),
262
277
  visibility: CellVisibility.optional().meta({
263
278
  description: "Match `cell.visibility = ?`. The SQL-side auth-narrow already filters to public-or-admitted; this is an additional narrowing filter (e.g. `visibility: 'public'` on the discovery feed so authed callers don't see their own private entries mixed in).",
264
279
  }),
@@ -39,10 +39,34 @@
39
39
  * @module
40
40
  */
41
41
  import { type RpcAction } from '../actions/action_rpc.js';
42
+ import { type RequestActorContext } from './request_context.js';
42
43
  import type { RouteFactoryDeps } from './deps.js';
44
+ import type { Uuid } from '@fuzdev/fuz_util/id.ts';
43
45
  import { type CellJson } from './cell_action_specs.js';
44
46
  import { type CellRow } from '../db/cell_queries.js';
45
47
  import type { CellData } from './cell_data_schema.js';
48
+ /**
49
+ * Input to a `CellCreateAuthorize` callback — the TS twin of the Rust
50
+ * `CellCreateAuthorizeInput`.
51
+ */
52
+ export interface CellCreateAuthorizeInput {
53
+ /** The cell's `kind` (the top-level `cell.kind` value); `null` for a typeless cell. */
54
+ kind: string | null;
55
+ /** The cell `data` (kind-free — a `kind` key is rejected upstream). For richer M3-era policies (e.g. content pre-screen). */
56
+ data: CellData;
57
+ /** Target scope — designed-in for M2 space-scoping; **always `null` in v1** (cells carry no scope column). */
58
+ scope_id: Uuid | null;
59
+ }
60
+ /**
61
+ * Opt-in creation authorizer — the TS twin of the Rust `CellCreateAuthorize`
62
+ * trait. Answers "may *this actor* create *this kind* of cell?". Runs in
63
+ * `cell_create` after `validate_data`, before the insert; returning `false`
64
+ * surfaces as the existing `cell_not_found` 404 (IDOR mask), so a denied
65
+ * caller can't distinguish a gated kind from a missing resource. Omitted =
66
+ * today's open create (all consumers untouched). Async-capable (DB / policy
67
+ * calls) — the create handler is already async with `auth` in hand.
68
+ */
69
+ export type CellCreateAuthorize = (auth: RequestActorContext, input: CellCreateAuthorizeInput) => boolean | Promise<boolean>;
46
70
  /**
47
71
  * Dependencies for `create_cell_actions`.
48
72
  *
@@ -53,9 +77,13 @@ import type { CellData } from './cell_data_schema.js';
53
77
  * `invalid_params` JSON-RPC error so per-kind validation failures
54
78
  * surface to clients with code -32602 (not -32603 / internal). When
55
79
  * omitted, payloads pass through as-is.
80
+ *
81
+ * `authorize_create` is the optional creation-gate hook (see
82
+ * `CellCreateAuthorize`). When omitted, create is open (today's behavior).
56
83
  */
57
84
  export type CellActionDeps = Pick<RouteFactoryDeps, 'log' | 'audit'> & {
58
85
  validate_data?: (data: CellData) => CellData;
86
+ authorize_create?: CellCreateAuthorize;
59
87
  };
60
88
  export declare const to_cell_json: (row: CellRow) => CellJson;
61
89
  /** Create the six generic cell RPC actions. */
@@ -1 +1 @@
1
- {"version":3,"file":"cell_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/cell_actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAIH,OAAO,E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