@classytic/arc 2.47.0 → 2.49.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-DbHZK230.mjs} +2 -2
- package/dist/{HookSystem-CAIDVoKC.mjs → HookSystem-DMoeJ6Do.mjs} +2 -2
- package/dist/{QueryCache-DdvrGG8Q.d.mts → QueryCache-BE47tmlO.d.mts} +36 -1
- package/dist/{ResourceRegistry-23Ml6FNe.mjs → ResourceRegistry-CP-iTcKy.mjs} +2 -2
- package/dist/{acquire-DoFX06fm.mjs → acquire-CB0va87C.mjs} +1 -1
- 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 +2 -2
- package/dist/auth/index.mjs +53 -15
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DYiubkYw.mjs → authorizationDecision-DHO94aV2.mjs} +4 -4
- package/dist/{boundedMap-CtdzpJ3X.mjs → boundedMap-C51EUUOm.mjs} +1 -1
- package/dist/{buildHandler-CARdmPNo.mjs → buildHandler-9DuwEKvr.mjs} +23 -16
- package/dist/cache/index.d.mts +2 -2
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-QRiryDLs.mjs → caching-COTX3sDa.mjs} +3 -6
- package/dist/{claimed-BLecr1j3.mjs → claimed-C7T1nHlo.mjs} +1 -1
- package/dist/cleanup/index.d.mts +2 -2
- 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-Cx7BcnHT.mjs → constants-DOnfMd7i.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +7 -7
- package/dist/{core-0WyMuo0f.mjs → core-BoEdFDDw.mjs} +3 -3
- package/dist/{createActionRouter-mLAGbpDV.mjs → createActionRouter-CpTn15dm.mjs} +54 -18
- package/dist/{createAggregationRouter-BEAjn3dA.mjs → createAggregationRouter-CD_Hydp0.mjs} +13 -11
- package/dist/{createApp-QDP4vYWH.mjs → createApp-Be6XTGD9.mjs} +332 -40
- package/dist/{createMcpServer-DzXHX0SO.d.mts → createMcpServer-CS2KOVP6.d.mts} +9 -10
- package/dist/{defineAggregation-CFNfvz-C.mjs → defineAggregation-BI5pRb8c.mjs} +1 -1
- package/dist/{defineResource-BROJmhzJ.mjs → defineResource-BAzNu5Um.mjs} +8 -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-DrXeEWWk.mjs → elevation-DupGuM41.mjs} +6 -9
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-BiBXtxj4.mjs → errorHandler-DA03vRqp.mjs} +4 -7
- package/dist/{errors-DnrUChAy.mjs → errors-BpYV859Y.mjs} +1 -1
- package/dist/{eventPlugin-BhKLUe7H.mjs → eventPlugin-D7LYtYzL.mjs} +9 -13
- package/dist/{eventTypes-CCIRGakw.mjs → eventTypes-BqA-N-Uz.mjs} +2 -2
- package/dist/events/index.d.mts +18 -5
- package/dist/events/index.mjs +8 -8
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.d.mts +35 -0
- package/dist/events/transports/redis.mjs +87 -11
- package/dist/factory/index.d.mts +4 -4
- package/dist/factory/index.mjs +6 -6
- package/dist/{fastify-augmentation-bzkWPt1f.d.mts → fastify-augmentation-baQc3MaO.d.mts} +2 -2
- package/dist/fieldTypes-EFWxCkZ5.mjs +80 -0
- package/dist/{fields-CYdpcV73.mjs → fields-CT1Erg7o.mjs} +1 -1
- package/dist/{filter-merge-6kasezRH.mjs → filter-merge-B1eJ1pMx.mjs} +1 -1
- package/dist/{generate-DUkcbc4r.mjs → generate-Cr0ULavs.mjs} +2 -2
- package/dist/{headers-KxhrKevA.mjs → headers-D4bncIOf.mjs} +2 -2
- package/dist/{health-jkYNdobJ.mjs → health-BoFxrkJE.mjs} +1 -1
- package/dist/{health-CRJg3IIq.mjs → health-DN_pUVMX.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 +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.d.mts +1 -1
- package/dist/idempotency/index.mjs +10 -8
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/{index-B5i9-vuP.d.mts → index-CMNpMBtW.d.mts} +1 -1
- package/dist/{index-BxZS-8So.d.mts → index-DKM2p5w5.d.mts} +48 -23
- package/dist/{index-Cy2-QffW.d.mts → index-DLCcLUQT.d.mts} +69 -6
- package/dist/{index-DFCCQ9AE.d.mts → index-DexdFs1a.d.mts} +1 -1
- package/dist/{index-D1X_C_qz.d.mts → index-Dhrks-hM.d.mts} +60 -10
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +11 -11
- package/dist/{init-CACwpktI.mjs → init-C4a24wD2.mjs} +1 -1
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.d.mts +2 -2
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.d.mts +6 -38
- 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 -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-DoTt5BS6.mjs} +2 -2
- package/dist/{keys-Cbwf6r1B.mjs → keys--l9n7aOC.mjs} +1 -1
- package/dist/{loadResources-Kr6vuljv.mjs → loadResources-rygByIQA.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-D2e0qoDR.mjs → loadResourcesFromEntry-ItNBIQ5w.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-C110X5Yz.mjs → logger-UbknHqHy.mjs} +1 -1
- package/dist/{mcpPlugin-4lIPr9OJ.mjs → mcpPlugin-CTkk4RP8.mjs} +218 -378
- package/dist/{memory-D9qkhXiB.mjs → memory-C47xVsjX.mjs} +3 -3
- package/dist/{metrics-B-qrrWfI.mjs → metrics-TJyAb1Xk.mjs} +4 -7
- 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-BD8xHgrz.mjs → module-CWiqsXnh.mjs} +1 -1
- package/dist/{multiTenant-KZj8j1uJ.d.mts → multiTenant-QtDzxx_K.d.mts} +1 -1
- package/dist/{multipartBody-qU7KCn1l.mjs → multipartBody-BdG1qbn1.mjs} +1 -1
- package/dist/{observeSend-BnPtTotW.mjs → observeSend-DrA3ADFN.mjs} +1 -1
- package/dist/{openapi-DoVa5SVP.mjs → openapi-D6MAbYpv.mjs} +7 -7
- package/dist/outbox-admin/index.d.mts +1 -1
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-DyITEIop.mjs → outbox-module-D5QABFQW.mjs} +197 -28
- package/dist/{outbox-module-5Mnwcycy.d.mts → outbox-module-DzW6zwWJ.d.mts} +103 -10
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-BBy4bOGi.mjs → permissions-CFsmdYUt.mjs} +9 -9
- package/dist/{pipe-BOm2o4UA.mjs → pipe-B_05AgGt.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-DDIGwuxr.mjs → plan-BnlNJhrj.mjs} +1 -1
- package/dist/{plugin-Bn4D_0XK.mjs → plugin-CrMPYbdj.mjs} +94 -50
- package/dist/plugins/index.d.mts +6 -5
- package/dist/plugins/index.mjs +19 -18
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-ClEjcKlG.mjs → pluralize-oVIxJ4CY.mjs} +1 -1
- 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-DK2jh5YR.mjs → presets-CUd3L7v6.mjs} +4 -4
- package/dist/{projection-BHH-sXyS.mjs → projection-DowJlIto.mjs} +2 -2
- package/dist/{purger.types-2wNJK_89.mjs → purger.types-BjKy8869.mjs} +1 -1
- package/dist/{queryCachePlugin-Ckqe98AM.mjs → queryCachePlugin-BvB3k_Fh.mjs} +114 -14
- package/dist/{queryCachePlugin-DYQUyeJ9.d.mts → queryCachePlugin-DrQNnGws.d.mts} +1 -1
- package/dist/{rateLimitKey-CWAjlqcN.mjs → rateLimitKey-56nH1cWN.mjs} +1 -1
- package/dist/{realtime-BIJi9USY.mjs → realtime-DXGBPtYK.mjs} +19 -22
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-y9ZA-R_J.mjs → registry-Biz-6sEZ.mjs} +2 -2
- package/dist/{relay-BNrC1CEP.mjs → relay-DEIoMntZ.mjs} +200 -99
- package/dist/{renewingLease-CS43br5E.mjs → renewingLease-BCJpW9-u.mjs} +1 -1
- package/dist/{replyHelpers-oZDzakGb.mjs → replyHelpers-DliJNb0-.mjs} +2 -2
- package/dist/{requestContext-fWb_YaV2.mjs → requestContext-tUgLt9Ky.mjs} +1 -1
- package/dist/{requirement--2hWyyHi.mjs → requirement-0l2DApiQ.mjs} +1 -1
- package/dist/{resourceRateLimit-DCWglD7V.d.mts → resourceRateLimit-BPiESPtG.d.mts} +4 -0
- package/dist/{resourceRateLimit-1WbcyMZY.mjs → resourceRateLimit-iSXF8rLH.mjs} +19 -4
- package/dist/{rolldown-runtime-yH2lHMo_.mjs → rolldown-runtime-gKJR3o-6.mjs} +1 -1
- package/dist/{routeValidator-BSlRIA5c.mjs → routeValidator-xNYA4rr1.mjs} +47 -5
- package/dist/{runtimeCapabilities-CYCEtU1W.mjs → runtimeCapabilities-BQK-GrYe.mjs} +1 -1
- package/dist/{schedules-B5WGlYIT.mjs → schedules-D9iMVFhF.mjs} +6 -9
- package/dist/{schemaConverter-DtNvts-6.mjs → schemaConverter-cIh4oX9a.mjs} +2 -2
- package/dist/{actionPermissions-DXrlWHHK.mjs → schemaIR-BsY4y9VP.mjs} +184 -16
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.d.mts +1 -1
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-BwVLSyNG.mjs → scope-QyhM9w8z.mjs} +4 -4
- package/dist/{shutdown-BJiJN7FT.mjs → shutdown-BM7Q0h4B.mjs} +1 -1
- package/dist/{sse-B_50llZu.mjs → sse-ofvlcTQQ.mjs} +9 -35
- package/dist/sseStats-DQqNN385.d.mts +112 -0
- package/dist/sseStream-BxQW7hPq.mjs +166 -0
- package/dist/{store-helpers-D-n5cwy5.mjs → store-helpers-_FRhHDyv.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-DGRLq-1k.mjs → streamFrames-B3ZJfI02.mjs} +19 -2
- package/dist/{streaming-Dcgqa-hH.mjs → streaming-HZr63UiM.mjs} +1 -1
- package/dist/{subscriberIdentity-C9KhIXTF.mjs → subscriberIdentity-DSgnoT_D.mjs} +1 -1
- package/dist/{tenancy-COrhjPRZ.mjs → tenancy-_ukT0oBt.mjs} +2 -2
- package/dist/{tenantPreparation-BElWHytd.mjs → tenantPreparation-DSlQI53c.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +4 -4
- package/dist/testing/index.mjs +324 -17
- 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-Z8p-Zlw1.mjs} +1 -1
- package/dist/{transactionContext-8qKON0Nk.mjs → transactionContext-DBbSTfY3.mjs} +1 -1
- package/dist/{typeGuards-DVjVSsXO.mjs → typeGuards-_6nNQqgq.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-DeLiuaNv.d.mts → types-B4E0sc6D.d.mts} +20 -31
- package/dist/{types-DZHqOuJE.mjs → types-CrOlZ4rY.mjs} +4 -4
- package/dist/usage/index.d.mts +1 -1
- package/dist/usage/index.mjs +7 -7
- package/dist/{userHelpers-_eGj6kf0.mjs → userHelpers-CBKx3XJN.mjs} +1 -1
- package/dist/utils/index.d.mts +239 -34
- package/dist/utils/index.mjs +13 -13
- package/dist/{utils-Dd6MWpye.mjs → utils--HE8R8sH.mjs} +761 -8
- package/dist/{validate-BaF5wd0x.mjs → validate-BUeE2MLR.mjs} +3 -3
- package/dist/{versioning-S18y2-0C.d.mts → versioning-B07RgD27.d.mts} +2 -13
- package/dist/{versioning-DyV7mwtK.mjs → versioning-qYgqwOhL.mjs} +4 -7
- package/dist/{workScope-CmCBUmPR.mjs → workScope-C-1QHNmV.mjs} +2 -2
- package/llms.txt +2 -2
- package/package.json +42 -50
- package/skills/arc/references/api-reference.md +2 -2
- package/skills/arc/references/auth-better-auth.md +1 -0
- package/skills/arc/references/events-outbox.md +7 -4
- package/skills/arc/references/events.md +2 -2
- 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/skills/arc/references/production-api.md +4 -0
- package/skills/arc/references/production-boot.md +2 -0
- package/skills/arc/references/production-idempotency.md +1 -1
- package/skills/arc/references/production-realtime.md +28 -2
- package/skills/arc/references/validation.md +4 -0
- package/skills/arc/references/writes-hooks-errors.md +1 -0
- package/dist/schemaIR-uS_RHqa3.mjs +0 -108
- package/dist/sseStream-BjSo9Ult.mjs +0 -57
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
import { _ as ToolDefinition, a as CrudDescriptionOverride, c as McpAuthResult, d as McpResourceConfig, f as McpToolLogger, g as ToolContext, h as ToolAnnotations, i as CrudDescriptionMeta, l as McpExecutionWiring, m as PromptResult, n as CallToolResult, o as CrudOperation, p as PromptDefinition, r as CreateMcpServerConfig, s as McpAuthResolver, t as BetterAuthHandler, u as McpPluginOptions, v as ToolInputSchema } from "../../types-B4E0sc6D.mjs";
|
|
2
3
|
import { i as RequestScope } from "../../types-DnkIALZ8.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
4
|
+
import { F as ResourceDefinition, Un as IControllerResponse, Wn as IRequestContext, qn as ServerAccessor } from "../../index-DLCcLUQT.mjs";
|
|
5
|
+
import { i as resolveToolCollisions, n as McpServerInstance, r as createMcpServer, t as AuthRef } from "../../createMcpServer-CS2KOVP6.mjs";
|
|
6
|
+
import "../../resourceRateLimit-BPiESPtG.mjs";
|
|
5
7
|
import { n as FieldPermissionMap } from "../../fields-JTkrtO-r.mjs";
|
|
6
|
-
import "../../
|
|
7
|
-
import { _ as ToolDefinition, a as CrudDescriptionOverride, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, i as CrudDescriptionMeta, l as McpExecutionWiring, m as SessionEntry, n as CallToolResult, o as CrudOperation, p as PromptResult, r as CreateMcpServerConfig, s as McpAuthResolver, t as BetterAuthHandler, u as McpPluginOptions, v as ToolInputSchema } from "../../types-DeLiuaNv.mjs";
|
|
8
|
-
import { i as resolveToolCollisions, n as McpServerInstance, r as createMcpServer, t as AuthRef } from "../../createMcpServer-DzXHX0SO.mjs";
|
|
8
|
+
import { l as PermissionCheck } from "../../base-HXNgPQww.mjs";
|
|
9
9
|
import { ErrorContract } from "@classytic/repo-core/errors";
|
|
10
10
|
import { FastifyPluginAsync } from "fastify";
|
|
11
11
|
import { z } from "zod";
|
|
@@ -422,34 +422,6 @@ export declare function invokeController(controller: unknown, op: McpOperation,
|
|
|
422
422
|
* ```
|
|
423
423
|
*/
|
|
424
424
|
export declare function mcpHandlerAdapter<TSession = McpAuthResult>(fn: (input: Record<string, unknown>, ctx: ToolContext<TSession>) => Promise<unknown>): ToolDefinition<TSession>["handler"];
|
|
425
|
-
declare class McpSessionCache {
|
|
426
|
-
private sessions;
|
|
427
|
-
private ttlMs;
|
|
428
|
-
private maxSessions;
|
|
429
|
-
private cleanupTimer;
|
|
430
|
-
constructor(opts?: {
|
|
431
|
-
ttlMs?: number;
|
|
432
|
-
maxSessions?: number;
|
|
433
|
-
});
|
|
434
|
-
/** Get an existing session by ID */
|
|
435
|
-
get(sessionId: string): SessionEntry | undefined;
|
|
436
|
-
/** Store a new session */
|
|
437
|
-
set(sessionId: string, entry: SessionEntry): void;
|
|
438
|
-
/** Refresh the TTL on a session */
|
|
439
|
-
touch(sessionId: string): void;
|
|
440
|
-
/** Remove and close a session */
|
|
441
|
-
remove(sessionId: string): void;
|
|
442
|
-
/** Remove all expired sessions */
|
|
443
|
-
cleanup(): void;
|
|
444
|
-
/** Close all sessions and stop cleanup timer */
|
|
445
|
-
close(): void;
|
|
446
|
-
/** Current session count */
|
|
447
|
-
get size(): number;
|
|
448
|
-
/** Evict the oldest (least recently accessed) session */
|
|
449
|
-
private evictOldest;
|
|
450
|
-
/** Safely close a transport */
|
|
451
|
-
private closeTransport;
|
|
452
|
-
}
|
|
453
425
|
/**
|
|
454
426
|
* Per-prefix MCP registration info. A single fastify instance can register
|
|
455
427
|
* mcpPlugin multiple times under different prefixes (e.g. `/mcp/catalog`,
|
|
@@ -457,19 +429,15 @@ declare class McpSessionCache {
|
|
|
457
429
|
* setups can inspect any endpoint's tool list, not just the first one.
|
|
458
430
|
*/
|
|
459
431
|
interface McpRegistration {
|
|
460
|
-
sessions: McpSessionCache | null;
|
|
461
432
|
toolNames: string[];
|
|
462
433
|
resourceNames: string[];
|
|
463
|
-
stateful: boolean;
|
|
464
434
|
}
|
|
465
435
|
interface McpDecorator {
|
|
466
436
|
/** Map of prefix → registration info. Iterate for all endpoints. */
|
|
467
437
|
registrations: Map<string, McpRegistration>;
|
|
468
438
|
/** Shortcut for the first registered prefix (back-compat for single-endpoint apps) */
|
|
469
|
-
readonly sessions: McpSessionCache | null;
|
|
470
439
|
readonly toolNames: string[];
|
|
471
440
|
readonly resourceNames: string[];
|
|
472
|
-
readonly stateful: boolean;
|
|
473
441
|
/** Look up a specific prefix */
|
|
474
442
|
get(prefix: string): McpRegistration | undefined;
|
|
475
443
|
}
|
|
@@ -627,4 +595,4 @@ export declare function permissionDeniedResult(args: {
|
|
|
627
595
|
reason?: string;
|
|
628
596
|
session: McpAuthResult | null;
|
|
629
597
|
}): CallToolResult;
|
|
630
|
-
export { type AuthRef, type BetterAuthHandler, type BuildMcpToolsFromBridgesOptions, type CallToolResult, type CreateMcpAuthFromBetterAuthApiKeyOptions, type CreateMcpServerConfig, type CrudDescriptionMeta, type CrudDescriptionOverride, type CrudOperation, type DefinePromptConfig, type DefineToolConfig, type DispatchOptions, type FieldRuleEntry, type FieldRulesToZodOptions, type InvokeControllerOptions, type McpAuthResolver, type McpAuthResult, type McpBridge, type McpContextExtras, type McpGuard, type McpOperation, type McpPluginOptions, type McpResourceConfig, type McpServerInstance, type PromptDefinition, type PromptResult, type RealtimeToolCall, type RealtimeToolResponse, type ResourceToToolsConfig, type ToolAnnotations, type ToolContext, type ToolDefinition, type ToolInputSchema, createMcpServer, resolveToolCollisions };
|
|
598
|
+
export { type AuthRef, type BetterAuthHandler, type BuildMcpToolsFromBridgesOptions, type CallToolResult, type CreateMcpAuthFromBetterAuthApiKeyOptions, type CreateMcpServerConfig, type CrudDescriptionMeta, type CrudDescriptionOverride, type CrudOperation, type DefinePromptConfig, type DefineToolConfig, type DispatchOptions, type FieldRuleEntry, type FieldRulesToZodOptions, type InvokeControllerOptions, type McpAuthResolver, type McpAuthResult, type McpBridge, type McpContextExtras, type McpGuard, type McpOperation, type McpPluginOptions, type McpResourceConfig, type McpServerInstance, type McpToolLogger, type PromptDefinition, type PromptResult, type RealtimeToolCall, type RealtimeToolResponse, type ResourceToToolsConfig, type ToolAnnotations, type ToolContext, type ToolDefinition, type ToolInputSchema, createMcpServer, resolveToolCollisions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { _ as
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { _ as createMcpServer, a as isZodTypeSchema, c as defaultCrudDescription, d as mcpHandlerAdapter, f as permissionDeniedResult, g as buildRequestContext, h as toCallToolSuccess, i as resourceToTools, l as resolveCrudDescription, m as toCallToolResult, n as filterResourcesForMcp, o as toolInputShape, p as toCallToolError, r as mcpPlugin, s as fieldRulesToZod, u as invokeController, v as resolveToolCollisions } from "../../mcpPlugin-CTkk4RP8.mjs";
|
|
3
3
|
// src/integrations/mcp/defineTool.ts
|
|
4
4
|
/**
|
|
5
5
|
* Define a type-safe MCP tool.
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { n as McpServerInstance } from "../../createMcpServer-CS2KOVP6.mjs";
|
|
3
|
+
import { c as McpAuthResult, u as McpPluginOptions } from "../../types-B4E0sc6D.mjs";
|
|
4
4
|
import { Client } from "@modelcontextprotocol/client";
|
|
5
|
-
/** An MCP client bound to a
|
|
5
|
+
/** An MCP client bound to a server, plus its teardown. */
|
|
6
6
|
export interface ConnectedMcpTestClient {
|
|
7
7
|
/** The connected SDK client — full `listTools` / `callTool` / `listPrompts` surface. */
|
|
8
8
|
client: Client;
|
|
9
|
-
/** Closes the client and the
|
|
9
|
+
/** Closes the client and the server's connection. Always await it. */
|
|
10
10
|
close: () => Promise<void>;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
* a client to it.
|
|
13
|
+
* Connect a 2026-07-28 client to an already-built `McpServer`.
|
|
15
14
|
*
|
|
16
15
|
* Split out from {@link createTestMcpClient} because arc's own MCP suites build
|
|
17
|
-
* a server directly and only need the connection
|
|
18
|
-
*
|
|
19
|
-
* One implementation, two entry points: this for a server you built, that for
|
|
20
|
-
* one built from resources.
|
|
16
|
+
* a server directly and only need the connection. The server serves this one
|
|
17
|
+
* connection; build a fresh one per test.
|
|
21
18
|
*/
|
|
22
|
-
export declare function connectMcpTestClient(server: McpServerInstance
|
|
19
|
+
export declare function connectMcpTestClient(server: McpServerInstance): Promise<ConnectedMcpTestClient>;
|
|
23
20
|
export interface TestMcpClientOptions {
|
|
24
21
|
/** MCP plugin options (resources, overrides, etc.) — same as mcpPlugin config */
|
|
25
22
|
pluginOptions?: Pick<McpPluginOptions, "resources" | "overrides" | "expose" | "exclude" | "toolNamePrefix" | "extraTools" | "extraPrompts" | "instructions">;
|
|
@@ -46,10 +43,9 @@ export interface TestMcpClient {
|
|
|
46
43
|
close(): Promise<void>;
|
|
47
44
|
}
|
|
48
45
|
/**
|
|
49
|
-
* Create
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* For HTTP-level integration tests against a running server, use `app.inject()` instead.
|
|
46
|
+
* Create a 2026-07-28 MCP test client connected, in memory, to an Arc MCP
|
|
47
|
+
* server built from resources. No Fastify app needed; for plugin-level
|
|
48
|
+
* behaviour use `app.inject()`.
|
|
53
49
|
*
|
|
54
50
|
* @example
|
|
55
51
|
* ```typescript
|
|
@@ -1,63 +1,43 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { _ as createMcpServer, i as resourceToTools, n as filterResourcesForMcp, t as MCP_PROTOCOL_VERSION } from "../../mcpPlugin-CTkk4RP8.mjs";
|
|
3
3
|
// src/integrations/mcp/testing.ts
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* a client to it.
|
|
5
|
+
* Connect a 2026-07-28 client to an already-built `McpServer`.
|
|
7
6
|
*
|
|
8
7
|
* Split out from {@link createTestMcpClient} because arc's own MCP suites build
|
|
9
|
-
* a server directly and only need the connection
|
|
10
|
-
*
|
|
11
|
-
* One implementation, two entry points: this for a server you built, that for
|
|
12
|
-
* one built from resources.
|
|
8
|
+
* a server directly and only need the connection. The server serves this one
|
|
9
|
+
* connection; build a fresh one per test.
|
|
13
10
|
*/
|
|
14
11
|
async function connectMcpTestClient(server) {
|
|
15
|
-
const {
|
|
16
|
-
const {
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const httpServer = createServer((req, res) => {
|
|
22
|
-
serverTransport.handleRequest(req, res);
|
|
12
|
+
const { Client, InMemoryTransport } = await import("@modelcontextprotocol/client");
|
|
13
|
+
const { serveStdio } = await import("@modelcontextprotocol/server/stdio");
|
|
14
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
15
|
+
const handle = serveStdio(() => server, {
|
|
16
|
+
transport: serverTransport,
|
|
17
|
+
legacy: "reject"
|
|
23
18
|
});
|
|
24
|
-
await new Promise((resolve, reject) => {
|
|
25
|
-
httpServer.once("error", reject);
|
|
26
|
-
httpServer.listen(0, "127.0.0.1", resolve);
|
|
27
|
-
});
|
|
28
|
-
const address = httpServer.address();
|
|
29
|
-
if (address === null || typeof address === "string") {
|
|
30
|
-
httpServer.close();
|
|
31
|
-
throw new Error("[arc] MCP test harness: HTTP server did not bind a TCP port");
|
|
32
|
-
}
|
|
33
19
|
const client = new Client({
|
|
34
20
|
name: "test-client",
|
|
35
21
|
version: "1.0"
|
|
36
|
-
});
|
|
37
|
-
|
|
22
|
+
}, { versionNegotiation: { mode: { pin: MCP_PROTOCOL_VERSION } } });
|
|
23
|
+
try {
|
|
24
|
+
await client.connect(clientTransport);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
await handle.close();
|
|
27
|
+
throw err;
|
|
28
|
+
}
|
|
38
29
|
return {
|
|
39
30
|
client,
|
|
40
|
-
/**
|
|
41
|
-
* Client first, THEN the socket. Reversed, the client's in-flight request
|
|
42
|
-
* hangs on a dead server until its own timeout — which reads as a slow test
|
|
43
|
-
* rather than a teardown bug. `httpServer.close()` only stops NEW
|
|
44
|
-
* connections, so keep-alive sockets are destroyed explicitly; without that
|
|
45
|
-
* vitest hangs at end-of-file with no failing assertion.
|
|
46
|
-
*/
|
|
47
31
|
async close() {
|
|
48
32
|
await client.close();
|
|
49
|
-
|
|
50
|
-
await new Promise((resolve, reject) => {
|
|
51
|
-
httpServer.close((err) => err ? reject(err) : resolve());
|
|
52
|
-
});
|
|
33
|
+
await handle.close();
|
|
53
34
|
}
|
|
54
35
|
};
|
|
55
36
|
}
|
|
56
37
|
/**
|
|
57
|
-
* Create
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* For HTTP-level integration tests against a running server, use `app.inject()` instead.
|
|
38
|
+
* Create a 2026-07-28 MCP test client connected, in memory, to an Arc MCP
|
|
39
|
+
* server built from resources. No Fastify app needed; for plugin-level
|
|
40
|
+
* behaviour use `app.inject()`.
|
|
61
41
|
*
|
|
62
42
|
* @example
|
|
63
43
|
* ```typescript
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-
|
|
3
|
-
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-BpYV859Y.mjs";
|
|
3
|
+
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-HZr63UiM.mjs";
|
|
4
4
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
// src/integrations/streamline.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { a as EventTransport, n as DomainEvent } from "../EventTransport-CYEoCJGe.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { a as createOutboxModule, i as OutboxModuleOptions } from "../outbox-module-DzW6zwWJ.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
5
|
import { OutboxFailurePolicy, OutboxStore } from "@classytic/primitives/outbox";
|
|
6
6
|
export interface WebhookSubscription {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as exponentialBackoff } from "../relay-DEIoMntZ.mjs";
|
|
3
|
+
import { t as createOutboxModule } from "../outbox-module-D5QABFQW.mjs";
|
|
4
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-BQK-GrYe.mjs";
|
|
5
5
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
7
7
|
import { createChildEvent, matchEventPattern } from "@classytic/primitives/events";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-BQK-GrYe.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import sjson from "secure-json-parse";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "./errors-BpYV859Y.mjs";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
// src/utils/jsonBody.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-gKJR3o-6.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-UbknHqHy.mjs";
|
|
4
4
|
import { readdir } from "node:fs/promises";
|
|
5
5
|
import { dirname, join, resolve } from "node:path";
|
|
6
6
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ResourceRegistry } from "./ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ResourceRegistry } from "./ResourceRegistry-CP-iTcKy.mjs";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
// src/cli/utils/loadResourcesFromEntry.ts
|
package/dist/logger/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as arcLog, n as configureArcLogger, r as createPinoWriter, i as runWithArcLogger } from "../logger-
|
|
1
|
+
/*! @classytic/arc v2.49.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as arcLog, n as configureArcLogger, r as createPinoWriter, i as runWithArcLogger } from "../logger-UbknHqHy.mjs";
|