@classytic/arc 2.51.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 (223) hide show
  1. package/README.md +2 -1
  2. package/dist/{EventTransport-K7Q9WPjm.mjs → EventTransport-B3jTKMQH.mjs} +2 -2
  3. package/dist/{HookSystem-DBAu9uNT.mjs → HookSystem-DNwxV463.mjs} +2 -2
  4. package/dist/{ResourceRegistry-BelzCRMy.mjs → ResourceRegistry-Ck7RFodL.mjs} +2 -2
  5. package/dist/{acquire-B0zhfGSm.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-Dxj_cy6N.mjs → authorizationDecision-gB5-bHDp.mjs} +9 -7
  14. package/dist/bootError-BT3z3cvX.mjs +38 -0
  15. package/dist/{boundedMap-DOBai-H3.mjs → boundedMap-Ddw2yGb2.mjs} +1 -1
  16. package/dist/{buildHandler-Dyl8P9j0.mjs → buildHandler-B8IDGmhD.mjs} +5 -5
  17. package/dist/cache/index.mjs +4 -4
  18. package/dist/{caching-CUmaNL8Y.mjs → caching-BitJDAY0.mjs} +2 -2
  19. package/dist/{claimed-DJPk4VZr.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-DH41jnNT.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-DPmRWlpx.mjs → core-B_06Fcn0.mjs} +3 -3
  37. package/dist/{createActionRouter-B1xhER6i.mjs → createActionRouter-DtxUXOCI.mjs} +5 -5
  38. package/dist/{createAggregationRouter-CNntJL-z.mjs → createAggregationRouter-BMiKyDoW.mjs} +7 -7
  39. package/dist/{createApp-DpG26bCu.mjs → createApp-CEdGZtkP.mjs} +207 -44
  40. package/dist/{createMcpServer-CS2KOVP6.d.mts → createMcpServer-Bk3ls5jS.d.mts} +1 -1
  41. package/dist/{defineAggregation-rI3EbZUg.mjs → defineAggregation-DUsrGcsm.mjs} +1 -1
  42. package/dist/{defineResource-5DcG_wlI.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-XFu7J3aj.mjs → elevation-NJ3908pJ.mjs} +5 -5
  48. package/dist/encryption/index.d.mts +26 -1
  49. package/dist/encryption/index.mjs +56 -6
  50. package/dist/{errorHandler-xDVUWOMu.mjs → errorHandler-Ke6PGvF7.mjs} +7 -4
  51. package/dist/{errors-KBZ3tQk5.mjs → errors-Ukhmfmmx.mjs} +1 -1
  52. package/dist/{eventPlugin-BY38F6yK.d.mts → eventPlugin-BeJasppx.d.mts} +7 -18
  53. package/dist/{eventPlugin-C4lNj2Dw.mjs → eventPlugin-DTKAgSvb.mjs} +10 -8
  54. package/dist/{eventTypes-DZRoUAdk.mjs → eventTypes-DpDQtyR6.mjs} +2 -2
  55. package/dist/events/index.d.mts +2 -2
  56. package/dist/events/index.mjs +8 -8
  57. package/dist/events/transports/redis-stream-entry.mjs +4 -4
  58. package/dist/events/transports/redis.mjs +2 -2
  59. package/dist/factory/index.d.mts +28 -5
  60. package/dist/factory/index.mjs +12 -7
  61. package/dist/{fastify-augmentation-baQc3MaO.d.mts → fastify-augmentation-DjxuSRG4.d.mts} +4 -3
  62. package/dist/{fieldTypes-DrXUW1jc.mjs → fieldTypes-BtFpQO6I.mjs} +2 -2
  63. package/dist/{fields-C5J8WTd2.mjs → fields-B7fuROWK.mjs} +1 -1
  64. package/dist/{filter-merge-DTjYoDrj.mjs → filter-merge-BuzZ-r9z.mjs} +1 -1
  65. package/dist/{generate-SA8oMlLB.mjs → generate-c4F39pk1.mjs} +4 -4
  66. package/dist/{headers-D5wrBLOk.mjs → headers-Ib7BDgRI.mjs} +2 -2
  67. package/dist/{health-BLal039H.mjs → health-22T82HAa.mjs} +1 -1
  68. package/dist/health-skjSwNaC.d.mts +36 -0
  69. package/dist/hooks/index.d.mts +1 -1
  70. package/dist/hooks/index.mjs +2 -2
  71. package/dist/http-cache/index.mjs +4 -4
  72. package/dist/http-cache/purgers/cloudflare.mjs +2 -2
  73. package/dist/http-cache/purgers/fastly.mjs +2 -2
  74. package/dist/http-cache/testing/index.mjs +1 -1
  75. package/dist/idempotency/index.d.mts +7 -1
  76. package/dist/idempotency/index.mjs +9 -7
  77. package/dist/idempotency/redis.mjs +2 -2
  78. package/dist/{index-CMNpMBtW.d.mts → index-BzUyno-u.d.mts} +14 -5
  79. package/dist/{index-Dhrks-hM.d.mts → index-CXqYFGoH.d.mts} +13 -4
  80. package/dist/{index-DexdFs1a.d.mts → index-CaBFPmnu.d.mts} +29 -7
  81. package/dist/{index-DKM2p5w5.d.mts → index-DWn0o4U7.d.mts} +2 -2
  82. package/dist/{index-DLCcLUQT.d.mts → index-DtHACefu.d.mts} +109 -116
  83. package/dist/index.d.mts +5 -5
  84. package/dist/index.mjs +12 -12
  85. package/dist/{init-DeKHaNZn.mjs → init-XY5slyuS.mjs} +3 -3
  86. package/dist/integrations/event-gateway.mjs +2 -2
  87. package/dist/integrations/index.d.mts +1 -1
  88. package/dist/integrations/index.mjs +1 -1
  89. package/dist/integrations/jobs/index.mjs +3 -3
  90. package/dist/integrations/mcp/index.d.mts +9 -4
  91. package/dist/integrations/mcp/index.mjs +2 -2
  92. package/dist/integrations/mcp/testing.d.mts +2 -2
  93. package/dist/integrations/mcp/testing.mjs +2 -2
  94. package/dist/integrations/streamline.mjs +3 -3
  95. package/dist/integrations/webhooks.d.mts +1 -1
  96. package/dist/integrations/webhooks.mjs +4 -4
  97. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  98. package/dist/integrations/websocket-redis.mjs +1 -1
  99. package/dist/integrations/websocket.mjs +2 -2
  100. package/dist/invariants-COekUeoh.mjs +120 -0
  101. package/dist/{jsonBody-rDPGT5A9.mjs → jsonBody-BNlcGUnb.mjs} +2 -2
  102. package/dist/{keys-t7i-lJ2r.mjs → keys-DwvXJwUX.mjs} +1 -1
  103. package/dist/{loadResources-CcupAVJH.mjs → loadResources-izEeQLO_.mjs} +3 -3
  104. package/dist/{loadResourcesFromEntry-BpjYlaoj.mjs → loadResourcesFromEntry-CijqjbHE.mjs} +2 -2
  105. package/dist/logger/index.mjs +2 -2
  106. package/dist/{logger-IL7Btm-N.mjs → logger-DdMS0XC_.mjs} +1 -1
  107. package/dist/{mcpPlugin-BsdH7Vot.mjs → mcpPlugin-D0tSZqKk.mjs} +24 -22
  108. package/dist/{memory-Dkp6ZD3F.mjs → memory-Ay0haw9n.mjs} +3 -3
  109. package/dist/{metrics-CDPqgdKr.mjs → metrics-Bpgf4UL6.mjs} +3 -3
  110. package/dist/middleware/index.d.mts +1 -1
  111. package/dist/middleware/index.mjs +3 -3
  112. package/dist/migrations/index.mjs +2 -2
  113. package/dist/{module-KFxT1Iuk.mjs → module-BLrTmMyk.mjs} +17 -2
  114. package/dist/{multiTenant-QtDzxx_K.d.mts → multiTenant-Cf0Ye-Wu.d.mts} +1 -1
  115. package/dist/{multipartBody-BHktuarE.mjs → multipartBody-L2gr96df.mjs} +1 -1
  116. package/dist/{observeSend-CY-sLanc.mjs → observeSend-B7FEdk_g.mjs} +1 -1
  117. package/dist/{openapi-DbeXiy2v.mjs → openapi-COrL_33P.mjs} +6 -6
  118. package/dist/outbox-admin/index.d.mts +1 -1
  119. package/dist/outbox-admin/index.mjs +6 -6
  120. package/dist/{outbox-module-BWqkTE8-.mjs → outbox-module-BY2HtnjU.mjs} +7 -7
  121. package/dist/{outbox-module-DzW6zwWJ.d.mts → outbox-module-C1QWMloZ.d.mts} +5 -8
  122. package/dist/permissions/index.d.mts +2 -2
  123. package/dist/permissions/index.mjs +8 -8
  124. package/dist/{permissions-e5YMrFbm.mjs → permissions-CEyeDHtT.mjs} +36 -17
  125. package/dist/{pipe-CMnKfdF4.mjs → pipe-DIAr91at.mjs} +2 -2
  126. package/dist/pipeline/index.d.mts +1 -1
  127. package/dist/pipeline/index.mjs +2 -2
  128. package/dist/{plan-BvLJGm3U.mjs → plan-BhKHIkFl.mjs} +75 -20
  129. package/dist/{plugin-DYmu8uT4.mjs → plugin-D6hrdx-j.mjs} +72 -38
  130. package/dist/plugins/index.d.mts +4 -3
  131. package/dist/plugins/index.mjs +18 -18
  132. package/dist/plugins/response-cache.mjs +4 -4
  133. package/dist/plugins/tracing-entry.mjs +177 -85
  134. package/dist/{pluralize-ClwfBdIx.mjs → pluralize-CJKgYkVc.mjs} +1 -1
  135. package/dist/presetPermission-2pcRVYRG.mjs +23 -0
  136. package/dist/presets/filesUpload.d.mts +4 -2
  137. package/dist/presets/filesUpload.mjs +11 -6
  138. package/dist/presets/index.d.mts +6 -4
  139. package/dist/presets/index.mjs +2 -2
  140. package/dist/presets/multiTenant.d.mts +1 -1
  141. package/dist/presets/multiTenant.mjs +5 -5
  142. package/dist/presets/search.d.mts +2 -2
  143. package/dist/presets/search.mjs +54 -38
  144. package/dist/{presets-DX_lPabi.mjs → presets-st11ePNn.mjs} +150 -41
  145. package/dist/{projection-DnZiFPPE.mjs → projection-B4rqiJTi.mjs} +2 -2
  146. package/dist/{purger.types-BEzTVDOU.mjs → purger.types-BcHeAhY_.mjs} +1 -1
  147. package/dist/{queryCachePlugin-C57-Nj-g.mjs → queryCachePlugin-BgSc2bga.mjs} +6 -6
  148. package/dist/rateLimitKey-DLGdeFd2.mjs +138 -0
  149. package/dist/{realtime-C-VIoXMg.mjs → realtime-CpYpIFsm.mjs} +11 -11
  150. package/dist/registry/index.d.mts +2 -2
  151. package/dist/registry/index.mjs +3 -3
  152. package/dist/{registry-DbQvODPH.mjs → registry-BQsdAlZ_.mjs} +2 -2
  153. package/dist/{relay-B61seKq1.mjs → relay-CmT3gtkP.mjs} +11 -12
  154. package/dist/{renewingLease-Dp7wmzNN.mjs → renewingLease-DaoP0K-e.mjs} +1 -1
  155. package/dist/{replyHelpers-CHii_jIO.mjs → replyHelpers-SiLr1wK4.mjs} +2 -2
  156. package/dist/{requestContext-C_mbAm8o.mjs → requestContext-B-TjFpWt.mjs} +8 -3
  157. package/dist/{health-vEo3fni4.mjs → requestId-ClcKoWLq.mjs} +154 -116
  158. package/dist/{requirement-C8OsWLYp.mjs → requirement-BygDzjDS.mjs} +1 -1
  159. package/dist/{resourceRateLimit-DhbQZjE2.mjs → resourceRateLimit-DdIYis3m.mjs} +2 -2
  160. package/dist/{rolldown-runtime-HTi8KV7V.mjs → rolldown-runtime-Cy6j0m8_.mjs} +1 -1
  161. package/dist/{routeValidator-DnQ2BGnH.mjs → routeValidator-Bn-x2gaJ.mjs} +1 -1
  162. package/dist/{runtimeCapabilities-G9QXHov1.mjs → runtimeCapabilities-DY20Pibh.mjs} +7 -2
  163. package/dist/{schedules-DAthT5O3.mjs → schedules-CwqC0Mp0.mjs} +5 -5
  164. package/dist/{schemaConverter-BOt_ed78.mjs → schemaConverter-XoLKVpzG.mjs} +2 -2
  165. package/dist/{schemaIR-MZVVj6Cw.mjs → schemaIR-DP7mMj7c.mjs} +16 -16
  166. package/dist/schemas/index.mjs +1 -1
  167. package/dist/scim/index.mjs +2 -2
  168. package/dist/scope/index.d.mts +6 -2
  169. package/dist/scope/index.mjs +5 -5
  170. package/dist/{scope-btg-225w.mjs → scope-B0vgM2Zw.mjs} +4 -4
  171. package/dist/{shutdown-Dfy8La90.mjs → shutdown-C76Hn-Th.mjs} +1 -1
  172. package/dist/{simpleEqualityMatcher-D5dOqbbj.mjs → simpleEqualityMatcher-Qbl-11cE.mjs} +1 -1
  173. package/dist/{sse-DivxX1m6.mjs → sse-eyb8lNuI.mjs} +7 -7
  174. package/dist/{sseStream-hQxQjvre.mjs → sseStream-BsBesrfw.mjs} +2 -2
  175. package/dist/{store-helpers-DfqfssAw.mjs → store-helpers-D1yIVa91.mjs} +1 -1
  176. package/dist/{streaming-CQiOktsh.mjs → streaming-DKziqs1Z.mjs} +1 -1
  177. package/dist/{subscriberIdentity-Bf8VLqA7.mjs → subscriberIdentity-DpdSQMQq.mjs} +1 -1
  178. package/dist/{tenancy-Btmaf1MB.mjs → tenancy-YuRYsOPr.mjs} +2 -2
  179. package/dist/{tenantPreparation-4e3qyb6q.mjs → tenantPreparation-Bk8ouRB3.mjs} +17 -5
  180. package/dist/testing/cleanupStoreContract.mjs +1 -1
  181. package/dist/testing/index.d.mts +4 -4
  182. package/dist/testing/index.mjs +11 -11
  183. package/dist/testing/outboxStoreContract.mjs +2 -2
  184. package/dist/testing/requiredPorts.d.mts +1 -1
  185. package/dist/testing/requiredPorts.mjs +2 -2
  186. package/dist/testing/storageContract.mjs +1 -1
  187. package/dist/{timing-DXx0IWyi.mjs → timing-BtIDIdQz.mjs} +1 -1
  188. package/dist/{transactionContext-DperjON1.mjs → transactionContext-BsQ5ortM.mjs} +1 -1
  189. package/dist/{typeGuards-eoQLIOh6.mjs → typeGuards-Cr2_zEW0.mjs} +1 -1
  190. package/dist/types/index.d.mts +2 -2
  191. package/dist/types/index.mjs +1 -1
  192. package/dist/types/storage.mjs +1 -1
  193. package/dist/{types-BeEJm-DV.d.mts → types-CQhHTZXs.d.mts} +48 -35
  194. package/dist/{types-B4E0sc6D.d.mts → types-DWFgq8EP.d.mts} +1 -1
  195. package/dist/{types-CcpISJe8.mjs → types-ZvdR7MVa.mjs} +4 -4
  196. package/dist/usage/index.mjs +4 -4
  197. package/dist/{userHelpers-Cp5zqlEN.mjs → userHelpers-CwpEK36a.mjs} +1 -1
  198. package/dist/utils/index.d.mts +1 -1
  199. package/dist/utils/index.mjs +12 -12
  200. package/dist/{utils-dKN-_315.mjs → utils-CnrfcYMq.mjs} +6 -6
  201. package/dist/{validate-BZHaAdgy.mjs → validate-BTQBh-Dr.mjs} +3 -3
  202. package/dist/{versioning-CPLP0VbB.mjs → versioning-DiLykI6U.mjs} +3 -3
  203. package/dist/{workScope-BI72KXsI.mjs → workScope-C3tPz_Gt.mjs} +2 -2
  204. package/package.json +34 -9
  205. package/skills/arc/SKILL.md +5 -5
  206. package/skills/arc/references/api-reference.md +1 -1
  207. package/skills/arc/references/boot.md +17 -2
  208. package/skills/arc/references/events.md +0 -1
  209. package/skills/arc/references/mcp-setup.md +3 -2
  210. package/skills/arc/references/multi-tenancy.md +1 -1
  211. package/skills/arc/references/production-api.md +19 -12
  212. package/skills/arc/references/production-audit.md +1 -1
  213. package/skills/arc/references/production-boot.md +3 -3
  214. package/skills/arc/references/production-idempotency.md +2 -2
  215. package/skills/arc/references/production-observability.md +14 -2
  216. package/skills/arc/references/production-reliability.md +1 -1
  217. package/skills/arc/references/querying.md +1 -2
  218. package/skills/arc/references/resources.md +8 -6
  219. package/skills/arc/references/testing.md +1 -1
  220. package/skills/arc-code-review/references/arc-cheatsheet.md +1 -1
  221. package/skills/arc-code-review/references/recipe-scope-permissions.md +1 -1
  222. package/skills/arc-module-publishing/references/resource-assembly.md +2 -2
  223. package/dist/rateLimitKey-B1RxyGt3.mjs +0 -40
