@classytic/arc 2.41.1 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EventTransport-CbUKDzZZ.d.mts → EventTransport-CiicKz2Z.d.mts} +1 -1
- package/dist/{EventTransport-DSqD_Xsg.mjs → EventTransport-DZWDsaPa.mjs} +22 -17
- package/dist/{HookSystem-CMF94SEA.mjs → HookSystem-yjEgn7Cm.mjs} +2 -2
- package/dist/{QueryCache-DFA-QrU9.d.mts → QueryCache--5uAuYPW.d.mts} +7 -3
- package/dist/{ResourceRegistry-MGpXoxHZ.mjs → ResourceRegistry-DJxHUpE4.mjs} +44 -13
- package/dist/acquire-BozJ-9yt.mjs +35 -0
- package/dist/actionPermissions-5N04zBL4.mjs +772 -0
- package/dist/audit/index.d.mts +46 -8
- package/dist/audit/index.mjs +48 -26
- package/dist/auth/audit.d.mts +8 -8
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +46 -16
- package/dist/auth/index.mjs +134 -156
- package/dist/auth/redis-session.d.mts +4 -5
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/{authorizationDecision-DawKGoXb.mjs → authorizationDecision-wX3SA9w_.mjs} +7 -102
- package/dist/{base-CxrV1LmG.d.mts → base-CZyixEQR.d.mts} +27 -5
- package/dist/boundedMap-DWiKW7lP.mjs +57 -0
- package/dist/{buildHandler-CvxKOc0m.mjs → buildHandler-Bswu_vNb.mjs} +4 -4
- package/dist/cache/index.d.mts +31 -43
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-DbCBxlgw.mjs → caching-Drp68DIS.mjs} +3 -3
- package/dist/claimed-DYvQoZLv.mjs +8 -0
- package/dist/cleanup/index.d.mts +18 -22
- package/dist/cleanup/index.mjs +27 -73
- package/dist/cli/commands/describe.d.mts +7 -5
- package/dist/cli/commands/describe.mjs +7 -4
- package/dist/cli/commands/docs.d.mts +2 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.d.mts +2 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -3
- package/dist/cli/commands/init.mjs +2 -3
- package/dist/cli/commands/introspect.d.mts +2 -3
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-D5Ubn1fe.mjs → constants-B2QHb6u6.mjs} +4 -2
- package/dist/context/index.d.mts +11 -14
- package/dist/context/index.mjs +18 -38
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +8 -8
- package/dist/{core-5lazhva9.mjs → core-COcqo0Cp.mjs} +15 -5
- package/dist/{createActionRouter-DNqoaK81.mjs → createActionRouter-zG13rpPJ.mjs} +97 -39
- package/dist/{createAggregationRouter-BcbQJf10.mjs → createAggregationRouter-CWRz96Vr.mjs} +11 -8
- package/dist/{preloadResources-f3boenVZ.mjs → createApp-BGLYtErt.mjs} +305 -394
- package/dist/{createMcpServer-CbDWkZ1T.d.mts → createMcpServer-DSztofa9.d.mts} +1 -1
- package/dist/{defineAggregation-D_eJjm5A.mjs → defineAggregation--3xguLkk.mjs} +1 -1
- package/dist/{defineResource-DxkMTjRn.mjs → defineResource-gUp9ug66.mjs} +118 -1024
- package/dist/discovery/index.d.mts +6 -7
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.d.mts +11 -5
- package/dist/docs/index.mjs +4 -4
- package/dist/{elevation-CkvG0LG2.mjs → elevation-BG4gnMsJ.mjs} +41 -12
- package/dist/{elevation-BXCfVcNG.d.mts → elevation-BW2J3tNj.d.mts} +1 -2
- package/dist/encryption/index.d.mts +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-D1GHKGlV.mjs → errorHandler-COHw3N1b.mjs} +26 -5
- package/dist/{errors-BH7YU_9O.mjs → errors-CW4anJBy.mjs} +58 -23
- package/dist/{errors-BGdVwP25.d.mts → errors-JYc9vwqE.d.mts} +9 -0
- package/dist/{eventPlugin-B52abJ8W.d.mts → eventPlugin-BtmA4-3P.d.mts} +65 -9
- package/dist/{eventPlugin-zZY-unhr.mjs → eventPlugin-BweHAVws.mjs} +82 -21
- package/dist/{subscribe-helpers-DatDkcuG.mjs → eventTypes-N4-omQFR.mjs} +151 -17
- package/dist/events/index.d.mts +43 -18
- package/dist/events/index.mjs +49 -53
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +139 -157
- package/dist/events/transports/redis.d.mts +5 -6
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.d.mts +42 -27
- package/dist/factory/index.mjs +213 -32
- package/dist/{fastify-augmentation-Cq2nHVaW.d.mts → fastify-augmentation-DRlCIWE9.d.mts} +11 -25
- package/dist/{fields-BHrkoF5y.mjs → fields-A5crhsJb.mjs} +1 -1
- package/dist/{fields-I_EeRWND.d.mts → fields-BBSpf8pS.d.mts} +1 -1
- package/dist/filter-merge-DGM-GQ1J.mjs +99 -0
- package/dist/{generate-BLRf2m3y.mjs → generate-BXKo2Gc8.mjs} +2 -2
- package/dist/{headers-BIXWKrzQ.mjs → headers-DKZQKL-Z.mjs} +2 -2
- package/dist/health-BYAwA6YS.mjs +22 -0
- package/dist/{health-ZRHeDHXH.mjs → health-CrqUp3sz.mjs} +115 -55
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.mjs +2 -3
- package/dist/idempotency/index.d.mts +36 -10
- package/dist/idempotency/index.mjs +230 -111
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +77 -12
- package/dist/{index-D4u76eQW.d.mts → index-Beg3aNnK.d.mts} +23 -101
- package/dist/{preloadResources-CjS2OfpU.d.mts → index-BkV55WlV.d.mts} +37 -38
- package/dist/{index-BHdZD8zK.d.mts → index-Bxriq3so.d.mts} +84 -21
- package/dist/index-CUJvoyw3.d.mts +510 -0
- package/dist/{index-CbJiYrfv.d.mts → index-Chgz3d0i.d.mts} +1 -1
- package/dist/{index-DHbyPo5j.d.mts → index-WH7xgvxS.d.mts} +304 -254
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +11 -11
- package/dist/{init-CpLkjU18.mjs → init-BPzK5Lnr.mjs} +1 -1
- package/dist/integrations/event-gateway.d.mts +11 -7
- package/dist/integrations/event-gateway.mjs +4 -4
- package/dist/integrations/index.d.mts +3 -3
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.d.mts +1 -1
- package/dist/integrations/jobs/index.mjs +18 -5
- package/dist/integrations/mcp/index.d.mts +102 -89
- package/dist/integrations/mcp/index.mjs +19 -4
- package/dist/integrations/mcp/testing.d.mts +8 -9
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.d.mts +85 -144
- package/dist/integrations/streamline.mjs +131 -55
- package/dist/integrations/webhooks.d.mts +83 -143
- package/dist/integrations/webhooks.mjs +36 -80
- package/dist/integrations/websocket-pushref-redis.d.mts +5 -6
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.d.mts +5 -6
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.d.mts +3 -3
- package/dist/integrations/websocket.mjs +2 -2
- package/dist/{interface-DEWNOMza.d.mts → interface-JJzwH4Ro.d.mts} +34 -2
- package/dist/{jsonBody-ELR9lfeU.mjs → jsonBody-YIq-vGLv.mjs} +2 -2
- package/dist/{keys-cpZCtcIE.mjs → keys-CpoiZ8hU.mjs} +7 -18
- package/dist/{loadResources-BPfWiI5s.mjs → loadResources-6jO52-RR.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-ixtfL3J2.mjs → loadResourcesFromEntry-MP8xEppu.mjs} +2 -2
- package/dist/logger/index.d.mts +9 -17
- package/dist/logger/index.mjs +2 -153
- package/dist/logger-D4V1zGLI.mjs +160 -0
- package/dist/{mcpPlugin-BX5PujI0.mjs → mcpPlugin-srPc7ItN.mjs} +446 -170
- package/dist/{memory-Iotz0cCx.mjs → memory-CTa5pOCW.mjs} +36 -34
- package/dist/{metrics-NMsmpRmY.mjs → metrics-DsZrvnpB.mjs} +39 -72
- package/dist/middleware/index.d.mts +5 -5
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.d.mts +13 -13
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-DpLJG2_N.mjs → module--L0iBIZz.mjs} +8 -8
- package/dist/mongodb-memory-server-CHhYSq5y.mjs +35539 -0
- package/dist/mongoose-CYJCLyi-.mjs +67451 -0
- package/dist/multiTenant-CAtYlW6H.d.mts +104 -0
- package/dist/{multipartBody-DtRWM6_U.mjs → multipartBody-Cc7eZ9cq.mjs} +46 -7
- package/dist/node-D8UZv_8c.mjs +41236 -0
- package/dist/{openapi-CmFf3yq_.mjs → openapi-CMegfsm8.mjs} +48 -10
- package/dist/outbox-admin/index.d.mts +5 -5
- package/dist/outbox-admin/index.mjs +6 -18
- package/dist/{outbox-module-D2z5WkDY.mjs → outbox-module-Ryk270jd.mjs} +203 -33
- package/dist/{outbox-module-BHdUnuuK.d.mts → outbox-module-gZCHoE4H.d.mts} +79 -6
- package/dist/permissions/index.d.mts +5 -4
- package/dist/permissions/index.mjs +8 -6
- package/dist/{permissions-D8TBH44E.mjs → permissions-C5ijIz5Q.mjs} +149 -33
- package/dist/{pipe-FMWNheSO.mjs → pipe-D81zMtWs.mjs} +2 -2
- package/dist/pipeline/index.d.mts +7 -7
- package/dist/pipeline/index.mjs +2 -2
- package/dist/plan-CJGMKoui.mjs +565 -0
- package/dist/{BaseController-CYEwjyjN.mjs → plugin-DALd9dcF.mjs} +1269 -346
- package/dist/plugins/index.d.mts +17 -14
- package/dist/plugins/index.mjs +44 -22
- package/dist/plugins/response-cache.d.mts +5 -6
- package/dist/plugins/response-cache.mjs +8 -14
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-CXWZIzTv.mjs → pluralize-COUNYo3d.mjs} +1 -1
- package/dist/presets/filesUpload.d.mts +8 -8
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.d.mts +35 -40
- package/dist/presets/index.mjs +4 -4
- package/dist/presets/multiTenant.d.mts +2 -107
- package/dist/presets/multiTenant.mjs +22 -162
- package/dist/presets/search.d.mts +9 -10
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-ZJSPgmT2.mjs → presets-CONf2Qem.mjs} +99 -107
- package/dist/{projection-BzIgzoKZ.mjs → projection-wFoLqdss.mjs} +2 -2
- package/dist/{pushref-registry-Dov9l4qE.d.mts → pushref-registry-UxCkoA4C.d.mts} +1 -1
- package/dist/{queryCachePlugin-DZHPOm9p.mjs → queryCachePlugin-BATECpyh.mjs} +12 -14
- package/dist/{queryCachePlugin-BzqxconG.d.mts → queryCachePlugin-C2lZjTxk.d.mts} +1 -1
- package/dist/{rateLimitKey-BvOvcBDi.mjs → rateLimitKey-DVEZ_UpV.mjs} +1 -1
- package/dist/{realtime-8tIQWZz4.mjs → realtime-xyubMKSB.mjs} +25 -21
- package/dist/{redis-Bzi1y3F9.d.mts → redis-BDgv9Glw.d.mts} +17 -24
- package/dist/redis-stream-BMk-bpQS.d.mts +219 -0
- package/dist/redisShapes-CQksY67q.d.mts +55 -0
- package/dist/registry/index.d.mts +15 -10
- package/dist/registry/index.mjs +4 -4
- package/dist/{registry-DNkgGQcK.mjs → registry-Bdzg-hdm.mjs} +13 -10
- package/dist/{renewingLease-yF8BdW4b.mjs → renewingLease-BFJxGPuh.mjs} +1 -1
- package/dist/{replyHelpers-CNdvMfM4.mjs → replyHelpers-Bnc6lJyy.mjs} +2 -2
- package/dist/{requestContext-cDkAUr-P.mjs → requestContext-C10UeFe5.mjs} +1 -1
- package/dist/requirement-Bu50QALH.mjs +35 -0
- package/dist/requirement-CbiLdQ1n.d.mts +22 -0
- package/dist/resourceRateLimit-Wf6d6FL9.d.mts +30 -0
- package/dist/resourceRateLimit-urWPJxrt.mjs +180 -0
- package/dist/rolldown-runtime-MYrLNGnq.mjs +45 -0
- package/dist/routeValidator-DHtpzrzk.mjs +70 -0
- package/dist/{runtimeCapabilities-CkhS6jn6.mjs → runtimeCapabilities-DIMKMV2G.mjs} +1 -1
- package/dist/{schedules-j6uXXAeJ.mjs → schedules-CKTs5ys8.mjs} +46 -37
- package/dist/{schemaConverter-BVA7cFRG.mjs → schemaConverter-BVjkQ5DD.mjs} +2 -2
- package/dist/{schemaIR-CTvPDoPB.mjs → schemaIR-BA0Hb21Y.mjs} +2 -2
- package/dist/schemas/index.d.mts +20 -10
- package/dist/schemas/index.mjs +8 -3
- package/dist/scim/index.d.mts +13 -13
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.d.mts +4 -4
- package/dist/scope/index.mjs +6 -6
- package/dist/{scope-BUi1xV1I.mjs → scope-DINaj7Ax.mjs} +4 -4
- package/dist/shutdown-LpLMH8T1.mjs +59 -0
- package/dist/{simpleEqualityMatcher-C9bzq2gO.mjs → simpleEqualityMatcher-DbwIM1f1.mjs} +1 -1
- package/dist/{sse-BeqVKQKu.mjs → sse-BzJFPX_1.mjs} +11 -15
- package/dist/{sseStream-Ppzo-WUH.mjs → sseStream-DQChzGTs.mjs} +2 -2
- package/dist/{store-helpers-dW71XVWL.mjs → store-helpers-Coj9RhOZ.mjs} +1 -1
- package/dist/{streaming-IcRFjWQU.mjs → streaming-JzB5CAga.mjs} +1 -1
- package/dist/subscriberIdentity-DeyppIif.mjs +28 -0
- package/dist/tenancy-DxV8OuX2.mjs +43 -0
- package/dist/tenantPreparation-CBvvAcAj.mjs +67 -0
- package/dist/testing/cleanupStoreContract.d.mts +4 -5
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.d.mts +215 -197
- package/dist/testing/index.mjs +289 -214
- package/dist/testing/outboxStoreContract.d.mts +4 -5
- package/dist/testing/outboxStoreContract.mjs +137 -2
- package/dist/testing/requiredPorts.d.mts +16 -0
- package/dist/testing/requiredPorts.mjs +65 -0
- package/dist/testing/storageContract.d.mts +4 -5
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/timing-CntavTlR.mjs +46 -0
- package/dist/{transactionContext-CPbdlnVw.mjs → transactionContext-orvnGu4F.mjs} +1 -1
- package/dist/{typeGuards-BLjPgVBm.mjs → typeGuards-kEaP_WmO.mjs} +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-DfVDvkdP.d.mts → types-BJ-2XqVF.d.mts} +189 -204
- package/dist/{types-CWQn9-IC.d.mts → types-D3Ixsh00.d.mts} +22 -9
- package/dist/{types-CgenB1gv.mjs → types-fvO6Ovzx.mjs} +4 -4
- package/dist/usage/index.d.mts +5 -6
- package/dist/usage/index.mjs +5 -5
- package/dist/{userHelpers-ChRvkuSZ.mjs → userHelpers-C76zD5pa.mjs} +1 -1
- package/dist/utils/index.d.mts +125 -264
- package/dist/utils/index.mjs +13 -12
- package/dist/{utils-CxcctrAh.mjs → utils-BpkVZ8rB.mjs} +315 -404
- package/dist/{validate-DrYWnOzI.mjs → validate-CWp-lsrm.mjs} +6 -14
- package/dist/{versioning-D6JIK8Tk.d.mts → versioning-Bsb51gGT.d.mts} +28 -13
- package/dist/{versioning-DKkT4hNJ.mjs → versioning-CHhL9P3o.mjs} +4 -4
- package/dist/{websocket-BOXVggMf.d.mts → websocket-Cs4awVyD.d.mts} +1 -1
- package/dist/{workScope-CxKqoIFn.mjs → workScope-n9a7d_lZ.mjs} +2 -2
- package/package.json +57 -59
- package/skills/arc/SKILL.md +13 -4
- package/skills/arc/references/auth.md +8 -5
- package/skills/arc/references/integrations.md +1 -1
- package/skills/arc/references/mcp.md +8 -6
- package/skills/arc/references/multi-tenancy.md +19 -14
- package/skills/arc/references/production.md +27 -10
- package/dist/actionPermissions-BoPGQ5-4.mjs +0 -350
- package/dist/index-CFfLKMH4.d.mts +0 -290
- package/dist/interface-YzIbF7Ii.mjs +0 -17
- package/dist/redis-stream-BPKscsTB.d.mts +0 -260
- package/dist/registerRoute-Bsnk6NiZ.mjs +0 -364
- package/dist/rolldown-runtime-eysyzFAF.mjs +0 -15
- package/dist/sync/changelog.d.mts +0 -3
- package/dist/sync/changelog.mjs +0 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
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-
|
|
3
|
-
import { A as
|
|
4
|
-
import { a as
|
|
5
|
-
import "./fastify-augmentation-
|
|
6
|
-
import { A as
|
|
7
|
-
import {
|
|
8
|
-
import { a as NotFoundError, d as ValidationError, f as createDomainError, i as ForbiddenError, t as ArcError, u as UnauthorizedError } from "./errors-
|
|
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-CZyixEQR.mjs";
|
|
3
|
+
import { A as RequestWithExtras, Bn as IController, Bt as TreeMixin, C as RequestIdOptions, Cn as ArcGetResult, D as FastifyWithAuth, Dn as ControllerConfigurableOptions, E as FastifyRequestExtras, En as BaseControllerOptions, F as ResourceDefinition, Fn as WriteContext, G as CrudRouteKey, Gt as BaseCrudController, H as PresetFunction, Hn as IRequestContext, Ht as SlugMixin, I as CrudController, In as WriteVerbKey, It as BaseController, J as MiddlewareConfig, K as CrudSchemas, L as ResourceConfig, Lt as SoftDeleteExt, Nn as MutationWriteContext, O as FastifyWithDecorators, On as ControllerConstructionOptions, P as defineResource, Pn as ResourceWrites, Q as FieldRule, Rn as ControllerLike, Rt as SoftDeleteMixin, S as IntrospectionPluginOptions, Sn as ArcDeleteResult, Tn as ArcUpdateResult, Un as RawRouteHandler, Ut as BulkExt, Vn as IControllerResponse, Vt as SlugExt, W as PresetResult, Wn as RouteHandler, Wt as BulkMixin, X as RouteSchemaOptions, _ as ServiceContext, a as IntrospectionData, at as AggregationCacheConfig, b as HealthCheck, c as ResourceMetadata, ct as AggregationIndexHint, dt as AggregationRateLimit, f as OwnershipCheck, ft as AggregationsMap, g as RequestContext, h as QueryParserInterface, i as PaginationResult, it as AggMeasureShorthand, jt as AuthPluginOptions, kn as ListResult, kt as RateLimitConfig, l as ArcInternalMetadata, lt as AggregationMaterializedContext, n as InferDocType, nt as EventDefinition, o as RegistryEntry, ot as AggregationConfig, r as InferResourceDoc, rt as AggMeasureInput, s as RegistryStats, st as AggregationDateRangeRequirement, t as InferAdapterDoc, ut as AggregationMaterializedResult, v as CrudRouterOptions, wn as ArcListResult, x as HealthOptions, xn as ArcCreateResult, y as GracefulShutdownOptions, zt as TreeExt } from "./index-WH7xgvxS.mjs";
|
|
4
|
+
import { a as applyFieldReadPermissions, n as FieldPermissionMap, o as applyFieldWritePermissions, s as fields, t as FieldPermission } from "./fields-BBSpf8pS.mjs";
|
|
5
|
+
import "./fastify-augmentation-DRlCIWE9.mjs";
|
|
6
|
+
import { A as CrudOperation, B as HookOperation, C as mergeResourceConfig, F as DEFAULT_TENANT_FIELD, G as MUTATION_OPERATIONS, H as MAX_FILTER_DEPTH, I as DEFAULT_UPDATE_METHOD, J as SYSTEM_FIELDS, K as MutationOperation, M as DEFAULT_LIMIT, N as DEFAULT_MAX_LIMIT, O as defineAggregation, P as DEFAULT_SORT, R as HOOK_OPERATIONS, S as SeamedResourceConfig, T as defineAction, U as MAX_REGEX_LENGTH, V as HookPhase, W as MAX_SEARCH_LENGTH, b as AdapterLike, c as nativePolicyFilter, j as DEFAULT_ID_FIELD, k as CRUD_OPERATIONS, m as getControllerScope, q as RESERVED_QUERY_PARAMS, s as NativePolicyFilter, x as ResourceSeams, y as defineResourceVariants, z as HOOK_PHASES } from "./index-Beg3aNnK.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, d as adminOnly, et as denyAll, f as authenticated, g as presets_d_exports, m as ownerWithAdminBypass, nt as requireAuth, p as fullPublic, q as AllowPublicOptions, rt as requireOwnership, st as when, v as publicReadAdminWrite, w as requireServiceScope, x as requireOrgMembership, y as readOnly } from "./index-Bxriq3so.mjs";
|
|
8
|
+
import { a as NotFoundError, d as ValidationError, f as createDomainError, i as ForbiddenError, t as ArcError, u as UnauthorizedError } from "./errors-JYc9vwqE.mjs";
|
|
9
9
|
//#region src/index.d.ts
|
|
10
|
-
declare const version: string;
|
|
10
|
+
export declare const version: string;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, 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
|
|
12
|
+
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, presets_d_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, when };
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as DEFAULT_SORT,
|
|
3
|
-
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-
|
|
4
|
-
import {
|
|
5
|
-
import { t as defineAggregation } from "./defineAggregation
|
|
6
|
-
import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
9
|
-
import { a as
|
|
10
|
-
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, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
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-B2QHb6u6.mjs";
|
|
3
|
+
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-CW4anJBy.mjs";
|
|
4
|
+
import { S as nativePolicyFilter, c as BaseController, d as SlugMixin, f as BulkMixin, l as TreeMixin, p as BaseCrudController, u as SoftDeleteMixin } from "./plugin-DALd9dcF.mjs";
|
|
5
|
+
import { t as defineAggregation } from "./defineAggregation--3xguLkk.mjs";
|
|
6
|
+
import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-A5crhsJb.mjs";
|
|
7
|
+
import { S as getControllerScope } from "./actionPermissions-5N04zBL4.mjs";
|
|
8
|
+
import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-COcqo0Cp.mjs";
|
|
9
|
+
import { a as ResourceDefinition, t as defineResource } from "./defineResource-gUp9ug66.mjs";
|
|
10
|
+
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, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-C5ijIz5Q.mjs";
|
|
11
11
|
//#region src/index.ts
|
|
12
|
-
const version = "2.
|
|
12
|
+
const version = "2.44.0";
|
|
13
13
|
//#endregion
|
|
14
14
|
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, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as DomainEvent } from "../EventTransport-
|
|
3
|
-
import { c as WebSocketClient, l as WebSocketMessage } from "../websocket-
|
|
2
|
+
import { n as DomainEvent } from "../EventTransport-CiicKz2Z.mjs";
|
|
3
|
+
import { c as WebSocketClient, l as WebSocketMessage } from "../websocket-Cs4awVyD.mjs";
|
|
4
4
|
import { FastifyPluginAsync, FastifyRequest } from "fastify";
|
|
5
5
|
//#region src/integrations/event-gateway.d.ts
|
|
6
|
-
interface EventGatewayOptions {
|
|
6
|
+
export interface EventGatewayOptions {
|
|
7
7
|
/** Require auth for all real-time connections (default: true) */
|
|
8
8
|
auth?: boolean;
|
|
9
9
|
/** Custom auth function for WebSocket upgrade */
|
|
@@ -11,7 +11,12 @@ interface EventGatewayOptions {
|
|
|
11
11
|
userId?: string;
|
|
12
12
|
organizationId?: string;
|
|
13
13
|
} | null>;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* SSE tenant filtering — forwarded to `ssePlugin`'s `orgScoped`, whose
|
|
16
|
+
* default (**true**) applies when this is omitted. Deliberately not
|
|
17
|
+
* defaulted here: two defaults for one decision is how the stream stayed
|
|
18
|
+
* cross-tenant after the rest of arc failed closed.
|
|
19
|
+
*/
|
|
15
20
|
orgScoped?: boolean;
|
|
16
21
|
/** Room/subscription authorization policy */
|
|
17
22
|
roomPolicy?: (client: {
|
|
@@ -41,6 +46,5 @@ interface EventGatewayOptions {
|
|
|
41
46
|
onDisconnect?: (client: WebSocketClient) => void | Promise<void>;
|
|
42
47
|
};
|
|
43
48
|
}
|
|
44
|
-
declare const eventGatewayPlugin: FastifyPluginAsync<EventGatewayOptions>;
|
|
45
|
-
//#endregion
|
|
46
|
-
export { EventGatewayOptions, eventGatewayPlugin };
|
|
49
|
+
export declare const eventGatewayPlugin: FastifyPluginAsync<EventGatewayOptions>;
|
|
50
|
+
//#endregion
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
2
|
import fp from "fastify-plugin";
|
|
3
3
|
//#region src/integrations/event-gateway.ts
|
|
4
4
|
const eventGatewayPluginImpl = async (fastify, opts = {}) => {
|
|
5
|
-
const { auth = true, orgScoped
|
|
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-BzJFPX_1.mjs").then((n) => n.n);
|
|
9
9
|
await fastify.register(ssePlugin, {
|
|
10
10
|
path: opts.sse?.path ?? "/events/stream",
|
|
11
11
|
requireAuth: auth,
|
|
12
12
|
patterns: opts.sse?.patterns ?? ["*"],
|
|
13
13
|
heartbeat: opts.sse?.heartbeat ?? 3e4,
|
|
14
|
-
orgScoped,
|
|
14
|
+
...orgScoped !== void 0 ? { orgScoped } : {},
|
|
15
15
|
filter: opts.sse?.filter
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { c as WebSocketClient, l as WebSocketMessage, u as WebSocketPluginOptions } from "../websocket-
|
|
2
|
+
import { c as WebSocketClient, l as WebSocketMessage, u as WebSocketPluginOptions } from "../websocket-Cs4awVyD.mjs";
|
|
3
3
|
import { EventGatewayOptions } from "./event-gateway.mjs";
|
|
4
|
-
import { a as JobMeta, c as JobsPluginOptions, i as JobDispatcher, l as QueueStats, n as JobDefinition, r as JobDispatchOptions } from "../index-
|
|
5
|
-
import { _ as ToolDefinition, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, n as CallToolResult, o as CrudOperation, r as CreateMcpServerConfig, t as BetterAuthHandler, u as McpPluginOptions } from "../types-
|
|
4
|
+
import { a as JobMeta, c as JobsPluginOptions, i as JobDispatcher, l as QueueStats, n as JobDefinition, r as JobDispatchOptions } from "../index-Chgz3d0i.mjs";
|
|
5
|
+
import { _ as ToolDefinition, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, n as CallToolResult, o as CrudOperation, r as CreateMcpServerConfig, t as BetterAuthHandler, u as McpPluginOptions } from "../types-D3Ixsh00.mjs";
|
|
6
6
|
import { StreamlinePluginOptions, WorkflowLike, WorkflowRunLike } from "./streamline.mjs";
|
|
7
7
|
import { WebhookDeliveryRecord, WebhookManager, WebhookPluginOptions, WebhookStore, WebhookSubscription } from "./webhooks.mjs";
|
|
8
8
|
export type { BetterAuthHandler, CallToolResult, CreateMcpServerConfig, CrudOperation, EventGatewayOptions, JobDefinition, JobDispatchOptions, JobDispatcher, JobMeta, JobsPluginOptions, McpAuthResult, McpPluginOptions, McpResourceConfig, PromptDefinition, QueueStats, StreamlinePluginOptions, ToolAnnotations, ToolContext, ToolDefinition, WebSocketClient, WebSocketMessage, WebSocketPluginOptions, WebhookDeliveryRecord, WebhookManager, WebhookPluginOptions, WebhookStore, WebhookSubscription, WorkflowLike, WorkflowRunLike };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
2
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as JobMeta, c as JobsPluginOptions, d as ExecuteTimedHandlerOptions, f as TimedHandlerLogger, i as JobDispatcher, l as QueueStats, n as JobDefinition, o as JobRepeatOptions, p as executeTimedHandler, r as JobDispatchOptions, s as JobStatus, t as jobsPlugin, u as defineJob } from "../../index-
|
|
2
|
+
import { a as JobMeta, c as JobsPluginOptions, d as ExecuteTimedHandlerOptions, f as TimedHandlerLogger, i as JobDispatcher, l as QueueStats, n as JobDefinition, o as JobRepeatOptions, p as executeTimedHandler, r as JobDispatchOptions, s as JobStatus, t as jobsPlugin, u as defineJob } from "../../index-Chgz3d0i.mjs";
|
|
3
3
|
export { type ExecuteTimedHandlerOptions, type JobDefinition, type JobDispatchOptions, type JobDispatcher, type JobMeta, type JobRepeatOptions, type JobStatus, type JobsPluginOptions, type QueueStats, type TimedHandlerLogger, defineJob, executeTimedHandler, jobsPlugin };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evaluateAndApplyPermission } from "../../authorizationDecision-
|
|
1
|
+
/*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evaluateAndApplyPermission } from "../../authorizationDecision-wX3SA9w_.mjs";
|
|
3
|
+
import { i as runAdmittedWork, r as registerShutdownParticipant } from "../../shutdown-LpLMH8T1.mjs";
|
|
3
4
|
import fp from "fastify-plugin";
|
|
4
5
|
//#region src/integrations/jobs/execution.ts
|
|
5
6
|
async function executeTimedHandler(options) {
|
|
@@ -150,6 +151,7 @@ const jobsPluginImpl = async (fastify, options) => {
|
|
|
150
151
|
const queues = /* @__PURE__ */ new Map();
|
|
151
152
|
const dlqQueues = /* @__PURE__ */ new Map();
|
|
152
153
|
const workers = /* @__PURE__ */ new Map();
|
|
154
|
+
const activeHandlers = /* @__PURE__ */ new Set();
|
|
153
155
|
const throttledJobs = /* @__PURE__ */ new Map();
|
|
154
156
|
const seenNames = /* @__PURE__ */ new Set();
|
|
155
157
|
for (const job of jobs) {
|
|
@@ -255,7 +257,11 @@ const jobsPluginImpl = async (fastify, options) => {
|
|
|
255
257
|
timestamp: Date.now(),
|
|
256
258
|
signal
|
|
257
259
|
};
|
|
258
|
-
|
|
260
|
+
const pending = runAdmittedWork(() => job.handler(bullJob.data, meta));
|
|
261
|
+
activeHandlers.add(pending);
|
|
262
|
+
return pending.finally(() => {
|
|
263
|
+
activeHandlers.delete(pending);
|
|
264
|
+
});
|
|
259
265
|
}
|
|
260
266
|
});
|
|
261
267
|
if (bridgeEvents && fastify.events?.publish) try {
|
|
@@ -454,8 +460,15 @@ const jobsPluginImpl = async (fastify, options) => {
|
|
|
454
460
|
};
|
|
455
461
|
});
|
|
456
462
|
}
|
|
457
|
-
fastify
|
|
458
|
-
|
|
463
|
+
registerShutdownParticipant(fastify, {
|
|
464
|
+
name: "jobs",
|
|
465
|
+
stop: async () => {
|
|
466
|
+
await Promise.all(Array.from(workers.values()).map((worker) => worker.pause(true)));
|
|
467
|
+
},
|
|
468
|
+
drain: async () => {
|
|
469
|
+
await dispatcher.close();
|
|
470
|
+
await Promise.allSettled([...activeHandlers]);
|
|
471
|
+
}
|
|
459
472
|
});
|
|
460
473
|
};
|
|
461
474
|
/**
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import { i as RequestScope } from "../../types-Ddl9OjmE.mjs";
|
|
3
|
-
import { l as PermissionCheck } from "../../base-
|
|
4
|
-
import {
|
|
5
|
-
import { n as FieldPermissionMap } from "../../fields-
|
|
6
|
-
import
|
|
7
|
-
import { i as
|
|
3
|
+
import { l as PermissionCheck } from "../../base-CZyixEQR.mjs";
|
|
4
|
+
import { F as ResourceDefinition, Gn as ServerAccessor, Hn as IRequestContext, Vn as IControllerResponse } from "../../index-WH7xgvxS.mjs";
|
|
5
|
+
import { n as FieldPermissionMap } from "../../fields-BBSpf8pS.mjs";
|
|
6
|
+
import "../../resourceRateLimit-Wf6d6FL9.mjs";
|
|
7
|
+
import { _ as ToolDefinition, a as CrudDescriptionOverride, c as McpAuthResult, d as McpResourceConfig, f as PromptDefinition, g as ToolContext, h as ToolAnnotations, i as CrudDescriptionMeta, l as McpExecutionWiring, m as SessionEntry, n as CallToolResult, o as CrudOperation, p as PromptResult, r as CreateMcpServerConfig, s as McpAuthResolver, t as BetterAuthHandler, u as McpPluginOptions, v as ToolInputSchema } from "../../types-D3Ixsh00.mjs";
|
|
8
|
+
import { i as resolveToolCollisions, n as McpServerInstance, r as createMcpServer, t as AuthRef } from "../../createMcpServer-DSztofa9.mjs";
|
|
8
9
|
import { ErrorContract } from "@classytic/repo-core/errors";
|
|
9
10
|
import { FastifyPluginAsync } from "fastify";
|
|
10
11
|
import { z } from "zod";
|
|
@@ -34,7 +35,7 @@ interface McpBridge {
|
|
|
34
35
|
guard?: (ctx: ToolContext) => string | null;
|
|
35
36
|
}
|
|
36
37
|
/** Convert a McpBridge into a registered MCP tool. */
|
|
37
|
-
declare function bridgeToMcp(bridge: McpBridge): ToolDefinition;
|
|
38
|
+
export declare function bridgeToMcp(bridge: McpBridge): ToolDefinition;
|
|
38
39
|
interface BuildMcpToolsFromBridgesOptions {
|
|
39
40
|
/** If set, only bridges whose `name` is in this array are registered. */
|
|
40
41
|
include?: string[];
|
|
@@ -54,7 +55,7 @@ interface BuildMcpToolsFromBridgesOptions {
|
|
|
54
55
|
* extraTools: [...buildMcpToolsFromBridges(allBridges, { exclude: ['trigger_job'] })]
|
|
55
56
|
* ```
|
|
56
57
|
*/
|
|
57
|
-
declare function buildMcpToolsFromBridges(bridges: readonly McpBridge[], options?: BuildMcpToolsFromBridgesOptions): ToolDefinition[];
|
|
58
|
+
export declare function buildMcpToolsFromBridges(bridges: readonly McpBridge[], options?: BuildMcpToolsFromBridgesOptions): ToolDefinition[];
|
|
58
59
|
//#endregion
|
|
59
60
|
//#region src/integrations/mcp/betterAuthApiKey.d.ts
|
|
60
61
|
/** Minimal subset of Better Auth's API-key record the helper needs. */
|
|
@@ -95,7 +96,61 @@ interface CreateMcpAuthFromBetterAuthApiKeyOptions {
|
|
|
95
96
|
* Build an {@link McpAuthResolver} that authenticates MCP requests against
|
|
96
97
|
* Better Auth's API-key plugin. See module docstring for the rationale.
|
|
97
98
|
*/
|
|
98
|
-
declare function createMcpAuthFromBetterAuthApiKey(auth: BetterAuthHandler, options?: CreateMcpAuthFromBetterAuthApiKeyOptions): McpAuthResolver;
|
|
99
|
+
export declare function createMcpAuthFromBetterAuthApiKey(auth: BetterAuthHandler, options?: CreateMcpAuthFromBetterAuthApiKeyOptions): McpAuthResolver;
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/integrations/mcp/buildRequestContext.d.ts
|
|
102
|
+
type McpOperation = "list" | "get" | "create" | "update" | "delete" | "action";
|
|
103
|
+
/**
|
|
104
|
+
* Optional context extras — the pieces of `IRequestContext` that HTTP's
|
|
105
|
+
* `createRequestContext` assembles from Fastify decorators and the MCP
|
|
106
|
+
* synthetic path historically DROPPED. Without them, controller code that
|
|
107
|
+
* reads `metadata.arc.hooks` (the whole hook system — including the
|
|
108
|
+
* arcCorePlugin after-hook that publishes `<resource>.<op>d` events) or
|
|
109
|
+
* `ctx.server.events` silently no-ops on MCP calls: agents could mutate
|
|
110
|
+
* records without hooks firing, events publishing, realtime feeds updating,
|
|
111
|
+
* or webhooks dispatching. Thread these through `invokeController` /
|
|
112
|
+
* `resourceToTools({ wiring })` to restore full HTTP ↔ MCP parity.
|
|
113
|
+
*/
|
|
114
|
+
interface McpContextExtras {
|
|
115
|
+
tenantMiddlewares?: readonly unknown[];
|
|
116
|
+
/**
|
|
117
|
+
* Resource wiring — becomes `metadata.arc`, the same frozen shape
|
|
118
|
+
* `buildArcDecorator` stamps on HTTP requests (`ArcRouteMeta`).
|
|
119
|
+
*/
|
|
120
|
+
arc?: {
|
|
121
|
+
readonly resourceName: string;
|
|
122
|
+
readonly schemaOptions?: unknown;
|
|
123
|
+
readonly permissions?: unknown;
|
|
124
|
+
readonly hooks?: unknown;
|
|
125
|
+
readonly events?: unknown;
|
|
126
|
+
readonly fields?: unknown;
|
|
127
|
+
readonly idField?: string;
|
|
128
|
+
};
|
|
129
|
+
/** Server accessor — `ctx.server.events/audit/log`, mirroring HTTP. */
|
|
130
|
+
server?: ServerAccessor;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Build an IRequestContext from MCP tool input and session auth.
|
|
134
|
+
*
|
|
135
|
+
* | Operation | params | query | body |
|
|
136
|
+
* |-----------|------------|----------------------|---------------------|
|
|
137
|
+
* | list | {} | all input fields | undefined |
|
|
138
|
+
* | get | { id } | {} | undefined |
|
|
139
|
+
* | create | {} | {} | all input fields |
|
|
140
|
+
* | update | { id } | {} | input minus id |
|
|
141
|
+
* | delete | { id } | {} | undefined |
|
|
142
|
+
*
|
|
143
|
+
* **scopeOverride** — when a permission check (e.g. `requireApiKey()`) returns
|
|
144
|
+
* an `AuthorizationDecision.scope`, the MCP tool handler must install it on the
|
|
145
|
+
* request context the same way CRUD/action routes do. This parameter follows the exact
|
|
146
|
+
* same non-downgrade rule as `applyAuthorizationDecision`: it overrides only when
|
|
147
|
+
* the session-derived scope is `public` (i.e. MCP called with `auth: false`).
|
|
148
|
+
* An authenticated session scope is never overwritten.
|
|
149
|
+
*/
|
|
150
|
+
export declare function buildRequestContext(input: Record<string, unknown>, auth: McpAuthResult | null, operation: McpOperation, policyFilters?: Record<string, unknown>, scopeOverride?: RequestScope, extras?: McpContextExtras): IRequestContext;
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/integrations/mcp/http-parity.d.ts
|
|
153
|
+
type ToolAdmission = (session: McpAuthResult | null, scope?: RequestScope) => boolean | Promise<boolean>;
|
|
99
154
|
//#endregion
|
|
100
155
|
//#region src/integrations/mcp/crud-tools.d.ts
|
|
101
156
|
/**
|
|
@@ -107,7 +162,7 @@ declare function createMcpAuthFromBetterAuthApiKey(auth: BetterAuthHandler, opti
|
|
|
107
162
|
* override can call this from their own override to keep the auto-derived
|
|
108
163
|
* blurb intact and only append extra context.
|
|
109
164
|
*/
|
|
110
|
-
declare function defaultCrudDescription(op: CrudOperation, displayName: string, softDelete: boolean, queryMeta?: {
|
|
165
|
+
export declare function defaultCrudDescription(op: CrudOperation, displayName: string, softDelete: boolean, queryMeta?: {
|
|
111
166
|
filterableFields?: readonly string[];
|
|
112
167
|
allowedOperators?: readonly string[];
|
|
113
168
|
sortableFields?: readonly string[];
|
|
@@ -119,7 +174,7 @@ declare function defaultCrudDescription(op: CrudOperation, displayName: string,
|
|
|
119
174
|
*
|
|
120
175
|
* Falls back to {@link defaultCrudDescription} when no override is set.
|
|
121
176
|
*/
|
|
122
|
-
declare function resolveCrudDescription(override: CrudDescriptionOverride | undefined, meta: CrudDescriptionMeta): string;
|
|
177
|
+
export declare function resolveCrudDescription(override: CrudDescriptionOverride | undefined, meta: CrudDescriptionMeta): string;
|
|
123
178
|
//#endregion
|
|
124
179
|
//#region src/integrations/mcp/definePrompt.d.ts
|
|
125
180
|
/** definePrompt() config */
|
|
@@ -136,7 +191,7 @@ interface DefinePromptConfig<TArgs extends Record<string, z.ZodTypeAny>> {
|
|
|
136
191
|
* @param name - Prompt name (snake_case recommended)
|
|
137
192
|
* @param config - Description, args schema, handler
|
|
138
193
|
*/
|
|
139
|
-
declare function definePrompt<TArgs extends Record<string, z.ZodTypeAny>>(name: string, config: DefinePromptConfig<TArgs>): PromptDefinition;
|
|
194
|
+
export declare function definePrompt<TArgs extends Record<string, z.ZodTypeAny>>(name: string, config: DefinePromptConfig<TArgs>): PromptDefinition;
|
|
140
195
|
//#endregion
|
|
141
196
|
//#region src/integrations/mcp/defineTool.d.ts
|
|
142
197
|
/**
|
|
@@ -163,7 +218,7 @@ interface DefineToolConfig<TInput extends Record<string, z.ZodTypeAny>, TSession
|
|
|
163
218
|
* @param name - Tool name (snake_case recommended)
|
|
164
219
|
* @param config - Tool description, input schema, annotations, handler
|
|
165
220
|
*/
|
|
166
|
-
declare function defineTool<TInput extends Record<string, z.ZodTypeAny>, TSession = McpAuthResult>(name: string, config: DefineToolConfig<TInput, TSession>): ToolDefinition<TSession>;
|
|
221
|
+
export declare function defineTool<TInput extends Record<string, z.ZodTypeAny>, TSession = McpAuthResult>(name: string, config: DefineToolConfig<TInput, TSession>): ToolDefinition<TSession>;
|
|
167
222
|
//#endregion
|
|
168
223
|
//#region src/integrations/mcp/fieldRulesToZod.d.ts
|
|
169
224
|
interface FieldRulesToZodOptions {
|
|
@@ -212,21 +267,21 @@ interface FieldRuleEntry {
|
|
|
212
267
|
*
|
|
213
268
|
* @returns Flat shape `Record<string, z.ZodTypeAny>` — pass directly to defineTool() or registerTool()
|
|
214
269
|
*/
|
|
215
|
-
declare function fieldRulesToZod(fieldRules: Record<string, FieldRuleEntry> | undefined, options?: FieldRulesToZodOptions): Record<string, z.ZodTypeAny>;
|
|
270
|
+
export declare function fieldRulesToZod(fieldRules: Record<string, FieldRuleEntry> | undefined, options?: FieldRulesToZodOptions): Record<string, z.ZodTypeAny>;
|
|
216
271
|
//#endregion
|
|
217
272
|
//#region src/integrations/mcp/guards.d.ts
|
|
218
273
|
/** Check if the tool context has an authenticated user (not anonymous/null) */
|
|
219
|
-
declare function isAuthenticated(ctx: ToolContext): boolean;
|
|
274
|
+
export declare function isAuthenticated(ctx: ToolContext): boolean;
|
|
220
275
|
/** Check if the tool context has an organization scope */
|
|
221
|
-
declare function hasOrg(ctx: ToolContext): boolean;
|
|
276
|
+
export declare function hasOrg(ctx: ToolContext): boolean;
|
|
222
277
|
/** Check if the tool context matches a specific org */
|
|
223
|
-
declare function isOrg(ctx: ToolContext, orgId: string): boolean;
|
|
278
|
+
export declare function isOrg(ctx: ToolContext, orgId: string): boolean;
|
|
224
279
|
/** Get the current user ID from context (undefined if anonymous/null) */
|
|
225
|
-
declare function getUserId(ctx: ToolContext): string | undefined;
|
|
280
|
+
export declare function getUserId(ctx: ToolContext): string | undefined;
|
|
226
281
|
/** Get the current org ID from context */
|
|
227
|
-
declare function getOrgId(ctx: ToolContext): string | undefined;
|
|
282
|
+
export declare function getOrgId(ctx: ToolContext): string | undefined;
|
|
228
283
|
/** Create a denied (isError) CallToolResult */
|
|
229
|
-
declare function denied(reason: string): CallToolResult;
|
|
284
|
+
export declare function denied(reason: string): CallToolResult;
|
|
230
285
|
/** Guard type — checks ToolContext, returns error message or null (pass) */
|
|
231
286
|
type McpGuard = (ctx: ToolContext) => string | null | Promise<string | null>;
|
|
232
287
|
/**
|
|
@@ -243,15 +298,15 @@ type McpGuard = (ctx: ToolContext) => string | null | Promise<string | null>;
|
|
|
243
298
|
* });
|
|
244
299
|
* ```
|
|
245
300
|
*/
|
|
246
|
-
declare function guard(...args: [...McpGuard[], (input: Record<string, unknown>, ctx: ToolContext) => Promise<CallToolResult>]): (input: Record<string, unknown>, ctx: ToolContext) => Promise<CallToolResult>;
|
|
301
|
+
export declare function guard(...args: [...McpGuard[], (input: Record<string, unknown>, ctx: ToolContext) => Promise<CallToolResult>]): (input: Record<string, unknown>, ctx: ToolContext) => Promise<CallToolResult>;
|
|
247
302
|
/** Require authenticated user (not anonymous) */
|
|
248
|
-
declare const requireAuth: McpGuard;
|
|
303
|
+
export declare const requireAuth: McpGuard;
|
|
249
304
|
/** Require organization context */
|
|
250
|
-
declare const requireOrg: McpGuard;
|
|
305
|
+
export declare const requireOrg: McpGuard;
|
|
251
306
|
/** Require specific user role (checks session metadata if available) */
|
|
252
|
-
declare function requireRole(...roles: string[]): McpGuard;
|
|
307
|
+
export declare function requireRole(...roles: string[]): McpGuard;
|
|
253
308
|
/** Require specific organization */
|
|
254
|
-
declare function requireOrgId(orgId: string): McpGuard;
|
|
309
|
+
export declare function requireOrgId(orgId: string): McpGuard;
|
|
255
310
|
/**
|
|
256
311
|
* Custom guard from a predicate function.
|
|
257
312
|
*
|
|
@@ -263,57 +318,7 @@ declare function requireOrgId(orgId: string): McpGuard;
|
|
|
263
318
|
* );
|
|
264
319
|
* ```
|
|
265
320
|
*/
|
|
266
|
-
declare function customGuard(check: (ctx: ToolContext) => boolean | Promise<boolean>, errorMessage: string): McpGuard;
|
|
267
|
-
//#endregion
|
|
268
|
-
//#region src/integrations/mcp/buildRequestContext.d.ts
|
|
269
|
-
type McpOperation = "list" | "get" | "create" | "update" | "delete" | "action";
|
|
270
|
-
/**
|
|
271
|
-
* Optional context extras — the pieces of `IRequestContext` that HTTP's
|
|
272
|
-
* `createRequestContext` assembles from Fastify decorators and the MCP
|
|
273
|
-
* synthetic path historically DROPPED. Without them, controller code that
|
|
274
|
-
* reads `metadata.arc.hooks` (the whole hook system — including the
|
|
275
|
-
* arcCorePlugin after-hook that publishes `<resource>.<op>d` events) or
|
|
276
|
-
* `ctx.server.events` silently no-ops on MCP calls: agents could mutate
|
|
277
|
-
* records without hooks firing, events publishing, realtime feeds updating,
|
|
278
|
-
* or webhooks dispatching. Thread these through `invokeController` /
|
|
279
|
-
* `resourceToTools({ wiring })` to restore full HTTP ↔ MCP parity.
|
|
280
|
-
*/
|
|
281
|
-
interface McpContextExtras {
|
|
282
|
-
/**
|
|
283
|
-
* Resource wiring — becomes `metadata.arc`, the same frozen shape
|
|
284
|
-
* `buildArcDecorator` stamps on HTTP requests (`ArcRouteMeta`).
|
|
285
|
-
*/
|
|
286
|
-
arc?: {
|
|
287
|
-
readonly resourceName: string;
|
|
288
|
-
readonly schemaOptions?: unknown;
|
|
289
|
-
readonly permissions?: unknown;
|
|
290
|
-
readonly hooks?: unknown;
|
|
291
|
-
readonly events?: unknown;
|
|
292
|
-
readonly fields?: unknown;
|
|
293
|
-
readonly idField?: string;
|
|
294
|
-
};
|
|
295
|
-
/** Server accessor — `ctx.server.events/audit/log`, mirroring HTTP. */
|
|
296
|
-
server?: ServerAccessor;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Build an IRequestContext from MCP tool input and session auth.
|
|
300
|
-
*
|
|
301
|
-
* | Operation | params | query | body |
|
|
302
|
-
* |-----------|------------|----------------------|---------------------|
|
|
303
|
-
* | list | {} | all input fields | undefined |
|
|
304
|
-
* | get | { id } | {} | undefined |
|
|
305
|
-
* | create | {} | {} | all input fields |
|
|
306
|
-
* | update | { id } | {} | input minus id |
|
|
307
|
-
* | delete | { id } | {} | undefined |
|
|
308
|
-
*
|
|
309
|
-
* **scopeOverride** — when a permission check (e.g. `requireApiKey()`) returns
|
|
310
|
-
* an `AuthorizationDecision.scope`, the MCP tool handler must install it on the
|
|
311
|
-
* request context the same way CRUD/action routes do. This parameter follows the exact
|
|
312
|
-
* same non-downgrade rule as `applyAuthorizationDecision`: it overrides only when
|
|
313
|
-
* the session-derived scope is `public` (i.e. MCP called with `auth: false`).
|
|
314
|
-
* An authenticated session scope is never overwritten.
|
|
315
|
-
*/
|
|
316
|
-
declare function buildRequestContext(input: Record<string, unknown>, auth: McpAuthResult | null, operation: McpOperation, policyFilters?: Record<string, unknown>, scopeOverride?: RequestScope, extras?: McpContextExtras): IRequestContext;
|
|
321
|
+
export declare function customGuard(check: (ctx: ToolContext) => boolean | Promise<boolean>, errorMessage: string): McpGuard;
|
|
317
322
|
//#endregion
|
|
318
323
|
//#region src/integrations/mcp/invokeController.d.ts
|
|
319
324
|
/**
|
|
@@ -322,8 +327,10 @@ declare function buildRequestContext(input: Record<string, unknown>, auth: McpAu
|
|
|
322
327
|
* identity; everything else is optional and falls back to sensible defaults.
|
|
323
328
|
*/
|
|
324
329
|
interface InvokeControllerOptions {
|
|
330
|
+
readonly allow?: ToolAdmission;
|
|
325
331
|
/** Resolved identity for this invocation — `null` runs as public scope. */
|
|
326
332
|
readonly session: McpAuthResult | null;
|
|
333
|
+
readonly tenantMiddlewares?: readonly unknown[];
|
|
327
334
|
/** Resource name surfaced into the permission context (`PermissionContext.resource`). */
|
|
328
335
|
readonly resourceName: string;
|
|
329
336
|
/**
|
|
@@ -405,7 +412,7 @@ interface InvokeControllerOptions {
|
|
|
405
412
|
* `McpAuthResult` the HTTP MCP plugin produces, so the same permission
|
|
406
413
|
* checks compose.
|
|
407
414
|
*/
|
|
408
|
-
declare function invokeController(controller: unknown, op: McpOperation, input: Record<string, unknown>, options: InvokeControllerOptions): Promise<CallToolResult>;
|
|
415
|
+
export declare function invokeController(controller: unknown, op: McpOperation, input: Record<string, unknown>, options: InvokeControllerOptions): Promise<CallToolResult>;
|
|
409
416
|
/**
|
|
410
417
|
* Wrap an async function as a {@link ToolDefinition} handler — handles the
|
|
411
418
|
* try/catch → canonical-error translation in one place so MCP tools that
|
|
@@ -433,7 +440,7 @@ declare function invokeController(controller: unknown, op: McpOperation, input:
|
|
|
433
440
|
* });
|
|
434
441
|
* ```
|
|
435
442
|
*/
|
|
436
|
-
declare function mcpHandlerAdapter<TSession = McpAuthResult>(fn: (input: Record<string, unknown>, ctx: ToolContext<TSession>) => Promise<unknown>): ToolDefinition<TSession>["handler"];
|
|
443
|
+
export declare function mcpHandlerAdapter<TSession = McpAuthResult>(fn: (input: Record<string, unknown>, ctx: ToolContext<TSession>) => Promise<unknown>): ToolDefinition<TSession>["handler"];
|
|
437
444
|
//#endregion
|
|
438
445
|
//#region src/integrations/mcp/sessionCache.d.ts
|
|
439
446
|
declare class McpSessionCache {
|
|
@@ -499,11 +506,10 @@ interface ResourceFilterInputs {
|
|
|
499
506
|
readonly exclude?: readonly string[];
|
|
500
507
|
}
|
|
501
508
|
/**
|
|
502
|
-
* Resolve `expose` / `
|
|
503
|
-
*
|
|
509
|
+
* Resolve `expose` / `exclude` into the filtered resource list `mcpPlugin`
|
|
510
|
+
* should surface. Two mutually exclusive intents:
|
|
504
511
|
*
|
|
505
512
|
* - `expose`: default-deny allowlist (preferred — new resources auto-deny).
|
|
506
|
-
* - `include`: legacy alias for `expose`, kept for back-compat.
|
|
507
513
|
* - `exclude`: default-allow opt-out (drift-prone — new resources auto-leak).
|
|
508
514
|
*
|
|
509
515
|
* Conflicting combinations throw with an actionable message so a host that
|
|
@@ -520,11 +526,11 @@ interface ResourceFilterInputs {
|
|
|
520
526
|
* Exported so `mcp/testing.ts` and external test harnesses can apply the
|
|
521
527
|
* same precedence rules without duplicating them.
|
|
522
528
|
*/
|
|
523
|
-
declare function filterResourcesForMcp<T extends {
|
|
529
|
+
export declare function filterResourcesForMcp<T extends {
|
|
524
530
|
name: string;
|
|
525
531
|
mcp?: boolean;
|
|
526
532
|
}>(resources: readonly T[], inputs: ResourceFilterInputs): T[];
|
|
527
|
-
declare const mcpPlugin: FastifyPluginAsync<McpPluginOptions>;
|
|
533
|
+
export declare const mcpPlugin: FastifyPluginAsync<McpPluginOptions>;
|
|
528
534
|
//#endregion
|
|
529
535
|
//#region src/integrations/mcp/realtimeBridge.d.ts
|
|
530
536
|
/**
|
|
@@ -564,7 +570,7 @@ interface DispatchOptions<TSession = unknown> {
|
|
|
564
570
|
* handler throw). The realtime client uses the `id` to correlate
|
|
565
571
|
* responses to the original calls.
|
|
566
572
|
*/
|
|
567
|
-
declare function dispatchRealtimeToolCall<TSession = unknown>(tools: readonly ToolDefinition[], calls: readonly RealtimeToolCall[], opts?: DispatchOptions<TSession>): Promise<RealtimeToolResponse[]>;
|
|
573
|
+
export declare function dispatchRealtimeToolCall<TSession = unknown>(tools: readonly ToolDefinition[], calls: readonly RealtimeToolCall[], opts?: DispatchOptions<TSession>): Promise<RealtimeToolResponse[]>;
|
|
568
574
|
//#endregion
|
|
569
575
|
//#region src/integrations/mcp/resourceToTools.d.ts
|
|
570
576
|
interface ResourceToToolsConfig extends McpResourceConfig {
|
|
@@ -592,7 +598,14 @@ interface ResourceToToolsConfig extends McpResourceConfig {
|
|
|
592
598
|
* @param resource - Arc resource definition
|
|
593
599
|
* @param config - Optional overrides (operations, descriptions, hideFields, prefix, names)
|
|
594
600
|
*/
|
|
595
|
-
declare function resourceToTools(resource: ResourceDefinition, config?: ResourceToToolsConfig): ToolDefinition[];
|
|
601
|
+
export declare function resourceToTools(resource: ResourceDefinition, config?: ResourceToToolsConfig): ToolDefinition[];
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/integrations/mcp/route-input-schema.d.ts
|
|
604
|
+
/**
|
|
605
|
+
* The field shape a tool advertises — the flat record itself, or a whole object
|
|
606
|
+
* schema's `.shape`. `undefined` for a union, which has no single shape.
|
|
607
|
+
*/
|
|
608
|
+
export declare function toolInputShape(schema: ToolInputSchema | undefined): Record<string, z.ZodTypeAny> | undefined;
|
|
596
609
|
//#endregion
|
|
597
610
|
//#region src/integrations/mcp/tool-helpers.d.ts
|
|
598
611
|
/**
|
|
@@ -603,7 +616,7 @@ declare function resourceToTools(resource: ResourceDefinition, config?: Resource
|
|
|
603
616
|
* Errors are not represented here — controllers throw `ArcError` and the
|
|
604
617
|
* MCP tool wrapper catches them via {@link toCallToolError}.
|
|
605
618
|
*/
|
|
606
|
-
declare function toCallToolResult(result: IControllerResponse): CallToolResult;
|
|
619
|
+
export declare function toCallToolResult(result: IControllerResponse): CallToolResult;
|
|
607
620
|
/**
|
|
608
621
|
* Wrap a raw success payload as an MCP `CallToolResult`. Use when the
|
|
609
622
|
* tool produced a value directly (action handler return, aggregation
|
|
@@ -613,7 +626,7 @@ declare function toCallToolResult(result: IControllerResponse): CallToolResult;
|
|
|
613
626
|
* the HTTP wire follows. The `isError: true` flag on `CallToolResult`
|
|
614
627
|
* is the success/error discriminant for MCP, mirroring HTTP status.
|
|
615
628
|
*/
|
|
616
|
-
declare function toCallToolSuccess(value: unknown): CallToolResult;
|
|
629
|
+
export declare function toCallToolSuccess(value: unknown): CallToolResult;
|
|
617
630
|
/**
|
|
618
631
|
* Wrap an error as an MCP `CallToolResult` with the canonical
|
|
619
632
|
* `ErrorContract` shape inside the text payload. Single source of truth
|
|
@@ -627,7 +640,7 @@ declare function toCallToolSuccess(value: unknown): CallToolResult;
|
|
|
627
640
|
* - A partial contract `{code, message, status, details?}` → used as-is.
|
|
628
641
|
* - Any other `Error` → falls back to `arc.internal_error` 500.
|
|
629
642
|
*/
|
|
630
|
-
declare function toCallToolError(input: Error | {
|
|
643
|
+
export declare function toCallToolError(input: Error | {
|
|
631
644
|
code: string;
|
|
632
645
|
message: string;
|
|
633
646
|
status?: number;
|
|
@@ -639,11 +652,11 @@ declare function toCallToolError(input: Error | {
|
|
|
639
652
|
* 403 (session present, denied — "Permission denied"). Mirrors the
|
|
640
653
|
* status split the HTTP `errorHandler` plugin uses.
|
|
641
654
|
*/
|
|
642
|
-
declare function permissionDeniedResult(args: {
|
|
655
|
+
export declare function permissionDeniedResult(args: {
|
|
643
656
|
resource: string;
|
|
644
657
|
operation: string;
|
|
645
658
|
reason?: string;
|
|
646
659
|
session: McpAuthResult | null;
|
|
647
660
|
}): CallToolResult;
|
|
648
661
|
//#endregion
|
|
649
|
-
export { type AuthRef, type BetterAuthHandler, type BuildMcpToolsFromBridgesOptions, type CallToolResult, type CreateMcpAuthFromBetterAuthApiKeyOptions, type CreateMcpServerConfig, type CrudDescriptionMeta, type CrudDescriptionOverride, type CrudOperation, type DefinePromptConfig, type DefineToolConfig, type DispatchOptions, type FieldRuleEntry, type FieldRulesToZodOptions, type InvokeControllerOptions, type McpAuthResolver, type McpAuthResult, type McpBridge, type McpGuard, type McpOperation, type McpPluginOptions, type McpResourceConfig, type McpServerInstance, type PromptDefinition, type PromptResult, type RealtimeToolCall, type RealtimeToolResponse, type ResourceToToolsConfig, type ToolAnnotations, type ToolContext, type ToolDefinition,
|
|
662
|
+
export { type AuthRef, type BetterAuthHandler, type BuildMcpToolsFromBridgesOptions, type CallToolResult, type CreateMcpAuthFromBetterAuthApiKeyOptions, type CreateMcpServerConfig, type CrudDescriptionMeta, type CrudDescriptionOverride, type CrudOperation, type DefinePromptConfig, type DefineToolConfig, type DispatchOptions, type FieldRuleEntry, type FieldRulesToZodOptions, type InvokeControllerOptions, type McpAuthResolver, type McpAuthResult, type McpBridge, type McpContextExtras, type McpGuard, type McpOperation, type McpPluginOptions, type McpResourceConfig, type McpServerInstance, type PromptDefinition, type PromptResult, type RealtimeToolCall, type RealtimeToolResponse, type ResourceToToolsConfig, type ToolAnnotations, type ToolContext, type ToolDefinition, type ToolInputSchema, createMcpServer, resolveToolCollisions };
|