@mutagent/cli 0.2.329 → 0.2.330

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/README.md CHANGED
@@ -121,6 +121,7 @@ mutagent config list # Every setting
121
121
  mutagent config get endpoint # One setting
122
122
  mutagent config set workspace <name|id> # Same as: mutagent workspaces use
123
123
  mutagent config set org <id|slug> # Confirm the key's organization
124
+ mutagent config server # The API deployment answering: environment, version, commit
124
125
 
125
126
  mutagent usage # Count the workspace's LLM providers and your workspaces
126
127
  ```
@@ -2,7 +2,7 @@
2
2
  var tkt=Object.create;var{getPrototypeOf:rkt,defineProperty:Ube,getOwnPropertyNames:nkt}=Object;var kJe=Object.prototype.hasOwnProperty;function ikt(u){return this[u]}var skt,akt,okt=(u,d,S)=>{var A=u!=null&&typeof u==="object";if(A){var W=d?skt??=new WeakMap:akt??=new WeakMap,ae=W.get(u);if(ae)return ae}S=u!=null?tkt(rkt(u)):{};let we=d||!u||!u.__esModule||!kJe.call(u,"default")?Ube(S,"default",{value:u,enumerable:!0}):S;if(u&&typeof u==="object"||typeof u==="function"){for(let nt of nkt(u))if(!kJe.call(we,nt))Ube(we,nt,{get:ikt.bind(u,nt),enumerable:!0})}if(A)W.set(u,we);return we};var Vs=(u,d)=>()=>(d||u((d={exports:{}}).exports,d),d.exports);var ckt=(u)=>u;function lkt(u,d){this[u]=ckt.bind(null,d)}var ukt=(u,d)=>{for(var S in d)Ube(u,S,{get:d[S],enumerable:!0,configurable:!0,set:lkt.bind(d,S)})};var w0=import.meta.require;var NJe=Vs(function(hkt){var AJe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");hkt.encode=function(u){if(0<=u&&u<AJe.length)return AJe[u];throw TypeError("Must be between 0 and 63: "+u)};hkt.decode=function(u){var d=65,S=90,A=97,W=122,ae=48,we=57,nt=43,Tt=47,Jt=26,Ir=52;if(d<=u&&u<=S)return u-d;if(A<=u&&u<=W)return u-A+Jt;if(ae<=u&&u<=we)return u-ae+Ir;if(u==nt)return 62;if(u==Tt)return 63;return-1}});var Vbe=Vs(function(Tkt){var OJe=NJe(),qbe=5,FJe=1<<qbe,LJe=FJe-1,MJe=FJe;function bkt(u){return u<0?(-u<<1)+1:(u<<1)+0}function Skt(u){var d=(u&1)===1,S=u>>1;return d?-S:S}Tkt.encode=function(d){var S="",A,W=bkt(d);do{if(A=W&LJe,W>>>=qbe,W>0)A|=MJe;S+=OJe.encode(A)}while(W>0);return S};Tkt.decode=function(d,S,A){var W=d.length,ae=0,we=0,nt,Tt;do{if(S>=W)throw Error("Expected more digits in base 64 VLQ value.");if(Tt=OJe.decode(d.charCodeAt(S++)),Tt===-1)throw Error("Invalid base64 digit: "+d.charAt(S-1));nt=!!(Tt&MJe),Tt&=LJe,ae=ae+(Tt<<we),we+=qbe}while(nt);A.value=Skt(ae),A.rest=S}});var g5=Vs(function(zJe){function Ckt(u,d,S){if(d in u)return u[d];else if(arguments.length===3)return S;else throw Error('"'+d+'" is a required argument.')}zJe.getArg=Ckt;var RJe=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Ekt=/^data:.+\,.+$/;function MU(u){var d=u.match(RJe);if(!d)return null;return{scheme:d[1],auth:d[2],host:d[3],port:d[4],path:d[5]}}zJe.urlParse=MU;function d5(u){var d="";if(u.scheme)d+=u.scheme+":";if(d+="//",u.auth)d+=u.auth+"@";if(u.host)d+=u.host;if(u.port)d+=":"+u.port;if(u.path)d+=u.path;return d}zJe.urlGenerate=d5;function Gbe(u){var d=u,S=MU(u);if(S){if(!S.path)return u;d=S.path}var A=zJe.isAbsolute(d),W=d.split(/\/+/);for(var ae,we=0,nt=W.length-1;nt>=0;nt--)if(ae=W[nt],ae===".")W.splice(nt,1);else if(ae==="..")we++;else if(we>0)if(ae==="")W.splice(nt+1,we),we=0;else W.splice(nt,2),we--;if(d=W.join("/"),d==="")d=A?"/":".";if(S)return S.path=d,d5(S);return d}zJe.normalize=Gbe;function jJe(u,d){if(u==="")u=".";if(d==="")d=".";var S=MU(d),A=MU(u);if(A)u=A.path||"/";if(S&&!S.scheme){if(A)S.scheme=A.scheme;return d5(S)}if(S||d.match(Ekt))return d;if(A&&!A.host&&!A.path)return A.host=d,d5(A);var W=d.charAt(0)==="/"?d:Gbe(u.replace(/\/+$/,"")+"/"+d);if(A)return A.path=W,d5(A);return W}zJe.join=jJe;zJe.isAbsolute=function(u){return u.charAt(0)==="/"||RJe.test(u)};function wkt(u,d){if(u==="")u=".";u=u.replace(/\/$/,"");var S=0;while(d.indexOf(u+"/")!==0){var A=u.lastIndexOf("/");if(A<0)return d;if(u=u.slice(0,A),u.match(/^([^\/]+:\/)?\/*$/))return d;++S}return Array(S+1).join("../")+d.substr(u.length+1)}zJe.relative=wkt;var BJe=function(){var u=Object.create(null);return!("__proto__"in u)}();function JJe(u){return u}function Pkt(u){if(UJe(u))return"$"+u;return u}zJe.toSetString=BJe?JJe:Pkt;function Dkt(u){if(UJe(u))return u.slice(1);return u}zJe.fromSetString=BJe?JJe:Dkt;function UJe(u){if(!u)return!1;var d=u.length;if(d<9)return!1;if(u.charCodeAt(d-1)!==95||u.charCodeAt(d-2)!==95||u.charCodeAt(d-3)!==111||u.charCodeAt(d-4)!==116||u.charCodeAt(d-5)!==111||u.charCodeAt(d-6)!==114||u.charCodeAt(d-7)!==112||u.charCodeAt(d-8)!==95||u.charCodeAt(d-9)!==95)return!1;for(var S=d-10;S>=0;S--)if(u.charCodeAt(S)!==36)return!1;return!0}function Ikt(u,d,S){var A=m5(u.source,d.source);if(A!==0)return A;if(A=u.originalLine-d.originalLine,A!==0)return A;if(A=u.originalColumn-d.originalColumn,A!==0||S)return A;if(A=u.generatedColumn-d.generatedColumn,A!==0)return A;if(A=u.generatedLine-d.generatedLine,A!==0)return A;return m5(u.name,d.name)}zJe.compareByOriginalPositions=Ikt;function Akt(u,d,S){var A=u.generatedLine-d.generatedLine;if(A!==0)return A;if(A=u.generatedColumn-d.generatedColumn,A!==0||S)return A;if(A=m5(u.source,d.source),A!==0)return A;if(A=u.originalLine-d.originalLine,A!==0)return A;if(A=u.originalColumn-d.originalColumn,A!==0)return A;return m5(u.name,d.name)}zJe.compareByGeneratedPositionsDeflated=Akt;function m5(u,d){if(u===d)return 0;if(u===null)return 1;if(d===null)return-1;if(u>d)return 1;return-1}function Nkt(u,d){var S=u.generatedLine-d.generatedLine;if(S!==0)return S;if(S=u.generatedColumn-d.generatedColumn,S!==0)return S;if(S=m5(u.source,d.source),S!==0)return S;if(S=u.originalLine-d.originalLine,S!==0)return S;if(S=u.originalColumn-d.originalColumn,S!==0)return S;return m5(u.name,d.name)}zJe.compareByGeneratedPositionsInflated=Nkt;function Okt(u){return JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}zJe.parseSourceMapInput=Okt;function Fkt(u,d,S){if(d=d||"",u){if(u[u.length-1]!=="/"&&d[0]!=="/")u+="/";d=u+d}if(S){var A=MU(S);if(!A)throw Error("sourceMapURL could not be parsed");if(A.path){var W=A.path.lastIndexOf("/");if(W>=0)A.path=A.path.substring(0,W+1)}d=jJe(d5(A),d)}return Gbe(d)}zJe.computeSourceURL=Fkt});var Kbe=Vs(function(Kkt){var $be=g5(),Hbe=Object.prototype.hasOwnProperty,N4=typeof Map<"u";function Dw(){this._array=[],this._set=N4?new Map:Object.create(null)}Dw.fromArray=function(d,S){var A=new Dw;for(var W=0,ae=d.length;W<ae;W++)A.add(d[W],S);return A};Dw.prototype.size=function(){return N4?this._set.size:Object.getOwnPropertyNames(this._set).length};Dw.prototype.add=function(d,S){var A=N4?d:$be.toSetString(d),W=N4?this.has(d):Hbe.call(this._set,A),ae=this._array.length;if(!W||S)this._array.push(d);if(!W)if(N4)this._set.set(d,ae);else this._set[A]=ae};Dw.prototype.has=function(d){if(N4)return this._set.has(d);else{var S=$be.toSetString(d);return Hbe.call(this._set,S)}};Dw.prototype.indexOf=function(d){if(N4){var S=this._set.get(d);if(S>=0)return S}else{var A=$be.toSetString(d);if(Hbe.call(this._set,A))return this._set[A]}throw Error('"'+d+'" is not in the set.')};Dw.prototype.at=function(d){if(d>=0&&d<this._array.length)return this._array[d];throw Error("No element indexed by "+d)};Dw.prototype.toArray=function(){return this._array.slice()};Kkt.ArraySet=Dw});var qJe=Vs(function(Ykt){var WJe=g5();function Xkt(u,d){var S=u.generatedLine,A=d.generatedLine,W=u.generatedColumn,ae=d.generatedColumn;return A>S||A==S&&ae>=W||WJe.compareByGeneratedPositionsInflated(u,d)<=0}function ete(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}ete.prototype.unsortedForEach=function(d,S){this._array.forEach(d,S)};ete.prototype.add=function(d){if(Xkt(this._last,d))this._last=d,this._array.push(d);else this._sorted=!1,this._array.push(d)};ete.prototype.toArray=function(){if(!this._sorted)this._array.sort(WJe.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};Ykt.MappingList=ete});var Qbe=Vs(function(tCt){var RU=Vbe(),Sm=g5(),tte=Kbe().ArraySet,eCt=qJe().MappingList;function XS(u){if(!u)u={};this._file=Sm.getArg(u,"file",null),this._sourceRoot=Sm.getArg(u,"sourceRoot",null),this._skipValidation=Sm.getArg(u,"skipValidation",!1),this._sources=new tte,this._names=new tte,this._mappings=new eCt,this._sourcesContents=null}XS.prototype._version=3;XS.fromSourceMap=function(d){var S=d.sourceRoot,A=new XS({file:d.file,sourceRoot:S});return d.eachMapping(function(W){var ae={generated:{line:W.generatedLine,column:W.generatedColumn}};if(W.source!=null){if(ae.source=W.source,S!=null)ae.source=Sm.relative(S,ae.source);if(ae.original={line:W.originalLine,column:W.originalColumn},W.name!=null)ae.name=W.name}A.addMapping(ae)}),d.sources.forEach(function(W){var ae=W;if(S!==null)ae=Sm.relative(S,W);if(!A._sources.has(ae))A._sources.add(ae);var we=d.sourceContentFor(W);if(we!=null)A.setSourceContent(W,we)}),A};XS.prototype.addMapping=function(d){var S=Sm.getArg(d,"generated"),A=Sm.getArg(d,"original",null),W=Sm.getArg(d,"source",null),ae=Sm.getArg(d,"name",null);if(!this._skipValidation)this._validateMapping(S,A,W,ae);if(W!=null){if(W=String(W),!this._sources.has(W))this._sources.add(W)}if(ae!=null){if(ae=String(ae),!this._names.has(ae))this._names.add(ae)}this._mappings.add({generatedLine:S.line,generatedColumn:S.column,originalLine:A!=null&&A.line,originalColumn:A!=null&&A.column,source:W,name:ae})};XS.prototype.setSourceContent=function(d,S){var A=d;if(this._sourceRoot!=null)A=Sm.relative(this._sourceRoot,A);if(S!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[Sm.toSetString(A)]=S}else if(this._sourcesContents){if(delete this._sourcesContents[Sm.toSetString(A)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};XS.prototype.applySourceMap=function(d,S,A){var W=S;if(S==null){if(d.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);W=d.file}var ae=this._sourceRoot;if(ae!=null)W=Sm.relative(ae,W);var we=new tte,nt=new tte;this._mappings.unsortedForEach(function(Tt){if(Tt.source===W&&Tt.originalLine!=null){var Jt=d.originalPositionFor({line:Tt.originalLine,column:Tt.originalColumn});if(Jt.source!=null){if(Tt.source=Jt.source,A!=null)Tt.source=Sm.join(A,Tt.source);if(ae!=null)Tt.source=Sm.relative(ae,Tt.source);if(Tt.originalLine=Jt.line,Tt.originalColumn=Jt.column,Jt.name!=null)Tt.name=Jt.name}}var Ir=Tt.source;if(Ir!=null&&!we.has(Ir))we.add(Ir);var Ar=Tt.name;if(Ar!=null&&!nt.has(Ar))nt.add(Ar)},this),this._sources=we,this._names=nt,d.sources.forEach(function(Tt){var Jt=d.sourceContentFor(Tt);if(Jt!=null){if(A!=null)Tt=Sm.join(A,Tt);if(ae!=null)Tt=Sm.relative(ae,Tt);this.setSourceContent(Tt,Jt)}},this)};XS.prototype._validateMapping=function(d,S,A,W){if(S&&typeof S.line!=="number"&&typeof S.column!=="number")throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(d&&"line"in d&&"column"in d&&d.line>0&&d.column>=0&&!S&&!A&&!W)return;else if(d&&"line"in d&&"column"in d&&S&&"line"in S&&"column"in S&&d.line>0&&d.column>=0&&S.line>0&&S.column>=0&&A)return;else throw Error("Invalid mapping: "+JSON.stringify({generated:d,source:A,original:S,name:W}))};XS.prototype._serializeMappings=function(){var d=0,S=1,A=0,W=0,ae=0,we=0,nt="",Tt,Jt,Ir,Ar,Ee=this._mappings.toArray();for(var Yn=0,Ut=Ee.length;Yn<Ut;Yn++){if(Jt=Ee[Yn],Tt="",Jt.generatedLine!==S){d=0;while(Jt.generatedLine!==S)Tt+=";",S++}else if(Yn>0){if(!Sm.compareByGeneratedPositionsInflated(Jt,Ee[Yn-1]))continue;Tt+=","}if(Tt+=RU.encode(Jt.generatedColumn-d),d=Jt.generatedColumn,Jt.source!=null){if(Ar=this._sources.indexOf(Jt.source),Tt+=RU.encode(Ar-we),we=Ar,Tt+=RU.encode(Jt.originalLine-1-W),W=Jt.originalLine-1,Tt+=RU.encode(Jt.originalColumn-A),A=Jt.originalColumn,Jt.name!=null)Ir=this._names.indexOf(Jt.name),Tt+=RU.encode(Ir-ae),ae=Ir}nt+=Tt}return nt};XS.prototype._generateSourcesContent=function(d,S){return d.map(function(A){if(!this._sourcesContents)return null;if(S!=null)A=Sm.relative(S,A);var W=Sm.toSetString(A);return Object.prototype.hasOwnProperty.call(this._sourcesContents,W)?this._sourcesContents[W]:null},this)};XS.prototype.toJSON=function(){var d={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)d.file=this._file;if(this._sourceRoot!=null)d.sourceRoot=this._sourceRoot;if(this._sourcesContents)d.sourcesContent=this._generateSourcesContent(d.sources,d.sourceRoot);return d};XS.prototype.toString=function(){return JSON.stringify(this.toJSON())};tCt.SourceMapGenerator=XS});var GJe=Vs(function(nCt){nCt.GREATEST_LOWER_BOUND=1;nCt.LEAST_UPPER_BOUND=2;function Xbe(u,d,S,A,W,ae){var we=Math.floor((d-u)/2)+u,nt=W(S,A[we],!0);if(nt===0)return we;else if(nt>0){if(d-we>1)return Xbe(we,d,S,A,W,ae);if(ae==nCt.LEAST_UPPER_BOUND)return d<A.length?d:-1;else return we}else{if(we-u>1)return Xbe(u,we,S,A,W,ae);if(ae==nCt.LEAST_UPPER_BOUND)return we;else return u<0?-1:u}}nCt.search=function(d,S,A,W){if(S.length===0)return-1;var ae=Xbe(-1,S.length,d,S,A,W||nCt.GREATEST_LOWER_BOUND);if(ae<0)return-1;while(ae-1>=0){if(A(S[ae],S[ae-1],!0)!==0)break;--ae}return ae}});var $Je=Vs(function(aCt){function Zbe(u,d,S){var A=u[d];u[d]=u[S],u[S]=A}function sCt(u,d){return Math.round(u+Math.random()*(d-u))}function eSe(u,d,S,A){if(S<A){var W=sCt(S,A),ae=S-1;Zbe(u,W,A);var we=u[A];for(var nt=S;nt<A;nt++)if(d(u[nt],we)<=0)ae+=1,Zbe(u,ae,nt);Zbe(u,ae+1,nt);var Tt=ae+1;eSe(u,d,S,Tt-1),eSe(u,d,Tt+1,A)}}aCt.quickSort=function(u,d){eSe(u,d,0,u.length-1)}});var KJe=Vs(function(lCt){var oo=g5(),tSe=GJe(),h5=Kbe().ArraySet,cCt=Vbe(),jU=$Je().quickSort;function up(u,d){var S=u;if(typeof u==="string")S=oo.parseSourceMapInput(u);return S.sections!=null?new FT(S,d):new Ah(S,d)}up.fromSourceMap=function(u,d){return Ah.fromSourceMap(u,d)};up.prototype._version=3;up.prototype.__generatedMappings=null;Object.defineProperty(up.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});up.prototype.__originalMappings=null;Object.defineProperty(up.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});up.prototype._charIsMappingSeparator=function(d,S){var A=d.charAt(S);return A===";"||A===","};up.prototype._parseMappings=function(d,S){throw Error("Subclasses must implement _parseMappings")};up.GENERATED_ORDER=1;up.ORIGINAL_ORDER=2;up.GREATEST_LOWER_BOUND=1;up.LEAST_UPPER_BOUND=2;up.prototype.eachMapping=function(d,S,A){var W=S||null,ae=A||up.GENERATED_ORDER,we;switch(ae){case up.GENERATED_ORDER:we=this._generatedMappings;break;case up.ORIGINAL_ORDER:we=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var nt=this.sourceRoot;we.map(function(Tt){var Jt=Tt.source===null?null:this._sources.at(Tt.source);return Jt=oo.computeSourceURL(nt,Jt,this._sourceMapURL),{source:Jt,generatedLine:Tt.generatedLine,generatedColumn:Tt.generatedColumn,originalLine:Tt.originalLine,originalColumn:Tt.originalColumn,name:Tt.name===null?null:this._names.at(Tt.name)}},this).forEach(d,W)};up.prototype.allGeneratedPositionsFor=function(d){var S=oo.getArg(d,"line"),A={source:oo.getArg(d,"source"),originalLine:S,originalColumn:oo.getArg(d,"column",0)};if(A.source=this._findSourceIndex(A.source),A.source<0)return[];var W=[],ae=this._findMapping(A,this._originalMappings,"originalLine","originalColumn",oo.compareByOriginalPositions,tSe.LEAST_UPPER_BOUND);if(ae>=0){var we=this._originalMappings[ae];if(d.column===void 0){var nt=we.originalLine;while(we&&we.originalLine===nt)W.push({line:oo.getArg(we,"generatedLine",null),column:oo.getArg(we,"generatedColumn",null),lastColumn:oo.getArg(we,"lastGeneratedColumn",null)}),we=this._originalMappings[++ae]}else{var Tt=we.originalColumn;while(we&&we.originalLine===S&&we.originalColumn==Tt)W.push({line:oo.getArg(we,"generatedLine",null),column:oo.getArg(we,"generatedColumn",null),lastColumn:oo.getArg(we,"lastGeneratedColumn",null)}),we=this._originalMappings[++ae]}}return W};lCt.SourceMapConsumer=up;function Ah(u,d){var S=u;if(typeof u==="string")S=oo.parseSourceMapInput(u);var A=oo.getArg(S,"version"),W=oo.getArg(S,"sources"),ae=oo.getArg(S,"names",[]),we=oo.getArg(S,"sourceRoot",null),nt=oo.getArg(S,"sourcesContent",null),Tt=oo.getArg(S,"mappings"),Jt=oo.getArg(S,"file",null);if(A!=this._version)throw Error("Unsupported version: "+A);if(we)we=oo.normalize(we);W=W.map(String).map(oo.normalize).map(function(Ir){return we&&oo.isAbsolute(we)&&oo.isAbsolute(Ir)?oo.relative(we,Ir):Ir}),this._names=h5.fromArray(ae.map(String),!0),this._sources=h5.fromArray(W,!0),this._absoluteSources=this._sources.toArray().map(function(Ir){return oo.computeSourceURL(we,Ir,d)}),this.sourceRoot=we,this.sourcesContent=nt,this._mappings=Tt,this._sourceMapURL=d,this.file=Jt}Ah.prototype=Object.create(up.prototype);Ah.prototype.consumer=up;Ah.prototype._findSourceIndex=function(u){var d=u;if(this.sourceRoot!=null)d=oo.relative(this.sourceRoot,d);if(this._sources.has(d))return this._sources.indexOf(d);var S;for(S=0;S<this._absoluteSources.length;++S)if(this._absoluteSources[S]==u)return S;return-1};Ah.fromSourceMap=function(d,S){var A=Object.create(Ah.prototype),W=A._names=h5.fromArray(d._names.toArray(),!0),ae=A._sources=h5.fromArray(d._sources.toArray(),!0);A.sourceRoot=d._sourceRoot,A.sourcesContent=d._generateSourcesContent(A._sources.toArray(),A.sourceRoot),A.file=d._file,A._sourceMapURL=S,A._absoluteSources=A._sources.toArray().map(function(Yn){return oo.computeSourceURL(A.sourceRoot,Yn,S)});var we=d._mappings.toArray().slice(),nt=A.__generatedMappings=[],Tt=A.__originalMappings=[];for(var Jt=0,Ir=we.length;Jt<Ir;Jt++){var Ar=we[Jt],Ee=new HJe;if(Ee.generatedLine=Ar.generatedLine,Ee.generatedColumn=Ar.generatedColumn,Ar.source){if(Ee.source=ae.indexOf(Ar.source),Ee.originalLine=Ar.originalLine,Ee.originalColumn=Ar.originalColumn,Ar.name)Ee.name=W.indexOf(Ar.name);Tt.push(Ee)}nt.push(Ee)}return jU(A.__originalMappings,oo.compareByOriginalPositions),A};Ah.prototype._version=3;Object.defineProperty(Ah.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function HJe(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ah.prototype._parseMappings=function(d,S){var A=1,W=0,ae=0,we=0,nt=0,Tt=0,Jt=d.length,Ir=0,Ar={},Ee={},Yn=[],Ut=[],ct,ji,Ii,Va,Co;while(Ir<Jt)if(d.charAt(Ir)===";")A++,Ir++,W=0;else if(d.charAt(Ir)===",")Ir++;else{ct=new HJe,ct.generatedLine=A;for(Va=Ir;Va<Jt;Va++)if(this._charIsMappingSeparator(d,Va))break;if(ji=d.slice(Ir,Va),Ii=Ar[ji],Ii)Ir+=ji.length;else{Ii=[];while(Ir<Va)cCt.decode(d,Ir,Ee),Co=Ee.value,Ir=Ee.rest,Ii.push(Co);if(Ii.length===2)throw Error("Found a source, but no line and column");if(Ii.length===3)throw Error("Found a source and line, but no column");Ar[ji]=Ii}if(ct.generatedColumn=W+Ii[0],W=ct.generatedColumn,Ii.length>1){if(ct.source=nt+Ii[1],nt+=Ii[1],ct.originalLine=ae+Ii[2],ae=ct.originalLine,ct.originalLine+=1,ct.originalColumn=we+Ii[3],we=ct.originalColumn,Ii.length>4)ct.name=Tt+Ii[4],Tt+=Ii[4]}if(Ut.push(ct),typeof ct.originalLine==="number")Yn.push(ct)}jU(Ut,oo.compareByGeneratedPositionsDeflated),this.__generatedMappings=Ut,jU(Yn,oo.compareByOriginalPositions),this.__originalMappings=Yn};Ah.prototype._findMapping=function(d,S,A,W,ae,we){if(d[A]<=0)throw TypeError("Line must be greater than or equal to 1, got "+d[A]);if(d[W]<0)throw TypeError("Column must be greater than or equal to 0, got "+d[W]);return tSe.search(d,S,ae,we)};Ah.prototype.computeColumnSpans=function(){for(var d=0;d<this._generatedMappings.length;++d){var S=this._generatedMappings[d];if(d+1<this._generatedMappings.length){var A=this._generatedMappings[d+1];if(S.generatedLine===A.generatedLine){S.lastGeneratedColumn=A.generatedColumn-1;continue}}S.lastGeneratedColumn=1/0}};Ah.prototype.originalPositionFor=function(d){var S={generatedLine:oo.getArg(d,"line"),generatedColumn:oo.getArg(d,"column")},A=this._findMapping(S,this._generatedMappings,"generatedLine","generatedColumn",oo.compareByGeneratedPositionsDeflated,oo.getArg(d,"bias",up.GREATEST_LOWER_BOUND));if(A>=0){var W=this._generatedMappings[A];if(W.generatedLine===S.generatedLine){var ae=oo.getArg(W,"source",null);if(ae!==null)ae=this._sources.at(ae),ae=oo.computeSourceURL(this.sourceRoot,ae,this._sourceMapURL);var we=oo.getArg(W,"name",null);if(we!==null)we=this._names.at(we);return{source:ae,line:oo.getArg(W,"originalLine",null),column:oo.getArg(W,"originalColumn",null),name:we}}}return{source:null,line:null,column:null,name:null}};Ah.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(d){return d==null})};Ah.prototype.sourceContentFor=function(d,S){if(!this.sourcesContent)return null;var A=this._findSourceIndex(d);if(A>=0)return this.sourcesContent[A];var W=d;if(this.sourceRoot!=null)W=oo.relative(this.sourceRoot,W);var ae;if(this.sourceRoot!=null&&(ae=oo.urlParse(this.sourceRoot))){var we=W.replace(/^file:\/\//,"");if(ae.scheme=="file"&&this._sources.has(we))return this.sourcesContent[this._sources.indexOf(we)];if((!ae.path||ae.path=="/")&&this._sources.has("/"+W))return this.sourcesContent[this._sources.indexOf("/"+W)]}if(S)return null;else throw Error('"'+W+'" is not in the SourceMap.')};Ah.prototype.generatedPositionFor=function(d){var S=oo.getArg(d,"source");if(S=this._findSourceIndex(S),S<0)return{line:null,column:null,lastColumn:null};var A={source:S,originalLine:oo.getArg(d,"line"),originalColumn:oo.getArg(d,"column")},W=this._findMapping(A,this._originalMappings,"originalLine","originalColumn",oo.compareByOriginalPositions,oo.getArg(d,"bias",up.GREATEST_LOWER_BOUND));if(W>=0){var ae=this._originalMappings[W];if(ae.source===A.source)return{line:oo.getArg(ae,"generatedLine",null),column:oo.getArg(ae,"generatedColumn",null),lastColumn:oo.getArg(ae,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};lCt.BasicSourceMapConsumer=Ah;function FT(u,d){var S=u;if(typeof u==="string")S=oo.parseSourceMapInput(u);var A=oo.getArg(S,"version"),W=oo.getArg(S,"sections");if(A!=this._version)throw Error("Unsupported version: "+A);this._sources=new h5,this._names=new h5;var ae={line:-1,column:0};this._sections=W.map(function(we){if(we.url)throw Error("Support for url field in sections not implemented.");var nt=oo.getArg(we,"offset"),Tt=oo.getArg(nt,"line"),Jt=oo.getArg(nt,"column");if(Tt<ae.line||Tt===ae.line&&Jt<ae.column)throw Error("Section offsets must be ordered and non-overlapping.");return ae=nt,{generatedOffset:{generatedLine:Tt+1,generatedColumn:Jt+1},consumer:new up(oo.getArg(we,"map"),d)}})}FT.prototype=Object.create(up.prototype);FT.prototype.constructor=up;FT.prototype._version=3;Object.defineProperty(FT.prototype,"sources",{get:function(){var u=[];for(var d=0;d<this._sections.length;d++)for(var S=0;S<this._sections[d].consumer.sources.length;S++)u.push(this._sections[d].consumer.sources[S]);return u}});FT.prototype.originalPositionFor=function(d){var S={generatedLine:oo.getArg(d,"line"),generatedColumn:oo.getArg(d,"column")},A=tSe.search(S,this._sections,function(ae,we){var nt=ae.generatedLine-we.generatedOffset.generatedLine;if(nt)return nt;return ae.generatedColumn-we.generatedOffset.generatedColumn}),W=this._sections[A];if(!W)return{source:null,line:null,column:null,name:null};return W.consumer.originalPositionFor({line:S.generatedLine-(W.generatedOffset.generatedLine-1),column:S.generatedColumn-(W.generatedOffset.generatedLine===S.generatedLine?W.generatedOffset.generatedColumn-1:0),bias:d.bias})};FT.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(d){return d.consumer.hasContentsOfAllSources()})};FT.prototype.sourceContentFor=function(d,S){for(var A=0;A<this._sections.length;A++){var W=this._sections[A],ae=W.consumer.sourceContentFor(d,!0);if(ae)return ae}if(S)return null;else throw Error('"'+d+'" is not in the SourceMap.')};FT.prototype.generatedPositionFor=function(d){for(var S=0;S<this._sections.length;S++){var A=this._sections[S];if(A.consumer._findSourceIndex(oo.getArg(d,"source"))===-1)continue;var W=A.consumer.generatedPositionFor(d);if(W){var ae={line:W.line+(A.generatedOffset.generatedLine-1),column:W.column+(A.generatedOffset.generatedLine===W.line?A.generatedOffset.generatedColumn-1:0)};return ae}}return{line:null,column:null}};FT.prototype._parseMappings=function(d,S){this.__generatedMappings=[],this.__originalMappings=[];for(var A=0;A<this._sections.length;A++){var W=this._sections[A],ae=W.consumer._generatedMappings;for(var we=0;we<ae.length;we++){var nt=ae[we],Tt=W.consumer._sources.at(nt.source);Tt=oo.computeSourceURL(W.consumer.sourceRoot,Tt,this._sourceMapURL),this._sources.add(Tt),Tt=this._sources.indexOf(Tt);var Jt=null;if(nt.name)Jt=W.consumer._names.at(nt.name),this._names.add(Jt),Jt=this._names.indexOf(Jt);var Ir={source:Tt,generatedLine:nt.generatedLine+(W.generatedOffset.generatedLine-1),generatedColumn:nt.generatedColumn+(W.generatedOffset.generatedLine===nt.generatedLine?W.generatedOffset.generatedColumn-1:0),originalLine:nt.originalLine,originalColumn:nt.originalColumn,name:Jt};if(this.__generatedMappings.push(Ir),typeof Ir.originalLine==="number")this.__originalMappings.push(Ir)}}jU(this.__generatedMappings,oo.compareByGeneratedPositionsDeflated),jU(this.__originalMappings,oo.compareByOriginalPositions)};lCt.IndexedSourceMapConsumer=FT});var QJe=Vs(function(gCt){var pCt=Qbe().SourceMapGenerator,rte=g5(),dCt=/(\r?\n)/,mCt=10,y5="$$$isSourceNode$$$";function lb(u,d,S,A,W){if(this.children=[],this.sourceContents={},this.line=u==null?null:u,this.column=d==null?null:d,this.source=S==null?null:S,this.name=W==null?null:W,this[y5]=!0,A!=null)this.add(A)}lb.fromStringWithSourceMap=function(d,S,A){var W=new lb,ae=d.split(dCt),we=0,nt=function(){var Ee=Ut(),Yn=Ut()||"";return Ee+Yn;function Ut(){return we<ae.length?ae[we++]:void 0}},Tt=1,Jt=0,Ir=null;if(S.eachMapping(function(Ee){if(Ir!==null)if(Tt<Ee.generatedLine)Ar(Ir,nt()),Tt++,Jt=0;else{var Yn=ae[we]||"",Ut=Yn.substr(0,Ee.generatedColumn-Jt);ae[we]=Yn.substr(Ee.generatedColumn-Jt),Jt=Ee.generatedColumn,Ar(Ir,Ut),Ir=Ee;return}while(Tt<Ee.generatedLine)W.add(nt()),Tt++;if(Jt<Ee.generatedColumn){var Yn=ae[we]||"";W.add(Yn.substr(0,Ee.generatedColumn)),ae[we]=Yn.substr(Ee.generatedColumn),Jt=Ee.generatedColumn}Ir=Ee},this),we<ae.length){if(Ir)Ar(Ir,nt());W.add(ae.splice(we).join(""))}return S.sources.forEach(function(Ee){var Yn=S.sourceContentFor(Ee);if(Yn!=null){if(A!=null)Ee=rte.join(A,Ee);W.setSourceContent(Ee,Yn)}}),W;function Ar(Ee,Yn){if(Ee===null||Ee.source===void 0)W.add(Yn);else{var Ut=A?rte.join(A,Ee.source):Ee.source;W.add(new lb(Ee.originalLine,Ee.originalColumn,Ut,Yn,Ee.name))}}};lb.prototype.add=function(d){if(Array.isArray(d))d.forEach(function(S){this.add(S)},this);else if(d[y5]||typeof d==="string"){if(d)this.children.push(d)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+d);return this};lb.prototype.prepend=function(d){if(Array.isArray(d))for(var S=d.length-1;S>=0;S--)this.prepend(d[S]);else if(d[y5]||typeof d==="string")this.children.unshift(d);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+d);return this};lb.prototype.walk=function(d){var S;for(var A=0,W=this.children.length;A<W;A++)if(S=this.children[A],S[y5])S.walk(d);else if(S!=="")d(S,{source:this.source,line:this.line,column:this.column,name:this.name})};lb.prototype.join=function(d){var S,A,W=this.children.length;if(W>0){S=[];for(A=0;A<W-1;A++)S.push(this.children[A]),S.push(d);S.push(this.children[A]),this.children=S}return this};lb.prototype.replaceRight=function(d,S){var A=this.children[this.children.length-1];if(A[y5])A.replaceRight(d,S);else if(typeof A==="string")this.children[this.children.length-1]=A.replace(d,S);else this.children.push("".replace(d,S));return this};lb.prototype.setSourceContent=function(d,S){this.sourceContents[rte.toSetString(d)]=S};lb.prototype.walkSourceContents=function(d){for(var S=0,A=this.children.length;S<A;S++)if(this.children[S][y5])this.children[S].walkSourceContents(d);var W=Object.keys(this.sourceContents);for(var S=0,A=W.length;S<A;S++)d(rte.fromSetString(W[S]),this.sourceContents[W[S]])};lb.prototype.toString=function(){var d="";return this.walk(function(S){d+=S}),d};lb.prototype.toStringWithSourceMap=function(d){var S={code:"",line:1,column:0},A=new pCt(d),W=!1,ae=null,we=null,nt=null,Tt=null;return this.walk(function(Jt,Ir){if(S.code+=Jt,Ir.source!==null&&Ir.line!==null&&Ir.column!==null){if(ae!==Ir.source||we!==Ir.line||nt!==Ir.column||Tt!==Ir.name)A.addMapping({source:Ir.source,original:{line:Ir.line,column:Ir.column},generated:{line:S.line,column:S.column},name:Ir.name});ae=Ir.source,we=Ir.line,nt=Ir.column,Tt=Ir.name,W=!0}else if(W)A.addMapping({generated:{line:S.line,column:S.column}}),ae=null,W=!1;for(var Ar=0,Ee=Jt.length;Ar<Ee;Ar++)if(Jt.charCodeAt(Ar)===mCt){if(S.line++,S.column=0,Ar+1===Ee)ae=null,W=!1;else if(W)A.addMapping({source:Ir.source,original:{line:Ir.line,column:Ir.column},generated:{line:S.line,column:S.column},name:Ir.name})}else S.column++}),this.walkSourceContents(function(Jt,Ir){A.setSourceContent(Jt,Ir)}),{code:S.code,map:A}};gCt.SourceNode=lb});var XJe=Vs(function(yCt){yCt.SourceMapGenerator=Qbe().SourceMapGenerator;yCt.SourceMapConsumer=KJe().SourceMapConsumer;yCt.SourceNode=QJe().SourceNode});var ZJe=Vs(function(fLt,YJe){var TCt=Object.prototype.toString,rSe=typeof Buffer<"u"&&typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function xCt(u){return TCt.call(u).slice(8,-1)==="ArrayBuffer"}function kCt(u,d,S){d>>>=0;var A=u.byteLength-d;if(A<0)throw RangeError("'offset' is out of bounds");if(S===void 0)S=A;else if(S>>>=0,S>A)throw RangeError("'length' is out of bounds");return rSe?Buffer.from(u.slice(d,d+S)):new Buffer(new Uint8Array(u.slice(d,d+S)))}function CCt(u,d){if(typeof d!=="string"||d==="")d="utf8";if(!Buffer.isEncoding(d))throw TypeError('"encoding" must be a valid string encoding');return rSe?Buffer.from(u,d):new Buffer(u,d)}function ECt(u,d,S){if(typeof u==="number")throw TypeError('"value" argument must not be a number');if(xCt(u))return kCt(u,d,S);if(typeof u==="string")return CCt(u,d);return rSe?Buffer.from(u):new Buffer(u)}YJe.exports=ECt});var oUe=Vs(function(pLt,aSe){var wCt=XJe().SourceMapConsumer,nSe=w0("path"),Qk;try{if(Qk=w0("fs"),!Qk.existsSync||!Qk.readFileSync)Qk=null}catch(u){}var PCt=ZJe();function eUe(u,d){return u.require(d)}var tUe=!1,rUe=!1,iSe=!1,BU="auto",O4={},JU={},DCt=/^data:application\/json[^,]+base64,/,vI=[],bI=[];function oSe(){if(BU==="browser")return!0;if(BU==="node")return!1;return typeof window<"u"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function ICt(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function ACt(){if(typeof process==="object"&&process!==null)return process.version;else return""}function NCt(){if(typeof process==="object"&&process!==null)return process.stderr}function OCt(u){if(typeof process==="object"&&process!==null&&typeof process.exit==="function")return process.exit(u)}function nte(u){return function(d){for(var S=0;S<u.length;S++){var A=u[S](d);if(A)return A}return null}}var cSe=nte(vI);vI.push(function(u){if(u=u.trim(),/^file:/.test(u))u=u.replace(/file:\/\/\/(\w:)?/,function(A,W){return W?"":"/"});if(u in O4)return O4[u];var d="";try{if(!Qk){var S=new XMLHttpRequest;if(S.open("GET",u,!1),S.send(null),S.readyState===4&&S.status===200)d=S.responseText}else if(Qk.existsSync(u))d=Qk.readFileSync(u,"utf8")}catch(A){}return O4[u]=d});function sSe(u,d){if(!u)return d;var S=nSe.dirname(u),A=/^\w+:\/\/[^\/]*/.exec(S),W=A?A[0]:"",ae=S.slice(W.length);if(W&&/^\/\w\:/.test(ae))return W+="/",W+nSe.resolve(S.slice(W.length),d).replace(/\\/g,"/");return W+nSe.resolve(S.slice(W.length),d)}function FCt(u){var d;if(oSe())try{var S=new XMLHttpRequest;S.open("GET",u,!1),S.send(null),d=S.readyState===4?S.responseText:null;var A=S.getResponseHeader("SourceMap")||S.getResponseHeader("X-SourceMap");if(A)return A}catch(nt){}d=cSe(u);var W=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,ae,we;while(we=W.exec(d))ae=we;if(!ae)return null;return ae[1]}var lSe=nte(bI);bI.push(function(u){var d=FCt(u);if(!d)return null;var S;if(DCt.test(d)){var A=d.slice(d.indexOf(",")+1);S=PCt(A,"base64").toString(),d=u}else d=sSe(u,d),S=cSe(d);if(!S)return null;return{url:d,map:S}});function uSe(u){var d=JU[u.source];if(!d){var S=lSe(u.source);if(S){if(d=JU[u.source]={url:S.url,map:new wCt(S.map)},d.map.sourcesContent)d.map.sources.forEach(function(W,ae){var we=d.map.sourcesContent[ae];if(we){var nt=sSe(d.url,W);O4[nt]=we}})}else d=JU[u.source]={url:null,map:null}}if(d&&d.map&&typeof d.map.originalPositionFor==="function"){var A=d.map.originalPositionFor(u);if(A.source!==null)return A.source=sSe(d.url,A.source),A}return u}function iUe(u){var d=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(u);if(d){var S=uSe({source:d[2],line:+d[3],column:d[4]-1});return"eval at "+d[1]+" ("+S.source+":"+S.line+":"+(S.column+1)+")"}if(d=/^eval at ([^(]+) \((.+)\)$/.exec(u),d)return"eval at "+d[1]+" ("+iUe(d[2])+")";return u}function LCt(){var u,d="";if(this.isNative())d="native";else{if(u=this.getScriptNameOrSourceURL(),!u&&this.isEval())d=this.getEvalOrigin(),d+=", ";if(u)d+=u;else d+="<anonymous>";var S=this.getLineNumber();if(S!=null){d+=":"+S;var A=this.getColumnNumber();if(A)d+=":"+A}}var W="",ae=this.getFunctionName(),we=!0,nt=this.isConstructor(),Tt=!(this.isToplevel()||nt);if(Tt){var Jt=this.getTypeName();if(Jt==="[object Object]")Jt="null";var Ir=this.getMethodName();if(ae){if(Jt&&ae.indexOf(Jt)!=0)W+=Jt+".";if(W+=ae,Ir&&ae.indexOf("."+Ir)!=ae.length-Ir.length-1)W+=" [as "+Ir+"]"}else W+=Jt+"."+(Ir||"<anonymous>")}else if(nt)W+="new "+(ae||"<anonymous>");else if(ae)W+=ae;else W+=d,we=!1;if(we)W+=" ("+d+")";return W}function nUe(u){var d={};return Object.getOwnPropertyNames(Object.getPrototypeOf(u)).forEach(function(S){d[S]=/^(?:is|get)/.test(S)?function(){return u[S].call(u)}:u[S]}),d.toString=LCt,d}function sUe(u,d){if(d===void 0)d={nextPosition:null,curPosition:null};if(u.isNative())return d.curPosition=null,u;var S=u.getFileName()||u.getScriptNameOrSourceURL();if(S){var A=u.getLineNumber(),W=u.getColumnNumber()-1,ae=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,we=ae.test(ACt())?0:62;if(A===1&&W>we&&!oSe()&&!u.isEval())W-=we;var nt=uSe({source:S,line:A,column:W});d.curPosition=nt,u=nUe(u);var Tt=u.getFunctionName;return u.getFunctionName=function(){if(d.nextPosition==null)return Tt();return d.nextPosition.name||Tt()},u.getFileName=function(){return nt.source},u.getLineNumber=function(){return nt.line},u.getColumnNumber=function(){return nt.column+1},u.getScriptNameOrSourceURL=function(){return nt.source},u}var Jt=u.isEval()&&u.getEvalOrigin();if(Jt)return Jt=iUe(Jt),u=nUe(u),u.getEvalOrigin=function(){return Jt},u;return u}function MCt(u,d){if(iSe)O4={},JU={};var S=u.name||"Error",A=u.message||"",W=S+": "+A,ae={nextPosition:null,curPosition:null},we=[];for(var nt=d.length-1;nt>=0;nt--)we.push(`
