@fuzdev/fuz_app 0.149.0 → 0.150.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 (141) hide show
  1. package/dist/actions/CLAUDE.md +9 -7
  2. package/dist/actions/action_bridge.d.ts +7 -0
  3. package/dist/actions/action_bridge.d.ts.map +1 -1
  4. package/dist/actions/action_bridge.js +10 -0
  5. package/dist/actions/action_event_types.d.ts +1 -1
  6. package/dist/actions/action_event_types.d.ts.map +1 -1
  7. package/dist/actions/perform_action.d.ts.map +1 -1
  8. package/dist/actions/perform_action.js +8 -5
  9. package/dist/actions/register_action_ws.d.ts +8 -2
  10. package/dist/actions/register_action_ws.d.ts.map +1 -1
  11. package/dist/actions/register_action_ws.js +24 -4
  12. package/dist/actions/transports_ws_auth_guard.d.ts +6 -4
  13. package/dist/actions/transports_ws_auth_guard.d.ts.map +1 -1
  14. package/dist/actions/transports_ws_auth_guard.js +9 -6
  15. package/dist/actions/ws_endpoint_spec.d.ts +1 -1
  16. package/dist/auth/CLAUDE.md +69 -31
  17. package/dist/auth/actor_lookup_queries.d.ts +3 -2
  18. package/dist/auth/actor_lookup_queries.d.ts.map +1 -1
  19. package/dist/auth/actor_lookup_queries.js +6 -3
  20. package/dist/auth/actor_search_queries.d.ts +5 -2
  21. package/dist/auth/actor_search_queries.d.ts.map +1 -1
  22. package/dist/auth/actor_search_queries.js +11 -4
  23. package/dist/auth/admin_action_specs.d.ts +4 -4
  24. package/dist/auth/admin_action_specs.js +4 -4
  25. package/dist/auth/admin_actions.d.ts.map +1 -1
  26. package/dist/auth/admin_actions.js +35 -6
  27. package/dist/auth/all_cell_actions.d.ts +11 -2
  28. package/dist/auth/all_cell_actions.d.ts.map +1 -1
  29. package/dist/auth/all_cell_actions.js +2 -1
  30. package/dist/auth/audit_emitter.d.ts +9 -3
  31. package/dist/auth/audit_emitter.d.ts.map +1 -1
  32. package/dist/auth/audit_emitter.js +9 -3
  33. package/dist/auth/audit_log_schema.d.ts +1 -0
  34. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  35. package/dist/auth/audit_log_schema.js +9 -5
  36. package/dist/auth/bootstrap_account.d.ts +25 -1
  37. package/dist/auth/bootstrap_account.d.ts.map +1 -1
  38. package/dist/auth/bootstrap_account.js +37 -4
  39. package/dist/auth/bootstrap_routes.d.ts +3 -2
  40. package/dist/auth/bootstrap_routes.d.ts.map +1 -1
  41. package/dist/auth/bootstrap_routes.js +5 -4
  42. package/dist/auth/cell_action_specs.d.ts +215 -15
  43. package/dist/auth/cell_action_specs.d.ts.map +1 -1
  44. package/dist/auth/cell_action_specs.js +103 -16
  45. package/dist/auth/cell_actions.d.ts +40 -18
  46. package/dist/auth/cell_actions.d.ts.map +1 -1
  47. package/dist/auth/cell_actions.js +126 -19
  48. package/dist/auth/cell_audit_events.d.ts +1 -1
  49. package/dist/auth/cell_audit_events.d.ts.map +1 -1
  50. package/dist/auth/cell_audit_events.js +3 -2
  51. package/dist/auth/cell_audit_metadata.d.ts +11 -0
  52. package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
  53. package/dist/auth/cell_audit_metadata.js +10 -0
  54. package/dist/auth/cell_grant_action_specs.d.ts +7 -0
  55. package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
  56. package/dist/auth/cell_grant_action_specs.js +7 -0
  57. package/dist/auth/cell_grant_actions.d.ts +36 -4
  58. package/dist/auth/cell_grant_actions.d.ts.map +1 -1
  59. package/dist/auth/cell_grant_actions.js +20 -3
  60. package/dist/auth/credential_type_schema.d.ts +3 -2
  61. package/dist/auth/credential_type_schema.d.ts.map +1 -1
  62. package/dist/auth/credential_type_schema.js +3 -2
  63. package/dist/auth/role_grant_offer_action_specs.d.ts +18 -2
  64. package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
  65. package/dist/auth/role_grant_offer_action_specs.js +25 -3
  66. package/dist/auth/role_grant_offer_actions.d.ts +9 -4
  67. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  68. package/dist/auth/role_grant_offer_actions.js +58 -7
  69. package/dist/auth/role_grant_offer_notifications.d.ts +3 -2
  70. package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
  71. package/dist/auth/role_grant_offer_notifications.js +3 -2
  72. package/dist/auth/role_grant_offer_queries.d.ts +20 -0
  73. package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
  74. package/dist/auth/role_grant_offer_queries.js +35 -0
  75. package/dist/auth/role_grant_queries.d.ts +27 -9
  76. package/dist/auth/role_grant_queries.d.ts.map +1 -1
  77. package/dist/auth/role_grant_queries.js +40 -13
  78. package/dist/auth/role_schema.d.ts +14 -8
  79. package/dist/auth/role_schema.d.ts.map +1 -1
  80. package/dist/auth/role_schema.js +6 -3
  81. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  82. package/dist/auth/self_service_role_actions.js +20 -0
  83. package/dist/db/CLAUDE.md +9 -2
  84. package/dist/db/cell_ddl.d.ts +9 -1
  85. package/dist/db/cell_ddl.d.ts.map +1 -1
  86. package/dist/db/cell_ddl.js +11 -1
  87. package/dist/db/cell_queries.d.ts +53 -7
  88. package/dist/db/cell_queries.d.ts.map +1 -1
  89. package/dist/db/cell_queries.js +61 -7
  90. package/dist/http/body_limit.d.ts +3 -1
  91. package/dist/http/body_limit.d.ts.map +1 -1
  92. package/dist/http/body_limit.js +6 -1
  93. package/dist/http/jsonrpc.d.ts +9 -0
  94. package/dist/http/jsonrpc.d.ts.map +1 -1
  95. package/dist/http/jsonrpc.js +17 -0
  96. package/dist/http/jsonrpc_errors.d.ts.map +1 -1
  97. package/dist/http/jsonrpc_errors.js +29 -20
  98. package/dist/http/proxy.d.ts +4 -2
  99. package/dist/http/proxy.d.ts.map +1 -1
  100. package/dist/http/proxy.js +7 -2
  101. package/dist/http/surface.d.ts +3 -1
  102. package/dist/http/surface.d.ts.map +1 -1
  103. package/dist/http/surface.js +7 -4
  104. package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
  105. package/dist/realtime/sse_auth_guard.js +3 -2
  106. package/dist/schema_meta.d.ts +32 -1
  107. package/dist/schema_meta.d.ts.map +1 -1
  108. package/dist/schema_meta.js +58 -5
  109. package/dist/server/app_server.d.ts +13 -5
  110. package/dist/server/app_server.d.ts.map +1 -1
  111. package/dist/server/app_server.js +32 -8
  112. package/dist/testing/CLAUDE.md +34 -21
  113. package/dist/testing/app_server.d.ts +3 -1
  114. package/dist/testing/app_server.d.ts.map +1 -1
  115. package/dist/testing/cross_backend/actor_lookup.d.ts.map +1 -1
  116. package/dist/testing/cross_backend/actor_lookup.js +27 -0
  117. package/dist/testing/cross_backend/capabilities.d.ts +2 -1
  118. package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
  119. package/dist/testing/cross_backend/cell_gated_create.d.ts.map +1 -1
  120. package/dist/testing/cross_backend/cell_gated_create.js +109 -13
  121. package/dist/testing/cross_backend/cell_moderate.d.ts +7 -1
  122. package/dist/testing/cross_backend/cell_moderate.d.ts.map +1 -1
  123. package/dist/testing/cross_backend/cell_moderate.js +68 -4
  124. package/dist/testing/cross_backend/cell_ref_admission.d.ts.map +1 -1
  125. package/dist/testing/cross_backend/cell_ref_admission.js +18 -9
  126. package/dist/testing/cross_backend/conformance_table.d.ts +5 -0
  127. package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
  128. package/dist/testing/cross_backend/conformance_table.js +12 -10
  129. package/dist/testing/cross_backend/differential.d.ts +7 -0
  130. package/dist/testing/cross_backend/differential.d.ts.map +1 -1
  131. package/dist/testing/cross_backend/differential.js +17 -0
  132. package/dist/testing/cross_backend/expected_schema.json +1 -0
  133. package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
  134. package/dist/testing/cross_backend/full_spine_mount.js +5 -4
  135. package/dist/testing/cross_backend/role_grant_offer_lifecycle.d.ts.map +1 -1
  136. package/dist/testing/cross_backend/role_grant_offer_lifecycle.js +74 -2
  137. package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts +18 -19
  138. package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts.map +1 -1
  139. package/dist/testing/cross_backend/test_cell_gated_create_authorize.js +66 -42
  140. package/dist/testing/cross_backend/transport_composition.js +3 -3
  141. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Cell RPC action specs — the declarative contract for the six generic
