@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,10 +1,114 @@
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 runShutdown, i as runAdmittedWork, r as registerShutdownParticipant } from "./shutdown-CfrqPR7A.mjs";
4
- import { t as runWorkScope } from "./workScope-DPPfM4m6.mjs";
5
- import { t as startRenewingLease } from "./renewingLease-CykpeNcQ.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 runShutdown, i as runAdmittedWork, r as registerShutdownParticipant } from "./shutdown-BJiJN7FT.mjs";
4
+ import { t as runWorkScope } from "./workScope-CmCBUmPR.mjs";
5
+ import { t as startRenewingLease } from "./renewingLease-CS43br5E.mjs";
6
6
  import fp from "fastify-plugin";
7
- //#region src/plugins/schedules.ts
7
+ import { civilDateOf, civilDateToInstant, isValidTimeZone, localTimeParts } from "@classytic/primitives/timezone";
8
+ // src/plugins/dailyGate.ts
9
+ /**
10
+ * Daily gate — "once per LOCAL calendar day, at/after a wall-clock time in an IANA zone".
11
+ *
12
+ * The decision is a civil date (`civilDateOf`, from `@classytic/primitives/timezone`), never a
13
+ * UTC timestamp, so DST and zone offsets cannot skip or double a day. The claim lives in a
14
+ * host-implemented {@link DailyLedger}: a restart or a second replica finds the day already
15
+ * claimed. `schedulesPlugin` drives it through `ScheduleDefinition.daily`; it is exported for
16
+ * hosts that tick from somewhere else.
17
+ */
18
+ /** Boot-time validation of the time-of-day fields; throws a `TypeError` naming `label`. */
19
+ function assertDailyTime(label, o) {
20
+ if (!Number.isInteger(o.hour) || o.hour < 0 || o.hour > 23) throw new TypeError(`${label}: \`hour\` must be an integer 0-23`);
21
+ if (o.minute !== void 0 && (!Number.isInteger(o.minute) || o.minute < 0 || o.minute > 59)) throw new TypeError(`${label}: \`minute\` must be an integer 0-59`);
22
+ if (typeof o.zone !== "string" || !isValidTimeZone(o.zone)) throw new TypeError(`${label}: \`zone\` must be a valid IANA time zone (got "${String(o.zone)}")`);
23
+ }
24
+ /**
25
+ * The first instant on `day` at which the zone's wall clock reads at/after `target` minutes.
26
+ * A repeated wall time (fall back) resolves to its first occurrence. A time inside a
27
+ * spring-forward gap resolves to the instant the clock jumps past it: primitives'
28
+ * `civilDateToInstant` returns an instant an hour EARLY there, so it is verified, not trusted.
29
+ */
30
+ function scheduledInstant(day, zone, target) {
31
+ let at = civilDateToInstant(day, zone, {
32
+ hour: Math.floor(target / 60),
33
+ minute: target % 60
34
+ });
35
+ if (civilDateOf(at, zone) === day && localTimeParts(at, zone).minutesOfDay >= target) return at;
36
+ for (let step = 0; step < 1440; step++) {
37
+ at = new Date(at.getTime() + 6e4);
38
+ if (civilDateOf(at, zone) !== day) break;
39
+ if (localTimeParts(at, zone).minutesOfDay >= target) return at;
40
+ }
41
+ return at;
42
+ }
43
+ function createDailyGate(opts) {
44
+ assertDailyTime(`[arc-daily] "${opts.key}"`, opts);
45
+ const { key, ledger, zone, hour, minute = 0, catchUpWindowMs, staleAfterMs } = opts;
46
+ const read = () => typeof opts.clock === "function" ? opts.clock() : opts.clock?.now() ?? /* @__PURE__ */ new Date();
47
+ return { async run(task) {
48
+ const now = read();
49
+ const day = civilDateOf(now, zone);
50
+ const scheduledAt = scheduledInstant(day, zone, hour * 60 + minute);
51
+ const lateness = now.getTime() - scheduledAt.getTime();
52
+ if (lateness < 0) return {
53
+ ran: false,
54
+ reason: "too-early"
55
+ };
56
+ if (catchUpWindowMs !== void 0 && lateness > catchUpWindowMs) return {
57
+ ran: false,
58
+ reason: "outside-window"
59
+ };
60
+ if (!await ledger.claimDay(key, day, {
61
+ now,
62
+ ...staleAfterMs !== void 0 ? { staleAfterMs } : {}
63
+ })) return {
64
+ ran: false,
65
+ reason: "already-claimed"
66
+ };
67
+ let result;
68
+ try {
69
+ result = await task(day);
70
+ } catch (err) {
71
+ await ledger.releaseDay(key, day).catch(() => void 0);
72
+ throw err;
73
+ }
74
+ if (ledger.completeDay) await ledger.completeDay(key, day, typeof result === "object" && result !== null ? Object.fromEntries(Object.entries(result)) : void 0);
75
+ return {
76
+ ran: true,
77
+ day,
78
+ result
79
+ };
80
+ } };
81
+ }
82
+ function createMemoryDailyLedger() {
83
+ const rows = /* @__PURE__ */ new Map();
84
+ const id = (key, civilDate) => `${key}\u0000${civilDate}`;
85
+ return {
86
+ async claimDay(key, civilDate, info) {
87
+ const existing = rows.get(id(key, civilDate));
88
+ if (existing) {
89
+ if (!(!existing.completed && info.staleAfterMs !== void 0 && info.now.getTime() - existing.claimedAt.getTime() > info.staleAfterMs)) return false;
90
+ }
91
+ rows.set(id(key, civilDate), {
92
+ key,
93
+ civilDate,
94
+ claimedAt: info.now,
95
+ completed: false
96
+ });
97
+ return true;
98
+ },
99
+ async completeDay(key, civilDate, result) {
100
+ const row = rows.get(id(key, civilDate));
101
+ if (!row) return;
102
+ row.completed = true;
103
+ if (result) row.result = result;
104
+ },
105
+ async releaseDay(key, civilDate) {
106
+ rows.delete(id(key, civilDate));
107
+ },
108
+ claims: () => [...rows.values()].map((r) => ({ ...r }))
109
+ };
110
+ }
111
+ // src/plugins/schedules.ts
8
112
  var schedules_exports = /* @__PURE__ */ __exportAll({
9
113
  default: () => schedules_default,
10
114
  schedulesPlugin: () => schedulesPlugin
@@ -31,6 +135,15 @@ const schedulesPlugin = async (fastify, opts) => {
31
135
  if (s.leaseMs !== void 0 && (!Number.isFinite(s.leaseMs) || s.leaseMs <= 0)) throw new TypeError(`[arc-schedules] "${s.name}": \`leaseMs\` must be a positive number of ms`);
32
136
  if (s.every < MIN_SAFE_INTERVAL_MS) fastify.log.warn(`[arc-schedules] "${s.name}" runs every ${s.every}ms — sub-second schedules are almost always a bug in production (DB pressure, lock churn). Intended for tests only.`);
33
137
  }
138
+ const gates = /* @__PURE__ */ new Map();
139
+ for (const s of schedules) {
140
+ if (!s.daily) continue;
141
+ assertDailyTime(`[arc-schedules] "${s.name}" daily`, s.daily);
142
+ gates.set(s.name, createDailyGate({
143
+ key: s.name,
144
+ ...s.daily
145
+ }));
146
+ }
34
147
  const timers = /* @__PURE__ */ new Map();
35
148
  const inFlight = /* @__PURE__ */ new Map();
36
149
  let closing = false;
@@ -60,12 +173,23 @@ const schedulesPlugin = async (fastify, opts) => {
60
173
  }, "[arc-schedules] lease renewal errored (lease may lapse mid-run)")
61
174
  });
