@classytic/arc 2.52.0 → 2.53.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/README.md +2 -1
- package/dist/{EventTransport-DeNze_-C.mjs → EventTransport-B3jTKMQH.mjs} +2 -2
- package/dist/{HookSystem-DTffXM1X.mjs → HookSystem-DNwxV463.mjs} +2 -2
- package/dist/{ResourceRegistry-tlqXSZoK.mjs → ResourceRegistry-Ck7RFodL.mjs} +2 -2
- package/dist/{acquire-7JKEkKnN.mjs → acquire-DkLruwhL.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 +1 -1
- package/dist/auth/index.mjs +7 -7
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/auth/social/index.mjs +1 -1
- package/dist/{authorizationDecision-DKmH4tZ-.mjs → authorizationDecision-gB5-bHDp.mjs} +5 -5
- package/dist/bootError-BT3z3cvX.mjs +38 -0
- package/dist/{boundedMap-zxGBpXX0.mjs → boundedMap-Ddw2yGb2.mjs} +1 -1
- package/dist/{buildHandler-ZDV6LRZ_.mjs → buildHandler-B8IDGmhD.mjs} +5 -5
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-DceUN9Xk.mjs → caching-BitJDAY0.mjs} +2 -2
- package/dist/{claimed-DsP5Hi_f.mjs → claimed-CM_-lFHX.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 +18 -1
- package/dist/cli/commands/describe.mjs +39 -7
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.d.mts +3 -1
- package/dist/cli/commands/doctor.mjs +135 -22
- 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-Ca2IQFy2.mjs → constants-D9EiaO5s.mjs} +1 -1
- package/dist/context/index.d.mts +5 -2
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +7 -7
- package/dist/{core-M18RhMqi.mjs → core-B_06Fcn0.mjs} +3 -3
- package/dist/{createActionRouter-zXlrwWVs.mjs → createActionRouter-DtxUXOCI.mjs} +5 -5
- package/dist/{createAggregationRouter-CN0Da9nC.mjs → createAggregationRouter-BMiKyDoW.mjs} +7 -7
- package/dist/{createApp-BC67ACu4.mjs → createApp-CEdGZtkP.mjs} +207 -44
- package/dist/{createMcpServer-CS2KOVP6.d.mts → createMcpServer-Bk3ls5jS.d.mts} +1 -1
- package/dist/{defineAggregation-DqAGb5oI.mjs → defineAggregation-DUsrGcsm.mjs} +1 -1
- package/dist/{defineResource-DC5UqkQv.mjs → defineResource-q8TsJpOm.mjs} +92 -36
- package/dist/deprecation-DX625dth.mjs +27 -0
- 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-DiXVg98q.mjs → elevation-NJ3908pJ.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-BUTm9P_f.mjs → errorHandler-Ke6PGvF7.mjs} +7 -4
- package/dist/{errors-DxpHZBlW.mjs → errors-Ukhmfmmx.mjs} +1 -1
- package/dist/{eventPlugin-BY38F6yK.d.mts → eventPlugin-BeJasppx.d.mts} +7 -18
- package/dist/{eventPlugin-ZsIQPRso.mjs → eventPlugin-DTKAgSvb.mjs} +10 -8
- package/dist/{eventTypes-D-pFtqT1.mjs → eventTypes-DpDQtyR6.mjs} +2 -2
- package/dist/events/index.d.mts +2 -2
- package/dist/events/index.mjs +8 -8
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +28 -5
- package/dist/factory/index.mjs +12 -7
- package/dist/{fastify-augmentation-CPReFhZ1.d.mts → fastify-augmentation-DjxuSRG4.d.mts} +4 -3
- package/dist/{fieldTypes-f-3TZgR3.mjs → fieldTypes-BtFpQO6I.mjs} +2 -2
- package/dist/{fields-kCbIDTjA.mjs → fields-B7fuROWK.mjs} +1 -1
- package/dist/{filter-merge-UJCgjbZR.mjs → filter-merge-BuzZ-r9z.mjs} +1 -1
- package/dist/{generate-CLpmzbJ_.mjs → generate-c4F39pk1.mjs} +4 -4
- package/dist/{headers-Bh47h0XH.mjs → headers-Ib7BDgRI.mjs} +2 -2
- package/dist/{health-CEpgVAl7.mjs → health-22T82HAa.mjs} +1 -1
- package/dist/health-skjSwNaC.d.mts +36 -0
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.mjs +4 -4
- package/dist/http-cache/purgers/cloudflare.mjs +2 -2
- package/dist/http-cache/purgers/fastly.mjs +2 -2
- package/dist/http-cache/testing/index.mjs +1 -1
- package/dist/idempotency/index.d.mts +7 -1
- package/dist/idempotency/index.mjs +9 -7
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/{index-CMNpMBtW.d.mts → index-BzUyno-u.d.mts} +14 -5
- package/dist/{index-yXXCsKl7.d.mts → index-CXqYFGoH.d.mts} +13 -4
- package/dist/{index-CSbDhif4.d.mts → index-CaBFPmnu.d.mts} +10 -6
- package/dist/{index-DCH08eqQ.d.mts → index-DWn0o4U7.d.mts} +2 -2
- package/dist/{index-DLCcLUQT.d.mts → index-DtHACefu.d.mts} +109 -116
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +12 -12
- package/dist/{init-B43DXBpc.mjs → init-XY5slyuS.mjs} +3 -3
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.d.mts +1 -1
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.d.mts +9 -4
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.d.mts +2 -2
- package/dist/integrations/mcp/testing.mjs +2 -2
- 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/invariants-COekUeoh.mjs +120 -0
- package/dist/{jsonBody-CkKs6dA_.mjs → jsonBody-BNlcGUnb.mjs} +2 -2
- package/dist/{keys-DHrHnT0f.mjs → keys-DwvXJwUX.mjs} +1 -1
- package/dist/{loadResources-CFdzAWQZ.mjs → loadResources-izEeQLO_.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-DkoSiJsI.mjs → loadResourcesFromEntry-CijqjbHE.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-DJwz_-Pl.mjs → logger-DdMS0XC_.mjs} +1 -1
- package/dist/{mcpPlugin-CA_MDFlS.mjs → mcpPlugin-D0tSZqKk.mjs} +24 -22
- package/dist/{memory-B9CFHbA_.mjs → memory-Ay0haw9n.mjs} +3 -3
- package/dist/{metrics-DSKv-T9K.mjs → metrics-Bpgf4UL6.mjs} +3 -3
- package/dist/middleware/index.d.mts +1 -1
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-C0JCsnO7.mjs → module-BLrTmMyk.mjs} +1 -1
- package/dist/{multiTenant-QtDzxx_K.d.mts → multiTenant-Cf0Ye-Wu.d.mts} +1 -1
- package/dist/{multipartBody-Bxz-q6hI.mjs → multipartBody-L2gr96df.mjs} +1 -1
- package/dist/{observeSend-DfNkdGww.mjs → observeSend-B7FEdk_g.mjs} +1 -1
- package/dist/{openapi-Dmp7Ipsi.mjs → openapi-COrL_33P.mjs} +6 -6
- package/dist/outbox-admin/index.d.mts +1 -1
- package/dist/outbox-admin/index.mjs +6 -6
- package/dist/{outbox-module-vT6PaThj.mjs → outbox-module-BY2HtnjU.mjs} +7 -7
- package/dist/{outbox-module-DzW6zwWJ.d.mts → outbox-module-C1QWMloZ.d.mts} +5 -8
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +8 -8
- package/dist/{permissions-Cga6KBOX.mjs → permissions-CEyeDHtT.mjs} +36 -17
- package/dist/{pipe-CqPweKdL.mjs → pipe-DIAr91at.mjs} +2 -2
- package/dist/pipeline/index.d.mts +1 -1
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-CbDTFbTj.mjs → plan-BhKHIkFl.mjs} +75 -20
- package/dist/{plugin-8Z1khbAI.mjs → plugin-D6hrdx-j.mjs} +72 -38
- package/dist/plugins/index.d.mts +4 -3
- package/dist/plugins/index.mjs +18 -18
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +177 -85
- package/dist/{pluralize-D4vcPLVs.mjs → pluralize-CJKgYkVc.mjs} +1 -1
- package/dist/presetPermission-2pcRVYRG.mjs +23 -0
- package/dist/presets/filesUpload.d.mts +4 -2
- package/dist/presets/filesUpload.mjs +11 -6
- package/dist/presets/index.d.mts +6 -4
- 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 +2 -2
- package/dist/presets/search.mjs +54 -38
- package/dist/{presets-D28IABZe.mjs → presets-st11ePNn.mjs} +150 -41
- package/dist/{projection-aHCtDQQ9.mjs → projection-B4rqiJTi.mjs} +2 -2
- package/dist/{purger.types-CNFmEtFu.mjs → purger.types-BcHeAhY_.mjs} +1 -1
- package/dist/{queryCachePlugin-CwpEjCwz.mjs → queryCachePlugin-BgSc2bga.mjs} +6 -6
- package/dist/rateLimitKey-DLGdeFd2.mjs +138 -0
- package/dist/{realtime-Dvu8ES2z.mjs → realtime-CpYpIFsm.mjs} +11 -11
- package/dist/registry/index.d.mts +2 -2
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-DmxbzW7-.mjs → registry-BQsdAlZ_.mjs} +2 -2
- package/dist/{relay-CEaCmUfG.mjs → relay-CmT3gtkP.mjs} +11 -12
- package/dist/{renewingLease-g2FjB3im.mjs → renewingLease-DaoP0K-e.mjs} +1 -1
- package/dist/{replyHelpers-CSByAX_Z.mjs → replyHelpers-SiLr1wK4.mjs} +2 -2
- package/dist/{requestContext-yc7MSgmq.mjs → requestContext-B-TjFpWt.mjs} +8 -3
- package/dist/{health-W4S2yFBL.mjs → requestId-ClcKoWLq.mjs} +154 -116
- package/dist/{requirement-Dm8njSoC.mjs → requirement-BygDzjDS.mjs} +1 -1
- package/dist/{resourceRateLimit-PQaY3HW1.mjs → resourceRateLimit-DdIYis3m.mjs} +2 -2
- package/dist/{rolldown-runtime-BBBkGgwA.mjs → rolldown-runtime-Cy6j0m8_.mjs} +1 -1
- package/dist/{routeValidator-fuG51bQA.mjs → routeValidator-Bn-x2gaJ.mjs} +1 -1
- package/dist/{runtimeCapabilities-B8IT7xiQ.mjs → runtimeCapabilities-DY20Pibh.mjs} +7 -2
- package/dist/{schedules-0-aS4jDV.mjs → schedules-CwqC0Mp0.mjs} +5 -5
- package/dist/{schemaConverter-Cs3SwP4R.mjs → schemaConverter-XoLKVpzG.mjs} +2 -2
- package/dist/{schemaIR-By8XiNeE.mjs → schemaIR-DP7mMj7c.mjs} +16 -16
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.d.mts +6 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-BWNAlBj0.mjs → scope-B0vgM2Zw.mjs} +4 -4
- package/dist/{shutdown-Cf-27xsS.mjs → shutdown-C76Hn-Th.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-e-dgJcUO.mjs → simpleEqualityMatcher-Qbl-11cE.mjs} +1 -1
- package/dist/{sse-C3bj5qWi.mjs → sse-eyb8lNuI.mjs} +7 -7
- package/dist/{sseStream-BYZbpFDa.mjs → sseStream-BsBesrfw.mjs} +2 -2
- package/dist/{store-helpers-B9HierHY.mjs → store-helpers-D1yIVa91.mjs} +1 -1
- package/dist/{streaming-EN8NJWxr.mjs → streaming-DKziqs1Z.mjs} +1 -1
- package/dist/{subscriberIdentity-DSqCh38x.mjs → subscriberIdentity-DpdSQMQq.mjs} +1 -1
- package/dist/{tenancy-CAqjGQcQ.mjs → tenancy-YuRYsOPr.mjs} +2 -2
- package/dist/{tenantPreparation-CVBWarqs.mjs → tenantPreparation-Bk8ouRB3.mjs} +17 -5
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +4 -4
- package/dist/testing/index.mjs +11 -11
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.d.mts +1 -1
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-CKI_Oyub.mjs → timing-BtIDIdQz.mjs} +1 -1
- package/dist/{transactionContext-D0UZFoSy.mjs → transactionContext-BsQ5ortM.mjs} +1 -1
- package/dist/{typeGuards-CLYkmBLT.mjs → typeGuards-Cr2_zEW0.mjs} +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-BeEJm-DV.d.mts → types-CQhHTZXs.d.mts} +48 -35
- package/dist/{types-B4E0sc6D.d.mts → types-DWFgq8EP.d.mts} +1 -1
- package/dist/{types-Cunc4shv.mjs → types-ZvdR7MVa.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-cT5j1kgp.mjs → userHelpers-CwpEK36a.mjs} +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-DlNkm1dI.mjs → utils-CnrfcYMq.mjs} +6 -6
- package/dist/{validate-63QThRoS.mjs → validate-BTQBh-Dr.mjs} +3 -3
- package/dist/{versioning-f2YGmh4i.mjs → versioning-DiLykI6U.mjs} +3 -3
- package/dist/{workScope-DwspXz70.mjs → workScope-C3tPz_Gt.mjs} +2 -2
- package/package.json +34 -9
- package/skills/arc/SKILL.md +5 -5
- package/skills/arc/references/api-reference.md +1 -1
- package/skills/arc/references/boot.md +17 -2
- package/skills/arc/references/events.md +0 -1
- package/skills/arc/references/mcp-setup.md +3 -2
- package/skills/arc/references/multi-tenancy.md +1 -1
- package/skills/arc/references/production-api.md +19 -12
- package/skills/arc/references/production-audit.md +1 -1
- package/skills/arc/references/production-boot.md +3 -3
- package/skills/arc/references/production-idempotency.md +2 -2
- package/skills/arc/references/production-observability.md +14 -2
- package/skills/arc/references/production-reliability.md +1 -1
- package/skills/arc/references/querying.md +1 -2
- package/skills/arc/references/resources.md +8 -6
- package/skills/arc/references/testing.md +1 -1
- package/skills/arc-code-review/references/arc-cheatsheet.md +1 -1
- package/skills/arc-code-review/references/recipe-scope-permissions.md +1 -1
- package/skills/arc-module-publishing/references/resource-assembly.md +2 -2
- package/dist/rateLimitKey-D9dl3FQn.mjs +0 -40
|
@@ -8,6 +8,7 @@ import { n as FieldPermissionMap } from "./fields-JTkrtO-r.mjs";
|
|
|
8
8
|
import { s as ResourceHttpCacheConfig } from "./policy.types-DPqToKG1.mjs";
|
|
9
9
|
import { n as EncryptionDirective } from "./types-0Dqlbgn8.mjs";
|
|
10
10
|
import { n as DomainEvent } from "./EventTransport-CYEoCJGe.mjs";
|
|
11
|
+
import { t as HealthCheck$1 } from "./health-skjSwNaC.mjs";
|
|
11
12
|
import { Filter } from "@classytic/repo-core/filter";
|
|
12
13
|
import { AggDateBucket, AggMeasure, AggTopN, QueryOptions, TenantPurgeStrategy, TransactionHandle } from "@classytic/repo-core/repository";
|
|
13
14
|
import { KeysetPaginationResult, OffsetPaginationResult } from "@classytic/repo-core/pagination";
|
|
@@ -1146,6 +1147,13 @@ declare class QueryResolver {
|
|
|
1146
1147
|
* it as a boot diagnostic instead of arc silently picking a winner.
|
|
1147
1148
|
*/
|
|
1148
1149
|
private permittedDefaultSort;
|
|
1150
|
+
/**
|
|
1151
|
+
* The row scope a list read applies, in the record dialect: `base` AND the permission
|
|
1152
|
+
* layer's `_policyFilters` AND the tenant filter `resolveTenancy` decides. `resolve`
|
|
1153
|
+
* builds every list filter from it; reads that cannot take the parsed query (search) use
|
|
1154
|
+
* it alone.
|
|
1155
|
+
*/
|
|
1156
|
+
scopeFilter(arcContext: ArcInternalMetadata | undefined, base?: AnyRecord): AnyRecord;
|
|
1149
1157
|
/**
|
|
1150
1158
|
* Resolve a request into parsed query options -- ONE parse per request.
|
|
1151
1159
|
* Combines what was previously _buildContext + _parseQueryOptions + _applyFilters.
|
|
@@ -1429,6 +1437,18 @@ declare class BaseCrudController<TDoc = AnyRecord, TRepository extends Repositor
|
|
|
1429
1437
|
* method is a `501`, never a fallback to a full scan.
|
|
1430
1438
|
*/
|
|
1431
1439
|
protected dispatchResourceVerb(req: IRequestContext): Promise<IControllerResponse<unknown>> | null;
|
|
1440
|
+
/**
|
|
1441
|
+
* The row scope `list` applies, for reads that bypass `getAll` (the search preset):
|
|
1442
|
+
* `filter` (record dialect: permission filters AND tenant), the repository `options`
|
|
1443
|
+
* `list` passes (tenant context; the tenant key and `bypassTenant` are always present so
|
|
1444
|
+
* spreading them last overrides a caller-supplied value), and `allows(doc)`, the
|
|
1445
|
+
* post-fetch check `getBySlug` uses, for repositories that cannot take a filter.
|
|
1446
|
+
*/
|
|
1447
|
+
listScope(req: IRequestContext): {
|
|
1448
|
+
filter: AnyRecord;
|
|
1449
|
+
options: AnyRecord;
|
|
1450
|
+
allows: (doc: unknown) => boolean;
|
|
1451
|
+
};
|
|
1432
1452
|
/** Resolve filter + tenant/audit options for a dispatch verb. */
|
|
1433
1453
|
private resolveDispatchScope;
|
|
1434
1454
|
/** `?_count=true` → `repo.count(filter)` */
|
|
@@ -1758,67 +1778,30 @@ interface RouteMcpConfig {
|
|
|
1758
1778
|
/**
|
|
1759
1779
|
* Route definition — single custom-route shape (user-facing + internal).
|
|
1760
1780
|
*
|
|
1761
|
-
* - `handler:
|
|
1762
|
-
* - `
|
|
1763
|
-
* -
|
|
1781
|
+
* - `handler: function` → arc pipeline + MCP tool (the normal form)
|
|
1782
|
+
* - `rawHandler: function` → raw Fastify handler → no pipeline, no MCP by default
|
|
1783
|
+
* (streams, raw-body webhooks, files, redirects)
|
|
1764
1784
|
*/
|
|
1765
1785
|
interface RouteDefinition {
|
|
1766
1786
|
readonly method: RouteMethod;
|
|
1767
1787
|
/** Path relative to resource prefix */
|
|
1768
1788
|
readonly path: string;
|
|
1769
1789
|
/**
|
|
1770
|
-
* Route handler
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
1773
|
-
*
|
|
1790
|
+
* Route handler: receives `IRequestContext`, returns `IControllerResponse`
|
|
1791
|
+
* (arc pipeline + MCP tool). To reach a controller method, call it:
|
|
1792
|
+
* `handler: (ctx) => controller.getStats(ctx)`. For a raw Fastify handler
|
|
1793
|
+
* `(request, reply)`, use {@link rawHandler}.
|
|
1774
1794
|
*
|
|
1775
|
-
*
|
|
1776
|
-
*
|
|
1777
|
-
* is set — exactly one of the two must be declared.
|
|
1795
|
+
* The STRING form (a controller method name) is deprecated: it warns once per
|
|
1796
|
+
* process and is removed in the next minor.
|
|
1778
1797
|
*/
|
|
1779
1798
|
readonly handler?: string | ControllerHandler;
|
|
1780
1799
|
/**
|
|
1781
|
-
*
|
|
1782
|
-
* instance and returns the method to invoke — TypeScript catches typos
|
|
1783
|
-
* and surfaces autocomplete on the controller's method names. Prefer
|
|
1784
|
-
* this over the string `handler` form for any host that uses a typed
|
|
1785
|
-
* controller subclass.
|
|
1786
|
-
*
|
|
1787
|
-
* Resolved ONCE at route-registration time (the same path string
|
|
1788
|
-
* handlers go through), so there's no per-request lookup overhead.
|
|
1789
|
-
* The returned method is bound to the controller before dispatch.
|
|
1790
|
-
*
|
|
1791
|
-
* PIPELINE-ONLY: the referenced method is invoked as a `ControllerHandler`
|
|
1792
|
-
* (one `IRequestContext`), because the router derives "is this raw?" from
|
|
1793
|
-
* {@link rawHandler} alone and this field is mutually exclusive with it.
|
|
1794
|
-
* There is no flag that could make a `controllerMethod` route raw. For a
|
|
1795
|
-
* Fastify-native controller method, put its NAME in `rawHandler` — the
|
|
1796
|
-
* lookup is the same, and the field states the calling convention.
|
|
1797
|
-
*
|
|
1798
|
-
* Mutually exclusive with `handler` — passing both throws at boot
|
|
1799
|
-
* with a clear "pick one" message.
|
|
1800
|
-
*
|
|
1801
|
-
* Typed loosely (`(controller: unknown) => …`) at the type-system
|
|
1802
|
-
* boundary because `RouteDefinition` is not generic over the
|
|
1803
|
-
* controller shape — host code annotates the parameter to opt in:
|
|
1800
|
+
* Function-reference handler: receives the controller, returns the method.
|
|
1804
1801
|
*
|
|
1805
|
-
* @
|
|
1806
|
-
*
|
|
1807
|
-
*
|
|
1808
|
-
* async getStats(ctx: IRequestContext) { … }
|
|
1809
|
-
* }
|
|
1810
|
-
*
|
|
1811
|
-
* defineResource({
|
|
1812
|
-
* controller: new PostController(repo),
|
|
1813
|
-
* routes: [{
|
|
1814
|
-
* method: 'GET',
|
|
1815
|
-
* path: '/stats',
|
|
1816
|
-
* controllerMethod: (c: PostController) => c.getStats,
|
|
1817
|
-
* // ^^^^^^^^^^^^^^ TS catches typos here
|
|
1818
|
-
* permissions: requireAuth(),
|
|
1819
|
-
* }],
|
|
1820
|
-
* });
|
|
1821
|
-
* ```
|
|
1802
|
+
* @deprecated Use a function `handler` that calls the controller method:
|
|
1803
|
+
* `handler: (ctx) => controller.getStats(ctx)`. Warns once per process;
|
|
1804
|
+
* removed in the next minor.
|
|
1822
1805
|
*/
|
|
1823
1806
|
readonly controllerMethod?: (controller: unknown) => ControllerHandler;
|
|
1824
1807
|
/** Permission check — REQUIRED */
|
|
@@ -1877,9 +1860,9 @@ interface RouteDefinition {
|
|
|
1877
1860
|
* {@link RawRouteHandler} for why arc declares its own rather than reusing
|
|
1878
1861
|
* `RouteHandlerMethod` directly.
|
|
1879
1862
|
*
|
|
1880
|
-
*
|
|
1881
|
-
*
|
|
1882
|
-
*
|
|
1863
|
+
* The STRING form (a controller method name) is deprecated: pass the function,
|
|
1864
|
+
* `rawHandler: (request, reply) => controller.download(request, reply)`. It
|
|
1865
|
+
* warns once per process and is removed in the next minor.
|
|
1883
1866
|
*
|
|
1884
1867
|
* An async raw handler that calls `reply.send()` must `return reply` (as `handleRaw`
|
|
1885
1868
|
* does): resolving `undefined` while an async `preSerialization` hook runs sends an empty body.
|
|
@@ -1898,23 +1881,24 @@ interface RouteDefinition {
|
|
|
1898
1881
|
/** Pre-auth handlers (run before authentication) */
|
|
1899
1882
|
readonly preAuth?: RouteHandlerMethod[];
|
|
1900
1883
|
/**
|
|
1901
|
-
*
|
|
1884
|
+
* The multiTenant preset's guard on this route. On a resource with `multiTenantPreset`:
|
|
1902
1885
|
*
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
*
|
|
1908
|
-
* routes, off `req.body` after injection) without re-implementing
|
|
1909
|
-
* the scope read + header fallback + 400 boilerplate.
|
|
1886
|
+
* - omitted: a `handler` route gets the tenant filter (401 anonymous, 403 without an
|
|
1887
|
+
* organization, rows pinned to the caller's), as CRUD and actions do; a preset route
|
|
1888
|
+
* gets exactly what the CRUD route it maps to gets. A `rawHandler` route gets nothing.
|
|
1889
|
+
* - `true`: filter plus body injection (what `update` gets), on any route, raw included.
|
|
1890
|
+
* - `false`: no tenant middleware; the route handles tenancy itself.
|
|
1910
1891
|
*
|
|
1911
|
-
*
|
|
1912
|
-
* misconfiguration would otherwise be silently insecure (read routes
|
|
1913
|
-
* returning every tenant's rows).
|
|
1914
|
-
*
|
|
1915
|
-
* @default false
|
|
1892
|
+
* `true` without a multiTenant preset throws at boot.
|
|
1916
1893
|
*/
|
|
1917
1894
|
readonly tenantScope?: boolean;
|
|
1895
|
+
/**
|
|
1896
|
+
* INTERNAL — the CRUD slot whose tenant middlewares a built-in preset route shares
|
|
1897
|
+
* (`slugLookup` → `get`, `tree` → `list`). Hosts must not set this.
|
|
1898
|
+
*
|
|
1899
|
+
* @internal
|
|
1900
|
+
*/
|
|
1901
|
+
readonly _tenantSlot?: "list" | "get" | "create" | "update" | "delete";
|
|
1918
1902
|
/**
|
|
1919
1903
|
* SSE streaming mode. Requires {@link rawHandler} — the handler is invoked
|
|
1920
1904
|
* with `(request, reply)` and owns the response. Two shapes work:
|
|
@@ -3001,10 +2985,25 @@ interface PresetHook {
|
|
|
3001
2985
|
handler: (ctx: AnyRecord) => void | Promise<void> | AnyRecord | Promise<AnyRecord>;
|
|
3002
2986
|
priority?: number;
|
|
3003
2987
|
}
|
|
2988
|
+
/**
|
|
2989
|
+
* The resource's controller as a preset route builder sees it. `handler:
|
|
2990
|
+
* controller.getStats` runs the method on the real controller (`this`-bound) per
|
|
2991
|
+
* request, so the auto-built `BaseController` works too; a method read this way
|
|
2992
|
+
* is verified at boot. Name the methods you read: `PresetController<"getStats">`.
|
|
2993
|
+
*/
|
|
2994
|
+
type PresetController<TMethod extends string = string> = { readonly [K in TMethod]: ControllerHandler; };
|
|
3004
2995
|
interface PresetResult {
|
|
3005
2996
|
name: string;
|
|
3006
|
-
/**
|
|
3007
|
-
|
|
2997
|
+
/**
|
|
2998
|
+
* Preset routes, merged into the resource's `routes`. The function form gets the
|
|
2999
|
+
* resource's permissions and its controller: `handler: controller.getStats`
|
|
3000
|
+
* (a method read this way is verified at boot).
|
|
3001
|
+
*
|
|
3002
|
+
* A string `handler`, string `rawHandler` or `controllerMethod` on a preset route
|
|
3003
|
+
* is deprecated like on a resource route: it warns once and is removed in the
|
|
3004
|
+
* next minor.
|
|
3005
|
+
*/
|
|
3006
|
+
routes?: RouteDefinition[] | ((permissions: ResourcePermissions, controller: PresetController) => RouteDefinition[]);
|
|
3008
3007
|
middlewares?: MiddlewareConfig;
|
|
3009
3008
|
/**
|
|
3010
3009
|
* Permission gates the preset contributes as SECURE DEFAULTS. Merged per-op
|
|
@@ -3214,14 +3213,13 @@ interface ResourceConfig<TDoc = AnyRecord> {
|
|
|
3214
3213
|
onFieldWriteDenied?: "reject" | "strip";
|
|
3215
3214
|
/**
|
|
3216
3215
|
* What to do when an UPDATE body carries an `immutable` /
|
|
3217
|
-
* `immutableAfterCreate` field. Default `'
|
|
3216
|
+
* `immutableAfterCreate` field. Default `'reject'` (403);
|
|
3217
|
+
* `ARC_STRICT_IMMUTABLE_WRITES=false` makes `'strip'` the fleet-wide default.
|
|
3218
3218
|
*
|
|
3219
|
-
* `'
|
|
3220
|
-
*
|
|
3221
|
-
*
|
|
3222
|
-
*
|
|
3223
|
-
* Hosts sending partial patches should turn it on; `ARC_STRICT_IMMUTABLE_WRITES`
|
|
3224
|
-
* sets it fleet-wide.
|
|
3219
|
+
* `'strip'` answers 200 with the field unchanged. Kept separate from
|
|
3220
|
+
* `onFieldWriteDenied` so a host whose clients echo a full object back in a
|
|
3221
|
+
* PATCH can relax this alone: the sanitizer has no stored document to tell an
|
|
3222
|
+
* unchanged echo from a real change.
|
|
3225
3223
|
*/
|
|
3226
3224
|
onImmutableWrite?: "reject" | "strip";
|
|
3227
3225
|
middlewares?: MiddlewareConfig;
|
|
@@ -3246,22 +3244,22 @@ interface ResourceConfig<TDoc = AnyRecord> {
|
|
|
3246
3244
|
* **Path collisions with auto-CRUD are detected at `defineResource()` time.**
|
|
3247
3245
|
* If you declare a route that shares method+path with an auto-CRUD op
|
|
3248
3246
|
* (e.g. `POST /` collides with `create`), validation throws with the
|
|
3249
|
-
* exact `
|
|
3250
|
-
* - `
|
|
3251
|
-
* - `crud:
|
|
3252
|
-
* - `disableDefaultRoutes: true` — turn off all auto-CRUD on this resource
|
|
3247
|
+
* exact `crud` line to add. Use one of:
|
|
3248
|
+
* - `crud: { list: true, get: true, update: true, delete: true }` — leave `create` out
|
|
3249
|
+
* - `crud: false` — turn off all auto-CRUD on this resource
|
|
3253
3250
|
*
|
|
3254
3251
|
* @example Custom route alongside default CRUD:
|
|
3255
3252
|
* ```typescript
|
|
3256
3253
|
* routes: [
|
|
3257
|
-
* { method: 'GET', path: '/stats',
|
|
3258
|
-
*
|
|
3254
|
+
* { method: 'GET', path: '/stats', permissions: requireAuth(),
|
|
3255
|
+
* handler: async (ctx) => ({ data: await stats(ctx.scope) }) },
|
|
3256
|
+
* { method: 'POST', path: '/webhook', rawHandler: webhookFn, permissions: allowPublic() },
|
|
3259
3257
|
* ]
|
|
3260
3258
|
* ```
|
|
3261
3259
|
*
|
|
3262
3260
|
* @example Custom POST replacing the auto-CRUD `create`:
|
|
3263
3261
|
* ```typescript
|
|
3264
|
-
*
|
|
3262
|
+
* crud: { list: true, get: true, update: true, delete: true },
|
|
3265
3263
|
* routes: [
|
|
3266
3264
|
* { method: 'POST', path: '/', handler: customCreate, permissions: requireAuth() },
|
|
3267
3265
|
* ]
|
|
@@ -3279,7 +3277,7 @@ interface ResourceConfig<TDoc = AnyRecord> {
|
|
|
3279
3277
|
* approve: async (id, data, req) => service.approve(id, req.user._id),
|
|
3280
3278
|
* cancel: {
|
|
3281
3279
|
* handler: async (id, data, req) => service.cancel(id, data.reason, req.user._id),
|
|
3282
|
-
* permissions:
|
|
3280
|
+
* permissions: requireRoles(['admin']),
|
|
3283
3281
|
* schema: { reason: { type: 'string' } },
|
|
3284
3282
|
* },
|
|
3285
3283
|
* },
|
|
@@ -3318,34 +3316,30 @@ interface ResourceConfig<TDoc = AnyRecord> {
|
|
|
3318
3316
|
*/
|
|
3319
3317
|
aggregations?: AggregationsMap;
|
|
3320
3318
|
/**
|
|
3321
|
-
* Turn off ALL auto-CRUD routes for this resource
|
|
3322
|
-
* `actions` / `aggregations` still mount). The canonical kill-switch —
|
|
3323
|
-
* `crud: false` is its declarative equivalent.
|
|
3319
|
+
* Turn off ALL auto-CRUD routes for this resource.
|
|
3324
3320
|
*
|
|
3325
|
-
*
|
|
3326
|
-
*
|
|
3327
|
-
* silently no-opped — removed in 2.18.0 so the only kill-switch is the
|
|
3328
|
-
* one that actually works.
|
|
3321
|
+
* @deprecated Use `crud: false`. Warns once per process; removed in the
|
|
3322
|
+
* next minor.
|
|
3329
3323
|
*/
|
|
3330
3324
|
disableDefaultRoutes?: boolean;
|
|
3331
|
-
/**
|
|
3325
|
+
/**
|
|
3326
|
+
* Specific routes to disable (negative-form opt-out).
|
|
3327
|
+
*
|
|
3328
|
+
* @deprecated Use the `crud` allow-list: `disabledRoutes: ['delete']`
|
|
3329
|
+
* becomes `crud: { list: true, get: true, create: true, update: true }`.
|
|
3330
|
+
* Warns once per process; removed in the next minor.
|
|
3331
|
+
*/
|
|
3332
3332
|
disabledRoutes?: CrudRouteKey[];
|
|
3333
3333
|
/**
|
|
3334
3334
|
* Declarative CRUD allow-list — what's ENABLED is explicit (positive form).
|
|
3335
|
-
*
|
|
3336
|
-
*
|
|
3337
|
-
* error and throws at boot. Use this when you want least-privilege
|
|
3338
|
-
* defaults: a new CRUD op added in a future arc release won't silently
|
|
3339
|
-
* leak through your `disabledRoutes` list because every op is opt-in.
|
|
3335
|
+
* The one CRUD-disable spelling. A new CRUD op added in a future arc release
|
|
3336
|
+
* never mounts silently, because every op is opt-in.
|
|
3340
3337
|
*
|
|
3341
3338
|
* - `crud: { list: true, get: true }` — only `list` + `get` mount;
|
|
3342
3339
|
* `create` / `update` / `delete` are NOT mounted.
|
|
3343
|
-
* - `crud: false` —
|
|
3344
|
-
*
|
|
3345
|
-
*
|
|
3346
|
-
* 2.16: prefer this over `disabledRoutes` for new resources. The
|
|
3347
|
-
* negative form stays for back-compat but won't be the documented
|
|
3348
|
-
* default going forward.
|
|
3340
|
+
* - `crud: false` — no auto-CRUD at all (custom `routes` / `actions` /
|
|
3341
|
+
* `aggregations` still mount).
|
|
3342
|
+
* - `crud: undefined` (default) — every op mounts.
|
|
3349
3343
|
*
|
|
3350
3344
|
* @example
|
|
3351
3345
|
* ```ts
|
|
@@ -3423,15 +3417,13 @@ interface ResourceConfig<TDoc = AnyRecord> {
|
|
|
3423
3417
|
/** Don't register in introspection */
|
|
3424
3418
|
skipRegistry?: boolean;
|
|
3425
3419
|
/**
|
|
3426
|
-
* Fail-closed permission invariant. When `true`, any enabled CRUD
|
|
3427
|
-
*
|
|
3428
|
-
*
|
|
3429
|
-
*
|
|
3430
|
-
* non-fatal `info` hint (public catalogs are legitimate).
|
|
3420
|
+
* Fail-closed permission invariant. When `true`, any enabled CRUD op — read
|
|
3421
|
+
* or write — that mounts WITHOUT a permission gate is a FATAL define-time
|
|
3422
|
+
* error: `defineResource()` throws. A public catalog states it:
|
|
3423
|
+
* `permissions: { list: allowPublic(), get: allowPublic() }`.
|
|
3431
3424
|
*
|
|
3432
|
-
*
|
|
3433
|
-
*
|
|
3434
|
-
* `ARC_STRICT_PERMISSIONS=true` env — the recommended production posture.
|
|
3425
|
+
* On by default. `false` here, or `ARC_STRICT_PERMISSIONS=false` app-wide,
|
|
3426
|
+
* downgrades an ungated write to a warning and an ungated read to `info`.
|
|
3435
3427
|
*/
|
|
3436
3428
|
strictPermissions?: boolean;
|
|
3437
3429
|
/**
|
|
@@ -4138,11 +4130,12 @@ interface HealthOptions {
|
|
|
4138
4130
|
path?: string;
|
|
4139
4131
|
check?: () => Promise<unknown>;
|
|
4140
4132
|
}
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4133
|
+
/**
|
|
4134
|
+
* @deprecated Use `HealthCheck` from `@classytic/arc/plugins` — this name now aliases it (the
|
|
4135
|
+
* readiness check shape `arcPlugins.health.checks` and module `healthChecks` accept). The old
|
|
4136
|
+
* `{ healthy, timestamp }` result shape matched nothing arc accepts. Removed in a later minor.
|
|
4137
|
+
*/
|
|
4138
|
+
type HealthCheck = HealthCheck$1;
|
|
4146
4139
|
interface IntrospectionPluginOptions {
|
|
4147
4140
|
path?: string;
|
|
4148
4141
|
prefix?: string;
|
|
@@ -4667,4 +4660,4 @@ type InferDocType<T> = T extends DataAdapter<infer D> ? D : T extends ResourceCo
|
|
|
4667
4660
|
*/
|
|
4668
4661
|
type InferAdapterDoc<A> = A extends DataAdapter<infer D> ? D : unknown;
|
|
4669
4662
|
type InferResourceDoc<T> = T extends ResourceConfig<infer D> ? D : never;
|
|
4670
|
-
export {
|
|
4663
|
+
export { FieldRule$1 as $, getEntityId as $t, RequestWithExtras as A, ControllerConfigurableOptions as An, RouteMcpConfig as At, OnTenantDeleteConfig as B, ControllerHandler as Bn, SoftDeleteExt as Bt, RequestIdOptions as C, defineHook as Cn, Transform as Ct, FastifyWithAuth as D, ArcListResult as Dn, ActionHandlerFn as Dt, FastifyRequestExtras as E, ArcGetResult as En, ActionEntry as Et, ResourceDefinition as F, BodySanitizerConfig as Fn, Authenticator as Ft, PresetResult as G, IRequestContext as Gn, SlugMixin as Gt, PresetController as H, FastifyHandler as Hn, TreeExt as Ht, CrudController as I, MutationWriteContext as In, AuthenticatorContext as It, LookupPolicy as J, ServerAccessor as Jn, BaseCrudController as Jt, CrudRouteKey as K, RawRouteHandler as Kn, BulkExt as Kt, ResourceConfig as L, ResourceWrites as Ln, JwtContext as Lt, ResourceRegistry as M, ListResult as Mn, RateLimitConfig as Mt, RouteRow as N, MixinConstructor as Nn, AuthHelpers as Nt, FastifyWithDecorators as O, ArcUpdateResult as On, ActionsMap as Ot, defineResource as P, BodySanitizer as Pn, AuthPluginOptions as Pt, ArcFieldRule as Q, getActionTarget as Qt, ResourceIdempotencyConfig as R, WriteContext as Rn, TokenPair as Rt, IntrospectionPluginOptions as S, createHookSystem as Sn, PipelineStep as St, EventsDecorator as T, ArcDeleteResult as Tn, ActionDefinition as Tt, PresetFunction as U, IController as Un, TreeMixin as Ut, ResolvedTenantPurge as V, ControllerLike as Vn, SoftDeleteMixin as Vt, PresetHook as W, IControllerResponse as Wn, SlugExt as Wt, OpenApiSchemas as X, QueryResolverConfig as Xt, MiddlewareConfig as Y, QueryResolver as Yt, RouteSchemaOptions as Z, ActionTargetCheck as Zt, ServiceContext as _, afterDelete as _n, Interceptor as _t, IntrospectionData as a, FetchDenialReason as an, AggMeasureShorthand as at, HealthCheck as b, beforeDelete as bn, PipelineConfig as bt, ResourceMetadata as c, DefineHookOptions as cn, AggregationDateRangeRequirement as ct, LookupOption as d, HookOperation as dn, AggregationMaterializedResult as dt, getEntityIdField as en, ResourceHookContext as et, OwnershipCheck as f, HookPhase as fn, AggregationRateLimit as ft, RequestContext as g, afterCreate as gn, Guard as gt, QueryParserInterface as h, HookSystemOptions as hn, AggregationFieldTypes as ht, PaginationResult as i, AccessControlRepository as in, AggMeasureInput as it, RegisterOptions as j, ControllerConstructionOptions as jn, RouteMethod as jt, MiddlewareHandler as k, BaseControllerOptions as kn, RouteDefinition as kt, ArcInternalMetadata as l, HookContext as ln, AggregationIndexHint as lt, PopulateOption as m, HookSystem as mn, AggregationFieldType as mt, InferDocType as n, AccessControl as nn, ResourceExtensions as nt, RegistryEntry as o, FetchResult as on, AggregationCacheConfig as ot, ParsedQuery as p, HookRegistration as pn, AggregationsMap as pt, CrudSchemas as q, RouteHandler as qn, BulkMixin as qt, InferResourceDoc as r, AccessControlConfig as rn, EventDefinition as rt, RegistryStats as s, AroundHookHandler as sn, AggregationConfig as st, InferAdapterDoc as t, getEntityQuery as tn, ResourceHooks as tt, ControllerQueryOptions as u, HookHandler as un, AggregationMaterializedContext as ut, CrudRouterOptions as v, afterUpdate as vn, NextFunction as vt, ArcDecorator as w, ArcCreateResult as wn, ResourceCacheConfig as wt, HealthOptions as x, beforeUpdate as xn, PipelineContext as xt, GracefulShutdownOptions as y, beforeCreate as yn, OperationFilter as yt, ResourcePermissions as z, WriteVerbKey as zn, BaseController as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import { c as DataPolicy, d as UserBase, l as PermissionCheck, n as ArcRequest, o as UserOrganization, r as JWTPayload, s as AuthorizationDecision, t as AnyRecord, u as PermissionContext } from "./base-HXNgPQww.mjs";
|
|
3
|
-
import "./fastify-augmentation-
|
|
3
|
+
import "./fastify-augmentation-DjxuSRG4.mjs";
|
|
4
4
|
import { a as applyFieldReadPermissions, n as FieldPermissionMap, o as applyFieldWritePermissions, s as fields, t as FieldPermission } from "./fields-JTkrtO-r.mjs";
|
|
5
|
-
import { $ as MAX_SEARCH_LENGTH, A as ResourceSeams, B as DEFAULT_ID_FIELD, C as getControllerScope, G as DEFAULT_UPDATE_METHOD, H as DEFAULT_MAX_LIMIT, J as HOOK_PHASES, L as defineAggregation, M as mergeResourceConfig, O as defineResourceVariants, P as defineAction, Q as MAX_REGEX_LENGTH, R as CRUD_OPERATIONS, U as DEFAULT_SORT, V as DEFAULT_LIMIT, W as DEFAULT_TENANT_FIELD, X as HookPhase, Y as HookOperation, Z as MAX_FILTER_DEPTH, _ as nativePolicyFilter, et as MUTATION_OPERATIONS, g as NativePolicyFilter, j as SeamedResourceConfig, k as AdapterLike, nt as RESERVED_QUERY_PARAMS, q as HOOK_OPERATIONS, rt as SYSTEM_FIELDS, tt as MutationOperation, z as CrudOperation } from "./index-
|
|
6
|
-
import {
|
|
7
|
-
import { C as requireScopeContext, G as createDynamicPermissionMatrix, H as DynamicPermissionMatrix, J as PublicPolicy, K as createOrgPermissions, Q as anyOf, S as requireOrgRole, T as requireTeamMembership, U as DynamicPermissionMatrixConfig, Y as allOf, Z as allowPublic, _ as publicRead, at as requireRoles, b as requireOrgInScope,
|
|
5
|
+
import { $ as MAX_SEARCH_LENGTH, A as ResourceSeams, B as DEFAULT_ID_FIELD, C as getControllerScope, G as DEFAULT_UPDATE_METHOD, H as DEFAULT_MAX_LIMIT, J as HOOK_PHASES, L as defineAggregation, M as mergeResourceConfig, O as defineResourceVariants, P as defineAction, Q as MAX_REGEX_LENGTH, R as CRUD_OPERATIONS, U as DEFAULT_SORT, V as DEFAULT_LIMIT, W as DEFAULT_TENANT_FIELD, X as HookPhase, Y as HookOperation, Z as MAX_FILTER_DEPTH, _ as nativePolicyFilter, et as MUTATION_OPERATIONS, g as NativePolicyFilter, j as SeamedResourceConfig, k as AdapterLike, nt as RESERVED_QUERY_PARAMS, q as HOOK_OPERATIONS, rt as SYSTEM_FIELDS, tt as MutationOperation, z as CrudOperation } from "./index-DWn0o4U7.mjs";
|
|
6
|
+
import { $ as FieldRule, A as RequestWithExtras, An as ControllerConfigurableOptions, Bt as SoftDeleteExt, C as RequestIdOptions, D as FastifyWithAuth, Dn as ArcListResult, E as FastifyRequestExtras, En as ArcGetResult, F as ResourceDefinition, G as PresetResult, Gn as IRequestContext, Gt as SlugMixin, H as PresetController, Ht as TreeExt, I as CrudController, In as MutationWriteContext, Jt as BaseCrudController, K as CrudRouteKey, Kn as RawRouteHandler, Kt as BulkExt, L as ResourceConfig, Ln as ResourceWrites, Mn as ListResult, Mt as RateLimitConfig, O as FastifyWithDecorators, On as ArcUpdateResult, P as defineResource, Pt as AuthPluginOptions, Rn as WriteContext, S as IntrospectionPluginOptions, Tn as ArcDeleteResult, U as PresetFunction, Un as IController, Ut as TreeMixin, Vn as ControllerLike, Vt as SoftDeleteMixin, Wn as IControllerResponse, Wt as SlugExt, Y as MiddlewareConfig, Z as RouteSchemaOptions, _ as ServiceContext, a as IntrospectionData, at as AggMeasureShorthand, b as HealthCheck, c as ResourceMetadata, ct as AggregationDateRangeRequirement, dt as AggregationMaterializedResult, f as OwnershipCheck, ft as AggregationRateLimit, g as RequestContext, h as QueryParserInterface, i as PaginationResult, it as AggMeasureInput, jn as ControllerConstructionOptions, kn as BaseControllerOptions, l as ArcInternalMetadata, lt as AggregationIndexHint, n as InferDocType, o as RegistryEntry, ot as AggregationCacheConfig, pt as AggregationsMap, q as CrudSchemas, qn as RouteHandler, qt as BulkMixin, r as InferResourceDoc, rt as EventDefinition, s as RegistryStats, st as AggregationConfig, t as InferAdapterDoc, ut as AggregationMaterializedContext, v as CrudRouterOptions, wn as ArcCreateResult, x as HealthOptions, y as GracefulShutdownOptions, zn as WriteVerbKey, zt as BaseController } from "./index-DtHACefu.mjs";
|
|
7
|
+
import { C as requireScopeContext, G as createDynamicPermissionMatrix, H as DynamicPermissionMatrix, J as PublicPolicy, K as createOrgPermissions, Q as anyOf, S as requireOrgRole, T as requireTeamMembership, U as DynamicPermissionMatrixConfig, Y as allOf, Z as allowPublic, _ as publicRead, at as requireRoles, b as requireOrgInScope, et as denyAll, f as adminOnly, h as ownerWithAdminBypass, m as fullPublic, nt as requireAuth, p as authenticated, q as AllowPublicOptions, rt as requireOwnership, st as when, t as permissions, v as publicReadAdminWrite, w as requireServiceScope, x as requireOrgMembership, y as readOnly } from "./index-BzUyno-u.mjs";
|
|
8
8
|
import { a as NotFoundError, d as ValidationError, f as createDomainError, i as ForbiddenError, t as ArcError, u as UnauthorizedError } from "./errors-DTo0me1o.mjs";
|
|
9
9
|
export declare const version: string;
|
|
10
|
-
export { type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, type AllowPublicOptions, type AnyRecord, type ArcCreateResult, type ArcDeleteResult, ArcError, type ArcGetResult, type ArcInternalMetadata, type ArcListResult, type ArcRequest, type ArcUpdateResult, type AuthPluginOptions, type AuthorizationDecision, BaseController, type BaseControllerOptions, BaseCrudController, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ControllerConfigurableOptions, type ControllerConstructionOptions, type ControllerLike, type CrudController, type CrudOperation, type CrudRouteKey, type CrudRouterOptions, type CrudSchemas, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, type DataPolicy, type DynamicPermissionMatrix, type DynamicPermissionMatrixConfig, type EventDefinition, type FastifyRequestExtras, type FastifyWithAuth, type FastifyWithDecorators, type FieldPermission, type FieldPermissionMap, type FieldRule, ForbiddenError, type GracefulShutdownOptions, HOOK_OPERATIONS, HOOK_PHASES, type HealthCheck, type HealthOptions, type HookOperation, type HookPhase, type IController, type IControllerResponse, type IRequestContext, type InferAdapterDoc, type InferDocType, type InferResourceDoc, type IntrospectionData, type IntrospectionPluginOptions, type JWTPayload, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, type MiddlewareConfig, type MutationOperation, type MutationWriteContext, type NativePolicyFilter, NotFoundError, type OwnershipCheck, type PaginationResult, type PermissionCheck, type PermissionContext, type PresetFunction, type PresetResult, type PublicPolicy, type QueryParserInterface, RESERVED_QUERY_PARAMS, type RateLimitConfig, type RawRouteHandler, type RegistryEntry, type RegistryStats, type RequestContext, type RequestIdOptions, type RequestWithExtras, type ResourceConfig, ResourceDefinition, type ResourceMetadata, type ResourceSeams, type ResourceWrites, type RouteHandler, type RouteSchemaOptions, SYSTEM_FIELDS, type SeamedResourceConfig, type ServiceContext, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, UnauthorizedError, type UserBase, type UserOrganization, ValidationError, type WriteContext, type WriteVerbKey, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, nativePolicyFilter, ownerWithAdminBypass,
|
|
10
|
+
export { type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, type AllowPublicOptions, type AnyRecord, type ArcCreateResult, type ArcDeleteResult, ArcError, type ArcGetResult, type ArcInternalMetadata, type ArcListResult, type ArcRequest, type ArcUpdateResult, type AuthPluginOptions, type AuthorizationDecision, BaseController, type BaseControllerOptions, BaseCrudController, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ControllerConfigurableOptions, type ControllerConstructionOptions, type ControllerLike, type CrudController, type CrudOperation, type CrudRouteKey, type CrudRouterOptions, type CrudSchemas, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, type DataPolicy, type DynamicPermissionMatrix, type DynamicPermissionMatrixConfig, type EventDefinition, type FastifyRequestExtras, type FastifyWithAuth, type FastifyWithDecorators, type FieldPermission, type FieldPermissionMap, type FieldRule, ForbiddenError, type GracefulShutdownOptions, HOOK_OPERATIONS, HOOK_PHASES, type HealthCheck, type HealthOptions, type HookOperation, type HookPhase, type IController, type IControllerResponse, type IRequestContext, type InferAdapterDoc, type InferDocType, type InferResourceDoc, type IntrospectionData, type IntrospectionPluginOptions, type JWTPayload, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, type MiddlewareConfig, type MutationOperation, type MutationWriteContext, type NativePolicyFilter, NotFoundError, type OwnershipCheck, type PaginationResult, type PermissionCheck, type PermissionContext, type PresetController, type PresetFunction, type PresetResult, type PublicPolicy, type QueryParserInterface, RESERVED_QUERY_PARAMS, type RateLimitConfig, type RawRouteHandler, type RegistryEntry, type RegistryStats, type RequestContext, type RequestIdOptions, type RequestWithExtras, type ResourceConfig, ResourceDefinition, type ResourceMetadata, type ResourceSeams, type ResourceWrites, type RouteHandler, type RouteSchemaOptions, SYSTEM_FIELDS, type SeamedResourceConfig, type ServiceContext, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, UnauthorizedError, type UserBase, type UserOrganization, ValidationError, type WriteContext, type WriteVerbKey, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, nativePolicyFilter, ownerWithAdminBypass, permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, when };
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-
|
|
3
|
-
import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-
|
|
4
|
-
import { t as defineAggregation } from "./defineAggregation-
|
|
5
|
-
import { a as ResourceDefinition, t as defineResource } from "./defineResource-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-D6hrdx-j.mjs";
|
|
3
|
+
import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-B_06Fcn0.mjs";
|
|
4
|
+
import { t as defineAggregation } from "./defineAggregation-DUsrGcsm.mjs";
|
|
5
|
+
import { a as ResourceDefinition, t as defineResource } from "./defineResource-q8TsJpOm.mjs";
|
|
6
|
+
import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-B7fuROWK.mjs";
|
|
7
|
+
import { E as getControllerScope } from "./schemaIR-DP7mMj7c.mjs";
|
|
8
|
+
import { a as DEFAULT_SORT, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "./constants-D9EiaO5s.mjs";
|
|
9
|
+
import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, c as fullPublic, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, l as ownerWithAdminBypass, o as adminOnly, p as readOnly, s as authenticated, t as permissions, w as requireOrgInScope } from "./permissions-CEyeDHtT.mjs";
|
|
10
|
+
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-Ukhmfmmx.mjs";
|
|
11
11
|
// src/index.ts
|
|
12
|
-
const version = "2.
|
|
13
|
-
export { ArcError, BaseController, BaseCrudController, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, ForbiddenError, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, NotFoundError, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, UnauthorizedError, ValidationError, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, nativePolicyFilter, ownerWithAdminBypass,
|
|
12
|
+
const version = "2.53.0";
|
|
13
|
+
export { ArcError, BaseController, BaseCrudController, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, ForbiddenError, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, NotFoundError, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, UnauthorizedError, ValidationError, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, nativePolicyFilter, ownerWithAdminBypass, permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
2
|
import * as fs from "node:fs/promises";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
@@ -602,7 +602,7 @@ export const authResource = defineResource({
|
|
|
602
602
|
prefix: '/auth',
|
|
603
603
|
|
|
604
604
|
adapter: createAdapter(User${ts ? " as never" : ""}, userRepository${ts ? " as never" : ""}),
|
|
605
|
-
|
|
605
|
+
crud: false,
|
|
606
606
|
|
|
607
607
|
routes: [
|
|
608
608
|
{
|
|
@@ -658,7 +658,7 @@ export const userProfileResource = defineResource({
|
|
|
658
658
|
prefix: '/users',
|
|
659
659
|
|
|
660
660
|
adapter: createAdapter(User${ts ? " as never" : ""}, userRepository${ts ? " as never" : ""}),
|
|
661
|
-
|
|
661
|
+
crud: false,
|
|
662
662
|
|
|
663
663
|
routes: [
|
|
664
664
|
{
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
2
|
import fp from "fastify-plugin";
|
|
3
3
|
// src/integrations/event-gateway.ts
|
|
4
4
|
const eventGatewayPluginImpl = async (fastify, opts = {}) => {
|
|
5
5
|
const { auth = true, orgScoped, roomPolicy, maxMessageBytes, maxSubscriptionsPerClient, authenticate } = opts;
|
|
6
6
|
if (auth && !authenticate && !fastify.hasDecorator("authenticate")) throw new Error("[arc-event-gateway] auth is true but fastify.authenticate is not registered. Register an auth plugin first, provide a custom authenticate function, or set auth: false.");
|
|
7
7
|
if (opts.sse !== false) {
|
|
8
|
-
const { default: ssePlugin } = await import("../sse-
|
|
8
|
+
const { default: ssePlugin } = await import("../sse-eyb8lNuI.mjs").then((n) => n.n);
|
|
9
9
|
await fastify.register(ssePlugin, {
|
|
10
10
|
path: opts.sse?.path ?? "/events/stream",
|
|
11
11
|
requireAuth: auth,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { EventGatewayOptions } from "./event-gateway.mjs";
|
|
3
3
|
import { a as JobMeta, c as JobsPluginOptions, i as JobDispatcher, l as QueueStats, n as JobDefinition, r as JobDispatchOptions } from "../index-BAXDo5eE.mjs";
|
|
4
|
-
import { _ as ToolDefinition, c as McpAuthResult, d as McpResourceConfig, g as ToolContext, h as ToolAnnotations, n as CallToolResult, o as CrudOperation, p as PromptDefinition, r as CreateMcpServerConfig, t as BetterAuthHandler, u as McpPluginOptions } from "../types-
|
|
4
|
+
import { _ as ToolDefinition, c as McpAuthResult, d as McpResourceConfig, g as ToolContext, h as ToolAnnotations, n as CallToolResult, o as CrudOperation, p as PromptDefinition, r as CreateMcpServerConfig, t as BetterAuthHandler, u as McpPluginOptions } from "../types-DWFgq8EP.mjs";
|
|
5
5
|
import { StreamlinePluginOptions, WorkflowLike, WorkflowRunLike } from "./streamline.mjs";
|
|
6
6
|
import { WebhookDeliveryRecord, WebhookManager, WebhookPluginOptions, WebhookStore, WebhookSubscription } from "./webhooks.mjs";
|
|
7
7
|
import { c as WebSocketClient, l as WebSocketMessage, u as WebSocketPluginOptions } from "../websocket-BGuc-WVZ.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
2
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evaluateAndApplyPermission } from "../../authorizationDecision-
|
|
3
|
-
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../../shutdown-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evaluateAndApplyPermission } from "../../authorizationDecision-gB5-bHDp.mjs";
|
|
3
|
+
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../../shutdown-C76Hn-Th.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
// src/integrations/jobs/execution.ts
|
|
6
6
|
async function executeTimedHandler(options) {
|
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
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-DWFgq8EP.mjs";
|
|
3
3
|
import { i as RequestScope } from "../../types-DnkIALZ8.mjs";
|
|
4
|
-
import { F as ResourceDefinition,
|
|
5
|
-
import { i as resolveToolCollisions, n as McpServerInstance, r as createMcpServer, t as AuthRef } from "../../createMcpServer-
|
|
4
|
+
import { F as ResourceDefinition, Gn as IRequestContext, Jn as ServerAccessor, Wn as IControllerResponse } from "../../index-DtHACefu.mjs";
|
|
5
|
+
import { i as resolveToolCollisions, n as McpServerInstance, r as createMcpServer, t as AuthRef } from "../../createMcpServer-Bk3ls5jS.mjs";
|
|
6
6
|
import "../../resourceRateLimit-BPiESPtG.mjs";
|
|
7
7
|
import { n as FieldPermissionMap } from "../../fields-JTkrtO-r.mjs";
|
|
8
8
|
import { l as PermissionCheck } from "../../base-HXNgPQww.mjs";
|
|
@@ -435,7 +435,12 @@ interface McpRegistration {
|
|
|
435
435
|
interface McpDecorator {
|
|
436
436
|
/** Map of prefix → registration info. Iterate for all endpoints. */
|
|
437
437
|
registrations: Map<string, McpRegistration>;
|
|
438
|
-
/**
|
|
438
|
+
/**
|
|
439
|
+
* Tool names of the FIRST registered prefix.
|
|
440
|
+
*
|
|
441
|
+
* @deprecated Use `get(prefix)?.toolNames` (or iterate `registrations`).
|
|
442
|
+
* Warns once per process; removed in the next minor.
|
|
443
|
+
*/
|
|
439
444
|
readonly toolNames: string[];
|
|
440
445
|
readonly resourceNames: string[];
|
|
441
446
|
/** Look up a specific prefix */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
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-
|
|
1
|
+
/*! @classytic/arc v2.53.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-D0tSZqKk.mjs";
|
|
3
3
|
// src/integrations/mcp/defineTool.ts
|
|
4
4
|
/**
|
|
5
5
|
* Define a type-safe MCP tool.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as McpServerInstance } from "../../createMcpServer-
|
|
3
|
-
import { c as McpAuthResult, u as McpPluginOptions } from "../../types-
|
|
2
|
+
import { n as McpServerInstance } from "../../createMcpServer-Bk3ls5jS.mjs";
|
|
3
|
+
import { c as McpAuthResult, u as McpPluginOptions } from "../../types-DWFgq8EP.mjs";
|
|
4
4
|
import { Client } from "@modelcontextprotocol/client";
|
|
5
5
|
/** An MCP client bound to a server, plus its teardown. */
|
|
6
6
|
export interface ConnectedMcpTestClient {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { _ as createMcpServer, i as resourceToTools, n as filterResourcesForMcp, t as MCP_PROTOCOL_VERSION } from "../../mcpPlugin-
|
|
1
|
+
/*! @classytic/arc v2.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { _ as createMcpServer, i as resourceToTools, n as filterResourcesForMcp, t as MCP_PROTOCOL_VERSION } from "../../mcpPlugin-D0tSZqKk.mjs";
|
|
3
3
|
// src/integrations/mcp/testing.ts
|
|
4
4
|
/**
|
|
5
5
|
* Connect a 2026-07-28 client to an already-built `McpServer`.
|
|
@@ -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.53.0 | MIT | https://classytic.com */
|
|
2
|
+
import { f as createError, i as NotFoundError, r as ForbiddenError } from "../errors-Ukhmfmmx.mjs";
|
|
3
|
+
import { a as promoteStreamTokenToHeader, n as forwardedStreamHeaders } from "../streaming-DKziqs1Z.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 { a as createOutboxModule, i as OutboxModuleOptions } from "../outbox-module-
|
|
3
|
+
import { a as createOutboxModule, i as OutboxModuleOptions } from "../outbox-module-C1QWMloZ.mjs";
|
|
4
4
|
import { FastifyPluginAsync } from "fastify";
|
|
5
5
|
import { OutboxFailurePolicy, OutboxStore } from "@classytic/primitives/outbox";
|
|
6
6
|
export interface WebhookSubscription {
|