@classytic/arc 2.46.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-DNgD9NP4.mjs → EventTransport-BWwg5YAU.mjs} +4 -4
- package/dist/{HookSystem-DRbPzEcP.mjs → HookSystem-B9x-Y_k7.mjs} +2 -2
- package/dist/{ResourceRegistry-Douk51fa.mjs → ResourceRegistry-BcvEJoZd.mjs} +2 -2
- package/dist/{acquire-RbtvDg9s.mjs → acquire-D2yj6Zzl.mjs} +1 -1
- package/dist/{actionPermissions-De0AJ7hm.mjs → actionPermissions-Dha8sAz2.mjs} +13 -13
- package/dist/audit/index.d.mts +1 -1
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.mjs +7 -7
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DeZMrHcm.mjs → authorizationDecision-BZSJcPNE.mjs} +4 -4
- package/dist/{boundedMap-2WBh3gM9.mjs → boundedMap-o2KZDCWy.mjs} +1 -1
- package/dist/{buildHandler-DxVOOBpw.mjs → buildHandler-G3k59KY2.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-BYRwYrUo.mjs → caching-CJIDPZOv.mjs} +2 -2
- package/dist/{claimed-DYlELdnm.mjs → claimed-D0A43wjT.mjs} +1 -1
- package/dist/cleanup/index.d.mts +1 -1
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.d.mts +1 -1
- 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-CHZMUwBW.mjs → constants-D-faL5SX.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +7 -7
- package/dist/{core-D9rS2BxO.mjs → core-NSu1peyq.mjs} +3 -3
- package/dist/{createActionRouter-0qkCRzTL.mjs → createActionRouter-DTSVv1VK.mjs} +6 -6
- package/dist/{createAggregationRouter-CUf5Esd9.mjs → createAggregationRouter-zEasm-ax.mjs} +7 -7
- package/dist/{createApp-DZIXfDKD.mjs → createApp-CjqhkX1x.mjs} +29 -29
- package/dist/{createMcpServer-DeVpqQF-.d.mts → createMcpServer-hSFeqRUb.d.mts} +9 -10
- package/dist/{defineAggregation-bmKQ4NmC.mjs → defineAggregation-DH2L6_v9.mjs} +1 -1
- package/dist/{defineResource-CGmdmGwh.mjs → defineResource-zYCrhNaN.mjs} +10 -8
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.d.mts +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-CzhqAyVN.mjs → elevation-z--rFcZ5.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-dFyGOEoB.mjs → errorHandler-3_3oN-Uc.mjs} +3 -3
- package/dist/{errors-BY8vzlP4.mjs → errors-DyY48oRi.mjs} +1 -1
- package/dist/{eventPlugin-eMhAPtQA.mjs → eventPlugin-Co9sABCg.mjs} +8 -8
- package/dist/{eventTypes-Do2KYeJx.mjs → eventTypes-HmAFyJmJ.mjs} +2 -2
- package/dist/events/index.d.mts +2 -2
- package/dist/events/index.mjs +8 -7
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +3 -3
- package/dist/factory/index.mjs +6 -6
- package/dist/{fastify-augmentation-Dtn0IIRn.d.mts → fastify-augmentation-bzkWPt1f.d.mts} +2 -2
- package/dist/{fields-LnbCcvsw.mjs → fields-rfsl26Ov.mjs} +1 -1
- package/dist/{filter-merge-BAWi019Q.mjs → filter-merge-8glLr7Dk.mjs} +1 -1
- package/dist/{generate-oXoDnpJf.mjs → generate-BOfBueRt.mjs} +2 -2
- package/dist/{headers-DBd3Qheo.mjs → headers-CHSOqpcY.mjs} +2 -2
- package/dist/{health-BlJu9GXS.mjs → health-DHvAIVmM.mjs} +1 -1
- package/dist/{health-Dp-3EC9o.mjs → health-ezwTHQh2.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.d.mts +211 -0
- package/dist/http-cache/index.mjs +605 -0
- package/dist/http-cache/purgers/cloudflare.d.mts +13 -0
- package/dist/http-cache/purgers/cloudflare.mjs +46 -0
- package/dist/http-cache/purgers/fastly.d.mts +12 -0
- package/dist/http-cache/purgers/fastly.mjs +47 -0
- package/dist/http-cache/testing/index.d.mts +68 -0
- package/dist/http-cache/testing/index.mjs +168 -0
- package/dist/idempotency/index.mjs +8 -8
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/{index-BTxzJ_MN.d.mts → index-BxZS-8So.d.mts} +2 -2
- package/dist/{index-DyJFTJLA.d.mts → index-Cy2-QffW.d.mts} +9 -0
- package/dist/{index-CUdaoCYt.d.mts → index-D1X_C_qz.d.mts} +2 -2
- package/dist/{index-Bqfo8hLz.d.mts → index-DFCCQ9AE.d.mts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +11 -11
- package/dist/{init-BOaNkLYb.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 +4 -36
- 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.d.mts +1 -1
- package/dist/integrations/webhooks.mjs +4 -3
- 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-DpRpKR_K.mjs → jsonBody-DZGiCawf.mjs} +2 -2
- package/dist/{keys-FBz6Ull-.mjs → keys-CrMOZuk6.mjs} +1 -1
- package/dist/{loadResources-Bx1sKPnF.mjs → loadResources-CVQvYUhN.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-b_jcqbxh.mjs → loadResourcesFromEntry-D0naccV2.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-CbFcIEBZ.mjs → logger-VyMcSmVG.mjs} +1 -1
- package/dist/{mcpPlugin-yix548XX.mjs → mcpPlugin-DQACaqVu.mjs} +210 -373
- package/dist/{memory-Bgw5dn8N.mjs → memory-Lpfu8Hga.mjs} +3 -3
- package/dist/{metrics-CZDQWVjS.mjs → metrics-DjVj1sg5.mjs} +3 -3
- package/dist/middleware/index.d.mts +1 -1
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-Dsc_nKL5.mjs → module-BqPJpZ_L.mjs} +1 -1
- package/dist/{multiTenant-XCxAUlru.d.mts → multiTenant-KZj8j1uJ.d.mts} +1 -1
- package/dist/{multipartBody-B85ek8Kj.mjs → multipartBody-BNgNv7r0.mjs} +1 -1
- package/dist/{observeSend-BK-JN1jK.mjs → observeSend-BKJHibJz.mjs} +1 -1
- package/dist/{openapi-Co7hl073.mjs → openapi-T90KrPR6.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-XvUThpqn.d.mts → outbox-module-5Mnwcycy.d.mts} +1 -1
- package/dist/outbox-module-C874VgBr.mjs +297 -0
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-A1oKtpiC.mjs → permissions-R9T2G1PH.mjs} +9 -9
- package/dist/{pipe-Czpw9U2n.mjs → pipe-DzqbsZy-.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-KVseuBCL.mjs → plan-C0gkeABY.mjs} +1 -1
- package/dist/{plugin-DTWt_8C3.mjs → plugin-BJcVOX5r.mjs} +48 -24
- package/dist/plugins/index.d.mts +2 -2
- 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-msB9X3yw.mjs → pluralize-CrCpyoZs.mjs} +1 -1
- package/dist/policy.types-DPqToKG1.d.mts +50 -0
- package/dist/presets/filesUpload.d.mts +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.d.mts +2 -2
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +5 -5
- package/dist/presets/search.d.mts +1 -1
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-qKCehiJM.mjs → presets-CNDvNYsz.mjs} +4 -4
- package/dist/{projection-ClBqtsIw.mjs → projection-CIUe8b59.mjs} +2 -2
- package/dist/purger.types-DvPp4-yd.d.mts +26 -0
- package/dist/purger.types-f83fTzGy.mjs +24 -0
- package/dist/{queryCachePlugin-3gJj5Rbz.mjs → queryCachePlugin-B2jpwFcv.mjs} +6 -6
- package/dist/{rateLimitKey-Kro---xl.mjs → rateLimitKey-BWx-qep0.mjs} +1 -1
- package/dist/{realtime-Ber8uJN2.mjs → realtime-D2tqi3d2.mjs} +11 -11
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-BA-_vFYk.mjs → registry-Dl0k6UXy.mjs} +2 -2
- package/dist/{outbox-module-mg9kDYkd.mjs → relay-ZYvS4xyW.mjs} +5 -299
- package/dist/{renewingLease-CMY8YOcc.mjs → renewingLease-DT4yLb29.mjs} +1 -1
- package/dist/{replyHelpers-DK9P_XSz.mjs → replyHelpers-BJFN5AW7.mjs} +2 -2
- package/dist/{requestContext-GYO_0gEw.mjs → requestContext-Ct5la-SA.mjs} +1 -1
- package/dist/{requirement-DeNjZIH3.mjs → requirement-CxDxjB6V.mjs} +1 -1
- package/dist/{resourceRateLimit-tHLbrtWc.mjs → resourceRateLimit-D1oH2obv.mjs} +2 -2
- package/dist/{rolldown-runtime-Kv1fZdLg.mjs → rolldown-runtime-BdTN42uL.mjs} +1 -1
- package/dist/{routeValidator-C_H5NanI.mjs → routeValidator-DclDl5WJ.mjs} +1 -1
- package/dist/{runtimeCapabilities-DWqbxkyw.mjs → runtimeCapabilities-ClWr60El.mjs} +1 -1
- package/dist/{schedules-eO_RzhCU.mjs → schedules-gVkRcs-9.mjs} +5 -5
- package/dist/{schemaConverter-DBJrPZN4.mjs → schemaConverter-CIwB5wPO.mjs} +2 -2
- package/dist/{schemaIR-CEScKT2v.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-B-Sm9m_E.mjs → scope-VMZhdkbT.mjs} +4 -4
- package/dist/{shutdown-DzLFbe27.mjs → shutdown-Bi19vH0z.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-DOJhwQ8g.mjs → simpleEqualityMatcher-CaCS09fh.mjs} +1 -1
- package/dist/{sse-2972pVwV.mjs → sse-BqM359f1.mjs} +7 -7
- package/dist/{sseStream-AWLEeNV-.mjs → sseStream-qSa-F2Qm.mjs} +2 -2
- package/dist/{store-helpers-VzjgVTkM.mjs → store-helpers-rx-F2ZGR.mjs} +1 -1
- package/dist/{streaming-DvraWW6x.mjs → streaming-CPChx3A7.mjs} +1 -1
- package/dist/{subscriberIdentity-Bya56jsg.mjs → subscriberIdentity-CYNYw8p_.mjs} +1 -1
- package/dist/{tenancy-DSa_0hhw.mjs → tenancy-BoWImS3K.mjs} +2 -2
- package/dist/{tenantPreparation-BrpkQre3.mjs → tenantPreparation-oqKCZQZM.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +3 -3
- 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-6rQTuCwg.mjs → timing-Dsteq59c.mjs} +1 -1
- package/dist/{transactionContext-DaxYUEgH.mjs → transactionContext-C1OgH-hW.mjs} +1 -1
- package/dist/{typeGuards-UKnX8wPX.mjs → typeGuards-DNlpASzd.mjs} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-BYEb_dLW.d.mts → types-DduBiYaI.d.mts} +19 -30
- package/dist/{types-CuGjhn83.mjs → types-HFFSwF_K.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-oX5_mOVs.mjs → userHelpers-N-k-8dNF.mjs} +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-CjjGOT4E.mjs → utils-C7w_RVlx.mjs} +5 -5
- package/dist/{validate-4RlTKOJb.mjs → validate-Brr4b_fH.mjs} +3 -3
- package/dist/{versioning-Dk2-19La.mjs → versioning-CE5kdWOY.mjs} +3 -3
- package/dist/{workScope-DoBsoVo4.mjs → workScope-A3XBpYTa.mjs} +2 -2
- package/package.json +47 -27
- 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
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { i as RequestScope } from "../types-DnkIALZ8.mjs";
|
|
3
3
|
import { a as UserLike, c as DataPolicy, d as UserBase, i as ObjectId, l as PermissionCheck, n as ArcRequest, o as UserOrganization, r as JWTPayload, s as AuthorizationDecision, t as AnyRecord, u as PermissionContext } from "../base-HXNgPQww.mjs";
|
|
4
|
-
import { $ as ResourceHookContext, A as RequestWithExtras, At as AuthHelpers, B as OnTenantDeleteConfig, Bn as IController, C as RequestIdOptions, Ct as ActionEntry, D as FastifyWithAuth, Dt as RouteMcpConfig, E as FastifyRequestExtras, En as BaseControllerOptions, Et as RouteDefinition, Fn as WriteContext, Ft as TokenPair, G as CrudRouteKey, H as PresetFunction, Hn as IRequestContext, I as CrudController, In as WriteVerbKey, J as MiddlewareConfig, K as CrudSchemas, L as ResourceConfig, Ln as ControllerHandler, Mt as Authenticator, Nn as MutationWriteContext, Nt as AuthenticatorContext, O as FastifyWithDecorators, Ot as RouteMethod, Pn as ResourceWrites, Pt as JwtContext, Q as FieldRule, R as ResourceIdempotencyConfig, Rn as ControllerLike, S as IntrospectionPluginOptions, St as ActionDefinition, T as EventsDecorator, Tt as ActionsMap, U as PresetHook, Un as RawRouteHandler, V as ResolvedTenantPurge, Vn as IControllerResponse, W as PresetResult, Wn as RouteHandler, X as RouteSchemaOptions, Y as OpenApiSchemas, Z as ArcFieldRule, _ as ServiceContext, a as IntrospectionData, b as HealthCheck, c as ResourceMetadata, d as LookupOption, et as ResourceHooks, f as OwnershipCheck, g as RequestContext, h as QueryParserInterface, i as PaginationResult, jt as AuthPluginOptions, k as MiddlewareHandler, kt as RateLimitConfig, l as ArcInternalMetadata, m as PopulateOption, n as InferDocType, nt as EventDefinition, o as RegistryEntry, p as ParsedQuery, q as LookupPolicy, r as InferResourceDoc, s as RegistryStats, t as InferAdapterDoc, tt as ResourceExtensions, u as ControllerQueryOptions, v as CrudRouterOptions, w as ArcDecorator, wt as ActionHandlerFn, x as HealthOptions, xt as ResourceCacheConfig, y as GracefulShutdownOptions, z as ResourcePermissions, zn as FastifyHandler } from "../index-
|
|
4
|
+
import { $ as ResourceHookContext, A as RequestWithExtras, At as AuthHelpers, B as OnTenantDeleteConfig, Bn as IController, C as RequestIdOptions, Ct as ActionEntry, D as FastifyWithAuth, Dt as RouteMcpConfig, E as FastifyRequestExtras, En as BaseControllerOptions, Et as RouteDefinition, Fn as WriteContext, Ft as TokenPair, G as CrudRouteKey, H as PresetFunction, Hn as IRequestContext, I as CrudController, In as WriteVerbKey, J as MiddlewareConfig, K as CrudSchemas, L as ResourceConfig, Ln as ControllerHandler, Mt as Authenticator, Nn as MutationWriteContext, Nt as AuthenticatorContext, O as FastifyWithDecorators, Ot as RouteMethod, Pn as ResourceWrites, Pt as JwtContext, Q as FieldRule, R as ResourceIdempotencyConfig, Rn as ControllerLike, S as IntrospectionPluginOptions, St as ActionDefinition, T as EventsDecorator, Tt as ActionsMap, U as PresetHook, Un as RawRouteHandler, V as ResolvedTenantPurge, Vn as IControllerResponse, W as PresetResult, Wn as RouteHandler, X as RouteSchemaOptions, Y as OpenApiSchemas, Z as ArcFieldRule, _ as ServiceContext, a as IntrospectionData, b as HealthCheck, c as ResourceMetadata, d as LookupOption, et as ResourceHooks, f as OwnershipCheck, g as RequestContext, h as QueryParserInterface, i as PaginationResult, jt as AuthPluginOptions, k as MiddlewareHandler, kt as RateLimitConfig, l as ArcInternalMetadata, m as PopulateOption, n as InferDocType, nt as EventDefinition, o as RegistryEntry, p as ParsedQuery, q as LookupPolicy, r as InferResourceDoc, s as RegistryStats, t as InferAdapterDoc, tt as ResourceExtensions, u as ControllerQueryOptions, v as CrudRouterOptions, w as ArcDecorator, wt as ActionHandlerFn, x as HealthOptions, xt as ResourceCacheConfig, y as GracefulShutdownOptions, z as ResourcePermissions, zn as FastifyHandler } from "../index-Cy2-QffW.mjs";
|
|
5
5
|
import { n as ElevationOptions, t as ElevationEvent } from "../elevation-DPD0hcU-.mjs";
|
|
6
6
|
export type { ActionDefinition, ActionEntry, ActionHandlerFn, ActionsMap, AnyRecord, ArcDecorator, ArcFieldRule, ArcInternalMetadata, ArcRequest, AuthHelpers, AuthPluginOptions, Authenticator, AuthenticatorContext, AuthorizationDecision, BaseControllerOptions, ControllerHandler, ControllerLike, ControllerQueryOptions, CrudController, CrudRouteKey, CrudRouterOptions, CrudSchemas, DataPolicy, ElevationEvent, ElevationOptions, EventDefinition, EventsDecorator, FastifyHandler, FastifyRequestExtras, FastifyWithAuth, FastifyWithDecorators, FieldRule, GracefulShutdownOptions, HealthCheck, HealthOptions, IController, IControllerResponse, IRequestContext, InferAdapterDoc, InferDocType, InferResourceDoc, IntrospectionData, IntrospectionPluginOptions, JWTPayload, JwtContext, LookupOption, LookupPolicy, MiddlewareConfig, MiddlewareHandler, MutationWriteContext, ObjectId, OnTenantDeleteConfig, OpenApiSchemas, OwnershipCheck, PaginationResult, ParsedQuery, PermissionCheck, PermissionContext, PopulateOption, PresetFunction, PresetHook, PresetResult, QueryParserInterface, RateLimitConfig, RawRouteHandler, RegistryEntry, RegistryStats, RequestContext, RequestIdOptions, RequestScope, RequestWithExtras, ResolvedTenantPurge, ResourceCacheConfig, ResourceConfig, ResourceExtensions, ResourceHookContext, ResourceHooks, ResourceIdempotencyConfig, ResourceMetadata, ResourcePermissions, ResourceWrites, RouteDefinition, RouteHandler, RouteMcpConfig, RouteMethod, RouteSchemaOptions, ServiceContext, TokenPair, UserBase, UserLike, UserOrganization, WriteContext, WriteVerbKey };
|
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 {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { F as ResourceDefinition } from "./index-
|
|
2
|
+
import { F as ResourceDefinition } from "./index-Cy2-QffW.mjs";
|
|
3
3
|
import { i as ResourceRateLimiter } from "./resourceRateLimit-DCWglD7V.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
/** Behavioral hints for MCP clients (tool annotations per MCP spec) */
|
|
@@ -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.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { F as getHeader, I as requireSingleHeaderValue, P as ArcHeaders } from "../types-DnkIALZ8.mjs";
|
|
3
3
|
import { f as getUserId, m as normalizeRoles, p as getUserRoles, t as AnyRecord } from "../base-HXNgPQww.mjs";
|
|
4
|
-
import { Y as OpenApiSchemas, h as QueryParserInterface, p as ParsedQuery } from "../index-
|
|
4
|
+
import { Y as OpenApiSchemas, h as QueryParserInterface, p as ParsedQuery } from "../index-Cy2-QffW.mjs";
|
|
5
5
|
import { n as ErrorMapper } from "../errorHandler-B9r88jZV.mjs";
|
|
6
6
|
import { a as NotFoundError, c as RateLimitError, d as ValidationError, f as createDomainError, i as ForbiddenError, l as ServiceUnavailableError, m as isArcError, n as ConflictError, o as OrgAccessDeniedError, p as createError, r as ErrorOptions, s as OrgRequiredError, t as ArcError, u as UnauthorizedError } from "../errors-DTo0me1o.mjs";
|
|
7
7
|
import { errorContractSchema } from "@classytic/repo-core/errors";
|
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": {
|
|
@@ -188,6 +188,22 @@
|
|
|
188
188
|
"types": "./dist/plugins/response-cache.d.mts",
|
|
189
189
|
"default": "./dist/plugins/response-cache.mjs"
|
|
190
190
|
},
|
|
191
|
+
"./http-cache": {
|
|
192
|
+
"types": "./dist/http-cache/index.d.mts",
|
|
193
|
+
"default": "./dist/http-cache/index.mjs"
|
|
194
|
+
},
|
|
195
|
+
"./http-cache/cloudflare": {
|
|
196
|
+
"types": "./dist/http-cache/purgers/cloudflare.d.mts",
|
|
197
|
+
"default": "./dist/http-cache/purgers/cloudflare.mjs"
|
|
198
|
+
},
|
|
199
|
+
"./http-cache/fastly": {
|
|
200
|
+
"types": "./dist/http-cache/purgers/fastly.d.mts",
|
|
201
|
+
"default": "./dist/http-cache/purgers/fastly.mjs"
|
|
202
|
+
},
|
|
203
|
+
"./http-cache/testing": {
|
|
204
|
+
"types": "./dist/http-cache/testing/index.d.mts",
|
|
205
|
+
"default": "./dist/http-cache/testing/index.mjs"
|
|
206
|
+
},
|
|
191
207
|
"./scope": {
|
|
192
208
|
"types": "./dist/scope/index.d.mts",
|
|
193
209
|
"default": "./dist/scope/index.mjs"
|
|
@@ -287,6 +303,10 @@
|
|
|
287
303
|
"./integrations/webhooks": "stable",
|
|
288
304
|
"./auth/redis": "stable",
|
|
289
305
|
"./plugins/response-cache": "stable",
|
|
306
|
+
"./http-cache": "experimental",
|
|
307
|
+
"./http-cache/cloudflare": "experimental",
|
|
308
|
+
"./http-cache/fastly": "experimental",
|
|
309
|
+
"./http-cache/testing": "experimental",
|
|
290
310
|
"./scope": "stable",
|
|
291
311
|
"./mcp": "stable",
|
|
292
312
|
"./mcp/testing": "stable",
|
|
@@ -358,9 +378,9 @@
|
|
|
358
378
|
"node": ">=22"
|
|
359
379
|
},
|
|
360
380
|
"peerDependencies": {
|
|
361
|
-
"@classytic/primitives": ">=0.
|
|
362
|
-
"@classytic/repo-core": ">=0.
|
|
363
|
-
"@classytic/streamline": ">=2.
|
|
381
|
+
"@classytic/primitives": ">=0.35.0",
|
|
382
|
+
"@classytic/repo-core": ">=0.35.0",
|
|
383
|
+
"@classytic/streamline": ">=2.12.0",
|
|
364
384
|
"@fastify/cors": ">=11.0.0",
|
|
365
385
|
"@fastify/helmet": ">=13.0.0",
|
|
366
386
|
"@fastify/jwt": ">=10.0.0",
|
|
@@ -371,25 +391,25 @@
|
|
|
371
391
|
"@fastify/type-provider-typebox": ">=6.0.0",
|
|
372
392
|
"@fastify/under-pressure": ">=9.0.0",
|
|
373
393
|
"@fastify/websocket": ">=11.0.0",
|
|
374
|
-
"@modelcontextprotocol/client": ">=2.
|
|
375
|
-
"@modelcontextprotocol/node": ">=2.
|
|
376
|
-
"@modelcontextprotocol/server": ">=2.
|
|
394
|
+
"@modelcontextprotocol/client": ">=2.4.0",
|
|
395
|
+
"@modelcontextprotocol/node": ">=2.1.2",
|
|
396
|
+
"@modelcontextprotocol/server": ">=2.4.0",
|
|
377
397
|
"@opentelemetry/api": ">=1.9.0",
|
|
378
398
|
"@opentelemetry/auto-instrumentations-node": ">=0.40.0",
|
|
379
399
|
"@opentelemetry/exporter-trace-otlp-http": ">=0.50.0",
|
|
380
400
|
"@opentelemetry/instrumentation-http": ">=0.50.0",
|
|
381
401
|
"@opentelemetry/instrumentation-mongodb": ">=0.40.0",
|
|
382
402
|
"@opentelemetry/sdk-node": ">=0.50.0",
|
|
383
|
-
"better-auth": ">=1.7.
|
|
384
|
-
"bullmq": ">=6.
|
|
403
|
+
"better-auth": ">=1.7.14",
|
|
404
|
+
"bullmq": ">=6.5.1",
|
|
385
405
|
"fastify": ">=5.12.7",
|
|
386
|
-
"fastify-raw-body": ">=
|
|
406
|
+
"fastify-raw-body": ">=6.0.3",
|
|
387
407
|
"h3-js": ">=4.0.0",
|
|
388
408
|
"ioredis": ">=6.0.0",
|
|
389
409
|
"jose": ">=6.0.0",
|
|
390
410
|
"pino-pretty": ">=13.0.0",
|
|
391
411
|
"typebox": ">=1.0.0",
|
|
392
|
-
"zod": ">=4.
|
|
412
|
+
"zod": ">=4.6.7"
|
|
393
413
|
},
|
|
394
414
|
"peerDependenciesMeta": {
|
|
395
415
|
"@classytic/streamline": {
|
|
@@ -490,15 +510,15 @@
|
|
|
490
510
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
491
511
|
"@better-auth/drizzle-adapter": "^1.7.10",
|
|
492
512
|
"@better-auth/mongo-adapter": "^1.7.10",
|
|
493
|
-
"@biomejs/biome": "^2.
|
|
513
|
+
"@biomejs/biome": "^2.6.3",
|
|
494
514
|
"@classytic/dev-tools": "^0.2.1",
|
|
495
515
|
"@classytic/gitkit": ">=0.3.0",
|
|
496
|
-
"@classytic/mongokit": "^3.43.
|
|
497
|
-
"@classytic/pgkit": "^0.1.
|
|
498
|
-
"@classytic/primitives": "^0.
|
|
499
|
-
"@classytic/repo-core": "^0.
|
|
500
|
-
"@classytic/sqlitekit": "^0.
|
|
501
|
-
"@classytic/streamline": "^2.
|
|
516
|
+
"@classytic/mongokit": "^3.43.1",
|
|
517
|
+
"@classytic/pgkit": "^0.1.1",
|
|
518
|
+
"@classytic/primitives": "^0.35.0",
|
|
519
|
+
"@classytic/repo-core": "^0.35.0",
|
|
520
|
+
"@classytic/sqlitekit": "^0.12.0",
|
|
521
|
+
"@classytic/streamline": "^2.12.0",
|
|
502
522
|
"@electric-sql/pglite": "^0.5.10",
|
|
503
523
|
"@fastify/cors": "^11.3.1",
|
|
504
524
|
"@fastify/helmet": "^13.2.0",
|
|
@@ -510,17 +530,17 @@
|
|
|
510
530
|
"@fastify/type-provider-typebox": "^6.3.0",
|
|
511
531
|
"@fastify/under-pressure": "^9.2.1",
|
|
512
532
|
"@fastify/websocket": "^11.3.4",
|
|
513
|
-
"@modelcontextprotocol/client": "^2.
|
|
514
|
-
"@modelcontextprotocol/node": "^2.1.
|
|
515
|
-
"@modelcontextprotocol/server": "^2.
|
|
533
|
+
"@modelcontextprotocol/client": "^2.4.0",
|
|
534
|
+
"@modelcontextprotocol/node": "^2.1.2",
|
|
535
|
+
"@modelcontextprotocol/server": "^2.4.0",
|
|
516
536
|
"@opentelemetry/api": "^1.9.1",
|
|
517
537
|
"@types/node": "^26.6.5",
|
|
518
538
|
"@types/qs": "^6.15.1",
|
|
519
539
|
"@vitest/coverage-v8": "^5.0.5",
|
|
520
540
|
"ajv": "^8.20.0",
|
|
521
|
-
"better-auth": "^1.7.
|
|
541
|
+
"better-auth": "^1.7.14",
|
|
522
542
|
"better-sqlite3": "^13.0.3",
|
|
523
|
-
"bullmq": "^6.
|
|
543
|
+
"bullmq": "^6.5.1",
|
|
524
544
|
"dotenv": "^18.0.8",
|
|
525
545
|
"drizzle-orm": "^0.45.4",
|
|
526
546
|
"fast-check": "^4.10.2",
|
|
@@ -530,14 +550,14 @@
|
|
|
530
550
|
"ioredis": "^6.0.0",
|
|
531
551
|
"jose": "^6.2.12",
|
|
532
552
|
"jsonwebtoken": "^9.0.3",
|
|
533
|
-
"knip": "^6.
|
|
553
|
+
"knip": "^6.43.0",
|
|
534
554
|
"mongodb": "^7.7.0",
|
|
535
555
|
"mongodb-memory-server": "^11.3.0",
|
|
536
|
-
"mongoose": "^9.11.
|
|
556
|
+
"mongoose": "^9.11.4",
|
|
537
557
|
"publint": "^0.3.25",
|
|
538
|
-
"tsdown": "^0.23.
|
|
558
|
+
"tsdown": "^0.23.3",
|
|
539
559
|
"typebox": "^1.4.2",
|
|
540
|
-
"typescript": "
|
|
560
|
+
"typescript": "~7.0.2",
|
|
541
561
|
"vitest": "^5.0.5",
|
|
542
562
|
"ws": "^8.22.0",
|
|
543
563
|
"zod": "^4.6.7"
|
|
@@ -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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MCP: testing
|
|
2
2
|
|
|
3
|
-
`@classytic/arc/mcp/testing`
|
|
3
|
+
`@classytic/arc/mcp/testing` connects an SDK client speaking MCP 2026-07-28 (the only revision arc serves) in memory: no port. Needs `@modelcontextprotocol/client`. Always `await client.close()`. For HTTP status codes and headers, register `mcpPlugin` and use `app.inject()`.
|
|
4
4
|
|
|
5
5
|
## createTestMcpClient
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ await client.close();
|
|
|
25
25
|
| Option | Notes |
|
|
26
26
|
|---|---|
|
|
27
27
|
| `pluginOptions` | `resources`, `overrides`, `expose`, `exclude`, `toolNamePrefix`, `extraTools`, `extraPrompts`, `instructions` |
|
|
28
|
-
| `auth` | `McpAuthResult` for the session; `null`
|
|
28
|
+
| `auth` | `McpAuthResult` for the session; `null` runs anonymous; omitted is `{ userId: 'test-user' }` |
|
|
29
29
|
| `serverName` | default `test-mcp` |
|
|
30
30
|
|
|
31
31
|
`callTool` returns `{ content: [{ type, text }], isError? }`; parse `content[0].text` as JSON.
|
|
@@ -38,7 +38,7 @@ For a server you built with `createMcpServer`:
|
|
|
38
38
|
import { connectMcpTestClient } from '@classytic/arc/mcp/testing';
|
|
39
39
|
|
|
40
40
|
const server = await createMcpServer({ name: 't', tools: [notifyTool] });
|
|
41
|
-
const { client, close } = await connectMcpTestClient(server);
|
|
41
|
+
const { client, close } = await connectMcpTestClient(server); // one connection per server
|
|
42
42
|
const result = await client.callTool({ name: 'send_notification', arguments: { /* ... */ } });
|
|
43
43
|
await close();
|
|
44
44
|
```
|