62
175
  }
176
+ const previousRunAt = stat.lastRunAt;
63
177
  stat.runs++;
64
178
  stat.lastRunAt = (/* @__PURE__ */ new Date()).toISOString();
65
179
  await runAdmittedWork(() => runWorkScope({
66
180
  kind: "job",
67
181
  id: s.name
68
- }, () => s.handler(fastify)));
182
+ }, async () => {
183
+ const gate = gates.get(s.name);
184
+ if (!gate) return s.handler(fastify);
185
+ const outcome = await gate.run((day) => s.handler(fastify, { day }));
186
+ if (outcome.ran) stat.lastDay = outcome.day;
187
+ else {
188
+ stat.runs--;
189
+ stat.lastRunAt = previousRunAt;
190
+ stat.skippedByGate = (stat.skippedByGate ?? 0) + 1;
191
+ }
192
+ }));
69
193
  stat.lastError = null;
70
194
  } catch (err) {
71
195
  stat.failures++;
@@ -151,5 +275,4 @@ var schedules_default = fp(schedulesPlugin, {
151
275
  name: "arc-schedules",
152
276
  fastify: "5.x"
153
277
  });
154
- //#endregion
155
- export { schedules_exports as n, schedules_default as t };
278
+ export { createMemoryDailyLedger as i, schedules_exports as n, createDailyGate as r, schedules_default as t };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { t as arcLog } from "./logger-C5bvCiAK.mjs";
3
- //#region src/utils/schemaConverter.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as arcLog } from "./logger-C110X5Yz.mjs";
3
+ // src/utils/schemaConverter.ts
4
4
  /**
5
5
  * Schema Converter — Detect-First, Convert-Only-When-Needed
6
6
  *
@@ -207,5 +207,4 @@ function convertRouteSchema(schema, target = DEFAULT_FASTIFY_TARGET) {
207
207
  }
208
208
  return result;
209
209
  }
210
- //#endregion
211
210
  export { isZodSchema as a, isJsonSchema as i, convertRouteSchema as n, toJsonSchema as o, ensureSchemaConverter as r, convertOpenApiSchemas as t };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { o as toJsonSchema } from "./schemaConverter-DNvZWTV6.mjs";
3
- //#region src/core/schemaIR.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { o as toJsonSchema } from "./schemaConverter-DtNvts-6.mjs";
3
+ // src/core/schemaIR.ts
4
4
  /**
5
5
  * Schema IR — one canonical representation, two adapters.
6
6
  *
@@ -105,5 +105,4 @@ function schemaIRToJsonSchemaBranch(ir, extras = {}) {
105
105
  function shouldRejectAdditionalProperties(ir) {
106
106
  return ir.additionalProperties === false;
107
107
  }
108
- //#endregion
109
108
  export { schemaIRToJsonSchemaBranch as n, shouldRejectAdditionalProperties as r, normalizeSchemaIR as t };
@@ -2,7 +2,6 @@
2
2
  import { ErrorContract, ErrorDetail } from "@classytic/repo-core/errors";
3
3
  import { Static, TObject, TSchema, TSchema as TSchema$1, Type, Type as Type$1 } from "typebox";
4
4
  import { FastifyPluginAsyncTypebox, FastifyPluginCallbackTypebox, TypeBoxTypeProvider } from "@fastify/type-provider-typebox";
5
- //#region src/schemas/index.d.ts
6
5
  /**
7
6
  * Paginated list response — full union of every wire shape `toCanonicalList`
8
7
  * emits. Mirrors `PaginatedResult<T>` from `@classytic/repo-core/pagination`:
@@ -138,5 +137,4 @@ export declare function ArcPaginationQuery(): Type$1.TObject<{
138
137
  select: Type$1.TOptional<Type$1.TUnion<[Type$1.TString, Type$1.TArray<Type$1.TString>, Type$1.TRecord<"^.*$", Type$1.TUnion<[Type$1.TLiteral<0>, Type$1.TLiteral<1>]>>]>>;
139
138
  populate: Type$1.TOptional<Type$1.TAny>;
140
139
  }>;
141
- //#endregion
142
140
  export { type FastifyPluginAsyncTypebox, type FastifyPluginCallbackTypebox, type Static, type TObject, type TSchema, Type, type TypeBoxTypeProvider };
@@ -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 { errorContractSchema, errorDetailSchema } from "@classytic/repo-core/errors";
3
3
  import { Type, Type as Type$1 } from "typebox";
4
- //#region src/schemas/index.ts
4
+ // src/schemas/index.ts
5
5
  /**
6
6
  * Paginated list response — full union of every wire shape `toCanonicalList`
7
7
  * emits. Mirrors `PaginatedResult<T>` from `@classytic/repo-core/pagination`:
@@ -138,5 +138,4 @@ function ArcPaginationQuery() {
138
138
  populate: Type$1.Optional(Type$1.Any())
139
139
  }, { additionalProperties: true });
140
140
  }
141
- //#endregion
142
141
  export { ArcAggregateListResponse, ArcBareListResponse, ArcDeleteResponse, ArcErrorDetail, ArcErrorResponse, ArcKeysetListResponse, ArcListResponse, ArcOffsetListResponse, ArcPaginationQuery, Type };
@@ -1,7 +1,6 @@
1
1
 
2
2
  import { FastifyPluginAsync, FastifyRequest } from "fastify";
3
3
  import { RepositoryLike } from "@classytic/repo-core/adapter";
4
- //#region src/scim/mapping.d.ts
5
4
  /**
6
5
  * SCIM 2.0 ↔ arc resource mapping
7
6
  *
@@ -42,8 +41,6 @@ export declare const DEFAULT_GROUP_MAPPING: ScimResourceMapping;
42
41
  export declare function scimToResource(scim: Record<string, unknown>, mapping: ScimResourceMapping): Record<string, unknown>;
43
42
  /** Translate resource → SCIM JSON. */
44
43
  export declare function resourceToScim(resource: Record<string, unknown>, mapping: ScimResourceMapping, baseUrl: string): Record<string, unknown>;
45
- //#endregion
46
- //#region src/scim/types.d.ts
47
44
  /**
48
45
  * One arc resource bound into the SCIM surface.
49
46
  *
@@ -122,8 +119,6 @@ interface ScimObservedEvent {
122
119
  /** Path component (`/Users`, `/Users/:id`, `/ServiceProviderConfig`, …). */
123
120
  path: string;
124
121
  }
