@zuplo/cli 7.11.1 → 7.11.3
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 +80 -80
- package/node_modules/@zuplo/core/index.minified.js +85 -85
- 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-RHU3Z7DA.js → chunk-TPYCFLC7.js} +102 -102
- package/node_modules/@zuplo/runtime/out/esm/chunk-TPYCFLC7.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 +28 -19
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +11 -11
- package/node_modules/@zuplo/runtime/out/esm/chunk-RHU3Z7DA.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-RHU3Z7DA.js.LEGAL.txt → chunk-TPYCFLC7.js.LEGAL.txt} +0 -0
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{E as p,J as c,M as u}from"../chunk-
|
|
25
|
+
import{E as p,J as c,M as u}from"../chunk-TPYCFLC7.js";import"../chunk-NUVXDVLJ.js";import{a as d}from"../chunk-QGAJTUPE.js";import"../chunk-A3QGJZO7.js";import"../chunk-CDEAY3VY.js";import{aa as i}from"../chunk-LVSZ3WTO.js";import{a as o}from"../chunk-TYV53J3B.js";function w(l={request:new Request("https://api.example.com")}){let e=[];function t(s){e.push(Promise.resolve(s))}return o(t,"waitUntil"),{context:new a({event:{waitUntil:t},route:l.route,originalRequest:l.request}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(w,"createMockContext");var g={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},a=class extends EventTarget{static{o(this,"MockZuploContext")}#e;#t;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=g,parentContext:n,originalRequest:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:i.console.info,log:i.console.log,debug:i.console.debug,warn:i.console.warn,error:i.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=n,this.#e=e,this.#t=r,this.analyticsContext=new c(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,n){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")}addPreRequestHandler(e,t){let n;try{n=u.getContextExtensions(this)}catch{n=u.initialize(this,new d(this.#t??new Request("https://api.example.com")))}n.preRequestPhase??="active",p(this,n,e,t)}get preRequestHandlers(){let e;try{e=u.getContextExtensions(this)}catch{return[]}return(e.preRequestState?.entries??[]).map(t=>({policyName:t.policyName,name:t.name}))}addEventListener(e,t,n){let r=o(s=>{try{typeof t=="function"?t(s):t.handleEvent(s)}catch(m){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),m}},"wrapped");super.addEventListener(e,r,n)}};export{a as MockZuploContext,w as createMockContext};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -598,10 +598,11 @@ export declare interface AIGatewayLoadBalancingInboundPolicyOptions {
|
|
|
598
598
|
/* Excluded from this release type: AIGatewayMeterIncrements */
|
|
599
599
|
|
|
600
600
|
/**
|
|
601
|
-
* Meters AI Gateway usage
|
|
601
|
+
* Meters AI Gateway usage for the application.
|
|
602
602
|
*
|
|
603
603
|
* The authentication policy must run before this policy so the app
|
|
604
|
-
* configuration id is available for meter storage and analytics.
|
|
604
|
+
* configuration id is available for meter storage and analytics. Budgets are
|
|
605
|
+
* declared with `budgetRules` and enforced by the configuration executor.
|
|
605
606
|
*
|
|
606
607
|
* @title AI Gateway Metering
|
|
607
608
|
* @product ai-gateway
|
|
@@ -610,7 +611,7 @@ export declare interface AIGatewayLoadBalancingInboundPolicyOptions {
|
|
|
610
611
|
* @param context - The ZuploContext
|
|
611
612
|
* @param options - The policy options set in policies.json
|
|
612
613
|
* @param policyName - The name of the policy as set in policies.json
|
|
613
|
-
* @returns The request
|
|
614
|
+
* @returns The request
|
|
614
615
|
*/
|
|
615
616
|
declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGatewayMeteringInboundPolicyOptions> {
|
|
616
617
|
#private;
|
|
@@ -646,22 +647,17 @@ declare class AIGatewayMeteringInboundPolicy extends InboundPolicy<AIGatewayMete
|
|
|
646
647
|
context: ZuploContext
|
|
647
648
|
): Promise<ZuploRequest | Response>;
|
|
648
649
|
private resolveConfiguration;
|
|
649
|
-
private fetchCurrentMeters;
|
|
650
|
-
private checkWarnings;
|
|
651
|
-
private hasWarning;
|
|
652
|
-
private findViolation;
|
|
653
|
-
private createQuotaExceededResponse;
|
|
654
650
|
}
|
|
655
651
|
export { AIGatewayMeteringInboundPolicy };
|
|
656
652
|
export { AIGatewayMeteringInboundPolicy as AIGatewayMeteringV2InboundPolicy };
|
|
657
653
|
|
|
658
654
|
/**
|
|
659
|
-
* Options for metering AI Gateway usage and
|
|
655
|
+
* Options for metering AI Gateway usage and declaring budget rules.
|
|
660
656
|
* @public
|
|
661
657
|
*/
|
|
662
658
|
declare interface AIGatewayMeteringInboundPolicyOptions {
|
|
663
659
|
/**
|
|
664
|
-
*
|
|
660
|
+
* Fail the request instead of logging the error when recording usage with the metering service fails.
|
|
665
661
|
*/
|
|
666
662
|
throwOnFailure?: boolean;
|
|
667
663
|
/**
|
|
@@ -689,7 +685,7 @@ declare interface AIGatewayMeteringInboundPolicyOptions {
|
|
|
689
685
|
];
|
|
690
686
|
/**
|
|
691
687
|
* @deprecated
|
|
692
|
-
*
|
|
688
|
+
* Deprecated and not enforced. Declare budgets with budgetRules.
|
|
693
689
|
*/
|
|
694
690
|
limits?: {
|
|
695
691
|
costs?: QuotaLimit;
|
|
@@ -701,7 +697,10 @@ export { AIGatewayMeteringInboundPolicyOptions };
|
|
|
701
697
|
export { AIGatewayMeteringInboundPolicyOptions as AIGatewayMeteringV2InboundPolicyOptions };
|
|
702
698
|
|
|
703
699
|
/**
|
|
704
|
-
*
|
|
700
|
+
* Shape of the deprecated `options.limits` policy option. It is not enforced;
|
|
701
|
+
* declare budgets with `budgetRules`.
|
|
702
|
+
*
|
|
703
|
+
* @deprecated Use `budgetRules`.
|
|
705
704
|
*/
|
|
706
705
|
declare interface AIGatewayMeteringLimitOverrides {
|
|
707
706
|
costs?: AIGatewayMeteringMeterLimitOverrides;
|
|
@@ -3811,7 +3810,7 @@ declare type Claim = string;
|
|
|
3811
3810
|
declare type ClaimCheck = EqualsRule | InRule | StartsWithRule;
|
|
3812
3811
|
|
|
3813
3812
|
/**
|
|
3814
|
-
* Where the prompt is classified. Set `app.
|
|
3813
|
+
* Where the prompt is classified. Set `app.dialect` to select the API that classifier app exposes.
|
|
3815
3814
|
* @public
|
|
3816
3815
|
*/
|
|
3817
3816
|
declare interface Classifier {
|
|
@@ -3828,14 +3827,15 @@ declare interface ClassifierApp {
|
|
|
3828
3827
|
appId: ClassifierAppID_2;
|
|
3829
3828
|
model: ClassifierModel_2;
|
|
3830
3829
|
apiKey?: ClassifierAppAPIKey;
|
|
3831
|
-
|
|
3830
|
+
dialect?: ClassifierAppDialect;
|
|
3831
|
+
adapter?: ClassifierAppAdapterDeprecated;
|
|
3832
3832
|
}
|
|
3833
3833
|
|
|
3834
3834
|
/**
|
|
3835
|
-
*
|
|
3835
|
+
* **Deprecated**: use `classifier.app.dialect` instead. Still honored when `dialect` is not set; setting both is a configuration error.
|
|
3836
3836
|
* @public
|
|
3837
3837
|
*/
|
|
3838
|
-
declare type
|
|
3838
|
+
declare type ClassifierAppAdapterDeprecated =
|
|
3839
3839
|
| "chat-completions"
|
|
3840
3840
|
| "messages"
|
|
3841
3841
|
| "system-one";
|
|
@@ -3852,6 +3852,15 @@ declare type ClassifierAppAPIKey = string;
|
|
|
3852
3852
|
*/
|
|
3853
3853
|
declare type ClassifierAppAPIKeyDeprecated = string;
|
|
3854
3854
|
|
|
3855
|
+
/**
|
|
3856
|
+
* API contract exposed by the classifier app. `chat-completions` calls /v1/chat/completions; `messages` calls /v1/messages for Claude models that support structured outputs (`output_config.format`), such as `claude-haiku-4-5`, on a provider whose Messages endpoint accepts them (not Amazon Bedrock Mantle); `system-one` calls /v1/systemone for models such as Jev. The app owns provider credentials, pricing, metering and analytics.
|
|
3857
|
+
* @public
|
|
3858
|
+
*/
|
|
3859
|
+
declare type ClassifierAppDialect =
|
|
3860
|
+
| "chat-completions"
|
|
3861
|
+
| "messages"
|
|
3862
|
+
| "system-one";
|
|
3863
|
+
|
|
3855
3864
|
/**
|
|
3856
3865
|
* Run the classifier on another AI Gateway app instead of calling an external API directly. The gateway invokes that app in-process — no outbound HTTP hop — so the classifier inherits its provider credentials, model routing, fallbacks and quotas, and provider keys stay on one app. Give that app the Internal Only policy and `apiKey` is not needed at all. When set, `model` must name a routed model as `provider/model` and `baseUrl` must not be set. The target app must not itself run this policy: it would be asked to classify its own classification request, which is rejected as a configuration error rather than silently skipped. Omit to call `baseUrl` directly.
|
|
3857
3866
|
* @public
|
|
@@ -3877,7 +3886,7 @@ declare type ClassifierAppIDDeprecated = string;
|
|
|
3877
3886
|
declare type ClassifierModel = string;
|
|
3878
3887
|
|
|
3879
3888
|
/**
|
|
3880
|
-
* The model (`providerName/model`) the classifier app uses to evaluate the user's request. `providerName` is the name of the provider as configured on the classifier app, not a fixed vendor id. E.g. `openai/gpt-4o-mini`, `anthropic/claude-haiku-4-5` with the `messages`
|
|
3889
|
+
* The model (`providerName/model`) the classifier app uses to evaluate the user's request. `providerName` is the name of the provider as configured on the classifier app, not a fixed vendor id. E.g. `openai/gpt-4o-mini`, `anthropic/claude-haiku-4-5` with the `messages` dialect, or `jev/jev-latest` when the Jev provider is named `jev`.
|
|
3881
3890
|
* @public
|
|
3882
3891
|
*/
|
|
3883
3892
|
declare type ClassifierModel_2 = string;
|
|
@@ -3895,7 +3904,7 @@ declare type ClassifierModelDeprecated = string;
|
|
|
3895
3904
|
declare type ClassifierPrompt = string | [string, ...string[]];
|
|
3896
3905
|
|
|
3897
3906
|
/**
|
|
3898
|
-
* Prompt for classifier.app (its default `chat-completions`
|
|
3907
|
+
* Prompt for classifier.app (its default `chat-completions` dialect or the `messages` dialect, where it is sent as the system prompt) and classifier.chatCompletions. Omit to use the built-in prompt. classifier.app.dialect `system-one` and classifier.jev take no prompt; combining them with classifierPrompt is a configuration error.
|
|
3899
3908
|
* @public
|
|
3900
3909
|
*/
|
|
3901
3910
|
declare type ClassifierPrompt_2 = string | [string, ...string[]];
|
|
@@ -8337,7 +8346,7 @@ declare type JevModel = string;
|
|
|
8337
8346
|
|
|
8338
8347
|
/**
|
|
8339
8348
|
* @deprecated
|
|
8340
|
-
* Deprecated: use `classifier.app` with `
|
|
8349
|
+
* Deprecated: use `classifier.app` with `dialect` `system-one` instead. Classify with Jev, TypeSafe's classification model, by calling a System One API directly: TypeSafe's by default, or another host such as OpenRouter through `baseUrl`. Jev answers typed questions instead of generating text, so it takes no `classifierPrompt`.
|
|
8341
8350
|
* @public
|
|
8342
8351
|
*/
|
|
8343
8352
|
declare interface JevTypeSafe {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "7.11.
|
|
3
|
+
"version": "7.11.3",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@opentelemetry/api": "1.9.0",
|
|
32
32
|
"@opentelemetry/api-logs": "0.220.0",
|
|
33
33
|
"@swc/core": "1.10.18",
|
|
34
|
-
"@zuplo/core": "7.11.
|
|
34
|
+
"@zuplo/core": "7.11.3",
|
|
35
35
|
"@zuplo/editor": "1.0.33162667821",
|
|
36
|
-
"@zuplo/openapi-tools": "7.11.
|
|
37
|
-
"@zuplo/runtime": "7.11.
|
|
36
|
+
"@zuplo/openapi-tools": "7.11.3",
|
|
37
|
+
"@zuplo/runtime": "7.11.3",
|
|
38
38
|
"chalk": "5.4.1",
|
|
39
39
|
"chokidar": "3.5.3",
|
|
40
40
|
"cookie": "1.0.2",
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"workerd": "1.20261002.1",
|
|
66
66
|
"yargs": "17.7.2",
|
|
67
67
|
"zod": "4.4.3",
|
|
68
|
-
"@zuplo/graphql": "7.11.
|
|
69
|
-
"@zuplo/otel": "7.11.
|
|
68
|
+
"@zuplo/graphql": "7.11.3",
|
|
69
|
+
"@zuplo/otel": "7.11.3"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"@zuplo/lint-darwin-arm64": "7.11.
|
|
73
|
-
"@zuplo/lint-darwin-x64": "7.11.
|
|
74
|
-
"@zuplo/lint-linux-x64": "7.11.
|
|
75
|
-
"@zuplo/lint-linux-arm64": "7.11.
|
|
76
|
-
"@zuplo/lint-win32-x64": "7.11.
|
|
72
|
+
"@zuplo/lint-darwin-arm64": "7.11.3",
|
|
73
|
+
"@zuplo/lint-darwin-x64": "7.11.3",
|
|
74
|
+
"@zuplo/lint-linux-x64": "7.11.3",
|
|
75
|
+
"@zuplo/lint-linux-arm64": "7.11.3",
|
|
76
|
+
"@zuplo/lint-win32-x64": "7.11.3"
|
|
77
77
|
},
|
|
78
78
|
"bundleDependencies": [
|
|
79
79
|
"@inquirer/prompts",
|