@classytic/arc 2.45.1 → 2.46.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 (321) hide show
  1. package/README.md +1 -1
  2. package/dist/{EventTransport-CiicKz2Z.d.mts → EventTransport-CYEoCJGe.d.mts} +0 -2
  3. package/dist/{EventTransport-4b0noGwa.mjs → EventTransport-DNgD9NP4.mjs} +3 -4
  4. package/dist/{HookSystem-4pABQnGn.mjs → HookSystem-DRbPzEcP.mjs} +3 -4
  5. package/dist/{QueryCache--5uAuYPW.d.mts → QueryCache-DdvrGG8Q.d.mts} +1 -3
  6. package/dist/{ResourceRegistry-BBaN_Ne-.mjs → ResourceRegistry-Douk51fa.mjs} +15 -4
  7. package/dist/{acquire-kiZzy5bX.mjs → acquire-RbtvDg9s.mjs} +2 -3
  8. package/dist/{actionPermissions-BLnbDA6g.mjs → actionPermissions-De0AJ7hm.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-CVlaTjAX.mjs → authorizationDecision-DeZMrHcm.mjs} +5 -6
  18. package/dist/{base-CZyixEQR.d.mts → base-HXNgPQww.d.mts} +1 -7
  19. package/dist/{boundedMap-DSy7KkeX.mjs → boundedMap-2WBh3gM9.mjs} +2 -3
  20. package/dist/{buildHandler-B4IhILv9.mjs → buildHandler-DxVOOBpw.mjs} +5 -6
  21. package/dist/cache/index.d.mts +4 -10
  22. package/dist/cache/index.mjs +5 -6
  23. package/dist/{caching-DqakP2vY.mjs → caching-BYRwYrUo.mjs} +3 -4
  24. package/dist/{claimed-XoiVrWZ2.mjs → claimed-DYlELdnm.mjs} +2 -3
  25. package/dist/cleanup/index.d.mts +9 -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-CtWkmWn3.mjs → constants-CHZMUwBW.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-Cro2v5a7.mjs → core-D9rS2BxO.mjs} +9 -12
  47. package/dist/{createActionRouter-k-gwiPv6.mjs → createActionRouter-0qkCRzTL.mjs} +7 -8
  48. package/dist/{createAggregationRouter-BqWqhAPG.mjs → createAggregationRouter-CUf5Esd9.mjs} +9 -10
  49. package/dist/{createApp-Dw7L72Hz.mjs → createApp-DZIXfDKD.mjs} +49 -62
  50. package/dist/{createMcpServer-DSztofa9.d.mts → createMcpServer-DeVpqQF-.d.mts} +1 -3
  51. package/dist/{defineAggregation-pxbd7BBK.mjs → defineAggregation-bmKQ4NmC.mjs} +2 -3
  52. package/dist/{defineResource-DwgEjLCO.mjs → defineResource-CGmdmGwh.mjs} +78 -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-B9wF2Z1F.mjs → elevation-CzhqAyVN.mjs} +9 -10
  58. package/dist/{elevation-BW2J3tNj.d.mts → elevation-DPD0hcU-.d.mts} +0 -2
  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-Dr2nG0Ui.mjs → errorHandler-dFyGOEoB.mjs} +16 -6
  63. package/dist/{errors-BtHzrSA6.mjs → errors-BY8vzlP4.mjs} +2 -3
  64. package/dist/{errors-JYc9vwqE.d.mts → errors-DTo0me1o.d.mts} +0 -2
  65. package/dist/{eventPlugin-BtmA4-3P.d.mts → eventPlugin-BY38F6yK.d.mts} +1 -7
  66. package/dist/{eventPlugin-Dvs7OBw8.mjs → eventPlugin-eMhAPtQA.mjs} +10 -12
  67. package/dist/{eventTypes-BVoCTG5c.mjs → eventTypes-Do2KYeJx.mjs} +5 -8
  68. package/dist/events/index.d.mts +4 -16
  69. package/dist/events/index.mjs +8 -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-Dtn0IIRn.d.mts} +4 -10
  78. package/dist/{fields-BBSpf8pS.d.mts → fields-JTkrtO-r.d.mts} +0 -2
  79. package/dist/{fields-C1e_7Fwi.mjs → fields-LnbCcvsw.mjs} +2 -3
  80. package/dist/{filter-merge-xaiEKtz8.mjs → filter-merge-BAWi019Q.mjs} +2 -3
  81. package/dist/{generate-DCGuEbqI.d.mts → generate-C-g_KOkV.d.mts} +0 -4
  82. package/dist/{generate-DJiJMaXN.mjs → generate-oXoDnpJf.mjs} +7 -12
  83. package/dist/{headers-Dr-wt6Tr.mjs → headers-DBd3Qheo.mjs} +3 -4
  84. package/dist/{health-DkkWbJtQ.mjs → health-BlJu9GXS.mjs} +2 -3
  85. package/dist/{health-BLYn_Hds.mjs → health-Dp-3EC9o.mjs} +4 -7
  86. package/dist/hooks/index.d.mts +1 -1
  87. package/dist/hooks/index.mjs +2 -2
  88. package/dist/idempotency/index.d.mts +3 -9
  89. package/dist/idempotency/index.mjs +10 -13
  90. package/dist/idempotency/redis.d.mts +1 -1
  91. package/dist/idempotency/redis.mjs +3 -4
  92. package/dist/{index-Bxriq3so.d.mts → index-B5i9-vuP.d.mts} +4 -26
  93. package/dist/{index-Chgz3d0i.d.mts → index-BAXDo5eE.d.mts} +1 -7
  94. package/dist/{index-Beg3aNnK.d.mts → index-BTxzJ_MN.d.mts} +67 -25
  95. package/dist/{index-CUJvoyw3.d.mts → index-Bqfo8hLz.d.mts} +2 -24
  96. package/dist/{index-uhkUA5-U.d.mts → index-CUdaoCYt.d.mts} +13 -23
  97. package/dist/{index-WH7xgvxS.d.mts → index-DyJFTJLA.d.mts} +31 -92
  98. package/dist/index.d.mts +7 -9
  99. package/dist/index.mjs +12 -13
  100. package/dist/{init-CW3kJqNW.mjs → init-BOaNkLYb.mjs} +18 -35
  101. package/dist/{init-Cscs4lab.d.mts → init-CV2_Fw3H.d.mts} +0 -4
  102. package/dist/integrations/event-gateway.d.mts +3 -5
  103. package/dist/integrations/event-gateway.mjs +3 -4
  104. package/dist/integrations/index.d.mts +3 -3
  105. package/dist/integrations/index.mjs +1 -1
  106. package/dist/integrations/jobs/index.d.mts +1 -1
  107. package/dist/integrations/jobs/index.mjs +7 -11
  108. package/dist/integrations/mcp/index.d.mts +7 -39
  109. package/dist/integrations/mcp/index.mjs +8 -14
  110. package/dist/integrations/mcp/testing.d.mts +3 -5
  111. package/dist/integrations/mcp/testing.mjs +3 -4
  112. package/dist/integrations/streamline.d.mts +1 -3
  113. package/dist/integrations/streamline.mjs +4 -5
  114. package/dist/integrations/webhooks.d.mts +2 -4
  115. package/dist/integrations/webhooks.mjs +4 -5
  116. package/dist/integrations/websocket-pushref-redis.d.mts +2 -4
  117. package/dist/integrations/websocket-pushref-redis.mjs +2 -3
  118. package/dist/integrations/websocket-redis.d.mts +2 -4
  119. package/dist/integrations/websocket-redis.mjs +2 -3
  120. package/dist/integrations/websocket.d.mts +2 -2
  121. package/dist/integrations/websocket.mjs +13 -24
  122. package/dist/{interface-JJzwH4Ro.d.mts → interface-BmExzQRD.d.mts} +0 -2
  123. package/dist/{interface-BOk3YnTz.d.mts → interface-WR1U0K7t.d.mts} +0 -2
  124. package/dist/{jsonBody-DPU8yYwA.mjs → jsonBody-DpRpKR_K.mjs} +3 -4
  125. package/dist/{keys-Dgn6OYhl.mjs → keys-FBz6Ull-.mjs} +2 -3
  126. package/dist/{loadResources-BtKj6P1P.mjs → loadResources-Bx1sKPnF.mjs} +4 -5
  127. package/dist/{loadResourcesFromEntry-Bmq6TnB7.mjs → loadResourcesFromEntry-b_jcqbxh.mjs} +3 -4
  128. package/dist/logger/index.d.mts +1 -3
  129. package/dist/logger/index.mjs +2 -2
  130. package/dist/{logger-qQNLlOAU.mjs → logger-CbFcIEBZ.mjs} +3 -5
  131. package/dist/{mcpPlugin-DDfe8jAP.mjs → mcpPlugin-yix548XX.mjs} +41 -60
  132. package/dist/{memory-C0Blueoh.mjs → memory-Bgw5dn8N.mjs} +4 -5
  133. package/dist/{metrics-DYka72iN.mjs → metrics-CZDQWVjS.mjs} +4 -5
  134. package/dist/middleware/index.d.mts +1 -5
  135. package/dist/middleware/index.mjs +4 -5
  136. package/dist/migrations/index.d.mts +0 -2
  137. package/dist/migrations/index.mjs +3 -4
  138. package/dist/{module-BszSyWbd.mjs → module-Dsc_nKL5.mjs} +2 -3
  139. package/dist/{multiTenant-CAtYlW6H.d.mts → multiTenant-XCxAUlru.d.mts} +1 -5
  140. package/dist/{multipartBody-RHvIkNmc.mjs → multipartBody-B85ek8Kj.mjs} +2 -3
  141. package/dist/observeSend-BK-JN1jK.mjs +20 -0
  142. package/dist/{openapi-BrFPc3Ny.mjs → openapi-Co7hl073.mjs} +18 -28
  143. package/dist/outbox-admin/index.d.mts +2 -4
  144. package/dist/outbox-admin/index.mjs +6 -7
  145. package/dist/{outbox-module-gZCHoE4H.d.mts → outbox-module-XvUThpqn.d.mts} +2 -8
  146. package/dist/{outbox-module-DF4Bu_Qa.mjs → outbox-module-mg9kDYkd.mjs} +13 -17
  147. package/dist/permissions/index.d.mts +4 -4
  148. package/dist/permissions/index.mjs +7 -7
  149. package/dist/{permissions-DN1CWH56.mjs → permissions-A1oKtpiC.mjs} +19 -29
  150. package/dist/{pipe-B8uq865o.mjs → pipe-Czpw9U2n.mjs} +3 -4
  151. package/dist/pipeline/index.d.mts +1 -9
  152. package/dist/pipeline/index.mjs +5 -8
  153. package/dist/{plan-DUGfynNg.mjs → plan-KVseuBCL.mjs} +5 -9
  154. package/dist/{plugin-ByU3h-bR.mjs → plugin-DTWt_8C3.mjs} +130 -62
  155. package/dist/plugins/index.d.mts +8 -16
  156. package/dist/plugins/index.mjs +22 -26
  157. package/dist/plugins/response-cache.d.mts +2 -4
  158. package/dist/plugins/response-cache.mjs +10 -10
  159. package/dist/plugins/tracing-entry.d.mts +1 -1
  160. package/dist/plugins/tracing-entry.mjs +3 -4
  161. package/dist/{pluralize-Cdya8zYt.mjs → pluralize-msB9X3yw.mjs} +2 -3
  162. package/dist/presets/filesUpload.d.mts +4 -6
  163. package/dist/presets/filesUpload.mjs +6 -7
  164. package/dist/presets/index.d.mts +3 -19
  165. package/dist/presets/index.mjs +2 -2
  166. package/dist/presets/multiTenant.d.mts +1 -1
  167. package/dist/presets/multiTenant.mjs +7 -7
  168. package/dist/presets/search.d.mts +3 -5
  169. package/dist/presets/search.mjs +3 -4
  170. package/dist/{presets-CCOlKTZw.mjs → presets-qKCehiJM.mjs} +11 -18
  171. package/dist/{projection-BGty6ie4.mjs → projection-ClBqtsIw.mjs} +3 -4
  172. package/dist/{pushref-registry-UxCkoA4C.d.mts → pushref-registry-d86QUaSq.d.mts} +0 -6
  173. package/dist/{queryCachePlugin-B7itTkWu.mjs → queryCachePlugin-3gJj5Rbz.mjs} +8 -10
  174. package/dist/{queryCachePlugin-C2lZjTxk.d.mts → queryCachePlugin-DYQUyeJ9.d.mts} +2 -4
  175. package/dist/{rateLimitKey-DBWO59H9.mjs → rateLimitKey-Kro---xl.mjs} +2 -3
  176. package/dist/{realtime-_59Rlje8.mjs → realtime-Ber8uJN2.mjs} +17 -19
  177. package/dist/{redis-BDgv9Glw.d.mts → redis-RpDMemdm.d.mts} +2 -4
  178. package/dist/{redis-stream-BMk-bpQS.d.mts → redis-stream-CS1N9dwM.d.mts} +1 -3
  179. package/dist/{redisShapes-CQksY67q.d.mts → redisShapes-CqBXTn_s.d.mts} +0 -2
  180. package/dist/registry/index.d.mts +2 -12
  181. package/dist/registry/index.mjs +3 -3
  182. package/dist/{registry-uG4wr541.mjs → registry-BA-_vFYk.mjs} +7 -12
  183. package/dist/{renewingLease-CiU3ZynH.mjs → renewingLease-CMY8YOcc.mjs} +2 -3
  184. package/dist/{replyHelpers-Dr2pnXZg.mjs → replyHelpers-DK9P_XSz.mjs} +3 -4
  185. package/dist/{requestContext-DBKIdmDi.mjs → requestContext-GYO_0gEw.mjs} +2 -3
  186. package/dist/{requirement-CbiLdQ1n.d.mts → requirement-CTRQjjQx.d.mts} +0 -2
  187. package/dist/{requirement-DxOaghWD.mjs → requirement-DeNjZIH3.mjs} +2 -3
  188. package/dist/{resourceRateLimit-Wf6d6FL9.d.mts → resourceRateLimit-DCWglD7V.d.mts} +1 -3
  189. package/dist/{resourceRateLimit-BBdj5yRq.mjs → resourceRateLimit-tHLbrtWc.mjs} +3 -4
  190. package/dist/{rolldown-runtime-DpVPUeXF.mjs → rolldown-runtime-Kv1fZdLg.mjs} +2 -3
  191. package/dist/{routeValidator-BNTqM1Eh.mjs → routeValidator-C_H5NanI.mjs} +2 -3
  192. package/dist/{runtimeCapabilities-D_3eUO6V.mjs → runtimeCapabilities-DWqbxkyw.mjs} +2 -3
  193. package/dist/{schedules-CVS7c1nv.mjs → schedules-eO_RzhCU.mjs} +132 -9
  194. package/dist/{schemaConverter-BQbg7loK.mjs → schemaConverter-DBJrPZN4.mjs} +3 -4
  195. package/dist/{schemaIR-CUI3hPQR.mjs → schemaIR-CEScKT2v.mjs} +3 -4
  196. package/dist/schemas/index.d.mts +0 -2
  197. package/dist/schemas/index.mjs +2 -3
  198. package/dist/scim/index.d.mts +0 -12
  199. package/dist/scim/index.mjs +10 -18
  200. package/dist/scope/index.d.mts +2 -6
  201. package/dist/scope/index.mjs +5 -5
  202. package/dist/{scope-DFXngazv.mjs → scope-B-Sm9m_E.mjs} +5 -6
  203. package/dist/{sessionManager-qimlKV0P.d.mts → sessionManager-CdvDF04x.d.mts} +2 -4
  204. package/dist/{shutdown-BCXCwghd.mjs → shutdown-DzLFbe27.mjs} +2 -3
  205. package/dist/{simpleEqualityMatcher-5jOzYQ_L.mjs → simpleEqualityMatcher-DOJhwQ8g.mjs} +2 -3
  206. package/dist/{sse-BilBz766.mjs → sse-2972pVwV.mjs} +8 -9
  207. package/dist/{sseStream-BG_uJL6J.mjs → sseStream-AWLEeNV-.mjs} +3 -4
  208. package/dist/{storage-Cx9Sz3Ou.d.mts → storage-odC5MNKN.d.mts} +0 -2
  209. package/dist/{store-helpers-CzLZdVa1.mjs → store-helpers-VzjgVTkM.mjs} +2 -3
  210. package/dist/{streaming-DgUvMWlv.mjs → streaming-DvraWW6x.mjs} +2 -3
  211. package/dist/{subscriberIdentity-EWnIZ-U8.mjs → subscriberIdentity-Bya56jsg.mjs} +2 -3
  212. package/dist/{tenancy-CVMvO5DH.mjs → tenancy-DSa_0hhw.mjs} +3 -4
  213. package/dist/{tenantPreparation-DIH-GX4g.mjs → tenantPreparation-BrpkQre3.mjs} +5 -6
  214. package/dist/testing/cleanupStoreContract.d.mts +2 -4
  215. package/dist/testing/cleanupStoreContract.mjs +2 -3
  216. package/dist/testing/index.d.mts +6 -32
  217. package/dist/testing/index.mjs +24 -37
  218. package/dist/testing/outboxStoreContract.d.mts +1 -3
  219. package/dist/testing/outboxStoreContract.mjs +3 -4
  220. package/dist/testing/requiredPorts.d.mts +2 -4
  221. package/dist/testing/requiredPorts.mjs +3 -4
  222. package/dist/testing/storageContract.d.mts +2 -4
  223. package/dist/testing/storageContract.mjs +2 -3
  224. package/dist/{timing-q9NITK04.mjs → timing-6rQTuCwg.mjs} +3 -5
  225. package/dist/{tracing-Dro5eH6j.d.mts → tracing-JSFiBl5r.d.mts} +0 -2
  226. package/dist/{transactionContext-NHmhDIOF.mjs → transactionContext-DaxYUEgH.mjs} +2 -3
  227. package/dist/{typeGuards-CPYR9RCg.mjs → typeGuards-UKnX8wPX.mjs} +2 -3
  228. package/dist/types/index.d.mts +4 -4
  229. package/dist/types/index.mjs +1 -1
  230. package/dist/types/storage.d.mts +1 -1
  231. package/dist/types/storage.mjs +1 -1
  232. package/dist/{types-ByHn9rEO.d.mts → types-0Dqlbgn8.d.mts} +0 -2
  233. package/dist/{types-D3Ixsh00.d.mts → types-BYEb_dLW.d.mts} +2 -4
  234. package/dist/{types-BJ-2XqVF.d.mts → types-BeEJm-DV.d.mts} +114 -14
  235. package/dist/{types-DVLddu2q.d.mts → types-C0YJAiL0.d.mts} +0 -2
  236. package/dist/{types-BI4sbUJ3.mjs → types-CuGjhn83.mjs} +5 -6
  237. package/dist/{types-Ddl9OjmE.d.mts → types-DnkIALZ8.d.mts} +0 -4
  238. package/dist/usage/index.d.mts +2 -10
  239. package/dist/usage/index.mjs +8 -12
  240. package/dist/{userHelpers-oBTU3a_k.mjs → userHelpers-oX5_mOVs.mjs} +2 -3
  241. package/dist/utils/index.d.mts +5 -39
  242. package/dist/utils/index.mjs +12 -12
  243. package/dist/{utils-BmE8zRrh.mjs → utils-CjjGOT4E.mjs} +20 -30
  244. package/dist/{validate-Dby08LhR.mjs → validate-4RlTKOJb.mjs} +5 -7
  245. package/dist/{versioning-P6JMNcJr.mjs → versioning-Dk2-19La.mjs} +4 -5
  246. package/dist/{versioning-Bqm_57Qt.d.mts → versioning-S18y2-0C.d.mts} +1 -15
  247. package/dist/{websocket-Cs4awVyD.d.mts → websocket-BGuc-WVZ.d.mts} +1 -15
  248. package/dist/{workScope-BcMLKa3G.mjs → workScope-DoBsoVo4.mjs} +3 -4
  249. package/llms.txt +37 -30
  250. package/package.json +9 -8
  251. package/skills/arc/SKILL.md +65 -844
  252. package/skills/arc/references/agent-auth.md +82 -193
  253. package/skills/arc/references/api-reference.md +41 -245
  254. package/skills/arc/references/auth-api-keys.md +99 -0
  255. package/skills/arc/references/auth-better-auth-overlay.md +87 -0
  256. package/skills/arc/references/auth-better-auth.md +78 -0
  257. package/skills/arc/references/auth-permissions.md +100 -0
  258. package/skills/arc/references/auth-strategies.md +122 -0
  259. package/skills/arc/references/boot.md +80 -0
  260. package/skills/arc/references/enterprise-auth.md +65 -81
  261. package/skills/arc/references/events-outbox.md +90 -0
  262. package/skills/arc/references/events.md +75 -440
  263. package/skills/arc/references/integrations-jobs.md +74 -0
  264. package/skills/arc/references/integrations-realtime.md +84 -0
  265. package/skills/arc/references/integrations-webhooks.md +71 -0
  266. package/skills/arc/references/integrations-workflows.md +47 -0
  267. package/skills/arc/references/mcp-auth.md +83 -0
  268. package/skills/arc/references/mcp-custom-tools.md +125 -0
  269. package/skills/arc/references/mcp-setup.md +115 -0
  270. package/skills/arc/references/mcp-testing.md +63 -0
  271. package/skills/arc/references/multi-tenancy.md +56 -230
  272. package/skills/arc/references/permissions-scope.md +81 -0
  273. package/skills/arc/references/production-api.md +119 -0
  274. package/skills/arc/references/production-audit.md +101 -0
  275. package/skills/arc/references/production-boot.md +91 -0
  276. package/skills/arc/references/production-caching.md +63 -0
  277. package/skills/arc/references/production-distributed.md +75 -0
  278. package/skills/arc/references/production-idempotency.md +83 -0
  279. package/skills/arc/references/production-observability.md +83 -0
  280. package/skills/arc/references/production-realtime.md +70 -0
  281. package/skills/arc/references/production-reliability.md +100 -0
  282. package/skills/arc/references/production-shutdown.md +43 -0
  283. package/skills/arc/references/querying.md +76 -0
  284. package/skills/arc/references/resources.md +97 -0
  285. package/skills/arc/references/schedules.md +79 -0
  286. package/skills/arc/references/scim.md +61 -208
  287. package/skills/arc/references/tenancy-scope-install.md +82 -0
  288. package/skills/arc/references/testing.md +101 -144
  289. package/skills/arc/references/usage-cleanup-capabilities.md +45 -0
  290. package/skills/arc/references/validation.md +91 -0
  291. package/skills/arc/references/writes-hooks-errors.md +80 -0
  292. package/skills/arc-code-review/SKILL.md +67 -114
  293. package/skills/arc-code-review/references/arc-cheatsheet.md +68 -167
  294. package/skills/arc-code-review/references/mongokit-repositories.md +104 -0
  295. package/skills/arc-code-review/references/recipe-events-cache-jobs.md +112 -0
  296. package/skills/arc-code-review/references/recipe-resource.md +100 -0
  297. package/skills/arc-code-review/references/recipe-schemas-fields.md +93 -0
  298. package/skills/arc-code-review/references/recipe-scope-permissions.md +82 -0
  299. package/skills/arc-code-review/references/scaffolding.md +61 -198
  300. package/skills/arc-code-review/references/severity.md +49 -102
  301. package/skills/arc-code-review/references/smells-auth-scope.md +80 -0
  302. package/skills/arc-code-review/references/smells-data-events.md +66 -0
  303. package/skills/arc-code-review/references/smells-imports-style.md +59 -0
  304. package/skills/arc-code-review/references/smells-platform.md +89 -0
  305. package/skills/arc-code-review/references/smells-routes-schemas.md +66 -0
  306. package/skills/arc-module-publishing/SKILL.md +82 -208
  307. package/skills/arc-module-publishing/references/action-presets-and-plugins.md +87 -0
  308. package/skills/arc-module-publishing/references/build-and-types.md +73 -0
  309. package/skills/arc-module-publishing/references/module-lifecycle.md +101 -0
  310. package/skills/arc-module-publishing/references/package-manifest.md +34 -122
  311. package/skills/arc-module-publishing/references/publishing-workflow.md +44 -140
  312. package/skills/arc-module-publishing/references/resource-assembly.md +102 -0
  313. package/skills/arc-module-publishing/references/testing-packages.md +82 -0
  314. package/skills/arc/references/auth.md +0 -729
  315. package/skills/arc/references/integrations.md +0 -452
  316. package/skills/arc/references/mcp.md +0 -691
  317. package/skills/arc/references/production.md +0 -835
  318. package/skills/arc-code-review/references/anti-patterns.md +0 -1008
  319. package/skills/arc-code-review/references/migration-recipes.md +0 -649
  320. package/skills/arc-code-review/references/mongokit-migration.md +0 -360
  321. package/skills/arc-module-publishing/references/authoring-modules.md +0 -327
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.mjs";
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Kv1fZdLg.mjs";
3
3
  import { toCanonicalList } from "@classytic/repo-core/pagination";
