@classytic/arc 2.47.0 → 2.48.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 (160) hide show
  1. package/dist/{EventTransport-BHKy4_Bi.mjs → EventTransport-BWwg5YAU.mjs} +2 -2
  2. package/dist/{HookSystem-CAIDVoKC.mjs → HookSystem-B9x-Y_k7.mjs} +2 -2
  3. package/dist/{ResourceRegistry-23Ml6FNe.mjs → ResourceRegistry-BcvEJoZd.mjs} +2 -2
  4. package/dist/{acquire-DoFX06fm.mjs → acquire-D2yj6Zzl.mjs} +1 -1
  5. package/dist/{actionPermissions-DXrlWHHK.mjs → actionPermissions-Dha8sAz2.mjs} +13 -13
  6. package/dist/audit/index.mjs +4 -4
  7. package/dist/auth/audit.mjs +1 -1
  8. package/dist/auth/index.mjs +7 -7
  9. package/dist/auth/redis-session.mjs +1 -1
  10. package/dist/{authorizationDecision-DYiubkYw.mjs → authorizationDecision-BZSJcPNE.mjs} +4 -4
  11. package/dist/{boundedMap-CtdzpJ3X.mjs → boundedMap-o2KZDCWy.mjs} +1 -1
  12. package/dist/{buildHandler-CARdmPNo.mjs → buildHandler-G3k59KY2.mjs} +4 -4
  13. package/dist/cache/index.mjs +4 -4
  14. package/dist/{caching-QRiryDLs.mjs → caching-CJIDPZOv.mjs} +2 -2
  15. package/dist/{claimed-BLecr1j3.mjs → claimed-D0A43wjT.mjs} +1 -1
  16. package/dist/cleanup/index.mjs +4 -4
  17. package/dist/cli/commands/describe.mjs +3 -3
  18. package/dist/cli/commands/docs.mjs +3 -3
  19. package/dist/cli/commands/doctor.mjs +1 -1
  20. package/dist/cli/commands/generate.mjs +2 -2
  21. package/dist/cli/commands/init.mjs +2 -2
  22. package/dist/cli/commands/introspect.mjs +2 -2
  23. package/dist/cli/index.mjs +3 -3
  24. package/dist/{constants-Cx7BcnHT.mjs → constants-D-faL5SX.mjs} +1 -1
  25. package/dist/context/index.mjs +5 -5
  26. package/dist/core/index.mjs +7 -7
  27. package/dist/{core-0WyMuo0f.mjs → core-NSu1peyq.mjs} +3 -3
  28. package/dist/{createActionRouter-mLAGbpDV.mjs → createActionRouter-DTSVv1VK.mjs} +6 -6
  29. package/dist/{createAggregationRouter-BEAjn3dA.mjs → createAggregationRouter-zEasm-ax.mjs} +7 -7
  30. package/dist/{createApp-QDP4vYWH.mjs → createApp-CjqhkX1x.mjs} +29 -29
  31. package/dist/{createMcpServer-DzXHX0SO.d.mts → createMcpServer-hSFeqRUb.d.mts} +9 -10
  32. package/dist/{defineAggregation-CFNfvz-C.mjs → defineAggregation-DH2L6_v9.mjs} +1 -1
  33. package/dist/{defineResource-BROJmhzJ.mjs → defineResource-zYCrhNaN.mjs} +8 -8
  34. package/dist/discovery/index.mjs +1 -1
  35. package/dist/docs/index.mjs +3 -3
  36. package/dist/{elevation-DrXeEWWk.mjs → elevation-z--rFcZ5.mjs} +5 -5
  37. package/dist/encryption/index.mjs +3 -3
  38. package/dist/{errorHandler-BiBXtxj4.mjs → errorHandler-3_3oN-Uc.mjs} +3 -3
  39. package/dist/{errors-DnrUChAy.mjs → errors-DyY48oRi.mjs} +1 -1
  40. package/dist/{eventPlugin-BhKLUe7H.mjs → eventPlugin-Co9sABCg.mjs} +8 -8
  41. package/dist/{eventTypes-CCIRGakw.mjs → eventTypes-HmAFyJmJ.mjs} +2 -2
  42. package/dist/events/index.mjs +8 -8
  43. package/dist/events/transports/redis-stream-entry.mjs +4 -4
  44. package/dist/events/transports/redis.mjs +2 -2
  45. package/dist/factory/index.mjs +6 -6
  46. package/dist/{fields-CYdpcV73.mjs → fields-rfsl26Ov.mjs} +1 -1
  47. package/dist/{filter-merge-6kasezRH.mjs → filter-merge-8glLr7Dk.mjs} +1 -1
  48. package/dist/{generate-DUkcbc4r.mjs → generate-BOfBueRt.mjs} +2 -2
  49. package/dist/{headers-KxhrKevA.mjs → headers-CHSOqpcY.mjs} +2 -2
  50. package/dist/{health-CRJg3IIq.mjs → health-DHvAIVmM.mjs} +1 -1
  51. package/dist/{health-jkYNdobJ.mjs → health-ezwTHQh2.mjs} +1 -1
  52. package/dist/hooks/index.mjs +2 -2
  53. package/dist/http-cache/index.mjs +4 -4
  54. package/dist/http-cache/purgers/cloudflare.mjs +2 -2
  55. package/dist/http-cache/purgers/fastly.mjs +2 -2
  56. package/dist/http-cache/testing/index.mjs +1 -1
  57. package/dist/idempotency/index.mjs +7 -7
  58. package/dist/idempotency/redis.mjs +2 -2
  59. package/dist/index.mjs +11 -11
  60. package/dist/{init-CACwpktI.mjs → init-MoE3eZNR.mjs} +1 -1
  61. package/dist/integrations/event-gateway.mjs +2 -2
  62. package/dist/integrations/index.d.mts +1 -1
  63. package/dist/integrations/index.mjs +1 -1
  64. package/dist/integrations/jobs/index.mjs +3 -3
  65. package/dist/integrations/mcp/index.d.mts +3 -35
  66. package/dist/integrations/mcp/index.mjs +2 -2
  67. package/dist/integrations/mcp/testing.d.mts +11 -15
  68. package/dist/integrations/mcp/testing.mjs +22 -42
  69. package/dist/integrations/streamline.mjs +3 -3
  70. package/dist/integrations/webhooks.mjs +4 -4
  71. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  72. package/dist/integrations/websocket-redis.mjs +1 -1
  73. package/dist/integrations/websocket.mjs +2 -2
  74. package/dist/{jsonBody-CzDBkCme.mjs → jsonBody-DZGiCawf.mjs} +2 -2
  75. package/dist/{keys-Cbwf6r1B.mjs → keys-CrMOZuk6.mjs} +1 -1
  76. package/dist/{loadResources-Kr6vuljv.mjs → loadResources-CVQvYUhN.mjs} +3 -3
  77. package/dist/{loadResourcesFromEntry-D2e0qoDR.mjs → loadResourcesFromEntry-D0naccV2.mjs} +2 -2
  78. package/dist/logger/index.mjs +2 -2
  79. package/dist/{logger-C110X5Yz.mjs → logger-VyMcSmVG.mjs} +1 -1
  80. package/dist/{mcpPlugin-4lIPr9OJ.mjs → mcpPlugin-DQACaqVu.mjs} +210 -373
  81. package/dist/{memory-D9qkhXiB.mjs → memory-Lpfu8Hga.mjs} +3 -3
  82. package/dist/{metrics-B-qrrWfI.mjs → metrics-DjVj1sg5.mjs} +3 -3
  83. package/dist/middleware/index.mjs +3 -3
  84. package/dist/migrations/index.mjs +2 -2
  85. package/dist/{module-BD8xHgrz.mjs → module-BqPJpZ_L.mjs} +1 -1
  86. package/dist/{multipartBody-qU7KCn1l.mjs → multipartBody-BNgNv7r0.mjs} +1 -1
  87. package/dist/{observeSend-BnPtTotW.mjs → observeSend-BKJHibJz.mjs} +1 -1
  88. package/dist/{openapi-DoVa5SVP.mjs → openapi-T90KrPR6.mjs} +6 -6
  89. package/dist/outbox-admin/index.mjs +5 -5
  90. package/dist/{outbox-module-DyITEIop.mjs → outbox-module-C874VgBr.mjs} +7 -7
  91. package/dist/permissions/index.mjs +7 -7
  92. package/dist/{permissions-BBy4bOGi.mjs → permissions-R9T2G1PH.mjs} +9 -9
  93. package/dist/{pipe-BOm2o4UA.mjs → pipe-DzqbsZy-.mjs} +2 -2
  94. package/dist/pipeline/index.mjs +2 -2
  95. package/dist/{plan-DDIGwuxr.mjs → plan-C0gkeABY.mjs} +1 -1
  96. package/dist/{plugin-Bn4D_0XK.mjs → plugin-BJcVOX5r.mjs} +22 -22
  97. package/dist/plugins/index.mjs +17 -17
  98. package/dist/plugins/response-cache.mjs +4 -4
  99. package/dist/plugins/tracing-entry.mjs +2 -2
  100. package/dist/{pluralize-ClEjcKlG.mjs → pluralize-CrCpyoZs.mjs} +1 -1
  101. package/dist/presets/filesUpload.mjs +5 -5
  102. package/dist/presets/index.mjs +2 -2
  103. package/dist/presets/multiTenant.mjs +5 -5
  104. package/dist/presets/search.mjs +2 -2
  105. package/dist/{presets-DK2jh5YR.mjs → presets-CNDvNYsz.mjs} +4 -4
  106. package/dist/{projection-BHH-sXyS.mjs → projection-CIUe8b59.mjs} +2 -2
  107. package/dist/{purger.types-2wNJK_89.mjs → purger.types-f83fTzGy.mjs} +1 -1
  108. package/dist/{queryCachePlugin-Ckqe98AM.mjs → queryCachePlugin-B2jpwFcv.mjs} +6 -6
  109. package/dist/{rateLimitKey-CWAjlqcN.mjs → rateLimitKey-BWx-qep0.mjs} +1 -1
  110. package/dist/{realtime-BIJi9USY.mjs → realtime-D2tqi3d2.mjs} +11 -11
  111. package/dist/registry/index.mjs +3 -3
  112. package/dist/{registry-y9ZA-R_J.mjs → registry-Dl0k6UXy.mjs} +2 -2
  113. package/dist/{relay-BNrC1CEP.mjs → relay-ZYvS4xyW.mjs} +4 -4
  114. package/dist/{renewingLease-CS43br5E.mjs → renewingLease-DT4yLb29.mjs} +1 -1
  115. package/dist/{replyHelpers-oZDzakGb.mjs → replyHelpers-BJFN5AW7.mjs} +2 -2
  116. package/dist/{requestContext-fWb_YaV2.mjs → requestContext-Ct5la-SA.mjs} +1 -1
  117. package/dist/{requirement--2hWyyHi.mjs → requirement-CxDxjB6V.mjs} +1 -1
  118. package/dist/{resourceRateLimit-1WbcyMZY.mjs → resourceRateLimit-D1oH2obv.mjs} +2 -2
  119. package/dist/{rolldown-runtime-yH2lHMo_.mjs → rolldown-runtime-BdTN42uL.mjs} +1 -1
  120. package/dist/{routeValidator-BSlRIA5c.mjs → routeValidator-DclDl5WJ.mjs} +1 -1
  121. package/dist/{runtimeCapabilities-CYCEtU1W.mjs → runtimeCapabilities-ClWr60El.mjs} +1 -1
  122. package/dist/{schedules-B5WGlYIT.mjs → schedules-gVkRcs-9.mjs} +5 -5
  123. package/dist/{schemaConverter-DtNvts-6.mjs → schemaConverter-CIwB5wPO.mjs} +2 -2
  124. package/dist/{schemaIR-uS_RHqa3.mjs → schemaIR-A0IoD05P.mjs} +2 -2
  125. package/dist/schemas/index.mjs +1 -1
  126. package/dist/scim/index.mjs +2 -2
  127. package/dist/scope/index.mjs +5 -5
  128. package/dist/{scope-BwVLSyNG.mjs → scope-VMZhdkbT.mjs} +4 -4
  129. package/dist/{shutdown-BJiJN7FT.mjs → shutdown-Bi19vH0z.mjs} +1 -1
  130. package/dist/{simpleEqualityMatcher-DGRLq-1k.mjs → simpleEqualityMatcher-CaCS09fh.mjs} +1 -1
  131. package/dist/{sse-B_50llZu.mjs → sse-BqM359f1.mjs} +7 -7
  132. package/dist/{sseStream-BjSo9Ult.mjs → sseStream-qSa-F2Qm.mjs} +2 -2
  133. package/dist/{store-helpers-D-n5cwy5.mjs → store-helpers-rx-F2ZGR.mjs} +1 -1
  134. package/dist/{streaming-Dcgqa-hH.mjs → streaming-CPChx3A7.mjs} +1 -1
  135. package/dist/{subscriberIdentity-C9KhIXTF.mjs → subscriberIdentity-CYNYw8p_.mjs} +1 -1
  136. package/dist/{tenancy-COrhjPRZ.mjs → tenancy-BoWImS3K.mjs} +2 -2
  137. package/dist/{tenantPreparation-BElWHytd.mjs → tenantPreparation-oqKCZQZM.mjs} +4 -4
  138. package/dist/testing/cleanupStoreContract.mjs +1 -1
  139. package/dist/testing/index.mjs +11 -11
  140. package/dist/testing/outboxStoreContract.mjs +2 -2
  141. package/dist/testing/requiredPorts.mjs +2 -2
  142. package/dist/testing/storageContract.mjs +1 -1
  143. package/dist/{timing-CaxKbRk_.mjs → timing-Dsteq59c.mjs} +1 -1
  144. package/dist/{transactionContext-8qKON0Nk.mjs → transactionContext-C1OgH-hW.mjs} +1 -1
  145. package/dist/{typeGuards-DVjVSsXO.mjs → typeGuards-DNlpASzd.mjs} +1 -1
  146. package/dist/types/index.mjs +1 -1
  147. package/dist/types/storage.mjs +1 -1
  148. package/dist/{types-DeLiuaNv.d.mts → types-DduBiYaI.d.mts} +18 -29
  149. package/dist/{types-DZHqOuJE.mjs → types-HFFSwF_K.mjs} +4 -4
  150. package/dist/usage/index.mjs +4 -4
  151. package/dist/{userHelpers-_eGj6kf0.mjs → userHelpers-N-k-8dNF.mjs} +1 -1
  152. package/dist/utils/index.mjs +12 -12
  153. package/dist/{utils-Dd6MWpye.mjs → utils-C7w_RVlx.mjs} +5 -5
  154. package/dist/{validate-BaF5wd0x.mjs → validate-Brr4b_fH.mjs} +3 -3
  155. package/dist/{versioning-DyV7mwtK.mjs → versioning-CE5kdWOY.mjs} +3 -3
  156. package/dist/{workScope-CmCBUmPR.mjs → workScope-A3XBpYTa.mjs} +2 -2
  157. package/package.json +15 -23
  158. package/skills/arc/references/mcp-custom-tools.md +1 -1
  159. package/skills/arc/references/mcp-setup.md +11 -10
  160. package/skills/arc/references/mcp-testing.md +3 -3
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as ArcError } from "../errors-DnrUChAy.mjs";
3
- import { t as parseJsonBody } from "../jsonBody-CzDBkCme.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "../errors-DyY48oRi.mjs";
3
+ import { t as parseJsonBody } from "../jsonBody-DZGiCawf.mjs";
4
4
  import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
