zuplo 7.8.20 → 7.8.22
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.
|
@@ -114,11 +114,18 @@ are enforced, but no meter on that tab tracks them.
|
|
|
114
114
|
|
|
115
115
|
:::note{title="Budget rule periods follow the UTC calendar"}
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
Each limit counts all applicable usage since the start of its current period:
|
|
118
|
+
the top of the hour for hourly limits, 00:00 UTC for daily, Monday at 00:00 UTC
|
|
119
|
+
for weekly, and 00:00 UTC on the first of the month for monthly. Usage resets at
|
|
120
|
+
the next boundary. Custom anchors aren't configurable.
|
|
121
|
+
|
|
122
|
+
A limit added mid-period counts usage from the start of that period, not from
|
|
123
|
+
when you add it. For example, an app that has spent $150 since the first of the
|
|
124
|
+
month and gets a $100 monthly **Block** limit on the 20th has already exhausted
|
|
125
|
+
that limit, so its requests follow
|
|
126
|
+
[what happens when a limit is exceeded](#when-a-limit-is-exceeded) until the
|
|
127
|
+
next month begins. Changing a limit's amount, or removing a limit and adding it
|
|
128
|
+
again, doesn't reset the period's usage.
|
|
122
129
|
|
|
123
130
|
:::
|
|
124
131
|
|
|
@@ -167,10 +174,12 @@ hard cap.
|
|
|
167
174
|
|
|
168
175
|
:::caution
|
|
169
176
|
|
|
170
|
-
Changing an expression starts a new budget.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
177
|
+
Changing an expression starts a new budget. Usage recorded under the old
|
|
178
|
+
expression doesn't carry over, and the new expression can't count requests it
|
|
179
|
+
never evaluated, so each value's budget usually starts from zero. If you switch
|
|
180
|
+
back to an expression used earlier in the current period, the usage recorded for
|
|
181
|
+
it during that period still counts. Expressions are also case-sensitive:
|
|
182
|
+
`get("X-User")` and `get("x-user")` read the same header but budget separately.
|
|
174
183
|
|
|
175
184
|
:::
|
|
176
185
|
|
package/docs/cli/delete.mdx
CHANGED
|
@@ -5,7 +5,7 @@ sidebar_label: delete
|
|
|
5
5
|
|
|
6
6
|
<CliCommand
|
|
7
7
|
command="delete"
|
|
8
|
-
description="Deletes
|
|
8
|
+
description="Deletes a deployed Zuplo environment by URL or branch name"
|
|
9
9
|
options={[
|
|
10
10
|
{
|
|
11
11
|
"name": "url",
|
|
@@ -18,10 +18,10 @@ sidebar_label: delete
|
|
|
18
18
|
{
|
|
19
19
|
"name": "branch",
|
|
20
20
|
"type": "string",
|
|
21
|
-
"description": "The branch name to delete
|
|
21
|
+
"description": "The branch name of the environment to delete (the value passed to `zuplo deploy --branch`)",
|
|
22
22
|
"required": false,
|
|
23
23
|
"deprecated": false,
|
|
24
|
-
"hidden":
|
|
24
|
+
"hidden": false
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "project",
|
|
@@ -61,12 +61,16 @@ sidebar_label: delete
|
|
|
61
61
|
"$0 delete --url https://my-api-dev-123abc.zuplo.app",
|
|
62
62
|
"Delete a deployed environment by its URL"
|
|
63
63
|
],
|
|
64
|
+
[
|
|
65
|
+
"$0 delete --branch my-feature",
|
|
66
|
+
"Delete the environment deployed from the my-feature branch"
|
|
67
|
+
],
|
|
64
68
|
[
|
|
65
69
|
"$0 delete --url https://my-api-dev-123abc.zuplo.app --wait",
|
|
66
70
|
"Delete an environment and wait until the deletion is complete"
|
|
67
71
|
]
|
|
68
72
|
]}
|
|
69
|
-
usage="$0 delete --url <url> [options]"
|
|
73
|
+
usage="$0 delete (--url <url> | --branch <branch>) [options]"
|
|
70
74
|
>
|
|
71
75
|
|
|
72
76
|
</CliCommand>
|
package/docs/cli/deploy.mdx
CHANGED
|
@@ -33,10 +33,18 @@ sidebar_label: deploy
|
|
|
33
33
|
"hidden": true,
|
|
34
34
|
"normalize": true
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
"name": "branch",
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "The branch name to deploy the environment as, instead of the current git branch. Overrides --environment",
|
|
40
|
+
"required": false,
|
|
41
|
+
"deprecated": false,
|
|
42
|
+
"hidden": false
|
|
43
|
+
},
|
|
36
44
|
{
|
|
37
45
|
"name": "environment",
|
|
38
46
|
"type": "string",
|
|
39
|
-
"description": "The value to use for environment name, instead of the current branch name",
|
|
47
|
+
"description": "The value to use for environment name, instead of the current branch name (deprecated: use --branch)",
|
|
40
48
|
"required": false,
|
|
41
49
|
"deprecated": false,
|
|
42
50
|
"hidden": false
|
|
@@ -90,12 +98,12 @@ sidebar_label: deploy
|
|
|
90
98
|
"Deploy the current Git branch using the branch name as the environment name"
|
|
91
99
|
],
|
|
92
100
|
[
|
|
93
|
-
"$0 deploy --
|
|
94
|
-
"
|
|
101
|
+
"$0 deploy --branch my-feature",
|
|
102
|
+
"Deploy as the my-feature branch, e.g. from a CI job; delete it later with `zuplo delete --branch my-feature`"
|
|
95
103
|
],
|
|
96
104
|
[
|
|
97
|
-
"$0 deploy --account my-account --project my-project --
|
|
98
|
-
"Explicitly specify the account, project, and
|
|
105
|
+
"$0 deploy --account my-account --project my-project --branch my-feature",
|
|
106
|
+
"Explicitly specify the account, project, and branch"
|
|
99
107
|
]
|
|
100
108
|
]}
|
|
101
109
|
usage="$0 deploy [options]"
|
package/docs/policies/_index.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
| --- | --- | --- | --- |
|
|
5
5
|
| set-query-params-inbound | Add or Set Query Parameters | Adds or sets query parameters on the incoming request. | api-gateway |
|
|
6
6
|
| set-headers-inbound | Add or Set Request Headers | Adds or sets headers on the incoming request. | api-gateway |
|
|
7
|
-
| ai-gateway-auth-v2-inbound | AI Gateway Authentication | Authenticates requests to an AI Gateway endpoint with application API keys. Add this policy to an application's `inboundPolicyChain` to require a key for that app only, or place it on the route before the configuration executor to require a key for every application on the route. The policies that follow can read the authenticated application from `request.user` (`sub` is the application name, `data` its metadata), and the application's AI Gateway configuration takes effect for the request. Use `authHeader` and `authScheme` when clients send their app key somewhere other than the default `Authorization: Bearer` header. Enable `credentialPassthrough`, with the application key in a separate header, to forward the caller's `Authorization` header to the primary provider as its credential. When the matched route captures an `app_id` path parameter (platform catch-all `/:app_id/(.*)`), this policy also requires the stored configuration ID to match the URL (adding `config_` for `/a`). It returns 403 on mismatch. | ai-gateway |
|
|
7
|
+
| ai-gateway-auth-v2-inbound | AI Gateway Authentication | Authenticates requests to an AI Gateway endpoint with application API keys. Add this policy to an application's `inboundPolicyChain` to require a key for that app only, or place it on the route before the configuration executor to require a key for every application on the route. The policies that follow can read the authenticated application from `request.user` (`sub` is the application name, `data` its metadata), and the application's AI Gateway configuration takes effect for the request. Use `authHeader` and `authScheme` when clients send their app key somewhere other than the default `Authorization: Bearer` header. Enable `credentialPassthrough`, with the application key in a separate header, to forward the caller's `Authorization` header to the primary provider as its credential. When the matched route captures an `app_id` path parameter (platform catch-all `/:app_id/(.*)`), this policy also requires the stored configuration ID to match the URL (adding `config_` for `/a`). It returns 403 on mismatch. On a User App route (`/u/{app_id}`), only a personal API key issued for that User App authenticates. `request.user.sub` is then the key owner's user ID. An application API key on a User App route, or a personal API key on any other route, returns 403. Validation results are cached for `cacheTtlSeconds`, so a revoked key stops working within that window. | ai-gateway |
|
|
8
8
|
| ai-gateway-configuration-executor-v2-inbound | AI Gateway Configuration Executor | Loads the app configuration for the request (when auth or the configuration loader has not already), runs the inbound policy chain from that configuration, and enforces limits inherited from parent teams or the gateway root. Place this policy on AI Gateway routes after optional authentication and optional `ai-gateway-configuration-loader-v2-inbound`. When either of those already populated the app-configuration channel, this policy reuses it. Otherwise it loads the configuration with the route's `app_id` path parameter. Applications select from policies pre-declared by the gateway. Applications without a `inboundPolicyChain`, or with an empty chain, run no application-selected policies. Entry options replace the declaration's options as a complete object; omit them to inherit the declaration, including environment-backed credentials. Each occurrence receives a private deep copy of its entry options, so a policy mutating its options cannot corrupt the cached app configuration. | ai-gateway |
|
|
9
9
|
| ai-gateway-configuration-loader-v2-inbound | AI Gateway Configuration Loader | Loads the AI Gateway app configuration for the request into the request-scoped channel and does nothing else. Place this policy on AI Gateway routes before `ai-gateway-configuration-executor-v2-inbound` when you want configuration loading separated from chain execution. When `ai-gateway-auth-v2-inbound` already populated the channel, this policy reuses it. Otherwise it loads the configuration with the route's `app_id` path parameter. If this policy is omitted, the configuration executor still loads configuration itself before running the application chain. | ai-gateway |
|
|
10
10
|
| ai-gateway-fallback-model-v2-inbound | AI Gateway Fallback Model | Adds failure and quota fallbacks to an existing AI Gateway model selection. Place this policy after AI Gateway Model Filtering. It never creates a model selection, so a misplaced policy cannot bypass filtering. | ai-gateway |
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"requiresAI": true,
|
|
13
13
|
"policyType": "ai-gateway-auth-v2",
|
|
14
14
|
"products": ["ai-gateway"],
|
|
15
|
-
"description": "Authenticates requests to an AI Gateway endpoint with application API keys.\n\nAdd this policy to an application's `inboundPolicyChain` to require a key for that app only, or place it on the route before the configuration executor to require a key for every application on the route. The policies that follow can read the authenticated application from `request.user` (`sub` is the application name, `data` its metadata), and the application's AI Gateway configuration takes effect for the request. Use `authHeader` and `authScheme` when clients send their app key somewhere other than the default `Authorization: Bearer` header. Enable `credentialPassthrough`, with the application key in a separate header, to forward the caller's `Authorization` header to the primary provider as its credential.\n\nWhen the matched route captures an `app_id` path parameter (platform catch-all `/:app_id/(.*)`), this policy also requires the stored configuration ID to match the URL (adding `config_` for `/a`). It returns 403 on mismatch.",
|
|
15
|
+
"description": "Authenticates requests to an AI Gateway endpoint with application API keys.\n\nAdd this policy to an application's `inboundPolicyChain` to require a key for that app only, or place it on the route before the configuration executor to require a key for every application on the route. The policies that follow can read the authenticated application from `request.user` (`sub` is the application name, `data` its metadata), and the application's AI Gateway configuration takes effect for the request. Use `authHeader` and `authScheme` when clients send their app key somewhere other than the default `Authorization: Bearer` header. Enable `credentialPassthrough`, with the application key in a separate header, to forward the caller's `Authorization` header to the primary provider as its credential.\n\nWhen the matched route captures an `app_id` path parameter (platform catch-all `/:app_id/(.*)`), this policy also requires the stored configuration ID to match the URL (adding `config_` for `/a`). It returns 403 on mismatch.\n\nOn a User App route (`/u/{app_id}`), only a personal API key issued for that User App authenticates. `request.user.sub` is then the key owner's user ID. An application API key on a User App route, or a personal API key on any other route, returns 403. Validation results are cached for `cacheTtlSeconds`, so a revoked key stops working within that window.",
|
|
16
16
|
"deprecatedMessage": "",
|
|
17
17
|
"required": ["handler"],
|
|
18
18
|
"properties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zuplo",
|
|
3
|
-
"version": "7.8.
|
|
3
|
+
"version": "7.8.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The official Zuplo CLI for local development and platform management",
|
|
6
6
|
"homepage": "https://zuplo.com/docs/cli/overview",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"zuplo": "zuplo.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@zuplo/cli": "7.8.
|
|
36
|
-
"@zuplo/core": "7.8.
|
|
37
|
-
"@zuplo/runtime": "7.8.
|
|
38
|
-
"@zuplo/test": "7.8.
|
|
35
|
+
"@zuplo/cli": "7.8.22",
|
|
36
|
+
"@zuplo/core": "7.8.22",
|
|
37
|
+
"@zuplo/runtime": "7.8.22",
|
|
38
|
+
"@zuplo/test": "7.8.22"
|
|
39
39
|
}
|
|
40
40
|
}
|