3
- * cell verbs. App vocabulary (galleries, posts, events) lives in
2
+ * Cell RPC action specs — the declarative contract for the generic cell
3
+ * verbs. App vocabulary (galleries, posts, events) lives in
4
4
  * client-side helpers; the wire stays generic.
5
5
  *
6
6
  * @module
@@ -107,6 +107,45 @@ export declare const ERROR_CELL_REF_NOT_HELD: "cell_ref_not_held";
107
107
  * `ERROR_CELL_NOT_A_CONTRIBUTION`).
108
108
  */
109
109
  export declare const ERROR_CELL_NOT_A_CONTRIBUTION: "cell_not_a_contribution";
110
+ /**
111
+ * Error reason — `cell_moderate` names a transition the target's `moderation`
112
+ * doesn't allow: an approval of a contribution that is not `'pending'`
113
+ * (approved or rejected already, or never moderated), or a rejection of one
114
+ * that is neither `'pending'` nor `'approved'` (rejected already, or never
115
+ * moderated). A **400** `invalid_params`, answered to a caller holding
116
+ * moderation authority over the governing root (the 404 mask and the 403 come
117
+ * first). Without it an approval would force any reachable contribution public
118
+ * (twin of the Rust `ERROR_CELL_NOT_PENDING`).
119
+ */
120
+ export declare const ERROR_CELL_NOT_PENDING: "cell_not_pending";
121
+ /**
122
+ * Error reason — a policy write (a `cell_create` carrying `policy`, or
123
+ * `cell_policy_set`) targeted a cell with a parent. Only a root carries a
124
+ * contribution policy. A **400** `invalid_params` (twin of the Rust
125
+ * `ERROR_CELL_POLICY_ROOT_ONLY`).
126
+ */
127
+ export declare const ERROR_CELL_POLICY_ROOT_ONLY: "cell_policy_root_only";
128
+ /**
129
+ * Error reason — a non-null policy write found nothing to interpret it: no
130
+ * `authorize_create` is mounted, or the mounted one has no `validate_policy`.
131
+ * The policy is opaque to the spine, so the write is refused rather than
132
+ * stored inert. A **400** `invalid_params` (twin of the Rust
133
+ * `ERROR_CELL_POLICY_UNSUPPORTED`).
134
+ */
135
+ export declare const ERROR_CELL_POLICY_UNSUPPORTED: "cell_policy_unsupported";
136
+ /**
137
+ * Error reason — a `cell_policy_set` caller can view the root but can't manage
138
+ * it (not admin, not the owner — an editor grant included). A **403**
139
+ * `forbidden`; a caller who can't view the root gets the 404 mask first (twin
140
+ * of the Rust `ERROR_CELL_POLICY_MANAGE_ONLY`).
141
+ */
142
+ export declare const ERROR_CELL_POLICY_MANAGE_ONLY: "cell_policy_manage_only";
143
+ /**
144
+ * Error reason — the conventional refusal a `CellCreateAuthorize.validate_policy`
145
+ * throws for a policy it can't interpret. The spine never answers it itself
146
+ * (twin of the Rust `ERROR_CELL_POLICY_INVALID`).
147
+ */
148
+ export declare const ERROR_CELL_POLICY_INVALID: "cell_policy_invalid";
110
149
  /**
111
150
  * Error reason — null-auth `cell_list` caller passed a `created_by`
112
151
  * filter. The filter is a soft account-id enumeration vector ("does
@@ -120,6 +159,14 @@ export declare const ERROR_CELL_LIST_CREATED_BY_REQUIRES_AUTH: "cell_list_create
120
159
  * exist for an authenticated session.
121
160
  */