5
5
  import fp from "fastify-plugin";
6
6
  // src/encryption/fieldCipher.ts
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
3
- import { m as statusToArcCode, p as isArcError } from "./errors-DnrUChAy.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-BdTN42uL.mjs";
3
+ import { m as statusToArcCode, p as isArcError } from "./errors-DyY48oRi.mjs";
4
4
  import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
5
5
  import { isProductionEnv } from "@classytic/primitives/environment";
6
6
  import fp from "fastify-plugin";
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
3
3
  // src/utils/errors.ts
4
4
  /**
@@ -1,11 +1,11 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
3
- import { t as arcLog } from "./logger-C110X5Yz.mjs";
4
- import { d as createDomainError } from "./errors-DnrUChAy.mjs";
5
- import { n as requestContext } from "./requestContext-fWb_YaV2.mjs";
6
- import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-BJiJN7FT.mjs";
7
- import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-BHKy4_Bi.mjs";
8
- import { n as preserveSubscriberIdentity } from "./subscriberIdentity-C9KhIXTF.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-BdTN42uL.mjs";
3
+ import { t as arcLog } from "./logger-VyMcSmVG.mjs";
4
+ import { d as createDomainError } from "./errors-DyY48oRi.mjs";
5
+ import { n as requestContext } from "./requestContext-Ct5la-SA.mjs";
6
+ import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-Bi19vH0z.mjs";
7
+ import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-BWwg5YAU.mjs";
8
+ import { n as preserveSubscriberIdentity } from "./subscriberIdentity-CYNYw8p_.mjs";
9
9
  import { isProductionEnv } from "@classytic/primitives/environment";
10
10
  import fp from "fastify-plugin";
11
11
  import { NonDurablePublishError } from "@classytic/primitives/durable-events";
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { r as createEvent } from "./EventTransport-BHKy4_Bi.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { r as createEvent } from "./EventTransport-BWwg5YAU.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { durableEventMeta } from "@classytic/primitives/durable-events";
5
5
  // src/events/defineEvent.ts
@@ -1,11 +1,11 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { n as MemoryEventTransport } from "../EventTransport-BHKy4_Bi.mjs";
3
- import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-CCIRGakw.mjs";
4
- import { r as withSubscriberId } from "../subscriberIdentity-C9KhIXTF.mjs";
5
- import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-BNrC1CEP.mjs";
6
- import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-BhKLUe7H.mjs";
7
- import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-CRJg3IIq.mjs";
8
- import { t as createOutboxModule } from "../outbox-module-DyITEIop.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { n as MemoryEventTransport } from "../EventTransport-BWwg5YAU.mjs";
3
+ import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-HmAFyJmJ.mjs";
4
+ import { r as withSubscriberId } from "../subscriberIdentity-CYNYw8p_.mjs";
5
+ import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-ZYvS4xyW.mjs";
6
+ import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-Co9sABCg.mjs";
7
+ import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-DHvAIVmM.mjs";
8
+ import { t as createOutboxModule } from "../outbox-module-C874VgBr.mjs";
9
9
  import { fingerprintRequest, runIdempotent } from "@classytic/repo-core/idempotency";
10
10
  import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
11
11
  // src/events/inbox.ts
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { n as evictToSize } from "../../boundedMap-CtdzpJ3X.mjs";
3
- import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-CmCBUmPR.mjs";
4
- import { t as getSubscriberId } from "../../subscriberIdentity-C9KhIXTF.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { n as evictToSize } from "../../boundedMap-o2KZDCWy.mjs";
3
+ import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-A3XBpYTa.mjs";
4
+ import { t as getSubscriberId } from "../../subscriberIdentity-CYNYw8p_.mjs";
5
5
  import sjson from "secure-json-parse";
6
6
  import { createEventRouter } from "@classytic/primitives/events";
7
7
  // src/events/transports/redis-stream.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-CmCBUmPR.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-A3XBpYTa.mjs";
3
3
  import sjson from "secure-json-parse";
4
4
  // src/events/transports/redis.ts
5
5
  /**
@@ -1,9 +1,9 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { r as mergeHealthChecks, t as healthPlugin } from "../health-jkYNdobJ.mjs";
3
- import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-QDP4vYWH.mjs";
4
- import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-DDIGwuxr.mjs";
5
- import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-BD8xHgrz.mjs";
6
- import { t as loadResources } from "../loadResources-Kr6vuljv.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { r as mergeHealthChecks, t as healthPlugin } from "../health-ezwTHQh2.mjs";
3
+ import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-CjqhkX1x.mjs";
4
+ import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-C0gkeABY.mjs";
5
+ import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-BqPJpZ_L.mjs";
6
+ import { t as loadResources } from "../loadResources-CVQvYUhN.mjs";
7
7
  // src/factory/module/asyncapi.ts
8
8
  /**
9
9
  * The module graph as an AsyncAPI 3.0 document — one channel per event (addressed by the event
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  // src/permissions/fields.ts
3
3
  /**
4
4
  * Field-Level Permissions
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  // src/permissions/filter-merge.ts
3
3
  /**
4
4
  * Policy-filter composition — logical AND, never last-writer-wins.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as pluralize } from "./pluralize-ClEjcKlG.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as pluralize } from "./pluralize-CrCpyoZs.mjs";
3
3
  import { join } from "node:path";
4
4
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  // src/cli/commands/generate/name-helpers.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { u as ValidationError } from "./errors-DnrUChAy.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { u as ValidationError } from "./errors-DyY48oRi.mjs";
3
3
  // src/utils/headers.ts
4
4
  /**
5
5
  * Canonical header typing + accessor.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  // src/events/outbox/health.ts
3
3
  /** Pending age past which the relay counts as stalled. */
