@cosmicdrift/kumiko-framework 0.413.1 → 0.415.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 (479) hide show
  1. package/AGENTS.md +5 -2
  2. package/agents/api/framework-db.md +14 -3
  3. package/agents/api/framework-engine.md +69 -13
  4. package/agents/api/framework-errors.md +1 -1
  5. package/agents/api/framework-event-store.md +14 -0
  6. package/agents/api/framework-ui-types.md +158 -21
  7. package/agents/api/renderer-web.md +112 -11
  8. package/agents/api/testing-helpers.md +3 -2
  9. package/agents/api/testing-stack.md +3 -0
  10. package/agents/api/types.md +248 -24
  11. package/agents/api.md +7 -7
  12. package/agents/boot-rules.md +66 -10
  13. package/agents/examples/api-docs.md +2 -6
  14. package/agents/examples/auth-mfa.md +57 -10
  15. package/agents/examples/chat-channels.md +2 -0
  16. package/agents/examples/crypto-shredding-hr.md +63 -1
  17. package/agents/examples/currencies-global.md +1 -0
  18. package/agents/examples/env-composition.md +7 -11
  19. package/agents/examples/managed-pages.md +90 -1
  20. package/agents/examples/pwa-shell.md +210 -0
  21. package/agents/examples/rate-limiting.md +3 -3
  22. package/agents/examples/record-detail-layout.md +1643 -67
  23. package/agents/examples/workflow-engine.md +16 -12
  24. package/agents/examples.md +1 -0
  25. package/agents/features-index.md +4 -2
  26. package/agents/features.md +22 -7
  27. package/agents/widgets.md +26 -1
  28. package/dist/api/api-constants.d.ts +1 -0
  29. package/dist/api/api-constants.js +4 -0
  30. package/dist/api/auth-middleware.js +4 -3
  31. package/dist/api/auth-routes-shared.js +2 -1
  32. package/dist/api/entity-read-access.d.ts +1 -0
  33. package/dist/api/entity-read-access.js +18 -0
  34. package/dist/api/export/export-route.d.ts +6 -1
  35. package/dist/api/export/export-route.js +27 -1
  36. package/dist/api/export/export-rows.js +19 -3
  37. package/dist/api/request-context-internals.d.ts +2 -0
  38. package/dist/api/request-context-scopes.js +9 -2
  39. package/dist/api/request-context.js +1 -1
  40. package/dist/api/routes.d.ts +2 -0
  41. package/dist/api/routes.js +9 -1
  42. package/dist/api/server-event-dispatcher.js +3 -0
  43. package/dist/api/server-extra-routes.js +2 -1
  44. package/dist/api/server-feature-http-routes.d.ts +9 -0
  45. package/dist/api/server-feature-http-routes.js +109 -0
  46. package/dist/api/server-middleware.js +2 -19
  47. package/dist/api/server-pat-rate-limit-guard.d.ts +3 -0
  48. package/dist/api/server-pat-rate-limit-guard.js +19 -0
  49. package/dist/api/server-rate-limit-wiring.d.ts +10 -0
  50. package/dist/api/server-rate-limit-wiring.js +37 -0
  51. package/dist/api/server-routes.d.ts +4 -12
  52. package/dist/api/server-routes.js +12 -171
  53. package/dist/api/server-schema-route.d.ts +3 -0
  54. package/dist/api/server-schema-route.js +58 -0
  55. package/dist/api/server-wiring.js +2 -37
  56. package/dist/api/server.js +3 -1
  57. package/dist/compliance/override-schema.js +5 -5
  58. package/dist/compliance/sub-processors.js +10 -1
  59. package/dist/crypto/index.d.ts +1 -1
  60. package/dist/crypto/index.js +1 -1
  61. package/dist/crypto/pii-field-encryption.d.ts +2 -0
  62. package/dist/crypto/pii-field-encryption.js +16 -1
  63. package/dist/db/apply-entity-event.js +4 -0
  64. package/dist/db/bun-sql-connection-codes.d.ts +1 -0
  65. package/dist/db/bun-sql-connection-codes.js +7 -0
  66. package/dist/db/collect-table-metas.js +4 -1
  67. package/dist/db/config-seed.js +1 -1
  68. package/dist/db/derived-field-sql.js +15 -13
  69. package/dist/db/derived-related-sql.d.ts +2 -2
  70. package/dist/db/derived-related-sql.js +4 -2
  71. package/dist/db/dialect.d.ts +3 -0
  72. package/dist/db/dialect.js +1 -3
  73. package/dist/db/driver-row-coercion.js +2 -2
  74. package/dist/db/driver-value-preparation.js +1 -1
  75. package/dist/db/eagerload.js +15 -12
  76. package/dist/db/entity-table-meta.d.ts +2 -0
  77. package/dist/db/entity-table-meta.js +7 -0
  78. package/dist/db/event-store-executor-context.js +13 -8
  79. package/dist/db/event-store-executor-read-aggregate-currencies.js +2 -2
  80. package/dist/db/event-store-executor-read-aggregate.js +2 -2
  81. package/dist/db/event-store-executor-read-filter.d.ts +4 -0
  82. package/dist/db/event-store-executor-read-filter.js +28 -11
  83. package/dist/db/event-store-executor-read-search.d.ts +1 -0
  84. package/dist/db/event-store-executor-read-search.js +6 -6
  85. package/dist/db/event-store-executor-read-sort.js +3 -3
  86. package/dist/db/event-store-executor-read-where.js +14 -5
  87. package/dist/db/event-store-executor-read.js +7 -7
  88. package/dist/db/event-store-executor-write.js +50 -95
  89. package/dist/db/executor-managed-tables.js +4 -1
  90. package/dist/db/index.d.ts +4 -2
  91. package/dist/db/index.js +4 -2
  92. package/dist/db/known-table-names.d.ts +1 -0
  93. package/dist/db/known-table-names.js +7 -5
  94. package/dist/db/list-aggregate-labels.d.ts +1 -0
  95. package/dist/db/list-aggregate-labels.js +9 -1
  96. package/dist/db/migrate-generator.js +23 -4
  97. package/dist/db/migrate-rls-diff.d.ts +1 -0
  98. package/dist/db/migrate-rls-diff.js +15 -1
  99. package/dist/db/migrate-runner.js +2 -2
  100. package/dist/db/money.d.ts +1 -1
  101. package/dist/db/money.js +1 -4
  102. package/dist/db/parent-ref-clause.d.ts +6 -2
  103. package/dist/db/parent-ref-clause.js +105 -24
  104. package/dist/db/parent-ref-global-hosts.d.ts +23 -0
  105. package/dist/db/parent-ref-global-hosts.js +85 -0
  106. package/dist/db/production-schema-command-hint.d.ts +1 -0
  107. package/dist/db/production-schema-command-hint.js +3 -0
  108. package/dist/db/queries/backfill-pii.js +55 -29
  109. package/dist/db/queries/ddl.js +13 -2
  110. package/dist/db/queries/event-store-open-streams.d.ts +15 -0
  111. package/dist/db/queries/event-store-open-streams.js +33 -0
  112. package/dist/db/queries/event-store-payload-scrub.d.ts +5 -0
  113. package/dist/db/queries/event-store-payload-scrub.js +11 -0
  114. package/dist/db/queries/event-store.js +0 -1
  115. package/dist/db/queries/raw-sql.js +0 -1
  116. package/dist/db/queries/rebuild-rls-guard.d.ts +2 -1
  117. package/dist/db/queries/rebuild-rls-guard.js +24 -11
  118. package/dist/db/queries/rls-boot-catalog.d.ts +1 -0
  119. package/dist/db/queries/rls-boot-catalog.js +13 -9
  120. package/dist/db/queries/rls-shape.d.ts +3 -1
  121. package/dist/db/queries/rls-shape.js +31 -6
  122. package/dist/db/queries/session-advisory-lock.js +2 -1
  123. package/dist/db/queries/test-stack.js +7 -7
  124. package/dist/db/query.js +16 -11
  125. package/dist/db/rebuild-marker.js +11 -2
  126. package/dist/db/render-rls-ddl.d.ts +2 -0
  127. package/dist/db/render-rls-ddl.js +16 -11
  128. package/dist/db/replay-migration-sql.js +1 -1
  129. package/dist/db/row-level-security-boot-check.js +18 -5
  130. package/dist/db/row-level-security-connection.js +25 -12
  131. package/dist/db/row-level-security-scope.d.ts +2 -1
  132. package/dist/db/row-level-security-scope.js +9 -5
  133. package/dist/db/sql-identifier.d.ts +1 -0
  134. package/dist/db/sql-identifier.js +3 -0
  135. package/dist/db/system-tenant-read-db.d.ts +5 -0
  136. package/dist/db/system-tenant-read-db.js +28 -0
  137. package/dist/db/table-builder.d.ts +3 -1
  138. package/dist/db/table-builder.js +18 -8
  139. package/dist/db/table-info.d.ts +1 -2
  140. package/dist/db/table-introspection.d.ts +3 -0
  141. package/dist/db/table-introspection.js +6 -0
  142. package/dist/db/table-push.d.ts +1 -0
  143. package/dist/db/table-push.js +7 -1
  144. package/dist/db/tenant-db-runner.d.ts +3 -0
  145. package/dist/db/tenant-db-runner.js +19 -1
  146. package/dist/db/transaction-serialization.d.ts +1 -0
  147. package/dist/db/transaction-serialization.js +20 -3
  148. package/dist/db/where-clause.js +11 -2
  149. package/dist/db/write-ownership-failures.d.ts +25 -0
  150. package/dist/db/write-ownership-failures.js +82 -0
  151. package/dist/engine/boot-validator/boot-check.js +7 -1
  152. package/dist/engine/boot-validator/boot-phases-app.js +5 -5
  153. package/dist/engine/boot-validator/boot-phases.js +3 -2
  154. package/dist/engine/boot-validator/boot-rules.d.ts +305 -28
  155. package/dist/engine/boot-validator/boot-rules.js +4 -0
  156. package/dist/engine/boot-validator/bundled-lists-table.js +2 -2
  157. package/dist/engine/boot-validator/card-meta-overflow-rules.d.ts +2 -2
  158. package/dist/engine/boot-validator/card-meta-overflow-rules.js +2 -2
  159. package/dist/engine/boot-validator/card-meta-overflow.js +8 -5
  160. package/dist/engine/boot-validator/config-deps.d.ts +0 -1
  161. package/dist/engine/boot-validator/config-deps.js +0 -28
  162. package/dist/engine/boot-validator/config-key-rules.d.ts +0 -15
  163. package/dist/engine/boot-validator/config-key-rules.js +0 -15
  164. package/dist/engine/boot-validator/dashboard-screen-target.d.ts +22 -0
  165. package/dist/engine/boot-validator/dashboard-screen-target.js +20 -0
  166. package/dist/engine/boot-validator/dashboard-stat-navigate.d.ts +1 -0
  167. package/dist/engine/boot-validator/dashboard-stat-navigate.js +25 -17
  168. package/dist/engine/boot-validator/definition-webhook-events-rules.d.ts +5 -0
  169. package/dist/engine/boot-validator/definition-webhook-events-rules.js +5 -0
  170. package/dist/engine/boot-validator/derived-sql-fields.js +1 -2
  171. package/dist/engine/boot-validator/entity-declaration-rules.d.ts +5 -0
  172. package/dist/engine/boot-validator/entity-declaration-rules.js +5 -0
  173. package/dist/engine/boot-validator/entity-list-screens.d.ts +1 -0
  174. package/dist/engine/boot-validator/entity-list-screens.js +35 -13
  175. package/dist/engine/boot-validator/entity-structure-rules.d.ts +5 -0
  176. package/dist/engine/boot-validator/entity-structure-rules.js +5 -0
  177. package/dist/engine/boot-validator/list-column-layout.js +10 -6
  178. package/dist/engine/boot-validator/list-row-guidance-rules.d.ts +67 -0
  179. package/dist/engine/boot-validator/list-row-guidance-rules.js +67 -0
  180. package/dist/engine/boot-validator/list-row-guidance.d.ts +20 -0
  181. package/dist/engine/boot-validator/list-row-guidance.js +143 -0
  182. package/dist/engine/boot-validator/list-sort-summary-rules.d.ts +42 -0
  183. package/dist/engine/boot-validator/list-sort-summary-rules.js +42 -0
  184. package/dist/engine/boot-validator/list-sort-summary.d.ts +5 -0
  185. package/dist/engine/boot-validator/list-sort-summary.js +160 -0
  186. package/dist/engine/boot-validator/list-table-options.js +15 -1
  187. package/dist/engine/boot-validator/list-table-rules.d.ts +10 -5
  188. package/dist/engine/boot-validator/list-table-rules.js +10 -5
  189. package/dist/engine/boot-validator/list-toolbar-options.d.ts +10 -0
  190. package/dist/engine/boot-validator/list-toolbar-options.js +30 -0
  191. package/dist/engine/boot-validator/named-filter-rules.d.ts +42 -2
  192. package/dist/engine/boot-validator/named-filter-rules.js +42 -2
  193. package/dist/engine/boot-validator/ownership.js +10 -1
  194. package/dist/engine/boot-validator/parent-ref.js +87 -50
  195. package/dist/engine/boot-validator/projection-list-screens.d.ts +1 -0
  196. package/dist/engine/boot-validator/projection-list-screens.js +32 -1
  197. package/dist/engine/boot-validator/query-output-columns.js +62 -9
  198. package/dist/engine/boot-validator/query-output-guidance.d.ts +7 -0
  199. package/dist/engine/boot-validator/query-output-guidance.js +40 -0
  200. package/dist/engine/boot-validator/query-refs.js +34 -1
  201. package/dist/engine/boot-validator/row-decoration.d.ts +11 -0
  202. package/dist/engine/boot-validator/row-decoration.js +16 -0
  203. package/dist/engine/boot-validator/screens-actions.js +1 -1
  204. package/dist/engine/boot-validator/screens-dashboard-links.d.ts +10 -0
  205. package/dist/engine/boot-validator/screens-dashboard-links.js +36 -0
  206. package/dist/engine/boot-validator/screens-dashboard-narrow.d.ts +4 -0
  207. package/dist/engine/boot-validator/screens-dashboard-narrow.js +211 -0
  208. package/dist/engine/boot-validator/screens-dashboard-rules.d.ts +84 -4
  209. package/dist/engine/boot-validator/screens-dashboard-rules.js +84 -4
  210. package/dist/engine/boot-validator/screens-dashboard.js +29 -7
  211. package/dist/engine/boot-validator/screens-kind-entity-list.js +32 -27
  212. package/dist/engine/boot-validator/screens-kind-projection-detail-guidance.d.ts +3 -0
  213. package/dist/engine/boot-validator/screens-kind-projection-detail-guidance.js +46 -0
  214. package/dist/engine/boot-validator/screens-kind-projection-detail-rules.d.ts +20 -0
  215. package/dist/engine/boot-validator/screens-kind-projection-detail-rules.js +20 -0
  216. package/dist/engine/boot-validator/screens-kind-projection-detail.js +2 -0
  217. package/dist/engine/boot-validator/screens-kind-projection-list.js +4 -0
  218. package/dist/engine/boot-validator/screens-kind-rules.d.ts +25 -0
  219. package/dist/engine/boot-validator/screens-kind-rules.js +25 -0
  220. package/dist/engine/boot-validator/screens-lists.d.ts +8 -2
  221. package/dist/engine/boot-validator/screens-lists.js +19 -3
  222. package/dist/engine/boot-validator/screens.js +1 -1
  223. package/dist/engine/boot-validator/sort-nulls.d.ts +2 -0
  224. package/dist/engine/boot-validator/sort-nulls.js +15 -0
  225. package/dist/engine/boot-validator/zod-shape.d.ts +2 -1
  226. package/dist/engine/boot-validator/zod-shape.js +19 -1
  227. package/dist/engine/build-app-schema.js +4 -0
  228. package/dist/engine/config-helpers.d.ts +1 -2
  229. package/dist/engine/config-helpers.js +6 -7
  230. package/dist/engine/define-feature.js +1 -0
  231. package/dist/engine/define-handler.d.ts +1 -0
  232. package/dist/engine/define-handler.js +4 -2
  233. package/dist/engine/definition-violations.js +2 -2
  234. package/dist/engine/entity-handlers.js +3 -8
  235. package/dist/engine/entity-list-runtime-options.js +9 -8
  236. package/dist/engine/factories.d.ts +2 -0
  237. package/dist/engine/feature-config-events-jobs.js +1 -0
  238. package/dist/engine/feature-entity-handlers.js +5 -2
  239. package/dist/engine/field-access.d.ts +1 -1
  240. package/dist/engine/field-access.js +7 -10
  241. package/dist/engine/find-entity.js +3 -3
  242. package/dist/engine/form-derivations.js +3 -3
  243. package/dist/engine/index.d.ts +3 -3
  244. package/dist/engine/index.js +2 -2
  245. package/dist/engine/named-filter-roles.d.ts +3 -0
  246. package/dist/engine/named-filter-roles.js +15 -0
  247. package/dist/engine/pipeline.js +0 -1
  248. package/dist/engine/project-app-schema-for-roles.js +17 -2
  249. package/dist/engine/qualified-name.js +0 -1
  250. package/dist/engine/registry-facade.js +1 -2
  251. package/dist/engine/registry-state.d.ts +1 -1
  252. package/dist/engine/registry-state.js +5 -2
  253. package/dist/engine/registry-validate.js +2 -1
  254. package/dist/engine/resolve-named-list-filters.js +5 -2
  255. package/dist/engine/schema-builder.js +9 -11
  256. package/dist/engine/screen-helpers.d.ts +12 -0
  257. package/dist/engine/screen-helpers.js +17 -1
  258. package/dist/engine/soft-delete-cleanup.js +3 -5
  259. package/dist/engine/state-machine.js +0 -1
  260. package/dist/engine/steps/_database-clock.d.ts +2 -0
  261. package/dist/engine/steps/_database-clock.js +6 -0
  262. package/dist/engine/steps/compute.js +1 -1
  263. package/dist/engine/steps/retry.js +5 -1
  264. package/dist/engine/steps/return.js +0 -1
  265. package/dist/engine/steps/wait-for-event.js +2 -1
  266. package/dist/engine/steps/wait.js +2 -1
  267. package/dist/engine/system-user.d.ts +2 -2
  268. package/dist/engine/system-user.js +2 -2
  269. package/dist/engine/types/handlers.d.ts +1 -1
  270. package/dist/engine/types/handlers.js +1 -1
  271. package/dist/engine/types/screen.d.ts +1 -1
  272. package/dist/engine/types/screen.js +1 -1
  273. package/dist/engine/webhook-contracts.d.ts +2 -3
  274. package/dist/engine/webhook-contracts.js +2 -25
  275. package/dist/engine/webhook-events.js +48 -29
  276. package/dist/engine/webhook-payload-strictness.d.ts +7 -0
  277. package/dist/engine/webhook-payload-strictness.js +53 -0
  278. package/dist/env/_zod-introspect.d.ts +1 -0
  279. package/dist/env/dry-run.d.ts +1 -1
  280. package/dist/env/dry-run.js +1 -1
  281. package/dist/env/field-meta.d.ts +4 -0
  282. package/dist/env/field-meta.js +67 -0
  283. package/dist/env/field-rules.d.ts +9 -0
  284. package/dist/env/field-rules.js +46 -0
  285. package/dist/env/index.d.ts +3 -3
  286. package/dist/env/index.js +16 -71
  287. package/dist/env/internals.d.ts +3 -0
  288. package/dist/env/internals.js +1 -2
  289. package/dist/env/required-env.d.ts +3 -1
  290. package/dist/env/required-env.js +5 -2
  291. package/dist/errors/reasons.d.ts +1 -0
  292. package/dist/errors/reasons.js +4 -0
  293. package/dist/errors/serialize.js +2 -2
  294. package/dist/errors/write-error-info.js +0 -2
  295. package/dist/es-ops/operations-schema.js +18 -7
  296. package/dist/event-store/admin-api.js +3 -3
  297. package/dist/event-store/event-store.js +0 -3
  298. package/dist/event-store/index.d.ts +1 -0
  299. package/dist/event-store/index.js +1 -0
  300. package/dist/event-store/transfer.js +1 -1
  301. package/dist/files/assert-file-refs-belong-to-tenant.d.ts +2 -1
  302. package/dist/files/assert-file-refs-belong-to-tenant.js +15 -13
  303. package/dist/files/bind-pending-file-refs.d.ts +3 -1
  304. package/dist/files/bind-pending-file-refs.js +54 -27
  305. package/dist/files/copy-pending-file-refs-to-tenant.js +7 -3
  306. package/dist/files/create-file-ref.d.ts +4 -1
  307. package/dist/files/create-file-ref.js +14 -3
  308. package/dist/files/default-file-guard.js +4 -1
  309. package/dist/files/file-claim.d.ts +6 -0
  310. package/dist/files/file-claim.js +17 -0
  311. package/dist/files/file-field-slots.d.ts +2 -0
  312. package/dist/files/file-field-slots.js +28 -0
  313. package/dist/files/file-ref-entity.d.ts +3 -0
  314. package/dist/files/file-ref-entity.js +2 -0
  315. package/dist/files/file-ref-table.d.ts +3 -0
  316. package/dist/files/file-routes.d.ts +4 -1
  317. package/dist/files/file-routes.js +80 -16
  318. package/dist/files/in-memory-provider.d.ts +1 -1
  319. package/dist/files/in-memory-provider.js +2 -1
  320. package/dist/files/index.d.ts +1 -1
  321. package/dist/files/index.js +1 -1
  322. package/dist/files/invalid-file-ref-error.d.ts +2 -0
  323. package/dist/files/invalid-file-ref-error.js +15 -0
  324. package/dist/files/local-provider.js +9 -2
  325. package/dist/files/provider-resolver.js +1 -1
  326. package/dist/files/rebind-file-ref.d.ts +3 -2
  327. package/dist/files/rebind-file-ref.js +24 -18
  328. package/dist/files/resolve-file-handles.d.ts +13 -0
  329. package/dist/files/resolve-file-handles.js +57 -0
  330. package/dist/files/storage-tracking.d.ts +1 -1
  331. package/dist/files/storage-tracking.js +5 -2
  332. package/dist/files/sweep-stale-pending-file-refs.js +10 -4
  333. package/dist/files/types.d.ts +4 -0
  334. package/dist/files/types.js +10 -0
  335. package/dist/files/upload-field-resolution.d.ts +1 -0
  336. package/dist/files/upload-field-resolution.js +16 -2
  337. package/dist/files/upload-ledger.js +1 -1
  338. package/dist/i18n/required-surface-guidance-keys.d.ts +3 -0
  339. package/dist/i18n/required-surface-guidance-keys.js +9 -0
  340. package/dist/i18n/required-surface-keys.js +21 -5
  341. package/dist/internal/boot-rule-table-expectations.d.ts +2 -0
  342. package/dist/internal/boot-rule-table-expectations.js +29 -0
  343. package/dist/internal/row-level-security.d.ts +1 -0
  344. package/dist/internal/row-level-security.js +1 -0
  345. package/dist/internal/testing.d.ts +1 -0
  346. package/dist/internal/testing.js +1 -0
  347. package/dist/jobs/index.d.ts +1 -0
  348. package/dist/jobs/index.js +1 -0
  349. package/dist/jobs/job-load-events.d.ts +10 -0
  350. package/dist/jobs/job-load-events.js +12 -0
  351. package/dist/jobs/job-runner-context.js +6 -158
  352. package/dist/jobs/job-runner-dispatch.d.ts +7 -0
  353. package/dist/jobs/job-runner-dispatch.js +57 -0
  354. package/dist/jobs/job-runner-event-triggers.js +18 -9
  355. package/dist/jobs/job-runner-execution.js +5 -2
  356. package/dist/jobs/job-runner-facets.d.ts +48 -0
  357. package/dist/jobs/job-runner-facets.js +156 -0
  358. package/dist/jobs/job-runner-gates.js +19 -11
  359. package/dist/jobs/job-runner-helpers.d.ts +5 -1
  360. package/dist/jobs/job-runner-helpers.js +18 -3
  361. package/dist/jobs/job-runner-scope.d.ts +1 -0
  362. package/dist/jobs/job-runner-scope.js +2 -0
  363. package/dist/jobs/job-runner-tenant-cap-lock.d.ts +2 -0
  364. package/dist/jobs/job-runner-tenant-cap-lock.js +30 -0
  365. package/dist/jobs/job-runner-types.d.ts +1 -0
  366. package/dist/jobs/job-runner.js +39 -70
  367. package/dist/jobs/obliterate-job-queues.d.ts +6 -0
  368. package/dist/jobs/obliterate-job-queues.js +23 -0
  369. package/dist/lifecycle/lifecycle.js +1 -1
  370. package/dist/migrations/event-header-scrub.d.ts +11 -0
  371. package/dist/migrations/event-header-scrub.js +33 -0
  372. package/dist/migrations/event-payload-scrub.d.ts +1 -1
  373. package/dist/migrations/event-payload-scrub.js +36 -4
  374. package/dist/migrations/index.d.ts +1 -0
  375. package/dist/migrations/index.js +2 -0
  376. package/dist/migrations/kumiko-drift.d.ts +5 -2
  377. package/dist/migrations/kumiko-drift.js +51 -14
  378. package/dist/migrations/pending-rebuilds.js +4 -5
  379. package/dist/observability/sensitive-filter.js +0 -12
  380. package/dist/pipeline/aggregate-type-removal.js +17 -4
  381. package/dist/pipeline/context-services.d.ts +2 -0
  382. package/dist/pipeline/context-services.js +5 -2
  383. package/dist/pipeline/dispatch-batch.js +4 -3
  384. package/dist/pipeline/dispatch-context-helpers.d.ts +11 -0
  385. package/dist/pipeline/dispatch-context-helpers.js +58 -0
  386. package/dist/pipeline/dispatch-nested-write.d.ts +7 -0
  387. package/dist/pipeline/dispatch-nested-write.js +119 -0
  388. package/dist/pipeline/dispatch-query.js +10 -3
  389. package/dist/pipeline/dispatch-scope.js +4 -3
  390. package/dist/pipeline/dispatch-shared.d.ts +2 -6
  391. package/dist/pipeline/dispatch-shared.js +6 -38
  392. package/dist/pipeline/dispatch-write.d.ts +0 -1
  393. package/dist/pipeline/dispatch-write.js +3 -302
  394. package/dist/pipeline/dispatcher-utils.js +6 -0
  395. package/dist/pipeline/effective-system-scope.d.ts +3 -0
  396. package/dist/pipeline/effective-system-scope.js +22 -0
  397. package/dist/pipeline/event-dispatcher-delivery.d.ts +1 -0
  398. package/dist/pipeline/event-dispatcher-delivery.js +20 -9
  399. package/dist/pipeline/event-dispatcher.d.ts +6 -1
  400. package/dist/pipeline/event-dispatcher.js +6 -7
  401. package/dist/pipeline/handler-context-auth.d.ts +3 -2
  402. package/dist/pipeline/handler-context-auth.js +3 -4
  403. package/dist/pipeline/handler-context-db.js +11 -4
  404. package/dist/pipeline/handler-context-dispatch.js +2 -2
  405. package/dist/pipeline/handler-context-events.d.ts +8 -3
  406. package/dist/pipeline/handler-context-events.js +20 -65
  407. package/dist/pipeline/handler-context-member-resolution.js +16 -8
  408. package/dist/pipeline/handler-context-notify.d.ts +1 -0
  409. package/dist/pipeline/handler-context-notify.js +2 -0
  410. package/dist/pipeline/handler-context-phase-denials.js +3 -2
  411. package/dist/pipeline/handler-context-projection.d.ts +3 -0
  412. package/dist/pipeline/handler-context-projection.js +39 -0
  413. package/dist/pipeline/handler-context-scope.d.ts +1 -1
  414. package/dist/pipeline/handler-context-scope.js +14 -2
  415. package/dist/pipeline/index.d.ts +1 -1
  416. package/dist/pipeline/index.js +1 -1
  417. package/dist/pipeline/irreversible-operation-gate.js +36 -10
  418. package/dist/pipeline/lifecycle-pipeline.d.ts +1 -0
  419. package/dist/pipeline/lifecycle-pipeline.js +7 -4
  420. package/dist/pipeline/member-reader.js +4 -2
  421. package/dist/pipeline/msp-rebuild.js +1 -1
  422. package/dist/pipeline/nested-write-parent-guard.d.ts +5 -0
  423. package/dist/pipeline/nested-write-parent-guard.js +81 -0
  424. package/dist/pipeline/projection-rebuild.d.ts +2 -0
  425. package/dist/pipeline/projection-rebuild.js +16 -7
  426. package/dist/pipeline/projection-state.js +4 -6
  427. package/dist/pipeline/system-hooks.js +36 -6
  428. package/dist/pipeline/write-result-masking.js +31 -3
  429. package/dist/pipeline/write-transition-guard.d.ts +7 -0
  430. package/dist/pipeline/write-transition-guard.js +95 -0
  431. package/dist/schema-cli/shared.d.ts +2 -0
  432. package/dist/schema-cli/shared.js +4 -2
  433. package/dist/schema-cli/validate-command.js +43 -28
  434. package/dist/search/meilisearch-adapter-internals.d.ts +2 -0
  435. package/dist/search/meilisearch-adapter-internals.js +5 -0
  436. package/dist/search/meilisearch-adapter.d.ts +1 -0
  437. package/dist/search/meilisearch-adapter.js +17 -11
  438. package/dist/search/reindex-entity.d.ts +2 -0
  439. package/dist/search/reindex-entity.js +32 -4
  440. package/dist/search/reindex-tenants-search.js +20 -4
  441. package/dist/time/tz-context.js +1 -1
  442. package/dist/ui-types/card-column-roles.d.ts +6 -0
  443. package/dist/ui-types/card-column-roles.js +21 -3
  444. package/dist/ui-types/index.d.ts +3 -3
  445. package/dist/ui-types/index.js +2 -2
  446. package/dist/utils/ids.js +0 -1
  447. package/dist/utils/index.d.ts +1 -0
  448. package/dist/utils/index.js +1 -0
  449. package/dist/utils/return-path-limit.d.ts +1 -0
  450. package/dist/utils/return-path-limit.js +1 -0
  451. package/package.json +5 -3
  452. package/presets/biome-app.json +39 -21
  453. package/presets/biome-plugins/admin-api.grit +10 -0
  454. package/presets/biome-plugins/error-reasons.grit +53 -0
  455. package/presets/biome-plugins/es-literal-writes-tests.grit +18 -0
  456. package/presets/biome-plugins/es-literal-writes.grit +22 -0
  457. package/presets/biome-plugins/i18n-locale-terminology-de.grit +15 -0
  458. package/presets/biome-plugins/i18n-locale-terminology-romance.grit +10 -0
  459. package/presets/biome-plugins/no-create-test-dispatcher.grit +5 -0
  460. package/presets/biome-plugins/no-css-properties-type.grit +7 -0
  461. package/presets/biome-plugins/no-date-api.grit +11 -0
  462. package/presets/biome-plugins/no-direct-fetch.grit +16 -0
  463. package/presets/biome-plugins/no-direct-fs.grit +16 -0
  464. package/presets/biome-plugins/no-external-font-cdn-css.grit +9 -0
  465. package/presets/biome-plugins/no-external-font-cdn.grit +12 -0
  466. package/presets/biome-plugins/no-raw-hooks.grit +10 -0
  467. package/presets/biome-plugins/no-same-folder-barrel-import.grit +11 -0
  468. package/presets/biome-plugins/no-screen-container-classes.grit +7 -0
  469. package/presets/biome-plugins/no-skipped-or-retried-tests.grit +34 -0
  470. package/presets/biome-plugins/no-temporal-polyfill-require.grit +10 -0
  471. package/presets/biome-plugins/raw-html-in-web.grit +40 -0
  472. package/presets/biome-plugins/raw-ui-in-app.grit +142 -0
  473. package/presets/biome-plugins/restricted-event-store-symbols.grit +18 -0
  474. package/presets/biome-plugins/test-title.grit +20 -0
  475. package/presets/biome-plugins/unsafe-json-parse.grit +12 -0
  476. package/presets/biome-rules.json +467 -0
  477. package/src/changes.json +366 -0
  478. package/dist/engine/minor-units.d.ts +0 -2
  479. package/dist/engine/minor-units.js +0 -8
