@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,23 +1,24 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DpVPUeXF.mjs";
3
- import { a as enterArcLoggerScope, i as runWithArcLogger, n as configureArcLogger, r as createPinoWriter, t as arcLog } from "./logger-qQNLlOAU.mjs";
4
- import { n as PUBLIC_SCOPE } from "./types-BI4sbUJ3.mjs";
5
- import { r as initRuntimeCapabilityRegistry, t as auditRuntimeCapabilities } from "./runtimeCapabilities-D_3eUO6V.mjs";
6
- import { a as runShutdown, t as initShutdownRegistry } from "./shutdown-BCXCwghd.mjs";
7
- import { n as isScopeAwareKeyGenerator, t as createTenantKeyGenerator } from "./rateLimitKey-DBWO59H9.mjs";
8
- import { i as resolveResourceRateLimiter, n as markRateLimitingDisabled } from "./resourceRateLimit-BBdj5yRq.mjs";
9
- import { r as markArcRootValidator, t as arcAjvCustomOptions } from "./routeValidator-BNTqM1Eh.mjs";
10
- import { c as createRequestIdGenerator, r as mergeHealthChecks } from "./health-BLYn_Hds.mjs";
11
- import { t as parseJsonBody } from "./jsonBody-DPU8yYwA.mjs";
12
- import { a as portsForModule, b as verifyEventDurability, f as resolveModuleArm, g as crudEventsOf, h as buildModuleGraph, m as analyzeModuleGraph, n as composeModules, x as verifyModuleGraph } from "./plan-DUGfynNg.mjs";
13
- import { c as wrapWithAttribution, f as defineEvent, l as wrapWithBoundary, r as CRUD_EVENT_SCHEMA } from "./eventTypes-BVoCTG5c.mjs";
14
- import { r as withSubscriberId } from "./subscriberIdentity-EWnIZ-U8.mjs";
15
- import { r as getOptionalModuleExports } from "./module-BszSyWbd.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 enterArcLoggerScope, i as runWithArcLogger, n as configureArcLogger, r as createPinoWriter, t as arcLog } from "./logger-CbFcIEBZ.mjs";
4
+ import { n as PUBLIC_SCOPE } from "./types-CuGjhn83.mjs";
5
+ import { t as runObservingSend } from "./observeSend-BK-JN1jK.mjs";
6
+ import { r as initRuntimeCapabilityRegistry, t as auditRuntimeCapabilities } from "./runtimeCapabilities-DWqbxkyw.mjs";
7
+ import { a as runShutdown, t as initShutdownRegistry } from "./shutdown-DzLFbe27.mjs";
8
+ import { n as isScopeAwareKeyGenerator, t as createTenantKeyGenerator } from "./rateLimitKey-Kro---xl.mjs";
9
+ import { i as resolveResourceRateLimiter, n as markRateLimitingDisabled } from "./resourceRateLimit-tHLbrtWc.mjs";
10
+ import { r as markArcRootValidator, t as arcAjvCustomOptions } from "./routeValidator-C_H5NanI.mjs";
11
+ import { c as createRequestIdGenerator, r as mergeHealthChecks } from "./health-Dp-3EC9o.mjs";
12
+ import { t as parseJsonBody } from "./jsonBody-DpRpKR_K.mjs";
13
+ import { a as portsForModule, b as verifyEventDurability, f as resolveModuleArm, g as crudEventsOf, h as buildModuleGraph, m as analyzeModuleGraph, n as composeModules, x as verifyModuleGraph } from "./plan-KVseuBCL.mjs";
14
+ import { c as wrapWithAttribution, f as defineEvent, l as wrapWithBoundary, r as CRUD_EVENT_SCHEMA } from "./eventTypes-Do2KYeJx.mjs";
15
+ import { r as withSubscriberId } from "./subscriberIdentity-Bya56jsg.mjs";
16
+ import { r as getOptionalModuleExports } from "./module-Dsc_nKL5.mjs";
16
17
  import { isProductionEnv, readEnv } from "@classytic/primitives/environment";
17
18
  import Fastify from "fastify";
18
19
  import qs from "qs";
19
20
  import { createEventRouter } from "@classytic/primitives/events";
20
- //#region src/factory/security/pluginLoader.ts
21
+ // src/factory/security/pluginLoader.ts
21
22
  const PLUGIN_REGISTRY = {
22
23
  cors: {
23
24
  package: "@fastify/cors",
@@ -121,8 +122,7 @@ async function loadPlugin(name, logger) {
121
122
  throw new Error(`Failed to load plugin '${name}': ${err.message}`);
122
123
  }
123
124
  }
124
- //#endregion
125
- //#region src/factory/assets.ts
125
+ // src/factory/assets.ts
126
126
  /**
127
127
  * Cache-Control per preset.
128
128
  *
@@ -211,8 +211,7 @@ async function registerAssetRoots(fastify, roots) {
211
211
  fastify.log.debug(`[arc] asset root "${root.prefix}" → ${String(root.root)} (cache: ${root.cache ?? "revalidate"}, cross-origin: ${policy.crossOriginResourcePolicy})`);
212
212
  }
213
213
  }
214
- //#endregion
215
- //#region src/factory/module/contributions.ts
214
+ // src/factory/module/contributions.ts
216
215
  /**
217
216
  * Collect every module's `healthChecks` in the caller's order. Fails at boot
218
217
  * on a duplicate check `name` across modules, naming BOTH owning modules.
@@ -263,8 +262,7 @@ async function collectModuleScheduledJobs(fastify, modules, countsByModule) {
263
262
  }
264
263
  return out;
265
264
  }
266
- //#endregion
267
- //#region src/factory/module/descriptor.ts
265
+ // src/factory/module/descriptor.ts
268
266
  /**
269
267
  * Build a descriptor. Called by `registerResources` once per module, after
270
268
  * resources are resolved and `owns` is effective.
@@ -285,8 +283,7 @@ function describeResolvedModule(input) {
285
283
  lifecycle: Object.freeze({ ...input.lifecycle })
286
284
  });
287
285
  }
288
- //#endregion
289
- //#region src/factory/module/disposers.ts
286
+ // src/factory/module/disposers.ts
290
287
  const NO_PORTS = Object.freeze({});
291
288
  /**
292
289
  * The one typing boundary for ports: `assertModuleRequirements` has already proven every
@@ -337,8 +334,7 @@ function createDisposerRegistry(fastify, portsOf = () => NO_PORTS) {
337
334
  }
338
335
  };
339
336
  }
340
- //#endregion
341
- //#region src/factory/module/lifecycle.ts
337
+ // src/factory/module/lifecycle.ts
342
338
  /**
343
339
  * Subscribe every module's `eventHandlers` in dependency order (pass the
344
340
  * `orderModules`-sorted list). Returns the ordered list of unsubscribe
@@ -422,8 +418,7 @@ async function unsubscribeModuleEventHandlers(unsubscribes) {
422
418
  }
423
419
  return errors;
424
420
  }
425
- //#endregion
426
- //#region src/factory/module/state.ts
421
+ // src/factory/module/state.ts
427
422
  /**
428
423
  * The honest read of the state map. `fastify.arc` is optional (see
429
424
  * fastify-augmentation.ts) and `moduleStates` is populated by
@@ -501,8 +496,7 @@ function getModuleResources(fastify, name) {
501
496
  }
502
497
  return out;
503
498
  }
504
- //#endregion
505
- //#region src/factory/module/teardown.ts
499
+ // src/factory/module/teardown.ts
506
500
  function createModuleTeardown(fastify, modules, disposers) {
507
501
  const initializedNames = /* @__PURE__ */ new Set();
508
502
  const consumed = /* @__PURE__ */ new Set();
@@ -548,8 +542,7 @@ function createModuleTeardown(fastify, modules, disposers) {
548
542
  hasComposedModules: () => modules.length > 0
549
543
  };
550
544
  }
551
- //#endregion
552
- //#region src/factory/presets.ts
545
+ // src/factory/presets.ts
553
546
  /**
554
547
  * Production preset - strict security, performance optimized
555
548
  */
@@ -763,8 +756,7 @@ function getPreset(name) {
763
756
  default: throw new Error(`Unknown preset: ${name}`);
764
757
  }
765
758
  }
766
- //#endregion
767
- //#region src/factory/registerArcPlugins.ts
759
+ // src/factory/registerArcPlugins.ts
768
760
  /**
769
761
  * Register Arc core plugin and event system.
770
762
  * Returns loaded plugin modules for registerArcPlugins (avoids duplicate dynamic import).
@@ -774,7 +766,7 @@ async function registerArcCore(fastify, config, trackPlugin) {
774
766
  await fastify.register(arcCorePlugin, { emitEvents: config.arcPlugins?.emitEvents !== false });
775
767
  trackPlugin("arc-core");
776
768
  if (config.arcPlugins?.events !== false) {
777
- const { default: eventPlugin } = await import("./eventPlugin-Dvs7OBw8.mjs").then((n) => n.r);
769
+ const { default: eventPlugin } = await import("./eventPlugin-eMhAPtQA.mjs").then((n) => n.r);
778
770
  const eventOpts = typeof config.arcPlugins?.events === "object" ? config.arcPlugins.events : {};
779
771
  await fastify.register(eventPlugin, {
780
772
  /**
@@ -829,15 +821,15 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
829
821
  trackPlugin("arc-graceful-shutdown", shutdownOpts);
830
822
  }
831
823
  if (config.arcPlugins?.caching) {
832
- const { default: cachingPlugin } = await import("./caching-DqakP2vY.mjs").then((n) => n.n);
824
+ const { default: cachingPlugin } = await import("./caching-BYRwYrUo.mjs").then((n) => n.n);
833
825
  const opts = config.arcPlugins.caching === true ? {} : config.arcPlugins.caching;
834
826
  await fastify.register(cachingPlugin, opts);
835
827
  trackPlugin("arc-caching", opts);
836
828
  }
837
829
  if (config.arcPlugins?.queryCache) {
838
- const { queryCachePlugin } = await import("./queryCachePlugin-B7itTkWu.mjs").then((n) => n.n);
830
+ const { queryCachePlugin } = await import("./queryCachePlugin-3gJj5Rbz.mjs").then((n) => n.n);
839
831
  const opts = config.arcPlugins.queryCache === true ? {} : config.arcPlugins.queryCache;
840
- const store = config.stores?.queryCache ?? new (await (import("./memory-C0Blueoh.mjs").then((n) => n.n))).MemoryCacheStore();
832
+ const store = config.stores?.queryCache ?? new (await (import("./memory-Bgw5dn8N.mjs").then((n) => n.n))).MemoryCacheStore();
841
833
  await fastify.register(queryCachePlugin, {
842
834
  store,
843
835
  ...opts
@@ -847,7 +839,7 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
847
839
  if (config.arcPlugins?.sse) {
848
840
  if (config.arcPlugins?.events === false) fastify.log.warn("SSE plugin requires events plugin (arcPlugins.events). SSE disabled.");
849
841
  else {
850
- const { default: ssePlugin } = await import("./sse-BilBz766.mjs").then((n) => n.n);
842
+ const { default: ssePlugin } = await import("./sse-2972pVwV.mjs").then((n) => n.n);
851
843
  const opts = config.arcPlugins.sse === true ? {} : config.arcPlugins.sse;
852
844
  await fastify.register(ssePlugin, opts);
853
845
  trackPlugin("arc-sse", opts);
@@ -856,26 +848,25 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
856
848
  if (config.arcPlugins?.realtime) {
857
849
  if (config.arcPlugins?.events === false) fastify.log.warn("Realtime plugin requires events plugin (arcPlugins.events). Realtime disabled.");
858
850
  else {
859
- const { default: realtimePlugin } = await import("./realtime-_59Rlje8.mjs").then((n) => n.n);
851
+ const { default: realtimePlugin } = await import("./realtime-Ber8uJN2.mjs").then((n) => n.n);
860
852
  const opts = config.arcPlugins.realtime === true ? {} : config.arcPlugins.realtime;
861
853
  await fastify.register(realtimePlugin, opts);
862
854
  trackPlugin("arc-realtime", opts);
863
855
  }
864
856
  }
865
857
  if (config.arcPlugins?.metrics) {
866
- const { default: metricsPlugin } = await import("./metrics-DYka72iN.mjs").then((n) => n.n);
858
+ const { default: metricsPlugin } = await import("./metrics-CZDQWVjS.mjs").then((n) => n.n);
867
859
  const opts = config.arcPlugins.metrics === true ? {} : config.arcPlugins.metrics;
868
860
  await fastify.register(metricsPlugin, opts);
869
861
  trackPlugin("arc-metrics", opts);
870
862
  }
871
863
  if (config.arcPlugins?.versioning) {
872
- const { default: versioningPlugin } = await import("./versioning-P6JMNcJr.mjs").then((n) => n.n);
864
+ const { default: versioningPlugin } = await import("./versioning-Dk2-19La.mjs").then((n) => n.n);
873
865
  await fastify.register(versioningPlugin, config.arcPlugins.versioning);
874
866
  trackPlugin("arc-versioning", config.arcPlugins.versioning);
875
867
  }
876
868
  }
877
- //#endregion
878
- //#region src/factory/registerAuth.ts
869
+ // src/factory/registerAuth.ts
879
870
  /**
880
871
  * Authentication registration for createApp.
881
872
  *
@@ -919,7 +910,8 @@ async function registerAuth(fastify, config, trackPlugin) {
919
910
  case "authenticator": {
920
911
  const { authenticate, optionalAuthenticate } = authConfig;
921
912
  fastify.decorate("authenticate", async (request, reply) => {
922
- await authenticate(request, reply);
913
+ const { result, answered } = await runObservingSend(reply, () => authenticate(request, reply));
914
+ return answered ? reply : result;
923
915
  });
924
916
  if (!fastify.hasDecorator("optionalAuthenticate")) {
925
917
  if (optionalAuthenticate) fastify.decorate("optionalAuthenticate", async (request, reply) => {
@@ -946,7 +938,7 @@ async function registerAuth(fastify, config, trackPlugin) {
946
938
  */
947
939
  async function registerElevation(fastify, config, trackPlugin) {
948
940
  if (!config.elevation) return;
949
- const { elevationPlugin } = await import("./elevation-B9wF2Z1F.mjs").then((n) => n.n);
941
+ const { elevationPlugin } = await import("./elevation-CzhqAyVN.mjs").then((n) => n.n);
950
942
  await fastify.register(elevationPlugin, config.elevation);
951
943
  trackPlugin("arc-elevation", config.elevation);
952
944
  fastify.log.debug("Elevation plugin enabled");
@@ -961,7 +953,7 @@ async function registerElevation(fastify, config, trackPlugin) {
961
953
  */
962
954
  async function registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers) {
963
955
  if (config.errorHandler === false) return;
964
- const { errorHandlerPlugin } = await import("./errorHandler-Dr2nG0Ui.mjs").then((n) => n.r);
956
+ const { errorHandlerPlugin } = await import("./errorHandler-dFyGOEoB.mjs").then((n) => n.r);
965
957
  /**
966
958
  * DISCLOSURE DEFAULTS MERGE — they used to be REPLACED, and that was two bugs.
967
959
  *
@@ -1000,7 +992,8 @@ async function registerErrorHandler(fastify, config, trackPlugin, moduleErrorMap
1000
992
  const productionEnv = config.preset !== void 0 ? config.preset === "production" : isProductionEnv(process.env.NODE_ENV);
1001
993
  const derived = {
1002
994
  includeStack: !productionEnv,
1003
- exposeInternalMessages: !productionEnv
995
+ exposeInternalMessages: !productionEnv,
996
+ notFound: true
1004
997
  };
1005
998
  let errorOpts = typeof config.errorHandler === "object" ? {
1006
999
  ...derived,
@@ -1044,8 +1037,7 @@ function createOptionalAuthenticate(authenticate) {
1044
1037
  } catch {}
1045
1038
  };
1046
1039
  }
1047
- //#endregion
1048
- //#region src/factory/registerResources.ts
1040
+ // src/factory/registerResources.ts
1049
1041
  /** Resource registration and the module/app lifecycle for createApp. */
1050
1042
  function isResourcesFactory(value) {
1051
1043
  return typeof value === "function";
@@ -1180,7 +1172,7 @@ async function registerResources(fastify, config, preResolvedModules, skippedBri
1180
1172
  let discoveryPath;
1181
1173
  let discoveryYieldedZero = false;
1182
1174
  if (resolvedResources === void 0 && config.resourceDir) {
1183
- const { loadResources } = await import("./loadResources-BtKj6P1P.mjs").then((n) => n.n);
1175
+ const { loadResources } = await import("./loadResources-Bx1sKPnF.mjs").then((n) => n.n);
1184
1176
  const { resolve, dirname } = await import("node:path");
1185
1177
  const { fileURLToPath } = await import("node:url");
1186
1178
  const rawDir = config.resourceDir;
@@ -1305,7 +1297,7 @@ Resources supplied by "${m.name}": ${provided}.`);
1305
1297
  if (fastify.hasDecorator("getScheduleStats")) throw new Error("[arc] modules declare scheduledJobs but schedulesPlugin was already registered manually. Configure their runner through arcPlugins.schedules so Arc can compose one schedule table.");
1306
1298
  const frozenJobs = Object.freeze(scheduledJobs.map((job) => Object.freeze({ ...job })));
1307
1299
  const scheduleOptions = typeof config.arcPlugins?.schedules === "object" ? config.arcPlugins.schedules : {};
1308
- const { default: schedulesPlugin } = await import("./schedules-CVS7c1nv.mjs").then((n) => n.n);
1300
+ const { default: schedulesPlugin } = await import("./schedules-eO_RzhCU.mjs").then((n) => n.n);
1309
1301
  await fastify.register(schedulesPlugin, {
1310
1302
  ...scheduleOptions,
1311
1303
  schedules: frozenJobs
@@ -1459,8 +1451,7 @@ function isTransactionalOutbox(exports) {
1459
1451
  const store = exports.store;
1460
1452
  return typeof store === "object" && store !== null && "transactionalSave" in store && store.transactionalSave === true;
1461
1453
  }
1462
- //#endregion
1463
- //#region src/factory/security/cors.ts
1454
+ // src/factory/security/cors.ts
1464
1455
  /**
1465
1456
  * Headers ARC ITSELF reads from cross-origin requests. Auto-merged into a
1466
1457
  * host-declared CORS `allowedHeaders` allow-list (2.22) so hosts never
@@ -1521,8 +1512,7 @@ function resolveCorsOptions(config) {
1521
1512
  warnings
1522
1513
  };
1523
1514
  }
1524
- //#endregion
1525
- //#region src/factory/security/rateLimit.ts
1515
+ // src/factory/security/rateLimit.ts
1526
1516
  /** "Unlimited" as a number — @fastify/rate-limit's `max` fn must return one. */
1527
1517
  const UNLIMITED_MAX = Number.MAX_SAFE_INTEGER;
1528
1518
  /**
@@ -1612,8 +1602,7 @@ function compilePathMatcher(patterns) {
1612
1602
  return false;
1613
1603
  };
1614
1604
  }
1615
- //#endregion
1616
- //#region src/factory/registerSecurity.ts
1605
+ // src/factory/registerSecurity.ts
1617
1606
  /**
1618
1607
  * Register security plugins (Helmet, CORS, Rate Limiting).
1619
1608
  * All enabled by default — set to `false` to opt out.
@@ -1717,8 +1706,7 @@ async function registerUtilityPlugins(fastify, config) {
1717
1706
  }
1718
1707
  }
1719
1708
  }
1720
- //#endregion
1721
- //#region src/factory/createApp.ts
1709
+ // src/factory/createApp.ts
1722
1710
  /**
1723
1711
  * ArcFactory - Production-ready Fastify application factory.
1724
1712
  *
@@ -2011,7 +1999,7 @@ async function buildApp(options, loggerScope, onInstance, onBootDisposer) {
2011
1999
  await registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers);
2012
2000
  await registerResources(fastify, config, resolvedModules, skippedBridges);
2013
2001
  if (config.replyHelpers) {
2014
- const { replyHelpersPlugin } = await import("./replyHelpers-Dr2pnXZg.mjs").then((n) => n.n);
2002
+ const { replyHelpersPlugin } = await import("./replyHelpers-DK9P_XSz.mjs").then((n) => n.n);
2015
2003
  await fastify.register(replyHelpersPlugin);
2016
2004
  }
2017
2005
  if (config.serializeBigInt) {
@@ -2061,5 +2049,4 @@ const ArcFactory = {
2061
2049
  });
2062
2050
  }
2063
2051
  };
2064
- //#endregion
2065
2052
  export { developmentPreset as a, productionPreset as c, getModuleResources as d, getModuleState as f, collectModuleWorkflows as g, asModulePorts as h, createApp_exports as i, testingPreset as l, subscribeModuleEventHandlers as m, DEFAULT_LOGGER_REDACT_PATHS as n, edgePreset as o, hasModule as p, createApp as r, getPreset as s, ArcFactory as t, workerPreset as u };
@@ -1,6 +1,5 @@
1
1
 
2
- import { _ as ToolDefinition, c as McpAuthResult, r as CreateMcpServerConfig } from "./types-D3Ixsh00.mjs";
3
- //#region src/integrations/mcp/createMcpServer.d.ts
2
+ import { _ as ToolDefinition, c as McpAuthResult, r as CreateMcpServerConfig } from "./types-BYEb_dLW.mjs";
4
3
  /**
5
4
  * Mutable auth ref — updated per-request by mcpPlugin.
6
5
  * Tool handlers read from this to get the current request's auth context.
@@ -44,5 +43,4 @@ interface McpServerInstance {
44
43
  /** v2 name. v1 called this `resource()` — same four arguments. */
45
44
  registerResource: (...args: unknown[]) => void;
46
45
  }
47
- //#endregion
48
46
  export { resolveToolCollisions as i, McpServerInstance as n, createMcpServer as r, AuthRef as t };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
2
- //#region src/core/aggregation/defineAggregation.ts
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ // src/core/aggregation/defineAggregation.ts
3
3
  /**
4
4
  * Declare a single resource aggregation. Exported configs flow into
5
5
  * `defineResource({ aggregations: { ... } })` either as named keys or
@@ -21,5 +21,4 @@
21
21
  function defineAggregation(config) {
22
22
  return config;
23
23
  }
24
- //#endregion
25
24
  export { defineAggregation as t };
@@ -1,13 +1,14 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
2
- import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-CtWkmWn3.mjs";
3
- import { t as arcLog } from "./logger-qQNLlOAU.mjs";
4
- import { a as autoInjectTenantFieldRules, c as BaseController, i as resolveOpenApiSchemas, t as buildResourcePlugin, v as detectOverriddenWriteSlots, y as isWriteVerbCapable } from "./plugin-ByU3h-bR.mjs";
5
- import { B as requireAuth } from "./permissions-DN1CWH56.mjs";
6
- import { n as getAvailablePresets, t as applyPresets } from "./presets-CCOlKTZw.mjs";
7
- import { t as pluralize } from "./pluralize-Cdya8zYt.mjs";
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-CHZMUwBW.mjs";
3
+ import { t as arcLog } from "./logger-CbFcIEBZ.mjs";
4
+ import { C as isWriteVerbCapable, S as detectOverriddenWriteSlots, f as BaseController, i as resolveOpenApiSchemas, l as autoInjectTenantFieldRules, t as buildResourcePlugin } from "./plugin-DTWt_8C3.mjs";
5
+ import { a as isZodSchema, i as isJsonSchema } from "./schemaConverter-DBJrPZN4.mjs";
6
+ import { B as requireAuth } from "./permissions-A1oKtpiC.mjs";
7
+ import { n as getAvailablePresets, t as applyPresets } from "./presets-qKCehiJM.mjs";
8
+ import { t as pluralize } from "./pluralize-msB9X3yw.mjs";
8
9
  import { isReadOnlyRepo } from "@classytic/repo-core/repository";
9
10
  import { readEnv } from "@classytic/primitives/environment";
10
- //#region src/core/defineResource/writeVerbs.ts
11
+ // src/core/defineResource/writeVerbs.ts
11
12
  /**
12
13
  * Phase 4b — write-verb registration policy.
13
14
  *
@@ -77,8 +78,7 @@ function warnOnWriteMethodOverride(controller, resolvedConfig) {
77
78
  if (overridden.length === 0) return;
78
79
  arcLog("defineResource").warn(`Resource "${resolvedConfig.name}" overrides controller method(s) [${overridden.join(", ")}] AND declares field protection (${protectedFields.length > 0 ? `fieldRules: ${protectedFields.join(", ")}` : "fields"}). An override replaces arc's entire write pipeline — body sanitization against those field rules, tenant injection, createdBy/updatedBy stamping and the before/around/after hooks all stop running for that op, so the declared protection is NOT enforced. If the override exists to reach a domain command, declare it as a write verb instead (\`writes: { ${overridden[0]}: (…) => engine.<verb>(…) } \`) — arc keeps the pipeline and calls your command in place of the repository. If the override genuinely needs to replace the pipeline, call \`this.bodySanitizer.sanitize(body, op, req, ctx)\` inside it.`);
79
80
  }
80
- //#endregion
81
- //#region src/core/defineResource/controller.ts
81
+ // src/core/defineResource/controller.ts
82
82
  /** CRUD routes refused over a read-only repository. */
83
83
  const READ_ONLY_REFUSED_ROUTES = [
84
84
  "create",
@@ -249,8 +249,7 @@ function assertTransactionCapability(repository, resourceName) {
249
249
  if (!capabilities || capabilities.transactions === true) return;
250
250
  throw new Error(`Resource "${resourceName}" declares \`transactional: true\` but its repository reports \`capabilities.transactions: ${String(capabilities.transactions)}\` — this deployment cannot run transactions (standalone MongoDB, D1, or a topology arc could not confirm). \`withTransaction\` exists but every call would fail at BEGIN. Point at a replica set / transactional backend, or remove the flag. Checked at REGISTRATION, so a connection opened in \`beforeBoot()\` is already live by now.`);
251
251
  }
252
- //#endregion
253
- //#region src/core/defineResource/hooks.ts
252
+ // src/core/defineResource/hooks.ts
254
253
  /**
255
254
  * Combined entry-point for Phase 6. Pushes preset-collected hooks
256
255
  * first, then inline `config.hooks` (so hosts can rely on
@@ -328,8 +327,7 @@ function buildHookContext(ctx) {
328
327
  meta: ctx.meta
329
328
  };
330
329
  }
331
- //#endregion
332
- //#region src/core/defineResource/idField.ts
330
+ // src/core/defineResource/idField.ts
333
331
  /**
334
332
  * Returns a fresh config with `idField` filled in (when applicable),
335
333
  * or the original reference when nothing changes. Never mutates the
@@ -344,8 +342,7 @@ function resolveIdField(config, repository) {
344
342
  };
345
343
  return config;
346
344
  }
347
- //#endregion
348
- //#region src/core/defineResource/normalizeConfig.ts
345
+ // src/core/defineResource/normalizeConfig.ts
349
346
  /**
350
347
  * Run all Phase-0 expansions in order and return the canonical config.
351
348
  *
@@ -503,8 +500,7 @@ function resolveCrudAllowList(config) {
503
500
  disableDefaultRoutes: legacyDisableAll ?? false
504
501
  };
505
502
  }
506
- //#endregion
507
- //#region src/core/defineResource/presets.ts
503
+ // src/core/defineResource/presets.ts
508
504
  /**
509
505
  * Phase 3 — apply presets + auto-inject tenant-field schema rules.
510
506
  *
@@ -627,8 +623,7 @@ function collectUngatedCrudDiagnostics(config, strict = false) {
627
623
  permissions: { ${ungated[0]}: requireAuth(), ... } // per-operation` + (severity === "warn" ? "\nRecommended in production: ARC_STRICT_PERMISSIONS=true (or `strictPermissions: true` on the resource) makes an ungated WRITE fail the boot instead of shipping. This is the arc v3 default." : "")
628
624
  }];
629
625
  }
630
- //#endregion
631
- //#region src/registry/resolveTenantPurge.ts
626
+ // src/registry/resolveTenantPurge.ts
632
627
  const DEFAULT_PRIORITY = 100;
633
628
  function resolveTenantPurge(input) {
634
629
  const { resourceName, tenantField, onTenantDelete } = input;
@@ -660,8 +655,7 @@ function resolveTenantPurge(input) {
660
655
  function assertTenantFieldUsable(resourceName, tenantField, strategyType) {
661
656
  if (tenantField === false) throw new Error(`[Arc/Cascade] Resource '${resourceName}' declares onTenantDelete (strategy: ${strategyType}) but \`tenantField: false\`. Company-wide resources can't be cascaded by org — set a real \`tenantField\` or remove the \`onTenantDelete\` declaration.`);
662
657
  }
663
- //#endregion
664
- //#region src/core/defineResource/ResourceDefinition.ts
658
+ // src/core/defineResource/ResourceDefinition.ts
665
659
  var ResourceDefinition = class {
666
660
  name;
667
661
  displayName;
@@ -947,8 +941,65 @@ function freezeActions(actions) {
947
941
  for (const [name, entry] of Object.entries(actions)) frozen[name] = typeof entry === "function" ? entry : Object.freeze({ ...entry });
948
942
  return Object.freeze(frozen);
949
943
  }
950
- //#endregion
951
- //#region src/core/validateResourceConfig.ts
944
+ // src/core/defineResource/schemaDiagnostics.ts
945
+ /**
946
+ * Define-time detection of a `{ body: X }` wrapper where arc expects the schema ITSELF.
947
+ *
948
+ * An action's `schema` (and every `body` / `querystring` / `params` slot) is the JSON Schema or Zod
949
+ * schema. `{ body: X }` there has no `type` / `properties`, so arc reads it as an empty schema and
950
+ * the endpoint accepts ANY input: no error, no log, no validation. Warn by default; `strictSchemas`
951
+ * (or `ARC_STRICT_SCHEMAS=true`) makes it a define-time error.
952
+ */
953
+ const SLOT_KEYS = [
954
+ "body",
955
+ "querystring",
956
+ "params",
957
+ "headers",
958
+ "response"
959
+ ];
960
+ const SCHEMA_SLOT_WRAPPER = "schema.slot_wrapper";
961
+ /** Slot names present on `value` when it is a slot-wrapper object, not a schema; else `[]`. */
962
+ function findSlotWrapper(value) {
963
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return [];
964
+ const proto = Object.getPrototypeOf(value);
965
+ if (proto !== Object.prototype && proto !== null) return [];
966
+ if (isZodSchema(value) || isJsonSchema(value)) return [];
967
+ return SLOT_KEYS.filter((key) => key in value);
968
+ }
969
+ function collectSchemaSlotDiagnostics(config, strict) {
970
+ const out = [];
971
+ const flag = (where, found, fix) => {
972
+ out.push({
973
+ severity: strict ? "error" : "warn",
974
+ code: SCHEMA_SLOT_WRAPPER,
975
+ message: `[Arc] Resource '${config.name}': ${where} is a \`{ ${found.join(", ")} }\` wrapper, not a schema. It has no \`type\` / \`properties\`, so arc treats it as an empty schema and the endpoint accepts ANY input. ${fix}`
976
+ });
977
+ };
978
+ for (const [name, entry] of Object.entries(config.actions ?? {})) {
979
+ const schema = entry?.schema;
980
+ const found = findSlotWrapper(schema);
981
+ if (found.length > 0) flag(`action '${name}' schema`, found, "An action's `schema` IS its body schema: pass the schema directly (`schema: X`, not `schema: { body: X }`).");
982
+ }
983
+ const slots = (where, schema) => {
984
+ if (schema === null || typeof schema !== "object") return;
985
+ for (const slot of [
986
+ "body",
987
+ "querystring",
988
+ "params",
989
+ "headers"
990
+ ]) {
991
+ const found = findSlotWrapper(schema[slot]);
992
+ if (found.length > 0) flag(`${where}.${slot}`, found, `Slots take the schema itself (\`${slot}: X\`), not a nested \`{ ${found[0]}: X }\`.`);
993
+ }
994
+ };
995
+ for (const route of config.routes ?? []) {
996
+ const r = route;
997
+ slots(`route ${String(r.method)} ${String(r.path)} schema`, r.schema);
998
+ }
999
+ for (const [op, schema] of Object.entries(config.customSchemas ?? {})) slots(`customSchemas.${op}`, schema);
1000
+ return out;
1001
+ }
1002
+ // src/core/validateResourceConfig.ts
952
1003
  /**
953
1004
  * Resource Configuration Validator
954
1005
  *
@@ -1285,8 +1336,7 @@ function assertValidConfig(config, options) {
1285
1336
  throw new Error(errorMsg);
1286
1337
  }
1287
1338
  }
1288
- //#endregion
1289
- //#region src/core/defineResource/validate.ts
1339
+ // src/core/defineResource/validate.ts
1290
1340
  /**
1291
1341
  * CRUD op names — kept module-scope (vs allocated per `defineResource()`
1292
1342
  * call) since the set is fixed and the cost of re-allocating is a
@@ -1501,8 +1551,7 @@ function validateActionsShape(config) {
1501
1551
  }
1502
1552
  }
1503
1553
  }
1504
- //#endregion
1505
- //#region src/core/defineResource.ts
1554
+ // src/core/defineResource.ts
1506
1555
  /**
1507
1556
  * Resource Definition — database-agnostic single source of truth.
1508
1557
  *
@@ -1547,6 +1596,7 @@ function defineResource(config) {
1547
1596
  const hasCrudRoutes = computeHasCrudRoutes(resolvedConfig);
1548
1597
  const strict = resolvedConfig.strictPermissions ?? readEnv(process.env).bool("ARC_STRICT_PERMISSIONS", true);
1549
1598
  diagnostics = diagnostics.concat(collectUngatedCrudDiagnostics(resolvedConfig, strict));
1599
+ diagnostics = diagnostics.concat(collectSchemaSlotDiagnostics(resolvedConfig, resolvedConfig.strictSchemas ?? readEnv(process.env).bool("ARC_STRICT_SCHEMAS", false)));
1550
1600
  const fatal = diagnostics.filter((d) => d.severity === "error");
1551
1601
  if (fatal.length > 0) throw new Error(fatal.map((d) => d.message).join("\n\n"));
1552
1602
  const narrowedConfig = resolvedConfig;
@@ -1576,5 +1626,4 @@ function defineResource(config) {
1576
1626
  if (diagnostics.length > 0) resource._diagnostics = diagnostics;
1577
1627
  return resource;
1578
1628
  }
1579
- //#endregion
1580
1629
  export { ResourceDefinition as a, validateResourceConfig as i, assertValidConfig as n, formatValidationErrors as r, defineResource as t };
@@ -1,6 +1,5 @@
1
1
 
2
2
  import { FastifyPluginAsync } from "fastify";
3
- //#region src/discovery/index.d.ts
4
3
  /** A discovered resource — must have toPlugin() method */
5
4
  export interface DiscoverableResource {
6
5
  toPlugin(): FastifyPluginAsync;
@@ -41,5 +40,4 @@ export declare function discoverResources(options: DiscoveryOptions): Promise<Ar
41
40
  filePath: string;
42
41
  }>>;
43
42
  /** Auto-discovery plugin for Arc resources */
44
- export declare const discoveryPlugin: FastifyPluginAsync<DiscoveryPluginOptions>;
45
- //#endregion
43
+ export declare const discoveryPlugin: FastifyPluginAsync<DiscoveryPluginOptions>;
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
2
  import { readdir } from "node:fs/promises";
3
3
  import { extname, join, resolve } from "node:path";
4
4
  import { pathToFileURL } from "node:url";
5
- //#region src/discovery/index.ts
5
+ // src/discovery/index.ts
6
6
  /**
7
7
  * Arc Auto-Discovery Plugin
8
8
  *
@@ -138,5 +138,4 @@ const discoveryPluginImpl = async (fastify, options) => {
138
138
  };
139
139
  /** Auto-discovery plugin for Arc resources */
140
140
  const discoveryPlugin = discoveryPluginImpl;
141
- //#endregion
142
141
  export { discoverResources, discoveryPlugin };
@@ -1,8 +1,7 @@
1
1
 
2
- import { o as RegistryEntry } from "../index-WH7xgvxS.mjs";
3
- import { t as ExternalOpenApiPaths } from "../externalPaths-CmGOxOtD.mjs";
2
+ import { o as RegistryEntry } from "../index-DyJFTJLA.mjs";
3
+ import { t as ExternalOpenApiPaths } from "../externalPaths-BOqdq5wr.mjs";
4
4
  import { FastifyPluginAsync } from "fastify";
5
- //#region src/docs/openapi/types.d.ts
6
5
  /**
7
6
  * OpenAPI 3.0 type primitives used by arc's spec emitter.
8
7
  *
@@ -86,6 +85,12 @@ interface Operation {
86
85
  type: string;
87
86
  name: string;
88
87
  }>;
88
+ /** Filter fields, operators and sort fields the list route accepts (declared by the query parser). */
89
+ "x-arc-query"?: {
90
+ filterFields?: readonly string[];
91
+ operators?: readonly string[];
92
+ sortFields?: readonly string[];
93
+ };
89
94
  /** Idempotency-key fence: every call (`required`) or the listed actions (`requiredActions`). */
90
95
  "x-arc-idempotency"?: {
91
96
  required?: true;
@@ -143,16 +148,12 @@ interface SecurityScheme {
143
148
  in?: string;
144
149
  name?: string;
145
150
  }
146
- //#endregion
147
- //#region src/docs/openapi/index.d.ts
148
151
  /**
149
152
  * Build OpenAPI spec from registry resources.
150
153
  * Shared by HTTP docs endpoint and CLI export command.
151
154
  */
152
155
  export declare function buildOpenApiSpec(resources: RegistryEntry[], options?: OpenApiBuildOptions, externalPaths?: ExternalOpenApiPaths[]): OpenApiSpec;
153
156
  declare const _default: FastifyPluginAsync<OpenApiOptions>;
154
- //#endregion
155
- //#region src/docs/scalar.d.ts
156
157
  interface ScalarOptions {
157
158
  /** Route prefix for UI (default: '/docs') */
158
159
  routePrefix?: string;
@@ -174,5 +175,4 @@ interface ScalarOptions {
174
175
  favicon?: string;
175
176
  }
176
177
  declare const _default$1: FastifyPluginAsync<ScalarOptions>;
177
- //#endregion
178
178
  export { type ExternalOpenApiPaths, type OpenApiBuildOptions, type OpenApiOptions, type OpenApiSpec, type ScalarOptions, _default as openApiPlugin, _default$1 as scalarPlugin };
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.45.1 | MIT | https://classytic.com */
2
- import { n as getUserRoles } from "../userHelpers-oBTU3a_k.mjs";
3
- import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-BrFPc3Ny.mjs";
1
+ /*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
2
+ import { n as getUserRoles } from "../userHelpers-oX5_mOVs.mjs";
3
+ import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-Co7hl073.mjs";
4
4
  import fp from "fastify-plugin";
5
- //#region src/docs/scalar.ts
5
+ // src/docs/scalar.ts
6
6
  const scalarPlugin = async (fastify, opts = {}) => {
7
7
  const { routePrefix = "/docs", specUrl = "/_docs/openapi.json", title = "API Documentation", theme = "default", showSidebar = true, darkMode = false, authRoles = [], customCss = "", favicon } = opts;
8
8
  const scalarConfig = JSON.stringify({
@@ -53,5 +53,4 @@ var scalar_default = fp(scalarPlugin, {
53
53
  name: "arc-scalar",
54
54
  fastify: "5.x"
55
55
  });
56
- //#endregion
57
56
  export { buildOpenApiSpec, openapi_default as openApiPlugin, scalar_default as scalarPlugin };