4
4
  const DEFAULT_RELAY_LAG_UNHEALTHY_MS = 3e5;
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  import { randomUUID } from "node:crypto";
3
3
  import fp from "fastify-plugin";
4
4
  // src/plugins/requestId.ts
@@ -1,2 +1,2 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-CAIDVoKC.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-B9x-Y_k7.mjs";
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as hasEvents } from "../typeGuards-DVjVSsXO.mjs";
3
- import { n as chunkTags, t as CachePurgeError } from "../purger.types-2wNJK_89.mjs";
4
- import { r as exponentialBackoff, t as EventOutbox } from "../relay-BNrC1CEP.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as hasEvents } from "../typeGuards-DNlpASzd.mjs";
3
+ import { n as chunkTags, t as CachePurgeError } from "../purger.types-f83fTzGy.mjs";
4
+ import { r as exponentialBackoff, t as EventOutbox } from "../relay-ZYvS4xyW.mjs";
5
5
  import fp from "fastify-plugin";
6
6
  import { createEvent } from "@classytic/primitives/events";
7
7
  // src/http-cache/invalidation/delivery.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as CachePurgeError } from "../../purger.types-2wNJK_89.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as CachePurgeError } from "../../purger.types-f83fTzGy.mjs";
3
3
  // src/http-cache/purgers/cloudflare.ts