122
161
  export declare const ERROR_CELL_LIST_SHARED_WITH_REQUIRES_AUTH: "cell_list_shared_with_requires_auth";
162
+ /**
163
+ * A root's contribution policy — any JSON object. Opaque to the spine: the
164
+ * consumer's create authorizer validates it (`CellCreateAuthorize.validate_policy`)
165
+ * and interprets it (`CellCreateAuthorizeInput.root_policy`). Loose for that
166
+ * reason — the keys are the consumer's. Twin of the Rust `CellPolicy`.
167
+ */
168
+ export declare const CellPolicy: z.ZodObject<{}, z.core.$loose>;
169
+ export type CellPolicy = z.infer<typeof CellPolicy>;
123
170
  /**
124
171
  * Wire form for `cell.path`.
125
172
  *
@@ -195,6 +242,7 @@ export declare const CellJson: z.ZodObject<{
195
242
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
196
243
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
197
244
  moderation: z.ZodNullable<z.ZodString>;
245
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
198
246
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
199
247
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
200
248
  created_at: z.ZodString;
@@ -220,6 +268,7 @@ export declare const CellCreateInput: z.ZodObject<{
220
268
  }>>;
221
269
  path: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>>;
222
270
  parent_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
271
+ policy: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$loose>>>;
223
272
  acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
224
273
  }, z.core.$strict>;
225
274
  export type CellCreateInput = z.infer<typeof CellCreateInput>;
@@ -240,6 +289,7 @@ export declare const CellCreateOutput: z.ZodObject<{
240
289
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
241
290
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
242
291
  moderation: z.ZodNullable<z.ZodString>;
292
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
243
293
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
244
294
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
245
295
  created_at: z.ZodString;
@@ -291,6 +341,7 @@ export declare const CellGetOutput: z.ZodObject<{
291
341
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
292
342
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
293
343
  moderation: z.ZodNullable<z.ZodString>;
344
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
294
345
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
295
346
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
296
347
  created_at: z.ZodString;
@@ -355,6 +406,7 @@ export declare const CellUpdateOutput: z.ZodObject<{
355
406
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
356
407
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
357
408
  moderation: z.ZodNullable<z.ZodString>;
409
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
358
410
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
359
411
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
360
412
  created_at: z.ZodString;
@@ -437,6 +489,7 @@ export declare const CellListOutput: z.ZodObject<{
437
489
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
438
490
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
439
491
  moderation: z.ZodNullable<z.ZodString>;
492
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
440
493
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
441
494
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
442
495
  created_at: z.ZodString;
@@ -493,6 +546,7 @@ export declare const CellCloneOutput: z.ZodObject<{
493
546
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
494
547
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
495
548
  moderation: z.ZodNullable<z.ZodString>;
549
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
496
550
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
497
551
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
498
552
  created_at: z.ZodString;
@@ -506,8 +560,9 @@ export type CellCloneOutput = z.infer<typeof CellCloneOutput>;
506
560
  * The terminal transition a `cell_moderate` call applies to a gated
507
561
  * contribution's `moderation` lifecycle. The born state (`'pending'`) is set
508
562
  * by the create authorizer, never on the wire; the verb only moves it to a
509
- * terminal state. `'approved'` publishes (also flips `visibility → 'public'`);
510
- * `'rejected'` leaves it private.
563
+ * terminal state. `'approved'` publishes a pending contribution (also flips
564
+ * `visibility → 'public'`); `'rejected'` holds a pending one back or takes an
565
+ * approved one down, leaving visibility as it was.
511
566
  */
