@compass-ai/nova 1.0.72 → 1.0.73
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 +5 -5
- package/dist/index.js +2 -2
- package/package.json +2 -1
- package/scripts/preuninstall.mjs +99 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var exr=Object.create;var Eme=Object.defineProperty;var txr=Object.getOwnPropertyDescriptor;var rxr=Object.getOwnPropertyNames;var nxr=Object.getPrototypeOf,ixr=Object.prototype.hasOwnProperty;var Us=(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 Jt=(i,r)=>()=>(i&&(r=i(i=0)),r);var dt=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports),Hw=(i,r)=>{for(var n in r)Eme(i,n,{get:r[n],enumerable:!0})},vvt=(i,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of rxr(r))!ixr.call(i,l)&&l!==n&&Eme(i,l,{get:()=>r[l],enumerable:!(o=txr(r,l))||o.enumerable});return i};var So=(i,r,n)=>(n=i!=null?exr(nxr(i)):{},vvt(r||!i||!i.__esModule?Eme(n,"default",{value:i,enumerable:!0}):n,i)),sxr=i=>vvt(Eme({},"__esModule",{value:!0}),i);function axr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.anthropic=="object"&&r.anthropic!==null&&typeof r.ollama=="object"&&r.ollama!==null&&typeof r.project=="object"&&r.project!==null&&typeof r.safety=="object"&&r.safety!==null&&typeof r.ui=="object"&&r.ui!==null&&typeof r.session=="object"&&r.session!==null&&typeof r.update=="object"&&r.update!==null&&typeof r.agentic=="object"&&r.agentic!==null}function oxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.model=="string"&&typeof r.maxTokens=="number"&&typeof r.temperature=="number"}function cxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.rootDir=="string"&&Array.isArray(r.ignorePatterns)&&Array.isArray(r.includePatterns)&&typeof r.maxFileSize=="number"&&typeof r.indexOnStartup=="boolean"}function lxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.requireApproval=="boolean"&&Array.isArray(r.autoApprovePatterns)&&Array.isArray(r.blockedPatterns)&&typeof r.maxFilesPerOperation=="number"&&typeof r.backupBeforeModify=="boolean"&&typeof r.shellCommandTimeout=="number"&&Array.isArray(r.allowedShellCommands)&&Array.isArray(r.blockedShellCommands)}function uxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r=="object"&&r!==null}function dxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.autoSave=="boolean"&&typeof r.autoSaveInterval=="number"&&typeof r.maxHistoryLength=="number"&&typeof r.autoCompactThreshold=="number"&&typeof r.sessionExpiryDays=="number"}function pxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.checkOnStartup=="boolean"&&typeof r.checkInterval=="number"&&typeof r.showNotifications=="boolean"&&typeof r.notificationStyle=="string"&&["banner","minimal","detailed","silent"].includes(r.notificationStyle)&&typeof r.includePrerelease=="boolean"}function fxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.version=="string"&&typeof r.config=="object"&&r.config!==null}var xvt=Jt(()=>{"use strict"});function wvt(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 mxr(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"&&wvt(r.consent)}function _xr(){return{dataCollection:kme.dataCollection.defaultValue,telemetry:kme.telemetry.defaultValue,analytics:kme.analytics.defaultValue,errorReporting:kme.errorReporting.defaultValue}}function hxr(){return{dataCollection:!0,telemetry:!0,analytics:!0,errorReporting:!0}}function gxr(){return{dataCollection:!0,telemetry:!1,analytics:!1,errorReporting:!1}}var SMe,kme,EMe=Jt(()=>{"use strict";SMe="1.0.0",kme={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 kH,CH=Jt(()=>{"use strict";kH=(l=>(l.MANUAL="manual",l.AUTO="auto",l.STRICT="strict",l.SMART="smart",l))(kH||{})});function Ixr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.updateAvailable=="boolean"&&typeof r.currentVersion=="string"&&typeof r.checkedAt=="string"}function bxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.checkOnStartup=="boolean"&&typeof r.checkInterval=="number"&&typeof r.showNotifications=="boolean"&&typeof r.notificationStyle=="string"&&typeof r.includePrerelease=="boolean"}function vxr(i){return["major","minor","patch","prerelease","build"].includes(i)}function xxr(i){return["banner","minimal","detailed","silent"].includes(i)}var yxr,Avt=Jt(()=>{"use strict";yxr={checkOnStartup:!0,checkInterval:4,showNotifications:!0,notificationStyle:"banner",includePrerelease:!1}});var Rq,kMe,Cme,Wq=Jt(()=>{"use strict";Rq=(b=>(b.DIRECT="direct",b.CLARIFICATION="clarification",b.TODO_LIST="todo_list",b.PLAN="plan",b.PLAN_ADOPT="plan_adopt",b.NO_ACTION="no_action",b.SPAWN_AGENT="spawn_agent",b))(Rq||{}),kMe=(b=>(b.PENDING="pending",b.IN_PROGRESS="in_progress",b.PAUSED="paused",b.COMPLETED="completed",b.FAILED="failed",b.SKIPPED="skipped",b.ROLLED_BACK="rolled_back",b))(kMe||{}),Cme=(W=>(W.IDLE="idle",W.CONTEXT_GATHERING="context_gathering",W.COMPLEXITY_ASSESSMENT="complexity_assessment",W.CLARIFICATION="clarification",W.PLAN_GENERATION="plan_generation",W.PLAN_REVIEW="plan_review",W.EXECUTION="execution",W.VERIFICATION="verification",W.COMPLETED="completed",W.FAILED="failed",W))(Cme||{})});var Tvt={};Hw(Tvt,{AGENT_SOURCE_PRIORITY:()=>Zq,compareAgentPriority:()=>Gvt,createDefaultAgentDefinition:()=>kvt,getAgentSourcePriority:()=>Gme,isValidAgentFrontmatter:()=>Nme,isValidAgentPermissionMode:()=>Tme,isValidAgentSource:()=>Svt,isValidCLIAgentConfig:()=>Evt,parseToolsList:()=>ED,serializeToolsList:()=>Cvt});function Tme(i){return typeof i=="string"&&["default","acceptEditsAsk","bypassPermissions","plan","ignore","acceptEdits","dontAsk"].includes(i)}function Svt(i){return typeof i=="string"&&["project","cli","user","builtin"].includes(i)}function Nme(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&&!Tme(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 Evt(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&&!Tme(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 kvt(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 ED(i){if(!(!i||i.trim()===""))return i.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function Cvt(i){if(!(!i||i.length===0))return i.join(", ")}function Gme(i){return Zq.indexOf(i)}function Gvt(i,r){return Gme(i.source)-Gme(r.source)}var Zq,Fme=Jt(()=>{"use strict";Zq=["builtin","user","cli","project"]});function Axr(){return{totalUsageTimeMs:0,lastRatingShownAt:null,lastRatingSubmittedAt:null,totalRatingsSubmitted:0,totalSessions:0,firstUsedAt:new Date().toISOString(),lastActivityAt:null}}function Sxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.totalUsageTimeMs=="number"&&(r.lastRatingShownAt===null||typeof r.lastRatingShownAt=="string")&&(r.lastRatingSubmittedAt===null||typeof r.lastRatingSubmittedAt=="string")&&typeof r.totalRatingsSubmitted=="number"&&typeof r.totalSessions=="number"&&typeof r.firstUsedAt=="string"&&(r.lastActivityAt===null||typeof r.lastActivityAt=="string")}var wxr,Nvt=Jt(()=>{"use strict";wxr={usageTimeThresholdMs:12e4,cooldownPeriodMs:864e5,activityWindowMs:12e4,cooldownMultiplier:1.5,maxCooldownPeriodMs:6048e5}});function Wme(i){return typeof i=="string"&&Fvt.includes(i)}function Exr(i){return typeof i=="string"&&["personal","project"].includes(i)}function kxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return!(r.description!==void 0&&typeof r.description!="string"||r.enabled!==void 0&&typeof r.enabled!="boolean"||r.tools!==void 0&&!Array.isArray(r.tools)||r.match!==void 0&&typeof r.match!="object"||r.timeout!==void 0&&typeof r.timeout!="number")}function CMe(i){return Rme.indexOf(i)}function Cxr(i,r){return CMe(i.source)-CMe(r.source)}var Fvt,Rme,GMe=Jt(()=>{"use strict";Fvt=["PreToolUse","PostToolUse","UserPromptSubmit","Notification","Stop"],Rme=["personal","project"]});function iZ(i){if(!i||typeof i!="object")return!1;let r=i;return typeof r.version=="string"&&typeof r.id=="string"&&typeof r.sessionId=="string"&&typeof r.projectPath=="string"&&typeof r.startedAt=="string"&&typeof r.endedAt=="string"&&typeof r.messageCount=="number"&&typeof r.summary=="string"&&Array.isArray(r.messages)&&Array.isArray(r.topics)&&(Array.isArray(r.operations)||Array.isArray(r.toolsUsed)&&Array.isArray(r.filesModified)&&Array.isArray(r.filesRead))}var TMe,NMe=Jt(()=>{"use strict";TMe="1.0"});var FMe,Rvt=Jt(()=>{"use strict";FMe=class i extends Error{scope;provider;model;limitValue;currentUsage;resetAt;constructor(r){let o=new Date(r.resetAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),l=r.scope==="model"?`model "${r.model}"`:`provider "${r.provider}"`;super(`Daily token limit exceeded for ${l}. Used ${r.currentUsage.toLocaleString()} / ${r.limitValue.toLocaleString()} tokens. Resets at ${o}.`),this.name="TokenLimitExceededError",this.scope=r.scope,this.provider=r.provider,this.model=r.model,this.limitValue=r.limitValue,this.currentUsage=r.currentUsage,this.resetAt=r.resetAt,Object.setPrototypeOf(this,i.prototype)}}});var Vq,kD,GH,Zme,RMe,Pq,WMe,ZMe,Gxr,TH,VMe,Txr,PMe,DMe,MMe,YMe,OMe,HMe,Dq,JMe,sZ,Vme,CD,aZ,Wvt,yC,LMe,XMe,Nxr,Fxr,oZ,Rxr,Pme,Wxr,Zxr,Vxr,Pxr,Dxr,Mxr,Zvt,Mq,NH,Vvt,UMe,Dme,Yq,Mme,Pvt,Dvt,Oq,Yxr,QMe,jMe,Hq,Oxr,Mvt,Hxr,Jxr,Lxr,Jw,SN,Yvt,BMe,t1,Xxr,Uxr,Qxr,jxr,Bxr,zxr,EN,kN,EI,Yme,qxr,$xr,Kxr,ewr,twr,zMe,qMe,rwr,od=Jt(()=>{"use strict";Vq=".compass",kD=".compass",GH="config.json",Zme="session.json",RMe="consent.json",Pq="credentials.enc",WMe="logs",ZMe="backups",Gxr="cache",TH="saved-sessions",VMe="index",Txr="context",PMe="temp",DMe="commands",MMe="agents",YMe="skills",OMe="hooks",HMe="rules",Dq="projects",JMe="memory",sZ="NOVA.md",Vme="NOVA.local.md",CD="MEMORY.md",aZ=200,Wvt="chats",yC=16384,LMe=2e5,XMe=8e4,Nxr=80,Fxr=10,oZ={anthropic:"haiku",ollama:"glm-4.7:cloud",zai:"glm-4.7:cloud",minimax:"glm-4.7:cloud"},Rxr="haiku",Pme=200,Wxr=75,Zxr=5,Vxr=0,Pxr=80,Dxr=!0,Mxr=3,Zvt=30,Mq=1,NH=100,Vvt=7,UMe=365,Dme=6e4,Yq=12e4,Mme=6e5,Pvt=50,Dvt=1024*1024,Oq=100,Yxr=15,QMe=8e3,jMe=4e4,Hq=4e3,Oxr=6e3,Mvt=4e3,Hxr=90,Jxr=1e5,Lxr=500*1024*1024,Jw="claude-sonnet-4-5-20250929",SN=1,Yvt=.5,BMe="haiku",t1="verbose_analyst",Xxr=4,Uxr="banner",Qxr=4,jxr=1e3,Bxr=16e3,zxr=.1,EN={anthropic:{model:Jw,maxTokens:16384,temperature:SN},ollama:{model:"glm-4.7:cloud",endpoint:"https://ollama.com",maxTokens:16384,temperature:Yvt},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:Dvt,indexOnStartup:!0},safety:{requireApproval:!0,autoApprovePatterns:[],blockedPatterns:[".env*","*.key","*.pem","*.p12","*.pfx","secrets/**","**/secrets/**","**/*.secret","**/credentials*","**/password*"],maxFilesPerOperation:Pvt,backupBeforeModify:!0,shellCommandTimeout:Yq,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:{},session:{autoSave:!0,autoSaveInterval:Dme,maxHistoryLength:Oq,autoCompactThreshold:8e4,sessionExpiryDays:Zvt,unleash:!1},update:{checkOnStartup:!0,checkInterval:Xxr,showNotifications:!0,notificationStyle:Uxr,includePrerelease:!1},agentic:{maxIterations:Pme,costWarningThreshold:Zxr,costHardCap:Vxr,autoCompactAtPercent:Pxr,stuckDetectionEnabled:Dxr,stuckDetectionThreshold:Mxr,maxIterationsPerTask:Wxr}},kN=["anthropic","ollama","zai","minimax"],EI={API_KEY:"ANTHROPIC_API_KEY",COMPASS_API_KEY:"COMPASS_API_KEY",OLLAMA_API_KEY:"OLLAMA_API_KEY",ZAI_API_KEY:"ZAI_API_KEY",MINIMAX_API_KEY:"MINIMAX_API_KEY",MODEL:"COMPASS_MODEL",CONFIG_PATH:"COMPASS_CONFIG",DEBUG:"COMPASS_DEBUG",NO_COLOR:"NO_COLOR",FORCE_COLOR:"FORCE_COLOR",HOME:"HOME",USERPROFILE:"USERPROFILE",EXPERIMENTAL_AGENT_TEAMS:"COMPASS_EXPERIMENTAL_AGENT_TEAMS"},Yme={anthropic:EI.API_KEY,ollama:EI.OLLAMA_API_KEY,zai:EI.ZAI_API_KEY,minimax:EI.MINIMAX_API_KEY},qxr="1.0.72",$xr="Compass CLI",Kxr="",ewr="1.0.0",twr={".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"},zMe=["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"],qMe=["node_modules",".git","dist","build","out","coverage",".next",".nuxt",".output",".cache",".parcel-cache","vendor","__pycache__",".pytest_cache","target","bin","obj"],rwr=[".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 GD,Ovt,Ome=Jt(()=>{"use strict";xvt();EMe();CH();Avt();Wq();Fme();Nvt();GMe();NMe();Rvt();od();GD="BASIC",Ovt=["BASIC","PRO","MAX","ENTERPRISE","UNLIMITED"]});var $Me={};Hw($Me,{CLAUDE_MODELS:()=>Lw,MODEL_ALIASES:()=>Jq,NO_SUBSCRIPTION_DAILY_TOKEN_LIMIT:()=>Hvt,calculateModelCost:()=>zvt,compareModels:()=>qvt,getAvailableAliases:()=>Uvt,getAvailableModelIds:()=>Xvt,getAvailableModels:()=>cZ,getCheapestModel:()=>Kvt,getDefaultModel:()=>jvt,getDefaultModelId:()=>Bvt,getModelConfig:()=>n_,getModelDescription:()=>Hme,getModelTier:()=>t1t,getModelsByCapability:()=>$vt,getMostCapableModel:()=>e1t,hasFullAccess:()=>Jvt,isAnthropicModel:()=>Lvt,isValidModel:()=>Qvt,resolveModelId:()=>yy});function Jvt(i){return i==="trial"||i==="active"}function yy(i){let r=i.toLowerCase();if(Jq[r])return Jq[r];for(let n of Object.keys(Lw))if(n.toLowerCase()===r)return n;return i}function n_(i){let r=yy(i);return Lw[r]}function Lvt(i){return n_(i)?.provider==="anthropic"}function cZ(){return Object.values(Lw)}function Xvt(){return Object.keys(Lw)}function Uvt(){return Object.keys(Jq)}function Qvt(i){return yy(i)in Lw}function jvt(){return Lw["claude-sonnet-4-5-20250929"]}function Bvt(){return"claude-sonnet-4-5-20250929"}function zvt(i,r,n){let o=n_(i);if(!o)return null;let l=r/1e6*o.pricing.inputPricePerMillion,p=n/1e6*o.pricing.outputPricePerMillion;return l+p}function qvt(i,r,n){let o=n_(i),l=n_(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 $vt(i){return cZ().filter(r=>r.capabilities[i])}function Kvt(){return cZ().reduce((r,n)=>n.pricing.inputPricePerMillion<r.pricing.inputPricePerMillion?n:r)}function e1t(){return Lw["claude-opus-4-6"]}function t1t(i){let r=yy(i);if(r.includes("haiku"))return"economy";if(r.includes("sonnet"))return"balanced";if(r.includes("opus"))return"premium"}function Hme(i){let r=yy(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";if(r.includes("glm-4.7"))return"OpenSource"}var Hvt,Lw,Jq,BS=Jt(()=>{"use strict";Hvt=15e4;Lw={"glm-5:cloud":{id:"glm-5:cloud",name:"Z.AI GLM 5",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"glm-4.7:cloud":{id:"glm-4.7:cloud",name:"Z.AI GLM 4.7",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"minimax-m2.5:cloud":{id:"minimax-m2.5:cloud",name:"MiniMax M2.5",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!1}},"kimi-k2.5:cloud":{id:"kimi-k2.5:cloud",name:"Kimi K2.5",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!1}},"gemini-3-pro-preview":{id:"gemini-3-pro-preview",name:"Gemini 3 Pro",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"claude-sonnet-4-6":{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:3,outputPricePerMillion:15,cacheWrite5mPricePerMillion:3.75,cacheWrite1hPricePerMillion:6,cacheHitPricePerMillion:.3},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"claude-sonnet-4-5-20250929":{id:"claude-sonnet-4-5-20250929",name:"Claude Sonnet 4.5",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:3,outputPricePerMillion:15,cacheWrite5mPricePerMillion:3.75,cacheWrite1hPricePerMillion:6,cacheHitPricePerMillion:.3},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"claude-opus-4-6":{id:"claude-opus-4-6",name:"Claude Opus 4.6",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:5,outputPricePerMillion:25,cacheWrite5mPricePerMillion:6.25,cacheWrite1hPricePerMillion:10,cacheHitPricePerMillion:.5},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!0,complexityClassification:!0}},"claude-opus-4-5-20251101":{id:"claude-opus-4-5-20251101",name:"Claude Opus 4.5",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:5,outputPricePerMillion:25,cacheWrite5mPricePerMillion:6.25,cacheWrite1hPricePerMillion:10,cacheHitPricePerMillion:.5},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!0,complexityClassification:!0}},"claude-haiku-4-5-20251001":{id:"claude-haiku-4-5-20251001",name:"Claude Haiku 4.5",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:8192,pricing:{inputPricePerMillion:1,outputPricePerMillion:5,cacheWrite5mPricePerMillion:1.25,cacheWrite1hPricePerMillion:2,cacheHitPricePerMillion:.1},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}}},Jq={sonnet:"claude-sonnet-4-6",opus:"claude-opus-4-6","sonnet-4.6":"claude-sonnet-4-6",sonnet46:"claude-sonnet-4-6","sonnet-4.5":"claude-sonnet-4-5-20250929",sonnet45:"claude-sonnet-4-5-20250929","opus-4.6":"claude-opus-4-6",opus46:"claude-opus-4-6","opus-4.5":"claude-opus-4-5-20251101",opus45:"claude-opus-4-5-20251101",haiku:"claude-haiku-4-5-20251001","glm-5":"glm-5:cloud","glm-4.7":"glm-4.7:cloud","minimax-m2.5":"minimax-m2.5:cloud","kimi-k2.5":"kimi-k2.5:cloud","gemini-3-pro":"gemini-3-pro-preview",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-6",best:"claude-opus-4-6",beyond:"glm-5:cloud",robust:"glm-4.7:cloud",deep:"kimi-k2.5:cloud",versatile:"minimax-m2.5:cloud",creative:"gemini-3-pro-preview",s:"claude-sonnet-4-5-20250929",o:"claude-opus-4-6",h:"claude-haiku-4-5-20251001",g:"glm-5:cloud",m:"minimax-m2.5:cloud",k:"kimi-k2.5:cloud",p:"gemini-3-pro-preview"}});function nwr(){let i=new Map;for(let r of FH){let n=i.get(r.category)||[];n.push(r),i.set(r.category,n)}return i}var Lq,KMe,e9e,FH,t9e=Jt(()=>{"use strict";Lq={network:{label:"Network Tools",priority:1},media:{label:"Media Tools",priority:2},development:{label:"Development Tools",priority:3},compression:{label:"Compression Tools",priority:4},text:{label:"Text Processing Tools",priority:5},file:{label:"File Tools",priority:6},system:{label:"System Tools",priority:7}},KMe=36e5,e9e=3e3,FH=[{command:"curl",name:"cURL",category:"network",description:"Transfer data with URLs",decisionRule:"Use for downloading files, making HTTP requests, testing APIs",useCases:["curl -O https://example.com/file.zip",'curl -X POST -d "data" https://api.example.com',"curl -I https://example.com (headers only)"]},{command:"wget",name:"wget",category:"network",description:"Non-interactive network downloader",decisionRule:"Use for downloading files, especially recursive downloads",useCases:["wget https://example.com/file.zip","wget -r https://example.com/docs/","wget -c https://example.com/large.zip (resume)"]},{command:"ssh",name:"SSH",category:"network",description:"Secure shell remote login",decisionRule:"Use for remote server access and secure connections",useCases:["ssh user@host","ssh -L 8080:localhost:80 user@host (tunnel)"]},{command:"ping",name:"Ping",category:"network",description:"Test network connectivity",decisionRule:"Use to check if a host is reachable",useCases:["ping example.com","ping -c 4 example.com (4 packets)"]},{command:"nslookup",name:"nslookup",category:"network",description:"Query DNS records",decisionRule:"Use for DNS lookups and troubleshooting",useCases:["nslookup example.com","nslookup -type=MX example.com"]},{command:"dig",name:"dig",category:"network",description:"DNS lookup utility",decisionRule:"Use for detailed DNS queries",useCases:["dig example.com","dig +short example.com","dig example.com MX"]},{command:"netstat",name:"netstat",category:"network",description:"Network statistics",decisionRule:"Use to view network connections and listening ports",useCases:["netstat -an (all connections)","netstat -tlnp (listening TCP ports)"]},{command:"ffmpeg",name:"FFmpeg",category:"media",description:"Audio/video conversion and processing",decisionRule:"Use for any audio/video conversion, extraction, or manipulation",useCases:["ffmpeg -i input.mp4 output.mp3 (extract audio)","ffmpeg -i input.mp4 -vn -acodec copy output.aac","ffmpeg -i input.mp4 -ss 00:01:00 -t 30 clip.mp4 (trim)"]},{command:"convert",name:"ImageMagick",category:"media",description:"Image conversion and manipulation",decisionRule:"Use for image format conversion, resizing, effects",useCases:["convert input.png output.jpg","convert input.png -resize 50% output.png","convert *.png output.pdf (combine to PDF)"]},{command:"yt-dlp",name:"yt-dlp",category:"media",description:"Video/audio downloader",decisionRule:"Use for downloading videos from YouTube and other sites",useCases:["yt-dlp https://youtube.com/watch?v=...","yt-dlp -x --audio-format mp3 URL (audio only)"]},{command:"git",name:"Git",category:"development",description:"Version control system",decisionRule:"Use for all version control operations",useCases:["git status","git diff","git log --oneline -10"]},{command:"node",name:"Node.js",category:"development",description:"JavaScript runtime",decisionRule:"Use for running JavaScript files or REPL",useCases:["node script.js",'node -e "console.log(1+1)"']},{command:"npm",name:"npm",category:"development",description:"Node.js package manager",decisionRule:"Use for JavaScript package management",useCases:["npm install package","npm run script","npm init -y"]},{command:"python",name:"Python",category:"development",description:"Python interpreter",decisionRule:"Use for running Python scripts or quick computations",useCases:["python script.py",'python -c "print(2**10)"']},{command:"pip",name:"pip",category:"development",description:"Python package manager",decisionRule:"Use for Python package installation",useCases:["pip install package","pip list","pip freeze > requirements.txt"]},{command:"docker",name:"Docker",category:"development",description:"Container platform",decisionRule:"Use for container operations",useCases:["docker ps","docker run -it ubuntu bash","docker build -t myapp ."]},{command:"code",name:"VS Code",category:"development",description:"Visual Studio Code editor",decisionRule:"Use to open files/folders in VS Code",useCases:["code .","code file.js"]},{command:"jq",name:"jq",category:"development",description:"JSON processor",decisionRule:"Use for parsing, filtering, and transforming JSON",useCases:["cat data.json | jq '.field'","jq '.items[] | .name' data.json","curl api.example.com | jq '.'"]},{command:"7z",name:"7-Zip",category:"compression",description:"High compression archiver",decisionRule:"Use for creating/extracting archives, especially 7z format",useCases:["7z x archive.7z","7z a archive.7z folder/"]},{command:"tar",name:"tar",category:"compression",description:"Archive utility",decisionRule:"Use for tar archives, common on Unix systems",useCases:["tar -xzf archive.tar.gz","tar -czf archive.tar.gz folder/","tar -tvf archive.tar (list contents)"]},{command:"zip",name:"zip",category:"compression",description:"Compress files into ZIP format",decisionRule:"Use for creating ZIP archives",useCases:["zip archive.zip file1 file2","zip -r archive.zip folder/"]},{command:"unzip",name:"unzip",category:"compression",description:"Extract ZIP archives",decisionRule:"Use for extracting ZIP files",useCases:["unzip archive.zip","unzip -l archive.zip (list contents)","unzip archive.zip -d destination/"]},{command:"gzip",name:"gzip",category:"compression",description:"GNU compression utility",decisionRule:"Use for gzip compression/decompression",useCases:["gzip file","gzip -d file.gz","gzip -k file (keep original)"]},{command:"grep",name:"grep",category:"text",description:"Search text patterns",decisionRule:"Use for searching patterns in files",useCases:['grep "pattern" file','grep -r "pattern" folder/','grep -i "pattern" file (case insensitive)']},{command:"sed",name:"sed",category:"text",description:"Stream editor",decisionRule:"Use for text transformations and substitutions",useCases:["sed 's/old/new/g' file","sed -i 's/old/new/g' file (in-place)"]},{command:"awk",name:"awk",category:"text",description:"Pattern scanning and processing",decisionRule:"Use for column-based text processing",useCases:["awk '{print $1}' file","awk -F: '{print $1}' /etc/passwd"]},{command:"find",name:"find",category:"file",description:"Search for files",decisionRule:"Use for finding files by name, type, date, etc.",useCases:['find . -name "*.js"',"find . -type f -mtime -7 (modified last 7 days)"]},{command:"rsync",name:"rsync",category:"file",description:"Fast file synchronization",decisionRule:"Use for copying/syncing files with progress and resume",useCases:["rsync -av source/ dest/","rsync -avz source/ user@host:dest/"]},{command:"pandoc",name:"Pandoc",category:"system",description:"Universal document converter",decisionRule:"Use for converting between document formats",useCases:["pandoc input.md -o output.pdf","pandoc input.docx -o output.html"]},{command:"htop",name:"htop",category:"system",description:"Interactive process viewer",decisionRule:"Use for monitoring system resources",useCases:["htop"]},{command:"btop",name:"btop",category:"system",description:"Resource monitor",decisionRule:"Use for monitoring system resources with better UI",useCases:["btop"]},{command:"lsof",name:"lsof",category:"system",description:"List open files",decisionRule:"Use to find which process is using a file or port",useCases:["lsof -i :8080 (what is using port 8080)","lsof /path/to/file"]}]});var r9e,Jme,Xq,n9e,Uq,Lme,Xme,CN,Qq=Jt(()=>{"use strict";r9e="Schedule.md",Jme="sched-",Xq=8,n9e=["active","paused","completed"],Uq=`# Scheduled Tasks
|
|
1
|
+
var exr=Object.create;var Eme=Object.defineProperty;var txr=Object.getOwnPropertyDescriptor;var rxr=Object.getOwnPropertyNames;var nxr=Object.getPrototypeOf,ixr=Object.prototype.hasOwnProperty;var Us=(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 Jt=(i,r)=>()=>(i&&(r=i(i=0)),r);var dt=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports),Hw=(i,r)=>{for(var n in r)Eme(i,n,{get:r[n],enumerable:!0})},vvt=(i,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of rxr(r))!ixr.call(i,l)&&l!==n&&Eme(i,l,{get:()=>r[l],enumerable:!(o=txr(r,l))||o.enumerable});return i};var So=(i,r,n)=>(n=i!=null?exr(nxr(i)):{},vvt(r||!i||!i.__esModule?Eme(n,"default",{value:i,enumerable:!0}):n,i)),sxr=i=>vvt(Eme({},"__esModule",{value:!0}),i);function axr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.anthropic=="object"&&r.anthropic!==null&&typeof r.ollama=="object"&&r.ollama!==null&&typeof r.project=="object"&&r.project!==null&&typeof r.safety=="object"&&r.safety!==null&&typeof r.ui=="object"&&r.ui!==null&&typeof r.session=="object"&&r.session!==null&&typeof r.update=="object"&&r.update!==null&&typeof r.agentic=="object"&&r.agentic!==null}function oxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.model=="string"&&typeof r.maxTokens=="number"&&typeof r.temperature=="number"}function cxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.rootDir=="string"&&Array.isArray(r.ignorePatterns)&&Array.isArray(r.includePatterns)&&typeof r.maxFileSize=="number"&&typeof r.indexOnStartup=="boolean"}function lxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.requireApproval=="boolean"&&Array.isArray(r.autoApprovePatterns)&&Array.isArray(r.blockedPatterns)&&typeof r.maxFilesPerOperation=="number"&&typeof r.backupBeforeModify=="boolean"&&typeof r.shellCommandTimeout=="number"&&Array.isArray(r.allowedShellCommands)&&Array.isArray(r.blockedShellCommands)}function uxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r=="object"&&r!==null}function dxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.autoSave=="boolean"&&typeof r.autoSaveInterval=="number"&&typeof r.maxHistoryLength=="number"&&typeof r.autoCompactThreshold=="number"&&typeof r.sessionExpiryDays=="number"}function pxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.checkOnStartup=="boolean"&&typeof r.checkInterval=="number"&&typeof r.showNotifications=="boolean"&&typeof r.notificationStyle=="string"&&["banner","minimal","detailed","silent"].includes(r.notificationStyle)&&typeof r.includePrerelease=="boolean"}function fxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.version=="string"&&typeof r.config=="object"&&r.config!==null}var xvt=Jt(()=>{"use strict"});function wvt(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 mxr(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"&&wvt(r.consent)}function _xr(){return{dataCollection:kme.dataCollection.defaultValue,telemetry:kme.telemetry.defaultValue,analytics:kme.analytics.defaultValue,errorReporting:kme.errorReporting.defaultValue}}function hxr(){return{dataCollection:!0,telemetry:!0,analytics:!0,errorReporting:!0}}function gxr(){return{dataCollection:!0,telemetry:!1,analytics:!1,errorReporting:!1}}var SMe,kme,EMe=Jt(()=>{"use strict";SMe="1.0.0",kme={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 kH,CH=Jt(()=>{"use strict";kH=(l=>(l.MANUAL="manual",l.AUTO="auto",l.STRICT="strict",l.SMART="smart",l))(kH||{})});function Ixr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.updateAvailable=="boolean"&&typeof r.currentVersion=="string"&&typeof r.checkedAt=="string"}function bxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.checkOnStartup=="boolean"&&typeof r.checkInterval=="number"&&typeof r.showNotifications=="boolean"&&typeof r.notificationStyle=="string"&&typeof r.includePrerelease=="boolean"}function vxr(i){return["major","minor","patch","prerelease","build"].includes(i)}function xxr(i){return["banner","minimal","detailed","silent"].includes(i)}var yxr,Avt=Jt(()=>{"use strict";yxr={checkOnStartup:!0,checkInterval:4,showNotifications:!0,notificationStyle:"banner",includePrerelease:!1}});var Rq,kMe,Cme,Wq=Jt(()=>{"use strict";Rq=(b=>(b.DIRECT="direct",b.CLARIFICATION="clarification",b.TODO_LIST="todo_list",b.PLAN="plan",b.PLAN_ADOPT="plan_adopt",b.NO_ACTION="no_action",b.SPAWN_AGENT="spawn_agent",b))(Rq||{}),kMe=(b=>(b.PENDING="pending",b.IN_PROGRESS="in_progress",b.PAUSED="paused",b.COMPLETED="completed",b.FAILED="failed",b.SKIPPED="skipped",b.ROLLED_BACK="rolled_back",b))(kMe||{}),Cme=(W=>(W.IDLE="idle",W.CONTEXT_GATHERING="context_gathering",W.COMPLEXITY_ASSESSMENT="complexity_assessment",W.CLARIFICATION="clarification",W.PLAN_GENERATION="plan_generation",W.PLAN_REVIEW="plan_review",W.EXECUTION="execution",W.VERIFICATION="verification",W.COMPLETED="completed",W.FAILED="failed",W))(Cme||{})});var Tvt={};Hw(Tvt,{AGENT_SOURCE_PRIORITY:()=>Zq,compareAgentPriority:()=>Gvt,createDefaultAgentDefinition:()=>kvt,getAgentSourcePriority:()=>Gme,isValidAgentFrontmatter:()=>Nme,isValidAgentPermissionMode:()=>Tme,isValidAgentSource:()=>Svt,isValidCLIAgentConfig:()=>Evt,parseToolsList:()=>ED,serializeToolsList:()=>Cvt});function Tme(i){return typeof i=="string"&&["default","acceptEditsAsk","bypassPermissions","plan","ignore","acceptEdits","dontAsk"].includes(i)}function Svt(i){return typeof i=="string"&&["project","cli","user","builtin"].includes(i)}function Nme(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&&!Tme(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 Evt(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&&!Tme(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 kvt(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 ED(i){if(!(!i||i.trim()===""))return i.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function Cvt(i){if(!(!i||i.length===0))return i.join(", ")}function Gme(i){return Zq.indexOf(i)}function Gvt(i,r){return Gme(i.source)-Gme(r.source)}var Zq,Fme=Jt(()=>{"use strict";Zq=["builtin","user","cli","project"]});function Axr(){return{totalUsageTimeMs:0,lastRatingShownAt:null,lastRatingSubmittedAt:null,totalRatingsSubmitted:0,totalSessions:0,firstUsedAt:new Date().toISOString(),lastActivityAt:null}}function Sxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return typeof r.totalUsageTimeMs=="number"&&(r.lastRatingShownAt===null||typeof r.lastRatingShownAt=="string")&&(r.lastRatingSubmittedAt===null||typeof r.lastRatingSubmittedAt=="string")&&typeof r.totalRatingsSubmitted=="number"&&typeof r.totalSessions=="number"&&typeof r.firstUsedAt=="string"&&(r.lastActivityAt===null||typeof r.lastActivityAt=="string")}var wxr,Nvt=Jt(()=>{"use strict";wxr={usageTimeThresholdMs:12e4,cooldownPeriodMs:864e5,activityWindowMs:12e4,cooldownMultiplier:1.5,maxCooldownPeriodMs:6048e5}});function Wme(i){return typeof i=="string"&&Fvt.includes(i)}function Exr(i){return typeof i=="string"&&["personal","project"].includes(i)}function kxr(i){if(typeof i!="object"||i===null)return!1;let r=i;return!(r.description!==void 0&&typeof r.description!="string"||r.enabled!==void 0&&typeof r.enabled!="boolean"||r.tools!==void 0&&!Array.isArray(r.tools)||r.match!==void 0&&typeof r.match!="object"||r.timeout!==void 0&&typeof r.timeout!="number")}function CMe(i){return Rme.indexOf(i)}function Cxr(i,r){return CMe(i.source)-CMe(r.source)}var Fvt,Rme,GMe=Jt(()=>{"use strict";Fvt=["PreToolUse","PostToolUse","UserPromptSubmit","Notification","Stop"],Rme=["personal","project"]});function iZ(i){if(!i||typeof i!="object")return!1;let r=i;return typeof r.version=="string"&&typeof r.id=="string"&&typeof r.sessionId=="string"&&typeof r.projectPath=="string"&&typeof r.startedAt=="string"&&typeof r.endedAt=="string"&&typeof r.messageCount=="number"&&typeof r.summary=="string"&&Array.isArray(r.messages)&&Array.isArray(r.topics)&&(Array.isArray(r.operations)||Array.isArray(r.toolsUsed)&&Array.isArray(r.filesModified)&&Array.isArray(r.filesRead))}var TMe,NMe=Jt(()=>{"use strict";TMe="1.0"});var FMe,Rvt=Jt(()=>{"use strict";FMe=class i extends Error{scope;provider;model;limitValue;currentUsage;resetAt;constructor(r){let o=new Date(r.resetAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),l=r.scope==="model"?`model "${r.model}"`:`provider "${r.provider}"`;super(`Daily token limit exceeded for ${l}. Used ${r.currentUsage.toLocaleString()} / ${r.limitValue.toLocaleString()} tokens. Resets at ${o}.`),this.name="TokenLimitExceededError",this.scope=r.scope,this.provider=r.provider,this.model=r.model,this.limitValue=r.limitValue,this.currentUsage=r.currentUsage,this.resetAt=r.resetAt,Object.setPrototypeOf(this,i.prototype)}}});var Vq,kD,GH,Zme,RMe,Pq,WMe,ZMe,Gxr,TH,VMe,Txr,PMe,DMe,MMe,YMe,OMe,HMe,Dq,JMe,sZ,Vme,CD,aZ,Wvt,yC,LMe,XMe,Nxr,Fxr,oZ,Rxr,Pme,Wxr,Zxr,Vxr,Pxr,Dxr,Mxr,Zvt,Mq,NH,Vvt,UMe,Dme,Yq,Mme,Pvt,Dvt,Oq,Yxr,QMe,jMe,Hq,Oxr,Mvt,Hxr,Jxr,Lxr,Jw,SN,Yvt,BMe,t1,Xxr,Uxr,Qxr,jxr,Bxr,zxr,EN,kN,EI,Yme,qxr,$xr,Kxr,ewr,twr,zMe,qMe,rwr,od=Jt(()=>{"use strict";Vq=".compass",kD=".compass",GH="config.json",Zme="session.json",RMe="consent.json",Pq="credentials.enc",WMe="logs",ZMe="backups",Gxr="cache",TH="saved-sessions",VMe="index",Txr="context",PMe="temp",DMe="commands",MMe="agents",YMe="skills",OMe="hooks",HMe="rules",Dq="projects",JMe="memory",sZ="NOVA.md",Vme="NOVA.local.md",CD="MEMORY.md",aZ=200,Wvt="chats",yC=16384,LMe=2e5,XMe=8e4,Nxr=80,Fxr=10,oZ={anthropic:"haiku",ollama:"glm-4.7:cloud",zai:"glm-4.7:cloud",minimax:"glm-4.7:cloud"},Rxr="haiku",Pme=200,Wxr=75,Zxr=5,Vxr=0,Pxr=80,Dxr=!0,Mxr=3,Zvt=30,Mq=1,NH=100,Vvt=7,UMe=365,Dme=6e4,Yq=12e4,Mme=6e5,Pvt=50,Dvt=1024*1024,Oq=100,Yxr=15,QMe=8e3,jMe=4e4,Hq=4e3,Oxr=6e3,Mvt=4e3,Hxr=90,Jxr=1e5,Lxr=500*1024*1024,Jw="claude-sonnet-4-5-20250929",SN=1,Yvt=.5,BMe="haiku",t1="verbose_analyst",Xxr=4,Uxr="banner",Qxr=4,jxr=1e3,Bxr=16e3,zxr=.1,EN={anthropic:{model:Jw,maxTokens:16384,temperature:SN},ollama:{model:"glm-4.7:cloud",endpoint:"https://ollama.com",maxTokens:16384,temperature:Yvt},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:Dvt,indexOnStartup:!0},safety:{requireApproval:!0,autoApprovePatterns:[],blockedPatterns:[".env*","*.key","*.pem","*.p12","*.pfx","secrets/**","**/secrets/**","**/*.secret","**/credentials*","**/password*"],maxFilesPerOperation:Pvt,backupBeforeModify:!0,shellCommandTimeout:Yq,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:{},session:{autoSave:!0,autoSaveInterval:Dme,maxHistoryLength:Oq,autoCompactThreshold:8e4,sessionExpiryDays:Zvt,unleash:!1},update:{checkOnStartup:!0,checkInterval:Xxr,showNotifications:!0,notificationStyle:Uxr,includePrerelease:!1},agentic:{maxIterations:Pme,costWarningThreshold:Zxr,costHardCap:Vxr,autoCompactAtPercent:Pxr,stuckDetectionEnabled:Dxr,stuckDetectionThreshold:Mxr,maxIterationsPerTask:Wxr}},kN=["anthropic","ollama","zai","minimax"],EI={API_KEY:"ANTHROPIC_API_KEY",COMPASS_API_KEY:"COMPASS_API_KEY",OLLAMA_API_KEY:"OLLAMA_API_KEY",ZAI_API_KEY:"ZAI_API_KEY",MINIMAX_API_KEY:"MINIMAX_API_KEY",MODEL:"COMPASS_MODEL",CONFIG_PATH:"COMPASS_CONFIG",DEBUG:"COMPASS_DEBUG",NO_COLOR:"NO_COLOR",FORCE_COLOR:"FORCE_COLOR",HOME:"HOME",USERPROFILE:"USERPROFILE",EXPERIMENTAL_AGENT_TEAMS:"COMPASS_EXPERIMENTAL_AGENT_TEAMS"},Yme={anthropic:EI.API_KEY,ollama:EI.OLLAMA_API_KEY,zai:EI.ZAI_API_KEY,minimax:EI.MINIMAX_API_KEY},qxr="1.0.73",$xr="Compass CLI",Kxr="",ewr="1.0.0",twr={".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"},zMe=["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"],qMe=["node_modules",".git","dist","build","out","coverage",".next",".nuxt",".output",".cache",".parcel-cache","vendor","__pycache__",".pytest_cache","target","bin","obj"],rwr=[".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 GD,Ovt,Ome=Jt(()=>{"use strict";xvt();EMe();CH();Avt();Wq();Fme();Nvt();GMe();NMe();Rvt();od();GD="BASIC",Ovt=["BASIC","PRO","MAX","ENTERPRISE","UNLIMITED"]});var $Me={};Hw($Me,{CLAUDE_MODELS:()=>Lw,MODEL_ALIASES:()=>Jq,NO_SUBSCRIPTION_DAILY_TOKEN_LIMIT:()=>Hvt,calculateModelCost:()=>zvt,compareModels:()=>qvt,getAvailableAliases:()=>Uvt,getAvailableModelIds:()=>Xvt,getAvailableModels:()=>cZ,getCheapestModel:()=>Kvt,getDefaultModel:()=>jvt,getDefaultModelId:()=>Bvt,getModelConfig:()=>n_,getModelDescription:()=>Hme,getModelTier:()=>t1t,getModelsByCapability:()=>$vt,getMostCapableModel:()=>e1t,hasFullAccess:()=>Jvt,isAnthropicModel:()=>Lvt,isValidModel:()=>Qvt,resolveModelId:()=>yy});function Jvt(i){return i==="trial"||i==="active"}function yy(i){let r=i.toLowerCase();if(Jq[r])return Jq[r];for(let n of Object.keys(Lw))if(n.toLowerCase()===r)return n;return i}function n_(i){let r=yy(i);return Lw[r]}function Lvt(i){return n_(i)?.provider==="anthropic"}function cZ(){return Object.values(Lw)}function Xvt(){return Object.keys(Lw)}function Uvt(){return Object.keys(Jq)}function Qvt(i){return yy(i)in Lw}function jvt(){return Lw["claude-sonnet-4-5-20250929"]}function Bvt(){return"claude-sonnet-4-5-20250929"}function zvt(i,r,n){let o=n_(i);if(!o)return null;let l=r/1e6*o.pricing.inputPricePerMillion,p=n/1e6*o.pricing.outputPricePerMillion;return l+p}function qvt(i,r,n){let o=n_(i),l=n_(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 $vt(i){return cZ().filter(r=>r.capabilities[i])}function Kvt(){return cZ().reduce((r,n)=>n.pricing.inputPricePerMillion<r.pricing.inputPricePerMillion?n:r)}function e1t(){return Lw["claude-opus-4-6"]}function t1t(i){let r=yy(i);if(r.includes("haiku"))return"economy";if(r.includes("sonnet"))return"balanced";if(r.includes("opus"))return"premium"}function Hme(i){let r=yy(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";if(r.includes("glm-4.7"))return"OpenSource"}var Hvt,Lw,Jq,BS=Jt(()=>{"use strict";Hvt=15e4;Lw={"glm-5:cloud":{id:"glm-5:cloud",name:"Z.AI GLM 5",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"glm-4.7:cloud":{id:"glm-4.7:cloud",name:"Z.AI GLM 4.7",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"minimax-m2.5:cloud":{id:"minimax-m2.5:cloud",name:"MiniMax M2.5",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!1}},"kimi-k2.5:cloud":{id:"kimi-k2.5:cloud",name:"Kimi K2.5",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!1}},"gemini-3-pro-preview":{id:"gemini-3-pro-preview",name:"Gemini 3 Pro",provider:"ollama",baseUrl:"https://ollama.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:3,outputPricePerMillion:15},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"claude-sonnet-4-6":{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:3,outputPricePerMillion:15,cacheWrite5mPricePerMillion:3.75,cacheWrite1hPricePerMillion:6,cacheHitPricePerMillion:.3},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"claude-sonnet-4-5-20250929":{id:"claude-sonnet-4-5-20250929",name:"Claude Sonnet 4.5",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:3,outputPricePerMillion:15,cacheWrite5mPricePerMillion:3.75,cacheWrite1hPricePerMillion:6,cacheHitPricePerMillion:.3},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}},"claude-opus-4-6":{id:"claude-opus-4-6",name:"Claude Opus 4.6",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:5,outputPricePerMillion:25,cacheWrite5mPricePerMillion:6.25,cacheWrite1hPricePerMillion:10,cacheHitPricePerMillion:.5},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!0,complexityClassification:!0}},"claude-opus-4-5-20251101":{id:"claude-opus-4-5-20251101",name:"Claude Opus 4.5",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:5,outputPricePerMillion:25,cacheWrite5mPricePerMillion:6.25,cacheWrite1hPricePerMillion:10,cacheHitPricePerMillion:.5},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!0,complexityClassification:!0}},"claude-haiku-4-5-20251001":{id:"claude-haiku-4-5-20251001",name:"Claude Haiku 4.5",provider:"anthropic",baseUrl:"https://api.anthropic.com",contextWindow:2e5,maxOutputTokens:16384,pricing:{inputPricePerMillion:1,outputPricePerMillion:5,cacheWrite5mPricePerMillion:1.25,cacheWrite1hPricePerMillion:2,cacheHitPricePerMillion:.1},capabilities:{vision:!0,toolUse:!0,streaming:!0,extendedThinking:!1,complexityClassification:!0}}},Jq={sonnet:"claude-sonnet-4-6",opus:"claude-opus-4-6","sonnet-4.6":"claude-sonnet-4-6",sonnet46:"claude-sonnet-4-6","sonnet-4.5":"claude-sonnet-4-5-20250929",sonnet45:"claude-sonnet-4-5-20250929","opus-4.6":"claude-opus-4-6",opus46:"claude-opus-4-6","opus-4.5":"claude-opus-4-5-20251101",opus45:"claude-opus-4-5-20251101",haiku:"claude-haiku-4-5-20251001","glm-5":"glm-5:cloud","glm-4.7":"glm-4.7:cloud","minimax-m2.5":"minimax-m2.5:cloud","kimi-k2.5":"kimi-k2.5:cloud","gemini-3-pro":"gemini-3-pro-preview",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-6",best:"claude-opus-4-6",beyond:"glm-5:cloud",robust:"glm-4.7:cloud",deep:"kimi-k2.5:cloud",versatile:"minimax-m2.5:cloud",creative:"gemini-3-pro-preview",s:"claude-sonnet-4-5-20250929",o:"claude-opus-4-6",h:"claude-haiku-4-5-20251001",g:"glm-5:cloud",m:"minimax-m2.5:cloud",k:"kimi-k2.5:cloud",p:"gemini-3-pro-preview"}});function nwr(){let i=new Map;for(let r of FH){let n=i.get(r.category)||[];n.push(r),i.set(r.category,n)}return i}var Lq,KMe,e9e,FH,t9e=Jt(()=>{"use strict";Lq={network:{label:"Network Tools",priority:1},media:{label:"Media Tools",priority:2},development:{label:"Development Tools",priority:3},compression:{label:"Compression Tools",priority:4},text:{label:"Text Processing Tools",priority:5},file:{label:"File Tools",priority:6},system:{label:"System Tools",priority:7}},KMe=36e5,e9e=3e3,FH=[{command:"curl",name:"cURL",category:"network",description:"Transfer data with URLs",decisionRule:"Use for downloading files, making HTTP requests, testing APIs",useCases:["curl -O https://example.com/file.zip",'curl -X POST -d "data" https://api.example.com',"curl -I https://example.com (headers only)"]},{command:"wget",name:"wget",category:"network",description:"Non-interactive network downloader",decisionRule:"Use for downloading files, especially recursive downloads",useCases:["wget https://example.com/file.zip","wget -r https://example.com/docs/","wget -c https://example.com/large.zip (resume)"]},{command:"ssh",name:"SSH",category:"network",description:"Secure shell remote login",decisionRule:"Use for remote server access and secure connections",useCases:["ssh user@host","ssh -L 8080:localhost:80 user@host (tunnel)"]},{command:"ping",name:"Ping",category:"network",description:"Test network connectivity",decisionRule:"Use to check if a host is reachable",useCases:["ping example.com","ping -c 4 example.com (4 packets)"]},{command:"nslookup",name:"nslookup",category:"network",description:"Query DNS records",decisionRule:"Use for DNS lookups and troubleshooting",useCases:["nslookup example.com","nslookup -type=MX example.com"]},{command:"dig",name:"dig",category:"network",description:"DNS lookup utility",decisionRule:"Use for detailed DNS queries",useCases:["dig example.com","dig +short example.com","dig example.com MX"]},{command:"netstat",name:"netstat",category:"network",description:"Network statistics",decisionRule:"Use to view network connections and listening ports",useCases:["netstat -an (all connections)","netstat -tlnp (listening TCP ports)"]},{command:"ffmpeg",name:"FFmpeg",category:"media",description:"Audio/video conversion and processing",decisionRule:"Use for any audio/video conversion, extraction, or manipulation",useCases:["ffmpeg -i input.mp4 output.mp3 (extract audio)","ffmpeg -i input.mp4 -vn -acodec copy output.aac","ffmpeg -i input.mp4 -ss 00:01:00 -t 30 clip.mp4 (trim)"]},{command:"convert",name:"ImageMagick",category:"media",description:"Image conversion and manipulation",decisionRule:"Use for image format conversion, resizing, effects",useCases:["convert input.png output.jpg","convert input.png -resize 50% output.png","convert *.png output.pdf (combine to PDF)"]},{command:"yt-dlp",name:"yt-dlp",category:"media",description:"Video/audio downloader",decisionRule:"Use for downloading videos from YouTube and other sites",useCases:["yt-dlp https://youtube.com/watch?v=...","yt-dlp -x --audio-format mp3 URL (audio only)"]},{command:"git",name:"Git",category:"development",description:"Version control system",decisionRule:"Use for all version control operations",useCases:["git status","git diff","git log --oneline -10"]},{command:"node",name:"Node.js",category:"development",description:"JavaScript runtime",decisionRule:"Use for running JavaScript files or REPL",useCases:["node script.js",'node -e "console.log(1+1)"']},{command:"npm",name:"npm",category:"development",description:"Node.js package manager",decisionRule:"Use for JavaScript package management",useCases:["npm install package","npm run script","npm init -y"]},{command:"python",name:"Python",category:"development",description:"Python interpreter",decisionRule:"Use for running Python scripts or quick computations",useCases:["python script.py",'python -c "print(2**10)"']},{command:"pip",name:"pip",category:"development",description:"Python package manager",decisionRule:"Use for Python package installation",useCases:["pip install package","pip list","pip freeze > requirements.txt"]},{command:"docker",name:"Docker",category:"development",description:"Container platform",decisionRule:"Use for container operations",useCases:["docker ps","docker run -it ubuntu bash","docker build -t myapp ."]},{command:"code",name:"VS Code",category:"development",description:"Visual Studio Code editor",decisionRule:"Use to open files/folders in VS Code",useCases:["code .","code file.js"]},{command:"jq",name:"jq",category:"development",description:"JSON processor",decisionRule:"Use for parsing, filtering, and transforming JSON",useCases:["cat data.json | jq '.field'","jq '.items[] | .name' data.json","curl api.example.com | jq '.'"]},{command:"7z",name:"7-Zip",category:"compression",description:"High compression archiver",decisionRule:"Use for creating/extracting archives, especially 7z format",useCases:["7z x archive.7z","7z a archive.7z folder/"]},{command:"tar",name:"tar",category:"compression",description:"Archive utility",decisionRule:"Use for tar archives, common on Unix systems",useCases:["tar -xzf archive.tar.gz","tar -czf archive.tar.gz folder/","tar -tvf archive.tar (list contents)"]},{command:"zip",name:"zip",category:"compression",description:"Compress files into ZIP format",decisionRule:"Use for creating ZIP archives",useCases:["zip archive.zip file1 file2","zip -r archive.zip folder/"]},{command:"unzip",name:"unzip",category:"compression",description:"Extract ZIP archives",decisionRule:"Use for extracting ZIP files",useCases:["unzip archive.zip","unzip -l archive.zip (list contents)","unzip archive.zip -d destination/"]},{command:"gzip",name:"gzip",category:"compression",description:"GNU compression utility",decisionRule:"Use for gzip compression/decompression",useCases:["gzip file","gzip -d file.gz","gzip -k file (keep original)"]},{command:"grep",name:"grep",category:"text",description:"Search text patterns",decisionRule:"Use for searching patterns in files",useCases:['grep "pattern" file','grep -r "pattern" folder/','grep -i "pattern" file (case insensitive)']},{command:"sed",name:"sed",category:"text",description:"Stream editor",decisionRule:"Use for text transformations and substitutions",useCases:["sed 's/old/new/g' file","sed -i 's/old/new/g' file (in-place)"]},{command:"awk",name:"awk",category:"text",description:"Pattern scanning and processing",decisionRule:"Use for column-based text processing",useCases:["awk '{print $1}' file","awk -F: '{print $1}' /etc/passwd"]},{command:"find",name:"find",category:"file",description:"Search for files",decisionRule:"Use for finding files by name, type, date, etc.",useCases:['find . -name "*.js"',"find . -type f -mtime -7 (modified last 7 days)"]},{command:"rsync",name:"rsync",category:"file",description:"Fast file synchronization",decisionRule:"Use for copying/syncing files with progress and resume",useCases:["rsync -av source/ dest/","rsync -avz source/ user@host:dest/"]},{command:"pandoc",name:"Pandoc",category:"system",description:"Universal document converter",decisionRule:"Use for converting between document formats",useCases:["pandoc input.md -o output.pdf","pandoc input.docx -o output.html"]},{command:"htop",name:"htop",category:"system",description:"Interactive process viewer",decisionRule:"Use for monitoring system resources",useCases:["htop"]},{command:"btop",name:"btop",category:"system",description:"Resource monitor",decisionRule:"Use for monitoring system resources with better UI",useCases:["btop"]},{command:"lsof",name:"lsof",category:"system",description:"List open files",decisionRule:"Use to find which process is using a file or port",useCases:["lsof -i :8080 (what is using port 8080)","lsof /path/to/file"]}]});var r9e,Jme,Xq,n9e,Uq,Lme,Xme,CN,Qq=Jt(()=>{"use strict";r9e="Schedule.md",Jme="sched-",Xq=8,n9e=["active","paused","completed"],Uq=`# Scheduled Tasks
|
|
2
2
|
|
|
3
3
|
> Managed by Nova. Each task below runs on a cron schedule.
|
|
4
4
|
> Edit manually or use the schedule tools to manage tasks.
|
|
@@ -3749,7 +3749,7 @@ ${r}`),o.push({role:"user",content:b}),o}estimateTaskTokens(r,n,o){let l=Kp(r);f
|
|
|
3749
3749
|
`)}KS();var nqe=[{name:"Sessions",description:"Commands for managing your conversation session",commands:[{name:"/clear",description:"Reset session to clean state",usage:"/clear",aliases:["/reset","/restart"]},{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:"/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:"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"]}]},{name:"Cleanup",description:"Commands for cleaning up stored data",commands:[{name:"/purge",description:"Delete logs, backups, chats, and plans from .compass",usage:"/purge [--force|--help]",examples:["/purge","/purge --force"],aliases:["/cleanup"]}]}],jdn=[{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 zLt(i){let r=i.commands.filter(o=>!o.hidden);if(r.length===0)return"";let n=["",Dn.bold.cyan(`\u2501\u2501\u2501 ${i.name} \u2501\u2501\u2501`),Dn.gray(i.description),""];for(let o of r){if(n.push(` ${Dn.yellow(o.name)}`),n.push(` ${Dn.white(o.description)}`),o.usage&&n.push(` ${Dn.gray("Usage:")} ${Dn.dim(o.usage)}`),o.aliases&&o.aliases.length>0&&n.push(` ${Dn.gray("Aliases:")} ${Dn.dim(o.aliases.join(", "))}`),o.examples&&o.examples.length>0){n.push(` ${Dn.gray("Examples:")}`);for(let l of o.examples)n.push(` ${Dn.dim(l)}`)}n.push("")}return n.join(`
|
|
3750
3750
|
`)}function Bdn(){try{let{getCustomCommands:i}=(BLt(),sxr(jLt)),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 zdn(){let i=[...nqe],r=Bdn();r&&i.push(r);let n=i.map(zLt);return["",Dn.bold.white("Compass CLI - Interactive Commands"),Dn.gray("Use these commands during an interactive session"),...n,Dn.dim("\u2500".repeat(50)),Dn.gray("Tip: Type any natural language request to interact with Compass"),""].join(`
|
|
3751
3751
|
`)}function qdn(i){let r=i.startsWith("/")?i:`/${i}`,o=nqe.flatMap(p=>p.commands).find(p=>p.name===r||p.name===i||p.aliases?.includes(i)||p.aliases?.includes(r));if(!o)return null;let l=["",Dn.bold.cyan(o.name),Dn.white(o.description),""];if(o.usage&&(l.push(Dn.gray("Usage:")),l.push(` ${o.usage}`),l.push("")),o.aliases&&o.aliases.length>0&&(l.push(Dn.gray("Aliases:")),l.push(` ${o.aliases.join(", ")}`),l.push("")),o.examples&&o.examples.length>0){l.push(Dn.gray("Examples:"));for(let p of o.examples)l.push(` ${Dn.dim("$")} ${p}`);l.push("")}return l.join(`
|
|
3752
|
-
`)}F4();var p7n="1.0.
|
|
3752
|
+
`)}F4();var p7n="1.0.73",f7n="compass-cli",m7n="AI-powered development assistance using Anthropic's Claude models";export{Ume as ACTIVE_PLAN_TYPE_LIMITS,Zq as AGENT_SOURCE_PRIORITY,m7n as APP_DESCRIPTION,$xr as APP_DISPLAY_NAME,f7n as APP_NAME,Kxr as APP_TAGLINE,qxr as APP_VERSION,XLt as ASCII_BANNER,XMe as AUTO_COMPACT_TRIGGER,Dme as AUTO_SAVE_INTERVAL_MS,Zee as ActionLogger,$Vt as ActionStatus,ZI as ActionType,zhe as AnthropicClient,$_e as ApprovalManager,kH as ApprovalMode,ZMe as BACKUPS_DIR,Mq as BACKUP_RETENTION_DAYS,rwr as BINARY_EXTENSIONS,ehe as BackupManager,Gxr as CACHE_DIR,Lq as CATEGORY_INFO,TMe as CHAT_ARCHIVE_VERSION,Lw as CLAUDE_MODELS,jdn as CLI_COMMANDS,Mdn as COMPASS_ICON,GH as CONFIG_FILE_NAME,UMe as CONSENT_EXPIRY_DAYS,RMe as CONSENT_FILE_NAME,ewr as CONSENT_VERSION,Txr as CONTEXT_DIR,Hxr as CONTEXT_WINDOW_SAFETY_MARGIN,Nxr as CONTEXT_WINDOW_WARNING_PERCENT,Pq as CREDENTIALS_FILE_NAME,CN as CRON_DAY_NAMES,Lme as CRON_PRESETS,X_e as ChatArchivalService,Bee as ComplexityClassifier,W_e as ConfigManager,Y_e as ConsentManager,L_e as CredentialStore,Xme as DAY_NAME_TO_CRON,SN as DEFAULT_ANTHROPIC_TEMPERATURE,Rxr as DEFAULT_CLASSIFIER_MODEL,oZ as DEFAULT_CLASSIFIER_MODELS_BY_PROVIDER,EN as DEFAULT_CONFIG,Fxr as DEFAULT_COST_WARNING_THRESHOLD,yC as DEFAULT_MAX_TOKENS,Jw as DEFAULT_MODEL,Yvt as DEFAULT_OLLAMA_TEMPERATURE,t1 as DEFAULT_PERSONALITY_MODE,GD as DEFAULT_PLAN_TYPE,wxr as DEFAULT_RATING_CONFIG,Uq as DEFAULT_SCHEDULE_HEADER,yxr as DEFAULT_UPDATE_CONFIG,Qme as DISABLED_MODELS,EI as ENV_VARS,Lee as EnhancedContextGatherer,D_e as EventEmitter,Rq as ExecutionMode,E4t as ExecutionStrategy,Vq as GLOBAL_COMPASS_DIR,jK as GitService,Fvt as HOOK_EVENTS,Rme as HOOK_SOURCE_PRIORITY,xxe as HistoryManager,VMe as INDEX_DIR,cre as InteractiveClarifier,A4t as IssueCategory,w4t as IssueSeverity,twr as LANGUAGE_EXTENSIONS,WMe as LOGS_DIR,ite as LogInterpreter,NH as MAX_BACKUP_FILES,Lxr as MAX_CACHE_SIZE_BYTES,Hq as MAX_COMMAND_OUTPUT_TOKENS,Yxr as MAX_DYNAMIC_STREAM_BLOCKS,Pvt as MAX_FILES_PER_OPERATION,QMe as MAX_FILE_READ_TOKENS,Dvt as MAX_FILE_SIZE_BYTES,Oq as MAX_HISTORY_LENGTH,Jxr as MAX_INDEXED_FILES,aZ as MAX_MEMORY_LINES,Qxr as MAX_RETRY_ATTEMPTS,Oxr as MAX_SEARCH_RESULT_TOKENS,JMe as MEMORY_DIR,CD as MEMORY_FILE_NAME,Jq as MODEL_ALIASES,Vme as NOVA_LOCAL_MD_FILE_NAME,sZ as NOVA_MD_FILE_NAME,Hvt as NO_SUBSCRIPTION_DAILY_TOKEN_LIMIT,a9e as PLAN_LIMITS,Dq as PROJECTS_DIR,kD as PROJECT_COMPASS_DIR,kN as PROVIDERS,Yme as PROVIDER_ENV_VARS,lre as PlanGenerator,jxr as RETRY_BASE_DELAY_MS,zxr as RETRY_JITTER_FACTOR,Bxr as RETRY_MAX_DELAY_MS,Bq as ROLLING_WINDOW_HOURS,jq as ROLLING_WINDOW_MS,HMe as RULES_DIR,TH as SAVED_SESSIONS_DIR,r9e as SCHEDULE_FILE_NAME,Zvt as SESSION_EXPIRY_DAYS,Zme as SESSION_FILE_NAME,Mme as SHELL_COMMAND_MAX_TIMEOUT_MS,Yq as SHELL_COMMAND_TIMEOUT_MS,nqe as SLASH_COMMANDS,FH as SYSTEM_UTILITIES,U_e as SessionManager,Sye as ShellExecutor,jVt as StepStatus,Wee as StepTracker,BVt as StepType,Jme as TASK_ID_PREFIX,Xq as TASK_ID_RANDOM_LENGTH,n9e as TASK_STATUSES,PMe as TEMP_DIR,i9e as TOKEN_LIMITS_STORE_FILENAME,s9e as TOKEN_LIMITS_STORE_VERSION,fwr as TOKEN_LIMIT_MESSAGES,iwr as TOKEN_LIMIT_WARNING_THRESHOLD_PERCENT,LMe as TOKEN_WARNING_THRESHOLD,qMe as TOOL_READ_BLOCKLIST_DIRS,zMe as TOOL_READ_BLOCKLIST_PATTERNS,kMe as TaskExecutionStatus,zVt as TaskStatus,GYe as TokenLimitEnforcer,FMe as TokenLimitExceededError,Q_e as TokenLimitStore,q_e as TokenTracker,Mee as ToolRegistry,KMe as UTILITY_DETECTION_CACHE_TTL,e9e as UTILITY_DETECTION_TIMEOUT,Ovt as VALID_PLAN_TYPES,p7n as VERSION,ure as Verifier,$7e as WORKFLOW_PROMPTS,ste as WorkflowManager,dre as WorkflowOrchestrator,Cme as WorkflowPhase,S4t as WorkflowState,Vdn as applyCompletion,dOr as applyPatch,lOr as areIdentical,LHr as calculateContextUsagePercent,zvt as calculateModelCost,OHr as calculateRemainingTokens,ATr as colorByStatus,aOr as colorizeDiff,Gvt as compareAgentPriority,Cxr as compareHookPriority,qvt as compareModels,RN as copy,t8r as createActionLogger,F$ as createChatArchivalService,hJr as createComplexityClassifier,kvt as createDefaultAgentDefinition,_xr as createDefaultConsent,Axr as createDefaultRatingState,N8r as createEnhancedContextGatherer,hxr as createFullConsent,IVr as createGitService,fdn as createInteractiveClarifier,yLr as createLogInterpreter,gxr as createMinimalConsent,_dn as createPlanGenerator,e8r as createStepTracker,V$ as createTokenLimitStore,d8r as createToolRegistry,gdn as createVerifier,bLr as createWorkflowManager,Idn as createWorkflowOrchestrator,vYe as decrypt,bYe as encrypt,Cl as ensureDir,MHr as estimateConversationTokens,YHr as estimateSystemPromptTokens,Kp as estimateTokens,wdn as executeSlashCommand,qze as extractCodeBlocks,zze as extractMentions,qdn as formatCommandHelp,yTr as formatCost,mTr as formatDate,_Tr as formatDuration,gTr as formatFileSize,zdn as formatFullHelp,zLt as formatHelpCategory,wTr as formatList,ZSt as formatPercent,xTr as formatProgressBar,hTr as formatRelativeTime,sn as formatTimestamp,ITr as formatTokenCount,JHr as formatTokenDisplay,k4 as generateDiff,oOr as generateDiffSummary,FTr as generateSecureRandom,cOr as generateWordDiff,n5 as getActionLogger,Gme as getAgentSourcePriority,Ay as getAnthropicClient,hh as getApprovalManager,Uvt as getAvailableAliases,Xvt as getAvailableModelIds,cZ as getAvailableModels,EZ as getBackupManager,Wkr as getBasename,uOr as getChangedLineCount,Kvt as getCheapestModel,RJ as getCodebaseIndexer,Cdn as getCompletions,zee as getComplexityClassifier,i8 as getConfigManager,hYe as getConsentManager,lF as getContextBuilder,XHr as getContextUsageColor,KHr as getConversationCompactor,S0 as getCredentialStore,jvt as getDefaultModel,Bvt as getDefaultModelId,Xee as getEnhancedContextGatherer,aa as getEventEmitter,Rkr as getExtension,aF as getFileService,$o as getGlobalCompassDir,Adn as getHistoryManager,CMe as getHookSourcePriority,Qze as getInteractiveClarifier,tQe as getLogInterpreter,n_ as getModelConfig,Hme as getModelDescription,t1t as getModelTier,j_e as getModelTokens,$vt as getModelsByCapability,e1t as getMostCapableModel,hxe as getPlanGenerator,ou as getProjectCompassDir,Nkr as getRelativePath,a_ as getSessionManager,Ey as getShellExecutor,tqe as getSlashCommandRegistry,r5 as getStepTracker,Eye as getSystemUtilitiesPromptSection,H3t as getSystemUtilityDetector,Ddn as getTaskProcessor,Jb as getTokenTracker,sx as getToolRegistry,nwr as getUtilitiesByCategory,Bze as getVerifier,ILr as getWorkflowManager,ydn as getWorkflowOrchestrator,Jvt as hasFullAccess,xYe as hash,RTr as hmac,uA as interpolateTemplate,Lvt as isAnthropicModel,C$ as isDirectory,N_e as isFile,HD as isPathWithin,Nme as isValidAgentFrontmatter,Tme as isValidAgentPermissionMode,Svt as isValidAgentSource,oxr as isValidAnthropicConfig,Evt as isValidCLIAgentConfig,iZ as isValidChatArchive,axr as isValidCompassConfig,fxr as isValidConfigFile,wvt as isValidConsent,mxr as isValidConsentRecord,Wme as isValidHookEvent,kxr as isValidHookFrontmatter,Exr as isValidHookSource,Qvt as isValidModel,xxr as isValidNotificationStyle,cxr as isValidProjectConfig,Sxr as isValidRatingState,lxr as isValidSafetyConfig,dxr as isValidSessionConfig,xdn as isValidSlashCommand,uxr as isValidUIConfig,Ixr as isValidUpdateCheckResult,bxr as isValidUpdateConfig,pxr as isValidUpdateSettingsConfig,vxr as isValidUpdateType,K as logger,h$ as matchesPattern,Fkr as normalizeSeparators,vTr as padString,MLt as parseArgs,vdn as parseInput,ED as parseToolsList,na as pathExists,n8 as readDir,YUe as registerBuiltInTools,eqe as registerSlashCommand,A0 as remove,Hdn as renderBanner,Jdn as renderMiniBanner,Ldn as renderWelcome,R$ as resetIfExpired,Gkr as resolveGlobalPath,yy as resolveModelId,o9e as resolvePlanLimits,Tkr as resolveProjectPath,Lu as safeReadFile,cd as safeReadJson,w0 as safeWriteFile,M_ as safeWriteJson,OD as sanitizePath,WTr as secureCompare,Cvt as serializeToolsList,vy as stat,Z$ as sumAllUsage,yZ as toForwardSlashes,bTr as truncate,HHr as wouldExceedContext};
|
|
3753
3753
|
/*! Bundled license information:
|
|
3754
3754
|
|
|
3755
3755
|
typescript/lib/typescript.js:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compass-ai/nova",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.73",
|
|
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",
|
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
"files": [
|
|
105
105
|
"dist",
|
|
106
|
+
"scripts/preuninstall.mjs",
|
|
106
107
|
"README.md",
|
|
107
108
|
"LICENSE"
|
|
108
109
|
]
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Preuninstall hook for Nova CLI
|
|
5
|
+
*
|
|
6
|
+
* Runs before `npm uninstall` to clean up the ~/.compass directory
|
|
7
|
+
* containing config, credentials, and data.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { existsSync } from 'fs';
|
|
11
|
+
import { rm } from 'fs/promises';
|
|
12
|
+
import { homedir } from 'os';
|
|
13
|
+
import { join } from 'path';
|
|
14
|
+
|
|
15
|
+
const COMPASS_DIR = join(homedir(), '.compass');
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get size of directory in bytes
|
|
19
|
+
* @param {string} dirPath - Directory path
|
|
20
|
+
* @returns {Promise<number>} Size in bytes
|
|
21
|
+
*/
|
|
22
|
+
async function getDirectorySize(dirPath) {
|
|
23
|
+
try {
|
|
24
|
+
const { execSync } = await import('child_process');
|
|
25
|
+
|
|
26
|
+
// Use platform-appropriate command
|
|
27
|
+
if (process.platform === 'win32') {
|
|
28
|
+
// PowerShell command to get directory size
|
|
29
|
+
const output = execSync(
|
|
30
|
+
`powershell -Command "(Get-ChildItem -Path '${dirPath}' -Recurse -File | Measure-Object -Property Length -Sum).Sum"`,
|
|
31
|
+
{ encoding: 'utf-8' }
|
|
32
|
+
);
|
|
33
|
+
return parseInt(output.trim()) || 0;
|
|
34
|
+
} else {
|
|
35
|
+
// Unix du command
|
|
36
|
+
const output = execSync(`du -sb "${dirPath}" 2>/dev/null | cut -f1`, { encoding: 'utf-8' });
|
|
37
|
+
return parseInt(output.trim()) || 0;
|
|
38
|
+
}
|
|
39
|
+
} catch {
|
|
40
|
+
return 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Format bytes to human-readable size
|
|
46
|
+
* @param {number} bytes - Size in bytes
|
|
47
|
+
* @returns {string} Formatted size string
|
|
48
|
+
*/
|
|
49
|
+
function formatSize(bytes) {
|
|
50
|
+
if (bytes === 0) return '0 B';
|
|
51
|
+
const k = 1024;
|
|
52
|
+
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
53
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
54
|
+
return Math.round((bytes / Math.pow(k, i)) * 100) / 100 + ' ' + sizes[i];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Main preuninstall logic
|
|
59
|
+
*/
|
|
60
|
+
async function main() {
|
|
61
|
+
console.log('\n┌─────────────────────────────────────────────────────┐');
|
|
62
|
+
console.log('│ Nova CLI - Uninstall Cleanup │');
|
|
63
|
+
console.log('└─────────────────────────────────────────────────────┘\n');
|
|
64
|
+
|
|
65
|
+
// Check if .compass directory exists
|
|
66
|
+
if (!existsSync(COMPASS_DIR)) {
|
|
67
|
+
console.log('ℹ️ No user data found. Nothing to clean up.\n');
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Get directory size
|
|
72
|
+
const size = await getDirectorySize(COMPASS_DIR);
|
|
73
|
+
const sizeStr = formatSize(size);
|
|
74
|
+
|
|
75
|
+
console.log('📁 User data directory found:');
|
|
76
|
+
console.log(` Location: ${COMPASS_DIR}`);
|
|
77
|
+
console.log(` Size: ${sizeStr}\n`);
|
|
78
|
+
|
|
79
|
+
console.log('🗑️ Removing user data...');
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
await rm(COMPASS_DIR, { recursive: true, force: true });
|
|
83
|
+
console.log('✅ Successfully removed all Nova user data.');
|
|
84
|
+
console.log(` Freed up ${sizeStr}\n`);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
console.error('❌ Failed to remove user data:', error.message);
|
|
87
|
+
console.error(` You can manually delete: ${COMPASS_DIR}\n`);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
console.log('Proceeding with uninstall...\n');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Run main function
|
|
95
|
+
main().catch((error) => {
|
|
96
|
+
console.error('❌ Preuninstall hook failed:', error);
|
|
97
|
+
// Don't block uninstall on error
|
|
98
|
+
process.exit(0);
|
|
99
|
+
});
|