@sazabi/cli 1.2.0-dev.gc493428 → 1.2.0-dev.gd1995ac
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 +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -102,7 +102,7 @@ ${gn("OPTIONS")}`,c+=`
|
|
|
102
102
|
|
|
103
103
|
`)}m.write("payload.value = newResult;"),m.write("return payload;");let P=m.compile();return(O,K)=>P(g,O,K)},i,s=Ns,c=!Id.jitless,u=c&&VC.value,d=t.catchall,p;e._zod.parse=(g,m)=>{p??(p=r.value);let A=g.value;if(!s(A))return g.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),g;if(c&&u&&m?.async===!1&&m.jitless!==!0){if(!i)i=o(t.shape);if(g=i(g,m),!d)return g;return eU([],A,g,m,p,e)}return n(g,m)}});Ld=R("$ZodUnion",(e,t)=>{xe.init(e,t),Qe(e._zod,"optin",()=>t.options.some((o)=>o._zod.optin==="optional")?"optional":void 0),Qe(e._zod,"optout",()=>t.options.some((o)=>o._zod.optout==="optional")?"optional":void 0),Qe(e._zod,"values",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),Qe(e._zod,"pattern",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((i)=>i._zod.pattern);return new RegExp(`^(${o.map((i)=>wd(i.source)).join("|")})$`)}return});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1,c=[];for(let l of t.options){let u=l._zod.run({value:o.value,issues:[]},i);if(u instanceof Promise)c.push(u),s=!0;else{if(u.issues.length===0)return u;c.push(u)}}if(!s)return Uj(c,o,e,i);return Promise.all(c).then((l)=>Uj(l,o,e,i))}});Mw=R("$ZodXor",(e,t)=>{Ld.init(e,t),t.inclusive=!1;let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1,c=[];for(let l of t.options){let u=l._zod.run({value:o.value,issues:[]},i);if(u instanceof Promise)c.push(u),s=!0;else c.push(u)}if(!s)return Fj(c,o,e,i);return Promise.all(c).then((l)=>Fj(l,o,e,i))}}),zw=R("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Ld.init(e,t);let n=e._zod.parse;Qe(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[c,l]of Object.entries(s)){if(!o[c])o[c]=new Set;for(let u of l)o[c].add(u)}}return o});let r=cc(()=>{let o=t.options,i=new Map;for(let s of o){let c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let l of c){if(i.has(l))throw Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!Ns(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let c=r.value.get(s?.[t.discriminator]);if(c)return c._zod.run(o,i);if(t.unionFallback)return n(o,i);return o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o}}),jw=R("$ZodIntersection",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);if(i instanceof Promise||s instanceof Promise)return Promise.all([i,s]).then(([l,u])=>$j(n,l,u));return $j(n,i,s)}});zh=R("$ZodTuple",(e,t)=>{xe.init(e,t);let n=t.items;e._zod.parse=(r,o)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let s=[],c=[...n].reverse().findIndex((d)=>d._zod.optin!=="optional"),l=c===-1?0:n.length-c;if(!t.rest){let d=i.length>n.length,p=i.length<l-1;if(d||p)return r.issues.push({...d?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),r}let u=-1;for(let d of n){if(u++,u>=i.length){if(u>=l)continue}let p=d._zod.run({value:i[u],issues:[]},o);if(p instanceof Promise)s.push(p.then((g)=>Oh(g,r,u)));else Oh(p,r,u)}if(t.rest){let d=i.slice(n.length);for(let p of d){u++;let g=t.rest._zod.run({value:p,issues:[]},o);if(g instanceof Promise)s.push(g.then((m)=>Oh(m,r,u)));else Oh(g,r,u)}}if(s.length)return Promise.all(s).then(()=>r);return r}});Uw=R("$ZodRecord",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!Ri(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let c=new Set;for(let u of s)if(typeof u==="string"||typeof u==="number"||typeof u==="symbol"){c.add(typeof u==="number"?u.toString():u);let d=t.valueType._zod.run({value:o[u],issues:[]},r);if(d instanceof Promise)i.push(d.then((p)=>{if(p.issues.length)n.issues.push(...oo(u,p.issues));n.value[u]=p.value}));else{if(d.issues.length)n.issues.push(...oo(u,d.issues));n.value[u]=d.value}}let l;for(let u in o)if(!c.has(u))l=l??[],l.push(u);if(l&&l.length>0)n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l})}else{n.value={};for(let c of Reflect.ownKeys(o)){if(c==="__proto__")continue;let l=t.keyType._zod.run({value:c,issues:[]},r);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof c==="string"&&Bd.test(c)&&l.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},r);if(p instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(p.issues.length===0)l=p}if(l.issues.length){if(t.mode==="loose")n.value[c]=o[c];else n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map((p)=>Mn(p,r,Rt())),input:c,path:[c],inst:e});continue}let d=t.valueType._zod.run({value:o[c],issues:[]},r);if(d instanceof Promise)i.push(d.then((p)=>{if(p.issues.length)n.issues.push(...oo(c,p.issues));n.value[l.value]=p.value}));else{if(d.issues.length)n.issues.push(...oo(c,d.issues));n.value[l.value]=d.value}}}if(i.length)return Promise.all(i).then(()=>n);return n}}),Fw=R("$ZodMap",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!(o instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),n;let i=[];n.value=new Map;for(let[s,c]of o){let l=t.keyType._zod.run({value:s,issues:[]},r),u=t.valueType._zod.run({value:c,issues:[]},r);if(l instanceof Promise||u instanceof Promise)i.push(Promise.all([l,u]).then(([d,p])=>{Gj(d,p,n,s,o,e,r)}));else Gj(l,u,n,s,o,e,r)}if(i.length)return Promise.all(i).then(()=>n);return n}});$w=R("$ZodSet",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!(o instanceof Set))return n.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of o){let c=t.valueType._zod.run({value:s,issues:[]},r);if(c instanceof Promise)i.push(c.then((l)=>Hj(l,n)));else Hj(c,n)}if(i.length)return Promise.all(i).then(()=>n);return n}});Gw=R("$ZodEnum",(e,t)=>{xe.init(e,t);let n=vd(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter((o)=>Ed.has(typeof o)).map((o)=>typeof o==="string"?So(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{let s=o.value;if(r.has(s))return o;return o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),Hw=R("$ZodLiteral",(e,t)=>{if(xe.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map((r)=>typeof r==="string"?So(r):r?So(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let i=r.value;if(n.has(i))return r;return r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),qw=R("$ZodFile",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(o instanceof File)return n;return n.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),n}}),Vw=R("$ZodTransform",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Qs(e.constructor.name);let o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then((s)=>(n.value=s,n));if(o instanceof Promise)throw new dr;return n.value=o,n}});jh=R("$ZodOptional",(e,t)=>{xe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Qe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${wd(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(n,r);if(o instanceof Promise)return o.then((i)=>qj(i,n.value));return qj(o,n.value)}if(n.value===void 0)return n;return t.innerType._zod.run(n,r)}}),Kw=R("$ZodExactOptional",(e,t)=>{jh.init(e,t),Qe(e._zod,"values",()=>t.innerType._zod.values),Qe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Yw=R("$ZodNullable",(e,t)=>{xe.init(e,t),Qe(e._zod,"optin",()=>t.innerType._zod.optin),Qe(e._zod,"optout",()=>t.innerType._zod.optout),Qe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${wd(n.source)}|null)$`):void 0}),Qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>{if(n.value===null)return n;return t.innerType._zod.run(n,r)}}),Ww=R("$ZodDefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",Qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;let o=t.innerType._zod.run(n,r);if(o instanceof Promise)return o.then((i)=>Vj(i,t));return Vj(o,t)}});Jw=R("$ZodPrefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",Qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)n.value=t.defaultValue;return t.innerType._zod.run(n,r)}}),Zw=R("$ZodNonOptional",(e,t)=>{xe.init(e,t),Qe(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter((r)=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{let o=t.innerType._zod.run(n,r);if(o instanceof Promise)return o.then((i)=>Kj(i,e));return Kj(o,e)}});Xw=R("$ZodSuccess",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Qs("ZodSuccess");let o=t.innerType._zod.run(n,r);if(o instanceof Promise)return o.then((i)=>(n.value=i.issues.length===0,n));return n.value=o.issues.length===0,n}}),eE=R("$ZodCatch",(e,t)=>{xe.init(e,t),Qe(e._zod,"optin",()=>t.innerType._zod.optin),Qe(e._zod,"optout",()=>t.innerType._zod.optout),Qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let o=t.innerType._zod.run(n,r);if(o instanceof Promise)return o.then((i)=>{if(n.value=i.value,i.issues.length)n.value=t.catchValue({...n,error:{issues:i.issues.map((s)=>Mn(s,r,Rt()))},input:n.value}),n.issues=[];return n});if(n.value=o.value,o.issues.length)n.value=t.catchValue({...n,error:{issues:o.issues.map((i)=>Mn(i,r,Rt()))},input:n.value}),n.issues=[];return n}}),tE=R("$ZodNaN",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{if(typeof n.value!=="number"||!Number.isNaN(n.value))return n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n;return n}}),nE=R("$ZodPipe",(e,t)=>{xe.init(e,t),Qe(e._zod,"values",()=>t.in._zod.values),Qe(e._zod,"optin",()=>t.in._zod.optin),Qe(e._zod,"optout",()=>t.out._zod.optout),Qe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){let i=t.out._zod.run(n,r);if(i instanceof Promise)return i.then((s)=>_h(s,t.in,r));return _h(i,t.in,r)}let o=t.in._zod.run(n,r);if(o instanceof Promise)return o.then((i)=>_h(i,t.out,r));return _h(o,t.out,r)}});Qd=R("$ZodCodec",(e,t)=>{xe.init(e,t),Qe(e._zod,"values",()=>t.in._zod.values),Qe(e._zod,"optin",()=>t.in._zod.optin),Qe(e._zod,"optout",()=>t.out._zod.optout),Qe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){let i=t.in._zod.run(n,r);if(i instanceof Promise)return i.then((s)=>Dh(s,t,r));return Dh(i,t,r)}else{let i=t.out._zod.run(n,r);if(i instanceof Promise)return i.then((s)=>Dh(s,t,r));return Dh(i,t,r)}}});oE=R("$ZodReadonly",(e,t)=>{xe.init(e,t),Qe(e._zod,"propValues",()=>t.innerType._zod.propValues),Qe(e._zod,"values",()=>t.innerType._zod.values),Qe(e._zod,"optin",()=>t.innerType?._zod?.optin),Qe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let o=t.innerType._zod.run(n,r);if(o instanceof Promise)return o.then(Yj);return Yj(o)}});rE=R("$ZodTemplateLiteral",(e,t)=>{xe.init(e,t);let n=[];for(let r of t.parts)if(typeof r==="object"&&r!==null){if(!r._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);let o=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!o)throw Error(`Invalid template literal part: ${r._zod.traits}`);let i=o.startsWith("^")?1:0,s=o.endsWith("$")?o.length-1:o.length;n.push(o.slice(i,s))}else if(r===null||YC.has(typeof r))n.push(So(`${r}`));else throw Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,o)=>{if(typeof r.value!=="string")return r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}),r;if(e._zod.pattern.lastIndex=0,!e._zod.pattern.test(r.value))return r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),r;return r}}),iE=R("$ZodFunction",(e,t)=>(xe.init(e,t),e._def=t,e._zod.def=t,e.implement=(n)=>{if(typeof n!=="function")throw Error("implement() must be called with a function");return function(...r){let o=e._def.input?Ah(e._def.input,r):r,i=Reflect.apply(n,this,o);if(e._def.output)return Ah(e._def.output,i);return i}},e.implementAsync=(n)=>{if(typeof n!=="function")throw Error("implementAsync() must be called with a function");return async function(...r){let o=e._def.input?await fh(e._def.input,r):r,i=await Reflect.apply(n,this,o);if(e._def.output)return await fh(e._def.output,i);return i}},e._zod.parse=(n,r)=>{if(typeof n.value!=="function")return n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n;if(e._def.output&&e._def.output._zod.def.type==="promise")n.value=e.implementAsync(n.value);else n.value=e.implement(n.value);return n},e.input=(...n)=>{let r=e.constructor;if(Array.isArray(n[0]))return new r({type:"function",input:new zh({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output});return new r({type:"function",input:n[0],output:e._def.output})},e.output=(n)=>new e.constructor({type:"function",input:e._def.input,output:n}),e)),sE=R("$ZodPromise",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then((o)=>t.innerType._zod.run({value:o,issues:[]},r))}),aE=R("$ZodLazy",(e,t)=>{xe.init(e,t),Qe(e._zod,"innerType",()=>t.getter()),Qe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Qe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Qe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Qe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),cE=R("$ZodCustom",(e,t)=>{dt.init(e,t),xe.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=(n)=>{let r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then((i)=>Wj(i,n,r,e));Wj(o,n,r,e);return}})});function uE(){return{localeError:$Se()}}var $Se=()=>{let e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(o){return e[o]??null}let n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${o.expected}، ولكن تم إدخال ${c}`;return`مدخلات غير مقبولة: يفترض إدخال ${i}، ولكن تم إدخال ${c}`}case"invalid_value":if(o.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${Y(o.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return` أكبر من اللازم: يفترض أن تكون ${o.origin??"القيمة"} ${i} ${o.maximum.toString()} ${s.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${o.origin??"القيمة"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`أصغر من اللازم: يفترض لـ ${o.origin} أن يكون ${i} ${o.minimum.toString()} ${s.unit}`;return`أصغر من اللازم: يفترض لـ ${o.origin} أن يكون ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${o.prefix}"`;if(i.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${i.suffix}"`;if(i.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${i.includes}"`;if(i.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${i.pattern}`;return`${n[i.format]??o.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${o.divisor}`;case"unrecognized_keys":return`معرف${o.keys.length>1?"ات":""} غريب${o.keys.length>1?"ة":""}: ${_(o.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${o.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${o.origin}`;default:return"مدخل غير مقبول"}}};var nU=h(()=>{ge()});function dE(){return{localeError:GSe()}}var GSe=()=>{let e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(o){return e[o]??null}let n={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"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Yanlış dəyər: gözlənilən instanceof ${o.expected}, daxil olan ${c}`;return`Yanlış dəyər: gözlənilən ${i}, daxil olan ${c}`}case"invalid_value":if(o.values.length===1)return`Yanlış dəyər: gözlənilən ${Y(o.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Çox böyük: gözlənilən ${o.origin??"dəyər"} ${i}${o.maximum.toString()} ${s.unit??"element"}`;return`Çox böyük: gözlənilən ${o.origin??"dəyər"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Çox kiçik: gözlənilən ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`;return`Çox kiçik: gözlənilən ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Yanlış mətn: "${i.prefix}" ilə başlamalıdır`;if(i.format==="ends_with")return`Yanlış mətn: "${i.suffix}" ilə bitməlidir`;if(i.format==="includes")return`Yanlış mətn: "${i.includes}" daxil olmalıdır`;if(i.format==="regex")return`Yanlış mətn: ${i.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${n[i.format]??o.format}`}case"not_multiple_of":return`Yanlış ədəd: ${o.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${o.keys.length>1?"lar":""}: ${_(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${o.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};var oU=h(()=>{ge()});function rU(e,t,n,r){let o=Math.abs(e),i=o%10,s=o%100;if(s>=11&&s<=19)return r;if(i===1)return t;if(i>=2&&i<=4)return n;return r}function pE(){return{localeError:HSe()}}var HSe=()=>{let e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(o){return e[o]??null}let n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},r={nan:"NaN",number:"лік",array:"масіў"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Няправільны ўвод: чакаўся instanceof ${o.expected}, атрымана ${c}`;return`Няправільны ўвод: чакаўся ${i}, атрымана ${c}`}case"invalid_value":if(o.values.length===1)return`Няправільны ўвод: чакалася ${Y(o.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let c=Number(o.maximum),l=rU(c,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${o.origin??"значэнне"} павінна ${s.verb} ${i}${o.maximum.toString()} ${l}`}return`Занадта вялікі: чакалася, што ${o.origin??"значэнне"} павінна быць ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let c=Number(o.minimum),l=rU(c,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${o.origin} павінна ${s.verb} ${i}${o.minimum.toString()} ${l}`}return`Занадта малы: чакалася, што ${o.origin} павінна быць ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${i.prefix}"`;if(i.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${i.suffix}"`;if(i.format==="includes")return`Няправільны радок: павінен змяшчаць "${i.includes}"`;if(i.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${i.pattern}`;return`Няправільны ${n[i.format]??o.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${o.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${o.keys.length>1?"ключы":"ключ"}: ${_(o.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${o.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${o.origin}`;default:return"Няправільны ўвод"}}};var iU=h(()=>{ge()});function gE(){return{localeError:qSe()}}var qSe=()=>{let e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(o){return e[o]??null}let n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},r={nan:"NaN",number:"число",array:"масив"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Невалиден вход: очакван instanceof ${o.expected}, получен ${c}`;return`Невалиден вход: очакван ${i}, получен ${c}`}case"invalid_value":if(o.values.length===1)return`Невалиден вход: очакван ${Y(o.values[0])}`;return`Невалидна опция: очаквано едно от ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Твърде голямо: очаква се ${o.origin??"стойност"} да съдържа ${i}${o.maximum.toString()} ${s.unit??"елемента"}`;return`Твърде голямо: очаква се ${o.origin??"стойност"} да бъде ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Твърде малко: очаква се ${o.origin} да съдържа ${i}${o.minimum.toString()} ${s.unit}`;return`Твърде малко: очаква се ${o.origin} да бъде ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Невалиден низ: трябва да започва с "${i.prefix}"`;if(i.format==="ends_with")return`Невалиден низ: трябва да завършва с "${i.suffix}"`;if(i.format==="includes")return`Невалиден низ: трябва да включва "${i.includes}"`;if(i.format==="regex")return`Невалиден низ: трябва да съвпада с ${i.pattern}`;let s="Невалиден";if(i.format==="emoji")s="Невалидно";if(i.format==="datetime")s="Невалидно";if(i.format==="date")s="Невалидна";if(i.format==="time")s="Невалидно";if(i.format==="duration")s="Невалидна";return`${s} ${n[i.format]??o.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${o.divisor}`;case"unrecognized_keys":return`Неразпознат${o.keys.length>1?"и":""} ключ${o.keys.length>1?"ове":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${o.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${o.origin}`;default:return"Невалиден вход"}}};var sU=h(()=>{ge()});function mE(){return{localeError:VSe()}}var VSe=()=>{let e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let n={regex:"entrada",email:"adreça electrònica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Tipus invàlid: s'esperava instanceof ${o.expected}, s'ha rebut ${c}`;return`Tipus invàlid: s'esperava ${i}, s'ha rebut ${c}`}case"invalid_value":if(o.values.length===1)return`Valor invàlid: s'esperava ${Y(o.values[0])}`;return`Opció invàlida: s'esperava una de ${_(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a màxim":"menys de",s=t(o.origin);if(s)return`Massa gran: s'esperava que ${o.origin??"el valor"} contingués ${i} ${o.maximum.toString()} ${s.unit??"elements"}`;return`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a mínim":"més de",s=t(o.origin);if(s)return`Massa petit: s'esperava que ${o.origin} contingués ${i} ${o.minimum.toString()} ${s.unit}`;return`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Format invàlid: ha de començar amb "${i.prefix}"`;if(i.format==="ends_with")return`Format invàlid: ha d'acabar amb "${i.suffix}"`;if(i.format==="includes")return`Format invàlid: ha d'incloure "${i.includes}"`;if(i.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${i.pattern}`;return`Format invàlid per a ${n[i.format]??o.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${o.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${o.origin}`;default:return"Entrada invàlida"}}};var aU=h(()=>{ge()});function hE(){return{localeError:KSe()}}var KSe=()=>{let e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(o){return e[o]??null}let n={regex:"regulární výraz",email:"e-mailová adresa",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:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Neplatný vstup: očekáváno instanceof ${o.expected}, obdrženo ${c}`;return`Neplatný vstup: očekáváno ${i}, obdrženo ${c}`}case"invalid_value":if(o.values.length===1)return`Neplatný vstup: očekáváno ${Y(o.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Hodnota je příliš velká: ${o.origin??"hodnota"} musí mít ${i}${o.maximum.toString()} ${s.unit??"prvků"}`;return`Hodnota je příliš velká: ${o.origin??"hodnota"} musí být ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Hodnota je příliš malá: ${o.origin??"hodnota"} musí mít ${i}${o.minimum.toString()} ${s.unit??"prvků"}`;return`Hodnota je příliš malá: ${o.origin??"hodnota"} musí být ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Neplatný řetězec: musí začínat na "${i.prefix}"`;if(i.format==="ends_with")return`Neplatný řetězec: musí končit na "${i.suffix}"`;if(i.format==="includes")return`Neplatný řetězec: musí obsahovat "${i.includes}"`;if(i.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${i.pattern}`;return`Neplatný formát ${n[i.format]??o.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${o.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${_(o.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${o.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${o.origin}`;default:return"Neplatný vstup"}}};var cU=h(()=>{ge()});function AE(){return{localeError:YSe()}}var YSe=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let n={regex:"input",email:"e-mailadresse",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 dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Ugyldigt input: forventede instanceof ${o.expected}, fik ${c}`;return`Ugyldigt input: forventede ${i}, fik ${c}`}case"invalid_value":if(o.values.length===1)return`Ugyldig værdi: forventede ${Y(o.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),c=r[o.origin]??o.origin;if(s)return`For stor: forventede ${c??"value"} ${s.verb} ${i} ${o.maximum.toString()} ${s.unit??"elementer"}`;return`For stor: forventede ${c??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),c=r[o.origin]??o.origin;if(s)return`For lille: forventede ${c} ${s.verb} ${i} ${o.minimum.toString()} ${s.unit}`;return`For lille: forventede ${c} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Ugyldig streng: skal starte med "${i.prefix}"`;if(i.format==="ends_with")return`Ugyldig streng: skal ende med "${i.suffix}"`;if(i.format==="includes")return`Ugyldig streng: skal indeholde "${i.includes}"`;if(i.format==="regex")return`Ugyldig streng: skal matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${_(o.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${o.origin}`;default:return"Ugyldigt input"}}};var lU=h(()=>{ge()});function fE(){return{localeError:WSe()}}var WSe=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(o){return e[o]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Ungültige Eingabe: erwartet instanceof ${o.expected}, erhalten ${c}`;return`Ungültige Eingabe: erwartet ${i}, erhalten ${c}`}case"invalid_value":if(o.values.length===1)return`Ungültige Eingabe: erwartet ${Y(o.values[0])}`;return`Ungültige Option: erwartet eine von ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Zu groß: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${s.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${s.unit} hat`;return`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Ungültiger String: muss mit "${i.prefix}" beginnen`;if(i.format==="ends_with")return`Ungültiger String: muss mit "${i.suffix}" enden`;if(i.format==="includes")return`Ungültiger String: muss "${i.includes}" enthalten`;if(i.format==="regex")return`Ungültiger String: muss dem Muster ${i.pattern} entsprechen`;return`Ungültig: ${n[i.format]??o.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${_(o.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${o.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${o.origin}`;default:return"Ungültige Eingabe"}}};var uU=h(()=>{ge()});function Nd(){return{localeError:JSe()}}var JSe=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(o){return e[o]??null}let n={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",mac:"MAC 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"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":if(o.values.length===1)return`Invalid input: expected ${Y(o.values[0])}`;return`Invalid option: expected one of ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Too big: expected ${o.origin??"value"} to have ${i}${o.maximum.toString()} ${s.unit??"elements"}`;return`Too big: expected ${o.origin??"value"} to be ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Too small: expected ${o.origin} to have ${i}${o.minimum.toString()} ${s.unit}`;return`Too small: expected ${o.origin} to be ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Invalid string: must start with "${i.prefix}"`;if(i.format==="ends_with")return`Invalid string: must end with "${i.suffix}"`;if(i.format==="includes")return`Invalid string: must include "${i.includes}"`;if(i.format==="regex")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${n[i.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};var yE=h(()=>{ge()});function bE(){return{localeError:ZSe()}}var ZSe=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Nevalida enigo: atendiĝis instanceof ${o.expected}, riceviĝis ${c}`;return`Nevalida enigo: atendiĝis ${i}, riceviĝis ${c}`}case"invalid_value":if(o.values.length===1)return`Nevalida enigo: atendiĝis ${Y(o.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Tro granda: atendiĝis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${s.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Tro malgranda: atendiĝis ke ${o.origin} havu ${i}${o.minimum.toString()} ${s.unit}`;return`Tro malgranda: atendiĝis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${i.prefix}"`;if(i.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${i.suffix}"`;if(i.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${i.includes}"`;if(i.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`;return`Nevalida ${n[i.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} ŝlosilo${o.keys.length>1?"j":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};var dU=h(()=>{ge()});function IE(){return{localeError:XSe()}}var XSe=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let n={regex:"entrada",email:"dirección de correo electrónico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Entrada inválida: se esperaba instanceof ${o.expected}, recibido ${c}`;return`Entrada inválida: se esperaba ${i}, recibido ${c}`}case"invalid_value":if(o.values.length===1)return`Entrada inválida: se esperaba ${Y(o.values[0])}`;return`Opción inválida: se esperaba una de ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),c=r[o.origin]??o.origin;if(s)return`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${i}${o.maximum.toString()} ${s.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${c??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),c=r[o.origin]??o.origin;if(s)return`Demasiado pequeño: se esperaba que ${c} tuviera ${i}${o.minimum.toString()} ${s.unit}`;return`Demasiado pequeño: se esperaba que ${c} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Cadena inválida: debe comenzar con "${i.prefix}"`;if(i.format==="ends_with")return`Cadena inválida: debe terminar en "${i.suffix}"`;if(i.format==="includes")return`Cadena inválida: debe incluir "${i.includes}"`;if(i.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${i.pattern}`;return`Inválido ${n[i.format]??o.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Llave inválida en ${r[o.origin]??o.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${r[o.origin]??o.origin}`;default:return"Entrada inválida"}}};var pU=h(()=>{ge()});function SE(){return{localeError:eCe()}}var eCe=()=>{let e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(o){return e[o]??null}let n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},r={nan:"NaN",number:"عدد",array:"آرایه"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`ورودی نامعتبر: میبایست instanceof ${o.expected} میبود، ${c} دریافت شد`;return`ورودی نامعتبر: میبایست ${i} میبود، ${c} دریافت شد`}case"invalid_value":if(o.values.length===1)return`ورودی نامعتبر: میبایست ${Y(o.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${_(o.values,"|")} میبود`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`خیلی بزرگ: ${o.origin??"مقدار"} باید ${i}${o.maximum.toString()} ${s.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${o.origin??"مقدار"} باید ${i}${o.maximum.toString()} باشد`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`خیلی کوچک: ${o.origin} باید ${i}${o.minimum.toString()} ${s.unit} باشد`;return`خیلی کوچک: ${o.origin} باید ${i}${o.minimum.toString()} باشد`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`رشته نامعتبر: باید با "${i.prefix}" شروع شود`;if(i.format==="ends_with")return`رشته نامعتبر: باید با "${i.suffix}" تمام شود`;if(i.format==="includes")return`رشته نامعتبر: باید شامل "${i.includes}" باشد`;if(i.format==="regex")return`رشته نامعتبر: باید با الگوی ${i.pattern} مطابقت داشته باشد`;return`${n[i.format]??o.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${o.divisor} باشد`;case"unrecognized_keys":return`کلید${o.keys.length>1?"های":""} ناشناس: ${_(o.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${o.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${o.origin}`;default:return"ورودی نامعتبر"}}};var gU=h(()=>{ge()});function CE(){return{localeError:tCe()}}var tCe=()=>{let e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(o){return e[o]??null}let n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${c}`;return`Virheellinen tyyppi: odotettiin ${i}, oli ${c}`}case"invalid_value":if(o.values.length===1)return`Virheellinen syöte: täytyy olla ${Y(o.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Liian suuri: ${s.subject} täytyy olla ${i}${o.maximum.toString()} ${s.unit}`.trim();return`Liian suuri: arvon täytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Liian pieni: ${s.subject} täytyy olla ${i}${o.minimum.toString()} ${s.unit}`.trim();return`Liian pieni: arvon täytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${i.prefix}"`;if(i.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${i.suffix}"`;if(i.format==="includes")return`Virheellinen syöte: täytyy sisältää "${i.includes}"`;if(i.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${i.pattern}`;return`Virheellinen ${n[i.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${_(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};var mU=h(()=>{ge()});function vE(){return{localeError:nCe()}}var nCe=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(o){return e[o]??null}let n={regex:"entrée",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r={nan:"NaN",number:"nombre",array:"tableau"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Entrée invalide : instanceof ${o.expected} attendu, ${c} reçu`;return`Entrée invalide : ${i} attendu, ${c} reçu`}case"invalid_value":if(o.values.length===1)return`Entrée invalide : ${Y(o.values[0])} attendu`;return`Option invalide : une valeur parmi ${_(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Trop grand : ${o.origin??"valeur"} doit ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"élément(s)"}`;return`Trop grand : ${o.origin??"valeur"} doit être ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Trop petit : ${o.origin} doit ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`;return`Trop petit : ${o.origin} doit être ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Chaîne invalide : doit commencer par "${i.prefix}"`;if(i.format==="ends_with")return`Chaîne invalide : doit se terminer par "${i.suffix}"`;if(i.format==="includes")return`Chaîne invalide : doit inclure "${i.includes}"`;if(i.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${i.pattern}`;return`${n[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${o.divisor}`;case"unrecognized_keys":return`Clé${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${_(o.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${o.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entrée invalide"}}};var hU=h(()=>{ge()});function wE(){return{localeError:oCe()}}var oCe=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(o){return e[o]??null}let n={regex:"entrée",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Entrée invalide : attendu instanceof ${o.expected}, reçu ${c}`;return`Entrée invalide : attendu ${i}, reçu ${c}`}case"invalid_value":if(o.values.length===1)return`Entrée invalide : attendu ${Y(o.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"≤":"<",s=t(o.origin);if(s)return`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${s.unit}`;return`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"≥":">",s=t(o.origin);if(s)return`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${s.unit}`;return`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Chaîne invalide : doit commencer par "${i.prefix}"`;if(i.format==="ends_with")return`Chaîne invalide : doit se terminer par "${i.suffix}"`;if(i.format==="includes")return`Chaîne invalide : doit inclure "${i.includes}"`;if(i.format==="regex")return`Chaîne invalide : doit correspondre au motif ${i.pattern}`;return`${n[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${o.divisor}`;case"unrecognized_keys":return`Clé${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${_(o.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${o.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entrée invalide"}}};var AU=h(()=>{ge()});function EE(){return{localeError:rCe()}}var rCe=()=>{let e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=(u)=>u?e[u]:void 0,r=(u)=>{let d=n(u);if(d)return d.label;return u??e.unknown.label},o=(u)=>`ה${r(u)}`,i=(u)=>(n(u)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",s=(u)=>{if(!u)return null;return t[u]??null},c={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},l={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let d=u.expected,p=l[d??""]??r(d),g=W(u.input),m=l[g]??e[g]?.label??g;if(/^[A-Z]/.test(u.expected))return`קלט לא תקין: צריך להיות instanceof ${u.expected}, התקבל ${m}`;return`קלט לא תקין: צריך להיות ${p}, התקבל ${m}`}case"invalid_value":{if(u.values.length===1)return`ערך לא תקין: הערך חייב להיות ${Y(u.values[0])}`;let d=u.values.map((m)=>Y(m));if(u.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;let p=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${p}`}case"too_big":{let d=s(u.origin),p=o(u.origin??"value");if(u.origin==="string")return`${d?.longLabel??"ארוך"} מדי: ${p} צריכה להכיל ${u.maximum.toString()} ${d?.unit??""} ${u.inclusive?"או פחות":"לכל היותר"}`.trim();if(u.origin==="number"){let A=u.inclusive?`קטן או שווה ל-${u.maximum}`:`קטן מ-${u.maximum}`;return`גדול מדי: ${p} צריך להיות ${A}`}if(u.origin==="array"||u.origin==="set"){let A=u.origin==="set"?"צריכה":"צריך",f=u.inclusive?`${u.maximum} ${d?.unit??""} או פחות`:`פחות מ-${u.maximum} ${d?.unit??""}`;return`גדול מדי: ${p} ${A} להכיל ${f}`.trim()}let g=u.inclusive?"<=":"<",m=i(u.origin??"value");if(d?.unit)return`${d.longLabel} מדי: ${p} ${m} ${g}${u.maximum.toString()} ${d.unit}`;return`${d?.longLabel??"גדול"} מדי: ${p} ${m} ${g}${u.maximum.toString()}`}case"too_small":{let d=s(u.origin),p=o(u.origin??"value");if(u.origin==="string")return`${d?.shortLabel??"קצר"} מדי: ${p} צריכה להכיל ${u.minimum.toString()} ${d?.unit??""} ${u.inclusive?"או יותר":"לפחות"}`.trim();if(u.origin==="number"){let A=u.inclusive?`גדול או שווה ל-${u.minimum}`:`גדול מ-${u.minimum}`;return`קטן מדי: ${p} צריך להיות ${A}`}if(u.origin==="array"||u.origin==="set"){let A=u.origin==="set"?"צריכה":"צריך";if(u.minimum===1&&u.inclusive){let S=u.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${p} ${A} להכיל ${S}`}let f=u.inclusive?`${u.minimum} ${d?.unit??""} או יותר`:`יותר מ-${u.minimum} ${d?.unit??""}`;return`קטן מדי: ${p} ${A} להכיל ${f}`.trim()}let g=u.inclusive?">=":">",m=i(u.origin??"value");if(d?.unit)return`${d.shortLabel} מדי: ${p} ${m} ${g}${u.minimum.toString()} ${d.unit}`;return`${d?.shortLabel??"קטן"} מדי: ${p} ${m} ${g}${u.minimum.toString()}`}case"invalid_format":{let d=u;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;let p=c[d.format],g=p?.label??d.format,A=(p?.gender??"m")==="f"?"תקינה":"תקין";return`${g} לא ${A}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${u.divisor}`;case"unrecognized_keys":return`מפתח${u.keys.length>1?"ות":""} לא מזוה${u.keys.length>1?"ים":"ה"}: ${_(u.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${o(u.origin??"array")}`;default:return"קלט לא תקין"}}};var fU=h(()=>{ge()});function kE(){return{localeError:iCe()}}var iCe=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let n={regex:"bemenet",email:"email cím",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 időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"szám",array:"tömb"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Érvénytelen bemenet: a várt érték instanceof ${o.expected}, a kapott érték ${c}`;return`Érvénytelen bemenet: a várt érték ${i}, a kapott érték ${c}`}case"invalid_value":if(o.values.length===1)return`Érvénytelen bemenet: a várt érték ${Y(o.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Túl nagy: ${o.origin??"érték"} mérete túl nagy ${i}${o.maximum.toString()} ${s.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${o.origin??"érték"} túl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Túl kicsi: a bemeneti érték ${o.origin} mérete túl kicsi ${i}${o.minimum.toString()} ${s.unit}`;return`Túl kicsi: a bemeneti érték ${o.origin} túl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Érvénytelen string: "${i.prefix}" értékkel kell kezdődnie`;if(i.format==="ends_with")return`Érvénytelen string: "${i.suffix}" értékkel kell végződnie`;if(i.format==="includes")return`Érvénytelen string: "${i.includes}" értéket kell tartalmaznia`;if(i.format==="regex")return`Érvénytelen string: ${i.pattern} mintának kell megfelelnie`;return`Érvénytelen ${n[i.format]??o.format}`}case"not_multiple_of":return`Érvénytelen szám: ${o.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${o.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${o.origin}`;default:return"Érvénytelen bemenet"}}};var yU=h(()=>{ge()});function bU(e,t,n){return Math.abs(e)===1?t:n}function hc(e){if(!e)return"";let t=["ա","ե","ը","ի","ո","ու","օ"],n=e[e.length-1];return e+(t.includes(n)?"ն":"ը")}function xE(){return{localeError:sCe()}}var sCe=()=>{let e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(o){return e[o]??null}let n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},r={nan:"NaN",number:"թիվ",array:"զանգված"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${o.expected}, ստացվել է ${c}`;return`Սխալ մուտքագրում․ սպասվում էր ${i}, ստացվել է ${c}`}case"invalid_value":if(o.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${Y(o.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let c=Number(o.maximum),l=bU(c,s.unit.one,s.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${hc(o.origin??"արժեք")} կունենա ${i}${o.maximum.toString()} ${l}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${hc(o.origin??"արժեք")} լինի ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let c=Number(o.minimum),l=bU(c,s.unit.one,s.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${hc(o.origin)} կունենա ${i}${o.minimum.toString()} ${l}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${hc(o.origin)} լինի ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${i.prefix}"-ով`;if(i.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${i.suffix}"-ով`;if(i.format==="includes")return`Սխալ տող․ պետք է պարունակի "${i.includes}"`;if(i.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${i.pattern} ձևաչափին`;return`Սխալ ${n[i.format]??o.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${o.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${o.keys.length>1?"ներ":""}. ${_(o.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${hc(o.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${hc(o.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};var IU=h(()=>{ge()});function PE(){return{localeError:aCe()}}var aCe=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let n={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${c}`;return`Input tidak valid: diharapkan ${i}, diterima ${c}`}case"invalid_value":if(o.values.length===1)return`Input tidak valid: diharapkan ${Y(o.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${s.unit??"elemen"}`;return`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${s.unit}`;return`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`String tidak valid: harus dimulai dengan "${i.prefix}"`;if(i.format==="ends_with")return`String tidak valid: harus berakhir dengan "${i.suffix}"`;if(i.format==="includes")return`String tidak valid: harus menyertakan "${i.includes}"`;if(i.format==="regex")return`String tidak valid: harus sesuai pola ${i.pattern}`;return`${n[i.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}};var SU=h(()=>{ge()});function RE(){return{localeError:cCe()}}var cCe=()=>{let e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(o){return e[o]??null}let n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"númer",array:"fylki"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Rangt gildi: Þú slóst inn ${c} þar sem á að vera instanceof ${o.expected}`;return`Rangt gildi: Þú slóst inn ${c} þar sem á að vera ${i}`}case"invalid_value":if(o.values.length===1)return`Rangt gildi: gert ráð fyrir ${Y(o.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Of stórt: gert er ráð fyrir að ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${s.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${o.origin??"gildi"} sé ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Of lítið: gert er ráð fyrir að ${o.origin} hafi ${i}${o.minimum.toString()} ${s.unit}`;return`Of lítið: gert er ráð fyrir að ${o.origin} sé ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Ógildur strengur: verður að byrja á "${i.prefix}"`;if(i.format==="ends_with")return`Ógildur strengur: verður að enda á "${i.suffix}"`;if(i.format==="includes")return`Ógildur strengur: verður að innihalda "${i.includes}"`;if(i.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${i.pattern}`;return`Rangt ${n[i.format]??o.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`Óþekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${_(o.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${o.origin}`;default:return"Rangt gildi"}}};var CU=h(()=>{ge()});function TE(){return{localeError:lCe()}}var lCe=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let n={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Input non valido: atteso instanceof ${o.expected}, ricevuto ${c}`;return`Input non valido: atteso ${i}, ricevuto ${c}`}case"invalid_value":if(o.values.length===1)return`Input non valido: atteso ${Y(o.values[0])}`;return`Opzione non valida: atteso uno tra ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${s.unit??"elementi"}`;return`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${s.unit}`;return`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Stringa non valida: deve iniziare con "${i.prefix}"`;if(i.format==="ends_with")return`Stringa non valida: deve terminare con "${i.suffix}"`;if(i.format==="includes")return`Stringa non valida: deve includere "${i.includes}"`;if(i.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${i.pattern}`;return`Invalid ${n[i.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${_(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}};var vU=h(()=>{ge()});function BE(){return{localeError:uCe()}}var uCe=()=>{let e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(o){return e[o]??null}let n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},r={nan:"NaN",number:"数値",array:"配列"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`無効な入力: instanceof ${o.expected}が期待されましたが、${c}が入力されました`;return`無効な入力: ${i}が期待されましたが、${c}が入力されました`}case"invalid_value":if(o.values.length===1)return`無効な入力: ${Y(o.values[0])}が期待されました`;return`無効な選択: ${_(o.values,"、")}のいずれかである必要があります`;case"too_big":{let i=o.inclusive?"以下である":"より小さい",s=t(o.origin);if(s)return`大きすぎる値: ${o.origin??"値"}は${o.maximum.toString()}${s.unit??"要素"}${i}必要があります`;return`大きすぎる値: ${o.origin??"値"}は${o.maximum.toString()}${i}必要があります`}case"too_small":{let i=o.inclusive?"以上である":"より大きい",s=t(o.origin);if(s)return`小さすぎる値: ${o.origin}は${o.minimum.toString()}${s.unit}${i}必要があります`;return`小さすぎる値: ${o.origin}は${o.minimum.toString()}${i}必要があります`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`無効な文字列: "${i.prefix}"で始まる必要があります`;if(i.format==="ends_with")return`無効な文字列: "${i.suffix}"で終わる必要があります`;if(i.format==="includes")return`無効な文字列: "${i.includes}"を含む必要があります`;if(i.format==="regex")return`無効な文字列: パターン${i.pattern}に一致する必要があります`;return`無効な${n[i.format]??o.format}`}case"not_multiple_of":return`無効な数値: ${o.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${o.keys.length>1?"群":""}: ${_(o.keys,"、")}`;case"invalid_key":return`${o.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${o.origin}内の無効な値`;default:return"無効な入力"}}};var wU=h(()=>{ge()});function OE(){return{localeError:dCe()}}var dCe=()=>{let e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(o){return e[o]??null}let n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},r={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${o.expected}, მიღებული ${c}`;return`არასწორი შეყვანა: მოსალოდნელი ${i}, მიღებული ${c}`}case"invalid_value":if(o.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${Y(o.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${_(o.values,"|")}-დან`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`ზედმეტად დიდი: მოსალოდნელი ${o.origin??"მნიშვნელობა"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${o.origin??"მნიშვნელობა"} იყოს ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`ზედმეტად პატარა: მოსალოდნელი ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${o.origin} იყოს ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${i.prefix}"-ით`;if(i.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${i.suffix}"-ით`;if(i.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${i.includes}"-ს`;if(i.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${i.pattern}`;return`არასწორი ${n[i.format]??o.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${o.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${o.keys.length>1?"ები":"ი"}: ${_(o.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${o.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${o.origin}-ში`;default:return"არასწორი შეყვანა"}}};var EU=h(()=>{ge()});function Md(){return{localeError:pCe()}}var pCe=()=>{let e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(o){return e[o]??null}let n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},r={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${o.expected} ប៉ុន្តែទទួលបាន ${c}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${i} ប៉ុន្តែទទួលបាន ${c}`}case"invalid_value":if(o.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${Y(o.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`ធំពេក៖ ត្រូវការ ${o.origin??"តម្លៃ"} ${i} ${o.maximum.toString()} ${s.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${o.origin??"តម្លៃ"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`តូចពេក៖ ត្រូវការ ${o.origin} ${i} ${o.minimum.toString()} ${s.unit}`;return`តូចពេក៖ ត្រូវការ ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${i.prefix}"`;if(i.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${i.suffix}"`;if(i.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${i.includes}"`;if(i.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${i.pattern}`;return`មិនត្រឹមត្រូវ៖ ${n[i.format]??o.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${o.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${_(o.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${o.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${o.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};var _E=h(()=>{ge()});function DE(){return Md()}var kU=h(()=>{_E()});function LE(){return{localeError:gCe()}}var gCe=()=>{let e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(o){return e[o]??null}let n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`잘못된 입력: 예상 타입은 instanceof ${o.expected}, 받은 타입은 ${c}입니다`;return`잘못된 입력: 예상 타입은 ${i}, 받은 타입은 ${c}입니다`}case"invalid_value":if(o.values.length===1)return`잘못된 입력: 값은 ${Y(o.values[0])} 이어야 합니다`;return`잘못된 옵션: ${_(o.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let i=o.inclusive?"이하":"미만",s=i==="미만"?"이어야 합니다":"여야 합니다",c=t(o.origin),l=c?.unit??"요소";if(c)return`${o.origin??"값"}이 너무 큽니다: ${o.maximum.toString()}${l} ${i}${s}`;return`${o.origin??"값"}이 너무 큽니다: ${o.maximum.toString()} ${i}${s}`}case"too_small":{let i=o.inclusive?"이상":"초과",s=i==="이상"?"이어야 합니다":"여야 합니다",c=t(o.origin),l=c?.unit??"요소";if(c)return`${o.origin??"값"}이 너무 작습니다: ${o.minimum.toString()}${l} ${i}${s}`;return`${o.origin??"값"}이 너무 작습니다: ${o.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`잘못된 문자열: "${i.prefix}"(으)로 시작해야 합니다`;if(i.format==="ends_with")return`잘못된 문자열: "${i.suffix}"(으)로 끝나야 합니다`;if(i.format==="includes")return`잘못된 문자열: "${i.includes}"을(를) 포함해야 합니다`;if(i.format==="regex")return`잘못된 문자열: 정규식 ${i.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${n[i.format]??o.format}`}case"not_multiple_of":return`잘못된 숫자: ${o.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${_(o.keys,", ")}`;case"invalid_key":return`잘못된 키: ${o.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${o.origin}`;default:return"잘못된 입력"}}};var xU=h(()=>{ge()});function PU(e){let t=Math.abs(e),n=t%10,r=t%100;if(r>=11&&r<=19||n===0)return"many";if(n===1)return"one";return"few"}function QE(){return{localeError:mCe()}}var zd=(e)=>e.charAt(0).toUpperCase()+e.slice(1),mCe=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(o,i,s,c){let l=e[o]??null;if(l===null)return l;return{unit:l.unit[i],verb:l.verb[c][s?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},r={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Gautas tipas ${c}, o tikėtasi - instanceof ${o.expected}`;return`Gautas tipas ${c}, o tikėtasi - ${i}`}case"invalid_value":if(o.values.length===1)return`Privalo būti ${Y(o.values[0])}`;return`Privalo būti vienas iš ${_(o.values,"|")} pasirinkimų`;case"too_big":{let i=r[o.origin]??o.origin,s=t(o.origin,PU(Number(o.maximum)),o.inclusive??!1,"smaller");if(s?.verb)return`${zd(i??o.origin??"reikšmė")} ${s.verb} ${o.maximum.toString()} ${s.unit??"elementų"}`;let c=o.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${zd(i??o.origin??"reikšmė")} turi būti ${c} ${o.maximum.toString()} ${s?.unit}`}case"too_small":{let i=r[o.origin]??o.origin,s=t(o.origin,PU(Number(o.minimum)),o.inclusive??!1,"bigger");if(s?.verb)return`${zd(i??o.origin??"reikšmė")} ${s.verb} ${o.minimum.toString()} ${s.unit??"elementų"}`;let c=o.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${zd(i??o.origin??"reikšmė")} turi būti ${c} ${o.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Eilutė privalo prasidėti "${i.prefix}"`;if(i.format==="ends_with")return`Eilutė privalo pasibaigti "${i.suffix}"`;if(i.format==="includes")return`Eilutė privalo įtraukti "${i.includes}"`;if(i.format==="regex")return`Eilutė privalo atitikti ${i.pattern}`;return`Neteisingas ${n[i.format]??o.format}`}case"not_multiple_of":return`Skaičius privalo būti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${_(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let i=r[o.origin]??o.origin;return`${zd(i??o.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};var RU=h(()=>{ge()});function NE(){return{localeError:hCe()}}var hCe=()=>{let e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(o){return e[o]??null}let n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},r={nan:"NaN",number:"број",array:"низа"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Грешен внес: се очекува instanceof ${o.expected}, примено ${c}`;return`Грешен внес: се очекува ${i}, примено ${c}`}case"invalid_value":if(o.values.length===1)return`Invalid input: expected ${Y(o.values[0])}`;return`Грешана опција: се очекува една ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Премногу голем: се очекува ${o.origin??"вредноста"} да има ${i}${o.maximum.toString()} ${s.unit??"елементи"}`;return`Премногу голем: се очекува ${o.origin??"вредноста"} да биде ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Премногу мал: се очекува ${o.origin} да има ${i}${o.minimum.toString()} ${s.unit}`;return`Премногу мал: се очекува ${o.origin} да биде ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Неважечка низа: мора да започнува со "${i.prefix}"`;if(i.format==="ends_with")return`Неважечка низа: мора да завршува со "${i.suffix}"`;if(i.format==="includes")return`Неважечка низа: мора да вклучува "${i.includes}"`;if(i.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${i.pattern}`;return`Invalid ${n[i.format]??o.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${_(o.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${o.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${o.origin}`;default:return"Грешен внес"}}};var TU=h(()=>{ge()});function ME(){return{localeError:ACe()}}var ACe=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let n={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${c}`;return`Input tidak sah: dijangka ${i}, diterima ${c}`}case"invalid_value":if(o.values.length===1)return`Input tidak sah: dijangka ${Y(o.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Terlalu besar: dijangka ${o.origin??"nilai"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemen"}`;return`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Terlalu kecil: dijangka ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`;return`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`String tidak sah: mesti bermula dengan "${i.prefix}"`;if(i.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${i.suffix}"`;if(i.format==="includes")return`String tidak sah: mesti mengandungi "${i.includes}"`;if(i.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${i.pattern}`;return`${n[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${_(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}};var BU=h(()=>{ge()});function zE(){return{localeError:fCe()}}var fCe=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let n={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${c}`;return`Ongeldige invoer: verwacht ${i}, ontving ${c}`}case"invalid_value":if(o.values.length===1)return`Ongeldige invoer: verwacht ${Y(o.values[0])}`;return`Ongeldige optie: verwacht één van ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),c=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";if(s)return`Te ${c}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`;return`Te ${c}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),c=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";if(s)return`Te ${c}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`;return`Te ${c}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Ongeldige tekst: moet met "${i.prefix}" beginnen`;if(i.format==="ends_with")return`Ongeldige tekst: moet op "${i.suffix}" eindigen`;if(i.format==="includes")return`Ongeldige tekst: moet "${i.includes}" bevatten`;if(i.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`;return`Ongeldig: ${n[i.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}};var OU=h(()=>{ge()});function jE(){return{localeError:yCe()}}var yCe=()=>{let e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(o){return e[o]??null}let n={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Ugyldig input: forventet instanceof ${o.expected}, fikk ${c}`;return`Ugyldig input: forventet ${i}, fikk ${c}`}case"invalid_value":if(o.values.length===1)return`Ugyldig verdi: forventet ${Y(o.values[0])}`;return`Ugyldig valg: forventet en av ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`For stor(t): forventet ${o.origin??"value"} til å ha ${i}${o.maximum.toString()} ${s.unit??"elementer"}`;return`For stor(t): forventet ${o.origin??"value"} til å ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`For lite(n): forventet ${o.origin} til å ha ${i}${o.minimum.toString()} ${s.unit}`;return`For lite(n): forventet ${o.origin} til å ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Ugyldig streng: må starte med "${i.prefix}"`;if(i.format==="ends_with")return`Ugyldig streng: må ende med "${i.suffix}"`;if(i.format==="includes")return`Ugyldig streng: må inneholde "${i.includes}"`;if(i.format==="regex")return`Ugyldig streng: må matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${_(o.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};var _U=h(()=>{ge()});function UE(){return{localeError:bCe()}}var bCe=()=>{let e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(o){return e[o]??null}let n={regex:"giren",email:"epostagâh",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 hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Fâsit giren: umulan instanceof ${o.expected}, alınan ${c}`;return`Fâsit giren: umulan ${i}, alınan ${c}`}case"invalid_value":if(o.values.length===1)return`Fâsit giren: umulan ${Y(o.values[0])}`;return`Fâsit tercih: mûteberler ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Fazla büyük: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmalıydı.`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Fazla küçük: ${o.origin}, ${i}${o.minimum.toString()} ${s.unit} sahip olmalıydı.`;return`Fazla küçük: ${o.origin}, ${i}${o.minimum.toString()} olmalıydı.`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Fâsit metin: "${i.prefix}" ile başlamalı.`;if(i.format==="ends_with")return`Fâsit metin: "${i.suffix}" ile bitmeli.`;if(i.format==="includes")return`Fâsit metin: "${i.includes}" ihtivâ etmeli.`;if(i.format==="regex")return`Fâsit metin: ${i.pattern} nakşına uymalı.`;return`Fâsit ${n[i.format]??o.format}`}case"not_multiple_of":return`Fâsit sayı: ${o.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${o.keys.length>1?"s":""}: ${_(o.keys,", ")}`;case"invalid_key":return`${o.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${o.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};var DU=h(()=>{ge()});function FE(){return{localeError:ICe()}}var ICe=()=>{let e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(o){return e[o]??null}let n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},r={nan:"NaN",number:"عدد",array:"ارې"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`ناسم ورودي: باید instanceof ${o.expected} وای, مګر ${c} ترلاسه شو`;return`ناسم ورودي: باید ${i} وای, مګر ${c} ترلاسه شو`}case"invalid_value":if(o.values.length===1)return`ناسم ورودي: باید ${Y(o.values[0])} وای`;return`ناسم انتخاب: باید یو له ${_(o.values,"|")} څخه وای`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`ډیر لوی: ${o.origin??"ارزښت"} باید ${i}${o.maximum.toString()} ${s.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${o.origin??"ارزښت"} باید ${i}${o.maximum.toString()} وي`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`ډیر کوچنی: ${o.origin} باید ${i}${o.minimum.toString()} ${s.unit} ولري`;return`ډیر کوچنی: ${o.origin} باید ${i}${o.minimum.toString()} وي`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`ناسم متن: باید د "${i.prefix}" سره پیل شي`;if(i.format==="ends_with")return`ناسم متن: باید د "${i.suffix}" سره پای ته ورسيږي`;if(i.format==="includes")return`ناسم متن: باید "${i.includes}" ولري`;if(i.format==="regex")return`ناسم متن: باید د ${i.pattern} سره مطابقت ولري`;return`${n[i.format]??o.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${o.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${o.keys.length>1?"کلیډونه":"کلیډ"}: ${_(o.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${o.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${o.origin} کې`;default:return"ناسمه ورودي"}}};var LU=h(()=>{ge()});function $E(){return{localeError:SCe()}}var SCe=()=>{let e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(o){return e[o]??null}let n={regex:"wyrażenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},r={nan:"NaN",number:"liczba",array:"tablica"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${o.expected}, otrzymano ${c}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${i}, otrzymano ${c}`}case"invalid_value":if(o.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${Y(o.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Za duża wartość: oczekiwano, że ${o.origin??"wartość"} będzie mieć ${i}${o.maximum.toString()} ${s.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${o.origin??"wartość"} będzie wynosić ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Za mała wartość: oczekiwano, że ${o.origin??"wartość"} będzie mieć ${i}${o.minimum.toString()} ${s.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${o.origin??"wartość"} będzie wynosić ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${i.prefix}"`;if(i.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${i.suffix}"`;if(i.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${i.includes}"`;if(i.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${i.pattern}`;return`Nieprawidłow(y/a/e) ${n[i.format]??o.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${o.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${o.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};var QU=h(()=>{ge()});function GE(){return{localeError:CCe()}}var CCe=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(o){return e[o]??null}let n={regex:"padrão",email:"endereço de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",number:"número",null:"nulo"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Tipo inválido: esperado instanceof ${o.expected}, recebido ${c}`;return`Tipo inválido: esperado ${i}, recebido ${c}`}case"invalid_value":if(o.values.length===1)return`Entrada inválida: esperado ${Y(o.values[0])}`;return`Opção inválida: esperada uma das ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Muito grande: esperado que ${o.origin??"valor"} tivesse ${i}${o.maximum.toString()} ${s.unit??"elementos"}`;return`Muito grande: esperado que ${o.origin??"valor"} fosse ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Muito pequeno: esperado que ${o.origin} tivesse ${i}${o.minimum.toString()} ${s.unit}`;return`Muito pequeno: esperado que ${o.origin} fosse ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Texto inválido: deve começar com "${i.prefix}"`;if(i.format==="ends_with")return`Texto inválido: deve terminar com "${i.suffix}"`;if(i.format==="includes")return`Texto inválido: deve incluir "${i.includes}"`;if(i.format==="regex")return`Texto inválido: deve corresponder ao padrão ${i.pattern}`;return`${n[i.format]??o.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${o.divisor}`;case"unrecognized_keys":return`Chave${o.keys.length>1?"s":""} desconhecida${o.keys.length>1?"s":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Chave inválida em ${o.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${o.origin}`;default:return"Campo inválido"}}};var NU=h(()=>{ge()});function MU(e,t,n,r){let o=Math.abs(e),i=o%10,s=o%100;if(s>=11&&s<=19)return r;if(i===1)return t;if(i>=2&&i<=4)return n;return r}function HE(){return{localeError:vCe()}}var vCe=()=>{let e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(o){return e[o]??null}let n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},r={nan:"NaN",number:"число",array:"массив"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Неверный ввод: ожидалось instanceof ${o.expected}, получено ${c}`;return`Неверный ввод: ожидалось ${i}, получено ${c}`}case"invalid_value":if(o.values.length===1)return`Неверный ввод: ожидалось ${Y(o.values[0])}`;return`Неверный вариант: ожидалось одно из ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let c=Number(o.maximum),l=MU(c,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${o.origin??"значение"} будет иметь ${i}${o.maximum.toString()} ${l}`}return`Слишком большое значение: ожидалось, что ${o.origin??"значение"} будет ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let c=Number(o.minimum),l=MU(c,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${o.origin} будет иметь ${i}${o.minimum.toString()} ${l}`}return`Слишком маленькое значение: ожидалось, что ${o.origin} будет ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Неверная строка: должна начинаться с "${i.prefix}"`;if(i.format==="ends_with")return`Неверная строка: должна заканчиваться на "${i.suffix}"`;if(i.format==="includes")return`Неверная строка: должна содержать "${i.includes}"`;if(i.format==="regex")return`Неверная строка: должна соответствовать шаблону ${i.pattern}`;return`Неверный ${n[i.format]??o.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${o.divisor}`;case"unrecognized_keys":return`Нераспознанн${o.keys.length>1?"ые":"ый"} ключ${o.keys.length>1?"и":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${o.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${o.origin}`;default:return"Неверные входные данные"}}};var zU=h(()=>{ge()});function qE(){return{localeError:wCe()}}var wCe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let n={regex:"vnos",email:"e-poštni naslov",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 datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"število",array:"tabela"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Neveljaven vnos: pričakovano instanceof ${o.expected}, prejeto ${c}`;return`Neveljaven vnos: pričakovano ${i}, prejeto ${c}`}case"invalid_value":if(o.values.length===1)return`Neveljaven vnos: pričakovano ${Y(o.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Preveliko: pričakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${s.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Premajhno: pričakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${s.unit}`;return`Premajhno: pričakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Neveljaven niz: mora se začeti z "${i.prefix}"`;if(i.format==="ends_with")return`Neveljaven niz: mora se končati z "${i.suffix}"`;if(i.format==="includes")return`Neveljaven niz: mora vsebovati "${i.includes}"`;if(i.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`;return`Neveljaven ${n[i.format]??o.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i ključi":" ključ"}: ${_(o.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}};var jU=h(()=>{ge()});function VE(){return{localeError:ECe()}}var ECe=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(o){return e[o]??null}let n={regex:"reguljärt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Ogiltig inmatning: förväntat instanceof ${o.expected}, fick ${c}`;return`Ogiltig inmatning: förväntat ${i}, fick ${c}`}case"invalid_value":if(o.values.length===1)return`Ogiltig inmatning: förväntat ${Y(o.values[0])}`;return`Ogiltigt val: förväntade en av ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`För stor(t): förväntade ${o.origin??"värdet"} att ha ${i}${o.maximum.toString()} ${s.unit??"element"}`;return`För stor(t): förväntat ${o.origin??"värdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`För lite(t): förväntade ${o.origin??"värdet"} att ha ${i}${o.minimum.toString()} ${s.unit}`;return`För lite(t): förväntade ${o.origin??"värdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Ogiltig sträng: måste börja med "${i.prefix}"`;if(i.format==="ends_with")return`Ogiltig sträng: måste sluta med "${i.suffix}"`;if(i.format==="includes")return`Ogiltig sträng: måste innehålla "${i.includes}"`;if(i.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${i.pattern}"`;return`Ogiltig(t) ${n[i.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${_(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${o.origin??"värdet"}`;default:return"Ogiltig input"}}};var UU=h(()=>{ge()});function KE(){return{localeError:kCe()}}var kCe=()=>{let e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(o){return e[o]??null}let n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",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 தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${o.expected}, பெறப்பட்டது ${c}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${i}, பெறப்பட்டது ${c}`}case"invalid_value":if(o.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${Y(o.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${_(o.values,"|")} இல் ஒன்று`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${o.origin??"மதிப்பு"} ${i}${o.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${o.origin??"மதிப்பு"} ${i}${o.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${o.origin} ${i}${o.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`தவறான சரம்: "${i.prefix}" இல் தொடங்க வேண்டும்`;if(i.format==="ends_with")return`தவறான சரம்: "${i.suffix}" இல் முடிவடைய வேண்டும்`;if(i.format==="includes")return`தவறான சரம்: "${i.includes}" ஐ உள்ளடக்க வேண்டும்`;if(i.format==="regex")return`தவறான சரம்: ${i.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${n[i.format]??o.format}`}case"not_multiple_of":return`தவறான எண்: ${o.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${o.keys.length>1?"கள்":""}: ${_(o.keys,", ")}`;case"invalid_key":return`${o.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${o.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};var FU=h(()=>{ge()});function YE(){return{localeError:xCe()}}var xCe=()=>{let e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(o){return e[o]??null}let n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},r={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${o.expected} แต่ได้รับ ${c}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${i} แต่ได้รับ ${c}`}case"invalid_value":if(o.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${Y(o.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"ไม่เกิน":"น้อยกว่า",s=t(o.origin);if(s)return`เกินกำหนด: ${o.origin??"ค่า"} ควรมี${i} ${o.maximum.toString()} ${s.unit??"รายการ"}`;return`เกินกำหนด: ${o.origin??"ค่า"} ควรมี${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"อย่างน้อย":"มากกว่า",s=t(o.origin);if(s)return`น้อยกว่ากำหนด: ${o.origin} ควรมี${i} ${o.minimum.toString()} ${s.unit}`;return`น้อยกว่ากำหนด: ${o.origin} ควรมี${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${i.prefix}"`;if(i.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${i.suffix}"`;if(i.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${i.includes}" อยู่ในข้อความ`;if(i.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${i.pattern}`;return`รูปแบบไม่ถูกต้อง: ${n[i.format]??o.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${o.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${_(o.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${o.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${o.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};var $U=h(()=>{ge()});function WE(){return{localeError:PCe()}}var PCe=()=>{let e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(o){return e[o]??null}let n={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Geçersiz değer: beklenen instanceof ${o.expected}, alınan ${c}`;return`Geçersiz değer: beklenen ${i}, alınan ${c}`}case"invalid_value":if(o.values.length===1)return`Geçersiz değer: beklenen ${Y(o.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Çok büyük: beklenen ${o.origin??"değer"} ${i}${o.maximum.toString()} ${s.unit??"öğe"}`;return`Çok büyük: beklenen ${o.origin??"değer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Çok küçük: beklenen ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`;return`Çok küçük: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Geçersiz metin: "${i.prefix}" ile başlamalı`;if(i.format==="ends_with")return`Geçersiz metin: "${i.suffix}" ile bitmeli`;if(i.format==="includes")return`Geçersiz metin: "${i.includes}" içermeli`;if(i.format==="regex")return`Geçersiz metin: ${i.pattern} desenine uymalı`;return`Geçersiz ${n[i.format]??o.format}`}case"not_multiple_of":return`Geçersiz sayı: ${o.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${o.keys.length>1?"lar":""}: ${_(o.keys,", ")}`;case"invalid_key":return`${o.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${o.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};var GU=h(()=>{ge()});function jd(){return{localeError:RCe()}}var RCe=()=>{let e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(o){return e[o]??null}let n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},r={nan:"NaN",number:"число",array:"масив"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Неправильні вхідні дані: очікується instanceof ${o.expected}, отримано ${c}`;return`Неправильні вхідні дані: очікується ${i}, отримано ${c}`}case"invalid_value":if(o.values.length===1)return`Неправильні вхідні дані: очікується ${Y(o.values[0])}`;return`Неправильна опція: очікується одне з ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Занадто велике: очікується, що ${o.origin??"значення"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"елементів"}`;return`Занадто велике: очікується, що ${o.origin??"значення"} буде ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Занадто мале: очікується, що ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`;return`Занадто мале: очікується, що ${o.origin} буде ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Неправильний рядок: повинен починатися з "${i.prefix}"`;if(i.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${i.suffix}"`;if(i.format==="includes")return`Неправильний рядок: повинен містити "${i.includes}"`;if(i.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${i.pattern}`;return`Неправильний ${n[i.format]??o.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${o.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${o.keys.length>1?"і":""}: ${_(o.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${o.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${o.origin}`;default:return"Неправильні вхідні дані"}}};var JE=h(()=>{ge()});function ZE(){return jd()}var HU=h(()=>{JE()});function XE(){return{localeError:TCe()}}var TCe=()=>{let e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(o){return e[o]??null}let n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},r={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`غلط ان پٹ: instanceof ${o.expected} متوقع تھا، ${c} موصول ہوا`;return`غلط ان پٹ: ${i} متوقع تھا، ${c} موصول ہوا`}case"invalid_value":if(o.values.length===1)return`غلط ان پٹ: ${Y(o.values[0])} متوقع تھا`;return`غلط آپشن: ${_(o.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`بہت بڑا: ${o.origin??"ویلیو"} کے ${i}${o.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${o.origin??"ویلیو"} کا ${i}${o.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`بہت چھوٹا: ${o.origin} کے ${i}${o.minimum.toString()} ${s.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${o.origin} کا ${i}${o.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`غلط سٹرنگ: "${i.prefix}" سے شروع ہونا چاہیے`;if(i.format==="ends_with")return`غلط سٹرنگ: "${i.suffix}" پر ختم ہونا چاہیے`;if(i.format==="includes")return`غلط سٹرنگ: "${i.includes}" شامل ہونا چاہیے`;if(i.format==="regex")return`غلط سٹرنگ: پیٹرن ${i.pattern} سے میچ ہونا چاہیے`;return`غلط ${n[i.format]??o.format}`}case"not_multiple_of":return`غلط نمبر: ${o.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${o.keys.length>1?"ز":""}: ${_(o.keys,"، ")}`;case"invalid_key":return`${o.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${o.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};var qU=h(()=>{ge()});function ek(){return{localeError:BCe()}}var BCe=()=>{let e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function t(o){return e[o]??null}let n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${c}`;return`Noto‘g‘ri kirish: kutilgan ${i}, qabul qilingan ${c}`}case"invalid_value":if(o.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${Y(o.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${s.unit} ${s.verb}`;return`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`;return`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Noto‘g‘ri satr: "${i.prefix}" bilan boshlanishi kerak`;if(i.format==="ends_with")return`Noto‘g‘ri satr: "${i.suffix}" bilan tugashi kerak`;if(i.format==="includes")return`Noto‘g‘ri satr: "${i.includes}" ni o‘z ichiga olishi kerak`;if(i.format==="regex")return`Noto‘g‘ri satr: ${i.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${n[i.format]??o.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${o.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${o.keys.length>1?"lar":""}: ${_(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${o.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};var VU=h(()=>{ge()});function tk(){return{localeError:OCe()}}var OCe=()=>{let e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(o){return e[o]??null}let n={regex:"đầu vào",email:"địa chỉ email",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:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},r={nan:"NaN",number:"số",array:"mảng"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${o.expected}, nhận được ${c}`;return`Đầu vào không hợp lệ: mong đợi ${i}, nhận được ${c}`}case"invalid_value":if(o.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${Y(o.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Quá lớn: mong đợi ${o.origin??"giá trị"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"phần tử"}`;return`Quá lớn: mong đợi ${o.origin??"giá trị"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Quá nhỏ: mong đợi ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`;return`Quá nhỏ: mong đợi ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${i.prefix}"`;if(i.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${i.suffix}"`;if(i.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${i.includes}"`;if(i.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${i.pattern}`;return`${n[i.format]??o.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${o.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${_(o.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${o.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${o.origin}`;default:return"Đầu vào không hợp lệ"}}};var KU=h(()=>{ge()});function nk(){return{localeError:_Ce()}}var _Ce=()=>{let e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(o){return e[o]??null}let n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},r={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`无效输入:期望 instanceof ${o.expected},实际接收 ${c}`;return`无效输入:期望 ${i},实际接收 ${c}`}case"invalid_value":if(o.values.length===1)return`无效输入:期望 ${Y(o.values[0])}`;return`无效选项:期望以下之一 ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`数值过大:期望 ${o.origin??"值"} ${i}${o.maximum.toString()} ${s.unit??"个元素"}`;return`数值过大:期望 ${o.origin??"值"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`数值过小:期望 ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`;return`数值过小:期望 ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`无效字符串:必须以 "${i.prefix}" 开头`;if(i.format==="ends_with")return`无效字符串:必须以 "${i.suffix}" 结尾`;if(i.format==="includes")return`无效字符串:必须包含 "${i.includes}"`;if(i.format==="regex")return`无效字符串:必须满足正则表达式 ${i.pattern}`;return`无效${n[i.format]??o.format}`}case"not_multiple_of":return`无效数字:必须是 ${o.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${_(o.keys,", ")}`;case"invalid_key":return`${o.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${o.origin} 中包含无效值(value)`;default:return"无效输入"}}};var YU=h(()=>{ge()});function ok(){return{localeError:DCe()}}var DCe=()=>{let e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(o){return e[o]??null}let n={regex:"輸入",email:"郵件地址",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 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},r={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`無效的輸入值:預期為 instanceof ${o.expected},但收到 ${c}`;return`無效的輸入值:預期為 ${i},但收到 ${c}`}case"invalid_value":if(o.values.length===1)return`無效的輸入值:預期為 ${Y(o.values[0])}`;return`無效的選項:預期為以下其中之一 ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`數值過大:預期 ${o.origin??"值"} 應為 ${i}${o.maximum.toString()} ${s.unit??"個元素"}`;return`數值過大:預期 ${o.origin??"值"} 應為 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`數值過小:預期 ${o.origin} 應為 ${i}${o.minimum.toString()} ${s.unit}`;return`數值過小:預期 ${o.origin} 應為 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`無效的字串:必須以 "${i.prefix}" 開頭`;if(i.format==="ends_with")return`無效的字串:必須以 "${i.suffix}" 結尾`;if(i.format==="includes")return`無效的字串:必須包含 "${i.includes}"`;if(i.format==="regex")return`無效的字串:必須符合格式 ${i.pattern}`;return`無效的 ${n[i.format]??o.format}`}case"not_multiple_of":return`無效的數字:必須為 ${o.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${o.keys.length>1?"們":""}:${_(o.keys,"、")}`;case"invalid_key":return`${o.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${o.origin} 中有無效的值`;default:return"無效的輸入值"}}};var WU=h(()=>{ge()});function rk(){return{localeError:LCe()}}var LCe=()=>{let e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(o){return e[o]??null}let n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},r={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(o)=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=W(o.input),c=r[s]??s;if(/^[A-Z]/.test(o.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${o.expected}, àmọ̀ a rí ${c}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${i}, àmọ̀ a rí ${c}`}case"invalid_value":if(o.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${Y(o.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${_(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${o.origin??"iye"} ${s.verb} ${i}${o.maximum} ${s.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Kéré ju: a ní láti jẹ́ pé ${o.origin} ${s.verb} ${i}${o.minimum} ${s.unit}`;return`Kéré ju: a ní láti jẹ́ ${i}${o.minimum}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${i.prefix}"`;if(i.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${i.suffix}"`;if(i.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${i.includes}"`;if(i.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${i.pattern}`;return`Aṣìṣe: ${n[i.format]??o.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${o.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${_(o.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${o.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${o.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};var JU=h(()=>{ge()});var Ud={};cr(Ud,{ar:()=>uE,az:()=>dE,be:()=>pE,bg:()=>gE,ca:()=>mE,cs:()=>hE,da:()=>AE,de:()=>fE,en:()=>Nd,eo:()=>bE,es:()=>IE,fa:()=>SE,fi:()=>CE,fr:()=>vE,frCA:()=>wE,he:()=>EE,hu:()=>kE,hy:()=>xE,id:()=>PE,is:()=>RE,it:()=>TE,ja:()=>BE,ka:()=>OE,kh:()=>DE,km:()=>Md,ko:()=>LE,lt:()=>QE,mk:()=>NE,ms:()=>ME,nl:()=>zE,no:()=>jE,ota:()=>UE,pl:()=>$E,ps:()=>FE,pt:()=>GE,ru:()=>HE,sl:()=>qE,sv:()=>VE,ta:()=>KE,th:()=>YE,tr:()=>WE,ua:()=>ZE,uk:()=>jd,ur:()=>XE,uz:()=>ek,vi:()=>tk,yo:()=>rk,zhCN:()=>nk,zhTW:()=>ok});var ik=h(()=>{nU();oU();iU();sU();aU();cU();lU();uU();yE();dU();pU();gU();mU();hU();AU();fU();yU();IU();SU();CU();vU();wU();EU();kU();_E();xU();RU();TU();BU();OU();_U();DU();LU();QU();NU();zU();jU();UU();FU();$U();GU();HU();JE();qU();VU();KU();YU();WU();JU()});class ck{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==="object"&&"id"in n)this._idmap.set(n.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Uh(){return new ck}var ZU,sk,ak,en;var Fd=h(()=>{sk=Symbol("ZodOutput"),ak=Symbol("ZodInput");(ZU=globalThis).__zod_globalRegistry??(ZU.__zod_globalRegistry=Uh());en=globalThis.__zod_globalRegistry});function lk(e,t){return new e({type:"string",...X(t)})}function uk(e,t){return new e({type:"string",coerce:!0,...X(t)})}function Fh(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...X(t)})}function $d(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...X(t)})}function $h(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...X(t)})}function Gh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...X(t)})}function Hh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...X(t)})}function qh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...X(t)})}function Gd(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...X(t)})}function Vh(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...X(t)})}function Kh(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...X(t)})}function Yh(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...X(t)})}function Wh(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...X(t)})}function Jh(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...X(t)})}function Zh(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...X(t)})}function Xh(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...X(t)})}function eA(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...X(t)})}function tA(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...X(t)})}function dk(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...X(t)})}function nA(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...X(t)})}function oA(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...X(t)})}function rA(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...X(t)})}function iA(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...X(t)})}function sA(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...X(t)})}function aA(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...X(t)})}function gk(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...X(t)})}function mk(e,t){return new e({type:"string",format:"date",check:"string_format",...X(t)})}function hk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...X(t)})}function Ak(e,t){return new e({type:"string",format:"duration",check:"string_format",...X(t)})}function fk(e,t){return new e({type:"number",checks:[],...X(t)})}function yk(e,t){return new e({type:"number",coerce:!0,checks:[],...X(t)})}function bk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...X(t)})}function Ik(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...X(t)})}function Sk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...X(t)})}function Ck(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...X(t)})}function vk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...X(t)})}function wk(e,t){return new e({type:"boolean",...X(t)})}function Ek(e,t){return new e({type:"boolean",coerce:!0,...X(t)})}function kk(e,t){return new e({type:"bigint",...X(t)})}function xk(e,t){return new e({type:"bigint",coerce:!0,...X(t)})}function Pk(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...X(t)})}function Rk(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...X(t)})}function Tk(e,t){return new e({type:"symbol",...X(t)})}function Bk(e,t){return new e({type:"undefined",...X(t)})}function Ok(e,t){return new e({type:"null",...X(t)})}function _k(e){return new e({type:"any"})}function Dk(e){return new e({type:"unknown"})}function Lk(e,t){return new e({type:"never",...X(t)})}function Qk(e,t){return new e({type:"void",...X(t)})}function Nk(e,t){return new e({type:"date",...X(t)})}function Mk(e,t){return new e({type:"date",coerce:!0,...X(t)})}function zk(e,t){return new e({type:"nan",...X(t)})}function pr(e,t){return new Ph({check:"less_than",...X(t),value:e,inclusive:!1})}function ro(e,t){return new Ph({check:"less_than",...X(t),value:e,inclusive:!0})}function gr(e,t){return new Rh({check:"greater_than",...X(t),value:e,inclusive:!1})}function xn(e,t){return new Rh({check:"greater_than",...X(t),value:e,inclusive:!0})}function cA(e){return gr(0,e)}function lA(e){return pr(0,e)}function uA(e){return ro(0,e)}function dA(e){return xn(0,e)}function Bi(e,t){return new _v({check:"multiple_of",...X(t),value:e})}function Oi(e,t){return new Qv({check:"max_size",...X(t),maximum:e})}function mr(e,t){return new Nv({check:"min_size",...X(t),minimum:e})}function js(e,t){return new Mv({check:"size_equals",...X(t),size:e})}function Us(e,t){return new zv({check:"max_length",...X(t),maximum:e})}function Yr(e,t){return new jv({check:"min_length",...X(t),minimum:e})}function Fs(e,t){return new Uv({check:"length_equals",...X(t),length:e})}function Ac(e,t){return new Fv({check:"string_format",format:"regex",...X(t),pattern:e})}function fc(e){return new $v({check:"string_format",format:"lowercase",...X(e)})}function yc(e){return new Gv({check:"string_format",format:"uppercase",...X(e)})}function bc(e,t){return new Hv({check:"string_format",format:"includes",...X(t),includes:e})}function Ic(e,t){return new qv({check:"string_format",format:"starts_with",...X(t),prefix:e})}function Sc(e,t){return new Vv({check:"string_format",format:"ends_with",...X(t),suffix:e})}function pA(e,t,n){return new Kv({check:"property",property:e,schema:t,...X(n)})}function Cc(e,t){return new Yv({check:"mime_type",mime:e,...X(t)})}function $o(e){return new Wv({check:"overwrite",tx:e})}function vc(e){return $o((t)=>t.normalize(e))}function wc(){return $o((e)=>e.trim())}function Ec(){return $o((e)=>e.toLowerCase())}function kc(){return $o((e)=>e.toUpperCase())}function xc(){return $o((e)=>qC(e))}function jk(e,t,n){return new e({type:"array",element:t,...X(n)})}function NCe(e,t,n){return new e({type:"union",options:t,...X(n)})}function MCe(e,t,n){return new e({type:"union",options:t,inclusive:!1,...X(n)})}function zCe(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...X(r)})}function jCe(e,t,n){return new e({type:"intersection",left:t,right:n})}function UCe(e,t,n,r){let o=n instanceof xe;return new e({type:"tuple",items:t,rest:o?n:null,...X(o?r:n)})}function FCe(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...X(r)})}function $Ce(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...X(r)})}function GCe(e,t,n){return new e({type:"set",valueType:t,...X(n)})}function HCe(e,t,n){let r=Array.isArray(t)?Object.fromEntries(t.map((o)=>[o,o])):t;return new e({type:"enum",entries:r,...X(n)})}function qCe(e,t,n){return new e({type:"enum",entries:t,...X(n)})}function VCe(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...X(n)})}function Uk(e,t){return new e({type:"file",...X(t)})}function KCe(e,t){return new e({type:"transform",transform:t})}function YCe(e,t){return new e({type:"optional",innerType:t})}function WCe(e,t){return new e({type:"nullable",innerType:t})}function JCe(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n==="function"?n():KC(n)}})}function ZCe(e,t,n){return new e({type:"nonoptional",innerType:t,...X(n)})}function XCe(e,t){return new e({type:"success",innerType:t})}function eve(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n==="function"?n:()=>n})}function tve(e,t,n){return new e({type:"pipe",in:t,out:n})}function nve(e,t){return new e({type:"readonly",innerType:t})}function ove(e,t,n){return new e({type:"template_literal",parts:t,...X(n)})}function rve(e,t){return new e({type:"lazy",getter:t})}function ive(e,t){return new e({type:"promise",innerType:t})}function Fk(e,t,n){let r=X(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function $k(e,t,n){return new e({type:"custom",check:"custom",fn:t,...X(n)})}function Gk(e){let t=XU((n)=>(n.addIssue=(r)=>{if(typeof r==="string")n.issues.push(lc(r,n.value,t._zod.def));else{let o=r;if(o.fatal)o.continue=!1;o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(lc(o))}},e(n.value,n)));return t}function XU(e,t){let n=new dt({check:"custom",...X(t)});return n._zod.check=e,n}function Hk(e){let t=new dt({check:"describe"});return t._zod.onattach=[(n)=>{let r=en.get(n)??{};en.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function qk(e){let t=new dt({check:"meta"});return t._zod.onattach=[(n)=>{let r=en.get(n)??{};en.add(n,{...r,...e})}],t._zod.check=()=>{},t}function Vk(e,t){let n=X(t),r=n.truthy??["true","1","yes","on","y","enabled"],o=n.falsy??["false","0","no","off","n","disabled"];if(n.case!=="sensitive")r=r.map((m)=>typeof m==="string"?m.toLowerCase():m),o=o.map((m)=>typeof m==="string"?m.toLowerCase():m);let i=new Set(r),s=new Set(o),c=e.Codec??Qd,l=e.Boolean??Dd,d=new(e.String??zs)({type:"string",error:n.error}),p=new l({type:"boolean",error:n.error}),g=new c({type:"pipe",in:d,out:p,transform:(m,A)=>{let f=m;if(n.case!=="sensitive")f=f.toLowerCase();if(i.has(f))return!0;else if(s.has(f))return!1;else return A.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:A.value,inst:g,continue:!1}),{}},reverseTransform:(m,A)=>{if(m===!0)return r[0]||"true";else return o[0]||"false"},error:n.error});return g}function Pc(e,t,n,r={}){let o=X(r),i={...X(r),check:"string_format",type:"string",format:t,fn:typeof n==="function"?n:(c)=>n.test(c),...o};if(n instanceof RegExp)i.pattern=n;return new e(i)}var pk;var eF=h(()=>{Th();Fd();lE();ge();pk={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function _i(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??en,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ze(e,t,n={path:[],schemaPath:[]}){var r;let o=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,n.schemaPath.includes(e))i.cycle=n.path;return i.schema}let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{let g=s.schema,m=t.processors[o.type];if(!m)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,g,d)}let p=e._zod.parent;if(p){if(!s.ref)s.ref=p;Ze(p,t,d),t.seen.get(p).isParent=!0}}let l=t.metadataRegistry.get(e);if(l)Object.assign(s.schema,l);if(t.io==="input"&&Pn(e))delete s.schema.examples,delete s.schema.default;if(t.io==="input"&&s.schema._prefault)(r=s.schema).default??(r.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function Di(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let l=r.get(c);if(l&&l!==s[0])throw Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,s[0])}}let o=(s)=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(s[0])?.id,g=e.external.uri??((A)=>A);if(p)return{ref:g(p)};let m=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=m,{defId:m,ref:`${g("__shared")}#/${c}/${m}`}}if(s[1]===n)return{ref:"#"};let u=`${"#"}/${c}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},i=(s)=>{if(s[1].schema.$ref)return;let c=s[1],{ref:l,defId:u}=o(s);if(c.def={...c.schema},u)c.defId=u;let d=c.schema;for(let p in d)delete d[p];d.$ref=l};if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
104
104
|
|
|
105
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1){if(e.reused==="ref"){i(s);continue}}}}function Li(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=(s)=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){r(d);let g=e.seen.get(d),m=g.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))l.allOf=l.allOf??[],l.allOf.push(m);else Object.assign(l,m);if(Object.assign(l,u),s._zod.parent===d)for(let f in l){if(f==="$ref"||f==="allOf")continue;if(!(f in u))delete l[f]}if(m.$ref&&g.def)for(let f in l){if(f==="$ref"||f==="allOf")continue;if(f in g.def&&JSON.stringify(l[f])===JSON.stringify(g.def[f]))delete l[f]}}let p=s._zod.parent;if(p&&p!==d){r(p);let g=e.seen.get(p);if(g?.schema.$ref){if(l.$ref=g.schema.$ref,g.def)for(let m in l){if(m==="$ref"||m==="allOf")continue;if(m in g.def&&JSON.stringify(l[m])===JSON.stringify(g.def[m]))delete l[m]}}}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())r(s[0]);let o={};if(e.target==="draft-2020-12")o.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")o.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")o.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,n.def??n.schema);let i=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];if(c.def&&c.defId)i[c.defId]=c.def}if(e.external);else if(Object.keys(i).length>0)if(e.target==="draft-2020-12")o.$defs=i;else o.definitions=i;try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Rc(t,"input",e.processors),output:Rc(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch(s){throw Error("Error converting schema to JSON.")}}function Pn(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Pn(r.element,n);if(r.type==="set")return Pn(r.valueType,n);if(r.type==="lazy")return Pn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Pn(r.innerType,n);if(r.type==="intersection")return Pn(r.left,n)||Pn(r.right,n);if(r.type==="record"||r.type==="map")return Pn(r.keyType,n)||Pn(r.valueType,n);if(r.type==="pipe")return Pn(r.in,n)||Pn(r.out,n);if(r.type==="object"){for(let o in r.shape)if(Pn(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(Pn(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(Pn(o,n))return!0;if(r.rest&&Pn(r.rest,n))return!0;return!1}return!1}var Kk=(e,t={})=>(n)=>{let r=_i({...n,processors:t});return Ze(e,r),Di(r,e),Li(r,e)},Rc=(e,t,n={})=>(r)=>{let{libraryOptions:o,target:i}=r??{},s=_i({...o??{},target:i,io:t,processors:n});return Ze(e,s),Di(s,e),Li(s,e)};var Hd=h(()=>{Fd()});function AA(e,t){if("_idmap"in e){let r=e,o=_i({...t,processors:gA}),i={};for(let l of r._idmap.entries()){let[u,d]=l;Ze(d,o)}let s={},c={registry:r,uri:t?.uri,defs:i};o.external=c;for(let l of r._idmap.entries()){let[u,d]=l;Di(o,d),s[u]=Li(o,d)}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:i}}return{schemas:s}}let n=_i({...t,processors:gA});return Ze(e,n),Di(n,e),Li(n,e)}var sve,Yk=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:c,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof i==="number")o.minLength=i;if(typeof s==="number")o.maxLength=s;if(c){if(o.format=sve[c]??c,o.format==="")delete o.format;if(c==="time")delete o.format}if(u)o.contentEncoding=u;if(l&&l.size>0){let d=[...l];if(d.length===1)o.pattern=d[0].source;else if(d.length>1)o.allOf=[...d.map((p)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))]}},Wk=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:c,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;if(typeof c==="string"&&c.includes("int"))o.type="integer";else o.type="number";if(typeof d==="number")if(t.target==="draft-04"||t.target==="openapi-3.0")o.minimum=d,o.exclusiveMinimum=!0;else o.exclusiveMinimum=d;if(typeof i==="number"){if(o.minimum=i,typeof d==="number"&&t.target!=="draft-04")if(d>=i)delete o.minimum;else delete o.exclusiveMinimum}if(typeof u==="number")if(t.target==="draft-04"||t.target==="openapi-3.0")o.maximum=u,o.exclusiveMaximum=!0;else o.exclusiveMaximum=u;if(typeof s==="number"){if(o.maximum=s,typeof u==="number"&&t.target!=="draft-04")if(u<=s)delete o.maximum;else delete o.exclusiveMaximum}if(typeof l==="number")o.multipleOf=l},Jk=(e,t,n,r)=>{n.type="boolean"},Zk=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Xk=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},ex=(e,t,n,r)=>{if(t.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},tx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},nx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},ox=(e,t,n,r)=>{n.not={}},rx=(e,t,n,r)=>{},ix=(e,t,n,r)=>{},sx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},ax=(e,t,n,r)=>{let o=e._zod.def,i=vd(o.entries);if(i.every((s)=>typeof s==="number"))n.type="number";if(i.every((s)=>typeof s==="string"))n.type="string";n.enum=i},cx=(e,t,n,r)=>{let o=e._zod.def,i=[];for(let s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s==="bigint")if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else i.push(Number(s));else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0")n.enum=[s];else n.const=s}else{if(i.every((s)=>typeof s==="number"))n.type="number";if(i.every((s)=>typeof s==="string"))n.type="string";if(i.every((s)=>typeof s==="boolean"))n.type="boolean";if(i.every((s)=>s===null))n.type="null";n.enum=i}},lx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},ux=(e,t,n,r)=>{let o=n,i=e._zod.pattern;if(!i)throw Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},dx=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:l}=e._zod.bag;if(s!==void 0)i.minLength=s;if(c!==void 0)i.maxLength=c;if(l)if(l.length===1)i.contentMediaType=l[0],Object.assign(o,i);else Object.assign(o,i),o.anyOf=l.map((u)=>({contentMediaType:u}));else Object.assign(o,i)},px=(e,t,n,r)=>{n.type="boolean"},gx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},mx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},hx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},Ax=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},fx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},yx=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;if(typeof s==="number")o.minItems=s;if(typeof c==="number")o.maxItems=c;o.type="array",o.items=Ze(i.element,t,{...r,path:[...r.path,"items"]})},bx=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object",o.properties={};let s=i.shape;for(let u in s)o.properties[u]=Ze(s[u],t,{...r,path:[...r.path,"properties",u]});let c=new Set(Object.keys(s)),l=new Set([...c].filter((u)=>{let d=i.shape[u]._zod;if(t.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(l.size>0)o.required=Array.from(l);if(i.catchall?._zod.def.type==="never")o.additionalProperties=!1;else if(!i.catchall){if(t.io==="output")o.additionalProperties=!1}else if(i.catchall)o.additionalProperties=Ze(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})},mA=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((c,l)=>Ze(c,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));if(i)n.oneOf=s;else n.anyOf=s},Ix=(e,t,n,r)=>{let o=e._zod.def,i=Ze(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Ze(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=(u)=>("allOf"in u)&&Object.keys(u).length===1,l=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];n.allOf=l},Sx=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((g,m)=>Ze(g,t,{...r,path:[...r.path,s,m]})),u=i.rest?Ze(i.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;if(t.target==="draft-2020-12"){if(o.prefixItems=l,u)o.items=u}else if(t.target==="openapi-3.0"){if(o.items={anyOf:l},u)o.items.anyOf.push(u);if(o.minItems=l.length,!u)o.maxItems=l.length}else if(o.items=l,u)o.additionalItems=u;let{minimum:d,maximum:p}=e._zod.bag;if(typeof d==="number")o.minItems=d;if(typeof p==="number")o.maxItems=p},Cx=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object";let s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let d=Ze(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let p of l)o.patternProperties[p.source]=d}else{if(t.target==="draft-07"||t.target==="draft-2020-12")o.propertyNames=Ze(i.keyType,t,{...r,path:[...r.path,"propertyNames"]});o.additionalProperties=Ze(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let u=s._zod.values;if(u){let d=[...u].filter((p)=>typeof p==="string"||typeof p==="number");if(d.length>0)o.required=d}},vx=(e,t,n,r)=>{let o=e._zod.def,i=Ze(o.innerType,t,r),s=t.seen.get(e);if(t.target==="openapi-3.0")s.ref=o.innerType,n.nullable=!0;else n.anyOf=[i,{type:"null"}]},wx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Ex=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},kx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);if(i.ref=o.innerType,t.io==="input")n._prefault=JSON.parse(JSON.stringify(o.defaultValue))},xx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Px=(e,t,n,r)=>{let o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ze(i,t,r);let s=t.seen.get(e);s.ref=i},Rx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Tx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},hA=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Bx=(e,t,n,r)=>{let o=e._zod.innerType;Ze(o,t,r);let i=t.seen.get(e);i.ref=o},gA;var qd=h(()=>{Hd();ge();sve={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gA={string:Yk,number:Wk,boolean:Jk,bigint:Zk,symbol:Xk,null:ex,undefined:tx,void:nx,never:ox,any:rx,unknown:ix,date:sx,enum:ax,literal:cx,nan:lx,template_literal:ux,file:dx,success:px,custom:gx,function:mx,transform:hx,map:Ax,set:fx,array:yx,object:bx,union:mA,intersection:Ix,tuple:Sx,record:Cx,nullable:vx,nonoptional:wx,default:Ex,prefault:kx,catch:xx,pipe:Px,readonly:Rx,promise:Tx,optional:hA,lazy:Bx}});class Ox{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";this.ctx=_i({processors:gA,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return Ze(e,this.ctx,t)}emit(e,t){if(t){if(t.cycles)this.ctx.cycles=t.cycles;if(t.reused)this.ctx.reused=t.reused;if(t.external)this.ctx.external=t.external}Di(this.ctx,e);let n=Li(this.ctx,e),{"~standard":r,...o}=n;return o}}var tF=h(()=>{qd();Hd()});var nF={};var oF=()=>{};var Wr={};cr(Wr,{$ZodAny:()=>Bw,$ZodArray:()=>Qw,$ZodAsyncError:()=>dr,$ZodBase64:()=>Sw,$ZodBase64URL:()=>Cw,$ZodBigInt:()=>Mh,$ZodBigIntFormat:()=>xw,$ZodBoolean:()=>Dd,$ZodCIDRv4:()=>yw,$ZodCIDRv6:()=>bw,$ZodCUID:()=>sw,$ZodCUID2:()=>aw,$ZodCatch:()=>eE,$ZodCheck:()=>dt,$ZodCheckBigIntFormat:()=>Lv,$ZodCheckEndsWith:()=>Vv,$ZodCheckGreaterThan:()=>Rh,$ZodCheckIncludes:()=>Hv,$ZodCheckLengthEquals:()=>Uv,$ZodCheckLessThan:()=>Ph,$ZodCheckLowerCase:()=>$v,$ZodCheckMaxLength:()=>zv,$ZodCheckMaxSize:()=>Qv,$ZodCheckMimeType:()=>Yv,$ZodCheckMinLength:()=>jv,$ZodCheckMinSize:()=>Nv,$ZodCheckMultipleOf:()=>_v,$ZodCheckNumberFormat:()=>Dv,$ZodCheckOverwrite:()=>Wv,$ZodCheckProperty:()=>Kv,$ZodCheckRegex:()=>Fv,$ZodCheckSizeEquals:()=>Mv,$ZodCheckStartsWith:()=>qv,$ZodCheckStringFormat:()=>mc,$ZodCheckUpperCase:()=>Gv,$ZodCodec:()=>Qd,$ZodCustom:()=>cE,$ZodCustomStringFormat:()=>Ew,$ZodDate:()=>Lw,$ZodDefault:()=>Ww,$ZodDiscriminatedUnion:()=>zw,$ZodE164:()=>vw,$ZodEmail:()=>nw,$ZodEmoji:()=>rw,$ZodEncodeError:()=>Qs,$ZodEnum:()=>Gw,$ZodError:()=>Pd,$ZodExactOptional:()=>Kw,$ZodFile:()=>qw,$ZodFunction:()=>iE,$ZodGUID:()=>ew,$ZodIPv4:()=>hw,$ZodIPv6:()=>Aw,$ZodISODate:()=>pw,$ZodISODateTime:()=>dw,$ZodISODuration:()=>mw,$ZodISOTime:()=>gw,$ZodIntersection:()=>jw,$ZodJWT:()=>ww,$ZodKSUID:()=>uw,$ZodLazy:()=>aE,$ZodLiteral:()=>Hw,$ZodMAC:()=>fw,$ZodMap:()=>Fw,$ZodNaN:()=>tE,$ZodNanoID:()=>iw,$ZodNever:()=>_w,$ZodNonOptional:()=>Zw,$ZodNull:()=>Tw,$ZodNullable:()=>Yw,$ZodNumber:()=>Nh,$ZodNumberFormat:()=>kw,$ZodObject:()=>tU,$ZodObjectJIT:()=>Nw,$ZodOptional:()=>jh,$ZodPipe:()=>nE,$ZodPrefault:()=>Jw,$ZodPromise:()=>sE,$ZodReadonly:()=>oE,$ZodRealError:()=>zn,$ZodRecord:()=>Uw,$ZodRegistry:()=>ck,$ZodSet:()=>$w,$ZodString:()=>zs,$ZodStringFormat:()=>at,$ZodSuccess:()=>Xw,$ZodSymbol:()=>Pw,$ZodTemplateLiteral:()=>rE,$ZodTransform:()=>Vw,$ZodTuple:()=>zh,$ZodType:()=>xe,$ZodULID:()=>cw,$ZodURL:()=>ow,$ZodUUID:()=>tw,$ZodUndefined:()=>Rw,$ZodUnion:()=>Ld,$ZodUnknown:()=>Ow,$ZodVoid:()=>Dw,$ZodXID:()=>lw,$ZodXor:()=>Mw,$brand:()=>$C,$constructor:()=>R,$input:()=>ak,$output:()=>sk,Doc:()=>Bh,JSONSchema:()=>nF,JSONSchemaGenerator:()=>Ox,NEVER:()=>Sd,TimePrecision:()=>pk,_any:()=>_k,_array:()=>jk,_base64:()=>rA,_base64url:()=>iA,_bigint:()=>kk,_boolean:()=>wk,_catch:()=>eve,_check:()=>XU,_cidrv4:()=>nA,_cidrv6:()=>oA,_coercedBigint:()=>xk,_coercedBoolean:()=>Ek,_coercedDate:()=>Mk,_coercedNumber:()=>yk,_coercedString:()=>uk,_cuid:()=>Yh,_cuid2:()=>Wh,_custom:()=>Fk,_date:()=>Nk,_decode:()=>bh,_decodeAsync:()=>Sh,_default:()=>JCe,_discriminatedUnion:()=>zCe,_e164:()=>sA,_email:()=>Fh,_emoji:()=>Vh,_encode:()=>yh,_encodeAsync:()=>Ih,_endsWith:()=>Sc,_enum:()=>HCe,_file:()=>Uk,_float32:()=>Ik,_float64:()=>Sk,_gt:()=>gr,_gte:()=>xn,_guid:()=>$d,_includes:()=>bc,_int:()=>bk,_int32:()=>Ck,_int64:()=>Pk,_intersection:()=>jCe,_ipv4:()=>eA,_ipv6:()=>tA,_isoDate:()=>mk,_isoDateTime:()=>gk,_isoDuration:()=>Ak,_isoTime:()=>hk,_jwt:()=>aA,_ksuid:()=>Xh,_lazy:()=>rve,_length:()=>Fs,_literal:()=>VCe,_lowercase:()=>fc,_lt:()=>pr,_lte:()=>ro,_mac:()=>dk,_map:()=>$Ce,_max:()=>ro,_maxLength:()=>Us,_maxSize:()=>Oi,_mime:()=>Cc,_min:()=>xn,_minLength:()=>Yr,_minSize:()=>mr,_multipleOf:()=>Bi,_nan:()=>zk,_nanoid:()=>Kh,_nativeEnum:()=>qCe,_negative:()=>lA,_never:()=>Lk,_nonnegative:()=>dA,_nonoptional:()=>ZCe,_nonpositive:()=>uA,_normalize:()=>vc,_null:()=>Ok,_nullable:()=>WCe,_number:()=>fk,_optional:()=>YCe,_overwrite:()=>$o,_parse:()=>uc,_parseAsync:()=>dc,_pipe:()=>tve,_positive:()=>cA,_promise:()=>ive,_property:()=>pA,_readonly:()=>nve,_record:()=>FCe,_refine:()=>$k,_regex:()=>Ac,_safeDecode:()=>vh,_safeDecodeAsync:()=>Eh,_safeEncode:()=>Ch,_safeEncodeAsync:()=>wh,_safeParse:()=>pc,_safeParseAsync:()=>gc,_set:()=>GCe,_size:()=>js,_slugify:()=>xc,_startsWith:()=>Ic,_string:()=>lk,_stringFormat:()=>Pc,_stringbool:()=>Vk,_success:()=>XCe,_superRefine:()=>Gk,_symbol:()=>Tk,_templateLiteral:()=>ove,_toLowerCase:()=>Ec,_toUpperCase:()=>kc,_transform:()=>KCe,_trim:()=>wc,_tuple:()=>UCe,_uint32:()=>vk,_uint64:()=>Rk,_ulid:()=>Jh,_undefined:()=>Bk,_union:()=>NCe,_unknown:()=>Dk,_uppercase:()=>yc,_url:()=>Gd,_uuid:()=>$h,_uuidv4:()=>Gh,_uuidv6:()=>Hh,_uuidv7:()=>qh,_void:()=>Qk,_xid:()=>Zh,_xor:()=>MCe,clone:()=>kn,config:()=>Rt,createStandardJSONSchemaMethod:()=>Rc,createToJSONSchemaMethod:()=>Kk,decode:()=>cSe,decodeAsync:()=>uSe,describe:()=>Hk,encode:()=>aSe,encodeAsync:()=>lSe,extractDefs:()=>Di,finalize:()=>Li,flattenError:()=>Rd,formatError:()=>Td,globalConfig:()=>Id,globalRegistry:()=>en,initializeContext:()=>_i,isValidBase64:()=>Iw,isValidBase64URL:()=>Jj,isValidJWT:()=>Zj,locales:()=>Ud,meta:()=>qk,parse:()=>Ah,parseAsync:()=>fh,prettifyError:()=>ev,process:()=>Ze,regexes:()=>Co,registry:()=>Uh,safeDecode:()=>pSe,safeDecodeAsync:()=>mSe,safeEncode:()=>dSe,safeEncodeAsync:()=>gSe,safeParse:()=>nv,safeParseAsync:()=>ov,toDotPath:()=>_j,toJSONSchema:()=>AA,treeifyError:()=>XC,util:()=>J,version:()=>Jv});var io=h(()=>{ge();xh();ik();qd();tF();oF();sc();rv();tv();lE();Th();Zv();Fd();eF();Hd()});var fA={};cr(fA,{endsWith:()=>Sc,gt:()=>gr,gte:()=>xn,includes:()=>bc,length:()=>Fs,lowercase:()=>fc,lt:()=>pr,lte:()=>ro,maxLength:()=>Us,maxSize:()=>Oi,mime:()=>Cc,minLength:()=>Yr,minSize:()=>mr,multipleOf:()=>Bi,negative:()=>lA,nonnegative:()=>dA,nonpositive:()=>uA,normalize:()=>vc,overwrite:()=>$o,positive:()=>cA,property:()=>pA,regex:()=>Ac,size:()=>js,slugify:()=>xc,startsWith:()=>Ic,toLowerCase:()=>Ec,toUpperCase:()=>kc,trim:()=>wc,uppercase:()=>yc});var yA=h(()=>{io()});var Qi={};cr(Qi,{ZodISODate:()=>IA,ZodISODateTime:()=>bA,ZodISODuration:()=>CA,ZodISOTime:()=>SA,date:()=>Dx,datetime:()=>_x,duration:()=>Qx,time:()=>Lx});function _x(e){return gk(bA,e)}function Dx(e){return mk(IA,e)}function Lx(e){return hk(SA,e)}function Qx(e){return Ak(CA,e)}var bA,IA,SA,CA;var Vd=h(()=>{io();Yd();bA=R("ZodISODateTime",(e,t)=>{dw.init(e,t),ct.init(e,t)});IA=R("ZodISODate",(e,t)=>{pw.init(e,t),ct.init(e,t)});SA=R("ZodISOTime",(e,t)=>{gw.init(e,t),ct.init(e,t)});CA=R("ZodISODuration",(e,t)=>{mw.init(e,t),ct.init(e,t)})});var rF=(e,t)=>{Pd.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(n)=>Td(e,n)},flatten:{value:(n)=>Rd(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ac,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ac,2)}},isEmpty:{get(){return e.issues.length===0}}})},cve,jn;var Nx=h(()=>{io();io();ge();cve=R("ZodError",rF),jn=R("ZodError",rF,{Parent:Error})});var Mx,zx,jx,Ux,Fx,$x,Gx,Hx,qx,Vx,Kx,Yx;var Wx=h(()=>{io();Nx();Mx=uc(jn),zx=dc(jn),jx=pc(jn),Ux=gc(jn),Fx=yh(jn),$x=bh(jn),Gx=Ih(jn),Hx=Sh(jn),qx=Ch(jn),Vx=vh(jn),Kx=wh(jn),Yx=Eh(jn)});var Kd={};cr(Kd,{ZodAny:()=>tP,ZodArray:()=>iP,ZodBase64:()=>MA,ZodBase64URL:()=>zA,ZodBigInt:()=>Lc,ZodBigIntFormat:()=>FA,ZodBoolean:()=>Dc,ZodCIDRv4:()=>QA,ZodCIDRv6:()=>NA,ZodCUID:()=>RA,ZodCUID2:()=>TA,ZodCatch:()=>EP,ZodCodec:()=>YA,ZodCustom:()=>sp,ZodCustomStringFormat:()=>Oc,ZodDate:()=>tp,ZodDefault:()=>bP,ZodDiscriminatedUnion:()=>aP,ZodE164:()=>jA,ZodEmail:()=>EA,ZodEmoji:()=>xA,ZodEnum:()=>Tc,ZodExactOptional:()=>AP,ZodFile:()=>mP,ZodFunction:()=>DP,ZodGUID:()=>Wd,ZodIPv4:()=>DA,ZodIPv6:()=>LA,ZodIntersection:()=>cP,ZodJWT:()=>UA,ZodKSUID:()=>_A,ZodLazy:()=>BP,ZodLiteral:()=>gP,ZodMAC:()=>Jx,ZodMap:()=>dP,ZodNaN:()=>xP,ZodNanoID:()=>PA,ZodNever:()=>oP,ZodNonOptional:()=>VA,ZodNull:()=>eP,ZodNullable:()=>yP,ZodNumber:()=>_c,ZodNumberFormat:()=>$s,ZodObject:()=>np,ZodOptional:()=>qA,ZodPipe:()=>KA,ZodPrefault:()=>SP,ZodPromise:()=>_P,ZodReadonly:()=>PP,ZodRecord:()=>ip,ZodSet:()=>pP,ZodString:()=>Bc,ZodStringFormat:()=>ct,ZodSuccess:()=>wP,ZodSymbol:()=>Zx,ZodTemplateLiteral:()=>TP,ZodTransform:()=>hP,ZodTuple:()=>lP,ZodType:()=>_e,ZodULID:()=>BA,ZodURL:()=>Xd,ZodUUID:()=>hr,ZodUndefined:()=>Xx,ZodUnion:()=>op,ZodUnknown:()=>nP,ZodVoid:()=>rP,ZodXID:()=>OA,ZodXor:()=>sP,_ZodString:()=>wA,_default:()=>IP,_function:()=>r$,any:()=>$A,array:()=>ee,base64:()=>wF,base64url:()=>EF,bigint:()=>QF,boolean:()=>Xe,catch:()=>kP,check:()=>i$,cidrv4:()=>CF,cidrv6:()=>vF,codec:()=>t$,cuid:()=>mF,cuid2:()=>hF,custom:()=>WA,date:()=>FF,describe:()=>s$,discriminatedUnion:()=>rp,e164:()=>kF,email:()=>iF,emoji:()=>pF,enum:()=>tn,exactOptional:()=>fP,file:()=>JF,float32:()=>OF,float64:()=>_F,function:()=>r$,guid:()=>sF,hash:()=>BF,hex:()=>TF,hostname:()=>RF,httpUrl:()=>dF,instanceof:()=>c$,int:()=>vA,int32:()=>DF,int64:()=>NF,intersection:()=>Qc,ipv4:()=>bF,ipv6:()=>SF,json:()=>u$,jwt:()=>xF,keyof:()=>$F,ksuid:()=>yF,lazy:()=>OP,literal:()=>ue,looseObject:()=>Tt,looseRecord:()=>VF,mac:()=>IF,map:()=>KF,meta:()=>a$,nan:()=>e$,nanoid:()=>gF,nativeEnum:()=>WF,never:()=>GA,nonoptional:()=>vP,null:()=>ep,nullable:()=>Jd,nullish:()=>ZF,number:()=>je,object:()=>ne,optional:()=>pt,partialRecord:()=>qF,pipe:()=>Zd,prefault:()=>CP,preprocess:()=>ap,promise:()=>o$,readonly:()=>RP,record:()=>tt,refine:()=>LP,set:()=>YF,strictObject:()=>GF,string:()=>k,stringFormat:()=>PF,stringbool:()=>l$,success:()=>XF,superRefine:()=>QP,symbol:()=>zF,templateLiteral:()=>n$,transform:()=>HA,tuple:()=>uP,uint32:()=>LF,uint64:()=>MF,ulid:()=>AF,undefined:()=>jF,union:()=>ut,unknown:()=>lt,url:()=>kA,uuid:()=>aF,uuidv4:()=>cF,uuidv6:()=>lF,uuidv7:()=>uF,void:()=>UF,xid:()=>fF,xor:()=>HF});function k(e){return lk(Bc,e)}function iF(e){return Fh(EA,e)}function sF(e){return $d(Wd,e)}function aF(e){return $h(hr,e)}function cF(e){return Gh(hr,e)}function lF(e){return Hh(hr,e)}function uF(e){return qh(hr,e)}function kA(e){return Gd(Xd,e)}function dF(e){return Gd(Xd,{protocol:/^https?$/,hostname:Co.domain,...J.normalizeParams(e)})}function pF(e){return Vh(xA,e)}function gF(e){return Kh(PA,e)}function mF(e){return Yh(RA,e)}function hF(e){return Wh(TA,e)}function AF(e){return Jh(BA,e)}function fF(e){return Zh(OA,e)}function yF(e){return Xh(_A,e)}function bF(e){return eA(DA,e)}function IF(e){return dk(Jx,e)}function SF(e){return tA(LA,e)}function CF(e){return nA(QA,e)}function vF(e){return oA(NA,e)}function wF(e){return rA(MA,e)}function EF(e){return iA(zA,e)}function kF(e){return sA(jA,e)}function xF(e){return aA(UA,e)}function PF(e,t,n={}){return Pc(Oc,e,t,n)}function RF(e){return Pc(Oc,"hostname",Co.hostname,e)}function TF(e){return Pc(Oc,"hex",Co.hex,e)}function BF(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=Co[r];if(!o)throw Error(`Unrecognized hash format: ${r}`);return Pc(Oc,r,o,t)}function je(e){return fk(_c,e)}function vA(e){return bk($s,e)}function OF(e){return Ik($s,e)}function _F(e){return Sk($s,e)}function DF(e){return Ck($s,e)}function LF(e){return vk($s,e)}function Xe(e){return wk(Dc,e)}function QF(e){return kk(Lc,e)}function NF(e){return Pk(FA,e)}function MF(e){return Rk(FA,e)}function zF(e){return Tk(Zx,e)}function jF(e){return Bk(Xx,e)}function ep(e){return Ok(eP,e)}function $A(){return _k(tP)}function lt(){return Dk(nP)}function GA(e){return Lk(oP,e)}function UF(e){return Qk(rP,e)}function FF(e){return Nk(tp,e)}function ee(e,t){return jk(iP,e,t)}function $F(e){let t=e._zod.def.shape;return tn(Object.keys(t))}function ne(e,t){let n={type:"object",shape:e??{},...J.normalizeParams(t)};return new np(n)}function GF(e,t){return new np({type:"object",shape:e,catchall:GA(),...J.normalizeParams(t)})}function Tt(e,t){return new np({type:"object",shape:e,catchall:lt(),...J.normalizeParams(t)})}function ut(e,t){return new op({type:"union",options:e,...J.normalizeParams(t)})}function HF(e,t){return new sP({type:"union",options:e,inclusive:!1,...J.normalizeParams(t)})}function rp(e,t,n){return new aP({type:"union",options:t,discriminator:e,...J.normalizeParams(n)})}function Qc(e,t){return new cP({type:"intersection",left:e,right:t})}function uP(e,t,n){let r=t instanceof xe,o=r?n:t;return new lP({type:"tuple",items:e,rest:r?t:null,...J.normalizeParams(o)})}function tt(e,t,n){return new ip({type:"record",keyType:e,valueType:t,...J.normalizeParams(n)})}function qF(e,t,n){let r=kn(e);return r._zod.values=void 0,new ip({type:"record",keyType:r,valueType:t,...J.normalizeParams(n)})}function VF(e,t,n){return new ip({type:"record",keyType:e,valueType:t,mode:"loose",...J.normalizeParams(n)})}function KF(e,t,n){return new dP({type:"map",keyType:e,valueType:t,...J.normalizeParams(n)})}function YF(e,t){return new pP({type:"set",valueType:e,...J.normalizeParams(t)})}function tn(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map((r)=>[r,r])):e;return new Tc({type:"enum",entries:n,...J.normalizeParams(t)})}function WF(e,t){return new Tc({type:"enum",entries:e,...J.normalizeParams(t)})}function ue(e,t){return new gP({type:"literal",values:Array.isArray(e)?e:[e],...J.normalizeParams(t)})}function JF(e){return Uk(mP,e)}function HA(e){return new hP({type:"transform",transform:e})}function pt(e){return new qA({type:"optional",innerType:e})}function fP(e){return new AP({type:"optional",innerType:e})}function Jd(e){return new yP({type:"nullable",innerType:e})}function ZF(e){return pt(Jd(e))}function IP(e,t){return new bP({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():J.shallowClone(t)}})}function CP(e,t){return new SP({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():J.shallowClone(t)}})}function vP(e,t){return new VA({type:"nonoptional",innerType:e,...J.normalizeParams(t)})}function XF(e){return new wP({type:"success",innerType:e})}function kP(e,t){return new EP({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}function e$(e){return zk(xP,e)}function Zd(e,t){return new KA({type:"pipe",in:e,out:t})}function t$(e,t,n){return new YA({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function RP(e){return new PP({type:"readonly",innerType:e})}function n$(e,t){return new TP({type:"template_literal",parts:e,...J.normalizeParams(t)})}function OP(e){return new BP({type:"lazy",getter:e})}function o$(e){return new _P({type:"promise",innerType:e})}function r$(e){return new DP({type:"function",input:Array.isArray(e?.input)?uP(e?.input):e?.input??ee(lt()),output:e?.output??lt()})}function i$(e){let t=new dt({check:"custom"});return t._zod.check=e,t}function WA(e,t){return Fk(sp,e??(()=>!0),t)}function LP(e,t={}){return $k(sp,e,t)}function QP(e){return Gk(e)}function c$(e,t={}){let n=new sp({type:"custom",check:"custom",fn:(r)=>r instanceof e,abort:!0,...J.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=(r)=>{if(!(r.value instanceof e))r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function u$(e){let t=OP(()=>ut([k(e),je(),Xe(),ep(),ee(t),tt(k(),t)]));return t}function ap(e,t){return Zd(HA(e),t)}var _e,wA,Bc,ct,EA,Wd,hr,Xd,xA,PA,RA,TA,BA,OA,_A,DA,Jx,LA,QA,NA,MA,zA,jA,UA,Oc,_c,$s,Dc,Lc,FA,Zx,Xx,eP,tP,nP,oP,rP,tp,iP,np,op,sP,aP,cP,lP,ip,dP,pP,Tc,gP,mP,hP,qA,AP,yP,bP,SP,VA,wP,EP,xP,KA,YA,PP,TP,BP,_P,DP,sp,s$,a$,l$=(...e)=>Vk({Codec:YA,Boolean:Dc,String:Bc},...e);var Yd=h(()=>{io();io();qd();Hd();yA();Vd();Wx();_e=R("ZodType",(e,t)=>(xe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Rc(e,"input"),output:Rc(e,"output")}}),e.toJSONSchema=Kk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(J.mergeDefs(t,{checks:[...t.checks??[],...n.map((r)=>typeof r==="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>kn(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>Mx(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>jx(e,n,r),e.parseAsync=async(n,r)=>zx(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Ux(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Fx(e,n,r),e.decode=(n,r)=>$x(e,n,r),e.encodeAsync=async(n,r)=>Gx(e,n,r),e.decodeAsync=async(n,r)=>Hx(e,n,r),e.safeEncode=(n,r)=>qx(e,n,r),e.safeDecode=(n,r)=>Vx(e,n,r),e.safeEncodeAsync=async(n,r)=>Kx(e,n,r),e.safeDecodeAsync=async(n,r)=>Yx(e,n,r),e.refine=(n,r)=>e.check(LP(n,r)),e.superRefine=(n)=>e.check(QP(n)),e.overwrite=(n)=>e.check($o(n)),e.optional=()=>pt(e),e.exactOptional=()=>fP(e),e.nullable=()=>Jd(e),e.nullish=()=>pt(Jd(e)),e.nonoptional=(n)=>vP(e,n),e.array=()=>ee(e),e.or=(n)=>ut([e,n]),e.and=(n)=>Qc(e,n),e.transform=(n)=>Zd(e,HA(n)),e.default=(n)=>IP(e,n),e.prefault=(n)=>CP(e,n),e.catch=(n)=>kP(e,n),e.pipe=(n)=>Zd(e,n),e.readonly=()=>RP(e),e.describe=(n)=>{let r=e.clone();return en.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return en.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return en.get(e);let r=e.clone();return en.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=(n)=>n(e),e)),wA=R("_ZodString",(e,t)=>{zs.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Yk(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Ac(...r)),e.includes=(...r)=>e.check(bc(...r)),e.startsWith=(...r)=>e.check(Ic(...r)),e.endsWith=(...r)=>e.check(Sc(...r)),e.min=(...r)=>e.check(Yr(...r)),e.max=(...r)=>e.check(Us(...r)),e.length=(...r)=>e.check(Fs(...r)),e.nonempty=(...r)=>e.check(Yr(1,...r)),e.lowercase=(r)=>e.check(fc(r)),e.uppercase=(r)=>e.check(yc(r)),e.trim=()=>e.check(wc()),e.normalize=(...r)=>e.check(vc(...r)),e.toLowerCase=()=>e.check(Ec()),e.toUpperCase=()=>e.check(kc()),e.slugify=()=>e.check(xc())}),Bc=R("ZodString",(e,t)=>{zs.init(e,t),wA.init(e,t),e.email=(n)=>e.check(Fh(EA,n)),e.url=(n)=>e.check(Gd(Xd,n)),e.jwt=(n)=>e.check(aA(UA,n)),e.emoji=(n)=>e.check(Vh(xA,n)),e.guid=(n)=>e.check($d(Wd,n)),e.uuid=(n)=>e.check($h(hr,n)),e.uuidv4=(n)=>e.check(Gh(hr,n)),e.uuidv6=(n)=>e.check(Hh(hr,n)),e.uuidv7=(n)=>e.check(qh(hr,n)),e.nanoid=(n)=>e.check(Kh(PA,n)),e.guid=(n)=>e.check($d(Wd,n)),e.cuid=(n)=>e.check(Yh(RA,n)),e.cuid2=(n)=>e.check(Wh(TA,n)),e.ulid=(n)=>e.check(Jh(BA,n)),e.base64=(n)=>e.check(rA(MA,n)),e.base64url=(n)=>e.check(iA(zA,n)),e.xid=(n)=>e.check(Zh(OA,n)),e.ksuid=(n)=>e.check(Xh(_A,n)),e.ipv4=(n)=>e.check(eA(DA,n)),e.ipv6=(n)=>e.check(tA(LA,n)),e.cidrv4=(n)=>e.check(nA(QA,n)),e.cidrv6=(n)=>e.check(oA(NA,n)),e.e164=(n)=>e.check(sA(jA,n)),e.datetime=(n)=>e.check(_x(n)),e.date=(n)=>e.check(Dx(n)),e.time=(n)=>e.check(Lx(n)),e.duration=(n)=>e.check(Qx(n))});ct=R("ZodStringFormat",(e,t)=>{at.init(e,t),wA.init(e,t)}),EA=R("ZodEmail",(e,t)=>{nw.init(e,t),ct.init(e,t)});Wd=R("ZodGUID",(e,t)=>{ew.init(e,t),ct.init(e,t)});hr=R("ZodUUID",(e,t)=>{tw.init(e,t),ct.init(e,t)});Xd=R("ZodURL",(e,t)=>{ow.init(e,t),ct.init(e,t)});xA=R("ZodEmoji",(e,t)=>{rw.init(e,t),ct.init(e,t)});PA=R("ZodNanoID",(e,t)=>{iw.init(e,t),ct.init(e,t)});RA=R("ZodCUID",(e,t)=>{sw.init(e,t),ct.init(e,t)});TA=R("ZodCUID2",(e,t)=>{aw.init(e,t),ct.init(e,t)});BA=R("ZodULID",(e,t)=>{cw.init(e,t),ct.init(e,t)});OA=R("ZodXID",(e,t)=>{lw.init(e,t),ct.init(e,t)});_A=R("ZodKSUID",(e,t)=>{uw.init(e,t),ct.init(e,t)});DA=R("ZodIPv4",(e,t)=>{hw.init(e,t),ct.init(e,t)});Jx=R("ZodMAC",(e,t)=>{fw.init(e,t),ct.init(e,t)});LA=R("ZodIPv6",(e,t)=>{Aw.init(e,t),ct.init(e,t)});QA=R("ZodCIDRv4",(e,t)=>{yw.init(e,t),ct.init(e,t)});NA=R("ZodCIDRv6",(e,t)=>{bw.init(e,t),ct.init(e,t)});MA=R("ZodBase64",(e,t)=>{Sw.init(e,t),ct.init(e,t)});zA=R("ZodBase64URL",(e,t)=>{Cw.init(e,t),ct.init(e,t)});jA=R("ZodE164",(e,t)=>{vw.init(e,t),ct.init(e,t)});UA=R("ZodJWT",(e,t)=>{ww.init(e,t),ct.init(e,t)});Oc=R("ZodCustomStringFormat",(e,t)=>{Ew.init(e,t),ct.init(e,t)});_c=R("ZodNumber",(e,t)=>{Nh.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Wk(e,r,o,i),e.gt=(r,o)=>e.check(gr(r,o)),e.gte=(r,o)=>e.check(xn(r,o)),e.min=(r,o)=>e.check(xn(r,o)),e.lt=(r,o)=>e.check(pr(r,o)),e.lte=(r,o)=>e.check(ro(r,o)),e.max=(r,o)=>e.check(ro(r,o)),e.int=(r)=>e.check(vA(r)),e.safe=(r)=>e.check(vA(r)),e.positive=(r)=>e.check(gr(0,r)),e.nonnegative=(r)=>e.check(xn(0,r)),e.negative=(r)=>e.check(pr(0,r)),e.nonpositive=(r)=>e.check(ro(0,r)),e.multipleOf=(r,o)=>e.check(Bi(r,o)),e.step=(r,o)=>e.check(Bi(r,o)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});$s=R("ZodNumberFormat",(e,t)=>{kw.init(e,t),_c.init(e,t)});Dc=R("ZodBoolean",(e,t)=>{Dd.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jk(e,n,r,o)});Lc=R("ZodBigInt",(e,t)=>{Mh.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Zk(e,r,o,i),e.gte=(r,o)=>e.check(xn(r,o)),e.min=(r,o)=>e.check(xn(r,o)),e.gt=(r,o)=>e.check(gr(r,o)),e.gte=(r,o)=>e.check(xn(r,o)),e.min=(r,o)=>e.check(xn(r,o)),e.lt=(r,o)=>e.check(pr(r,o)),e.lte=(r,o)=>e.check(ro(r,o)),e.max=(r,o)=>e.check(ro(r,o)),e.positive=(r)=>e.check(gr(BigInt(0),r)),e.negative=(r)=>e.check(pr(BigInt(0),r)),e.nonpositive=(r)=>e.check(ro(BigInt(0),r)),e.nonnegative=(r)=>e.check(xn(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(Bi(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});FA=R("ZodBigIntFormat",(e,t)=>{xw.init(e,t),Lc.init(e,t)});Zx=R("ZodSymbol",(e,t)=>{Pw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xk(e,n,r,o)});Xx=R("ZodUndefined",(e,t)=>{Rw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tx(e,n,r,o)});eP=R("ZodNull",(e,t)=>{Tw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ex(e,n,r,o)});tP=R("ZodAny",(e,t)=>{Bw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rx(e,n,r,o)});nP=R("ZodUnknown",(e,t)=>{Ow.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ix(e,n,r,o)});oP=R("ZodNever",(e,t)=>{_w.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ox(e,n,r,o)});rP=R("ZodVoid",(e,t)=>{Dw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nx(e,n,r,o)});tp=R("ZodDate",(e,t)=>{Lw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>sx(e,r,o,i),e.min=(r,o)=>e.check(xn(r,o)),e.max=(r,o)=>e.check(ro(r,o));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});iP=R("ZodArray",(e,t)=>{Qw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yx(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Yr(n,r)),e.nonempty=(n)=>e.check(Yr(1,n)),e.max=(n,r)=>e.check(Us(n,r)),e.length=(n,r)=>e.check(Fs(n,r)),e.unwrap=()=>e.element});np=R("ZodObject",(e,t)=>{Nw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bx(e,n,r,o),J.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>tn(Object.keys(e._zod.def.shape)),e.catchall=(n)=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:lt()}),e.loose=()=>e.clone({...e._zod.def,catchall:lt()}),e.strict=()=>e.clone({...e._zod.def,catchall:GA()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=(n)=>J.extend(e,n),e.safeExtend=(n)=>J.safeExtend(e,n),e.merge=(n)=>J.merge(e,n),e.pick=(n)=>J.pick(e,n),e.omit=(n)=>J.omit(e,n),e.partial=(...n)=>J.partial(qA,e,n[0]),e.required=(...n)=>J.required(VA,e,n[0])});op=R("ZodUnion",(e,t)=>{Ld.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mA(e,n,r,o),e.options=t.options});sP=R("ZodXor",(e,t)=>{op.init(e,t),Mw.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mA(e,n,r,o),e.options=t.options});aP=R("ZodDiscriminatedUnion",(e,t)=>{op.init(e,t),zw.init(e,t)});cP=R("ZodIntersection",(e,t)=>{jw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ix(e,n,r,o)});lP=R("ZodTuple",(e,t)=>{zh.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Sx(e,n,r,o),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});ip=R("ZodRecord",(e,t)=>{Uw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cx(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});dP=R("ZodMap",(e,t)=>{Fw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ax(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(mr(...n)),e.nonempty=(n)=>e.check(mr(1,n)),e.max=(...n)=>e.check(Oi(...n)),e.size=(...n)=>e.check(js(...n))});pP=R("ZodSet",(e,t)=>{$w.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fx(e,n,r,o),e.min=(...n)=>e.check(mr(...n)),e.nonempty=(n)=>e.check(mr(1,n)),e.max=(...n)=>e.check(Oi(...n)),e.size=(...n)=>e.check(js(...n))});Tc=R("ZodEnum",(e,t)=>{Gw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>ax(e,r,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new Tc({...t,checks:[],...J.normalizeParams(o),entries:i})},e.exclude=(r,o)=>{let i={...t.entries};for(let s of r)if(n.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new Tc({...t,checks:[],...J.normalizeParams(o),entries:i})}});gP=R("ZodLiteral",(e,t)=>{Hw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cx(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});mP=R("ZodFile",(e,t)=>{qw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dx(e,n,r,o),e.min=(n,r)=>e.check(mr(n,r)),e.max=(n,r)=>e.check(Oi(n,r)),e.mime=(n,r)=>e.check(Cc(Array.isArray(n)?n:[n],r))});hP=R("ZodTransform",(e,t)=>{Vw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hx(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Qs(e.constructor.name);n.addIssue=(i)=>{if(typeof i==="string")n.issues.push(J.issue(i,n.value,t));else{let s=i;if(s.fatal)s.continue=!1;s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(J.issue(s))}};let o=t.transform(n.value,n);if(o instanceof Promise)return o.then((i)=>(n.value=i,n));return n.value=o,n}});qA=R("ZodOptional",(e,t)=>{jh.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hA(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});AP=R("ZodExactOptional",(e,t)=>{Kw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hA(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});yP=R("ZodNullable",(e,t)=>{Yw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});bP=R("ZodDefault",(e,t)=>{Ww.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ex(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});SP=R("ZodPrefault",(e,t)=>{Jw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});VA=R("ZodNonOptional",(e,t)=>{Zw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});wP=R("ZodSuccess",(e,t)=>{Xw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>px(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});EP=R("ZodCatch",(e,t)=>{eE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});xP=R("ZodNaN",(e,t)=>{tE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lx(e,n,r,o)});KA=R("ZodPipe",(e,t)=>{nE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Px(e,n,r,o),e.in=t.in,e.out=t.out});YA=R("ZodCodec",(e,t)=>{KA.init(e,t),Qd.init(e,t)});PP=R("ZodReadonly",(e,t)=>{oE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});TP=R("ZodTemplateLiteral",(e,t)=>{rE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ux(e,n,r,o)});BP=R("ZodLazy",(e,t)=>{aE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bx(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});_P=R("ZodPromise",(e,t)=>{sE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Tx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});DP=R("ZodFunction",(e,t)=>{iE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mx(e,n,r,o)});sp=R("ZodCustom",(e,t)=>{cE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gx(e,n,r,o)});s$=Hk,a$=qk});function uve(e){Rt({customError:e})}function dve(){return Rt().customError}var MP,NP;var d$=h(()=>{io();MP={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};(function(e){})(NP||(NP={}))});function gve(e,t){let n=e.$schema;if(n==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(n==="http://json-schema.org/draft-07/schema#")return"draft-7";if(n==="http://json-schema.org/draft-04/schema#")return"draft-4";return t??"draft-2020-12"}function mve(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let o=n[1];if(!o||!t.defs[o])throw Error(`Reference not found: ${e}`);return t.defs[o]}throw Error(`Reference not found: ${e}`)}function p$(e,t){if(e.not!==void 0){if(typeof e.not==="object"&&Object.keys(e.not).length===0)return ie.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return ie.lazy(()=>{if(!t.refs.has(o))throw Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=mve(o,t),s=An(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return ie.null();if(o.length===0)return ie.never();if(o.length===1)return ie.literal(o[0]);if(o.every((s)=>typeof s==="string"))return ie.enum(o);let i=o.map((s)=>ie.literal(s));if(i.length<2)return i[0];return ie.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ie.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map((i)=>{let s={...e,type:i};return p$(s,t)});if(o.length===0)return ie.never();if(o.length===1)return o[0];return ie.union(o)}if(!n)return ie.any();let r;switch(n){case"string":{let o=ie.string();if(e.format){let i=e.format;if(i==="email")o=o.check(ie.email());else if(i==="uri"||i==="uri-reference")o=o.check(ie.url());else if(i==="uuid"||i==="guid")o=o.check(ie.uuid());else if(i==="date-time")o=o.check(ie.iso.datetime());else if(i==="date")o=o.check(ie.iso.date());else if(i==="time")o=o.check(ie.iso.time());else if(i==="duration")o=o.check(ie.iso.duration());else if(i==="ipv4")o=o.check(ie.ipv4());else if(i==="ipv6")o=o.check(ie.ipv6());else if(i==="mac")o=o.check(ie.mac());else if(i==="cidr")o=o.check(ie.cidrv4());else if(i==="cidr-v6")o=o.check(ie.cidrv6());else if(i==="base64")o=o.check(ie.base64());else if(i==="base64url")o=o.check(ie.base64url());else if(i==="e164")o=o.check(ie.e164());else if(i==="jwt")o=o.check(ie.jwt());else if(i==="emoji")o=o.check(ie.emoji());else if(i==="nanoid")o=o.check(ie.nanoid());else if(i==="cuid")o=o.check(ie.cuid());else if(i==="cuid2")o=o.check(ie.cuid2());else if(i==="ulid")o=o.check(ie.ulid());else if(i==="xid")o=o.check(ie.xid());else if(i==="ksuid")o=o.check(ie.ksuid())}if(typeof e.minLength==="number")o=o.min(e.minLength);if(typeof e.maxLength==="number")o=o.max(e.maxLength);if(e.pattern)o=o.regex(new RegExp(e.pattern));r=o;break}case"number":case"integer":{let o=n==="integer"?ie.number().int():ie.number();if(typeof e.minimum==="number")o=o.min(e.minimum);if(typeof e.maximum==="number")o=o.max(e.maximum);if(typeof e.exclusiveMinimum==="number")o=o.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum==="number")o=o.gt(e.minimum);if(typeof e.exclusiveMaximum==="number")o=o.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum==="number")o=o.lt(e.maximum);if(typeof e.multipleOf==="number")o=o.multipleOf(e.multipleOf);r=o;break}case"boolean":{r=ie.boolean();break}case"null":{r=ie.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[l,u]of Object.entries(i)){let d=An(u,t);o[l]=s.has(l)?d:d.optional()}if(e.propertyNames){let l=An(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties==="object"?An(e.additionalProperties,t):ie.any();if(Object.keys(o).length===0){r=ie.record(l,u);break}let d=ie.object(o).passthrough(),p=ie.looseRecord(l,u);r=ie.intersection(d,p);break}if(e.patternProperties){let l=e.patternProperties,u=Object.keys(l),d=[];for(let g of u){let m=An(l[g],t),A=ie.string().regex(new RegExp(g));d.push(ie.looseRecord(A,m))}let p=[];if(Object.keys(o).length>0)p.push(ie.object(o).passthrough());if(p.push(...d),p.length===0)r=ie.object({}).passthrough();else if(p.length===1)r=p[0];else{let g=ie.intersection(p[0],p[1]);for(let m=2;m<p.length;m++)g=ie.intersection(g,p[m]);r=g}break}let c=ie.object(o);if(e.additionalProperties===!1)r=c.strict();else if(typeof e.additionalProperties==="object")r=c.catchall(An(e.additionalProperties,t));else r=c.passthrough();break}case"array":{let{prefixItems:o,items:i}=e;if(o&&Array.isArray(o)){let s=o.map((l)=>An(l,t)),c=i&&typeof i==="object"&&!Array.isArray(i)?An(i,t):void 0;if(c)r=ie.tuple(s).rest(c);else r=ie.tuple(s);if(typeof e.minItems==="number")r=r.check(ie.minLength(e.minItems));if(typeof e.maxItems==="number")r=r.check(ie.maxLength(e.maxItems))}else if(Array.isArray(i)){let s=i.map((l)=>An(l,t)),c=e.additionalItems&&typeof e.additionalItems==="object"?An(e.additionalItems,t):void 0;if(c)r=ie.tuple(s).rest(c);else r=ie.tuple(s);if(typeof e.minItems==="number")r=r.check(ie.minLength(e.minItems));if(typeof e.maxItems==="number")r=r.check(ie.maxLength(e.maxItems))}else if(i!==void 0){let s=An(i,t),c=ie.array(s);if(typeof e.minItems==="number")c=c.min(e.minItems);if(typeof e.maxItems==="number")c=c.max(e.maxItems);r=c}else r=ie.array(ie.any());break}default:throw Error(`Unsupported type: ${n}`)}if(e.description)r=r.describe(e.description);if(e.default!==void 0)r=r.default(e.default);return r}function An(e,t){if(typeof e==="boolean")return e?ie.any():ie.never();let n=p$(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map((u)=>An(u,t)),l=ie.union(c);n=r?ie.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map((u)=>An(u,t)),l=ie.xor(c);n=r?ie.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:ie.any();else{let c=r?n:An(e.allOf[0],t),l=r?0:1;for(let u=l;u<e.allOf.length;u++)c=ie.intersection(c,An(e.allOf[u],t));n=c}if(e.nullable===!0&&t.version==="openapi-3.0")n=ie.nullable(n);if(e.readOnly===!0)n=ie.readonly(n);let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)if(c in e)o[c]=e[c];let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)if(c in e)o[c]=e[c];for(let c of Object.keys(e))if(!pve.has(c))o[c]=e[c];if(Object.keys(o).length>0)t.registry.add(n,o);return n}function g$(e,t){if(typeof e==="boolean")return e?ie.any():ie.never();let n=gve(e,t?.defaultTarget),r=e.$defs||e.definitions||{},o={version:n,defs:r,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??en};return An(e,o)}var ie,pve;var m$=h(()=>{Fd();yA();Vd();Yd();ie={...Kd,...fA,iso:Qi},pve=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var cp={};cr(cp,{bigint:()=>yve,boolean:()=>fve,date:()=>bve,number:()=>Ave,string:()=>hve});function hve(e){return uk(Bc,e)}function Ave(e){return yk(_c,e)}function fve(e){return Ek(Dc,e)}function yve(e){return xk(Lc,e)}function bve(e){return Mk(tp,e)}var h$=h(()=>{io();Yd()});var a={};cr(a,{$brand:()=>$C,$input:()=>ak,$output:()=>sk,NEVER:()=>Sd,TimePrecision:()=>pk,ZodAny:()=>tP,ZodArray:()=>iP,ZodBase64:()=>MA,ZodBase64URL:()=>zA,ZodBigInt:()=>Lc,ZodBigIntFormat:()=>FA,ZodBoolean:()=>Dc,ZodCIDRv4:()=>QA,ZodCIDRv6:()=>NA,ZodCUID:()=>RA,ZodCUID2:()=>TA,ZodCatch:()=>EP,ZodCodec:()=>YA,ZodCustom:()=>sp,ZodCustomStringFormat:()=>Oc,ZodDate:()=>tp,ZodDefault:()=>bP,ZodDiscriminatedUnion:()=>aP,ZodE164:()=>jA,ZodEmail:()=>EA,ZodEmoji:()=>xA,ZodEnum:()=>Tc,ZodError:()=>cve,ZodExactOptional:()=>AP,ZodFile:()=>mP,ZodFirstPartyTypeKind:()=>NP,ZodFunction:()=>DP,ZodGUID:()=>Wd,ZodIPv4:()=>DA,ZodIPv6:()=>LA,ZodISODate:()=>IA,ZodISODateTime:()=>bA,ZodISODuration:()=>CA,ZodISOTime:()=>SA,ZodIntersection:()=>cP,ZodIssueCode:()=>MP,ZodJWT:()=>UA,ZodKSUID:()=>_A,ZodLazy:()=>BP,ZodLiteral:()=>gP,ZodMAC:()=>Jx,ZodMap:()=>dP,ZodNaN:()=>xP,ZodNanoID:()=>PA,ZodNever:()=>oP,ZodNonOptional:()=>VA,ZodNull:()=>eP,ZodNullable:()=>yP,ZodNumber:()=>_c,ZodNumberFormat:()=>$s,ZodObject:()=>np,ZodOptional:()=>qA,ZodPipe:()=>KA,ZodPrefault:()=>SP,ZodPromise:()=>_P,ZodReadonly:()=>PP,ZodRealError:()=>jn,ZodRecord:()=>ip,ZodSet:()=>pP,ZodString:()=>Bc,ZodStringFormat:()=>ct,ZodSuccess:()=>wP,ZodSymbol:()=>Zx,ZodTemplateLiteral:()=>TP,ZodTransform:()=>hP,ZodTuple:()=>lP,ZodType:()=>_e,ZodULID:()=>BA,ZodURL:()=>Xd,ZodUUID:()=>hr,ZodUndefined:()=>Xx,ZodUnion:()=>op,ZodUnknown:()=>nP,ZodVoid:()=>rP,ZodXID:()=>OA,ZodXor:()=>sP,_ZodString:()=>wA,_default:()=>IP,_function:()=>r$,any:()=>$A,array:()=>ee,base64:()=>wF,base64url:()=>EF,bigint:()=>QF,boolean:()=>Xe,catch:()=>kP,check:()=>i$,cidrv4:()=>CF,cidrv6:()=>vF,clone:()=>kn,codec:()=>t$,coerce:()=>cp,config:()=>Rt,core:()=>Wr,cuid:()=>mF,cuid2:()=>hF,custom:()=>WA,date:()=>FF,decode:()=>$x,decodeAsync:()=>Hx,describe:()=>s$,discriminatedUnion:()=>rp,e164:()=>kF,email:()=>iF,emoji:()=>pF,encode:()=>Fx,encodeAsync:()=>Gx,endsWith:()=>Sc,enum:()=>tn,exactOptional:()=>fP,file:()=>JF,flattenError:()=>Rd,float32:()=>OF,float64:()=>_F,formatError:()=>Td,fromJSONSchema:()=>g$,function:()=>r$,getErrorMap:()=>dve,globalRegistry:()=>en,gt:()=>gr,gte:()=>xn,guid:()=>sF,hash:()=>BF,hex:()=>TF,hostname:()=>RF,httpUrl:()=>dF,includes:()=>bc,instanceof:()=>c$,int:()=>vA,int32:()=>DF,int64:()=>NF,intersection:()=>Qc,ipv4:()=>bF,ipv6:()=>SF,iso:()=>Qi,json:()=>u$,jwt:()=>xF,keyof:()=>$F,ksuid:()=>yF,lazy:()=>OP,length:()=>Fs,literal:()=>ue,locales:()=>Ud,looseObject:()=>Tt,looseRecord:()=>VF,lowercase:()=>fc,lt:()=>pr,lte:()=>ro,mac:()=>IF,map:()=>KF,maxLength:()=>Us,maxSize:()=>Oi,meta:()=>a$,mime:()=>Cc,minLength:()=>Yr,minSize:()=>mr,multipleOf:()=>Bi,nan:()=>e$,nanoid:()=>gF,nativeEnum:()=>WF,negative:()=>lA,never:()=>GA,nonnegative:()=>dA,nonoptional:()=>vP,nonpositive:()=>uA,normalize:()=>vc,null:()=>ep,nullable:()=>Jd,nullish:()=>ZF,number:()=>je,object:()=>ne,optional:()=>pt,overwrite:()=>$o,parse:()=>Mx,parseAsync:()=>zx,partialRecord:()=>qF,pipe:()=>Zd,positive:()=>cA,prefault:()=>CP,preprocess:()=>ap,prettifyError:()=>ev,promise:()=>o$,property:()=>pA,readonly:()=>RP,record:()=>tt,refine:()=>LP,regex:()=>Ac,regexes:()=>Co,registry:()=>Uh,safeDecode:()=>Vx,safeDecodeAsync:()=>Yx,safeEncode:()=>qx,safeEncodeAsync:()=>Kx,safeParse:()=>jx,safeParseAsync:()=>Ux,set:()=>YF,setErrorMap:()=>uve,size:()=>js,slugify:()=>xc,startsWith:()=>Ic,strictObject:()=>GF,string:()=>k,stringFormat:()=>PF,stringbool:()=>l$,success:()=>XF,superRefine:()=>QP,symbol:()=>zF,templateLiteral:()=>n$,toJSONSchema:()=>AA,toLowerCase:()=>Ec,toUpperCase:()=>kc,transform:()=>HA,treeifyError:()=>XC,trim:()=>wc,tuple:()=>uP,uint32:()=>LF,uint64:()=>MF,ulid:()=>AF,undefined:()=>jF,union:()=>ut,unknown:()=>lt,uppercase:()=>yc,url:()=>kA,util:()=>J,uuid:()=>aF,uuidv4:()=>cF,uuidv6:()=>lF,uuidv7:()=>uF,void:()=>UF,xid:()=>fF,xor:()=>HF});var JA=h(()=>{io();io();yE();io();qd();m$();ik();Vd();Vd();h$();Yd();yA();Nx();Wx();d$();Rt(Nd())});var De=h(()=>{JA();JA()});var A$,f$,y$,b$,I$,S$,C$,v$,w$,E$,k$,x$,P$,zP,Ive,jP,R$,Sve,UP="cursor",FP="GET",$P="control",GP="[DONE]";var T$=h(()=>{De();A$=a.object({type:a.literal("run_started"),runId:a.string().describe("Server-assigned run ID for the started run.")}),f$=a.object({type:a.literal("message_started"),messageId:a.string().describe("Server-assigned assistant message ID for this run.")}),y$=a.object({type:a.literal("text_chunk"),messageId:a.string().describe("Assistant message the chunk belongs to."),content:a.string().describe("Incremental text delta to append.")}),b$=a.object({type:a.literal("reasoning_chunk"),messageId:a.string().describe("Assistant message the chunk belongs to."),content:a.string().describe("Incremental reasoning delta to append.")}),I$=a.object({type:a.literal("text_complete"),messageId:a.string().describe("Assistant message that completed."),content:a.string().describe("Full assistant text for the message.")}),S$=a.object({type:a.literal("reasoning_complete"),messageId:a.string().describe("Assistant message that completed."),content:a.string().describe("Full reasoning text for the message.")}),C$=a.object({type:a.literal("tool_call_pending"),toolCallId:a.string().describe("Stable identifier for the tool call."),name:a.string().describe("Name of the tool being called.")}),v$=a.object({type:a.literal("tool_call_start"),toolCallId:a.string().describe("Stable identifier for the tool call."),name:a.string().describe("Name of the tool being called."),params:a.unknown().describe("Resolved tool input params.")}),w$=a.object({type:a.literal("tool_call_complete"),toolCallId:a.string().describe("Stable identifier for the tool call."),status:a.enum(["in_progress","success","error"]).describe("Terminal (or transitional) status of the tool call."),result:a.unknown().optional().describe("Tool output, when available."),durationMs:a.number().nonnegative().optional().describe("Authoritative server-measured tool execution time in ms.")}),E$=a.object({type:a.literal("artifact"),name:a.string().describe("Artifact kind (for example table, timeseries)."),data:a.unknown().describe("Artifact payload; shape depends on name."),toolCallId:a.string().describe("Tool call that produced the artifact.")}),k$=a.object({type:a.literal("error"),message:a.string().describe("Human-readable error message."),name:a.string().optional().describe("Optional error class/name.")}),x$=a.object({type:a.literal("stream_reset"),messageId:a.string().describe("Assistant message whose content to reset.")}),P$=a.object({type:a.literal("disconnected")}),zP=a.discriminatedUnion("type",[A$,f$,y$,b$,I$,S$,C$,v$,w$,E$,k$,x$,P$]),Ive=a.enum(["run_started","message_started","text_chunk","reasoning_chunk","text_complete","reasoning_complete","tool_call_pending","tool_call_start","tool_call_complete","artifact","error","stream_reset","disconnected"]),jP=a.object({streamNextOffset:a.string().describe("Opaque resume cursor for the next unread event; pass back as the stream 'cursor' query param.")}),R$=a.string().describe("Opaque resume cursor from a prior control frame's streamNextOffset."),Sve=a.object({cursor:R$.optional().describe("Resume the stream after this offset. Omit to start from the beginning of the retained buffer.")})});var w=(e)=>{let t={operationId:e.operationId,backend:e.backend,pagination:e.pagination,async:e.async,examples:e.examples??[]};return{...e,contract:Sj.$meta(t).route({method:e.route.method,path:e.route.path,tags:e.route.tags,operationId:e.operationId,summary:e.summary,description:e.description,successStatus:e.route.successStatus,successDescription:e.route.successDescription,deprecated:e.route.deprecated,inputStructure:e.route.inputStructure}).input(e.input).output(e.output)}};var B$=h(()=>{zC()});var O$=h(()=>{B$()});var Ve=h(()=>{O$()});var up,D$,L$,Q$,N$,M$,z$,j$,U$,F$,Cve,$$,Nc,HP,vve,wve,G$,H$,ZA,XA,Mc,ef,tf,q$,V$,nf,Eve,K$,Y$,W$,KP,J$,Z$,X$,of,rf,dp,e1,qP,t1,pp,YP,n1,o1,kve,xve,WP,r1,i1,s1,a1,c1,l1,u1,JP,sf,af,cf,lf,ZP,d1,VP,lp,XP,Pve,uf,p1,g1,m1,h1,_$,A1,f1,y1,df,pf,b1,eR,I1,S1,C1,v1,w1,gf,mf,Rve;var tR=h(()=>{De();Ve();up=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),origin:a.enum(["user_declared","code_detected","log_observed"]),lifecycle:a.enum(["active","inactive","merged"]),observationState:a.enum(["observed","stale","unobserved"]),registryRevision:a.number().int().nonnegative(),canonicalComponentId:a.string().uuid(),mergedIntoComponentId:a.string().uuid().nullable(),currentStatus:a.enum(["operational","degraded","outage"]).describe("Current health status of this component."),firstSeenAt:a.string().datetime(),lastSeenAt:a.string().datetime(),deletedAt:a.string().datetime().nullable().describe("Timestamp when this component became inactive or was deleted, if any."),inactiveAt:a.string().datetime().nullable().describe("Timestamp when this component became inactive, if any."),inactiveReason:a.string().nullable().describe("Reason recorded when this component became inactive."),legacyStateUnknown:a.boolean().describe("True only for migration-era inactive rows whose deactivation authority is unknown.")}),D$=a.object({projectId:a.string().uuid().optional().describe("Project to list components for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of components to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),includeDeleted:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, include inactive and merged components.")}),L$=a.object({components:a.array(up),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Q$=a.object({componentId:a.string().uuid().describe("Component ID to retrieve.")}),N$=a.object({component:up}),M$=a.object({projectId:a.string().uuid().optional().describe("Project to register the component in. Auto-filled from CLI and SDK context when omitted."),name:a.string().trim().min(1,"Name is required").describe("Evidence-backed component name to register."),description:a.string().trim().min(1,"Description cannot be empty").optional().describe("Optional component description."),requestId:a.string().uuid().optional().describe("Project-scoped idempotency key. Reuse only for an identical registration request."),origin:a.enum(["code_detected","log_observed"]).optional().describe("Machine provenance of this registration: 'code_detected' when the component was inferred from repository or code analysis, 'log_observed' (the default) when inferred from telemetry. Only applies to machine (secret-key) callers; human registrations are always recorded as 'user_declared' and ignore this field.")}),z$=a.object({component:up}),j$=a.object({componentId:a.string().uuid().describe("Active component ID to rename."),name:a.string().trim().min(1,"Name is required"),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact rename."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for renaming the component.")}),U$=a.object({component:up}),F$=a.object({componentId:a.string().uuid().describe("Component ID to deregister."),reason:a.string().trim().min(1,"Reason cannot be empty").optional().describe("Reason for audit logging. Required when confirming a deregistration."),requestId:a.string().uuid().optional().describe("Project-scoped idempotency key. Required when confirming a deregistration."),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()).optional().describe("Exact canonical-group revisions returned by the deregistration preview. Presence confirms the deregistration; omit to receive a preview."),confirmCanonicalGroup:a.boolean().default(!1).describe("Explicitly confirm deregistering the complete canonical group when the request used a merged source.")}),Cve=a.object({openIssueIds:a.array(a.string().uuid()),activeComponentIssueIds:a.array(a.string().uuid()),automationBindingIds:a.array(a.string().uuid()),notificationRuleIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),observationIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid()),externalIncidentIds:a.array(a.string().uuid()),authorizedDeliveryIds:a.array(a.string().uuid()),authorizedAutomationRunIds:a.array(a.string().uuid())}),$$=a.object({requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),canonicalComponentName:a.string(),lifecycle:a.enum(["active","inactive"]),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),requiresCanonicalGroupConfirmation:a.boolean(),recommendationScopeEnabled:a.literal(!1),dependents:Cve,counts:a.record(a.string(),a.number().int().nonnegative())}),Nc=a.record(a.string().uuid(),a.number().int().nonnegative()),HP=a.object({id:a.string().uuid(),rowRevision:a.number().int().nonnegative()}),vve=a.object({notificationRules:a.array(HP),automationBindings:a.array(HP),relationships:a.array(HP)}),wve=a.object({componentId:a.string().uuid().describe("Component or merged-source ID confirmed by the preview."),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact deregistration."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for deregistering the component."),componentRevisions:Nc.describe("Exact canonical-group revisions returned by the deregistration preview."),confirmCanonicalGroup:a.boolean().default(!1).describe("Explicitly confirm deregistering the complete canonical group when the request used a merged source.")}),G$=a.object({operationId:a.string().uuid(),status:a.enum(["committed","complete","followup_failed"]),requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),counts:a.record(a.string(),a.number().int().nonnegative()),authorizedDeliveryIds:a.array(a.string().uuid()),authorizedAutomationRunIds:a.array(a.string().uuid()),manualExternalIncidentIds:a.array(a.string().uuid()),issueAutomationSuppressions:a.number().int().nonnegative(),outboxEffectCount:a.number().int().nonnegative(),manifest:vve,followups:a.record(a.string(),a.unknown()).optional()}),H$=a.discriminatedUnion("status",[a.object({status:a.literal("observation_withdrawn"),componentId:a.string().uuid(),sourceType:a.literal("secret_key"),withdrawn:a.boolean()}),a.object({status:a.literal("deregistration_confirmation_required"),preview:$$}),a.object({status:a.literal("deregistered"),result:G$})]),ZA=w({operationId:"components.list",description:"List status page components in a project.",backend:"api",route:{method:"GET",path:"/components",tags:["Components"]},input:D$,output:L$,pagination:"cursor",async:"sync"}),XA=w({operationId:"components.get",description:"Get a single component by ID.",backend:"api",route:{method:"GET",path:"/components/{componentId}",tags:["Components"]},input:Q$,output:N$,pagination:"none",async:"sync"}),Mc=w({operationId:"components.register",description:"Register a status page component in a project, or refresh an existing active component with the same name.",backend:"api",route:{method:"POST",path:"/components",tags:["Components"]},input:M$,output:z$,pagination:"none",async:"sync"}),ef=w({operationId:"components.deregister",description:"Withdraw this credential's component observation, or — for a human caller — preview the deregistration and confirm it by resubmitting with the previewed componentRevisions.",backend:"api",route:{method:"POST",path:"/components/{componentId}/deregister",tags:["Components"]},input:F$,output:H$,pagination:"none",async:"sync"}),tf=w({operationId:"components.rename",description:"Rename an active component while reserving its previous exact name as an alias.",backend:"api",route:{method:"POST",path:"/components/{componentId}/rename",tags:["Components"]},input:j$,output:U$,pagination:"none",async:"sync"}),q$=a.object({componentId:a.string().uuid().describe("Component whose owning team to set."),teamId:a.string().uuid().nullable().describe("Team to assign as owner, or null to unassign.")}),V$=a.object({componentId:a.string().uuid().describe("Component that was updated."),teamId:a.string().uuid().nullable().describe("Owning team after the update, or null when unassigned.")}),nf=w({operationId:"components.assignTeam",description:"Assign a component to an owning team, reassign it, or unassign it. A component is owned by at most one team.",backend:"api",route:{method:"PUT",path:"/components/{componentId}/team",tags:["Components"]},input:q$,output:V$,pagination:"none",async:"sync"}),Eve=a.object({notificationRuleIds:a.array(a.string().uuid()),automationBindingIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid())}),K$=a.object({componentId:a.string().uuid().describe("Inactive component or merged-source ID to inspect."),deregistrationOperationId:a.string().uuid().optional().describe("Optional deregistration operation to verify; defaults to the component's current deregistration.")}),Y$=a.object({requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),canonicalComponentName:a.string(),deregistrationOperationId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:Nc,eligible:Eve}),W$=a.object({preview:Y$}),KP=a.object({notificationRuleIds:a.array(a.string().uuid()).default([]),automationBindingIds:a.array(a.string().uuid()).default([]),recommendationScopeIds:a.array(a.string().uuid()).default([]),relationshipIds:a.array(a.string().uuid()).default([])}),J$=a.object({componentId:a.string().uuid().describe("Inactive component or merged-source ID confirmed by preview."),deregistrationOperationId:a.string().uuid().describe("Deregistration operation whose unchanged dependents may be reactivated."),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact reactivation."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for reactivating the component."),componentRevisions:Nc.describe("Exact canonical-group revisions returned by the reactivation preview."),selections:KP.default({notificationRuleIds:[],automationBindingIds:[],recommendationScopeIds:[],relationshipIds:[]}).describe("Only these still-eligible dependents are reattached; omitted selections reattach none.")}),Z$=a.object({operationId:a.string().uuid(),status:a.literal("complete"),requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),reactivated:KP}),X$=a.object({result:Z$}),of=w({operationId:"components.reactivationPreview",description:"Preview unchanged deregistration-owned dependents that remain eligible for explicit reactivation.",backend:"api",route:{method:"POST",path:"/components/{componentId}/reactivation/preview",tags:["Components"]},input:K$,output:W$,pagination:"none",async:"sync"}),rf=w({operationId:"components.reactivate",description:"Reactivate an inactive canonical component and only the explicitly selected eligible dependents. Prior rules, automations, and relationships stay detached unless explicitly selected.",backend:"api",route:{method:"POST",path:"/components/{componentId}/reactivate",tags:["Components"]},input:J$,output:X$,pagination:"none",async:"sync"}),dp=a.enum(["part_of","depends_on"]).describe("Relationship semantics: part_of is an acyclic child-to-parent edge; depends_on may be cyclic."),e1=a.enum(["observed","stale","unobserved"]),qP=a.object({originalComponentId:a.string().uuid(),effectiveComponentId:a.string().uuid(),name:a.string(),lifecycle:a.enum(["active","inactive","merged"]),observationState:e1}),t1=a.object({id:a.string().uuid(),source:qP,target:qP,relationshipType:dp,createdAt:a.string().datetime(),endedAt:a.string().datetime().nullable(),endReason:a.string().nullable(),rowRevision:a.number().int().nonnegative()}),pp=a.object({projectId:a.string().uuid().optional().describe("Project containing the component topology. Auto-filled from CLI and SDK context when omitted.")}),YP=a.object({sourceComponentId:a.string().uuid().describe("Child or dependency-source component ID."),targetComponentId:a.string().uuid().describe("Parent or dependency-target component ID."),relationshipType:dp}),n1=pp.extend({includeHistorical:a.union([a.boolean(),a.stringbool()]).default(!1).describe("Include historically ended relationships.")}),o1=a.object({relationships:a.array(t1)}),kve=a.object({ruleId:a.string().uuid(),ruleGroupId:a.string().uuid().nullable(),ownerComponentId:a.string().uuid(),destinationIds:a.array(a.string().uuid()),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),xve=a.object({bindingId:a.string().uuid(),automationId:a.string().uuid(),ownerComponentId:a.string().uuid(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),WP=a.object({notificationRules:a.array(kve),automationBindings:a.array(xve)}),r1=YP.extend({action:a.enum(["add","remove"]),organizationId:a.string(),projectId:a.string().uuid(),relationshipId:a.string().uuid().nullable(),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),policyImpact:WP,confirmationRequired:a.boolean()}),i1=pp.merge(YP).extend({action:a.enum(["add","remove"]).describe("Topology mutation to preview without changing the graph.")}),s1=a.object({preview:r1}),a1=pp.merge(YP).extend({requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact mutation."),reason:a.string().trim().min(1,"Reason cannot be empty"),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),confirmPolicyImpact:a.boolean().default(!1).describe("Confirm the descendant-scoped notification and automation changes shown by preview.")}),c1=a1,l1=a1,u1=a.object({action:a.enum(["add","remove"]),relationshipId:a.string().uuid(),sourceComponentId:a.string().uuid(),targetComponentId:a.string().uuid(),relationshipType:dp,policyImpact:WP}),JP=a.object({result:u1}),sf=w({operationId:"components.relationships.list",description:"List active or historical component topology edges.",backend:"api",route:{method:"GET",path:"/components/relationships",tags:["Components"]},input:n1,output:o1,pagination:"none",async:"sync"}),af=w({operationId:"components.relationships.preview",description:"Preview descendant-scoped notification and automation impact for a topology change.",backend:"api",route:{method:"POST",path:"/components/relationships/preview",tags:["Components"]},input:i1,output:s1,pagination:"none",async:"sync"}),cf=w({operationId:"components.relationships.add",description:"Add a confirmed, tenant-safe component topology edge.",backend:"api",route:{method:"POST",path:"/components/relationships",tags:["Components"]},input:c1,output:JP,pagination:"none",async:"sync"}),lf=w({operationId:"components.relationships.remove",description:"Historically end a confirmed component topology edge.",backend:"api",route:{method:"POST",path:"/components/relationships/remove",tags:["Components"]},input:l1,output:JP,pagination:"none",async:"sync"}),ZP=a.enum(["suspend","move"]),d1=a.object({disposition:ZP,beforeComponentIds:a.array(a.string().uuid()).describe("Exact effective component set returned by mergePreview."),afterComponentIds:a.array(a.string().uuid()).describe("Exact effective component set that ownership would have on the target.")}),VP=a.object({kind:a.enum(["notification_rule","automation_binding"]),policyId:a.string().uuid(),sourceRowRevision:a.number().int().nonnegative(),sourceComponentId:a.string().uuid(),equivalentPolicyId:a.string().uuid().nullable(),equivalent:a.boolean(),defaultDisposition:a.enum(["deduplicate","suspend"]),allowedDispositions:a.array(ZP),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),lp=a.object({kind:a.enum(["notification_rule","automation_binding"]),policyId:a.string().uuid(),ownerComponentId:a.string().uuid(),rowRevision:a.number().int().nonnegative(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),XP=a.object({relationshipId:a.string().uuid(),action:a.enum(["rewire","close_self","close_duplicate"]),relationshipType:dp,beforeSourceComponentId:a.string().uuid(),beforeTargetComponentId:a.string().uuid(),afterSourceComponentId:a.string().uuid(),afterTargetComponentId:a.string().uuid(),survivingRelationshipId:a.string().uuid().nullable(),beforeRowRevision:a.number().int().nonnegative(),afterRowRevision:a.number().int().nonnegative().nullable()}),Pve=a.object({openIssueIds:a.array(a.string().uuid()),componentIssueIds:a.array(a.string().uuid()),observationIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),nameIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid())}),uf=a.object({sourceComponentId:a.string().uuid().describe("Active or inactive component whose independent grain is removed."),targetComponentId:a.string().uuid().describe("Active terminal component that becomes the canonical target.")}),p1=pp.merge(uf),g1=uf.extend({organizationId:a.string(),projectId:a.string().uuid(),sourceGroupComponentIds:a.array(a.string().uuid()),targetGroupComponentIds:a.array(a.string().uuid()),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:Nc,inventory:Pve,notificationPolicies:a.array(VP),automationBindings:a.array(VP),notificationScopeChanges:a.array(lp),automationScopeChanges:a.array(lp),relationshipChanges:a.array(XP),recommendationScopeEnabled:a.literal(!1),dependentCount:a.number().int().nonnegative(),ordinaryTransactionLimit:a.number().int().positive(),operatorAssistanceRequired:a.boolean(),confirmationRequired:a.boolean()}),m1=a.object({preview:g1}),h1=pp.merge(uf).extend({requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact consolidation."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for consolidation."),componentRevisions:Nc.describe("Exact canonical-group revisions returned by mergePreview."),policyDispositions:a.record(a.string().uuid(),d1).describe("Exactly one disposition for every non-equivalent source policy; each repeats the previewed effective sets."),confirmPolicyImpact:a.boolean().default(!1).describe("Explicitly acknowledge every before/after policy scope change shown by mergePreview.")}),_$=a.object({policyId:a.string().uuid(),action:a.enum(["deduplicated","suspended","moved"]),equivalentPolicyId:a.string().uuid().nullable(),beforeRowRevision:a.number().int().nonnegative(),afterRowRevision:a.number().int().nonnegative(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),A1=a.object({componentRevisions:Nc,redirectedComponentIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),movedAliasIds:a.array(a.string().uuid()),historicalDisplayIds:a.array(a.string().uuid()),relationshipChanges:a.array(XP),notificationPolicies:a.array(_$),automationBindings:a.array(_$),notificationScopeChanges:a.array(lp),automationScopeChanges:a.array(lp),recommendationScopeIds:a.array(a.string().uuid())}),f1=uf.extend({operationId:a.string().uuid(),status:a.literal("complete"),affectedComponentIds:a.array(a.string().uuid()),manifest:A1}),y1=a.object({result:f1}),df=w({operationId:"components.mergePreview",description:"Preview one-hop redirects, historical preservation, operational rebinding, topology contraction, and policy dispositions for component consolidation.",backend:"api",route:{method:"POST",path:"/components/merge/preview",tags:["Components"]},input:p1,output:m1,pagination:"none",async:"sync"}),pf=w({operationId:"components.merge",description:"Consolidate a source into an active terminal target without rewriting historical issue or observation attribution.",backend:"api",route:{method:"POST",path:"/components/merge",tags:["Components"]},input:h1,output:y1,pagination:"none",async:"sync"}),b1=a.enum(["degraded","outage"]).describe("Severity of a status-page incident. 'outage' marks the component down; 'degraded' marks partial impact."),eR=a.object({id:a.string().uuid(),componentId:a.string().uuid(),projectId:a.string().uuid(),severity:b1,summary:a.string().describe("Human-readable summary of the status-page issue."),startedAt:a.string().datetime().describe("When the incident began affecting the component."),resolvedAt:a.string().datetime().nullable().describe("When the incident was resolved, or null while ongoing.")}),I1=a.object({projectId:a.string().uuid().optional().describe("Project to list status-page issues for. Auto-filled from CLI and SDK context when omitted."),componentId:a.string().uuid().optional().describe("Restrict results to a single component."),activeOnly:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, return only unresolved (ongoing) issues."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),S1=a.object({incidents:a.array(eR),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),C1=a.object({timestamp:a.string().datetime(),status:a.enum(["operational","degraded","outage","unknown"]).describe("Worst component status observed during this timeline bucket.")}),v1=a.object({componentId:a.string().uuid().describe("Component to build the timeline for."),windowStart:a.string().datetime({offset:!0}).optional().describe("Start of the timeline window. Defaults to 7 days before windowEnd."),windowEnd:a.string().datetime({offset:!0}).optional().describe("End of the timeline window. Defaults to now.")}),w1=a.object({componentId:a.string().uuid(),windowStart:a.string().datetime(),windowEnd:a.string().datetime(),timeline:a.array(C1),incidents:a.array(eR)}),gf=w({operationId:"components.incidents.list",description:"List status-page issues in a project.",backend:"api",route:{method:"GET",path:"/status-incidents",tags:["Components"]},input:I1,output:S1,pagination:"cursor",async:"sync"}),mf=w({operationId:"components.timeline",description:"Get the dense status timeline and incidents for a component over a time window.",backend:"api",route:{method:"GET",path:"/components/{componentId}/timeline",tags:["Components"]},input:v1,output:w1,pagination:"none",async:"sync"}),Rve={list:ZA.contract,get:XA.contract,register:Mc.contract,deregister:ef.contract,rename:tf.contract,assignTeam:nf.contract,reactivationPreview:of.contract,reactivate:rf.contract,mergePreview:df.contract,merge:pf.contract,relationships:{list:sf.contract,preview:af.contract,add:cf.contract,remove:lf.contract},incidents:{list:gf.contract},timeline:mf.contract}});var hf,nR,E1,k1,oR,x1,P1,R1,rR,T1,B1,O1,iR,_1,D1,sR;var aR=h(()=>{De();Ve();hf=["github","google","microsoft","linear","bitbucket","slack"],nR=a.enum(hf),E1=a.object({organizationId:a.string().min(1).optional().describe("Organization to connect within. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:nR.describe("Connected-account provider to connect.")}),k1=a.object({url:a.string().describe("Vendor authorization URL to open in a browser signed into the Sazabi dashboard as the same user."),attemptId:a.string().uuid().describe("Connect attempt to poll via `connectedAccounts.getConnectAttempt` while the browser flow completes."),expiresAt:a.string().datetime().describe("When the attempt expires if the browser flow never completes.")}),oR=w({operationId:"connectedAccounts.beginConnect",description:"Begin a browser connect flow for a connected-account provider. Returns a vendor URL to open in a browser and an attempt to poll; the vendor exchange completes server-side and no token ever reaches the caller.",backend:"api",route:{method:"POST",path:"/connected-accounts/connect",tags:["Connected Accounts"],successStatus:201},input:E1,output:k1,pagination:"none",async:"sync"}),x1=a.enum(["pending","completed","failed","expired"]),P1=a.object({organizationId:a.string().min(1).optional().describe("Organization the attempt belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),attemptId:a.string().uuid().describe("Connect attempt ID to poll.")}),R1=a.object({status:x1.describe("Attempt state. `expired` means the browser flow did not complete in time — begin a new connect."),errorCode:a.string().nullable().describe("Reason code when status is `failed` (the shared OAuth callback vocabulary, e.g. vendor_denied, not_authorized).")}),rR=w({operationId:"connectedAccounts.getConnectAttempt",description:"Poll a browser connect attempt started with `connectedAccounts.beginConnect`. Visible only to the user who began it.",backend:"api",route:{method:"GET",path:"/connected-accounts/connect/attempts/{attemptId}",tags:["Connected Accounts"]},input:P1,output:R1,pagination:"none",async:"sync"}),T1=a.object({organizationId:a.string().min(1).optional().describe("Organization to list accounts for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),B1=a.object({provider:a.string().describe("Provider identifier."),externalName:a.string().nullable().describe("Display name from the provider."),externalLogin:a.string().nullable().describe("Username or login from the provider."),connectedAt:a.string().datetime().nullable().describe("When the account was connected."),authMode:a.enum(["oauth","pat"]).nullable().describe("Auth mode used."),needsReconnect:a.boolean().describe("Whether the token is expired and a reconnect is required.")}),O1=a.object({accounts:a.array(B1)}),iR=w({operationId:"connectedAccounts.list",description:"List the calling user's connected accounts for the organization.",backend:"api",route:{method:"GET",path:"/connected-accounts",tags:["Connected Accounts"]},input:T1,output:O1,pagination:"none",async:"sync"}),_1=a.object({organizationId:a.string().min(1).optional().describe("Organization the account belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:nR.describe("Provider to disconnect.")}),D1=a.object({success:a.literal(!0)}),sR=w({operationId:"connectedAccounts.disconnect",description:"Disconnect the calling user's connected account for a provider (soft delete).",backend:"api",route:{method:"DELETE",path:"/connected-accounts/{provider}",tags:["Connected Accounts"]},input:_1,output:D1,pagination:"none",async:"sync"})});var Gs,cR,L1,Q1,Tve,Bve,Ove,N1,gp,_ve,Dve,Lve,Qve,Nve,Mve,zve,jve,Uve,Fve,$ve,Gve,lR,uR,dR,pR,gR,mR,Hve,qve,Vve,Kve,hR,AR,Yve,Wve,Jve,Zve,fR,Agt;var M1=h(()=>{De();Ve();Gs=a.string().uuid().describe("Automation ID."),cR=a.enum(["running","succeeded","failed","timed_out","cancelled"]),L1=a.object({id:a.string().uuid(),automationRunKey:a.string(),status:cR,startedAt:a.string().datetime(),completedAt:a.string().datetime().nullable(),durationMs:a.number().int().nullable(),exitCode:a.number().int().nullable()}),Q1=L1.extend({scheduledAt:a.string().datetime().nullable().describe("When the run was scheduled to start, if known."),dueAt:a.string().datetime().nullable().describe("When the run became due, if known."),errorMessage:a.string().nullable().describe("Failure detail for the run, if it failed or timed out.")}),Tve=Q1.extend({automationId:a.string().uuid().describe("Automation that owns this run.")}),Bve=a.enum(["script","log_match"]),Ove=a.enum(["expression_matched"]),N1=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),kind:Bve.describe("Automation kind: a scheduled script or a log-match investigation."),scriptId:a.string().uuid().nullable().describe("ID of the project_scripts row this automation runs, for DB-backed script automations. Null for legacy script_path automations and for log-match automations."),scriptName:a.string().nullable().describe("Name of the project_scripts row this automation runs (see scriptId). Null when scriptId is null."),signalDefinitionId:a.string().uuid().nullable().describe("Signal definition bound to this automation. Null for script automations."),signalType:Ove.nullable().describe("Signal trigger type for log-match automations. Null for script automations."),source:a.enum(["sazabi_managed","custom"]).describe("Whether the automation is Sazabi-managed or customer-defined."),enabled:a.boolean(),cronExpression:a.string().nullable().describe("Cron schedule for scheduled automations. Null for signal automations."),timezone:a.string(),timeoutSeconds:a.number().int().nullable(),health:a.enum(["healthy","failing","never_run"]).describe("Health derived from the most recent run."),lastRun:L1.nullable(),successRate:a.number().nullable().describe("Fraction of terminal runs that succeeded over the last 7 days."),runCount:a.number().int().describe("Total runs over the last 7 days."),failedRunCount:a.number().int().describe("Failed or timed-out runs over the last 7 days.")}),gp=N1.extend({createdAt:a.string().datetime(),updatedAt:a.string().datetime(),recordedHistoryStartsAt:a.string().datetime().describe("Earliest timestamp for which run history is recorded."),scriptIdentifier:a.string().nullable().describe("Relative project script path executed by the automation. Null for signal automations."),canToggle:a.boolean().describe("Whether the caller may enable or disable this automation.")}),_ve=a.object({projectId:a.string().uuid().optional().describe("Project to list automations for. Auto-filled from CLI and SDK context when omitted."),search:a.string().optional().describe("Case-insensitive partial match on automation name."),status:a.enum(["active","paused"]).optional().describe("Filter by enabled (active) or disabled (paused) automations."),health:a.enum(["healthy","failing","never_run"]).optional().describe("Filter by automation health."),source:a.enum(["sazabi_managed","custom"]).optional().describe("Filter by automation source."),sort:a.enum(["name","last_run","failures","runs"]).default("name").describe("Sort order for the returned automations."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of automations to return per page."),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Dve=a.object({automations:a.array(N1),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Lve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Qve=a.object({automation:gp}),Nve=a.object({projectId:a.string().uuid().optional().describe("Project to create the automation in. Auto-filled from CLI and SDK context when omitted."),name:a.string().min(1).max(200).describe("Automation name."),description:a.string().max(2000).nullable().optional().describe("Human-readable description. Required for log-match automations (investigation instructions)."),scriptId:a.string().uuid().optional().describe("Project script to run, by ID. Provide exactly one of scriptId, script, or expressionId."),script:a.string().optional().describe("Project script to run, by name (resolved to scriptId server-side). Provide exactly one of scriptId, script, or expressionId."),expressionId:a.string().uuid().optional().describe("Log-match expression to bind. Creates a signal automation that investigates matching logs. Mutually exclusive with scriptId and script."),cronExpression:a.string().optional().describe("Cron schedule for the automation. Defaults to every minute when omitted."),timezone:a.string().optional().describe("IANA timezone for cronExpression. Defaults to UTC."),timeoutSeconds:a.coerce.number().int().min(1).max(3600).optional().describe("Execution timeout in seconds. Defaults to 60."),enabled:a.boolean().optional().describe("Whether the automation starts enabled. Defaults to true.")}).superRefine((e,t)=>{let n=e.scriptId!=null,r=e.script!=null,o=e.expressionId!=null;if(Number(n)+Number(r)+Number(o)!==1){t.addIssue({code:"custom",message:"Provide exactly one of scriptId, script, or expressionId.",path:["scriptId"]});return}if(o){if(e.cronExpression!=null)t.addIssue({code:"custom",message:"cronExpression is not used for log-match automations.",path:["cronExpression"]});if(e.timezone!=null)t.addIssue({code:"custom",message:"timezone is not used for log-match automations.",path:["timezone"]});if(e.timeoutSeconds!=null)t.addIssue({code:"custom",message:"timeoutSeconds is not used for log-match automations.",path:["timeoutSeconds"]});if(!e.description?.trim())t.addIssue({code:"custom",message:"description is required for log-match automations (investigation instructions).",path:["description"]})}}),Mve=a.object({automation:gp}),zve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted."),name:a.string().min(1).max(200).optional().describe("New automation name."),description:a.string().max(2000).nullable().optional().describe("New description, or null to clear it. Omit to leave unchanged."),cronExpression:a.string().optional().describe("New cron schedule."),timezone:a.string().optional().describe("New IANA timezone."),timeoutSeconds:a.coerce.number().int().min(1).max(3600).optional().describe("New execution timeout in seconds.")}),jve=a.object({automation:gp}),Uve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Fve=a.object({automation:gp}),$ve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Gve=a.object({automation:gp}),lR=w({operationId:"automations.list",description:"List scheduled automations in a project, with run health and recent run stats.",backend:"api",route:{method:"GET",path:"/automations",tags:["Automations"]},input:_ve,output:Dve,pagination:"cursor",async:"sync"}),uR=w({operationId:"automations.get",description:"Get a single automation by ID.",backend:"api",route:{method:"GET",path:"/automations/{automationId}",tags:["Automations"]},input:Lve,output:Qve,pagination:"none",async:"sync"}),dR=w({operationId:"automations.create",description:"Create an automation: either a cron-driven project script (see scripts.create) or a signal investigation bound to a signal definition (see signalDefinitions.create).",backend:"api",route:{method:"POST",path:"/automations",successStatus:201,tags:["Automations"]},input:Nve,output:Mve,pagination:"none",async:"sync"}),pR=w({operationId:"automations.update",description:"Update an automation's name, description, or schedule. Does not change which script it runs.",backend:"api",route:{method:"PATCH",path:"/automations/{automationId}",tags:["Automations"]},input:zve,output:jve,pagination:"none",async:"sync"}),gR=w({operationId:"automations.enable",description:"Enable an automation so it runs on its schedule.",backend:"api",route:{method:"POST",path:"/automations/{automationId}/enable",tags:["Automations"]},input:Uve,output:Fve,pagination:"none",async:"sync"}),mR=w({operationId:"automations.disable",description:"Disable an automation so it stops running on its schedule.",backend:"api",route:{method:"POST",path:"/automations/{automationId}/disable",tags:["Automations"]},input:$ve,output:Gve,pagination:"none",async:"sync"}),Hve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted."),status:a.union([cR,a.array(cR)]).optional().describe("Filter runs by status. Accepts a single status or an array of statuses (matched as OR)."),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page.")}),qve=a.object({runs:a.array(Q1),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results."),recordedHistoryStartsAt:a.string().datetime().describe("Earliest timestamp for which run history is recorded.")}),Vve=a.object({automationId:Gs,runId:a.string().uuid().describe("Automation run ID."),projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Kve=a.object({run:Tve}),hR=w({operationId:"automations.runs.list",description:"List runs for an automation, most recent first.",backend:"api",route:{method:"GET",path:"/automations/{automationId}/runs",tags:["Automations"]},input:Hve,output:qve,pagination:"cursor",async:"sync"}),AR=w({operationId:"automations.runs.get",description:"Get a single automation run by ID.",backend:"api",route:{method:"GET",path:"/automations/{automationId}/runs/{runId}",tags:["Automations"]},input:Vve,output:Kve,pagination:"none",async:"sync"}),Yve=a.enum(["queued","running","succeeded","failed","timed_out"]),Wve=a.object({stdout:a.string().describe("Captured standard output for the run."),stderr:a.string().describe("Captured standard error for the run."),exitCode:a.number().int().nullable().describe("Process exit code of the run's command, if it finished."),status:Yve.describe("Execution status of the run's captured command."),truncated:a.boolean().describe("Whether the captured output exceeded the inline preview limit. The full output is returned when it could be read from durable storage; otherwise the truncated preview is returned with this flag set."),startedAt:a.string().datetime().nullable().describe("When the command started executing, if known."),completedAt:a.string().datetime().nullable().describe("When the command finished executing, if known."),durationMs:a.number().int().nullable().describe("Command execution duration in milliseconds, if known.")}),Jve=a.object({automationId:Gs,runId:a.string().uuid().describe("Automation run ID."),projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Zve=a.object({logs:Wve}),fR=w({operationId:"automations.runs.logs",description:"Get the captured stdout/stderr for a single automation run, reading the full output from durable storage when the inline preview was truncated.",backend:"api",route:{method:"GET",path:"/automations/{automationId}/runs/{runId}/logs",tags:["Automations"]},input:Jve,output:Zve,pagination:"none",async:"sync"}),Agt={list:lR.contract,get:uR.contract,create:dR.contract,update:pR.contract,enable:gR.contract,disable:mR.contract,runs:{list:hR.contract,get:AR.contract,logs:fR.contract}}});var z1,Xve,ewe,twe,j1,nwe,Af,owe,rwe,U1,iwe,swe,awe,cwe,lwe,uwe,dwe,bR,IR,SR,Go,F1,yR,CR,pwe,$1,gwe,mwe,hwe,Awe,fwe,ywe,bwe,Iwe,Swe,Cwe,vwe,wwe,Ewe,kwe,xwe,Pwe,Rwe,Twe,Bwe,vR,G1,Owe,_we,wR,ER,kR,xR,PR,RR,TR,BR,OR,_R,DR,LR,QR,H1,Dwe,Lwe,Qwe,NR,Nwe,Mwe,MR,Igt;var q1=h(()=>{De();Ve();z1=a.enum(["logs_ingested_bytes","logs_accepted_bytes","input_tokens","output_tokens","issues_created","automation_runs_completed","pull_requests_created","pull_request_reviews_completed"]),Xve=a.enum(["cycle_top_up","upgrade_top_up","deficit_settlement","auto_top_up","one_off_top_up","usage_debit","adjustment","migration_opening_balance","void"]),ewe=a.enum(["credit","debit"]),twe=a.enum(["cycle_renewal","plan_upgrade","auto_purchase","one_off_purchase","deficit_settlement","usage","adjustment","migration_opening_balance"]),j1=a.object({startsAt:a.string().datetime(),endsAt:a.string().datetime(),billableStartsAt:a.string().datetime()}),nwe=a.object({subscriptionChargeAmount:a.string(),creditDeficitAmount:a.string(),creditDeficitChargeAmount:a.string(),totalAmount:a.string(),currency:a.string()}),Af=a.object({billingSubscriptionChangeId:a.string(),effectiveAt:a.string().datetime(),planSlug:a.string().nullable(),planName:a.string().nullable(),price:a.string().nullable(),currency:a.string().nullable(),targetCreditBalance:a.string().nullable()}),owe=a.object({id:a.string(),status:a.string(),billingPlanId:a.string(),cycleType:a.string(),cancelAt:a.string().datetime().nullable(),canceledAt:a.string().datetime().nullable()}),rwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to query billing for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),U1=a.object({status:a.enum(["current","payment_retrying","delinquent"]).describe("Negative-balance collection state. `current` means no open collection case; `payment_retrying` means a scheduled retry cadence is running; `delinquent` means retries are exhausted and intake is denied until payment settles the balance."),outstandingCredits:a.string().nullable().describe("Credits owed (absolute value of the negative balance)."),outstandingAmount:a.string().nullable().describe("Amount owed in `currency` at the current additional-credit price."),currency:a.string().nullable(),scheduledAttemptsMade:a.number().int().describe("Scheduled collection attempts consumed by confirmed payment failures."),nextRetryAt:a.string().datetime().nullable(),billingInvoiceId:a.string().nullable(),hostedInvoiceUrl:a.string().nullable()}).describe("Read-only negative-balance collection state for the organization."),iwe=a.object({billingModel:a.enum(["credit-balance-v1"]),billable:a.boolean(),nonBillableReason:a.string().nullable(),status:a.string(),planName:a.string().nullable(),planSlug:a.string().nullable(),currency:a.string().nullable(),currentBalance:a.string().nullable(),targetCreditBalance:a.string().nullable(),currentCycle:j1.nullable(),currentPeriodEstimate:nwe.nullable(),pendingDowngrade:Af.nullable(),subscription:owe.nullable(),collection:U1,currentPlan:a.object({slug:a.string(),name:a.string(),price:a.string().nullable(),currency:a.string().nullable(),targetCreditBalance:a.string().nullable(),subscriptionStatus:a.string(),cycleStartsAt:a.string().datetime().nullable(),cycleEndsAt:a.string().datetime().nullable(),renewalAt:a.string().datetime().nullable(),pendingSwitch:Af.nullable(),pendingCancellation:a.object({effectiveAt:a.string().datetime()}).nullable()}).nullable()}),swe=a.object({organizationId:a.string().min(1).optional().describe("Organization to query usage for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),cycle:a.enum(["current","previous"]).default("current").describe("Which billing cycle to report usage for.")}),awe=a.object({dimension:z1,totalQuantity:a.string(),ratedQuantity:a.string(),creditsConsumed:a.string(),sourceBreakdown:a.record(a.string(),a.string())}),cwe=a.object({cycle:j1.nullable(),usage:a.array(awe)}),lwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to query transactions for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),limit:a.coerce.number().int().min(1).max(100).default(10).describe("Maximum number of transactions to return per page."),page:a.coerce.number().int().min(1).default(1).describe("Page number for pagination (1-indexed).")}),uwe=a.object({id:a.string(),transactionType:Xve,creditDelta:a.string(),direction:ewe.describe("Which way this entry moved the balance. Derived from the business event, not from the amount: a zero-credit cycle renewal is still a credit."),reason:twe.describe("The business event that produced this entry."),amount:a.string().describe("Non-negative magnitude of the balance movement. Apply `direction` for the signed value."),balanceAfter:a.string(),occurredAt:a.string().datetime(),billingInvoiceId:a.string().nullable()}),dwe=a.object({items:a.array(uwe),pagination:a.object({page:a.number(),limit:a.number(),total:a.number(),totalPages:a.number(),hasNext:a.boolean(),hasPrev:a.boolean()}).describe("Pagination metadata for the transaction list.")}),bR=w({operationId:"billing.getSummary",description:"Get a billing summary for the current organization, including plan, balance, and cycle information.",backend:"api",route:{method:"GET",path:"/billing/summary",tags:["Billing"]},input:rwe,output:iwe,pagination:"none",async:"sync"}),IR=w({operationId:"billing.getUsage",description:"Get per-dimension usage breakdown for the current or previous billing cycle.",backend:"api",route:{method:"GET",path:"/billing/usage",tags:["Billing"]},input:swe,output:cwe,pagination:"none",async:"sync"}),SR=w({operationId:"billing.listTransactions",description:"List recent credit ledger transactions with pagination.",backend:"api",route:{method:"GET",path:"/billing/transactions",tags:["Billing"]},input:lwe,output:dwe,pagination:"page",async:"sync"}),Go=a.string().min(1).optional().describe("Organization to operate on. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),F1=a.string().trim().regex(/^\d+(?:\.\d{1,6})?$/,"Expected a decimal with up to 6 places"),yR=F1.refine((e)=>{let[,t=""]=e.split(".");return t.slice(2).replaceAll("0","")===""},"Expected a currency amount with up to 2 decimal places").refine((e)=>/[1-9]/.test(e),"Expected a positive currency amount"),CR=a.string().trim().min(1).max(100),pwe=a.object({organizationId:Go}),$1=a.object({supported:a.boolean().describe("Whether auto top-up is available for the account's plan."),enabled:a.boolean(),triggerCreditBalance:a.string(),topUpAmount:a.string(),cycleSpendingLimit:a.string(),currency:a.string(),creditsToGrant:a.string().nullable(),status:a.string()}),gwe=a.object({organizationId:Go,enabled:a.boolean(),triggerCreditBalance:F1,topUpAmount:yR,cycleSpendingLimit:yR}),mwe=a.object({organizationId:Go,amount:yR.describe("Amount to charge in the account currency; grants an equal credit balance."),idempotencyKey:a.string().trim().min(1).max(128).describe("Client-generated key. Repeating a request with the same key returns the original purchase instead of charging again.")}),hwe=a.object({status:a.enum(["paid","pending_payment"]),billingInvoiceId:a.string(),topUpAmount:a.string(),creditsToGrant:a.string(),currency:a.string()}),Awe=a.object({organizationId:Go}),fwe=a.object({slug:a.string(),billingModel:a.string(),name:a.string(),description:a.string(),bestFor:a.string().nullable(),price:a.string(),currency:a.string(),targetCreditBalance:a.string().nullable(),logsIncludedBytes:a.string(),inputTokensIncluded:a.string(),outputTokensIncluded:a.string()}),ywe=a.object({billingModel:a.string(),currentPlanSlug:a.string().nullable(),hasActiveStripeBilling:a.boolean(),plans:a.array(fwe)}),bwe=a.object({organizationId:Go,planSlug:CR}),Iwe=a.object({calculatedAt:a.string().datetime(),type:a.enum(["upgrade","downgrade"]),effectiveAt:a.string().datetime(),currency:a.string(),currentPlanSlug:a.string(),targetPlanSlug:a.string(),currentPlanName:a.string(),targetPlanName:a.string(),currentPlanPrice:a.string(),targetPlanPrice:a.string(),currentTargetCreditBalance:a.string(),targetCreditBalance:a.string(),creditDeficitAmount:a.string(),creditDeficitChargeAmount:a.string(),additionalCreditPrice:a.string(),immediateChargeAmount:a.string(),subscriptionChargeAmount:a.string(),proratedCreditGrantAmount:a.string(),remainingCycleFraction:a.string(),nextCycleChargeAmount:a.string()}),Swe=a.object({organizationId:Go,planSlug:CR}),Cwe=a.object({billingSubscriptionChangeId:a.string(),billingSubscriptionId:a.string(),status:a.string(),type:a.string(),effectiveAt:a.string().datetime(),invoiceId:a.string().nullable(),creditDeficitAmount:a.string().optional(),creditDeficitChargeAmount:a.string().optional(),creditTopUpAmount:a.string().optional(),immediateChargeAmount:a.string().optional(),subscriptionChargeAmount:a.string().optional(),proratedCreditGrantAmount:a.string().optional()}),vwe=a.object({organizationId:Go,planSlug:CR}),wwe=a.object({sessionId:a.string(),checkoutUrl:a.string().url()}),Ewe=a.object({organizationId:Go,sessionId:a.string().min(1).describe("The checkout session id returned by createCheckoutSession.")}),kwe=a.object({status:a.enum(["pending","active","expired"])}),xwe=a.object({organizationId:Go}),Pwe=a.object({portalUrl:a.string().url()}),Rwe=a.object({organizationId:Go}),Twe=a.object({hasPaymentMethod:a.boolean(),brand:a.string().nullable(),last4:a.string().nullable(),type:a.string().nullable(),expiryMonth:a.number().int().min(1).max(12).nullable(),expiryYear:a.number().int().nullable(),isDefault:a.boolean(),display:a.string().nullable()}),Bwe=a.object({slug:a.string(),name:a.string(),price:a.string().nullable(),currency:a.string().nullable(),targetCreditBalance:a.string().nullable(),subscriptionStatus:a.string(),cycleStartsAt:a.string().datetime().nullable(),cycleEndsAt:a.string().datetime().nullable(),renewalAt:a.string().datetime().nullable(),pendingSwitch:Af.nullable(),pendingCancellation:a.object({effectiveAt:a.string().datetime()}).nullable()}),vR=a.object({organizationId:Go}),G1=a.object({currentPlan:Bwe,effectiveAt:a.string().datetime(),currentBalance:a.string(),servicePolicy:a.literal("active_until_period_end"),creditPolicy:a.literal("dormant_until_resubscription"),scheduledFinalCharge:a.string().nullable(),autoTopUpEnabled:a.boolean(),pendingDowngrade:Af.nullable(),collectionState:U1,calculatedAt:a.string().datetime()}),Owe=G1.extend({billingSubscriptionChangeId:a.string(),alreadyScheduled:a.boolean()}),_we=a.object({billingSubscriptionId:a.string(),resumed:a.literal(!0)}),wR=w({operationId:"billing.getAutoTopUp",description:"Get the organization's credit auto top-up settings (trigger balance, top-up amount, cycle spending limit).",backend:"api",route:{method:"GET",path:"/billing/auto-top-up",tags:["Billing"]},input:pwe,output:$1,pagination:"none",async:"sync"}),ER=w({operationId:"billing.updateAutoTopUp",description:"Enable/disable and configure credit auto top-up. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"PUT",path:"/billing/auto-top-up",tags:["Billing"]},input:gwe,output:$1,pagination:"none",async:"sync"}),kR=w({operationId:"billing.purchaseCredits",description:"Purchase a one-time amount of credits against the saved payment method. Requires a user credential with `billing:manage` and a stable idempotency key.",backend:"api",route:{method:"POST",path:"/billing/credits/purchase",tags:["Billing"]},input:mwe,output:hwe,pagination:"none",async:"sync"}),xR=w({operationId:"billing.listPlans",description:"List the self-serve credit plans available for checkout, including the current plan.",backend:"api",route:{method:"GET",path:"/billing/plans",tags:["Billing"]},input:Awe,output:ywe,pagination:"none",async:"sync"}),PR=w({operationId:"billing.previewPlanChange",description:"Preview the cost and effect of changing to a plan without applying it. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"POST",path:"/billing/plan-change/preview",tags:["Billing"]},input:bwe,output:Iwe,pagination:"none",async:"sync"}),RR=w({operationId:"billing.changePlan",description:"Apply a plan upgrade or schedule a downgrade. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"POST",path:"/billing/plan-change",tags:["Billing"]},input:Swe,output:Cwe,pagination:"none",async:"sync"}),TR=w({operationId:"billing.createCheckoutSession",description:"Create a hosted Stripe Checkout session for first-time subscribe from the terminal. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"POST",path:"/billing/checkout-session",tags:["Billing"]},input:vwe,output:wwe,pagination:"none",async:"sync"}),BR=w({operationId:"billing.getCheckoutSessionStatus",description:"Poll the completion status of a checkout session created by this organization.",backend:"api",route:{method:"GET",path:"/billing/checkout-session/{sessionId}",tags:["Billing"]},input:Ewe,output:kwe,pagination:"none",async:"sync"}),OR=w({operationId:"billing.createPortalSession",description:"Create a Stripe Customer Portal session for updating the payment method. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"POST",path:"/billing/portal-session",tags:["Billing"]},input:xwe,output:Pwe,pagination:"none",async:"sync"}),_R=w({operationId:"billing.getPaymentMethod",description:"Get a summary of the organization's saved payment method (brand and last 4 digits).",backend:"api",route:{method:"GET",path:"/billing/payment-method",tags:["Billing"]},input:Rwe,output:Twe,pagination:"none",async:"sync"}),DR=w({operationId:"billing.previewSubscriptionCancellation",description:"Preview period-end subscription cancellation without changing billing state.",backend:"api",route:{method:"POST",path:"/billing/subscription-cancellation/preview",tags:["Billing"]},input:vR,output:G1,pagination:"none",async:"sync"}),LR=w({operationId:"billing.scheduleSubscriptionCancellation",description:"Schedule cancellation at the end of the paid billing cycle.",backend:"api",route:{method:"POST",path:"/billing/subscription-cancellation",tags:["Billing"]},input:vR,output:Owe,pagination:"none",async:"sync"}),QR=w({operationId:"billing.resumeSubscriptionCancellation",description:"Resume renewal before a scheduled cancellation takes effect.",backend:"api",route:{method:"POST",path:"/billing/subscription-cancellation/resume",tags:["Billing"]},input:vR,output:_we,pagination:"none",async:"sync"}),H1=a.object({productKey:z1.describe("Product the line bills, keyed by the usage dimension vocabulary."),displayName:a.string(),meteredQuantity:a.string().describe("Metered units (count, bytes) summed over the cycle window."),includedQuantity:a.string(),overageQuantity:a.string(),unitPrice:a.string().describe("Currency per rated unit, decimal."),amount:a.string().describe("Currency at six-decimal precision.")}),Dwe=a.object({id:a.string(),cycleStartsAt:a.string().datetime(),cycleEndsAt:a.string().datetime(),status:a.string().describe("Invoice status: preview, finalized, pending_payment, paid, failed, void, or uncollectible. A zero-total settlement is written paid with no charge."),currency:a.string(),subtotalAmount:a.string(),totalAmount:a.string(),lineItems:a.array(H1),hostedInvoiceUrl:a.string().nullable().describe("Stripe-hosted invoice page; null for zero-total settlements."),finalizedAt:a.string().datetime().nullable(),createdAt:a.string().datetime()}),Lwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to list usage invoices for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(24).describe("Maximum invoices to return, newest cycle first.")}),Qwe=a.object({items:a.array(Dwe)}),NR=w({operationId:"billing.listUsageInvoices",description:"List cycle-end usage invoices — the local settlement record, one per settled billing cycle, zero-total settlements included.",backend:"api",route:{method:"GET",path:"/billing/usage-invoices",tags:["Billing"]},input:Lwe,output:Qwe,pagination:"none",async:"sync"}),Nwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to query accrued charges for. Auto-filled from CLI and SDK context when omitted.")}),Mwe=a.object({cycle:a.object({startsAt:a.string().datetime(),endsAt:a.string().datetime()}).nullable().describe("The open billing cycle the charges accrue in; null when the account has no open stamped cycle."),currency:a.string().nullable(),settlesInCents:a.boolean().describe("Whether the open cycle's plan settles any product as a cycle-end currency charge."),lineItems:a.array(H1),totalAmount:a.string()}),MR=w({operationId:"billing.getAccruedUsageCharges",description:"Get usage charges accrued so far in the open billing cycle, priced under the cycle's plan terms. These settle on the cycle-end usage invoice.",backend:"api",route:{method:"GET",path:"/billing/usage-charges/accrued",tags:["Billing"]},input:Nwe,output:Mwe,pagination:"none",async:"sync"}),Igt={getSummary:bR.contract,getUsage:IR.contract,getAccruedUsageCharges:MR.contract,listUsageInvoices:NR.contract,listTransactions:SR.contract,getAutoTopUp:wR.contract,updateAutoTopUp:ER.contract,purchaseCredits:kR.contract,listPlans:xR.contract,previewPlanChange:PR.contract,changePlan:RR.contract,createCheckoutSession:TR.contract,getCheckoutSessionStatus:BR.contract,createPortalSession:OR.contract,getPaymentMethod:_R.contract,previewSubscriptionCancellation:DR.contract,scheduleSubscriptionCancellation:LR.contract,resumeSubscriptionCancellation:QR.contract}});var zwe,mp,jwe,Uwe,Fwe,$we,Gwe,Hwe,hp,V1,qwe,Vwe,K1,Kwe,Ywe,Y1,Wwe,Jwe,W1,Zwe,Xwe,J1,eEe,tEe,Z1,nEe,oEe,rEe,X1,iEe,sEe,e2,aEe,cEe,t2,zR,n2,o2,r2,i2,s2,a2,Ap,c2,lEe,l2,uEe,u2,d2,dEe,pEe,p2,gEe,g2,mEe,hEe,m2;var h2=h(()=>{De();Ve();zwe=["slack","github","linear","pagerduty","victorops","rootly","incident_io","webhook","teams","bitbucket","jira"],mp=a.enum(zwe),jwe=a.enum(["oauth","app_installation","api_key"]),Uwe=a.enum(["alert_routing","inbound_webhooks","messaging","code_search","health_check"]),Fwe=a.enum(["pending","connected","error","revoked"]),$we=a.enum(["healthy","unhealthy","unknown"]),Gwe=a.object({name:a.string().describe("Field name used as the JSON key in `credentials`."),label:a.string().describe("Human-readable field label."),required:a.boolean().describe("Whether the field is required."),secret:a.boolean().describe("Whether the field is a secret (masked in UIs, encrypted)."),description:a.string().nullable().describe("Optional hint for the field's expected value.")}),Hwe=a.object({id:mp.describe("Integration provider identifier."),name:a.string().describe("Human-readable display name."),description:a.string().describe("Short description of the provider."),authType:jwe.describe("Auth flow used to connect this provider."),capabilities:a.array(Uwe).describe("Capabilities the provider exposes once connected."),connectionCount:a.number().int().describe("Number of active connections for this provider in the organization, including error-status connections that need attention."),credentialFields:a.array(Gwe).optional().describe("Fields required in `credentials` when creating an api_key connection. Absent for browser-auth providers."),browserConnectSupported:a.boolean().describe("Whether this provider's browser connect flow (`integrations.beginConnect`) is available in this environment. Readiness-derived: the provider begins on the consolidated OAuth callback route and its OAuth client credentials are provisioned. Providers still on legacy browser paths (Slack, Linear, Bitbucket) report false and connect from the dashboard.")}),hp=a.object({id:a.string().uuid(),provider:mp,displayName:a.string().nullable(),status:Fwe,isActive:a.boolean().describe("Whether this connection counts as connected (status 'connected' or 'error'). An error-status connection is the organization's connection — broken, not absent."),needsAttention:a.boolean().describe("Whether the connection should surface a reconnect prompt (status 'error' or health status 'unhealthy')."),metadata:a.record(a.string(),a.unknown()).describe("Non-secret provider metadata (e.g. workspace/team names)."),healthStatus:$we,healthMessage:a.string().nullable(),healthCheckedAt:a.string().datetime().nullable(),healthConsecutiveFailures:a.number().int(),connectedBy:a.string().nullable(),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),V1=a.object({organizationEnabled:a.boolean().describe("Stored organization-wide policy."),connectionEnabled:a.boolean().describe("Stored connection policy."),effectiveEnabled:a.boolean().describe("True only when both stored policies are enabled.")}),qwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to list providers for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),Vwe=a.object({providers:a.array(Hwe)}),K1=w({operationId:"integrations.listProviders",description:"List supported integration providers and how many connections the organization has for each.",backend:"api",route:{method:"GET",path:"/integrations/providers",tags:["Integrations"]},input:qwe,output:Vwe,pagination:"none",async:"sync"}),Kwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to list connections for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:mp.optional().describe("Filter connections by provider.")}),Ywe=a.object({connections:a.array(hp)}),Y1=w({operationId:"integrations.listConnections",description:"List integration connections and their connection state for the organization.",backend:"api",route:{method:"GET",path:"/integrations/connections",tags:["Integrations"]},input:Kwe,output:Ywe,pagination:"none",async:"sync"}),Wwe=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),connectionId:a.string().uuid().describe("Connection ID to fetch.")}),Jwe=a.object({connection:hp}),W1=w({operationId:"integrations.getConnection",description:"Get one integration connection by ID (non-secret config only).",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}",tags:["Integrations"]},input:Wwe,output:Jwe,pagination:"none",async:"sync"}),Zwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to connect in. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:mp.describe("Integration provider to connect. Must use api_key auth (see `authType` in the provider catalog)."),displayName:a.string().trim().min(1).max(255).optional().describe("Optional display name for the connection."),credentials:a.record(a.string(),a.unknown()).describe("Vendor credentials. Fields vary by provider (see `credentialFields` on the provider catalog). Validated against the vendor before the connection is created; never returned.")}),Xwe=a.object({connection:hp}),J1=w({operationId:"integrations.createConnection",description:"Create an integration connection for an api_key provider. Credentials are validated against the vendor, then stored encrypted.",backend:"api",route:{method:"POST",path:"/integrations/connections",tags:["Integrations"],successStatus:201},input:Zwe,output:Xwe,pagination:"none",async:"sync"}),eEe=a.object({organizationId:a.string().min(1).optional().describe("Organization to connect in. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:mp.describe("Browser-auth provider to connect (oauth or app_installation). Must report `browserConnectSupported: true` in the provider catalog."),displayName:a.string().trim().min(1).max(255).optional().describe("Optional display name for the resulting connection."),projectId:a.string().trim().min(1).optional().describe("Project the completed connection defaults its routing to. Must belong to the organization.")}),tEe=a.object({url:a.string().describe("Vendor authorization (or app installation) URL to open in a browser signed into the Sazabi dashboard as the same user."),attemptId:a.string().uuid().describe("Connect attempt to poll via `integrations.getConnectAttempt` while the browser flow completes."),expiresAt:a.string().datetime().describe("When the attempt expires if the browser flow never completes.")}),Z1=w({operationId:"integrations.beginConnect",description:"Begin a browser connect flow for an OAuth or app-installation provider. Returns a vendor URL to open in a browser and an attempt to poll; the vendor exchange completes server-side and no token ever reaches the caller.",backend:"api",route:{method:"POST",path:"/integrations/connect",tags:["Integrations"],successStatus:201},input:eEe,output:tEe,pagination:"none",async:"sync"}),nEe=a.enum(["pending","completed","not_connected","failed","expired"]),oEe=a.object({organizationId:a.string().min(1).optional().describe("Organization the attempt belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),attemptId:a.string().uuid().describe("Connect attempt ID to poll.")}),rEe=a.object({status:nEe.describe("Attempt state. `not_connected` means the flow finished but the connection is not live yet (most commonly awaiting a third-party admin's approval). `expired` means the browser flow did not complete in time — begin a new connect."),errorCode:a.string().nullable().describe("Reason code when status is `failed` (the shared OAuth callback vocabulary, e.g. vendor_denied, not_authorized) or `not_connected` (e.g. `installation_requested` for GitHub installs awaiting org-admin approval)."),connection:hp.optional().describe("The created connection when status is `completed`.")}),X1=w({operationId:"integrations.getConnectAttempt",description:"Poll a browser connect attempt started with `integrations.beginConnect`. Visible only to the user who began it.",backend:"api",route:{method:"GET",path:"/integrations/connect/attempts/{attemptId}",tags:["Integrations"]},input:oEe,output:rEe,pagination:"none",async:"sync"}),iEe=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),connectionId:a.string().uuid().describe("Connection ID to disconnect.")}),sEe=a.object({success:a.literal(!0)}),e2=w({operationId:"integrations.disconnectConnection",description:"Disconnect an integration connection (soft delete). Always succeeds regardless of stored credential state; cached vendor catalogs and routing derived from the connection are removed.",backend:"api",route:{method:"DELETE",path:"/integrations/connections/{connectionId}",tags:["Integrations"]},input:iEe,output:sEe,pagination:"none",async:"sync"}),aEe=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),connectionId:a.string().uuid().describe("Connection ID to update."),credentials:a.record(a.string(),a.unknown()).describe("Replacement vendor credentials for an api_key connection. Validated against the vendor; resets the connection's health state on success.")}),cEe=a.object({connection:hp}),t2=w({operationId:"integrations.updateConnectionCredentials",description:"Replace an api_key connection's credentials in place — the reconnect path for a connection that needs attention. Keeps connection-scoped configuration.",backend:"api",route:{method:"PATCH",path:"/integrations/connections/{connectionId}/credentials",tags:["Integrations"]},input:aEe,output:cEe,pagination:"none",async:"sync"}),zR=a.object({organizationId:a.string().min(1).optional().describe("Organization to operate on. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),n2=a.object({organizationEnabled:a.boolean(),effectiveEnabled:a.boolean()}),o2=zR.extend({connectionId:a.string().uuid().describe("Integration connection whose JIT policy is being read or updated.")}),r2=w({operationId:"integrations.getOrganizationExternalIdentityJitPolicy",description:"Read the organization's stored external-identity JIT policy.",backend:"api",route:{method:"GET",path:"/integrations/external-identity-jit-policy",tags:["Integrations"]},input:zR,output:n2,pagination:"none",async:"sync"}),i2=w({operationId:"integrations.updateOrganizationExternalIdentityJitPolicy",description:"Enable or disable external-identity JIT across an organization.",backend:"api",route:{method:"PATCH",path:"/integrations/external-identity-jit-policy",tags:["Integrations"]},input:zR.extend({enabled:a.boolean()}),output:n2,pagination:"none",async:"sync"}),s2=w({operationId:"integrations.getConnectionExternalIdentityJitPolicy",description:"Read stored and effective JIT policy for one connection.",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}/external-identity-jit-policy",tags:["Integrations"]},input:o2,output:V1,pagination:"none",async:"sync"}),a2=w({operationId:"integrations.updateConnectionExternalIdentityJitPolicy",description:"Enable or disable external-identity JIT for one connection.",backend:"api",route:{method:"PATCH",path:"/integrations/connections/{connectionId}/external-identity-jit-policy",tags:["Integrations"]},input:o2.extend({enabled:a.boolean()}),output:V1,pagination:"none",async:"sync"}),Ap=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),connectionId:a.string().uuid().describe("Slack integration connection ID (the `integration_connections.id`, not the Slack team id).")}),c2=a.object({connectionId:a.string().uuid(),defaultProjectId:a.string().uuid().nullable().describe("Project new threads route to when no channel mapping matches."),automaticResponses:a.boolean().describe("Auto-respond to messages in channels the bot is in (autoReactEnabled)."),acknowledgementMessage:a.boolean().describe("Post a processing acknowledgement while a run is in flight (processingMessageEnabled).")}),lEe=Ap,l2=w({operationId:"integrations.getSlackConfiguration",description:"Read Slack connection configuration (default project, automatic responses, acknowledgement message).",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}/slack-configuration",tags:["Integrations"]},input:lEe,output:c2,pagination:"none",async:"sync"}),uEe=Ap.extend({defaultProjectId:a.string().uuid().nullable().optional().describe("Project new threads route to when no channel mapping matches. Pass null to clear it. Omit to leave unchanged."),automaticResponses:a.boolean().optional().describe("Omit to leave unchanged."),acknowledgementMessage:a.boolean().optional().describe("Omit to leave unchanged.")}),u2=w({operationId:"integrations.updateSlackConfiguration",description:"Update Slack connection configuration. Omitted fields are left unchanged.",backend:"api",route:{method:"PATCH",path:"/integrations/connections/{connectionId}/slack-configuration",tags:["Integrations"]},input:uEe,output:c2,pagination:"none",async:"sync"}),d2=a.object({connectionId:a.string().uuid(),slackChannelId:a.string().min(1),slackChannelName:a.string().min(1),projectId:a.string().uuid()}),dEe=Ap,pEe=a.object({mappings:a.array(d2)}),p2=w({operationId:"integrations.listSlackChannelProjectMappings",description:"List channel-to-project mappings for a Slack connection.",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}/slack-channel-project-mappings",tags:["Integrations"]},input:dEe,output:pEe,pagination:"none",async:"sync"}),gEe=Ap.extend({slackChannelId:a.string().min(1).describe("Slack channel ID (e.g. C0123ABCDEF)."),slackChannelName:a.string().min(1).optional().describe("Optional. Ignored for storage — the authoritative channel name is "+"always resolved from the connection's channel catalog. Accepted only as a convenience/label; the response returns the catalog name."),projectId:a.string().uuid().describe("Project the channel routes to. Must belong to the organization.")}),g2=w({operationId:"integrations.setSlackChannelProjectMapping",description:"Create or update the channel-to-project mapping for one Slack channel. Idempotent on (connection, channel).",backend:"api",route:{method:"PUT",path:"/integrations/connections/{connectionId}/slack-channel-project-mappings/{slackChannelId}",tags:["Integrations"]},input:gEe,output:d2,pagination:"none",async:"sync"}),mEe=Ap.extend({slackChannelId:a.string().min(1)}),hEe=a.object({success:a.boolean()}),m2=w({operationId:"integrations.deleteSlackChannelProjectMapping",description:"Delete a channel-to-project mapping.",backend:"api",route:{method:"DELETE",path:"/integrations/connections/{connectionId}/slack-channel-project-mappings/{slackChannelId}",tags:["Integrations"]},input:mEe,output:hEe,pagination:"none",async:"sync"})});var Ho,AEe,fEe,A2,ff,yf,f2,jR,y2,UR,b2,I2,yEe,bEe,S2,C2,v2,w2,E2,k2,x2,P2,R2,T2,B2,O2,_2,D2,L2,zc,bf,If,Sf,Cf,vf,wf,Ef,kf,xf,Pf,IEe;var FR=h(()=>{De();Ve();Ho=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),status:a.enum(["open","resolved","ignored"]),severity:a.enum(["low","medium","high","critical"]),componentId:a.string().uuid().nullable(),createdAt:a.string().datetime(),resolvedAt:a.string().datetime().nullable(),mutedAt:a.string().datetime().nullable(),muteHitCount:a.number().int().nonnegative(),lastActivityAt:a.string().datetime().nullable(),lastDeliveredAt:a.string().datetime().nullable(),locked:a.boolean(),redacted:a.boolean()}),AEe=a.object({channelId:a.string().nullable(),channelName:a.string().nullable(),threadTs:a.string().nullable(),permalink:a.string().nullable(),workspaceName:a.string().nullable()}),fEe=Ho.extend({slackChannels:a.array(AEe)}),A2=Ho.extend({delivery:a.record(a.string(),a.unknown()).nullable().optional()}),ff=a.object({projectId:a.string().uuid().optional().describe("Project to create the issue in. Auto-filled from CLI and SDK context when omitted."),name:a.string().trim().min(1).optional().describe("Stable issue name for indexing and mute matching. When omitted, the name is derived from contentMdx."),contentMdx:a.string().trim().min(1,"contentMdx cannot be empty").optional().describe("Safe Sazabi MDX document for the issue body (impact, root cause, remediation, evidence). Required unless sample is true."),severity:a.enum(["low","medium","high","critical"]).default("medium").describe("Issue severity used for prioritization and triage."),componentId:a.string().uuid().optional().describe("UUID of a registered component this issue belongs to. Required unless sample is true: every issue must be attributed to a component. List components first and pick the best match; register one if none fits. Missing or unknown IDs are rejected."),statusStartedAt:a.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident began."),sample:a.boolean().optional().describe("When true, creates (or returns) the organization's onboarding sample issue for the target project using the curated sample payload, and the alert rides the normal issue_triggered broadcast to the configured delivery rules. Mutually exclusive with the content inputs (name, contentMdx, severity, componentId, statusStartedAt); projectId stays allowed. Idempotent per project: an existing sample attempt's issue is returned instead of creating a new one. Requires a user credential.")}),yf=ff.superRefine((e,t)=>{if(e.sample){let n=[["name",e.name!==void 0],["contentMdx",e.contentMdx!==void 0],["severity",e.severity!=="medium"],["componentId",e.componentId!==void 0],["statusStartedAt",e.statusStartedAt!==void 0]];for(let[r,o]of n)if(o)t.addIssue({code:"custom",path:[r],message:`${r} is not allowed when sample is true.`})}else{if(!e.contentMdx)t.addIssue({code:"custom",path:["contentMdx"],message:"contentMdx is required"});if(!e.componentId)t.addIssue({code:"custom",path:["componentId"],message:"componentId is required"})}if(e.statusStartedAt&&!e.componentId)t.addIssue({code:"custom",path:["statusStartedAt"],message:"statusStartedAt requires componentId."})}),f2=a.object({issue:Ho,duplicateIssueId:a.string().uuid().optional().describe("Present when creation reused an existing open issue instead of creating a new one.")}),jR=a.object({projectId:a.string().uuid().optional().describe("Project to list issues for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:a.enum(["open","resolved","ignored"]).optional().describe("Filter by issue status."),severity:a.enum(["low","medium","high","critical"]).optional().describe("Filter by severity."),componentId:a.string().uuid().optional().describe("Filter by component ID.")}),y2=a.object({issues:a.array(Ho),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),UR=jR.extend({name:a.string().trim().optional().describe("Case-insensitive partial match on issue name."),includeDeliveryMetadata:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, include raw delivery metadata in each issue.")}),b2=a.object({issues:a.array(A2),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),I2=UR.omit({limit:!0,cursor:!0,includeDeliveryMetadata:!0}),yEe=a.object({open:a.number().int().nonnegative(),resolved:a.number().int().nonnegative(),ignored:a.number().int().nonnegative()}),bEe=a.object({low:a.number().int().nonnegative(),medium:a.number().int().nonnegative(),high:a.number().int().nonnegative(),critical:a.number().int().nonnegative()}),S2=a.object({total:a.number().int().nonnegative(),byStatus:yEe,bySeverity:bEe,filters:a.object({name:a.string().nullable(),status:a.enum(["open","resolved","ignored"]).nullable(),severity:a.enum(["low","medium","high","critical"]).nullable(),componentId:a.string().uuid().nullable()})}),C2=a.object({issueId:a.string().uuid().describe("Issue ID to retrieve.")}),v2=a.object({issue:fEe}),w2=a.object({issueId:a.string().uuid().describe("Issue ID to resolve."),statusResolvedAt:a.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident ended.")}),E2=a.object({issue:Ho}),k2=a.object({issueId:a.string().uuid().describe("Issue ID to ignore.")}),x2=a.object({issue:Ho}),P2=a.object({issueId:a.string().uuid().describe("Issue ID to reopen.")}),R2=a.object({issue:Ho}),T2=a.object({issueId:a.string().uuid().describe("Issue ID to reassign and reopen."),targetComponentId:a.string().uuid().describe("Active canonical component that will own the reopened issue.")}),B2=a.object({issue:Ho,sourceComponentId:a.string().uuid(),targetComponentId:a.string().uuid()}),O2=a.object({issueId:a.string().uuid().describe("Issue ID to mute.")}),_2=a.object({issue:Ho}),D2=a.object({issueId:a.string().uuid().describe("Issue ID to unmute.")}),L2=a.object({issue:Ho}),zc=w({operationId:"issues.create",description:"Create an issue in a project, returning an existing open issue when root-cause deduplication finds a match.",backend:"api",route:{method:"POST",path:"/issues",tags:["Issues"],successStatus:201},input:yf,output:f2,pagination:"none",async:"sync"}),bf=w({operationId:"issues.list",description:"List issues in a project, optionally filtered by status and severity.",backend:"api",route:{method:"GET",path:"/issues",tags:["Issues"]},input:jR,output:y2,pagination:"cursor",async:"sync"}),If=w({operationId:"issues.search",description:"Search issues in a project by name, status, and severity.",backend:"api",route:{method:"GET",path:"/issues/search",tags:["Issues"]},input:UR,output:b2,pagination:"cursor",async:"sync"}),Sf=w({operationId:"issues.count",description:"Count issues in a project with status and severity breakdowns.",backend:"api",route:{method:"GET",path:"/issues/count",tags:["Issues"]},input:I2,output:S2,pagination:"none",async:"sync"}),Cf=w({operationId:"issues.get",description:"Get a single issue by ID.",backend:"api",route:{method:"GET",path:"/issues/{issueId}",tags:["Issues"]},input:C2,output:v2,pagination:"none",async:"sync"}),vf=w({operationId:"issues.resolve",description:"Resolve an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/resolve",tags:["Issues"]},input:w2,output:E2,pagination:"none",async:"sync"}),wf=w({operationId:"issues.ignore",description:"Ignore an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/ignore",tags:["Issues"]},input:k2,output:x2,pagination:"none",async:"sync"}),Ef=w({operationId:"issues.reopen",description:"Reopen a resolved or ignored issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reopen",tags:["Issues"]},input:P2,output:R2,pagination:"none",async:"sync"}),kf=w({operationId:"issues.reassignAndReopen",description:"Atomically reassign a resolved or ignored issue to an active component and reopen it.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reassign-and-reopen",tags:["Issues"]},input:T2,output:B2,pagination:"none",async:"sync"}),xf=w({operationId:"issues.mute",description:"Mute an issue, suppressing future re-fires without changing status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/mute",tags:["Issues"]},input:O2,output:_2,pagination:"none",async:"sync"}),Pf=w({operationId:"issues.unmute",description:"Unmute an issue, preserving its current status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/unmute",tags:["Issues"]},input:D2,output:L2,pagination:"none",async:"sync"}),IEe={count:Sf.contract,create:zc.contract,list:bf.contract,search:If.contract,get:Cf.contract,resolve:vf.contract,ignore:wf.contract,reopen:Ef.contract,reassignAndReopen:kf.contract,mute:xf.contract,unmute:Pf.contract}});var $R,Q2,Rf,Tf,N2,M2,z2,j2,Bf,GR,U2,F2,$2,G2,H2,q2,V2,K2,Y2,W2,J2,Z2,jc,Uc,Fc,$c,Gc,Of,_f,Df,Lf,Qf,SEe,CEe;var HR=h(()=>{De();Ve();$R=/^[a-zA-Z0-9\s\-_]+$/,Q2=a.object({id:a.string().uuid(),name:a.string(),expiresAt:a.string().datetime().nullable(),lastUsedAt:a.string().datetime().nullable(),createdAt:a.string().datetime()}),Rf=Q2.extend({projectId:a.string().uuid(),dataSourceConnectionId:a.string().uuid().nullable().describe("Linked data source connection ID when this key is scoped to one data source."),deactivatedAt:a.string().datetime().nullable().describe("Timestamp when this public key was deactivated.")}),Tf=Q2.extend({projectId:a.string().uuid().nullable()}),N2=a.object({projectId:a.string().uuid().optional().describe("Project to list keys for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),M2=a.object({publicKeys:a.array(Rf),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),z2=a.object({secretKeys:a.array(Tf),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),j2=a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:a.string().uuid().describe("Key ID to fetch.")}),Bf=a.object({publicKey:Rf}),GR=a.object({secretKey:Tf}),U2=a.object({publicKey:Rf.extend({value:a.string()})}),F2=a.object({projectId:a.string().uuid().optional().describe("Project to ensure the log forwarding key for. Auto-filled from CLI and SDK context when omitted.")}),$2=a.object({secretKey:Tf.extend({value:a.string()})}),G2=a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:a.string().uuid().describe("Key ID to update."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex($R,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:a.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),H2=a.object({params:a.object({keyId:a.string().uuid().describe("Public key ID to deactivate.")}),query:a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted.")})}).transform(({params:e,query:t})=>({...t,...e})),q2=Bf,V2=a.void(),K2=a.object({organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Y2=a.object({keyId:a.string().uuid().describe("Key ID to fetch."),organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),W2=a.object({organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project to scope this key to. When set, the key can only access resources within this project. Omit for organization-wide access."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex($R,"Name can only contain letters, numbers, spaces, hyphens, and underscores").describe("Human-readable name for the key."),expiresAt:a.string().datetime().optional().describe("Optional expiration timestamp for the key.")}),J2=a.object({keyId:a.string().uuid().describe("Key ID to update."),organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex($R,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:a.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),Z2=a.object({params:a.object({keyId:a.string().uuid().describe("Key ID to delete.")}),query:a.object({organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}).default({})}).transform(({params:e,query:t})=>({...e,...t.organizationId!==void 0?{organizationId:t.organizationId}:{}})),jc=w({operationId:"publicKeys.list",description:"List public keys within one project.",backend:"api",route:{method:"GET",path:"/public-keys",tags:["Public Keys"]},input:N2,output:M2,pagination:"cursor",async:"sync",examples:[{name:"list-public-keys",input:{projectId:"11111111-1111-4111-8111-111111111111",limit:25},output:{publicKeys:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),Uc=w({operationId:"publicKeys.get",description:"Get one public key within one project.",backend:"api",route:{method:"GET",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:j2,output:Bf,pagination:"none",async:"sync",examples:[{name:"get-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Fc=w({operationId:"publicKeys.ensureLogForwarding",description:"Ensure a reusable project-scoped public key exists for CLI log forwarding.",backend:"api",route:{method:"POST",path:"/public-keys/log-forwarding/ensure",tags:["Public Keys"]},input:F2,output:U2,pagination:"none",async:"sync",examples:[{name:"ensure-log-forwarding-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"sazabi-cli-forward",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_public_example"}}}]}),$c=w({operationId:"publicKeys.update",description:"Update one public key within one project.",backend:"api",route:{method:"PATCH",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:G2,output:Bf,pagination:"none",async:"sync",examples:[{name:"rename-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222",name:"Updated CLI forwarder"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"Updated CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Gc=w({operationId:"publicKeys.deactivate",description:"Deactivate one public key within one project. Recently validated requests may continue to authenticate for a short period after deactivation.",backend:"api",route:{method:"POST",path:"/public-keys/{keyId}/deactivate",tags:["Public Keys"],inputStructure:"detailed"},input:H2,output:q2,pagination:"none",async:"sync"}),Of=w({operationId:"secretKeys.list",description:"List secret keys within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys",tags:["Secret Keys"]},input:K2,output:z2,pagination:"cursor",async:"sync",examples:[{name:"list-secret-keys",input:{limit:25},output:{secretKeys:[{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),_f=w({operationId:"secretKeys.get",description:"Get one secret key within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:Y2,output:GR,pagination:"none",async:"sync",examples:[{name:"get-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Df=w({operationId:"secretKeys.create",description:"Create one secret key within the organization.",backend:"api",route:{method:"POST",path:"/secret-keys",successStatus:201,tags:["Secret Keys"]},input:W2,output:$2,pagination:"none",async:"sync",examples:[{name:"create-secret-key",input:{name:"CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_secret_example"}}}]}),Lf=w({operationId:"secretKeys.update",description:"Update one secret key within the organization.",backend:"api",route:{method:"PATCH",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:J2,output:GR,pagination:"none",async:"sync",examples:[{name:"rename-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333",name:"Updated CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"Updated CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Qf=w({operationId:"secretKeys.delete",description:"Delete one secret key within the organization.",backend:"api",route:{method:"DELETE",path:"/secret-keys/{keyId}",successStatus:204,tags:["Secret Keys"],inputStructure:"detailed"},input:Z2,output:V2,pagination:"none",async:"sync"}),SEe={list:jc.contract,get:Uc.contract,ensureLogForwarding:Fc.contract,update:$c.contract,deactivate:Gc.contract},CEe={list:Of.contract,get:_f.contract,create:Df.contract,update:Lf.contract,delete:Qf.contract}});var eG="## Overview\n\nSend Claude Code session telemetry to Sazabi. Every session emits lifecycle events — prompts, tool calls, and model API requests with token counts and cost — as OTLP log records.\n\n## How it works\n\nClaude Code has a first-party OTLP exporter. Set a handful of environment variables in `~/.claude/settings.json` pointing the exporter at your Sazabi intake URL, and Claude Code sends telemetry over OTLP/HTTP on its own — no separate SDK or code changes required.\n\n## Streams\n\n- **Session events** — `claude_code.user_prompt`, `claude_code.tool_result`, `claude_code.api_request`, and related events, with attributes for `prompt`, `model`, `session.id`, `user.email`, token counts, and cost.\n\n## Limitations\n\n- Claude Code **metrics** are not ingested; only the logs exporter is supported.\n";var X2=()=>{};var nG=`---
|
|
105
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1){if(e.reused==="ref"){i(s);continue}}}}function Li(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=(s)=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){r(d);let g=e.seen.get(d),m=g.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))l.allOf=l.allOf??[],l.allOf.push(m);else Object.assign(l,m);if(Object.assign(l,u),s._zod.parent===d)for(let f in l){if(f==="$ref"||f==="allOf")continue;if(!(f in u))delete l[f]}if(m.$ref&&g.def)for(let f in l){if(f==="$ref"||f==="allOf")continue;if(f in g.def&&JSON.stringify(l[f])===JSON.stringify(g.def[f]))delete l[f]}}let p=s._zod.parent;if(p&&p!==d){r(p);let g=e.seen.get(p);if(g?.schema.$ref){if(l.$ref=g.schema.$ref,g.def)for(let m in l){if(m==="$ref"||m==="allOf")continue;if(m in g.def&&JSON.stringify(l[m])===JSON.stringify(g.def[m]))delete l[m]}}}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())r(s[0]);let o={};if(e.target==="draft-2020-12")o.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")o.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")o.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,n.def??n.schema);let i=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];if(c.def&&c.defId)i[c.defId]=c.def}if(e.external);else if(Object.keys(i).length>0)if(e.target==="draft-2020-12")o.$defs=i;else o.definitions=i;try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Rc(t,"input",e.processors),output:Rc(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch(s){throw Error("Error converting schema to JSON.")}}function Pn(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Pn(r.element,n);if(r.type==="set")return Pn(r.valueType,n);if(r.type==="lazy")return Pn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Pn(r.innerType,n);if(r.type==="intersection")return Pn(r.left,n)||Pn(r.right,n);if(r.type==="record"||r.type==="map")return Pn(r.keyType,n)||Pn(r.valueType,n);if(r.type==="pipe")return Pn(r.in,n)||Pn(r.out,n);if(r.type==="object"){for(let o in r.shape)if(Pn(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(Pn(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(Pn(o,n))return!0;if(r.rest&&Pn(r.rest,n))return!0;return!1}return!1}var Kk=(e,t={})=>(n)=>{let r=_i({...n,processors:t});return Ze(e,r),Di(r,e),Li(r,e)},Rc=(e,t,n={})=>(r)=>{let{libraryOptions:o,target:i}=r??{},s=_i({...o??{},target:i,io:t,processors:n});return Ze(e,s),Di(s,e),Li(s,e)};var Hd=h(()=>{Fd()});function AA(e,t){if("_idmap"in e){let r=e,o=_i({...t,processors:gA}),i={};for(let l of r._idmap.entries()){let[u,d]=l;Ze(d,o)}let s={},c={registry:r,uri:t?.uri,defs:i};o.external=c;for(let l of r._idmap.entries()){let[u,d]=l;Di(o,d),s[u]=Li(o,d)}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:i}}return{schemas:s}}let n=_i({...t,processors:gA});return Ze(e,n),Di(n,e),Li(n,e)}var sve,Yk=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:c,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof i==="number")o.minLength=i;if(typeof s==="number")o.maxLength=s;if(c){if(o.format=sve[c]??c,o.format==="")delete o.format;if(c==="time")delete o.format}if(u)o.contentEncoding=u;if(l&&l.size>0){let d=[...l];if(d.length===1)o.pattern=d[0].source;else if(d.length>1)o.allOf=[...d.map((p)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))]}},Wk=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:c,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;if(typeof c==="string"&&c.includes("int"))o.type="integer";else o.type="number";if(typeof d==="number")if(t.target==="draft-04"||t.target==="openapi-3.0")o.minimum=d,o.exclusiveMinimum=!0;else o.exclusiveMinimum=d;if(typeof i==="number"){if(o.minimum=i,typeof d==="number"&&t.target!=="draft-04")if(d>=i)delete o.minimum;else delete o.exclusiveMinimum}if(typeof u==="number")if(t.target==="draft-04"||t.target==="openapi-3.0")o.maximum=u,o.exclusiveMaximum=!0;else o.exclusiveMaximum=u;if(typeof s==="number"){if(o.maximum=s,typeof u==="number"&&t.target!=="draft-04")if(u<=s)delete o.maximum;else delete o.exclusiveMaximum}if(typeof l==="number")o.multipleOf=l},Jk=(e,t,n,r)=>{n.type="boolean"},Zk=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Xk=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},ex=(e,t,n,r)=>{if(t.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},tx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},nx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},ox=(e,t,n,r)=>{n.not={}},rx=(e,t,n,r)=>{},ix=(e,t,n,r)=>{},sx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},ax=(e,t,n,r)=>{let o=e._zod.def,i=vd(o.entries);if(i.every((s)=>typeof s==="number"))n.type="number";if(i.every((s)=>typeof s==="string"))n.type="string";n.enum=i},cx=(e,t,n,r)=>{let o=e._zod.def,i=[];for(let s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s==="bigint")if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else i.push(Number(s));else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0")n.enum=[s];else n.const=s}else{if(i.every((s)=>typeof s==="number"))n.type="number";if(i.every((s)=>typeof s==="string"))n.type="string";if(i.every((s)=>typeof s==="boolean"))n.type="boolean";if(i.every((s)=>s===null))n.type="null";n.enum=i}},lx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},ux=(e,t,n,r)=>{let o=n,i=e._zod.pattern;if(!i)throw Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},dx=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:l}=e._zod.bag;if(s!==void 0)i.minLength=s;if(c!==void 0)i.maxLength=c;if(l)if(l.length===1)i.contentMediaType=l[0],Object.assign(o,i);else Object.assign(o,i),o.anyOf=l.map((u)=>({contentMediaType:u}));else Object.assign(o,i)},px=(e,t,n,r)=>{n.type="boolean"},gx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},mx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},hx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},Ax=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},fx=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},yx=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;if(typeof s==="number")o.minItems=s;if(typeof c==="number")o.maxItems=c;o.type="array",o.items=Ze(i.element,t,{...r,path:[...r.path,"items"]})},bx=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object",o.properties={};let s=i.shape;for(let u in s)o.properties[u]=Ze(s[u],t,{...r,path:[...r.path,"properties",u]});let c=new Set(Object.keys(s)),l=new Set([...c].filter((u)=>{let d=i.shape[u]._zod;if(t.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(l.size>0)o.required=Array.from(l);if(i.catchall?._zod.def.type==="never")o.additionalProperties=!1;else if(!i.catchall){if(t.io==="output")o.additionalProperties=!1}else if(i.catchall)o.additionalProperties=Ze(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})},mA=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((c,l)=>Ze(c,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));if(i)n.oneOf=s;else n.anyOf=s},Ix=(e,t,n,r)=>{let o=e._zod.def,i=Ze(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Ze(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=(u)=>("allOf"in u)&&Object.keys(u).length===1,l=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];n.allOf=l},Sx=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((g,m)=>Ze(g,t,{...r,path:[...r.path,s,m]})),u=i.rest?Ze(i.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;if(t.target==="draft-2020-12"){if(o.prefixItems=l,u)o.items=u}else if(t.target==="openapi-3.0"){if(o.items={anyOf:l},u)o.items.anyOf.push(u);if(o.minItems=l.length,!u)o.maxItems=l.length}else if(o.items=l,u)o.additionalItems=u;let{minimum:d,maximum:p}=e._zod.bag;if(typeof d==="number")o.minItems=d;if(typeof p==="number")o.maxItems=p},Cx=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object";let s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let d=Ze(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let p of l)o.patternProperties[p.source]=d}else{if(t.target==="draft-07"||t.target==="draft-2020-12")o.propertyNames=Ze(i.keyType,t,{...r,path:[...r.path,"propertyNames"]});o.additionalProperties=Ze(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let u=s._zod.values;if(u){let d=[...u].filter((p)=>typeof p==="string"||typeof p==="number");if(d.length>0)o.required=d}},vx=(e,t,n,r)=>{let o=e._zod.def,i=Ze(o.innerType,t,r),s=t.seen.get(e);if(t.target==="openapi-3.0")s.ref=o.innerType,n.nullable=!0;else n.anyOf=[i,{type:"null"}]},wx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Ex=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},kx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);if(i.ref=o.innerType,t.io==="input")n._prefault=JSON.parse(JSON.stringify(o.defaultValue))},xx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Px=(e,t,n,r)=>{let o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Ze(i,t,r);let s=t.seen.get(e);s.ref=i},Rx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Tx=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},hA=(e,t,n,r)=>{let o=e._zod.def;Ze(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Bx=(e,t,n,r)=>{let o=e._zod.innerType;Ze(o,t,r);let i=t.seen.get(e);i.ref=o},gA;var qd=h(()=>{Hd();ge();sve={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gA={string:Yk,number:Wk,boolean:Jk,bigint:Zk,symbol:Xk,null:ex,undefined:tx,void:nx,never:ox,any:rx,unknown:ix,date:sx,enum:ax,literal:cx,nan:lx,template_literal:ux,file:dx,success:px,custom:gx,function:mx,transform:hx,map:Ax,set:fx,array:yx,object:bx,union:mA,intersection:Ix,tuple:Sx,record:Cx,nullable:vx,nonoptional:wx,default:Ex,prefault:kx,catch:xx,pipe:Px,readonly:Rx,promise:Tx,optional:hA,lazy:Bx}});class Ox{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";this.ctx=_i({processors:gA,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return Ze(e,this.ctx,t)}emit(e,t){if(t){if(t.cycles)this.ctx.cycles=t.cycles;if(t.reused)this.ctx.reused=t.reused;if(t.external)this.ctx.external=t.external}Di(this.ctx,e);let n=Li(this.ctx,e),{"~standard":r,...o}=n;return o}}var tF=h(()=>{qd();Hd()});var nF={};var oF=()=>{};var Wr={};cr(Wr,{$ZodAny:()=>Bw,$ZodArray:()=>Qw,$ZodAsyncError:()=>dr,$ZodBase64:()=>Sw,$ZodBase64URL:()=>Cw,$ZodBigInt:()=>Mh,$ZodBigIntFormat:()=>xw,$ZodBoolean:()=>Dd,$ZodCIDRv4:()=>yw,$ZodCIDRv6:()=>bw,$ZodCUID:()=>sw,$ZodCUID2:()=>aw,$ZodCatch:()=>eE,$ZodCheck:()=>dt,$ZodCheckBigIntFormat:()=>Lv,$ZodCheckEndsWith:()=>Vv,$ZodCheckGreaterThan:()=>Rh,$ZodCheckIncludes:()=>Hv,$ZodCheckLengthEquals:()=>Uv,$ZodCheckLessThan:()=>Ph,$ZodCheckLowerCase:()=>$v,$ZodCheckMaxLength:()=>zv,$ZodCheckMaxSize:()=>Qv,$ZodCheckMimeType:()=>Yv,$ZodCheckMinLength:()=>jv,$ZodCheckMinSize:()=>Nv,$ZodCheckMultipleOf:()=>_v,$ZodCheckNumberFormat:()=>Dv,$ZodCheckOverwrite:()=>Wv,$ZodCheckProperty:()=>Kv,$ZodCheckRegex:()=>Fv,$ZodCheckSizeEquals:()=>Mv,$ZodCheckStartsWith:()=>qv,$ZodCheckStringFormat:()=>mc,$ZodCheckUpperCase:()=>Gv,$ZodCodec:()=>Qd,$ZodCustom:()=>cE,$ZodCustomStringFormat:()=>Ew,$ZodDate:()=>Lw,$ZodDefault:()=>Ww,$ZodDiscriminatedUnion:()=>zw,$ZodE164:()=>vw,$ZodEmail:()=>nw,$ZodEmoji:()=>rw,$ZodEncodeError:()=>Qs,$ZodEnum:()=>Gw,$ZodError:()=>Pd,$ZodExactOptional:()=>Kw,$ZodFile:()=>qw,$ZodFunction:()=>iE,$ZodGUID:()=>ew,$ZodIPv4:()=>hw,$ZodIPv6:()=>Aw,$ZodISODate:()=>pw,$ZodISODateTime:()=>dw,$ZodISODuration:()=>mw,$ZodISOTime:()=>gw,$ZodIntersection:()=>jw,$ZodJWT:()=>ww,$ZodKSUID:()=>uw,$ZodLazy:()=>aE,$ZodLiteral:()=>Hw,$ZodMAC:()=>fw,$ZodMap:()=>Fw,$ZodNaN:()=>tE,$ZodNanoID:()=>iw,$ZodNever:()=>_w,$ZodNonOptional:()=>Zw,$ZodNull:()=>Tw,$ZodNullable:()=>Yw,$ZodNumber:()=>Nh,$ZodNumberFormat:()=>kw,$ZodObject:()=>tU,$ZodObjectJIT:()=>Nw,$ZodOptional:()=>jh,$ZodPipe:()=>nE,$ZodPrefault:()=>Jw,$ZodPromise:()=>sE,$ZodReadonly:()=>oE,$ZodRealError:()=>zn,$ZodRecord:()=>Uw,$ZodRegistry:()=>ck,$ZodSet:()=>$w,$ZodString:()=>zs,$ZodStringFormat:()=>at,$ZodSuccess:()=>Xw,$ZodSymbol:()=>Pw,$ZodTemplateLiteral:()=>rE,$ZodTransform:()=>Vw,$ZodTuple:()=>zh,$ZodType:()=>xe,$ZodULID:()=>cw,$ZodURL:()=>ow,$ZodUUID:()=>tw,$ZodUndefined:()=>Rw,$ZodUnion:()=>Ld,$ZodUnknown:()=>Ow,$ZodVoid:()=>Dw,$ZodXID:()=>lw,$ZodXor:()=>Mw,$brand:()=>$C,$constructor:()=>R,$input:()=>ak,$output:()=>sk,Doc:()=>Bh,JSONSchema:()=>nF,JSONSchemaGenerator:()=>Ox,NEVER:()=>Sd,TimePrecision:()=>pk,_any:()=>_k,_array:()=>jk,_base64:()=>rA,_base64url:()=>iA,_bigint:()=>kk,_boolean:()=>wk,_catch:()=>eve,_check:()=>XU,_cidrv4:()=>nA,_cidrv6:()=>oA,_coercedBigint:()=>xk,_coercedBoolean:()=>Ek,_coercedDate:()=>Mk,_coercedNumber:()=>yk,_coercedString:()=>uk,_cuid:()=>Yh,_cuid2:()=>Wh,_custom:()=>Fk,_date:()=>Nk,_decode:()=>bh,_decodeAsync:()=>Sh,_default:()=>JCe,_discriminatedUnion:()=>zCe,_e164:()=>sA,_email:()=>Fh,_emoji:()=>Vh,_encode:()=>yh,_encodeAsync:()=>Ih,_endsWith:()=>Sc,_enum:()=>HCe,_file:()=>Uk,_float32:()=>Ik,_float64:()=>Sk,_gt:()=>gr,_gte:()=>xn,_guid:()=>$d,_includes:()=>bc,_int:()=>bk,_int32:()=>Ck,_int64:()=>Pk,_intersection:()=>jCe,_ipv4:()=>eA,_ipv6:()=>tA,_isoDate:()=>mk,_isoDateTime:()=>gk,_isoDuration:()=>Ak,_isoTime:()=>hk,_jwt:()=>aA,_ksuid:()=>Xh,_lazy:()=>rve,_length:()=>Fs,_literal:()=>VCe,_lowercase:()=>fc,_lt:()=>pr,_lte:()=>ro,_mac:()=>dk,_map:()=>$Ce,_max:()=>ro,_maxLength:()=>Us,_maxSize:()=>Oi,_mime:()=>Cc,_min:()=>xn,_minLength:()=>Yr,_minSize:()=>mr,_multipleOf:()=>Bi,_nan:()=>zk,_nanoid:()=>Kh,_nativeEnum:()=>qCe,_negative:()=>lA,_never:()=>Lk,_nonnegative:()=>dA,_nonoptional:()=>ZCe,_nonpositive:()=>uA,_normalize:()=>vc,_null:()=>Ok,_nullable:()=>WCe,_number:()=>fk,_optional:()=>YCe,_overwrite:()=>$o,_parse:()=>uc,_parseAsync:()=>dc,_pipe:()=>tve,_positive:()=>cA,_promise:()=>ive,_property:()=>pA,_readonly:()=>nve,_record:()=>FCe,_refine:()=>$k,_regex:()=>Ac,_safeDecode:()=>vh,_safeDecodeAsync:()=>Eh,_safeEncode:()=>Ch,_safeEncodeAsync:()=>wh,_safeParse:()=>pc,_safeParseAsync:()=>gc,_set:()=>GCe,_size:()=>js,_slugify:()=>xc,_startsWith:()=>Ic,_string:()=>lk,_stringFormat:()=>Pc,_stringbool:()=>Vk,_success:()=>XCe,_superRefine:()=>Gk,_symbol:()=>Tk,_templateLiteral:()=>ove,_toLowerCase:()=>Ec,_toUpperCase:()=>kc,_transform:()=>KCe,_trim:()=>wc,_tuple:()=>UCe,_uint32:()=>vk,_uint64:()=>Rk,_ulid:()=>Jh,_undefined:()=>Bk,_union:()=>NCe,_unknown:()=>Dk,_uppercase:()=>yc,_url:()=>Gd,_uuid:()=>$h,_uuidv4:()=>Gh,_uuidv6:()=>Hh,_uuidv7:()=>qh,_void:()=>Qk,_xid:()=>Zh,_xor:()=>MCe,clone:()=>kn,config:()=>Rt,createStandardJSONSchemaMethod:()=>Rc,createToJSONSchemaMethod:()=>Kk,decode:()=>cSe,decodeAsync:()=>uSe,describe:()=>Hk,encode:()=>aSe,encodeAsync:()=>lSe,extractDefs:()=>Di,finalize:()=>Li,flattenError:()=>Rd,formatError:()=>Td,globalConfig:()=>Id,globalRegistry:()=>en,initializeContext:()=>_i,isValidBase64:()=>Iw,isValidBase64URL:()=>Jj,isValidJWT:()=>Zj,locales:()=>Ud,meta:()=>qk,parse:()=>Ah,parseAsync:()=>fh,prettifyError:()=>ev,process:()=>Ze,regexes:()=>Co,registry:()=>Uh,safeDecode:()=>pSe,safeDecodeAsync:()=>mSe,safeEncode:()=>dSe,safeEncodeAsync:()=>gSe,safeParse:()=>nv,safeParseAsync:()=>ov,toDotPath:()=>_j,toJSONSchema:()=>AA,treeifyError:()=>XC,util:()=>J,version:()=>Jv});var io=h(()=>{ge();xh();ik();qd();tF();oF();sc();rv();tv();lE();Th();Zv();Fd();eF();Hd()});var fA={};cr(fA,{endsWith:()=>Sc,gt:()=>gr,gte:()=>xn,includes:()=>bc,length:()=>Fs,lowercase:()=>fc,lt:()=>pr,lte:()=>ro,maxLength:()=>Us,maxSize:()=>Oi,mime:()=>Cc,minLength:()=>Yr,minSize:()=>mr,multipleOf:()=>Bi,negative:()=>lA,nonnegative:()=>dA,nonpositive:()=>uA,normalize:()=>vc,overwrite:()=>$o,positive:()=>cA,property:()=>pA,regex:()=>Ac,size:()=>js,slugify:()=>xc,startsWith:()=>Ic,toLowerCase:()=>Ec,toUpperCase:()=>kc,trim:()=>wc,uppercase:()=>yc});var yA=h(()=>{io()});var Qi={};cr(Qi,{ZodISODate:()=>IA,ZodISODateTime:()=>bA,ZodISODuration:()=>CA,ZodISOTime:()=>SA,date:()=>Dx,datetime:()=>_x,duration:()=>Qx,time:()=>Lx});function _x(e){return gk(bA,e)}function Dx(e){return mk(IA,e)}function Lx(e){return hk(SA,e)}function Qx(e){return Ak(CA,e)}var bA,IA,SA,CA;var Vd=h(()=>{io();Yd();bA=R("ZodISODateTime",(e,t)=>{dw.init(e,t),ct.init(e,t)});IA=R("ZodISODate",(e,t)=>{pw.init(e,t),ct.init(e,t)});SA=R("ZodISOTime",(e,t)=>{gw.init(e,t),ct.init(e,t)});CA=R("ZodISODuration",(e,t)=>{mw.init(e,t),ct.init(e,t)})});var rF=(e,t)=>{Pd.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(n)=>Td(e,n)},flatten:{value:(n)=>Rd(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ac,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ac,2)}},isEmpty:{get(){return e.issues.length===0}}})},cve,jn;var Nx=h(()=>{io();io();ge();cve=R("ZodError",rF),jn=R("ZodError",rF,{Parent:Error})});var Mx,zx,jx,Ux,Fx,$x,Gx,Hx,qx,Vx,Kx,Yx;var Wx=h(()=>{io();Nx();Mx=uc(jn),zx=dc(jn),jx=pc(jn),Ux=gc(jn),Fx=yh(jn),$x=bh(jn),Gx=Ih(jn),Hx=Sh(jn),qx=Ch(jn),Vx=vh(jn),Kx=wh(jn),Yx=Eh(jn)});var Kd={};cr(Kd,{ZodAny:()=>tP,ZodArray:()=>iP,ZodBase64:()=>MA,ZodBase64URL:()=>zA,ZodBigInt:()=>Lc,ZodBigIntFormat:()=>FA,ZodBoolean:()=>Dc,ZodCIDRv4:()=>QA,ZodCIDRv6:()=>NA,ZodCUID:()=>RA,ZodCUID2:()=>TA,ZodCatch:()=>EP,ZodCodec:()=>YA,ZodCustom:()=>sp,ZodCustomStringFormat:()=>Oc,ZodDate:()=>tp,ZodDefault:()=>bP,ZodDiscriminatedUnion:()=>aP,ZodE164:()=>jA,ZodEmail:()=>EA,ZodEmoji:()=>xA,ZodEnum:()=>Tc,ZodExactOptional:()=>AP,ZodFile:()=>mP,ZodFunction:()=>DP,ZodGUID:()=>Wd,ZodIPv4:()=>DA,ZodIPv6:()=>LA,ZodIntersection:()=>cP,ZodJWT:()=>UA,ZodKSUID:()=>_A,ZodLazy:()=>BP,ZodLiteral:()=>gP,ZodMAC:()=>Jx,ZodMap:()=>dP,ZodNaN:()=>xP,ZodNanoID:()=>PA,ZodNever:()=>oP,ZodNonOptional:()=>VA,ZodNull:()=>eP,ZodNullable:()=>yP,ZodNumber:()=>_c,ZodNumberFormat:()=>$s,ZodObject:()=>np,ZodOptional:()=>qA,ZodPipe:()=>KA,ZodPrefault:()=>SP,ZodPromise:()=>_P,ZodReadonly:()=>PP,ZodRecord:()=>ip,ZodSet:()=>pP,ZodString:()=>Bc,ZodStringFormat:()=>ct,ZodSuccess:()=>wP,ZodSymbol:()=>Zx,ZodTemplateLiteral:()=>TP,ZodTransform:()=>hP,ZodTuple:()=>lP,ZodType:()=>_e,ZodULID:()=>BA,ZodURL:()=>Xd,ZodUUID:()=>hr,ZodUndefined:()=>Xx,ZodUnion:()=>op,ZodUnknown:()=>nP,ZodVoid:()=>rP,ZodXID:()=>OA,ZodXor:()=>sP,_ZodString:()=>wA,_default:()=>IP,_function:()=>r$,any:()=>$A,array:()=>ee,base64:()=>wF,base64url:()=>EF,bigint:()=>QF,boolean:()=>Xe,catch:()=>kP,check:()=>i$,cidrv4:()=>CF,cidrv6:()=>vF,codec:()=>t$,cuid:()=>mF,cuid2:()=>hF,custom:()=>WA,date:()=>FF,describe:()=>s$,discriminatedUnion:()=>rp,e164:()=>kF,email:()=>iF,emoji:()=>pF,enum:()=>tn,exactOptional:()=>fP,file:()=>JF,float32:()=>OF,float64:()=>_F,function:()=>r$,guid:()=>sF,hash:()=>BF,hex:()=>TF,hostname:()=>RF,httpUrl:()=>dF,instanceof:()=>c$,int:()=>vA,int32:()=>DF,int64:()=>NF,intersection:()=>Qc,ipv4:()=>bF,ipv6:()=>SF,json:()=>u$,jwt:()=>xF,keyof:()=>$F,ksuid:()=>yF,lazy:()=>OP,literal:()=>ue,looseObject:()=>Tt,looseRecord:()=>VF,mac:()=>IF,map:()=>KF,meta:()=>a$,nan:()=>e$,nanoid:()=>gF,nativeEnum:()=>WF,never:()=>GA,nonoptional:()=>vP,null:()=>ep,nullable:()=>Jd,nullish:()=>ZF,number:()=>je,object:()=>ne,optional:()=>pt,partialRecord:()=>qF,pipe:()=>Zd,prefault:()=>CP,preprocess:()=>ap,promise:()=>o$,readonly:()=>RP,record:()=>tt,refine:()=>LP,set:()=>YF,strictObject:()=>GF,string:()=>k,stringFormat:()=>PF,stringbool:()=>l$,success:()=>XF,superRefine:()=>QP,symbol:()=>zF,templateLiteral:()=>n$,transform:()=>HA,tuple:()=>uP,uint32:()=>LF,uint64:()=>MF,ulid:()=>AF,undefined:()=>jF,union:()=>ut,unknown:()=>lt,url:()=>kA,uuid:()=>aF,uuidv4:()=>cF,uuidv6:()=>lF,uuidv7:()=>uF,void:()=>UF,xid:()=>fF,xor:()=>HF});function k(e){return lk(Bc,e)}function iF(e){return Fh(EA,e)}function sF(e){return $d(Wd,e)}function aF(e){return $h(hr,e)}function cF(e){return Gh(hr,e)}function lF(e){return Hh(hr,e)}function uF(e){return qh(hr,e)}function kA(e){return Gd(Xd,e)}function dF(e){return Gd(Xd,{protocol:/^https?$/,hostname:Co.domain,...J.normalizeParams(e)})}function pF(e){return Vh(xA,e)}function gF(e){return Kh(PA,e)}function mF(e){return Yh(RA,e)}function hF(e){return Wh(TA,e)}function AF(e){return Jh(BA,e)}function fF(e){return Zh(OA,e)}function yF(e){return Xh(_A,e)}function bF(e){return eA(DA,e)}function IF(e){return dk(Jx,e)}function SF(e){return tA(LA,e)}function CF(e){return nA(QA,e)}function vF(e){return oA(NA,e)}function wF(e){return rA(MA,e)}function EF(e){return iA(zA,e)}function kF(e){return sA(jA,e)}function xF(e){return aA(UA,e)}function PF(e,t,n={}){return Pc(Oc,e,t,n)}function RF(e){return Pc(Oc,"hostname",Co.hostname,e)}function TF(e){return Pc(Oc,"hex",Co.hex,e)}function BF(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=Co[r];if(!o)throw Error(`Unrecognized hash format: ${r}`);return Pc(Oc,r,o,t)}function je(e){return fk(_c,e)}function vA(e){return bk($s,e)}function OF(e){return Ik($s,e)}function _F(e){return Sk($s,e)}function DF(e){return Ck($s,e)}function LF(e){return vk($s,e)}function Xe(e){return wk(Dc,e)}function QF(e){return kk(Lc,e)}function NF(e){return Pk(FA,e)}function MF(e){return Rk(FA,e)}function zF(e){return Tk(Zx,e)}function jF(e){return Bk(Xx,e)}function ep(e){return Ok(eP,e)}function $A(){return _k(tP)}function lt(){return Dk(nP)}function GA(e){return Lk(oP,e)}function UF(e){return Qk(rP,e)}function FF(e){return Nk(tp,e)}function ee(e,t){return jk(iP,e,t)}function $F(e){let t=e._zod.def.shape;return tn(Object.keys(t))}function ne(e,t){let n={type:"object",shape:e??{},...J.normalizeParams(t)};return new np(n)}function GF(e,t){return new np({type:"object",shape:e,catchall:GA(),...J.normalizeParams(t)})}function Tt(e,t){return new np({type:"object",shape:e,catchall:lt(),...J.normalizeParams(t)})}function ut(e,t){return new op({type:"union",options:e,...J.normalizeParams(t)})}function HF(e,t){return new sP({type:"union",options:e,inclusive:!1,...J.normalizeParams(t)})}function rp(e,t,n){return new aP({type:"union",options:t,discriminator:e,...J.normalizeParams(n)})}function Qc(e,t){return new cP({type:"intersection",left:e,right:t})}function uP(e,t,n){let r=t instanceof xe,o=r?n:t;return new lP({type:"tuple",items:e,rest:r?t:null,...J.normalizeParams(o)})}function tt(e,t,n){return new ip({type:"record",keyType:e,valueType:t,...J.normalizeParams(n)})}function qF(e,t,n){let r=kn(e);return r._zod.values=void 0,new ip({type:"record",keyType:r,valueType:t,...J.normalizeParams(n)})}function VF(e,t,n){return new ip({type:"record",keyType:e,valueType:t,mode:"loose",...J.normalizeParams(n)})}function KF(e,t,n){return new dP({type:"map",keyType:e,valueType:t,...J.normalizeParams(n)})}function YF(e,t){return new pP({type:"set",valueType:e,...J.normalizeParams(t)})}function tn(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map((r)=>[r,r])):e;return new Tc({type:"enum",entries:n,...J.normalizeParams(t)})}function WF(e,t){return new Tc({type:"enum",entries:e,...J.normalizeParams(t)})}function ue(e,t){return new gP({type:"literal",values:Array.isArray(e)?e:[e],...J.normalizeParams(t)})}function JF(e){return Uk(mP,e)}function HA(e){return new hP({type:"transform",transform:e})}function pt(e){return new qA({type:"optional",innerType:e})}function fP(e){return new AP({type:"optional",innerType:e})}function Jd(e){return new yP({type:"nullable",innerType:e})}function ZF(e){return pt(Jd(e))}function IP(e,t){return new bP({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():J.shallowClone(t)}})}function CP(e,t){return new SP({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():J.shallowClone(t)}})}function vP(e,t){return new VA({type:"nonoptional",innerType:e,...J.normalizeParams(t)})}function XF(e){return new wP({type:"success",innerType:e})}function kP(e,t){return new EP({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}function e$(e){return zk(xP,e)}function Zd(e,t){return new KA({type:"pipe",in:e,out:t})}function t$(e,t,n){return new YA({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function RP(e){return new PP({type:"readonly",innerType:e})}function n$(e,t){return new TP({type:"template_literal",parts:e,...J.normalizeParams(t)})}function OP(e){return new BP({type:"lazy",getter:e})}function o$(e){return new _P({type:"promise",innerType:e})}function r$(e){return new DP({type:"function",input:Array.isArray(e?.input)?uP(e?.input):e?.input??ee(lt()),output:e?.output??lt()})}function i$(e){let t=new dt({check:"custom"});return t._zod.check=e,t}function WA(e,t){return Fk(sp,e??(()=>!0),t)}function LP(e,t={}){return $k(sp,e,t)}function QP(e){return Gk(e)}function c$(e,t={}){let n=new sp({type:"custom",check:"custom",fn:(r)=>r instanceof e,abort:!0,...J.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=(r)=>{if(!(r.value instanceof e))r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function u$(e){let t=OP(()=>ut([k(e),je(),Xe(),ep(),ee(t),tt(k(),t)]));return t}function ap(e,t){return Zd(HA(e),t)}var _e,wA,Bc,ct,EA,Wd,hr,Xd,xA,PA,RA,TA,BA,OA,_A,DA,Jx,LA,QA,NA,MA,zA,jA,UA,Oc,_c,$s,Dc,Lc,FA,Zx,Xx,eP,tP,nP,oP,rP,tp,iP,np,op,sP,aP,cP,lP,ip,dP,pP,Tc,gP,mP,hP,qA,AP,yP,bP,SP,VA,wP,EP,xP,KA,YA,PP,TP,BP,_P,DP,sp,s$,a$,l$=(...e)=>Vk({Codec:YA,Boolean:Dc,String:Bc},...e);var Yd=h(()=>{io();io();qd();Hd();yA();Vd();Wx();_e=R("ZodType",(e,t)=>(xe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Rc(e,"input"),output:Rc(e,"output")}}),e.toJSONSchema=Kk(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(J.mergeDefs(t,{checks:[...t.checks??[],...n.map((r)=>typeof r==="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>kn(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>Mx(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>jx(e,n,r),e.parseAsync=async(n,r)=>zx(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Ux(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Fx(e,n,r),e.decode=(n,r)=>$x(e,n,r),e.encodeAsync=async(n,r)=>Gx(e,n,r),e.decodeAsync=async(n,r)=>Hx(e,n,r),e.safeEncode=(n,r)=>qx(e,n,r),e.safeDecode=(n,r)=>Vx(e,n,r),e.safeEncodeAsync=async(n,r)=>Kx(e,n,r),e.safeDecodeAsync=async(n,r)=>Yx(e,n,r),e.refine=(n,r)=>e.check(LP(n,r)),e.superRefine=(n)=>e.check(QP(n)),e.overwrite=(n)=>e.check($o(n)),e.optional=()=>pt(e),e.exactOptional=()=>fP(e),e.nullable=()=>Jd(e),e.nullish=()=>pt(Jd(e)),e.nonoptional=(n)=>vP(e,n),e.array=()=>ee(e),e.or=(n)=>ut([e,n]),e.and=(n)=>Qc(e,n),e.transform=(n)=>Zd(e,HA(n)),e.default=(n)=>IP(e,n),e.prefault=(n)=>CP(e,n),e.catch=(n)=>kP(e,n),e.pipe=(n)=>Zd(e,n),e.readonly=()=>RP(e),e.describe=(n)=>{let r=e.clone();return en.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return en.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return en.get(e);let r=e.clone();return en.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=(n)=>n(e),e)),wA=R("_ZodString",(e,t)=>{zs.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Yk(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Ac(...r)),e.includes=(...r)=>e.check(bc(...r)),e.startsWith=(...r)=>e.check(Ic(...r)),e.endsWith=(...r)=>e.check(Sc(...r)),e.min=(...r)=>e.check(Yr(...r)),e.max=(...r)=>e.check(Us(...r)),e.length=(...r)=>e.check(Fs(...r)),e.nonempty=(...r)=>e.check(Yr(1,...r)),e.lowercase=(r)=>e.check(fc(r)),e.uppercase=(r)=>e.check(yc(r)),e.trim=()=>e.check(wc()),e.normalize=(...r)=>e.check(vc(...r)),e.toLowerCase=()=>e.check(Ec()),e.toUpperCase=()=>e.check(kc()),e.slugify=()=>e.check(xc())}),Bc=R("ZodString",(e,t)=>{zs.init(e,t),wA.init(e,t),e.email=(n)=>e.check(Fh(EA,n)),e.url=(n)=>e.check(Gd(Xd,n)),e.jwt=(n)=>e.check(aA(UA,n)),e.emoji=(n)=>e.check(Vh(xA,n)),e.guid=(n)=>e.check($d(Wd,n)),e.uuid=(n)=>e.check($h(hr,n)),e.uuidv4=(n)=>e.check(Gh(hr,n)),e.uuidv6=(n)=>e.check(Hh(hr,n)),e.uuidv7=(n)=>e.check(qh(hr,n)),e.nanoid=(n)=>e.check(Kh(PA,n)),e.guid=(n)=>e.check($d(Wd,n)),e.cuid=(n)=>e.check(Yh(RA,n)),e.cuid2=(n)=>e.check(Wh(TA,n)),e.ulid=(n)=>e.check(Jh(BA,n)),e.base64=(n)=>e.check(rA(MA,n)),e.base64url=(n)=>e.check(iA(zA,n)),e.xid=(n)=>e.check(Zh(OA,n)),e.ksuid=(n)=>e.check(Xh(_A,n)),e.ipv4=(n)=>e.check(eA(DA,n)),e.ipv6=(n)=>e.check(tA(LA,n)),e.cidrv4=(n)=>e.check(nA(QA,n)),e.cidrv6=(n)=>e.check(oA(NA,n)),e.e164=(n)=>e.check(sA(jA,n)),e.datetime=(n)=>e.check(_x(n)),e.date=(n)=>e.check(Dx(n)),e.time=(n)=>e.check(Lx(n)),e.duration=(n)=>e.check(Qx(n))});ct=R("ZodStringFormat",(e,t)=>{at.init(e,t),wA.init(e,t)}),EA=R("ZodEmail",(e,t)=>{nw.init(e,t),ct.init(e,t)});Wd=R("ZodGUID",(e,t)=>{ew.init(e,t),ct.init(e,t)});hr=R("ZodUUID",(e,t)=>{tw.init(e,t),ct.init(e,t)});Xd=R("ZodURL",(e,t)=>{ow.init(e,t),ct.init(e,t)});xA=R("ZodEmoji",(e,t)=>{rw.init(e,t),ct.init(e,t)});PA=R("ZodNanoID",(e,t)=>{iw.init(e,t),ct.init(e,t)});RA=R("ZodCUID",(e,t)=>{sw.init(e,t),ct.init(e,t)});TA=R("ZodCUID2",(e,t)=>{aw.init(e,t),ct.init(e,t)});BA=R("ZodULID",(e,t)=>{cw.init(e,t),ct.init(e,t)});OA=R("ZodXID",(e,t)=>{lw.init(e,t),ct.init(e,t)});_A=R("ZodKSUID",(e,t)=>{uw.init(e,t),ct.init(e,t)});DA=R("ZodIPv4",(e,t)=>{hw.init(e,t),ct.init(e,t)});Jx=R("ZodMAC",(e,t)=>{fw.init(e,t),ct.init(e,t)});LA=R("ZodIPv6",(e,t)=>{Aw.init(e,t),ct.init(e,t)});QA=R("ZodCIDRv4",(e,t)=>{yw.init(e,t),ct.init(e,t)});NA=R("ZodCIDRv6",(e,t)=>{bw.init(e,t),ct.init(e,t)});MA=R("ZodBase64",(e,t)=>{Sw.init(e,t),ct.init(e,t)});zA=R("ZodBase64URL",(e,t)=>{Cw.init(e,t),ct.init(e,t)});jA=R("ZodE164",(e,t)=>{vw.init(e,t),ct.init(e,t)});UA=R("ZodJWT",(e,t)=>{ww.init(e,t),ct.init(e,t)});Oc=R("ZodCustomStringFormat",(e,t)=>{Ew.init(e,t),ct.init(e,t)});_c=R("ZodNumber",(e,t)=>{Nh.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Wk(e,r,o,i),e.gt=(r,o)=>e.check(gr(r,o)),e.gte=(r,o)=>e.check(xn(r,o)),e.min=(r,o)=>e.check(xn(r,o)),e.lt=(r,o)=>e.check(pr(r,o)),e.lte=(r,o)=>e.check(ro(r,o)),e.max=(r,o)=>e.check(ro(r,o)),e.int=(r)=>e.check(vA(r)),e.safe=(r)=>e.check(vA(r)),e.positive=(r)=>e.check(gr(0,r)),e.nonnegative=(r)=>e.check(xn(0,r)),e.negative=(r)=>e.check(pr(0,r)),e.nonpositive=(r)=>e.check(ro(0,r)),e.multipleOf=(r,o)=>e.check(Bi(r,o)),e.step=(r,o)=>e.check(Bi(r,o)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});$s=R("ZodNumberFormat",(e,t)=>{kw.init(e,t),_c.init(e,t)});Dc=R("ZodBoolean",(e,t)=>{Dd.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jk(e,n,r,o)});Lc=R("ZodBigInt",(e,t)=>{Mh.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Zk(e,r,o,i),e.gte=(r,o)=>e.check(xn(r,o)),e.min=(r,o)=>e.check(xn(r,o)),e.gt=(r,o)=>e.check(gr(r,o)),e.gte=(r,o)=>e.check(xn(r,o)),e.min=(r,o)=>e.check(xn(r,o)),e.lt=(r,o)=>e.check(pr(r,o)),e.lte=(r,o)=>e.check(ro(r,o)),e.max=(r,o)=>e.check(ro(r,o)),e.positive=(r)=>e.check(gr(BigInt(0),r)),e.negative=(r)=>e.check(pr(BigInt(0),r)),e.nonpositive=(r)=>e.check(ro(BigInt(0),r)),e.nonnegative=(r)=>e.check(xn(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(Bi(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});FA=R("ZodBigIntFormat",(e,t)=>{xw.init(e,t),Lc.init(e,t)});Zx=R("ZodSymbol",(e,t)=>{Pw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xk(e,n,r,o)});Xx=R("ZodUndefined",(e,t)=>{Rw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tx(e,n,r,o)});eP=R("ZodNull",(e,t)=>{Tw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ex(e,n,r,o)});tP=R("ZodAny",(e,t)=>{Bw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rx(e,n,r,o)});nP=R("ZodUnknown",(e,t)=>{Ow.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ix(e,n,r,o)});oP=R("ZodNever",(e,t)=>{_w.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ox(e,n,r,o)});rP=R("ZodVoid",(e,t)=>{Dw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nx(e,n,r,o)});tp=R("ZodDate",(e,t)=>{Lw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>sx(e,r,o,i),e.min=(r,o)=>e.check(xn(r,o)),e.max=(r,o)=>e.check(ro(r,o));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});iP=R("ZodArray",(e,t)=>{Qw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yx(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Yr(n,r)),e.nonempty=(n)=>e.check(Yr(1,n)),e.max=(n,r)=>e.check(Us(n,r)),e.length=(n,r)=>e.check(Fs(n,r)),e.unwrap=()=>e.element});np=R("ZodObject",(e,t)=>{Nw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bx(e,n,r,o),J.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>tn(Object.keys(e._zod.def.shape)),e.catchall=(n)=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:lt()}),e.loose=()=>e.clone({...e._zod.def,catchall:lt()}),e.strict=()=>e.clone({...e._zod.def,catchall:GA()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=(n)=>J.extend(e,n),e.safeExtend=(n)=>J.safeExtend(e,n),e.merge=(n)=>J.merge(e,n),e.pick=(n)=>J.pick(e,n),e.omit=(n)=>J.omit(e,n),e.partial=(...n)=>J.partial(qA,e,n[0]),e.required=(...n)=>J.required(VA,e,n[0])});op=R("ZodUnion",(e,t)=>{Ld.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mA(e,n,r,o),e.options=t.options});sP=R("ZodXor",(e,t)=>{op.init(e,t),Mw.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mA(e,n,r,o),e.options=t.options});aP=R("ZodDiscriminatedUnion",(e,t)=>{op.init(e,t),zw.init(e,t)});cP=R("ZodIntersection",(e,t)=>{jw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ix(e,n,r,o)});lP=R("ZodTuple",(e,t)=>{zh.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Sx(e,n,r,o),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});ip=R("ZodRecord",(e,t)=>{Uw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cx(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});dP=R("ZodMap",(e,t)=>{Fw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ax(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(mr(...n)),e.nonempty=(n)=>e.check(mr(1,n)),e.max=(...n)=>e.check(Oi(...n)),e.size=(...n)=>e.check(js(...n))});pP=R("ZodSet",(e,t)=>{$w.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fx(e,n,r,o),e.min=(...n)=>e.check(mr(...n)),e.nonempty=(n)=>e.check(mr(1,n)),e.max=(...n)=>e.check(Oi(...n)),e.size=(...n)=>e.check(js(...n))});Tc=R("ZodEnum",(e,t)=>{Gw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,o,i)=>ax(e,r,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new Tc({...t,checks:[],...J.normalizeParams(o),entries:i})},e.exclude=(r,o)=>{let i={...t.entries};for(let s of r)if(n.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new Tc({...t,checks:[],...J.normalizeParams(o),entries:i})}});gP=R("ZodLiteral",(e,t)=>{Hw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cx(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});mP=R("ZodFile",(e,t)=>{qw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dx(e,n,r,o),e.min=(n,r)=>e.check(mr(n,r)),e.max=(n,r)=>e.check(Oi(n,r)),e.mime=(n,r)=>e.check(Cc(Array.isArray(n)?n:[n],r))});hP=R("ZodTransform",(e,t)=>{Vw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hx(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Qs(e.constructor.name);n.addIssue=(i)=>{if(typeof i==="string")n.issues.push(J.issue(i,n.value,t));else{let s=i;if(s.fatal)s.continue=!1;s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(J.issue(s))}};let o=t.transform(n.value,n);if(o instanceof Promise)return o.then((i)=>(n.value=i,n));return n.value=o,n}});qA=R("ZodOptional",(e,t)=>{jh.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hA(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});AP=R("ZodExactOptional",(e,t)=>{Kw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hA(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});yP=R("ZodNullable",(e,t)=>{Yw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});bP=R("ZodDefault",(e,t)=>{Ww.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ex(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});SP=R("ZodPrefault",(e,t)=>{Jw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});VA=R("ZodNonOptional",(e,t)=>{Zw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});wP=R("ZodSuccess",(e,t)=>{Xw.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>px(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});EP=R("ZodCatch",(e,t)=>{eE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});xP=R("ZodNaN",(e,t)=>{tE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lx(e,n,r,o)});KA=R("ZodPipe",(e,t)=>{nE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Px(e,n,r,o),e.in=t.in,e.out=t.out});YA=R("ZodCodec",(e,t)=>{KA.init(e,t),Qd.init(e,t)});PP=R("ZodReadonly",(e,t)=>{oE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});TP=R("ZodTemplateLiteral",(e,t)=>{rE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ux(e,n,r,o)});BP=R("ZodLazy",(e,t)=>{aE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bx(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});_P=R("ZodPromise",(e,t)=>{sE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Tx(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});DP=R("ZodFunction",(e,t)=>{iE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mx(e,n,r,o)});sp=R("ZodCustom",(e,t)=>{cE.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gx(e,n,r,o)});s$=Hk,a$=qk});function uve(e){Rt({customError:e})}function dve(){return Rt().customError}var MP,NP;var d$=h(()=>{io();MP={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};(function(e){})(NP||(NP={}))});function gve(e,t){let n=e.$schema;if(n==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(n==="http://json-schema.org/draft-07/schema#")return"draft-7";if(n==="http://json-schema.org/draft-04/schema#")return"draft-4";return t??"draft-2020-12"}function mve(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let o=n[1];if(!o||!t.defs[o])throw Error(`Reference not found: ${e}`);return t.defs[o]}throw Error(`Reference not found: ${e}`)}function p$(e,t){if(e.not!==void 0){if(typeof e.not==="object"&&Object.keys(e.not).length===0)return ie.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return ie.lazy(()=>{if(!t.refs.has(o))throw Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=mve(o,t),s=An(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return ie.null();if(o.length===0)return ie.never();if(o.length===1)return ie.literal(o[0]);if(o.every((s)=>typeof s==="string"))return ie.enum(o);let i=o.map((s)=>ie.literal(s));if(i.length<2)return i[0];return ie.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return ie.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map((i)=>{let s={...e,type:i};return p$(s,t)});if(o.length===0)return ie.never();if(o.length===1)return o[0];return ie.union(o)}if(!n)return ie.any();let r;switch(n){case"string":{let o=ie.string();if(e.format){let i=e.format;if(i==="email")o=o.check(ie.email());else if(i==="uri"||i==="uri-reference")o=o.check(ie.url());else if(i==="uuid"||i==="guid")o=o.check(ie.uuid());else if(i==="date-time")o=o.check(ie.iso.datetime());else if(i==="date")o=o.check(ie.iso.date());else if(i==="time")o=o.check(ie.iso.time());else if(i==="duration")o=o.check(ie.iso.duration());else if(i==="ipv4")o=o.check(ie.ipv4());else if(i==="ipv6")o=o.check(ie.ipv6());else if(i==="mac")o=o.check(ie.mac());else if(i==="cidr")o=o.check(ie.cidrv4());else if(i==="cidr-v6")o=o.check(ie.cidrv6());else if(i==="base64")o=o.check(ie.base64());else if(i==="base64url")o=o.check(ie.base64url());else if(i==="e164")o=o.check(ie.e164());else if(i==="jwt")o=o.check(ie.jwt());else if(i==="emoji")o=o.check(ie.emoji());else if(i==="nanoid")o=o.check(ie.nanoid());else if(i==="cuid")o=o.check(ie.cuid());else if(i==="cuid2")o=o.check(ie.cuid2());else if(i==="ulid")o=o.check(ie.ulid());else if(i==="xid")o=o.check(ie.xid());else if(i==="ksuid")o=o.check(ie.ksuid())}if(typeof e.minLength==="number")o=o.min(e.minLength);if(typeof e.maxLength==="number")o=o.max(e.maxLength);if(e.pattern)o=o.regex(new RegExp(e.pattern));r=o;break}case"number":case"integer":{let o=n==="integer"?ie.number().int():ie.number();if(typeof e.minimum==="number")o=o.min(e.minimum);if(typeof e.maximum==="number")o=o.max(e.maximum);if(typeof e.exclusiveMinimum==="number")o=o.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum==="number")o=o.gt(e.minimum);if(typeof e.exclusiveMaximum==="number")o=o.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum==="number")o=o.lt(e.maximum);if(typeof e.multipleOf==="number")o=o.multipleOf(e.multipleOf);r=o;break}case"boolean":{r=ie.boolean();break}case"null":{r=ie.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[l,u]of Object.entries(i)){let d=An(u,t);o[l]=s.has(l)?d:d.optional()}if(e.propertyNames){let l=An(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties==="object"?An(e.additionalProperties,t):ie.any();if(Object.keys(o).length===0){r=ie.record(l,u);break}let d=ie.object(o).passthrough(),p=ie.looseRecord(l,u);r=ie.intersection(d,p);break}if(e.patternProperties){let l=e.patternProperties,u=Object.keys(l),d=[];for(let g of u){let m=An(l[g],t),A=ie.string().regex(new RegExp(g));d.push(ie.looseRecord(A,m))}let p=[];if(Object.keys(o).length>0)p.push(ie.object(o).passthrough());if(p.push(...d),p.length===0)r=ie.object({}).passthrough();else if(p.length===1)r=p[0];else{let g=ie.intersection(p[0],p[1]);for(let m=2;m<p.length;m++)g=ie.intersection(g,p[m]);r=g}break}let c=ie.object(o);if(e.additionalProperties===!1)r=c.strict();else if(typeof e.additionalProperties==="object")r=c.catchall(An(e.additionalProperties,t));else r=c.passthrough();break}case"array":{let{prefixItems:o,items:i}=e;if(o&&Array.isArray(o)){let s=o.map((l)=>An(l,t)),c=i&&typeof i==="object"&&!Array.isArray(i)?An(i,t):void 0;if(c)r=ie.tuple(s).rest(c);else r=ie.tuple(s);if(typeof e.minItems==="number")r=r.check(ie.minLength(e.minItems));if(typeof e.maxItems==="number")r=r.check(ie.maxLength(e.maxItems))}else if(Array.isArray(i)){let s=i.map((l)=>An(l,t)),c=e.additionalItems&&typeof e.additionalItems==="object"?An(e.additionalItems,t):void 0;if(c)r=ie.tuple(s).rest(c);else r=ie.tuple(s);if(typeof e.minItems==="number")r=r.check(ie.minLength(e.minItems));if(typeof e.maxItems==="number")r=r.check(ie.maxLength(e.maxItems))}else if(i!==void 0){let s=An(i,t),c=ie.array(s);if(typeof e.minItems==="number")c=c.min(e.minItems);if(typeof e.maxItems==="number")c=c.max(e.maxItems);r=c}else r=ie.array(ie.any());break}default:throw Error(`Unsupported type: ${n}`)}if(e.description)r=r.describe(e.description);if(e.default!==void 0)r=r.default(e.default);return r}function An(e,t){if(typeof e==="boolean")return e?ie.any():ie.never();let n=p$(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map((u)=>An(u,t)),l=ie.union(c);n=r?ie.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map((u)=>An(u,t)),l=ie.xor(c);n=r?ie.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:ie.any();else{let c=r?n:An(e.allOf[0],t),l=r?0:1;for(let u=l;u<e.allOf.length;u++)c=ie.intersection(c,An(e.allOf[u],t));n=c}if(e.nullable===!0&&t.version==="openapi-3.0")n=ie.nullable(n);if(e.readOnly===!0)n=ie.readonly(n);let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)if(c in e)o[c]=e[c];let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)if(c in e)o[c]=e[c];for(let c of Object.keys(e))if(!pve.has(c))o[c]=e[c];if(Object.keys(o).length>0)t.registry.add(n,o);return n}function g$(e,t){if(typeof e==="boolean")return e?ie.any():ie.never();let n=gve(e,t?.defaultTarget),r=e.$defs||e.definitions||{},o={version:n,defs:r,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??en};return An(e,o)}var ie,pve;var m$=h(()=>{Fd();yA();Vd();Yd();ie={...Kd,...fA,iso:Qi},pve=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var cp={};cr(cp,{bigint:()=>yve,boolean:()=>fve,date:()=>bve,number:()=>Ave,string:()=>hve});function hve(e){return uk(Bc,e)}function Ave(e){return yk(_c,e)}function fve(e){return Ek(Dc,e)}function yve(e){return xk(Lc,e)}function bve(e){return Mk(tp,e)}var h$=h(()=>{io();Yd()});var a={};cr(a,{$brand:()=>$C,$input:()=>ak,$output:()=>sk,NEVER:()=>Sd,TimePrecision:()=>pk,ZodAny:()=>tP,ZodArray:()=>iP,ZodBase64:()=>MA,ZodBase64URL:()=>zA,ZodBigInt:()=>Lc,ZodBigIntFormat:()=>FA,ZodBoolean:()=>Dc,ZodCIDRv4:()=>QA,ZodCIDRv6:()=>NA,ZodCUID:()=>RA,ZodCUID2:()=>TA,ZodCatch:()=>EP,ZodCodec:()=>YA,ZodCustom:()=>sp,ZodCustomStringFormat:()=>Oc,ZodDate:()=>tp,ZodDefault:()=>bP,ZodDiscriminatedUnion:()=>aP,ZodE164:()=>jA,ZodEmail:()=>EA,ZodEmoji:()=>xA,ZodEnum:()=>Tc,ZodError:()=>cve,ZodExactOptional:()=>AP,ZodFile:()=>mP,ZodFirstPartyTypeKind:()=>NP,ZodFunction:()=>DP,ZodGUID:()=>Wd,ZodIPv4:()=>DA,ZodIPv6:()=>LA,ZodISODate:()=>IA,ZodISODateTime:()=>bA,ZodISODuration:()=>CA,ZodISOTime:()=>SA,ZodIntersection:()=>cP,ZodIssueCode:()=>MP,ZodJWT:()=>UA,ZodKSUID:()=>_A,ZodLazy:()=>BP,ZodLiteral:()=>gP,ZodMAC:()=>Jx,ZodMap:()=>dP,ZodNaN:()=>xP,ZodNanoID:()=>PA,ZodNever:()=>oP,ZodNonOptional:()=>VA,ZodNull:()=>eP,ZodNullable:()=>yP,ZodNumber:()=>_c,ZodNumberFormat:()=>$s,ZodObject:()=>np,ZodOptional:()=>qA,ZodPipe:()=>KA,ZodPrefault:()=>SP,ZodPromise:()=>_P,ZodReadonly:()=>PP,ZodRealError:()=>jn,ZodRecord:()=>ip,ZodSet:()=>pP,ZodString:()=>Bc,ZodStringFormat:()=>ct,ZodSuccess:()=>wP,ZodSymbol:()=>Zx,ZodTemplateLiteral:()=>TP,ZodTransform:()=>hP,ZodTuple:()=>lP,ZodType:()=>_e,ZodULID:()=>BA,ZodURL:()=>Xd,ZodUUID:()=>hr,ZodUndefined:()=>Xx,ZodUnion:()=>op,ZodUnknown:()=>nP,ZodVoid:()=>rP,ZodXID:()=>OA,ZodXor:()=>sP,_ZodString:()=>wA,_default:()=>IP,_function:()=>r$,any:()=>$A,array:()=>ee,base64:()=>wF,base64url:()=>EF,bigint:()=>QF,boolean:()=>Xe,catch:()=>kP,check:()=>i$,cidrv4:()=>CF,cidrv6:()=>vF,clone:()=>kn,codec:()=>t$,coerce:()=>cp,config:()=>Rt,core:()=>Wr,cuid:()=>mF,cuid2:()=>hF,custom:()=>WA,date:()=>FF,decode:()=>$x,decodeAsync:()=>Hx,describe:()=>s$,discriminatedUnion:()=>rp,e164:()=>kF,email:()=>iF,emoji:()=>pF,encode:()=>Fx,encodeAsync:()=>Gx,endsWith:()=>Sc,enum:()=>tn,exactOptional:()=>fP,file:()=>JF,flattenError:()=>Rd,float32:()=>OF,float64:()=>_F,formatError:()=>Td,fromJSONSchema:()=>g$,function:()=>r$,getErrorMap:()=>dve,globalRegistry:()=>en,gt:()=>gr,gte:()=>xn,guid:()=>sF,hash:()=>BF,hex:()=>TF,hostname:()=>RF,httpUrl:()=>dF,includes:()=>bc,instanceof:()=>c$,int:()=>vA,int32:()=>DF,int64:()=>NF,intersection:()=>Qc,ipv4:()=>bF,ipv6:()=>SF,iso:()=>Qi,json:()=>u$,jwt:()=>xF,keyof:()=>$F,ksuid:()=>yF,lazy:()=>OP,length:()=>Fs,literal:()=>ue,locales:()=>Ud,looseObject:()=>Tt,looseRecord:()=>VF,lowercase:()=>fc,lt:()=>pr,lte:()=>ro,mac:()=>IF,map:()=>KF,maxLength:()=>Us,maxSize:()=>Oi,meta:()=>a$,mime:()=>Cc,minLength:()=>Yr,minSize:()=>mr,multipleOf:()=>Bi,nan:()=>e$,nanoid:()=>gF,nativeEnum:()=>WF,negative:()=>lA,never:()=>GA,nonnegative:()=>dA,nonoptional:()=>vP,nonpositive:()=>uA,normalize:()=>vc,null:()=>ep,nullable:()=>Jd,nullish:()=>ZF,number:()=>je,object:()=>ne,optional:()=>pt,overwrite:()=>$o,parse:()=>Mx,parseAsync:()=>zx,partialRecord:()=>qF,pipe:()=>Zd,positive:()=>cA,prefault:()=>CP,preprocess:()=>ap,prettifyError:()=>ev,promise:()=>o$,property:()=>pA,readonly:()=>RP,record:()=>tt,refine:()=>LP,regex:()=>Ac,regexes:()=>Co,registry:()=>Uh,safeDecode:()=>Vx,safeDecodeAsync:()=>Yx,safeEncode:()=>qx,safeEncodeAsync:()=>Kx,safeParse:()=>jx,safeParseAsync:()=>Ux,set:()=>YF,setErrorMap:()=>uve,size:()=>js,slugify:()=>xc,startsWith:()=>Ic,strictObject:()=>GF,string:()=>k,stringFormat:()=>PF,stringbool:()=>l$,success:()=>XF,superRefine:()=>QP,symbol:()=>zF,templateLiteral:()=>n$,toJSONSchema:()=>AA,toLowerCase:()=>Ec,toUpperCase:()=>kc,transform:()=>HA,treeifyError:()=>XC,trim:()=>wc,tuple:()=>uP,uint32:()=>LF,uint64:()=>MF,ulid:()=>AF,undefined:()=>jF,union:()=>ut,unknown:()=>lt,uppercase:()=>yc,url:()=>kA,util:()=>J,uuid:()=>aF,uuidv4:()=>cF,uuidv6:()=>lF,uuidv7:()=>uF,void:()=>UF,xid:()=>fF,xor:()=>HF});var JA=h(()=>{io();io();yE();io();qd();m$();ik();Vd();Vd();h$();Yd();yA();Nx();Wx();d$();Rt(Nd())});var De=h(()=>{JA();JA()});var A$,f$,y$,b$,I$,S$,C$,v$,w$,E$,k$,x$,P$,zP,Ive,jP,R$,Sve,UP="cursor",FP="GET",$P="control",GP="[DONE]";var T$=h(()=>{De();A$=a.object({type:a.literal("run_started"),runId:a.string().describe("Server-assigned run ID for the started run.")}),f$=a.object({type:a.literal("message_started"),messageId:a.string().describe("Server-assigned assistant message ID for this run.")}),y$=a.object({type:a.literal("text_chunk"),messageId:a.string().describe("Assistant message the chunk belongs to."),content:a.string().describe("Incremental text delta to append.")}),b$=a.object({type:a.literal("reasoning_chunk"),messageId:a.string().describe("Assistant message the chunk belongs to."),content:a.string().describe("Incremental reasoning delta to append.")}),I$=a.object({type:a.literal("text_complete"),messageId:a.string().describe("Assistant message that completed."),content:a.string().describe("Full assistant text for the message.")}),S$=a.object({type:a.literal("reasoning_complete"),messageId:a.string().describe("Assistant message that completed."),content:a.string().describe("Full reasoning text for the message.")}),C$=a.object({type:a.literal("tool_call_pending"),toolCallId:a.string().describe("Stable identifier for the tool call."),name:a.string().describe("Name of the tool being called.")}),v$=a.object({type:a.literal("tool_call_start"),toolCallId:a.string().describe("Stable identifier for the tool call."),name:a.string().describe("Name of the tool being called."),params:a.unknown().describe("Resolved tool input params.")}),w$=a.object({type:a.literal("tool_call_complete"),toolCallId:a.string().describe("Stable identifier for the tool call."),status:a.enum(["in_progress","success","error"]).describe("Terminal (or transitional) status of the tool call."),result:a.unknown().optional().describe("Tool output, when available."),durationMs:a.number().nonnegative().optional().describe("Authoritative server-measured tool execution time in ms.")}),E$=a.object({type:a.literal("artifact"),name:a.string().describe("Artifact kind (for example table, timeseries)."),data:a.unknown().describe("Artifact payload; shape depends on name."),toolCallId:a.string().describe("Tool call that produced the artifact.")}),k$=a.object({type:a.literal("error"),message:a.string().describe("Human-readable error message."),name:a.string().optional().describe("Optional error class/name.")}),x$=a.object({type:a.literal("stream_reset"),messageId:a.string().describe("Assistant message whose content to reset.")}),P$=a.object({type:a.literal("disconnected")}),zP=a.discriminatedUnion("type",[A$,f$,y$,b$,I$,S$,C$,v$,w$,E$,k$,x$,P$]),Ive=a.enum(["run_started","message_started","text_chunk","reasoning_chunk","text_complete","reasoning_complete","tool_call_pending","tool_call_start","tool_call_complete","artifact","error","stream_reset","disconnected"]),jP=a.object({streamNextOffset:a.string().describe("Opaque resume cursor for the next unread event; pass back as the stream 'cursor' query param.")}),R$=a.string().describe("Opaque resume cursor from a prior control frame's streamNextOffset."),Sve=a.object({cursor:R$.optional().describe("Resume the stream after this offset. Omit to start from the beginning of the retained buffer.")})});var w=(e)=>{let t={operationId:e.operationId,backend:e.backend,pagination:e.pagination,async:e.async,examples:e.examples??[]};return{...e,contract:Sj.$meta(t).route({method:e.route.method,path:e.route.path,tags:e.route.tags,operationId:e.operationId,summary:e.summary,description:e.description,successStatus:e.route.successStatus,successDescription:e.route.successDescription,deprecated:e.route.deprecated,inputStructure:e.route.inputStructure}).input(e.input).output(e.output)}};var B$=h(()=>{zC()});var O$=h(()=>{B$()});var Ve=h(()=>{O$()});var up,D$,L$,Q$,N$,M$,z$,j$,U$,F$,Cve,$$,Nc,HP,vve,wve,G$,H$,ZA,XA,Mc,ef,tf,q$,V$,nf,Eve,K$,Y$,W$,KP,J$,Z$,X$,of,rf,dp,e1,qP,t1,pp,YP,n1,o1,kve,xve,WP,r1,i1,s1,a1,c1,l1,u1,JP,sf,af,cf,lf,ZP,d1,VP,lp,XP,Pve,uf,p1,g1,m1,h1,_$,A1,f1,y1,df,pf,b1,eR,I1,S1,C1,v1,w1,gf,mf,Rve;var tR=h(()=>{De();Ve();up=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),origin:a.enum(["user_declared","code_detected","log_observed"]),lifecycle:a.enum(["active","inactive","merged"]),observationState:a.enum(["observed","stale","unobserved"]),registryRevision:a.number().int().nonnegative(),canonicalComponentId:a.string().uuid(),mergedIntoComponentId:a.string().uuid().nullable(),currentStatus:a.enum(["operational","degraded","outage"]).describe("Current health status of this component."),firstSeenAt:a.string().datetime(),lastSeenAt:a.string().datetime(),deletedAt:a.string().datetime().nullable().describe("Timestamp when this component became inactive or was deleted, if any."),inactiveAt:a.string().datetime().nullable().describe("Timestamp when this component became inactive, if any."),inactiveReason:a.string().nullable().describe("Reason recorded when this component became inactive."),legacyStateUnknown:a.boolean().describe("True only for migration-era inactive rows whose deactivation authority is unknown.")}),D$=a.object({projectId:a.string().uuid().optional().describe("Project to list components for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of components to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),includeDeleted:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, include inactive and merged components.")}),L$=a.object({components:a.array(up),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Q$=a.object({componentId:a.string().uuid().describe("Component ID to retrieve.")}),N$=a.object({component:up}),M$=a.object({projectId:a.string().uuid().optional().describe("Project to register the component in. Auto-filled from CLI and SDK context when omitted."),name:a.string().trim().min(1,"Name is required").describe("Evidence-backed component name to register."),description:a.string().trim().min(1,"Description cannot be empty").optional().describe("Optional component description."),requestId:a.string().uuid().optional().describe("Project-scoped idempotency key. Reuse only for an identical registration request."),origin:a.enum(["code_detected","log_observed"]).optional().describe("Machine provenance of this registration: 'code_detected' when the component was inferred from repository or code analysis, 'log_observed' (the default) when inferred from telemetry. Only applies to machine (secret-key) callers; human registrations are always recorded as 'user_declared' and ignore this field.")}),z$=a.object({component:up}),j$=a.object({componentId:a.string().uuid().describe("Active component ID to rename."),name:a.string().trim().min(1,"Name is required"),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact rename."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for renaming the component.")}),U$=a.object({component:up}),F$=a.object({componentId:a.string().uuid().describe("Component ID to deregister."),reason:a.string().trim().min(1,"Reason cannot be empty").optional().describe("Reason for audit logging. Required when confirming a deregistration."),requestId:a.string().uuid().optional().describe("Project-scoped idempotency key. Required when confirming a deregistration."),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()).optional().describe("Exact canonical-group revisions returned by the deregistration preview. Presence confirms the deregistration; omit to receive a preview."),confirmCanonicalGroup:a.boolean().default(!1).describe("Explicitly confirm deregistering the complete canonical group when the request used a merged source.")}),Cve=a.object({openIssueIds:a.array(a.string().uuid()),activeComponentIssueIds:a.array(a.string().uuid()),automationBindingIds:a.array(a.string().uuid()),notificationRuleIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),observationIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid()),externalIncidentIds:a.array(a.string().uuid()),authorizedDeliveryIds:a.array(a.string().uuid()),authorizedAutomationRunIds:a.array(a.string().uuid())}),$$=a.object({requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),canonicalComponentName:a.string(),lifecycle:a.enum(["active","inactive"]),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),requiresCanonicalGroupConfirmation:a.boolean(),recommendationScopeEnabled:a.literal(!1),dependents:Cve,counts:a.record(a.string(),a.number().int().nonnegative())}),Nc=a.record(a.string().uuid(),a.number().int().nonnegative()),HP=a.object({id:a.string().uuid(),rowRevision:a.number().int().nonnegative()}),vve=a.object({notificationRules:a.array(HP),automationBindings:a.array(HP),relationships:a.array(HP)}),wve=a.object({componentId:a.string().uuid().describe("Component or merged-source ID confirmed by the preview."),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact deregistration."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for deregistering the component."),componentRevisions:Nc.describe("Exact canonical-group revisions returned by the deregistration preview."),confirmCanonicalGroup:a.boolean().default(!1).describe("Explicitly confirm deregistering the complete canonical group when the request used a merged source.")}),G$=a.object({operationId:a.string().uuid(),status:a.enum(["committed","complete","followup_failed"]),requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),counts:a.record(a.string(),a.number().int().nonnegative()),authorizedDeliveryIds:a.array(a.string().uuid()),authorizedAutomationRunIds:a.array(a.string().uuid()),manualExternalIncidentIds:a.array(a.string().uuid()),issueAutomationSuppressions:a.number().int().nonnegative(),outboxEffectCount:a.number().int().nonnegative(),manifest:vve,followups:a.record(a.string(),a.unknown()).optional()}),H$=a.discriminatedUnion("status",[a.object({status:a.literal("observation_withdrawn"),componentId:a.string().uuid(),sourceType:a.literal("secret_key"),withdrawn:a.boolean()}),a.object({status:a.literal("deregistration_confirmation_required"),preview:$$}),a.object({status:a.literal("deregistered"),result:G$})]),ZA=w({operationId:"components.list",summary:"List components",description:"List status page components in a project.",backend:"api",route:{method:"GET",path:"/components",tags:["Components"]},input:D$,output:L$,pagination:"cursor",async:"sync"}),XA=w({operationId:"components.get",summary:"Get a component",description:"Get a single component by ID.",backend:"api",route:{method:"GET",path:"/components/{componentId}",tags:["Components"]},input:Q$,output:N$,pagination:"none",async:"sync"}),Mc=w({operationId:"components.register",summary:"Register a component",description:"Register a status page component in a project, or refresh an existing active component with the same name.",backend:"api",route:{method:"POST",path:"/components",tags:["Components"]},input:M$,output:z$,pagination:"none",async:"sync"}),ef=w({operationId:"components.deregister",summary:"Deregister a component",description:"Withdraw this credential's component observation, or — for a human caller — preview the deregistration and confirm it by resubmitting with the previewed componentRevisions.",backend:"api",route:{method:"POST",path:"/components/{componentId}/deregister",tags:["Components"]},input:F$,output:H$,pagination:"none",async:"sync"}),tf=w({operationId:"components.rename",summary:"Rename a component",description:"Rename an active component while reserving its previous exact name as an alias.",backend:"api",route:{method:"POST",path:"/components/{componentId}/rename",tags:["Components"]},input:j$,output:U$,pagination:"none",async:"sync"}),q$=a.object({componentId:a.string().uuid().describe("Component whose owning team to set."),teamId:a.string().uuid().nullable().describe("Team to assign as owner, or null to unassign.")}),V$=a.object({componentId:a.string().uuid().describe("Component that was updated."),teamId:a.string().uuid().nullable().describe("Owning team after the update, or null when unassigned.")}),nf=w({operationId:"components.assignTeam",summary:"Assign a component to a team",description:"Assign a component to an owning team, reassign it, or unassign it. A component is owned by at most one team.",backend:"api",route:{method:"PUT",path:"/components/{componentId}/team",tags:["Components"]},input:q$,output:V$,pagination:"none",async:"sync"}),Eve=a.object({notificationRuleIds:a.array(a.string().uuid()),automationBindingIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid())}),K$=a.object({componentId:a.string().uuid().describe("Inactive component or merged-source ID to inspect."),deregistrationOperationId:a.string().uuid().optional().describe("Optional deregistration operation to verify; defaults to the component's current deregistration.")}),Y$=a.object({requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),canonicalComponentName:a.string(),deregistrationOperationId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:Nc,eligible:Eve}),W$=a.object({preview:Y$}),KP=a.object({notificationRuleIds:a.array(a.string().uuid()).default([]),automationBindingIds:a.array(a.string().uuid()).default([]),recommendationScopeIds:a.array(a.string().uuid()).default([]),relationshipIds:a.array(a.string().uuid()).default([])}),J$=a.object({componentId:a.string().uuid().describe("Inactive component or merged-source ID confirmed by preview."),deregistrationOperationId:a.string().uuid().describe("Deregistration operation whose unchanged dependents may be reactivated."),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact reactivation."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for reactivating the component."),componentRevisions:Nc.describe("Exact canonical-group revisions returned by the reactivation preview."),selections:KP.default({notificationRuleIds:[],automationBindingIds:[],recommendationScopeIds:[],relationshipIds:[]}).describe("Only these still-eligible dependents are reattached; omitted selections reattach none.")}),Z$=a.object({operationId:a.string().uuid(),status:a.literal("complete"),requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),reactivated:KP}),X$=a.object({result:Z$}),of=w({operationId:"components.reactivationPreview",summary:"Preview a component reactivation",description:"Preview unchanged deregistration-owned dependents that remain eligible for explicit reactivation.",backend:"api",route:{method:"POST",path:"/components/{componentId}/reactivation/preview",tags:["Components"]},input:K$,output:W$,pagination:"none",async:"sync"}),rf=w({operationId:"components.reactivate",summary:"Reactivate a component",description:"Reactivate an inactive canonical component and only the explicitly selected eligible dependents. Prior rules, automations, and relationships stay detached unless explicitly selected.",backend:"api",route:{method:"POST",path:"/components/{componentId}/reactivate",tags:["Components"]},input:J$,output:X$,pagination:"none",async:"sync"}),dp=a.enum(["part_of","depends_on"]).describe("Relationship semantics: part_of is an acyclic child-to-parent edge; depends_on may be cyclic."),e1=a.enum(["observed","stale","unobserved"]),qP=a.object({originalComponentId:a.string().uuid(),effectiveComponentId:a.string().uuid(),name:a.string(),lifecycle:a.enum(["active","inactive","merged"]),observationState:e1}),t1=a.object({id:a.string().uuid(),source:qP,target:qP,relationshipType:dp,createdAt:a.string().datetime(),endedAt:a.string().datetime().nullable(),endReason:a.string().nullable(),rowRevision:a.number().int().nonnegative()}),pp=a.object({projectId:a.string().uuid().optional().describe("Project containing the component topology. Auto-filled from CLI and SDK context when omitted.")}),YP=a.object({sourceComponentId:a.string().uuid().describe("Child or dependency-source component ID."),targetComponentId:a.string().uuid().describe("Parent or dependency-target component ID."),relationshipType:dp}),n1=pp.extend({includeHistorical:a.union([a.boolean(),a.stringbool()]).default(!1).describe("Include historically ended relationships.")}),o1=a.object({relationships:a.array(t1)}),kve=a.object({ruleId:a.string().uuid(),ruleGroupId:a.string().uuid().nullable(),ownerComponentId:a.string().uuid(),destinationIds:a.array(a.string().uuid()),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),xve=a.object({bindingId:a.string().uuid(),automationId:a.string().uuid(),ownerComponentId:a.string().uuid(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),WP=a.object({notificationRules:a.array(kve),automationBindings:a.array(xve)}),r1=YP.extend({action:a.enum(["add","remove"]),organizationId:a.string(),projectId:a.string().uuid(),relationshipId:a.string().uuid().nullable(),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),policyImpact:WP,confirmationRequired:a.boolean()}),i1=pp.merge(YP).extend({action:a.enum(["add","remove"]).describe("Topology mutation to preview without changing the graph.")}),s1=a.object({preview:r1}),a1=pp.merge(YP).extend({requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact mutation."),reason:a.string().trim().min(1,"Reason cannot be empty"),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),confirmPolicyImpact:a.boolean().default(!1).describe("Confirm the descendant-scoped notification and automation changes shown by preview.")}),c1=a1,l1=a1,u1=a.object({action:a.enum(["add","remove"]),relationshipId:a.string().uuid(),sourceComponentId:a.string().uuid(),targetComponentId:a.string().uuid(),relationshipType:dp,policyImpact:WP}),JP=a.object({result:u1}),sf=w({operationId:"components.relationships.list",summary:"List component relationships",description:"List active or historical component topology edges.",backend:"api",route:{method:"GET",path:"/components/relationships",tags:["Components"]},input:n1,output:o1,pagination:"none",async:"sync"}),af=w({operationId:"components.relationships.preview",summary:"Preview a component relationship change",description:"Preview descendant-scoped notification and automation impact for a topology change.",backend:"api",route:{method:"POST",path:"/components/relationships/preview",tags:["Components"]},input:i1,output:s1,pagination:"none",async:"sync"}),cf=w({operationId:"components.relationships.add",summary:"Add a component relationship",description:"Add a confirmed, tenant-safe component topology edge.",backend:"api",route:{method:"POST",path:"/components/relationships",tags:["Components"]},input:c1,output:JP,pagination:"none",async:"sync"}),lf=w({operationId:"components.relationships.remove",summary:"Remove a component relationship",description:"Historically end a confirmed component topology edge.",backend:"api",route:{method:"POST",path:"/components/relationships/remove",tags:["Components"]},input:l1,output:JP,pagination:"none",async:"sync"}),ZP=a.enum(["suspend","move"]),d1=a.object({disposition:ZP,beforeComponentIds:a.array(a.string().uuid()).describe("Exact effective component set returned by mergePreview."),afterComponentIds:a.array(a.string().uuid()).describe("Exact effective component set that ownership would have on the target.")}),VP=a.object({kind:a.enum(["notification_rule","automation_binding"]),policyId:a.string().uuid(),sourceRowRevision:a.number().int().nonnegative(),sourceComponentId:a.string().uuid(),equivalentPolicyId:a.string().uuid().nullable(),equivalent:a.boolean(),defaultDisposition:a.enum(["deduplicate","suspend"]),allowedDispositions:a.array(ZP),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),lp=a.object({kind:a.enum(["notification_rule","automation_binding"]),policyId:a.string().uuid(),ownerComponentId:a.string().uuid(),rowRevision:a.number().int().nonnegative(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),XP=a.object({relationshipId:a.string().uuid(),action:a.enum(["rewire","close_self","close_duplicate"]),relationshipType:dp,beforeSourceComponentId:a.string().uuid(),beforeTargetComponentId:a.string().uuid(),afterSourceComponentId:a.string().uuid(),afterTargetComponentId:a.string().uuid(),survivingRelationshipId:a.string().uuid().nullable(),beforeRowRevision:a.number().int().nonnegative(),afterRowRevision:a.number().int().nonnegative().nullable()}),Pve=a.object({openIssueIds:a.array(a.string().uuid()),componentIssueIds:a.array(a.string().uuid()),observationIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),nameIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid())}),uf=a.object({sourceComponentId:a.string().uuid().describe("Active or inactive component whose independent grain is removed."),targetComponentId:a.string().uuid().describe("Active terminal component that becomes the canonical target.")}),p1=pp.merge(uf),g1=uf.extend({organizationId:a.string(),projectId:a.string().uuid(),sourceGroupComponentIds:a.array(a.string().uuid()),targetGroupComponentIds:a.array(a.string().uuid()),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:Nc,inventory:Pve,notificationPolicies:a.array(VP),automationBindings:a.array(VP),notificationScopeChanges:a.array(lp),automationScopeChanges:a.array(lp),relationshipChanges:a.array(XP),recommendationScopeEnabled:a.literal(!1),dependentCount:a.number().int().nonnegative(),ordinaryTransactionLimit:a.number().int().positive(),operatorAssistanceRequired:a.boolean(),confirmationRequired:a.boolean()}),m1=a.object({preview:g1}),h1=pp.merge(uf).extend({requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact consolidation."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for consolidation."),componentRevisions:Nc.describe("Exact canonical-group revisions returned by mergePreview."),policyDispositions:a.record(a.string().uuid(),d1).describe("Exactly one disposition for every non-equivalent source policy; each repeats the previewed effective sets."),confirmPolicyImpact:a.boolean().default(!1).describe("Explicitly acknowledge every before/after policy scope change shown by mergePreview.")}),_$=a.object({policyId:a.string().uuid(),action:a.enum(["deduplicated","suspended","moved"]),equivalentPolicyId:a.string().uuid().nullable(),beforeRowRevision:a.number().int().nonnegative(),afterRowRevision:a.number().int().nonnegative(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),A1=a.object({componentRevisions:Nc,redirectedComponentIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),movedAliasIds:a.array(a.string().uuid()),historicalDisplayIds:a.array(a.string().uuid()),relationshipChanges:a.array(XP),notificationPolicies:a.array(_$),automationBindings:a.array(_$),notificationScopeChanges:a.array(lp),automationScopeChanges:a.array(lp),recommendationScopeIds:a.array(a.string().uuid())}),f1=uf.extend({operationId:a.string().uuid(),status:a.literal("complete"),affectedComponentIds:a.array(a.string().uuid()),manifest:A1}),y1=a.object({result:f1}),df=w({operationId:"components.mergePreview",summary:"Preview a component merge",description:"Preview one-hop redirects, historical preservation, operational rebinding, topology contraction, and policy dispositions for component consolidation.",backend:"api",route:{method:"POST",path:"/components/merge/preview",tags:["Components"]},input:p1,output:m1,pagination:"none",async:"sync"}),pf=w({operationId:"components.merge",summary:"Merge a component",description:"Consolidate a source into an active terminal target without rewriting historical issue or observation attribution.",backend:"api",route:{method:"POST",path:"/components/merge",tags:["Components"]},input:h1,output:y1,pagination:"none",async:"sync"}),b1=a.enum(["degraded","outage"]).describe("Severity of a status-page incident. 'outage' marks the component down; 'degraded' marks partial impact."),eR=a.object({id:a.string().uuid(),componentId:a.string().uuid(),projectId:a.string().uuid(),severity:b1,summary:a.string().describe("Human-readable summary of the status-page issue."),startedAt:a.string().datetime().describe("When the incident began affecting the component."),resolvedAt:a.string().datetime().nullable().describe("When the incident was resolved, or null while ongoing.")}),I1=a.object({projectId:a.string().uuid().optional().describe("Project to list status-page issues for. Auto-filled from CLI and SDK context when omitted."),componentId:a.string().uuid().optional().describe("Restrict results to a single component."),activeOnly:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, return only unresolved (ongoing) issues."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),S1=a.object({incidents:a.array(eR),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),C1=a.object({timestamp:a.string().datetime(),status:a.enum(["operational","degraded","outage","unknown"]).describe("Worst component status observed during this timeline bucket.")}),v1=a.object({componentId:a.string().uuid().describe("Component to build the timeline for."),windowStart:a.string().datetime({offset:!0}).optional().describe("Start of the timeline window. Defaults to 7 days before windowEnd."),windowEnd:a.string().datetime({offset:!0}).optional().describe("End of the timeline window. Defaults to now.")}),w1=a.object({componentId:a.string().uuid(),windowStart:a.string().datetime(),windowEnd:a.string().datetime(),timeline:a.array(C1),incidents:a.array(eR)}),gf=w({operationId:"components.incidents.list",summary:"List status-page issues",description:"List status-page issues in a project.",backend:"api",route:{method:"GET",path:"/status-incidents",tags:["Components"]},input:I1,output:S1,pagination:"cursor",async:"sync"}),mf=w({operationId:"components.timeline",summary:"Get a component status timeline",description:"Get the dense status timeline and incidents for a component over a time window.",backend:"api",route:{method:"GET",path:"/components/{componentId}/timeline",tags:["Components"]},input:v1,output:w1,pagination:"none",async:"sync"}),Rve={list:ZA.contract,get:XA.contract,register:Mc.contract,deregister:ef.contract,rename:tf.contract,assignTeam:nf.contract,reactivationPreview:of.contract,reactivate:rf.contract,mergePreview:df.contract,merge:pf.contract,relationships:{list:sf.contract,preview:af.contract,add:cf.contract,remove:lf.contract},incidents:{list:gf.contract},timeline:mf.contract}});var hf,nR,E1,k1,oR,x1,P1,R1,rR,T1,B1,O1,iR,_1,D1,sR;var aR=h(()=>{De();Ve();hf=["github","google","microsoft","linear","bitbucket","slack"],nR=a.enum(hf),E1=a.object({organizationId:a.string().min(1).optional().describe("Organization to connect within. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:nR.describe("Connected-account provider to connect.")}),k1=a.object({url:a.string().describe("Vendor authorization URL to open in a browser signed into the Sazabi dashboard as the same user."),attemptId:a.string().uuid().describe("Connect attempt to poll via `connectedAccounts.getConnectAttempt` while the browser flow completes."),expiresAt:a.string().datetime().describe("When the attempt expires if the browser flow never completes.")}),oR=w({operationId:"connectedAccounts.beginConnect",summary:"Begin a connected account connect flow",description:"Begin a browser connect flow for a connected-account provider. Returns a vendor URL to open in a browser and an attempt to poll; the vendor exchange completes server-side and no token ever reaches the caller.",backend:"api",route:{method:"POST",path:"/connected-accounts/connect",tags:["Connected Accounts"],successStatus:201},input:E1,output:k1,pagination:"none",async:"sync"}),x1=a.enum(["pending","completed","failed","expired"]),P1=a.object({organizationId:a.string().min(1).optional().describe("Organization the attempt belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),attemptId:a.string().uuid().describe("Connect attempt ID to poll.")}),R1=a.object({status:x1.describe("Attempt state. `expired` means the browser flow did not complete in time — begin a new connect."),errorCode:a.string().nullable().describe("Reason code when status is `failed` (the shared OAuth callback vocabulary, e.g. vendor_denied, not_authorized).")}),rR=w({operationId:"connectedAccounts.getConnectAttempt",summary:"Get a connect attempt",description:"Poll a browser connect attempt started with `connectedAccounts.beginConnect`. Visible only to the user who began it.",backend:"api",route:{method:"GET",path:"/connected-accounts/connect/attempts/{attemptId}",tags:["Connected Accounts"]},input:P1,output:R1,pagination:"none",async:"sync"}),T1=a.object({organizationId:a.string().min(1).optional().describe("Organization to list accounts for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),B1=a.object({provider:a.string().describe("Provider identifier."),externalName:a.string().nullable().describe("Display name from the provider."),externalLogin:a.string().nullable().describe("Username or login from the provider."),connectedAt:a.string().datetime().nullable().describe("When the account was connected."),authMode:a.enum(["oauth","pat"]).nullable().describe("Auth mode used."),needsReconnect:a.boolean().describe("Whether the token is expired and a reconnect is required.")}),O1=a.object({accounts:a.array(B1)}),iR=w({operationId:"connectedAccounts.list",summary:"List connected accounts",description:"List the calling user's connected accounts for the organization.",backend:"api",route:{method:"GET",path:"/connected-accounts",tags:["Connected Accounts"]},input:T1,output:O1,pagination:"none",async:"sync"}),_1=a.object({organizationId:a.string().min(1).optional().describe("Organization the account belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:nR.describe("Provider to disconnect.")}),D1=a.object({success:a.literal(!0)}),sR=w({operationId:"connectedAccounts.disconnect",summary:"Disconnect a connected account",description:"Disconnect the calling user's connected account for a provider (soft delete).",backend:"api",route:{method:"DELETE",path:"/connected-accounts/{provider}",tags:["Connected Accounts"]},input:_1,output:D1,pagination:"none",async:"sync"})});var Gs,cR,L1,Q1,Tve,Bve,Ove,N1,gp,_ve,Dve,Lve,Qve,Nve,Mve,zve,jve,Uve,Fve,$ve,Gve,lR,uR,dR,pR,gR,mR,Hve,qve,Vve,Kve,hR,AR,Yve,Wve,Jve,Zve,fR,Agt;var M1=h(()=>{De();Ve();Gs=a.string().uuid().describe("Automation ID."),cR=a.enum(["running","succeeded","failed","timed_out","cancelled"]),L1=a.object({id:a.string().uuid(),automationRunKey:a.string(),status:cR,startedAt:a.string().datetime(),completedAt:a.string().datetime().nullable(),durationMs:a.number().int().nullable(),exitCode:a.number().int().nullable()}),Q1=L1.extend({scheduledAt:a.string().datetime().nullable().describe("When the run was scheduled to start, if known."),dueAt:a.string().datetime().nullable().describe("When the run became due, if known."),errorMessage:a.string().nullable().describe("Failure detail for the run, if it failed or timed out.")}),Tve=Q1.extend({automationId:a.string().uuid().describe("Automation that owns this run.")}),Bve=a.enum(["script","log_match"]),Ove=a.enum(["expression_matched"]),N1=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),kind:Bve.describe("Automation kind: a scheduled script or a log-match investigation."),scriptId:a.string().uuid().nullable().describe("ID of the project_scripts row this automation runs, for DB-backed script automations. Null for legacy script_path automations and for log-match automations."),scriptName:a.string().nullable().describe("Name of the project_scripts row this automation runs (see scriptId). Null when scriptId is null."),signalDefinitionId:a.string().uuid().nullable().describe("Signal definition bound to this automation. Null for script automations."),signalType:Ove.nullable().describe("Signal trigger type for log-match automations. Null for script automations."),source:a.enum(["sazabi_managed","custom"]).describe("Whether the automation is Sazabi-managed or customer-defined."),enabled:a.boolean(),cronExpression:a.string().nullable().describe("Cron schedule for scheduled automations. Null for signal automations."),timezone:a.string(),timeoutSeconds:a.number().int().nullable(),health:a.enum(["healthy","failing","never_run"]).describe("Health derived from the most recent run."),lastRun:L1.nullable(),successRate:a.number().nullable().describe("Fraction of terminal runs that succeeded over the last 7 days."),runCount:a.number().int().describe("Total runs over the last 7 days."),failedRunCount:a.number().int().describe("Failed or timed-out runs over the last 7 days.")}),gp=N1.extend({createdAt:a.string().datetime(),updatedAt:a.string().datetime(),recordedHistoryStartsAt:a.string().datetime().describe("Earliest timestamp for which run history is recorded."),scriptIdentifier:a.string().nullable().describe("Relative project script path executed by the automation. Null for signal automations."),canToggle:a.boolean().describe("Whether the caller may enable or disable this automation.")}),_ve=a.object({projectId:a.string().uuid().optional().describe("Project to list automations for. Auto-filled from CLI and SDK context when omitted."),search:a.string().optional().describe("Case-insensitive partial match on automation name."),status:a.enum(["active","paused"]).optional().describe("Filter by enabled (active) or disabled (paused) automations."),health:a.enum(["healthy","failing","never_run"]).optional().describe("Filter by automation health."),source:a.enum(["sazabi_managed","custom"]).optional().describe("Filter by automation source."),sort:a.enum(["name","last_run","failures","runs"]).default("name").describe("Sort order for the returned automations."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of automations to return per page."),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Dve=a.object({automations:a.array(N1),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Lve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Qve=a.object({automation:gp}),Nve=a.object({projectId:a.string().uuid().optional().describe("Project to create the automation in. Auto-filled from CLI and SDK context when omitted."),name:a.string().min(1).max(200).describe("Automation name."),description:a.string().max(2000).nullable().optional().describe("Human-readable description. Required for log-match automations (investigation instructions)."),scriptId:a.string().uuid().optional().describe("Project script to run, by ID. Provide exactly one of scriptId, script, or expressionId."),script:a.string().optional().describe("Project script to run, by name (resolved to scriptId server-side). Provide exactly one of scriptId, script, or expressionId."),expressionId:a.string().uuid().optional().describe("Log-match expression to bind. Creates a signal automation that investigates matching logs. Mutually exclusive with scriptId and script."),cronExpression:a.string().optional().describe("Cron schedule for the automation. Defaults to every minute when omitted."),timezone:a.string().optional().describe("IANA timezone for cronExpression. Defaults to UTC."),timeoutSeconds:a.coerce.number().int().min(1).max(3600).optional().describe("Execution timeout in seconds. Defaults to 60."),enabled:a.boolean().optional().describe("Whether the automation starts enabled. Defaults to true.")}).superRefine((e,t)=>{let n=e.scriptId!=null,r=e.script!=null,o=e.expressionId!=null;if(Number(n)+Number(r)+Number(o)!==1){t.addIssue({code:"custom",message:"Provide exactly one of scriptId, script, or expressionId.",path:["scriptId"]});return}if(o){if(e.cronExpression!=null)t.addIssue({code:"custom",message:"cronExpression is not used for log-match automations.",path:["cronExpression"]});if(e.timezone!=null)t.addIssue({code:"custom",message:"timezone is not used for log-match automations.",path:["timezone"]});if(e.timeoutSeconds!=null)t.addIssue({code:"custom",message:"timeoutSeconds is not used for log-match automations.",path:["timeoutSeconds"]});if(!e.description?.trim())t.addIssue({code:"custom",message:"description is required for log-match automations (investigation instructions).",path:["description"]})}}),Mve=a.object({automation:gp}),zve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted."),name:a.string().min(1).max(200).optional().describe("New automation name."),description:a.string().max(2000).nullable().optional().describe("New description, or null to clear it. Omit to leave unchanged."),cronExpression:a.string().optional().describe("New cron schedule."),timezone:a.string().optional().describe("New IANA timezone."),timeoutSeconds:a.coerce.number().int().min(1).max(3600).optional().describe("New execution timeout in seconds.")}),jve=a.object({automation:gp}),Uve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Fve=a.object({automation:gp}),$ve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Gve=a.object({automation:gp}),lR=w({operationId:"automations.list",summary:"List automations",description:"List scheduled automations in a project, with run health and recent run stats.",backend:"api",route:{method:"GET",path:"/automations",tags:["Automations"]},input:_ve,output:Dve,pagination:"cursor",async:"sync"}),uR=w({operationId:"automations.get",summary:"Get an automation",description:"Get a single automation by ID.",backend:"api",route:{method:"GET",path:"/automations/{automationId}",tags:["Automations"]},input:Lve,output:Qve,pagination:"none",async:"sync"}),dR=w({operationId:"automations.create",summary:"Create an automation",description:"Create an automation: either a cron-driven project script (see scripts.create) or a signal investigation bound to a signal definition (see signalDefinitions.create).",backend:"api",route:{method:"POST",path:"/automations",successStatus:201,tags:["Automations"]},input:Nve,output:Mve,pagination:"none",async:"sync"}),pR=w({operationId:"automations.update",summary:"Update an automation",description:"Update an automation's name, description, or schedule. Does not change which script it runs.",backend:"api",route:{method:"PATCH",path:"/automations/{automationId}",tags:["Automations"]},input:zve,output:jve,pagination:"none",async:"sync"}),gR=w({operationId:"automations.enable",summary:"Enable an automation",description:"Enable an automation so it runs on its schedule.",backend:"api",route:{method:"POST",path:"/automations/{automationId}/enable",tags:["Automations"]},input:Uve,output:Fve,pagination:"none",async:"sync"}),mR=w({operationId:"automations.disable",summary:"Disable an automation",description:"Disable an automation so it stops running on its schedule.",backend:"api",route:{method:"POST",path:"/automations/{automationId}/disable",tags:["Automations"]},input:$ve,output:Gve,pagination:"none",async:"sync"}),Hve=a.object({automationId:Gs,projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted."),status:a.union([cR,a.array(cR)]).optional().describe("Filter runs by status. Accepts a single status or an array of statuses (matched as OR)."),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page.")}),qve=a.object({runs:a.array(Q1),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results."),recordedHistoryStartsAt:a.string().datetime().describe("Earliest timestamp for which run history is recorded.")}),Vve=a.object({automationId:Gs,runId:a.string().uuid().describe("Automation run ID."),projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Kve=a.object({run:Tve}),hR=w({operationId:"automations.runs.list",summary:"List automation runs",description:"List runs for an automation, most recent first.",backend:"api",route:{method:"GET",path:"/automations/{automationId}/runs",tags:["Automations"]},input:Hve,output:qve,pagination:"cursor",async:"sync"}),AR=w({operationId:"automations.runs.get",summary:"Get an automation run",description:"Get a single automation run by ID.",backend:"api",route:{method:"GET",path:"/automations/{automationId}/runs/{runId}",tags:["Automations"]},input:Vve,output:Kve,pagination:"none",async:"sync"}),Yve=a.enum(["queued","running","succeeded","failed","timed_out"]),Wve=a.object({stdout:a.string().describe("Captured standard output for the run."),stderr:a.string().describe("Captured standard error for the run."),exitCode:a.number().int().nullable().describe("Process exit code of the run's command, if it finished."),status:Yve.describe("Execution status of the run's captured command."),truncated:a.boolean().describe("Whether the captured output exceeded the inline preview limit. The full output is returned when it could be read from durable storage; otherwise the truncated preview is returned with this flag set."),startedAt:a.string().datetime().nullable().describe("When the command started executing, if known."),completedAt:a.string().datetime().nullable().describe("When the command finished executing, if known."),durationMs:a.number().int().nullable().describe("Command execution duration in milliseconds, if known.")}),Jve=a.object({automationId:Gs,runId:a.string().uuid().describe("Automation run ID."),projectId:a.string().uuid().optional().describe("Project that owns the automation. Auto-filled from CLI and SDK context when omitted.")}),Zve=a.object({logs:Wve}),fR=w({operationId:"automations.runs.logs",summary:"Get automation run logs",description:"Get the captured stdout/stderr for a single automation run, reading the full output from durable storage when the inline preview was truncated.",backend:"api",route:{method:"GET",path:"/automations/{automationId}/runs/{runId}/logs",tags:["Automations"]},input:Jve,output:Zve,pagination:"none",async:"sync"}),Agt={list:lR.contract,get:uR.contract,create:dR.contract,update:pR.contract,enable:gR.contract,disable:mR.contract,runs:{list:hR.contract,get:AR.contract,logs:fR.contract}}});var z1,Xve,ewe,twe,j1,nwe,Af,owe,rwe,U1,iwe,swe,awe,cwe,lwe,uwe,dwe,bR,IR,SR,Go,F1,yR,CR,pwe,$1,gwe,mwe,hwe,Awe,fwe,ywe,bwe,Iwe,Swe,Cwe,vwe,wwe,Ewe,kwe,xwe,Pwe,Rwe,Twe,Bwe,vR,G1,Owe,_we,wR,ER,kR,xR,PR,RR,TR,BR,OR,_R,DR,LR,QR,H1,Dwe,Lwe,Qwe,NR,Nwe,Mwe,MR,Igt;var q1=h(()=>{De();Ve();z1=a.enum(["logs_ingested_bytes","logs_accepted_bytes","input_tokens","output_tokens","issues_created","automation_runs_completed","pull_requests_created","pull_request_reviews_completed"]),Xve=a.enum(["cycle_top_up","upgrade_top_up","deficit_settlement","auto_top_up","one_off_top_up","usage_debit","adjustment","migration_opening_balance","void"]),ewe=a.enum(["credit","debit"]),twe=a.enum(["cycle_renewal","plan_upgrade","auto_purchase","one_off_purchase","deficit_settlement","usage","adjustment","migration_opening_balance"]),j1=a.object({startsAt:a.string().datetime(),endsAt:a.string().datetime(),billableStartsAt:a.string().datetime()}),nwe=a.object({subscriptionChargeAmount:a.string(),creditDeficitAmount:a.string(),creditDeficitChargeAmount:a.string(),totalAmount:a.string(),currency:a.string()}),Af=a.object({billingSubscriptionChangeId:a.string(),effectiveAt:a.string().datetime(),planSlug:a.string().nullable(),planName:a.string().nullable(),price:a.string().nullable(),currency:a.string().nullable(),targetCreditBalance:a.string().nullable()}),owe=a.object({id:a.string(),status:a.string(),billingPlanId:a.string(),cycleType:a.string(),cancelAt:a.string().datetime().nullable(),canceledAt:a.string().datetime().nullable()}),rwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to query billing for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),U1=a.object({status:a.enum(["current","payment_retrying","delinquent"]).describe("Negative-balance collection state. `current` means no open collection case; `payment_retrying` means a scheduled retry cadence is running; `delinquent` means retries are exhausted and intake is denied until payment settles the balance."),outstandingCredits:a.string().nullable().describe("Credits owed (absolute value of the negative balance)."),outstandingAmount:a.string().nullable().describe("Amount owed in `currency` at the current additional-credit price."),currency:a.string().nullable(),scheduledAttemptsMade:a.number().int().describe("Scheduled collection attempts consumed by confirmed payment failures."),nextRetryAt:a.string().datetime().nullable(),billingInvoiceId:a.string().nullable(),hostedInvoiceUrl:a.string().nullable()}).describe("Read-only negative-balance collection state for the organization."),iwe=a.object({billingModel:a.enum(["credit-balance-v1"]),billable:a.boolean(),nonBillableReason:a.string().nullable(),status:a.string(),planName:a.string().nullable(),planSlug:a.string().nullable(),currency:a.string().nullable(),currentBalance:a.string().nullable(),targetCreditBalance:a.string().nullable(),currentCycle:j1.nullable(),currentPeriodEstimate:nwe.nullable(),pendingDowngrade:Af.nullable(),subscription:owe.nullable(),collection:U1,currentPlan:a.object({slug:a.string(),name:a.string(),price:a.string().nullable(),currency:a.string().nullable(),targetCreditBalance:a.string().nullable(),subscriptionStatus:a.string(),cycleStartsAt:a.string().datetime().nullable(),cycleEndsAt:a.string().datetime().nullable(),renewalAt:a.string().datetime().nullable(),pendingSwitch:Af.nullable(),pendingCancellation:a.object({effectiveAt:a.string().datetime()}).nullable()}).nullable()}),swe=a.object({organizationId:a.string().min(1).optional().describe("Organization to query usage for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),cycle:a.enum(["current","previous"]).default("current").describe("Which billing cycle to report usage for.")}),awe=a.object({dimension:z1,totalQuantity:a.string(),ratedQuantity:a.string(),creditsConsumed:a.string(),sourceBreakdown:a.record(a.string(),a.string())}),cwe=a.object({cycle:j1.nullable(),usage:a.array(awe)}),lwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to query transactions for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),limit:a.coerce.number().int().min(1).max(100).default(10).describe("Maximum number of transactions to return per page."),page:a.coerce.number().int().min(1).default(1).describe("Page number for pagination (1-indexed).")}),uwe=a.object({id:a.string(),transactionType:Xve,creditDelta:a.string(),direction:ewe.describe("Which way this entry moved the balance. Derived from the business event, not from the amount: a zero-credit cycle renewal is still a credit."),reason:twe.describe("The business event that produced this entry."),amount:a.string().describe("Non-negative magnitude of the balance movement. Apply `direction` for the signed value."),balanceAfter:a.string(),occurredAt:a.string().datetime(),billingInvoiceId:a.string().nullable()}),dwe=a.object({items:a.array(uwe),pagination:a.object({page:a.number(),limit:a.number(),total:a.number(),totalPages:a.number(),hasNext:a.boolean(),hasPrev:a.boolean()}).describe("Pagination metadata for the transaction list.")}),bR=w({operationId:"billing.getSummary",summary:"Get billing summary",description:"Get a billing summary for the current organization, including plan, balance, and cycle information.",backend:"api",route:{method:"GET",path:"/billing/summary",tags:["Billing"]},input:rwe,output:iwe,pagination:"none",async:"sync"}),IR=w({operationId:"billing.getUsage",summary:"Get billing usage",description:"Get per-dimension usage breakdown for the current or previous billing cycle.",backend:"api",route:{method:"GET",path:"/billing/usage",tags:["Billing"]},input:swe,output:cwe,pagination:"none",async:"sync"}),SR=w({operationId:"billing.listTransactions",summary:"List billing transactions",description:"List recent credit ledger transactions with pagination.",backend:"api",route:{method:"GET",path:"/billing/transactions",tags:["Billing"]},input:lwe,output:dwe,pagination:"page",async:"sync"}),Go=a.string().min(1).optional().describe("Organization to operate on. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),F1=a.string().trim().regex(/^\d+(?:\.\d{1,6})?$/,"Expected a decimal with up to 6 places"),yR=F1.refine((e)=>{let[,t=""]=e.split(".");return t.slice(2).replaceAll("0","")===""},"Expected a currency amount with up to 2 decimal places").refine((e)=>/[1-9]/.test(e),"Expected a positive currency amount"),CR=a.string().trim().min(1).max(100),pwe=a.object({organizationId:Go}),$1=a.object({supported:a.boolean().describe("Whether auto top-up is available for the account's plan."),enabled:a.boolean(),triggerCreditBalance:a.string(),topUpAmount:a.string(),cycleSpendingLimit:a.string(),currency:a.string(),creditsToGrant:a.string().nullable(),status:a.string()}),gwe=a.object({organizationId:Go,enabled:a.boolean(),triggerCreditBalance:F1,topUpAmount:yR,cycleSpendingLimit:yR}),mwe=a.object({organizationId:Go,amount:yR.describe("Amount to charge in the account currency; grants an equal credit balance."),idempotencyKey:a.string().trim().min(1).max(128).describe("Client-generated key. Repeating a request with the same key returns the original purchase instead of charging again.")}),hwe=a.object({status:a.enum(["paid","pending_payment"]),billingInvoiceId:a.string(),topUpAmount:a.string(),creditsToGrant:a.string(),currency:a.string()}),Awe=a.object({organizationId:Go}),fwe=a.object({slug:a.string(),billingModel:a.string(),name:a.string(),description:a.string(),bestFor:a.string().nullable(),price:a.string(),currency:a.string(),targetCreditBalance:a.string().nullable(),logsIncludedBytes:a.string(),inputTokensIncluded:a.string(),outputTokensIncluded:a.string()}),ywe=a.object({billingModel:a.string(),currentPlanSlug:a.string().nullable(),hasActiveStripeBilling:a.boolean(),plans:a.array(fwe)}),bwe=a.object({organizationId:Go,planSlug:CR}),Iwe=a.object({calculatedAt:a.string().datetime(),type:a.enum(["upgrade","downgrade"]),effectiveAt:a.string().datetime(),currency:a.string(),currentPlanSlug:a.string(),targetPlanSlug:a.string(),currentPlanName:a.string(),targetPlanName:a.string(),currentPlanPrice:a.string(),targetPlanPrice:a.string(),currentTargetCreditBalance:a.string(),targetCreditBalance:a.string(),creditDeficitAmount:a.string(),creditDeficitChargeAmount:a.string(),additionalCreditPrice:a.string(),immediateChargeAmount:a.string(),subscriptionChargeAmount:a.string(),proratedCreditGrantAmount:a.string(),remainingCycleFraction:a.string(),nextCycleChargeAmount:a.string()}),Swe=a.object({organizationId:Go,planSlug:CR}),Cwe=a.object({billingSubscriptionChangeId:a.string(),billingSubscriptionId:a.string(),status:a.string(),type:a.string(),effectiveAt:a.string().datetime(),invoiceId:a.string().nullable(),creditDeficitAmount:a.string().optional(),creditDeficitChargeAmount:a.string().optional(),creditTopUpAmount:a.string().optional(),immediateChargeAmount:a.string().optional(),subscriptionChargeAmount:a.string().optional(),proratedCreditGrantAmount:a.string().optional()}),vwe=a.object({organizationId:Go,planSlug:CR}),wwe=a.object({sessionId:a.string(),checkoutUrl:a.string().url()}),Ewe=a.object({organizationId:Go,sessionId:a.string().min(1).describe("The checkout session id returned by createCheckoutSession.")}),kwe=a.object({status:a.enum(["pending","active","expired"])}),xwe=a.object({organizationId:Go}),Pwe=a.object({portalUrl:a.string().url()}),Rwe=a.object({organizationId:Go}),Twe=a.object({hasPaymentMethod:a.boolean(),brand:a.string().nullable(),last4:a.string().nullable(),type:a.string().nullable(),expiryMonth:a.number().int().min(1).max(12).nullable(),expiryYear:a.number().int().nullable(),isDefault:a.boolean(),display:a.string().nullable()}),Bwe=a.object({slug:a.string(),name:a.string(),price:a.string().nullable(),currency:a.string().nullable(),targetCreditBalance:a.string().nullable(),subscriptionStatus:a.string(),cycleStartsAt:a.string().datetime().nullable(),cycleEndsAt:a.string().datetime().nullable(),renewalAt:a.string().datetime().nullable(),pendingSwitch:Af.nullable(),pendingCancellation:a.object({effectiveAt:a.string().datetime()}).nullable()}),vR=a.object({organizationId:Go}),G1=a.object({currentPlan:Bwe,effectiveAt:a.string().datetime(),currentBalance:a.string(),servicePolicy:a.literal("active_until_period_end"),creditPolicy:a.literal("dormant_until_resubscription"),scheduledFinalCharge:a.string().nullable(),autoTopUpEnabled:a.boolean(),pendingDowngrade:Af.nullable(),collectionState:U1,calculatedAt:a.string().datetime()}),Owe=G1.extend({billingSubscriptionChangeId:a.string(),alreadyScheduled:a.boolean()}),_we=a.object({billingSubscriptionId:a.string(),resumed:a.literal(!0)}),wR=w({operationId:"billing.getAutoTopUp",summary:"Get auto top-up settings",description:"Get the organization's credit auto top-up settings (trigger balance, top-up amount, cycle spending limit).",backend:"api",route:{method:"GET",path:"/billing/auto-top-up",tags:["Billing"]},input:pwe,output:$1,pagination:"none",async:"sync"}),ER=w({operationId:"billing.updateAutoTopUp",summary:"Update auto top-up settings",description:"Enable/disable and configure credit auto top-up. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"PUT",path:"/billing/auto-top-up",tags:["Billing"]},input:gwe,output:$1,pagination:"none",async:"sync"}),kR=w({operationId:"billing.purchaseCredits",summary:"Purchase credits",description:"Purchase a one-time amount of credits against the saved payment method. Requires a user credential with `billing:manage` and a stable idempotency key.",backend:"api",route:{method:"POST",path:"/billing/credits/purchase",tags:["Billing"]},input:mwe,output:hwe,pagination:"none",async:"sync"}),xR=w({operationId:"billing.listPlans",summary:"List plans",description:"List the self-serve credit plans available for checkout, including the current plan.",backend:"api",route:{method:"GET",path:"/billing/plans",tags:["Billing"]},input:Awe,output:ywe,pagination:"none",async:"sync"}),PR=w({operationId:"billing.previewPlanChange",summary:"Preview a plan change",description:"Preview the cost and effect of changing to a plan without applying it. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"POST",path:"/billing/plan-change/preview",tags:["Billing"]},input:bwe,output:Iwe,pagination:"none",async:"sync"}),RR=w({operationId:"billing.changePlan",summary:"Change the plan",description:"Apply a plan upgrade or schedule a downgrade. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"POST",path:"/billing/plan-change",tags:["Billing"]},input:Swe,output:Cwe,pagination:"none",async:"sync"}),TR=w({operationId:"billing.createCheckoutSession",summary:"Create a checkout session",description:"Create a hosted Stripe Checkout session for first-time subscribe from the terminal. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"POST",path:"/billing/checkout-session",tags:["Billing"]},input:vwe,output:wwe,pagination:"none",async:"sync"}),BR=w({operationId:"billing.getCheckoutSessionStatus",summary:"Get checkout session status",description:"Poll the completion status of a checkout session created by this organization.",backend:"api",route:{method:"GET",path:"/billing/checkout-session/{sessionId}",tags:["Billing"]},input:Ewe,output:kwe,pagination:"none",async:"sync"}),OR=w({operationId:"billing.createPortalSession",summary:"Create a billing portal session",description:"Create a Stripe Customer Portal session for updating the payment method. Requires a user credential with `billing:manage`.",backend:"api",route:{method:"POST",path:"/billing/portal-session",tags:["Billing"]},input:xwe,output:Pwe,pagination:"none",async:"sync"}),_R=w({operationId:"billing.getPaymentMethod",summary:"Get the payment method",description:"Get a summary of the organization's saved payment method (brand and last 4 digits).",backend:"api",route:{method:"GET",path:"/billing/payment-method",tags:["Billing"]},input:Rwe,output:Twe,pagination:"none",async:"sync"}),DR=w({operationId:"billing.previewSubscriptionCancellation",summary:"Preview subscription cancellation",description:"Preview period-end subscription cancellation without changing billing state.",backend:"api",route:{method:"POST",path:"/billing/subscription-cancellation/preview",tags:["Billing"]},input:vR,output:G1,pagination:"none",async:"sync"}),LR=w({operationId:"billing.scheduleSubscriptionCancellation",summary:"Schedule subscription cancellation",description:"Schedule cancellation at the end of the paid billing cycle.",backend:"api",route:{method:"POST",path:"/billing/subscription-cancellation",tags:["Billing"]},input:vR,output:Owe,pagination:"none",async:"sync"}),QR=w({operationId:"billing.resumeSubscriptionCancellation",summary:"Resume subscription renewal",description:"Resume renewal before a scheduled cancellation takes effect.",backend:"api",route:{method:"POST",path:"/billing/subscription-cancellation/resume",tags:["Billing"]},input:vR,output:_we,pagination:"none",async:"sync"}),H1=a.object({productKey:z1.describe("Product the line bills, keyed by the usage dimension vocabulary."),displayName:a.string(),meteredQuantity:a.string().describe("Metered units (count, bytes) summed over the cycle window."),includedQuantity:a.string(),overageQuantity:a.string(),unitPrice:a.string().describe("Currency per rated unit, decimal."),amount:a.string().describe("Currency at six-decimal precision.")}),Dwe=a.object({id:a.string(),cycleStartsAt:a.string().datetime(),cycleEndsAt:a.string().datetime(),status:a.string().describe("Invoice status: preview, finalized, pending_payment, paid, failed, void, or uncollectible. A zero-total settlement is written paid with no charge."),currency:a.string(),subtotalAmount:a.string(),totalAmount:a.string(),lineItems:a.array(H1),hostedInvoiceUrl:a.string().nullable().describe("Stripe-hosted invoice page; null for zero-total settlements."),finalizedAt:a.string().datetime().nullable(),createdAt:a.string().datetime()}),Lwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to list usage invoices for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(24).describe("Maximum invoices to return, newest cycle first.")}),Qwe=a.object({items:a.array(Dwe)}),NR=w({operationId:"billing.listUsageInvoices",summary:"List usage invoices",description:"List cycle-end usage invoices — the local settlement record, one per settled billing cycle, zero-total settlements included.",backend:"api",route:{method:"GET",path:"/billing/usage-invoices",tags:["Billing"]},input:Lwe,output:Qwe,pagination:"none",async:"sync"}),Nwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to query accrued charges for. Auto-filled from CLI and SDK context when omitted.")}),Mwe=a.object({cycle:a.object({startsAt:a.string().datetime(),endsAt:a.string().datetime()}).nullable().describe("The open billing cycle the charges accrue in; null when the account has no open stamped cycle."),currency:a.string().nullable(),settlesInCents:a.boolean().describe("Whether the open cycle's plan settles any product as a cycle-end currency charge."),lineItems:a.array(H1),totalAmount:a.string()}),MR=w({operationId:"billing.getAccruedUsageCharges",summary:"Get accrued usage charges",description:"Get usage charges accrued so far in the open billing cycle, priced under the cycle's plan terms. These settle on the cycle-end usage invoice.",backend:"api",route:{method:"GET",path:"/billing/usage-charges/accrued",tags:["Billing"]},input:Nwe,output:Mwe,pagination:"none",async:"sync"}),Igt={getSummary:bR.contract,getUsage:IR.contract,getAccruedUsageCharges:MR.contract,listUsageInvoices:NR.contract,listTransactions:SR.contract,getAutoTopUp:wR.contract,updateAutoTopUp:ER.contract,purchaseCredits:kR.contract,listPlans:xR.contract,previewPlanChange:PR.contract,changePlan:RR.contract,createCheckoutSession:TR.contract,getCheckoutSessionStatus:BR.contract,createPortalSession:OR.contract,getPaymentMethod:_R.contract,previewSubscriptionCancellation:DR.contract,scheduleSubscriptionCancellation:LR.contract,resumeSubscriptionCancellation:QR.contract}});var zwe,mp,jwe,Uwe,Fwe,$we,Gwe,Hwe,hp,V1,qwe,Vwe,K1,Kwe,Ywe,Y1,Wwe,Jwe,W1,Zwe,Xwe,J1,eEe,tEe,Z1,nEe,oEe,rEe,X1,iEe,sEe,e2,aEe,cEe,t2,zR,n2,o2,r2,i2,s2,a2,Ap,c2,lEe,l2,uEe,u2,d2,dEe,pEe,p2,gEe,g2,mEe,hEe,m2;var h2=h(()=>{De();Ve();zwe=["slack","github","linear","pagerduty","victorops","rootly","incident_io","webhook","teams","bitbucket","jira"],mp=a.enum(zwe),jwe=a.enum(["oauth","app_installation","api_key"]),Uwe=a.enum(["alert_routing","inbound_webhooks","messaging","code_search","health_check"]),Fwe=a.enum(["pending","connected","error","revoked"]),$we=a.enum(["healthy","unhealthy","unknown"]),Gwe=a.object({name:a.string().describe("Field name used as the JSON key in `credentials`."),label:a.string().describe("Human-readable field label."),required:a.boolean().describe("Whether the field is required."),secret:a.boolean().describe("Whether the field is a secret (masked in UIs, encrypted)."),description:a.string().nullable().describe("Optional hint for the field's expected value.")}),Hwe=a.object({id:mp.describe("Integration provider identifier."),name:a.string().describe("Human-readable display name."),description:a.string().describe("Short description of the provider."),authType:jwe.describe("Auth flow used to connect this provider."),capabilities:a.array(Uwe).describe("Capabilities the provider exposes once connected."),connectionCount:a.number().int().describe("Number of active connections for this provider in the organization, including error-status connections that need attention."),credentialFields:a.array(Gwe).optional().describe("Fields required in `credentials` when creating an api_key connection. Absent for browser-auth providers."),browserConnectSupported:a.boolean().describe("Whether this provider's browser connect flow (`integrations.beginConnect`) is available in this environment. Readiness-derived: the provider begins on the consolidated OAuth callback route and its OAuth client credentials are provisioned. Providers still on legacy browser paths (Slack, Linear, Bitbucket) report false and connect from the dashboard.")}),hp=a.object({id:a.string().uuid(),provider:mp,displayName:a.string().nullable(),status:Fwe,isActive:a.boolean().describe("Whether this connection counts as connected (status 'connected' or 'error'). An error-status connection is the organization's connection — broken, not absent."),needsAttention:a.boolean().describe("Whether the connection should surface a reconnect prompt (status 'error' or health status 'unhealthy')."),metadata:a.record(a.string(),a.unknown()).describe("Non-secret provider metadata (e.g. workspace/team names)."),healthStatus:$we,healthMessage:a.string().nullable(),healthCheckedAt:a.string().datetime().nullable(),healthConsecutiveFailures:a.number().int(),connectedBy:a.string().nullable(),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),V1=a.object({organizationEnabled:a.boolean().describe("Stored organization-wide policy."),connectionEnabled:a.boolean().describe("Stored connection policy."),effectiveEnabled:a.boolean().describe("True only when both stored policies are enabled.")}),qwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to list providers for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),Vwe=a.object({providers:a.array(Hwe)}),K1=w({operationId:"integrations.listProviders",summary:"List integration providers",description:"List supported integration providers and how many connections the organization has for each.",backend:"api",route:{method:"GET",path:"/integrations/providers",tags:["Integrations"]},input:qwe,output:Vwe,pagination:"none",async:"sync"}),Kwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to list connections for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:mp.optional().describe("Filter connections by provider.")}),Ywe=a.object({connections:a.array(hp)}),Y1=w({operationId:"integrations.listConnections",summary:"List integration connections",description:"List integration connections and their connection state for the organization.",backend:"api",route:{method:"GET",path:"/integrations/connections",tags:["Integrations"]},input:Kwe,output:Ywe,pagination:"none",async:"sync"}),Wwe=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),connectionId:a.string().uuid().describe("Connection ID to fetch.")}),Jwe=a.object({connection:hp}),W1=w({operationId:"integrations.getConnection",summary:"Get an integration connection",description:"Get one integration connection by ID (non-secret config only).",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}",tags:["Integrations"]},input:Wwe,output:Jwe,pagination:"none",async:"sync"}),Zwe=a.object({organizationId:a.string().min(1).optional().describe("Organization to connect in. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:mp.describe("Integration provider to connect. Must use api_key auth (see `authType` in the provider catalog)."),displayName:a.string().trim().min(1).max(255).optional().describe("Optional display name for the connection."),credentials:a.record(a.string(),a.unknown()).describe("Vendor credentials. Fields vary by provider (see `credentialFields` on the provider catalog). Validated against the vendor before the connection is created; never returned.")}),Xwe=a.object({connection:hp}),J1=w({operationId:"integrations.createConnection",summary:"Create an integration connection",description:"Create an integration connection for an api_key provider. Credentials are validated against the vendor, then stored encrypted.",backend:"api",route:{method:"POST",path:"/integrations/connections",tags:["Integrations"],successStatus:201},input:Zwe,output:Xwe,pagination:"none",async:"sync"}),eEe=a.object({organizationId:a.string().min(1).optional().describe("Organization to connect in. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),provider:mp.describe("Browser-auth provider to connect (oauth or app_installation). Must report `browserConnectSupported: true` in the provider catalog."),displayName:a.string().trim().min(1).max(255).optional().describe("Optional display name for the resulting connection."),projectId:a.string().trim().min(1).optional().describe("Project the completed connection defaults its routing to. Must belong to the organization.")}),tEe=a.object({url:a.string().describe("Vendor authorization (or app installation) URL to open in a browser signed into the Sazabi dashboard as the same user."),attemptId:a.string().uuid().describe("Connect attempt to poll via `integrations.getConnectAttempt` while the browser flow completes."),expiresAt:a.string().datetime().describe("When the attempt expires if the browser flow never completes.")}),Z1=w({operationId:"integrations.beginConnect",summary:"Begin a browser connect flow",description:"Begin a browser connect flow for an OAuth or app-installation provider. Returns a vendor URL to open in a browser and an attempt to poll; the vendor exchange completes server-side and no token ever reaches the caller.",backend:"api",route:{method:"POST",path:"/integrations/connect",tags:["Integrations"],successStatus:201},input:eEe,output:tEe,pagination:"none",async:"sync"}),nEe=a.enum(["pending","completed","not_connected","failed","expired"]),oEe=a.object({organizationId:a.string().min(1).optional().describe("Organization the attempt belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),attemptId:a.string().uuid().describe("Connect attempt ID to poll.")}),rEe=a.object({status:nEe.describe("Attempt state. `not_connected` means the flow finished but the connection is not live yet (most commonly awaiting a third-party admin's approval). `expired` means the browser flow did not complete in time — begin a new connect."),errorCode:a.string().nullable().describe("Reason code when status is `failed` (the shared OAuth callback vocabulary, e.g. vendor_denied, not_authorized) or `not_connected` (e.g. `installation_requested` for GitHub installs awaiting org-admin approval)."),connection:hp.optional().describe("The created connection when status is `completed`.")}),X1=w({operationId:"integrations.getConnectAttempt",summary:"Get a connect attempt",description:"Poll a browser connect attempt started with `integrations.beginConnect`. Visible only to the user who began it.",backend:"api",route:{method:"GET",path:"/integrations/connect/attempts/{attemptId}",tags:["Integrations"]},input:oEe,output:rEe,pagination:"none",async:"sync"}),iEe=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),connectionId:a.string().uuid().describe("Connection ID to disconnect.")}),sEe=a.object({success:a.literal(!0)}),e2=w({operationId:"integrations.disconnectConnection",summary:"Disconnect an integration connection",description:"Disconnect an integration connection (soft delete). Always succeeds regardless of stored credential state; cached vendor catalogs and routing derived from the connection are removed.",backend:"api",route:{method:"DELETE",path:"/integrations/connections/{connectionId}",tags:["Integrations"]},input:iEe,output:sEe,pagination:"none",async:"sync"}),aEe=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),connectionId:a.string().uuid().describe("Connection ID to update."),credentials:a.record(a.string(),a.unknown()).describe("Replacement vendor credentials for an api_key connection. Validated against the vendor; resets the connection's health state on success.")}),cEe=a.object({connection:hp}),t2=w({operationId:"integrations.updateConnectionCredentials",summary:"Update integration connection credentials",description:"Replace an api_key connection's credentials in place — the reconnect path for a connection that needs attention. Keeps connection-scoped configuration.",backend:"api",route:{method:"PATCH",path:"/integrations/connections/{connectionId}/credentials",tags:["Integrations"]},input:aEe,output:cEe,pagination:"none",async:"sync"}),zR=a.object({organizationId:a.string().min(1).optional().describe("Organization to operate on. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),n2=a.object({organizationEnabled:a.boolean(),effectiveEnabled:a.boolean()}),o2=zR.extend({connectionId:a.string().uuid().describe("Integration connection whose JIT policy is being read or updated.")}),r2=w({operationId:"integrations.getOrganizationExternalIdentityJitPolicy",summary:"Get the organization external-identity JIT policy",description:"Read the organization's stored external-identity JIT policy.",backend:"api",route:{method:"GET",path:"/integrations/external-identity-jit-policy",tags:["Integrations"]},input:zR,output:n2,pagination:"none",async:"sync"}),i2=w({operationId:"integrations.updateOrganizationExternalIdentityJitPolicy",summary:"Update the organization external-identity JIT policy",description:"Enable or disable external-identity JIT across an organization.",backend:"api",route:{method:"PATCH",path:"/integrations/external-identity-jit-policy",tags:["Integrations"]},input:zR.extend({enabled:a.boolean()}),output:n2,pagination:"none",async:"sync"}),s2=w({operationId:"integrations.getConnectionExternalIdentityJitPolicy",summary:"Get a connection external-identity JIT policy",description:"Read stored and effective JIT policy for one connection.",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}/external-identity-jit-policy",tags:["Integrations"]},input:o2,output:V1,pagination:"none",async:"sync"}),a2=w({operationId:"integrations.updateConnectionExternalIdentityJitPolicy",summary:"Update a connection external-identity JIT policy",description:"Enable or disable external-identity JIT for one connection.",backend:"api",route:{method:"PATCH",path:"/integrations/connections/{connectionId}/external-identity-jit-policy",tags:["Integrations"]},input:o2.extend({enabled:a.boolean()}),output:V1,pagination:"none",async:"sync"}),Ap=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),connectionId:a.string().uuid().describe("Slack integration connection ID (the `integration_connections.id`, not the Slack team id).")}),c2=a.object({connectionId:a.string().uuid(),defaultProjectId:a.string().uuid().nullable().describe("Project new threads route to when no channel mapping matches."),automaticResponses:a.boolean().describe("Auto-respond to messages in channels the bot is in (autoReactEnabled)."),acknowledgementMessage:a.boolean().describe("Post a processing acknowledgement while a run is in flight (processingMessageEnabled).")}),lEe=Ap,l2=w({operationId:"integrations.getSlackConfiguration",summary:"Get Slack connection configuration",description:"Read Slack connection configuration (default project, automatic responses, acknowledgement message).",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}/slack-configuration",tags:["Integrations"]},input:lEe,output:c2,pagination:"none",async:"sync"}),uEe=Ap.extend({defaultProjectId:a.string().uuid().nullable().optional().describe("Project new threads route to when no channel mapping matches. Pass null to clear it. Omit to leave unchanged."),automaticResponses:a.boolean().optional().describe("Omit to leave unchanged."),acknowledgementMessage:a.boolean().optional().describe("Omit to leave unchanged.")}),u2=w({operationId:"integrations.updateSlackConfiguration",summary:"Update Slack connection configuration",description:"Update Slack connection configuration. Omitted fields are left unchanged.",backend:"api",route:{method:"PATCH",path:"/integrations/connections/{connectionId}/slack-configuration",tags:["Integrations"]},input:uEe,output:c2,pagination:"none",async:"sync"}),d2=a.object({connectionId:a.string().uuid(),slackChannelId:a.string().min(1),slackChannelName:a.string().min(1),projectId:a.string().uuid()}),dEe=Ap,pEe=a.object({mappings:a.array(d2)}),p2=w({operationId:"integrations.listSlackChannelProjectMappings",summary:"List Slack channel-to-project mappings",description:"List channel-to-project mappings for a Slack connection.",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}/slack-channel-project-mappings",tags:["Integrations"]},input:dEe,output:pEe,pagination:"none",async:"sync"}),gEe=Ap.extend({slackChannelId:a.string().min(1).describe("Slack channel ID (e.g. C0123ABCDEF)."),slackChannelName:a.string().min(1).optional().describe("Optional. Ignored for storage — the authoritative channel name is "+"always resolved from the connection's channel catalog. Accepted only as a convenience/label; the response returns the catalog name."),projectId:a.string().uuid().describe("Project the channel routes to. Must belong to the organization.")}),g2=w({operationId:"integrations.setSlackChannelProjectMapping",summary:"Set a Slack channel-to-project mapping",description:"Create or update the channel-to-project mapping for one Slack channel. Idempotent on (connection, channel).",backend:"api",route:{method:"PUT",path:"/integrations/connections/{connectionId}/slack-channel-project-mappings/{slackChannelId}",tags:["Integrations"]},input:gEe,output:d2,pagination:"none",async:"sync"}),mEe=Ap.extend({slackChannelId:a.string().min(1)}),hEe=a.object({success:a.boolean()}),m2=w({operationId:"integrations.deleteSlackChannelProjectMapping",summary:"Delete a Slack channel-to-project mapping",description:"Delete a channel-to-project mapping.",backend:"api",route:{method:"DELETE",path:"/integrations/connections/{connectionId}/slack-channel-project-mappings/{slackChannelId}",tags:["Integrations"]},input:mEe,output:hEe,pagination:"none",async:"sync"})});var Ho,AEe,fEe,A2,ff,yf,f2,jR,y2,UR,b2,I2,yEe,bEe,S2,C2,v2,w2,E2,k2,x2,P2,R2,T2,B2,O2,_2,D2,L2,zc,bf,If,Sf,Cf,vf,wf,Ef,kf,xf,Pf,IEe;var FR=h(()=>{De();Ve();Ho=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),status:a.enum(["open","resolved","ignored"]),severity:a.enum(["low","medium","high","critical"]),componentId:a.string().uuid().nullable(),createdAt:a.string().datetime(),resolvedAt:a.string().datetime().nullable(),mutedAt:a.string().datetime().nullable(),muteHitCount:a.number().int().nonnegative(),lastActivityAt:a.string().datetime().nullable(),lastDeliveredAt:a.string().datetime().nullable(),locked:a.boolean(),redacted:a.boolean()}),AEe=a.object({channelId:a.string().nullable(),channelName:a.string().nullable(),threadTs:a.string().nullable(),permalink:a.string().nullable(),workspaceName:a.string().nullable()}),fEe=Ho.extend({slackChannels:a.array(AEe)}),A2=Ho.extend({delivery:a.record(a.string(),a.unknown()).nullable().optional()}),ff=a.object({projectId:a.string().uuid().optional().describe("Project to create the issue in. Auto-filled from CLI and SDK context when omitted."),name:a.string().trim().min(1).optional().describe("Stable issue name for indexing and mute matching. When omitted, the name is derived from contentMdx."),contentMdx:a.string().trim().min(1,"contentMdx cannot be empty").optional().describe("Safe Sazabi MDX document for the issue body (impact, root cause, remediation, evidence). Required unless sample is true."),severity:a.enum(["low","medium","high","critical"]).default("medium").describe("Issue severity used for prioritization and triage."),componentId:a.string().uuid().optional().describe("UUID of a registered component this issue belongs to. Required unless sample is true: every issue must be attributed to a component. List components first and pick the best match; register one if none fits. Missing or unknown IDs are rejected."),statusStartedAt:a.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident began."),sample:a.boolean().optional().describe("When true, creates (or returns) the organization's onboarding sample issue for the target project using the curated sample payload, and the alert rides the normal issue_triggered broadcast to the configured delivery rules. Mutually exclusive with the content inputs (name, contentMdx, severity, componentId, statusStartedAt); projectId stays allowed. Idempotent per project: an existing sample attempt's issue is returned instead of creating a new one. Requires a user credential.")}),yf=ff.superRefine((e,t)=>{if(e.sample){let n=[["name",e.name!==void 0],["contentMdx",e.contentMdx!==void 0],["severity",e.severity!=="medium"],["componentId",e.componentId!==void 0],["statusStartedAt",e.statusStartedAt!==void 0]];for(let[r,o]of n)if(o)t.addIssue({code:"custom",path:[r],message:`${r} is not allowed when sample is true.`})}else{if(!e.contentMdx)t.addIssue({code:"custom",path:["contentMdx"],message:"contentMdx is required"});if(!e.componentId)t.addIssue({code:"custom",path:["componentId"],message:"componentId is required"})}if(e.statusStartedAt&&!e.componentId)t.addIssue({code:"custom",path:["statusStartedAt"],message:"statusStartedAt requires componentId."})}),f2=a.object({issue:Ho,duplicateIssueId:a.string().uuid().optional().describe("Present when creation reused an existing open issue instead of creating a new one.")}),jR=a.object({projectId:a.string().uuid().optional().describe("Project to list issues for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:a.enum(["open","resolved","ignored"]).optional().describe("Filter by issue status."),severity:a.enum(["low","medium","high","critical"]).optional().describe("Filter by severity."),componentId:a.string().uuid().optional().describe("Filter by component ID.")}),y2=a.object({issues:a.array(Ho),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),UR=jR.extend({name:a.string().trim().optional().describe("Case-insensitive partial match on issue name."),includeDeliveryMetadata:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, include raw delivery metadata in each issue.")}),b2=a.object({issues:a.array(A2),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),I2=UR.omit({limit:!0,cursor:!0,includeDeliveryMetadata:!0}),yEe=a.object({open:a.number().int().nonnegative(),resolved:a.number().int().nonnegative(),ignored:a.number().int().nonnegative()}),bEe=a.object({low:a.number().int().nonnegative(),medium:a.number().int().nonnegative(),high:a.number().int().nonnegative(),critical:a.number().int().nonnegative()}),S2=a.object({total:a.number().int().nonnegative(),byStatus:yEe,bySeverity:bEe,filters:a.object({name:a.string().nullable(),status:a.enum(["open","resolved","ignored"]).nullable(),severity:a.enum(["low","medium","high","critical"]).nullable(),componentId:a.string().uuid().nullable()})}),C2=a.object({issueId:a.string().uuid().describe("Issue ID to retrieve.")}),v2=a.object({issue:fEe}),w2=a.object({issueId:a.string().uuid().describe("Issue ID to resolve."),statusResolvedAt:a.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident ended.")}),E2=a.object({issue:Ho}),k2=a.object({issueId:a.string().uuid().describe("Issue ID to ignore.")}),x2=a.object({issue:Ho}),P2=a.object({issueId:a.string().uuid().describe("Issue ID to reopen.")}),R2=a.object({issue:Ho}),T2=a.object({issueId:a.string().uuid().describe("Issue ID to reassign and reopen."),targetComponentId:a.string().uuid().describe("Active canonical component that will own the reopened issue.")}),B2=a.object({issue:Ho,sourceComponentId:a.string().uuid(),targetComponentId:a.string().uuid()}),O2=a.object({issueId:a.string().uuid().describe("Issue ID to mute.")}),_2=a.object({issue:Ho}),D2=a.object({issueId:a.string().uuid().describe("Issue ID to unmute.")}),L2=a.object({issue:Ho}),zc=w({operationId:"issues.create",summary:"Create an issue",description:"Create an issue in a project, returning an existing open issue when root-cause deduplication finds a match.",backend:"api",route:{method:"POST",path:"/issues",tags:["Issues"],successStatus:201},input:yf,output:f2,pagination:"none",async:"sync"}),bf=w({operationId:"issues.list",summary:"List issues",description:"List issues in a project, optionally filtered by status and severity.",backend:"api",route:{method:"GET",path:"/issues",tags:["Issues"]},input:jR,output:y2,pagination:"cursor",async:"sync"}),If=w({operationId:"issues.search",summary:"Search issues",description:"Search issues in a project by name, status, and severity.",backend:"api",route:{method:"GET",path:"/issues/search",tags:["Issues"]},input:UR,output:b2,pagination:"cursor",async:"sync"}),Sf=w({operationId:"issues.count",summary:"Count issues",description:"Count issues in a project with status and severity breakdowns.",backend:"api",route:{method:"GET",path:"/issues/count",tags:["Issues"]},input:I2,output:S2,pagination:"none",async:"sync"}),Cf=w({operationId:"issues.get",summary:"Get an issue",description:"Get a single issue by ID.",backend:"api",route:{method:"GET",path:"/issues/{issueId}",tags:["Issues"]},input:C2,output:v2,pagination:"none",async:"sync"}),vf=w({operationId:"issues.resolve",summary:"Resolve an issue",description:"Resolve an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/resolve",tags:["Issues"]},input:w2,output:E2,pagination:"none",async:"sync"}),wf=w({operationId:"issues.ignore",summary:"Ignore an issue",description:"Ignore an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/ignore",tags:["Issues"]},input:k2,output:x2,pagination:"none",async:"sync"}),Ef=w({operationId:"issues.reopen",summary:"Reopen an issue",description:"Reopen a resolved or ignored issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reopen",tags:["Issues"]},input:P2,output:R2,pagination:"none",async:"sync"}),kf=w({operationId:"issues.reassignAndReopen",summary:"Reassign and reopen an issue",description:"Atomically reassign a resolved or ignored issue to an active component and reopen it.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reassign-and-reopen",tags:["Issues"]},input:T2,output:B2,pagination:"none",async:"sync"}),xf=w({operationId:"issues.mute",summary:"Mute an issue",description:"Mute an issue, suppressing future re-fires without changing status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/mute",tags:["Issues"]},input:O2,output:_2,pagination:"none",async:"sync"}),Pf=w({operationId:"issues.unmute",summary:"Unmute an issue",description:"Unmute an issue, preserving its current status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/unmute",tags:["Issues"]},input:D2,output:L2,pagination:"none",async:"sync"}),IEe={count:Sf.contract,create:zc.contract,list:bf.contract,search:If.contract,get:Cf.contract,resolve:vf.contract,ignore:wf.contract,reopen:Ef.contract,reassignAndReopen:kf.contract,mute:xf.contract,unmute:Pf.contract}});var $R,Q2,Rf,Tf,N2,M2,z2,j2,Bf,GR,U2,F2,$2,G2,H2,q2,V2,K2,Y2,W2,J2,Z2,jc,Uc,Fc,$c,Gc,Of,_f,Df,Lf,Qf,SEe,CEe;var HR=h(()=>{De();Ve();$R=/^[a-zA-Z0-9\s\-_]+$/,Q2=a.object({id:a.string().uuid(),name:a.string(),expiresAt:a.string().datetime().nullable(),lastUsedAt:a.string().datetime().nullable(),createdAt:a.string().datetime()}),Rf=Q2.extend({projectId:a.string().uuid(),dataSourceConnectionId:a.string().uuid().nullable().describe("Linked data source connection ID when this key is scoped to one data source."),deactivatedAt:a.string().datetime().nullable().describe("Timestamp when this public key was deactivated.")}),Tf=Q2.extend({projectId:a.string().uuid().nullable()}),N2=a.object({projectId:a.string().uuid().optional().describe("Project to list keys for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),M2=a.object({publicKeys:a.array(Rf),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),z2=a.object({secretKeys:a.array(Tf),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),j2=a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:a.string().uuid().describe("Key ID to fetch.")}),Bf=a.object({publicKey:Rf}),GR=a.object({secretKey:Tf}),U2=a.object({publicKey:Rf.extend({value:a.string()})}),F2=a.object({projectId:a.string().uuid().optional().describe("Project to ensure the log forwarding key for. Auto-filled from CLI and SDK context when omitted.")}),$2=a.object({secretKey:Tf.extend({value:a.string()})}),G2=a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:a.string().uuid().describe("Key ID to update."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex($R,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:a.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),H2=a.object({params:a.object({keyId:a.string().uuid().describe("Public key ID to deactivate.")}),query:a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted.")})}).transform(({params:e,query:t})=>({...t,...e})),q2=Bf,V2=a.void(),K2=a.object({organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Y2=a.object({keyId:a.string().uuid().describe("Key ID to fetch."),organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),W2=a.object({organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project to scope this key to. When set, the key can only access resources within this project. Omit for organization-wide access."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex($R,"Name can only contain letters, numbers, spaces, hyphens, and underscores").describe("Human-readable name for the key."),expiresAt:a.string().datetime().optional().describe("Optional expiration timestamp for the key.")}),J2=a.object({keyId:a.string().uuid().describe("Key ID to update."),organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex($R,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:a.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),Z2=a.object({params:a.object({keyId:a.string().uuid().describe("Key ID to delete.")}),query:a.object({organizationId:a.string().min(1).optional().describe("Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}).default({})}).transform(({params:e,query:t})=>({...e,...t.organizationId!==void 0?{organizationId:t.organizationId}:{}})),jc=w({operationId:"publicKeys.list",summary:"List public keys",description:"List public keys within one project.",backend:"api",route:{method:"GET",path:"/public-keys",tags:["Public Keys"]},input:N2,output:M2,pagination:"cursor",async:"sync",examples:[{name:"list-public-keys",input:{projectId:"11111111-1111-4111-8111-111111111111",limit:25},output:{publicKeys:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),Uc=w({operationId:"publicKeys.get",summary:"Get a public key",description:"Get one public key within one project.",backend:"api",route:{method:"GET",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:j2,output:Bf,pagination:"none",async:"sync",examples:[{name:"get-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Fc=w({operationId:"publicKeys.ensureLogForwarding",summary:"Ensure a log forwarding public key",description:"Ensure a reusable project-scoped public key exists for CLI log forwarding.",backend:"api",route:{method:"POST",path:"/public-keys/log-forwarding/ensure",tags:["Public Keys"]},input:F2,output:U2,pagination:"none",async:"sync",examples:[{name:"ensure-log-forwarding-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"sazabi-cli-forward",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_public_example"}}}]}),$c=w({operationId:"publicKeys.update",summary:"Update a public key",description:"Update one public key within one project.",backend:"api",route:{method:"PATCH",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:G2,output:Bf,pagination:"none",async:"sync",examples:[{name:"rename-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222",name:"Updated CLI forwarder"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"Updated CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Gc=w({operationId:"publicKeys.deactivate",summary:"Deactivate a public key",description:"Deactivate one public key within one project. Recently validated requests may continue to authenticate for a short period after deactivation.",backend:"api",route:{method:"POST",path:"/public-keys/{keyId}/deactivate",tags:["Public Keys"],inputStructure:"detailed"},input:H2,output:q2,pagination:"none",async:"sync"}),Of=w({operationId:"secretKeys.list",summary:"List secret keys",description:"List secret keys within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys",tags:["Secret Keys"]},input:K2,output:z2,pagination:"cursor",async:"sync",examples:[{name:"list-secret-keys",input:{limit:25},output:{secretKeys:[{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),_f=w({operationId:"secretKeys.get",summary:"Get a secret key",description:"Get one secret key within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:Y2,output:GR,pagination:"none",async:"sync",examples:[{name:"get-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Df=w({operationId:"secretKeys.create",summary:"Create a secret key",description:"Create one secret key within the organization.",backend:"api",route:{method:"POST",path:"/secret-keys",successStatus:201,tags:["Secret Keys"]},input:W2,output:$2,pagination:"none",async:"sync",examples:[{name:"create-secret-key",input:{name:"CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_secret_example"}}}]}),Lf=w({operationId:"secretKeys.update",summary:"Update a secret key",description:"Update one secret key within the organization.",backend:"api",route:{method:"PATCH",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:J2,output:GR,pagination:"none",async:"sync",examples:[{name:"rename-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333",name:"Updated CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"Updated CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Qf=w({operationId:"secretKeys.delete",summary:"Delete a secret key",description:"Delete one secret key within the organization.",backend:"api",route:{method:"DELETE",path:"/secret-keys/{keyId}",successStatus:204,tags:["Secret Keys"],inputStructure:"detailed"},input:Z2,output:V2,pagination:"none",async:"sync"}),SEe={list:jc.contract,get:Uc.contract,ensureLogForwarding:Fc.contract,update:$c.contract,deactivate:Gc.contract},CEe={list:Of.contract,get:_f.contract,create:Df.contract,update:Lf.contract,delete:Qf.contract}});var eG="## Overview\n\nSend Claude Code session telemetry to Sazabi. Every session emits lifecycle events — prompts, tool calls, and model API requests with token counts and cost — as OTLP log records.\n\n## How it works\n\nClaude Code has a first-party OTLP exporter. Set a handful of environment variables in `~/.claude/settings.json` pointing the exporter at your Sazabi intake URL, and Claude Code sends telemetry over OTLP/HTTP on its own — no separate SDK or code changes required.\n\n## Streams\n\n- **Session events** — `claude_code.user_prompt`, `claude_code.tool_result`, `claude_code.api_request`, and related events, with attributes for `prompt`, `model`, `session.id`, `user.email`, token counts, and cost.\n\n## Limitations\n\n- Claude Code **metrics** are not ingested; only the logs exporter is supported.\n";var X2=()=>{};var nG=`---
|
|
106
106
|
name: claude-code-log-source-setup
|
|
107
107
|
description: Export Claude Code session telemetry to a Sazabi project. Use when the user wants to "connect Claude Code", "set up Claude Code telemetry", "ingest Claude Code events", "send my coding agent telemetry to Sazabi", or after running \`sazabi log-sources skill --provider claude_code\`. Points Claude Code's built-in OTLP exporter at Sazabi's keyed intake host — no SDK or code changes required.
|
|
108
108
|
surface: log-source
|
|
@@ -7573,7 +7573,7 @@ sinks:
|
|
|
7573
7573
|
codec: otlp`}]}]}]},{id:"wire-sources",section:"config",title:"Wire sources",actions:[{instruction:'Replace `inputs: ["*"]` on the `remap` transform with your specific source or transform IDs in production. `["*"]` also matches `internal_metrics` and other unrelated components.',notes:[{variant:"requirement",text:"The sink's `otlp` codec doesn't build the OTLP envelope on its own. If you wire raw sources straight into it, Vector drops every event."},{text:"Sazabi indexes logs and traces from Vector. It accepts metrics at the intake but silently drops them."}]}]},{id:"traces",section:"config",title:"Forward traces (optional)",actions:[{instruction:'Add a second `opentelemetry` sink with `uri` ending in `/v1/traces` and explicit `inputs` referencing an already-OTLP-shaped source, typically an `opentelemetry` Vector source with `use_otlp_decoding.traces: true` (use `inputs: ["otlp_in.traces"]`).',notes:[{text:"No remap is needed for traces."},{variant:"requirement",text:'Do not wire `["*"]` into a traces sink.'}]}]}]}});var pY;var gY=h(()=>{dY();pY={id:"vector",name:"Vector",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"vector",label:"Vector",transform:"otlp-passthrough"}],subtitle:"Forward logs and traces from your infrastructure to Sazabi using the Vector observability pipeline.",features:["Kubernetes DaemonSet","High-throughput pipeline","Built-in transforms","Multiple source types"],evidenceHints:["vector.toml/yaml/json, vector.dev Helm values, or Vector sidecars","VECTOR_* environment variables or VRL transform config","README/docs naming Vector as the observability pipeline"],setupSkill:te,dashboard:{iconKey:"vector",intakeSourceId:"vector"}}});var tB,nB,eB,oB;var mY=h(()=>{Un();tB={kind:"multi-step",steps:[{id:"prepare",title:"Create token",actions:[{kind:"instruction",instruction:"Create a full-access API token in your [Vercel account settings](https://vercel.com/account/tokens). For team accounts, create the token while scoped to the correct team.",notes:[{text:"A token gets the same permissions as your account."}]}]},{id:"credentials",title:"Enter token",actions:[{id:"token",kind:"secret",label:"API token",instruction:"Enter your Vercel API token below.",placeholder:"Enter your Vercel API token"}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token"},resultAs:"validate"}],metadata:{vercelApiToken:"$token",vercelTeamId:"$validate.teamId",vercelTeamName:"$validate.teamName"},button:vt}},nB={groups:[{id:"open-drains",section:"config",title:"Open Drains",notes:[{variant:"requirement",text:"**Vercel Drains require the Pro or Enterprise plan.** Hobby and Pro Trial teams cannot create drains."}],actions:[{instruction:"In your [Vercel dashboard](https://vercel.com/dashboard), go to **Team Settings > Drains** and create a new drain."},{instruction:"Choose **Logs** as the data to deliver.",notes:[{text:"This path covers logs only — to send traces or Web Analytics events, connect your Vercel account instead and Sazabi creates those drains for you."}]}]},{id:"endpoint",section:"config",title:"Set the endpoint",actions:[{instruction:"Paste your Sazabi intake URL (above) into the drain's endpoint field."}]},{id:"delivery-settings",section:"config",title:"Set delivery options",actions:[{instruction:"Set the delivery format to **JSON**.",notes:[{text:"Sazabi does not parse NDJSON on this endpoint."}]},{instruction:"Pick the projects, environments, and log sources to send.",notes:[{text:"Sazabi accepts every Vercel log source (Static, Lambda, Edge, Build, External, Firewall, Redirect)."}]}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the drain, then send some traffic — push a deployment or hit an application route. Logs show up in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/vercel"},eB=[{field:"name",header:"Project"},{field:"framework",header:"Framework",width:"w-32",cell:"badge",transform:"fallback:Unspecified"}],oB={content:{kind:"tabs",tabs:[{id:"logs",label:"Logs",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:eB,searchPlaceholder:"Search projects...",searchFields:["name","framework"],dedupeByConfigField:"vercelProjectId",dedupeExtraMatch:{drainType:"logs"},emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have logs drains configured."},toStreamItem:{displayName:"$item.name (Logs)",config:{vercelProjectId:"$item.id",vercelProjectName:"$item.name",drainType:"logs"}}}},{id:"traces",label:"Traces",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:eB,searchPlaceholder:"Search projects...",searchFields:["name","framework"],dedupeByConfigField:"vercelProjectId",dedupeExtraMatch:{drainType:"traces"},emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have traces drains configured."},toStreamItem:{displayName:"$item.name (Traces)",config:{vercelProjectId:"$item.id",vercelProjectName:"$item.name",drainType:"traces"}}}},{id:"analytics",label:"Analytics",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:eB,searchPlaceholder:"Search projects...",searchFields:["name","framework"],dedupeByConfigField:"vercelProjectId",dedupeExtraMatch:{drainType:"analytics"},emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have analytics drains configured."},toStreamItem:{displayName:"$item.name (Analytics)",config:{vercelProjectId:"$item.id",vercelProjectName:"$item.name",drainType:"analytics"}}}}]}}});var wxe,Exe,kxe,hY;var AY=h(()=>{mY();wxe=["vercelApiToken"],Exe={id:"vercel",label:"Vercel",transform:"vercel-drain"},kxe={id:"vercel-analytics",label:"Vercel Analytics",transform:"vercel-analytics-drain"},hY={id:"vercel",name:"Vercel",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:wxe,serverOwnedStreamConfigFields:["vercelDrainId"],secretStreamConfigFields:["drainSecret"],intake:[Exe,kxe],subtitle:"Forward your Vercel deployment logs, traces, and Web Analytics events directly to Sazabi for real-time analysis and alerting.",features:["Log forwarding","Trace forwarding","Web Analytics forwarding","Real-time streaming"],evidenceHints:["vercel.json, .vercel/, or Vercel build/deploy scripts","@vercel packages, VERCEL_* environment variables, or GitHub Actions that run vercel","README/docs naming Vercel as the deployment host"],setupSkill:te,dashboard:{iconKey:"vercel",intakeSourceId:"vercel",streamSelectorLayout:"sidepanel",streamTableColumns:[{kind:"config-enum-badge",header:"Type",width:"w-24",configField:"drainType",values:[{value:"logs",label:"Logs"},{value:"traces",label:"Traces"},{value:"analytics",label:"Analytics"}],fallbackLabel:"N/A"}],actions:{submit:{validate:{kind:"source-action",actionId:"validate-token"}},list:{list:{kind:"source-action",actionId:"list-projects",itemsField:"projects"}}}}}});var rB;var fY=h(()=>{rB={perStreamInstructions:!0,groups:[{id:"endpoint",section:"config",title:"Send events",actions:[{instruction:"Send an HTTP `POST` with a JSON body to your webhook URL (above).",notes:[{text:"A single JSON object is stored as one event; a JSON array of objects is stored as one event per element."},{text:"You can append any path — for example `/deploys` — to record the event's origin; the path is passed through and stored as `webhook.path`."}]}]},{id:"configure-vendor",section:"config",title:"Paste the URL into your vendor",actions:[{instruction:"Open your vendor's webhook or outbound-event settings, add a new endpoint, and paste the URL above. Choose JSON as the payload format if the vendor offers a choice.",notes:[{text:"Sazabi reads the time, severity, and message from common field names when present, and stores every field of the payload under `webhook.*` either way. There is nothing to map or declare."}]}]},{id:"verify",section:"verify",title:"Send a test event and verify",actions:[{instruction:"Trigger a test event from your vendor — most webhook settings pages have a “Send test” button — or POST a sample event yourself, then watch for it below.",payloads:[{kind:"code",label:"Send a test event",language:"bash",copyLabel:"curl test event",value:`curl -X POST \\
|
|
7574
7574
|
https://\${context.ingestHost}/test \\
|
|
7575
7575
|
-H 'content-type: application/json' \\
|
|
7576
|
-
-d '{"event":"hello.world","level":"info","message":"first webhook event"}'`}]}]}]}});var yY;var bY=h(()=>{fY();yY={id:"webhook_events",name:"Webhook Events",searchAliases:["webhook","webhooks","json events","http events","generic webhook","event stream"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"webhook-events",label:"Webhook Events",transform:"webhook-events"}],lifecycleSkipReason:"Manual webhook setup is not exercised by automated lifecycle tests yet.",subtitle:"Point any vendor's webhooks at Sazabi. Arbitrary JSON events land as searchable log records with zero vendor-specific configuration.",features:["Any JSON event stream","One keyed URL per endpoint","Full payload preserved as attributes","No schema or field mapping"],evidenceHints:["A vendor that emits plain JSON webhooks without a dedicated Sazabi source","An internal service, deploy bot, or cron that POSTs JSON events","Existing outbound webhook configuration with no other Sazabi destination"],setupSkill:te,dashboard:{slug:"webhook-events",iconKey:"webhook-events",intakeSourceId:"webhook-events"}}});var Mf,zf,jIt,xxe,UIt,FIt,$It,Hc,GIt,HIt,Pxe,Rxe,Txe,qIt;var IY=h(()=>{aV();uV();gV();AV();bV();CV();EV();PV();BV();DV();NV();jV();$V();qV();YV();ZV();tK();rK();aK();uK();gK();AK();bK();CK();EK();PK();BK();DK();NK();jK();$K();qK();YK();ZK();tY();rY();aY();uY();gY();AY();bY();Mf=[sV,pV,lV,hV,yV,SV,wV,xV,TV,_V,QV,zV,FV,HV,KV,JV,eK,oK,sK,lK,pK,SK,hK,yK,wK,xK,_K,TK,QK,zK,FK,HK,KK,JK,eY,oY,sY,lY,pY,hY,yY],zf=Mf,jIt=Object.fromEntries(zf.map((e)=>[e.id,e.sensitiveFields??[]])),xxe=["publicKeyId"],UIt=Object.fromEntries(zf.map((e)=>[e.id,[...new Set([...xxe,...e.serverOwnedStreamConfigFields??[],...e.secretStreamConfigFields??[]])]])),FIt=Object.fromEntries(zf.map((e)=>[e.id,e.secretStreamConfigFields??[]])),$It=Object.fromEntries(zf.flatMap((e)=>[...Object.values(e.dashboard?.actions?.submit??{}),...Object.values(e.dashboard?.actions?.list??{}),...Object.values(e.dashboard?.actions?.prefetch??{})].flatMap((t)=>{let n=t.sensitiveInputFields??[];if(n.length===0)return[];return[["procedure"in t?t.procedure:`${e.id}.${t.actionId}`,n]]}))),Hc=["vercel","cloudflare","railway","render","fly_io","netlify","supabase","digital_ocean","inngest","trigger_dev","temporal","mastra","neon","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","sentry_platform","openrouter","posthog","posthog_sdk","gcp","otel","otel_metrics","fluent_bit","vector","grafana_alloy","otel_collector","cloudflare_workers","elastic_cloud","porter","respan","plain","prometheus","webhook_events","claude_code","codex","sazabi_browser_sdk"],GIt=Mf.map((e)=>({id:e.id,name:e.name,capabilities:e.capabilities})),HIt=Object.fromEntries(Mf.map((e)=>[e.id,{name:e.name,setupSkill:e.setupSkill}])),Pxe={cloudflare:YR,cloudwatch:tT,convex:iT,digital_ocean:uT,fly_io:AT,gcp:bT,plain:OT,posthog:NT,render:FT,sentry_platform:VT,vercel:tB},Rxe={cloudflare:WR,cloudwatch:nT,convex:aT,digital_ocean:pT,fly_io:yT,gcp:IT,plain:DT,posthog:MT,render:GT,vercel:oB},Txe={cloudflare:JR,cloudflare_workers:KR,cloudwatch:oT,convex:sT,datadog:cT,daytona:lT,digital_ocean:dT,fluent_bit:hT,fly_io:fT,grafana_alloy:CT,e2b:gT,elastic_cloud:mT,gcp:ST,inngest:vT,langchain:wT,mastra:ET,neon:kT,netlify:xT,openrouter:PT,otel:BT,otel_collector:RT,otel_metrics:TT,plain:_T,posthog:zT,posthog_sdk:QT,porter:LT,prometheus:jT,railway:UT,render:$T,respan:HT,sentry:YT,sentry_platform:KT,supabase:WT,temporal:JT,trigger_dev:ZT,vector:XT,vercel:nB,webhook_events:rB,claude_code:VR,codex:rT,sazabi_browser_sdk:qT},qIt=Mf.map((e)=>({sourceId:e.id,name:e.name,capabilities:e.capabilities,setupAuthModes:e.auth,deliveryModes:e.delivery,hasDashboardMetadata:Boolean(e.dashboard),hasManagedFlow:Boolean(Pxe[e.id]),hasConnectionlessFlow:Boolean(Txe[e.id]),hasStreamSelector:Boolean(Rxe[e.id]),lifecycleEligible:e.lifecycleEligible??!1,lifecycleSkipReason:e.lifecycleSkipReason}))});var SY=h(()=>{IY()});var iB=h(()=>{rV();SY()});var CY,sB,Bxe,jf,Oxe,vY,aB,Hs,fp,wY,EY,kY,Uf,xY,PY,qc,RY,TY,Vc,BY,OY,Ff,_Y,DY,$f,LY,QY,Gf,_xe;var Hf=h(()=>{iB();De();Ve();CY=Hc,sB=a.enum(CY),Bxe=a.enum(["pending","provisioning","active","error"]),jf=a.enum(["managed","connectionless"]),Oxe=a.object({name:a.string().describe("Field name used as the JSON key in metadata."),type:a.string().describe('Zod type name, e.g. "string", "boolean", "enum".'),required:a.boolean().describe("Whether the field is required."),sensitive:a.boolean().describe("Whether the field contains a secret and will be encrypted."),description:a.string().nullable().describe("Human-readable description of the field.")}),vY=a.object({id:a.string().describe("Log source provider identifier."),name:a.string().describe("Human-readable display name."),modes:a.array(jf).describe("Setup modes this provider supports. `managed` log sources take vendor credentials; `connectionless` log sources mint a keyed intake endpoint."),metadataFields:a.array(Oxe).describe("Fields required in the metadata object when creating a managed log source. Empty for connectionless-only providers."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),aB=a.object({kind:a.enum(["url","hostPort"]).describe("Card shape. `url` = a complete keyed URL whose hostname authenticates; `hostPort` = a non-keyed listener host + port whose credential travels separately."),label:a.string().optional().describe("Card label. Present when a log source exposes several endpoints (e.g. separate logs and traces destinations)."),url:a.string().optional().describe("The complete keyed intake URL. Present when kind is `url`."),host:a.string().optional().describe("The regional listener hostname (no scheme). Present when kind is `hostPort`."),port:a.number().int().optional().describe("The listener port. Present when kind is `hostPort`."),description:a.string().optional().describe("Vendor-specific guidance rendered under the value."),extraCredential:a.object({label:a.string(),value:a.string(),description:a.string().optional()}).optional().describe("The credential the sender must attach when the hostname alone does not authenticate. Present when kind is `hostPort`.")}),Hs=a.object({id:a.string().uuid(),logSourceId:a.string().uuid().describe("Root log source ID. Every log stream roots on exactly one log source."),displayName:a.string().nullable().describe("Display name pulled automatically from information available through the log source connection (e.g. the vendor object's name). Null when no connection-derived name exists; connectionless log streams are always nameless."),config:a.record(a.string(),a.unknown()),status:Bxe,errorMessage:a.string().nullable(),enabled:a.boolean().describe("Whether the log stream is currently ingesting. Independent of provisioning status: a paused log stream stays configured but stops accepting new data."),createdAt:a.string().datetime(),endpointCards:a.array(aB).optional().describe("Server-computed endpoint card(s) for this log stream's delivery key — where to point the sender. Present only for log streams that carry their own intake key.")}),fp=a.object({id:a.string().uuid(),provider:sB,mode:jf,name:a.string().describe('Display name — a generated mnemonic (e.g. "amber-falcon"). Assigned at creation and immutable.'),streamCount:a.number().int(),createdAt:a.string().datetime()}),wY=fp.extend({streams:a.array(Hs).describe("The log source's live log streams, newest first.")}),EY=a.object({}),kY=a.object({providers:a.array(vY)}),Uf=w({operationId:"logSources.listProviders",description:"List all supported log source providers with their setup modes and metadata requirements.",backend:"api",route:{method:"GET",path:"/log-sources/providers",tags:["Log Sources"]},input:EY,output:kY,pagination:"none",async:"sync"}),xY=a.object({projectId:a.string().uuid().optional().describe("Project to list log sources for. Auto-filled from SDK context when omitted."),provider:sB.optional().describe("Filter log sources by provider.")}),PY=a.object({logSources:a.array(fp)}),qc=w({operationId:"logSources.list",description:"List log sources within one project.",backend:"api",route:{method:"GET",path:"/log-sources",tags:["Log Sources"]},input:xY,output:PY,pagination:"none",async:"sync"}),RY=a.object({projectId:a.string().uuid().optional().describe("Project to create the log source in. Auto-filled from SDK context when omitted."),provider:sB.describe("Log source provider identifier."),mode:jf.optional().describe("Setup mode. Defaults to `managed` when metadata is provided, otherwise `connectionless`. Must be a mode the provider supports (see `modes` on the provider catalog)."),metadata:a.record(a.string(),a.unknown()).optional().describe("Vendor credentials and configuration for managed setup. Fields vary by provider (see `metadataFields` on the provider catalog). Required for managed mode; must be omitted for connectionless mode.")}).strict(),TY=a.object({logSource:fp.describe("The created log source."),streamId:a.string().uuid().optional().describe("ID of the log stream created alongside the log source. Present for connectionless log sources (which always mint their keyed log stream) and for managed providers that auto-provision a default log stream."),publicKey:a.string().optional().describe("Intake key minted for the log source. Store this securely — it is only shown once. Present for connectionless log sources and for managed providers that ingest through a Sazabi endpoint."),endpointCards:a.array(aB).optional().describe("Server-computed endpoint card(s) for the minted key — where to point the sender. Present for connectionless log sources.")}),Vc=w({operationId:"logSources.create",description:"Create a log source. Managed mode takes vendor credentials in `metadata`, validates them, and provisions delivery behind the log source. Connectionless mode mints the log source plus a keyed log stream and returns the intake key and endpoint card(s) to point the sender at.",backend:"api",route:{method:"POST",path:"/log-sources",successStatus:201,tags:["Log Sources"]},input:RY,output:TY,pagination:"none",async:"sync"}),BY=a.object({logSourceId:a.string().uuid().describe("Log source ID to fetch.")}),OY=a.object({logSource:wY}),Ff=w({operationId:"logSources.get",description:"Get one log source by ID, including its log streams and their endpoint card(s).",backend:"api",route:{method:"GET",path:"/log-sources/{logSourceId}",tags:["Log Sources"]},input:BY,output:OY,pagination:"none",async:"sync"}),_Y=a.object({logSourceId:a.string().uuid().describe("Log source ID to update."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for all of the log source's log streams. Reversible; never deletes anything.")}).strict(),DY=a.object({logSource:fp}),$f=w({operationId:"logSources.update",description:"Update a log source: pause or resume ingestion across its log streams. Log sources cannot be renamed — their generated names are immutable.",backend:"api",route:{method:"PATCH",path:"/log-sources/{logSourceId}",tags:["Log Sources"]},input:_Y,output:DY,pagination:"none",async:"sync"}),LY=a.object({logSourceId:a.string().uuid().describe("Log source ID to delete.")}),QY=a.object({success:a.boolean(),teardownError:a.string().nullable().describe("Null when vendor-side cleanup succeeded or was not needed; error message when remote cleanup failed and must be finished manually.")}),Gf=w({operationId:"logSources.delete",description:"Delete a log source. Tombstones the log source and its log streams, deactivates their intake keys (already-ingested data is preserved with its attribution), and runs vendor-side cleanup for managed log sources when the provider supports it.",backend:"api",route:{method:"DELETE",path:"/log-sources/{logSourceId}",successStatus:200,tags:["Log Sources"]},input:LY,output:QY,pagination:"none",async:"sync"}),_xe={listProviders:Uf.contract,list:qc.contract,create:Vc.contract,get:Ff.contract,update:$f.contract,delete:Gf.contract}});var Dxe,Lxe,cB,Qxe,Nxe,lB,Mxe,zxe,uB,jxe,Uxe,dB,Fxe,$xe,pB,Gxe,Hxe,gB,iCt;var NY=h(()=>{De();Ve();Hf();Dxe=a.object({logSourceId:a.string().uuid().describe("Log source ID to list log streams for."),enabled:a.boolean().optional().describe("Optional filter on log stream ingestion state. Omit to list all log streams; pass true for only enabled log streams or false for only paused log streams.")}),Lxe=a.object({streams:a.array(Hs)}),cB=w({operationId:"logStreams.list",description:"List the log streams that belong to a log source.",backend:"api",route:{method:"GET",path:"/log-streams",tags:["Log Streams"]},input:Dxe,output:Lxe,pagination:"none",async:"sync"}),Qxe=a.object({logSourceId:a.string().uuid().describe("Log source ID to create the log stream under."),config:a.record(a.string(),a.unknown()).optional().describe("Platform-specific log stream configuration.")}).strict(),Nxe=a.object({streamId:a.string().uuid().describe("ID of the created log stream.")}),lB=w({operationId:"logStreams.create",description:"Create a new log stream under a managed log source. Triggers async provisioning; poll the log stream to track it. Connectionless log sources are single-stream — create another log source instead.",backend:"api",route:{method:"POST",path:"/log-streams",successStatus:201,tags:["Log Streams"]},input:Qxe,output:Nxe,pagination:"none",async:"sync"}),Mxe=a.object({streamId:a.string().uuid().describe("Log stream ID to fetch.")}),zxe=a.object({stream:Hs}),uB=w({operationId:"logStreams.get",description:"Get one log stream by ID. Use to poll provisioning status.",backend:"api",route:{method:"GET",path:"/log-streams/{streamId}",tags:["Log Streams"]},input:Mxe,output:zxe,pagination:"none",async:"sync"}),jxe=a.object({streamId:a.string().uuid().describe("Log stream ID to update."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for this log stream. Reversible; never deletes anything.")}).strict(),Uxe=a.object({stream:Hs}),dB=w({operationId:"logStreams.update",description:"Update a log stream: pause or resume its ingestion. Log streams cannot be renamed.",backend:"api",route:{method:"PATCH",path:"/log-streams/{streamId}",tags:["Log Streams"]},input:jxe,output:Uxe,pagination:"none",async:"sync"}),Fxe=a.object({streamId:a.string().uuid().describe("Log stream ID to delete.")}),$xe=a.object({success:a.boolean()}),pB=w({operationId:"logStreams.delete",description:"Delete a log stream. Tombstones the log stream and deactivates its intake key. Deleting a connectionless log source's only log stream tombstones the log source too.",backend:"api",route:{method:"DELETE",path:"/log-streams/{streamId}",successStatus:200,tags:["Log Streams"]},input:Fxe,output:$xe,pagination:"none",async:"sync"}),Gxe=a.object({streamId:a.string().uuid().describe("Log stream ID to reassign."),targetLogSourceId:a.string().uuid().describe("Log source to move the log stream under. Must be a connectionless log source in the same project; the stream's key is rebound to this log source's intake adapter.")}).strict(),Hxe=a.object({stream:Hs}),gB=w({operationId:"logStreams.reassign",description:"Move a log stream to a different connectionless log source in the same project. Preserves the stream's ID, intake key credential, and ingested data; rebinds the key's intake adapter to the target log source's provider so future data is processed as that provider's format.",backend:"api",route:{method:"POST",path:"/log-streams/{streamId}/reassign",successStatus:200,tags:["Log Streams"]},input:Gxe,output:Hxe,pagination:"none",async:"sync"}),iCt={list:cB.contract,create:lB.contract,get:uB.contract,update:dB.contract,delete:pB.contract,reassign:gB.contract}});var MY,zY,jY,UY,FY,$Y,GY,qf,HY,qY,qxe,VY,mB,KY,YY,WY,JY,ZY,XY,eW,tW,Vxe,nW,oW,Kc,Yc,Wc,Jc,Zc,Kxe;var hB=h(()=>{De();Ve();MY=a.enum(["eq","neq","in","contains","starts_with","gt","gte","lt","lte","between","exists"]).describe("Filter operator: 'eq' (equals), 'neq' (not equals), 'in' (in array), 'contains' (substring), 'starts_with' (prefix), 'gt' (greater than), 'gte' (greater than or equal), 'lt' (less than), 'lte' (less than or equal), 'between' (range), 'exists' (field exists)"),zY=a.enum(["any","all","phrase"]).describe("Search mode: 'any' (match any token), 'all' (match all tokens), 'phrase' (exact phrase match)"),jY=a.object({query:a.string().min(1,"Search query must be at least 1 character").max(500,"Search query must be at most 500 characters").describe("Search query text (1-500 characters)"),fields:a.array(a.string()).optional().describe("Fields to search in (defaults to backend allowlist)"),mode:zY.optional().default("all").describe("Token matching mode")}),UY=a.object({field:a.string().describe("Field name to filter on"),op:MY.describe("Filter operator"),value:a.union([a.string(),a.number(),a.boolean(),a.array(a.union([a.string(),a.number()])),a.object({from:a.string(),to:a.string()})]).describe("Filter value (type depends on operator)")}).superRefine((e,t)=>{if(e.op==="in"&&!Array.isArray(e.value))t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be an array when op is 'in'",path:["value"]});if(e.op==="between"){let n=e.value;if(!(typeof n==="object"&&n!==null&&("from"in n)&&("to"in n)))t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be an object with from/to when op is 'between'",path:["value"]})}if(e.op==="exists"&&typeof e.value!=="boolean")t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be boolean when op is 'exists'",path:["value"]})}),FY=a.object({field:a.string().describe("Field name to sort by"),direction:a.enum(["asc","desc"]).default("desc").describe("Sort direction: 'asc' for ascending, 'desc' for descending")}),$Y=a.object({limit:a.number().int().min(1,"Limit must be at least 1").max(1000,"Limit must be at most 1000").default(50).describe("Maximum number of rows to return"),cursor:a.string().optional().describe("Opaque cursor from previous response for pagination")}),GY=a.object({projectId:a.string().uuid().optional().describe("Project to query logs for. Auto-filled from CLI and SDK context when omitted."),search:jY.optional().describe("Full-text search configuration"),filters:a.array(UY).optional().describe("Structured filter clauses (ANDed together). When no `timestamp` filter is provided, queries default to a 24h look-back window; pass an explicit `timestamp` filter to query a different range."),select:a.array(a.string()).optional().describe("Fields to return (defaults to backend default set)"),sort:FY.optional().describe("Sort configuration (defaults to timestamp desc)"),pagination:$Y.optional().describe("Pagination configuration")}),qf=a.enum(["clickhouse","better-stack","datadog","gcp","axiom","cloudwatch","sentry","posthog","mezmo"]),HY=a.enum(["native","external"]),qY=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted."),question:a.string().trim().min(1).max(2000).optional().describe("Optional natural-language question used to retrieve coherent schema bundles."),topK:a.number().int().min(1).max(32).optional().describe("Max schema bundles to return when question is set (default 8)")}),qxe=a.object({id:a.string().describe("Stable schema-bundle document id"),service:a.string().describe("Emitting service for this co-occurrence shape"),keys:a.array(a.string()).describe("Co-occurring otel_log_attributes keys in this bundle"),rowCount:a.number().nonnegative().describe("Observed row count when the bundle was compiled"),score:a.number().optional().describe("Retrieval rank score when returned from vector search")}),VY=a.object({backend:a.object({id:qf,name:a.string(),kind:HY}).describe("Active log backend for the project"),features:a.array(a.string()).describe("Backend features registered on the server"),commands:a.array(a.enum(["schema","query","volume","patterns","nativeQuery"])).describe("CLI/API commands available for this backend"),queryableFields:a.array(a.string()).describe("Fields accepted by the normalized logs.query contract"),searchableFields:a.array(a.string()).describe("Fields accepted by logs.query full-text search"),question:a.string().optional().describe("Echo of the question used for retrieval when provided"),selectedBundles:a.array(qxe).describe("Question-conditioned coherent schema bundles (empty when question omitted)"),selectedAttributeKeys:a.array(a.string()).describe("Flattened attribute keys from selectedBundles, or recent keys when question omitted"),observedServiceNames:a.array(a.string()).describe("Recently observed service names for this project"),observedAttributeKeys:a.array(a.string()).describe("Observed / selected attribute keys for agent and CLI schema discovery"),indexStatus:a.enum(["ready","empty","unavailable","skipped"]).describe("ready: bundles retrieved; empty: index missing/empty; unavailable: retrieval failed; skipped: no question (legacy path)"),schemaContext:a.record(a.string(),a.any()).optional().describe("Backend-specific schema guidance and examples")}),mB=a.enum(["1m","5m","15m","1h"]),KY=a.enum(["service_name","severity_text","environment"]),YY=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:mB.optional().describe("Aggregation bucket size for the volume series"),groupBy:KY.optional().describe("Optional field to split volume series by"),filters:a.object({service_name:a.string().optional(),severity_text:a.string().optional(),environment:a.string().optional()}).optional()}).refine((e)=>new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),WY=a.object({total:a.number().nonnegative(),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:mB,series:a.array(a.object({group:a.string(),total:a.number().nonnegative(),points:a.array(a.object({bucket:a.string(),count:a.number().nonnegative()}))}))}),JY=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:a.string().min(1).max(500).optional().describe("Optional text to match against normalized log patterns"),severity:a.string().optional().describe("Optional severity_text value, for example ERROR"),startDate:a.string().datetime({offset:!0}).optional().describe("Optional earliest last-seen timestamp"),endDate:a.string().datetime({offset:!0}).optional().describe("Optional latest last-seen timestamp"),limit:a.number().int().min(1).max(100).default(25).describe("Maximum number of log patterns to return")}).refine((e)=>!e.startDate||!e.endDate||new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),ZY=a.object({serviceName:a.string().nullable(),fingerprint:a.string(),pattern:a.string(),severity:a.string().nullable(),occurrences:a.number().nonnegative(),firstSeen:a.string().nullable(),lastSeen:a.string().nullable(),representativeId:a.string().nullable()}),XY=a.object({patterns:a.array(ZY),meta:a.object({backendId:qf,count:a.number().int().nonnegative(),took:a.number().nonnegative()})}),eW=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:a.string().min(1,"Query cannot be empty").max(1e4,"Query must be 10000 characters or less")}),tW=a.object({result:a.string().describe("Backend-formatted query result"),format:a.literal("text"),meta:a.object({backendId:qf,took:a.number().nonnegative(),truncated:a.boolean()})}),Vxe=a.object({cursor:a.string().nullable().describe("Cursor for next page (null if no more results)"),hasMore:a.boolean().describe("Whether more results are available")}),nW=a.object({count:a.number().int().nonnegative().describe("Number of log rows returned in this response"),took:a.number().nonnegative().describe("Query execution time in milliseconds")}),oW=a.object({data:a.array(a.record(a.string(),a.any())).describe("Array of log rows with selected fields"),nextCursor:a.string().nullable().describe("Pass as 'cursor' in the next query to fetch the next page. Null when there are no more results."),meta:nW.describe("Query execution metadata")}),Kc=w({operationId:"logs.query",description:"Query logs within one project.",backend:"api",route:{method:"POST",path:"/logs/query",tags:["Logs"]},input:GY,output:oW,pagination:"cursor",async:"sync"}),Yc=w({operationId:"logs.schema",description:"Describe the active log backend, supported commands, query fields, and schema context.",backend:"api",route:{method:"POST",path:"/logs/schema",tags:["Logs"]},input:qY,output:VY,pagination:"none",async:"sync"}),Wc=w({operationId:"logs.volume",description:"Query pre-aggregated log volume for one project.",backend:"api",route:{method:"POST",path:"/logs/volume",tags:["Logs"]},input:YY,output:WY,pagination:"none",async:"sync"}),Jc=w({operationId:"logs.patterns",description:"Query normalized log patterns for discovery workflows.",backend:"api",route:{method:"POST",path:"/logs/patterns",tags:["Logs"]},input:JY,output:XY,pagination:"none",async:"sync"}),Zc=w({operationId:"logs.nativeQuery",description:"Run a read-only query in the log store's native query language, with server-side guardrails.",backend:"api",route:{method:"POST",path:"/logs/native-query",tags:["Logs"]},input:eW,output:tW,pagination:"none",async:"sync"}),Kxe={query:Kc.contract,schema:Yc.contract,volume:Wc.contract,patterns:Jc.contract,nativeQuery:Zc.contract}});var rW=h(()=>{JA()});var AB=h(()=>{rW()});var sW=()=>{};var fB,yB,Vf,Yxe,Wxe,Xc,Kf,aW,cW,bB,lW,uW,Jxe,dW,IB,Zxe,Xxe,ePe,tPe,nPe,oPe,rPe,iPe,sPe,aPe,cPe,lPe,uPe,SB,pW,gW,dPe,CB;var Yf=h(()=>{De();fB=["streamable-http","sse"],yB=["none","headers","oauth","aws-sigv4"],Vf=["none","client_secret_basic","client_secret_post"],Yxe=["preset","custom"],Wxe=["configured","authorizing","connected","error"],Xc=["enabled","disabled","custom-only"],Kf=["enabled","write_blocked","disabled"],aW=a.enum(fB),cW=a.enum(yB),bB=a.enum(Vf),lW=a.enum(Yxe),uW=a.enum(Wxe),Jxe=a.enum(Xc),dW=a.enum(Kf),IB=a.object({id:a.string().min(1),name:a.string().min(1),value:a.string().min(1)}),Zxe=a.object({id:a.string().min(1),name:a.string().min(1),maskedValue:a.string().min(1)}),Xxe=a.object({authMode:a.literal("none")}),ePe=a.object({tokenUrl:a.string().url(),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:bB.optional(),refreshToken:a.string().min(1),headerName:a.string().min(1).default("Authorization"),headerValuePrefix:a.string().default("Bearer "),expiresAt:a.string().datetime().optional()}),tPe=a.object({authMode:a.literal("headers"),headers:a.array(IB),refreshCredentials:ePe.optional()}),nPe=a.object({authMode:a.literal("aws-sigv4"),accessKeyId:a.string().min(1),secretAccessKey:a.string().min(1),sessionToken:a.string().min(1).optional(),region:a.string().min(1),service:a.string().min(1).default("aws-mcp")}),oPe=a.preprocess((e)=>{if(typeof e!=="string")return;let t=e.trim();return t.length>0?t:void 0},a.string().min(1).optional()).optional(),rPe=a.object({accessToken:a.string().min(1),refreshToken:a.string().min(1).optional(),tokenType:a.string().min(1).optional(),scope:oPe,expiresAt:a.string().datetime().optional()}).transform(({scope:e,...t})=>e===void 0?t:{...t,scope:e}),iPe=a.object({authMode:a.literal("oauth"),providerId:a.string().min(1),tokens:rPe,headers:a.array(IB).optional()}),sPe=a.discriminatedUnion("authMode",[Xxe,tPe,iPe,nPe]),aPe=a.string().min(1).regex(/^enc:v1:/,"Encrypted auth config must use enc:v1 format."),cPe=a.object({codeVerifier:a.string().min(1),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:bB.optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),projectId:a.string().uuid().optional(),returnTo:a.string().min(1).max(2000).optional(),messageId:a.string().min(1).max(240).optional(),scopes:a.array(a.string().min(1)).optional()}),lPe=a.object({type:a.string().optional(),properties:a.record(a.string(),a.unknown()).optional(),required:a.array(a.string()).optional(),additionalProperties:a.boolean().optional()}).catchall(a.unknown()),uPe=a.object({supportsOAuth:a.boolean().default(!1),supportsCustomHeaders:a.boolean().default(!0),supportsToolDiscovery:a.boolean().default(!0),readOnlyToolNames:a.array(a.string()).default([])}),SB=a.object({name:a.string().min(1),title:a.string().min(1),description:a.string().min(1),inputSchema:lPe,annotations:a.record(a.string(),a.unknown()).default({}),availability:dW,isReadOnly:a.boolean()}),pW=a.object({discoveredAt:a.string().datetime(),tools:a.array(SB)}),gW=a.object({mode:a.enum(["user","system"]),managedBy:a.object({type:a.literal("integration"),id:a.string().min(1),displayName:a.string().min(1),iconKey:a.string().min(1)}).nullable(),capabilities:a.object({canRename:a.boolean(),canEditCredentials:a.boolean(),canSetReadOnly:a.boolean(),canConfigureTools:a.boolean(),canDisconnect:a.boolean()})}),dPe=a.object({id:a.string().uuid(),organizationId:a.string().min(1),projectId:a.string().uuid(),providerId:a.string().min(1),source:lW,displayName:a.string().min(1),connectionKey:a.string().min(1),serverUrl:a.string().url(),transport:aW,authMode:cW,installStatus:uW,installedByUserId:a.string().nullable(),connectedAt:a.string().datetime().nullable(),toolSnapshot:pW.nullable(),enabledToolNames:a.array(a.string()),readOnly:a.boolean().default(!1),version:a.number().int().nonnegative(),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),deletedAt:a.string().datetime().nullable()}),CB=gW});var wB=x(function(fCt,Zf){var mW,hW,AW,fW,yW,bW,IW,SW,CW,vW,wW,EW,kW,Wf,vB,xW,PW,RW,el,TW,BW,OW,_W,DW,LW,QW,NW,MW,Jf,zW,jW,UW;(function(e){var t=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(r){e(n(t,n(r)))});else if(typeof Zf==="object"&&typeof fCt==="object")e(n(t,n(fCt)));else e(n(t));function n(r,o){if(r!==t)if(typeof Object.create==="function")Object.defineProperty(r,"__esModule",{value:!0});else r.__esModule=!0;return function(i,s){return r[i]=o?o(i,s):s}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var c in s)if(Object.prototype.hasOwnProperty.call(s,c))i[c]=s[c]};mW=function(i,s){if(typeof s!=="function"&&s!==null)throw TypeError("Class extends value "+String(s)+" is not a constructor or null");t(i,s);function c(){this.constructor=i}i.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)},hW=Object.assign||function(i){for(var s,c=1,l=arguments.length;c<l;c++){s=arguments[c];for(var u in s)if(Object.prototype.hasOwnProperty.call(s,u))i[u]=s[u]}return i},AW=function(i,s){var c={};for(var l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&s.indexOf(l)<0)c[l]=i[l];if(i!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var u=0,l=Object.getOwnPropertySymbols(i);u<l.length;u++)if(s.indexOf(l[u])<0&&Object.prototype.propertyIsEnumerable.call(i,l[u]))c[l[u]]=i[l[u]]}return c},fW=function(i,s,c,l){var u=arguments.length,d=u<3?s:l===null?l=Object.getOwnPropertyDescriptor(s,c):l,p;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")d=Reflect.decorate(i,s,c,l);else for(var g=i.length-1;g>=0;g--)if(p=i[g])d=(u<3?p(d):u>3?p(s,c,d):p(s,c))||d;return u>3&&d&&Object.defineProperty(s,c,d),d},yW=function(i,s){return function(c,l){s(c,l,i)}},bW=function(i,s,c,l,u,d){function p(le){if(le!==void 0&&typeof le!=="function")throw TypeError("Function expected");return le}var g=l.kind,m=g==="getter"?"get":g==="setter"?"set":"value",A=!s&&i?l.static?i:i.prototype:null,f=s||(A?Object.getOwnPropertyDescriptor(A,l.name):{}),S,v=!1;for(var P=c.length-1;P>=0;P--){var O={};for(var K in l)O[K]=K==="access"?{}:l[K];for(var K in l.access)O.access[K]=l.access[K];O.addInitializer=function(le){if(v)throw TypeError("Cannot add initializers after decoration has completed");d.push(p(le||null))};var M=(0,c[P])(g==="accessor"?{get:f.get,set:f.set}:f[m],O);if(g==="accessor"){if(M===void 0)continue;if(M===null||typeof M!=="object")throw TypeError("Object expected");if(S=p(M.get))f.get=S;if(S=p(M.set))f.set=S;if(S=p(M.init))u.unshift(S)}else if(S=p(M))if(g==="field")u.unshift(S);else f[m]=S}if(A)Object.defineProperty(A,l.name,f);v=!0},IW=function(i,s,c){var l=arguments.length>2;for(var u=0;u<s.length;u++)c=l?s[u].call(i,c):s[u].call(i);return l?c:void 0},SW=function(i){return typeof i==="symbol"?i:"".concat(i)},CW=function(i,s,c){if(typeof s==="symbol")s=s.description?"[".concat(s.description,"]"):"";return Object.defineProperty(i,"name",{configurable:!0,value:c?"".concat(c," ",s):s})},vW=function(i,s){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(i,s)},wW=function(i,s,c,l){function u(d){return d instanceof c?d:new c(function(p){p(d)})}return new(c||(c=Promise))(function(d,p){function g(f){try{A(l.next(f))}catch(S){p(S)}}function m(f){try{A(l.throw(f))}catch(S){p(S)}}function A(f){f.done?d(f.value):u(f.value).then(g,m)}A((l=l.apply(i,s||[])).next())})},EW=function(i,s){var c={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},l,u,d,p=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return p.next=g(0),p.throw=g(1),p.return=g(2),typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(A){return function(f){return m([A,f])}}function m(A){if(l)throw TypeError("Generator is already executing.");while(p&&(p=0,A[0]&&(c=0)),c)try{if(l=1,u&&(d=A[0]&2?u.return:A[0]?u.throw||((d=u.return)&&d.call(u),0):u.next)&&!(d=d.call(u,A[1])).done)return d;if(u=0,d)A=[A[0]&2,d.value];switch(A[0]){case 0:case 1:d=A;break;case 4:return c.label++,{value:A[1],done:!1};case 5:c.label++,u=A[1],A=[0];continue;case 7:A=c.ops.pop(),c.trys.pop();continue;default:if((d=c.trys,!(d=d.length>0&&d[d.length-1]))&&(A[0]===6||A[0]===2)){c=0;continue}if(A[0]===3&&(!d||A[1]>d[0]&&A[1]<d[3])){c.label=A[1];break}if(A[0]===6&&c.label<d[1]){c.label=d[1],d=A;break}if(d&&c.label<d[2]){c.label=d[2],c.ops.push(A);break}if(d[2])c.ops.pop();c.trys.pop();continue}A=s.call(i,c)}catch(f){A=[6,f],u=0}finally{l=d=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},kW=function(i,s){for(var c in i)if(c!=="default"&&!Object.prototype.hasOwnProperty.call(s,c))Jf(s,i,c)},Jf=Object.create?function(i,s,c,l){if(l===void 0)l=c;var u=Object.getOwnPropertyDescriptor(s,c);if(!u||("get"in u?!s.__esModule:u.writable||u.configurable))u={enumerable:!0,get:function(){return s[c]}};Object.defineProperty(i,l,u)}:function(i,s,c,l){if(l===void 0)l=c;i[l]=s[c]},Wf=function(i){var s=typeof Symbol==="function"&&Symbol.iterator,c=s&&i[s],l=0;if(c)return c.call(i);if(i&&typeof i.length==="number")return{next:function(){if(i&&l>=i.length)i=void 0;return{value:i&&i[l++],done:!i}}};throw TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},vB=function(i,s){var c=typeof Symbol==="function"&&i[Symbol.iterator];if(!c)return i;var l=c.call(i),u,d=[],p;try{while((s===void 0||s-- >0)&&!(u=l.next()).done)d.push(u.value)}catch(g){p={error:g}}finally{try{if(u&&!u.done&&(c=l.return))c.call(l)}finally{if(p)throw p.error}}return d},xW=function(){for(var i=[],s=0;s<arguments.length;s++)i=i.concat(vB(arguments[s]));return i},PW=function(){for(var i=0,s=0,c=arguments.length;s<c;s++)i+=arguments[s].length;for(var l=Array(i),u=0,s=0;s<c;s++)for(var d=arguments[s],p=0,g=d.length;p<g;p++,u++)l[u]=d[p];return l},RW=function(i,s,c){if(c||arguments.length===2){for(var l=0,u=s.length,d;l<u;l++)if(d||!(l in s)){if(!d)d=Array.prototype.slice.call(s,0,l);d[l]=s[l]}}return i.concat(d||Array.prototype.slice.call(s))},el=function(i){return this instanceof el?(this.v=i,this):new el(i)},TW=function(i,s,c){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var l=c.apply(i,s||[]),u,d=[];return u=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),g("next"),g("throw"),g("return",p),u[Symbol.asyncIterator]=function(){return this},u;function p(P){return function(O){return Promise.resolve(O).then(P,S)}}function g(P,O){if(l[P]){if(u[P]=function(K){return new Promise(function(M,le){d.push([P,K,M,le])>1||m(P,K)})},O)u[P]=O(u[P])}}function m(P,O){try{A(l[P](O))}catch(K){v(d[0][3],K)}}function A(P){P.value instanceof el?Promise.resolve(P.value.v).then(f,S):v(d[0][2],P)}function f(P){m("next",P)}function S(P){m("throw",P)}function v(P,O){if(P(O),d.shift(),d.length)m(d[0][0],d[0][1])}},BW=function(i){var s,c;return s={},l("next"),l("throw",function(u){throw u}),l("return"),s[Symbol.iterator]=function(){return this},s;function l(u,d){s[u]=i[u]?function(p){return(c=!c)?{value:el(i[u](p)),done:!1}:d?d(p):p}:d}},OW=function(i){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var s=i[Symbol.asyncIterator],c;return s?s.call(i):(i=typeof Wf==="function"?Wf(i):i[Symbol.iterator](),c={},l("next"),l("throw"),l("return"),c[Symbol.asyncIterator]=function(){return this},c);function l(d){c[d]=i[d]&&function(p){return new Promise(function(g,m){p=i[d](p),u(g,m,p.done,p.value)})}}function u(d,p,g,m){Promise.resolve(m).then(function(A){d({value:A,done:g})},p)}},_W=function(i,s){if(Object.defineProperty)Object.defineProperty(i,"raw",{value:s});else i.raw=s;return i};var n=Object.create?function(i,s){Object.defineProperty(i,"default",{enumerable:!0,value:s})}:function(i,s){i.default=s},r=function(i){return r=Object.getOwnPropertyNames||function(s){var c=[];for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l))c[c.length]=l;return c},r(i)};DW=function(i){if(i&&i.__esModule)return i;var s={};if(i!=null){for(var c=r(i),l=0;l<c.length;l++)if(c[l]!=="default")Jf(s,i,c[l])}return n(s,i),s},LW=function(i){return i&&i.__esModule?i:{default:i}},QW=function(i,s,c,l){if(c==="a"&&!l)throw TypeError("Private accessor was defined without a getter");if(typeof s==="function"?i!==s||!l:!s.has(i))throw TypeError("Cannot read private member from an object whose class did not declare it");return c==="m"?l:c==="a"?l.call(i):l?l.value:s.get(i)},NW=function(i,s,c,l,u){if(l==="m")throw TypeError("Private method is not writable");if(l==="a"&&!u)throw TypeError("Private accessor was defined without a setter");if(typeof s==="function"?i!==s||!u:!s.has(i))throw TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?u.call(i,c):u?u.value=c:s.set(i,c),c},MW=function(i,s){if(s===null||typeof s!=="object"&&typeof s!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof i==="function"?s===i:i.has(s)},zW=function(i,s,c){if(s!==null&&s!==void 0){if(typeof s!=="object"&&typeof s!=="function")throw TypeError("Object expected.");var l,u;if(c){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");l=s[Symbol.asyncDispose]}if(l===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(l=s[Symbol.dispose],c)u=l}if(typeof l!=="function")throw TypeError("Object not disposable.");if(u)l=function(){try{u.call(this)}catch(d){return Promise.reject(d)}};i.stack.push({value:s,dispose:l,async:c})}else if(c)i.stack.push({async:!0});return s};var o=typeof SuppressedError==="function"?SuppressedError:function(i,s,c){var l=Error(c);return l.name="SuppressedError",l.error=i,l.suppressed=s,l};jW=function(i){function s(d){i.error=i.hasError?new o(d,i.error,"An error was suppressed during disposal."):d,i.hasError=!0}var c,l=0;function u(){while(c=i.stack.pop())try{if(!c.async&&l===1)return l=0,i.stack.push(c),Promise.resolve().then(u);if(c.dispose){var d=c.dispose.call(c.value);if(c.async)return l|=2,Promise.resolve(d).then(u,function(p){return s(p),u()})}else l|=1}catch(p){s(p)}if(l===1)return i.hasError?Promise.reject(i.error):Promise.resolve();if(i.hasError)throw i.error}return u()},UW=function(i,s){if(typeof i==="string"&&/^\.\.?\//.test(i))return i.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(c,l,u,d,p){return l?s?".jsx":".js":u&&(!d||!p)?c:u+d+"."+p.toLowerCase()+"js"});return i},e("__extends",mW),e("__assign",hW),e("__rest",AW),e("__decorate",fW),e("__param",yW),e("__esDecorate",bW),e("__runInitializers",IW),e("__propKey",SW),e("__setFunctionName",CW),e("__metadata",vW),e("__awaiter",wW),e("__generator",EW),e("__exportStar",kW),e("__createBinding",Jf),e("__values",Wf),e("__read",vB),e("__spread",xW),e("__spreadArrays",PW),e("__spreadArray",RW),e("__await",el),e("__asyncGenerator",TW),e("__asyncDelegator",BW),e("__asyncValues",OW),e("__makeTemplateObject",_W),e("__importStar",DW),e("__importDefault",LW),e("__classPrivateFieldGet",QW),e("__classPrivateFieldSet",NW),e("__classPrivateFieldIn",MW),e("__addDisposableResource",zW),e("__disposeResources",jW),e("__rewriteRelativeImportExtension",UW)})});var EB=x(function(FW){Object.defineProperty(FW,"__esModule",{value:!0});FW.MAX_HASHABLE_LENGTH=FW.INIT=FW.KEY=FW.DIGEST_LENGTH=FW.BLOCK_SIZE=void 0;FW.BLOCK_SIZE=64;FW.DIGEST_LENGTH=32;FW.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);FW.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];FW.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var qW=x(function(GW){Object.defineProperty(GW,"__esModule",{value:!0});GW.RawSha256=void 0;var vo=EB(),APe=function(){function e(){this.state=Int32Array.from(vo.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>vo.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");while(r>0)if(this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===vo.BLOCK_SIZE)this.hashBuffer(),this.bufferLength=0},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%vo.BLOCK_SIZE>=vo.BLOCK_SIZE-8){for(var o=this.bufferLength;o<vo.BLOCK_SIZE;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<vo.BLOCK_SIZE-8;o++)n.setUint8(o,0);n.setUint32(vo.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),n.setUint32(vo.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(vo.DIGEST_LENGTH);for(var o=0;o<8;o++)i[o*4]=this.state[o]>>>24&255,i[o*4+1]=this.state[o]>>>16&255,i[o*4+2]=this.state[o]>>>8&255,i[o*4+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){var t=this,n=t.buffer,r=t.state,o=r[0],i=r[1],s=r[2],c=r[3],l=r[4],u=r[5],d=r[6],p=r[7];for(var g=0;g<vo.BLOCK_SIZE;g++){if(g<16)this.temp[g]=(n[g*4]&255)<<24|(n[g*4+1]&255)<<16|(n[g*4+2]&255)<<8|n[g*4+3]&255;else{var m=this.temp[g-2],A=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10;m=this.temp[g-15];var f=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3;this.temp[g]=(A+this.temp[g-7]|0)+(f+this.temp[g-16]|0)}var S=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&d)|0)+(p+(vo.KEY[g]+this.temp[g]|0)|0)|0,v=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&i^o&s^i&s)|0;p=d,d=u,u=l,l=c+S|0,c=s,s=i,i=o,o=S+v|0}r[0]+=o,r[1]+=i,r[2]+=s,r[3]+=c,r[4]+=l,r[5]+=u,r[6]+=d,r[7]+=p},e}();GW.RawSha256=APe});var YW=x(function(ICt,KW){var{defineProperty:Xf,getOwnPropertyDescriptor:fPe,getOwnPropertyNames:yPe}=Object,bPe=Object.prototype.hasOwnProperty,IPe=(e,t)=>Xf(e,"name",{value:t,configurable:!0}),SPe=(e,t)=>{for(var n in t)Xf(e,n,{get:t[n],enumerable:!0})},CPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of yPe(t))if(!bPe.call(e,o)&&o!==n)Xf(e,o,{get:()=>t[o],enumerable:!(r=fPe(t,o))||r.enumerable})}return e},vPe=(e)=>CPe(Xf({},"__esModule",{value:!0}),e),VW={};SPe(VW,{isArrayBuffer:()=>wPe});KW.exports=vPe(VW);var wPe=IPe((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var XW=x(function(SCt,ZW){var{defineProperty:ey,getOwnPropertyDescriptor:EPe,getOwnPropertyNames:kPe}=Object,xPe=Object.prototype.hasOwnProperty,WW=(e,t)=>ey(e,"name",{value:t,configurable:!0}),PPe=(e,t)=>{for(var n in t)ey(e,n,{get:t[n],enumerable:!0})},RPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of kPe(t))if(!xPe.call(e,o)&&o!==n)ey(e,o,{get:()=>t[o],enumerable:!(r=EPe(t,o))||r.enumerable})}return e},TPe=(e)=>RPe(ey({},"__esModule",{value:!0}),e),JW={};PPe(JW,{fromArrayBuffer:()=>OPe,fromString:()=>_Pe});ZW.exports=TPe(JW);var BPe=YW(),kB=F("buffer"),OPe=WW((e,t=0,n=e.byteLength-t)=>{if(!(0,BPe.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return kB.Buffer.from(e,t,n)},"fromArrayBuffer"),_Pe=WW((e,t)=>{if(typeof e!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?kB.Buffer.from(e,t):kB.Buffer.from(e)},"fromString")});var rJ=x(function(CCt,oJ){var{defineProperty:ty,getOwnPropertyDescriptor:DPe,getOwnPropertyNames:LPe}=Object,QPe=Object.prototype.hasOwnProperty,xB=(e,t)=>ty(e,"name",{value:t,configurable:!0}),NPe=(e,t)=>{for(var n in t)ty(e,n,{get:t[n],enumerable:!0})},MPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of LPe(t))if(!QPe.call(e,o)&&o!==n)ty(e,o,{get:()=>t[o],enumerable:!(r=DPe(t,o))||r.enumerable})}return e},zPe=(e)=>MPe(ty({},"__esModule",{value:!0}),e),eJ={};NPe(eJ,{fromUtf8:()=>nJ,toUint8Array:()=>jPe,toUtf8:()=>UPe});oJ.exports=zPe(eJ);var tJ=XW(),nJ=xB((e)=>{let t=(0,tJ.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),jPe=xB((e)=>{if(typeof e==="string")return nJ(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),UPe=xB((e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,tJ.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var aJ=x(function(iJ){Object.defineProperty(iJ,"__esModule",{value:!0});iJ.convertToBuffer=void 0;var FPe=rJ(),$Pe=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:FPe.fromUtf8;function GPe(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return $Pe(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}iJ.convertToBuffer=GPe});var uJ=x(function(cJ){Object.defineProperty(cJ,"__esModule",{value:!0});cJ.isEmptyData=void 0;function HPe(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}cJ.isEmptyData=HPe});var gJ=x(function(dJ){Object.defineProperty(dJ,"__esModule",{value:!0});dJ.numToUint8=void 0;function qPe(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}dJ.numToUint8=qPe});var AJ=x(function(mJ){Object.defineProperty(mJ,"__esModule",{value:!0});mJ.uint32ArrayFrom=void 0;function VPe(e){if(!Uint32Array.from){var t=new Uint32Array(e.length),n=0;while(n<e.length)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}mJ.uint32ArrayFrom=VPe});var fJ=x(function(tl){Object.defineProperty(tl,"__esModule",{value:!0});tl.uint32ArrayFrom=tl.numToUint8=tl.isEmptyData=tl.convertToBuffer=void 0;var KPe=aJ();Object.defineProperty(tl,"convertToBuffer",{enumerable:!0,get:function(){return KPe.convertToBuffer}});var YPe=uJ();Object.defineProperty(tl,"isEmptyData",{enumerable:!0,get:function(){return YPe.isEmptyData}});var WPe=gJ();Object.defineProperty(tl,"numToUint8",{enumerable:!0,get:function(){return WPe.numToUint8}});var JPe=AJ();Object.defineProperty(tl,"uint32ArrayFrom",{enumerable:!0,get:function(){return JPe.uint32ArrayFrom}})});var SJ=x(function(bJ){Object.defineProperty(bJ,"__esModule",{value:!0});bJ.Sha256=void 0;var yJ=wB(),oy=EB(),ny=qW(),PB=fJ(),XPe=function(){function e(t){this.secret=t,this.hash=new ny.RawSha256,this.reset()}return e.prototype.update=function(t){if((0,PB.isEmptyData)(t)||this.error)return;try{this.hash.update((0,PB.convertToBuffer)(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;if(this.outer){if(!this.outer.finished)this.outer.update(this.hash.digest());return this.outer.digest()}return this.hash.digest()},e.prototype.digest=function(){return yJ.__awaiter(this,void 0,void 0,function(){return yJ.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ny.RawSha256,this.secret){this.outer=new ny.RawSha256;var t=eRe(this.secret),n=new Uint8Array(oy.BLOCK_SIZE);n.set(t);for(var r=0;r<oy.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(var r=0;r<t.byteLength;r++)t[r]=0}},e}();bJ.Sha256=XPe;function eRe(e){var t=(0,PB.convertToBuffer)(e);if(t.byteLength>oy.BLOCK_SIZE){var n=new ny.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(oy.BLOCK_SIZE);return r.set(t),r}});var CJ=x(function(RB){Object.defineProperty(RB,"__esModule",{value:!0});var tRe=wB();tRe.__exportStar(SJ(),RB)});var ry=()=>{};var vJ="io.modelcontextprotocol/related-task",sy="2.0",Ut,wJ,EJ,DCt,nRe,oRe,TB,so,ay,nn,wo,Eo,on,cy,rRe,iRe,kJ,yp,xJ,PJ,LCt,BB,sRe,OB,aRe,bp,nl,RJ,cRe,lRe,uRe,dRe,pRe,gRe,mRe,hRe,TJ,ARe,_B,fRe,yRe,DB,bRe,Ip,Sp,IRe,Cp,ly,SRe,LB,QB,NB,MB,QCt,zB,jB,UB,CRe,BJ,OJ,FB,_J,vp,ol,DJ,vRe,wRe,LJ,ERe,QJ,$B,kRe,xRe,NJ,MJ,PRe,RRe,TRe,BRe,ORe,_Re,DRe,LRe,QRe,zJ,NRe,MRe,GB,HB,qB,zRe,jRe,URe,VB,FRe,jJ,UJ,$Re,GRe,FJ,HRe,$J,uy,NCt,qRe,VRe,GJ,KRe,HJ,YRe,WRe,JRe,ZRe,XRe,eTe,tTe,nTe,oTe,iy,rTe,iTe,qJ,VJ,KJ,sTe,aTe,cTe,lTe,uTe,dTe,pTe,gTe,mTe,hTe,ATe,fTe,yTe,bTe,ITe,YJ,STe,CTe,WJ,vTe,wTe,ETe,kTe,JJ,xTe,PTe,RTe,TTe,MCt,zCt,jCt,UCt,FCt,$Ct;var qs=h(()=>{AB();Ut=WA((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),wJ=ut([k(),je().int()]),EJ=k(),DCt=Tt({ttl:je().optional(),pollInterval:je().optional()}),nRe=ne({ttl:je().optional()}),oRe=ne({taskId:k()}),TB=Tt({progressToken:wJ.optional(),[vJ]:oRe.optional()}),so=ne({_meta:TB.optional()}),ay=so.extend({task:nRe.optional()}),nn=ne({method:k(),params:so.loose().optional()}),wo=ne({_meta:TB.optional()}),Eo=ne({method:k(),params:wo.loose().optional()}),on=Tt({_meta:TB.optional()}),cy=ut([k(),je().int()]),rRe=ne({jsonrpc:ue(sy),id:cy,...nn.shape}).strict(),iRe=ne({jsonrpc:ue(sy),...Eo.shape}).strict(),kJ=ne({jsonrpc:ue(sy),id:cy,result:on}).strict();(function(e){e[e.ConnectionClosed=-32000]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(yp||(yp={}));xJ=ne({jsonrpc:ue(sy),id:cy.optional(),error:ne({code:je().int(),message:k(),data:lt().optional()})}).strict(),PJ=ut([rRe,iRe,kJ,xJ]),LCt=ut([kJ,xJ]),BB=on.strict(),sRe=wo.extend({requestId:cy.optional(),reason:k().optional()}),OB=Eo.extend({method:ue("notifications/cancelled"),params:sRe}),aRe=ne({src:k(),mimeType:k().optional(),sizes:ee(k()).optional(),theme:tn(["light","dark"]).optional()}),bp=ne({icons:ee(aRe).optional()}),nl=ne({name:k(),title:k().optional()}),RJ=nl.extend({...nl.shape,...bp.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),cRe=Qc(ne({applyDefaults:Xe().optional()}),tt(k(),lt())),lRe=ap((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},Qc(ne({form:cRe.optional(),url:Ut.optional()}),tt(k(),lt()).optional())),uRe=Tt({list:Ut.optional(),cancel:Ut.optional(),requests:Tt({sampling:Tt({createMessage:Ut.optional()}).optional(),elicitation:Tt({create:Ut.optional()}).optional()}).optional()}),dRe=Tt({list:Ut.optional(),cancel:Ut.optional(),requests:Tt({tools:Tt({call:Ut.optional()}).optional()}).optional()}),pRe=ne({experimental:tt(k(),Ut).optional(),sampling:ne({context:Ut.optional(),tools:Ut.optional()}).optional(),elicitation:lRe.optional(),roots:ne({listChanged:Xe().optional()}).optional(),tasks:uRe.optional(),extensions:tt(k(),Ut).optional()}),gRe=so.extend({protocolVersion:k(),capabilities:pRe,clientInfo:RJ}),mRe=nn.extend({method:ue("initialize"),params:gRe}),hRe=ne({experimental:tt(k(),Ut).optional(),logging:Ut.optional(),completions:Ut.optional(),prompts:ne({listChanged:Xe().optional()}).optional(),resources:ne({subscribe:Xe().optional(),listChanged:Xe().optional()}).optional(),tools:ne({listChanged:Xe().optional()}).optional(),tasks:dRe.optional(),extensions:tt(k(),Ut).optional()}),TJ=on.extend({protocolVersion:k(),capabilities:hRe,serverInfo:RJ,instructions:k().optional()}),ARe=Eo.extend({method:ue("notifications/initialized"),params:wo.optional()}),_B=nn.extend({method:ue("ping"),params:so.optional()}),fRe=ne({progress:je(),total:pt(je()),message:pt(k())}),yRe=ne({...wo.shape,...fRe.shape,progressToken:wJ}),DB=Eo.extend({method:ue("notifications/progress"),params:yRe}),bRe=so.extend({cursor:EJ.optional()}),Ip=nn.extend({params:bRe.optional()}),Sp=on.extend({nextCursor:EJ.optional()}),IRe=tn(["working","input_required","completed","failed","cancelled"]),Cp=ne({taskId:k(),status:IRe,ttl:ut([je(),ep()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:pt(je()),statusMessage:pt(k())}),ly=on.extend({task:Cp}),SRe=wo.merge(Cp),LB=Eo.extend({method:ue("notifications/tasks/status"),params:SRe}),QB=nn.extend({method:ue("tasks/get"),params:so.extend({taskId:k()})}),NB=on.merge(Cp),MB=nn.extend({method:ue("tasks/result"),params:so.extend({taskId:k()})}),QCt=on.loose(),zB=Ip.extend({method:ue("tasks/list")}),jB=Sp.extend({tasks:ee(Cp)}),UB=nn.extend({method:ue("tasks/cancel"),params:so.extend({taskId:k()})}),CRe=on.merge(Cp),BJ=ne({uri:k(),mimeType:pt(k()),_meta:tt(k(),lt()).optional()}),OJ=BJ.extend({text:k()}),FB=k().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),_J=BJ.extend({blob:FB}),vp=tn(["user","assistant"]),ol=ne({audience:ee(vp).optional(),priority:je().min(0).max(1).optional(),lastModified:Qi.datetime({offset:!0}).optional()}),DJ=ne({...nl.shape,...bp.shape,uri:k(),description:pt(k()),mimeType:pt(k()),size:pt(je()),annotations:ol.optional(),_meta:pt(Tt({}))}),vRe=ne({...nl.shape,...bp.shape,uriTemplate:k(),description:pt(k()),mimeType:pt(k()),annotations:ol.optional(),_meta:pt(Tt({}))}),wRe=Ip.extend({method:ue("resources/list")}),LJ=Sp.extend({resources:ee(DJ)}),ERe=Ip.extend({method:ue("resources/templates/list")}),QJ=Sp.extend({resourceTemplates:ee(vRe)}),$B=so.extend({uri:k()}),kRe=$B,xRe=nn.extend({method:ue("resources/read"),params:kRe}),NJ=on.extend({contents:ee(ut([OJ,_J]))}),MJ=Eo.extend({method:ue("notifications/resources/list_changed"),params:wo.optional()}),PRe=$B,RRe=nn.extend({method:ue("resources/subscribe"),params:PRe}),TRe=$B,BRe=nn.extend({method:ue("resources/unsubscribe"),params:TRe}),ORe=wo.extend({uri:k()}),_Re=Eo.extend({method:ue("notifications/resources/updated"),params:ORe}),DRe=ne({name:k(),description:pt(k()),required:pt(Xe())}),LRe=ne({...nl.shape,...bp.shape,description:pt(k()),arguments:pt(ee(DRe)),_meta:pt(Tt({}))}),QRe=Ip.extend({method:ue("prompts/list")}),zJ=Sp.extend({prompts:ee(LRe)}),NRe=so.extend({name:k(),arguments:tt(k(),k()).optional()}),MRe=nn.extend({method:ue("prompts/get"),params:NRe}),GB=ne({type:ue("text"),text:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),HB=ne({type:ue("image"),data:FB,mimeType:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),qB=ne({type:ue("audio"),data:FB,mimeType:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),zRe=ne({type:ue("tool_use"),name:k(),id:k(),input:tt(k(),lt()),_meta:tt(k(),lt()).optional()}),jRe=ne({type:ue("resource"),resource:ut([OJ,_J]),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),URe=DJ.extend({type:ue("resource_link")}),VB=ut([GB,HB,qB,URe,jRe]),FRe=ne({role:vp,content:VB}),jJ=on.extend({description:k().optional(),messages:ee(FRe)}),UJ=Eo.extend({method:ue("notifications/prompts/list_changed"),params:wo.optional()}),$Re=ne({title:k().optional(),readOnlyHint:Xe().optional(),destructiveHint:Xe().optional(),idempotentHint:Xe().optional(),openWorldHint:Xe().optional()}),GRe=ne({taskSupport:tn(["required","optional","forbidden"]).optional()}),FJ=ne({...nl.shape,...bp.shape,description:k().optional(),inputSchema:ne({type:ue("object"),properties:tt(k(),Ut).optional(),required:ee(k()).optional()}).catchall(lt()),outputSchema:ne({type:ue("object"),properties:tt(k(),Ut).optional(),required:ee(k()).optional()}).catchall(lt()).optional(),annotations:$Re.optional(),execution:GRe.optional(),_meta:tt(k(),lt()).optional()}),HRe=Ip.extend({method:ue("tools/list")}),$J=Sp.extend({tools:ee(FJ)}),uy=on.extend({content:ee(VB).default([]),structuredContent:tt(k(),lt()).optional(),isError:Xe().optional()}),NCt=uy.or(on.extend({toolResult:lt()})),qRe=ay.extend({name:k(),arguments:tt(k(),lt()).optional()}),VRe=nn.extend({method:ue("tools/call"),params:qRe}),GJ=Eo.extend({method:ue("notifications/tools/list_changed"),params:wo.optional()}),KRe=ne({autoRefresh:Xe().default(!0),debounceMs:je().int().nonnegative().default(300)}),HJ=tn(["debug","info","notice","warning","error","critical","alert","emergency"]),YRe=so.extend({level:HJ}),WRe=nn.extend({method:ue("logging/setLevel"),params:YRe}),JRe=wo.extend({level:HJ,logger:k().optional(),data:lt()}),ZRe=Eo.extend({method:ue("notifications/message"),params:JRe}),XRe=ne({name:k().optional()}),eTe=ne({hints:ee(XRe).optional(),costPriority:je().min(0).max(1).optional(),speedPriority:je().min(0).max(1).optional(),intelligencePriority:je().min(0).max(1).optional()}),tTe=ne({mode:tn(["auto","required","none"]).optional()}),nTe=ne({type:ue("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:ee(VB).default([]),structuredContent:ne({}).loose().optional(),isError:Xe().optional(),_meta:tt(k(),lt()).optional()}),oTe=rp("type",[GB,HB,qB]),iy=rp("type",[GB,HB,qB,zRe,nTe]),rTe=ne({role:vp,content:ut([iy,ee(iy)]),_meta:tt(k(),lt()).optional()}),iTe=ay.extend({messages:ee(rTe),modelPreferences:eTe.optional(),systemPrompt:k().optional(),includeContext:tn(["none","thisServer","allServers"]).optional(),temperature:je().optional(),maxTokens:je().int(),stopSequences:ee(k()).optional(),metadata:Ut.optional(),tools:ee(FJ).optional(),toolChoice:tTe.optional()}),qJ=nn.extend({method:ue("sampling/createMessage"),params:iTe}),VJ=on.extend({model:k(),stopReason:pt(tn(["endTurn","stopSequence","maxTokens"]).or(k())),role:vp,content:oTe}),KJ=on.extend({model:k(),stopReason:pt(tn(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:vp,content:ut([iy,ee(iy)])}),sTe=ne({type:ue("boolean"),title:k().optional(),description:k().optional(),default:Xe().optional()}),aTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),minLength:je().optional(),maxLength:je().optional(),format:tn(["email","uri","date","date-time"]).optional(),default:k().optional()}),cTe=ne({type:tn(["number","integer"]),title:k().optional(),description:k().optional(),minimum:je().optional(),maximum:je().optional(),default:je().optional()}),lTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),enum:ee(k()),default:k().optional()}),uTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),oneOf:ee(ne({const:k(),title:k()})),default:k().optional()}),dTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),enum:ee(k()),enumNames:ee(k()).optional(),default:k().optional()}),pTe=ut([lTe,uTe]),gTe=ne({type:ue("array"),title:k().optional(),description:k().optional(),minItems:je().optional(),maxItems:je().optional(),items:ne({type:ue("string"),enum:ee(k())}),default:ee(k()).optional()}),mTe=ne({type:ue("array"),title:k().optional(),description:k().optional(),minItems:je().optional(),maxItems:je().optional(),items:ne({anyOf:ee(ne({const:k(),title:k()}))}),default:ee(k()).optional()}),hTe=ut([gTe,mTe]),ATe=ut([dTe,pTe,hTe]),fTe=ut([ATe,sTe,aTe,cTe]),yTe=ay.extend({mode:ue("form").optional(),message:k(),requestedSchema:ne({type:ue("object"),properties:tt(k(),fTe),required:ee(k()).optional()})}),bTe=ay.extend({mode:ue("url"),message:k(),elicitationId:k(),url:k().url()}),ITe=ut([yTe,bTe]),YJ=nn.extend({method:ue("elicitation/create"),params:ITe}),STe=wo.extend({elicitationId:k()}),CTe=Eo.extend({method:ue("notifications/elicitation/complete"),params:STe}),WJ=on.extend({action:tn(["accept","decline","cancel"]),content:ap((e)=>e===null?void 0:e,tt(k(),ut([k(),je(),Xe(),ee(k())])).optional())}),vTe=ne({type:ue("ref/resource"),uri:k()}),wTe=ne({type:ue("ref/prompt"),name:k()}),ETe=so.extend({ref:ut([wTe,vTe]),argument:ne({name:k(),value:k()}),context:ne({arguments:tt(k(),k()).optional()}).optional()}),kTe=nn.extend({method:ue("completion/complete"),params:ETe}),JJ=on.extend({completion:Tt({values:ee(k()).max(100),total:pt(je().int()),hasMore:pt(Xe())})}),xTe=ne({uri:k().startsWith("file://"),name:k().optional(),_meta:tt(k(),lt()).optional()}),PTe=nn.extend({method:ue("roots/list"),params:so.optional()}),RTe=on.extend({roots:ee(xTe)}),TTe=Eo.extend({method:ue("notifications/roots/list_changed"),params:wo.optional()}),MCt=ut([_B,mRe,kTe,WRe,MRe,QRe,wRe,ERe,xRe,RRe,BRe,VRe,HRe,QB,MB,zB,UB]),zCt=ut([OB,DB,ARe,TTe,LB]),jCt=ut([BB,VJ,KJ,WJ,RTe,NB,jB,ly]),UCt=ut([_B,qJ,YJ,PTe,QB,MB,zB,UB]),FCt=ut([OB,DB,ZRe,_Re,MJ,GJ,UJ,LB,CTe]),$Ct=ut([BB,TJ,JJ,jJ,zJ,LJ,QJ,NJ,uy,$J,NB,jB,ly])});var BTe;var dy=h(()=>{BTe=Symbol("Let zodToJsonSchema decide on which parser to use")});var KB=h(()=>{dy()});var ko=()=>{};var YB=h(()=>{Dt()});var WB=()=>{};var py=h(()=>{Dt()});var JB=h(()=>{Dt()});var ZB=()=>{};var XB=h(()=>{Dt()});var eO=h(()=>{Dt();ko()});var tO=h(()=>{Dt()});var Cvt;var gy=h(()=>{Cvt=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var my=h(()=>{Dt();gy();py();ko()});var nO=h(()=>{Dt();my();ko()});var oO=h(()=>{ko()});var hy=h(()=>{Dt()});var rO=h(()=>{Dt();hy()});var iO=()=>{};var sO=h(()=>{Dt()});var aO=h(()=>{Dt();ko()});var cO=h(()=>{Dt()});var lO=h(()=>{Dt()});var uO=h(()=>{Dt()});var dO=h(()=>{Dt()});var pO=h(()=>{ko()});var gO=h(()=>{ko()});var mO=h(()=>{Dt()});var hO=h(()=>{ko();YB();WB();py();JB();ZB();XB();eO();tO();nO();oO();rO();iO();sO();aO();cO();lO();my();uO();gy();dO();pO();hy();gO();mO()});var Dt=h(()=>{dy();hO();ko()});var ZJ=()=>{};var AO=h(()=>{Dt();KB();ko()});var XJ=h(()=>{AO();dy();KB();Dt();ZJ();ko();YB();WB();py();JB();ZB();XB();eO();tO();nO();oO();rO();iO();sO();aO();cO();lO();mO();my();uO();gy();dO();pO();hy();gO();hO();AO()});var t4=h(()=>{ry();XJ()});var o4=h(()=>{ry();qs();t4()});var kp=x(function(s4){Object.defineProperty(s4,"__esModule",{value:!0});s4.regexpCode=s4.getEsmExportName=s4.getProperty=s4.safeStringify=s4.stringify=s4.strConcat=s4.addCodeArg=s4.str=s4._=s4.nil=s4._Code=s4.Name=s4.IDENTIFIER=s4._CodeOrName=void 0;class Ay{}s4._CodeOrName=Ay;s4.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class rl extends Ay{constructor(e){super();if(!s4.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}s4.Name=rl;class qo extends Ay{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>{if(n instanceof rl)t[n.str]=(t[n.str]||0)+1;return t},{})}}s4._Code=qo;s4.nil=new qo("");function r4(e,...t){let n=[e[0]],r=0;while(r<t.length)yO(n,t[r]),n.push(e[++r]);return new qo(n)}s4._=r4;var fO=new qo("+");function i4(e,...t){let n=[Ep(e[0])],r=0;while(r<t.length)n.push(fO),yO(n,t[r]),n.push(fO,Ep(e[++r]));return UTe(n),new qo(n)}s4.str=i4;function yO(e,t){if(t instanceof qo)e.push(...t._items);else if(t instanceof rl)e.push(t);else e.push(GTe(t))}s4.addCodeArg=yO;function UTe(e){let t=1;while(t<e.length-1){if(e[t]===fO){let n=FTe(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function FTe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof rl||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof rl))return`"${e}${t.slice(1)}`;return}function $Te(e,t){return t.emptyStr()?e:e.emptyStr()?t:i4`${e}${t}`}s4.strConcat=$Te;function GTe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ep(Array.isArray(e)?e.join(","):e)}function HTe(e){return new qo(Ep(e))}s4.stringify=HTe;function Ep(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}s4.safeStringify=Ep;function qTe(e){return typeof e=="string"&&s4.IDENTIFIER.test(e)?new qo(`.${e}`):r4`[${e}]`}s4.getProperty=qTe;function VTe(e){if(typeof e=="string"&&s4.IDENTIFIER.test(e))return new qo(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}s4.getEsmExportName=VTe;function KTe(e){return new qo(e.toString())}s4.regexpCode=KTe});var CO=x(function(u4){Object.defineProperty(u4,"__esModule",{value:!0});u4.ValueScope=u4.ValueScopeName=u4.Scope=u4.varKinds=u4.UsedValueState=void 0;var Fn=kp();class c4 extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var yy;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(yy||(u4.UsedValueState=yy={}));u4.varKinds={const:new Fn.Name("const"),let:new Fn.Name("let"),var:new Fn.Name("var")};class IO{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Fn.Name?e:this.name(e)}name(e){return new Fn.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}u4.Scope=IO;class SO extends Fn.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=Fn._`.${new Fn.Name(t)}[${n}]`}}u4.ValueScopeName=SO;var aBe=Fn._`\n`;class l4 extends IO{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?aBe:Fn.nil}}get(){return this._scope}name(e){return new SO(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let r=this.toName(e),{prefix:o}=r,i=(n=t.key)!==null&&n!==void 0?n:t.ref,s=this._values[o];if(s){let u=s.get(i);if(u)return u}else s=this._values[o]=new Map;s.set(i,r);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=t.ref,r.setValue(t,{property:o,itemIndex:l}),r}getValue(e,t){let n=this._values[e];if(!n)return;return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(n)=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return Fn._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(r)=>{if(r.value===void 0)throw Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,n)}_reduceValues(e,t,n={},r){let o=Fn.nil;for(let i in e){let s=e[i];if(!s)continue;let c=n[i]=n[i]||new Map;s.forEach((l)=>{if(c.has(l))return;c.set(l,yy.Started);let u=t(l);if(u){let d=this.opts.es5?u4.varKinds.var:u4.varKinds.const;o=Fn._`${o}${d} ${l} = ${u};${this.opts._n}`}else if(u=r===null||r===void 0?void 0:r(l))o=Fn._`${o}${u}${this.opts._n}`;else throw new c4(l);c.set(l,yy.Completed)})}return o}}u4.ValueScope=l4});var Ne=x(function($n){Object.defineProperty($n,"__esModule",{value:!0});$n.or=$n.and=$n.not=$n.CodeGen=$n.operators=$n.varKinds=$n.ValueScopeName=$n.ValueScope=$n.Scope=$n.Name=$n.regexpCode=$n.stringify=$n.getProperty=$n.nil=$n.strConcat=$n.str=$n._=void 0;var Ue=kp(),Vo=CO(),Ni=kp();Object.defineProperty($n,"_",{enumerable:!0,get:function(){return Ni._}});Object.defineProperty($n,"str",{enumerable:!0,get:function(){return Ni.str}});Object.defineProperty($n,"strConcat",{enumerable:!0,get:function(){return Ni.strConcat}});Object.defineProperty($n,"nil",{enumerable:!0,get:function(){return Ni.nil}});Object.defineProperty($n,"getProperty",{enumerable:!0,get:function(){return Ni.getProperty}});Object.defineProperty($n,"stringify",{enumerable:!0,get:function(){return Ni.stringify}});Object.defineProperty($n,"regexpCode",{enumerable:!0,get:function(){return Ni.regexpCode}});Object.defineProperty($n,"Name",{enumerable:!0,get:function(){return Ni.Name}});var wy=CO();Object.defineProperty($n,"Scope",{enumerable:!0,get:function(){return wy.Scope}});Object.defineProperty($n,"ValueScope",{enumerable:!0,get:function(){return wy.ValueScope}});Object.defineProperty($n,"ValueScopeName",{enumerable:!0,get:function(){return wy.ValueScopeName}});Object.defineProperty($n,"varKinds",{enumerable:!0,get:function(){return wy.varKinds}});$n.operators={GT:new Ue._Code(">"),GTE:new Ue._Code(">="),LT:new Ue._Code("<"),LTE:new Ue._Code("<="),EQ:new Ue._Code("==="),NEQ:new Ue._Code("!=="),NOT:new Ue._Code("!"),OR:new Ue._Code("||"),AND:new Ue._Code("&&"),ADD:new Ue._Code("+")};class Mi{optimizeNodes(){return this}optimizeNames(e,t){return this}}class p4 extends Mi{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Vo.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=sl(this.rhs,e,t);return this}get names(){return this.rhs instanceof Ue._CodeOrName?this.rhs.names:{}}}class EO extends Mi{constructor(e,t,n){super();this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Ue.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=sl(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Ue.Name?{}:{...this.lhs.names};return vy(e,this.rhs)}}class g4 extends EO{constructor(e,t,n,r){super(e,n,r);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class m4 extends Mi{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class h4 extends Mi{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class A4 extends Mi{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f4 extends Mi{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=sl(this.code,e,t),this}get names(){return this.code instanceof Ue._CodeOrName?this.code.names:{}}}class Ey extends Mi{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let n=e[t].optimizeNodes();if(Array.isArray(n))e.splice(t,1,...n);else if(n)e[t]=n;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;while(r--){let o=n[r];if(o.optimizeNames(e,t))continue;dBe(e,o.names),n.splice(r,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Vs(e,t.names),{})}}class zi extends Ey{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y4 extends Ey{}class xp extends zi{}xp.kind="else";class Zr extends zi{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new xp(n):n}if(t){if(e===!1)return t instanceof Zr?t:t.nodes;if(this.nodes.length)return this;return new Zr(v4(e),t instanceof Zr?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=sl(this.condition,e,t),this}get names(){let e=super.names;if(vy(e,this.condition),this.else)Vs(e,this.else.names);return e}}Zr.kind="if";class il extends zi{}il.kind="for";class b4 extends il{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=sl(this.iteration,e,t),this}get names(){return Vs(super.names,this.iteration.names)}}class I4 extends il{constructor(e,t,n,r){super();this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?Vo.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=vy(super.names,this.from);return vy(e,this.to)}}class vO extends il{constructor(e,t,n,r){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=sl(this.iterable,e,t),this}get names(){return Vs(super.names,this.iterable.names)}}class by extends zi{constructor(e,t,n){super();this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}by.kind="func";class Iy extends Ey{render(e){return"return "+super.render(e)}}Iy.kind="return";class S4 extends zi{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(r=this.finally)===null||r===void 0||r.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Vs(e,this.catch.names);if(this.finally)Vs(e,this.finally.names);return e}}class Sy extends zi{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Sy.kind="catch";class Cy extends zi{render(e){return"finally"+super.render(e)}}Cy.kind="finally";class C4{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
7576
|
+
-d '{"event":"hello.world","level":"info","message":"first webhook event"}'`}]}]}]}});var yY;var bY=h(()=>{fY();yY={id:"webhook_events",name:"Webhook Events",searchAliases:["webhook","webhooks","json events","http events","generic webhook","event stream"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"webhook-events",label:"Webhook Events",transform:"webhook-events"}],lifecycleSkipReason:"Manual webhook setup is not exercised by automated lifecycle tests yet.",subtitle:"Point any vendor's webhooks at Sazabi. Arbitrary JSON events land as searchable log records with zero vendor-specific configuration.",features:["Any JSON event stream","One keyed URL per endpoint","Full payload preserved as attributes","No schema or field mapping"],evidenceHints:["A vendor that emits plain JSON webhooks without a dedicated Sazabi source","An internal service, deploy bot, or cron that POSTs JSON events","Existing outbound webhook configuration with no other Sazabi destination"],setupSkill:te,dashboard:{slug:"webhook-events",iconKey:"webhook-events",intakeSourceId:"webhook-events"}}});var Mf,zf,jIt,xxe,UIt,FIt,$It,Hc,GIt,HIt,Pxe,Rxe,Txe,qIt;var IY=h(()=>{aV();uV();gV();AV();bV();CV();EV();PV();BV();DV();NV();jV();$V();qV();YV();ZV();tK();rK();aK();uK();gK();AK();bK();CK();EK();PK();BK();DK();NK();jK();$K();qK();YK();ZK();tY();rY();aY();uY();gY();AY();bY();Mf=[sV,pV,lV,hV,yV,SV,wV,xV,TV,_V,QV,zV,FV,HV,KV,JV,eK,oK,sK,lK,pK,SK,hK,yK,wK,xK,_K,TK,QK,zK,FK,HK,KK,JK,eY,oY,sY,lY,pY,hY,yY],zf=Mf,jIt=Object.fromEntries(zf.map((e)=>[e.id,e.sensitiveFields??[]])),xxe=["publicKeyId"],UIt=Object.fromEntries(zf.map((e)=>[e.id,[...new Set([...xxe,...e.serverOwnedStreamConfigFields??[],...e.secretStreamConfigFields??[]])]])),FIt=Object.fromEntries(zf.map((e)=>[e.id,e.secretStreamConfigFields??[]])),$It=Object.fromEntries(zf.flatMap((e)=>[...Object.values(e.dashboard?.actions?.submit??{}),...Object.values(e.dashboard?.actions?.list??{}),...Object.values(e.dashboard?.actions?.prefetch??{})].flatMap((t)=>{let n=t.sensitiveInputFields??[];if(n.length===0)return[];return[["procedure"in t?t.procedure:`${e.id}.${t.actionId}`,n]]}))),Hc=["vercel","cloudflare","railway","render","fly_io","netlify","supabase","digital_ocean","inngest","trigger_dev","temporal","mastra","neon","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","sentry_platform","openrouter","posthog","posthog_sdk","gcp","otel","otel_metrics","fluent_bit","vector","grafana_alloy","otel_collector","cloudflare_workers","elastic_cloud","porter","respan","plain","prometheus","webhook_events","claude_code","codex","sazabi_browser_sdk"],GIt=Mf.map((e)=>({id:e.id,name:e.name,capabilities:e.capabilities})),HIt=Object.fromEntries(Mf.map((e)=>[e.id,{name:e.name,setupSkill:e.setupSkill}])),Pxe={cloudflare:YR,cloudwatch:tT,convex:iT,digital_ocean:uT,fly_io:AT,gcp:bT,plain:OT,posthog:NT,render:FT,sentry_platform:VT,vercel:tB},Rxe={cloudflare:WR,cloudwatch:nT,convex:aT,digital_ocean:pT,fly_io:yT,gcp:IT,plain:DT,posthog:MT,render:GT,vercel:oB},Txe={cloudflare:JR,cloudflare_workers:KR,cloudwatch:oT,convex:sT,datadog:cT,daytona:lT,digital_ocean:dT,fluent_bit:hT,fly_io:fT,grafana_alloy:CT,e2b:gT,elastic_cloud:mT,gcp:ST,inngest:vT,langchain:wT,mastra:ET,neon:kT,netlify:xT,openrouter:PT,otel:BT,otel_collector:RT,otel_metrics:TT,plain:_T,posthog:zT,posthog_sdk:QT,porter:LT,prometheus:jT,railway:UT,render:$T,respan:HT,sentry:YT,sentry_platform:KT,supabase:WT,temporal:JT,trigger_dev:ZT,vector:XT,vercel:nB,webhook_events:rB,claude_code:VR,codex:rT,sazabi_browser_sdk:qT},qIt=Mf.map((e)=>({sourceId:e.id,name:e.name,capabilities:e.capabilities,setupAuthModes:e.auth,deliveryModes:e.delivery,hasDashboardMetadata:Boolean(e.dashboard),hasManagedFlow:Boolean(Pxe[e.id]),hasConnectionlessFlow:Boolean(Txe[e.id]),hasStreamSelector:Boolean(Rxe[e.id]),lifecycleEligible:e.lifecycleEligible??!1,lifecycleSkipReason:e.lifecycleSkipReason}))});var SY=h(()=>{IY()});var iB=h(()=>{rV();SY()});var CY,sB,Bxe,jf,Oxe,vY,aB,Hs,fp,wY,EY,kY,Uf,xY,PY,qc,RY,TY,Vc,BY,OY,Ff,_Y,DY,$f,LY,QY,Gf,_xe;var Hf=h(()=>{iB();De();Ve();CY=Hc,sB=a.enum(CY),Bxe=a.enum(["pending","provisioning","active","error"]),jf=a.enum(["managed","connectionless"]),Oxe=a.object({name:a.string().describe("Field name used as the JSON key in metadata."),type:a.string().describe('Zod type name, e.g. "string", "boolean", "enum".'),required:a.boolean().describe("Whether the field is required."),sensitive:a.boolean().describe("Whether the field contains a secret and will be encrypted."),description:a.string().nullable().describe("Human-readable description of the field.")}),vY=a.object({id:a.string().describe("Log source provider identifier."),name:a.string().describe("Human-readable display name."),modes:a.array(jf).describe("Setup modes this provider supports. `managed` log sources take vendor credentials; `connectionless` log sources mint a keyed intake endpoint."),metadataFields:a.array(Oxe).describe("Fields required in the metadata object when creating a managed log source. Empty for connectionless-only providers."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),aB=a.object({kind:a.enum(["url","hostPort"]).describe("Card shape. `url` = a complete keyed URL whose hostname authenticates; `hostPort` = a non-keyed listener host + port whose credential travels separately."),label:a.string().optional().describe("Card label. Present when a log source exposes several endpoints (e.g. separate logs and traces destinations)."),url:a.string().optional().describe("The complete keyed intake URL. Present when kind is `url`."),host:a.string().optional().describe("The regional listener hostname (no scheme). Present when kind is `hostPort`."),port:a.number().int().optional().describe("The listener port. Present when kind is `hostPort`."),description:a.string().optional().describe("Vendor-specific guidance rendered under the value."),extraCredential:a.object({label:a.string(),value:a.string(),description:a.string().optional()}).optional().describe("The credential the sender must attach when the hostname alone does not authenticate. Present when kind is `hostPort`.")}),Hs=a.object({id:a.string().uuid(),logSourceId:a.string().uuid().describe("Root log source ID. Every log stream roots on exactly one log source."),displayName:a.string().nullable().describe("Display name pulled automatically from information available through the log source connection (e.g. the vendor object's name). Null when no connection-derived name exists; connectionless log streams are always nameless."),config:a.record(a.string(),a.unknown()),status:Bxe,errorMessage:a.string().nullable(),enabled:a.boolean().describe("Whether the log stream is currently ingesting. Independent of provisioning status: a paused log stream stays configured but stops accepting new data."),createdAt:a.string().datetime(),endpointCards:a.array(aB).optional().describe("Server-computed endpoint card(s) for this log stream's delivery key — where to point the sender. Present only for log streams that carry their own intake key.")}),fp=a.object({id:a.string().uuid(),provider:sB,mode:jf,name:a.string().describe('Display name — a generated mnemonic (e.g. "amber-falcon"). Assigned at creation and immutable.'),streamCount:a.number().int(),createdAt:a.string().datetime()}),wY=fp.extend({streams:a.array(Hs).describe("The log source's live log streams, newest first.")}),EY=a.object({}),kY=a.object({providers:a.array(vY)}),Uf=w({operationId:"logSources.listProviders",summary:"List log source providers",description:"List all supported log source providers with their setup modes and metadata requirements.",backend:"api",route:{method:"GET",path:"/log-sources/providers",tags:["Log Sources"]},input:EY,output:kY,pagination:"none",async:"sync"}),xY=a.object({projectId:a.string().uuid().optional().describe("Project to list log sources for. Auto-filled from SDK context when omitted."),provider:sB.optional().describe("Filter log sources by provider.")}),PY=a.object({logSources:a.array(fp)}),qc=w({operationId:"logSources.list",summary:"List log sources",description:"List log sources within one project.",backend:"api",route:{method:"GET",path:"/log-sources",tags:["Log Sources"]},input:xY,output:PY,pagination:"none",async:"sync"}),RY=a.object({projectId:a.string().uuid().optional().describe("Project to create the log source in. Auto-filled from SDK context when omitted."),provider:sB.describe("Log source provider identifier."),mode:jf.optional().describe("Setup mode. Defaults to `managed` when metadata is provided, otherwise `connectionless`. Must be a mode the provider supports (see `modes` on the provider catalog)."),metadata:a.record(a.string(),a.unknown()).optional().describe("Vendor credentials and configuration for managed setup. Fields vary by provider (see `metadataFields` on the provider catalog). Required for managed mode; must be omitted for connectionless mode.")}).strict(),TY=a.object({logSource:fp.describe("The created log source."),streamId:a.string().uuid().optional().describe("ID of the log stream created alongside the log source. Present for connectionless log sources (which always mint their keyed log stream) and for managed providers that auto-provision a default log stream."),publicKey:a.string().optional().describe("Intake key minted for the log source. Store this securely — it is only shown once. Present for connectionless log sources and for managed providers that ingest through a Sazabi endpoint."),endpointCards:a.array(aB).optional().describe("Server-computed endpoint card(s) for the minted key — where to point the sender. Present for connectionless log sources.")}),Vc=w({operationId:"logSources.create",summary:"Create a log source",description:"Create a log source. Managed mode takes vendor credentials in `metadata`, validates them, and provisions delivery behind the log source. Connectionless mode mints the log source plus a keyed log stream and returns the intake key and endpoint card(s) to point the sender at.",backend:"api",route:{method:"POST",path:"/log-sources",successStatus:201,tags:["Log Sources"]},input:RY,output:TY,pagination:"none",async:"sync"}),BY=a.object({logSourceId:a.string().uuid().describe("Log source ID to fetch.")}),OY=a.object({logSource:wY}),Ff=w({operationId:"logSources.get",summary:"Get a log source",description:"Get one log source by ID, including its log streams and their endpoint card(s).",backend:"api",route:{method:"GET",path:"/log-sources/{logSourceId}",tags:["Log Sources"]},input:BY,output:OY,pagination:"none",async:"sync"}),_Y=a.object({logSourceId:a.string().uuid().describe("Log source ID to update."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for all of the log source's log streams. Reversible; never deletes anything.")}).strict(),DY=a.object({logSource:fp}),$f=w({operationId:"logSources.update",summary:"Update a log source",description:"Update a log source: pause or resume ingestion across its log streams. Log sources cannot be renamed — their generated names are immutable.",backend:"api",route:{method:"PATCH",path:"/log-sources/{logSourceId}",tags:["Log Sources"]},input:_Y,output:DY,pagination:"none",async:"sync"}),LY=a.object({logSourceId:a.string().uuid().describe("Log source ID to delete.")}),QY=a.object({success:a.boolean(),teardownError:a.string().nullable().describe("Null when vendor-side cleanup succeeded or was not needed; error message when remote cleanup failed and must be finished manually.")}),Gf=w({operationId:"logSources.delete",summary:"Delete a log source",description:"Delete a log source. Tombstones the log source and its log streams, deactivates their intake keys (already-ingested data is preserved with its attribution), and runs vendor-side cleanup for managed log sources when the provider supports it.",backend:"api",route:{method:"DELETE",path:"/log-sources/{logSourceId}",successStatus:200,tags:["Log Sources"]},input:LY,output:QY,pagination:"none",async:"sync"}),_xe={listProviders:Uf.contract,list:qc.contract,create:Vc.contract,get:Ff.contract,update:$f.contract,delete:Gf.contract}});var Dxe,Lxe,cB,Qxe,Nxe,lB,Mxe,zxe,uB,jxe,Uxe,dB,Fxe,$xe,pB,Gxe,Hxe,gB,iCt;var NY=h(()=>{De();Ve();Hf();Dxe=a.object({logSourceId:a.string().uuid().describe("Log source ID to list log streams for."),enabled:a.boolean().optional().describe("Optional filter on log stream ingestion state. Omit to list all log streams; pass true for only enabled log streams or false for only paused log streams.")}),Lxe=a.object({streams:a.array(Hs)}),cB=w({operationId:"logStreams.list",summary:"List log streams",description:"List the log streams that belong to a log source.",backend:"api",route:{method:"GET",path:"/log-streams",tags:["Log Streams"]},input:Dxe,output:Lxe,pagination:"none",async:"sync"}),Qxe=a.object({logSourceId:a.string().uuid().describe("Log source ID to create the log stream under."),config:a.record(a.string(),a.unknown()).optional().describe("Platform-specific log stream configuration.")}).strict(),Nxe=a.object({streamId:a.string().uuid().describe("ID of the created log stream.")}),lB=w({operationId:"logStreams.create",summary:"Create a log stream",description:"Create a new log stream under a managed log source. Triggers async provisioning; poll the log stream to track it. Connectionless log sources are single-stream — create another log source instead.",backend:"api",route:{method:"POST",path:"/log-streams",successStatus:201,tags:["Log Streams"]},input:Qxe,output:Nxe,pagination:"none",async:"sync"}),Mxe=a.object({streamId:a.string().uuid().describe("Log stream ID to fetch.")}),zxe=a.object({stream:Hs}),uB=w({operationId:"logStreams.get",summary:"Get a log stream",description:"Get one log stream by ID. Use to poll provisioning status.",backend:"api",route:{method:"GET",path:"/log-streams/{streamId}",tags:["Log Streams"]},input:Mxe,output:zxe,pagination:"none",async:"sync"}),jxe=a.object({streamId:a.string().uuid().describe("Log stream ID to update."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for this log stream. Reversible; never deletes anything.")}).strict(),Uxe=a.object({stream:Hs}),dB=w({operationId:"logStreams.update",summary:"Update a log stream",description:"Update a log stream: pause or resume its ingestion. Log streams cannot be renamed.",backend:"api",route:{method:"PATCH",path:"/log-streams/{streamId}",tags:["Log Streams"]},input:jxe,output:Uxe,pagination:"none",async:"sync"}),Fxe=a.object({streamId:a.string().uuid().describe("Log stream ID to delete.")}),$xe=a.object({success:a.boolean()}),pB=w({operationId:"logStreams.delete",summary:"Delete a log stream",description:"Delete a log stream. Tombstones the log stream and deactivates its intake key. Deleting a connectionless log source's only log stream tombstones the log source too.",backend:"api",route:{method:"DELETE",path:"/log-streams/{streamId}",successStatus:200,tags:["Log Streams"]},input:Fxe,output:$xe,pagination:"none",async:"sync"}),Gxe=a.object({streamId:a.string().uuid().describe("Log stream ID to reassign."),targetLogSourceId:a.string().uuid().describe("Log source to move the log stream under. Must be a connectionless log source in the same project; the stream's key is rebound to this log source's intake adapter.")}).strict(),Hxe=a.object({stream:Hs}),gB=w({operationId:"logStreams.reassign",summary:"Reassign a log stream",description:"Move a log stream to a different connectionless log source in the same project. Preserves the stream's ID, intake key credential, and ingested data; rebinds the key's intake adapter to the target log source's provider so future data is processed as that provider's format.",backend:"api",route:{method:"POST",path:"/log-streams/{streamId}/reassign",successStatus:200,tags:["Log Streams"]},input:Gxe,output:Hxe,pagination:"none",async:"sync"}),iCt={list:cB.contract,create:lB.contract,get:uB.contract,update:dB.contract,delete:pB.contract,reassign:gB.contract}});var MY,zY,jY,UY,FY,$Y,GY,qf,HY,qY,qxe,VY,mB,KY,YY,WY,JY,ZY,XY,eW,tW,Vxe,nW,oW,Kc,Yc,Wc,Jc,Zc,Kxe;var hB=h(()=>{De();Ve();MY=a.enum(["eq","neq","in","contains","starts_with","gt","gte","lt","lte","between","exists"]).describe("Filter operator: 'eq' (equals), 'neq' (not equals), 'in' (in array), 'contains' (substring), 'starts_with' (prefix), 'gt' (greater than), 'gte' (greater than or equal), 'lt' (less than), 'lte' (less than or equal), 'between' (range), 'exists' (field exists)"),zY=a.enum(["any","all","phrase"]).describe("Search mode: 'any' (match any token), 'all' (match all tokens), 'phrase' (exact phrase match)"),jY=a.object({query:a.string().min(1,"Search query must be at least 1 character").max(500,"Search query must be at most 500 characters").describe("Search query text (1-500 characters)"),fields:a.array(a.string()).optional().describe("Fields to search in (defaults to backend allowlist)"),mode:zY.optional().default("all").describe("Token matching mode")}),UY=a.object({field:a.string().describe("Field name to filter on"),op:MY.describe("Filter operator"),value:a.union([a.string(),a.number(),a.boolean(),a.array(a.union([a.string(),a.number()])),a.object({from:a.string(),to:a.string()})]).describe("Filter value (type depends on operator)")}).superRefine((e,t)=>{if(e.op==="in"&&!Array.isArray(e.value))t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be an array when op is 'in'",path:["value"]});if(e.op==="between"){let n=e.value;if(!(typeof n==="object"&&n!==null&&("from"in n)&&("to"in n)))t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be an object with from/to when op is 'between'",path:["value"]})}if(e.op==="exists"&&typeof e.value!=="boolean")t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be boolean when op is 'exists'",path:["value"]})}),FY=a.object({field:a.string().describe("Field name to sort by"),direction:a.enum(["asc","desc"]).default("desc").describe("Sort direction: 'asc' for ascending, 'desc' for descending")}),$Y=a.object({limit:a.number().int().min(1,"Limit must be at least 1").max(1000,"Limit must be at most 1000").default(50).describe("Maximum number of rows to return"),cursor:a.string().optional().describe("Opaque cursor from previous response for pagination")}),GY=a.object({projectId:a.string().uuid().optional().describe("Project to query logs for. Auto-filled from CLI and SDK context when omitted."),search:jY.optional().describe("Full-text search configuration"),filters:a.array(UY).optional().describe("Structured filter clauses (ANDed together). When no `timestamp` filter is provided, queries default to a 24h look-back window; pass an explicit `timestamp` filter to query a different range."),select:a.array(a.string()).optional().describe("Fields to return (defaults to backend default set)"),sort:FY.optional().describe("Sort configuration (defaults to timestamp desc)"),pagination:$Y.optional().describe("Pagination configuration")}),qf=a.enum(["clickhouse","better-stack","datadog","gcp","axiom","cloudwatch","sentry","posthog","mezmo"]),HY=a.enum(["native","external"]),qY=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted."),question:a.string().trim().min(1).max(2000).optional().describe("Optional natural-language question used to retrieve coherent schema bundles."),topK:a.number().int().min(1).max(32).optional().describe("Max schema bundles to return when question is set (default 8)")}),qxe=a.object({id:a.string().describe("Stable schema-bundle document id"),service:a.string().describe("Emitting service for this co-occurrence shape"),keys:a.array(a.string()).describe("Co-occurring otel_log_attributes keys in this bundle"),rowCount:a.number().nonnegative().describe("Observed row count when the bundle was compiled"),score:a.number().optional().describe("Retrieval rank score when returned from vector search")}),VY=a.object({backend:a.object({id:qf,name:a.string(),kind:HY}).describe("Active log backend for the project"),features:a.array(a.string()).describe("Backend features registered on the server"),commands:a.array(a.enum(["schema","query","volume","patterns","nativeQuery"])).describe("CLI/API commands available for this backend"),queryableFields:a.array(a.string()).describe("Fields accepted by the normalized logs.query contract"),searchableFields:a.array(a.string()).describe("Fields accepted by logs.query full-text search"),question:a.string().optional().describe("Echo of the question used for retrieval when provided"),selectedBundles:a.array(qxe).describe("Question-conditioned coherent schema bundles (empty when question omitted)"),selectedAttributeKeys:a.array(a.string()).describe("Flattened attribute keys from selectedBundles, or recent keys when question omitted"),observedServiceNames:a.array(a.string()).describe("Recently observed service names for this project"),observedAttributeKeys:a.array(a.string()).describe("Observed / selected attribute keys for agent and CLI schema discovery"),indexStatus:a.enum(["ready","empty","unavailable","skipped"]).describe("ready: bundles retrieved; empty: index missing/empty; unavailable: retrieval failed; skipped: no question (legacy path)"),schemaContext:a.record(a.string(),a.any()).optional().describe("Backend-specific schema guidance and examples")}),mB=a.enum(["1m","5m","15m","1h"]),KY=a.enum(["service_name","severity_text","environment"]),YY=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:mB.optional().describe("Aggregation bucket size for the volume series"),groupBy:KY.optional().describe("Optional field to split volume series by"),filters:a.object({service_name:a.string().optional(),severity_text:a.string().optional(),environment:a.string().optional()}).optional()}).refine((e)=>new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),WY=a.object({total:a.number().nonnegative(),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:mB,series:a.array(a.object({group:a.string(),total:a.number().nonnegative(),points:a.array(a.object({bucket:a.string(),count:a.number().nonnegative()}))}))}),JY=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:a.string().min(1).max(500).optional().describe("Optional text to match against normalized log patterns"),severity:a.string().optional().describe("Optional severity_text value, for example ERROR"),startDate:a.string().datetime({offset:!0}).optional().describe("Optional earliest last-seen timestamp"),endDate:a.string().datetime({offset:!0}).optional().describe("Optional latest last-seen timestamp"),limit:a.number().int().min(1).max(100).default(25).describe("Maximum number of log patterns to return")}).refine((e)=>!e.startDate||!e.endDate||new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),ZY=a.object({serviceName:a.string().nullable(),fingerprint:a.string(),pattern:a.string(),severity:a.string().nullable(),occurrences:a.number().nonnegative(),firstSeen:a.string().nullable(),lastSeen:a.string().nullable(),representativeId:a.string().nullable()}),XY=a.object({patterns:a.array(ZY),meta:a.object({backendId:qf,count:a.number().int().nonnegative(),took:a.number().nonnegative()})}),eW=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:a.string().min(1,"Query cannot be empty").max(1e4,"Query must be 10000 characters or less")}),tW=a.object({result:a.string().describe("Backend-formatted query result"),format:a.literal("text"),meta:a.object({backendId:qf,took:a.number().nonnegative(),truncated:a.boolean()})}),Vxe=a.object({cursor:a.string().nullable().describe("Cursor for next page (null if no more results)"),hasMore:a.boolean().describe("Whether more results are available")}),nW=a.object({count:a.number().int().nonnegative().describe("Number of log rows returned in this response"),took:a.number().nonnegative().describe("Query execution time in milliseconds")}),oW=a.object({data:a.array(a.record(a.string(),a.any())).describe("Array of log rows with selected fields"),nextCursor:a.string().nullable().describe("Pass as 'cursor' in the next query to fetch the next page. Null when there are no more results."),meta:nW.describe("Query execution metadata")}),Kc=w({operationId:"logs.query",summary:"Query logs",description:"Query logs within one project.",backend:"api",route:{method:"POST",path:"/logs/query",tags:["Logs"]},input:GY,output:oW,pagination:"cursor",async:"sync"}),Yc=w({operationId:"logs.schema",summary:"Get log schema",description:"Describe the active log backend, supported commands, query fields, and schema context.",backend:"api",route:{method:"POST",path:"/logs/schema",tags:["Logs"]},input:qY,output:VY,pagination:"none",async:"sync"}),Wc=w({operationId:"logs.volume",summary:"Get log volume",description:"Query pre-aggregated log volume for one project.",backend:"api",route:{method:"POST",path:"/logs/volume",tags:["Logs"]},input:YY,output:WY,pagination:"none",async:"sync"}),Jc=w({operationId:"logs.patterns",summary:"Get log patterns",description:"Query normalized log patterns for discovery workflows.",backend:"api",route:{method:"POST",path:"/logs/patterns",tags:["Logs"]},input:JY,output:XY,pagination:"none",async:"sync"}),Zc=w({operationId:"logs.nativeQuery",summary:"Run a native log query",description:"Run a read-only query in the log store's native query language, with server-side guardrails.",backend:"api",route:{method:"POST",path:"/logs/native-query",tags:["Logs"]},input:eW,output:tW,pagination:"none",async:"sync"}),Kxe={query:Kc.contract,schema:Yc.contract,volume:Wc.contract,patterns:Jc.contract,nativeQuery:Zc.contract}});var rW=h(()=>{JA()});var AB=h(()=>{rW()});var sW=()=>{};var fB,yB,Vf,Yxe,Wxe,Xc,Kf,aW,cW,bB,lW,uW,Jxe,dW,IB,Zxe,Xxe,ePe,tPe,nPe,oPe,rPe,iPe,sPe,aPe,cPe,lPe,uPe,SB,pW,gW,dPe,CB;var Yf=h(()=>{De();fB=["streamable-http","sse"],yB=["none","headers","oauth","aws-sigv4"],Vf=["none","client_secret_basic","client_secret_post"],Yxe=["preset","custom"],Wxe=["configured","authorizing","connected","error"],Xc=["enabled","disabled","custom-only"],Kf=["enabled","write_blocked","disabled"],aW=a.enum(fB),cW=a.enum(yB),bB=a.enum(Vf),lW=a.enum(Yxe),uW=a.enum(Wxe),Jxe=a.enum(Xc),dW=a.enum(Kf),IB=a.object({id:a.string().min(1),name:a.string().min(1),value:a.string().min(1)}),Zxe=a.object({id:a.string().min(1),name:a.string().min(1),maskedValue:a.string().min(1)}),Xxe=a.object({authMode:a.literal("none")}),ePe=a.object({tokenUrl:a.string().url(),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:bB.optional(),refreshToken:a.string().min(1),headerName:a.string().min(1).default("Authorization"),headerValuePrefix:a.string().default("Bearer "),expiresAt:a.string().datetime().optional()}),tPe=a.object({authMode:a.literal("headers"),headers:a.array(IB),refreshCredentials:ePe.optional()}),nPe=a.object({authMode:a.literal("aws-sigv4"),accessKeyId:a.string().min(1),secretAccessKey:a.string().min(1),sessionToken:a.string().min(1).optional(),region:a.string().min(1),service:a.string().min(1).default("aws-mcp")}),oPe=a.preprocess((e)=>{if(typeof e!=="string")return;let t=e.trim();return t.length>0?t:void 0},a.string().min(1).optional()).optional(),rPe=a.object({accessToken:a.string().min(1),refreshToken:a.string().min(1).optional(),tokenType:a.string().min(1).optional(),scope:oPe,expiresAt:a.string().datetime().optional()}).transform(({scope:e,...t})=>e===void 0?t:{...t,scope:e}),iPe=a.object({authMode:a.literal("oauth"),providerId:a.string().min(1),tokens:rPe,headers:a.array(IB).optional()}),sPe=a.discriminatedUnion("authMode",[Xxe,tPe,iPe,nPe]),aPe=a.string().min(1).regex(/^enc:v1:/,"Encrypted auth config must use enc:v1 format."),cPe=a.object({codeVerifier:a.string().min(1),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:bB.optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),projectId:a.string().uuid().optional(),returnTo:a.string().min(1).max(2000).optional(),messageId:a.string().min(1).max(240).optional(),scopes:a.array(a.string().min(1)).optional()}),lPe=a.object({type:a.string().optional(),properties:a.record(a.string(),a.unknown()).optional(),required:a.array(a.string()).optional(),additionalProperties:a.boolean().optional()}).catchall(a.unknown()),uPe=a.object({supportsOAuth:a.boolean().default(!1),supportsCustomHeaders:a.boolean().default(!0),supportsToolDiscovery:a.boolean().default(!0),readOnlyToolNames:a.array(a.string()).default([])}),SB=a.object({name:a.string().min(1),title:a.string().min(1),description:a.string().min(1),inputSchema:lPe,annotations:a.record(a.string(),a.unknown()).default({}),availability:dW,isReadOnly:a.boolean()}),pW=a.object({discoveredAt:a.string().datetime(),tools:a.array(SB)}),gW=a.object({mode:a.enum(["user","system"]),managedBy:a.object({type:a.literal("integration"),id:a.string().min(1),displayName:a.string().min(1),iconKey:a.string().min(1)}).nullable(),capabilities:a.object({canRename:a.boolean(),canEditCredentials:a.boolean(),canSetReadOnly:a.boolean(),canConfigureTools:a.boolean(),canDisconnect:a.boolean()})}),dPe=a.object({id:a.string().uuid(),organizationId:a.string().min(1),projectId:a.string().uuid(),providerId:a.string().min(1),source:lW,displayName:a.string().min(1),connectionKey:a.string().min(1),serverUrl:a.string().url(),transport:aW,authMode:cW,installStatus:uW,installedByUserId:a.string().nullable(),connectedAt:a.string().datetime().nullable(),toolSnapshot:pW.nullable(),enabledToolNames:a.array(a.string()),readOnly:a.boolean().default(!1),version:a.number().int().nonnegative(),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),deletedAt:a.string().datetime().nullable()}),CB=gW});var wB=x(function(fCt,Zf){var mW,hW,AW,fW,yW,bW,IW,SW,CW,vW,wW,EW,kW,Wf,vB,xW,PW,RW,el,TW,BW,OW,_W,DW,LW,QW,NW,MW,Jf,zW,jW,UW;(function(e){var t=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(r){e(n(t,n(r)))});else if(typeof Zf==="object"&&typeof fCt==="object")e(n(t,n(fCt)));else e(n(t));function n(r,o){if(r!==t)if(typeof Object.create==="function")Object.defineProperty(r,"__esModule",{value:!0});else r.__esModule=!0;return function(i,s){return r[i]=o?o(i,s):s}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var c in s)if(Object.prototype.hasOwnProperty.call(s,c))i[c]=s[c]};mW=function(i,s){if(typeof s!=="function"&&s!==null)throw TypeError("Class extends value "+String(s)+" is not a constructor or null");t(i,s);function c(){this.constructor=i}i.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)},hW=Object.assign||function(i){for(var s,c=1,l=arguments.length;c<l;c++){s=arguments[c];for(var u in s)if(Object.prototype.hasOwnProperty.call(s,u))i[u]=s[u]}return i},AW=function(i,s){var c={};for(var l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&s.indexOf(l)<0)c[l]=i[l];if(i!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var u=0,l=Object.getOwnPropertySymbols(i);u<l.length;u++)if(s.indexOf(l[u])<0&&Object.prototype.propertyIsEnumerable.call(i,l[u]))c[l[u]]=i[l[u]]}return c},fW=function(i,s,c,l){var u=arguments.length,d=u<3?s:l===null?l=Object.getOwnPropertyDescriptor(s,c):l,p;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")d=Reflect.decorate(i,s,c,l);else for(var g=i.length-1;g>=0;g--)if(p=i[g])d=(u<3?p(d):u>3?p(s,c,d):p(s,c))||d;return u>3&&d&&Object.defineProperty(s,c,d),d},yW=function(i,s){return function(c,l){s(c,l,i)}},bW=function(i,s,c,l,u,d){function p(le){if(le!==void 0&&typeof le!=="function")throw TypeError("Function expected");return le}var g=l.kind,m=g==="getter"?"get":g==="setter"?"set":"value",A=!s&&i?l.static?i:i.prototype:null,f=s||(A?Object.getOwnPropertyDescriptor(A,l.name):{}),S,v=!1;for(var P=c.length-1;P>=0;P--){var O={};for(var K in l)O[K]=K==="access"?{}:l[K];for(var K in l.access)O.access[K]=l.access[K];O.addInitializer=function(le){if(v)throw TypeError("Cannot add initializers after decoration has completed");d.push(p(le||null))};var M=(0,c[P])(g==="accessor"?{get:f.get,set:f.set}:f[m],O);if(g==="accessor"){if(M===void 0)continue;if(M===null||typeof M!=="object")throw TypeError("Object expected");if(S=p(M.get))f.get=S;if(S=p(M.set))f.set=S;if(S=p(M.init))u.unshift(S)}else if(S=p(M))if(g==="field")u.unshift(S);else f[m]=S}if(A)Object.defineProperty(A,l.name,f);v=!0},IW=function(i,s,c){var l=arguments.length>2;for(var u=0;u<s.length;u++)c=l?s[u].call(i,c):s[u].call(i);return l?c:void 0},SW=function(i){return typeof i==="symbol"?i:"".concat(i)},CW=function(i,s,c){if(typeof s==="symbol")s=s.description?"[".concat(s.description,"]"):"";return Object.defineProperty(i,"name",{configurable:!0,value:c?"".concat(c," ",s):s})},vW=function(i,s){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(i,s)},wW=function(i,s,c,l){function u(d){return d instanceof c?d:new c(function(p){p(d)})}return new(c||(c=Promise))(function(d,p){function g(f){try{A(l.next(f))}catch(S){p(S)}}function m(f){try{A(l.throw(f))}catch(S){p(S)}}function A(f){f.done?d(f.value):u(f.value).then(g,m)}A((l=l.apply(i,s||[])).next())})},EW=function(i,s){var c={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},l,u,d,p=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return p.next=g(0),p.throw=g(1),p.return=g(2),typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(A){return function(f){return m([A,f])}}function m(A){if(l)throw TypeError("Generator is already executing.");while(p&&(p=0,A[0]&&(c=0)),c)try{if(l=1,u&&(d=A[0]&2?u.return:A[0]?u.throw||((d=u.return)&&d.call(u),0):u.next)&&!(d=d.call(u,A[1])).done)return d;if(u=0,d)A=[A[0]&2,d.value];switch(A[0]){case 0:case 1:d=A;break;case 4:return c.label++,{value:A[1],done:!1};case 5:c.label++,u=A[1],A=[0];continue;case 7:A=c.ops.pop(),c.trys.pop();continue;default:if((d=c.trys,!(d=d.length>0&&d[d.length-1]))&&(A[0]===6||A[0]===2)){c=0;continue}if(A[0]===3&&(!d||A[1]>d[0]&&A[1]<d[3])){c.label=A[1];break}if(A[0]===6&&c.label<d[1]){c.label=d[1],d=A;break}if(d&&c.label<d[2]){c.label=d[2],c.ops.push(A);break}if(d[2])c.ops.pop();c.trys.pop();continue}A=s.call(i,c)}catch(f){A=[6,f],u=0}finally{l=d=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},kW=function(i,s){for(var c in i)if(c!=="default"&&!Object.prototype.hasOwnProperty.call(s,c))Jf(s,i,c)},Jf=Object.create?function(i,s,c,l){if(l===void 0)l=c;var u=Object.getOwnPropertyDescriptor(s,c);if(!u||("get"in u?!s.__esModule:u.writable||u.configurable))u={enumerable:!0,get:function(){return s[c]}};Object.defineProperty(i,l,u)}:function(i,s,c,l){if(l===void 0)l=c;i[l]=s[c]},Wf=function(i){var s=typeof Symbol==="function"&&Symbol.iterator,c=s&&i[s],l=0;if(c)return c.call(i);if(i&&typeof i.length==="number")return{next:function(){if(i&&l>=i.length)i=void 0;return{value:i&&i[l++],done:!i}}};throw TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},vB=function(i,s){var c=typeof Symbol==="function"&&i[Symbol.iterator];if(!c)return i;var l=c.call(i),u,d=[],p;try{while((s===void 0||s-- >0)&&!(u=l.next()).done)d.push(u.value)}catch(g){p={error:g}}finally{try{if(u&&!u.done&&(c=l.return))c.call(l)}finally{if(p)throw p.error}}return d},xW=function(){for(var i=[],s=0;s<arguments.length;s++)i=i.concat(vB(arguments[s]));return i},PW=function(){for(var i=0,s=0,c=arguments.length;s<c;s++)i+=arguments[s].length;for(var l=Array(i),u=0,s=0;s<c;s++)for(var d=arguments[s],p=0,g=d.length;p<g;p++,u++)l[u]=d[p];return l},RW=function(i,s,c){if(c||arguments.length===2){for(var l=0,u=s.length,d;l<u;l++)if(d||!(l in s)){if(!d)d=Array.prototype.slice.call(s,0,l);d[l]=s[l]}}return i.concat(d||Array.prototype.slice.call(s))},el=function(i){return this instanceof el?(this.v=i,this):new el(i)},TW=function(i,s,c){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var l=c.apply(i,s||[]),u,d=[];return u=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),g("next"),g("throw"),g("return",p),u[Symbol.asyncIterator]=function(){return this},u;function p(P){return function(O){return Promise.resolve(O).then(P,S)}}function g(P,O){if(l[P]){if(u[P]=function(K){return new Promise(function(M,le){d.push([P,K,M,le])>1||m(P,K)})},O)u[P]=O(u[P])}}function m(P,O){try{A(l[P](O))}catch(K){v(d[0][3],K)}}function A(P){P.value instanceof el?Promise.resolve(P.value.v).then(f,S):v(d[0][2],P)}function f(P){m("next",P)}function S(P){m("throw",P)}function v(P,O){if(P(O),d.shift(),d.length)m(d[0][0],d[0][1])}},BW=function(i){var s,c;return s={},l("next"),l("throw",function(u){throw u}),l("return"),s[Symbol.iterator]=function(){return this},s;function l(u,d){s[u]=i[u]?function(p){return(c=!c)?{value:el(i[u](p)),done:!1}:d?d(p):p}:d}},OW=function(i){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var s=i[Symbol.asyncIterator],c;return s?s.call(i):(i=typeof Wf==="function"?Wf(i):i[Symbol.iterator](),c={},l("next"),l("throw"),l("return"),c[Symbol.asyncIterator]=function(){return this},c);function l(d){c[d]=i[d]&&function(p){return new Promise(function(g,m){p=i[d](p),u(g,m,p.done,p.value)})}}function u(d,p,g,m){Promise.resolve(m).then(function(A){d({value:A,done:g})},p)}},_W=function(i,s){if(Object.defineProperty)Object.defineProperty(i,"raw",{value:s});else i.raw=s;return i};var n=Object.create?function(i,s){Object.defineProperty(i,"default",{enumerable:!0,value:s})}:function(i,s){i.default=s},r=function(i){return r=Object.getOwnPropertyNames||function(s){var c=[];for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l))c[c.length]=l;return c},r(i)};DW=function(i){if(i&&i.__esModule)return i;var s={};if(i!=null){for(var c=r(i),l=0;l<c.length;l++)if(c[l]!=="default")Jf(s,i,c[l])}return n(s,i),s},LW=function(i){return i&&i.__esModule?i:{default:i}},QW=function(i,s,c,l){if(c==="a"&&!l)throw TypeError("Private accessor was defined without a getter");if(typeof s==="function"?i!==s||!l:!s.has(i))throw TypeError("Cannot read private member from an object whose class did not declare it");return c==="m"?l:c==="a"?l.call(i):l?l.value:s.get(i)},NW=function(i,s,c,l,u){if(l==="m")throw TypeError("Private method is not writable");if(l==="a"&&!u)throw TypeError("Private accessor was defined without a setter");if(typeof s==="function"?i!==s||!u:!s.has(i))throw TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?u.call(i,c):u?u.value=c:s.set(i,c),c},MW=function(i,s){if(s===null||typeof s!=="object"&&typeof s!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof i==="function"?s===i:i.has(s)},zW=function(i,s,c){if(s!==null&&s!==void 0){if(typeof s!=="object"&&typeof s!=="function")throw TypeError("Object expected.");var l,u;if(c){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");l=s[Symbol.asyncDispose]}if(l===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(l=s[Symbol.dispose],c)u=l}if(typeof l!=="function")throw TypeError("Object not disposable.");if(u)l=function(){try{u.call(this)}catch(d){return Promise.reject(d)}};i.stack.push({value:s,dispose:l,async:c})}else if(c)i.stack.push({async:!0});return s};var o=typeof SuppressedError==="function"?SuppressedError:function(i,s,c){var l=Error(c);return l.name="SuppressedError",l.error=i,l.suppressed=s,l};jW=function(i){function s(d){i.error=i.hasError?new o(d,i.error,"An error was suppressed during disposal."):d,i.hasError=!0}var c,l=0;function u(){while(c=i.stack.pop())try{if(!c.async&&l===1)return l=0,i.stack.push(c),Promise.resolve().then(u);if(c.dispose){var d=c.dispose.call(c.value);if(c.async)return l|=2,Promise.resolve(d).then(u,function(p){return s(p),u()})}else l|=1}catch(p){s(p)}if(l===1)return i.hasError?Promise.reject(i.error):Promise.resolve();if(i.hasError)throw i.error}return u()},UW=function(i,s){if(typeof i==="string"&&/^\.\.?\//.test(i))return i.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(c,l,u,d,p){return l?s?".jsx":".js":u&&(!d||!p)?c:u+d+"."+p.toLowerCase()+"js"});return i},e("__extends",mW),e("__assign",hW),e("__rest",AW),e("__decorate",fW),e("__param",yW),e("__esDecorate",bW),e("__runInitializers",IW),e("__propKey",SW),e("__setFunctionName",CW),e("__metadata",vW),e("__awaiter",wW),e("__generator",EW),e("__exportStar",kW),e("__createBinding",Jf),e("__values",Wf),e("__read",vB),e("__spread",xW),e("__spreadArrays",PW),e("__spreadArray",RW),e("__await",el),e("__asyncGenerator",TW),e("__asyncDelegator",BW),e("__asyncValues",OW),e("__makeTemplateObject",_W),e("__importStar",DW),e("__importDefault",LW),e("__classPrivateFieldGet",QW),e("__classPrivateFieldSet",NW),e("__classPrivateFieldIn",MW),e("__addDisposableResource",zW),e("__disposeResources",jW),e("__rewriteRelativeImportExtension",UW)})});var EB=x(function(FW){Object.defineProperty(FW,"__esModule",{value:!0});FW.MAX_HASHABLE_LENGTH=FW.INIT=FW.KEY=FW.DIGEST_LENGTH=FW.BLOCK_SIZE=void 0;FW.BLOCK_SIZE=64;FW.DIGEST_LENGTH=32;FW.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);FW.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];FW.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var qW=x(function(GW){Object.defineProperty(GW,"__esModule",{value:!0});GW.RawSha256=void 0;var vo=EB(),APe=function(){function e(){this.state=Int32Array.from(vo.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>vo.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");while(r>0)if(this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===vo.BLOCK_SIZE)this.hashBuffer(),this.bufferLength=0},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%vo.BLOCK_SIZE>=vo.BLOCK_SIZE-8){for(var o=this.bufferLength;o<vo.BLOCK_SIZE;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<vo.BLOCK_SIZE-8;o++)n.setUint8(o,0);n.setUint32(vo.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),n.setUint32(vo.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(vo.DIGEST_LENGTH);for(var o=0;o<8;o++)i[o*4]=this.state[o]>>>24&255,i[o*4+1]=this.state[o]>>>16&255,i[o*4+2]=this.state[o]>>>8&255,i[o*4+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){var t=this,n=t.buffer,r=t.state,o=r[0],i=r[1],s=r[2],c=r[3],l=r[4],u=r[5],d=r[6],p=r[7];for(var g=0;g<vo.BLOCK_SIZE;g++){if(g<16)this.temp[g]=(n[g*4]&255)<<24|(n[g*4+1]&255)<<16|(n[g*4+2]&255)<<8|n[g*4+3]&255;else{var m=this.temp[g-2],A=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10;m=this.temp[g-15];var f=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3;this.temp[g]=(A+this.temp[g-7]|0)+(f+this.temp[g-16]|0)}var S=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&d)|0)+(p+(vo.KEY[g]+this.temp[g]|0)|0)|0,v=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&i^o&s^i&s)|0;p=d,d=u,u=l,l=c+S|0,c=s,s=i,i=o,o=S+v|0}r[0]+=o,r[1]+=i,r[2]+=s,r[3]+=c,r[4]+=l,r[5]+=u,r[6]+=d,r[7]+=p},e}();GW.RawSha256=APe});var YW=x(function(ICt,KW){var{defineProperty:Xf,getOwnPropertyDescriptor:fPe,getOwnPropertyNames:yPe}=Object,bPe=Object.prototype.hasOwnProperty,IPe=(e,t)=>Xf(e,"name",{value:t,configurable:!0}),SPe=(e,t)=>{for(var n in t)Xf(e,n,{get:t[n],enumerable:!0})},CPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of yPe(t))if(!bPe.call(e,o)&&o!==n)Xf(e,o,{get:()=>t[o],enumerable:!(r=fPe(t,o))||r.enumerable})}return e},vPe=(e)=>CPe(Xf({},"__esModule",{value:!0}),e),VW={};SPe(VW,{isArrayBuffer:()=>wPe});KW.exports=vPe(VW);var wPe=IPe((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var XW=x(function(SCt,ZW){var{defineProperty:ey,getOwnPropertyDescriptor:EPe,getOwnPropertyNames:kPe}=Object,xPe=Object.prototype.hasOwnProperty,WW=(e,t)=>ey(e,"name",{value:t,configurable:!0}),PPe=(e,t)=>{for(var n in t)ey(e,n,{get:t[n],enumerable:!0})},RPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of kPe(t))if(!xPe.call(e,o)&&o!==n)ey(e,o,{get:()=>t[o],enumerable:!(r=EPe(t,o))||r.enumerable})}return e},TPe=(e)=>RPe(ey({},"__esModule",{value:!0}),e),JW={};PPe(JW,{fromArrayBuffer:()=>OPe,fromString:()=>_Pe});ZW.exports=TPe(JW);var BPe=YW(),kB=F("buffer"),OPe=WW((e,t=0,n=e.byteLength-t)=>{if(!(0,BPe.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return kB.Buffer.from(e,t,n)},"fromArrayBuffer"),_Pe=WW((e,t)=>{if(typeof e!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?kB.Buffer.from(e,t):kB.Buffer.from(e)},"fromString")});var rJ=x(function(CCt,oJ){var{defineProperty:ty,getOwnPropertyDescriptor:DPe,getOwnPropertyNames:LPe}=Object,QPe=Object.prototype.hasOwnProperty,xB=(e,t)=>ty(e,"name",{value:t,configurable:!0}),NPe=(e,t)=>{for(var n in t)ty(e,n,{get:t[n],enumerable:!0})},MPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of LPe(t))if(!QPe.call(e,o)&&o!==n)ty(e,o,{get:()=>t[o],enumerable:!(r=DPe(t,o))||r.enumerable})}return e},zPe=(e)=>MPe(ty({},"__esModule",{value:!0}),e),eJ={};NPe(eJ,{fromUtf8:()=>nJ,toUint8Array:()=>jPe,toUtf8:()=>UPe});oJ.exports=zPe(eJ);var tJ=XW(),nJ=xB((e)=>{let t=(0,tJ.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),jPe=xB((e)=>{if(typeof e==="string")return nJ(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),UPe=xB((e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,tJ.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var aJ=x(function(iJ){Object.defineProperty(iJ,"__esModule",{value:!0});iJ.convertToBuffer=void 0;var FPe=rJ(),$Pe=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:FPe.fromUtf8;function GPe(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return $Pe(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}iJ.convertToBuffer=GPe});var uJ=x(function(cJ){Object.defineProperty(cJ,"__esModule",{value:!0});cJ.isEmptyData=void 0;function HPe(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}cJ.isEmptyData=HPe});var gJ=x(function(dJ){Object.defineProperty(dJ,"__esModule",{value:!0});dJ.numToUint8=void 0;function qPe(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}dJ.numToUint8=qPe});var AJ=x(function(mJ){Object.defineProperty(mJ,"__esModule",{value:!0});mJ.uint32ArrayFrom=void 0;function VPe(e){if(!Uint32Array.from){var t=new Uint32Array(e.length),n=0;while(n<e.length)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}mJ.uint32ArrayFrom=VPe});var fJ=x(function(tl){Object.defineProperty(tl,"__esModule",{value:!0});tl.uint32ArrayFrom=tl.numToUint8=tl.isEmptyData=tl.convertToBuffer=void 0;var KPe=aJ();Object.defineProperty(tl,"convertToBuffer",{enumerable:!0,get:function(){return KPe.convertToBuffer}});var YPe=uJ();Object.defineProperty(tl,"isEmptyData",{enumerable:!0,get:function(){return YPe.isEmptyData}});var WPe=gJ();Object.defineProperty(tl,"numToUint8",{enumerable:!0,get:function(){return WPe.numToUint8}});var JPe=AJ();Object.defineProperty(tl,"uint32ArrayFrom",{enumerable:!0,get:function(){return JPe.uint32ArrayFrom}})});var SJ=x(function(bJ){Object.defineProperty(bJ,"__esModule",{value:!0});bJ.Sha256=void 0;var yJ=wB(),oy=EB(),ny=qW(),PB=fJ(),XPe=function(){function e(t){this.secret=t,this.hash=new ny.RawSha256,this.reset()}return e.prototype.update=function(t){if((0,PB.isEmptyData)(t)||this.error)return;try{this.hash.update((0,PB.convertToBuffer)(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;if(this.outer){if(!this.outer.finished)this.outer.update(this.hash.digest());return this.outer.digest()}return this.hash.digest()},e.prototype.digest=function(){return yJ.__awaiter(this,void 0,void 0,function(){return yJ.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ny.RawSha256,this.secret){this.outer=new ny.RawSha256;var t=eRe(this.secret),n=new Uint8Array(oy.BLOCK_SIZE);n.set(t);for(var r=0;r<oy.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(var r=0;r<t.byteLength;r++)t[r]=0}},e}();bJ.Sha256=XPe;function eRe(e){var t=(0,PB.convertToBuffer)(e);if(t.byteLength>oy.BLOCK_SIZE){var n=new ny.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(oy.BLOCK_SIZE);return r.set(t),r}});var CJ=x(function(RB){Object.defineProperty(RB,"__esModule",{value:!0});var tRe=wB();tRe.__exportStar(SJ(),RB)});var ry=()=>{};var vJ="io.modelcontextprotocol/related-task",sy="2.0",Ut,wJ,EJ,DCt,nRe,oRe,TB,so,ay,nn,wo,Eo,on,cy,rRe,iRe,kJ,yp,xJ,PJ,LCt,BB,sRe,OB,aRe,bp,nl,RJ,cRe,lRe,uRe,dRe,pRe,gRe,mRe,hRe,TJ,ARe,_B,fRe,yRe,DB,bRe,Ip,Sp,IRe,Cp,ly,SRe,LB,QB,NB,MB,QCt,zB,jB,UB,CRe,BJ,OJ,FB,_J,vp,ol,DJ,vRe,wRe,LJ,ERe,QJ,$B,kRe,xRe,NJ,MJ,PRe,RRe,TRe,BRe,ORe,_Re,DRe,LRe,QRe,zJ,NRe,MRe,GB,HB,qB,zRe,jRe,URe,VB,FRe,jJ,UJ,$Re,GRe,FJ,HRe,$J,uy,NCt,qRe,VRe,GJ,KRe,HJ,YRe,WRe,JRe,ZRe,XRe,eTe,tTe,nTe,oTe,iy,rTe,iTe,qJ,VJ,KJ,sTe,aTe,cTe,lTe,uTe,dTe,pTe,gTe,mTe,hTe,ATe,fTe,yTe,bTe,ITe,YJ,STe,CTe,WJ,vTe,wTe,ETe,kTe,JJ,xTe,PTe,RTe,TTe,MCt,zCt,jCt,UCt,FCt,$Ct;var qs=h(()=>{AB();Ut=WA((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),wJ=ut([k(),je().int()]),EJ=k(),DCt=Tt({ttl:je().optional(),pollInterval:je().optional()}),nRe=ne({ttl:je().optional()}),oRe=ne({taskId:k()}),TB=Tt({progressToken:wJ.optional(),[vJ]:oRe.optional()}),so=ne({_meta:TB.optional()}),ay=so.extend({task:nRe.optional()}),nn=ne({method:k(),params:so.loose().optional()}),wo=ne({_meta:TB.optional()}),Eo=ne({method:k(),params:wo.loose().optional()}),on=Tt({_meta:TB.optional()}),cy=ut([k(),je().int()]),rRe=ne({jsonrpc:ue(sy),id:cy,...nn.shape}).strict(),iRe=ne({jsonrpc:ue(sy),...Eo.shape}).strict(),kJ=ne({jsonrpc:ue(sy),id:cy,result:on}).strict();(function(e){e[e.ConnectionClosed=-32000]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(yp||(yp={}));xJ=ne({jsonrpc:ue(sy),id:cy.optional(),error:ne({code:je().int(),message:k(),data:lt().optional()})}).strict(),PJ=ut([rRe,iRe,kJ,xJ]),LCt=ut([kJ,xJ]),BB=on.strict(),sRe=wo.extend({requestId:cy.optional(),reason:k().optional()}),OB=Eo.extend({method:ue("notifications/cancelled"),params:sRe}),aRe=ne({src:k(),mimeType:k().optional(),sizes:ee(k()).optional(),theme:tn(["light","dark"]).optional()}),bp=ne({icons:ee(aRe).optional()}),nl=ne({name:k(),title:k().optional()}),RJ=nl.extend({...nl.shape,...bp.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),cRe=Qc(ne({applyDefaults:Xe().optional()}),tt(k(),lt())),lRe=ap((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},Qc(ne({form:cRe.optional(),url:Ut.optional()}),tt(k(),lt()).optional())),uRe=Tt({list:Ut.optional(),cancel:Ut.optional(),requests:Tt({sampling:Tt({createMessage:Ut.optional()}).optional(),elicitation:Tt({create:Ut.optional()}).optional()}).optional()}),dRe=Tt({list:Ut.optional(),cancel:Ut.optional(),requests:Tt({tools:Tt({call:Ut.optional()}).optional()}).optional()}),pRe=ne({experimental:tt(k(),Ut).optional(),sampling:ne({context:Ut.optional(),tools:Ut.optional()}).optional(),elicitation:lRe.optional(),roots:ne({listChanged:Xe().optional()}).optional(),tasks:uRe.optional(),extensions:tt(k(),Ut).optional()}),gRe=so.extend({protocolVersion:k(),capabilities:pRe,clientInfo:RJ}),mRe=nn.extend({method:ue("initialize"),params:gRe}),hRe=ne({experimental:tt(k(),Ut).optional(),logging:Ut.optional(),completions:Ut.optional(),prompts:ne({listChanged:Xe().optional()}).optional(),resources:ne({subscribe:Xe().optional(),listChanged:Xe().optional()}).optional(),tools:ne({listChanged:Xe().optional()}).optional(),tasks:dRe.optional(),extensions:tt(k(),Ut).optional()}),TJ=on.extend({protocolVersion:k(),capabilities:hRe,serverInfo:RJ,instructions:k().optional()}),ARe=Eo.extend({method:ue("notifications/initialized"),params:wo.optional()}),_B=nn.extend({method:ue("ping"),params:so.optional()}),fRe=ne({progress:je(),total:pt(je()),message:pt(k())}),yRe=ne({...wo.shape,...fRe.shape,progressToken:wJ}),DB=Eo.extend({method:ue("notifications/progress"),params:yRe}),bRe=so.extend({cursor:EJ.optional()}),Ip=nn.extend({params:bRe.optional()}),Sp=on.extend({nextCursor:EJ.optional()}),IRe=tn(["working","input_required","completed","failed","cancelled"]),Cp=ne({taskId:k(),status:IRe,ttl:ut([je(),ep()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:pt(je()),statusMessage:pt(k())}),ly=on.extend({task:Cp}),SRe=wo.merge(Cp),LB=Eo.extend({method:ue("notifications/tasks/status"),params:SRe}),QB=nn.extend({method:ue("tasks/get"),params:so.extend({taskId:k()})}),NB=on.merge(Cp),MB=nn.extend({method:ue("tasks/result"),params:so.extend({taskId:k()})}),QCt=on.loose(),zB=Ip.extend({method:ue("tasks/list")}),jB=Sp.extend({tasks:ee(Cp)}),UB=nn.extend({method:ue("tasks/cancel"),params:so.extend({taskId:k()})}),CRe=on.merge(Cp),BJ=ne({uri:k(),mimeType:pt(k()),_meta:tt(k(),lt()).optional()}),OJ=BJ.extend({text:k()}),FB=k().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),_J=BJ.extend({blob:FB}),vp=tn(["user","assistant"]),ol=ne({audience:ee(vp).optional(),priority:je().min(0).max(1).optional(),lastModified:Qi.datetime({offset:!0}).optional()}),DJ=ne({...nl.shape,...bp.shape,uri:k(),description:pt(k()),mimeType:pt(k()),size:pt(je()),annotations:ol.optional(),_meta:pt(Tt({}))}),vRe=ne({...nl.shape,...bp.shape,uriTemplate:k(),description:pt(k()),mimeType:pt(k()),annotations:ol.optional(),_meta:pt(Tt({}))}),wRe=Ip.extend({method:ue("resources/list")}),LJ=Sp.extend({resources:ee(DJ)}),ERe=Ip.extend({method:ue("resources/templates/list")}),QJ=Sp.extend({resourceTemplates:ee(vRe)}),$B=so.extend({uri:k()}),kRe=$B,xRe=nn.extend({method:ue("resources/read"),params:kRe}),NJ=on.extend({contents:ee(ut([OJ,_J]))}),MJ=Eo.extend({method:ue("notifications/resources/list_changed"),params:wo.optional()}),PRe=$B,RRe=nn.extend({method:ue("resources/subscribe"),params:PRe}),TRe=$B,BRe=nn.extend({method:ue("resources/unsubscribe"),params:TRe}),ORe=wo.extend({uri:k()}),_Re=Eo.extend({method:ue("notifications/resources/updated"),params:ORe}),DRe=ne({name:k(),description:pt(k()),required:pt(Xe())}),LRe=ne({...nl.shape,...bp.shape,description:pt(k()),arguments:pt(ee(DRe)),_meta:pt(Tt({}))}),QRe=Ip.extend({method:ue("prompts/list")}),zJ=Sp.extend({prompts:ee(LRe)}),NRe=so.extend({name:k(),arguments:tt(k(),k()).optional()}),MRe=nn.extend({method:ue("prompts/get"),params:NRe}),GB=ne({type:ue("text"),text:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),HB=ne({type:ue("image"),data:FB,mimeType:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),qB=ne({type:ue("audio"),data:FB,mimeType:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),zRe=ne({type:ue("tool_use"),name:k(),id:k(),input:tt(k(),lt()),_meta:tt(k(),lt()).optional()}),jRe=ne({type:ue("resource"),resource:ut([OJ,_J]),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),URe=DJ.extend({type:ue("resource_link")}),VB=ut([GB,HB,qB,URe,jRe]),FRe=ne({role:vp,content:VB}),jJ=on.extend({description:k().optional(),messages:ee(FRe)}),UJ=Eo.extend({method:ue("notifications/prompts/list_changed"),params:wo.optional()}),$Re=ne({title:k().optional(),readOnlyHint:Xe().optional(),destructiveHint:Xe().optional(),idempotentHint:Xe().optional(),openWorldHint:Xe().optional()}),GRe=ne({taskSupport:tn(["required","optional","forbidden"]).optional()}),FJ=ne({...nl.shape,...bp.shape,description:k().optional(),inputSchema:ne({type:ue("object"),properties:tt(k(),Ut).optional(),required:ee(k()).optional()}).catchall(lt()),outputSchema:ne({type:ue("object"),properties:tt(k(),Ut).optional(),required:ee(k()).optional()}).catchall(lt()).optional(),annotations:$Re.optional(),execution:GRe.optional(),_meta:tt(k(),lt()).optional()}),HRe=Ip.extend({method:ue("tools/list")}),$J=Sp.extend({tools:ee(FJ)}),uy=on.extend({content:ee(VB).default([]),structuredContent:tt(k(),lt()).optional(),isError:Xe().optional()}),NCt=uy.or(on.extend({toolResult:lt()})),qRe=ay.extend({name:k(),arguments:tt(k(),lt()).optional()}),VRe=nn.extend({method:ue("tools/call"),params:qRe}),GJ=Eo.extend({method:ue("notifications/tools/list_changed"),params:wo.optional()}),KRe=ne({autoRefresh:Xe().default(!0),debounceMs:je().int().nonnegative().default(300)}),HJ=tn(["debug","info","notice","warning","error","critical","alert","emergency"]),YRe=so.extend({level:HJ}),WRe=nn.extend({method:ue("logging/setLevel"),params:YRe}),JRe=wo.extend({level:HJ,logger:k().optional(),data:lt()}),ZRe=Eo.extend({method:ue("notifications/message"),params:JRe}),XRe=ne({name:k().optional()}),eTe=ne({hints:ee(XRe).optional(),costPriority:je().min(0).max(1).optional(),speedPriority:je().min(0).max(1).optional(),intelligencePriority:je().min(0).max(1).optional()}),tTe=ne({mode:tn(["auto","required","none"]).optional()}),nTe=ne({type:ue("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:ee(VB).default([]),structuredContent:ne({}).loose().optional(),isError:Xe().optional(),_meta:tt(k(),lt()).optional()}),oTe=rp("type",[GB,HB,qB]),iy=rp("type",[GB,HB,qB,zRe,nTe]),rTe=ne({role:vp,content:ut([iy,ee(iy)]),_meta:tt(k(),lt()).optional()}),iTe=ay.extend({messages:ee(rTe),modelPreferences:eTe.optional(),systemPrompt:k().optional(),includeContext:tn(["none","thisServer","allServers"]).optional(),temperature:je().optional(),maxTokens:je().int(),stopSequences:ee(k()).optional(),metadata:Ut.optional(),tools:ee(FJ).optional(),toolChoice:tTe.optional()}),qJ=nn.extend({method:ue("sampling/createMessage"),params:iTe}),VJ=on.extend({model:k(),stopReason:pt(tn(["endTurn","stopSequence","maxTokens"]).or(k())),role:vp,content:oTe}),KJ=on.extend({model:k(),stopReason:pt(tn(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:vp,content:ut([iy,ee(iy)])}),sTe=ne({type:ue("boolean"),title:k().optional(),description:k().optional(),default:Xe().optional()}),aTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),minLength:je().optional(),maxLength:je().optional(),format:tn(["email","uri","date","date-time"]).optional(),default:k().optional()}),cTe=ne({type:tn(["number","integer"]),title:k().optional(),description:k().optional(),minimum:je().optional(),maximum:je().optional(),default:je().optional()}),lTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),enum:ee(k()),default:k().optional()}),uTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),oneOf:ee(ne({const:k(),title:k()})),default:k().optional()}),dTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),enum:ee(k()),enumNames:ee(k()).optional(),default:k().optional()}),pTe=ut([lTe,uTe]),gTe=ne({type:ue("array"),title:k().optional(),description:k().optional(),minItems:je().optional(),maxItems:je().optional(),items:ne({type:ue("string"),enum:ee(k())}),default:ee(k()).optional()}),mTe=ne({type:ue("array"),title:k().optional(),description:k().optional(),minItems:je().optional(),maxItems:je().optional(),items:ne({anyOf:ee(ne({const:k(),title:k()}))}),default:ee(k()).optional()}),hTe=ut([gTe,mTe]),ATe=ut([dTe,pTe,hTe]),fTe=ut([ATe,sTe,aTe,cTe]),yTe=ay.extend({mode:ue("form").optional(),message:k(),requestedSchema:ne({type:ue("object"),properties:tt(k(),fTe),required:ee(k()).optional()})}),bTe=ay.extend({mode:ue("url"),message:k(),elicitationId:k(),url:k().url()}),ITe=ut([yTe,bTe]),YJ=nn.extend({method:ue("elicitation/create"),params:ITe}),STe=wo.extend({elicitationId:k()}),CTe=Eo.extend({method:ue("notifications/elicitation/complete"),params:STe}),WJ=on.extend({action:tn(["accept","decline","cancel"]),content:ap((e)=>e===null?void 0:e,tt(k(),ut([k(),je(),Xe(),ee(k())])).optional())}),vTe=ne({type:ue("ref/resource"),uri:k()}),wTe=ne({type:ue("ref/prompt"),name:k()}),ETe=so.extend({ref:ut([wTe,vTe]),argument:ne({name:k(),value:k()}),context:ne({arguments:tt(k(),k()).optional()}).optional()}),kTe=nn.extend({method:ue("completion/complete"),params:ETe}),JJ=on.extend({completion:Tt({values:ee(k()).max(100),total:pt(je().int()),hasMore:pt(Xe())})}),xTe=ne({uri:k().startsWith("file://"),name:k().optional(),_meta:tt(k(),lt()).optional()}),PTe=nn.extend({method:ue("roots/list"),params:so.optional()}),RTe=on.extend({roots:ee(xTe)}),TTe=Eo.extend({method:ue("notifications/roots/list_changed"),params:wo.optional()}),MCt=ut([_B,mRe,kTe,WRe,MRe,QRe,wRe,ERe,xRe,RRe,BRe,VRe,HRe,QB,MB,zB,UB]),zCt=ut([OB,DB,ARe,TTe,LB]),jCt=ut([BB,VJ,KJ,WJ,RTe,NB,jB,ly]),UCt=ut([_B,qJ,YJ,PTe,QB,MB,zB,UB]),FCt=ut([OB,DB,ZRe,_Re,MJ,GJ,UJ,LB,CTe]),$Ct=ut([BB,TJ,JJ,jJ,zJ,LJ,QJ,NJ,uy,$J,NB,jB,ly])});var BTe;var dy=h(()=>{BTe=Symbol("Let zodToJsonSchema decide on which parser to use")});var KB=h(()=>{dy()});var ko=()=>{};var YB=h(()=>{Dt()});var WB=()=>{};var py=h(()=>{Dt()});var JB=h(()=>{Dt()});var ZB=()=>{};var XB=h(()=>{Dt()});var eO=h(()=>{Dt();ko()});var tO=h(()=>{Dt()});var Cvt;var gy=h(()=>{Cvt=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var my=h(()=>{Dt();gy();py();ko()});var nO=h(()=>{Dt();my();ko()});var oO=h(()=>{ko()});var hy=h(()=>{Dt()});var rO=h(()=>{Dt();hy()});var iO=()=>{};var sO=h(()=>{Dt()});var aO=h(()=>{Dt();ko()});var cO=h(()=>{Dt()});var lO=h(()=>{Dt()});var uO=h(()=>{Dt()});var dO=h(()=>{Dt()});var pO=h(()=>{ko()});var gO=h(()=>{ko()});var mO=h(()=>{Dt()});var hO=h(()=>{ko();YB();WB();py();JB();ZB();XB();eO();tO();nO();oO();rO();iO();sO();aO();cO();lO();my();uO();gy();dO();pO();hy();gO();mO()});var Dt=h(()=>{dy();hO();ko()});var ZJ=()=>{};var AO=h(()=>{Dt();KB();ko()});var XJ=h(()=>{AO();dy();KB();Dt();ZJ();ko();YB();WB();py();JB();ZB();XB();eO();tO();nO();oO();rO();iO();sO();aO();cO();lO();mO();my();uO();gy();dO();pO();hy();gO();hO();AO()});var t4=h(()=>{ry();XJ()});var o4=h(()=>{ry();qs();t4()});var kp=x(function(s4){Object.defineProperty(s4,"__esModule",{value:!0});s4.regexpCode=s4.getEsmExportName=s4.getProperty=s4.safeStringify=s4.stringify=s4.strConcat=s4.addCodeArg=s4.str=s4._=s4.nil=s4._Code=s4.Name=s4.IDENTIFIER=s4._CodeOrName=void 0;class Ay{}s4._CodeOrName=Ay;s4.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class rl extends Ay{constructor(e){super();if(!s4.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}s4.Name=rl;class qo extends Ay{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>{if(n instanceof rl)t[n.str]=(t[n.str]||0)+1;return t},{})}}s4._Code=qo;s4.nil=new qo("");function r4(e,...t){let n=[e[0]],r=0;while(r<t.length)yO(n,t[r]),n.push(e[++r]);return new qo(n)}s4._=r4;var fO=new qo("+");function i4(e,...t){let n=[Ep(e[0])],r=0;while(r<t.length)n.push(fO),yO(n,t[r]),n.push(fO,Ep(e[++r]));return UTe(n),new qo(n)}s4.str=i4;function yO(e,t){if(t instanceof qo)e.push(...t._items);else if(t instanceof rl)e.push(t);else e.push(GTe(t))}s4.addCodeArg=yO;function UTe(e){let t=1;while(t<e.length-1){if(e[t]===fO){let n=FTe(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function FTe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof rl||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof rl))return`"${e}${t.slice(1)}`;return}function $Te(e,t){return t.emptyStr()?e:e.emptyStr()?t:i4`${e}${t}`}s4.strConcat=$Te;function GTe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ep(Array.isArray(e)?e.join(","):e)}function HTe(e){return new qo(Ep(e))}s4.stringify=HTe;function Ep(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}s4.safeStringify=Ep;function qTe(e){return typeof e=="string"&&s4.IDENTIFIER.test(e)?new qo(`.${e}`):r4`[${e}]`}s4.getProperty=qTe;function VTe(e){if(typeof e=="string"&&s4.IDENTIFIER.test(e))return new qo(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}s4.getEsmExportName=VTe;function KTe(e){return new qo(e.toString())}s4.regexpCode=KTe});var CO=x(function(u4){Object.defineProperty(u4,"__esModule",{value:!0});u4.ValueScope=u4.ValueScopeName=u4.Scope=u4.varKinds=u4.UsedValueState=void 0;var Fn=kp();class c4 extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var yy;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(yy||(u4.UsedValueState=yy={}));u4.varKinds={const:new Fn.Name("const"),let:new Fn.Name("let"),var:new Fn.Name("var")};class IO{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Fn.Name?e:this.name(e)}name(e){return new Fn.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}u4.Scope=IO;class SO extends Fn.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=Fn._`.${new Fn.Name(t)}[${n}]`}}u4.ValueScopeName=SO;var aBe=Fn._`\n`;class l4 extends IO{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?aBe:Fn.nil}}get(){return this._scope}name(e){return new SO(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let r=this.toName(e),{prefix:o}=r,i=(n=t.key)!==null&&n!==void 0?n:t.ref,s=this._values[o];if(s){let u=s.get(i);if(u)return u}else s=this._values[o]=new Map;s.set(i,r);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=t.ref,r.setValue(t,{property:o,itemIndex:l}),r}getValue(e,t){let n=this._values[e];if(!n)return;return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(n)=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return Fn._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(r)=>{if(r.value===void 0)throw Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,n)}_reduceValues(e,t,n={},r){let o=Fn.nil;for(let i in e){let s=e[i];if(!s)continue;let c=n[i]=n[i]||new Map;s.forEach((l)=>{if(c.has(l))return;c.set(l,yy.Started);let u=t(l);if(u){let d=this.opts.es5?u4.varKinds.var:u4.varKinds.const;o=Fn._`${o}${d} ${l} = ${u};${this.opts._n}`}else if(u=r===null||r===void 0?void 0:r(l))o=Fn._`${o}${u}${this.opts._n}`;else throw new c4(l);c.set(l,yy.Completed)})}return o}}u4.ValueScope=l4});var Ne=x(function($n){Object.defineProperty($n,"__esModule",{value:!0});$n.or=$n.and=$n.not=$n.CodeGen=$n.operators=$n.varKinds=$n.ValueScopeName=$n.ValueScope=$n.Scope=$n.Name=$n.regexpCode=$n.stringify=$n.getProperty=$n.nil=$n.strConcat=$n.str=$n._=void 0;var Ue=kp(),Vo=CO(),Ni=kp();Object.defineProperty($n,"_",{enumerable:!0,get:function(){return Ni._}});Object.defineProperty($n,"str",{enumerable:!0,get:function(){return Ni.str}});Object.defineProperty($n,"strConcat",{enumerable:!0,get:function(){return Ni.strConcat}});Object.defineProperty($n,"nil",{enumerable:!0,get:function(){return Ni.nil}});Object.defineProperty($n,"getProperty",{enumerable:!0,get:function(){return Ni.getProperty}});Object.defineProperty($n,"stringify",{enumerable:!0,get:function(){return Ni.stringify}});Object.defineProperty($n,"regexpCode",{enumerable:!0,get:function(){return Ni.regexpCode}});Object.defineProperty($n,"Name",{enumerable:!0,get:function(){return Ni.Name}});var wy=CO();Object.defineProperty($n,"Scope",{enumerable:!0,get:function(){return wy.Scope}});Object.defineProperty($n,"ValueScope",{enumerable:!0,get:function(){return wy.ValueScope}});Object.defineProperty($n,"ValueScopeName",{enumerable:!0,get:function(){return wy.ValueScopeName}});Object.defineProperty($n,"varKinds",{enumerable:!0,get:function(){return wy.varKinds}});$n.operators={GT:new Ue._Code(">"),GTE:new Ue._Code(">="),LT:new Ue._Code("<"),LTE:new Ue._Code("<="),EQ:new Ue._Code("==="),NEQ:new Ue._Code("!=="),NOT:new Ue._Code("!"),OR:new Ue._Code("||"),AND:new Ue._Code("&&"),ADD:new Ue._Code("+")};class Mi{optimizeNodes(){return this}optimizeNames(e,t){return this}}class p4 extends Mi{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Vo.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=sl(this.rhs,e,t);return this}get names(){return this.rhs instanceof Ue._CodeOrName?this.rhs.names:{}}}class EO extends Mi{constructor(e,t,n){super();this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Ue.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=sl(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Ue.Name?{}:{...this.lhs.names};return vy(e,this.rhs)}}class g4 extends EO{constructor(e,t,n,r){super(e,n,r);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class m4 extends Mi{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class h4 extends Mi{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class A4 extends Mi{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f4 extends Mi{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=sl(this.code,e,t),this}get names(){return this.code instanceof Ue._CodeOrName?this.code.names:{}}}class Ey extends Mi{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let n=e[t].optimizeNodes();if(Array.isArray(n))e.splice(t,1,...n);else if(n)e[t]=n;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;while(r--){let o=n[r];if(o.optimizeNames(e,t))continue;dBe(e,o.names),n.splice(r,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Vs(e,t.names),{})}}class zi extends Ey{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y4 extends Ey{}class xp extends zi{}xp.kind="else";class Zr extends zi{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new xp(n):n}if(t){if(e===!1)return t instanceof Zr?t:t.nodes;if(this.nodes.length)return this;return new Zr(v4(e),t instanceof Zr?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=sl(this.condition,e,t),this}get names(){let e=super.names;if(vy(e,this.condition),this.else)Vs(e,this.else.names);return e}}Zr.kind="if";class il extends zi{}il.kind="for";class b4 extends il{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=sl(this.iteration,e,t),this}get names(){return Vs(super.names,this.iteration.names)}}class I4 extends il{constructor(e,t,n,r){super();this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?Vo.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=vy(super.names,this.from);return vy(e,this.to)}}class vO extends il{constructor(e,t,n,r){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=sl(this.iterable,e,t),this}get names(){return Vs(super.names,this.iterable.names)}}class by extends zi{constructor(e,t,n){super();this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}by.kind="func";class Iy extends Ey{render(e){return"return "+super.render(e)}}Iy.kind="return";class S4 extends zi{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(r=this.finally)===null||r===void 0||r.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Vs(e,this.catch.names);if(this.finally)Vs(e,this.finally.names);return e}}class Sy extends zi{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Sy.kind="catch";class Cy extends zi{render(e){return"finally"+super.render(e)}}Cy.kind="finally";class C4{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
7577
7577
|
`:""},this._extScope=e,this._scope=new Vo.Scope({parent:e}),this._nodes=[new y4]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let o=this._scope.toName(t);if(n!==void 0&&r)this._constants[o.str]=n;return this._leafNode(new p4(e,o,n)),o}const(e,t,n){return this._def(Vo.varKinds.const,e,t,n)}let(e,t,n){return this._def(Vo.varKinds.let,e,t,n)}var(e,t,n){return this._def(Vo.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new EO(e,t,n))}add(e,t){return this._leafNode(new g4(e,$n.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==Ue.nil)this._leafNode(new f4(e));return this}object(...e){let t=["{"];for(let[n,r]of e){if(t.length>1)t.push(",");if(t.push(n),n!==r||this.opts.es5)t.push(":"),(0,Ue.addCodeArg)(t,r)}return t.push("}"),new Ue._Code(t)}if(e,t,n){if(this._blockNode(new Zr(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Zr(e))}else(){return this._elseNode(new xp)}endIf(){return this._endBlockNode(Zr,xp)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new b4(e),t)}forRange(e,t,n,r,o=this.opts.es5?Vo.varKinds.var:Vo.varKinds.let){let i=this._scope.toName(e);return this._for(new I4(o,i,t,n),()=>r(i))}forOf(e,t,n,r=Vo.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let i=t instanceof Ue.Name?t:this.var("_arr",t);return this.forRange("_i",0,Ue._`${i}.length`,(s)=>{this.var(o,Ue._`${i}[${s}]`),n(o)})}return this._for(new vO("of",r,o,t),()=>n(o))}forIn(e,t,n,r=this.opts.es5?Vo.varKinds.var:Vo.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,Ue._`Object.keys(${t})`,n);let o=this._scope.toName(e);return this._for(new vO("in",r,o,t),()=>n(o))}endFor(){return this._endBlockNode(il)}label(e){return this._leafNode(new m4(e))}break(e){return this._leafNode(new h4(e))}return(e){let t=new Iy;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(Iy)}try(e,t,n){if(!t&&!n)throw Error('CodeGen: "try" without "catch" and "finally"');let r=new S4;if(this._blockNode(r),this.code(e),t){let o=this.name("e");this._currNode=r.catch=new Sy(o),t(o)}if(n)this._currNode=r.finally=new Cy,this.code(n);return this._endBlockNode(Sy,Cy)}throw(e){return this._leafNode(new A4(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Ue.nil,n,r){if(this._blockNode(new by(e,t,n)),r)this.code(r).endFunc();return this}endFunc(){return this._endBlockNode(by)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Zr))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}$n.CodeGen=C4;function Vs(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function vy(e,t){return t instanceof Ue._CodeOrName?Vs(e,t.names):e}function sl(e,t,n){if(e instanceof Ue.Name)return r(e);if(!o(e))return e;return new Ue._Code(e._items.reduce((i,s)=>{if(s instanceof Ue.Name)s=r(s);if(s instanceof Ue._Code)i.push(...s._items);else i.push(s);return i},[]));function r(i){let s=n[i.str];if(s===void 0||t[i.str]!==1)return i;return delete t[i.str],s}function o(i){return i instanceof Ue._Code&&i._items.some((s)=>s instanceof Ue.Name&&t[s.str]===1&&n[s.str]!==void 0)}}function dBe(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function v4(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:Ue._`!${wO(e)}`}$n.not=v4;var pBe=w4($n.operators.AND);function gBe(...e){return e.reduce(pBe)}$n.and=gBe;var mBe=w4($n.operators.OR);function hBe(...e){return e.reduce(mBe)}$n.or=hBe;function w4(e){return(t,n)=>t===Ue.nil?n:n===Ue.nil?t:Ue._`${wO(t)} ${e} ${wO(n)}`}function wO(e){return e instanceof Ue.Name?e:Ue._`(${e})`}});var $e=x(function(_4){Object.defineProperty(_4,"__esModule",{value:!0});_4.checkStrictMode=_4.getErrorPath=_4.Type=_4.useFunc=_4.setEvaluated=_4.evaluatedPropsToName=_4.mergeEvaluated=_4.eachItem=_4.unescapeJsonPointer=_4.escapeJsonPointer=_4.escapeFragment=_4.unescapeFragment=_4.schemaRefOrVal=_4.schemaHasRulesButRef=_4.schemaHasRules=_4.checkUnknownRules=_4.alwaysValidSchema=_4.toHash=void 0;var gt=Ne(),bBe=kp();function IBe(e){let t={};for(let n of e)t[n]=!0;return t}_4.toHash=IBe;function SBe(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return P4(e,t),!R4(t,e.self.RULES.all)}_4.alwaysValidSchema=SBe;function P4(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema)return;if(typeof t==="boolean")return;let o=r.RULES.keywords;for(let i in t)if(!o[i])O4(e,`unknown keyword: "${i}"`)}_4.checkUnknownRules=P4;function R4(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}_4.schemaHasRules=R4;function CBe(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}_4.schemaHasRulesButRef=CBe;function vBe({topSchemaRef:e,schemaPath:t},n,r,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return gt._`${n}`}return gt._`${e}${t}${(0,gt.getProperty)(r)}`}_4.schemaRefOrVal=vBe;function wBe(e){return T4(decodeURIComponent(e))}_4.unescapeFragment=wBe;function EBe(e){return encodeURIComponent(xO(e))}_4.escapeFragment=EBe;function xO(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}_4.escapeJsonPointer=xO;function T4(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}_4.unescapeJsonPointer=T4;function kBe(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}_4.eachItem=kBe;function k4({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:r}){return(o,i,s,c)=>{let l=s===void 0?i:s instanceof gt.Name?(i instanceof gt.Name?e(o,i,s):t(o,i,s),s):i instanceof gt.Name?(t(o,s,i),i):n(i,s);return c===gt.Name&&!(l instanceof gt.Name)?r(o,l):l}}_4.mergeEvaluated={props:k4({mergeNames:(e,t,n)=>e.if(gt._`${n} !== true && ${t} !== undefined`,()=>{e.if(gt._`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,gt._`${n} || {}`).code(gt._`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if(gt._`${n} !== true`,()=>{if(t===!0)e.assign(n,!0);else e.assign(n,gt._`${n} || {}`),PO(e,n,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:B4}),items:k4({mergeNames:(e,t,n)=>e.if(gt._`${n} !== true && ${t} !== undefined`,()=>e.assign(n,gt._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if(gt._`${n} !== true`,()=>e.assign(n,t===!0?!0:gt._`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function B4(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",gt._`{}`);if(t!==void 0)PO(e,n,t);return n}_4.evaluatedPropsToName=B4;function PO(e,t,n){Object.keys(n).forEach((r)=>e.assign(gt._`${t}${(0,gt.getProperty)(r)}`,!0))}_4.setEvaluated=PO;var x4={};function xBe(e,t){return e.scopeValue("func",{ref:t,code:x4[t.code]||(x4[t.code]=new bBe._Code(t.code))})}_4.useFunc=xBe;var kO;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(kO||(_4.Type=kO={}));function PBe(e,t,n){if(e instanceof gt.Name){let r=t===kO.Num;return n?r?gt._`"[" + ${e} + "]"`:gt._`"['" + ${e} + "']"`:r?gt._`"/" + ${e}`:gt._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,gt.getProperty)(e).toString():"/"+xO(e)}_4.getErrorPath=PBe;function O4(e,t,n=e.opts.strictSchema){if(!n)return;if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}_4.checkStrictMode=O4});var Xr=x(function(L4){Object.defineProperty(L4,"__esModule",{value:!0});var fn=Ne(),qBe={data:new fn.Name("data"),valCxt:new fn.Name("valCxt"),instancePath:new fn.Name("instancePath"),parentData:new fn.Name("parentData"),parentDataProperty:new fn.Name("parentDataProperty"),rootData:new fn.Name("rootData"),dynamicAnchors:new fn.Name("dynamicAnchors"),vErrors:new fn.Name("vErrors"),errors:new fn.Name("errors"),this:new fn.Name("this"),self:new fn.Name("self"),scope:new fn.Name("scope"),json:new fn.Name("json"),jsonPos:new fn.Name("jsonPos"),jsonLen:new fn.Name("jsonLen"),jsonPart:new fn.Name("jsonPart")};L4.default=qBe});var Pp=x(function(z4){Object.defineProperty(z4,"__esModule",{value:!0});z4.extendErrors=z4.resetErrorsCount=z4.reportExtraError=z4.reportError=z4.keyword$DataError=z4.keywordError=void 0;var Ge=Ne(),xy=$e(),Rn=Xr();z4.keywordError={message:({keyword:e})=>Ge.str`must pass "${e}" keyword validation`};z4.keyword$DataError={message:({keyword:e,schemaType:t})=>t?Ge.str`"${e}" keyword must be ${t} ($data)`:Ge.str`"${e}" keyword is invalid ($data)`};function KBe(e,t=z4.keywordError,n,r){let{it:o}=e,{gen:i,compositeRule:s,allErrors:c}=o,l=M4(e,t,n);if(r!==null&&r!==void 0?r:s||c)Q4(i,l);else N4(o,Ge._`[${l}]`)}z4.reportError=KBe;function YBe(e,t=z4.keywordError,n){let{it:r}=e,{gen:o,compositeRule:i,allErrors:s}=r,c=M4(e,t,n);if(Q4(o,c),!(i||s))N4(r,Rn.default.vErrors)}z4.reportExtraError=YBe;function WBe(e,t){e.assign(Rn.default.errors,t),e.if(Ge._`${Rn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(Ge._`${Rn.default.vErrors}.length`,t),()=>e.assign(Rn.default.vErrors,null)))}z4.resetErrorsCount=WBe;function JBe({gen:e,keyword:t,schemaValue:n,data:r,errsCount:o,it:i}){if(o===void 0)throw Error("ajv implementation error");let s=e.name("err");e.forRange("i",o,Rn.default.errors,(c)=>{if(e.const(s,Ge._`${Rn.default.vErrors}[${c}]`),e.if(Ge._`${s}.instancePath === undefined`,()=>e.assign(Ge._`${s}.instancePath`,(0,Ge.strConcat)(Rn.default.instancePath,i.errorPath))),e.assign(Ge._`${s}.schemaPath`,Ge.str`${i.errSchemaPath}/${t}`),i.opts.verbose)e.assign(Ge._`${s}.schema`,n),e.assign(Ge._`${s}.data`,r)})}z4.extendErrors=JBe;function Q4(e,t){let n=e.const("err",t);e.if(Ge._`${Rn.default.vErrors} === null`,()=>e.assign(Rn.default.vErrors,Ge._`[${n}]`),Ge._`${Rn.default.vErrors}.push(${n})`),e.code(Ge._`${Rn.default.errors}++`)}function N4(e,t){let{gen:n,validateName:r,schemaEnv:o}=e;if(o.$async)n.throw(Ge._`new ${e.ValidationError}(${t})`);else n.assign(Ge._`${r}.errors`,t),n.return(!1)}var Ks={keyword:new Ge.Name("keyword"),schemaPath:new Ge.Name("schemaPath"),params:new Ge.Name("params"),propertyName:new Ge.Name("propertyName"),message:new Ge.Name("message"),schema:new Ge.Name("schema"),parentSchema:new Ge.Name("parentSchema")};function M4(e,t,n){let{createErrors:r}=e.it;if(r===!1)return Ge._`{}`;return ZBe(e,t,n)}function ZBe(e,t,n={}){let{gen:r,it:o}=e,i=[XBe(o,n),eOe(e,n)];return tOe(e,t,i),r.object(...i)}function XBe({errorPath:e},{instancePath:t}){let n=t?Ge.str`${e}${(0,xy.getErrorPath)(t,xy.Type.Str)}`:e;return[Rn.default.instancePath,(0,Ge.strConcat)(Rn.default.instancePath,n)]}function eOe({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:r}){let o=r?t:Ge.str`${t}/${e}`;if(n)o=Ge.str`${o}${(0,xy.getErrorPath)(n,xy.Type.Str)}`;return[Ks.schemaPath,o]}function tOe(e,{params:t,message:n},r){let{keyword:o,data:i,schemaValue:s,it:c}=e,{opts:l,propertyName:u,topSchemaRef:d,schemaPath:p}=c;if(r.push([Ks.keyword,o],[Ks.params,typeof t=="function"?t(e):t||Ge._`{}`]),l.messages)r.push([Ks.message,typeof n=="function"?n(e):n]);if(l.verbose)r.push([Ks.schema,s],[Ks.parentSchema,Ge._`${d}${p}`],[Rn.default.data,i]);if(u)r.push([Ks.propertyName,u])}});var G4=x(function(F4){Object.defineProperty(F4,"__esModule",{value:!0});F4.boolOrEmptySchema=F4.topBoolOrEmptySchema=void 0;var sOe=Pp(),aOe=Ne(),cOe=Xr(),lOe={message:"boolean schema is false"};function uOe(e){let{gen:t,schema:n,validateName:r}=e;if(n===!1)U4(e,!1);else if(typeof n=="object"&&n.$async===!0)t.return(cOe.default.data);else t.assign(aOe._`${r}.errors`,null),t.return(!0)}F4.topBoolOrEmptySchema=uOe;function dOe(e,t){let{gen:n,schema:r}=e;if(r===!1)n.var(t,!1),U4(e);else n.var(t,!0)}F4.boolOrEmptySchema=dOe;function U4(e,t){let{gen:n,data:r}=e,o={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,sOe.reportError)(o,lOe,void 0,t)}});var TO=x(function(H4){Object.defineProperty(H4,"__esModule",{value:!0});H4.getRules=H4.isJSONType=void 0;var gOe=["string","number","integer","boolean","null","object","array"],mOe=new Set(gOe);function hOe(e){return typeof e=="string"&&mOe.has(e)}H4.isJSONType=hOe;function AOe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}H4.getRules=AOe});var BO=x(function(Y4){Object.defineProperty(Y4,"__esModule",{value:!0});Y4.shouldUseRule=Y4.shouldUseGroup=Y4.schemaHasRulesForType=void 0;function yOe({schema:e,self:t},n){let r=t.RULES.types[n];return r&&r!==!0&&V4(e,r)}Y4.schemaHasRulesForType=yOe;function V4(e,t){return t.rules.some((n)=>K4(e,n))}Y4.shouldUseGroup=V4;function K4(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some((r)=>e[r]!==void 0))}Y4.shouldUseRule=K4});var Rp=x(function(eZ){Object.defineProperty(eZ,"__esModule",{value:!0});eZ.reportTypeError=eZ.checkDataTypes=eZ.checkDataType=eZ.coerceAndCheckDataType=eZ.getJSONTypes=eZ.getSchemaTypes=eZ.DataType=void 0;var SOe=TO(),COe=BO(),vOe=Pp(),Le=Ne(),J4=$e(),al;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(al||(eZ.DataType=al={}));function wOe(e){let t=Z4(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}eZ.getSchemaTypes=wOe;function Z4(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(SOe.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}eZ.getJSONTypes=Z4;function EOe(e,t){let{gen:n,data:r,opts:o}=e,i=kOe(t,o.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,COe.schemaHasRulesForType)(e,t[0]));if(s){let c=_O(t,r,o.strictNumbers,al.Wrong);n.if(c,()=>{if(i.length)xOe(e,t,i);else DO(e)})}return s}eZ.coerceAndCheckDataType=EOe;var X4=new Set(["string","number","integer","boolean","null"]);function kOe(e,t){return t?e.filter((n)=>X4.has(n)||t==="array"&&n==="array"):[]}function xOe(e,t,n){let{gen:r,data:o,opts:i}=e,s=r.let("dataType",Le._`typeof ${o}`),c=r.let("coerced",Le._`undefined`);if(i.coerceTypes==="array")r.if(Le._`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>r.assign(o,Le._`${o}[0]`).assign(s,Le._`typeof ${o}`).if(_O(t,o,i.strictNumbers),()=>r.assign(c,o)));r.if(Le._`${c} !== undefined`);for(let u of n)if(X4.has(u)||u==="array"&&i.coerceTypes==="array")l(u);r.else(),DO(e),r.endIf(),r.if(Le._`${c} !== undefined`,()=>{r.assign(o,c),POe(e,c)});function l(u){switch(u){case"string":r.elseIf(Le._`${s} == "number" || ${s} == "boolean"`).assign(c,Le._`"" + ${o}`).elseIf(Le._`${o} === null`).assign(c,Le._`""`);return;case"number":r.elseIf(Le._`${s} == "boolean" || ${o} === null
|
|
7578
7578
|
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(c,Le._`+${o}`);return;case"integer":r.elseIf(Le._`${s} === "boolean" || ${o} === null
|
|
7579
7579
|
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,Le._`+${o}`);return;case"boolean":r.elseIf(Le._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf(Le._`${o} === "true" || ${o} === 1`).assign(c,!0);return;case"null":r.elseIf(Le._`${o} === "" || ${o} === 0 || ${o} === false`),r.assign(c,null);return;case"array":r.elseIf(Le._`${s} === "string" || ${s} === "number"
|
|
@@ -8908,7 +8908,7 @@ Connect 1Password so Sazabi agents can work with your vaults and secrets through
|
|
|
8908
8908
|
- The 1Password CLI (\`op\`) sandbox preset, since no hosted MCP endpoint is available yet
|
|
8909
8909
|
`.trim()});import{dirname as L3e,resolve as Q3e}from"node:path";import{fileURLToPath as N3e}from"node:url";var M3e,Ece,kce,z3e,xce,j3e,U3e,F3e,Pce;var uN=h(()=>{De();Yf();M3e=Q3e(L3e(N3e(import.meta.url)),"../../../skills"),Ece=["airbyte","agentcat","atlassian","attio","autumn","aws","axiom","better-stack","braintrust","calendly","cekura","checkly","circleback","clay","clerk","cloudflare","composio","context-dev","custom","datadog","deepwiki","elastic-cloud","exa","gcp","google-drive","grafana","granola","happenstance","herd","honeycomb","incident-io","intercom","langfuse","langsmith","linear","logfire","mercury","neon","notion","onepassword","paper","plug","posthog","plain","planetscale","pylon","railway","render","rentahuman","resend","respan","salesforce","secureframe","sentry","secureframe","signoz","slack","stripe","supabase","superhuman","the-context-company","vercel","x"],kce=a.enum(Ece),z3e=a.object({readOnlyToolNames:a.array(a.string()).optional(),blockedToolNames:a.array(a.string()).optional(),defaultUnavailableReason:a.enum(Kf).optional(),allowWriteTools:a.boolean().optional()}),xce=a.object({registrationEndpoint:a.string().url(),tokenEndpointAuthMethod:a.enum(Vf).optional(),includeScopesInRegistration:a.boolean().optional()}),j3e=a.object({providerConfigKey:a.string().min(1),callbackPathSegment:a.string().min(1),authorizationUrl:a.string().url().optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),useServerUrlAsResource:a.boolean().optional(),omitScopeFromAuthorizationUrl:a.boolean().optional(),authorizationUrlParams:a.record(a.string(),a.string()).optional(),defaultAccessTokenTtlSeconds:a.number().int().positive().optional(),dynamicClientRegistration:xce.optional()}),U3e=a.object({label:a.string().min(1),serverUrl:a.string().url(),authorizationUrl:a.string().url().optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),dynamicClientRegistration:xce.optional()}),F3e=a.object({id:a.string().min(1),title:a.string().min(1),description:a.string().optional(),body:a.string().min(1),fieldKeys:a.array(a.string().min(1)).optional(),imageKeys:a.array(a.string().min(1)).optional()}),Pce=a.object({id:a.string().min(1),label:a.string().min(1),iconKey:kce,defaultServerUrl:a.string().url().nullable(),serverUrlPathSuffixMaxSegments:a.number().int().positive().optional(),serverUrlHostnameSuffixes:a.array(a.string().min(2)).optional(),transport:a.enum(fB),authMode:a.enum(yB),availability:a.enum(Xc),oauth:j3e.optional(),regions:a.array(U3e).optional(),capabilityOverrides:z3e.optional(),helpText:a.string().optional(),setupGroups:a.array(F3e).optional(),evidenceHints:a.array(a.string().min(1)).optional(),skill:a.string().min(1).optional(),setupSkill:a.string().min(1).optional(),scopesUserSelectable:a.boolean().optional()})});var U=(e)=>({...Pce.parse(e),...e.getAvailableScopes?{getAvailableScopes:e.getAvailableScopes}:{},...e.getUrlConfiguration?{getUrlConfiguration:e.getUrlConfiguration}:{},...e.validateCredentials?{validateCredentials:e.validateCredentials}:{},...e.normalizeHeaders?{normalizeHeaders:e.normalizeHeaders}:{}});var de=h(()=>{uN()});var Rce;var Tce=h(()=>{de();Rce=U({id:"agentcat",label:"AgentCat",iconKey:"agentcat",defaultServerUrl:"https://mcp.agentcat.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"agentcat",callbackPathSegment:"agentcat",authorizationUrl:"https://api.agentcat.com/oauth/authorize/",tokenUrl:"https://api.agentcat.com/oauth/token/",dynamicClientRegistration:{registrationEndpoint:"https://api.agentcat.com/oauth/register/",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"mcpcat:read",label:"Read",description:"Read AgentCat project, session, issue, and metric data."},{value:"mcpcat:write",label:"Write",description:"Create and update AgentCat issues and project data."}],capabilityOverrides:{allowWriteTools:!0},helpText:"Inspect agent usage analytics and debug AgentCat issues."})});var Bce;var Oce=h(()=>{de();Bce=U({id:"airbyte",label:"Airbyte",iconKey:"airbyte",defaultServerUrl:"https://mcp.airbyte.ai/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"airbyte",callbackPathSegment:"airbyte",authorizationUrl:"https://mcp.airbyte.ai/authorize",tokenUrl:"https://mcp.airbyte.ai/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.airbyte.ai/register",tokenEndpointAuthMethod:"client_secret_post"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,capabilityOverrides:{defaultUnavailableReason:"write_blocked"},evidenceHints:["Airbyte Agent Engine usage (mcp.airbyte.ai) or embedded agent connectors","AIRBYTE_* environment variables or Airbyte agent/connector client code","README/docs naming Airbyte for agent connectors to CRM, support, or analytics platforms"],helpText:"Read and write records on the third-party platforms (CRM, support desk, analytics, billing, databases) you have connected in your Airbyte Agent Engine workspace. Requires an Airbyte Agent Engine workspace with connectors already configured.",skill:"airbyte",setupSkill:"airbyte-setup"})});var _ce;var Dce=h(()=>{de();_ce=U({id:"atlassian",label:"Atlassian",iconKey:"atlassian",defaultServerUrl:"https://mcp.atlassian.com/v1/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"atlassian",callbackPathSegment:"atlassian",authorizationUrl:"https://mcp.atlassian.com/v1/authorize",tokenUrl:"https://cf.mcp.atlassian.com/v1/token",dynamicClientRegistration:{registrationEndpoint:"https://cf.mcp.atlassian.com/v1/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["atlassian.com, Jira, Confluence, Jira Service Management, Compass, or Bitbucket links","Jira or Confluence project keys, issue keys, or workspace documentation","ATLASSIAN_* environment variables or scripts that call Atlassian APIs"],helpText:"Search and manage Jira, Confluence, Jira Service Management, Compass, and Bitbucket. During authorization, pick the Atlassian site you want to connect.",skill:"atlassian",setupSkill:"atlassian-setup"})});var Lce;var Qce=h(()=>{de();Lce=U({id:"attio",label:"Attio",iconKey:"attio",defaultServerUrl:"https://mcp.attio.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"attio",callbackPathSegment:"attio",authorizationUrl:"https://app.attio.com/oidc/authorize",tokenUrl:"https://app.attio.com/oidc/token",dynamicClientRegistration:{registrationEndpoint:"https://app.attio.com/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"mcp",label:"MCP access",description:"Read and manage Attio CRM records, lists, tasks, notes, and meetings."},{value:"openid",required:!0},{value:"offline_access",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["attio.com links, Attio workspace docs, or ATTIO_* environment variables","CRM account/contact workflows that reference Attio objects, lists, or tasks","README/docs naming Attio as the CRM or customer system of record"],helpText:"Search and manage Attio CRM records, lists, tasks, notes, and meetings. During authorization, pick the Attio workspace you want to connect.",skill:"attio",setupSkill:"attio-setup"})});var Nce;var Mce=h(()=>{_t();de();Nce=U({id:"autumn",label:"Autumn",iconKey:"autumn",defaultServerUrl:"https://mcp.useautumn.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["useautumn.com / autumn-js SDK usage, AUTUMN_SECRET_KEY (am_sk_) environment variables, or an api.useautumn.com base URL","Autumn billing/pricing calls such as attach, check, track, or entitlement gating in code","README/docs naming Autumn for pricing, plans, features, credits, or usage-based billing on top of Stripe"],helpText:"Manage Autumn billing and pricing — customers, plans, features, balances, usage, and subscriptions — using an Autumn secret key.",setupGroups:[{id:"api-key",title:"Create an Autumn secret key",description:"Copy the Autumn secret key Sazabi will send to Autumn's hosted MCP endpoint.",body:"In the [Autumn dashboard](https://app.useautumn.com), open **Developer > API Keys** and copy a secret key (`am_sk_...`). Use a sandbox key to explore and a production key for live billing data. Sazabi stores it securely and sends it as `Authorization: Bearer <key>` to Autumn's MCP endpoint.",fieldKeys:["apiKey"]}],validateCredentials:mce,normalizeHeaders:pce})});var JI,u_t,zce;var ZI=h(()=>{de();JI=[{value:"us-east-1",label:"US East (N. Virginia) — us-east-1"},{value:"eu-central-1",label:"Europe (Frankfurt) — eu-central-1"}],u_t=new Set(JI.map((e)=>e.value)),zce=U({id:"aws",label:"AWS",iconKey:"aws",defaultServerUrl:"https://aws-mcp.us-east-1.api.aws/mcp",transport:"streamable-http",authMode:"aws-sigv4",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["AWS SDK usage, aws-cli, or AWS_* environment variables in code or config","CloudFormation/CDK/Terraform AWS resources, ECS/Lambda/S3/CloudWatch usage","README/runbooks naming AWS as the cloud platform"],helpText:"Query the AWS-managed AWS MCP server (AWS documentation and AWS API operations) using AWS IAM credentials. Sazabi signs each request with SigV4, so no local proxy is required.",setupGroups:[{id:"iam-credentials",title:"Create scoped IAM credentials",description:"Provide IAM credentials whose permissions match exactly what the agent should be able to do.",body:"In the AWS Console, create an IAM user or role with only the permissions Sazabi should use (for example read-only access via `ReadOnlyAccess`, or a scoped custom policy), then generate an access key. Paste the **Access key ID** and **Secret access key** below. For temporary credentials from an assumed role, also paste the **Session token**. Prefer short-lived, least-privilege credentials.",fieldKeys:["accessKeyId","secretAccessKey","sessionToken"]},{id:"region",title:"Choose the AWS region",description:"The AWS MCP server is region-scoped; pick the region to target.",body:"Select the region where AWS hosts the AWS MCP endpoint. AWS currently offers the AWS MCP server in **US East (N. Virginia) — us-east-1** and **Europe (Frankfurt) — eu-central-1** only. Sazabi builds the `https://aws-mcp.<region>.api.aws/mcp` server URL from your choice and scopes SigV4 signing to it. This is the endpoint region, not the AWS region your API operations target.",fieldKeys:["region"]}]})});var jce;var Uce=h(()=>{de();jce=U({id:"axiom",label:"Axiom",iconKey:"axiom",defaultServerUrl:"https://mcp.axiom.co/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"axiom",callbackPathSegment:"axiom",authorizationUrl:"https://mcp.axiom.co/authorize",tokenUrl:"https://mcp.axiom.co/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.axiom.co/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,getUrlConfiguration:async()=>({docsUrl:"https://axiom.co/docs/console/intelligence/mcp-server",instructions:"Copy the hosted MCP server URL below. If you belong to more than one Axiom organization, append ?org-id=<id> to target a specific organization.",defaultServerUrl:"https://mcp.axiom.co/mcp",optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Axiom datasets, APL queries, AXIOM_* environment variables, or axiom CLI usage","Log drains or dashboards documented in Axiom","README/docs naming Axiom as a log or event analytics backend"],helpText:"Query Axiom datasets and logs with APL to investigate production events and incidents."})});var Fce;var $ce=h(()=>{de();Fce=U({id:"better-stack",label:"Better Stack",iconKey:"better-stack",defaultServerUrl:"https://mcp.betterstack.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"better-stack",callbackPathSegment:"better-stack",authorizationUrl:"https://betterstack.com/oauth/authorize",tokenUrl:"https://betterstack.com/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://betterstack.com/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"read",label:"Read",description:"Read Better Stack incidents, monitors, log sources, and telemetry."},{value:"write",label:"Write",description:"Acknowledge, resolve, and manage Better Stack incidents."}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Better Stack / Better Uptime monitors, heartbeats, or status pages","BETTERSTACK_* or LOGTAIL_* environment variables, or Logtail/Better Stack log drains","README/docs naming Better Stack for uptime monitoring, incidents, or log management"],helpText:"Browse Better Stack incidents, monitors, and log sources, build telemetry queries to investigate production issues, and acknowledge, resolve, and manage incidents."})});var Gce;var Hce=h(()=>{_t();de();Gce=U({id:"braintrust",label:"Braintrust",iconKey:"braintrust",defaultServerUrl:"https://api.braintrust.dev/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["braintrust or autoevals packages, or BRAINTRUST_API_KEY environment variables","Braintrust eval/logging/tracing usage in code or CI (e.g. braintrust eval)","README/docs naming Braintrust for LLM evals, prompt/experiment tracking, or observability"],helpText:"Query Braintrust experiments, datasets, prompts, and logs using a Braintrust API key.",setupGroups:[{id:"api-key",title:"Create a Braintrust API key",description:"Generate the Braintrust API key the hosted MCP server will use.",body:"In Braintrust, go to **Settings > API keys** (https://www.braintrust.dev/app/settings/api-keys) and create an API key. Copy the generated key.",fieldKeys:["apiKey"]},{id:"data-plane",title:"Choose your Braintrust data plane",description:"Pick the region where your Braintrust data lives so Sazabi connects to the matching endpoint.",body:"Select **US** (`https://api.braintrust.dev/mcp`) or **EU** (`https://api-eu.braintrust.dev/mcp`) to match where your Braintrust data lives.",fieldKeys:["dataPlane"]}],validateCredentials:Jae,normalizeHeaders:Wae})});var qce;var Vce=h(()=>{de();qce=U({id:"calendly",label:"Calendly",iconKey:"calendly",defaultServerUrl:"https://mcp.calendly.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"calendly",callbackPathSegment:"calendly",authorizationUrl:"https://calendly.com/oauth/authorize",tokenUrl:"https://calendly.com/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://calendly.com/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["calendly.com scheduling links or Calendly webhook handlers","CALENDLY_* environment variables or API integrations","README/docs naming Calendly for customer calls, interviews, or demos"],helpText:"Check availability, create scheduling links, and manage meetings in Calendly."})});var Kce;var Yce=h(()=>{_t();de();Kce=U({id:"cekura",label:"Cekura",iconKey:"cekura",defaultServerUrl:"https://api.cekura.ai/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",evidenceHints:["Cekura workflow tests, monitor configs, or CEKURA_* environment variables","Agent evaluation or production monitor docs naming Cekura","Synthetic user-flow tests for AI agents"],helpText:"Test, monitor, and evaluate AI agent workflows with Cekura.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the API key Sazabi will send to Cekura's hosted MCP endpoint.",body:"In the Cekura dashboard, open **Settings > API Keys** and create or copy a project-scoped [API key](https://dashboard.cekura.ai/settings/org/api-key), then paste it below.",fieldKeys:["apiKey"]}],validateCredentials:Cce})});var Wce;var Jce=h(()=>{de();Wce=U({id:"checkly",label:"Checkly MCP",iconKey:"checkly",defaultServerUrl:"https://api.checklyhq.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"checkly",callbackPathSegment:"checkly"},getAvailableScopes:async()=>[{value:"checkly:account:read"},{value:"checkly:account:invite"},{value:"checkly:checks:read"},{value:"checkly:checks:run"},{value:"checkly:incidents:read"},{value:"checkly:incidents:write"},{value:"checkly:environment-variables:read"},{value:"checkly:environment-variables:write"},{value:"checkly:status-pages:read"},{value:"checkly:rca:read"},{value:"checkly:rca:run"},{value:"checkly:test-sessions:read"},{value:"checkly:assets:read"}],scopesUserSelectable:!1,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["checkly.config.ts/js, __checks__ directories, @checkly/cli, or CHECKLY_* environment variables","README/docs naming Checkly for synthetic monitoring, API checks, or browser checks","Runbooks that inspect Checkly check results, test sessions, RCA, status pages, or incidents"],helpText:"Query Checkly synthetic monitoring (checks, check results, test sessions, RCA, status pages, and incidents) over Checkly's official OAuth MCP server. Disabled until Sazabi has a Checkly-approved OAuth client, because Checkly rejects Dynamic Client Registration."})});var Zce;var Xce=h(()=>{de();Zce=U({id:"circleback",label:"Circleback",iconKey:"circleback",defaultServerUrl:"https://circleback.ai/api/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"circleback",callbackPathSegment:"circleback",authorizationUrl:"https://circleback.ai/api/oauth/authorize",tokenUrl:"https://circleback.ai/api/oauth/access-token",dynamicClientRegistration:{registrationEndpoint:"https://circleback.ai/api/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["circleback.ai meeting links, Circleback notes exports, or CIRCLEBACK_* environment variables","Incident, customer-call, or product-feedback docs naming Circleback","Operational runbooks that refer to meeting notes or transcripts in Circleback"],helpText:"Search your Circleback meeting notes, transcripts, and action items."})});var ele;var tle=h(()=>{de();ele=U({id:"clay",label:"Clay",iconKey:"clay",defaultServerUrl:"https://mcp.clay.earth/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"clay",callbackPathSegment:"clay",authorizationUrl:"https://mcp.clay.earth/authorize",tokenUrl:"https://mcp.clay.earth/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.clay.earth/register",tokenEndpointAuthMethod:"client_secret_post"}},getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"read",label:"Read access",description:"Read Clay contacts, interactions, notes, and workspace workflows."},{value:"write",label:"Write access",description:"Create and update Clay records and workspace workflows."}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Clay workflow URLs, clay.earth links, or CLAY_* environment variables","Outbound enrichment, lead routing, or contact workflow docs naming Clay","Code or scripts that sync contacts, notes, or workspace workflows with Clay"],helpText:"Search Clay contacts, interactions, notes, and workspace workflows, and create or update records and workflows."})});var nle;var ole=h(()=>{de();nle=U({id:"clerk",label:"Clerk",iconKey:"clerk",defaultServerUrl:"https://mcp.clerk.com/mcp",transport:"streamable-http",authMode:"none",availability:"enabled",capabilityOverrides:{readOnlyToolNames:["list_clerk_sdk_snippets","clerk_sdk_snippet"]},evidenceHints:["@clerk/* SDK imports, CLERK_SECRET_KEY / CLERK_PUBLISHABLE_KEY environment variables, or clerk.com URLs","Authentication, session, or organization/user management logic built on Clerk","README/docs naming Clerk for auth, sign-in flows, or user management"],helpText:"Search Clerk's public documentation and SDK implementation snippets via Clerk's hosted MCP server."})});var rle;var ile=h(()=>{de();rle=U({id:"cloudflare",label:"Cloudflare",iconKey:"cloudflare",defaultServerUrl:"https://mcp.cloudflare.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"cloudflare",callbackPathSegment:"cloudflare",authorizationUrl:"https://mcp.cloudflare.com/authorize",tokenUrl:"https://mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,regions:[{label:"Cloudflare API (all products, account-scoped)",serverUrl:"https://mcp.cloudflare.com/mcp"},{label:"Observability (Workers logs & analytics)",serverUrl:"https://observability.mcp.cloudflare.com/mcp",authorizationUrl:"https://observability.mcp.cloudflare.com/oauth/authorize",tokenUrl:"https://observability.mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://observability.mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}},{label:"Workers Bindings (D1, R2, KV, Workers)",serverUrl:"https://bindings.mcp.cloudflare.com/mcp",authorizationUrl:"https://bindings.mcp.cloudflare.com/oauth/authorize",tokenUrl:"https://bindings.mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://bindings.mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}},{label:"Workers Builds (CI/CD builds)",serverUrl:"https://builds.mcp.cloudflare.com/mcp",authorizationUrl:"https://builds.mcp.cloudflare.com/oauth/authorize",tokenUrl:"https://builds.mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://builds.mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}},{label:"Radar (Internet traffic insights)",serverUrl:"https://radar.mcp.cloudflare.com/mcp",authorizationUrl:"https://radar.mcp.cloudflare.com/oauth/authorize",tokenUrl:"https://radar.mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://radar.mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}}],capabilityOverrides:{allowWriteTools:!0},evidenceHints:["wrangler.toml / wrangler.jsonc, @cloudflare/* packages, or CLOUDFLARE_* environment variables","Cloudflare Workers, Pages, R2, D1, KV, or Durable Objects usage in code or config","README/runbooks naming Cloudflare as the CDN, edge, or Workers platform"],helpText:"By default, use Cloudflare's unified all-products API server (mcp.cloudflare.com), scoped by your account's permissions. Optionally pick a per-product server for observability logs and analytics, bindings (D1, R2, KV), builds, or Radar insights."})});var sle;var ale=h(()=>{_t();de();sle=U({id:"cloudflare-api-token",label:"Cloudflare (API token)",iconKey:"cloudflare",defaultServerUrl:"https://mcp.cloudflare.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["wrangler.toml / wrangler.jsonc, @cloudflare/* packages, or CLOUDFLARE_* environment variables","Cloudflare Workers, Pages, R2, D1, KV, or Durable Objects usage in code or config","README/runbooks naming Cloudflare as the CDN, edge, or Workers platform"],helpText:"Query the Cloudflare API MCP server (Workers, DNS, zones, and more) using a Cloudflare API token instead of OAuth.",setupGroups:[{id:"api-token",title:"Create a Cloudflare API token",description:"Mint an API token scoped to exactly the products and permissions Sazabi should access.",body:"In the Cloudflare dashboard, go to **My Profile > API Tokens > Create Token**, then **Create Custom Token**. Under **Permissions**, add read access for the products you want the agent to use — for example **Account > Workers Observability > Read**, **Zone > DNS > Read**, and **Account > Account Settings > Read** — then copy the generated `cfut_...` token. Tokens with **Client IP Address Filtering** enabled are not supported by the hosted MCP server.",fieldKeys:["apiToken"]}],validateCredentials:Hae,normalizeHeaders:Gae})});var cle;var lle=h(()=>{_t();de();cle=U({id:"composio",label:"Composio",iconKey:"composio",defaultServerUrl:"https://connect.composio.dev/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Composio MCP, COMPOSIO_API_KEY, or Composio SDK usage","connect.composio.dev/mcp in MCP client configuration","README/docs naming Composio integrations, toolkits, or connected apps"],helpText:"Use tools from the Composio toolkits you have connected, through Composio's hosted Connect MCP server with a Composio API key.",setupGroups:[{id:"connect-toolkits",title:"Connect the toolkits you want to use",description:"Composio's MCP server only exposes tools for the apps you have connected in Composio.",body:"In the [Composio dashboard](https://dashboard.composio.dev), connect the apps (toolkits) you want the agent to use. Composio can also prompt to connect apps on demand at runtime, but connecting them first makes those tools available right away."},{id:"api-key",title:"Create an API key",description:"Create or copy the Composio API key Sazabi will send to Composio's hosted MCP endpoint.",body:"In the [Composio dashboard](https://dashboard.composio.dev), open **Settings > Project Settings** and copy your project API key from the **API Keys** section (or use the AI Clients page). Paste it below. Sazabi stores it securely and sends it as the `x-consumer-api-key` header to Composio's Connect MCP endpoint.",fieldKeys:["apiKey"]}],validateCredentials:ace,normalizeHeaders:sce})});var ule;var dle=h(()=>{_t();de();ule=U({id:"context-dev",label:"Context.dev",iconKey:"context-dev",defaultServerUrl:"https://context-dev.stlmcp.com",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Context.dev SDK usage (context.dev on npm/PyPI/RubyGems), CONTEXT_DEV_API_KEY environment variables, or ctxt_secret_ API keys","context.dev-mcp usage or a context-dev.stlmcp.com server URL in MCP client config","README/docs naming Context.dev for brand intelligence, web scraping/crawling, or website change monitors"],helpText:"Resolve brand data, scrape and crawl websites into LLM-ready Markdown, extract structured data, and manage website-change monitors with Context.dev's hosted MCP server using your Context.dev API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Context.dev API key Sazabi will send to Context.dev's hosted MCP endpoint.",body:"Create or copy an API key (`ctxt_secret_...`) from your [Context.dev dashboard](https://context.dev), then paste it below. Sazabi stores it securely and sends it as the `x-context-dev-api-key` header to Context.dev's MCP endpoint.",fieldKeys:["apiKey"]}],validateCredentials:dce,normalizeHeaders:uce,skill:"context-dev",setupSkill:"context-dev-setup"})});var ple;var gle=h(()=>{_t();de();ple=U({id:"datadog",label:"Datadog",iconKey:"datadog",defaultServerUrl:"https://mcp.datadoghq.com/api/unstable/mcp-server/mcp?toolsets=core",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Datadog config, DD_* environment variables, or @datadog packages","datadog-agent, dd-trace, monitors, dashboards, or incident docs","README/docs naming Datadog for logs, metrics, traces, APM, or incidents"],helpText:"Browse Datadog metrics, logs, traces, and incidents using your Datadog site URL, API key, and Application Key.",setupGroups:[{id:"site",title:"Find your Datadog site",description:"Use the Datadog site URL for the region where your account lives.",body:"Copy the Datadog site URL from the top of your browser, such as `https://app.datadoghq.com` or `https://us3.datadoghq.com`. Sazabi uses this to build the matching hosted MCP endpoint.",fieldKeys:["siteUrl"]},{id:"keys",title:"Create API credentials",description:"Create or copy the two Datadog keys Sazabi needs for hosted MCP.",imageKeys:["mcp.datadog.api-keys-settings","mcp.datadog.application-keys-settings"],body:"In Datadog, go to **Organization Settings > Access > API Keys** to create or copy your API key. Then go to **Organization Settings > Access > Application Keys** to create or copy your Application Key. Note: an Application Key inherits the permissions of the user who creates it, so create it as a least-privilege user or scope the key down to only what the agent needs.",fieldKeys:["apiKey","applicationKey"]}],validateCredentials:$ae,normalizeHeaders:Uae})});var mle;var hle=h(()=>{de();mle=U({id:"deepwiki",label:"DeepWiki",iconKey:"deepwiki",defaultServerUrl:"https://mcp.deepwiki.com/mcp",transport:"streamable-http",authMode:"none",availability:"enabled",capabilityOverrides:{readOnlyToolNames:["read_wiki_structure","read_wiki_contents","ask_question"]},evidenceHints:["Questions about how a public GitHub repository or open-source dependency works","deepwiki.com URLs or references to DeepWiki-generated documentation","Investigations needing up-to-date docs/architecture for a third-party OSS project"],helpText:"Query public GitHub repository documentation and ask questions about open-source code via DeepWiki's hosted MCP server."})});var Ale;var fle=h(()=>{_t();de();Ale=U({id:"elastic-cloud",label:"Elastic Cloud",iconKey:"elastic-cloud",defaultServerUrl:null,serverUrlHostnameSuffixes:[".elastic.cloud",".cloud.es.io",".elastic-cloud.com"],transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Elasticsearch, Kibana, Elastic Agent, Beats, or Logstash config","ELASTIC_* environment variables or elasticsearch client packages","README/docs naming Elastic Cloud, Elasticsearch, or Kibana"],helpText:"Search Elasticsearch indices and query Elastic Agent Builder tools using your Kibana MCP endpoint and an Elastic API key.",setupGroups:[{id:"deployment",title:"Open Kibana",description:"Find the Kibana URL for the Elastic deployment you want to connect.",body:"Go to [Elastic Cloud deployments](https://cloud.elastic.co/deployments), open the deployment you want to connect, then open Kibana and copy the Kibana base URL from the browser. If your Kibana URL contains `/s/<space>/`, keep that space value for the connect step.",fieldKeys:["kibanaUrl","kibanaSpace"]},{id:"api-key",title:"Create an API key",description:"Create the Elastic API key that the hosted MCP server will use.",body:"In Kibana, go to **Stack Management > API keys** and choose **Create API key**. Restrict its privileges to the Agent Builder MCP server: the `feature_agentBuilder.read` and `feature_actions.read` Kibana privileges, plus read access to the indices your tools query. Copy the generated key.",fieldKeys:["apiKey"]}],validateCredentials:Fae,normalizeHeaders:jae})});var yle;var ble=h(()=>{_t();de();yle=U({id:"exa",label:"Exa",iconKey:"exa",defaultServerUrl:"https://mcp.exa.ai/mcp?tools=web_search_exa,web_fetch_exa,web_search_advanced_exa,agent_tools",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Exa search, EXA_API_KEY environment variables, or the exa-js / exa-py SDK","exa-mcp-server usage or a mcp.exa.ai server URL in MCP client config","README/docs naming Exa for web search, crawling, or research"],helpText:"Search the web, research companies, crawl pages, and run deep research with Exa's hosted MCP server using your Exa API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Exa API key Sazabi will send to Exa's hosted MCP endpoint.",body:"Create or copy an API key from the [Exa dashboard](https://dashboard.exa.ai/api-keys), then paste it below. Sazabi stores it securely and sends it as the `x-api-key` header to Exa's MCP endpoint.",fieldKeys:["apiKey"]}],validateCredentials:ice,normalizeHeaders:rce,skill:"exa",setupSkill:"exa-setup"})});var Ile;var Sle=h(()=>{_t();de();Ile=U({id:"gcp",label:"Google Cloud (GCP)",iconKey:"gcp",defaultServerUrl:"https://logging.googleapis.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["GOOGLE_APPLICATION_CREDENTIALS, GCLOUD_PROJECT, or GOOGLE_CLOUD_PROJECT environment variables","gcloud config, app.yaml, cloudbuild.yaml, or @google-cloud/* packages","README/docs naming Google Cloud, GCP, Cloud Logging, Cloud Monitoring, BigQuery, Cloud Run, or GKE"],helpText:"Query Google Cloud (Cloud Logging, Monitoring, BigQuery, and more) using a Google OAuth 2.0 Bearer access token.",setupGroups:[{id:"server-url",title:"Choose the Google Cloud MCP endpoint",description:"Google exposes a separate remote MCP server per product at https://SERVICE.googleapis.com/mcp.",body:"Sazabi defaults to Cloud Logging (`https://logging.googleapis.com/mcp`). To use a different product, replace the server URL with its endpoint, such as `https://monitoring.googleapis.com/mcp` (Cloud Monitoring) or `https://bigquery.googleapis.com/mcp` (BigQuery). See the [supported products list](https://docs.cloud.google.com/mcp/supported-products)."},{id:"access-token",title:"Create a Google OAuth 2.0 access token",description:"Generate a Google access token scoped by IAM to the resources Sazabi should read.",body:"The hosted servers authenticate with a Google OAuth 2.0 Bearer access token. For a non-interactive token, install the [gcloud CLI](https://docs.cloud.google.com/mcp/authenticate-mcp), configure Application Default Credentials (a user login, service-account key, or impersonation), then run `gcloud auth application-default print-access-token` and copy the token. Paste the raw token into Sazabi — Sazabi adds the `Bearer ` prefix and sends it in the `Authorization` header. Google access tokens are short-lived, so refresh the token when it expires.",fieldKeys:["accessToken"]}],validateCredentials:Sce,normalizeHeaders:Ice})});var Cle;var vle=h(()=>{de();Cle=U({id:"google-drive",label:"Google Drive",iconKey:"google-drive",defaultServerUrl:"https://drivemcp.googleapis.com/mcp/v1",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"google-drive",callbackPathSegment:"google-drive",authorizationUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",authorizationUrlParams:{access_type:"offline",prompt:"consent"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"https://www.googleapis.com/auth/drive.readonly",label:"Drive read",description:"Read files and metadata in the user's Google Drive through the hosted MCP server."}],setupGroups:[{id:"google-cloud-oauth-client",title:"Create an OAuth client in Google Cloud",description:"The Google Drive MCP server does not support automatic client registration. An admin must create an OAuth client in a Google Cloud project and provide its credentials to Sazabi.",body:["1. In the Google Cloud console, open **APIs & Services → OAuth consent screen** and configure the consent screen with the Drive scopes.","2. Under **APIs & Services → Credentials**, create an **OAuth client ID** of type **Web application**.","3. Add the Sazabi Google Drive MCP callback URL shown on this page as an **Authorized redirect URI**.","4. Enable both the **Google Drive API** and the **Google Drive MCP API** (`drivemcp.googleapis.com`) for the project. Both are required for the hosted MCP server to be reachable.","5. Provide the generated **Client ID** and **Client Secret** to your Sazabi deployment configuration."].join(`
|
|
8910
8910
|
`)}],evidenceHints:["drive.google.com / docs.google.com links, or Google Drive file IDs in runbooks","googleapis / google-auth-library packages, or GOOGLE_* / GDRIVE_* environment variables","README/runbooks naming Google Drive as a document or asset store"],helpText:"Search and read files and metadata in a Google Drive through Google's hosted MCP server. Coming soon — requires a Sazabi-provisioned Google OAuth client and isn't self-serve connectable yet."})});var wle;var Ele=h(()=>{de();wle=U({id:"grafana",label:"Grafana Cloud",iconKey:"grafana",defaultServerUrl:"https://mcp.grafana.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"grafana",callbackPathSegment:"grafana",authorizationUrl:"https://mcp.grafana.com/mcp/oauth/authorize",tokenUrl:"https://mcp.grafana.com/mcp/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.grafana.com/mcp/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"grafana:read",label:"Read",description:"Read Grafana dashboards, panels, metrics, logs, traces, alerts, and incidents."},{value:"grafana:write",label:"Write",description:"Create and modify Grafana resources. Write tools require explicit approval per your organization's tool policy."}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["grafana.net / grafana.com links, Grafana dashboards, or GRAFANA_* environment variables","Prometheus, Loki, Tempo, or Mimir data sources wired into Grafana","README/runbooks naming Grafana for dashboards, metrics, logs, traces, or alerts"],helpText:"Browse Grafana dashboards, metrics, logs, traces, and alerts across your Grafana Cloud stack."})});var kle;var xle=h(()=>{de();kle=U({id:"granola",label:"Granola",iconKey:"granola",defaultServerUrl:"https://mcp.granola.ai/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"granola",callbackPathSegment:"granola",authorizationUrl:"https://mcp-auth.granola.ai/oauth2/authorize",tokenUrl:"https://mcp-auth.granola.ai/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp-auth.granola.ai/oauth2/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"offline_access",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["granola.ai meeting links, Granola notes exports, or GRANOLA_* environment variables","Incident, customer-call, or product-feedback docs naming Granola","Operational runbooks that refer to meeting notes or transcripts in Granola"],helpText:"Search and browse Granola meeting notes, transcripts, and folders."})});var Ple;var Rle=h(()=>{de();Ple=U({id:"happenstance",label:"Happenstance",iconKey:"happenstance",defaultServerUrl:"https://happenstance.ai/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"happenstance",callbackPathSegment:"happenstance",authorizationUrl:"https://happenstance.ai/oauth/authorize",tokenUrl:"https://clerk.happenstance.ai/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://clerk.happenstance.ai/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"profile",label:"Profile",description:"Read your Happenstance profile."},{value:"email",label:"Email",description:"Read the email associated with your Happenstance account."},{value:"offline_access",label:"Offline access",description:"Keep the connection alive by refreshing access without re-authentication."}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["happenstance.ai links or references to a Happenstance network/graph","HAPPENSTANCE_* environment variables or scripts calling Happenstance APIs","Docs naming Happenstance as the people/relationship search tool"],helpText:"Search your Happenstance network to find and get introduced to people."})});var Tle;var Ble=h(()=>{de();Tle=U({id:"herd",label:"Herd",iconKey:"herd",defaultServerUrl:"https://mcp.herd.eco/v1",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"herd",callbackPathSegment:"herd",authorizationUrl:"https://mcp.herd.eco/api/auth/oauth2/authorize",tokenUrl:"https://mcp.herd.eco/api/auth/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.herd.eco/api/auth/oauth2/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"offline_access",required:!0},{value:"profile"},{value:"email"}],scopesUserSelectable:!1,capabilityOverrides:{allowWriteTools:!0},helpText:"Analyze contracts, transactions, wallets, and on-chain activity."})});var Ole;var _le=h(()=>{de();Ole=U({id:"honeycomb",label:"Honeycomb",iconKey:"honeycomb",defaultServerUrl:"https://mcp.honeycomb.io/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"honeycomb",callbackPathSegment:"honeycomb",authorizationUrl:"https://ui.honeycomb.io/oauth/authorize",tokenUrl:"https://ui.honeycomb.io/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://ui.honeycomb.io/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"mcp:read",label:"Read",description:"Query Honeycomb environments, datasets, columns, boards, triggers, SLOs, and run queries."},{value:"mcp:write",label:"Write",description:"Create and update Honeycomb boards, triggers, and other resources."}],scopesUserSelectable:!1,regions:[{label:"United States (US)",serverUrl:"https://mcp.honeycomb.io/mcp"},{label:"Europe (EU)",serverUrl:"https://mcp.eu1.honeycomb.io/mcp",authorizationUrl:"https://ui.eu1.honeycomb.io/oauth/authorize",tokenUrl:"https://ui.eu1.honeycomb.io/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://ui.eu1.honeycomb.io/oauth/register",tokenEndpointAuthMethod:"none"}}],capabilityOverrides:{allowWriteTools:!0},evidenceHints:["honeycomb.io URLs, HONEYCOMB_API_KEY / HONEYCOMB_DATASET environment variables, or honeycomb:// dataset URIs","libhoney, @honeycombio packages, or OpenTelemetry exporters pointed at api.honeycomb.io / api.eu1.honeycomb.io","README/runbooks naming Honeycomb as the observability or tracing provider"],helpText:"Query Honeycomb environments, datasets, columns, boards, and triggers, run queries, and create or update boards and triggers. Choose the US or EU region when connecting."})});var Dle;var Lle=h(()=>{de();Dle=U({id:"incident-io",label:"incident.io",iconKey:"incident-io",defaultServerUrl:"https://mcp.incident.io/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"incident-io",callbackPathSegment:"incident-io",authorizationUrl:"https://app.incident.io/auth/plugin/authorize",tokenUrl:"https://app.incident.io/auth/plugin/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.incident.io/mcp/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["incident.io alert-source URLs, escalation docs, or incident IDs","INCIDENT_IO_* environment variables or webhooks into incident.io","README/runbooks naming incident.io for incidents, alerts, or on-call"],helpText:"Browse incidents, alerts, and on-call.",skill:"incident-io",setupSkill:"incident-io-setup"})});var Qle;var Nle=h(()=>{_t();de();Qle=U({id:"intercom",label:"Intercom",iconKey:"intercom",defaultServerUrl:"https://mcp.intercom.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Intercom config, INTERCOM_* environment variables, or intercom-client packages","Support inbox, conversations, help center, or customer messaging docs naming Intercom","README/docs naming Intercom for support threads or customer conversations"],helpText:"Read Intercom support conversations, contacts, and help center content using an Intercom API access token. US-hosted Intercom workspaces only.",setupGroups:[{id:"developer-app",title:"Open Intercom developer settings",description:"Use an Intercom app with an access token for the workspace you want to connect.",body:"In Intercom, go to **Settings > Integrations > Developer Hub**, open (or create) an app for your workspace, and confirm it has the permissions you want agents to use. The hosted MCP server lives at `https://mcp.intercom.com/mcp` and currently supports US-hosted Intercom workspaces only."},{id:"access-token",title:"Copy your access token",description:"Copy the Intercom API access token the hosted MCP server will use.",body:"From your Intercom app's **Authentication** section, copy the access token. Paste the raw token into Sazabi — Sazabi adds the `Bearer ` prefix and sends it in the `Authorization` header.",fieldKeys:["accessToken"]}],validateCredentials:Xae,normalizeHeaders:Zae})});var Mle;var zle=h(()=>{_t();de();Mle=U({id:"langfuse",label:"Langfuse",iconKey:"langfuse",defaultServerUrl:"https://us.cloud.langfuse.com/api/public/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",regions:[{label:"United States (US)",serverUrl:"https://us.cloud.langfuse.com/api/public/mcp"},{label:"Europe (EU)",serverUrl:"https://cloud.langfuse.com/api/public/mcp"},{label:"Asia Pacific (JP)",serverUrl:"https://jp.cloud.langfuse.com/api/public/mcp"}],capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Langfuse SDK usage (langfuse, langfuse-langchain) or @langfuse packages","LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY / LANGFUSE_HOST environment variables","README/docs naming Langfuse as the LLM tracing, evaluation, or observability provider"],helpText:"Query Langfuse traces, observations, metrics, scores, comments, and prompts using project API keys.",setupGroups:[{id:"region",title:"Pick your Langfuse Cloud region",description:"Select the Langfuse Cloud region that hosts your project (or use the custom connector for a self-hosted deployment).",body:"Langfuse Cloud is region-scoped: US (`https://us.cloud.langfuse.com`), EU (`https://cloud.langfuse.com`), or JP (`https://jp.cloud.langfuse.com`). Choose the region matching your Langfuse account; the hosted MCP server lives at `/api/public/mcp` on that host."},{id:"api-keys",title:"Create project API keys",description:"Generate the Langfuse project API key pair the hosted MCP server will use.",body:"In Langfuse, open **Project settings → API keys** and create a new key pair. Copy the Public key (`pk-lf-...`) and Secret key (`sk-lf-...`). Sazabi combines them into an HTTP Basic `Authorization` header (`Basic base64(publicKey:secretKey)`) and sends it to the MCP server. Paste the combined `Authorization` value into Sazabi.",fieldKeys:["authorization"]}],validateCredentials:hce,normalizeHeaders:gce})});var jle;var Ule=h(()=>{de();jle=U({id:"langsmith",label:"LangSmith",iconKey:"langsmith",defaultServerUrl:"https://api.smith.langchain.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"langsmith",callbackPathSegment:"langsmith",authorizationUrl:"https://api.smith.langchain.com/oauth/authorize",tokenUrl:"https://api.smith.langchain.com/oauth/token",resourceUrl:"https://api.smith.langchain.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://api.smith.langchain.com/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,regions:[{label:"GCP United States (US)",serverUrl:"https://api.smith.langchain.com/mcp"},{label:"GCP Europe (EU)",serverUrl:"https://eu.api.smith.langchain.com/mcp",authorizationUrl:"https://eu.api.smith.langchain.com/oauth/authorize",tokenUrl:"https://eu.api.smith.langchain.com/oauth/token",resourceUrl:"https://eu.api.smith.langchain.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://eu.api.smith.langchain.com/oauth/register",tokenEndpointAuthMethod:"none"}},{label:"GCP Asia Pacific (APAC)",serverUrl:"https://apac.api.smith.langchain.com/mcp",authorizationUrl:"https://apac.api.smith.langchain.com/oauth/authorize",tokenUrl:"https://apac.api.smith.langchain.com/oauth/token",resourceUrl:"https://apac.api.smith.langchain.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://apac.api.smith.langchain.com/oauth/register",tokenEndpointAuthMethod:"none"}},{label:"AWS United States (US)",serverUrl:"https://aws.api.smith.langchain.com/mcp",authorizationUrl:"https://aws.api.smith.langchain.com/oauth/authorize",tokenUrl:"https://aws.api.smith.langchain.com/oauth/token",resourceUrl:"https://aws.api.smith.langchain.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://aws.api.smith.langchain.com/oauth/register",tokenEndpointAuthMethod:"none"}}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["LANGSMITH_* or LANGCHAIN_* environment variables, or langsmith SDK usage","LangSmith tracing projects, runs, datasets, or evaluations","README/docs naming LangSmith for LLM tracing, evals, or observability"],helpText:"Query LangSmith tracing projects, runs, datasets, and evaluations to investigate LLM application behavior. Choose the region where your LangSmith organization lives when connecting."})});var Fle;var $le=h(()=>{de();Fle=U({id:"linear",label:"Linear",iconKey:"linear",defaultServerUrl:"https://mcp.linear.app/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"linear",callbackPathSegment:"linear",authorizationUrl:"https://mcp.linear.app/authorize",tokenUrl:"https://mcp.linear.app/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.linear.app/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"read",label:"Read",description:"Read Linear issues, projects, teams, comments, and related data."},{value:"write",label:"Write",description:"Create and update Linear issues, comments, and project data."}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},skill:"linear",setupSkill:"linear-setup",evidenceHints:["linear.app URLs, Linear issue keys, or team/project IDs in docs","LINEAR_* environment variables or scripts that call Linear APIs","README/runbooks naming Linear as the issue tracker or planning system"],helpText:"Browse and search Linear issues and projects, and create or update issues, comments, and project data."})});var Gle;var Hle=h(()=>{de();Gle=U({id:"logfire",label:"Pydantic Logfire",iconKey:"logfire",defaultServerUrl:"https://logfire-us.pydantic.dev/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"logfire",callbackPathSegment:"logfire",authorizationUrl:"https://logfire-us.pydantic.dev/api/oauth/authorize",tokenUrl:"https://logfire-us.pydantic.dev/api/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://logfire-us.pydantic.dev/api/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"organization:read_channel"},{value:"project:read"},{value:"project:read_alert"},{value:"project:read_dashboard"},{value:"project:read_variables"}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Pydantic Logfire config, LOGFIRE_* environment variables, or logfire SDK packages","Python/Pydantic observability docs naming Logfire","Alerts, dashboards, or traces hosted in Logfire"],helpText:"Query Pydantic Logfire traces, metrics, and exceptions, and browse projects, alerts, and dashboards. Hosted on Logfire's US region (logfire-us.pydantic.dev)."})});var qle;var Vle=h(()=>{de();qle=U({id:"mercury",label:"Mercury",iconKey:"mercury",defaultServerUrl:"https://mcp.mercury.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"mercury",callbackPathSegment:"mercury",authorizationUrl:"https://mcp.mercury.com/authorize",tokenUrl:"https://mcp.mercury.com/token",resourceUrl:"https://mcp.mercury.com/mcp",omitScopeFromAuthorizationUrl:!0,dynamicClientRegistration:{registrationEndpoint:"https://mcp.mercury.com/register",tokenEndpointAuthMethod:"client_secret_basic",includeScopesInRegistration:!0}},getAvailableScopes:async()=>[{value:"read",label:"Read access",description:"Read Mercury accounts, cards, recipients, transactions, treasury, and organization data."},{value:"offline_access",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!1},skill:"mercury",setupSkill:"mercury-setup",evidenceHints:["Mercury dashboard links, mercury.com references, or Mercury API usage","MERCURY_* environment variables or docs mentioning Mercury banking","Treasury, card, account, recipient, or transaction workflows backed by Mercury"],helpText:"Search Mercury banking data including accounts, cards, recipients, transactions, treasury, and organization records. Read-only: this connection cannot move money or change your Mercury account."})});var Kle;var Yle=h(()=>{de();Kle=U({id:"neon",label:"Neon",iconKey:"neon",defaultServerUrl:"https://mcp.neon.tech/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"neon",callbackPathSegment:"neon",authorizationUrl:"https://mcp.neon.tech/api/authorize",tokenUrl:"https://mcp.neon.tech/api/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.neon.tech/api/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"read",label:"Read",description:"Read Neon projects, branches, databases, and run queries."},{value:"write",label:"Write",description:"Create and modify Neon projects, branches, and databases."},{value:"*",label:"Full access",description:"All access - read and manage every Neon resource the connected account can reach."}],getUrlConfiguration:async()=>({docsUrl:"https://neon.com/docs/ai/neon-mcp-server",instructions:"Copy the hosted MCP server URL below. Optional: to narrow access, append ?readonly=true, &projectId=<id>, and/or &category=<groups> (see the Neon MCP docs), then copy the edited URL.",defaultServerUrl:"https://mcp.neon.tech/mcp",optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Neon connection strings, neon.tech hosts, or @neondatabase/serverless packages","DATABASE_URL/POSTGRES_URL values documented as Neon","README/docs naming Neon as the Postgres provider"],helpText:"Manage Neon projects, branches, databases, and run SQL queries."})});var Wle;var Jle=h(()=>{de();Wle=U({id:"notion",label:"Notion",iconKey:"notion",defaultServerUrl:"https://mcp.notion.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"notion",callbackPathSegment:"notion",authorizationUrl:"https://mcp.notion.com/authorize",tokenUrl:"https://mcp.notion.com/token",resourceUrl:"https://mcp.notion.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://mcp.notion.com/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"default",label:"Default",description:"Access Notion pages, databases, and workspace content via MCP."}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},skill:"notion",setupSkill:"notion-setup",evidenceHints:["notion.so URLs, Notion page IDs, or database IDs in docs","NOTION_* environment variables or scripts that call Notion APIs","README/runbooks naming Notion as the wiki or knowledge base"],helpText:"Browse and manage Notion pages, databases, and workspace content. During authorization, choose which pages and databases to share with the connection."})});var Zle;var Xle=h(()=>{de();Zle=U({id:"1password",label:"1Password",iconKey:"onepassword",defaultServerUrl:"https://developer.1password.com/get-started/secure-ai-access",transport:"streamable-http",authMode:"none",availability:"disabled",getUrlConfiguration:async()=>null,evidenceHints:["1Password service-account tokens (ops_...), op CLI usage, or OP_SERVICE_ACCOUNT_TOKEN","1password.com / *.1password.com references, or op:// secret references","README/docs naming 1Password as the secrets manager or vault"],helpText:"Access 1Password via its documented secure AI access options. A general-purpose hosted MCP server is not available today; use the 1Password CLI (op) sandbox preset instead."})});var eue;var tue=h(()=>{de();eue=U({id:"paper",label:"Paper MCP",iconKey:"paper",defaultServerUrl:"http://127.0.0.1:29979/mcp",transport:"streamable-http",authMode:"none",availability:"disabled",getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["paper.design URLs, Paper Desktop app references, or PAPER_* environment variables","Design files, component libraries, or design-system docs naming Paper","HTML-to-PDF slide or presentation workflows that reference Paper"],helpText:"Read and write Paper design files, including nodes, selections, text content, and design-system elements. Coming soon — Paper's MCP server runs on desktop localhost and can't be reached by hosted Sazabi agents yet."})});var nue;var oue=h(()=>{de();nue=U({id:"plain",label:"Plain",iconKey:"plain",defaultServerUrl:"https://mcp.plain.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"plain",callbackPathSegment:"plain",authorizationUrl:"https://signin.auth.plain.com/oauth2/authorize",tokenUrl:"https://signin.auth.plain.com/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://signin.auth.plain.com/oauth2/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"offline_access",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["plain.com links, Plain customer/thread IDs, or PLAIN_* environment variables","Support inbox, customer thread, or tenant docs naming Plain","Code or scripts syncing customers, tenants, or support threads with Plain"],helpText:"Search and manage Plain support threads, customers, and tenants.",skill:"plain",setupSkill:"plain-setup"})});var rue;var iue=h(()=>{de();rue=U({id:"planetscale",label:"PlanetScale",iconKey:"planetscale",defaultServerUrl:"https://mcp.pscale.dev/mcp/planetscale",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"planetscale",callbackPathSegment:"planetscale",authorizationUrl:"https://app.planetscale.com/oauth/authorize",tokenUrl:"https://auth.planetscale.com/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://auth.planetscale.com/oauth/registration",tokenEndpointAuthMethod:"client_secret_basic"}},getAvailableScopes:async()=>[{value:"read_databases"},{value:"read_user"},{value:"read_organization"},{value:"write_databases"},{value:"write_organization"}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["PlanetScale connection strings, pscale CLI config, or planetscale.com links","PLANETSCALE_* or DATABASE_URL values documented as PlanetScale","README/docs naming PlanetScale for MySQL, branching, or schema changes"],helpText:"Query PlanetScale databases, inspect schema, and browse Insights data.",skill:"planetscale",setupSkill:"planetscale-setup"})});var sue;var aue=h(()=>{de();sue=U({id:"posthog",label:"PostHog",iconKey:"posthog",defaultServerUrl:"https://mcp.posthog.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"posthog",callbackPathSegment:"posthog",authorizationUrl:"https://oauth.posthog.com/oauth/authorize/",tokenUrl:"https://oauth.posthog.com/oauth/token/",dynamicClientRegistration:{registrationEndpoint:"https://oauth.posthog.com/oauth/register/",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"query:read"},{value:"insight:read"},{value:"insight:write"},{value:"feature_flag:read"},{value:"feature_flag:write"},{value:"experiment:read"},{value:"experiment:write"},{value:"dashboard:read"},{value:"dashboard:write"},{value:"event_definition:read"},{value:"event_definition:write"},{value:"person:read"},{value:"user:read",required:!0},{value:"user:write"},{value:"organization:read",required:!0},{value:"project:read",required:!0},{value:"project:write"},{value:"survey:read"},{value:"survey:write"},{value:"error_tracking:read"},{value:"logs:read"},{value:"tracing:read"},{value:"error_tracking:write"},{value:"session_recording:read"},{value:"session_recording_playlist:read"},{value:"alert:read"},{value:"activity_log:read"},{value:"annotation:read"},{value:"cohort:read"},{value:"hog_function:read"}],getUrlConfiguration:async()=>({docsUrl:"https://posthog.com/docs/model-context-protocol/faq",instructions:"Copy the hosted MCP server URL below. Optional: to expose only some tools, append ?features=<groups> or ?tools=<names> (see the PostHog MCP docs), then copy the edited URL.",defaultServerUrl:"https://mcp.posthog.com/mcp",optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["posthog-js, posthog-node, POSTHOG_* or NEXT_PUBLIC_POSTHOG_* environment variables","Feature flag, experiment, session replay, or product analytics code using PostHog","README/docs naming PostHog for analytics, flags, experiments, logs, or tracing"],helpText:"Query PostHog analytics, feature flags, and experiments.",skill:"posthog",setupSkill:"posthog-setup"})});var cue;var lue=h(()=>{de();cue=U({id:"pylon",label:"Pylon",iconKey:"pylon",defaultServerUrl:"https://mcp.usepylon.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"pylon",callbackPathSegment:"pylon",authorizationUrl:"https://o.auth.usepylon.com/oauth2/authorize",tokenUrl:"https://o.auth.usepylon.com/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://o.auth.usepylon.com/oauth2/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"offline_access",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["usepylon.com links, Pylon issue/account IDs, or PYLON_* environment variables","Customer support workflows or account runbooks naming Pylon","Code or scripts syncing support issues, accounts, or contacts with Pylon"],helpText:"Search and manage Pylon support issues, accounts, and contacts.",skill:"pylon",setupSkill:"pylon-setup"})});var uue;var due=h(()=>{de();uue=U({id:"railway",label:"Railway",iconKey:"railway",defaultServerUrl:"https://mcp.railway.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"railway",callbackPathSegment:"railway",authorizationUrl:"https://backboard.railway.com/oauth/auth",tokenUrl:"https://backboard.railway.com/oauth/token",resourceUrl:"https://mcp.railway.com",dynamicClientRegistration:{registrationEndpoint:"https://backboard.railway.com/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"profile",required:!0},{value:"email",required:!0},{value:"offline_access",required:!0},{value:"workspace:member",label:"Workspace access",description:"Read and manage Railway projects, services, deployments, variables, and logs in the workspaces the connected account belongs to."}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},skill:"railway",setupSkill:"railway-setup",evidenceHints:["railway.app / railway.com links, RAILWAY_* environment variables, or a railway.json/railway.toml in the repo","Deploy workflows or runbooks naming Railway as the hosting/PaaS provider","Railway project/service/environment IDs referenced in docs or CI"],helpText:"Manage Railway projects, services, deployments, variables, and logs."})});var pue;var gue=h(()=>{_t();de();pue=U({id:"render",label:"Render",iconKey:"render",defaultServerUrl:"https://mcp.render.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["render.com links, RENDER_* environment variables, or a render.yaml in the repo","Deploy workflows or runbooks naming Render as the hosting/PaaS provider","Render service/deploy IDs referenced in docs or CI"],helpText:"Manage Render services, deploys, environment variables, logs, and metrics.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Render API key Sazabi will send to Render's hosted MCP endpoint.",body:"Create a Render [API key](https://dashboard.render.com/settings/api-keys) in **Account Settings > API Keys**, then paste it below. Note: a Render API key is account-wide and can manage and deploy every service in the account, so treat it as a powerful credential.",fieldKeys:["apiKey"]}],validateCredentials:tce,normalizeHeaders:ece})});var mue;var hue=h(()=>{_t();de();mue=U({id:"rentahuman",label:"RentAHuman",iconKey:"rentahuman",defaultServerUrl:"https://rentahuman.ai/api/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["rentahuman.ai, RENTAHUMAN_API_KEY environment variables, or RentAHuman API keys","rentahuman-mcp usage or a rentahuman.ai/api/mcp server URL in MCP client config","README/docs naming RentAHuman for hiring humans or human-in-the-loop work"],helpText:"Hire and coordinate human workers for real-world tasks with RentAHuman's hosted MCP server using an API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the RentAHuman API key Sazabi will send to its hosted MCP endpoint.",body:"Create or copy an API key from the [RentAHuman API keys page](https://rentahuman.ai/account/api-keys), then paste it below. Sazabi stores it securely and sends it as the `X-API-Key` header. Note: this key can hire workers and trigger payments, so keep the per-connection read-only toggle on unless you intend the agent to act.",fieldKeys:["apiKey"]}],validateCredentials:lce,normalizeHeaders:cce,skill:"rentahuman",setupSkill:"rentahuman-setup"})});var Aue;var fue=h(()=>{_t();de();Aue=U({id:"resend",label:"Resend",iconKey:"resend",defaultServerUrl:"https://mcp.resend.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Resend email API usage, RESEND_API_KEY environment variables, or the resend SDK","resend-mcp usage or a mcp.resend.com server URL in MCP client config","README/docs naming Resend for transactional or marketing email"],helpText:"Send transactional emails and manage domains, contacts, and audiences with Resend's hosted MCP server using your Resend API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Resend API key Sazabi will send to Resend's hosted MCP endpoint.",body:"Create or copy an API key from the [Resend dashboard](https://resend.com/api-keys), then paste it below. Choose the key's permission to match what you want the agent to do: **Sending access** (send emails only, the safer choice) or **Full access** (also manage domains, contacts, and audiences). Sazabi stores it securely and sends it as the `Authorization: Bearer` token to Resend's MCP endpoint (`https://mcp.resend.com/mcp`).",fieldKeys:["apiKey"]}],validateCredentials:fce,normalizeHeaders:Ace,skill:"resend",setupSkill:"resend-setup"})});var yue;var bue=h(()=>{_t();de();yue=U({id:"respan",label:"Respan",iconKey:"respan",defaultServerUrl:"https://mcp.respan.ai/api/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Respan / Keywords AI observability usage, RESPAN_API_KEY environment variables, or the respan-ai / keywordsai SDK","respan-mcp usage or a mcp.respan.ai server URL in MCP client config","README/docs naming Respan or Keywords AI for LLM logs, traces, or prompt management"],helpText:"Query LLM request logs, traces, prompts, and customer data from your Respan account using Respan's hosted MCP server and your Respan API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Respan API key Sazabi will send to Respan's hosted MCP endpoint.",body:"Create or copy an API key from the [Respan dashboard](https://platform.respan.ai/platform/api/api-keys), then paste it below. Sazabi stores it securely and sends it as the `Authorization: Bearer` token to Respan's MCP endpoint (`https://mcp.respan.ai/api/mcp`).",fieldKeys:["apiKey"]}],validateCredentials:bce,normalizeHeaders:yce,skill:"respan",setupSkill:"respan-setup"})});var Iue;var Sue=h(()=>{de();Iue=U({id:"salesforce",label:"Salesforce",iconKey:"salesforce",defaultServerUrl:"https://api.salesforce.com/platform/mcp/v1/platform/sobject-all",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"salesforce",callbackPathSegment:"salesforce",authorizationUrl:"https://login.salesforce.com/services/oauth2/authorize",tokenUrl:"https://login.salesforce.com/services/oauth2/token"},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"mcp_api",label:"MCP API access",description:"Access Salesforce data and metadata (sObjects, Apex invocable actions, Flows) through the hosted MCP server. Salesforce hosted MCP External Client Apps require the MCP-specific `mcp_api` scope."},{value:"refresh_token",label:"Offline access",description:"Refresh the access token without requiring the user to re-authenticate.",required:!0}],capabilityOverrides:{allowWriteTools:!0},setupGroups:[{id:"external-client-app",title:"Register an External Client App in Salesforce",description:"Salesforce hosted MCP servers do not support automatic client registration. An admin must create an External Client App (ECA) in the org and enable it for the hosted MCP server.",body:["1. In Salesforce Setup, open **App Manager** and create a new **External Client App**.","2. Enable OAuth, add the **mcp_api** and **refresh_token (offline access)** scopes, and require PKCE.","3. Set the callback URL to the Sazabi Salesforce MCP callback URL shown on this page.","4. Enable the app for your hosted MCP server under **Setup → MCP Servers**.","5. Provide the generated **Consumer Key (Client ID)** and **Consumer Secret (Client Secret)** to your Sazabi deployment configuration."].join(`
|
|
8911
|
-
`)}],evidenceHints:["force.com / my.salesforce.com URLs, SALESFORCE_* or SFDC_* environment variables, or sf/sfdx CLI usage","jsforce, simple-salesforce, or @salesforce packages","README/runbooks naming Salesforce as the CRM or system of record"],helpText:"Query Salesforce data and metadata, and run Apex invocable actions and Flows exposed by a hosted MCP server. Coming soon — a Salesforce admin registers an External Client App in your org and Sazabi provisions its credentials, so it isn't self-serve connectable yet."})});var Cue;var vue=h(()=>{de();Cue=U({id:"secureframe",label:"Secureframe",iconKey:"secureframe",defaultServerUrl:"https://mcp.secureframe.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"secureframe",callbackPathSegment:"secureframe",authorizationUrl:"https://mcp.secureframe.com/oauth/authorize",tokenUrl:"https://mcp.secureframe.com/oauth/token",resourceUrl:"https://mcp.secureframe.com",dynamicClientRegistration:{registrationEndpoint:"https://mcp.secureframe.com/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"mcp",label:"MCP Access",description:"Query and manage Secureframe compliance data, controls, tests, vendors, risks, and framework requirements."}],scopesUserSelectable:!1,regions:[{label:"United States (US)",serverUrl:"https://mcp.secureframe.com"},{label:"United Kingdom (UK)",serverUrl:"https://mcp-uk.secureframe.com",authorizationUrl:"https://mcp-uk.secureframe.com/oauth/authorize",tokenUrl:"https://mcp-uk.secureframe.com/oauth/token",resourceUrl:"https://mcp-uk.secureframe.com",dynamicClientRegistration:{registrationEndpoint:"https://mcp-uk.secureframe.com/register",tokenEndpointAuthMethod:"none"}}],capabilityOverrides:{allowWriteTools:!0},evidenceHints:["secureframe.com URLs, SECUREFRAME_API_KEY / SECUREFRAME_API_SECRET environment variables","SOC 2, ISO 27001, HIPAA, PCI DSS, GDPR, or NIST compliance frameworks and controls","README/docs or compliance runbooks naming Secureframe for automated compliance and continuous monitoring"],helpText:"Query and manage Secureframe compliance data, controls, automated tests, vendors, risks, and framework requirements. Choose the US or UK region when connecting.",skill:"secureframe",setupSkill:"secureframe-setup"})});var wue;var Eue=h(()=>{de();wue=U({id:"sentry",label:"Sentry",iconKey:"sentry",defaultServerUrl:"https://mcp.sentry.dev/mcp",serverUrlPathSuffixMaxSegments:2,transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"sentry",callbackPathSegment:"sentry",authorizationUrl:"https://mcp.sentry.dev/oauth/authorize",tokenUrl:"https://mcp.sentry.dev/oauth/token",useServerUrlAsResource:!0,dynamicClientRegistration:{registrationEndpoint:"https://mcp.sentry.dev/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"org:read"},{value:"project:write"},{value:"team:write"},{value:"event:write"}],getUrlConfiguration:async()=>({docsUrl:"https://mcp.sentry.dev/",instructions:"Copy the hosted MCP server URL below. Optional: to scope this connection to one organization or project, copy a path-scoped URL from the Sentry MCP page (e.g. .../mcp/your-org).",defaultServerUrl:"https://mcp.sentry.dev/mcp",optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["@sentry packages, sentry.properties, SENTRY_* environment variables, or sentry-cli usage","Sentry.init calls, release/deploy automation, or Sentry alert docs","README/docs naming Sentry as the error tracking provider"],helpText:"Browse Sentry organizations, teams, projects, and events."})});var kue;var xue=h(()=>{_t();de();kue=U({id:"signoz",label:"SigNoz",iconKey:"signoz",defaultServerUrl:"https://mcp.us.signoz.cloud/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["SigNoz config, SIGNOZ_* environment variables, or signoz.io links","OpenTelemetry Collector exporting to SigNoz, or a signoz docker-compose / self-hosted deployment","README/docs naming SigNoz for metrics, logs, traces, alerts, or dashboards"],helpText:"Query SigNoz metrics, logs, traces, alerts, and dashboards to investigate production issues.",setupGroups:[{id:"instance",title:"Find your SigNoz instance",description:"Point Sazabi at the SigNoz instance whose telemetry you want to query.",body:"For SigNoz Cloud, use the regional MCP endpoint for your account, such as `https://mcp.us.signoz.cloud/mcp` (replace the region as needed). For self-hosted SigNoz, use your instance's MCP endpoint and set the SigNoz base URL below so the server knows which instance to target.",fieldKeys:["signozUrl"]},{id:"api-key",title:"Create an API key",description:"Create or copy the SigNoz API key Sazabi will send to SigNoz's MCP endpoint.",body:"In SigNoz, go to **Settings > API Keys** and create or copy an API key. Alert, dashboard, and notification-channel tools require an admin-level key. Paste it below.",fieldKeys:["apiKey"]}],validateCredentials:oce,normalizeHeaders:nce})});var Pue;var Rue=h(()=>{de();Pue=U({id:"slack",label:"Slack",iconKey:"slack",defaultServerUrl:"https://mcp.slack.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"slack",callbackPathSegment:"slack",authorizationUrl:"https://slack.com/oauth/v2_user/authorize",tokenUrl:"https://slack.com/api/oauth.v2.user.access"},getAvailableScopes:async()=>[{value:"search:read.public"},{value:"search:read.private"},{value:"search:read.mpim"},{value:"search:read.im"},{value:"search:read.files"},{value:"search:read.users"},{value:"canvases:read"},{value:"users:read"},{value:"users:read.email"}],getUrlConfiguration:async()=>null,capabilityOverrides:{defaultUnavailableReason:"write_blocked"},evidenceHints:["Slack app manifests, bot/webhook URLs, SLACK_* environment variables, or slack.com links","Runbooks that route incidents, alerts, or deploy notices through Slack","Code or docs naming Slack channels for operational triage"],helpText:"Browse Slack messages, files, and threads. Coming soon — requires backend OAuth plumbing for user_scope and isn't self-serve connectable yet.",skill:"slack",setupSkill:"slack-setup"})});var Tue;var Bue=h(()=>{de();Tue=U({id:"stripe",label:"Stripe MCP",iconKey:"stripe",defaultServerUrl:"https://mcp.stripe.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"stripe",callbackPathSegment:"stripe",authorizationUrl:"https://access.stripe.com/mcp/oauth2/authorize",tokenUrl:"https://access.stripe.com/mcp/oauth2/token",resourceUrl:"https://mcp.stripe.com",dynamicClientRegistration:{registrationEndpoint:"https://access.stripe.com/mcp/oauth2/register",tokenEndpointAuthMethod:"none"},defaultAccessTokenTtlSeconds:21600},getAvailableScopes:async()=>[{value:"mcp",label:"MCP access",description:"Access the Stripe MCP server tools for the connected account.",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Stripe dashboard URLs, `sk_`/`rk_`/`pk_` API keys, or Stripe object IDs (cus_, pi_, ch_)","STRIPE_* environment variables or code that imports the `stripe` SDK","README/runbooks naming Stripe for billing, payments, or subscriptions"],helpText:"Query and manage Stripe payments, customers, and billing."})});var Oue;var _ue=h(()=>{de();Oue=U({id:"supabase",label:"Supabase",iconKey:"supabase",defaultServerUrl:"https://mcp.supabase.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"supabase",callbackPathSegment:"supabase",authorizationUrl:"https://api.supabase.com/v1/oauth/authorize",tokenUrl:"https://api.supabase.com/v1/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://api.supabase.com/platform/oauth/apps/register",tokenEndpointAuthMethod:"client_secret_post"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"analytics:read"},{value:"auth:read"},{value:"auth:write"},{value:"database:read"},{value:"database:write"},{value:"domains:read"},{value:"domains:write"},{value:"edge_functions:read"},{value:"edge_functions:write"},{value:"environment:read"},{value:"environment:write"},{value:"organizations:read"},{value:"projects:read"},{value:"projects:write"},{value:"rest:read"},{value:"rest:write"},{value:"secrets:read"},{value:"secrets:write"},{value:"storage:read"}],getUrlConfiguration:async()=>({docsUrl:"https://supabase.com/docs/guides/getting-started/mcp#step-2-configure-your-ai-tool",instructions:"Choose your project and options in the Supabase configuration panel, then copy the generated Server URL.",defaultServerUrl:"https://mcp.supabase.com/mcp",optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["supabase/ directory, supabase/config.toml, or @supabase packages","SUPABASE_* or NEXT_PUBLIC_SUPABASE_* environment variables","README/docs naming Supabase for Postgres, Auth, Storage, or Edge Functions"],helpText:"Manage Supabase organizations, projects, databases, and run SQL.",skill:"supabase",setupSkill:"supabase-setup"})});var Due;var Lue=h(()=>{de();Due=U({id:"superhuman",label:"Superhuman",iconKey:"superhuman",defaultServerUrl:"https://mcp.mail.superhuman.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"superhuman",callbackPathSegment:"superhuman",authorizationUrl:"https://mcp.auth.mail.superhuman.com/oauth2/authorize",tokenUrl:"https://mcp.auth.mail.superhuman.com/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.auth.mail.superhuman.com/oauth2/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"email",required:!0},{value:"offline_access",required:!0},{value:"openid",required:!0},{value:"profile",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Superhuman mail links, SUPERHUMAN_* environment variables, or support workflows naming Superhuman","Customer communication runbooks that depend on email search or drafting","Docs naming Superhuman Mail for sales, support, or founder-led customer comms"],helpText:"Search, draft, send, and triage emails in Superhuman Mail."})});var Que;var Nue=h(()=>{_t();de();Que=U({id:"the-context-company",label:"The Context Company",iconKey:"the-context-company",defaultServerUrl:"https://api.thecontext.company/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!1},evidenceHints:["The Context Company, context company, or context observability references","insight_search, get_agent_runs, or get_agent_sessions tool usage","THE_CONTEXT_COMPANY_API_KEY or api.thecontext.company in MCP configuration"],helpText:"Query agent insights, runs, and sessions through The Context Company's read-only hosted MCP server.",setupGroups:[{id:"api-key",title:"Create a read-only API key",description:"Create the API key The Context Company's hosted MCP server will use.",body:"Generate a read-only API key on The Context Company's [Access Data page](https://www.thecontextcompany.com/prod/mcp-and-api), then paste the raw key below. Sazabi sends it as `Authorization: Bearer <key>` to `https://api.thecontext.company/mcp`.",fieldKeys:["apiKey"]}],validateCredentials:Kae,normalizeHeaders:Vae,skill:"the-context-company",setupSkill:"the-context-company-setup"})});var Mue;var zue=h(()=>{de();Mue=U({id:"vercel",label:"Vercel",iconKey:"vercel",defaultServerUrl:"https://mcp.vercel.com",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"vercel",callbackPathSegment:"vercel",authorizationUrl:"https://vercel.com/oauth/authorize",tokenUrl:"https://vercel.com/api/login/oauth/token",resourceUrl:"https://mcp.vercel.com",dynamicClientRegistration:{registrationEndpoint:"https://vercel.com/api/login/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"offline_access",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["vercel.com links, VERCEL_* environment variables, or a vercel.json in the repo","Deploy workflows or runbooks naming Vercel as the frontend/hosting provider","Vercel project/deployment IDs or preview URLs referenced in docs or CI"],helpText:"Manage Vercel projects, deployments, and access Vercel platform documentation. Coming soon — Vercel's hosted MCP only authorizes allowlisted clients and Sazabi is pending approval, so it isn't connectable yet."})});var jue;var Uue=h(()=>{_t();de();jue=U({id:"x",label:"X",iconKey:"x",defaultServerUrl:"https://api.x.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{readOnlyToolNames:["search_news","get_news","get_trends_by_woeid","get_posts_by_ids","get_posts_counts_recent","search_posts_all","get_posts_by_id","get_posts_liking_users","get_posts_quoted_posts","get_posts_reposted_by","get_users_by_usernames","get_users_by_username","get_users_me","search_users","get_users_by_id","get_users_bookmarks","get_users_bookmark_folders","get_users_bookmarks_by_folder_id","get_users_mentions","get_users_timeline","get_users_posts"]},evidenceHints:["X (Twitter) API usage, X_BEARER_TOKEN, or TWITTER_* environment variables","twitter-api-v2, tweepy, or other X/Twitter API client packages","README/docs naming the X API, X Developer Platform, or tweet automation"],helpText:"Search X posts and access real-time X data using your app's app-only Bearer Token.",setupGroups:[{id:"developer-app",title:"Open the X Developer Portal",description:"Use an X developer project/app with access to the X API v2.",body:"Go to the [X Developer Portal](https://developer.x.com/en/portal/dashboard), open the project and app you want Sazabi to use, and confirm the app has access to the API tiers you need. The hosted MCP server lives at `https://api.x.com/mcp`."},{id:"bearer-token",title:"Copy the app's Bearer Token",description:"Copy the app-only Bearer Token the hosted MCP server will use.",body:"In your app's **Keys and tokens**, find the app-only **Bearer Token** and copy it (regenerate it if you don't have it saved). This is the app-only token, not a user OAuth 2.0 access token. Paste the raw token into Sazabi — Sazabi adds the `Bearer ` prefix and sends it in the `Authorization` header.",fieldKeys:["accessToken"]}],validateCredentials:Yae,normalizeHeaders:qae,skill:"x",setupSkill:"x-setup"})});var $ue,zQt;var Gue=h(()=>{Tce();Oce();Dce();Qce();Mce();ZI();ZI();Uce();$ce();Hce();Vce();Yce();Jce();Xce();tle();ole();ile();ale();lle();dle();gle();hle();fle();ble();Sle();vle();Ele();xle();Rle();Ble();_le();Lle();Nle();zle();Ule();$le();Hle();Vle();Yle();Jle();Xle();tue();oue();iue();aue();lue();due();gue();hue();fue();bue();Sue();vue();Eue();xue();Rue();Bue();_ue();Lue();Nue();zue();Uue();$ue=[Oue,ple,mle,Bce,Rce,_ce,Lce,Nce,zce,jce,Fce,Gce,qce,Kce,Wce,ele,nle,rle,sle,Zce,cle,ule,Ale,yle,Ile,Cle,wle,kle,Ple,Tle,Ole,Dle,Qle,Mle,jle,Fle,Gle,qle,Kle,Wle,Zle,eue,nue,rue,sue,cue,uue,mue,pue,Aue,yue,Iue,Cue,wue,kue,Pue,Tue,Due,Que,Mue,jue],zQt=new Map($ue.map((e)=>[e.id,e]))});var Hue=()=>{};var que=()=>{};var Vue=()=>{};var Kue=()=>{};var Yue=()=>{};var Wue=()=>{};var Jue=()=>{};var Zue=()=>{};var Xue=()=>{};var ede=()=>{};var tde=()=>{};var nde=()=>{};var ode=()=>{};var rde=()=>{};var ide=()=>{};var sde=()=>{};var ade=()=>{};var cde=()=>{};var lde=()=>{};var ude=()=>{};var dde=()=>{};var pde=()=>{};var gde=()=>{};var mde=()=>{};var hde=()=>{};var Ade=()=>{};var fde=()=>{};var yde=()=>{};var bde=()=>{};var Ide=()=>{};var Sde=()=>{};var Cde=()=>{};var vde=()=>{};var wde=()=>{};var Ede=()=>{};var kde=()=>{};var xde=()=>{};var Pde=()=>{};var Rde=()=>{};var Tde=()=>{};var Bde=()=>{};var Ode=()=>{};var _de=()=>{};var Dde=()=>{};var Lde=h(()=>{Hue();que();Vue();Kue();Yue();Wue();Jue();Zue();Xue();ede();tde();nde();ode();rde();ide();sde();ade();cde();lde();ude();dde();pde();gde();mde();hde();Ade();fde();yde();bde();Ide();Sde();Cde();vde();wde();Ede();kde();xde();Pde();Rde();Tde();Bde();Ode();_de();Dde()});var Qde=h(()=>{ZI()});var Nde=()=>{};var Mde=h(()=>{sW();Yf();Mae();_t();vce();wce();Gue();uN();Lde();Qde();Nde()});var zde,H3e,jde,q3e,Ude,dN,Fde,$de,Is,Gde,Hde,qde,fu,Vde,Kde,yu,Yde,Wde,bu,Jde,V3e,Zde,XI,Xde,epe,tpe,npe,Iu,ope,rpe,Su,ipe,spe,Cu,pN,gN,ape,cpe,vu,lpe,upe,wu,dpe,K3e,Eu,ppe,gpe,ku,mpe,hpe,xu,Ape,fpe,Pu,Y3e;var mN=h(()=>{Mde();De();Ve();zde=["configured","authorizing","connected","error"],H3e=a.enum(zde),jde=["preset","custom"],q3e=a.enum(jde),Ude=["streamable-http","sse"],dN=a.enum(Ude),Fde=["none","headers","oauth","aws-sigv4"],$de=a.enum(Fde),Is=a.object({connectionId:a.string().uuid().describe("Connection ID."),connectionKey:a.string().describe("Stable key used to reference this connector in tool calls."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),source:q3e.describe("Whether the connector is a built-in preset or a custom server."),installStatus:H3e.describe("Current connection lifecycle status."),authMode:$de.describe("Authentication mode."),transport:dN.describe("Transport protocol."),serverUrl:a.string().describe("MCP server URL."),readOnly:a.boolean().describe("Whether the connector is restricted to read-only tools."),management:CB.describe("Lifecycle owner and supported connector mutations."),enabledToolCount:a.number().int().nonnegative().describe("Number of tools enabled and available for this connector."),connectedAt:a.string().datetime().nullable().describe("When the connector last became connected, if ever."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),Gde=a.object({name:a.string().describe("Tool name as invoked."),title:a.string().describe("Human-readable tool title."),description:a.string().describe("Tool description."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),enabled:a.boolean().describe("Whether the tool is enabled and available given the connector config.")}),Hde=a.object({projectId:a.string().uuid().optional().describe("Project to list connectors for. Auto-filled from SDK context when omitted."),connectedOnly:a.union([a.boolean(),a.stringbool()]).optional().describe("When true, only return connectors that are connected.")}),qde=a.object({connectors:a.array(Is)}),fu=w({operationId:"mcpConnectors.list",description:"List configured MCP connectors within one project with provider, status, and enabled-tool count.",backend:"api",route:{method:"GET",path:"/mcp-connectors",tags:["MCP Connectors"]},input:Hde,output:qde,pagination:"none",async:"sync"}),Vde=a.object({connectionId:a.string().uuid().describe("Connection ID to fetch."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),Kde=a.object({connector:Is}),yu=w({operationId:"mcpConnectors.get",description:"Get one configured MCP connector by connection ID.",backend:"api",route:{method:"GET",path:"/mcp-connectors/{connectionId}",tags:["MCP Connectors"]},input:Vde,output:Kde,pagination:"none",async:"sync"}),Yde=a.object({connectionId:a.string().uuid().describe("Connection ID to inspect."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),Wde=a.object({connector:Is,tools:a.array(Gde)}),bu=w({operationId:"mcpConnectors.details",description:"Inspect one MCP connector's tool surface, including each tool's name, description, and read-only status.",backend:"api",route:{method:"GET",path:"/mcp-connectors/{connectionId}/details",tags:["MCP Connectors"]},input:Yde,output:Wde,pagination:"none",async:"sync"}),Jde=a.object({providerId:a.string().describe('Provider identifier, e.g. "linear".'),label:a.string().describe("Human-readable provider name."),authMode:$de.describe("Authentication mode."),availability:a.enum(Xc).describe("Whether the provider is enabled or coming soon."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),V3e=a.object({}),Zde=a.object({providers:a.array(Jde)}),XI=w({operationId:"mcpConnectors.listProviders",description:"List all supported MCP connector providers with their auth mode and setup skill.",backend:"api",route:{method:"GET",path:"/mcp-connectors/providers",tags:["MCP Connectors"]},input:V3e,output:Zde,pagination:"none",async:"sync"}),Xde=a.object({connectionKey:a.string().describe("Stable key used to call this connector."),displayName:a.string().describe("Human-readable connector name."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),toolCount:a.number().int().nonnegative().describe("Number of executable tools on this connector.")}),epe=a.object({connectionKey:a.string().describe("Connector that exposes this tool."),toolName:a.string().describe("Tool name as invoked."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),description:a.string().describe("Tool description from the stored snapshot."),score:a.number().describe("BM25 rank score. Zero when enumerating a namespace."),inputSchema:a.record(a.string(),a.unknown()).optional().describe("JSON Schema for the tool's arguments, when requested.")}),tpe=a.object({projectId:a.string().uuid().optional().describe("Project to search connectors in. Auto-filled from SDK context when omitted."),query:a.string().optional().describe("Free-text query over tool names, titles, connector keys, and descriptions. Omit or empty to list connectors, or to enumerate one connector when namespace is set."),namespace:a.string().min(1).optional().describe("Restrict results to one connectionKey or providerId."),limit:a.coerce.number().int().min(1).max(100).default(10).describe("Maximum number of connectors or tool hits to return."),offset:a.coerce.number().int().min(0).default(0).describe("Number of connectors or tool hits to skip."),includeInputSchema:a.union([a.boolean(),a.stringbool()]).optional().describe("When true, tool hits include inputSchema so a caller can execute without a describe round-trip.")}),npe=a.object({kind:a.enum(["connectors","tools"]).describe("connectors when the query is empty and no namespace is set; tools otherwise."),total:a.number().int().nonnegative().describe("Total matches before limit and offset."),connectors:a.array(Xde).describe("Connector index. Empty when kind is tools."),tools:a.array(epe).describe("Ranked or enumerated tool hits. Empty when kind is connectors.")}),Iu=w({operationId:"mcpConnectors.search",description:"Search executable third-party MCP connector tools by free-text query. Empty query lists connectors; empty query plus namespace enumerates that connector. Hits omit input schemas unless includeInputSchema is true.",backend:"api",route:{method:"GET",path:"/mcp-connectors/tools/search",tags:["MCP Connectors"]},input:tpe,output:npe,pagination:"none",async:"sync"}),ope=a.object({projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),connectionKey:a.string().min(1).describe("Connector key from search or mcpConnectors.list."),toolName:a.string().min(1).describe("Tool name as invoked.")}),rpe=a.object({connectionKey:a.string().describe("Connector that exposes this tool."),toolName:a.string().describe("Tool name as invoked."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),title:a.string().describe("Human-readable tool title."),description:a.string().describe("Tool description from the stored snapshot."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),inputSchema:a.record(a.string(),a.unknown()).describe("JSON Schema for the tool's arguments.")}),Su=w({operationId:"mcpConnectors.describe",description:"Load one executable third-party MCP connector tool, including its input schema.",backend:"api",route:{method:"GET",path:"/mcp-connectors/tools/describe",tags:["MCP Connectors"]},input:ope,output:rpe,pagination:"none",async:"sync"}),ipe=a.object({projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),connectionKey:a.string().min(1).describe("Connector key from search or mcpConnectors.list."),toolName:a.string().min(1).describe("Tool name as invoked."),arguments:a.record(a.string(),a.unknown()).optional().describe("Arguments matching the tool's input schema.")}),spe=a.discriminatedUnion("ok",[a.object({ok:a.literal(!0),connectionKey:a.string().describe("Connector that ran the tool."),toolName:a.string().describe("Tool name as invoked."),result:a.unknown().describe("Vendor tool result payload."),structuredContent:a.unknown().optional().describe("Structured content from the vendor when present."),content:a.array(a.record(a.string(),a.unknown())).describe("Raw MCP content parts from the vendor."),text:a.string().nullable().describe("Concatenated text content, if any.")}),a.object({ok:a.literal(!1),code:a.enum(["TOOL_NOT_ENABLED","READ_ONLY","MCP_ERROR"]).describe("Why the tool did not run."),message:a.string().describe("Caller-facing error message.")})]),Cu=w({operationId:"mcpConnectors.call",description:"Invoke one executable third-party MCP connector tool using that connection's stored credential.",backend:"api",route:{method:"POST",path:"/mcp-connectors/tools/call",tags:["MCP Connectors"]},input:ipe,output:spe,pagination:"none",async:"sync"}),pN=a.object({id:a.string().min(1).describe("Stable ID for this header (must be unique within the connector)."),name:a.string().trim().min(1).describe("HTTP header name."),value:a.string().min(1).describe("HTTP header value (passed verbatim).")}),gN=a.object({accessKeyId:a.string().trim().min(1).describe("AWS access key ID."),secretAccessKey:a.string().min(1).describe("AWS secret access key."),sessionToken:a.string().min(1).optional().describe("Optional session token for temporary credentials."),region:a.string().trim().min(1).describe("AWS region.")}),ape=a.object({projectId:a.string().uuid().optional().describe("Project to create the connector in. Auto-filled from SDK context when omitted."),serverUrl:a.string().url().describe("MCP server URL (must be https)."),transport:dN.describe("Transport protocol."),headers:a.array(pN).optional().describe("HTTP headers to send with each request."),awsSigV4:gN.optional().describe("AWS SigV4 credentials for AWS MCP servers."),providerId:a.string().min(1).describe("Built-in preset provider ID (for example, linear or datadog)."),readOnly:a.boolean().optional().describe("Restrict the connector to read-only tools. Defaults to false.")}),cpe=a.object({connector:Is}),vu=w({operationId:"mcpConnectors.create",description:"Create a preset MCP connector with header-based or AWS SigV4 authentication. The server URL must match the selected provider's supported endpoints. Connects immediately and returns the connector with its discovered tool snapshot.",backend:"api",route:{method:"POST",path:"/mcp-connectors",tags:["MCP Connectors"],successStatus:201},input:ape,output:cpe,pagination:"none",async:"sync"}),lpe=a.object({connectionId:a.string().uuid().describe("Connection ID to update."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),serverUrl:a.string().url().optional().describe("New MCP server URL."),transport:dN.optional().describe("New transport protocol."),headers:a.array(pN).optional().describe("Complete replacement header set. Replaces all existing headers."),awsSigV4:gN.optional().describe("Replacement AWS SigV4 credentials. Mutually exclusive with headers.")}),upe=a.object({connector:Is}),wu=w({operationId:"mcpConnectors.update",description:"Deprecated. Preset MCP connector updates are no longer supported via the public API; disconnect and reconnect instead.",backend:"api",route:{method:"PATCH",path:"/mcp-connectors/{connectionId}",tags:["MCP Connectors"]},input:lpe,output:upe,pagination:"none",async:"sync"}),dpe=a.object({connectionId:a.string().uuid().describe("Connection ID to disconnect."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),K3e=a.void(),Eu=w({operationId:"mcpConnectors.disconnect",description:"Disconnect and permanently remove an MCP connector.",backend:"api",route:{method:"DELETE",path:"/mcp-connectors/{connectionId}",tags:["MCP Connectors"],successStatus:204},input:dpe,output:K3e,pagination:"none",async:"sync"}),ppe=a.object({connectionId:a.string().uuid().describe("Connection ID to update."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),readOnly:a.boolean().describe("True to restrict to read-only tools; false to allow all enabled tools.")}),gpe=a.object({connector:Is}),ku=w({operationId:"mcpConnectors.setReadOnly",description:"Toggle the read-only restriction on an MCP connector.",backend:"api",route:{method:"PATCH",path:"/mcp-connectors/{connectionId}/read-only",tags:["MCP Connectors"]},input:ppe,output:gpe,pagination:"none",async:"sync"}),mpe=a.object({projectId:a.string().uuid().optional().describe("Project to install into. Auto-filled from SDK context when omitted."),providerId:a.string().min(1).describe('Provider ID to install, e.g. "linear".'),requestedScopes:a.array(a.string()).optional().describe("Scopes to request. Defaults to the provider's recommended scope set."),serverUrl:a.string().url().optional().describe("Server URL for multi-region providers; defaults to the provider's primary server."),readOnly:a.boolean().optional().describe("Restrict the connector to read-only tools after install. Defaults to false."),returnTo:a.string().optional().describe("Path to redirect the user to after OAuth completes.")}),hpe=a.object({authorizationUrl:a.string().describe("Authorization URL to open in the user's browser."),connectionId:a.string().uuid().describe("Connection ID to poll for completion via getMcpOAuthInstallAttempt."),expiresAt:a.string().datetime().describe("When the OAuth authorization attempt expires.")}),xu=w({operationId:"mcpConnectors.beginOAuthInstall",description:"Begin an OAuth browser flow to install a preset MCP connector. Opens an authorization URL in the user's browser; poll getMcpOAuthInstallAttempt with the returned connectionId to check completion.",backend:"api",route:{method:"POST",path:"/mcp-connectors/oauth/begin",tags:["MCP Connectors"],successStatus:201},input:mpe,output:hpe,pagination:"none",async:"sync"}),Ape=a.object({connectionId:a.string().uuid().describe("Connection ID returned by beginMcpOAuthInstall."),projectId:a.string().uuid().optional().describe("Project the connection belongs to. Auto-filled from SDK context when omitted.")}),fpe=a.object({status:a.enum(["authorizing","connected","error"]).describe("Current install status."),connector:Is.optional().describe("Connector details once connected or in error state.")}),Pu=w({operationId:"mcpConnectors.getOAuthInstallAttempt",description:"Poll the status of an in-progress OAuth MCP connector install. Returns authorizing while the user completes the browser flow, connected on success, or error on failure.",backend:"api",route:{method:"GET",path:"/mcp-connectors/oauth/attempts/{connectionId}",tags:["MCP Connectors"]},input:Ape,output:fpe,pagination:"none",async:"sync"}),Y3e={list:fu.contract,get:yu.contract,details:bu.contract,listProviders:XI.contract,search:Iu.contract,describe:Su.contract,call:Cu.contract,create:vu.contract,update:wu.contract,disconnect:Eu.contract,setReadOnly:ku.contract,beginOAuthInstall:xu.contract,getOAuthInstallAttempt:Pu.contract}});var Ss,W3e,J3e,Z3e,X3e,e9e,t9e,n9e,hN,xjt;var eS=h(()=>{De();Ve();Ss=a.enum(["admin","member"]),W3e=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional(),role:Ss}),J3e=a.object({id:a.string().min(1),name:a.string().nullable(),email:a.string().email()}),Z3e=a.object({credentialType:a.literal("user"),user:J3e,authorizedOrganizationId:a.string().min(1).nullable(),authorizedProjectId:a.string().min(1).nullable(),organizations:a.array(W3e).describe("Organizations the user belongs to, including membership role.")}),X3e=a.object({credentialType:a.literal("secret"),organization:a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),keyName:a.string()}),e9e=a.object({credentialType:a.literal("partner"),superorganization:a.object({id:a.string().uuid(),name:a.string()})}),t9e=a.object({}),n9e=a.discriminatedUnion("credentialType",[Z3e,X3e,e9e]),hN=w({operationId:"me.get",description:"Return the identity and available context for the current credential.",backend:"api",route:{method:"GET",path:"/me",tags:["Auth"]},input:t9e,output:n9e,pagination:"none",async:"sync"}),xjt=hN.contract});var ype,bpe,Ipe,o9e,r9e,i9e,s9e,a9e,c9e,AN,fN,yN,l9e,u9e,d9e,p9e,g9e,m9e,bN,IN,SN,Ojt;var Spe=h(()=>{De();Ve();eS();ype=a.object({membershipId:a.string().min(1).describe("Organization membership record ID."),userId:a.string().min(1).describe("User ID for the organization member."),name:a.string().nullable().describe("Display name for the member, when available."),email:a.string().email().describe("Email address for the member."),imageUrl:a.string().nullable().describe("Profile image URL for the member, when available."),role:Ss.describe("Organization role."),createdAt:a.string().datetime().describe("When the membership was created.")}),bpe=a.object({id:a.string().min(1).describe("Invitation ID."),email:a.string().email().describe("Invited email address."),role:Ss.describe("Role the invitee will receive when they accept."),status:a.string().min(1).describe('Invitation status (e.g. "pending").'),createdAt:a.string().datetime().describe("When the invitation was created."),expiresAt:a.string().datetime().describe("When the invitation expires.")}),Ipe=a.string().min(1).describe("A user ID, or a URL-encoded email address, of the member."),o9e=a.object({organizationId:a.string().min(1).optional().describe("Organization to list members for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),r9e=a.object({members:a.array(ype).describe("Members visible within the selected organization.")}),i9e=a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),member:Ipe.describe("User ID, or URL-encoded email address, of the member to update."),role:Ss.describe("Role to assign.")}),s9e=a.object({member:ype.describe("Updated organization member.")}),a9e=a.object({params:a.object({member:Ipe.describe("User ID, or URL-encoded email address, of the member to remove.")}),query:a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")})}).transform(({params:e,query:t})=>({...t,...e})),c9e=a.object({removedUserId:a.string().min(1).describe("User ID removed from the organization.")}),AN=w({operationId:"members.list",description:"List members in an organization.",backend:"api",route:{method:"GET",path:"/members",tags:["Members"]},input:o9e,output:r9e,pagination:"none",async:"sync",examples:[{name:"organization-members",input:{organizationId:"organization-123"},output:{members:[{membershipId:"membership-123",userId:"user-123",name:"Alex Admin",email:"alex@example.com",imageUrl:null,role:"admin",createdAt:"2026-01-01T00:00:00.000Z"}]}}]}),fN=w({operationId:"members.updateRole",description:"Update a member's organization role.",backend:"api",route:{method:"PATCH",path:"/members/{member}/role",tags:["Members"]},input:i9e,output:s9e,pagination:"none",async:"sync",examples:[{name:"promote-member",input:{organizationId:"organization-123",member:"user-456",role:"admin"},output:{member:{membershipId:"membership-456",userId:"user-456",name:"Mina Member",email:"mina@example.com",imageUrl:null,role:"admin",createdAt:"2026-01-01T00:00:00.000Z"}}}]}),yN=w({operationId:"members.remove",description:"Remove a member from an organization.",backend:"api",route:{method:"DELETE",path:"/members/{member}",tags:["Members"],inputStructure:"detailed"},input:a9e,output:c9e,pagination:"none",async:"sync"}),l9e=a.object({organizationId:a.string().min(1).optional().describe("Organization to invite into. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),email:a.string().email().describe("Email address to invite."),role:Ss.optional().default("member").describe('Role to grant on acceptance. Defaults to "member".')}),u9e=a.object({invitation:bpe.describe("The created pending invitation.")}),d9e=a.object({organizationId:a.string().min(1).optional().describe("Organization to list invitations for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),p9e=a.object({invitations:a.array(bpe).describe("Pending invitations visible within the selected organization.")}),g9e=a.object({params:a.object({invitationId:a.string().min(1).describe("ID of the invitation to revoke.")}),query:a.object({organizationId:a.string().min(1).optional().describe("Organization containing the invitation. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")})}).transform(({params:e,query:t})=>({...t,...e})),m9e=a.object({revokedInvitationId:a.string().min(1).describe("ID of the revoked invitation.")}),bN=w({operationId:"members.invite",description:"Invite a person to the organization by email.",backend:"api",route:{method:"POST",path:"/members/invitations",tags:["Members"],successStatus:201},input:l9e,output:u9e,pagination:"none",async:"sync",examples:[{name:"invite-member",input:{organizationId:"organization-123",email:"newhire@example.com",role:"member"},output:{invitation:{id:"invitation-123",email:"newhire@example.com",role:"member",status:"pending",createdAt:"2026-01-01T00:00:00.000Z",expiresAt:"2026-01-08T00:00:00.000Z"}}}]}),IN=w({operationId:"members.listInvitations",description:"List pending invitations for an organization.",backend:"api",route:{method:"GET",path:"/members/invitations",tags:["Members"]},input:d9e,output:p9e,pagination:"none",async:"sync",examples:[{name:"organization-invitations",input:{organizationId:"organization-123"},output:{invitations:[{id:"invitation-123",email:"newhire@example.com",role:"member",status:"pending",createdAt:"2026-01-01T00:00:00.000Z",expiresAt:"2026-01-08T00:00:00.000Z"}]}}]}),SN=w({operationId:"members.revokeInvitation",description:"Revoke a pending invitation.",backend:"api",route:{method:"DELETE",path:"/members/invitations/{invitationId}",tags:["Members"],inputStructure:"detailed"},input:g9e,output:m9e,pagination:"none",async:"sync"}),Ojt={list:AN.contract,updateRole:fN.contract,remove:yN.contract,invite:bN.contract,listInvitations:IN.contract,revokeInvitation:SN.contract}});var vpe,wpe,tS,Epe,nS,Cpe=4194304,CN,vN,h9e=(e)=>{let t=e.split(",").map((r)=>r.trim()).filter(Boolean),n=a.array(tS).safeParse(t);if(!n.success)throw Error("Kind filter must be a comma-separated list of note, runbook, or change.");return n.data},cm,wN,EN,kpe,xpe,Ppe,Rpe,Tpe,Bpe,Ope,_pe,Dpe,Lpe,Qpe,Npe,Ru,Tu,Bu,Ou,_u,A9e;var kN=h(()=>{De();Ve();vpe=["note","runbook"],wpe=["note","runbook","change"],tS=a.enum(wpe),Epe=a.enum(vpe),nS=a.string().min(1).max(512).refine((e)=>!e.startsWith("/"),{message:"Path must be relative without a leading slash."}).describe("Relative memory path, for example AGENTS.md or notes/architecture.md."),CN=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=Cpe,{message:`Memory body must be at most ${Cpe} bytes (4 MiB).`}).describe("Document body stored in project memory."),vN=a.string().regex(/^(\d+)(s|m|h|d)$/u,"Duration must use s, m, h, or d units, for example 7d or 30m.").describe("Relative time window, for example 7d or 30m."),cm=a.string().min(1).transform(h9e).describe("Comma-separated kinds, for example note,runbook."),wN=a.object({id:a.string().uuid(),projectId:a.string().uuid(),kind:tS,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),contentHash:a.string(),attrs:a.record(a.string(),a.unknown()),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),EN=wN.extend({body:CN}),kpe=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),path:nS.describe("Relative path for the curated document."),body:CN,kind:Epe.default("note").describe("Curated document kind. Only note and runbook may be written through the API."),title:a.string().max(500).optional().describe("Optional display title. Defaults to the path basename.")}),xpe=a.object({document:EN}),Ppe=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:nS.optional().describe("Relative curated path.")}).superRefine((e,t)=>{let n=e.id!==void 0,r=e.path!==void 0;if(n===r)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),Rpe=a.object({document:EN}),Tpe=a.object({projectId:a.string().uuid().optional().describe("Project to list memory for. Auto-filled from CLI and SDK context when omitted."),kind:cm.optional(),since:vN.optional().describe("Only return documents updated within this window, for example 7d."),service:a.string().min(1).optional().describe("Filter to documents whose attrs.services contains this value."),pathPrefix:a.string().min(1).optional().describe("Filter to paths starting with this prefix."),managed:a.coerce.boolean().optional(),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of documents to return per page.")}),Bpe=a.object({documents:a.array(wN),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Ope=a.object({documentId:a.string().uuid(),kind:tS,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),snippet:a.string(),score:a.number()}),_pe=a.object({calibrated:a.literal(!0),minScoreThreshold:a.number(),queryTerms:a.array(a.string()),message:a.string()}),Dpe=a.object({projectId:a.string().uuid().optional().describe("Project to search memory for. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1).max(500).describe("Natural-language search query."),kind:cm.optional(),since:vN.optional(),service:a.string().min(1).optional(),pathPrefix:a.string().min(1).optional(),managed:a.coerce.boolean().optional(),limit:a.coerce.number().int().min(1).max(50).default(10).describe("Maximum ranked search hits to return.")}),Lpe=a.object({hits:a.array(Ope),emptyVerdict:_pe.nullable()}),Qpe=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:nS.optional()}).superRefine((e,t)=>{let n=e.id!==void 0,r=e.path!==void 0;if(n===r)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),Npe=a.void(),Ru=w({operationId:"memory.put",description:"Create or replace a curated project memory document. Embeds on success.",backend:"api",route:{method:"PUT",path:"/memory",tags:["Memory"]},input:kpe,output:xpe,pagination:"none",async:"sync"}),Tu=w({operationId:"memory.get",description:"Get one project memory document by id or path.",backend:"api",route:{method:"GET",path:"/memory/document",tags:["Memory"]},input:Ppe,output:Rpe,pagination:"none",async:"sync"}),Bu=w({operationId:"memory.list",description:"List project memory catalog rows without embedding search.",backend:"api",route:{method:"GET",path:"/memory",tags:["Memory"]},input:Tpe,output:Bpe,pagination:"cursor",async:"sync"}),Ou=w({operationId:"memory.search",description:"Hybrid semantic and keyword search over project memory documents.",backend:"api",route:{method:"POST",path:"/memory/search",tags:["Memory"]},input:Dpe,output:Lpe,pagination:"none",async:"sync"}),_u=w({operationId:"memory.delete",description:"Soft-delete a curated project memory document by id or path.",backend:"api",route:{method:"DELETE",path:"/memory/document",successStatus:204,tags:["Memory"]},input:Qpe,output:Npe,pagination:"none",async:"sync"}),A9e={put:Ru.contract,get:Tu.contract,list:Bu.contract,search:Ou.contract,delete:_u.contract}});var Mpe,zpe,f9e,y9e,b9e,I9e,S9e,lm,C9e,v9e,w9e,xN,PN,RN,TN,zjt;var oS=h(()=>{De();Ve();Mpe=a.enum(["processing","completed","aborted","error"]),zpe=a.object({id:a.string().uuid(),threadId:a.string().uuid(),userMessageId:a.string().uuid().nullable(),assistantMessageId:a.string().uuid().nullable(),parentRunId:a.string().uuid().nullable(),workflowRunId:a.string().nullable(),status:Mpe,source:a.enum(["app","api","mcp","slack","teams","linear","github","agent","cli","web","sdk","bitbucket","system"]),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),completedAt:a.string().datetime().nullable()}),f9e=a.object({projectId:a.string().uuid().optional().describe("Project ID to list runs for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),y9e=a.object({runs:a.array(zpe),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),b9e=a.object({threadId:a.string().uuid().describe("Thread ID to list runs for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),I9e=a.object({runs:a.array(zpe),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),S9e=a.object({runId:a.string().uuid().describe("Run ID returned by a deferred operation.")}),lm=a.object({completed:a.boolean().describe("Whether the run has reached a terminal status."),threadId:a.string().uuid().describe("Thread ID associated with the run."),runId:a.string().uuid().describe("Run ID for subsequent polling."),messageId:a.string().uuid().optional().describe("ID of the user message that triggered this run."),status:Mpe.describe("Current run lifecycle status."),response:a.string().nullable().describe("Assistant response text when the run has completed.")}),C9e=lm.describe("Current run state and, when complete, the assistant response."),v9e=a.object({runId:a.string().uuid().describe("Run ID of the in-flight run to request cancellation for.")}),w9e=a.object({success:a.literal(!0).describe("Always true when the cancellation request was accepted.")}),xN=w({operationId:"runs.list",description:"List deferred runs within one project.",backend:"api",route:{method:"GET",path:"/runs",tags:["Runs"]},input:f9e,output:y9e,pagination:"cursor",async:"sync"}),PN=w({operationId:"runs.listForThread",summary:"List Runs for a Thread",description:"List deferred runs for one thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/runs",tags:["Runs"]},input:b9e,output:I9e,pagination:"cursor",async:"sync"}),RN=w({operationId:"runs.get",description:"Get the current result for a deferred run by run ID.",backend:"api",route:{method:"GET",path:"/runs/{runId}",tags:["Runs"]},input:S9e,output:C9e,pagination:"none",async:"sync",examples:[{name:"processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]}),TN=w({operationId:"runs.cancel",description:"Request cancellation of an in-flight run. Idempotent and best-effort: returns success even when the run has already reached a terminal status.",backend:"api",route:{method:"POST",path:"/runs/{runId}/cancel",tags:["Runs"]},input:v9e,output:w9e,pagination:"none",async:"sync",examples:[{name:"cancel-processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{success:!0}}]}),zjt={list:xN.contract,listForThread:PN.contract,get:RN.contract,cancel:TN.contract}});var rS=(e,t,n)=>{let r=t?20000:1e4;if(e.length>r)n.addIssue({code:"too_big",maximum:r,type:"string",inclusive:!0,message:`Message cannot exceed ${r} characters`,origin:"string",path:["message"]})},iS=(e,t,n)=>{if(e&&!t)n.addIssue({code:"custom",message:"ambientServiceRun requires an automationId",path:["ambientServiceRun"]})};var jpe,um,E9e,k9e,x9e,P9e,R9e,T9e,B9e,O9e,_9e,BN,D9e,L9e,Q9e,N9e,M9e,z9e,j9e,U9e,F9e,$9e,G9e,H9e,ON,_N,DN,LN,QN,NN,Upe,q9e,V9e,K9e,Y9e,Fpe,W9e,J9e,Z9e,X9e,e6e,t6e,Fa="22222222-2222-4222-8222-222222222222",$pe="11111111-1111-4111-8111-111111111111",n6e="44444444-4444-4444-8444-444444444444",Gpe="55555555-5555-4555-8555-555555555555",MN,zN,jN,UN,FN,qjt;var $N=h(()=>{De();Ve();oS();jpe=a.enum(["slack","teams","linear","github","app","mcp","agent","api","cli","web","sdk","bitbucket","system"]),um=a.object({id:a.string().uuid(),projectId:a.string().uuid(),title:a.string().nullable(),status:a.enum(["regular","archived"]),source:jpe.nullable(),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),E9e=a.object({type:a.literal("message"),message:a.string()}),k9e=a.object({type:a.literal("reasoning"),reasoning:a.string(),status:a.enum(["in_progress","complete"]).optional()}),x9e=a.object({type:a.literal("tool_call"),name:a.string(),params:a.any().optional(),result:a.any().optional(),status:a.enum(["in_progress","success","error","unknown"]).optional(),toolCallId:a.string().optional(),durationMs:a.number().nonnegative().optional()}),P9e=a.object({type:a.literal("artifact"),name:a.enum(["timeseries","table","log_detail","integration_required","alert_card","issue_card","mdx"]),data:a.any(),toolCallId:a.string().optional()}),R9e=a.object({type:a.literal("fork"),sourceThreadId:a.string(),sourceMessageId:a.string(),sourceThreadTitle:a.string().nullable()}),T9e=a.object({type:a.literal("summary"),summary:a.string()}),B9e=a.object({type:a.literal("slack_context"),channelId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({timestamp:a.string(),slackUserId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),files:a.array(a.object({name:a.string(),mimetype:a.string(),size:a.number().optional(),attachmentId:a.string().uuid().optional(),ingestionStatus:a.enum(["attached","unsupported","oversized","skipped","unavailable"]).optional()})).optional()}))}),O9e=a.object({type:a.literal("teams_context"),conversationId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({activityId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),createdDateTime:a.string().optional()}))}),_9e=a.union([E9e,k9e,x9e,P9e,R9e,T9e,B9e,O9e]),BN=a.object({id:a.string().uuid(),role:a.enum(["user","assistant"]),content:a.array(_9e),source:jpe,createdAt:a.string().datetime()}),D9e=a.object({projectId:a.string().uuid().optional().describe("Project to list threads for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of threads to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:a.enum(["regular","archived"]).optional().describe("Filter by thread status. 'regular' returns active threads, 'archived' returns archived threads.")}),L9e=a.object({threads:a.array(um).describe("The page of threads matching the query."),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Q9e=a.object({threadId:a.string().uuid().describe("Thread ID returned by threads.list or threads.create.")}),N9e=a.object({thread:um.describe("The requested thread."),messages:a.array(BN).describe("Messages currently stored on the thread in chronological order.")}),M9e=a.object({projectId:a.string().uuid().optional().describe("Project to create the thread in. Auto-filled from CLI and SDK context when omitted."),message:a.string().min(1,"Message cannot be empty").describe("Initial user message that starts the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the agent run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{rS(e.message,e.automationId,t),iS(e.ambientServiceRun,e.automationId,t)}),z9e=lm.describe("Deferred run result for creating a thread."),j9e=a.object({threadId:a.string().uuid().describe("Thread ID whose current processing status should be returned.")}),U9e=a.object({status:a.enum(["idle","processing"]),lastRunStatus:a.enum(["error"]).nullable()}),F9e=a.object({threadId:a.string().uuid().describe("Thread ID whose active run should be stopped.")}),$9e=a.object({success:a.literal(!0).describe("Always true when the stop request was accepted.")}),G9e=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),status:a.enum(["regular","archived"]).describe("New status for the thread. 'archived' hides the thread from the sidebar.")}),H9e=a.object({thread:um.describe("The updated thread.")}),ON=w({operationId:"threads.list",description:"List threads in a project, optionally filtered by status.",backend:"api",route:{method:"GET",path:"/threads",tags:["Threads"]},input:D9e,output:L9e,pagination:"cursor",async:"sync",examples:[{name:"active-threads",input:{projectId:"11111111-1111-4111-8111-111111111111",status:"regular",limit:10},output:{threads:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:05:00.000Z"}],nextCursor:null}}]}),_N=w({operationId:"threads.get",description:"Get a thread and its messages.",backend:"api",route:{method:"GET",path:"/threads/{threadId}",tags:["Threads"]},input:Q9e,output:N9e,pagination:"none",async:"sync"}),DN=w({operationId:"threads.getStatus",description:"Get the current processing status for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/status",tags:["Threads"]},input:j9e,output:U9e,pagination:"none",async:"sync",examples:[{name:"processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{status:"processing",lastRunStatus:null}}]}),LN=w({operationId:"threads.stop",description:"Stop a thread's in-flight run. Idempotent and best-effort: returns success even when the thread has no active run.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/stop",tags:["Threads"]},input:F9e,output:$9e,pagination:"none",async:"sync",examples:[{name:"stop-processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{success:!0}}]}),QN=w({operationId:"threads.create",description:"Create a thread with an initial message and optionally wait for the agent response.",backend:"api",route:{method:"POST",path:"/threads",tags:["Threads"],successStatus:201},input:M9e,output:z9e,pagination:"none",async:"deferred",examples:[{name:"async-handoff",input:{projectId:"11111111-1111-4111-8111-111111111111",message:"Investigate elevated 500s in production.",wait:!1,timeoutSeconds:20},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]}),NN=w({operationId:"threads.update",description:"Update a thread's status.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}",tags:["Threads"]},input:G9e,output:H9e,pagination:"none",async:"sync",examples:[{name:"archive-thread",input:{threadId:"22222222-2222-4222-8222-222222222222",status:"archived"},output:{thread:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"API returning 500s",status:"archived",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:10:00.000Z"}}}]}),Upe=a.enum(["private","organization"]),q9e=a.object({threadId:a.string().uuid().describe("Thread ID of the source thread to fork."),messageId:a.string().uuid().describe("Message ID in the source thread to fork from. The new thread copies messages up to and including this message.")}),V9e=a.object({thread:um.describe("The newly created forked thread.")}),K9e=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),visibility:Upe.describe("New visibility. 'private' restricts the thread to its owner; 'organization' shares it with the organization.")}),Y9e=a.object({thread:um.describe("The updated thread."),visibility:Upe.describe("The thread's resulting visibility.")}),Fpe=a.object({shareId:a.string().uuid().describe("Unique identifier for the snapshot."),threadId:a.string().uuid().describe("Thread the snapshot was taken from."),url:a.string().describe("Public read-only URL for the snapshot."),createdAt:a.string().datetime()}),W9e=a.object({threadId:a.string().uuid().describe("Thread ID to create a public read-only snapshot for.")}),J9e=a.object({share:Fpe.describe("The created share link.")}),Z9e=a.object({threadId:a.string().uuid().describe("Thread ID the snapshot belongs to."),shareId:a.string().uuid().describe("Snapshot ID to revoke.")}),X9e=a.void(),e6e=a.object({threadId:a.string().uuid().describe("Thread ID to list public snapshots for.")}),t6e=a.object({shares:a.array(Fpe).describe("Active share links for the thread.")}),MN=w({operationId:"threads.fork",description:"Fork a thread from a specific message, creating a new thread that copies messages up to that point.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/fork",tags:["Threads"],successStatus:201},input:q9e,output:V9e,pagination:"none",async:"sync",examples:[{name:"fork-from-message",input:{threadId:Fa,messageId:n6e},output:{thread:{id:"66666666-6666-4666-8666-666666666666",projectId:$pe,title:"API returning 500s (fork)",status:"regular",source:"api",createdAt:"2026-01-01T00:20:00.000Z",updatedAt:"2026-01-01T00:20:00.000Z"}}}]}),zN=w({operationId:"threads.setVisibility",description:"Set a thread's visibility to private or organization.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}/visibility",tags:["Threads"]},input:K9e,output:Y9e,pagination:"none",async:"sync",examples:[{name:"make-private",input:{threadId:Fa,visibility:"private"},output:{thread:{id:Fa,projectId:$pe,title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:30:00.000Z"},visibility:"private"}}]}),jN=w({operationId:"threads.createShareLink",description:"Create a public read-only share link for a thread's current messages.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/share",tags:["Threads"],successStatus:201},input:W9e,output:J9e,pagination:"none",async:"sync",examples:[{name:"create-share-link",input:{threadId:Fa},output:{share:{shareId:Gpe,threadId:Fa,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}}}]}),UN=w({operationId:"threads.listShareLinks",description:"List active public share links for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/share",tags:["Threads"]},input:e6e,output:t6e,pagination:"none",async:"sync",examples:[{name:"list-share-links",input:{threadId:Fa},output:{shares:[{shareId:Gpe,threadId:Fa,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}]}}]}),FN=w({operationId:"threads.revokeShareLink",description:"Revoke a public share link for a thread.",backend:"api",route:{method:"DELETE",path:"/threads/{threadId}/share/{shareId}",successStatus:204,tags:["Threads"]},input:Z9e,output:X9e,pagination:"none",async:"sync"}),qjt={list:ON.contract,get:_N.contract,getStatus:DN.contract,stop:LN.contract,create:QN.contract,update:NN.contract,fork:MN.contract,setVisibility:zN.contract,createShareLink:jN.contract,listShareLinks:UN.contract,revokeShareLink:FN.contract}});var o6e,r6e,i6e,s6e,Hpe,qpe;var Vpe=h(()=>{De();Ve();oS();$N();o6e=a.object({threadId:a.string().uuid().describe("Thread ID to list messages for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of messages to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),r6e=a.object({messages:a.array(BN),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),i6e=a.object({threadId:a.string().uuid().describe("Thread ID to append the message to."),message:a.string().min(1,"Message cannot be empty").describe("Message body to append to the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the appended message run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{rS(e.message,e.automationId,t),iS(e.ambientServiceRun,e.automationId,t)}),s6e=lm.describe("Deferred run result for appending a message to an existing thread."),Hpe=w({operationId:"messages.list",description:"List messages in a thread with cursor pagination.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/messages",tags:["Messages"]},input:o6e,output:r6e,pagination:"cursor",async:"sync",examples:[{name:"thread-messages",input:{threadId:"22222222-2222-4222-8222-222222222222",limit:2},output:{messages:[{id:"33333333-3333-4333-8333-333333333333",role:"user",content:[{type:"message",message:"What changed in the intake pipeline?"}],source:"api",createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),qpe=w({operationId:"messages.append",description:"Append a user message to an existing thread and trigger a deferred run.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/messages",successStatus:201,tags:["Messages"]},input:i6e,output:s6e,pagination:"none",async:"deferred",examples:[{name:"append-processing",input:{threadId:"22222222-2222-4222-8222-222222222222",message:"Follow up on the intake backlog.",wait:!1,timeoutSeconds:20},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]})});var ho,Ype,GN,Du,HN,sS,Cs,Wpe,Kpe;var dm=h(()=>{De();ho={IN_APP:"in_app",SLACK:"slack",SLACK_CHANNEL:"slack_channel",MICROSOFT_TEAMS_CHANNEL:"teams_channel",EMAIL:"email",SMS:"sms",INCIDENT_IO:"incident_io",PAGERDUTY:"pagerduty",ROOTLY:"rootly",WEBHOOK:"webhook"},Ype=[ho.IN_APP,ho.SLACK,ho.EMAIL,ho.SMS],GN=[ho.SLACK_CHANNEL,ho.MICROSOFT_TEAMS_CHANNEL,ho.INCIDENT_IO,ho.PAGERDUTY,ho.ROOTLY,ho.WEBHOOK],Du=Object.values(ho),HN=[...Du,"victorops"],sS=a.enum(Du),Cs=a.enum(GN),Wpe=[{channel:"in_app",name:"In-app",description:"Show notifications in your Sazabi notification feed.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/notifications"},{channel:"email",name:"Email",description:"Send notifications to your account email address.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/notifications"},{channel:"sms",name:"SMS",description:"Send notifications to your verified phone number.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/account?phone-number=add"},{channel:"slack",name:"Slack DMs",description:"Send personal notifications by Slack DM.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/connected-accounts/slack"},{channel:"slack_channel",name:"Slack",description:"Post this project's alerts to selected Slack channels.",scope:"project",destinationManagement:"slack_channels",projectIntegrationPath:"slack"},{channel:"teams_channel",name:"Microsoft Teams",description:"Post this project's alerts to selected Microsoft Teams channels.",scope:"project",destinationManagement:"teams_channels",projectIntegrationPath:"teams"},{channel:"incident_io",name:"incident.io",description:"Route this project's alerts to incident.io.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"incident-io"},{channel:"pagerduty",name:"PagerDuty",description:"Route this project's alerts to PagerDuty.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"pagerduty"},{channel:"rootly",name:"Rootly",description:"Route this project's alerts to Rootly.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"rootly"},{channel:"webhook",name:"Webhooks",description:"Send this project's alerts to configured HTTPS endpoints.",scope:"project",destinationManagement:"webhook_endpoints",projectSettingsPath:"webhooks"}],Kpe=new Set(Wpe.map(({channel:e})=>e));if(Kpe.size!==Du.length||Du.some((e)=>!Kpe.has(e)))throw Error("Notification channel definitions must represent every channel")});var Jpe,a6e=(e,t)=>e.value===t.value&&e.label===t.label&&e.scope===t.scope&&e.role===t.role&&e.defaultOff===t.defaultOff&&(e.defaultOffChannels??[]).join(",")===(t.defaultOffChannels??[]).join(",")&&e.email?.template===t.email?.template&&e.email?.ctaLabel===t.email?.ctaLabel&&(e.deliveryConditions??[]).join(",")===(t.deliveryConditions??[]).join(","),Qn=(e)=>{for(let t of Object.values(e)){let n=Jpe.get(t.value);if(n&&!a6e(n,t))throw Error(`Notification type registered twice with conflicting definitions: ${t.value}`);if(t.role!==void 0&&t.scope!=="org")throw Error(`Notification type role restrictions require org scope: ${t.value}`);if(t.label.trim().length===0)throw Error(`Notification type needs a display label: ${t.value}`);if(t.email&&t.email.ctaLabel.trim().length===0)throw Error(`Notification email presentation needs a CTA label: ${t.value}`);if(t.defaultOff&&t.defaultOffChannels)throw Error(`Notification type declares both defaultOff and defaultOffChannels: ${t.value}`);Jpe.set(t.value,t)}return e};var di=h(()=>{Jpe=new Map});var Zpe;var Xpe=h(()=>{di();Zpe=Qn({AUTOMATION_FINISHED:{value:"automation_finished",label:"Automation completed",scope:"project",defaultOff:!0},AUTOMATION_RUN_FAILED:{value:"automation_run_failed",label:"Automation run failed",scope:"project"}})});var aS;var qN=h(()=>{di();aS=Qn({BILLING_PLAN_UPGRADE_APPLIED:{value:"billing_plan_upgrade_applied",label:"Billing upgrade applied",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage billing"}},BILLING_PLAN_DOWNGRADE_SCHEDULED:{value:"billing_plan_downgrade_scheduled",label:"Billing downgrade scheduled",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage billing"}},BILLING_PLAN_DOWNGRADE_APPLIED:{value:"billing_plan_downgrade_applied",label:"Billing downgrade applied",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage billing"}},BILLING_CREDIT_BALANCE_LOW:{value:"billing_credit_balance_low",label:"Billing credits low",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage credits"}},BILLING_CREDIT_BALANCE_DEPLETED:{value:"billing_credit_balance_depleted",label:"Billing credits depleted",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage credits"}},BILLING_AUTO_TOP_UP_SETTINGS_CHANGED:{value:"billing_auto_top_up_settings_changed",label:"Billing auto top-up changed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage auto top-up"}},BILLING_AUTO_TOP_UP_FAILED:{value:"billing_auto_top_up_failed",label:"Billing auto top-up failed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage payment method"}},BILLING_INVOICE_PAID:{value:"billing_invoice_paid",label:"Billing invoice paid",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"View invoice"}},BILLING_INVOICE_PAYMENT_FAILED:{value:"billing_invoice_payment_failed",label:"Billing invoice payment failed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Update payment method"}},BILLING_SUBSCRIPTION_CANCELLATION_SCHEDULED:{value:"billing_subscription_cancellation_scheduled",label:"Billing cancellation scheduled",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage subscription"}},BILLING_SUBSCRIPTION_CANCELED:{value:"billing_subscription_canceled",label:"Billing subscription canceled",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"View billing"}},BILLING_PAYMENT_METHOD_EXPIRING:{value:"billing_payment_method_expiring",label:"Billing payment method expiring",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Update payment method"}},BILLING_PAYMENT_METHOD_CHANGED:{value:"billing_payment_method_changed",label:"Billing payment method changed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Review payment method"}},BILLING_NEGATIVE_BALANCE_COLLECTED:{value:"billing_negative_balance_collected",label:"Billing outstanding balance charged",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"View billing"}},BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED:{value:"billing_negative_balance_collection_failed",label:"Billing outstanding balance charge failed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage payment method"}}})});var ege;var tge=h(()=>{di();ege=Qn({INTEGRATION_CONNECTED:{value:"integration_connected",label:"Integration connected",scope:"org",defaultOff:!0},INTEGRATION_DISCONNECTED:{value:"integration_disconnected",label:"Integration disconnected",scope:"org"}})});var nge;var oge=h(()=>{di();nge=Qn({ISSUE_TRIGGERED:{value:"issue_triggered",label:"Issue triggered",scope:"project",deliveryConditions:["component","severity"]},ISSUE_RESOLVED:{value:"issue_resolved",label:"Issue resolved",scope:"project",defaultOffChannels:["email"],deliveryConditions:["component","severity"]},ISSUE_IGNORED:{value:"issue_ignored",label:"Issue ignored",scope:"project",defaultOffChannels:["email"],deliveryConditions:["component","severity"]}})});var rge;var ige=h(()=>{di();rge=Qn({PROJECT_CREATED:{value:"project_created",label:"Project created",scope:"org",defaultOff:!0},PROJECT_DELETED:{value:"project_deleted",label:"Project deleted",scope:"org",defaultOff:!0},MEMBER_INVITED:{value:"member_invited",label:"Member invited",scope:"org",defaultOff:!0},USER_REMOVED:{value:"user_removed",label:"Member removed",scope:"org",defaultOff:!0},MCP_CONNECTOR_ADDED:{value:"mcp_connector_added",label:"MCP connector added",scope:"org",defaultOff:!0},MCP_CONNECTOR_REMOVED:{value:"mcp_connector_removed",label:"MCP connector removed",scope:"org",defaultOff:!0},SECRET_KEY_CREATED:{value:"secret_key_created",label:"Secret key created",scope:"org",defaultOff:!0},SECRET_KEY_DELETED:{value:"secret_key_deleted",label:"Secret key deleted",scope:"org",defaultOff:!0}})});var sge;var age=h(()=>{di();sge=Qn({SANDBOX_CREATED:{value:"sandbox_created",label:"Sandbox connected",scope:"project",defaultOff:!0},SANDBOX_DELETED:{value:"sandbox_deleted",label:"Sandbox disconnected",scope:"project",defaultOff:!0},LOG_SOURCE_CONNECTED:{value:"log_source_connected",label:"Log source connected",scope:"project",defaultOff:!0},LOG_SOURCE_DISCONNECTED:{value:"log_source_disconnected",label:"Log source disconnected",scope:"project"},GITHUB_CONNECTED:{value:"github_connected",label:"GitHub connected",scope:"project",defaultOff:!0},GITHUB_DISCONNECTED:{value:"github_disconnected",label:"GitHub disconnected",scope:"project"},CODE_REPO_CONNECTED:{value:"code_repo_connected",label:"Code repository connected",scope:"project",defaultOff:!0},CODE_REPO_DISCONNECTED:{value:"code_repo_disconnected",label:"Code repository disconnected",scope:"project"},PUBLIC_KEY_DEACTIVATED:{value:"public_key_deactivated",label:"Public key deactivated",scope:"project"}})});var cge;var lge=h(()=>{di();cge=Qn({SECURITY_ALERT:{value:"security_alert",label:"Security alert",scope:"org",role:"admin"}})});var VN,Pt,l6e,KN=(e)=>{let t=l6e.get(e)?.label;if(t)return t;let n=e.replace(/_/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):e};var pm=h(()=>{Xpe();qN();qN();tge();oge();ige();age();lge();di();VN={...cge,...rge,...ege,...Zpe,...nge,...sge,...aS},Pt=Object.fromEntries(Object.entries(VN).map(([e,t])=>[e,t.value])),l6e=new Map(Object.values(VN).map((e)=>[e.value,e]))});var cS,dge,PUt,Lr,RUt;var $a=h(()=>{pm();dm();dm();cS=Object.values(Pt),dge=[Pt.BILLING_PLAN_UPGRADE_APPLIED,Pt.BILLING_PLAN_DOWNGRADE_SCHEDULED,Pt.BILLING_PLAN_DOWNGRADE_APPLIED,Pt.BILLING_CREDIT_BALANCE_LOW,Pt.BILLING_CREDIT_BALANCE_DEPLETED,Pt.BILLING_AUTO_TOP_UP_SETTINGS_CHANGED,Pt.BILLING_AUTO_TOP_UP_FAILED,Pt.BILLING_INVOICE_PAID,Pt.BILLING_NEGATIVE_BALANCE_COLLECTED,Pt.BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED,Pt.BILLING_INVOICE_PAYMENT_FAILED,Pt.BILLING_SUBSCRIPTION_CANCELLATION_SCHEDULED,Pt.BILLING_SUBSCRIPTION_CANCELED,Pt.BILLING_PAYMENT_METHOD_EXPIRING,Pt.BILLING_PAYMENT_METHOD_CHANGED],PUt=new Set(dge),Lr=[Pt.ISSUE_TRIGGERED,Pt.ISSUE_RESOLVED,Pt.ISSUE_IGNORED,Pt.AUTOMATION_RUN_FAILED],RUt=new Set(Lr)});var gm,pge,gge=(e)=>typeof e==="string"&&(e in pge)?pge[e]:e,d6e;var mge=h(()=>{dm();De();$a();gm=a.enum(cS),pge={data_source_connected:"log_source_connected",data_source_disconnected:"log_source_disconnected"},d6e=a.preprocess(gge,gm)});var p6e;var hge=h(()=>{pm();$a();p6e=Lr.map((e)=>({notificationType:e,label:KN(e)}))});var Age=h(()=>{pm();$a()});var fge=h(()=>{dm();pm();$a();mge();hge();Age()});var yge=()=>{};var bge=h(()=>{$a()});var Ige=h(()=>{$a()});var YN=h(()=>{yge();bge();Ige();fge()});var A6e,f6e,y6e,b6e,I6e,S6e,C6e,WN,HFt;var Sge=h(()=>{YN();De();Ve();A6e=a.enum(["ready","missing","degraded","unavailable"]),f6e=a.object({id:a.string(),label:a.string(),status:a.enum(["active","inactive","degraded"]),statusLabel:a.string()}),y6e=a.object({channel:sS,name:a.string(),description:a.string(),scope:a.enum(["personal","project"]),enabled:a.boolean().nullable(),preferenceId:a.string().nullable(),prerequisite:a.object({status:A6e,statusLabel:a.string(),message:a.string()}),action:a.object({label:a.string(),href:a.string()}).nullable(),destinations:a.array(f6e),destinationManagement:a.enum(["none","slack_channels","teams_channels","integration_connections","webhook_endpoints"]),canCreateDestinations:a.boolean(),supportedNotificationTypes:a.array(gm)}),b6e=a.object({channel:Cs,enabled:a.boolean(),preferenceId:a.string().nullable()}),I6e=a.object({channel:Cs,notificationType:gm,enabled:a.boolean(),preferenceId:a.string()}),S6e=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),C6e=a.object({channelCards:a.array(y6e).length(10),channels:a.array(b6e),notificationTypePreferences:a.array(I6e),issueNotificationMinSeverity:a.enum(["low","medium","high","critical"])}),WN=w({operationId:"notificationChannels.getProject",summary:"List Project Notification Channels",description:"List a project's notification channels with preferences, prerequisites, connection state, configured destinations, and supported notification types.",backend:"api",route:{method:"GET",path:"/notification-channels",tags:["Notification channels"]},input:S6e,output:C6e,pagination:"none",async:"sync"}),HFt={getProject:WN.contract}});var Cge,ZN,vge,XN,WFt,JFt,e0,t0=(e,t)=>{if((e.componentIds?.length||e.componentId)&&"componentIds"in e.condition&&e.condition.componentIds?.length)t.addIssue({code:"custom",path:["condition","componentIds"],message:"Use componentIds instead of legacy condition.componentIds."});if(e.componentIds?.length&&e.componentId)t.addIssue({code:"custom",path:["componentId"],message:"Use componentIds instead of componentId."})},ZFt,wge,JN,n0,mm,Ege,v6e,w6e,E6e,k6e,x6e,P6e,R6e,T6e,B6e,o0,r0,i0,s0,a0,XFt;var kge=h(()=>{YN();De();Ve();Cge=a.enum(["low","medium","high","critical"]),ZN=a.object({severities:a.array(Cge).min(1).optional()}).strict(),vge=a.object({componentIds:a.array(a.string().uuid()).min(1).optional(),severities:a.array(Cge).min(1).optional()}).strict(),XN=a.object({channel:Cs,destinationKey:a.string().min(1)}),WFt=a.object({destinations:a.array(XN).min(1),notificationTypes:a.array(a.enum(Lr)).min(1),componentIds:a.array(a.string().uuid()).min(1).optional().describe("Stable component registry IDs matched by this rule."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:ZN}),JFt=a.object({destinations:a.array(XN).min(1),notificationTypes:a.array(a.enum(Lr)).min(1),condition:vge}),e0=a.object({destinations:a.array(XN).min(1),notificationTypes:a.array(a.enum(Lr)).min(1),componentIds:a.array(a.string().uuid()).min(1).optional().describe("Stable component registry IDs matched by this rule."),componentId:a.string().uuid().optional().describe("Deprecated single-component compatibility input."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:a.union([ZN,vge])}),ZFt=e0.superRefine(t0),wge=a.object({id:a.string(),channel:Cs,destinationKey:a.string(),displayName:a.string()}),JN=a.object({id:a.string().uuid(),label:a.string(),lifecycle:a.enum(["active","inactive","merged"])}),n0=a.object({id:a.string().uuid(),projectId:a.string().uuid(),notificationTypes:a.array(a.enum(Lr)),destinations:a.array(wge),condition:ZN,component:JN.nullable(),componentId:a.string().uuid().nullable(),includeDescendants:a.boolean(),suspendedAt:a.string().datetime().nullable(),suspensionReason:a.string().nullable(),components:a.array(JN),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),mm=a.object({projectId:a.string().uuid().optional().describe("Project whose notification delivery rules are being managed.")}),Ege=a.string().uuid().describe("Logical notification delivery rule ID."),v6e=mm,w6e=a.object({rules:a.array(n0)}),E6e=a.object({destinations:a.array(wge),notificationTypes:a.array(a.object({notificationType:a.enum(Lr),label:a.string(),conditions:a.array(a.enum(["component","severity"]))})),components:a.array(JN)}),k6e=mm.extend(e0.shape).superRefine(t0),x6e=n0,P6e=mm.extend({...e0.shape,ruleId:Ege}).superRefine(t0),R6e=n0,T6e=mm.extend({ruleId:Ege}),B6e=a.object({removed:a.boolean()}),o0=w({operationId:"notificationDeliveryRules.list",description:"List the positive delivery rules for a project.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:v6e,output:w6e,pagination:"none",async:"sync"}),r0=w({operationId:"notificationDeliveryRules.options",description:"List available destinations, events, and conditions for project delivery rules.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules/options",tags:["Notification delivery rules"]},input:mm,output:E6e,pagination:"none",async:"sync"}),i0=w({operationId:"notificationDeliveryRules.create",description:"Create a positive project notification delivery rule.",backend:"api",route:{method:"POST",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:k6e,output:x6e,pagination:"none",async:"sync"}),s0=w({operationId:"notificationDeliveryRules.update",description:"Replace a positive delivery rule atomically.",backend:"api",route:{method:"PUT",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:P6e,output:R6e,pagination:"none",async:"sync"}),a0=w({operationId:"notificationDeliveryRules.delete",description:"Delete a positive delivery rule without deleting its reusable destinations.",backend:"api",route:{method:"DELETE",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:T6e,output:B6e,pagination:"none",async:"sync"}),XFt={list:o0.contract,options:r0.contract,create:i0.contract,update:s0.contract,delete:a0.contract}});var c0,O6e,_6e,D6e,L6e,Q6e,N6e,l0,M6e,z6e,u0,j6e,U6e,d0,F6e,$6e,p0,G6e,H6e,g0,o$t;var xge=h(()=>{De();Ve();c0=a.enum(["verify-email","accept-invite","create-organization","billing","configure-project","connect-github-account","install-github-app","configure-code-search","install-slack-app","configure-slack-notifications","trigger-issue","confirm-issue","finish"]),O6e=a.enum(["needs-onboarding","blocked","ready"]),_6e=a.enum(["incomplete","complete","skipped"]),D6e=a.object({invitationId:a.string(),organizationId:a.string(),organizationName:a.string(),organizationSlug:a.string(),organizationImageUrl:a.string().nullable(),inviterName:a.string().nullable()}),L6e=a.object({gate:O6e,canonicalStep:c0.nullable(),organizationId:a.string().nullable(),projectId:a.string().nullable(),completionByStep:a.record(c0,_6e),githubSkipped:a.boolean(),githubAppSkipped:a.boolean(),slackSkipped:a.boolean(),sampleIssueId:a.string().nullable(),actorRole:a.enum(["admin","member"]).nullable(),requiredStep:a.union([c0,a.literal("select-organization")]).nullable(),isCompleted:a.boolean(),onboardingRecommendationsThreadId:a.string().nullable(),hasOrganizations:a.boolean(),hasPaidBillingSubscription:a.boolean(),billingStepEnabled:a.boolean(),pendingInvitations:a.array(D6e)}),Q6e=a.object({organizationId:a.string().min(1).optional().describe("Organization to resolve onboarding state for. User credentials must belong to it. Defaults to the credential's organization context. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project whose onboarding state to bind (sample-issue attempt and project-scoped facts). Auto-filled from CLI and SDK context when omitted.")}),N6e=a.object({onboarding:L6e}),l0=w({operationId:"onboarding.getState",description:"Read onboarding progress for the authenticated user.",backend:"api",route:{method:"GET",path:"/onboarding/state",tags:["Onboarding"]},input:Q6e,output:N6e,pagination:"none",async:"sync"}),M6e=a.object({integration:a.enum(["github","slack"]).describe("Integration onboarding step to skip."),organizationId:a.string().min(1).optional().describe("Organization to resolve onboarding state for. User credentials must belong to it. Defaults to the credential's organization context. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project used to resolve the organization whose onboarding state is written. Without it, the credential's active organization is used — which for CLI user tokens is the server session's organization, not the CLI's selected one.")}),z6e=a.object({skipped:a.literal(!0)}),u0=w({operationId:"onboarding.skipIntegration",description:"Skip a GitHub or Slack integration step during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-integration",tags:["Onboarding"]},input:M6e,output:z6e,pagination:"none",async:"sync"}),j6e=a.object({organizationId:a.string().min(1).optional().describe("Organization to resolve onboarding state for. User credentials must belong to it. Defaults to the credential's organization context. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project used to resolve the organization whose onboarding state is written. Without it, the credential's active organization is used — which for CLI user tokens is the server session's organization, not the CLI's selected one.")}),U6e=a.object({skipped:a.literal(!0)}),d0=w({operationId:"onboarding.skipGithubAppInstallation",summary:"Skip GitHub App Installation",description:"Skip GitHub App installation during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-github-app",tags:["Onboarding"]},input:j6e,output:U6e,pagination:"none",async:"sync"}),F6e=a.object({organizationId:a.string().min(1).optional().describe("Organization to resolve onboarding state for. User credentials must belong to it. Defaults to the credential's organization context. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project used to resolve the organization whose onboarding state is written. Without it, the credential's active organization is used — which for CLI user tokens is the server session's organization, not the CLI's selected one.")}),$6e=a.object({skipped:a.literal(!0)}),p0=w({operationId:"onboarding.skipSampleIssue",summary:"Skip Test Issue",description:"Skip the optional test issue during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-sample-issue",tags:["Onboarding"]},input:F6e,output:$6e,pagination:"none",async:"sync"}),G6e=a.object({projectId:a.string().uuid().describe("Project that completed onboarding.")}),H6e=a.object({completed:a.boolean()}),g0=w({operationId:"onboarding.finish",description:"Mark onboarding complete when all prerequisites are satisfied.",backend:"api",route:{method:"POST",path:"/onboarding/finish",tags:["Onboarding"]},input:G6e,output:H6e,pagination:"none",async:"sync"}),o$t={getState:l0.contract,skipIntegration:u0.contract,skipGithubAppInstallation:d0.contract,skipSampleIssue:p0.contract,finish:g0.contract}});var lS,q6e,V6e,K6e,Y6e,W6e,J6e,Z6e,X6e,e5e,t5e,m0,h0,A0,f0,c$t;var Pge=h(()=>{De();Ve();eS();lS=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),q6e=lS.extend({role:Ss.optional()}),V6e=a.object({}),K6e=a.object({organizations:a.array(q6e).describe("Organizations available to the current credential.")}),Y6e=a.object({organizationId:a.string().min(1).describe("Organization ID to fetch.")}),W6e=a.object({organization:lS}),J6e=a.object({organizationId:a.string().min(1).describe("Organization ID to update. SDK and CLI callers can auto-fill this before dispatch."),name:a.string().trim().min(1).max(100).describe("New organization name.")}),Z6e=a.object({organization:lS.describe("Updated organization.")}),X6e=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),e5e=a.object({name:X6e.describe("Organization display name.")}),t5e=a.object({organization:lS}),m0=w({operationId:"organizations.create",description:"Create an organization for the authenticated user.",backend:"api",route:{method:"POST",path:"/organizations",tags:["Organizations"],successStatus:201},input:e5e,output:t5e,pagination:"none",async:"sync"}),h0=w({operationId:"organizations.list",description:"List organizations available to the current credential.",backend:"api",route:{method:"GET",path:"/organizations",tags:["Organizations"]},input:V6e,output:K6e,pagination:"none",async:"sync"}),A0=w({operationId:"organizations.get",description:"Get one organization by ID.",backend:"api",route:{method:"GET",path:"/organizations/{organizationId}",tags:["Organizations"]},input:Y6e,output:W6e,pagination:"none",async:"sync"}),f0=w({operationId:"organizations.update",description:"Update one organization.",backend:"api",route:{method:"PATCH",path:"/organizations/{organizationId}",tags:["Organizations"]},input:J6e,output:Z6e,pagination:"none",async:"sync",examples:[{name:"rename-organization",input:{organizationId:"organization-123",name:"Observed Platform"},output:{organization:{id:"organization-123",name:"Observed Platform",slug:"acme",logo:null}}}]}),c$t={list:h0.contract,get:A0.contract,create:m0.contract,update:f0.contract}});var Lu,hm,Rge,Tge,Bge,Oge,_ge,Dge,Lge,uS,dS,pS,Qge,Nge,gS,Mge,zge,mS,n5e;var y0=h(()=>{De();Ve();Lu=a.enum(["us-east-1","us-east-2","us-west-1","us-west-2","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3"]),hm=a.object({id:a.string().uuid(),organizationId:a.string().min(1),name:a.string(),region:Lu}),Rge=a.object({organizationId:a.string().min(1).optional().describe("Organization to list projects for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),Tge=a.object({projects:a.array(hm).describe("Projects visible within the selected organization.")}),Bge=a.object({projectId:a.string().uuid().describe("Project ID to fetch.")}),Oge=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),_ge=a.object({organizationId:a.string().min(1).optional().describe("Organization to create the project under. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),name:Oge.describe("Project name."),region:Lu.optional().default("us-west-2").describe("AWS region where the new project should be created.")}),Dge=a.object({project:hm}),Lge=a.object({project:hm}),uS=w({operationId:"projects.list",description:"List projects in an organization.",backend:"api",route:{method:"GET",path:"/projects",tags:["Projects"]},input:Rge,output:Tge,pagination:"none",async:"sync"}),dS=w({operationId:"projects.get",description:"Get one project by ID.",backend:"api",route:{method:"GET",path:"/projects/{projectId}",tags:["Projects"]},input:Bge,output:Lge,pagination:"none",async:"sync"}),pS=w({operationId:"projects.create",description:"Create one project in an organization.",backend:"api",route:{method:"POST",path:"/projects",successStatus:201,tags:["Projects"]},input:_ge,output:Dge,pagination:"none",async:"sync"}),Qge=a.object({projectId:a.string().uuid().describe("Project ID to update."),name:Oge.optional().describe("New project name.")}),Nge=a.object({project:hm}),gS=w({operationId:"projects.update",description:"Update (rename) one project by ID. User credentials require the `settings:write` organization permission (admin or owner role).",backend:"api",route:{method:"PATCH",path:"/projects/{projectId}",tags:["Projects"]},input:Qge,output:Nge,pagination:"none",async:"sync"}),Mge=a.object({projectId:a.string().uuid().describe("Project ID to delete.")}),zge=a.void(),mS=w({operationId:"projects.delete",description:"Delete one project by ID. User credentials require the `settings:write` organization permission (admin or owner role).",backend:"api",route:{method:"DELETE",path:"/projects/{projectId}",successStatus:204,tags:["Projects"]},input:Mge,output:zge,pagination:"none",async:"sync"}),n5e={list:uS.contract,get:dS.contract,create:pS.contract,update:gS.contract,delete:mS.contract}});var jge,o5e,r5e,i5e,s5e,a5e,b0,h$t;var Uge=h(()=>{De();Ve();jge=a.enum(["open","merged","closed"]),o5e=a.enum(["review_required","approved","changes_requested"]),r5e=a.enum(["passing","failing","pending"]),i5e=a.object({id:a.string().uuid(),projectId:a.string().uuid(),repositoryFullName:a.string(),pullRequestId:a.string().describe("Provider-native pull request identifier (GitHub PR number or Bitbucket PR id), serialized as a string."),githubPullRequestId:a.number().int().describe("Deprecated: use pullRequestId. Numeric form of the provider-native pull request identifier; kept for backward compatibility."),title:a.string().nullable(),url:a.string().nullable(),status:jge.nullable(),reviewState:o5e.nullable(),checksState:r5e.nullable(),requestedByUserId:a.string().nullable(),authorLogin:a.string().nullable().describe("Forge login that authored the pull request (often the Sazabi app identity)."),githubAuthorLogin:a.string().nullable().describe("Deprecated: use authorLogin. Kept for backward compatibility."),threadId:a.string().uuid().nullable(),runId:a.string().uuid().nullable(),createdAt:a.string().datetime(),mergedAt:a.string().datetime().nullable(),closedAt:a.string().datetime().nullable()}),s5e=a.object({projectId:a.string().uuid().optional().describe("Project to list pull requests for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of pull requests to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:jge.optional().describe("Filter by pull request status (open, merged, or closed)."),repositoryFullName:a.string().trim().optional().describe("Filter by repository full name, for example owner/repo. Case-insensitive."),requestedByUserId:a.string().trim().optional().describe("Filter by the Sazabi user who requested the pull request. Pass 'me' to filter to the authenticated user.")}),a5e=a.object({pullRequests:a.array(i5e),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),b0=w({operationId:"pullRequests.list",description:"List pull requests that Sazabi opened, optionally filtered by status, repository, and requesting user.",backend:"api",route:{method:"GET",path:"/pull-requests",tags:["Pull Requests"]},input:s5e,output:a5e,pagination:"cursor",async:"sync"}),h$t={list:b0.contract}});var Fge,$ge,Gge,Hge,qge,Am;var I0=h(()=>{De();Ve();Fge=a.enum(["log_source","mcp_connector","sandbox_cli","integration"]),$ge=a.enum(["connected","recommended"]),Gge=a.object({kind:Fge.describe("What the recommendation targets: a log source, MCP connector, sandbox CLI, or integration."),targetId:a.string().describe("Exact catalog id for the kind (log source type, MCP provider id, sandbox CLI preset type, or integration provider id)."),status:$ge.describe("Resolved live against current connections: connected (already set up) or recommended (suggested, not yet connected)."),roiScore:a.number().int().min(0).max(100).describe("Intrinsic ROI score, 0–100 — a normalized blend of how valuable, how easy to connect, and how proven the item is. A pure function of the item; computed live on read, never stored."),priority:a.number().int().min(1).describe("1-based rank within this list, sorted by roiScore (best first). Items are already returned in priority order; the field lets consumers recover the rank without trusting array position.")}),Hge=a.object({projectId:a.string().uuid().optional().describe("Project to list recommendations for. Auto-filled from CLI and SDK context when omitted.")}),qge=a.object({recommendations:a.array(Gge).describe("The project's configuration recommendations, deduped by (kind, targetId), with status resolved live and each item's ROI score. Returned in priority order (highest roiScore first).")}),Am=w({operationId:"recommendations.list",description:"List a project's configuration recommendations (data sources, MCP connectors, sandbox CLIs, and integrations) with each item's live connection status.",backend:"api",route:{method:"GET",path:"/recommendations",tags:["Recommendations"]},input:Hge,output:qge,pagination:"none",async:"sync"})});var Vge,S0,Kge,Yge,Wge,Jge,Zge,Xge,fm,ym,bm;var C0=h(()=>{De();Ve();Vge=a.enum(["github","bitbucket"]),S0=a.object({id:a.string().uuid().describe("Repository row id — stable across access sources; use it as the path id for repos.remove."),accessSourceId:a.string().uuid().describe("Access source granting this view of the repository (GitHub App installation, personal connection, or integration). Pass to repos.add to link the repository through this source."),source:a.enum(["githubApp","personal","integration"]).describe("Kind of access source granting this view: an organization GitHub App installation, the caller's personal forge connection, or an organization integration."),sourceLabel:a.string().describe('Display label for the access source (e.g. "GitHub app", "Personal").'),provider:Vge.describe("Forge hosting the repository."),owner:a.string().describe("Repository owner (user or organization)."),name:a.string().describe("Repository name without the owner."),fullName:a.string().describe("Full name in owner/name form."),defaultBranch:a.string().nullable().describe("Default branch, when the forge reports one."),isPrivate:a.boolean().describe("Whether the repository is private."),linked:a.boolean().describe("Whether the repository is already linked to the project.")}),Kge=a.object({projectId:a.string().uuid().optional().describe("Project to list repositories for. Auto-filled from CLI and SDK context when omitted.")}),Yge=a.object({repos:a.array(S0).describe("Every repository available to the project's organization (from GitHub App installations, the caller's personal forge connections, and integrations), with `linked` marking the ones already linked to the project.")}),Wge=a.object({projectId:a.string().uuid().optional().describe("Project to link the repositories to. Auto-filled from CLI and SDK context when omitted."),accessSourceIds:a.array(a.string().uuid()).min(1).describe("Access source ids (from repos.list) to link. Select only one access source per repository.")}),Jge=a.object({repos:a.array(S0).describe("The now-linked repositories.")}),Zge=a.object({id:a.string().uuid().describe("Repository row id (from repos.list) to unlink."),projectId:a.string().uuid().optional().describe("Project to unlink the repository from. Auto-filled from CLI and SDK context when omitted.")}),Xge=a.void(),fm=w({operationId:"repos.list",description:"List the repositories available to a project — every repository reachable through the organization's GitHub App installations, the caller's personal forge connections, and integrations — with each one's linked status.",backend:"api",route:{method:"GET",path:"/repos",tags:["Repos"]},input:Kge,output:Yge,pagination:"none",async:"sync"}),ym=w({operationId:"repos.add",description:"Link repositories to a project by access source id. Select only one access source per repository; re-linking an already-linked repository refreshes its selected access source.",backend:"api",route:{method:"POST",path:"/repos",tags:["Repos"]},input:Wge,output:Jge,pagination:"none",async:"sync"}),bm=w({operationId:"repos.remove",description:"Unlink a repository from a project by repository row id.",backend:"api",route:{method:"DELETE",path:"/repos/{id}",successStatus:204,tags:["Repos"]},input:Zge,output:Xge,pagination:"none",async:"sync"})});var eme,c5e,tme,hS,nme,ome,rme,ime,Qu,v0,sme,ame,Nu,cme,lme,Mu,ume,dme,zu,l5e;var w0=h(()=>{De();Ve();eme=a.object({type:a.string().describe("Preset type identifier."),label:a.string().describe("Human-readable display name."),executableNames:a.array(a.string()).describe("CLI binary names installed by this preset."),envVarKeys:a.array(a.string()).describe("Environment variables required for authentication."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),c5e=a.object({}),tme=a.object({types:a.array(eme)}),hS=w({operationId:"sandboxPresets.listTypes",description:"List all supported sandbox CLI types with their environment variable requirements and setup skills.",backend:"api",route:{method:"GET",path:"/sandbox-presets/types",tags:["Sandbox Presets"]},input:c5e,output:tme,pagination:"none",async:"sync"}),nme=a.enum(["github_app","bitbucket_integration","personal_access_token","stored_credentials"]),ome=a.object({presetType:a.string().describe("Preset type identifier."),credentialSource:nme.describe("Authoritative credential source for the preset."),isSystemManaged:a.boolean().describe("Whether the connection follows an integration lifecycle."),fallbackConfigured:a.boolean().describe("Whether user-provided fallback credentials are stored for this preset."),envVarKeys:a.array(a.string()).describe("Stored environment variable names. Secret values are omitted.")}),rme=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted.")}),ime=a.object({connections:a.array(ome)}),Qu=w({operationId:"sandboxPresets.listConnections",description:"List a project's stored and integration-backed sandbox CLI connections without returning secret values.",backend:"api",route:{method:"GET",path:"/sandbox-presets/connections",tags:["Sandbox Presets"]},input:rme,output:ime,pagination:"none",async:"sync"}),v0=a.object({key:a.string().min(1).max(256).regex(/^[A-Za-z_][A-Za-z0-9_]*$/,"Environment variable keys must match /^[A-Za-z_][A-Za-z0-9_]*$/.").describe("Environment variable name (e.g. KUBECONFIG_CONTENTS)."),value:a.string().max(10240).describe("Secret value. Encrypted at rest; never returned by any API response.")}),sme=a.object({projectId:a.string().uuid().optional().describe("Project to configure. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:a.string().min(1).describe("Preset type identifier (e.g. kubectl, aws, github)."),environmentVariables:a.array(v0).max(100).describe("Full set of env vars for this preset. Replaces any previously stored values for the preset.")}),ame=a.object({projectId:a.string().uuid().describe("Project the preset was written to."),presetType:a.string().describe("Preset type that was upserted."),envVarKeys:a.array(a.string()).describe("Env var key names now stored for this preset. Values are never returned.")}),Nu=w({operationId:"sandboxPresets.upsertPreset",summary:"Upsert CLI connection",description:"Set or replace a project's CLI connection credentials (e.g. the kubectl CLI's KUBECONFIG_CONTENTS). Values are encrypted server-side and never returned. Requires write access to the target project.",backend:"api",route:{method:"POST",path:"/sandbox-presets/config",successStatus:200,tags:["Sandbox Presets"]},input:sme,output:ame,pagination:"none",async:"sync"}),cme=a.object({projectId:a.string().uuid().optional().describe("Project to update. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:a.string().min(1).describe("Preset type identifier.")}),lme=a.object({projectId:a.string().uuid().describe("Project the CLI connection belonged to."),presetType:a.string().describe("Preset type that was disconnected."),deleted:a.boolean().describe("Whether a stored CLI connection was deleted.")}),Mu=w({operationId:"sandboxPresets.deletePreset",summary:"Disconnect CLI",description:"Delete a project's stored CLI connection. Integration-managed access remains available until its owning integration is disconnected.",backend:"api",route:{method:"DELETE",path:"/sandbox-presets/config/{presetType}",tags:["Sandbox Presets"]},input:cme,output:lme,pagination:"none",async:"sync"}),ume=a.object({projectId:a.string().uuid().optional().describe("Project to test from. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:a.string().min(1).describe("Preset type identifier."),environmentVariables:a.array(v0).max(100).describe("Unsaved credentials to validate in a readonly sandbox.")}),dme=a.object({status:a.enum(["success","failed"]),message:a.string().nullable(),stdout:a.string().describe("Truncated command output with submitted credentials redacted."),stderr:a.string().describe("Truncated command errors with submitted credentials redacted.")}),zu=w({operationId:"sandboxPresets.testPreset",summary:"Test CLI connection",description:"Validate unsaved CLI credentials in a read-only ephemeral sandbox without persisting them.",backend:"api",route:{method:"POST",path:"/sandbox-presets/test",tags:["Sandbox Presets"]},input:ume,output:dme,pagination:"none",async:"sync"}),l5e={deletePreset:Mu.contract,listConnections:Qu.contract,listTypes:hS.contract,testPreset:zu.contract,upsertPreset:Nu.contract}});var AS,pme=1048576,E0,gme,k0,u5e,d5e,p5e,g5e,m5e,h5e,A5e,f5e,y5e,b5e,x0,P0,R0,T0,B0,P$t;var mme=h(()=>{De();Ve();AS=a.string().min(1).max(64).regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/,"Name must start with a letter or digit and contain only letters, digits, underscores, and hyphens (max 64 characters).").describe("Script name. Must be unique within the project among non-deleted scripts."),E0=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=pme,{message:`Script content must be at most ${pme} bytes (1 MiB).`}).describe("Bash script body materialized as /home/sazabi/scripts/<name>.sh in the sandbox."),gme=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),contentHash:a.string().describe("sha256 hex digest of the script content."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),k0=gme.extend({content:E0}),u5e=a.object({projectId:a.string().uuid().optional().describe("Project to list scripts for. Auto-filled from CLI and SDK context when omitted."),search:a.string().optional().describe("Case-insensitive partial match on script name."),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of scripts to return per page.")}),d5e=a.object({scripts:a.array(gme),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),p5e=a.object({name:AS.describe("Script name to fetch."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),g5e=a.object({script:k0}),m5e=a.object({projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),name:AS.describe("Script name. Must be unique within the project among non-deleted scripts."),content:E0,description:a.string().max(500).nullable().optional().describe("Optional human-readable description.")}),h5e=a.object({script:k0}),A5e=a.object({name:AS.describe("Script to update."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),content:E0.optional().describe("New script body. Omit to leave content unchanged."),description:a.string().max(500).nullable().optional().describe("New description, or null to clear it. Omit to leave unchanged.")}),f5e=a.object({script:k0}),y5e=a.object({name:AS.describe("Script to delete."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),b5e=a.void(),x0=w({operationId:"scripts.list",description:"List durable bash scripts stored for a project.",backend:"api",route:{method:"GET",path:"/scripts",tags:["Scripts"]},input:u5e,output:d5e,pagination:"cursor",async:"sync"}),P0=w({operationId:"scripts.get",description:"Get a single project script by name, including its body.",backend:"api",route:{method:"GET",path:"/scripts/{name}",tags:["Scripts"]},input:p5e,output:g5e,pagination:"none",async:"sync"}),R0=w({operationId:"scripts.create",description:"Create a durable bash script for a project.",backend:"api",route:{method:"POST",path:"/scripts",successStatus:201,tags:["Scripts"]},input:m5e,output:h5e,pagination:"none",async:"sync"}),T0=w({operationId:"scripts.update",description:"Update a project script's body and/or description.",backend:"api",route:{method:"PATCH",path:"/scripts/{name}",tags:["Scripts"]},input:A5e,output:f5e,pagination:"none",async:"sync"}),B0=w({operationId:"scripts.delete",description:"Soft-delete a project script by name.",backend:"api",route:{method:"DELETE",path:"/scripts/{name}",successStatus:204,tags:["Scripts"]},input:y5e,output:b5e,pagination:"none",async:"sync"}),P$t={list:x0.contract,get:P0.contract,create:R0.contract,update:T0.contract,delete:B0.contract}});var O0,hme,Ame,fme,yme,ju,Uu,I5e;var _0=h(()=>{De();Ve();O0=a.object({projectId:a.string().uuid().optional().describe("Project to search within. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1,"Query must be at least 1 character").max(500,"Query must be at most 500 characters"),limit:a.coerce.number().min(1).max(100).default(20).describe("Maximum number of search results to return."),page:a.coerce.number().min(1).default(1).describe("One-based page number.")}),hme=O0.extend({status:a.enum(["regular","archived"]).optional().describe("Optional thread status filter.")}),Ame=O0.extend({threadId:a.string().uuid().optional().describe("Optional thread restriction for message search."),role:a.enum(["user","assistant"]).optional().describe("Optional message role filter.")}),fme=a.object({threads:a.array(a.object({id:a.string().uuid(),projectId:a.string().uuid().optional(),title:a.string(),status:a.enum(["regular","archived"]),labels:a.array(a.string()),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),yme=a.object({messages:a.array(a.object({id:a.string().uuid(),threadId:a.string().uuid(),threadTitle:a.string(),role:a.enum(["user","assistant"]),content:a.string(),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),ju=w({operationId:"search.threads",description:"Search threads within one project.",backend:"api",route:{method:"GET",path:"/search/threads",tags:["Search"]},input:hme,output:fme,pagination:"page",async:"sync",examples:[{name:"search-open-incidents",input:{projectId:"11111111-1111-4111-8111-111111111111",query:"payment timeout",status:"regular",limit:10,page:1},output:{threads:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"Payment timeout in us-west-2",status:"regular",labels:["payments","timeout"],createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-02T00:00:00.000Z",highlights:["payment timeout"],score:123.45}],pagination:{page:1,limit:10,totalResults:1,totalPages:1}}}]}),Uu=w({operationId:"search.messages",description:"Search messages within one project.",backend:"api",route:{method:"GET",path:"/search/messages",tags:["Search"]},input:Ame,output:yme,pagination:"page",async:"sync",examples:[{name:"search-assistant-messages",input:{projectId:"11111111-1111-4111-8111-111111111111",query:"rollback",role:"assistant",limit:10,page:1},output:{messages:[{id:"33333333-3333-4333-8333-333333333333",threadId:"22222222-2222-4222-8222-222222222222",threadTitle:"Deployment rollback guidance",role:"assistant",content:"Rollback the ingestion deployment and confirm queue depth.",createdAt:"2026-01-02T00:00:00.000Z",updatedAt:"2026-01-02T00:00:00.000Z",highlights:["Rollback the ingestion deployment"],score:98.76}],pagination:{page:1,limit:10,totalResults:1,totalPages:1}}}]}),I5e={threads:ju.contract,messages:Uu.contract}});var fS,bme,D0,Im,S5e,C5e,v5e,w5e,E5e,k5e,x5e,P5e,R5e,T5e,L0,Q0,N0,M0,z0,B5e,O5e,j0,L$t;var Ime=h(()=>{De();Ve();fS=a.string().uuid().describe("Signal definition ID."),bme=a.string().min(1).max(200).describe("Human-readable expression name."),D0=a.string().min(1).max(8192).describe("CEL expression evaluated against ingested log events."),Im=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),expression:D0,enabled:a.boolean(),compiledVersion:a.number().int(),linkedAutomationIds:a.array(a.string().uuid()).optional().describe("Automations bound to this expression. Included on list/get when available."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),S5e=a.object({projectId:a.string().uuid().optional().describe("Project to list signal definitions for. Auto-filled from CLI and SDK context when omitted.")}),C5e=a.object({signalDefinitions:a.array(Im)}),v5e=a.object({signalDefinitionId:fS,projectId:a.string().uuid().optional().describe("Project that owns the signal definition. Auto-filled from CLI and SDK context when omitted.")}),w5e=a.object({signalDefinition:Im}),E5e=a.object({projectId:a.string().uuid().optional().describe("Project to create the expression in. Auto-filled from CLI and SDK context when omitted."),name:bme,expression:D0,enabled:a.boolean().optional().describe("Whether the expression starts enabled. Defaults to true.")}),k5e=a.object({signalDefinition:Im}),x5e=a.object({signalDefinitionId:fS,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted."),name:bme.optional(),expression:D0.optional(),enabled:a.boolean().optional().describe("Whether the expression is enabled.")}),P5e=a.object({signalDefinition:Im}),R5e=a.object({signalDefinitionId:fS,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted.")}),T5e=a.object({signalDefinition:Im}),L0=w({operationId:"signalDefinitions.list",description:"List signal definitions in a project.",backend:"api",route:{method:"GET",path:"/signal-definitions",tags:["Signal definitions"]},input:S5e,output:C5e,pagination:"none",async:"sync"}),Q0=w({operationId:"signalDefinitions.get",description:"Get a single signal definition by ID.",backend:"api",route:{method:"GET",path:"/signal-definitions/{signalDefinitionId}",tags:["Signal definitions"]},input:v5e,output:w5e,pagination:"none",async:"sync"}),N0=w({operationId:"signalDefinitions.create",description:"Create a CEL signal definition for a project.",backend:"api",route:{method:"POST",path:"/signal-definitions",successStatus:201,tags:["Signal definitions"]},input:E5e,output:k5e,pagination:"none",async:"sync"}),M0=w({operationId:"signalDefinitions.update",description:"Update a signal definition's name, CEL body, or enabled state.",backend:"api",route:{method:"PATCH",path:"/signal-definitions/{signalDefinitionId}",tags:["Signal definitions"]},input:x5e,output:P5e,pagination:"none",async:"sync"}),z0=w({operationId:"signalDefinitions.disable",description:"Disable a signal definition so it stops matching logs.",backend:"api",route:{method:"POST",path:"/signal-definitions/{signalDefinitionId}/disable",tags:["Signal definitions"]},input:R5e,output:T5e,pagination:"none",async:"sync"}),B5e=a.object({signalDefinitionId:fS,projectId:a.string().uuid().optional().describe("Project that owns the signal definition. Auto-filled from CLI and SDK context when omitted.")}),O5e=a.void(),j0=w({operationId:"signalDefinitions.delete",description:"Permanently delete a signal definition.",backend:"api",route:{method:"DELETE",path:"/signal-definitions/{signalDefinitionId}",successStatus:204,tags:["Signal definitions"]},input:B5e,output:O5e,pagination:"none",async:"sync"}),L$t={list:L0.contract,get:Q0.contract,create:N0.contract,update:M0.contract,disable:z0.contract,delete:j0.contract}});var Sme;var Cme=h(()=>{Sme=["onboarding","setup"]});var vme,wme,Eme,kme,Sm;var U0=h(()=>{Cme();De();Ve();vme=a.enum(Sme),wme=a.object({id:a.string().describe("Unique task identifier (e.g. install_github_app)."),label:a.string().describe("Short human-readable task name."),description:a.string().describe("Explanation of what needs to be completed to satisfy this task."),instructions:a.string().describe("Step-by-step instructions for completing this task."),completed:a.boolean().describe("Whether the task has been completed."),completedAt:a.string().datetime().nullable().describe("ISO 8601 timestamp of when the task was completed, or null."),category:vme.describe("Task category: onboarding (core setup steps) or setup (additional configuration).")}),Eme=a.object({projectId:a.string().uuid().optional().describe("Project to list tasks for. Auto-filled from CLI and SDK context when omitted.")}),kme=a.object({tasks:a.array(wme).describe("All onboarding and setup tasks with their current completion status.")}),Sm=w({operationId:"tasks.list",description:"List all onboarding and setup tasks for a project, including their current completion status and a description of what is required to complete each task.",backend:"api",route:{method:"GET",path:"/tasks",tags:["Tasks"]},input:Eme,output:kme,pagination:"none",async:"sync"})});var _5e,D5e,Ga,L5e,Q5e,N5e,M5e,z5e,j5e,U5e,F5e,$5e,G5e,H5e,q5e,V5e,K5e,F0,$0,G0,H0,q0,V0,K0,G$t;var xme=h(()=>{De();Ve();_5e=a.object({id:a.string().uuid().describe("Team ID."),name:a.string().describe("Team name, unique among the org's active teams."),description:a.string().nullable().describe("Optional team description."),createdAt:a.string().datetime().describe("When the team was created."),memberCount:a.number().int().nonnegative().describe("Number of active members in the team.")}),D5e=a.object({userId:a.string().min(1).describe("User ID of the team member."),name:a.string().nullable().describe("Display name for the member, when available."),email:a.string().email().describe("Email address for the member."),addedAt:a.string().datetime().describe("When the member was added to the team.")}),Ga=a.string().min(1).optional().describe("Organization to operate on. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),L5e=a.object({organizationId:Ga}),Q5e=a.object({teams:a.array(_5e).describe("Active teams in the organization.")}),N5e=a.object({organizationId:Ga,name:a.string().trim().min(1).describe("Team name."),description:a.string().trim().min(1).optional().describe("Optional team description.")}),M5e=a.object({id:a.string().uuid().describe("ID of the created team.")}),z5e=a.object({organizationId:Ga,teamId:a.string().uuid().describe("Team to update."),name:a.string().trim().min(1).optional().describe("New team name."),description:a.string().trim().min(1).nullable().optional().describe("New team description; null clears it.")}),j5e=a.object({id:a.string().uuid().describe("ID of the updated team.")}),U5e=a.object({params:a.object({teamId:a.string().uuid().describe("Team to delete.")}),query:a.object({organizationId:Ga})}).transform(({params:e,query:t})=>({...t,...e})),F5e=a.object({success:a.literal(!0).describe("The team and its memberships were removed.")}),$5e=a.object({organizationId:Ga,teamId:a.string().uuid().describe("Team to add the member to."),userId:a.string().min(1).describe("User ID of an active organization member to add.")}),G5e=a.object({id:a.string().uuid().describe("ID of the team membership.")}),H5e=a.object({params:a.object({teamId:a.string().uuid().describe("Team to remove the member from."),userId:a.string().min(1).describe("User ID of the member to remove.")}),query:a.object({organizationId:Ga})}).transform(({params:e,query:t})=>({...t,...e})),q5e=a.object({success:a.literal(!0).describe("The membership was removed.")}),V5e=a.object({organizationId:Ga,teamId:a.string().uuid().describe("Team to list members for.")}),K5e=a.object({members:a.array(D5e).describe("Active members of the team.")}),F0=w({operationId:"teams.list",description:"List teams in an organization.",backend:"api",route:{method:"GET",path:"/teams",tags:["Teams"]},input:L5e,output:Q5e,pagination:"none",async:"sync",examples:[{name:"organization-teams",input:{organizationId:"organization-123"},output:{teams:[{id:"5c0f9866-31ab-4237-94cc-a1d0ba2f6de2",name:"Payments",description:"Owns checkout and billing components.",createdAt:"2026-01-01T00:00:00.000Z",memberCount:4}]}}]}),$0=w({operationId:"teams.create",description:"Create a team in an organization.",backend:"api",route:{method:"POST",path:"/teams",tags:["Teams"],successStatus:201},input:N5e,output:M5e,pagination:"none",async:"sync"}),G0=w({operationId:"teams.update",description:"Rename a team or update its description.",backend:"api",route:{method:"PATCH",path:"/teams/{teamId}",tags:["Teams"]},input:z5e,output:j5e,pagination:"none",async:"sync"}),H0=w({operationId:"teams.delete",description:"Delete a team, its memberships, and its component-ownership assignments.",backend:"api",route:{method:"DELETE",path:"/teams/{teamId}",tags:["Teams"],inputStructure:"detailed"},input:U5e,output:F5e,pagination:"none",async:"sync"}),q0=w({operationId:"teams.addMember",description:"Add an active organization member to a team.",backend:"api",route:{method:"POST",path:"/teams/{teamId}/members",tags:["Teams"],successStatus:201},input:$5e,output:G5e,pagination:"none",async:"sync"}),V0=w({operationId:"teams.removeMember",description:"Remove a member from a team.",backend:"api",route:{method:"DELETE",path:"/teams/{teamId}/members/{userId}",tags:["Teams"],inputStructure:"detailed"},input:H5e,output:q5e,pagination:"none",async:"sync"}),K0=w({operationId:"teams.listMembers",description:"List a team's active members.",backend:"api",route:{method:"GET",path:"/teams/{teamId}/members",tags:["Teams"]},input:V5e,output:K5e,pagination:"none",async:"sync"}),G$t={list:F0.contract,create:$0.contract,update:G0.contract,delete:H0.contract,addMember:q0.contract,removeMember:V0.contract,listMembers:K0.contract}});var Y5e,W5e,J5e,Y0,Z5e,X5e,W0,eXe,tXe,J0,K$t;var Pme=h(()=>{De();Ve();Y5e=a.object({kind:a.enum(["user","workspace"]),name:a.string().optional(),email:a.string().optional()}),W5e=a.object({container:a.string().min(1).describe("The container to create the work item in: its id, short key (e.g. a Linear team key like ENG), or display name."),title:a.string().min(1),bodyMarkdown:a.string().optional(),state:a.string().optional(),itemType:a.string().optional(),organizationId:a.string().min(1).optional().describe("Optional organization ID to scope the request to. User credentials must belong to it; a secret key may only reference its own organization. Omitting it currently falls back to the session's active organization for user tokens (deprecated); a future release will require it for user-token callers."),clientRequestId:a.string().min(1).optional().describe("Optional caller-supplied idempotency key. When provided, retrying the same logical create with the same clientRequestId reuses the original result instead of creating a duplicate external work item.")}).strict(),J5e=a.object({identifier:a.string(),title:a.string(),url:a.string(),state:a.string(),attribution:Y5e.optional(),reused:a.boolean()}),Y0=w({operationId:"work-items.create",description:"Create a work item (e.g. a Linear issue) in a connected issue tracker, attributing the write to the requesting user.",backend:"api",route:{method:"POST",path:"/work-items",tags:["Work Items"],successStatus:201},input:W5e,output:J5e,pagination:"none",async:"sync"}),Z5e=a.object({itemId:a.string().min(1).describe("The work item to comment on."),bodyMarkdown:a.string().min(1),organizationId:a.string().min(1).optional().describe("Optional organization ID to scope the request to. User credentials must belong to it; a secret key may only reference its own organization. Omitting it currently falls back to the session's active organization for user tokens (deprecated); a future release will require it for user-token callers.")}).strict(),X5e=a.object({identifier:a.string(),url:a.string()}),W0=w({operationId:"work-items.comment",description:"Add a comment to an existing work item.",backend:"api",route:{method:"POST",path:"/work-items/{itemId}/comment",tags:["Work Items"]},input:Z5e,output:X5e,pagination:"none",async:"sync"}),eXe=a.object({itemId:a.string().min(1).describe("The work item to transition."),state:a.string().min(1).describe("The target workflow state."),organizationId:a.string().min(1).optional().describe("Optional organization ID to scope the request to. User credentials must belong to it; a secret key may only reference its own organization. Omitting it currently falls back to the session's active organization for user tokens (deprecated); a future release will require it for user-token callers.")}).strict(),tXe=a.object({identifier:a.string(),title:a.string(),url:a.string(),state:a.string(),changed:a.boolean()}),J0=w({operationId:"work-items.transition",description:"Move a work item to a target workflow state.",backend:"api",route:{method:"POST",path:"/work-items/{itemId}/transition",tags:["Work Items"]},input:eXe,output:tXe,pagination:"none",async:"sync"}),K$t={create:Y0.contract,comment:W0.contract,transition:J0.contract}});var Z0;var Rme=h(()=>{M1();q1();tR();aR();h2();FR();HR();Hf();NY();hB();mN();eS();Spe();kN();Vpe();Sge();kge();xge();Pge();y0();Uge();I0();C0();oS();w0();mme();_0();Ime();U0();xme();$N();Pme();Z0={me:hN.contract,automations:{list:lR.contract,get:uR.contract,create:dR.contract,update:pR.contract,enable:gR.contract,disable:mR.contract,runs:{list:hR.contract,get:AR.contract,logs:fR.contract}},logs:{query:Kc.contract,schema:Yc.contract,volume:Wc.contract,patterns:Jc.contract,nativeQuery:Zc.contract},logSources:{listProviders:Uf.contract,list:qc.contract,create:Vc.contract,get:Ff.contract,update:$f.contract,delete:Gf.contract},logStreams:{list:cB.contract,create:lB.contract,get:uB.contract,update:dB.contract,delete:pB.contract,reassign:gB.contract},connectedAccounts:{beginConnect:oR.contract,getConnectAttempt:rR.contract,list:iR.contract,disconnect:sR.contract},integrations:{listProviders:K1.contract,listConnections:Y1.contract,getConnection:W1.contract,createConnection:J1.contract,beginConnect:Z1.contract,getConnectAttempt:X1.contract,disconnectConnection:e2.contract,updateConnectionCredentials:t2.contract,getOrganizationExternalIdentityJitPolicy:r2.contract,updateOrganizationExternalIdentityJitPolicy:i2.contract,getConnectionExternalIdentityJitPolicy:s2.contract,updateConnectionExternalIdentityJitPolicy:a2.contract,getSlackConfiguration:l2.contract,updateSlackConfiguration:u2.contract,listSlackChannelProjectMappings:p2.contract,setSlackChannelProjectMapping:g2.contract,deleteSlackChannelProjectMapping:m2.contract},notificationChannels:{getProject:WN.contract},notificationDeliveryRules:{list:o0.contract,options:r0.contract,create:i0.contract,update:s0.contract,delete:a0.contract},mcpConnectors:{listProviders:XI.contract,list:fu.contract,get:yu.contract,details:bu.contract,search:Iu.contract,describe:Su.contract,call:Cu.contract,create:vu.contract,update:wu.contract,disconnect:Eu.contract,setReadOnly:ku.contract,beginOAuthInstall:xu.contract,getOAuthInstallAttempt:Pu.contract},sandboxPresets:{deletePreset:Mu.contract,listConnections:Qu.contract,listTypes:hS.contract,testPreset:zu.contract,upsertPreset:Nu.contract},scripts:{list:x0.contract,get:P0.contract,create:R0.contract,update:T0.contract,delete:B0.contract},signalDefinitions:{list:L0.contract,get:Q0.contract,create:N0.contract,update:M0.contract,disable:z0.contract,delete:j0.contract},memory:{put:Ru.contract,get:Tu.contract,list:Bu.contract,search:Ou.contract,delete:_u.contract},onboarding:{getState:l0.contract,skipIntegration:u0.contract,skipGithubAppInstallation:d0.contract,skipSampleIssue:p0.contract,finish:g0.contract},organizations:{list:h0.contract,get:A0.contract,create:m0.contract,update:f0.contract},members:{list:AN.contract,updateRole:fN.contract,remove:yN.contract,invite:bN.contract,listInvitations:IN.contract,revokeInvitation:SN.contract},teams:{list:F0.contract,create:$0.contract,update:G0.contract,delete:H0.contract,addMember:q0.contract,removeMember:V0.contract,listMembers:K0.contract},publicKeys:{list:jc.contract,get:Uc.contract,ensureLogForwarding:Fc.contract,update:$c.contract,deactivate:Gc.contract},secretKeys:{list:Of.contract,get:_f.contract,create:Df.contract,update:Lf.contract,delete:Qf.contract},projects:{list:uS.contract,get:dS.contract,create:pS.contract,update:gS.contract,delete:mS.contract},search:{threads:ju.contract,messages:Uu.contract},messages:{list:Hpe.contract,append:qpe.contract},threads:{list:ON.contract,get:_N.contract,getStatus:DN.contract,stop:LN.contract,create:QN.contract,update:NN.contract,fork:MN.contract,setVisibility:zN.contract,createShareLink:jN.contract,listShareLinks:UN.contract,revokeShareLink:FN.contract},runs:{list:xN.contract,listForThread:PN.contract,get:RN.contract,cancel:TN.contract},pullRequests:{list:b0.contract},issues:{count:Sf.contract,create:zc.contract,list:bf.contract,search:If.contract,get:Cf.contract,resolve:vf.contract,ignore:wf.contract,reopen:Ef.contract,reassignAndReopen:kf.contract,mute:xf.contract,unmute:Pf.contract},workItems:{create:Y0.contract,comment:W0.contract,transition:J0.contract},billing:{getSummary:bR.contract,getUsage:IR.contract,getAccruedUsageCharges:MR.contract,listUsageInvoices:NR.contract,listTransactions:SR.contract,getAutoTopUp:wR.contract,updateAutoTopUp:ER.contract,purchaseCredits:kR.contract,listPlans:xR.contract,previewPlanChange:PR.contract,previewSubscriptionCancellation:DR.contract,scheduleSubscriptionCancellation:LR.contract,resumeSubscriptionCancellation:QR.contract,changePlan:RR.contract,createCheckoutSession:TR.contract,getCheckoutSessionStatus:BR.contract,createPortalSession:OR.contract,getPaymentMethod:_R.contract},tasks:{list:Sm.contract},recommendations:{list:Am.contract},repos:{list:fm.contract,add:ym.contract,remove:bm.contract},components:{list:ZA.contract,get:XA.contract,register:Mc.contract,deregister:ef.contract,rename:tf.contract,assignTeam:nf.contract,reactivationPreview:of.contract,reactivate:rf.contract,mergePreview:df.contract,merge:pf.contract,relationships:{list:sf.contract,preview:af.contract,add:cf.contract,remove:lf.contract},incidents:{list:gf.contract},timeline:mf.contract}}});var Ha=h(()=>{T$();tR();aR();Rme();FR();HR();Hf();hB();mN();kN();y0();I0();C0();w0();_0();U0()});var nXe="https://api.sazabi.com",oXe="x-sazabi-client-source",Bme=(e)=>({streamRun:async(t)=>Tme({options:e,path:`/runs/${encodeURIComponent(t.runId)}/stream`,cursor:t.cursor,signal:t.signal}),streamThread:async(t)=>Tme({options:e,path:`/threads/${encodeURIComponent(t.threadId)}/stream`,cursor:t.cursor,signal:t.signal})}),Tme=async(e)=>{let t=e.options.fetch??globalThis.fetch;if(!t)throw Error("Fetch transport is not available in this runtime.");let n=await e.options.credentialProvider.getToken(),r=rXe(e.options.apiBaseUrl,e.path,e.cursor);return sXe({url:r,token:n,clientSource:e.options.clientSource,initialCursor:e.cursor,signal:e.signal,fetch:t})},rXe=(e,t,n)=>{let r=iXe(e??nXe),o=new URL(`${r}${t}`);if(n)o.searchParams.set(UP,n);return o.toString()},iXe=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},sXe=async(e)=>{let t=[],n=[],r=!1,o=!1,i,s=e.initialCursor,c=new AbortController,l=(f)=>{if(r)return;r=!0,i=f;while(n.length>0)n.shift()?.({value:void 0,done:!0})},u=(f)=>{let S=n.shift();if(S){S({value:f,done:!1});return}t.push(f)},d=(f)=>{if(f.event===$P){let v=dXe(f.data);if(v!==void 0)s=v;return}if(f.data===GP){o=!0,c.abort(),l();return}let S=pXe(f.data);if(S)u(S)},p=()=>{o=!0,c.abort(),l()};if(e.signal)if(e.signal.aborted)o=!0,c.abort();else e.signal.addEventListener("abort",p,{once:!0});let g={[Symbol.asyncIterator](){return g},get cursor(){return s},next:async()=>{if(t.length>0)return{value:t.shift(),done:!1};if(r){if(i)throw i;return{value:void 0,done:!0}}return new Promise((f)=>{n.push(f)}).then((f)=>{if(f.done&&i)throw i;return f})},return:async()=>(o=!0,c.abort(),l(),{value:void 0,done:!0}),throw:async(f)=>{throw o=!0,c.abort(),l(f instanceof Error?f:Error(String(f))),f},close:async()=>{o=!0,c.abort(),l()}};if(o)return l(),g;let m=await e.fetch(e.url,{method:FP,headers:aXe(e.token,e.clientSource),signal:c.signal});if(await cXe(m))l();else lXe(m,d).then(()=>l()).catch((f)=>{if(mXe(f)||o||e.signal?.aborted){l();return}l(hXe(f))});return g},aXe=(e,t)=>({accept:"text/event-stream",authorization:`Bearer ${e}`,...t?{[oXe]:t}:{}}),cXe=async(e)=>{if(e.status===204)return!0;if(e.ok&&e.body)return!1;let t=await gXe(e);if(e.status===401)throw Error("Authentication failed. Check your credential.");if(e.status===403)throw Error(`Forbidden (403): ${t||"Credential may not have access to this resource"}`);if(e.status===404)throw Error(`Not found (404): ${t||"Run or thread not found"}`);if(e.status===400)throw Error(`Invalid stream cursor (400): ${t||"The provided cursor was rejected"}`);if(e.status>=400&&e.status<500&&e.status!==429)throw Error(`Client error (${e.status}): ${t}`);if(!e.body)throw Error("Agent stream response did not include a body.");throw Error(e.status===429?`Rate limited (429): ${t}`:`Server error (${e.status}): ${t}`)},lXe=async(e,t)=>{let n=e.body?.getReader();if(!n)throw Error("Agent stream response did not include a body.");let r=new TextDecoder,o="",i=uXe(t);try{while(!0){let s=await n.read();if(s.done)break;o+=r.decode(s.value,{stream:!0});let c=o.split(/\r\n|\r|\n/);o=c.pop()??"";for(let l of c)i.line(l)}if(o+=r.decode(),o)for(let s of o.split(/\r\n|\r|\n/))i.line(s);i.flush()}finally{n.releaseLock()}},uXe=(e)=>{let t="message",n=[],r=()=>{t="message",n=[]},o=()=>{if(n.length===0){r();return}e({event:t,data:n.join(`
|
|
8911
|
+
`)}],evidenceHints:["force.com / my.salesforce.com URLs, SALESFORCE_* or SFDC_* environment variables, or sf/sfdx CLI usage","jsforce, simple-salesforce, or @salesforce packages","README/runbooks naming Salesforce as the CRM or system of record"],helpText:"Query Salesforce data and metadata, and run Apex invocable actions and Flows exposed by a hosted MCP server. Coming soon — a Salesforce admin registers an External Client App in your org and Sazabi provisions its credentials, so it isn't self-serve connectable yet."})});var Cue;var vue=h(()=>{de();Cue=U({id:"secureframe",label:"Secureframe",iconKey:"secureframe",defaultServerUrl:"https://mcp.secureframe.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"secureframe",callbackPathSegment:"secureframe",authorizationUrl:"https://mcp.secureframe.com/oauth/authorize",tokenUrl:"https://mcp.secureframe.com/oauth/token",resourceUrl:"https://mcp.secureframe.com",dynamicClientRegistration:{registrationEndpoint:"https://mcp.secureframe.com/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"mcp",label:"MCP Access",description:"Query and manage Secureframe compliance data, controls, tests, vendors, risks, and framework requirements."}],scopesUserSelectable:!1,regions:[{label:"United States (US)",serverUrl:"https://mcp.secureframe.com"},{label:"United Kingdom (UK)",serverUrl:"https://mcp-uk.secureframe.com",authorizationUrl:"https://mcp-uk.secureframe.com/oauth/authorize",tokenUrl:"https://mcp-uk.secureframe.com/oauth/token",resourceUrl:"https://mcp-uk.secureframe.com",dynamicClientRegistration:{registrationEndpoint:"https://mcp-uk.secureframe.com/register",tokenEndpointAuthMethod:"none"}}],capabilityOverrides:{allowWriteTools:!0},evidenceHints:["secureframe.com URLs, SECUREFRAME_API_KEY / SECUREFRAME_API_SECRET environment variables","SOC 2, ISO 27001, HIPAA, PCI DSS, GDPR, or NIST compliance frameworks and controls","README/docs or compliance runbooks naming Secureframe for automated compliance and continuous monitoring"],helpText:"Query and manage Secureframe compliance data, controls, automated tests, vendors, risks, and framework requirements. Choose the US or UK region when connecting.",skill:"secureframe",setupSkill:"secureframe-setup"})});var wue;var Eue=h(()=>{de();wue=U({id:"sentry",label:"Sentry",iconKey:"sentry",defaultServerUrl:"https://mcp.sentry.dev/mcp",serverUrlPathSuffixMaxSegments:2,transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"sentry",callbackPathSegment:"sentry",authorizationUrl:"https://mcp.sentry.dev/oauth/authorize",tokenUrl:"https://mcp.sentry.dev/oauth/token",useServerUrlAsResource:!0,dynamicClientRegistration:{registrationEndpoint:"https://mcp.sentry.dev/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"org:read"},{value:"project:write"},{value:"team:write"},{value:"event:write"}],getUrlConfiguration:async()=>({docsUrl:"https://mcp.sentry.dev/",instructions:"Copy the hosted MCP server URL below. Optional: to scope this connection to one organization or project, copy a path-scoped URL from the Sentry MCP page (e.g. .../mcp/your-org).",defaultServerUrl:"https://mcp.sentry.dev/mcp",optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["@sentry packages, sentry.properties, SENTRY_* environment variables, or sentry-cli usage","Sentry.init calls, release/deploy automation, or Sentry alert docs","README/docs naming Sentry as the error tracking provider"],helpText:"Browse Sentry organizations, teams, projects, and events."})});var kue;var xue=h(()=>{_t();de();kue=U({id:"signoz",label:"SigNoz",iconKey:"signoz",defaultServerUrl:"https://mcp.us.signoz.cloud/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["SigNoz config, SIGNOZ_* environment variables, or signoz.io links","OpenTelemetry Collector exporting to SigNoz, or a signoz docker-compose / self-hosted deployment","README/docs naming SigNoz for metrics, logs, traces, alerts, or dashboards"],helpText:"Query SigNoz metrics, logs, traces, alerts, and dashboards to investigate production issues.",setupGroups:[{id:"instance",title:"Find your SigNoz instance",description:"Point Sazabi at the SigNoz instance whose telemetry you want to query.",body:"For SigNoz Cloud, use the regional MCP endpoint for your account, such as `https://mcp.us.signoz.cloud/mcp` (replace the region as needed). For self-hosted SigNoz, use your instance's MCP endpoint and set the SigNoz base URL below so the server knows which instance to target.",fieldKeys:["signozUrl"]},{id:"api-key",title:"Create an API key",description:"Create or copy the SigNoz API key Sazabi will send to SigNoz's MCP endpoint.",body:"In SigNoz, go to **Settings > API Keys** and create or copy an API key. Alert, dashboard, and notification-channel tools require an admin-level key. Paste it below.",fieldKeys:["apiKey"]}],validateCredentials:oce,normalizeHeaders:nce})});var Pue;var Rue=h(()=>{de();Pue=U({id:"slack",label:"Slack",iconKey:"slack",defaultServerUrl:"https://mcp.slack.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"slack",callbackPathSegment:"slack",authorizationUrl:"https://slack.com/oauth/v2_user/authorize",tokenUrl:"https://slack.com/api/oauth.v2.user.access"},getAvailableScopes:async()=>[{value:"search:read.public"},{value:"search:read.private"},{value:"search:read.mpim"},{value:"search:read.im"},{value:"search:read.files"},{value:"search:read.users"},{value:"canvases:read"},{value:"users:read"},{value:"users:read.email"}],getUrlConfiguration:async()=>null,capabilityOverrides:{defaultUnavailableReason:"write_blocked"},evidenceHints:["Slack app manifests, bot/webhook URLs, SLACK_* environment variables, or slack.com links","Runbooks that route incidents, alerts, or deploy notices through Slack","Code or docs naming Slack channels for operational triage"],helpText:"Browse Slack messages, files, and threads. Coming soon — requires backend OAuth plumbing for user_scope and isn't self-serve connectable yet.",skill:"slack",setupSkill:"slack-setup"})});var Tue;var Bue=h(()=>{de();Tue=U({id:"stripe",label:"Stripe MCP",iconKey:"stripe",defaultServerUrl:"https://mcp.stripe.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"stripe",callbackPathSegment:"stripe",authorizationUrl:"https://access.stripe.com/mcp/oauth2/authorize",tokenUrl:"https://access.stripe.com/mcp/oauth2/token",resourceUrl:"https://mcp.stripe.com",dynamicClientRegistration:{registrationEndpoint:"https://access.stripe.com/mcp/oauth2/register",tokenEndpointAuthMethod:"none"},defaultAccessTokenTtlSeconds:21600},getAvailableScopes:async()=>[{value:"mcp",label:"MCP access",description:"Access the Stripe MCP server tools for the connected account.",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Stripe dashboard URLs, `sk_`/`rk_`/`pk_` API keys, or Stripe object IDs (cus_, pi_, ch_)","STRIPE_* environment variables or code that imports the `stripe` SDK","README/runbooks naming Stripe for billing, payments, or subscriptions"],helpText:"Query and manage Stripe payments, customers, and billing."})});var Oue;var _ue=h(()=>{de();Oue=U({id:"supabase",label:"Supabase",iconKey:"supabase",defaultServerUrl:"https://mcp.supabase.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"supabase",callbackPathSegment:"supabase",authorizationUrl:"https://api.supabase.com/v1/oauth/authorize",tokenUrl:"https://api.supabase.com/v1/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://api.supabase.com/platform/oauth/apps/register",tokenEndpointAuthMethod:"client_secret_post"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"analytics:read"},{value:"auth:read"},{value:"auth:write"},{value:"database:read"},{value:"database:write"},{value:"domains:read"},{value:"domains:write"},{value:"edge_functions:read"},{value:"edge_functions:write"},{value:"environment:read"},{value:"environment:write"},{value:"organizations:read"},{value:"projects:read"},{value:"projects:write"},{value:"rest:read"},{value:"rest:write"},{value:"secrets:read"},{value:"secrets:write"},{value:"storage:read"}],getUrlConfiguration:async()=>({docsUrl:"https://supabase.com/docs/guides/getting-started/mcp#step-2-configure-your-ai-tool",instructions:"Choose your project and options in the Supabase configuration panel, then copy the generated Server URL.",defaultServerUrl:"https://mcp.supabase.com/mcp",optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["supabase/ directory, supabase/config.toml, or @supabase packages","SUPABASE_* or NEXT_PUBLIC_SUPABASE_* environment variables","README/docs naming Supabase for Postgres, Auth, Storage, or Edge Functions"],helpText:"Manage Supabase organizations, projects, databases, and run SQL.",skill:"supabase",setupSkill:"supabase-setup"})});var Due;var Lue=h(()=>{de();Due=U({id:"superhuman",label:"Superhuman",iconKey:"superhuman",defaultServerUrl:"https://mcp.mail.superhuman.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"superhuman",callbackPathSegment:"superhuman",authorizationUrl:"https://mcp.auth.mail.superhuman.com/oauth2/authorize",tokenUrl:"https://mcp.auth.mail.superhuman.com/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.auth.mail.superhuman.com/oauth2/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"email",required:!0},{value:"offline_access",required:!0},{value:"openid",required:!0},{value:"profile",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Superhuman mail links, SUPERHUMAN_* environment variables, or support workflows naming Superhuman","Customer communication runbooks that depend on email search or drafting","Docs naming Superhuman Mail for sales, support, or founder-led customer comms"],helpText:"Search, draft, send, and triage emails in Superhuman Mail."})});var Que;var Nue=h(()=>{_t();de();Que=U({id:"the-context-company",label:"The Context Company",iconKey:"the-context-company",defaultServerUrl:"https://api.thecontext.company/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!1},evidenceHints:["The Context Company, context company, or context observability references","insight_search, get_agent_runs, or get_agent_sessions tool usage","THE_CONTEXT_COMPANY_API_KEY or api.thecontext.company in MCP configuration"],helpText:"Query agent insights, runs, and sessions through The Context Company's read-only hosted MCP server.",setupGroups:[{id:"api-key",title:"Create a read-only API key",description:"Create the API key The Context Company's hosted MCP server will use.",body:"Generate a read-only API key on The Context Company's [Access Data page](https://www.thecontextcompany.com/prod/mcp-and-api), then paste the raw key below. Sazabi sends it as `Authorization: Bearer <key>` to `https://api.thecontext.company/mcp`.",fieldKeys:["apiKey"]}],validateCredentials:Kae,normalizeHeaders:Vae,skill:"the-context-company",setupSkill:"the-context-company-setup"})});var Mue;var zue=h(()=>{de();Mue=U({id:"vercel",label:"Vercel",iconKey:"vercel",defaultServerUrl:"https://mcp.vercel.com",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"vercel",callbackPathSegment:"vercel",authorizationUrl:"https://vercel.com/oauth/authorize",tokenUrl:"https://vercel.com/api/login/oauth/token",resourceUrl:"https://mcp.vercel.com",dynamicClientRegistration:{registrationEndpoint:"https://vercel.com/api/login/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"offline_access",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["vercel.com links, VERCEL_* environment variables, or a vercel.json in the repo","Deploy workflows or runbooks naming Vercel as the frontend/hosting provider","Vercel project/deployment IDs or preview URLs referenced in docs or CI"],helpText:"Manage Vercel projects, deployments, and access Vercel platform documentation. Coming soon — Vercel's hosted MCP only authorizes allowlisted clients and Sazabi is pending approval, so it isn't connectable yet."})});var jue;var Uue=h(()=>{_t();de();jue=U({id:"x",label:"X",iconKey:"x",defaultServerUrl:"https://api.x.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{readOnlyToolNames:["search_news","get_news","get_trends_by_woeid","get_posts_by_ids","get_posts_counts_recent","search_posts_all","get_posts_by_id","get_posts_liking_users","get_posts_quoted_posts","get_posts_reposted_by","get_users_by_usernames","get_users_by_username","get_users_me","search_users","get_users_by_id","get_users_bookmarks","get_users_bookmark_folders","get_users_bookmarks_by_folder_id","get_users_mentions","get_users_timeline","get_users_posts"]},evidenceHints:["X (Twitter) API usage, X_BEARER_TOKEN, or TWITTER_* environment variables","twitter-api-v2, tweepy, or other X/Twitter API client packages","README/docs naming the X API, X Developer Platform, or tweet automation"],helpText:"Search X posts and access real-time X data using your app's app-only Bearer Token.",setupGroups:[{id:"developer-app",title:"Open the X Developer Portal",description:"Use an X developer project/app with access to the X API v2.",body:"Go to the [X Developer Portal](https://developer.x.com/en/portal/dashboard), open the project and app you want Sazabi to use, and confirm the app has access to the API tiers you need. The hosted MCP server lives at `https://api.x.com/mcp`."},{id:"bearer-token",title:"Copy the app's Bearer Token",description:"Copy the app-only Bearer Token the hosted MCP server will use.",body:"In your app's **Keys and tokens**, find the app-only **Bearer Token** and copy it (regenerate it if you don't have it saved). This is the app-only token, not a user OAuth 2.0 access token. Paste the raw token into Sazabi — Sazabi adds the `Bearer ` prefix and sends it in the `Authorization` header.",fieldKeys:["accessToken"]}],validateCredentials:Yae,normalizeHeaders:qae,skill:"x",setupSkill:"x-setup"})});var $ue,zQt;var Gue=h(()=>{Tce();Oce();Dce();Qce();Mce();ZI();ZI();Uce();$ce();Hce();Vce();Yce();Jce();Xce();tle();ole();ile();ale();lle();dle();gle();hle();fle();ble();Sle();vle();Ele();xle();Rle();Ble();_le();Lle();Nle();zle();Ule();$le();Hle();Vle();Yle();Jle();Xle();tue();oue();iue();aue();lue();due();gue();hue();fue();bue();Sue();vue();Eue();xue();Rue();Bue();_ue();Lue();Nue();zue();Uue();$ue=[Oue,ple,mle,Bce,Rce,_ce,Lce,Nce,zce,jce,Fce,Gce,qce,Kce,Wce,ele,nle,rle,sle,Zce,cle,ule,Ale,yle,Ile,Cle,wle,kle,Ple,Tle,Ole,Dle,Qle,Mle,jle,Fle,Gle,qle,Kle,Wle,Zle,eue,nue,rue,sue,cue,uue,mue,pue,Aue,yue,Iue,Cue,wue,kue,Pue,Tue,Due,Que,Mue,jue],zQt=new Map($ue.map((e)=>[e.id,e]))});var Hue=()=>{};var que=()=>{};var Vue=()=>{};var Kue=()=>{};var Yue=()=>{};var Wue=()=>{};var Jue=()=>{};var Zue=()=>{};var Xue=()=>{};var ede=()=>{};var tde=()=>{};var nde=()=>{};var ode=()=>{};var rde=()=>{};var ide=()=>{};var sde=()=>{};var ade=()=>{};var cde=()=>{};var lde=()=>{};var ude=()=>{};var dde=()=>{};var pde=()=>{};var gde=()=>{};var mde=()=>{};var hde=()=>{};var Ade=()=>{};var fde=()=>{};var yde=()=>{};var bde=()=>{};var Ide=()=>{};var Sde=()=>{};var Cde=()=>{};var vde=()=>{};var wde=()=>{};var Ede=()=>{};var kde=()=>{};var xde=()=>{};var Pde=()=>{};var Rde=()=>{};var Tde=()=>{};var Bde=()=>{};var Ode=()=>{};var _de=()=>{};var Dde=()=>{};var Lde=h(()=>{Hue();que();Vue();Kue();Yue();Wue();Jue();Zue();Xue();ede();tde();nde();ode();rde();ide();sde();ade();cde();lde();ude();dde();pde();gde();mde();hde();Ade();fde();yde();bde();Ide();Sde();Cde();vde();wde();Ede();kde();xde();Pde();Rde();Tde();Bde();Ode();_de();Dde()});var Qde=h(()=>{ZI()});var Nde=()=>{};var Mde=h(()=>{sW();Yf();Mae();_t();vce();wce();Gue();uN();Lde();Qde();Nde()});var zde,H3e,jde,q3e,Ude,dN,Fde,$de,Is,Gde,Hde,qde,fu,Vde,Kde,yu,Yde,Wde,bu,Jde,V3e,Zde,XI,Xde,epe,tpe,npe,Iu,ope,rpe,Su,ipe,spe,Cu,pN,gN,ape,cpe,vu,lpe,upe,wu,dpe,K3e,Eu,ppe,gpe,ku,mpe,hpe,xu,Ape,fpe,Pu,Y3e;var mN=h(()=>{Mde();De();Ve();zde=["configured","authorizing","connected","error"],H3e=a.enum(zde),jde=["preset","custom"],q3e=a.enum(jde),Ude=["streamable-http","sse"],dN=a.enum(Ude),Fde=["none","headers","oauth","aws-sigv4"],$de=a.enum(Fde),Is=a.object({connectionId:a.string().uuid().describe("Connection ID."),connectionKey:a.string().describe("Stable key used to reference this connector in tool calls."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),source:q3e.describe("Whether the connector is a built-in preset or a custom server."),installStatus:H3e.describe("Current connection lifecycle status."),authMode:$de.describe("Authentication mode."),transport:dN.describe("Transport protocol."),serverUrl:a.string().describe("MCP server URL."),readOnly:a.boolean().describe("Whether the connector is restricted to read-only tools."),management:CB.describe("Lifecycle owner and supported connector mutations."),enabledToolCount:a.number().int().nonnegative().describe("Number of tools enabled and available for this connector."),connectedAt:a.string().datetime().nullable().describe("When the connector last became connected, if ever."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),Gde=a.object({name:a.string().describe("Tool name as invoked."),title:a.string().describe("Human-readable tool title."),description:a.string().describe("Tool description."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),enabled:a.boolean().describe("Whether the tool is enabled and available given the connector config.")}),Hde=a.object({projectId:a.string().uuid().optional().describe("Project to list connectors for. Auto-filled from SDK context when omitted."),connectedOnly:a.union([a.boolean(),a.stringbool()]).optional().describe("When true, only return connectors that are connected.")}),qde=a.object({connectors:a.array(Is)}),fu=w({operationId:"mcpConnectors.list",summary:"List MCP connectors",description:"List configured MCP connectors within one project with provider, status, and enabled-tool count.",backend:"api",route:{method:"GET",path:"/mcp-connectors",tags:["MCP Connectors"]},input:Hde,output:qde,pagination:"none",async:"sync"}),Vde=a.object({connectionId:a.string().uuid().describe("Connection ID to fetch."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),Kde=a.object({connector:Is}),yu=w({operationId:"mcpConnectors.get",summary:"Get an MCP connector",description:"Get one configured MCP connector by connection ID.",backend:"api",route:{method:"GET",path:"/mcp-connectors/{connectionId}",tags:["MCP Connectors"]},input:Vde,output:Kde,pagination:"none",async:"sync"}),Yde=a.object({connectionId:a.string().uuid().describe("Connection ID to inspect."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),Wde=a.object({connector:Is,tools:a.array(Gde)}),bu=w({operationId:"mcpConnectors.details",summary:"Inspect an MCP connector's tools",description:"Inspect one MCP connector's tool surface, including each tool's name, description, and read-only status.",backend:"api",route:{method:"GET",path:"/mcp-connectors/{connectionId}/details",tags:["MCP Connectors"]},input:Yde,output:Wde,pagination:"none",async:"sync"}),Jde=a.object({providerId:a.string().describe('Provider identifier, e.g. "linear".'),label:a.string().describe("Human-readable provider name."),authMode:$de.describe("Authentication mode."),availability:a.enum(Xc).describe("Whether the provider is enabled or coming soon."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),V3e=a.object({}),Zde=a.object({providers:a.array(Jde)}),XI=w({operationId:"mcpConnectors.listProviders",summary:"List MCP connector providers",description:"List all supported MCP connector providers with their auth mode and setup skill.",backend:"api",route:{method:"GET",path:"/mcp-connectors/providers",tags:["MCP Connectors"]},input:V3e,output:Zde,pagination:"none",async:"sync"}),Xde=a.object({connectionKey:a.string().describe("Stable key used to call this connector."),displayName:a.string().describe("Human-readable connector name."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),toolCount:a.number().int().nonnegative().describe("Number of executable tools on this connector.")}),epe=a.object({connectionKey:a.string().describe("Connector that exposes this tool."),toolName:a.string().describe("Tool name as invoked."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),description:a.string().describe("Tool description from the stored snapshot."),score:a.number().describe("BM25 rank score. Zero when enumerating a namespace."),inputSchema:a.record(a.string(),a.unknown()).optional().describe("JSON Schema for the tool's arguments, when requested.")}),tpe=a.object({projectId:a.string().uuid().optional().describe("Project to search connectors in. Auto-filled from SDK context when omitted."),query:a.string().optional().describe("Free-text query over tool names, titles, connector keys, and descriptions. Omit or empty to list connectors, or to enumerate one connector when namespace is set."),namespace:a.string().min(1).optional().describe("Restrict results to one connectionKey or providerId."),limit:a.coerce.number().int().min(1).max(100).default(10).describe("Maximum number of connectors or tool hits to return."),offset:a.coerce.number().int().min(0).default(0).describe("Number of connectors or tool hits to skip."),includeInputSchema:a.union([a.boolean(),a.stringbool()]).optional().describe("When true, tool hits include inputSchema so a caller can execute without a describe round-trip.")}),npe=a.object({kind:a.enum(["connectors","tools"]).describe("connectors when the query is empty and no namespace is set; tools otherwise."),total:a.number().int().nonnegative().describe("Total matches before limit and offset."),connectors:a.array(Xde).describe("Connector index. Empty when kind is tools."),tools:a.array(epe).describe("Ranked or enumerated tool hits. Empty when kind is connectors.")}),Iu=w({operationId:"mcpConnectors.search",summary:"Search MCP connector tools",description:"Search executable third-party MCP connector tools by free-text query. Empty query lists connectors; empty query plus namespace enumerates that connector. Hits omit input schemas unless includeInputSchema is true.",backend:"api",route:{method:"GET",path:"/mcp-connectors/tools/search",tags:["MCP Connectors"]},input:tpe,output:npe,pagination:"none",async:"sync"}),ope=a.object({projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),connectionKey:a.string().min(1).describe("Connector key from search or mcpConnectors.list."),toolName:a.string().min(1).describe("Tool name as invoked.")}),rpe=a.object({connectionKey:a.string().describe("Connector that exposes this tool."),toolName:a.string().describe("Tool name as invoked."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),title:a.string().describe("Human-readable tool title."),description:a.string().describe("Tool description from the stored snapshot."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),inputSchema:a.record(a.string(),a.unknown()).describe("JSON Schema for the tool's arguments.")}),Su=w({operationId:"mcpConnectors.describe",summary:"Describe an MCP connector tool",description:"Load one executable third-party MCP connector tool, including its input schema.",backend:"api",route:{method:"GET",path:"/mcp-connectors/tools/describe",tags:["MCP Connectors"]},input:ope,output:rpe,pagination:"none",async:"sync"}),ipe=a.object({projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),connectionKey:a.string().min(1).describe("Connector key from search or mcpConnectors.list."),toolName:a.string().min(1).describe("Tool name as invoked."),arguments:a.record(a.string(),a.unknown()).optional().describe("Arguments matching the tool's input schema.")}),spe=a.discriminatedUnion("ok",[a.object({ok:a.literal(!0),connectionKey:a.string().describe("Connector that ran the tool."),toolName:a.string().describe("Tool name as invoked."),result:a.unknown().describe("Vendor tool result payload."),structuredContent:a.unknown().optional().describe("Structured content from the vendor when present."),content:a.array(a.record(a.string(),a.unknown())).describe("Raw MCP content parts from the vendor."),text:a.string().nullable().describe("Concatenated text content, if any.")}),a.object({ok:a.literal(!1),code:a.enum(["TOOL_NOT_ENABLED","READ_ONLY","MCP_ERROR"]).describe("Why the tool did not run."),message:a.string().describe("Caller-facing error message.")})]),Cu=w({operationId:"mcpConnectors.call",summary:"Call an MCP connector tool",description:"Invoke one executable third-party MCP connector tool using that connection's stored credential.",backend:"api",route:{method:"POST",path:"/mcp-connectors/tools/call",tags:["MCP Connectors"]},input:ipe,output:spe,pagination:"none",async:"sync"}),pN=a.object({id:a.string().min(1).describe("Stable ID for this header (must be unique within the connector)."),name:a.string().trim().min(1).describe("HTTP header name."),value:a.string().min(1).describe("HTTP header value (passed verbatim).")}),gN=a.object({accessKeyId:a.string().trim().min(1).describe("AWS access key ID."),secretAccessKey:a.string().min(1).describe("AWS secret access key."),sessionToken:a.string().min(1).optional().describe("Optional session token for temporary credentials."),region:a.string().trim().min(1).describe("AWS region.")}),ape=a.object({projectId:a.string().uuid().optional().describe("Project to create the connector in. Auto-filled from SDK context when omitted."),serverUrl:a.string().url().describe("MCP server URL (must be https)."),transport:dN.describe("Transport protocol."),headers:a.array(pN).optional().describe("HTTP headers to send with each request."),awsSigV4:gN.optional().describe("AWS SigV4 credentials for AWS MCP servers."),providerId:a.string().min(1).describe("Built-in preset provider ID (for example, linear or datadog)."),readOnly:a.boolean().optional().describe("Restrict the connector to read-only tools. Defaults to false.")}),cpe=a.object({connector:Is}),vu=w({operationId:"mcpConnectors.create",summary:"Create an MCP connector",description:"Create a preset MCP connector with header-based or AWS SigV4 authentication. The server URL must match the selected provider's supported endpoints. Connects immediately and returns the connector with its discovered tool snapshot.",backend:"api",route:{method:"POST",path:"/mcp-connectors",tags:["MCP Connectors"],successStatus:201},input:ape,output:cpe,pagination:"none",async:"sync"}),lpe=a.object({connectionId:a.string().uuid().describe("Connection ID to update."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),serverUrl:a.string().url().optional().describe("New MCP server URL."),transport:dN.optional().describe("New transport protocol."),headers:a.array(pN).optional().describe("Complete replacement header set. Replaces all existing headers."),awsSigV4:gN.optional().describe("Replacement AWS SigV4 credentials. Mutually exclusive with headers.")}),upe=a.object({connector:Is}),wu=w({operationId:"mcpConnectors.update",summary:"Update an MCP connector",description:"Deprecated. Preset MCP connector updates are no longer supported via the public API; disconnect and reconnect instead.",backend:"api",route:{method:"PATCH",path:"/mcp-connectors/{connectionId}",tags:["MCP Connectors"]},input:lpe,output:upe,pagination:"none",async:"sync"}),dpe=a.object({connectionId:a.string().uuid().describe("Connection ID to disconnect."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),K3e=a.void(),Eu=w({operationId:"mcpConnectors.disconnect",summary:"Disconnect an MCP connector",description:"Disconnect and permanently remove an MCP connector.",backend:"api",route:{method:"DELETE",path:"/mcp-connectors/{connectionId}",tags:["MCP Connectors"],successStatus:204},input:dpe,output:K3e,pagination:"none",async:"sync"}),ppe=a.object({connectionId:a.string().uuid().describe("Connection ID to update."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),readOnly:a.boolean().describe("True to restrict to read-only tools; false to allow all enabled tools.")}),gpe=a.object({connector:Is}),ku=w({operationId:"mcpConnectors.setReadOnly",summary:"Toggle an MCP connector's read-only mode",description:"Toggle the read-only restriction on an MCP connector.",backend:"api",route:{method:"PATCH",path:"/mcp-connectors/{connectionId}/read-only",tags:["MCP Connectors"]},input:ppe,output:gpe,pagination:"none",async:"sync"}),mpe=a.object({projectId:a.string().uuid().optional().describe("Project to install into. Auto-filled from SDK context when omitted."),providerId:a.string().min(1).describe('Provider ID to install, e.g. "linear".'),requestedScopes:a.array(a.string()).optional().describe("Scopes to request. Defaults to the provider's recommended scope set."),serverUrl:a.string().url().optional().describe("Server URL for multi-region providers; defaults to the provider's primary server."),readOnly:a.boolean().optional().describe("Restrict the connector to read-only tools after install. Defaults to false."),returnTo:a.string().optional().describe("Path to redirect the user to after OAuth completes.")}),hpe=a.object({authorizationUrl:a.string().describe("Authorization URL to open in the user's browser."),connectionId:a.string().uuid().describe("Connection ID to poll for completion via getMcpOAuthInstallAttempt."),expiresAt:a.string().datetime().describe("When the OAuth authorization attempt expires.")}),xu=w({operationId:"mcpConnectors.beginOAuthInstall",summary:"Begin an MCP connector OAuth install",description:"Begin an OAuth browser flow to install a preset MCP connector. Opens an authorization URL in the user's browser; poll getMcpOAuthInstallAttempt with the returned connectionId to check completion.",backend:"api",route:{method:"POST",path:"/mcp-connectors/oauth/begin",tags:["MCP Connectors"],successStatus:201},input:mpe,output:hpe,pagination:"none",async:"sync"}),Ape=a.object({connectionId:a.string().uuid().describe("Connection ID returned by beginMcpOAuthInstall."),projectId:a.string().uuid().optional().describe("Project the connection belongs to. Auto-filled from SDK context when omitted.")}),fpe=a.object({status:a.enum(["authorizing","connected","error"]).describe("Current install status."),connector:Is.optional().describe("Connector details once connected or in error state.")}),Pu=w({operationId:"mcpConnectors.getOAuthInstallAttempt",summary:"Get an MCP connector OAuth install attempt",description:"Poll the status of an in-progress OAuth MCP connector install. Returns authorizing while the user completes the browser flow, connected on success, or error on failure.",backend:"api",route:{method:"GET",path:"/mcp-connectors/oauth/attempts/{connectionId}",tags:["MCP Connectors"]},input:Ape,output:fpe,pagination:"none",async:"sync"}),Y3e={list:fu.contract,get:yu.contract,details:bu.contract,listProviders:XI.contract,search:Iu.contract,describe:Su.contract,call:Cu.contract,create:vu.contract,update:wu.contract,disconnect:Eu.contract,setReadOnly:ku.contract,beginOAuthInstall:xu.contract,getOAuthInstallAttempt:Pu.contract}});var Ss,W3e,J3e,Z3e,X3e,e9e,t9e,n9e,hN,xjt;var eS=h(()=>{De();Ve();Ss=a.enum(["admin","member"]),W3e=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional(),role:Ss}),J3e=a.object({id:a.string().min(1),name:a.string().nullable(),email:a.string().email()}),Z3e=a.object({credentialType:a.literal("user"),user:J3e,authorizedOrganizationId:a.string().min(1).nullable(),authorizedProjectId:a.string().min(1).nullable(),organizations:a.array(W3e).describe("Organizations the user belongs to, including membership role.")}),X3e=a.object({credentialType:a.literal("secret"),organization:a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),keyName:a.string()}),e9e=a.object({credentialType:a.literal("partner"),superorganization:a.object({id:a.string().uuid(),name:a.string()})}),t9e=a.object({}),n9e=a.discriminatedUnion("credentialType",[Z3e,X3e,e9e]),hN=w({operationId:"me.get",summary:"Get the current credential",description:"Return the identity and available context for the current credential.",backend:"api",route:{method:"GET",path:"/me",tags:["Auth"]},input:t9e,output:n9e,pagination:"none",async:"sync"}),xjt=hN.contract});var ype,bpe,Ipe,o9e,r9e,i9e,s9e,a9e,c9e,AN,fN,yN,l9e,u9e,d9e,p9e,g9e,m9e,bN,IN,SN,Ojt;var Spe=h(()=>{De();Ve();eS();ype=a.object({membershipId:a.string().min(1).describe("Organization membership record ID."),userId:a.string().min(1).describe("User ID for the organization member."),name:a.string().nullable().describe("Display name for the member, when available."),email:a.string().email().describe("Email address for the member."),imageUrl:a.string().nullable().describe("Profile image URL for the member, when available."),role:Ss.describe("Organization role."),createdAt:a.string().datetime().describe("When the membership was created.")}),bpe=a.object({id:a.string().min(1).describe("Invitation ID."),email:a.string().email().describe("Invited email address."),role:Ss.describe("Role the invitee will receive when they accept."),status:a.string().min(1).describe('Invitation status (e.g. "pending").'),createdAt:a.string().datetime().describe("When the invitation was created."),expiresAt:a.string().datetime().describe("When the invitation expires.")}),Ipe=a.string().min(1).describe("A user ID, or a URL-encoded email address, of the member."),o9e=a.object({organizationId:a.string().min(1).optional().describe("Organization to list members for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),r9e=a.object({members:a.array(ype).describe("Members visible within the selected organization.")}),i9e=a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),member:Ipe.describe("User ID, or URL-encoded email address, of the member to update."),role:Ss.describe("Role to assign.")}),s9e=a.object({member:ype.describe("Updated organization member.")}),a9e=a.object({params:a.object({member:Ipe.describe("User ID, or URL-encoded email address, of the member to remove.")}),query:a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")})}).transform(({params:e,query:t})=>({...t,...e})),c9e=a.object({removedUserId:a.string().min(1).describe("User ID removed from the organization.")}),AN=w({operationId:"members.list",summary:"List members",description:"List members in an organization.",backend:"api",route:{method:"GET",path:"/members",tags:["Members"]},input:o9e,output:r9e,pagination:"none",async:"sync",examples:[{name:"organization-members",input:{organizationId:"organization-123"},output:{members:[{membershipId:"membership-123",userId:"user-123",name:"Alex Admin",email:"alex@example.com",imageUrl:null,role:"admin",createdAt:"2026-01-01T00:00:00.000Z"}]}}]}),fN=w({operationId:"members.updateRole",summary:"Update a member's role",description:"Update a member's organization role.",backend:"api",route:{method:"PATCH",path:"/members/{member}/role",tags:["Members"]},input:i9e,output:s9e,pagination:"none",async:"sync",examples:[{name:"promote-member",input:{organizationId:"organization-123",member:"user-456",role:"admin"},output:{member:{membershipId:"membership-456",userId:"user-456",name:"Mina Member",email:"mina@example.com",imageUrl:null,role:"admin",createdAt:"2026-01-01T00:00:00.000Z"}}}]}),yN=w({operationId:"members.remove",summary:"Remove a member",description:"Remove a member from an organization.",backend:"api",route:{method:"DELETE",path:"/members/{member}",tags:["Members"],inputStructure:"detailed"},input:a9e,output:c9e,pagination:"none",async:"sync"}),l9e=a.object({organizationId:a.string().min(1).optional().describe("Organization to invite into. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),email:a.string().email().describe("Email address to invite."),role:Ss.optional().default("member").describe('Role to grant on acceptance. Defaults to "member".')}),u9e=a.object({invitation:bpe.describe("The created pending invitation.")}),d9e=a.object({organizationId:a.string().min(1).optional().describe("Organization to list invitations for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),p9e=a.object({invitations:a.array(bpe).describe("Pending invitations visible within the selected organization.")}),g9e=a.object({params:a.object({invitationId:a.string().min(1).describe("ID of the invitation to revoke.")}),query:a.object({organizationId:a.string().min(1).optional().describe("Organization containing the invitation. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")})}).transform(({params:e,query:t})=>({...t,...e})),m9e=a.object({revokedInvitationId:a.string().min(1).describe("ID of the revoked invitation.")}),bN=w({operationId:"members.invite",summary:"Invite a member",description:"Invite a person to the organization by email.",backend:"api",route:{method:"POST",path:"/members/invitations",tags:["Members"],successStatus:201},input:l9e,output:u9e,pagination:"none",async:"sync",examples:[{name:"invite-member",input:{organizationId:"organization-123",email:"newhire@example.com",role:"member"},output:{invitation:{id:"invitation-123",email:"newhire@example.com",role:"member",status:"pending",createdAt:"2026-01-01T00:00:00.000Z",expiresAt:"2026-01-08T00:00:00.000Z"}}}]}),IN=w({operationId:"members.listInvitations",summary:"List invitations",description:"List pending invitations for an organization.",backend:"api",route:{method:"GET",path:"/members/invitations",tags:["Members"]},input:d9e,output:p9e,pagination:"none",async:"sync",examples:[{name:"organization-invitations",input:{organizationId:"organization-123"},output:{invitations:[{id:"invitation-123",email:"newhire@example.com",role:"member",status:"pending",createdAt:"2026-01-01T00:00:00.000Z",expiresAt:"2026-01-08T00:00:00.000Z"}]}}]}),SN=w({operationId:"members.revokeInvitation",summary:"Revoke an invitation",description:"Revoke a pending invitation.",backend:"api",route:{method:"DELETE",path:"/members/invitations/{invitationId}",tags:["Members"],inputStructure:"detailed"},input:g9e,output:m9e,pagination:"none",async:"sync"}),Ojt={list:AN.contract,updateRole:fN.contract,remove:yN.contract,invite:bN.contract,listInvitations:IN.contract,revokeInvitation:SN.contract}});var vpe,wpe,tS,Epe,nS,Cpe=4194304,CN,vN,h9e=(e)=>{let t=e.split(",").map((r)=>r.trim()).filter(Boolean),n=a.array(tS).safeParse(t);if(!n.success)throw Error("Kind filter must be a comma-separated list of note, runbook, or change.");return n.data},cm,wN,EN,kpe,xpe,Ppe,Rpe,Tpe,Bpe,Ope,_pe,Dpe,Lpe,Qpe,Npe,Ru,Tu,Bu,Ou,_u,A9e;var kN=h(()=>{De();Ve();vpe=["note","runbook"],wpe=["note","runbook","change"],tS=a.enum(wpe),Epe=a.enum(vpe),nS=a.string().min(1).max(512).refine((e)=>!e.startsWith("/"),{message:"Path must be relative without a leading slash."}).describe("Relative memory path, for example AGENTS.md or notes/architecture.md."),CN=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=Cpe,{message:`Memory body must be at most ${Cpe} bytes (4 MiB).`}).describe("Document body stored in project memory."),vN=a.string().regex(/^(\d+)(s|m|h|d)$/u,"Duration must use s, m, h, or d units, for example 7d or 30m.").describe("Relative time window, for example 7d or 30m."),cm=a.string().min(1).transform(h9e).describe("Comma-separated kinds, for example note,runbook."),wN=a.object({id:a.string().uuid(),projectId:a.string().uuid(),kind:tS,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),contentHash:a.string(),attrs:a.record(a.string(),a.unknown()),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),EN=wN.extend({body:CN}),kpe=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),path:nS.describe("Relative path for the curated document."),body:CN,kind:Epe.default("note").describe("Curated document kind. Only note and runbook may be written through the API."),title:a.string().max(500).optional().describe("Optional display title. Defaults to the path basename.")}),xpe=a.object({document:EN}),Ppe=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:nS.optional().describe("Relative curated path.")}).superRefine((e,t)=>{let n=e.id!==void 0,r=e.path!==void 0;if(n===r)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),Rpe=a.object({document:EN}),Tpe=a.object({projectId:a.string().uuid().optional().describe("Project to list memory for. Auto-filled from CLI and SDK context when omitted."),kind:cm.optional(),since:vN.optional().describe("Only return documents updated within this window, for example 7d."),service:a.string().min(1).optional().describe("Filter to documents whose attrs.services contains this value."),pathPrefix:a.string().min(1).optional().describe("Filter to paths starting with this prefix."),managed:a.coerce.boolean().optional(),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of documents to return per page.")}),Bpe=a.object({documents:a.array(wN),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Ope=a.object({documentId:a.string().uuid(),kind:tS,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),snippet:a.string(),score:a.number()}),_pe=a.object({calibrated:a.literal(!0),minScoreThreshold:a.number(),queryTerms:a.array(a.string()),message:a.string()}),Dpe=a.object({projectId:a.string().uuid().optional().describe("Project to search memory for. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1).max(500).describe("Natural-language search query."),kind:cm.optional(),since:vN.optional(),service:a.string().min(1).optional(),pathPrefix:a.string().min(1).optional(),managed:a.coerce.boolean().optional(),limit:a.coerce.number().int().min(1).max(50).default(10).describe("Maximum ranked search hits to return.")}),Lpe=a.object({hits:a.array(Ope),emptyVerdict:_pe.nullable()}),Qpe=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:nS.optional()}).superRefine((e,t)=>{let n=e.id!==void 0,r=e.path!==void 0;if(n===r)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),Npe=a.void(),Ru=w({operationId:"memory.put",summary:"Create or replace a memory document",description:"Create or replace a curated project memory document. Embeds on success.",backend:"api",route:{method:"PUT",path:"/memory",tags:["Memory"]},input:kpe,output:xpe,pagination:"none",async:"sync"}),Tu=w({operationId:"memory.get",summary:"Get a memory document",description:"Get one project memory document by id or path.",backend:"api",route:{method:"GET",path:"/memory/document",tags:["Memory"]},input:Ppe,output:Rpe,pagination:"none",async:"sync"}),Bu=w({operationId:"memory.list",summary:"List memory documents",description:"List project memory catalog rows without embedding search.",backend:"api",route:{method:"GET",path:"/memory",tags:["Memory"]},input:Tpe,output:Bpe,pagination:"cursor",async:"sync"}),Ou=w({operationId:"memory.search",summary:"Search project memory",description:"Hybrid semantic and keyword search over project memory documents.",backend:"api",route:{method:"POST",path:"/memory/search",tags:["Memory"]},input:Dpe,output:Lpe,pagination:"none",async:"sync"}),_u=w({operationId:"memory.delete",summary:"Delete a memory document",description:"Soft-delete a curated project memory document by id or path.",backend:"api",route:{method:"DELETE",path:"/memory/document",successStatus:204,tags:["Memory"]},input:Qpe,output:Npe,pagination:"none",async:"sync"}),A9e={put:Ru.contract,get:Tu.contract,list:Bu.contract,search:Ou.contract,delete:_u.contract}});var Mpe,zpe,f9e,y9e,b9e,I9e,S9e,lm,C9e,v9e,w9e,xN,PN,RN,TN,zjt;var oS=h(()=>{De();Ve();Mpe=a.enum(["processing","completed","aborted","error"]),zpe=a.object({id:a.string().uuid(),threadId:a.string().uuid(),userMessageId:a.string().uuid().nullable(),assistantMessageId:a.string().uuid().nullable(),parentRunId:a.string().uuid().nullable(),workflowRunId:a.string().nullable(),status:Mpe,source:a.enum(["app","api","mcp","slack","teams","linear","github","agent","cli","web","sdk","bitbucket","system"]),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),completedAt:a.string().datetime().nullable()}),f9e=a.object({projectId:a.string().uuid().optional().describe("Project ID to list runs for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),y9e=a.object({runs:a.array(zpe),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),b9e=a.object({threadId:a.string().uuid().describe("Thread ID to list runs for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),I9e=a.object({runs:a.array(zpe),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),S9e=a.object({runId:a.string().uuid().describe("Run ID returned by a deferred operation.")}),lm=a.object({completed:a.boolean().describe("Whether the run has reached a terminal status."),threadId:a.string().uuid().describe("Thread ID associated with the run."),runId:a.string().uuid().describe("Run ID for subsequent polling."),messageId:a.string().uuid().optional().describe("ID of the user message that triggered this run."),status:Mpe.describe("Current run lifecycle status."),response:a.string().nullable().describe("Assistant response text when the run has completed.")}),C9e=lm.describe("Current run state and, when complete, the assistant response."),v9e=a.object({runId:a.string().uuid().describe("Run ID of the in-flight run to request cancellation for.")}),w9e=a.object({success:a.literal(!0).describe("Always true when the cancellation request was accepted.")}),xN=w({operationId:"runs.list",summary:"List runs",description:"List deferred runs within one project.",backend:"api",route:{method:"GET",path:"/runs",tags:["Runs"]},input:f9e,output:y9e,pagination:"cursor",async:"sync"}),PN=w({operationId:"runs.listForThread",summary:"List runs for a thread",description:"List deferred runs for one thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/runs",tags:["Runs"]},input:b9e,output:I9e,pagination:"cursor",async:"sync"}),RN=w({operationId:"runs.get",summary:"Get a run",description:"Get the current result for a deferred run by run ID.",backend:"api",route:{method:"GET",path:"/runs/{runId}",tags:["Runs"]},input:S9e,output:C9e,pagination:"none",async:"sync",examples:[{name:"processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]}),TN=w({operationId:"runs.cancel",summary:"Cancel a run",description:"Request cancellation of an in-flight run. Idempotent and best-effort: returns success even when the run has already reached a terminal status.",backend:"api",route:{method:"POST",path:"/runs/{runId}/cancel",tags:["Runs"]},input:v9e,output:w9e,pagination:"none",async:"sync",examples:[{name:"cancel-processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{success:!0}}]}),zjt={list:xN.contract,listForThread:PN.contract,get:RN.contract,cancel:TN.contract}});var rS=(e,t,n)=>{let r=t?20000:1e4;if(e.length>r)n.addIssue({code:"too_big",maximum:r,type:"string",inclusive:!0,message:`Message cannot exceed ${r} characters`,origin:"string",path:["message"]})},iS=(e,t,n)=>{if(e&&!t)n.addIssue({code:"custom",message:"ambientServiceRun requires an automationId",path:["ambientServiceRun"]})};var jpe,um,E9e,k9e,x9e,P9e,R9e,T9e,B9e,O9e,_9e,BN,D9e,L9e,Q9e,N9e,M9e,z9e,j9e,U9e,F9e,$9e,G9e,H9e,ON,_N,DN,LN,QN,NN,Upe,q9e,V9e,K9e,Y9e,Fpe,W9e,J9e,Z9e,X9e,e6e,t6e,Fa="22222222-2222-4222-8222-222222222222",$pe="11111111-1111-4111-8111-111111111111",n6e="44444444-4444-4444-8444-444444444444",Gpe="55555555-5555-4555-8555-555555555555",MN,zN,jN,UN,FN,qjt;var $N=h(()=>{De();Ve();oS();jpe=a.enum(["slack","teams","linear","github","app","mcp","agent","api","cli","web","sdk","bitbucket","system"]),um=a.object({id:a.string().uuid(),projectId:a.string().uuid(),title:a.string().nullable(),status:a.enum(["regular","archived"]),source:jpe.nullable(),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),E9e=a.object({type:a.literal("message"),message:a.string()}),k9e=a.object({type:a.literal("reasoning"),reasoning:a.string(),status:a.enum(["in_progress","complete"]).optional()}),x9e=a.object({type:a.literal("tool_call"),name:a.string(),params:a.any().optional(),result:a.any().optional(),status:a.enum(["in_progress","success","error","unknown"]).optional(),toolCallId:a.string().optional(),durationMs:a.number().nonnegative().optional()}),P9e=a.object({type:a.literal("artifact"),name:a.enum(["timeseries","table","log_detail","integration_required","alert_card","issue_card","mdx"]),data:a.any(),toolCallId:a.string().optional()}),R9e=a.object({type:a.literal("fork"),sourceThreadId:a.string(),sourceMessageId:a.string(),sourceThreadTitle:a.string().nullable()}),T9e=a.object({type:a.literal("summary"),summary:a.string()}),B9e=a.object({type:a.literal("slack_context"),channelId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({timestamp:a.string(),slackUserId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),files:a.array(a.object({name:a.string(),mimetype:a.string(),size:a.number().optional(),attachmentId:a.string().uuid().optional(),ingestionStatus:a.enum(["attached","unsupported","oversized","skipped","unavailable"]).optional()})).optional()}))}),O9e=a.object({type:a.literal("teams_context"),conversationId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({activityId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),createdDateTime:a.string().optional()}))}),_9e=a.union([E9e,k9e,x9e,P9e,R9e,T9e,B9e,O9e]),BN=a.object({id:a.string().uuid(),role:a.enum(["user","assistant"]),content:a.array(_9e),source:jpe,createdAt:a.string().datetime()}),D9e=a.object({projectId:a.string().uuid().optional().describe("Project to list threads for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of threads to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:a.enum(["regular","archived"]).optional().describe("Filter by thread status. 'regular' returns active threads, 'archived' returns archived threads.")}),L9e=a.object({threads:a.array(um).describe("The page of threads matching the query."),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Q9e=a.object({threadId:a.string().uuid().describe("Thread ID returned by threads.list or threads.create.")}),N9e=a.object({thread:um.describe("The requested thread."),messages:a.array(BN).describe("Messages currently stored on the thread in chronological order.")}),M9e=a.object({projectId:a.string().uuid().optional().describe("Project to create the thread in. Auto-filled from CLI and SDK context when omitted."),message:a.string().min(1,"Message cannot be empty").describe("Initial user message that starts the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the agent run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{rS(e.message,e.automationId,t),iS(e.ambientServiceRun,e.automationId,t)}),z9e=lm.describe("Deferred run result for creating a thread."),j9e=a.object({threadId:a.string().uuid().describe("Thread ID whose current processing status should be returned.")}),U9e=a.object({status:a.enum(["idle","processing"]),lastRunStatus:a.enum(["error"]).nullable()}),F9e=a.object({threadId:a.string().uuid().describe("Thread ID whose active run should be stopped.")}),$9e=a.object({success:a.literal(!0).describe("Always true when the stop request was accepted.")}),G9e=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),status:a.enum(["regular","archived"]).describe("New status for the thread. 'archived' hides the thread from the sidebar.")}),H9e=a.object({thread:um.describe("The updated thread.")}),ON=w({operationId:"threads.list",summary:"List threads",description:"List threads in a project, optionally filtered by status.",backend:"api",route:{method:"GET",path:"/threads",tags:["Threads"]},input:D9e,output:L9e,pagination:"cursor",async:"sync",examples:[{name:"active-threads",input:{projectId:"11111111-1111-4111-8111-111111111111",status:"regular",limit:10},output:{threads:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:05:00.000Z"}],nextCursor:null}}]}),_N=w({operationId:"threads.get",summary:"Get a thread",description:"Get a thread and its messages.",backend:"api",route:{method:"GET",path:"/threads/{threadId}",tags:["Threads"]},input:Q9e,output:N9e,pagination:"none",async:"sync"}),DN=w({operationId:"threads.getStatus",summary:"Get a thread's status",description:"Get the current processing status for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/status",tags:["Threads"]},input:j9e,output:U9e,pagination:"none",async:"sync",examples:[{name:"processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{status:"processing",lastRunStatus:null}}]}),LN=w({operationId:"threads.stop",summary:"Stop a thread's run",description:"Stop a thread's in-flight run. Idempotent and best-effort: returns success even when the thread has no active run.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/stop",tags:["Threads"]},input:F9e,output:$9e,pagination:"none",async:"sync",examples:[{name:"stop-processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{success:!0}}]}),QN=w({operationId:"threads.create",summary:"Create a thread",description:"Create a thread with an initial message and optionally wait for the agent response.",backend:"api",route:{method:"POST",path:"/threads",tags:["Threads"],successStatus:201},input:M9e,output:z9e,pagination:"none",async:"deferred",examples:[{name:"async-handoff",input:{projectId:"11111111-1111-4111-8111-111111111111",message:"Investigate elevated 500s in production.",wait:!1,timeoutSeconds:20},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]}),NN=w({operationId:"threads.update",summary:"Update a thread",description:"Update a thread's status.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}",tags:["Threads"]},input:G9e,output:H9e,pagination:"none",async:"sync",examples:[{name:"archive-thread",input:{threadId:"22222222-2222-4222-8222-222222222222",status:"archived"},output:{thread:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"API returning 500s",status:"archived",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:10:00.000Z"}}}]}),Upe=a.enum(["private","organization"]),q9e=a.object({threadId:a.string().uuid().describe("Thread ID of the source thread to fork."),messageId:a.string().uuid().describe("Message ID in the source thread to fork from. The new thread copies messages up to and including this message.")}),V9e=a.object({thread:um.describe("The newly created forked thread.")}),K9e=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),visibility:Upe.describe("New visibility. 'private' restricts the thread to its owner; 'organization' shares it with the organization.")}),Y9e=a.object({thread:um.describe("The updated thread."),visibility:Upe.describe("The thread's resulting visibility.")}),Fpe=a.object({shareId:a.string().uuid().describe("Unique identifier for the snapshot."),threadId:a.string().uuid().describe("Thread the snapshot was taken from."),url:a.string().describe("Public read-only URL for the snapshot."),createdAt:a.string().datetime()}),W9e=a.object({threadId:a.string().uuid().describe("Thread ID to create a public read-only snapshot for.")}),J9e=a.object({share:Fpe.describe("The created share link.")}),Z9e=a.object({threadId:a.string().uuid().describe("Thread ID the snapshot belongs to."),shareId:a.string().uuid().describe("Snapshot ID to revoke.")}),X9e=a.void(),e6e=a.object({threadId:a.string().uuid().describe("Thread ID to list public snapshots for.")}),t6e=a.object({shares:a.array(Fpe).describe("Active share links for the thread.")}),MN=w({operationId:"threads.fork",summary:"Fork a thread",description:"Fork a thread from a specific message, creating a new thread that copies messages up to that point.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/fork",tags:["Threads"],successStatus:201},input:q9e,output:V9e,pagination:"none",async:"sync",examples:[{name:"fork-from-message",input:{threadId:Fa,messageId:n6e},output:{thread:{id:"66666666-6666-4666-8666-666666666666",projectId:$pe,title:"API returning 500s (fork)",status:"regular",source:"api",createdAt:"2026-01-01T00:20:00.000Z",updatedAt:"2026-01-01T00:20:00.000Z"}}}]}),zN=w({operationId:"threads.setVisibility",summary:"Set a thread's visibility",description:"Set a thread's visibility to private or organization.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}/visibility",tags:["Threads"]},input:K9e,output:Y9e,pagination:"none",async:"sync",examples:[{name:"make-private",input:{threadId:Fa,visibility:"private"},output:{thread:{id:Fa,projectId:$pe,title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:30:00.000Z"},visibility:"private"}}]}),jN=w({operationId:"threads.createShareLink",summary:"Create a thread share link",description:"Create a public read-only share link for a thread's current messages.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/share",tags:["Threads"],successStatus:201},input:W9e,output:J9e,pagination:"none",async:"sync",examples:[{name:"create-share-link",input:{threadId:Fa},output:{share:{shareId:Gpe,threadId:Fa,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}}}]}),UN=w({operationId:"threads.listShareLinks",summary:"List thread share links",description:"List active public share links for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/share",tags:["Threads"]},input:e6e,output:t6e,pagination:"none",async:"sync",examples:[{name:"list-share-links",input:{threadId:Fa},output:{shares:[{shareId:Gpe,threadId:Fa,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}]}}]}),FN=w({operationId:"threads.revokeShareLink",summary:"Revoke a thread share link",description:"Revoke a public share link for a thread.",backend:"api",route:{method:"DELETE",path:"/threads/{threadId}/share/{shareId}",successStatus:204,tags:["Threads"]},input:Z9e,output:X9e,pagination:"none",async:"sync"}),qjt={list:ON.contract,get:_N.contract,getStatus:DN.contract,stop:LN.contract,create:QN.contract,update:NN.contract,fork:MN.contract,setVisibility:zN.contract,createShareLink:jN.contract,listShareLinks:UN.contract,revokeShareLink:FN.contract}});var o6e,r6e,i6e,s6e,Hpe,qpe;var Vpe=h(()=>{De();Ve();oS();$N();o6e=a.object({threadId:a.string().uuid().describe("Thread ID to list messages for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of messages to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),r6e=a.object({messages:a.array(BN),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),i6e=a.object({threadId:a.string().uuid().describe("Thread ID to append the message to."),message:a.string().min(1,"Message cannot be empty").describe("Message body to append to the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the appended message run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{rS(e.message,e.automationId,t),iS(e.ambientServiceRun,e.automationId,t)}),s6e=lm.describe("Deferred run result for appending a message to an existing thread."),Hpe=w({operationId:"messages.list",summary:"List messages in a thread",description:"List messages in a thread with cursor pagination.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/messages",tags:["Messages"]},input:o6e,output:r6e,pagination:"cursor",async:"sync",examples:[{name:"thread-messages",input:{threadId:"22222222-2222-4222-8222-222222222222",limit:2},output:{messages:[{id:"33333333-3333-4333-8333-333333333333",role:"user",content:[{type:"message",message:"What changed in the intake pipeline?"}],source:"api",createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),qpe=w({operationId:"messages.append",summary:"Append a message to a thread",description:"Append a user message to an existing thread and trigger a deferred run.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/messages",successStatus:201,tags:["Messages"]},input:i6e,output:s6e,pagination:"none",async:"deferred",examples:[{name:"append-processing",input:{threadId:"22222222-2222-4222-8222-222222222222",message:"Follow up on the intake backlog.",wait:!1,timeoutSeconds:20},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]})});var ho,Ype,GN,Du,HN,sS,Cs,Wpe,Kpe;var dm=h(()=>{De();ho={IN_APP:"in_app",SLACK:"slack",SLACK_CHANNEL:"slack_channel",MICROSOFT_TEAMS_CHANNEL:"teams_channel",EMAIL:"email",SMS:"sms",INCIDENT_IO:"incident_io",PAGERDUTY:"pagerduty",ROOTLY:"rootly",WEBHOOK:"webhook"},Ype=[ho.IN_APP,ho.SLACK,ho.EMAIL,ho.SMS],GN=[ho.SLACK_CHANNEL,ho.MICROSOFT_TEAMS_CHANNEL,ho.INCIDENT_IO,ho.PAGERDUTY,ho.ROOTLY,ho.WEBHOOK],Du=Object.values(ho),HN=[...Du,"victorops"],sS=a.enum(Du),Cs=a.enum(GN),Wpe=[{channel:"in_app",name:"In-app",description:"Show notifications in your Sazabi notification feed.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/notifications"},{channel:"email",name:"Email",description:"Send notifications to your account email address.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/notifications"},{channel:"sms",name:"SMS",description:"Send notifications to your verified phone number.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/account?phone-number=add"},{channel:"slack",name:"Slack DMs",description:"Send personal notifications by Slack DM.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/connected-accounts/slack"},{channel:"slack_channel",name:"Slack",description:"Post this project's alerts to selected Slack channels.",scope:"project",destinationManagement:"slack_channels",projectIntegrationPath:"slack"},{channel:"teams_channel",name:"Microsoft Teams",description:"Post this project's alerts to selected Microsoft Teams channels.",scope:"project",destinationManagement:"teams_channels",projectIntegrationPath:"teams"},{channel:"incident_io",name:"incident.io",description:"Route this project's alerts to incident.io.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"incident-io"},{channel:"pagerduty",name:"PagerDuty",description:"Route this project's alerts to PagerDuty.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"pagerduty"},{channel:"rootly",name:"Rootly",description:"Route this project's alerts to Rootly.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"rootly"},{channel:"webhook",name:"Webhooks",description:"Send this project's alerts to configured HTTPS endpoints.",scope:"project",destinationManagement:"webhook_endpoints",projectSettingsPath:"webhooks"}],Kpe=new Set(Wpe.map(({channel:e})=>e));if(Kpe.size!==Du.length||Du.some((e)=>!Kpe.has(e)))throw Error("Notification channel definitions must represent every channel")});var Jpe,a6e=(e,t)=>e.value===t.value&&e.label===t.label&&e.scope===t.scope&&e.role===t.role&&e.defaultOff===t.defaultOff&&(e.defaultOffChannels??[]).join(",")===(t.defaultOffChannels??[]).join(",")&&e.email?.template===t.email?.template&&e.email?.ctaLabel===t.email?.ctaLabel&&(e.deliveryConditions??[]).join(",")===(t.deliveryConditions??[]).join(","),Qn=(e)=>{for(let t of Object.values(e)){let n=Jpe.get(t.value);if(n&&!a6e(n,t))throw Error(`Notification type registered twice with conflicting definitions: ${t.value}`);if(t.role!==void 0&&t.scope!=="org")throw Error(`Notification type role restrictions require org scope: ${t.value}`);if(t.label.trim().length===0)throw Error(`Notification type needs a display label: ${t.value}`);if(t.email&&t.email.ctaLabel.trim().length===0)throw Error(`Notification email presentation needs a CTA label: ${t.value}`);if(t.defaultOff&&t.defaultOffChannels)throw Error(`Notification type declares both defaultOff and defaultOffChannels: ${t.value}`);Jpe.set(t.value,t)}return e};var di=h(()=>{Jpe=new Map});var Zpe;var Xpe=h(()=>{di();Zpe=Qn({AUTOMATION_FINISHED:{value:"automation_finished",label:"Automation completed",scope:"project",defaultOff:!0},AUTOMATION_RUN_FAILED:{value:"automation_run_failed",label:"Automation run failed",scope:"project"}})});var aS;var qN=h(()=>{di();aS=Qn({BILLING_PLAN_UPGRADE_APPLIED:{value:"billing_plan_upgrade_applied",label:"Billing upgrade applied",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage billing"}},BILLING_PLAN_DOWNGRADE_SCHEDULED:{value:"billing_plan_downgrade_scheduled",label:"Billing downgrade scheduled",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage billing"}},BILLING_PLAN_DOWNGRADE_APPLIED:{value:"billing_plan_downgrade_applied",label:"Billing downgrade applied",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage billing"}},BILLING_CREDIT_BALANCE_LOW:{value:"billing_credit_balance_low",label:"Billing credits low",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage credits"}},BILLING_CREDIT_BALANCE_DEPLETED:{value:"billing_credit_balance_depleted",label:"Billing credits depleted",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage credits"}},BILLING_AUTO_TOP_UP_SETTINGS_CHANGED:{value:"billing_auto_top_up_settings_changed",label:"Billing auto top-up changed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage auto top-up"}},BILLING_AUTO_TOP_UP_FAILED:{value:"billing_auto_top_up_failed",label:"Billing auto top-up failed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage payment method"}},BILLING_INVOICE_PAID:{value:"billing_invoice_paid",label:"Billing invoice paid",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"View invoice"}},BILLING_INVOICE_PAYMENT_FAILED:{value:"billing_invoice_payment_failed",label:"Billing invoice payment failed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Update payment method"}},BILLING_SUBSCRIPTION_CANCELLATION_SCHEDULED:{value:"billing_subscription_cancellation_scheduled",label:"Billing cancellation scheduled",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage subscription"}},BILLING_SUBSCRIPTION_CANCELED:{value:"billing_subscription_canceled",label:"Billing subscription canceled",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"View billing"}},BILLING_PAYMENT_METHOD_EXPIRING:{value:"billing_payment_method_expiring",label:"Billing payment method expiring",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Update payment method"}},BILLING_PAYMENT_METHOD_CHANGED:{value:"billing_payment_method_changed",label:"Billing payment method changed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Review payment method"}},BILLING_NEGATIVE_BALANCE_COLLECTED:{value:"billing_negative_balance_collected",label:"Billing outstanding balance charged",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"View billing"}},BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED:{value:"billing_negative_balance_collection_failed",label:"Billing outstanding balance charge failed",scope:"org",role:"admin",email:{template:"billing",ctaLabel:"Manage payment method"}}})});var ege;var tge=h(()=>{di();ege=Qn({INTEGRATION_CONNECTED:{value:"integration_connected",label:"Integration connected",scope:"org",defaultOff:!0},INTEGRATION_DISCONNECTED:{value:"integration_disconnected",label:"Integration disconnected",scope:"org"}})});var nge;var oge=h(()=>{di();nge=Qn({ISSUE_TRIGGERED:{value:"issue_triggered",label:"Issue triggered",scope:"project",deliveryConditions:["component","severity"]},ISSUE_RESOLVED:{value:"issue_resolved",label:"Issue resolved",scope:"project",defaultOffChannels:["email"],deliveryConditions:["component","severity"]},ISSUE_IGNORED:{value:"issue_ignored",label:"Issue ignored",scope:"project",defaultOffChannels:["email"],deliveryConditions:["component","severity"]}})});var rge;var ige=h(()=>{di();rge=Qn({PROJECT_CREATED:{value:"project_created",label:"Project created",scope:"org",defaultOff:!0},PROJECT_DELETED:{value:"project_deleted",label:"Project deleted",scope:"org",defaultOff:!0},MEMBER_INVITED:{value:"member_invited",label:"Member invited",scope:"org",defaultOff:!0},USER_REMOVED:{value:"user_removed",label:"Member removed",scope:"org",defaultOff:!0},MCP_CONNECTOR_ADDED:{value:"mcp_connector_added",label:"MCP connector added",scope:"org",defaultOff:!0},MCP_CONNECTOR_REMOVED:{value:"mcp_connector_removed",label:"MCP connector removed",scope:"org",defaultOff:!0},SECRET_KEY_CREATED:{value:"secret_key_created",label:"Secret key created",scope:"org",defaultOff:!0},SECRET_KEY_DELETED:{value:"secret_key_deleted",label:"Secret key deleted",scope:"org",defaultOff:!0}})});var sge;var age=h(()=>{di();sge=Qn({SANDBOX_CREATED:{value:"sandbox_created",label:"Sandbox connected",scope:"project",defaultOff:!0},SANDBOX_DELETED:{value:"sandbox_deleted",label:"Sandbox disconnected",scope:"project",defaultOff:!0},LOG_SOURCE_CONNECTED:{value:"log_source_connected",label:"Log source connected",scope:"project",defaultOff:!0},LOG_SOURCE_DISCONNECTED:{value:"log_source_disconnected",label:"Log source disconnected",scope:"project"},GITHUB_CONNECTED:{value:"github_connected",label:"GitHub connected",scope:"project",defaultOff:!0},GITHUB_DISCONNECTED:{value:"github_disconnected",label:"GitHub disconnected",scope:"project"},CODE_REPO_CONNECTED:{value:"code_repo_connected",label:"Code repository connected",scope:"project",defaultOff:!0},CODE_REPO_DISCONNECTED:{value:"code_repo_disconnected",label:"Code repository disconnected",scope:"project"},PUBLIC_KEY_DEACTIVATED:{value:"public_key_deactivated",label:"Public key deactivated",scope:"project"}})});var cge;var lge=h(()=>{di();cge=Qn({SECURITY_ALERT:{value:"security_alert",label:"Security alert",scope:"org",role:"admin"}})});var VN,Pt,l6e,KN=(e)=>{let t=l6e.get(e)?.label;if(t)return t;let n=e.replace(/_/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):e};var pm=h(()=>{Xpe();qN();qN();tge();oge();ige();age();lge();di();VN={...cge,...rge,...ege,...Zpe,...nge,...sge,...aS},Pt=Object.fromEntries(Object.entries(VN).map(([e,t])=>[e,t.value])),l6e=new Map(Object.values(VN).map((e)=>[e.value,e]))});var cS,dge,PUt,Lr,RUt;var $a=h(()=>{pm();dm();dm();cS=Object.values(Pt),dge=[Pt.BILLING_PLAN_UPGRADE_APPLIED,Pt.BILLING_PLAN_DOWNGRADE_SCHEDULED,Pt.BILLING_PLAN_DOWNGRADE_APPLIED,Pt.BILLING_CREDIT_BALANCE_LOW,Pt.BILLING_CREDIT_BALANCE_DEPLETED,Pt.BILLING_AUTO_TOP_UP_SETTINGS_CHANGED,Pt.BILLING_AUTO_TOP_UP_FAILED,Pt.BILLING_INVOICE_PAID,Pt.BILLING_NEGATIVE_BALANCE_COLLECTED,Pt.BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED,Pt.BILLING_INVOICE_PAYMENT_FAILED,Pt.BILLING_SUBSCRIPTION_CANCELLATION_SCHEDULED,Pt.BILLING_SUBSCRIPTION_CANCELED,Pt.BILLING_PAYMENT_METHOD_EXPIRING,Pt.BILLING_PAYMENT_METHOD_CHANGED],PUt=new Set(dge),Lr=[Pt.ISSUE_TRIGGERED,Pt.ISSUE_RESOLVED,Pt.ISSUE_IGNORED,Pt.AUTOMATION_RUN_FAILED],RUt=new Set(Lr)});var gm,pge,gge=(e)=>typeof e==="string"&&(e in pge)?pge[e]:e,d6e;var mge=h(()=>{dm();De();$a();gm=a.enum(cS),pge={data_source_connected:"log_source_connected",data_source_disconnected:"log_source_disconnected"},d6e=a.preprocess(gge,gm)});var p6e;var hge=h(()=>{pm();$a();p6e=Lr.map((e)=>({notificationType:e,label:KN(e)}))});var Age=h(()=>{pm();$a()});var fge=h(()=>{dm();pm();$a();mge();hge();Age()});var yge=()=>{};var bge=h(()=>{$a()});var Ige=h(()=>{$a()});var YN=h(()=>{yge();bge();Ige();fge()});var A6e,f6e,y6e,b6e,I6e,S6e,C6e,WN,HFt;var Sge=h(()=>{YN();De();Ve();A6e=a.enum(["ready","missing","degraded","unavailable"]),f6e=a.object({id:a.string(),label:a.string(),status:a.enum(["active","inactive","degraded"]),statusLabel:a.string()}),y6e=a.object({channel:sS,name:a.string(),description:a.string(),scope:a.enum(["personal","project"]),enabled:a.boolean().nullable(),preferenceId:a.string().nullable(),prerequisite:a.object({status:A6e,statusLabel:a.string(),message:a.string()}),action:a.object({label:a.string(),href:a.string()}).nullable(),destinations:a.array(f6e),destinationManagement:a.enum(["none","slack_channels","teams_channels","integration_connections","webhook_endpoints"]),canCreateDestinations:a.boolean(),supportedNotificationTypes:a.array(gm)}),b6e=a.object({channel:Cs,enabled:a.boolean(),preferenceId:a.string().nullable()}),I6e=a.object({channel:Cs,notificationType:gm,enabled:a.boolean(),preferenceId:a.string()}),S6e=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),C6e=a.object({channelCards:a.array(y6e).length(10),channels:a.array(b6e),notificationTypePreferences:a.array(I6e),issueNotificationMinSeverity:a.enum(["low","medium","high","critical"])}),WN=w({operationId:"notificationChannels.getProject",summary:"List project notification channels",description:"List a project's notification channels with preferences, prerequisites, connection state, configured destinations, and supported notification types.",backend:"api",route:{method:"GET",path:"/notification-channels",tags:["Notification channels"]},input:S6e,output:C6e,pagination:"none",async:"sync"}),HFt={getProject:WN.contract}});var Cge,ZN,vge,XN,WFt,JFt,e0,t0=(e,t)=>{if((e.componentIds?.length||e.componentId)&&"componentIds"in e.condition&&e.condition.componentIds?.length)t.addIssue({code:"custom",path:["condition","componentIds"],message:"Use componentIds instead of legacy condition.componentIds."});if(e.componentIds?.length&&e.componentId)t.addIssue({code:"custom",path:["componentId"],message:"Use componentIds instead of componentId."})},ZFt,wge,JN,n0,mm,Ege,v6e,w6e,E6e,k6e,x6e,P6e,R6e,T6e,B6e,o0,r0,i0,s0,a0,XFt;var kge=h(()=>{YN();De();Ve();Cge=a.enum(["low","medium","high","critical"]),ZN=a.object({severities:a.array(Cge).min(1).optional()}).strict(),vge=a.object({componentIds:a.array(a.string().uuid()).min(1).optional(),severities:a.array(Cge).min(1).optional()}).strict(),XN=a.object({channel:Cs,destinationKey:a.string().min(1)}),WFt=a.object({destinations:a.array(XN).min(1),notificationTypes:a.array(a.enum(Lr)).min(1),componentIds:a.array(a.string().uuid()).min(1).optional().describe("Stable component registry IDs matched by this rule."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:ZN}),JFt=a.object({destinations:a.array(XN).min(1),notificationTypes:a.array(a.enum(Lr)).min(1),condition:vge}),e0=a.object({destinations:a.array(XN).min(1),notificationTypes:a.array(a.enum(Lr)).min(1),componentIds:a.array(a.string().uuid()).min(1).optional().describe("Stable component registry IDs matched by this rule."),componentId:a.string().uuid().optional().describe("Deprecated single-component compatibility input."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:a.union([ZN,vge])}),ZFt=e0.superRefine(t0),wge=a.object({id:a.string(),channel:Cs,destinationKey:a.string(),displayName:a.string()}),JN=a.object({id:a.string().uuid(),label:a.string(),lifecycle:a.enum(["active","inactive","merged"])}),n0=a.object({id:a.string().uuid(),projectId:a.string().uuid(),notificationTypes:a.array(a.enum(Lr)),destinations:a.array(wge),condition:ZN,component:JN.nullable(),componentId:a.string().uuid().nullable(),includeDescendants:a.boolean(),suspendedAt:a.string().datetime().nullable(),suspensionReason:a.string().nullable(),components:a.array(JN),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),mm=a.object({projectId:a.string().uuid().optional().describe("Project whose notification delivery rules are being managed.")}),Ege=a.string().uuid().describe("Logical notification delivery rule ID."),v6e=mm,w6e=a.object({rules:a.array(n0)}),E6e=a.object({destinations:a.array(wge),notificationTypes:a.array(a.object({notificationType:a.enum(Lr),label:a.string(),conditions:a.array(a.enum(["component","severity"]))})),components:a.array(JN)}),k6e=mm.extend(e0.shape).superRefine(t0),x6e=n0,P6e=mm.extend({...e0.shape,ruleId:Ege}).superRefine(t0),R6e=n0,T6e=mm.extend({ruleId:Ege}),B6e=a.object({removed:a.boolean()}),o0=w({operationId:"notificationDeliveryRules.list",summary:"List delivery rules",description:"List the positive delivery rules for a project.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:v6e,output:w6e,pagination:"none",async:"sync"}),r0=w({operationId:"notificationDeliveryRules.options",summary:"Get delivery rule options",description:"List available destinations, events, and conditions for project delivery rules.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules/options",tags:["Notification delivery rules"]},input:mm,output:E6e,pagination:"none",async:"sync"}),i0=w({operationId:"notificationDeliveryRules.create",summary:"Create a delivery rule",description:"Create a positive project notification delivery rule.",backend:"api",route:{method:"POST",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:k6e,output:x6e,pagination:"none",async:"sync"}),s0=w({operationId:"notificationDeliveryRules.update",summary:"Update a delivery rule",description:"Replace a positive delivery rule atomically.",backend:"api",route:{method:"PUT",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:P6e,output:R6e,pagination:"none",async:"sync"}),a0=w({operationId:"notificationDeliveryRules.delete",summary:"Delete a delivery rule",description:"Delete a positive delivery rule without deleting its reusable destinations.",backend:"api",route:{method:"DELETE",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:T6e,output:B6e,pagination:"none",async:"sync"}),XFt={list:o0.contract,options:r0.contract,create:i0.contract,update:s0.contract,delete:a0.contract}});var c0,O6e,_6e,D6e,L6e,Q6e,N6e,l0,M6e,z6e,u0,j6e,U6e,d0,F6e,$6e,p0,G6e,H6e,g0,o$t;var xge=h(()=>{De();Ve();c0=a.enum(["verify-email","accept-invite","create-organization","billing","configure-project","connect-github-account","install-github-app","configure-code-search","install-slack-app","configure-slack-notifications","trigger-issue","confirm-issue","finish"]),O6e=a.enum(["needs-onboarding","blocked","ready"]),_6e=a.enum(["incomplete","complete","skipped"]),D6e=a.object({invitationId:a.string(),organizationId:a.string(),organizationName:a.string(),organizationSlug:a.string(),organizationImageUrl:a.string().nullable(),inviterName:a.string().nullable()}),L6e=a.object({gate:O6e,canonicalStep:c0.nullable(),organizationId:a.string().nullable(),projectId:a.string().nullable(),completionByStep:a.record(c0,_6e),githubSkipped:a.boolean(),githubAppSkipped:a.boolean(),slackSkipped:a.boolean(),sampleIssueId:a.string().nullable(),actorRole:a.enum(["admin","member"]).nullable(),requiredStep:a.union([c0,a.literal("select-organization")]).nullable(),isCompleted:a.boolean(),onboardingRecommendationsThreadId:a.string().nullable(),hasOrganizations:a.boolean(),hasPaidBillingSubscription:a.boolean(),billingStepEnabled:a.boolean(),pendingInvitations:a.array(D6e)}),Q6e=a.object({organizationId:a.string().min(1).optional().describe("Organization to resolve onboarding state for. User credentials must belong to it. Defaults to the credential's organization context. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project whose onboarding state to bind (sample-issue attempt and project-scoped facts). Auto-filled from CLI and SDK context when omitted.")}),N6e=a.object({onboarding:L6e}),l0=w({operationId:"onboarding.getState",summary:"Get onboarding state",description:"Read onboarding progress for the authenticated user.",backend:"api",route:{method:"GET",path:"/onboarding/state",tags:["Onboarding"]},input:Q6e,output:N6e,pagination:"none",async:"sync"}),M6e=a.object({integration:a.enum(["github","slack"]).describe("Integration onboarding step to skip."),organizationId:a.string().min(1).optional().describe("Organization to resolve onboarding state for. User credentials must belong to it. Defaults to the credential's organization context. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project used to resolve the organization whose onboarding state is written. Without it, the credential's active organization is used — which for CLI user tokens is the server session's organization, not the CLI's selected one.")}),z6e=a.object({skipped:a.literal(!0)}),u0=w({operationId:"onboarding.skipIntegration",summary:"Skip an integration step",description:"Skip a GitHub or Slack integration step during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-integration",tags:["Onboarding"]},input:M6e,output:z6e,pagination:"none",async:"sync"}),j6e=a.object({organizationId:a.string().min(1).optional().describe("Organization to resolve onboarding state for. User credentials must belong to it. Defaults to the credential's organization context. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project used to resolve the organization whose onboarding state is written. Without it, the credential's active organization is used — which for CLI user tokens is the server session's organization, not the CLI's selected one.")}),U6e=a.object({skipped:a.literal(!0)}),d0=w({operationId:"onboarding.skipGithubAppInstallation",summary:"Skip GitHub App installation",description:"Skip GitHub App installation during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-github-app",tags:["Onboarding"]},input:j6e,output:U6e,pagination:"none",async:"sync"}),F6e=a.object({organizationId:a.string().min(1).optional().describe("Organization to resolve onboarding state for. User credentials must belong to it. Defaults to the credential's organization context. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),projectId:a.string().uuid().optional().describe("Project used to resolve the organization whose onboarding state is written. Without it, the credential's active organization is used — which for CLI user tokens is the server session's organization, not the CLI's selected one.")}),$6e=a.object({skipped:a.literal(!0)}),p0=w({operationId:"onboarding.skipSampleIssue",summary:"Skip the test issue",description:"Skip the optional test issue during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-sample-issue",tags:["Onboarding"]},input:F6e,output:$6e,pagination:"none",async:"sync"}),G6e=a.object({projectId:a.string().uuid().describe("Project that completed onboarding.")}),H6e=a.object({completed:a.boolean()}),g0=w({operationId:"onboarding.finish",summary:"Finish onboarding",description:"Mark onboarding complete when all prerequisites are satisfied.",backend:"api",route:{method:"POST",path:"/onboarding/finish",tags:["Onboarding"]},input:G6e,output:H6e,pagination:"none",async:"sync"}),o$t={getState:l0.contract,skipIntegration:u0.contract,skipGithubAppInstallation:d0.contract,skipSampleIssue:p0.contract,finish:g0.contract}});var lS,q6e,V6e,K6e,Y6e,W6e,J6e,Z6e,X6e,e5e,t5e,m0,h0,A0,f0,c$t;var Pge=h(()=>{De();Ve();eS();lS=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),q6e=lS.extend({role:Ss.optional()}),V6e=a.object({}),K6e=a.object({organizations:a.array(q6e).describe("Organizations available to the current credential.")}),Y6e=a.object({organizationId:a.string().min(1).describe("Organization ID to fetch.")}),W6e=a.object({organization:lS}),J6e=a.object({organizationId:a.string().min(1).describe("Organization ID to update. SDK and CLI callers can auto-fill this before dispatch."),name:a.string().trim().min(1).max(100).describe("New organization name.")}),Z6e=a.object({organization:lS.describe("Updated organization.")}),X6e=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),e5e=a.object({name:X6e.describe("Organization display name.")}),t5e=a.object({organization:lS}),m0=w({operationId:"organizations.create",summary:"Create an organization",description:"Create an organization for the authenticated user.",backend:"api",route:{method:"POST",path:"/organizations",tags:["Organizations"],successStatus:201},input:e5e,output:t5e,pagination:"none",async:"sync"}),h0=w({operationId:"organizations.list",summary:"List organizations",description:"List organizations available to the current credential.",backend:"api",route:{method:"GET",path:"/organizations",tags:["Organizations"]},input:V6e,output:K6e,pagination:"none",async:"sync"}),A0=w({operationId:"organizations.get",summary:"Get an organization",description:"Get one organization by ID.",backend:"api",route:{method:"GET",path:"/organizations/{organizationId}",tags:["Organizations"]},input:Y6e,output:W6e,pagination:"none",async:"sync"}),f0=w({operationId:"organizations.update",summary:"Update an organization",description:"Update one organization.",backend:"api",route:{method:"PATCH",path:"/organizations/{organizationId}",tags:["Organizations"]},input:J6e,output:Z6e,pagination:"none",async:"sync",examples:[{name:"rename-organization",input:{organizationId:"organization-123",name:"Observed Platform"},output:{organization:{id:"organization-123",name:"Observed Platform",slug:"acme",logo:null}}}]}),c$t={list:h0.contract,get:A0.contract,create:m0.contract,update:f0.contract}});var Lu,hm,Rge,Tge,Bge,Oge,_ge,Dge,Lge,uS,dS,pS,Qge,Nge,gS,Mge,zge,mS,n5e;var y0=h(()=>{De();Ve();Lu=a.enum(["us-east-1","us-east-2","us-west-1","us-west-2","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3"]),hm=a.object({id:a.string().uuid(),organizationId:a.string().min(1),name:a.string(),region:Lu}),Rge=a.object({organizationId:a.string().min(1).optional().describe("Organization to list projects for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).")}),Tge=a.object({projects:a.array(hm).describe("Projects visible within the selected organization.")}),Bge=a.object({projectId:a.string().uuid().describe("Project ID to fetch.")}),Oge=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),_ge=a.object({organizationId:a.string().min(1).optional().describe("Organization to create the project under. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),name:Oge.describe("Project name."),region:Lu.optional().default("us-west-2").describe("AWS region where the new project should be created.")}),Dge=a.object({project:hm}),Lge=a.object({project:hm}),uS=w({operationId:"projects.list",summary:"List projects",description:"List projects in an organization.",backend:"api",route:{method:"GET",path:"/projects",tags:["Projects"]},input:Rge,output:Tge,pagination:"none",async:"sync"}),dS=w({operationId:"projects.get",summary:"Get a project",description:"Get one project by ID.",backend:"api",route:{method:"GET",path:"/projects/{projectId}",tags:["Projects"]},input:Bge,output:Lge,pagination:"none",async:"sync"}),pS=w({operationId:"projects.create",summary:"Create a project",description:"Create one project in an organization.",backend:"api",route:{method:"POST",path:"/projects",successStatus:201,tags:["Projects"]},input:_ge,output:Dge,pagination:"none",async:"sync"}),Qge=a.object({projectId:a.string().uuid().describe("Project ID to update."),name:Oge.optional().describe("New project name.")}),Nge=a.object({project:hm}),gS=w({operationId:"projects.update",summary:"Update a project",description:"Update (rename) one project by ID. User credentials require the `settings:write` organization permission (admin or owner role).",backend:"api",route:{method:"PATCH",path:"/projects/{projectId}",tags:["Projects"]},input:Qge,output:Nge,pagination:"none",async:"sync"}),Mge=a.object({projectId:a.string().uuid().describe("Project ID to delete.")}),zge=a.void(),mS=w({operationId:"projects.delete",summary:"Delete a project",description:"Delete one project by ID. User credentials require the `settings:write` organization permission (admin or owner role).",backend:"api",route:{method:"DELETE",path:"/projects/{projectId}",successStatus:204,tags:["Projects"]},input:Mge,output:zge,pagination:"none",async:"sync"}),n5e={list:uS.contract,get:dS.contract,create:pS.contract,update:gS.contract,delete:mS.contract}});var jge,o5e,r5e,i5e,s5e,a5e,b0,h$t;var Uge=h(()=>{De();Ve();jge=a.enum(["open","merged","closed"]),o5e=a.enum(["review_required","approved","changes_requested"]),r5e=a.enum(["passing","failing","pending"]),i5e=a.object({id:a.string().uuid(),projectId:a.string().uuid(),repositoryFullName:a.string(),pullRequestId:a.string().describe("Provider-native pull request identifier (GitHub PR number or Bitbucket PR id), serialized as a string."),githubPullRequestId:a.number().int().describe("Deprecated: use pullRequestId. Numeric form of the provider-native pull request identifier; kept for backward compatibility."),title:a.string().nullable(),url:a.string().nullable(),status:jge.nullable(),reviewState:o5e.nullable(),checksState:r5e.nullable(),requestedByUserId:a.string().nullable(),authorLogin:a.string().nullable().describe("Forge login that authored the pull request (often the Sazabi app identity)."),githubAuthorLogin:a.string().nullable().describe("Deprecated: use authorLogin. Kept for backward compatibility."),threadId:a.string().uuid().nullable(),runId:a.string().uuid().nullable(),createdAt:a.string().datetime(),mergedAt:a.string().datetime().nullable(),closedAt:a.string().datetime().nullable()}),s5e=a.object({projectId:a.string().uuid().optional().describe("Project to list pull requests for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of pull requests to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:jge.optional().describe("Filter by pull request status (open, merged, or closed)."),repositoryFullName:a.string().trim().optional().describe("Filter by repository full name, for example owner/repo. Case-insensitive."),requestedByUserId:a.string().trim().optional().describe("Filter by the Sazabi user who requested the pull request. Pass 'me' to filter to the authenticated user.")}),a5e=a.object({pullRequests:a.array(i5e),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),b0=w({operationId:"pullRequests.list",summary:"List pull requests",description:"List pull requests that Sazabi opened, optionally filtered by status, repository, and requesting user.",backend:"api",route:{method:"GET",path:"/pull-requests",tags:["Pull Requests"]},input:s5e,output:a5e,pagination:"cursor",async:"sync"}),h$t={list:b0.contract}});var Fge,$ge,Gge,Hge,qge,Am;var I0=h(()=>{De();Ve();Fge=a.enum(["log_source","mcp_connector","sandbox_cli","integration"]),$ge=a.enum(["connected","recommended"]),Gge=a.object({kind:Fge.describe("What the recommendation targets: a log source, MCP connector, sandbox CLI, or integration."),targetId:a.string().describe("Exact catalog id for the kind (log source type, MCP provider id, sandbox CLI preset type, or integration provider id)."),status:$ge.describe("Resolved live against current connections: connected (already set up) or recommended (suggested, not yet connected)."),roiScore:a.number().int().min(0).max(100).describe("Intrinsic ROI score, 0–100 — a normalized blend of how valuable, how easy to connect, and how proven the item is. A pure function of the item; computed live on read, never stored."),priority:a.number().int().min(1).describe("1-based rank within this list, sorted by roiScore (best first). Items are already returned in priority order; the field lets consumers recover the rank without trusting array position.")}),Hge=a.object({projectId:a.string().uuid().optional().describe("Project to list recommendations for. Auto-filled from CLI and SDK context when omitted.")}),qge=a.object({recommendations:a.array(Gge).describe("The project's configuration recommendations, deduped by (kind, targetId), with status resolved live and each item's ROI score. Returned in priority order (highest roiScore first).")}),Am=w({operationId:"recommendations.list",summary:"List recommendations",description:"List a project's configuration recommendations (data sources, MCP connectors, sandbox CLIs, and integrations) with each item's live connection status.",backend:"api",route:{method:"GET",path:"/recommendations",tags:["Recommendations"]},input:Hge,output:qge,pagination:"none",async:"sync"})});var Vge,S0,Kge,Yge,Wge,Jge,Zge,Xge,fm,ym,bm;var C0=h(()=>{De();Ve();Vge=a.enum(["github","bitbucket"]),S0=a.object({id:a.string().uuid().describe("Repository row id — stable across access sources; use it as the path id for repos.remove."),accessSourceId:a.string().uuid().describe("Access source granting this view of the repository (GitHub App installation, personal connection, or integration). Pass to repos.add to link the repository through this source."),source:a.enum(["githubApp","personal","integration"]).describe("Kind of access source granting this view: an organization GitHub App installation, the caller's personal forge connection, or an organization integration."),sourceLabel:a.string().describe('Display label for the access source (e.g. "GitHub app", "Personal").'),provider:Vge.describe("Forge hosting the repository."),owner:a.string().describe("Repository owner (user or organization)."),name:a.string().describe("Repository name without the owner."),fullName:a.string().describe("Full name in owner/name form."),defaultBranch:a.string().nullable().describe("Default branch, when the forge reports one."),isPrivate:a.boolean().describe("Whether the repository is private."),linked:a.boolean().describe("Whether the repository is already linked to the project.")}),Kge=a.object({projectId:a.string().uuid().optional().describe("Project to list repositories for. Auto-filled from CLI and SDK context when omitted.")}),Yge=a.object({repos:a.array(S0).describe("Every repository available to the project's organization (from GitHub App installations, the caller's personal forge connections, and integrations), with `linked` marking the ones already linked to the project.")}),Wge=a.object({projectId:a.string().uuid().optional().describe("Project to link the repositories to. Auto-filled from CLI and SDK context when omitted."),accessSourceIds:a.array(a.string().uuid()).min(1).describe("Access source ids (from repos.list) to link. Select only one access source per repository.")}),Jge=a.object({repos:a.array(S0).describe("The now-linked repositories.")}),Zge=a.object({id:a.string().uuid().describe("Repository row id (from repos.list) to unlink."),projectId:a.string().uuid().optional().describe("Project to unlink the repository from. Auto-filled from CLI and SDK context when omitted.")}),Xge=a.void(),fm=w({operationId:"repos.list",summary:"List repositories",description:"List the repositories available to a project — every repository reachable through the organization's GitHub App installations, the caller's personal forge connections, and integrations — with each one's linked status.",backend:"api",route:{method:"GET",path:"/repos",tags:["Repos"]},input:Kge,output:Yge,pagination:"none",async:"sync"}),ym=w({operationId:"repos.add",summary:"Link repositories to a project",description:"Link repositories to a project by access source id. Select only one access source per repository; re-linking an already-linked repository refreshes its selected access source.",backend:"api",route:{method:"POST",path:"/repos",tags:["Repos"]},input:Wge,output:Jge,pagination:"none",async:"sync"}),bm=w({operationId:"repos.remove",summary:"Unlink a repository from a project",description:"Unlink a repository from a project by repository row id.",backend:"api",route:{method:"DELETE",path:"/repos/{id}",successStatus:204,tags:["Repos"]},input:Zge,output:Xge,pagination:"none",async:"sync"})});var eme,c5e,tme,hS,nme,ome,rme,ime,Qu,v0,sme,ame,Nu,cme,lme,Mu,ume,dme,zu,l5e;var w0=h(()=>{De();Ve();eme=a.object({type:a.string().describe("Preset type identifier."),label:a.string().describe("Human-readable display name."),executableNames:a.array(a.string()).describe("CLI binary names installed by this preset."),envVarKeys:a.array(a.string()).describe("Environment variables required for authentication."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),c5e=a.object({}),tme=a.object({types:a.array(eme)}),hS=w({operationId:"sandboxPresets.listTypes",summary:"List CLI types",description:"List all supported sandbox CLI types with their environment variable requirements and setup skills.",backend:"api",route:{method:"GET",path:"/sandbox-presets/types",tags:["Sandbox Presets"]},input:c5e,output:tme,pagination:"none",async:"sync"}),nme=a.enum(["github_app","bitbucket_integration","personal_access_token","stored_credentials"]),ome=a.object({presetType:a.string().describe("Preset type identifier."),credentialSource:nme.describe("Authoritative credential source for the preset."),isSystemManaged:a.boolean().describe("Whether the connection follows an integration lifecycle."),fallbackConfigured:a.boolean().describe("Whether user-provided fallback credentials are stored for this preset."),envVarKeys:a.array(a.string()).describe("Stored environment variable names. Secret values are omitted.")}),rme=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted.")}),ime=a.object({connections:a.array(ome)}),Qu=w({operationId:"sandboxPresets.listConnections",summary:"List CLI connections",description:"List a project's stored and integration-backed sandbox CLI connections without returning secret values.",backend:"api",route:{method:"GET",path:"/sandbox-presets/connections",tags:["Sandbox Presets"]},input:rme,output:ime,pagination:"none",async:"sync"}),v0=a.object({key:a.string().min(1).max(256).regex(/^[A-Za-z_][A-Za-z0-9_]*$/,"Environment variable keys must match /^[A-Za-z_][A-Za-z0-9_]*$/.").describe("Environment variable name (e.g. KUBECONFIG_CONTENTS)."),value:a.string().max(10240).describe("Secret value. Encrypted at rest; never returned by any API response.")}),sme=a.object({projectId:a.string().uuid().optional().describe("Project to configure. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:a.string().min(1).describe("Preset type identifier (e.g. kubectl, aws, github)."),environmentVariables:a.array(v0).max(100).describe("Full set of env vars for this preset. Replaces any previously stored values for the preset.")}),ame=a.object({projectId:a.string().uuid().describe("Project the preset was written to."),presetType:a.string().describe("Preset type that was upserted."),envVarKeys:a.array(a.string()).describe("Env var key names now stored for this preset. Values are never returned.")}),Nu=w({operationId:"sandboxPresets.upsertPreset",summary:"Upsert CLI connection",description:"Set or replace a project's CLI connection credentials (e.g. the kubectl CLI's KUBECONFIG_CONTENTS). Values are encrypted server-side and never returned. Requires write access to the target project.",backend:"api",route:{method:"POST",path:"/sandbox-presets/config",successStatus:200,tags:["Sandbox Presets"]},input:sme,output:ame,pagination:"none",async:"sync"}),cme=a.object({projectId:a.string().uuid().optional().describe("Project to update. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:a.string().min(1).describe("Preset type identifier.")}),lme=a.object({projectId:a.string().uuid().describe("Project the CLI connection belonged to."),presetType:a.string().describe("Preset type that was disconnected."),deleted:a.boolean().describe("Whether a stored CLI connection was deleted.")}),Mu=w({operationId:"sandboxPresets.deletePreset",summary:"Disconnect CLI",description:"Delete a project's stored CLI connection. Integration-managed access remains available until its owning integration is disconnected.",backend:"api",route:{method:"DELETE",path:"/sandbox-presets/config/{presetType}",tags:["Sandbox Presets"]},input:cme,output:lme,pagination:"none",async:"sync"}),ume=a.object({projectId:a.string().uuid().optional().describe("Project to test from. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:a.string().min(1).describe("Preset type identifier."),environmentVariables:a.array(v0).max(100).describe("Unsaved credentials to validate in a readonly sandbox.")}),dme=a.object({status:a.enum(["success","failed"]),message:a.string().nullable(),stdout:a.string().describe("Truncated command output with submitted credentials redacted."),stderr:a.string().describe("Truncated command errors with submitted credentials redacted.")}),zu=w({operationId:"sandboxPresets.testPreset",summary:"Test CLI connection",description:"Validate unsaved CLI credentials in a read-only ephemeral sandbox without persisting them.",backend:"api",route:{method:"POST",path:"/sandbox-presets/test",tags:["Sandbox Presets"]},input:ume,output:dme,pagination:"none",async:"sync"}),l5e={deletePreset:Mu.contract,listConnections:Qu.contract,listTypes:hS.contract,testPreset:zu.contract,upsertPreset:Nu.contract}});var AS,pme=1048576,E0,gme,k0,u5e,d5e,p5e,g5e,m5e,h5e,A5e,f5e,y5e,b5e,x0,P0,R0,T0,B0,P$t;var mme=h(()=>{De();Ve();AS=a.string().min(1).max(64).regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/,"Name must start with a letter or digit and contain only letters, digits, underscores, and hyphens (max 64 characters).").describe("Script name. Must be unique within the project among non-deleted scripts."),E0=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=pme,{message:`Script content must be at most ${pme} bytes (1 MiB).`}).describe("Bash script body materialized as /home/sazabi/scripts/<name>.sh in the sandbox."),gme=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),contentHash:a.string().describe("sha256 hex digest of the script content."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),k0=gme.extend({content:E0}),u5e=a.object({projectId:a.string().uuid().optional().describe("Project to list scripts for. Auto-filled from CLI and SDK context when omitted."),search:a.string().optional().describe("Case-insensitive partial match on script name."),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of scripts to return per page.")}),d5e=a.object({scripts:a.array(gme),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),p5e=a.object({name:AS.describe("Script name to fetch."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),g5e=a.object({script:k0}),m5e=a.object({projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),name:AS.describe("Script name. Must be unique within the project among non-deleted scripts."),content:E0,description:a.string().max(500).nullable().optional().describe("Optional human-readable description.")}),h5e=a.object({script:k0}),A5e=a.object({name:AS.describe("Script to update."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),content:E0.optional().describe("New script body. Omit to leave content unchanged."),description:a.string().max(500).nullable().optional().describe("New description, or null to clear it. Omit to leave unchanged.")}),f5e=a.object({script:k0}),y5e=a.object({name:AS.describe("Script to delete."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),b5e=a.void(),x0=w({operationId:"scripts.list",summary:"List scripts",description:"List durable bash scripts stored for a project.",backend:"api",route:{method:"GET",path:"/scripts",tags:["Scripts"]},input:u5e,output:d5e,pagination:"cursor",async:"sync"}),P0=w({operationId:"scripts.get",summary:"Get a script",description:"Get a single project script by name, including its body.",backend:"api",route:{method:"GET",path:"/scripts/{name}",tags:["Scripts"]},input:p5e,output:g5e,pagination:"none",async:"sync"}),R0=w({operationId:"scripts.create",summary:"Create a script",description:"Create a durable bash script for a project.",backend:"api",route:{method:"POST",path:"/scripts",successStatus:201,tags:["Scripts"]},input:m5e,output:h5e,pagination:"none",async:"sync"}),T0=w({operationId:"scripts.update",summary:"Update a script",description:"Update a project script's body and/or description.",backend:"api",route:{method:"PATCH",path:"/scripts/{name}",tags:["Scripts"]},input:A5e,output:f5e,pagination:"none",async:"sync"}),B0=w({operationId:"scripts.delete",summary:"Delete a script",description:"Soft-delete a project script by name.",backend:"api",route:{method:"DELETE",path:"/scripts/{name}",successStatus:204,tags:["Scripts"]},input:y5e,output:b5e,pagination:"none",async:"sync"}),P$t={list:x0.contract,get:P0.contract,create:R0.contract,update:T0.contract,delete:B0.contract}});var O0,hme,Ame,fme,yme,ju,Uu,I5e;var _0=h(()=>{De();Ve();O0=a.object({projectId:a.string().uuid().optional().describe("Project to search within. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1,"Query must be at least 1 character").max(500,"Query must be at most 500 characters"),limit:a.coerce.number().min(1).max(100).default(20).describe("Maximum number of search results to return."),page:a.coerce.number().min(1).default(1).describe("One-based page number.")}),hme=O0.extend({status:a.enum(["regular","archived"]).optional().describe("Optional thread status filter.")}),Ame=O0.extend({threadId:a.string().uuid().optional().describe("Optional thread restriction for message search."),role:a.enum(["user","assistant"]).optional().describe("Optional message role filter.")}),fme=a.object({threads:a.array(a.object({id:a.string().uuid(),projectId:a.string().uuid().optional(),title:a.string(),status:a.enum(["regular","archived"]),labels:a.array(a.string()),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),yme=a.object({messages:a.array(a.object({id:a.string().uuid(),threadId:a.string().uuid(),threadTitle:a.string(),role:a.enum(["user","assistant"]),content:a.string(),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),ju=w({operationId:"search.threads",summary:"Search threads",description:"Search threads within one project.",backend:"api",route:{method:"GET",path:"/search/threads",tags:["Search"]},input:hme,output:fme,pagination:"page",async:"sync",examples:[{name:"search-open-incidents",input:{projectId:"11111111-1111-4111-8111-111111111111",query:"payment timeout",status:"regular",limit:10,page:1},output:{threads:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"Payment timeout in us-west-2",status:"regular",labels:["payments","timeout"],createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-02T00:00:00.000Z",highlights:["payment timeout"],score:123.45}],pagination:{page:1,limit:10,totalResults:1,totalPages:1}}}]}),Uu=w({operationId:"search.messages",summary:"Search messages",description:"Search messages within one project.",backend:"api",route:{method:"GET",path:"/search/messages",tags:["Search"]},input:Ame,output:yme,pagination:"page",async:"sync",examples:[{name:"search-assistant-messages",input:{projectId:"11111111-1111-4111-8111-111111111111",query:"rollback",role:"assistant",limit:10,page:1},output:{messages:[{id:"33333333-3333-4333-8333-333333333333",threadId:"22222222-2222-4222-8222-222222222222",threadTitle:"Deployment rollback guidance",role:"assistant",content:"Rollback the ingestion deployment and confirm queue depth.",createdAt:"2026-01-02T00:00:00.000Z",updatedAt:"2026-01-02T00:00:00.000Z",highlights:["Rollback the ingestion deployment"],score:98.76}],pagination:{page:1,limit:10,totalResults:1,totalPages:1}}}]}),I5e={threads:ju.contract,messages:Uu.contract}});var fS,bme,D0,Im,S5e,C5e,v5e,w5e,E5e,k5e,x5e,P5e,R5e,T5e,L0,Q0,N0,M0,z0,B5e,O5e,j0,L$t;var Ime=h(()=>{De();Ve();fS=a.string().uuid().describe("Signal definition ID."),bme=a.string().min(1).max(200).describe("Human-readable expression name."),D0=a.string().min(1).max(8192).describe("CEL expression evaluated against ingested log events."),Im=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),expression:D0,enabled:a.boolean(),compiledVersion:a.number().int(),linkedAutomationIds:a.array(a.string().uuid()).optional().describe("Automations bound to this expression. Included on list/get when available."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),S5e=a.object({projectId:a.string().uuid().optional().describe("Project to list signal definitions for. Auto-filled from CLI and SDK context when omitted.")}),C5e=a.object({signalDefinitions:a.array(Im)}),v5e=a.object({signalDefinitionId:fS,projectId:a.string().uuid().optional().describe("Project that owns the signal definition. Auto-filled from CLI and SDK context when omitted.")}),w5e=a.object({signalDefinition:Im}),E5e=a.object({projectId:a.string().uuid().optional().describe("Project to create the expression in. Auto-filled from CLI and SDK context when omitted."),name:bme,expression:D0,enabled:a.boolean().optional().describe("Whether the expression starts enabled. Defaults to true.")}),k5e=a.object({signalDefinition:Im}),x5e=a.object({signalDefinitionId:fS,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted."),name:bme.optional(),expression:D0.optional(),enabled:a.boolean().optional().describe("Whether the expression is enabled.")}),P5e=a.object({signalDefinition:Im}),R5e=a.object({signalDefinitionId:fS,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted.")}),T5e=a.object({signalDefinition:Im}),L0=w({operationId:"signalDefinitions.list",summary:"List signal definitions",description:"List signal definitions in a project.",backend:"api",route:{method:"GET",path:"/signal-definitions",tags:["Signal definitions"]},input:S5e,output:C5e,pagination:"none",async:"sync"}),Q0=w({operationId:"signalDefinitions.get",summary:"Get a signal definition",description:"Get a single signal definition by ID.",backend:"api",route:{method:"GET",path:"/signal-definitions/{signalDefinitionId}",tags:["Signal definitions"]},input:v5e,output:w5e,pagination:"none",async:"sync"}),N0=w({operationId:"signalDefinitions.create",summary:"Create a signal definition",description:"Create a CEL signal definition for a project.",backend:"api",route:{method:"POST",path:"/signal-definitions",successStatus:201,tags:["Signal definitions"]},input:E5e,output:k5e,pagination:"none",async:"sync"}),M0=w({operationId:"signalDefinitions.update",summary:"Update a signal definition",description:"Update a signal definition's name, CEL body, or enabled state.",backend:"api",route:{method:"PATCH",path:"/signal-definitions/{signalDefinitionId}",tags:["Signal definitions"]},input:x5e,output:P5e,pagination:"none",async:"sync"}),z0=w({operationId:"signalDefinitions.disable",summary:"Disable a signal definition",description:"Disable a signal definition so it stops matching logs.",backend:"api",route:{method:"POST",path:"/signal-definitions/{signalDefinitionId}/disable",tags:["Signal definitions"]},input:R5e,output:T5e,pagination:"none",async:"sync"}),B5e=a.object({signalDefinitionId:fS,projectId:a.string().uuid().optional().describe("Project that owns the signal definition. Auto-filled from CLI and SDK context when omitted.")}),O5e=a.void(),j0=w({operationId:"signalDefinitions.delete",summary:"Delete a signal definition",description:"Permanently delete a signal definition.",backend:"api",route:{method:"DELETE",path:"/signal-definitions/{signalDefinitionId}",successStatus:204,tags:["Signal definitions"]},input:B5e,output:O5e,pagination:"none",async:"sync"}),L$t={list:L0.contract,get:Q0.contract,create:N0.contract,update:M0.contract,disable:z0.contract,delete:j0.contract}});var Sme;var Cme=h(()=>{Sme=["onboarding","setup"]});var vme,wme,Eme,kme,Sm;var U0=h(()=>{Cme();De();Ve();vme=a.enum(Sme),wme=a.object({id:a.string().describe("Unique task identifier (e.g. install_github_app)."),label:a.string().describe("Short human-readable task name."),description:a.string().describe("Explanation of what needs to be completed to satisfy this task."),instructions:a.string().describe("Step-by-step instructions for completing this task."),completed:a.boolean().describe("Whether the task has been completed."),completedAt:a.string().datetime().nullable().describe("ISO 8601 timestamp of when the task was completed, or null."),category:vme.describe("Task category: onboarding (core setup steps) or setup (additional configuration).")}),Eme=a.object({projectId:a.string().uuid().optional().describe("Project to list tasks for. Auto-filled from CLI and SDK context when omitted.")}),kme=a.object({tasks:a.array(wme).describe("All onboarding and setup tasks with their current completion status.")}),Sm=w({operationId:"tasks.list",summary:"List tasks",description:"List all onboarding and setup tasks for a project, including their current completion status and a description of what is required to complete each task.",backend:"api",route:{method:"GET",path:"/tasks",tags:["Tasks"]},input:Eme,output:kme,pagination:"none",async:"sync"})});var _5e,D5e,Ga,L5e,Q5e,N5e,M5e,z5e,j5e,U5e,F5e,$5e,G5e,H5e,q5e,V5e,K5e,F0,$0,G0,H0,q0,V0,K0,G$t;var xme=h(()=>{De();Ve();_5e=a.object({id:a.string().uuid().describe("Team ID."),name:a.string().describe("Team name, unique among the org's active teams."),description:a.string().nullable().describe("Optional team description."),createdAt:a.string().datetime().describe("When the team was created."),memberCount:a.number().int().nonnegative().describe("Number of active members in the team.")}),D5e=a.object({userId:a.string().min(1).describe("User ID of the team member."),name:a.string().nullable().describe("Display name for the member, when available."),email:a.string().email().describe("Email address for the member."),addedAt:a.string().datetime().describe("When the member was added to the team.")}),Ga=a.string().min(1).optional().describe("Organization to operate on. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies)."),L5e=a.object({organizationId:Ga}),Q5e=a.object({teams:a.array(_5e).describe("Active teams in the organization.")}),N5e=a.object({organizationId:Ga,name:a.string().trim().min(1).describe("Team name."),description:a.string().trim().min(1).optional().describe("Optional team description.")}),M5e=a.object({id:a.string().uuid().describe("ID of the created team.")}),z5e=a.object({organizationId:Ga,teamId:a.string().uuid().describe("Team to update."),name:a.string().trim().min(1).optional().describe("New team name."),description:a.string().trim().min(1).nullable().optional().describe("New team description; null clears it.")}),j5e=a.object({id:a.string().uuid().describe("ID of the updated team.")}),U5e=a.object({params:a.object({teamId:a.string().uuid().describe("Team to delete.")}),query:a.object({organizationId:Ga})}).transform(({params:e,query:t})=>({...t,...e})),F5e=a.object({success:a.literal(!0).describe("The team and its memberships were removed.")}),$5e=a.object({organizationId:Ga,teamId:a.string().uuid().describe("Team to add the member to."),userId:a.string().min(1).describe("User ID of an active organization member to add.")}),G5e=a.object({id:a.string().uuid().describe("ID of the team membership.")}),H5e=a.object({params:a.object({teamId:a.string().uuid().describe("Team to remove the member from."),userId:a.string().min(1).describe("User ID of the member to remove.")}),query:a.object({organizationId:Ga})}).transform(({params:e,query:t})=>({...t,...e})),q5e=a.object({success:a.literal(!0).describe("The membership was removed.")}),V5e=a.object({organizationId:Ga,teamId:a.string().uuid().describe("Team to list members for.")}),K5e=a.object({members:a.array(D5e).describe("Active members of the team.")}),F0=w({operationId:"teams.list",summary:"List teams",description:"List teams in an organization.",backend:"api",route:{method:"GET",path:"/teams",tags:["Teams"]},input:L5e,output:Q5e,pagination:"none",async:"sync",examples:[{name:"organization-teams",input:{organizationId:"organization-123"},output:{teams:[{id:"5c0f9866-31ab-4237-94cc-a1d0ba2f6de2",name:"Payments",description:"Owns checkout and billing components.",createdAt:"2026-01-01T00:00:00.000Z",memberCount:4}]}}]}),$0=w({operationId:"teams.create",summary:"Create a team",description:"Create a team in an organization.",backend:"api",route:{method:"POST",path:"/teams",tags:["Teams"],successStatus:201},input:N5e,output:M5e,pagination:"none",async:"sync"}),G0=w({operationId:"teams.update",summary:"Update a team",description:"Rename a team or update its description.",backend:"api",route:{method:"PATCH",path:"/teams/{teamId}",tags:["Teams"]},input:z5e,output:j5e,pagination:"none",async:"sync"}),H0=w({operationId:"teams.delete",summary:"Delete a team",description:"Delete a team, its memberships, and its component-ownership assignments.",backend:"api",route:{method:"DELETE",path:"/teams/{teamId}",tags:["Teams"],inputStructure:"detailed"},input:U5e,output:F5e,pagination:"none",async:"sync"}),q0=w({operationId:"teams.addMember",summary:"Add a team member",description:"Add an active organization member to a team.",backend:"api",route:{method:"POST",path:"/teams/{teamId}/members",tags:["Teams"],successStatus:201},input:$5e,output:G5e,pagination:"none",async:"sync"}),V0=w({operationId:"teams.removeMember",summary:"Remove a team member",description:"Remove a member from a team.",backend:"api",route:{method:"DELETE",path:"/teams/{teamId}/members/{userId}",tags:["Teams"],inputStructure:"detailed"},input:H5e,output:q5e,pagination:"none",async:"sync"}),K0=w({operationId:"teams.listMembers",summary:"List team members",description:"List a team's active members.",backend:"api",route:{method:"GET",path:"/teams/{teamId}/members",tags:["Teams"]},input:V5e,output:K5e,pagination:"none",async:"sync"}),G$t={list:F0.contract,create:$0.contract,update:G0.contract,delete:H0.contract,addMember:q0.contract,removeMember:V0.contract,listMembers:K0.contract}});var Y5e,W5e,J5e,Y0,Z5e,X5e,W0,eXe,tXe,J0,K$t;var Pme=h(()=>{De();Ve();Y5e=a.object({kind:a.enum(["user","workspace"]),name:a.string().optional(),email:a.string().optional()}),W5e=a.object({container:a.string().min(1).describe("The container to create the work item in: its id, short key (e.g. a Linear team key like ENG), or display name."),title:a.string().min(1),bodyMarkdown:a.string().optional(),state:a.string().optional(),itemType:a.string().optional(),organizationId:a.string().min(1).optional().describe("Optional organization ID to scope the request to. User credentials must belong to it; a secret key may only reference its own organization. Omitting it currently falls back to the session's active organization for user tokens (deprecated); a future release will require it for user-token callers."),clientRequestId:a.string().min(1).optional().describe("Optional caller-supplied idempotency key. When provided, retrying the same logical create with the same clientRequestId reuses the original result instead of creating a duplicate external work item.")}).strict(),J5e=a.object({identifier:a.string(),title:a.string(),url:a.string(),state:a.string(),attribution:Y5e.optional(),reused:a.boolean()}),Y0=w({operationId:"work-items.create",summary:"Create a work item",description:"Create a work item (e.g. a Linear issue) in a connected issue tracker, attributing the write to the requesting user.",backend:"api",route:{method:"POST",path:"/work-items",tags:["Work Items"],successStatus:201},input:W5e,output:J5e,pagination:"none",async:"sync"}),Z5e=a.object({itemId:a.string().min(1).describe("The work item to comment on."),bodyMarkdown:a.string().min(1),organizationId:a.string().min(1).optional().describe("Optional organization ID to scope the request to. User credentials must belong to it; a secret key may only reference its own organization. Omitting it currently falls back to the session's active organization for user tokens (deprecated); a future release will require it for user-token callers.")}).strict(),X5e=a.object({identifier:a.string(),url:a.string()}),W0=w({operationId:"work-items.comment",summary:"Comment on a work item",description:"Add a comment to an existing work item.",backend:"api",route:{method:"POST",path:"/work-items/{itemId}/comment",tags:["Work Items"]},input:Z5e,output:X5e,pagination:"none",async:"sync"}),eXe=a.object({itemId:a.string().min(1).describe("The work item to transition."),state:a.string().min(1).describe("The target workflow state."),organizationId:a.string().min(1).optional().describe("Optional organization ID to scope the request to. User credentials must belong to it; a secret key may only reference its own organization. Omitting it currently falls back to the session's active organization for user tokens (deprecated); a future release will require it for user-token callers.")}).strict(),tXe=a.object({identifier:a.string(),title:a.string(),url:a.string(),state:a.string(),changed:a.boolean()}),J0=w({operationId:"work-items.transition",summary:"Transition a work item",description:"Move a work item to a target workflow state.",backend:"api",route:{method:"POST",path:"/work-items/{itemId}/transition",tags:["Work Items"]},input:eXe,output:tXe,pagination:"none",async:"sync"}),K$t={create:Y0.contract,comment:W0.contract,transition:J0.contract}});var Z0;var Rme=h(()=>{M1();q1();tR();aR();h2();FR();HR();Hf();NY();hB();mN();eS();Spe();kN();Vpe();Sge();kge();xge();Pge();y0();Uge();I0();C0();oS();w0();mme();_0();Ime();U0();xme();$N();Pme();Z0={me:hN.contract,automations:{list:lR.contract,get:uR.contract,create:dR.contract,update:pR.contract,enable:gR.contract,disable:mR.contract,runs:{list:hR.contract,get:AR.contract,logs:fR.contract}},logs:{query:Kc.contract,schema:Yc.contract,volume:Wc.contract,patterns:Jc.contract,nativeQuery:Zc.contract},logSources:{listProviders:Uf.contract,list:qc.contract,create:Vc.contract,get:Ff.contract,update:$f.contract,delete:Gf.contract},logStreams:{list:cB.contract,create:lB.contract,get:uB.contract,update:dB.contract,delete:pB.contract,reassign:gB.contract},connectedAccounts:{beginConnect:oR.contract,getConnectAttempt:rR.contract,list:iR.contract,disconnect:sR.contract},integrations:{listProviders:K1.contract,listConnections:Y1.contract,getConnection:W1.contract,createConnection:J1.contract,beginConnect:Z1.contract,getConnectAttempt:X1.contract,disconnectConnection:e2.contract,updateConnectionCredentials:t2.contract,getOrganizationExternalIdentityJitPolicy:r2.contract,updateOrganizationExternalIdentityJitPolicy:i2.contract,getConnectionExternalIdentityJitPolicy:s2.contract,updateConnectionExternalIdentityJitPolicy:a2.contract,getSlackConfiguration:l2.contract,updateSlackConfiguration:u2.contract,listSlackChannelProjectMappings:p2.contract,setSlackChannelProjectMapping:g2.contract,deleteSlackChannelProjectMapping:m2.contract},notificationChannels:{getProject:WN.contract},notificationDeliveryRules:{list:o0.contract,options:r0.contract,create:i0.contract,update:s0.contract,delete:a0.contract},mcpConnectors:{listProviders:XI.contract,list:fu.contract,get:yu.contract,details:bu.contract,search:Iu.contract,describe:Su.contract,call:Cu.contract,create:vu.contract,update:wu.contract,disconnect:Eu.contract,setReadOnly:ku.contract,beginOAuthInstall:xu.contract,getOAuthInstallAttempt:Pu.contract},sandboxPresets:{deletePreset:Mu.contract,listConnections:Qu.contract,listTypes:hS.contract,testPreset:zu.contract,upsertPreset:Nu.contract},scripts:{list:x0.contract,get:P0.contract,create:R0.contract,update:T0.contract,delete:B0.contract},signalDefinitions:{list:L0.contract,get:Q0.contract,create:N0.contract,update:M0.contract,disable:z0.contract,delete:j0.contract},memory:{put:Ru.contract,get:Tu.contract,list:Bu.contract,search:Ou.contract,delete:_u.contract},onboarding:{getState:l0.contract,skipIntegration:u0.contract,skipGithubAppInstallation:d0.contract,skipSampleIssue:p0.contract,finish:g0.contract},organizations:{list:h0.contract,get:A0.contract,create:m0.contract,update:f0.contract},members:{list:AN.contract,updateRole:fN.contract,remove:yN.contract,invite:bN.contract,listInvitations:IN.contract,revokeInvitation:SN.contract},teams:{list:F0.contract,create:$0.contract,update:G0.contract,delete:H0.contract,addMember:q0.contract,removeMember:V0.contract,listMembers:K0.contract},publicKeys:{list:jc.contract,get:Uc.contract,ensureLogForwarding:Fc.contract,update:$c.contract,deactivate:Gc.contract},secretKeys:{list:Of.contract,get:_f.contract,create:Df.contract,update:Lf.contract,delete:Qf.contract},projects:{list:uS.contract,get:dS.contract,create:pS.contract,update:gS.contract,delete:mS.contract},search:{threads:ju.contract,messages:Uu.contract},messages:{list:Hpe.contract,append:qpe.contract},threads:{list:ON.contract,get:_N.contract,getStatus:DN.contract,stop:LN.contract,create:QN.contract,update:NN.contract,fork:MN.contract,setVisibility:zN.contract,createShareLink:jN.contract,listShareLinks:UN.contract,revokeShareLink:FN.contract},runs:{list:xN.contract,listForThread:PN.contract,get:RN.contract,cancel:TN.contract},pullRequests:{list:b0.contract},issues:{count:Sf.contract,create:zc.contract,list:bf.contract,search:If.contract,get:Cf.contract,resolve:vf.contract,ignore:wf.contract,reopen:Ef.contract,reassignAndReopen:kf.contract,mute:xf.contract,unmute:Pf.contract},workItems:{create:Y0.contract,comment:W0.contract,transition:J0.contract},billing:{getSummary:bR.contract,getUsage:IR.contract,getAccruedUsageCharges:MR.contract,listUsageInvoices:NR.contract,listTransactions:SR.contract,getAutoTopUp:wR.contract,updateAutoTopUp:ER.contract,purchaseCredits:kR.contract,listPlans:xR.contract,previewPlanChange:PR.contract,previewSubscriptionCancellation:DR.contract,scheduleSubscriptionCancellation:LR.contract,resumeSubscriptionCancellation:QR.contract,changePlan:RR.contract,createCheckoutSession:TR.contract,getCheckoutSessionStatus:BR.contract,createPortalSession:OR.contract,getPaymentMethod:_R.contract},tasks:{list:Sm.contract},recommendations:{list:Am.contract},repos:{list:fm.contract,add:ym.contract,remove:bm.contract},components:{list:ZA.contract,get:XA.contract,register:Mc.contract,deregister:ef.contract,rename:tf.contract,assignTeam:nf.contract,reactivationPreview:of.contract,reactivate:rf.contract,mergePreview:df.contract,merge:pf.contract,relationships:{list:sf.contract,preview:af.contract,add:cf.contract,remove:lf.contract},incidents:{list:gf.contract},timeline:mf.contract}}});var Ha=h(()=>{T$();tR();aR();Rme();FR();HR();Hf();hB();mN();kN();y0();I0();C0();w0();_0();U0()});var nXe="https://api.sazabi.com",oXe="x-sazabi-client-source",Bme=(e)=>({streamRun:async(t)=>Tme({options:e,path:`/runs/${encodeURIComponent(t.runId)}/stream`,cursor:t.cursor,signal:t.signal}),streamThread:async(t)=>Tme({options:e,path:`/threads/${encodeURIComponent(t.threadId)}/stream`,cursor:t.cursor,signal:t.signal})}),Tme=async(e)=>{let t=e.options.fetch??globalThis.fetch;if(!t)throw Error("Fetch transport is not available in this runtime.");let n=await e.options.credentialProvider.getToken(),r=rXe(e.options.apiBaseUrl,e.path,e.cursor);return sXe({url:r,token:n,clientSource:e.options.clientSource,initialCursor:e.cursor,signal:e.signal,fetch:t})},rXe=(e,t,n)=>{let r=iXe(e??nXe),o=new URL(`${r}${t}`);if(n)o.searchParams.set(UP,n);return o.toString()},iXe=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},sXe=async(e)=>{let t=[],n=[],r=!1,o=!1,i,s=e.initialCursor,c=new AbortController,l=(f)=>{if(r)return;r=!0,i=f;while(n.length>0)n.shift()?.({value:void 0,done:!0})},u=(f)=>{let S=n.shift();if(S){S({value:f,done:!1});return}t.push(f)},d=(f)=>{if(f.event===$P){let v=dXe(f.data);if(v!==void 0)s=v;return}if(f.data===GP){o=!0,c.abort(),l();return}let S=pXe(f.data);if(S)u(S)},p=()=>{o=!0,c.abort(),l()};if(e.signal)if(e.signal.aborted)o=!0,c.abort();else e.signal.addEventListener("abort",p,{once:!0});let g={[Symbol.asyncIterator](){return g},get cursor(){return s},next:async()=>{if(t.length>0)return{value:t.shift(),done:!1};if(r){if(i)throw i;return{value:void 0,done:!0}}return new Promise((f)=>{n.push(f)}).then((f)=>{if(f.done&&i)throw i;return f})},return:async()=>(o=!0,c.abort(),l(),{value:void 0,done:!0}),throw:async(f)=>{throw o=!0,c.abort(),l(f instanceof Error?f:Error(String(f))),f},close:async()=>{o=!0,c.abort(),l()}};if(o)return l(),g;let m=await e.fetch(e.url,{method:FP,headers:aXe(e.token,e.clientSource),signal:c.signal});if(await cXe(m))l();else lXe(m,d).then(()=>l()).catch((f)=>{if(mXe(f)||o||e.signal?.aborted){l();return}l(hXe(f))});return g},aXe=(e,t)=>({accept:"text/event-stream",authorization:`Bearer ${e}`,...t?{[oXe]:t}:{}}),cXe=async(e)=>{if(e.status===204)return!0;if(e.ok&&e.body)return!1;let t=await gXe(e);if(e.status===401)throw Error("Authentication failed. Check your credential.");if(e.status===403)throw Error(`Forbidden (403): ${t||"Credential may not have access to this resource"}`);if(e.status===404)throw Error(`Not found (404): ${t||"Run or thread not found"}`);if(e.status===400)throw Error(`Invalid stream cursor (400): ${t||"The provided cursor was rejected"}`);if(e.status>=400&&e.status<500&&e.status!==429)throw Error(`Client error (${e.status}): ${t}`);if(!e.body)throw Error("Agent stream response did not include a body.");throw Error(e.status===429?`Rate limited (429): ${t}`:`Server error (${e.status}): ${t}`)},lXe=async(e,t)=>{let n=e.body?.getReader();if(!n)throw Error("Agent stream response did not include a body.");let r=new TextDecoder,o="",i=uXe(t);try{while(!0){let s=await n.read();if(s.done)break;o+=r.decode(s.value,{stream:!0});let c=o.split(/\r\n|\r|\n/);o=c.pop()??"";for(let l of c)i.line(l)}if(o+=r.decode(),o)for(let s of o.split(/\r\n|\r|\n/))i.line(s);i.flush()}finally{n.releaseLock()}},uXe=(e)=>{let t="message",n=[],r=()=>{t="message",n=[]},o=()=>{if(n.length===0){r();return}e({event:t,data:n.join(`
|
|
8912
8912
|
`)}),r()};return{line:(i)=>{if(i===""){o();return}if(i.startsWith(":"))return;let s=i.indexOf(":"),c=s===-1?i:i.slice(0,s),l=s===-1?"":i.slice(s+1),u=l.startsWith(" ")?l.slice(1):l;if(c==="event"){t=u||"message";return}if(c==="data")n.push(u)},flush:o}},dXe=(e)=>{try{let t=jP.safeParse(JSON.parse(e));return t.success?t.data.streamNextOffset:void 0}catch{return}},pXe=(e)=>{try{let t=zP.safeParse(JSON.parse(e));return t.success?t.data:void 0}catch{return}},gXe=async(e)=>{try{return await e.text()}catch{return""}},mXe=(e)=>e instanceof Error&&e.name==="AbortError",hXe=(e)=>e instanceof Error?e:Error(String(e));var Ome=h(()=>{Ha()});var X0,eM,tM,_me;var Dme=h(()=>{De();X0=a.object({severities:a.array(a.string()).optional().describe("Limit results to the listed severities."),services:a.array(a.string()).optional().describe("Limit results to the listed service names."),environments:a.array(a.string()).optional().describe("Limit results to the listed deployment environments."),searchTerm:a.string().optional().describe("Case-insensitive substring match against the log body."),traceId:a.string().optional().describe("Limit results to one trace ID."),attributes:a.record(a.string(),a.string()).optional().describe("Limit results to logs whose attributes contain every listed key with an exactly equal value.")}),eM=a.object({service:a.string(),namespace:a.string(),environment:a.string(),host:a.string(),container:a.string(),pod:a.string()}),tM=a.object({id:a.string(),timestamp:a.string().datetime(),severity:a.string(),body:a.string(),service:a.string(),traceId:a.string(),spanId:a.string(),attributes:a.record(a.string(),a.string()),resource:eM}),_me=a.object({type:a.literal("logs"),timestamp:a.string().datetime(),data:a.array(tM)})});var AXe="https://{region}.intake.sazabi.com",fXe="https://{region}.tail.sazabi.com",Nme=500,yXe=5000,Mme="sazabi.public_key",bXe="x-sazabi-internal-log-forwarding-secret",IXe="x-sazabi-internal-log-forwarding-source",SXe=(e)=>e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e,zme=(e)=>{let t=SXe(e);return t==="localhost"||t==="127.0.0.1"||t==="::1"},CXe,vXe,wXe,jme=(e)=>{let t=new Map;return{tail:async(n)=>{let r=await QXe(e.credentialProvider,n.projectId,"logs.tail"),o=await NXe(e,t,r,n.region,"logs.tail"),i=xXe({projectId:r,region:o,filters:n.filters,apiBaseUrl:e.apiBaseUrl,tailBaseUrl:e.tailBaseUrl}),s=await e.credentialProvider.getToken(),c=e.fetch??globalThis.fetch;if(!c)throw Error("Fetch transport is not available in this runtime.");return zXe({token:s,url:i,signal:n.signal,fetch:c})},forward:async(n)=>{let r=await MXe(e,t,n.projectId??await e.credentialProvider.getProjectId?.(),n.region,"logs.forward"),o=BXe(r,e.intakeBaseUrl),i=e.fetch??globalThis.fetch,s=_Xe(n.logs,n.publicKey),c=VXe(s);return await qXe(i,o,s,LXe(n.sazabiInternalForwarding)),{forwardedCount:c,failedCount:0}}}},EXe="3010",kXe,xXe=(e)=>{let t=(e.tailBaseUrl??PXe({region:e.region,apiBaseUrl:e.apiBaseUrl})).replace("{region}",e.region),n=RXe(t);n.searchParams.set("projectId",e.projectId);let r=TXe(e.filters);if(r)n.searchParams.set("filters",r);return n.toString()},PXe=(e)=>{if(e.apiBaseUrl)try{let t=new URL(e.apiBaseUrl).hostname;if(t.endsWith(".sazabi.dev")){let n=t.includes(".staging.")?"staging.sazabi.dev":"development.sazabi.dev";return`https://${e.region}.tail.${n}`}}catch{}return fXe.replace("{region}",e.region)},RXe=(e)=>{let t=(()=>{try{return new URL(e)}catch{return null}})();if(!t)throw Error(`Invalid tail base URL: ${e}`);if(zme(t.hostname)){if(t.protocol="http:",!t.port||kXe.has(t.port))t.port=EXe;return t.pathname="/v1/tail",t.search="",t.hash="",t}if(t.protocol==="ws:"||t.protocol==="wss:")t.protocol=t.protocol==="wss:"?"https:":"http:";if(t.protocol!=="http:"&&t.protocol!=="https:")throw Error(`Invalid tail base URL protocol: ${t.protocol}. Expected http:, https:, ws:, or wss:.`);return t.pathname="/v1/tail",t.search="",t.hash="",t},TXe=(e)=>{if(!e)return;let t=Object.entries(e).filter(([,n])=>n!==void 0&&(!Array.isArray(n)||n.length>0)&&(typeof n!=="object"||Array.isArray(n)||n===null||Object.keys(n).length>0)&&n!=="");if(t.length===0)return;return JSON.stringify(Object.fromEntries(t))},BXe=(e,t)=>{let n=(t??AXe).replace("{region}",e),r=n.endsWith("/")?n.slice(0,-1):n,o=OXe(r);if(o)return o;let i=r.match(/^https:\/\/([a-z0-9-]+)\.intake\.([a-z0-9.]+)$/);return`${i?`https://otlp.${i[1]}.intake.${i[2]}`:r}/v1/logs`},OXe=(e)=>{let t=(()=>{try{return new URL(e)}catch{return null}})();if(!t)return;if(!zme(t.hostname))return;return t.pathname="/adapters/otlp",t.toString()},_Xe=(e,t)=>{let n=e.resourceLogs;if(!n||n.length===0)return{...e,resourceLogs:[{resource:{attributes:[Ume(t)]},scopeLogs:[]}]};return{...e,resourceLogs:n.map((r)=>({...r,resource:{...r.resource,attributes:DXe(r.resource?.attributes,t)}}))}},DXe=(e,t)=>[...(e??[]).filter((r)=>r?.key!==Mme),Ume(t)],Ume=(e)=>({key:Mme,value:{stringValue:e}}),LXe=(e)=>{if(!e?.secret)return{};return{[bXe]:e.secret,...e.source?{[IXe]:e.source}:{}}},QXe=async(e,t,n)=>{let r=t??await e.getProjectId?.();if(r)return r;throw Gme(n,"Project ID is required",["projectId"])},NXe=async(e,t,n,r,o)=>r??await Fme(e,t,n),MXe=async(e,t,n,r,o)=>{if(r)return r;if(!n)throw Gme(o,"Project ID is required",["projectId"]);return Fme(e,t,n)},Fme=async(e,t,n)=>{let r=t.get(n);if(r)return r;let o=e.raw.projects.get({projectId:n}).then((i)=>i.project.region);t.set(n,o);try{return await o}catch(i){throw t.delete(n),i}},zXe=async(e)=>{let t=[],n=[],r=!1,o=!1,i,s=0,c,l,u=(S)=>{if(r)return;r=!0,i=S;while(n.length>0){let v=n.shift();if(v)v({value:void 0,done:!0})}},d=(S)=>{let v=n.shift();if(v){v({value:S,done:!1});return}t.push(S)},p=()=>{l?.abort()},g=(S)=>{if(S.event!=="log"){if(S.id)c=S.id;return}let v=GXe(S.data);for(let P of v)d(P);if(S.id)c=S.id},m=async(S)=>{let v=!1;while(!r&&!o){let P=new AbortController,O=()=>P.abort();l=P;let K=!1;e.signal?.addEventListener("abort",O,{once:!0});try{let M=await e.fetch(jXe(e.url,c),{method:"GET",headers:{accept:"text/event-stream",authorization:`Bearer ${e.token}`},signal:P.signal});await UXe(M),s=0,v=!0,S(),await FXe(M,g),K=!0}catch(M){if(Qme(M)||e.signal?.aborted)break;let le=Lme(M);if(!v||HXe(le))throw le;K=!0}finally{if(e.signal?.removeEventListener("abort",O),l===P)l=void 0}if(r||o||e.signal?.aborted)break;if(!K)continue;s+=1,await $me(Math.min(Nme*2**(s-1),yXe),e.signal)}};if(e.signal?.addEventListener("abort",()=>{o=!0,p(),u()},{once:!0}),e.signal?.aborted)o=!0,p(),u();await new Promise((S,v)=>{let P=!1;m(()=>{if(!P)P=!0,S()}).catch((K)=>{let M=Lme(K);if(!P){P=!0,v(M);return}if(!Qme(K))u(M)})});let f={[Symbol.asyncIterator](){return f},next:async()=>{if(t.length>0)return{value:t.shift(),done:!1};if(r){if(i)throw i;return{value:void 0,done:!0}}return new Promise((S)=>{n.push(S)}).then((S)=>{if(S.done&&i)throw i;return S})},return:async()=>(o=!0,p(),u(),{value:void 0,done:!0}),throw:async(S)=>{throw o=!0,p(),u(S instanceof Error?S:Error(String(S))),S}};return f},jXe=(e,t)=>{if(!t)return e;let n=new URL(e);return n.searchParams.set("cursor",t),n.toString()},UXe=async(e)=>{if(e.ok&&e.body)return;let t=await e.text();if(e.status===401)throw Error("Authentication failed. Check your credential.");if(e.status===403){if(/not served by this region/i.test(t))throw Error(`Wrong region (403): ${t||"Project is not served by this region"}`);throw Error(`Forbidden (403): ${t||"Credential may not have access to this project"}`)}if(e.status>=400&&e.status<500&&e.status!==429)throw Error(`Client error (${e.status}): ${t}`);if(!e.body)throw Error("Tail stream response did not include a body.");throw Error(e.status===429?`Rate limited (429): ${t}`:`Server error (${e.status}): ${t}`)},FXe=async(e,t)=>{let n=e.body?.getReader();if(!n)throw Error("Tail stream response did not include a body.");let r=new TextDecoder,o="",i=$Xe(t);try{while(!0){let s=await n.read();if(s.done)break;o+=r.decode(s.value,{stream:!0});let c=o.split(/\r\n|\r|\n/);o=c.pop()??"";for(let l of c)i.line(l)}if(o+=r.decode(),o){let s=o.split(/\r\n|\r|\n/);for(let c of s)i.line(c)}i.flush()}finally{n.releaseLock()}},$Xe=(e)=>{let t="message",n,r=[],o=()=>{t="message",n=void 0,r=[]},i=()=>{if(r.length===0&&!n){o();return}e({event:t,data:r.join(`
|
|
8913
8913
|
`),...n?{id:n}:{}}),o()};return{line:(s)=>{if(s===""){i();return}if(s.startsWith(":"))return;let c=s.indexOf(":"),l=c===-1?s:s.slice(0,c),u=c===-1?"":s.slice(c+1),d=u.startsWith(" ")?u.slice(1):u;if(l==="event"){t=d||"message";return}if(l==="data"){r.push(d);return}if(l==="id"&&!d.includes("\x00"))n=d},flush:i}},GXe=(e)=>{try{let t=_me.safeParse(JSON.parse(e));if(!t.success)return[];return t.data.data}catch{return[]}},Lme=(e)=>e instanceof Error?e:Error(String(e)),Qme=(e)=>e instanceof Error&&e.name==="AbortError",HXe=(e)=>e.message.startsWith("Authentication failed")||e.message.startsWith("Forbidden (")||e.message.startsWith("Wrong region (")||e.message.startsWith("Client error ("),qXe=async(e,t,n,r={},o=3,i=1e4)=>{let s;for(let c=0;c<=o;c+=1){let l=new AbortController,u=globalThis.setTimeout(()=>l.abort(),i);try{let d=await e(t,{method:"POST",headers:{"content-type":"application/json",...r},body:JSON.stringify(n),signal:l.signal});if(d.ok)return;let p=await d.text();if(d.status===401||d.status===403)throw Error("Authentication failed. Check your public key.");if(d.status>=400&&d.status<500&&d.status!==429)throw Error(`Client error (${d.status}): ${p}`);s=Error(d.status===429?`Rate limited (429): ${p}`:`Server error (${d.status}): ${p}`)}catch(d){let p=d instanceof Error?d.message:String(d);if(p.startsWith("Authentication failed")||p.startsWith("Client error ("))throw d instanceof Error?d:Error(p);s=d instanceof Error&&d.name==="AbortError"?Error("Request timed out"):d instanceof Error?d:Error(String(d))}finally{globalThis.clearTimeout(u)}if(c<o)await $me(Nme*2**c)}throw Error(`Failed after ${o+1} attempts: ${s?.message??"Unknown error"}`)},VXe=(e)=>e.resourceLogs?.reduce((t,n)=>t+(n.scopeLogs?.reduce((r,o)=>r+(o.logRecords?.length??0),0)??0),0)??0,$me=async(e,t)=>{if(t?.aborted)return;await new Promise((n)=>{let r=globalThis.setTimeout(n,e);t?.addEventListener("abort",()=>{globalThis.clearTimeout(r),n()},{once:!0})})},Gme=(e,t,n)=>new Xt("BAD_REQUEST",{message:t,data:{operationId:e,missingContext:n}});var nM=h(()=>{ic();Dme();De();CXe=a.object({projectId:a.string().uuid().optional().describe("Project to tail logs for. Auto-filled from CLI and SDK context when omitted."),filters:X0.optional().describe("Optional filters applied by the tail SSE service.")}),vXe=a.object({publicKey:a.string().min(1).describe("Public key for intake auth. Create or list one via the public key endpoints."),logs:a.custom((e)=>typeof e==="object"&&e!==null).describe("OTLP logs export request payload to send to the intake service.")}),wXe=a.object({forwardedCount:a.number().int().nonnegative().describe("Number of log records accepted by the intake request."),failedCount:a.number().int().nonnegative().describe("Number of log records rejected by the intake request.")}),kXe=new Set(["15006","3010"])});var oM="https://api.sazabi.com",Vme="https://api.platform.sazabi.com",Kme="sazabi-cli",KXe="urn:ietf:params:oauth:grant-type:device_code",Yme=(e)=>{let t=RC(new FC(Z0,{url:YXe(e.apiBaseUrl??oM),headers:async()=>{let o=new Headers({authorization:`Bearer ${await e.credentialProvider.getToken()}`});if(e.clientSource)o.set("x-sazabi-client-source",e.clientSource);if(e.sandboxActorDescriptor)o.set("x-sazabi-sandbox-actor",e.sandboxActorDescriptor);return o},fetch:e.fetch,customErrorResponseBodyDecoder:(o,i)=>{let s=n8e(o);if(!s)return null;return new Xt(s.code,{message:s.message,status:i.status,data:{operationId:s.operationId,missingContext:s.missingContext,...s.reason!==void 0?{reason:s.reason}:{},...s.retryAfterSeconds!==void 0?{retryAfterSeconds:s.retryAfterSeconds}:{}}})}})),n=jme({raw:t,credentialProvider:e.credentialProvider,fetch:e.fetch,apiBaseUrl:e.apiBaseUrl??oM,intakeBaseUrl:e.intakeBaseUrl,tailBaseUrl:e.tailBaseUrl}),r=Bme({credentialProvider:e.credentialProvider,fetch:e.fetch,apiBaseUrl:e.apiBaseUrl??oM,clientSource:e.clientSource});return{raw:t,me:async()=>t.me({}),automations:{list:async(o={})=>t.automations.list(await oe(e.credentialProvider,o,"automations.list")),get:async(o)=>t.automations.get(await oe(e.credentialProvider,o,"automations.get")),create:async(o)=>t.automations.create(await oe(e.credentialProvider,o,"automations.create")),update:async(o)=>t.automations.update(await oe(e.credentialProvider,o,"automations.update")),enable:async(o)=>t.automations.enable(await oe(e.credentialProvider,o,"automations.enable")),disable:async(o)=>t.automations.disable(await oe(e.credentialProvider,o,"automations.disable")),runs:{list:async(o)=>t.automations.runs.list(await oe(e.credentialProvider,o,"automations.runs.list")),get:async(o)=>t.automations.runs.get(await oe(e.credentialProvider,o,"automations.runs.get")),logs:async(o)=>t.automations.runs.logs(await oe(e.credentialProvider,o,"automations.runs.logs"))}},logs:{...n,query:async(o={})=>t.logs.query(await oe(e.credentialProvider,o,Kc.operationId)),schema:async(o={})=>t.logs.schema(await oe(e.credentialProvider,o,Yc.operationId)),volume:async(o)=>t.logs.volume(await oe(e.credentialProvider,o,Wc.operationId)),patterns:async(o={})=>t.logs.patterns(await oe(e.credentialProvider,o,Jc.operationId)),nativeQuery:async(o)=>t.logs.nativeQuery(await oe(e.credentialProvider,o,Zc.operationId))},onboarding:{getState:async(o={})=>t.onboarding.getState(await Hme(e.credentialProvider,await JXe(e.credentialProvider,o))),skipSampleIssue:async(o)=>t.onboarding.skipSampleIssue(await Hme(e.credentialProvider,o??{})),finish:async(o)=>t.onboarding.finish(o)},organizations:{list:async()=>t.organizations.list({}),get:async(o)=>t.organizations.get(o),create:async(o)=>t.organizations.create(o),update:async(o)=>t.organizations.update(await Ce(e.credentialProvider,o,"organizations.update"))},members:{list:async(o={})=>t.members.list(await Ce(e.credentialProvider,o,"members.list")),updateRole:async(o)=>t.members.updateRole(await Ce(e.credentialProvider,o,"members.updateRole")),remove:async(o)=>{let i=await Ce(e.credentialProvider,o,"members.remove");return t.members.remove({params:{member:i.member},query:{organizationId:i.organizationId}})},invite:async(o)=>t.members.invite(await Ce(e.credentialProvider,o,"members.invite")),listInvitations:async(o={})=>t.members.listInvitations(await Ce(e.credentialProvider,o,"members.listInvitations")),revokeInvitation:async(o)=>{let i=await Ce(e.credentialProvider,o,"members.revokeInvitation");return t.members.revokeInvitation({params:{invitationId:i.invitationId},query:{organizationId:i.organizationId}})}},teams:{list:async(o={})=>t.teams.list(await Ce(e.credentialProvider,o,"teams.list")),create:async(o)=>t.teams.create(await Ce(e.credentialProvider,o,"teams.create")),update:async(o)=>t.teams.update(await Ce(e.credentialProvider,o,"teams.update")),delete:async(o)=>{let i=await Ce(e.credentialProvider,o,"teams.delete");return t.teams.delete({params:{teamId:i.teamId},query:{organizationId:i.organizationId}})},addMember:async(o)=>t.teams.addMember(await Ce(e.credentialProvider,o,"teams.addMember")),removeMember:async(o)=>{let i=await Ce(e.credentialProvider,o,"teams.removeMember");return t.teams.removeMember({params:{teamId:i.teamId,userId:i.userId},query:{organizationId:i.organizationId}})},listMembers:async(o)=>t.teams.listMembers(await Ce(e.credentialProvider,o,"teams.listMembers"))},publicKeys:{list:async(o={})=>t.publicKeys.list(await oe(e.credentialProvider,o,jc.operationId)),get:async(o)=>t.publicKeys.get(await oe(e.credentialProvider,o,Uc.operationId)),ensureLogForwarding:async(o={})=>t.publicKeys.ensureLogForwarding(await oe(e.credentialProvider,o,Fc.operationId)),update:async(o)=>t.publicKeys.update(await oe(e.credentialProvider,o,$c.operationId)),deactivate:async(o)=>{let i=await oe(e.credentialProvider,o,Gc.operationId);return t.publicKeys.deactivate({params:{keyId:i.keyId},query:{projectId:i.projectId}})}},secretKeys:{list:async(o={})=>t.secretKeys.list(await Ce(e.credentialProvider,o,"secretKeys.list")),get:async(o)=>t.secretKeys.get(await Ce(e.credentialProvider,o,"secretKeys.get")),create:async(o)=>t.secretKeys.create(await Ce(e.credentialProvider,o,"secretKeys.create")),update:async(o)=>t.secretKeys.update(await Ce(e.credentialProvider,o,"secretKeys.update")),delete:async(o)=>{let{organizationId:i}=await Ce(e.credentialProvider,o,"secretKeys.delete");await t.secretKeys.delete({params:{keyId:o.keyId},query:{organizationId:i}})}},search:{threads:async(o)=>t.search.threads(await oe(e.credentialProvider,o,ju.operationId)),messages:async(o)=>t.search.messages(await oe(e.credentialProvider,o,Uu.operationId))},projects:{list:async(o={})=>t.projects.list(await WXe(e.credentialProvider,o)),get:async(o)=>t.projects.get(o),create:async(o)=>t.projects.create(await Ce(e.credentialProvider,o,"projects.create"))},messages:{list:async(o)=>t.messages.list(o),append:async(o)=>qme(t,await t.messages.append(t8e(o)))},threads:{list:async(o={})=>t.threads.list(await ZXe(e.credentialProvider,o)),get:async(o)=>t.threads.get(o),getStatus:async(o)=>t.threads.getStatus(o),stop:async(o)=>t.threads.stop(o),create:async(o)=>qme(t,await t.threads.create(await e8e(e.credentialProvider,o))),update:async(o)=>t.threads.update(o),fork:async(o)=>t.threads.fork(o),setVisibility:async(o)=>t.threads.setVisibility(o),createShareLink:async(o)=>t.threads.createShareLink(o),listShareLinks:async(o)=>t.threads.listShareLinks(o),revokeShareLink:async(o)=>t.threads.revokeShareLink(o),stream:async(o)=>r.streamThread(o)},runs:{list:async(o={})=>t.runs.list(await XXe(e.credentialProvider,o)),listForThread:async(o)=>t.runs.listForThread(o),get:async(o)=>t.runs.get(o),cancel:async(o)=>t.runs.cancel(o),stream:async(o)=>r.streamRun(o)},logSources:{listProviders:async()=>t.logSources.listProviders({}),list:async(o={})=>t.logSources.list(await oe(e.credentialProvider,o,qc.operationId)),get:async(o)=>t.logSources.get(o),create:async(o)=>t.logSources.create(await oe(e.credentialProvider,o,Vc.operationId)),update:async(o)=>t.logSources.update(o),delete:async(o)=>t.logSources.delete(o)},logStreams:{list:async(o)=>t.logStreams.list(o),get:async(o)=>t.logStreams.get(o),create:async(o)=>t.logStreams.create(o),update:async(o)=>t.logStreams.update(o),delete:async(o)=>t.logStreams.delete(o),reassign:async(o)=>t.logStreams.reassign(o)},connectedAccounts:{beginConnect:async(o)=>t.connectedAccounts.beginConnect(await Ce(e.credentialProvider,o,"connectedAccounts.beginConnect")),getConnectAttempt:async(o)=>t.connectedAccounts.getConnectAttempt(await Ce(e.credentialProvider,o,"connectedAccounts.getConnectAttempt")),list:async(o={})=>t.connectedAccounts.list(await Ce(e.credentialProvider,o,"connectedAccounts.list")),disconnect:async(o)=>t.connectedAccounts.disconnect(await Ce(e.credentialProvider,o,"connectedAccounts.disconnect"))},integrations:{listProviders:async(o={})=>t.integrations.listProviders(await Ce(e.credentialProvider,o,"integrations.listProviders")),listConnections:async(o={})=>t.integrations.listConnections(await Ce(e.credentialProvider,o,"integrations.listConnections")),getConnection:async(o)=>t.integrations.getConnection(await Ce(e.credentialProvider,o,"integrations.getConnection")),createConnection:async(o)=>t.integrations.createConnection(await Ce(e.credentialProvider,o,"integrations.createConnection")),beginConnect:async(o)=>t.integrations.beginConnect(await Ce(e.credentialProvider,o,"integrations.beginConnect")),getConnectAttempt:async(o)=>t.integrations.getConnectAttempt(await Ce(e.credentialProvider,o,"integrations.getConnectAttempt")),disconnectConnection:async(o)=>t.integrations.disconnectConnection(await Ce(e.credentialProvider,o,"integrations.disconnectConnection")),updateConnectionCredentials:async(o)=>t.integrations.updateConnectionCredentials(await Ce(e.credentialProvider,o,"integrations.updateConnectionCredentials"))},mcpConnectors:{list:async(o={})=>t.mcpConnectors.list(await oe(e.credentialProvider,o,fu.operationId)),get:async(o)=>t.mcpConnectors.get(await oe(e.credentialProvider,o,yu.operationId)),details:async(o)=>t.mcpConnectors.details(await oe(e.credentialProvider,o,bu.operationId)),listProviders:async()=>t.mcpConnectors.listProviders({}),search:async(o={})=>t.mcpConnectors.search(await oe(e.credentialProvider,o,Iu.operationId)),describe:async(o)=>t.mcpConnectors.describe(await oe(e.credentialProvider,o,Su.operationId)),call:async(o)=>t.mcpConnectors.call(await oe(e.credentialProvider,o,Cu.operationId)),create:async(o)=>t.mcpConnectors.create(await oe(e.credentialProvider,o,vu.operationId)),update:async(o)=>t.mcpConnectors.update(await oe(e.credentialProvider,o,wu.operationId)),disconnect:async(o)=>{await t.mcpConnectors.disconnect(await oe(e.credentialProvider,o,Eu.operationId))},setReadOnly:async(o)=>t.mcpConnectors.setReadOnly(await oe(e.credentialProvider,o,ku.operationId)),beginOAuthInstall:async(o)=>t.mcpConnectors.beginOAuthInstall(await oe(e.credentialProvider,o,xu.operationId)),getOAuthInstallAttempt:async(o)=>t.mcpConnectors.getOAuthInstallAttempt(await oe(e.credentialProvider,o,Pu.operationId))},sandboxPresets:{delete:async(o)=>t.sandboxPresets.deletePreset(await oe(e.credentialProvider,o,Mu.operationId)),listConnections:async(o={})=>t.sandboxPresets.listConnections(await oe(e.credentialProvider,o,Qu.operationId)),listTypes:async()=>t.sandboxPresets.listTypes({}),test:async(o)=>t.sandboxPresets.testPreset(await oe(e.credentialProvider,o,zu.operationId)),upsert:async(o)=>t.sandboxPresets.upsertPreset(await oe(e.credentialProvider,o,Nu.operationId))},memory:{list:async(o={})=>t.memory.list(await oe(e.credentialProvider,o,Bu.operationId)),get:async(o)=>t.memory.get(await oe(e.credentialProvider,o,Tu.operationId)),put:async(o)=>t.memory.put(await oe(e.credentialProvider,o,Ru.operationId)),search:async(o)=>t.memory.search(await oe(e.credentialProvider,o,Ou.operationId)),delete:async(o)=>t.memory.delete(await oe(e.credentialProvider,o,_u.operationId))},signalDefinitions:{list:async(o={})=>t.signalDefinitions.list(await oe(e.credentialProvider,o,"signalDefinitions.list")),get:async(o)=>t.signalDefinitions.get(await oe(e.credentialProvider,o,"signalDefinitions.get")),create:async(o)=>t.signalDefinitions.create(await oe(e.credentialProvider,o,"signalDefinitions.create")),update:async(o)=>t.signalDefinitions.update(await oe(e.credentialProvider,o,"signalDefinitions.update")),disable:async(o)=>t.signalDefinitions.disable(await oe(e.credentialProvider,o,"signalDefinitions.disable"))},scripts:{list:async(o={})=>t.scripts.list(await oe(e.credentialProvider,o,"scripts.list")),get:async(o)=>t.scripts.get(await oe(e.credentialProvider,o,"scripts.get")),create:async(o)=>t.scripts.create(await oe(e.credentialProvider,o,"scripts.create")),update:async(o)=>t.scripts.update(await oe(e.credentialProvider,o,"scripts.update")),delete:async(o)=>t.scripts.delete(await oe(e.credentialProvider,o,"scripts.delete"))},issues:{count:async(o={})=>t.issues.count(await oe(e.credentialProvider,o,"issues.count")),create:async(o)=>t.issues.create(await oe(e.credentialProvider,o,zc.operationId)),list:async(o={})=>t.issues.list(await oe(e.credentialProvider,o,"issues.list")),search:async(o={})=>t.issues.search(await oe(e.credentialProvider,o,"issues.search")),get:async(o)=>t.issues.get(o),resolve:async(o)=>t.issues.resolve(o),ignore:async(o)=>t.issues.ignore(o),reopen:async(o)=>t.issues.reopen(o),mute:async(o)=>t.issues.mute(o),unmute:async(o)=>t.issues.unmute(o)},workItems:{create:async(o)=>t.workItems.create(await Ce(e.credentialProvider,o,"work-items.create")),comment:async(o)=>t.workItems.comment(await Ce(e.credentialProvider,o,"work-items.comment")),transition:async(o)=>t.workItems.transition(await Ce(e.credentialProvider,o,"work-items.transition"))},pullRequests:{list:async(o={})=>t.pullRequests.list(await oe(e.credentialProvider,o,"pullRequests.list"))},components:{list:async(o={})=>t.components.list(await oe(e.credentialProvider,o,"components.list")),get:async(o)=>t.components.get(o),register:async(o)=>t.components.register(await oe(e.credentialProvider,o,Mc.operationId)),deregister:async(o)=>t.components.deregister(o),rename:async(o)=>t.components.rename(o),assignTeam:async(o)=>t.components.assignTeam(o),reactivationPreview:async(o)=>t.components.reactivationPreview(o),reactivate:async(o)=>t.components.reactivate(o),mergePreview:async(o)=>t.components.mergePreview(await oe(e.credentialProvider,o,"components.mergePreview")),merge:async(o)=>t.components.merge(await oe(e.credentialProvider,o,"components.merge")),relationships:{list:async(o={})=>t.components.relationships.list(await oe(e.credentialProvider,o,"components.relationships.list")),preview:async(o)=>t.components.relationships.preview(await oe(e.credentialProvider,o,"components.relationships.preview")),add:async(o)=>t.components.relationships.add(await oe(e.credentialProvider,o,"components.relationships.add")),remove:async(o)=>t.components.relationships.remove(await oe(e.credentialProvider,o,"components.relationships.remove"))},incidents:{list:async(o={})=>t.components.incidents.list(await oe(e.credentialProvider,o,"components.incidents.list"))},timeline:async(o)=>t.components.timeline(o)},billing:{getSummary:async(o={})=>t.billing.getSummary(await Ce(e.credentialProvider,o,"billing.getSummary")),getUsage:async(o={})=>t.billing.getUsage(await Ce(e.credentialProvider,o,"billing.getUsage")),getAccruedUsageCharges:async(o={})=>t.billing.getAccruedUsageCharges(await Ce(e.credentialProvider,o,"billing.getAccruedUsageCharges")),listUsageInvoices:async(o={})=>t.billing.listUsageInvoices(await Ce(e.credentialProvider,o,"billing.listUsageInvoices")),listTransactions:async(o={})=>t.billing.listTransactions(await Ce(e.credentialProvider,o,"billing.listTransactions")),previewSubscriptionCancellation:async(o={})=>t.billing.previewSubscriptionCancellation(await Ce(e.credentialProvider,o,"billing.previewSubscriptionCancellation")),scheduleSubscriptionCancellation:async(o={})=>t.billing.scheduleSubscriptionCancellation(await Ce(e.credentialProvider,o,"billing.scheduleSubscriptionCancellation")),resumeSubscriptionCancellation:async(o={})=>t.billing.resumeSubscriptionCancellation(await Ce(e.credentialProvider,o,"billing.resumeSubscriptionCancellation")),getAutoTopUp:async(o={})=>t.billing.getAutoTopUp(await Ce(e.credentialProvider,o,"billing.getAutoTopUp")),updateAutoTopUp:async(o)=>t.billing.updateAutoTopUp(await Ce(e.credentialProvider,o,"billing.updateAutoTopUp")),purchaseCredits:async(o)=>t.billing.purchaseCredits(await Ce(e.credentialProvider,o,"billing.purchaseCredits")),listPlans:async(o={})=>t.billing.listPlans(await Ce(e.credentialProvider,o,"billing.listPlans")),previewPlanChange:async(o)=>t.billing.previewPlanChange(await Ce(e.credentialProvider,o,"billing.previewPlanChange")),changePlan:async(o)=>t.billing.changePlan(await Ce(e.credentialProvider,o,"billing.changePlan")),createCheckoutSession:async(o)=>t.billing.createCheckoutSession(await Ce(e.credentialProvider,o,"billing.createCheckoutSession")),getCheckoutSessionStatus:async(o)=>t.billing.getCheckoutSessionStatus(await Ce(e.credentialProvider,o,"billing.getCheckoutSessionStatus")),createPortalSession:async(o={})=>t.billing.createPortalSession(await Ce(e.credentialProvider,o,"billing.createPortalSession")),getPaymentMethod:async(o={})=>t.billing.getPaymentMethod(await Ce(e.credentialProvider,o,"billing.getPaymentMethod"))},tasks:{list:async(o={})=>t.tasks.list(await oe(e.credentialProvider,o,Sm.operationId))},recommendations:{list:async(o={})=>t.recommendations.list(await oe(e.credentialProvider,o,Am.operationId))},repos:{list:async(o={})=>t.repos.list(await oe(e.credentialProvider,o,fm.operationId)),add:async(o)=>t.repos.add(await oe(e.credentialProvider,o,ym.operationId)),remove:async(o)=>t.repos.remove(await oe(e.credentialProvider,o,bm.operationId))},notificationDeliveryRules:{list:async(o={})=>t.notificationDeliveryRules.list(await oe(e.credentialProvider,o,"notificationDeliveryRules.list")),options:async(o={})=>t.notificationDeliveryRules.options(await oe(e.credentialProvider,o,"notificationDeliveryRules.options")),create:async(o)=>t.notificationDeliveryRules.create(await oe(e.credentialProvider,o,"notificationDeliveryRules.create")),update:async(o)=>t.notificationDeliveryRules.update(await oe(e.credentialProvider,o,"notificationDeliveryRules.update")),delete:async(o)=>t.notificationDeliveryRules.delete(await oe(e.credentialProvider,o,"notificationDeliveryRules.delete"))},notificationChannels:{getProject:async(o={})=>t.notificationChannels.getProject(await oe(e.credentialProvider,o,"notificationChannels.getProject"))}}},iM=async(e={})=>{let t=await Zme(e.fetch)(Wme(e.apiBaseUrl??Vme,"/device/code"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:e.clientId??Kme,...e.scope?{scope:e.scope}:{}})}),n=await t.json();if(!t.ok)throw o8e(n,t.status);let r=n;return{deviceCode:Fu(r.device_code,"device_code"),userCode:Fu(r.user_code,"user_code"),verificationUri:Fu(r.verification_uri,"verification_uri"),verificationUriComplete:Fu(r.verification_uri_complete,"verification_uri_complete"),expiresIn:rM(r.expires_in,"expires_in"),interval:rM(r.interval,"interval")}},sM=async(e)=>{let t=await Zme(e.fetch)(Wme(e.apiBaseUrl??Vme,"/device/token"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:KXe,device_code:e.deviceCode,client_id:e.clientId??Kme})}),n=await t.json();if(t.ok){let o=n;return{status:"authorized",accessToken:Fu(o.access_token,"access_token"),tokenType:Fu(o.token_type,"token_type"),expiresIn:rM(o.expires_in,"expires_in"),scope:typeof o.scope==="string"?o.scope:""}}let r=Jme(n);if(!r)throw Error(`Device authorization failed with status ${t.status}`);if(r.error==="authorization_pending")return{status:"pending"};if(r.error==="slow_down")return{status:"pending",interval:10};if(r.error==="access_denied")return{status:"denied",message:r.errorDescription};if(r.error==="expired_token"||r.error==="invalid_grant")return{status:"expired",message:r.errorDescription};throw Error(r.errorDescription)},YXe=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},Wme=(e,t)=>`${e.replace(/\/+$/,"")}/api/auth${t}`,WXe=async(e,t)=>Ce(e,t,"projects.list"),Hme=async(e,t)=>{let n=t.organizationId??await e.getOrganizationId?.();return n?{...t,organizationId:n}:t},Ce=async(e,t,n)=>{let r=t.organizationId??await e.getOrganizationId?.();if(!r)throw new Xt("BAD_REQUEST",{message:"Organization ID is required",data:{operationId:n,missingContext:["organizationId"]},status:400});return{...t,organizationId:r}},JXe=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},oe=async(e,t,n)=>{let r=t.projectId??await e.getProjectId?.();if(!r)throw new Xt("BAD_REQUEST",{message:"Project ID is required",data:{operationId:n,missingContext:["projectId"]},status:400});return{...t,projectId:r}},ZXe=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},XXe=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},e8e=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},t8e=(e)=>({threadId:e.threadId,message:e.message,wait:e.wait??!0,timeoutSeconds:e.timeoutSeconds??20,...e.automationId!==void 0?{automationId:e.automationId}:{}}),n8e=(e)=>{if(!e||typeof e!=="object")return null;let t=e;if(typeof t.code!=="string"||typeof t.message!=="string"||typeof t.operationId!=="string")return null;return{code:t.code,message:t.message,operationId:t.operationId,missingContext:Array.isArray(t.missingContext)?t.missingContext.filter((n)=>typeof n==="string"):[],...typeof t.reason==="string"?{reason:t.reason}:{},...typeof t.retryAfterSeconds==="number"?{retryAfterSeconds:t.retryAfterSeconds}:{}}},Jme=(e)=>{if(!e||typeof e!=="object")return null;let t=e;if(typeof t.error!=="string"||typeof t.error_description!=="string")return null;return{error:t.error,errorDescription:t.error_description}},o8e=(e,t)=>{let n=Jme(e);return Error(n?.errorDescription??`Device authorization failed with status ${t}`)},Zme=(e)=>e??globalThis.fetch,qme=(e,t)=>({result:t,poll:()=>e.runs.get({runId:t.runId}),waitForCompletion:async(n={})=>r8e(e,t,n)}),r8e=async(e,t,n)=>{if(t.completed)return t;let r=n.intervalMs??2000,o=Date.now(),i=t;while(!i.completed){if(n.timeoutMs!==void 0&&Date.now()-o>=n.timeoutMs)return i;await i8e(r),i=await e.runs.get({runId:i.runId})}return i},i8e=async(e)=>{await new Promise((t)=>globalThis.setTimeout(t,e))},Fu=(e,t)=>{if(typeof e==="string")return e;throw Error(`Expected '${t}' to be a string.`)},rM=(e,t)=>{if(typeof e==="number")return e;throw Error(`Expected '${t}' to be a number.`)};var aM=h(()=>{ic();xj();Ha();Ome();nM();nM()});var Ct=(e)=>({success:!0,value:e}),ft=(e,t,n)=>({success:!1,error:e,...t!==void 0&&{statusCode:t},...n!==void 0&&{errorPayload:n}}),s8e=(e)=>{if(e===void 0)return"NETWORK_ERROR";if(e===401)return"UNAUTHORIZED";if(e===403)return"FORBIDDEN";if(e===404)return"NOT_FOUND";if(e===429)return"TOO_MANY_REQUESTS";if(e>=500)return"SERVER_ERROR";return"REQUEST_FAILED"},I=(e,t,n)=>{if(!e.success){let r=`${t}: ${e.error}`;if(n)return b(e.errorPayload??{code:s8e(e.statusCode),message:r,operationId:null});return y(r)}return e.value};var ce=h(()=>{re()});var a8e="https://api.sazabi.com",cM,c8e=30,l8e=(e)=>new Promise((t)=>setTimeout(t,e)),T=async(e)=>{for(let t=0;;t+=1)try{return Ct(await e())}catch(n){let r=u8e(n),o=d8e(n),i=r?.retryAfterSeconds;if(o===429&&t===0&&i!==void 0&&i<=c8e&&process.env.SAZABI_NO_RETRY!=="1"){process.stderr.write(`Rate limited; retrying in ~${i}s…
|
|
8914
8914
|
`),await l8e(i*1000);continue}let s=n instanceof Error?n.message:String(n);if(i!==void 0)s+=` Retry in ~${i}s.`;return ft(s,o,r)}},u8e=(e)=>{if(!e||typeof e!=="object")return;let t=e;if(typeof t.code!=="string"||typeof t.message!=="string"||!t.data||typeof t.data!=="object")return;let n=t.data;if(typeof n.operationId!=="string")return;return{code:t.code,message:t.message,operationId:n.operationId,...typeof n.reason==="string"?{reason:n.reason}:{},...typeof n.retryAfterSeconds==="number"?{retryAfterSeconds:n.retryAfterSeconds}:{},...Array.isArray(n.missingContext)?{missingContext:n.missingContext.filter((r)=>typeof r==="string")}:{}}},d8e=(e)=>{if(!e||typeof e!=="object")return;let t=e;return typeof t.status==="number"?t.status:void 0},pi=(e)=>{let t=Yme({apiBaseUrl:e.baseUrl??a8e,clientSource:"cli",sandboxActorDescriptor:e.sandboxActorDescriptor,credentialProvider:{getToken:()=>e.token,getOrganizationId:()=>e.organizationId,getProjectId:()=>e.projectId},intakeBaseUrl:e.intakeBaseUrl,tailBaseUrl:e.tailBaseUrl});return{me:()=>{let n=`${e.token}::${e.baseUrl??""}`,r=cM.get(n);if(r)return r;let o=T(()=>t.me()).then((i)=>{if(!i.success)cM.delete(n);return i});return cM.set(n,o),o},automations:{list:(n={})=>T(()=>t.automations.list(n)),get:(n)=>T(()=>t.automations.get({automationId:n})),create:(n)=>T(()=>t.automations.create(n)),update:(n)=>T(()=>t.automations.update(n)),enable:(n)=>T(()=>t.automations.enable({automationId:n})),disable:(n)=>T(()=>t.automations.disable({automationId:n})),runs:{list:(n,r={})=>T(()=>t.automations.runs.list({automationId:n,...r})),get:(n,r)=>T(()=>t.automations.runs.get({automationId:n,runId:r})),logs:(n,r)=>T(()=>t.automations.runs.logs({automationId:n,runId:r}))}},logs:{tail:(n)=>T(()=>t.logs.tail(n)),forward:(n)=>T(()=>t.logs.forward(n)),query:(n={})=>T(()=>t.logs.query(n)),schema:(n={})=>T(()=>t.logs.schema(n)),volume:(n)=>T(()=>t.logs.volume(n)),patterns:(n={})=>T(()=>t.logs.patterns(n)),nativeQuery:(n)=>T(()=>t.logs.nativeQuery(n))},organizations:{list:()=>T(()=>t.organizations.list()),get:(n)=>T(()=>t.organizations.get({organizationId:n})),create:(n)=>T(()=>t.organizations.create({name:n})),rename:(n,r)=>T(()=>t.organizations.update({organizationId:r,name:n}))},members:{list:(n={})=>T(()=>t.members.list(n)),updateRole:(n,r,o)=>T(()=>t.members.updateRole({organizationId:o,member:n,role:r})),remove:(n,r)=>T(()=>t.members.remove({organizationId:r,member:n})),invite:(n)=>T(()=>t.members.invite({organizationId:n.organizationId,email:n.email,role:n.role})),listInvitations:(n)=>T(()=>t.members.listInvitations({organizationId:n})),revokeInvitation:(n)=>T(()=>t.members.revokeInvitation({organizationId:n.organizationId,invitationId:n.invitationId}))},teams:{list:(n={})=>T(()=>t.teams.list(n)),create:(n,r,o)=>T(()=>t.teams.create({organizationId:o,name:n,...r!==void 0?{description:r}:{}})),update:(n,r,o)=>T(()=>t.teams.update({organizationId:o,teamId:n,...r.name!==void 0?{name:r.name}:{},...r.description!==void 0?{description:r.description}:{}})),delete:(n,r)=>T(()=>t.teams.delete({organizationId:r,teamId:n})),addMember:(n,r,o)=>T(()=>t.teams.addMember({organizationId:o,teamId:n,userId:r})),removeMember:(n,r,o)=>T(()=>t.teams.removeMember({organizationId:o,teamId:n,userId:r})),listMembers:(n,r)=>T(()=>t.teams.listMembers({organizationId:r,teamId:n}))},projects:{list:(n={})=>T(()=>t.projects.list(n)),get:(n)=>T(()=>t.projects.get({projectId:n})),create:(n)=>T(()=>t.projects.create(n))},threads:{list:(n={})=>T(()=>t.threads.list(n)),get:(n)=>T(()=>t.threads.get({threadId:n})),create:(n)=>T(()=>t.threads.create(n)),getStatus:(n)=>T(()=>t.threads.getStatus({threadId:n})),update:(n,r)=>T(()=>t.threads.update({threadId:n,status:r})),fork:(n,r)=>T(()=>t.threads.fork({threadId:n,messageId:r})),setVisibility:(n,r)=>T(()=>t.threads.setVisibility({threadId:n,visibility:r})),createShareLink:(n)=>T(()=>t.threads.createShareLink({threadId:n})),listShareLinks:(n)=>T(()=>t.threads.listShareLinks({threadId:n})),revokeShareLink:(n,r)=>T(()=>t.threads.revokeShareLink({threadId:n,shareId:r})),stop:(n)=>T(()=>t.threads.stop({threadId:n})),stream:(n)=>T(()=>t.threads.stream(n))},messages:{list:(n,r={})=>T(()=>t.messages.list({threadId:n,...r})),append:(n,r,o,i,s,c)=>T(()=>t.messages.append({threadId:n,message:r,wait:o,timeoutSeconds:i,...s!==void 0?{automationId:s}:{},...c?{ambientServiceRun:c}:{}}))},runs:{get:(n)=>T(()=>t.runs.get({runId:n})),cancel:(n)=>T(()=>t.runs.cancel({runId:n})),stream:(n)=>T(()=>t.runs.stream(n))},search:{threads:(n)=>T(()=>t.search.threads(n)),messages:(n)=>T(()=>t.search.messages(n))},publicKeys:{list:(n)=>T(()=>t.publicKeys.list(n)),get:(n,r)=>T(()=>t.publicKeys.get(r?{keyId:n,projectId:r}:{keyId:n})),ensureLogForwarding:(n)=>T(()=>t.publicKeys.ensureLogForwarding(n)),update:(n)=>T(()=>t.publicKeys.update(n)),deactivate:(n)=>T(()=>t.publicKeys.deactivate(n))},secretKeys:{list:(n)=>T(()=>t.secretKeys.list(n)),get:(n)=>T(()=>t.secretKeys.get({keyId:n})),create:(n)=>T(()=>t.secretKeys.create(n)),update:(n)=>T(()=>t.secretKeys.update(n)),delete:(n)=>T(()=>t.secretKeys.delete(n))},issues:{count:(n={})=>T(()=>t.issues.count(n)),create:(n)=>T(()=>t.issues.create(n)),list:(n={})=>T(()=>t.issues.list(n)),search:(n={})=>T(()=>t.issues.search(n)),get:(n)=>T(()=>t.issues.get({issueId:n})),resolve:(n)=>T(()=>t.issues.resolve({issueId:n})),ignore:(n)=>T(()=>t.issues.ignore({issueId:n})),reopen:(n)=>T(()=>t.issues.reopen({issueId:n})),mute:(n)=>T(()=>t.issues.mute({issueId:n})),unmute:(n)=>T(()=>t.issues.unmute({issueId:n}))},pullRequests:{list:(n={})=>T(()=>t.pullRequests.list(n))},workItems:{create:(n)=>T(()=>t.workItems.create(n)),comment:(n)=>T(()=>t.workItems.comment(n)),transition:(n)=>T(()=>t.workItems.transition(n))},components:{list:(n={})=>T(()=>t.components.list(n)),get:(n)=>T(()=>t.components.get({componentId:n})),register:(n)=>T(()=>t.components.register(n)),deregister:(n)=>T(()=>t.components.deregister(n)),rename:(n)=>T(()=>t.components.rename(n)),reactivationPreview:(n)=>T(()=>t.components.reactivationPreview(n)),reactivate:(n)=>T(()=>t.components.reactivate(n)),mergePreview:(n)=>T(()=>t.components.mergePreview(n)),merge:(n)=>T(()=>t.components.merge(n)),relationships:{list:(n={})=>T(()=>t.components.relationships.list(n)),preview:(n)=>T(()=>t.components.relationships.preview(n)),add:(n)=>T(()=>t.components.relationships.add(n)),remove:(n)=>T(()=>t.components.relationships.remove(n))},incidents:{list:(n={})=>T(()=>t.components.incidents.list(n))},timeline:(n)=>T(()=>t.components.timeline(n))},billing:{getSummary:(n={})=>T(()=>t.billing.getSummary(n)),getUsage:(n={})=>T(()=>t.billing.getUsage(n)),getAccruedUsageCharges:(n={})=>T(()=>t.billing.getAccruedUsageCharges(n)),listUsageInvoices:(n={})=>T(()=>t.billing.listUsageInvoices(n)),listTransactions:(n={})=>T(()=>t.billing.listTransactions(n)),previewSubscriptionCancellation:()=>T(()=>t.billing.previewSubscriptionCancellation()),scheduleSubscriptionCancellation:()=>T(()=>t.billing.scheduleSubscriptionCancellation()),resumeSubscriptionCancellation:()=>T(()=>t.billing.resumeSubscriptionCancellation()),getAutoTopUp:(n={})=>T(()=>t.billing.getAutoTopUp(n)),updateAutoTopUp:(n)=>T(()=>t.billing.updateAutoTopUp(n)),purchaseCredits:(n)=>T(()=>t.billing.purchaseCredits(n)),listPlans:(n={})=>T(()=>t.billing.listPlans(n)),previewPlanChange:(n)=>T(()=>t.billing.previewPlanChange(n)),changePlan:(n)=>T(()=>t.billing.changePlan(n)),createCheckoutSession:(n)=>T(()=>t.billing.createCheckoutSession(n)),getCheckoutSessionStatus:(n)=>T(()=>t.billing.getCheckoutSessionStatus(n)),createPortalSession:(n={})=>T(()=>t.billing.createPortalSession(n)),getPaymentMethod:(n={})=>T(()=>t.billing.getPaymentMethod(n))},tasks:{list:(n={})=>T(()=>t.tasks.list(n))},recommendations:{list:(n={})=>T(()=>t.recommendations.list(n))},repos:{list:(n={})=>T(()=>t.repos.list(n)),add:(n)=>T(()=>t.repos.add(n)),remove:(n)=>T(()=>t.repos.remove(n))},onboarding:{getState:(n={})=>T(()=>t.onboarding.getState(n)),skipSampleIssue:(n)=>T(()=>t.onboarding.skipSampleIssue(n)),finish:(n)=>T(()=>t.onboarding.finish(n))},notificationDeliveryRules:{list:()=>T(()=>t.notificationDeliveryRules.list()),options:()=>T(()=>t.notificationDeliveryRules.options()),create:(n)=>T(()=>t.notificationDeliveryRules.create(n)),update:(n)=>T(()=>t.notificationDeliveryRules.update(n)),delete:(n)=>T(()=>t.notificationDeliveryRules.delete({ruleId:n}))},notificationChannels:{getProject:()=>T(()=>t.notificationChannels.getProject())},logSources:{listProviders:()=>T(()=>t.logSources.listProviders()),list:(n)=>T(()=>t.logSources.list(n)),get:(n)=>T(()=>t.logSources.get({logSourceId:n})),create:(n)=>T(()=>t.logSources.create(n)),update:(n)=>T(()=>t.logSources.update(n)),delete:(n)=>T(()=>t.logSources.delete({logSourceId:n}))},logStreams:{list:(n)=>T(()=>t.logStreams.list({logSourceId:n})),get:(n)=>T(()=>t.logStreams.get({streamId:n})),create:(n)=>T(()=>t.logStreams.create(n)),update:(n)=>T(()=>t.logStreams.update(n)),delete:(n)=>T(()=>t.logStreams.delete({streamId:n})),reassign:(n)=>T(()=>t.logStreams.reassign(n))},integrations:{listProviders:()=>T(()=>t.integrations.listProviders()),listConnections:(n)=>T(()=>t.integrations.listConnections(n)),getConnection:(n)=>T(()=>t.integrations.getConnection({connectionId:n})),createConnection:(n)=>T(()=>t.integrations.createConnection(n)),beginConnect:(n)=>T(()=>t.integrations.beginConnect(n)),getConnectAttempt:(n)=>T(()=>t.integrations.getConnectAttempt({attemptId:n})),disconnectConnection:(n)=>T(()=>t.integrations.disconnectConnection({connectionId:n})),updateConnectionCredentials:(n)=>T(()=>t.integrations.updateConnectionCredentials(n))},connectedAccounts:{beginConnect:(n)=>T(()=>t.connectedAccounts.beginConnect(n)),getConnectAttempt:(n)=>T(()=>t.connectedAccounts.getConnectAttempt({attemptId:n})),list:()=>T(()=>t.connectedAccounts.list({})),disconnect:(n)=>T(()=>t.connectedAccounts.disconnect(n))},mcpConnectors:{list:(n)=>T(()=>t.mcpConnectors.list(n)),get:(n)=>T(()=>t.mcpConnectors.get(n)),details:(n)=>T(()=>t.mcpConnectors.details(n)),listProviders:()=>T(()=>t.mcpConnectors.listProviders()),beginOAuthInstall:(n)=>T(()=>t.mcpConnectors.beginOAuthInstall(n)),getOAuthInstallAttempt:(n)=>T(()=>t.mcpConnectors.getOAuthInstallAttempt(n)),disconnect:(n)=>T(()=>t.mcpConnectors.disconnect(n)),update:(n)=>T(()=>t.mcpConnectors.update(n))},sandboxPresets:{delete:(n)=>T(()=>t.sandboxPresets.delete(n)),listConnections:(n)=>T(()=>t.sandboxPresets.listConnections(n)),listTypes:()=>T(()=>t.sandboxPresets.listTypes()),test:(n)=>T(()=>t.sandboxPresets.test(n)),upsert:(n)=>T(()=>t.sandboxPresets.upsert(n))},memory:{list:(n={})=>T(()=>t.memory.list(n)),get:(n)=>T(()=>t.memory.get(n)),search:(n)=>T(()=>t.memory.search(n)),put:(n)=>T(()=>t.memory.put({kind:"note",...n})),delete:(n)=>T(()=>t.memory.delete(n))},signalDefinitions:{list:(n={})=>T(()=>t.signalDefinitions.list(n)),get:(n)=>T(()=>t.signalDefinitions.get({signalDefinitionId:n})),create:(n)=>T(()=>t.signalDefinitions.create(n)),update:(n,r={})=>T(()=>t.signalDefinitions.update({signalDefinitionId:n,...r})),disable:(n)=>T(()=>t.signalDefinitions.disable({signalDefinitionId:n}))},scripts:{list:(n={})=>T(()=>t.scripts.list(n)),get:(n)=>T(()=>t.scripts.get({name:n})),create:(n)=>T(()=>t.scripts.create(n)),update:(n,r={})=>T(()=>t.scripts.update({name:n,...r})),delete:(n)=>T(()=>t.scripts.delete({name:n}))}}};var Cm=h(()=>{aM();ce();cM=new Map});var Xme;var ehe=h(()=>{Xme={version:2,activeProfile:"default",profiles:{default:{}}}});import*as gi from"node:fs";import*as the from"node:os";import*as dM from"node:path";var vn=(e)=>{if(e===void 0||e===null)return;if(typeof e==="string")return e.length>0?e:void 0;return},p8e=(e)=>{if(typeof e!=="object"||e===null||Array.isArray(e))return;let t={};for(let[n,r]of Object.entries(e)){if(!Array.isArray(r))continue;let o=r.filter((i)=>typeof i==="string"&&i.length>0);if(o.length>0)t[n]=o}return Object.keys(t).length>0?t:void 0},lM,$u,g8e=()=>{if(!gi.existsSync(lM))gi.mkdirSync(lM,{recursive:!0,mode:448})},uM,nhe=(e)=>{uM=e},ohe=(e)=>({token:vn(e.token),activeOrganizationId:vn(e.activeOrganizationId??e.organizationId),organizationName:vn(e.organizationName),activeProjectId:vn(e.activeProjectId??e.defaultProjectId),apiBaseUrl:vn(e.apiBaseUrl),authBaseUrl:vn(e.authBaseUrl),webBaseUrl:vn(e.webBaseUrl),intakeBaseUrl:vn(e.intakeBaseUrl),tailBaseUrl:vn(e.tailBaseUrl),apiDomain:vn(e.apiDomain),webDomain:vn(e.webDomain),intakeDomain:vn(e.intakeDomain),tailDomain:vn(e.tailDomain),forwardPublicKey:vn(e.forwardPublicKey),forwardPublicKeyProjectId:vn(e.forwardPublicKeyProjectId),skippedOnboardingSteps:p8e(e.skippedOnboardingSteps)}),m8e=(e)=>({version:2,activeProfile:"default",profiles:{default:ohe(e)}}),h8e=(e)=>{let t=vn(e.activeProfile)??"default",n=typeof e.profiles==="object"&&e.profiles!==null?e.profiles:{},r={};for(let[o,i]of Object.entries(n)){if(typeof i!=="object"||i===null)continue;r[o]=ohe(i)}if(!r[t])r[t]={};return{version:2,activeProfile:t,profiles:r}},Ye=()=>{try{if(!gi.existsSync($u))return Ct(Xme);let e=gi.readFileSync($u,"utf-8"),t=JSON.parse(e),n=typeof t.version==="number"?t.version:void 0;if(n!==void 0&&n>2)return ft("Settings file requires a newer CLI version. Upgrade with 'npm install -g @sazabi/cli@latest'.");if(n===2)return Ct(h8e(t));let r=m8e(t),o=yt(r);if(!o.success)return o;return Ct(r)}catch(e){let t=e instanceof Error?e.message:String(e);return ft(t)}},yt=(e)=>{try{return g8e(),gi.writeFileSync($u,JSON.stringify(e,null,2),{encoding:"utf-8",mode:384}),Ct(void 0)}catch(t){let n=t instanceof Error?t.message:String(t);return ft(n)}},Mo=(e,t)=>{if(t)return t;if(uM)return uM;let n=process.env.SAZABI_PROFILE?.trim();if(n)return n;return e.activeProfile??"default"},Wt=(e,t)=>{let n=Mo(e,t),r=e.profiles[n];if(r)return Ct(r);if(n==="default")return Ct({});return ft(`Profile '${n}' does not exist. Run 'sazabi profiles create ${n}' first.`)},sr=()=>{let e=Ye();if(!e.success)return e;return Wt(e.value)},Jt=(e,t,n)=>{let r=Mo(e,n);if(!e.profiles[r])return ft(`Profile '${r}' does not exist. Run 'sazabi profiles create ${r}' first.`);return Ct({...e,profiles:{...e.profiles,[r]:{...e.profiles[r],...t}}})},rhe=(e,t)=>e?.skippedOnboardingSteps?.[t]??[],ihe=(e,t,n,r)=>{let o=Wt(e,r);if(!o.success)return o;let i={...o.value.skippedOnboardingSteps},s=i[t]??[];if(!s.includes(n))i[t]=[...s,n];return Jt(e,{skippedOnboardingSteps:i},r)},she=(e,t,n)=>{let r=Wt(e,n);if(!r.success)return r;let{[t]:o,...i}=r.value.skippedOnboardingSteps??{};return Jt(e,{skippedOnboardingSteps:Object.keys(i).length>0?i:void 0},n)},zo=(e)=>{if(!e?.forwardPublicKey&&!e?.forwardPublicKeyProjectId)return{};return{forwardPublicKey:void 0,forwardPublicKeyProjectId:void 0}};var wn=h(()=>{ehe();ce();lM=dM.join(the.homedir(),".sazabi"),$u=dM.join(lM,"settings.json")});var Qr=(e)=>{let{cliFlag:t,globalUrl:n,globalDomain:r,buildUrlFromDomain:o,defaultUrl:i}=e;if(t)return t;let s=process.env.SAZABI_API_URL?.trim();if(s)return s;if(n)return n;if(r)return o(r);return i},Q=(e)=>{let{tokenFlag:t,organizationIdFlag:n,projectIdFlag:r,jsonMode:o}=e,i=t?.trim(),s=process.env.SAZABI_TOKEN?.trim(),c=process.env.SAZABI_ORGANIZATION_ID?.trim(),l=process.env.SAZABI_PROJECT_ID?.trim(),u=I(sr(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",o),d=u.token?.trim(),p=(i&&i.length>0?i:void 0)||(s&&s.length>0?s:void 0)||d,g=i&&i.length>0?"flag":s&&s.length>0?"environment":"settings";if(!p||p.length===0){if(o)return b("Not authenticated. Set SAZABI_TOKEN, pass --token, run 'sazabi auth login', or run 'sazabi auth save <token>'.");return y("Not authenticated. Set SAZABI_TOKEN, pass --token, run 'sazabi auth login', or run 'sazabi auth save <token>'.")}let m,A;if(n)m=n,A="flag";else if(c&&c.length>0)m=c,A="environment";else if(u.activeOrganizationId)m=u.activeOrganizationId,A="settings";let f,S;if(r)f=r,S="flag";else if(l&&l.length>0)f=l,S="environment";else if(u.activeProjectId)f=u.activeProjectId,S="settings";return{token:p,type:"token",projectId:f,organizationId:m,tokenSource:g,organizationSource:A,projectSource:S}},vm=(e)=>{let t=I(sr(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e?.jsonMode);return Qr({cliFlag:e?.apiBaseUrlFlag,globalUrl:t.apiBaseUrl,globalDomain:t.apiDomain,buildUrlFromDomain:(n)=>`https://api.${n}`,defaultUrl:"https://api.sazabi.com"})},N=(e)=>{let t=e.apiBaseUrl??vm({apiBaseUrlFlag:e.apiBaseUrlFlag,jsonMode:e.jsonMode});return pi({token:e.token,baseUrl:t,organizationId:e.organizationId,projectId:e.projectId,sandboxActorDescriptor:process.env.SAZABI_SANDBOX_ACTOR})},ahe,pM,bS=async(e)=>{let t=I(sr(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e.jsonMode),n=Qr({cliFlag:e.apiBaseUrlFlag,globalUrl:t.apiBaseUrl,globalDomain:t.apiDomain,buildUrlFromDomain:(l)=>`https://api.${l}`,defaultUrl:"https://api.sazabi.com"}),r=`${e.token}@${n}@${e.projectId??""}`,o=ahe.get(r);if(o)return o;let i=pM.get(r);if(i)return i;if(!e.projectId){if(e.jsonMode)return b("Project ID is required. Run 'sazabi projects use <project-id>' or set SAZABI_PROJECT_ID.");return y("Project ID is required. Run 'sazabi projects use <project-id>' or set SAZABI_PROJECT_ID.")}let s=e.projectId,c=(async()=>{let u=await pi({token:e.token,baseUrl:n,projectId:s}).projects.get(s),p=I(u,"Couldn't fetch project info (run 'sazabi projects list' to verify the project ID)",e.jsonMode).project;return ahe.set(r,p),p})();pM.set(r,c);try{return await c}finally{pM.delete(r)}},yS=(e)=>{let t=e.trim().toLowerCase(),n=/^[a-z][a-z0-9+.-]*:\/\//.test(t)?t:`https://${t}`,r=t;try{r=new URL(n).hostname.toLowerCase()}catch{r=t.replace(/^[a-z][a-z0-9+.-]*:\/\//,"").replace(/[/?#].*$/,"").replace(/:\d+$/,"")}return`https://app.${r.replace(/^(?:app\.)+/,"")}`},A8e=(e)=>{try{let t=new URL(e),n=t.hostname.toLowerCase();if(!n.startsWith("api."))return null;return`${t.protocol}//app.${n.slice(4)}`}catch{return null}},Nr=(e)=>{let t=(r)=>r.replace(/\/+$/,"");if(e)return t(e);let n=I(sr(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)");if(n.webBaseUrl)return t(n.webBaseUrl);if(n.webDomain)return yS(n.webDomain);if(n.apiDomain)return yS(n.apiDomain);if(n.apiBaseUrl){let r=A8e(n.apiBaseUrl);if(r)return r}return"https://app.sazabi.com"},Xn=(e,t)=>{if(e&&e.length>0)return e;let n="No project selected. Pass --project-id, set SAZABI_PROJECT_ID, or run 'sazabi projects use <project-id>'.";if(t)return b(n);return y(n)},vs=(e,t)=>`${Nr(t)}/projects/${e}`,zt=(e,t,n,r)=>{let o=`${Nr(n)}/projects/${e}/threads/${t}`;return r?`${o}?messageId=${encodeURIComponent(r)}`:o},che=(e,t,n,r)=>zt(e,t,n,r),lhe=(e,t,n)=>`${vs(e,n)}/issues/${t}`,uhe=(e,t,n)=>`${vs(e,n)}/automations/${t}`,dhe=(e,t)=>`${vs(e,t)}/status`,phe=(e,t,n)=>`${vs(e,n)}/settings/log-source-providers/${t}`,ghe=(e,t,n)=>`${vs(e,n)}/settings/mcp-connectors/${t}`,IS=(e,t,n)=>`${vs(e,n)}/settings/sandbox/catalog/${t}`,mhe=(e,t)=>`https://otlp.${t}.intake.${e}`;var be=h(()=>{re();Cm();ce();wn();ahe=new Map,pM=new Map});var WS,wbe=(e)=>{WS.set(e.name,e)},JS=(e)=>WS.get(e),Wm=()=>Array.from(WS.values()),Ebe=(e)=>WS.has(e);var xz=h(()=>{WS=new Map});async function Oz(e){let t=await e.publicKeys.list({limit:20});if(!t.success)return[];return t.value.publicKeys.map((n)=>({value:n.id,description:n.name}))}async function _z(e){let t=await e.secretKeys.list({limit:20});if(!t.success)return[];return t.value.secretKeys.map((n)=>({value:n.id,description:n.name}))}async function Zm(e){let t=await e.logSources.list();if(!t.success)return[];return t.value.logSources.map((n)=>({value:n.id,description:n.name??n.provider}))}async function xbe(e){let t=await e.members.list();if(!t.success)return[];return t.value.members.map((n)=>({value:n.userId,description:n.name??n.email}))}var Pat=3000,Rat,Pbe=async(e,t,n)=>{try{let r=Rat[e]?.[t];if(!r)return[];let o=sr();if(!o.success)return[];let i=o.value,s=process.env.SAZABI_TOKEN?.trim()||i.token?.trim();if(!s)return[];let c=Qr({globalUrl:i.apiBaseUrl,globalDomain:i.apiDomain,buildUrlFromDomain:(d)=>`https://api.${d}`,defaultUrl:"https://api.sazabi.com"}),l=pi({token:s,baseUrl:c,organizationId:i.activeOrganizationId,projectId:i.activeProjectId});return(await Promise.race([r(l),new Promise((d)=>setTimeout(()=>d([]),Pat))])).filter((d)=>d.value.startsWith(n))}catch{return[]}};var Rbe=h(()=>{Cm();be();wn();Rat={threads:{get:async(e)=>{let t=await e.threads.list({limit:20});if(!t.success)return[];return t.value.threads.map((n)=>({value:n.id,description:n.title??void 0}))}},projects:{use:async(e)=>{let t=await e.projects.list();if(!t.success)return[];return t.value.projects.map((n)=>({value:n.id,description:n.name}))}},organizations:{use:async(e)=>{let t=await e.organizations.list();if(!t.success)return[];return t.value.organizations.map((n)=>({value:n.id,description:n.name}))},rename:async(e)=>{let t=await e.organizations.list();if(!t.success)return[];return t.value.organizations.map((n)=>({value:n.id,description:n.name}))}},"public-keys":{get:Oz,update:Oz,deactivate:Oz},"secret-keys":{get:_z,update:_z,delete:_z},"log-sources":{get:Zm,enable:Zm,disable:Zm,delete:Zm,remove:Zm},members:{"update-role":xbe,remove:xbe}}});var Bbe={};cr(Bbe,{getCompletions:()=>_at,parseCompletionContext:()=>Oat});var Tat,Bat,Oat=(e)=>{let t=e.length>0?e:[""],n=t.length-1,r=t[n]??"";return{words:t,currentIndex:n,partial:r}},_at=async(e)=>{let{words:t,currentIndex:n,partial:r}=e,o=t[n-1];if(o==="--profile")return Nat(r);let i=Qat(t),s=Math.max(0,i.length-(t.length-n));if(s===0)return Dat(r);let c=i[0]??"",l=JS(c);if(!l)return[];if(s===1&&l.subcommands){if(r.startsWith("-"))return Tbe(l.options,i);return Lat(l,r)}let u=l.subcommands?i[1]:void 0,p=(u?l.subcommands?.[u]:void 0)?.options??l.options;if(r.startsWith("-"))return Tbe(p,i);if(o?.startsWith("--")){let g=o.slice(2);if(p?.[g]?.type==="string"){let A=`${c}:${u??""}`,f=Bat[A]?.[g]??Tat[g];if(f)return f.filter((S)=>S.startsWith(r)).map((S)=>({value:S}));return[]}}return Pbe(c,u??"",r)},Dat=(e)=>{let n=Wm().filter((o)=>o.name.startsWith(e)).map((o)=>({value:o.name,description:o.description})),r=[{value:"--help",description:"Show help"},{value:"--version",description:"Show version"},{value:"--profile",description:"Use a named profile"}];for(let o of r)if(o.value.startsWith(e))n.push(o);return n},Lat=(e,t)=>{if(!e.subcommands)return[];return Object.values(e.subcommands).filter((n)=>n.name.startsWith(t)).map((n)=>({value:n.name,description:n.description}))},Tbe=(e,t)=>{let n=t[t.length-1]??"",r=new Set(t.filter((i)=>i.startsWith("--")).map((i)=>i.replace(/=.*/,""))),o=[];if(!r.has("--help")&&"--help".startsWith(n))o.push({value:"--help",description:"Show help"});if(!r.has("--profile")&&"--profile".startsWith(n))o.push({value:"--profile",description:"Use a named profile"});if(!e)return o;for(let[i,s]of Object.entries(e)){let c=`--${i}`;if(r.has(c))continue;if(!c.startsWith(n))continue;o.push({value:c,description:s.description})}return o},Qat=(e)=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(r==="--profile"&&n+1<e.length)n++;else if(r.startsWith("--profile="));else t.push(r)}return t},Nat=(e)=>{try{let t=Ye();if(!t.success)return[];return Object.keys(t.value.profiles).filter((n)=>n.startsWith(e)).map((n)=>({value:n,description:n===t.value.activeProfile?"active":void 0}))}catch{return[]}};var Obe=h(()=>{xz();wn();Rbe();Tat={status:["regular","archived"],format:["json","text"]},Bat={"members:update-role":{role:["admin","member"]},"messages:search":{role:["user","assistant"]},"messages:list":{role:["user","assistant"]}}});re();re();re();import{parseArgs as Vz}from"node:util";var E=(e,t,n={})=>{let r=Object.hasOwn(t,"json")&&e.includes("--json"),o=(d,p)=>{if(r)b({code:d,message:p,operationId:null});throw y(p),Error("Unreachable")},i=(()=>{try{return Vz({args:e,options:t,allowPositionals:Boolean(n.allowPositionals),strict:!1,tokens:!0})}catch(d){let p=new Set(Object.keys(t)),g=new Set(Object.values(t).map((A)=>A.short).filter((A)=>Boolean(A)));try{let A=Vz({args:e,options:t,allowPositionals:!0,strict:!1,tokens:!0}),f=[...new Set((A.tokens??[]).flatMap((S)=>S.kind==="option"?[S]:[]).filter((S)=>!p.has(S.name)&&!(S.name.length===1&&g.has(S.name))).map((S)=>S.name.length>1?`--${S.name}`:`-${S.name}`))];if(f.length>0)return o("UNEXPECTED_ARGUMENT",`Unknown option${f.length>1?"s":""}: ${f.join(", ")}. Run the command with -h for usage.`)}catch{}let m=d instanceof Error?d.message:"Invalid arguments.";return o("INVALID_ARGUMENT",`${m.endsWith(".")?m:`${m}.`} Run the command with -h for usage.`)}})(),s=Object.hasOwn(t,"json")&&i.values.json===!0,c=new Set(Object.keys(t)),l=new Set(Object.entries(t).map(([,d])=>d.short).filter((d)=>Boolean(d))),u=[];if(Array.isArray(i.tokens))for(let d of i.tokens){if(d.kind!=="option")continue;let p=d.name,g=p.length>1;if(!(c.has(p)||!g&&l.has(p))){let A=g?`--${p}`:`-${p}`;if(!u.includes(A))u.push(A)}}for(let d of Object.keys(i.values))if(!c.has(d)){let p=d.length>1?`--${d}`:`-${d}`;if(!u.includes(p))u.push(p)}if(u.length>0){let d=`Unknown option${u.length>1?"s":""}: ${u.join(", ")}. Run the command with -h for usage.`;if(s)b({code:"UNEXPECTED_ARGUMENT",message:d,operationId:null});y(d)}for(let[d,p]of Object.entries(t))if(p.type==="string"&&i.values[d]===!0){let g=d.length===1?`-${d}`:`--${d}`,m=`Option ${g} requires a value. Use '${g} <value>'.`;o("INVALID_ARGUMENT",m)}for(let[d,p]of Object.entries(t)){let g=i.values[d];if(p.type==="string"&&typeof g==="string"){if(g.length===0){let A=d.length===1?`-${d}`:`--${d}`;o("INVALID_ARGUMENT",`Option ${A} requires a non-empty value.`)}if(g.startsWith("--")||g.length===2&&g[0]==="-"&&/[a-zA-Z]/.test(g.charAt(1))){let f=`Option ${d.length===1?`-${d}`:`--${d}`} received "${g}" as its value. Did you forget to provide a value?`;o("INVALID_ARGUMENT",f)}}}if(!n.allowPositionals&&i.positionals.length>0)o("UNEXPECTED_ARGUMENT",`Unexpected argument${i.positionals.length>1?"s":""}: ${i.positionals.join(", ")}. Run the command with -h for usage.`);return{values:i.values,positionals:i.positionals}};var ih=(e,t)=>{if(e?.json?.type!=="boolean")throw Error(`${t} must include a boolean --json option (enforced by CommandBuilder)`)};class Kz{name;description;handler;subcommands;options;examples;positionalArgs;allowNoJson=!1;constructor(e,t,n){this.name=e,this.description=t,this.handler=n}withOptions(e){return this.options=e,this}withSubcommands(e){return this.subcommands=e,this}withExamples(e){return this.examples=e,this}withPositionalArgs(e){return this.positionalArgs=e,this}build(){if(!this.handler&&!this.subcommands)throw Error(`Subcommand "${this.name}" must have either a handler or subcommands`);if(!this.allowNoJson&&this.handler)ih(this.options,`Subcommand "${this.name}"`);if(!this.allowNoJson&&this.subcommands){for(let[e,t]of Object.entries(this.subcommands))if(!t.subcommands)ih(t.options,`Subcommand "${this.name} ${e}"`)}return{name:this.name,description:this.description,handler:this.handler,subcommands:this.subcommands,options:this.options,examples:this.examples,positionalArgs:this.positionalArgs}}allowWithoutJson(){return this.allowNoJson=!0,this}}class Yz{name;description;handler;subcommands;options;examples;positionalArgs;allowNoJson=!1;constructor(e,t){this.name=e,this.description=t}withHandler(e){return this.handler=e,this}withSubcommands(e){return this.subcommands=e,this}withOptions(e){return this.options=e,this}withExamples(e){return this.examples=e,this}withPositionalArgs(e){return this.positionalArgs=e,this}build(){if(!this.handler&&!this.subcommands)throw Error(`Command "${this.name}" must have either a handler or subcommands`);if(!this.allowNoJson){if(this.handler)ih(this.options,`Command "${this.name}"`);if(this.subcommands)for(let[e,t]of Object.entries(this.subcommands)){if(t.subcommands)continue;ih(t.options,`Subcommand "${this.name} ${e}"`)}}return{name:this.name,description:this.description,handler:this.handler,subcommands:this.subcommands,options:this.options,examples:this.examples,positionalArgs:this.positionalArgs}}allowWithoutJson(){return this.allowNoJson=!0,this}}var se=(e,t)=>new Yz(e,t),C=(e,t,n)=>new Kz(e,t,n);re();var hn=(e,t,n,r,o)=>{let i=Number.parseInt(e,10);if(Number.isNaN(i)||i<t||i>n){let s=`${r} must be between ${t} and ${n}.`;if(o)return b(s);return y(s)}return i},no=(e,t,n,r)=>{if(!t.includes(e)){let o=t.map((s)=>`"${s}"`).join(" or "),i=`${n} must be ${o}.`;if(r)return b(i);return y(i)}return e};re();be();ce();var mM=(e)=>{let t=[];for(let n of e){let r=0;for(let o of n.content){if(o.type!=="artifact")continue;t.push({id:`${n.id}:${r}`,messageId:n.id,name:o.name,toolCallId:o.toolCallId??null,createdAt:n.createdAt,data:o.data}),r+=1}}return t},Ahe=(e)=>{let t=e.lastIndexOf(":");if(t<=0||t===e.length-1)return null;let n=e.slice(0,t),r=e.slice(t+1);if(!/^\d+$/.test(r))return null;return{messageId:n,index:Number.parseInt(r,10)}},fhe=(e,t)=>mM(e).find((n)=>n.id===t),gM=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),hhe=(e)=>{let t=e===null||e===void 0?"":typeof e==="object"?JSON.stringify(e):String(e);if(/[",\n\r]/.test(t))return`"${t.replace(/"/g,'""')}"`;return t},f8e=(e)=>{if(Array.isArray(e)&&e.every(gM))return e;if(gM(e))for(let t of["rows","data","items","points"]){let n=e[t];if(Array.isArray(n)&&n.every(gM))return n}return null},yhe=(e)=>{let t=f8e(e);if(!t||t.length===0)return null;let n=[];for(let o of t)for(let i of Object.keys(o))if(!n.includes(i))n.push(i);if(n.length===0)return null;let r=[n.map(hhe).join(",")];for(let o of t)r.push(n.map((i)=>hhe(o[i])).join(","));return r.join(`
|