@classytic/arc 2.52.0 → 2.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/README.md +2 -1
  2. package/dist/{EventTransport-DeNze_-C.mjs → EventTransport-B3jTKMQH.mjs} +2 -2
  3. package/dist/{HookSystem-DTffXM1X.mjs → HookSystem-DNwxV463.mjs} +2 -2
  4. package/dist/{ResourceRegistry-tlqXSZoK.mjs → ResourceRegistry-Ck7RFodL.mjs} +2 -2
  5. package/dist/{acquire-7JKEkKnN.mjs → acquire-DkLruwhL.mjs} +1 -1
  6. package/dist/audit/index.d.mts +1 -1
  7. package/dist/audit/index.mjs +4 -4
  8. package/dist/auth/audit.mjs +1 -1
  9. package/dist/auth/index.d.mts +1 -1
  10. package/dist/auth/index.mjs +7 -7
  11. package/dist/auth/redis-session.mjs +1 -1
  12. package/dist/auth/social/index.mjs +1 -1
  13. package/dist/{authorizationDecision-DKmH4tZ-.mjs → authorizationDecision-gB5-bHDp.mjs} +5 -5
  14. package/dist/bootError-BT3z3cvX.mjs +38 -0
  15. package/dist/{boundedMap-zxGBpXX0.mjs → boundedMap-Ddw2yGb2.mjs} +1 -1
  16. package/dist/{buildHandler-ZDV6LRZ_.mjs → buildHandler-B8IDGmhD.mjs} +5 -5
  17. package/dist/cache/index.mjs +4 -4
  18. package/dist/{caching-DceUN9Xk.mjs → caching-BitJDAY0.mjs} +2 -2
  19. package/dist/{claimed-DsP5Hi_f.mjs → claimed-CM_-lFHX.mjs} +1 -1
  20. package/dist/cleanup/index.d.mts +2 -2
  21. package/dist/cleanup/index.mjs +4 -4
  22. package/dist/cli/commands/describe.d.mts +18 -1
  23. package/dist/cli/commands/describe.mjs +39 -7
  24. package/dist/cli/commands/docs.mjs +3 -3
  25. package/dist/cli/commands/doctor.d.mts +3 -1
  26. package/dist/cli/commands/doctor.mjs +135 -22
  27. package/dist/cli/commands/generate.mjs +2 -2
  28. package/dist/cli/commands/init.mjs +2 -2
  29. package/dist/cli/commands/introspect.mjs +2 -2
  30. package/dist/cli/index.mjs +3 -3
  31. package/dist/{constants-Ca2IQFy2.mjs → constants-D9EiaO5s.mjs} +1 -1
  32. package/dist/context/index.d.mts +5 -2
  33. package/dist/context/index.mjs +5 -5
  34. package/dist/core/index.d.mts +2 -2
  35. package/dist/core/index.mjs +7 -7
  36. package/dist/{core-M18RhMqi.mjs → core-B_06Fcn0.mjs} +3 -3
  37. package/dist/{createActionRouter-zXlrwWVs.mjs → createActionRouter-DtxUXOCI.mjs} +5 -5
  38. package/dist/{createAggregationRouter-CN0Da9nC.mjs → createAggregationRouter-BMiKyDoW.mjs} +7 -7
  39. package/dist/{createApp-BC67ACu4.mjs → createApp-CEdGZtkP.mjs} +207 -44
  40. package/dist/{createMcpServer-CS2KOVP6.d.mts → createMcpServer-Bk3ls5jS.d.mts} +1 -1
  41. package/dist/{defineAggregation-DqAGb5oI.mjs → defineAggregation-DUsrGcsm.mjs} +1 -1
  42. package/dist/{defineResource-DC5UqkQv.mjs → defineResource-q8TsJpOm.mjs} +92 -36
  43. package/dist/deprecation-DX625dth.mjs +27 -0
  44. package/dist/discovery/index.mjs +1 -1
  45. package/dist/docs/index.d.mts +1 -1
  46. package/dist/docs/index.mjs +3 -3
  47. package/dist/{elevation-DiXVg98q.mjs → elevation-NJ3908pJ.mjs} +5 -5
  48. package/dist/encryption/index.mjs +3 -3
  49. package/dist/{errorHandler-BUTm9P_f.mjs → errorHandler-Ke6PGvF7.mjs} +7 -4
  50. package/dist/{errors-DxpHZBlW.mjs → errors-Ukhmfmmx.mjs} +1 -1
  51. package/dist/{eventPlugin-BY38F6yK.d.mts → eventPlugin-BeJasppx.d.mts} +7 -18
  52. package/dist/{eventPlugin-ZsIQPRso.mjs → eventPlugin-DTKAgSvb.mjs} +10 -8
  53. package/dist/{eventTypes-D-pFtqT1.mjs → eventTypes-DpDQtyR6.mjs} +2 -2
  54. package/dist/events/index.d.mts +2 -2
  55. package/dist/events/index.mjs +8 -8
  56. package/dist/events/transports/redis-stream-entry.mjs +4 -4
  57. package/dist/events/transports/redis.mjs +2 -2
  58. package/dist/factory/index.d.mts +28 -5
  59. package/dist/factory/index.mjs +12 -7
  60. package/dist/{fastify-augmentation-CPReFhZ1.d.mts → fastify-augmentation-DjxuSRG4.d.mts} +4 -3
  61. package/dist/{fieldTypes-f-3TZgR3.mjs → fieldTypes-BtFpQO6I.mjs} +2 -2
  62. package/dist/{fields-kCbIDTjA.mjs → fields-B7fuROWK.mjs} +1 -1
  63. package/dist/{filter-merge-UJCgjbZR.mjs → filter-merge-BuzZ-r9z.mjs} +1 -1
  64. package/dist/{generate-CLpmzbJ_.mjs → generate-c4F39pk1.mjs} +4 -4
  65. package/dist/{headers-Bh47h0XH.mjs → headers-Ib7BDgRI.mjs} +2 -2
  66. package/dist/{health-CEpgVAl7.mjs → health-22T82HAa.mjs} +1 -1
  67. package/dist/health-skjSwNaC.d.mts +36 -0
  68. package/dist/hooks/index.d.mts +1 -1
  69. package/dist/hooks/index.mjs +2 -2
  70. package/dist/http-cache/index.mjs +4 -4
  71. package/dist/http-cache/purgers/cloudflare.mjs +2 -2
  72. package/dist/http-cache/purgers/fastly.mjs +2 -2
  73. package/dist/http-cache/testing/index.mjs +1 -1
  74. package/dist/idempotency/index.d.mts +7 -1
  75. package/dist/idempotency/index.mjs +9 -7
  76. package/dist/idempotency/redis.mjs +2 -2
  77. package/dist/{index-CMNpMBtW.d.mts → index-BzUyno-u.d.mts} +14 -5
  78. package/dist/{index-yXXCsKl7.d.mts → index-CXqYFGoH.d.mts} +13 -4
  79. package/dist/{index-CSbDhif4.d.mts → index-CaBFPmnu.d.mts} +10 -6
  80. package/dist/{index-DCH08eqQ.d.mts → index-DWn0o4U7.d.mts} +2 -2
  81. package/dist/{index-DLCcLUQT.d.mts → index-DtHACefu.d.mts} +109 -116
  82. package/dist/index.d.mts +5 -5
  83. package/dist/index.mjs +12 -12
  84. package/dist/{init-B43DXBpc.mjs → init-XY5slyuS.mjs} +3 -3
  85. package/dist/integrations/event-gateway.mjs +2 -2
  86. package/dist/integrations/index.d.mts +1 -1
  87. package/dist/integrations/index.mjs +1 -1
  88. package/dist/integrations/jobs/index.mjs +3 -3
  89. package/dist/integrations/mcp/index.d.mts +9 -4
  90. package/dist/integrations/mcp/index.mjs +2 -2
  91. package/dist/integrations/mcp/testing.d.mts +2 -2
  92. package/dist/integrations/mcp/testing.mjs +2 -2
  93. package/dist/integrations/streamline.mjs +3 -3
  94. package/dist/integrations/webhooks.d.mts +1 -1
  95. package/dist/integrations/webhooks.mjs +4 -4
  96. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  97. package/dist/integrations/websocket-redis.mjs +1 -1
  98. package/dist/integrations/websocket.mjs +2 -2
  99. package/dist/invariants-COekUeoh.mjs +120 -0
  100. package/dist/{jsonBody-CkKs6dA_.mjs → jsonBody-BNlcGUnb.mjs} +2 -2
  101. package/dist/{keys-DHrHnT0f.mjs → keys-DwvXJwUX.mjs} +1 -1
  102. package/dist/{loadResources-CFdzAWQZ.mjs → loadResources-izEeQLO_.mjs} +3 -3
  103. package/dist/{loadResourcesFromEntry-DkoSiJsI.mjs → loadResourcesFromEntry-CijqjbHE.mjs} +2 -2
  104. package/dist/logger/index.mjs +2 -2
  105. package/dist/{logger-DJwz_-Pl.mjs → logger-DdMS0XC_.mjs} +1 -1
  106. package/dist/{mcpPlugin-CA_MDFlS.mjs → mcpPlugin-D0tSZqKk.mjs} +24 -22
  107. package/dist/{memory-B9CFHbA_.mjs → memory-Ay0haw9n.mjs} +3 -3
  108. package/dist/{metrics-DSKv-T9K.mjs → metrics-Bpgf4UL6.mjs} +3 -3
  109. package/dist/middleware/index.d.mts +1 -1
  110. package/dist/middleware/index.mjs +3 -3
  111. package/dist/migrations/index.mjs +2 -2
  112. package/dist/{module-C0JCsnO7.mjs → module-BLrTmMyk.mjs} +1 -1
  113. package/dist/{multiTenant-QtDzxx_K.d.mts → multiTenant-Cf0Ye-Wu.d.mts} +1 -1
  114. package/dist/{multipartBody-Bxz-q6hI.mjs → multipartBody-L2gr96df.mjs} +1 -1
  115. package/dist/{observeSend-DfNkdGww.mjs → observeSend-B7FEdk_g.mjs} +1 -1
  116. package/dist/{openapi-Dmp7Ipsi.mjs → openapi-COrL_33P.mjs} +6 -6
  117. package/dist/outbox-admin/index.d.mts +1 -1
  118. package/dist/outbox-admin/index.mjs +6 -6
  119. package/dist/{outbox-module-vT6PaThj.mjs → outbox-module-BY2HtnjU.mjs} +7 -7
  120. package/dist/{outbox-module-DzW6zwWJ.d.mts → outbox-module-C1QWMloZ.d.mts} +5 -8
  121. package/dist/permissions/index.d.mts +2 -2
  122. package/dist/permissions/index.mjs +8 -8
  123. package/dist/{permissions-Cga6KBOX.mjs → permissions-CEyeDHtT.mjs} +36 -17
  124. package/dist/{pipe-CqPweKdL.mjs → pipe-DIAr91at.mjs} +2 -2
  125. package/dist/pipeline/index.d.mts +1 -1
  126. package/dist/pipeline/index.mjs +2 -2
  127. package/dist/{plan-CbDTFbTj.mjs → plan-BhKHIkFl.mjs} +75 -20
  128. package/dist/{plugin-8Z1khbAI.mjs → plugin-D6hrdx-j.mjs} +72 -38
  129. package/dist/plugins/index.d.mts +4 -3
  130. package/dist/plugins/index.mjs +18 -18
  131. package/dist/plugins/response-cache.mjs +4 -4
  132. package/dist/plugins/tracing-entry.mjs +177 -85
  133. package/dist/{pluralize-D4vcPLVs.mjs → pluralize-CJKgYkVc.mjs} +1 -1
  134. package/dist/presetPermission-2pcRVYRG.mjs +23 -0
  135. package/dist/presets/filesUpload.d.mts +4 -2
  136. package/dist/presets/filesUpload.mjs +11 -6
  137. package/dist/presets/index.d.mts +6 -4
  138. package/dist/presets/index.mjs +2 -2
  139. package/dist/presets/multiTenant.d.mts +1 -1
  140. package/dist/presets/multiTenant.mjs +5 -5
  141. package/dist/presets/search.d.mts +2 -2
  142. package/dist/presets/search.mjs +54 -38
  143. package/dist/{presets-D28IABZe.mjs → presets-st11ePNn.mjs} +150 -41
  144. package/dist/{projection-aHCtDQQ9.mjs → projection-B4rqiJTi.mjs} +2 -2
  145. package/dist/{purger.types-CNFmEtFu.mjs → purger.types-BcHeAhY_.mjs} +1 -1
  146. package/dist/{queryCachePlugin-CwpEjCwz.mjs → queryCachePlugin-BgSc2bga.mjs} +6 -6
  147. package/dist/rateLimitKey-DLGdeFd2.mjs +138 -0
  148. package/dist/{realtime-Dvu8ES2z.mjs → realtime-CpYpIFsm.mjs} +11 -11
  149. package/dist/registry/index.d.mts +2 -2
  150. package/dist/registry/index.mjs +3 -3
  151. package/dist/{registry-DmxbzW7-.mjs → registry-BQsdAlZ_.mjs} +2 -2
  152. package/dist/{relay-CEaCmUfG.mjs → relay-CmT3gtkP.mjs} +11 -12
  153. package/dist/{renewingLease-g2FjB3im.mjs → renewingLease-DaoP0K-e.mjs} +1 -1
  154. package/dist/{replyHelpers-CSByAX_Z.mjs → replyHelpers-SiLr1wK4.mjs} +2 -2
  155. package/dist/{requestContext-yc7MSgmq.mjs → requestContext-B-TjFpWt.mjs} +8 -3
  156. package/dist/{health-W4S2yFBL.mjs → requestId-ClcKoWLq.mjs} +154 -116
  157. package/dist/{requirement-Dm8njSoC.mjs → requirement-BygDzjDS.mjs} +1 -1
  158. package/dist/{resourceRateLimit-PQaY3HW1.mjs → resourceRateLimit-DdIYis3m.mjs} +2 -2
  159. package/dist/{rolldown-runtime-BBBkGgwA.mjs → rolldown-runtime-Cy6j0m8_.mjs} +1 -1
  160. package/dist/{routeValidator-fuG51bQA.mjs → routeValidator-Bn-x2gaJ.mjs} +1 -1
  161. package/dist/{runtimeCapabilities-B8IT7xiQ.mjs → runtimeCapabilities-DY20Pibh.mjs} +7 -2
  162. package/dist/{schedules-0-aS4jDV.mjs → schedules-CwqC0Mp0.mjs} +5 -5
  163. package/dist/{schemaConverter-Cs3SwP4R.mjs → schemaConverter-XoLKVpzG.mjs} +2 -2
  164. package/dist/{schemaIR-By8XiNeE.mjs → schemaIR-DP7mMj7c.mjs} +16 -16
  165. package/dist/schemas/index.mjs +1 -1
  166. package/dist/scim/index.mjs +2 -2
  167. package/dist/scope/index.d.mts +6 -2
  168. package/dist/scope/index.mjs +5 -5
  169. package/dist/{scope-BWNAlBj0.mjs → scope-B0vgM2Zw.mjs} +4 -4
  170. package/dist/{shutdown-Cf-27xsS.mjs → shutdown-C76Hn-Th.mjs} +1 -1
  171. package/dist/{simpleEqualityMatcher-e-dgJcUO.mjs → simpleEqualityMatcher-Qbl-11cE.mjs} +1 -1
  172. package/dist/{sse-C3bj5qWi.mjs → sse-eyb8lNuI.mjs} +7 -7
  173. package/dist/{sseStream-BYZbpFDa.mjs → sseStream-BsBesrfw.mjs} +2 -2
  174. package/dist/{store-helpers-B9HierHY.mjs → store-helpers-D1yIVa91.mjs} +1 -1
  175. package/dist/{streaming-EN8NJWxr.mjs → streaming-DKziqs1Z.mjs} +1 -1
  176. package/dist/{subscriberIdentity-DSqCh38x.mjs → subscriberIdentity-DpdSQMQq.mjs} +1 -1
  177. package/dist/{tenancy-CAqjGQcQ.mjs → tenancy-YuRYsOPr.mjs} +2 -2
  178. package/dist/{tenantPreparation-CVBWarqs.mjs → tenantPreparation-Bk8ouRB3.mjs} +17 -5
  179. package/dist/testing/cleanupStoreContract.mjs +1 -1
  180. package/dist/testing/index.d.mts +4 -4
  181. package/dist/testing/index.mjs +11 -11
  182. package/dist/testing/outboxStoreContract.mjs +2 -2
  183. package/dist/testing/requiredPorts.d.mts +1 -1
  184. package/dist/testing/requiredPorts.mjs +2 -2
  185. package/dist/testing/storageContract.mjs +1 -1
  186. package/dist/{timing-CKI_Oyub.mjs → timing-BtIDIdQz.mjs} +1 -1
  187. package/dist/{transactionContext-D0UZFoSy.mjs → transactionContext-BsQ5ortM.mjs} +1 -1
  188. package/dist/{typeGuards-CLYkmBLT.mjs → typeGuards-Cr2_zEW0.mjs} +1 -1
  189. package/dist/types/index.d.mts +2 -2
  190. package/dist/types/index.mjs +1 -1
  191. package/dist/types/storage.mjs +1 -1
  192. package/dist/{types-BeEJm-DV.d.mts → types-CQhHTZXs.d.mts} +48 -35
  193. package/dist/{types-B4E0sc6D.d.mts → types-DWFgq8EP.d.mts} +1 -1
  194. package/dist/{types-Cunc4shv.mjs → types-ZvdR7MVa.mjs} +4 -4
  195. package/dist/usage/index.mjs +4 -4
  196. package/dist/{userHelpers-cT5j1kgp.mjs → userHelpers-CwpEK36a.mjs} +1 -1
  197. package/dist/utils/index.d.mts +1 -1
  198. package/dist/utils/index.mjs +12 -12
  199. package/dist/{utils-DlNkm1dI.mjs → utils-CnrfcYMq.mjs} +6 -6
  200. package/dist/{validate-63QThRoS.mjs → validate-BTQBh-Dr.mjs} +3 -3
  201. package/dist/{versioning-f2YGmh4i.mjs → versioning-DiLykI6U.mjs} +3 -3
  202. package/dist/{workScope-DwspXz70.mjs → workScope-C3tPz_Gt.mjs} +2 -2
  203. package/package.json +34 -9
  204. package/skills/arc/SKILL.md +5 -5
  205. package/skills/arc/references/api-reference.md +1 -1
  206. package/skills/arc/references/boot.md +17 -2
  207. package/skills/arc/references/events.md +0 -1
  208. package/skills/arc/references/mcp-setup.md +3 -2
  209. package/skills/arc/references/multi-tenancy.md +1 -1
  210. package/skills/arc/references/production-api.md +19 -12
  211. package/skills/arc/references/production-audit.md +1 -1
  212. package/skills/arc/references/production-boot.md +3 -3
  213. package/skills/arc/references/production-idempotency.md +2 -2
  214. package/skills/arc/references/production-observability.md +14 -2
  215. package/skills/arc/references/production-reliability.md +1 -1
  216. package/skills/arc/references/querying.md +1 -2
  217. package/skills/arc/references/resources.md +8 -6
  218. package/skills/arc/references/testing.md +1 -1
  219. package/skills/arc-code-review/references/arc-cheatsheet.md +1 -1
  220. package/skills/arc-code-review/references/recipe-scope-permissions.md +1 -1
  221. package/skills/arc-module-publishing/references/resource-assembly.md +2 -2
  222. package/dist/rateLimitKey-D9dl3FQn.mjs +0 -40
