@zuplo/cli 6.72.16 → 6.73.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/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/index.js +17 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/package.json +1 -1
- package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/security.test.js +62 -0
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-EJIF2ZML.js +26 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-EJIF2ZML.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-XLXPRKLV.js +385 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-XLXPRKLV.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +9 -1
- package/node_modules/@zuplo/runtime/out/types/mcp/messages/index.d.ts +1 -0
- package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +1 -0
- package/node_modules/@zuplo/runtime/out/types/mocks/index.d.ts +1 -0
- package/node_modules/@zuplo/runtime/out/types/sdks/aws/index.d.ts +1 -0
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/fast-uri/index.js +17 -0
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/security.test.js +62 -0
- package/node_modules/hono/dist/cjs/helper/streaming/sse.js +4 -3
- package/node_modules/hono/dist/cjs/request.js +7 -2
- package/node_modules/hono/dist/cjs/utils/body.js +6 -0
- package/node_modules/hono/dist/helper/streaming/sse.js +4 -3
- package/node_modules/hono/dist/request.js +7 -2
- package/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
- package/node_modules/hono/dist/utils/body.js +6 -0
- package/node_modules/hono/package.json +1 -1
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-52N4KSHA.js +0 -26
- package/node_modules/@zuplo/runtime/out/esm/chunk-52N4KSHA.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-KH6FKZ3E.js +0 -385
- package/node_modules/@zuplo/runtime/out/esm/chunk-KH6FKZ3E.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-KH6FKZ3E.js.LEGAL.txt → chunk-XLXPRKLV.js.LEGAL.txt} +0 -0
|
@@ -615,6 +615,13 @@ export declare interface AIGatewaySemanticCacheOutboundPolicyOptions {}
|
|
|
615
615
|
* route's chain is what enables it. `namespace` defaults to the AI Gateway
|
|
616
616
|
* configuration id when omitted so caching stays scoped per tenant.
|
|
617
617
|
*
|
|
618
|
+
* Cache outcomes are reported on the response via the RFC 9211 `Cache-Status`
|
|
619
|
+
* header under the cache name `zp-aigw-sem-cache` (hit:
|
|
620
|
+
* `zp-aigw-sem-cache; hit; detail="similarity=0.93"`; miss:
|
|
621
|
+
* `zp-aigw-sem-cache; fwd=miss; stored`) alongside the legacy
|
|
622
|
+
* `x-ai-gateway-cache: HIT|MISS` and `x-ai-gateway-cache-similarity` headers,
|
|
623
|
+
* kept for compatibility.
|
|
624
|
+
*
|
|
618
625
|
* @title AI Gateway Semantic Cache (v2)
|
|
619
626
|
* @product ai-gateway
|
|
620
627
|
* @hidden
|
|
@@ -2673,7 +2680,7 @@ declare interface CacheOptions {
|
|
|
2673
2680
|
}
|
|
2674
2681
|
|
|
2675
2682
|
/**
|
|
2676
|
-
* How long a cached response lives, in seconds. Defaults to 3600 (1 hour).
|
|
2683
|
+
* How long a cached response lives, in whole seconds. Defaults to 3600 (1 hour); maximum 2592000 (30 days).
|
|
2677
2684
|
* @public
|
|
2678
2685
|
*/
|
|
2679
2686
|
declare type CacheTTLSeconds = number;
|
|
@@ -4331,6 +4338,7 @@ declare const EventType: {
|
|
|
4331
4338
|
readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
|
|
4332
4339
|
readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
|
|
4333
4340
|
readonly GRAPHQL_OPERATION: "graphql_operation";
|
|
4341
|
+
readonly CACHE_OPERATION: "cache_operation";
|
|
4334
4342
|
};
|
|
4335
4343
|
|
|
4336
4344
|
declare type EventType = (typeof EventType)[keyof typeof EventType];
|
|
@@ -137,6 +137,7 @@ declare const EventType: {
|
|
|
137
137
|
readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
|
|
138
138
|
readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
|
|
139
139
|
readonly GRAPHQL_OPERATION: "graphql_operation";
|
|
140
|
+
readonly CACHE_OPERATION: "cache_operation";
|
|
140
141
|
};
|
|
141
142
|
|
|
142
143
|
declare type EventType = (typeof EventType)[keyof typeof EventType];
|
|
@@ -199,6 +199,7 @@ declare const EventType: {
|
|
|
199
199
|
readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
|
|
200
200
|
readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
|
|
201
201
|
readonly GRAPHQL_OPERATION: "graphql_operation";
|
|
202
|
+
readonly CACHE_OPERATION: "cache_operation";
|
|
202
203
|
};
|
|
203
204
|
|
|
204
205
|
declare type EventType = (typeof EventType)[keyof typeof EventType];
|
|
@@ -112,6 +112,7 @@ declare const EventType: {
|
|
|
112
112
|
readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
|
|
113
113
|
readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
|
|
114
114
|
readonly GRAPHQL_OPERATION: "graphql_operation";
|
|
115
|
+
readonly CACHE_OPERATION: "cache_operation";
|
|
115
116
|
};
|
|
116
117
|
|
|
117
118
|
declare type EventType = (typeof EventType)[keyof typeof EventType];
|
|
@@ -356,6 +356,7 @@ declare const EventType: {
|
|
|
356
356
|
readonly MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING: "mcp_auth_upstream_credential_missing";
|
|
357
357
|
readonly MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED: "mcp_auth_upstream_reconsent_required";
|
|
358
358
|
readonly GRAPHQL_OPERATION: "graphql_operation";
|
|
359
|
+
readonly CACHE_OPERATION: "cache_operation";
|
|
359
360
|
};
|
|
360
361
|
|
|
361
362
|
declare type EventType = (typeof EventType)[keyof typeof EventType];
|
|
@@ -202,6 +202,10 @@ function serialize (cmpts, opts) {
|
|
|
202
202
|
|
|
203
203
|
const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u
|
|
204
204
|
|
|
205
|
+
// Captures the authority component (between "//" and the next "/", "?" or "#"),
|
|
206
|
+
// with or without a scheme prefix, for the literal-backslash rejection below.
|
|
207
|
+
const AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/
|
|
208
|
+
|
|
205
209
|
/**
|
|
206
210
|
* @param {import('./types/index').URIComponent} parsed
|
|
207
211
|
* @param {RegExpMatchArray} matches
|
|
@@ -248,6 +252,19 @@ function parseWithStatus (uri, opts) {
|
|
|
248
252
|
}
|
|
249
253
|
}
|
|
250
254
|
|
|
255
|
+
// A literal backslash (U+005C) is not a valid RFC 3986 URI character and is
|
|
256
|
+
// not an authority delimiter. Reject it in the authority rather than
|
|
257
|
+
// rewriting it: normalizing "\" -> "/" (WHATWG error recovery) could silently
|
|
258
|
+
// change the resource identified by an otherwise-invalid input, and lets "\"
|
|
259
|
+
// act as a host delimiter here while Node's native URL parses a different
|
|
260
|
+
// host (SSRF / redirect / origin-allowlist bypass). Percent-encoded %5C is
|
|
261
|
+
// untouched and remains valid encoded data.
|
|
262
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX)
|
|
263
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf('\\') !== -1) {
|
|
264
|
+
parsed.error = 'URI authority must not contain a literal backslash.'
|
|
265
|
+
malformedAuthorityOrPort = true
|
|
266
|
+
}
|
|
267
|
+
|
|
251
268
|
const matches = uri.match(URI_PARSE)
|
|
252
269
|
|
|
253
270
|
if (matches) {
|
|
@@ -159,3 +159,65 @@ test('parse canonicalises IDN / Unicode hosts to their ASCII form', (t) => {
|
|
|
159
159
|
t.equal(parsed.host, expectedHost, `host canonicalised to ASCII: ${description}`)
|
|
160
160
|
})
|
|
161
161
|
})
|
|
162
|
+
|
|
163
|
+
test('parse rejects a literal backslash in the authority as malformed (RFC 3986)', (t) => {
|
|
164
|
+
// Regression for the host-confusion bypass: a literal "\" is invalid RFC 3986
|
|
165
|
+
// syntax and must be flagged malformed, not silently rewritten. Otherwise "\"
|
|
166
|
+
// acts as a host delimiter here while Node's native URL parses a different
|
|
167
|
+
// host, defeating a host-based SSRF/redirect/origin allowlist.
|
|
168
|
+
const cases = [
|
|
169
|
+
'http://evil.com\\@allowed.com',
|
|
170
|
+
'https://169.254.169.254\\@trusted.example.com',
|
|
171
|
+
'http://127.0.0.1\\@public.example.com',
|
|
172
|
+
'https://attacker.com\\@api.internal',
|
|
173
|
+
'http://a\\@b',
|
|
174
|
+
'ws://evil.com\\@allowed.com/chat',
|
|
175
|
+
'wss://evil.com\\@allowed.com/chat',
|
|
176
|
+
'http://evil.com\\%40allowed.com',
|
|
177
|
+
'//evil.com\\@allowed.com'
|
|
178
|
+
]
|
|
179
|
+
|
|
180
|
+
t.plan(cases.length)
|
|
181
|
+
|
|
182
|
+
cases.forEach((input) => {
|
|
183
|
+
t.equal(
|
|
184
|
+
fastURI.parse(input).error,
|
|
185
|
+
'URI authority must not contain a literal backslash.',
|
|
186
|
+
input
|
|
187
|
+
)
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
test('normalize does not canonicalize a literal-backslash URI into a different valid URL', (t) => {
|
|
192
|
+
const cases = [
|
|
193
|
+
'http://evil.com\\@allowed.com',
|
|
194
|
+
'https://attacker.com\\@api.internal'
|
|
195
|
+
]
|
|
196
|
+
|
|
197
|
+
t.plan(cases.length)
|
|
198
|
+
|
|
199
|
+
cases.forEach((input) => {
|
|
200
|
+
t.equal(fastURI.normalize(input), input, input)
|
|
201
|
+
})
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
test('parse leaves percent-encoded %5C untouched as encoded data (not rejected)', (t) => {
|
|
205
|
+
// Only the literal "\" byte is rejected; %5C stays valid encoded data and
|
|
206
|
+
// does not diverge from the native URL parser, so it must not be flagged.
|
|
207
|
+
const input = 'http://evil.com%5C@allowed.com'
|
|
208
|
+
const parsed = fastURI.parse(input)
|
|
209
|
+
|
|
210
|
+
t.plan(2)
|
|
211
|
+
t.notOk(parsed.error, '%5C is valid encoded data, not malformed')
|
|
212
|
+
t.equal(parsed.host, new URL(input).hostname, '%5C host matches native URL (no divergence)')
|
|
213
|
+
})
|
|
214
|
+
|
|
215
|
+
test('parse does not reject a literal backslash in the query or fragment', (t) => {
|
|
216
|
+
// The rejection is scoped to the authority/path (the host-confusion surface);
|
|
217
|
+
// a backslash after "?"/"#" is normalized as encoded data as before.
|
|
218
|
+
const parsed = fastURI.parse('http://host.example.com/?x=\\y#z\\w')
|
|
219
|
+
|
|
220
|
+
t.plan(2)
|
|
221
|
+
t.notOk(parsed.error, 'backslash in query/fragment does not mark the URI malformed')
|
|
222
|
+
t.equal(parsed.host, 'host.example.com', 'host parsed normally')
|
|
223
|
+
})
|
|
@@ -33,8 +33,9 @@ class SSEStreamingApi extends import_stream.StreamingApi {
|
|
|
33
33
|
const dataLines = data.split(/\r\n|\r|\n/).map((line) => {
|
|
34
34
|
return `data: ${line}`;
|
|
35
35
|
}).join("\n");
|
|
36
|
-
for (const key of ["event", "id"
|
|
37
|
-
|
|
36
|
+
for (const key of ["event", "id"]) {
|
|
37
|
+
const value = message[key];
|
|
38
|
+
if (value && /[\r\n]/.test(value)) {
|
|
38
39
|
throw new Error(`${key} must not contain "\\r" or "\\n"`);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -42,7 +43,7 @@ class SSEStreamingApi extends import_stream.StreamingApi {
|
|
|
42
43
|
message.event && `event: ${message.event}`,
|
|
43
44
|
dataLines,
|
|
44
45
|
message.id && `id: ${message.id}`,
|
|
45
|
-
message.retry && `retry: ${message.retry}`
|
|
46
|
+
message.retry !== void 0 && `retry: ${message.retry}`
|
|
46
47
|
].filter(Boolean).join("\n") + "\n\n";
|
|
47
48
|
await this.write(sseData);
|
|
48
49
|
}
|
|
@@ -316,11 +316,16 @@ const cloneRawRequest = async (req) => {
|
|
|
316
316
|
message: "Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly."
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
|
+
const body = await req[cacheKey]();
|
|
320
|
+
const headers = req.header();
|
|
321
|
+
if (body instanceof FormData) {
|
|
322
|
+
delete headers["content-type"];
|
|
323
|
+
}
|
|
319
324
|
const requestInit = {
|
|
320
|
-
body
|
|
325
|
+
body,
|
|
321
326
|
cache: req.raw.cache,
|
|
322
327
|
credentials: req.raw.credentials,
|
|
323
|
-
headers
|
|
328
|
+
headers,
|
|
324
329
|
integrity: req.raw.integrity,
|
|
325
330
|
keepalive: req.raw.keepalive,
|
|
326
331
|
method: req.method,
|
|
@@ -33,6 +33,12 @@ const parseBody = async (request, options = /* @__PURE__ */ Object.create(null))
|
|
|
33
33
|
return {};
|
|
34
34
|
};
|
|
35
35
|
async function parseFormData(request, options) {
|
|
36
|
+
if (!isRawRequest(request) && request.bodyCache.formData) {
|
|
37
|
+
return convertFormDataToBodyData(
|
|
38
|
+
await request.bodyCache.formData,
|
|
39
|
+
options
|
|
40
|
+
);
|
|
41
|
+
}
|
|
36
42
|
const headers = isRawRequest(request) ? request.headers : request.raw.headers;
|
|
37
43
|
const arrayBuffer = await request.arrayBuffer();
|
|
38
44
|
const formDataPromise = (0, import_buffer.bufferToFormData)(arrayBuffer, headers.get("Content-Type") || "");
|
|
@@ -11,8 +11,9 @@ var SSEStreamingApi = class extends StreamingApi {
|
|
|
11
11
|
const dataLines = data.split(/\r\n|\r|\n/).map((line) => {
|
|
12
12
|
return `data: ${line}`;
|
|
13
13
|
}).join("\n");
|
|
14
|
-
for (const key of ["event", "id"
|
|
15
|
-
|
|
14
|
+
for (const key of ["event", "id"]) {
|
|
15
|
+
const value = message[key];
|
|
16
|
+
if (value && /[\r\n]/.test(value)) {
|
|
16
17
|
throw new Error(`${key} must not contain "\\r" or "\\n"`);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -20,7 +21,7 @@ var SSEStreamingApi = class extends StreamingApi {
|
|
|
20
21
|
message.event && `event: ${message.event}`,
|
|
21
22
|
dataLines,
|
|
22
23
|
message.id && `id: ${message.id}`,
|
|
23
|
-
message.retry && `retry: ${message.retry}`
|
|
24
|
+
message.retry !== void 0 && `retry: ${message.retry}`
|
|
24
25
|
].filter(Boolean).join("\n") + "\n\n";
|
|
25
26
|
await this.write(sseData);
|
|
26
27
|
}
|
|
@@ -294,11 +294,16 @@ var cloneRawRequest = async (req) => {
|
|
|
294
294
|
message: "Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly."
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
|
+
const body = await req[cacheKey]();
|
|
298
|
+
const headers = req.header();
|
|
299
|
+
if (body instanceof FormData) {
|
|
300
|
+
delete headers["content-type"];
|
|
301
|
+
}
|
|
297
302
|
const requestInit = {
|
|
298
|
-
body
|
|
303
|
+
body,
|
|
299
304
|
cache: req.raw.cache,
|
|
300
305
|
credentials: req.raw.credentials,
|
|
301
|
-
headers
|
|
306
|
+
headers,
|
|
302
307
|
integrity: req.raw.integrity,
|
|
303
308
|
keepalive: req.raw.keepalive,
|
|
304
309
|
method: req.method,
|
|
@@ -71,7 +71,7 @@ export declare const every: (...middleware: (MiddlewareHandler | Condition)[]) =
|
|
|
71
71
|
* @example
|
|
72
72
|
* ```ts
|
|
73
73
|
* import { except } from 'hono/combine'
|
|
74
|
-
* import { bearerAuth } from 'hono/bearer-auth
|
|
74
|
+
* import { bearerAuth } from 'hono/bearer-auth'
|
|
75
75
|
*
|
|
76
76
|
* // If client is accessing public API, then skip authentication.
|
|
77
77
|
* // Otherwise, require a valid token.
|
|
@@ -12,6 +12,12 @@ var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) =
|
|
|
12
12
|
return {};
|
|
13
13
|
};
|
|
14
14
|
async function parseFormData(request, options) {
|
|
15
|
+
if (!isRawRequest(request) && request.bodyCache.formData) {
|
|
16
|
+
return convertFormDataToBodyData(
|
|
17
|
+
await request.bodyCache.formData,
|
|
18
|
+
options
|
|
19
|
+
);
|
|
20
|
+
}
|
|
15
21
|
const headers = isRawRequest(request) ? request.headers : request.raw.headers;
|
|
16
22
|
const arrayBuffer = await request.arrayBuffer();
|
|
17
23
|
const formDataPromise = bufferToFormData(arrayBuffer, headers.get("Content-Type") || "");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.73.0",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"@opentelemetry/api": "1.9.0",
|
|
28
28
|
"@opentelemetry/api-logs": "0.201.1",
|
|
29
29
|
"@swc/core": "1.10.18",
|
|
30
|
-
"@zuplo/core": "6.
|
|
30
|
+
"@zuplo/core": "6.73.0",
|
|
31
31
|
"@zuplo/editor": "1.0.20821740935",
|
|
32
|
-
"@zuplo/openapi-tools": "6.
|
|
33
|
-
"@zuplo/runtime": "6.
|
|
32
|
+
"@zuplo/openapi-tools": "6.73.0",
|
|
33
|
+
"@zuplo/runtime": "6.73.0",
|
|
34
34
|
"chalk": "5.4.1",
|
|
35
35
|
"chokidar": "3.5.3",
|
|
36
36
|
"cookie": "1.0.2",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"workerd": "1.20241230.0",
|
|
62
62
|
"yargs": "17.7.2",
|
|
63
63
|
"zod": "3.25.76",
|
|
64
|
-
"@zuplo/graphql": "6.
|
|
65
|
-
"@zuplo/otel": "6.
|
|
64
|
+
"@zuplo/graphql": "6.73.0",
|
|
65
|
+
"@zuplo/otel": "6.73.0"
|
|
66
66
|
},
|
|
67
67
|
"bundleDependencies": [
|
|
68
68
|
"@inquirer/prompts",
|
|
@@ -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{Y as o}from"./chunk-VCMIY3WJ.js";import{a as r}from"./chunk-2WLR6ZDZ.js";var t={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",AI_GATEWAY_FALLBACK_COUNT:"ai_gateway_fallback_count",MCP_REQUEST_RECEIVED:"mcp_request_received",MCP_REQUEST_COMPLETED:"mcp_request_completed",MCP_REQUEST_REJECTED:"mcp_request_rejected",MCP_INITIALIZE_NEGOTIATED:"mcp_initialize_negotiated",MCP_CLIENT_UNSUPPORTED_BEHAVIOR:"mcp_client_unsupported_behavior",MCP_CAPABILITY_LISTED:"mcp_capability_listed",MCP_CAPABILITY_INVOKED:"mcp_capability_invoked",MCP_CAPABILITY_COMPLETED:"mcp_capability_completed",MCP_CAPABILITY_FAILED:"mcp_capability_failed",MCP_CAPABILITY_CONNECT_REQUIRED:"mcp_capability_connect_required",MCP_AUTH_DOWNSTREAM_TOKEN_VALIDATED:"mcp_auth_downstream_token_validated",MCP_AUTH_DOWNSTREAM_TOKEN_REJECTED:"mcp_auth_downstream_token_rejected",MCP_OAUTH_CLIENT_REGISTERED:"mcp_oauth_client_registered",MCP_OAUTH_AUTHORIZE_STARTED:"mcp_oauth_authorize_started",MCP_OAUTH_AUTHORIZE_AWAITING_SETUP:"mcp_oauth_authorize_awaiting_setup",MCP_OAUTH_TOKEN_ISSUED:"mcp_oauth_token_issued",MCP_OAUTH_TOKEN_REFRESH_ROTATED:"mcp_oauth_token_refresh_rotated",MCP_OAUTH_TOKEN_REVOKED:"mcp_oauth_token_revoked",MCP_AUTH_UPSTREAM_CONNECT_REQUIRED:"mcp_auth_upstream_connect_required",MCP_AUTH_UPSTREAM_CONNECT_STARTED:"mcp_auth_upstream_connect_started",MCP_AUTH_UPSTREAM_CALLBACK_RECEIVED:"mcp_auth_upstream_callback_received",MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED:"mcp_auth_upstream_token_exchange_succeeded",MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED:"mcp_auth_upstream_token_exchange_failed",MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED:"mcp_auth_upstream_credential_resolved",MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING:"mcp_auth_upstream_credential_missing",MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED:"mcp_auth_upstream_reconsent_required",GRAPHQL_OPERATION:"graphql_operation"};var i=class{static{r(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 s=class extends i{static{r(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 _=class extends i{static{r(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 p=class extends i{static{r(this,"AiGatewayFallbackCountEvent")}eventType=t.AI_GATEWAY_FALLBACK_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 T=class extends i{static{r(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 l=class extends i{static{r(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 u=class extends i{static{r(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 A=class extends i{static{r(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 m=class extends i{static{r(this,"GraphqlOperationEvent")}eventType=t.GRAPHQL_OPERATION;metadata;constructor(e){super(e),this.metadata=e.metadata}};var c=class extends i{static{r(this,"McpEvent")}eventType;metadata;constructor(e){super(e),this.eventType=e.eventType,this.metadata=e.metadata}};var a=r(n=>e=>new c({...e,eventType:n}),"buildMcpEvent"),O={[t.AI_GATEWAY_COST_SUM]:n=>new _(n),[t.AI_GATEWAY_REQUEST_COUNT]:n=>new l(n),[t.AI_GATEWAY_TOKEN_SUM]:n=>new u(n),[t.AI_GATEWAY_LATENCY_HISTOGRAM]:n=>new T(n),[t.AI_GATEWAY_WARNING_COUNT]:n=>new A(n),[t.AI_GATEWAY_BLOCKED_COUNT]:n=>new s(n),[t.AI_GATEWAY_FALLBACK_COUNT]:n=>new p(n),[t.MCP_REQUEST_RECEIVED]:a(t.MCP_REQUEST_RECEIVED),[t.MCP_REQUEST_COMPLETED]:a(t.MCP_REQUEST_COMPLETED),[t.MCP_REQUEST_REJECTED]:a(t.MCP_REQUEST_REJECTED),[t.MCP_INITIALIZE_NEGOTIATED]:a(t.MCP_INITIALIZE_NEGOTIATED),[t.MCP_CLIENT_UNSUPPORTED_BEHAVIOR]:a(t.MCP_CLIENT_UNSUPPORTED_BEHAVIOR),[t.MCP_CAPABILITY_LISTED]:a(t.MCP_CAPABILITY_LISTED),[t.MCP_CAPABILITY_INVOKED]:a(t.MCP_CAPABILITY_INVOKED),[t.MCP_CAPABILITY_COMPLETED]:a(t.MCP_CAPABILITY_COMPLETED),[t.MCP_CAPABILITY_FAILED]:a(t.MCP_CAPABILITY_FAILED),[t.MCP_CAPABILITY_CONNECT_REQUIRED]:a(t.MCP_CAPABILITY_CONNECT_REQUIRED),[t.MCP_AUTH_DOWNSTREAM_TOKEN_VALIDATED]:a(t.MCP_AUTH_DOWNSTREAM_TOKEN_VALIDATED),[t.MCP_AUTH_DOWNSTREAM_TOKEN_REJECTED]:a(t.MCP_AUTH_DOWNSTREAM_TOKEN_REJECTED),[t.MCP_OAUTH_CLIENT_REGISTERED]:a(t.MCP_OAUTH_CLIENT_REGISTERED),[t.MCP_OAUTH_AUTHORIZE_STARTED]:a(t.MCP_OAUTH_AUTHORIZE_STARTED),[t.MCP_OAUTH_AUTHORIZE_AWAITING_SETUP]:a(t.MCP_OAUTH_AUTHORIZE_AWAITING_SETUP),[t.MCP_OAUTH_TOKEN_ISSUED]:a(t.MCP_OAUTH_TOKEN_ISSUED),[t.MCP_OAUTH_TOKEN_REFRESH_ROTATED]:a(t.MCP_OAUTH_TOKEN_REFRESH_ROTATED),[t.MCP_OAUTH_TOKEN_REVOKED]:a(t.MCP_OAUTH_TOKEN_REVOKED),[t.MCP_AUTH_UPSTREAM_CONNECT_REQUIRED]:a(t.MCP_AUTH_UPSTREAM_CONNECT_REQUIRED),[t.MCP_AUTH_UPSTREAM_CONNECT_STARTED]:a(t.MCP_AUTH_UPSTREAM_CONNECT_STARTED),[t.MCP_AUTH_UPSTREAM_CALLBACK_RECEIVED]:a(t.MCP_AUTH_UPSTREAM_CALLBACK_RECEIVED),[t.MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED]:a(t.MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_SUCCEEDED),[t.MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED]:a(t.MCP_AUTH_UPSTREAM_TOKEN_EXCHANGE_FAILED),[t.MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED]:a(t.MCP_AUTH_UPSTREAM_CREDENTIAL_RESOLVED),[t.MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING]:a(t.MCP_AUTH_UPSTREAM_CREDENTIAL_MISSING),[t.MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED]:a(t.MCP_AUTH_UPSTREAM_RECONSENT_REQUIRED),[t.GRAPHQL_OPERATION]:n=>new m(n)};function M(n,e){let E=O[n];return E(e)}r(M,"createAnalyticsEvent");var I=class{static{r(this,"ZuploGatewayAnalyticsContext")}#t;#e;constructor(e){this.#t=[],this.#e=e}addAnalyticsEvent(e,E,d,y,C){let v=this.createAnalyticsEvent(e,E,d,y,C);this.#t.push(v)}flushAnalyticsEvents(){let e=[...this.#t];return this.#t.length=0,e}getAnalyticsEvents(){return[...this.#t]}createAnalyticsEvent(e,E,d,y,C){return M(E,{eventId:C??crypto.randomUUID(),requestId:this.#e,accountName:o.instance.accountName??"unknown",projectName:o.instance.projectName??"unknown",deploymentName:o.instance.deploymentName??"unknown",metadata:d,unit:y,value:e})}};export{t as a,I as b};
|
|
26
|
-
//# sourceMappingURL=chunk-52N4KSHA.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-fallback-count.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/graphql-operation-event.ts","@zuplo/runtime/metrics/v2/events/mcp-event.ts","@zuplo/runtime/metrics/v2/create-events.ts","@zuplo/runtime/metrics/v2/analytics-context.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;g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,EAAA,wBC3HT,IAAME,EAAN,KAAoE,CAX3E,MAW2E,CAAAC,EAAA,qCAGhEC,GACAC,GAET,YAAYC,EAAmB,CAC7B,KAAKF,GAAU,CAAC,EAChB,KAAKC,GAAaC,CACpB,CAGA,kBACEC,EACAC,EACAC,EACAC,EACAC,EACM,CACN,IAAMC,EAAQ,KAAK,qBACjBL,EACAC,EACAC,EACAC,EACAC,CACF,EACA,KAAKP,GAAQ,KAAKQ,CAAK,CACzB,CAEA,sBAA8C,CAC5C,IAAMC,EAAS,CAAC,GAAG,KAAKT,EAAO,EAC/B,YAAKA,GAAQ,OAAS,EACfS,CACT,CAEA,oBAA4C,CAC1C,MAAO,CAAC,GAAG,KAAKT,EAAO,CACzB,CAEQ,qBACNG,EACAC,EACAC,EACAC,EACAC,EAC0B,CAC1B,OAAOG,EAAqBN,EAAW,CACrC,QAASG,GAAW,OAAO,WAAW,EACtC,UAAW,KAAKN,GAChB,YAAaU,EAAY,SAAS,aAAe,UACjD,YAAaA,EAAY,SAAS,aAAe,UACjD,eAAgBA,EAAY,SAAS,gBAAkB,UACvD,SAAAN,EACA,KAAAC,EACA,MAAAH,CACF,CAAC,CACH,CACF","names":["EventType","BaseAnalyticsEvent","__name","options","AiGatewayBlockedCountEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayCostSumEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayFallbackCountEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayLatencyHistogramEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayRequestCountEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayTokenSumEvent","BaseAnalyticsEvent","__name","EventType","options","AiGatewayWarningCountEvent","BaseAnalyticsEvent","__name","EventType","options","GraphqlOperationEvent","BaseAnalyticsEvent","__name","EventType","options","McpEvent","BaseAnalyticsEvent","__name","options","buildMcpEvent","__name","eventType","options","McpEvent","eventBuilders","EventType","AiGatewayCostSumEvent","AiGatewayRequestCountEvent","AiGatewayTokenSumEvent","AiGatewayLatencyHistogramEvent","AiGatewayWarningCountEvent","AiGatewayBlockedCountEvent","AiGatewayFallbackCountEvent","GraphqlOperationEvent","createAnalyticsEvent","builder","ZuploGatewayAnalyticsContext","__name","#events","#requestId","requestId","value","eventType","metadata","unit","eventId","event","events","createAnalyticsEvent","Environment"]}
|