125
- //#endregion
126
- //#region src/scim/errors.d.ts
127
122
  /**
128
123
  * SCIM 2.0 error responses (RFC 7644 §3.12)
129
124
  *
@@ -144,8 +139,6 @@ export declare class ScimError extends Error {
144
139
  constructor(statusCode: number, scimType: ScimType | undefined, detail: string);
145
140
  toResponse(): Record<string, unknown>;
146
141
  }
147
- //#endregion
148
- //#region src/scim/filter.d.ts
149
142
  /**
150
143
  * SCIM 2.0 filter language parser (RFC 7644 §3.4.2.2)
151
144
  *
@@ -200,8 +193,6 @@ type FilterNode = {
200
193
  export declare function parseScimFilter(filter: string, mapAttr: (scimAttr: string) => string | undefined): Record<string, unknown>;
201
194
  /** Pass-through mapper for resources that already use SCIM attribute names. */
202
195
  export declare const IDENTITY_MAP: (a: string) => string;
203
- //#endregion
204
- //#region src/scim/patch.d.ts
205
196
  /**
206
197
  * SCIM 2.0 PATCH parser (RFC 7644 §3.5.2)
207
198
  *
@@ -256,9 +247,6 @@ export declare function parseScimPatch(req: ScimPatchRequest): ScimUpdate;
256
247
  * when the host needs the full op stream (e.g. to issue array mutations).
257
248
  */
258
249
  export declare function scimUpdateToFlatPatch(update: ScimUpdate): Record<string, unknown>;
259
- //#endregion
260
- //#region src/scim/index.d.ts
261
250
  declare const scimPlugin: FastifyPluginAsync<ScimPluginOptions>;
262
251
  declare const _default: FastifyPluginAsync<ScimPluginOptions>;
263
- //#endregion
264
252
  export { type FilterNode, type ScimObservedEvent, type ScimPatchRequest, type ScimPluginOptions, type ScimResourceBinding, type ScimResourceMapping, type ScimType, type ScimUpdate, _default as default, scimPlugin };
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { t as parseJsonBody } from "../jsonBody-ptwyzZQ-.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as parseJsonBody } from "../jsonBody-CzDBkCme.mjs";
3
3
  import fp from "fastify-plugin";
4
- //#region src/scim/errors.ts
4
+ // src/scim/errors.ts
5
5
  var ScimError = class extends Error {
6
6
  statusCode;
7
7
  scimType;
@@ -20,8 +20,7 @@ var ScimError = class extends Error {
20
20
  };
21
21
  }
22
22
  };
23
- //#endregion
24
- //#region src/scim/helpers.ts
23
+ // src/scim/helpers.ts
25
24
  /** Combine plugin defaults with the host's per-resource mapping override. */