@@ -1,9 +1,32 @@
1
1
 
2
- import { a as ResolvedModuleDescriptor, o as ResolvedModuleLifecycle, s as ResolvedResourceDescriptor } from "../fastify-augmentation-baQc3MaO.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-Dhrks-hM.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 verifyModuleGraph, A as AsyncApiCatalogEntry, B as ModuleGraphMode, C as planModules, D as ModuleExtension, E as subscribeModuleEventHandlers, F as DurabilityFacts, G as activateBridges, H as ModuleGraphOptions, I as HandlerDurabilityFact, J as crudEventsOf, K as analyzeModuleGraph, L as ModuleGraph, M as toAsyncApi, N as CrudSurface, O as extendModule, P as DerivedPublishes, Q as verifyEventDurability, R as ModuleGraphAnalysis, S as compositionProblems, T as orderModules, U as ModuleKind, V as ModuleGraphNode, W as SkippedBridge, X as eventTopology, Y as dependentsOf, Z as renderModuleGraph, _ as ClosureNode, a as lazyModuleExports, b as PlanModulesOptions, c as getModuleResources, d as resolveContribution, f as resolveModule, g as withRelayNudge, h as createRelayNudge, i as hasModuleExports, j as AsyncApiInfo, k as collectModuleWorkflows, l as getModuleState, m as RelayOption, n as getModuleExports, o as lazyRequiredModuleExports, p as RelayNudge, q as buildModuleGraph, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as hasModule, v as CompositionProblem, w as resolveModuleClosure, x as assertComposable, y as ModulePlan, z as ModuleGraphIssue } from "../index-DexdFs1a.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 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, 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.51.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-DpG26bCu.mjs";
3
- import { r as mergeHealthChecks, t as healthPlugin } from "../health-vEo3fni4.mjs";
4
- import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-KFxT1Iuk.mjs";
5
- import { t as loadResources } from "../loadResources-CcupAVJH.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-BvLJGm3U.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, 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 };
@@ -1,8 +1,9 @@
1
1
 
