zuplo 7.14.5 → 7.14.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/docs/ai-gateway/cookbooks/data-residency.mdx +259 -0
- package/docs/ai-gateway/fallback.mdx +6 -4
- package/docs/ai-gateway/guardrails.mdx +283 -0
- package/docs/ai-gateway/observability/analytics.mdx +121 -0
- package/docs/ai-gateway/observability/data-handling.mdx +120 -0
- package/docs/ai-gateway/observability/tracing.mdx +203 -0
- package/docs/ai-gateway/overview.mdx +6 -4
- package/docs/ai-gateway/policies/overview.mdx +4 -0
- package/docs/ai-gateway/policy-chains.mdx +10 -3
- package/docs/ai-gateway/routing.mdx +277 -0
- package/docs/analytics/overview.md +3 -0
- package/docs/analytics/tabs/cache.md +89 -0
- package/docs/articles/connect-to-aws-alb-with-mtls.mdx +23 -0
- package/docs/articles/deployments-and-rollbacks.mdx +93 -0
- package/docs/articles/proxy-openai-realtime-api.mdx +247 -0
- package/docs/caching/gateway-caching.mdx +2 -1
- package/docs/caching/semantic-caching.mdx +133 -0
- package/docs/cli/lint.mdx +13 -0
- package/docs/cli/variable-delete.mdx +66 -0
- package/docs/concepts/source-control-and-deployment.mdx +6 -0
- package/docs/concepts/upstream-credentials.mdx +2 -1
- package/docs/guides/backend-failover.mdx +117 -0
- package/docs/guides/blue-green-deployments.mdx +199 -0
- package/docs/handlers/websocket-pipeline-handler.mdx +94 -0
- package/docs/mcp-server/authorize-tool-calls.mdx +284 -0
- package/docs/mcp-server/overview.mdx +3 -0
- package/docs/policies/mcp-capability-filter-inbound/doc.md +101 -1
- package/docs/policies/semantic-cache-inbound/doc.md +6 -5
- package/docs/policies/semantic-cache-inbound/schema.json +4 -4
- package/package.json +5 -5
|
@@ -28,6 +28,19 @@ answers a capability that does not exist, so a client cannot tell the two apart:
|
|
|
28
28
|
| `completion/complete` of a hidden reference | `-32602`, `Prompt "<name>" not found` or `Resource template "<uri>" not found` |
|
|
29
29
|
| Any of these without a string `name` or `uri` | `-32602`, for example `Invalid params for tools/call: params.name must be a string` |
|
|
30
30
|
|
|
31
|
+
With the `mcpGatewaySpecCompliance` compatibility flag (on from 2026-11-06), a
|
|
32
|
+
2025-era request for a hidden target first gets the checks the server handler
|
|
33
|
+
makes before it looks at any target, in the same order, so it still answers as
|
|
34
|
+
an absent target would: `406` for an `Accept` without `application/json`, `415`
|
|
35
|
+
for a JSON-like `Content-Type` other than `application/json` (a `Content-Type`
|
|
36
|
+
that is not JSON at all gets the problem+json `415` below, for every target),
|
|
37
|
+
`400` `-32600` for a message the MCP schema refuses (a `params._meta` that is
|
|
38
|
+
not an object), `400` `-32600` for an `initialize` batched with other messages,
|
|
39
|
+
`400` for an `MCP-Protocol-Version` the server handler does not serve (it serves
|
|
40
|
+
`2025-11-25`, `2025-06-18`, `2025-03-26`, `2024-11-05` and `2024-10-07`), each
|
|
41
|
+
in the handler's words, then `-32602` for a mistyped `arguments`. A `ping` in a
|
|
42
|
+
refused 2025-03-26 batch gets an empty result.
|
|
43
|
+
|
|
31
44
|
A method the policy checks or filters spelled another way, in another case or
|
|
32
45
|
with surrounding spaces (`Tools/Call`, ` tools/list`), is answered `-32601`
|
|
33
46
|
(`Method not found`): it is no MCP method, and an upstream that matched it
|
|
@@ -227,7 +240,7 @@ The policy fails closed. It never forwards something it could not check:
|
|
|
227
240
|
|
|
228
241
|
| Case | Result |
|
|
229
242
|
| ------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
|
|
230
|
-
| Body is not JSON (`Content-Type
|
|
243
|
+
| Body is not JSON (no `Content-Type`, or one without `json`), on any HTTP method, for every target | `415` problem+json, not forwarded |
|
|
231
244
|
| Body over 10 MiB | `413` problem+json, not forwarded |
|
|
232
245
|
| Body is JSON-typed but does not parse, or cannot be read (the upload failed) | `400`, `-32700`, not forwarded |
|
|
233
246
|
| Body is JSON but not a JSON-RPC message | `400`, `-32600` (its `id` when valid) |
|
|
@@ -361,3 +374,90 @@ and for each other request a `-32603` that says it was not forwarded because
|
|
|
361
374
|
another request in its batch was refused. Notifications in the batch get
|
|
362
375
|
nothing. On protocol version 2025-06-18 and later, which have no batches, the
|
|
363
376
|
answer is one `400` with `-32600` and no `id`.
|
|
377
|
+
|
|
378
|
+
## MCP 2026-07-28 requests
|
|
379
|
+
|
|
380
|
+
With the `mcpProtocolVersion20260728` compatibility flag on, the policy handles
|
|
381
|
+
a 2026-07-28 request as that revision requires. A request is a 2026-07-28
|
|
382
|
+
request when its `MCP-Protocol-Version` header or its
|
|
383
|
+
`params._meta["io.modelcontextprotocol/protocolVersion"]` names `2026-07-28` or
|
|
384
|
+
later; a batch never is. Requests from earlier clients keep the behavior above,
|
|
385
|
+
byte for byte, with the flag on or off. With the flag off, a 2026-07-28 request
|
|
386
|
+
gets the behavior above too.
|
|
387
|
+
|
|
388
|
+
| Case | Result |
|
|
389
|
+
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
|
|
390
|
+
| `MCP-Protocol-Version`, `Mcp-Method` or `Mcp-Name` disagrees with the body | HTTP `400`, JSON-RPC `-32020`, not forwarded |
|
|
391
|
+
| `tools/call`, `prompts/get`, `resources/read` or `completion/complete` for a hidden target | The MCP SDK server's not-found error (`-32602`), below |
|
|
392
|
+
| A method the policy filters, spelled in another case or with spaces (`Tools/Call`) | HTTP `404`, JSON-RPC `-32601`, not forwarded |
|
|
393
|
+
| A list on a route with `accessControl` | `cacheScope` set to `"private"`; `ttlMs` unchanged |
|
|
394
|
+
| A `resources/read` result on a route whose `accessControl` covers `resources` or `resourceTemplates` | `cacheScope` set to `"private"`; `ttlMs` unchanged |
|
|
395
|
+
| `notifications/resources/updated` for a URI `resources/read` would refuse, on a stream the policy filters | Event dropped |
|
|
396
|
+
| `resultType: "input_required"` or `"task"`, and any `structuredContent`, on a `tools/call` or `prompts/get` | Passed through unchanged |
|
|
397
|
+
| `resultType: "input_required"` or `"task"` on a `resources/read` | Passed through unchanged (no `cacheScope` added) |
|
|
398
|
+
|
|
399
|
+
A list or `resources/read` result is marked `"private"` whenever the route has
|
|
400
|
+
`accessControl` (mode `rolesAndGroups` or `function`), even for a caller the
|
|
401
|
+
resolver leaves unrestricted, so a shared cache never serves one caller's
|
|
402
|
+
results to another. With only the static allowlist, every caller sees the same
|
|
403
|
+
results, so the upstream's `cacheScope` is kept.
|
|
404
|
+
|
|
405
|
+
The SDK server's not-found words, below, are used only when the
|
|
406
|
+
`MCP-Protocol-Version` header names 2026-07-28 or later. Before it answers a
|
|
407
|
+
hidden target on a 2026-07-28 request, the policy runs the checks the MCP Server
|
|
408
|
+
handler runs before it looks up a target, and answers with the first that fails:
|
|
409
|
+
an `Accept` that can't take JSON or a non-JSON `Content-Type` (406 or 415), a
|
|
410
|
+
batch (400 `-32600`), a malformed `_meta` envelope, a revision the server does
|
|
411
|
+
not serve (`-32022`), a missing `MCP-Protocol-Version`, `Mcp-Method` or
|
|
412
|
+
`Mcp-Name` header (`-32020`), each with HTTP 400, and then missing or mistyped
|
|
413
|
+
params (`-32602`). A request that names 2026-07-28 only in `_meta` is missing
|
|
414
|
+
its required header, so it gets that `-32020`, as it does from the server. A
|
|
415
|
+
hidden target then looks the same as an absent one.
|
|
416
|
+
|
|
417
|
+
The policy filters the replies to list requests, `subscriptions/listen` and,
|
|
418
|
+
with `accessControl` covering resources, `resources/read`. Other replies, such
|
|
419
|
+
as a `tools/call` stream, are relayed unchanged.
|
|
420
|
+
|
|
421
|
+
### `subscriptions/listen`
|
|
422
|
+
|
|
423
|
+
`subscriptions/listen` exists only in 2026-07-28, so with the flag on the policy
|
|
424
|
+
handles every `subscriptions/listen`, even one that names an earlier version or
|
|
425
|
+
none, while `resources` or `resourceTemplates` is configured:
|
|
426
|
+
|
|
427
|
+
| Case | Result |
|
|
428
|
+
| ------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
429
|
+
| `resourceSubscriptions` names a hidden URI | Hidden URIs removed before the request is forwarded |
|
|
430
|
+
| `notifications/subscriptions/acknowledged` lists a hidden URI | Hidden URIs removed |
|
|
431
|
+
| `notifications/resources/updated` for a hidden URI | Event dropped |
|
|
432
|
+
| The method spelled in another case or with spaces (`Subscriptions/Listen`) | JSON-RPC `-32601`, not forwarded |
|
|
433
|
+
| `params` spells `notifications`, or `params.notifications` spells `resourceSubscriptions`, in another case or twice | HTTP `400`, JSON-RPC `-32600`, not forwarded |
|
|
434
|
+
| The `accessControl` resolver throws | JSON-RPC `-32603`, not forwarded |
|
|
435
|
+
|
|
436
|
+
The `-32601` is HTTP `404` on a 2026-07-28 request and `200` otherwise. With the
|
|
437
|
+
flag off, or with neither `resources` nor `resourceTemplates` configured,
|
|
438
|
+
`subscriptions/listen` is forwarded and its stream relayed unchanged.
|
|
439
|
+
|
|
440
|
+
Only headers that are present are compared; the upstream decides whether a
|
|
441
|
+
missing one is an error. A hidden target with a mismatched header gets the
|
|
442
|
+
`-32020` error, as it would from the upstream.
|
|
443
|
+
|
|
444
|
+
A hidden target is answered as the TypeScript MCP SDK server answers a target it
|
|
445
|
+
does not have. The name or URI is echoed as sent:
|
|
446
|
+
|
|
447
|
+
| Request | Answer |
|
|
448
|
+
| -------------------------------------------- | -------------------------------------------------------------------------- |
|
|
449
|
+
| `tools/call` of a hidden tool | `-32602`, `Tool <name> not found` |
|
|
450
|
+
| `prompts/get` of a hidden prompt | `-32602`, `Prompt <name> not found` |
|
|
451
|
+
| `resources/read`, `subscribe`, `unsubscribe` | `-32602`, `Resource not found: <uri>`, with `data.uri` |
|
|
452
|
+
| `completion/complete` of a hidden reference | `-32602`, `Prompt <name> not found` or `Resource template <uri> not found` |
|
|
453
|
+
|
|
454
|
+
```json
|
|
455
|
+
{
|
|
456
|
+
"jsonrpc": "2.0",
|
|
457
|
+
"id": 2,
|
|
458
|
+
"error": { "code": -32602, "message": "Tool hidden_tool not found" }
|
|
459
|
+
}
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
A retry after `input_required` is a new `tools/call` with the same name, so a
|
|
463
|
+
hidden tool stays unreachable through it.
|
|
@@ -25,10 +25,11 @@ The policy supports two modes for cache key generation:
|
|
|
25
25
|
### Key Parameters
|
|
26
26
|
|
|
27
27
|
- **semanticTolerance** (optional): A number between 0 and 1 that controls how
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
far apart cache keys can be and still match. A cached entry matches when its
|
|
29
|
+
similarity is at least `1 - semanticTolerance`. Default is 0.2, which requires
|
|
30
|
+
a similarity of at least 0.8. Lower values (closer to 0) require closer
|
|
31
|
+
similarity, while higher values allow more flexible matching. Can be
|
|
32
|
+
overridden by custom functions when using `cacheBy: "function"`.
|
|
32
33
|
- **expirationSecondsTtl** (optional): Cache expiration time in seconds. Default
|
|
33
34
|
is 3600 (1 hour). Can be overridden by custom functions when using
|
|
34
35
|
`cacheBy: "function"`.
|
|
@@ -45,7 +46,7 @@ with the following structure:
|
|
|
45
46
|
```typescript
|
|
46
47
|
{
|
|
47
48
|
cacheKey: string; // Required: The cache key for semantic matching
|
|
48
|
-
semanticTolerance?: number; // Optional: Override the policy's
|
|
49
|
+
semanticTolerance?: number; // Optional: Override the policy's tolerance (lower = stricter)
|
|
49
50
|
expirationSecondsTtl?: number; // Optional: Override the policy's cache expiration time
|
|
50
51
|
}
|
|
51
52
|
```
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
{
|
|
141
141
|
"cacheBy": "propertyPath",
|
|
142
142
|
"cacheByPropertyPath": ".userId",
|
|
143
|
-
"semanticTolerance": 0.
|
|
143
|
+
"semanticTolerance": 0.2,
|
|
144
144
|
"expirationSecondsTtl": 3600,
|
|
145
145
|
"namespace": "user-cache"
|
|
146
146
|
},
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"export": "cacheKeyFunction",
|
|
151
151
|
"module": "$import(./modules/cache-key)"
|
|
152
152
|
},
|
|
153
|
-
"semanticTolerance": 0.
|
|
153
|
+
"semanticTolerance": 0.1,
|
|
154
154
|
"expirationSecondsTtl": 1800,
|
|
155
155
|
"namespace": "api-cache"
|
|
156
156
|
}
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"options": {
|
|
165
165
|
"cacheBy": "propertyPath",
|
|
166
166
|
"cacheByPropertyPath": ".userId",
|
|
167
|
-
"semanticTolerance": 0.
|
|
167
|
+
"semanticTolerance": 0.2,
|
|
168
168
|
"expirationSecondsTtl": 3600,
|
|
169
169
|
"namespace": "user-cache"
|
|
170
170
|
}
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"export": "cacheKeyFunction",
|
|
179
179
|
"module": "$import(./modules/cache-key)"
|
|
180
180
|
},
|
|
181
|
-
"semanticTolerance": 0.
|
|
181
|
+
"semanticTolerance": 0.1,
|
|
182
182
|
"expirationSecondsTtl": 1800,
|
|
183
183
|
"namespace": "api-cache"
|
|
184
184
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zuplo",
|
|
3
|
-
"version": "7.14.
|
|
3
|
+
"version": "7.14.8",
|
|
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.14.
|
|
36
|
-
"@zuplo/core": "7.14.
|
|
37
|
-
"@zuplo/runtime": "7.14.
|
|
38
|
-
"@zuplo/test": "7.14.
|
|
35
|
+
"@zuplo/cli": "7.14.8",
|
|
36
|
+
"@zuplo/core": "7.14.8",
|
|
37
|
+
"@zuplo/runtime": "7.14.8",
|
|
38
|
+
"@zuplo/test": "7.14.8"
|
|
39
39
|
}
|
|
40
40
|
}
|