4
4
  /**
5
5
  * Cloudflare purge-by-tag (`Cache-Tag`). Needs an API token scoped to Zone > Cache Purge only.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as CachePurgeError } from "../../purger.types-2wNJK_89.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as CachePurgeError } from "../../purger.types-f83fTzGy.mjs";
3
3
  // src/http-cache/purgers/fastly.ts
4
4
  /**
5
5
  * Fastly surrogate-key purge, with soft purge (`Fastly-Soft-Purge: 1`). Responses must carry the tags in
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  // src/http-cache/testing/assertions.ts
3
3
  const header = (res, name) => {
4
4
  const v = res.headers[name];
@@ -1,10 +1,10 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { d as createDomainError } from "../errors-DnrUChAy.mjs";
3
- import { n as requireSingleHeaderValue } from "../headers-KxhrKevA.mjs";
4
- import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement--2hWyyHi.mjs";
5
- import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-D-n5cwy5.mjs";
6
- import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-CaxKbRk_.mjs";
7
- import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-DoFX06fm.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { d as createDomainError } from "../errors-DyY48oRi.mjs";
3
+ import { n as requireSingleHeaderValue } from "../headers-CHSOqpcY.mjs";
4
+ import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-CxDxjB6V.mjs";
5
+ import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-rx-F2ZGR.mjs";
6
+ import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-Dsteq59c.mjs";
7
+ import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-D2yj6Zzl.mjs";
8
8
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
9
9
  import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
10
10
  import { createHash } from "node:crypto";
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as acquireBySteps } from "../acquire-DoFX06fm.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as acquireBySteps } from "../acquire-D2yj6Zzl.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  // src/idempotency/stores/redis.ts
5
5
  /**
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { a as DEFAULT_SORT, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "./constants-Cx7BcnHT.mjs";
3
- import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-DnrUChAy.mjs";
4
- import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-Bn4D_0XK.mjs";
5
- import { t as defineAggregation } from "./defineAggregation-CFNfvz-C.mjs";
6
- import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-CYdpcV73.mjs";
7
- import { S as getControllerScope } from "./actionPermissions-DXrlWHHK.mjs";
8
- import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-0WyMuo0f.mjs";
9
- import { a as ResourceDefinition, t as defineResource } from "./defineResource-BROJmhzJ.mjs";
10
- import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-BBy4bOGi.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { a as DEFAULT_SORT, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "./constants-D-faL5SX.mjs";
3
+ import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-DyY48oRi.mjs";
4
+ import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-BJcVOX5r.mjs";
5
+ import { t as defineAggregation } from "./defineAggregation-DH2L6_v9.mjs";
6
+ import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-rfsl26Ov.mjs";
7
+ import { S as getControllerScope } from "./actionPermissions-Dha8sAz2.mjs";
8
+ import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-NSu1peyq.mjs";
9
+ import { a as ResourceDefinition, t as defineResource } from "./defineResource-zYCrhNaN.mjs";
10
+ import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-R9T2G1PH.mjs";
11
11
  // src/index.ts
12
- const version = "2.47.0";
12
+ const version = "2.48.0";
13
13
  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, nativePolicyFilter, ownerWithAdminBypass, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  import * as fs from "node:fs/promises";
3
3
  import * as path from "node:path";
4
4
  import { dirname, join } from "node:path";
@@ -1,11 +1,11 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  import fp from "fastify-plugin";
3
3
  // src/integrations/event-gateway.ts
4
4
  const eventGatewayPluginImpl = async (fastify, opts = {}) => {
5
5
  const { auth = true, orgScoped, roomPolicy, maxMessageBytes, maxSubscriptionsPerClient, authenticate } = opts;
6
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.");
7
7
  if (opts.sse !== false) {
8
- const { default: ssePlugin } = await import("../sse-B_50llZu.mjs").then((n) => n.n);
8
+ const { default: ssePlugin } = await import("../sse-BqM359f1.mjs").then((n) => n.n);
9
9
  await fastify.register(ssePlugin, {
10
10
  path: opts.sse?.path ?? "/events/stream",
11
11
  requireAuth: auth,
@@ -2,7 +2,7 @@
2
2
  import { c as WebSocketClient, l as WebSocketMessage, u as WebSocketPluginOptions } from "../websocket-BGuc-WVZ.mjs";
3
3
  import { EventGatewayOptions } from "./event-gateway.mjs";
4
4
  import { a as JobMeta, c as JobsPluginOptions, i as JobDispatcher, l as QueueStats, n as JobDefinition, r as JobDispatchOptions } from "../index-BAXDo5eE.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-DeLiuaNv.mjs";
5
+ import { _ as ToolDefinition, c as McpAuthResult, d as McpResourceConfig, g as ToolContext, h as ToolAnnotations, n as CallToolResult, o as CrudOperation, p as PromptDefinition, r as CreateMcpServerConfig, t as BetterAuthHandler, u as McpPluginOptions } from "../types-DduBiYaI.mjs";
6
6
  import { StreamlinePluginOptions, WorkflowLike, WorkflowRunLike } from "./streamline.mjs";
7
7
  import { WebhookDeliveryRecord, WebhookManager, WebhookPluginOptions, WebhookStore, WebhookSubscription } from "./webhooks.mjs";
8
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,2 +1,2 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  export {};
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { n as evaluateAndApplyPermission } from "../../authorizationDecision-DYiubkYw.mjs";
3
- import { i as runAdmittedWork, r as registerShutdownParticipant } from "../../shutdown-BJiJN7FT.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { n as evaluateAndApplyPermission } from "../../authorizationDecision-BZSJcPNE.mjs";
3
+ import { i as runAdmittedWork, r as registerShutdownParticipant } from "../../shutdown-Bi19vH0z.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  // src/integrations/jobs/execution.ts
6
6
  async function executeTimedHandler(options) {
@@ -4,8 +4,8 @@ import { l as PermissionCheck } from "../../base-HXNgPQww.mjs";
4
4
  import { F as ResourceDefinition, Gn as ServerAccessor, Hn as IRequestContext, Vn as IControllerResponse } from "../../index-Cy2-QffW.mjs";
5
5
  import { n as FieldPermissionMap } from "../../fields-JTkrtO-r.mjs";
6
6
  import "../../resourceRateLimit-DCWglD7V.mjs";
7
- 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, v as ToolInputSchema } from "../../types-DeLiuaNv.mjs";
8
- import { i as resolveToolCollisions, n as McpServerInstance, r as createMcpServer, t as AuthRef } from "../../createMcpServer-DzXHX0SO.mjs";
7
+ import { _ as ToolDefinition, a as CrudDescriptionOverride, c as McpAuthResult, d as McpResourceConfig, f as McpToolLogger, g as ToolContext, h as ToolAnnotations, i as CrudDescriptionMeta, l as McpExecutionWiring, m as PromptResult, n as CallToolResult, o as CrudOperation, p as PromptDefinition, r as CreateMcpServerConfig, s as McpAuthResolver, t as BetterAuthHandler, u as McpPluginOptions, v as ToolInputSchema } from "../../types-DduBiYaI.mjs";
8
+ import { i as resolveToolCollisions, n as McpServerInstance, r as createMcpServer, t as AuthRef } from "../../createMcpServer-hSFeqRUb.mjs";
9
9
  import { ErrorContract } from "@classytic/repo-core/errors";
10
10
  import { FastifyPluginAsync } from "fastify";
11
11
  import { z } from "zod";
@@ -422,34 +422,6 @@ export declare function invokeController(controller: unknown, op: McpOperation,
422
422
  * ```
423
423
  */