2
- import { M as ResourceRegistry, pn as HookSystem } from "./index-DLCcLUQT.mjs";
2
+ import { M as ResourceRegistry, mn as HookSystem } from "./index-DtHACefu.mjs";
3
+ import { t as HealthCheck } from "./health-skjSwNaC.mjs";
3
4
  import { t as ExternalOpenApiPaths } from "./externalPaths-BOqdq5wr.mjs";
4
- import { F as HealthCheck, i as ArcModuleRegistry, n as ArcModule, x as ScheduleDefinition } from "./types-BeEJm-DV.mjs";
5
- import { L as ModuleGraph, s as ModuleState } from "./index-DexdFs1a.mjs";
5
+ import { i as ArcModuleRegistry, n as ArcModule, w as ScheduleDefinition } from "./types-CQhHTZXs.mjs";
6
+ import { l as ModuleState, z as ModuleGraph } from "./index-CaBFPmnu.mjs";
6
7
  import { FastifyPluginAsync } from "fastify";
7
8
  /**
8
9
  * Resolved module introspection — what a module ACTUALLY composed to.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-HTi8KV7V.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Cy6j0m8_.mjs";
3
3
  // src/core/aggregation/fieldTypes.ts
4
4
  var fieldTypes_exports = /* @__PURE__ */ __exportAll({
5
5
  coerceByType: () => coerceByType,
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  // src/permissions/fields.ts
3
3
  /**
4
4
  * Field-Level Permissions
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  // src/permissions/filter-merge.ts
3
3
  /**
4
4
  * Policy-filter composition — logical AND, never last-writer-wins.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as pluralize } from "./pluralize-ClwfBdIx.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as pluralize } from "./pluralize-CJKgYkVc.mjs";
3
3
  import { join } from "node:path";
4
4
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  // src/cli/commands/generate/name-helpers.ts
@@ -374,7 +374,7 @@ const ${camel}Resource = defineResource${ts ? `<I${name}>` : ""}({
374
374
 
375
375
  // 2.16 — declarative CRUD allow-list (positive form). Uncomment to
376
376
  // restrict the surface; a future arc CRUD op won't silently leak in
377
- // because every op is opt-in. Mutually exclusive with \`disabledRoutes\`.
377
+ // because every op is opt-in.
378
378
  // crud: { list: true, get: true },
379
379
 
380
380
  permissions: {
@@ -425,7 +425,7 @@ const ${camel}Resource = defineResource${ts ? `<I${name}>` : ""}({
425
425
 
426
426
  // 2.16 — declarative CRUD allow-list (positive form). Uncomment to
427
427
  // restrict the surface; a future arc CRUD op won't silently leak in
428
- // because every op is opt-in. Mutually exclusive with \`disabledRoutes\`.
428
+ // because every op is opt-in.
429
429
  // crud: { list: true, get: true },
430
430
 
431
431
  permissions: {
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { u as ValidationError } from "./errors-KBZ3tQk5.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { u as ValidationError } from "./errors-Ukhmfmmx.mjs";
3
3
  // src/utils/headers.ts
4
4
  /**
5
5
  * Canonical header typing + accessor.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  // src/events/outbox/health.ts
3
3
  /** Pending age past which the relay counts as stalled. */
4
4
  const DEFAULT_RELAY_LAG_UNHEALTHY_MS = 3e5;
@@ -0,0 +1,36 @@
1
+
2
+ import { FastifyPluginAsync } from "fastify";
3
+ interface HealthCheck {
4
+ /** Name of the dependency */
5
+ name: string;
6
+ /**
7
+ * Function that returns true if healthy, false otherwise.
8
+ *
9
+ * Receives an `AbortSignal` aborted when the check's timeout elapses —
10
+ * pass it to fetch/driver calls so a stalled dependency probe actually
11
+ * STOPS instead of accumulating an abandoned operation per readiness
12
+ * poll. Ignoring the parameter is fine (back-compat): the timeout still
13
+ * bounds how long the PROBE waits, just not the underlying work.
14
+ */
15
+ check: (signal?: AbortSignal) => Promise<boolean> | boolean;
16
+ /** Optional timeout in ms (default: 5000) */
17
+ timeout?: number;
18
+ /** Whether this check is critical for readiness (default: true) */
19
+ critical?: boolean;
20
+ }
21
+ interface HealthOptions {
22
+ /** Route prefix (default: '/_health') */
23
+ prefix?: string;
24
+ /** Health check dependencies */
25
+ checks?: readonly HealthCheck[];
26
+ /** Enable metrics endpoint (default: false) */
27
+ metrics?: boolean;
28
+ /** Custom metrics collector function */
29
+ metricsCollector?: () => Promise<string> | string;
30
+ /** Version info to include in responses */
31
+ version?: string;
32
+ /** Collect HTTP request metrics (default: true if metrics enabled) */
33
+ collectHttpMetrics?: boolean;
34
+ }
35
+ declare const _default: FastifyPluginAsync<HealthOptions>;
36
+ export { HealthOptions as n, _default as r, HealthCheck as t };
@@ -1,3 +1,3 @@
1
1
 
2
- import { Sn as defineHook, _n as afterUpdate, bn as beforeUpdate, cn as HookContext, dn as HookPhase, fn as HookRegistration, gn as afterDelete, hn as afterCreate, ln as HookHandler, mn as HookSystemOptions, on as AroundHookHandler, pn as HookSystem, sn as DefineHookOptions, un as HookOperation, vn as beforeCreate, xn as createHookSystem, yn as beforeDelete } from "../index-DLCcLUQT.mjs";
2
+ import { Cn as defineHook, Sn as createHookSystem, _n as afterDelete, bn as beforeDelete, cn as DefineHookOptions, dn as HookOperation, fn as HookPhase, gn as afterCreate, hn as HookSystemOptions, ln as HookContext, mn as HookSystem, pn as HookRegistration, sn as AroundHookHandler, un as HookHandler, vn as afterUpdate, xn as beforeUpdate, yn as beforeCreate } from "../index-DtHACefu.mjs";
3
3
  export { type AroundHookHandler, type DefineHookOptions, type HookContext, type HookHandler, type HookOperation, type HookPhase, type HookRegistration, HookSystem, type HookSystemOptions, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
@@ -1,2 +1,2 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-DBAu9uNT.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-DNwxV463.mjs";
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { n as chunkTags, t as CachePurgeError } from "../purger.types-BEzTVDOU.mjs";
3
- import { t as hasEvents } from "../typeGuards-eoQLIOh6.mjs";
4
- import { r as exponentialBackoff, t as EventOutbox } from "../relay-B61seKq1.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { n as chunkTags, t as CachePurgeError } from "../purger.types-BcHeAhY_.mjs";
3
+ import { t as hasEvents } from "../typeGuards-Cr2_zEW0.mjs";
4
+ import { r as exponentialBackoff, t as EventOutbox } from "../relay-CmT3gtkP.mjs";
5
5
  import fp from "fastify-plugin";
6
6
  import { createEvent } from "@classytic/primitives/events";
7
7
  // src/http-cache/invalidation/delivery.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as CachePurgeError } from "../../purger.types-BEzTVDOU.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as CachePurgeError } from "../../purger.types-BcHeAhY_.mjs";
3
3
  // src/http-cache/purgers/cloudflare.ts
4
4
  /**
5
5
  * Cloudflare purge-by-tag (`Cache-Tag`). Needs an API token scoped to Zone > Cache Purge only.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as CachePurgeError } from "../../purger.types-BEzTVDOU.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as CachePurgeError } from "../../purger.types-BcHeAhY_.mjs";
3
3
  // src/http-cache/purgers/fastly.ts
4
4
  /**
5
5
  * Fastly surrogate-key purge, with soft purge (`Fastly-Soft-Purge: 1`). Responses must carry the tags in
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
2
  // src/http-cache/testing/assertions.ts
3
3
  const header = (res, name) => {
4
4
  const v = res.headers[name];
@@ -67,7 +67,13 @@ interface IdempotencyPluginOptions {
67
67
  * remain as the runtime backstop.
68
68
  */
69
69
  selfCheck?: boolean;
70
- /** Migration escape for legacy custom stores without atomic completion fencing; warns at boot. */
70
+ /**
71
+ * Migration escape for legacy custom stores without atomic completion fencing.
72
+ *
73
+ * @deprecated Implement `setIfLocked` (atomic fenced completion) on the custom
74
+ * store; the built-in stores already do. Warns once per process; removed in
75
+ * the next minor.
76
+ */
71
77
  allowUnfencedCompletion?: boolean;
72
78
  }
73
79
  declare module "fastify" {
@@ -1,10 +1,11 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { d as createDomainError } from "../errors-KBZ3tQk5.mjs";
3
- import { n as requireSingleHeaderValue } from "../headers-D5wrBLOk.mjs";
4
- import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-DXx0IWyi.mjs";
5
- import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-B0zhfGSm.mjs";
6
- import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-DfqfssAw.mjs";
7
- import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-C8OsWLYp.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { n as warnDeprecated } from "../deprecation-DX625dth.mjs";
3
+ import { d as createDomainError } from "../errors-Ukhmfmmx.mjs";
4
+ import { n as requireSingleHeaderValue } from "../headers-Ib7BDgRI.mjs";
5
+ import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-BtIDIdQz.mjs";
6
+ import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-DkLruwhL.mjs";
7
+ import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-D1yIVa91.mjs";
8
+ import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-BygDzjDS.mjs";
8
9
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
9
10
  import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
10
11
  import { createHash } from "node:crypto";
@@ -413,6 +414,7 @@ const idempotencyPlugin = async (fastify, opts = {}) => {
413
414
  * (host-owned) is never touched.
414
415
  */
415
416
  const ownsStore = !explicitStore;
417
+ if (opts.allowUnfencedCompletion !== void 0) warnDeprecated("The idempotencyPlugin `allowUnfencedCompletion` option", "Implement atomic `setIfLocked` completion fencing on the custom store.");
416
418
  if (enabled && (typeof store.setIfLocked !== "function" || store.supportsFencedCompletion === false)) {
417
419
  if (!opts.allowUnfencedCompletion) throw new Error("[arc idempotency] Store must implement atomic setIfLocked completion fencing. Upgrade the store or explicitly allowUnfencedCompletion during migration.");
418
420
  fastify.log.warn("Idempotency completion is unfenced: an expired request can overwrite another owner's response. Upgrade the custom store's setIfLocked implementation.");
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
2
- import { t as acquireBySteps } from "../acquire-B0zhfGSm.mjs";
1
+ /*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
2
+ import { t as acquireBySteps } from "../acquire-DkLruwhL.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  // src/idempotency/stores/redis.ts
5
5
  /**
@@ -360,9 +360,10 @@ declare function requireRoles(roles: readonly string[], options?: {
360
360
  */
361
361
  declare function requirePlatformRole(...args: string[] | [readonly string[]]): PermissionCheck;
362
362
  /**
363
- * Short-form alias of `requireRoles()`. Identical behavior — checks both
364
- * platform roles AND org roles. Prefer `requireRoles` for new code; this
365
- * exists for call sites that want a terser name.
363
+ * Short-form alias of `requireRoles()` — checks platform AND org roles.
364
+ *
365
+ * @deprecated Use `requireRoles(...)`. Warns once per process; removed in the
366
+ * next minor.
366
367
  */
367
368
  declare function roles(...args: string[] | [readonly string[]]): PermissionCheck;
368
369
  /**
@@ -1046,7 +1047,7 @@ declare function fullPublic<TDoc = Record<string, unknown>>(overrides?: Permissi
1046
1047
  * Writes carry an explicit `denyAll` check — an omitted CRUD permission
1047
1048
  * mounts the route with NO gate (public-by-omission), so leaving
1048
1049
  * create/update/delete undefined here would expose unauthenticated writes.
1049
- * Hosts that disable write routes entirely (`disabledRoutes`) are unaffected.
1050
+ * Hosts that disable write routes entirely (`crud: { list: true, get: true }`) are unaffected.
1050
1051
  */
1051
1052
  declare function readOnly<TDoc = Record<string, unknown>>(overrides?: PermissionOverrides<TDoc>): ResourcePermissions<TDoc>;
1052
1053
  /**
@@ -1136,4 +1137,12 @@ declare function introspectModule(mod: Record<string, unknown>): Record<string,
1136
1137
  /** Every live resource's ACTUAL gates, keyed by arc resource name. */
1137
1138
  declare function introspectRegistry(registry: PermissionMatrixRegistry): Record<string, Record<string, PermissionEntry>>;
1138
1139
  declare function buildPermissionMatrix(options?: PermissionMatrixOptions): PermissionMatrix;
1139
- export { deny as $, GrantResolution as A, explainAccess as B, requireScopeContext as C, createRoleHierarchy as D, RoleHierarchy as E, AccessExplanation as F, createDynamicPermissionMatrix as G, DynamicPermissionMatrix as H, PermissionRequirement as I, PublicPolicy as J, createOrgPermissions as K, collectPublicSurface as L, modeSatisfies as M, requireGrant as N, GRANT_MODES as O, conjoinPolicyFilters as P, anyOf as Q, describePermission as R, requireOrgRole as S, requireTeamMembership as T, DynamicPermissionMatrixConfig as U, ConnectEventsOptions as V, PermissionEventBus as W, allow as X, allOf as Y, allowPublic as Z, publicRead as _, requireMandate as _t, PermissionMatrixRegistry as a, requireRoles as at, requireOrgInScope as b, introspectModule as c, scopeOf as ct, adminOnly as d, evaluatePermissionDecision as dt, denyAll as et, authenticated as f, normalizeToDecision as ft, presets_d_exports as g, requireDPoP as gt, permissionMatrix as h, requireAgentScope as ht, PermissionMatrixOptions as i, requirePlatformRole as it, RequireGrantOptions as j, GrantMode as k, introspectRegistry as l, PermissionCheckReturn as lt, ownerWithAdminBypass as m, RequireMandateOptions as mt, PermissionEntryType as n, requireAuth as nt, buildPermissionMatrix as o, roles as ot, fullPublic as p, RequireAgentScopeOptions as pt, AllowPublicOptions as q, PermissionMatrix as r, requireOwnership as rt, introspectCheck as s, when as st, PermissionEntry as t, not as tt, PermissionOverrides as u, applyAuthorizationDecision as ut, publicReadAdminWrite as v, requireServiceScope as w, requireOrgMembership as x, readOnly as y, describePermissionMap as z };
1140
+ /**
1141
+ * Namespace alias for the preset bundles.
1142
+ *
1143
+ * @deprecated Import the preset itself: `import { publicRead } from
1144
+ * '@classytic/arc/permissions'` then `permissions: publicRead()`. Warns once per
1145
+ * process; removed in the next minor.
1146
+ */
1147
+ declare const permissions: typeof presets_d_exports;
1148
+ export { deny as $, GrantResolution as A, explainAccess as B, requireScopeContext as C, createRoleHierarchy as D, RoleHierarchy as E, AccessExplanation as F, createDynamicPermissionMatrix as G, DynamicPermissionMatrix as H, PermissionRequirement as I, PublicPolicy as J, createOrgPermissions as K, collectPublicSurface as L, modeSatisfies as M, requireGrant as N, GRANT_MODES as O, conjoinPolicyFilters as P, anyOf as Q, describePermission as R, requireOrgRole as S, requireTeamMembership as T, DynamicPermissionMatrixConfig as U, ConnectEventsOptions as V, PermissionEventBus as W, allow as X, allOf as Y, allowPublic as Z, publicRead as _, requireMandate as _t, PermissionMatrixOptions as a, requireRoles as at, requireOrgInScope as b, introspectCheck as c, scopeOf as ct, PermissionOverrides as d, evaluatePermissionDecision as dt, denyAll as et, adminOnly as f, normalizeToDecision as ft, permissionMatrix as g, requireDPoP as gt, ownerWithAdminBypass as h, requireAgentScope as ht, PermissionMatrix as i, requirePlatformRole as it, RequireGrantOptions as j, GrantMode as k, introspectModule as l, PermissionCheckReturn as lt, fullPublic as m, RequireMandateOptions as mt, PermissionEntry as n, requireAuth as nt, PermissionMatrixRegistry as o, roles as ot, authenticated as p, RequireAgentScopeOptions as pt, AllowPublicOptions as q, PermissionEntryType as r, requireOwnership as rt, buildPermissionMatrix as s, when as st, permissions as t, not as tt, introspectRegistry as u, applyAuthorizationDecision as ut, publicReadAdminWrite as v, requireServiceScope as w, requireOrgMembership as x, readOnly as y, describePermissionMap as z };
@@ -1,16 +1,17 @@
1
1
 
2
- import { I as HealthOptions, _ as ResourceLike, o as ArcPorts, r as ArcModuleInput, w as SchedulesPluginOptions } from "./types-BeEJm-DV.mjs";
2
+ import { n as HealthOptions } from "./health-skjSwNaC.mjs";
3
3
  import { a as MetricsOptions, c as RealtimeOptions, f as CachingOptions, h as GracefulShutdownOptions, t as VersioningOptions, u as SSEOptions } from "./versioning-B07RgD27.mjs";
4
- import { t as EventPluginOptions } from "./eventPlugin-BY38F6yK.mjs";
4
+ import { t as EventPluginOptions } from "./eventPlugin-BeJasppx.mjs";
5
+ import { D as SchedulesPluginOptions, b as ResourceLike, o as ArcPorts, r as ArcModuleInput } from "./types-CQhHTZXs.mjs";
5
6
  import { r as QueryCachePluginOptions } from "./queryCachePlugin-DrQNnGws.mjs";
6
7
  import { t as ErrorHandlerOptions } from "./errorHandler-B9r88jZV.mjs";
7
- import { H as ModuleGraphOptions } from "./index-DexdFs1a.mjs";
8
+ import { W as ModuleGraphOptions } from "./index-CaBFPmnu.mjs";
8
9
  import { r as CacheStore } from "./interface-WR1U0K7t.mjs";
9
10
  import { a as EventTransport } from "./EventTransport-CYEoCJGe.mjs";
10
11
  import { i as IdempotencyStore } from "./interface-BmExzQRD.mjs";
11
12
  import { n as ElevationOptions } from "./elevation-DPD0hcU-.mjs";
12
13
  import { t as ExternalOpenApiPaths } from "./externalPaths-BOqdq5wr.mjs";
13
- import { Pt as Authenticator } from "./index-DLCcLUQT.mjs";
14
+ import { Ft as Authenticator } from "./index-DtHACefu.mjs";
14
15
  import { FastifyInstance, FastifyPluginAsync, FastifyReply, FastifyRequest, FastifyServerOptions } from "fastify";
15
16
  import { ServerOptions } from "node:http";
16
17
  /**
@@ -349,6 +350,14 @@ type RateLimitOpts = Record<string, unknown> & {
349
350
  * of user traffic — session heartbeat, webhooks, health probes.
350
351
  */
351
352
  skipPaths?: string[];
353
+ /**
354
+ * Early per-IP ceiling that rides alongside arc's DEFAULT key (per signed-in user, per
355
+ * IP when anonymous, at `preHandler`). Counted at `onRequest`, before auth and body
356
+ * parsing, so floods and unmatched routes are still bounded. Default
357
+ * `max(2000, 20 × max)` per `timeWindow`. A number sets it; `false` drops it. Ignored
358
+ * when the host supplies `keyGenerator` or `plan` (no ceiling is added then).
359
+ */
360
+ ipCeiling?: number | false;
352
361
  /**
353
362
  * Plan-aware limits (2.22) — resolve the caller's plan per request and
354
363
  * apply that plan's ceiling instead of the global `max`:
@@ -1,6 +1,7 @@
1
1
 
2
- import { h as ModuleSetupContext, i as ArcModuleRegistry, l as ModuleContribution, n as ArcModule, o as ArcPorts, p as PortName, r as ArcModuleInput, u as ModuleName } from "./types-BeEJm-DV.mjs";
3
- import { F as ResourceDefinition } from "./index-DLCcLUQT.mjs";
2
+ import { d as ModuleFacts, g as PortName, i as ArcModuleRegistry, n as ArcModule, o as ArcPorts, p as ModuleName, r as ArcModuleInput, u as ModuleContribution, v as ModuleSetupContext } from "./types-CQhHTZXs.mjs";
3
+ import "./health-skjSwNaC.mjs";
4
+ import { F as ResourceDefinition } from "./index-DtHACefu.mjs";
4
5
  import { FastifyInstance } from "fastify";
5
6
  type ModuleKind = "domain" | "bridge" | "platform" | "aggregator";
6
7
  /** How strictly the event graph is checked at boot. */
@@ -243,6 +244,8 @@ interface CompositionProblem {
243
244
  /** The missing module or port, or the duplicated name. */
244
245
  readonly target: string;
245
246
  readonly message: string;
247
+ /** One line: what to change. */
248
+ readonly fix: string;
246
249
  }
247
250
  /**
248
251
  * Every problem in an ACTIVE module list (bridges already activated): duplicate names,
@@ -250,7 +253,7 @@ interface CompositionProblem {
250
253
  * `orderModules`' to report, with their path.
251
254
  */
252
255
  declare function compositionProblems(modules: readonly Pick<ArcModule, "name" | "dependsOn" | "requires">[], ports?: ArcPorts): CompositionProblem[];
253
- /** Throw ONE error listing every composition problem, or return. */
256
+ /** Throw ONE `ArcBootError` listing every composition problem, or return. */
254
257
  declare function assertComposable(modules: readonly Pick<ArcModule, "name" | "dependsOn" | "requires">[], ports?: ArcPorts): void;
255
258
  /** What `createApp` would compose — without booting anything or loading a lazy bridge. */
256
259
  interface ModulePlan {
@@ -266,8 +269,9 @@ interface PlanModulesOptions {
266
269
  readonly ports?: ArcPorts;
267
270
  }
268
271
  /**
269
- * Dry-run a composition: resolve inputs, activate bridges, order, check requirements — the same
270
- * functions `createApp` calls, so the plan fails where boot would and orders as boot would.
272
+ * Dry-run a composition: resolve inputs, activate bridges, order, check requirements and module
273
+ * invariants — the same functions `createApp` calls, so the plan fails where boot would and
274
+ * orders as boot would.
271
275
  *
272
276
  * Thunks ARE invoked (their result is the module); a `LazyBridge` is decided on its declaration
273
277
  * and never loaded.
@@ -368,7 +372,7 @@ declare function getModuleResources(fastify: FastifyInstance, name: string): Res
368
372
  * });
369
373
  * ```
370
374
  */
371
- declare function defineModule<TExports = unknown, const TPorts extends PortName = never, const TOptionalPorts extends PortName = never>(module: ArcModule<TExports, TPorts, TOptionalPorts>): ArcModule<TExports, TPorts, TOptionalPorts>;
375
+ declare function defineModule<TExports = unknown, const TPorts extends PortName = never, const TOptionalPorts extends PortName = never, TFacts extends ModuleFacts = ModuleFacts>(module: ArcModule<TExports, TPorts, TOptionalPorts, TFacts>): ArcModule<TExports, TPorts, TOptionalPorts, TFacts>;
372
376
  /**
373
377
  * Typed accessor for a module's public export (its `bootstrap` return value),
374
378
  * recorded at `fastify.arc.modules[name]`.
@@ -485,4 +489,22 @@ declare function lazyModuleExports<TExports = unknown>(fastify: FastifyInstance,
485
489
  */
486
490
  declare function lazyRequiredModuleExports<K extends keyof ArcModuleRegistry>(fastify: FastifyInstance, name: K): () => ArcModuleRegistry[K];
487
491
  declare function lazyRequiredModuleExports<TExports = unknown>(fastify: FastifyInstance, name: string): () => TExports;
488
- export { verifyModuleGraph as $, AsyncApiCatalogEntry as A, ModuleGraphMode as B, planModules as C, ModuleExtension as D, subscribeModuleEventHandlers as E, DurabilityFacts as F, activateBridges as G, ModuleGraphOptions as H, HandlerDurabilityFact as I, crudEventsOf as J, analyzeModuleGraph as K, ModuleGraph as L, toAsyncApi as M, CrudSurface as N, extendModule as O, DerivedPublishes as P, verifyEventDurability as Q, ModuleGraphAnalysis as R, compositionProblems as S, orderModules as T, ModuleKind as U, ModuleGraphNode as V, SkippedBridge as W, eventTopology as X, dependentsOf as Y, renderModuleGraph as Z, ClosureNode as _, lazyModuleExports as a, PlanModulesOptions as b, getModuleResources as c, resolveContribution as d, resolveModule as f, withRelayNudge as g, createRelayNudge as h, hasModuleExports as i, AsyncApiInfo as j, collectModuleWorkflows as k, getModuleState as l, RelayOption as m, getModuleExports as n, lazyRequiredModuleExports as o, RelayNudge as p, buildModuleGraph as q, getOptionalModuleExports as r, ModuleState as s, defineModule as t, hasModule as u, CompositionProblem as v, resolveModuleClosure as w, assertComposable as x, ModulePlan as y, ModuleGraphIssue as z };
492
+ /** A sibling module's export for a seam built at COMPOSITION, before any app exists. See `moduleHandleRef`. */
493
+ interface ModuleHandleRef<T> {
494
+ /** Call from the consumer's `plugins` arm: records the booting app. */
495
+ readonly plugins: (fastify: FastifyInstance) => undefined;
496
+ /** The sibling's export; throws by name when read before the consumer's app booted. */
497
+ readonly get: () => T;
498
+ /** The sibling's export, or `undefined` when it is not composed (an OPTIONAL sibling, no edge). */
499
+ readonly find: () => T | undefined;
500
+ /** Whether the recording module's app booted; `false` when that module is not composed. */
501
+ readonly booted: () => boolean;
502
+ }
503
+ /**
504
+ * A handle for seams a module builds at composition but calls at request or event time: spread `plugins`
505
+ * into the consumer and call `get()` from the seam. Declare a required sibling in the consumer's `dependsOn`.
506
+ * Pinned by tests/factory/module-handle-ref.test.ts.
507
+ */
508
+ declare function moduleHandleRef<K extends keyof ArcModuleRegistry>(name: K): ModuleHandleRef<ArcModuleRegistry[K]>;
509
+ declare function moduleHandleRef<TExports = unknown>(name: string): ModuleHandleRef<TExports>;
510
+ export { renderModuleGraph as $, extendModule as A, ModuleGraphAnalysis as B, assertComposable as C, orderModules as D, resolveModuleClosure as E, CrudSurface as F, ModuleKind as G, ModuleGraphMode as H, DerivedPublishes as I, analyzeModuleGraph as J, SkippedBridge as K, DurabilityFacts as L, AsyncApiCatalogEntry as M, AsyncApiInfo as N, subscribeModuleEventHandlers as O, toAsyncApi as P, eventTopology as Q, HandlerDurabilityFact as R, PlanModulesOptions as S, planModules as T, ModuleGraphNode as U, ModuleGraphIssue as V, ModuleGraphOptions as W, crudEventsOf as X, buildModuleGraph as Y, dependentsOf as Z, createRelayNudge as _, hasModuleExports as a, CompositionProblem as b, moduleHandleRef as c, getModuleState as d, verifyEventDurability as et, hasModule as f, RelayOption as g, RelayNudge as h, getOptionalModuleExports as i, collectModuleWorkflows as j, ModuleExtension as k, ModuleState as l, resolveModule as m, defineModule as n, lazyModuleExports as o, resolveContribution as p, activateBridges as q, getModuleExports as r, lazyRequiredModuleExports as s, ModuleHandleRef as t, verifyModuleGraph as tt, getModuleResources as u, withRelayNudge as v, compositionProblems as w, ModulePlan as x, ClosureNode as y, ModuleGraph as z };
@@ -1,6 +1,6 @@
1
1
 
2
- import "./fastify-augmentation-baQc3MaO.mjs";
3
- import { A as RequestWithExtras, F as ResourceDefinition, I as CrudController, L as ResourceConfig, O as FastifyWithDecorators, Un as IControllerResponse, Wn as IRequestContext, X as RouteSchemaOptions, Z as ArcFieldRule, g as RequestContext, k as MiddlewareHandler, kt as RouteMcpConfig, ot as AggregationConfig, v as CrudRouterOptions, wt as ActionDefinition } from "./index-DLCcLUQT.mjs";
2
+ import "./fastify-augmentation-DjxuSRG4.mjs";
3
+ import { A as RequestWithExtras, At as RouteMcpConfig, F as ResourceDefinition, Gn as IRequestContext, I as CrudController, L as ResourceConfig, O as FastifyWithDecorators, Q as ArcFieldRule, Tt as ActionDefinition, Wn as IControllerResponse, Z as RouteSchemaOptions, g as RequestContext, k as MiddlewareHandler, st as AggregationConfig, v as CrudRouterOptions } from "./index-DtHACefu.mjs";
4
4
  import { l as PermissionCheck, t as AnyRecord } from "./base-HXNgPQww.mjs";
5
5
  import { i as RequestScope } from "./types-DnkIALZ8.mjs";
6
6
  import { Filter } from "@classytic/repo-core/filter";