@classytic/arc 2.45.2 → 2.47.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 (333) hide show
  1. package/README.md +1 -1
  2. package/dist/{EventTransport-DHb1tpu-.mjs → EventTransport-BHKy4_Bi.mjs} +5 -6
  3. package/dist/{EventTransport-CiicKz2Z.d.mts → EventTransport-CYEoCJGe.d.mts} +0 -2
  4. package/dist/{HookSystem-C1u0EUnt.mjs → HookSystem-CAIDVoKC.mjs} +3 -4
  5. package/dist/{QueryCache--5uAuYPW.d.mts → QueryCache-DdvrGG8Q.d.mts} +1 -3
  6. package/dist/{ResourceRegistry-D2jXWVN_.mjs → ResourceRegistry-23Ml6FNe.mjs} +15 -4
  7. package/dist/{acquire-DTkA8Lme.mjs → acquire-DoFX06fm.mjs} +2 -3
  8. package/dist/{actionPermissions-DRVk6m7x.mjs → actionPermissions-DXrlWHHK.mjs} +37 -42
  9. package/dist/audit/index.d.mts +2 -10
  10. package/dist/audit/index.mjs +8 -12
  11. package/dist/auth/audit.d.mts +0 -2
  12. package/dist/auth/audit.mjs +2 -3
  13. package/dist/auth/index.d.mts +9 -17
  14. package/dist/auth/index.mjs +26 -29
  15. package/dist/auth/redis-session.d.mts +2 -4
  16. package/dist/auth/redis-session.mjs +2 -3
  17. package/dist/{authorizationDecision-D48fUJv1.mjs → authorizationDecision-DYiubkYw.mjs} +5 -6
  18. package/dist/{base-CZyixEQR.d.mts → base-HXNgPQww.d.mts} +1 -7
  19. package/dist/{boundedMap-DkKiPifd.mjs → boundedMap-CtdzpJ3X.mjs} +2 -3
  20. package/dist/{buildHandler-BiZ4VATS.mjs → buildHandler-CARdmPNo.mjs} +5 -6
  21. package/dist/cache/index.d.mts +4 -10
  22. package/dist/cache/index.mjs +5 -6
  23. package/dist/{caching-Cj0as-P1.mjs → caching-QRiryDLs.mjs} +3 -4
  24. package/dist/{claimed-ChI13rUR.mjs → claimed-BLecr1j3.mjs} +2 -3
  25. package/dist/cleanup/index.d.mts +4 -18
  26. package/dist/cleanup/index.mjs +12 -20
  27. package/dist/cli/commands/describe.d.mts +1 -3
  28. package/dist/cli/commands/describe.mjs +4 -5
  29. package/dist/cli/commands/docs.d.mts +1 -3
  30. package/dist/cli/commands/docs.mjs +4 -5
  31. package/dist/cli/commands/doctor.d.mts +1 -3
  32. package/dist/cli/commands/doctor.mjs +2 -3
  33. package/dist/cli/commands/generate.d.mts +1 -1
  34. package/dist/cli/commands/generate.mjs +2 -2
  35. package/dist/cli/commands/init.d.mts +1 -1
  36. package/dist/cli/commands/init.mjs +2 -2
  37. package/dist/cli/commands/introspect.d.mts +1 -3
  38. package/dist/cli/commands/introspect.mjs +3 -4
  39. package/dist/cli/index.d.mts +2 -2
  40. package/dist/cli/index.mjs +3 -3
  41. package/dist/{constants-D_aiew34.mjs → constants-Cx7BcnHT.mjs} +2 -3
  42. package/dist/context/index.d.mts +0 -8
  43. package/dist/context/index.mjs +6 -7
  44. package/dist/core/index.d.mts +3 -3
  45. package/dist/core/index.mjs +8 -8
  46. package/dist/{core-QIZ2560Y.mjs → core-0WyMuo0f.mjs} +9 -12
  47. package/dist/{createActionRouter-CvH84dyx.mjs → createActionRouter-mLAGbpDV.mjs} +7 -8
  48. package/dist/{createAggregationRouter-DGyK2Hp6.mjs → createAggregationRouter-BEAjn3dA.mjs} +9 -10
  49. package/dist/{createApp-CKjZpmq9.mjs → createApp-QDP4vYWH.mjs} +49 -62
  50. package/dist/{createMcpServer-DSztofa9.d.mts → createMcpServer-DzXHX0SO.d.mts} +1 -3
  51. package/dist/{defineAggregation-BLza7Ca4.mjs → defineAggregation-CFNfvz-C.mjs} +2 -3
  52. package/dist/{defineResource-CEo0gDCb.mjs → defineResource-BROJmhzJ.mjs} +80 -29
  53. package/dist/discovery/index.d.mts +1 -3
  54. package/dist/discovery/index.mjs +2 -3
  55. package/dist/docs/index.d.mts +8 -8
  56. package/dist/docs/index.mjs +4 -5
  57. package/dist/{elevation-BW2J3tNj.d.mts → elevation-DPD0hcU-.d.mts} +0 -2
  58. package/dist/{elevation-BJTsSnke.mjs → elevation-DrXeEWWk.mjs} +9 -10
  59. package/dist/encryption/index.d.mts +1 -7
  60. package/dist/encryption/index.mjs +8 -13
  61. package/dist/{errorHandler--4rSMMvq.d.mts → errorHandler-B9r88jZV.d.mts} +8 -3
  62. package/dist/{errorHandler-2p4SL5zm.mjs → errorHandler-BiBXtxj4.mjs} +16 -6
  63. package/dist/{errors-JYc9vwqE.d.mts → errors-DTo0me1o.d.mts} +0 -2
  64. package/dist/{errors-grZkIA8N.mjs → errors-DnrUChAy.mjs} +2 -3
  65. package/dist/{eventPlugin-BtmA4-3P.d.mts → eventPlugin-BY38F6yK.d.mts} +1 -7
  66. package/dist/{eventPlugin-ItcYBGUs.mjs → eventPlugin-BhKLUe7H.mjs} +10 -12
  67. package/dist/{eventTypes-Ck6fD3ne.mjs → eventTypes-CCIRGakw.mjs} +5 -8
  68. package/dist/events/index.d.mts +5 -17
  69. package/dist/events/index.mjs +9 -9
  70. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  71. package/dist/events/transports/redis-stream-entry.mjs +5 -6
  72. package/dist/events/transports/redis.d.mts +2 -4
  73. package/dist/events/transports/redis.mjs +3 -4
  74. package/dist/{externalPaths-CmGOxOtD.d.mts → externalPaths-BOqdq5wr.d.mts} +0 -2
  75. package/dist/factory/index.d.mts +4 -14
  76. package/dist/factory/index.mjs +12 -18
  77. package/dist/{fastify-augmentation-DRlCIWE9.d.mts → fastify-augmentation-bzkWPt1f.d.mts} +4 -10
  78. package/dist/{fields-BRX0Krcj.mjs → fields-CYdpcV73.mjs} +2 -3
  79. package/dist/{fields-BBSpf8pS.d.mts → fields-JTkrtO-r.d.mts} +0 -2
  80. package/dist/{filter-merge-CDc7YMwX.mjs → filter-merge-6kasezRH.mjs} +2 -3
  81. package/dist/{generate-DCGuEbqI.d.mts → generate-C-g_KOkV.d.mts} +0 -4
  82. package/dist/{generate-hvg7V2g1.mjs → generate-DUkcbc4r.mjs} +7 -12
  83. package/dist/{headers-Cqkg4LzI.mjs → headers-KxhrKevA.mjs} +3 -4
  84. package/dist/{health-PVt0VjOx.mjs → health-CRJg3IIq.mjs} +2 -3
  85. package/dist/{health-DyeP3mTW.mjs → health-jkYNdobJ.mjs} +4 -7
  86. package/dist/hooks/index.d.mts +1 -1
  87. package/dist/hooks/index.mjs +2 -2
  88. package/dist/http-cache/index.d.mts +211 -0
  89. package/dist/http-cache/index.mjs +605 -0
  90. package/dist/http-cache/purgers/cloudflare.d.mts +13 -0
  91. package/dist/http-cache/purgers/cloudflare.mjs +46 -0
  92. package/dist/http-cache/purgers/fastly.d.mts +12 -0
  93. package/dist/http-cache/purgers/fastly.mjs +47 -0
  94. package/dist/http-cache/testing/index.d.mts +68 -0
  95. package/dist/http-cache/testing/index.mjs +168 -0
  96. package/dist/idempotency/index.d.mts +3 -9
  97. package/dist/idempotency/index.mjs +11 -14
  98. package/dist/idempotency/redis.d.mts +1 -1
  99. package/dist/idempotency/redis.mjs +3 -4
  100. package/dist/{index-Bxriq3so.d.mts → index-B5i9-vuP.d.mts} +4 -26
  101. package/dist/{index-Chgz3d0i.d.mts → index-BAXDo5eE.d.mts} +1 -7
  102. package/dist/{index-Beg3aNnK.d.mts → index-BxZS-8So.d.mts} +67 -25
  103. package/dist/{index-WH7xgvxS.d.mts → index-Cy2-QffW.d.mts} +40 -92
  104. package/dist/{index-uhkUA5-U.d.mts → index-D1X_C_qz.d.mts} +13 -23
  105. package/dist/{index-CUJvoyw3.d.mts → index-DFCCQ9AE.d.mts} +2 -24
  106. package/dist/index.d.mts +7 -9
  107. package/dist/index.mjs +12 -13
  108. package/dist/{init-jC3rMPzb.mjs → init-CACwpktI.mjs} +18 -35
  109. package/dist/{init-Cscs4lab.d.mts → init-CV2_Fw3H.d.mts} +0 -4
  110. package/dist/integrations/event-gateway.d.mts +3 -5
  111. package/dist/integrations/event-gateway.mjs +3 -4
  112. package/dist/integrations/index.d.mts +3 -3
  113. package/dist/integrations/index.mjs +1 -1
  114. package/dist/integrations/jobs/index.d.mts +1 -1
  115. package/dist/integrations/jobs/index.mjs +7 -11
  116. package/dist/integrations/mcp/index.d.mts +7 -39
  117. package/dist/integrations/mcp/index.mjs +8 -14
  118. package/dist/integrations/mcp/testing.d.mts +3 -5
  119. package/dist/integrations/mcp/testing.mjs +3 -4
  120. package/dist/integrations/streamline.d.mts +1 -3
  121. package/dist/integrations/streamline.mjs +4 -5
  122. package/dist/integrations/webhooks.d.mts +2 -4
  123. package/dist/integrations/webhooks.mjs +5 -5
  124. package/dist/integrations/websocket-pushref-redis.d.mts +2 -4
  125. package/dist/integrations/websocket-pushref-redis.mjs +2 -3
  126. package/dist/integrations/websocket-redis.d.mts +2 -4
  127. package/dist/integrations/websocket-redis.mjs +2 -3
  128. package/dist/integrations/websocket.d.mts +2 -2
  129. package/dist/integrations/websocket.mjs +13 -24
  130. package/dist/{interface-JJzwH4Ro.d.mts → interface-BmExzQRD.d.mts} +0 -2
  131. package/dist/{interface-BOk3YnTz.d.mts → interface-WR1U0K7t.d.mts} +0 -2
  132. package/dist/{jsonBody-ptwyzZQ-.mjs → jsonBody-CzDBkCme.mjs} +3 -4
  133. package/dist/{keys-C1vFuSbv.mjs → keys-Cbwf6r1B.mjs} +2 -3
  134. package/dist/{loadResources-CHPDyIPn.mjs → loadResources-Kr6vuljv.mjs} +4 -5
  135. package/dist/{loadResourcesFromEntry-BkHHTu_B.mjs → loadResourcesFromEntry-D2e0qoDR.mjs} +3 -4
  136. package/dist/logger/index.d.mts +1 -3
  137. package/dist/logger/index.mjs +2 -2
  138. package/dist/{logger-C5bvCiAK.mjs → logger-C110X5Yz.mjs} +3 -5
  139. package/dist/{mcpPlugin-C9qohJCF.mjs → mcpPlugin-4lIPr9OJ.mjs} +41 -60
  140. package/dist/{memory-CxiTwT0j.mjs → memory-D9qkhXiB.mjs} +4 -5
  141. package/dist/{metrics-Ckp2zRy-.mjs → metrics-B-qrrWfI.mjs} +4 -5
  142. package/dist/middleware/index.d.mts +1 -5
  143. package/dist/middleware/index.mjs +4 -5
  144. package/dist/migrations/index.d.mts +0 -2
  145. package/dist/migrations/index.mjs +3 -4
  146. package/dist/{module-CfnKuIuH.mjs → module-BD8xHgrz.mjs} +2 -3
  147. package/dist/{multiTenant-CAtYlW6H.d.mts → multiTenant-KZj8j1uJ.d.mts} +1 -5
  148. package/dist/{multipartBody-BFasGtP9.mjs → multipartBody-qU7KCn1l.mjs} +2 -3
  149. package/dist/observeSend-BnPtTotW.mjs +20 -0
  150. package/dist/{openapi-DAPxjYHX.mjs → openapi-DoVa5SVP.mjs} +18 -28
  151. package/dist/outbox-admin/index.d.mts +2 -4
  152. package/dist/outbox-admin/index.mjs +6 -7
  153. package/dist/{outbox-module-gZCHoE4H.d.mts → outbox-module-5Mnwcycy.d.mts} +3 -9
  154. package/dist/outbox-module-DyITEIop.mjs +297 -0
  155. package/dist/permissions/index.d.mts +4 -4
  156. package/dist/permissions/index.mjs +7 -7
  157. package/dist/{permissions-B14c3OMp.mjs → permissions-BBy4bOGi.mjs} +19 -29
  158. package/dist/{pipe-CQv7PsAK.mjs → pipe-BOm2o4UA.mjs} +3 -4
  159. package/dist/pipeline/index.d.mts +1 -9
  160. package/dist/pipeline/index.mjs +5 -8
  161. package/dist/{plan-CpnTykjb.mjs → plan-DDIGwuxr.mjs} +5 -9
  162. package/dist/{plugin-DXTjVg_Q.mjs → plugin-Bn4D_0XK.mjs} +156 -64
  163. package/dist/plugins/index.d.mts +8 -16
  164. package/dist/plugins/index.mjs +22 -26
  165. package/dist/plugins/response-cache.d.mts +2 -4
  166. package/dist/plugins/response-cache.mjs +10 -10
  167. package/dist/plugins/tracing-entry.d.mts +1 -1
  168. package/dist/plugins/tracing-entry.mjs +3 -4
  169. package/dist/{pluralize-C3VJKRGp.mjs → pluralize-ClEjcKlG.mjs} +2 -3
  170. package/dist/policy.types-DPqToKG1.d.mts +50 -0
  171. package/dist/presets/filesUpload.d.mts +4 -6
  172. package/dist/presets/filesUpload.mjs +6 -7
  173. package/dist/presets/index.d.mts +3 -19
  174. package/dist/presets/index.mjs +2 -2
  175. package/dist/presets/multiTenant.d.mts +1 -1
  176. package/dist/presets/multiTenant.mjs +7 -7
  177. package/dist/presets/search.d.mts +3 -5
  178. package/dist/presets/search.mjs +3 -4
  179. package/dist/{presets-CquqYJPy.mjs → presets-DK2jh5YR.mjs} +11 -18
  180. package/dist/{projection-CgfSLOSM.mjs → projection-BHH-sXyS.mjs} +3 -4
  181. package/dist/purger.types-2wNJK_89.mjs +24 -0
  182. package/dist/purger.types-DvPp4-yd.d.mts +26 -0
  183. package/dist/{pushref-registry-UxCkoA4C.d.mts → pushref-registry-d86QUaSq.d.mts} +0 -6
  184. package/dist/{queryCachePlugin-D0HUISHJ.mjs → queryCachePlugin-Ckqe98AM.mjs} +8 -10
  185. package/dist/{queryCachePlugin-C2lZjTxk.d.mts → queryCachePlugin-DYQUyeJ9.d.mts} +2 -4
  186. package/dist/{rateLimitKey-AvkBOMkl.mjs → rateLimitKey-CWAjlqcN.mjs} +2 -3
  187. package/dist/{realtime-CbWtVbqK.mjs → realtime-BIJi9USY.mjs} +17 -19
  188. package/dist/{redis-BDgv9Glw.d.mts → redis-RpDMemdm.d.mts} +2 -4
  189. package/dist/{redis-stream-BMk-bpQS.d.mts → redis-stream-CS1N9dwM.d.mts} +1 -3
  190. package/dist/{redisShapes-CQksY67q.d.mts → redisShapes-CqBXTn_s.d.mts} +0 -2
  191. package/dist/registry/index.d.mts +2 -12
  192. package/dist/registry/index.mjs +3 -3
  193. package/dist/{registry-BVwpAuFI.mjs → registry-y9ZA-R_J.mjs} +7 -12
  194. package/dist/{outbox-module-B4FAkx3A.mjs → relay-BNrC1CEP.mjs} +8 -306
  195. package/dist/{renewingLease-CykpeNcQ.mjs → renewingLease-CS43br5E.mjs} +2 -3
  196. package/dist/{replyHelpers-DA51IZio.mjs → replyHelpers-oZDzakGb.mjs} +3 -4
  197. package/dist/{requestContext-DIWHKDtQ.mjs → requestContext-fWb_YaV2.mjs} +2 -3
  198. package/dist/{requirement-Cp_fsMDL.mjs → requirement--2hWyyHi.mjs} +2 -3
  199. package/dist/{requirement-CbiLdQ1n.d.mts → requirement-CTRQjjQx.d.mts} +0 -2
  200. package/dist/{resourceRateLimit-BFuluodF.mjs → resourceRateLimit-1WbcyMZY.mjs} +3 -4
  201. package/dist/{resourceRateLimit-Wf6d6FL9.d.mts → resourceRateLimit-DCWglD7V.d.mts} +1 -3
  202. package/dist/{rolldown-runtime-D_lMdYOd.mjs → rolldown-runtime-yH2lHMo_.mjs} +2 -3
  203. package/dist/{routeValidator-DuLonYwr.mjs → routeValidator-BSlRIA5c.mjs} +2 -3
  204. package/dist/{runtimeCapabilities-CydRfm0i.mjs → runtimeCapabilities-CYCEtU1W.mjs} +2 -3
  205. package/dist/{schedules-B693KXxa.mjs → schedules-B5WGlYIT.mjs} +132 -9
  206. package/dist/{schemaConverter-DNvZWTV6.mjs → schemaConverter-DtNvts-6.mjs} +3 -4
  207. package/dist/{schemaIR-REV2y7Wd.mjs → schemaIR-uS_RHqa3.mjs} +3 -4
  208. package/dist/schemas/index.d.mts +0 -2
  209. package/dist/schemas/index.mjs +2 -3
  210. package/dist/scim/index.d.mts +0 -12
  211. package/dist/scim/index.mjs +10 -18
  212. package/dist/scope/index.d.mts +2 -6
  213. package/dist/scope/index.mjs +5 -5
  214. package/dist/{scope-Bevxy_ST.mjs → scope-BwVLSyNG.mjs} +5 -6
  215. package/dist/{sessionManager-qimlKV0P.d.mts → sessionManager-CdvDF04x.d.mts} +2 -4
  216. package/dist/{shutdown-CfrqPR7A.mjs → shutdown-BJiJN7FT.mjs} +2 -3
  217. package/dist/{simpleEqualityMatcher-BJwfuRKP.mjs → simpleEqualityMatcher-DGRLq-1k.mjs} +2 -3
  218. package/dist/{sse-CuNNWr2z.mjs → sse-B_50llZu.mjs} +8 -9
  219. package/dist/{sseStream-C_2ujAVY.mjs → sseStream-BjSo9Ult.mjs} +3 -4
  220. package/dist/{storage-Cx9Sz3Ou.d.mts → storage-odC5MNKN.d.mts} +0 -2
  221. package/dist/{store-helpers-C8uBGCbb.mjs → store-helpers-D-n5cwy5.mjs} +2 -3
  222. package/dist/{streaming-Bdq_M4d5.mjs → streaming-Dcgqa-hH.mjs} +2 -3
  223. package/dist/{subscriberIdentity-B-KpZkdl.mjs → subscriberIdentity-C9KhIXTF.mjs} +2 -3
  224. package/dist/{tenancy-C5PCvm1h.mjs → tenancy-COrhjPRZ.mjs} +3 -4
  225. package/dist/{tenantPreparation-dYvWrgNa.mjs → tenantPreparation-BElWHytd.mjs} +5 -6
  226. package/dist/testing/cleanupStoreContract.d.mts +2 -4
  227. package/dist/testing/cleanupStoreContract.mjs +2 -3
  228. package/dist/testing/index.d.mts +6 -32
  229. package/dist/testing/index.mjs +24 -37
  230. package/dist/testing/outboxStoreContract.d.mts +1 -3
  231. package/dist/testing/outboxStoreContract.mjs +3 -4
  232. package/dist/testing/requiredPorts.d.mts +2 -4
  233. package/dist/testing/requiredPorts.mjs +3 -4
  234. package/dist/testing/storageContract.d.mts +2 -4
  235. package/dist/testing/storageContract.mjs +2 -3
  236. package/dist/{timing-DCqsezX8.mjs → timing-CaxKbRk_.mjs} +3 -5
  237. package/dist/{tracing-Dro5eH6j.d.mts → tracing-JSFiBl5r.d.mts} +0 -2
  238. package/dist/{transactionContext-DrcNyjpv.mjs → transactionContext-8qKON0Nk.mjs} +2 -3
  239. package/dist/{typeGuards-CEl10KPy.mjs → typeGuards-DVjVSsXO.mjs} +2 -3
  240. package/dist/types/index.d.mts +4 -4
  241. package/dist/types/index.mjs +1 -1
  242. package/dist/types/storage.d.mts +1 -1
  243. package/dist/types/storage.mjs +1 -1
  244. package/dist/{types-ByHn9rEO.d.mts → types-0Dqlbgn8.d.mts} +0 -2
  245. package/dist/{types-BJ-2XqVF.d.mts → types-BeEJm-DV.d.mts} +114 -14
  246. package/dist/{types-DVLddu2q.d.mts → types-C0YJAiL0.d.mts} +0 -2
  247. package/dist/{types-D9NWjpYc.mjs → types-DZHqOuJE.mjs} +5 -6
  248. package/dist/{types-D3Ixsh00.d.mts → types-DeLiuaNv.d.mts} +2 -4
  249. package/dist/{types-Ddl9OjmE.d.mts → types-DnkIALZ8.d.mts} +0 -4
  250. package/dist/usage/index.d.mts +2 -10
  251. package/dist/usage/index.mjs +8 -12
  252. package/dist/{userHelpers-BHig1kHq.mjs → userHelpers-_eGj6kf0.mjs} +2 -3
  253. package/dist/utils/index.d.mts +5 -39
  254. package/dist/utils/index.mjs +12 -12
  255. package/dist/{utils-BG5P7_Vb.mjs → utils-Dd6MWpye.mjs} +20 -30
  256. package/dist/{validate-D_mdOCir.mjs → validate-BaF5wd0x.mjs} +5 -7
  257. package/dist/{versioning-DBGHjPh7.mjs → versioning-DyV7mwtK.mjs} +4 -5
  258. package/dist/{versioning-Bqm_57Qt.d.mts → versioning-S18y2-0C.d.mts} +1 -15
  259. package/dist/{websocket-Cs4awVyD.d.mts → websocket-BGuc-WVZ.d.mts} +1 -15
  260. package/dist/{workScope-DPPfM4m6.mjs → workScope-CmCBUmPR.mjs} +3 -4
  261. package/llms.txt +37 -30
  262. package/package.json +51 -22
  263. package/skills/arc/SKILL.md +65 -844
  264. package/skills/arc/references/agent-auth.md +82 -193
  265. package/skills/arc/references/api-reference.md +41 -245
  266. package/skills/arc/references/auth-api-keys.md +99 -0
  267. package/skills/arc/references/auth-better-auth-overlay.md +87 -0
  268. package/skills/arc/references/auth-better-auth.md +78 -0
  269. package/skills/arc/references/auth-permissions.md +100 -0
  270. package/skills/arc/references/auth-strategies.md +122 -0
  271. package/skills/arc/references/boot.md +80 -0
  272. package/skills/arc/references/enterprise-auth.md +65 -81
  273. package/skills/arc/references/events-outbox.md +90 -0
  274. package/skills/arc/references/events.md +75 -440
  275. package/skills/arc/references/integrations-jobs.md +74 -0
  276. package/skills/arc/references/integrations-realtime.md +84 -0
  277. package/skills/arc/references/integrations-webhooks.md +71 -0
  278. package/skills/arc/references/integrations-workflows.md +47 -0
  279. package/skills/arc/references/mcp-auth.md +83 -0
  280. package/skills/arc/references/mcp-custom-tools.md +125 -0
  281. package/skills/arc/references/mcp-setup.md +115 -0
  282. package/skills/arc/references/mcp-testing.md +63 -0
  283. package/skills/arc/references/multi-tenancy.md +56 -230
  284. package/skills/arc/references/permissions-scope.md +81 -0
  285. package/skills/arc/references/production-api.md +119 -0
  286. package/skills/arc/references/production-audit.md +101 -0
  287. package/skills/arc/references/production-boot.md +91 -0
  288. package/skills/arc/references/production-caching.md +63 -0
  289. package/skills/arc/references/production-distributed.md +75 -0
  290. package/skills/arc/references/production-idempotency.md +83 -0
  291. package/skills/arc/references/production-observability.md +83 -0
  292. package/skills/arc/references/production-realtime.md +70 -0
  293. package/skills/arc/references/production-reliability.md +100 -0
  294. package/skills/arc/references/production-shutdown.md +43 -0
  295. package/skills/arc/references/querying.md +76 -0
  296. package/skills/arc/references/resources.md +97 -0
  297. package/skills/arc/references/schedules.md +79 -0
  298. package/skills/arc/references/scim.md +61 -208
  299. package/skills/arc/references/tenancy-scope-install.md +82 -0
  300. package/skills/arc/references/testing.md +101 -144
  301. package/skills/arc/references/usage-cleanup-capabilities.md +45 -0
  302. package/skills/arc/references/validation.md +91 -0
  303. package/skills/arc/references/writes-hooks-errors.md +80 -0
  304. package/skills/arc-code-review/SKILL.md +67 -114
  305. package/skills/arc-code-review/references/arc-cheatsheet.md +68 -167
  306. package/skills/arc-code-review/references/mongokit-repositories.md +104 -0
  307. package/skills/arc-code-review/references/recipe-events-cache-jobs.md +112 -0
  308. package/skills/arc-code-review/references/recipe-resource.md +100 -0
  309. package/skills/arc-code-review/references/recipe-schemas-fields.md +93 -0
  310. package/skills/arc-code-review/references/recipe-scope-permissions.md +82 -0
  311. package/skills/arc-code-review/references/scaffolding.md +61 -198
  312. package/skills/arc-code-review/references/severity.md +49 -102
  313. package/skills/arc-code-review/references/smells-auth-scope.md +80 -0
  314. package/skills/arc-code-review/references/smells-data-events.md +66 -0
  315. package/skills/arc-code-review/references/smells-imports-style.md +59 -0
  316. package/skills/arc-code-review/references/smells-platform.md +89 -0
  317. package/skills/arc-code-review/references/smells-routes-schemas.md +66 -0
  318. package/skills/arc-module-publishing/SKILL.md +82 -208
  319. package/skills/arc-module-publishing/references/action-presets-and-plugins.md +87 -0
  320. package/skills/arc-module-publishing/references/build-and-types.md +73 -0
  321. package/skills/arc-module-publishing/references/module-lifecycle.md +101 -0
  322. package/skills/arc-module-publishing/references/package-manifest.md +34 -122
  323. package/skills/arc-module-publishing/references/publishing-workflow.md +44 -140
  324. package/skills/arc-module-publishing/references/resource-assembly.md +102 -0
  325. package/skills/arc-module-publishing/references/testing-packages.md +82 -0
  326. package/skills/arc/references/auth.md +0 -729
  327. package/skills/arc/references/integrations.md +0 -452
  328. package/skills/arc/references/mcp.md +0 -691
  329. package/skills/arc/references/production.md +0 -835
  330. package/skills/arc-code-review/references/anti-patterns.md +0 -1008
  331. package/skills/arc-code-review/references/migration-recipes.md +0 -649
  332. package/skills/arc-code-review/references/mongokit-migration.md +0 -360
  333. package/skills/arc-module-publishing/references/authoring-modules.md +0 -327
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
- //#region src/logger/scope.ts
3
+ // src/logger/scope.ts
4
4
  /**
5
5
  * Internal — NOT a package entry. The per-app logger scope that
6
6
  * `@classytic/arc/logger` resolves against, plus the one hook-shaped entry
@@ -30,8 +30,7 @@ const arcLoggerScope = new AsyncLocalStorage();
30
30
  function enterArcLoggerScope(options, done) {
31
31
  arcLoggerScope.run(options, done);
32
32
  }
33
- //#endregion
34
- //#region src/logger/index.ts
33
+ // src/logger/index.ts
35
34
  let globalOptions = {};
36
35
  /** Active options: the app's if we're inside one, else the process fallback. */
