@zuplo/cli 7.1.6 → 7.1.8
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/@zuplo/core/customer.cli.minified.js +1 -1
- package/node_modules/@zuplo/core/index.minified.js +1 -1
- 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-CJFLOF27.js → chunk-B3D32RUX.js} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-CJFLOF27.js.map → chunk-B3D32RUX.js.map} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-Y57PFQJ3.js +382 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-Y57PFQJ3.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +82 -17
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +6 -6
- package/node_modules/@zuplo/runtime/out/esm/chunk-BBEFM7HV.js +0 -372
- package/node_modules/@zuplo/runtime/out/esm/chunk-BBEFM7HV.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-BBEFM7HV.js.LEGAL.txt → chunk-Y57PFQJ3.js.LEGAL.txt} +0 -0
|
@@ -245,19 +245,21 @@ export declare type AIGatewayCapability =
|
|
|
245
245
|
| "audio_transcriptions";
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
|
-
* Loads the app configuration for the request (when auth
|
|
249
|
-
* runs the inbound policy chain from that
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
248
|
+
* Loads the app configuration for the request (when auth or the configuration
|
|
249
|
+
* loader has not already) and runs the inbound policy chain from that
|
|
250
|
+
* configuration.
|
|
251
|
+
*
|
|
252
|
+
* Place this policy on AI Gateway v2 routes after optional authentication and
|
|
253
|
+
* optional `ai-gateway-configuration-loader-v2-inbound`. When either of those
|
|
254
|
+
* already populated the app-configuration channel, this policy reuses it.
|
|
255
|
+
* Otherwise it loads the configuration with the route's `app_id` path
|
|
256
|
+
* parameter. Applications select from policies pre-declared by the gateway.
|
|
257
|
+
* Applications without a `inboundPolicyChain`, or with an empty chain, run no
|
|
258
|
+
* application-selected policies. Entry options replace the declaration's
|
|
259
|
+
* options as a complete object; omit them to inherit the declaration,
|
|
260
|
+
* including environment-backed credentials. Each occurrence receives a private
|
|
261
|
+
* deep copy of its entry options, so a policy mutating its options cannot
|
|
262
|
+
* corrupt the cached app configuration.
|
|
261
263
|
*
|
|
262
264
|
* @title AI Gateway Configuration Executor (v2)
|
|
263
265
|
* @product ai-gateway
|
|
@@ -288,6 +290,48 @@ export declare interface AIGatewayConfigurationExecutorV2InboundPolicyOptions {
|
|
|
288
290
|
cacheTtlSeconds?: number;
|
|
289
291
|
}
|
|
290
292
|
|
|
293
|
+
/**
|
|
294
|
+
* Loads the AI Gateway app configuration for the request into the
|
|
295
|
+
* request-scoped channel and does nothing else.
|
|
296
|
+
*
|
|
297
|
+
* Place this policy on AI Gateway v2 routes before
|
|
298
|
+
* `ai-gateway-configuration-executor-v2-inbound` when you want configuration
|
|
299
|
+
* loading separated from chain execution. When `ai-gateway-auth-v2-inbound`
|
|
300
|
+
* already populated the channel, this policy reuses it. Otherwise it loads
|
|
301
|
+
* the configuration with the route's `app_id` path parameter.
|
|
302
|
+
*
|
|
303
|
+
* If this policy is omitted, the configuration executor still loads
|
|
304
|
+
* configuration itself before running the application chain.
|
|
305
|
+
*
|
|
306
|
+
* @title AI Gateway Configuration Loader (v2)
|
|
307
|
+
* @product ai-gateway
|
|
308
|
+
* @hidden
|
|
309
|
+
* @requiresAI
|
|
310
|
+
*/
|
|
311
|
+
export declare class AIGatewayConfigurationLoaderV2InboundPolicy extends InboundPolicy<AIGatewayConfigurationLoaderV2InboundPolicyOptions> {
|
|
312
|
+
#private;
|
|
313
|
+
static readonly policyType = "ai-gateway-configuration-loader-v2";
|
|
314
|
+
constructor(
|
|
315
|
+
options: AIGatewayConfigurationLoaderV2InboundPolicyOptions,
|
|
316
|
+
policyName: string
|
|
317
|
+
);
|
|
318
|
+
handler(
|
|
319
|
+
request: ZuploRequest,
|
|
320
|
+
context: ZuploContext
|
|
321
|
+
): Promise<ZuploRequest | Response>;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Options for loading each application's AI Gateway configuration into the request-scoped channel.
|
|
326
|
+
* @public
|
|
327
|
+
*/
|
|
328
|
+
export declare interface AIGatewayConfigurationLoaderV2InboundPolicyOptions {
|
|
329
|
+
/**
|
|
330
|
+
* The time to cache app configurations loaded by app_id. Higher values decrease latency. Cached results remain valid until the cache expires even if the configuration changes in the portal. When ai-gateway-auth-v2-inbound already loaded the configuration for the request, this cache is not used.
|
|
331
|
+
*/
|
|
332
|
+
cacheTtlSeconds?: number;
|
|
333
|
+
}
|
|
334
|
+
|
|
291
335
|
/**
|
|
292
336
|
* Adds failure and quota fallbacks to an existing AI Gateway model selection.
|
|
293
337
|
*
|
|
@@ -1109,6 +1153,12 @@ export declare interface AiUsage {
|
|
|
1109
1153
|
* For streaming responses, it uses a transform stream that can block
|
|
1110
1154
|
* content mid-stream if harmful content is detected.
|
|
1111
1155
|
*
|
|
1156
|
+
* Detect-call failures (invalid credentials, rate limits, outages) fail closed
|
|
1157
|
+
* by default, returning a 502 in the route's native error format; set
|
|
1158
|
+
* `onError: "allow"` in the app configuration (or in the policy options, which
|
|
1159
|
+
* the app configuration overrides) to fail open and prioritize availability
|
|
1160
|
+
* over inspection.
|
|
1161
|
+
*
|
|
1112
1162
|
* @param request - The ZuploRequest
|
|
1113
1163
|
* @param context - The ZuploContext
|
|
1114
1164
|
* @param options - The policy options set in policies.json
|
|
@@ -1118,7 +1168,7 @@ export declare interface AiUsage {
|
|
|
1118
1168
|
export declare function AkamaiAIFirewallInboundPolicy(
|
|
1119
1169
|
request: ZuploRequest,
|
|
1120
1170
|
context: ZuploContext,
|
|
1121
|
-
|
|
1171
|
+
options: AkamaiAIFirewallPolicyOptions,
|
|
1122
1172
|
_policyName: string
|
|
1123
1173
|
): Promise<ZuploRequest | Response>;
|
|
1124
1174
|
|
|
@@ -1131,6 +1181,7 @@ export declare interface AkamaiAIFirewallPolicyOptions {
|
|
|
1131
1181
|
"api-key": APIKey;
|
|
1132
1182
|
applicationId?: ApplicationID;
|
|
1133
1183
|
streamingAccumulation?: StreamingAccumulationSettings;
|
|
1184
|
+
onError?: OnFirewallError;
|
|
1134
1185
|
}
|
|
1135
1186
|
|
|
1136
1187
|
/**
|
|
@@ -1146,9 +1197,10 @@ export declare interface AkamaiAIFirewallPolicyOptions {
|
|
|
1146
1197
|
* `inbound[]` chain is what enables it.
|
|
1147
1198
|
*
|
|
1148
1199
|
* Options are validated at request time and invalid options fail closed with a
|
|
1149
|
-
* ConfigurationError
|
|
1150
|
-
*
|
|
1151
|
-
*
|
|
1200
|
+
* ConfigurationError. Detect-call failures (invalid credentials, rate limits,
|
|
1201
|
+
* outages) also fail closed by default, returning a 502 in the route's native
|
|
1202
|
+
* error format; set `onError: "allow"` to fail open and prioritize
|
|
1203
|
+
* availability over inspection.
|
|
1152
1204
|
*
|
|
1153
1205
|
* For streaming responses it uses a transform stream that can block content
|
|
1154
1206
|
* mid-stream if harmful content is detected.
|
|
@@ -1177,6 +1229,7 @@ export declare interface AkamaiAIFirewallV2PolicyOptions {
|
|
|
1177
1229
|
streamingAccumulation?: StreamingAccumulationSettings_2;
|
|
1178
1230
|
endpoints?: ApplicableEndpoints_2;
|
|
1179
1231
|
onUnknownShape?: OnUnknownShape_2;
|
|
1232
|
+
onError?: OnFirewallError_2;
|
|
1180
1233
|
}
|
|
1181
1234
|
|
|
1182
1235
|
/**
|
|
@@ -10519,6 +10572,18 @@ export declare interface OktaJwtInboundPolicyOptions {
|
|
|
10519
10572
|
oAuthResourceMetadataEnabled?: boolean;
|
|
10520
10573
|
}
|
|
10521
10574
|
|
|
10575
|
+
/**
|
|
10576
|
+
* What to do when the Akamai detect call itself fails (invalid API key, rate limit, outage). 'block' (the default) fails closed and returns a 502 so unverified content is never served; 'allow' fails open and lets the request through without inspection. An onError value in the AI Gateway app configuration takes precedence over this option.
|
|
10577
|
+
* @public
|
|
10578
|
+
*/
|
|
10579
|
+
declare type OnFirewallError = "block" | "allow";
|
|
10580
|
+
|
|
10581
|
+
/**
|
|
10582
|
+
* What to do when the Akamai detect call itself fails (invalid API key, rate limit, outage). 'block' (the default) fails closed and returns a 502 so unverified content is never served; 'allow' fails open and lets the request through without inspection.
|
|
10583
|
+
* @public
|
|
10584
|
+
*/
|
|
10585
|
+
declare type OnFirewallError_2 = "block" | "allow";
|
|
10586
|
+
|
|
10522
10587
|
/**
|
|
10523
10588
|
* @public
|
|
10524
10589
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.8",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@opentelemetry/api": "1.9.0",
|
|
29
29
|
"@opentelemetry/api-logs": "0.220.0",
|
|
30
30
|
"@swc/core": "1.10.18",
|
|
31
|
-
"@zuplo/core": "7.1.
|
|
31
|
+
"@zuplo/core": "7.1.8",
|
|
32
32
|
"@zuplo/editor": "1.0.31094607111",
|
|
33
|
-
"@zuplo/openapi-tools": "7.1.
|
|
34
|
-
"@zuplo/runtime": "7.1.
|
|
33
|
+
"@zuplo/openapi-tools": "7.1.8",
|
|
34
|
+
"@zuplo/runtime": "7.1.8",
|
|
35
35
|
"chalk": "5.4.1",
|
|
36
36
|
"chokidar": "3.5.3",
|
|
37
37
|
"cookie": "1.0.2",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"workerd": "1.20241230.0",
|
|
63
63
|
"yargs": "17.7.2",
|
|
64
64
|
"zod": "4.4.3",
|
|
65
|
-
"@zuplo/graphql": "7.1.
|
|
66
|
-
"@zuplo/otel": "7.1.
|
|
65
|
+
"@zuplo/graphql": "7.1.8",
|
|
66
|
+
"@zuplo/otel": "7.1.8"
|
|
67
67
|
},
|
|
68
68
|
"bundleDependencies": [
|
|
69
69
|
"@inquirer/prompts",
|