26
25
  function mergeMapping(defaults, override) {
27
26
  if (!override) return defaults;
@@ -126,8 +125,7 @@ function hasFindOneAndUpdate(repo) {
126
125
  function hasBulkWrite(repo) {
127
126
  return typeof repo.bulkWrite === "function";
128
127
  }
129
- //#endregion
130
- //#region src/scim/discovery.ts
128
+ // src/scim/discovery.ts
131
129
  function mountDiscoveryRoutes(fastify, prefix, hasGroups, authCheck, maxResults, observe) {
132
130
  fastify.get(`${prefix}/ServiceProviderConfig`, async (request, reply) => {
133
131
  const start = Date.now();
@@ -265,8 +263,7 @@ function mountDiscoveryRoutes(fastify, prefix, hasGroups, authCheck, maxResults,
265
263
  }
266
264
  });
267
265
  }
268
- //#endregion
269
- //#region src/scim/mapping.ts
266
+ // src/scim/mapping.ts
270
267
  const SCIM_USER_SCHEMA = "urn:ietf:params:scim:schemas:core:2.0:User";
271
268
  const SCIM_GROUP_SCHEMA = "urn:ietf:params:scim:schemas:core:2.0:Group";
272
269
  const SCIM_ENTERPRISE_USER_SCHEMA = "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User";
@@ -356,8 +353,7 @@ function resourceToScim(resource, mapping, baseUrl) {
356
353
  }
357
354
  return mapping.toScim ? mapping.toScim(resource, out) : out;
358
355
  }
359
- //#endregion
360
- //#region src/scim/filter.ts
356
+ // src/scim/filter.ts
361
357
  /**
362
358
  * SCIM 2.0 filter language parser (RFC 7644 §3.4.2.2)
363
359
  *
@@ -657,8 +653,7 @@ function parseScimFilter(filter, mapAttr) {
657
653
  }
658
654
  /** Pass-through mapper for resources that already use SCIM attribute names. */
659
655
  const IDENTITY_MAP = (a) => a;
660
- //#endregion
661
- //#region src/scim/patch.ts
656
+ // src/scim/patch.ts
662
657
  /**
663
658
  * SCIM 2.0 PATCH parser (RFC 7644 §3.5.2)
664
659
  *
@@ -739,8 +734,7 @@ function scimUpdateToFlatPatch(update) {
739
734
  for (const k of Object.keys(update.$unset)) out[k] = null;
740
735
  return out;
741
736
  }
742
- //#endregion
743
- //#region src/scim/routes.ts
737
+ // src/scim/routes.ts
744
738
  /**
745
739
  * Wrap a route body so every outcome (success, ScimError, unknown error)
746
740
  * funnels through one observability path. Generic over the request type so
@@ -922,8 +916,7 @@ function mountResourceRoutes(fastify, resourceTypeName, mounted, authCheck, maxR
922
916
  return { status: 204 };
923
917
  }));
924
918
  }
925
- //#endregion
926
- //#region src/scim/index.ts
919
+ // src/scim/index.ts
927
920
  const scimPlugin = async (fastify, opts) => {
928
921
  if (!opts.users) throw new Error("scimPlugin: `users` binding is required");
929
922
  const prefix = opts.prefix ?? "/scim/v2";
@@ -958,5 +951,4 @@ var scim_default = fp(scimPlugin, {
958
951
  name: "arc-scim",
959
952
  fastify: "5.x"
960
953
  });
961
- //#endregion
962
954
  export { DEFAULT_GROUP_MAPPING, DEFAULT_USER_MAPPING, IDENTITY_MAP, SCIM_ENTERPRISE_USER_SCHEMA, SCIM_GROUP_SCHEMA, SCIM_USER_SCHEMA, ScimError, scim_default as default, parseScimFilter, parseScimPatch, resourceToScim, scimPlugin, scimToResource, scimUpdateToFlatPatch };
@@ -1,8 +1,7 @@
1
1
 
2
- import { A as requireOrgId, C as hasOrgAccess, D as isOrgInScope, E as isMember, M as requireUserId, N as scopeFirstCtx, O as isService, S as getUserRoles, T as isElevated, _ as getScopeContextMap, a as ScopeFirstCtx, b as getTenantFromRequest, c as getAncestorOrgIds, d as getMandate, f as getOrgContext, g as getScopeContext, h as getRequestScope, i as RequestScope, j as requireTeamId, k as requireClientId, l as getClientId, m as getOrgRoles, n as Mandate, o as ScopeFirstCtxOptions, p as getOrgId, r as PUBLIC_SCOPE, s as ScopeFirstCtxRequest, t as AUTHENTICATED_SCOPE, u as getDPoPJkt, v as getServiceScopes, w as isAuthenticated, x as getUserId, y as getTeamId } from "../types-Ddl9OjmE.mjs";
3
- import { n as ElevationOptions, r as _default, t as ElevationEvent } from "../elevation-BW2J3tNj.mjs";
2
+ import { A as requireOrgId, C as hasOrgAccess, D as isOrgInScope, E as isMember, M as requireUserId, N as scopeFirstCtx, O as isService, S as getUserRoles, T as isElevated, _ as getScopeContextMap, a as ScopeFirstCtx, b as getTenantFromRequest, c as getAncestorOrgIds, d as getMandate, f as getOrgContext, g as getScopeContext, h as getRequestScope, i as RequestScope, j as requireTeamId, k as requireClientId, l as getClientId, m as getOrgRoles, n as Mandate, o as ScopeFirstCtxOptions, p as getOrgId, r as PUBLIC_SCOPE, s as ScopeFirstCtxRequest, t as AUTHENTICATED_SCOPE, u as getDPoPJkt, v as getServiceScopes, w as isAuthenticated, x as getUserId, y as getTeamId } from "../types-DnkIALZ8.mjs";
3
+ import { n as ElevationOptions, r as _default, t as ElevationEvent } from "../elevation-DPD0hcU-.mjs";
4
4
  import { FastifyReply, FastifyRequest } from "fastify";
5
- //#region src/scope/rateLimitKey.d.ts
6
5
  interface RateLimitKeyContext {
7
6
  ip: string;
8
7
  scope?: RequestScope;
@@ -12,8 +11,6 @@ interface TenantKeyGeneratorOptions {
12
11
  strategy?: (ctx: RateLimitKeyContext) => string;
13
12
  }
14
13
  export declare function createTenantKeyGenerator(opts?: TenantKeyGeneratorOptions): (ctx: RateLimitKeyContext) => string;
15
- //#endregion
16
- //#region src/scope/resolveOrgFromHeader.d.ts
17
14
  interface ResolveOrgFromHeaderOptions {
18
15
  /** Header name (default: 'x-organization-id') */
19
16
  header?: string;
@@ -29,5 +26,4 @@ interface ResolveOrgFromHeaderOptions {
29
26
  * If the header is absent, scope stays as-is (typically `authenticated`).
30
27
  */
31
28
  export declare function resolveOrgFromHeader(options: ResolveOrgFromHeaderOptions): (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
32
- //#endregion
33
29
  export { AUTHENTICATED_SCOPE, type ElevationEvent, type ElevationOptions, type Mandate, PUBLIC_SCOPE, type RateLimitKeyContext, type RequestScope, type ResolveOrgFromHeaderOptions, type ScopeFirstCtx, type ScopeFirstCtxOptions, type ScopeFirstCtxRequest, type TenantKeyGeneratorOptions, _default as elevationPlugin, getAncestorOrgIds, getClientId, getDPoPJkt, getMandate, getOrgContext, getOrgId, getOrgRoles, getRequestScope, getScopeContext, getScopeContextMap, getServiceScopes, getTeamId, getTenantFromRequest, getUserId, getUserRoles, hasOrgAccess, isAuthenticated, isElevated, isMember, isOrgInScope, isService, requireClientId, requireOrgId, requireTeamId, requireUserId, scopeFirstCtx };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-D9NWjpYc.mjs";
3
- import { t as createTenantKeyGenerator } from "../rateLimitKey-AvkBOMkl.mjs";
4
- import { t as elevation_default } from "../elevation-BJTsSnke.mjs";
5
- import { t as resolveOrgFromHeader } from "../scope-Bevxy_ST.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-DZHqOuJE.mjs";
3
+ import { t as createTenantKeyGenerator } from "../rateLimitKey-CWAjlqcN.mjs";
4
+ import { t as elevation_default } from "../elevation-DrXeEWWk.mjs";
5
+ import { t as resolveOrgFromHeader } from "../scope-BwVLSyNG.mjs";
6
6
  export { AUTHENTICATED_SCOPE, PUBLIC_SCOPE, createTenantKeyGenerator, elevation_default as elevationPlugin, getAncestorOrgIds, getClientId, getDPoPJkt, getMandate, getOrgContext, getOrgId, getOrgRoles, getRequestScope, getScopeContext, getScopeContextMap, getServiceScopes, getTeamId, getTenantFromRequest, getUserId, getUserRoles, hasOrgAccess, isAuthenticated, isElevated, isMember, isOrgInScope, isService, requireClientId, requireOrgId, requireTeamId, requireUserId, resolveOrgFromHeader, scopeFirstCtx };
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-grZkIA8N.mjs";
3
- import { n as requireSingleHeaderValue } from "./headers-Cqkg4LzI.mjs";
4
- import { n as getUserRoles } from "./userHelpers-BHig1kHq.mjs";
5
- //#region src/scope/resolveOrgFromHeader.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-DnrUChAy.mjs";
3
+ import { n as requireSingleHeaderValue } from "./headers-KxhrKevA.mjs";
4
+ import { n as getUserRoles } from "./userHelpers-_eGj6kf0.mjs";
5
+ // src/scope/resolveOrgFromHeader.ts
6
6
  /**
7
7
  * Create a preHandler hook that resolves org scope from a header.
8
8
  * Must run AFTER authentication so `request.user` is populated.
@@ -33,5 +33,4 @@ function resolveOrgFromHeader(options) {
33
33
  };
34
34
  };
35
35
  }
36
- //#endregion
37
36
  export { resolveOrgFromHeader as t };
@@ -1,6 +1,5 @@
1
1
 
2
2
  import { FastifyPluginAsync, FastifyReply, FastifyRequest } from "fastify";
3
- //#region src/auth/sessionManager.d.ts
4
3
  /**
5
4
  * Session data stored in the session store.
6
5
  */
@@ -73,12 +72,12 @@ interface SessionManagerResult {
73
72
  /** Fastify plugin that adds session middleware */
74
73
  plugin: FastifyPluginAsync;
75
74
  /** PreHandler that rejects requests without a fresh session */
76
- requireFresh: (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
75
+ requireFresh: (request: FastifyRequest, reply: FastifyReply) => Promise<void | FastifyReply>;
77
76
  }
78
77
  declare module "fastify" {
79
78
  interface FastifyInstance {
80
79
  /** Authenticate middleware — validates session and sets request.user */
81
- authenticate: (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
80
+ authenticate: (request: FastifyRequest, reply: FastifyReply) => Promise<void | FastifyReply>;
82
81
  /** Session management helpers */
83
82
  sessionManager: {
84
83
  /** Create a new session for a user */
@@ -187,5 +186,4 @@ declare class MemorySessionStore implements SessionStore {
187
186
  * ```
188
187
  */
189
188
  declare function createSessionManager(options: SessionManagerOptions): SessionManagerResult;
190
- //#endregion
191
189
  export { SessionManagerOptions as a, createSessionManager as c, SessionData as i, MemorySessionStoreOptions as n, SessionManagerResult as o, SessionCookieOptions as r, SessionStore as s, MemorySessionStore as t };
@@ -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/utils/shutdown.ts
3
+ // src/utils/shutdown.ts
4
4
  /** Stop admissions across every runtime before draining work and disposing domain engines. */
5
5
  const SHUTDOWN = Symbol.for("arc.shutdown");
6
6
  const admittedWork = new AsyncLocalStorage();
@@ -55,5 +55,4 @@ function runShutdown(fastify) {
55
55
  });
56
56
  return registry.completion;
57
57
  }
58
- //#endregion
59
58
  export { runShutdown as a, runAdmittedWork as i, isAdmittedWork as n, registerShutdownParticipant as r, initShutdownRegistry as t };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- //#region src/utils/simpleEqualityMatcher.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ // src/utils/simpleEqualityMatcher.ts
3
3
  /**
4
4
  * `simpleEqualityMatcher` — a minimal, dialect-agnostic flat-key equality
5
5
  * matcher for `DataAdapter.matchesFilter` / `BaseController({ matchesFilter })`.
@@ -39,5 +39,4 @@ function simpleEqualityMatcher(item, filters) {
39
39
  }
40
40
  return true;
41
41
  }
42
- //#endregion
43
42
  export { simpleEqualityMatcher as t };
@@ -1,12 +1,12 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-D_lMdYOd.mjs";
3
- import { t as arcLog } from "./logger-C5bvCiAK.mjs";
4
- import { g as getUserId, n as PUBLIC_SCOPE } from "./types-D9NWjpYc.mjs";
5
- import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-C5PCvm1h.mjs";
6
- import { a as promoteStreamTokenToHeader } from "./streaming-Bdq_M4d5.mjs";
7
- import { t as openSseStream } from "./sseStream-C_2ujAVY.mjs";
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
3
+ import { t as arcLog } from "./logger-C110X5Yz.mjs";
4
+ import { g as getUserId, n as PUBLIC_SCOPE } from "./types-DZHqOuJE.mjs";
5
+ import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-COrhjPRZ.mjs";
6
+ import { a as promoteStreamTokenToHeader } from "./streaming-Dcgqa-hH.mjs";
7
+ import { t as openSseStream } from "./sseStream-BjSo9Ult.mjs";
8
8
  import fp from "fastify-plugin";
9
- //#region src/plugins/sse.ts
9
+ // src/plugins/sse.ts
10
10
  var sse_exports = /* @__PURE__ */ __exportAll({
11
11
  default: () => sse_default,
12
12
  ssePlugin: () => ssePlugin
@@ -208,5 +208,4 @@ var sse_default = fp(ssePlugin, {
208
208
  fastify: "5.x",
209
209
  dependencies: ["arc-events"]
210
210
  });
211
- //#endregion
212
211
  export { sse_exports as n, sse_default as t };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { n as forwardedStreamHeaders } from "./streaming-Bdq_M4d5.mjs";
3
- //#region src/utils/sseStream.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { n as forwardedStreamHeaders } from "./streaming-Dcgqa-hH.mjs";
3
+ // src/utils/sseStream.ts
4
4
  /**
5
5
  * Take over the reply socket and open an SSE stream. Call ONLY after every
6
6
  * gate (auth, permissions, validation) has passed — after `hijack()` no
@@ -54,5 +54,4 @@ function openSseStream(request, reply, options = {}) {
54
54
  }
55
55
  };
56
56
  }
57
- //#endregion
58
57
  export { openSseStream as t };
@@ -1,5 +1,4 @@
1
1
 
2
- //#region src/types/storage.d.ts
3
2
  /**
4
3
  * Arc's minimal backend-agnostic storage contract.
5
4
  *
@@ -147,5 +146,4 @@ interface Storage {
147
146
  */
148
147
  resolveUrl?(id: string, ctx: StorageContext): Promise<string>;
149
148
  }
150
- //#endregion
151
149
  export { StorageReadResult as a, StorageReadRange as i, StorageContext as n, StorageUploadInput as o, StorageFile as r, Storage as t };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- //#region src/utils/store-helpers.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ // src/utils/store-helpers.ts
3
3
  /**
4
4
  * Classify an error thrown by `getOne` / `getById` / `update` as a
5
5
  * "document not found" miss. Mongokit uses `status: 404`, Prisma uses
@@ -58,5 +58,4 @@ function createIsDuplicateKeyError(repository) {
58
58
  return e.code === 11e3 || e.codeName === "DuplicateKey";
59
59
  };
60
60
  }
61
- //#endregion
62
61
  export { createSafeGetOne as n, createIsDuplicateKeyError as t };
@@ -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 { Readable } from "node:stream";
3
- //#region src/utils/streaming.ts
3
+ // src/utils/streaming.ts
4
4
  /**
5
5
  * Streaming helpers — adapters between Web `ReadableStream` producers
6
6
  * (Vercel AI SDK, OpenAI SDK, `fetch().body`, hand-built `TransformStream`s)
@@ -159,5 +159,4 @@ function isReadableStream(value) {
159
159
  const obj = value;
160
160
  return typeof obj.getReader === "function" && typeof obj.cancel === "function" && typeof obj.locked === "boolean";
161
161
  }
162
- //#endregion
163
162
  export { promoteStreamTokenToHeader as a, pipeUIMessageStreamToReply as i, forwardedStreamHeaders as n, isReadableStream as r, UI_MESSAGE_STREAM_HEADERS as t };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- //#region src/events/subscriberIdentity.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ // src/events/subscriberIdentity.ts
3
3
  const SUBSCRIBER_ID = Symbol.for("@classytic/arc/subscriber-id");
4
4
  /** Assign a deployment-stable identity for durable per-handler progress; never use an index. */
5
5
  function withSubscriberId(id, handler) {
@@ -24,5 +24,4 @@ function preserveSubscriberIdentity(original, wrapper) {
24
24
  });
25
25
  return wrapper;
26
26
  }
27
- //#endregion
28
27
  export { preserveSubscriberIdentity as n, withSubscriberId as r, getSubscriberId as t };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { b as isElevated, c as getOrgId } from "./types-D9NWjpYc.mjs";
3
- //#region src/core/tenancy.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { b as isElevated, c as getOrgId } from "./types-DZHqOuJE.mjs";
3
+ // src/core/tenancy.ts
4
4
  function eventAudienceOf(scope) {
5
5
  const tenancy = resolveTenancy({ _scope: scope }, "organizationId");
6
6
  return tenancy.mode === "scoped" ? {
@@ -39,5 +39,4 @@ function resolveTenancy(input, tenantField) {
39
39
  reason: scope && isElevated(scope) ? "platform" : "no-org"
40
40
  };
41
41
  }
42
- //#endregion
43
42
  export { isEventVisible as n, resolveTenancy as r, eventAudienceOf as t };
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.45.2 | MIT | https://classytic.com */
2
- import { t as conjoinPolicyFilters } from "./filter-merge-CDc7YMwX.mjs";
3
- import { d as createDomainError } from "./errors-grZkIA8N.mjs";
4
- import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-D9NWjpYc.mjs";
5
- //#region src/permissions/tenantPreparation.ts
1
+ /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
+ import { t as conjoinPolicyFilters } from "./filter-merge-6kasezRH.mjs";
3
+ import { d as createDomainError } from "./errors-DnrUChAy.mjs";
4
+ import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-DZHqOuJE.mjs";
5
+ // src/permissions/tenantPreparation.ts
6
6
  /** Tenant preparation shared by HTTP middleware and direct transport invocation. */
7
7
  const PREPARATION = Symbol.for("arc.tenantPreparation");
8
8
  function tagTenantPreparation(middleware, preparation) {
@@ -63,5 +63,4 @@ function prepareTenantContext(ctx, middlewares) {
63
63
  if (meta._tenantFields) ctx._tenantFields = meta._tenantFields;
64
64
  }
65
65
  }
66
- //#endregion
67
66
  export { withoutTenantInjection as a, tagTenantPreparation as i, isTenantPreparation as n, prepareTenantContext as r, applyTenantPreparation as t };
@@ -1,10 +1,8 @@
1
1
 
2
- import { D as CleanupRunStore } from "../types-DVLddu2q.mjs";
3
- //#region src/testing/cleanupStoreContract.d.ts
2
+ import { D as CleanupRunStore } from "../types-C0YJAiL0.mjs";
4
3
  export interface CleanupRunStoreContractSetupResult {
5
4
  store: CleanupRunStore;
6
5
  teardown?: () => Promise<void>;
7
6
  }
8
7
  export type CleanupRunStoreContractSetup = () => Promise<CleanupRunStoreContractSetupResult>;
9
- export declare function runCleanupRunStoreContract(name: string, setup: CleanupRunStoreContractSetup): void;
10
- //#endregion
8
+ export declare function runCleanupRunStoreContract(name: string, setup: CleanupRunStoreContractSetup): void;