@@ -1,11 +1,13 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as arcLog } from "./logger-DJwz_-Pl.mjs";
3
- import { C as isWriteVerbCapable, S as detectOverriddenWriteSlots, f as BaseController, i as resolveOpenApiSchemas, l as autoInjectTenantFieldRules, t as buildResourcePlugin } from "./plugin-8Z1khbAI.mjs";
4
- import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-Ca2IQFy2.mjs";
5
- import { B as requireAuth } from "./permissions-Cga6KBOX.mjs";
6
- import { n as getAvailablePresets, t as applyPresets } from "./presets-D28IABZe.mjs";
7
- import { t as pluralize } from "./pluralize-D4vcPLVs.mjs";
8
- import { a as isZodSchema, i as isJsonSchema } from "./schemaConverter-Cs3SwP4R.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { d as createPresetControllerHandle, n as getAvailablePresets, t as applyPresets } from "./presets-st11ePNn.mjs";
3
+ import { t as arcLog } from "./logger-DdMS0XC_.mjs";
4
+ import { C as isWriteVerbCapable, S as detectOverriddenWriteSlots, f as BaseController, i as resolveOpenApiSchemas, l as autoInjectTenantFieldRules, t as buildResourcePlugin } from "./plugin-D6hrdx-j.mjs";
5
+ import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-D9EiaO5s.mjs";
6
+ import { n as warnDeprecated } from "./deprecation-DX625dth.mjs";
7
+ import { B as requireAuth, F as allowPublic } from "./permissions-CEyeDHtT.mjs";
8
+ import { n as unresolvedPresetPermission } from "./presetPermission-2pcRVYRG.mjs";
9
+ import { t as pluralize } from "./pluralize-CJKgYkVc.mjs";
10
+ import { a as isZodSchema, i as isJsonSchema } from "./schemaConverter-XoLKVpzG.mjs";
9
11
  import { isReadOnlyRepo } from "@classytic/repo-core/repository";