424
424
  export declare function mcpHandlerAdapter<TSession = McpAuthResult>(fn: (input: Record<string, unknown>, ctx: ToolContext<TSession>) => Promise<unknown>): ToolDefinition<TSession>["handler"];
425
- declare class McpSessionCache {
426
- private sessions;
427
- private ttlMs;
428
- private maxSessions;
429
- private cleanupTimer;
430
- constructor(opts?: {
431
- ttlMs?: number;
432
- maxSessions?: number;
433
- });
434
- /** Get an existing session by ID */
435
- get(sessionId: string): SessionEntry | undefined;
436
- /** Store a new session */
437
- set(sessionId: string, entry: SessionEntry): void;
438
- /** Refresh the TTL on a session */
439
- touch(sessionId: string): void;
440
- /** Remove and close a session */
441
- remove(sessionId: string): void;
442
- /** Remove all expired sessions */
443
- cleanup(): void;
444
- /** Close all sessions and stop cleanup timer */
445
- close(): void;
446
- /** Current session count */
447
- get size(): number;
448
- /** Evict the oldest (least recently accessed) session */
449
- private evictOldest;
450
- /** Safely close a transport */
451
- private closeTransport;
452
- }
453
425
  /**
454
426
  * Per-prefix MCP registration info. A single fastify instance can register
455
427
  * mcpPlugin multiple times under different prefixes (e.g. `/mcp/catalog`,
@@ -457,19 +429,15 @@ declare class McpSessionCache {
457
429
  * setups can inspect any endpoint's tool list, not just the first one.
458
430
  */
