@sequenzy/mcp 0.0.36 → 0.0.37
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/dist/index.js +1 -1
- package/package.json +7 -3
- package/server.json +6 -7
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var N5=Object.create;var{getPrototypeOf:w5,defineProperty:UQ,getOwnPropertyNames
|
|
|
27
27
|
|
|
28
28
|
`)}L.write("payload.value = newResult;"),L.write("return payload;");let S=L.compile();return(E,x)=>S(B,E,x)},$,J=U1,z=!f6.jitless,A=z&&FQ.value,K=X.catchall,U;Q._zod.parse=(B,L)=>{U??(U=W.value);let q=B.value;if(!J(q))return B.issues.push({expected:"object",code:"invalid_type",input:q,inst:Q}),B;if(z&&A&&L?.async===!1&&L.jitless!==!0){if(!$)$=G(X.shape);if(B=$(B,L),!K)return B;return SY([],q,B,L,U,Q)}return Y(B,L)}});function i8(Q,X,Y,W){for(let $ of Q)if($.issues.length===0)return X.value=$.value,X;let G=Q.filter(($)=>!e0($));if(G.length===1)return X.value=G[0].value,G[0];return X.issues.push({code:"invalid_union",input:X.value,inst:Y,errors:Q.map(($)=>$.issues.map((J)=>E0(J,W,N0())))}),X}var EQ=F("$ZodUnion",(Q,X)=>{i.init(Q,X),m(Q._zod,"optin",()=>X.options.some((G)=>G._zod.optin==="optional")?"optional":void 0),m(Q._zod,"optout",()=>X.options.some((G)=>G._zod.optout==="optional")?"optional":void 0),m(Q._zod,"values",()=>{if(X.options.every((G)=>G._zod.values))return new Set(X.options.flatMap((G)=>Array.from(G._zod.values)));return}),m(Q._zod,"pattern",()=>{if(X.options.every((G)=>G._zod.pattern)){let G=X.options.map(($)=>$._zod.pattern);return new RegExp(`^(${G.map(($)=>n1($.source)).join("|")})$`)}return});let Y=X.options.length===1,W=X.options[0]._zod.run;Q._zod.parse=(G,$)=>{if(Y)return W(G,$);let J=!1,z=[];for(let H of X.options){let A=H._zod.run({value:G.value,issues:[]},$);if(A instanceof Promise)z.push(A),J=!0;else{if(A.issues.length===0)return A;z.push(A)}}if(!J)return i8(z,G,Q,$);return Promise.all(z).then((H)=>{return i8(H,G,Q,$)})}}),CY=F("$ZodDiscriminatedUnion",(Q,X)=>{EQ.init(Q,X);let Y=Q._zod.parse;m(Q._zod,"propValues",()=>{let G={};for(let $ of X.options){let J=$._zod.propValues;if(!J||Object.keys(J).length===0)throw Error(`Invalid discriminated union option at index "${X.options.indexOf($)}"`);for(let[z,H]of Object.entries(J)){if(!G[z])G[z]=new Set;for(let A of H)G[z].add(A)}}return G});let W=w1(()=>{let G=X.options,$=new Map;for(let J of G){let z=J._zod.propValues?.[X.discriminator];if(!z||z.size===0)throw Error(`Invalid discriminated union option at index "${X.options.indexOf(J)}"`);for(let H of z){if($.has(H))throw Error(`Duplicate discriminator value "${String(H)}"`);$.set(H,J)}}return $});Q._zod.parse=(G,$)=>{let J=G.value;if(!U1(J))return G.issues.push({code:"invalid_type",expected:"object",input:J,inst:Q}),G;let z=W.value.get(J?.[X.discriminator]);if(z)return z._zod.run(G,$);if(X.unionFallback)return Y(G,$);return G.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:X.discriminator,input:J,path:[X.discriminator],inst:Q}),G}}),kY=F("$ZodIntersection",(Q,X)=>{i.init(Q,X),Q._zod.parse=(Y,W)=>{let G=Y.value,$=X.left._zod.run({value:G,issues:[]},W),J=X.right._zod.run({value:G,issues:[]},W);if($ instanceof Promise||J instanceof Promise)return Promise.all([$,J]).then(([H,A])=>{return n8(Y,H,A)});return n8(Y,$,J)}});function PQ(Q,X){if(Q===X)return{valid:!0,data:Q};if(Q instanceof Date&&X instanceof Date&&+Q===+X)return{valid:!0,data:Q};if(s0(Q)&&s0(X)){let Y=Object.keys(X),W=Object.keys(Q).filter(($)=>Y.indexOf($)!==-1),G={...Q,...X};for(let $ of W){let J=PQ(Q[$],X[$]);if(!J.valid)return{valid:!1,mergeErrorPath:[$,...J.mergeErrorPath]};G[$]=J.data}return{valid:!0,data:G}}if(Array.isArray(Q)&&Array.isArray(X)){if(Q.length!==X.length)return{valid:!1,mergeErrorPath:[]};let Y=[];for(let W=0;W<Q.length;W++){let G=Q[W],$=X[W],J=PQ(G,$);if(!J.valid)return{valid:!1,mergeErrorPath:[W,...J.mergeErrorPath]};Y.push(J.data)}return{valid:!0,data:Y}}return{valid:!1,mergeErrorPath:[]}}function n8(Q,X,Y){if(X.issues.length)Q.issues.push(...X.issues);if(Y.issues.length)Q.issues.push(...Y.issues);if(e0(Q))return Q;let W=PQ(X.value,Y.value);if(!W.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(W.mergeErrorPath)}`);return Q.value=W.data,Q}var vY=F("$ZodRecord",(Q,X)=>{i.init(Q,X),Q._zod.parse=(Y,W)=>{let G=Y.value;if(!s0(G))return Y.issues.push({expected:"record",code:"invalid_type",input:G,inst:Q}),Y;let $=[];if(X.keyType._zod.values){let J=X.keyType._zod.values;Y.value={};for(let H of J)if(typeof H==="string"||typeof H==="number"||typeof H==="symbol"){let A=X.valueType._zod.run({value:G[H],issues:[]},W);if(A instanceof Promise)$.push(A.then((K)=>{if(K.issues.length)Y.issues.push(...m0(H,K.issues));Y.value[H]=K.value}));else{if(A.issues.length)Y.issues.push(...m0(H,A.issues));Y.value[H]=A.value}}let z;for(let H in G)if(!J.has(H))z=z??[],z.push(H);if(z&&z.length>0)Y.issues.push({code:"unrecognized_keys",input:G,inst:Q,keys:z})}else{Y.value={};for(let J of Reflect.ownKeys(G)){if(J==="__proto__")continue;let z=X.keyType._zod.run({value:J,issues:[]},W);if(z instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(z.issues.length){Y.issues.push({code:"invalid_key",origin:"record",issues:z.issues.map((A)=>E0(A,W,N0())),input:J,path:[J],inst:Q}),Y.value[z.value]=z.value;continue}let H=X.valueType._zod.run({value:G[J],issues:[]},W);if(H instanceof Promise)$.push(H.then((A)=>{if(A.issues.length)Y.issues.push(...m0(J,A.issues));Y.value[z.value]=A.value}));else{if(H.issues.length)Y.issues.push(...m0(J,H.issues));Y.value[z.value]=H.value}}}if($.length)return Promise.all($).then(()=>Y);return Y}});var xY=F("$ZodEnum",(Q,X)=>{i.init(Q,X);let Y=DQ(X.entries),W=new Set(Y);Q._zod.values=W,Q._zod.pattern=new RegExp(`^(${Y.filter((G)=>qQ.has(typeof G)).map((G)=>typeof G==="string"?l0(G):G.toString()).join("|")})$`),Q._zod.parse=(G,$)=>{let J=G.value;if(W.has(J))return G;return G.issues.push({code:"invalid_value",values:Y,input:J,inst:Q}),G}}),_Y=F("$ZodLiteral",(Q,X)=>{if(i.init(Q,X),X.values.length===0)throw Error("Cannot create literal schema with no valid values");Q._zod.values=new Set(X.values),Q._zod.pattern=new RegExp(`^(${X.values.map((Y)=>typeof Y==="string"?l0(Y):Y?l0(Y.toString()):String(Y)).join("|")})$`),Q._zod.parse=(Y,W)=>{let G=Y.value;if(Q._zod.values.has(G))return Y;return Y.issues.push({code:"invalid_value",values:X.values,input:G,inst:Q}),Y}});var yY=F("$ZodTransform",(Q,X)=>{i.init(Q,X),Q._zod.parse=(Y,W)=>{if(W.direction==="backward")throw new c1(Q.constructor.name);let G=X.transform(Y.value,Y);if(W.async)return(G instanceof Promise?G:Promise.resolve(G)).then((J)=>{return Y.value=J,Y});if(G instanceof Promise)throw new f0;return Y.value=G,Y}});function r8(Q,X){if(Q.issues.length&&X===void 0)return{issues:[],value:void 0};return Q}var gY=F("$ZodOptional",(Q,X)=>{i.init(Q,X),Q._zod.optin="optional",Q._zod.optout="optional",m(Q._zod,"values",()=>{return X.innerType._zod.values?new Set([...X.innerType._zod.values,void 0]):void 0}),m(Q._zod,"pattern",()=>{let Y=X.innerType._zod.pattern;return Y?new RegExp(`^(${n1(Y.source)})?$`):void 0}),Q._zod.parse=(Y,W)=>{if(X.innerType._zod.optin==="optional"){let G=X.innerType._zod.run(Y,W);if(G instanceof Promise)return G.then(($)=>r8($,Y.value));return r8(G,Y.value)}if(Y.value===void 0)return Y;return X.innerType._zod.run(Y,W)}}),uY=F("$ZodNullable",(Q,X)=>{i.init(Q,X),m(Q._zod,"optin",()=>X.innerType._zod.optin),m(Q._zod,"optout",()=>X.innerType._zod.optout),m(Q._zod,"pattern",()=>{let Y=X.innerType._zod.pattern;return Y?new RegExp(`^(${n1(Y.source)}|null)$`):void 0}),m(Q._zod,"values",()=>{return X.innerType._zod.values?new Set([...X.innerType._zod.values,null]):void 0}),Q._zod.parse=(Y,W)=>{if(Y.value===null)return Y;return X.innerType._zod.run(Y,W)}}),hY=F("$ZodDefault",(Q,X)=>{i.init(Q,X),Q._zod.optin="optional",m(Q._zod,"values",()=>X.innerType._zod.values),Q._zod.parse=(Y,W)=>{if(W.direction==="backward")return X.innerType._zod.run(Y,W);if(Y.value===void 0)return Y.value=X.defaultValue,Y;let G=X.innerType._zod.run(Y,W);if(G instanceof Promise)return G.then(($)=>d8($,X));return d8(G,X)}});function d8(Q,X){if(Q.value===void 0)Q.value=X.defaultValue;return Q}var fY=F("$ZodPrefault",(Q,X)=>{i.init(Q,X),Q._zod.optin="optional",m(Q._zod,"values",()=>X.innerType._zod.values),Q._zod.parse=(Y,W)=>{if(W.direction==="backward")return X.innerType._zod.run(Y,W);if(Y.value===void 0)Y.value=X.defaultValue;return X.innerType._zod.run(Y,W)}}),lY=F("$ZodNonOptional",(Q,X)=>{i.init(Q,X),m(Q._zod,"values",()=>{let Y=X.innerType._zod.values;return Y?new Set([...Y].filter((W)=>W!==void 0)):void 0}),Q._zod.parse=(Y,W)=>{let G=X.innerType._zod.run(Y,W);if(G instanceof Promise)return G.then(($)=>o8($,Q));return o8(G,Q)}});function o8(Q,X){if(!Q.issues.length&&Q.value===void 0)Q.issues.push({code:"invalid_type",expected:"nonoptional",input:Q.value,inst:X});return Q}var mY=F("$ZodCatch",(Q,X)=>{i.init(Q,X),m(Q._zod,"optin",()=>X.innerType._zod.optin),m(Q._zod,"optout",()=>X.innerType._zod.optout),m(Q._zod,"values",()=>X.innerType._zod.values),Q._zod.parse=(Y,W)=>{if(W.direction==="backward")return X.innerType._zod.run(Y,W);let G=X.innerType._zod.run(Y,W);if(G instanceof Promise)return G.then(($)=>{if(Y.value=$.value,$.issues.length)Y.value=X.catchValue({...Y,error:{issues:$.issues.map((J)=>E0(J,W,N0()))},input:Y.value}),Y.issues=[];return Y});if(Y.value=G.value,G.issues.length)Y.value=X.catchValue({...Y,error:{issues:G.issues.map(($)=>E0($,W,N0()))},input:Y.value}),Y.issues=[];return Y}});var cY=F("$ZodPipe",(Q,X)=>{i.init(Q,X),m(Q._zod,"values",()=>X.in._zod.values),m(Q._zod,"optin",()=>X.in._zod.optin),m(Q._zod,"optout",()=>X.out._zod.optout),m(Q._zod,"propValues",()=>X.in._zod.propValues),Q._zod.parse=(Y,W)=>{if(W.direction==="backward"){let $=X.out._zod.run(Y,W);if($ instanceof Promise)return $.then((J)=>t6(J,X.in,W));return t6($,X.in,W)}let G=X.in._zod.run(Y,W);if(G instanceof Promise)return G.then(($)=>t6($,X.out,W));return t6(G,X.out,W)}});function t6(Q,X,Y){if(Q.issues.length)return Q.aborted=!0,Q;return X._zod.run({value:Q.value,issues:Q.issues},Y)}var pY=F("$ZodReadonly",(Q,X)=>{i.init(Q,X),m(Q._zod,"propValues",()=>X.innerType._zod.propValues),m(Q._zod,"values",()=>X.innerType._zod.values),m(Q._zod,"optin",()=>X.innerType._zod.optin),m(Q._zod,"optout",()=>X.innerType._zod.optout),Q._zod.parse=(Y,W)=>{if(W.direction==="backward")return X.innerType._zod.run(Y,W);let G=X.innerType._zod.run(Y,W);if(G instanceof Promise)return G.then(t8);return t8(G)}});function t8(Q){return Q.value=Object.freeze(Q.value),Q}var iY=F("$ZodCustom",(Q,X)=>{W0.init(Q,X),i.init(Q,X),Q._zod.parse=(Y,W)=>{return Y},Q._zod.check=(Y)=>{let W=Y.value,G=X.fn(W);if(G instanceof Promise)return G.then(($)=>a8($,Y,W,Q));a8(G,Y,W,Q);return}});function a8(Q,X,Y,W){if(!Q){let G={code:"custom",input:Y,inst:W,path:[...W._zod.def.path??[]],continue:!W._zod.def.abort};if(W._zod.def.params)G.params=W._zod.def.params;X.issues.push(b1(G))}}var zH=(Q)=>{let X=typeof Q;switch(X){case"number":return Number.isNaN(Q)?"NaN":"number";case"object":{if(Array.isArray(Q))return"array";if(Q===null)return"null";if(Object.getPrototypeOf(Q)!==Object.prototype&&Q.constructor)return Q.constructor.name}}return X},HH=()=>{let Q={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function X(W){return Q[W]??null}let Y={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return(W)=>{switch(W.code){case"invalid_type":return`Invalid input: expected ${W.expected}, received ${zH(W.input)}`;case"invalid_value":if(W.values.length===1)return`Invalid input: expected ${p6(W.values[0])}`;return`Invalid option: expected one of ${l6(W.values,"|")}`;case"too_big":{let G=W.inclusive?"<=":"<",$=X(W.origin);if($)return`Too big: expected ${W.origin??"value"} to have ${G}${W.maximum.toString()} ${$.unit??"elements"}`;return`Too big: expected ${W.origin??"value"} to be ${G}${W.maximum.toString()}`}case"too_small":{let G=W.inclusive?">=":">",$=X(W.origin);if($)return`Too small: expected ${W.origin} to have ${G}${W.minimum.toString()} ${$.unit}`;return`Too small: expected ${W.origin} to be ${G}${W.minimum.toString()}`}case"invalid_format":{let G=W;if(G.format==="starts_with")return`Invalid string: must start with "${G.prefix}"`;if(G.format==="ends_with")return`Invalid string: must end with "${G.suffix}"`;if(G.format==="includes")return`Invalid string: must include "${G.includes}"`;if(G.format==="regex")return`Invalid string: must match pattern ${G.pattern}`;return`Invalid ${Y[G.format]??W.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${W.divisor}`;case"unrecognized_keys":return`Unrecognized key${W.keys.length>1?"s":""}: ${l6(W.keys,", ")}`;case"invalid_key":return`Invalid key in ${W.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${W.origin}`;default:return"Invalid input"}}};function TQ(){return{localeError:HH()}}var fM=Symbol("ZodOutput"),lM=Symbol("ZodInput");class nY{constructor(){this._map=new WeakMap,this._idmap=new Map}add(Q,...X){let Y=X[0];if(this._map.set(Q,Y),Y&&typeof Y==="object"&&"id"in Y){if(this._idmap.has(Y.id))throw Error(`ID ${Y.id} already exists in the registry`);this._idmap.set(Y.id,Q)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(Q){let X=this._map.get(Q);if(X&&typeof X==="object"&&"id"in X)this._idmap.delete(X.id);return this._map.delete(Q),this}get(Q){let X=Q._zod.parent;if(X){let Y={...this.get(X)??{}};delete Y.id;let W={...Y,...this._map.get(Q)};return Object.keys(W).length?W:void 0}return this._map.get(Q)}has(Q){return this._map.has(Q)}}function AH(){return new nY}var s1=AH();function rY(Q,X){return new Q({type:"string",...I(X)})}function dY(Q,X){return new Q({type:"string",format:"email",check:"string_format",abort:!1,...I(X)})}function SQ(Q,X){return new Q({type:"string",format:"guid",check:"string_format",abort:!1,...I(X)})}function oY(Q,X){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,...I(X)})}function tY(Q,X){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(X)})}function aY(Q,X){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(X)})}function sY(Q,X){return new Q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(X)})}function eY(Q,X){return new Q({type:"string",format:"url",check:"string_format",abort:!1,...I(X)})}function QW(Q,X){return new Q({type:"string",format:"emoji",check:"string_format",abort:!1,...I(X)})}function XW(Q,X){return new Q({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(X)})}function YW(Q,X){return new Q({type:"string",format:"cuid",check:"string_format",abort:!1,...I(X)})}function WW(Q,X){return new Q({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(X)})}function GW(Q,X){return new Q({type:"string",format:"ulid",check:"string_format",abort:!1,...I(X)})}function $W(Q,X){return new Q({type:"string",format:"xid",check:"string_format",abort:!1,...I(X)})}function JW(Q,X){return new Q({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(X)})}function zW(Q,X){return new Q({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(X)})}function HW(Q,X){return new Q({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(X)})}function AW(Q,X){return new Q({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(X)})}function KW(Q,X){return new Q({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(X)})}function UW(Q,X){return new Q({type:"string",format:"base64",check:"string_format",abort:!1,...I(X)})}function BW(Q,X){return new Q({type:"string",format:"base64url",check:"string_format",abort:!1,...I(X)})}function DW(Q,X){return new Q({type:"string",format:"e164",check:"string_format",abort:!1,...I(X)})}function LW(Q,X){return new Q({type:"string",format:"jwt",check:"string_format",abort:!1,...I(X)})}function FW(Q,X){return new Q({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(X)})}function qW(Q,X){return new Q({type:"string",format:"date",check:"string_format",...I(X)})}function OW(Q,X){return new Q({type:"string",format:"time",check:"string_format",precision:null,...I(X)})}function MW(Q,X){return new Q({type:"string",format:"duration",check:"string_format",...I(X)})}function VW(Q,X){return new Q({type:"number",checks:[],...I(X)})}function ZW(Q,X){return new Q({type:"number",check:"number_format",abort:!1,format:"safeint",...I(X)})}function NW(Q,X){return new Q({type:"boolean",...I(X)})}function wW(Q,X){return new Q({type:"null",...I(X)})}function bW(Q){return new Q({type:"unknown"})}function jW(Q,X){return new Q({type:"never",...I(X)})}function e6(Q,X){return new wQ({check:"less_than",...I(X),value:Q,inclusive:!1})}function e1(Q,X){return new wQ({check:"less_than",...I(X),value:Q,inclusive:!0})}function Q4(Q,X){return new bQ({check:"greater_than",...I(X),value:Q,inclusive:!1})}function Q6(Q,X){return new bQ({check:"greater_than",...I(X),value:Q,inclusive:!0})}function X4(Q,X){return new R8({check:"multiple_of",...I(X),value:Q})}function Y4(Q,X){return new k8({check:"max_length",...I(X),maximum:Q})}function j1(Q,X){return new v8({check:"min_length",...I(X),minimum:Q})}function W4(Q,X){return new x8({check:"length_equals",...I(X),length:Q})}function RQ(Q,X){return new _8({check:"string_format",format:"regex",...I(X),pattern:Q})}function CQ(Q){return new y8({check:"string_format",format:"lowercase",...I(Q)})}function kQ(Q){return new g8({check:"string_format",format:"uppercase",...I(Q)})}function vQ(Q,X){return new u8({check:"string_format",format:"includes",...I(X),includes:Q})}function xQ(Q,X){return new h8({check:"string_format",format:"starts_with",...I(X),prefix:Q})}function _Q(Q,X){return new f8({check:"string_format",format:"ends_with",...I(X),suffix:Q})}function B1(Q){return new l8({check:"overwrite",tx:Q})}function yQ(Q){return B1((X)=>X.normalize(Q))}function gQ(){return B1((Q)=>Q.trim())}function uQ(){return B1((Q)=>Q.toLowerCase())}function hQ(){return B1((Q)=>Q.toUpperCase())}function PW(Q,X,Y){return new Q({type:"array",element:X,...I(Y)})}function IW(Q,X,Y){let W=I(Y);return W.abort??(W.abort=!0),new Q({type:"custom",check:"custom",fn:X,...W})}function EW(Q,X,Y){return new Q({type:"custom",check:"custom",fn:X,...I(Y)})}function TW(Q){let X=KH((Y)=>{return Y.addIssue=(W)=>{if(typeof W==="string")Y.issues.push(b1(W,Y.value,X._zod.def));else{let G=W;if(G.fatal)G.continue=!1;G.code??(G.code="custom"),G.input??(G.input=Y.value),G.inst??(G.inst=X),G.continue??(G.continue=!X._zod.def.abort),Y.issues.push(b1(G))}},Q(Y.value,Y)});return X}function KH(Q,X){let Y=new W0({check:"custom",...I(X)});return Y._zod.check=Q,Y}function P1(Q){return!!Q._zod}function Q1(Q,X){if(P1(Q))return o1(Q,X);return Q.safeParse(X)}function G4(Q){if(!Q)return;let X;if(P1(Q))X=Q._zod?.def?.shape;else X=Q.shape;if(!X)return;if(typeof X==="function")try{return X()}catch{return}return X}function SW(Q){if(P1(Q)){let $=Q._zod?.def;if($){if($.value!==void 0)return $.value;if(Array.isArray($.values)&&$.values.length>0)return $.values[0]}}let Y=Q._def;if(Y){if(Y.value!==void 0)return Y.value;if(Array.isArray(Y.values)&&Y.values.length>0)return Y.values[0]}let W=Q.value;if(W!==void 0)return W;return}var Y6={};xX(Y6,{time:()=>mQ,duration:()=>cQ,datetime:()=>fQ,date:()=>lQ,ZodISOTime:()=>kW,ZodISODuration:()=>vW,ZodISODateTime:()=>RW,ZodISODate:()=>CW});var RW=F("ZodISODateTime",(Q,X)=>{AY.init(Q,X),d.init(Q,X)});function fQ(Q){return FW(RW,Q)}var CW=F("ZodISODate",(Q,X)=>{KY.init(Q,X),d.init(Q,X)});function lQ(Q){return qW(CW,Q)}var kW=F("ZodISOTime",(Q,X)=>{UY.init(Q,X),d.init(Q,X)});function mQ(Q){return OW(kW,Q)}var vW=F("ZodISODuration",(Q,X)=>{BY.init(Q,X),d.init(Q,X)});function cQ(Q){return MW(vW,Q)}var xW=(Q,X)=>{i6.init(Q,X),Q.name="ZodError",Object.defineProperties(Q,{format:{value:(Y)=>iX(Q,Y)},flatten:{value:(Y)=>pX(Q,Y)},addIssue:{value:(Y)=>{Q.issues.push(Y),Q.message=JSON.stringify(Q.issues,N1,2)}},addIssues:{value:(Y)=>{Q.issues.push(...Y),Q.message=JSON.stringify(Q.issues,N1,2)}},isEmpty:{get(){return Q.issues.length===0}}})},IV=F("ZodError",xW),V0=F("ZodError",xW,{Parent:Error});var _W=n6(V0),yW=r6(V0),gW=d1(V0),uW=t1(V0),hW=nX(V0),fW=rX(V0),lW=dX(V0),mW=oX(V0),cW=tX(V0),pW=aX(V0),iW=sX(V0),nW=eX(V0);var s=F("ZodType",(Q,X)=>{return i.init(Q,X),Q.def=X,Q.type=X.type,Object.defineProperty(Q,"_def",{value:X}),Q.check=(...Y)=>{return Q.clone(h.mergeDefs(X,{checks:[...X.checks??[],...Y.map((W)=>typeof W==="function"?{_zod:{check:W,def:{check:"custom"},onattach:[]}}:W)]}))},Q.clone=(Y,W)=>I0(Q,Y,W),Q.brand=()=>Q,Q.register=(Y,W)=>{return Y.add(Q,W),Q},Q.parse=(Y,W)=>_W(Q,Y,W,{callee:Q.parse}),Q.safeParse=(Y,W)=>gW(Q,Y,W),Q.parseAsync=async(Y,W)=>yW(Q,Y,W,{callee:Q.parseAsync}),Q.safeParseAsync=async(Y,W)=>uW(Q,Y,W),Q.spa=Q.safeParseAsync,Q.encode=(Y,W)=>hW(Q,Y,W),Q.decode=(Y,W)=>fW(Q,Y,W),Q.encodeAsync=async(Y,W)=>lW(Q,Y,W),Q.decodeAsync=async(Y,W)=>mW(Q,Y,W),Q.safeEncode=(Y,W)=>cW(Q,Y,W),Q.safeDecode=(Y,W)=>pW(Q,Y,W),Q.safeEncodeAsync=async(Y,W)=>iW(Q,Y,W),Q.safeDecodeAsync=async(Y,W)=>nW(Q,Y,W),Q.refine=(Y,W)=>Q.check(J3(Y,W)),Q.superRefine=(Y)=>Q.check(z3(Y)),Q.overwrite=(Y)=>Q.check(B1(Y)),Q.optional=()=>a(Q),Q.nullable=()=>oW(Q),Q.nullish=()=>a(oW(Q)),Q.nonoptional=(Y)=>Q3(Q,Y),Q.array=()=>_(Q),Q.or=(Y)=>p([Q,Y]),Q.and=(Y)=>J4(Q,Y),Q.transform=(Y)=>iQ(Q,QG(Y)),Q.default=(Y)=>aH(Q,Y),Q.prefault=(Y)=>eH(Q,Y),Q.catch=(Y)=>Y3(Q,Y),Q.pipe=(Y)=>iQ(Q,Y),Q.readonly=()=>$3(Q),Q.describe=(Y)=>{let W=Q.clone();return s1.add(W,{description:Y}),W},Object.defineProperty(Q,"description",{get(){return s1.get(Q)?.description},configurable:!0}),Q.meta=(...Y)=>{if(Y.length===0)return s1.get(Q);let W=Q.clone();return s1.add(W,Y[0]),W},Q.isOptional=()=>Q.safeParse(void 0).success,Q.isNullable=()=>Q.safeParse(null).success,Q}),tW=F("_ZodString",(Q,X)=>{s6.init(Q,X),s.init(Q,X);let Y=Q._zod.bag;Q.format=Y.format??null,Q.minLength=Y.minimum??null,Q.maxLength=Y.maximum??null,Q.regex=(...W)=>Q.check(RQ(...W)),Q.includes=(...W)=>Q.check(vQ(...W)),Q.startsWith=(...W)=>Q.check(xQ(...W)),Q.endsWith=(...W)=>Q.check(_Q(...W)),Q.min=(...W)=>Q.check(j1(...W)),Q.max=(...W)=>Q.check(Y4(...W)),Q.length=(...W)=>Q.check(W4(...W)),Q.nonempty=(...W)=>Q.check(j1(1,...W)),Q.lowercase=(W)=>Q.check(CQ(W)),Q.uppercase=(W)=>Q.check(kQ(W)),Q.trim=()=>Q.check(gQ()),Q.normalize=(...W)=>Q.check(yQ(...W)),Q.toLowerCase=()=>Q.check(uQ()),Q.toUpperCase=()=>Q.check(hQ())}),VH=F("ZodString",(Q,X)=>{s6.init(Q,X),tW.init(Q,X),Q.email=(Y)=>Q.check(dY(ZH,Y)),Q.url=(Y)=>Q.check(eY(NH,Y)),Q.jwt=(Y)=>Q.check(LW(yH,Y)),Q.emoji=(Y)=>Q.check(QW(wH,Y)),Q.guid=(Y)=>Q.check(SQ(rW,Y)),Q.uuid=(Y)=>Q.check(oY($4,Y)),Q.uuidv4=(Y)=>Q.check(tY($4,Y)),Q.uuidv6=(Y)=>Q.check(aY($4,Y)),Q.uuidv7=(Y)=>Q.check(sY($4,Y)),Q.nanoid=(Y)=>Q.check(XW(bH,Y)),Q.guid=(Y)=>Q.check(SQ(rW,Y)),Q.cuid=(Y)=>Q.check(YW(jH,Y)),Q.cuid2=(Y)=>Q.check(WW(PH,Y)),Q.ulid=(Y)=>Q.check(GW(IH,Y)),Q.base64=(Y)=>Q.check(UW(vH,Y)),Q.base64url=(Y)=>Q.check(BW(xH,Y)),Q.xid=(Y)=>Q.check($W(EH,Y)),Q.ksuid=(Y)=>Q.check(JW(TH,Y)),Q.ipv4=(Y)=>Q.check(zW(SH,Y)),Q.ipv6=(Y)=>Q.check(HW(RH,Y)),Q.cidrv4=(Y)=>Q.check(AW(CH,Y)),Q.cidrv6=(Y)=>Q.check(KW(kH,Y)),Q.e164=(Y)=>Q.check(DW(_H,Y)),Q.datetime=(Y)=>Q.check(fQ(Y)),Q.date=(Y)=>Q.check(lQ(Y)),Q.time=(Y)=>Q.check(mQ(Y)),Q.duration=(Y)=>Q.check(cQ(Y))});function D(Q){return rY(VH,Q)}var d=F("ZodStringFormat",(Q,X)=>{n.init(Q,X),tW.init(Q,X)}),ZH=F("ZodEmail",(Q,X)=>{QY.init(Q,X),d.init(Q,X)});var rW=F("ZodGUID",(Q,X)=>{s8.init(Q,X),d.init(Q,X)});var $4=F("ZodUUID",(Q,X)=>{e8.init(Q,X),d.init(Q,X)});var NH=F("ZodURL",(Q,X)=>{XY.init(Q,X),d.init(Q,X)});var wH=F("ZodEmoji",(Q,X)=>{YY.init(Q,X),d.init(Q,X)});var bH=F("ZodNanoID",(Q,X)=>{WY.init(Q,X),d.init(Q,X)});var jH=F("ZodCUID",(Q,X)=>{GY.init(Q,X),d.init(Q,X)});var PH=F("ZodCUID2",(Q,X)=>{$Y.init(Q,X),d.init(Q,X)});var IH=F("ZodULID",(Q,X)=>{JY.init(Q,X),d.init(Q,X)});var EH=F("ZodXID",(Q,X)=>{zY.init(Q,X),d.init(Q,X)});var TH=F("ZodKSUID",(Q,X)=>{HY.init(Q,X),d.init(Q,X)});var SH=F("ZodIPv4",(Q,X)=>{DY.init(Q,X),d.init(Q,X)});var RH=F("ZodIPv6",(Q,X)=>{LY.init(Q,X),d.init(Q,X)});var CH=F("ZodCIDRv4",(Q,X)=>{FY.init(Q,X),d.init(Q,X)});var kH=F("ZodCIDRv6",(Q,X)=>{qY.init(Q,X),d.init(Q,X)});var vH=F("ZodBase64",(Q,X)=>{MY.init(Q,X),d.init(Q,X)});var xH=F("ZodBase64URL",(Q,X)=>{VY.init(Q,X),d.init(Q,X)});var _H=F("ZodE164",(Q,X)=>{ZY.init(Q,X),d.init(Q,X)});var yH=F("ZodJWT",(Q,X)=>{NY.init(Q,X),d.init(Q,X)});var aW=F("ZodNumber",(Q,X)=>{IQ.init(Q,X),s.init(Q,X),Q.gt=(W,G)=>Q.check(Q4(W,G)),Q.gte=(W,G)=>Q.check(Q6(W,G)),Q.min=(W,G)=>Q.check(Q6(W,G)),Q.lt=(W,G)=>Q.check(e6(W,G)),Q.lte=(W,G)=>Q.check(e1(W,G)),Q.max=(W,G)=>Q.check(e1(W,G)),Q.int=(W)=>Q.check(dW(W)),Q.safe=(W)=>Q.check(dW(W)),Q.positive=(W)=>Q.check(Q4(0,W)),Q.nonnegative=(W)=>Q.check(Q6(0,W)),Q.negative=(W)=>Q.check(e6(0,W)),Q.nonpositive=(W)=>Q.check(e1(0,W)),Q.multipleOf=(W,G)=>Q.check(X4(W,G)),Q.step=(W,G)=>Q.check(X4(W,G)),Q.finite=()=>Q;let Y=Q._zod.bag;Q.minValue=Math.max(Y.minimum??Number.NEGATIVE_INFINITY,Y.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,Q.maxValue=Math.min(Y.maximum??Number.POSITIVE_INFINITY,Y.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,Q.isInt=(Y.format??"").includes("int")||Number.isSafeInteger(Y.multipleOf??0.5),Q.isFinite=!0,Q.format=Y.format??null});function l(Q){return VW(aW,Q)}var gH=F("ZodNumberFormat",(Q,X)=>{wY.init(Q,X),aW.init(Q,X)});function dW(Q){return ZW(gH,Q)}var uH=F("ZodBoolean",(Q,X)=>{bY.init(Q,X),s.init(Q,X)});function Y0(Q){return NW(uH,Q)}var hH=F("ZodNull",(Q,X)=>{jY.init(Q,X),s.init(Q,X)});function nQ(Q){return wW(hH,Q)}var fH=F("ZodUnknown",(Q,X)=>{PY.init(Q,X),s.init(Q,X)});function o(){return bW(fH)}var lH=F("ZodNever",(Q,X)=>{IY.init(Q,X),s.init(Q,X)});function mH(Q){return jW(lH,Q)}var cH=F("ZodArray",(Q,X)=>{EY.init(Q,X),s.init(Q,X),Q.element=X.element,Q.min=(Y,W)=>Q.check(j1(Y,W)),Q.nonempty=(Y)=>Q.check(j1(1,Y)),Q.max=(Y,W)=>Q.check(Y4(Y,W)),Q.length=(Y,W)=>Q.check(W4(Y,W)),Q.unwrap=()=>Q.element});function _(Q,X){return PW(cH,Q,X)}var sW=F("ZodObject",(Q,X)=>{RY.init(Q,X),s.init(Q,X),h.defineLazy(Q,"shape",()=>{return X.shape}),Q.keyof=()=>L0(Object.keys(Q._zod.def.shape)),Q.catchall=(Y)=>Q.clone({...Q._zod.def,catchall:Y}),Q.passthrough=()=>Q.clone({...Q._zod.def,catchall:o()}),Q.loose=()=>Q.clone({...Q._zod.def,catchall:o()}),Q.strict=()=>Q.clone({...Q._zod.def,catchall:mH()}),Q.strip=()=>Q.clone({...Q._zod.def,catchall:void 0}),Q.extend=(Y)=>{return h.extend(Q,Y)},Q.safeExtend=(Y)=>{return h.safeExtend(Q,Y)},Q.merge=(Y)=>h.merge(Q,Y),Q.pick=(Y)=>h.pick(Q,Y),Q.omit=(Y)=>h.omit(Q,Y),Q.partial=(...Y)=>h.partial(XG,Q,Y[0]),Q.required=(...Y)=>h.required(YG,Q,Y[0])});function w(Q,X){let Y={type:"object",shape:Q??{},...h.normalizeParams(X)};return new sW(Y)}function K0(Q,X){return new sW({type:"object",shape:Q,catchall:o(),...h.normalizeParams(X)})}var eW=F("ZodUnion",(Q,X)=>{EQ.init(Q,X),s.init(Q,X),Q.options=X.options});function p(Q,X){return new eW({type:"union",options:Q,...h.normalizeParams(X)})}var pH=F("ZodDiscriminatedUnion",(Q,X)=>{eW.init(Q,X),CY.init(Q,X)});function rQ(Q,X,Y){return new pH({type:"union",options:X,discriminator:Q,...h.normalizeParams(Y)})}var iH=F("ZodIntersection",(Q,X)=>{kY.init(Q,X),s.init(Q,X)});function J4(Q,X){return new iH({type:"intersection",left:Q,right:X})}var nH=F("ZodRecord",(Q,X)=>{vY.init(Q,X),s.init(Q,X),Q.keyType=X.keyType,Q.valueType=X.valueType});function t(Q,X,Y){return new nH({type:"record",keyType:Q,valueType:X,...h.normalizeParams(Y)})}var pQ=F("ZodEnum",(Q,X)=>{xY.init(Q,X),s.init(Q,X),Q.enum=X.entries,Q.options=Object.values(X.entries);let Y=new Set(Object.keys(X.entries));Q.extract=(W,G)=>{let $={};for(let J of W)if(Y.has(J))$[J]=X.entries[J];else throw Error(`Key ${J} not found in enum`);return new pQ({...X,checks:[],...h.normalizeParams(G),entries:$})},Q.exclude=(W,G)=>{let $={...X.entries};for(let J of W)if(Y.has(J))delete $[J];else throw Error(`Key ${J} not found in enum`);return new pQ({...X,checks:[],...h.normalizeParams(G),entries:$})}});function L0(Q,X){let Y=Array.isArray(Q)?Object.fromEntries(Q.map((W)=>[W,W])):Q;return new pQ({type:"enum",entries:Y,...h.normalizeParams(X)})}var rH=F("ZodLiteral",(Q,X)=>{_Y.init(Q,X),s.init(Q,X),Q.values=new Set(X.values),Object.defineProperty(Q,"value",{get(){if(X.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return X.values[0]}})});function b(Q,X){return new rH({type:"literal",values:Array.isArray(Q)?Q:[Q],...h.normalizeParams(X)})}var dH=F("ZodTransform",(Q,X)=>{yY.init(Q,X),s.init(Q,X),Q._zod.parse=(Y,W)=>{if(W.direction==="backward")throw new c1(Q.constructor.name);Y.addIssue=($)=>{if(typeof $==="string")Y.issues.push(h.issue($,Y.value,X));else{let J=$;if(J.fatal)J.continue=!1;J.code??(J.code="custom"),J.input??(J.input=Y.value),J.inst??(J.inst=Q),Y.issues.push(h.issue(J))}};let G=X.transform(Y.value,Y);if(G instanceof Promise)return G.then(($)=>{return Y.value=$,Y});return Y.value=G,Y}});function QG(Q){return new dH({type:"transform",transform:Q})}var XG=F("ZodOptional",(Q,X)=>{gY.init(Q,X),s.init(Q,X),Q.unwrap=()=>Q._zod.def.innerType});function a(Q){return new XG({type:"optional",innerType:Q})}var oH=F("ZodNullable",(Q,X)=>{uY.init(Q,X),s.init(Q,X),Q.unwrap=()=>Q._zod.def.innerType});function oW(Q){return new oH({type:"nullable",innerType:Q})}var tH=F("ZodDefault",(Q,X)=>{hY.init(Q,X),s.init(Q,X),Q.unwrap=()=>Q._zod.def.innerType,Q.removeDefault=Q.unwrap});function aH(Q,X){return new tH({type:"default",innerType:Q,get defaultValue(){return typeof X==="function"?X():h.shallowClone(X)}})}var sH=F("ZodPrefault",(Q,X)=>{fY.init(Q,X),s.init(Q,X),Q.unwrap=()=>Q._zod.def.innerType});function eH(Q,X){return new sH({type:"prefault",innerType:Q,get defaultValue(){return typeof X==="function"?X():h.shallowClone(X)}})}var YG=F("ZodNonOptional",(Q,X)=>{lY.init(Q,X),s.init(Q,X),Q.unwrap=()=>Q._zod.def.innerType});function Q3(Q,X){return new YG({type:"nonoptional",innerType:Q,...h.normalizeParams(X)})}var X3=F("ZodCatch",(Q,X)=>{mY.init(Q,X),s.init(Q,X),Q.unwrap=()=>Q._zod.def.innerType,Q.removeCatch=Q.unwrap});function Y3(Q,X){return new X3({type:"catch",innerType:Q,catchValue:typeof X==="function"?X:()=>X})}var W3=F("ZodPipe",(Q,X)=>{cY.init(Q,X),s.init(Q,X),Q.in=X.in,Q.out=X.out});function iQ(Q,X){return new W3({type:"pipe",in:Q,out:X})}var G3=F("ZodReadonly",(Q,X)=>{pY.init(Q,X),s.init(Q,X),Q.unwrap=()=>Q._zod.def.innerType});function $3(Q){return new G3({type:"readonly",innerType:Q})}var WG=F("ZodCustom",(Q,X)=>{iY.init(Q,X),s.init(Q,X)});function GG(Q,X){return IW(WG,Q??(()=>!0),X)}function J3(Q,X={}){return EW(WG,Q,X)}function z3(Q){return TW(Q)}function dQ(Q,X){return iQ(QG(Q),X)}N0(TQ());var oQ="2025-11-25";var $G=[oQ,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],X1="io.modelcontextprotocol/related-task",H4="2.0",G0=GG((Q)=>Q!==null&&(typeof Q==="object"||typeof Q==="function")),JG=p([D(),l().int()]),zG=D(),NZ=K0({ttl:p([l(),nQ()]).optional(),pollInterval:l().optional()}),H3=w({ttl:l().optional()}),A3=w({taskId:D()}),tQ=K0({progressToken:JG.optional(),[X1]:A3.optional()}),Z0=w({_meta:tQ.optional()}),W6=Z0.extend({task:H3.optional()}),HG=(Q)=>W6.safeParse(Q).success,$0=w({method:D(),params:Z0.loose().optional()}),w0=w({_meta:tQ.optional()}),b0=w({method:D(),params:w0.loose().optional()}),J0=K0({_meta:tQ.optional()}),A4=p([D(),l().int()]),AG=w({jsonrpc:b(H4),id:A4,...$0.shape}).strict(),aQ=(Q)=>AG.safeParse(Q).success,KG=w({jsonrpc:b(H4),...b0.shape}).strict(),UG=(Q)=>KG.safeParse(Q).success,sQ=w({jsonrpc:b(H4),id:A4,result:J0}).strict(),G6=(Q)=>sQ.safeParse(Q).success;var y;(function(Q){Q[Q.ConnectionClosed=-32000]="ConnectionClosed",Q[Q.RequestTimeout=-32001]="RequestTimeout",Q[Q.ParseError=-32700]="ParseError",Q[Q.InvalidRequest=-32600]="InvalidRequest",Q[Q.MethodNotFound=-32601]="MethodNotFound",Q[Q.InvalidParams=-32602]="InvalidParams",Q[Q.InternalError=-32603]="InternalError",Q[Q.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(y||(y={}));var eQ=w({jsonrpc:b(H4),id:A4.optional(),error:w({code:l().int(),message:D(),data:o().optional()})}).strict();var BG=(Q)=>eQ.safeParse(Q).success;var DG=p([AG,KG,sQ,eQ]),wZ=p([sQ,eQ]),K4=J0.strict(),K3=w0.extend({requestId:A4.optional(),reason:D().optional()}),U4=b0.extend({method:b("notifications/cancelled"),params:K3}),U3=w({src:D(),mimeType:D().optional(),sizes:_(D()).optional(),theme:L0(["light","dark"]).optional()}),$6=w({icons:_(U3).optional()}),I1=w({name:D(),title:D().optional()}),LG=I1.extend({...I1.shape,...$6.shape,version:D(),websiteUrl:D().optional(),description:D().optional()}),B3=J4(w({applyDefaults:Y0().optional()}),t(D(),o())),D3=dQ((Q)=>{if(Q&&typeof Q==="object"&&!Array.isArray(Q)){if(Object.keys(Q).length===0)return{form:{}}}return Q},J4(w({form:B3.optional(),url:G0.optional()}),t(D(),o()).optional())),L3=K0({list:G0.optional(),cancel:G0.optional(),requests:K0({sampling:K0({createMessage:G0.optional()}).optional(),elicitation:K0({create:G0.optional()}).optional()}).optional()}),F3=K0({list:G0.optional(),cancel:G0.optional(),requests:K0({tools:K0({call:G0.optional()}).optional()}).optional()}),q3=w({experimental:t(D(),G0).optional(),sampling:w({context:G0.optional(),tools:G0.optional()}).optional(),elicitation:D3.optional(),roots:w({listChanged:Y0().optional()}).optional(),tasks:L3.optional()}),O3=Z0.extend({protocolVersion:D(),capabilities:q3,clientInfo:LG}),Q9=$0.extend({method:b("initialize"),params:O3});var M3=w({experimental:t(D(),G0).optional(),logging:G0.optional(),completions:G0.optional(),prompts:w({listChanged:Y0().optional()}).optional(),resources:w({subscribe:Y0().optional(),listChanged:Y0().optional()}).optional(),tools:w({listChanged:Y0().optional()}).optional(),tasks:F3.optional()}),V3=J0.extend({protocolVersion:D(),capabilities:M3,serverInfo:LG,instructions:D().optional()}),X9=b0.extend({method:b("notifications/initialized"),params:w0.optional()});var B4=$0.extend({method:b("ping"),params:Z0.optional()}),Z3=w({progress:l(),total:a(l()),message:a(D())}),N3=w({...w0.shape,...Z3.shape,progressToken:JG}),D4=b0.extend({method:b("notifications/progress"),params:N3}),w3=Z0.extend({cursor:zG.optional()}),J6=$0.extend({params:w3.optional()}),z6=J0.extend({nextCursor:zG.optional()}),b3=L0(["working","input_required","completed","failed","cancelled"]),H6=w({taskId:D(),status:b3,ttl:p([l(),nQ()]),createdAt:D(),lastUpdatedAt:D(),pollInterval:a(l()),statusMessage:a(D())}),E1=J0.extend({task:H6}),j3=w0.merge(H6),A6=b0.extend({method:b("notifications/tasks/status"),params:j3}),L4=$0.extend({method:b("tasks/get"),params:Z0.extend({taskId:D()})}),F4=J0.merge(H6),q4=$0.extend({method:b("tasks/result"),params:Z0.extend({taskId:D()})}),bZ=J0.loose(),O4=J6.extend({method:b("tasks/list")}),M4=z6.extend({tasks:_(H6)}),V4=$0.extend({method:b("tasks/cancel"),params:Z0.extend({taskId:D()})}),FG=J0.merge(H6),qG=w({uri:D(),mimeType:a(D()),_meta:t(D(),o()).optional()}),OG=qG.extend({text:D()}),Y9=D().refine((Q)=>{try{return atob(Q),!0}catch{return!1}},{message:"Invalid Base64 string"}),MG=qG.extend({blob:Y9}),K6=L0(["user","assistant"]),T1=w({audience:_(K6).optional(),priority:l().min(0).max(1).optional(),lastModified:Y6.datetime({offset:!0}).optional()}),VG=w({...I1.shape,...$6.shape,uri:D(),description:a(D()),mimeType:a(D()),annotations:T1.optional(),_meta:a(K0({}))}),P3=w({...I1.shape,...$6.shape,uriTemplate:D(),description:a(D()),mimeType:a(D()),annotations:T1.optional(),_meta:a(K0({}))}),W9=J6.extend({method:b("resources/list")}),I3=z6.extend({resources:_(VG)}),E3=J6.extend({method:b("resources/templates/list")}),T3=z6.extend({resourceTemplates:_(P3)}),G9=Z0.extend({uri:D()}),S3=G9,$9=$0.extend({method:b("resources/read"),params:S3}),R3=J0.extend({contents:_(p([OG,MG]))}),C3=b0.extend({method:b("notifications/resources/list_changed"),params:w0.optional()}),k3=G9,v3=$0.extend({method:b("resources/subscribe"),params:k3}),x3=G9,_3=$0.extend({method:b("resources/unsubscribe"),params:x3}),y3=w0.extend({uri:D()}),g3=b0.extend({method:b("notifications/resources/updated"),params:y3}),u3=w({name:D(),description:a(D()),required:a(Y0())}),h3=w({...I1.shape,...$6.shape,description:a(D()),arguments:a(_(u3)),_meta:a(K0({}))}),f3=J6.extend({method:b("prompts/list")}),l3=z6.extend({prompts:_(h3)}),m3=Z0.extend({name:D(),arguments:t(D(),D()).optional()}),c3=$0.extend({method:b("prompts/get"),params:m3}),J9=w({type:b("text"),text:D(),annotations:T1.optional(),_meta:t(D(),o()).optional()}),z9=w({type:b("image"),data:Y9,mimeType:D(),annotations:T1.optional(),_meta:t(D(),o()).optional()}),H9=w({type:b("audio"),data:Y9,mimeType:D(),annotations:T1.optional(),_meta:t(D(),o()).optional()}),p3=w({type:b("tool_use"),name:D(),id:D(),input:t(D(),o()),_meta:t(D(),o()).optional()}),i3=w({type:b("resource"),resource:p([OG,MG]),annotations:T1.optional(),_meta:t(D(),o()).optional()}),n3=VG.extend({type:b("resource_link")}),A9=p([J9,z9,H9,n3,i3]),r3=w({role:K6,content:A9}),d3=J0.extend({description:D().optional(),messages:_(r3)}),o3=b0.extend({method:b("notifications/prompts/list_changed"),params:w0.optional()}),t3=w({title:D().optional(),readOnlyHint:Y0().optional(),destructiveHint:Y0().optional(),idempotentHint:Y0().optional(),openWorldHint:Y0().optional()}),a3=w({taskSupport:L0(["required","optional","forbidden"]).optional()}),ZG=w({...I1.shape,...$6.shape,description:D().optional(),inputSchema:w({type:b("object"),properties:t(D(),G0).optional(),required:_(D()).optional()}).catchall(o()),outputSchema:w({type:b("object"),properties:t(D(),G0).optional(),required:_(D()).optional()}).catchall(o()).optional(),annotations:t3.optional(),execution:a3.optional(),_meta:t(D(),o()).optional()}),K9=J6.extend({method:b("tools/list")}),s3=z6.extend({tools:_(ZG)}),Z4=J0.extend({content:_(A9).default([]),structuredContent:t(D(),o()).optional(),isError:Y0().optional()}),jZ=Z4.or(J0.extend({toolResult:o()})),e3=W6.extend({name:D(),arguments:t(D(),o()).optional()}),U6=$0.extend({method:b("tools/call"),params:e3}),QA=b0.extend({method:b("notifications/tools/list_changed"),params:w0.optional()}),PZ=w({autoRefresh:Y0().default(!0),debounceMs:l().int().nonnegative().default(300)}),B6=L0(["debug","info","notice","warning","error","critical","alert","emergency"]),XA=Z0.extend({level:B6}),U9=$0.extend({method:b("logging/setLevel"),params:XA}),YA=w0.extend({level:B6,logger:D().optional(),data:o()}),WA=b0.extend({method:b("notifications/message"),params:YA}),GA=w({name:D().optional()}),$A=w({hints:_(GA).optional(),costPriority:l().min(0).max(1).optional(),speedPriority:l().min(0).max(1).optional(),intelligencePriority:l().min(0).max(1).optional()}),JA=w({mode:L0(["auto","required","none"]).optional()}),zA=w({type:b("tool_result"),toolUseId:D().describe("The unique identifier for the corresponding tool call."),content:_(A9).default([]),structuredContent:w({}).loose().optional(),isError:Y0().optional(),_meta:t(D(),o()).optional()}),HA=rQ("type",[J9,z9,H9]),z4=rQ("type",[J9,z9,H9,p3,zA]),AA=w({role:K6,content:p([z4,_(z4)]),_meta:t(D(),o()).optional()}),KA=W6.extend({messages:_(AA),modelPreferences:$A.optional(),systemPrompt:D().optional(),includeContext:L0(["none","thisServer","allServers"]).optional(),temperature:l().optional(),maxTokens:l().int(),stopSequences:_(D()).optional(),metadata:G0.optional(),tools:_(ZG).optional(),toolChoice:JA.optional()}),UA=$0.extend({method:b("sampling/createMessage"),params:KA}),B9=J0.extend({model:D(),stopReason:a(L0(["endTurn","stopSequence","maxTokens"]).or(D())),role:K6,content:HA}),D9=J0.extend({model:D(),stopReason:a(L0(["endTurn","stopSequence","maxTokens","toolUse"]).or(D())),role:K6,content:p([z4,_(z4)])}),BA=w({type:b("boolean"),title:D().optional(),description:D().optional(),default:Y0().optional()}),DA=w({type:b("string"),title:D().optional(),description:D().optional(),minLength:l().optional(),maxLength:l().optional(),format:L0(["email","uri","date","date-time"]).optional(),default:D().optional()}),LA=w({type:L0(["number","integer"]),title:D().optional(),description:D().optional(),minimum:l().optional(),maximum:l().optional(),default:l().optional()}),FA=w({type:b("string"),title:D().optional(),description:D().optional(),enum:_(D()),default:D().optional()}),qA=w({type:b("string"),title:D().optional(),description:D().optional(),oneOf:_(w({const:D(),title:D()})),default:D().optional()}),OA=w({type:b("string"),title:D().optional(),description:D().optional(),enum:_(D()),enumNames:_(D()).optional(),default:D().optional()}),MA=p([FA,qA]),VA=w({type:b("array"),title:D().optional(),description:D().optional(),minItems:l().optional(),maxItems:l().optional(),items:w({type:b("string"),enum:_(D())}),default:_(D()).optional()}),ZA=w({type:b("array"),title:D().optional(),description:D().optional(),minItems:l().optional(),maxItems:l().optional(),items:w({anyOf:_(w({const:D(),title:D()}))}),default:_(D()).optional()}),NA=p([VA,ZA]),wA=p([OA,MA,NA]),bA=p([wA,BA,DA,LA]),jA=W6.extend({mode:b("form").optional(),message:D(),requestedSchema:w({type:b("object"),properties:t(D(),bA),required:_(D()).optional()})}),PA=W6.extend({mode:b("url"),message:D(),elicitationId:D(),url:D().url()}),IA=p([jA,PA]),EA=$0.extend({method:b("elicitation/create"),params:IA}),TA=w0.extend({elicitationId:D()}),SA=b0.extend({method:b("notifications/elicitation/complete"),params:TA}),N4=J0.extend({action:L0(["accept","decline","cancel"]),content:dQ((Q)=>Q===null?void 0:Q,t(D(),p([D(),l(),Y0(),_(D())])).optional())}),RA=w({type:b("ref/resource"),uri:D()});var CA=w({type:b("ref/prompt"),name:D()}),kA=Z0.extend({ref:p([CA,RA]),argument:w({name:D(),value:D()}),context:w({arguments:t(D(),D()).optional()}).optional()}),vA=$0.extend({method:b("completion/complete"),params:kA});var xA=J0.extend({completion:K0({values:_(D()).max(100),total:a(l().int()),hasMore:a(Y0())})}),_A=w({uri:D().startsWith("file://"),name:D().optional(),_meta:t(D(),o()).optional()}),yA=$0.extend({method:b("roots/list"),params:Z0.optional()}),L9=J0.extend({roots:_(_A)}),gA=b0.extend({method:b("notifications/roots/list_changed"),params:w0.optional()}),IZ=p([B4,Q9,vA,U9,c3,f3,W9,E3,$9,v3,_3,U6,K9,L4,q4,O4,V4]),EZ=p([U4,D4,X9,gA,A6]),TZ=p([K4,B9,D9,N4,L9,F4,M4,E1]),SZ=p([B4,UA,EA,yA,L4,q4,O4,V4]),RZ=p([U4,D4,WA,g3,C3,QA,o3,A6,SA]),CZ=p([K4,V3,xA,d3,l3,I3,T3,R3,Z4,s3,F4,M4,E1]);class k extends Error{constructor(Q,X,Y){super(`MCP error ${Q}: ${X}`);this.code=Q,this.data=Y,this.name="McpError"}static fromError(Q,X,Y){if(Q===y.UrlElicitationRequired&&Y){let W=Y;if(W.elicitations)return new NG(W.elicitations,X)}return new k(Q,X,Y)}}class NG extends k{constructor(Q,X=`URL elicitation${Q.length>1?"s":""} required`){super(y.UrlElicitationRequired,X,{elicitations:Q})}get elicitations(){return this.data?.elicitations??[]}}function Y1(Q){return Q==="completed"||Q==="failed"||Q==="cancelled"}var uA=Symbol("Let zodToJsonSchema decide on which parser to use");var KN=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function F9(Q){let Y=G4(Q)?.method;if(!Y)throw Error("Schema is missing a method literal");let W=SW(Y);if(typeof W!=="string")throw Error("Schema method literal must be a string");return W}function q9(Q,X){let Y=Q1(Q,X);if(!Y.success)throw Y.error;return Y.data}var pA=60000;class O9{constructor(Q){if(this._options=Q,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(U4,(X)=>{this._oncancel(X)}),this.setNotificationHandler(D4,(X)=>{this._onprogress(X)}),this.setRequestHandler(B4,(X)=>({})),this._taskStore=Q?.taskStore,this._taskMessageQueue=Q?.taskMessageQueue,this._taskStore)this.setRequestHandler(L4,async(X,Y)=>{let W=await this._taskStore.getTask(X.params.taskId,Y.sessionId);if(!W)throw new k(y.InvalidParams,"Failed to retrieve task: Task not found");return{...W}}),this.setRequestHandler(q4,async(X,Y)=>{let W=async()=>{let G=X.params.taskId;if(this._taskMessageQueue){let J;while(J=await this._taskMessageQueue.dequeue(G,Y.sessionId)){if(J.type==="response"||J.type==="error"){let z=J.message,H=z.id,A=this._requestResolvers.get(H);if(A)if(this._requestResolvers.delete(H),J.type==="response")A(z);else{let K=z,U=new k(K.error.code,K.error.message,K.error.data);A(U)}else{let K=J.type==="response"?"Response":"Error";this._onerror(Error(`${K} handler missing for request ${H}`))}continue}await this._transport?.send(J.message,{relatedRequestId:Y.requestId})}}let $=await this._taskStore.getTask(G,Y.sessionId);if(!$)throw new k(y.InvalidParams,`Task not found: ${G}`);if(!Y1($.status))return await this._waitForTaskUpdate(G,Y.signal),await W();if(Y1($.status)){let J=await this._taskStore.getTaskResult(G,Y.sessionId);return this._clearTaskQueue(G),{...J,_meta:{...J._meta,[X1]:{taskId:G}}}}return await W()};return await W()}),this.setRequestHandler(O4,async(X,Y)=>{try{let{tasks:W,nextCursor:G}=await this._taskStore.listTasks(X.params?.cursor,Y.sessionId);return{tasks:W,nextCursor:G,_meta:{}}}catch(W){throw new k(y.InvalidParams,`Failed to list tasks: ${W instanceof Error?W.message:String(W)}`)}}),this.setRequestHandler(V4,async(X,Y)=>{try{let W=await this._taskStore.getTask(X.params.taskId,Y.sessionId);if(!W)throw new k(y.InvalidParams,`Task not found: ${X.params.taskId}`);if(Y1(W.status))throw new k(y.InvalidParams,`Cannot cancel task in terminal status: ${W.status}`);await this._taskStore.updateTaskStatus(X.params.taskId,"cancelled","Client cancelled task execution.",Y.sessionId),this._clearTaskQueue(X.params.taskId);let G=await this._taskStore.getTask(X.params.taskId,Y.sessionId);if(!G)throw new k(y.InvalidParams,`Task not found after cancellation: ${X.params.taskId}`);return{_meta:{},...G}}catch(W){if(W instanceof k)throw W;throw new k(y.InvalidRequest,`Failed to cancel task: ${W instanceof Error?W.message:String(W)}`)}})}async _oncancel(Q){if(!Q.params.requestId)return;this._requestHandlerAbortControllers.get(Q.params.requestId)?.abort(Q.params.reason)}_setupTimeout(Q,X,Y,W,G=!1){this._timeoutInfo.set(Q,{timeoutId:setTimeout(W,X),startTime:Date.now(),timeout:X,maxTotalTimeout:Y,resetTimeoutOnProgress:G,onTimeout:W})}_resetTimeout(Q){let X=this._timeoutInfo.get(Q);if(!X)return!1;let Y=Date.now()-X.startTime;if(X.maxTotalTimeout&&Y>=X.maxTotalTimeout)throw this._timeoutInfo.delete(Q),k.fromError(y.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:X.maxTotalTimeout,totalElapsed:Y});return clearTimeout(X.timeoutId),X.timeoutId=setTimeout(X.onTimeout,X.timeout),!0}_cleanupTimeout(Q){let X=this._timeoutInfo.get(Q);if(X)clearTimeout(X.timeoutId),this._timeoutInfo.delete(Q)}async connect(Q){this._transport=Q;let X=this.transport?.onclose;this._transport.onclose=()=>{X?.(),this._onclose()};let Y=this.transport?.onerror;this._transport.onerror=(G)=>{Y?.(G),this._onerror(G)};let W=this._transport?.onmessage;this._transport.onmessage=(G,$)=>{if(W?.(G,$),G6(G)||BG(G))this._onresponse(G);else if(aQ(G))this._onrequest(G,$);else if(UG(G))this._onnotification(G);else this._onerror(Error(`Unknown message type: ${JSON.stringify(G)}`))},await this._transport.start()}_onclose(){let Q=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();let X=k.fromError(y.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let Y of Q.values())Y(X)}_onerror(Q){this.onerror?.(Q)}_onnotification(Q){let X=this._notificationHandlers.get(Q.method)??this.fallbackNotificationHandler;if(X===void 0)return;Promise.resolve().then(()=>X(Q)).catch((Y)=>this._onerror(Error(`Uncaught error in notification handler: ${Y}`)))}_onrequest(Q,X){let Y=this._requestHandlers.get(Q.method)??this.fallbackRequestHandler,W=this._transport,G=Q.params?._meta?.[X1]?.taskId;if(Y===void 0){let A={jsonrpc:"2.0",id:Q.id,error:{code:y.MethodNotFound,message:"Method not found"}};if(G&&this._taskMessageQueue)this._enqueueTaskMessage(G,{type:"error",message:A,timestamp:Date.now()},W?.sessionId).catch((K)=>this._onerror(Error(`Failed to enqueue error response: ${K}`)));else W?.send(A).catch((K)=>this._onerror(Error(`Failed to send an error response: ${K}`)));return}let $=new AbortController;this._requestHandlerAbortControllers.set(Q.id,$);let J=HG(Q.params)?Q.params.task:void 0,z=this._taskStore?this.requestTaskStore(Q,W?.sessionId):void 0,H={signal:$.signal,sessionId:W?.sessionId,_meta:Q.params?._meta,sendNotification:async(A)=>{let K={relatedRequestId:Q.id};if(G)K.relatedTask={taskId:G};await this.notification(A,K)},sendRequest:async(A,K,U)=>{let B={...U,relatedRequestId:Q.id};if(G&&!B.relatedTask)B.relatedTask={taskId:G};let L=B.relatedTask?.taskId??G;if(L&&z)await z.updateTaskStatus(L,"input_required");return await this.request(A,K,B)},authInfo:X?.authInfo,requestId:Q.id,requestInfo:X?.requestInfo,taskId:G,taskStore:z,taskRequestedTtl:J?.ttl,closeSSEStream:X?.closeSSEStream,closeStandaloneSSEStream:X?.closeStandaloneSSEStream};Promise.resolve().then(()=>{if(J)this.assertTaskHandlerCapability(Q.method)}).then(()=>Y(Q,H)).then(async(A)=>{if($.signal.aborted)return;let K={result:A,jsonrpc:"2.0",id:Q.id};if(G&&this._taskMessageQueue)await this._enqueueTaskMessage(G,{type:"response",message:K,timestamp:Date.now()},W?.sessionId);else await W?.send(K)},async(A)=>{if($.signal.aborted)return;let K={jsonrpc:"2.0",id:Q.id,error:{code:Number.isSafeInteger(A.code)?A.code:y.InternalError,message:A.message??"Internal error",...A.data!==void 0&&{data:A.data}}};if(G&&this._taskMessageQueue)await this._enqueueTaskMessage(G,{type:"error",message:K,timestamp:Date.now()},W?.sessionId);else await W?.send(K)}).catch((A)=>this._onerror(Error(`Failed to send response: ${A}`))).finally(()=>{this._requestHandlerAbortControllers.delete(Q.id)})}_onprogress(Q){let{progressToken:X,...Y}=Q.params,W=Number(X),G=this._progressHandlers.get(W);if(!G){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(Q)}`));return}let $=this._responseHandlers.get(W),J=this._timeoutInfo.get(W);if(J&&$&&J.resetTimeoutOnProgress)try{this._resetTimeout(W)}catch(z){this._responseHandlers.delete(W),this._progressHandlers.delete(W),this._cleanupTimeout(W),$(z);return}G(Y)}_onresponse(Q){let X=Number(Q.id),Y=this._requestResolvers.get(X);if(Y){if(this._requestResolvers.delete(X),G6(Q))Y(Q);else{let $=new k(Q.error.code,Q.error.message,Q.error.data);Y($)}return}let W=this._responseHandlers.get(X);if(W===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(Q)}`));return}this._responseHandlers.delete(X),this._cleanupTimeout(X);let G=!1;if(G6(Q)&&Q.result&&typeof Q.result==="object"){let $=Q.result;if($.task&&typeof $.task==="object"){let J=$.task;if(typeof J.taskId==="string")G=!0,this._taskProgressTokens.set(J.taskId,X)}}if(!G)this._progressHandlers.delete(X);if(G6(Q))W(Q);else{let $=k.fromError(Q.error.code,Q.error.message,Q.error.data);W($)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(Q,X,Y){let{task:W}=Y??{};if(!W){try{yield{type:"result",result:await this.request(Q,X,Y)}}catch($){yield{type:"error",error:$ instanceof k?$:new k(y.InternalError,String($))}}return}let G;try{let $=await this.request(Q,E1,Y);if($.task)G=$.task.taskId,yield{type:"taskCreated",task:$.task};else throw new k(y.InternalError,"Task creation did not return a task");while(!0){let J=await this.getTask({taskId:G},Y);if(yield{type:"taskStatus",task:J},Y1(J.status)){if(J.status==="completed")yield{type:"result",result:await this.getTaskResult({taskId:G},X,Y)};else if(J.status==="failed")yield{type:"error",error:new k(y.InternalError,`Task ${G} failed`)};else if(J.status==="cancelled")yield{type:"error",error:new k(y.InternalError,`Task ${G} was cancelled`)};return}if(J.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:G},X,Y)};return}let z=J.pollInterval??this._options?.defaultTaskPollInterval??1000;await new Promise((H)=>setTimeout(H,z)),Y?.signal?.throwIfAborted()}}catch($){yield{type:"error",error:$ instanceof k?$:new k(y.InternalError,String($))}}}request(Q,X,Y){let{relatedRequestId:W,resumptionToken:G,onresumptiontoken:$,task:J,relatedTask:z}=Y??{};return new Promise((H,A)=>{let K=(M)=>{A(M)};if(!this._transport){K(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{if(this.assertCapabilityForMethod(Q.method),J)this.assertTaskCapability(Q.method)}catch(M){K(M);return}Y?.signal?.throwIfAborted();let U=this._requestMessageId++,B={...Q,jsonrpc:"2.0",id:U};if(Y?.onprogress)this._progressHandlers.set(U,Y.onprogress),B.params={...Q.params,_meta:{...Q.params?._meta||{},progressToken:U}};if(J)B.params={...B.params,task:J};if(z)B.params={...B.params,_meta:{...B.params?._meta||{},[X1]:z}};let L=(M)=>{this._responseHandlers.delete(U),this._progressHandlers.delete(U),this._cleanupTimeout(U),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:U,reason:String(M)}},{relatedRequestId:W,resumptionToken:G,onresumptiontoken:$}).catch((E)=>this._onerror(Error(`Failed to send cancellation: ${E}`)));let S=M instanceof k?M:new k(y.RequestTimeout,String(M));A(S)};this._responseHandlers.set(U,(M)=>{if(Y?.signal?.aborted)return;if(M instanceof Error)return A(M);try{let S=Q1(X,M.result);if(!S.success)A(S.error);else H(S.data)}catch(S){A(S)}}),Y?.signal?.addEventListener("abort",()=>{L(Y?.signal?.reason)});let q=Y?.timeout??pA,O=()=>L(k.fromError(y.RequestTimeout,"Request timed out",{timeout:q}));this._setupTimeout(U,q,Y?.maxTotalTimeout,O,Y?.resetTimeoutOnProgress??!1);let V=z?.taskId;if(V){let M=(S)=>{let E=this._responseHandlers.get(U);if(E)E(S);else this._onerror(Error(`Response handler missing for side-channeled request ${U}`))};this._requestResolvers.set(U,M),this._enqueueTaskMessage(V,{type:"request",message:B,timestamp:Date.now()}).catch((S)=>{this._cleanupTimeout(U),A(S)})}else this._transport.send(B,{relatedRequestId:W,resumptionToken:G,onresumptiontoken:$}).catch((M)=>{this._cleanupTimeout(U),A(M)})})}async getTask(Q,X){return this.request({method:"tasks/get",params:Q},F4,X)}async getTaskResult(Q,X,Y){return this.request({method:"tasks/result",params:Q},X,Y)}async listTasks(Q,X){return this.request({method:"tasks/list",params:Q},M4,X)}async cancelTask(Q,X){return this.request({method:"tasks/cancel",params:Q},FG,X)}async notification(Q,X){if(!this._transport)throw Error("Not connected");this.assertNotificationCapability(Q.method);let Y=X?.relatedTask?.taskId;if(Y){let J={...Q,jsonrpc:"2.0",params:{...Q.params,_meta:{...Q.params?._meta||{},[X1]:X.relatedTask}}};await this._enqueueTaskMessage(Y,{type:"notification",message:J,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(Q.method)&&!Q.params&&!X?.relatedRequestId&&!X?.relatedTask){if(this._pendingDebouncedNotifications.has(Q.method))return;this._pendingDebouncedNotifications.add(Q.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(Q.method),!this._transport)return;let J={...Q,jsonrpc:"2.0"};if(X?.relatedTask)J={...J,params:{...J.params,_meta:{...J.params?._meta||{},[X1]:X.relatedTask}}};this._transport?.send(J,X).catch((z)=>this._onerror(z))});return}let $={...Q,jsonrpc:"2.0"};if(X?.relatedTask)$={...$,params:{...$.params,_meta:{...$.params?._meta||{},[X1]:X.relatedTask}}};await this._transport.send($,X)}setRequestHandler(Q,X){let Y=F9(Q);this.assertRequestHandlerCapability(Y),this._requestHandlers.set(Y,(W,G)=>{let $=q9(Q,W);return Promise.resolve(X($,G))})}removeRequestHandler(Q){this._requestHandlers.delete(Q)}assertCanSetRequestHandler(Q){if(this._requestHandlers.has(Q))throw Error(`A request handler for ${Q} already exists, which would be overridden`)}setNotificationHandler(Q,X){let Y=F9(Q);this._notificationHandlers.set(Y,(W)=>{let G=q9(Q,W);return Promise.resolve(X(G))})}removeNotificationHandler(Q){this._notificationHandlers.delete(Q)}_cleanupTaskProgressHandler(Q){let X=this._taskProgressTokens.get(Q);if(X!==void 0)this._progressHandlers.delete(X),this._taskProgressTokens.delete(Q)}async _enqueueTaskMessage(Q,X,Y){if(!this._taskStore||!this._taskMessageQueue)throw Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let W=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(Q,X,Y,W)}async _clearTaskQueue(Q,X){if(this._taskMessageQueue){let Y=await this._taskMessageQueue.dequeueAll(Q,X);for(let W of Y)if(W.type==="request"&&aQ(W.message)){let G=W.message.id,$=this._requestResolvers.get(G);if($)$(new k(y.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(G);else this._onerror(Error(`Resolver missing for request ${G} during task ${Q} cleanup`))}}}async _waitForTaskUpdate(Q,X){let Y=this._options?.defaultTaskPollInterval??1000;try{let W=await this._taskStore?.getTask(Q);if(W?.pollInterval)Y=W.pollInterval}catch{}return new Promise((W,G)=>{if(X.aborted){G(new k(y.InvalidRequest,"Request cancelled"));return}let $=setTimeout(W,Y);X.addEventListener("abort",()=>{clearTimeout($),G(new k(y.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(Q,X){let Y=this._taskStore;if(!Y)throw Error("No task store configured");return{createTask:async(W)=>{if(!Q)throw Error("No request provided");return await Y.createTask(W,Q.id,{method:Q.method,params:Q.params},X)},getTask:async(W)=>{let G=await Y.getTask(W,X);if(!G)throw new k(y.InvalidParams,"Failed to retrieve task: Task not found");return G},storeTaskResult:async(W,G,$)=>{await Y.storeTaskResult(W,G,$,X);let J=await Y.getTask(W,X);if(J){let z=A6.parse({method:"notifications/tasks/status",params:J});if(await this.notification(z),Y1(J.status))this._cleanupTaskProgressHandler(W)}},getTaskResult:(W)=>{return Y.getTaskResult(W,X)},updateTaskStatus:async(W,G,$)=>{let J=await Y.getTask(W,X);if(!J)throw new k(y.InvalidParams,`Task "${W}" not found - it may have been cleaned up`);if(Y1(J.status))throw new k(y.InvalidParams,`Cannot update task "${W}" from terminal status "${J.status}" to "${G}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await Y.updateTaskStatus(W,G,$,X);let z=await Y.getTask(W,X);if(z){let H=A6.parse({method:"notifications/tasks/status",params:z});if(await this.notification(H),Y1(z.status))this._cleanupTaskProgressHandler(W)}},listTasks:(W)=>{return Y.listTasks(W,X)}}}}function wG(Q){return Q!==null&&typeof Q==="object"&&!Array.isArray(Q)}function bG(Q,X){let Y={...Q};for(let W in X){let G=W,$=X[G];if($===void 0)continue;let J=Y[G];if(wG(J)&&wG($))Y[G]={...J,...$};else Y[G]=$}return Y}var Q5=vX(UX(),1),X5=vX(e7(),1);function eO(){let Q=new Q5.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return X5.default(Q),Q}class NX{constructor(Q){this._ajv=Q??eO()}getValidator(Q){let X="$id"in Q&&typeof Q.$id==="string"?this._ajv.getSchema(Q.$id)??this._ajv.compile(Q):this._ajv.compile(Q);return(Y)=>{if(X(Y))return{valid:!0,data:Y,errorMessage:void 0};else return{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(X.errors)}}}}class wX{constructor(Q){this._server=Q}requestStream(Q,X,Y){return this._server.requestStream(Q,X,Y)}async getTask(Q,X){return this._server.getTask({taskId:Q},X)}async getTaskResult(Q,X,Y){return this._server.getTaskResult({taskId:Q},X,Y)}async listTasks(Q,X){return this._server.listTasks(Q?{cursor:Q}:void 0,X)}async cancelTask(Q,X){return this._server.cancelTask({taskId:Q},X)}}function Y5(Q,X,Y){if(!Q)throw Error(`${Y} does not support task creation (required for ${X})`);switch(X){case"tools/call":if(!Q.tools?.call)throw Error(`${Y} does not support task creation for tools/call (required for ${X})`);break;default:break}}function W5(Q,X,Y){if(!Q)throw Error(`${Y} does not support task creation (required for ${X})`);switch(X){case"sampling/createMessage":if(!Q.sampling?.createMessage)throw Error(`${Y} does not support task creation for sampling/createMessage (required for ${X})`);break;case"elicitation/create":if(!Q.elicitation?.create)throw Error(`${Y} does not support task creation for elicitation/create (required for ${X})`);break;default:break}}class bX extends O9{constructor(Q,X){super(X);if(this._serverInfo=Q,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(B6.options.map((Y,W)=>[Y,W])),this.isMessageIgnored=(Y,W)=>{let G=this._loggingLevels.get(W);return G?this.LOG_LEVEL_SEVERITY.get(Y)<this.LOG_LEVEL_SEVERITY.get(G):!1},this._capabilities=X?.capabilities??{},this._instructions=X?.instructions,this._jsonSchemaValidator=X?.jsonSchemaValidator??new NX,this.setRequestHandler(Q9,(Y)=>this._oninitialize(Y)),this.setNotificationHandler(X9,()=>this.oninitialized?.()),this._capabilities.logging)this.setRequestHandler(U9,async(Y,W)=>{let G=W.sessionId||W.requestInfo?.headers["mcp-session-id"]||void 0,{level:$}=Y.params,J=B6.safeParse($);if(J.success)this._loggingLevels.set(G,J.data);return{}})}get experimental(){if(!this._experimental)this._experimental={tasks:new wX(this)};return this._experimental}registerCapabilities(Q){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=bG(this._capabilities,Q)}setRequestHandler(Q,X){let W=G4(Q)?.method;if(!W)throw Error("Schema is missing a method literal");let G;if(P1(W)){let J=W;G=J._zod?.def?.value??J.value}else{let J=W;G=J._def?.value??J.value}if(typeof G!=="string")throw Error("Schema method literal must be a string");if(G==="tools/call"){let J=async(z,H)=>{let A=Q1(U6,z);if(!A.success){let L=A.error instanceof Error?A.error.message:String(A.error);throw new k(y.InvalidParams,`Invalid tools/call request: ${L}`)}let{params:K}=A.data,U=await Promise.resolve(X(z,H));if(K.task){let L=Q1(E1,U);if(!L.success){let q=L.error instanceof Error?L.error.message:String(L.error);throw new k(y.InvalidParams,`Invalid task creation result: ${q}`)}return L.data}let B=Q1(Z4,U);if(!B.success){let L=B.error instanceof Error?B.error.message:String(B.error);throw new k(y.InvalidParams,`Invalid tools/call result: ${L}`)}return B.data};return super.setRequestHandler(Q,J)}return super.setRequestHandler(Q,X)}assertCapabilityForMethod(Q){switch(Q){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw Error(`Client does not support sampling (required for ${Q})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw Error(`Client does not support elicitation (required for ${Q})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw Error(`Client does not support listing roots (required for ${Q})`);break;case"ping":break}}assertNotificationCapability(Q){switch(Q){case"notifications/message":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${Q})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw Error(`Server does not support notifying about resources (required for ${Q})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw Error(`Server does not support notifying of tool list changes (required for ${Q})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw Error(`Server does not support notifying of prompt list changes (required for ${Q})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw Error(`Client does not support URL elicitation (required for ${Q})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(Q){if(!this._capabilities)return;switch(Q){case"completion/complete":if(!this._capabilities.completions)throw Error(`Server does not support completions (required for ${Q})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw Error(`Server does not support logging (required for ${Q})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw Error(`Server does not support prompts (required for ${Q})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw Error(`Server does not support resources (required for ${Q})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Server does not support tools (required for ${Q})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw Error(`Server does not support tasks capability (required for ${Q})`);break;case"ping":case"initialize":break}}assertTaskCapability(Q){W5(this._clientCapabilities?.tasks?.requests,Q,"Client")}assertTaskHandlerCapability(Q){if(!this._capabilities)return;Y5(this._capabilities.tasks?.requests,Q,"Server")}async _oninitialize(Q){let X=Q.params.protocolVersion;return this._clientCapabilities=Q.params.capabilities,this._clientVersion=Q.params.clientInfo,{protocolVersion:$G.includes(X)?X:oQ,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},K4)}async createMessage(Q,X){if(Q.tools||Q.toolChoice){if(!this._clientCapabilities?.sampling?.tools)throw Error("Client does not support sampling tools capability.")}if(Q.messages.length>0){let Y=Q.messages[Q.messages.length-1],W=Array.isArray(Y.content)?Y.content:[Y.content],G=W.some((H)=>H.type==="tool_result"),$=Q.messages.length>1?Q.messages[Q.messages.length-2]:void 0,J=$?Array.isArray($.content)?$.content:[$.content]:[],z=J.some((H)=>H.type==="tool_use");if(G){if(W.some((H)=>H.type!=="tool_result"))throw Error("The last message must contain only tool_result content if any is present");if(!z)throw Error("tool_result blocks are not matching any tool_use from the previous message")}if(z){let H=new Set(J.filter((K)=>K.type==="tool_use").map((K)=>K.id)),A=new Set(W.filter((K)=>K.type==="tool_result").map((K)=>K.toolUseId));if(H.size!==A.size||![...H].every((K)=>A.has(K)))throw Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}if(Q.tools)return this.request({method:"sampling/createMessage",params:Q},D9,X);return this.request({method:"sampling/createMessage",params:Q},B9,X)}async elicitInput(Q,X){switch(Q.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support url elicitation.");let W=Q;return this.request({method:"elicitation/create",params:W},N4,X)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw Error("Client does not support form elicitation.");let W=Q.mode==="form"?Q:{...Q,mode:"form"},G=await this.request({method:"elicitation/create",params:W},N4,X);if(G.action==="accept"&&G.content&&W.requestedSchema)try{let J=this._jsonSchemaValidator.getValidator(W.requestedSchema)(G.content);if(!J.valid)throw new k(y.InvalidParams,`Elicitation response content does not match requested schema: ${J.errorMessage}`)}catch($){if($ instanceof k)throw $;throw new k(y.InternalError,`Error validating elicitation response: ${$ instanceof Error?$.message:String($)}`)}return G}}}createElicitationCompletionNotifier(Q,X){if(!this._clientCapabilities?.elicitation?.url)throw Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:Q}},X)}async listRoots(Q,X){return this.request({method:"roots/list",params:Q},L9,X)}async sendLoggingMessage(Q,X){if(this._capabilities.logging){if(!this.isMessageIgnored(Q.level,X))return this.notification({method:"notifications/message",params:Q})}}async sendResourceUpdated(Q){return this.notification({method:"notifications/resources/updated",params:Q})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}import $5 from"node:process";class jX{append(Q){this._buffer=this._buffer?Buffer.concat([this._buffer,Q]):Q}readMessage(){if(!this._buffer)return null;let Q=this._buffer.indexOf(`
|
|
29
29
|
`);if(Q===-1)return null;let X=this._buffer.toString("utf8",0,Q).replace(/\r$/,"");return this._buffer=this._buffer.subarray(Q+1),QM(X)}clear(){this._buffer=void 0}}function QM(Q){return DG.parse(JSON.parse(Q))}function G5(Q){return JSON.stringify(Q)+`
|
|
30
|
-
`}class PX{constructor(Q=$5.stdin,X=$5.stdout){this._stdin=Q,this._stdout=X,this._readBuffer=new jX,this._started=!1,this._ondata=(Y)=>{this._readBuffer.append(Y),this.processReadBuffer()},this._onerror=(Y)=>{this.onerror?.(Y)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let Q=this._readBuffer.readMessage();if(Q===null)break;this.onmessage?.(Q)}catch(Q){this.onerror?.(Q)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send(Q){return new Promise((X)=>{let Y=G5(Q);if(this._stdout.write(Y))X();else this._stdout.once("drain",X)})}}var J5={name:"@sequenzy/mcp",version:"0.0.
|
|
30
|
+
`}class PX{constructor(Q=$5.stdin,X=$5.stdout){this._stdin=Q,this._stdout=X,this._readBuffer=new jX,this._started=!1,this._ondata=(Y)=>{this._readBuffer.append(Y),this.processReadBuffer()},this._onerror=(Y)=>{this.onerror?.(Y)}}async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){while(!0)try{let Q=this._readBuffer.readMessage();if(Q===null)break;this.onmessage?.(Q)}catch(Q){this.onerror?.(Q)}}async close(){if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),this.onclose?.()}send(Q){return new Promise((X)=>{let Y=G5(Q);if(this._stdout.write(Y))X();else this._stdout.once("drain",X)})}}var J5={name:"@sequenzy/mcp",version:"0.0.37",mcpName:"io.github.sequenzy/mcp",description:"Sequenzy MCP server for AI-powered email marketing automation",type:"module",bin:{"sequenzy-mcp":"dist/index.js"},main:"./dist/index.js",exports:{".":"./dist/index.js","./server.json":"./server.json"},scripts:{dev:"bun --watch src/index.ts",build:"bun build src/index.ts --outdir dist --target node --minify",start:"node dist/index.js","type-check":"tsc --noEmit",test:"bun test","test:watch":"bun test --watch",prepublishOnly:"bun run build"},dependencies:{"@modelcontextprotocol/sdk":"^1.0.0"},devDependencies:{"@types/bun":"latest","@types/node":"^22.0.0","bun-types":"latest",typescript:"^5.8.0"},files:["dist","server.json"],keywords:["sequenzy","email","mcp","ai","claude","automation"],license:"MIT",publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sequenzy/mcp.git"},homepage:"https://sequenzy.com",bugs:{url:"https://github.com/Sequenzy/mcp/issues"}};class f1 extends Error{statusCode;rawDetails;code;constructor(Q,X,Y,W){super(Q);this.statusCode=X;this.rawDetails=Y;this.code=W;this.name="McpApiError"}}function YM(Q){if(Q instanceof f1)return{message:Q.message,statusCode:Q.statusCode,code:Q.code,rawDetails:Q.rawDetails};if(Q instanceof Error)return{message:Q.message};return{message:String(Q)}}function WM(Q){let X=YM(Q),Y=X.message.trim()||"Unknown error",W=Y.toLowerCase(),G=X.rawDetails?.trim()||Y;if(X.code==="MCP_AUTH_REQUIRED"||W.includes("sequenzy_api_key environment variable is required"))return{title:"Missing MCP API key",description:"The MCP server started without a Sequenzy API key, so it cannot authenticate any tool or resource request.",howToFix:"Add `SEQUENZY_API_KEY` to the MCP server environment, or run `npx @sequenzy/setup` to configure the integration automatically.",docsUrl:"https://docs.sequenzy.com/concepts/mcp",details:G};if(X.statusCode===401||X.code==="UNAUTHORIZED")return{title:"Authentication failed",description:"The MCP server reached Sequenzy, but the current API key was rejected.",howToFix:"Replace `SEQUENZY_API_KEY` with a valid personal API key, then restart the MCP client so it reconnects with fresh credentials.",docsUrl:"https://docs.sequenzy.com/authentication",details:G};if(X.statusCode===403||W.includes("access denied"))return{title:"Access denied",description:"The current API key is valid, but it does not have permission to access the requested company or action.",howToFix:"Use an API key that belongs to the right account, or select a company the key can access before retrying the tool call.",docsUrl:"https://docs.sequenzy.com/authentication",details:G};if(W.includes("no company available")||W.includes("company not found"))return{title:"Company selection required",description:"The MCP server could not resolve a company for this request.",howToFix:"Call `get_account` to inspect available companies, then call `select_company`, or pass `companyId` explicitly in the next tool call.",docsUrl:"https://docs.sequenzy.com/concepts/mcp",details:G};if(X.statusCode===404||W.includes("not found"))return{title:"Requested resource not found",description:"Sequenzy could not find the requested campaign, template, sequence, company, or subscriber.",howToFix:"List or fetch the resource collection first, then retry the tool with a confirmed ID or email value.",docsUrl:"https://docs.sequenzy.com/concepts/mcp",details:G};if(X.statusCode===429||W.includes("rate limit"))return{title:"Rate limited",description:"Sequenzy temporarily slowed this MCP request because too many requests were sent too quickly.",howToFix:"Wait briefly before retrying. If the client is looping, reduce retries or add backoff before the next tool call.",docsUrl:"https://docs.sequenzy.com/concepts/mcp",details:G};if(X.code==="NETWORK_ERROR"||W.includes("fetch failed"))return{title:"Network or configuration error",description:"The MCP server could not reach the Sequenzy API from this environment.",howToFix:"Check connectivity and verify `SEQUENZY_API_URL` if you override it in the MCP environment.",docsUrl:"https://docs.sequenzy.com/concepts/mcp",details:G};if(W.includes("unknown tool")||W.includes("unknown resource"))return{title:"Unsupported MCP request",description:"The client asked for a tool or resource name that this Sequenzy MCP server does not expose.",howToFix:"Refresh the client's tool list and call only the names returned by `list_tools` or `list_resources`.",docsUrl:"https://docs.sequenzy.com/concepts/mcp",details:G};if(W.includes("is required")||W.includes("invalid"))return{title:"Invalid MCP input",description:"The tool call was missing a required field or included an invalid value.",howToFix:"Review the tool schema, supply the missing argument, and retry the request with corrected input.",docsUrl:"https://docs.sequenzy.com/concepts/mcp",details:G};if(X.statusCode&&X.statusCode>=500)return{title:"Sequenzy server error",description:"The request reached Sequenzy, but the server could not complete it successfully.",howToFix:"Retry once. If it still fails, keep the details below and consult the docs before escalating.",docsUrl:"https://docs.sequenzy.com/concepts/mcp",details:G};return{title:"Tool execution failed",description:"The MCP server could not complete the requested operation.",howToFix:"Review the details below, adjust the tool input or credentials, and retry.",docsUrl:"https://docs.sequenzy.com/concepts/mcp",details:G}}function V1(Q){let X=WM(Q);return[`Sequenzy MCP error: ${X.title}`,`Description: ${X.description}`,`How to fix: ${X.howToFix}`,`Docs: ${X.docsUrl}`,`Details: ${X.details}`].join(`
|
|
31
31
|
`)}var IX=["product-info","domain","tracking","localization","integrations","products","events","tags","labels","goals","sync-rules","api-keys","widgets","team","danger"],z5={dashboard:"/dashboard/company/{companyId}",campaigns:"/dashboard/company/{companyId}/campaign",campaign:"/dashboard/company/{companyId}/campaign/{campaignId}",campaignPreview:"/dashboard/company/{companyId}/campaign/{campaignId}?step=review",campaignList:"/dashboard/company/{companyId}/campaign/list/{status}",sequences:"/dashboard/company/{companyId}/sequences",sequence:"/dashboard/company/{companyId}/sequences/{sequenceId}",sequenceList:"/dashboard/company/{companyId}/sequences/list/{status}",settings:"/dashboard/company/{companyId}/settings",settingsTab:"/dashboard/company/{companyId}/settings?tab={tab}",emails:"/dashboard/company/{companyId}/emails",email:"/dashboard/company/{companyId}/emails/{emailId}",subscribers:"/dashboard/company/{companyId}/subscribers",sentEmails:"/dashboard/company/{companyId}/sent-emails",emailSend:"/dashboard/company/{companyId}/sent-emails/{emailSendId}",segments:"/dashboard/company/{companyId}/segments",metrics:"/dashboard/company/{companyId}/metrics",transactional:"/dashboard/company/{companyId}/transactional",transactionalEmail:"/dashboard/company/{companyId}/transactional/{transactionalId}",domain:"/dashboard/company/{companyId}/settings/domain/{domainId}",domainVerify:"/dashboard/company/{companyId}/settings/domain/{domainId}/verify"};function GM(Q){let Y=(Q??process.env.SEQUENZY_APP_URL??"https://sequenzy.com").trim().replace(/\/+$/,"");return Y.length>0?Y:"https://sequenzy.com"}function u0(Q){let X=Q?.trim();return X?X:void 0}function o0(Q){return encodeURIComponent(Q)}function Q0(Q,X){return`${Q}${X}`}function X0(Q,X=""){return`/dashboard/company/${o0(Q)}${X}`}function H5(Q,X,Y){return Q0(Q,`${X0(X,"/settings")}?tab=${encodeURIComponent(Y)}`)}function $M(Q,X){let Y=IX.map((W)=>[W,X?H5(Q,X,W):""]);return Object.fromEntries(Y)}function K1(Q={},X){let Y=GM(X),W=u0(Q.companyId),G={},$=$M(Y,W);if(!W)return{appUrl:Y,routeTemplates:z5,settingsTabValues:IX,urls:G,settingsUrls:$};G.dashboard=Q0(Y,X0(W)),G.campaigns=Q0(Y,X0(W,"/campaign")),G.sequences=Q0(Y,X0(W,"/sequences")),G.settings=Q0(Y,X0(W,"/settings")),G.emails=Q0(Y,X0(W,"/emails")),G.subscribers=Q0(Y,X0(W,"/subscribers")),G.sentEmails=Q0(Y,X0(W,"/sent-emails")),G.segments=Q0(Y,X0(W,"/segments")),G.metrics=Q0(Y,X0(W,"/metrics")),G.transactional=Q0(Y,X0(W,"/transactional"));let J=u0(Q.campaignId);if(J)G.campaign=Q0(Y,X0(W,`/campaign/${o0(J)}`)),G.campaignPreview=`${G.campaign}?step=review`;let z=u0(Q.sequenceId);if(z)G.sequence=Q0(Y,X0(W,`/sequences/${o0(z)}`));let H=u0(Q.emailId)??u0(Q.templateId);if(H)G.email=Q0(Y,X0(W,`/emails/${o0(H)}`)),G.template=G.email;let A=u0(Q.transactionalId);if(A)G.transactionalEmail=Q0(Y,X0(W,`/transactional/${o0(A)}`));let K=u0(Q.emailSendId);if(K)G.emailSend=Q0(Y,X0(W,`/sent-emails/${o0(K)}`));let U=u0(Q.domainId);if(U)G.domain=Q0(Y,X0(W,`/settings/domain/${o0(U)}`)),G.domainVerify=`${G.domain}/verify`;let B=u0(Q.status);if(B)G.campaignList=Q0(Y,X0(W,`/campaign/list/${o0(B)}`)),G.sequenceList=Q0(Y,X0(W,`/sequences/list/${o0(B)}`));let L=u0(Q.settingsTab);if(L)G.settingsTab=H5(Y,W,L);return{appUrl:Y,routeTemplates:z5,settingsTabValues:IX,urls:G,settingsUrls:$}}var A5=[{uri:"sequenzy://dashboard",name:"Dashboard Overview",description:"Live overview stats for the last 7 days",mimeType:"application/json"},{uri:"sequenzy://company",name:"Current Company",description:"The currently selected company, including localization settings",mimeType:"application/json"},{uri:"sequenzy://campaigns/recent",name:"Recent Campaigns",description:"Last 10 campaigns with status and basic stats",mimeType:"application/json"},{uri:"sequenzy://subscribers/recent",name:"Recent Subscribers",description:"Most recently added subscribers",mimeType:"application/json"},{uri:"sequenzy://subscribers/engaged",name:"Engaged Subscribers",description:"Most active/engaged subscribers",mimeType:"application/json"},{uri:"sequenzy://sequences",name:"Sequences",description:"All email sequences with status",mimeType:"application/json"},{uri:"sequenzy://templates",name:"Templates",description:"All available email templates with localization status",mimeType:"application/json"},{uri:"sequenzy://segments",name:"Segments",description:"All defined segments with subscriber counts",mimeType:"application/json"},{uri:"sequenzy://tags",name:"Tags",description:"All tags with usage counts",mimeType:"application/json"},{uri:"sequenzy://health",name:"Deliverability Health",description:"Email deliverability metrics and health status",mimeType:"application/json"},{uri:"sequenzy://app-routes",name:"Dashboard URL Routes",description:"Route templates and settings tabs for building Sequenzy dashboard links",mimeType:"application/json"}];async function K5(Q){try{let X;switch(Q){case"sequenzy://dashboard":X=await Z("GET","/api/v1/metrics?period=7d");break;case"sequenzy://company":{let Y=await Z("GET","/api/v1/account"),W=l1()??Y.currentCompanyId;if(!W)throw Error("No company available. Create or select a company first.");X=await Z("GET",`/api/v1/companies/${W}`);break}case"sequenzy://campaigns/recent":X=await Z("GET","/api/v1/campaigns?limit=10");break;case"sequenzy://subscribers/recent":X=await Z("GET","/api/v1/subscribers?sort=createdAt&limit=20");break;case"sequenzy://subscribers/engaged":X=await Z("GET","/api/v1/subscribers?sort=engagement&limit=20");break;case"sequenzy://sequences":X=await Z("GET","/api/v1/sequences");break;case"sequenzy://templates":X=await Z("GET","/api/v1/templates");break;case"sequenzy://segments":X=await Z("GET","/api/v1/segments");break;case"sequenzy://tags":X=await Z("GET","/api/v1/tags");break;case"sequenzy://health":X=await Z("GET","/api/v1/health/deliverability");break;case"sequenzy://app-routes":X=K1();break;default:throw Error(`Unknown resource: ${Q}`)}return{contents:[{uri:Q,mimeType:"application/json",text:JSON.stringify(X,null,2)}]}}catch(X){return{contents:[{uri:Q,mimeType:"text/plain",text:V1(X)}]}}}var JM={type:"object",properties:{id:{type:"string",description:"Optional filter ID. Any stable string works; one will be generated if omitted."},field:{type:"string",enum:["status","tag","email","emailProvider","added","firstName","lastName","list","emailSent","emailOpened","emailClicked","emailBounced","emailComplained","attribute","event","segment","stripeProduct","stripeCurrentProduct","stripeTrialProduct"],description:"Filter field. Use `event` for custom subscriber events, `segment` for saved segment membership, and `stripeProduct`/`stripeCurrentProduct`/`stripeTrialProduct` for Stripe product-based segments. Engagement fields (`emailSent`, `emailOpened`, `emailClicked`, `emailBounced`, `emailComplained`) accept a time range as the value or a specific campaign via `campaign:<campaign_id>`."},operator:{type:"string",enum:["is","is_not","is_empty","is_not_empty","contains","not_contains","less_than","more_than","at_least","less_than_count","gte","lte","gt","lt"],description:"Filter operator. Use `is_empty` or `is_not_empty` for fields that can be blank, including custom attributes. For `stripeProduct`, use `is` or `is_not` with a raw product ID, and `at_least` or `less_than_count` with `productId:count`. For `event`, use `is`, `is_not`, `at_least`, or `less_than_count`. For engagement fields, use `is` (event happened) or `is_not` (event did not happen)."},value:{type:"string",description:"Filter value. For custom attribute empty checks, use `attributeName:` such as `last_logged_in:`. Event examples: `saas.purchase:30d`, `saas.purchase:all`, or `saas.purchase:5:30d` for thresholds. Segment values are segment IDs. Stripe product examples: `prod_123` for bought/didn't buy, `prod_123:3` for payment thresholds. Engagement examples: `7d`, `30d`, `90d`, `180d`, `all` for rolling time windows, or `campaign:<campaign_id>` to scope to a specific sent campaign (use `list_campaigns` to find IDs)."}},required:["field","operator","value"],additionalProperties:!1},zM={type:"object",properties:{kind:{type:"string",enum:["group"]},id:{type:"string",description:"Stable group ID. Any string works; one will be generated if omitted."},joinOperator:{type:"string",enum:["and","or"],description:"How children in this group combine."},children:{type:"array",minItems:1,items:{type:"object",description:'Either a filter leaf (`kind: "filter"`) or another group (`kind: "group"`).'}}},required:["kind","joinOperator","children"],additionalProperties:!0};function D5(Q){if(!Array.isArray(Q))return Q;return Q.map((X)=>{if(typeof X!=="object"||X===null)return X;let Y=X;if(typeof Y.id==="string"&&Y.id.trim()!=="")return Y;return{...Y,id:crypto.randomUUID()}})}function L5(Q){if(typeof Q!=="object"||Q===null)return Q;let X=Q;if(X.kind==="filter"){let Y=D5([X]);return Array.isArray(Y)?Y[0]:X}if(X.kind!=="group")return Q;return{...X,id:typeof X.id==="string"&&X.id.trim()!==""?X.id:crypto.randomUUID(),children:Array.isArray(X.children)?X.children.map(L5):[]}}function Z1(Q,X,Y){if(X.html!==void 0&&X.blocks!==void 0)throw Error(`Provide either \`html\` or \`blocks\` when calling \`${Q}\`, not both.`);if(X.blocks!==void 0&&!Array.isArray(X.blocks))throw Error(`\`blocks\` must be an array when calling \`${Q}\`.`);if(Y?.requireContent&&X.html===void 0&&X.blocks===void 0)throw Error(`Provide either \`html\` or \`blocks\` when calling \`${Q}\`.`)}function zQ(Q,X){if(X.labels===void 0)return;if(!Array.isArray(X.labels))throw Error(`\`labels\` must be an array when calling \`${Q}\`.`);if(X.labels.some((Y)=>typeof Y!=="string"||Y.trim().length===0))throw Error(`\`labels\` must contain only non-empty strings when calling \`${Q}\`.`)}function HM(Q){let X=Q.filters!==void 0,Y=Q.root!==void 0;if(X&&Y)throw Error("Provide either `filters` or `root` when calling `create_segment`, not both.");if(!X&&!Y)throw Error("Provide either `filters` or `root` when calling `create_segment`.");if(X){if(!Array.isArray(Q.filters))throw Error("`filters` must be an array when calling `create_segment`.");if(Q.filters.length===0)throw Error("`filters` must include at least one filter when calling `create_segment`.")}if(Y&&(typeof Q.root!=="object"||Q.root===null))throw Error("`root` must be an object when calling `create_segment`.")}function AM(Q){if(Q.clearEnrollmentFieldPath===!0&&Q.enrollmentFieldPath!==void 0)throw Error("Provide either `enrollmentFieldPath` or `clearEnrollmentFieldPath` when calling `update_sequence`, not both.");let X={...Q};if(delete X.clearEnrollmentFieldPath,Q.clearEnrollmentFieldPath===!0)X.enrollmentFieldPath=null;return X}function KM(Q){let X=P(Q,"subscriberId"),Y=Q.fieldValues,W=Y===void 0?void 0:Array.isArray(Y)?Y:void 0;if(Y!==void 0&&W===void 0)throw Error("`fieldValues` must be an array when calling `cancel_sequence_enrollments`.");let G=W?.map((z)=>typeof z==="string"?z.trim():"").filter((z)=>z.length>0)??[];if(W?.some((z)=>typeof z!=="string")||W!==void 0&&G.length===0)throw Error("`fieldValues` must contain at least one non-empty string when calling `cancel_sequence_enrollments`.");if(X!==void 0===G.length>0)throw Error("Provide exactly one target when calling `cancel_sequence_enrollments`: `subscriberId` or `fieldValues`.");let $=P(Q,"fieldPath"),J=P(Q,"reason");return{...X!==void 0&&{subscriberId:X},...$!==void 0&&{fieldPath:$},...G.length>0&&{fieldValues:G},...typeof Q.dryRun==="boolean"&&{dryRun:Q.dryRun},...J!==void 0&&{reason:J}}}function UM(Q){Z1("create_campaign",Q),zQ("create_campaign",Q);let X=P(Q,"prompt")!==void 0,Y=Q.html!==void 0,W=Q.blocks!==void 0,G=Q.templateId!==void 0;if(Q.prompt!==void 0&&!X)throw Error("`prompt` cannot be empty when calling `create_campaign`.");if(X&&(Y||W||G))throw Error("Provide either `prompt`, `html`, `blocks`, or `templateId` when calling `create_campaign`, not multiple content sources.");if(!X&&(Q.style!==void 0||Q.tone!==void 0))throw Error("`style` and `tone` can only be used with `prompt` when calling `create_campaign`.");if(!X&&P(Q,"subject")===void 0)throw Error("`subject` is required unless `prompt` is provided when calling `create_campaign`.")}function BM(Q){if(P(Q,"scheduledAt")===void 0)throw Error("`scheduledAt` is required when calling `schedule_campaign`.");if(Q.targetLists!==void 0&&!D0(Q.targetLists))throw Error("`targetLists` must be an object when calling `schedule_campaign`.");if(Q.sendTimeOptimization!==void 0){if(typeof Q.sendTimeOptimization!=="boolean")throw Error("`sendTimeOptimization` must be a boolean when calling `schedule_campaign`.")}if(Q.spreadOverHours!==void 0){if(typeof Q.spreadOverHours!=="number"||!Number.isInteger(Q.spreadOverHours)||Q.spreadOverHours<1||Q.spreadOverHours>72)throw Error("`spreadOverHours` must be an integer between 1 and 72 when calling `schedule_campaign`.")}}function DM(Q){Z1("create_transactional_email",Q);let X=P(Q,"prompt")!==void 0,Y=Q.html!==void 0,W=Q.blocks!==void 0;if(Q.prompt!==void 0&&!X)throw Error("`prompt` cannot be empty when calling `create_transactional_email`.");if(X&&(Y||W))throw Error("Provide either `prompt`, `html`, or `blocks` when calling `create_transactional_email`, not multiple content sources.");if(!X&&(Q.style!==void 0||Q.tone!==void 0))throw Error("`style` and `tone` can only be used with `prompt` when calling `create_transactional_email`.");if(!X&&!Y&&!W)throw Error("Provide either `prompt`, `html`, or `blocks` when calling `create_transactional_email`.");if(!X&&P(Q,"subject")===void 0)throw Error("`subject` is required unless `prompt` is provided when calling `create_transactional_email`.")}var U5={type:"object",description:"A step to create inside a branch path. Use type:'delay' for a standalone delay, type:'email' for an email, or type:'create_discount' for a discount action.",properties:{type:{type:"string",enum:["email","delay","create_discount","discount","webhook"],description:"Branch path step type. Omit for email steps; use delay for standalone waits."},nodeType:{type:"string",enum:["logic_delay","action_email","action_create_discount","action_add_tag","action_remove_tag","action_add_to_list","action_remove_from_list","action_update_attributes","logic_wait_for_event","action_webhook"],description:"Advanced branch path node type. Prefer type unless creating a non-email action."},config:{type:"object",description:"Config for advanced nodeType steps such as tag/list/webhook/wait-for-event actions.",additionalProperties:!0},subject:{type:"string",description:"Email subject. Required for email steps."},previewText:{type:"string",description:"Email preview text."},blocks:{type:"array",description:"Sequenzy email blocks for email steps.",items:{type:"object"}},html:{type:"string",description:"HTML content for email steps."},delay:{type:"object",description:"Delay before this step, or the delay duration when type is delay.",properties:{days:{type:"number"},hours:{type:"number"},minutes:{type:"number"}}},delayMs:{type:"number",description:"Delay in milliseconds. Useful for standalone type:'delay' steps."},name:{type:"string",description:"Email template name for email steps."},discount:{type:"object",description:"Discount configuration for create_discount steps. Same shape as create_sequence steps.",additionalProperties:!0},label:{type:"string",description:"Node label for discount or advanced node steps."},provider:{type:"string",enum:["stripe","shopify"]},discountType:{type:"string",enum:["percent","amount"]},percentOff:{type:"number"},amountOff:{type:"number"},currency:{type:"string"},duration:{type:"string",enum:["once","forever","repeating"]},durationInMonths:{type:"number"},appliesToAllPlans:{type:"boolean"},planIds:{type:"array",items:{type:"string"}},codePrefix:{type:"string"},maxRedemptions:{type:"number"},lockToSubscriber:{type:"boolean"},expiresAt:{type:"string"},expiresInHours:{type:"number"}},additionalProperties:!1};function LM(Q){if(!Q||typeof Q!=="object")return null;let X=Q;if(X.success!==!1)return null;if(typeof X.error==="string")return Error(X.error);if(X.error&&typeof X.error==="object"&&typeof X.error.message==="string")return Error(X.error.message);if(typeof X.message==="string")return Error(X.message);return Error("The tool returned an unsuccessful response.")}function D0(Q){return typeof Q==="object"&&Q!==null&&!Array.isArray(Q)}function B5(Q){return Q.trim().toLowerCase().replace(/\s+/g,"-")}function FM(Q){let X=new URLSearchParams;if(typeof Q.query==="string"&&Q.query.trim()!=="")X.set("query",Q.query.trim());if(Array.isArray(Q.tags)&&Q.tags.length>0)X.set("tags",Q.tags.filter((Y)=>typeof Y==="string"&&Y.trim()!=="").join(","));if(typeof Q.segmentId==="string"&&Q.segmentId.trim()!=="")X.set("segmentId",Q.segmentId);return X.set("page",String(Q.page)),X.set("limit",String(Q.pageSize)),X}async function qM(Q,X){let Y=typeof Q.limit==="number"&&Number.isFinite(Q.limit)?Math.max(1,Math.trunc(Q.limit)):void 0,W=Math.min(100,Math.max(1,Y??100)),G=[],$=1,J=0,z=0,H=0;while(!0){let K=FM({query:Q.query,tags:Q.tags,segmentId:Q.segmentId,page:$,pageSize:W}),U=await Z("GET",`/api/v1/subscribers?${K.toString()}`,void 0,X);J=U.pagination?.total??U.subscribers.length,z=U.pagination?.totalPages??1,H+=1,G.push(...U.subscribers??[]);let B=Y!==void 0&&G.length>=Y,L=U.pagination?$>=U.pagination.totalPages:(U.subscribers??[]).length<W;if(B||L)break;$+=1}let A=Y!==void 0?G.slice(0,Y):G;return{success:!0,subscribers:A,pagination:{page:1,limit:W,total:J,totalPages:z,fetchedPages:H},returned:A.length,truncated:Y!==void 0&&J>0&&A.length<J}}function OM(Q){let X=typeof Q.email==="string"&&Q.email.trim()!==""?Q.email.trim():void 0,Y=typeof Q.externalId==="string"&&Q.externalId.trim()!==""?Q.externalId.trim():void 0;return{...X?{email:X}:{},...Y?{externalId:Y}:{}}}function g6(Q,X){let Y=OM(X);if(!Y.email&&!Y.externalId)throw Error(`Provide either \`email\` or \`externalId\` when calling \`${Q}\`.`);return Y}function TX(Q){if(Q.email)return`/api/v1/subscribers/${encodeURIComponent(Q.email)}`;return`/api/v1/subscribers/external?externalId=${encodeURIComponent(String(Q.externalId))}`}async function EX(Q,X){return Z("GET",TX(Q),void 0,X)}function P(Q,X){let Y=Q[X];if(typeof Y!=="string")return;let W=Y.trim();return W.length>0?W:void 0}async function F5(Q){let X=P(Q,"companyId");if(X)return X;let Y=l1();if(Y)return Y;try{return(await Z("GET","/api/v1/account")).currentCompanyId??void 0}catch{return}}function u6(Q,X){if(!D0(Q)||!X)return Q;return{...Q,url:X}}function q5(Q,X){if(!D0(Q))return Q;return{...Q,...X.campaign!==void 0&&{url:X.campaign},...X.campaignPreview!==void 0&&{previewUrl:X.campaignPreview}}}function JQ(Q,X,Y){if(!Array.isArray(Q)||!X)return Q;return Q.map((W)=>{if(!D0(W))return W;let G=P(W,"id");if(!G)return W;let $=K1({companyId:X,...Y==="campaign"&&{campaignId:G},...Y==="sequence"&&{sequenceId:G},...Y==="template"&&{emailId:G},...Y==="transactional"&&{transactionalId:G}});if(Y==="campaign")return q5(W,$.urls);let J=Y==="sequence"?$.urls.sequence:Y==="template"?$.urls.email:$.urls.transactionalEmail;return u6(W,J)})}function MM(Q){if(!Array.isArray(Q))return Q;return Q.map((X)=>{if(!D0(X))return X;let Y=P(X,"id");if(!Y)return X;let W=K1({companyId:Y});return{...X,url:W.urls.dashboard,settingsUrl:W.urls.settings}})}var VM=new Set(["get_account","select_company","create_company","get_company","list_campaigns","get_campaign","get_email_send","create_campaign","update_campaign","schedule_campaign","send_test_email","list_sequences","get_sequence","create_sequence","update_sequence","enable_sequence","disable_sequence","cancel_sequence_enrollments","list_ab_tests","get_ab_test","get_ab_test_stats","update_ab_test_variant","list_templates","get_template","create_template","update_template","list_transactional_emails","get_transactional_email","create_transactional_email","update_transactional_email"]);async function ZM(Q,X,Y){if(!D0(Y)||!VM.has(Q))return Y;let W=D0(Y.company)?Y.company:void 0,$=P(Y,"selectedCompanyId")??P(Y,"currentCompanyId")??P(Y,"companyId")??(W?P(W,"id"):void 0)??(W?P(W,"companyId"):void 0)??await F5(X);if(!$)return Y;let J=D0(Y.campaign)?Y.campaign:void 0,z=D0(Y.sequence)?Y.sequence:void 0,H=D0(Y.template)?Y.template:void 0,A=D0(Y.transactional)&&!Array.isArray(Y.transactional)?Y.transactional:void 0,K={companyId:$,campaignId:P(X,"campaignId")??P(Y,"campaignId")??(J?P(J,"id"):void 0),sequenceId:P(X,"sequenceId")??P(Y,"sequenceId")??(z?P(z,"id"):void 0),emailId:P(Y,"templateId")??(H?P(H,"id"):void 0)??(A?P(A,"emailId"):void 0)??P(X,"templateId"),transactionalId:P(X,"transactionalId")??(A?P(A,"id"):void 0)??P(X,"idOrSlug"),emailSendId:P(X,"emailSendId")??P(Y,"emailSendId")??(D0(Y.emailSend)?P(Y.emailSend,"id"):void 0),status:P(X,"status")},U=K1(K),B=W?K1({companyId:$}):void 0;return{...Y,...Array.isArray(Y.companies)&&{companies:MM(Y.companies)},...Array.isArray(Y.campaigns)&&{campaigns:JQ(Y.campaigns,$,"campaign")},...Array.isArray(Y.sequences)&&{sequences:JQ(Y.sequences,$,"sequence")},...Array.isArray(Y.templates)&&{templates:JQ(Y.templates,$,"template")},...Array.isArray(Y.transactional)&&{transactional:JQ(Y.transactional,$,"transactional")},...W&&B!==void 0&&{company:{...W,url:B.urls.dashboard,settingsUrl:B.urls.settings}},...J&&U.urls.campaign!==void 0&&{campaign:q5(J,U.urls)},...z&&U.urls.sequence!==void 0&&{sequence:u6(z,U.urls.sequence)},...H&&U.urls.email!==void 0&&{template:u6(H,U.urls.email)},...A&&U.urls.transactionalEmail!==void 0&&{transactional:u6(A,U.urls.transactionalEmail)},...D0(Y.emailSend)&&U.urls.emailSend!==void 0&&{emailSend:u6(Y.emailSend,U.urls.emailSend)},appUrls:U.urls}}var O5=[{name:"get_account",description:`Get current account information including available companies. IMPORTANT: If you have access to multiple companies, you MUST either:
|
|
32
32
|
1. Call select_company first to choose which company to work with, OR
|
|
33
33
|
2. Pass companyId explicitly in each tool call
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequenzy/mcp",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"mcpName": "io.github.
|
|
3
|
+
"version": "0.0.37",
|
|
4
|
+
"mcpName": "io.github.sequenzy/mcp",
|
|
5
5
|
"description": "Sequenzy MCP server for AI-powered email marketing automation",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
},
|
|
49
49
|
"repository": {
|
|
50
50
|
"type": "git",
|
|
51
|
-
"url": "git+https://github.com/
|
|
51
|
+
"url": "git+https://github.com/Sequenzy/mcp.git"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://sequenzy.com",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/Sequenzy/mcp/issues"
|
|
52
56
|
}
|
|
53
57
|
}
|
package/server.json
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
-
"name": "sequenzy",
|
|
4
|
-
"description": "Sequenzy MCP server for AI-powered email marketing automation.
|
|
3
|
+
"name": "io.github.sequenzy/mcp",
|
|
4
|
+
"description": "Sequenzy MCP server for AI-powered email marketing automation.",
|
|
5
5
|
"repository": {
|
|
6
|
-
"url": "https://github.com/
|
|
7
|
-
"source": "github"
|
|
8
|
-
"subfolder": "packages/mcp"
|
|
6
|
+
"url": "https://github.com/Sequenzy/mcp",
|
|
7
|
+
"source": "github"
|
|
9
8
|
},
|
|
10
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.37",
|
|
11
10
|
"packages": [
|
|
12
11
|
{
|
|
13
12
|
"registryType": "npm",
|
|
14
13
|
"identifier": "@sequenzy/mcp",
|
|
15
|
-
"version": "0.0.
|
|
14
|
+
"version": "0.0.37",
|
|
16
15
|
"runtime": "node",
|
|
17
16
|
"transport": {
|
|
18
17
|
"type": "stdio"
|