@zuplo/runtime 6.70.26 → 6.70.28

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 d}from"../chunk-NW4YQXGC.js";import{_ as n,a as t}from"../chunk-JAEQKE5H.js";function g(u={request:new Request("https://api.example.com")}){let e=[];function o(i){e.push(Promise.resolve(i))}return t(o,"waitUntil"),{context:new s({event:{waitUntil:o},route:u.route}),invokeResponse:t(async()=>{await Promise.all(e)},"invokeResponse")}}t(g,"createMockContext");var p={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:t(()=>({}),"raw")},s=class extends EventTarget{static{t(this,"MockZuploContext")}#e;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:o=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:t(()=>{},"setLogProperties")},this.custom={},this.route=o,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},this.parentContext=r,this.#e=e,this.analyticsContext=new d(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,o){throw new Error("Not implemented")}invokeOutboundPolicy(e,o,r){throw new Error("Not implemented")}invokeRoute(e,o){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,o,r){let l=t(i=>{try{typeof o=="function"?o(i):o.handleEvent(i)}catch(a){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),a}},"wrapped");super.addEventListener(e,l,r)}};export{s as MockZuploContext,g as createMockContext};
25
+ import{b as d}from"../chunk-F7DJMBWH.js";import{_ as n,a as t}from"../chunk-JAEQKE5H.js";function g(u={request:new Request("https://api.example.com")}){let e=[];function o(i){e.push(Promise.resolve(i))}return t(o,"waitUntil"),{context:new s({event:{waitUntil:o},route:u.route}),invokeResponse:t(async()=>{await Promise.all(e)},"invokeResponse")}}t(g,"createMockContext");var p={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:t(()=>({}),"raw")},s=class extends EventTarget{static{t(this,"MockZuploContext")}#e;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:o=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:t(()=>{},"setLogProperties")},this.custom={},this.route=o,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},this.parentContext=r,this.#e=e,this.analyticsContext=new d(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,o){throw new Error("Not implemented")}invokeOutboundPolicy(e,o,r){throw new Error("Not implemented")}invokeRoute(e,o){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,o,r){let l=t(i=>{try{typeof o=="function"?o(i):o.handleEvent(i)}catch(a){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),a}},"wrapped");super.addEventListener(e,l,r)}};export{s as MockZuploContext,g as createMockContext};
26
26
  //# sourceMappingURL=index.js.map
@@ -2957,54 +2957,38 @@ export declare interface ErrorHandler {
2957
2957
  declare type EventsInterval = number;
2958
2958
 
2959
2959
  declare const EventType: {
2960
- readonly MCP_TOOL_USAGE: "mcp_tool_usage";
2961
- readonly MCP_RESOURCE_READ: "mcp_resource_read";
2962
- readonly MCP_PROMPT_GET: "mcp_prompt_get";
2963
- readonly MCP_SESSION_START: "mcp_session_start";
2964
2960
  readonly AI_GATEWAY_COST_SUM: "ai_gateway_cost_sum";
2965
2961
  readonly AI_GATEWAY_REQUEST_COUNT: "ai_gateway_request_count";
2966
2962
  readonly AI_GATEWAY_TOKEN_SUM: "ai_gateway_token_sum";
2967
2963
  readonly AI_GATEWAY_LATENCY_HISTOGRAM: "ai_gateway_latency_histogram";
2968
2964
  readonly AI_GATEWAY_WARNING_COUNT: "ai_gateway_warning_count";
2969
2965
  readonly AI_GATEWAY_BLOCKED_COUNT: "ai_gateway_blocked_count";
2970
- readonly MCP_GATEWAY_REQUEST_RECEIVED: "mcp_gateway_request_received";
2971
- readonly MCP_GATEWAY_REQUEST_COMPLETED: "mcp_gateway_request_completed";
2972
- readonly MCP_GATEWAY_REQUEST_REJECTED: "mcp_gateway_request_rejected";
2973
- readonly MCP_GATEWAY_INITIALIZE_NEGOTIATED: "mcp_gateway_initialize_negotiated";
2974
- readonly MCP_GATEWAY_CLIENT_UNSUPPORTED_BEHAVIOR: "mcp_gateway_client_unsupported_behavior";
2975
- readonly MCP_GATEWAY_CATALOG_LISTED: "mcp_gateway_catalog_listed";
2976
- readonly MCP_GATEWAY_CATALOG_IMPORTED: "mcp_gateway_catalog_imported";
2977
- readonly MCP_GATEWAY_CATALOG_DRIFT_DETECTED: "mcp_gateway_catalog_drift_detected";
2978
- readonly MCP_GATEWAY_CAPABILITY_LISTED: "mcp_gateway_capability_listed";
2979
- readonly MCP_GATEWAY_CAPABILITY_INVOKED: "mcp_gateway_capability_invoked";
2980
- readonly MCP_GATEWAY_CAPABILITY_COMPLETED: "mcp_gateway_capability_completed";
2981
- readonly MCP_GATEWAY_CAPABILITY_FAILED: "mcp_gateway_capability_failed";
2982
- readonly MCP_GATEWAY_CAPABILITY_CONNECT_REQUIRED: "mcp_gateway_capability_connect_required";
2983
- readonly MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_VALIDATED: "mcp_gateway_auth_downstream_token_validated";
2984
- readonly MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_REJECTED: "mcp_gateway_auth_downstream_token_rejected";
2985
- readonly MCP_GATEWAY_OAUTH_CLIENT_REGISTERED: "mcp_gateway_oauth_client_registered";
2986
- readonly MCP_GATEWAY_OAUTH_AUTHORIZE_STARTED: "mcp_gateway_oauth_authorize_started";
2987
- readonly MCP_GATEWAY_OAUTH_AUTHORIZE_AWAITING_SETUP: "mcp_gateway_oauth_authorize_awaiting_setup";
2988
- readonly MCP_GATEWAY_OAUTH_TOKEN_ISSUED: "mcp_gateway_oauth_token_issued";
2989
- readonly MCP_GATEWAY_OAUTH_TOKEN_REFRESH_ROTATED: "mcp_gateway_oauth_token_refresh_rotated";
2990
- readonly MCP_GATEWAY_OAUTH_TOKEN_REVOKED: "mcp_gateway_oauth_token_revoked";
2991
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_REQUIRED: "mcp_gateway_auth_upstream_connect_required";
2992
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_STARTED: "mcp_gateway_auth_upstream_connect_started";
2993
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CALLBACK_RECEIVED: "mcp_gateway_auth_upstream_callback_received";
2994
- readonly MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED: "mcp_gateway_auth_upstream_token_exchange_succeeded";
2995
- readonly MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED: "mcp_gateway_auth_upstream_token_exchange_failed";
2996
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_RESOLVED: "mcp_gateway_auth_upstream_credential_resolved";
2997
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_gateway_auth_upstream_credential_missing";
2998
- readonly MCP_GATEWAY_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_gateway_auth_upstream_reconsent_required";
2999
- readonly MCP_GATEWAY_POLICY_DECISION: "mcp_gateway_policy_decision";
3000
- readonly MCP_GATEWAY_GUARDRAIL_DECISION: "mcp_gateway_guardrail_decision";
3001
- readonly MCP_GATEWAY_RATE_LIMIT_DECISION: "mcp_gateway_rate_limit_decision";
3002
- readonly MCP_GATEWAY_UPSTREAM_REQUEST_SENT: "mcp_gateway_upstream_request_sent";
3003
- readonly MCP_GATEWAY_UPSTREAM_REQUEST_COMPLETED: "mcp_gateway_upstream_request_completed";
3004
- readonly MCP_GATEWAY_UPSTREAM_REQUEST_FAILED: "mcp_gateway_upstream_request_failed";
3005
- readonly MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_CREATED: "mcp_gateway_audit_virtual_server_created";
3006
- readonly MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_UPDATED: "mcp_gateway_audit_virtual_server_updated";
3007
- readonly MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_DELETED: "mcp_gateway_audit_virtual_server_deleted";
2966
+ readonly MCP_REQUEST_RECEIVED: "mcp_request_received";
2967
+ readonly MCP_REQUEST_COMPLETED: "mcp_request_completed";
2968
+ readonly MCP_REQUEST_REJECTED: "mcp_request_rejected";
2969
+ readonly MCP_INITIALIZE_NEGOTIATED: "mcp_initialize_negotiated";
2970
+ readonly MCP_CLIENT_UNSUPPORTED_BEHAVIOR: "mcp_client_unsupported_behavior";
2971
+ readonly MCP_CAPABILITY_LISTED: "mcp_capability_listed";
2972
+ readonly MCP_CAPABILITY_INVOKED: "mcp_capability_invoked";
2973
+ readonly MCP_CAPABILITY_COMPLETED: "mcp_capability_completed";
2974
+ readonly MCP_CAPABILITY_FAILED: "mcp_capability_failed";
2975
+ readonly MCP_CAPABILITY_CONNECT_REQUIRED: "mcp_capability_connect_required";
2976
+ readonly MCP_AUTH_DOWNSTREAM_TOKEN_VALIDATED: "mcp_auth_downstream_token_validated";
2977
+ readonly MCP_AUTH_DOWNSTREAM_TOKEN_REJECTED: "mcp_auth_downstream_token_rejected";
2978
+ readonly MCP_OAUTH_CLIENT_REGISTERED: "mcp_oauth_client_registered";
2979
+ readonly MCP_OAUTH_AUTHORIZE_STARTED: "mcp_oauth_authorize_started";
2980
+ readonly MCP_OAUTH_AUTHORIZE_AWAITING_SETUP: "mcp_oauth_authorize_awaiting_setup";
2981
+ readonly MCP_OAUTH_TOKEN_ISSUED: "mcp_oauth_token_issued";
2982
+ readonly MCP_OAUTH_TOKEN_REFRESH_ROTATED: "mcp_oauth_token_refresh_rotated";
2983
+ readonly MCP_OAUTH_TOKEN_REVOKED: "mcp_oauth_token_revoked";
2984
+ readonly MCP_AUTH_UPSTREAM_CONNECT_REQUIRED: "mcp_auth_upstream_connect_required";
2985
+ readonly MCP_AUTH_UPSTREAM_CONNECT_STARTED: "mcp_auth_upstream_connect_started";
2986
+ readonly MCP_AUTH_UPSTREAM_CALLBACK_RECEIVED: "mcp_auth_upstream_callback_received";
2987
+ readonly MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED: "mcp_auth_upstream_token_exchange_succeeded";
2988
+ readonly MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED: "mcp_auth_upstream_token_exchange_failed";
2989
+ readonly MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED: "mcp_auth_upstream_credential_resolved";
2990
+ readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
2991
+ readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
3008
2992
  };
3009
2993
 
3010
2994
  declare type EventType = (typeof EventType)[keyof typeof EventType];
@@ -8973,6 +8957,42 @@ export declare interface SetStatusOutboundPolicyOptions {
8973
8957
  statusText?: string;
8974
8958
  }
8975
8959
 
8960
+ /**
8961
+ * Sets a single header on the incoming request, typically used to attach an
8962
+ * API key for the upstream service. A more directed version of the
8963
+ * `SetHeadersInboundPolicy` that defaults the header name to `Authorization`
8964
+ * and is intended to be used with an `$env()` reference for the value.
8965
+ *
8966
+ * @title Set Upstream API Key
8967
+ * @product api-gateway
8968
+ * @public
8969
+ * @param request - The ZuploRequest
8970
+ * @param context - The ZuploContext
8971
+ * @param options - The policy options set in policies.json
8972
+ * @param policyName - The name of the policy as set in policies.json
8973
+ * @returns A Request or a Response
8974
+ */
8975
+ export declare const SetUpstreamApiKeyInboundPolicy: InboundPolicyHandler<SetUpstreamApiKeyInboundPolicyOptions>;
8976
+
8977
+ /**
8978
+ * The options for this policy.
8979
+ * @public
8980
+ */
8981
+ export declare interface SetUpstreamApiKeyInboundPolicyOptions {
8982
+ /**
8983
+ * The name of the header to set on the request. Defaults to `Authorization`.
8984
+ */
8985
+ header?: string;
8986
+ /**
8987
+ * The value of the header. Most commonly an environment variable reference such as `Bearer $env(UPSTREAM_API_KEY)` so the secret is sourced from your environment.
8988
+ */
8989
+ value: string;
8990
+ /**
8991
+ * Overwrite the value if the header is already present in the request.
8992
+ */
8993
+ overwrite?: boolean;
8994
+ }
8995
+
8976
8996
  /**
8977
8997
  * Function type for determining if a request should be logged
8978
8998
  * @public
@@ -87,54 +87,38 @@ declare interface CorsPolicyConfiguration {
87
87
  declare type DevPortalType = "legacy" | "zudoku";
88
88
 
89
89
  declare const EventType: {
90
- readonly MCP_TOOL_USAGE: "mcp_tool_usage";
91
- readonly MCP_RESOURCE_READ: "mcp_resource_read";
92
- readonly MCP_PROMPT_GET: "mcp_prompt_get";
93
- readonly MCP_SESSION_START: "mcp_session_start";
94
90
  readonly AI_GATEWAY_COST_SUM: "ai_gateway_cost_sum";
95
91
  readonly AI_GATEWAY_REQUEST_COUNT: "ai_gateway_request_count";
96
92
  readonly AI_GATEWAY_TOKEN_SUM: "ai_gateway_token_sum";
97
93
  readonly AI_GATEWAY_LATENCY_HISTOGRAM: "ai_gateway_latency_histogram";
98
94
  readonly AI_GATEWAY_WARNING_COUNT: "ai_gateway_warning_count";
99
95
  readonly AI_GATEWAY_BLOCKED_COUNT: "ai_gateway_blocked_count";
100
- readonly MCP_GATEWAY_REQUEST_RECEIVED: "mcp_gateway_request_received";
101
- readonly MCP_GATEWAY_REQUEST_COMPLETED: "mcp_gateway_request_completed";
102
- readonly MCP_GATEWAY_REQUEST_REJECTED: "mcp_gateway_request_rejected";
103
- readonly MCP_GATEWAY_INITIALIZE_NEGOTIATED: "mcp_gateway_initialize_negotiated";
104
- readonly MCP_GATEWAY_CLIENT_UNSUPPORTED_BEHAVIOR: "mcp_gateway_client_unsupported_behavior";
105
- readonly MCP_GATEWAY_CATALOG_LISTED: "mcp_gateway_catalog_listed";
106
- readonly MCP_GATEWAY_CATALOG_IMPORTED: "mcp_gateway_catalog_imported";
107
- readonly MCP_GATEWAY_CATALOG_DRIFT_DETECTED: "mcp_gateway_catalog_drift_detected";
108
- readonly MCP_GATEWAY_CAPABILITY_LISTED: "mcp_gateway_capability_listed";
109
- readonly MCP_GATEWAY_CAPABILITY_INVOKED: "mcp_gateway_capability_invoked";
110
- readonly MCP_GATEWAY_CAPABILITY_COMPLETED: "mcp_gateway_capability_completed";
111
- readonly MCP_GATEWAY_CAPABILITY_FAILED: "mcp_gateway_capability_failed";
112
- readonly MCP_GATEWAY_CAPABILITY_CONNECT_REQUIRED: "mcp_gateway_capability_connect_required";
113
- readonly MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_VALIDATED: "mcp_gateway_auth_downstream_token_validated";
114
- readonly MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_REJECTED: "mcp_gateway_auth_downstream_token_rejected";
115
- readonly MCP_GATEWAY_OAUTH_CLIENT_REGISTERED: "mcp_gateway_oauth_client_registered";
116
- readonly MCP_GATEWAY_OAUTH_AUTHORIZE_STARTED: "mcp_gateway_oauth_authorize_started";
117
- readonly MCP_GATEWAY_OAUTH_AUTHORIZE_AWAITING_SETUP: "mcp_gateway_oauth_authorize_awaiting_setup";
118
- readonly MCP_GATEWAY_OAUTH_TOKEN_ISSUED: "mcp_gateway_oauth_token_issued";
119
- readonly MCP_GATEWAY_OAUTH_TOKEN_REFRESH_ROTATED: "mcp_gateway_oauth_token_refresh_rotated";
120
- readonly MCP_GATEWAY_OAUTH_TOKEN_REVOKED: "mcp_gateway_oauth_token_revoked";
121
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_REQUIRED: "mcp_gateway_auth_upstream_connect_required";
122
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_STARTED: "mcp_gateway_auth_upstream_connect_started";
123
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CALLBACK_RECEIVED: "mcp_gateway_auth_upstream_callback_received";
124
- readonly MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED: "mcp_gateway_auth_upstream_token_exchange_succeeded";
125
- readonly MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED: "mcp_gateway_auth_upstream_token_exchange_failed";
126
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_RESOLVED: "mcp_gateway_auth_upstream_credential_resolved";
127
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_gateway_auth_upstream_credential_missing";
128
- readonly MCP_GATEWAY_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_gateway_auth_upstream_reconsent_required";
129
- readonly MCP_GATEWAY_POLICY_DECISION: "mcp_gateway_policy_decision";
130
- readonly MCP_GATEWAY_GUARDRAIL_DECISION: "mcp_gateway_guardrail_decision";
131
- readonly MCP_GATEWAY_RATE_LIMIT_DECISION: "mcp_gateway_rate_limit_decision";
132
- readonly MCP_GATEWAY_UPSTREAM_REQUEST_SENT: "mcp_gateway_upstream_request_sent";
133
- readonly MCP_GATEWAY_UPSTREAM_REQUEST_COMPLETED: "mcp_gateway_upstream_request_completed";
134
- readonly MCP_GATEWAY_UPSTREAM_REQUEST_FAILED: "mcp_gateway_upstream_request_failed";
135
- readonly MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_CREATED: "mcp_gateway_audit_virtual_server_created";
136
- readonly MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_UPDATED: "mcp_gateway_audit_virtual_server_updated";
137
- readonly MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_DELETED: "mcp_gateway_audit_virtual_server_deleted";
96
+ readonly MCP_REQUEST_RECEIVED: "mcp_request_received";
97
+ readonly MCP_REQUEST_COMPLETED: "mcp_request_completed";
98
+ readonly MCP_REQUEST_REJECTED: "mcp_request_rejected";
99
+ readonly MCP_INITIALIZE_NEGOTIATED: "mcp_initialize_negotiated";
100
+ readonly MCP_CLIENT_UNSUPPORTED_BEHAVIOR: "mcp_client_unsupported_behavior";
101
+ readonly MCP_CAPABILITY_LISTED: "mcp_capability_listed";
102
+ readonly MCP_CAPABILITY_INVOKED: "mcp_capability_invoked";
103
+ readonly MCP_CAPABILITY_COMPLETED: "mcp_capability_completed";
104
+ readonly MCP_CAPABILITY_FAILED: "mcp_capability_failed";
105
+ readonly MCP_CAPABILITY_CONNECT_REQUIRED: "mcp_capability_connect_required";
106
+ readonly MCP_AUTH_DOWNSTREAM_TOKEN_VALIDATED: "mcp_auth_downstream_token_validated";
107
+ readonly MCP_AUTH_DOWNSTREAM_TOKEN_REJECTED: "mcp_auth_downstream_token_rejected";
108
+ readonly MCP_OAUTH_CLIENT_REGISTERED: "mcp_oauth_client_registered";
109
+ readonly MCP_OAUTH_AUTHORIZE_STARTED: "mcp_oauth_authorize_started";
110
+ readonly MCP_OAUTH_AUTHORIZE_AWAITING_SETUP: "mcp_oauth_authorize_awaiting_setup";
111
+ readonly MCP_OAUTH_TOKEN_ISSUED: "mcp_oauth_token_issued";
112
+ readonly MCP_OAUTH_TOKEN_REFRESH_ROTATED: "mcp_oauth_token_refresh_rotated";
113
+ readonly MCP_OAUTH_TOKEN_REVOKED: "mcp_oauth_token_revoked";
114
+ readonly MCP_AUTH_UPSTREAM_CONNECT_REQUIRED: "mcp_auth_upstream_connect_required";
115
+ readonly MCP_AUTH_UPSTREAM_CONNECT_STARTED: "mcp_auth_upstream_connect_started";
116
+ readonly MCP_AUTH_UPSTREAM_CALLBACK_RECEIVED: "mcp_auth_upstream_callback_received";
117
+ readonly MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED: "mcp_auth_upstream_token_exchange_succeeded";
118
+ readonly MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED: "mcp_auth_upstream_token_exchange_failed";
119
+ readonly MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED: "mcp_auth_upstream_credential_resolved";
120
+ readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
121
+ readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
138
122
  };
139
123
 
140
124
  declare type EventType = (typeof EventType)[keyof typeof EventType];
@@ -989,7 +973,7 @@ export declare interface McpAuth0OAuthInboundPolicyOptions {
989
973
  /**
990
974
  * The Auth0 client_secret. Use $env(...) to source from a secret environment variable.
991
975
  */
992
- clientSecret?: string;
976
+ clientSecret: string;
993
977
  /**
994
978
  * OIDC scopes requested during browser login.
995
979
  */
@@ -1092,9 +1076,9 @@ export declare interface McpOAuthInboundPolicyOptions {
1092
1076
  */
1093
1077
  jwksUrl: string;
1094
1078
  /**
1095
- * Expected audience claim on tokens issued for the gateway.
1079
+ * Optional IdP audience value. Leave unset when browser login ID tokens use the OIDC client_id as their audience.
1096
1080
  */
1097
- audience: string;
1081
+ audience?: string;
1098
1082
  };
1099
1083
  /**
1100
1084
  * Browser-side OAuth/OIDC settings used when the gateway redirects the user to the identity provider for login.
@@ -1113,7 +1097,7 @@ export declare interface McpOAuthInboundPolicyOptions {
1113
1097
  */
1114
1098
  clientId?: string;
1115
1099
  /**
1116
- * The OIDC client_secret. Use $env(...) to source from a secret environment variable.
1100
+ * The OIDC client_secret. Required for federated browser login. Use $env(...) to source from a secret environment variable.
1117
1101
  */
1118
1102
  clientSecret?: string;
1119
1103
  /**
@@ -1213,12 +1197,12 @@ export declare interface McpUpstreamConnectionInboundPolicyOptions {
1213
1197
  required?: boolean;
1214
1198
  }[];
1215
1199
  /**
1216
- * Authentication mode. `user_oauth` performs per-user OAuth federation; `shared-oauth` uses a gateway-wide OAuth grant; `static_secret` / `user-secret` / `shared-secret` use a configured secret instead of OAuth.
1200
+ * Authentication mode. `user-oauth` performs per-user OAuth federation; `shared-oauth` uses a gateway-wide OAuth grant; `static-secret` / `user-secret` / `shared-secret` use a configured secret instead of OAuth.
1217
1201
  */
1218
1202
  authMode:
1219
- | "user_oauth"
1203
+ | "user-oauth"
1220
1204
  | "shared-oauth"
1221
- | "static_secret"
1205
+ | "static-secret"
1222
1206
  | "user-secret"
1223
1207
  | "shared-secret";
1224
1208
  /**
@@ -1264,7 +1248,7 @@ export declare interface McpUpstreamConnectionInboundPolicyOptions {
1264
1248
  | "none";
1265
1249
  };
1266
1250
  /**
1267
- * Static secret configuration (for `static_secret`, `user-secret`, and `shared-secret` auth modes).
1251
+ * Static secret configuration (for `static-secret`, `user-secret`, and `shared-secret` auth modes).
1268
1252
  */
1269
1253
  secret?: {
1270
1254
  [k: string]: unknown;
@@ -78,54 +78,38 @@ export declare function createMockContext(options?: {
78
78
  };
79
79
 
80
80
  declare const EventType: {
81
- readonly MCP_TOOL_USAGE: "mcp_tool_usage";
82
- readonly MCP_RESOURCE_READ: "mcp_resource_read";
83
- readonly MCP_PROMPT_GET: "mcp_prompt_get";
84
- readonly MCP_SESSION_START: "mcp_session_start";
85
81
  readonly AI_GATEWAY_COST_SUM: "ai_gateway_cost_sum";
86
82
  readonly AI_GATEWAY_REQUEST_COUNT: "ai_gateway_request_count";
87
83
  readonly AI_GATEWAY_TOKEN_SUM: "ai_gateway_token_sum";
88
84
  readonly AI_GATEWAY_LATENCY_HISTOGRAM: "ai_gateway_latency_histogram";
89
85
  readonly AI_GATEWAY_WARNING_COUNT: "ai_gateway_warning_count";
90
86
  readonly AI_GATEWAY_BLOCKED_COUNT: "ai_gateway_blocked_count";
91
- readonly MCP_GATEWAY_REQUEST_RECEIVED: "mcp_gateway_request_received";
92
- readonly MCP_GATEWAY_REQUEST_COMPLETED: "mcp_gateway_request_completed";
93
- readonly MCP_GATEWAY_REQUEST_REJECTED: "mcp_gateway_request_rejected";
94
- readonly MCP_GATEWAY_INITIALIZE_NEGOTIATED: "mcp_gateway_initialize_negotiated";
95
- readonly MCP_GATEWAY_CLIENT_UNSUPPORTED_BEHAVIOR: "mcp_gateway_client_unsupported_behavior";
96
- readonly MCP_GATEWAY_CATALOG_LISTED: "mcp_gateway_catalog_listed";
97
- readonly MCP_GATEWAY_CATALOG_IMPORTED: "mcp_gateway_catalog_imported";
98
- readonly MCP_GATEWAY_CATALOG_DRIFT_DETECTED: "mcp_gateway_catalog_drift_detected";
99
- readonly MCP_GATEWAY_CAPABILITY_LISTED: "mcp_gateway_capability_listed";
100
- readonly MCP_GATEWAY_CAPABILITY_INVOKED: "mcp_gateway_capability_invoked";
101
- readonly MCP_GATEWAY_CAPABILITY_COMPLETED: "mcp_gateway_capability_completed";
102
- readonly MCP_GATEWAY_CAPABILITY_FAILED: "mcp_gateway_capability_failed";
103
- readonly MCP_GATEWAY_CAPABILITY_CONNECT_REQUIRED: "mcp_gateway_capability_connect_required";
104
- readonly MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_VALIDATED: "mcp_gateway_auth_downstream_token_validated";
105
- readonly MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_REJECTED: "mcp_gateway_auth_downstream_token_rejected";
106
- readonly MCP_GATEWAY_OAUTH_CLIENT_REGISTERED: "mcp_gateway_oauth_client_registered";
107
- readonly MCP_GATEWAY_OAUTH_AUTHORIZE_STARTED: "mcp_gateway_oauth_authorize_started";
108
- readonly MCP_GATEWAY_OAUTH_AUTHORIZE_AWAITING_SETUP: "mcp_gateway_oauth_authorize_awaiting_setup";
109
- readonly MCP_GATEWAY_OAUTH_TOKEN_ISSUED: "mcp_gateway_oauth_token_issued";
110
- readonly MCP_GATEWAY_OAUTH_TOKEN_REFRESH_ROTATED: "mcp_gateway_oauth_token_refresh_rotated";
111
- readonly MCP_GATEWAY_OAUTH_TOKEN_REVOKED: "mcp_gateway_oauth_token_revoked";
112
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_REQUIRED: "mcp_gateway_auth_upstream_connect_required";
113
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_STARTED: "mcp_gateway_auth_upstream_connect_started";
114
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CALLBACK_RECEIVED: "mcp_gateway_auth_upstream_callback_received";
115
- readonly MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED: "mcp_gateway_auth_upstream_token_exchange_succeeded";
116
- readonly MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED: "mcp_gateway_auth_upstream_token_exchange_failed";
117
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_RESOLVED: "mcp_gateway_auth_upstream_credential_resolved";
118
- readonly MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_gateway_auth_upstream_credential_missing";
119
- readonly MCP_GATEWAY_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_gateway_auth_upstream_reconsent_required";
120
- readonly MCP_GATEWAY_POLICY_DECISION: "mcp_gateway_policy_decision";
121
- readonly MCP_GATEWAY_GUARDRAIL_DECISION: "mcp_gateway_guardrail_decision";
122
- readonly MCP_GATEWAY_RATE_LIMIT_DECISION: "mcp_gateway_rate_limit_decision";
123
- readonly MCP_GATEWAY_UPSTREAM_REQUEST_SENT: "mcp_gateway_upstream_request_sent";
124
- readonly MCP_GATEWAY_UPSTREAM_REQUEST_COMPLETED: "mcp_gateway_upstream_request_completed";
125
- readonly MCP_GATEWAY_UPSTREAM_REQUEST_FAILED: "mcp_gateway_upstream_request_failed";
126
- readonly MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_CREATED: "mcp_gateway_audit_virtual_server_created";
127
- readonly MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_UPDATED: "mcp_gateway_audit_virtual_server_updated";
128
- readonly MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_DELETED: "mcp_gateway_audit_virtual_server_deleted";
87
+ readonly MCP_REQUEST_RECEIVED: "mcp_request_received";
88
+ readonly MCP_REQUEST_COMPLETED: "mcp_request_completed";
89
+ readonly MCP_REQUEST_REJECTED: "mcp_request_rejected";
90
+ readonly MCP_INITIALIZE_NEGOTIATED: "mcp_initialize_negotiated";
91
+ readonly MCP_CLIENT_UNSUPPORTED_BEHAVIOR: "mcp_client_unsupported_behavior";
92
+ readonly MCP_CAPABILITY_LISTED: "mcp_capability_listed";
93
+ readonly MCP_CAPABILITY_INVOKED: "mcp_capability_invoked";
94
+ readonly MCP_CAPABILITY_COMPLETED: "mcp_capability_completed";
95
+ readonly MCP_CAPABILITY_FAILED: "mcp_capability_failed";
96
+ readonly MCP_CAPABILITY_CONNECT_REQUIRED: "mcp_capability_connect_required";
97
+ readonly MCP_AUTH_DOWNSTREAM_TOKEN_VALIDATED: "mcp_auth_downstream_token_validated";
98
+ readonly MCP_AUTH_DOWNSTREAM_TOKEN_REJECTED: "mcp_auth_downstream_token_rejected";
99
+ readonly MCP_OAUTH_CLIENT_REGISTERED: "mcp_oauth_client_registered";
100
+ readonly MCP_OAUTH_AUTHORIZE_STARTED: "mcp_oauth_authorize_started";
101
+ readonly MCP_OAUTH_AUTHORIZE_AWAITING_SETUP: "mcp_oauth_authorize_awaiting_setup";
102
+ readonly MCP_OAUTH_TOKEN_ISSUED: "mcp_oauth_token_issued";
103
+ readonly MCP_OAUTH_TOKEN_REFRESH_ROTATED: "mcp_oauth_token_refresh_rotated";
104
+ readonly MCP_OAUTH_TOKEN_REVOKED: "mcp_oauth_token_revoked";
105
+ readonly MCP_AUTH_UPSTREAM_CONNECT_REQUIRED: "mcp_auth_upstream_connect_required";
106
+ readonly MCP_AUTH_UPSTREAM_CONNECT_STARTED: "mcp_auth_upstream_connect_started";
107
+ readonly MCP_AUTH_UPSTREAM_CALLBACK_RECEIVED: "mcp_auth_upstream_callback_received";
108
+ readonly MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED: "mcp_auth_upstream_token_exchange_succeeded";
109
+ readonly MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED: "mcp_auth_upstream_token_exchange_failed";
110
+ readonly MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED: "mcp_auth_upstream_credential_resolved";
111
+ readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
112
+ readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
129
113
  };
130
114
 
131
115
  declare type EventType = (typeof EventType)[keyof typeof EventType];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.70.26",
4
+ "version": "6.70.28",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {