@classytic/arc 2.28.0 → 2.31.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 (239) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +7 -0
  3. package/TRADEMARK.md +22 -0
  4. package/dist/{BaseController-B65zbz9m.mjs → BaseController-De7GqHck.mjs} +25 -24
  5. package/dist/{EventTransport-QmY7A258.d.mts → EventTransport-2uVV34WU.d.mts} +1 -0
  6. package/dist/EventTransport-9mlTgqzE.mjs +104 -0
  7. package/dist/{HookSystem-C1vB_Gc9.mjs → HookSystem-BcmPyq5I.mjs} +16 -35
  8. package/dist/{QueryCache-DOMT_iq7.d.mts → QueryCache-DFA-QrU9.d.mts} +2 -1
  9. package/dist/{ResourceRegistry-y9Hnypus.mjs → ResourceRegistry-qq0mn2s9.mjs} +3 -2
  10. package/dist/{actionPermissions-CAphcmUG.mjs → actionPermissions-BE5NwaQk.mjs} +1 -0
  11. package/dist/audit/index.d.mts +3 -2
  12. package/dist/audit/index.mjs +3 -2
  13. package/dist/auth/audit.d.mts +1 -0
  14. package/dist/auth/audit.mjs +1 -0
  15. package/dist/auth/index.d.mts +5 -4
  16. package/dist/auth/index.mjs +6 -5
  17. package/dist/auth/redis-session.d.mts +2 -1
  18. package/dist/auth/redis-session.mjs +1 -0
  19. package/dist/authorizationDecision-ChvUQGG1.mjs +266 -0
  20. package/dist/{buildHandler-Dtwd8fdz.mjs → buildHandler-CDrCJzmB.mjs} +34 -7
  21. package/dist/cache/index.d.mts +4 -3
  22. package/dist/cache/index.mjs +4 -3
  23. package/dist/{caching-_NJeDd1_.mjs → caching-BFHA6Scf.mjs} +2 -1
  24. package/dist/cleanup/index.d.mts +4 -3
  25. package/dist/cleanup/index.mjs +9 -13
  26. package/dist/cli/commands/describe.d.mts +2 -1
  27. package/dist/cli/commands/describe.mjs +3 -2
  28. package/dist/cli/commands/docs.d.mts +1 -0
  29. package/dist/cli/commands/docs.mjs +3 -2
  30. package/dist/cli/commands/doctor.d.mts +1 -0
  31. package/dist/cli/commands/doctor.mjs +1 -0
  32. package/dist/cli/commands/generate.d.mts +2 -1
  33. package/dist/cli/commands/generate.mjs +2 -1
  34. package/dist/cli/commands/init.d.mts +2 -1
  35. package/dist/cli/commands/init.mjs +2 -1
  36. package/dist/cli/commands/introspect.d.mts +1 -0
  37. package/dist/cli/commands/introspect.mjs +2 -1
  38. package/dist/cli/index.d.mts +3 -2
  39. package/dist/cli/index.mjs +3 -2
  40. package/dist/{constants-DNre0wRg.mjs → constants-D3Dv4LAV.mjs} +1 -0
  41. package/dist/context/index.d.mts +1 -0
  42. package/dist/context/index.mjs +3 -2
  43. package/dist/core/index.d.mts +3 -2
  44. package/dist/core/index.mjs +7 -5
  45. package/dist/{core-BGa8TXJR.mjs → core-BGpIxINN.mjs} +4 -49
  46. package/dist/{createActionRouter-C-N7z2EL.mjs → createActionRouter-CDXEdasl.mjs} +8 -7
  47. package/dist/{createAggregationRouter-wzwFa_dW.mjs → createAggregationRouter-KrQDzx-k.mjs} +10 -22
  48. package/dist/{createApp-Du5G54TM.mjs → createApp-Df89BEni.mjs} +505 -209
  49. package/dist/defineAggregation-DbPPS8RI.mjs +48 -0
  50. package/dist/{defineResource-2zvVVpxg.mjs → defineResource-Bv6EtN1x.mjs} +90 -72
  51. package/dist/discovery/index.d.mts +1 -0
  52. package/dist/discovery/index.mjs +1 -0
  53. package/dist/docs/index.d.mts +3 -2
  54. package/dist/docs/index.mjs +3 -2
  55. package/dist/{elevation-C9s5hFP_.d.mts → elevation-BXCfVcNG.d.mts} +1 -0
  56. package/dist/{elevation-CIz1GjGm.mjs → elevation-D2l1mh4g.mjs} +4 -3
  57. package/dist/encryption/index.d.mts +2 -1
  58. package/dist/encryption/index.mjs +3 -2
  59. package/dist/{errorHandler-Bq2OeEQL.mjs → errorHandler-C5NeD6bT.mjs} +3 -2
  60. package/dist/{errorHandler-C6yv4ZTW.d.mts → errorHandler-CpYUJmPA.d.mts} +1 -0
  61. package/dist/{errors-DHcHVAgk.d.mts → errors-BGdVwP25.d.mts} +1 -0
  62. package/dist/{errors-DkO8Nk6-.mjs → errors-Cj42AntO.mjs} +1 -0
  63. package/dist/{eventPlugin-DrQ_FesK.mjs → eventPlugin-CkffEihm.mjs} +6 -106
  64. package/dist/{eventPlugin-Bg3cP2_u.d.mts → eventPlugin-GF5nnBIq.d.mts} +2 -1
  65. package/dist/events/index.d.mts +4 -3
  66. package/dist/events/index.mjs +17 -340
  67. package/dist/events/transports/redis-stream-entry.d.mts +2 -1
  68. package/dist/events/transports/redis-stream-entry.mjs +1 -0
  69. package/dist/events/transports/redis.d.mts +2 -1
  70. package/dist/events/transports/redis.mjs +1 -0
  71. package/dist/{externalPaths-BE6wFpYv.d.mts → externalPaths-CmGOxOtD.d.mts} +1 -0
  72. package/dist/factory/index.d.mts +9 -5
  73. package/dist/factory/index.mjs +7 -6
  74. package/dist/{fastify-augmentation-OzYGIiU1.d.mts → fastify-augmentation-zh0_AYHa.d.mts} +13 -4
  75. package/dist/{applyPermissionResult-BnyVE9eD.mjs → fields-CB5Cuzk9.mjs} +2 -107
  76. package/dist/{fields-D3lhgzhD.d.mts → fields-I_EeRWND.d.mts} +1 -0
  77. package/dist/{generate-BnsL9GBm.d.mts → generate-DCGuEbqI.d.mts} +1 -0
  78. package/dist/{generate-D0wZupBg.mjs → generate-EcA6ui4i.mjs} +2 -1
  79. package/dist/{headers-BvlQSDMB.mjs → headers-3zvE0rM3.mjs} +2 -1
  80. package/dist/{health-CB_m4S32.mjs → health-DjZYjM7H.mjs} +1 -0
  81. package/dist/hooks/index.d.mts +2 -1
  82. package/dist/hooks/index.mjs +2 -1
  83. package/dist/idempotency/index.d.mts +3 -2
  84. package/dist/idempotency/index.mjs +5 -4
  85. package/dist/idempotency/redis.d.mts +2 -1
  86. package/dist/idempotency/redis.mjs +1 -0
  87. package/dist/{index-CjVg-Epg.d.mts → index-Bc2ox8_U.d.mts} +6 -5
  88. package/dist/{index-CG4yqMDB.d.mts → index-C-481Zf2.d.mts} +74 -18
  89. package/dist/{index-BMnbzvtO.d.mts → index-CEJNZFtX.d.mts} +242 -24
  90. package/dist/index-CFThn1K9.d.mts +224 -0
  91. package/dist/{index-DPRH0Cme.d.mts → index-CpzxqePp.d.mts} +203 -97
  92. package/dist/index.d.mts +9 -8
  93. package/dist/index.mjs +11 -9
  94. package/dist/{init-tlRSt667.mjs → init-BEiNZBsJ.mjs} +19 -23
  95. package/dist/{init-BPEu8cs-.d.mts → init-Cscs4lab.d.mts} +1 -0
  96. package/dist/integrations/event-gateway.d.mts +3 -2
  97. package/dist/integrations/event-gateway.mjs +2 -1
  98. package/dist/integrations/index.d.mts +4 -3
  99. package/dist/integrations/index.mjs +1 -0
  100. package/dist/integrations/jobs/index.d.mts +2 -1
  101. package/dist/integrations/jobs/index.mjs +108 -32
  102. package/dist/integrations/mcp/index.d.mts +9 -9
  103. package/dist/integrations/mcp/index.mjs +2 -1
  104. package/dist/integrations/mcp/testing.d.mts +3 -2
  105. package/dist/integrations/mcp/testing.mjs +2 -2
  106. package/dist/integrations/streamline.d.mts +1 -0
  107. package/dist/integrations/streamline.mjs +3 -2
  108. package/dist/integrations/webhooks.d.mts +1 -0
  109. package/dist/integrations/webhooks.mjs +1 -0
  110. package/dist/integrations/websocket-pushref-redis.d.mts +2 -1
  111. package/dist/integrations/websocket-pushref-redis.mjs +1 -0
  112. package/dist/integrations/websocket-redis.d.mts +2 -1
  113. package/dist/integrations/websocket-redis.mjs +1 -0
  114. package/dist/integrations/websocket.d.mts +3 -2
  115. package/dist/integrations/websocket.mjs +1 -0
  116. package/dist/{interface-BGZCzOGL.d.mts → interface-BOk3YnTz.d.mts} +1 -0
  117. package/dist/{interface-Uk8ONJv7.d.mts → interface-DEWNOMza.d.mts} +1 -0
  118. package/dist/{interface-n5hpKg1d.mjs → interface-DYzM0q-u.mjs} +1 -0
  119. package/dist/{jsonBody-BlzAoGCe.mjs → jsonBody-BYbLDi5D.mjs} +2 -1
  120. package/dist/{keys-Cd316u_y.mjs → keys-C0_pa1tY.mjs} +1 -0
  121. package/dist/{loadResources-DpU8pfjV.mjs → loadResources-yawi9tAE.mjs} +2 -1
  122. package/dist/{loadResourcesFromEntry-kvGT6EcO.mjs → loadResourcesFromEntry-BAjYZonx.mjs} +2 -1
  123. package/dist/logger/index.d.mts +1 -0
  124. package/dist/logger/index.mjs +1 -0
  125. package/dist/{mcpPlugin-Cs6nRGCt.mjs → mcpPlugin-B_es0hiF.mjs} +52 -60
  126. package/dist/{memory-CmnzXE5Z.mjs → memory-DR6wpa9F.mjs} +2 -1
  127. package/dist/{metrics-fdxI5mn_.mjs → metrics-CUdw_wLB.mjs} +2 -1
  128. package/dist/middleware/index.d.mts +2 -1
  129. package/dist/middleware/index.mjs +3 -2
  130. package/dist/migrations/index.d.mts +1 -3
  131. package/dist/migrations/index.mjs +2 -4
  132. package/dist/module-0pFJA6YW.mjs +78 -0
  133. package/dist/{multipartBody-D0eBvkeq.mjs → multipartBody-wOgj_fnj.mjs} +1 -0
  134. package/dist/{openapi-BLV4OMXb.mjs → openapi-B2L4js1v.mjs} +6 -5
  135. package/dist/permissions/index.d.mts +5 -4
  136. package/dist/permissions/index.mjs +6 -4
  137. package/dist/{permissions-BrtiBKGs.mjs → permissions-L--QDAir.mjs} +518 -316
  138. package/dist/{pipe-BOLmGIxa.mjs → pipe-DRDNsI2T.mjs} +2 -1
  139. package/dist/pipeline/index.d.mts +2 -1
  140. package/dist/pipeline/index.mjs +2 -1
  141. package/dist/{pipeline-BGRnV-To.mjs → pipeline-UPQFatit.mjs} +7 -20
  142. package/dist/plugins/index.d.mts +8 -7
  143. package/dist/plugins/index.mjs +16 -15
  144. package/dist/plugins/response-cache.d.mts +1 -0
  145. package/dist/plugins/response-cache.mjs +2 -1
  146. package/dist/plugins/tracing-entry.d.mts +2 -1
  147. package/dist/plugins/tracing-entry.mjs +2 -1
  148. package/dist/{pluralize-BhrgwZb9.mjs → pluralize-O0FZgESl.mjs} +1 -0
  149. package/dist/{preloadResources-CM4uUaFv.d.mts → preloadResources-CyoJMSiO.d.mts} +117 -12
  150. package/dist/{preloadResources-DSY5HGpS.mjs → preloadResources-Dz6BjzM6.mjs} +1 -0
  151. package/dist/presets/filesUpload.d.mts +6 -5
  152. package/dist/presets/filesUpload.mjs +9 -11
  153. package/dist/presets/index.d.mts +15 -2
  154. package/dist/presets/index.mjs +2 -1
  155. package/dist/presets/multiTenant.d.mts +2 -1
  156. package/dist/presets/multiTenant.mjs +3 -2
  157. package/dist/presets/search.d.mts +3 -2
  158. package/dist/presets/search.mjs +2 -1
  159. package/dist/{presets-DwFDVKP0.mjs → presets-C4-g4_4P.mjs} +27 -10
  160. package/dist/projection-BHw6xlOQ.mjs +18 -0
  161. package/dist/{pushref-registry-BbcnpNTm.d.mts → pushref-registry-Dov9l4qE.d.mts} +1 -0
  162. package/dist/{queryCachePlugin-DSGuSVLW.mjs → queryCachePlugin-BZr8v46E.mjs} +5 -4
  163. package/dist/{queryCachePlugin-br4otiqF.d.mts → queryCachePlugin-BzqxconG.d.mts} +3 -2
  164. package/dist/{rateLimit-DrED-C4v.mjs → rateLimit-CMPY5Qms.mjs} +7 -3
  165. package/dist/{rateLimitKey-BoWRH3e7.mjs → rateLimitKey-Dn5JNmkj.mjs} +1 -0
  166. package/dist/{realtime-DEuDu9io.mjs → realtime-C5NoxWFY.mjs} +20 -8
  167. package/dist/{redis-UDtLaNj6.d.mts → redis-CduhKsJi.d.mts} +2 -1
  168. package/dist/{redis-stream-uIaauNpZ.d.mts → redis-stream-qN6A-RFv.d.mts} +2 -1
  169. package/dist/{registerRoute-DTp18Ah_.mjs → registerRoute-CBN84fc7.mjs} +5 -2
  170. package/dist/registry/index.d.mts +3 -2
  171. package/dist/registry/index.mjs +3 -2
  172. package/dist/{registry-9km_w1aP.mjs → registry-4213U4zb.mjs} +3 -2
  173. package/dist/{renewingLease-3cuQH7h8.mjs → renewingLease-Dll8mGgc.mjs} +1 -0
  174. package/dist/{replyHelpers-67tRawQZ.mjs → replyHelpers-DIiZKGUt.mjs} +2 -1
  175. package/dist/repositoryFilter-f9eAfq_l.mjs +45 -0
  176. package/dist/{requestContext-MrlJwECf.mjs → requestContext-2TxXOJ7T.mjs} +1 -0
  177. package/dist/{rolldown-runtime-8H4AJuhK.mjs → rolldown-runtime-CUsjNX9R.mjs} +1 -0
  178. package/dist/{schedules-CjOd2MG9.mjs → schedules-DdtlICTf.mjs} +3 -2
  179. package/dist/{schemaConverter-DJvodiHj.mjs → schemaConverter-D--wdJM-.mjs} +70 -17
  180. package/dist/{schemaIR-Ca7ySNPx.mjs → schemaIR-Bm2enbnh.mjs} +2 -1
  181. package/dist/schemas/index.d.mts +1 -0
  182. package/dist/schemas/index.mjs +1 -0
  183. package/dist/scim/index.d.mts +1 -0
  184. package/dist/scim/index.mjs +2 -1
  185. package/dist/scope/index.d.mts +3 -2
  186. package/dist/scope/index.mjs +5 -4
  187. package/dist/{scope-DfaPntpo.mjs → scope-DHx5Fous.mjs} +4 -3
  188. package/dist/{sessionManager-BHOM3N_0.d.mts → sessionManager-qimlKV0P.d.mts} +1 -0
  189. package/dist/{simpleEqualityMatcher-Cg05HPsn.mjs → simpleEqualityMatcher-DjQJ7FKA.mjs} +1 -0
  190. package/dist/{sse-BQ1w0dfl.mjs → sse-CUTo9y0X.mjs} +5 -4
  191. package/dist/{sseStream-BQ7Qaynp.mjs → sseStream-B_5XcVVd.mjs} +2 -1
  192. package/dist/{storage-DLUZ04kK.d.mts → storage-Cx9Sz3Ou.d.mts} +1 -0
  193. package/dist/{store-helpers-DY6xq4sM.mjs → store-helpers-D1MP_gRG.mjs} +1 -0
  194. package/dist/{streaming-BQcW6_Kq.mjs → streaming-PSZwi8JV.mjs} +1 -0
  195. package/dist/subscribe-helpers-C0Tb2aUp.mjs +340 -0
  196. package/dist/sync/changelog.d.mts +1 -0
  197. package/dist/sync/changelog.mjs +1 -0
  198. package/dist/testing/cleanupStoreContract.d.mts +2 -1
  199. package/dist/testing/cleanupStoreContract.mjs +1 -0
  200. package/dist/testing/index.d.mts +167 -12
  201. package/dist/testing/index.mjs +522 -205
  202. package/dist/testing/outboxStoreContract.d.mts +1 -0
  203. package/dist/testing/outboxStoreContract.mjs +1 -0
  204. package/dist/testing/storageContract.d.mts +2 -1
  205. package/dist/testing/storageContract.mjs +1 -0
  206. package/dist/{tracing-CsGKQJGg.d.mts → tracing-Dro5eH6j.d.mts} +1 -0
  207. package/dist/{transactionContext-PNdoyLLm.mjs → transactionContext-dAfBVUrk.mjs} +1 -0
  208. package/dist/{typeGuards-C9KXUly6.mjs → typeGuards-B0ryPo3I.mjs} +1 -0
  209. package/dist/types/index.d.mts +6 -5
  210. package/dist/types/index.mjs +1 -0
  211. package/dist/types/storage.d.mts +2 -1
  212. package/dist/types/storage.mjs +1 -0
  213. package/dist/{types-Dmw-6Qeo.d.mts → types-B7XeLEgK.d.mts} +127 -90
  214. package/dist/{types-Cc91nXuA.d.mts → types-ByHn9rEO.d.mts} +1 -0
  215. package/dist/{types-C_ZZRcD6.d.mts → types-C4QE8qnm.d.mts} +1 -0
  216. package/dist/{types-Cu6vVJmh.d.mts → types-CBgvkp8O.d.mts} +82 -12
  217. package/dist/{types-DjC-KUCz.d.mts → types-ChuShpCP.d.mts} +1 -0
  218. package/dist/{types-QFGc3Cjv.d.mts → types-CwcUQ610.d.mts} +2 -6
  219. package/dist/{types-CSyCxl2V.mjs → types-Cys0ko9Z.mjs} +4 -3
  220. package/dist/usage/index.d.mts +3 -2
  221. package/dist/usage/index.mjs +0 -0
  222. package/dist/{userHelpers-Cg_y3fBz.mjs → userHelpers-ChYJ6CdK.mjs} +1 -0
  223. package/dist/utils/index.d.mts +16 -10
  224. package/dist/utils/index.mjs +10 -9
  225. package/dist/{utils-taUVD4p3.mjs → utils-vL8BrDE2.mjs} +3 -2
  226. package/dist/{validate-Bk44F2yT.mjs → validate-_KbifpHF.mjs} +2 -1
  227. package/dist/{versioning-gKWyryT3.mjs → versioning-CHDTor3P.mjs} +3 -2
  228. package/dist/{versioning-DXgY5BUm.d.mts → versioning-D_rhHfZm.d.mts} +5 -2
  229. package/dist/{websocket-_Pd0CgR0.d.mts → websocket-BOXVggMf.d.mts} +2 -1
  230. package/package.json +15 -7
  231. package/skills/arc/SKILL.md +22 -8
  232. package/skills/arc/references/api-reference.md +4 -0
  233. package/skills/arc/references/auth.md +3 -0
  234. package/skills/arc/references/integrations.md +33 -0
  235. package/skills/arc/references/mcp.md +6 -7
  236. package/skills/arc/references/production.md +24 -25
  237. package/skills/arc-code-review/references/anti-patterns.md +3 -3
  238. package/dist/index-CZY4EGga.d.mts +0 -107
  239. package/dist/module-_-M7C5ES.mjs +0 -29