package/agents/api.md CHANGED
@@ -8,13 +8,13 @@ Format: one line per function or constant, object and options types as property
8
8
 
9
9
  | Import path | File | Exports |
10
10
  | --- | --- | --- |
11
- | `@cosmicdrift/kumiko-framework/engine` | `api/framework-engine.md` | 440 |
11
+ | `@cosmicdrift/kumiko-framework/engine` | `api/framework-engine.md` | 446 |
12
12
  | `@cosmicdrift/kumiko-framework/errors` | `api/framework-errors.md` | 27 |
13
- | `@cosmicdrift/kumiko-framework/ui-types` | `api/framework-ui-types.md` | 156 |
14
- | `@cosmicdrift/kumiko-framework/db` | `api/framework-db.md` | 151 |
15
- | `@cosmicdrift/kumiko-framework/event-store` | `api/framework-event-store.md` | 38 |
13
+ | `@cosmicdrift/kumiko-framework/ui-types` | `api/framework-ui-types.md` | 180 |
14
+ | `@cosmicdrift/kumiko-framework/db` | `api/framework-db.md` | 157 |
15
+ | `@cosmicdrift/kumiko-framework/event-store` | `api/framework-event-store.md` | 41 |
16
16
  | `@cosmicdrift/kumiko-framework/seeding` | `api/framework-seeding.md` | 6 |
17
- | `@cosmicdrift/kumiko-renderer/web` | `api/renderer-web.md` | 344 |
18
- | `@cosmicdrift/kumiko-testing/stack` | `api/testing-stack.md` | 22 |
19
- | `@cosmicdrift/kumiko-testing/helpers` | `api/testing-helpers.md` | 71 |
17
+ | `@cosmicdrift/kumiko-renderer/web` | `api/renderer-web.md` | 379 |
18
+ | `@cosmicdrift/kumiko-testing/stack` | `api/testing-stack.md` | 23 |
19
+ | `@cosmicdrift/kumiko-testing/helpers` | `api/testing-helpers.md` | 72 |
20
20
  | `@cosmicdrift/kumiko-dev-server/testing` | `api/dev-server-testing.md` | 5 |
@@ -59,7 +59,7 @@
59
59
  | <a id="bundled-lists-not-object"></a>`bundled-lists/not-object` | The bundledLists option is an object. | Write bundledLists as an object such as { table: { columnPicker: true } }. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
60
60
  | <a id="bundled-lists-pin-first-column-not-boolean"></a>`bundled-lists/pin-first-column-not-boolean` | bundledLists.pinFirstColumn is a boolean. | Set pinFirstColumn to true or false. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
61
61
  | <a id="bundled-lists-pin-first-column-without-pinning"></a>`bundled-lists/pin-first-column-without-pinning` | bundledLists.pinFirstColumn needs bundledLists.table.pinning. | Set bundledLists.table.pinning: true or remove pinFirstColumn. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
62
- | <a id="bundled-lists-screen-only-table-key"></a>`bundled-lists/screen-only-table-key` | bundledLists.table leaves out grouping and totals, which depend on one list's fields. | Set grouping and totals in the table block of the individual screen. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
62
+ | <a id="bundled-lists-screen-only-table-key"></a>`bundled-lists/screen-only-table-key` | bundledLists.table leaves out grouping, totals and summaryRow, which depend on one list's fields or query. | Set grouping, totals and summaryRow in the table block of the individual screen. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
63
63
  | <a id="bundled-lists-table-not-object"></a>`bundled-lists/table-not-object` | bundledLists.table is an object. | Write bundledLists.table as an object such as { columnPicker: true }. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
64
64
  | <a id="bundled-lists-unknown-key"></a>`bundled-lists/unknown-key` | bundledLists uses only the allowed keys. | Remove the unknown keys or rename them to one of the allowed keys. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
65
65
 
@@ -118,9 +118,6 @@
118
118
  | <a id="config-key-options-query-payload-self-reference"></a>`config-key/options-query-payload-self-reference` | A config key's optionsQueryPayload does not reference the key itself. | Reference a different config key. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
119
119
  | <a id="config-key-options-query-payload-unknown-key"></a>`config-key/options-query-payload-unknown-key` | A config key's optionsQueryPayload references only config keys of the same feature. | Reference an existing config key of the feature or remove the entry. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
120
120
  | <a id="config-key-options-query-payload-without-query"></a>`config-key/options-query-payload-without-query` | A config key that declares optionsQueryPayload also declares optionsQuery. | Set optionsQuery or remove optionsQueryPayload. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
121
- | <a id="config-key-options-query-per-request"></a>`config-key/options-query-per-request` | A config key with optionsQuery does not set allowPerRequest, which would bypass the option set unchecked. | Remove allowPerRequest or optionsQuery. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
122
- | <a id="config-key-per-request-encrypted"></a>`config-key/per-request-encrypted` | A config key with encrypted/backing="secrets" does not set allowPerRequest. | Remove allowPerRequest or the secrets storage from the key. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
123
- | <a id="config-key-per-request-text"></a>`config-key/per-request-text` | A config key of type "text" does not set allowPerRequest (XSS/injection risk). | Remove allowPerRequest or change the key type. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
124
121
  | <a id="config-key-pii-encrypted-and-encrypted"></a>`config-key/pii-encrypted-and-encrypted` | A config key uses piiEncrypted or encrypted/backing="secrets", never both. | Pick one of piiEncrypted (subject-KMS) or encrypted (shared cipher). | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
125
122
  | <a id="config-key-pii-encrypted-not-text"></a>`config-key/pii-encrypted-not-text` | A config key with piiEncrypted has type "text". | Use type="text" or remove piiEncrypted. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
126
123
  | <a id="config-key-pii-encrypted-system-scope"></a>`config-key/pii-encrypted-system-scope` | A config key with piiEncrypted is not system-scoped, because system scope has no subject to encrypt under. | Use scope="tenant" or "user", or remove piiEncrypted. | `packages/framework/src/engine/boot-validator/config-key-rules.ts` |
@@ -169,11 +166,18 @@
169
166
  | <a id="dashboard-filter-options-empty"></a>`dashboard/filter-options-empty` | Static filter options are non-empty. | Declare at least one option or use optionsQuery. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
170
167
  | <a id="dashboard-filter-options-query-empty"></a>`dashboard/filter-options-query-empty` | filter.optionsQuery is non-empty when set. | Set optionsQuery to a query name or remove it. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
171
168
  | <a id="dashboard-filter-options-xor"></a>`dashboard/filter-options-xor` | The dashboard filter sets exactly one of options and optionsQuery. | Keep either options or optionsQuery. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
169
+ | <a id="dashboard-list-narrow-field-unknown"></a>`dashboard/list-narrow-field-unknown` | A list panel's narrow.field is set only with narrow.layout "line" and names a non-empty query output field; narrow.titleField needs the cards layout and a hint column. | Set narrow.layout "line" and name a field of the query output, or remove narrow.field. For narrow.titleField keep the cards layout and a hint column. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
170
+ | <a id="dashboard-list-narrow-invalid"></a>`dashboard/list-narrow-invalid` | A list panel's narrow.limit is a positive integer, narrow.layout is "cards" or "line", and narrow.moreText and icon appear only with the "line" layout. | Set narrow.limit to a whole number of at least 1 and narrow.layout to "cards" or "line"; use narrow.moreText and icon only with "line". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
171
+ | <a id="dashboard-list-narrow-line-without-footer-link"></a>`dashboard/list-narrow-line-without-footer-link` | A list panel with narrow.layout "line" declares footerLink, the target of the line. | Add footerLink or use narrow.layout "cards". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
172
172
  | <a id="dashboard-list-panel-columns-empty"></a>`dashboard/list-panel-columns-empty` | A list panel declares at least one column. | Add at least one column. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
173
+ | <a id="dashboard-list-row-link-invalid"></a>`dashboard/list-row-link-invalid` | A list panel rowLink names exactly one target (a registered screen, or the row field screenField holding it), takes the matching params field (paramField with screen, paramsField with screenField), non-empty field names and an icon of "arrow" or "chevron". | Set either rowLink.screen to a registered screen (params from paramField) or rowLink.screenField to the row field holding the screen name (params from paramsField), and icon to "arrow" or "chevron". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
174
+ | <a id="dashboard-list-row-tone-marker-invalid"></a>`dashboard/list-row-tone-marker-invalid` | A list panel rowToneMarker is "bar" or "dot". | Set rowToneMarker to "bar" or "dot", or remove it. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
175
+ | <a id="dashboard-narrow-order-invalid"></a>`dashboard/narrow-order-invalid` | A panel's narrowOrder is an integer of at least 0 and is not set on a stat-group child. | Set narrowOrder to a whole number from 0 up on the panel (or the whole stat-group). | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
173
176
  | <a id="dashboard-panel-fallback-gated"></a>`dashboard/panel-fallback-gated` | A panel fallback screen has no visibleWhen of its own. | Embed a fallback screen without visibleWhen. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
174
177
  | <a id="dashboard-panel-fallback-without-visible-when"></a>`dashboard/panel-fallback-without-visible-when` | A screen panel with a fallback also declares visibleWhen. | Add visibleWhen or remove fallback. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
178
+ | <a id="dashboard-panel-link-target"></a>`dashboard/panel-link-target` | A list panel footerLink or stat-group link targets a registered screen, sets string-valued params, and uses namedFilter only on a list screen that declares it. | Point screen at a registered screen, give params string values, and drop namedFilter unless the target list declares it. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
175
179
  | <a id="dashboard-panel-query-empty"></a>`dashboard/panel-query-empty` | A stat, stat-group child and query panel names a non-empty query string. | Set query to a registered query name. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
176
- | <a id="dashboard-panel-span-invalid"></a>`dashboard/panel-span-invalid` | A panel's span is "half" or "full". | Set span to "half" or "full". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
180
+ | <a id="dashboard-panel-span-invalid"></a>`dashboard/panel-span-invalid` | A panel's span is "half", "full", "third" or "two-thirds". | Set span to "half", "full", "third" or "two-thirds". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
177
181
  | <a id="dashboard-panel-visible-when-incomplete"></a>`dashboard/panel-visible-when-incomplete` | A panel's visibleWhen names a non-empty query and field. | Set both visibleWhen.query and visibleWhen.field. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
178
182
  | <a id="dashboard-record-param-collision"></a>`dashboard/record-param-collision` | record.param and payloadKey differ from the filter and timeRange ids. | Use a different name for the record param or the filter/timeRange id. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
179
183
  | <a id="dashboard-record-param-empty"></a>`dashboard/record-param-empty` | record.param is a non-empty string. | Name the URL search param carrying the record id. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
@@ -184,14 +188,23 @@
184
188
  | <a id="dashboard-refresh-field-without-record-query"></a>`dashboard/refresh-field-without-record-query` | A field-driven refresh has a record.query to read the seconds from. | Add record: { param, query } or use refresh: { seconds }. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
185
189
  | <a id="dashboard-refresh-seconds-and-field"></a>`dashboard/refresh-seconds-and-field` | A dashboard refresh sets either seconds or field, not both. | Keep exactly one of seconds and field. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
186
190
  | <a id="dashboard-refresh-seconds-too-short"></a>`dashboard/refresh-seconds-too-short` | refresh.seconds is a number of at least DASHBOARD_MIN_REFRESH_SECONDS. | Raise refresh.seconds to the minimum or more. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
191
+ | <a id="dashboard-stat-group-child-hide-on-narrow"></a>`dashboard/stat-group-child-hide-on-narrow` | Stat-group children do not set hideOnNarrow. | Set hideOnNarrow on the whole group instead. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
187
192
  | <a id="dashboard-stat-group-child-visible-when"></a>`dashboard/stat-group-child-visible-when` | Stat-group children do not set visibleWhen. | Gate the whole group with visibleWhen instead. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
193
+ | <a id="dashboard-stat-group-columns-invalid"></a>`dashboard/stat-group-columns-invalid` | A stat-group's columns is 2, 3 or 4 and needs layout "cards". | Set columns to 2, 3 or 4 and give the group a label or layout: "cards", or remove columns. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
188
194
  | <a id="dashboard-stat-group-empty"></a>`dashboard/stat-group-empty` | A stat-group declares at least one stat. | Add at least one stat. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
195
+ | <a id="dashboard-stat-group-icon-without-titled-strip"></a>`dashboard/stat-group-icon-without-titled-strip` | A stat-group's icon needs a label and layout "strip" (the icon stands in the one-line phone strip). | Give the group a label and layout "strip", or remove icon. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
196
+ | <a id="dashboard-stat-group-narrow-tone-invalid"></a>`dashboard/stat-group-narrow-tone-invalid` | A stat-group's narrow.tone must be one of the select option tones. | Use accent, ok, warn, bad, critical or neutral. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
197
+ | <a id="dashboard-stat-group-narrow-without-titled-strip"></a>`dashboard/stat-group-narrow-without-titled-strip` | A stat-group's narrow.tone needs a label and layout "strip" (it tints the one-line phone strip). | Give the group a label and layout "strip", or remove narrow. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
189
198
  | <a id="dashboard-stat-group-subtitle-without-label"></a>`dashboard/stat-group-subtitle-without-label` | A stat-group with a subtitle also has a label. | Set a label or remove subtitle. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
199
+ | <a id="dashboard-stat-narrow-label-outside-group"></a>`dashboard/stat-narrow-label-outside-group` | A stat's narrowLabel is non-empty and only set on a stat-group child (the one-line phone strip is the only place it is drawn). | Move the stat into a titled stat-group or remove narrowLabel. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
200
+ | <a id="dashboard-stat-navigate-custom-with-filter"></a>`dashboard/stat-navigate-custom-with-filter` | A stat navigating to a custom screen does not set namedFilter. | Remove navigate.namedFilter; a custom screen has no namedFilters. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
201
+ | <a id="dashboard-stat-navigate-params-invalid"></a>`dashboard/stat-navigate-params-invalid` | A stat's navigate.params has non-empty keys and string values. | Use { key: 'value' } with non-empty keys and string values, or remove params. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
190
202
  | <a id="dashboard-stat-value-field-empty"></a>`dashboard/stat-value-field-empty` | A stat panel and stat-group child has a non-empty valueField. | Set valueField to a field of the query result. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
191
203
  | <a id="dashboard-text-link-roles-empty"></a>`dashboard/text-link-roles-empty` | A text link block's roles list is non-empty when set. | List the roles or omit roles. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
192
204
  | <a id="dashboard-text-link-unresolved"></a>`dashboard/text-link-unresolved` | A text link block's screen resolves to a registered screen. | Use a same-feature short id or a cross-feature QN "<feature>:screen:<id>". | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
193
205
  | <a id="dashboard-text-list-block-empty"></a>`dashboard/text-list-block-empty` | A text list block has items. | Add items or remove the block. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
194
- | <a id="dashboard-text-panel-empty"></a>`dashboard/text-panel-empty` | A text panel declares at least one block. | Add at least one block. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
206
+ | <a id="dashboard-text-narrow-blocks-without-blocks"></a>`dashboard/text-narrow-blocks-without-blocks` | A text panel with narrowBlocks also declares blocks, and narrowBlocks is non-empty. | Add blocks (the wide variant) or remove narrowBlocks. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
207
+ | <a id="dashboard-text-panel-empty"></a>`dashboard/text-panel-empty` | A text panel declares at least one block or a query. | Add at least one block or set query. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
195
208
  | <a id="dashboard-time-range-default-unknown"></a>`dashboard/time-range-default-unknown` | timeRange.default is one of the option values. | Set default to one of the options. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
196
209
  | <a id="dashboard-time-range-id-collides-filter"></a>`dashboard/time-range-id-collides-filter` | The timeRange id differs from the filter id. | Use a timeRange.id different from the filter id. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
197
210
  | <a id="dashboard-time-range-id-empty"></a>`dashboard/time-range-id-empty` | The dashboard timeRange has a non-empty id. | Set a non-empty timeRange.id. | `packages/framework/src/engine/boot-validator/screens-dashboard-rules.ts` |
@@ -280,6 +293,7 @@
280
293
  | <a id="entity-located-by-missing-field"></a>`entity/located-by-missing-field` | A timestamp locatedBy names a field of the same entity. | Declare the tz field or use createLocatedTimestampField(). | `packages/framework/src/engine/boot-validator/entity-structure-rules.ts` |
281
294
  | <a id="entity-located-by-not-tz"></a>`entity/located-by-not-tz` | A timestamp locatedBy points at a tz field. | Point locatedBy at a field of type tz. | `packages/framework/src/engine/boot-validator/entity-structure-rules.ts` |
282
295
  | <a id="entity-searchable-restricted-read"></a>`entity/searchable-restricted-read` | A searchable field has no restricted access.read. | Drop searchable/find: "fuzzy" or access.read. | `packages/framework/src/engine/boot-validator/entity-structure-rules.ts` |
296
+ | <a id="entity-sort-nulls-needs-sortable"></a>`entity/sort-nulls-needs-sortable` | A field with sortNulls is sortable. | Add sortable: true or drop sortNulls. | `packages/framework/src/engine/boot-validator/entity-structure-rules.ts` |
283
297
 
284
298
  ## entity-edit
285
299
 
@@ -303,6 +317,7 @@
303
317
 
304
318
  | Rule | Summary | Fix | Source |
305
319
  | --- | --- | --- | --- |
320
+ | <a id="entity-list-create-placement-without-create"></a>`entity-list/create-placement-without-create` | createPlacement "toolbar" moves the create button, so the list has one (no allowCreate: false). | Remove createPlacement or drop allowCreate: false. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
306
321
  | <a id="entity-list-create-screen-unresolved"></a>`entity-list/create-screen-unresolved` | createScreen resolves to a registered screen in the same feature. | Point createScreen at a screen of this feature. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
307
322
  | <a id="entity-list-cross-feature-edit-needs-entity-id"></a>`entity-list/cross-feature-edit-needs-entity-id` | A rowAction navigating to a cross-feature entityEdit screen sets entityId. | Set entityId to the row field naming the target entity's id. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
308
323
  | <a id="entity-list-default-sort-not-listed"></a>`entity-list/default-sort-not-listed` | defaultSort.field is one of the listed columns. | Pick a field from columns or add it there. | `packages/framework/src/engine/boot-validator/entity-list-screens-rules.ts` |
@@ -316,6 +331,7 @@
316
331
  | <a id="entity-list-filter-unknown-field"></a>`entity-list/filter-unknown-field` | A screen filter names a field of the entity. | Name an existing entity field. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
317
332
  | <a id="entity-list-page-size-invalid"></a>`entity-list/page-size-invalid` | pageSize is a positive integer. | Set pageSize to a positive integer. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
318
333
  | <a id="entity-list-searchable-false"></a>`entity-list/searchable-false` | Operator lists are searchable unless they are on the searchable-false whitelist. | Set searchable: true or add the screen id to the whitelist. | `packages/framework/src/engine/boot-validator/entity-list-screens-rules.ts` |
334
+ | <a id="entity-list-toolbar-sort-without-sort-options"></a>`entity-list/toolbar-sort-without-sort-options` | toolbarSort draws the sortOptions as a select in the filter row, so it needs sortOptions. | Declare sortOptions or remove toolbarSort. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
319
335
  | <a id="entity-list-unknown-column"></a>`entity-list/unknown-column` | Every column without a label names an entity field, derived field or row-meta column. | Fix the column field name or give the column a label. | `packages/framework/src/engine/boot-validator/entity-list-screens-rules.ts` |
320
336
  | <a id="entity-list-unknown-named-filter"></a>`entity-list/unknown-named-filter` | Every screen namedFilters id is declared in the entity's namedFilters. | Declare the rule in EntityDefinition.namedFilters or remove the id from the screen. | `packages/framework/src/engine/boot-validator/entity-list-screens-rules.ts` |
321
337
 
@@ -632,7 +648,9 @@
632
648
 
633
649
  | Rule | Summary | Fix | Source |
634
650
  | --- | --- | --- | --- |
635
- | <a id="list-card-meta-overflow"></a>`list/card-meta-overflow` | A card list shows at most the maximum number of meta columns. | Reduce each list to the maximum number of meta columns or mark the others hideOnNarrow: true. | `packages/framework/src/engine/boot-validator/card-meta-overflow-rules.ts` |
651
+ | <a id="list-button-column-in-list-table"></a>`list/button-column-in-list-table` | display "button" is drawn only in dashboard list panels; entityList and projectionList tables (RenderList) keep a row button as a rowAction. | Declare the button as a rowAction with display: "button" or remove display: "button" from the column. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
652
+ | <a id="list-button-column-without-link"></a>`list/button-column-without-link` | A column with display "button" has a link (linkScreenField or refEntity) to draw as the button. | Set linkScreenField or refEntity on the column, or remove display: "button". | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
653
+ | <a id="list-card-meta-overflow"></a>`list/card-meta-overflow` | A card list shows at most the maximum number of meta lines. | Reduce each list to the maximum number of meta lines or mark the other columns hideOnNarrow: true. | `packages/framework/src/engine/boot-validator/card-meta-overflow-rules.ts` |
636
654
  | <a id="list-column-renderer-component-invalid"></a>`list/column-renderer-component-invalid` | A column renderer's react.__component is a non-empty string. | Set react.__component to the name of a client columnRenderers entry. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
637
655
  | <a id="list-column-renderer-react-not-object"></a>`list/column-renderer-react-not-object` | A column renderer's react branch is an object. | Use { react: { __component: "Name" } }. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
638
656
  | <a id="list-column-sortable-inert"></a>`list/column-sortable-inert` | A column only sets sortable where the screen type honors it. | Remove sortable from the column. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
@@ -642,13 +660,41 @@
642
660
  | <a id="list-facet-query-unregistered"></a>`list/facet-query-unregistered` | A reference facet loads its options from a registered query handler. | Register the entity's list handler (defineEntityListHandler). | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
643
661
  | <a id="list-facet-select-no-options"></a>`list/facet-select-no-options` | A select facet declares at least one option. | Declare at least one option. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
644
662
  | <a id="list-facet-unknown-column"></a>`list/facet-unknown-column` | A non-reference facet names a declared column. | Name a declared column or add the column. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
663
+ | <a id="list-guidance-field-empty"></a>`list/guidance-field-empty` | rowToneField, linkParamsField and the hint field names are non-empty strings. | Name a row field or remove the option. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
664
+ | <a id="list-hint-column-display"></a>`list/hint-column-display` | A hint column owns its cell rendering and sets no display. | Remove display or hint from the column. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
665
+ | <a id="list-hint-column-empty-placeholder"></a>`list/hint-column-empty-placeholder` | A hint column shows hint.emptyLabel for an empty value and sets no emptyPlaceholder. | Remove emptyPlaceholder, or name the empty sentence with hint.emptyLabel. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
666
+ | <a id="list-hint-column-link"></a>`list/hint-column-link` | A hint column owns its cell rendering and sets no linkScreenField, linkParamsField, refEntity, badgeToneField or badgeDot. | Remove the link or badge option, or move the hint to its own column. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
667
+ | <a id="list-hint-column-renderer"></a>`list/hint-column-renderer` | A hint column owns its cell rendering and sets no renderer. | Remove renderer or hint from the column. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
668
+ | <a id="list-link-params-without-screen-field"></a>`list/link-params-without-screen-field` | linkParamsField only parametrizes the linkScreenField target. | Set linkScreenField on the column or remove linkParamsField. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
669
+ | <a id="list-named-filter-empty-state-params-query-empty"></a>`list/named-filter-empty-state-params-query-empty` | A named filter's emptyState.paramsQuery is a non-empty query QN. | Name the query or remove paramsQuery from the emptyState. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
670
+ | <a id="list-named-filter-empty-state-params-query-without-description"></a>`list/named-filter-empty-state-params-query-without-description` | A named filter's emptyState.paramsQuery feeds the description, so it needs one. | Set emptyState.description (an i18n key with {params}) or remove paramsQuery. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
671
+ | <a id="list-named-filter-empty-state-title-empty"></a>`list/named-filter-empty-state-title-empty` | A named filter's emptyState.title is a non-empty i18n key. | Name the title key or remove emptyState from the filter. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
672
+ | <a id="list-named-filter-facet-without-filters"></a>`list/named-filter-facet-without-filters` | namedFilterFacet only presents the screen's namedFilters. | Declare namedFilters on the screen or remove namedFilterFacet. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
673
+ | <a id="list-named-filter-sort-not-listed"></a>`list/named-filter-sort-not-listed` | A named filter's sort.field is one of the listed columns. | Pick a field from columns or add it there. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
674
+ | <a id="list-named-filter-sort-not-sortable"></a>`list/named-filter-sort-not-sortable` | A named filter's sort column is sortable. | Mark the field sortable or pick another sort field. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
675
+ | <a id="list-narrow-detail-field-without-detail-field"></a>`list/narrow-detail-field-without-detail-field` | hint.narrowDetailField replaces hint.detailField below sm, so it needs detailField. | Set hint.detailField or remove narrowDetailField. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
676
+ | <a id="list-narrow-facets-invalid"></a>`list/narrow-facets-invalid` | narrowFacets is "pills". | Use "pills", or remove narrowFacets. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
677
+ | <a id="list-narrow-only-conflict"></a>`list/narrow-only-conflict` | A showOnNarrowOnly column sets none of hideOnNarrow: true, hidden: true or pinned. | Remove the conflicting option or showOnNarrowOnly. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
678
+ | <a id="list-reason-option-without-reason-field"></a>`list/reason-option-without-reason-field` | hint.reasonOpenField and hint.reasonTitleField shape the reason text, so they need reasonField. | Set hint.reasonField or remove reasonOpenField and reasonTitleField. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
645
679
  | <a id="list-ref-target-entity-unknown"></a>`list/ref-target-entity-unknown` | An entity reference target resolves to a registered entity. | Name an entity the target feature registers. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
646
680
  | <a id="list-ref-target-feature-not-mounted"></a>`list/ref-target-feature-not-mounted` | An entity reference target belongs to a mounted feature. | Mount the feature and declare it in r.requires({ features }). | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
647
681
  | <a id="list-related-read-only-with-row-interaction"></a>`list/related-read-only-with-row-interaction` | A readOnly relatedList section declares no rowClick or rowActions. | Remove readOnly or the row interaction. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
648
682
  | <a id="list-related-row-click-no-detail"></a>`list/related-row-click-no-detail` | A relatedList rowClick entity target has a screen declaring detailFor for it. | Add detailFor to the screen that shows the entity. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
649
683
  | <a id="list-related-toolbar-visible-when"></a>`list/related-toolbar-visible-when` | relatedList toolbarActions use visible instead of visibleWhen. | Use visible, a condition on the enclosing record. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
684
+ | <a id="list-row-decoration-ids-missing"></a>`list/row-decoration-ids-missing` | The rowDecoration query's input schema declares `ids`, the row ids the list sends with every call. | Add `ids: z.array(z.string())` to the decoration query's schema; `.max(...)` must cover at least the list page size; the list asks in batches of the first page size. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
685
+ | <a id="list-row-decoration-query-empty"></a>`list/row-decoration-query-empty` | rowDecoration.query is a non-empty query QN. | Name the decoration query or remove rowDecoration. | `packages/framework/src/engine/boot-validator/list-row-guidance-rules.ts` |
650
686
  | <a id="list-screen-id-unresolved"></a>`list/screen-id-unresolved` | listScreenId names a mounted screen. | Fix the listScreenId or mount the list screen. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
651
687
  | <a id="list-screen-unreachable"></a>`list/screen-unreachable` | A screen without a nav entry has a resolvable list, or is marked dormant. | Declare listScreenId, add a standalone r.nav() pointing at it, or set dormant: true. | `packages/framework/src/engine/boot-validator/screens-lists-rules.ts` |
688
+ | <a id="list-sort-option-not-sortable"></a>`list/sort-option-not-sortable` | Every sortOptions field is a listed, sortable column (entityList); a projectionList's query takes sort and sortDirection and, when they are enums, lists every option field and dir. | Mark the field sortable and list it as a column, or give the projectionList's query sort and sortDirection parameters that accept the option fields. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
689
+ | <a id="list-sort-options-default-not-listed"></a>`list/sort-options-default-not-listed` | A defaultSort is one of the sortOptions, so the select opens on an entry. | Add the defaultSort field and dir to sortOptions or change defaultSort. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
690
+ | <a id="list-sort-options-invalid"></a>`list/sort-options-invalid` | sortOptions is not empty and lists each field and dir once. | Remove sortOptions, or list each field and dir pair once. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
691
+ | <a id="list-summary-row-on-related-list"></a>`list/summary-row-on-related-list` | A relatedList section or expandableRow sets no table.summaryRow; only entityList and projectionList screens have a list payload to carry it. | Remove summaryRow from the relatedList, or put the summary on the list screen itself. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
692
+ | <a id="list-summary-row-query-accepts-list-keys"></a>`list/summary-row-query-accepts-list-keys` | The summaryRow query's Zod schema accepts every list key the screen sends (search, namedFilter, filters) and every summaryRow.params key. | Add the missing keys to the query schema (or reuse the list query's filter shape) and apply them, or drop the feature on the screen. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
693
+ | <a id="list-summary-row-query-unknown"></a>`list/summary-row-query-unknown` | table.summaryRow.query names a registered query handler. | Use the qualified name of a query handler (feature:query:name) or remove summaryRow. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
694
+ | <a id="list-summary-row-shape"></a>`list/summary-row-shape` | table.summaryRow is an object with a query string and optional params object. | Write table.summaryRow as { query: "feature:query:order:summary" }. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
695
+ | <a id="list-summary-row-with-totals"></a>`list/summary-row-with-totals` | A table sets summaryRow or totals, not both; two footers under one table read as two answers. | Drop totals and put the figures into the summary query, or drop summaryRow. | `packages/framework/src/engine/boot-validator/list-sort-summary-rules.ts` |
696
+ | <a id="list-toolbar-actions-placement-invalid"></a>`list/toolbar-actions-placement-invalid` | toolbarActionsPlacement is "header" or "toolbar". | Use "header" or "toolbar", or remove toolbarActionsPlacement. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
697
+ | <a id="list-toolbar-actions-placement-without-actions"></a>`list/toolbar-actions-placement-without-actions` | toolbarActionsPlacement "toolbar" moves the toolbarActions, so the list declares some. | Declare toolbarActions or remove toolbarActionsPlacement. | `packages/framework/src/engine/boot-validator/screens-kind-rules.ts` |
652
698
 
653
699
  ## list-bulk
654
700
 
@@ -696,8 +742,8 @@
696
742
  | <a id="list-table-column-min-width-exceeds-width"></a>`list-table/column-min-width-exceeds-width` | A column's minWidth is not greater than its width. | Lower minWidth or raise width. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
697
743
  | <a id="list-table-column-pinned-invalid"></a>`list-table/column-pinned-invalid` | A column's pinned value is one of the known pin sides. | Use one of the listed pin values. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
698
744
  | <a id="list-table-column-pinned-without-pinning"></a>`list-table/column-pinned-without-pinning` | A pinned column needs table.pinning, otherwise the pin has no effect. | Set table: { pinning: true } or remove pinned from the column. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
699
- | <a id="list-table-column-width-invalid"></a>`list-table/column-width-invalid` | A column's width and minWidth are finite pixel counts greater than 0. | Set a positive finite number or remove the option. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
700
- | <a id="list-table-column-width-without-resizing"></a>`list-table/column-width-without-resizing` | A column's width or minWidth needs table.resizing, otherwise it has no effect. | Set table: { resizing: true } or remove width and minWidth from the column. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
745
+ | <a id="list-table-column-width-invalid"></a>`list-table/column-width-invalid` | A column's width and minWidth are finite pixel counts greater than 0 and at most 2000. | Set a positive finite number up to 2000 or remove the option. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
746
+ | <a id="list-table-column-width-without-resizing"></a>`list-table/column-width-without-resizing` | A column's width or minWidth needs table.resizing, otherwise it has no effect; a hint column is exempt. | Set table: { resizing: true } or remove width and minWidth from the column. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
701
747
  | <a id="list-table-density-default-invalid"></a>`list-table/density-default-invalid` | table.density.default is one of the known densities. | Use one of the listed density values. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
702
748
  | <a id="list-table-density-empty"></a>`list-table/density-empty` | table.density sets default and/or userChoice. | Set default and/or userChoice, or remove table.density. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
703
749
  | <a id="list-table-density-not-object"></a>`list-table/density-not-object` | table.density is an object. | Write table.density as { default: "compact", userChoice: true }. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
@@ -707,6 +753,7 @@
707
753
  | <a id="list-table-export-not-allowed"></a>`list-table/export-not-allowed` | table.export is only declared on entityList and projectionList screens. | Remove table.export from this screen or section. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
708
754
  | <a id="list-table-export-not-object"></a>`list-table/export-not-object` | table.export is an object. | Write table.export as { xlsx: true, maxRows: 5000 }. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
709
755
  | <a id="list-table-export-xlsx-not-true"></a>`list-table/export-xlsx-not-true` | table.export.xlsx is true, the only export format. | Set xlsx: true. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
756
+ | <a id="list-table-frame-invalid"></a>`list-table/frame-invalid` | table.frame is one of the known frames. | Use "card" or remove table.frame. | `packages/framework/src/engine/boot-validator/list-table-rules.ts` |
710
757
  | <a id="list-table-grouping-field-not-groupable"></a>`list-table/grouping-field-not-groupable` | table.grouping uses only field types that can be grouped by. | Group by a groupable field. | `packages/framework/src/engine/boot-validator/list-table-aggregate-rules.ts` |
711
758
  | <a id="list-table-grouping-fields-without-user-choice"></a>`list-table/grouping-fields-without-user-choice` | table.grouping.fields comes with userChoice: true, otherwise the user cannot pick them. | Set userChoice: true or remove fields. | `packages/framework/src/engine/boot-validator/list-table-aggregate-rules.ts` |
712
759
  | <a id="list-table-grouping-no-field"></a>`list-table/grouping-no-field` | table.grouping names a field, or offers fields with userChoice: true. | Set field, or userChoice: true with at least one entry in fields. | `packages/framework/src/engine/boot-validator/list-table-aggregate-rules.ts` |
@@ -762,12 +809,14 @@
762
809
 
763
810
  | Rule | Summary | Fix | Source |
764
811
  | --- | --- | --- | --- |
812
+ | <a id="named-filter-projection-query-accepts-count"></a>`named-filter/projection-query-accepts-count` | A projectionList with namedFilterFacet.showCounts binds a query whose schema has limit and totalCount keys. | Add limit and totalCount: z.boolean().optional() to the query schema and return the total, or drop showCounts. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
765
813
  | <a id="named-filter-projection-query-accepts-named-filter"></a>`named-filter/projection-query-accepts-named-filter` | A projectionList with namedFilters binds a query whose schema has a namedFilter key. | Add namedFilter: z.string().optional() to the query schema, resolve it with resolveNamedListFilters and pass the conditions into executor.list filters, the only path that applies field-read and PII guards. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
814
+ | <a id="named-filter-projection-query-accepts-sort"></a>`named-filter/projection-query-accepts-sort` | A projectionList whose namedFilter sets a sort binds a query whose schema has sort and sortDirection keys. | Add sort: z.enum([...sortable fields]) and sortDirection to the query schema and order by them, or remove sort from the named filter. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
766
815
  | <a id="named-filter-stat-navigate-filter-declared"></a>`named-filter/stat-navigate-filter-declared` | A stat navigate.namedFilter is declared in the target screen's namedFilters. | Add { id, label } to namedFilters of the target screen. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