37
36
  function resolveOptions() {
@@ -156,5 +155,4 @@ function isSuppressed() {
156
155
  const env = typeof process !== "undefined" ? process.env?.ARC_SUPPRESS_WARNINGS : void 0;
157
156
  return env === "1" || env === "true";
158
157
  }
159
- //#endregion
160
158
  export { enterArcLoggerScope as a, runWithArcLogger as i, configureArcLogger as n, createPinoWriter as r, arcLog as t };
@@ -1,31 +1,31 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { t as arcLog } from "./logger-C5bvCiAK.mjs";
3
- import { i as NotFoundError, p as isArcError, t as ArcError } from "./errors-grZkIA8N.mjs";
4
- import { c as BaseController, n as normalizeActionsToRouterConfig, r as resolveActionTargetFence } from "./plugin-DXTjVg_Q.mjs";
5
- import { n as requireSingleHeaderValue } from "./headers-Cqkg4LzI.mjs";
6
- import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-D9NWjpYc.mjs";
7
- import { a as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-BRX0Krcj.mjs";
8
- import { o as toJsonSchema } from "./schemaConverter-DNvZWTV6.mjs";
9
- import { t as buildRequestScopeProjection } from "./projection-CgfSLOSM.mjs";
10
- import { l as resolvePipelineSteps, t as resolveActionPermission } from "./actionPermissions-DRVk6m7x.mjs";
11
- import { a as withoutTenantInjection, r as prepareTenantContext } from "./tenantPreparation-dYvWrgNa.mjs";
12
- import { r as evaluatePermissionDecision } from "./authorizationDecision-D48fUJv1.mjs";
13
- import { n as declareRuntimeCapability } from "./runtimeCapabilities-CydRfm0i.mjs";
14
- import { t as executePipeline } from "./pipe-CQv7PsAK.mjs";
15
- import { a as resourceRateLimitWindowMs, i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "./resourceRateLimit-BFuluodF.mjs";
16
- import { n as evictToSize, r as touch, t as assertCapacity } from "./boundedMap-DkKiPifd.mjs";
17
- import { t as pluralize } from "./pluralize-C3VJKRGp.mjs";
18
- import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "./timing-DCqsezX8.mjs";
19
- import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "./acquire-DTkA8Lme.mjs";
20
- import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-REV2y7Wd.mjs";
21
- import { n as validateAggregations } from "./validate-D_mdOCir.mjs";
22
- import { n as executeAggregation } from "./buildHandler-BiZ4VATS.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as arcLog } from "./logger-C110X5Yz.mjs";
3
+ import { i as NotFoundError, p as isArcError, t as ArcError } from "./errors-DnrUChAy.mjs";
4
+ import { f as BaseController, n as normalizeActionsToRouterConfig, r as resolveActionTargetFence } from "./plugin-Bn4D_0XK.mjs";
5
+ import { n as requireSingleHeaderValue } from "./headers-KxhrKevA.mjs";
6
+ import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-DZHqOuJE.mjs";
7
+ import { a as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-CYdpcV73.mjs";
8
+ import { o as toJsonSchema } from "./schemaConverter-DtNvts-6.mjs";
9
+ import { t as buildRequestScopeProjection } from "./projection-BHH-sXyS.mjs";
10
+ import { l as resolvePipelineSteps, t as resolveActionPermission } from "./actionPermissions-DXrlWHHK.mjs";
11
+ import { a as withoutTenantInjection, r as prepareTenantContext } from "./tenantPreparation-BElWHytd.mjs";
12
+ import { r as evaluatePermissionDecision } from "./authorizationDecision-DYiubkYw.mjs";
13
+ import { n as declareRuntimeCapability } from "./runtimeCapabilities-CYCEtU1W.mjs";
14
+ import { t as executePipeline } from "./pipe-BOm2o4UA.mjs";
15
+ import { a as resourceRateLimitWindowMs, i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "./resourceRateLimit-1WbcyMZY.mjs";
16
+ import { n as evictToSize, r as touch, t as assertCapacity } from "./boundedMap-CtdzpJ3X.mjs";
17
+ import { t as pluralize } from "./pluralize-ClEjcKlG.mjs";
18
+ import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "./timing-CaxKbRk_.mjs";
19
+ import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "./acquire-DoFX06fm.mjs";
20
+ import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-uS_RHqa3.mjs";
21
+ import { n as validateAggregations } from "./validate-BaF5wd0x.mjs";
22
+ import { n as executeAggregation } from "./buildHandler-CARdmPNo.mjs";
23
23
  import { ARC_ERROR_CODES, isHttpError, toErrorContract } from "@classytic/repo-core/errors";
24
24
  import { createHash, randomUUID } from "node:crypto";
25
25
  import fp from "fastify-plugin";
26
26
  import { IdempotencyError, fingerprintRequest } from "@classytic/repo-core/idempotency";
27
27
  import { z } from "zod";
28
- //#region src/integrations/mcp/createMcpServer.ts
28
+ // src/integrations/mcp/createMcpServer.ts
29
29
  /**
30
30
  * @classytic/arc — createMcpServer()
31
31
  *
@@ -184,8 +184,7 @@ function registerPrompt(server, prompt) {
184
184
  if (prompt.argsSchema) config.argsSchema = prompt.argsSchema;
185
185
  srv.registerPrompt(prompt.name, config, (args) => prompt.handler(args));
186
186
  }
187
- //#endregion
188
- //#region src/integrations/mcp/buildRequestContext.ts
187
+ // src/integrations/mcp/buildRequestContext.ts
189
188
  /**
190
189
  * @classytic/arc — MCP → IRequestContext Bridge
191
190
  *
@@ -407,8 +406,7 @@ function normalizeScopeContext(value) {
407
406
  for (const [k, v] of Object.entries(value)) if (typeof v === "string") out[k] = v;
408
407
  return Object.keys(out).length > 0 ? Object.freeze(out) : void 0;
409
408
  }
410
- //#endregion
411
- //#region src/integrations/mcp/tool-helpers.ts
409
+ // src/integrations/mcp/tool-helpers.ts
412
410
  /**
413
411
  * Evaluate a resource's permission check in MCP context.
414
412
  *
@@ -574,8 +572,7 @@ function createMcpController(resource) {
574
572
  matchesFilter: resource.adapter?.matchesFilter
575
573
  });
576
574
  }
577
- //#endregion
578
- //#region src/integrations/mcp/http-parity.ts
575
+ // src/integrations/mcp/http-parity.ts
579
576
  /**
580
577
  * The gates an HTTP route applies that an MCP tool must apply too, because a tool calls the
581
578
  * controller or action handler directly and skips the route: idempotent execution, the
@@ -704,8 +701,7 @@ async function auditToolAction(audit, args) {
704
701
  }, "[arc/mcp] action audit write failed");
705
702
  }
706
703
  }
707
- //#endregion
708
- //#region src/integrations/mcp/invokeController.ts
704
+ // src/integrations/mcp/invokeController.ts
709
705
  /**
710
706
  * Assemble the {@link McpContextExtras} for a controller invocation from
711
707
  * resource-scoped metadata + app-level wiring. Mirrors what
@@ -863,8 +859,7 @@ function isCallToolResult(value) {
863
859
  function isControllerResponse(value) {
864
860
  return typeof value === "object" && value !== null && "data" in value && !("content" in value);
865
861
  }
866
- //#endregion
867
- //#region src/integrations/mcp/crud-tools.ts
862
+ // src/integrations/mcp/crud-tools.ts
868
863
  const ALL_CRUD_OPS = [
869
864
  "list",
870
865
  "get",
@@ -961,8 +956,7 @@ function resolveCrudDescription(override, meta) {
961
956
  if (typeof override === "string") return override;
962
957
  return override(meta);
963
958
  }
964
- //#endregion
965
- //#region src/integrations/mcp/fieldRulesToZod.ts
959
+ // src/integrations/mcp/fieldRulesToZod.ts
966
960
  /**
967
961
  * @classytic/arc — fieldRules → Zod Shape Converter
968
962
  *
@@ -1119,8 +1113,7 @@ function buildListShape(fieldRules, options) {
1119
1113
  }
1120
1114
  return shape;
1121
1115
  }
1122
- //#endregion
1123
- //#region src/integrations/mcp/authBridge.ts
1116
+ // src/integrations/mcp/authBridge.ts
1124
1117
  /**
1125
1118
  * @classytic/arc — MCP Auth Bridge
1126
1119
  *
@@ -1242,8 +1235,7 @@ async function forwardResponse(reply, response) {
1242
1235
  });
1243
1236
  reply.send(await response.text());
1244
1237
  }
1245
- //#endregion
1246
- //#region src/core/schemaIRZod.ts
1238
+ // src/core/schemaIRZod.ts
1247
1239
  /**
1248
1240
  * Schema IR → Zod adapter — the MCP-facing half of [schemaIR.ts](./schemaIR.ts).
1249
1241
  *
@@ -1297,8 +1289,7 @@ function jsonSchemaPropToZod(schema) {
1297
1289
  default: return z.string();
1298
1290
  }
1299
1291
  }
1300
- //#endregion
1301
- //#region src/integrations/mcp/action-tools.ts
1292
+ // src/integrations/mcp/action-tools.ts
1302
1293
  /**
1303
1294
  * Convert an action's `schema` field into a Zod shape for MCP input.
1304
1295
  *
@@ -1432,8 +1423,7 @@ function createActionToolHandler(actionName, handler, permissions, resourceName,
1432
1423
  }
1433
1424
  };
1434
1425
  }
1435
- //#endregion
1436
- //#region src/integrations/mcp/aggregation-tools.ts
1426
+ // src/integrations/mcp/aggregation-tools.ts
1437
1427
  /**
1438
1428
  * Build MCP tools for a resource's aggregations.
1439
1429
  *
@@ -1556,8 +1546,7 @@ function createAggregationToolHandler(args) {
1556
1546
  return toCallToolError(result.body);
1557
1547
  };
1558
1548
  }
1559
- //#endregion
1560
- //#region src/integrations/mcp/jsonSchemaToZod.ts
1549
+ // src/integrations/mcp/jsonSchemaToZod.ts
1561
1550
  /**
1562
1551
  * @classytic/arc — JSON Schema → Zod shape converter
1563
1552
  *
@@ -1695,8 +1684,7 @@ function applyDescription(zodType, prop) {
1695
1684
  if (typeof prop.description === "string" && prop.description.length > 0) return zodType.describe(prop.description);
1696
1685
  return zodType;
1697
1686
  }
1698
- //#endregion
1699
- //#region src/integrations/mcp/input-schema.ts
1687
+ // src/integrations/mcp/input-schema.ts
1700
1688
  /**
1701
1689
  * MCP tool input schema generation.
1702
1690
  *
@@ -1833,8 +1821,7 @@ function mapJsonSchemaTypeToArcType(jsonType) {
1833
1821
  default: return "string";
1834
1822
  }
1835
1823
  }
1836
- //#endregion
1837
- //#region src/integrations/mcp/route-input-schema.ts
1824
+ // src/integrations/mcp/route-input-schema.ts
1838
1825
  /**
1839
1826
  * Custom-route → MCP tool INPUT schema. The route's own schema is the contract:
1840
1827
  * an input the REST route would refuse must be refused on MCP, never stripped.
@@ -1900,8 +1887,7 @@ function toolInputShape(schema) {
1900
1887
  if (!isZodTypeSchema(schema)) return schema;
1901
1888
  return schema instanceof z.ZodObject ? schema.shape : void 0;
1902
1889
  }
1903
- //#endregion
1904
- //#region src/integrations/mcp/route-tools.ts
1890
+ // src/integrations/mcp/route-tools.ts
1905
1891
  /**
1906
1892
  * Custom-route → MCP tool generation.
1907
1893
  *
@@ -2059,8 +2045,7 @@ function slugifyRoute(method, path) {
2059
2045
  const clean = path.replace(/:[^/]+/g, "").replace(/^\/+|\/+$/g, "").replace(/\//g, "_");
2060
2046
  return clean ? `${method.toLowerCase()}_${clean}` : method.toLowerCase();
2061
2047
  }
2062
- //#endregion
2063
- //#region src/integrations/mcp/resourceToTools.ts
2048
+ // src/integrations/mcp/resourceToTools.ts
2064
2049
  /**
2065
2050
  * @classytic/arc — Resource → MCP Tools orchestrator.
2066
2051
  *
@@ -2303,8 +2288,7 @@ function resourceToTools(resource, config = {}) {
2303
2288
  }
2304
2289
  return tools;
2305
2290
  }
2306
- //#endregion
2307
- //#region src/integrations/mcp/schemaResources.ts
2291
+ // src/integrations/mcp/schemaResources.ts
2308
2292
  /**
2309
2293
  * Register MCP Resources for schema discovery.
2310
2294
  */
@@ -2373,8 +2357,7 @@ function getOps(r, override) {
2373
2357
  if (override) ops = ops.filter((op) => override.includes(op));
2374
2358
  return ops;
2375
2359
  }
2376
- //#endregion
2377
- //#region src/integrations/mcp/sessionCache.ts
2360
+ // src/integrations/mcp/sessionCache.ts
2378
2361
  const DEFAULT_TTL_MS = 18e5;
2379
2362
  const DEFAULT_MAX_SESSIONS = 1e3;
2380
2363
  var McpSessionCache = class {
@@ -2460,8 +2443,7 @@ var McpSessionCache = class {
2460
2443
  } catch {}
2461
2444
  }
2462
2445
  };
2463
- //#endregion
2464
- //#region src/integrations/mcp/mcpPlugin.ts
2446
+ // src/integrations/mcp/mcpPlugin.ts
2465
2447
  /**
2466
2448
  * @classytic/arc — MCP Plugin (Level 1)
2467
2449
  *
@@ -2839,5 +2821,4 @@ const mcpPlugin = fp(mcpPluginImpl, {
2839
2821
  name: "arc-mcp",
2840
2822
  fastify: "5.x"
2841
2823
  });
2842
- //#endregion
2843
2824
  export { resolveToolCollisions as _, toolInputShape as a, resolveCrudDescription as c, permissionDeniedResult as d, toCallToolError as f, createMcpServer as g, buildRequestContext as h, isZodTypeSchema as i, invokeController as l, toCallToolSuccess as m, mcpPlugin as n, fieldRulesToZod as o, toCallToolResult as p, resourceToTools as r, defaultCrudDescription as s, filterResourcesForMcp as t, mcpHandlerAdapter as u };
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-D_lMdYOd.mjs";
3
- import { n as evictToSize } from "./boundedMap-DkKiPifd.mjs";
4
- //#region src/cache/memory.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
3
+ import { n as evictToSize } from "./boundedMap-CtdzpJ3X.mjs";
4
+ // src/cache/memory.ts
5
5
  var memory_exports = /* @__PURE__ */ __exportAll({ MemoryCacheStore: () => MemoryCacheStore });
6
6
  /**
7
7
  * In-memory LRU+TTL cache store with hard entry cap and memory budget.
@@ -183,5 +183,4 @@ function globToRegExp(pattern) {
183
183
  const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
184
184
  return new RegExp(`^${escaped}$`);
185
185
  }
186
- //#endregion
187
186
  export { memory_exports as n, MemoryCacheStore as t };
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-D_lMdYOd.mjs";
3
- import { a as MetricHistogram, i as DURATION_BUCKETS_SECONDS, o as MetricSeries, s as renderMetricSample } from "./health-DyeP3mTW.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
3
+ import { a as MetricHistogram, i as DURATION_BUCKETS_SECONDS, o as MetricSeries, s as renderMetricSample } from "./health-jkYNdobJ.mjs";
4
4
  import fp from "fastify-plugin";
5
- //#region src/plugins/metrics.ts
5
+ // src/plugins/metrics.ts
6
6
  var metrics_exports = /* @__PURE__ */ __exportAll({
7
7
  default: () => metrics_default,
8
8
  metricsPlugin: () => metricsPlugin
@@ -188,5 +188,4 @@ var metrics_default = fp(metricsPlugin, {
188
188
  name: "arc-metrics",
189
189
  fastify: "5.x"
190
190
  });
191
- //#endregion
192
191
  export { metrics_exports as n, metrics_default as t };
@@ -1,7 +1,6 @@
1
1
 
2
- import { A as RequestWithExtras, J as MiddlewareConfig, k as MiddlewareHandler } from "../index-WH7xgvxS.mjs";
2
+ import { A as RequestWithExtras, J as MiddlewareConfig, k as MiddlewareHandler } from "../index-Cy2-QffW.mjs";
3
3
  import { RouteHandlerMethod } from "fastify";
4
- //#region src/middleware/middleware.d.ts
5
4
  interface NamedMiddleware {
6
5
  /** Unique name for debugging/introspection */
7
6
  readonly name: string;
@@ -29,8 +28,6 @@ export declare function middleware(name: string, options: MiddlewareOptions): Na
29
28
  * Returns a MiddlewareConfig map keyed by operation, ready to pass to `defineResource()`.
30
29
  */
31
30
  export declare function sortMiddlewares(middlewares: NamedMiddleware[]): MiddlewareConfig;
32
- //#endregion
33
- //#region src/middleware/multipartBody.d.ts
34
31
  /** Parsed file from multipart form-data */
35
32
  interface ParsedFile {
36
33
  /** Original filename */
@@ -121,5 +118,4 @@ interface MultipartBodyOptions {
121
118
  * the wrong architecture regardless of limits.
122
119
  */
123
120
  export declare function multipartBody(options?: MultipartBodyOptions): RouteHandlerMethod;
124
- //#endregion
125
121
  export type { MiddlewareOptions, MultipartBodyOptions, NamedMiddleware, ParsedFile };
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { t as CRUD_OPERATIONS } from "../constants-D_aiew34.mjs";
3
- import { t as multipartBody } from "../multipartBody-BFasGtP9.mjs";
4
- //#region src/middleware/middleware.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as CRUD_OPERATIONS } from "../constants-Cx7BcnHT.mjs";
3
+ import { t as multipartBody } from "../multipartBody-qU7KCn1l.mjs";
4
+ // src/middleware/middleware.ts
5
5
  /**
6
6
  * Named Middleware — Priority-based, conditional middleware execution.
7
7
  *
@@ -67,5 +67,4 @@ function sortMiddlewares(middlewares) {
67
67
  }
68
68
  return result;
69
69
  }
70
- //#endregion
71
70
  export { middleware, multipartBody, sortMiddlewares };
@@ -1,6 +1,5 @@
1
1
 
2
2
  import { LockAdapter } from "@classytic/repo-core/lock";
3
- //#region src/migrations/index.d.ts
4
3
  export interface Migration {
5
4
  /** Migration version (sequential number) */
6
5
  version: number;
@@ -289,5 +288,4 @@ export declare class MigrationRegistry {
289
288
  */
290
289
  clear(): void;
291
290
  }
292
- //#endregion
293
291
  export {};
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { t as startRenewingLease } from "../renewingLease-CykpeNcQ.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as startRenewingLease } from "../renewingLease-CS43br5E.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
- //#region src/migrations/index.ts
4
+ // src/migrations/index.ts
5
5
  /**
6
6
  * Schema Versioning and Migrations System
7
7
  *
@@ -384,5 +384,4 @@ var MigrationRegistry = class {
384
384
  this.migrations.clear();
385
385
  }
386
386
  };
387
- //#endregion
388
387
  export { MigrationRegistry, MigrationRunner, MongoMigrationStore, computeMigrationChecksum, defineMigration, withSchemaVersion };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- //#region src/factory/module/index.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ // src/factory/module/index.ts
3
3
  /**
4
4
  * Identity helper for authoring a typed module — mirrors `defineResource`.
5
5
  * Gives inference + a single obvious construction site; does no work.
@@ -74,5 +74,4 @@ Composed modules: ${composed.length ? composed.join(", ") : "(none)"}.`);
74
74
  return resolved;
75
75
  };
76
76
  }
77
- //#endregion
78
77
  export { lazyModuleExports as a, hasModuleExports as i, getModuleExports as n, lazyRequiredModuleExports as o, getOptionalModuleExports as r, defineModule as t };
@@ -1,6 +1,5 @@
1
1
 
2
- import { G as CrudRouteKey, W as PresetResult } from "./index-WH7xgvxS.mjs";
3
- //#region src/permissions/tenantPreparation.d.ts
2
+ import { G as CrudRouteKey, W as PresetResult } from "./index-Cy2-QffW.mjs";
4
3
  type TenantFieldSpec = {
5
4
  field: string;
6
5
  type: "org";
@@ -11,8 +10,6 @@ type TenantFieldSpec = {
11
10
  field: string;
12
11
  contextKey: string;
13
12
  };
14
- //#endregion
15
- //#region src/presets/multiTenant.d.ts
16
13
  interface MultiTenantOptions {
17
14
  /**
18
15
  * Single-field form: name of the database field to filter by.
@@ -100,5 +97,4 @@ interface MultiTenantOptions {
100
97
  crossTenant?: readonly Extract<CrudRouteKey, "list" | "get">[];
101
98
  }
102
99
  declare function multiTenantPreset(options?: MultiTenantOptions): PresetResult;
103
- //#endregion
104
100
  export { multiTenantPreset as n, TenantFieldSpec as r, MultiTenantOptions as t };
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
2
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
3
3
  import sjson from "secure-json-parse";
4
- //#region src/middleware/multipartBody.ts
4
+ // src/middleware/multipartBody.ts
5
5
  /**
6
6
  * Multipart Body Middleware — Opt-in multipart/form-data parsing for CRUD routes.
7
7
  *
@@ -180,5 +180,4 @@ function tryParseValue(value) {
180
180
  } catch {}
181
181
  return value;
182
182
  }
183
- //#endregion
184
183
  export { multipartBody as t };
@@ -0,0 +1,20 @@
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ // src/utils/observeSend.ts
3
+ /** Run `fn`, reporting whether it called `reply.send` (or the reply is already sent). */
4
+ async function runObservingSend(reply, fn) {
5
+ let answered = false;
6
+ const send = reply.send;
7
+ reply.send = function trackedSend(payload) {
8
+ answered = true;
9
+ return send.call(this, payload);
10
+ };
11
+ try {
12
+ return {
13
+ result: await fn(),
14
+ answered: answered || reply.sent
15
+ };
16
+ } finally {
17
+ reply.send = send;
18
+ }
19
+ }
20
+ export { runObservingSend as t };
@@ -1,11 +1,11 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { n as getUserRoles } from "./userHelpers-BHig1kHq.mjs";
3
- import { n as convertRouteSchema } from "./schemaConverter-DNvZWTV6.mjs";
4
- import { t as resolveActionPermission } from "./actionPermissions-DRVk6m7x.mjs";
5
- import { t as pluralize } from "./pluralize-C3VJKRGp.mjs";
6
- import { t as buildActionBodySchema } from "./createActionRouter-CvH84dyx.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { n as getUserRoles } from "./userHelpers-_eGj6kf0.mjs";
3
+ import { n as convertRouteSchema } from "./schemaConverter-DtNvts-6.mjs";
4
+ import { t as resolveActionPermission } from "./actionPermissions-DXrlWHHK.mjs";
5
+ import { t as pluralize } from "./pluralize-ClEjcKlG.mjs";
6
+ import { t as buildActionBodySchema } from "./createActionRouter-mLAGbpDV.mjs";
7
7
  import fp from "fastify-plugin";
8
- //#region src/docs/openapi/canonical-schemas.ts
8
+ // src/docs/openapi/canonical-schemas.ts
9
9
  /**
10
10
  * Static canonical schemas — referenced once, from
11
11
  * `components.schemas`. Per-resource schemas (paginated `oneOf` with
@@ -227,8 +227,7 @@ function buildPaginatedListSchema(itemRef) {
227
227
  ]
228
228
  };
229
229
  }
230
- //#endregion
231
- //#region src/docs/openapi/field-permissions.ts
230
+ // src/docs/openapi/field-permissions.ts
232
231
  /**
233
232
  * Field permission descriptions — appended to schema-property
234
233
  * `description` strings during component generation so codegen surfaces
@@ -249,8 +248,7 @@ function formatFieldPermDescription(perm) {
249
248
  default: return perm.type;
250
249
  }
251
250
  }
252
- //#endregion
253
- //#region src/docs/openapi/components.ts
251
+ // src/docs/openapi/components.ts
254
252
  /**
255
253
  * Generate component schema definitions from pre-stored registry
256
254
  * schemas.
@@ -346,8 +344,7 @@ function generateSchemas(resources) {
346
344
  }
347
345
  return schemas;
348
346
  }
349
- //#endregion
350
- //#region src/docs/openapi/operations.ts
347
+ // src/docs/openapi/operations.ts
351
348
  /**
352
349
  * Standard error responses that every CRUD route ships. Per-route
353
350
  * additions (e.g. 404 on get/update/delete, 409 on create/update) are
@@ -455,8 +452,7 @@ function describePermissionForOpenApi(check) {
455
452
  if (Array.isArray(fn._orgRoles) && fn._orgRoles.length > 0) result.orgRoles = fn._orgRoles;
456
453
  return result;
457
454
  }
458
- //#endregion
459
- //#region src/docs/openapi/parameters.ts
455
+ // src/docs/openapi/parameters.ts
460
456
  /**
461
457
  * Default query parameters for list endpoints when the resource hasn't
462
458
  * provided an explicit `openApiSchemas.listQuery` schema. These match
@@ -535,8 +531,7 @@ function extractPathParams(path) {
535
531
  }
536
532
  return params;
537
533
  }
538
- //#endregion
539
- //#region src/docs/openapi/action-paths.ts
534
+ // src/docs/openapi/action-paths.ts
540
535
  /**
541
536
  * Action endpoint emitter — `POST /:resource/:id/action` and/or
542
537
  * `POST /:resource/action`.
@@ -628,8 +623,7 @@ function emitMount(paths, resource, basePath, additionalSecurity, subsetActions,
628
623
  }
629
624
  }, anyAuthRequired, additionalSecurity);
630
625
  }
631
- //#endregion
632
- //#region src/docs/openapi/aggregation-paths.ts
626
+ // src/docs/openapi/aggregation-paths.ts
633
627
  /**
634
628
  * Emit one OpenAPI path entry per declared aggregation.
635
629
  *
@@ -776,8 +770,7 @@ function setNestedSchemaProp(target, path, leaf) {
776
770
  if (!nested.properties) nested.properties = {};
777
771
  setNestedSchemaProp(nested.properties, rest, leaf);
778
772
  }
779
- //#endregion
780
- //#region src/docs/openapi/crud-paths.ts
773
+ // src/docs/openapi/crud-paths.ts
781
774
  /**
782
775
  * Append the default-CRUD paths (`GET /` list + `POST /` create on the
783
776
  * collection path; `GET/PATCH|PUT/DELETE /:id` on the item path).
@@ -790,6 +783,7 @@ function appendCrudPaths(paths, resource, basePath, additionalSecurity) {
790
783
  const collectionPath = {};
791
784
  if (!disabledSet.has("list")) collectionPath.get = createOperation(resource, "list", "List all", {
792
785
  parameters: resource.openApiSchemas?.listQuery ? convertSchemaToParameters(resource.openApiSchemas.listQuery) : DEFAULT_LIST_PARAMS,
786
+ ...resource.queryContract && { "x-arc-query": resource.queryContract },
793
787
  responses: {
794
788
  "200": {
795
789
  description: "List of items",
@@ -874,8 +868,7 @@ function appendCrudPaths(paths, resource, basePath, additionalSecurity) {
874
868
  }, void 0, additionalSecurity);
875
869
  if (Object.keys(itemPath).length > 0) paths[toOpenApiPath(`${basePath}/:id`)] = itemPath;
876
870
  }
877
- //#endregion
878
- //#region src/docs/openapi/custom-paths.ts
871
+ // src/docs/openapi/custom-paths.ts
879
872
  /**
880
873
  * Append every entry in `resource.customRoutes` to the `paths` map.
881
874
  */
@@ -924,8 +917,7 @@ function appendCustomRoutePaths(paths, resource, basePath, additionalSecurity) {
924
917
  paths[fullPath][method] = createOperation(resource, handlerName, route.summary ?? handlerName, extras, requiresAuthForRoute, additionalSecurity);
925
918
  }
926
919
  }
927
- //#endregion
928
- //#region src/docs/openapi/paths.ts
920
+ // src/docs/openapi/paths.ts
929
921
  /**
930
922
  * Generate the OpenAPI `paths` entries for a single resource.
931
923
  */
@@ -938,8 +930,7 @@ function generateResourcePaths(resource, apiPrefix = "", additionalSecurity = []
938
930
  appendAggregationPaths(paths, resource, basePath, additionalSecurity);
939
931
  return paths;
940
932
  }
941
- //#endregion
942
- //#region src/docs/openapi/index.ts
933
+ // src/docs/openapi/index.ts
943
934
  const openApiPlugin = async (fastify, opts = {}) => {
944
935
  const { title = "Arc API", version = "1.0.0", description, serverUrl, prefix = "/_docs", apiPrefix = "", authRoles = [] } = opts;
945
936
  const buildSpec = () => {
@@ -1041,5 +1032,4 @@ var openapi_default = fp(openApiPlugin, {
1041
1032
  name: "arc-openapi",
1042
1033
  fastify: "5.x"
1043
1034
  });
1044
- //#endregion
1045
1035
  export { openapi_default as n, buildOpenApiSpec as t };
@@ -1,8 +1,7 @@
1
1
 
2
- import { l as PermissionCheck } from "../base-CZyixEQR.mjs";
3
- import { n as ArcModule, u as ModuleName } from "../types-BJ-2XqVF.mjs";
2
+ import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
3
+ import { n as ArcModule, u as ModuleName } from "../types-BeEJm-DV.mjs";
4
4
  import { OutboxStore } from "@classytic/primitives/outbox";
5
- //#region src/outbox-admin/module.d.ts
6
5
  /**
7
6
  * A store that can answer an operator's questions.
8
7
  *
@@ -81,5 +80,4 @@ interface OutboxAdminModuleDeps {
81
80
  relayLagUnhealthyMs?: number;
82
81
  }
83
82
  export declare function createOutboxAdminModule(deps: OutboxAdminModuleDeps): ArcModule<void>;
84
- //#endregion
85
83
  export type { OutboxAdminModuleDeps, OutboxAdminPermissions, OutboxAdminStore };
@@ -1,9 +1,9 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { i as NotFoundError, u as ValidationError } from "../errors-grZkIA8N.mjs";
3
- import { t as defineResource } from "../defineResource-CEo0gDCb.mjs";
4
- import { n as getModuleExports, t as defineModule } from "../module-CfnKuIuH.mjs";
5
- import { r as readOutboxHealth } from "../health-PVt0VjOx.mjs";
6
- //#region src/outbox-admin/module.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { i as NotFoundError, u as ValidationError } from "../errors-DnrUChAy.mjs";
3
+ import { t as defineResource } from "../defineResource-BROJmhzJ.mjs";
4
+ import { n as getModuleExports, t as defineModule } from "../module-BD8xHgrz.mjs";
5
+ import { r as readOutboxHealth } from "../health-CRJg3IIq.mjs";
6
+ // src/outbox-admin/module.ts
7
7
  /**
8
8
  * Strip the domain payload and the stack unless explicitly opted in.
9
9
  *
@@ -99,5 +99,4 @@ function createOutboxAdminModule(deps) {
99
99
  resources: () => [resource]
100
100
  });
101
101
  }
102
- //#endregion
103
102
  export { createOutboxAdminModule };