@compass-ai/nova 1.0.32 → 1.0.33

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/cli.js CHANGED
@@ -30,7 +30,7 @@ Expecting one of '${s.join("', '")}'`);let c=`${t}Help`;return this.on(c,p=>{let
30
30
  `:`
31
31
  `)+i,c=s+1,s=n.indexOf(`
32
32
  `,c)}while(s!==-1);return p+=n.slice(c),p}var tSt=mr(()=>{});function Hre(n){return S8r(n)}var rSt,nSt,LYe,mB,Yre,iSt,hB,C8r,S8r,JYe,E8r,F8r,BYe,B1e,T8r,G8r,wDn,J,lp=mr(()=>{X3t();$3t();tSt();({stdout:rSt,stderr:nSt}=q3t),LYe=Symbol("GENERATOR"),mB=Symbol("STYLER"),Yre=Symbol("IS_EMPTY"),iSt=["ansi","ansi","ansi256","ansi16m"],hB=Object.create(null),C8r=(n,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let i=rSt?rSt.level:0;n.level=t.level===void 0?i:t.level},S8r=n=>{let t=(...i)=>i.join(" ");return C8r(t,n),Object.setPrototypeOf(t,Hre.prototype),t};Object.setPrototypeOf(Hre.prototype,Function.prototype);for(let[n,t]of Object.entries(WS))hB[n]={get(){let i=B1e(this,BYe(t.open,t.close,this[mB]),this[Yre]);return Object.defineProperty(this,n,{value:i}),i}};hB.visible={get(){let n=B1e(this,this[mB],!0);return Object.defineProperty(this,"visible",{value:n}),n}};JYe=(n,t,i,...s)=>n==="rgb"?t==="ansi16m"?WS[i].ansi16m(...s):t==="ansi256"?WS[i].ansi256(WS.rgbToAnsi256(...s)):WS[i].ansi(WS.rgbToAnsi(...s)):n==="hex"?JYe("rgb",t,i,...WS.hexToRgb(...s)):WS[i][n](...s),E8r=["rgb","hex","ansi256"];for(let n of E8r){hB[n]={get(){let{level:i}=this;return function(...s){let c=BYe(JYe(n,iSt[i],"color",...s),WS.color.close,this[mB]);return B1e(this,c,this[Yre])}}};let t="bg"+n[0].toUpperCase()+n.slice(1);hB[t]={get(){let{level:i}=this;return function(...s){let c=BYe(JYe(n,iSt[i],"bgColor",...s),WS.bgColor.close,this[mB]);return B1e(this,c,this[Yre])}}}}F8r=Object.defineProperties(()=>{},{...hB,level:{enumerable:!0,get(){return this[LYe].level},set(n){this[LYe].level=n}}}),BYe=(n,t,i)=>{let s,c;return i===void 0?(s=n,c=t):(s=i.openAll+n,c=t+i.closeAll),{open:n,close:t,openAll:s,closeAll:c,parent:i}},B1e=(n,t,i)=>{let s=(...c)=>T8r(s,c.length===1?""+c[0]:c.join(" "));return Object.setPrototypeOf(s,F8r),s[LYe]=n,s[mB]=t,s[Yre]=i,s},T8r=(n,t)=>{if(n.level<=0||!t)return n[Yre]?"":t;let i=n[mB];if(i===void 0)return t;let{openAll:s,closeAll:c}=i;if(t.includes("\x1B"))for(;i!==void 0;)t=K3t(t,i.close,i.open),i=i.parent;let p=t.indexOf(`
33
- `);return p!==-1&&(t=eSt(t,c,s,p)),s+t+c};Object.defineProperties(Hre.prototype,hB);G8r=Hre(),wDn=Hre({level:nSt?nSt.level:0}),J=G8r});var jYe,Bre,UYe=mr(()=>{"use strict";jYe="1.0.0",Bre={dataCollection:{title:"Data Collection",description:"Allow Compass to store conversation history and session data locally for improved functionality.",required:!0,defaultValue:!0},telemetry:{title:"Anonymous Telemetry",description:"Help improve Compass by sending anonymous usage statistics.",required:!1,defaultValue:!1},analytics:{title:"Analytics",description:"Allow collection of feature usage patterns to improve the product.",required:!1,defaultValue:!1},errorReporting:{title:"Error Reporting",description:"Automatically send error reports to help fix bugs.",required:!1,defaultValue:!0}}});function uSt(n,t=0){return(Fb[n[t+0]]+Fb[n[t+1]]+Fb[n[t+2]]+Fb[n[t+3]]+"-"+Fb[n[t+4]]+Fb[n[t+5]]+"-"+Fb[n[t+6]]+Fb[n[t+7]]+"-"+Fb[n[t+8]]+Fb[n[t+9]]+"-"+Fb[n[t+10]]+Fb[n[t+11]]+Fb[n[t+12]]+Fb[n[t+13]]+Fb[n[t+14]]+Fb[n[t+15]]).toLowerCase()}var Fb,pSt=mr(()=>{Fb=[];for(let n=0;n<256;++n)Fb.push((n+256).toString(16).slice(1))});import O8r from"node:crypto";function XYe(){return j1e>U1e.length-16&&(O8r.randomFillSync(U1e),j1e=0),U1e.slice(j1e,j1e+=16)}var U1e,j1e,dSt=mr(()=>{U1e=new Uint8Array(256),j1e=U1e.length});import Y8r from"node:crypto";var QYe,fSt=mr(()=>{QYe={randomUUID:Y8r.randomUUID}});function H8r(n,t,i){if(QYe.randomUUID&&!t&&!n)return QYe.randomUUID();n=n||{};let s=n.random||(n.rng||XYe)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,t){i=i||0;for(let c=0;c<16;++c)t[i+c]=s[c];return t}return uSt(s)}var ql,mSt=mr(()=>{fSt();dSt();pSt();ql=H8r});var Dx=mr(()=>{mSt()});var X1e,yB,jre,zYe,hSt,Q1e,_St,gSt,Ure,ySt,qYe,$Ye,eG,KYe,L8r,tR,tG,bSt,ISt,vSt,m_=mr(()=>{"use strict";X1e=".compass",yB=".compass",jre="config.json",zYe="session.json",hSt="consent.json",Q1e="credentials.enc",_St="logs",gSt="backups",Ure="saved-sessions",ySt="index",qYe="commands",$Ye="agents",eG="claude-sonnet-4-5-20250929",KYe="haiku",L8r="banner",tR={anthropic:{model:eG,maxTokens:16384,temperature:.6},project:{rootDir:process.cwd(),ignorePatterns:["node_modules/**",".git/**","dist/**","build/**","out/**","coverage/**",".next/**",".nuxt/**",".output/**","*.log",".env*","*.lock","package-lock.json","yarn.lock","pnpm-lock.yaml",".DS_Store","Thumbs.db","*.min.js","*.min.css","*.map",".compass/**"],includePatterns:["**/*"],maxFileSize:1048576,indexOnStartup:!0},safety:{requireApproval:!0,autoApprovePatterns:[],blockedPatterns:[".env*","*.key","*.pem","*.p12","*.pfx","secrets/**","**/secrets/**","**/*.secret","**/credentials*","**/password*"],maxFilesPerOperation:50,backupBeforeModify:!0,shellCommandTimeout:3e4,allowedShellCommands:["npm","npx","yarn","pnpm","git","node","tsc","eslint","prettier","jest","vitest","mocha","cargo","rustc","go","python","python3","pip","pip3","poetry","make","cmake","gradle","mvn","docker","kubectl","terraform","aws","gcloud","az","cat","ls","pwd","echo","head","tail","grep","find","wc","sort","uniq","diff","tree"],blockedShellCommands:["rm -rf /","rm -rf /*","rm -rf ~","rm -rf ~/*","sudo rm -rf",":(){:|:&};:","mkfs","dd if=/dev/zero","dd if=/dev/random","> /dev/sda","chmod -R 777 /","chown -R","wget | sh","curl | sh","wget | bash","curl | bash"]},ui:{theme:"auto",showTokenUsage:!0,showTimestamps:!1,compactMode:!1,animationsEnabled:!0,colorOutput:!0},session:{autoSave:!0,autoSaveInterval:6e4,maxHistoryLength:100,autoCompactThreshold:5e4,sessionExpiryDays:30},update:{checkOnStartup:!0,checkInterval:24,showNotifications:!0,notificationStyle:L8r,includePrerelease:!1},agentic:{maxIterations:200,costWarningThreshold:5,costHardCap:0,autoCompactAtPercent:80,stuckDetectionEnabled:!0,stuckDetectionThreshold:3,maxIterationsPerTask:50}},tG={API_KEY:"ANTHROPIC_API_KEY",COMPASS_API_KEY:"COMPASS_API_KEY",MODEL:"COMPASS_MODEL",CONFIG_PATH:"COMPASS_CONFIG",DEBUG:"COMPASS_DEBUG",NO_COLOR:"NO_COLOR",FORCE_COLOR:"FORCE_COLOR",HOME:"HOME",USERPROFILE:"USERPROFILE"},bSt="1.0.32",ISt=["package-lock.json","yarn.lock","pnpm-lock.yaml","composer.lock","Gemfile.lock","poetry.lock","Cargo.lock","go.sum","*.map","*.js.map","*.css.map","*.min.js","*.min.css","*.bundle.js","*.chunk.js","*.sql","*.csv","**/__snapshots__/**","**/fixtures/**/*.json","*.d.ts.map"],vSt=["node_modules",".git","dist","build","out","coverage",".next",".nuxt",".output",".cache",".parcel-cache","vendor","__pycache__",".pytest_cache","target","bin","obj"]});import T6 from"path";import J8r from"os";function al(){return T6.join(J8r.homedir(),X1e)}function Hu(n){let t=n||process.cwd();return T6.join(t,yB)}function bB(n,t){let i=T6.resolve(t),s=T6.resolve(i,n);return s!==i&&!s.startsWith(i+T6.sep)?null:s}function DZ(n,t){let i=T6.resolve(t),s=T6.resolve(n);return s===i||s.startsWith(i+T6.sep)}function xSt(n,t){return T6.relative(t,n)}function NZ(n){return n.replace(/\\/g,"/")}function z1e(n,t){let i=NZ(n);for(let s of t)if(B8r(s).test(i))return!0;return!1}function B8r(n){let t=n.replace(/[.+^${}()|[\]\\]/g,"\\$&");return t=t.replace(/\*\*/g,"{{GLOBSTAR}}"),t=t.replace(/\*/g,"[^/]*"),t=t.replace(/\?/g,"[^/]"),t=t.replace(/{{GLOBSTAR}}/g,".*"),new RegExp(`^${t}$`)}function eHe(...n){return T6.resolve(...n)}var dm=mr(()=>{"use strict";m_()});var Ty=Ue(tHe=>{"use strict";tHe.fromCallback=function(n){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")n.apply(this,t);else return new Promise((i,s)=>{t.push((c,p)=>c!=null?s(c):i(p)),n.apply(this,t)})},"name",{value:n.name})};tHe.fromPromise=function(n){return Object.defineProperty(function(...t){let i=t[t.length-1];if(typeof i!="function")return n.apply(this,t);t.pop(),n.apply(this,t).then(s=>i(null,s),i)},"name",{value:n.name})}});var ASt=Ue((tNn,wSt)=>{var rR=Fi("constants"),j8r=process.cwd,q1e=null,U8r=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return q1e||(q1e=j8r.call(process)),q1e};try{process.cwd()}catch{}typeof process.chdir=="function"&&(rHe=process.chdir,process.chdir=function(n){q1e=null,rHe.call(process,n)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,rHe));var rHe;wSt.exports=X8r;function X8r(n){rR.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(n),n.lutimes||i(n),n.chown=p(n.chown),n.fchown=p(n.fchown),n.lchown=p(n.lchown),n.chmod=s(n.chmod),n.fchmod=s(n.fchmod),n.lchmod=s(n.lchmod),n.chownSync=m(n.chownSync),n.fchownSync=m(n.fchownSync),n.lchownSync=m(n.lchownSync),n.chmodSync=c(n.chmodSync),n.fchmodSync=c(n.fchmodSync),n.lchmodSync=c(n.lchmodSync),n.stat=b(n.stat),n.fstat=b(n.fstat),n.lstat=b(n.lstat),n.statSync=x(n.statSync),n.fstatSync=x(n.fstatSync),n.lstatSync=x(n.lstatSync),n.chmod&&!n.lchmod&&(n.lchmod=function(F,Z,T){T&&process.nextTick(T)},n.lchmodSync=function(){}),n.chown&&!n.lchown&&(n.lchown=function(F,Z,T,V){V&&process.nextTick(V)},n.lchownSync=function(){}),U8r==="win32"&&(n.rename=typeof n.rename!="function"?n.rename:(function(F){function Z(T,V,P){var L=Date.now(),ae=0;F(T,V,function fe(Me){if(Me&&(Me.code==="EACCES"||Me.code==="EPERM"||Me.code==="EBUSY")&&Date.now()-L<6e4){setTimeout(function(){n.stat(V,function(gt,dt){gt&&gt.code==="ENOENT"?F(T,V,fe):P(Me)})},ae),ae<100&&(ae+=10);return}P&&P(Me)})}return Object.setPrototypeOf&&Object.setPrototypeOf(Z,F),Z})(n.rename)),n.read=typeof n.read!="function"?n.read:(function(F){function Z(T,V,P,L,ae,fe){var Me;if(fe&&typeof fe=="function"){var gt=0;Me=function(dt,zt,Tt){if(dt&&dt.code==="EAGAIN"&&gt<10)return gt++,F.call(n,T,V,P,L,ae,Me);fe.apply(this,arguments)}}return F.call(n,T,V,P,L,ae,Me)}return Object.setPrototypeOf&&Object.setPrototypeOf(Z,F),Z})(n.read),n.readSync=typeof n.readSync!="function"?n.readSync:(function(F){return function(Z,T,V,P,L){for(var ae=0;;)try{return F.call(n,Z,T,V,P,L)}catch(fe){if(fe.code==="EAGAIN"&&ae<10){ae++;continue}throw fe}}})(n.readSync);function t(F){F.lchmod=function(Z,T,V){F.open(Z,rR.O_WRONLY|rR.O_SYMLINK,T,function(P,L){if(P){V&&V(P);return}F.fchmod(L,T,function(ae){F.close(L,function(fe){V&&V(ae||fe)})})})},F.lchmodSync=function(Z,T){var V=F.openSync(Z,rR.O_WRONLY|rR.O_SYMLINK,T),P=!0,L;try{L=F.fchmodSync(V,T),P=!1}finally{if(P)try{F.closeSync(V)}catch{}else F.closeSync(V)}return L}}function i(F){rR.hasOwnProperty("O_SYMLINK")&&F.futimes?(F.lutimes=function(Z,T,V,P){F.open(Z,rR.O_SYMLINK,function(L,ae){if(L){P&&P(L);return}F.futimes(ae,T,V,function(fe){F.close(ae,function(Me){P&&P(fe||Me)})})})},F.lutimesSync=function(Z,T,V){var P=F.openSync(Z,rR.O_SYMLINK),L,ae=!0;try{L=F.futimesSync(P,T,V),ae=!1}finally{if(ae)try{F.closeSync(P)}catch{}else F.closeSync(P)}return L}):F.futimes&&(F.lutimes=function(Z,T,V,P){P&&process.nextTick(P)},F.lutimesSync=function(){})}function s(F){return F&&function(Z,T,V){return F.call(n,Z,T,function(P){E(P)&&(P=null),V&&V.apply(this,arguments)})}}function c(F){return F&&function(Z,T){try{return F.call(n,Z,T)}catch(V){if(!E(V))throw V}}}function p(F){return F&&function(Z,T,V,P){return F.call(n,Z,T,V,function(L){E(L)&&(L=null),P&&P.apply(this,arguments)})}}function m(F){return F&&function(Z,T,V){try{return F.call(n,Z,T,V)}catch(P){if(!E(P))throw P}}}function b(F){return F&&function(Z,T,V){typeof T=="function"&&(V=T,T=null);function P(L,ae){ae&&(ae.uid<0&&(ae.uid+=4294967296),ae.gid<0&&(ae.gid+=4294967296)),V&&V.apply(this,arguments)}return T?F.call(n,Z,T,P):F.call(n,Z,P)}}function x(F){return F&&function(Z,T){var V=T?F.call(n,Z,T):F.call(n,Z);return V&&(V.uid<0&&(V.uid+=4294967296),V.gid<0&&(V.gid+=4294967296)),V}}function E(F){if(!F||F.code==="ENOSYS")return!0;var Z=!process.getuid||process.getuid()!==0;return!!(Z&&(F.code==="EINVAL"||F.code==="EPERM"))}}});var SSt=Ue((rNn,CSt)=>{var kSt=Fi("stream").Stream;CSt.exports=Q8r;function Q8r(n){return{ReadStream:t,WriteStream:i};function t(s,c){if(!(this instanceof t))return new t(s,c);kSt.call(this);var p=this;this.path=s,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,c=c||{};for(var m=Object.keys(c),b=0,x=m.length;b<x;b++){var E=m[b];this[E]=c[E]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){p._read()});return}n.open(this.path,this.flags,this.mode,function(F,Z){if(F){p.emit("error",F),p.readable=!1;return}p.fd=Z,p.emit("open",Z),p._read()})}function i(s,c){if(!(this instanceof i))return new i(s,c);kSt.call(this),this.path=s,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,c=c||{};for(var p=Object.keys(c),m=0,b=p.length;m<b;m++){var x=p[m];this[x]=c[x]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=n.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var FSt=Ue((nNn,ESt)=>{"use strict";ESt.exports=q8r;var z8r=Object.getPrototypeOf||function(n){return n.__proto__};function q8r(n){if(n===null||typeof n!="object")return n;if(n instanceof Object)var t={__proto__:z8r(n)};else var t=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}),t}});var WZ=Ue((iNn,sHe)=>{var Q_=Fi("fs"),$8r=ASt(),K8r=SSt(),e7r=FSt(),$1e=Fi("util"),Tb,eye;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Tb=Symbol.for("graceful-fs.queue"),eye=Symbol.for("graceful-fs.previous")):(Tb="___graceful-fs.queue",eye="___graceful-fs.previous");function t7r(){}function DSt(n,t){Object.defineProperty(n,Tb,{get:function(){return t}})}var RZ=t7r;$1e.debuglog?RZ=$1e.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(RZ=function(){var n=$1e.format.apply($1e,arguments);n="GFS4: "+n.split(/\n/).join(`
33
+ `);return p!==-1&&(t=eSt(t,c,s,p)),s+t+c};Object.defineProperties(Hre.prototype,hB);G8r=Hre(),wDn=Hre({level:nSt?nSt.level:0}),J=G8r});var jYe,Bre,UYe=mr(()=>{"use strict";jYe="1.0.0",Bre={dataCollection:{title:"Data Collection",description:"Allow Compass to store conversation history and session data locally for improved functionality.",required:!0,defaultValue:!0},telemetry:{title:"Anonymous Telemetry",description:"Help improve Compass by sending anonymous usage statistics.",required:!1,defaultValue:!1},analytics:{title:"Analytics",description:"Allow collection of feature usage patterns to improve the product.",required:!1,defaultValue:!1},errorReporting:{title:"Error Reporting",description:"Automatically send error reports to help fix bugs.",required:!1,defaultValue:!0}}});function uSt(n,t=0){return(Fb[n[t+0]]+Fb[n[t+1]]+Fb[n[t+2]]+Fb[n[t+3]]+"-"+Fb[n[t+4]]+Fb[n[t+5]]+"-"+Fb[n[t+6]]+Fb[n[t+7]]+"-"+Fb[n[t+8]]+Fb[n[t+9]]+"-"+Fb[n[t+10]]+Fb[n[t+11]]+Fb[n[t+12]]+Fb[n[t+13]]+Fb[n[t+14]]+Fb[n[t+15]]).toLowerCase()}var Fb,pSt=mr(()=>{Fb=[];for(let n=0;n<256;++n)Fb.push((n+256).toString(16).slice(1))});import O8r from"node:crypto";function XYe(){return j1e>U1e.length-16&&(O8r.randomFillSync(U1e),j1e=0),U1e.slice(j1e,j1e+=16)}var U1e,j1e,dSt=mr(()=>{U1e=new Uint8Array(256),j1e=U1e.length});import Y8r from"node:crypto";var QYe,fSt=mr(()=>{QYe={randomUUID:Y8r.randomUUID}});function H8r(n,t,i){if(QYe.randomUUID&&!t&&!n)return QYe.randomUUID();n=n||{};let s=n.random||(n.rng||XYe)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,t){i=i||0;for(let c=0;c<16;++c)t[i+c]=s[c];return t}return uSt(s)}var ql,mSt=mr(()=>{fSt();dSt();pSt();ql=H8r});var Dx=mr(()=>{mSt()});var X1e,yB,jre,zYe,hSt,Q1e,_St,gSt,Ure,ySt,qYe,$Ye,eG,KYe,L8r,tR,tG,bSt,ISt,vSt,m_=mr(()=>{"use strict";X1e=".compass",yB=".compass",jre="config.json",zYe="session.json",hSt="consent.json",Q1e="credentials.enc",_St="logs",gSt="backups",Ure="saved-sessions",ySt="index",qYe="commands",$Ye="agents",eG="claude-sonnet-4-5-20250929",KYe="haiku",L8r="banner",tR={anthropic:{model:eG,maxTokens:16384,temperature:.6},project:{rootDir:process.cwd(),ignorePatterns:["node_modules/**",".git/**","dist/**","build/**","out/**","coverage/**",".next/**",".nuxt/**",".output/**","*.log",".env*","*.lock","package-lock.json","yarn.lock","pnpm-lock.yaml",".DS_Store","Thumbs.db","*.min.js","*.min.css","*.map",".compass/**"],includePatterns:["**/*"],maxFileSize:1048576,indexOnStartup:!0},safety:{requireApproval:!0,autoApprovePatterns:[],blockedPatterns:[".env*","*.key","*.pem","*.p12","*.pfx","secrets/**","**/secrets/**","**/*.secret","**/credentials*","**/password*"],maxFilesPerOperation:50,backupBeforeModify:!0,shellCommandTimeout:3e4,allowedShellCommands:["npm","npx","yarn","pnpm","git","node","tsc","eslint","prettier","jest","vitest","mocha","cargo","rustc","go","python","python3","pip","pip3","poetry","make","cmake","gradle","mvn","docker","kubectl","terraform","aws","gcloud","az","cat","ls","pwd","echo","head","tail","grep","find","wc","sort","uniq","diff","tree"],blockedShellCommands:["rm -rf /","rm -rf /*","rm -rf ~","rm -rf ~/*","sudo rm -rf",":(){:|:&};:","mkfs","dd if=/dev/zero","dd if=/dev/random","> /dev/sda","chmod -R 777 /","chown -R","wget | sh","curl | sh","wget | bash","curl | bash"]},ui:{theme:"auto",showTokenUsage:!0,showTimestamps:!1,compactMode:!1,animationsEnabled:!0,colorOutput:!0},session:{autoSave:!0,autoSaveInterval:6e4,maxHistoryLength:100,autoCompactThreshold:5e4,sessionExpiryDays:30},update:{checkOnStartup:!0,checkInterval:24,showNotifications:!0,notificationStyle:L8r,includePrerelease:!1},agentic:{maxIterations:200,costWarningThreshold:5,costHardCap:0,autoCompactAtPercent:80,stuckDetectionEnabled:!0,stuckDetectionThreshold:3,maxIterationsPerTask:50}},tG={API_KEY:"ANTHROPIC_API_KEY",COMPASS_API_KEY:"COMPASS_API_KEY",MODEL:"COMPASS_MODEL",CONFIG_PATH:"COMPASS_CONFIG",DEBUG:"COMPASS_DEBUG",NO_COLOR:"NO_COLOR",FORCE_COLOR:"FORCE_COLOR",HOME:"HOME",USERPROFILE:"USERPROFILE"},bSt="1.0.33",ISt=["package-lock.json","yarn.lock","pnpm-lock.yaml","composer.lock","Gemfile.lock","poetry.lock","Cargo.lock","go.sum","*.map","*.js.map","*.css.map","*.min.js","*.min.css","*.bundle.js","*.chunk.js","*.sql","*.csv","**/__snapshots__/**","**/fixtures/**/*.json","*.d.ts.map"],vSt=["node_modules",".git","dist","build","out","coverage",".next",".nuxt",".output",".cache",".parcel-cache","vendor","__pycache__",".pytest_cache","target","bin","obj"]});import T6 from"path";import J8r from"os";function al(){return T6.join(J8r.homedir(),X1e)}function Hu(n){let t=n||process.cwd();return T6.join(t,yB)}function bB(n,t){let i=T6.resolve(t),s=T6.resolve(i,n);return s!==i&&!s.startsWith(i+T6.sep)?null:s}function DZ(n,t){let i=T6.resolve(t),s=T6.resolve(n);return s===i||s.startsWith(i+T6.sep)}function xSt(n,t){return T6.relative(t,n)}function NZ(n){return n.replace(/\\/g,"/")}function z1e(n,t){let i=NZ(n);for(let s of t)if(B8r(s).test(i))return!0;return!1}function B8r(n){let t=n.replace(/[.+^${}()|[\]\\]/g,"\\$&");return t=t.replace(/\*\*/g,"{{GLOBSTAR}}"),t=t.replace(/\*/g,"[^/]*"),t=t.replace(/\?/g,"[^/]"),t=t.replace(/{{GLOBSTAR}}/g,".*"),new RegExp(`^${t}$`)}function eHe(...n){return T6.resolve(...n)}var dm=mr(()=>{"use strict";m_()});var Ty=Ue(tHe=>{"use strict";tHe.fromCallback=function(n){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")n.apply(this,t);else return new Promise((i,s)=>{t.push((c,p)=>c!=null?s(c):i(p)),n.apply(this,t)})},"name",{value:n.name})};tHe.fromPromise=function(n){return Object.defineProperty(function(...t){let i=t[t.length-1];if(typeof i!="function")return n.apply(this,t);t.pop(),n.apply(this,t).then(s=>i(null,s),i)},"name",{value:n.name})}});var ASt=Ue((tNn,wSt)=>{var rR=Fi("constants"),j8r=process.cwd,q1e=null,U8r=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return q1e||(q1e=j8r.call(process)),q1e};try{process.cwd()}catch{}typeof process.chdir=="function"&&(rHe=process.chdir,process.chdir=function(n){q1e=null,rHe.call(process,n)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,rHe));var rHe;wSt.exports=X8r;function X8r(n){rR.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(n),n.lutimes||i(n),n.chown=p(n.chown),n.fchown=p(n.fchown),n.lchown=p(n.lchown),n.chmod=s(n.chmod),n.fchmod=s(n.fchmod),n.lchmod=s(n.lchmod),n.chownSync=m(n.chownSync),n.fchownSync=m(n.fchownSync),n.lchownSync=m(n.lchownSync),n.chmodSync=c(n.chmodSync),n.fchmodSync=c(n.fchmodSync),n.lchmodSync=c(n.lchmodSync),n.stat=b(n.stat),n.fstat=b(n.fstat),n.lstat=b(n.lstat),n.statSync=x(n.statSync),n.fstatSync=x(n.fstatSync),n.lstatSync=x(n.lstatSync),n.chmod&&!n.lchmod&&(n.lchmod=function(F,Z,T){T&&process.nextTick(T)},n.lchmodSync=function(){}),n.chown&&!n.lchown&&(n.lchown=function(F,Z,T,V){V&&process.nextTick(V)},n.lchownSync=function(){}),U8r==="win32"&&(n.rename=typeof n.rename!="function"?n.rename:(function(F){function Z(T,V,P){var L=Date.now(),ae=0;F(T,V,function fe(Me){if(Me&&(Me.code==="EACCES"||Me.code==="EPERM"||Me.code==="EBUSY")&&Date.now()-L<6e4){setTimeout(function(){n.stat(V,function(gt,dt){gt&&gt.code==="ENOENT"?F(T,V,fe):P(Me)})},ae),ae<100&&(ae+=10);return}P&&P(Me)})}return Object.setPrototypeOf&&Object.setPrototypeOf(Z,F),Z})(n.rename)),n.read=typeof n.read!="function"?n.read:(function(F){function Z(T,V,P,L,ae,fe){var Me;if(fe&&typeof fe=="function"){var gt=0;Me=function(dt,zt,Tt){if(dt&&dt.code==="EAGAIN"&&gt<10)return gt++,F.call(n,T,V,P,L,ae,Me);fe.apply(this,arguments)}}return F.call(n,T,V,P,L,ae,Me)}return Object.setPrototypeOf&&Object.setPrototypeOf(Z,F),Z})(n.read),n.readSync=typeof n.readSync!="function"?n.readSync:(function(F){return function(Z,T,V,P,L){for(var ae=0;;)try{return F.call(n,Z,T,V,P,L)}catch(fe){if(fe.code==="EAGAIN"&&ae<10){ae++;continue}throw fe}}})(n.readSync);function t(F){F.lchmod=function(Z,T,V){F.open(Z,rR.O_WRONLY|rR.O_SYMLINK,T,function(P,L){if(P){V&&V(P);return}F.fchmod(L,T,function(ae){F.close(L,function(fe){V&&V(ae||fe)})})})},F.lchmodSync=function(Z,T){var V=F.openSync(Z,rR.O_WRONLY|rR.O_SYMLINK,T),P=!0,L;try{L=F.fchmodSync(V,T),P=!1}finally{if(P)try{F.closeSync(V)}catch{}else F.closeSync(V)}return L}}function i(F){rR.hasOwnProperty("O_SYMLINK")&&F.futimes?(F.lutimes=function(Z,T,V,P){F.open(Z,rR.O_SYMLINK,function(L,ae){if(L){P&&P(L);return}F.futimes(ae,T,V,function(fe){F.close(ae,function(Me){P&&P(fe||Me)})})})},F.lutimesSync=function(Z,T,V){var P=F.openSync(Z,rR.O_SYMLINK),L,ae=!0;try{L=F.futimesSync(P,T,V),ae=!1}finally{if(ae)try{F.closeSync(P)}catch{}else F.closeSync(P)}return L}):F.futimes&&(F.lutimes=function(Z,T,V,P){P&&process.nextTick(P)},F.lutimesSync=function(){})}function s(F){return F&&function(Z,T,V){return F.call(n,Z,T,function(P){E(P)&&(P=null),V&&V.apply(this,arguments)})}}function c(F){return F&&function(Z,T){try{return F.call(n,Z,T)}catch(V){if(!E(V))throw V}}}function p(F){return F&&function(Z,T,V,P){return F.call(n,Z,T,V,function(L){E(L)&&(L=null),P&&P.apply(this,arguments)})}}function m(F){return F&&function(Z,T,V){try{return F.call(n,Z,T,V)}catch(P){if(!E(P))throw P}}}function b(F){return F&&function(Z,T,V){typeof T=="function"&&(V=T,T=null);function P(L,ae){ae&&(ae.uid<0&&(ae.uid+=4294967296),ae.gid<0&&(ae.gid+=4294967296)),V&&V.apply(this,arguments)}return T?F.call(n,Z,T,P):F.call(n,Z,P)}}function x(F){return F&&function(Z,T){var V=T?F.call(n,Z,T):F.call(n,Z);return V&&(V.uid<0&&(V.uid+=4294967296),V.gid<0&&(V.gid+=4294967296)),V}}function E(F){if(!F||F.code==="ENOSYS")return!0;var Z=!process.getuid||process.getuid()!==0;return!!(Z&&(F.code==="EINVAL"||F.code==="EPERM"))}}});var SSt=Ue((rNn,CSt)=>{var kSt=Fi("stream").Stream;CSt.exports=Q8r;function Q8r(n){return{ReadStream:t,WriteStream:i};function t(s,c){if(!(this instanceof t))return new t(s,c);kSt.call(this);var p=this;this.path=s,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,c=c||{};for(var m=Object.keys(c),b=0,x=m.length;b<x;b++){var E=m[b];this[E]=c[E]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){p._read()});return}n.open(this.path,this.flags,this.mode,function(F,Z){if(F){p.emit("error",F),p.readable=!1;return}p.fd=Z,p.emit("open",Z),p._read()})}function i(s,c){if(!(this instanceof i))return new i(s,c);kSt.call(this),this.path=s,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,c=c||{};for(var p=Object.keys(c),m=0,b=p.length;m<b;m++){var x=p[m];this[x]=c[x]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=n.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var FSt=Ue((nNn,ESt)=>{"use strict";ESt.exports=q8r;var z8r=Object.getPrototypeOf||function(n){return n.__proto__};function q8r(n){if(n===null||typeof n!="object")return n;if(n instanceof Object)var t={__proto__:z8r(n)};else var t=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}),t}});var WZ=Ue((iNn,sHe)=>{var Q_=Fi("fs"),$8r=ASt(),K8r=SSt(),e7r=FSt(),$1e=Fi("util"),Tb,eye;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Tb=Symbol.for("graceful-fs.queue"),eye=Symbol.for("graceful-fs.previous")):(Tb="___graceful-fs.queue",eye="___graceful-fs.previous");function t7r(){}function DSt(n,t){Object.defineProperty(n,Tb,{get:function(){return t}})}var RZ=t7r;$1e.debuglog?RZ=$1e.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(RZ=function(){var n=$1e.format.apply($1e,arguments);n="GFS4: "+n.split(/\n/).join(`
34
34
  GFS4: `),console.error(n)});Q_[Tb]||(TSt=global[Tb]||[],DSt(Q_,TSt),Q_.close=(function(n){function t(i,s){return n.call(Q_,i,function(c){c||GSt(),typeof s=="function"&&s.apply(this,arguments)})}return Object.defineProperty(t,eye,{value:n}),t})(Q_.close),Q_.closeSync=(function(n){function t(i){n.apply(Q_,arguments),GSt()}return Object.defineProperty(t,eye,{value:n}),t})(Q_.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){RZ(Q_[Tb]),Fi("assert").equal(Q_[Tb].length,0)}));var TSt;global[Tb]||DSt(global,Q_[Tb]);sHe.exports=nHe(e7r(Q_));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Q_.__patched&&(sHe.exports=nHe(Q_),Q_.__patched=!0);function nHe(n){$8r(n),n.gracefulify=nHe,n.createReadStream=zt,n.createWriteStream=Tt;var t=n.readFile;n.readFile=i;function i(er,Rr,Sr){return typeof Rr=="function"&&(Sr=Rr,Rr=null),Jn(er,Rr,Sr);function Jn(Nr,Vt,dn,ai){return t(Nr,Vt,function(Qt){Qt&&(Qt.code==="EMFILE"||Qt.code==="ENFILE")?IB([Jn,[Nr,Vt,dn],Qt,ai||Date.now(),Date.now()]):typeof dn=="function"&&dn.apply(this,arguments)})}}var s=n.writeFile;n.writeFile=c;function c(er,Rr,Sr,Jn){return typeof Sr=="function"&&(Jn=Sr,Sr=null),Nr(er,Rr,Sr,Jn);function Nr(Vt,dn,ai,Qt,ns){return s(Vt,dn,ai,function(ni){ni&&(ni.code==="EMFILE"||ni.code==="ENFILE")?IB([Nr,[Vt,dn,ai,Qt],ni,ns||Date.now(),Date.now()]):typeof Qt=="function"&&Qt.apply(this,arguments)})}}var p=n.appendFile;p&&(n.appendFile=m);function m(er,Rr,Sr,Jn){return typeof Sr=="function"&&(Jn=Sr,Sr=null),Nr(er,Rr,Sr,Jn);function Nr(Vt,dn,ai,Qt,ns){return p(Vt,dn,ai,function(ni){ni&&(ni.code==="EMFILE"||ni.code==="ENFILE")?IB([Nr,[Vt,dn,ai,Qt],ni,ns||Date.now(),Date.now()]):typeof Qt=="function"&&Qt.apply(this,arguments)})}}var b=n.copyFile;b&&(n.copyFile=x);function x(er,Rr,Sr,Jn){return typeof Sr=="function"&&(Jn=Sr,Sr=0),Nr(er,Rr,Sr,Jn);function Nr(Vt,dn,ai,Qt,ns){return b(Vt,dn,ai,function(ni){ni&&(ni.code==="EMFILE"||ni.code==="ENFILE")?IB([Nr,[Vt,dn,ai,Qt],ni,ns||Date.now(),Date.now()]):typeof Qt=="function"&&Qt.apply(this,arguments)})}}var E=n.readdir;n.readdir=Z;var F=/^v[0-5]\./;function Z(er,Rr,Sr){typeof Rr=="function"&&(Sr=Rr,Rr=null);var Jn=F.test(process.version)?function(dn,ai,Qt,ns){return E(dn,Nr(dn,ai,Qt,ns))}:function(dn,ai,Qt,ns){return E(dn,ai,Nr(dn,ai,Qt,ns))};return Jn(er,Rr,Sr);function Nr(Vt,dn,ai,Qt){return function(ns,ni){ns&&(ns.code==="EMFILE"||ns.code==="ENFILE")?IB([Jn,[Vt,dn,ai],ns,Qt||Date.now(),Date.now()]):(ni&&ni.sort&&ni.sort(),typeof ai=="function"&&ai.call(this,ns,ni))}}}if(process.version.substr(0,4)==="v0.8"){var T=K8r(n);fe=T.ReadStream,gt=T.WriteStream}var V=n.ReadStream;V&&(fe.prototype=Object.create(V.prototype),fe.prototype.open=Me);var P=n.WriteStream;P&&(gt.prototype=Object.create(P.prototype),gt.prototype.open=dt),Object.defineProperty(n,"ReadStream",{get:function(){return fe},set:function(er){fe=er},enumerable:!0,configurable:!0}),Object.defineProperty(n,"WriteStream",{get:function(){return gt},set:function(er){gt=er},enumerable:!0,configurable:!0});var L=fe;Object.defineProperty(n,"FileReadStream",{get:function(){return L},set:function(er){L=er},enumerable:!0,configurable:!0});var ae=gt;Object.defineProperty(n,"FileWriteStream",{get:function(){return ae},set:function(er){ae=er},enumerable:!0,configurable:!0});function fe(er,Rr){return this instanceof fe?(V.apply(this,arguments),this):fe.apply(Object.create(fe.prototype),arguments)}function Me(){var er=this;fn(er.path,er.flags,er.mode,function(Rr,Sr){Rr?(er.autoClose&&er.destroy(),er.emit("error",Rr)):(er.fd=Sr,er.emit("open",Sr),er.read())})}function gt(er,Rr){return this instanceof gt?(P.apply(this,arguments),this):gt.apply(Object.create(gt.prototype),arguments)}function dt(){var er=this;fn(er.path,er.flags,er.mode,function(Rr,Sr){Rr?(er.destroy(),er.emit("error",Rr)):(er.fd=Sr,er.emit("open",Sr))})}function zt(er,Rr){return new n.ReadStream(er,Rr)}function Tt(er,Rr){return new n.WriteStream(er,Rr)}var Ut=n.open;n.open=fn;function fn(er,Rr,Sr,Jn){return typeof Sr=="function"&&(Jn=Sr,Sr=null),Nr(er,Rr,Sr,Jn);function Nr(Vt,dn,ai,Qt,ns){return Ut(Vt,dn,ai,function(ni,Po){ni&&(ni.code==="EMFILE"||ni.code==="ENFILE")?IB([Nr,[Vt,dn,ai,Qt],ni,ns||Date.now(),Date.now()]):typeof Qt=="function"&&Qt.apply(this,arguments)})}}return n}function IB(n){RZ("ENQUEUE",n[0].name,n[1]),Q_[Tb].push(n),iHe()}var K1e;function GSt(){for(var n=Date.now(),t=0;t<Q_[Tb].length;++t)Q_[Tb][t].length>2&&(Q_[Tb][t][3]=n,Q_[Tb][t][4]=n);iHe()}function iHe(){if(clearTimeout(K1e),K1e=void 0,Q_[Tb].length!==0){var n=Q_[Tb].shift(),t=n[0],i=n[1],s=n[2],c=n[3],p=n[4];if(c===void 0)RZ("RETRY",t.name,i),t.apply(null,i);else if(Date.now()-c>=6e4){RZ("TIMEOUT",t.name,i);var m=i.pop();typeof m=="function"&&m.call(null,s)}else{var b=Date.now()-p,x=Math.max(p-c,1),E=Math.min(x*1.2,100);b>=E?(RZ("RETRY",t.name,i),t.apply(null,i.concat([c]))):Q_[Tb].push(n)}K1e===void 0&&(K1e=setTimeout(iHe,0))}}});var tv=Ue(rG=>{"use strict";var NSt=Ty().fromCallback,ev=WZ(),r7r=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(n=>typeof ev[n]=="function");Object.assign(rG,ev);r7r.forEach(n=>{rG[n]=NSt(ev[n])});rG.exists=function(n,t){return typeof t=="function"?ev.exists(n,t):new Promise(i=>ev.exists(n,i))};rG.read=function(n,t,i,s,c,p){return typeof p=="function"?ev.read(n,t,i,s,c,p):new Promise((m,b)=>{ev.read(n,t,i,s,c,(x,E,F)=>{if(x)return b(x);m({bytesRead:E,buffer:F})})})};rG.write=function(n,t,...i){return typeof i[i.length-1]=="function"?ev.write(n,t,...i):new Promise((s,c)=>{ev.write(n,t,...i,(p,m,b)=>{if(p)return c(p);s({bytesWritten:m,buffer:b})})})};rG.readv=function(n,t,...i){return typeof i[i.length-1]=="function"?ev.readv(n,t,...i):new Promise((s,c)=>{ev.readv(n,t,...i,(p,m,b)=>{if(p)return c(p);s({bytesRead:m,buffers:b})})})};rG.writev=function(n,t,...i){return typeof i[i.length-1]=="function"?ev.writev(n,t,...i):new Promise((s,c)=>{ev.writev(n,t,...i,(p,m,b)=>{if(p)return c(p);s({bytesWritten:m,buffers:b})})})};typeof ev.realpath.native=="function"?rG.realpath.native=NSt(ev.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var WSt=Ue((aNn,RSt)=>{"use strict";var n7r=Fi("path");RSt.exports.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(n7r.parse(t).root,""))){let s=new Error(`Path contains invalid characters: ${t}`);throw s.code="EINVAL",s}}});var MSt=Ue((oNn,aHe)=>{"use strict";var VSt=tv(),{checkPath:ZSt}=WSt(),PSt=n=>{let t={mode:511};return typeof n=="number"?n:{...t,...n}.mode};aHe.exports.makeDir=async(n,t)=>(ZSt(n),VSt.mkdir(n,{mode:PSt(t),recursive:!0}));aHe.exports.makeDirSync=(n,t)=>(ZSt(n),VSt.mkdirSync(n,{mode:PSt(t),recursive:!0}))});var ZS=Ue((cNn,OSt)=>{"use strict";var i7r=Ty().fromPromise,{makeDir:s7r,makeDirSync:oHe}=MSt(),cHe=i7r(s7r);OSt.exports={mkdirs:cHe,mkdirsSync:oHe,mkdirp:cHe,mkdirpSync:oHe,ensureDir:cHe,ensureDirSync:oHe}});var nR=Ue((lNn,HSt)=>{"use strict";var a7r=Ty().fromPromise,YSt=tv();function o7r(n){return YSt.access(n).then(()=>!0).catch(()=>!1)}HSt.exports={pathExists:a7r(o7r),pathExistsSync:YSt.existsSync}});var lHe=Ue((uNn,LSt)=>{"use strict";var vB=tv(),c7r=Ty().fromPromise;async function l7r(n,t,i){let s=await vB.open(n,"r+"),c=null;try{await vB.futimes(s,t,i)}finally{try{await vB.close(s)}catch(p){c=p}}if(c)throw c}function u7r(n,t,i){let s=vB.openSync(n,"r+");return vB.futimesSync(s,t,i),vB.closeSync(s)}LSt.exports={utimesMillis:c7r(l7r),utimesMillisSync:u7r}});var VZ=Ue((pNn,USt)=>{"use strict";var xB=tv(),Gy=Fi("path"),JSt=Ty().fromPromise;function p7r(n,t,i){let s=i.dereference?c=>xB.stat(c,{bigint:!0}):c=>xB.lstat(c,{bigint:!0});return Promise.all([s(n),s(t).catch(c=>{if(c.code==="ENOENT")return null;throw c})]).then(([c,p])=>({srcStat:c,destStat:p}))}function d7r(n,t,i){let s,c=i.dereference?m=>xB.statSync(m,{bigint:!0}):m=>xB.lstatSync(m,{bigint:!0}),p=c(n);try{s=c(t)}catch(m){if(m.code==="ENOENT")return{srcStat:p,destStat:null};throw m}return{srcStat:p,destStat:s}}async function f7r(n,t,i,s){let{srcStat:c,destStat:p}=await p7r(n,t,s);if(p){if(Xre(c,p)){let m=Gy.basename(n),b=Gy.basename(t);if(i==="move"&&m!==b&&m.toLowerCase()===b.toLowerCase())return{srcStat:c,destStat:p,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(c.isDirectory()&&!p.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${n}'.`);if(!c.isDirectory()&&p.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${n}'.`)}if(c.isDirectory()&&uHe(n,t))throw new Error(tye(n,t,i));return{srcStat:c,destStat:p}}function m7r(n,t,i,s){let{srcStat:c,destStat:p}=d7r(n,t,s);if(p){if(Xre(c,p)){let m=Gy.basename(n),b=Gy.basename(t);if(i==="move"&&m!==b&&m.toLowerCase()===b.toLowerCase())return{srcStat:c,destStat:p,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(c.isDirectory()&&!p.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${n}'.`);if(!c.isDirectory()&&p.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${n}'.`)}if(c.isDirectory()&&uHe(n,t))throw new Error(tye(n,t,i));return{srcStat:c,destStat:p}}async function BSt(n,t,i,s){let c=Gy.resolve(Gy.dirname(n)),p=Gy.resolve(Gy.dirname(i));if(p===c||p===Gy.parse(p).root)return;let m;try{m=await xB.stat(p,{bigint:!0})}catch(b){if(b.code==="ENOENT")return;throw b}if(Xre(t,m))throw new Error(tye(n,i,s));return BSt(n,t,p,s)}function jSt(n,t,i,s){let c=Gy.resolve(Gy.dirname(n)),p=Gy.resolve(Gy.dirname(i));if(p===c||p===Gy.parse(p).root)return;let m;try{m=xB.statSync(p,{bigint:!0})}catch(b){if(b.code==="ENOENT")return;throw b}if(Xre(t,m))throw new Error(tye(n,i,s));return jSt(n,t,p,s)}function Xre(n,t){return t.ino!==void 0&&t.dev!==void 0&&t.ino===n.ino&&t.dev===n.dev}function uHe(n,t){let i=Gy.resolve(n).split(Gy.sep).filter(c=>c),s=Gy.resolve(t).split(Gy.sep).filter(c=>c);return i.every((c,p)=>s[p]===c)}function tye(n,t,i){return`Cannot ${i} '${n}' to a subdirectory of itself, '${t}'.`}USt.exports={checkPaths:JSt(f7r),checkPathsSync:m7r,checkParentPaths:JSt(BSt),checkParentPathsSync:jSt,isSrcSubdir:uHe,areIdentical:Xre}});var QSt=Ue((dNn,XSt)=>{"use strict";async function h7r(n,t){let i=[];for await(let s of n)i.push(t(s).then(()=>null,c=>c??new Error("unknown error")));await Promise.all(i.map(s=>s.then(c=>{if(c!==null)throw c})))}XSt.exports={asyncIteratorConcurrentProcess:h7r}});var eEt=Ue((fNn,KSt)=>{"use strict";var MI=tv(),Qre=Fi("path"),{mkdirs:_7r}=ZS(),{pathExists:g7r}=nR(),{utimesMillis:y7r}=lHe(),zre=VZ(),{asyncIteratorConcurrentProcess:b7r}=QSt();async function I7r(n,t,i={}){typeof i=="function"&&(i={filter:i}),i.clobber="clobber"in i?!!i.clobber:!0,i.overwrite="overwrite"in i?!!i.overwrite:i.clobber,i.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
35
35
 
36
36
  see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:s,destStat:c}=await zre.checkPaths(n,t,"copy",i);if(await zre.checkParentPaths(n,s,t,"copy"),!await qSt(n,t,i))return;let m=Qre.dirname(t);await g7r(m)||await _7r(m),await $St(c,n,t,i)}async function qSt(n,t,i){return i.filter?i.filter(n,t):!0}async function $St(n,t,i,s){let p=await(s.dereference?MI.stat:MI.lstat)(t);if(p.isDirectory())return A7r(p,n,t,i,s);if(p.isFile()||p.isCharacterDevice()||p.isBlockDevice())return v7r(p,n,t,i,s);if(p.isSymbolicLink())return k7r(n,t,i,s);throw p.isSocket()?new Error(`Cannot copy a socket file: ${t}`):p.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}async function v7r(n,t,i,s,c){if(!t)return zSt(n,i,s,c);if(c.overwrite)return await MI.unlink(s),zSt(n,i,s,c);if(c.errorOnExist)throw new Error(`'${s}' already exists`)}async function zSt(n,t,i,s){if(await MI.copyFile(t,i),s.preserveTimestamps){x7r(n.mode)&&await w7r(i,n.mode);let c=await MI.stat(t);await y7r(i,c.atime,c.mtime)}return MI.chmod(i,n.mode)}function x7r(n){return(n&128)===0}function w7r(n,t){return MI.chmod(n,t|128)}async function A7r(n,t,i,s,c){t||await MI.mkdir(s),await b7r(await MI.opendir(i),async p=>{let m=Qre.join(i,p.name),b=Qre.join(s,p.name);if(await qSt(m,b,c)){let{destStat:E}=await zre.checkPaths(m,b,"copy",c);await $St(E,m,b,c)}}),t||await MI.chmod(s,n.mode)}async function k7r(n,t,i,s){let c=await MI.readlink(t);if(s.dereference&&(c=Qre.resolve(process.cwd(),c)),!n)return MI.symlink(c,i);let p=null;try{p=await MI.readlink(i)}catch(m){if(m.code==="EINVAL"||m.code==="UNKNOWN")return MI.symlink(c,i);throw m}if(s.dereference&&(p=Qre.resolve(process.cwd(),p)),c!==p){if(zre.isSrcSubdir(c,p))throw new Error(`Cannot copy '${c}' to a subdirectory of itself, '${p}'.`);if(zre.isSrcSubdir(p,c))throw new Error(`Cannot overwrite '${p}' with '${c}'.`)}return await MI.unlink(i),MI.symlink(c,i)}KSt.exports=I7r});var sEt=Ue((mNn,iEt)=>{"use strict";var rv=WZ(),qre=Fi("path"),C7r=ZS().mkdirsSync,S7r=lHe().utimesMillisSync,$re=VZ();function E7r(n,t,i){typeof i=="function"&&(i={filter:i}),i=i||{},i.clobber="clobber"in i?!!i.clobber:!0,i.overwrite="overwrite"in i?!!i.overwrite:i.clobber,i.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
@@ -2966,7 +2966,7 @@ ${hon}
2966
2966
  Try running with %s or get access `,J.cyan("sudo"))+`
2967
2967
  to the local update config store via
2968
2968
  `+J.cyan(mKe(" sudo chown -R $USER:$(id -gn $USER) %s ",TU));IM.on("exit",()=>{console.error(qG(i,{textAlignment:"center"}))})}}check(){!this.config||this.config.get("optOut")||this.#i||(this.update=this.config.get("update"),this.update&&(this.update.current=this.#r,this.config.delete("update")),!(Date.now()-this.config.get("lastUpdateCheck")<this.#n)&&Zpn(IM.execPath,[EXt.join(Mpn,"check.js"),JSON.stringify(this.#t)],{detached:!0,stdio:"ignore"}).unref())}async fetchInfo(){let{distTag:t}=this.#t,i=await sKe(this._packageName,{version:t});return{latest:i,current:this.#r,type:(0,FXt.default)(this.#r,i)??t,name:this._packageName}}notify(t){let i=!this._shouldNotifyInNpmScript&&fXt;if(!IM.stdout.isTTY||i||!this.update||!(0,TXt.default)(this.update.latest,this.update.current))return this;t={isGlobal:AXt,...t};let s=t.isGlobal?`npm i -g ${this._packageName}`:`npm i ${this._packageName}`,c="Update available "+J.dim("{currentVersion}")+J.reset(" \u2192 ")+J.green("{latestVersion}")+`
2969
- Run `+J.cyan("{updateCommand}")+" to update",p=t.message||c;t.boxenOptions??={padding:1,margin:1,textAlignment:"center",borderColor:"yellow",borderStyle:"round"};let m=qG(fKe(p,{packageName:this._packageName,currentVersion:this.update.current,latestVersion:this.update.latest,updateCommand:s}),t.boxenOptions);return t.defer===!1?console.error(m):IM.on("exit",()=>{console.error(m)}),this}};function hKe(n){let t=new _ae(n);return t.check(),t}lp();var cwe=Ea(tKe(),1);lie();dm();Md();na();import{readFile as Ypn}from"fs/promises";import bKe from"path";import{fileURLToPath as Hpn}from"url";var GXt="@compass-ai/nova",DXt="1.0.32",NXt="1.0.0",Lpn=Hpn(import.meta.url),Jpn=bKe.dirname(Lpn),_Ke=bKe.resolve(Jpn,"../../package.json"),Bpn="update-cache.json",jpn={checkOnStartup:!0,checkInterval:24,showNotifications:!0,notificationStyle:"banner",includePrerelease:!1},yKe=class n{config;cache;cacheFilePath;packageJson;constructor(t,i){this.config=t,this.packageJson=i,this.cacheFilePath=bKe.join(al(),Bpn),this.cache={history:[],cacheVersion:NXt}}static async create(t){let i={...jpn,...t},s={name:GXt,version:DXt};try{if(j.debug("Update service: resolving package.json",{path:_Ke}),await la(_Ke)){let p=await Ypn(_Ke,"utf-8"),m=JSON.parse(p);s={name:m.name||GXt,version:m.version||DXt},j.debug("Update service: loaded package.json",{name:s.name,version:s.version,source:"package.json"})}else j.debug("Update service: package.json not found, using fallback",{name:s.name,version:s.version,source:"fallback"})}catch(p){j.debug("Update service: failed to read package.json, using fallback",{error:p instanceof Error?p.message:"unknown error",name:s.name,version:s.version})}let c=new n(i,s);return await c.loadCache(),c}async loadCache(){try{if(await kc(al()),await la(this.cacheFilePath)){let t=await Pm(this.cacheFilePath);t&&t.cacheVersion===NXt&&(this.cache=t)}}catch(t){j.debug("Failed to load update cache",t)}}async saveCache(){try{await kc(al()),await p0(this.cacheFilePath,this.cache)}catch(t){j.debug("Failed to save update cache",t)}}async checkForUpdates(t=!1){let i={updateAvailable:!1,currentVersion:this.packageJson.version,checkedAt:new Date().toISOString()};try{if(!t&&this.cache.lastCheck)if(this.cache.lastCheck.currentVersion!==this.packageJson.version)j.debug("Cache invalidated - installed version changed",{cachedVersion:this.cache.lastCheck.currentVersion,installedVersion:this.packageJson.version});else{let p=new Date(this.cache.lastCheck.checkedAt).getTime(),m=this.config.checkInterval*60*60*1e3;if(Date.now()-p<m)return j.debug("Skipping update check - within interval"),this.cache.lastCheck}j.debug("Checking for updates...");let c=await hKe({pkg:this.packageJson,updateCheckInterval:0}).fetchInfo();return c&&c.latest&&cwe.default.gt(c.latest,this.packageJson.version)?(i.updateAvailable=!0,i.latestVersion=c.latest,i.updateType=this.mapUpdateType(c.type||"patch"),i.releaseNotesUrl=`https://dev.azure.com/oakpeak-devops/Kore/_git/Kore-CLI?version=GTv${c.latest}`,!this.config.includePrerelease&&cwe.default.prerelease(c.latest)&&(i.updateAvailable=!1,i.latestVersion=void 0,i.updateType=void 0)):c&&c.latest&&cwe.default.lt(c.latest,this.packageJson.version)&&j.debug("Current version is newer than npm registry",{currentVersion:this.packageJson.version,registryVersion:c.latest}),this.cache.lastCheck=i,await this.saveCache(),i}catch(s){return i.error=s instanceof Error?s.message:"Failed to check for updates",j.debug("Update check failed",s),i}}mapUpdateType(t){switch(t){case"major":return"major";case"minor":return"minor";case"patch":return"patch";case"prerelease":return"prerelease";default:return"patch"}}displayUpdateNotification(t){if(!t.updateAvailable||!t.latestVersion||!this.config.showNotifications||this.config.notificationStyle==="silent")return;let i=this.formatNotification(t);console.log(i),this.updateNotificationState(t.latestVersion)}formatNotification(t){let{currentVersion:i,latestVersion:s,updateType:c}=t;switch(this.config.notificationStyle){case"minimal":return this.formatMinimalNotification(i,s,c);case"detailed":return this.formatDetailedNotification(i,s,c,t.releaseNotesUrl);default:return this.formatBannerNotification(i,s,c)}}formatMinimalNotification(t,i,s){let c=this.getUpdateTypeColor(s);return J.gray(`Update available: ${t} -> `)+c(i)+J.gray(` (npm i -g ${this.packageJson.name})`)}formatBannerNotification(t,i,s){let c=this.getUpdateTypeColor(s),p=s?` (${s})`:"",m=[`Update available! ${J.dim(t)} ${J.reset("\u2192")} ${c(i)}${J.dim(p)}`,"",`Run ${J.cyan(`npm i -g ${this.packageJson.name}`)} to update`].join(`
2969
+ Run `+J.cyan("{updateCommand}")+" to update",p=t.message||c;t.boxenOptions??={padding:1,margin:1,textAlignment:"center",borderColor:"yellow",borderStyle:"round"};let m=qG(fKe(p,{packageName:this._packageName,currentVersion:this.update.current,latestVersion:this.update.latest,updateCommand:s}),t.boxenOptions);return t.defer===!1?console.error(m):IM.on("exit",()=>{console.error(m)}),this}};function hKe(n){let t=new _ae(n);return t.check(),t}lp();var cwe=Ea(tKe(),1);lie();dm();Md();na();import{readFile as Ypn}from"fs/promises";import bKe from"path";import{fileURLToPath as Hpn}from"url";var GXt="@compass-ai/nova",DXt="1.0.33",NXt="1.0.0",Lpn=Hpn(import.meta.url),Jpn=bKe.dirname(Lpn),_Ke=bKe.resolve(Jpn,"../../package.json"),Bpn="update-cache.json",jpn={checkOnStartup:!0,checkInterval:24,showNotifications:!0,notificationStyle:"banner",includePrerelease:!1},yKe=class n{config;cache;cacheFilePath;packageJson;constructor(t,i){this.config=t,this.packageJson=i,this.cacheFilePath=bKe.join(al(),Bpn),this.cache={history:[],cacheVersion:NXt}}static async create(t){let i={...jpn,...t},s={name:GXt,version:DXt};try{if(j.debug("Update service: resolving package.json",{path:_Ke}),await la(_Ke)){let p=await Ypn(_Ke,"utf-8"),m=JSON.parse(p);s={name:m.name||GXt,version:m.version||DXt},j.debug("Update service: loaded package.json",{name:s.name,version:s.version,source:"package.json"})}else j.debug("Update service: package.json not found, using fallback",{name:s.name,version:s.version,source:"fallback"})}catch(p){j.debug("Update service: failed to read package.json, using fallback",{error:p instanceof Error?p.message:"unknown error",name:s.name,version:s.version})}let c=new n(i,s);return await c.loadCache(),c}async loadCache(){try{if(await kc(al()),await la(this.cacheFilePath)){let t=await Pm(this.cacheFilePath);t&&t.cacheVersion===NXt&&(this.cache=t)}}catch(t){j.debug("Failed to load update cache",t)}}async saveCache(){try{await kc(al()),await p0(this.cacheFilePath,this.cache)}catch(t){j.debug("Failed to save update cache",t)}}async checkForUpdates(t=!1){let i={updateAvailable:!1,currentVersion:this.packageJson.version,checkedAt:new Date().toISOString()};try{if(!t&&this.cache.lastCheck)if(this.cache.lastCheck.currentVersion!==this.packageJson.version)j.debug("Cache invalidated - installed version changed",{cachedVersion:this.cache.lastCheck.currentVersion,installedVersion:this.packageJson.version});else{let p=new Date(this.cache.lastCheck.checkedAt).getTime(),m=this.config.checkInterval*60*60*1e3;if(Date.now()-p<m)return j.debug("Skipping update check - within interval"),this.cache.lastCheck}j.debug("Checking for updates...");let c=await hKe({pkg:this.packageJson,updateCheckInterval:0}).fetchInfo();return c&&c.latest&&cwe.default.gt(c.latest,this.packageJson.version)?(i.updateAvailable=!0,i.latestVersion=c.latest,i.updateType=this.mapUpdateType(c.type||"patch"),i.releaseNotesUrl=`https://dev.azure.com/oakpeak-devops/Kore/_git/Kore-CLI?version=GTv${c.latest}`,!this.config.includePrerelease&&cwe.default.prerelease(c.latest)&&(i.updateAvailable=!1,i.latestVersion=void 0,i.updateType=void 0)):c&&c.latest&&cwe.default.lt(c.latest,this.packageJson.version)&&j.debug("Current version is newer than npm registry",{currentVersion:this.packageJson.version,registryVersion:c.latest}),this.cache.lastCheck=i,await this.saveCache(),i}catch(s){return i.error=s instanceof Error?s.message:"Failed to check for updates",j.debug("Update check failed",s),i}}mapUpdateType(t){switch(t){case"major":return"major";case"minor":return"minor";case"patch":return"patch";case"prerelease":return"prerelease";default:return"patch"}}displayUpdateNotification(t){if(!t.updateAvailable||!t.latestVersion||!this.config.showNotifications||this.config.notificationStyle==="silent")return;let i=this.formatNotification(t);console.log(i),this.updateNotificationState(t.latestVersion)}formatNotification(t){let{currentVersion:i,latestVersion:s,updateType:c}=t;switch(this.config.notificationStyle){case"minimal":return this.formatMinimalNotification(i,s,c);case"detailed":return this.formatDetailedNotification(i,s,c,t.releaseNotesUrl);default:return this.formatBannerNotification(i,s,c)}}formatMinimalNotification(t,i,s){let c=this.getUpdateTypeColor(s);return J.gray(`Update available: ${t} -> `)+c(i)+J.gray(` (npm i -g ${this.packageJson.name})`)}formatBannerNotification(t,i,s){let c=this.getUpdateTypeColor(s),p=s?` (${s})`:"",m=[`Update available! ${J.dim(t)} ${J.reset("\u2192")} ${c(i)}${J.dim(p)}`,"",`Run ${J.cyan(`npm i -g ${this.packageJson.name}`)} to update`].join(`
2970
2970
  `);return qG(m,{padding:1,margin:1,borderStyle:"round",borderColor:this.getUpdateTypeBorderColor(s),title:"Compass CLI Update",titleAlignment:"center"})}formatDetailedNotification(t,i,s,c){let p=this.getUpdateTypeColor(s),m=s?s.charAt(0).toUpperCase()+s.slice(1):"New",b=["",J.bold.cyan(` ${m} Update Available!`),"",` ${J.gray("Current version:")} ${t}`,` ${J.gray("Latest version:")} ${p(i)}`,""];c&&(b.push(` ${J.gray("Release notes:")} ${J.underline.blue(c)}`),b.push("")),b.push(` ${J.gray("To update, run:")} ${J.cyan(`npm i -g ${this.packageJson.name}`)}`),b.push("");let x=b.join(`
2971
2971
  `);return qG(x,{padding:0,margin:1,borderStyle:"double",borderColor:this.getUpdateTypeBorderColor(s)})}getUpdateTypeColor(t){switch(t){case"major":return J.red;case"minor":return J.yellow;case"patch":return J.green;case"prerelease":return J.magenta;default:return J.cyan}}getUpdateTypeBorderColor(t){switch(t){case"major":return"red";case"minor":return"yellow";case"patch":return"green";case"prerelease":return"magenta";default:return"cyan"}}async updateNotificationState(t){let i=this.cache.notificationState;i&&i.version===t?i.showCount++:this.cache.notificationState={version:t,notifiedAt:new Date().toISOString(),dismissed:!1,showCount:1},await this.saveCache()}async dismissNotification(){this.cache.notificationState&&(this.cache.notificationState.dismissed=!0,this.cache.notificationState.dismissedAt=new Date().toISOString(),await this.saveCache())}async performUpdate(t="npm"){let i=await this.checkForUpdates(!0);if(!i.updateAvailable||!i.latestVersion)return j.output(J.green("You are already on the latest version!")),!0;let s=this.packageJson.version,c=i.latestVersion;j.output(""),j.output(J.cyan(`Updating Compass CLI from ${s} to ${c}...`)),j.output("");try{let p=this.getUpdateCommand(t);j.output(J.gray(`Running: ${p}`)),j.output("");let{stdout:m}=await Nx(p,{shell:!0});return m&&j.output(m),await this.recordUpdateHistory(s,c,!0,t),j.output(""),j.output(J.green(`Successfully updated to version ${c}!`)),j.output(J.gray("Please restart Compass CLI to use the new version.")),j.output(""),!0}catch(p){let m=p instanceof Error?p.message:"Update failed";return await this.recordUpdateHistory(s,c,!1,t,m),j.output(""),j.output(J.red(`Update failed: ${m}`)),j.output(""),j.output(J.gray("You can try updating manually:")),j.output(J.cyan(` ${this.getUpdateCommand(t)}`)),j.output(""),!1}}getUpdateCommand(t){let i=this.packageJson.name;switch(t){case"yarn":return`yarn global add ${i}`;case"pnpm":return`pnpm add -g ${i}`;default:return`npm install -g ${i}`}}async recordUpdateHistory(t,i,s,c,p){let m={fromVersion:t,toVersion:i,updatedAt:new Date().toISOString(),success:s,method:c,error:p};this.cache.history.push(m),this.cache.history.length>10&&(this.cache.history=this.cache.history.slice(-10)),s&&(this.cache.notificationState=void 0),await this.saveCache()}getUpdateHistory(){return[...this.cache.history]}getLastCheckResult(){return this.cache.lastCheck}getConfig(){return{...this.config}}async updateConfig(t){this.config={...this.config,...t}}getVersionInfo(){return{currentVersion:this.packageJson.version,packageName:this.packageJson.name,lastCheck:this.cache.lastCheck,updateAvailable:this.cache.lastCheck?.updateAvailable??!1,latestVersion:this.cache.lastCheck?.latestVersion}}async detectPackageManager(){try{let{stdout:t}=await Nx("yarn",["global","list","--depth=0"],{shell:!0,reject:!1});if(t&&t.includes(this.packageJson.name))return"yarn"}catch{}try{let{stdout:t}=await Nx("pnpm",["list","-g","--depth=0"],{shell:!0,reject:!1});if(t&&t.includes(this.packageJson.name))return"pnpm"}catch{}return"npm"}},gKe=null;async function t9(n){return gKe||(gKe=await yKe.create(n)),gKe}async function RXt(n){j.debug("Auto-update: starting startup update check");let t=await t9(n),i=t.getVersionInfo();try{let s=await t.checkForUpdates();if(j.debug("Auto-update: check completed",{updateAvailable:s.updateAvailable,currentVersion:s.currentVersion,latestVersion:s.latestVersion}),!s.updateAvailable||!s.latestVersion)return j.debug("Auto-update: no update available"),{updated:!1};let c=i.currentVersion,p=s.latestVersion,m=await t.detectPackageManager();return j.debug("Auto-update: detected package manager",{packageManager:m}),await t.performUpdate(m)?{updated:!0,fromVersion:c,toVersion:p}:(j.debug("Auto-update: update failed"),{updated:!1,error:"Update failed, continuing with current version"})}catch(s){let c=s instanceof Error?s.message:"Unknown error";return j.debug("Auto-update: error during update",{error:c}),console.log(J.yellow(`\u26A0 Auto-update check failed: ${c}`)),console.log(J.dim(` You can manually update with: npm i -g ${i.packageName}`)),console.log(""),{updated:!1,error:c}}}na();Bf();function tp(n,t=!1){let i=ma();j.debug(`[updateHandler] Emitting output: ${n.substring(0,50)}`),i.emit("slash-command-output",{command:"update",message:n,isError:t})}function Upn(n){switch(n){case"major":return J.red;case"minor":return J.yellow;case"patch":return J.green;case"prerelease":return J.magenta;default:return J.cyan}}function Xpn(n){switch(n){case"major":return"red";case"minor":return"yellow";case"patch":return"green";case"prerelease":return"magenta";default:return"cyan"}}async function Qpn(n){if(!n.updateAvailable||!n.latestVersion)return;let i=(await t9()).getVersionInfo(),s=Upn(n.updateType),c=n.updateType?` (${n.updateType})`:"",p=[`Update available! ${J.dim(n.currentVersion)} ${J.reset("\u2192")} ${s(n.latestVersion)}${J.dim(c)}`,"",`Run ${J.cyan(`npm i -g ${i.packageName}`)} to update`].join(`
2972
2972
  `),m=qG(p,{padding:1,margin:1,borderStyle:"round",borderColor:Xpn(n.updateType),title:"Compass CLI Update",titleAlignment:"center"});tp(m)}function zpn(n){let t={check:!1,history:!1,force:!1,install:!1,version:!1,help:!1};for(let i=0;i<n.length;i++){let s=n[i].toLowerCase();switch(s){case"check":case"-c":case"--check":t.check=!0;break;case"history":case"-h":case"--history":t.history=!0;break;case"--force":case"-f":t.force=!0;break;case"install":case"-i":case"--install":t.install=!0;break;case"--npm":t.manager="npm";break;case"--yarn":t.manager="yarn";break;case"--pnpm":t.manager="pnpm";break;case"version":case"-v":case"--version":t.version=!0;break;case"help":case"--help":t.help=!0;break;default:s==="now"&&(t.install=!0);break}}return!t.history&&!t.install&&!t.version&&!t.help&&(t.check=!0),t}function qpn(){let n=["",J.bold.cyan("Update Command"),J.dim("\u2500".repeat(40)),"",J.white("Check for and install updates to Compass CLI."),"",J.bold("Usage:"),` ${J.cyan("/update")} Check for updates`,` ${J.cyan("/update check")} Check for updates (same as above)`,` ${J.cyan("/update install")} Install available update`,` ${J.cyan("/update now")} Install update immediately`,` ${J.cyan("/update history")} Show update history`,` ${J.cyan("/update version")} Show version information`,"",J.bold("Options:"),` ${J.yellow("--force, -f")} Force check (ignore interval)`,` ${J.yellow("--npm")} Use npm for installation`,` ${J.yellow("--yarn")} Use yarn for installation`,` ${J.yellow("--pnpm")} Use pnpm for installation`,"",J.bold("Examples:"),` ${J.gray("/update")} # Check if update is available`,` ${J.gray("/update install --yarn")} # Install with yarn`,` ${J.gray("/update -f")} # Force update check`,""];tp(n.join(`
@@ -3129,7 +3129,7 @@ Examples:
3129
3129
 
3130
3130
  ${J.gray("# Remove a server")}
3131
3131
  compass mcp remove notion
3132
- `);return n.command("add <name> [urlOrCommand] [args...]").description("Add a new MCP server").requiredOption("-t, --transport <type>","Transport type (http, sse, or stdio)").option("-s, --scope <scope>","Configuration scope (local, project, or user)","local").option("-H, --header <header...>","HTTP headers (key: value format)").option("-e, --env <env...>","Environment variables (KEY=value format)").action(async(t,i,s,c)=>{try{let p=c.transport.toLowerCase();["http","sse","stdio"].includes(p)||(console.log(J.red(`Invalid transport type: ${c.transport}`)),console.log(J.gray("Valid types: http, sse, stdio")),process.exit(1)),i||(console.log(J.red("URL or command is required")),process.exit(1));let m=c.scope.toLowerCase();["local","project","user"].includes(m)||(console.log(J.red(`Invalid scope: ${c.scope}`)),console.log(J.gray("Valid scopes: local, project, user")),process.exit(1));let b;if(c.header){b={};for(let Z of c.header){let T=Z.indexOf(":");if(T>0){let V=Z.substring(0,T).trim(),P=Z.substring(T+1).trim();b[V]=P}}}let x=c.env?M9n(c.env):void 0,E=Zb();await E.load(process.cwd());let F=await E.addServer({transport:p,name:t,urlOrCommand:i,args:p==="stdio"?s:void 0,scope:m,headers:b,env:x},process.cwd());F.success?(console.log(""),console.log(J.green(`Added MCP server '${t}'`)),console.log(J.gray(` Transport: ${bst(p)}`)),console.log(J.gray(` Scope: ${Ist(m)}`)),console.log(p==="stdio"?J.gray(` Command: ${i} ${s.join(" ")}`):J.gray(` URL: ${i}`)),console.log("")):(console.log(J.red(`Failed to add server: ${F.error}`)),process.exit(1))}catch(p){let m=p instanceof Error?p.message:String(p);j.error("MCP add command failed",p),console.log(J.red(`Failed to add server: ${m}`)),process.exit(1)}}),n.command("add-json <name> <json>").description("Add an MCP server from JSON configuration").option("-s, --scope <scope>","Configuration scope (local, project, or user)","local").action(async(t,i,s)=>{try{let c=s.scope.toLowerCase();["local","project","user"].includes(c)||(console.log(J.red(`Invalid scope: ${s.scope}`)),process.exit(1));let p=Zb();await p.load(process.cwd());let m=await p.addServerFromJson(t,i,c,process.cwd());m.success?console.log(J.green(`Added MCP server '${t}' from JSON configuration`)):(console.log(J.red(`Failed to add server: ${m.error}`)),process.exit(1))}catch(c){let p=c instanceof Error?c.message:String(c);j.error("MCP add-json command failed",c),console.log(J.red(`Failed to add server: ${p}`)),process.exit(1)}}),n.command("list").alias("ls").description("List all configured MCP servers").option("-v, --verbose","Show detailed information").action(async t=>{try{let i=Zb();await i.load(process.cwd());let s=i.getAllServers(process.cwd());if(s.length===0){console.log(""),console.log(J.gray("No MCP servers configured.")),console.log(""),console.log(J.gray("Add a server with:")),console.log(J.gray(" compass mcp add --transport http <name> <url>")),console.log("");return}console.log(""),console.log(J.bold("MCP Servers")),console.log(J.dim("\u2500".repeat(60)));for(let c of s){let p=bst(c.type),m=Ist(c.scope||"local");if(console.log(""),console.log(`${J.bold(c.name)} ${J.gray(`(${p})`)} ${m}`),pE(c)||dE(c))console.log(` ${J.gray("URL:")} ${c.url}`);else if(_v(c)){let b=c.args?`${c.command} ${c.args.join(" ")}`:c.command;console.log(` ${J.gray("Command:")} ${b}`)}t.verbose&&(c.env&&Object.keys(c.env).length>0&&console.log(` ${J.gray("Environment:")} ${Object.keys(c.env).join(", ")}`),c.source&&console.log(` ${J.gray("Source:")} ${c.source}`))}console.log(""),console.log(J.gray(`Total: ${s.length} server(s)`)),console.log("")}catch(i){let s=i instanceof Error?i.message:String(i);j.error("MCP list command failed",i),console.log(J.red(`Failed to list servers: ${s}`)),process.exit(1)}}),n.command("get <name>").description("Get details for a specific MCP server").action(async t=>{try{let i=Zb();await i.load(process.cwd());let s=i.getServer(t,process.cwd());if(s||(console.log(J.red(`Server not found: ${t}`)),process.exit(1)),console.log(""),console.log(J.bold(`MCP Server: ${s.name}`)),console.log(J.dim("\u2500".repeat(40))),console.log(` ${J.gray("Type:")} ${bst(s.type)}`),console.log(` ${J.gray("Scope:")} ${Ist(s.scope||"local")}`),pE(s)||dE(s)){if(console.log(` ${J.gray("URL:")} ${s.url}`),s.headers&&Object.keys(s.headers).length>0){console.log(` ${J.gray("Headers:")}`);for(let[c,p]of Object.entries(s.headers)){let m=c.toLowerCase().includes("authorization")?p.substring(0,20)+"...":p;console.log(` ${J.gray(c)}: ${m}`)}}}else _v(s)&&(console.log(` ${J.gray("Command:")} ${s.command}`),s.args&&s.args.length>0&&console.log(` ${J.gray("Arguments:")} ${s.args.join(" ")}`),s.cwd&&console.log(` ${J.gray("Working Directory:")} ${s.cwd}`));if(s.env&&Object.keys(s.env).length>0){console.log(` ${J.gray("Environment Variables:")}`);for(let[c,p]of Object.entries(s.env)){let m=c.toLowerCase().includes("key")||c.toLowerCase().includes("secret")||c.toLowerCase().includes("token")?"***":p;console.log(` ${J.gray(c)}: ${m}`)}}s.source&&console.log(` ${J.gray("Source:")} ${s.source}`),s.description&&console.log(` ${J.gray("Description:")} ${s.description}`),console.log("")}catch(i){let s=i instanceof Error?i.message:String(i);j.error("MCP get command failed",i),console.log(J.red(`Failed to get server: ${s}`)),process.exit(1)}}),n.command("remove <name>").alias("rm").description("Remove an MCP server").action(async t=>{try{let i=Zb();await i.load(process.cwd());let s=await i.removeServer(t,process.cwd());s.success?console.log(J.green(`Removed MCP server '${t}'`)):(console.log(J.red(s.message)),process.exit(1))}catch(i){let s=i instanceof Error?i.message:String(i);j.error("MCP remove command failed",i),console.log(J.red(`Failed to remove server: ${s}`)),process.exit(1)}}),n.command("reset-project-choices").description("Reset all project MCP server approval choices").action(async()=>{try{let t=Zb();await t.load(process.cwd()),await t.resetProjectApprovals(),console.log(J.green("Reset all project MCP server approval choices")),console.log(J.gray("You will be prompted to approve project servers again."))}catch(t){let i=t instanceof Error?t.message:String(t);j.error("MCP reset-project-choices command failed",t),console.log(J.red(`Failed to reset choices: ${i}`)),process.exit(1)}}),n}lp();import O9n from"os";function Y9n(n){let t=n.replace(/\\/g,"/").replace(/\/$/,""),i=O9n.homedir().replace(/\\/g,"/").replace(/\/$/,"");if(t.toLowerCase()===i.toLowerCase())return!0;let s=/^[a-z]:\/?users\/[^/]+$/i,c=/^\/users\/[^/]+$/i,p=/^\/home\/[^/]+$/i;return s.test(t)||c.test(t)||p.test(t)}function _Q(n){return n.cwd?eHe(n.cwd):process.cwd()}var Ooe="1.0.32",H9n="compass",L9n="AI-powered development assistance using Anthropic's Claude models";function J9n(){let n=new eR;return n.name(H9n).description(L9n).version(Ooe,"-v, --version","Display version number").helpOption("-h, --help","Display help information"),n.command("start",{isDefault:!0}).description("Start interactive Compass session").argument("[prompt]","Initial prompt to start the session with").option("-p, --print <query>","Run query in non-interactive mode (SDK mode) and exit").option("-c, --continue","Continue the most recent conversation in current directory").option("--cwd <path>","Run in a specific project directory").option("--skip-setup","Skip the setup wizard even if not configured").option("--compass-key <key>","Compass API key for authentication").option("--anthropic-key <key>","Anthropic API key (optional if already configured)").option("--no-banner","Skip the ASCII art banner").option("--no-update-check","Skip the update check on startup").option("--verbose","Enable verbose logging (info level)").option("--debug","Enable debug logging").option("--agents <json>",`JSON object defining agents for this session (e.g., '{"name": {"description": "...", "prompt": "..."}}')`).option("--agent <name>","Run with a specific agent (applies its system prompt, model, and tool restrictions)").option("--standalone-agent","Use only the agent's system prompt, excluding the default CLI system prompt").action(async(t,i)=>{try{let s=process.env.COMPASS_DEBUG,c=process.env.COMPASS_VERBOSE,p=s&&s.toLowerCase()!=="false"&&s!=="0",m=c&&c.toLowerCase()!=="false"&&c!=="0";if(i.debug||p?j.configure({level:"debug"}):(i.verbose||m)&&j.configure({level:"info"}),i.compassKey||i.anthropicKey){let{getCredentialStore:Z}=await Promise.resolve().then(()=>(gA(),EB)),{getCompassAuthService:T}=await Promise.resolve().then(()=>(FB(),EHe)),V=await Z();if(i.compassKey)try{j.debug("Validating Compass API key from CLI parameter"),await T().validateApiKey(i.compassKey),await V.setCompassApiKey(i.compassKey),j.debug("Compass API key from CLI parameter validated and stored"),console.log(J.green("\u2713 Compass API key validated and stored"))}catch(P){j.error("Failed to validate Compass API key",P),console.error(J.red("\u274C Invalid Compass API key")),P instanceof Error&&console.error(J.red(` ${P.message}`)),process.exit(1)}if(i.anthropicKey)try{if(j.debug("Storing Anthropic API key from CLI parameter"),!V.validateApiKeyFormat(i.anthropicKey))throw new Error('Invalid API key format. Anthropic API keys should start with "sk-ant-"');await V.setApiKey(i.anthropicKey),j.debug("Anthropic API key from CLI parameter stored"),console.log(J.green("\u2713 Anthropic API key stored"))}catch(P){j.error("Failed to store Anthropic API key",P),console.error(J.red("\u274C Invalid Anthropic API key")),P instanceof Error&&console.error(J.red(` ${P.message}`)),process.exit(1)}console.log("")}let b=_Q(i);if(Y9n(b)){console.log(""),console.log(J.yellow("\u26A0\uFE0F Warning: Running from a user home directory")),console.log(J.dim("\u2500".repeat(50))),console.log(""),console.log(J.gray(`Directory: ${b}`)),console.log(""),console.log(J.gray("User home directories typically contain many files and folders.")),console.log(J.gray("This can cause slow indexing and high memory usage.")),console.log(""),console.log(J.gray("Recommendation: Navigate to a specific project folder before")),console.log(J.gray("starting the CLI, or use the --cwd option to specify a project directory.")),console.log("");let{proceed:Z}=await a3.prompt([{type:"confirm",name:"proceed",message:"Do you want to continue anyway?",default:!1}]);Z||(console.log(""),console.log(J.gray("Exiting. Please navigate to a project directory and try again.")),console.log(""),process.exit(0)),console.log("")}let x=await For();if(i.agents||i.agent){let{initializeAgentManager:Z}=await Promise.resolve().then(()=>(CA(),_j));await Z(b,i.agents)}if(i.print){let Z;if(i.agent){let{getAgentByName:V}=await Promise.resolve().then(()=>(CA(),_j));Z=await V(i.agent),Z||(console.error(J.red(`\u274C Agent "${i.agent}" not found`)),console.error(J.gray(" Available agents: explore, code-reviewer, debugger, planner")),console.error(J.gray(" Or define custom agents with --agents")),process.exit(1)),j.debug(`Running with agent: ${Z.name} (${Z.source})`)}let T=await fQ({query:i.print,pipedInput:x,projectRoot:b,continueSession:i.continue||!1,debug:i.debug||p,cliAgentsJson:i.agents,agentConfig:Z,standaloneAgent:i.standaloneAgent||Z?.standalone});process.exit(T.exitCode);return}await kc(al());try{let{getTempFileService:Z,TEMP_DIR:T,PREVIEW_TEMP_DIR:V}=await Promise.resolve().then(()=>(wKe(),BXt)),P=Z(),L=eHe(b,yB,T,V);P.setTempDir(L),await P.initialize()}catch{j.debug("TempFileService initialization skipped")}if(i.banner!==!1&&console.log(Lre(Ooe)),b!==process.cwd()&&(console.log(J.cyan(`\u{1F4C1} Working directory: ${b}`)),console.log("")),j.debug("CLI startup: about to check for updates",{updateCheckEnabled:i.updateCheck!==!1}),i.updateCheck!==!1)try{j.debug("CLI startup: calling performAutoUpdateOnStartup");let Z=await RXt();j.debug("CLI startup: update check completed",{updated:Z.updated}),Z.updated&&(j.debug("CLI startup: auto-update successful, exiting for restart"),console.log(""),console.log("Update complete! Please run the CLI again to use the new version."),console.log(""),process.exit(0))}catch(Z){j.debug("Update check failed",Z)}let{setProjectRoot:E}=await Promise.resolve().then(()=>(CA(),_j));E(b);let{waitUntilExit:F}=ncr(icr.createElement(_st,{version:Ooe,skipSetup:i.skipSetup,projectRoot:b,smartMode:i.smart,initialPrompt:t,continueSession:i.continue||!1,cliAgentsJson:i.agents}));await F()}catch(s){j.error("Failed to start Compass",s),console.error(J.red("\u274C Failed to start Compass")),s instanceof Error&&console.error(J.red(` ${s.message}`)),process.exit(1)}}),n.command("setup").description("Run first-time setup wizard for consent and API key configuration").option("--compass-key <key>","Compass API key for authentication").option("--anthropic-key <key>","Anthropic API key (optional if already configured)").action(async t=>{try{if(await kc(al()),t.compassKey||t.anthropicKey){let{getCredentialStore:s}=await Promise.resolve().then(()=>(gA(),EB)),{getCompassAuthService:c}=await Promise.resolve().then(()=>(FB(),EHe)),p=await s();if(t.compassKey)try{console.log(J.gray("Validating Compass API key...")),await c().validateApiKey(t.compassKey),await p.setCompassApiKey(t.compassKey),console.log(J.green("\u2713 Compass API key validated and stored"))}catch(m){j.error("Failed to validate Compass API key",m),console.error(J.red("\u274C Invalid Compass API key")),m instanceof Error&&console.error(J.red(` ${m.message}`)),process.exit(1)}if(t.anthropicKey)try{if(console.log(J.gray("Storing Anthropic API key...")),!p.validateApiKeyFormat(t.anthropicKey))throw new Error('Invalid API key format. Anthropic API keys should start with "sk-ant-"');await p.setApiKey(t.anthropicKey),console.log(J.green("\u2713 Anthropic API key stored"))}catch(m){j.error("Failed to store Anthropic API key",m),console.error(J.red("\u274C Invalid Anthropic API key")),m instanceof Error&&console.error(J.red(` ${m.message}`)),process.exit(1)}console.log("")}console.log(Lre(Ooe));let{waitUntilExit:i}=ncr(icr.createElement(_st,{version:Ooe}));await i()}catch(i){j.error("Setup failed",i),console.error(J.red("\u274C Setup failed")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n.command("init").description("Initialize Compass in the current project directory").option("--cwd <path>","Run in a specific project directory").option("-f, --force","Overwrite existing .compass directory").action(async t=>{try{let i=_Q(t),s=Hu(i);if(await la(s)){if(!t.force){console.log(J.yellow("\u26A0\uFE0F Compass is already initialized in this project.")),console.log(J.gray(" Use --force to reinitialize."));return}console.log(J.gray("Reinitializing Compass..."))}await kc(s),await kc(`${s}/backups`),await kc(`${s}/cache`),await kc(`${s}/context`),console.log(J.green("\u2705 Initialized Compass in current project")),console.log(J.gray(` Created ${s}/`)),console.log(""),console.log(J.gray("Next steps:")),console.log(J.gray(` 1. Run "compass setup" if you haven't configured your API key`)),console.log(J.gray(' 2. Run "compass" to start an interactive session'))}catch(i){j.error("Init failed",i),console.error(J.red("\u274C Failed to initialize Compass")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n.addCommand(qor()),n.addCommand(tcr()),n.addCommand(rcr()),n.command("consent").description("Manage consent settings for data collection and telemetry").argument("[action]","Action to perform: status, review, revoke","status").action(async t=>{try{let i=await D6();switch(t.toLowerCase()){case"status":{let s=await i.getStatus();if(console.log(""),console.log(J.bold.white("\u{1F4CB} Consent Status")),console.log(J.dim("\u2500".repeat(40))),console.log(` ${J.gray("Valid:")} ${s.isValid?J.green("Yes"):J.red("No")}`),console.log(` ${J.gray("Version:")} ${s.version||J.gray("N/A")}`),console.log(` ${J.gray("Granted:")} ${s.grantedAt?new Date(s.grantedAt).toLocaleDateString():J.gray("N/A")}`),console.log(` ${J.gray("Expires:")} ${s.expiresAt?new Date(s.expiresAt).toLocaleDateString():J.gray("N/A")}`),s.daysUntilExpiry!==null){let c=s.daysUntilExpiry>30?"green":s.daysUntilExpiry>7?"yellow":"red";console.log(` ${J.gray("Days until expiry:")} ${J[c](s.daysUntilExpiry.toString())}`)}s.consent&&(console.log(""),console.log(J.bold.white(" Settings:")),console.log(` ${J.gray("Data Collection:")} ${s.consent.dataCollection?J.green("Enabled"):J.red("Disabled")}`),console.log(` ${J.gray("Telemetry:")} ${s.consent.telemetry?J.green("Enabled"):J.yellow("Disabled")}`),console.log(` ${J.gray("Analytics:")} ${s.consent.analytics?J.green("Enabled"):J.yellow("Disabled")}`),console.log(` ${J.gray("Error Reporting:")} ${s.consent.errorReporting?J.green("Enabled"):J.yellow("Disabled")}`)),s.needsRenewal&&(console.log(""),console.log(J.yellow('\u26A0\uFE0F Consent needs renewal. Run "compass setup" to update.'))),console.log("");break}case"review":{let s=i.getHistory();if(console.log(""),console.log(J.bold.white("\u{1F4DC} Consent History")),console.log(J.dim("\u2500".repeat(40))),s.length===0)console.log(J.gray(" No consent records found."));else for(let c of s.slice(-5))console.log(` ${J.gray("ID:")} ${c.id.slice(0,8)}...`),console.log(` ${J.gray("Version:")} ${c.version}`),console.log(` ${J.gray("Granted:")} ${new Date(c.grantedAt).toLocaleString()}`),console.log(J.dim(" \u2500".repeat(20)));console.log("");break}case"revoke":{console.log(""),console.log(J.yellow("\u26A0\uFE0F Revoking consent will delete all stored data.")),console.log(J.gray(" This action cannot be undone.")),console.log(""),await i.revokeConsent(),console.log(J.green("\u2705 Consent revoked and data cleaned up")),console.log(J.gray(' Run "compass setup" to reconfigure.')),console.log("");break}default:console.log(J.red(`Unknown action: ${t}`)),console.log(J.gray("Available actions: status, review, revoke")),process.exit(1)}}catch(i){j.error("Consent command failed",i),console.error(J.red("\u274C Consent command failed")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n.command("tokens").description("View token usage statistics and cost estimates").option("--export","Export usage data as JSON").option("--session","Show current session usage only").option("--reset","Reset token usage statistics").action(async t=>{try{let i=await Zg();if(t.export){let c=await i.exportUsage();console.log(JSON.stringify(c,null,2));return}if(t.reset){console.log(J.yellow("\u26A0\uFE0F This will reset all token usage statistics.")),console.log(J.gray(" Feature not yet implemented."));return}if(t.session){let c=i.getCurrentSessionUsage();if(!c){console.log(J.gray("No active session."));return}console.log(""),console.log(J.bold.white("\u{1F4CA} Current Session Token Usage")),console.log(J.dim("\u2500".repeat(40))),console.log(` ${J.gray("Session ID:")} ${c.sessionId.slice(0,8)}...`),console.log(` ${J.gray("Started:")} ${new Date(c.startTime).toLocaleString()}`),console.log(` ${J.gray("API Calls:")} ${c.calls.length}`),console.log(` ${J.gray("Input Tokens:")} ${c.totals.inputTokens.toLocaleString()}`),console.log(` ${J.gray("Output Tokens:")} ${c.totals.outputTokens.toLocaleString()}`),console.log(` ${J.gray("Total Tokens:")} ${J.bold(c.totals.totalTokens.toLocaleString())}`),console.log(` ${J.gray("Estimated Cost:")} ${J.green("$"+c.estimatedCost.totalCost.toFixed(4))}`),console.log("");return}let s=i.getAllTimeStats();console.log(""),console.log(J.bold.white("\u{1F4CA} Token Usage Statistics")),console.log(J.dim("\u2500".repeat(40))),console.log(` ${J.gray("Total API Calls:")} ${s.totalCalls.toLocaleString()}`),console.log(` ${J.gray("Total Tokens:")} ${s.totalTokens.toLocaleString()}`),console.log(` ${J.gray("Total Cost:")} ${J.green("$"+s.totalCost.toFixed(4))}`),console.log(""),console.log(J.bold.white(" Averages per Call:")),console.log(` ${J.gray("Input:")} ${s.averageInputTokens.toLocaleString()} tokens`),console.log(` ${J.gray("Output:")} ${s.averageOutputTokens.toLocaleString()} tokens`),console.log(""),console.log(J.bold.white(" Peak Usage:")),console.log(` ${J.gray("Input:")} ${s.peakInputTokens.toLocaleString()} tokens`),console.log(` ${J.gray("Output:")} ${s.peakOutputTokens.toLocaleString()} tokens`),console.log("")}catch(i){j.error("Tokens command failed",i),console.error(J.red("\u274C Tokens command failed")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n.command("data").description("Manage stored data (GDPR compliance)").argument("[action]","Action to perform: list, export, delete","list").option("--cwd <path>","Run in a specific project directory").option("-o, --output <file>","Output file for export").action(async(t,i)=>{try{let s=await D6();switch(t.toLowerCase()){case"list":{console.log(""),console.log(J.bold.white("\u{1F4C1} Stored Data")),console.log(J.dim("\u2500".repeat(40)));let c=al(),p=Hu(_Q(i));console.log(J.bold.cyan(" Global Data:")),console.log(` ${J.gray("Location:")} ${c}`),console.log(` ${J.gray("Contents:")} config, credentials, consent, token usage, logs`),await la(p)&&(console.log(""),console.log(J.bold.cyan(" Project Data:")),console.log(` ${J.gray("Location:")} ${p}`),console.log(` ${J.gray("Contents:")} session state, backups, cache, context index`)),console.log(""),console.log(J.gray('Use "compass data export" to export all data')),console.log(J.gray('Use "compass consent revoke" to delete all data')),console.log("");break}case"export":{let c=await s.exportUserData(),p=JSON.stringify(c,null,2);if(i.output){let{safeWriteFile:m}=await Promise.resolve().then(()=>(Md(),cye));await m(i.output,p),console.log(J.green(`\u2705 Data exported to ${i.output}`))}else console.log(p);break}case"delete":{console.log(J.yellow('\u26A0\uFE0F To delete all data, use "compass consent revoke"'));break}default:console.log(J.red(`Unknown action: ${t}`)),console.log(J.gray("Available actions: list, export, delete")),process.exit(1)}}catch(s){j.error("Data command failed",s),console.error(J.red("\u274C Data command failed")),s instanceof Error&&console.error(J.red(` ${s.message}`)),process.exit(1)}}),n.command("cache").description("Manage cached data").argument("[action]","Action to perform: clear, status","status").option("--cwd <path>","Run in a specific project directory").action(async(t,i)=>{try{let s=Hu(_Q(i)),c=`${s}/cache`,p=`${s}/context`;switch(t.toLowerCase()){case"status":{console.log(""),console.log(J.bold.white("\u{1F4BE} Cache Status")),console.log(J.dim("\u2500".repeat(40))),await la(c)?(console.log(` ${J.gray("Cache directory:")} ${c}`),console.log(` ${J.green("\u2713")} Cache directory exists`)):console.log(` ${J.gray("Cache directory:")} ${J.yellow("Not initialized")}`),await la(p)?(console.log(` ${J.gray("Context index:")} ${p}`),console.log(` ${J.green("\u2713")} Context index exists`)):console.log(` ${J.gray("Context index:")} ${J.yellow("Not initialized")}`),console.log(""),console.log(J.gray('Use "compass cache clear" to clear all cached data')),console.log("");break}case"clear":{let m=!1;await la(c)&&(await d0(c),await kc(c),console.log(J.green("\u2705 Cache cleared")),m=!0),await la(p)&&(await d0(p),await kc(p),console.log(J.green("\u2705 Context index cleared")),m=!0),m||console.log(J.gray("No cache to clear."));break}default:console.log(J.red(`Unknown action: ${t}`)),console.log(J.gray("Available actions: status, clear")),process.exit(1)}}catch(s){j.error("Cache command failed",s),console.error(J.red("\u274C Cache command failed")),s instanceof Error&&console.error(J.red(` ${s.message}`)),process.exit(1)}}),n.command("update").description("Check for and install updates").argument("[action]","Action to perform: check, install, history","check").option("-f, --force","Force update check (ignore interval)").option("--npm","Use npm for installation").option("--yarn","Use yarn for installation").option("--pnpm","Use pnpm for installation").action(async(t,i)=>{try{let s=await t9();switch(t.toLowerCase()){case"check":{console.log(""),console.log(J.cyan("Checking for updates..."));let c=await s.checkForUpdates(i.force);c.error?console.log(J.red(`Failed to check for updates: ${c.error}`)):c.updateAvailable&&c.latestVersion?s.displayUpdateNotification(c):(console.log(""),console.log(J.green(`You are on the latest version (${c.currentVersion})`)),console.log(""));break}case"install":{let c=i.npm?"npm":i.yarn?"yarn":i.pnpm?"pnpm":await s.detectPackageManager();await s.performUpdate(c);break}case"history":{let c=s.getUpdateHistory();if(console.log(""),console.log(J.bold.cyan("Update History")),console.log(J.dim("\u2500".repeat(40))),c.length===0)console.log(""),console.log(J.gray(" No update history recorded.")),console.log("");else{console.log("");for(let p of c.slice().reverse()){let m=p.success?J.green("\u2713"):J.red("\u2717"),b=p.success?J.green:J.red;console.log(` ${m} ${J.gray(new Date(p.updatedAt).toLocaleDateString())}`),console.log(` ${J.gray("From:")} ${p.fromVersion} ${J.gray("\u2192")} ${b(p.toVersion)}`),console.log(` ${J.gray("Method:")} ${p.method}`),p.error&&console.log(` ${J.red("Error:")} ${p.error}`),console.log("")}}break}default:console.log(J.red(`Unknown action: ${t}`)),console.log(J.gray("Available actions: check, install, history")),process.exit(1)}}catch(s){j.error("Update command failed",s),console.error(J.red("\u274C Update command failed")),s instanceof Error&&console.error(J.red(` ${s.message}`)),process.exit(1)}}),n.command("reset").description("Reset Compass to factory settings").option("--cwd <path>","Run in a specific project directory").option("-f, --force","Skip confirmation prompt").option("--global","Reset global settings only").option("--project","Reset project settings only").action(async t=>{try{if(!t.force){console.log(""),console.log(J.red("\u26A0\uFE0F WARNING: This will delete all Compass data!")),console.log(J.gray(" This action cannot be undone.")),console.log(""),console.log(J.gray(" Use --force to confirm this action.")),console.log("");return}if(t.project&&!t.global){let c=Hu(_Q(t));await la(c)?(await d0(c),console.log(J.green("\u2705 Project settings reset"))):console.log(J.gray("No project settings to reset."));return}if(t.global&&!t.project){let c=al();await la(c)?(await d0(c),console.log(J.green("\u2705 Global settings reset"))):console.log(J.gray("No global settings to reset."));return}let i=al(),s=Hu(_Q(t));await la(i)&&await d0(i),await la(s)&&await d0(s),console.log(J.green("\u2705 Compass has been reset to factory settings")),console.log(J.gray(' Run "compass setup" to reconfigure.'))}catch(i){j.error("Reset failed",i),console.error(J.red("\u274C Reset failed")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n}async function B9n(){try{let n=J9n();process.on("uncaughtException",t=>{j.error("Uncaught exception",t),console.error(J.red("\u274C An unexpected error occurred")),t instanceof Error&&console.error(J.red(` ${t.message}`)),process.exit(1)}),process.on("unhandledRejection",t=>{j.error("Unhandled rejection",t),console.error(J.red("\u274C An unexpected error occurred")),t instanceof Error&&console.error(J.red(` ${t.message}`)),process.exit(1)}),await n.parseAsync(process.argv)}catch(n){j.error("CLI error",n),console.error(J.red("\u274C CLI error")),n instanceof Error&&console.error(J.red(` ${n.message}`)),process.exit(1)}}B9n();
3132
+ `);return n.command("add <name> [urlOrCommand] [args...]").description("Add a new MCP server").requiredOption("-t, --transport <type>","Transport type (http, sse, or stdio)").option("-s, --scope <scope>","Configuration scope (local, project, or user)","local").option("-H, --header <header...>","HTTP headers (key: value format)").option("-e, --env <env...>","Environment variables (KEY=value format)").action(async(t,i,s,c)=>{try{let p=c.transport.toLowerCase();["http","sse","stdio"].includes(p)||(console.log(J.red(`Invalid transport type: ${c.transport}`)),console.log(J.gray("Valid types: http, sse, stdio")),process.exit(1)),i||(console.log(J.red("URL or command is required")),process.exit(1));let m=c.scope.toLowerCase();["local","project","user"].includes(m)||(console.log(J.red(`Invalid scope: ${c.scope}`)),console.log(J.gray("Valid scopes: local, project, user")),process.exit(1));let b;if(c.header){b={};for(let Z of c.header){let T=Z.indexOf(":");if(T>0){let V=Z.substring(0,T).trim(),P=Z.substring(T+1).trim();b[V]=P}}}let x=c.env?M9n(c.env):void 0,E=Zb();await E.load(process.cwd());let F=await E.addServer({transport:p,name:t,urlOrCommand:i,args:p==="stdio"?s:void 0,scope:m,headers:b,env:x},process.cwd());F.success?(console.log(""),console.log(J.green(`Added MCP server '${t}'`)),console.log(J.gray(` Transport: ${bst(p)}`)),console.log(J.gray(` Scope: ${Ist(m)}`)),console.log(p==="stdio"?J.gray(` Command: ${i} ${s.join(" ")}`):J.gray(` URL: ${i}`)),console.log("")):(console.log(J.red(`Failed to add server: ${F.error}`)),process.exit(1))}catch(p){let m=p instanceof Error?p.message:String(p);j.error("MCP add command failed",p),console.log(J.red(`Failed to add server: ${m}`)),process.exit(1)}}),n.command("add-json <name> <json>").description("Add an MCP server from JSON configuration").option("-s, --scope <scope>","Configuration scope (local, project, or user)","local").action(async(t,i,s)=>{try{let c=s.scope.toLowerCase();["local","project","user"].includes(c)||(console.log(J.red(`Invalid scope: ${s.scope}`)),process.exit(1));let p=Zb();await p.load(process.cwd());let m=await p.addServerFromJson(t,i,c,process.cwd());m.success?console.log(J.green(`Added MCP server '${t}' from JSON configuration`)):(console.log(J.red(`Failed to add server: ${m.error}`)),process.exit(1))}catch(c){let p=c instanceof Error?c.message:String(c);j.error("MCP add-json command failed",c),console.log(J.red(`Failed to add server: ${p}`)),process.exit(1)}}),n.command("list").alias("ls").description("List all configured MCP servers").option("-v, --verbose","Show detailed information").action(async t=>{try{let i=Zb();await i.load(process.cwd());let s=i.getAllServers(process.cwd());if(s.length===0){console.log(""),console.log(J.gray("No MCP servers configured.")),console.log(""),console.log(J.gray("Add a server with:")),console.log(J.gray(" compass mcp add --transport http <name> <url>")),console.log("");return}console.log(""),console.log(J.bold("MCP Servers")),console.log(J.dim("\u2500".repeat(60)));for(let c of s){let p=bst(c.type),m=Ist(c.scope||"local");if(console.log(""),console.log(`${J.bold(c.name)} ${J.gray(`(${p})`)} ${m}`),pE(c)||dE(c))console.log(` ${J.gray("URL:")} ${c.url}`);else if(_v(c)){let b=c.args?`${c.command} ${c.args.join(" ")}`:c.command;console.log(` ${J.gray("Command:")} ${b}`)}t.verbose&&(c.env&&Object.keys(c.env).length>0&&console.log(` ${J.gray("Environment:")} ${Object.keys(c.env).join(", ")}`),c.source&&console.log(` ${J.gray("Source:")} ${c.source}`))}console.log(""),console.log(J.gray(`Total: ${s.length} server(s)`)),console.log("")}catch(i){let s=i instanceof Error?i.message:String(i);j.error("MCP list command failed",i),console.log(J.red(`Failed to list servers: ${s}`)),process.exit(1)}}),n.command("get <name>").description("Get details for a specific MCP server").action(async t=>{try{let i=Zb();await i.load(process.cwd());let s=i.getServer(t,process.cwd());if(s||(console.log(J.red(`Server not found: ${t}`)),process.exit(1)),console.log(""),console.log(J.bold(`MCP Server: ${s.name}`)),console.log(J.dim("\u2500".repeat(40))),console.log(` ${J.gray("Type:")} ${bst(s.type)}`),console.log(` ${J.gray("Scope:")} ${Ist(s.scope||"local")}`),pE(s)||dE(s)){if(console.log(` ${J.gray("URL:")} ${s.url}`),s.headers&&Object.keys(s.headers).length>0){console.log(` ${J.gray("Headers:")}`);for(let[c,p]of Object.entries(s.headers)){let m=c.toLowerCase().includes("authorization")?p.substring(0,20)+"...":p;console.log(` ${J.gray(c)}: ${m}`)}}}else _v(s)&&(console.log(` ${J.gray("Command:")} ${s.command}`),s.args&&s.args.length>0&&console.log(` ${J.gray("Arguments:")} ${s.args.join(" ")}`),s.cwd&&console.log(` ${J.gray("Working Directory:")} ${s.cwd}`));if(s.env&&Object.keys(s.env).length>0){console.log(` ${J.gray("Environment Variables:")}`);for(let[c,p]of Object.entries(s.env)){let m=c.toLowerCase().includes("key")||c.toLowerCase().includes("secret")||c.toLowerCase().includes("token")?"***":p;console.log(` ${J.gray(c)}: ${m}`)}}s.source&&console.log(` ${J.gray("Source:")} ${s.source}`),s.description&&console.log(` ${J.gray("Description:")} ${s.description}`),console.log("")}catch(i){let s=i instanceof Error?i.message:String(i);j.error("MCP get command failed",i),console.log(J.red(`Failed to get server: ${s}`)),process.exit(1)}}),n.command("remove <name>").alias("rm").description("Remove an MCP server").action(async t=>{try{let i=Zb();await i.load(process.cwd());let s=await i.removeServer(t,process.cwd());s.success?console.log(J.green(`Removed MCP server '${t}'`)):(console.log(J.red(s.message)),process.exit(1))}catch(i){let s=i instanceof Error?i.message:String(i);j.error("MCP remove command failed",i),console.log(J.red(`Failed to remove server: ${s}`)),process.exit(1)}}),n.command("reset-project-choices").description("Reset all project MCP server approval choices").action(async()=>{try{let t=Zb();await t.load(process.cwd()),await t.resetProjectApprovals(),console.log(J.green("Reset all project MCP server approval choices")),console.log(J.gray("You will be prompted to approve project servers again."))}catch(t){let i=t instanceof Error?t.message:String(t);j.error("MCP reset-project-choices command failed",t),console.log(J.red(`Failed to reset choices: ${i}`)),process.exit(1)}}),n}lp();import O9n from"os";function Y9n(n){let t=n.replace(/\\/g,"/").replace(/\/$/,""),i=O9n.homedir().replace(/\\/g,"/").replace(/\/$/,"");if(t.toLowerCase()===i.toLowerCase())return!0;let s=/^[a-z]:\/?users\/[^/]+$/i,c=/^\/users\/[^/]+$/i,p=/^\/home\/[^/]+$/i;return s.test(t)||c.test(t)||p.test(t)}function _Q(n){return n.cwd?eHe(n.cwd):process.cwd()}var Ooe="1.0.33",H9n="compass",L9n="AI-powered development assistance using Anthropic's Claude models";function J9n(){let n=new eR;return n.name(H9n).description(L9n).version(Ooe,"-v, --version","Display version number").helpOption("-h, --help","Display help information"),n.command("start",{isDefault:!0}).description("Start interactive Compass session").argument("[prompt]","Initial prompt to start the session with").option("-p, --print <query>","Run query in non-interactive mode (SDK mode) and exit").option("-c, --continue","Continue the most recent conversation in current directory").option("--cwd <path>","Run in a specific project directory").option("--skip-setup","Skip the setup wizard even if not configured").option("--compass-key <key>","Compass API key for authentication").option("--anthropic-key <key>","Anthropic API key (optional if already configured)").option("--no-banner","Skip the ASCII art banner").option("--no-update-check","Skip the update check on startup").option("--verbose","Enable verbose logging (info level)").option("--debug","Enable debug logging").option("--agents <json>",`JSON object defining agents for this session (e.g., '{"name": {"description": "...", "prompt": "..."}}')`).option("--agent <name>","Run with a specific agent (applies its system prompt, model, and tool restrictions)").option("--standalone-agent","Use only the agent's system prompt, excluding the default CLI system prompt").action(async(t,i)=>{try{let s=process.env.COMPASS_DEBUG,c=process.env.COMPASS_VERBOSE,p=s&&s.toLowerCase()!=="false"&&s!=="0",m=c&&c.toLowerCase()!=="false"&&c!=="0";if(i.debug||p?j.configure({level:"debug"}):(i.verbose||m)&&j.configure({level:"info"}),i.compassKey||i.anthropicKey){let{getCredentialStore:Z}=await Promise.resolve().then(()=>(gA(),EB)),{getCompassAuthService:T}=await Promise.resolve().then(()=>(FB(),EHe)),V=await Z();if(i.compassKey)try{j.debug("Validating Compass API key from CLI parameter"),await T().validateApiKey(i.compassKey),await V.setCompassApiKey(i.compassKey),j.debug("Compass API key from CLI parameter validated and stored"),console.log(J.green("\u2713 Compass API key validated and stored"))}catch(P){j.error("Failed to validate Compass API key",P),console.error(J.red("\u274C Invalid Compass API key")),P instanceof Error&&console.error(J.red(` ${P.message}`)),process.exit(1)}if(i.anthropicKey)try{if(j.debug("Storing Anthropic API key from CLI parameter"),!V.validateApiKeyFormat(i.anthropicKey))throw new Error('Invalid API key format. Anthropic API keys should start with "sk-ant-"');await V.setApiKey(i.anthropicKey),j.debug("Anthropic API key from CLI parameter stored"),console.log(J.green("\u2713 Anthropic API key stored"))}catch(P){j.error("Failed to store Anthropic API key",P),console.error(J.red("\u274C Invalid Anthropic API key")),P instanceof Error&&console.error(J.red(` ${P.message}`)),process.exit(1)}console.log("")}let b=_Q(i);if(Y9n(b)){console.log(""),console.log(J.yellow("\u26A0\uFE0F Warning: Running from a user home directory")),console.log(J.dim("\u2500".repeat(50))),console.log(""),console.log(J.gray(`Directory: ${b}`)),console.log(""),console.log(J.gray("User home directories typically contain many files and folders.")),console.log(J.gray("This can cause slow indexing and high memory usage.")),console.log(""),console.log(J.gray("Recommendation: Navigate to a specific project folder before")),console.log(J.gray("starting the CLI, or use the --cwd option to specify a project directory.")),console.log("");let{proceed:Z}=await a3.prompt([{type:"confirm",name:"proceed",message:"Do you want to continue anyway?",default:!1}]);Z||(console.log(""),console.log(J.gray("Exiting. Please navigate to a project directory and try again.")),console.log(""),process.exit(0)),console.log("")}let x=await For();if(i.agents||i.agent){let{initializeAgentManager:Z}=await Promise.resolve().then(()=>(CA(),_j));await Z(b,i.agents)}if(i.print){let Z;if(i.agent){let{getAgentByName:V}=await Promise.resolve().then(()=>(CA(),_j));Z=await V(i.agent),Z||(console.error(J.red(`\u274C Agent "${i.agent}" not found`)),console.error(J.gray(" Available agents: explore, code-reviewer, debugger, planner")),console.error(J.gray(" Or define custom agents with --agents")),process.exit(1)),j.debug(`Running with agent: ${Z.name} (${Z.source})`)}let T=await fQ({query:i.print,pipedInput:x,projectRoot:b,continueSession:i.continue||!1,debug:i.debug||p,cliAgentsJson:i.agents,agentConfig:Z,standaloneAgent:i.standaloneAgent||Z?.standalone});process.exit(T.exitCode);return}await kc(al());try{let{getTempFileService:Z,TEMP_DIR:T,PREVIEW_TEMP_DIR:V}=await Promise.resolve().then(()=>(wKe(),BXt)),P=Z(),L=eHe(b,yB,T,V);P.setTempDir(L),await P.initialize()}catch{j.debug("TempFileService initialization skipped")}if(i.banner!==!1&&console.log(Lre(Ooe)),b!==process.cwd()&&(console.log(J.cyan(`\u{1F4C1} Working directory: ${b}`)),console.log("")),j.debug("CLI startup: about to check for updates",{updateCheckEnabled:i.updateCheck!==!1}),i.updateCheck!==!1)try{j.debug("CLI startup: calling performAutoUpdateOnStartup");let Z=await RXt();j.debug("CLI startup: update check completed",{updated:Z.updated}),Z.updated&&(j.debug("CLI startup: auto-update successful, exiting for restart"),console.log(""),console.log("Update complete! Please run the CLI again to use the new version."),console.log(""),process.exit(0))}catch(Z){j.debug("Update check failed",Z)}let{setProjectRoot:E}=await Promise.resolve().then(()=>(CA(),_j));E(b);let{waitUntilExit:F}=ncr(icr.createElement(_st,{version:Ooe,skipSetup:i.skipSetup,projectRoot:b,smartMode:i.smart,initialPrompt:t,continueSession:i.continue||!1,cliAgentsJson:i.agents}));await F()}catch(s){j.error("Failed to start Compass",s),console.error(J.red("\u274C Failed to start Compass")),s instanceof Error&&console.error(J.red(` ${s.message}`)),process.exit(1)}}),n.command("setup").description("Run first-time setup wizard for consent and API key configuration").option("--compass-key <key>","Compass API key for authentication").option("--anthropic-key <key>","Anthropic API key (optional if already configured)").action(async t=>{try{if(await kc(al()),t.compassKey||t.anthropicKey){let{getCredentialStore:s}=await Promise.resolve().then(()=>(gA(),EB)),{getCompassAuthService:c}=await Promise.resolve().then(()=>(FB(),EHe)),p=await s();if(t.compassKey)try{console.log(J.gray("Validating Compass API key...")),await c().validateApiKey(t.compassKey),await p.setCompassApiKey(t.compassKey),console.log(J.green("\u2713 Compass API key validated and stored"))}catch(m){j.error("Failed to validate Compass API key",m),console.error(J.red("\u274C Invalid Compass API key")),m instanceof Error&&console.error(J.red(` ${m.message}`)),process.exit(1)}if(t.anthropicKey)try{if(console.log(J.gray("Storing Anthropic API key...")),!p.validateApiKeyFormat(t.anthropicKey))throw new Error('Invalid API key format. Anthropic API keys should start with "sk-ant-"');await p.setApiKey(t.anthropicKey),console.log(J.green("\u2713 Anthropic API key stored"))}catch(m){j.error("Failed to store Anthropic API key",m),console.error(J.red("\u274C Invalid Anthropic API key")),m instanceof Error&&console.error(J.red(` ${m.message}`)),process.exit(1)}console.log("")}console.log(Lre(Ooe));let{waitUntilExit:i}=ncr(icr.createElement(_st,{version:Ooe}));await i()}catch(i){j.error("Setup failed",i),console.error(J.red("\u274C Setup failed")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n.command("init").description("Initialize Compass in the current project directory").option("--cwd <path>","Run in a specific project directory").option("-f, --force","Overwrite existing .compass directory").action(async t=>{try{let i=_Q(t),s=Hu(i);if(await la(s)){if(!t.force){console.log(J.yellow("\u26A0\uFE0F Compass is already initialized in this project.")),console.log(J.gray(" Use --force to reinitialize."));return}console.log(J.gray("Reinitializing Compass..."))}await kc(s),await kc(`${s}/backups`),await kc(`${s}/cache`),await kc(`${s}/context`),console.log(J.green("\u2705 Initialized Compass in current project")),console.log(J.gray(` Created ${s}/`)),console.log(""),console.log(J.gray("Next steps:")),console.log(J.gray(` 1. Run "compass setup" if you haven't configured your API key`)),console.log(J.gray(' 2. Run "compass" to start an interactive session'))}catch(i){j.error("Init failed",i),console.error(J.red("\u274C Failed to initialize Compass")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n.addCommand(qor()),n.addCommand(tcr()),n.addCommand(rcr()),n.command("consent").description("Manage consent settings for data collection and telemetry").argument("[action]","Action to perform: status, review, revoke","status").action(async t=>{try{let i=await D6();switch(t.toLowerCase()){case"status":{let s=await i.getStatus();if(console.log(""),console.log(J.bold.white("\u{1F4CB} Consent Status")),console.log(J.dim("\u2500".repeat(40))),console.log(` ${J.gray("Valid:")} ${s.isValid?J.green("Yes"):J.red("No")}`),console.log(` ${J.gray("Version:")} ${s.version||J.gray("N/A")}`),console.log(` ${J.gray("Granted:")} ${s.grantedAt?new Date(s.grantedAt).toLocaleDateString():J.gray("N/A")}`),console.log(` ${J.gray("Expires:")} ${s.expiresAt?new Date(s.expiresAt).toLocaleDateString():J.gray("N/A")}`),s.daysUntilExpiry!==null){let c=s.daysUntilExpiry>30?"green":s.daysUntilExpiry>7?"yellow":"red";console.log(` ${J.gray("Days until expiry:")} ${J[c](s.daysUntilExpiry.toString())}`)}s.consent&&(console.log(""),console.log(J.bold.white(" Settings:")),console.log(` ${J.gray("Data Collection:")} ${s.consent.dataCollection?J.green("Enabled"):J.red("Disabled")}`),console.log(` ${J.gray("Telemetry:")} ${s.consent.telemetry?J.green("Enabled"):J.yellow("Disabled")}`),console.log(` ${J.gray("Analytics:")} ${s.consent.analytics?J.green("Enabled"):J.yellow("Disabled")}`),console.log(` ${J.gray("Error Reporting:")} ${s.consent.errorReporting?J.green("Enabled"):J.yellow("Disabled")}`)),s.needsRenewal&&(console.log(""),console.log(J.yellow('\u26A0\uFE0F Consent needs renewal. Run "compass setup" to update.'))),console.log("");break}case"review":{let s=i.getHistory();if(console.log(""),console.log(J.bold.white("\u{1F4DC} Consent History")),console.log(J.dim("\u2500".repeat(40))),s.length===0)console.log(J.gray(" No consent records found."));else for(let c of s.slice(-5))console.log(` ${J.gray("ID:")} ${c.id.slice(0,8)}...`),console.log(` ${J.gray("Version:")} ${c.version}`),console.log(` ${J.gray("Granted:")} ${new Date(c.grantedAt).toLocaleString()}`),console.log(J.dim(" \u2500".repeat(20)));console.log("");break}case"revoke":{console.log(""),console.log(J.yellow("\u26A0\uFE0F Revoking consent will delete all stored data.")),console.log(J.gray(" This action cannot be undone.")),console.log(""),await i.revokeConsent(),console.log(J.green("\u2705 Consent revoked and data cleaned up")),console.log(J.gray(' Run "compass setup" to reconfigure.')),console.log("");break}default:console.log(J.red(`Unknown action: ${t}`)),console.log(J.gray("Available actions: status, review, revoke")),process.exit(1)}}catch(i){j.error("Consent command failed",i),console.error(J.red("\u274C Consent command failed")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n.command("tokens").description("View token usage statistics and cost estimates").option("--export","Export usage data as JSON").option("--session","Show current session usage only").option("--reset","Reset token usage statistics").action(async t=>{try{let i=await Zg();if(t.export){let c=await i.exportUsage();console.log(JSON.stringify(c,null,2));return}if(t.reset){console.log(J.yellow("\u26A0\uFE0F This will reset all token usage statistics.")),console.log(J.gray(" Feature not yet implemented."));return}if(t.session){let c=i.getCurrentSessionUsage();if(!c){console.log(J.gray("No active session."));return}console.log(""),console.log(J.bold.white("\u{1F4CA} Current Session Token Usage")),console.log(J.dim("\u2500".repeat(40))),console.log(` ${J.gray("Session ID:")} ${c.sessionId.slice(0,8)}...`),console.log(` ${J.gray("Started:")} ${new Date(c.startTime).toLocaleString()}`),console.log(` ${J.gray("API Calls:")} ${c.calls.length}`),console.log(` ${J.gray("Input Tokens:")} ${c.totals.inputTokens.toLocaleString()}`),console.log(` ${J.gray("Output Tokens:")} ${c.totals.outputTokens.toLocaleString()}`),console.log(` ${J.gray("Total Tokens:")} ${J.bold(c.totals.totalTokens.toLocaleString())}`),console.log(` ${J.gray("Estimated Cost:")} ${J.green("$"+c.estimatedCost.totalCost.toFixed(4))}`),console.log("");return}let s=i.getAllTimeStats();console.log(""),console.log(J.bold.white("\u{1F4CA} Token Usage Statistics")),console.log(J.dim("\u2500".repeat(40))),console.log(` ${J.gray("Total API Calls:")} ${s.totalCalls.toLocaleString()}`),console.log(` ${J.gray("Total Tokens:")} ${s.totalTokens.toLocaleString()}`),console.log(` ${J.gray("Total Cost:")} ${J.green("$"+s.totalCost.toFixed(4))}`),console.log(""),console.log(J.bold.white(" Averages per Call:")),console.log(` ${J.gray("Input:")} ${s.averageInputTokens.toLocaleString()} tokens`),console.log(` ${J.gray("Output:")} ${s.averageOutputTokens.toLocaleString()} tokens`),console.log(""),console.log(J.bold.white(" Peak Usage:")),console.log(` ${J.gray("Input:")} ${s.peakInputTokens.toLocaleString()} tokens`),console.log(` ${J.gray("Output:")} ${s.peakOutputTokens.toLocaleString()} tokens`),console.log("")}catch(i){j.error("Tokens command failed",i),console.error(J.red("\u274C Tokens command failed")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n.command("data").description("Manage stored data (GDPR compliance)").argument("[action]","Action to perform: list, export, delete","list").option("--cwd <path>","Run in a specific project directory").option("-o, --output <file>","Output file for export").action(async(t,i)=>{try{let s=await D6();switch(t.toLowerCase()){case"list":{console.log(""),console.log(J.bold.white("\u{1F4C1} Stored Data")),console.log(J.dim("\u2500".repeat(40)));let c=al(),p=Hu(_Q(i));console.log(J.bold.cyan(" Global Data:")),console.log(` ${J.gray("Location:")} ${c}`),console.log(` ${J.gray("Contents:")} config, credentials, consent, token usage, logs`),await la(p)&&(console.log(""),console.log(J.bold.cyan(" Project Data:")),console.log(` ${J.gray("Location:")} ${p}`),console.log(` ${J.gray("Contents:")} session state, backups, cache, context index`)),console.log(""),console.log(J.gray('Use "compass data export" to export all data')),console.log(J.gray('Use "compass consent revoke" to delete all data')),console.log("");break}case"export":{let c=await s.exportUserData(),p=JSON.stringify(c,null,2);if(i.output){let{safeWriteFile:m}=await Promise.resolve().then(()=>(Md(),cye));await m(i.output,p),console.log(J.green(`\u2705 Data exported to ${i.output}`))}else console.log(p);break}case"delete":{console.log(J.yellow('\u26A0\uFE0F To delete all data, use "compass consent revoke"'));break}default:console.log(J.red(`Unknown action: ${t}`)),console.log(J.gray("Available actions: list, export, delete")),process.exit(1)}}catch(s){j.error("Data command failed",s),console.error(J.red("\u274C Data command failed")),s instanceof Error&&console.error(J.red(` ${s.message}`)),process.exit(1)}}),n.command("cache").description("Manage cached data").argument("[action]","Action to perform: clear, status","status").option("--cwd <path>","Run in a specific project directory").action(async(t,i)=>{try{let s=Hu(_Q(i)),c=`${s}/cache`,p=`${s}/context`;switch(t.toLowerCase()){case"status":{console.log(""),console.log(J.bold.white("\u{1F4BE} Cache Status")),console.log(J.dim("\u2500".repeat(40))),await la(c)?(console.log(` ${J.gray("Cache directory:")} ${c}`),console.log(` ${J.green("\u2713")} Cache directory exists`)):console.log(` ${J.gray("Cache directory:")} ${J.yellow("Not initialized")}`),await la(p)?(console.log(` ${J.gray("Context index:")} ${p}`),console.log(` ${J.green("\u2713")} Context index exists`)):console.log(` ${J.gray("Context index:")} ${J.yellow("Not initialized")}`),console.log(""),console.log(J.gray('Use "compass cache clear" to clear all cached data')),console.log("");break}case"clear":{let m=!1;await la(c)&&(await d0(c),await kc(c),console.log(J.green("\u2705 Cache cleared")),m=!0),await la(p)&&(await d0(p),await kc(p),console.log(J.green("\u2705 Context index cleared")),m=!0),m||console.log(J.gray("No cache to clear."));break}default:console.log(J.red(`Unknown action: ${t}`)),console.log(J.gray("Available actions: status, clear")),process.exit(1)}}catch(s){j.error("Cache command failed",s),console.error(J.red("\u274C Cache command failed")),s instanceof Error&&console.error(J.red(` ${s.message}`)),process.exit(1)}}),n.command("update").description("Check for and install updates").argument("[action]","Action to perform: check, install, history","check").option("-f, --force","Force update check (ignore interval)").option("--npm","Use npm for installation").option("--yarn","Use yarn for installation").option("--pnpm","Use pnpm for installation").action(async(t,i)=>{try{let s=await t9();switch(t.toLowerCase()){case"check":{console.log(""),console.log(J.cyan("Checking for updates..."));let c=await s.checkForUpdates(i.force);c.error?console.log(J.red(`Failed to check for updates: ${c.error}`)):c.updateAvailable&&c.latestVersion?s.displayUpdateNotification(c):(console.log(""),console.log(J.green(`You are on the latest version (${c.currentVersion})`)),console.log(""));break}case"install":{let c=i.npm?"npm":i.yarn?"yarn":i.pnpm?"pnpm":await s.detectPackageManager();await s.performUpdate(c);break}case"history":{let c=s.getUpdateHistory();if(console.log(""),console.log(J.bold.cyan("Update History")),console.log(J.dim("\u2500".repeat(40))),c.length===0)console.log(""),console.log(J.gray(" No update history recorded.")),console.log("");else{console.log("");for(let p of c.slice().reverse()){let m=p.success?J.green("\u2713"):J.red("\u2717"),b=p.success?J.green:J.red;console.log(` ${m} ${J.gray(new Date(p.updatedAt).toLocaleDateString())}`),console.log(` ${J.gray("From:")} ${p.fromVersion} ${J.gray("\u2192")} ${b(p.toVersion)}`),console.log(` ${J.gray("Method:")} ${p.method}`),p.error&&console.log(` ${J.red("Error:")} ${p.error}`),console.log("")}}break}default:console.log(J.red(`Unknown action: ${t}`)),console.log(J.gray("Available actions: check, install, history")),process.exit(1)}}catch(s){j.error("Update command failed",s),console.error(J.red("\u274C Update command failed")),s instanceof Error&&console.error(J.red(` ${s.message}`)),process.exit(1)}}),n.command("reset").description("Reset Compass to factory settings").option("--cwd <path>","Run in a specific project directory").option("-f, --force","Skip confirmation prompt").option("--global","Reset global settings only").option("--project","Reset project settings only").action(async t=>{try{if(!t.force){console.log(""),console.log(J.red("\u26A0\uFE0F WARNING: This will delete all Compass data!")),console.log(J.gray(" This action cannot be undone.")),console.log(""),console.log(J.gray(" Use --force to confirm this action.")),console.log("");return}if(t.project&&!t.global){let c=Hu(_Q(t));await la(c)?(await d0(c),console.log(J.green("\u2705 Project settings reset"))):console.log(J.gray("No project settings to reset."));return}if(t.global&&!t.project){let c=al();await la(c)?(await d0(c),console.log(J.green("\u2705 Global settings reset"))):console.log(J.gray("No global settings to reset."));return}let i=al(),s=Hu(_Q(t));await la(i)&&await d0(i),await la(s)&&await d0(s),console.log(J.green("\u2705 Compass has been reset to factory settings")),console.log(J.gray(' Run "compass setup" to reconfigure.'))}catch(i){j.error("Reset failed",i),console.error(J.red("\u274C Reset failed")),i instanceof Error&&console.error(J.red(` ${i.message}`)),process.exit(1)}}),n}async function B9n(){try{let n=J9n();process.on("uncaughtException",t=>{j.error("Uncaught exception",t),console.error(J.red("\u274C An unexpected error occurred")),t instanceof Error&&console.error(J.red(` ${t.message}`)),process.exit(1)}),process.on("unhandledRejection",t=>{j.error("Unhandled rejection",t),console.error(J.red("\u274C An unexpected error occurred")),t instanceof Error&&console.error(J.red(` ${t.message}`)),process.exit(1)}),await n.parseAsync(process.argv)}catch(n){j.error("CLI error",n),console.error(J.red("\u274C CLI error")),n instanceof Error&&console.error(J.red(` ${n.message}`)),process.exit(1)}}B9n();
3133
3133
  /*! Bundled license information:
3134
3134
 
3135
3135
  web-streams-polyfill/dist/ponyfill.mjs:
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var hvr=Object.create;var $fe=Object.defineProperty;var gvr=Object.getOwnPropertyDescriptor;var yvr=Object.getOwnPropertyNames;var Ivr=Object.getPrototypeOf,bvr=Object.prototype.hasOwnProperty;var hs=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(r,n)=>(typeof require<"u"?require:r)[n]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var ar=(i,r)=>()=>(i&&(r=i(i=0)),r);var ut=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports),nN=(i,r)=>{for(var n in r)$fe(i,n,{get:r[n],enumerable:!0})},Nyt=(i,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of yvr(r))!bvr.call(i,l)&&l!==n&&$fe(i,l,{get:()=>r[l],enumerable:!(o=gvr(r,l))||o.enumerable});return i};var To=(i,r,n)=>(n=i!=null?hvr(Ivr(i)):{},Nyt(r||!i||!i.__esModule?$fe(n,"default",{value:i,enumerable:!0}):n,i)),vvr=i=>Nyt($fe({},"__esModule",{value:!0}),i);function kyt(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.dataCollection=="boolean"&&typeof r.telemetry=="boolean"&&typeof r.analytics=="boolean"&&typeof r.errorReporting=="boolean"}function Nvr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.id=="string"&&typeof r.version=="string"&&typeof r.grantedAt=="string"&&typeof r.expiresAt=="string"&&kyt(r.consent)}function kvr(){return{dataCollection:Kfe.dataCollection.defaultValue,telemetry:Kfe.telemetry.defaultValue,analytics:Kfe.analytics.defaultValue,errorReporting:Kfe.errorReporting.defaultValue}}function Fvr(){return{dataCollection:!0,telemetry:!0,analytics:!0,errorReporting:!0}}function Rvr(){return{dataCollection:!0,telemetry:!1,analytics:!1,errorReporting:!1}}var ZVe,Kfe,DVe=ar(()=>{"use strict";ZVe="1.0.0",Kfe={dataCollection:{title:"Data Collection",description:"Allow Compass to store conversation history and session data locally for improved functionality.",required:!0,defaultValue:!0},telemetry:{title:"Anonymous Telemetry",description:"Help improve Compass by sending anonymous usage statistics.",required:!1,defaultValue:!1},analytics:{title:"Analytics",description:"Allow collection of feature usage patterns to improve the product.",required:!1,defaultValue:!1},errorReporting:{title:"Error Reporting",description:"Automatically send error reports to help fix bugs.",required:!1,defaultValue:!0}}});var AY,SY=ar(()=>{"use strict";AY=(l=>(l.MANUAL="manual",l.AUTO="auto",l.STRICT="strict",l.SMART="smart",l))(AY||{})});var vq,PVe,eme,xq=ar(()=>{"use strict";vq=(h=>(h.DIRECT="direct",h.CLARIFICATION="clarification",h.TODO_LIST="todo_list",h.PLAN="plan",h.PLAN_ADOPT="plan_adopt",h.NO_ACTION="no_action",h))(vq||{}),PVe=(v=>(v.PENDING="pending",v.IN_PROGRESS="in_progress",v.PAUSED="paused",v.COMPLETED="completed",v.FAILED="failed",v.SKIPPED="skipped",v.ROLLED_BACK="rolled_back",v))(PVe||{}),eme=(P=>(P.IDLE="idle",P.CONTEXT_GATHERING="context_gathering",P.COMPLEXITY_ASSESSMENT="complexity_assessment",P.CLARIFICATION="clarification",P.PLAN_GENERATION="plan_generation",P.PLAN_REVIEW="plan_review",P.EXECUTION="execution",P.VERIFICATION="verification",P.COMPLETED="completed",P.FAILED="failed",P))(eme||{})});function YVe(i){return typeof i=="string"&&["default","acceptEditsAsk","bypassPermissions","plan","ignore","acceptEdits","dontAsk"].includes(i)}function Mvr(i){return typeof i=="string"&&["project","cli","user","builtin"].includes(i)}function OVe(i){if(typeof i!="object"||i===null)return!1;let r=i;return!(typeof r.name!="string"||r.name.length===0||typeof r.description!="string"||r.description.length===0||r.tools!==void 0&&typeof r.tools!="string"||r.disallowedTools!==void 0&&typeof r.disallowedTools!="string"||r.model!==void 0&&typeof r.model!="string"||r.permissionMode!==void 0&&!YVe(r.permissionMode)||r.skills!==void 0&&typeof r.skills!="string"||r.standalone!==void 0&&typeof r.standalone!="boolean"||r.mcpServers!==void 0&&typeof r.mcpServers!="string")}function Yvr(i){if(typeof i!="object"||i===null)return!1;let r=i;return!(typeof r.description!="string"||typeof r.prompt!="string"||r.tools!==void 0&&!Array.isArray(r.tools)||r.disallowedTools!==void 0&&!Array.isArray(r.disallowedTools)||r.model!==void 0&&typeof r.model!="string"||r.permissionMode!==void 0&&!YVe(r.permissionMode)||r.skills!==void 0&&!Array.isArray(r.skills)||r.standalone!==void 0&&typeof r.standalone!="boolean"||r.mcpServers!==void 0&&!Array.isArray(r.mcpServers))}function Ovr(i,r,n,o="builtin"){return{id:`${o}-${i}`,name:i,description:r,systemPrompt:n,source:o,permissionMode:"default",isActive:!0,rawFrontmatter:{name:i,description:r}}}function GY(i){if(!(!i||i.trim()===""))return i.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function Hvr(i){if(!(!i||i.length===0))return i.join(", ")}function MVe(i){return tme.indexOf(i)}function Jvr(i,r){return MVe(i.source)-MVe(r.source)}var tme,HVe=ar(()=>{"use strict";tme=["builtin","user","cli","project"]});var Jyt={};nN(Jyt,{CLAUDE_MODELS:()=>Sw,MODEL_ALIASES:()=>wq,calculateModelCost:()=>Dyt,compareModels:()=>Pyt,getAvailableAliases:()=>Ryt,getAvailableModelIds:()=>Fyt,getAvailableModels:()=>EY,getCheapestModel:()=>Yyt,getDefaultModel:()=>Vyt,getDefaultModelId:()=>Zyt,getModelConfig:()=>Aw,getModelDescription:()=>rme,getModelTier:()=>Hyt,getModelsByCapability:()=>Myt,getMostCapableModel:()=>Oyt,isValidModel:()=>Wyt,resolveModelId:()=>Gw});function Gw(i){let r=i.toLowerCase();if(wq[r])return wq[r];for(let n of Object.keys(Sw))if(n.toLowerCase()===r)return n;return i}function Aw(i){let r=Gw(i);return Sw[r]}function EY(){return Object.values(Sw)}function Fyt(){return Object.keys(Sw)}function Ryt(){return Object.keys(wq)}function Wyt(i){return Gw(i)in Sw}function Vyt(){return Sw["claude-sonnet-4-5-20250929"]}function Zyt(){return"claude-sonnet-4-5-20250929"}function Dyt(i,r,n){let o=Aw(i);if(!o)return null;let l=r/1e6*o.pricing.inputPricePerMillion,f=n/1e6*o.pricing.outputPricePerMillion;return l+f}function Pyt(i,r,n){let o=Aw(i),l=Aw(r);if(!o||!l)return 0;switch(n){case"price":return o.pricing.inputPricePerMillion-l.pricing.inputPricePerMillion;case"context":return l.contextWindow-o.contextWindow;case"speed":return l.pricing.inputPricePerMillion-o.pricing.inputPricePerMillion;default:return 0}}function Myt(i){return EY().filter(r=>r.capabilities[i])}function Yyt(){return EY().reduce((r,n)=>n.pricing.inputPricePerMillion<r.pricing.inputPricePerMillion?n:r)}function Oyt(){return Sw["claude-opus-4-5-20251101"]}function Hyt(i){let r=Gw(i);if(r.includes("haiku"))return"economy";if(r.includes("sonnet"))return"balanced";if(r.includes("opus"))return"premium"}function rme(i){let r=Gw(i);if(r.includes("opus"))return"Most capable model - best for complex reasoning, analysis, and extended thinking";if(r.includes("sonnet"))return"Balanced performance and cost - ideal for most coding tasks";if(r.includes("haiku"))return"Fastest and most economical - great for quick responses and simple tasks"}var Sw,wq,TW=ar(()=>{"use strict";Sw={"claude-sonnet-4-5-20250929":{id:"claude-sonnet-4-5-20250929",name:"Claude Sonnet 4.5",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1}},"claude-opus-4-5-20251101":{id:"claude-opus-4-5-20251101",name:"Claude Opus 4.5",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:15,outputPricePerMillion:75},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!0}},"claude-haiku-4-5-20251001":{id:"claude-haiku-4-5-20251001",name:"Claude Haiku 4.5",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:.25,outputPricePerMillion:1.25},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1}}},wq={sonnet:"claude-sonnet-4-5-20250929",opus:"claude-opus-4-5-20251101",haiku:"claude-haiku-4-5-20251001",fast:"claude-haiku-4-5-20251001",quick:"claude-haiku-4-5-20251001",smart:"claude-sonnet-4-5-20250929",balanced:"claude-sonnet-4-5-20250929",powerful:"claude-opus-4-5-20251101",best:"claude-opus-4-5-20251101",s:"claude-sonnet-4-5-20250929",o:"claude-opus-4-5-20251101",h:"claude-haiku-4-5-20251001"}});var Aq,Sq,CY,nme,JVe,Gq,LVe,XVe,Uvr,TY,QVe,jvr,UVe,jVe,iN,BVe,zVe,Bvr,zvr,qvr,qVe,$Ve,KVe,ime,$vr,Kvr,sme,e7e,Eq,exr,txr,rxr,nxr,l4,NY,t7e,ixr,sxr,axr,oxr,cxr,wE,u4,lxr,uxr,pxr,dxr,fxr,r7e,n7e,mxr,Um=ar(()=>{"use strict";Aq=".compass",Sq=".compass",CY="config.json",nme="session.json",JVe="consent.json",Gq="credentials.enc",LVe="logs",XVe="backups",Uvr="cache",TY="saved-sessions",QVe="index",jvr="context",UVe="commands",jVe="agents",iN=16384,BVe=5e4,zVe=5e4,Bvr=80,zvr=10,qvr=30,qVe=30,$Ve=365,KVe=6e4,ime=3e4,$vr=50,Kvr=1048576,sme=100,e7e=8e3,Eq=4e3,exr=6e3,txr=90,rxr=1e5,nxr=524288e3,l4="claude-sonnet-4-5-20250929",NY=.6,t7e="haiku",ixr="banner",sxr=4,axr=1e3,oxr=16e3,cxr=.1,wE={anthropic:{model:l4,maxTokens:16384,temperature:.6},project:{rootDir:process.cwd(),ignorePatterns:["node_modules/**",".git/**","dist/**","build/**","out/**","coverage/**",".next/**",".nuxt/**",".output/**","*.log",".env*","*.lock","package-lock.json","yarn.lock","pnpm-lock.yaml",".DS_Store","Thumbs.db","*.min.js","*.min.css","*.map",".compass/**"],includePatterns:["**/*"],maxFileSize:1048576,indexOnStartup:!0},safety:{requireApproval:!0,autoApprovePatterns:[],blockedPatterns:[".env*","*.key","*.pem","*.p12","*.pfx","secrets/**","**/secrets/**","**/*.secret","**/credentials*","**/password*"],maxFilesPerOperation:50,backupBeforeModify:!0,shellCommandTimeout:3e4,allowedShellCommands:["npm","npx","yarn","pnpm","git","node","tsc","eslint","prettier","jest","vitest","mocha","cargo","rustc","go","python","python3","pip","pip3","poetry","make","cmake","gradle","mvn","docker","kubectl","terraform","aws","gcloud","az","cat","ls","pwd","echo","head","tail","grep","find","wc","sort","uniq","diff","tree"],blockedShellCommands:["rm -rf /","rm -rf /*","rm -rf ~","rm -rf ~/*","sudo rm -rf",":(){:|:&};:","mkfs","dd if=/dev/zero","dd if=/dev/random","> /dev/sda","chmod -R 777 /","chown -R","wget | sh","curl | sh","wget | bash","curl | bash"]},ui:{theme:"auto",showTokenUsage:!0,showTimestamps:!1,compactMode:!1,animationsEnabled:!0,colorOutput:!0},session:{autoSave:!0,autoSaveInterval:6e4,maxHistoryLength:100,autoCompactThreshold:5e4,sessionExpiryDays:30},update:{checkOnStartup:!0,checkInterval:24,showNotifications:!0,notificationStyle:ixr,includePrerelease:!1},agentic:{maxIterations:200,costWarningThreshold:5,costHardCap:0,autoCompactAtPercent:80,stuckDetectionEnabled:!0,stuckDetectionThreshold:3,maxIterationsPerTask:50}},u4={API_KEY:"ANTHROPIC_API_KEY",COMPASS_API_KEY:"COMPASS_API_KEY",MODEL:"COMPASS_MODEL",CONFIG_PATH:"COMPASS_CONFIG",DEBUG:"COMPASS_DEBUG",NO_COLOR:"NO_COLOR",FORCE_COLOR:"FORCE_COLOR",HOME:"HOME",USERPROFILE:"USERPROFILE"},lxr="1.0.32",uxr="Compass CLI",pxr="Agentic CLI by Compass Agentic Platform",dxr="1.0.0",fxr={".ts":"typescript",".tsx":"typescript",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".rb":"ruby",".go":"go",".rs":"rust",".java":"java",".kt":"kotlin",".scala":"scala",".cs":"csharp",".fs":"fsharp",".cpp":"cpp",".cc":"cpp",".cxx":"cpp",".c":"c",".h":"c",".hpp":"cpp",".swift":"swift",".php":"php",".pl":"perl",".pm":"perl",".sh":"bash",".bash":"bash",".zsh":"zsh",".fish":"fish",".ps1":"powershell",".sql":"sql",".r":"r",".R":"r",".lua":"lua",".vim":"vim",".el":"elisp",".clj":"clojure",".cljs":"clojure",".ex":"elixir",".exs":"elixir",".erl":"erlang",".hrl":"erlang",".hs":"haskell",".ml":"ocaml",".mli":"ocaml",".nim":"nim",".zig":"zig",".v":"v",".d":"d",".dart":"dart",".groovy":"groovy",".gradle":"groovy",".json":"json",".yaml":"yaml",".yml":"yaml",".toml":"toml",".xml":"xml",".html":"html",".htm":"html",".css":"css",".scss":"scss",".sass":"sass",".less":"less",".md":"markdown",".mdx":"markdown",".rst":"restructuredtext",".tex":"latex",".dockerfile":"dockerfile",".tf":"terraform",".hcl":"hcl",".proto":"protobuf",".graphql":"graphql",".gql":"graphql",".vue":"vue",".svelte":"svelte",".astro":"astro"},r7e=["package-lock.json","yarn.lock","pnpm-lock.yaml","composer.lock","Gemfile.lock","poetry.lock","Cargo.lock","go.sum","*.map","*.js.map","*.css.map","*.min.js","*.min.css","*.bundle.js","*.chunk.js","*.sql","*.csv","**/__snapshots__/**","**/fixtures/**/*.json","*.d.ts.map"],n7e=["node_modules",".git","dist","build","out","coverage",".next",".nuxt",".output",".cache",".parcel-cache","vendor","__pycache__",".pytest_cache","target","bin","obj"],mxr=[".png",".jpg",".jpeg",".gif",".bmp",".ico",".webp",".svg",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".bin",".dat",".db",".sqlite",".sqlite3",".woff",".woff2",".ttf",".otf",".eot",".mp3",".mp4",".wav",".avi",".mov",".mkv",".webm",".flv",".class",".jar",".war",".ear",".pyc",".pyo",".o",".obj",".a",".lib"]});var Uyt=ut((lpn,i7e)=>{"use strict";var Lyt=hs("path"),Xyt=hs("module"),_xr=hs("fs"),Qyt=(i,r,n)=>{if(typeof i!="string")throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof i}\``);if(typeof r!="string")throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof r}\``);try{i=_xr.realpathSync(i)}catch(f){if(f.code==="ENOENT")i=Lyt.resolve(i);else{if(n)return null;throw f}}let o=Lyt.join(i,"noop.js"),l=()=>Xyt._resolveFilename(r,{id:o,filename:o,paths:Xyt._nodeModulePaths(i)});if(n)try{return l()}catch{return null}return l()};i7e.exports=(i,r)=>Qyt(i,r);i7e.exports.silent=(i,r)=>Qyt(i,r,!0)});var Byt=ut((upn,s7e)=>{"use strict";var jyt=()=>{let i=Error.prepareStackTrace;Error.prepareStackTrace=(n,o)=>o;let r=new Error().stack.slice(1);return Error.prepareStackTrace=i,r};s7e.exports=jyt;s7e.exports.default=jyt});var qyt=ut((ppn,zyt)=>{"use strict";var hxr=Byt();zyt.exports=i=>{let r=hxr();if(!i)return r[2].getFileName();let n=!1;r.shift();for(let o of r){let l=o.getFileName();if(typeof l=="string"){if(l===i){n=!0;continue}if(l!=="module.js"&&n&&l!==i)return l}}}});var Kyt=ut((dpn,$yt)=>{"use strict";var gxr=hs("path"),yxr=Uyt(),Ixr=qyt();$yt.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");let r=Ixr(__filename),n=r?gxr.dirname(r):__dirname,o=yxr(n,i),l=hs.cache[o];if(l&&l.parent){let h=l.parent.children.length;for(;h--;)l.parent.children[h].id===o&&l.parent.children.splice(h,1)}delete hs.cache[o];let f=hs.cache[r];return f===void 0||f.require===void 0?hs(o):f.require(o)}});var tIt=ut((mpn,eIt)=>{"use strict";eIt.exports=function(r){return r?r instanceof Array||Array.isArray(r)||r.length>=0&&r.splice instanceof Function:!1}});var nIt=ut((_pn,rIt)=>{"use strict";var bxr=hs("util"),vxr=tIt(),a7e=function(r,n){(!r||r.constructor!==String)&&(n=r||{},r=Error.name);var o=function l(f){if(!this)return new l(f);f=f instanceof Error?f.message:f||this.message,Error.call(this,f),Error.captureStackTrace(this,o),this.name=r,Object.defineProperty(this,"message",{configurable:!0,enumerable:!1,get:function(){var P=f.split(/\r?\n/g);for(var Q in n)if(n.hasOwnProperty(Q)){var M=n[Q];"message"in M&&(P=M.message(this[Q],P)||P,vxr(P)||(P=[P]))}return P.join(`
1
+ var hvr=Object.create;var $fe=Object.defineProperty;var gvr=Object.getOwnPropertyDescriptor;var yvr=Object.getOwnPropertyNames;var Ivr=Object.getPrototypeOf,bvr=Object.prototype.hasOwnProperty;var hs=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(r,n)=>(typeof require<"u"?require:r)[n]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var ar=(i,r)=>()=>(i&&(r=i(i=0)),r);var ut=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports),nN=(i,r)=>{for(var n in r)$fe(i,n,{get:r[n],enumerable:!0})},Nyt=(i,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of yvr(r))!bvr.call(i,l)&&l!==n&&$fe(i,l,{get:()=>r[l],enumerable:!(o=gvr(r,l))||o.enumerable});return i};var To=(i,r,n)=>(n=i!=null?hvr(Ivr(i)):{},Nyt(r||!i||!i.__esModule?$fe(n,"default",{value:i,enumerable:!0}):n,i)),vvr=i=>Nyt($fe({},"__esModule",{value:!0}),i);function kyt(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.dataCollection=="boolean"&&typeof r.telemetry=="boolean"&&typeof r.analytics=="boolean"&&typeof r.errorReporting=="boolean"}function Nvr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.id=="string"&&typeof r.version=="string"&&typeof r.grantedAt=="string"&&typeof r.expiresAt=="string"&&kyt(r.consent)}function kvr(){return{dataCollection:Kfe.dataCollection.defaultValue,telemetry:Kfe.telemetry.defaultValue,analytics:Kfe.analytics.defaultValue,errorReporting:Kfe.errorReporting.defaultValue}}function Fvr(){return{dataCollection:!0,telemetry:!0,analytics:!0,errorReporting:!0}}function Rvr(){return{dataCollection:!0,telemetry:!1,analytics:!1,errorReporting:!1}}var ZVe,Kfe,DVe=ar(()=>{"use strict";ZVe="1.0.0",Kfe={dataCollection:{title:"Data Collection",description:"Allow Compass to store conversation history and session data locally for improved functionality.",required:!0,defaultValue:!0},telemetry:{title:"Anonymous Telemetry",description:"Help improve Compass by sending anonymous usage statistics.",required:!1,defaultValue:!1},analytics:{title:"Analytics",description:"Allow collection of feature usage patterns to improve the product.",required:!1,defaultValue:!1},errorReporting:{title:"Error Reporting",description:"Automatically send error reports to help fix bugs.",required:!1,defaultValue:!0}}});var AY,SY=ar(()=>{"use strict";AY=(l=>(l.MANUAL="manual",l.AUTO="auto",l.STRICT="strict",l.SMART="smart",l))(AY||{})});var vq,PVe,eme,xq=ar(()=>{"use strict";vq=(h=>(h.DIRECT="direct",h.CLARIFICATION="clarification",h.TODO_LIST="todo_list",h.PLAN="plan",h.PLAN_ADOPT="plan_adopt",h.NO_ACTION="no_action",h))(vq||{}),PVe=(v=>(v.PENDING="pending",v.IN_PROGRESS="in_progress",v.PAUSED="paused",v.COMPLETED="completed",v.FAILED="failed",v.SKIPPED="skipped",v.ROLLED_BACK="rolled_back",v))(PVe||{}),eme=(P=>(P.IDLE="idle",P.CONTEXT_GATHERING="context_gathering",P.COMPLEXITY_ASSESSMENT="complexity_assessment",P.CLARIFICATION="clarification",P.PLAN_GENERATION="plan_generation",P.PLAN_REVIEW="plan_review",P.EXECUTION="execution",P.VERIFICATION="verification",P.COMPLETED="completed",P.FAILED="failed",P))(eme||{})});function YVe(i){return typeof i=="string"&&["default","acceptEditsAsk","bypassPermissions","plan","ignore","acceptEdits","dontAsk"].includes(i)}function Mvr(i){return typeof i=="string"&&["project","cli","user","builtin"].includes(i)}function OVe(i){if(typeof i!="object"||i===null)return!1;let r=i;return!(typeof r.name!="string"||r.name.length===0||typeof r.description!="string"||r.description.length===0||r.tools!==void 0&&typeof r.tools!="string"||r.disallowedTools!==void 0&&typeof r.disallowedTools!="string"||r.model!==void 0&&typeof r.model!="string"||r.permissionMode!==void 0&&!YVe(r.permissionMode)||r.skills!==void 0&&typeof r.skills!="string"||r.standalone!==void 0&&typeof r.standalone!="boolean"||r.mcpServers!==void 0&&typeof r.mcpServers!="string")}function Yvr(i){if(typeof i!="object"||i===null)return!1;let r=i;return!(typeof r.description!="string"||typeof r.prompt!="string"||r.tools!==void 0&&!Array.isArray(r.tools)||r.disallowedTools!==void 0&&!Array.isArray(r.disallowedTools)||r.model!==void 0&&typeof r.model!="string"||r.permissionMode!==void 0&&!YVe(r.permissionMode)||r.skills!==void 0&&!Array.isArray(r.skills)||r.standalone!==void 0&&typeof r.standalone!="boolean"||r.mcpServers!==void 0&&!Array.isArray(r.mcpServers))}function Ovr(i,r,n,o="builtin"){return{id:`${o}-${i}`,name:i,description:r,systemPrompt:n,source:o,permissionMode:"default",isActive:!0,rawFrontmatter:{name:i,description:r}}}function GY(i){if(!(!i||i.trim()===""))return i.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function Hvr(i){if(!(!i||i.length===0))return i.join(", ")}function MVe(i){return tme.indexOf(i)}function Jvr(i,r){return MVe(i.source)-MVe(r.source)}var tme,HVe=ar(()=>{"use strict";tme=["builtin","user","cli","project"]});var Jyt={};nN(Jyt,{CLAUDE_MODELS:()=>Sw,MODEL_ALIASES:()=>wq,calculateModelCost:()=>Dyt,compareModels:()=>Pyt,getAvailableAliases:()=>Ryt,getAvailableModelIds:()=>Fyt,getAvailableModels:()=>EY,getCheapestModel:()=>Yyt,getDefaultModel:()=>Vyt,getDefaultModelId:()=>Zyt,getModelConfig:()=>Aw,getModelDescription:()=>rme,getModelTier:()=>Hyt,getModelsByCapability:()=>Myt,getMostCapableModel:()=>Oyt,isValidModel:()=>Wyt,resolveModelId:()=>Gw});function Gw(i){let r=i.toLowerCase();if(wq[r])return wq[r];for(let n of Object.keys(Sw))if(n.toLowerCase()===r)return n;return i}function Aw(i){let r=Gw(i);return Sw[r]}function EY(){return Object.values(Sw)}function Fyt(){return Object.keys(Sw)}function Ryt(){return Object.keys(wq)}function Wyt(i){return Gw(i)in Sw}function Vyt(){return Sw["claude-sonnet-4-5-20250929"]}function Zyt(){return"claude-sonnet-4-5-20250929"}function Dyt(i,r,n){let o=Aw(i);if(!o)return null;let l=r/1e6*o.pricing.inputPricePerMillion,f=n/1e6*o.pricing.outputPricePerMillion;return l+f}function Pyt(i,r,n){let o=Aw(i),l=Aw(r);if(!o||!l)return 0;switch(n){case"price":return o.pricing.inputPricePerMillion-l.pricing.inputPricePerMillion;case"context":return l.contextWindow-o.contextWindow;case"speed":return l.pricing.inputPricePerMillion-o.pricing.inputPricePerMillion;default:return 0}}function Myt(i){return EY().filter(r=>r.capabilities[i])}function Yyt(){return EY().reduce((r,n)=>n.pricing.inputPricePerMillion<r.pricing.inputPricePerMillion?n:r)}function Oyt(){return Sw["claude-opus-4-5-20251101"]}function Hyt(i){let r=Gw(i);if(r.includes("haiku"))return"economy";if(r.includes("sonnet"))return"balanced";if(r.includes("opus"))return"premium"}function rme(i){let r=Gw(i);if(r.includes("opus"))return"Most capable model - best for complex reasoning, analysis, and extended thinking";if(r.includes("sonnet"))return"Balanced performance and cost - ideal for most coding tasks";if(r.includes("haiku"))return"Fastest and most economical - great for quick responses and simple tasks"}var Sw,wq,TW=ar(()=>{"use strict";Sw={"claude-sonnet-4-5-20250929":{id:"claude-sonnet-4-5-20250929",name:"Claude Sonnet 4.5",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1}},"claude-opus-4-5-20251101":{id:"claude-opus-4-5-20251101",name:"Claude Opus 4.5",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:15,outputPricePerMillion:75},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!0}},"claude-haiku-4-5-20251001":{id:"claude-haiku-4-5-20251001",name:"Claude Haiku 4.5",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:.25,outputPricePerMillion:1.25},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1}}},wq={sonnet:"claude-sonnet-4-5-20250929",opus:"claude-opus-4-5-20251101",haiku:"claude-haiku-4-5-20251001",fast:"claude-haiku-4-5-20251001",quick:"claude-haiku-4-5-20251001",smart:"claude-sonnet-4-5-20250929",balanced:"claude-sonnet-4-5-20250929",powerful:"claude-opus-4-5-20251101",best:"claude-opus-4-5-20251101",s:"claude-sonnet-4-5-20250929",o:"claude-opus-4-5-20251101",h:"claude-haiku-4-5-20251001"}});var Aq,Sq,CY,nme,JVe,Gq,LVe,XVe,Uvr,TY,QVe,jvr,UVe,jVe,iN,BVe,zVe,Bvr,zvr,qvr,qVe,$Ve,KVe,ime,$vr,Kvr,sme,e7e,Eq,exr,txr,rxr,nxr,l4,NY,t7e,ixr,sxr,axr,oxr,cxr,wE,u4,lxr,uxr,pxr,dxr,fxr,r7e,n7e,mxr,Um=ar(()=>{"use strict";Aq=".compass",Sq=".compass",CY="config.json",nme="session.json",JVe="consent.json",Gq="credentials.enc",LVe="logs",XVe="backups",Uvr="cache",TY="saved-sessions",QVe="index",jvr="context",UVe="commands",jVe="agents",iN=16384,BVe=5e4,zVe=5e4,Bvr=80,zvr=10,qvr=30,qVe=30,$Ve=365,KVe=6e4,ime=3e4,$vr=50,Kvr=1048576,sme=100,e7e=8e3,Eq=4e3,exr=6e3,txr=90,rxr=1e5,nxr=524288e3,l4="claude-sonnet-4-5-20250929",NY=.6,t7e="haiku",ixr="banner",sxr=4,axr=1e3,oxr=16e3,cxr=.1,wE={anthropic:{model:l4,maxTokens:16384,temperature:.6},project:{rootDir:process.cwd(),ignorePatterns:["node_modules/**",".git/**","dist/**","build/**","out/**","coverage/**",".next/**",".nuxt/**",".output/**","*.log",".env*","*.lock","package-lock.json","yarn.lock","pnpm-lock.yaml",".DS_Store","Thumbs.db","*.min.js","*.min.css","*.map",".compass/**"],includePatterns:["**/*"],maxFileSize:1048576,indexOnStartup:!0},safety:{requireApproval:!0,autoApprovePatterns:[],blockedPatterns:[".env*","*.key","*.pem","*.p12","*.pfx","secrets/**","**/secrets/**","**/*.secret","**/credentials*","**/password*"],maxFilesPerOperation:50,backupBeforeModify:!0,shellCommandTimeout:3e4,allowedShellCommands:["npm","npx","yarn","pnpm","git","node","tsc","eslint","prettier","jest","vitest","mocha","cargo","rustc","go","python","python3","pip","pip3","poetry","make","cmake","gradle","mvn","docker","kubectl","terraform","aws","gcloud","az","cat","ls","pwd","echo","head","tail","grep","find","wc","sort","uniq","diff","tree"],blockedShellCommands:["rm -rf /","rm -rf /*","rm -rf ~","rm -rf ~/*","sudo rm -rf",":(){:|:&};:","mkfs","dd if=/dev/zero","dd if=/dev/random","> /dev/sda","chmod -R 777 /","chown -R","wget | sh","curl | sh","wget | bash","curl | bash"]},ui:{theme:"auto",showTokenUsage:!0,showTimestamps:!1,compactMode:!1,animationsEnabled:!0,colorOutput:!0},session:{autoSave:!0,autoSaveInterval:6e4,maxHistoryLength:100,autoCompactThreshold:5e4,sessionExpiryDays:30},update:{checkOnStartup:!0,checkInterval:24,showNotifications:!0,notificationStyle:ixr,includePrerelease:!1},agentic:{maxIterations:200,costWarningThreshold:5,costHardCap:0,autoCompactAtPercent:80,stuckDetectionEnabled:!0,stuckDetectionThreshold:3,maxIterationsPerTask:50}},u4={API_KEY:"ANTHROPIC_API_KEY",COMPASS_API_KEY:"COMPASS_API_KEY",MODEL:"COMPASS_MODEL",CONFIG_PATH:"COMPASS_CONFIG",DEBUG:"COMPASS_DEBUG",NO_COLOR:"NO_COLOR",FORCE_COLOR:"FORCE_COLOR",HOME:"HOME",USERPROFILE:"USERPROFILE"},lxr="1.0.33",uxr="Compass CLI",pxr="Agentic CLI by Compass Agentic Platform",dxr="1.0.0",fxr={".ts":"typescript",".tsx":"typescript",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".rb":"ruby",".go":"go",".rs":"rust",".java":"java",".kt":"kotlin",".scala":"scala",".cs":"csharp",".fs":"fsharp",".cpp":"cpp",".cc":"cpp",".cxx":"cpp",".c":"c",".h":"c",".hpp":"cpp",".swift":"swift",".php":"php",".pl":"perl",".pm":"perl",".sh":"bash",".bash":"bash",".zsh":"zsh",".fish":"fish",".ps1":"powershell",".sql":"sql",".r":"r",".R":"r",".lua":"lua",".vim":"vim",".el":"elisp",".clj":"clojure",".cljs":"clojure",".ex":"elixir",".exs":"elixir",".erl":"erlang",".hrl":"erlang",".hs":"haskell",".ml":"ocaml",".mli":"ocaml",".nim":"nim",".zig":"zig",".v":"v",".d":"d",".dart":"dart",".groovy":"groovy",".gradle":"groovy",".json":"json",".yaml":"yaml",".yml":"yaml",".toml":"toml",".xml":"xml",".html":"html",".htm":"html",".css":"css",".scss":"scss",".sass":"sass",".less":"less",".md":"markdown",".mdx":"markdown",".rst":"restructuredtext",".tex":"latex",".dockerfile":"dockerfile",".tf":"terraform",".hcl":"hcl",".proto":"protobuf",".graphql":"graphql",".gql":"graphql",".vue":"vue",".svelte":"svelte",".astro":"astro"},r7e=["package-lock.json","yarn.lock","pnpm-lock.yaml","composer.lock","Gemfile.lock","poetry.lock","Cargo.lock","go.sum","*.map","*.js.map","*.css.map","*.min.js","*.min.css","*.bundle.js","*.chunk.js","*.sql","*.csv","**/__snapshots__/**","**/fixtures/**/*.json","*.d.ts.map"],n7e=["node_modules",".git","dist","build","out","coverage",".next",".nuxt",".output",".cache",".parcel-cache","vendor","__pycache__",".pytest_cache","target","bin","obj"],mxr=[".png",".jpg",".jpeg",".gif",".bmp",".ico",".webp",".svg",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".bin",".dat",".db",".sqlite",".sqlite3",".woff",".woff2",".ttf",".otf",".eot",".mp3",".mp4",".wav",".avi",".mov",".mkv",".webm",".flv",".class",".jar",".war",".ear",".pyc",".pyo",".o",".obj",".a",".lib"]});var Uyt=ut((lpn,i7e)=>{"use strict";var Lyt=hs("path"),Xyt=hs("module"),_xr=hs("fs"),Qyt=(i,r,n)=>{if(typeof i!="string")throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof i}\``);if(typeof r!="string")throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof r}\``);try{i=_xr.realpathSync(i)}catch(f){if(f.code==="ENOENT")i=Lyt.resolve(i);else{if(n)return null;throw f}}let o=Lyt.join(i,"noop.js"),l=()=>Xyt._resolveFilename(r,{id:o,filename:o,paths:Xyt._nodeModulePaths(i)});if(n)try{return l()}catch{return null}return l()};i7e.exports=(i,r)=>Qyt(i,r);i7e.exports.silent=(i,r)=>Qyt(i,r,!0)});var Byt=ut((upn,s7e)=>{"use strict";var jyt=()=>{let i=Error.prepareStackTrace;Error.prepareStackTrace=(n,o)=>o;let r=new Error().stack.slice(1);return Error.prepareStackTrace=i,r};s7e.exports=jyt;s7e.exports.default=jyt});var qyt=ut((ppn,zyt)=>{"use strict";var hxr=Byt();zyt.exports=i=>{let r=hxr();if(!i)return r[2].getFileName();let n=!1;r.shift();for(let o of r){let l=o.getFileName();if(typeof l=="string"){if(l===i){n=!0;continue}if(l!=="module.js"&&n&&l!==i)return l}}}});var Kyt=ut((dpn,$yt)=>{"use strict";var gxr=hs("path"),yxr=Uyt(),Ixr=qyt();$yt.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");let r=Ixr(__filename),n=r?gxr.dirname(r):__dirname,o=yxr(n,i),l=hs.cache[o];if(l&&l.parent){let h=l.parent.children.length;for(;h--;)l.parent.children[h].id===o&&l.parent.children.splice(h,1)}delete hs.cache[o];let f=hs.cache[r];return f===void 0||f.require===void 0?hs(o):f.require(o)}});var tIt=ut((mpn,eIt)=>{"use strict";eIt.exports=function(r){return r?r instanceof Array||Array.isArray(r)||r.length>=0&&r.splice instanceof Function:!1}});var nIt=ut((_pn,rIt)=>{"use strict";var bxr=hs("util"),vxr=tIt(),a7e=function(r,n){(!r||r.constructor!==String)&&(n=r||{},r=Error.name);var o=function l(f){if(!this)return new l(f);f=f instanceof Error?f.message:f||this.message,Error.call(this,f),Error.captureStackTrace(this,o),this.name=r,Object.defineProperty(this,"message",{configurable:!0,enumerable:!1,get:function(){var P=f.split(/\r?\n/g);for(var Q in n)if(n.hasOwnProperty(Q)){var M=n[Q];"message"in M&&(P=M.message(this[Q],P)||P,vxr(P)||(P=[P]))}return P.join(`
2
2
  `)},set:function(P){f=P}});var h=null,v=Object.getOwnPropertyDescriptor(this,"stack"),E=v.get,R=v.value;delete v.value,delete v.writable,v.set=function(P){h=P},v.get=function(){var P=(h||(E?E.call(this):R)).split(/\r?\n+/g);h||(P[0]=this.name+": "+this.message);var Q=1;for(var M in n)if(n.hasOwnProperty(M)){var ie=n[M];if("line"in ie){var le=ie.line(this[M]);le&&P.splice(Q++,0," "+le)}"stack"in ie&&ie.stack(this[M],P)}return P.join(`
3
3
  `)},Object.defineProperty(this,"stack",v)};return Object.setPrototypeOf?(Object.setPrototypeOf(o.prototype,Error.prototype),Object.setPrototypeOf(o,Error)):bxr.inherits(o,Error),o};a7e.append=function(i,r){return{message:function(n,o){return n=n||r,n&&(o[0]+=" "+i.replace("%s",n.toString())),o}}};a7e.line=function(i,r){return{line:function(n){return n=n||r,n?i.replace("%s",n.toString()):null}}};rIt.exports=a7e});var aIt=ut((hpn,sIt)=>{"use strict";var xxr=i=>{let r=i.charCodeAt(0).toString(16).toUpperCase();return"0x"+(r.length%2?"0":"")+r},wxr=(i,r,n)=>{if(!r)return{message:i.message+" while parsing empty string",position:0};let o=i.message.match(/^Unexpected token (.) .*position\s+(\d+)/i),l=o?+o[2]:i.message.match(/^Unexpected end of JSON.*/i)?r.length-1:null,f=o?i.message.replace(/^Unexpected token ./,`Unexpected token ${JSON.stringify(o[1])} (${xxr(o[1])})`):i.message;if(l!=null){let h=l<=n?0:l-n,v=l+n>=r.length?r.length:l+n,E=(h===0?"":"...")+r.slice(h,v)+(v===r.length?"":"...");return{message:f+` while parsing ${r===E?"":"near "}${JSON.stringify(E)}`,position:l}}else return{message:f+` while parsing '${r.slice(0,n*2)}'`,position:0}},ame=class extends SyntaxError{constructor(r,n,o,l){o=o||20;let f=wxr(r,n,o);super(f.message),Object.assign(this,f),this.code="EJSONPARSE",this.systemError=r,Error.captureStackTrace(this,l||this.constructor)}get name(){return this.constructor.name}set name(r){}get[Symbol.toStringTag](){return this.constructor.name}},Axr=Symbol.for("indent"),Sxr=Symbol.for("newline"),Gxr=/^\s*[{\[]((?:\r?\n)+)([\s\t]*)/,Exr=/^(?:\{\}|\[\])((?:\r?\n)+)?$/,ome=(i,r,n)=>{let o=iIt(i);n=n||20;try{let[,l=`
4
4
  `,f=" "]=o.match(Exr)||o.match(Gxr)||[,"",""],h=JSON.parse(o,r);return h&&typeof h=="object"&&(h[Sxr]=l,h[Axr]=f),h}catch(l){if(typeof i!="string"&&!Buffer.isBuffer(i)){let f=Array.isArray(i)&&i.length===0;throw Object.assign(new TypeError(`Cannot parse ${f?"an empty array":String(i)}`),{code:"EJSONPARSE",systemError:l})}throw new ame(l,o,n,ome)}},iIt=i=>String(i).replace(/^\uFEFF/,"");sIt.exports=ome;ome.JSONParseError=ame;ome.noExceptions=(i,r)=>{try{return JSON.parse(iIt(i),r)}catch{}}});var lIt=ut(Cq=>{"use strict";Cq.__esModule=!0;Cq.LinesAndColumns=void 0;var cme=`
@@ -2709,7 +2709,7 @@ ${r}`),o.push({role:"user",content:v}),o}estimateTaskTokens(r,n,o){let l=Xd(r);f
2709
2709
  `)}Z3();var pBe=[{name:"Sessions",description:"Commands for managing your conversation session",commands:[{name:"/save",description:"Save current session to disk",usage:"/save [name]",examples:["/save","/save my-feature-work"],hidden:!0},{name:"/load",description:"Load a previously saved session",usage:"/load [name]",examples:["/load","/load my-feature-work"],hidden:!0},{name:"/clear",description:"Clear conversation history",usage:"/clear"},{name:"/compact",description:"Summarize conversation to reduce token usage",usage:"/compact"},{name:"/export",description:"Export conversation to file",usage:"/export [format]",examples:["/export md","/export json","/export html"],hidden:!0},{name:"/reset",description:"Reset session to clean state",usage:"/reset"},{name:"/exit",description:"Exit Compass",usage:"/exit",aliases:["/quit","/q"]}]},{name:"Model & Tokens",description:"Commands for model selection and token tracking",commands:[{name:"/model",description:"Switch between models",usage:"/model [name]",examples:["/model","/model sonnet","/model opus","/model haiku"]},{name:"/tokens",description:"Display token usage statistics",usage:"/tokens"},{name:"/context",description:"Show context window usage",usage:"/context"}]},{name:"File Operations",description:"Commands for file management and indexing",commands:[{name:"/files",description:"List indexed project files",usage:"/files [pattern]",examples:["/files","/files *.ts","/files src/"]},{name:"/index",description:"Reindex project files",usage:"/index"},{name:"/undo",description:"Undo last file operation",usage:"/undo"}]},{name:"Approval & Safety",description:"Commands for approval mode management",commands:[{name:"/approve",description:"Toggle approval mode",usage:"/approve [mode]",examples:["/approve","/approve auto","/approve manual"]}]},{name:"Help & Config",description:"Commands for help and configuration",commands:[{name:"/help",description:"Show this help menu",usage:"/help [topic]",examples:["/help","/help model","/help files"]},{name:"/config",description:"Display current configuration",usage:"/config"}]},{name:"Updates",description:"Commands for checking and installing updates",commands:[{name:"/update",description:"Check for and install updates",usage:"/update [check|install|history|version]",examples:["/update","/update check","/update install","/update history"],aliases:["/upgrade","/up"]}]}],Zun=[{name:"Setup & Configuration",description:"Commands for initial setup and configuration",commands:[{name:"setup",description:"Run first-time setup wizard",usage:"compass setup"},{name:"init",description:"Initialize Compass in current project",usage:"compass init"},{name:"config",description:"View or modify configuration",usage:"compass config [key] [value]",examples:["compass config","compass config model sonnet"]}]},{name:"Data Management",description:"Commands for managing stored data",commands:[{name:"tokens",description:"View token usage history",usage:"compass tokens [--export]"},{name:"consent",description:"Manage consent settings",usage:"compass consent [status|review|revoke]"},{name:"data",description:"Manage stored data",usage:"compass data [list|export|delete]"},{name:"cache",description:"Clear cached data",usage:"compass cache clear"},{name:"reset",description:"Reset to factory settings",usage:"compass reset [--force]"}]},{name:"Updates",description:"Commands for checking and installing updates",commands:[{name:"update",description:"Check for and install updates",usage:"compass update [check|install|history]",examples:["compass update","compass update check","compass update install","compass update history"]}]}];function uJt(i){let r=i.commands.filter(o=>!o.hidden);if(r.length===0)return"";let n=["",Vn.bold.cyan(`\u2501\u2501\u2501 ${i.name} \u2501\u2501\u2501`),Vn.gray(i.description),""];for(let o of r){if(n.push(` ${Vn.yellow(o.name)}`),n.push(` ${Vn.white(o.description)}`),o.usage&&n.push(` ${Vn.gray("Usage:")} ${Vn.dim(o.usage)}`),o.aliases&&o.aliases.length>0&&n.push(` ${Vn.gray("Aliases:")} ${Vn.dim(o.aliases.join(", "))}`),o.examples&&o.examples.length>0){n.push(` ${Vn.gray("Examples:")}`);for(let l of o.examples)n.push(` ${Vn.dim(l)}`)}n.push("")}return n.join(`
2710
2710
  `)}function Dun(){try{let{getCustomCommands:i}=(lJt(),vvr(cJt)),r=i();return!r||r.length===0?null:{name:"Custom Commands",description:"User-defined commands from .compass/commands/ or ~/.compass/commands/",commands:r.map(o=>{let l=o.namespace?`${o.scope}:${o.namespace}`:o.scope;return{name:`/${o.name}`,description:`${o.description} (${l})`,usage:o.frontmatter["argument-hint"]?`/${o.name} ${o.frontmatter["argument-hint"]}`:`/${o.name}`}})}}catch{return null}}function Pun(){let i=[...pBe],r=Dun();r&&i.push(r);let n=i.map(uJt);return["",Vn.bold.white("Compass CLI - Interactive Commands"),Vn.gray("Use these commands during an interactive session"),...n,Vn.dim("\u2500".repeat(50)),Vn.gray("Tip: Type any natural language request to interact with Compass"),""].join(`
2711
2711
  `)}function Mun(i){let r=i.startsWith("/")?i:`/${i}`,o=pBe.flatMap(f=>f.commands).find(f=>f.name===r||f.name===i||f.aliases?.includes(i)||f.aliases?.includes(r));if(!o)return null;let l=["",Vn.bold.cyan(o.name),Vn.white(o.description),""];if(o.usage&&(l.push(Vn.gray("Usage:")),l.push(` ${o.usage}`),l.push("")),o.aliases&&o.aliases.length>0&&(l.push(Vn.gray("Aliases:")),l.push(` ${o.aliases.join(", ")}`),l.push("")),o.examples&&o.examples.length>0){l.push(Vn.gray("Examples:"));for(let f of o.examples)l.push(` ${Vn.dim("$")} ${f}`);l.push("")}return l.join(`
2712
- `)}VV();var KDn="1.0.32",ePn="compass-cli",tPn="AI-powered development assistance using Anthropic's Claude models";export{tme as AGENT_SOURCE_PRIORITY,tPn as APP_DESCRIPTION,uxr as APP_DISPLAY_NAME,ePn as APP_NAME,pxr as APP_TAGLINE,lxr as APP_VERSION,KHt as ASCII_BANNER,zVe as AUTO_COMPACT_TRIGGER,KVe as AUTO_SAVE_INTERVAL_MS,pee as ActionLogger,f8t as ActionStatus,Uw as ActionType,Whe as AnthropicClient,c_e as ApprovalManager,AY as ApprovalMode,XVe as BACKUPS_DIR,qVe as BACKUP_RETENTION_DAYS,mxr as BINARY_EXTENSIONS,u_e as BackupManager,Uvr as CACHE_DIR,Sw as CLAUDE_MODELS,Zun as CLI_COMMANDS,bun as COMPASS_ICON,CY as CONFIG_FILE_NAME,$Ve as CONSENT_EXPIRY_DAYS,JVe as CONSENT_FILE_NAME,dxr as CONSENT_VERSION,jvr as CONTEXT_DIR,txr as CONTEXT_WINDOW_SAFETY_MARGIN,Bvr as CONTEXT_WINDOW_WARNING_PERCENT,Gq as CREDENTIALS_FILE_NAME,bee as ComplexityClassifier,Qme as ConfigManager,$me as ConsentManager,r_e as CredentialStore,wE as DEFAULT_CONFIG,zvr as DEFAULT_COST_WARNING_THRESHOLD,iN as DEFAULT_MAX_TOKENS,l4 as DEFAULT_MODEL,Lvr as DEFAULT_RATING_CONFIG,NY as DEFAULT_TEMPERATURE,Wvr as DEFAULT_UPDATE_CONFIG,u4 as ENV_VARS,yee as EnhancedContextGatherer,zme as EventEmitter,vq as ExecutionMode,WWt as ExecutionStrategy,Aq as GLOBAL_COMPASS_DIR,uK as GitService,Tve as HistoryManager,QVe as INDEX_DIR,Cte as InteractiveClarifier,FWt as IssueCategory,kWt as IssueSeverity,fxr as LANGUAGE_EXTENSIONS,LVe as LOGS_DIR,Aee as LogInterpreter,nxr as MAX_CACHE_SIZE_BYTES,Eq as MAX_COMMAND_OUTPUT_TOKENS,$vr as MAX_FILES_PER_OPERATION,e7e as MAX_FILE_READ_TOKENS,Kvr as MAX_FILE_SIZE_BYTES,sme as MAX_HISTORY_LENGTH,rxr as MAX_INDEXED_FILES,sxr as MAX_RETRY_ATTEMPTS,exr as MAX_SEARCH_RESULT_TOKENS,wq as MODEL_ALIASES,Sq as PROJECT_COMPASS_DIR,Tte as PlanGenerator,axr as RETRY_BASE_DELAY_MS,cxr as RETRY_JITTER_FACTOR,oxr as RETRY_MAX_DELAY_MS,TY as SAVED_SESSIONS_DIR,qvr as SESSION_EXPIRY_DAYS,nme as SESSION_FILE_NAME,ime as SHELL_COMMAND_TIMEOUT_MS,pBe as SLASH_COMMANDS,i_e as SessionManager,O0e as ShellExecutor,l8t as StepStatus,uee as StepTracker,u8t as StepType,BVe as TOKEN_WARNING_THRESHOLD,n7e as TOOL_READ_BLOCKLIST_DIRS,r7e as TOOL_READ_BLOCKLIST_PATTERNS,PVe as TaskExecutionStatus,p8t as TaskStatus,o_e as TokenTracker,dee as ToolRegistry,KDn as VERSION,Nte as Verifier,$Je as WORKFLOW_PROMPTS,See as WorkflowManager,kte as WorkflowOrchestrator,eme as WorkflowPhase,RWt as WorkflowState,gun as applyCompletion,CDr as applyPatch,GDr as areIdentical,NYr as calculateContextUsagePercent,Dyt as calculateModelCost,EYr as calculateRemainingTokens,A6r as colorByStatus,wDr as colorizeDiff,Jvr as compareAgentPriority,Pyt as compareModels,TE as copy,PYr as createActionLogger,fOr as createComplexityClassifier,Ovr as createDefaultAgentDefinition,kvr as createDefaultConsent,Xvr as createDefaultRatingState,iOr as createEnhancedContextGatherer,Fvr as createFullConsent,Zkr as createGitService,jln as createInteractiveClarifier,KOr as createLogInterpreter,Rvr as createMinimalConsent,zln as createPlanGenerator,DYr as createStepTracker,MYr as createToolRegistry,$ln as createVerifier,tHr as createWorkflowManager,eun as createWorkflowOrchestrator,hDe as decrypt,_De as encrypt,Bl as ensureDir,SYr as estimateConversationTokens,GYr as estimateSystemPromptTokens,Xd as estimateTokens,iun as executeSlashCommand,iBe as extractCodeBlocks,nBe as extractMentions,Mun as formatCommandHelp,y6r as formatCost,m6r as formatDate,_6r as formatDuration,g6r as formatFileSize,Pun as formatFullHelp,uJt as formatHelpCategory,w6r as formatList,xwt as formatPercent,x6r as formatProgressBar,h6r as formatRelativeTime,_n as formatTimestamp,I6r as formatTokenCount,TYr as formatTokenDisplay,aC as generateDiff,ADr as generateDiffSummary,k6r as generateSecureRandom,SDr as generateWordDiff,uk as getActionLogger,MVe as getAgentSourcePriority,Xb as getAnthropicClient,lh as getApprovalManager,Ryt as getAvailableAliases,Fyt as getAvailableModelIds,EY as getAvailableModels,vN as getBackupManager,V5r as getBasename,EDr as getChangedLineCount,Yyt as getCheapestModel,EH as getCodebaseIndexer,lun as getCompletions,vee as getComplexityClassifier,s$ as getConfigManager,pDe as getConsentManager,dk as getContextBuilder,kYr as getContextUsageColor,ZYr as getConversationCompactor,JW as getCredentialStore,Vyt as getDefaultModel,Zyt as getDefaultModelId,DV as getEnhancedContextGatherer,ka as getEventEmitter,W5r as getExtension,oC as getFileService,Wu as getGlobalCompassDir,sun as getHistoryManager,eBe as getInteractiveClarifier,cXe as getLogInterpreter,Aw as getModelConfig,rme as getModelDescription,Hyt as getModelTier,Myt as getModelsByCapability,Oyt as getMostCapableModel,wve as getPlanGenerator,_m as getProjectCompassDir,F5r as getRelativePath,Yh as getSessionManager,zb as getShellExecutor,cBe as getSlashCommandRegistry,lk as getStepTracker,Iun as getTaskProcessor,bN as getTokenTracker,t5 as getToolRegistry,rBe as getVerifier,eHr as getWorkflowManager,Kln as getWorkflowOrchestrator,gDe as hash,F6r as hmac,Hv as interpolateTemplate,i$ as isDirectory,Jme as isFile,UY as isPathWithin,OVe as isValidAgentFrontmatter,YVe as isValidAgentPermissionMode,Mvr as isValidAgentSource,wvr as isValidAnthropicConfig,Yvr as isValidCLIAgentConfig,xvr as isValidCompassConfig,Tvr as isValidConfigFile,kyt as isValidConsent,Nvr as isValidConsentRecord,Wyt as isValidModel,Pvr as isValidNotificationStyle,Avr as isValidProjectConfig,Qvr as isValidRatingState,Svr as isValidSafetyConfig,Evr as isValidSessionConfig,nun as isValidSlashCommand,Gvr as isValidUIConfig,Vvr as isValidUpdateCheckResult,Zvr as isValidUpdateConfig,Cvr as isValidUpdateSettingsConfig,Dvr as isValidUpdateType,ve as logger,jq as matchesPattern,R5r as normalizeSeparators,v6r as padString,UHt as parseArgs,run as parseInput,GY as parseToolsList,Ya as pathExists,tO as readDir,sXe as registerBuiltInTools,oBe as registerSlashCommand,CI as remove,xun as renderBanner,wun as renderMiniBanner,Aun as renderWelcome,N5r as resolveGlobalPath,Gw as resolveModelId,k5r as resolveProjectPath,Ld as safeReadFile,df as safeReadJson,Fv as safeWriteFile,Ph as safeWriteJson,YW as sanitizePath,R6r as secureCompare,Hvr as serializeToolsList,Mb as stat,mN as toForwardSlashes,b6r as truncate,CYr as wouldExceedContext};
2712
+ `)}VV();var KDn="1.0.33",ePn="compass-cli",tPn="AI-powered development assistance using Anthropic's Claude models";export{tme as AGENT_SOURCE_PRIORITY,tPn as APP_DESCRIPTION,uxr as APP_DISPLAY_NAME,ePn as APP_NAME,pxr as APP_TAGLINE,lxr as APP_VERSION,KHt as ASCII_BANNER,zVe as AUTO_COMPACT_TRIGGER,KVe as AUTO_SAVE_INTERVAL_MS,pee as ActionLogger,f8t as ActionStatus,Uw as ActionType,Whe as AnthropicClient,c_e as ApprovalManager,AY as ApprovalMode,XVe as BACKUPS_DIR,qVe as BACKUP_RETENTION_DAYS,mxr as BINARY_EXTENSIONS,u_e as BackupManager,Uvr as CACHE_DIR,Sw as CLAUDE_MODELS,Zun as CLI_COMMANDS,bun as COMPASS_ICON,CY as CONFIG_FILE_NAME,$Ve as CONSENT_EXPIRY_DAYS,JVe as CONSENT_FILE_NAME,dxr as CONSENT_VERSION,jvr as CONTEXT_DIR,txr as CONTEXT_WINDOW_SAFETY_MARGIN,Bvr as CONTEXT_WINDOW_WARNING_PERCENT,Gq as CREDENTIALS_FILE_NAME,bee as ComplexityClassifier,Qme as ConfigManager,$me as ConsentManager,r_e as CredentialStore,wE as DEFAULT_CONFIG,zvr as DEFAULT_COST_WARNING_THRESHOLD,iN as DEFAULT_MAX_TOKENS,l4 as DEFAULT_MODEL,Lvr as DEFAULT_RATING_CONFIG,NY as DEFAULT_TEMPERATURE,Wvr as DEFAULT_UPDATE_CONFIG,u4 as ENV_VARS,yee as EnhancedContextGatherer,zme as EventEmitter,vq as ExecutionMode,WWt as ExecutionStrategy,Aq as GLOBAL_COMPASS_DIR,uK as GitService,Tve as HistoryManager,QVe as INDEX_DIR,Cte as InteractiveClarifier,FWt as IssueCategory,kWt as IssueSeverity,fxr as LANGUAGE_EXTENSIONS,LVe as LOGS_DIR,Aee as LogInterpreter,nxr as MAX_CACHE_SIZE_BYTES,Eq as MAX_COMMAND_OUTPUT_TOKENS,$vr as MAX_FILES_PER_OPERATION,e7e as MAX_FILE_READ_TOKENS,Kvr as MAX_FILE_SIZE_BYTES,sme as MAX_HISTORY_LENGTH,rxr as MAX_INDEXED_FILES,sxr as MAX_RETRY_ATTEMPTS,exr as MAX_SEARCH_RESULT_TOKENS,wq as MODEL_ALIASES,Sq as PROJECT_COMPASS_DIR,Tte as PlanGenerator,axr as RETRY_BASE_DELAY_MS,cxr as RETRY_JITTER_FACTOR,oxr as RETRY_MAX_DELAY_MS,TY as SAVED_SESSIONS_DIR,qvr as SESSION_EXPIRY_DAYS,nme as SESSION_FILE_NAME,ime as SHELL_COMMAND_TIMEOUT_MS,pBe as SLASH_COMMANDS,i_e as SessionManager,O0e as ShellExecutor,l8t as StepStatus,uee as StepTracker,u8t as StepType,BVe as TOKEN_WARNING_THRESHOLD,n7e as TOOL_READ_BLOCKLIST_DIRS,r7e as TOOL_READ_BLOCKLIST_PATTERNS,PVe as TaskExecutionStatus,p8t as TaskStatus,o_e as TokenTracker,dee as ToolRegistry,KDn as VERSION,Nte as Verifier,$Je as WORKFLOW_PROMPTS,See as WorkflowManager,kte as WorkflowOrchestrator,eme as WorkflowPhase,RWt as WorkflowState,gun as applyCompletion,CDr as applyPatch,GDr as areIdentical,NYr as calculateContextUsagePercent,Dyt as calculateModelCost,EYr as calculateRemainingTokens,A6r as colorByStatus,wDr as colorizeDiff,Jvr as compareAgentPriority,Pyt as compareModels,TE as copy,PYr as createActionLogger,fOr as createComplexityClassifier,Ovr as createDefaultAgentDefinition,kvr as createDefaultConsent,Xvr as createDefaultRatingState,iOr as createEnhancedContextGatherer,Fvr as createFullConsent,Zkr as createGitService,jln as createInteractiveClarifier,KOr as createLogInterpreter,Rvr as createMinimalConsent,zln as createPlanGenerator,DYr as createStepTracker,MYr as createToolRegistry,$ln as createVerifier,tHr as createWorkflowManager,eun as createWorkflowOrchestrator,hDe as decrypt,_De as encrypt,Bl as ensureDir,SYr as estimateConversationTokens,GYr as estimateSystemPromptTokens,Xd as estimateTokens,iun as executeSlashCommand,iBe as extractCodeBlocks,nBe as extractMentions,Mun as formatCommandHelp,y6r as formatCost,m6r as formatDate,_6r as formatDuration,g6r as formatFileSize,Pun as formatFullHelp,uJt as formatHelpCategory,w6r as formatList,xwt as formatPercent,x6r as formatProgressBar,h6r as formatRelativeTime,_n as formatTimestamp,I6r as formatTokenCount,TYr as formatTokenDisplay,aC as generateDiff,ADr as generateDiffSummary,k6r as generateSecureRandom,SDr as generateWordDiff,uk as getActionLogger,MVe as getAgentSourcePriority,Xb as getAnthropicClient,lh as getApprovalManager,Ryt as getAvailableAliases,Fyt as getAvailableModelIds,EY as getAvailableModels,vN as getBackupManager,V5r as getBasename,EDr as getChangedLineCount,Yyt as getCheapestModel,EH as getCodebaseIndexer,lun as getCompletions,vee as getComplexityClassifier,s$ as getConfigManager,pDe as getConsentManager,dk as getContextBuilder,kYr as getContextUsageColor,ZYr as getConversationCompactor,JW as getCredentialStore,Vyt as getDefaultModel,Zyt as getDefaultModelId,DV as getEnhancedContextGatherer,ka as getEventEmitter,W5r as getExtension,oC as getFileService,Wu as getGlobalCompassDir,sun as getHistoryManager,eBe as getInteractiveClarifier,cXe as getLogInterpreter,Aw as getModelConfig,rme as getModelDescription,Hyt as getModelTier,Myt as getModelsByCapability,Oyt as getMostCapableModel,wve as getPlanGenerator,_m as getProjectCompassDir,F5r as getRelativePath,Yh as getSessionManager,zb as getShellExecutor,cBe as getSlashCommandRegistry,lk as getStepTracker,Iun as getTaskProcessor,bN as getTokenTracker,t5 as getToolRegistry,rBe as getVerifier,eHr as getWorkflowManager,Kln as getWorkflowOrchestrator,gDe as hash,F6r as hmac,Hv as interpolateTemplate,i$ as isDirectory,Jme as isFile,UY as isPathWithin,OVe as isValidAgentFrontmatter,YVe as isValidAgentPermissionMode,Mvr as isValidAgentSource,wvr as isValidAnthropicConfig,Yvr as isValidCLIAgentConfig,xvr as isValidCompassConfig,Tvr as isValidConfigFile,kyt as isValidConsent,Nvr as isValidConsentRecord,Wyt as isValidModel,Pvr as isValidNotificationStyle,Avr as isValidProjectConfig,Qvr as isValidRatingState,Svr as isValidSafetyConfig,Evr as isValidSessionConfig,nun as isValidSlashCommand,Gvr as isValidUIConfig,Vvr as isValidUpdateCheckResult,Zvr as isValidUpdateConfig,Cvr as isValidUpdateSettingsConfig,Dvr as isValidUpdateType,ve as logger,jq as matchesPattern,R5r as normalizeSeparators,v6r as padString,UHt as parseArgs,run as parseInput,GY as parseToolsList,Ya as pathExists,tO as readDir,sXe as registerBuiltInTools,oBe as registerSlashCommand,CI as remove,xun as renderBanner,wun as renderMiniBanner,Aun as renderWelcome,N5r as resolveGlobalPath,Gw as resolveModelId,k5r as resolveProjectPath,Ld as safeReadFile,df as safeReadJson,Fv as safeWriteFile,Ph as safeWriteJson,YW as sanitizePath,R6r as secureCompare,Hvr as serializeToolsList,Mb as stat,mN as toForwardSlashes,b6r as truncate,CYr as wouldExceedContext};
2713
2713
  /*! Bundled license information:
2714
2714
 
2715
2715
  typescript/lib/typescript.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-ai/nova",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "description": "AI-powered development assistant that brings advanced language models directly to your terminal",
5
5
  "bin": {
6
6
  "nova": "dist/cli.js",