@zuplo/runtime 6.73.30 → 6.74.2
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-SH74D236.js → chunk-5BL2UFIS.js} +2 -2
- package/out/esm/chunk-B5LJC45G.js +370 -0
- package/out/esm/{chunk-6E46244D.js.LEGAL.txt → chunk-B5LJC45G.js.LEGAL.txt} +5 -5
- package/out/esm/chunk-B5LJC45G.js.map +1 -0
- package/out/esm/chunk-N22BFR2U.js +37 -0
- package/out/esm/chunk-N22BFR2U.js.map +1 -0
- package/out/esm/chunk-SH5GYJN3.js +94 -0
- package/out/esm/chunk-SH5GYJN3.js.map +1 -0
- package/out/esm/{chunk-VHRZC4UF.js → chunk-WGENGK72.js} +2 -2
- package/out/esm/index.js +1 -1
- package/out/esm/index.js.map +1 -1
- package/out/esm/internal/index.js +1 -1
- package/out/esm/mcp-gateway/index.js +13 -13
- package/out/esm/mcp-gateway/index.js.map +1 -1
- package/out/esm/mocks/index.js +1 -1
- package/out/esm/mocks/index.js.map +1 -1
- package/out/esm/sdks/aws/index.js +1 -1
- package/out/types/index.d.ts +50 -2
- package/out/types/internal/index.d.ts +30 -0
- package/out/types/mcp/messages/index.d.ts +30 -0
- package/out/types/mcp-gateway/index.d.ts +30 -0
- package/out/types/mocks/index.d.ts +30 -0
- package/out/types/sdks/aws/index.d.ts +30 -0
- package/package.json +4 -2
- package/out/esm/chunk-6E46244D.js +0 -405
- package/out/esm/chunk-6E46244D.js.map +0 -1
- package/out/esm/chunk-QVZD2XRK.js +0 -30
- package/out/esm/chunk-QVZD2XRK.js.map +0 -1
- package/out/esm/chunk-YIT72S45.js +0 -37
- package/out/esm/chunk-YIT72S45.js.map +0 -1
- /package/out/esm/{chunk-SH74D236.js.map → chunk-5BL2UFIS.js.map} +0 -0
- /package/out/esm/{chunk-YIT72S45.js.LEGAL.txt → chunk-N22BFR2U.js.LEGAL.txt} +0 -0
- /package/out/esm/{chunk-VHRZC4UF.js.map → chunk-WGENGK72.js.map} +0 -0
package/out/esm/mocks/index.js
CHANGED
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{b as l}from"../chunk-
|
|
25
|
+
import{b as l}from"../chunk-5BL2UFIS.js";import{_ as n}from"../chunk-N22BFR2U.js";import{a as o}from"../chunk-TYV53J3B.js";function g(u={request:new Request("https://api.example.com")}){let e=[];function t(r){e.push(Promise.resolve(r))}return o(t,"waitUntil"),{context:new s({event:{waitUntil:t},route:u.route}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(g,"createMockContext");var a={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},s=class extends EventTarget{static{o(this,"MockZuploContext")}#e;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=a,parentContext:i}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:n.console.info,log:n.console.log,debug:n.console.debug,warn:n.console.warn,error:n.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={ip:"203.0.113.7",asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=i,this.#e=e,this.analyticsContext=new l(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,i){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addEventListener(e,t,i){let d=o(r=>{try{typeof t=="function"?t(r):t.handleEvent(r)}catch(p){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),p}},"wrapped");super.addEventListener(e,d,i)}};export{s as MockZuploContext,g as createMockContext};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@zuplo/runtime/mocks/context.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;2HA4BO,SAASA,EACdC,EAA6D,CAC3D,QAAS,IAAI,QAAQ,yBAAyB,CAChD,EACA,CACA,IAAMC,EAAwC,CAAC,EAG/C,SAASC,EAAUC,EAA6B,CAC9CF,EAAkB,KAAK,QAAQ,QAAQE,CAAO,CAAC,CACjD,CAFS,OAAAC,EAAAF,EAAA,aAaF,CAAE,QATO,IAAIG,EAAiB,CACnC,MAAO,CAAE,UAAAH,CAAU,EACnB,MAAOF,EAAQ,KACjB,CAAC,EAMiB,eAJKI,EAAA,SAAY,CACjC,MAAM,QAAQ,IAAIH,CAAiB,CACrC,EAFuB,iBAIU,CACnC,CAtBgBG,EAAAL,EAAA,qBAwBhB,IAAMO,EAA2C,CAC/C,KAAM,IACN,QAAS,CAAC,KAAK,EACf,QAAS,CACP,OAAQ,CAAC,EACT,OAAQ,SACV,EACA,IAAKF,EAAA,KAAU,CAAC,GAAX,MACP,EAMaC,EAAN,cAA+B,WAAoC,CAlE1E,MAkE0E,CAAAD,EAAA,yBAC/DG,GACA,UACA,UACA,IACA,MAEA,OACA,0BACA,cACA,iBAET,YAAY,CACV,MAAAC,EACA,MAAAC,EAAQH,EACR,cAAAI,CACF,EAIG,CACD,MAAM,EACN,KAAK,UAAY,OAAO,WAAW,EACnC,KAAK,UAAY,OAAO,WAAW,EAEnC,KAAK,IAAM,CACT,KAAMC,EAAU,QAAQ,KACxB,IAAKA,EAAU,QAAQ,IACvB,MAAOA,EAAU,QAAQ,MACzB,KAAMA,EAAU,QAAQ,KACxB,MAAOA,EAAU,QAAQ,MACzB,iBAAkBP,EAAA,IAAM,CAAC,EAAP,mBACpB,EACA,KAAK,OAAS,CAAC,EACf,KAAK,MAAQK,EACb,KAAK,0BAA4B,CAC/B,IAAK,KACL,eAAgB,eAChB,KAAM,UACN,OAAQ,aACR,WAAY,KACZ,KAAM,MACN,UAAW,KACX,QAAS,KACT,WAAY,QACZ,UAAW,MACX,SAAU,OACV,UAAW,OACX,SAAU,OACV,aAAc,OACd,WAAY,OACZ,6BAA8B,OAC9B,6BAA8B,OAC9B,4BAA6B,OAC7B,oBAAqB,OACrB,mBAAoB,OACpB,mBAAoB,OACpB,oBAAqB,MACvB,EACA,KAAK,cAAgBC,EACrB,KAAKH,GAASC,EACd,KAAK,iBAAmB,IAAII,EAA6B,KAAK,SAAS,CACzE,CAGA,UAAUT,EAAuB,CAC/B,KAAKI,GAAO,UAAUJ,CAAO,CAC/B,CAEA,oBACEU,EACAC,EACkC,CAClC,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAEA,qBACED,EACAE,EACAD,EACmB,CACnB,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAEA,YACEE,EACAC,EACmB,CACnB,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAKA,uBAAuBC,EAAmC,CACxD,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAKA,4BAA4BA,EAAwC,CAClE,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAES,iBACPC,EACAC,EACApB,EACM,CACN,IAAMqB,EAA8CjB,EAACkB,GAAM,CACzD,GAAI,CACF,OAAOF,GAAY,WAAaA,EAAQE,CAAC,EAAIF,EAAQ,YAAYE,CAAC,CACpE,OAASC,EAAK,CACZ,WAAK,IAAI,MACP,wBAAwBJ,CAAI,mCAC9B,EACMI,CACR,CACF,EAToD,WAUpD,MAAM,iBAAiBJ,EAAME,EAASrB,CAAO,CAC/C,CACF","names":["createMockContext","options","waitUntilPromises","waitUntil","promise","__name","MockZuploContext","DEFAULT_ROUTE_CONFIG","#event","event","route","parentContext","internals_default","ZuploGatewayAnalyticsContext","policyName","request","response","input","init","hook","type","handler","wrapped","e","err"]}
|
|
1
|
+
{"version":3,"sources":["@zuplo/runtime/mocks/context.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;2HA4BO,SAASA,EACdC,EAA6D,CAC3D,QAAS,IAAI,QAAQ,yBAAyB,CAChD,EACA,CACA,IAAMC,EAAwC,CAAC,EAG/C,SAASC,EAAUC,EAA6B,CAC9CF,EAAkB,KAAK,QAAQ,QAAQE,CAAO,CAAC,CACjD,CAFS,OAAAC,EAAAF,EAAA,aAaF,CAAE,QATO,IAAIG,EAAiB,CACnC,MAAO,CAAE,UAAAH,CAAU,EACnB,MAAOF,EAAQ,KACjB,CAAC,EAMiB,eAJKI,EAAA,SAAY,CACjC,MAAM,QAAQ,IAAIH,CAAiB,CACrC,EAFuB,iBAIU,CACnC,CAtBgBG,EAAAL,EAAA,qBAwBhB,IAAMO,EAA2C,CAC/C,KAAM,IACN,QAAS,CAAC,KAAK,EACf,QAAS,CACP,OAAQ,CAAC,EACT,OAAQ,SACV,EACA,IAAKF,EAAA,KAAU,CAAC,GAAX,MACP,EAMaC,EAAN,cAA+B,WAAoC,CAlE1E,MAkE0E,CAAAD,EAAA,yBAC/DG,GACA,UACA,UACA,IACA,MAEA,OACA,0BACA,cACA,iBAET,YAAY,CACV,MAAAC,EACA,MAAAC,EAAQH,EACR,cAAAI,CACF,EAIG,CACD,MAAM,EACN,KAAK,UAAY,OAAO,WAAW,EACnC,KAAK,UAAY,OAAO,WAAW,EAEnC,KAAK,IAAM,CACT,KAAMC,EAAU,QAAQ,KACxB,IAAKA,EAAU,QAAQ,IACvB,MAAOA,EAAU,QAAQ,MACzB,KAAMA,EAAU,QAAQ,KACxB,MAAOA,EAAU,QAAQ,MACzB,iBAAkBP,EAAA,IAAM,CAAC,EAAP,mBACpB,EACA,KAAK,OAAS,CAAC,EACf,KAAK,MAAQK,EACb,KAAK,0BAA4B,CAC/B,GAAI,cACJ,IAAK,KACL,eAAgB,eAChB,KAAM,UACN,OAAQ,aACR,WAAY,KACZ,KAAM,MACN,UAAW,KACX,QAAS,KACT,WAAY,QACZ,UAAW,MACX,SAAU,OACV,UAAW,OACX,SAAU,OACV,aAAc,OACd,WAAY,OACZ,6BAA8B,OAC9B,6BAA8B,OAC9B,4BAA6B,OAC7B,oBAAqB,OACrB,mBAAoB,OACpB,mBAAoB,OACpB,oBAAqB,MACvB,EACA,KAAK,cAAgBC,EACrB,KAAKH,GAASC,EACd,KAAK,iBAAmB,IAAII,EAA6B,KAAK,SAAS,CACzE,CAGA,UAAUT,EAAuB,CAC/B,KAAKI,GAAO,UAAUJ,CAAO,CAC/B,CAEA,oBACEU,EACAC,EACkC,CAClC,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAEA,qBACED,EACAE,EACAD,EACmB,CACnB,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAEA,YACEE,EACAC,EACmB,CACnB,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAKA,uBAAuBC,EAAmC,CACxD,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAKA,4BAA4BA,EAAwC,CAClE,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAES,iBACPC,EACAC,EACApB,EACM,CACN,IAAMqB,EAA8CjB,EAACkB,GAAM,CACzD,GAAI,CACF,OAAOF,GAAY,WAAaA,EAAQE,CAAC,EAAIF,EAAQ,YAAYE,CAAC,CACpE,OAASC,EAAK,CACZ,WAAK,IAAI,MACP,wBAAwBJ,CAAI,mCAC9B,EACMI,CACR,CACF,EAToD,WAUpD,MAAM,iBAAiBJ,EAAME,EAASrB,CAAO,CAC/C,CACF","names":["createMockContext","options","waitUntilPromises","waitUntil","promise","__name","MockZuploContext","DEFAULT_ROUTE_CONFIG","#event","event","route","parentContext","internals_default","ZuploGatewayAnalyticsContext","policyName","request","response","input","init","hook","type","handler","wrapped","e","err"]}
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{
|
|
25
|
+
import{I as a,J as l,K as c,L as o,O as p,P as y,Q as m}from"../../chunk-SH5GYJN3.js";import"../../chunk-UKQQD2JN.js";import"../../chunk-N22BFR2U.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Attributes } from "@opentelemetry/api";
|
|
2
|
-
import type { CallToolRequest } from "@modelcontextprotocol/
|
|
3
|
-
import type { CallToolResult } from "@modelcontextprotocol/
|
|
2
|
+
import type { CallToolRequest } from "@modelcontextprotocol/server";
|
|
3
|
+
import type { CallToolResult } from "@modelcontextprotocol/server";
|
|
4
4
|
import { InboundPolicyHandler as InboundPolicyHandler_2 } from "../../policies.js";
|
|
5
5
|
import { KeyLike } from "jose";
|
|
6
6
|
import { RequestGeneric as RequestGeneric_2 } from "../../request.js";
|
|
@@ -2670,6 +2670,8 @@ export declare interface AzureEventHubsRequestLoggerPluginOptions<T> {
|
|
|
2670
2670
|
batchPeriodSeconds: number;
|
|
2671
2671
|
}
|
|
2672
2672
|
|
|
2673
|
+
/* Excluded from this release type: BackgroundDispatchDebugLog */
|
|
2674
|
+
|
|
2673
2675
|
/**
|
|
2674
2676
|
* Utility for batching and dispatching events in the background.
|
|
2675
2677
|
* Useful for aggregating logs, metrics, or other data before sending to external services.
|
|
@@ -2729,6 +2731,22 @@ export declare class BackgroundDispatcher<TPayload> {
|
|
|
2729
2731
|
enqueue: (payload: TPayload) => void;
|
|
2730
2732
|
}
|
|
2731
2733
|
|
|
2734
|
+
/**
|
|
2735
|
+
* A background dispatch failure with an optional diagnostic that is
|
|
2736
|
+
* safe to write at debug level.
|
|
2737
|
+
*
|
|
2738
|
+
* @public
|
|
2739
|
+
*/
|
|
2740
|
+
export declare class BackgroundDispatchError extends Error {
|
|
2741
|
+
readonly debugLog: BackgroundDispatchDebugLog | undefined;
|
|
2742
|
+
constructor(
|
|
2743
|
+
message: string,
|
|
2744
|
+
options?: ErrorOptions & {
|
|
2745
|
+
debugLog?: BackgroundDispatchDebugLog;
|
|
2746
|
+
}
|
|
2747
|
+
);
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2732
2750
|
/**
|
|
2733
2751
|
* A utility for loading and caching data in the background with automatic refresh
|
|
2734
2752
|
* @public
|
|
@@ -7016,6 +7034,36 @@ declare interface IncludeMetrics {
|
|
|
7016
7034
|
* @public
|
|
7017
7035
|
*/
|
|
7018
7036
|
declare interface IncomingRequestProperties {
|
|
7037
|
+
/**
|
|
7038
|
+
* The IP address of the client that made the incoming request, for example,
|
|
7039
|
+
* "203.0.113.7".
|
|
7040
|
+
*
|
|
7041
|
+
* Use this rather than reading an IP header off `request` yourself. Which
|
|
7042
|
+
* header carries the address differs by deployment, and some are removed
|
|
7043
|
+
* from the request before your code runs, so reading one directly is either
|
|
7044
|
+
* empty or wrong depending on where the gateway is running.
|
|
7045
|
+
*
|
|
7046
|
+
* The value is `undefined` when the caller could not be identified, so
|
|
7047
|
+
* handle that case rather than substituting a placeholder, which would
|
|
7048
|
+
* become one shared identity for every unidentified caller. During local
|
|
7049
|
+
* development, where nothing identifies the caller, it falls back to
|
|
7050
|
+
* `"127.0.0.1"` instead.
|
|
7051
|
+
*
|
|
7052
|
+
* If your own CDN or load balancer sits in front of Zuplo, this is the
|
|
7053
|
+
* address of that hop rather than the end user's.
|
|
7054
|
+
*
|
|
7055
|
+
* @see {@link https://zuplo.com/docs/articles/check-ip-address} for when
|
|
7056
|
+
* this address can be trusted on each deployment type.
|
|
7057
|
+
*
|
|
7058
|
+
* @example
|
|
7059
|
+
* ```ts
|
|
7060
|
+
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
7061
|
+
* const ip = context.incomingRequestProperties.ip;
|
|
7062
|
+
* return new Response(ip ?? "unknown");
|
|
7063
|
+
* }
|
|
7064
|
+
* ```
|
|
7065
|
+
*/
|
|
7066
|
+
readonly ip: string | undefined;
|
|
7019
7067
|
/**
|
|
7020
7068
|
* ASN of the incoming request, for example, 395747.
|
|
7021
7069
|
*/
|
|
@@ -588,6 +588,36 @@ declare type HttpStatusCodeRangeDefinition =
|
|
|
588
588
|
* @public
|
|
589
589
|
*/
|
|
590
590
|
declare interface IncomingRequestProperties {
|
|
591
|
+
/**
|
|
592
|
+
* The IP address of the client that made the incoming request, for example,
|
|
593
|
+
* "203.0.113.7".
|
|
594
|
+
*
|
|
595
|
+
* Use this rather than reading an IP header off `request` yourself. Which
|
|
596
|
+
* header carries the address differs by deployment, and some are removed
|
|
597
|
+
* from the request before your code runs, so reading one directly is either
|
|
598
|
+
* empty or wrong depending on where the gateway is running.
|
|
599
|
+
*
|
|
600
|
+
* The value is `undefined` when the caller could not be identified, so
|
|
601
|
+
* handle that case rather than substituting a placeholder, which would
|
|
602
|
+
* become one shared identity for every unidentified caller. During local
|
|
603
|
+
* development, where nothing identifies the caller, it falls back to
|
|
604
|
+
* `"127.0.0.1"` instead.
|
|
605
|
+
*
|
|
606
|
+
* If your own CDN or load balancer sits in front of Zuplo, this is the
|
|
607
|
+
* address of that hop rather than the end user's.
|
|
608
|
+
*
|
|
609
|
+
* @see {@link https://zuplo.com/docs/articles/check-ip-address} for when
|
|
610
|
+
* this address can be trusted on each deployment type.
|
|
611
|
+
*
|
|
612
|
+
* @example
|
|
613
|
+
* ```ts
|
|
614
|
+
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
615
|
+
* const ip = context.incomingRequestProperties.ip;
|
|
616
|
+
* return new Response(ip ?? "unknown");
|
|
617
|
+
* }
|
|
618
|
+
* ```
|
|
619
|
+
*/
|
|
620
|
+
readonly ip: string | undefined;
|
|
591
621
|
/**
|
|
592
622
|
* ASN of the incoming request, for example, 395747.
|
|
593
623
|
*/
|
|
@@ -578,6 +578,36 @@ declare interface InboundPolicyHandler<TOptions = any> {
|
|
|
578
578
|
* @public
|
|
579
579
|
*/
|
|
580
580
|
declare interface IncomingRequestProperties {
|
|
581
|
+
/**
|
|
582
|
+
* The IP address of the client that made the incoming request, for example,
|
|
583
|
+
* "203.0.113.7".
|
|
584
|
+
*
|
|
585
|
+
* Use this rather than reading an IP header off `request` yourself. Which
|
|
586
|
+
* header carries the address differs by deployment, and some are removed
|
|
587
|
+
* from the request before your code runs, so reading one directly is either
|
|
588
|
+
* empty or wrong depending on where the gateway is running.
|
|
589
|
+
*
|
|
590
|
+
* The value is `undefined` when the caller could not be identified, so
|
|
591
|
+
* handle that case rather than substituting a placeholder, which would
|
|
592
|
+
* become one shared identity for every unidentified caller. During local
|
|
593
|
+
* development, where nothing identifies the caller, it falls back to
|
|
594
|
+
* `"127.0.0.1"` instead.
|
|
595
|
+
*
|
|
596
|
+
* If your own CDN or load balancer sits in front of Zuplo, this is the
|
|
597
|
+
* address of that hop rather than the end user's.
|
|
598
|
+
*
|
|
599
|
+
* @see {@link https://zuplo.com/docs/articles/check-ip-address} for when
|
|
600
|
+
* this address can be trusted on each deployment type.
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```ts
|
|
604
|
+
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
605
|
+
* const ip = context.incomingRequestProperties.ip;
|
|
606
|
+
* return new Response(ip ?? "unknown");
|
|
607
|
+
* }
|
|
608
|
+
* ```
|
|
609
|
+
*/
|
|
610
|
+
readonly ip: string | undefined;
|
|
581
611
|
/**
|
|
582
612
|
* ASN of the incoming request, for example, 395747.
|
|
583
613
|
*/
|
|
@@ -706,6 +706,36 @@ declare abstract class InboundPolicy<
|
|
|
706
706
|
* @public
|
|
707
707
|
*/
|
|
708
708
|
declare interface IncomingRequestProperties {
|
|
709
|
+
/**
|
|
710
|
+
* The IP address of the client that made the incoming request, for example,
|
|
711
|
+
* "203.0.113.7".
|
|
712
|
+
*
|
|
713
|
+
* Use this rather than reading an IP header off `request` yourself. Which
|
|
714
|
+
* header carries the address differs by deployment, and some are removed
|
|
715
|
+
* from the request before your code runs, so reading one directly is either
|
|
716
|
+
* empty or wrong depending on where the gateway is running.
|
|
717
|
+
*
|
|
718
|
+
* The value is `undefined` when the caller could not be identified, so
|
|
719
|
+
* handle that case rather than substituting a placeholder, which would
|
|
720
|
+
* become one shared identity for every unidentified caller. During local
|
|
721
|
+
* development, where nothing identifies the caller, it falls back to
|
|
722
|
+
* `"127.0.0.1"` instead.
|
|
723
|
+
*
|
|
724
|
+
* If your own CDN or load balancer sits in front of Zuplo, this is the
|
|
725
|
+
* address of that hop rather than the end user's.
|
|
726
|
+
*
|
|
727
|
+
* @see {@link https://zuplo.com/docs/articles/check-ip-address} for when
|
|
728
|
+
* this address can be trusted on each deployment type.
|
|
729
|
+
*
|
|
730
|
+
* @example
|
|
731
|
+
* ```ts
|
|
732
|
+
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
733
|
+
* const ip = context.incomingRequestProperties.ip;
|
|
734
|
+
* return new Response(ip ?? "unknown");
|
|
735
|
+
* }
|
|
736
|
+
* ```
|
|
737
|
+
*/
|
|
738
|
+
readonly ip: string | undefined;
|
|
709
739
|
/**
|
|
710
740
|
* ASN of the incoming request, for example, 395747.
|
|
711
741
|
*/
|
|
@@ -485,6 +485,36 @@ declare type HttpStatusCodeRangeDefinition =
|
|
|
485
485
|
* @public
|
|
486
486
|
*/
|
|
487
487
|
declare interface IncomingRequestProperties {
|
|
488
|
+
/**
|
|
489
|
+
* The IP address of the client that made the incoming request, for example,
|
|
490
|
+
* "203.0.113.7".
|
|
491
|
+
*
|
|
492
|
+
* Use this rather than reading an IP header off `request` yourself. Which
|
|
493
|
+
* header carries the address differs by deployment, and some are removed
|
|
494
|
+
* from the request before your code runs, so reading one directly is either
|
|
495
|
+
* empty or wrong depending on where the gateway is running.
|
|
496
|
+
*
|
|
497
|
+
* The value is `undefined` when the caller could not be identified, so
|
|
498
|
+
* handle that case rather than substituting a placeholder, which would
|
|
499
|
+
* become one shared identity for every unidentified caller. During local
|
|
500
|
+
* development, where nothing identifies the caller, it falls back to
|
|
501
|
+
* `"127.0.0.1"` instead.
|
|
502
|
+
*
|
|
503
|
+
* If your own CDN or load balancer sits in front of Zuplo, this is the
|
|
504
|
+
* address of that hop rather than the end user's.
|
|
505
|
+
*
|
|
506
|
+
* @see {@link https://zuplo.com/docs/articles/check-ip-address} for when
|
|
507
|
+
* this address can be trusted on each deployment type.
|
|
508
|
+
*
|
|
509
|
+
* @example
|
|
510
|
+
* ```ts
|
|
511
|
+
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
512
|
+
* const ip = context.incomingRequestProperties.ip;
|
|
513
|
+
* return new Response(ip ?? "unknown");
|
|
514
|
+
* }
|
|
515
|
+
* ```
|
|
516
|
+
*/
|
|
517
|
+
readonly ip: string | undefined;
|
|
488
518
|
/**
|
|
489
519
|
* ASN of the incoming request, for example, 395747.
|
|
490
520
|
*/
|
|
@@ -862,6 +862,36 @@ declare type HttpStatusCodeRangeDefinition =
|
|
|
862
862
|
* @public
|
|
863
863
|
*/
|
|
864
864
|
declare interface IncomingRequestProperties {
|
|
865
|
+
/**
|
|
866
|
+
* The IP address of the client that made the incoming request, for example,
|
|
867
|
+
* "203.0.113.7".
|
|
868
|
+
*
|
|
869
|
+
* Use this rather than reading an IP header off `request` yourself. Which
|
|
870
|
+
* header carries the address differs by deployment, and some are removed
|
|
871
|
+
* from the request before your code runs, so reading one directly is either
|
|
872
|
+
* empty or wrong depending on where the gateway is running.
|
|
873
|
+
*
|
|
874
|
+
* The value is `undefined` when the caller could not be identified, so
|
|
875
|
+
* handle that case rather than substituting a placeholder, which would
|
|
876
|
+
* become one shared identity for every unidentified caller. During local
|
|
877
|
+
* development, where nothing identifies the caller, it falls back to
|
|
878
|
+
* `"127.0.0.1"` instead.
|
|
879
|
+
*
|
|
880
|
+
* If your own CDN or load balancer sits in front of Zuplo, this is the
|
|
881
|
+
* address of that hop rather than the end user's.
|
|
882
|
+
*
|
|
883
|
+
* @see {@link https://zuplo.com/docs/articles/check-ip-address} for when
|
|
884
|
+
* this address can be trusted on each deployment type.
|
|
885
|
+
*
|
|
886
|
+
* @example
|
|
887
|
+
* ```ts
|
|
888
|
+
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
889
|
+
* const ip = context.incomingRequestProperties.ip;
|
|
890
|
+
* return new Response(ip ?? "unknown");
|
|
891
|
+
* }
|
|
892
|
+
* ```
|
|
893
|
+
*/
|
|
894
|
+
readonly ip: string | undefined;
|
|
865
895
|
/**
|
|
866
896
|
* ASN of the incoming request, for example, 395747.
|
|
867
897
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.74.2",
|
|
5
5
|
"repository": "https://github.com/zuplo/zuplo",
|
|
6
6
|
"author": "Zuplo, Inc.",
|
|
7
7
|
"exports": {
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@cfworker/json-schema": "4.1.1",
|
|
48
|
+
"@modelcontextprotocol/core": "^2.0.0",
|
|
48
49
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
50
|
+
"@modelcontextprotocol/server": "^2.0.0",
|
|
49
51
|
"@opentelemetry/api": "1.9.0",
|
|
50
52
|
"@opentelemetry/api-logs": "0.220.0",
|
|
51
53
|
"ajv": "^8.17.1",
|
|
@@ -55,6 +57,6 @@
|
|
|
55
57
|
"jose": "^5.6.3",
|
|
56
58
|
"path-to-regexp": "^6.3.0",
|
|
57
59
|
"uuid": "^11.1.0",
|
|
58
|
-
"zod": "
|
|
60
|
+
"zod": "4.4.3"
|
|
59
61
|
}
|
|
60
62
|
}
|