459
431
  interface McpRegistration {
460
- sessions: McpSessionCache | null;
461
432
  toolNames: string[];
462
433
  resourceNames: string[];
463
- stateful: boolean;
464
434
  }
465
435
  interface McpDecorator {
466
436
  /** Map of prefix → registration info. Iterate for all endpoints. */
467
437
  registrations: Map<string, McpRegistration>;
468
438
  /** Shortcut for the first registered prefix (back-compat for single-endpoint apps) */
469
- readonly sessions: McpSessionCache | null;
470
439
  readonly toolNames: string[];
471
440
  readonly resourceNames: string[];
472
- readonly stateful: boolean;
473
441
  /** Look up a specific prefix */
474
442
  get(prefix: string): McpRegistration | undefined;
475
443
  }
@@ -627,4 +595,4 @@ export declare function permissionDeniedResult(args: {
627
595
  reason?: string;
628
596
  session: McpAuthResult | null;
629
597
  }): CallToolResult;
630
- export { type AuthRef, type BetterAuthHandler, type BuildMcpToolsFromBridgesOptions, type CallToolResult, type CreateMcpAuthFromBetterAuthApiKeyOptions, type CreateMcpServerConfig, type CrudDescriptionMeta, type CrudDescriptionOverride, type CrudOperation, type DefinePromptConfig, type DefineToolConfig, type DispatchOptions, type FieldRuleEntry, type FieldRulesToZodOptions, type InvokeControllerOptions, type McpAuthResolver, type McpAuthResult, type McpBridge, type McpContextExtras, type McpGuard, type McpOperation, type McpPluginOptions, type McpResourceConfig, type McpServerInstance, type PromptDefinition, type PromptResult, type RealtimeToolCall, type RealtimeToolResponse, type ResourceToToolsConfig, type ToolAnnotations, type ToolContext, type ToolDefinition, type ToolInputSchema, createMcpServer, resolveToolCollisions };
598
+ export { type AuthRef, type BetterAuthHandler, type BuildMcpToolsFromBridgesOptions, type CallToolResult, type CreateMcpAuthFromBetterAuthApiKeyOptions, type CreateMcpServerConfig, type CrudDescriptionMeta, type CrudDescriptionOverride, type CrudOperation, type DefinePromptConfig, type DefineToolConfig, type DispatchOptions, type FieldRuleEntry, type FieldRulesToZodOptions, type InvokeControllerOptions, type McpAuthResolver, type McpAuthResult, type McpBridge, type McpContextExtras, type McpGuard, type McpOperation, type McpPluginOptions, type McpResourceConfig, type McpServerInstance, type McpToolLogger, type PromptDefinition, type PromptResult, type RealtimeToolCall, type RealtimeToolResponse, type ResourceToToolsConfig, type ToolAnnotations, type ToolContext, type ToolDefinition, type ToolInputSchema, createMcpServer, resolveToolCollisions };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { _ as resolveToolCollisions, a as toolInputShape, c as resolveCrudDescription, d as permissionDeniedResult, f as toCallToolError, g as createMcpServer, h as buildRequestContext, i as isZodTypeSchema, l as invokeController, m as toCallToolSuccess, n as mcpPlugin, o as fieldRulesToZod, p as toCallToolResult, r as resourceToTools, s as defaultCrudDescription, t as filterResourcesForMcp, u as mcpHandlerAdapter } from "../../mcpPlugin-4lIPr9OJ.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { _ as createMcpServer, a as isZodTypeSchema, c as defaultCrudDescription, d as mcpHandlerAdapter, f as permissionDeniedResult, g as buildRequestContext, h as toCallToolSuccess, i as resourceToTools, l as resolveCrudDescription, m as toCallToolResult, n as filterResourcesForMcp, o as toolInputShape, p as toCallToolError, r as mcpPlugin, s as fieldRulesToZod, u as invokeController, v as resolveToolCollisions } from "../../mcpPlugin-DQACaqVu.mjs";
3
3
  // src/integrations/mcp/defineTool.ts
