@zuplo/runtime 6.70.36 → 6.70.39

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.
@@ -22,5 +22,5 @@
22
22
  * DEALINGS IN THE SOFTWARE.
23
23
  *--------------------------------------------------------------------------------------------*/
24
24
 
25
- import{b as l}from"../chunk-A2CSR4RF.js";import{a as o,da as n}from"../chunk-2VLXJLVI.js";function g(u={request:new Request("https://api.example.com")}){let e=[];function t(i){e.push(Promise.resolve(i))}return o(t,"waitUntil"),{context:new s({event:{waitUntil:t},route:u.route}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(g,"createMockContext");var p={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},s=class extends EventTarget{static{o(this,"MockZuploContext")}#e;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=p,parentContext:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:n.console.info,log:n.console.log,debug:n.console.debug,warn:n.console.warn,error:n.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=r,this.#e=e,this.analyticsContext=new l(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,r){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,t,r){let d=o(i=>{try{typeof t=="function"?t(i):t.handleEvent(i)}catch(a){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),a}},"wrapped");super.addEventListener(e,d,r)}};export{s as MockZuploContext,g as createMockContext};
25
+ import{b as l}from"../chunk-4SACVMDH.js";import{a as o,da as n}from"../chunk-ZIKV2LUM.js";function g(u={request:new Request("https://api.example.com")}){let e=[];function t(i){e.push(Promise.resolve(i))}return o(t,"waitUntil"),{context:new s({event:{waitUntil:t},route:u.route}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(g,"createMockContext");var p={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},s=class extends EventTarget{static{o(this,"MockZuploContext")}#e;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=p,parentContext:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:n.console.info,log:n.console.log,debug:n.console.debug,warn:n.console.warn,error:n.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=r,this.#e=e,this.analyticsContext=new l(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,r){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,t,r){let d=o(i=>{try{typeof t=="function"?t(i):t.handleEvent(i)}catch(a){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),a}},"wrapped");super.addEventListener(e,d,r)}};export{s as MockZuploContext,g as createMockContext};
26
26
  //# sourceMappingURL=index.js.map
@@ -1012,6 +1012,59 @@ export declare interface McpAuth0OAuthInboundPolicyOptions {
1012
1012
  };
1013
1013
  }
1014
1014
 
1015
+ /**
1016
+ * Curate MCP capabilities advertised and reachable through `McpProxyHandler`.
1017
+ *
1018
+ * Validation runs lazily inside the policy constructor, which the runtime
1019
+ * caches per policy name. Misconfigured options therefore fail on first use
1020
+ * with a customer-facing `ConfigurationError` instead of failing at module
1021
+ * load.
1022
+ *
1023
+ * @hidden
1024
+ * @title MCP Capability Filter
1025
+ */
1026
+ export declare class McpCapabilityFilterInboundPolicy extends InboundPolicy<ValidatedOptions> {
1027
+ #private;
1028
+ constructor(rawOptions: unknown, policyName: string);
1029
+ handler(
1030
+ request: ZuploRequest,
1031
+ context: ZuploContext
1032
+ ): Promise<ZuploRequest | Response>;
1033
+ }
1034
+
1035
+ /**
1036
+ * The options for this policy.
1037
+ * @public
1038
+ */
1039
+ export declare interface McpCapabilityFilterInboundPolicyOptions {
1040
+ /**
1041
+ * Tool names to expose. Omit to pass through all upstream tools; use an empty array to expose no tools.
1042
+ */
1043
+ tools?: string[];
1044
+ /**
1045
+ * Prompt names to expose. Omit to pass through all upstream prompts; use an empty array to expose no prompts.
1046
+ */
1047
+ prompts?: string[];
1048
+ /**
1049
+ * Resource URIs to expose. Omit to pass through all upstream resources; use an empty array to expose no resources.
1050
+ */
1051
+ resources?: string[];
1052
+ /**
1053
+ * Resource template URI templates to expose. Omit to pass through all upstream resource templates; use an empty array to expose no resource templates.
1054
+ */
1055
+ resourceTemplates?: string[];
1056
+ }
1057
+
1058
+ declare const mcpCapabilityFilterOptionsSchema: z.ZodObject<
1059
+ {
1060
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1061
+ prompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1062
+ resources: z.ZodOptional<z.ZodArray<z.ZodString>>;
1063
+ resourceTemplates: z.ZodOptional<z.ZodArray<z.ZodString>>;
1064
+ },
1065
+ z.core.$strict
1066
+ >;
1067
+
1015
1068
  /**
1016
1069
  * Activates the MCP Gateway internal routes (OAuth authorization server,
1017
1070
  * upstream connection management, well-known metadata) on the runtime router.
@@ -2359,6 +2412,10 @@ declare interface UrlConfig {
2359
2412
 
2360
2413
  declare type UserDataDefault = any;
2361
2414
 
2415
+ declare type ValidatedOptions = z.infer<
2416
+ typeof mcpCapabilityFilterOptionsSchema
2417
+ >;
2418
+
2362
2419
  /**
2363
2420
  * @public
2364
2421
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.70.36",
4
+ "version": "6.70.39",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {