@zuplo/runtime 7.14.5 → 7.14.6
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-AEVCZW3D.js +26 -0
- package/out/esm/chunk-AEVCZW3D.js.map +1 -0
- package/out/esm/{chunk-C32OTSKW.js → chunk-G2O2ZIL3.js} +2 -2
- package/out/esm/chunk-JORDKCQ5.js +429 -0
- package/out/esm/chunk-JORDKCQ5.js.map +1 -0
- package/out/esm/{chunk-AENEWA54.js → chunk-LDA754KZ.js} +2 -2
- package/out/esm/chunk-VIH2ISEH.js +37 -0
- package/out/esm/{chunk-UFTMOJ7K.js.map → chunk-VIH2ISEH.js.map} +1 -1
- package/out/esm/index.js +1 -1
- package/out/esm/mcp/messages/index.js +1 -1
- package/out/esm/mcp-gateway/index.js +12 -12
- 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 +121 -8
- package/out/types/internal/index.d.ts +123 -10
- package/package.json +1 -1
- package/out/esm/chunk-7RNZS3GX.js +0 -26
- package/out/esm/chunk-7RNZS3GX.js.map +0 -1
- package/out/esm/chunk-UFTMOJ7K.js +0 -37
- package/out/esm/chunk-UGZSO3CK.js +0 -414
- package/out/esm/chunk-UGZSO3CK.js.map +0 -1
- /package/out/esm/{chunk-C32OTSKW.js.map → chunk-G2O2ZIL3.js.map} +0 -0
- /package/out/esm/{chunk-UGZSO3CK.js.LEGAL.txt → chunk-JORDKCQ5.js.LEGAL.txt} +0 -0
- /package/out/esm/{chunk-AENEWA54.js.map → chunk-LDA754KZ.js.map} +0 -0
- /package/out/esm/{chunk-UFTMOJ7K.js.LEGAL.txt → chunk-VIH2ISEH.js.LEGAL.txt} +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{G as p,M as c,Q as u}from"../chunk-
|
|
25
|
+
import{G as p,M as c,Q as u}from"../chunk-JORDKCQ5.js";import"../chunk-VP5Q3DEN.js";import{a as d}from"../chunk-AEVCZW3D.js";import"../chunk-A3QGJZO7.js";import"../chunk-G2O2ZIL3.js";import"../chunk-UKQQD2JN.js";import{aa as i}from"../chunk-VIH2ISEH.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
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
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-
|
|
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-G2O2ZIL3.js";import"../../chunk-UKQQD2JN.js";import"../../chunk-VIH2ISEH.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
|
@@ -4455,7 +4455,8 @@ declare interface CompatibilityFlags {
|
|
|
4455
4455
|
*/
|
|
4456
4456
|
treatBlankOptionalStringOptionsAsUnset: boolean;
|
|
4457
4457
|
/**
|
|
4458
|
-
* Whether the MCP Gateway
|
|
4458
|
+
* Whether the MCP Gateway and `mcpServerHandler` support MCP protocol
|
|
4459
|
+
* revision `2026-07-28`.
|
|
4459
4460
|
*
|
|
4460
4461
|
* MCP requests on `2025-11-25` and earlier get the same answers with or
|
|
4461
4462
|
* without this flag, with one exception: an `initialize` reply the upstream
|
|
@@ -4472,11 +4473,24 @@ declare interface CompatibilityFlags {
|
|
|
4472
4473
|
* reading it as `2026-07-28`. An upstream that answers only `server/discover`
|
|
4473
4474
|
* is reported as unavailable, and a caller that hasn't connected the
|
|
4474
4475
|
* upstream gets the `-32042` URL-elicitation error, which `2026-07-28`
|
|
4475
|
-
* clients can't act on.
|
|
4476
|
+
* clients can't act on. `mcpServerHandler` refuses a `2026-07-28`
|
|
4477
|
+
* `MCP-Protocol-Version` header with HTTP 400 and `-32000`.
|
|
4476
4478
|
*
|
|
4477
|
-
* After this flag: The MCP Gateway
|
|
4478
|
-
* revision requires:
|
|
4479
|
+
* After this flag: The MCP Gateway and `mcpServerHandler` handle
|
|
4480
|
+
* `2026-07-28` requests as that revision requires:
|
|
4479
4481
|
*
|
|
4482
|
+
* - `mcpServerHandler` serves a `2026-07-28` request: `server/discover`,
|
|
4483
|
+
* the per-request `_meta` envelope and its validation (`-32602`,
|
|
4484
|
+
* `-32020`, `-32022`), including the required `MCP-Protocol-Version`,
|
|
4485
|
+
* `Mcp-Method` and `Mcp-Name` headers,
|
|
4486
|
+
* HTTP `404` with `-32601` for the methods `2026-07-28` removed
|
|
4487
|
+
* (`initialize`, `ping`, `logging/setLevel`, `resources/subscribe`,
|
|
4488
|
+
* `resources/unsubscribe`), and `resultType`, `serverInfo` and
|
|
4489
|
+
* `ttlMs: 0` / `cacheScope: "private"` on its results. An unknown tool,
|
|
4490
|
+
* prompt or resource gets the MCP SDK's not-found error. The era comes
|
|
4491
|
+
* from the body, so a request that names `2026-07-28` only in
|
|
4492
|
+
* `params._meta`, with no header, gets HTTP `400` with `-32020`. The MCP
|
|
4493
|
+
* capability filter answers a hidden target with the same checks first.
|
|
4480
4494
|
* - Upstream readiness falls back to `server/discover` when `initialize` is
|
|
4481
4495
|
* refused with a JSON-RPC error.
|
|
4482
4496
|
* - `server/discover` gets the configured icon fallback, and the gateway
|
|
@@ -4488,10 +4502,18 @@ declare interface CompatibilityFlags {
|
|
|
4488
4502
|
* other event is relayed unchanged, and the stream is not buffered.
|
|
4489
4503
|
* - A caller that hasn't connected the upstream gets an `input_required`
|
|
4490
4504
|
* result with a URL-mode connect elicitation (or `-32021` when the client
|
|
4491
|
-
* didn't declare URL elicitation), not `-32042`.
|
|
4492
|
-
*
|
|
4493
|
-
*
|
|
4494
|
-
*
|
|
4505
|
+
* didn't declare URL elicitation), not `-32042`. Any other method, the
|
|
4506
|
+
* list methods included, gets `-32603` with the connect link in
|
|
4507
|
+
* `data.connectRequired`. Before the gateway answers such a request
|
|
4508
|
+
* itself, it refuses one a `2026-07-28` server would refuse (`-32602`,
|
|
4509
|
+
* `-32020` or `-32022`, HTTP 400), a request without a required
|
|
4510
|
+
* `MCP-Protocol-Version`, `Mcp-Method` or `Mcp-Name` header included, and
|
|
4511
|
+
* it accepts a notification with `202` and no body. Its own
|
|
4512
|
+
* `server/discover` answer lists `2026-07-28` and the 2025-era versions
|
|
4513
|
+
* the route relays through `initialize`.
|
|
4514
|
+
* - A retry's `requestState` with the gateway's `zuplo-connect.` prefix
|
|
4515
|
+
* that doesn't verify under this deployment's key (another Zuplo
|
|
4516
|
+
* gateway's, behind this one) is passed to the upstream, not refused.
|
|
4495
4517
|
* - The capability filter checks the `Mcp-Method` and `Mcp-Name` headers
|
|
4496
4518
|
* against the body (`-32020`), answers an unknown method spelling with
|
|
4497
4519
|
* HTTP `404`, marks lists and `resources/read` results on routes with
|
|
@@ -4548,6 +4570,97 @@ declare interface CompatibilityFlags {
|
|
|
4548
4570
|
* @compatibilityDate 2026-11-06
|
|
4549
4571
|
*/
|
|
4550
4572
|
rejectInvalidMcpResourceUris: boolean;
|
|
4573
|
+
/**
|
|
4574
|
+
* Whether the MCP Gateway follows the MCP transport, elicitation and
|
|
4575
|
+
* authorization rules for the answers it builds itself on `2025-11-25` and
|
|
4576
|
+
* earlier requests, and in its upstream readiness check.
|
|
4577
|
+
*
|
|
4578
|
+
* Before this flag:
|
|
4579
|
+
*
|
|
4580
|
+
* - A caller that hasn't connected the upstream gets a JSON-RPC error with
|
|
4581
|
+
* HTTP 200 for every message: `-32042` with a URL-mode elicitation when
|
|
4582
|
+
* the gateway has a connect URL, `-32600` when it doesn't. That includes
|
|
4583
|
+
* a notification or a JSON-RPC response (answered with an error that has
|
|
4584
|
+
* no `id`), an `initialize`, a client that never declared URL-mode
|
|
4585
|
+
* elicitation, and a client on a protocol version before `2025-11-25`,
|
|
4586
|
+
* which has no URL mode.
|
|
4587
|
+
* - When the upstream still answers 401 after the gateway refreshed its
|
|
4588
|
+
* credential (or the gateway could not retry), and when it answers 403
|
|
4589
|
+
* with a `WWW-Authenticate` challenge, the client gets the upstream's
|
|
4590
|
+
* response, `WWW-Authenticate` included. The challenge points at the
|
|
4591
|
+
* upstream's authorization server, and the client reads the 401 as its
|
|
4592
|
+
* own gateway token failing.
|
|
4593
|
+
* - The readiness check ends the upstream session it opened with
|
|
4594
|
+
* `MCP-Protocol-Version: 2025-11-25`, whatever version the upstream
|
|
4595
|
+
* negotiated.
|
|
4596
|
+
*
|
|
4597
|
+
* After this flag:
|
|
4598
|
+
*
|
|
4599
|
+
* - A request from a caller that hasn't connected the upstream is first
|
|
4600
|
+
* checked as `mcpServerHandler` checks it: a body that is not JSON (an
|
|
4601
|
+
* empty one included) gets HTTP `400` `-32700`, a message that is not
|
|
4602
|
+
* valid JSON-RPC `400` `-32600`, an `initialize` batched with other
|
|
4603
|
+
* messages `400` `-32600`, and an `MCP-Protocol-Version` the route does
|
|
4604
|
+
* not serve `400` `-32000` (a missing header is allowed; the route
|
|
4605
|
+
* serves its upstream's versions once the gateway has learned them). A
|
|
4606
|
+
* batch on `2025-06-18` or later is refused whole with `400` `-32600`.
|
|
4607
|
+
* - A valid notification or JSON-RPC response is accepted with `202` and
|
|
4608
|
+
* no body, and dropped. `ping` gets an empty result. A `2025-03-26`
|
|
4609
|
+
* batch is answered per member.
|
|
4610
|
+
* - The `-32042` URL-elicitation error is sent only to an `initialize` that
|
|
4611
|
+
* names `2025-11-25` (and not `2026-07-28` or later) and declares
|
|
4612
|
+
* `capabilities.elicitation.url`: the gateway keeps no session, so it
|
|
4613
|
+
* cannot know what a later request's client declared. Every other
|
|
4614
|
+
* connect-required answer is `-32603` with the connect link in
|
|
4615
|
+
* `data.connectRequired`, never `-32600`.
|
|
4616
|
+
* - On a request the token exchange policy sent with the gateway's own
|
|
4617
|
+
* upstream credential, an upstream 401 the refresh did not fix, or an
|
|
4618
|
+
* upstream 403 with a `WWW-Authenticate` challenge, is answered by the
|
|
4619
|
+
* gateway with JSON-RPC `-32603` (`data.upstreamStatus`) and no
|
|
4620
|
+
* `WWW-Authenticate`; a message without a request gets HTTP `502` with
|
|
4621
|
+
* the error and no id. A route without the policy relays the challenge.
|
|
4622
|
+
* - The readiness check ends the session with the version the upstream
|
|
4623
|
+
* negotiated in its `initialize` result.
|
|
4624
|
+
* - The MCP capability filter answers a 2025-era request for a hidden
|
|
4625
|
+
* target as `mcpServerHandler` answers an absent one: its `406`, `415`,
|
|
4626
|
+
* invalid-message and batched-`initialize` `400`s and unsupported-version
|
|
4627
|
+
* `400` first, then a mistyped `arguments` `-32602`, then the not-found.
|
|
4628
|
+
* - On a `2026-07-28` request (with `mcpProtocolVersion20260728`), a method
|
|
4629
|
+
* 2026-07-28 removed (`ping`, `logging/setLevel`, …) gets `404`
|
|
4630
|
+
* `-32601` from the gateway instead of the connect-required error.
|
|
4631
|
+
*
|
|
4632
|
+
* @compatibilityDate 2026-11-06
|
|
4633
|
+
*/
|
|
4634
|
+
mcpGatewaySpecCompliance: boolean;
|
|
4635
|
+
/**
|
|
4636
|
+
* Whether the MCP server handler checks the results and requests that MCP
|
|
4637
|
+
* 2025-11-25 constrains and the handler did not check.
|
|
4638
|
+
*
|
|
4639
|
+
* Before this flag:
|
|
4640
|
+
*
|
|
4641
|
+
* - `prompts/get` returns the prompt route's messages as the route sent
|
|
4642
|
+
* them, so a `role` other than `user` or `assistant` (such as
|
|
4643
|
+
* `"system"`) or an invalid content block reaches the client.
|
|
4644
|
+
* - A JSON-RPC batch (allowed on `2025-03-26` and earlier) whose answer has
|
|
4645
|
+
* one response gets that response as a bare object, not an array.
|
|
4646
|
+
* - A tool from the deprecated `options.files` whose `x-zuplo-mcp-tool`
|
|
4647
|
+
* name is blank is registered with the name `""`.
|
|
4648
|
+
*
|
|
4649
|
+
* After this flag:
|
|
4650
|
+
*
|
|
4651
|
+
* - `prompts/get` answers JSON-RPC `-32603` naming the prompt and the first
|
|
4652
|
+
* invalid message when a message's `role` is not `user` or `assistant`,
|
|
4653
|
+
* or its `content` is not a content block the request's protocol version
|
|
4654
|
+
* defines (`audio` from `2025-03-26`, `resource_link` from `2025-06-18`).
|
|
4655
|
+
* A prompt message's `annotations.lastModified` may be any string, as
|
|
4656
|
+
* every revision's schema types it.
|
|
4657
|
+
* - Every answer to a batch is an array.
|
|
4658
|
+
* - A blank tool name falls back to the operationId, as on every other
|
|
4659
|
+
* path.
|
|
4660
|
+
*
|
|
4661
|
+
* @compatibilityDate 2026-11-06
|
|
4662
|
+
*/
|
|
4663
|
+
mcpServerSpecCompliance: boolean;
|
|
4551
4664
|
}
|
|
4552
4665
|
|
|
4553
4666
|
declare interface CompletionsFallbacks {
|
|
@@ -326,7 +326,8 @@ declare interface CompatibilityFlags {
|
|
|
326
326
|
*/
|
|
327
327
|
treatBlankOptionalStringOptionsAsUnset: boolean;
|
|
328
328
|
/**
|
|
329
|
-
* Whether the MCP Gateway
|
|
329
|
+
* Whether the MCP Gateway and `mcpServerHandler` support MCP protocol
|
|
330
|
+
* revision `2026-07-28`.
|
|
330
331
|
*
|
|
331
332
|
* MCP requests on `2025-11-25` and earlier get the same answers with or
|
|
332
333
|
* without this flag, with one exception: an `initialize` reply the upstream
|
|
@@ -343,11 +344,24 @@ declare interface CompatibilityFlags {
|
|
|
343
344
|
* reading it as `2026-07-28`. An upstream that answers only `server/discover`
|
|
344
345
|
* is reported as unavailable, and a caller that hasn't connected the
|
|
345
346
|
* upstream gets the `-32042` URL-elicitation error, which `2026-07-28`
|
|
346
|
-
* clients can't act on.
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
347
|
+
* clients can't act on. `mcpServerHandler` refuses a `2026-07-28`
|
|
348
|
+
* `MCP-Protocol-Version` header with HTTP 400 and `-32000`.
|
|
349
|
+
*
|
|
350
|
+
* After this flag: The MCP Gateway and `mcpServerHandler` handle
|
|
351
|
+
* `2026-07-28` requests as that revision requires:
|
|
352
|
+
*
|
|
353
|
+
* - `mcpServerHandler` serves a `2026-07-28` request: `server/discover`,
|
|
354
|
+
* the per-request `_meta` envelope and its validation (`-32602`,
|
|
355
|
+
* `-32020`, `-32022`), including the required `MCP-Protocol-Version`,
|
|
356
|
+
* `Mcp-Method` and `Mcp-Name` headers,
|
|
357
|
+
* HTTP `404` with `-32601` for the methods `2026-07-28` removed
|
|
358
|
+
* (`initialize`, `ping`, `logging/setLevel`, `resources/subscribe`,
|
|
359
|
+
* `resources/unsubscribe`), and `resultType`, `serverInfo` and
|
|
360
|
+
* `ttlMs: 0` / `cacheScope: "private"` on its results. An unknown tool,
|
|
361
|
+
* prompt or resource gets the MCP SDK's not-found error. The era comes
|
|
362
|
+
* from the body, so a request that names `2026-07-28` only in
|
|
363
|
+
* `params._meta`, with no header, gets HTTP `400` with `-32020`. The MCP
|
|
364
|
+
* capability filter answers a hidden target with the same checks first.
|
|
351
365
|
* - Upstream readiness falls back to `server/discover` when `initialize` is
|
|
352
366
|
* refused with a JSON-RPC error.
|
|
353
367
|
* - `server/discover` gets the configured icon fallback, and the gateway
|
|
@@ -359,10 +373,18 @@ declare interface CompatibilityFlags {
|
|
|
359
373
|
* other event is relayed unchanged, and the stream is not buffered.
|
|
360
374
|
* - A caller that hasn't connected the upstream gets an `input_required`
|
|
361
375
|
* result with a URL-mode connect elicitation (or `-32021` when the client
|
|
362
|
-
* didn't declare URL elicitation), not `-32042`.
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
376
|
+
* didn't declare URL elicitation), not `-32042`. Any other method, the
|
|
377
|
+
* list methods included, gets `-32603` with the connect link in
|
|
378
|
+
* `data.connectRequired`. Before the gateway answers such a request
|
|
379
|
+
* itself, it refuses one a `2026-07-28` server would refuse (`-32602`,
|
|
380
|
+
* `-32020` or `-32022`, HTTP 400), a request without a required
|
|
381
|
+
* `MCP-Protocol-Version`, `Mcp-Method` or `Mcp-Name` header included, and
|
|
382
|
+
* it accepts a notification with `202` and no body. Its own
|
|
383
|
+
* `server/discover` answer lists `2026-07-28` and the 2025-era versions
|
|
384
|
+
* the route relays through `initialize`.
|
|
385
|
+
* - A retry's `requestState` with the gateway's `zuplo-connect.` prefix
|
|
386
|
+
* that doesn't verify under this deployment's key (another Zuplo
|
|
387
|
+
* gateway's, behind this one) is passed to the upstream, not refused.
|
|
366
388
|
* - The capability filter checks the `Mcp-Method` and `Mcp-Name` headers
|
|
367
389
|
* against the body (`-32020`), answers an unknown method spelling with
|
|
368
390
|
* HTTP `404`, marks lists and `resources/read` results on routes with
|
|
@@ -419,6 +441,97 @@ declare interface CompatibilityFlags {
|
|
|
419
441
|
* @compatibilityDate 2026-11-06
|
|
420
442
|
*/
|
|
421
443
|
rejectInvalidMcpResourceUris: boolean;
|
|
444
|
+
/**
|
|
445
|
+
* Whether the MCP Gateway follows the MCP transport, elicitation and
|
|
446
|
+
* authorization rules for the answers it builds itself on `2025-11-25` and
|
|
447
|
+
* earlier requests, and in its upstream readiness check.
|
|
448
|
+
*
|
|
449
|
+
* Before this flag:
|
|
450
|
+
*
|
|
451
|
+
* - A caller that hasn't connected the upstream gets a JSON-RPC error with
|
|
452
|
+
* HTTP 200 for every message: `-32042` with a URL-mode elicitation when
|
|
453
|
+
* the gateway has a connect URL, `-32600` when it doesn't. That includes
|
|
454
|
+
* a notification or a JSON-RPC response (answered with an error that has
|
|
455
|
+
* no `id`), an `initialize`, a client that never declared URL-mode
|
|
456
|
+
* elicitation, and a client on a protocol version before `2025-11-25`,
|
|
457
|
+
* which has no URL mode.
|
|
458
|
+
* - When the upstream still answers 401 after the gateway refreshed its
|
|
459
|
+
* credential (or the gateway could not retry), and when it answers 403
|
|
460
|
+
* with a `WWW-Authenticate` challenge, the client gets the upstream's
|
|
461
|
+
* response, `WWW-Authenticate` included. The challenge points at the
|
|
462
|
+
* upstream's authorization server, and the client reads the 401 as its
|
|
463
|
+
* own gateway token failing.
|
|
464
|
+
* - The readiness check ends the upstream session it opened with
|
|
465
|
+
* `MCP-Protocol-Version: 2025-11-25`, whatever version the upstream
|
|
466
|
+
* negotiated.
|
|
467
|
+
*
|
|
468
|
+
* After this flag:
|
|
469
|
+
*
|
|
470
|
+
* - A request from a caller that hasn't connected the upstream is first
|
|
471
|
+
* checked as `mcpServerHandler` checks it: a body that is not JSON (an
|
|
472
|
+
* empty one included) gets HTTP `400` `-32700`, a message that is not
|
|
473
|
+
* valid JSON-RPC `400` `-32600`, an `initialize` batched with other
|
|
474
|
+
* messages `400` `-32600`, and an `MCP-Protocol-Version` the route does
|
|
475
|
+
* not serve `400` `-32000` (a missing header is allowed; the route
|
|
476
|
+
* serves its upstream's versions once the gateway has learned them). A
|
|
477
|
+
* batch on `2025-06-18` or later is refused whole with `400` `-32600`.
|
|
478
|
+
* - A valid notification or JSON-RPC response is accepted with `202` and
|
|
479
|
+
* no body, and dropped. `ping` gets an empty result. A `2025-03-26`
|
|
480
|
+
* batch is answered per member.
|
|
481
|
+
* - The `-32042` URL-elicitation error is sent only to an `initialize` that
|
|
482
|
+
* names `2025-11-25` (and not `2026-07-28` or later) and declares
|
|
483
|
+
* `capabilities.elicitation.url`: the gateway keeps no session, so it
|
|
484
|
+
* cannot know what a later request's client declared. Every other
|
|
485
|
+
* connect-required answer is `-32603` with the connect link in
|
|
486
|
+
* `data.connectRequired`, never `-32600`.
|
|
487
|
+
* - On a request the token exchange policy sent with the gateway's own
|
|
488
|
+
* upstream credential, an upstream 401 the refresh did not fix, or an
|
|
489
|
+
* upstream 403 with a `WWW-Authenticate` challenge, is answered by the
|
|
490
|
+
* gateway with JSON-RPC `-32603` (`data.upstreamStatus`) and no
|
|
491
|
+
* `WWW-Authenticate`; a message without a request gets HTTP `502` with
|
|
492
|
+
* the error and no id. A route without the policy relays the challenge.
|
|
493
|
+
* - The readiness check ends the session with the version the upstream
|
|
494
|
+
* negotiated in its `initialize` result.
|
|
495
|
+
* - The MCP capability filter answers a 2025-era request for a hidden
|
|
496
|
+
* target as `mcpServerHandler` answers an absent one: its `406`, `415`,
|
|
497
|
+
* invalid-message and batched-`initialize` `400`s and unsupported-version
|
|
498
|
+
* `400` first, then a mistyped `arguments` `-32602`, then the not-found.
|
|
499
|
+
* - On a `2026-07-28` request (with `mcpProtocolVersion20260728`), a method
|
|
500
|
+
* 2026-07-28 removed (`ping`, `logging/setLevel`, …) gets `404`
|
|
501
|
+
* `-32601` from the gateway instead of the connect-required error.
|
|
502
|
+
*
|
|
503
|
+
* @compatibilityDate 2026-11-06
|
|
504
|
+
*/
|
|
505
|
+
mcpGatewaySpecCompliance: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* Whether the MCP server handler checks the results and requests that MCP
|
|
508
|
+
* 2025-11-25 constrains and the handler did not check.
|
|
509
|
+
*
|
|
510
|
+
* Before this flag:
|
|
511
|
+
*
|
|
512
|
+
* - `prompts/get` returns the prompt route's messages as the route sent
|
|
513
|
+
* them, so a `role` other than `user` or `assistant` (such as
|
|
514
|
+
* `"system"`) or an invalid content block reaches the client.
|
|
515
|
+
* - A JSON-RPC batch (allowed on `2025-03-26` and earlier) whose answer has
|
|
516
|
+
* one response gets that response as a bare object, not an array.
|
|
517
|
+
* - A tool from the deprecated `options.files` whose `x-zuplo-mcp-tool`
|
|
518
|
+
* name is blank is registered with the name `""`.
|
|
519
|
+
*
|
|
520
|
+
* After this flag:
|
|
521
|
+
*
|
|
522
|
+
* - `prompts/get` answers JSON-RPC `-32603` naming the prompt and the first
|
|
523
|
+
* invalid message when a message's `role` is not `user` or `assistant`,
|
|
524
|
+
* or its `content` is not a content block the request's protocol version
|
|
525
|
+
* defines (`audio` from `2025-03-26`, `resource_link` from `2025-06-18`).
|
|
526
|
+
* A prompt message's `annotations.lastModified` may be any string, as
|
|
527
|
+
* every revision's schema types it.
|
|
528
|
+
* - Every answer to a batch is an array.
|
|
529
|
+
* - A blank tool name falls back to the operationId, as on every other
|
|
530
|
+
* path.
|
|
531
|
+
*
|
|
532
|
+
* @compatibilityDate 2026-11-06
|
|
533
|
+
*/
|
|
534
|
+
mcpServerSpecCompliance: boolean;
|
|
422
535
|
}
|
|
423
536
|
|
|
424
537
|
/**
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Zuplo, Inc. All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* This software and associated documentation files (the "Software") is intended to be used
|
|
6
|
-
* only by Zuplo customers solely to develop and test applications that will be deployed
|
|
7
|
-
* to Zuplo hosted services. You and others in your organization may use these files on your
|
|
8
|
-
* Development Devices solely for the above stated purpose.
|
|
9
|
-
*
|
|
10
|
-
* Outside of uses stated above, no license is granted for any other purpose including
|
|
11
|
-
* without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
12
|
-
* sublicense, host, and/or sell copies of the Software.
|
|
13
|
-
*
|
|
14
|
-
* The software may include third party components with separate legal notices or governed by
|
|
15
|
-
* other agreements, as described in licenses either embedded in or accompanying the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
18
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
19
|
-
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
20
|
-
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
-
* DEALINGS IN THE SOFTWARE.
|
|
23
|
-
*--------------------------------------------------------------------------------------------*/
|
|
24
|
-
|
|
25
|
-
import{a as g}from"./chunk-A3QGJZO7.js";import{$ as T}from"./chunk-UFTMOJ7K.js";import{a as r}from"./chunk-TYV53J3B.js";var P=class e extends Request{static{r(this,"ZuploRequest")}#t=void 0;#e;#n;constructor(t,n,s){super(t,n);let o=n?.params;this.#n=s,o?this.#e=o:t instanceof e?this.#e=t.#e:this.#e={};let a=n?.user;a?this.user=a:t instanceof e&&(this.user=t.user)}get originalRequest(){return this.#n??null}get query(){if(this.#t===void 0){let t={},n=new URL(this.url).searchParams;for(let[s,o]of n.entries())t[s]=o;this.#t=t}return g(this.#t)}get params(){return g(this.#e)}user};function h(){return T.instance.build.COMPATIBILITY_FLAGS.mcpProtocolVersion20260728===!0}r(h,"isMcp20260728Enabled");var S="2026-07-28",A="io.modelcontextprotocol/protocolVersion",U="io.modelcontextprotocol/clientCapabilities",B="io.modelcontextprotocol/clientInfo",W="io.modelcontextprotocol/serverInfo";var Q=/^\d{4}-\d{2}-\d{2}$/;function I(e){return typeof e=="string"&&Q.test(e)&&e>=S}r(I,"isModernProtocolVersion");function f(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}r(f,"isRecord");function k(e){if(!f(e)||!f(e.params))return;let t=e.params._meta;return f(t)?t:void 0}r(k,"readRequestMeta");function L(e){let t=k(e)?.[A];return typeof t=="string"?t:void 0}r(L,"readEnvelopeProtocolVersion");function Z(e){let t=k(e)?.[U];return f(t)?t:void 0}r(Z,"readEnvelopeClientCapabilities");function x(e,t){if(Array.isArray(t))return!1;let n=e.get("mcp-protocol-version"),s=L(t);return n!==null&&I(n)||s!==void 0&&I(s)}r(x,"isModernMcpRequest");var X="zuplo_upstream_connect";var M="2.0",R=-32600,N=-32602,se=-32603,re=-32001,b=10*1024*1024;function c(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}r(c,"isRecord");function y(e){return typeof e=="string"||typeof e=="number"}r(y,"isRequestId");function p(e){return e===null?"null":Array.isArray(e)?"an array":typeof e=="object"?"an object":typeof e=="string"?JSON.stringify(e.length>40?`${e.slice(0,40)}\u2026`:e):String(e)}r(p,"describeValue");function i(e){if(!(e===void 0||c(e)))return`params must be an object when present (got ${p(e)}).`}r(i,"optionalObjectParams");function u(e,t){return n=>{if(!c(n))return`params must be an object with a string \`${e}\` (got ${p(n)}). Example: ${t}`;if(typeof n[e]!="string")return`params.${e} must be a string (got ${p(n[e])}). Example: ${t}`}}r(u,"requireStringField");var v={initialize:i,ping:i,"tools/list":i,"tools/call":u("name",'{"name":"my_tool","arguments":{}}'),"prompts/list":i,"prompts/get":u("name",'{"name":"my_prompt"}'),"resources/list":i,"resources/templates/list":i,"resources/read":u("uri",'{"uri":"file:///a.txt"}'),"resources/subscribe":u("uri",'{"uri":"file:///a.txt"}'),"resources/unsubscribe":u("uri",'{"uri":"file:///a.txt"}'),"completion/complete":i,"logging/setLevel":u("level",'{"level":"info"}'),"server/discover":i,"subscriptions/listen":i,"tasks/get":u("taskId",'{"taskId":"task-123"}'),"tasks/update":u("taskId",'{"taskId":"task-123"}'),"tasks/cancel":u("taskId",'{"taskId":"task-123"}')},C={"notifications/initialized":i,"notifications/cancelled":i,"notifications/progress":i,"notifications/roots/list_changed":i,"notifications/subscriptions/acknowledged":i},j=new Set(["server/discover","subscriptions/listen","tasks/get","tasks/update","tasks/cancel"]),$=new Set(["notifications/subscriptions/acknowledged"]);function V(e,t){return Object.hasOwn(v,e)&&(t||!j.has(e))}r(V,"isKnownRequestMethod");function w(e,t){return Object.hasOwn(C,e)&&(t||!$.has(e))}r(w,"isKnownNotificationMethod");function l(e){return{type:"invalid",...e.method===void 0?{}:{method:e.method},id:e.id,error:{code:e.code,message:e.message},raw:e.raw}}r(l,"invalidMessage");function m(e){return y(e)?e:null}r(m,"usableId");function K(e,t,n,s){if(V(t,s)){let o=v[t](e.params);if(o!==void 0)return l({raw:e,method:t,id:n,code:N,message:`Invalid params for \`${t}\`: ${o}`});let a=e.params===void 0?{}:e.params;return{type:"request",method:t,id:n,params:a,raw:e}}return{type:"request",method:t,id:n,params:e.params,raw:e}}r(K,"classifyRequest");function Y(e,t,n){if(w(t,n)){let s=C[t](e.params);if(s!==void 0)return l({raw:e,method:t,id:null,code:N,message:`Invalid params for \`${t}\`: ${s}`});let o=e.params===void 0?{}:e.params;return{type:"notification",method:t,params:o,raw:e}}return{type:"notification",method:t,params:e.params,raw:e}}r(Y,"classifyNotification");function _(e,t=!1){if(!c(e)||e.jsonrpc!==M)return l({raw:e,id:m(c(e)?e.id:void 0),code:R,message:`Invalid Request: batch member is not a JSON-RPC 2.0 message (got ${p(e)}). Every member must include \`"jsonrpc":"2.0"\`.`});let n=e.method;if(typeof n=="string"){if(!("id"in e))return Y(e,n,t);let s=e.id;return y(s)?K(e,n,s,t):l({raw:e,method:n,id:null,code:R,message:`Invalid Request: request id must be a string or number (got ${p(s)}). The gateway cannot correlate a reply to this id \u2014 omit \`id\` to send a notification instead.`})}if(n!==void 0)return l({raw:e,id:m(e.id),code:R,message:`Invalid Request: method must be a string (got ${p(n)}).`});if("result"in e&&y(e.id)&&c(e.result))return{type:"result",id:e.id,result:e.result,raw:e};if("error"in e){let s=e.error;if(c(s)&&typeof s.code=="number"&&typeof s.message=="string"){let o={code:s.code,message:s.message,...s.data===void 0?{}:{data:s.data}};return{type:"error",id:m(e.id),error:o,raw:e}}}return l({raw:e,id:m(e.id),code:R,message:"Invalid Request: message has no `method` and is not a valid JSON-RPC result or error."})}r(_,"classifyMember");var D=new WeakMap,q=new WeakMap;function oe(e){return q.get(e)}r(oe,"getEnvelopeText");async function G(e){let t=e.headers.get("content-type");if(t===null||!t.toLowerCase().includes("json"))return null;let n=e.headers.get("content-length");if(n!==null&&Number(n)>b)return null;let s;try{s=await e.clone().text()}catch{return null}if(s.length>b)return null;let o;try{o=JSON.parse(s)}catch{return null}let a=e.headers.get("mcp-protocol-version");if(Array.isArray(o)){if(o.length>0&&!o.some(d=>c(d)&&d.jsonrpc===M))return null;let O={transport:"json",shape:"batch",messages:o.map(d=>_(d)),...a===null?{}:{protocolVersion:a}};return q.set(O,s),O}if(!c(o)||o.jsonrpc!==M)return null;let E={transport:"json",shape:"single",messages:[_(o,h()&&x(e.headers,o))],...a===null?{}:{protocolVersion:a}};return q.set(E,s),E}r(G,"parseEnvelope");function ie(e){let t=D.get(e);return t===void 0&&(t=G(e),D.set(e,t)),t}r(ie,"getRequest");export{P as a,h as b,S as c,A as d,U as e,B as f,W as g,I as h,L as i,Z as j,x as k,X as l,M as m,R as n,se as o,re as p,c as q,y as r,oe as s,ie as t};
|
|
26
|
-
//# sourceMappingURL=chunk-7RNZS3GX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@zuplo/runtime/request.ts","@zuplo/runtime/mcp-gateway/v2/runtime-utils/mcp-modern-protocol.ts","@zuplo/runtime/mcp/messages/parse.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;wHA0JO,IAAMA,EAAN,MAAMC,UAEH,OAAQ,CA5JlB,MA4JkB,CAAAC,EAAA,qBAChBC,GAAkD,OAClDC,GACAC,GAEA,YACEC,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CAIvB,GACEA,EAAK,OAAS,GACd,CAACA,EAAK,KACHE,GAAWxC,EAASwC,CAAM,GAAKA,EAAO,UAAY9C,CACrD,EAEA,OAAO,KAET,IAAMsC,EAAwB,CAC5B,UAAW,OACX,MAAO,QAEP,SAAUM,EAAK,IAAKE,GAAWd,EAAec,CAAM,CAAC,EACrD,GAAID,IAAoB,KAAO,CAAC,EAAI,CAAE,gBAAAA,CAAgB,CACxD,EACA,OAAAT,EAAa,IAAIE,EAAUK,CAAI,EACxBL,CACT,CAEA,GAAI,CAAChC,EAASsC,CAAI,GAAKA,EAAK,UAAY5C,EACtC,OAAO,KAET,IAAMsC,EAAwB,CAC5B,UAAW,OACX,MAAO,SACP,SAAU,CACRN,EACEY,EACAG,EAAqB,GAAKC,EAAmBR,EAAQ,QAASI,CAAI,CACpE,CACF,EACA,GAAIC,IAAoB,KAAO,CAAC,EAAI,CAAE,gBAAAA,CAAgB,CACxD,EACA,OAAAT,EAAa,IAAIE,EAAUK,CAAI,EACxBL,CACT,CApEe9B,EAAA+B,EAAA,iBAkFR,SAASU,GAAWT,EAA+C,CACxE,IAAIU,EAASf,EAAc,IAAIK,CAAO,EACtC,OAAIU,IAAW,SACbA,EAASX,EAAcC,CAAO,EAC9BL,EAAc,IAAIK,EAASU,CAAM,GAE5BA,CACT,CAPgB1C,EAAAyC,GAAA","names":["ZuploRequest","_ZuploRequest","__name","#query","#params","#originalRequest","input","init","originalRequest","params","user","query","searchParams","key","value","deepFreeze","isMcp20260728Enabled","Environment","__name","MCP_MODERN_PROTOCOL_VERSION","MCP_PROTOCOL_VERSION_META_KEY","MCP_CLIENT_CAPABILITIES_META_KEY","MCP_CLIENT_INFO_META_KEY","MCP_SERVER_INFO_META_KEY","PROTOCOL_REVISION_PATTERN","isModernProtocolVersion","version","MCP_MODERN_PROTOCOL_VERSION","__name","isRecord","value","readRequestMeta","message","meta","readEnvelopeProtocolVersion","MCP_PROTOCOL_VERSION_META_KEY","readEnvelopeClientCapabilities","capabilities","MCP_CLIENT_CAPABILITIES_META_KEY","isModernMcpRequest","headers","header","claim","CONNECT_INPUT_REQUEST_KEY","JSONRPC_VERSION","INVALID_REQUEST","INVALID_PARAMS","INTERNAL_ERROR","NOT_PROCESSED","MAX_BODY_CHARS","isRecord","value","__name","isRequestId","describeValue","optionalObjectParams","params","requireStringField","field","example","REQUEST_PARAM_CHECKS","NOTIFICATION_PARAM_CHECKS","MODERN_ONLY_REQUEST_METHODS","MODERN_ONLY_NOTIFICATION_METHODS","isKnownRequestMethod","method","modern","isKnownNotificationMethod","invalidMessage","input","usableId","classifyRequest","raw","id","problem","classifyNotification","classifyMember","error","detail","envelopeCache","envelopeText","getEnvelopeText","envelope","parseEnvelope","request","contentType","contentLength","text","body","protocolVersion","member","isMcp20260728Enabled","isModernMcpRequest","getRequest","cached"]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Zuplo, Inc. All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* This software and associated documentation files (the "Software") is intended to be used
|
|
6
|
-
* only by Zuplo customers solely to develop and test applications that will be deployed
|
|
7
|
-
* to Zuplo hosted services. You and others in your organization may use these files on your
|
|
8
|
-
* Development Devices solely for the above stated purpose.
|
|
9
|
-
*
|
|
10
|
-
* Outside of uses stated above, no license is granted for any other purpose including
|
|
11
|
-
* without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
12
|
-
* sublicense, host, and/or sell copies of the Software.
|
|
13
|
-
*
|
|
14
|
-
* The software may include third party components with separate legal notices or governed by
|
|
15
|
-
* other agreements, as described in licenses either embedded in or accompanying the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
18
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
19
|
-
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
20
|
-
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
-
* DEALINGS IN THE SOFTWARE.
|
|
23
|
-
*--------------------------------------------------------------------------------------------*/
|
|
24
|
-
|
|
25
|
-
import{a as r}from"./chunk-TYV53J3B.js";var N=class extends Error{static{r(this,"SystemError")}constructor(t,n){super(t,n),this.name="InternalError"}},w=class extends TypeError{static{r(this,"NetworkError")}cause;constructor(t){super("The upstream request failed due to a network error.",{cause:t}),this.name="TypeError",this.cause=t}},y=class extends Error{static{r(this,"RuntimeError")}extensionMembers;constructor(t,n){typeof t=="string"?super(t,n):(super(t.message,n),this.extensionMembers=t.extensionMembers),this.name="RuntimeError"}},K=class extends y{static{r(this,"ConfigurationError")}constructor(t,n){super(t,n),this.name="ConfigurationError"}};var ht="zuplo-request-id",Ee="zp-rid",he="zp-body-removed",Re="cf-ray",Rt="x-forwarded-scheme",Ot="x-forwarded-proto",At="x-scheme",Oe="cf-ipcity",Ae="cf-ipcontinent",ye="cf-ipcountry",Te="cf-iplongitude",Pe="cf-iplatitude",yt="cf-region",Tt="cf-region-code",Pt="cf-metro-code",bt="cf-postal-code",St="cf-timezone",Lt="zp-ipcity",xt="zp-ipcontinent",It="zp-ipcountry",Ut="zp-iplongitude",Ct="zp-iplatitude",X="x-real-ip",H="true-client-ip";var be="zp-client-cert",Se="zp-mtls-status",Le="zp-mtls-failure-reason",xe="zp-mtls-cert-fingerprint-sha256",Ie="zp-mtls-cert-not-before",Ue="zp-mtls-cert-not-after",Ce="zp-mtls-cert-issuer-dn",Ne="zp-mtls-cert-subject-dn",we="zp-asn",Me="zp-asorg",De="zp-colo",He="zp-postalcode",ve="zp-metrocode",ze="zp-region",Fe="zp-regioncode",Ze="zp-timezone",Nt="zp-http-protocol",v="zp-local-service",Ve="zp-gateway-api-key",ke="x-akamai-edgescape",wt=[be,Se,Le,xe,Ie,Ue,Ce,Ne,ke,v],Mt=[Oe,Ae,ye,Te,Pe,we,Me,De,He,ve,ze,Fe,Ze],Dt=["zp-","cf-"],Ht=[Ee,Re,he,Ve];var vt="system-logger";var Be=!1;function S(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}r(S,"code");function L(e,t){return Be?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}r(L,"run");function $e(e){return L(e,S([31],39))}r($e,"red");function Ge(e){return L(e,S([32],39))}r(Ge,"green");function je(e){return L(e,S([33],39))}r(je,"yellow");function Ye(e){return L(e,S([34],39))}r(Ye,"blue");function qe(e){return L(e,S([35],39))}r(qe,"magenta");function We(e){return L(e,S([36],39))}r(We,"cyan");var Ft=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"),"g");var Q=[$e,Ge,je,Ye,qe,We];function Je(e){let t=0,n=e.length,i=0;if(n>0)for(;i<n;)t=(t<<5)-t+e.charCodeAt(i++)|0;return t}r(Je,"hashCode");function ee(e){let t=Math.abs(Je(e));return Q[t%Q.length]}r(ee,"generateColor");function te(e,t,...n){let i=0,o=n.length,c=String(t).replace(/%[sdjoO%]/g,s=>{if(s==="%%")return"%";if(i>=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]).toString();case"%o":return e(n[i++]).split(`
|
|
26
|
-
`).map(l=>l.trim()).join(" ");case"%O":return e(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}default:return s}});for(let s of n.splice(i))s===null||!(typeof s=="object"&&s!==null)?c+=" "+s:c+=" "+e(s);return c}r(te,"format");function P(e,t,n,i){let o={seen:[],stylize:Ke,showHidden:t??!1,depth:n??2,colors:i??!1,customInspect:!0};return o.colors&&(o.stylize=Qe),M(o,e,o.depth)}r(P,"inspect");P.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};P.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Ke(e,t){return e}r(Ke,"stylizeNoColor");function Xe(e){return typeof e=="boolean"}r(Xe,"isBoolean");function re(e){return e===void 0}r(re,"isUndefined");function Qe(e,t){let n=P.styles[t];return n?"\x1B["+P.colors[n][0]+"m"+e+"\x1B["+P.colors[n][1]+"m":e}r(Qe,"stylizeWithColor");function z(e){return typeof e=="function"}r(z,"isFunction");function oe(e){return typeof e=="string"}r(oe,"isString");function et(e){return typeof e=="number"}r(et,"isNumber");function ie(e){return e===null}r(ie,"isNull");function se(e,t){return Object.hasOwn(e,t)}r(se,"hasOwn");function F(e){return B(e)&&$(e)==="[object RegExp]"}r(F,"isRegExp");function B(e){return typeof e=="object"&&e!==null}r(B,"isObject");function Z(e){return B(e)&&($(e)==="[object Error]"||e instanceof Error)}r(Z,"isError");function ne(e){return B(e)&&$(e)==="[object Date]"}r(ne,"isDate");function $(e){return Object.prototype.toString.call(e)}r($,"objectToString");function tt(e){let t={};return e.forEach(function(n,i){t[n]=!0}),t}r(tt,"arrayToHash");function nt(e,t,n,i,o){let c=[];for(let s=0,l=t.length;s<l;++s)se(t,String(s))?c.push(k(e,t,n,i,String(s),!0)):c.push("");return o.forEach(function(s){s.match(/^\d+$/)||c.push(k(e,t,n,i,s,!0))}),c}r(nt,"formatArray");function V(e){return"["+Error.prototype.toString.call(e)+"]"}r(V,"formatError");function M(e,t,n){if(e.customInspect&&t&&z(t.inspect)&&t.inspect!==P&&!(t.constructor&&t.constructor.prototype===t)){let u=t.inspect(n,e);return oe(u)||(u=M(e,u,n)),u}let i=rt(e,t);if(i)return i;let o=Object.keys(t),c=tt(o);try{e.showHidden&&Object.getOwnPropertyNames&&(o=Object.getOwnPropertyNames(t))}catch{}if(Z(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return V(t);if(o.length===0){if(z(t)){let u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(F(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(ne(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Z(t))return V(t)}let s="",l=!1,p=["{","}"];if(Array.isArray(t)&&(l=!0,p=["[","]"]),z(t)&&(s=" [Function"+(t.name?": "+t.name:"")+"]"),F(t)&&(s=" "+RegExp.prototype.toString.call(t)),ne(t)&&(s=" "+Date.prototype.toUTCString.call(t)),Z(t)&&(s=" "+V(t)),o.length===0&&(!l||t.length==0))return p[0]+s+p[1];if(n<0)return F(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);let a;return l?a=nt(e,t,n,c,o):a=o.map(function(u){return k(e,t,n,c,u,l)}),e.seen.pop(),ot(a,s,p)}r(M,"formatValue");function k(e,t,n,i,o,c){let s,l,p;p={value:void 0};try{p.value=t[o]}catch{}try{Object.getOwnPropertyDescriptor&&(p=Object.getOwnPropertyDescriptor(t,o)||p)}catch{}if(p.get?p.set?l=e.stylize("[Getter/Setter]","special"):l=e.stylize("[Getter]","special"):p.set&&(l=e.stylize("[Setter]","special")),se(i,o)||(s="["+o+"]"),l||(e.seen.indexOf(p.value)<0?(ie(n)?l=M(e,p.value,null):l=M(e,p.value,n-1),l.indexOf(`
|
|
27
|
-
`)>-1&&(c?l=l.split(`
|
|
28
|
-
`).map(function(a){return" "+a}).join(`
|
|
29
|
-
`).substr(2):l=`
|
|
30
|
-
`+l.split(`
|
|
31
|
-
`).map(function(a){return" "+a}).join(`
|
|
32
|
-
`))):l=e.stylize("[Circular]","special")),re(s)){if(c&&o.match(/^\d+$/))return l;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+l}r(k,"formatProperty");function rt(e,t){if(re(t))return e.stylize("undefined","undefined");if(oe(t)){let n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(et(t))return e.stylize(""+t,"number");if(Xe(t))return e.stylize(""+t,"boolean");if(ie(t))return e.stylize("null","null")}r(rt,"formatPrimitive");function ot(e,t,n){let i=0;return e.reduce(function(c,s){return i++,s.indexOf(`
|
|
33
|
-
`)>=0&&i++,c+s.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(t===""?"":t+`
|
|
34
|
-
`)+" "+e.join(`,
|
|
35
|
-
`)+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}r(ot,"reduceToSingleString");var ae=r((e,...t)=>te(P,e,t),"format");var G=class{static{r(this,"Debugger")}manager;ns;color;last;enabled;constructor(t,n){this.manager=t,this.ns=n,this.color=ee(n),this.last=0,this.enabled=t.enabled.some(i=>i.test(n))}log(...t){if(!this.enabled)return;let n,i=t[0];typeof i=="function"?n=i():n=String(i);let o=Date.now()-(this.last||Date.now());n=ae(n,...t);let c=`${this.color(this.ns)} ${n} ${this.color(`+${o}ms`)}`;console.log(c),this.last=Date.now()}},j=class{static{r(this,"DebugManager")}debuggers;enabled;constructor(t){this.debuggers=new Map,this.enabled=t??[]}};function it(e){return!e||e.length===0?[]:(e=e.replace(/\s/g,"").replace(/\*/g,".+"),e.split(",").map(t=>new RegExp(`^${t}$`)))}r(it,"extract");var D;function ce(e){let t=globalThis.DEBUG;D||(D=new j(it(t)));let n=new G(D,e);return D.debuggers.set(e,n),Object.assign(n.log.bind(n),{self:n})}r(ce,"debug");function st(e){if(e.length>=255)throw new TypeError("Alphabet too long");let t=new Uint8Array(256);for(let a=0;a<t.length;a++)t[a]=255;for(let a=0;a<e.length;a++){let u=e.charAt(a),E=u.charCodeAt(0);if(t[E]!==255)throw new TypeError(u+" is ambiguous");t[E]=a}let n=e.length,i=e.charAt(0),o=Math.log(n)/Math.log(256),c=Math.log(256)/Math.log(n);function s(a){if(a instanceof Uint8Array||(ArrayBuffer.isView(a)?a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength):Array.isArray(a)&&(a=Uint8Array.from(a))),!(a instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(a.length===0)return"";let u=0,E=0,g=0,d=a.length;for(;g!==d&&a[g]===0;)g++,u++;let R=(d-g)*c+1>>>0,m=new Uint8Array(R);for(;g!==d;){let O=a[g],h=0;for(let T=R-1;(O!==0||h<E)&&T!==-1;T--,h++)O+=256*m[T]>>>0,m[T]=O%n>>>0,O=O/n>>>0;if(O!==0)throw new Error("Non-zero carry");E=h,g++}let f=R-E;for(;f!==R&&m[f]===0;)f++;let A=i.repeat(u);for(;f<R;++f)A+=e.charAt(m[f]);return A}r(s,"encode");function l(a){if(typeof a!="string")throw new TypeError("Expected String");if(a.length===0)return new Uint8Array;let u=0,E=0,g=0;for(;a[u]===i;)E++,u++;let d=(a.length-u)*o+1>>>0,R=new Uint8Array(d);for(;u<a.length;){let O=a.charCodeAt(u);if(O>255)return;let h=t[O];if(h===255)return;let T=0;for(let C=d-1;(h!==0||T<g)&&C!==-1;C--,T++)h+=n*R[C]>>>0,R[C]=h%256>>>0,h=h/256>>>0;if(h!==0)throw new Error("Non-zero carry");g=T,u++}let m=d-g;for(;m!==d&&R[m]===0;)m++;let f=new Uint8Array(E+(d-m)),A=E;for(;m!==d;)f[A++]=R[m++];return f}r(l,"decodeUnsafe");function p(a){let u=l(a);if(u)return u;throw new Error("Non-base"+n+" character")}return r(p,"decode"),{encode:s,decodeUnsafe:l,decode:p}}r(st,"base");var le=st;var at="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",ue=le(at);var ct=/: client error \((?:Connect|SendRequest)\):/;function lt(e){return e instanceof TypeError&&e.message.startsWith("error sending request ")&&ct.test(e.message)}r(lt,"isDenoClientError");function x(e,t){return t?e.catch(n=>{throw lt(n)?new w(n):n}):e}r(x,"wrapDenoNetworkErrors");var b=ce("zuplo:runtime:external-service");function ut(){let e,{__ZUPLO_EXTERNAL_SERVICE_TOKEN:t}=_.instance.runtime;if(t&&t!=="undefined")try{let n=atob(t);e=JSON.parse(n)}catch{}return e}r(ut,"getServiceAuth");async function pe(e,t){let n=".proxy",i=".tunnel";if(typeof e=="string"){let o=new URL(e),c=o.hostname;if(c.endsWith(n)){let f=c.slice(0,-n.length),A=new URL(`http://${f}${o.pathname}${o.search}`);b(`Routing to proxy: ${A.toString()}`);let O=t??{};return I(A.toString(),O)}let s=c.endsWith(i),l=c.indexOf(".")===-1;if(!(s||l))throw new y(`Invalid service hostname suffix: ${c}. Use .proxy for proxy routing, .tunnel for explicit tunnel routing, or no suffix for default tunnel routing.`);let a=s?c.slice(0,-i.length):c,u=ut();if(!u)throw b("There is no external service auth configured for this zup."),new y("There are no external services configured for this zup.");b(`Using external service auth. ClientId: ${u.clientId})`);let E=t??{},g=new Headers(E.headers||{});g.set("CF-Access-Client-Id",u.clientId),g.set("CF-Access-Client-Secret",u.clientSecret),E.headers=g;let d;if(u.customServiceMapping?.[a])d=`https://${u.customServiceMapping[a]}`;else if(_.instance.useLegacyServiceRouting)d=`https://${a}.zuptunnel.com`;else{b("Using sha256 service routing");let f=_.instance.build;if(f.ACCOUNT_NAME&&f.PROJECT_NAME&&f.ENVIRONMENT_TYPE){let A=await pt(a,f.ACCOUNT_NAME,f.PROJECT_NAME,f.ENVIRONMENT_TYPE),O=de(f.ENVIRONMENT_TYPE),h=await Y(`${f.ACCOUNT_NAME}-${f.PROJECT_NAME}-${O}`);h==="40d7ad502f5d743997999594c177184a00161a77865423511f3a1ea21eb5a5e"||h==="d05bffe8fa91a300187d2cf43e8aa4a56bd809c442ae10d1ee49af7d29a5a11"?d=`https://${A}.zuptunnel.com`:d=`https://${A}.t.zuplo.app`}else throw b("Cannot use sha256 service routing, missing build variables"),new y("Failed to generate fully qualified tunnel url.")}let R=new URL(`${d}${o.pathname}${o.search}`);b(`Calling external service: ${R.toString()}`);let m=await I(R.toString(),E);if(m.status===403&&m.headers.get("cf-access-domain")!==null)throw U.console.error("403 Forbidden when calling external service.",{clientId:u.clientId,tunnelHost:d}),new y("Could not connect to secure tunnel.");return m}else throw b("Cannot call external service with Request object"),new y("Currently, we only support fetch(<some_string>, ...).")}r(pe,"externalServiceHandler");async function fe(e,t){if(typeof e=="string"){let n=new URL(e),i=n.hostname,o=t??{},c=`http://${i}.zuplo.svc.cluster.local:9000`,s=new URL(`${c}${n.pathname}${n.search}`),l=new Headers(o.headers||{});return l.set(v,i),o.headers=l,await I(s.toString(),o)}else throw new y("Currently, we only support fetch(<some_string>, ...).")}r(fe,"clusterServiceHandler");async function pt(e,t,n,i){let o=e.toLowerCase(),c=t.toLowerCase(),s=n.toLowerCase(),l=de(i);b(`Hashing service name: ${c}-${o}.${c}-${s}-${l}`);let p=await Y(`${c}-${o}`),a=await Y(`${c}-${s}-${l}`);return`${p}.${a}`}r(pt,"hashServiceName");async function Y(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(c=>c.toString(16).padStart(2,"0")).join("").slice(0,-1)}r(Y,"hashSegment");function de(e){let t=e.toLowerCase();switch(t){case"production":case"preview":return t;default:return"working-copy"}}r(de,"sanitizeEnvironmentType");var q=new Map;q.set("service:",pe);q.set("local:",fe);var I=globalThis.fetch;function W(e,t){let{transformedInit:n,mtlsCertificate:i}=ft(t);if(typeof e=="string"){let o=new URL(e),c=q.get(o.protocol);return c?x(c(e,n),_.instance.isDeno):ge(e,n,i)}else return ge(e,n,i)}r(W,"internalFetch");globalThis.fetch=W;function ge(e,t,n){if(!n)return x(I(e,t),_.instance.isDeno);if(_.instance.isCloudflare){let o=_.instance.runtime[n];if(!o)throw new Error(`mTLS certificate binding '${n}' not found. Ensure the certificate is uploaded and properly configured.`);if(typeof o!="object"||typeof o.fetch!="function")throw new Error(`mTLS certificate binding '${n}' is not a valid mTLS certificate binding. Make sure it's configured as an mTLS certificate, not an environment variable.`);return x(o.fetch(e,t),_.instance.isDeno)}else if(_.instance.isDeno){let i=globalThis.managedDedicatedMtlsBindings?.[n];if(!i)throw new Error(`mTLS certificate binding '${n}' not found. Ensure the certificate is uploaded and properly configured.`);if(typeof i.fetch!="function")throw new Error(`mTLS certificate binding '${n}' is not a valid mTLS certificate binding.`);return x(i.fetch(e,t),!0)}else throw new Error("mTLS client certificates are not supported in this runtime environment")}r(ge,"performFetch");var ft=r(e=>{if(!e||e instanceof Request)return{transformedInit:e,mtlsCertificate:void 0};let t=e;if(!t.zuplo)return{transformedInit:e,mtlsCertificate:void 0};let n=t.zuplo.mtlsCertificate,i=e;return i.cf={cacheEverything:t.zuplo?.cacheEverything,cacheTtl:t.zuplo?.cacheTtlSeconds},delete e.zuplo,{transformedInit:e,mtlsCertificate:n}},"transformInit");var dt={console:{log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console),assert:console.assert.bind(console),clear:console.clear.bind(console),count:console.count.bind(console),countReset:console.countReset.bind(console),dir:console.dir.bind(console),dirxml:console.dirxml.bind(console),group:console.group.bind(console),groupCollapsed:console.groupCollapsed.bind(console),groupEnd:console.groupEnd.bind(console),table:console.table.bind(console),time:console.time.bind(console),timeEnd:console.timeEnd.bind(console),timeLog:console.timeLog.bind(console),timeStamp:console.timeStamp.bind(console),trace:console.trace.bind(console),profile:console.profile.bind(console),profileEnd:console.profileEnd.bind(console)},fetch:W},U=dt;var J="2025-02-06",me=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!1,doNotRunHooksOnSystemRoutes:!1,removeAllVendorHeadersExceptListed:!1,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2024-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!1,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2024-09-02":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!1,useForwardRedirectsPropOnUrlForwardHandler:!1,escapeOpenApiPathCharacters:!1,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2025-02-06":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!0,useForwardRedirectsPropOnUrlForwardHandler:!0,escapeOpenApiPathCharacters:!0,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!1,return501ForUnsupportedHttpMethods:!1,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2026-03-01":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!0,useForwardRedirectsPropOnUrlForwardHandler:!0,escapeOpenApiPathCharacters:!0,delimitOpenApiPathParameters:!1,chainResponseSendingHooks:!0,return501ForUnsupportedHttpMethods:!0,improvedSchemaValidation:!1,serializeMcpParametersByStyle:!1,sanitizeMcpToolNames:!1,omitMcpFieldsNewerThanNegotiatedVersion:!1,treatBlankOptionalStringOptionsAsUnset:!1,mcpProtocolVersion20260728:!1,failMcpResourceReadsOnErrorStatus:!1,rejectInvalidMcpResourceUris:!1},"2026-11-06":{runOutboundPoliciesOnHandlerOnAllStatuses:!0,doNotRunHooksOnSystemRoutes:!0,removeAllVendorHeadersExceptListed:!0,allowCustomPorts:!0,removeLegacyLogInitialization:!0,useForwardRedirectsPropOnUrlForwardHandler:!0,escapeOpenApiPathCharacters:!0,delimitOpenApiPathParameters:!0,chainResponseSendingHooks:!0,return501ForUnsupportedHttpMethods:!0,improvedSchemaValidation:!0,serializeMcpParametersByStyle:!0,sanitizeMcpToolNames:!0,omitMcpFieldsNewerThanNegotiatedVersion:!0,treatBlankOptionalStringOptionsAsUnset:!0,mcpProtocolVersion20260728:!0,failMcpResourceReadsOnErrorStatus:!0,rejectInvalidMcpResourceUris:!0}});function _e(e={}){let{runtime:t="cloudflare"}=e;return new _({build:{ACCOUNT_NAME:"mock-account-name",PROJECT_NAME:"mock-project-name",API_VERSION:"0.0.0",BUILD_ID:crypto.randomUUID(),TIMESTAMP:new Date().toISOString(),BUILD_ENV:"test",ZUPLO_VERSION:"0.0.0",COMPATIBILITY_DATE:J,ENVIRONMENT_TYPE:"mock-environment-type",GIT_SHA:void 0,IS_LOCAL_DEVELOPMENT:!1,COMPATIBILITY_FLAGS:me[J]},runtime:{RUNTIME_ENV:"test",RUNTIME_STAGE:"test",__ZUPLO_DEPLOYMENT_NAME:"mock-deployment-name",__ZUPLO_LOG_LEVEL:"debug",__ZUPLO_LOG_FORMAT:"pretty",__ZUPLO_MANAGEMENT_API_URL:"",__ZUPLO_RUNTIME_TYPE:t,__ZUPLO_AUTH_API_JWT:"",ZUPLO_SERVICE_BUCKET_ID:"bckt_mock"}})}r(_e,"getMockEnvironment");var gt=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function mt(e,t){let n=e.__ZUPLO_TRUSTED_IP_HEADER?.trim();if(!n)return t?H:X;if(!gt.test(n))throw new N(`__ZUPLO_TRUSTED_IP_HEADER is set to '${n}', which is not a valid HTTP header name. Header names may only contain the RFC 9110 token characters (letters, digits, and !#$%&'*+-.^_\`|~) - spaces, colons and tabs are not allowed. Set it to a valid header name such as '${H}' or 'cf-connecting-ip'.`);return n.toLowerCase()}r(mt,"resolveTrustedIpHeader");var _=class e{static{r(this,"Environment")}config;#n;static#e;static#t=!1;static initialize(t){e.#e||(e.#e=new e(t),e.#t=!0)}static get instance(){return e.#t||(U.console.debug("Environment has not been initialized. This is okay when running tests, a mock environment will be used."),e.#e??=_e(),e.#t=!0),e.#e}constructor({build:t,runtime:n}){let i;try{if(n.ZUPLO_SYSTEM_CONFIGURATIONS){let o=new TextDecoder().decode(ue.decode(n.ZUPLO_SYSTEM_CONFIGURATIONS)),c=JSON.parse(o);for(let s of Object.keys(c))n[s]||(n[s]=c[s])}if(n.__ZUPLO_CONFIG){let o=atob(n.__ZUPLO_CONFIG);i=JSON.parse(o)}}catch(o){U.console.error("Failed to parse runtime configuration",o)}this.config=i??{},this.build=t,this.runtime=n,this.instanceId=crypto.randomUUID(),this.#n=mt(n,this.isCloudflare)}build;runtime;instanceId;get deploymentName(){return this.runtime.__ZUPLO_DEPLOYMENT_NAME??this.config.deployment_name??void 0}get accountName(){return this.build.ACCOUNT_NAME??this.runtime.ZUPLO_ACCOUNT_NAME??void 0}get projectName(){return this.build.PROJECT_NAME??this.runtime.ZUPLO_PROJECT_NAME??void 0}get useLegacyServiceRouting(){return this.config.use_legacy_service_routing??void 0}get useProxyForFetchFromZups(){return this.config.use_proxy_for_fetch_from_zups??void 0}get devPortalBaseUrl(){return this.runtime.__ZUPLO_DEV_PORTAL_URL??this.config.dev_portal_url??"https://dev-portal-v4-1.zuplo.com"}get buildAssetsUrl(){return this.runtime.__ZUPLO_BUILD_ASSETS_URL??this.config.build_assets_url??"https://build-assets.zuplo.com"}get zuploEdgeApiUrl(){return this.runtime.__ZUPLO_EDGE_API_URL??this.config.zuplo_edge_api_url??"https://api.zuploedge.com"}get remoteLogToken(){return this.runtime.__ZUPLO_REMOTE_LOG_TOKEN??this.config.remote_log_token??void 0}get zuploClientAuthBucketId(){return this.config.zuplo_auth_client_bucket_id??"auth_o8PUdhKxSTOiB794GWPwLQCD"}get managementApiURL(){return this.runtime.__ZUPLO_MANAGEMENT_API_URL??this.config.management_api_url??"https://api.zuplo.com"}get developerApiUrl(){return this.config.developer_api_url??"https://dev.zuplo.com"}get cdnURL(){return this.runtime.__ZUPLO_CDN_URL??this.config.cdn_url??"https://cdn.zuplo.com"}get remoteLogURL(){return this.runtime.__ZUPLO_REMOTE_LOG_URL??this.config.log_event_api??"https://ellie.zuploedge.com"}get loggingId(){return this.runtime.__ZUPLO_LOGGING_ID??this.config.logging_id??void 0}get redisURL(){return this.runtime.__ZUPLO_REDIS_URL??this.config.redis_proxy_url??"https://redis-proxy.zuploedge.com"}get apiKeyServiceUrl(){return this.runtime.__ZUPLO_API_KEY_SERVICE_URL??this.config.api_key_service_url??"https://apikey.zuploedge.com"}get meteringServiceUrl(){return this.config.metering_service_url??"https://meters.zuploedge.com"}get authApiJWT(){return this.runtime.__ZUPLO_AUTH_API_JWT??void 0}get authClientId(){return this.config.auth_client_id??this.runtime.__ZUPLO_AUTH_CLIENT_ID}get authClientSecret(){return this.config.auth_client_secret??this.runtime.__ZUPLO_AUTH_CLIENT_SECRET}get authPublicKey(){return this.config.auth_public_key??this.runtime.__ZUPLO_AUTH_PUBLIC_KEY}get authPrivateKey(){return this.config.auth_private_key??this.runtime.__ZUPLO_AUTH_PRIVATE_KEY}get userLogLevel(){return this.runtime.ZUPLO_LOG_LEVEL??this.runtime.__ZUPLO_LOG_LEVEL??this.config.user_log_level??"debug"}get systemLogLevel(){return this.runtime.__ZUPLO_LOG_LEVEL??this.config.system_log_level??"debug"}get logFormat(){return this.runtime.__ZUPLO_LOG_FORMAT??this.config.log_format??"cloudflare"}get isCloudflare(){return this.runtime.__ZUPLO_RUNTIME_TYPE?this.runtime.__ZUPLO_RUNTIME_TYPE==="cloudflare":this.config.runtime_type?this.config.runtime_type==="cloudflare":typeof WebSocketPair=="function"}get isManagedDedicated(){return this.runtime.__ZUPLO_IS_MANAGED_DEDICATED==="true"}get trustedIpHeader(){return this.#n}get isDeno(){if(this.runtime.__ZUPLO_RUNTIME_TYPE)return this.runtime.__ZUPLO_RUNTIME_TYPE==="deno";if(this.config.runtime_type)return this.config.runtime_type==="deno";{let t=globalThis.Deno?.version?.deno;return typeof WebSocketPair!="function"&&t}}get isLocalDevelopment(){return this.build.IS_LOCAL_DEVELOPMENT}get isTestMode(){return!!this.runtime.__ZUPLO_TEST_MODE}get budgetRulesCaptureDisabled(){return this.runtime.__ZUPLO_BUDGET_RULES_CAPTURE==="off"}get budgetDimensionLogValuesEnabled(){return this.runtime.__ZUPLO_BUDGET_DIMENSION_LOG_VALUES==="on"}get systemUserAgent(){return`Zuplo/${this.build.ZUPLO_VERSION}`}get loggingEnvironmentType(){return this.isCloudflare?"edge":this.isLocalDevelopment?"local":this.isDeno?"working-copy":"unknown"}get loggingEnvironmentStage(){return this.build.ENVIRONMENT_TYPE==="PRODUCTION"?"production":this.build.ENVIRONMENT_TYPE==="PREVIEW"?"preview":this.isLocalDevelopment?"local":this.isWorkingCopy?"working-copy":"unknown"}get isWorkingCopy(){return this.build.ENVIRONMENT_TYPE==="WORKING_COPY"}get rateLimitServiceTimeoutMs(){let t=this.runtime.__ZUPLO_RATE_LIMIT_TIMEOUT_MS,n=this.config.rate_limit_service_timeout_ms,i=t??n;if(!i)return 500;let o=Number(i);return Number.isFinite(o)&&o>0?o:500}};export{N as a,w as b,y as c,K as d,ce as e,ht as f,Ee as g,he as h,Re as i,Rt as j,Ot as k,At as l,Oe as m,Ae as n,ye as o,Te as p,Pe as q,yt as r,Tt as s,Pt as t,bt as u,St as v,Lt as w,xt as x,It as y,Ut as z,Ct as A,X as B,be as C,Se as D,Le as E,xe as F,Ie as G,Ue as H,Ce as I,Ne as J,we as K,Me as L,De as M,He as N,ve as O,ze as P,Fe as Q,Ze as R,Nt as S,v as T,Ve as U,ke as V,wt as W,Mt as X,Dt as Y,Ht as Z,vt as _,_ as $,U as aa};
|
|
36
|
-
/*! For license information please see chunk-UFTMOJ7K.js.LEGAL.txt */
|
|
37
|
-
//# sourceMappingURL=chunk-UFTMOJ7K.js.map
|