@zuplo/cli 6.70.0 → 6.70.2

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-5ZAQEULH.js";import{X as n,a as t}from"../chunk-FFHHHNST.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 a={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=a,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},this.parentContext=r,this.#e=e,this.analyticsContext=new l(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 p=t(i=>{try{typeof o=="function"?o(i):o.handleEvent(i)}catch(d){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),d}},"wrapped");super.addEventListener(e,p,r)}};export{s as MockZuploContext,g as createMockContext};
25
+ import{b as l}from"../chunk-ZJ5LRHNO.js";import{X as n,a as t}from"../chunk-FFHHHNST.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 a={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=a,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},this.parentContext=r,this.#e=e,this.analyticsContext=new l(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 p=t(i=>{try{typeof o=="function"?o(i):o.handleEvent(i)}catch(d){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),d}},"wrapped");super.addEventListener(e,p,r)}};export{s as MockZuploContext,g as createMockContext};
26
26
  //# sourceMappingURL=index.js.map
@@ -273,7 +273,7 @@ export declare interface AIGatewaySemanticCacheInboundPolicyOptions {}
273
273
  * This policy intercepts responses and handles caching for both
274
274
  * streaming and non-streaming responses.
275
275
  *
276
- * @title AI Gateway Semantic Cache Outbound
276
+ * @title AI Gateway Semantic Cache
277
277
  * @product ai-gateway
278
278
  * @hidden
279
279
  * @param response - The response from the upstream service
