@flowdular/sdk 0.2.4 → 0.3.1

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 (930) hide show
  1. package/.ai/agents/sandbox/business-manager.md +5 -1
  2. package/.ai/blueprints/author-spec/README.md +1 -1
  3. package/.ai/blueprints/author-spec/spec-requirements.yaml +44 -0
  4. package/.ai/blueprints/author-spec/steps.yaml +5 -5
  5. package/.ai/blueprints/author-spec/templates/module.yaml +99 -3
  6. package/.ai/blueprints/edit-module/gates.yaml +4 -0
  7. package/.ai/blueprints/edit-module/required-files.yaml +9 -0
  8. package/.ai/blueprints/new-module/gates.yaml +4 -0
  9. package/.ai/blueprints/new-module/spec-requirements.yaml +2 -2
  10. package/.ai/blueprints/release/gates.yaml +4 -0
  11. package/.ai/platform-capabilities.md +128 -0
  12. package/.ai/policies/capabilities.yaml +130 -3
  13. package/.ai/policies/path-ownership.yaml +5 -2
  14. package/.ai/policies/task-budgets.yaml +5 -3
  15. package/.ai/references/catalog/module.json +4 -4
  16. package/.ai/references/catalog/package.json +2 -2
  17. package/.ai/references/catalog/spec/module.yaml +5 -3
  18. package/.ai/references/catalog/src/platform.ts +2 -0
  19. package/.ai/references/catalog/src/services/catalog-service.ts +89 -1
  20. package/.ai/references/catalog/src/services/data-classes.ts +47 -0
  21. package/.ai/references/catalog/src/services/database-repository.ts +98 -1
  22. package/.ai/references/catalog/src/services/repository.ts +22 -1
  23. package/.ai/references/catalog/tests/data-classes.test.ts +157 -0
  24. package/.ai/references/catalog.provenance.json +12 -10
  25. package/.ai/skills/README.md +10 -0
  26. package/.ai/skills/agent-tool-design/SKILL.md +1 -2
  27. package/.ai/skills/auth-security-review/SKILL.md +1 -1
  28. package/.ai/skills/business-agent-design/SKILL.md +0 -1
  29. package/.ai/skills/cli-extension/SKILL.md +1 -1
  30. package/.ai/skills/deploy-operate/SKILL.md +119 -0
  31. package/.ai/skills/module-new/SKILL.md +29 -3
  32. package/.ai/skills/module-update/SKILL.md +9 -3
  33. package/.ai/skills/perf-audit/SKILL.md +0 -1
  34. package/.ai/skills/release-eject-pr/SKILL.md +0 -1
  35. package/.ai/skills/spec-interview/SKILL.md +120 -0
  36. package/.ai/skills/test-hardening/SKILL.md +1 -0
  37. package/.ai/skills/ux-design/SKILL.md +34 -3
  38. package/.ai/skills/variables/SKILL.md +0 -2
  39. package/.ai/skills/workflow-development/SKILL.md +0 -1
  40. package/AGENTS.md +4 -0
  41. package/docs/agent-contract.md +2 -2
  42. package/docs/design-system.md +185 -31
  43. package/modules/access/migrations/0001_access_core.down.sql +1 -0
  44. package/modules/access/migrations/0001_access_core.up.sql +28 -0
  45. package/modules/access/migrations/README.md +3 -0
  46. package/modules/access/module.json +33 -0
  47. package/modules/access/package.json +43 -0
  48. package/modules/access/spec/module.yaml +225 -0
  49. package/modules/access/src/acl/permissions.ts +6 -0
  50. package/modules/access/src/api/endpoints.ts +244 -0
  51. package/modules/access/src/client/ActivityView.tsrx +245 -0
  52. package/modules/access/src/client/AttestationsView.tsrx +176 -0
  53. package/modules/access/src/client/ReviewView.tsrx +586 -0
  54. package/modules/access/src/client/api.ts +132 -0
  55. package/modules/access/src/client/contribution.tsrx +41 -0
  56. package/modules/access/src/client/index.ts +41 -0
  57. package/modules/access/src/client/navigation.ts +57 -0
  58. package/modules/access/src/client/presentation.ts +69 -0
  59. package/modules/access/src/client/state.ts +72 -0
  60. package/modules/access/src/domain/types.ts +189 -0
  61. package/modules/access/src/index.ts +38 -0
  62. package/modules/access/src/platform.ts +60 -0
  63. package/modules/access/src/server/index.ts +42 -0
  64. package/modules/access/src/server/runtime.ts +105 -0
  65. package/modules/access/src/services/access-service.ts +298 -0
  66. package/modules/access/src/services/audit-window.ts +78 -0
  67. package/modules/access/src/services/auth-directory.ts +72 -0
  68. package/modules/access/src/services/changes.ts +91 -0
  69. package/modules/access/src/services/data-classes.ts +28 -0
  70. package/modules/access/src/services/database-repository.ts +185 -0
  71. package/modules/access/src/services/directory.ts +102 -0
  72. package/modules/access/src/services/index.ts +33 -0
  73. package/modules/access/src/services/list-exports.ts +150 -0
  74. package/modules/access/src/services/migration.ts +54 -0
  75. package/modules/access/src/services/repository.ts +30 -0
  76. package/modules/access/src/services/review.ts +178 -0
  77. package/modules/access/translations/en.json +155 -0
  78. package/modules/access/translations/pl.json +155 -0
  79. package/modules/agents/migrations/0022_credential_rotation_inventory.down.sql +2 -0
  80. package/modules/agents/migrations/0022_credential_rotation_inventory.up.sql +7 -0
  81. package/modules/agents/migrations/0023_agents_retention_indexes.down.sql +2 -0
  82. package/modules/agents/migrations/0023_agents_retention_indexes.up.sql +9 -0
  83. package/modules/agents/migrations/0024_agent_meter_refusals.down.sql +3 -0
  84. package/modules/agents/migrations/0024_agent_meter_refusals.up.sql +22 -0
  85. package/modules/agents/migrations/0025_agent_list_indexes.down.sql +3 -0
  86. package/modules/agents/migrations/0025_agent_list_indexes.up.sql +11 -0
  87. package/modules/agents/module.json +30 -4
  88. package/modules/agents/package.json +2 -1
  89. package/modules/agents/spec/module.yaml +63 -5
  90. package/modules/agents/src/api/endpoints.ts +291 -33
  91. package/modules/agents/src/cli/commands.json +11 -0
  92. package/modules/agents/src/cli/index.ts +45 -0
  93. package/modules/agents/src/client/AgentDashboardWidget.tsrx +19 -11
  94. package/modules/agents/src/client/AgentDefinitionList.tsrx +53 -10
  95. package/modules/agents/src/client/AgentPlaygroundView.tsrx +4 -4
  96. package/modules/agents/src/client/AgentProceduresView.tsrx +2 -2
  97. package/modules/agents/src/client/AgentRunsView.tsrx +143 -40
  98. package/modules/agents/src/client/AgentsView.tsrx +109 -33
  99. package/modules/agents/src/client/api.ts +99 -21
  100. package/modules/agents/src/client/state.ts +97 -0
  101. package/modules/agents/src/domain/types.ts +44 -4
  102. package/modules/agents/src/platform.ts +42 -0
  103. package/modules/agents/src/server/action-execution.ts +201 -106
  104. package/modules/agents/src/server/runtime.ts +32 -0
  105. package/modules/agents/src/services/agent-service.ts +158 -30
  106. package/modules/agents/src/services/credential-rotation.ts +185 -0
  107. package/modules/agents/src/services/credential-vault.ts +71 -46
  108. package/modules/agents/src/services/data-classes.ts +176 -0
  109. package/modules/agents/src/services/database-repository.ts +393 -101
  110. package/modules/agents/src/services/metering.ts +111 -0
  111. package/modules/agents/src/services/migration.ts +109 -0
  112. package/modules/agents/src/services/module-agent-preflight.ts +17 -9
  113. package/modules/agents/src/services/notifications.ts +98 -0
  114. package/modules/agents/src/services/provider-repository.ts +9 -18
  115. package/modules/agents/src/services/provider-service.ts +1 -9
  116. package/modules/agents/src/services/reports.ts +107 -0
  117. package/modules/agents/src/services/repository.ts +86 -6
  118. package/modules/agents/src/services/usage-service.ts +2 -0
  119. package/modules/agents/src/services/worker.ts +114 -4
  120. package/modules/agents/src/settings.ts +14 -3
  121. package/modules/agents/translations/en.json +14 -4
  122. package/modules/agents/translations/pl.json +14 -4
  123. package/modules/approvals/migrations/0001_approvals_core.down.sql +3 -0
  124. package/modules/approvals/migrations/0001_approvals_core.up.sql +78 -0
  125. package/modules/approvals/migrations/0002_approvals_expiry_routing_role.down.sql +2 -0
  126. package/modules/approvals/migrations/0002_approvals_expiry_routing_role.up.sql +19 -0
  127. package/modules/approvals/migrations/0003_approvals_retention_indexes.down.sql +6 -0
  128. package/modules/approvals/migrations/0003_approvals_retention_indexes.up.sql +14 -0
  129. package/modules/approvals/migrations/0004_approvals_inbox_keyset_indexes.down.sql +5 -0
  130. package/modules/approvals/migrations/0004_approvals_inbox_keyset_indexes.up.sql +12 -0
  131. package/modules/approvals/migrations/0005_approvals_grant_audit.down.sql +4 -0
  132. package/modules/approvals/migrations/0005_approvals_grant_audit.up.sql +20 -0
  133. package/modules/approvals/migrations/README.md +3 -0
  134. package/modules/approvals/module.json +34 -0
  135. package/modules/approvals/package.json +43 -0
  136. package/modules/approvals/spec/module.yaml +327 -0
  137. package/modules/approvals/src/acl/permissions.ts +7 -0
  138. package/modules/approvals/src/api/endpoints.ts +457 -0
  139. package/modules/approvals/src/client/ApprovalRequestDrawer.tsrx +138 -0
  140. package/modules/approvals/src/client/ApprovalsView.tsrx +562 -0
  141. package/modules/approvals/src/client/PendingCountWidget.tsrx +52 -0
  142. package/modules/approvals/src/client/api.ts +203 -0
  143. package/modules/approvals/src/client/approvals.css +51 -0
  144. package/modules/approvals/src/client/contribution.tsrx +44 -0
  145. package/modules/approvals/src/client/index.ts +26 -0
  146. package/modules/approvals/src/client/navigation.ts +39 -0
  147. package/modules/approvals/src/client/pending-count.ts +26 -0
  148. package/modules/approvals/src/client/presentation.ts +52 -0
  149. package/modules/approvals/src/client/state.ts +141 -0
  150. package/modules/approvals/src/domain/capability.ts +107 -0
  151. package/modules/approvals/src/domain/grant.ts +69 -0
  152. package/modules/approvals/src/domain/types.ts +168 -0
  153. package/modules/approvals/src/index.ts +61 -0
  154. package/modules/approvals/src/platform.ts +136 -0
  155. package/modules/approvals/src/server/index.ts +42 -0
  156. package/modules/approvals/src/server/runtime.ts +185 -0
  157. package/modules/approvals/src/services/approvals-service.ts +637 -0
  158. package/modules/approvals/src/services/callbacks.ts +75 -0
  159. package/modules/approvals/src/services/data-classes.ts +167 -0
  160. package/modules/approvals/src/services/database-repository.ts +783 -0
  161. package/modules/approvals/src/services/eligibility.ts +121 -0
  162. package/modules/approvals/src/services/expiry-runner.ts +81 -0
  163. package/modules/approvals/src/services/index.ts +31 -0
  164. package/modules/approvals/src/services/migration.ts +256 -0
  165. package/modules/approvals/src/services/notifications.ts +95 -0
  166. package/modules/approvals/src/services/repository.ts +169 -0
  167. package/modules/approvals/src/services/service-error.ts +70 -0
  168. package/modules/approvals/src/settings.ts +102 -0
  169. package/modules/approvals/translations/en.json +104 -0
  170. package/modules/approvals/translations/pl.json +104 -0
  171. package/modules/audit/migrations/0001_audit_core.down.sql +8 -0
  172. package/modules/audit/migrations/0001_audit_core.up.sql +107 -0
  173. package/modules/audit/migrations/0002_audit_sweep_routing_role.down.sql +2 -0
  174. package/modules/audit/migrations/0002_audit_sweep_routing_role.up.sql +21 -0
  175. package/modules/audit/migrations/0003_audit_export_request.down.sql +12 -0
  176. package/modules/audit/migrations/0003_audit_export_request.up.sql +40 -0
  177. package/modules/audit/migrations/0004_audit_hold_seal_erasure.down.sql +17 -0
  178. package/modules/audit/migrations/0004_audit_hold_seal_erasure.up.sql +192 -0
  179. package/modules/audit/migrations/0005_audit_event_format.down.sql +17 -0
  180. package/modules/audit/migrations/0005_audit_event_format.up.sql +60 -0
  181. package/modules/audit/migrations/0006_audit_own_class_walks.down.sql +3 -0
  182. package/modules/audit/migrations/0006_audit_own_class_walks.up.sql +14 -0
  183. package/modules/audit/migrations/README.md +3 -0
  184. package/modules/audit/module.json +32 -0
  185. package/modules/audit/package.json +49 -0
  186. package/modules/audit/spec/module.yaml +809 -0
  187. package/modules/audit/src/acl/permissions.ts +7 -0
  188. package/modules/audit/src/api/endpoints.ts +315 -0
  189. package/modules/audit/src/cli/commands.json +95 -0
  190. package/modules/audit/src/cli/index.ts +658 -0
  191. package/modules/audit/src/client/DataClassesView.tsrx +420 -0
  192. package/modules/audit/src/client/ExportsView.tsrx +256 -0
  193. package/modules/audit/src/client/HoldsView.tsrx +604 -0
  194. package/modules/audit/src/client/SweepsView.tsrx +251 -0
  195. package/modules/audit/src/client/api.ts +185 -0
  196. package/modules/audit/src/client/contribution.tsrx +52 -0
  197. package/modules/audit/src/client/index.ts +23 -0
  198. package/modules/audit/src/client/navigation.ts +74 -0
  199. package/modules/audit/src/client/presentation.ts +105 -0
  200. package/modules/audit/src/client/state.ts +86 -0
  201. package/modules/audit/src/domain/data-classes.ts +16 -0
  202. package/modules/audit/src/domain/types.ts +339 -0
  203. package/modules/audit/src/index.ts +76 -0
  204. package/modules/audit/src/platform.ts +44 -0
  205. package/modules/audit/src/server/index.ts +177 -0
  206. package/modules/audit/src/server/runtime.ts +303 -0
  207. package/modules/audit/src/services/anchor-key.ts +143 -0
  208. package/modules/audit/src/services/anchor-rotation.ts +147 -0
  209. package/modules/audit/src/services/audit-runners.ts +278 -0
  210. package/modules/audit/src/services/backup-guard.ts +95 -0
  211. package/modules/audit/src/services/database-repository.ts +1946 -0
  212. package/modules/audit/src/services/declared-classes.ts +64 -0
  213. package/modules/audit/src/services/erasure-port.ts +126 -0
  214. package/modules/audit/src/services/erasure-service.ts +770 -0
  215. package/modules/audit/src/services/export-directory.ts +106 -0
  216. package/modules/audit/src/services/export-service.ts +714 -0
  217. package/modules/audit/src/services/hold-service.ts +295 -0
  218. package/modules/audit/src/services/index.ts +17 -0
  219. package/modules/audit/src/services/migration.ts +658 -0
  220. package/modules/audit/src/services/own-classes.ts +318 -0
  221. package/modules/audit/src/services/platform-version.ts +23 -0
  222. package/modules/audit/src/services/repository.ts +495 -0
  223. package/modules/audit/src/services/retention-service.ts +191 -0
  224. package/modules/audit/src/services/seal-service.ts +769 -0
  225. package/modules/audit/src/services/service-error.ts +61 -0
  226. package/modules/audit/src/services/subject-keys.ts +90 -0
  227. package/modules/audit/src/services/sweep-service.ts +298 -0
  228. package/modules/audit/src/services/zip.ts +217 -0
  229. package/modules/audit/src/settings.ts +69 -0
  230. package/modules/audit/translations/en.json +210 -0
  231. package/modules/audit/translations/pl.json +210 -0
  232. package/modules/auth/README.md +77 -29
  233. package/modules/auth/migrations/0016_external_identities.up.sql +16 -0
  234. package/modules/auth/migrations/0017_mfa_key_id.up.sql +8 -0
  235. package/modules/auth/migrations/0018_retire_bundled_module_scopes.up.sql +29 -0
  236. package/modules/auth/migrations/0019_notifications_member_scopes.up.sql +44 -0
  237. package/modules/auth/migrations/0020_identity_providers.up.sql +61 -0
  238. package/modules/auth/migrations/0021_membership_status.up.sql +19 -0
  239. package/modules/auth/migrations/0022_auth_provider_scopes.up.sql +45 -0
  240. package/modules/auth/migrations/0023_enterprise_module_scopes.down.sql +19 -0
  241. package/modules/auth/migrations/0023_enterprise_module_scopes.up.sql +71 -0
  242. package/modules/auth/migrations/0024_approvals_member_scopes.down.sql +22 -0
  243. package/modules/auth/migrations/0024_approvals_member_scopes.up.sql +48 -0
  244. package/modules/auth/migrations/0025_audit_holds_owner_scope.down.sql +21 -0
  245. package/modules/auth/migrations/0025_audit_holds_owner_scope.up.sql +47 -0
  246. package/modules/auth/migrations/0026_auth_export_keyset_indexes.down.sql +6 -0
  247. package/modules/auth/migrations/0026_auth_export_keyset_indexes.up.sql +15 -0
  248. package/modules/auth/migrations/0027_workflow_automation_profile_scopes.down.sql +34 -0
  249. package/modules/auth/migrations/0027_workflow_automation_profile_scopes.up.sql +72 -0
  250. package/modules/auth/migrations/0028_auth_member_search_prefix_indexes.down.sql +6 -0
  251. package/modules/auth/migrations/0028_auth_member_search_prefix_indexes.up.sql +21 -0
  252. package/modules/auth/migrations/0029_reports_exports_access_scopes.down.sql +22 -0
  253. package/modules/auth/migrations/0029_reports_exports_access_scopes.up.sql +56 -0
  254. package/modules/auth/migrations/0030_auth_membership_keyset_index.down.sql +4 -0
  255. package/modules/auth/migrations/0030_auth_membership_keyset_index.up.sql +10 -0
  256. package/modules/auth/migrations/0031_membership_scope_backfills_under_rls.down.sql +4 -0
  257. package/modules/auth/migrations/0031_membership_scope_backfills_under_rls.up.sql +31 -0
  258. package/modules/auth/migrations/0032_audit_actor_service.down.sql +9 -0
  259. package/modules/auth/migrations/0032_audit_actor_service.up.sql +10 -0
  260. package/modules/auth/migrations/0033_auth_account_keyset_indexes.down.sql +5 -0
  261. package/modules/auth/migrations/0033_auth_account_keyset_indexes.up.sql +23 -0
  262. package/modules/auth/module.json +3 -3
  263. package/modules/auth/package.json +2 -1
  264. package/modules/auth/spec/module.yaml +372 -3
  265. package/modules/auth/src/acl/scopes.ts +50 -6
  266. package/modules/auth/src/cli/commands.json +11 -0
  267. package/modules/auth/src/cli/greenfield.ts +2 -2
  268. package/modules/auth/src/cli/index.ts +14 -0
  269. package/modules/auth/src/cli/secrets.ts +114 -0
  270. package/modules/auth/src/client/AuthenticationCore.tsrx +61 -8
  271. package/modules/auth/src/client/api.ts +72 -6
  272. package/modules/auth/src/client/contribution.tsrx +23 -0
  273. package/modules/auth/src/client/index.ts +6 -0
  274. package/modules/auth/src/client/providers/IdentityProviderForm.tsrx +191 -0
  275. package/modules/auth/src/client/providers/IdentityProvidersView.tsrx +358 -0
  276. package/modules/auth/src/client/providers/api.ts +128 -0
  277. package/modules/auth/src/client/providers/provider-columns.tsrx +60 -0
  278. package/modules/auth/src/client/providers/state.ts +35 -0
  279. package/modules/auth/src/client/security/SecurityView.tsrx +9 -1
  280. package/modules/auth/src/client/state.ts +15 -1
  281. package/modules/auth/src/domain/types.ts +55 -0
  282. package/modules/auth/src/index.ts +11 -1
  283. package/modules/auth/src/middleware/authentication.ts +4 -0
  284. package/modules/auth/src/server/endpoints.ts +467 -171
  285. package/modules/auth/src/server/http.ts +3 -2
  286. package/modules/auth/src/server/index.ts +22 -1
  287. package/modules/auth/src/server/membership-endpoints.ts +62 -0
  288. package/modules/auth/src/server/mfa-enforcement.ts +156 -0
  289. package/modules/auth/src/server/oidc.ts +389 -0
  290. package/modules/auth/src/server/provider-endpoints.ts +246 -0
  291. package/modules/auth/src/server/provider-host.ts +77 -0
  292. package/modules/auth/src/server/runtime.ts +231 -55
  293. package/modules/auth/src/services/auth-service-error.ts +7 -2
  294. package/modules/auth/src/services/auth-service.ts +948 -51
  295. package/modules/auth/src/services/data-classes.ts +236 -0
  296. package/modules/auth/src/services/database-repository.ts +853 -71
  297. package/modules/auth/src/services/identity-provider-service.ts +571 -0
  298. package/modules/auth/src/services/mail-delivery.ts +16 -16
  299. package/modules/auth/src/services/mail-message.ts +54 -0
  300. package/modules/auth/src/services/mail-port.ts +24 -0
  301. package/modules/auth/src/services/mail-smtp.ts +85 -0
  302. package/modules/auth/src/services/mfa-rotation.ts +144 -0
  303. package/modules/auth/src/services/migration.ts +810 -0
  304. package/modules/auth/src/services/password.ts +14 -0
  305. package/modules/auth/src/services/provider-secret-rotation.ts +169 -0
  306. package/modules/auth/src/services/provider-secrets.ts +136 -0
  307. package/modules/auth/src/services/repository.ts +321 -5
  308. package/modules/auth/src/services/session-sweep-runner.ts +73 -0
  309. package/modules/auth/src/services/settings-store.ts +10 -83
  310. package/modules/auth/src/services/totp.ts +88 -62
  311. package/modules/auth/src/services/validation.ts +194 -7
  312. package/modules/auth/src/settings.ts +18 -0
  313. package/modules/auth/translations/en.json +84 -1
  314. package/modules/auth/translations/pl.json +84 -1
  315. package/modules/automations/migrations/0005_secret_rotation_inventory.down.sql +1 -0
  316. package/modules/automations/migrations/0005_secret_rotation_inventory.up.sql +6 -0
  317. package/modules/automations/migrations/0006_automations_list_sort_indexes.down.sql +4 -0
  318. package/modules/automations/migrations/0006_automations_list_sort_indexes.up.sql +11 -0
  319. package/modules/automations/module.json +24 -6
  320. package/modules/automations/package.json +4 -1
  321. package/modules/automations/spec/module.yaml +81 -7
  322. package/modules/automations/src/api/endpoints.ts +202 -28
  323. package/modules/automations/src/cli/commands.json +17 -0
  324. package/modules/automations/src/cli/index.ts +114 -0
  325. package/modules/automations/src/client/AutomationScheduleForm.tsrx +77 -19
  326. package/modules/automations/src/client/AutomationSchedulesView.tsrx +144 -40
  327. package/modules/automations/src/client/AutomationTriggersView.tsrx +131 -32
  328. package/modules/automations/src/client/api.ts +62 -19
  329. package/modules/automations/src/client/presentation.ts +20 -2
  330. package/modules/automations/src/client/state.ts +84 -0
  331. package/modules/automations/src/domain/cadence.ts +99 -3
  332. package/modules/automations/src/domain/cron.ts +366 -0
  333. package/modules/automations/src/domain/time-zone.ts +61 -0
  334. package/modules/automations/src/platform.ts +38 -4
  335. package/modules/automations/src/server/index.ts +11 -0
  336. package/modules/automations/src/server/runtime.ts +46 -22
  337. package/modules/{automations-workflows-integration/src/server/adapter.ts → automations/src/server/workflow-target.ts} +13 -14
  338. package/modules/{automations-workflows-integration/src/server/tools.ts → automations/src/server/workflow-tools.ts} +0 -0
  339. package/modules/automations/src/services/data-classes.ts +62 -0
  340. package/modules/automations/src/services/database-repository.ts +152 -38
  341. package/modules/automations/src/services/migration.ts +119 -9
  342. package/modules/automations/src/services/repository.ts +52 -1
  343. package/modules/automations/src/services/schedule-runner.ts +84 -0
  344. package/modules/automations/src/services/schedule-service.ts +152 -26
  345. package/modules/automations/src/services/secret-rotation.ts +176 -0
  346. package/modules/automations/src/services/secret-vault.ts +68 -41
  347. package/modules/automations/src/services/trigger-service.ts +13 -10
  348. package/modules/automations/translations/en.json +15 -2
  349. package/modules/automations/translations/pl.json +15 -2
  350. package/modules/connectors/migrations/0001_connectors_core.down.sql +3 -0
  351. package/modules/connectors/migrations/0001_connectors_core.up.sql +72 -0
  352. package/modules/connectors/migrations/0002_connectors_call_keys.down.sql +3 -0
  353. package/modules/connectors/migrations/0002_connectors_call_keys.up.sql +18 -0
  354. package/modules/connectors/migrations/0003_connectors_rotation_inventory.down.sql +2 -0
  355. package/modules/connectors/migrations/0003_connectors_rotation_inventory.up.sql +19 -0
  356. package/modules/connectors/migrations/README.md +3 -0
  357. package/modules/connectors/module.json +32 -0
  358. package/modules/{automations-workflows-integration → connectors}/package.json +28 -26
  359. package/modules/connectors/spec/module.yaml +448 -0
  360. package/modules/connectors/src/acl/permissions.ts +6 -0
  361. package/modules/connectors/src/agent/tools.ts +180 -0
  362. package/modules/connectors/src/api/endpoints.ts +572 -0
  363. package/modules/connectors/src/cli/commands.json +17 -0
  364. package/modules/connectors/src/cli/index.ts +126 -0
  365. package/modules/connectors/src/client/ConnectorCallsView.tsrx +358 -0
  366. package/modules/connectors/src/client/ConnectorForm.tsrx +424 -0
  367. package/modules/connectors/src/client/ConnectorsView.tsrx +711 -0
  368. package/modules/connectors/src/client/api.ts +281 -0
  369. package/modules/connectors/src/client/consent.ts +48 -0
  370. package/modules/connectors/src/client/contribution.tsrx +37 -0
  371. package/modules/connectors/src/client/index.ts +22 -0
  372. package/modules/connectors/src/client/navigation.ts +42 -0
  373. package/modules/connectors/src/client/presentation.ts +38 -0
  374. package/modules/connectors/src/client/state.ts +175 -0
  375. package/modules/connectors/src/domain/calls.ts +70 -0
  376. package/modules/connectors/src/domain/definitions.ts +190 -0
  377. package/modules/connectors/src/domain/http-json.ts +68 -0
  378. package/modules/connectors/src/domain/types.ts +185 -0
  379. package/modules/connectors/src/index.ts +64 -0
  380. package/modules/connectors/src/platform.ts +56 -0
  381. package/modules/connectors/src/server/index.ts +66 -0
  382. package/modules/connectors/src/server/runtime.ts +163 -0
  383. package/modules/connectors/src/services/call-service.ts +903 -0
  384. package/modules/connectors/src/services/connectors-service.ts +653 -0
  385. package/modules/connectors/src/services/credential-rotation.ts +221 -0
  386. package/modules/connectors/src/services/credential-vault.ts +194 -0
  387. package/modules/connectors/src/services/data-classes.ts +158 -0
  388. package/modules/connectors/src/services/database-repository.ts +897 -0
  389. package/modules/connectors/src/services/egress.ts +261 -0
  390. package/modules/connectors/src/services/index.ts +19 -0
  391. package/modules/connectors/src/services/migration.ts +202 -0
  392. package/modules/connectors/src/services/repository.ts +175 -0
  393. package/modules/connectors/src/services/service-error.ts +46 -0
  394. package/modules/connectors/src/settings.ts +69 -0
  395. package/modules/connectors/translations/en.json +191 -0
  396. package/modules/connectors/translations/pl.json +191 -0
  397. package/modules/directory/migrations/0001_directory_core.down.sql +5 -0
  398. package/modules/directory/migrations/0001_directory_core.up.sql +111 -0
  399. package/modules/directory/migrations/README.md +3 -0
  400. package/modules/directory/module.json +27 -0
  401. package/modules/directory/package.json +46 -0
  402. package/modules/directory/spec/module.yaml +351 -0
  403. package/modules/directory/src/acl/permissions.ts +7 -0
  404. package/modules/directory/src/api/endpoints.ts +478 -0
  405. package/modules/directory/src/api/scim-endpoints.ts +516 -0
  406. package/modules/directory/src/client/GroupMappingsView.tsrx +430 -0
  407. package/modules/directory/src/client/ProvisioningLogView.tsrx +248 -0
  408. package/modules/directory/src/client/ScimTokensView.tsrx +587 -0
  409. package/modules/directory/src/client/api.ts +222 -0
  410. package/modules/directory/src/client/contribution.tsrx +46 -0
  411. package/modules/directory/src/client/index.ts +22 -0
  412. package/modules/directory/src/client/navigation.ts +57 -0
  413. package/modules/directory/src/client/presentation.ts +143 -0
  414. package/modules/directory/src/client/state.ts +173 -0
  415. package/modules/directory/src/domain/scim.ts +346 -0
  416. package/modules/directory/src/domain/types.ts +166 -0
  417. package/modules/directory/src/index.ts +44 -0
  418. package/modules/directory/src/platform.ts +43 -0
  419. package/modules/directory/src/server/index.ts +17 -0
  420. package/modules/directory/src/server/runtime.ts +124 -0
  421. package/modules/directory/src/services/auth-port.ts +127 -0
  422. package/modules/directory/src/services/data-classes.ts +41 -0
  423. package/modules/directory/src/services/database-repository.ts +1067 -0
  424. package/modules/directory/src/services/directory-service.ts +311 -0
  425. package/modules/directory/src/services/index.ts +43 -0
  426. package/modules/directory/src/services/migration.ts +146 -0
  427. package/modules/directory/src/services/provisioning-service.ts +1420 -0
  428. package/modules/directory/src/services/rate-limiter.ts +103 -0
  429. package/modules/directory/src/services/repository.ts +208 -0
  430. package/modules/directory/src/services/service-error.ts +42 -0
  431. package/modules/directory/src/services/token-service.ts +215 -0
  432. package/modules/directory/src/settings.ts +86 -0
  433. package/modules/directory/translations/en.json +185 -0
  434. package/modules/directory/translations/pl.json +185 -0
  435. package/modules/documents/migrations/0001_documents_core.down.sql +1 -0
  436. package/modules/documents/migrations/0001_documents_core.up.sql +35 -0
  437. package/modules/documents/migrations/0002_documents_files_page.down.sql +1 -0
  438. package/modules/documents/migrations/0002_documents_files_page.up.sql +6 -0
  439. package/modules/documents/migrations/0003_documents_rotation_inventory.down.sql +2 -0
  440. package/modules/documents/migrations/0003_documents_rotation_inventory.up.sql +18 -0
  441. package/modules/documents/migrations/README.md +3 -0
  442. package/modules/documents/module.json +32 -0
  443. package/modules/documents/package.json +50 -0
  444. package/modules/documents/spec/module.yaml +248 -0
  445. package/modules/documents/src/acl/permissions.ts +6 -0
  446. package/modules/documents/src/api/endpoints.ts +401 -0
  447. package/modules/documents/src/cli/commands.json +17 -0
  448. package/modules/documents/src/cli/index.ts +145 -0
  449. package/modules/documents/src/client/DocumentUploader.tsrx +148 -0
  450. package/modules/documents/src/client/DocumentsView.tsrx +540 -0
  451. package/modules/documents/src/client/api.ts +209 -0
  452. package/modules/documents/src/client/contribution.tsrx +29 -0
  453. package/modules/documents/src/client/download.ts +70 -0
  454. package/modules/documents/src/client/index.ts +22 -0
  455. package/modules/documents/src/client/navigation.ts +25 -0
  456. package/modules/documents/src/client/presentation.ts +110 -0
  457. package/modules/documents/src/client/state.ts +117 -0
  458. package/modules/documents/src/domain/attachments.ts +84 -0
  459. package/modules/documents/src/domain/types.ts +80 -0
  460. package/modules/documents/src/index.ts +46 -0
  461. package/modules/documents/src/platform.ts +61 -0
  462. package/modules/documents/src/server/index.ts +30 -0
  463. package/modules/documents/src/server/runtime.ts +107 -0
  464. package/modules/documents/src/services/attachments.ts +39 -0
  465. package/modules/documents/src/services/data-classes.ts +25 -0
  466. package/modules/documents/src/services/database-repository.ts +270 -0
  467. package/modules/documents/src/services/documents-service.ts +590 -0
  468. package/modules/documents/src/services/index.ts +18 -0
  469. package/modules/documents/src/services/migration.ts +117 -0
  470. package/modules/documents/src/services/repository.ts +58 -0
  471. package/modules/documents/src/services/storage-rotation.ts +157 -0
  472. package/modules/documents/src/settings.ts +107 -0
  473. package/modules/documents/translations/en.json +111 -0
  474. package/modules/documents/translations/pl.json +111 -0
  475. package/modules/exports/migrations/0001_exports_core.down.sql +2 -0
  476. package/modules/exports/migrations/0001_exports_core.up.sql +28 -0
  477. package/modules/exports/migrations/0002_exports_job_routing_role.down.sql +4 -0
  478. package/modules/exports/migrations/0002_exports_job_routing_role.up.sql +21 -0
  479. package/modules/exports/migrations/0003_exports_rotation_inventory.down.sql +1 -0
  480. package/modules/exports/migrations/0003_exports_rotation_inventory.up.sql +9 -0
  481. package/modules/exports/migrations/README.md +3 -0
  482. package/modules/exports/module.json +32 -0
  483. package/modules/exports/package.json +45 -0
  484. package/modules/exports/spec/module.yaml +230 -0
  485. package/modules/exports/src/acl/permissions.ts +6 -0
  486. package/modules/exports/src/api/endpoints.ts +211 -0
  487. package/modules/exports/src/cli/commands.json +17 -0
  488. package/modules/exports/src/cli/index.ts +145 -0
  489. package/modules/exports/src/client/ExportsView.tsrx +327 -0
  490. package/modules/exports/src/client/api.ts +133 -0
  491. package/modules/exports/src/client/contribution.tsrx +31 -0
  492. package/modules/exports/src/client/index.ts +20 -0
  493. package/modules/exports/src/client/navigation.ts +25 -0
  494. package/modules/exports/src/client/presentation.ts +53 -0
  495. package/modules/exports/src/client/state.ts +56 -0
  496. package/modules/exports/src/domain/lists.ts +29 -0
  497. package/modules/exports/src/domain/types.ts +120 -0
  498. package/modules/exports/src/index.ts +41 -0
  499. package/modules/exports/src/platform.ts +80 -0
  500. package/modules/exports/src/server/index.ts +50 -0
  501. package/modules/exports/src/server/runtime.ts +160 -0
  502. package/modules/exports/src/services/data-classes.ts +59 -0
  503. package/modules/exports/src/services/database-repository.ts +403 -0
  504. package/modules/exports/src/services/export-runner.ts +123 -0
  505. package/modules/exports/src/services/export-service.ts +356 -0
  506. package/modules/exports/src/services/index.ts +6 -0
  507. package/modules/exports/src/services/list-registry.ts +105 -0
  508. package/modules/exports/src/services/migration.ts +116 -0
  509. package/modules/exports/src/services/repository.ts +96 -0
  510. package/modules/exports/src/services/storage-rotation.ts +138 -0
  511. package/modules/exports/src/settings.ts +70 -0
  512. package/modules/exports/translations/en.json +69 -0
  513. package/modules/exports/translations/pl.json +69 -0
  514. package/modules/import/migrations/0001_import_core.down.sql +6 -0
  515. package/modules/import/migrations/0001_import_core.up.sql +61 -0
  516. package/modules/import/migrations/0002_import_job_routing_role.down.sql +4 -0
  517. package/modules/import/migrations/0002_import_job_routing_role.up.sql +20 -0
  518. package/modules/import/migrations/0003_import_jobs_export_index.down.sql +1 -0
  519. package/modules/import/migrations/0003_import_jobs_export_index.up.sql +7 -0
  520. package/modules/import/migrations/0004_import_jobs_traceparent.down.sql +1 -0
  521. package/modules/import/migrations/0004_import_jobs_traceparent.up.sql +7 -0
  522. package/modules/import/migrations/README.md +3 -0
  523. package/modules/import/module.json +37 -0
  524. package/modules/import/package.json +50 -0
  525. package/modules/import/spec/module.yaml +335 -0
  526. package/modules/import/src/acl/permissions.ts +6 -0
  527. package/modules/import/src/api/endpoints.ts +400 -0
  528. package/modules/import/src/client/ImportJobDrawer.tsrx +229 -0
  529. package/modules/import/src/client/ImportsView.tsrx +455 -0
  530. package/modules/import/src/client/NewImportForm.tsrx +274 -0
  531. package/modules/import/src/client/api.ts +243 -0
  532. package/modules/import/src/client/contribution.tsrx +29 -0
  533. package/modules/import/src/client/index.ts +23 -0
  534. package/modules/import/src/client/navigation.ts +25 -0
  535. package/modules/import/src/client/presentation.ts +59 -0
  536. package/modules/import/src/client/state.ts +43 -0
  537. package/modules/import/src/domain/csv.ts +258 -0
  538. package/modules/import/src/domain/ports.ts +157 -0
  539. package/modules/import/src/domain/types.ts +179 -0
  540. package/modules/import/src/index.ts +58 -0
  541. package/modules/import/src/platform.ts +60 -0
  542. package/modules/import/src/server/index.ts +49 -0
  543. package/modules/import/src/server/runtime.ts +158 -0
  544. package/modules/import/src/services/csv-source.ts +121 -0
  545. package/modules/import/src/services/data-classes.ts +63 -0
  546. package/modules/import/src/services/database-repository.ts +780 -0
  547. package/modules/import/src/services/import-runner.ts +127 -0
  548. package/modules/import/src/services/import-service.ts +872 -0
  549. package/modules/import/src/services/index.ts +6 -0
  550. package/modules/import/src/services/migration.ts +156 -0
  551. package/modules/import/src/services/port-registry.ts +158 -0
  552. package/modules/import/src/services/repository.ts +147 -0
  553. package/modules/import/src/settings.ts +70 -0
  554. package/modules/import/translations/en.json +175 -0
  555. package/modules/import/translations/pl.json +175 -0
  556. package/modules/metering/migrations/0001_metering_core.down.sql +6 -0
  557. package/modules/metering/migrations/0001_metering_core.up.sql +119 -0
  558. package/modules/metering/migrations/0002_metering_bucket_export.down.sql +3 -0
  559. package/modules/metering/migrations/0002_metering_bucket_export.up.sql +5 -0
  560. package/modules/metering/migrations/README.md +3 -0
  561. package/modules/metering/module.json +46 -0
  562. package/modules/metering/package.json +50 -0
  563. package/modules/metering/spec/module.yaml +269 -0
  564. package/modules/metering/src/acl/permissions.ts +5 -0
  565. package/modules/metering/src/api/endpoints.ts +104 -0
  566. package/modules/metering/src/cli/commands.json +28 -0
  567. package/modules/metering/src/cli/index.ts +246 -0
  568. package/modules/metering/src/client/LimitsView.tsrx +170 -0
  569. package/modules/metering/src/client/UsageSummaryWidget.tsrx +63 -0
  570. package/modules/metering/src/client/UsageView.tsrx +205 -0
  571. package/modules/metering/src/client/api.ts +91 -0
  572. package/modules/metering/src/client/contribution.tsrx +42 -0
  573. package/modules/metering/src/client/index.ts +26 -0
  574. package/modules/metering/src/client/navigation.ts +54 -0
  575. package/modules/metering/src/client/presentation.ts +63 -0
  576. package/modules/metering/src/client/state.ts +31 -0
  577. package/modules/metering/src/domain/meters.ts +100 -0
  578. package/modules/metering/src/domain/types.ts +71 -0
  579. package/modules/metering/src/index.ts +51 -0
  580. package/modules/metering/src/platform.ts +84 -0
  581. package/modules/metering/src/server/index.ts +40 -0
  582. package/modules/metering/src/server/runtime.ts +165 -0
  583. package/modules/metering/src/services/data-classes.ts +34 -0
  584. package/modules/metering/src/services/database-repository.ts +574 -0
  585. package/modules/metering/src/services/index.ts +9 -0
  586. package/modules/metering/src/services/meter-registry.ts +145 -0
  587. package/modules/metering/src/services/metering-service.ts +441 -0
  588. package/modules/metering/src/services/migration.ts +183 -0
  589. package/modules/metering/src/services/notifications.ts +75 -0
  590. package/modules/metering/src/services/reports.ts +105 -0
  591. package/modules/metering/src/services/repository.ts +132 -0
  592. package/modules/metering/src/services/service-error.ts +46 -0
  593. package/modules/metering/src/settings.ts +47 -0
  594. package/modules/metering/translations/en.json +68 -0
  595. package/modules/metering/translations/pl.json +68 -0
  596. package/modules/notifications/migrations/0001_notifications_core.down.sql +1 -0
  597. package/modules/notifications/migrations/0001_notifications_core.up.sql +26 -0
  598. package/modules/notifications/migrations/0002_notifications_preferences.down.sql +1 -0
  599. package/modules/notifications/migrations/0002_notifications_preferences.up.sql +17 -0
  600. package/modules/notifications/migrations/0003_notifications_webhook_subscriptions.down.sql +1 -0
  601. package/modules/notifications/migrations/0003_notifications_webhook_subscriptions.up.sql +30 -0
  602. package/modules/notifications/migrations/0004_notifications_deliveries.down.sql +1 -0
  603. package/modules/notifications/migrations/0004_notifications_deliveries.up.sql +35 -0
  604. package/modules/notifications/migrations/0005_notifications_delivery_routing_role.down.sql +2 -0
  605. package/modules/notifications/migrations/0005_notifications_delivery_routing_role.up.sql +17 -0
  606. package/modules/notifications/migrations/0006_notifications_delivery_title.down.sql +1 -0
  607. package/modules/notifications/migrations/0006_notifications_delivery_title.up.sql +11 -0
  608. package/modules/notifications/migrations/0007_notifications_secret_rotation_inventory.down.sql +2 -0
  609. package/modules/notifications/migrations/0007_notifications_secret_rotation_inventory.up.sql +19 -0
  610. package/modules/notifications/migrations/0008_notifications_delivery_claim.down.sql +8 -0
  611. package/modules/notifications/migrations/0008_notifications_delivery_claim.up.sql +19 -0
  612. package/modules/notifications/migrations/0009_notifications_kind_approvals.down.sql +16 -0
  613. package/modules/notifications/migrations/0009_notifications_kind_approvals.up.sql +18 -0
  614. package/modules/notifications/migrations/0010_notifications_kind_meter_threshold.down.sql +16 -0
  615. package/modules/notifications/migrations/0010_notifications_kind_meter_threshold.up.sql +18 -0
  616. package/modules/notifications/migrations/0011_notifications_retention_keyset.down.sql +5 -0
  617. package/modules/notifications/migrations/0011_notifications_retention_keyset.up.sql +15 -0
  618. package/modules/notifications/migrations/0012_notifications_email_channel.down.sql +12 -0
  619. package/modules/notifications/migrations/0012_notifications_email_channel.up.sql +38 -0
  620. package/modules/notifications/migrations/0013_notifications_list_pages.down.sql +5 -0
  621. package/modules/notifications/migrations/0013_notifications_list_pages.up.sql +13 -0
  622. package/modules/notifications/migrations/README.md +3 -0
  623. package/modules/notifications/module.json +32 -0
  624. package/modules/notifications/package.json +49 -0
  625. package/modules/notifications/spec/module.yaml +718 -0
  626. package/modules/notifications/src/acl/permissions.ts +11 -0
  627. package/modules/notifications/src/api/endpoints.ts +814 -0
  628. package/modules/notifications/src/cli/commands.json +17 -0
  629. package/modules/notifications/src/cli/index.ts +126 -0
  630. package/modules/notifications/src/client/DeliveriesView.tsrx +483 -0
  631. package/modules/notifications/src/client/FactList.tsrx +24 -0
  632. package/modules/notifications/src/client/NotificationPreferencesView.tsrx +240 -0
  633. package/modules/notifications/src/client/NotificationsInboxView.tsrx +592 -0
  634. package/modules/notifications/src/client/UnreadCountWidget.tsrx +62 -0
  635. package/modules/notifications/src/client/WebhookForm.tsrx +297 -0
  636. package/modules/notifications/src/client/WebhooksView.tsrx +637 -0
  637. package/modules/notifications/src/client/api.ts +382 -0
  638. package/modules/notifications/src/client/contribution.tsrx +83 -0
  639. package/modules/notifications/src/client/inbox.ts +41 -0
  640. package/modules/notifications/src/client/index.ts +29 -0
  641. package/modules/notifications/src/client/navigation.ts +92 -0
  642. package/modules/notifications/src/client/notifications.css +70 -0
  643. package/modules/notifications/src/client/presentation.ts +81 -0
  644. package/modules/notifications/src/client/state.ts +246 -0
  645. package/modules/notifications/src/client/unread-count.ts +26 -0
  646. package/modules/notifications/src/domain/locale.ts +47 -0
  647. package/modules/notifications/src/domain/publish.ts +46 -0
  648. package/modules/notifications/src/domain/types.ts +186 -0
  649. package/modules/notifications/src/index.ts +62 -0
  650. package/modules/notifications/src/platform.ts +85 -0
  651. package/modules/notifications/src/server/index.ts +82 -0
  652. package/modules/notifications/src/server/runtime.ts +251 -0
  653. package/modules/notifications/src/services/data-classes.ts +139 -0
  654. package/modules/notifications/src/services/database-repository.ts +1334 -0
  655. package/modules/notifications/src/services/delivery-payload.ts +93 -0
  656. package/modules/notifications/src/services/delivery-runner.ts +170 -0
  657. package/modules/notifications/src/services/delivery-service.ts +811 -0
  658. package/modules/notifications/src/services/egress.ts +239 -0
  659. package/modules/notifications/src/services/email-channel.ts +93 -0
  660. package/modules/notifications/src/services/index.ts +23 -0
  661. package/modules/notifications/src/services/migration.ts +572 -0
  662. package/modules/notifications/src/services/notifications-service.ts +297 -0
  663. package/modules/notifications/src/services/paging.ts +60 -0
  664. package/modules/notifications/src/services/publish-service.ts +133 -0
  665. package/modules/notifications/src/services/repository.ts +342 -0
  666. package/modules/notifications/src/services/secret-rotation.ts +177 -0
  667. package/modules/notifications/src/services/secret-vault.ts +168 -0
  668. package/modules/notifications/src/services/service-error.ts +67 -0
  669. package/modules/notifications/src/services/signature.ts +81 -0
  670. package/modules/notifications/src/services/webhook-service.ts +307 -0
  671. package/modules/notifications/src/settings.ts +130 -0
  672. package/modules/notifications/translations/en.json +255 -0
  673. package/modules/notifications/translations/pl.json +255 -0
  674. package/modules/profile/module.json +3 -3
  675. package/modules/profile/package.json +1 -1
  676. package/modules/profile/spec/module.yaml +3 -3
  677. package/modules/profile/src/services/database-repository.ts +3 -13
  678. package/modules/reports/module.json +28 -0
  679. package/modules/reports/package.json +42 -0
  680. package/modules/reports/spec/module.yaml +231 -0
  681. package/modules/reports/src/acl/permissions.ts +5 -0
  682. package/modules/reports/src/api/endpoints.ts +72 -0
  683. package/modules/reports/src/client/ReportsSummaryWidget.tsrx +52 -0
  684. package/modules/reports/src/client/ReportsView.tsrx +246 -0
  685. package/modules/reports/src/client/api.ts +65 -0
  686. package/modules/reports/src/client/contribution.tsrx +36 -0
  687. package/modules/reports/src/client/index.ts +18 -0
  688. package/modules/reports/src/client/navigation.ts +39 -0
  689. package/modules/reports/src/client/presentation.ts +123 -0
  690. package/modules/reports/src/client/state.ts +28 -0
  691. package/modules/reports/src/domain/providers.ts +115 -0
  692. package/modules/reports/src/domain/types.ts +44 -0
  693. package/modules/reports/src/index.ts +47 -0
  694. package/modules/reports/src/platform.ts +37 -0
  695. package/modules/reports/src/server/index.ts +21 -0
  696. package/modules/reports/src/server/runtime.ts +40 -0
  697. package/modules/reports/src/services/index.ts +17 -0
  698. package/modules/reports/src/services/provider-registry.ts +144 -0
  699. package/modules/reports/src/services/range.ts +65 -0
  700. package/modules/reports/src/services/reports-service.ts +316 -0
  701. package/modules/reports/src/services/service-error.ts +26 -0
  702. package/modules/reports/src/settings.ts +49 -0
  703. package/modules/reports/translations/en.json +35 -0
  704. package/modules/reports/translations/pl.json +35 -0
  705. package/modules/sandbox/module.json +4 -4
  706. package/modules/sandbox/package.json +1 -1
  707. package/modules/sandbox/spec/module.yaml +3 -3
  708. package/modules/sandbox/src/services/database-repository.ts +14 -23
  709. package/modules/sandbox/src/services/directory.ts +16 -0
  710. package/modules/sandbox/src/services/sandbox-service.ts +13 -11
  711. package/modules/search/migrations/0001_search_core.down.sql +1 -0
  712. package/modules/search/migrations/0001_search_core.up.sql +22 -0
  713. package/modules/search/migrations/0002_search_recent_export.down.sql +3 -0
  714. package/modules/search/migrations/0002_search_recent_export.up.sql +5 -0
  715. package/modules/search/migrations/README.md +3 -0
  716. package/modules/search/module.json +28 -0
  717. package/modules/search/package.json +43 -0
  718. package/modules/search/spec/module.yaml +177 -0
  719. package/modules/search/src/acl/permissions.ts +5 -0
  720. package/modules/search/src/api/endpoints.ts +221 -0
  721. package/modules/search/src/client/SearchView.tsrx +346 -0
  722. package/modules/search/src/client/api.ts +157 -0
  723. package/modules/search/src/client/contribution.tsrx +31 -0
  724. package/modules/search/src/client/index.ts +17 -0
  725. package/modules/search/src/client/navigation.ts +97 -0
  726. package/modules/search/src/client/search.css +56 -0
  727. package/modules/search/src/client/state.ts +113 -0
  728. package/modules/search/src/domain/data-classes.ts +73 -0
  729. package/modules/search/src/domain/providers.ts +88 -0
  730. package/modules/search/src/domain/types.ts +56 -0
  731. package/modules/search/src/index.ts +46 -0
  732. package/modules/search/src/platform.ts +42 -0
  733. package/modules/search/src/server/index.ts +25 -0
  734. package/modules/search/src/server/runtime.ts +123 -0
  735. package/modules/search/src/services/database-repository.ts +163 -0
  736. package/modules/search/src/services/index.ts +21 -0
  737. package/modules/search/src/services/migration.ts +65 -0
  738. package/modules/search/src/services/provider-registry.ts +137 -0
  739. package/modules/search/src/services/repository.ts +43 -0
  740. package/modules/search/src/services/search-service.ts +442 -0
  741. package/modules/search/src/services/service-error.ts +35 -0
  742. package/modules/search/src/settings.ts +68 -0
  743. package/modules/search/translations/en.json +45 -0
  744. package/modules/search/translations/pl.json +45 -0
  745. package/modules/system/module.json +2 -2
  746. package/modules/system/package.json +1 -1
  747. package/modules/system/spec/module.yaml +30 -3
  748. package/modules/system/src/client/FlagsPanel.tsrx +127 -0
  749. package/modules/system/src/client/ModuleSettingRow.tsrx +17 -7
  750. package/modules/system/src/client/ModuleSettingsSection.tsrx +10 -71
  751. package/modules/system/src/client/ModulesView.tsrx +91 -65
  752. package/modules/system/src/client/flags.ts +35 -0
  753. package/modules/system/src/client/index.ts +8 -0
  754. package/modules/system/src/client/navigation.ts +8 -0
  755. package/modules/system/src/client/settings-state.ts +159 -0
  756. package/modules/system/src/client/state.ts +2 -0
  757. package/modules/system/src/domain/time-zone.ts +105 -0
  758. package/modules/system/src/index.ts +12 -0
  759. package/modules/system/src/platform.ts +5 -1
  760. package/modules/system/src/server/endpoints.ts +72 -21
  761. package/modules/system/src/settings.ts +28 -0
  762. package/modules/system/translations/en.json +17 -0
  763. package/modules/system/translations/pl.json +17 -0
  764. package/modules/users/module.json +30 -4
  765. package/modules/users/package.json +4 -1
  766. package/modules/users/spec/module.yaml +290 -7
  767. package/modules/users/src/api/endpoints.ts +228 -15
  768. package/modules/users/src/client/InviteMemberForm.tsrx +2 -2
  769. package/modules/users/src/client/MemberDrawer.tsrx +142 -26
  770. package/modules/users/src/client/UserAccountForm.tsrx +2 -2
  771. package/modules/users/src/client/UsersView.tsrx +432 -71
  772. package/modules/users/src/client/api.ts +106 -12
  773. package/modules/users/src/client/contribution.tsrx +5 -0
  774. package/modules/users/src/client/member-columns.tsrx +22 -9
  775. package/modules/users/src/client/state.ts +172 -7
  776. package/modules/users/src/domain/lists.ts +9 -0
  777. package/modules/users/src/index.ts +11 -0
  778. package/modules/users/src/platform.ts +50 -1
  779. package/modules/users/src/services/member-export.ts +51 -0
  780. package/modules/users/src/services/member-import.ts +249 -0
  781. package/modules/users/src/services/member-search.ts +145 -0
  782. package/modules/users/src/services/users-service.ts +117 -4
  783. package/modules/users/translations/en.json +57 -8
  784. package/modules/users/translations/pl.json +57 -8
  785. package/modules/workflows/migrations/0004_payload_rotation_inventory.up.sql +17 -0
  786. package/modules/workflows/migrations/0005_workflows_human_approval.up.sql +28 -0
  787. package/modules/workflows/migrations/0006_workflows_retention_indexes.up.sql +11 -0
  788. package/modules/workflows/migrations/0007_workflows_erasure_subject_indexes.up.sql +17 -0
  789. package/modules/workflows/migrations/0008_workflows_subject_account.up.sql +24 -0
  790. package/modules/workflows/migrations/0009_workflows_definition_list_indexes.up.sql +9 -0
  791. package/modules/workflows/module.json +34 -6
  792. package/modules/workflows/package.json +2 -1
  793. package/modules/workflows/spec/module.yaml +26 -9
  794. package/modules/workflows/src/api/endpoints.ts +131 -25
  795. package/modules/workflows/src/cli/commands.json +17 -0
  796. package/modules/workflows/src/cli/index.ts +114 -0
  797. package/modules/workflows/src/client/WorkflowExecutionHistory.tsrx +36 -27
  798. package/modules/workflows/src/client/WorkflowInspector.tsrx +116 -0
  799. package/modules/workflows/src/client/WorkflowNodePalette.tsrx +1 -0
  800. package/modules/workflows/src/client/WorkflowsView.tsrx +236 -99
  801. package/modules/workflows/src/client/api.ts +54 -34
  802. package/modules/workflows/src/client/canvas-model.ts +12 -0
  803. package/modules/workflows/src/client/state.ts +95 -0
  804. package/modules/workflows/src/domain/events.ts +25 -11
  805. package/modules/workflows/src/domain/graph.ts +135 -1
  806. package/modules/workflows/src/domain/types.ts +91 -4
  807. package/modules/workflows/src/platform.ts +12 -0
  808. package/modules/workflows/src/server/runtime.ts +78 -5
  809. package/modules/workflows/src/services/approvals.ts +62 -0
  810. package/modules/workflows/src/services/cursors.ts +37 -0
  811. package/modules/workflows/src/services/data-classes.ts +232 -0
  812. package/modules/workflows/src/services/database-repository.ts +660 -171
  813. package/modules/workflows/src/services/migration.ts +240 -0
  814. package/modules/workflows/src/services/notifications.ts +98 -0
  815. package/modules/workflows/src/services/payload-codec.ts +51 -28
  816. package/modules/workflows/src/services/payload-rotation.ts +171 -0
  817. package/modules/workflows/src/services/repository.ts +123 -8
  818. package/modules/workflows/src/services/simulation.ts +7 -0
  819. package/modules/workflows/src/services/worker.ts +446 -25
  820. package/modules/workflows/src/services/workflows-service.ts +264 -103
  821. package/modules/workflows/translations/en.json +12 -4
  822. package/modules/workflows/translations/pl.json +12 -4
  823. package/modules.json +48 -4
  824. package/package.json +64 -6
  825. package/packages/client/package.json +1 -0
  826. package/packages/client/src/ApplicationShell.tsrx +43 -0
  827. package/packages/client/src/contributions.ts +55 -0
  828. package/packages/client/src/i18n/locales/en.json +5 -0
  829. package/packages/client/src/i18n/locales/pl.json +5 -0
  830. package/packages/client/src/index.ts +13 -1
  831. package/packages/client/src/routing.ts +22 -0
  832. package/packages/client/src/shell/CommandPalette.tsrx +223 -11
  833. package/packages/client/src/shell/command-search.ts +126 -0
  834. package/packages/client/src/shell/command.ts +30 -0
  835. package/packages/client/src/shell/navigation.ts +12 -0
  836. package/packages/client/src/shell/palette-keys.ts +27 -0
  837. package/packages/client/src/shell/shell.css +7 -0
  838. package/packages/contracts/schemas/module-spec.schema.json +287 -1
  839. package/packages/contracts/schemas/module.schema.json +25 -0
  840. package/packages/contracts/src/index.ts +144 -1
  841. package/packages/database/src/backup.ts +180 -0
  842. package/packages/database/src/decoders.ts +25 -0
  843. package/packages/database/src/index.ts +17 -0
  844. package/packages/database/src/migrations.ts +7 -0
  845. package/packages/database/src/record-history.ts +5 -14
  846. package/packages/harness/src/index.ts +2 -0
  847. package/packages/harness/src/runtime.ts +378 -2
  848. package/packages/harness/src/tool-adapters.ts +20 -9
  849. package/packages/kernel/src/acl.ts +179 -0
  850. package/packages/kernel/src/approval-grant.ts +310 -0
  851. package/packages/kernel/src/capability-registry.ts +69 -2
  852. package/packages/kernel/src/data-class-registry.ts +354 -0
  853. package/packages/kernel/src/index.ts +85 -4
  854. package/packages/kernel/src/keyring.ts +208 -0
  855. package/packages/kernel/src/module-compatibility.ts +35 -4
  856. package/packages/kernel/src/module-registry.ts +49 -2
  857. package/packages/kernel/src/module-settings.ts +189 -27
  858. package/packages/server/package.json +2 -1
  859. package/packages/server/src/composition.ts +38 -0
  860. package/packages/server/src/endpoint.ts +104 -47
  861. package/packages/server/src/export/csv.ts +34 -0
  862. package/packages/server/src/export/definition.ts +346 -0
  863. package/packages/server/src/export/index.ts +61 -0
  864. package/packages/server/src/export/run.ts +116 -0
  865. package/packages/server/src/index.ts +155 -0
  866. package/packages/server/src/jobs/index.ts +93 -0
  867. package/packages/server/src/jobs/runner.ts +486 -0
  868. package/packages/server/src/log.ts +291 -0
  869. package/packages/server/src/mail/config.ts +184 -0
  870. package/packages/server/src/mail/contracts.ts +251 -0
  871. package/packages/server/src/mail/index.ts +31 -0
  872. package/packages/server/src/mail/port.ts +101 -0
  873. package/packages/server/src/mail/smtp.ts +191 -0
  874. package/packages/server/src/mail/template.ts +105 -0
  875. package/packages/server/src/metrics.ts +447 -0
  876. package/packages/server/src/pagination.ts +246 -0
  877. package/packages/server/src/trace/context.ts +103 -0
  878. package/packages/server/src/trace/egress.ts +66 -0
  879. package/packages/server/src/trace/error-sink.ts +296 -0
  880. package/packages/server/src/trace/exporter.ts +295 -0
  881. package/packages/server/src/trace/index.ts +60 -0
  882. package/packages/server/src/trace/job-sink.ts +172 -0
  883. package/packages/server/src/trace/tracer.ts +338 -0
  884. package/packages/server/src/web.ts +5 -1
  885. package/packages/storage/package.json +40 -0
  886. package/packages/storage/src/config.ts +189 -0
  887. package/packages/storage/src/content-type.ts +124 -0
  888. package/packages/storage/src/contracts.ts +112 -0
  889. package/packages/storage/src/envelope.ts +238 -0
  890. package/packages/storage/src/index.ts +49 -0
  891. package/packages/storage/src/local.ts +75 -0
  892. package/packages/storage/src/port.ts +262 -0
  893. package/packages/storage/src/read-token.ts +130 -0
  894. package/packages/storage/src/reseal.ts +128 -0
  895. package/packages/storage/src/s3.ts +144 -0
  896. package/packages/storage/src/scanner.ts +22 -0
  897. package/packages/storage/src/sigv4.ts +104 -0
  898. package/packages/storage/src/store.ts +13 -0
  899. package/packages/ui/package.json +1 -0
  900. package/packages/ui/src/components/Button.tsrx +3 -0
  901. package/packages/ui/src/components/ConfirmDialog.tsrx +13 -2
  902. package/packages/ui/src/components/DateField.tsrx +92 -0
  903. package/packages/ui/src/components/DatePicker.tsrx +525 -0
  904. package/packages/ui/src/components/DateRangeField.tsrx +93 -0
  905. package/packages/ui/src/components/Drawer.tsrx +10 -1
  906. package/packages/ui/src/components/FileUpload.tsrx +158 -0
  907. package/packages/ui/src/components/Pagination.tsrx +130 -0
  908. package/packages/ui/src/components/Select.tsrx +78 -0
  909. package/packages/ui/src/components/Table.tsrx +498 -81
  910. package/packages/ui/src/components/Tabs.tsrx +53 -0
  911. package/packages/ui/src/components/ToastHost.tsrx +48 -0
  912. package/packages/ui/src/components/calendar.ts +243 -0
  913. package/packages/ui/src/components/date-field.ts +62 -0
  914. package/packages/ui/src/components/file-upload.ts +49 -0
  915. package/packages/ui/src/components/focus-trap.ts +62 -0
  916. package/packages/ui/src/components/pagination.ts +68 -0
  917. package/packages/ui/src/components/table-sorting.ts +49 -0
  918. package/packages/ui/src/components/tabs.ts +61 -0
  919. package/packages/ui/src/components/toast-store.ts +116 -0
  920. package/packages/ui/src/icons/Icon.tsrx +5 -0
  921. package/packages/ui/src/index.ts +45 -0
  922. package/packages/ui/src/styles/components.css +598 -0
  923. package/modules/automations-workflows-integration/module.json +0 -27
  924. package/modules/automations-workflows-integration/spec/module.yaml +0 -93
  925. package/modules/automations-workflows-integration/src/index.ts +0 -14
  926. package/modules/automations-workflows-integration/src/platform.ts +0 -24
  927. package/modules/automations-workflows-integration/src/server/index.ts +0 -11
  928. package/modules/automations-workflows-integration/translations/en.json +0 -21
  929. package/modules/automations-workflows-integration/translations/pl.json +0 -21
  930. package/modules/workflows/src/services/cursor-codec.ts +0 -62
@@ -0,0 +1,718 @@
1
+ schemaVersion: 2
2
+ id: notifications.core
3
+ specVersion: 0.2.8
4
+ status: approved
5
+ name: Notifications Core
6
+ description: Delivers what a person and a customer system need to hear about, as an in-app inbox per member and signed outbound webhooks per workspace with a delivery ledger, bounded retry and a dead letter an administrator can inspect and replay.
7
+ profile: full
8
+ capabilities:
9
+ - api
10
+ - database
11
+ - client
12
+ - translations
13
+ - cli
14
+ dependencies:
15
+ - id: system.core
16
+ range: ^0.7.0
17
+ - id: auth.core
18
+ range: ^0.13.0
19
+ tenancy: required
20
+ locales:
21
+ - en
22
+ - pl
23
+ invariants:
24
+ - Persistence runs on the shared asynchronous database contract with explicit PostgreSQL SQL; every tenant table enables and forces row-level security with USING and WITH CHECK policies bound to the transaction-local tenant id, and the runtime role holds neither SUPERUSER nor BYPASSRLS.
25
+ - An inbox item is owned by exactly one tenant and addressed to exactly one member account; a member reads, marks and archives only items addressed to their own account, and the tenant id and the recipient account id come from the authenticated principal, never from request input.
26
+ - Other modules create inbox items and webhook events only through the public capability notifications.publish.v1 registered by this module; a caller that finds the capability absent continues without notifying, and this module never reads another module's database.
27
+ - An outbound webhook subscription is created, changed, paused, resumed, rotated and deleted only by a principal holding notifications.webhooks.manage; every mutation checks CSRF first, and members holding only notifications.webhooks.read see subscriptions without secrets.
28
+ - The signing secret is generated by the server, stored encrypted with the module key held outside the database and rotatable through the platform keyring, and returned in full only at creation and at rotation; no read path ever returns it again.
29
+ - Every outbound request is signed the way inbound automations triggers are verified, HMAC-SHA256 over a versioned string of timestamp and body, sent in x-flowdular-signature with x-flowdular-timestamp, so a customer implements one scheme in both directions.
30
+ - A subscription URL must be https, must not resolve to a loopback, link-local, private or reserved address at save time and again at every delivery, is never followed through a redirect, receives a 10 second timeout and a 64 KB response cap, and when the platform allowlist setting is non-empty the host must be on it.
31
+ - A delivery opens its socket over node:https to one of the addresses the delivery-time check accepted, pinned to them for that one request on an agent created and destroyed with it, and the https scheme is refused again immediately before the socket; nothing between the check and the connection resolves the host name a second time, so a name answering publicly while the check runs and privately a moment later is unreachable.
32
+ - A member switches e-mail delivery on for their own account and for the whole workspace; it is off until they do, and it only decides whether an inbox item the member already receives is also sent to the address auth.core holds for them, so a kind they disabled is still not sent. The e-mail channel shares the queue, the claim, the retry budget, the backoff and the dead letter with webhooks; a dead-lettered message writes no inbox item, because that item would be mailed, fail and dead-letter again under a new source reference.
33
+ - An e-mail attempt stores the channel and the addressed member account and nothing else about the message; the address is read from auth.core and the title and body from the member's own inbox item at send time, so a changed address is honoured by the next attempt and no copy of either lives in the queue.
34
+ - Every message leaves through the platform mail port on the server context; this module never selects a transport, and a deployment that composed none records the attempt as refused instead of dropping it.
35
+ - A delivery attempt stores the outcome, the response status, the error class, the payload SHA-256 and the payload size; it never stores the payload, the signature or the secret, and the payload is regenerated from the delivery row for a replay.
36
+ - The webhook payload is a JSON object with version, event kind, tenant id, subscription id, source module, source reference, title and occurredAt; a customer fetches further details from the source module by that reference.
37
+ - The module signing key is rotated through the platform keyring with a module CLI command that re-seals stored secrets in bounded batches, idempotently, and never prints a secret.
38
+ - Delivery runs in a module-owned queue table drained by the platform job runner, which owns the pass, its bound, the isolation of one attempt from the next and the drain on stop and sends at most four attempts at a time, where the cross-tenant queue read runs on the read-only background role over the routing columns alone, and every attempt is read again, claimed and written under the tenant the row named before any request leaves; retention sweeps on a runner of its own rather than as a tail of every delivery pass.
39
+ - A failed delivery is retried with exponential backoff from one minute up to the tenant's maximum, at most the tenant's configured number of attempts, after which the delivery moves to dead letter and an inbox item of kind webhook-dead-letter is created for every member holding notifications.deliveries.read; a manual replay starts a fresh attempt sequence and never resets the ledger.
40
+ - Delivery attempts older than the tenant retention window are deleted by the poll loop in bounded batches; a member archives an inbox item and never deletes one, and an item leaves only when the workspace retention period of notifications.core.inbox passes.
41
+ - The module declares notifications.core.inbox (365 days by default) and notifications.core.deliveries (30 days by default, the retentionDays setting the poll loop already enforces) to the platform data class registry while it composes; both are exportable, both sweep in bounded batches inside this module's own tenant-scoped transaction, and preferences and webhook subscriptions are declared by neither because they are workspace configuration rather than history. The delivery sweep runs the same statement as the poll loop, so a queued or in-flight attempt is never removed by retention.
42
+ - A duplicate subscription name inside a tenant returns a stable conflict and changes nothing; input beyond the declared bounds returns 400 before any write.
43
+ - Notification events published for a source record are idempotent on the source reference, so publishing the same source reference and kind twice creates one inbox item per recipient and one webhook event per subscription.
44
+ permissions:
45
+ - id: notifications.inbox.read
46
+ description: Read the inbox items addressed to the signed-in member in the active tenant.
47
+ - id: notifications.inbox.manage
48
+ description: Mark as read and archive the member's own inbox items in the active tenant.
49
+ - id: notifications.webhooks.read
50
+ description: Read outbound webhook subscriptions of the active tenant without their secrets.
51
+ - id: notifications.webhooks.manage
52
+ description: Create, change, pause, resume, rotate and delete outbound webhook subscriptions in the active tenant.
53
+ - id: notifications.deliveries.read
54
+ description: Read delivery attempts and the dead letter of the active tenant and replay a dead-lettered delivery.
55
+ dataOwnership:
56
+ - notifications.core owns inbox items, member notification preferences, webhook subscriptions, the encrypted signing secrets, the delivery queue and the delivery attempt ledger.
57
+ - auth.core owns the e-mail address a message is sent to; this module reads it through the auth public surface while it sends and stores no copy.
58
+ - agents.core and workflows.core own the run records that produce notifications; they call notifications.publish.v1 with a source reference and never write inbox or delivery rows themselves.
59
+ - auth.core owns the member accounts a notification is addressed to; this module stores the account id and resolves display names through the auth public surface at read time.
60
+ entities:
61
+ - id: inbox
62
+ name: Inbox item
63
+ description: One notification addressed to one member of the tenant.
64
+ fields:
65
+ - id: recipientAccountId
66
+ type: string
67
+ required: true
68
+ maxLength: 128
69
+ description: The member account the item is addressed to; taken from the recipient list of the published event, never from a request.
70
+ - id: kind
71
+ type: enum
72
+ required: true
73
+ values:
74
+ - agent-run-completed
75
+ - agent-run-failed
76
+ - workflow-run-completed
77
+ - workflow-run-failed
78
+ - webhook-dead-letter
79
+ - approval-requested
80
+ - approval-decided
81
+ - meter-threshold
82
+ - id: title
83
+ type: string
84
+ required: true
85
+ maxLength: 200
86
+ - id: body
87
+ type: text
88
+ required: false
89
+ maxLength: 4000
90
+ - id: sourceModule
91
+ type: string
92
+ required: true
93
+ maxLength: 64
94
+ description: The module id that published the event.
95
+ - id: sourceRef
96
+ type: string
97
+ required: true
98
+ maxLength: 200
99
+ description: The publisher's stable reference to the record, for example the run id; unique with kind and recipient inside a tenant.
100
+ - id: status
101
+ type: enum
102
+ required: true
103
+ values:
104
+ - unread
105
+ - read
106
+ - archived
107
+ - id: readAt
108
+ type: datetime
109
+ required: false
110
+ states:
111
+ field: status
112
+ values:
113
+ - unread
114
+ - read
115
+ - archived
116
+ transitions:
117
+ - from: unread
118
+ to: read
119
+ permission: notifications.inbox.manage
120
+ - from: read
121
+ to: unread
122
+ permission: notifications.inbox.manage
123
+ - from: unread
124
+ to: archived
125
+ permission: notifications.inbox.manage
126
+ - from: read
127
+ to: archived
128
+ permission: notifications.inbox.manage
129
+ - id: preference
130
+ name: Notification preference
131
+ description: Whether a member receives inbox items of one kind; absent means enabled.
132
+ fields:
133
+ - id: recipientAccountId
134
+ type: string
135
+ required: true
136
+ maxLength: 128
137
+ - id: kind
138
+ type: enum
139
+ required: true
140
+ values:
141
+ - agent-run-completed
142
+ - agent-run-failed
143
+ - workflow-run-completed
144
+ - workflow-run-failed
145
+ - webhook-dead-letter
146
+ - approval-requested
147
+ - approval-decided
148
+ - meter-threshold
149
+ - id: enabled
150
+ type: boolean
151
+ required: true
152
+ - id: member-preference
153
+ name: Member notification settings
154
+ description: The switches a member holds for the whole workspace rather than for one kind; absent means the defaults.
155
+ fields:
156
+ - id: recipientAccountId
157
+ type: string
158
+ required: true
159
+ maxLength: 128
160
+ - id: emailDelivery
161
+ type: boolean
162
+ required: true
163
+ description: Also send every inbox item this member receives to the address auth.core holds for them; off by default.
164
+ - id: webhook-subscription
165
+ name: Webhook subscription
166
+ description: A customer endpoint that receives signed events of the selected kinds.
167
+ fields:
168
+ - id: name
169
+ type: string
170
+ required: true
171
+ unique: tenant
172
+ maxLength: 120
173
+ - id: url
174
+ type: string
175
+ required: true
176
+ maxLength: 2048
177
+ description: https only; validated against the egress policy at save time and at every delivery.
178
+ - id: events
179
+ type: json
180
+ required: true
181
+ description: Array of event kinds the endpoint subscribes to, drawn from the inbox kinds.
182
+ - id: secretFingerprint
183
+ type: string
184
+ required: true
185
+ maxLength: 32
186
+ description: Truncated SHA-256 of the current signing secret, shown to administrators so a rotation is verifiable without revealing the secret.
187
+ - id: status
188
+ type: enum
189
+ required: true
190
+ values:
191
+ - active
192
+ - paused
193
+ - disabled
194
+ - id: lastDeliveryAt
195
+ type: datetime
196
+ required: false
197
+ description: Completion time of the most recent attempt, successful or not; the deliveries screen shows the outcome.
198
+ - id: description
199
+ type: text
200
+ required: false
201
+ maxLength: 1000
202
+ states:
203
+ field: status
204
+ values:
205
+ - active
206
+ - paused
207
+ - disabled
208
+ transitions:
209
+ - from: active
210
+ to: paused
211
+ permission: notifications.webhooks.manage
212
+ - from: paused
213
+ to: active
214
+ permission: notifications.webhooks.manage
215
+ - from: active
216
+ to: disabled
217
+ permission: notifications.webhooks.manage
218
+ - from: paused
219
+ to: disabled
220
+ permission: notifications.webhooks.manage
221
+ - from: disabled
222
+ to: active
223
+ permission: notifications.webhooks.manage
224
+ - id: delivery
225
+ name: Delivery attempt
226
+ description: One attempt to deliver one event to one subscription or one member, kept for the retention window.
227
+ fields:
228
+ - id: channel
229
+ type: enum
230
+ required: true
231
+ values:
232
+ - webhook
233
+ - email
234
+ description: Where the attempt is addressed; a webhook names a subscription and an e-mail names a member.
235
+ - id: subscription
236
+ type: reference
237
+ required: false
238
+ reference: webhook-subscription
239
+ - id: recipientAccountId
240
+ type: string
241
+ required: false
242
+ maxLength: 128
243
+ description: The member an e-mail attempt is addressed to; absent on a webhook attempt.
244
+ - id: kind
245
+ type: enum
246
+ required: true
247
+ values:
248
+ - agent-run-completed
249
+ - agent-run-failed
250
+ - workflow-run-completed
251
+ - workflow-run-failed
252
+ - webhook-dead-letter
253
+ - approval-requested
254
+ - approval-decided
255
+ - meter-threshold
256
+ - id: sourceModule
257
+ type: string
258
+ required: true
259
+ maxLength: 64
260
+ - id: sourceRef
261
+ type: string
262
+ required: true
263
+ maxLength: 200
264
+ - id: title
265
+ type: string
266
+ required: true
267
+ maxLength: 200
268
+ description: The published title, carried in the payload so a customer system can show it without a second call.
269
+ - id: occurredAt
270
+ type: datetime
271
+ required: true
272
+ description: When the event was published; stable across retries and replays so the payload digest stays comparable.
273
+ - id: sequence
274
+ type: integer
275
+ required: true
276
+ description: The attempt run, 1 for the original publication and one higher for every replay; with the attempt number it makes the ledger row unique.
277
+ - id: attemptNumber
278
+ type: integer
279
+ required: true
280
+ - id: status
281
+ type: enum
282
+ required: true
283
+ values:
284
+ - pending
285
+ - succeeded
286
+ - failed
287
+ - dead-letter
288
+ - id: scheduledFor
289
+ type: datetime
290
+ required: true
291
+ - id: completedAt
292
+ type: datetime
293
+ required: false
294
+ - id: responseStatus
295
+ type: integer
296
+ required: false
297
+ - id: errorClass
298
+ type: string
299
+ required: false
300
+ maxLength: 64
301
+ description: A stable class such as timeout, dns, egress-refused, response-5xx, response-4xx; never the response body.
302
+ - id: payloadDigest
303
+ type: string
304
+ required: true
305
+ maxLength: 64
306
+ - id: payloadBytes
307
+ type: integer
308
+ required: true
309
+ states:
310
+ field: status
311
+ values:
312
+ - pending
313
+ - succeeded
314
+ - failed
315
+ - dead-letter
316
+ transitions:
317
+ - from: pending
318
+ to: succeeded
319
+ - from: pending
320
+ to: failed
321
+ - from: failed
322
+ to: pending
323
+ - from: failed
324
+ to: dead-letter
325
+ - from: dead-letter
326
+ to: pending
327
+ permission: notifications.deliveries.read
328
+ screens:
329
+ - id: inbox
330
+ kind: list
331
+ entity: inbox
332
+ title: Inbox
333
+ columns:
334
+ - status
335
+ - kind
336
+ - title
337
+ - sourceModule
338
+ - readAt
339
+ filters:
340
+ - status
341
+ - kind
342
+ navigationGroup: Workspace
343
+ - id: preferences
344
+ kind: form
345
+ entity: preference
346
+ title: Notification preferences
347
+ columns:
348
+ - kind
349
+ - enabled
350
+ navigationGroup: Workspace
351
+ - id: webhooks
352
+ kind: list
353
+ entity: webhook-subscription
354
+ title: Webhooks
355
+ columns:
356
+ - name
357
+ - url
358
+ - status
359
+ - lastDeliveryAt
360
+ - secretFingerprint
361
+ filters:
362
+ - status
363
+ navigationGroup: Administration
364
+ - id: webhook
365
+ kind: record
366
+ entity: webhook-subscription
367
+ title: Webhook
368
+ columns:
369
+ - name
370
+ - url
371
+ - events
372
+ - status
373
+ - secretFingerprint
374
+ - description
375
+ navigationGroup: Administration
376
+ - id: deliveries
377
+ kind: list
378
+ entity: delivery
379
+ title: Deliveries
380
+ columns:
381
+ - subscription
382
+ - kind
383
+ - sourceRef
384
+ - attemptNumber
385
+ - status
386
+ - scheduledFor
387
+ - completedAt
388
+ - responseStatus
389
+ - errorClass
390
+ filters:
391
+ - status
392
+ - subscription
393
+ navigationGroup: Administration
394
+ actions:
395
+ - id: mark-read
396
+ entity: inbox
397
+ permission: notifications.inbox.manage
398
+ kind: update
399
+ risk: workspace-write
400
+ idempotent: true
401
+ description: Set the member's own item to read and stamp readAt; repeating it changes nothing.
402
+ - id: mark-unread
403
+ entity: inbox
404
+ permission: notifications.inbox.manage
405
+ kind: update
406
+ risk: workspace-write
407
+ idempotent: true
408
+ description: Return the member's own item to unread and clear readAt.
409
+ - id: archive-item
410
+ entity: inbox
411
+ permission: notifications.inbox.manage
412
+ kind: update
413
+ risk: workspace-write
414
+ idempotent: true
415
+ description: Archive the member's own item; archived items leave the default inbox list.
416
+ - id: transition-many
417
+ entity: inbox
418
+ permission: notifications.inbox.manage
419
+ kind: update
420
+ risk: workspace-write
421
+ idempotent: true
422
+ description: Mark read or archive the items the inbox screen selected, between 1 and 100 unique ids, each through the single transition path scoped to the member, answering one outcome per id (updated, not-found, or refused for an archived item) and never failing the whole call for an item that is missing or another member's.
423
+ - id: save-preference
424
+ entity: preference
425
+ permission: notifications.inbox.manage
426
+ kind: update
427
+ risk: workspace-write
428
+ idempotent: true
429
+ description: Enable or disable one kind for the member's own account; the row is created on first save.
430
+ - id: save-email-delivery
431
+ entity: member-preference
432
+ permission: notifications.inbox.manage
433
+ kind: update
434
+ risk: workspace-write
435
+ idempotent: true
436
+ description: Turn e-mail delivery on or off for the member's own account; the row is created on first save.
437
+ - id: create-subscription
438
+ entity: webhook-subscription
439
+ permission: notifications.webhooks.manage
440
+ kind: create
441
+ risk: workspace-write
442
+ idempotent: false
443
+ description: Create an active subscription, generate the secret server-side, validate the URL against the egress policy and return the secret once.
444
+ - id: update-subscription
445
+ entity: webhook-subscription
446
+ permission: notifications.webhooks.manage
447
+ kind: update
448
+ risk: workspace-write
449
+ idempotent: true
450
+ description: Change name, url, events or description; a changed URL is validated again.
451
+ - id: pause-subscription
452
+ entity: webhook-subscription
453
+ permission: notifications.webhooks.manage
454
+ kind: custom
455
+ risk: workspace-write
456
+ idempotent: true
457
+ description: Move the subscription to paused; pending deliveries wait and are not counted as attempts.
458
+ - id: resume-subscription
459
+ entity: webhook-subscription
460
+ permission: notifications.webhooks.manage
461
+ kind: custom
462
+ risk: workspace-write
463
+ idempotent: true
464
+ description: Move a paused or disabled subscription back to active.
465
+ - id: disable-subscription
466
+ entity: webhook-subscription
467
+ permission: notifications.webhooks.manage
468
+ kind: custom
469
+ risk: workspace-write
470
+ idempotent: true
471
+ description: Move an active or paused subscription to disabled; its pending deliveries are dropped and it can be deleted or re-enabled later.
472
+ - id: rotate-secret
473
+ entity: webhook-subscription
474
+ permission: notifications.webhooks.manage
475
+ kind: custom
476
+ risk: workspace-write
477
+ idempotent: false
478
+ description: Generate a new secret, update the fingerprint and return the new secret once; deliveries already signed with the old secret are not re-signed.
479
+ - id: delete-subscription
480
+ entity: webhook-subscription
481
+ permission: notifications.webhooks.manage
482
+ kind: delete
483
+ risk: destructive
484
+ idempotent: true
485
+ description: Delete a disabled subscription and its pending deliveries; the attempt ledger stays until retention removes it.
486
+ - id: replay-delivery
487
+ entity: delivery
488
+ permission: notifications.deliveries.read
489
+ kind: custom
490
+ risk: workspace-write
491
+ idempotent: false
492
+ description: Queue a fresh attempt for a dead-lettered delivery from its regenerated payload.
493
+ widgets:
494
+ - id: unread-count
495
+ slot: topbar.actions
496
+ entity: inbox
497
+ description: The number of unread inbox items of the signed-in member with a link to the inbox; hidden at zero.
498
+ settings:
499
+ - key: retentionDays
500
+ type: integer
501
+ scope: tenant
502
+ default: 30
503
+ description: Days a delivery attempt is kept before the poll loop deletes it; 1 to 365.
504
+ - key: retryMaxAttempts
505
+ type: integer
506
+ scope: tenant
507
+ default: 8
508
+ description: Attempts before a delivery moves to dead letter; 1 to 20.
509
+ - key: retryMaxBackoffMinutes
510
+ type: integer
511
+ scope: tenant
512
+ default: 360
513
+ description: Upper bound of the exponential backoff between attempts; 1 to 1440.
514
+ - key: egressAllowlist
515
+ type: string
516
+ scope: platform
517
+ default: ''
518
+ description: Comma-separated host names a subscription URL may use; empty means any public host that passes the private-range block.
519
+ - key: pollIntervalSeconds
520
+ type: integer
521
+ scope: platform
522
+ default: 15
523
+ description: How often the delivery loop looks for due attempts; 5 to 300.
524
+ agentTools: []
525
+ outOfScope:
526
+ - Per-kind e-mail preferences are not offered; e-mail delivery is one switch per member over the kinds they already receive.
527
+ - A digest is not offered; one inbox item is one message.
528
+ - Notification sources other than agent runs, workflow runs and dead letters are deferred; auth.core membership events arrive through a later edit of that module's specification.
529
+ - There is no event bus; publishers call notifications.publish.v1 synchronously inside their own request or worker and tolerate its absence.
530
+ - Full-text search of the inbox is not available; the inbox filters by status and kind only.
531
+ - Stored request payloads are not kept; an administrator inspects the digest and size and replays from the regenerated payload.
532
+ - Cron expressions and time zones do not apply; the delivery loop runs on a fixed platform interval.
533
+ decisions:
534
+ - id: D-SCOPE-V1
535
+ question: What is in the first version of notifications.core?
536
+ answer: The in-app inbox with preferences and outbound webhooks with a signed delivery ledger, retry and dead letter, in one specification.
537
+ decidedBy: user
538
+ - id: D-WEBHOOK-PERMISSIONS
539
+ question: Who manages outbound webhook subscriptions?
540
+ answer: Owners hold notifications.webhooks.manage and notifications.deliveries.read; members hold notifications.webhooks.read; every member holds both inbox permissions.
541
+ decidedBy: user
542
+ - id: D-RETENTION
543
+ question: How long are delivery attempts kept and is the payload stored?
544
+ answer: 30 days by default as a tenant setting; only the payload SHA-256 and size are stored, never the body.
545
+ decidedBy: user
546
+ - id: D-RETRY
547
+ question: What is the retry and dead letter policy?
548
+ answer: Up to 8 attempts with exponential backoff from 1 minute to 6 hours, then dead letter with manual replay; both bounds are tenant settings.
549
+ decidedBy: user
550
+ - id: D-SOURCES
551
+ question: Which events produce notifications in v1?
552
+ answer: Agent run completed and failed, workflow run completed and failed, and webhook dead letter; other modules publish through notifications.publish.v1 later.
553
+ decidedBy: user
554
+ - id: D-KINDS-METERING
555
+ question: Which kind does metering.core publish?
556
+ answer: meter-threshold to the workspace owners at the warning and the exhausted threshold, added in 0.1.3.
557
+ decidedBy: default
558
+ - id: D-KINDS-APPROVALS
559
+ question: Which kinds does approvals.core publish?
560
+ answer: approval-requested to eligible deciders and approval-decided to the requester, added in 0.1.2 as the first extension of the kind list.
561
+ decidedBy: default
562
+ - id: D-EGRESS
563
+ question: What egress policy applies to outbound webhooks?
564
+ answer: https only, private, loopback and link-local ranges blocked at save and at delivery, no redirects, 10 second timeout, 64 KB response cap, optional platform host allowlist.
565
+ decidedBy: user
566
+ - id: D-EMAIL
567
+ question: Does this module deliver notifications by e-mail?
568
+ answer: Yes since 0.2.0, through the platform mail port on the server context, as one switch per member over the kinds they already receive; RFC 0004 H1 made the port platform-level and this module its second sender.
569
+ decidedBy: user
570
+ - id: D-EMAIL-DEAD-LETTER
571
+ question: What does a dead-lettered e-mail produce?
572
+ answer: A ledger row and nothing else; an inbox item for it would be mailed, fail and dead-letter again under a new source reference.
573
+ decidedBy: default
574
+ - id: D-ACTORS
575
+ question: Which roles hold which permissions by default?
576
+ answer: Owner manages webhooks and reads deliveries; member reads webhooks and manages only their own inbox.
577
+ decidedBy: default
578
+ - id: D-INBOX-OWNERSHIP
579
+ question: How is a member limited to their own inbox?
580
+ answer: Every inbox read and mutation filters by the principal's account id inside the tenant transaction; there is no endpoint that lists another member's items.
581
+ decidedBy: default
582
+ - id: D-UNIQUE-NAME
583
+ question: Which field is unique inside a tenant?
584
+ answer: The subscription name; a duplicate returns a stable conflict.
585
+ decidedBy: default
586
+ - id: D-STATES
587
+ question: Which lifecycles exist?
588
+ answer: Inbox items unread, read, archived; subscriptions active, paused, disabled; deliveries pending, succeeded, failed, dead-letter, with the transitions listed on each entity.
589
+ decidedBy: default
590
+ - id: D-SECRET-STORAGE
591
+ question: How is the signing secret stored?
592
+ answer: Encrypted with a module key held outside the database and rotatable through the platform keyring, exactly like automations.core trigger secrets; shown in full only at creation and rotation.
593
+ decidedBy: default
594
+ - id: D-SIGNING
595
+ question: How are outbound requests signed?
596
+ answer: The inbound automations scheme is reused, HMAC-SHA256 over a versioned timestamp and body string in x-flowdular-signature with x-flowdular-timestamp.
597
+ decidedBy: default
598
+ - id: D-QUEUE
599
+ question: How are deliveries executed?
600
+ answer: A module-owned queue table drained by one poll loop with the automations.core lease discipline; no platform job primitive yet.
601
+ decidedBy: default
602
+ - id: D-IDEMPOTENT-PUBLISH
603
+ question: What happens when the same event is published twice?
604
+ answer: The source reference and kind are unique per recipient and per subscription inside a tenant, so a repeat creates nothing.
605
+ decidedBy: default
606
+ - id: D-SCREENS
607
+ question: Which screens exist?
608
+ answer: Inbox list and preferences form under Workspace; webhooks list, webhook record and deliveries list under Administration.
609
+ decidedBy: default
610
+ - id: D-WIDGET
611
+ question: Is there a dashboard or topbar widget?
612
+ answer: One topbar.actions widget with the unread count, hidden at zero; no dashboard tile.
613
+ decidedBy: default
614
+ - id: D-SETTINGS
615
+ question: Which settings exist?
616
+ answer: Tenant retentionDays 30, retryMaxAttempts 8, retryMaxBackoffMinutes 360; platform egressAllowlist empty and pollIntervalSeconds 15.
617
+ decidedBy: default
618
+ - id: D-DISABLE
619
+ question: How does a subscription reach the disabled state the delete action requires?
620
+ answer: Through an explicit disable action behind the manage permission that drops pending deliveries; resume re-enables it.
621
+ decidedBy: default
622
+ - id: D-PAYLOAD
623
+ question: What does the webhook payload carry, given that bodies are not stored?
624
+ answer: Version, kind, tenant id, subscription id, source module, source reference, title and occurredAt, all regenerable from the delivery row; details come from the source module.
625
+ decidedBy: default
626
+ - id: D-SECRET-ROTATION-CLI
627
+ question: How is the module signing key rotated?
628
+ answer: A notifications secrets-rotate CLI command over the platform keyring, mirroring automations.core.
629
+ decidedBy: default
630
+ - id: D-TOOLS
631
+ question: Are there agent tools?
632
+ answer: None in v1; a later phase may add a read tool over the member's inbox.
633
+ decidedBy: default
634
+ acceptanceScenarios:
635
+ - id: NOTIFICATIONS-PUBLISH
636
+ given: agents.core publishes an agent-run-failed event through notifications.publish.v1 with a source reference and the run's configuring member as recipient.
637
+ when: The capability is invoked.
638
+ then: One unread inbox item addressed to that member exists in the run's tenant, and one pending delivery exists for every active subscription of that tenant that lists the kind.
639
+ - id: NOTIFICATIONS-PUBLISH-REPEAT
640
+ given: An event with the same source reference and kind was already published in the tenant.
641
+ when: It is published again.
642
+ then: No second inbox item or delivery is created and the capability returns the original identifiers.
643
+ - id: NOTIFICATIONS-INBOX-OWN
644
+ given: Two members of one tenant each have inbox items.
645
+ when: A member lists, marks or archives inbox items.
646
+ then: Only items addressed to that member's account are returned or changed, and an item id of the other member answers as not found. The inbox screen lists at most 200 items per request (50 by default) sorted by createdAt in either direction, open items unless a status is chosen, and continues through an opaque cursor bound to the tenant, the member, the sort, the direction and the filters, which is refused when any of them differ.
647
+ - id: NOTIFICATIONS-INBOX-MANY
648
+ given: A member holding notifications.inbox.manage selects several of their own inbox items, and the request also names an id that does not exist, one addressed to another member of the same workspace, one that belongs to another tenant and one of their own items that is already archived.
649
+ when: The member marks them read or archives them in one call naming the selected ids.
650
+ then: A list of no ids, of more than 100, one repeating an id or an unknown transition is refused with INVALID_INPUT before any row is touched; otherwise each of the member's own open items changes through the single transition path, the missing, the other member's and the other tenant's id are answered not-found with those rows unchanged, the archived item is answered refused with INBOX_TRANSITION_INVALID for either change, the screen offers mark-read for unread rows and archive for open rows only, the response carries one outcome per id in the order sent, the unread count reflects the change, and a call without the permission or the CSRF proof is refused first.
651
+ - id: NOTIFICATIONS-INBOX-PREFERENCE
652
+ given: A member disabled the kind agent-run-completed.
653
+ when: An event of that kind is published with that member as recipient.
654
+ then: No inbox item is created for that member, while webhook deliveries are unaffected.
655
+ - id: NOTIFICATIONS-EMAIL-CHANNEL
656
+ given: A member turned e-mail delivery on and another member of the same workspace did not.
657
+ when: An event addressed to both is published and the delivery loop runs.
658
+ then: Exactly one message is sent, to the address auth.core holds for the member who asked, carrying the item's title and body with the HTML part escaped; the attempt is recorded as succeeded with a payload digest and size and no copy of the message or the address, the other member receives only the inbox item, and publishing the same event again sends nothing further.
659
+ - id: NOTIFICATIONS-EMAIL-REFUSED
660
+ given: A member asked for e-mail and the deployment composed no transport, the relay fails, or the port's gate rejects the message itself.
661
+ when: The delivery loop runs.
662
+ then: A missing transport and a relay failure are recorded with their class and retried with the same backoff a webhook gets until the attempts are exhausted; a message the gate rejects is recorded once and reaches the dead letter on that first attempt because a retry cannot change it; in every case the delivery ends in the dead letter and no inbox item is created for the failure.
663
+ - id: NOTIFICATIONS-WEBHOOK-CREATE
664
+ given: A principal holding notifications.webhooks.manage supplies a unique name, an https URL to a public host and a non-empty list of kinds.
665
+ when: The subscription is created.
666
+ then: An active subscription is persisted, the secret is returned once in the response, and only its fingerprint is readable afterwards.
667
+ - id: NOTIFICATIONS-WEBHOOK-DUPLICATE
668
+ given: A subscription already uses a name in the active tenant.
669
+ when: Another subscription is created with the same normalized name.
670
+ then: The server returns a stable conflict and leaves existing data unchanged.
671
+ - id: NOTIFICATIONS-EGRESS
672
+ given: A principal supplies a URL with an http scheme, a loopback, private or link-local address, a host that resolves to one, or a host outside a non-empty platform allowlist.
673
+ when: The subscription is created or updated.
674
+ then: The server refuses with a stable egress error before any write, and a host that starts resolving to a private address after creation makes every delivery fail with errorClass egress-refused.
675
+ - id: NOTIFICATIONS-DELIVERY-SIGNED
676
+ given: An active subscription lists the kind of a published event.
677
+ when: The poll loop delivers the attempt.
678
+ then: The request carries x-flowdular-timestamp and an x-flowdular-signature the customer verifies with the shared scheme, follows no redirect, aborts after 10 seconds, reads at most 64 KB, and the attempt records the response status, the payload digest and size and no payload.
679
+ - id: NOTIFICATIONS-RETRY-DEADLETTER
680
+ given: A subscription endpoint answers 503 on every attempt.
681
+ when: The configured maximum number of attempts is exhausted.
682
+ then: Each attempt was scheduled with growing backoff bounded by the tenant setting, the delivery is in dead-letter, and members holding notifications.deliveries.read receive a webhook-dead-letter inbox item.
683
+ - id: NOTIFICATIONS-REPLAY
684
+ given: A delivery is in dead-letter.
685
+ when: A principal holding notifications.deliveries.read replays it.
686
+ then: A new pending attempt is queued from the regenerated payload, the earlier attempts remain in the ledger, and a principal without the permission is refused.
687
+ - id: NOTIFICATIONS-PAUSE
688
+ given: A subscription is paused.
689
+ when: Events are published and the poll loop runs.
690
+ then: Deliveries stay pending without counting attempts until the subscription is resumed.
691
+ - id: NOTIFICATIONS-DISABLE-DELETE
692
+ given: An active subscription has pending deliveries.
693
+ when: A principal holding notifications.webhooks.manage disables it and then deletes it.
694
+ then: The pending deliveries are dropped, the subscription is deleted, and the attempt ledger remains until retention removes it; deleting an active or paused subscription is refused with a stable error.
695
+ - id: NOTIFICATIONS-ROTATE
696
+ given: A subscription has a secret.
697
+ when: A principal holding notifications.webhooks.manage rotates it.
698
+ then: A new secret is returned once, the fingerprint changes, and later deliveries are signed with the new secret.
699
+ - id: NOTIFICATIONS-RETENTION
700
+ given: Delivery attempts older than the tenant retention window exist.
701
+ when: The poll loop runs.
702
+ then: Those attempts are deleted in bounded batches and newer attempts and all inbox items remain.
703
+ - id: NOTIFICATIONS-LIST-PAGES
704
+ given: A workspace holds more subscriptions and delivery attempts than one page.
705
+ when: An administrator opens the webhooks or the deliveries screen and walks its pages.
706
+ then: The webhooks screen lists at most 200 subscriptions per request (50 by default) sorted by name in either direction with the status and search filters applied by the server, the deliveries screen lists at most 200 attempts per request (50 by default) sorted by scheduledFor in either direction with the status, subscription and search filters applied by the server, and each screen continues through an opaque cursor bound to the tenant, the sort, the direction and the filters, which is refused when any of them differ.
707
+ - id: NOTIFICATIONS-DENY
708
+ given: A principal is unauthenticated or lacks the required permission.
709
+ when: The principal reads or mutates inbox items, subscriptions or deliveries.
710
+ then: The server denies the operation before repository access, and a mutation without a CSRF proof is refused first.
711
+ - id: NOTIFICATIONS-DATA-CLASSES
712
+ given: Two tenants hold inbox items and delivery attempts of several ages, one attempt still queued.
713
+ when: The platform sweeps and exports the declared classes for one of them.
714
+ then: The sweep removes only that tenant's rows strictly older than the cutoff and at most the batch it was given, the queued attempt stays, and the export streams that tenant's rows alone through the sink in keyset pages with the oldest and newest record time, answering no rows and no range for a workspace that holds none.
715
+ - id: NOTIFICATIONS-TENANT-BOUNDARY
716
+ given: Two tenants own inbox items, subscriptions and deliveries.
717
+ when: A runtime transaction bound to one tenant reads or writes any of them, or the cross-tenant poll routes work.
718
+ then: Only that tenant's rows are visible or mutable, the poll sees routing columns alone on the read-only role, and a row carrying another tenant identifier is rejected by the forced policy.