@compass-ai/nova 1.0.24 → 1.0.25
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 +541 -529
- package/dist/index.js +23 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var K2r=Object.create;var Xfe=Object.defineProperty;var evr=Object.getOwnPropertyDescriptor;var tvr=Object.getOwnPropertyNames;var rvr=Object.getPrototypeOf,nvr=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 cr=(i,r)=>()=>(i&&(r=i(i=0)),r);var ut=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports),KT=(i,r)=>{for(var n in r)Xfe(i,n,{get:r[n],enumerable:!0})},vIt=(i,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of tvr(r))!nvr.call(i,l)&&l!==n&&Xfe(i,l,{get:()=>r[l],enumerable:!(o=evr(r,l))||o.enumerable});return i};var To=(i,r,n)=>(n=i!=null?K2r(rvr(i)):{},vIt(r||!i||!i.__esModule?Xfe(n,"default",{value:i,enumerable:!0}):n,i)),ivr=i=>vIt(Xfe({},"__esModule",{value:!0}),i);function xIt(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 fvr(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"&&xIt(r.consent)}function mvr(){return{dataCollection:Qfe.dataCollection.defaultValue,telemetry:Qfe.telemetry.defaultValue,analytics:Qfe.analytics.defaultValue,errorReporting:Qfe.errorReporting.defaultValue}}function _vr(){return{dataCollection:!0,telemetry:!0,analytics:!0,errorReporting:!0}}function hvr(){return{dataCollection:!0,telemetry:!1,analytics:!1,errorReporting:!1}}var NVe,Qfe,kVe=cr(()=>{"use strict";NVe="1.0.0",Qfe={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 yY,bY=cr(()=>{"use strict";yY=(l=>(l.MANUAL="manual",l.AUTO="auto",l.STRICT="strict",l.SMART="smart",l))(yY||{})});var mq,FVe,Ufe,_q=cr(()=>{"use strict";mq=(g=>(g.DIRECT="direct",g.CLARIFICATION="clarification",g.TODO_LIST="todo_list",g.PLAN="plan",g.PLAN_ADOPT="plan_adopt",g.NO_ACTION="no_action",g))(mq||{}),FVe=(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))(FVe||{}),Ufe=(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))(Ufe||{})});function WVe(i){return typeof i=="string"&&["default","acceptEditsAsk","bypassPermissions","plan","ignore"].includes(i)}function xvr(i){return typeof i=="string"&&["project","cli","user","builtin"].includes(i)}function VVe(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.model!==void 0&&typeof r.model!="string"||r.permissionMode!==void 0&&!WVe(r.permissionMode)||r.skills!==void 0&&typeof r.skills!="string")}function wvr(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.model!==void 0&&typeof r.model!="string"||r.permissionMode!==void 0&&!WVe(r.permissionMode)||r.skills!==void 0&&!Array.isArray(r.skills))}function Avr(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 Bfe(i){if(!(!i||i.trim()===""))return i.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function Svr(i){if(!(!i||i.length===0))return i.join(", ")}function RVe(i){return jfe.indexOf(i)}function Gvr(i,r){return RVe(i.source)-RVe(r.source)}var jfe,ZVe=cr(()=>{"use strict";jfe=["builtin","user","cli","project"]});var WIt={};KT(WIt,{CLAUDE_MODELS:()=>xw,MODEL_ALIASES:()=>hq,calculateModelCost:()=>CIt,compareModels:()=>TIt,getAvailableAliases:()=>AIt,getAvailableModelIds:()=>wIt,getAvailableModels:()=>vY,getCheapestModel:()=>kIt,getDefaultModel:()=>GIt,getDefaultModelId:()=>EIt,getModelConfig:()=>vw,getModelDescription:()=>zfe,getModelTier:()=>RIt,getModelsByCapability:()=>NIt,getMostCapableModel:()=>FIt,isValidModel:()=>SIt,resolveModelId:()=>ww});function ww(i){let r=i.toLowerCase();if(hq[r])return hq[r];for(let n of Object.keys(xw))if(n.toLowerCase()===r)return n;return i}function vw(i){let r=ww(i);return xw[r]}function vY(){return Object.values(xw)}function wIt(){return Object.keys(xw)}function AIt(){return Object.keys(hq)}function SIt(i){return ww(i)in xw}function GIt(){return xw["claude-sonnet-4-5-20250929"]}function EIt(){return"claude-sonnet-4-5-20250929"}function CIt(i,r,n){let o=vw(i);if(!o)return null;let l=r/1e6*o.pricing.inputPricePerMillion,f=n/1e6*o.pricing.outputPricePerMillion;return l+f}function TIt(i,r,n){let o=vw(i),l=vw(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 NIt(i){return vY().filter(r=>r.capabilities[i])}function kIt(){return vY().reduce((r,n)=>n.pricing.inputPricePerMillion<r.pricing.inputPricePerMillion?n:r)}function FIt(){return xw["claude-opus-4-5-20251101"]}function RIt(i){let r=ww(i);if(r.includes("haiku"))return"economy";if(r.includes("sonnet"))return"balanced";if(r.includes("opus"))return"premium"}function zfe(i){let r=ww(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 xw,hq,SW=cr(()=>{"use strict";xw={"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}}},hq={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 gq,Iq,xY,qfe,DVe,yq,PVe,MVe,Nvr,wY,YVe,kvr,OVe,HVe,eN,JVe,LVe,Fvr,Rvr,Wvr,XVe,QVe,UVe,$fe,Vvr,Zvr,Kfe,jVe,bq,Dvr,Pvr,Mvr,Yvr,a4,AY,BVe,Ovr,Hvr,Jvr,Lvr,Xvr,vE,o4,Qvr,Uvr,jvr,Bvr,zvr,zVe,qVe,qvr,Qm=cr(()=>{"use strict";gq=".compass",Iq=".compass",xY="config.json",qfe="session.json",DVe="consent.json",yq="credentials.enc",PVe="logs",MVe="backups",Nvr="cache",wY="saved-sessions",YVe="index",kvr="context",OVe="commands",HVe="agents",eN=16384,JVe=5e4,LVe=5e4,Fvr=80,Rvr=10,Wvr=30,XVe=30,QVe=365,UVe=6e4,$fe=3e4,Vvr=50,Zvr=1048576,Kfe=100,jVe=8e3,bq=4e3,Dvr=6e3,Pvr=90,Mvr=1e5,Yvr=524288e3,a4="claude-sonnet-4-5-20250929",AY=.6,BVe="haiku",Ovr="banner",Hvr=4,Jvr=1e3,Lvr=16e3,Xvr=.1,vE={anthropic:{model:a4,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:Ovr,includePrerelease:!1},agentic:{maxIterations:200,costWarningThreshold:5,costHardCap:0,autoCompactAtPercent:80,stuckDetectionEnabled:!0,stuckDetectionThreshold:3,maxIterationsPerTask:50}},o4={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"},Qvr="1.0.24",Uvr="Compass CLI",jvr="Agentic CLI by Compass Agentic Platform",Bvr="1.0.0",zvr={".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"},zVe=["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"],qVe=["node_modules",".git","dist","build","out","coverage",".next",".nuxt",".output",".cache",".parcel-cache","vendor","__pycache__",".pytest_cache","target","bin","obj"],qvr=[".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 PIt=ut((Dun,$Ve)=>{"use strict";var VIt=hs("path"),ZIt=hs("module"),$vr=hs("fs"),DIt=(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=$vr.realpathSync(i)}catch(f){if(f.code==="ENOENT")i=VIt.resolve(i);else{if(n)return null;throw f}}let o=VIt.join(i,"noop.js"),l=()=>ZIt._resolveFilename(r,{id:o,filename:o,paths:ZIt._nodeModulePaths(i)});if(n)try{return l()}catch{return null}return l()};$Ve.exports=(i,r)=>DIt(i,r);$Ve.exports.silent=(i,r)=>DIt(i,r,!0)});var YIt=ut((Pun,KVe)=>{"use strict";var MIt=()=>{let i=Error.prepareStackTrace;Error.prepareStackTrace=(n,o)=>o;let r=new Error().stack.slice(1);return Error.prepareStackTrace=i,r};KVe.exports=MIt;KVe.exports.default=MIt});var HIt=ut((Mun,OIt)=>{"use strict";var Kvr=YIt();OIt.exports=i=>{let r=Kvr();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 LIt=ut((Yun,JIt)=>{"use strict";var exr=hs("path"),txr=PIt(),rxr=HIt();JIt.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");let r=rxr(__filename),n=r?exr.dirname(r):__dirname,o=txr(n,i),l=hs.cache[o];if(l&&l.parent){let g=l.parent.children.length;for(;g--;)l.parent.children[g].id===o&&l.parent.children.splice(g,1)}delete hs.cache[o];let f=hs.cache[r];return f===void 0||f.require===void 0?hs(o):f.require(o)}});var QIt=ut((Hun,XIt)=>{"use strict";XIt.exports=function(r){return r?r instanceof Array||Array.isArray(r)||r.length>=0&&r.splice instanceof Function:!1}});var jIt=ut((Jun,UIt)=>{"use strict";var nxr=hs("util"),ixr=QIt(),e7e=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,ixr(P)||(P=[P]))}return P.join(`
|
|
1
|
+
var K2r=Object.create;var Xfe=Object.defineProperty;var evr=Object.getOwnPropertyDescriptor;var tvr=Object.getOwnPropertyNames;var rvr=Object.getPrototypeOf,nvr=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 cr=(i,r)=>()=>(i&&(r=i(i=0)),r);var ut=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports),KT=(i,r)=>{for(var n in r)Xfe(i,n,{get:r[n],enumerable:!0})},vIt=(i,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of tvr(r))!nvr.call(i,l)&&l!==n&&Xfe(i,l,{get:()=>r[l],enumerable:!(o=evr(r,l))||o.enumerable});return i};var To=(i,r,n)=>(n=i!=null?K2r(rvr(i)):{},vIt(r||!i||!i.__esModule?Xfe(n,"default",{value:i,enumerable:!0}):n,i)),ivr=i=>vIt(Xfe({},"__esModule",{value:!0}),i);function xIt(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 fvr(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"&&xIt(r.consent)}function mvr(){return{dataCollection:Qfe.dataCollection.defaultValue,telemetry:Qfe.telemetry.defaultValue,analytics:Qfe.analytics.defaultValue,errorReporting:Qfe.errorReporting.defaultValue}}function _vr(){return{dataCollection:!0,telemetry:!0,analytics:!0,errorReporting:!0}}function hvr(){return{dataCollection:!0,telemetry:!1,analytics:!1,errorReporting:!1}}var NVe,Qfe,kVe=cr(()=>{"use strict";NVe="1.0.0",Qfe={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 yY,bY=cr(()=>{"use strict";yY=(l=>(l.MANUAL="manual",l.AUTO="auto",l.STRICT="strict",l.SMART="smart",l))(yY||{})});var mq,FVe,Ufe,_q=cr(()=>{"use strict";mq=(g=>(g.DIRECT="direct",g.CLARIFICATION="clarification",g.TODO_LIST="todo_list",g.PLAN="plan",g.PLAN_ADOPT="plan_adopt",g.NO_ACTION="no_action",g))(mq||{}),FVe=(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))(FVe||{}),Ufe=(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))(Ufe||{})});function WVe(i){return typeof i=="string"&&["default","acceptEditsAsk","bypassPermissions","plan","ignore"].includes(i)}function xvr(i){return typeof i=="string"&&["project","cli","user","builtin"].includes(i)}function VVe(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.model!==void 0&&typeof r.model!="string"||r.permissionMode!==void 0&&!WVe(r.permissionMode)||r.skills!==void 0&&typeof r.skills!="string")}function wvr(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.model!==void 0&&typeof r.model!="string"||r.permissionMode!==void 0&&!WVe(r.permissionMode)||r.skills!==void 0&&!Array.isArray(r.skills))}function Avr(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 Bfe(i){if(!(!i||i.trim()===""))return i.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function Svr(i){if(!(!i||i.length===0))return i.join(", ")}function RVe(i){return jfe.indexOf(i)}function Gvr(i,r){return RVe(i.source)-RVe(r.source)}var jfe,ZVe=cr(()=>{"use strict";jfe=["builtin","user","cli","project"]});var WIt={};KT(WIt,{CLAUDE_MODELS:()=>xw,MODEL_ALIASES:()=>hq,calculateModelCost:()=>CIt,compareModels:()=>TIt,getAvailableAliases:()=>AIt,getAvailableModelIds:()=>wIt,getAvailableModels:()=>vY,getCheapestModel:()=>kIt,getDefaultModel:()=>GIt,getDefaultModelId:()=>EIt,getModelConfig:()=>vw,getModelDescription:()=>zfe,getModelTier:()=>RIt,getModelsByCapability:()=>NIt,getMostCapableModel:()=>FIt,isValidModel:()=>SIt,resolveModelId:()=>ww});function ww(i){let r=i.toLowerCase();if(hq[r])return hq[r];for(let n of Object.keys(xw))if(n.toLowerCase()===r)return n;return i}function vw(i){let r=ww(i);return xw[r]}function vY(){return Object.values(xw)}function wIt(){return Object.keys(xw)}function AIt(){return Object.keys(hq)}function SIt(i){return ww(i)in xw}function GIt(){return xw["claude-sonnet-4-5-20250929"]}function EIt(){return"claude-sonnet-4-5-20250929"}function CIt(i,r,n){let o=vw(i);if(!o)return null;let l=r/1e6*o.pricing.inputPricePerMillion,f=n/1e6*o.pricing.outputPricePerMillion;return l+f}function TIt(i,r,n){let o=vw(i),l=vw(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 NIt(i){return vY().filter(r=>r.capabilities[i])}function kIt(){return vY().reduce((r,n)=>n.pricing.inputPricePerMillion<r.pricing.inputPricePerMillion?n:r)}function FIt(){return xw["claude-opus-4-5-20251101"]}function RIt(i){let r=ww(i);if(r.includes("haiku"))return"economy";if(r.includes("sonnet"))return"balanced";if(r.includes("opus"))return"premium"}function zfe(i){let r=ww(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 xw,hq,SW=cr(()=>{"use strict";xw={"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}}},hq={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 gq,Iq,xY,qfe,DVe,yq,PVe,MVe,Nvr,wY,YVe,kvr,OVe,HVe,eN,JVe,LVe,Fvr,Rvr,Wvr,XVe,QVe,UVe,$fe,Vvr,Zvr,Kfe,jVe,bq,Dvr,Pvr,Mvr,Yvr,a4,AY,BVe,Ovr,Hvr,Jvr,Lvr,Xvr,vE,o4,Qvr,Uvr,jvr,Bvr,zvr,zVe,qVe,qvr,Qm=cr(()=>{"use strict";gq=".compass",Iq=".compass",xY="config.json",qfe="session.json",DVe="consent.json",yq="credentials.enc",PVe="logs",MVe="backups",Nvr="cache",wY="saved-sessions",YVe="index",kvr="context",OVe="commands",HVe="agents",eN=16384,JVe=5e4,LVe=5e4,Fvr=80,Rvr=10,Wvr=30,XVe=30,QVe=365,UVe=6e4,$fe=3e4,Vvr=50,Zvr=1048576,Kfe=100,jVe=8e3,bq=4e3,Dvr=6e3,Pvr=90,Mvr=1e5,Yvr=524288e3,a4="claude-sonnet-4-5-20250929",AY=.6,BVe="haiku",Ovr="banner",Hvr=4,Jvr=1e3,Lvr=16e3,Xvr=.1,vE={anthropic:{model:a4,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:Ovr,includePrerelease:!1},agentic:{maxIterations:200,costWarningThreshold:5,costHardCap:0,autoCompactAtPercent:80,stuckDetectionEnabled:!0,stuckDetectionThreshold:3,maxIterationsPerTask:50}},o4={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"},Qvr="1.0.25",Uvr="Compass CLI",jvr="Agentic CLI by Compass Agentic Platform",Bvr="1.0.0",zvr={".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"},zVe=["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"],qVe=["node_modules",".git","dist","build","out","coverage",".next",".nuxt",".output",".cache",".parcel-cache","vendor","__pycache__",".pytest_cache","target","bin","obj"],qvr=[".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 PIt=ut((Dun,$Ve)=>{"use strict";var VIt=hs("path"),ZIt=hs("module"),$vr=hs("fs"),DIt=(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=$vr.realpathSync(i)}catch(f){if(f.code==="ENOENT")i=VIt.resolve(i);else{if(n)return null;throw f}}let o=VIt.join(i,"noop.js"),l=()=>ZIt._resolveFilename(r,{id:o,filename:o,paths:ZIt._nodeModulePaths(i)});if(n)try{return l()}catch{return null}return l()};$Ve.exports=(i,r)=>DIt(i,r);$Ve.exports.silent=(i,r)=>DIt(i,r,!0)});var YIt=ut((Pun,KVe)=>{"use strict";var MIt=()=>{let i=Error.prepareStackTrace;Error.prepareStackTrace=(n,o)=>o;let r=new Error().stack.slice(1);return Error.prepareStackTrace=i,r};KVe.exports=MIt;KVe.exports.default=MIt});var HIt=ut((Mun,OIt)=>{"use strict";var Kvr=YIt();OIt.exports=i=>{let r=Kvr();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 LIt=ut((Yun,JIt)=>{"use strict";var exr=hs("path"),txr=PIt(),rxr=HIt();JIt.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");let r=rxr(__filename),n=r?exr.dirname(r):__dirname,o=txr(n,i),l=hs.cache[o];if(l&&l.parent){let g=l.parent.children.length;for(;g--;)l.parent.children[g].id===o&&l.parent.children.splice(g,1)}delete hs.cache[o];let f=hs.cache[r];return f===void 0||f.require===void 0?hs(o):f.require(o)}});var QIt=ut((Hun,XIt)=>{"use strict";XIt.exports=function(r){return r?r instanceof Array||Array.isArray(r)||r.length>=0&&r.splice instanceof Function:!1}});var jIt=ut((Jun,UIt)=>{"use strict";var nxr=hs("util"),ixr=QIt(),e7e=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,ixr(P)||(P=[P]))}return P.join(`
|
|
2
2
|
`)},set:function(P){f=P}});var g=null,v=Object.getOwnPropertyDescriptor(this,"stack"),E=v.get,R=v.value;delete v.value,delete v.writable,v.set=function(P){g=P},v.get=function(){var P=(g||(E?E.call(this):R)).split(/\r?\n+/g);g||(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 pe=ie.line(this[M]);pe&&P.splice(Q++,0," "+pe)}"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)):nxr.inherits(o,Error),o};e7e.append=function(i,r){return{message:function(n,o){return n=n||r,n&&(o[0]+=" "+i.replace("%s",n.toString())),o}}};e7e.line=function(i,r){return{line:function(n){return n=n||r,n?i.replace("%s",n.toString()):null}}};UIt.exports=e7e});var qIt=ut((Lun,zIt)=>{"use strict";var sxr=i=>{let r=i.charCodeAt(0).toString(16).toUpperCase();return"0x"+(r.length%2?"0":"")+r},axr=(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])} (${sxr(o[1])})`):i.message;if(l!=null){let g=l<=n?0:l-n,v=l+n>=r.length?r.length:l+n,E=(g===0?"":"...")+r.slice(g,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}},eme=class extends SyntaxError{constructor(r,n,o,l){o=o||20;let f=axr(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}},oxr=Symbol.for("indent"),cxr=Symbol.for("newline"),lxr=/^\s*[{\[]((?:\r?\n)+)([\s\t]*)/,uxr=/^(?:\{\}|\[\])((?:\r?\n)+)?$/,tme=(i,r,n)=>{let o=BIt(i);n=n||20;try{let[,l=`
|
|
4
4
|
`,f=" "]=o.match(uxr)||o.match(lxr)||[,"",""],g=JSON.parse(o,r);return g&&typeof g=="object"&&(g[cxr]=l,g[oxr]=f),g}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 eme(l,o,n,tme)}},BIt=i=>String(i).replace(/^\uFEFF/,"");zIt.exports=tme;tme.JSONParseError=eme;tme.noExceptions=(i,r)=>{try{return JSON.parse(BIt(i),r)}catch{}}});var eyt=ut(vq=>{"use strict";vq.__esModule=!0;vq.LinesAndColumns=void 0;var rme=`
|
|
@@ -525,8 +525,8 @@ Assistant:`;Cf.DEFAULT_TIMEOUT=6e5;Cf.AnthropicError=tu;Cf.APIError=x0;Cf.APICon
|
|
|
525
525
|
`){return i.split(n).reduce((o,l)=>{let f=r?l.trim():l;return f&&o.push(f),o},[])}function VMe(i,r){return $$(i,!0).map(n=>r(n))}function ZMe(i){return(0,Qhe.exists)(i,Qhe.FOLDER)}function Tp(i,r){return Array.isArray(i)?i.includes(r)||i.push(r):i.add(r),r}function h4t(i,r){return Array.isArray(i)&&!i.includes(r)&&i.push(r),i}function Uhe(i,r){if(Array.isArray(i)){let n=i.indexOf(r);n>=0&&i.splice(n,1)}else i.delete(r);return r}function w4(i){return Array.isArray(i)?i:[i]}function g4t(i){return i.replace(/[\s-]+(.)/g,(r,n)=>n.toUpperCase())}function VO(i){return w4(i).map(r=>r instanceof String?r:String(r))}function Tf(i,r=0){if(i==null)return r;let n=parseInt(i,10);return Number.isNaN(n)?r:n}function j$(i,r){let n=[];for(let o=0,l=i.length;o<l;o++)n.push(r,i[o]);return n}function B$(i){return(Array.isArray(i)?HCr.concat(i):i).toString("utf-8")}function I4t(i,r){let n={};return r.forEach(o=>{i[o]!==void 0&&(n[o]=i[o])}),n}function yMe(i=0){return new Promise(r=>setTimeout(r,i))}function bMe(i){if(i!==!1)return i}function Rv(i,r,n){return r(i)?i:arguments.length>2?n:void 0}function vMe(i,r){let n=Yhe(i)?"string":typeof i;return/number|string|boolean/.test(n)&&(!r||!r.includes(n))}function Bhe(i){return!!i&&K$(i)==="[object Object]"}function y4t(i){return typeof i=="function"}function XCr(){throw new Error("LineParser:useMatches not implemented")}function x4t(...i){let r=process.cwd(),n=Object.assign({baseDir:r,...w4t},...i.filter(o=>typeof o=="object"&&o));return n.baseDir=n.baseDir||r,n.trimmed=n.trimmed===!0,n}function PMe(i,r=[]){return Bhe(i)?Object.keys(i).reduce((n,o)=>{let l=i[o];if(Yhe(l))n.push(l);else if(vMe(l,["boolean"]))n.push(o+"="+l);else if(Array.isArray(l))for(let f of l)vMe(f,["string","number"])||n.push(o+"="+f);else n.push(o);return n},r):r}function Xb(i,r=0,n=!1){let o=[];for(let l=0,f=r<0?i.length:r;l<f;l++)"string|number".includes(typeof i[l])&&o.push(String(i[l]));return PMe(MMe(i),o),n||o.push(...jCr(i)),o}function jCr(i){let r=typeof pV(i)=="function";return VO(Rv(pV(i,r?1:0),eK,[]))}function MMe(i){let r=y4t(pV(i));return Rv(pV(i,r?1:0),Bhe)}function F_(i,r=!0){let n=p4t(pV(i));return r||d4t(n)?n:void 0}function wMe(i,r){return i(r.stdOut,r.stdErr)}function Ub(i,r,n,o=!0){return w4(n).forEach(l=>{for(let f=$$(l,o),g=0,v=f.length;g<v;g++){let E=(R=0)=>{if(!(g+R>=v))return f[g+R]};r.some(({parse:R})=>R(E,i))}}),i}function qCr(i){switch(i){case"bare":return E4t();case"root":return G4t()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:qhe,parser:YMe}}function G4t(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:qhe,parser(r){return/^\.(git)?$/.test(r.trim())}}}function E4t(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:qhe,parser:YMe}}function $Cr(i){return/(Not a git repository|Kein Git-Repository)/i.test(String(i))}function KCr(i,r){let n=new T4t(i),o=i?k4t:N4t;return $$(r).forEach(l=>{let f=l.replace(o,"");n.paths.push(f),(F4t.test(f)?n.folders:n.files).push(f)}),n}function R4t(i){return{commands:$he,format:"empty",parser:i}}function Qb(i){return{commands:$he,format:"empty",parser(){throw typeof i=="string"?new l4t(i):i}}}function Ny(i,r=!1){return{commands:i,format:"utf-8",parser(n){return r?String(n).trim():n}}}function W4t(i){return{commands:i,format:"buffer",parser(r){return r}}}function V4t(i){return i.format==="buffer"}function Z4t(i){return i.format==="empty"||!i.commands.length}function t9r(i,r){let{cleanMode:n,options:o,valid:l}=n9r(i);return n?l.options?(o.push(...r),o.some(a9r)?Qb(OMe):P4t(n,o)):Qb(JMe+JSON.stringify(i)):Qb(HMe)}function P4t(i,r){return{commands:["clean",`-${i}`,...r],format:"utf-8",parser(o){return KCr(i==="n",o)}}}function r9r(i){return Array.isArray(i)&&i.every(r=>LMe.has(r))}function n9r(i){let r,n=[],o={cleanMode:!1,options:!0};return i.replace(/[^a-z]i/g,"").split("").forEach(l=>{i9r(l)?(r=l,o.cleanMode=!0):o.options=o.options&&s9r(n[n.length]=`-${l}`)}),{cleanMode:r,options:n,valid:o}}function i9r(i){return i==="f"||i==="n"}function s9r(i){return/^-[a-z]$/i.test(i)&&LMe.has(i.charAt(1))}function a9r(i){return/^-[^\-]/.test(i)?i.indexOf("i")>0:i==="--interactive"}function o9r(i){let r=new O4t;for(let n of Y4t(i))r.addValue(n.file,String(n.key),n.value);return r}function c9r(i,r){let n=null,o=[],l=new Map;for(let f of Y4t(i,r))f.key===r&&(o.push(n=f.value),l.has(f.file)||l.set(f.file,[]),l.get(f.file).push(n));return{key:r,paths:Array.from(l.keys()),scopes:l,value:n,values:o}}function l9r(i){return i.replace(/^(file):/,"")}function*Y4t(i,r=null){let n=i.split("\0");for(let o=0,l=n.length-1;o<l;){let f=l9r(n[o++]),g=n[o++],v=r;if(g.includes(`
|
|
526
526
|
`)){let E=f4t(g,`
|
|
527
527
|
`);v=E[0],g=E[1]}yield{file:f,key:v,value:g}}}function fMe(i,r){return typeof i=="string"&&Object.hasOwn(GMe,i)?i:r}function p9r(i,r,n,o){let l=["config",`--${o}`];return n&&l.push("--add"),l.push(i,r),{commands:l,format:"utf-8",parser(f){return f}}}function d9r(i,r){let n=["config","--null","--show-origin","--get-all",i];return r&&n.splice(1,0,`--${r}`),{commands:n,format:"utf-8",parser(o){return c9r(o,i)}}}function f9r(i){let r=["config","--list","--show-origin","--null"];return i&&r.push(`--${i}`),{commands:r,format:"utf-8",parser(n){return o9r(n)}}}function m9r(){return{addConfig(i,r,...n){return this._runTask(p9r(i,r,n[0]===!0,fMe(n[1],"local")),F_(arguments))},getConfig(i,r){return this._runTask(d9r(i,fMe(r,void 0)),F_(arguments))},listConfig(...i){return this._runTask(f9r(fMe(i[0],void 0)),F_(arguments))}}}function _9r(i){return J4t.has(i)}function h9r(...i){return new Q4t().param(...i)}function g9r(i){let r=new Set,n={};return VMe(i,o=>{let[l,f,g]=o.split(RO);r.add(l),(n[l]=n[l]||[]).push({line:Tf(f),path:l,preview:g})}),{paths:r,results:n}}function I9r(){return{grep(i){let r=F_(arguments),n=Xb(arguments);for(let l of X4t)if(n.includes(l))return this._runTask(Qb(`git.grep: use of "${l}" is not supported.`),r);typeof i=="string"&&(i=h9r().param(i));let o=["grep","--null","-n","--full-name",...n,...i];return this._runTask({commands:o,format:"utf-8",parser(l){return g9r(l)}},r)}}}function y9r(i,r){let n=["reset"];return B4t(i)&&n.push(`--${i}`),n.push(...r),Ny(n)}function b9r(i){if(B4t(i))return i;switch(typeof i){case"string":case"undefined":return"soft"}}function B4t(i){return typeof i=="string"&&z4t.includes(i)}function v9r(){return(0,Jhe.default)("simple-git")}function WSt(i,r,n){return!r||!String(r).replace(/\s*/,"")?n?(o,...l)=>{i(o,...l),n(o,...l)}:i:(o,...l)=>{i(`%s ${o}`,r,...l),n&&n(o,...l)}}function x9r(i,r,{namespace:n}){if(typeof i=="string")return i;let o=r&&r.namespace||"";return o.startsWith(n)?o.substr(n.length+1):o||n}function XMe(i,r,n,o=v9r()){let l=i&&`[${i}]`||"",f=[],g=typeof r=="string"?o.extend(r):r,v=x9r(Rv(r,xg),g,o);return R(n);function E(P,Q){return Tp(f,XMe(i,v.replace(/^[^:]+/,P),Q,o))}function R(P){let Q=P&&`[${P}]`||"",M=g&&WSt(g,Q)||dV,ie=WSt(o,`${l} ${Q}`,M);return Object.assign(g?M:ie,{label:i,sibling:E,info:ie,step:R})}}function uV(i,r){return{method:m4t(i.commands)||"",commands:r}}function S9r(i,r){return n=>{r("[ERROR] child process exception %o",n),i.push(Buffer.from(String(n.stack),"ascii"))}}function VSt(i,r,n,o){return l=>{n("%s received %L bytes",r,l),o("%B",l),i.push(l)}}function C9r(i,r,n=dV){let o=f=>{n(null,f)},l=f=>{f?.task===i&&n(f instanceof q$?T9r(f):f,void 0)};r.then(o,l)}function T9r(i){let r=o=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${o} should be GitResponseError.git.${o}, this will no longer be available in version 3`),r=dV};return Object.create(i,Object.getOwnPropertyNames(i.git).reduce(n,{}));function n(o,l){return l in i||(o[l]={enumerable:!1,configurable:!1,get(){return r(l),i.git[l]}}),o}}function ZSt(i,r){return R4t(n=>{if(!ZMe(i))throw new Error(`Git.cwd: cannot change to non-directory "${i}"`);return(r||n).cwd=i})}function _Me(i){let r=["checkout",...i];return r[1]==="-b"&&r.includes("-B")&&(r[1]=Uhe(r,"-B")),Ny(r)}function F9r(){return{checkout(){return this._runTask(_Me(Xb(arguments,1)),F_(arguments))},checkoutBranch(i,r){return this._runTask(_Me(["-b",i,r,...Xb(arguments)]),F_(arguments))},checkoutLocalBranch(i){return this._runTask(_Me(["-b",i,...Xb(arguments)]),F_(arguments))}}}function W9r(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function V9r(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(i){return Ub(W9r(),[r6t],i)}})}}}function D9r(i){return Ub({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},n6t,i)}function M9r(i,r,n){return{commands:["-c","core.abbrev=40","commit",...j$(i,"-m"),...r,...n],format:"utf-8",parser:D9r}}function Y9r(){return{commit(r,...n){let o=F_(arguments),l=i(r)||M9r(w4(r),w4(Rv(n[0],Ohe,[])),[...VO(Rv(n[1],eK,[])),...Xb(arguments,0,!0)]);return this._runTask(l,o)}};function i(r){return!Ohe(r)&&Qb("git.commit: requires the commit message to be supplied as a string/string[]")}}function H9r(){return{firstCommit(){return this._runTask(Ny(["rev-list","--max-parents=0","HEAD"],!0),F_(arguments))}}}function L9r(i,r){let n=["hash-object",i];return r&&n.push("-w"),Ny(n,!0)}function Q9r(i,r,n){let o=String(n).trim(),l;if(l=i6t.exec(o))return new Phe(i,r,!1,l[1]);if(l=s6t.exec(o))return new Phe(i,r,!0,l[1]);let f="",g=o.split(" ");for(;g.length;)if(g.shift()==="in"){f=g.join(" ");break}return new Phe(i,r,/^re/i.test(o),f)}function j9r(i){return i.includes(QMe)}function B9r(i=!1,r,n){let o=["init",...n];return i&&!j9r(o)&&o.splice(1,0,QMe),{commands:o,format:"utf-8",parser(l){return Q9r(o.includes("--bare"),r,l)}}}function UMe(i){for(let r=0;r<i.length;r++){let n=jMe.exec(i[r]);if(n)return`--${n[1]}`}return""}function q9r(i){return jMe.test(i)}function o6t(i=""){let r=c6t[i];return n=>Ub(new a6t,r,n,!1)}function K9r(i,r){return r.reduce((n,o,l)=>(n[o]=i[l]||"",n),Object.create({diff:null}))}function u6t(i=qMe,r=p6t,n=""){let o=o6t(n);return function(l){let f=$$(l.trim(),!1,BMe).map(function(g){let v=g.split(zMe),E=K9r(v[0].split(i),r);return v.length>1&&v[1].trim()&&(E.diff=o(v[1])),E});return{all:f,latest:f.length&&f[0]||null,total:f.length}}}function eTr(i){let r=UMe(i),n=["diff"];return r===""&&(r="--stat",n.push("--stat=4096")),n.push(...i),Khe(n)||{commands:n,format:"utf-8",parser:o6t(r)}}function Khe(i){let r=i.filter(q9r);if(r.length>1)return Qb(`Summary flags are mutually exclusive - pick one of ${r.join(",")}`);if(r.length&&i.includes("-z"))return Qb(`Summary flag ${r} parsing is not compatible with null termination option '-z'`)}function tTr(i,r){let n=[],o=[];return Object.keys(i).forEach(l=>{n.push(l),o.push(String(i[l]))}),[n,o.join(r)]}function rTr(i){return Object.keys(i).reduce((r,n)=>(n in TMe||(r[n]=i[n]),r),{})}function m6t(i={},r=[]){let n=Rv(i.splitter,xg,qMe),o=Bhe(i.format)?i.format:{hash:"%H",date:i.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:i.multiLine?"%B":"%b",author_name:i.mailMap!==!1?"%aN":"%an",author_email:i.mailMap!==!1?"%aE":"%ae"},[l,f]=tTr(o,n),g=[],v=[`--pretty=format:${BMe}${f}${zMe}`,...r],E=i.n||i["max-count"]||i.maxCount;if(E&&v.push(`--max-count=${E}`),i.from||i.to){let R=i.symmetric!==!1?"...":"..";g.push(`${i.from||""}${R}${i.to||""}`)}return xg(i.file)&&v.push("--follow",OCr(i.file)),PMe(rTr(i),v),{fields:l,splitter:n,commands:[...v,...g]}}function nTr(i,r,n){let o=u6t(i,r,UMe(n));return{commands:["log",...n],format:"utf-8",parser:o}}function iTr(){return{log(...n){let o=F_(arguments),l=m6t(MMe(arguments),VO(Rv(arguments[0],eK,[]))),f=r(...n)||Khe(l.commands)||i(l);return this._runTask(f,o)}};function i(n){return nTr(n.splitter,n.fields,n.commands)}function r(n,o){return xg(n)&&xg(o)&&Qb("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}function gMe(i){return i.objects=i.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function YSt(i){let r=/^\s*(\d+)/.exec(i),n=/delta (\d+)/i.exec(i);return{count:Tf(r&&r[1]||"0"),delta:Tf(n&&n[1]||"0")}}function y6t(i,r){return Ub({remoteMessages:new v6t},b6t,r)}function cTr(i,r){let n=Ub(new g6t,w6t,[i,r]);return n.message&&n}function jSt(i){return i.length?{commands:["merge",...i],format:"utf-8",parser(r,n){let o=S6t(r,n);if(o.failed)throw new q$(o);return o}}:Qb("Git.merge requires at least one option")}function pTr(i,r,n){let o=n.includes("deleted"),l=n.includes("tag")||/^refs\/tags/.test(i),f=!n.includes("new");return{deleted:o,tag:l,branch:!l,new:!f,alreadyUpdated:f,local:i,remote:r}}function fTr(i={},r){return Tp(r,"--tags"),eYe(i,r)}function eYe(i={},r){let n=["push",...r];return i.branch&&n.splice(1,0,i.branch),i.remote&&n.splice(1,0,i.remote),Uhe(n,"-v"),Tp(n,"--verbose"),Tp(n,"--porcelain"),{commands:n,format:"utf-8",parser:G6t}}function mTr(){return{showBuffer(){let i=["show",...Xb(arguments,1)];return i.includes("--binary")||i.splice(1,0,"--binary"),this._runTask(W4t(i),F_(arguments))},show(){let i=["show",...Xb(arguments,1)];return this._runTask(Ny(i),F_(arguments))}}}function $St(i){let[r,n]=i.split(RO);return{from:n||r,to:r}}function Fv(i,r,n){return[`${i}${r}`,n]}function IMe(i,...r){return r.map(n=>Fv(i,n,(o,l)=>Tp(o.conflicted,l)))}function gTr(i,r){let n=r.trim();switch(" "){case n.charAt(2):return o(n.charAt(0),n.charAt(1),n.substr(3));case n.charAt(1):return o(" ",n.charAt(0),n.substr(2));default:return}function o(l,f,g){let v=`${l}${f}`,E=N6t.get(v);E&&E(i,g),v!=="##"&&v!=="!!"&&i.files.push(new T6t(g,l,f))}}function yTr(i){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...i.filter(n=>!F6t.includes(n))],parser(n){return k6t(n)}}}function Lhe(i=0,r=0,n=0,o="",l=!0){return Object.defineProperty({major:i,minor:r,patch:n,agent:o,installed:l},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function vTr(){return Lhe(0,0,0,"",!1)}function xTr(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:wTr,onError(i,r,n,o){if(i.exitCode===-2)return n(Buffer.from(tYe));o(r)}})}}}function wTr(i){return i===tYe?vTr():Ub(Lhe(0,0,0,i),R6t,i)}function ETr(i,r){return Ny(["apply",...r,...i])}function TTr(i,r){return{branch:i,hash:r,success:!0}}function NTr(i){return{branch:i,hash:null,success:!1}}function Y6t(i,r){return r===1&&FMe.test(i)}function n4t(i){return i?i.charAt(0):""}function H6t(i,r=!1){return Ub(new O6t,r?[L6t]:J6t,i)}function Q6t(i){let r=["-d","-D","--delete"];return i.some(n=>r.includes(n))}function VTr(i){let r=Q6t(i),n=i.includes("--show-current"),o=["branch",...i];return o.length===1&&o.push("-a"),o.includes("-v")||o.splice(1,0,"-v"),{format:"utf-8",commands:o,parser(l,f){return r?e0e(l,f).all[0]:H6t(l,n)}}}function ZTr(){return{format:"utf-8",commands:["branch","-v"],parser(i){return H6t(i)}}}function DTr(i,r=!1){return{format:"utf-8",commands:["branch","-v",r?"-D":"-d",...i],parser(n,o){return e0e(n,o)},onError({exitCode:n,stdOut:o},l,f,g){if(!Y6t(String(l),n))return g(l);f(o)}}}function PTr(i,r=!1){let n={format:"utf-8",commands:["branch","-v",r?"-D":"-d",i],parser(o,l){return e0e(o,l).branches[i]},onError({exitCode:o,stdErr:l,stdOut:f},g,v,E){if(!Y6t(String(g),o))return E(g);throw new q$(n.parser(B$(f),B$(l)),String(g))}};return n}function OTr(i){let r=i.trim().replace(/^["']|["']$/g,"");return r&&YTr(r)}function JTr(i){return{commands:["check-ignore",...i],format:"utf-8",parser:U6t}}function XTr(i){return/^--upload-pack(=|$)/.test(i)}function z6t(i,r,n){let o=["clone",...n];return xg(i)&&o.push(i),xg(r)&&o.push(r),o.find(XTr)?Qb("git.fetch: potential exploit argument blocked."):Ny(o)}function QTr(i,r,n){return Tp(n,"--mirror"),z6t(i,r,n)}function jTr(i,r){return Ub({raw:i,remote:null,branches:[],tags:[],updated:[],deleted:[]},q6t,[i,r])}function zTr(i){return/^--upload-pack(=|$)/.test(i)}function qTr(i,r,n){let o=["fetch",...n];return i&&r&&o.push(i,r),o.find(zTr)?Qb("git.fetch: potential exploit argument blocked."):{commands:o,format:"utf-8",parser:jTr}}function KTr(i){return Ub({moves:[]},K6t,i)}function tNr(i,r){return{commands:["mv","-v",...w4(i),r],format:"utf-8",parser:KTr}}function nNr(i,r,n){let o=["pull",...n];return i&&r&&o.splice(1,0,i,r),{commands:o,format:"utf-8",parser(l,f){return KMe(l,f)},onError(l,f,g,v){let E=cTr(B$(l.stdOut),B$(l.stdErr));if(E)return v(new q$(E));v(f)}}}function sNr(i){let r={};return rGt(i,([n])=>r[n]={name:n}),Object.values(r)}function aNr(i){let r={};return rGt(i,([n,o,l])=>{Object.hasOwn(r,n)||(r[n]={name:n,refs:{fetch:"",push:""}}),l&&o&&(r[n].refs[l.replace(/[^a-z]/g,"")]=o)}),Object.values(r)}function rGt(i,r){VMe(i,n=>r(n.split(/\s+/)))}function cNr(i,r,n){return Ny(["remote","add",...n,i,r])}function lNr(i){let r=["remote"];return i&&r.push("-v"),{commands:r,format:"utf-8",parser:i?aNr:sNr}}function uNr(i){let r=[...i];return r[0]!=="ls-remote"&&r.unshift("ls-remote"),Ny(r)}function pNr(i){let r=[...i];return r[0]!=="remote"&&r.unshift("remote"),Ny(r)}function dNr(i){return Ny(["remote","remove",i])}function mNr(i={},r){let n=m6t(i),o=["stash","list",...n.commands,...r],l=u6t(n.splitter,n.fields,UMe(o));return Khe(o)||{commands:o,format:"utf-8",parser:l}}function hNr(i,r){return t0e(["add",i,r])}function gNr(i){return t0e(["init",...i])}function t0e(i){let r=[...i];return r[0]!=="submodule"&&r.unshift("submodule"),Ny(r)}function INr(i){return t0e(["update",...i])}function bNr(i,r){let n=Number.isNaN(i),o=Number.isNaN(r);return n!==o?n?1:-1:n?aGt(i,r):0}function aGt(i,r){return i===r?0:i>r?1:-1}function vNr(i){return i.trim()}function Vhe(i){return typeof i=="string"&&parseInt(i.replace(/^\D+/g,""),10)||0}function wNr(i=[]){let r=i.some(n=>/^--sort=/.test(n));return{format:"utf-8",commands:["tag","-l",...i],parser(n){return oGt(n,r)}}}function ANr(i){return{format:"utf-8",commands:["tag",i],parser(){return{name:i}}}}function SNr(i,r){return{format:"utf-8",commands:["tag","-a","-m",r,i],parser(){return{name:i}}}}function TNr(i){return i?[{type:"spawn.before",action(o,l){i.aborted&&l.kill(new XE(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(o,l){function f(){l.kill(new XE(void 0,"abort","Abort signal received"))}i.addEventListener("abort",f),l.spawned.on("close",()=>i.removeEventListener("abort",f))}}]:void 0}function NNr(i){return typeof i=="string"&&i.trim().toLowerCase()==="-c"}function kNr(i,r){if(NNr(i)&&/^\s*protocol(.[a-z]+)?.allow/.test(r))throw new XE(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function FNr(i,r){if(/^\s*--(upload|receive)-pack/.test(i))throw new XE(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(r==="clone"&&/^\s*-u\b/.test(i))throw new XE(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(r==="push"&&/^\s*--exec\b/.test(i))throw new XE(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function RNr({allowUnsafeProtocolOverride:i=!1,allowUnsafePack:r=!1}={}){return{type:"spawn.args",action(n,o){return n.forEach((l,f)=>{let g=f<n.length?n[f+1]:"";i||kNr(l,g),r||FNr(l,o.method)}),n}}}function WNr(i){let r=j$(i,"-c");return{type:"spawn.args",action(n){return[...r,...n]}}}function VNr({onClose:i=!0,onExit:r=50}={}){function n(){let l=-1,f={close:(0,FO.deferred)(),closeTimeout:(0,FO.deferred)(),exit:(0,FO.deferred)(),exitTimeout:(0,FO.deferred)()},g=Promise.race([i===!1?s4t:f.closeTimeout.promise,r===!1?s4t:f.exitTimeout.promise]);return o(i,f.close,f.closeTimeout),o(r,f.exit,f.exitTimeout),{close(v){l=v,f.close.done()},exit(v){l=v,f.exit.done()},get exitCode(){return l},result:g}}function o(l,f,g){l!==!1&&(l===!0?f.promise:f.promise.then(()=>yMe(l))).then(g.done)}return{type:"spawn.after",async action(l,{spawned:f,close:g}){let v=n(),E=!0,R=()=>{E=!1};f.stdout?.on("data",R),f.stderr?.on("data",R),f.on("error",R),f.on("close",P=>v.close(P)),f.on("exit",P=>v.exit(P));try{await v.result,E&&await yMe(50),g(v.exitCode)}catch(P){g(v.exitCode,P)}}}}function DNr(i){return!i||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(i)}function o4t(i,r){if(i.length<1||i.length>2)throw new XE(void 0,"binary",ZNr);if(i.some(DNr))if(r)console.warn(a4t);else throw new XE(void 0,"binary",a4t);let[o,l]=i;return{binary:o,prefix:l}}function PNr(i,r=["git"],n=!1){let o=o4t(w4(r),n);i.on("binary",l=>{o=o4t(w4(l),n)}),i.append("spawn.binary",()=>o.binary),i.append("spawn.args",l=>o.prefix?[o.prefix,...l]:l)}function MNr(i){return!!(i.exitCode&&i.stdErr.length)}function YNr(i){return Buffer.concat([...i.stdOut,...i.stdErr])}function ONr(i=!1,r=MNr,n=YNr){return(o,l)=>!i&&o||!r(l)?o:n(l)}function c4t(i){return{type:"task.error",action(r,n){let o=i(r.error,{stdErr:n.stdErr,stdOut:n.stdOut,exitCode:n.exitCode});return Buffer.isBuffer(o)?{error:new QE(void 0,o.toString("utf-8"))}:{error:o}}}}function LNr(i){let r="--progress",n=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(f,g){return n.includes(g.method)?h4t(f,r):f}},{type:"spawn.after",action(f,g){g.commands.includes(r)&&g.spawned.stderr?.on("data",v=>{let E=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(v.toString("utf8"));E&&i({method:g.method,stage:XNr(E[1]),progress:Tf(E[2]),processed:Tf(E[3]),total:Tf(E[4])})})}}]}function XNr(i){return String(i.toLowerCase().split(" ",1))||"unknown"}function QNr(i){let r=I4t(i,["uid","gid"]);return{type:"spawn.options",action(n){return{...r,...n}}}}function UNr({block:i,stdErr:r=!0,stdOut:n=!0}){if(i>0)return{type:"spawn.after",action(o,l){let f;function g(){f&&clearTimeout(f),f=setTimeout(E,i)}function v(){l.spawned.stdout?.off("data",g),l.spawned.stderr?.off("data",g),l.spawned.off("exit",v),l.spawned.off("close",v),f&&clearTimeout(f)}function E(){v(),l.kill(new XE(void 0,"timeout","block timeout reached"))}n&&l.spawned.stdout?.on("data",g),r&&l.spawned.stderr?.on("data",g),l.spawned.on("exit",v),l.spawned.on("close",v),g()}}}function jNr(){return{type:"spawn.args",action(i){let r=[],n;function o(l){(n=n||[]).push(...l)}for(let l=0;l<i.length;l++){let f=i[l];if(Yhe(f)){o(FSt(f));continue}if(f==="--"){o(i.slice(l+1).flatMap(g=>Yhe(g)&&FSt(g)||g));break}r.push(f)}return n?[...r,"--",...n.map(String)]:r}}}function zNr(i,r){let n=new JNr,o=x4t(i&&(typeof i=="string"?{baseDir:i}:i)||{},r);if(!ZMe(o.baseDir))throw new CNr(o,"Cannot use simple-git on a directory that does not exist");return Array.isArray(o.config)&&n.add(WNr(o.config)),n.add(RNr(o.unsafe)),n.add(jNr()),n.add(VNr(o.completion)),o.abort&&n.add(TNr(o.abort)),o.progress&&n.add(LNr(o.progress)),o.timeout&&n.add(UNr(o.timeout)),o.spawnOptions&&n.add(QNr(o.spawnOptions)),n.add(c4t(ONr(!0))),o.errors&&n.add(c4t(o.errors)),PNr(n,o.binary,o.unsafe?.allowUnsafeCustomBinary),new BNr(o,n)}var Qhe,Jhe,Z6t,FO,RMe,DCr,WMe,PCr,Ia,MCr,lh,YCr,k_,Xhe,z$,QE,MN,q$,WO,l4t,u4t,RO,dV,K$,jhe,eK,b4t,xg,Ohe,zhe,DMe,xMe,JCr,Hhe,LCr,_l,PN,QCr,w4t,UCr,BCr,zCr,A4t,Uc,S4t,AMe,qhe,YMe,C4t,T4t,N4t,k4t,F4t,e9r,SMe,$he,ch,D4t,OMe,HMe,JMe,Zhe,LMe,M4t,O4t,u9r,GMe,H4t,mMe,J4t,L4t,X4t,U$,RSt,Q4t,U4t,j4t,Dhe,z4t,q4t,$4t,K4t,w9r,CMe,G9r,e6t,t6t,E9r,N9r,k9r,R9r,r6t,Z9r,n6t,P9r,O9r,J9r,X9r,Phe,i6t,s6t,U9r,QMe,z9r,jMe,tK,a6t,$9r,hMe,DSt,PSt,MSt,c6t,l6t,BMe,zMe,qMe,p6t,d6t,f6t,$Me,TMe,_6t,Mhe,h6t,sTr,NMe,g6t,aTr,I6t,oTr,b6t,v6t,x6t,OSt,HSt,JSt,LSt,w6t,XSt,KMe,A6t,QSt,S6t,USt,lTr,uTr,BSt,G6t,zSt,dTr,E6t,C6t,_Tr,qSt,T6t,hTr,KSt,N6t,k6t,ITr,F6t,bTr,tYe,R6t,ATr,W6t,kMe,STr,V6t,e4t,D6t,GTr,P6t,CTr,M6t,kTr,t4t,FMe,r4t,e0e,FTr,O6t,RTr,J6t,L6t,WTr,X6t,MTr,U6t,HTr,j6t,LTr,B6t,UTr,q6t,BTr,$6t,$Tr,K6t,eNr,eGt,rNr,tGt,iNr,oNr,nGt,fNr,iGt,_Nr,sGt,yNr,i4t,oGt,xNr,cGt,GNr,ENr,CNr,XE,s4t,ZNr,a4t,JNr,BNr,lGt,uGt=cr(()=>{Qhe=To(kSt(),1),Jhe=To(uMe(),1),Z6t=To(dMe(),1),FO=To(dMe(),1),RMe=Object.defineProperty,DCr=Object.getOwnPropertyDescriptor,WMe=Object.getOwnPropertyNames,PCr=Object.prototype.hasOwnProperty,Ia=(i,r)=>function(){return i&&(r=(0,i[WMe(i)[0]])(i=0)),r},MCr=(i,r)=>function(){return r||(0,i[WMe(i)[0]])((r={exports:{}}).exports,r),r.exports},lh=(i,r)=>{for(var n in r)RMe(i,n,{get:r[n],enumerable:!0})},YCr=(i,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of WMe(r))!PCr.call(i,l)&&l!==n&&RMe(i,l,{get:()=>r[l],enumerable:!(o=DCr(r,l))||o.enumerable});return i},k_=i=>YCr(RMe({},"__esModule",{value:!0}),i);z$=Ia({"src/lib/args/pathspec.ts"(){"use strict";Xhe=new WeakMap}}),MN=Ia({"src/lib/errors/git-error.ts"(){"use strict";QE=class extends Error{constructor(i,r){super(r),this.task=i,Object.setPrototypeOf(this,new.target.prototype)}}}}),WO=Ia({"src/lib/errors/git-response-error.ts"(){"use strict";MN(),q$=class extends QE{constructor(i,r){super(void 0,r||String(i)),this.git=i}}}}),u4t=Ia({"src/lib/errors/task-configuration-error.ts"(){"use strict";MN(),l4t=class extends QE{constructor(i){super(void 0,i)}}}});jhe=Ia({"src/lib/utils/util.ts"(){"use strict";DMe(),RO="\0",dV=()=>{},K$=Object.prototype.toString.call.bind(Object.prototype.toString)}});DMe=Ia({"src/lib/utils/argument-filters.ts"(){"use strict";z$(),jhe(),eK=i=>Array.isArray(i),b4t=i=>typeof i=="number",xg=i=>typeof i=="string",Ohe=i=>xg(i)||Array.isArray(i)&&i.every(xg),zhe=i=>i==null||"number|boolean|function".includes(typeof i)?!1:typeof i.length=="number"}}),JCr=Ia({"src/lib/utils/exit-codes.ts"(){"use strict";xMe=(i=>(i[i.SUCCESS=0]="SUCCESS",i[i.ERROR=1]="ERROR",i[i.NOT_FOUND=-2]="NOT_FOUND",i[i.UNCLEAN=128]="UNCLEAN",i))(xMe||{})}}),LCr=Ia({"src/lib/utils/git-output-streams.ts"(){"use strict";Hhe=class v4t{constructor(r,n){this.stdOut=r,this.stdErr=n}asStrings(){return new v4t(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});QCr=Ia({"src/lib/utils/line-parser.ts"(){"use strict";_l=class{constructor(i,r){this.matches=[],this.useMatches=XCr,this.parse=(n,o)=>(this.resetMatches(),this._regExp.every((l,f)=>this.addMatch(l,f,n(f)))?this.useMatches(o,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(i)?i:[i],r&&(this.useMatches=r)}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(i,r,n){let o=n&&i.exec(n);return o&&this.pushMatch(r,o),!!o}pushMatch(i,r){this.matches.push(...r.slice(1))}},PN=class extends _l{addMatch(i,r,n){return/^remote:\s/.test(String(n))&&super.addMatch(i,r,n)}pushMatch(i,r){(i>0||r.length>1)&&super.pushMatch(i,r)}}}});UCr=Ia({"src/lib/utils/simple-git-options.ts"(){"use strict";w4t={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});BCr=Ia({"src/lib/utils/task-options.ts"(){"use strict";DMe(),jhe(),z$()}});zCr=Ia({"src/lib/utils/task-parser.ts"(){"use strict";jhe()}}),A4t={};lh(A4t,{ExitCodes:()=>xMe,GitOutputStreams:()=>Hhe,LineParser:()=>_l,NOOP:()=>dV,NULL:()=>RO,RemoteLineParser:()=>PN,append:()=>Tp,appendTaskOptions:()=>PMe,asArray:()=>w4,asCamelCase:()=>g4t,asFunction:()=>p4t,asNumber:()=>Tf,asStringArray:()=>VO,bufferToString:()=>B$,callTaskParser:()=>wMe,createInstanceConfig:()=>x4t,delay:()=>yMe,filterArray:()=>eK,filterFunction:()=>y4t,filterHasLength:()=>zhe,filterNumber:()=>b4t,filterPlainObject:()=>Bhe,filterPrimitives:()=>vMe,filterString:()=>xg,filterStringOrStringArray:()=>Ohe,filterType:()=>Rv,first:()=>m4t,folderExists:()=>ZMe,forEachLineWithContent:()=>VMe,getTrailingOptions:()=>Xb,including:()=>h4t,isUserFunction:()=>d4t,last:()=>pV,objectToString:()=>K$,orVoid:()=>bMe,parseStringResponse:()=>Ub,pick:()=>I4t,prefixedArray:()=>j$,remove:()=>Uhe,splitOn:()=>f4t,toLinesWithContent:()=>$$,trailingFunctionArgument:()=>F_,trailingOptionsArgument:()=>MMe});Uc=Ia({"src/lib/utils/index.ts"(){"use strict";DMe(),JCr(),LCr(),QCr(),UCr(),BCr(),zCr(),jhe()}}),S4t={};lh(S4t,{CheckRepoActions:()=>AMe,checkIsBareRepoTask:()=>E4t,checkIsRepoRootTask:()=>G4t,checkIsRepoTask:()=>qCr});C4t=Ia({"src/lib/tasks/check-is-repo.ts"(){"use strict";Uc(),AMe=(i=>(i.BARE="bare",i.IN_TREE="tree",i.IS_REPO_ROOT="root",i))(AMe||{}),qhe=({exitCode:i},r,n,o)=>{if(i===128&&$Cr(r))return n(Buffer.from("false"));o(r)},YMe=i=>i.trim()==="true"}});e9r=Ia({"src/lib/responses/CleanSummary.ts"(){"use strict";Uc(),T4t=class{constructor(i){this.dryRun=i,this.paths=[],this.files=[],this.folders=[]}},N4t=/^[a-z]+\s*/i,k4t=/^[a-z]+\s+[a-z]+\s*/i,F4t=/\/$/}}),SMe={};lh(SMe,{EMPTY_COMMANDS:()=>$he,adhocExecTask:()=>R4t,configurationErrorTask:()=>Qb,isBufferTask:()=>V4t,isEmptyTask:()=>Z4t,straightThroughBufferTask:()=>W4t,straightThroughStringTask:()=>Ny});ch=Ia({"src/lib/tasks/task.ts"(){"use strict";u4t(),$he=[]}}),D4t={};lh(D4t,{CONFIG_ERROR_INTERACTIVE_MODE:()=>OMe,CONFIG_ERROR_MODE_REQUIRED:()=>HMe,CONFIG_ERROR_UNKNOWN_OPTION:()=>JMe,CleanOptions:()=>Zhe,cleanTask:()=>P4t,cleanWithOptionsTask:()=>t9r,isCleanOptionsArray:()=>r9r});M4t=Ia({"src/lib/tasks/clean.ts"(){"use strict";e9r(),Uc(),ch(),OMe="Git clean interactive mode is not supported",HMe='Git clean mode parameter ("n" or "f") is required',JMe="Git clean unknown option found in: ",Zhe=(i=>(i.DRY_RUN="n",i.FORCE="f",i.IGNORED_INCLUDED="x",i.IGNORED_ONLY="X",i.EXCLUDING="e",i.QUIET="q",i.RECURSIVE="d",i))(Zhe||{}),LMe=new Set(["i",...VO(Object.values(Zhe))])}});u9r=Ia({"src/lib/responses/ConfigList.ts"(){"use strict";Uc(),O4t=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((i,r)=>Object.assign(i,this.values[r]),{})),this._all}addFile(i){if(!(i in this.values)){let r=pV(this.files);this.values[i]=r?Object.create(this.values[r]):{},this.files.push(i)}return this.values[i]}addValue(i,r,n){let o=this.addFile(i);Object.hasOwn(o,r)?Array.isArray(o[r])?o[r].push(n):o[r]=[o[r],n]:o[r]=n,this._all=void 0}}}});H4t=Ia({"src/lib/tasks/config.ts"(){"use strict";u9r(),Uc(),GMe=(i=>(i.system="system",i.global="global",i.local="local",i.worktree="worktree",i))(GMe||{})}});L4t=Ia({"src/lib/tasks/diff-name-status.ts"(){"use strict";mMe=(i=>(i.ADDED="A",i.COPIED="C",i.DELETED="D",i.MODIFIED="M",i.RENAMED="R",i.CHANGED="T",i.UNMERGED="U",i.UNKNOWN="X",i.BROKEN="B",i))(mMe||{}),J4t=new Set(Object.values(mMe))}});U4t=Ia({"src/lib/tasks/grep.ts"(){"use strict";Uc(),ch(),X4t=["-h"],U$=Symbol("grepQuery"),Q4t=class{constructor(){this[RSt]=[]}*[(RSt=U$,Symbol.iterator)](){for(let i of this[U$])yield i}and(...i){return i.length&&this[U$].push("--and","(",...j$(i,"-e"),")"),this}param(...i){return this[U$].push(...j$(i,"-e")),this}}}}),j4t={};lh(j4t,{ResetMode:()=>Dhe,getResetMode:()=>b9r,resetTask:()=>y9r});q4t=Ia({"src/lib/tasks/reset.ts"(){"use strict";Uc(),ch(),Dhe=(i=>(i.MIXED="mixed",i.SOFT="soft",i.HARD="hard",i.MERGE="merge",i.KEEP="keep",i))(Dhe||{}),z4t=VO(Object.values(Dhe))}});$4t=Ia({"src/lib/git-logger.ts"(){"use strict";Uc(),Jhe.default.formatters.L=i=>String(zhe(i)?i.length:"-"),Jhe.default.formatters.B=i=>Buffer.isBuffer(i)?i.toString("utf8"):K$(i)}}),w9r=Ia({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";MN(),$4t(),K4t=class EMe{constructor(r="GitExecutor"){this.logLabel=r,this._queue=new Map}withProgress(r){return this._queue.get(r)}createProgress(r){let n=EMe.getName(r.commands[0]),o=XMe(this.logLabel,n);return{task:r,logger:o,name:n}}push(r){let n=this.createProgress(r);return n.logger("Adding task to the queue, commands = %o",r.commands),this._queue.set(r,n),n}fatal(r){for(let[n,{logger:o}]of Array.from(this._queue.entries()))n===r.task?(o.info("Failed %o",r),o("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):o.info("A fatal exception occurred in a previous task, the queue has been purged: %o",r.message),this.complete(n);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(r){this.withProgress(r)&&this._queue.delete(r)}attempt(r){let n=this.withProgress(r);if(!n)throw new QE(void 0,"TasksPendingQueue: attempt called for an unknown task");return n.logger("Starting task"),n}static getName(r="empty"){return`task:${r}:${++EMe.counter}`}static{this.counter=0}}}});G9r=Ia({"src/lib/runners/git-executor-chain.ts"(){"use strict";MN(),ch(),Uc(),w9r(),CMe=class{constructor(i,r,n){this._executor=i,this._scheduler=r,this._plugins=n,this._chain=Promise.resolve(),this._queue=new K4t}get cwd(){return this._cwd||this._executor.cwd}set cwd(i){this._cwd=i}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(i){return this._queue.push(i),this._chain=this._chain.then(()=>this.attemptTask(i))}async attemptTask(i){let r=await this._scheduler.next(),n=()=>this._queue.complete(i);try{let{logger:o}=this._queue.attempt(i);return await(Z4t(i)?this.attemptEmptyTask(i,o):this.attemptRemoteTask(i,o))}catch(o){throw this.onFatalException(i,o)}finally{n(),r()}}onFatalException(i,r){let n=r instanceof QE?Object.assign(r,{task:i}):new QE(i,r&&String(r));return this._chain=Promise.resolve(),this._queue.fatal(n),n}async attemptRemoteTask(i,r){let n=this._plugins.exec("spawn.binary","",uV(i,i.commands)),o=this._plugins.exec("spawn.args",[...i.commands],uV(i,i.commands)),l=await this.gitResponse(i,n,o,this.outputHandler,r.step("SPAWN")),f=await this.handleTaskData(i,o,l,r.step("HANDLE"));return r("passing response to task's parser as a %s",i.format),V4t(i)?wMe(i.parser,f):wMe(i.parser,f.asStrings())}async attemptEmptyTask(i,r){return r("empty task bypassing child process to call to task's parser"),i.parser(this)}handleTaskData(i,r,n,o){let{exitCode:l,rejection:f,stdOut:g,stdErr:v}=n;return new Promise((E,R)=>{o("Preparing to handle process response exitCode=%d stdOut=",l);let{error:P}=this._plugins.exec("task.error",{error:f},{...uV(i,r),...n});if(P&&i.onError)return o.info("exitCode=%s handling with custom error handler"),i.onError(n,P,Q=>{o.info("custom error handler treated as success"),o("custom error returned a %s",K$(Q)),E(new Hhe(Array.isArray(Q)?Buffer.concat(Q):Q,Buffer.concat(v)))},R);if(P)return o.info("handling as error: exitCode=%s stdErr=%s rejection=%o",l,v.length,f),R(P);o.info("retrieving task output complete"),E(new Hhe(Buffer.concat(g),Buffer.concat(v)))})}async gitResponse(i,r,n,o,l){let f=l.sibling("output"),g=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},uV(i,i.commands));return new Promise(v=>{let E=[],R=[];l.info("%s %o",r,n),l("%O",g);let P=this._beforeSpawn(i,n);if(P)return v({stdOut:E,stdErr:R,exitCode:9901,rejection:P});this._plugins.exec("spawn.before",void 0,{...uV(i,n),kill(M){P=M||P}});let Q=A9r(r,n,g);Q.stdout.on("data",VSt(E,"stdOut",l,f.step("stdOut"))),Q.stderr.on("data",VSt(R,"stdErr",l,f.step("stdErr"))),Q.on("error",S9r(R,l)),o&&(l("Passing child process stdOut/stdErr to custom outputHandler"),o(r,Q.stdout,Q.stderr,[...n])),this._plugins.exec("spawn.after",void 0,{...uV(i,n),spawned:Q,close(M,ie){v({stdOut:E,stdErr:R,exitCode:M,rejection:P||ie})},kill(M){Q.killed||(P=M,Q.kill("SIGINT"))}})})}_beforeSpawn(i,r){let n;return this._plugins.exec("spawn.before",void 0,{...uV(i,r),kill(o){n=o||n}}),n}}}}),e6t={};lh(e6t,{GitExecutor:()=>t6t});E9r=Ia({"src/lib/runners/git-executor.ts"(){"use strict";G9r(),t6t=class{constructor(i,r,n){this.cwd=i,this._scheduler=r,this._plugins=n,this._chain=new CMe(this,this._scheduler,this._plugins)}chain(){return new CMe(this,this._scheduler,this._plugins)}push(i){return this._chain.push(i)}}}});N9r=Ia({"src/lib/task-callback.ts"(){"use strict";WO(),Uc()}});k9r=Ia({"src/lib/tasks/change-working-directory.ts"(){"use strict";Uc(),ch()}});R9r=Ia({"src/lib/tasks/checkout.ts"(){"use strict";Uc(),ch()}});Z9r=Ia({"src/lib/tasks/count-objects.ts"(){"use strict";Uc(),r6t=new _l(/([a-z-]+): (\d+)$/,(i,[r,n])=>{let o=g4t(r);Object.hasOwn(i,o)&&(i[o]=Tf(n))})}});P9r=Ia({"src/lib/parsers/parse-commit.ts"(){"use strict";Uc(),n6t=[new _l(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(i,[r,n,o])=>{i.branch=r,i.commit=o,i.root=!!n}),new _l(/\s*Author:\s(.+)/i,(i,[r])=>{let n=r.split("<"),o=n.pop();!o||!o.includes("@")||(i.author={email:o.substr(0,o.length-1),name:n.join("<").trim()})}),new _l(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(i,[r,n,o])=>{i.summary.changes=parseInt(r,10)||0,i.summary.insertions=parseInt(n,10)||0,i.summary.deletions=parseInt(o,10)||0}),new _l(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(i,[r,n,o])=>{i.summary.changes=parseInt(r,10)||0;let l=parseInt(n,10)||0;o==="-"?i.summary.deletions=l:o==="+"&&(i.summary.insertions=l)})]}});O9r=Ia({"src/lib/tasks/commit.ts"(){"use strict";P9r(),Uc(),ch()}});J9r=Ia({"src/lib/tasks/first-commit.ts"(){"use strict";Uc(),ch()}});X9r=Ia({"src/lib/tasks/hash-object.ts"(){"use strict";ch()}});U9r=Ia({"src/lib/responses/InitSummary.ts"(){"use strict";Phe=class{constructor(i,r,n,o){this.bare=i,this.path=r,this.existing=n,this.gitDir=o}},i6t=/^Init.+ repository in (.+)$/,s6t=/^Rein.+ in (.+)$/}});z9r=Ia({"src/lib/tasks/init.ts"(){"use strict";U9r(),QMe="--bare"}});tK=Ia({"src/lib/args/log-format.ts"(){"use strict";jMe=/^--(stat|numstat|name-only|name-status)(=|$)/}}),$9r=Ia({"src/lib/responses/DiffSummary.ts"(){"use strict";a6t=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});l6t=Ia({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";tK(),$9r(),L4t(),Uc(),hMe=[new _l(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(i,[r,n,o=""])=>{i.files.push({file:r.trim(),changes:Tf(n),insertions:o.replace(/[^+]/g,"").length,deletions:o.replace(/[^-]/g,"").length,binary:!1})}),new _l(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(i,[r,n,o])=>{i.files.push({file:r.trim(),before:Tf(n),after:Tf(o),binary:!0})}),new _l(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(i,[r,n])=>{let o=/(\d+) i/.exec(n),l=/(\d+) d/.exec(n);i.changed=Tf(r),i.insertions=Tf(o?.[1]),i.deletions=Tf(l?.[1])})],DSt=[new _l(/(\d+)\t(\d+)\t(.+)$/,(i,[r,n,o])=>{let l=Tf(r),f=Tf(n);i.changed++,i.insertions+=l,i.deletions+=f,i.files.push({file:o,changes:l+f,insertions:l,deletions:f,binary:!1})}),new _l(/-\t-\t(.+)$/,(i,[r])=>{i.changed++,i.files.push({file:r,after:0,before:0,binary:!0})})],PSt=[new _l(/(.+)$/,(i,[r])=>{i.changed++,i.files.push({file:r,changes:0,insertions:0,deletions:0,binary:!1})})],MSt=[new _l(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(i,[r,n,o,l,f])=>{i.changed++,i.files.push({file:f??o,changes:0,insertions:0,deletions:0,binary:!1,status:bMe(_9r(r)&&r),from:bMe(!!f&&o!==f&&o),similarity:Tf(n)})})],c6t={"":hMe,"--stat":hMe,"--numstat":DSt,"--name-status":MSt,"--name-only":PSt}}});d6t=Ia({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";Uc(),l6t(),tK(),BMe="\xF2\xF2\xF2\xF2\xF2\xF2 ",zMe=" \xF2\xF2",qMe=" \xF2 ",p6t=["hash","date","message","refs","author_name","author_email"]}}),f6t={};lh(f6t,{diffSummaryTask:()=>eTr,validateLogFormatConfig:()=>Khe});$Me=Ia({"src/lib/tasks/diff.ts"(){"use strict";tK(),l6t(),ch()}});_6t=Ia({"src/lib/tasks/log.ts"(){"use strict";tK(),z$(),d6t(),Uc(),ch(),$Me(),TMe=(i=>(i[i["--pretty"]=0]="--pretty",i[i["max-count"]=1]="max-count",i[i.maxCount=2]="maxCount",i[i.n=3]="n",i[i.file=4]="file",i[i.format=5]="format",i[i.from=6]="from",i[i.to=7]="to",i[i.splitter=8]="splitter",i[i.symmetric=9]="symmetric",i[i.mailMap=10]="mailMap",i[i.multiLine=11]="multiLine",i[i.strictDate=12]="strictDate",i))(TMe||{})}}),sTr=Ia({"src/lib/responses/MergeSummary.ts"(){"use strict";Mhe=class{constructor(i,r=null,n){this.reason=i,this.file=r,this.meta=n}toString(){return`${this.file}:${this.reason}`}},h6t=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),aTr=Ia({"src/lib/responses/PullSummary.ts"(){"use strict";NMe=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},g6t=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});oTr=Ia({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";Uc(),I6t=[new PN(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(i,[r,n])=>{let o=r.toLowerCase(),l=gMe(i.remoteMessages);Object.assign(l,{[o]:Tf(n)})}),new PN(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(i,[r,n])=>{let o=r.toLowerCase(),l=gMe(i.remoteMessages);Object.assign(l,{[o]:Tf(n)})}),new PN(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(i,[r,n,o])=>{let l=gMe(i.remoteMessages);l.total=YSt(r),l.reused=YSt(n),l.packReused=Tf(o)})]}});x6t=Ia({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";Uc(),oTr(),b6t=[new PN(/^remote:\s*(.+)$/,(i,[r])=>(i.remoteMessages.all.push(r.trim()),!1)),...I6t,new PN([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(i,[r])=>{i.remoteMessages.pullRequestUrl=r}),new PN([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(i,[r,n,o])=>{i.remoteMessages.vulnerabilities={count:Tf(r),summary:n,url:o}})],v6t=class{constructor(){this.all=[]}}}});A6t=Ia({"src/lib/parsers/parse-pull.ts"(){"use strict";aTr(),Uc(),x6t(),OSt=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,HSt=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,JSt=/^(create|delete) mode \d+ (.+)/,LSt=[new _l(OSt,(i,[r,n,o])=>{i.files.push(r),n&&(i.insertions[r]=n.length),o&&(i.deletions[r]=o.length)}),new _l(HSt,(i,[r,,n,,o])=>n!==void 0||o!==void 0?(i.summary.changes=+r||0,i.summary.insertions=+n||0,i.summary.deletions=+o||0,!0):!1),new _l(JSt,(i,[r,n])=>{Tp(i.files,n),Tp(r==="create"?i.created:i.deleted,n)})],w6t=[new _l(/^from\s(.+)$/i,(i,[r])=>{i.remote=r}),new _l(/^fatal:\s(.+)$/,(i,[r])=>{i.message=r}),new _l(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(i,[r,n,o,l])=>{i.branch.local=o,i.hash.local=r,i.branch.remote=l,i.hash.remote=n})],XSt=(i,r)=>Ub(new NMe,LSt,[i,r]),KMe=(i,r)=>Object.assign(new NMe,XSt(i,r),y6t(i,r))}}),lTr=Ia({"src/lib/parsers/parse-merge.ts"(){"use strict";sTr(),Uc(),A6t(),QSt=[new _l(/^Auto-merging\s+(.+)$/,(i,[r])=>{i.merges.push(r)}),new _l(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(i,[r,n])=>{i.conflicts.push(new Mhe(r,n))}),new _l(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(i,[r,n,o])=>{i.conflicts.push(new Mhe(r,n,{deleteRef:o}))}),new _l(/^CONFLICT\s+\((.+)\):/,(i,[r])=>{i.conflicts.push(new Mhe(r,null))}),new _l(/^Automatic merge failed;\s+(.+)$/,(i,[r])=>{i.result=r})],S6t=(i,r)=>Object.assign(USt(i,r),KMe(i,r)),USt=i=>Ub(new h6t,QSt,i)}});uTr=Ia({"src/lib/tasks/merge.ts"(){"use strict";WO(),lTr(),ch()}});dTr=Ia({"src/lib/parsers/parse-push.ts"(){"use strict";Uc(),x6t(),BSt=[new _l(/^Pushing to (.+)$/,(i,[r])=>{i.repo=r}),new _l(/^updating local tracking ref '(.+)'/,(i,[r])=>{i.ref={...i.ref||{},local:r}}),new _l(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(i,[r,n,o])=>{i.pushed.push(pTr(r,n,o))}),new _l(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(i,[r,n,o])=>{i.branch={...i.branch||{},local:r,remote:n,remoteName:o}}),new _l(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(i,[r,n,o,l])=>{i.update={head:{local:r,remote:n},hash:{from:o,to:l}}})],G6t=(i,r)=>{let n=zSt(i,r),o=y6t(i,r);return{...n,...o}},zSt=(i,r)=>Ub({pushed:[]},BSt,[i,r])}}),E6t={};lh(E6t,{pushTagsTask:()=>fTr,pushTask:()=>eYe});C6t=Ia({"src/lib/tasks/push.ts"(){"use strict";dTr(),Uc()}});_Tr=Ia({"src/lib/tasks/show.ts"(){"use strict";Uc(),ch()}}),hTr=Ia({"src/lib/responses/FileStatusSummary.ts"(){"use strict";qSt=/^(.+)\0(.+)$/,T6t=class{constructor(i,r,n){if(this.path=i,this.index=r,this.working_dir=n,r==="R"||n==="R"){let o=qSt.exec(i)||[null,i,i];this.from=o[2]||"",this.path=o[1]||""}}}}});ITr=Ia({"src/lib/responses/StatusSummary.ts"(){"use strict";Uc(),hTr(),KSt=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},N6t=new Map([Fv(" ","A",(i,r)=>Tp(i.created,r)),Fv(" ","D",(i,r)=>Tp(i.deleted,r)),Fv(" ","M",(i,r)=>Tp(i.modified,r)),Fv("A"," ",(i,r)=>Tp(i.created,r)&&Tp(i.staged,r)),Fv("A","M",(i,r)=>Tp(i.created,r)&&Tp(i.staged,r)&&Tp(i.modified,r)),Fv("D"," ",(i,r)=>Tp(i.deleted,r)&&Tp(i.staged,r)),Fv("M"," ",(i,r)=>Tp(i.modified,r)&&Tp(i.staged,r)),Fv("M","M",(i,r)=>Tp(i.modified,r)&&Tp(i.staged,r)),Fv("R"," ",(i,r)=>{Tp(i.renamed,$St(r))}),Fv("R","M",(i,r)=>{let n=$St(r);Tp(i.renamed,n),Tp(i.modified,n.to)}),Fv("!","!",(i,r)=>{Tp(i.ignored=i.ignored||[],r)}),Fv("?","?",(i,r)=>Tp(i.not_added,r)),...IMe("A","A","U"),...IMe("D","D","U"),...IMe("U","A","D","U"),["##",(i,r)=>{let n=/ahead (\d+)/,o=/behind (\d+)/,l=/^(.+?(?=(?:\.{3}|\s|$)))/,f=/\.{3}(\S*)/,g=/\son\s(\S+?)(?=\.{3}|$)/,v=n.exec(r);i.ahead=v&&+v[1]||0,v=o.exec(r),i.behind=v&&+v[1]||0,v=l.exec(r),i.current=Rv(v?.[1],xg,null),v=f.exec(r),i.tracking=Rv(v?.[1],xg,null),v=g.exec(r),v&&(i.current=Rv(v?.[1],xg,i.current)),i.detached=/\(no branch\)/.test(r)}]]),k6t=function(i){let r=i.split(RO),n=new KSt;for(let o=0,l=r.length;o<l;){let f=r[o++].trim();f&&(f.charAt(0)==="R"&&(f+=RO+(r[o++]||"")),gTr(n,f))}return n}}});bTr=Ia({"src/lib/tasks/status.ts"(){"use strict";ITr(),F6t=["--null","-z"]}});ATr=Ia({"src/lib/tasks/version.ts"(){"use strict";Uc(),tYe="installed=false",R6t=[new _l(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(i,[r,n,o,l=""])=>{Object.assign(i,Lhe(Tf(r),Tf(n),Tf(o),l))}),new _l(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(i,[r,n,o,l=""])=>{Object.assign(i,Lhe(Tf(r),Tf(n),o,l))})]}}),W6t={};lh(W6t,{SimpleGitApi:()=>kMe});STr=Ia({"src/lib/simple-git-api.ts"(){"use strict";N9r(),k9r(),R9r(),Z9r(),O9r(),H4t(),J9r(),U4t(),X9r(),z9r(),_6t(),uTr(),C6t(),_Tr(),bTr(),ch(),ATr(),Uc(),kMe=class{constructor(i){this._executor=i}_runTask(i,r){let n=this._executor.chain(),o=n.push(i);return r&&C9r(i,o,r),Object.create(this,{then:{value:o.then.bind(o)},catch:{value:o.catch.bind(o)},_executor:{value:n}})}add(i){return this._runTask(Ny(["add",...w4(i)]),F_(arguments))}cwd(i){let r=F_(arguments);return typeof i=="string"?this._runTask(ZSt(i,this._executor),r):typeof i?.path=="string"?this._runTask(ZSt(i.path,i.root&&this._executor||void 0),r):this._runTask(Qb("Git.cwd: workingDirectory must be supplied as a string"),r)}hashObject(i,r){return this._runTask(L9r(i,r===!0),F_(arguments))}init(i){return this._runTask(B9r(i===!0,this._executor.cwd,Xb(arguments)),F_(arguments))}merge(){return this._runTask(jSt(Xb(arguments)),F_(arguments))}mergeFromTo(i,r){return xg(i)&&xg(r)?this._runTask(jSt([i,r,...Xb(arguments)]),F_(arguments,!1)):this._runTask(Qb("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(i){return this._executor.outputHandler=i,this}push(){let i=eYe({remote:Rv(arguments[0],xg),branch:Rv(arguments[1],xg)},Xb(arguments));return this._runTask(i,F_(arguments))}stash(){return this._runTask(Ny(["stash",...Xb(arguments)]),F_(arguments))}status(){return this._runTask(yTr(Xb(arguments)),F_(arguments))}},Object.assign(kMe.prototype,F9r(),Y9r(),m9r(),V9r(),H9r(),I9r(),iTr(),mTr(),xTr())}}),V6t={};lh(V6t,{Scheduler:()=>D6t});GTr=Ia({"src/lib/runners/scheduler.ts"(){"use strict";Uc(),$4t(),e4t=(()=>{let i=0;return()=>{i++;let{promise:r,done:n}=(0,Z6t.createDeferred)();return{promise:r,done:n,id:i}}})(),D6t=class{constructor(i=2){this.concurrency=i,this.logger=XMe("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",i)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let i=Tp(this.running,this.pending.shift());this.logger("Attempting id=%s",i.id),i.done(()=>{this.logger("Completing id=",i.id),Uhe(this.running,i),this.schedule()})}next(){let{promise:i,id:r}=Tp(this.pending,e4t());return this.logger("Scheduling id=%s",r),this.schedule(),i}}}}),P6t={};lh(P6t,{applyPatchTask:()=>ETr});CTr=Ia({"src/lib/tasks/apply-patch.ts"(){"use strict";ch()}});kTr=Ia({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";M6t=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});FTr=Ia({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";kTr(),Uc(),t4t=/(\S+)\s+\(\S+\s([^)]+)\)/,FMe=/^error[^']+'([^']+)'/m,r4t=[new _l(t4t,(i,[r,n])=>{let o=TTr(r,n);i.all.push(o),i.branches[r]=o}),new _l(FMe,(i,[r])=>{let n=NTr(r);i.errors.push(n),i.all.push(n),i.branches[r]=n})],e0e=(i,r)=>Ub(new M6t,r4t,[i,r])}}),RTr=Ia({"src/lib/responses/BranchSummary.ts"(){"use strict";O6t=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(i,r,n,o,l){i==="*"&&(this.detached=r,this.current=n),this.all.push(n),this.branches[n]={current:i==="*",linkedWorkTree:i==="+",name:n,commit:o,label:l}}}}});WTr=Ia({"src/lib/parsers/parse-branch.ts"(){"use strict";RTr(),Uc(),J6t=[new _l(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(i,[r,n,o,l])=>{i.push(n4t(r),!0,n,o,l)}),new _l(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(i,[r,n,o,l])=>{i.push(n4t(r),!1,n,o,l)})],L6t=new _l(/^(\S+)$/s,(i,[r])=>{i.push("*",!1,r,"","")})}}),X6t={};lh(X6t,{branchLocalTask:()=>ZTr,branchTask:()=>VTr,containsDeleteBranchCommand:()=>Q6t,deleteBranchTask:()=>PTr,deleteBranchesTask:()=>DTr});MTr=Ia({"src/lib/tasks/branch.ts"(){"use strict";WO(),FTr(),WTr(),Uc()}});HTr=Ia({"src/lib/responses/CheckIgnore.ts"(){"use strict";U6t=i=>i.split(/\n/g).map(OTr).filter(Boolean)}}),j6t={};lh(j6t,{checkIgnoreTask:()=>JTr});LTr=Ia({"src/lib/tasks/check-ignore.ts"(){"use strict";HTr()}}),B6t={};lh(B6t,{cloneMirrorTask:()=>QTr,cloneTask:()=>z6t});UTr=Ia({"src/lib/tasks/clone.ts"(){"use strict";ch(),Uc()}});BTr=Ia({"src/lib/parsers/parse-fetch.ts"(){"use strict";Uc(),q6t=[new _l(/From (.+)$/,(i,[r])=>{i.remote=r}),new _l(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(i,[r,n])=>{i.branches.push({name:r,tracking:n})}),new _l(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(i,[r,n])=>{i.tags.push({name:r,tracking:n})}),new _l(/- \[deleted]\s+\S+\s*-> (.+)$/,(i,[r])=>{i.deleted.push({tracking:r})}),new _l(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(i,[r,n,o,l])=>{i.updated.push({name:o,tracking:l,to:n,from:r})})]}}),$6t={};lh($6t,{fetchTask:()=>qTr});$Tr=Ia({"src/lib/tasks/fetch.ts"(){"use strict";BTr(),ch()}});eNr=Ia({"src/lib/parsers/parse-move.ts"(){"use strict";Uc(),K6t=[new _l(/^Renaming (.+) to (.+)$/,(i,[r,n])=>{i.moves.push({from:r,to:n})})]}}),eGt={};lh(eGt,{moveTask:()=>tNr});rNr=Ia({"src/lib/tasks/move.ts"(){"use strict";eNr(),Uc()}}),tGt={};lh(tGt,{pullTask:()=>nNr});iNr=Ia({"src/lib/tasks/pull.ts"(){"use strict";WO(),A6t(),Uc()}});oNr=Ia({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";Uc()}}),nGt={};lh(nGt,{addRemoteTask:()=>cNr,getRemotesTask:()=>lNr,listRemotesTask:()=>uNr,remoteTask:()=>pNr,removeRemoteTask:()=>dNr});fNr=Ia({"src/lib/tasks/remote.ts"(){"use strict";oNr(),ch()}}),iGt={};lh(iGt,{stashListTask:()=>mNr});_Nr=Ia({"src/lib/tasks/stash-list.ts"(){"use strict";tK(),d6t(),$Me(),_6t()}}),sGt={};lh(sGt,{addSubModuleTask:()=>hNr,initSubModuleTask:()=>gNr,subModuleTask:()=>t0e,updateSubModuleTask:()=>INr});yNr=Ia({"src/lib/tasks/sub-module.ts"(){"use strict";ch()}});xNr=Ia({"src/lib/responses/TagList.ts"(){"use strict";i4t=class{constructor(i,r){this.all=i,this.latest=r}},oGt=function(i,r=!1){let n=i.split(`
|
|
528
|
-
`).map(vNr).filter(Boolean);r||n.sort(function(l,f){let g=l.split("."),v=f.split(".");if(g.length===1||v.length===1)return bNr(Vhe(g[0]),Vhe(v[0]));for(let E=0,R=Math.max(g.length,v.length);E<R;E++){let P=aGt(Vhe(g[E]),Vhe(v[E]));if(P)return P}return 0});let o=r?n[0]:[...n].reverse().find(l=>l.indexOf(".")>=0);return new i4t(n,o)}}}),cGt={};lh(cGt,{addAnnotatedTagTask:()=>SNr,addTagTask:()=>ANr,tagListTask:()=>wNr});GNr=Ia({"src/lib/tasks/tag.ts"(){"use strict";xNr()}}),ENr=MCr({"src/git.js"(i,r){"use strict";var{GitExecutor:n}=(E9r(),k_(e6t)),{SimpleGitApi:o}=(STr(),k_(W6t)),{Scheduler:l}=(GTr(),k_(V6t)),{configurationErrorTask:f}=(ch(),k_(SMe)),{asArray:g,filterArray:v,filterPrimitives:E,filterString:R,filterStringOrStringArray:P,filterType:Q,getTrailingOptions:M,trailingFunctionArgument:ie,trailingOptionsArgument:pe}=(Uc(),k_(A4t)),{applyPatchTask:me}=(CTr(),k_(P6t)),{branchTask:ct,branchLocalTask:rt,deleteBranchesTask:Lt,deleteBranchTask:Hr}=(MTr(),k_(X6t)),{checkIgnoreTask:Lr}=(LTr(),k_(j6t)),{checkIsRepoTask:hi}=(C4t(),k_(S4t)),{cloneTask:xr,cloneMirrorTask:Sr}=(UTr(),k_(B6t)),{cleanWithOptionsTask:Hi,isCleanOptionsArray:un}=(M4t(),k_(D4t)),{diffSummaryTask:Jn}=($Me(),k_(f6t)),{fetchTask:nn}=($Tr(),k_($6t)),{moveTask:Ra}=(rNr(),k_(eGt)),{pullTask:ms}=(iNr(),k_(tGt)),{pushTagsTask:Yr}=(C6t(),k_(E6t)),{addRemoteTask:Sa,getRemotesTask:Us,listRemotesTask:fr,remoteTask:Do,removeRemoteTask:sa}=(fNr(),k_(nGt)),{getResetMode:Du,resetTask:ya}=(q4t(),k_(j4t)),{stashListTask:zm}=(_Nr(),k_(iGt)),{addSubModuleTask:wI,initSubModuleTask:Mh,subModuleTask:Hv,updateSubModuleTask:Xi}=(yNr(),k_(sGt)),{addAnnotatedTagTask:dh,addTagTask:Lo,tagListTask:Up}=(GNr(),k_(cGt)),{straightThroughBufferTask:rA,straightThroughStringTask:fh}=(ch(),k_(SMe));function na(Ts,Xn){this._plugins=Xn,this._executor=new n(Ts.baseDir,new l(Ts.maxConcurrentProcesses),Xn),this._trimmed=Ts.trimmed}(na.prototype=Object.create(o.prototype)).constructor=na,na.prototype.customBinary=function(Ts){return this._plugins.reconfigure("binary",Ts),this},na.prototype.env=function(Ts,Xn){return arguments.length===1&&typeof Ts=="object"?this._executor.env=Ts:(this._executor.env=this._executor.env||{})[Ts]=Xn,this},na.prototype.stashList=function(Ts){return this._runTask(zm(pe(arguments)||{},v(Ts)&&Ts||[]),ie(arguments))};function St(Ts,Xn,jp,W_){return typeof jp!="string"?f(`git.${Ts}() requires a string 'repoPath'`):Xn(jp,Q(W_,R),M(arguments))}na.prototype.clone=function(){return this._runTask(St("clone",xr,...arguments),ie(arguments))},na.prototype.mirror=function(){return this._runTask(St("mirror",Sr,...arguments),ie(arguments))},na.prototype.mv=function(Ts,Xn){return this._runTask(Ra(Ts,Xn),ie(arguments))},na.prototype.checkoutLatestTag=function(Ts){var Xn=this;return this.pull(function(){Xn.tags(function(jp,W_){Xn.checkout(W_.latest,Ts)})})},na.prototype.pull=function(Ts,Xn,jp,W_){return this._runTask(ms(Q(Ts,R),Q(Xn,R),M(arguments)),ie(arguments))},na.prototype.fetch=function(Ts,Xn){return this._runTask(nn(Q(Ts,R),Q(Xn,R),M(arguments)),ie(arguments))},na.prototype.silent=function(Ts){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},na.prototype.tags=function(Ts,Xn){return this._runTask(Up(M(arguments)),ie(arguments))},na.prototype.rebase=function(){return this._runTask(fh(["rebase",...M(arguments)]),ie(arguments))},na.prototype.reset=function(Ts){return this._runTask(ya(Du(Ts),M(arguments)),ie(arguments))},na.prototype.revert=function(Ts){let Xn=ie(arguments);return typeof Ts!="string"?this._runTask(f("Commit must be a string"),Xn):this._runTask(fh(["revert",...M(arguments,0,!0),Ts]),Xn)},na.prototype.addTag=function(Ts){let Xn=typeof Ts=="string"?Lo(Ts):f("Git.addTag requires a tag name");return this._runTask(Xn,ie(arguments))},na.prototype.addAnnotatedTag=function(Ts,Xn){return this._runTask(dh(Ts,Xn),ie(arguments))},na.prototype.deleteLocalBranch=function(Ts,Xn,jp){return this._runTask(Hr(Ts,typeof Xn=="boolean"?Xn:!1),ie(arguments))},na.prototype.deleteLocalBranches=function(Ts,Xn,jp){return this._runTask(Lt(Ts,typeof Xn=="boolean"?Xn:!1),ie(arguments))},na.prototype.branch=function(Ts,Xn){return this._runTask(ct(M(arguments)),ie(arguments))},na.prototype.branchLocal=function(Ts){return this._runTask(rt(),ie(arguments))},na.prototype.raw=function(Ts){let Xn=!Array.isArray(Ts),jp=[].slice.call(Xn?arguments:Ts,0);for(let e2=0;e2<jp.length&&Xn;e2++)if(!E(jp[e2])){jp.splice(e2,jp.length-e2);break}jp.push(...M(arguments,0,!0));var W_=ie(arguments);return jp.length?this._runTask(fh(jp,this._trimmed),W_):this._runTask(f("Raw: must supply one or more command to execute"),W_)},na.prototype.submoduleAdd=function(Ts,Xn,jp){return this._runTask(wI(Ts,Xn),ie(arguments))},na.prototype.submoduleUpdate=function(Ts,Xn){return this._runTask(Xi(M(arguments,!0)),ie(arguments))},na.prototype.submoduleInit=function(Ts,Xn){return this._runTask(Mh(M(arguments,!0)),ie(arguments))},na.prototype.subModule=function(Ts,Xn){return this._runTask(Hv(M(arguments)),ie(arguments))},na.prototype.listRemote=function(){return this._runTask(fr(M(arguments)),ie(arguments))},na.prototype.addRemote=function(Ts,Xn,jp){return this._runTask(Sa(Ts,Xn,M(arguments)),ie(arguments))},na.prototype.removeRemote=function(Ts,Xn){return this._runTask(sa(Ts),ie(arguments))},na.prototype.getRemotes=function(Ts,Xn){return this._runTask(Us(Ts===!0),ie(arguments))},na.prototype.remote=function(Ts,Xn){return this._runTask(Do(M(arguments)),ie(arguments))},na.prototype.tag=function(Ts,Xn){let jp=M(arguments);return jp[0]!=="tag"&&jp.unshift("tag"),this._runTask(fh(jp),ie(arguments))},na.prototype.updateServerInfo=function(Ts){return this._runTask(fh(["update-server-info"]),ie(arguments))},na.prototype.pushTags=function(Ts,Xn){let jp=Yr({remote:Q(Ts,R)},M(arguments));return this._runTask(jp,ie(arguments))},na.prototype.rm=function(Ts){return this._runTask(fh(["rm","-f",...g(Ts)]),ie(arguments))},na.prototype.rmKeepLocal=function(Ts){return this._runTask(fh(["rm","--cached",...g(Ts)]),ie(arguments))},na.prototype.catFile=function(Ts,Xn){return this._catFile("utf-8",arguments)},na.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},na.prototype._catFile=function(Ts,Xn){var jp=ie(Xn),W_=["cat-file"],e2=Xn[0];if(typeof e2=="string")return this._runTask(f("Git.catFile: options must be supplied as an array of strings"),jp);Array.isArray(e2)&&W_.push.apply(W_,e2);let JJ=Ts==="buffer"?rA(W_):fh(W_);return this._runTask(JJ,jp)},na.prototype.diff=function(Ts,Xn){let jp=R(Ts)?f("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):fh(["diff",...M(arguments)]);return this._runTask(jp,ie(arguments))},na.prototype.diffSummary=function(){return this._runTask(Jn(M(arguments,1)),ie(arguments))},na.prototype.applyPatch=function(Ts){let Xn=P(Ts)?me(g(Ts),M([].slice.call(arguments,1))):f("git.applyPatch requires one or more string patches as the first argument");return this._runTask(Xn,ie(arguments))},na.prototype.revparse=function(){let Ts=["rev-parse",...M(arguments,!0)];return this._runTask(fh(Ts,!0),ie(arguments))},na.prototype.clean=function(Ts,Xn,jp){let W_=un(Ts),e2=W_&&Ts.join("")||Q(Ts,R)||"",JJ=M([].slice.call(arguments,W_?1:0));return this._runTask(Hi(e2,JJ),ie(arguments))},na.prototype.exec=function(Ts){let Xn={commands:[],format:"utf-8",parser(){typeof Ts=="function"&&Ts()}};return this._runTask(Xn)},na.prototype.clearQueue=function(){return this},na.prototype.checkIgnore=function(Ts,Xn){return this._runTask(Lr(g(Q(Ts,P,[]))),ie(arguments))},na.prototype.checkIsRepo=function(Ts,Xn){return this._runTask(hi(Q(Ts,R)),ie(arguments))},r.exports=na}});z$();MN();CNr=class extends QE{constructor(i,r){super(void 0,r),this.config=i}};MN();MN();XE=class extends QE{constructor(i,r,n){super(i,n),this.task=i,this.plugin=r,Object.setPrototypeOf(this,new.target.prototype)}};WO();u4t();C4t();M4t();H4t();L4t();U4t();q4t();Uc();Uc();s4t=(0,FO.deferred)().promise;Uc();ZNr="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",a4t="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";MN();Uc();JNr=class{constructor(){this.plugins=new Set,this.events=new HNr}on(i,r){this.events.on(i,r)}reconfigure(i,r){this.events.emit(i,r)}append(i,r){let n=Tp(this.plugins,{type:i,action:r});return()=>this.plugins.delete(n)}add(i){let r=[];return w4(i).forEach(n=>n&&this.plugins.add(Tp(r,n))),()=>{r.forEach(n=>this.plugins.delete(n))}}exec(i,r,n){let o=r,l=Object.freeze(Object.create(n));for(let f of this.plugins)f.type===i&&(o=f.action(o,l));return o}};Uc();Uc();z$();Uc();BNr=ENr();WO();lGt=zNr});var yGt=ut((qgn,i0e)=>{function fGt(i){return Array.isArray(i)?i:[i]}var qNr=void 0,nYe="",pGt=" ",rYe="\\",$Nr=/^\s+$/,KNr=/(?:[^\\]|^)\\$/,ekr=/^\\!/,tkr=/^\\#/,rkr=/\r?\n/g,nkr=/^\.{0,2}\/|^\.{1,2}$/,ikr=/\/$/,ZO="/",mGt="node-ignore";typeof Symbol<"u"&&(mGt=Symbol.for("node-ignore"));var _Gt=mGt,DO=(i,r,n)=>(Object.defineProperty(i,r,{value:n}),n),skr=/([0-z])-([0-z])/g,hGt=()=>!1,akr=i=>i.replace(skr,(r,n,o)=>n.charCodeAt(0)<=o.charCodeAt(0)?r:nYe),okr=i=>{let{length:r}=i;return i.slice(0,r-r%2)},ckr=[[/^\uFEFF/,()=>nYe],[/((?:\\\\)*?)(\\?\s+)$/,(i,r,n)=>r+(n.indexOf("\\")===0?pGt:nYe)],[/(\\+?)\s/g,(i,r)=>{let{length:n}=r;return r.slice(0,n-n%2)+pGt}],[/[\\$.|*+(){^]/g,i=>`\\${i}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(i,r,n)=>r+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(i,r,n)=>{let o=n.replace(/\\\*/g,"[^\\/]*");return r+o}],[/\\\\\\(?=[$.|*+(){^])/g,()=>rYe],[/\\\\/g,()=>rYe],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(i,r,n,o,l)=>r===rYe?`\\[${n}${okr(o)}${l}`:l==="]"&&o.length%2===0?`[${akr(n)}${o}]`:"[]"],[/(?:[^*])$/,i=>/\/$/.test(i)?`${i}$`:`${i}(?=$|\\/$)`]],lkr=/(^|\\\/)?\\\*$/,rK="regex",r0e="checkRegex",dGt="_",ukr={[rK](i,r){return`${r?`${r}[^/]+`:"[^/]*"}(?=$|\\/$)`},[r0e](i,r){return`${r?`${r}[^/]*`:"[^/]*"}(?=$|\\/$)`}},pkr=i=>ckr.reduce((r,[n,o])=>r.replace(n,o.bind(i)),i),n0e=i=>typeof i=="string",dkr=i=>i&&n0e(i)&&!$Nr.test(i)&&!KNr.test(i)&&i.indexOf("#")!==0,fkr=i=>i.split(rkr).filter(Boolean),iYe=class{constructor(r,n,o,l,f,g){this.pattern=r,this.mark=n,this.negative=f,DO(this,"body",o),DO(this,"ignoreCase",l),DO(this,"regexPrefix",g)}get regex(){let r=dGt+rK;return this[r]?this[r]:this._make(rK,r)}get checkRegex(){let r=dGt+r0e;return this[r]?this[r]:this._make(r0e,r)}_make(r,n){let o=this.regexPrefix.replace(lkr,ukr[r]),l=this.ignoreCase?new RegExp(o,"i"):new RegExp(o);return DO(this,n,l)}},mkr=({pattern:i,mark:r},n)=>{let o=!1,l=i;l.indexOf("!")===0&&(o=!0,l=l.substr(1)),l=l.replace(ekr,"!").replace(tkr,"#");let f=pkr(l);return new iYe(i,r,l,n,o,f)},sYe=class{constructor(r){this._ignoreCase=r,this._rules=[]}_add(r){if(r&&r[_Gt]){this._rules=this._rules.concat(r._rules._rules),this._added=!0;return}if(n0e(r)&&(r={pattern:r}),dkr(r.pattern)){let n=mkr(r,this._ignoreCase);this._added=!0,this._rules.push(n)}}add(r){return this._added=!1,fGt(n0e(r)?fkr(r):r).forEach(this._add,this),this._added}test(r,n,o){let l=!1,f=!1,g;this._rules.forEach(E=>{let{negative:R}=E;f===R&&l!==f||R&&!l&&!f&&!n||!E[o].test(r)||(l=!R,f=R,g=R?qNr:E)});let v={ignored:l,unignored:f};return g&&(v.rule=g),v}},_kr=(i,r)=>{throw new r(i)},UE=(i,r,n)=>n0e(i)?i?UE.isNotRelative(i)?n(`path should be a \`path.relative()\`d string, but got "${r}"`,RangeError):!0:n("path must not be empty",TypeError):n(`path must be a string, but got \`${r}\``,TypeError),gGt=i=>nkr.test(i);UE.isNotRelative=gGt;UE.convert=i=>i;var aYe=class{constructor({ignorecase:r=!0,ignoreCase:n=r,allowRelativePaths:o=!1}={}){DO(this,_Gt,!0),this._rules=new sYe(n),this._strictPathCheck=!o,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(r){return this._rules.add(r)&&this._initCache(),this}addPattern(r){return this.add(r)}_test(r,n,o,l){let f=r&&UE.convert(r);return UE(f,r,this._strictPathCheck?_kr:hGt),this._t(f,n,o,l)}checkIgnore(r){if(!ikr.test(r))return this.test(r);let n=r.split(ZO).filter(Boolean);if(n.pop(),n.length){let o=this._t(n.join(ZO)+ZO,this._testCache,!0,n);if(o.ignored)return o}return this._rules.test(r,!1,r0e)}_t(r,n,o,l){if(r in n)return n[r];if(l||(l=r.split(ZO).filter(Boolean)),l.pop(),!l.length)return n[r]=this._rules.test(r,o,rK);let f=this._t(l.join(ZO)+ZO,n,o,l);return n[r]=f.ignored?f:this._rules.test(r,o,rK)}ignores(r){return this._test(r,this._ignoreCache,!1).ignored}createFilter(){return r=>!this.ignores(r)}filter(r){return fGt(r).filter(this.createFilter())}test(r){return this._test(r,this._testCache,!0)}},oYe=i=>new aYe(i),hkr=i=>UE(i&&UE.convert(i),i,hGt),IGt=()=>{let i=n=>/^\\\\\?\\/.test(n)||/["<>|\u0000-\u001F]+/u.test(n)?n:n.replace(/\\/g,"/");UE.convert=i;let r=/^[a-z]:\//i;UE.isNotRelative=n=>r.test(n)||gGt(n)};typeof process<"u"&&process.platform==="win32"&&IGt();i0e.exports=oYe;oYe.default=oYe;i0e.exports.isPathValid=hkr;DO(i0e.exports,Symbol.for("setupWindows"),IGt)});import vGt from"path";function gkr(i){let r=new Set;for(let n of i){let o=n.match(/^\.?([^/*?]+)(?:\/\*\*|\/)?$/);o&&r.add(o[1])}return r}function xGt(i){return i.startsWith(".")?!0:Ikr.has(i)}function wGt(i){return!!(i.startsWith(".")||i.endsWith(".log")||i.endsWith(".lock")||i==="package-lock.json"||i==="yarn.lock"||i==="pnpm-lock.yaml"||i.endsWith(".min.js")||i.endsWith(".min.css")||i.endsWith(".map")||i.endsWith(".pyc")||i.endsWith(".class")||i.endsWith(".swp")||i.endsWith(".swo")||i===".DS_Store"||i==="Thumbs.db")}async function AGt(i,r=!0){let n=(0,bGt.default)(),o=vGt.join(i,".gitignore"),l=await Xd(o);return l?(ve.debug(`Loaded .gitignore from ${o}`),n.add(l),n.add(".git")):r&&(ve.debug("No .gitignore found, using default ignore patterns"),n.add(fV)),n}async function SGt(i){let r=vGt.join(i,".gitignore"),n=await Xd(r);if(n){ve.debug(`Loaded ignore patterns from .gitignore at ${r}`);let o=n.split(`
|
|
529
|
-
`).map(l=>l.trim()).filter(l=>l&&!l.startsWith("#"));return!o.includes(".git")&&!o.includes(".git/**")&&o.push(".git/**"),o}return ve.debug("No .gitignore found, using default ignore patterns"),[...fV]}var bGt,fV,Ikr,s0e=cr(()=>{"use strict";bGt=To(yGt(),1);gm();qo();fV=["node_modules/**","bower_components/**","jspm_packages/**",".git/**","dist/**","build/**","out/**",".output/**",".next/**",".nuxt/**",".svelte-kit/**",".remix/**",".astro/**",".docusaurus/**","coverage/**",".nyc_output/**",".pytest_cache/**",".vitest/**","jest-cache/**",".tox/**",".cache/**",".turbo/**",".parcel-cache/**",".env*","*.log","*.lock","package-lock.json","yarn.lock","pnpm-lock.yaml","Gemfile.lock","go.sum","Cargo.lock","*.min.js","*.min.css","*.map","__pycache__/**","*.pyc","venv/**",".venv/**","*.egg-info/**","*.egg","dist-info/**",".bundle/**","
|
|
528
|
+
`).map(vNr).filter(Boolean);r||n.sort(function(l,f){let g=l.split("."),v=f.split(".");if(g.length===1||v.length===1)return bNr(Vhe(g[0]),Vhe(v[0]));for(let E=0,R=Math.max(g.length,v.length);E<R;E++){let P=aGt(Vhe(g[E]),Vhe(v[E]));if(P)return P}return 0});let o=r?n[0]:[...n].reverse().find(l=>l.indexOf(".")>=0);return new i4t(n,o)}}}),cGt={};lh(cGt,{addAnnotatedTagTask:()=>SNr,addTagTask:()=>ANr,tagListTask:()=>wNr});GNr=Ia({"src/lib/tasks/tag.ts"(){"use strict";xNr()}}),ENr=MCr({"src/git.js"(i,r){"use strict";var{GitExecutor:n}=(E9r(),k_(e6t)),{SimpleGitApi:o}=(STr(),k_(W6t)),{Scheduler:l}=(GTr(),k_(V6t)),{configurationErrorTask:f}=(ch(),k_(SMe)),{asArray:g,filterArray:v,filterPrimitives:E,filterString:R,filterStringOrStringArray:P,filterType:Q,getTrailingOptions:M,trailingFunctionArgument:ie,trailingOptionsArgument:pe}=(Uc(),k_(A4t)),{applyPatchTask:me}=(CTr(),k_(P6t)),{branchTask:ct,branchLocalTask:rt,deleteBranchesTask:Lt,deleteBranchTask:Hr}=(MTr(),k_(X6t)),{checkIgnoreTask:Lr}=(LTr(),k_(j6t)),{checkIsRepoTask:hi}=(C4t(),k_(S4t)),{cloneTask:xr,cloneMirrorTask:Sr}=(UTr(),k_(B6t)),{cleanWithOptionsTask:Hi,isCleanOptionsArray:un}=(M4t(),k_(D4t)),{diffSummaryTask:Jn}=($Me(),k_(f6t)),{fetchTask:nn}=($Tr(),k_($6t)),{moveTask:Ra}=(rNr(),k_(eGt)),{pullTask:ms}=(iNr(),k_(tGt)),{pushTagsTask:Yr}=(C6t(),k_(E6t)),{addRemoteTask:Sa,getRemotesTask:Us,listRemotesTask:fr,remoteTask:Do,removeRemoteTask:sa}=(fNr(),k_(nGt)),{getResetMode:Du,resetTask:ya}=(q4t(),k_(j4t)),{stashListTask:zm}=(_Nr(),k_(iGt)),{addSubModuleTask:wI,initSubModuleTask:Mh,subModuleTask:Hv,updateSubModuleTask:Xi}=(yNr(),k_(sGt)),{addAnnotatedTagTask:dh,addTagTask:Lo,tagListTask:Up}=(GNr(),k_(cGt)),{straightThroughBufferTask:rA,straightThroughStringTask:fh}=(ch(),k_(SMe));function na(Ts,Xn){this._plugins=Xn,this._executor=new n(Ts.baseDir,new l(Ts.maxConcurrentProcesses),Xn),this._trimmed=Ts.trimmed}(na.prototype=Object.create(o.prototype)).constructor=na,na.prototype.customBinary=function(Ts){return this._plugins.reconfigure("binary",Ts),this},na.prototype.env=function(Ts,Xn){return arguments.length===1&&typeof Ts=="object"?this._executor.env=Ts:(this._executor.env=this._executor.env||{})[Ts]=Xn,this},na.prototype.stashList=function(Ts){return this._runTask(zm(pe(arguments)||{},v(Ts)&&Ts||[]),ie(arguments))};function St(Ts,Xn,jp,W_){return typeof jp!="string"?f(`git.${Ts}() requires a string 'repoPath'`):Xn(jp,Q(W_,R),M(arguments))}na.prototype.clone=function(){return this._runTask(St("clone",xr,...arguments),ie(arguments))},na.prototype.mirror=function(){return this._runTask(St("mirror",Sr,...arguments),ie(arguments))},na.prototype.mv=function(Ts,Xn){return this._runTask(Ra(Ts,Xn),ie(arguments))},na.prototype.checkoutLatestTag=function(Ts){var Xn=this;return this.pull(function(){Xn.tags(function(jp,W_){Xn.checkout(W_.latest,Ts)})})},na.prototype.pull=function(Ts,Xn,jp,W_){return this._runTask(ms(Q(Ts,R),Q(Xn,R),M(arguments)),ie(arguments))},na.prototype.fetch=function(Ts,Xn){return this._runTask(nn(Q(Ts,R),Q(Xn,R),M(arguments)),ie(arguments))},na.prototype.silent=function(Ts){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},na.prototype.tags=function(Ts,Xn){return this._runTask(Up(M(arguments)),ie(arguments))},na.prototype.rebase=function(){return this._runTask(fh(["rebase",...M(arguments)]),ie(arguments))},na.prototype.reset=function(Ts){return this._runTask(ya(Du(Ts),M(arguments)),ie(arguments))},na.prototype.revert=function(Ts){let Xn=ie(arguments);return typeof Ts!="string"?this._runTask(f("Commit must be a string"),Xn):this._runTask(fh(["revert",...M(arguments,0,!0),Ts]),Xn)},na.prototype.addTag=function(Ts){let Xn=typeof Ts=="string"?Lo(Ts):f("Git.addTag requires a tag name");return this._runTask(Xn,ie(arguments))},na.prototype.addAnnotatedTag=function(Ts,Xn){return this._runTask(dh(Ts,Xn),ie(arguments))},na.prototype.deleteLocalBranch=function(Ts,Xn,jp){return this._runTask(Hr(Ts,typeof Xn=="boolean"?Xn:!1),ie(arguments))},na.prototype.deleteLocalBranches=function(Ts,Xn,jp){return this._runTask(Lt(Ts,typeof Xn=="boolean"?Xn:!1),ie(arguments))},na.prototype.branch=function(Ts,Xn){return this._runTask(ct(M(arguments)),ie(arguments))},na.prototype.branchLocal=function(Ts){return this._runTask(rt(),ie(arguments))},na.prototype.raw=function(Ts){let Xn=!Array.isArray(Ts),jp=[].slice.call(Xn?arguments:Ts,0);for(let e2=0;e2<jp.length&&Xn;e2++)if(!E(jp[e2])){jp.splice(e2,jp.length-e2);break}jp.push(...M(arguments,0,!0));var W_=ie(arguments);return jp.length?this._runTask(fh(jp,this._trimmed),W_):this._runTask(f("Raw: must supply one or more command to execute"),W_)},na.prototype.submoduleAdd=function(Ts,Xn,jp){return this._runTask(wI(Ts,Xn),ie(arguments))},na.prototype.submoduleUpdate=function(Ts,Xn){return this._runTask(Xi(M(arguments,!0)),ie(arguments))},na.prototype.submoduleInit=function(Ts,Xn){return this._runTask(Mh(M(arguments,!0)),ie(arguments))},na.prototype.subModule=function(Ts,Xn){return this._runTask(Hv(M(arguments)),ie(arguments))},na.prototype.listRemote=function(){return this._runTask(fr(M(arguments)),ie(arguments))},na.prototype.addRemote=function(Ts,Xn,jp){return this._runTask(Sa(Ts,Xn,M(arguments)),ie(arguments))},na.prototype.removeRemote=function(Ts,Xn){return this._runTask(sa(Ts),ie(arguments))},na.prototype.getRemotes=function(Ts,Xn){return this._runTask(Us(Ts===!0),ie(arguments))},na.prototype.remote=function(Ts,Xn){return this._runTask(Do(M(arguments)),ie(arguments))},na.prototype.tag=function(Ts,Xn){let jp=M(arguments);return jp[0]!=="tag"&&jp.unshift("tag"),this._runTask(fh(jp),ie(arguments))},na.prototype.updateServerInfo=function(Ts){return this._runTask(fh(["update-server-info"]),ie(arguments))},na.prototype.pushTags=function(Ts,Xn){let jp=Yr({remote:Q(Ts,R)},M(arguments));return this._runTask(jp,ie(arguments))},na.prototype.rm=function(Ts){return this._runTask(fh(["rm","-f",...g(Ts)]),ie(arguments))},na.prototype.rmKeepLocal=function(Ts){return this._runTask(fh(["rm","--cached",...g(Ts)]),ie(arguments))},na.prototype.catFile=function(Ts,Xn){return this._catFile("utf-8",arguments)},na.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},na.prototype._catFile=function(Ts,Xn){var jp=ie(Xn),W_=["cat-file"],e2=Xn[0];if(typeof e2=="string")return this._runTask(f("Git.catFile: options must be supplied as an array of strings"),jp);Array.isArray(e2)&&W_.push.apply(W_,e2);let JJ=Ts==="buffer"?rA(W_):fh(W_);return this._runTask(JJ,jp)},na.prototype.diff=function(Ts,Xn){let jp=R(Ts)?f("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):fh(["diff",...M(arguments)]);return this._runTask(jp,ie(arguments))},na.prototype.diffSummary=function(){return this._runTask(Jn(M(arguments,1)),ie(arguments))},na.prototype.applyPatch=function(Ts){let Xn=P(Ts)?me(g(Ts),M([].slice.call(arguments,1))):f("git.applyPatch requires one or more string patches as the first argument");return this._runTask(Xn,ie(arguments))},na.prototype.revparse=function(){let Ts=["rev-parse",...M(arguments,!0)];return this._runTask(fh(Ts,!0),ie(arguments))},na.prototype.clean=function(Ts,Xn,jp){let W_=un(Ts),e2=W_&&Ts.join("")||Q(Ts,R)||"",JJ=M([].slice.call(arguments,W_?1:0));return this._runTask(Hi(e2,JJ),ie(arguments))},na.prototype.exec=function(Ts){let Xn={commands:[],format:"utf-8",parser(){typeof Ts=="function"&&Ts()}};return this._runTask(Xn)},na.prototype.clearQueue=function(){return this},na.prototype.checkIgnore=function(Ts,Xn){return this._runTask(Lr(g(Q(Ts,P,[]))),ie(arguments))},na.prototype.checkIsRepo=function(Ts,Xn){return this._runTask(hi(Q(Ts,R)),ie(arguments))},r.exports=na}});z$();MN();CNr=class extends QE{constructor(i,r){super(void 0,r),this.config=i}};MN();MN();XE=class extends QE{constructor(i,r,n){super(i,n),this.task=i,this.plugin=r,Object.setPrototypeOf(this,new.target.prototype)}};WO();u4t();C4t();M4t();H4t();L4t();U4t();q4t();Uc();Uc();s4t=(0,FO.deferred)().promise;Uc();ZNr="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",a4t="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";MN();Uc();JNr=class{constructor(){this.plugins=new Set,this.events=new HNr}on(i,r){this.events.on(i,r)}reconfigure(i,r){this.events.emit(i,r)}append(i,r){let n=Tp(this.plugins,{type:i,action:r});return()=>this.plugins.delete(n)}add(i){let r=[];return w4(i).forEach(n=>n&&this.plugins.add(Tp(r,n))),()=>{r.forEach(n=>this.plugins.delete(n))}}exec(i,r,n){let o=r,l=Object.freeze(Object.create(n));for(let f of this.plugins)f.type===i&&(o=f.action(o,l));return o}};Uc();Uc();z$();Uc();BNr=ENr();WO();lGt=zNr});var yGt=ut((qgn,i0e)=>{function fGt(i){return Array.isArray(i)?i:[i]}var qNr=void 0,nYe="",pGt=" ",rYe="\\",$Nr=/^\s+$/,KNr=/(?:[^\\]|^)\\$/,ekr=/^\\!/,tkr=/^\\#/,rkr=/\r?\n/g,nkr=/^\.{0,2}\/|^\.{1,2}$/,ikr=/\/$/,ZO="/",mGt="node-ignore";typeof Symbol<"u"&&(mGt=Symbol.for("node-ignore"));var _Gt=mGt,DO=(i,r,n)=>(Object.defineProperty(i,r,{value:n}),n),skr=/([0-z])-([0-z])/g,hGt=()=>!1,akr=i=>i.replace(skr,(r,n,o)=>n.charCodeAt(0)<=o.charCodeAt(0)?r:nYe),okr=i=>{let{length:r}=i;return i.slice(0,r-r%2)},ckr=[[/^\uFEFF/,()=>nYe],[/((?:\\\\)*?)(\\?\s+)$/,(i,r,n)=>r+(n.indexOf("\\")===0?pGt:nYe)],[/(\\+?)\s/g,(i,r)=>{let{length:n}=r;return r.slice(0,n-n%2)+pGt}],[/[\\$.|*+(){^]/g,i=>`\\${i}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(i,r,n)=>r+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(i,r,n)=>{let o=n.replace(/\\\*/g,"[^\\/]*");return r+o}],[/\\\\\\(?=[$.|*+(){^])/g,()=>rYe],[/\\\\/g,()=>rYe],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(i,r,n,o,l)=>r===rYe?`\\[${n}${okr(o)}${l}`:l==="]"&&o.length%2===0?`[${akr(n)}${o}]`:"[]"],[/(?:[^*])$/,i=>/\/$/.test(i)?`${i}$`:`${i}(?=$|\\/$)`]],lkr=/(^|\\\/)?\\\*$/,rK="regex",r0e="checkRegex",dGt="_",ukr={[rK](i,r){return`${r?`${r}[^/]+`:"[^/]*"}(?=$|\\/$)`},[r0e](i,r){return`${r?`${r}[^/]*`:"[^/]*"}(?=$|\\/$)`}},pkr=i=>ckr.reduce((r,[n,o])=>r.replace(n,o.bind(i)),i),n0e=i=>typeof i=="string",dkr=i=>i&&n0e(i)&&!$Nr.test(i)&&!KNr.test(i)&&i.indexOf("#")!==0,fkr=i=>i.split(rkr).filter(Boolean),iYe=class{constructor(r,n,o,l,f,g){this.pattern=r,this.mark=n,this.negative=f,DO(this,"body",o),DO(this,"ignoreCase",l),DO(this,"regexPrefix",g)}get regex(){let r=dGt+rK;return this[r]?this[r]:this._make(rK,r)}get checkRegex(){let r=dGt+r0e;return this[r]?this[r]:this._make(r0e,r)}_make(r,n){let o=this.regexPrefix.replace(lkr,ukr[r]),l=this.ignoreCase?new RegExp(o,"i"):new RegExp(o);return DO(this,n,l)}},mkr=({pattern:i,mark:r},n)=>{let o=!1,l=i;l.indexOf("!")===0&&(o=!0,l=l.substr(1)),l=l.replace(ekr,"!").replace(tkr,"#");let f=pkr(l);return new iYe(i,r,l,n,o,f)},sYe=class{constructor(r){this._ignoreCase=r,this._rules=[]}_add(r){if(r&&r[_Gt]){this._rules=this._rules.concat(r._rules._rules),this._added=!0;return}if(n0e(r)&&(r={pattern:r}),dkr(r.pattern)){let n=mkr(r,this._ignoreCase);this._added=!0,this._rules.push(n)}}add(r){return this._added=!1,fGt(n0e(r)?fkr(r):r).forEach(this._add,this),this._added}test(r,n,o){let l=!1,f=!1,g;this._rules.forEach(E=>{let{negative:R}=E;f===R&&l!==f||R&&!l&&!f&&!n||!E[o].test(r)||(l=!R,f=R,g=R?qNr:E)});let v={ignored:l,unignored:f};return g&&(v.rule=g),v}},_kr=(i,r)=>{throw new r(i)},UE=(i,r,n)=>n0e(i)?i?UE.isNotRelative(i)?n(`path should be a \`path.relative()\`d string, but got "${r}"`,RangeError):!0:n("path must not be empty",TypeError):n(`path must be a string, but got \`${r}\``,TypeError),gGt=i=>nkr.test(i);UE.isNotRelative=gGt;UE.convert=i=>i;var aYe=class{constructor({ignorecase:r=!0,ignoreCase:n=r,allowRelativePaths:o=!1}={}){DO(this,_Gt,!0),this._rules=new sYe(n),this._strictPathCheck=!o,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(r){return this._rules.add(r)&&this._initCache(),this}addPattern(r){return this.add(r)}_test(r,n,o,l){let f=r&&UE.convert(r);return UE(f,r,this._strictPathCheck?_kr:hGt),this._t(f,n,o,l)}checkIgnore(r){if(!ikr.test(r))return this.test(r);let n=r.split(ZO).filter(Boolean);if(n.pop(),n.length){let o=this._t(n.join(ZO)+ZO,this._testCache,!0,n);if(o.ignored)return o}return this._rules.test(r,!1,r0e)}_t(r,n,o,l){if(r in n)return n[r];if(l||(l=r.split(ZO).filter(Boolean)),l.pop(),!l.length)return n[r]=this._rules.test(r,o,rK);let f=this._t(l.join(ZO)+ZO,n,o,l);return n[r]=f.ignored?f:this._rules.test(r,o,rK)}ignores(r){return this._test(r,this._ignoreCache,!1).ignored}createFilter(){return r=>!this.ignores(r)}filter(r){return fGt(r).filter(this.createFilter())}test(r){return this._test(r,this._testCache,!0)}},oYe=i=>new aYe(i),hkr=i=>UE(i&&UE.convert(i),i,hGt),IGt=()=>{let i=n=>/^\\\\\?\\/.test(n)||/["<>|\u0000-\u001F]+/u.test(n)?n:n.replace(/\\/g,"/");UE.convert=i;let r=/^[a-z]:\//i;UE.isNotRelative=n=>r.test(n)||gGt(n)};typeof process<"u"&&process.platform==="win32"&&IGt();i0e.exports=oYe;oYe.default=oYe;i0e.exports.isPathValid=hkr;DO(i0e.exports,Symbol.for("setupWindows"),IGt)});import vGt from"path";function gkr(i){let r=new Set;for(let n of i){let o=n.match(/^\.?([^/*?]+)(?:\/\*\*|\/)?$/);o&&r.add(o[1])}return r}function xGt(i){return i.startsWith(".")?!0:Ikr.has(i)}function wGt(i){return!!(i.startsWith(".")||i.endsWith(".log")||i.endsWith(".lock")||i==="package-lock.json"||i==="yarn.lock"||i==="pnpm-lock.yaml"||i.endsWith(".min.js")||i.endsWith(".min.css")||i.endsWith(".map")||i.endsWith(".pyc")||i.endsWith(".class")||i.endsWith(".apk")||i.endsWith(".aab")||i.endsWith(".tfstate")||i.endsWith(".tfstate.backup")||i.endsWith(".swp")||i.endsWith(".swo")||i===".DS_Store"||i==="Thumbs.db")}async function AGt(i,r=!0){let n=(0,bGt.default)(),o=vGt.join(i,".gitignore"),l=await Xd(o);return l?(ve.debug(`Loaded .gitignore from ${o}`),n.add(l),n.add(".git")):r&&(ve.debug("No .gitignore found, using default ignore patterns"),n.add(fV)),n}async function SGt(i){let r=vGt.join(i,".gitignore"),n=await Xd(r);if(n){ve.debug(`Loaded ignore patterns from .gitignore at ${r}`);let o=n.split(`
|
|
529
|
+
`).map(l=>l.trim()).filter(l=>l&&!l.startsWith("#"));return!o.includes(".git")&&!o.includes(".git/**")&&o.push(".git/**"),o}return ve.debug("No .gitignore found, using default ignore patterns"),[...fV]}var bGt,fV,Ikr,s0e=cr(()=>{"use strict";bGt=To(yGt(),1);gm();qo();fV=["node_modules/**","bower_components/**","jspm_packages/**",".git/**","dist/**","build/**","out/**",".output/**",".next/**",".nuxt/**",".svelte-kit/**",".remix/**",".astro/**",".docusaurus/**",".angular/**","coverage/**",".nyc_output/**",".pytest_cache/**",".vitest/**","jest-cache/**",".tox/**",".cache/**",".turbo/**",".parcel-cache/**",".env*","*.log","*.lock","package-lock.json","yarn.lock","pnpm-lock.yaml","Gemfile.lock","composer.lock","go.sum","Cargo.lock","pubspec.lock","Podfile.lock","Packages.resolved","*.min.js","*.min.css","*.map","__pycache__/**","*.pyc","venv/**",".venv/**","*.egg-info/**","*.egg","dist-info/**",".bundle/**","target/**","*.class",".gradle/**",".mvn/**","bin/**","obj/**",".nuget/**","packages/**","vendor/**","_build/**","deps/**","Pods/**","DerivedData/**","Carthage/**","*.xcworkspace/**","*.apk","*.aab","*.tfstate","*.tfstate.backup",".idea/**",".vscode/**",".vs/**",".compass/**",".claude/**",".DS_Store","Thumbs.db","*.swp","*.swo"];Ikr=gkr(fV)});import YN from"path";import cYe from"fs/promises";function ykr(i){return new nK(i)}async function A4(i){return a0e||(a0e=new nK(i),await a0e.initialize()),a0e}var nK,a0e,PO=cr(()=>{"use strict";uGt();qo();Pb();s0e();nK=class{git;projectRoot;constructor(r){this.projectRoot=r||process.cwd();let n={baseDir:this.projectRoot,binary:"git",maxConcurrentProcesses:6,trimmed:!0};this.git=lGt(n)}async initialize(){try{return await this.isGitRepo()?(ve.debug("Git service initialized"),!0):(ve.warn("Not a Git repository"),!1)}catch(r){return ve.error("Failed to initialize Git service",r),!1}}async isGitRepo(){try{return await this.git.status(),!0}catch{return!1}}async initRepo(r=!1){await this.git.init(r),ve.info(`Initialized ${r?"bare ":""}Git repository in ${this.projectRoot}`)}async getStatus(){try{let r=await this.git.status(),n=r.staged.map(l=>({path:l,index:"A",workingDir:" ",staged:!0,modified:!1,isNew:!0,deleted:!1,conflicted:!1}));for(let l of r.modified)if(r.staged.includes(l)){let f=n.find(g=>g.path===l);f&&(f.index="M",f.modified=!0,f.isNew=!1)}let o=r.modified.filter(l=>!r.staged.includes(l)).map(l=>({path:l,index:" ",workingDir:"M",staged:!1,modified:!0,isNew:!1,deleted:!1,conflicted:!1}));for(let l of r.deleted){let f={path:l,index:r.staged.includes(l)?"D":" ",workingDir:r.staged.includes(l)?" ":"D",staged:r.staged.includes(l),modified:!1,isNew:!1,deleted:!0,conflicted:!1};f.staged?n.push(f):o.push(f)}return{branch:r.current||"HEAD",tracking:r.tracking||null,ahead:r.ahead,behind:r.behind,staged:n,modified:o,untracked:r.not_added,conflicted:r.conflicted,isClean:r.isClean()}}catch(r){return ve.debug(`Git status failed, attempting .gitignore fallback: ${r}`),this.getStatusWithGitignoreFallback()}}async getCurrentBranch(){return(await this.git.status()).current||"HEAD"}async getStagedDiff(r={}){let n=["--cached"];return r.context!==void 0&&n.push(`-U${r.context}`),r.ignoreWhitespace&&n.push("-w"),r.wordDiff&&n.push("--word-diff"),this.git.diff(n)}async getUnstagedDiff(r={}){let n=[];return r.context!==void 0&&n.push(`-U${r.context}`),r.ignoreWhitespace&&n.push("-w"),r.wordDiff&&n.push("--word-diff"),this.git.diff(n)}async getFileDiff(r,n={}){let o=[];return n.context!==void 0&&o.push(`-U${n.context}`),n.ignoreWhitespace&&o.push("-w"),n.commit&&o.push(n.commit),o.push("--",r),this.git.diff(o)}async getDiffBetweenCommits(r,n,o={}){let l=[];return o.context!==void 0&&l.push(`-U${o.context}`),o.ignoreWhitespace&&l.push("-w"),l.push(r,n),this.git.diff(l)}async stage(r){let n=Array.isArray(r)?r:[r];await this.git.add(n),ve.debug(`Staged: ${n.join(", ")}`)}async stageAll(){await this.git.add("."),ve.debug("Staged all changes")}async unstage(r){let n=Array.isArray(r)?r:[r];await this.git.reset(["HEAD","--",...n]),ve.debug(`Unstaged: ${n.join(", ")}`)}async unstageAll(){await this.git.reset(["HEAD"]),ve.debug("Unstaged all files")}async commit(r,n={}){let o=Date.now(),l=r.includes(`
|
|
530
530
|
`),f=null;try{if(l){let g=await this.getRepoRoot();f=YN.join(g,".git","COMMIT_EDITMSG_TEMP"),await cYe.writeFile(f,r,"utf8");let v=["-F",f];n.amend&&v.push("--amend"),n.allowEmpty&&v.push("--allow-empty"),n.noVerify&&v.push("--no-verify"),n.author&&v.push(`--author=${n.author}`);let R=(await this.git.raw(["commit",...v])).match(/\[.+?\s+([a-f0-9]+)\]/),P=R?R[1]:"unknown";return ve.info(`Committed: ${P}`),await Qo().logGitOperation({operation:"commit",branch:await this.getCurrentBranch(),success:!0,duration_ms:Date.now()-o,details:{hash:P,amend:n.amend,multiLine:!0}}),P}else{let g=[];n.amend&&g.push("--amend"),n.allowEmpty&&g.push("--allow-empty"),n.noVerify&&g.push("--no-verify"),n.author&&g.push(`--author=${n.author}`);let v=await this.git.commit(r,g);return ve.info(`Committed: ${v.commit}`),await Qo().logGitOperation({operation:"commit",branch:await this.getCurrentBranch(),success:!0,duration_ms:Date.now()-o,details:{hash:v.commit,amend:n.amend}}),v.commit}}finally{if(f)try{await cYe.unlink(f)}catch(g){ve.debug(`Failed to clean up temp commit file: ${g}`)}}}async commitConventional(r){let n=this.formatConventionalCommit(r);return this.commit(n)}formatConventionalCommit(r){let n=r.type;return r.scope&&(n+=`(${r.scope})`),r.breaking&&(n+="!"),n+=`: ${r.description}`,r.body&&(n+=`
|
|
531
531
|
|
|
532
532
|
${r.body}`),r.footer&&(n+=`
|
|
@@ -751,6 +751,7 @@ Provide a detailed verification report.
|
|
|
751
751
|
- Clear, unambiguous requirements with single obvious approach
|
|
752
752
|
- No architectural impact, no breaking changes
|
|
753
753
|
- Low risk (e.g., typo fixes, simple bug fixes, adding logs)
|
|
754
|
+
- **Requests to understand, explain, or analyze existing code** - the codebase needs to be explored thoroughly
|
|
754
755
|
|
|
755
756
|
**CLARIFICATION** - Ask targeted questions before proceeding:
|
|
756
757
|
- High information density that needs untangling into clear requirements
|
|
@@ -765,6 +766,7 @@ Provide a detailed verification report.
|
|
|
765
766
|
- The requested feature/change is already fully implemented in the codebase
|
|
766
767
|
- The request doesn't make sense given the current code structure or project context
|
|
767
768
|
- The request conflicts with existing functionality or architecture in a way that makes it invalid
|
|
769
|
+
- **NOT for requests to understand, explain, analyze, or explore existing code** - those need DIRECT mode to properly search the codebase
|
|
768
770
|
- When using this mode: provide clear explanation of why no action is needed, and offer a helpful follow-up question or tip to guide the user
|
|
769
771
|
|
|
770
772
|
**TODO_LIST** - Create a simple task checklist:
|
|
@@ -932,11 +934,13 @@ Examine the user's request and the code snippets provided. Based on your underst
|
|
|
932
934
|
- The requested feature/change is already fully implemented in the codebase
|
|
933
935
|
- The request doesn't make sense given the current code structure or project context
|
|
934
936
|
- The request conflicts with existing functionality or architecture in a way that makes it invalid
|
|
937
|
+
- **NOT for requests to understand, explain, analyze, or explore existing code** - those need DIRECT mode to properly search the codebase
|
|
935
938
|
- When using this mode: provide clear explanation of why no action is needed, and offer a helpful follow-up question or tip to guide the user
|
|
936
939
|
|
|
937
940
|
**DIRECT** - Execute immediately without planning:
|
|
938
941
|
- The change is semantically simple, even if it touches multiple files
|
|
939
942
|
- Examples: renaming a variable across files, fixing the same pattern in many places, adding a simple field
|
|
943
|
+
- **Requests to understand, explain, or analyze existing code** - the codebase needs to be explored thoroughly
|
|
940
944
|
- Clear implementation path, no design decisions needed
|
|
941
945
|
|
|
942
946
|
**CLARIFICATION** - Ask 1-3 quick questions first:
|
|
@@ -1013,11 +1017,11 @@ Your response must be parseable by JSON.parse(). Use this exact structure:
|
|
|
1013
1017
|
\`\`\`json
|
|
1014
1018
|
{
|
|
1015
1019
|
"mode": "NO_ACTION",
|
|
1016
|
-
"confidence":
|
|
1017
|
-
"reasoning": "The
|
|
1018
|
-
"filesActuallyRelevant":
|
|
1019
|
-
"noActionExplanation": "The requested
|
|
1020
|
-
"noActionFollowUp": "Would you like me to
|
|
1020
|
+
"confidence": 92,
|
|
1021
|
+
"reasoning": "The dark mode toggle feature is already implemented in ThemeContext.tsx:15-48.",
|
|
1022
|
+
"filesActuallyRelevant": 2,
|
|
1023
|
+
"noActionExplanation": "The dark mode toggle you requested is already fully implemented. The ThemeContext provides toggle functionality and persists the preference to localStorage.",
|
|
1024
|
+
"noActionFollowUp": "Would you like me to add additional themes, or modify the existing toggle behavior?"
|
|
1021
1025
|
}
|
|
1022
1026
|
\`\`\`
|
|
1023
1027
|
|
|
@@ -1401,6 +1405,7 @@ AVOID:
|
|
|
1401
1405
|
"testFiles": ["string - Test file paths (only if project has tests OR user requested)"]
|
|
1402
1406
|
},
|
|
1403
1407
|
"totalComplexity": "number - 1-10 overall complexity",
|
|
1408
|
+
"complexityNote": "string - Brief, collegial reflection (1-2 sentences) on what makes this task complex or straightforward, written as a senior engineer giving a teammate a heads-up",
|
|
1404
1409
|
"summary": "string - Brief plan summary"
|
|
1405
1410
|
}
|
|
1406
1411
|
`,jJe=`You are an expert software architect helping to plan implementation tasks.
|
|
@@ -1411,7 +1416,14 @@ IMPORTANT GUIDELINES:
|
|
|
1411
1416
|
2. Be REALISTIC - Base task complexity on the actual codebase, not generic estimates
|
|
1412
1417
|
3. Be THOROUGH - Consider edge cases, error handling, and testing
|
|
1413
1418
|
4. Be ORDERED - Tasks should have clear dependencies and execution order
|
|
1414
|
-
5.
|
|
1419
|
+
5. Match task count to complexity - Simple (1-3): 3-5 tasks. Medium (4-6): 5-7 tasks. Complex (7-10): 7-10 tasks
|
|
1420
|
+
|
|
1421
|
+
COMPLEXITY NOTE:
|
|
1422
|
+
Write ONE short, collegial sentence (max 15 words) as a senior engineer giving a teammate a heads-up.
|
|
1423
|
+
Examples by complexity:
|
|
1424
|
+
- Low (1-3): "Straightforward change - we're following established patterns here."
|
|
1425
|
+
- Medium (4-6): "Some coordination needed across a few files, but the path is clear."
|
|
1426
|
+
- High (7-10): "Fair bit of depth here - multiple layers to wire up correctly."
|
|
1415
1427
|
|
|
1416
1428
|
TASK INCLUSION RULES:
|
|
1417
1429
|
- DO NOT include migration-related tasks unless the user explicitly requests them
|
|
@@ -1876,7 +1888,7 @@ Note: The search text may have trailing whitespace or CRLF line endings that don
|
|
|
1876
1888
|
`)}formatContextForLLM(r,n,o,l,f){let g=[];if(g.push("# Project Context"),g.push(""),g.push(`**Project:** ${r.name}`),g.push(`**Type:** ${r.projectType}`),g.push(`**Languages:** ${r.languages.join(", ")}`),g.push(""),g.push("## User Request"),g.push(""),g.push(f),g.push(""),g.push("## Affected Areas"),g.push(""),g.push(l.map(v=>`- ${v}`).join(`
|
|
1877
1889
|
`)),g.push(""),!o.isClean&&o.uncommittedChanges.length>0){g.push("## Uncommitted Changes"),g.push(""),g.push(`Branch: ${o.currentBranch}`),g.push(`Files with changes: ${o.uncommittedChanges.length}`);for(let v of o.uncommittedChanges.slice(0,10))g.push(`- ${v}`);o.uncommittedChanges.length>10&&g.push(`- ... and ${o.uncommittedChanges.length-10} more`),g.push("")}g.push("## Relevant Files"),g.push("");for(let v of n.slice(0,20))g.push(`### ${v.path}`),g.push(`- Relevance: ${v.relevanceScore}% - ${v.reason}`),g.push(`- Areas: ${v.areas.join(", ")}`),g.push(`- Last modified: ${v.daysSinceModified} days ago`),g.push("");return g.push("## Directory Structure"),g.push(""),g.push("```"),g.push(r.directoryTree),g.push("```"),g.join(`
|
|
1878
1890
|
`)}},A1e=null});function dee(){return _Le||(_Le=new pee),_Le}function BYr(){return new pee}var OYr,HYr,JYr,mLe,LYr,XYr,QYr,UYr,jYr,AH,pee,_Le,S1e=cr(()=>{"use strict";qo();Pb();cV();RV();uee();_q();OYr=["typo","spelling","fix typo","rename","add log","add comment","update text","change label","fix import","remove unused"],HYr=["help me understand","explain","what does","how does","where is","show me","find","search for","list all","what are"],JYr=["refactor","migrate","redesign","restructure","architecture","breaking","major change","rewrite","overhaul"],mLe=["architecture","redesign","refactor","restructure","migrate","migration","overhaul","rewrite","replace","rearchitect","framework","database","authentication","authorization","security","infrastructure","deploy","microservice","monolith","api","schema","orm","state management"],LYr=["breaking","deprecate","remove","delete","rename","change interface","change api","change signature","incompatible","major version"],XYr=["typo","spelling","comment","log","console","print","debug","style","format","lint","whitespace","indent","color","text","label","tooltip","placeholder","message","string","copy"],QYr=["maybe","possibly","could","might","either","perhaps","not sure","uncertain","unclear","various","different options","multiple ways","best approach","better way","optimal solution","recommended approach","what do you think","your suggestion","advise"],UYr=["create a project","create project","new project","build a project","scaffold","from scratch","implement from","generate project","setup project","initialize project","bootstrap","starter","create an app","create app","build an app","new app","create a cli","create cli","build a cli","based on the following","according to this spec","following spec","implement this","build this","create this","a python program","a program that","a script that","a tool that","write a program","write a script","write a tool","make a program","make a script","make a tool","develop a","build a game","create a game"],jYr=500,AH={scope:{id:"scope",question:"What is the scope of this change?",context:"Understanding the scope helps determine the right approach.",answerType:"single_choice",options:[{id:"minimal",label:"Minimal",description:"Just the specific feature/fix mentioned"},{id:"moderate",label:"Moderate",description:"Include related components and tests"},{id:"comprehensive",label:"Comprehensive",description:"Full implementation with edge cases and documentation"}],category:"scope"},approach:{id:"approach",question:"Which implementation approach do you prefer?",context:"Multiple valid approaches exist for this task.",answerType:"single_choice",options:[{id:"simple",label:"Simple & Direct",description:"Fastest to implement, less flexible",recommended:!0},{id:"flexible",label:"Flexible & Extensible",description:"More abstraction, easier to extend later"},{id:"performant",label:"Performance-focused",description:"Optimized for speed, may be more complex"}],category:"approach"},testing:{id:"testing",question:"What level of testing should be included?",context:"Testing requirements affect implementation time and coverage.",answerType:"single_choice",options:[{id:"none",label:"Skip for now",description:"No tests, implement later"},{id:"unit",label:"Unit tests only",description:"Test individual functions/components"},{id:"integration",label:"Unit + Integration",description:"Full test coverage",recommended:!0}],category:"testing"},existing_data:{id:"existing_data",question:"How should existing data be handled?",context:"This change may affect existing data or state.",answerType:"single_choice",options:[{id:"migrate",label:"Auto-migrate",description:"Automatically migrate existing data"},{id:"manual",label:"Manual migration",description:"Provide migration script to run manually"},{id:"dual",label:"Support both formats",description:"Backwards compatible with old and new"}],category:"data"},feature_flag:{id:"feature_flag",question:"Should this be behind a feature flag?",context:"Feature flags allow gradual rollout and easy rollback.",answerType:"yes_no",category:"deployment"},default_behavior:{id:"default_behavior",question:"Should this new feature be enabled by default?",context:"Affects how existing users experience the change.",answerType:"yes_no",category:"behavior"}},pee=class{classify(r,n){let o=Date.now();ve.debug("Classifying complexity for request");let l=this.analyzeFactors(r,n),f=this.determineMode(l),g=this.calculateConfidence(l,f),v=this.generateReasoning(l,f),E=this.generateQuestions(l,r,n),R=this.estimateEffort(l);return Qo().logComplexityAnalyzed({query:r.substring(0,100),mode:f,confidence:g,factors:Object.entries(l).filter(([,Q])=>Q===!0||typeof Q=="number"&&Q>1).map(([Q])=>Q),duration_ms:Date.now()-o}),{mode:f,factors:l,confidence:g,reasoning:v,potentialQuestions:f==="clarification"?E:void 0,effortEstimate:R}}async classifyWithLLM(r,n,o={}){let l=Date.now(),{fallbackToHeuristic:f=!0}=o;ve.debug("Starting LLM-enhanced complexity classification");let g=this.analyzeFactors(r,n),v=this.determineMode(g),E=this.calculateConfidence(g,v),R=this.generateReasoning(g,v),P=this.generateQuestions(g,r,n),Q=this.estimateEffort(g);try{let M=o.client||await Jb();M.isInitialized()||await M.initialize();let ie=this.buildLLMClassificationPrompt(r,g,v,E,R,n);ve.debug("Calling LLM for complexity classification decision");let pe=await M.sendMessage([{role:"user",content:ie}],{maxTokens:1024,temperature:.1}),me=this.parseLLMResponse(pe.content);if(!me)return ve.warn("Failed to parse LLM classification response, falling back to heuristic"),ve.debug("LLM response content:",pe.content),this.buildHeuristicResult(g,v,E,R,P,Q,l,r,"heuristic_llm_parse_failed");let ct=this.mapLLMMode(me.mode),rt=me.clarificationQuestions?this.mapLLMQuestions(me.clarificationQuestions):P;return Qo().logComplexityAnalyzed({query:r.substring(0,100),mode:ct,confidence:me.confidence,factors:Object.entries(g).filter(([,Hr])=>Hr===!0||typeof Hr=="number"&&Hr>1).map(([Hr])=>Hr),duration_ms:Date.now()-l}),me.agreesWithHeuristic||ve.info(`LLM overrode heuristic: ${v} \u2192 ${ct}. Reason: ${me.reasoning}`),ct==="clarification"&&(ve.debug("LLM CLARIFICATION response:",pe.content),ve.debug("Parsed clarification questions:",{count:rt.length,questions:rt.map(Hr=>({id:Hr.id,question:Hr.question}))})),{mode:ct,factors:g,confidence:me.confidence,reasoning:me.reasoning,potentialQuestions:ct==="clarification"?rt:void 0,effortEstimate:Q,implementationOffer:me.implementationOffer}}catch(M){if(ve.error("LLM classification failed",M),f)return ve.info("Falling back to heuristic classification"),this.buildHeuristicResult(g,v,E,R,P,Q,l,r,"heuristic_llm_error");throw M}}async classifyWithLLMFirst(r,n,o={}){let l=Date.now(),{fallbackToHeuristic:f=!0}=o,g=r.toLowerCase();ve.debug("Starting LLM-first complexity classification");let v=this.checkFastPath(g);if(v)return ve.info(`Fast-path classification: ${v.mode} - ${v.reasoning}`),this.buildFastPathResult(v,l,r);try{let E=o.client||await Jb();E.isInitialized()||await E.initialize();let R=VV(n.projectRoot),P=await R.extractFileSnippets(n.relevantFiles,15,30),Q=R.formatSnippetsForLLM(P),M=v1e.buildLLMFirstClassificationPrompt({userRequest:r,projectType:n.projectType,languages:n.languages.join(", "),fileCount:String(n.relevantFiles.length),fileSnippets:Q||"No code snippets available (new project or no relevant files found)",affectedAreas:n.affectedAreas.join(", ")||"Unknown"});ve.debug("Calling LLM for code-aware complexity classification");let ie=Pv(y1e,{directoryTree:n.directoryTree||"Directory structure not available"}),pe=await E.sendMessage([{role:"user",content:M}],{system:ie,maxTokens:1024,temperature:.1}),me=this.parseLLMFirstResponse(pe.content);if(!me){if(ve.warn("Failed to parse LLM-first classification response, falling back to heuristic"),ve.debug("LLM response content:",pe.content),f)return this.classify(r,n);throw new Error("LLM response parsing failed")}let ct=this.mapLLMMode(me.mode),rt=me.clarificationQuestions?this.mapLLMQuestions(me.clarificationQuestions):[];Qo().logComplexityAnalyzed({query:r.substring(0,100),mode:ct,confidence:me.confidence,factors:["llm_first",`files_relevant: ${me.filesActuallyRelevant}`],duration_ms:Date.now()-l}),ve.info(`LLM-first classification: ${ct} (${me.confidence}% confidence). ${me.filesActuallyRelevant}/${n.relevantFiles.length} files actually relevant. Reason: ${me.reasoning}`),ct==="clarification"&&(ve.debug("LLM CLARIFICATION response:",pe.content),ve.debug("Parsed clarification questions:",{count:rt.length,questions:rt.map(Lr=>({id:Lr.id,question:Lr.question}))})),ct==="no_action"&&ve.info("LLM NO_ACTION response:",{explanation:me.noActionExplanation,followUp:me.noActionFollowUp});let Hr=this.generateMinimalFactors(me,n);return{mode:ct,factors:Hr,confidence:me.confidence,reasoning:me.reasoning,potentialQuestions:ct==="clarification"?rt:void 0,effortEstimate:this.estimateEffort(Hr),implementationOffer:me.implementationOffer,noActionExplanation:me.noActionExplanation,noActionFollowUp:me.noActionFollowUp}}catch(E){if(ve.error("LLM-first classification failed",E),f)return ve.info("Falling back to heuristic classification"),this.classify(r,n);throw E}}checkFastPath(r){let n=r.split(/\s+/).length;return JYr.some(o=>r.includes(o))||r.length>100||n>20||r.includes("?")?null:HYr.some(o=>r.includes(o))?{mode:"direct",reasoning:"Informational request - no code changes needed"}:n<=10&&OYr.some(o=>r.includes(o))?{mode:"direct",reasoning:"Simple, focused change with clear intent"}:null}buildFastPathResult(r,n,o){return Qo().logComplexityAnalyzed({query:o.substring(0,100),mode:r.mode,confidence:90,factors:["fast_path"],duration_ms:Date.now()-n}),{mode:r.mode,factors:{filesAffected:1,linesChanged:10,createsAbstractions:!1,architecturalChange:!1,breakingChanges:!1,crossCuttingConcerns:!1,requirementsClear:!0,implementationApproaches:1,requiresMigration:!1,riskLevel:1,contextSufficiency:"high"},confidence:90,reasoning:`[Fast-path] ${r.reasoning}`,effortEstimate:"Quick change (few minutes)"}}parseLLMFirstResponse(r){try{let n=r.match(/```(?:json)?\s*([\s\S]*?)```/),o=n?n[1].trim():r.trim(),l=JSON.parse(o);return!l.mode||typeof l.confidence!="number"||!l.reasoning?(ve.warn("LLM-first response missing required fields",{hasMode:!!l.mode,confidenceType:typeof l.confidence,hasReasoning:!!l.reasoning}),null):["NO_ACTION","DIRECT","CLARIFICATION","TODO_LIST","PLAN","PLAN_ADOPT"].includes(l.mode)?l:(ve.warn(`Invalid mode in LLM-first response: ${l.mode}`),null)}catch(n){return ve.error("Failed to parse LLM-first classification response",n),null}}generateMinimalFactors(r,n){let o=r.mode,l={DIRECT:50,CLARIFICATION:100,TODO_LIST:150,PLAN:300,PLAN_ADOPT:300},f={DIRECT:2,CLARIFICATION:4,TODO_LIST:5,PLAN:6,PLAN_ADOPT:6},g=n.relevantFiles.filter(E=>E.relevanceScore>=70).length>=1,v=o==="DIRECT"?"high":o==="TODO_LIST"?g?"high":"medium":o==="CLARIFICATION"?"low":"medium";return{filesAffected:r.filesActuallyRelevant||n.relevantFiles.length,linesChanged:l[o]||150,createsAbstractions:o==="PLAN"||o==="PLAN_ADOPT",architecturalChange:o==="PLAN"||o==="PLAN_ADOPT",breakingChanges:!1,crossCuttingConcerns:n.affectedAreas.length>=3,requirementsClear:o!=="CLARIFICATION",implementationApproaches:o==="CLARIFICATION"?2:1,requiresMigration:!1,riskLevel:f[o]||5,contextSufficiency:v}}buildLLMClassificationPrompt(r,n,o,l,f,g){let v=g.relevantFiles.filter(E=>E.relevanceScore>=40).slice(0,10).map(E=>`${E.path} (relevance: ${E.relevanceScore}%)`).join(", ")||"None identified";return v1e.buildLLMComplexityClassificationPrompt({userRequest:r,filesAffected:String(n.filesAffected),linesChanged:String(n.linesChanged),requirementsClear:String(n.requirementsClear),contextSufficiency:n.contextSufficiency,architecturalChange:String(n.architecturalChange),breakingChanges:String(n.breakingChanges),crossCuttingConcerns:String(n.crossCuttingConcerns),createsAbstractions:String(n.createsAbstractions),requiresMigration:String(n.requiresMigration),implementationApproaches:String(n.implementationApproaches),riskLevel:String(n.riskLevel),heuristicMode:o.toUpperCase(),heuristicConfidence:String(l),heuristicReasoning:f,affectedAreas:g.affectedAreas.join(", ")||"Unknown",relevantFiles:v})}parseLLMResponse(r){try{let n=r.match(/```(?:json)?\s*([\s\S]*?)```/),o=n?n[1].trim():r.trim(),l=JSON.parse(o);return!l.mode||typeof l.confidence!="number"||!l.reasoning?(ve.warn("LLM response missing required fields",{hasMode:!!l.mode,confidenceType:typeof l.confidence,hasReasoning:!!l.reasoning}),null):["NO_ACTION","DIRECT","CLARIFICATION","TODO_LIST","PLAN","PLAN_ADOPT"].includes(l.mode)?l:(ve.warn(`Invalid mode in LLM response: ${l.mode}`),null)}catch(n){return ve.error("Failed to parse LLM classification response",n),null}}mapLLMMode(r){switch(r.toUpperCase()){case"NO_ACTION":return"no_action";case"DIRECT":return"direct";case"CLARIFICATION":return"clarification";case"TODO_LIST":return"todo_list";case"PLAN":return"plan";case"PLAN_ADOPT":return"plan_adopt";default:return"plan"}}mapLLMQuestions(r){return r.map(n=>{let o;n.answerType?o=n.answerType:n.options&&n.options.length>0?o="single_choice":o="free_text";let l=n.options?.map(f=>({id:f.id,label:f.label,description:f.description||f.label,recommended:f.recommended}));return{id:n.id,question:n.question,context:n.context,answerType:o,options:l,category:n.category}})}buildHeuristicResult(r,n,o,l,f,g,v,E,R){return Qo().logComplexityAnalyzed({query:E.substring(0,100),mode:n,confidence:o,factors:Object.entries(r).filter(([,Q])=>Q===!0||typeof Q=="number"&&Q>1).map(([Q])=>Q),duration_ms:Date.now()-v}),ve.debug(`Using ${R} classification: ${n}`),{mode:n,factors:r,confidence:o,reasoning:`[Heuristic] ${l}`,potentialQuestions:n==="clarification"?f:void 0,effortEstimate:g}}analyzeFactors(r,n){let o=r.toLowerCase(),l=this.detectsProjectCreation(o),f=r.length>=jYr,g=this.estimateFilesAffected(n);(l||g===0&&f)&&(g=this.estimateFilesFromRequest(o));let v=this.estimateLinesChanged(r,n);l&&(v=Math.max(v,200)),f&&(v=Math.max(v,100));let E=this.detectsAbstractionCreation(o),R=this.detectsArchitecturalChange(o,n);l&&(R=!0);let P=this.detectsBreakingChanges(o),Q=this.detectsCrossCuttingConcerns(n),M=this.assessRequirementClarity(o),ie=this.countImplementationApproaches(o,n);f&&ie===1&&(ie=2);let pe=this.detectsMigrationNeed(o,n),me=this.calculateRiskLevel(g,R,P,Q);l&&(me=Math.max(me,5));let ct=this.calculateContextSufficiency(n,M);return{filesAffected:g,linesChanged:v,createsAbstractions:E,architecturalChange:R,breakingChanges:P,crossCuttingConcerns:Q,requirementsClear:M,implementationApproaches:ie,requiresMigration:pe,riskLevel:me,contextSufficiency:ct}}calculateContextSufficiency(r,n){let o=0,l=r.relevantFiles.filter(g=>g.relevanceScore>=70),f=r.relevantFiles.filter(g=>g.relevanceScore>=40&&g.relevanceScore<70);return l.length>=3?o+=3:l.length>=1&&(o+=2),f.length>=2&&(o+=1),r.totalTokens>=2e3?o+=2:r.totalTokens>=500&&(o+=1),n&&(o+=2),r.affectedAreas.length>=1&&r.affectedAreas[0]!=="unknown"&&(o+=1),r.formattedContext&&r.formattedContext.length>500&&(o+=1),o>=7?"high":o>=4?"medium":"low"}detectsProjectCreation(r){return UYr.some(n=>r.includes(n))}estimateFilesFromRequest(r){let n=0,o=[".ts",".js",".tsx",".jsx",".py",".go",".rs",".java",".css",".scss",".html",".json",".yaml",".yml",".md"];for(let f of o){let g=r.match(new RegExp(`\\${f}`,"gi"))||[];n+=g.length}let l=[/\bcomponent\b/gi,/\bmodule\b/gi,/\bservice\b/gi,/\bcontroller\b/gi,/\bmodel\b/gi,/\bview\b/gi,/\broute\b/gi,/\bapi\b/gi,/\bendpoint\b/gi,/\bpage\b/gi,/\bscreen\b/gi,/\butil\b/gi,/\bhelper\b/gi,/\btest\b/gi];for(let f of l){let g=r.match(f)||[];n+=Math.ceil(g.length/2)}return Math.max(n,5)}estimateFilesAffected(r){let n=r.relevantFiles.filter(l=>l.relevanceScore>=50).length,o=r.relevantFiles.filter(l=>l.relevanceScore>=30&&l.relevanceScore<50).length;return n+Math.ceil(o/2)}estimateLinesChanged(r,n){let o=r.toLowerCase();if(XYr.some(f=>o.includes(f)))return 10;if(mLe.some(f=>o.includes(f)))return 500;let l=n.relevantFiles.filter(f=>f.relevanceScore>=40).length;return Math.max(20,l*30)}detectsAbstractionCreation(r){return["abstract","interface","base class","generic","factory","pattern","wrapper","adapter","decorator","strategy","plugin","hook","middleware","provider","context"].some(o=>r.includes(o))}detectsArchitecturalChange(r,n){if(mLe.some(f=>r.includes(f)))return!0;let o=["backend","api","database","ui"];return n.affectedAreas.filter(f=>o.includes(f)).length>=2}detectsBreakingChanges(r){return LYr.some(n=>r.includes(n))}detectsCrossCuttingConcerns(r){let n=new Set(r.affectedAreas);return n.delete("unknown"),n.size>=3}assessRequirementClarity(r){let n=QYr.some(g=>r.includes(g)),o=/\d+/.test(r)||/`[^`]+`/.test(r)||/["'][^"']+["']/.test(r),f=r.split(/\s+/).length<5;return!n&&(o||!f)}countImplementationApproaches(r,n){let o=1,l=r.includes("library")||r.includes("package"),f=/\b(only|must use|use .+ only|with .+ library)\b/i.test(r);return l&&!f&&(o+=1),n.affectedAreas.length>2&&(o+=1),mLe.some(v=>r.includes(v))&&(o+=2),[/which (library|framework|approach|method)/i,/choose between/i,/\bor\b.*\bor\b/i,/option[s]?\s*[:]/i].some(v=>v.test(r))&&(o+=1),o}detectsMigrationNeed(r,n){return["migrate","migration","upgrade","convert","transform","schema"].some(l=>r.includes(l))?!0:n.affectedAreas.includes("database")}calculateRiskLevel(r,n,o,l){let f=1;return r>10?f+=2:r>5&&(f+=1),n&&(f+=3),o&&(f+=3),l&&(f+=1),Math.min(10,f)}determineMode(r){let n=r.contextSufficiency==="high",o=r.contextSufficiency==="medium"||n;if(r.filesAffected<=3&&r.linesChanged<=50&&!r.createsAbstractions&&!r.architecturalChange&&!r.breakingChanges&&r.requirementsClear&&r.implementationApproaches===1&&r.riskLevel<=3)return"direct";let f=r.filesAffected<=1,g=r.filesAffected>=2&&r.filesAffected<=8&&r.linesChanged>=30&&r.linesChanged<=200&&!r.architecturalChange&&!r.breakingChanges&&(r.requirementsClear||o)&&r.riskLevel<=6;if(!f&&g&&o)return"todo_list";let v=!r.requirementsClear&&!n||r.implementationApproaches>2||r.filesAffected>=4&&r.filesAffected<=8&&!r.architecturalChange&&!o;return f&&!r.requirementsClear&&!r.breakingChanges?"clarification":v&&!r.breakingChanges&&!r.architecturalChange?"clarification":g?"todo_list":"plan"}calculateConfidence(r,n){let o=60;return n==="plan"?(r.architecturalChange&&(o+=20),r.filesAffected>=5?o+=15:r.filesAffected>=3&&(o+=10),r.linesChanged>=200&&(o+=10),r.riskLevel>=5&&(o+=10),r.breakingChanges&&(o+=15),r.crossCuttingConcerns&&(o+=10),r.implementationApproaches>1&&(o+=5*r.implementationApproaches),r.requirementsClear||(o+=5)):n==="direct"?(r.requirementsClear&&(o+=15),r.implementationApproaches===1&&(o+=10),r.riskLevel<=3&&(o+=10),r.filesAffected<=2&&(o+=10),r.linesChanged<=30&&(o+=5)):n==="todo_list"?(r.requirementsClear&&(o+=15),r.filesAffected>=2&&r.filesAffected<=8&&(o+=10),r.riskLevel<=6&&(o+=10),r.architecturalChange||(o+=10),r.implementationApproaches===1&&(o+=5),r.contextSufficiency==="high"?o+=15:r.contextSufficiency==="medium"&&(o+=10)):(r.requirementsClear||(o+=15),r.implementationApproaches>2&&(o+=10),r.contextSufficiency==="high"?o-=10:r.contextSufficiency==="medium"&&(o-=5)),Math.max(30,Math.min(95,o))}generateReasoning(r,n){let o=[];switch(n){case"direct":o.push("This is a simple, focused change"),o.push(`Affects ${r.filesAffected} file(s)`),r.requirementsClear&&o.push("Requirements are clear and unambiguous");break;case"clarification":r.requirementsClear||o.push("Requirements need clarification"),r.implementationApproaches>1&&o.push(`${r.implementationApproaches} valid approaches identified`),o.push("A few questions will help determine the best approach");break;case"todo_list":o.push("This is a medium complexity task with clear requirements"),o.push(`Affects ${r.filesAffected} file(s)`),r.requirementsClear&&o.push("Requirements are clear"),o.push("A simple to-do list will help track progress");break;case"plan":r.filesAffected>8&&o.push(`Significant scope: ${r.filesAffected}+ files affected`),r.architecturalChange&&o.push("Involves architectural changes"),r.breakingChanges&&o.push("May introduce breaking changes"),r.crossCuttingConcerns&&o.push("Affects multiple subsystems"),r.requiresMigration&&o.push("Requires data migration"),o.push("A detailed plan is recommended before implementation");break}return o.join(". ")+"."}generateQuestions(r,n,o){let l=[],f=n.toLowerCase();return r.requirementsClear||l.push(AH.scope),r.implementationApproaches>1&&l.push(AH.approach),r.filesAffected>=2&&!f.includes("test")&&l.push(AH.testing),(o.affectedAreas.includes("database")||r.requiresMigration)&&l.push(AH.existing_data),(o.affectedAreas.includes("ui")||o.affectedAreas.includes("api"))&&r.riskLevel>=5&&l.push(AH.feature_flag),(f.includes("add")||f.includes("new")||f.includes("feature"))&&l.push(AH.default_behavior),l.slice(0,5)}estimateEffort(r){let{filesAffected:n,linesChanged:o,riskLevel:l,architecturalChange:f}=r;return n<=2&&o<=30?"Quick change (few minutes)":n<=5&&o<=100&&l<=4?"Small task (under an hour)":n<=10&&o<=300&&!f?"Medium task (a few hours)":f||l>=7?"Large task requiring careful planning":"Moderate task (half day or more)"}},_Le=null});function Eg(i,r){i&&Fa().emit("tool-status-message",{toolId:i,message:r})}function zYr(){return jJe}function qYr(i,r,n,o){let l=[];if(l.push("## User Request"),l.push(i),l.push(""),l.push("## Project Context"),l.push(`**Project Root:** ${r.projectRoot}`),l.push(`**Project Type:** ${r.projectType||"unknown"}`),l.push(`**Languages:** ${r.languages.join(", ")||"unknown"}`),l.push(""),r.directoryTree&&(l.push("### Directory Structure"),l.push("```"),l.push(r.directoryTree.substring(0,2e3)),l.push("```"),l.push("")),r.relevantFiles.length>0){l.push("### Relevant Files");for(let f of r.relevantFiles.slice(0,15))l.push(`- \`${f.path}\` (${f.reason})`);l.push("")}if(r.affectedAreas.length>0&&(l.push("### Affected Areas"),l.push(r.affectedAreas.join(", ")),l.push("")),l.push("## Complexity Assessment"),l.push(`- **Mode:** ${n.mode}`),l.push(`- **Confidence:** ${n.confidence}%`),l.push(`- **Files Affected:** ${n.factors.filesAffected}`),l.push(`- **Architectural Change:** ${n.factors.architecturalChange}`),l.push(`- **Breaking Changes:** ${n.factors.breakingChanges}`),l.push(`- **Risk Level:** ${n.factors.riskLevel}/10`),l.push(`- **Reasoning:** ${n.reasoning}`),l.push(""),o&&o.qaRecords.length>0){l.push("## User Clarifications");for(let f of o.qaRecords){l.push(`**Q:** ${f.question.question}`);let g=Array.isArray(f.answer.answer)?f.answer.answer.join(", "):f.answer.answer;l.push(`**A:** ${g}`),l.push("")}}return r.gitContext&&(l.push("## Git Context"),l.push(`- **Current Branch:** ${r.gitContext.currentBranch}`),l.push(`- **Working Directory Clean:** ${r.gitContext.isClean}`),r.gitContext.uncommittedChanges.length>0&&l.push(`- **Uncommitted Changes:** ${r.gitContext.uncommittedChanges.length} files`),l.push("")),l.push("## Task"),l.push("Generate a detailed implementation plan as JSON matching this schema:"),l.push("```json"),l.push(ree),l.push("```"),l.push(""),l.push("Requirements:"),l.push("- Create 3-10 specific, actionable tasks"),l.push("- Each task should target specific files from this project"),l.push("- Include realistic task dependencies"),l.push("- Identify concrete risks with mitigations specific to this codebase"),l.push("- Be specific to THIS request - do not use generic placeholders"),l.push("- File paths should be relative to the project root"),l.push(""),l.push("Respond with ONLY the JSON object, no other text."),l.join(`
|
|
1879
|
-
`)}function hLe(i){let r=i.trim();return r.startsWith("```json")?r=r.slice(7):r.startsWith("```")&&(r=r.slice(3)),r.endsWith("```")&&(r=r.slice(0,-3)),r=r.trim(),JSON.parse(r)}function gLe(i,r){let n=Qa(),o=new Date().toISOString(),l=(i.tasks||[]).map((M,ie)=>({id:M.id||`task-${Qa().slice(0,8)}`,order:M.order||ie+1,description:M.description||"No description",targetFiles:M.targetFiles||[],targetElements:M.targetElements||[],changes:M.changes||"",dependencies:M.dependencies||[],verificationCriteria:M.verificationCriteria||[],complexity:M.complexity||5,requirementRefs:M.requirementRefs||[]})),f=(i.requirements||[]).map(M=>({id:M.id||`req-${Qa().slice(0,8)}`,description:M.description||r,priority:M.priority||1,source:M.source||"user"}));f.length===0&&f.push({id:`req-${Qa().slice(0,8)}`,description:r,priority:1,source:"user"});let g=(i.edgeCases||[]).map(M=>({description:M.description||"",handling:M.handling||"",risk:M.risk||"medium"})),v=(i.risks||[]).map(M=>({description:M.description||"",severity:M.severity||"medium",mitigation:M.mitigation||"",rollback:M.rollback})),E=(i.impact?.fileOperations||[]).map(M=>({path:M.path||"",operation:M.operation||"create",changes:M.changes})),R=i.totalComplexity||Math.round(l.reduce((M,ie)=>M+ie.complexity,0)/Math.max(l.length,1)),P=i.summary||`Plan with ${l.length} tasks, ${v.length} risks identified. Total complexity: ${R}/10`,Q=i.title||(i.problemStatement?i.problemStatement.split(/[.!?\n]/)[0].trim().substring(0,80):r.split(/[.!?\n]/)[0].trim().substring(0,80));return{id:n,createdAt:o,version:1,title:Q,problemStatement:i.problemStatement||r,requirements:f,edgeCases:g,constraints:i.constraints||[],assumptions:i.assumptions||[],impact:{fileOperations:E,dependenciesAffected:i.impact?.dependenciesAffected||[],breakingChanges:i.impact?.breakingChanges||[],migrations:i.impact?.migrations},tasks:l,risks:v,testing:{unitTests:i.testing?.unitTests||[],integrationTests:i.testing?.integrationTests||[],testFiles:i.testing?.testFiles||[]},rollbackStrategy:i.rollbackStrategy||"Use git to revert changes",totalComplexity:R,summary:P}}async function x8t(i,r,n,o,l){ve.info("Generating implementation plan with LLM",{projectType:r.projectType,complexityMode:n.mode,relevantFiles:r.relevantFiles.length});let f=Date.now();try{Eg(l,"Initializing plan generation...");let g=await Jb();g.isInitialized()||await g.initialize(),Eg(l,"Analyzing project context...");let v=zYr(),E=qYr(i,r,n,o);Eg(l,"Generating plan...");let R=new fee,P="";for await(let pe of g.streamMessage([{role:"user",content:E}],{system:v,maxTokens:8192,temperature:.5}))if(pe.type==="text"&&pe.content){P+=pe.content;let me=R.update(pe.content);me&&Eg(l,me)}else if(pe.type==="error")throw new Error(pe.error||"Unknown streaming error");ve.debug("LLM plan generation response received",{contentLength:P.length,summary:R.getSummary()}),Eg(l,"Parsing plan...");let Q=hLe(P);Eg(l,"Validating plan structure...");let M=gLe(Q,i),ie=Date.now()-f;return ve.info("Plan generated successfully",{planId:M.id,taskCount:M.tasks.length,riskCount:M.risks.length,totalComplexity:M.totalComplexity,duration:`${ie}ms`}),M}catch(g){let v=g instanceof Error?g.message:String(g);return ve.error("Failed to generate plan with LLM",{error:v}),$Yr(i,r,n,v)}}function $Yr(i,r,n,o){ve.warn("Creating fallback plan due to LLM error",{errorReason:o});let l=Qa(),f=new Date().toISOString();return{id:l,createdAt:f,version:1,title:i.split(/[.!?\n]/)[0].trim().substring(0,80)||"Implementation Plan",problemStatement:`${i}
|
|
1891
|
+
`)}function hLe(i){let r=i.trim();return r.startsWith("```json")?r=r.slice(7):r.startsWith("```")&&(r=r.slice(3)),r.endsWith("```")&&(r=r.slice(0,-3)),r=r.trim(),JSON.parse(r)}function gLe(i,r){let n=Qa(),o=new Date().toISOString(),l=(i.tasks||[]).map((M,ie)=>({id:M.id||`task-${Qa().slice(0,8)}`,order:M.order||ie+1,description:M.description||"No description",targetFiles:M.targetFiles||[],targetElements:M.targetElements||[],changes:M.changes||"",dependencies:M.dependencies||[],verificationCriteria:M.verificationCriteria||[],complexity:M.complexity||5,requirementRefs:M.requirementRefs||[]})),f=(i.requirements||[]).map(M=>({id:M.id||`req-${Qa().slice(0,8)}`,description:M.description||r,priority:M.priority||1,source:M.source||"user"}));f.length===0&&f.push({id:`req-${Qa().slice(0,8)}`,description:r,priority:1,source:"user"});let g=(i.edgeCases||[]).map(M=>({description:M.description||"",handling:M.handling||"",risk:M.risk||"medium"})),v=(i.risks||[]).map(M=>({description:M.description||"",severity:M.severity||"medium",mitigation:M.mitigation||"",rollback:M.rollback})),E=(i.impact?.fileOperations||[]).map(M=>({path:M.path||"",operation:M.operation||"create",changes:M.changes})),R=i.totalComplexity||Math.round(l.reduce((M,ie)=>M+ie.complexity,0)/Math.max(l.length,1)),P=i.summary||`Plan with ${l.length} tasks, ${v.length} risks identified. Total complexity: ${R}/10`,Q=i.title||(i.problemStatement?i.problemStatement.split(/[.!?\n]/)[0].trim().substring(0,80):r.split(/[.!?\n]/)[0].trim().substring(0,80));return{id:n,createdAt:o,version:1,title:Q,problemStatement:i.problemStatement||r,requirements:f,edgeCases:g,constraints:i.constraints||[],assumptions:i.assumptions||[],impact:{fileOperations:E,dependenciesAffected:i.impact?.dependenciesAffected||[],breakingChanges:i.impact?.breakingChanges||[],migrations:i.impact?.migrations},tasks:l,risks:v,testing:{unitTests:i.testing?.unitTests||[],integrationTests:i.testing?.integrationTests||[],testFiles:i.testing?.testFiles||[]},rollbackStrategy:i.rollbackStrategy||"Use git to revert changes",totalComplexity:R,complexityNote:i.complexityNote,summary:P}}async function x8t(i,r,n,o,l){ve.info("Generating implementation plan with LLM",{projectType:r.projectType,complexityMode:n.mode,relevantFiles:r.relevantFiles.length});let f=Date.now();try{Eg(l,"Initializing plan generation...");let g=await Jb();g.isInitialized()||await g.initialize(),Eg(l,"Analyzing project context...");let v=zYr(),E=qYr(i,r,n,o);Eg(l,"Generating plan...");let R=new fee,P="";for await(let pe of g.streamMessage([{role:"user",content:E}],{system:v,maxTokens:8192,temperature:.5}))if(pe.type==="text"&&pe.content){P+=pe.content;let me=R.update(pe.content);me&&Eg(l,me)}else if(pe.type==="error")throw new Error(pe.error||"Unknown streaming error");ve.debug("LLM plan generation response received",{contentLength:P.length,summary:R.getSummary()}),Eg(l,"Parsing plan...");let Q=hLe(P);Eg(l,"Validating plan structure...");let M=gLe(Q,i),ie=Date.now()-f;return ve.info("Plan generated successfully",{planId:M.id,taskCount:M.tasks.length,riskCount:M.risks.length,totalComplexity:M.totalComplexity,duration:`${ie}ms`}),M}catch(g){let v=g instanceof Error?g.message:String(g);return ve.error("Failed to generate plan with LLM",{error:v}),$Yr(i,r,n,v)}}function $Yr(i,r,n,o){ve.warn("Creating fallback plan due to LLM error",{errorReason:o});let l=Qa(),f=new Date().toISOString();return{id:l,createdAt:f,version:1,title:i.split(/[.!?\n]/)[0].trim().substring(0,80)||"Implementation Plan",problemStatement:`${i}
|
|
1880
1892
|
|
|
1881
1893
|
[Note: LLM plan generation failed: ${o}. This is a basic fallback plan.]`,requirements:[{id:`req-${Qa().slice(0,8)}`,description:i,priority:1,source:"user"}],edgeCases:[],constraints:[`Project type: ${r.projectType||"unknown"}`],assumptions:["Development environment is properly configured"],impact:{fileOperations:[],dependenciesAffected:[],breakingChanges:[]},tasks:[{id:`task-${Qa().slice(0,8)}`,order:1,description:"Analyze requirements and existing codebase",targetFiles:r.relevantFiles.slice(0,5).map(g=>g.path),targetElements:[],changes:"Review existing code patterns and plan implementation",dependencies:[],verificationCriteria:["Requirements understood"],complexity:3,requirementRefs:[]},{id:`task-${Qa().slice(0,8)}`,order:2,description:"Implement the requested functionality",targetFiles:[],targetElements:[],changes:i,dependencies:[],verificationCriteria:["Functionality works as expected"],complexity:n.factors.filesAffected>5?7:5,requirementRefs:[]},{id:`task-${Qa().slice(0,8)}`,order:3,description:"Test and verify implementation",targetFiles:[],targetElements:[],changes:"Write tests and verify functionality",dependencies:[],verificationCriteria:["All tests pass"],complexity:3,requirementRefs:[]}],risks:[{description:"LLM plan generation failed - using basic fallback plan",severity:"medium",mitigation:"Proceed carefully and verify each step manually",rollback:"Use git to revert changes if needed"}],testing:{unitTests:["Test new functionality"],integrationTests:[],testFiles:[]},rollbackStrategy:"Use git to revert all changes",totalComplexity:n.factors.riskLevel,summary:`Fallback plan for: ${i.substring(0,100)}...`}}function KYr(i,r,n){let o=[];if(o.push("## User-Provided Plan"),o.push("The following is the user's structured plan. PRESERVE this structure:"),o.push(""),o.push(i),o.push(""),n&&(o.push("## Detected Structure"),o.push(n),o.push("")),o.push("## Project Context (use to enrich the plan)"),o.push(`**Project Root:** ${r.projectRoot}`),o.push(`**Project Type:** ${r.projectType||"unknown"}`),o.push(`**Languages:** ${r.languages.join(", ")||"unknown"}`),o.push(""),r.directoryTree&&(o.push("### Directory Structure"),o.push("```"),o.push(r.directoryTree.substring(0,2e3)),o.push("```"),o.push("")),r.relevantFiles.length>0){o.push("### Relevant Files (use to populate targetFiles)");for(let l of r.relevantFiles.slice(0,15))o.push(`- \`${l.path}\` (${l.reason})`);o.push("")}return r.affectedAreas.length>0&&(o.push("### Affected Areas"),o.push(r.affectedAreas.join(", ")),o.push("")),r.gitContext&&(o.push("## Git Context"),o.push(`- **Current Branch:** ${r.gitContext.currentBranch}`),o.push(`- **Working Directory Clean:** ${r.gitContext.isClean}`),o.push("")),o.push("## Your Task"),o.push("Convert the user's plan above into valid JSON matching this schema:"),o.push("```json"),o.push(ree),o.push("```"),o.push(""),o.push("REMEMBER:"),o.push("- PRESERVE the user's task descriptions and order"),o.push("- ADD technical details (IDs, file paths, dependencies, complexity scores)"),o.push("- DO NOT add, remove, or restructure tasks"),o.push("- Use project context to populate targetFiles accurately"),o.push(""),o.push("Respond with ONLY the JSON object, no other text."),o.join(`
|
|
1882
1894
|
`)}async function w8t(i,r,n,o){ve.info("Adopting user-provided plan with LLM enrichment",{projectType:r.projectType,planLength:i.length,relevantFiles:r.relevantFiles.length});let l=Date.now();try{Eg(o,"Initializing plan adoption...");let f=await Jb();f.isInitialized()||await f.initialize(),Eg(o,"Validating user plan structure...");let g=BJe,v=KYr(i,r,n);Eg(o,"Enriching plan with technical details...");let E=new fee,R="";for await(let ie of f.streamMessage([{role:"user",content:v}],{system:g,maxTokens:8192,temperature:.3}))if(ie.type==="text"&&ie.content){R+=ie.content;let pe=E.update(ie.content);pe&&Eg(o,pe)}else if(ie.type==="error")throw new Error(ie.error||"Unknown streaming error");ve.debug("LLM plan adoption response received",{contentLength:R.length,summary:E.getSummary()}),Eg(o,"Parsing adopted plan...");let P=hLe(R);Eg(o,"Validating plan structure...");let Q=gLe(P,i),M=Date.now()-l;return ve.info("Plan adopted successfully",{planId:Q.id,taskCount:Q.tasks.length,totalComplexity:Q.totalComplexity,duration:`${M}ms`}),Q}catch(f){let g=f instanceof Error?f.message:String(f);return ve.error("Failed to adopt plan with LLM",{error:g}),eOr(i,r,g)}}function eOr(i,r,n){ve.warn("Creating adoption fallback plan due to LLM error",{errorReason:n});let o=Qa(),l=new Date().toISOString(),f=i.split(`
|
|
@@ -2370,7 +2382,7 @@ ${r}`),o.push({role:"user",content:v}),o}estimateTaskTokens(r,n,o){let l=Qd(r);f
|
|
|
2370
2382
|
`)}W3();var rBe=[{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"]}]}],uun=[{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 UHt(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(`
|
|
2371
2383
|
`)}function pun(){try{let{getCustomCommands:i}=(QHt(),ivr(XHt)),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 dun(){let i=[...rBe],r=pun();r&&i.push(r);let n=i.map(UHt);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(`
|
|
2372
2384
|
`)}function fun(i){let r=i.startsWith("/")?i:`/${i}`,o=rBe.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(`
|
|
2373
|
-
`)}RV();var iDn="1.0.
|
|
2385
|
+
`)}RV();var iDn="1.0.25",sDn="compass-cli",aDn="AI-powered development assistance using Anthropic's Claude models";export{jfe as AGENT_SOURCE_PRIORITY,aDn as APP_DESCRIPTION,Uvr as APP_DISPLAY_NAME,sDn as APP_NAME,jvr as APP_TAGLINE,Qvr as APP_VERSION,ZHt as ASCII_BANNER,LVe as AUTO_COMPACT_TRIGGER,UVe as AUTO_SAVE_INTERVAL_MS,iee as ActionLogger,t8t as ActionStatus,Z4 as ActionType,The as AnthropicClient,n_e as ApprovalManager,yY as ApprovalMode,MVe as BACKUPS_DIR,XVe as BACKUP_RETENTION_DAYS,qvr as BINARY_EXTENSIONS,s_e as BackupManager,Nvr as CACHE_DIR,xw as CLAUDE_MODELS,uun as CLI_COMMANDS,jln as COMPASS_ICON,xY as CONFIG_FILE_NAME,QVe as CONSENT_EXPIRY_DAYS,DVe as CONSENT_FILE_NAME,Bvr as CONSENT_VERSION,kvr as CONTEXT_DIR,Pvr as CONTEXT_WINDOW_SAFETY_MARGIN,Fvr as CONTEXT_WINDOW_WARNING_PERCENT,yq as CREDENTIALS_FILE_NAME,pee as ComplexityClassifier,Ome as ConfigManager,Ume as ConsentManager,qme as CredentialStore,vE as DEFAULT_CONFIG,Rvr as DEFAULT_COST_WARNING_THRESHOLD,eN as DEFAULT_MAX_TOKENS,a4 as DEFAULT_MODEL,Evr as DEFAULT_RATING_CONFIG,AY as DEFAULT_TEMPERATURE,gvr as DEFAULT_UPDATE_CONFIG,o4 as ENV_VARS,lee as EnhancedContextGatherer,Xme as EventEmitter,mq as ExecutionMode,gWt as ExecutionStrategy,gq as GLOBAL_COMPASS_DIR,nK as GitService,wve as HistoryManager,YVe as INDEX_DIR,vte as InteractiveClarifier,_Wt as IssueCategory,mWt as IssueSeverity,zvr as LANGUAGE_EXTENSIONS,PVe as LOGS_DIR,gee as LogInterpreter,Yvr as MAX_CACHE_SIZE_BYTES,bq as MAX_COMMAND_OUTPUT_TOKENS,Vvr as MAX_FILES_PER_OPERATION,jVe as MAX_FILE_READ_TOKENS,Zvr as MAX_FILE_SIZE_BYTES,Kfe as MAX_HISTORY_LENGTH,Mvr as MAX_INDEXED_FILES,Hvr as MAX_RETRY_ATTEMPTS,Dvr as MAX_SEARCH_RESULT_TOKENS,hq as MODEL_ALIASES,Iq as PROJECT_COMPASS_DIR,xte as PlanGenerator,Jvr as RETRY_BASE_DELAY_MS,Xvr as RETRY_JITTER_FACTOR,Lvr as RETRY_MAX_DELAY_MS,wY as SAVED_SESSIONS_DIR,Wvr as SESSION_EXPIRY_DAYS,qfe as SESSION_FILE_NAME,$fe as SHELL_COMMAND_TIMEOUT_MS,rBe as SLASH_COMMANDS,Kme as SessionManager,Vge as ShellExecutor,qRt as StepStatus,nee as StepTracker,$Rt as StepType,JVe as TOKEN_WARNING_THRESHOLD,qVe as TOOL_READ_BLOCKLIST_DIRS,zVe as TOOL_READ_BLOCKLIST_PATTERNS,FVe as TaskExecutionStatus,KRt as TaskStatus,r_e as TokenTracker,see as ToolRegistry,iDn as VERSION,wte as Verifier,XJe as WORKFLOW_PROMPTS,Iee as WorkflowManager,Ate as WorkflowOrchestrator,Ufe as WorkflowPhase,hWt as WorkflowState,Xln as applyCompletion,pDr as applyPatch,lDr as areIdentical,fYr as calculateContextUsagePercent,CIt as calculateModelCost,uYr as calculateRemainingTokens,c6r as colorByStatus,aDr as colorizeDiff,Gvr as compareAgentPriority,TIt as compareModels,EE as copy,vYr as createActionLogger,BYr as createComplexityClassifier,Avr as createDefaultAgentDefinition,mvr as createDefaultConsent,Cvr as createDefaultRatingState,YYr as createEnhancedContextGatherer,_vr as createFullConsent,ykr as createGitService,xln as createInteractiveClarifier,EOr as createLogInterpreter,hvr as createMinimalConsent,Aln as createPlanGenerator,bYr as createStepTracker,xYr as createToolRegistry,Gln as createVerifier,TOr as createWorkflowManager,Cln as createWorkflowOrchestrator,lDe as decrypt,cDe as encrypt,mu as ensureDir,cYr as estimateConversationTokens,lYr as estimateSystemPromptTokens,Qd as estimateTokens,Fln as executeSlashCommand,Bje as extractCodeBlocks,jje as extractMentions,fun as formatCommandHelp,r6r as formatCost,$4r as formatDate,K4r as formatDuration,t6r as formatFileSize,dun as formatFullHelp,UHt as formatHelpCategory,o6r as formatList,fwt as formatPercent,a6r as formatProgressBar,e6r as formatRelativeTime,yn as formatTimestamp,n6r as formatTokenCount,dYr as formatTokenDisplay,rC as generateDiff,oDr as generateDiffSummary,_6r as generateSecureRandom,cDr as generateWordDiff,ak as getActionLogger,RVe as getAgentSourcePriority,Jb as getAnthropicClient,b0 as getApprovalManager,AIt as getAvailableAliases,wIt as getAvailableModelIds,vY as getAvailableModels,IN as getBackupManager,I5r as getBasename,uDr as getChangedLineCount,kIt as getCheapestModel,bH as getCodebaseIndexer,Dln as getCompletions,dee as getComplexityClassifier,$q as getConfigManager,iDe as getConsentManager,ck as getContextBuilder,mYr as getContextUsageColor,yYr as getConversationCompactor,MW as getCredentialStore,GIt as getDefaultModel,EIt as getDefaultModelId,VV as getEnhancedContextGatherer,Fa as getEventEmitter,g5r as getExtension,nC as getFileService,Wu as getGlobalCompassDir,Rln as getHistoryManager,Xje as getInteractiveClarifier,KLe as getLogInterpreter,vw as getModelConfig,zfe as getModelDescription,RIt as getModelTier,NIt as getModelsByCapability,FIt as getMostCapableModel,gve as getPlanGenerator,mm as getProjectCompassDir,_5r as getRelativePath,Ey as getSessionManager,jb as getShellExecutor,Kje as getSlashCommandRegistry,sk as getStepTracker,Uln as getTaskProcessor,hN as getTokenTracker,K3 as getToolRegistry,Uje as getVerifier,COr as getWorkflowManager,Eln as getWorkflowOrchestrator,uDe as hash,h6r as hmac,Pv as interpolateTemplate,qq as isDirectory,Pme as isFile,Sme as isPathWithin,VVe as isValidAgentFrontmatter,WVe as isValidAgentPermissionMode,xvr as isValidAgentSource,avr as isValidAnthropicConfig,wvr as isValidCLIAgentConfig,svr as isValidCompassConfig,dvr as isValidConfigFile,xIt as isValidConsent,fvr as isValidConsentRecord,SIt as isValidModel,vvr as isValidNotificationStyle,ovr as isValidProjectConfig,Tvr as isValidRatingState,cvr as isValidSafetyConfig,uvr as isValidSessionConfig,kln as isValidSlashCommand,lvr as isValidUIConfig,Ivr as isValidUpdateCheckResult,yvr as isValidUpdateConfig,pvr as isValidUpdateSettingsConfig,bvr as isValidUpdateType,ve as logger,Oq as matchesPattern,h5r as normalizeSeparators,s6r as padString,NHt as parseArgs,Nln as parseInput,Bfe as parseToolsList,$a as pathExists,jY as readDir,LLe as registerBuiltInTools,$je as registerSlashCommand,Gy as remove,zln as renderBanner,qln as renderMiniBanner,$ln as renderWelcome,f5r as resolveGlobalPath,ww as resolveModelId,m5r as resolveProjectPath,Xd as safeReadFile,ff as safeReadJson,Cv as safeWriteFile,Dh as safeWriteJson,ZW as sanitizePath,g6r as secureCompare,Svr as serializeToolsList,Db as stat,uN as toForwardSlashes,i6r as truncate,pYr as wouldExceedContext};
|
|
2374
2386
|
/*! Bundled license information:
|
|
2375
2387
|
|
|
2376
2388
|
typescript/lib/typescript.js:
|