@zuplo/runtime 6.74.2 → 6.74.7
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/{chunk-5BL2UFIS.js → chunk-2UG5Z76T.js} +2 -2
- package/out/esm/{chunk-N22BFR2U.js → chunk-7AMMYBFQ.js} +10 -10
- package/out/esm/chunk-7AMMYBFQ.js.map +1 -0
- package/out/esm/chunk-ELNSPW6X.js +370 -0
- package/out/esm/chunk-ELNSPW6X.js.map +1 -0
- package/out/esm/{chunk-SH5GYJN3.js → chunk-SMQPMERU.js} +3 -3
- package/out/esm/{chunk-WGENGK72.js → chunk-ZB7PAWBM.js} +2 -2
- package/out/esm/{chunk-WGENGK72.js.map → chunk-ZB7PAWBM.js.map} +1 -1
- package/out/esm/index.js +1 -1
- package/out/esm/index.js.map +1 -1
- package/out/esm/internal/index.js +1 -1
- package/out/esm/mcp-gateway/index.js +14 -13
- package/out/esm/mcp-gateway/index.js.LEGAL.txt +8 -0
- package/out/esm/mcp-gateway/index.js.map +1 -1
- package/out/esm/mocks/index.js +1 -1
- package/out/esm/sdks/aws/index.js +1 -1
- package/out/types/index.d.ts +21 -11
- package/package.json +2 -1
- package/out/esm/chunk-B5LJC45G.js +0 -370
- package/out/esm/chunk-B5LJC45G.js.map +0 -1
- package/out/esm/chunk-N22BFR2U.js.map +0 -1
- /package/out/esm/{chunk-5BL2UFIS.js.map → chunk-2UG5Z76T.js.map} +0 -0
- /package/out/esm/{chunk-N22BFR2U.js.LEGAL.txt → chunk-7AMMYBFQ.js.LEGAL.txt} +0 -0
- /package/out/esm/{chunk-B5LJC45G.js.LEGAL.txt → chunk-ELNSPW6X.js.LEGAL.txt} +0 -0
- /package/out/esm/{chunk-SH5GYJN3.js.map → chunk-SMQPMERU.js.map} +0 -0
package/out/esm/mocks/index.js
CHANGED
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{b as l}from"../chunk-
|
|
25
|
+
import{b as l}from"../chunk-2UG5Z76T.js";import{_ as n}from"../chunk-7AMMYBFQ.js";import{a as o}from"../chunk-TYV53J3B.js";function g(u={request:new Request("https://api.example.com")}){let e=[];function t(r){e.push(Promise.resolve(r))}return o(t,"waitUntil"),{context:new s({event:{waitUntil:t},route:u.route}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(g,"createMockContext");var a={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},s=class extends EventTarget{static{o(this,"MockZuploContext")}#e;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=a,parentContext:i}){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:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={ip:"203.0.113.7",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,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=i,this.#e=e,this.analyticsContext=new l(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,i){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,t,i){let d=o(r=>{try{typeof t=="function"?t(r):t.handleEvent(r)}catch(p){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),p}},"wrapped");super.addEventListener(e,d,i)}};export{s as MockZuploContext,g as createMockContext};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{
|
|
25
|
+
import{H as a,I as l,J as c,K as o,N as p,O as y,P as m}from"../../chunk-SMQPMERU.js";import"../../chunk-UKQQD2JN.js";import"../../chunk-7AMMYBFQ.js";import{a as i}from"../../chunk-TYV53J3B.js";async function g(r,e){let t=typeof e.credentials=="function"?await e.credentials():e.credentials,n=r.method,d=n!=="GET"&&n!=="HEAD"&&r.body!=null?await r.arrayBuffer():null,s=await new o({method:n,url:r.url,headers:r.headers,body:d,accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken,service:e.service,region:e.region,signQuery:e.signQuery}).sign();return new Request(s.url.toString(),{method:s.method,headers:s.headers,body:s.body})}i(g,"signRequest");export{c as AwsClient,o as AwsV4Signer,p as fromTemporaryCredentials,y as fromWebToken,m as fromZuploIdentity,l as getAwsCredentialProvider,a as setAwsCredentialProvider,g as signRequest};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
package/out/types/index.d.ts
CHANGED
|
@@ -245,14 +245,15 @@ export declare type AIGatewayCapability =
|
|
|
245
245
|
| "audio_transcriptions";
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
248
|
+
* Loads the app configuration for the request (when auth has not already) and
|
|
249
|
+
* runs the inbound policy chain from that configuration.
|
|
250
|
+
*
|
|
251
|
+
* Place this policy on AI Gateway v2 routes after optional authentication.
|
|
252
|
+
* When `ai-gateway-auth-v2-inbound` already populated the app-configuration
|
|
253
|
+
* channel, this policy reuses it. Otherwise it loads the configuration with
|
|
254
|
+
* the route's `app_id` path parameter. Applications select from policies
|
|
255
|
+
* pre-declared by the gateway. Applications without a `inboundPolicyChain`,
|
|
256
|
+
* or with an empty chain, run no application-selected policies.
|
|
256
257
|
* Entry options replace the declaration's options as a complete object; omit
|
|
257
258
|
* them to inherit the declaration, including environment-backed credentials.
|
|
258
259
|
* Each occurrence receives a private deep copy of its entry options, so a
|
|
@@ -277,10 +278,15 @@ export declare class AIGatewayConfigurationExecutorV2InboundPolicy extends Inbou
|
|
|
277
278
|
}
|
|
278
279
|
|
|
279
280
|
/**
|
|
280
|
-
*
|
|
281
|
+
* Options for loading each application's AI Gateway configuration and running its inbound policy chain.
|
|
281
282
|
* @public
|
|
282
283
|
*/
|
|
283
|
-
export declare interface AIGatewayConfigurationExecutorV2InboundPolicyOptions {
|
|
284
|
+
export declare interface AIGatewayConfigurationExecutorV2InboundPolicyOptions {
|
|
285
|
+
/**
|
|
286
|
+
* 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.
|
|
287
|
+
*/
|
|
288
|
+
cacheTtlSeconds?: number;
|
|
289
|
+
}
|
|
284
290
|
|
|
285
291
|
/**
|
|
286
292
|
* Adds failure and quota fallbacks to an existing AI Gateway model selection.
|
|
@@ -488,7 +494,10 @@ export declare interface AIGatewayMeteringInboundPolicyOptions {
|
|
|
488
494
|
}
|
|
489
495
|
|
|
490
496
|
/**
|
|
491
|
-
* Meters AI Gateway v2 usage and enforces
|
|
497
|
+
* Meters AI Gateway v2 usage and enforces app and ancestor usage limits.
|
|
498
|
+
*
|
|
499
|
+
* Limits configured on parent teams or the bucket root are enforced through a
|
|
500
|
+
* server-side hierarchical check.
|
|
492
501
|
*
|
|
493
502
|
* The authentication policy must run before this policy so the app
|
|
494
503
|
* configuration id is available for meter storage and analytics.
|
|
@@ -557,6 +566,7 @@ export declare class AIGatewayMeteringV2InboundPolicy extends InboundPolicy<AIGa
|
|
|
557
566
|
): Promise<ZuploRequest | Response>;
|
|
558
567
|
private resolveConfiguration;
|
|
559
568
|
private fetchCurrentMeters;
|
|
569
|
+
private checkHierarchicalViolation;
|
|
560
570
|
private checkWarnings;
|
|
561
571
|
private hasWarning;
|
|
562
572
|
private findViolation;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.74.
|
|
4
|
+
"version": "6.74.7",
|
|
5
5
|
"repository": "https://github.com/zuplo/zuplo",
|
|
6
6
|
"author": "Zuplo, Inc.",
|
|
7
7
|
"exports": {
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@cfworker/json-schema": "4.1.1",
|
|
48
|
+
"@modelcontextprotocol/client": "^2.0.0",
|
|
48
49
|
"@modelcontextprotocol/core": "^2.0.0",
|
|
49
50
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
50
51
|
"@modelcontextprotocol/server": "^2.0.0",
|