@zuplo/runtime 6.60.26 → 6.60.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.
- package/out/esm/index.js +86 -84
- package/out/esm/index.js.map +1 -1
- package/out/types/index.d.ts +82 -0
- package/package.json +1 -1
package/out/types/index.d.ts
CHANGED
|
@@ -294,6 +294,42 @@ export declare function AIGatewayUsageTrackerPolicy(
|
|
|
294
294
|
_policyName: string
|
|
295
295
|
): Promise<Response>;
|
|
296
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Akamai AI Firewall Inbound Policy
|
|
299
|
+
* @title Akamai AI Firewall
|
|
300
|
+
* @hidden
|
|
301
|
+
*
|
|
302
|
+
* This policy integrates with Akamai's AI Firewall service to detect
|
|
303
|
+
* and block malicious AI inputs and outputs. It's self-contained and
|
|
304
|
+
* handles both streaming and non-streaming responses.
|
|
305
|
+
*
|
|
306
|
+
* For streaming responses, it uses a transform stream that can block
|
|
307
|
+
* content mid-stream if harmful content is detected.
|
|
308
|
+
*
|
|
309
|
+
* @param request - The ZuploRequest
|
|
310
|
+
* @param context - The ZuploContext
|
|
311
|
+
* @param options - The policy options set in policies.json
|
|
312
|
+
* @param policyName - The name of the policy as set in policies.json
|
|
313
|
+
* @returns A Request or a Response
|
|
314
|
+
*/
|
|
315
|
+
export declare function AkamaiAIFirewallInboundPolicy(
|
|
316
|
+
request: ZuploRequest,
|
|
317
|
+
context: ZuploContext,
|
|
318
|
+
_options: AkamaiAIFirewallPolicyOptions,
|
|
319
|
+
_policyName: string
|
|
320
|
+
): Promise<ZuploRequest | Response>;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* The options for the Akamai AI Firewall policy.
|
|
324
|
+
* @public
|
|
325
|
+
*/
|
|
326
|
+
export declare interface AkamaiAIFirewallPolicyOptions {
|
|
327
|
+
configurationId: ConfigurationID;
|
|
328
|
+
"api-key": APIKey;
|
|
329
|
+
applicationId?: ApplicationID;
|
|
330
|
+
streamingAccumulation?: StreamingAccumulationSettings;
|
|
331
|
+
}
|
|
332
|
+
|
|
297
333
|
/**
|
|
298
334
|
* Entry format for Akamai API Security logger
|
|
299
335
|
* @public
|
|
@@ -500,6 +536,12 @@ export declare interface ApiAuthKeyInboundPolicyOptions {
|
|
|
500
536
|
allowUnauthenticatedRequests?: boolean;
|
|
501
537
|
}
|
|
502
538
|
|
|
539
|
+
/**
|
|
540
|
+
* The API key for the AI Firewall.
|
|
541
|
+
* @public
|
|
542
|
+
*/
|
|
543
|
+
declare type APIKey = string;
|
|
544
|
+
|
|
503
545
|
/**
|
|
504
546
|
* Authenticates requests based on API Keys using Zuplo's built-in API key management.
|
|
505
547
|
* This policy validates API keys against Zuplo's key storage, caches results for performance,
|
|
@@ -644,6 +686,12 @@ declare interface APITokenCredentialConfig {
|
|
|
644
686
|
headerValuePrefix?: string;
|
|
645
687
|
}
|
|
646
688
|
|
|
689
|
+
/**
|
|
690
|
+
* The application ID to identify this usage of the AI Firewall (optional).
|
|
691
|
+
* @public
|
|
692
|
+
*/
|
|
693
|
+
declare type ApplicationID = string;
|
|
694
|
+
|
|
647
695
|
/**
|
|
648
696
|
* A list of attributes that will be included in the authorization request.
|
|
649
697
|
* @public
|
|
@@ -1690,6 +1738,12 @@ export declare interface ChangeMethodInboundPolicyOptions {
|
|
|
1690
1738
|
method: string;
|
|
1691
1739
|
}
|
|
1692
1740
|
|
|
1741
|
+
/**
|
|
1742
|
+
* Time interval in milliseconds for periodic checks (alternative to chunk count).
|
|
1743
|
+
* @public
|
|
1744
|
+
*/
|
|
1745
|
+
declare type CheckIntervalMs = number;
|
|
1746
|
+
|
|
1693
1747
|
/**
|
|
1694
1748
|
* Removes all headers from the incoming request except for those in the exclude list.
|
|
1695
1749
|
*
|
|
@@ -2104,6 +2158,12 @@ export declare class ConfigurationError extends RuntimeError {
|
|
|
2104
2158
|
constructor(message: string, options?: ErrorOptions);
|
|
2105
2159
|
}
|
|
2106
2160
|
|
|
2161
|
+
/**
|
|
2162
|
+
* The configuration ID of the AI Firewall.
|
|
2163
|
+
* @public
|
|
2164
|
+
*/
|
|
2165
|
+
declare type ConfigurationID = string;
|
|
2166
|
+
|
|
2107
2167
|
/* Excluded from this release type: ContentTypes */
|
|
2108
2168
|
|
|
2109
2169
|
/**
|
|
@@ -2513,6 +2573,12 @@ export declare class DynatraceMetricsPlugin extends MetricsPlugin {
|
|
|
2513
2573
|
static setContext(context: ZuploContext, data: DynatraceMetricsContext): void;
|
|
2514
2574
|
}
|
|
2515
2575
|
|
|
2576
|
+
/**
|
|
2577
|
+
* Enable accumulation and validation of streaming responses.
|
|
2578
|
+
* @public
|
|
2579
|
+
*/
|
|
2580
|
+
declare type EnableStreamingAccumulation = boolean;
|
|
2581
|
+
|
|
2516
2582
|
/**
|
|
2517
2583
|
* @beta
|
|
2518
2584
|
* Object exposing environment variables
|
|
@@ -2530,6 +2596,12 @@ export declare interface ErrorHandler {
|
|
|
2530
2596
|
): Response | Promise<Response>;
|
|
2531
2597
|
}
|
|
2532
2598
|
|
|
2599
|
+
/**
|
|
2600
|
+
* Number of SSE events to accumulate before checking with Akamai (default: 5).
|
|
2601
|
+
* @public
|
|
2602
|
+
*/
|
|
2603
|
+
declare type EventsInterval = number;
|
|
2604
|
+
|
|
2533
2605
|
declare const EventType: {
|
|
2534
2606
|
readonly MCP_TOOL_USAGE: "mcp_tool_usage";
|
|
2535
2607
|
readonly AI_GATEWAY_COST_SUM: "ai_gateway_cost_sum";
|
|
@@ -8302,6 +8374,16 @@ export declare class SplunkLoggingPlugin extends LogPlugin {
|
|
|
8302
8374
|
|
|
8303
8375
|
/* Excluded from this release type: StandardEnv */
|
|
8304
8376
|
|
|
8377
|
+
/**
|
|
8378
|
+
* Configuration for accumulating and validating streaming responses.
|
|
8379
|
+
* @public
|
|
8380
|
+
*/
|
|
8381
|
+
declare interface StreamingAccumulationSettings {
|
|
8382
|
+
enabled?: EnableStreamingAccumulation;
|
|
8383
|
+
eventsInterval?: EventsInterval;
|
|
8384
|
+
checkIntervalMs?: CheckIntervalMs;
|
|
8385
|
+
}
|
|
8386
|
+
|
|
8305
8387
|
/**
|
|
8306
8388
|
* A specialized zone cache for storing and retrieving ReadableStreams.
|
|
8307
8389
|
* Unlike regular ZoneCache which serializes to JSON, this cache stores raw stream data,
|