@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.
- package/dist/{EventTransport-BHKy4_Bi.mjs → EventTransport-BWwg5YAU.mjs} +2 -2
- package/dist/{HookSystem-CAIDVoKC.mjs → HookSystem-B9x-Y_k7.mjs} +2 -2
- package/dist/{ResourceRegistry-23Ml6FNe.mjs → ResourceRegistry-BcvEJoZd.mjs} +2 -2
- package/dist/{acquire-DoFX06fm.mjs → acquire-D2yj6Zzl.mjs} +1 -1
- package/dist/{actionPermissions-DXrlWHHK.mjs → actionPermissions-Dha8sAz2.mjs} +13 -13
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.mjs +7 -7
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DYiubkYw.mjs → authorizationDecision-BZSJcPNE.mjs} +4 -4
- package/dist/{boundedMap-CtdzpJ3X.mjs → boundedMap-o2KZDCWy.mjs} +1 -1
- package/dist/{buildHandler-CARdmPNo.mjs → buildHandler-G3k59KY2.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-QRiryDLs.mjs → caching-CJIDPZOv.mjs} +2 -2
- package/dist/{claimed-BLecr1j3.mjs → claimed-D0A43wjT.mjs} +1 -1
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-Cx7BcnHT.mjs → constants-D-faL5SX.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.mjs +7 -7
- package/dist/{core-0WyMuo0f.mjs → core-NSu1peyq.mjs} +3 -3
- package/dist/{createActionRouter-mLAGbpDV.mjs → createActionRouter-DTSVv1VK.mjs} +6 -6
- package/dist/{createAggregationRouter-BEAjn3dA.mjs → createAggregationRouter-zEasm-ax.mjs} +7 -7
- package/dist/{createApp-QDP4vYWH.mjs → createApp-CjqhkX1x.mjs} +29 -29
- package/dist/{createMcpServer-DzXHX0SO.d.mts → createMcpServer-hSFeqRUb.d.mts} +9 -10
- package/dist/{defineAggregation-CFNfvz-C.mjs → defineAggregation-DH2L6_v9.mjs} +1 -1
- package/dist/{defineResource-BROJmhzJ.mjs → defineResource-zYCrhNaN.mjs} +8 -8
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-DrXeEWWk.mjs → elevation-z--rFcZ5.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-BiBXtxj4.mjs → errorHandler-3_3oN-Uc.mjs} +3 -3
- package/dist/{errors-DnrUChAy.mjs → errors-DyY48oRi.mjs} +1 -1
- package/dist/{eventPlugin-BhKLUe7H.mjs → eventPlugin-Co9sABCg.mjs} +8 -8
- package/dist/{eventTypes-CCIRGakw.mjs → eventTypes-HmAFyJmJ.mjs} +2 -2
- package/dist/events/index.mjs +8 -8
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.mjs +6 -6
- package/dist/{fields-CYdpcV73.mjs → fields-rfsl26Ov.mjs} +1 -1
- package/dist/{filter-merge-6kasezRH.mjs → filter-merge-8glLr7Dk.mjs} +1 -1
- package/dist/{generate-DUkcbc4r.mjs → generate-BOfBueRt.mjs} +2 -2
- package/dist/{headers-KxhrKevA.mjs → headers-CHSOqpcY.mjs} +2 -2
- package/dist/{health-CRJg3IIq.mjs → health-DHvAIVmM.mjs} +1 -1
- package/dist/{health-jkYNdobJ.mjs → health-ezwTHQh2.mjs} +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.mjs +4 -4
- package/dist/http-cache/purgers/cloudflare.mjs +2 -2
- package/dist/http-cache/purgers/fastly.mjs +2 -2
- package/dist/http-cache/testing/index.mjs +1 -1
- package/dist/idempotency/index.mjs +7 -7
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/index.mjs +11 -11
- package/dist/{init-CACwpktI.mjs → init-MoE3eZNR.mjs} +1 -1
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.d.mts +1 -1
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.d.mts +3 -35
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +11 -15
- package/dist/integrations/mcp/testing.mjs +22 -42
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.mjs +4 -4
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +2 -2
- package/dist/{jsonBody-CzDBkCme.mjs → jsonBody-DZGiCawf.mjs} +2 -2
- package/dist/{keys-Cbwf6r1B.mjs → keys-CrMOZuk6.mjs} +1 -1
- package/dist/{loadResources-Kr6vuljv.mjs → loadResources-CVQvYUhN.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-D2e0qoDR.mjs → loadResourcesFromEntry-D0naccV2.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-C110X5Yz.mjs → logger-VyMcSmVG.mjs} +1 -1
- package/dist/{mcpPlugin-4lIPr9OJ.mjs → mcpPlugin-DQACaqVu.mjs} +210 -373
- package/dist/{memory-D9qkhXiB.mjs → memory-Lpfu8Hga.mjs} +3 -3
- package/dist/{metrics-B-qrrWfI.mjs → metrics-DjVj1sg5.mjs} +3 -3
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-BD8xHgrz.mjs → module-BqPJpZ_L.mjs} +1 -1
- package/dist/{multipartBody-qU7KCn1l.mjs → multipartBody-BNgNv7r0.mjs} +1 -1
- package/dist/{observeSend-BnPtTotW.mjs → observeSend-BKJHibJz.mjs} +1 -1
- package/dist/{openapi-DoVa5SVP.mjs → openapi-T90KrPR6.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-DyITEIop.mjs → outbox-module-C874VgBr.mjs} +7 -7
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-BBy4bOGi.mjs → permissions-R9T2G1PH.mjs} +9 -9
- package/dist/{pipe-BOm2o4UA.mjs → pipe-DzqbsZy-.mjs} +2 -2
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-DDIGwuxr.mjs → plan-C0gkeABY.mjs} +1 -1
- package/dist/{plugin-Bn4D_0XK.mjs → plugin-BJcVOX5r.mjs} +22 -22
- package/dist/plugins/index.mjs +17 -17
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-ClEjcKlG.mjs → pluralize-CrCpyoZs.mjs} +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.mjs +5 -5
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-DK2jh5YR.mjs → presets-CNDvNYsz.mjs} +4 -4
- package/dist/{projection-BHH-sXyS.mjs → projection-CIUe8b59.mjs} +2 -2
- package/dist/{purger.types-2wNJK_89.mjs → purger.types-f83fTzGy.mjs} +1 -1
- package/dist/{queryCachePlugin-Ckqe98AM.mjs → queryCachePlugin-B2jpwFcv.mjs} +6 -6
- package/dist/{rateLimitKey-CWAjlqcN.mjs → rateLimitKey-BWx-qep0.mjs} +1 -1
- package/dist/{realtime-BIJi9USY.mjs → realtime-D2tqi3d2.mjs} +11 -11
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-y9ZA-R_J.mjs → registry-Dl0k6UXy.mjs} +2 -2
- package/dist/{relay-BNrC1CEP.mjs → relay-ZYvS4xyW.mjs} +4 -4
- package/dist/{renewingLease-CS43br5E.mjs → renewingLease-DT4yLb29.mjs} +1 -1
- package/dist/{replyHelpers-oZDzakGb.mjs → replyHelpers-BJFN5AW7.mjs} +2 -2
- package/dist/{requestContext-fWb_YaV2.mjs → requestContext-Ct5la-SA.mjs} +1 -1
- package/dist/{requirement--2hWyyHi.mjs → requirement-CxDxjB6V.mjs} +1 -1
- package/dist/{resourceRateLimit-1WbcyMZY.mjs → resourceRateLimit-D1oH2obv.mjs} +2 -2
- package/dist/{rolldown-runtime-yH2lHMo_.mjs → rolldown-runtime-BdTN42uL.mjs} +1 -1
- package/dist/{routeValidator-BSlRIA5c.mjs → routeValidator-DclDl5WJ.mjs} +1 -1
- package/dist/{runtimeCapabilities-CYCEtU1W.mjs → runtimeCapabilities-ClWr60El.mjs} +1 -1
- package/dist/{schedules-B5WGlYIT.mjs → schedules-gVkRcs-9.mjs} +5 -5
- package/dist/{schemaConverter-DtNvts-6.mjs → schemaConverter-CIwB5wPO.mjs} +2 -2
- package/dist/{schemaIR-uS_RHqa3.mjs → schemaIR-A0IoD05P.mjs} +2 -2
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-BwVLSyNG.mjs → scope-VMZhdkbT.mjs} +4 -4
- package/dist/{shutdown-BJiJN7FT.mjs → shutdown-Bi19vH0z.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-DGRLq-1k.mjs → simpleEqualityMatcher-CaCS09fh.mjs} +1 -1
- package/dist/{sse-B_50llZu.mjs → sse-BqM359f1.mjs} +7 -7
- package/dist/{sseStream-BjSo9Ult.mjs → sseStream-qSa-F2Qm.mjs} +2 -2
- package/dist/{store-helpers-D-n5cwy5.mjs → store-helpers-rx-F2ZGR.mjs} +1 -1
- package/dist/{streaming-Dcgqa-hH.mjs → streaming-CPChx3A7.mjs} +1 -1
- package/dist/{subscriberIdentity-C9KhIXTF.mjs → subscriberIdentity-CYNYw8p_.mjs} +1 -1
- package/dist/{tenancy-COrhjPRZ.mjs → tenancy-BoWImS3K.mjs} +2 -2
- package/dist/{tenantPreparation-BElWHytd.mjs → tenantPreparation-oqKCZQZM.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.mjs +11 -11
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-CaxKbRk_.mjs → timing-Dsteq59c.mjs} +1 -1
- package/dist/{transactionContext-8qKON0Nk.mjs → transactionContext-C1OgH-hW.mjs} +1 -1
- package/dist/{typeGuards-DVjVSsXO.mjs → typeGuards-DNlpASzd.mjs} +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-DeLiuaNv.d.mts → types-DduBiYaI.d.mts} +18 -29
- package/dist/{types-DZHqOuJE.mjs → types-HFFSwF_K.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-_eGj6kf0.mjs → userHelpers-N-k-8dNF.mjs} +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-Dd6MWpye.mjs → utils-C7w_RVlx.mjs} +5 -5
- package/dist/{validate-BaF5wd0x.mjs → validate-Brr4b_fH.mjs} +3 -3
- package/dist/{versioning-DyV7mwtK.mjs → versioning-CE5kdWOY.mjs} +3 -3
- package/dist/{workScope-CmCBUmPR.mjs → workScope-A3XBpYTa.mjs} +2 -2
- package/package.json +15 -23
- package/skills/arc/references/mcp-custom-tools.md +1 -1
- package/skills/arc/references/mcp-setup.md +11 -10
- package/skills/arc/references/mcp-testing.md +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { o as toJsonSchema } from "./schemaConverter-
|
|
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.
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
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
|
package/dist/scim/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as parseJsonBody } from "../jsonBody-
|
|
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 {
|
package/dist/scope/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
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-
|
|
3
|
-
import { t as createTenantKeyGenerator } from "../rateLimitKey-
|
|
4
|
-
import { t as elevation_default } from "../elevation-
|
|
5
|
-
import { t as resolveOrgFromHeader } from "../scope-
|
|
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.
|
|
2
|
-
import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
4
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
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.
|
|
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,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { g as getUserId, n as PUBLIC_SCOPE } from "./types-
|
|
5
|
-
import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-
|
|
6
|
-
import { a as promoteStreamTokenToHeader } from "./streaming-
|
|
7
|
-
import { t as openSseStream } from "./sseStream-
|
|
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.
|
|
2
|
-
import { n as forwardedStreamHeaders } from "./streaming-
|
|
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.
|
|
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.
|
|
2
|
-
import { b as isElevated, c as getOrgId } from "./types-
|
|
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.
|
|
2
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
3
|
-
import { d as createDomainError } from "./errors-
|
|
4
|
-
import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-
|
|
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");
|
package/dist/testing/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "../constants-
|
|
3
|
-
import { f as BaseController } from "../plugin-
|
|
4
|
-
import { g as getUserId } from "../types-
|
|
5
|
-
import { t as defineAggregation } from "../defineAggregation-
|
|
6
|
-
import { t as defineResource } from "../defineResource-
|
|
7
|
-
import { E as requireOrgRole } from "../permissions-
|
|
8
|
-
import { h as asModulePorts, r as createApp } from "../createApp-
|
|
9
|
-
import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-
|
|
10
|
-
import { n as getModuleExports } from "../module-
|
|
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-
|
|
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.
|
|
2
|
-
import { t as claimedAttempts } from "../claimed-
|
|
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.
|
|
2
|
-
import { c as declareModules, d as resolveModule, i as planModules, r as compositionProblems } from "../plan-
|
|
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.
|
|
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. */
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.48.0 | MIT | https://classytic.com */
|
|
2
2
|
export {};
|
package/dist/types/storage.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
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,
|
|
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.
|
|
2
|
-
import { l as UnauthorizedError, o as OrgRequiredError } from "./errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
4
|
-
import { t as getUserId$1 } from "./userHelpers-
|
|
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
|
package/dist/usage/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "../errors-
|
|
3
|
-
import { c as getOrgId, g as getUserId, i as getClientId } from "../types-
|
|
4
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
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
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
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-
|
|
3
|
-
import { t as simpleEqualityMatcher } from "../simpleEqualityMatcher-
|
|
4
|
-
import { n as requireSingleHeaderValue, t as getHeader } from "../headers-
|
|
5
|
-
import { n as getUserRoles, r as normalizeRoles, t as getUserId } from "../userHelpers-
|
|
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-
|
|
7
|
-
import { a as isZodSchema, i as isJsonSchema, n as convertRouteSchema, o as toJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-
|
|
8
|
-
import { a as promoteStreamTokenToHeader, i as pipeUIMessageStreamToReply, n as forwardedStreamHeaders, r as isReadableStream, t as UI_MESSAGE_STREAM_HEADERS } from "../streaming-
|
|
9
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
10
|
-
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../shutdown-
|
|
11
|
-
import { t as openSseStream } from "../sseStream-
|
|
12
|
-
import { t as hasEvents } from "../typeGuards-
|
|
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.
|
|
2
|
-
import { h as RESERVED_QUERY_PARAMS } from "./constants-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { t as ArcError, u as ValidationError } from "./errors-
|
|
5
|
-
import { t as runObservingSend } from "./observeSend-
|
|
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.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { x as pathTouchesBlocked } from "./plugin-
|
|
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.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { d as createDomainError } from "./errors-
|
|
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.
|
|
2
|
-
import { n as requestContext } from "./requestContext-
|
|
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.
|
|
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.
|
|
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.
|
|
395
|
-
"@modelcontextprotocol/node": ">=2.
|
|
396
|
-
"@modelcontextprotocol/server": ">=2.
|
|
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.
|
|
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.
|
|
517
|
+
"@classytic/pgkit": "^0.1.1",
|
|
518
518
|
"@classytic/primitives": "^0.35.0",
|
|
519
|
-
"@classytic/repo-core": "^0.
|
|
520
|
-
"@classytic/sqlitekit": "^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.
|
|
534
|
-
"@modelcontextprotocol/node": "^2.1.
|
|
535
|
-
"@modelcontextprotocol/server": "^2.
|
|
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.
|
|
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.
|
|
558
|
+
"tsdown": "^0.23.3",
|
|
559
559
|
"typebox": "^1.4.2",
|
|
560
|
-
"typescript": "7.
|
|
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}` |
|
|
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}` |
|
|
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
|
-
| `
|
|
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
|
-
##
|
|
98
|
+
## Protocol and endpoints
|
|
99
99
|
|
|
100
|
-
|
|
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
|
-
- `
|
|
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
|
|