512
567
  export declare const CellModerationDecision: z.ZodEnum<{
513
568
  rejected: "rejected";
@@ -515,13 +570,16 @@ export declare const CellModerationDecision: z.ZodEnum<{
515
570
  }>;
516
571
  export type CellModerationDecision = z.infer<typeof CellModerationDecision>;
517
572
  /**
518
- * Input for `cell_moderate` — the `pending → approved | rejected` transition,
519
- * gated on moderation authority over the **governing root** (admin / root
520
- * owner in v1), not the contribution (which the author manages, and could
521
- * otherwise self-approve). 404 when the caller neither views the target nor
522
- * stewards it (a root manager reads a pending or rejected contribution through
523
- * the steward arm); 403 when the caller reaches it but isn't a root manager
524
- * (the author lands here).
573
+ * Input for `cell_moderate` — the `pending → approved | rejected` decision, plus
574
+ * the `approved → rejected` takedown, gated on moderation authority over the
575
+ * **governing root** (admin / root owner in v1), not the contribution (which
576
+ * the author manages, and could otherwise self-approve). 404 when the caller
577
+ * neither views the target nor stewards it (a root manager reads a pending or
578
+ * rejected contribution through the steward arm); 403 when the caller reaches
579
+ * it but isn't a root manager (the author lands here); 400 `cell_not_pending`
580
+ * when a root manager names a transition the contribution's state doesn't
581
+ * allow — approving one that is not pending, or rejecting one already rejected
582
+ * or never moderated.
525
583
  */
526
584
  export declare const CellModerateInput: z.ZodObject<{
527
585
  cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
@@ -549,6 +607,7 @@ export declare const CellModerateOutput: z.ZodObject<{
549
607
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
550
608
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
551
609
  moderation: z.ZodNullable<z.ZodString>;
610
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
552
611
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
553
612
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
554
613
  created_at: z.ZodString;
@@ -558,6 +617,47 @@ export declare const CellModerateOutput: z.ZodObject<{
558
617
  }, z.core.$strict>;
559
618
  }, z.core.$strict>;
560
619
  export type CellModerateOutput = z.infer<typeof CellModerateOutput>;
620
+ /**
621
+ * Input for `cell_policy_set` — replace a root's contribution policy, or clear
622
+ * it with `null`. Manage-tier on the root: 404 when the caller can't view it,
623
+ * 403 `ERROR_CELL_POLICY_MANAGE_ONLY` when they can but don't manage it (an
624
+ * editor grant included), 400 `ERROR_CELL_POLICY_ROOT_ONLY` on a cell with a
625
+ * parent, then the mounted authorizer's validation of a non-null policy
626
+ * (`ERROR_CELL_POLICY_UNSUPPORTED` when none can).
627
+ */
628
+ export declare const CellPolicySetInput: z.ZodObject<{
629
+ cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
630
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
631
+ acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
632
+ }, z.core.$strict>;
633
+ export type CellPolicySetInput = z.infer<typeof CellPolicySetInput>;
634
+ export declare const CellPolicySetOutput: z.ZodObject<{
635
+ cell: z.ZodObject<{
636
+ id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
637
+ path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
638
+ data: z.ZodObject<{
639
+ label: z.ZodOptional<z.ZodString>;
640
+ summary: z.ZodOptional<z.ZodString>;
641
+ }, z.core.$loose>;
642
+ kind: z.ZodNullable<z.ZodString>;
643
+ visibility: z.ZodEnum<{
644
+ private: "private";
645
+ public: "public";
646
+ }>;
647
+ refs: z.ZodNullable<z.ZodArray<z.ZodString & z.ZodType<import("@fuzdev/fuz_util/hash_schemas.js").FactHash, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_util/hash_schemas.js").FactHash, string>>>>;
648
+ parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
649
+ root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
650
+ moderation: z.ZodNullable<z.ZodString>;
651
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
652
+ created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
653
+ updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
654
+ created_at: z.ZodString;
655
+ updated_at: z.ZodNullable<z.ZodString>;
656
+ deleted_at: z.ZodNullable<z.ZodString>;
657
+ grant_count: z.ZodNumber;
658
+ }, z.core.$strict>;
659
+ }, z.core.$strict>;
660
+ export type CellPolicySetOutput = z.infer<typeof CellPolicySetOutput>;
561
661
  export declare const cell_create_action_spec: {
562
662
  method: string;
563
663
  kind: "request_response";
@@ -579,6 +679,7 @@ export declare const cell_create_action_spec: {
579
679
  }>>;
580
680
  path: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>>;
581
681
  parent_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
682
+ policy: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$loose>>>;
582
683
  acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
583
684
  }, z.core.$strict>;
584
685
  output: z.ZodObject<{
@@ -598,6 +699,7 @@ export declare const cell_create_action_spec: {
598
699
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
599
700
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
600
701
  moderation: z.ZodNullable<z.ZodString>;
702
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
601
703
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
602
704
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
603
705
  created_at: z.ZodString;
@@ -641,6 +743,7 @@ export declare const cell_get_action_spec: {
641
743
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
642
744
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
643
745
  moderation: z.ZodNullable<z.ZodString>;
746
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
644
747
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
645
748
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
646
749
  created_at: z.ZodString;
@@ -708,6 +811,7 @@ export declare const cell_update_action_spec: {
708
811
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
709
812
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
710
813
  moderation: z.ZodNullable<z.ZodString>;
814
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
711
815
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
712
816
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
713
817
  created_at: z.ZodString;
@@ -790,6 +894,7 @@ export declare const cell_list_action_spec: {
790
894
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
791
895
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
792
896
  moderation: z.ZodNullable<z.ZodString>;
897
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
793
898
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
794
899
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
795
900
  created_at: z.ZodString;
@@ -850,6 +955,7 @@ export declare const cell_clone_action_spec: {
850
955
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
851
956
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
852
957
  moderation: z.ZodNullable<z.ZodString>;
958
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
853
959
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
854
960
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
855
961
  created_at: z.ZodString;
@@ -896,6 +1002,51 @@ export declare const cell_moderate_action_spec: {
896
1002
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
897
1003
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
898
1004
  moderation: z.ZodNullable<z.ZodString>;
1005
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
1006
+ created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1007
+ updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1008
+ created_at: z.ZodString;
1009
+ updated_at: z.ZodNullable<z.ZodString>;
1010
+ deleted_at: z.ZodNullable<z.ZodString>;
1011
+ grant_count: z.ZodNumber;
1012
+ }, z.core.$strict>;
1013
+ }, z.core.$strict>;
1014
+ async: true;
1015
+ rate_limit: "account";
1016
+ description: string;
1017
+ };
1018
+ export declare const cell_policy_set_action_spec: {
1019
+ method: string;
1020
+ kind: "request_response";
1021
+ initiator: "frontend";
1022
+ auth: {
1023
+ account: "required";
1024
+ actor: "required";
1025
+ };
1026
+ side_effects: true;
1027
+ input: z.ZodObject<{
1028
+ cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
1029
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
1030
+ acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1031
+ }, z.core.$strict>;
1032
+ output: z.ZodObject<{
1033
+ cell: z.ZodObject<{
1034
+ id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
1035
+ path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
1036
+ data: z.ZodObject<{
1037
+ label: z.ZodOptional<z.ZodString>;
1038
+ summary: z.ZodOptional<z.ZodString>;
1039
+ }, z.core.$loose>;
1040
+ kind: z.ZodNullable<z.ZodString>;
1041
+ visibility: z.ZodEnum<{
1042
+ private: "private";
1043
+ public: "public";
1044
+ }>;
1045
+ refs: z.ZodNullable<z.ZodArray<z.ZodString & z.ZodType<import("@fuzdev/fuz_util/hash_schemas.js").FactHash, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_util/hash_schemas.js").FactHash, string>>>>;
1046
+ parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1047
+ root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1048
+ moderation: z.ZodNullable<z.ZodString>;
1049
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
899
1050
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
900
1051
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
901
1052
  created_at: z.ZodString;
@@ -910,10 +1061,9 @@ export declare const cell_moderate_action_spec: {
910
1061
  };
911
1062
  /**
912
1063
  * All cell-layer action specs — composed by app registries. Bundles the
913
- * seven generic verbs (this module), the three `cell_grant_*` specs, the
914
- * three `cell_field_*` specs, the four `cell_item_*` specs, and the
915
- * `cell_audit_list` spec so codegen + UI clients see a single cell
916
- * namespace.
1064
+ * generic verbs (this module) with the `cell_grant_*`, `cell_field_*`,
1065
+ * `cell_item_*`, and `cell_audit_list` specs so codegen + UI clients see a
1066
+ * single cell namespace.
917
1067
  */
918
1068
  export declare const all_cell_action_specs: readonly [{
919
1069
  method: string;
@@ -936,6 +1086,7 @@ export declare const all_cell_action_specs: readonly [{
936
1086
  }>>;
937
1087
  path: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>>;
938
1088
  parent_id: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>>;
1089
+ policy: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$loose>>>;
939
1090
  acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
940
1091
  }, z.core.$strict>;
941
1092
  output: z.ZodObject<{
@@ -955,6 +1106,7 @@ export declare const all_cell_action_specs: readonly [{
955
1106
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
956
1107
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
957
1108
  moderation: z.ZodNullable<z.ZodString>;
1109
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
958
1110
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
959
1111
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
960
1112
  created_at: z.ZodString;
@@ -997,6 +1149,7 @@ export declare const all_cell_action_specs: readonly [{
997
1149
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
998
1150
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
999
1151
  moderation: z.ZodNullable<z.ZodString>;
1152
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
1000
1153
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1001
1154
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1002
1155
  created_at: z.ZodString;
@@ -1063,6 +1216,7 @@ export declare const all_cell_action_specs: readonly [{
1063
1216
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1064
1217
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1065
1218
  moderation: z.ZodNullable<z.ZodString>;
1219
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
1066
1220
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1067
1221
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1068
1222
  created_at: z.ZodString;
@@ -1143,6 +1297,7 @@ export declare const all_cell_action_specs: readonly [{
1143
1297
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1144
1298
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1145
1299
  moderation: z.ZodNullable<z.ZodString>;
1300
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
1146
1301
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1147
1302
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1148
1303
  created_at: z.ZodString;
@@ -1202,6 +1357,7 @@ export declare const all_cell_action_specs: readonly [{
1202
1357
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1203
1358
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1204
1359
  moderation: z.ZodNullable<z.ZodString>;
1360
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
1205
1361
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1206
1362
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1207
1363
  created_at: z.ZodString;
@@ -1247,6 +1403,50 @@ export declare const all_cell_action_specs: readonly [{
1247
1403
  parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1248
1404
  root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1249
1405
  moderation: z.ZodNullable<z.ZodString>;
1406
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
1407
+ created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1408
+ updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1409
+ created_at: z.ZodString;
1410
+ updated_at: z.ZodNullable<z.ZodString>;
1411
+ deleted_at: z.ZodNullable<z.ZodString>;
1412
+ grant_count: z.ZodNumber;
1413
+ }, z.core.$strict>;
1414
+ }, z.core.$strict>;
1415
+ async: true;
1416
+ rate_limit: "account";
1417
+ description: string;
1418
+ }, {
1419
+ method: string;
1420
+ kind: "request_response";
1421
+ initiator: "frontend";
1422
+ auth: {
1423
+ account: "required";
1424
+ actor: "required";
1425
+ };
1426
+ side_effects: true;
1427
+ input: z.ZodObject<{
1428
+ cell_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
1429
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
1430
+ acting: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1431
+ }, z.core.$strict>;
1432
+ output: z.ZodObject<{
1433
+ cell: z.ZodObject<{
1434
+ id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
1435
+ path: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "CellPath", "out">>;
1436
+ data: z.ZodObject<{
1437
+ label: z.ZodOptional<z.ZodString>;
1438
+ summary: z.ZodOptional<z.ZodString>;
1439
+ }, z.core.$loose>;
1440
+ kind: z.ZodNullable<z.ZodString>;
1441
+ visibility: z.ZodEnum<{
1442
+ private: "private";
1443
+ public: "public";
1444
+ }>;
1445
+ refs: z.ZodNullable<z.ZodArray<z.ZodString & z.ZodType<import("@fuzdev/fuz_util/hash_schemas.js").FactHash, string, z.core.$ZodTypeInternals<import("@fuzdev/fuz_util/hash_schemas.js").FactHash, string>>>>;
1446
+ parent_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1447
+ root_id: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1448
+ moderation: z.ZodNullable<z.ZodString>;
1449
+ policy: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
1250
1450
  created_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1251
1451
  updated_by: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">>;
1252
1452
  created_at: z.ZodString;
@@ -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,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,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,0BAA0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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaxB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Cell RPC action specs — the declarative contract for the six generic
3
- * cell verbs. App vocabulary (galleries, posts, events) lives in
2
+ * Cell RPC action specs — the declarative contract for the generic cell
3
+ * verbs. App vocabulary (galleries, posts, events) lives in
4
4
  * client-side helpers; the wire stays generic.
5
5
  *
6
6
  * @module
@@ -112,6 +112,45 @@ export const ERROR_CELL_REF_NOT_HELD = 'cell_ref_not_held';
112
112
  * `ERROR_CELL_NOT_A_CONTRIBUTION`).
113
113
  */
114
114
  export const ERROR_CELL_NOT_A_CONTRIBUTION = 'cell_not_a_contribution';
115
+ /**
116
+ * Error reason — `cell_moderate` names a transition the target's `moderation`
117
+ * doesn't allow: an approval of a contribution that is not `'pending'`
118
+ * (approved or rejected already, or never moderated), or a rejection of one
119
+ * that is neither `'pending'` nor `'approved'` (rejected already, or never
120
+ * moderated). A **400** `invalid_params`, answered to a caller holding
121
+ * moderation authority over the governing root (the 404 mask and the 403 come
122
+ * first). Without it an approval would force any reachable contribution public
123
+ * (twin of the Rust `ERROR_CELL_NOT_PENDING`).
124
+ */
125
+ export const ERROR_CELL_NOT_PENDING = 'cell_not_pending';
126
+ /**
127
+ * Error reason — a policy write (a `cell_create` carrying `policy`, or
128
+ * `cell_policy_set`) targeted a cell with a parent. Only a root carries a
129
+ * contribution policy. A **400** `invalid_params` (twin of the Rust
130
+ * `ERROR_CELL_POLICY_ROOT_ONLY`).
131
+ */
132
+ export const ERROR_CELL_POLICY_ROOT_ONLY = 'cell_policy_root_only';
133
+ /**
134
+ * Error reason — a non-null policy write found nothing to interpret it: no
135
+ * `authorize_create` is mounted, or the mounted one has no `validate_policy`.
136
+ * The policy is opaque to the spine, so the write is refused rather than
137
+ * stored inert. A **400** `invalid_params` (twin of the Rust
138
+ * `ERROR_CELL_POLICY_UNSUPPORTED`).
139
+ */
140
+ export const ERROR_CELL_POLICY_UNSUPPORTED = 'cell_policy_unsupported';
141
+ /**
142
+ * Error reason — a `cell_policy_set` caller can view the root but can't manage
143
+ * it (not admin, not the owner — an editor grant included). A **403**
144
+ * `forbidden`; a caller who can't view the root gets the 404 mask first (twin
145
+ * of the Rust `ERROR_CELL_POLICY_MANAGE_ONLY`).
146
+ */
147
+ export const ERROR_CELL_POLICY_MANAGE_ONLY = 'cell_policy_manage_only';
148
+ /**
149
+ * Error reason — the conventional refusal a `CellCreateAuthorize.validate_policy`
150
+ * throws for a policy it can't interpret. The spine never answers it itself
151
+ * (twin of the Rust `ERROR_CELL_POLICY_INVALID`).
152
+ */
153
+ export const ERROR_CELL_POLICY_INVALID = 'cell_policy_invalid';
115
154
  /**
116
155
  * Error reason — null-auth `cell_list` caller passed a `created_by`
117
156
  * filter. The filter is a soft account-id enumeration vector ("does
@@ -126,6 +165,15 @@ export const ERROR_CELL_LIST_CREATED_BY_REQUIRES_AUTH = 'cell_list_created_by_re
126
165
  */
127
166
  export const ERROR_CELL_LIST_SHARED_WITH_REQUIRES_AUTH = 'cell_list_shared_with_requires_auth';
128
167
  // -- Shared schemas ---------------------------------------------------------
168
+ /**
169
+ * A root's contribution policy — any JSON object. Opaque to the spine: the
170
+ * consumer's create authorizer validates it (`CellCreateAuthorize.validate_policy`)
171
+ * and interprets it (`CellCreateAuthorizeInput.root_policy`). Loose for that
172
+ * reason — the keys are the consumer's. Twin of the Rust `CellPolicy`.
173
+ */
174
+ export const CellPolicy = z.looseObject({}).meta({
175
+ description: "A root's contribution policy — a JSON object the mounted create authorizer validates and interprets; the spine stores it without reading it."
176
+ });
129
177
  /**
130
178
  * Wire form for `cell.path`.
131
179
  *
@@ -204,6 +252,9 @@ export const CellJson = z.strictObject({
204
252
  moderation: z.string().nullable().meta({
205
253
  description: "Approval-lifecycle marker for a gated contribution (`'pending'` / `'approved'` / `'rejected'`); `null` = unmoderated. A control field with a non-author writer — peer to `visibility`, never inside `data` (set by the create authorizer's verdict, transitioned only by `cell_moderate`)."
206
254
  }),
255
+ policy: CellPolicy.nullable().meta({
256
+ description: "A root's contribution policy, read by the create authorizer for every contribution under it; `null` = the authorizer's floor governs, and always `null` on a cell with a parent. A manage-tier control field — set at the root's `cell_create`, changed only by `cell_policy_set`, never inside `data`."
257
+ }),
207
258
  created_by: Uuid.nullable(),
208
259
  updated_by: Uuid.nullable(),
209
260
  created_at: z.string(),
@@ -237,6 +288,9 @@ export const CellCreateInput = z.strictObject({
237
288
  parent_id: Uuid.nullish().meta({
238
289
  description: 'Immediate container — the directory this cell is created in. Omit / null = a root (parentless). The handler resolves `root_id` from it and gates the create through the parent-aware authorizer; `root_id` / `moderation` are handler-derived, never wire input.'
239
290
  }),
291
+ policy: CellPolicy.nullish().meta({
292
+ description: "The new root's contribution policy. Root-only (beside a `parent_id` it is refused `ERROR_CELL_POLICY_ROOT_ONLY`), and the mounted create authorizer must accept it (`ERROR_CELL_POLICY_UNSUPPORTED` when none can). Omit / null = no policy."
293
+ }),
240
294
  acting: ActingActor
241
295
  });
242
296
  export const CellCreateOutput = z.strictObject({ cell: CellJson });
@@ -392,18 +446,22 @@ export const CellCloneOutput = z.strictObject({ cell: CellJson });
392
446
  * The terminal transition a `cell_moderate` call applies to a gated
393
447
  * contribution's `moderation` lifecycle. The born state (`'pending'`) is set
394
448
  * by the create authorizer, never on the wire; the verb only moves it to a
395
- * terminal state. `'approved'` publishes (also flips `visibility → 'public'`);
396
- * `'rejected'` leaves it private.
449
+ * terminal state. `'approved'` publishes a pending contribution (also flips
450
+ * `visibility → 'public'`); `'rejected'` holds a pending one back or takes an
451
+ * approved one down, leaving visibility as it was.
397
452
  */
398
453
  export const CellModerationDecision = z.enum(['approved', 'rejected']);
399
454
  /**
400
- * Input for `cell_moderate` — the `pending → approved | rejected` transition,
401
- * gated on moderation authority over the **governing root** (admin / root
402
- * owner in v1), not the contribution (which the author manages, and could
403
- * otherwise self-approve). 404 when the caller neither views the target nor
404
- * stewards it (a root manager reads a pending or rejected contribution through
405
- * the steward arm); 403 when the caller reaches it but isn't a root manager
406
- * (the author lands here).
455
+ * Input for `cell_moderate` — the `pending → approved | rejected` decision, plus
456
+ * the `approved → rejected` takedown, gated on moderation authority over the
457
+ * **governing root** (admin / root owner in v1), not the contribution (which
458
+ * the author manages, and could otherwise self-approve). 404 when the caller
459
+ * neither views the target nor stewards it (a root manager reads a pending or
460
+ * rejected contribution through the steward arm); 403 when the caller reaches
461
+ * it but isn't a root manager (the author lands here); 400 `cell_not_pending`
462
+ * when a root manager names a transition the contribution's state doesn't
463
+ * allow — approving one that is not pending, or rejecting one already rejected
464
+ * or never moderated.
407
465
  */
408
466
  export const CellModerateInput = z.strictObject({
409
467
  cell_id: Uuid.meta({ description: 'Contribution to moderate.' }),
@@ -413,6 +471,23 @@ export const CellModerateInput = z.strictObject({
413
471
  acting: ActingActor
414
472
  });
415
473
  export const CellModerateOutput = z.strictObject({ cell: CellJson });
474
+ // -- cell_policy_set --------------------------------------------------------
475
+ /**
476
+ * Input for `cell_policy_set` — replace a root's contribution policy, or clear
477
+ * it with `null`. Manage-tier on the root: 404 when the caller can't view it,
478
+ * 403 `ERROR_CELL_POLICY_MANAGE_ONLY` when they can but don't manage it (an
479
+ * editor grant included), 400 `ERROR_CELL_POLICY_ROOT_ONLY` on a cell with a
480
+ * parent, then the mounted authorizer's validation of a non-null policy
481
+ * (`ERROR_CELL_POLICY_UNSUPPORTED` when none can).
482
+ */
483
+ export const CellPolicySetInput = z.strictObject({
484
+ cell_id: Uuid.meta({ description: 'Root whose policy to set.' }),
485
+ policy: CellPolicy.nullable().meta({
486
+ description: 'The new policy (a JSON object), or `null` to clear it.'
487
+ }),
488
+ acting: ActingActor
489
+ });
490
+ export const CellPolicySetOutput = z.strictObject({ cell: CellJson });
416
491
  // -- Action specs -----------------------------------------------------------
417
492
  export const cell_create_action_spec = {
418
493
  method: 'cell_create',
@@ -494,14 +569,25 @@ export const cell_moderate_action_spec = {
494
569
  output: CellModerateOutput,
495
570
  async: true,
496
571
  rate_limit: 'account',
497
- description: 'Moderate a gated contribution (`pending → approved | rejected`). Gated on moderation authority over the governing root (admin / root owner), not the contribution — so the author cannot self-approve. Approval flips `moderation → approved` + `visibility → public`; rejection sets `moderation → rejected`. 404 on a target the caller neither views nor stewards (a root manager reads a pending or rejected contribution), 403 for a viewable target whose caller is not a root manager.'
572
+ description: 'Moderate a gated contribution (`pending → approved | rejected`, and the `approved → rejected` takedown). Gated on moderation authority over the governing root (admin / root owner), not the contribution — so the author cannot self-approve. Approval flips `moderation → approved` + `visibility → public`; rejection sets `moderation → rejected` and leaves visibility alone. 404 on a target the caller neither views nor stewards (a root manager reads a pending or rejected contribution), 403 for a viewable target whose caller is not a root manager, 400 `cell_not_pending` for a transition the target does not allow (approving a contribution that is not pending; rejecting one already rejected or never moderated).'
573
+ };
574
+ export const cell_policy_set_action_spec = {
575
+ method: 'cell_policy_set',
576
+ kind: 'request_response',
577
+ initiator: 'frontend',
578
+ auth: { account: 'required', actor: 'required' },
579
+ side_effects: true,
580
+ input: CellPolicySetInput,
581
+ output: CellPolicySetOutput,
582
+ async: true,
583
+ rate_limit: 'account',
584
+ description: "Set or clear a root's contribution policy. Manage-tier on the root (admin / owner) — an editor grant edits `data` but never the policy that decides who may contribute. 404 on a root the caller can't view, 403 `cell_policy_manage_only` for a viewer who doesn't manage it, 400 `cell_policy_root_only` on a cell with a parent; a non-null policy must pass the mounted create authorizer's validation (400 `cell_policy_unsupported` when none can). Audited as `cell_policy_set` with the new and the previous policy."
498
585
  };
499
586
  /**
500
587
  * All cell-layer action specs — composed by app registries. Bundles the
501
- * seven generic verbs (this module), the three `cell_grant_*` specs, the
502
- * three `cell_field_*` specs, the four `cell_item_*` specs, and the
503
- * `cell_audit_list` spec so codegen + UI clients see a single cell
504
- * namespace.
588
+ * generic verbs (this module) with the `cell_grant_*`, `cell_field_*`,
589
+ * `cell_item_*`, and `cell_audit_list` specs so codegen + UI clients see a
590
+ * single cell namespace.
505
591
  */
506
592
  export const all_cell_action_specs = [
507
593
  cell_create_action_spec,
@@ -511,6 +597,7 @@ export const all_cell_action_specs = [
511
597
  cell_list_action_spec,
512
598
  cell_clone_action_spec,
513
599
  cell_moderate_action_spec,
600
+ cell_policy_set_action_spec,
514
601
  ...all_cell_grant_action_specs,
515
602
  ...all_cell_field_action_specs,
516
603
  ...all_cell_item_action_specs,