pando-ai 0.9.4 → 0.9.5
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/security-daemon.js
CHANGED
|
@@ -33209,7 +33209,7 @@ ${f.join(`
|
|
|
33209
33209
|
...iss,
|
|
33210
33210
|
path: iss.path ? [${kPe(Et)}, ...iss.path] : [${kPe(Et)}]
|
|
33211
33211
|
})));`),$.write(`newResult[${kPe(Et)}] = ${Xt}.value`)}$.write("payload.value = newResult;"),$.write("return payload;");let gt=$.compile();return(Et,Xt)=>gt(se,Et,Xt)},g,x=b8e,w=!DEt.jitless,G=w&&Bjt.value,H=i.catchall,Q;o._zod.parse=(se,$)=>{Q??(Q=a.value);let Se=se.value;if(!x(Se))return se.issues.push({expected:"object",code:"invalid_type",input:Se,inst:o}),se;let he=[];if(w&&G&&$?.async===!1&&$.jitless!==!0)g||(g=f(i.shape)),se=g(se,$);else{se.value={};let Xt=Q.shape;for(let ln of Q.keys){let Yt=Xt[ln],Gt=Yt._zod.run({value:Se[ln],issues:[]},$),yt=Yt._zod.optin==="optional"&&Yt._zod.optout==="optional";Gt instanceof Promise?he.push(Gt.then(Wt=>yt?kdn(Wt,se,ln,Se):MEt(Wt,se,ln))):yt?kdn(Gt,se,ln,Se):MEt(Gt,se,ln)}}if(!H)return he.length?Promise.all(he).then(()=>se):se;let ge=[],st=Q.keySet,gt=H._zod,Et=gt.def.type;for(let Xt of Object.keys(Se)){if(st.has(Xt))continue;if(Et==="never"){ge.push(Xt);continue}let ln=gt.run({value:Se[Xt],issues:[]},$);ln instanceof Promise?he.push(ln.then(Yt=>MEt(Yt,se,Xt))):MEt(ln,se,Xt)}return ge.length&&se.issues.push({code:"unrecognized_keys",keys:ge,input:Se,inst:o}),he.length?Promise.all(he).then(()=>se):se}});function Ndn(o,i,a,f){for(let g of o)if(g.issues.length===0)return i.value=g.value,i;return i.issues.push({code:"invalid_union",input:i.value,inst:a,errors:o.map(g=>g.issues.map(x=>Cee(x,f,Bq())))}),i}var Zjt=tc("$ZodUnion",(o,i)=>{Jw.init(o,i),Hw(o._zod,"optin",()=>i.options.some(a=>a._zod.optin==="optional")?"optional":void 0),Hw(o._zod,"optout",()=>i.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Hw(o._zod,"values",()=>{if(i.options.every(a=>a._zod.values))return new Set(i.options.flatMap(a=>Array.from(a._zod.values)))}),Hw(o._zod,"pattern",()=>{if(i.options.every(a=>a._zod.pattern)){let a=i.options.map(f=>f._zod.pattern);return new RegExp(`^(${a.map(f=>Net(f.source)).join("|")})$`)}}),o._zod.parse=(a,f)=>{let g=!1,x=[];for(let w of i.options){let R=w._zod.run({value:a.value,issues:[]},f);if(R instanceof Promise)x.push(R),g=!0;else{if(R.issues.length===0)return R;x.push(R)}}return g?Promise.all(x).then(w=>Ndn(w,a,o,f)):Ndn(x,a,o,f)}}),hfn=tc("$ZodDiscriminatedUnion",(o,i)=>{Zjt.init(o,i);let a=o._zod.parse;Hw(o._zod,"propValues",()=>{let g={};for(let x of i.options){let w=x._zod.propValues;if(!w||Object.keys(w).length===0)throw new Error(`Invalid discriminated union option at index "${i.options.indexOf(x)}"`);for(let[R,G]of Object.entries(w)){g[R]||(g[R]=new Set);for(let H of G)g[R].add(H)}}return g});let f=Iet(()=>{let g=i.options,x=new Map;for(let w of g){let R=w._zod.propValues[i.discriminator];if(!R||R.size===0)throw new Error(`Invalid discriminated union option at index "${i.options.indexOf(w)}"`);for(let G of R){if(x.has(G))throw new Error(`Duplicate discriminator value "${String(G)}"`);x.set(G,w)}}return x});o._zod.parse=(g,x)=>{let w=g.value;if(!b8e(w))return g.issues.push({code:"invalid_type",expected:"object",input:w,inst:o}),g;let R=f.value.get(w?.[i.discriminator]);return R?R._zod.run(g,x):i.unionFallback?a(g,x):(g.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:w,path:[i.discriminator],inst:o}),g)}}),gfn=tc("$ZodIntersection",(o,i)=>{Jw.init(o,i),o._zod.parse=(a,f)=>{let g=a.value,x=i.left._zod.run({value:g,issues:[]},f),w=i.right._zod.run({value:g,issues:[]},f);return x instanceof Promise||w instanceof Promise?Promise.all([x,w]).then(([G,H])=>Rdn(a,G,H)):Rdn(a,x,w)}});function Qjt(o,i){if(o===i)return{valid:!0,data:o};if(o instanceof Date&&i instanceof Date&&+o==+i)return{valid:!0,data:o};if(S8e(o)&&S8e(i)){let a=Object.keys(i),f=Object.keys(o).filter(x=>a.indexOf(x)!==-1),g={...o,...i};for(let x of f){let w=Qjt(o[x],i[x]);if(!w.valid)return{valid:!1,mergeErrorPath:[x,...w.mergeErrorPath]};g[x]=w.data}return{valid:!0,data:g}}if(Array.isArray(o)&&Array.isArray(i)){if(o.length!==i.length)return{valid:!1,mergeErrorPath:[]};let a=[];for(let f=0;f<o.length;f++){let g=o[f],x=i[f],w=Qjt(g,x);if(!w.valid)return{valid:!1,mergeErrorPath:[f,...w.mergeErrorPath]};a.push(w.data)}return{valid:!0,data:a}}return{valid:!1,mergeErrorPath:[]}}function Rdn(o,i,a){if(i.issues.length&&o.issues.push(...i.issues),a.issues.length&&o.issues.push(...a.issues),NPe(o))return o;let f=Qjt(i.value,a.value);if(!f.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(f.mergeErrorPath)}`);return o.value=f.data,o}var yfn=tc("$ZodRecord",(o,i)=>{Jw.init(o,i),o._zod.parse=(a,f)=>{let g=a.value;if(!S8e(g))return a.issues.push({expected:"record",code:"invalid_type",input:g,inst:o}),a;let x=[];if(i.keyType._zod.values){let w=i.keyType._zod.values;a.value={};for(let G of w)if(typeof G=="string"||typeof G=="number"||typeof G=="symbol"){let H=i.valueType._zod.run({value:g[G],issues:[]},f);H instanceof Promise?x.push(H.then(Q=>{Q.issues.length&&a.issues.push(...qse(G,Q.issues)),a.value[G]=Q.value})):(H.issues.length&&a.issues.push(...qse(G,H.issues)),a.value[G]=H.value)}let R;for(let G in g)w.has(G)||(R=R??[],R.push(G));R&&R.length>0&&a.issues.push({code:"unrecognized_keys",input:g,inst:o,keys:R})}else{a.value={};for(let w of Reflect.ownKeys(g)){if(w==="__proto__")continue;let R=i.keyType._zod.run({value:w,issues:[]},f);if(R instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(R.issues.length){a.issues.push({origin:"record",code:"invalid_key",issues:R.issues.map(H=>Cee(H,f,Bq())),input:w,path:[w],inst:o}),a.value[R.value]=R.value;continue}let G=i.valueType._zod.run({value:g[w],issues:[]},f);G instanceof Promise?x.push(G.then(H=>{H.issues.length&&a.issues.push(...qse(w,H.issues)),a.value[R.value]=H.value})):(G.issues.length&&a.issues.push(...qse(w,G.issues)),a.value[R.value]=G.value)}}return x.length?Promise.all(x).then(()=>a):a}});var vfn=tc("$ZodEnum",(o,i)=>{Jw.init(o,i);let a=Mjt(i.entries);o._zod.values=new Set(a),o._zod.pattern=new RegExp(`^(${a.filter(f=>Wjt.has(typeof f)).map(f=>typeof f=="string"?F0e(f):f.toString()).join("|")})$`),o._zod.parse=(f,g)=>{let x=f.value;return o._zod.values.has(x)||f.issues.push({code:"invalid_value",values:a,input:x,inst:o}),f}}),bfn=tc("$ZodLiteral",(o,i)=>{Jw.init(o,i),o._zod.values=new Set(i.values),o._zod.pattern=new RegExp(`^(${i.values.map(a=>typeof a=="string"?F0e(a):a?a.toString():String(a)).join("|")})$`),o._zod.parse=(a,f)=>{let g=a.value;return o._zod.values.has(g)||a.issues.push({code:"invalid_value",values:i.values,input:g,inst:o}),a}});var Sfn=tc("$ZodTransform",(o,i)=>{Jw.init(o,i),o._zod.parse=(a,f)=>{let g=i.transform(a.value,a);if(f.async)return(g instanceof Promise?g:Promise.resolve(g)).then(w=>(a.value=w,a));if(g instanceof Promise)throw new Gfe;return a.value=g,a}}),xfn=tc("$ZodOptional",(o,i)=>{Jw.init(o,i),o._zod.optin="optional",o._zod.optout="optional",Hw(o._zod,"values",()=>i.innerType._zod.values?new Set([...i.innerType._zod.values,void 0]):void 0),Hw(o._zod,"pattern",()=>{let a=i.innerType._zod.pattern;return a?new RegExp(`^(${Net(a.source)})?$`):void 0}),o._zod.parse=(a,f)=>i.innerType._zod.optin==="optional"?i.innerType._zod.run(a,f):a.value===void 0?a:i.innerType._zod.run(a,f)}),Efn=tc("$ZodNullable",(o,i)=>{Jw.init(o,i),Hw(o._zod,"optin",()=>i.innerType._zod.optin),Hw(o._zod,"optout",()=>i.innerType._zod.optout),Hw(o._zod,"pattern",()=>{let a=i.innerType._zod.pattern;return a?new RegExp(`^(${Net(a.source)}|null)$`):void 0}),Hw(o._zod,"values",()=>i.innerType._zod.values?new Set([...i.innerType._zod.values,null]):void 0),o._zod.parse=(a,f)=>a.value===null?a:i.innerType._zod.run(a,f)}),Tfn=tc("$ZodDefault",(o,i)=>{Jw.init(o,i),o._zod.optin="optional",Hw(o._zod,"values",()=>i.innerType._zod.values),o._zod.parse=(a,f)=>{if(a.value===void 0)return a.value=i.defaultValue,a;let g=i.innerType._zod.run(a,f);return g instanceof Promise?g.then(x=>Mdn(x,i)):Mdn(g,i)}});function Mdn(o,i){return o.value===void 0&&(o.value=i.defaultValue),o}var Cfn=tc("$ZodPrefault",(o,i)=>{Jw.init(o,i),o._zod.optin="optional",Hw(o._zod,"values",()=>i.innerType._zod.values),o._zod.parse=(a,f)=>(a.value===void 0&&(a.value=i.defaultValue),i.innerType._zod.run(a,f))}),Afn=tc("$ZodNonOptional",(o,i)=>{Jw.init(o,i),Hw(o._zod,"values",()=>{let a=i.innerType._zod.values;return a?new Set([...a].filter(f=>f!==void 0)):void 0}),o._zod.parse=(a,f)=>{let g=i.innerType._zod.run(a,f);return g instanceof Promise?g.then(x=>Ldn(x,o)):Ldn(g,o)}});function Ldn(o,i){return!o.issues.length&&o.value===void 0&&o.issues.push({code:"invalid_type",expected:"nonoptional",input:o.value,inst:i}),o}var wfn=tc("$ZodCatch",(o,i)=>{Jw.init(o,i),o._zod.optin="optional",Hw(o._zod,"optout",()=>i.innerType._zod.optout),Hw(o._zod,"values",()=>i.innerType._zod.values),o._zod.parse=(a,f)=>{let g=i.innerType._zod.run(a,f);return g instanceof Promise?g.then(x=>(a.value=x.value,x.issues.length&&(a.value=i.catchValue({...a,error:{issues:x.issues.map(w=>Cee(w,f,Bq()))},input:a.value}),a.issues=[]),a)):(a.value=g.value,g.issues.length&&(a.value=i.catchValue({...a,error:{issues:g.issues.map(x=>Cee(x,f,Bq()))},input:a.value}),a.issues=[]),a)}});var Dfn=tc("$ZodPipe",(o,i)=>{Jw.init(o,i),Hw(o._zod,"values",()=>i.in._zod.values),Hw(o._zod,"optin",()=>i.in._zod.optin),Hw(o._zod,"optout",()=>i.out._zod.optout),o._zod.parse=(a,f)=>{let g=i.in._zod.run(a,f);return g instanceof Promise?g.then(x=>Odn(x,i,f)):Odn(g,i,f)}});function Odn(o,i,a){return NPe(o)?o:i.out._zod.run({value:o.value,issues:o.issues},a)}var Pfn=tc("$ZodReadonly",(o,i)=>{Jw.init(o,i),Hw(o._zod,"propValues",()=>i.innerType._zod.propValues),Hw(o._zod,"values",()=>i.innerType._zod.values),Hw(o._zod,"optin",()=>i.innerType._zod.optin),Hw(o._zod,"optout",()=>i.innerType._zod.optout),o._zod.parse=(a,f)=>{let g=i.innerType._zod.run(a,f);return g instanceof Promise?g.then(Fdn):Fdn(g)}});function Fdn(o){return o.value=Object.freeze(o.value),o}var Ifn=tc("$ZodCustom",(o,i)=>{b5.init(o,i),Jw.init(o,i),o._zod.parse=(a,f)=>a,o._zod.check=a=>{let f=a.value,g=i.fn(f);if(g instanceof Promise)return g.then(x=>Bdn(x,a,f,o));Bdn(g,a,f,o)}});function Bdn(o,i,a,f){if(!o){let g={code:"custom",input:a,inst:f,path:[...f._zod.def.path??[]],continue:!f._zod.def.abort};f._zod.def.params&&(g.params=f._zod.def.params),i.issues.push(Gjt(g))}}var HFn=o=>{let i=typeof o;switch(i){case"number":return Number.isNaN(o)?"NaN":"number";case"object":{if(Array.isArray(o))return"array";if(o===null)return"null";if(Object.getPrototypeOf(o)!==Object.prototype&&o.constructor)return o.constructor.name}}return i},JFn=()=>{let o={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function i(f){return o[f]??null}let a={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return f=>{switch(f.code){case"invalid_type":return`Invalid input: expected ${f.expected}, received ${HFn(f.input)}`;case"invalid_value":return f.values.length===1?`Invalid input: expected ${kEt(f.values[0])}`:`Invalid option: expected one of ${PEt(f.values,"|")}`;case"too_big":{let g=f.inclusive?"<=":"<",x=i(f.origin);return x?`Too big: expected ${f.origin??"value"} to have ${g}${f.maximum.toString()} ${x.unit??"elements"}`:`Too big: expected ${f.origin??"value"} to be ${g}${f.maximum.toString()}`}case"too_small":{let g=f.inclusive?">=":">",x=i(f.origin);return x?`Too small: expected ${f.origin} to have ${g}${f.minimum.toString()} ${x.unit}`:`Too small: expected ${f.origin} to be ${g}${f.minimum.toString()}`}case"invalid_format":{let g=f;return g.format==="starts_with"?`Invalid string: must start with "${g.prefix}"`:g.format==="ends_with"?`Invalid string: must end with "${g.suffix}"`:g.format==="includes"?`Invalid string: must include "${g.includes}"`:g.format==="regex"?`Invalid string: must match pattern ${g.pattern}`:`Invalid ${a[g.format]??f.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${f.divisor}`;case"unrecognized_keys":return`Unrecognized key${f.keys.length>1?"s":""}: ${PEt(f.keys,", ")}`;case"invalid_key":return`Invalid key in ${f.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${f.origin}`;default:return"Invalid input"}}};function kfn(){return{localeError:JFn()}}var ezt=class{constructor(){this._map=new Map,this._idmap=new Map}add(i,...a){let f=a[0];if(this._map.set(i,f),f&&typeof f=="object"&&"id"in f){if(this._idmap.has(f.id))throw new Error(`ID ${f.id} already exists in the registry`);this._idmap.set(f.id,i)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(i){let a=this._map.get(i);return a&&typeof a=="object"&&"id"in a&&this._idmap.delete(a.id),this._map.delete(i),this}get(i){let a=i._zod.parent;if(a){let f={...this.get(a)??{}};return delete f.id,{...f,...this._map.get(i)}}return this._map.get(i)}has(i){return this._map.has(i)}};function $Fn(){return new ezt}var Let=$Fn();function Nfn(o,i){return new o({type:"string",...zh(i)})}function Rfn(o,i){return new o({type:"string",format:"email",check:"string_format",abort:!1,...zh(i)})}function tzt(o,i){return new o({type:"string",format:"guid",check:"string_format",abort:!1,...zh(i)})}function Mfn(o,i){return new o({type:"string",format:"uuid",check:"string_format",abort:!1,...zh(i)})}function Lfn(o,i){return new o({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...zh(i)})}function Ofn(o,i){return new o({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...zh(i)})}function Ffn(o,i){return new o({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...zh(i)})}function Bfn(o,i){return new o({type:"string",format:"url",check:"string_format",abort:!1,...zh(i)})}function Wfn(o,i){return new o({type:"string",format:"emoji",check:"string_format",abort:!1,...zh(i)})}function jfn(o,i){return new o({type:"string",format:"nanoid",check:"string_format",abort:!1,...zh(i)})}function zfn(o,i){return new o({type:"string",format:"cuid",check:"string_format",abort:!1,...zh(i)})}function Gfn(o,i){return new o({type:"string",format:"cuid2",check:"string_format",abort:!1,...zh(i)})}function Ufn(o,i){return new o({type:"string",format:"ulid",check:"string_format",abort:!1,...zh(i)})}function Vfn(o,i){return new o({type:"string",format:"xid",check:"string_format",abort:!1,...zh(i)})}function Hfn(o,i){return new o({type:"string",format:"ksuid",check:"string_format",abort:!1,...zh(i)})}function Jfn(o,i){return new o({type:"string",format:"ipv4",check:"string_format",abort:!1,...zh(i)})}function $fn(o,i){return new o({type:"string",format:"ipv6",check:"string_format",abort:!1,...zh(i)})}function Kfn(o,i){return new o({type:"string",format:"cidrv4",check:"string_format",abort:!1,...zh(i)})}function qfn(o,i){return new o({type:"string",format:"cidrv6",check:"string_format",abort:!1,...zh(i)})}function Xfn(o,i){return new o({type:"string",format:"base64",check:"string_format",abort:!1,...zh(i)})}function Qfn(o,i){return new o({type:"string",format:"base64url",check:"string_format",abort:!1,...zh(i)})}function Yfn(o,i){return new o({type:"string",format:"e164",check:"string_format",abort:!1,...zh(i)})}function Zfn(o,i){return new o({type:"string",format:"jwt",check:"string_format",abort:!1,...zh(i)})}function epn(o,i){return new o({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...zh(i)})}function tpn(o,i){return new o({type:"string",format:"date",check:"string_format",...zh(i)})}function npn(o,i){return new o({type:"string",format:"time",check:"string_format",precision:null,...zh(i)})}function rpn(o,i){return new o({type:"string",format:"duration",check:"string_format",...zh(i)})}function ipn(o,i){return new o({type:"number",checks:[],...zh(i)})}function spn(o,i){return new o({type:"number",check:"number_format",abort:!1,format:"safeint",...zh(i)})}function opn(o,i){return new o({type:"boolean",...zh(i)})}function apn(o,i){return new o({type:"null",...zh(i)})}function lpn(o){return new o({type:"unknown"})}function cpn(o,i){return new o({type:"never",...zh(i)})}function OEt(o,i){return new qjt({check:"less_than",...zh(i),value:o,inclusive:!1})}function Oet(o,i){return new qjt({check:"less_than",...zh(i),value:o,inclusive:!0})}function FEt(o,i){return new Xjt({check:"greater_than",...zh(i),value:o,inclusive:!1})}function Fet(o,i){return new Xjt({check:"greater_than",...zh(i),value:o,inclusive:!0})}function BEt(o,i){return new hdn({check:"multiple_of",...zh(i),value:o})}function WEt(o,i){return new ydn({check:"max_length",...zh(i),maximum:o})}function x8e(o,i){return new vdn({check:"min_length",...zh(i),minimum:o})}function jEt(o,i){return new bdn({check:"length_equals",...zh(i),length:o})}function nzt(o,i){return new Sdn({check:"string_format",format:"regex",...zh(i),pattern:o})}function rzt(o){return new xdn({check:"string_format",format:"lowercase",...zh(o)})}function izt(o){return new Edn({check:"string_format",format:"uppercase",...zh(o)})}function szt(o,i){return new Tdn({check:"string_format",format:"includes",...zh(i),includes:o})}function ozt(o,i){return new Cdn({check:"string_format",format:"starts_with",...zh(i),prefix:o})}function azt(o,i){return new Adn({check:"string_format",format:"ends_with",...zh(i),suffix:o})}function RPe(o){return new wdn({check:"overwrite",tx:o})}function lzt(o){return RPe(i=>i.normalize(o))}function czt(){return RPe(o=>o.trim())}function uzt(){return RPe(o=>o.toLowerCase())}function dzt(){return RPe(o=>o.toUpperCase())}function upn(o,i,a){return new o({type:"array",element:i,...zh(a)})}function dpn(o,i,a){let f=zh(a);return f.abort??(f.abort=!0),new o({type:"custom",check:"custom",fn:i,...f})}function fpn(o,i,a){return new o({type:"custom",check:"custom",fn:i,...zh(a)})}var Wet={};XC(Wet,{ZodISODate:()=>_pn,ZodISODateTime:()=>ppn,ZodISODuration:()=>hpn,ZodISOTime:()=>mpn,date:()=>pzt,datetime:()=>fzt,duration:()=>mzt,time:()=>_zt});var ppn=tc("ZodISODateTime",(o,i)=>{Xdn.init(o,i),bI.init(o,i)});function fzt(o){return epn(ppn,o)}var _pn=tc("ZodISODate",(o,i)=>{Qdn.init(o,i),bI.init(o,i)});function pzt(o){return tpn(_pn,o)}var mpn=tc("ZodISOTime",(o,i)=>{Ydn.init(o,i),bI.init(o,i)});function _zt(o){return npn(mpn,o)}var hpn=tc("ZodISODuration",(o,i)=>{Zdn.init(o,i),bI.init(o,i)});function mzt(o){return rpn(hpn,o)}var gpn=(o,i)=>{NEt.init(o,i),o.name="ZodError",Object.defineProperties(o,{format:{value:a=>Lun(o,a)},flatten:{value:a=>Mun(o,a)},addIssue:{value:a=>o.issues.push(a)},addIssues:{value:a=>o.issues.push(...a)},isEmpty:{get(){return o.issues.length===0}}})},Vrr=tc("ZodError",gpn),jet=tc("ZodError",gpn,{Parent:Error});var ypn=Oun(jet),vpn=Fun(jet),bpn=Vjt(jet),Spn=Hjt(jet);var Jk=tc("ZodType",(o,i)=>(Jw.init(o,i),o.def=i,Object.defineProperty(o,"_def",{value:i}),o.check=(...a)=>o.clone({...i,checks:[...i.checks??[],...a.map(f=>typeof f=="function"?{_zod:{check:f,def:{check:"custom"},onattach:[]}}:f)]}),o.clone=(a,f)=>Kse(o,a,f),o.brand=()=>o,o.register=((a,f)=>(a.add(o,f),o)),o.parse=(a,f)=>ypn(o,a,f,{callee:o.parse}),o.safeParse=(a,f)=>bpn(o,a,f),o.parseAsync=async(a,f)=>vpn(o,a,f,{callee:o.parseAsync}),o.safeParseAsync=async(a,f)=>Spn(o,a,f),o.spa=o.safeParseAsync,o.refine=(a,f)=>o.check(V6n(a,f)),o.superRefine=a=>o.check(H6n(a)),o.overwrite=a=>o.check(RPe(a)),o.optional=()=>xI(o),o.nullable=()=>Tpn(o),o.nullish=()=>xI(Tpn(o)),o.nonoptional=a=>F6n(o,a),o.array=()=>e1(o),o.or=a=>lP([o,a]),o.and=a=>GEt(o,a),o.transform=a=>gzt(o,Ipn(a)),o.default=a=>M6n(o,a),o.prefault=a=>O6n(o,a),o.catch=a=>W6n(o,a),o.pipe=a=>gzt(o,a),o.readonly=()=>G6n(o),o.describe=a=>{let f=o.clone();return Let.add(f,{description:a}),f},Object.defineProperty(o,"description",{get(){return Let.get(o)?.description},configurable:!0}),o.meta=(...a)=>{if(a.length===0)return Let.get(o);let f=o.clone();return Let.add(f,a[0]),f},o.isOptional=()=>o.safeParse(void 0).success,o.isNullable=()=>o.safeParse(null).success,o)),Cpn=tc("_ZodString",(o,i)=>{LEt.init(o,i),Jk.init(o,i);let a=o._zod.bag;o.format=a.format??null,o.minLength=a.minimum??null,o.maxLength=a.maximum??null,o.regex=(...f)=>o.check(nzt(...f)),o.includes=(...f)=>o.check(szt(...f)),o.startsWith=(...f)=>o.check(ozt(...f)),o.endsWith=(...f)=>o.check(azt(...f)),o.min=(...f)=>o.check(x8e(...f)),o.max=(...f)=>o.check(WEt(...f)),o.length=(...f)=>o.check(jEt(...f)),o.nonempty=(...f)=>o.check(x8e(1,...f)),o.lowercase=f=>o.check(rzt(f)),o.uppercase=f=>o.check(izt(f)),o.trim=()=>o.check(czt()),o.normalize=(...f)=>o.check(lzt(...f)),o.toLowerCase=()=>o.check(uzt()),o.toUpperCase=()=>o.check(dzt())}),n6n=tc("ZodString",(o,i)=>{LEt.init(o,i),Cpn.init(o,i),o.email=a=>o.check(Rfn(r6n,a)),o.url=a=>o.check(Bfn(i6n,a)),o.jwt=a=>o.check(Zfn(v6n,a)),o.emoji=a=>o.check(Wfn(s6n,a)),o.guid=a=>o.check(tzt(xpn,a)),o.uuid=a=>o.check(Mfn(zEt,a)),o.uuidv4=a=>o.check(Lfn(zEt,a)),o.uuidv6=a=>o.check(Ofn(zEt,a)),o.uuidv7=a=>o.check(Ffn(zEt,a)),o.nanoid=a=>o.check(jfn(o6n,a)),o.guid=a=>o.check(tzt(xpn,a)),o.cuid=a=>o.check(zfn(a6n,a)),o.cuid2=a=>o.check(Gfn(l6n,a)),o.ulid=a=>o.check(Ufn(c6n,a)),o.base64=a=>o.check(Xfn(h6n,a)),o.base64url=a=>o.check(Qfn(g6n,a)),o.xid=a=>o.check(Vfn(u6n,a)),o.ksuid=a=>o.check(Hfn(d6n,a)),o.ipv4=a=>o.check(Jfn(f6n,a)),o.ipv6=a=>o.check($fn(p6n,a)),o.cidrv4=a=>o.check(Kfn(_6n,a)),o.cidrv6=a=>o.check(qfn(m6n,a)),o.e164=a=>o.check(Yfn(y6n,a)),o.datetime=a=>o.check(fzt(a)),o.date=a=>o.check(pzt(a)),o.time=a=>o.check(_zt(a)),o.duration=a=>o.check(mzt(a))});function Ll(o){return Nfn(n6n,o)}var bI=tc("ZodStringFormat",(o,i)=>{aP.init(o,i),Cpn.init(o,i)}),r6n=tc("ZodEmail",(o,i)=>{zdn.init(o,i),bI.init(o,i)});var xpn=tc("ZodGUID",(o,i)=>{Wdn.init(o,i),bI.init(o,i)});var zEt=tc("ZodUUID",(o,i)=>{jdn.init(o,i),bI.init(o,i)});var i6n=tc("ZodURL",(o,i)=>{Gdn.init(o,i),bI.init(o,i)});var s6n=tc("ZodEmoji",(o,i)=>{Udn.init(o,i),bI.init(o,i)});var o6n=tc("ZodNanoID",(o,i)=>{Vdn.init(o,i),bI.init(o,i)});var a6n=tc("ZodCUID",(o,i)=>{Hdn.init(o,i),bI.init(o,i)});var l6n=tc("ZodCUID2",(o,i)=>{Jdn.init(o,i),bI.init(o,i)});var c6n=tc("ZodULID",(o,i)=>{$dn.init(o,i),bI.init(o,i)});var u6n=tc("ZodXID",(o,i)=>{Kdn.init(o,i),bI.init(o,i)});var d6n=tc("ZodKSUID",(o,i)=>{qdn.init(o,i),bI.init(o,i)});var f6n=tc("ZodIPv4",(o,i)=>{efn.init(o,i),bI.init(o,i)});var p6n=tc("ZodIPv6",(o,i)=>{tfn.init(o,i),bI.init(o,i)});var _6n=tc("ZodCIDRv4",(o,i)=>{nfn.init(o,i),bI.init(o,i)});var m6n=tc("ZodCIDRv6",(o,i)=>{rfn.init(o,i),bI.init(o,i)});var h6n=tc("ZodBase64",(o,i)=>{sfn.init(o,i),bI.init(o,i)});var g6n=tc("ZodBase64URL",(o,i)=>{ofn.init(o,i),bI.init(o,i)});var y6n=tc("ZodE164",(o,i)=>{afn.init(o,i),bI.init(o,i)});var v6n=tc("ZodJWT",(o,i)=>{lfn.init(o,i),bI.init(o,i)});var Apn=tc("ZodNumber",(o,i)=>{Yjt.init(o,i),Jk.init(o,i),o.gt=(f,g)=>o.check(FEt(f,g)),o.gte=(f,g)=>o.check(Fet(f,g)),o.min=(f,g)=>o.check(Fet(f,g)),o.lt=(f,g)=>o.check(OEt(f,g)),o.lte=(f,g)=>o.check(Oet(f,g)),o.max=(f,g)=>o.check(Oet(f,g)),o.int=f=>o.check(Epn(f)),o.safe=f=>o.check(Epn(f)),o.positive=f=>o.check(FEt(0,f)),o.nonnegative=f=>o.check(Fet(0,f)),o.negative=f=>o.check(OEt(0,f)),o.nonpositive=f=>o.check(Oet(0,f)),o.multipleOf=(f,g)=>o.check(BEt(f,g)),o.step=(f,g)=>o.check(BEt(f,g)),o.finite=()=>o;let a=o._zod.bag;o.minValue=Math.max(a.minimum??Number.NEGATIVE_INFINITY,a.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,o.maxValue=Math.min(a.maximum??Number.POSITIVE_INFINITY,a.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,o.isInt=(a.format??"").includes("int")||Number.isSafeInteger(a.multipleOf??.5),o.isFinite=!0,o.format=a.format??null});function AT(o){return ipn(Apn,o)}var b6n=tc("ZodNumberFormat",(o,i)=>{cfn.init(o,i),Apn.init(o,i)});function Epn(o){return spn(b6n,o)}var S6n=tc("ZodBoolean",(o,i)=>{ufn.init(o,i),Jk.init(o,i)});function V6(o){return opn(S6n,o)}var x6n=tc("ZodNull",(o,i)=>{dfn.init(o,i),Jk.init(o,i)});function wpn(o){return apn(x6n,o)}var E6n=tc("ZodUnknown",(o,i)=>{ffn.init(o,i),Jk.init(o,i)});function SI(){return lpn(E6n)}var T6n=tc("ZodNever",(o,i)=>{pfn.init(o,i),Jk.init(o,i)});function C6n(o){return cpn(T6n,o)}var A6n=tc("ZodArray",(o,i)=>{_fn.init(o,i),Jk.init(o,i),o.element=i.element,o.min=(a,f)=>o.check(x8e(a,f)),o.nonempty=a=>o.check(x8e(1,a)),o.max=(a,f)=>o.check(WEt(a,f)),o.length=(a,f)=>o.check(jEt(a,f)),o.unwrap=()=>o.element});function e1(o,i){return upn(A6n,o,i)}var Dpn=tc("ZodObject",(o,i)=>{mfn.init(o,i),Jk.init(o,i),dE.defineLazy(o,"shape",()=>i.shape),o.keyof=()=>oG(Object.keys(o._zod.def.shape)),o.catchall=a=>o.clone({...o._zod.def,catchall:a}),o.passthrough=()=>o.clone({...o._zod.def,catchall:SI()}),o.loose=()=>o.clone({...o._zod.def,catchall:SI()}),o.strict=()=>o.clone({...o._zod.def,catchall:C6n()}),o.strip=()=>o.clone({...o._zod.def,catchall:void 0}),o.extend=a=>dE.extend(o,a),o.merge=a=>dE.merge(o,a),o.pick=a=>dE.pick(o,a),o.omit=a=>dE.omit(o,a),o.partial=(...a)=>dE.partial(kpn,o,a[0]),o.required=(...a)=>dE.required(Npn,o,a[0])});function zp(o,i){let a={type:"object",get shape(){return dE.assignProp(this,"shape",{...o}),this.shape},...dE.normalizeParams(i)};return new Dpn(a)}function i9(o,i){return new Dpn({type:"object",get shape(){return dE.assignProp(this,"shape",{...o}),this.shape},catchall:SI(),...dE.normalizeParams(i)})}var Ppn=tc("ZodUnion",(o,i)=>{Zjt.init(o,i),Jk.init(o,i),o.options=i.options});function lP(o,i){return new Ppn({type:"union",options:o,...dE.normalizeParams(i)})}var w6n=tc("ZodDiscriminatedUnion",(o,i)=>{Ppn.init(o,i),hfn.init(o,i)});function yzt(o,i,a){return new w6n({type:"union",options:i,discriminator:o,...dE.normalizeParams(a)})}var D6n=tc("ZodIntersection",(o,i)=>{gfn.init(o,i),Jk.init(o,i)});function GEt(o,i){return new D6n({type:"intersection",left:o,right:i})}var P6n=tc("ZodRecord",(o,i)=>{yfn.init(o,i),Jk.init(o,i),o.keyType=i.keyType,o.valueType=i.valueType});function $w(o,i,a){return new P6n({type:"record",keyType:o,valueType:i,...dE.normalizeParams(a)})}var hzt=tc("ZodEnum",(o,i)=>{vfn.init(o,i),Jk.init(o,i),o.enum=i.entries,o.options=Object.values(i.entries);let a=new Set(Object.keys(i.entries));o.extract=(f,g)=>{let x={};for(let w of f)if(a.has(w))x[w]=i.entries[w];else throw new Error(`Key ${w} not found in enum`);return new hzt({...i,checks:[],...dE.normalizeParams(g),entries:x})},o.exclude=(f,g)=>{let x={...i.entries};for(let w of f)if(a.has(w))delete x[w];else throw new Error(`Key ${w} not found in enum`);return new hzt({...i,checks:[],...dE.normalizeParams(g),entries:x})}});function oG(o,i){let a=Array.isArray(o)?Object.fromEntries(o.map(f=>[f,f])):o;return new hzt({type:"enum",entries:a,...dE.normalizeParams(i)})}var I6n=tc("ZodLiteral",(o,i)=>{bfn.init(o,i),Jk.init(o,i),o.values=new Set(i.values),Object.defineProperty(o,"value",{get(){if(i.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return i.values[0]}})});function Am(o,i){return new I6n({type:"literal",values:Array.isArray(o)?o:[o],...dE.normalizeParams(i)})}var k6n=tc("ZodTransform",(o,i)=>{Sfn.init(o,i),Jk.init(o,i),o._zod.parse=(a,f)=>{a.addIssue=x=>{if(typeof x=="string")a.issues.push(dE.issue(x,a.value,i));else{let w=x;w.fatal&&(w.continue=!1),w.code??(w.code="custom"),w.input??(w.input=a.value),w.inst??(w.inst=o),w.continue??(w.continue=!0),a.issues.push(dE.issue(w))}};let g=i.transform(a.value,a);return g instanceof Promise?g.then(x=>(a.value=x,a)):(a.value=g,a)}});function Ipn(o){return new k6n({type:"transform",transform:o})}var kpn=tc("ZodOptional",(o,i)=>{xfn.init(o,i),Jk.init(o,i),o.unwrap=()=>o._zod.def.innerType});function xI(o){return new kpn({type:"optional",innerType:o})}var N6n=tc("ZodNullable",(o,i)=>{Efn.init(o,i),Jk.init(o,i),o.unwrap=()=>o._zod.def.innerType});function Tpn(o){return new N6n({type:"nullable",innerType:o})}var R6n=tc("ZodDefault",(o,i)=>{Tfn.init(o,i),Jk.init(o,i),o.unwrap=()=>o._zod.def.innerType,o.removeDefault=o.unwrap});function M6n(o,i){return new R6n({type:"default",innerType:o,get defaultValue(){return typeof i=="function"?i():i}})}var L6n=tc("ZodPrefault",(o,i)=>{Cfn.init(o,i),Jk.init(o,i),o.unwrap=()=>o._zod.def.innerType});function O6n(o,i){return new L6n({type:"prefault",innerType:o,get defaultValue(){return typeof i=="function"?i():i}})}var Npn=tc("ZodNonOptional",(o,i)=>{Afn.init(o,i),Jk.init(o,i),o.unwrap=()=>o._zod.def.innerType});function F6n(o,i){return new Npn({type:"nonoptional",innerType:o,...dE.normalizeParams(i)})}var B6n=tc("ZodCatch",(o,i)=>{wfn.init(o,i),Jk.init(o,i),o.unwrap=()=>o._zod.def.innerType,o.removeCatch=o.unwrap});function W6n(o,i){return new B6n({type:"catch",innerType:o,catchValue:typeof i=="function"?i:()=>i})}var j6n=tc("ZodPipe",(o,i)=>{Dfn.init(o,i),Jk.init(o,i),o.in=i.in,o.out=i.out});function gzt(o,i){return new j6n({type:"pipe",in:o,out:i})}var z6n=tc("ZodReadonly",(o,i)=>{Pfn.init(o,i),Jk.init(o,i)});function G6n(o){return new z6n({type:"readonly",innerType:o})}var Rpn=tc("ZodCustom",(o,i)=>{Ifn.init(o,i),Jk.init(o,i)});function U6n(o){let i=new b5({check:"custom"});return i._zod.check=o,i}function Mpn(o,i){return dpn(Rpn,o??(()=>!0),i)}function V6n(o,i={}){return fpn(Rpn,o,i)}function H6n(o){let i=U6n(a=>(a.addIssue=f=>{if(typeof f=="string")a.issues.push(dE.issue(f,a.value,i._zod.def));else{let g=f;g.fatal&&(g.continue=!1),g.code??(g.code="custom"),g.input??(g.input=a.value),g.inst??(g.inst=i),g.continue??(g.continue=!i._zod.def.abort),a.issues.push(dE.issue(g))}},o(a.value,a)));return i}function vzt(o,i){return gzt(Ipn(o),i)}Bq(kfn());var Lpn="io.modelcontextprotocol/related-task",VEt="2.0",oF=Mpn(o=>o!==null&&(typeof o=="object"||typeof o=="function")),Opn=lP([Ll(),AT().int()]),Fpn=Ll(),Fir=i9({ttl:AT().optional(),pollInterval:AT().optional()}),J6n=zp({ttl:AT().optional()}),$6n=zp({taskId:Ll()}),bzt=i9({progressToken:Opn.optional(),[Lpn]:$6n.optional()}),KH=zp({_meta:bzt.optional()}),HEt=KH.extend({task:J6n.optional()});var n8=zp({method:Ll(),params:KH.loose().optional()}),Wq=zp({_meta:bzt.optional()}),jq=zp({method:Ll(),params:Wq.loose().optional()}),r8=i9({_meta:bzt.optional()}),JEt=lP([Ll(),AT().int()]),K6n=zp({jsonrpc:Am(VEt),id:JEt,...n8.shape}).strict();var q6n=zp({jsonrpc:Am(VEt),...jq.shape}).strict();var Bpn=zp({jsonrpc:Am(VEt),id:JEt,result:r8}).strict();var zet;(function(o){o[o.ConnectionClosed=-32e3]="ConnectionClosed",o[o.RequestTimeout=-32001]="RequestTimeout",o[o.ParseError=-32700]="ParseError",o[o.InvalidRequest=-32600]="InvalidRequest",o[o.MethodNotFound=-32601]="MethodNotFound",o[o.InvalidParams=-32602]="InvalidParams",o[o.InternalError=-32603]="InternalError",o[o.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(zet||(zet={}));var Wpn=zp({jsonrpc:Am(VEt),id:JEt.optional(),error:zp({code:AT().int(),message:Ll(),data:SI().optional()})}).strict();var Bir=lP([K6n,q6n,Bpn,Wpn]),Wir=lP([Bpn,Wpn]),Szt=r8.strict(),X6n=Wq.extend({requestId:JEt.optional(),reason:Ll().optional()}),xzt=jq.extend({method:Am("notifications/cancelled"),params:X6n}),Q6n=zp({src:Ll(),mimeType:Ll().optional(),sizes:e1(Ll()).optional(),theme:oG(["light","dark"]).optional()}),Get=zp({icons:e1(Q6n).optional()}),E8e=zp({name:Ll(),title:Ll().optional()}),jpn=E8e.extend({...E8e.shape,...Get.shape,version:Ll(),websiteUrl:Ll().optional(),description:Ll().optional()}),Y6n=GEt(zp({applyDefaults:V6().optional()}),$w(Ll(),SI())),Z6n=vzt(o=>o&&typeof o=="object"&&!Array.isArray(o)&&Object.keys(o).length===0?{form:{}}:o,GEt(zp({form:Y6n.optional(),url:oF.optional()}),$w(Ll(),SI()).optional())),e4n=i9({list:oF.optional(),cancel:oF.optional(),requests:i9({sampling:i9({createMessage:oF.optional()}).optional(),elicitation:i9({create:oF.optional()}).optional()}).optional()}),t4n=i9({list:oF.optional(),cancel:oF.optional(),requests:i9({tools:i9({call:oF.optional()}).optional()}).optional()}),n4n=zp({experimental:$w(Ll(),oF).optional(),sampling:zp({context:oF.optional(),tools:oF.optional()}).optional(),elicitation:Z6n.optional(),roots:zp({listChanged:V6().optional()}).optional(),tasks:e4n.optional(),extensions:$w(Ll(),oF).optional()}),r4n=KH.extend({protocolVersion:Ll(),capabilities:n4n,clientInfo:jpn}),zpn=n8.extend({method:Am("initialize"),params:r4n});var i4n=zp({experimental:$w(Ll(),oF).optional(),logging:oF.optional(),completions:oF.optional(),prompts:zp({listChanged:V6().optional()}).optional(),resources:zp({subscribe:V6().optional(),listChanged:V6().optional()}).optional(),tools:zp({listChanged:V6().optional()}).optional(),tasks:t4n.optional(),extensions:$w(Ll(),oF).optional()}),s4n=r8.extend({protocolVersion:Ll(),capabilities:i4n,serverInfo:jpn,instructions:Ll().optional()}),Gpn=jq.extend({method:Am("notifications/initialized"),params:Wq.optional()});var Ezt=n8.extend({method:Am("ping"),params:KH.optional()}),o4n=zp({progress:AT(),total:xI(AT()),message:xI(Ll())}),a4n=zp({...Wq.shape,...o4n.shape,progressToken:Opn}),Tzt=jq.extend({method:Am("notifications/progress"),params:a4n}),l4n=KH.extend({cursor:Fpn.optional()}),Uet=n8.extend({params:l4n.optional()}),Vet=r8.extend({nextCursor:Fpn.optional()}),c4n=oG(["working","input_required","completed","failed","cancelled"]),Het=zp({taskId:Ll(),status:c4n,ttl:lP([AT(),wpn()]),createdAt:Ll(),lastUpdatedAt:Ll(),pollInterval:xI(AT()),statusMessage:xI(Ll())}),$Et=r8.extend({task:Het}),u4n=Wq.merge(Het),Czt=jq.extend({method:Am("notifications/tasks/status"),params:u4n}),Azt=n8.extend({method:Am("tasks/get"),params:KH.extend({taskId:Ll()})}),wzt=r8.merge(Het),Dzt=n8.extend({method:Am("tasks/result"),params:KH.extend({taskId:Ll()})}),jir=r8.loose(),Pzt=Uet.extend({method:Am("tasks/list")}),Izt=Vet.extend({tasks:e1(Het)}),kzt=n8.extend({method:Am("tasks/cancel"),params:KH.extend({taskId:Ll()})}),d4n=r8.merge(Het),Upn=zp({uri:Ll(),mimeType:xI(Ll()),_meta:$w(Ll(),SI()).optional()}),Vpn=Upn.extend({text:Ll()}),Nzt=Ll().refine(o=>{try{return atob(o),!0}catch{return!1}},{message:"Invalid Base64 string"}),Hpn=Upn.extend({blob:Nzt}),Jet=oG(["user","assistant"]),T8e=zp({audience:e1(Jet).optional(),priority:AT().min(0).max(1).optional(),lastModified:Wet.datetime({offset:!0}).optional()}),Jpn=zp({...E8e.shape,...Get.shape,uri:Ll(),description:xI(Ll()),mimeType:xI(Ll()),size:xI(AT()),annotations:T8e.optional(),_meta:xI(i9({}))}),f4n=zp({...E8e.shape,...Get.shape,uriTemplate:Ll(),description:xI(Ll()),mimeType:xI(Ll()),annotations:T8e.optional(),_meta:xI(i9({}))}),$pn=Uet.extend({method:Am("resources/list")}),p4n=Vet.extend({resources:e1(Jpn)}),Kpn=Uet.extend({method:Am("resources/templates/list")}),_4n=Vet.extend({resourceTemplates:e1(f4n)}),Rzt=KH.extend({uri:Ll()}),m4n=Rzt,qpn=n8.extend({method:Am("resources/read"),params:m4n}),h4n=r8.extend({contents:e1(lP([Vpn,Hpn]))}),g4n=jq.extend({method:Am("notifications/resources/list_changed"),params:Wq.optional()}),y4n=Rzt,v4n=n8.extend({method:Am("resources/subscribe"),params:y4n}),b4n=Rzt,S4n=n8.extend({method:Am("resources/unsubscribe"),params:b4n}),x4n=Wq.extend({uri:Ll()}),E4n=jq.extend({method:Am("notifications/resources/updated"),params:x4n}),T4n=zp({name:Ll(),description:xI(Ll()),required:xI(V6())}),C4n=zp({...E8e.shape,...Get.shape,description:xI(Ll()),arguments:xI(e1(T4n)),_meta:xI(i9({}))}),Mzt=Uet.extend({method:Am("prompts/list")}),A4n=Vet.extend({prompts:e1(C4n)}),w4n=KH.extend({name:Ll(),arguments:$w(Ll(),Ll()).optional()}),Lzt=n8.extend({method:Am("prompts/get"),params:w4n}),Ozt=zp({type:Am("text"),text:Ll(),annotations:T8e.optional(),_meta:$w(Ll(),SI()).optional()}),Fzt=zp({type:Am("image"),data:Nzt,mimeType:Ll(),annotations:T8e.optional(),_meta:$w(Ll(),SI()).optional()}),Bzt=zp({type:Am("audio"),data:Nzt,mimeType:Ll(),annotations:T8e.optional(),_meta:$w(Ll(),SI()).optional()}),D4n=zp({type:Am("tool_use"),name:Ll(),id:Ll(),input:$w(Ll(),SI()),_meta:$w(Ll(),SI()).optional()}),P4n=zp({type:Am("resource"),resource:lP([Vpn,Hpn]),annotations:T8e.optional(),_meta:$w(Ll(),SI()).optional()}),I4n=Jpn.extend({type:Am("resource_link")}),Wzt=lP([Ozt,Fzt,Bzt,I4n,P4n]),k4n=zp({role:Jet,content:Wzt}),N4n=r8.extend({description:Ll().optional(),messages:e1(k4n)}),R4n=jq.extend({method:Am("notifications/prompts/list_changed"),params:Wq.optional()}),M4n=zp({title:Ll().optional(),readOnlyHint:V6().optional(),destructiveHint:V6().optional(),idempotentHint:V6().optional(),openWorldHint:V6().optional()}),L4n=zp({taskSupport:oG(["required","optional","forbidden"]).optional()}),Xpn=zp({...E8e.shape,...Get.shape,description:Ll().optional(),inputSchema:zp({type:Am("object"),properties:$w(Ll(),oF).optional(),required:e1(Ll()).optional()}).catchall(SI()),outputSchema:zp({type:Am("object"),properties:$w(Ll(),oF).optional(),required:e1(Ll()).optional()}).catchall(SI()).optional(),annotations:M4n.optional(),execution:L4n.optional(),_meta:$w(Ll(),SI()).optional()}),jzt=Uet.extend({method:Am("tools/list")}),O4n=Vet.extend({tools:e1(Xpn)}),zzt=r8.extend({content:e1(Wzt).default([]),structuredContent:$w(Ll(),SI()).optional(),isError:V6().optional()}),zir=zzt.or(r8.extend({toolResult:SI()})),F4n=HEt.extend({name:Ll(),arguments:$w(Ll(),SI()).optional()}),KEt=n8.extend({method:Am("tools/call"),params:F4n}),B4n=jq.extend({method:Am("notifications/tools/list_changed"),params:Wq.optional()}),Gir=zp({autoRefresh:V6().default(!0),debounceMs:AT().int().nonnegative().default(300)}),Gzt=oG(["debug","info","notice","warning","error","critical","alert","emergency"]),W4n=KH.extend({level:Gzt}),Qpn=n8.extend({method:Am("logging/setLevel"),params:W4n}),j4n=Wq.extend({level:Gzt,logger:Ll().optional(),data:SI()}),z4n=jq.extend({method:Am("notifications/message"),params:j4n}),G4n=zp({name:Ll().optional()}),U4n=zp({hints:e1(G4n).optional(),costPriority:AT().min(0).max(1).optional(),speedPriority:AT().min(0).max(1).optional(),intelligencePriority:AT().min(0).max(1).optional()}),V4n=zp({mode:oG(["auto","required","none"]).optional()}),H4n=zp({type:Am("tool_result"),toolUseId:Ll().describe("The unique identifier for the corresponding tool call."),content:e1(Wzt).default([]),structuredContent:zp({}).loose().optional(),isError:V6().optional(),_meta:$w(Ll(),SI()).optional()}),J4n=yzt("type",[Ozt,Fzt,Bzt]),UEt=yzt("type",[Ozt,Fzt,Bzt,D4n,H4n]),$4n=zp({role:Jet,content:lP([UEt,e1(UEt)]),_meta:$w(Ll(),SI()).optional()}),K4n=HEt.extend({messages:e1($4n),modelPreferences:U4n.optional(),systemPrompt:Ll().optional(),includeContext:oG(["none","thisServer","allServers"]).optional(),temperature:AT().optional(),maxTokens:AT().int(),stopSequences:e1(Ll()).optional(),metadata:oF.optional(),tools:e1(Xpn).optional(),toolChoice:V4n.optional()}),q4n=n8.extend({method:Am("sampling/createMessage"),params:K4n}),Uzt=r8.extend({model:Ll(),stopReason:xI(oG(["endTurn","stopSequence","maxTokens"]).or(Ll())),role:Jet,content:J4n}),Ypn=r8.extend({model:Ll(),stopReason:xI(oG(["endTurn","stopSequence","maxTokens","toolUse"]).or(Ll())),role:Jet,content:lP([UEt,e1(UEt)])}),X4n=zp({type:Am("boolean"),title:Ll().optional(),description:Ll().optional(),default:V6().optional()}),Q4n=zp({type:Am("string"),title:Ll().optional(),description:Ll().optional(),minLength:AT().optional(),maxLength:AT().optional(),format:oG(["email","uri","date","date-time"]).optional(),default:Ll().optional()}),Y4n=zp({type:oG(["number","integer"]),title:Ll().optional(),description:Ll().optional(),minimum:AT().optional(),maximum:AT().optional(),default:AT().optional()}),Z4n=zp({type:Am("string"),title:Ll().optional(),description:Ll().optional(),enum:e1(Ll()),default:Ll().optional()}),e3n=zp({type:Am("string"),title:Ll().optional(),description:Ll().optional(),oneOf:e1(zp({const:Ll(),title:Ll()})),default:Ll().optional()}),t3n=zp({type:Am("string"),title:Ll().optional(),description:Ll().optional(),enum:e1(Ll()),enumNames:e1(Ll()).optional(),default:Ll().optional()}),n3n=lP([Z4n,e3n]),r3n=zp({type:Am("array"),title:Ll().optional(),description:Ll().optional(),minItems:AT().optional(),maxItems:AT().optional(),items:zp({type:Am("string"),enum:e1(Ll())}),default:e1(Ll()).optional()}),i3n=zp({type:Am("array"),title:Ll().optional(),description:Ll().optional(),minItems:AT().optional(),maxItems:AT().optional(),items:zp({anyOf:e1(zp({const:Ll(),title:Ll()}))}),default:e1(Ll()).optional()}),s3n=lP([r3n,i3n]),o3n=lP([t3n,n3n,s3n]),a3n=lP([o3n,X4n,Q4n,Y4n]),l3n=HEt.extend({mode:Am("form").optional(),message:Ll(),requestedSchema:zp({type:Am("object"),properties:$w(Ll(),a3n),required:e1(Ll()).optional()})}),c3n=HEt.extend({mode:Am("url"),message:Ll(),elicitationId:Ll(),url:Ll().url()}),u3n=lP([l3n,c3n]),d3n=n8.extend({method:Am("elicitation/create"),params:u3n}),f3n=Wq.extend({elicitationId:Ll()}),p3n=jq.extend({method:Am("notifications/elicitation/complete"),params:f3n}),Vzt=r8.extend({action:oG(["accept","decline","cancel"]),content:vzt(o=>o===null?void 0:o,$w(Ll(),lP([Ll(),AT(),V6(),e1(Ll())])).optional())}),_3n=zp({type:Am("ref/resource"),uri:Ll()});var m3n=zp({type:Am("ref/prompt"),name:Ll()}),h3n=KH.extend({ref:lP([m3n,_3n]),argument:zp({name:Ll(),value:Ll()}),context:zp({arguments:$w(Ll(),Ll()).optional()}).optional()}),Zpn=n8.extend({method:Am("completion/complete"),params:h3n});var g3n=r8.extend({completion:i9({values:e1(Ll()).max(100),total:xI(AT().int()),hasMore:xI(V6())})}),y3n=zp({uri:Ll().startsWith("file://"),name:Ll().optional(),_meta:$w(Ll(),SI()).optional()}),v3n=n8.extend({method:Am("roots/list"),params:KH.optional()}),e_n=r8.extend({roots:e1(y3n)}),b3n=jq.extend({method:Am("notifications/roots/list_changed"),params:Wq.optional()}),Uir=lP([Ezt,zpn,Zpn,Qpn,Lzt,Mzt,$pn,Kpn,qpn,v4n,S4n,KEt,jzt,Azt,Dzt,Pzt,kzt]),Vir=lP([xzt,Tzt,Gpn,b3n,Czt]),Hir=lP([Szt,Uzt,Ypn,Vzt,e_n,wzt,Izt,$Et]),Jir=lP([Ezt,q4n,d3n,v3n,Azt,Dzt,Pzt,kzt]),$ir=lP([xzt,Tzt,z4n,E4n,g4n,B4n,R4n,Czt,p3n]),Kir=lP([Szt,s4n,g3n,N4n,A4n,p4n,_4n,h4n,zzt,O4n,wzt,Izt,$Et]);var wsr=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var I9n=Aa(Khn(),1);var qhn;(function(o){o.Completable="McpCompletable"})(qhn||(qhn={}));wet();B1();var idr=['Commands: "pando, history" -> list-snapshots; "pando, undo" -> restore-snapshot using the latest undo snapshotId, or list-snapshots first; "go back to #N" -> restore-snapshot to history row N; "pando diff N" -> diff-snapshots for row N. Never guess ids.',"","pand\u014D checkpoints the workspace after every edit it makes, and a restore is","itself a checkpointed edit \u2014 so any change is reversible. In the default",'digest output each modifying tool result ends with an "\u21A9 undo" line carrying',"the exact snapshotId to roll back to; the raw ids are also in","snapshotBefore/snapshotAfter (and in list-snapshots' parents).","","list-snapshots groups consecutive edits into numbered TURNS (newest = 1) \u2014 one","row per thing the user asked for. The verbatim id printed under each row is","that turn's checkpoint (its state after the turn finished).","","Treat these user phrases as direct commands that map to the restore-snapshot","tool. You are the only process that may restore \u2014 the user cannot \u2014 so act on","them yourself rather than explaining how:",'- "pando, history" / "show my checkpoints" / "what can I undo?" \u2192 call'," list-snapshots and show the rendered ledger; do NOT restore anything yet.",'- "go back to #3" / "the 3rd one" / "restore #3" \u2192 restore-snapshot to the id'," printed under row 3 of the list-snapshots ledger you most recently rendered."," If no ledger is in context, call list-snapshots first, then use that row's"," id. Resolving a shown position to its printed id is reading, not guessing.",'- "pando, undo" / "undo that" / "revert the last edit" \u2192 restore-snapshot to',` the most recent edit's prior state: the snapshotId on its "\u21A9 undo" line`," (that op's snapshotBefore). If it is not in context, call list-snapshots and"," restore to the newest turn's prior state \u2014 the undo target the ledger prints"," for the agent (the newest row's first parent).",'- "pando diff 3" / "what changed in #3" \u2192 diff-snapshots with head set to the'," id under row 3 and base set to the id under row 4 (the next-older checkpoint);"," omit base for the oldest row shown.",'- "what will I lose if I go back to #3" / "show the rollback diff for #3" \u2192'," diff-snapshots with head set to the id under row 1 (the newest checkpoint \u2014"," the current state) and base set to the id under row 3. This previews the net",' change a restore to #3 would make, distinct from "pando diff 3" above (which'," shows only what turn #3 itself changed).",'- "pando, restore <id>" / "go back to <id>" \u2192 restore-snapshot snapshotId=<id>,'," using the id verbatim.",'- "save a checkpoint called X" / "checkpoint this as X" / "bookmark this" \u2192 call',' snapshot-worktree with message="X" (a short label of the current state); that'," message becomes the checkpoint's label in list-snapshots. This names a NEW"," checkpoint of the current state \u2014 an existing checkpoint cannot be renamed.","","Restore is always per-snapshot \u2014 one checkpoint is one edit. Never invent or","guess ids; only ever use an id printed in a tool result. The chat is the user's","only window into history: when they want to see or pick a checkpoint, render the","list-snapshots ledger for them \u2014 do not point them at any other tool or window,","since you are the only process that can act on it."].join(`
|
|
33212
|
-
`);wet();B1();xjt();mI();var Xhn=Aa(require("node:os")),FUt=Aa(require("node:path"));var BUt=process.env.PANDO_BASE_URL?.trim()||"https://getpando.ai",Qdr=`${BUt}/api/auth/poll/init`,Ydr=`${BUt}/api/auth/poll/status`,Zdr=`${BUt}/api/auth/cli/exchange`,efr=process.env.SUPABASE_URL?.trim()||"https://ehurtggpaunbndlxuemq.supabase.co",tfr=process.env.SUPABASE_ANON_KEY?.trim()||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImVodXJ0Z2dwYXVuYm5kbHh1ZW1xIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjA3MTI2MzAsImV4cCI6MjA3NjI4ODYzMH0.8heP_ZZ7AxUFi6kLt3JLEuKeSH_azP5MwvKwqVNidPI",Ett="PANDO_AUTH_HOME_OVERRIDE",M9n=FUt.default.join(L9n(),".pando-ai"),nfr=FUt.default.join(M9n,"session.json"),rfr=300*1e3;function L9n(){return process.env[Ett]?.trim()||Xhn.default.homedir()}var Qhn="PANDO_ALLOW_UNSANDBOXED_WORKSPACE",egn="PANDO_BROKERED_AUTH",tgn="PANDO_SECURITY_DATA_ROOT",F9n=["PANDO_MCP_OUTPUT","PANDO_MCP_CLIENT","CODEX_THREAD_ID","CODEX_SANDBOX","CODEX_MANAGED_BY_NPM"];var B9n=["/Users","/private/var/log","/Volumes","/srv"],W9n=[".nvm",".pyenv",".rbenv",".rustup",".cargo",".bun",".deno",".local/share/mise",".asdf",".sdkman",".volta"];function ngn(o){let i=o.env??process.env,a=o.platform??process.platform,f=Yhn(o.projectRoot),g=Yhn(o.runtimeRoot),x=p2.default.realpathSync.native?p2.default.realpathSync.native(o.execPath??process.execPath):p2.default.realpathSync(o.execPath??process.execPath),w=o.argv??process.argv.slice(1),R=o.sandboxStateRoot?$k.default.resolve(o.sandboxStateRoot):f,G=Zhn(R,"home"),H=Zhn(R,"tmp"),Q=$k.default.dirname(x),se=z9n(i,f,G,H,Q),$=i[Ett]||i.PANDO_HOME_OVERRIDE||i.HOME||PTt.default.homedir(),Se=i.PANDO_DATA_DIR||i[tgn]||$k.default.join($,".pando-data"),he=y4e(Se,f);try{p2.default.mkdirSync(he,{recursive:!0})}catch{}let ge=Ttt(o.extraRoots??[]).filter(st=>st!==f);if(a==="darwin"){let st=/^(1|true|yes)$/i.test(se[egn]||""),gt=$k.default.join($,".pando-ai","session.json"),Et=[g,Q,$k.default.dirname(Q),...U9n(g),...W9n.map(Yt=>$k.default.join($,Yt))],Xt=[$k.default.join($,".pando-ai","install_id"),$k.default.join($,".pando-ai","config.json")];return{command:"/usr/bin/sandbox-exec",args:["-p",H9n({readWriteRoots:[f,G,H,he,...ge],readRoots:Et,authReadFiles:[...st?[]:[gt],...Xt]}),x,...w],cwd:f,env:se}}if(a==="linux"){let st=V9n(["/usr/bin/bwrap","/bin/bwrap"]);return st?j9n({bwrap:st,projectRoot:f,extraRoots:ge,runtimeRoot:g,nodeDir:Q,execPath:x,argv:w,env:se,workspaceDataDir:he}):{error:`Pando workspace MCP requires bubblewrap (bwrap) on Linux. Install bwrap or set ${Qhn}=1 for development only.`}}return{error:`Pando workspace MCP sandbox is not supported on ${a}. Set ${Qhn}=1 for development only.`}}function j9n(o){let i=["--die-with-parent","--unshare-all","--proc","/proc","--dev","/dev","--tmpfs","/tmp","--bind",o.projectRoot,o.projectRoot,"--bind",o.workspaceDataDir,o.workspaceDataDir,"--chdir",o.projectRoot,"--setenv","HOME",o.env.HOME||$k.default.join(o.projectRoot,".pando-sandbox","home"),"--setenv","TMPDIR","/tmp","--setenv",Tee,"1","--setenv","PANDO_SANDBOX_ROOT",o.projectRoot];o.env.PANDO_INTERNAL_SERVE&&i.push("--setenv","PANDO_INTERNAL_SERVE",o.env.PANDO_INTERNAL_SERVE);for(let a of Ttt(o.extraRoots??[]))a!==o.projectRoot&&i.push("--bind",a,a);for(let a of Ttt([o.runtimeRoot,o.nodeDir,"/usr","/bin","/lib","/lib64","/etc/ssl","/etc/ca-certificates"]))J9n(o.projectRoot,a)||i.push("--ro-bind",a,a);return i.push("--",o.execPath,...o.argv),{command:o.bwrap,args:i,cwd:o.projectRoot,env:o.env}}function z9n(o,i,a,f,g){let x=o[Ett]||o.PANDO_HOME_OVERRIDE||o.HOME||PTt.default.homedir(),w=o.PANDO_PROCESS_ROLE||"workspace",R=w==="workspace"?"1":o[egn],G={};for(let se of["LANG","LC_ALL","LC_CTYPE","LC_MESSAGES"])o[se]&&(G[se]=o[se]);let H=[g,"/opt/homebrew/bin","/opt/homebrew/sbin","/usr/local/bin","/usr/local/sbin","/usr/bin","/bin","/usr/sbin","/sbin"],Q={...G,HOME:a,PATH:Array.from(new Set(H)).join($k.default.delimiter),TMPDIR:f,TEMP:f,TMP:f,XDG_CACHE_HOME:$k.default.join(a,".cache"),npm_config_cache:$k.default.join(a,".npm"),YARN_CACHE_FOLDER:$k.default.join(a,".yarn-cache"),PNPM_HOME:$k.default.join(a,".pnpm-home"),npm_config_userconfig:$k.default.join(a,".npmrc"),PANDO_PROCESS_ROLE:w,[Tee]:"1",PANDO_SANDBOX_ROOT:i,PANDO_BROKERED_AUTH:R};for(let se of[tgn,"PANDO_DATA_DIR","PANDO_WORKSPACE_CONFIG_DIR","PANDO_REAL_PROJECT_ROOT"])o[se]&&(Q[se]=o[se]);o.PANDO_INTERNAL_SERVE&&(Q.PANDO_INTERNAL_SERVE=o.PANDO_INTERNAL_SERVE);for(let se of F9n)o[se]&&(Q[se]=o[se]);return/^(1|true|yes)$/i.test(R||"")||(Q[Ett]=x),Q}function Yhn(o){let i=$k.default.resolve(o),a=p2.default.realpathSync.native?p2.default.realpathSync.native(i):p2.default.realpathSync(i);if(!p2.default.statSync(a).isDirectory())throw new Error(`Sandbox root must be an existing directory: ${o}`);return a}function G9n(o){try{let i=$k.default.resolve(o);return p2.default.realpathSync.native?p2.default.realpathSync.native(i):p2.default.realpathSync(i)}catch{return null}}function Zhn(o,i){let a=$k.default.join(o,".pando-sandbox",i);return p2.default.mkdirSync(a,{recursive:!0}),a}function U9n(o){let i=[],a=o;for(;;){let f=$k.default.join(a,"node_modules");try{p2.default.statSync(f).isDirectory()&&i.push(f)}catch{}let g=$k.default.dirname(a);if(g===a)break;a=g}return i}function V9n(o){for(let i of o)try{return p2.default.accessSync(i,p2.default.constants.X_OK),i}catch{}return null}function H9n(o){let i=G9n(PTt.default.tmpdir()),a=Ttt([...o.readWriteRoots,...i?[i]:[]]),f=Ttt([...a,...o.readRoots]),g=B9n.map(Q=>`(deny file-read* (subpath ${U8e(Q)}))`).join(`
|
|
33212
|
+
`);wet();B1();xjt();mI();var Xhn=Aa(require("node:os")),FUt=Aa(require("node:path"));var BUt=process.env.PANDO_BASE_URL?.trim()||"https://getpando.ai",Qdr=`${BUt}/api/auth/poll/init`,Ydr=`${BUt}/api/auth/poll/status`,Zdr=`${BUt}/api/auth/cli/exchange`,efr=process.env.SUPABASE_URL?.trim()||"https://ehurtggpaunbndlxuemq.supabase.co",tfr=process.env.SUPABASE_ANON_KEY?.trim()||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImVodXJ0Z2dwYXVuYm5kbHh1ZW1xIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjA3MTI2MzAsImV4cCI6MjA3NjI4ODYzMH0.8heP_ZZ7AxUFi6kLt3JLEuKeSH_azP5MwvKwqVNidPI",Ett="PANDO_AUTH_HOME_OVERRIDE",M9n=FUt.default.join(L9n(),".pando-ai"),nfr=FUt.default.join(M9n,"session.json"),rfr=300*1e3;function L9n(){return process.env[Ett]?.trim()||Xhn.default.homedir()}var Qhn="PANDO_ALLOW_UNSANDBOXED_WORKSPACE",egn="PANDO_BROKERED_AUTH",tgn="PANDO_SECURITY_DATA_ROOT",F9n=["PANDO_MCP_OUTPUT","PANDO_MCP_CLIENT","CODEX_HOME","CODEX_THREAD_ID","CODEX_SANDBOX","CODEX_MANAGED_BY_NPM"];var B9n=["/Users","/private/var/log","/Volumes","/srv"],W9n=[".nvm",".pyenv",".rbenv",".rustup",".cargo",".bun",".deno",".local/share/mise",".asdf",".sdkman",".volta"];function ngn(o){let i=o.env??process.env,a=o.platform??process.platform,f=Yhn(o.projectRoot),g=Yhn(o.runtimeRoot),x=p2.default.realpathSync.native?p2.default.realpathSync.native(o.execPath??process.execPath):p2.default.realpathSync(o.execPath??process.execPath),w=o.argv??process.argv.slice(1),R=o.sandboxStateRoot?$k.default.resolve(o.sandboxStateRoot):f,G=Zhn(R,"home"),H=Zhn(R,"tmp"),Q=$k.default.dirname(x),se=z9n(i,f,G,H,Q),$=i[Ett]||i.PANDO_HOME_OVERRIDE||i.HOME||PTt.default.homedir(),Se=i.PANDO_DATA_DIR||i[tgn]||$k.default.join($,".pando-data"),he=y4e(Se,f);try{p2.default.mkdirSync(he,{recursive:!0})}catch{}let ge=Ttt(o.extraRoots??[]).filter(st=>st!==f);if(a==="darwin"){let st=/^(1|true|yes)$/i.test(se[egn]||""),gt=$k.default.join($,".pando-ai","session.json"),Et=[g,Q,$k.default.dirname(Q),...U9n(g),...W9n.map(Yt=>$k.default.join($,Yt))],Xt=[$k.default.join($,".pando-ai","install_id"),$k.default.join($,".pando-ai","config.json")];return{command:"/usr/bin/sandbox-exec",args:["-p",H9n({readWriteRoots:[f,G,H,he,...ge],readRoots:Et,authReadFiles:[...st?[]:[gt],...Xt]}),x,...w],cwd:f,env:se}}if(a==="linux"){let st=V9n(["/usr/bin/bwrap","/bin/bwrap"]);return st?j9n({bwrap:st,projectRoot:f,extraRoots:ge,runtimeRoot:g,nodeDir:Q,execPath:x,argv:w,env:se,workspaceDataDir:he}):{error:`Pando workspace MCP requires bubblewrap (bwrap) on Linux. Install bwrap or set ${Qhn}=1 for development only.`}}return{error:`Pando workspace MCP sandbox is not supported on ${a}. Set ${Qhn}=1 for development only.`}}function j9n(o){let i=["--die-with-parent","--unshare-all","--proc","/proc","--dev","/dev","--tmpfs","/tmp","--bind",o.projectRoot,o.projectRoot,"--bind",o.workspaceDataDir,o.workspaceDataDir,"--chdir",o.projectRoot,"--setenv","HOME",o.env.HOME||$k.default.join(o.projectRoot,".pando-sandbox","home"),"--setenv","TMPDIR","/tmp","--setenv",Tee,"1","--setenv","PANDO_SANDBOX_ROOT",o.projectRoot];o.env.PANDO_INTERNAL_SERVE&&i.push("--setenv","PANDO_INTERNAL_SERVE",o.env.PANDO_INTERNAL_SERVE);for(let a of Ttt(o.extraRoots??[]))a!==o.projectRoot&&i.push("--bind",a,a);for(let a of Ttt([o.runtimeRoot,o.nodeDir,"/usr","/bin","/lib","/lib64","/etc/ssl","/etc/ca-certificates"]))J9n(o.projectRoot,a)||i.push("--ro-bind",a,a);return i.push("--",o.execPath,...o.argv),{command:o.bwrap,args:i,cwd:o.projectRoot,env:o.env}}function z9n(o,i,a,f,g){let x=o[Ett]||o.PANDO_HOME_OVERRIDE||o.HOME||PTt.default.homedir(),w=o.PANDO_PROCESS_ROLE||"workspace",R=w==="workspace"?"1":o[egn],G={};for(let se of["LANG","LC_ALL","LC_CTYPE","LC_MESSAGES"])o[se]&&(G[se]=o[se]);let H=[g,"/opt/homebrew/bin","/opt/homebrew/sbin","/usr/local/bin","/usr/local/sbin","/usr/bin","/bin","/usr/sbin","/sbin"],Q={...G,HOME:a,PATH:Array.from(new Set(H)).join($k.default.delimiter),TMPDIR:f,TEMP:f,TMP:f,XDG_CACHE_HOME:$k.default.join(a,".cache"),npm_config_cache:$k.default.join(a,".npm"),YARN_CACHE_FOLDER:$k.default.join(a,".yarn-cache"),PNPM_HOME:$k.default.join(a,".pnpm-home"),npm_config_userconfig:$k.default.join(a,".npmrc"),PANDO_PROCESS_ROLE:w,[Tee]:"1",PANDO_SANDBOX_ROOT:i,PANDO_BROKERED_AUTH:R};for(let se of[tgn,"PANDO_DATA_DIR","PANDO_WORKSPACE_CONFIG_DIR","PANDO_REAL_PROJECT_ROOT"])o[se]&&(Q[se]=o[se]);o.PANDO_INTERNAL_SERVE&&(Q.PANDO_INTERNAL_SERVE=o.PANDO_INTERNAL_SERVE);for(let se of F9n)o[se]&&(Q[se]=o[se]);return/^(1|true|yes)$/i.test(R||"")||(Q[Ett]=x),Q}function Yhn(o){let i=$k.default.resolve(o),a=p2.default.realpathSync.native?p2.default.realpathSync.native(i):p2.default.realpathSync(i);if(!p2.default.statSync(a).isDirectory())throw new Error(`Sandbox root must be an existing directory: ${o}`);return a}function G9n(o){try{let i=$k.default.resolve(o);return p2.default.realpathSync.native?p2.default.realpathSync.native(i):p2.default.realpathSync(i)}catch{return null}}function Zhn(o,i){let a=$k.default.join(o,".pando-sandbox",i);return p2.default.mkdirSync(a,{recursive:!0}),a}function U9n(o){let i=[],a=o;for(;;){let f=$k.default.join(a,"node_modules");try{p2.default.statSync(f).isDirectory()&&i.push(f)}catch{}let g=$k.default.dirname(a);if(g===a)break;a=g}return i}function V9n(o){for(let i of o)try{return p2.default.accessSync(i,p2.default.constants.X_OK),i}catch{}return null}function H9n(o){let i=G9n(PTt.default.tmpdir()),a=Ttt([...o.readWriteRoots,...i?[i]:[]]),f=Ttt([...a,...o.readRoots]),g=B9n.map(Q=>`(deny file-read* (subpath ${U8e(Q)}))`).join(`
|
|
33213
33213
|
`),x=f.map(Q=>`(allow file-read* (subpath ${U8e(Q)}))`).join(`
|
|
33214
33214
|
`),w=o.authReadFiles.filter(Q=>p2.default.existsSync(Q)).map(Q=>`(allow file-read* (literal ${U8e(Q)}))`).join(`
|
|
33215
33215
|
`),R=a.map(Q=>`(allow file-write* (subpath ${U8e(Q)}))`).join(`
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|