@classytic/arc 2.38.0 → 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-CYaDvmOB.mjs → BaseController-BqJtbiUA.mjs} +107 -23
- package/dist/{EventTransport-Cx60_s-6.d.mts → EventTransport-BPOQsEer.d.mts} +8 -0
- package/dist/{EventTransport-Gq7JWbWw.mjs → EventTransport-BUkTwY_x.mjs} +13 -2
- package/dist/{HookSystem-C0ikzqQf.mjs → HookSystem-96nzZLmk.mjs} +2 -2
- package/dist/{ResourceRegistry-DPcX--zk.mjs → ResourceRegistry-B9WnuG2Q.mjs} +2 -2
- package/dist/{actionPermissions-jlFZ1it4.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-BP8GHtjc.mjs → authorizationDecision-D_LFvMlm.mjs} +2 -2
- package/dist/{buildHandler-DjXOqIvX.mjs → buildHandler-BG_CHXqQ.mjs} +4 -4
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-a3ZEcJJs.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-BONghE1Y.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-8She7FgF.mjs → core-CsZR037F.mjs} +3 -3
- package/dist/{createActionRouter-Bqi6Bhhx.mjs → createActionRouter-BR93gCKg.mjs} +7 -7
- package/dist/{createAggregationRouter-BsYO7ktd.mjs → createAggregationRouter-CF40Aw95.mjs} +7 -7
- package/dist/createMcpServer-BVTs2S5G.d.mts +48 -0
- package/dist/{defineAggregation-0KBvqEEC.mjs → defineAggregation-BDA2Tw7v.mjs} +1 -1
- package/dist/{defineResource-BMdyRelW.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-C6woysGC.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-BdmIWPba.mjs → errorHandler-By9keRvX.mjs} +3 -3
- package/dist/{errors-2ExmOgIJ.mjs → errors-BHD3L8of.mjs} +1 -1
- package/dist/{eventPlugin-DJwpGMzx.mjs → eventPlugin-DB26V7uX.mjs} +5 -5
- package/dist/{eventPlugin-DFvHa4Nf.d.mts → eventPlugin-DfHaKEWQ.d.mts} +1 -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-jYA2oHyL.d.mts → fastify-augmentation-HncZMmze.d.mts} +3 -3
- package/dist/{fields-Cha2QCKH.mjs → fields-fA-Dkou5.mjs} +1 -1
- package/dist/{generate-BUP4Oydg.mjs → generate-BSSdtiOy.mjs} +4 -3
- package/dist/{headers-DeXNifVj.mjs → headers-BFEEshDS.mjs} +2 -2
- package/dist/{health-Bh0N_FLk.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-B78WZom8.d.mts → index-D3sIPcD4.d.mts} +47 -11
- package/dist/{index-D2uIUSQk.d.mts → index-DbMglURO.d.mts} +2 -2
- package/dist/{index-BRoDtjek.d.mts → index-SCsOJxWB.d.mts} +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +11 -11
- package/dist/{init-Dg_Am2o_.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-DYPVscCU.mjs → interface-DjtFnZxH.mjs} +1 -1
- package/dist/{jsonBody-DVui0uJl.mjs → jsonBody-Dx6jH_Nb.mjs} +2 -2
- package/dist/{keys-BSuxGS-B.mjs → keys-Ds3ekBiu.mjs} +1 -1
- package/dist/{loadResources-CNd1DWnK.mjs → loadResources-E5UFlRrT.mjs} +2 -2
- package/dist/{loadResourcesFromEntry-DNj8cpiY.mjs → loadResourcesFromEntry-C2jrJbWG.mjs} +2 -2
- package/dist/logger/index.mjs +1 -1
- package/dist/{mcpPlugin-KWsezMx7.mjs → mcpPlugin-D-3OLxNz.mjs} +75 -31
- package/dist/{memory-BiPVaCPg.mjs → memory-CNvjxzB2.mjs} +2 -2
- package/dist/{metrics-CsWaIVTa.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-BQXHxMEk.mjs → module-CNcwCKUJ.mjs} +1 -1
- package/dist/{multipartBody-u6VrS_iH.mjs → multipartBody-Bl_gU3Wg.mjs} +1 -1
- package/dist/{openapi-Dxc8RLy_.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-DyIqA5vo.mjs → outbox-module-6DMC_WNu.mjs} +40 -21
- package/dist/{outbox-module-CQXu_O6o.d.mts → outbox-module-CzsKRBvO.d.mts} +11 -2
- package/dist/permissions/index.mjs +5 -5
- package/dist/{permissions-H7Zcb82Z.mjs → permissions-C0GpDsB_.mjs} +6 -6
- package/dist/{pipe-SunhEaZ6.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-Da7IT_qJ.mjs → pluralize-BaQ62hOW.mjs} +1 -1
- package/dist/{preloadResources-DlhH81py.mjs → preloadResources-BAx5s9EF.mjs} +70 -21
- package/dist/{preloadResources-BbBkNkqK.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-CNyfaxGL.mjs → presets-CAaqVVcW.mjs} +4 -4
- package/dist/{projection-DSfEoooA.mjs → projection-qbCOEvsh.mjs} +2 -2
- package/dist/{queryCachePlugin-oTsmVyEQ.mjs → queryCachePlugin-2Pp9w-8D.mjs} +5 -5
- package/dist/rateLimitKey-umrS6-vu.mjs +41 -0
- package/dist/{realtime-CPmjjgqd.mjs → realtime-zzoNLDtj.mjs} +9 -9
- package/dist/{redis-stream-eh0eOtjh.d.mts → redis-stream-DSsPyYzd.d.mts} +7 -2
- package/dist/{registerRoute-XvcI_3sh.mjs → registerRoute-_6zHiz0x.mjs} +6 -6
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-UFEJQN8R.mjs → registry-CEpoRpLP.mjs} +2 -2
- package/dist/{renewingLease-DuRGVOMe.mjs → renewingLease-B5Grm0pI.mjs} +1 -1
- package/dist/{replyHelpers-BHebarf0.mjs → replyHelpers-9h-a592u.mjs} +2 -2
- package/dist/{requestContext-DpmntRZy.mjs → requestContext-D4PuGhEw.mjs} +1 -1
- package/dist/{rolldown-runtime-Add2L50I.mjs → rolldown-runtime-DzE6ikSH.mjs} +1 -1
- package/dist/{runtimeCapabilities-D793Pxci.mjs → runtimeCapabilities-Bo7rSKjm.mjs} +1 -1
- package/dist/{schedules-DthM8Qag.mjs → schedules-Dm21pqHU.mjs} +8 -4
- package/dist/{schemaConverter-Db-MMsH6.mjs → schemaConverter-DENbixyA.mjs} +1 -1
- package/dist/{schemaIR-CIXShch7.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-D03sk17n.mjs → scope-CdYxQVxt.mjs} +4 -4
- package/dist/{simpleEqualityMatcher-B7qVjQBv.mjs → simpleEqualityMatcher-Cldubvul.mjs} +1 -1
- package/dist/{sse-D4MYqkic.mjs → sse-DbyXoQun.mjs} +5 -5
- package/dist/{sseStream-BuMNPR6r.mjs → sseStream-BfZtL5-m.mjs} +2 -2
- package/dist/{store-helpers-CIF4RG8s.mjs → store-helpers-BfyOd5i6.mjs} +1 -1
- package/dist/{streaming-DkpW1HwJ.mjs → streaming-CFwCzEvU.mjs} +1 -1
- package/dist/{subscribe-helpers-CBZOi6pk.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-DMmvcfdo.mjs → transactionContext-46KyUADP.mjs} +1 -1
- package/dist/{typeGuards-DHTnEs5X.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-LQFwC37d.d.mts → types-9rvxn5Ym.d.mts} +46 -1
- package/dist/{types-BRU-Kd3t.d.mts → types-BVlowlm7.d.mts} +2 -2
- package/dist/{types-BqLyyH0o.mjs → types-CNQyOrLk.mjs} +4 -4
- package/dist/usage/index.mjs +0 -0
- package/dist/{userHelpers-CXySQFRg.mjs → userHelpers-DLueLQdQ.mjs} +1 -1
- package/dist/utils/index.d.mts +4 -4
- package/dist/utils/index.mjs +11 -11
- package/dist/{utils-BbGG8XNT.mjs → utils-CUFBrhq-.mjs} +14 -6
- package/dist/{validate-CidSeUrx.mjs → validate-DV3hRbsz.mjs} +2 -2
- package/dist/{versioning-C2r0eOZ4.mjs → versioning-BXwmj5SD.mjs} +3 -3
- package/dist/{versioning-B843jOYX.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-CewdR-m6.mjs +0 -15
|
@@ -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 { a as resolveEffectiveRoles, t as applyFieldReadPermissions } from "./fields-
|
|
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as transactionContext } from "./transactionContext-
|
|
3
|
-
import { i as resolveEventTransport } from "./EventTransport-
|
|
4
|
-
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as transactionContext } from "./transactionContext-46KyUADP.mjs";
|
|
3
|
+
import { i as resolveEventTransport } from "./EventTransport-BUkTwY_x.mjs";
|
|
4
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-BfyOd5i6.mjs";
|
|
5
5
|
import { and, anyOf, eq, lte, ne, or } from "@classytic/repo-core/filter";
|
|
6
6
|
import { randomBytes } from "node:crypto";
|
|
7
7
|
import { InvalidOutboxEventError, OutboxOwnershipError } from "@classytic/primitives/outbox";
|
|
@@ -807,25 +807,44 @@ function createOutboxModule(options) {
|
|
|
807
807
|
* module exists to prevent, arrived at from the other side.
|
|
808
808
|
*/
|
|
809
809
|
if (transport === void 0) throw new Error(`Outbox module "${name}" could not resolve an event transport, so its relay would tick forever without publishing while the store grows. Register arc's events plugin (it is on by default — check \`arcPlugins.events !== false\`), or pass an explicit \`transport\` to \`createOutboxModule\`. Note the outbox needs the RAW EventTransport, not the \`fastify.events\` facade: the facade takes \`(type, payload, meta?)\` and fails open, which would acknowledge rows whose publish actually failed.`);
|
|
810
|
+
const relay = new EventOutbox({
|
|
811
|
+
store,
|
|
812
|
+
transport,
|
|
813
|
+
...options.batchSize !== void 0 ? { batchSize: options.batchSize } : {},
|
|
814
|
+
...options.leaseMs !== void 0 ? { leaseMs: options.leaseMs } : {},
|
|
815
|
+
consumerId: options.consumerId ?? mintConsumerId(name),
|
|
816
|
+
onError: options.onError ?? ((info) => {
|
|
817
|
+
fastify.log.error({
|
|
818
|
+
err: info.error,
|
|
819
|
+
kind: info.kind,
|
|
820
|
+
...info.event?.meta.id !== void 0 ? { eventId: info.event.meta.id } : {},
|
|
821
|
+
...info.event?.type !== void 0 ? { eventType: info.event.type } : {}
|
|
822
|
+
}, `outbox relay "${name}" failed`);
|
|
823
|
+
}),
|
|
824
|
+
...options.failurePolicy !== void 0 ? { failurePolicy: options.failurePolicy } : {},
|
|
825
|
+
...options.sessionProvider === false ? {} : { sessionProvider: options.sessionProvider ?? (() => transactionContext.get()) }
|
|
826
|
+
});
|
|
827
|
+
/**
|
|
828
|
+
* One pass per burst of requests. `drainQueued` stays true from the
|
|
829
|
+
* first request until the pass STARTS, so a request landing mid-pass
|
|
830
|
+
* schedules the next one — a row written during a pass is never left
|
|
831
|
+
* waiting for the interval.
|
|
832
|
+
*/
|
|
833
|
+
let drainQueued = false;
|
|
834
|
+
const requestDrain = () => {
|
|
835
|
+
if (drainQueued) return;
|
|
836
|
+
drainQueued = true;
|
|
837
|
+
setImmediate(() => {
|
|
838
|
+
drainQueued = false;
|
|
839
|
+
relay.relayBatch().catch((err) => {
|
|
840
|
+
fastify.log.error({ err }, `outbox relay "${name}" requested drain failed`);
|
|
841
|
+
});
|
|
842
|
+
});
|
|
843
|
+
};
|
|
810
844
|
exports = {
|
|
811
845
|
store,
|
|
812
|
-
relay
|
|
813
|
-
|
|
814
|
-
transport,
|
|
815
|
-
...options.batchSize !== void 0 ? { batchSize: options.batchSize } : {},
|
|
816
|
-
...options.leaseMs !== void 0 ? { leaseMs: options.leaseMs } : {},
|
|
817
|
-
consumerId: options.consumerId ?? mintConsumerId(name),
|
|
818
|
-
onError: options.onError ?? ((info) => {
|
|
819
|
-
fastify.log.error({
|
|
820
|
-
err: info.error,
|
|
821
|
-
kind: info.kind,
|
|
822
|
-
...info.event?.meta.id !== void 0 ? { eventId: info.event.meta.id } : {},
|
|
823
|
-
...info.event?.type !== void 0 ? { eventType: info.event.type } : {}
|
|
824
|
-
}, `outbox relay "${name}" failed`);
|
|
825
|
-
}),
|
|
826
|
-
...options.failurePolicy !== void 0 ? { failurePolicy: options.failurePolicy } : {},
|
|
827
|
-
...options.sessionProvider === false ? {} : { sessionProvider: options.sessionProvider ?? (() => transactionContext.get()) }
|
|
828
|
-
})
|
|
846
|
+
relay,
|
|
847
|
+
requestDrain
|
|
829
848
|
};
|
|
830
849
|
return exports;
|
|
831
850
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as EventTransport, n as DomainEvent, t as DeadLetteredEvent } from "./EventTransport-
|
|
3
|
-
import { t as ArcModule } from "./types-
|
|
2
|
+
import { a as EventTransport, n as DomainEvent, t as DeadLetteredEvent } from "./EventTransport-BPOQsEer.mjs";
|
|
3
|
+
import { t as ArcModule } from "./types-BVlowlm7.mjs";
|
|
4
4
|
import { FastifyInstance } from "fastify";
|
|
5
5
|
import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
|
|
6
6
|
import { OutboxFailurePolicy, OutboxStore, OutboxWriteOptions } from "@classytic/primitives/outbox";
|
|
@@ -372,6 +372,15 @@ interface OutboxModuleExports {
|
|
|
372
372
|
store: OutboxStore;
|
|
373
373
|
/** The relay, for a host that wants to drain on demand (tests, admin actions). */
|
|
374
374
|
relay: EventOutbox;
|
|
375
|
+
/**
|
|
376
|
+
* Ask for a relay pass SOON, without waiting for the interval. Coalesced:
|
|
377
|
+
* any number of calls before the pass runs produce ONE pass. Never throws
|
|
378
|
+
* and returns nothing — a unit of work calls this after commit so a row it
|
|
379
|
+
* just wrote is delivered in milliseconds rather than up to `relayEveryMs`
|
|
380
|
+
* later. Safe under concurrency: the store's lease and fence token make an
|
|
381
|
+
* extra pass a no-op, not a double publish.
|
|
382
|
+
*/
|
|
383
|
+
requestDrain: () => void;
|
|
375
384
|
}
|
|
376
385
|
/**
|
|
377
386
|
* Compose the outbox as a module.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as conjoinPolicyFilters, i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-
|
|
3
|
-
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-
|
|
4
|
-
import { a as resolveEffectiveRoles, i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "../fields-
|
|
5
|
-
import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as conjoinPolicyFilters, i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-D_LFvMlm.mjs";
|
|
3
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-DLueLQdQ.mjs";
|
|
4
|
+
import { a as resolveEffectiveRoles, i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "../fields-fA-Dkou5.mjs";
|
|
5
|
+
import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-C0GpDsB_.mjs";
|
|
6
6
|
export { GRANT_MODES, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createOrgPermissions, createRoleHierarchy, deny, denyAll, describePermission, describePermissionMap, evaluatePermissionDecision, explainAccess, fields, fullPublic, getUserRoles, introspectCheck, introspectModule, introspectRegistry, modeSatisfies, normalizeRoles, normalizeToDecision, not, ownerWithAdminBypass, permissionMatrix, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAgentScope, requireAuth, requireDPoP, requireGrant, requireMandate, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requirePlatformRole, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, resolveEffectiveRoles, roles, scopeOf, when };
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
-
import { a as conjoinPolicyFilters, i as normalizeToDecision } from "./authorizationDecision-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
6
|
-
import { C as isService, S as isOrgInScope, a as getDPoPJkt, b as isElevated, d as getScopeContext, f as getScopeContextMap, g as getUserId, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, u as getRequestScope, v as hasOrgAccess, x as isMember } from "./types-
|
|
7
|
-
import { t as MemoryCacheStore } from "./memory-
|
|
4
|
+
import { a as conjoinPolicyFilters, i as normalizeToDecision } from "./authorizationDecision-D_LFvMlm.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-DLueLQdQ.mjs";
|
|
6
|
+
import { C as isService, S as isOrgInScope, a as getDPoPJkt, b as isElevated, d as getScopeContext, f as getScopeContextMap, g as getUserId, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, u as getRequestScope, v as hasOrgAccess, x as isMember } from "./types-CNQyOrLk.mjs";
|
|
7
|
+
import { t as MemoryCacheStore } from "./memory-CNvjxzB2.mjs";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
//#region src/permissions/context.ts
|
|
10
10
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as ForbiddenError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as ForbiddenError } from "./errors-BHD3L8of.mjs";
|
|
3
3
|
//#region src/pipeline/pipe.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compose pipeline steps into an ordered array.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { Ct as PipelineStep, Fn as IControllerResponse, St as PipelineContext, _t as Guard, bt as OperationFilter, vt as Interceptor, wt as Transform, xt as PipelineConfig, yt as NextFunction } from "../index-
|
|
2
|
+
import { Ct as PipelineStep, Fn as IControllerResponse, St as PipelineContext, _t as Guard, bt as OperationFilter, vt as Interceptor, wt as Transform, xt as PipelineConfig, yt as NextFunction } from "../index-D3sIPcD4.mjs";
|
|
3
3
|
//#region src/pipeline/guard.d.ts
|
|
4
4
|
interface GuardOptions {
|
|
5
5
|
operations?: OperationFilter;
|
package/dist/pipeline/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as pipe, t as executePipeline } from "../pipe-
|
|
1
|
+
/*! @classytic/arc v2.40.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as pipe, t as executePipeline } from "../pipe-4_XamfxI.mjs";
|
|
3
3
|
//#region src/pipeline/guard.ts
|
|
4
4
|
/**
|
|
5
5
|
* Create a named guard.
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import { t as AnyRecord } from "../base-C-NL2fTi.mjs";
|
|
3
|
-
import { At as RouteDefinition, J as PresetHook, Q as MiddlewareConfig, et as RouteSchemaOptions } from "../index-
|
|
4
|
-
import { i as errorHandlerPlugin, n as ErrorMapper, r as defaultIsDuplicateKeyError, t as ErrorHandlerOptions } from "../errorHandler
|
|
5
|
-
import { _ as HealthCheck, b as healthPlugin, f as ScheduleDefinition, g as schedulesPlugin, h as _default$8, m as SchedulesPluginOptions, p as ScheduleStats, v as HealthOptions, y as _default$3 } from "../types-
|
|
6
|
-
import { a as arcCorePlugin, i as _default, n as ArcCorePluginOptions, r as PluginMeta, t as ArcCore } from "../fastify-augmentation-
|
|
7
|
-
import { _ as CachingRule, a as MetricsCollector, c as metricsPlugin, d as _default$6, f as realtimePlugin, g as CachingOptions, h as ssePlugin, i as MetricEntry, l as ChangeOperation, m as _default$9, n as _default$10, o as MetricsOptions, p as SSEOptions, r as versioningPlugin, s as _default$4, t as VersioningOptions, u as RealtimeOptions, v as _default$1, y as cachingPlugin } from "../versioning-
|
|
3
|
+
import { At as RouteDefinition, J as PresetHook, Q as MiddlewareConfig, et as RouteSchemaOptions } from "../index-D3sIPcD4.mjs";
|
|
4
|
+
import { i as errorHandlerPlugin, n as ErrorMapper, r as defaultIsDuplicateKeyError, t as ErrorHandlerOptions } from "../errorHandler--4rSMMvq.mjs";
|
|
5
|
+
import { _ as HealthCheck, b as healthPlugin, f as ScheduleDefinition, g as schedulesPlugin, h as _default$8, m as SchedulesPluginOptions, p as ScheduleStats, v as HealthOptions, y as _default$3 } from "../types-BVlowlm7.mjs";
|
|
6
|
+
import { a as arcCorePlugin, i as _default, n as ArcCorePluginOptions, r as PluginMeta, t as ArcCore } from "../fastify-augmentation-HncZMmze.mjs";
|
|
7
|
+
import { _ as CachingRule, a as MetricsCollector, c as metricsPlugin, d as _default$6, f as realtimePlugin, g as CachingOptions, h as ssePlugin, i as MetricEntry, l as ChangeOperation, m as _default$9, n as _default$10, o as MetricsOptions, p as SSEOptions, r as versioningPlugin, s as _default$4, t as VersioningOptions, u as RealtimeOptions, v as _default$1, y as cachingPlugin } from "../versioning-P3V6ATyC.mjs";
|
|
8
8
|
import { t as TracingOptions } from "../tracing-Dro5eH6j.mjs";
|
|
9
9
|
import { PaginatedResult } from "@classytic/repo-core/pagination";
|
|
10
10
|
import { FastifyInstance, FastifyPluginAsync } from "fastify";
|