@@ -484,7 +484,7 @@ export declare interface AkamaiApiSecurityPluginOptions {
484
484
  * by default only the request body is captured. Bodies are read from a clone
485
485
  * so the upstream handler still sees the original.
486
486
  *
487
- * @title Akamai Firewall for AI - Inbound
487
+ * @title Akamai Firewall for AI
488
488
  * @public
489
489
  * @param request - The ZuploRequest
490
490
  * @param context - The ZuploContext
@@ -532,7 +532,7 @@ export declare interface AkamaiFirewallForAiInboundPolicyOptions {
532
532
  * by default only the response body is captured. Bodies are read from a clone
533
533
  * so the client still receives the original.
534
534
  *
535
- * @title Akamai Firewall for AI - Outbound
535
+ * @title Akamai Firewall for AI
536
536
  * @public
537
537
  * @param response - The outgoing Response from the handler
538
538
  * @param request - The original incoming Request
@@ -2148,8 +2148,6 @@ export declare interface ClerkJwtInboundPolicyOptions {
2148
2148
  oAuthResourceMetadataEnabled?: boolean;
2149
2149
  }
2150
2150
 
2151
- /* Excluded from this release type: ClientConfig */
2152
-
2153
2151
  /**
2154
2152
  * Authentication options for OIDC authentication.
2155
2153
  * @public
@@ -2861,16 +2859,12 @@ export declare class DataDogMetricsPlugin extends MetricsPlugin {
2861
2859
  static setContext(context: ZuploContext, data: DataDogMetricsContext): void;
2862
2860
  }
2863
2861
 
2864
- /* Excluded from this release type: DcrClientRegistration */
2865
-
2866
2862
  /**
2867
2863
  * Default function to generate Hydrolix log entries
2868
2864
  * @public
2869
2865
  */
2870
2866
  export declare const defaultGenerateHydrolixEntry: GenerateRequestLoggerEntry<HydrolixDefaultEntry>;
2871
2867
 
2872
- /* Excluded from this release type: deleteUpstreamToken */
2873
-
2874
2868
  /* Excluded from this release type: DevPortalRuntimeConfig */
2875
2869
 
2876
2870
  declare type DevPortalType = "legacy" | "zudoku";
@@ -2963,6 +2957,9 @@ declare type EventsInterval = number;
2963
2957
 
2964
2958
  declare const EventType: {
2965
2959
  readonly MCP_TOOL_USAGE: "mcp_tool_usage";
2960
+ readonly MCP_RESOURCE_READ: "mcp_resource_read";
2961
+ readonly MCP_PROMPT_GET: "mcp_prompt_get";
2962
+ readonly MCP_SESSION_START: "mcp_session_start";
2966
2963
  readonly AI_GATEWAY_COST_SUM: "ai_gateway_cost_sum";
2967
2964
  readonly AI_GATEWAY_REQUEST_COUNT: "ai_gateway_request_count";
2968
2965
  readonly AI_GATEWAY_TOKEN_SUM: "ai_gateway_token_sum";
@@ -3183,8 +3180,6 @@ declare interface GeoSpec {
3183
3180
  asns?: string;
3184
3181
  }
3185
3182
 
3186
- /* Excluded from this release type: getDcrClient */
3187
-
3188
3183
  /* Excluded from this release type: getIdForParameterSchema */
3189
3184
 
3190
3185
  /* Excluded from this release type: getIdForRefSchema */
@@ -3219,10 +3214,6 @@ declare interface GetQuotaResult {
3219
3214
 
3220
3215
  /* Excluded from this release type: getRawOperationDataIdentifierName */
3221
3216
 
3222
- /* Excluded from this release type: getUpstreamMetadata */
3223
-
3224
- /* Excluded from this release type: getUpstreamToken */
3225
-
3226
3217
  declare interface GoogleCloudLoggingOptions {
3227
3218
  serviceAccountJson: string;
3228
3219
  logName: string;
@@ -4887,8 +4878,6 @@ export declare interface HydrolixRequestLoggerPluginOptions<T> {
4887
4878
  batchPeriodSeconds?: number;
4888
4879
  }
4889
4880
 
4890
- /* Excluded from this release type: IdpConfig */
4891
-
4892
4881
  /**
4893
4882
  * A policy that can modify the incoming HTTP request before it is sent to
4894
4883
  * the handler. If a response is returned, the request is short-circuited and
@@ -5659,201 +5648,8 @@ declare type LokiTransportVersion = 1 | 2;
5659
5648
 
5660
5649
  /* Excluded from this release type: LookupResult */
5661
5650
 
5662
- /**
5663
- * Configuration structure for the MCP Gateway
5664
- */
5665
- export declare interface McpGatewayConfig {
5666
- /**
5667
- * The ID of the configuration in the gateway service
5668
- */
5669
- configurationId: string;
5670
- /**
5671
- * Array of MCP server configurations
5672
- */
5673
- servers: McpGatewayServerConfig[];
5674
- }
5675
-
5676
- /**
5677
- * The Zuplo MCP gateway handler: used to build and bind origin MCP servers
5678
- * to "virtual" MCP servers.
5679
- * Only POST requests are supported for the HTTP streamable MCP transport.
5680
- *
5681
- * @beta
5682
- * @param request - The ZuploRequest
5683
- * @param context - The ZuploContext
5684
- * @returns ZuploResponse
5685
- */
5686
- export declare function mcpGatewayHandler(
5687
- request: ZuploRequest,
5688
- context: ZuploContext
5689
- ): Promise<Response>;
5690
-
5691
5651
  /* Excluded from this release type: McpGatewayOAuthProtectedResourcePlugin */
5692
5652
 
5693
- declare interface McpGatewayOrigin {
5694
- /**
5695
- * display name for the origin MCP server
5696
- */
5697
- name: string;
5698
- /**
5699
- * display description for the origin MCP server
5700
- */
5701
- description: string;
5702
- /**
5703
- * The actual endpoint of the origin MCP server
5704
- */
5705
- baseUrl: string;
5706
- /**
5707
- * Custom headers to send to the origin MCP server
5708
- */
5709
- headers?: Record<string, string>;
5710
- /**
5711
- * The list of allowed tools on the server
5712
- */
5713
- tools: McpGatewayTool[];
5714
- /**
5715
- * Optional prefix to add to all tool names from this server to avoid conflicts
5716
- * @example "weather_" would make "get_forecast" become "weather_get_forecast"
5717
- */
5718
- toolNamePrefix?: string;
5719
- /**
5720
- * Whether to include this server's capabilities in the combined server.
5721
- * Defaults to true.
5722
- */
5723
- enabled?: boolean;
5724
- }
5725
-
5726
- /**
5727
- * Configuration for an individual MCP server in the gateway
5728
- */
5729
- declare interface McpGatewayServerConfig {
5730
- /**
5731
- * Unique name and identifier for the MCP server
5732
- */
5733
- name: string;
5734
- /**
5735
- * Description of what this MCP server provides
5736
- */
5737
- description: string;
5738
- /**
5739
- * The endpoint slug path where this MCP server will be accessible
5740
- * @example "/todo-mcp"
5741
- */
5742
- slug: string;
5743
- /**
5744
- * Array of origin configurations for this server
5745
- */
5746
- origins: McpGatewayOrigin[];
5747
- /**
5748
- * OAuth resource name for this MCP server.
5749
- * When set, the gateway will look up upstream tokens using userId:resource
5750
- * and inject them into requests to the origin.
5751
- * This should match a resource key configured in the MCP OAuth Gateway plugin.
5752
- * @example "jira"
5753
- *
5754
- * // TODO: Make sure these are unique per origin
5755
- */
5756
- oauthResource?: string;
5757
- }
5758
-
5759
- declare interface McpGatewayTool {
5760
- name: string;
5761
- description: string;
5762
- inputSchema: object;
5763
- }
5764
-
5765
- /**
5766
- * MCP OAuth Gateway Plugin
5767
- *
5768
- * This plugin implements an OAuth 2.0 Authorization Server that acts as a gateway
5769
- * between MCP clients and upstream OAuth providers. It enables a two-phase OAuth
5770
- * flow:
5771
- *
5772
- * 1. **Gateway IDP Authentication**: The client first authenticates with the gateway's
5773
- * identity provider to establish user identity.
5774
- *
5775
- * 2. **Upstream Provider Authorization**: After IDP authentication, if the user hasn't
5776
- * previously authorized the upstream resource (e.g., Jira, GitHub), they are
5777
- * redirected to complete upstream OAuth authorization.
5778
- *
5779
- * The gateway maintains tokens for upstream providers and can skip the upstream
5780
- * authorization step on subsequent requests if valid tokens exist.
5781
- *
5782
- * ## Registered Routes
5783
- *
5784
- * - `GET /.well-known/oauth-authorization-server` - OAuth Authorization Server Metadata (RFC 8414)
5785
- * - `GET /oauth/:resource/authorize` - Authorization endpoint (entry point)
5786
- * - `GET /oauth/idp-callback` - IDP callback (receives auth code from gateway IDP)
5787
- * - `GET /oauth/upstream-callback` - Upstream callback (receives auth code from upstream)
5788
- * - `POST /oauth/token` - Token endpoint (exchanges codes for tokens)
5789
- * - `POST /oauth/register` - Dynamic Client Registration proxy (if IDP supports DCR)
5790
- *
5791
- * ## Configuration Example
5792
- *
5793
- * ```typescript
5794
- * import { McpOAuthGatewayPlugin, RuntimeExtensions } from "@zuplo/runtime";
5795
- *
5796
- * export function runtimeInit(runtime: RuntimeExtensions) {
5797
- * runtime.addPlugin(
5798
- * new McpOAuthGatewayPlugin({
5799
- * idp: {
5800
- * baseUrl: "https://zuplo-playground.us.auth0.com",
5801
- * clientId: process.env.IDP_CLIENT_ID,
5802
- * clientSecret: process.env.IDP_CLIENT_SECRET,
5803
- * },
5804
- * upstreams: {
5805
- * jira: {
5806
- * baseUrl: "https://mcp.atlassian.com",
5807
- * scopes: ["read:jira-work", "write:jira-work"],
5808
- * clientName: "My MCP Gateway",
5809
- * },
5810
- * },
5811
- * clients: {
5812
- * "my-mcp-client": {
5813
- * redirectUris: ["http://localhost:3000/callback"],
5814
- * },
5815
- * },
5816
- * })
5817
- * );
5818
- * }
5819
- * ```
5820
- *
5821
- * @public
5822
- */
5823
- export declare class McpOAuthGatewayPlugin extends SystemRuntimePlugin {
5824
- #private;
5825
- private readonly options;
5826
- constructor(options: McpOAuthGatewayPluginOptions);
5827
- /* Excluded from this release type: registerRoutes */
5828
- }
5829
-
5830
- /**
5831
- * Options for the MCP OAuth Gateway plugin.
5832
- * @public
5833
- */
5834
- export declare interface McpOAuthGatewayPluginOptions {
5835
- /**
5836
- * Gateway IDP configuration (Zuplo's auth or another identity provider).
5837
- */
5838
- idp: IdpConfig;
5839
- /**
5840
- * Upstream provider configurations keyed by resource name.
5841
- * @example { jira: { ... }, github: { ... } }
5842
- */
5843
- upstreams: Record<string, UpstreamConfig>;
5844
- /**
5845
- * Registered client configurations keyed by client ID.
5846
- * For POC, this is static configuration. In production, this would be
5847
- * backed by Dynamic Client Registration (DCR).
5848
- */
5849
- clients: Record<string, ClientConfig>;
5850
- /**
5851
- * Authorization endpoint path to advertise in OAuth metadata.
5852
- * Defaults to "/oauth/:resource/authorize".
5853
- */
5854
- authorizationEndpointPath?: string;
5855
- }
5856
-
5857
5653
  /**
5858
5654
  * An MCP Server handler for Zuplo
5859
5655
  * Only POST requests are supported for the HTTP streamable MCP transport.
@@ -8952,8 +8748,6 @@ export declare interface SetBodyInboundPolicyOptions {
8952
8748
  body: string;
8953
8749
  }
8954
8750
 
8955
- /* Excluded from this release type: setDcrClient */
8956
-
8957
8751
  /**
8958
8752
  * Adds or sets headers on the incoming request.
8959
8753
  *
@@ -9108,10 +8902,6 @@ export declare interface SetStatusOutboundPolicyOptions {
9108
8902
  statusText?: string;
9109
8903
  }
9110
8904
 
9111
- /* Excluded from this release type: setUpstreamMetadata */
9112
-
9113
- /* Excluded from this release type: setUpstreamToken */
9114
-
9115
8905
  /**
9116
8906
  * Function type for determining if a request should be logged
9117
8907
  * @public
@@ -9477,8 +9267,6 @@ declare interface UnauthenticatedCredentialConfig {
9477
9267
  method: "none";
9478
9268
  }
9479
9269
 
9480
- /* Excluded from this release type: UpstreamAuthServerMetadata */
9481
-
9482
9270
  /**
9483
9271
  * Uses Azure Active Directory to add an Authorization header to the request
9484
9272
  * in order to authenticate requests using Azure identity.
@@ -9522,8 +9310,6 @@ export declare interface UpstreamAzureAdServiceAuthInboundPolicyOptions {
9522
9310
  expirationOffsetSeconds?: number;
9523
9311
  }
9524
9312
 
9525
- /* Excluded from this release type: UpstreamConfig */
9526
-
9527
9313
  /**
9528
9314
  * Creates a Firebase Admin token and attaches it to the outgoing request.
9529
9315
  * Useful when calling Firebase services as an administrator.
@@ -9765,8 +9551,6 @@ export declare interface UpstreamGcpServiceAuthInboundPolicyOptions {
9765
9551
  enableSuspiciousHeaderWarning?: boolean;
9766
9552
  }
9767
9553
 
9768
- /* Excluded from this release type: UpstreamTokens */
9769
-
9770
9554
  /**
9771
9555
  * Generates a Zuplo JWT token and attaches it to the outgoing request. This
9772
9556
  * policy creates a self-signed JWT using the Zuplo JWT plugin and adds it
@@ -10221,7 +10005,7 @@ declare interface XacmlRequest {
10221
10005
  /**
10222
10006
  * Parses XML and converts it to JSON.
10223
10007
  *
10224
- * @title XML to JSON Outbound
10008
+ * @title XML to JSON
10225
10009
  * @product api-gateway
10226
10010
  * @public
10227
10011
  * @param request - The ZuploRequest
@@ -88,6 +88,9 @@ declare type DevPortalType = "legacy" | "zudoku";
88
88
 
89
89
  declare const EventType: {
90
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";
91
94
  readonly AI_GATEWAY_COST_SUM: "ai_gateway_cost_sum";
92
95
  readonly AI_GATEWAY_REQUEST_COUNT: "ai_gateway_request_count";
93
96
  readonly AI_GATEWAY_TOKEN_SUM: "ai_gateway_token_sum";
@@ -939,7 +942,7 @@ declare interface Logger extends BaseLogger {
939
942
  * to the underlying OAuth implementation.
940
943
  *
941
944
  * @beta
942
- * @title MCP Auth0 OAuth Inbound
945
+ * @title MCP Auth0 OAuth
943
946
  * @param request - The ZuploRequest
944
947
  * @param context - The ZuploContext
945
948
  * @param _options - The policy options set in policies.json
@@ -1043,7 +1046,7 @@ export declare class McpGatewayPlugin extends SystemRuntimePlugin {
1043
1046
  * request context.
1044
1047
  *
1045
1048
  * @beta
1046
- * @title MCP OAuth Inbound
1049
+ * @title MCP OAuth
1047
1050
  * @param request - The ZuploRequest
1048
1051
  * @param context - The ZuploContext
1049
1052
  * @param _options - The policy options set in policies.json
@@ -1136,11 +1139,11 @@ export declare interface McpOAuthInboundPolicyOptions {
1136
1139
 
1137
1140
  /**
1138
1141
  * Bind a route to an upstream MCP server. Stores the resolved upstream binding
1139
- * on the request context for {@link McpVirtualServerHandler}, which resolves
1142
+ * on the request context for `McpVirtualServerHandler`, which resolves
1140
1143
  * credentials during capability dispatch.
1141
1144
  *
1142
1145
  * @beta
1143
- * @title MCP Upstream Connection Inbound
1146
+ * @title MCP Upstream Connection
1144
1147
  * @param request - The ZuploRequest
1145
1148
  * @param context - The ZuploContext
1146
1149
  * @param options - The policy options set in policies.json
@@ -79,6 +79,9 @@ export declare function createMockContext(options?: {
79
79
 
80
80
  declare const EventType: {
81
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";
82
85
  readonly AI_GATEWAY_COST_SUM: "ai_gateway_cost_sum";
83
86
  readonly AI_GATEWAY_REQUEST_COUNT: "ai_gateway_request_count";
84
87
  readonly AI_GATEWAY_TOKEN_SUM: "ai_gateway_token_sum";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.70.0",
4
+ "version": "6.70.2",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "6.70.0",
3
+ "version": "6.70.2",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -29,10 +29,10 @@
29
29
  "@opentelemetry/api": "1.9.0",
30
30
  "@sentry/node": "9.22.0",
31
31
  "@swc/core": "1.10.18",
32
- "@zuplo/core": "6.70.0",
32
+ "@zuplo/core": "6.70.2",
33
33
  "@zuplo/editor": "1.0.20821740935",
34
- "@zuplo/openapi-tools": "6.70.0",
35
- "@zuplo/runtime": "6.70.0",
34
+ "@zuplo/openapi-tools": "6.70.2",
35
+ "@zuplo/runtime": "6.70.2",
36
36
  "chalk": "5.4.1",
37
37
  "chokidar": "3.5.3",
38
38
  "cookie": "1.0.2",
@@ -66,8 +66,8 @@
66
66
  "workerd": "1.20241230.0",
67
67
  "yargs": "17.7.2",
68
68
  "zod": "3.25.76",
69
- "@zuplo/graphql": "6.70.0",
70
- "@zuplo/otel": "6.70.0"
69
+ "@zuplo/graphql": "6.70.2",
70
+ "@zuplo/otel": "6.70.2"
71
71
  },
72
72
  "bundleDependencies": [
73
73
  "@fastify/cors",
@@ -1,26 +0,0 @@
1
-
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Zuplo, Inc. All rights reserved.
4
- *
5
- * This software and associated documentation files (the "Software") is intended to be used
6
- * only by Zuplo customers solely to develop and test applications that will be deployed
7
- * to Zuplo hosted services. You and others in your organization may use these files on your
8
- * Development Devices solely for the above stated purpose.
9
- *
10
- * Outside of uses stated above, no license is granted for any other purpose including
11
- * without limitation the rights to use, copy, modify, merge, publish, distribute,
12
- * sublicense, host, and/or sell copies of the Software.
13
- *
14
- * The software may include third party components with separate legal notices or governed by
15
- * other agreements, as described in licenses either embedded in or accompanying the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19
- * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
20
- * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
- * DEALINGS IN THE SOFTWARE.
23
- *--------------------------------------------------------------------------------------------*/
24
-
25
- import{W as T,a as _}from"./chunk-FFHHHNST.js";var t={MCP_TOOL_USAGE:"mcp_tool_usage",AI_GATEWAY_COST_SUM:"ai_gateway_cost_sum",AI_GATEWAY_REQUEST_COUNT:"ai_gateway_request_count",AI_GATEWAY_TOKEN_SUM:"ai_gateway_token_sum",AI_GATEWAY_LATENCY_HISTOGRAM:"ai_gateway_latency_histogram",AI_GATEWAY_WARNING_COUNT:"ai_gateway_warning_count",AI_GATEWAY_BLOCKED_COUNT:"ai_gateway_blocked_count",MCP_GATEWAY_REQUEST_RECEIVED:"mcp_gateway_request_received",MCP_GATEWAY_REQUEST_COMPLETED:"mcp_gateway_request_completed",MCP_GATEWAY_REQUEST_REJECTED:"mcp_gateway_request_rejected",MCP_GATEWAY_INITIALIZE_NEGOTIATED:"mcp_gateway_initialize_negotiated",MCP_GATEWAY_CLIENT_UNSUPPORTED_BEHAVIOR:"mcp_gateway_client_unsupported_behavior",MCP_GATEWAY_CATALOG_LISTED:"mcp_gateway_catalog_listed",MCP_GATEWAY_CATALOG_IMPORTED:"mcp_gateway_catalog_imported",MCP_GATEWAY_CATALOG_DRIFT_DETECTED:"mcp_gateway_catalog_drift_detected",MCP_GATEWAY_CAPABILITY_LISTED:"mcp_gateway_capability_listed",MCP_GATEWAY_CAPABILITY_INVOKED:"mcp_gateway_capability_invoked",MCP_GATEWAY_CAPABILITY_COMPLETED:"mcp_gateway_capability_completed",MCP_GATEWAY_CAPABILITY_FAILED:"mcp_gateway_capability_failed",MCP_GATEWAY_CAPABILITY_CONNECT_REQUIRED:"mcp_gateway_capability_connect_required",MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_VALIDATED:"mcp_gateway_auth_downstream_token_validated",MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_REJECTED:"mcp_gateway_auth_downstream_token_rejected",MCP_GATEWAY_OAUTH_CLIENT_REGISTERED:"mcp_gateway_oauth_client_registered",MCP_GATEWAY_OAUTH_AUTHORIZE_STARTED:"mcp_gateway_oauth_authorize_started",MCP_GATEWAY_OAUTH_AUTHORIZE_AWAITING_SETUP:"mcp_gateway_oauth_authorize_awaiting_setup",MCP_GATEWAY_OAUTH_TOKEN_ISSUED:"mcp_gateway_oauth_token_issued",MCP_GATEWAY_OAUTH_TOKEN_REFRESH_ROTATED:"mcp_gateway_oauth_token_refresh_rotated",MCP_GATEWAY_OAUTH_TOKEN_REVOKED:"mcp_gateway_oauth_token_revoked",MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_REQUIRED:"mcp_gateway_auth_upstream_connect_required",MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_STARTED:"mcp_gateway_auth_upstream_connect_started",MCP_GATEWAY_AUTH_UPSTREAM_CALLBACK_RECEIVED:"mcp_gateway_auth_upstream_callback_received",MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED:"mcp_gateway_auth_upstream_token_exchange_succeeded",MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED:"mcp_gateway_auth_upstream_token_exchange_failed",MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_RESOLVED:"mcp_gateway_auth_upstream_credential_resolved",MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_MISSING:"mcp_gateway_auth_upstream_credential_missing",MCP_GATEWAY_AUTH_UPSTREAM_RECONSENT_REQUIRED:"mcp_gateway_auth_upstream_reconsent_required",MCP_GATEWAY_POLICY_DECISION:"mcp_gateway_policy_decision",MCP_GATEWAY_GUARDRAIL_DECISION:"mcp_gateway_guardrail_decision",MCP_GATEWAY_RATE_LIMIT_DECISION:"mcp_gateway_rate_limit_decision",MCP_GATEWAY_UPSTREAM_REQUEST_SENT:"mcp_gateway_upstream_request_sent",MCP_GATEWAY_UPSTREAM_REQUEST_COMPLETED:"mcp_gateway_upstream_request_completed",MCP_GATEWAY_UPSTREAM_REQUEST_FAILED:"mcp_gateway_upstream_request_failed",MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_CREATED:"mcp_gateway_audit_virtual_server_created",MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_UPDATED:"mcp_gateway_audit_virtual_server_updated",MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_DELETED:"mcp_gateway_audit_virtual_server_deleted"};var n=class{static{_(this,"BaseAnalyticsEvent")}eventId;requestId;timestamp;accountName;projectName;deploymentName;unit;value;constructor(e){this.eventId=e.eventId,this.requestId=e.requestId,this.timestamp=e.timestamp??new Date,this.accountName=e.accountName,this.projectName=e.projectName,this.deploymentName=e.deploymentName,this.unit=e.unit,this.value=e.value}};var i=class extends n{static{_(this,"AiGatewayBlockedCountEvent")}eventType=t.AI_GATEWAY_BLOCKED_COUNT;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.type||!this.metadata.type.trim())&&(this.metadata.type="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var r=class extends n{static{_(this,"AiGatewayCostSumEvent")}eventType=t.AI_GATEWAY_COST_SUM;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.model||!this.metadata.model.trim())&&(this.metadata.model="unknown"),(!this.metadata.provider||!this.metadata.provider.trim())&&(this.metadata.provider="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var o=class extends n{static{_(this,"AiGatewayLatencyHistogramEvent")}eventType=t.AI_GATEWAY_LATENCY_HISTOGRAM;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.model||!this.metadata.model.trim())&&(this.metadata.model="unknown"),(!this.metadata.provider||!this.metadata.provider.trim())&&(this.metadata.provider="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var p=class extends n{static{_(this,"AiGatewayRequestCountEvent")}eventType=t.AI_GATEWAY_REQUEST_COUNT;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.model||!this.metadata.model.trim())&&(this.metadata.model="unknown"),(!this.metadata.provider||!this.metadata.provider.trim())&&(this.metadata.provider="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var s=class extends n{static{_(this,"AiGatewayTokenSumEvent")}eventType=t.AI_GATEWAY_TOKEN_SUM;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.model||!this.metadata.model.trim())&&(this.metadata.model="unknown"),(!this.metadata.provider||!this.metadata.provider.trim())&&(this.metadata.provider="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var y=class extends n{static{_(this,"AiGatewayWarningCountEvent")}eventType=t.AI_GATEWAY_WARNING_COUNT;metadata;constructor(e){super(e),this.metadata=e.metadata,(!this.metadata.type||!this.metadata.type.trim())&&(this.metadata.type="unknown"),(!this.metadata.configId||!this.metadata.configId.trim())&&(this.metadata.configId="unknown")}};var C=class extends n{static{_(this,"McpGatewayEvent")}eventType;metadata;constructor(e){super(e),this.eventType=e.eventType,this.metadata=e.metadata}};var M=class extends n{static{_(this,"McpToolUsageEvent")}eventType=t.MCP_TOOL_USAGE;metadata;constructor(e){e.metadata.toolName.trim()||(e.metadata.toolName="unknown"),e.metadata.toolPath.trim()||(e.metadata.toolPath="unknown"),e.metadata.toolMethod.trim()||(e.metadata.toolMethod="unknown"),e.metadata.toolOperationId.trim()||(e.metadata.toolOperationId="unknown"),super(e),this.metadata=e.metadata}};var a=_(E=>e=>new C({...e,eventType:E}),"buildMcpGatewayEvent"),d={[t.MCP_TOOL_USAGE]:E=>new M(E),[t.AI_GATEWAY_COST_SUM]:E=>new r(E),[t.AI_GATEWAY_REQUEST_COUNT]:E=>new p(E),[t.AI_GATEWAY_TOKEN_SUM]:E=>new s(E),[t.AI_GATEWAY_LATENCY_HISTOGRAM]:E=>new o(E),[t.AI_GATEWAY_WARNING_COUNT]:E=>new y(E),[t.AI_GATEWAY_BLOCKED_COUNT]:E=>new i(E),[t.MCP_GATEWAY_REQUEST_RECEIVED]:a(t.MCP_GATEWAY_REQUEST_RECEIVED),[t.MCP_GATEWAY_REQUEST_COMPLETED]:a(t.MCP_GATEWAY_REQUEST_COMPLETED),[t.MCP_GATEWAY_REQUEST_REJECTED]:a(t.MCP_GATEWAY_REQUEST_REJECTED),[t.MCP_GATEWAY_INITIALIZE_NEGOTIATED]:a(t.MCP_GATEWAY_INITIALIZE_NEGOTIATED),[t.MCP_GATEWAY_CLIENT_UNSUPPORTED_BEHAVIOR]:a(t.MCP_GATEWAY_CLIENT_UNSUPPORTED_BEHAVIOR),[t.MCP_GATEWAY_CATALOG_LISTED]:a(t.MCP_GATEWAY_CATALOG_LISTED),[t.MCP_GATEWAY_CATALOG_IMPORTED]:a(t.MCP_GATEWAY_CATALOG_IMPORTED),[t.MCP_GATEWAY_CATALOG_DRIFT_DETECTED]:a(t.MCP_GATEWAY_CATALOG_DRIFT_DETECTED),[t.MCP_GATEWAY_CAPABILITY_LISTED]:a(t.MCP_GATEWAY_CAPABILITY_LISTED),[t.MCP_GATEWAY_CAPABILITY_INVOKED]:a(t.MCP_GATEWAY_CAPABILITY_INVOKED),[t.MCP_GATEWAY_CAPABILITY_COMPLETED]:a(t.MCP_GATEWAY_CAPABILITY_COMPLETED),[t.MCP_GATEWAY_CAPABILITY_FAILED]:a(t.MCP_GATEWAY_CAPABILITY_FAILED),[t.MCP_GATEWAY_CAPABILITY_CONNECT_REQUIRED]:a(t.MCP_GATEWAY_CAPABILITY_CONNECT_REQUIRED),[t.MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_VALIDATED]:a(t.MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_VALIDATED),[t.MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_REJECTED]:a(t.MCP_GATEWAY_AUTH_DOWNSTREAM_TOKEN_REJECTED),[t.MCP_GATEWAY_OAUTH_CLIENT_REGISTERED]:a(t.MCP_GATEWAY_OAUTH_CLIENT_REGISTERED),[t.MCP_GATEWAY_OAUTH_AUTHORIZE_STARTED]:a(t.MCP_GATEWAY_OAUTH_AUTHORIZE_STARTED),[t.MCP_GATEWAY_OAUTH_AUTHORIZE_AWAITING_SETUP]:a(t.MCP_GATEWAY_OAUTH_AUTHORIZE_AWAITING_SETUP),[t.MCP_GATEWAY_OAUTH_TOKEN_ISSUED]:a(t.MCP_GATEWAY_OAUTH_TOKEN_ISSUED),[t.MCP_GATEWAY_OAUTH_TOKEN_REFRESH_ROTATED]:a(t.MCP_GATEWAY_OAUTH_TOKEN_REFRESH_ROTATED),[t.MCP_GATEWAY_OAUTH_TOKEN_REVOKED]:a(t.MCP_GATEWAY_OAUTH_TOKEN_REVOKED),[t.MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_REQUIRED]:a(t.MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_REQUIRED),[t.MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_STARTED]:a(t.MCP_GATEWAY_AUTH_UPSTREAM_CONNECT_STARTED),[t.MCP_GATEWAY_AUTH_UPSTREAM_CALLBACK_RECEIVED]:a(t.MCP_GATEWAY_AUTH_UPSTREAM_CALLBACK_RECEIVED),[t.MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED]:a(t.MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED),[t.MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED]:a(t.MCP_GATEWAY_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED),[t.MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_RESOLVED]:a(t.MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_RESOLVED),[t.MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_MISSING]:a(t.MCP_GATEWAY_AUTH_UPSTREAM_CREDENTIAL_MISSING),[t.MCP_GATEWAY_AUTH_UPSTREAM_RECONSENT_REQUIRED]:a(t.MCP_GATEWAY_AUTH_UPSTREAM_RECONSENT_REQUIRED),[t.MCP_GATEWAY_POLICY_DECISION]:a(t.MCP_GATEWAY_POLICY_DECISION),[t.MCP_GATEWAY_GUARDRAIL_DECISION]:a(t.MCP_GATEWAY_GUARDRAIL_DECISION),[t.MCP_GATEWAY_RATE_LIMIT_DECISION]:a(t.MCP_GATEWAY_RATE_LIMIT_DECISION),[t.MCP_GATEWAY_UPSTREAM_REQUEST_SENT]:a(t.MCP_GATEWAY_UPSTREAM_REQUEST_SENT),[t.MCP_GATEWAY_UPSTREAM_REQUEST_COMPLETED]:a(t.MCP_GATEWAY_UPSTREAM_REQUEST_COMPLETED),[t.MCP_GATEWAY_UPSTREAM_REQUEST_FAILED]:a(t.MCP_GATEWAY_UPSTREAM_REQUEST_FAILED),[t.MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_CREATED]:a(t.MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_CREATED),[t.MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_UPDATED]:a(t.MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_UPDATED),[t.MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_DELETED]:a(t.MCP_GATEWAY_AUDIT_VIRTUAL_SERVER_DELETED)};function c(E,e){let A=d[E];return A(e)}_(c,"createAnalyticsEvent");var G=class{static{_(this,"ZuploGatewayAnalyticsContext")}#t;#e;constructor(e){this.#t=[],this.#e=e}addAnalyticsEvent(e,A,l,m){let u=this.createAnalyticsEvent(e,A,l,m);this.#t.push(u)}flushAnalyticsEvents(){let e=[...this.#t];return this.#t.length=0,e}getAnalyticsEvents(){return[...this.#t]}createAnalyticsEvent(e,A,l,m){return c(A,{eventId:crypto.randomUUID(),requestId:this.#e,accountName:T.instance.build.ACCOUNT_NAME??"unknown",projectName:T.instance.build.PROJECT_NAME??"unknown",deploymentName:T.instance.deploymentName??"unknown",metadata:l,unit:m,value:e})}};export{t as a,G as b};
26
- //# sourceMappingURL=chunk-5ZAQEULH.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@zuplo/runtime/metrics/v2/interfaces.ts","@zuplo/runtime/metrics/v2/events/base-analytics-event.ts","@zuplo/runtime/metrics/v2/events/ai-gateway-blocked-count.ts","@zuplo/runtime/metrics/v2/events/ai-gateway-cost-sum.ts","@zuplo/runtime/metrics/v2/events/ai-gateway-latency-histogram.ts","@zuplo/runtime/metrics/v2/events/ai-gateway-request-count.ts","@zuplo/runtime/metrics/v2/events/ai-gateway-token-sum.ts","@zuplo/runtime/metrics/v2/events/ai-gateway-warning-count.ts","@zuplo/runtime/metrics/v2/events/mcp-gateway-event.ts","@zuplo/runtime/metrics/v2/events/mcp-tool-usage.ts","@zuplo/runtime/metrics/v2/create-events.ts","@zuplo/runtime/metrics/v2/analytics-context.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;+CAkDO,IAAMA,EAAY,CACvB,eAAgB,iBAChB,oBAAqB,sBACrB,yBAA0B,2BAC1B,qBAAsB,uBACtB,6BAA8B,+BAC9B,yBAA0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ockedCountEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayCostSumEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayLatencyHistogramEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayRequestCountEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayTokenSumEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayWarningCountEvent","BaseAnalyticsEvent","__name","EventType","options","McpGatewayEvent","BaseAnalyticsEvent","__name","options","McpToolUsageEvent","BaseAnalyticsEvent","__name","EventType","options","buildMcpGatewayEvent","__name","eventType","options","McpGatewayEvent","eventBuilders","EventType","McpToolUsageEvent","AiGatewayCostSumEvent","AiGatewayRequestCountEvent","AiGatewayTokenSumEvent","AiGatewayLatencyHistogramEvent","AiGatewayWarningCountEvent","AiGatewayBlockedCountEvent","createAnalyticsEvent","builder","ZuploGatewayAnalyticsContext","__name","#events","#requestId","requestId","value","eventType","metadata","unit","event","events","createAnalyticsEvent","Environment"]}