package/dist/index.d.mts CHANGED
@@ -1,11 +1,12 @@
1
- import { $t as SlugExt, A as RequestIdOptions, An as ControllerConfigurableOptions, B as defineResource, Bt as RouteHandler, C as RequestContext, D as HealthCheck, Dn as ArcListResult, E as GracefulShutdownOptions, En as ArcGetResult, F as FastifyWithDecorators, Ft as ControllerLike, H as CrudController, Jt as BaseController, L as RequestWithExtras, Lt as IController, Mn as ListResult, N as FastifyRequestExtras, Nt as RateLimitConfig, O as HealthOptions, On as ArcUpdateResult, P as FastifyWithAuth, Q as MiddlewareConfig, Qt as TreeMixin, Rt as IControllerResponse, S as QueryParserInterface, T as CrudRouterOptions, Tn as ArcDeleteResult, U as ResourceConfig, Ut as AuthPluginOptions, V as ResourceDefinition, X as CrudRouteKey, Xt as SoftDeleteMixin, Y as PresetResult, Yt as SoftDeleteExt, Z as CrudSchemas, Zt as TreeExt, a as InferAdapterDoc, c as TypedController, ct as AggMeasureShorthand, d as PaginationResult, dt as AggregationDateRangeRequirement, en as SlugMixin, et as RouteSchemaOptions, f as IntrospectionData, ft as AggregationIndexHint, g as ArcInternalMetadata, gt as AggregationsMap, h as ResourceMetadata, ht as AggregationRateLimit, i as ValidationResult, jn as ControllerConstructionOptions, k as IntrospectionPluginOptions, kn as BaseControllerOptions, l as TypedRepository, lt as AggregationCacheConfig, m as RegistryStats, mt as AggregationMaterializedResult, n as ConfigError, nn as BulkMixin, nt as FieldRule, o as InferDocType, ot as EventDefinition, p as RegistryEntry, pt as AggregationMaterializedContext, q as PresetFunction, r as ValidateOptions, rn as BaseCrudController, s as InferResourceDoc, st as AggMeasureInput, t as RouteHandlerMethod, tn as BulkExt, u as TypedResourceConfig, ut as AggregationConfig, w as ServiceContext, wn as ArcCreateResult, y as OwnershipCheck, zt as IRequestContext } from "./index-DPRH0Cme.mjs";
2
- import { c as AnyRecord, i as UserBase, l as ArcRequest, n as PermissionContext, p as UserOrganization, r as PermissionResult, t as PermissionCheck, u as JWTPayload } from "./types-Dmw-6Qeo.mjs";
3
- import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, n as FieldPermissionMap, o as fields, t as FieldPermission } from "./fields-D3lhgzhD.mjs";
4
- import "./fastify-augmentation-OzYGIiU1.mjs";
5
- import { A as DEFAULT_ID_FIELD, B as MAX_FILTER_DEPTH, D as defineAggregation, F as DEFAULT_UPDATE_METHOD, G as RESERVED_QUERY_PARAMS, H as MAX_SEARCH_LENGTH, I as HOOK_OPERATIONS, K as SYSTEM_FIELDS, L as HOOK_PHASES, M as DEFAULT_MAX_LIMIT, N as DEFAULT_SORT, O as CRUD_OPERATIONS, P as DEFAULT_TENANT_FIELD, R as HookOperation, S as mergeResourceConfig, U as MUTATION_OPERATIONS, V as MAX_REGEX_LENGTH, W as MutationOperation, b as ResourceSeams, j as DEFAULT_LIMIT, k as CrudOperation, p as getControllerScope, v as defineResourceVariants, w as defineAction, x as SeamedResourceConfig, y as AdapterLike, z as HookPhase } from "./index-CjVg-Epg.mjs";
6
- import { A as allOf, E as DynamicPermissionMatrixConfig, F as requireAuth, I as requireOwnership, L as requireRoles, M as anyOf, N as denyAll, O as createDynamicPermissionMatrix, T as DynamicPermissionMatrix, c as publicReadAdminWrite, d as requireOrgMembership, f as requireOrgRole, h as requireTeamMembership, i as ownerWithAdminBypass, j as allowPublic, k as createOrgPermissions, l as readOnly, m as requireServiceScope, n as authenticated, o as presets_d_exports, p as requireScopeContext, r as fullPublic, s as publicRead, t as adminOnly, u as requireOrgInScope, z as when } from "./index-BMnbzvtO.mjs";
7
- import { a as NotFoundError, d as ValidationError, f as createDomainError, i as ForbiddenError, t as ArcError, u as UnauthorizedError } from "./errors-DHcHVAgk.mjs";
1
+
2
+ import { $t as TreeMixin, A as RequestIdOptions, An as BaseControllerOptions, B as defineResource, Bt as RawRouteHandler, C as RequestContext, D as HealthCheck, Dn as ArcGetResult, E as GracefulShutdownOptions, En as ArcDeleteResult, F as FastifyWithDecorators, Ft as ControllerLike, H as CrudController, L as RequestWithExtras, Lt as IController, Mn as ControllerConstructionOptions, N as FastifyRequestExtras, Nn as ListResult, Nt as RateLimitConfig, O as HealthOptions, On as ArcListResult, P as FastifyWithAuth, Q as MiddlewareConfig, Qt as TreeExt, Rt as IControllerResponse, S as QueryParserInterface, T as CrudRouterOptions, Tn as ArcCreateResult, U as ResourceConfig, V as ResourceDefinition, Vt as RouteHandler, Wt as AuthPluginOptions, X as CrudRouteKey, Xt as SoftDeleteExt, Y as PresetResult, Yt as BaseController, Z as CrudSchemas, Zt as SoftDeleteMixin, a as InferAdapterDoc, c as TypedController, ct as AggMeasureShorthand, d as PaginationResult, dt as AggregationDateRangeRequirement, en as SlugExt, et as RouteSchemaOptions, f as IntrospectionData, ft as AggregationIndexHint, g as ArcInternalMetadata, gt as AggregationsMap, h as ResourceMetadata, ht as AggregationRateLimit, i as ValidationResult, in as BaseCrudController, jn as ControllerConfigurableOptions, k as IntrospectionPluginOptions, kn as ArcUpdateResult, l as TypedRepository, lt as AggregationCacheConfig, m as RegistryStats, mt as AggregationMaterializedResult, n as ConfigError, nn as BulkExt, nt as FieldRule, o as InferDocType, ot as EventDefinition, p as RegistryEntry, pt as AggregationMaterializedContext, q as PresetFunction, r as ValidateOptions, rn as BulkMixin, s as InferResourceDoc, st as AggMeasureInput, t as RouteHandlerMethod, tn as SlugMixin, u as TypedResourceConfig, ut as AggregationConfig, w as ServiceContext, y as OwnershipCheck, zt as IRequestContext } from "./index-CpzxqePp.mjs";
3
+ import { a as UserBase, d as JWTPayload, i as PermissionContext, l as AnyRecord, m as UserOrganization, n as DataPolicy, r as PermissionCheck, t as AuthorizationDecision, u as ArcRequest } from "./types-B7XeLEgK.mjs";
4
+ import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, n as FieldPermissionMap, o as fields, t as FieldPermission } from "./fields-I_EeRWND.mjs";
5
+ import "./fastify-augmentation-zh0_AYHa.mjs";
6
+ import { A as DEFAULT_ID_FIELD, B as MAX_FILTER_DEPTH, D as defineAggregation, F as DEFAULT_UPDATE_METHOD, G as RESERVED_QUERY_PARAMS, H as MAX_SEARCH_LENGTH, I as HOOK_OPERATIONS, K as SYSTEM_FIELDS, L as HOOK_PHASES, M as DEFAULT_MAX_LIMIT, N as DEFAULT_SORT, O as CRUD_OPERATIONS, P as DEFAULT_TENANT_FIELD, R as HookOperation, S as mergeResourceConfig, U as MUTATION_OPERATIONS, V as MAX_REGEX_LENGTH, W as MutationOperation, b as ResourceSeams, j as DEFAULT_LIMIT, k as CrudOperation, p as getControllerScope, v as defineResourceVariants, w as defineAction, x as SeamedResourceConfig, y as AdapterLike, z as HookPhase } from "./index-Bc2ox8_U.mjs";
7
+ import { B as anyOf, F as createDynamicPermissionMatrix, G as requireOwnership, H as denyAll, I as createOrgPermissions, L as allOf, M as DynamicPermissionMatrix, N as DynamicPermissionMatrixConfig, W as requireAuth, Y as when, c as publicReadAdminWrite, d as requireOrgMembership, f as requireOrgRole, h as requireTeamMembership, i as ownerWithAdminBypass, l as readOnly, m as requireServiceScope, n as authenticated, o as presets_d_exports, p as requireScopeContext, q as requireRoles, r as fullPublic, s as publicRead, t as adminOnly, u as requireOrgInScope, z as allowPublic } from "./index-CEJNZFtX.mjs";
8
+ import { a as NotFoundError, d as ValidationError, f as createDomainError, i as ForbiddenError, t as ArcError, u as UnauthorizedError } from "./errors-BGdVwP25.mjs";
8
9
  //#region src/index.d.ts
9
10
  declare const version: string;
10
11
  //#endregion
11
- export { type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, type AnyRecord, type ArcCreateResult, type ArcDeleteResult, ArcError, type ArcGetResult, type ArcInternalMetadata, type ArcListResult, type ArcRequest, type ArcUpdateResult, type AuthPluginOptions, BaseController, type BaseControllerOptions, BaseCrudController, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ConfigError, type ControllerConfigurableOptions, type ControllerConstructionOptions, type ControllerLike, type CrudController, type CrudOperation, type CrudRouteKey, type CrudRouterOptions, type CrudSchemas, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, type DynamicPermissionMatrix, type DynamicPermissionMatrixConfig, type EventDefinition, type FastifyRequestExtras, type FastifyWithAuth, type FastifyWithDecorators, type FieldPermission, type FieldPermissionMap, type FieldRule, ForbiddenError, type GracefulShutdownOptions, HOOK_OPERATIONS, HOOK_PHASES, type HealthCheck, type HealthOptions, type HookOperation, type HookPhase, type IController, type IControllerResponse, type IRequestContext, type InferAdapterDoc, type InferDocType, type InferResourceDoc, type IntrospectionData, type IntrospectionPluginOptions, type JWTPayload, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, type MiddlewareConfig, type MutationOperation, NotFoundError, type OwnershipCheck, type PaginationResult, type PermissionCheck, type PermissionContext, type PermissionResult, type PresetFunction, type PresetResult, type QueryParserInterface, RESERVED_QUERY_PARAMS, type RateLimitConfig, type RegistryEntry, type RegistryStats, type RequestContext, type RequestIdOptions, type RequestWithExtras, type ResourceConfig, ResourceDefinition, type ResourceMetadata, type ResourceSeams, type RouteHandler, type RouteHandlerMethod, type RouteSchemaOptions, SYSTEM_FIELDS, type SeamedResourceConfig, type ServiceContext, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, type TypedController, type TypedRepository, type TypedResourceConfig, UnauthorizedError, type UserBase, type UserOrganization, type ValidateOptions, ValidationError, type ValidationResult, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, ownerWithAdminBypass, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
12
+ export { type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, type AnyRecord, type ArcCreateResult, type ArcDeleteResult, ArcError, type ArcGetResult, type ArcInternalMetadata, type ArcListResult, type ArcRequest, type ArcUpdateResult, type AuthPluginOptions, type AuthorizationDecision, BaseController, type BaseControllerOptions, BaseCrudController, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ConfigError, type ControllerConfigurableOptions, type ControllerConstructionOptions, type ControllerLike, type CrudController, type CrudOperation, type CrudRouteKey, type CrudRouterOptions, type CrudSchemas, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, type DataPolicy, type DynamicPermissionMatrix, type DynamicPermissionMatrixConfig, type EventDefinition, type FastifyRequestExtras, type FastifyWithAuth, type FastifyWithDecorators, type FieldPermission, type FieldPermissionMap, type FieldRule, ForbiddenError, type GracefulShutdownOptions, HOOK_OPERATIONS, HOOK_PHASES, type HealthCheck, type HealthOptions, type HookOperation, type HookPhase, type IController, type IControllerResponse, type IRequestContext, type InferAdapterDoc, type InferDocType, type InferResourceDoc, type IntrospectionData, type IntrospectionPluginOptions, type JWTPayload, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, type MiddlewareConfig, type MutationOperation, NotFoundError, type OwnershipCheck, type PaginationResult, type PermissionCheck, type PermissionContext, type PresetFunction, type PresetResult, type QueryParserInterface, RESERVED_QUERY_PARAMS, type RateLimitConfig, type RawRouteHandler, type RegistryEntry, type RegistryStats, type RequestContext, type RequestIdOptions, type RequestWithExtras, type ResourceConfig, ResourceDefinition, type ResourceMetadata, type ResourceSeams, type RouteHandler, type RouteHandlerMethod, type RouteSchemaOptions, SYSTEM_FIELDS, type SeamedResourceConfig, type ServiceContext, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, type TypedController, type TypedRepository, type TypedResourceConfig, UnauthorizedError, type UserBase, type UserOrganization, type ValidateOptions, ValidationError, type ValidationResult, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, ownerWithAdminBypass, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
package/dist/index.mjs CHANGED
@@ -1,12 +1,14 @@
1
- import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "./constants-DNre0wRg.mjs";
2
- import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-DkO8Nk6-.mjs";
3
- import { a as BulkMixin, i as SlugMixin, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, t as BaseController } from "./BaseController-B65zbz9m.mjs";
4
- import { a as applyFieldWritePermissions, i as applyFieldReadPermissions, o as fields } from "./applyPermissionResult-BnyVE9eD.mjs";
5
- import { a as ResourceDefinition, t as defineResource } from "./defineResource-2zvVVpxg.mjs";
6
- import { c as getControllerScope } from "./pipeline-BGRnV-To.mjs";
7
- import { a as mergeResourceConfig, i as defineResourceVariants, o as defineAction, s as defineAggregation } from "./core-BGa8TXJR.mjs";
8
- import { A as requireAuth, D as anyOf, E as allowPublic, M as requireRoles, O as denyAll, P as when, T as allOf, _ as requireOrgMembership, b as requireServiceScope, c as publicReadAdminWrite, g as requireOrgInScope, h as createOrgPermissions, i as ownerWithAdminBypass, j as requireOwnership, l as readOnly, m as createDynamicPermissionMatrix, n as authenticated, o as presets_exports, r as fullPublic, s as publicRead, t as adminOnly, v as requireOrgRole, x as requireTeamMembership, y as requireScopeContext } from "./permissions-BrtiBKGs.mjs";
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
+ import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "./constants-D3Dv4LAV.mjs";
3
+ import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-Cj42AntO.mjs";
4
+ import { a as BulkMixin, i as SlugMixin, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, t as BaseController } from "./BaseController-De7GqHck.mjs";
5
+ import { n as applyFieldWritePermissions, r as fields, t as applyFieldReadPermissions } from "./fields-CB5Cuzk9.mjs";
6
+ import { a as ResourceDefinition, t as defineResource } from "./defineResource-Bv6EtN1x.mjs";
7
+ import { c as getControllerScope } from "./pipeline-UPQFatit.mjs";
8
+ import { t as defineAggregation } from "./defineAggregation-DbPPS8RI.mjs";
9
+ import { a as mergeResourceConfig, i as defineResourceVariants, o as defineAction } from "./core-BGpIxINN.mjs";
10
+ import { C as requireScopeContext, I as requireAuth, L as requireOwnership, M as anyOf, P as denyAll, S as requireOrgRole, T as requireTeamMembership, V as when, b as requireOrgInScope, c as publicReadAdminWrite, i as ownerWithAdminBypass, j as allowPublic, k as allOf, l as readOnly, n as authenticated, o as presets_exports, r as fullPublic, s as publicRead, t as adminOnly, v as createDynamicPermissionMatrix, w as requireServiceScope, x as requireOrgMembership, y as createOrgPermissions, z as requireRoles } from "./permissions-L--QDAir.mjs";
9
11
  //#region src/index.ts
10
- const version = "2.28.0";
12
+ const version = "2.31.0";
11
13
  //#endregion
12
14
  export { ArcError, BaseController, BaseCrudController, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, ForbiddenError, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, NotFoundError, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, UnauthorizedError, ValidationError, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, ownerWithAdminBypass, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
@@ -1,3 +1,4 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
2
  import * as fs from "node:fs/promises";
2
3
  import * as path from "node:path";
3
4
  import { dirname, join } from "node:path";
@@ -459,6 +460,11 @@ export async function createAppInstance()${ts ? ": Promise<FastifyInstance>" : "
459
460
  preset: config.env === 'production' ? (${config.edge ? "'edge'" : "'production'"}) : 'development',
460
461
  resources,
461
462
  resourcePrefix: '/api',
463
+ // Arc registers the error handler itself (CastError → 400, validation →
464
+ // 422, duplicate key → 409). Configure it HERE — registering
465
+ // errorHandlerPlugin again in your own plugins file overrides arc's in the
466
+ // same scope and boots with an FSTWRN004 warning.
467
+ errorHandler: { includeStack: config.isDev },
462
468
  ${authConfig}
463
469
  cors: {
464
470
  origin: config.cors.origins,
@@ -608,8 +614,7 @@ export const authResource = defineResource({
608
614
  path: '/register',
609
615
  summary: 'Register new user',
610
616
  permissions: allowPublic(),
611
- handler: handlers.register,
612
- raw: true,
617
+ rawHandler: handlers.register,
613
618
  schema: { body: schemas.registerBody, response: { 201: schemas.successResponse } },
614
619
  },
615
620
  {
@@ -617,8 +622,7 @@ export const authResource = defineResource({
617
622
  path: '/login',
618
623
  summary: 'User login',
619
624
  permissions: allowPublic(),
620
- handler: handlers.login,
621
- raw: true,
625
+ rawHandler: handlers.login,
622
626
  schema: { body: schemas.loginBody, response: { 200: schemas.loginResponse } },
623
627
  },
624
628
  {
@@ -626,8 +630,7 @@ export const authResource = defineResource({
626
630
  path: '/refresh',
627
631
  summary: 'Refresh access token',
628
632
  permissions: allowPublic(),
629
- handler: handlers.refreshToken,
630
- raw: true,
633
+ rawHandler: handlers.refreshToken,
631
634
  schema: { body: schemas.refreshBody, response: { 200: schemas.tokenResponse } },
632
635
  },
633
636
  {
@@ -635,8 +638,7 @@ export const authResource = defineResource({
635
638
  path: '/forgot-password',
636
639
  summary: 'Request password reset',
637
640
  permissions: allowPublic(),
638
- handler: handlers.forgotPassword,
639
- raw: true,
641
+ rawHandler: handlers.forgotPassword,
640
642
  schema: { body: schemas.forgotBody, response: { 200: schemas.successResponse } },
641
643
  },
642
644
  {
@@ -644,8 +646,7 @@ export const authResource = defineResource({
644
646
  path: '/reset-password',
645
647
  summary: 'Reset password with token',
646
648
  permissions: allowPublic(),
647
- handler: handlers.resetPassword,
648
- raw: true,
649
+ rawHandler: handlers.resetPassword,
649
650
  schema: { body: schemas.resetBody, response: { 200: schemas.successResponse } },
650
651
  },
651
652
  ],
@@ -669,8 +670,7 @@ export const userProfileResource = defineResource({
669
670
  path: '/me',
670
671
  summary: 'Get current user profile',
671
672
  permissions: requireAuth(),
672
- handler: handlers.getUserProfile,
673
- raw: true,
673
+ rawHandler: handlers.getUserProfile,
674
674
  schema: { response: { 200: schemas.userProfileResponse } },
675
675
  },
676
676
  {
@@ -678,8 +678,7 @@ export const userProfileResource = defineResource({
678
678
  path: '/me',
679
679
  summary: 'Update current user profile',
680
680
  permissions: requireAuth(),
681
- handler: handlers.updateUserProfile,
682
- raw: true,
681
+ rawHandler: handlers.updateUserProfile,
683
682
  schema: { body: schemas.updateUserBody, response: { 200: schemas.userProfileResponse } },
684
683
  },
685
684
  ],
@@ -2533,7 +2532,6 @@ function pluginsIndexTemplate(config) {
2533
2532
  */
2534
2533
 
2535
2534
  ${typeImport}${ts ? "import type { AppConfig } from '../config/index.js';\n" : ""}import { openApiPlugin, scalarPlugin } from '@classytic/arc/docs';
2536
- import { errorHandlerPlugin } from '@classytic/arc/plugins';
2537
2535
  `;
2538
2536
  content += `
2539
2537
  /**
@@ -2546,12 +2544,9 @@ export async function registerPlugins(
2546
2544
  app${appType},
2547
2545
  deps${configType}
2548
2546
  )${ts ? ": Promise<void>" : ""} {
2549
- const { config } = deps;
2550
-
2551
- // Error handling (CastError → 400, validation → 422, duplicate → 409)
2552
- await app.register(errorHandlerPlugin, {
2553
- includeStack: config.isDev,
2554
- });
2547
+ // NOTE: no error handler here — arc registers it inside createApp().
2548
+ // Configure it via createApp({ errorHandler: { includeStack } }) in app.ts.
2549
+ // Registering it again would override arc's in the same scope (FSTWRN004).
2555
2550
 
2556
2551
  // API Documentation (Scalar UI)
2557
2552
  // OpenAPI spec: /_docs/openapi.json
@@ -2567,8 +2562,9 @@ export async function registerPlugins(
2567
2562
  theme: 'default',
2568
2563
  });
2569
2564
 
2570
- // Add your custom plugins here:
2571
- // await app.register(myCustomPlugin, { ...options });
2565
+ // Add your custom plugins here — deps carries your config and services:
2566
+ // const { config } = deps;
2567
+ // await app.register(myCustomPlugin, { apiKey: config.someKey });
2572
2568
  }
2573
2569
  `;
2574
2570
  return content;
@@ -1,3 +1,4 @@
1
+
1
2
  //#region src/cli/commands/init/types.d.ts
2
3
  /**
3
4
  * Shared types for the `arc init` scaffolder.
@@ -1,5 +1,6 @@
1
- import { n as DomainEvent } from "../EventTransport-QmY7A258.mjs";
2
- import { c as WebSocketClient, l as WebSocketMessage } from "../websocket-_Pd0CgR0.mjs";
1
+
2
+ import { n as DomainEvent } from "../EventTransport-2uVV34WU.mjs";
3
+ import { c as WebSocketClient, l as WebSocketMessage } from "../websocket-BOXVggMf.mjs";
3
4
  import { FastifyPluginAsync, FastifyRequest } from "fastify";
4
5
  //#region src/integrations/event-gateway.d.ts
5
6
  interface EventGatewayOptions {
@@ -1,10 +1,11 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
2
  import fp from "fastify-plugin";
2
3
  //#region src/integrations/event-gateway.ts
3
4
  const eventGatewayPluginImpl = async (fastify, opts = {}) => {
4
5
  const { auth = true, orgScoped = false, roomPolicy, maxMessageBytes, maxSubscriptionsPerClient, authenticate } = opts;
5
6
  if (auth && !authenticate && !fastify.hasDecorator("authenticate")) throw new Error("[arc-event-gateway] auth is true but fastify.authenticate is not registered. Register an auth plugin first, provide a custom authenticate function, or set auth: false.");
6
7
  if (opts.sse !== false) {
7
- const { default: ssePlugin } = await import("../sse-BQ1w0dfl.mjs").then((n) => n.r);
8
+ const { default: ssePlugin } = await import("../sse-CUTo9y0X.mjs").then((n) => n.r);
8
9
  await fastify.register(ssePlugin, {
9
10
  path: opts.sse?.path ?? "/events/stream",
10
11
  requireAuth: auth,
@@ -1,7 +1,8 @@
1
- import { c as WebSocketClient, l as WebSocketMessage, u as WebSocketPluginOptions } from "../websocket-_Pd0CgR0.mjs";
1
+
2
+ import { c as WebSocketClient, l as WebSocketMessage, u as WebSocketPluginOptions } from "../websocket-BOXVggMf.mjs";
2
3
  import { EventGatewayOptions } from "./event-gateway.mjs";
3
- import { a as JobMeta, c as JobsPluginOptions, i as JobDispatcher, l as QueueStats, n as JobDefinition, r as JobDispatchOptions } from "../index-CG4yqMDB.mjs";
4
- import { _ as ToolDefinition, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, n as CallToolResult, o as CrudOperation, r as CreateMcpServerConfig, t as BetterAuthHandler, u as McpPluginOptions } from "../types-QFGc3Cjv.mjs";
4
+ import { a as JobMeta, c as JobsPluginOptions, i as JobDispatcher, l as QueueStats, n as JobDefinition, r as JobDispatchOptions } from "../index-C-481Zf2.mjs";
5
+ import { _ as ToolDefinition, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, n as CallToolResult, o as CrudOperation, r as CreateMcpServerConfig, t as BetterAuthHandler, u as McpPluginOptions } from "../types-CwcUQ610.mjs";
5
6
  import { StreamlinePluginOptions, WorkflowLike, WorkflowRunLike } from "./streamline.mjs";
6
7
  import { WebhookDeliveryRecord, WebhookManager, WebhookPluginOptions, WebhookStore, WebhookSubscription } from "./webhooks.mjs";
7
8
  export type { BetterAuthHandler, CallToolResult, CreateMcpServerConfig, CrudOperation, EventGatewayOptions, JobDefinition, JobDispatchOptions, JobDispatcher, JobMeta, JobsPluginOptions, McpAuthResult, McpPluginOptions, McpResourceConfig, PromptDefinition, QueueStats, StreamlinePluginOptions, ToolAnnotations, ToolContext, ToolDefinition, WebSocketClient, WebSocketMessage, WebSocketPluginOptions, WebhookDeliveryRecord, WebhookManager, WebhookPluginOptions, WebhookStore, WebhookSubscription, WorkflowLike, WorkflowRunLike };
@@ -1 +1,2 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
2
  export {};
@@ -1,2 +1,3 @@
1
- import { a as JobMeta, c as JobsPluginOptions, d as ExecuteTimedHandlerOptions, f as TimedHandlerLogger, i as JobDispatcher, l as QueueStats, n as JobDefinition, o as JobRepeatOptions, p as executeTimedHandler, r as JobDispatchOptions, s as JobStatus, t as jobsPlugin, u as defineJob } from "../../index-CG4yqMDB.mjs";
1
+
2
+ import { a as JobMeta, c as JobsPluginOptions, d as ExecuteTimedHandlerOptions, f as TimedHandlerLogger, i as JobDispatcher, l as QueueStats, n as JobDefinition, o as JobRepeatOptions, p as executeTimedHandler, r as JobDispatchOptions, s as JobStatus, t as jobsPlugin, u as defineJob } from "../../index-C-481Zf2.mjs";
2
3
  export { type ExecuteTimedHandlerOptions, type JobDefinition, type JobDispatchOptions, type JobDispatcher, type JobMeta, type JobRepeatOptions, type JobStatus, type JobsPluginOptions, type QueueStats, type TimedHandlerLogger, defineJob, executeTimedHandler, jobsPlugin };
@@ -1,3 +1,5 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
+ import { n as evaluateAndApplyPermission } from "../../authorizationDecision-ChvUQGG1.mjs";
1
3
  import fp from "fastify-plugin";
2
4
  //#region src/integrations/jobs/execution.ts
3
5
  async function executeTimedHandler(options) {
@@ -149,6 +151,49 @@ const jobsPluginImpl = async (fastify, options) => {
149
151
  const dlqQueues = /* @__PURE__ */ new Map();
150
152
  const workers = /* @__PURE__ */ new Map();
151
153
  const throttledJobs = /* @__PURE__ */ new Map();
154
+ const seenNames = /* @__PURE__ */ new Set();
155
+ for (const job of jobs) {
156
+ if (typeof job.name !== "string" || job.name.trim() === "") throw new Error("[arc/jobs] a job definition has an empty name — names are the queue key.");
157
+ if (seenNames.has(job.name)) throw new Error(`[arc/jobs] duplicate job name "${job.name}". A name is the queue key, so two definitions sharing one would leave an untracked worker consuming the same queue after shutdown. Rename one, or register it in a single definition.`);
158
+ seenNames.add(job.name);
159
+ const positiveInt = (v, field) => {
160
+ if (v === void 0) return;
161
+ if (typeof v !== "number" || !Number.isInteger(v) || v <= 0) throw new Error(`[arc/jobs] Job '${job.name}' has ${field}=${String(v)} — must be a positive integer.`);
162
+ };
163
+ const nonNegativeInt = (v, field) => {
164
+ if (v === void 0) return;
165
+ if (typeof v !== "number" || !Number.isInteger(v) || v < 0) throw new Error(`[arc/jobs] Job '${job.name}' has ${field}=${String(v)} — must be a non-negative integer.`);
166
+ };
167
+ positiveInt(job.maxConcurrent, "maxConcurrent");
168
+ positiveInt(job.concurrency, "concurrency");
169
+ positiveInt(job.timeout, "timeout");
170
+ nonNegativeInt(job.retries, "retries");
171
+ nonNegativeInt(job.cancelGraceMs, "cancelGraceMs");
172
+ if (job.rateLimit) {
173
+ positiveInt(job.rateLimit.max, "rateLimit.max");
174
+ positiveInt(job.rateLimit.duration, "rateLimit.duration");
175
+ }
176
+ if (job.backoff) nonNegativeInt(job.backoff.delay, "backoff.delay");
177
+ if (job.repeat) {
178
+ positiveInt(job.repeat.every, "repeat.every");
179
+ positiveInt(job.repeat.limit, "repeat.limit");
180
+ if (job.repeat.pattern !== void 0 && job.repeat.pattern.trim() === "") throw new Error(`[arc/jobs] Job '${job.name}' has an empty repeat.pattern.`);
181
+ }
182
+ }
183
+ if (defaults) {
184
+ const d = defaults;
185
+ const defaultPositiveInt = (v, field) => {
186
+ if (v === void 0) return;
187
+ if (typeof v !== "number" || !Number.isInteger(v) || v <= 0) throw new Error(`[arc/jobs] defaults.${field}=${String(v)} — must be a positive integer.`);
188
+ };
189
+ const defaultNonNegativeInt = (v, field) => {
190
+ if (v === void 0) return;
191
+ if (typeof v !== "number" || !Number.isInteger(v) || v < 0) throw new Error(`[arc/jobs] defaults.${field}=${String(v)} — must be a non-negative integer.`);
192
+ };
193
+ defaultNonNegativeInt(d.retries, "retries");
194
+ defaultPositiveInt(d.timeout, "timeout");
195
+ if (d.backoff) defaultNonNegativeInt(d.backoff.delay, "backoff.delay");
196
+ }
152
197
  for (const job of jobs) {
153
198
  if (!job.repeat) continue;
154
199
  const { pattern, every, tz } = job.repeat;
@@ -296,19 +341,22 @@ const jobsPluginImpl = async (fastify, options) => {
296
341
  }, `[arc/jobs] Large job payload — prefer passing IDs and reloading in the handler`);
297
342
  } catch {}
298
343
  const jobDef = jobDefsByName.get(name);
299
- return { jobId: (await queue.add(name, data, {
300
- delay: opts.delay,
301
- priority: opts.priority,
302
- jobId: opts.jobId,
303
- removeOnComplete: opts.removeOnComplete ?? defaults.removeOnComplete ?? 100,
304
- removeOnFail: opts.removeOnFail ?? defaults.removeOnFail ?? 500,
305
- attempts: jobDef?.retries ?? defaults.retries ?? 3,
306
- backoff: jobDef?.backoff ?? defaults.backoff ?? {
307
- type: "exponential",
308
- delay: 1e3
309
- },
310
- repeat: jobDef?.repeat ?? opts.repeat
311
- })).id };
344
+ return {
345
+ queue: name,
346
+ jobId: (await queue.add(name, data, {
347
+ delay: opts.delay,
348
+ priority: opts.priority,
349
+ jobId: opts.jobId,
350
+ removeOnComplete: opts.removeOnComplete ?? defaults.removeOnComplete ?? 100,
351
+ removeOnFail: opts.removeOnFail ?? defaults.removeOnFail ?? 500,
352
+ attempts: jobDef?.retries ?? defaults.retries ?? 3,
353
+ backoff: jobDef?.backoff ?? defaults.backoff ?? {
354
+ type: "exponential",
355
+ delay: 1e3
356
+ },
357
+ repeat: jobDef?.repeat ?? opts.repeat
358
+ })).id
359
+ };
312
360
  },
313
361
  getQueue(name) {
314
362
  return queues.get(name) ?? null;
@@ -327,10 +375,12 @@ const jobsPluginImpl = async (fastify, options) => {
327
375
  }
328
376
  return stats;
329
377
  },
330
- async getStatus(jobId) {
331
- for (const [name, queue] of queues) {
378
+ async getStatus(queueName, jobId) {
379
+ const queue = queues.get(queueName);
380
+ if (queue) {
381
+ const name = queueName;
332
382
  const job = await queue.getJob(jobId);
333
- if (!job) continue;
383
+ if (!job) return null;
334
384
  const state = typeof job.getState === "function" ? await job.getState() : "unknown";
335
385
  const throttled = throttledJobs.get(name)?.has(jobId) || void 0;
336
386
  return {
@@ -358,24 +408,50 @@ const jobsPluginImpl = async (fastify, options) => {
358
408
  }
359
409
  };
360
410
  if (!fastify.hasDecorator("jobs")) fastify.decorate("jobs", dispatcher);
361
- fastify.get(`${prefix}/stats`, async () => {
362
- return {
363
- success: true,
364
- data: await dispatcher.getStats()
411
+ const management = options.managementRoutes;
412
+ if (management) {
413
+ const gate = management.operatorPermission;
414
+ if (!gate._platformOnly && !management.allowUnverifiedOperatorPermission) throw new Error("[arc/jobs] managementRoutes.operatorPermission must be platform-only. These routes are global (jobs carry no tenant identity), so an org-role gate would let a member of one organization read another's jobs. Use requirePlatformRole('platform-ops') — or requireRoles([...], { includeOrgRoles: false }) with allowUnverifiedOperatorPermission: true if you have verified the check yourself.");
415
+ const guard = async (req, reply) => {
416
+ if (!await evaluateAndApplyPermission(gate, {
417
+ user: req.user ?? null,
418
+ request: req,
419
+ resource: "jobs",
420
+ action: "read"
421
+ }, req, reply)) return false;
422
+ const policy = req._policyFilters;
423
+ if (policy && Object.keys(policy).length > 0) {
424
+ fastify.log.error("[arc/jobs] managementRoutes.operatorPermission returned a row-level policy, which this surface cannot apply — jobs carry no tenant identity. Gate it on an operator role (e.g. requireRoles(['platform-ops'])) and serve tenant-facing job status from a resource that owns its own row policy.");
425
+ await reply.status(403).send({
426
+ code: "arc.jobs.policy_unsupported",
427
+ message: "Job management routes are an operator surface and cannot apply a row-level policy.",
428
+ status: 403
429
+ });
430
+ return false;
431
+ }
432
+ return true;
365
433
  };
366
- });
367
- fastify.get(`${prefix}/:id/status`, async (req, reply) => {
368
- const { id } = req.params;
369
- const status = await dispatcher.getStatus(id);
370
- if (!status) return reply.status(404).send({
371
- success: false,
372
- error: "Job not found"
434
+ fastify.get(`${prefix}/stats`, async (req, reply) => {
435
+ if (!await guard(req, reply)) return reply;
436
+ return { stats: await dispatcher.getStats() };
373
437
  });
374
- return {
375
- success: true,
376
- data: status
377
- };
378
- });
438
+ fastify.get(`${prefix}/:queue/:id/status`, async (req, reply) => {
439
+ if (!await guard(req, reply)) return reply;
440
+ const { queue, id } = req.params;
441
+ const status = await dispatcher.getStatus(queue, id);
442
+ if (!status) return reply.status(404).send({
443
+ code: "arc.not_found",
444
+ message: "Job not found",
445
+ status: 404
446
+ });
447
+ const { returnValue, failedReason, ...safe } = status;
448
+ return {
449
+ ...safe,
450
+ ...management.exposeResult ? { returnValue } : {},
451
+ ...management.exposeFailureReason ? { failedReason } : {}
452
+ };
453
+ });
454
+ }
379
455
  fastify.addHook("onClose", async () => {
380
456
  await dispatcher.close();
381
457
  });
@@ -1,8 +1,9 @@
1
- import { Rt as IControllerResponse, V as ResourceDefinition, Vt as ServerAccessor, zt as IRequestContext } from "../../index-DPRH0Cme.mjs";
2
- import { i as RequestScope } from "../../types-DjC-KUCz.mjs";
3
- import { t as PermissionCheck } from "../../types-Dmw-6Qeo.mjs";
4
- import { n as FieldPermissionMap } from "../../fields-D3lhgzhD.mjs";
5
- import { _ as ToolDefinition, a as CrudDescriptionOverride, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, i as CrudDescriptionMeta, l as McpExecutionWiring, m as SessionEntry, n as CallToolResult, o as CrudOperation, p as PromptResult, r as CreateMcpServerConfig, s as McpAuthResolver, t as BetterAuthHandler, u as McpPluginOptions } from "../../types-QFGc3Cjv.mjs";
1
+
2
+ import { Ht as ServerAccessor, Rt as IControllerResponse, V as ResourceDefinition, zt as IRequestContext } from "../../index-CpzxqePp.mjs";
3
+ import { i as RequestScope } from "../../types-ChuShpCP.mjs";
4
+ import { r as PermissionCheck } from "../../types-B7XeLEgK.mjs";
5
+ import { n as FieldPermissionMap } from "../../fields-I_EeRWND.mjs";
6
+ import { _ as ToolDefinition, a as CrudDescriptionOverride, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, i as CrudDescriptionMeta, l as McpExecutionWiring, m as SessionEntry, n as CallToolResult, o as CrudOperation, p as PromptResult, r as CreateMcpServerConfig, s as McpAuthResolver, t as BetterAuthHandler, u as McpPluginOptions } from "../../types-CwcUQ610.mjs";
6
7
  import { ErrorContract } from "@classytic/repo-core/errors";
7
8
  import { FastifyPluginAsync } from "fastify";
8
9
  import { z } from "zod";
@@ -340,9 +341,9 @@ interface McpContextExtras {
340
341
  * | delete | { id } | {} | undefined |
341
342
  *
342
343
  * **scopeOverride** — when a permission check (e.g. `requireApiKey()`) returns
343
- * `PermissionResult.scope`, the MCP tool handler must install it on the request
344
- * context the same way CRUD/action routes do. This parameter follows the exact
345
- * same non-downgrade rule as `applyPermissionResult`: it overrides only when
344
+ * an `AuthorizationDecision.scope`, the MCP tool handler must install it on the
345
+ * request context the same way CRUD/action routes do. This parameter follows the exact
346
+ * same non-downgrade rule as `applyAuthorizationDecision`: it overrides only when
346
347
  * the session-derived scope is `public` (i.e. MCP called with `auth: false`).
347
348
  * An authenticated session scope is never overwritten.
348
349
  */
@@ -529,7 +530,6 @@ declare module "fastify" {
529
530
  }
530
531
  interface ResourceFilterInputs {
531
532
  readonly expose?: readonly string[];
532
- readonly include?: readonly string[];
533
533
  readonly exclude?: readonly string[];
534
534
  }
535
535
  /**
@@ -1,4 +1,5 @@
1
- import { a as defaultCrudDescription, c as mcpHandlerAdapter, d as toCallToolResult, f as toCallToolSuccess, h as resolveToolCollisions, i as fieldRulesToZod, l as permissionDeniedResult, m as createMcpServer, n as mcpPlugin, o as resolveCrudDescription, p as buildRequestContext, r as resourceToTools, s as invokeController, t as filterResourcesForMcp, u as toCallToolError } from "../../mcpPlugin-Cs6nRGCt.mjs";
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
+ import { a as defaultCrudDescription, c as mcpHandlerAdapter, d as toCallToolResult, f as toCallToolSuccess, h as resolveToolCollisions, i as fieldRulesToZod, l as permissionDeniedResult, m as createMcpServer, n as mcpPlugin, o as resolveCrudDescription, p as buildRequestContext, r as resourceToTools, s as invokeController, t as filterResourcesForMcp, u as toCallToolError } from "../../mcpPlugin-B_es0hiF.mjs";
2
3
  //#region src/integrations/mcp/defineTool.ts
3
4
  /**
4
5
  * Define a type-safe MCP tool.
@@ -1,8 +1,9 @@
1
- import { c as McpAuthResult, u as McpPluginOptions } from "../../types-QFGc3Cjv.mjs";
1
+
2
+ import { c as McpAuthResult, u as McpPluginOptions } from "../../types-CwcUQ610.mjs";
2
3
  //#region src/integrations/mcp/testing.d.ts
3
4
  interface TestMcpClientOptions {
4
5
  /** MCP plugin options (resources, overrides, etc.) — same as mcpPlugin config */
5
- pluginOptions?: Pick<McpPluginOptions, "resources" | "overrides" | "expose" | "include" | "exclude" | "toolNamePrefix" | "extraTools" | "extraPrompts" | "instructions">;
6
+ pluginOptions?: Pick<McpPluginOptions, "resources" | "overrides" | "expose" | "exclude" | "toolNamePrefix" | "extraTools" | "extraPrompts" | "instructions">;
6
7
  /** Auth identity for the test session */
7
8
  auth?: McpAuthResult | null;
8
9
  /** Server name (default: 'test-mcp') */
@@ -1,4 +1,5 @@
1
- import { m as createMcpServer, r as resourceToTools, t as filterResourcesForMcp } from "../../mcpPlugin-Cs6nRGCt.mjs";
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
+ import { m as createMcpServer, r as resourceToTools, t as filterResourcesForMcp } from "../../mcpPlugin-B_es0hiF.mjs";
2
3
  //#region src/integrations/mcp/testing.ts
3
4
  /**
4
5
  * @classytic/arc/mcp/testing — MCP Test Utilities
@@ -54,7 +55,6 @@ async function createTestMcpClient(options = {}) {
54
55
  const overrides = pluginOpts.overrides ?? {};
55
56
  const tools = filterResourcesForMcp(pluginOpts.resources ?? [], {
56
57
  expose: pluginOpts.expose,
57
- include: pluginOpts.include,
58
58
  exclude: pluginOpts.exclude
59
59
  }).flatMap((r) => {
60
60
  const resOverrides = overrides[r.name] ?? {};
@@ -1,3 +1,4 @@
1
+
1
2
  import { FastifyPluginAsync, FastifyRequest } from "fastify";
2
3
  //#region src/integrations/streamline.d.ts
3
4
  /**
@@ -1,5 +1,6 @@
1
- import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-DkO8Nk6-.mjs";
2
- import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-BQcW6_Kq.mjs";
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
+ import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-Cj42AntO.mjs";
3
+ import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-PSZwi8JV.mjs";
3
4
  import fp from "fastify-plugin";
4
5
  //#region src/integrations/streamline.ts
5
6
  /**
@@ -1,3 +1,4 @@
1
+
1
2
  import { FastifyPluginAsync } from "fastify";
2
3
  //#region src/integrations/webhooks.d.ts
3
4
  interface WebhookSubscription {
@@ -1,3 +1,4 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
2
  import { createHmac, timingSafeEqual } from "node:crypto";
2
3
  import fp from "fastify-plugin";
3
4
  //#region src/integrations/webhooks.ts
@@ -1,4 +1,5 @@
1
- import { c as SerializedEntry, i as Principal, n as FencedWriteOutcome, s as PushRefStore, t as EnvelopeSnapshot } from "../pushref-registry-BbcnpNTm.mjs";
1
+
2
+ import { c as SerializedEntry, i as Principal, n as FencedWriteOutcome, s as PushRefStore, t as EnvelopeSnapshot } from "../pushref-registry-Dov9l4qE.mjs";
2
3
  //#region src/integrations/websocket-pushref-redis.d.ts
3
4
  /**
4
5
  * Minimal `ioredis` shape — typed structurally so this file doesn't
@@ -1,3 +1,4 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
2
  //#region src/integrations/websocket-pushref-redis.ts
2
3
  /**
3
4
  * Lua script for atomic claim. Runs server-side, single-roundtrip.
@@ -1,4 +1,5 @@
1
- import { f as WebSocketAdapter } from "../websocket-_Pd0CgR0.mjs";
1
+
2
+ import { f as WebSocketAdapter } from "../websocket-BOXVggMf.mjs";
2
3
  //#region src/integrations/websocket-redis.d.ts
3
4
  interface RedisLike {
4
5
  publish(channel: string, message: string): Promise<number>;
@@ -1,3 +1,4 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
2
  //#region src/integrations/websocket-redis.ts
2
3
  /**
3
4
  * Redis Pub/Sub adapter for cross-instance WebSocket broadcast.
@@ -1,3 +1,4 @@
1
- import { a as GeoRoomOptions, c as WebSocketClient, d as LocalWebSocketAdapter, f as WebSocketAdapter, i as GeoRoom, l as WebSocketMessage, n as GeoPoint, o as RoomManager, r as GeoPublishOpts, s as AuthResult, t as websocketPlugin, u as WebSocketPluginOptions } from "../websocket-_Pd0CgR0.mjs";
2
- import { a as PushRefRegistry, c as SerializedEntry, i as Principal, o as PushRefRegistryOptions, r as MemoryPushRefStore, s as PushRefStore } from "../pushref-registry-BbcnpNTm.mjs";
1
+
2
+ import { a as GeoRoomOptions, c as WebSocketClient, d as LocalWebSocketAdapter, f as WebSocketAdapter, i as GeoRoom, l as WebSocketMessage, n as GeoPoint, o as RoomManager, r as GeoPublishOpts, s as AuthResult, t as websocketPlugin, u as WebSocketPluginOptions } from "../websocket-BOXVggMf.mjs";
3
+ import { a as PushRefRegistry, c as SerializedEntry, i as Principal, o as PushRefRegistryOptions, r as MemoryPushRefStore, s as PushRefStore } from "../pushref-registry-Dov9l4qE.mjs";
3
4
  export { type AuthResult, type GeoPoint, type GeoPublishOpts, GeoRoom, type GeoRoomOptions, LocalWebSocketAdapter, MemoryPushRefStore, type Principal, PushRefRegistry, type PushRefRegistryOptions, type PushRefStore, RoomManager, type SerializedEntry, type WebSocketAdapter, type WebSocketClient, type WebSocketMessage, type WebSocketPluginOptions, websocketPlugin };
@@ -1,3 +1,4 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
2
  import { randomUUID } from "node:crypto";
2
3
  import sjson from "secure-json-parse";
3
4
  import fp from "fastify-plugin";
@@ -1,3 +1,4 @@
1
+
1
2
  import { CacheAdapter } from "@classytic/repo-core/cache";
2
3
  //#region src/cache/interface.d.ts
3
4
  interface CacheLogger {
@@ -1,3 +1,4 @@
1
+
1
2
  //#region src/idempotency/stores/interface.d.ts
2
3
  /**
3
4
  * Idempotency Store Interface
@@ -1,3 +1,4 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
2
  //#region src/idempotency/stores/interface.ts
2
3
  /**
3
4
  * Helper to create a result object
@@ -1,4 +1,5 @@
1
- import { t as ArcError } from "./errors-DkO8Nk6-.mjs";
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "./errors-Cj42AntO.mjs";
2
3
  import sjson from "secure-json-parse";
3
4
  //#region src/utils/jsonBody.ts
4
5
  /**
@@ -1,3 +1,4 @@
1
+ /*! @classytic/arc v2.31.0 | MIT | https://classytic.com */
1
2
  //#region src/cache/keys.ts
2
3
  /**
3
4
  * Cache Key Utilities