767
816
  | <a id="named-filter-stat-navigate-same-named-filter"></a>`named-filter/stat-navigate-same-named-filter` | A stat's params.namedFilter equals navigate.namedFilter. | Set params.namedFilter to the same id as navigate.namedFilter. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
768
817
  | <a id="named-filter-stat-navigate-same-query"></a>`named-filter/stat-navigate-same-query` | A stat with navigate counts with the target list's own query. | Set the stat query to the target list's query. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
769
818
  | <a id="named-filter-stat-navigate-static-filter"></a>`named-filter/stat-navigate-static-filter` | A stat repeats the target screen's static filter in params.filter. | Set params.filter to the target screen's filter. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
770
- | <a id="named-filter-stat-navigate-target"></a>`named-filter/stat-navigate-target` | A stat navigate.screen resolves to an entityList or projectionList screen. | Point navigate.screen at a registered list screen. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
819
+ | <a id="named-filter-stat-navigate-target"></a>`named-filter/stat-navigate-target` | A stat navigate.screen resolves to an entityList, projectionList or custom screen. | Point navigate.screen at a registered list or custom screen. | `packages/framework/src/engine/boot-validator/named-filter-rules.ts` |
771
820
 
772
821
  ## nav
773
822
 
@@ -812,11 +861,13 @@
812
861
  | <a id="parent-ref-entity-id-field-unknown"></a>`parent-ref/entity-id-field-unknown` | parentRef.entityIdField names a declared field of the entity. | Point entityIdField at a real field on the entity. | `packages/framework/src/engine/boot-validator/entity-declaration-rules.ts` |
813
862
  | <a id="parent-ref-entity-type-field-unknown"></a>`parent-ref/entity-type-field-unknown` | parentRef.entityTypeField names a declared field of the entity. | Point entityTypeField at a real field on the entity. | `packages/framework/src/engine/boot-validator/entity-declaration-rules.ts` |
814
863
  | <a id="parent-ref-hand-written-query-handler"></a>`parent-ref/hand-written-query-handler` | Query handlers on an entity with parentRef carry the entity-convention brand, so the parent-ref read-gate applies. | Register the handler via defineEntityListHandler/defineEntityDetailHandler, or pass parentVisibility to the executor. | `packages/framework/src/engine/boot-validator/entity-declaration-rules.ts` |
864
+ | <a id="parent-ref-hand-written-write-handler"></a>`parent-ref/hand-written-write-handler` | Update/delete/restore handlers on an entity with parentRef carry the entity-convention brand, so the parent visibility gate applies. | Register the handler via defineEntityWriteHandler, or pass parentVisibility: parentVisibilityFor(ctx, event.user) to the executor. | `packages/framework/src/engine/boot-validator/entity-declaration-rules.ts` |
815
865
 
816
866
  ## personal-access-tokens
817
867
 
818
868
  | Rule | Summary | Fix | Source |
819
869
  | --- | --- | --- | --- |
870
+ | <a id="personal-access-tokens-released-wire-name-collision"></a>`personal-access-tokens/released-wire-name-collision` | Webhook events released through PAT scopes have unique wire names. | Give one of the colliding events another wireName in r.defineWebhookEvent. | `packages/bundled-features/src/personal-access-tokens/boot-rules.ts` |
820
871
  | <a id="personal-access-tokens-scope-event-without-contract"></a>`personal-access-tokens/scope-event-without-contract` | Events listed in PAT scopes have a public webhook contract. | Declare the event with r.defineWebhookEvent or opt the entity into webhookEvents. | `packages/bundled-features/src/personal-access-tokens/boot-rules.ts` |
821
872
 
822
873
  ## pii
@@ -884,13 +935,17 @@
884
935
  | <a id="projection-detail-action-show-on-tabs-invalid"></a>`projection-detail/action-show-on-tabs-invalid` | A header action showOnTabs is non-empty, names section ids of the screen and needs layout.mode "tabs". | List existing section ids or remove showOnTabs. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
885
936
  | <a id="projection-detail-extension-contributes-to-form-submit"></a>`projection-detail/extension-contributes-to-form-submit` | A projectionDetail extension section does not set contributesToFormSubmit. | Omit contributesToFormSubmit and persist through the extension's own dispatcher writes. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
886
937
  | <a id="projection-detail-extension-entity-name-missing"></a>`projection-detail/extension-entity-name-missing` | A projectionDetail extension section declares entityName. | Set entityName to the domain entity the extension persists against. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
938
+ | <a id="projection-detail-guidance-action-show-on-tabs"></a>`projection-detail/guidance-action-show-on-tabs` | Banner and steps actions set no showOnTabs. | Remove showOnTabs. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
939
+ | <a id="projection-detail-guidance-field-empty"></a>`projection-detail/guidance-field-empty` | The field names of breadcrumb, summary, banner, steps and progress are non-empty strings. | Name a query output field or remove the block. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
887
940
  | <a id="projection-detail-header-with-record-title-field"></a>`projection-detail/header-with-record-title-field` | A projectionDetail with a header sets no recordTitleField. | Drop recordTitleField; header.title names the record. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
888
941
  | <a id="projection-detail-metric-label-missing"></a>`projection-detail/metric-label-missing` | Every metric has an i18n label key. | Set label on the metric. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
889
942
  | <a id="projection-detail-metric-navigate-tab-unknown"></a>`projection-detail/metric-navigate-tab-unknown` | A metric navigate.tab names a section id of the screen. | Navigate to an existing section id or remove navigate.tab. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
943
+ | <a id="projection-detail-progress-beside-steps-without-steps"></a>`projection-detail/progress-beside-steps-without-steps` | progress.placement "beside-steps" needs a steps block to sit next to. | Add steps to the projectionDetail or remove progress.placement. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
890
944
  | <a id="projection-detail-singleton-with-detail-for"></a>`projection-detail/singleton-with-detail-for` | A singleton projectionDetail sets no detailFor. | Remove detailFor, or declare an explicit edit action. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
891
945
  | <a id="projection-detail-singleton-with-id-param"></a>`projection-detail/singleton-with-id-param` | A singleton projectionDetail sets no idParam. | Remove idParam. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
892
946
  | <a id="projection-detail-status-format-without-status"></a>`projection-detail/status-format-without-status` | header.statusFormat is only set together with header.status. | Set header.status or remove statusFormat. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
893
947
  | <a id="projection-detail-status-tone-invalid"></a>`projection-detail/status-tone-invalid` | header.statusTones values are known select option tones. | Use one of SELECT_OPTION_TONES. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
948
+ | <a id="projection-detail-steps-narrow-limit-invalid"></a>`projection-detail/steps-narrow-limit-invalid` | steps.narrowLimit is a positive integer. | Set narrowLimit to a whole number of at least 1 or remove it. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
894
949
  | <a id="projection-detail-subtitle-href-with-multi-part"></a>`projection-detail/subtitle-href-with-multi-part` | header.subtitleHref is only set with the string form of header.subtitle. | Use a single-field subtitle or remove subtitleHref. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
895
950
  | <a id="projection-detail-subtitle-part-duplicate"></a>`projection-detail/subtitle-part-duplicate` | Each field appears once in header.subtitle. | List each field once. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
896
951
  | <a id="projection-detail-subtitle-part-navigate-target-missing"></a>`projection-detail/subtitle-part-navigate-target-missing` | A header.subtitle part navigate names a screen or an entity. | Set screen or entity on the part's navigate. | `packages/framework/src/engine/boot-validator/screens-kind-projection-detail-rules.ts` |
@@ -1178,6 +1233,7 @@
1178
1233
  | <a id="webhook-event-duplicate"></a>`webhook-event/duplicate` | Webhook event names are unique per feature. | Rename one of the events. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
1179
1234
  | <a id="webhook-event-name-not-kebab"></a>`webhook-event/name-not-kebab` | Webhook event names are kebab-case. | Rename the event to lowercase letters, digits and dashes. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
1180
1235
  | <a id="webhook-event-payload-not-zod-object"></a>`webhook-event/payload-not-zod-object` | Webhook event payloads are Zod object schemas. | Pass z.object({ ... }) as payload. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
1236
+ | <a id="webhook-event-payload-open-shape"></a>`webhook-event/payload-open-shape` | Webhook event payload objects are closed; undeclared keys must be stripped. | Replace looseObject/passthrough/catchall with z.object({ ... }) and declare every field. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
1181
1237
  | <a id="webhook-event-version-invalid"></a>`webhook-event/version-invalid` | Webhook event version is a positive integer. | Set version to an integer of 1 or higher. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
1182
1238
  | <a id="webhook-event-wire-name-empty"></a>`webhook-event/wire-name-empty` | Webhook event wireName is a non-empty string when set. | Set a wireName or omit it. | `packages/framework/src/engine/boot-validator/definition-webhook-events-rules.ts` |
1183
1239
 
@@ -115,6 +115,7 @@ import {
115
115
  generateApiDocs,
116
116
  type NamedApiExample,
117
117
  type NamedWebhookExample,
118
+ resolveApiDocsConfig,
118
119
  WebhookExampleFileSchema,
119
120
  } from "@cosmicdrift/kumiko-bundled-features/agent-tools";
120
121
  import { allAppFeatures } from "@cosmicdrift/kumiko-framework/config";
@@ -175,12 +176,7 @@ describe("api-docs golden", () => {
175
176
  registry: createRegistry(
176
177
  composeFeatures(allAppFeatures(config), { includeBundled: config.includeBundled === true }),
177
178
  ),
178
- config: {
179
- ...config.apiDocs,
180
- locales: config.apiDocs?.locales ?? ["en"],
181
- baseUrl: config.apiDocs?.baseUrl ?? "",
182
- appName: config.apiDocs?.appName ?? appName,
183
- },
179
+ config: resolveApiDocsConfig(config.apiDocs ?? {}, { appName }),
184
180
  // Fixed so that a release does not turn the golden red.
185
181
  source: { framework: "0.0.0-recipe", app: { name: appName, version: "0.0.0" } },
186
182
  examples: readExamples(),
@@ -440,11 +440,36 @@ describe("ConfirmationCodeStep", () => {
440
440
  renderStep(onConfirm);
441
441
  type("123456");
442
442
  await waitFor(() => expect(screen.getByRole("alert")).toBeTruthy());
443
+ expect(screen.getByRole("alert").textContent).toContain("That code is not valid");
443
444
  const input = screen.getByTestId("confirmation-code");
444
445
  expect(input).toHaveProperty("value", "");
445
446
  await waitFor(() => expect(document.activeElement).toBe(input));
446
447
  expect(onConfirm).toHaveBeenCalledTimes(1);
447
448
  });
449
+
450
+ test("a failing onConfirm shows a technical error instead of an invalid-code message, clears the field and refocuses", async () => {
451
+ const onConfirm = mock(async (_code: string): Promise<boolean> => {
452
+ throw new Error("network");
453
+ });
454
+ renderStep(onConfirm);
455
+ type("123456");
456
+ await waitFor(() => expect(screen.getByRole("alert")).toBeTruthy());
457
+ expect(screen.getByRole("alert").textContent).toContain("Could not verify the code");
458
+ expect(screen.queryByText(/not valid/)).toBeNull();
459
+ const input = screen.getByTestId("confirmation-code");
460
+ expect(input).toHaveProperty("value", "");
461
+ await waitFor(() => expect(document.activeElement).toBe(input));
462
+ expect(onConfirm).toHaveBeenCalledTimes(1);
463
+ });
464
+
465
+ test("an accepted code disables the field so the used code cannot be edited", async () => {
466
+ const onConfirm = mock(async (_code: string) => true);
467
+ renderStep(onConfirm);
468
+ type("123456");
469
+ const input = screen.getByTestId("confirmation-code");
470
+ await waitFor(() => expect(onConfirm).toHaveBeenCalledTimes(1));
471
+ await waitFor(() => expect(input).toHaveProperty("disabled", true));
472
+ });
448
473
  });