3
3
  at `+sUe(d[nt],ae)),ae.nextPosition=ae.curPosition;return ae.curPosition=ae.nextPosition=null,W+we.reverse().join("")}function aUe(u){var d=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(u.stack);if(d){var S=d[1],A=+d[2],W=+d[3],ae=O4[S];if(!ae&&Qk&&Qk.existsSync(S))try{ae=Qk.readFileSync(S,"utf8")}catch(nt){ae=""}if(ae){var we=ae.split(/(?:\r\n|\r|\n)/)[A-1];if(we)return S+":"+A+`
4
4
  `+we+`
5
- `+Array(W).join(" ")+"^"}}return null}function RCt(u){var d=aUe(u),S=NCt();if(S&&S._handle&&S._handle.setBlocking)S._handle.setBlocking(!0);if(d)console.error(),console.error(d);console.error(u.stack),OCt(1)}function jCt(){var u=process.emit;process.emit=function(d){if(d==="uncaughtException"){var S=arguments[1]&&arguments[1].stack,A=this.listeners(d).length>0;if(S&&!A)return RCt(arguments[1])}return u.apply(this,arguments)}}var BCt=vI.slice(0),JCt=bI.slice(0);pLt.wrapCallSite=sUe;pLt.getErrorSource=aUe;pLt.mapSourcePosition=uSe;pLt.retrieveSourceMap=lSe;pLt.install=function(u){if(u=u||{},u.environment){if(BU=u.environment,["node","browser","auto"].indexOf(BU)===-1)throw Error("environment "+BU+" was unknown. Available options are {auto, browser, node}")}if(u.retrieveFile){if(u.overrideRetrieveFile)vI.length=0;vI.unshift(u.retrieveFile)}if(u.retrieveSourceMap){if(u.overrideRetrieveSourceMap)bI.length=0;bI.unshift(u.retrieveSourceMap)}if(u.hookRequire&&!oSe()){var d=eUe(aSe,"module"),S=d.prototype._compile;if(!S.__sourceMapSupport)d.prototype._compile=function(ae,we){return O4[we]=ae,JU[we]=void 0,S.call(this,ae,we)},d.prototype._compile.__sourceMapSupport=!0}if(!iSe)iSe="emptyCacheBetweenOperations"in u?u.emptyCacheBetweenOperations:!1;if(!tUe)tUe=!0,Error.prepareStackTrace=MCt;if(!rUe){var A="handleUncaughtExceptions"in u?u.handleUncaughtExceptions:!0;try{var W=eUe(aSe,"worker_threads");if(W.isMainThread===!1)A=!1}catch(ae){}if(A&&ICt())rUe=!0,jCt()}};pLt.resetRetrieveHandlers=function(){vI.length=0,bI.length=0,vI=BCt.slice(0),bI=JCt.slice(0),lSe=nte(bI),cSe=nte(vI)}});var lUe=Vs(function(dLt,ite){var __dirname="/mtg/runner/mtg-6f93091872/_work/mutagent-monorepo/mutagent-monorepo/node_modules/typescript/lib",__filename="/mtg/runner/mtg-6f93091872/_work/mutagent-monorepo/mutagent-monorepo/node_modules/typescript/lib/typescript.js";/*! *****************************************************************************
5
+ `+Array(W).join(" ")+"^"}}return null}function RCt(u){var d=aUe(u),S=NCt();if(S&&S._handle&&S._handle.setBlocking)S._handle.setBlocking(!0);if(d)console.error(),console.error(d);console.error(u.stack),OCt(1)}function jCt(){var u=process.emit;process.emit=function(d){if(d==="uncaughtException"){var S=arguments[1]&&arguments[1].stack,A=this.listeners(d).length>0;if(S&&!A)return RCt(arguments[1])}return u.apply(this,arguments)}}var BCt=vI.slice(0),JCt=bI.slice(0);pLt.wrapCallSite=sUe;pLt.getErrorSource=aUe;pLt.mapSourcePosition=uSe;pLt.retrieveSourceMap=lSe;pLt.install=function(u){if(u=u||{},u.environment){if(BU=u.environment,["node","browser","auto"].indexOf(BU)===-1)throw Error("environment "+BU+" was unknown. Available options are {auto, browser, node}")}if(u.retrieveFile){if(u.overrideRetrieveFile)vI.length=0;vI.unshift(u.retrieveFile)}if(u.retrieveSourceMap){if(u.overrideRetrieveSourceMap)bI.length=0;bI.unshift(u.retrieveSourceMap)}if(u.hookRequire&&!oSe()){var d=eUe(aSe,"module"),S=d.prototype._compile;if(!S.__sourceMapSupport)d.prototype._compile=function(ae,we){return O4[we]=ae,JU[we]=void 0,S.call(this,ae,we)},d.prototype._compile.__sourceMapSupport=!0}if(!iSe)iSe="emptyCacheBetweenOperations"in u?u.emptyCacheBetweenOperations:!1;if(!tUe)tUe=!0,Error.prepareStackTrace=MCt;if(!rUe){var A="handleUncaughtExceptions"in u?u.handleUncaughtExceptions:!0;try{var W=eUe(aSe,"worker_threads");if(W.isMainThread===!1)A=!1}catch(ae){}if(A&&ICt())rUe=!0,jCt()}};pLt.resetRetrieveHandlers=function(){vI.length=0,bI.length=0,vI=BCt.slice(0),bI=JCt.slice(0),lSe=nte(bI),cSe=nte(vI)}});var lUe=Vs(function(dLt,ite){var __dirname="/mtg/runner/mtg-018c7ad9d5/_work/mutagent-monorepo/mutagent-monorepo/node_modules/typescript/lib",__filename="/mtg/runner/mtg-018c7ad9d5/_work/mutagent-monorepo/mutagent-monorepo/node_modules/typescript/lib/typescript.js";/*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
8
8
  this file except in compliance with the License. You may obtain a copy of the
package/dist/bin/cli.js CHANGED
@@ -19581,6 +19581,59 @@ init_organization_scope();
19581
19581
  import { Command as Command5 } from "commander";
19582
19582
  import chalk9 from "chalk";
19583
19583
 
19584
+ // src/lib/server-health.ts
19585
+ init_config();
19586
+ init_errors();
19587
+ init_organization_scope();
19588
+ var UNKNOWN = "unknown";
19589
+ function text(value) {
19590
+ return typeof value === "string" && value.trim() !== "" ? value : UNKNOWN;
19591
+ }
19592
+ function unreachable(endpoint, fix) {
19593
+ return new MutagentError("REQUEST_FAILED", `Unable to reach the Mutagent server at ${endpoint}.`, fix);
19594
+ }
19595
+ async function bodyOf(response, endpoint, fix) {
19596
+ let raw;
19597
+ try {
19598
+ raw = await response.text();
19599
+ } catch {
19600
+ throw unreachable(endpoint, fix);
19601
+ }
19602
+ let body;
19603
+ try {
19604
+ body = JSON.parse(raw);
19605
+ } catch {
19606
+ return {};
19607
+ }
19608
+ return body !== null && typeof body === "object" && !Array.isArray(body) ? body : {};
19609
+ }
19610
+ async function fetchServerHealth() {
19611
+ const config = loadConfig();
19612
+ const endpoint = endpointOf(config.endpoint);
19613
+ const fix = `Check the endpoint ${endpoint} (mutagent config get endpoint) and your connection`;
19614
+ let response;
19615
+ try {
19616
+ response = await fetch(`${endpoint}/health`, {
19617
+ method: "GET",
19618
+ signal: AbortSignal.timeout(config.timeout)
19619
+ });
19620
+ } catch {
19621
+ throw unreachable(endpoint, fix);
19622
+ }
19623
+ if (!response.ok) {
19624
+ throw new MutagentError(`API_${String(response.status)}`, `The Mutagent server at ${endpoint} answered /health with HTTP ${String(response.status)}.`, fix);
19625
+ }
19626
+ const body = await bodyOf(response, endpoint, fix);
19627
+ const services = body.services !== null && typeof body.services === "object" ? body.services : {};
19628
+ return {
19629
+ endpoint,
19630
+ environment: text(body.environment),
19631
+ version: text(body.version),
19632
+ commit: typeof body.commit === "string" && body.commit.trim() !== "" ? body.commit : null,
19633
+ database: text(services.database)
19634
+ };
19635
+ }
19636
+
19584
19637
  // src/commands/workspaces.ts
19585
19638
  init_sdk_client();
19586
19639
  init_output();
@@ -19690,8 +19743,8 @@ function parse4(body) {
19690
19743
  } catch {}
19691
19744
  return {};
19692
19745
  }
19693
- var text = (value) => typeof value === "string" && value.trim() !== "" ? value : undefined;
19694
- var count = (value) => typeof value === "number" && Number.isFinite(value) ? String(value) : text(value);
19746
+ var text2 = (value) => typeof value === "string" && value.trim() !== "" ? value : undefined;
19747
+ var count = (value) => typeof value === "number" && Number.isFinite(value) ? String(value) : text2(value);
19695
19748
 
19696
19749
  class SandboxGrantRefusal extends MutagentError {
19697
19750
  grant;
@@ -19714,10 +19767,10 @@ class SecretRequiredError extends MutagentError {
19714
19767
  }
19715
19768
  }
19716
19769
  function grantRefusal(parsed) {
19717
- const grant = text(parsed.grant) ?? text(parsed.scope);
19718
- const reason = text(parsed.reason) ?? text(parsed.message) ?? "This session's token doesn't carry the permission this needs.";
19770
+ const grant = text2(parsed.grant) ?? text2(parsed.scope);
19771
+ const reason = text2(parsed.reason) ?? text2(parsed.message) ?? "This session's token doesn't carry the permission this needs.";
19719
19772
  const message = grant === undefined || reason.includes(grant) ? reason : `${reason} (permission: ${grant})`;
19720
- return new SandboxGrantRefusal(message, text(parsed.fix), grant);
19773
+ return new SandboxGrantRefusal(message, text2(parsed.fix), grant);
19721
19774
  }
19722
19775
 
19723
19776
  class TraceSourceRebindError extends MutagentError {
@@ -19734,10 +19787,10 @@ class TraceSourceRebindError extends MutagentError {
19734
19787
  }
19735
19788
  }
19736
19789
  function plainLine(raw) {
19737
- return text(raw?.replace(/[\u200b-\u200f\u202a-\u202e\u2066-\u2069\ufeff]/g, "").replace(/[\u0000-\u001f\u007f-\u009f]+/g, " ").trim());
19790
+ return text2(raw?.replace(/[\u200b-\u200f\u202a-\u202e\u2066-\u2069\ufeff]/g, "").replace(/[\u0000-\u001f\u007f-\u009f]+/g, " ").trim());
19738
19791
  }
19739
19792
  function configCap(parsed) {
19740
- const action = text(parsed.action) ?? "this change";
19793
+ const action = text2(parsed.action) ?? "this change";
19741
19794
  const limit = count(parsed.limit);
19742
19795
  const retryAfter = count(parsed.retryAfter);
19743
19796
  const reached = limit === undefined ? `This session reached its limit for ${action}.` : `This session reached its limit of ${limit} for ${action}.`;
@@ -19750,24 +19803,24 @@ function sandboxContractError(status, body) {
19750
19803
  const parsed = parse4(body);
19751
19804
  switch (parsed.code) {
19752
19805
  case SANDBOX_SCOPE:
19753
- return status === 403 && (text(parsed.grant) !== undefined || text(parsed.scope) !== undefined) ? grantRefusal(parsed) : undefined;
19806
+ return status === 403 && (text2(parsed.grant) !== undefined || text2(parsed.scope) !== undefined) ? grantRefusal(parsed) : undefined;
19754
19807
  case SANDBOX_TOKEN_NOT_SESSION:
19755
- return new MutagentError(SANDBOX_TOKEN_NOT_SESSION, NOT_SESSION_MESSAGE, text(parsed.fix));
19808
+ return new MutagentError(SANDBOX_TOKEN_NOT_SESSION, NOT_SESSION_MESSAGE, text2(parsed.fix));
19756
19809
  case SANDBOX_CONFIG_CAP:
19757
19810
  return status === 429 ? configCap(parsed) : undefined;
19758
19811
  case SECRET_REQUIRED: {
19759
- const setupUrl = text(parsed.setupUrl);
19812
+ const setupUrl = text2(parsed.setupUrl);
19760
19813
  if (setupUrl === undefined)
19761
19814
  return;
19762
- const fields = { expiresAt: text(parsed.expiresAt), secretName: text(parsed.secretName), linkId: text(parsed.linkId) };
19815
+ const fields = { expiresAt: text2(parsed.expiresAt), secretName: text2(parsed.secretName), linkId: text2(parsed.linkId) };
19763
19816
  const present = Object.fromEntries(Object.entries(fields).filter(([, v]) => v !== undefined));
19764
19817
  return new SecretRequiredError({ setupUrl, ...present });
19765
19818
  }
19766
19819
  case TRACE_SOURCE_REBIND_NEEDS_MEMBER: {
19767
- const confirmUrl = text(parsed.confirmUrl);
19820
+ const confirmUrl = text2(parsed.confirmUrl);
19768
19821
  if (confirmUrl === undefined)
19769
19822
  return;
19770
- return new TraceSourceRebindError(confirmUrl, text(parsed.requestId), plainLine(text(parsed.confirmHint)));
19823
+ return new TraceSourceRebindError(confirmUrl, text2(parsed.requestId), plainLine(text2(parsed.confirmHint)));
19771
19824
  }
19772
19825
  default:
19773
19826
  return;
@@ -19784,7 +19837,7 @@ function readOrgInstallations(value) {
19784
19837
  return value.map((item) => {
19785
19838
  const row = item !== null && typeof item === "object" ? item : {};
19786
19839
  const installationId = count(row.installationId) ?? count(row.id);
19787
- const accountName = text(row.accountName) ?? text(row.name);
19840
+ const accountName = text2(row.accountName) ?? text2(row.name);
19788
19841
  return { ...installationId === undefined ? {} : { installationId }, ...accountName === undefined ? {} : { accountName } };
19789
19842
  });
19790
19843
  }
@@ -19795,13 +19848,13 @@ function installationLabel(installation) {
19795
19848
  return installation.accountName ?? (installation.installationId === undefined ? "an installation" : `installation ${installation.installationId}`);
19796
19849
  }
19797
19850
  function readSandboxConnectStart(body) {
19798
- const installUrl = text(body.installUrl);
19799
- const attemptId = text(body.attemptId);
19851
+ const installUrl = text2(body.installUrl);
19852
+ const attemptId = text2(body.attemptId);
19800
19853
  switch (body.status) {
19801
19854
  case "install":
19802
19855
  return installUrl !== undefined && attemptId !== undefined ? { kind: "install", installUrl, attemptId } : undefined;
19803
19856
  case ALREADY_CONNECTED: {
19804
- const accountName = text(body.accountName);
19857
+ const accountName = text2(body.accountName);
19805
19858
  return { kind: "already-connected", ...accountName === undefined ? {} : { accountName } };
19806
19859
  }
19807
19860
  case USE_ORG_INSTALLATION: {
@@ -19825,12 +19878,12 @@ function readSandboxConnectStart(body) {
19825
19878
  return;
19826
19879
  }
19827
19880
  function triggerConfirmUrl(trigger) {
19828
- return trigger !== null && typeof trigger === "object" ? text(trigger.confirmUrl) : undefined;
19881
+ return trigger !== null && typeof trigger === "object" ? text2(trigger.confirmUrl) : undefined;
19829
19882
  }
19830
19883
  function triggerConfirmHint(trigger) {
19831
19884
  if (trigger === null || typeof trigger !== "object")
19832
19885
  return;
19833
- return plainLine(text(trigger.confirmHint));
19886
+ return plainLine(text2(trigger.confirmHint));
19834
19887
  }
19835
19888
 
19836
19889
  // src/lib/platform-sdk.ts
@@ -20329,6 +20382,7 @@ function createConfigCommand() {
20329
20382
  Examples:
20330
20383
  ${chalk9.dim("$")} mutagent config list
20331
20384
  ${chalk9.dim("$")} mutagent config get endpoint
20385
+ ${chalk9.dim("$")} mutagent config server
20332
20386
  ${chalk9.dim("$")} mutagent config set workspace <name|id> ${chalk9.dim("# Same as: mutagent workspaces use")}
20333
20387
  `);
20334
20388
  config.command("list").alias("ls").description("List all configuration").addHelpText("after", `
@@ -20426,6 +20480,38 @@ ${chalk9.dim("Another organization: sign in for it with mutagent login --org <id
20426
20480
  }
20427
20481
  });
20428
20482
  config.addCommand(set);
20483
+ config.command("server").description("Show the API deployment at the configured endpoint (from its /health)").addHelpText("after", `
20484
+ Examples:
20485
+ ${chalk9.dim("$")} mutagent config server
20486
+ ${chalk9.dim("$")} mutagent config server --json
20487
+
20488
+ Prints the endpoint and what its /health reports: environment, version, commit and database.
20489
+ No sign-in needed: the request carries no credential. A field the server does not report reads unknown.
20490
+
20491
+ AI Agent Directive:
20492
+ Run this to learn which deployment and build answer before reporting a server bug.
20493
+ --json returns { success, endpoint, environment, version, commit, database }; commit is the full SHA or null.
20494
+ REQUEST_FAILED means the endpoint did not answer; API_<status> means it answered with an error.
20495
+ `).action(async () => {
20496
+ const isJson = getJsonFlag(config);
20497
+ const output = new OutputFormatter(isJson ? "json" : "table");
20498
+ try {
20499
+ const health = await fetchServerHealth();
20500
+ if (isJson) {
20501
+ output.output({ success: true, ...health });
20502
+ } else {
20503
+ output.output({
20504
+ Endpoint: health.endpoint,
20505
+ Environment: health.environment,
20506
+ Version: health.version,
20507
+ Commit: health.commit === null ? "unknown" : health.commit.slice(0, 7),
20508
+ Database: health.database
20509
+ });
20510
+ }
20511
+ } catch (error) {
20512
+ handleError(error, isJson);
20513
+ }
20514
+ });
20429
20515
  return config;
20430
20516
  }
20431
20517
 
@@ -24477,6 +24563,7 @@ mutagent config get <key> --json # keys: apiKey, endpoint, format, ti
24477
24563
  # workspaceName, defaultOrganization, organizationName, keyScope
24478
24564
  mutagent config set workspace <name|id> --json # same as: mutagent workspaces use
24479
24565
  mutagent config set org <id|slug> --json # confirms the key's organization; another org exits 1
24566
+ mutagent config server --json # the API deployment at the endpoint: environment, version, commit, database (no credential sent)
24480
24567
  \`\`\`
24481
24568
 
24482
24569
  ---
@@ -40583,7 +40670,7 @@ function parseBody4(body) {
40583
40670
  } catch {}
40584
40671
  return {};
40585
40672
  }
40586
- var text2 = (v) => typeof v === "string" && v !== "" ? v : undefined;
40673
+ var text3 = (v) => typeof v === "string" && v !== "" ? v : undefined;
40587
40674
  function integrationsError(error, ctx) {
40588
40675
  if (error instanceof MutagentError)
40589
40676
  return error;
@@ -40601,15 +40688,15 @@ function integrationsError(error, ctx) {
40601
40688
  if (tenancy)
40602
40689
  return tenancy;
40603
40690
  const parsed = parseBody4(body);
40604
- const code = text2(parsed.code);
40605
- const reason = text2(parsed.reason);
40691
+ const code = text3(parsed.code);
40692
+ const reason = text3(parsed.reason);
40606
40693
  if (code !== undefined && reason !== undefined) {
40607
- return new MutagentError(code, reason, fixFor(code, text2(parsed.fix), ctx.call ?? {}));
40694
+ return new MutagentError(code, reason, fixFor(code, text3(parsed.fix), ctx.call ?? {}));
40608
40695
  }
40609
40696
  if (status === 422) {
40610
- return new MutagentError("VALIDATION_ERROR", text2(parsed.message) ?? "The server refused the request as invalid.", "Run: mutagent integrations sources <verb> --help");
40697
+ return new MutagentError("VALIDATION_ERROR", text3(parsed.message) ?? "The server refused the request as invalid.", "Run: mutagent integrations sources <verb> --help");
40611
40698
  }
40612
- const wrapped = new ApiError(status, text2(parsed.message) ?? text2(parsed.reason) ?? `Integrations request failed (HTTP ${String(status)}).`);
40699
+ const wrapped = new ApiError(status, text3(parsed.message) ?? text3(parsed.reason) ?? `Integrations request failed (HTTP ${String(status)}).`);
40613
40700
  wrapped.code = "REQUEST_FAILED";
40614
40701
  wrapped.suggestion = status >= 500 ? 'The server failed; run the command once more. If it fails again, report it: mutagent feedback send --category bug -m "integrations sources: HTTP ' + String(status) + '"' : "Run: mutagent integrations sources --help";
40615
40702
  return wrapped;
@@ -47291,4 +47378,4 @@ if (process.env.CLI_VERSION) {
47291
47378
  }
47292
47379
  runCli(process.argv.slice(2), cliVersion);
47293
47380
 
47294
- //# debugId=5086C5BE273BB98F64756E2164756E21
47381
+ //# debugId=232B0520DBC0BA6D64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutagent/cli",
3
- "version": "0.2.329",
3
+ "version": "0.2.330",
4
4
  "description": "Bun-native CLI for the Mutagent AI platform - auth, provider config, and lifecycle-tool installer for AI-native workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@inquirer/prompts": "^8.7.2",
56
- "@mutagent/sdk": "0.13.29",
56
+ "@mutagent/sdk": "0.13.30",
57
57
  "@sinclair/typebox": "^0.34.0",
58
58
  "chalk": "^5.3.0",
59
59
  "commander": "^12.1.0",
@@ -102,5 +102,5 @@
102
102
  "bugs": {
103
103
  "url": "https://docs.mutagent.io/support"
104
104
  },
105
- "gitHead": "3ffaa612b0d9a28d4883d15b3897738b618e7de6"
105
+ "gitHead": "ddb1300c3652a43e0ce888949c65ba028f8a73ec"
106
106
  }