@classytic/arc 2.37.1 → 2.40.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/{BaseController-Chkf0Aiw.mjs → BaseController-BqJtbiUA.mjs} +107 -23
- package/dist/{EventTransport-BEVP50ka.d.mts → EventTransport-BPOQsEer.d.mts} +45 -0
- package/dist/{EventTransport-CFdtK25P.mjs → EventTransport-BUkTwY_x.mjs} +51 -8
- package/dist/{HookSystem-Csy31WS-.mjs → HookSystem-96nzZLmk.mjs} +2 -2
- package/dist/{ResourceRegistry-OQA13slI.mjs → ResourceRegistry-B9WnuG2Q.mjs} +2 -2
- package/dist/{actionPermissions-DGGqqSIV.mjs → actionPermissions-4OGbe3Hf.mjs} +6 -6
- package/dist/audit/index.d.mts +1 -1
- package/dist/audit/index.mjs +2 -2
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.mjs +6 -6
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-BzZi2bsf.mjs → authorizationDecision-D_LFvMlm.mjs} +2 -2
- package/dist/{buildHandler-CIz0NsGS.mjs → buildHandler-BG_CHXqQ.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-DldVgnC9.mjs → caching-Bqcn3Brl.mjs} +2 -2
- package/dist/cleanup/index.d.mts +2 -2
- package/dist/cleanup/index.mjs +21 -5
- 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-DDKf25s4.mjs → constants-BQ2FbhPB.mjs} +1 -1
- package/dist/context/index.d.mts +34 -6
- package/dist/context/index.mjs +12 -19
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +7 -7
- package/dist/{core-uHQonaHf.mjs → core-CsZR037F.mjs} +3 -3
- package/dist/{createActionRouter-C22Xn11N.mjs → createActionRouter-BR93gCKg.mjs} +7 -7
- package/dist/{createAggregationRouter-DgyksLHH.mjs → createAggregationRouter-CF40Aw95.mjs} +7 -7
- package/dist/createMcpServer-BVTs2S5G.d.mts +48 -0
- package/dist/{defineAggregation-B1m-45Fe.mjs → defineAggregation-BDA2Tw7v.mjs} +1 -1
- package/dist/{defineResource-DS3Uj2-8.mjs → defineResource-DaIySrQr.mjs} +20 -22
- 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-9X0lGzTQ.mjs → elevation-CZy6n50b.mjs} +4 -4
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-DI5AN2b5.d.mts → errorHandler--4rSMMvq.d.mts} +7 -1
- package/dist/{errorHandler-BmEGKyO9.mjs → errorHandler-By9keRvX.mjs} +3 -3
- package/dist/{errors-CbxCF9M0.mjs → errors-BHD3L8of.mjs} +1 -1
- package/dist/{eventPlugin-B1ahehZH.mjs → eventPlugin-DB26V7uX.mjs} +6 -6
- package/dist/{eventPlugin-B47sfCJ8.d.mts → eventPlugin-DfHaKEWQ.d.mts} +10 -1
- package/dist/events/index.d.mts +4 -4
- package/dist/events/index.mjs +5 -5
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +21 -20
- package/dist/events/transports/redis.d.mts +1 -1
- package/dist/events/transports/redis.mjs +11 -8
- package/dist/factory/index.d.mts +4 -4
- package/dist/factory/index.mjs +5 -5
- package/dist/{fastify-augmentation-CRsNNhuo.d.mts → fastify-augmentation-HncZMmze.d.mts} +3 -3
- package/dist/{fields-f_MdWDl_.mjs → fields-fA-Dkou5.mjs} +37 -2
- package/dist/{generate-DxWn-XnM.mjs → generate-BSSdtiOy.mjs} +4 -3
- package/dist/{headers-DivLPMHe.mjs → headers-BFEEshDS.mjs} +2 -2
- package/dist/{health-W_BjgWf0.mjs → health-BlGHjkqZ.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.mjs +4 -4
- package/dist/idempotency/redis.mjs +1 -1
- package/dist/{index-BqRfP1kT.d.mts → index-D3sIPcD4.d.mts} +47 -11
- package/dist/{index-DCxxRwLC.d.mts → index-DbMglURO.d.mts} +2 -2
- package/dist/{index-CEmPspAB.d.mts → index-SCsOJxWB.d.mts} +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +11 -11
- package/dist/{init-BJ6fdYnp.mjs → init-pl88PHzb.mjs} +9 -9
- package/dist/integrations/event-gateway.d.mts +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 +2 -2
- package/dist/integrations/mcp/index.d.mts +3 -46
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +22 -2
- package/dist/integrations/mcp/testing.mjs +55 -33
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.d.mts +2 -2
- package/dist/integrations/webhooks.mjs +3 -3
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +13 -6
- package/dist/{interface-DeLndJ8G.mjs → interface-DjtFnZxH.mjs} +1 -1
- package/dist/{jsonBody-kApktjTc.mjs → jsonBody-Dx6jH_Nb.mjs} +2 -2
- package/dist/{keys-B1MgfDWi.mjs → keys-Ds3ekBiu.mjs} +1 -1
- package/dist/{loadResources-ma-Aaxp1.mjs → loadResources-E5UFlRrT.mjs} +2 -2
- package/dist/{loadResourcesFromEntry-xszlyXTs.mjs → loadResourcesFromEntry-C2jrJbWG.mjs} +2 -2
- package/dist/logger/index.mjs +1 -1
- package/dist/{mcpPlugin-97HuFA46.mjs → mcpPlugin-D-3OLxNz.mjs} +75 -31
- package/dist/{memory-DvASzOn3.mjs → memory-CNvjxzB2.mjs} +2 -2
- package/dist/{metrics-Dx-nkDE5.mjs → metrics-P37sNV5H.mjs} +2 -2
- 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-CNKk_twm.mjs → module-CNcwCKUJ.mjs} +1 -1
- package/dist/{multipartBody-TDaYOHGZ.mjs → multipartBody-Bl_gU3Wg.mjs} +1 -1
- package/dist/{openapi-473gZ-8x.mjs → openapi-BYrL8zvY.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +1 -1
- package/dist/outbox-admin/index.mjs +4 -4
- package/dist/{outbox-module-DOAmyXOb.mjs → outbox-module-6DMC_WNu.mjs} +40 -21
- package/dist/{outbox-module-BbdaMyqy.d.mts → outbox-module-CzsKRBvO.d.mts} +11 -2
- package/dist/permissions/index.mjs +5 -5
- package/dist/{permissions-DnAc6zoZ.mjs → permissions-C0GpDsB_.mjs} +6 -6
- package/dist/{pipe-BoV-z4db.mjs → pipe-4_XamfxI.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/plugins/index.d.mts +5 -5
- package/dist/plugins/index.mjs +17 -16
- package/dist/plugins/response-cache.mjs +2 -2
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-BiU5ocWw.mjs → pluralize-BaQ62hOW.mjs} +1 -1
- package/dist/{preloadResources-DJ7Lli0a.mjs → preloadResources-BAx5s9EF.mjs} +70 -21
- package/dist/{preloadResources-DHkyk3QN.d.mts → preloadResources-DVgPCNcD.d.mts} +7 -7
- package/dist/presets/filesUpload.d.mts +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.d.mts +1 -1
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +3 -3
- package/dist/presets/search.d.mts +1 -1
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-BMxH-Bb7.mjs → presets-CAaqVVcW.mjs} +4 -4
- package/dist/{projection-CRCM5S9T.mjs → projection-qbCOEvsh.mjs} +2 -2
- package/dist/{queryCachePlugin-Cl3zLG7g.mjs → queryCachePlugin-2Pp9w-8D.mjs} +5 -5
- package/dist/rateLimitKey-umrS6-vu.mjs +41 -0
- package/dist/{realtime-BWuHi-UI.mjs → realtime-zzoNLDtj.mjs} +9 -9
- package/dist/{redis-stream-mwLWlfHG.d.mts → redis-stream-DSsPyYzd.d.mts} +7 -2
- package/dist/{registerRoute-mvm6zY2H.mjs → registerRoute-_6zHiz0x.mjs} +10 -6
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-3maEt__c.mjs → registry-CEpoRpLP.mjs} +2 -2
- package/dist/{renewingLease-C1-GAUpr.mjs → renewingLease-B5Grm0pI.mjs} +1 -1
- package/dist/{replyHelpers-DVcUoled.mjs → replyHelpers-9h-a592u.mjs} +2 -2
- package/dist/{requestContext-KzIdSmN2.mjs → requestContext-D4PuGhEw.mjs} +1 -1
- package/dist/{rolldown-runtime-NVzJrC-o.mjs → rolldown-runtime-DzE6ikSH.mjs} +1 -1
- package/dist/{runtimeCapabilities-OrGatf7r.mjs → runtimeCapabilities-Bo7rSKjm.mjs} +1 -1
- package/dist/{schedules-DeRI03eo.mjs → schedules-Dm21pqHU.mjs} +8 -4
- package/dist/{schemaConverter-cXTayNOW.mjs → schemaConverter-DENbixyA.mjs} +1 -1
- package/dist/{schemaIR-Cc9ZPVs2.mjs → schemaIR-C2qUNzC6.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-C2r7_WGs.mjs → scope-CdYxQVxt.mjs} +4 -4
- package/dist/{simpleEqualityMatcher-Cr1F8jKZ.mjs → simpleEqualityMatcher-Cldubvul.mjs} +1 -1
- package/dist/{sse-BmZCVRGH.mjs → sse-DbyXoQun.mjs} +5 -5
- package/dist/{sseStream-nNPqvOeK.mjs → sseStream-BfZtL5-m.mjs} +2 -2
- package/dist/{store-helpers-C1r3-6M0.mjs → store-helpers-BfyOd5i6.mjs} +1 -1
- package/dist/{streaming-BxZDlH01.mjs → streaming-CFwCzEvU.mjs} +1 -1
- package/dist/{subscribe-helpers-Dca7Fcz2.mjs → subscribe-helpers-KgVEcn8L.mjs} +2 -2
- package/dist/sync/changelog.mjs +1 -1
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +4 -4
- package/dist/testing/index.mjs +10 -10
- package/dist/testing/outboxStoreContract.mjs +14 -3
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{transactionContext-6F7Gkbxg.mjs → transactionContext-46KyUADP.mjs} +1 -1
- package/dist/{typeGuards-BrXgbFi-.mjs → typeGuards-t_CVgRXN.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-rzNprqbE.d.mts → types-9rvxn5Ym.d.mts} +46 -1
- package/dist/{types-BMa2EPtv.d.mts → types-BVlowlm7.d.mts} +2 -2
- package/dist/{types-khJmBErP.mjs → types-CNQyOrLk.mjs} +4 -4
- package/dist/usage/index.mjs +0 -0
- package/dist/{userHelpers-Bi97zMEl.mjs → userHelpers-DLueLQdQ.mjs} +1 -1
- package/dist/utils/index.d.mts +4 -4
- package/dist/utils/index.mjs +11 -11
- package/dist/{utils-WlLDIKuw.mjs → utils-CUFBrhq-.mjs} +14 -6
- package/dist/{validate-pMke_boy.mjs → validate-DV3hRbsz.mjs} +2 -2
- package/dist/{versioning-CFK3c04-.mjs → versioning-BXwmj5SD.mjs} +3 -3
- package/dist/{versioning-DEs-_hFi.d.mts → versioning-P3V6ATyC.d.mts} +1 -1
- package/dist/workScope-CoGpuzDX.mjs +42 -0
- package/package.json +48 -39
- package/skills/arc/references/mcp.md +20 -0
- package/skills/arc/references/testing.md +0 -12
- package/skills/arc-code-review/references/anti-patterns.md +1 -1
- package/skills/arc-code-review/references/migration-recipes.md +0 -60
- package/skills/arc-code-review/references/mongokit-migration.md +0 -27
- package/skills/arc-module-publishing/references/package-manifest.md +3 -1
- package/dist/rateLimitKey-D4_rjP1K.mjs +0 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as defaultCrudDescription, c as mcpHandlerAdapter, d as toCallToolResult, f as toCallToolSuccess, h as resolveToolCollisions, i as fieldRulesToZod, l as permissionDeniedResult, m as createMcpServer, n as mcpPlugin, o as resolveCrudDescription, p as buildRequestContext, r as resourceToTools, s as invokeController, t as filterResourcesForMcp, u as toCallToolError } from "../../mcpPlugin-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as defaultCrudDescription, c as mcpHandlerAdapter, d as toCallToolResult, f as toCallToolSuccess, h as resolveToolCollisions, i as fieldRulesToZod, l as permissionDeniedResult, m as createMcpServer, n as mcpPlugin, o as resolveCrudDescription, p as buildRequestContext, r as resourceToTools, s as invokeController, t as filterResourcesForMcp, u as toCallToolError } from "../../mcpPlugin-D-3OLxNz.mjs";
|
|
3
3
|
//#region src/integrations/mcp/defineTool.ts
|
|
4
4
|
/**
|
|
5
5
|
* Define a type-safe MCP tool.
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
|
|
2
|
-
import { c as McpAuthResult, u as McpPluginOptions } from "../../types-
|
|
2
|
+
import { c as McpAuthResult, u as McpPluginOptions } from "../../types-9rvxn5Ym.mjs";
|
|
3
|
+
import { n as McpServerInstance } from "../../createMcpServer-BVTs2S5G.mjs";
|
|
4
|
+
import { Client } from "@modelcontextprotocol/client";
|
|
3
5
|
//#region src/integrations/mcp/testing.d.ts
|
|
6
|
+
/** An MCP client bound to a live loopback server, plus its teardown. */
|
|
7
|
+
interface ConnectedMcpTestClient {
|
|
8
|
+
/** The connected SDK client — full `listTools` / `callTool` / `listPrompts` surface. */
|
|
9
|
+
client: Client;
|
|
10
|
+
/** Closes the client and the HTTP server. Always await it. */
|
|
11
|
+
close: () => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Serve an already-built `McpServer` on an ephemeral loopback port and connect
|
|
15
|
+
* a client to it.
|
|
16
|
+
*
|
|
17
|
+
* Split out from {@link createTestMcpClient} because arc's own MCP suites build
|
|
18
|
+
* a server directly and only need the connection — five of them had each grown a
|
|
19
|
+
* private copy of the same connect helper against the v1 in-memory transport.
|
|
20
|
+
* One implementation, two entry points: this for a server you built, that for
|
|
21
|
+
* one built from resources.
|
|
22
|
+
*/
|
|
23
|
+
declare function connectMcpTestClient(server: McpServerInstance | unknown): Promise<ConnectedMcpTestClient>;
|
|
4
24
|
interface TestMcpClientOptions {
|
|
5
25
|
/** MCP plugin options (resources, overrides, etc.) — same as mcpPlugin config */
|
|
6
26
|
pluginOptions?: Pick<McpPluginOptions, "resources" | "overrides" | "expose" | "exclude" | "toolNamePrefix" | "extraTools" | "extraPrompts" | "instructions">;
|
|
@@ -50,4 +70,4 @@ interface TestMcpClient {
|
|
|
50
70
|
*/
|
|
51
71
|
declare function createTestMcpClient(options?: TestMcpClientOptions): Promise<TestMcpClient>;
|
|
52
72
|
//#endregion
|
|
53
|
-
export { TestMcpClient, TestMcpClientOptions, createTestMcpClient };
|
|
73
|
+
export { ConnectedMcpTestClient, TestMcpClient, TestMcpClientOptions, connectMcpTestClient, createTestMcpClient };
|
|
@@ -1,26 +1,58 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { m as createMcpServer, r as resourceToTools, t as filterResourcesForMcp } from "../../mcpPlugin-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { m as createMcpServer, r as resourceToTools, t as filterResourcesForMcp } from "../../mcpPlugin-D-3OLxNz.mjs";
|
|
3
3
|
//#region src/integrations/mcp/testing.ts
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Serve an already-built `McpServer` on an ephemeral loopback port and connect
|
|
6
|
+
* a client to it.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* import { createTestMcpClient } from '@classytic/arc/mcp/testing';
|
|
13
|
-
*
|
|
14
|
-
* const client = await createTestMcpClient({
|
|
15
|
-
* pluginOptions: { resources: [productResource] },
|
|
16
|
-
* auth: { userId: 'test-user', organizationId: 'org-1' },
|
|
17
|
-
* });
|
|
18
|
-
*
|
|
19
|
-
* const tools = await client.listTools();
|
|
20
|
-
* const result = await client.callTool('list_products', { limit: 5 });
|
|
21
|
-
* await client.close();
|
|
22
|
-
* ```
|
|
8
|
+
* Split out from {@link createTestMcpClient} because arc's own MCP suites build
|
|
9
|
+
* a server directly and only need the connection — five of them had each grown a
|
|
10
|
+
* private copy of the same connect helper against the v1 in-memory transport.
|
|
11
|
+
* One implementation, two entry points: this for a server you built, that for
|
|
12
|
+
* one built from resources.
|
|
23
13
|
*/
|
|
14
|
+
async function connectMcpTestClient(server) {
|
|
15
|
+
const { randomUUID } = await import("node:crypto");
|
|
16
|
+
const { createServer } = await import("node:http");
|
|
17
|
+
const { NodeStreamableHTTPServerTransport } = await import("@modelcontextprotocol/node");
|
|
18
|
+
const { Client, StreamableHTTPClientTransport } = await import("@modelcontextprotocol/client");
|
|
19
|
+
const serverTransport = new NodeStreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID() });
|
|
20
|
+
await server.connect(serverTransport);
|
|
21
|
+
const httpServer = createServer((req, res) => {
|
|
22
|
+
serverTransport.handleRequest(req, res);
|
|
23
|
+
});
|
|
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
|
+
const client = new Client({
|
|
34
|
+
name: "test-client",
|
|
35
|
+
version: "1.0"
|
|
36
|
+
});
|
|
37
|
+
await client.connect(new StreamableHTTPClientTransport(new URL(`http://127.0.0.1:${address.port}/`)));
|
|
38
|
+
return {
|
|
39
|
+
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
|
+
async close() {
|
|
48
|
+
await client.close();
|
|
49
|
+
httpServer.closeAllConnections?.();
|
|
50
|
+
await new Promise((resolve, reject) => {
|
|
51
|
+
httpServer.close((err) => err ? reject(err) : resolve());
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
24
56
|
/**
|
|
25
57
|
* Create an in-process MCP test client connected to an Arc MCP server.
|
|
26
58
|
*
|
|
@@ -44,8 +76,6 @@ import { m as createMcpServer, r as resourceToTools, t as filterResourcesForMcp
|
|
|
44
76
|
* ```
|
|
45
77
|
*/
|
|
46
78
|
async function createTestMcpClient(options = {}) {
|
|
47
|
-
const { InMemoryTransport } = await import("@modelcontextprotocol/sdk/inMemory.js");
|
|
48
|
-
const { Client } = await import("@modelcontextprotocol/sdk/client/index.js");
|
|
49
79
|
const pluginOpts = {
|
|
50
80
|
resources: [],
|
|
51
81
|
...options.pluginOptions
|
|
@@ -65,19 +95,13 @@ async function createTestMcpClient(options = {}) {
|
|
|
65
95
|
});
|
|
66
96
|
if (pluginOpts.extraTools) tools.push(...pluginOpts.extraTools);
|
|
67
97
|
const authRef = { current: auth };
|
|
68
|
-
const
|
|
98
|
+
const { client, close } = await connectMcpTestClient(await createMcpServer({
|
|
69
99
|
name: serverName,
|
|
70
100
|
version: "1.0.0",
|
|
71
101
|
instructions: pluginOpts.instructions,
|
|
72
102
|
tools,
|
|
73
103
|
prompts: pluginOpts.extraPrompts
|
|
74
|
-
}, authRef);
|
|
75
|
-
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
76
|
-
const client = new Client({
|
|
77
|
-
name: "test-client",
|
|
78
|
-
version: "1.0"
|
|
79
|
-
});
|
|
80
|
-
await Promise.all([client.connect(clientTransport), server.connect(serverTransport)]);
|
|
104
|
+
}, authRef));
|
|
81
105
|
return {
|
|
82
106
|
async listTools() {
|
|
83
107
|
return (await client.listTools()).tools.map((t) => ({
|
|
@@ -91,10 +115,8 @@ async function createTestMcpClient(options = {}) {
|
|
|
91
115
|
arguments: args ?? {}
|
|
92
116
|
});
|
|
93
117
|
},
|
|
94
|
-
|
|
95
|
-
await client.close();
|
|
96
|
-
}
|
|
118
|
+
close
|
|
97
119
|
};
|
|
98
120
|
}
|
|
99
121
|
//#endregion
|
|
100
|
-
export { createTestMcpClient };
|
|
122
|
+
export { connectMcpTestClient, createTestMcpClient };
|
|
@@ -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.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-BHD3L8of.mjs";
|
|
3
|
+
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-CFwCzEvU.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
//#region src/integrations/streamline.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as EventTransport, n as DomainEvent } from "../EventTransport-
|
|
3
|
-
import { n as OutboxModuleOptions, r as createOutboxModule } from "../outbox-module-
|
|
2
|
+
import { a as EventTransport, n as DomainEvent } from "../EventTransport-BPOQsEer.mjs";
|
|
3
|
+
import { n as OutboxModuleOptions, r as createOutboxModule } from "../outbox-module-CzsKRBvO.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
5
|
import { OutboxFailurePolicy, OutboxStore } from "@classytic/primitives/outbox";
|
|
6
6
|
//#region src/integrations/webhooks.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
3
|
-
import { i as exponentialBackoff, t as createOutboxModule } from "../outbox-module-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-Bo7rSKjm.mjs";
|
|
3
|
+
import { i as exponentialBackoff, t as createOutboxModule } from "../outbox-module-6DMC_WNu.mjs";
|
|
4
4
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
import { createChildEvent } from "@classytic/primitives/events";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
@@ -968,7 +968,7 @@ async function handleConnection(ctx, socket, request) {
|
|
|
968
968
|
socket.close(4003, "Session expired");
|
|
969
969
|
}
|
|
970
970
|
}, options.reauthInterval);
|
|
971
|
-
socket.on("message", async (
|
|
971
|
+
socket.on("message", (raw) => safeAsync((async () => {
|
|
972
972
|
if ((typeof raw === "string" ? Buffer.byteLength(raw) : raw.length) > options.maxMessageBytes) {
|
|
973
973
|
socket.send(JSON.stringify({
|
|
974
974
|
type: "error",
|
|
@@ -1057,12 +1057,19 @@ async function handleConnection(ctx, socket, request) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
default: await options.onMessage?.(client, msg);
|
|
1059
1059
|
}
|
|
1060
|
-
});
|
|
1061
|
-
socket.on("close", async () => {
|
|
1060
|
+
})(), fastify.log, "ws.message", { clientId }));
|
|
1061
|
+
socket.on("close", () => safeAsync((async () => {
|
|
1062
1062
|
if (heartbeatTimer) clearInterval(heartbeatTimer);
|
|
1063
1063
|
if (reauthTimer) clearInterval(reauthTimer);
|
|
1064
1064
|
if (rooms.getClient(clientId)?.socket === socket) {
|
|
1065
|
-
|
|
1065
|
+
try {
|
|
1066
|
+
await options.onDisconnect?.(client);
|
|
1067
|
+
} catch (err) {
|
|
1068
|
+
fastify.log.warn({
|
|
1069
|
+
err,
|
|
1070
|
+
clientId
|
|
1071
|
+
}, "[arc] websocket onDisconnect threw");
|
|
1072
|
+
}
|
|
1066
1073
|
rooms.removeClient(clientId);
|
|
1067
1074
|
}
|
|
1068
1075
|
queue.dispose();
|
|
@@ -1070,7 +1077,7 @@ async function handleConnection(ctx, socket, request) {
|
|
|
1070
1077
|
pushRef,
|
|
1071
1078
|
generation
|
|
1072
1079
|
});
|
|
1073
|
-
});
|
|
1080
|
+
})(), fastify.log, "ws.close", { clientId }));
|
|
1074
1081
|
socket.on("error", () => {
|
|
1075
1082
|
if (heartbeatTimer) clearInterval(heartbeatTimer);
|
|
1076
1083
|
if (reauthTimer) clearInterval(reauthTimer);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "./errors-BHD3L8of.mjs";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
//#region src/utils/jsonBody.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DzE6ikSH.mjs";
|
|
3
3
|
import { arcLog } from "./logger/index.mjs";
|
|
4
4
|
import { readdir } from "node:fs/promises";
|
|
5
5
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ResourceRegistry } from "./ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ResourceRegistry } from "./ResourceRegistry-B9WnuG2Q.mjs";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
//#region src/cli/utils/loadResourcesFromEntry.ts
|
package/dist/logger/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as evaluatePermissionDecision } from "./authorizationDecision-
|
|
3
|
-
import { p as isArcError, t as ArcError } from "./errors-
|
|
4
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
5
|
-
import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-
|
|
6
|
-
import { t as BaseController } from "./BaseController-
|
|
7
|
-
import {
|
|
8
|
-
import { t as buildRequestScopeProjection } from "./projection-
|
|
9
|
-
import { i as resolvePipelineSteps, t as resolveActionPermission } from "./actionPermissions-
|
|
10
|
-
import { t as executePipeline } from "./pipe-
|
|
11
|
-
import { t as pluralize } from "./pluralize-
|
|
12
|
-
import { t as createIdempotencyResult } from "./interface-
|
|
13
|
-
import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-
|
|
14
|
-
import { n as validateAggregations } from "./validate-
|
|
15
|
-
import { n as executeAggregation } from "./buildHandler-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as evaluatePermissionDecision } from "./authorizationDecision-D_LFvMlm.mjs";
|
|
3
|
+
import { p as isArcError, t as ArcError } from "./errors-BHD3L8of.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue } from "./headers-BFEEshDS.mjs";
|
|
5
|
+
import { b as isElevated, c as getOrgId, g as getUserId, x as isMember } from "./types-CNQyOrLk.mjs";
|
|
6
|
+
import { t as BaseController } from "./BaseController-BqJtbiUA.mjs";
|
|
7
|
+
import { a as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-fA-Dkou5.mjs";
|
|
8
|
+
import { t as buildRequestScopeProjection } from "./projection-qbCOEvsh.mjs";
|
|
9
|
+
import { i as resolvePipelineSteps, t as resolveActionPermission } from "./actionPermissions-4OGbe3Hf.mjs";
|
|
10
|
+
import { t as executePipeline } from "./pipe-4_XamfxI.mjs";
|
|
11
|
+
import { t as pluralize } from "./pluralize-BaQ62hOW.mjs";
|
|
12
|
+
import { t as createIdempotencyResult } from "./interface-DjtFnZxH.mjs";
|
|
13
|
+
import { r as shouldRejectAdditionalProperties, t as normalizeSchemaIR } from "./schemaIR-C2qUNzC6.mjs";
|
|
14
|
+
import { n as validateAggregations } from "./validate-DV3hRbsz.mjs";
|
|
15
|
+
import { n as executeAggregation } from "./buildHandler-BG_CHXqQ.mjs";
|
|
16
16
|
import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
|
|
17
17
|
import { createHash, randomUUID } from "node:crypto";
|
|
18
18
|
import fp from "fastify-plugin";
|
|
@@ -50,7 +50,7 @@ import { z } from "zod";
|
|
|
50
50
|
* @returns McpServer instance (not yet connected to a transport)
|
|
51
51
|
*/
|
|
52
52
|
async function createMcpServer(config, authRef) {
|
|
53
|
-
const { McpServer } = await import("@modelcontextprotocol/
|
|
53
|
+
const { McpServer } = await import("@modelcontextprotocol/server");
|
|
54
54
|
const server = new McpServer({
|
|
55
55
|
name: config.name,
|
|
56
56
|
version: config.version ?? "1.0.0"
|
|
@@ -130,25 +130,39 @@ function registerTool(server, tool, authRef) {
|
|
|
130
130
|
const config = {};
|
|
131
131
|
if (tool.title) config.title = tool.title;
|
|
132
132
|
if (tool.description) config.description = tool.description;
|
|
133
|
+
/**
|
|
134
|
+
* Flat SHAPES are passed straight through. v2's `registerTool` carries a
|
|
135
|
+
* `ZodRawShape` overload and auto-wraps it in `z.object()` itself, so arc's
|
|
136
|
+
* host-facing ergonomic (`{ name: z.string() }`) needs no adaptation layer.
|
|
137
|
+
*
|
|
138
|
+
* arc's own MIGRATION-V2 notes claimed v2 "requires z.object(), raw shapes no
|
|
139
|
+
* longer accepted" and a wrap was written here on that basis. That was true of
|
|
140
|
+
* the PRE-ALPHA and is not true of 2.0.0 — checked against the shipped
|
|
141
|
+
* overloads. Wrapping anyway would have been arc maintaining an adapter for a
|
|
142
|
+
* conversion the SDK already owns.
|
|
143
|
+
*/
|
|
133
144
|
if (tool.inputSchema) config.inputSchema = tool.inputSchema;
|
|
134
145
|
if (tool.outputSchema) config.outputSchema = tool.outputSchema;
|
|
135
146
|
if (tool.annotations) config.annotations = tool.annotations;
|
|
136
|
-
srv.registerTool(tool.name, config, (input,
|
|
147
|
+
srv.registerTool(tool.name, config, (input, mcpCtx) => {
|
|
137
148
|
const ctx = {
|
|
138
149
|
session: authRef?.current ?? null,
|
|
150
|
+
/**
|
|
151
|
+
* v2 exposes logging as `ctx.mcpReq.log(level, message)` — the SDK builds
|
|
152
|
+
* the `notifications/message` envelope and correlates it to the in-flight
|
|
153
|
+
* request. v1 handed over a raw `sendNotification` that arc had to frame
|
|
154
|
+
* itself; that hand-framed envelope carried no request id, so a log line
|
|
155
|
+
* from a tool arrived uncorrelated.
|
|
156
|
+
*
|
|
157
|
+
* Still best-effort: a transport that has already closed must not turn a
|
|
158
|
+
* successful tool call into a failed one.
|
|
159
|
+
*/
|
|
139
160
|
log: async (level, message) => {
|
|
140
161
|
try {
|
|
141
|
-
|
|
142
|
-
if (notify) await notify({
|
|
143
|
-
method: "notifications/message",
|
|
144
|
-
params: {
|
|
145
|
-
level,
|
|
146
|
-
data: message
|
|
147
|
-
}
|
|
148
|
-
});
|
|
162
|
+
await (mcpCtx?.mcpReq)?.log?.(level, message);
|
|
149
163
|
} catch {}
|
|
150
164
|
},
|
|
151
|
-
extra
|
|
165
|
+
extra: mcpCtx
|
|
152
166
|
};
|
|
153
167
|
return tool.handler(input, ctx);
|
|
154
168
|
});
|
|
@@ -2035,7 +2049,7 @@ function resourceToTools(resource, config = {}) {
|
|
|
2035
2049
|
*/
|
|
2036
2050
|
function registerSchemaResources(server, resources, overrides) {
|
|
2037
2051
|
const srv = server;
|
|
2038
|
-
srv.
|
|
2052
|
+
srv.registerResource("schemas", "arc://schemas", {
|
|
2039
2053
|
title: "Arc Resource Schemas",
|
|
2040
2054
|
description: "All available resources",
|
|
2041
2055
|
mimeType: "application/json"
|
|
@@ -2053,7 +2067,7 @@ function registerSchemaResources(server, resources, overrides) {
|
|
|
2053
2067
|
for (const r of resources) {
|
|
2054
2068
|
const uri = `arc://schemas/${r.name}`;
|
|
2055
2069
|
const schemaOpts = r.schemaOptions;
|
|
2056
|
-
srv.
|
|
2070
|
+
srv.registerResource(`schema-${r.name}`, uri, {
|
|
2057
2071
|
title: `${r.displayName} Schema`,
|
|
2058
2072
|
description: `Schema for ${r.displayName}`,
|
|
2059
2073
|
mimeType: "application/json"
|
|
@@ -2181,7 +2195,7 @@ var McpSessionCache = class {
|
|
|
2181
2195
|
closeTransport(entry) {
|
|
2182
2196
|
try {
|
|
2183
2197
|
const transport = entry.transport;
|
|
2184
|
-
if (transport && typeof transport.close === "function") transport.close();
|
|
2198
|
+
if (transport && typeof transport.close === "function") Promise.resolve(transport.close()).catch(() => {});
|
|
2185
2199
|
} catch {}
|
|
2186
2200
|
}
|
|
2187
2201
|
};
|
|
@@ -2219,9 +2233,9 @@ var McpSessionCache = class {
|
|
|
2219
2233
|
const mcpPluginImpl = async (fastify, options) => {
|
|
2220
2234
|
let StreamableHTTPServerTransport;
|
|
2221
2235
|
try {
|
|
2222
|
-
StreamableHTTPServerTransport = (await import("@modelcontextprotocol/
|
|
2236
|
+
StreamableHTTPServerTransport = (await import("@modelcontextprotocol/node")).NodeStreamableHTTPServerTransport;
|
|
2223
2237
|
} catch {
|
|
2224
|
-
throw new Error("@modelcontextprotocol/
|
|
2238
|
+
throw new Error("@modelcontextprotocol/server and @modelcontextprotocol/node are required for MCP support. Install them: npm install @modelcontextprotocol/server @modelcontextprotocol/node");
|
|
2225
2239
|
}
|
|
2226
2240
|
try {
|
|
2227
2241
|
await import("zod");
|
|
@@ -2286,6 +2300,36 @@ const mcpPluginImpl = async (fastify, options) => {
|
|
|
2286
2300
|
const more = allTools.length > 5 ? ` (+${allTools.length - 5} more)` : "";
|
|
2287
2301
|
fastify.log.warn(`[arc/mcp] MCP server registered at "${prefix}" with auth DISABLED. Anyone who can reach this URL has full access to ${allTools.length} tools across ${enabledResources.length} resources: ${toolList}${more}. Pass \`auth: betterAuthInstance\` or \`auth: async (headers) => ...\` to gate access. Safe only for stdio transports, local development, or explicitly-public read-only APIs.`);
|
|
2288
2302
|
}
|
|
2303
|
+
const rebindOption = options.dnsRebindingProtection;
|
|
2304
|
+
if (rebindOption === void 0 ? options.auth === false : rebindOption !== false) {
|
|
2305
|
+
const { validateHostHeader, validateOriginHeader, localhostAllowedHostnames } = await import("@modelcontextprotocol/server");
|
|
2306
|
+
const cfg = rebindOption === void 0 || rebindOption === false ? {} : rebindOption;
|
|
2307
|
+
const allowedHosts = cfg.allowedHosts ?? localhostAllowedHostnames();
|
|
2308
|
+
const allowedOrigins = cfg.allowedOrigins ?? allowedHosts;
|
|
2309
|
+
const healthPath = `${prefix}/health`;
|
|
2310
|
+
fastify.addHook("onRequest", async (request, reply) => {
|
|
2311
|
+
if (!request.url.startsWith(prefix)) return;
|
|
2312
|
+
if (request.url.split("?")[0] === healthPath) return;
|
|
2313
|
+
const host = validateHostHeader(request.headers.host, allowedHosts);
|
|
2314
|
+
if (!host.ok) return reply.code(403).send({
|
|
2315
|
+
jsonrpc: "2.0",
|
|
2316
|
+
error: {
|
|
2317
|
+
code: -32e3,
|
|
2318
|
+
message: host.message
|
|
2319
|
+
},
|
|
2320
|
+
id: null
|
|
2321
|
+
});
|
|
2322
|
+
const origin = validateOriginHeader(request.headers.origin, allowedOrigins);
|
|
2323
|
+
if (!origin.ok) return reply.code(403).send({
|
|
2324
|
+
jsonrpc: "2.0",
|
|
2325
|
+
error: {
|
|
2326
|
+
code: -32e3,
|
|
2327
|
+
message: origin.message
|
|
2328
|
+
},
|
|
2329
|
+
id: null
|
|
2330
|
+
});
|
|
2331
|
+
});
|
|
2332
|
+
}
|
|
2289
2333
|
fastify.get(`${prefix}/health`, async (request, reply) => {
|
|
2290
2334
|
const liveness = {
|
|
2291
2335
|
status: "ok",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DzE6ikSH.mjs";
|
|
3
3
|
//#region src/cache/memory.ts
|
|
4
4
|
var memory_exports = /* @__PURE__ */ __exportAll({ MemoryCacheStore: () => MemoryCacheStore });
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-DzE6ikSH.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
4
|
//#region src/plugins/metrics.ts
|
|
5
5
|
var metrics_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { I as MiddlewareHandler, L as RequestWithExtras, Q as MiddlewareConfig } from "../index-
|
|
2
|
+
import { I as MiddlewareHandler, L as RequestWithExtras, Q as MiddlewareConfig } from "../index-D3sIPcD4.mjs";
|
|
3
3
|
import { RouteHandlerMethod } from "fastify";
|
|
4
4
|
//#region src/middleware/middleware.d.ts
|
|
5
5
|
interface NamedMiddleware {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "../constants-
|
|
3
|
-
import { t as multipartBody } from "../multipartBody-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../constants-BQ2FbhPB.mjs";
|
|
3
|
+
import { t as multipartBody } from "../multipartBody-Bl_gU3Wg.mjs";
|
|
4
4
|
//#region src/middleware/middleware.ts
|
|
5
5
|
/**
|
|
6
6
|
* Named Middleware — Priority-based, conditional middleware execution.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as startRenewingLease } from "../renewingLease-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as startRenewingLease } from "../renewingLease-B5Grm0pI.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/migrations/index.ts
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
3
|
-
import { n as convertRouteSchema } from "./schemaConverter-
|
|
4
|
-
import { t as resolveActionPermission } from "./actionPermissions-
|
|
5
|
-
import { t as pluralize } from "./pluralize-
|
|
6
|
-
import { t as buildActionBodySchema } from "./createActionRouter-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as getUserRoles } from "./userHelpers-DLueLQdQ.mjs";
|
|
3
|
+
import { n as convertRouteSchema } from "./schemaConverter-DENbixyA.mjs";
|
|
4
|
+
import { t as resolveActionPermission } from "./actionPermissions-4OGbe3Hf.mjs";
|
|
5
|
+
import { t as pluralize } from "./pluralize-BaQ62hOW.mjs";
|
|
6
|
+
import { t as buildActionBodySchema } from "./createActionRouter-BR93gCKg.mjs";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
//#region src/docs/openapi/canonical-schemas.ts
|
|
9
9
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { l as PermissionCheck } from "../base-C-NL2fTi.mjs";
|
|
3
|
-
import { t as ArcModule } from "../types-
|
|
3
|
+
import { t as ArcModule } from "../types-BVlowlm7.mjs";
|
|
4
4
|
import { OutboxStore } from "@classytic/primitives/outbox";
|
|
5
5
|
//#region src/outbox-admin/module.d.ts
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { i as NotFoundError, u as ValidationError } from "../errors-
|
|
3
|
-
import { t as defineResource } from "../defineResource-
|
|
4
|
-
import { n as getModuleExports, t as defineModule } from "../module-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as NotFoundError, u as ValidationError } from "../errors-BHD3L8of.mjs";
|
|
3
|
+
import { t as defineResource } from "../defineResource-DaIySrQr.mjs";
|
|
4
|
+
import { n as getModuleExports, t as defineModule } from "../module-CNcwCKUJ.mjs";
|
|
5
5
|
//#region src/outbox-admin/module.ts
|
|
6
6
|
/**
|
|
7
7
|
* Strip the domain payload and the stack unless explicitly opted in.
|