449
474
  ```
450
475
 
@@ -452,7 +477,7 @@ describe("ConfirmationCodeStep", () => {
452
477
 
453
478
  ```tsx
454
479
  import { usePrimitives } from "@cosmicdrift/kumiko-renderer";
455
- import { type ReactNode, useState } from "react";
480
+ import { type ReactNode, useRef, useState } from "react";
456
481
 
457
482
  const CONFIRMATION_CODE_LENGTH = 6;
458
483
 
@@ -466,15 +491,32 @@ export function ConfirmationCodeStep({ onConfirm }: ConfirmationCodeStepProps):
466
491
  const [code, setCode] = useState("");
467
492
  const [attempt, setAttempt] = useState(0);
468
493
  const [pending, setPending] = useState(false);
469
- const [rejected, setRejected] = useState(false);
494
+ const [confirmed, setConfirmed] = useState(false);
495
+ // A ref, not `pending`: two onComplete calls in one tick both see the stale render closure.
496
+ const inFlight = useRef(false);
497
+ const [failure, setFailure] = useState<"rejected" | "error" | null>(null);
470
498
 
471
499
  const confirm = async (submittedCode: string): Promise<void> => {
472
- if (pending) return;
500
+ if (inFlight.current) return;
501
+ inFlight.current = true;
473
502
  setPending(true);
474
- setRejected(false);
475
- const accepted = await onConfirm(submittedCode).finally(() => setPending(false));
476
- if (accepted) return;
477
- setRejected(true);
503
+ setFailure(null);
504
+ let accepted = false;
505
+ let technicalError = false;
506
+ try {
507
+ accepted = await onConfirm(submittedCode);
508
+ } catch {
509
+ // A network or server error must not leave the step stuck with a full field.
510
+ technicalError = true;
511
+ } finally {
512
+ inFlight.current = false;
513
+ setPending(false);
514
+ }
515
+ if (accepted) {
516
+ setConfirmed(true);
517
+ return;
518
+ }
519
+ setFailure(technicalError ? "error" : "rejected");
478
520
  setCode("");
479
521
  // The input was disabled while pending and lost focus; remounting restores autoFocus.
480
522
  setAttempt((n) => n + 1);
@@ -492,11 +534,16 @@ export function ConfirmationCodeStep({ onConfirm }: ConfirmationCodeStepProps):
492
534
  value={code}
493
535
  onChange={setCode}
494
536
  onComplete={(next) => void confirm(next)}
495
- disabled={pending}
496
- hasError={rejected}
537
+ disabled={pending || confirmed}
538
+ hasError={failure !== null}
497
539
  autoFocus
498
540
  />
499
- {rejected ? <Banner variant="error">That code is not valid. Try again.</Banner> : null}
541
+ {failure === "rejected" ? (
542
+ <Banner variant="error">That code is not valid. Try again.</Banner>
543
+ ) : null}
544
+ {failure === "error" ? (
545
+ <Banner variant="error">Could not verify the code. Try again in a moment.</Banner>
546
+ ) : null}
500
547
  </>
501
548
  );
502
549
  }
@@ -22,6 +22,8 @@ Shows how a feature posts to a tenant's Slack channel without ever handling the
22
22
 
23
23
  The same shape works for `channel-discord`, `channel-teams` (connection name + webhook secret) and `channel-telegram` (one `botToken` secret, the address is the chat id).
24
24
 
25
+ WhatsApp is two-way and not a delivery channel; `channel-whatsapp` is covered in `docs/guides/whatsapp-channel.md` and its own integration test.
26
+
25
27
  ## Run
26
28
 
27
29
  ```bash
@@ -81,6 +81,17 @@ deletion grace period.
81
81
  projection rebuild recomputes it from the (now undecryptable) ciphertext
82
82
  to `NULL`.
83
83
 
84
+ ## Irreversible operations in jobs
85
+
86
+ `forget`, hard deletes, `kms.eraseKey` and writes to `readAsInstruction` fields are gated: they run only from a
87
+ handler marked `agent: { risk: "high" }`. A job or an event consumer has no handler entry, so it must declare
88
+ `irreversibleWithoutEntryHandler` on `r.job` or `r.multiStreamProjection`, or the gate refuses with
89
+ `irreversible_operation_without_entry_handler`. The value names why no entry handler exists:
90
+ `rebuildable-derived-data` (the data is derived and a rebuild recreates it), `high-risk-or-cron-pipeline`
91
+ (a maintenance pipeline that is high-risk by design, like `purge-archived-comments`) or
92
+ `per-dispatch-record-key` (the key belongs to one dispatch record). Hooks and routes never inherit the
93
+ declaration; they dispatch a `risk: "high"` handler instead.
94
+
84
95
  ## Source files
85
96
 
86
97
  ### src/__tests__/feature.integration.test.ts
@@ -114,6 +125,7 @@ import {
114
125
  resetBlindIndexKeyForTests,
115
126
  resetPiiSubjectKmsForTests,
116
127
  resetTestTables,
128
+ waitFor,
117
129
  } from "@cosmicdrift/kumiko-testing/helpers";
118
130
  import {
119
131
  setupTestStack,
@@ -128,7 +140,7 @@ let kms: InMemoryKmsAdapter;
128
140
  const admin = TestUsers.admin;
129
141
 
130
142
  beforeAll(async () => {
131
- stack = await setupTestStack({ features: [hrFeature] });
143
+ stack = await setupTestStack({ features: [hrFeature], jobs: { consumerLane: "worker" } });
132
144
  await unsafeCreateEntityTable(stack.db, employeeEntity);
133
145
  await unsafeCreateEntityTable(stack.db, hrCommentEntity);
134
146
  await createEventsTable(stack.db);
@@ -210,6 +222,29 @@ describe("crypto-shredding-hr", () => {
210
222
  expect(rows[0]?.body).toStartWith(`${PII_CIPHERTEXT_PREFIX}user:${employeeId}:`);
211
223
  });
212
224
 
225
+ test("purge-archived-comments job forgets the comment row; its declaration lets the cron run past the gate", async () => {
226
+ const employeeId = await createEmployee();
227
+ const comment = await stack.http.writeOk<SaveContext>(
228
+ "hr:write:hr-comment:create",
229
+ { employeeId, body: "archived note", authorName: "Manager X" },
230
+ admin,
231
+ );
232
+ const commentId = String(comment.id);
233
+
234
+ await stack.jobRunner?.dispatch("hr:job:purge-archived-comments", {
235
+ commentIds: [commentId],
236
+ tenantId: admin.tenantId,
237
+ });
238
+
239
+ await waitFor(async () => {
240
+ const rows = await asRawClient(stack.db).unsafe(
241
+ "SELECT id FROM read_hr_comments WHERE id = $1",
242
+ [commentId],
243
+ );
244
+ expect(rows).toHaveLength(0);
245
+ });
246
+ });
247
+
213
248
  test("forget: eraseKey renders [[erased]] for the employee AND comments about them", async () => {
214
249
  const employeeId = await createEmployee();
215
250
  await stack.http.writeOk<SaveContext>(
@@ -278,7 +313,9 @@ describe("crypto-shredding-hr — blind-index lookups", () => {
278
313
  ### src/feature.ts
279
314
 
280
315
  ```ts
316
+ import { buildEntityTable, createEventStoreExecutor } from "@cosmicdrift/kumiko-framework/db";
281
317
  import { createEntity, createTextField, defineFeature } from "@cosmicdrift/kumiko-framework/engine";
318
+ import * as z from "zod";
282
319
 
283
320
  export const employeeEntity = createEntity({
284
321
  table: "read_hr_employees",
@@ -300,6 +337,13 @@ export const hrCommentEntity = createEntity({
300
337
  softDelete: true,
301
338
  });
302
339
 
340
+ const hrCommentTable = buildEntityTable("hr-comment", hrCommentEntity);
341
+ const hrCommentExecutor = createEventStoreExecutor(hrCommentTable, hrCommentEntity, {
342
+ entityName: "hr-comment",
343
+ });
344
+
345
+ const purgeArchivedCommentsPayload = z.object({ commentIds: z.array(z.uuid()) });
346
+
303
347
  const hrWrite = { access: { roles: ["Admin"] } } as const;
304
348
  const hrRead = { access: { roles: ["Admin"] } } as const;
305
349
 
@@ -315,5 +359,23 @@ export const hrFeature = defineFeature("hr", (r) => {
315
359
  read: hrRead,
316
360
  verbs: { update: false, delete: false, restore: false, list: false },
317
361
  });
362
+
363
+ // A job runs without a write-handler entry, so the irreversible-operation gate refuses
364
+ // `forget` here unless the job declares why it may. Remove the declaration and the run fails.
365
+ r.job(
366
+ "purge-archived-comments",
367
+ {
368
+ trigger: { maintenance: true },
369
+ runIn: "worker",
370
+ irreversibleWithoutEntryHandler: "high-risk-or-cron-pipeline",
371
+ },
372
+ async (payload, ctx) => {
373
+ const { commentIds } = purgeArchivedCommentsPayload.parse(payload);
374
+ for (const id of commentIds) {
375
+ const result = await hrCommentExecutor.forget({ id }, ctx.systemUser, ctx.db);
376
+ if (!result.isSuccess) throw new Error(`purge of hr-comment ${id} failed`);
377
+ }
378
+ },
379
+ );
318
380
  });
319
381
  ```
@@ -341,6 +341,7 @@ import { createEntity, createTextField } from "@cosmicdrift/kumiko-framework/eng
341
341
 
342
342
  export const currencyEntity = createEntity({
343
343
  table: "read_sample_currencies",
344
+ systemRowsReadable: true,
344
345
  fields: {
345
346
  code: createTextField({ personal: false, reason: "is_reference_data", required: true }),
346
347
  name: createTextField({ personal: false, reason: "is_reference_data", required: true }),
@@ -234,18 +234,14 @@ describe("env composition", () => {
234
234
  expect(report).not.toContain("S3_BUCKET");
235
235
  });
236
236
 
237
- test("rejects a remote http S3 endpoint in production", () => {
237
+ test("rejects a remote http S3 endpoint when the booted env is production", () => {
238
238
  const composed = composeAppEnv();
239
- const originalNodeEnv = process.env["NODE_ENV"];
240
- process.env["NODE_ENV"] = "production";
241
- try {
242
- expect(() =>
243
- parseEnv(composed.schema, { ...minimalValidValues, S3_ENDPOINT: "http://s3.example.com" }),
244
- ).toThrow(KumikoBootError);
245
- } finally {
246
- if (originalNodeEnv === undefined) delete process.env["NODE_ENV"];
247
- else process.env["NODE_ENV"] = originalNodeEnv;
248
- }
239
+ const values = { ...minimalValidValues, S3_ENDPOINT: "http://s3.example.com" };
240
+
241
+ expect(() => parseEnv(composed.schema, { ...values, NODE_ENV: "production" })).toThrow(
242
+ KumikoBootError,
243
+ );
244
+ expect(() => parseEnv(composed.schema, values)).not.toThrow();
249
245
  });
250
246
  });
251
247
  ```