@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,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { o as toJsonSchema } from "./schemaConverter-DtNvts-6.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { o as toJsonSchema } from "./schemaConverter-CIwB5wPO.mjs";
3
3
  // src/core/schemaIR.ts
4
4
  /**
5
5
  * Schema IR — one canonical representation, two adapters.
@@ -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 { errorContractSchema, errorDetailSchema } from "@classytic/repo-core/errors";
3
3
  import { Type, Type as Type$1 } from "typebox";
4
4
  // src/schemas/index.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as parseJsonBody } from "../jsonBody-CzDBkCme.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as parseJsonBody } from "../jsonBody-DZGiCawf.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  // src/scim/errors.ts
5
5
  var ScimError = class extends Error {
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-DZHqOuJE.mjs";
3
- import { t as createTenantKeyGenerator } from "../rateLimitKey-CWAjlqcN.mjs";
4
- import { t as elevation_default } from "../elevation-DrXeEWWk.mjs";
5
- import { t as resolveOrgFromHeader } from "../scope-BwVLSyNG.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-HFFSwF_K.mjs";
3
+ import { t as createTenantKeyGenerator } from "../rateLimitKey-BWx-qep0.mjs";
4
+ import { t as elevation_default } from "../elevation-z--rFcZ5.mjs";
5
+ import { t as resolveOrgFromHeader } from "../scope-VMZhdkbT.mjs";
6
6
  export { AUTHENTICATED_SCOPE, PUBLIC_SCOPE, createTenantKeyGenerator, elevation_default as elevationPlugin, getAncestorOrgIds, getClientId, getDPoPJkt, getMandate, getOrgContext, getOrgId, getOrgRoles, getRequestScope, getScopeContext, getScopeContextMap, getServiceScopes, getTeamId, getTenantFromRequest, getUserId, getUserRoles, hasOrgAccess, isAuthenticated, isElevated, isMember, isOrgInScope, isService, requireClientId, requireOrgId, requireTeamId, requireUserId, resolveOrgFromHeader, scopeFirstCtx };
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-DnrUChAy.mjs";
3
- import { n as requireSingleHeaderValue } from "./headers-KxhrKevA.mjs";
4
- import { n as getUserRoles } from "./userHelpers-_eGj6kf0.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-DyY48oRi.mjs";
3
+ import { n as requireSingleHeaderValue } from "./headers-CHSOqpcY.mjs";
4
+ import { n as getUserRoles } from "./userHelpers-N-k-8dNF.mjs";
5
5
  // src/scope/resolveOrgFromHeader.ts
6
6
  /**
7
7
  * Create a preHandler hook that resolves org scope from a header.
@@ -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 { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/utils/shutdown.ts
4
4
  /** Stop admissions across every runtime before draining work and disposing domain engines. */
@@ -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/utils/simpleEqualityMatcher.ts
3
3
  /**
4
4
  * `simpleEqualityMatcher` — a minimal, dialect-agnostic flat-key equality
@@ -1,10 +1,10 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-yH2lHMo_.mjs";
3
- import { t as arcLog } from "./logger-C110X5Yz.mjs";
4
- import { g as getUserId, n as PUBLIC_SCOPE } from "./types-DZHqOuJE.mjs";
5
- import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-COrhjPRZ.mjs";
6
- import { a as promoteStreamTokenToHeader } from "./streaming-Dcgqa-hH.mjs";
7
- import { t as openSseStream } from "./sseStream-BjSo9Ult.mjs";
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 { g as getUserId, n as PUBLIC_SCOPE } from "./types-HFFSwF_K.mjs";
5
+ import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-BoWImS3K.mjs";
6
+ import { a as promoteStreamTokenToHeader } from "./streaming-CPChx3A7.mjs";
7
+ import { t as openSseStream } from "./sseStream-qSa-F2Qm.mjs";
8
8
  import fp from "fastify-plugin";
9
9
  // src/plugins/sse.ts
10
10
  var sse_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { n as forwardedStreamHeaders } from "./streaming-Dcgqa-hH.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { n as forwardedStreamHeaders } from "./streaming-CPChx3A7.mjs";
3
3
  // src/utils/sseStream.ts
4
4
  /**
5
5
  * Take over the reply socket and open an SSE stream. Call ONLY after every
@@ -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/utils/store-helpers.ts
3
3
  /**
4
4
  * Classify an error thrown by `getOne` / `getById` / `update` as a
@@ -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 { Readable } from "node:stream";
3
3
  // src/utils/streaming.ts
4
4
  /**
@@ -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/subscriberIdentity.ts
3
3
  const SUBSCRIBER_ID = Symbol.for("@classytic/arc/subscriber-id");
4
4
  /** Assign a deployment-stable identity for durable per-handler progress; never use an index. */
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { b as isElevated, c as getOrgId } from "./types-DZHqOuJE.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { b as isElevated, c as getOrgId } from "./types-HFFSwF_K.mjs";
3
3
  // src/core/tenancy.ts
4
4
  function eventAudienceOf(scope) {
5
5
  const tenancy = resolveTenancy({ _scope: scope }, "organizationId");
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as conjoinPolicyFilters } from "./filter-merge-6kasezRH.mjs";
3
- import { d as createDomainError } from "./errors-DnrUChAy.mjs";
4
- import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-DZHqOuJE.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as conjoinPolicyFilters } from "./filter-merge-8glLr7Dk.mjs";
3
+ import { d as createDomainError } from "./errors-DyY48oRi.mjs";
4
+ import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-HFFSwF_K.mjs";
5
5
  // src/permissions/tenantPreparation.ts
6
6
  /** Tenant preparation shared by HTTP middleware and direct transport invocation. */
7
7
  const PREPARATION = Symbol.for("arc.tenantPreparation");
@@ -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 { afterAll, beforeAll, describe, expect, it } from "vitest";
3
3
  // src/testing/cleanupStoreContract.ts
4
4
  /**
@@ -1,13 +1,13 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as CRUD_OPERATIONS } from "../constants-Cx7BcnHT.mjs";
3
- import { f as BaseController } from "../plugin-Bn4D_0XK.mjs";
4
- import { g as getUserId } from "../types-DZHqOuJE.mjs";
5
- import { t as defineAggregation } from "../defineAggregation-CFNfvz-C.mjs";
6
- import { t as defineResource } from "../defineResource-BROJmhzJ.mjs";
7
- import { E as requireOrgRole } from "../permissions-BBy4bOGi.mjs";
8
- import { h as asModulePorts, r as createApp } from "../createApp-QDP4vYWH.mjs";
9
- import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-DDIGwuxr.mjs";
10
- import { n as getModuleExports } from "../module-BD8xHgrz.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as CRUD_OPERATIONS } from "../constants-D-faL5SX.mjs";
3
+ import { f as BaseController } from "../plugin-BJcVOX5r.mjs";
4
+ import { g as getUserId } from "../types-HFFSwF_K.mjs";
5
+ import { t as defineAggregation } from "../defineAggregation-DH2L6_v9.mjs";
6
+ import { t as defineResource } from "../defineResource-zYCrhNaN.mjs";
7
+ import { E as requireOrgRole } from "../permissions-R9T2G1PH.mjs";
8
+ import { h as asModulePorts, r as createApp } from "../createApp-CjqhkX1x.mjs";
9
+ import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-C0gkeABY.mjs";
10
+ import { n as getModuleExports } from "../module-BqPJpZ_L.mjs";
11
11
  import { runStorageContract } from "./storageContract.mjs";
12
12
  import Fastify from "fastify";
13
13
  import { afterAll, describe, expect, it, vi } from "vitest";
@@ -1566,7 +1566,7 @@ function pickDefaultAuth(authMode, callerAuth) {
1566
1566
  };
1567
1567
  }
1568
1568
  async function createTestApp(options = {}) {
1569
- const { createApp } = await import("../createApp-QDP4vYWH.mjs").then((n) => n.i);
1569
+ const { createApp } = await import("../createApp-CjqhkX1x.mjs").then((n) => n.i);
1570
1570
  const { resources = [], db = "in-memory", connectMongoose = false, authMode = "jwt", defaultOrgId, plugins, auth: callerAuth, ...appOptions } = options;
1571
1571
  let dbHandle;
1572
1572
  let dbUri;
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as claimedAttempts } from "../claimed-BLecr1j3.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as claimedAttempts } from "../claimed-D0A43wjT.mjs";
3
3
  import { OutboxConflictError, OutboxOwnershipError } from "@classytic/primitives/outbox";
4
4
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
5
5
  // src/testing/outboxStoreContract.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { c as declareModules, d as resolveModule, i as planModules, r as compositionProblems } from "../plan-DDIGwuxr.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { c as declareModules, d as resolveModule, i as planModules, r as compositionProblems } from "../plan-C0gkeABY.mjs";
3
3
  // src/testing/requiredPorts.ts
4
4
  /**
5
5
  * Assert a module declares EXACTLY `ports` as required, and that composing it without any one of
@@ -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 { afterAll, beforeAll, describe, expect, it } from "vitest";
3
3
  // src/testing/storageContract.ts
4
4
  /**
@@ -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 { createHash } from "node:crypto";
3
3
  // src/utils/operationIdentity.ts
4
4
  /** Security context included in idempotency identities across transports. */
@@ -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 { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/context/transactionContext.ts
4
4
  /**
@@ -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/utils/typeGuards.ts
3
3
  /** Check if fastify has the events plugin registered */
4
4
  function hasEvents(instance) {
@@ -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,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 {};
@@ -37,7 +37,11 @@ interface ToolAnnotations {
37
37
  interface ToolContext<TSession = McpAuthResult> {
38
38
  /** Session identity — `null` in no-auth mode */
39
39
  session: TSession | null;
40
- /** Log to MCP client (best-effort, non-blocking) */
40
+ /**
41
+ * Server-side log line, tagged with the tool name — the host logger
42
+ * (`fastify.log` under `mcpPlugin`), a no-op without one. Never sent to the
43
+ * client: MCP 2026-07-28 deprecates protocol logging (SEP-2577).
44
+ */
41
45
  log: (level: "info" | "warning" | "error" | "debug", message: string) => Promise<void>;
42
46
  /** Raw MCP SDK extra context (for advanced use) */
43
47
  extra: Record<string, unknown>;
@@ -373,19 +377,9 @@ interface McpPluginOptions {
373
377
  /** Custom prompts */
374
378
  extraPrompts?: PromptDefinition[];
375
379
  /**
376
- * Session mode:
377
- * - `false` (default) — stateless, fresh server per request. Best for production, scaling, serverless.
378
- * - `true` — stateful, sessions cached with TTL. Use for server-initiated notifications or long-lived connections.
379
- */
380
- stateful?: boolean;
381
- /** Session TTL in ms (default: 1800000 = 30 min). Only used when stateful: true. */
382
- sessionTtlMs?: number;
383
- /** Max concurrent sessions (default: 1000). Only used when stateful: true. */
384
- maxSessions?: number;
385
- /**
386
- * Auth cache TTL in ms for stateless mode (default: 5000 = 5 sec).
387
- * Caches auth resolver results briefly to avoid redundant DB lookups
388
- * across initialize → tools/list → tools/call sequences.
380
+ * Auth cache TTL in ms (default: 5000 = 5 sec). Every MCP request is
381
+ * authenticated, so this spares the resolver repeated DB lookups across a
382
+ * client's `server/discover` → `tools/list` → `tools/call` burst.
389
383
  * Set to `0` to disable.
390
384
  */
391
385
  authCacheTtlMs?: number;
@@ -451,20 +445,6 @@ interface McpAuthResult {
451
445
  /** Any extra metadata from the auth resolver */
452
446
  [key: string]: unknown;
453
447
  }
454
- /** Internal session entry */
455
- interface SessionEntry {
456
- transport: {
457
- handleRequest: (req: unknown, res: unknown, body?: unknown) => Promise<void>;
458
- close: () => void;
459
- };
460
- lastAccessed: number;
461
- organizationId: string;
462
- auth: McpAuthResult | null;
463
- /** Mutable ref updated per-request — tool handler closures read from this */
464
- authRef: {
465
- current: McpAuthResult | null;
466
- };
467
- }
468
448
  /**
469
449
  * Configuration for createMcpServer() — Level 2 declarative factory.
470
450
  *
@@ -490,7 +470,16 @@ interface CreateMcpServerConfig {
490
470
  instructions?: string;
491
471
  tools?: ToolDefinition[];
492
472
  prompts?: PromptDefinition[];
473
+ /** Sink for tools' `ctx.log` — pino-shaped (`fastify.log` fits). Omitted: `ctx.log` is a no-op. */
474
+ logger?: McpToolLogger;
475
+ }
476
+ /** The pino-shaped subset `ctx.log` writes through. */
477
+ interface McpToolLogger {
478
+ info(obj: object, msg: string): void;
479
+ warn(obj: object, msg: string): void;
480
+ error(obj: object, msg: string): void;
481
+ debug(obj: object, msg: string): void;
493
482
  }
494
483
  /** CRUD operation type */
495
484
  type CrudOperation = "list" | "get" | "create" | "update" | "delete";
496
- export { ToolDefinition as _, CrudDescriptionOverride as a, McpAuthResult as c, McpResourceConfig as d, PromptDefinition as f, ToolContext as g, ToolAnnotations as h, CrudDescriptionMeta as i, McpExecutionWiring as l, SessionEntry as m, CallToolResult as n, CrudOperation as o, PromptResult as p, CreateMcpServerConfig as r, McpAuthResolver as s, BetterAuthHandler as t, McpPluginOptions as u, ToolInputSchema as v };
485
+ export { ToolDefinition as _, CrudDescriptionOverride as a, McpAuthResult as c, McpResourceConfig as d, McpToolLogger as f, ToolContext as g, ToolAnnotations as h, CrudDescriptionMeta as i, McpExecutionWiring as l, PromptResult as m, CallToolResult as n, CrudOperation as o, PromptDefinition as p, CreateMcpServerConfig as r, McpAuthResolver as s, BetterAuthHandler as t, McpPluginOptions as u, ToolInputSchema as v };
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-DnrUChAy.mjs";
3
- import { n as requireSingleHeaderValue } from "./headers-KxhrKevA.mjs";
4
- import { t as getUserId$1 } from "./userHelpers-_eGj6kf0.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-DyY48oRi.mjs";
3
+ import { n as requireSingleHeaderValue } from "./headers-CHSOqpcY.mjs";
4
+ import { t as getUserId$1 } from "./userHelpers-N-k-8dNF.mjs";
5
5
  // src/scope/types.ts
6
6
  /**
7
7
  * Request Scope — The One Standard
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { t as ArcError } from "../errors-DnrUChAy.mjs";
3
- import { c as getOrgId, g as getUserId, i as getClientId } from "../types-DZHqOuJE.mjs";
4
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-CYCEtU1W.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "../errors-DyY48oRi.mjs";
3
+ import { c as getOrgId, g as getUserId, i as getClientId } from "../types-HFFSwF_K.mjs";
4
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-ClWr60El.mjs";
5
5
  import { usagePeriod } from "@classytic/repo-core/usage";
6
6
  import fp from "fastify-plugin";
7
7
  // src/usage/requireQuota.ts
@@ -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/utils/userHelpers.ts
3
3
  /**
4
4
  * Extract a user ID from a user object. Accepts `id` or `_id` — returns
@@ -1,13 +1,13 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { a as OrgAccessDeniedError, c as ServiceUnavailableError, d as createDomainError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-DnrUChAy.mjs";
3
- import { t as simpleEqualityMatcher } from "../simpleEqualityMatcher-DGRLq-1k.mjs";
4
- import { n as requireSingleHeaderValue, t as getHeader } from "../headers-KxhrKevA.mjs";
5
- import { n as getUserRoles, r as normalizeRoles, t as getUserId } from "../userHelpers-_eGj6kf0.mjs";
6
- import { C as paginationSchema, D as createQueryParser, E as ArcQueryParser, O as MONGO_DIALECT, S as offsetListResponse, T as responses, _ as errorContractSchema, a as defineCompensation, b as keysetListResponse, c as CircuitBreaker, d as CircuitState, f as createCircuitBreaker, g as deleteResponse, h as bareListResponse, i as defineErrorMapper, k as NEUTRAL_DIALECT, l as CircuitBreakerError, m as aggregateListResponse, n as handleRaw, o as withCompensation, p as createCircuitBreakerRegistry, r as defineGuard, s as RedisCircuitBreakerState, t as createStateMachine, u as CircuitBreakerRegistry, v as getDefaultCrudSchemas, w as queryParams, x as listResponse, y as getListQueryParams } from "../utils-Dd6MWpye.mjs";
7
- import { a as isZodSchema, i as isJsonSchema, n as convertRouteSchema, o as toJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-DtNvts-6.mjs";
8
- import { a as promoteStreamTokenToHeader, i as pipeUIMessageStreamToReply, n as forwardedStreamHeaders, r as isReadableStream, t as UI_MESSAGE_STREAM_HEADERS } from "../streaming-Dcgqa-hH.mjs";
9
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-CYCEtU1W.mjs";
10
- import { i as runAdmittedWork, r as registerShutdownParticipant } from "../shutdown-BJiJN7FT.mjs";
11
- import { t as openSseStream } from "../sseStream-BjSo9Ult.mjs";
12
- import { t as hasEvents } from "../typeGuards-DVjVSsXO.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { a as OrgAccessDeniedError, c as ServiceUnavailableError, d as createDomainError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-DyY48oRi.mjs";
3
+ import { t as simpleEqualityMatcher } from "../simpleEqualityMatcher-CaCS09fh.mjs";
4
+ import { n as requireSingleHeaderValue, t as getHeader } from "../headers-CHSOqpcY.mjs";
5
+ import { n as getUserRoles, r as normalizeRoles, t as getUserId } from "../userHelpers-N-k-8dNF.mjs";
6
+ import { C as paginationSchema, D as createQueryParser, E as ArcQueryParser, O as MONGO_DIALECT, S as offsetListResponse, T as responses, _ as errorContractSchema, a as defineCompensation, b as keysetListResponse, c as CircuitBreaker, d as CircuitState, f as createCircuitBreaker, g as deleteResponse, h as bareListResponse, i as defineErrorMapper, k as NEUTRAL_DIALECT, l as CircuitBreakerError, m as aggregateListResponse, n as handleRaw, o as withCompensation, p as createCircuitBreakerRegistry, r as defineGuard, s as RedisCircuitBreakerState, t as createStateMachine, u as CircuitBreakerRegistry, v as getDefaultCrudSchemas, w as queryParams, x as listResponse, y as getListQueryParams } from "../utils-C7w_RVlx.mjs";
7
+ import { a as isZodSchema, i as isJsonSchema, n as convertRouteSchema, o as toJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-CIwB5wPO.mjs";
8
+ import { a as promoteStreamTokenToHeader, i as pipeUIMessageStreamToReply, n as forwardedStreamHeaders, r as isReadableStream, t as UI_MESSAGE_STREAM_HEADERS } from "../streaming-CPChx3A7.mjs";
9
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-ClWr60El.mjs";
10
+ import { i as runAdmittedWork, r as registerShutdownParticipant } from "../shutdown-Bi19vH0z.mjs";
11
+ import { t as openSseStream } from "../sseStream-qSa-F2Qm.mjs";
12
+ import { t as hasEvents } from "../typeGuards-DNlpASzd.mjs";
13
13
  export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, MONGO_DIALECT, NEUTRAL_DIALECT, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, RedisCircuitBreakerState, ServiceUnavailableError, UI_MESSAGE_STREAM_HEADERS, UnauthorizedError, ValidationError, aggregateListResponse, bareListResponse, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createDomainError, createError, createQueryParser, createStateMachine, declareRuntimeCapability, defineCompensation, defineErrorMapper, defineGuard, deleteResponse, errorContractSchema, forwardedStreamHeaders, getDefaultCrudSchemas, getHeader, getListQueryParams, getUserId, getUserRoles, handleRaw, hasEvents, isArcError, isJsonSchema, isReadableStream, isZodSchema, keysetListResponse, listResponse, normalizeRoles, offsetListResponse, openSseStream, paginationSchema, pipeUIMessageStreamToReply, promoteStreamTokenToHeader, queryParams, registerShutdownParticipant, requireSingleHeaderValue, responses, runAdmittedWork, simpleEqualityMatcher, toJsonSchema, withCompensation };
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { h as RESERVED_QUERY_PARAMS } from "./constants-Cx7BcnHT.mjs";
3
- import { t as arcLog } from "./logger-C110X5Yz.mjs";
4
- import { t as ArcError, u as ValidationError } from "./errors-DnrUChAy.mjs";
5
- import { t as runObservingSend } from "./observeSend-BnPtTotW.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { h as RESERVED_QUERY_PARAMS } from "./constants-D-faL5SX.mjs";
3
+ import { t as arcLog } from "./logger-VyMcSmVG.mjs";
4
+ import { t as ArcError, u as ValidationError } from "./errors-DyY48oRi.mjs";
5
+ import { t as runObservingSend } from "./observeSend-BKJHibJz.mjs";
6
6
  import { errorContractSchema as errorContractSchema$1 } from "@classytic/repo-core/errors";
7
7
  import { readEnv } from "@classytic/primitives/environment";
8
8
  import { OPERATOR_DESCRIPTIONS, URL_OPERATORS, escapeRegex, isQueryGrammarError, readFilterClauses, readPageRequest, readSearch, readSelect, readSort } from "@classytic/repo-core/query-parser";
@@ -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 { x as pathTouchesBlocked } from "./plugin-Bn4D_0XK.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-BdTN42uL.mjs";
3
+ import { x as pathTouchesBlocked } from "./plugin-BJcVOX5r.mjs";
4
4
  // src/core/aggregation/normalize.ts
5
5
  /**
6
6
  * Framework cap on URL-driven aggregation limits when the host opts
@@ -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 { d as createDomainError } 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 { d as createDomainError } from "./errors-DyY48oRi.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  // src/plugins/versioning.ts
6
6
  var versioning_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
2
- import { n as requestContext } from "./requestContext-fWb_YaV2.mjs";
1
+ /*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
2
+ import { n as requestContext } from "./requestContext-Ct5la-SA.mjs";
3
3
  // src/context/workScope.ts
4
4
  /** Enter a scope for `fn`, or run it inside the active one. */
5
5
  function runWorkScope(seed, fn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classytic/arc",
3
- "version": "2.47.0",
3
+ "version": "2.48.0",
4
4
  "description": "Resource-oriented backend framework for Fastify - clean, minimal, powerful, tree-shakable",
5
5
  "type": "module",
6
6
  "exports": {
@@ -379,7 +379,7 @@
379
379
  },
380
380
  "peerDependencies": {
381
381
  "@classytic/primitives": ">=0.35.0",
382
- "@classytic/repo-core": ">=0.34.0",
382
+ "@classytic/repo-core": ">=0.35.0",
383
383
  "@classytic/streamline": ">=2.12.0",
384
384
  "@fastify/cors": ">=11.0.0",
385
385
  "@fastify/helmet": ">=13.0.0",
@@ -391,9 +391,9 @@
391
391
  "@fastify/type-provider-typebox": ">=6.0.0",
392
392
  "@fastify/under-pressure": ">=9.0.0",
393
393
  "@fastify/websocket": ">=11.0.0",
394
- "@modelcontextprotocol/client": ">=2.0.0",
395
- "@modelcontextprotocol/node": ">=2.0.0",
396
- "@modelcontextprotocol/server": ">=2.0.0",
394
+ "@modelcontextprotocol/client": ">=2.4.0",
395
+ "@modelcontextprotocol/node": ">=2.1.2",
396
+ "@modelcontextprotocol/server": ">=2.4.0",
397
397
  "@opentelemetry/api": ">=1.9.0",
398
398
  "@opentelemetry/auto-instrumentations-node": ">=0.40.0",
399
399
  "@opentelemetry/exporter-trace-otlp-http": ">=0.50.0",
@@ -401,7 +401,7 @@
401
401
  "@opentelemetry/instrumentation-mongodb": ">=0.40.0",
402
402
  "@opentelemetry/sdk-node": ">=0.50.0",
403
403
  "better-auth": ">=1.7.14",
404
- "bullmq": ">=6.5.0",
404
+ "bullmq": ">=6.5.1",
405
405
  "fastify": ">=5.12.7",
406
406
  "fastify-raw-body": ">=6.0.3",
407
407
  "h3-js": ">=4.0.0",
@@ -514,10 +514,10 @@
514
514
  "@classytic/dev-tools": "^0.2.1",
515
515
  "@classytic/gitkit": ">=0.3.0",
516
516
  "@classytic/mongokit": "^3.43.1",
517
- "@classytic/pgkit": "^0.1.0",
517
+ "@classytic/pgkit": "^0.1.1",
518
518
  "@classytic/primitives": "^0.35.0",
519
- "@classytic/repo-core": "^0.34.0",
520
- "@classytic/sqlitekit": "^0.11.0",
519
+ "@classytic/repo-core": "^0.35.0",
520
+ "@classytic/sqlitekit": "^0.12.0",
521
521
  "@classytic/streamline": "^2.12.0",
522
522
  "@electric-sql/pglite": "^0.5.10",
523
523
  "@fastify/cors": "^11.3.1",
@@ -530,9 +530,9 @@
530
530
  "@fastify/type-provider-typebox": "^6.3.0",
531
531
  "@fastify/under-pressure": "^9.2.1",
532
532
  "@fastify/websocket": "^11.3.4",
533
- "@modelcontextprotocol/client": "^2.3.1",
534
- "@modelcontextprotocol/node": "^2.1.1",
535
- "@modelcontextprotocol/server": "^2.3.1",
533
+ "@modelcontextprotocol/client": "^2.4.0",
534
+ "@modelcontextprotocol/node": "^2.1.2",
535
+ "@modelcontextprotocol/server": "^2.4.0",
536
536
  "@opentelemetry/api": "^1.9.1",
537
537
  "@types/node": "^26.6.5",
538
538
  "@types/qs": "^6.15.1",
@@ -540,7 +540,7 @@
540
540
  "ajv": "^8.20.0",
541
541
  "better-auth": "^1.7.14",
542
542
  "better-sqlite3": "^13.0.3",
543
- "bullmq": "^6.5.0",
543
+ "bullmq": "^6.5.1",
544
544
  "dotenv": "^18.0.8",
545
545
  "drizzle-orm": "^0.45.4",
546
546
  "fast-check": "^4.10.2",
@@ -555,9 +555,9 @@
555
555
  "mongodb-memory-server": "^11.3.0",
556
556
  "mongoose": "^9.11.4",
557
557
  "publint": "^0.3.25",
558
- "tsdown": "^0.23.2",
558
+ "tsdown": "^0.23.3",
559
559
  "typebox": "^1.4.2",
560
- "typescript": "7.1.0-beta",
560
+ "typescript": "~7.0.2",
561
561
  "vitest": "^5.0.5",
562
562
  "ws": "^8.22.0",
563
563
  "zod": "^4.6.7"
@@ -590,13 +590,5 @@
590
590
  "repository": {
591
591
  "type": "git",
592
592
  "url": "git+https://github.com/classytic/arc.git"
593
- },
594
- "overrides": {
595
- "tsdown": {
596
- "typescript": "$typescript"
597
- },
598
- "@arethetypeswrong/core": {
599
- "typescript": "5.6.1-rc"
600
- }
601
593
  }
602
594
  }
@@ -35,7 +35,7 @@ await app.register(mcpPlugin, { resources, extraTools: [notifyTool], extraPrompt
35
35
  const server = await createMcpServer({ name: 'tools', version: '1.0.0', tools: [notifyTool], prompts: [planPrompt] });
36
36
  ```
37
37
 
38
- - `ToolContext`: `{ session, log(level, msg), extra }`. `session` is the `McpAuthResult` or `null` (no auth).
38
+ - `ToolContext`: `{ session, log(level, msg), extra }`. `session` is the `McpAuthResult` or `null` (no auth). `log` writes server-side (`fastify.log`, or `createMcpServer({ logger })`), never to the client.
39
39
  - Handler returns `CallToolResult`: `{ content: [{ type: 'text', text }], isError? }`. `toCallToolResult`, `toCallToolSuccess`, `toCallToolError`, `permissionDeniedResult` build it.
40
40
  - `defineTool<MySession>(...)` widens `ctx.session` to a host type extending `McpAuthResult`.
41
41
  - Custom tools bypass resource permissions: guard them explicitly.
@@ -21,11 +21,12 @@ const app = await createApp({
21
21
  |---|---|---|
22
22
  | `list` | `list_{plural}` | `readOnlyHint` |
23
23
  | `get` | `get_{name}` | `readOnlyHint` |
24
- | `create` | `create_{name}` | `destructiveHint: false` |
24
+ | `create` | `create_{name}` | not destructive, not idempotent |
25
25
  | `update`, `delete` | `update_{name}`, `delete_{name}` | `destructiveHint`, `idempotentHint` |
26
26
  | `actions` | `{action}_{name}` (input: `id` + action schema) | `destructiveHint` |
27
- | custom routes (function or string handler) | `{operation or slug}_{name}` | GET: `readOnlyHint`, else `openWorldHint` |
27
+ | custom routes (function or string handler) | `{operation or slug}_{name}` | by HTTP method: GET/HEAD read-only; PUT/DELETE destructive + idempotent; POST/PATCH destructive |
28
28
 
29
+ - CRUD hints are all explicit and include `openWorldHint: false`; an omitted hint means the cautious spec default.
29
30
  - A CRUD op becomes a tool only when `permissions.<op>` is declared and the op is not in `disabledRoutes`.
30
31
  - Tools run the same controller pipeline as REST: auth, tenant scope, permission policy, hooks, field masking, events.
31
32
  - `list_*` accepts `page`, `limit`, `cursor` (keyset; `page` ignored when set), `sort`, `search`, `select`, `populate`, filters. `get_*` accepts `id`, `select`. `limit` max follows the resource `queryParser.maxLimit`.
@@ -46,8 +47,7 @@ const app = await createApp({
46
47
  | `toolNamePrefix` | none | `'crm'` gives `crm_list_products` |
47
48
  | `overrides` | none | Per-resource `McpResourceConfig` |
48
49
  | `extraTools`, `extraPrompts` | none | Hand-written tools/prompts |
49
- | `stateful`, `sessionTtlMs`, `maxSessions` | `false`, 1800000, 1000 | Session mode |
50
- | `authCacheTtlMs` | 5000 | Stateless auth-result cache; `0` disables |
50
+ | `authCacheTtlMs` | 5000 | Auth-result cache; `0` disables |
51
51
  | `dnsRebindingProtection` | on if `auth: false` | See below |
52
52
 
53
53
  ## Per-resource overrides
@@ -95,14 +95,15 @@ mcpPlugin({ resources, auth: false, dnsRebindingProtection: false });
95
95
 
96
96
  Absent `Origin` passes; present-but-unlisted is refused. `${prefix}/health` is exempt.
97
97
 
98
- ## Endpoints and modes
98
+ ## Protocol and endpoints
99
99
 
100
- | Mode | Behavior |
101
- |---|---|
102
- | Stateless (default) | `POST /mcp` fresh server per request; `GET` returns 405; `DELETE` no-op. Use for scaling/serverless |
103
- | `stateful: true` | `POST` reuses `Mcp-Session-Id`; `GET` is SSE; `DELETE` ends session. TTL cache, LRU eviction at `maxSessions` |
100
+ The endpoint speaks MCP **2026-07-28 only** (SDK `createMcpHandler` with 2025 serving off): fresh server per request, no sessions.
104
101
 
105
- - `GET /mcp/health` returns `{ status, mode }`; with valid auth (or `auth: false`) it also returns `tools`, `resources`, `toolNames`, `sessions`.
102
+ - `POST /mcp` serves 2026-07-28. A 2025-era `initialize` gets `400`, JSON-RPC `-32022`, `data.supported: ["2026-07-28"]`.
103
+ - `GET`/`DELETE /mcp` return 405 with `Allow: POST`.
104
+ - `stateful: true` is removed and throws at boot; delete `stateful`, `sessionTtlMs`, `maxSessions`.
105
+ - `ctx.log` writes to `fastify.log` tagged `{ mcpTool }`, never to the client.
106
+ - `GET /mcp/health` returns `{ status, protocolVersion }`; with valid auth (or `auth: false`) it also returns `tools`, `resources`, `toolNames`.
106
107
  - Resources `arc://schemas` and `arc://schemas/{name}` expose resource schemas to agents.
107
108
  - Multiple endpoints: register `mcpPlugin` repeatedly with different `resources` and `prefix`.
108
109