10
12
  import { readEnv } from "@classytic/primitives/environment";
11
13
  // src/core/defineResource/writeVerbs.ts
@@ -94,7 +96,7 @@ function resolveOrAutoCreateController(resolvedConfig, adapter, repository, hasC
94
96
  if (repository && isReadOnlyRepo(repository)) {
95
97
  const disabled = new Set(resolvedConfig.disabledRoutes ?? []);
96
98
  const enabledWrites = READ_ONLY_REFUSED_ROUTES.filter((op) => !resolvedConfig.disableDefaultRoutes && !disabled.has(op));
97
- if (enabledWrites.length > 0) throw new Error(`Resource "${resolvedConfig.name}" mounts write routes (${enabledWrites.join(", ")}) over a READ-ONLY repository — its rows are owned by another component that enforces invariants generic CRUD would bypass (Better Auth hashes passwords, revokes sessions, and cascades org membership on every write it performs). Disable the write routes (\`disabledRoutes: ['create', 'update', 'delete']\`), or if raw writes are genuinely required, build the repository with the kit's explicit \`unsafeWritable: true\` opt-in.`);
99
+ if (enabledWrites.length > 0) throw new Error(`Resource "${resolvedConfig.name}" mounts write routes (${enabledWrites.join(", ")}) over a READ-ONLY repository — its rows are owned by another component that enforces invariants generic CRUD would bypass (Better Auth hashes passwords, revokes sessions, and cascades org membership on every write it performs). Disable the write routes (\`crud: { list: true, get: true }\`), or if raw writes are genuinely required, build the repository with the kit's explicit \`unsafeWritable: true\` opt-in.`);
98
100
  }
99
101
  if (userController) {
100
102
  bindControllerResourceName(userController, resolvedConfig.name);
@@ -249,6 +251,26 @@ function assertTransactionCapability(repository, resourceName) {
249
251
  if (!capabilities || capabilities.transactions === true) return;
250
252
  throw new Error(`Resource "${resourceName}" declares \`transactional: true\` but its repository reports \`capabilities.transactions: ${String(capabilities.transactions)}\` — this deployment cannot run transactions (standalone MongoDB, D1, or a topology arc could not confirm). \`withTransaction\` exists but every call would fail at BEGIN. Point at a replica set / transactional backend, or remove the flag. Checked at REGISTRATION, so a connection opened in \`beforeBoot()\` is already live by now.`);
251
253
  }
254
+ // src/core/defineResource/deprecations.ts
255
+ /**
256
+ * Phase 0 side channel — warn (once per process) about deprecated config
257
+ * spellings. Reads the CALLER's config, never the normalised copy: Phase 0
258
+ * itself produces `disabledRoutes` / `disableDefaultRoutes` from `crud` and
259
+ * `customRoutesOnly`, so arc never triggers a warning here. Routes a preset adds
260
+ * are checked where presets merge (`warnDeprecatedPresetRoutes` in `presets/`).
261
+ */
262
+ const FUNCTION_HANDLER_FIX = "Use a function `handler: (ctx) => controller.method(ctx)` (arc pipeline + MCP tool); `rawHandler` takes a function for streams, raw-body webhooks, files and redirects.";
263
+ function warnDeprecatedConfig(config) {
264
+ const name = config.name;
265
+ if (config.disableDefaultRoutes !== void 0) warnDeprecated("`disableDefaultRoutes`", `Use \`crud: false\` (first seen on resource '${name}').`);
266
+ if (config.disabledRoutes !== void 0) warnDeprecated("`disabledRoutes`", `Use the \`crud\` allow-list: \`disabledRoutes: ['delete']\` becomes \`crud: { list: true, get: true, create: true, update: true }\` (first seen on resource '${name}').`);
267
+ for (const route of config.routes ?? []) {
268
+ const where = `(first seen on ${route.method} ${route.path} of resource '${name}')`;
269
+ if (typeof route.handler === "string") warnDeprecated("A string route `handler`", `${FUNCTION_HANDLER_FIX} ${where}`);
270
+ if (route.controllerMethod !== void 0) warnDeprecated("Route `controllerMethod`", `${FUNCTION_HANDLER_FIX} ${where}`);
271
+ if (typeof route.rawHandler === "string") warnDeprecated("A string route `rawHandler`", "Pass the function: `rawHandler: (request, reply) => controller.method(request, reply)`. " + where);
272
+ }
273
+ }
252
274
  // src/core/defineResource/hooks.ts
253
275
  /**
254
276
  * Combined entry-point for Phase 6. Pushes preset-collected hooks
@@ -518,15 +540,17 @@ function resolveCrudAllowList(config) {
518
540
  * shape — `defineResource()` only ever consults `resolvedConfig`,
519
541
  * never the raw user input, after this phase runs.
520
542
  */
543
+ const PRESET_ROUTE_PUBLIC_BY_OMISSION = "preset-route-public-by-omission";
521
544
  /**
522
545
  * Run the Phase 3 pipeline: clone → apply presets → infer tenant
523
546
  * field → auto-inject system-managed rules. Returns the resolved
524
- * `InternalResourceConfig` that every later phase consumes.
547
+ * `InternalResourceConfig` that every later phase consumes. `controller` is the
548
+ * handle preset `routes(permissions, controller)` builders receive; Phase 4 binds it.
525
549
  */
526
- function applyPresetsAndAutoInject(config) {
550
+ function applyPresetsAndAutoInject(config, controller) {
527
551
  const originalPresets = (config.presets ?? []).map((p) => typeof p === "string" ? p : p.name);
528
552
  const declaredKeys = new Set(Object.keys(config).filter((k) => config[k] !== void 0));
529
- const resolvedConfig = config.presets?.length ? applyPresets(config, config.presets) : { ...config };
553
+ const resolvedConfig = config.presets?.length ? applyPresets(config, config.presets, controller) : { ...config };
530
554
  resolvedConfig._appliedPresets = originalPresets;
531
555
  resolvedConfig._declaredKeys = declaredKeys;
532
556
  inferTenantFieldFromAdapter(resolvedConfig);
@@ -577,6 +601,32 @@ function computeHasCrudRoutes(config) {
577
601
  const disabled = new Set(config.disabledRoutes ?? []);
578
602
  return !config.disableDefaultRoutes && CRUD_OPERATIONS.some((op) => !disabled.has(op));
579
603
  }
604
+ /**
605
+ * Preset routes whose permission resolved to nothing (no preset option, no resource
606
+ * permission to inherit; see `presetPermission`). The CRUD-read ladder: `error` under
607
+ * `strict`; otherwise `info`, and the route is mounted public (`allowPublic()`), as an
608
+ * ungated CRUD read is. Rewrites `config.routes` (a fresh array owned by `resolvedConfig`).
609
+ */
610
+ function resolvePresetRoutePermissions(config, strict = false) {
611
+ const diagnostics = [];
612
+ const routes = config.routes?.map((route) => {
613
+ const unresolved = unresolvedPresetPermission(route.permissions);
614
+ if (!unresolved) return route;
615
+ const { preset, inherits, option } = unresolved;
616
+ const where = `${route.method} ${route.path}`;
617
+ diagnostics.push({
618
+ severity: strict ? "error" : "info",
619
+ code: PRESET_ROUTE_PUBLIC_BY_OMISSION,
620
+ message: `[Arc] Resource '${config.name}': preset '${preset}' route ${where} has no permission (it inherits permissions.${inherits}, which is not set).\n` + (strict ? "strictPermissions is on and an ungated READ is fatal. State intent explicitly:\n" : "It is mounted WITHOUT auth. State intent explicitly:\n") + ` permissions: { ${inherits}: allowPublic(), ... } // intentionally public\n permissions: { ${inherits}: requireAuth(), ... } // or requireRoles([...])` + (option ? `\n ${option} // this route only` : "")
621
+ });
622
+ return strict ? route : {
623
+ ...route,
624
+ permissions: allowPublic()
625
+ };
626
+ });
627
+ if (routes && !strict && diagnostics.length > 0) config.routes = routes;
628
+ return diagnostics;
629
+ }
580
630
  const WRITE_OPERATIONS = /* @__PURE__ */ new Set([
581
631
  "create",
582
632
  "update",
@@ -595,18 +645,15 @@ const WRITE_OPERATIONS = /* @__PURE__ */ new Set([
595
645
  * wiring, ...) count as gates and don't false-positive.
596
646
  *
597
647
  * Severity ladder:
598
- * - `error` when any enabled WRITE op is ungated AND `strict` is on — the
599
- * resource fails boot (`defineResource()` throws). This is the fail-closed
600
- * production invariant: an unauthenticated write must never ship silently.
601
- * - `warn` (default) when any enabled WRITE op (create/update/delete) is
602
- * ungated — real exposure the host must acknowledge, but non-fatal so
603
- * existing hosts are not broken.
604
- * - `info` when only reads are ungated — public catalogs
605
- * (`referenceData: true`) are a legitimate shape, but the host should
606
- * still state intent with `permissions.fullPublic()` / `allowPublic()`.
648
+ * - `error` when ANY enabled op is ungated AND `strict` is on — the resource
649
+ * fails boot (`defineResource()` throws). An ungated read is as fatal as an
650
+ * ungated write: a public catalog states it with `allowPublic()`, so an
651
+ * accidental public read never ships.
652
+ * - `warn` (strict off) when an enabled WRITE op is ungated.
653
+ * - `info` (strict off) when only reads are ungated.
607
654
  *
608
- * `strict` is opt-in (resource `strictPermissions: true` or the
609
- * `ARC_STRICT_PERMISSIONS` env), so the default behavior is unchanged.
655
+ * The caller resolves `strict` (resource `strictPermissions`, else the
656
+ * `ARC_STRICT_PERMISSIONS` env, which is on unless set to false).
610
657
  */
611
658
  function collectUngatedCrudDiagnostics(config, strict = false) {
612
659
  if (config.disableDefaultRoutes) return [];
@@ -614,13 +661,15 @@ function collectUngatedCrudDiagnostics(config, strict = false) {
614
661
  const permissions = config.permissions ?? {};
615
662
  const ungated = CRUD_OPERATIONS.filter((op) => !disabled.has(op) && typeof permissions[op] !== "function");
616
663
  if (ungated.length === 0) return [];
617
- const severity = ungated.some((op) => WRITE_OPERATIONS.has(op)) ? strict ? "error" : "warn" : "info";
664
+ const hasUngatedWrite = ungated.some((op) => WRITE_OPERATIONS.has(op));
665
+ const severity = strict ? "error" : hasUngatedWrite ? "warn" : "info";
666
+ const ungatedReads = ungated.filter((op) => !WRITE_OPERATIONS.has(op));
618
667
  return [{
619
668
  severity,
620
669
  code: "crud-public-by-omission",
621
- message: `[Arc] Resource '${config.name}' mounts ${ungated.length} CRUD route(s) with no permission gate: ${ungated.join(", ")}.\n` + (severity === "error" ? "strictPermissions is on and an ungated WRITE is fatal. State intent explicitly:\n" : "An omitted permission mounts the route WITHOUT auth. State intent explicitly:\n") + ` permissions: permissions.fullPublic() // intentionally public
622
- permissions: permissions.authenticated() // require auth on every op
623
- permissions: { ${ungated[0]}: requireAuth(), ... } // per-operation` + (severity === "warn" ? "\nRecommended in production: ARC_STRICT_PERMISSIONS=true (or `strictPermissions: true` on the resource) makes an ungated WRITE fail the boot instead of shipping. This is the arc v3 default." : "")
670
+ message: `[Arc] Resource '${config.name}' mounts ${ungated.length} CRUD route(s) with no permission gate: ${ungated.join(", ")}.\n` + (severity === "error" ? `strictPermissions is on and an ungated ${hasUngatedWrite ? "WRITE" : "READ"} is fatal. State intent explicitly:\n` : "An omitted permission mounts the route WITHOUT auth. State intent explicitly:\n") + (ungatedReads.length > 0 ? ` permissions: { ${ungatedReads.map((op) => `${op}: allowPublic()`).join(", ")}, ... } // intentionally public reads\n` : "") + ` permissions: fullPublic() // every op intentionally public
671
+ permissions: authenticated() // require auth on every op
672
+ permissions: { ${ungated[0]}: requireAuth(), ... } // per-operation` + (severity === "warn" ? "\nRecommended in production: ARC_STRICT_PERMISSIONS=true (or `strictPermissions: true` on the resource) makes an ungated WRITE fail the boot instead of shipping. Strict permissions is the default; this resource or app has switched it off." : "")
624
673
  }];
625
674
  }
626
675
  // src/registry/resolveTenantPurge.ts
@@ -1072,15 +1121,15 @@ function validateResourceConfig(config, options = {}) {
1072
1121
  });
1073
1122
  if (declared.length > 0 && config.disableDefaultRoutes) errors.push({
1074
1123
  field: "writes",
1075
- message: `Resource declares write verb(s) [${declared.join(", ")}] but \`disableDefaultRoutes: true\` means no CRUD slot will call them`,
1076
- suggestion: "Drop `disableDefaultRoutes` so the slots mount, or move the command into a custom route / action and remove `writes`"
1124
+ message: `Resource declares write verb(s) [${declared.join(", ")}] but \`crud: false\` means no CRUD slot will call them`,
1125
+ suggestion: "Allow the slots in `crud` so they mount, or move the command into a custom route / action and remove `writes`"
1077
1126
  });
1078
1127
  else if (declared.length > 0) {
1079
1128
  const notMounted = declared.filter((op) => disabledRoutes.has(op));
1080
1129
  if (notMounted.length > 0) errors.push({
1081
1130
  field: "writes",
1082
1131
  message: `Write verb(s) [${notMounted.join(", ")}] are declared but those CRUD slots are disabled, so the verbs can never run`,
1083
- suggestion: `Remove [${notMounted.join(", ")}] from \`disabledRoutes\`, or delete the matching \`writes\` entr(ies) — a command nothing calls is decoration`
1132
+ suggestion: `Allow [${notMounted.join(", ")}] in \`crud\`, or delete the matching \`writes\` entr(ies) — a command nothing calls is decoration`
1084
1133
  });
1085
1134
  }
1086
1135
  }
@@ -1191,7 +1240,7 @@ function validatePresetOptions(preset, warnings) {
1191
1240
  * Without this check, a custom `POST /` on the same prefix as auto-CRUD's
1192
1241
  * `create` boots fine through `defineResource()` and only blows up at
1193
1242
  * `app.register()` time with Fastify's opaque `FST_ERR_DUPLICATED_ROUTE`.
1194
- * That error doesn't mention `disabledRoutes` and doesn't distinguish
1243
+ * That error doesn't mention `crud` and doesn't distinguish
1195
1244
  * "you collided with auto-CRUD" from "you collided with yourself" — so
1196
1245
  * the consumer has to grep arc's source to discover the fix.
1197
1246
  *
@@ -1244,7 +1293,7 @@ function validateRouteCrudCollisions(config, errors) {
1244
1293
  errors.push({
1245
1294
  field: `routes[${i}]`,
1246
1295
  message: `Route ${route.method} ${route.path} collides with auto-CRUD "${crud.op}"`,
1247
- suggestion: `Add \`disabledRoutes: ['${crud.op}']\` to suppress the auto-CRUD route, or move your custom handler to a different path. Set \`disableDefaultRoutes: true\` to disable all auto-CRUD on this resource.`
1296
+ suggestion: `Leave "${crud.op}" out of the \`crud\` allow-list (\`crud: { ${CRUD_OPERATIONS.filter((op) => op !== crud.op && !disabled.has(op)).map((op) => `${op}: true`).join(", ")} }\`) to suppress the auto-CRUD route, or move your custom handler to a different path. Set \`crud: false\` to disable all auto-CRUD on this resource.`
1248
1297
  });
1249
1298
  }
1250
1299
  }
@@ -1278,8 +1327,8 @@ function validateRoutes(routes, errors) {
1278
1327
  const routeWithRefs = route;
1279
1328
  if (!route.handler && !route.rawHandler && typeof routeWithRefs.controllerMethod !== "function") errors.push({
1280
1329
  field: `routes[${i}].handler`,
1281
- message: "Route must declare one of `handler` (arc pipeline), `rawHandler` (Fastify-native), or `controllerMethod`",
1282
- suggestion: "Prefer `controllerMethod: (c: MyController) => c.method` for typed handler refs."
1330
+ message: "Route must declare a function `handler` (arc pipeline) or a function `rawHandler` (Fastify-native)",
1331
+ suggestion: "Call the controller from a function handler: `handler: (ctx) => controller.method(ctx)`."
1283
1332
  });
1284
1333
  if (route.handler && route.rawHandler) errors.push({
1285
1334
  field: `routes[${i}].rawHandler`,
@@ -1588,22 +1637,28 @@ function validateActionsShape(config) {
1588
1637
  * ```
1589
1638
  */
1590
1639
  function defineResource(config) {
1640
+ warnDeprecatedConfig(config);
1591
1641
  const normalisedConfig = normalizeResourceConfig(config);
1592
1642
  let diagnostics = [];
1593
1643
  if (!normalisedConfig.skipValidation) diagnostics = validateDefineResourceConfig(normalisedConfig);
1594
1644
  else validateSecurityInvariants(normalisedConfig);
1595
1645
  const repository = normalisedConfig.adapter?.repository;
1596
1646
  const configWithId = resolveIdField(normalisedConfig, repository);
1597
- const resolvedConfig = applyPresetsAndAutoInject(configWithId);
1647
+ const presetController = createPresetControllerHandle(configWithId.name);
1648
+ const resolvedConfig = applyPresetsAndAutoInject(configWithId, presetController.controller);
1598
1649
  const hasCrudRoutes = computeHasCrudRoutes(resolvedConfig);
1599
1650
  const strict = resolvedConfig.strictPermissions ?? readEnv(process.env).bool("ARC_STRICT_PERMISSIONS", true);
1600
1651
  diagnostics = diagnostics.concat(collectUngatedCrudDiagnostics(resolvedConfig, strict));
1652
+ diagnostics = diagnostics.concat(resolvePresetRoutePermissions(resolvedConfig, strict));
1601
1653
  diagnostics = diagnostics.concat(collectSchemaSlotDiagnostics(resolvedConfig, resolvedConfig.strictSchemas ?? readEnv(process.env).bool("ARC_STRICT_SCHEMAS", false)));
1602
1654
  const fatal = diagnostics.filter((d) => d.severity === "error");
1603
- if (fatal.length > 0) throw new Error(fatal.map((d) => d.message).join("\n\n"));
1655
+ if (fatal.length > 0) throw Object.assign(new Error(fatal.map((d) => d.message).join("\n\n")), { code: fatal[0]?.code });
1604
1656
  const narrowedConfig = resolvedConfig;
1605
1657
  const narrowedAdapter = configWithId.adapter;
1606
1658
  const controller = resolveOrAutoCreateController(narrowedConfig, narrowedAdapter, repository, hasCrudRoutes);
1659
+ presetController.bind(controller);
1660
+ const verifyPresetRoutes = () => presetController.verify(resolvedConfig.routes ?? []);
1661
+ if (!normalisedConfig.skipValidation) verifyPresetRoutes();
1607
1662
  const resource = new ResourceDefinition({
1608
1663
  ...resolvedConfig,
1609
1664
  adapter: configWithId.adapter,
@@ -1616,6 +1671,7 @@ function defineResource(config) {
1616
1671
  if (registryMeta) resource._registryMeta = registryMeta;
1617
1672
  }
1618
1673
  const deferred = [];
1674
+ if (normalisedConfig.skipValidation) deferred.push(verifyPresetRoutes);
1619
1675
  if (resolvedConfig.transactional === true) {
1620
1676
  const name = resolvedConfig.name;
1621
1677
  deferred.push(() => assertTransactionCapability(repository, name));
@@ -0,0 +1,27 @@
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as arcLog } from "./logger-DdMS0XC_.mjs";
3
+ // src/logger/deprecation.ts
4
+ /**
5
+ * One warning per deprecated spelling per process. Keyed by the spelling, not
6
+ * the call site: a host with 80 string handlers needs one line naming the
7
+ * replacement, not 80. Goes through `arcLog`, so `ARC_SUPPRESS_WARNINGS` and
8
+ * the app's pino writer apply.
9
+ */
10
+ const warned = /* @__PURE__ */ new Set();
11
+ function warnDeprecated(key, message) {
12
+ if (warned.has(key)) return;
13
+ warned.add(key);
14
+ arcLog("deprecated").warn(`${key} is deprecated and will be removed in the next minor. ${message}`);
15
+ }
16
+ /**
17
+ * Wrap a namespace object so reading one of ITS members warns once. Probes for
18
+ * members it does not have (`then`, symbols) stay silent, so awaiting or
19
+ * tagging the object never emits a false warning.
20
+ */
21
+ function deprecatedNamespace(target, key, message) {
22
+ return new Proxy(target, { get(t, property, receiver) {
23
+ if (typeof property === "string" && Object.hasOwn(t, property)) warnDeprecated(key, message);
24
+ return Reflect.get(t, property, receiver);
25
+ } });
26
+ }
27
+ export { warnDeprecated as n, deprecatedNamespace as t };
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  import { readdir } from "node:fs/promises";
3
3
  import { extname, join, resolve } from "node:path";
4
4
  import { pathToFileURL } from "node:url";
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { t as ExternalOpenApiPaths } from "../externalPaths-BOqdq5wr.mjs";
3
- import { o as RegistryEntry } from "../index-DLCcLUQT.mjs";
3
+ import { o as RegistryEntry } from "../index-DtHACefu.mjs";
4
4
  import { FastifyPluginAsync } from "fastify";
5
5
  /**
6
6
  * OpenAPI 3.0 type primitives used by arc's spec emitter.
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-Dmp7Ipsi.mjs";
3
- import { n as getUserRoles } from "../userHelpers-cT5j1kgp.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-COrL_33P.mjs";
3
+ import { n as getUserRoles } from "../userHelpers-CwpEK36a.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  // src/docs/scalar.ts
6
6
  const scalarPlugin = async (fastify, opts = {}) => {
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
3
- import { t as arcLog } from "./logger-DJwz_-Pl.mjs";
4
- import { n as requireSingleHeaderValue } from "./headers-Bh47h0XH.mjs";
5
- import { n as getUserRoles } from "./userHelpers-cT5j1kgp.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Cy6j0m8_.mjs";
3
+ import { t as arcLog } from "./logger-DdMS0XC_.mjs";
4
+ import { n as requireSingleHeaderValue } from "./headers-Ib7BDgRI.mjs";
5
+ import { n as getUserRoles } from "./userHelpers-CwpEK36a.mjs";
6
6
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
7
7
  import fp from "fastify-plugin";
8
8
  // src/scope/elevation.ts
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as ArcError } from "../errors-DxpHZBlW.mjs";
3
- import { t as parseJsonBody } from "../jsonBody-CkKs6dA_.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "../errors-Ukhmfmmx.mjs";
3
+ import { t as parseJsonBody } from "../jsonBody-BNlcGUnb.mjs";
4
4
  import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
5
5
  import fp from "fastify-plugin";
6
6
  // src/encryption/fieldCipher.ts
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
3
- import { m as statusToArcCode, p as isArcError } from "./errors-DxpHZBlW.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Cy6j0m8_.mjs";
3
+ import { m as statusToArcCode, p as isArcError } from "./errors-Ukhmfmmx.mjs";
4
4
  import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
5
5
  import { isProductionEnv } from "@classytic/primitives/environment";
6
6
  import fp from "fastify-plugin";
@@ -165,7 +165,10 @@ async function errorHandlerPluginFn(fastify, options = {}) {
165
165
  const deliberateUnavailable = status === 503 && wire.code !== "arc.internal_error";
166
166
  if (status >= 500 && !deliberateUnavailable) request.log.error({
167
167
  err: error,
168
- status
168
+ status,
169
+ code: wire.code,
170
+ route: request.routeOptions?.url,
171
+ method: request.method
169
172
  }, "Server error");
170
173
  else if (deliberateUnavailable) request.log.warn({
171
174
  code: wire.code,
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
3
3
  // src/utils/errors.ts
4
4
  /**
@@ -319,7 +319,7 @@ interface EventPluginOptions {
319
319
  *
320
320
  * **Important:** With `failOpen: true` (default), a transport outage will
321
321
  * silently drop events while requests continue succeeding. Pair with the
322
- * `onPublishError` callback to monitor failures, or use `wal` for
322
+ * `onPublishError` callback to monitor failures, or use the outbox for
323
323
  * at-least-once delivery guarantees.
324
324
  *
325
325
  * Never applies to a type the `registry` declares `durability: 'durable'`: the facade
@@ -327,24 +327,13 @@ interface EventPluginOptions {
327
327
  */
328
328
  failOpen?: boolean;
329
329
  /**
330
- * Low-level write-ahead hook called BEFORE the transport publish, with an
331
- * optional acknowledge() called AFTER a successful publish.
330
+ * Write-ahead hook called BEFORE the transport publish, with an optional
331
+ * acknowledge() AFTER a successful publish. NOT at-least-once on its own:
332
+ * nothing replays a saved-but-unpublished row.
332
333
  *
333
- * **Important**: this is NOT at-least-once delivery on its own. If
334
- * `transport.publish()` throws after `wal.save()`, the saved row stays
335
- * but arc does NOT relay it on next boot — there is no replay loop here.
336
- * For at-least-once you must EITHER:
337
- *
338
- * 1. Run a relay loop yourself (read unacknowledged WAL rows on boot,
339
- * republish, ack on success), or
340
- * 2. Use `EventOutbox` ([./outbox.ts]) — `outbox.relay()` is the
341
- * production-grade at-least-once primitive with claim/lease,
342
- * retry/DLQ, multi-worker safety, and `repository`-backed durable
343
- * storage. New code should prefer `EventOutbox` over `wal`.
344
- *
345
- * The `wal` slot is kept for hosts that want to integrate with custom
346
- * write-ahead infrastructure (Kafka producer transactions, S3 batch
347
- * archives, debug audit logs) without arc's outbox claim/lease semantics.
334
+ * @deprecated Use the outbox (`createOutboxModule` / `EventOutbox`), which
335
+ * has claim/lease, retry/DLQ and a relay loop. Warns once per process;
336
+ * removed in the next minor.
348
337
  */
349
338
  wal?: {
350
339
  save: (event: DomainEvent) => Promise<void>;
@@ -1,11 +1,12 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-BBBkGgwA.mjs";
3
- import { n as requestContext } from "./requestContext-yc7MSgmq.mjs";
4
- import { t as arcLog } from "./logger-DJwz_-Pl.mjs";
5
- import { d as createDomainError } from "./errors-DxpHZBlW.mjs";
6
- import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-Cf-27xsS.mjs";
7
- import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-DeNze_-C.mjs";
8
- import { n as preserveSubscriberIdentity } from "./subscriberIdentity-DSqCh38x.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Cy6j0m8_.mjs";
3
+ import { n as requestContext } from "./requestContext-B-TjFpWt.mjs";
4
+ import { n as warnDeprecated } from "./deprecation-DX625dth.mjs";
5
+ import { t as arcLog } from "./logger-DdMS0XC_.mjs";
6
+ import { d as createDomainError } from "./errors-Ukhmfmmx.mjs";
7
+ import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-C76Hn-Th.mjs";
8
+ import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-B3jTKMQH.mjs";
9
+ import { n as preserveSubscriberIdentity } from "./subscriberIdentity-DpdSQMQq.mjs";
9
10
  import { isProductionEnv } from "@classytic/primitives/environment";
10
11
  import fp from "fastify-plugin";
11
12
  import { NonDurablePublishError } from "@classytic/primitives/durable-events";
@@ -162,6 +163,7 @@ const eventPlugin = async (fastify, opts = {}) => {
162
163
  */
163
164
  const ownsTransport = opts.transport === void 0;
164
165
  const { transport = new MemoryEventTransport(opts.memoryTransport), singleProcess = false, logEvents = false, failOpen = true, retry: retryOpts, deadLetterQueue: dlqOpts, wal, onPublish, onPublishError, registry, validateMode: rawValidateMode, warnOnDuplicate: rawWarnOnDuplicate } = opts;
166
+ if (wal) warnDeprecated("The eventPlugin `wal` option", "Use the outbox (`createOutboxModule` / `EventOutbox`) for at-least-once delivery.");
165
167
  /** A host telemetry callback — isolated like an observer, so it can never change delivery. */
166
168
  const notify = (hook, run, eventType) => {
167
169
  try {
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { r as createEvent } from "./EventTransport-DeNze_-C.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { r as createEvent } from "./EventTransport-B3jTKMQH.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { durableEventMeta } from "@classytic/primitives/durable-events";
5
5
  // src/events/defineEvent.ts
@@ -1,7 +1,7 @@
1
1
 
2
- import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-BY38F6yK.mjs";
2
+ import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-BeJasppx.mjs";
3
3
  import { i as EventLogger, n as DomainEvent, o as MemoryEventTransport, r as EventHandler, s as MemoryEventTransportOptions } from "../EventTransport-CYEoCJGe.mjs";
4
- import { a as createOutboxModule, c as EventOutboxOptions, d as RelayBatchOptions, f as RelayResult, g as readOutboxHealth, h as OutboxHealthStore, i as OutboxModuleOptions, l as OutboxRelayErrorHandler, m as OutboxHealth, n as OutboxDrainResult, o as MemoryOutboxStore, p as DEFAULT_RELAY_LAG_UNHEALTHY_MS, r as OutboxModuleExports, s as EventOutbox, t as OutboxDrainRequest, u as OutboxRelayErrorKind } from "../outbox-module-DzW6zwWJ.mjs";
4
+ import { a as createOutboxModule, c as EventOutboxOptions, d as RelayBatchOptions, f as RelayResult, g as readOutboxHealth, h as OutboxHealthStore, i as OutboxModuleOptions, l as OutboxRelayErrorHandler, m as OutboxHealth, n as OutboxDrainResult, o as MemoryOutboxStore, p as DEFAULT_RELAY_LAG_UNHEALTHY_MS, r as OutboxModuleExports, s as EventOutbox, t as OutboxDrainRequest, u as OutboxRelayErrorKind } from "../outbox-module-C1QWMloZ.mjs";
5
5
  import { RedisEventTransportOptions, RedisLike } from "./transports/redis.mjs";
6
6
  import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-CS1N9dwM.mjs";
7
7
  import { OutboxStore } from "@classytic/primitives/outbox";
@@ -1,11 +1,11 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-D-pFtqT1.mjs";
3
- import { n as MemoryEventTransport } from "../EventTransport-DeNze_-C.mjs";
4
- import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-ZsIQPRso.mjs";
5
- import { r as withSubscriberId } from "../subscriberIdentity-DSqCh38x.mjs";
6
- import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-CEpgVAl7.mjs";
7
- import { t as createOutboxModule } from "../outbox-module-vT6PaThj.mjs";
8
- import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-CEaCmUfG.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-DpDQtyR6.mjs";
3
+ import { n as MemoryEventTransport } from "../EventTransport-B3jTKMQH.mjs";
4
+ import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-DTKAgSvb.mjs";
5
+ import { r as withSubscriberId } from "../subscriberIdentity-DpdSQMQq.mjs";
6
+ import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-22T82HAa.mjs";
7
+ import { t as createOutboxModule } from "../outbox-module-BY2HtnjU.mjs";
8
+ import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-CmT3gtkP.mjs";
9
9
  import { fingerprintRequest, runIdempotent } from "@classytic/repo-core/idempotency";
10
10
  import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
11
11
  // src/events/inbox.ts
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { n as evictToSize } from "../../boundedMap-zxGBpXX0.mjs";
3
- import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-DwspXz70.mjs";
4
- import { t as getSubscriberId } from "../../subscriberIdentity-DSqCh38x.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { n as evictToSize } from "../../boundedMap-Ddw2yGb2.mjs";
3
+ import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-C3tPz_Gt.mjs";
4
+ import { t as getSubscriberId } from "../../subscriberIdentity-DpdSQMQq.mjs";
5
5
  import sjson from "secure-json-parse";
6
6
  import { createEventRouter } from "@classytic/primitives/events";
7
7
  // src/events/transports/redis-stream.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-DwspXz70.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-C3tPz_Gt.mjs";
3
3
  import sjson from "secure-json-parse";
4
4
  // src/events/transports/redis.ts
5
5
  /**
@@ -1,9 +1,32 @@
1
1
 
2
- import { a as ResolvedModuleDescriptor, o as ResolvedModuleLifecycle, s as ResolvedResourceDescriptor } from "../fastify-augmentation-CPReFhZ1.mjs";
3
- import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as CreateAppHttpOptions, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as BootDisposer, u as CustomPluginAuthOption } from "../index-yXXCsKl7.mjs";
4
- import { F as HealthCheck, _ as ResourceLike, a as ArcPortRegistry, c as LazyBridge, d as ModulePorts, f as ModuleRequirements, g as LoadResourcesOptions, h as ModuleSetupContext, i as ArcModuleRegistry, l as ModuleContribution, m as ModuleDisposer, n as ArcModule, o as ArcPorts, p as PortName, r as ArcModuleInput, s as EventHandlerDefinition, t as ArcCompositionConfig, u as ModuleName, v as ResourceModule, y as loadResources } from "../types-BeEJm-DV.mjs";
5
- import { $ as renderModuleGraph, A as extendModule, B as ModuleGraphAnalysis, C as assertComposable, D as orderModules, E as resolveModuleClosure, F as CrudSurface, G as ModuleKind, H as ModuleGraphMode, I as DerivedPublishes, J as analyzeModuleGraph, K as SkippedBridge, L as DurabilityFacts, M as AsyncApiCatalogEntry, N as AsyncApiInfo, O as subscribeModuleEventHandlers, P as toAsyncApi, Q as eventTopology, R as HandlerDurabilityFact, S as PlanModulesOptions, T as planModules, U as ModuleGraphNode, V as ModuleGraphIssue, W as ModuleGraphOptions, X as crudEventsOf, Y as buildModuleGraph, Z as dependentsOf, _ as createRelayNudge, a as hasModuleExports, b as CompositionProblem, c as moduleHandleRef, d as getModuleState, et as verifyEventDurability, f as hasModule, g as RelayOption, h as RelayNudge, i as getOptionalModuleExports, j as collectModuleWorkflows, k as ModuleExtension, l as ModuleState, m as resolveModule, n as defineModule, o as lazyModuleExports, p as resolveContribution, q as activateBridges, r as getModuleExports, s as lazyRequiredModuleExports, t as ModuleHandleRef, tt as verifyModuleGraph, u as getModuleResources, v as withRelayNudge, w as compositionProblems, x as ModulePlan, y as ClosureNode, z as ModuleGraph } from "../index-CSbDhif4.mjs";
2
+ import { a as ResolvedModuleDescriptor, o as ResolvedModuleLifecycle, s as ResolvedResourceDescriptor } from "../fastify-augmentation-DjxuSRG4.mjs";
3
+ import { t as ArcError } from "../errors-DTo0me1o.mjs";
4
+ import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as CreateAppHttpOptions, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as BootDisposer, u as CustomPluginAuthOption } from "../index-CXqYFGoH.mjs";
5
+ import { t as HealthCheck } from "../health-skjSwNaC.mjs";
6
+ import { S as loadResources, _ as ModuleDisposer, a as ArcPortRegistry, b as ResourceLike, c as EventHandlerDefinition, d as ModuleFacts, f as ModuleInvariant, g as PortName, h as ModuleRequirements, i as ArcModuleRegistry, l as LazyBridge, m as ModulePorts, n as ArcModule, o as ArcPorts, p as ModuleName, r as ArcModuleInput, s as ComposedModuleFacts, t as ArcCompositionConfig, u as ModuleContribution, v as ModuleSetupContext, x as ResourceModule, y as LoadResourcesOptions } from "../types-CQhHTZXs.mjs";
7
+ import { $ as renderModuleGraph, A as extendModule, B as ModuleGraphAnalysis, C as assertComposable, D as orderModules, E as resolveModuleClosure, F as CrudSurface, G as ModuleKind, H as ModuleGraphMode, I as DerivedPublishes, J as analyzeModuleGraph, K as SkippedBridge, L as DurabilityFacts, M as AsyncApiCatalogEntry, N as AsyncApiInfo, O as subscribeModuleEventHandlers, P as toAsyncApi, Q as eventTopology, R as HandlerDurabilityFact, S as PlanModulesOptions, T as planModules, U as ModuleGraphNode, V as ModuleGraphIssue, W as ModuleGraphOptions, X as crudEventsOf, Y as buildModuleGraph, Z as dependentsOf, _ as createRelayNudge, a as hasModuleExports, b as CompositionProblem, c as moduleHandleRef, d as getModuleState, et as verifyEventDurability, f as hasModule, g as RelayOption, h as RelayNudge, i as getOptionalModuleExports, j as collectModuleWorkflows, k as ModuleExtension, l as ModuleState, m as resolveModule, n as defineModule, o as lazyModuleExports, p as resolveContribution, q as activateBridges, r as getModuleExports, s as lazyRequiredModuleExports, t as ModuleHandleRef, tt as verifyModuleGraph, u as getModuleResources, v as withRelayNudge, w as compositionProblems, x as ModulePlan, y as ClosureNode, z as ModuleGraph } from "../index-CaBFPmnu.mjs";
6
8
  import { FastifyInstance, FastifyServerOptions } from "fastify";
9
+ /** One reason the app cannot boot. */
10
+ interface BootProblem {
11
+ /** Stable identifier — match on this, never on `message`. */
12
+ readonly code: string;
13
+ /** What is wrong, already naming the module / key / subsystem involved. */
14
+ readonly message: string;
15
+ /** One line: what to change. */
16
+ readonly fix: string;
17
+ /** The module this problem belongs to, when it belongs to one. */
18
+ readonly module?: string;
19
+ }
20
+ /**
21
+ * Thrown by `createApp` for a configuration that cannot boot. `problems` lists
22
+ * every failure found; `code` is the single problem's code, or `boot-failed`
23
+ * when there are several.
24
+ */
25
+ export declare class ArcBootError extends ArcError {
26
+ name: string;
27
+ readonly problems: readonly BootProblem[];
28
+ constructor(message: string, problems: readonly BootProblem[]);
29
+ }
7
30
  /**
8
31
  * Default pino redact paths (auth/cookie/API-key headers, nested
9
32
  * password/token/secret fields), applied only when the host supplies no
@@ -157,4 +180,4 @@ export declare const testingPreset: Partial<CreateAppOptions>;
157
180
  */
158
181
  export declare const edgePreset: Partial<CreateAppOptions>;
159
182
  export declare function getPreset(name: "production" | "development" | "testing" | "edge" | "worker"): Partial<CreateAppOptions>;
160
- export { type ArcCompositionConfig, type ArcModule, type ArcModuleInput, type ArcModuleRegistry, type ArcPortRegistry, type ArcPorts, type ArcWorker, type AsyncApiCatalogEntry, type AsyncApiInfo, type AuthOption, type BetterAuthOption, type BootDisposer, type ClosureNode, type CompositionProblem, type CreateAppHttpOptions, type CreateAppOptions, type CreateWorkerOptions, type CrudSurface, type CustomAuthenticatorOption, type CustomPluginAuthOption, type DerivedPublishes, type DurabilityFacts, type EagerGlobResult, type EventHandlerDefinition, type FetchHandlerOptions, type HandlerDurabilityFact, type JwtAuthOption, type LazyBridge, type LazyGlobResult, type LoadResourcesOptions, type ModuleContribution, type ModuleDisposer, type ModuleExtension, type ModuleGraph, type ModuleGraphAnalysis, type ModuleGraphIssue, type ModuleGraphMode, type ModuleGraphNode, type ModuleGraphOptions, type ModuleHandleRef, type ModuleKind, type ModuleName, type ModulePlan, type ModulePorts, type ModuleRequirements, type ModuleSetupContext, type ModuleState, type MultipartOptions, type PlanModulesOptions, type PortName, type RawBodyOptions, type RelayNudge, type RelayOption, type ResolvedModuleDescriptor, type ResolvedModuleLifecycle, type ResolvedResourceDescriptor, type ResourceLike, type ResourceModule, type SkippedBridge, type UnderPressureOptions, type WorkerHealthOptions, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createRelayNudge, crudEventsOf, defineModule, dependentsOf, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, moduleHandleRef, orderModules, planModules, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, toAsyncApi, verifyEventDurability, verifyModuleGraph, withRelayNudge };
183
+ export { type ArcCompositionConfig, type ArcModule, type ArcModuleInput, type ArcModuleRegistry, type ArcPortRegistry, type ArcPorts, type ArcWorker, type AsyncApiCatalogEntry, type AsyncApiInfo, type AuthOption, type BetterAuthOption, type BootDisposer, type BootProblem, type ClosureNode, type ComposedModuleFacts, type CompositionProblem, type CreateAppHttpOptions, type CreateAppOptions, type CreateWorkerOptions, type CrudSurface, type CustomAuthenticatorOption, type CustomPluginAuthOption, type DerivedPublishes, type DurabilityFacts, type EagerGlobResult, type EventHandlerDefinition, type FetchHandlerOptions, type HandlerDurabilityFact, type JwtAuthOption, type LazyBridge, type LazyGlobResult, type LoadResourcesOptions, type ModuleContribution, type ModuleDisposer, type ModuleExtension, type ModuleFacts, type ModuleGraph, type ModuleGraphAnalysis, type ModuleGraphIssue, type ModuleGraphMode, type ModuleGraphNode, type ModuleGraphOptions, type ModuleHandleRef, type ModuleInvariant, type ModuleKind, type ModuleName, type ModulePlan, type ModulePorts, type ModuleRequirements, type ModuleSetupContext, type ModuleState, type MultipartOptions, type PlanModulesOptions, type PortName, type RawBodyOptions, type RelayNudge, type RelayOption, type ResolvedModuleDescriptor, type ResolvedModuleLifecycle, type ResolvedResourceDescriptor, type ResourceLike, type ResourceModule, type SkippedBridge, type UnderPressureOptions, type WorkerHealthOptions, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createRelayNudge, crudEventsOf, defineModule, dependentsOf, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, moduleHandleRef, orderModules, planModules, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, toAsyncApi, verifyEventDurability, verifyModuleGraph, withRelayNudge };
@@ -1,9 +1,10 @@
1
- /*! @classytic/arc v2.52.0 | MIT | https://classytic.com */
2
- import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-BC67ACu4.mjs";
3
- import { r as mergeHealthChecks, t as healthPlugin } from "../health-W4S2yFBL.mjs";
4
- import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, s as moduleHandleRef, t as defineModule } from "../module-C0JCsnO7.mjs";
5
- import { t as loadResources } from "../loadResources-CFdzAWQZ.mjs";
6
- import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-CbDTFbTj.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as ArcBootError } from "../bootError-BT3z3cvX.mjs";
3
+ import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-CEdGZtkP.mjs";
4
+ import { i as healthPlugin, o as logBootHealthSummary, s as mergeHealthChecks } from "../requestId-ClcKoWLq.mjs";
5
+ import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, s as moduleHandleRef, t as defineModule } from "../module-BLrTmMyk.mjs";
6
+ import { t as loadResources } from "../loadResources-izEeQLO_.mjs";
7
+ import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-BhKHIkFl.mjs";
7
8
  // src/factory/module/asyncapi.ts
8
9
  /**
9
10
  * The module graph as an AsyncAPI 3.0 document — one channel per event (addressed by the event
@@ -286,6 +287,10 @@ async function createWorker(options, workerOptions = {}) {
286
287
  ...sharedHealth,
287
288
  checks: mergedChecks
288
289
  });
290
+ app.addHook("onReady", (done) => {
291
+ logBootHealthSummary(app.log, mergedChecks);
292
+ done();
293
+ });
289
294
  await app.listen({
290
295
  port,
291
296
  host
@@ -418,4 +423,4 @@ function pickResource(value) {
418
423
  ];
419
424
  for (const c of candidates) if (c && typeof c === "object" && typeof c.toPlugin === "function") return c;
420
425
  }
421
- export { ArcFactory, DEFAULT_LOGGER_REDACT_PATHS, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createApp, createRelayNudge, createWorker, crudEventsOf, defineModule, dependentsOf, developmentPreset, edgePreset, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, getPreset, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, moduleHandleRef, orderModules, planModules, preloadResources, preloadResourcesAsync, productionPreset, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, testingPreset, toAsyncApi, toFetchHandler, verifyEventDurability, verifyModuleGraph, withRelayNudge };
426
+ export { ArcBootError, ArcFactory, DEFAULT_LOGGER_REDACT_PATHS, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createApp, createRelayNudge, createWorker, crudEventsOf, defineModule, dependentsOf, developmentPreset, edgePreset, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, getPreset, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, moduleHandleRef, orderModules, planModules, preloadResources, preloadResourcesAsync, productionPreset, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, testingPreset, toAsyncApi, toFetchHandler, verifyEventDurability, verifyModuleGraph, withRelayNudge };