4
4
  /**
5
5
  * Define a type-safe MCP tool.
@@ -1,25 +1,22 @@
1
1
 
2
- import { c as McpAuthResult, u as McpPluginOptions } from "../../types-DeLiuaNv.mjs";
3
- import { n as McpServerInstance } from "../../createMcpServer-DzXHX0SO.mjs";
2
+ import { c as McpAuthResult, u as McpPluginOptions } from "../../types-DduBiYaI.mjs";
3
+ import { n as McpServerInstance } from "../../createMcpServer-hSFeqRUb.mjs";
4
4
  import { Client } from "@modelcontextprotocol/client";
5
- /** An MCP client bound to a live loopback server, plus its teardown. */
5
+ /** An MCP client bound to a server, plus its teardown. */
6
6
  export interface ConnectedMcpTestClient {
7
7
  /** The connected SDK client — full `listTools` / `callTool` / `listPrompts` surface. */
8
8
  client: Client;
9
- /** Closes the client and the HTTP server. Always await it. */
9
+ /** Closes the client and the server's connection. Always await it. */
10
10
  close: () => Promise<void>;
11
11
  }
12
12
  /**
13
- * Serve an already-built `McpServer` on an ephemeral loopback port and connect
14
- * a client to it.
13
+ * Connect a 2026-07-28 client to an already-built `McpServer`.
15
14
  *
16
15
  * Split out from {@link createTestMcpClient} because arc's own MCP suites build
17
- * a server directly and only need the connection — five of them had each grown a
18
- * private copy of the same connect helper against the v1 in-memory transport.
19
- * One implementation, two entry points: this for a server you built, that for
20
- * one built from resources.
16
+ * a server directly and only need the connection. The server serves this one
17
+ * connection; build a fresh one per test.
21
18
  */