4
4
  import fp from "fastify-plugin";
5
- //#region src/plugins/replyHelpers.ts
5
+ // src/plugins/replyHelpers.ts
6
6
  var replyHelpers_exports = /* @__PURE__ */ __exportAll({ replyHelpersPlugin: () => replyHelpersPlugin });
7
7
  async function replyHelpersPluginFn(fastify) {
8
8
  fastify.decorateReply("sendList", function(input) {
@@ -19,5 +19,4 @@ const replyHelpersPlugin = fp(replyHelpersPluginFn, {
19
19
  name: "arc-reply-helpers",
20
20
  fastify: "5.x"
21
21
  });
22
- //#endregion
23
22
  export { replyHelpers_exports as n, replyHelpersPlugin as t };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
- //#region src/context/requestContext.ts
3
+ // src/context/requestContext.ts
4
4
  /**
5
5
  * Request Context via AsyncLocalStorage
6
6
  *
@@ -90,5 +90,4 @@ function getTraceHeaders() {
90
90
  if (store.tracestate) headers.tracestate = store.tracestate;
91
91
  return Object.keys(headers).length > 0 ? headers : void 0;
92
92
  }
93
- //#endregion
94
93
  export { requestContext as n, getTraceHeaders as t };
@@ -1,6 +1,5 @@
1
1
 
2
2
  import { FastifyRequest } from "fastify";
3
- //#region src/idempotency/requirement.d.ts
4
3
  /** The `config.idempotency` slot of a Fastify route. */
5
4
  interface RouteIdempotencyConfig {
6
5
  /** Every call needs a key — any method, DELETE included. */
@@ -18,5 +17,4 @@ interface RouteIdempotencyConfig {
18
17
  /** Action route only: action name -> owner, for actions in `requiredActions` that dedupe themselves. */
19
18
  readonly handlerDedup?: Readonly<Record<string, string>>;
20
19
  }
21
- //#endregion
22
20
  export { RouteIdempotencyConfig as t };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
2
- //#region src/idempotency/requirement.ts
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ // src/idempotency/requirement.ts
3
3
  /** What is wrong with a route's idempotency declaration, or `undefined` when it is sound. */
4
4
  function idempotencyConfigProblem(config) {
5
5
  const idem = config?.idempotency;
@@ -31,5 +31,4 @@ function requestRequiresIdempotencyKey(request) {
31
31
  const action = request.body?.action;
32
32
  return typeof action === "string" && idem.requiredActions.includes(action);
33
33
  }
34
- //#endregion
35
34
  export { requestRequiresIdempotencyKey as i, idempotencyConfigProblem as n, requestDedupedByHandler as r, declaresIdempotencyFence as t };
@@ -1,7 +1,6 @@
1
1
 
2
- import { i as RequestScope } from "./types-Ddl9OjmE.mjs";
2
+ import { i as RequestScope } from "./types-DnkIALZ8.mjs";
3
3
  import { FastifyInstance } from "fastify";
4
- //#region src/permissions/resourceRateLimit.d.ts
5
4
  interface ResourceRateLimitPolicy {
6
5
  max: number;
7
6
  timeWindow: string;
@@ -26,5 +25,4 @@ interface ResourceRateLimiter {
26
25
  declare function resolveResourceRateLimiter(app: FastifyInstance, durability?: ResourceRateLimiter["durability"]): ResourceRateLimiter | undefined;
27
26
  /** Standalone tools may use memory; wired distributed apps use the host's shared store. */
28
27
  declare function createMemoryResourceRateLimiter(capacity?: number): ResourceRateLimiter;
29
- //#endregion
30
28
  export { createMemoryResourceRateLimiter as a, ResourceRateLimiter as i, ResourceRateLimitDecision as n, resolveResourceRateLimiter as o, ResourceRateLimitPolicy as r, ResourceRateLimitContext as t };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
2
- import { t as createTenantKeyGenerator } from "./rateLimitKey-DBWO59H9.mjs";
3
- //#region src/permissions/resourceRateLimit.ts
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ import { t as createTenantKeyGenerator } from "./rateLimitKey-Kro---xl.mjs";
3
+ // src/permissions/resourceRateLimit.ts
4
4
  function decision(allowed, max, remaining, ttlSeconds) {
5
5
  const reset = Math.max(1, ttlSeconds);
6
6
  return {
@@ -176,5 +176,4 @@ function resourceRateLimitWindowMs(window) {
176
176
  if (!Number.isSafeInteger(value) || value <= 0) throw new Error(`rateLimit.timeWindow '${window}' must be a positive duration in milliseconds.`);
177
177
  return value;
178
178
  }
179
- //#endregion
180
179
  export { resourceRateLimitWindowMs as a, resolveResourceRateLimiter as i, markRateLimitingDisabled as n, recordUnenforcedRateLimit as r, createMemoryResourceRateLimiter as t };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
2
  import "node:module";
3
- //#region \0rolldown/runtime.js
3
+ // \0rolldown/runtime.js
4
4
  var __defProp = Object.defineProperty;
5
5
  var __exportAll = (all, no_symbols) => {
6
6
  let target = {};
@@ -11,5 +11,4 @@ var __exportAll = (all, no_symbols) => {
11
11
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
12
12
  return target;
13
13
  };
14
- //#endregion
15
14
  export { __exportAll as t };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
2
  import { AjvCompiler } from "@fastify/ajv-compiler";
3
- //#region src/core/routeValidator.ts
3
+ // src/core/routeValidator.ts
4
4
  /**
5
5
  * Arc's request validator — the AJV settings every route arc builds is validated with, on ANY host.
6
6
  *
@@ -66,5 +66,4 @@ function lowerCaseHeaderSchema(schema) {
66
66
  function isPlainObject(value) {
67
67
  return typeof value === "object" && value !== null && Object.getPrototypeOf(value) === Object.prototype;
68
68
  }
69
- //#endregion
70
69
  export { arcRouteValidatorCompiler as n, markArcRootValidator as r, arcAjvCustomOptions as t };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
2
- //#region src/utils/runtimeCapabilities.ts
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ // src/utils/runtimeCapabilities.ts
3
3
  /**
4
4
  * `Symbol.for` so declarations from two arc copies in one dependency graph
5
5
  * land in ONE registry — same reasoning as `ARC_EVENT_TRANSPORT`. Not on the
@@ -71,5 +71,4 @@ function auditRuntimeCapabilities(fastify, runtime) {
71
71
  throw new Error(`runtime: 'distributed' — ${violations.length} subsystem(s) hold PER-PROCESS state that multi-replica deployment breaks:\n${lines}\nWire a shared store for each, or — where per-process is genuinely intended — have the declarant pass \`accepted: true\` with a reason.`);
72
72
  }
73
73
  }
74
- //#endregion
75
74
  export { declareRuntimeCapability as n, initRuntimeCapabilityRegistry as r, auditRuntimeCapabilities as t };
@@ -1,10 +1,114 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.mjs";
3
- import { a as runShutdown, i as runAdmittedWork, r as registerShutdownParticipant } from "./shutdown-BCXCwghd.mjs";
4
- import { t as runWorkScope } from "./workScope-BcMLKa3G.mjs";
5
- import { t as startRenewingLease } from "./renewingLease-CiU3ZynH.mjs";
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-Kv1fZdLg.mjs";
3
+ import { a as runShutdown, i as runAdmittedWork, r as registerShutdownParticipant } from "./shutdown-DzLFbe27.mjs";
4
+ import { t as runWorkScope } from "./workScope-DoBsoVo4.mjs";
5
+ import { t as startRenewingLease } from "./renewingLease-CMY8YOcc.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.1 | MIT | https://classytic.com */
2
- import { t as arcLog } from "./logger-qQNLlOAU.mjs";
3
- //#region src/utils/schemaConverter.ts
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ import { t as arcLog } from "./logger-CbFcIEBZ.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.1 | MIT | https://classytic.com */
2
- import { o as toJsonSchema } from "./schemaConverter-BQbg7loK.mjs";
3
- //#region src/core/schemaIR.ts
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ import { o as toJsonSchema } from "./schemaConverter-DBJrPZN4.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.1 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.46.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.1 | MIT | https://classytic.com */
2
- import { t as parseJsonBody } from "../jsonBody-DPU8yYwA.mjs";
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ import { t as parseJsonBody } from "../jsonBody-DpRpKR_K.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.1 | 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-BI4sbUJ3.mjs";
3
- import { t as createTenantKeyGenerator } from "../rateLimitKey-DBWO59H9.mjs";
4
- import { t as elevation_default } from "../elevation-B9wF2Z1F.mjs";
5
- import { t as resolveOrgFromHeader } from "../scope-DFXngazv.mjs";
1
+ /*! @classytic/arc v2.46.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-CuGjhn83.mjs";
3
+ import { t as createTenantKeyGenerator } from "../rateLimitKey-Kro---xl.mjs";
4
+ import { t as elevation_default } from "../elevation-CzhqAyVN.mjs";
5
+ import { t as resolveOrgFromHeader } from "../scope-B-Sm9m_E.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.1 | MIT | https://classytic.com */
2
- import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-BtHzrSA6.mjs";
3
- import { n as requireSingleHeaderValue } from "./headers-Dr-wt6Tr.mjs";
4
- import { n as getUserRoles } from "./userHelpers-oBTU3a_k.mjs";
5
- //#region src/scope/resolveOrgFromHeader.ts
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-BY8vzlP4.mjs";
3
+ import { n as requireSingleHeaderValue } from "./headers-DBd3Qheo.mjs";
4
+ import { n as getUserRoles } from "./userHelpers-oX5_mOVs.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.1 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.46.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.1 | MIT | https://classytic.com */
2
- //#region src/utils/simpleEqualityMatcher.ts
1
+ /*! @classytic/arc v2.46.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 };