22
- export declare function connectMcpTestClient(server: McpServerInstance | unknown): Promise<ConnectedMcpTestClient>;
19
+ export declare function connectMcpTestClient(server: McpServerInstance): Promise<ConnectedMcpTestClient>;
23
20
  export interface TestMcpClientOptions {
24
21
  /** MCP plugin options (resources, overrides, etc.) — same as mcpPlugin config */
25
22
  pluginOptions?: Pick<McpPluginOptions, "resources" | "overrides" | "expose" | "exclude" | "toolNamePrefix" | "extraTools" | "extraPrompts" | "instructions">;
@@ -46,10 +43,9 @@ export interface TestMcpClient {
46
43
  close(): Promise<void>;
47
44
  }
48
45
  /**
49
- * Create an in-process MCP test client connected to an Arc MCP server.
50
- *
51
- * Pass resources and tools directly — no running Fastify server needed.
52
- * For HTTP-level integration tests against a running server, use `app.inject()` instead.
46
+ * Create a 2026-07-28 MCP test client connected, in memory, to an Arc MCP
47
+ * server built from resources. No Fastify app needed; for plugin-level
48
+ * behaviour use `app.inject()`.
53
49
  *
54
50
  * @example
55
51
  * ```typescript
@@ -1,63 +1,43 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { g as createMcpServer, r as resourceToTools, t as filterResourcesForMcp } from "../../mcpPlugin-4lIPr9OJ.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { _ as createMcpServer, i as resourceToTools, n as filterResourcesForMcp, t as MCP_PROTOCOL_VERSION } from "../../mcpPlugin-DQACaqVu.mjs";
3
3
  // src/integrations/mcp/testing.ts
4
4
  /**
5
- * Serve an already-built `McpServer` on an ephemeral loopback port and connect
6
- * a client to it.
5
+ * Connect a 2026-07-28 client to an already-built `McpServer`.
7
6
  *
8
7
  * Split out from {@link createTestMcpClient} because arc's own MCP suites build
9
- * a server directly and only need the connection — five of them had each grown a
10
- * private copy of the same connect helper against the v1 in-memory transport.
11
- * One implementation, two entry points: this for a server you built, that for
12
- * one built from resources.
8
+ * a server directly and only need the connection. The server serves this one
9
+ * connection; build a fresh one per test.
13
10
  */
14
11
  async function connectMcpTestClient(server) {
15
- const { randomUUID } = await import("node:crypto");
16
- const { createServer } = await import("node:http");
17
- const { NodeStreamableHTTPServerTransport } = await import("@modelcontextprotocol/node");
18
- const { Client, StreamableHTTPClientTransport } = await import("@modelcontextprotocol/client");
19
- const serverTransport = new NodeStreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID() });
20
- await server.connect(serverTransport);
21
- const httpServer = createServer((req, res) => {
22
- serverTransport.handleRequest(req, res);
12
+ const { Client, InMemoryTransport } = await import("@modelcontextprotocol/client");
13
+ const { serveStdio } = await import("@modelcontextprotocol/server/stdio");
14
+ const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
15
+ const handle = serveStdio(() => server, {
16
+ transport: serverTransport,
17
+ legacy: "reject"
23
18
  });
24
- await new Promise((resolve, reject) => {
25
- httpServer.once("error", reject);
26
- httpServer.listen(0, "127.0.0.1", resolve);
27
- });
28
- const address = httpServer.address();
29
- if (address === null || typeof address === "string") {
30
- httpServer.close();
31
- throw new Error("[arc] MCP test harness: HTTP server did not bind a TCP port");
32
- }
33
19
  const client = new Client({
34
20
  name: "test-client",
35
21
  version: "1.0"
36
- });
37
- await client.connect(new StreamableHTTPClientTransport(new URL(`http://127.0.0.1:${address.port}/`)));
22
+ }, { versionNegotiation: { mode: { pin: MCP_PROTOCOL_VERSION } } });
23
+ try {
24
+ await client.connect(clientTransport);
25
+ } catch (err) {
26
+ await handle.close();
27
+ throw err;
28
+ }
38
29
  return {
39
30
  client,
40
- /**
41
- * Client first, THEN the socket. Reversed, the client's in-flight request
42
- * hangs on a dead server until its own timeout — which reads as a slow test
43
- * rather than a teardown bug. `httpServer.close()` only stops NEW
44
- * connections, so keep-alive sockets are destroyed explicitly; without that
45
- * vitest hangs at end-of-file with no failing assertion.
46
- */
47
31
  async close() {
48
32
  await client.close();
49
- httpServer.closeAllConnections?.();
50
- await new Promise((resolve, reject) => {
51
- httpServer.close((err) => err ? reject(err) : resolve());
52
- });
33
+ await handle.close();
53
34
  }
54
35
  };
55
36
  }
56
37
  /**
57
- * Create an in-process MCP test client connected to an Arc MCP server.
58
- *
59
- * Pass resources and tools directly — no running Fastify server needed.
60
- * For HTTP-level integration tests against a running server, use `app.inject()` instead.
38
+ * Create a 2026-07-28 MCP test client connected, in memory, to an Arc MCP
39
+ * server built from resources. No Fastify app needed; for plugin-level
40
+ * behaviour use `app.inject()`.
61
41
  *
62
42
  * @example
63
43
  * ```typescript
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-DnrUChAy.mjs";
3
- import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-Dcgqa-hH.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-DyY48oRi.mjs";
3
+ import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-CPChx3A7.mjs";
4
4
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
5
5
  import fp from "fastify-plugin";
6
6
  // src/integrations/streamline.ts
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-CYCEtU1W.mjs";
3
- import { r as exponentialBackoff } from "../relay-BNrC1CEP.mjs";
4
- import { t as createOutboxModule } from "../outbox-module-DyITEIop.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-ClWr60El.mjs";
3
+ import { r as exponentialBackoff } from "../relay-ZYvS4xyW.mjs";
4
+ import { t as createOutboxModule } from "../outbox-module-C874VgBr.mjs";
5
5
  import { createHmac, timingSafeEqual } from "node:crypto";
6
6
  import fp from "fastify-plugin";
7
7
  import { createChildEvent, matchEventPattern } from "@classytic/primitives/events";
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  // src/integrations/websocket-pushref-redis.ts
3
3
  /**
4
4
  * Lua script for atomic claim. Runs server-side, single-roundtrip.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
2
  // src/integrations/websocket-redis.ts
3
3
  /**
4
4
  * Redis Pub/Sub adapter for cross-instance WebSocket broadcast.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-CYCEtU1W.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-ClWr60El.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import sjson from "secure-json-parse";
5
5
  import fp from "fastify-plugin";