superpowers-mcp 6.4.2 → 6.4.4

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.
@@ -1,31 +1,41 @@
1
- "use strict";var M=Object.create;var E=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var F=(e,t)=>{for(var r in t)E(e,r,{get:t[r],enumerable:!0})},$=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of H(t))!V.call(e,s)&&s!==r&&E(e,s,{get:()=>t[s],enumerable:!(o=q(t,s))||o.enumerable});return e};var _=(e,t,r)=>(r=e!=null?M(K(e)):{},$(t||!e||!e.__esModule?E(r,"default",{value:e,enumerable:!0}):r,e)),z=e=>$(E({},"__esModule",{value:!0}),e);var X={};F(X,{HARNESS_CONFIGS:()=>b,JSON_SERVER_ROOT_KEYS:()=>O,isPlainObject:()=>P,runSetup:()=>J,runSetupCli:()=>Q,safeWriteConfig:()=>U,stripJsonComments:()=>I,updateJsonConfig:()=>T,updateYamlConfig:()=>N});module.exports=z(X);var a=_(require("fs")),n=_(require("path")),k=_(require("os")),D=_(require("crypto")),b={lmstudio:{name:"LM Studio",aliases:["lmstudio","lm-studio"],getConfigPath:(e,t)=>n.join(t,".lmstudio","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},roo:{name:"Roo Code (VS Code Desktop)",aliases:["roo","roo-code","roocode"],getConfigPath:(e,t,r)=>{let o=e==="win32"?r||n.join(t,"AppData","Roaming"):e==="darwin"?n.join(t,"Library","Application Support"):n.join(t,".config");return n.join(o,"Code","User","globalStorage","rooveterinaryinc.roo-cline","settings","mcp_settings.json")},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},copilot:{name:"GitHub Copilot (VS Code)",aliases:["vscode","code","copilot"],getConfigPath:(e,t,r,o)=>e==="win32"?n.join(r||n.join(t,"AppData","Roaming"),"Code","User","mcp.json"):e==="darwin"?n.join(t,"Library","Application Support","Code","User","mcp.json"):n.join(t,".config","Code","User","mcp.json"),type:"json-servers",defaultConfig:(e,t)=>({command:e,args:t,type:"stdio"})},"copilot-insiders":{name:"GitHub Copilot (VS Code Insiders)",aliases:["vscode-insiders","code-insiders","insiders","insider","vscode-insider","code-insider","copilot-insider"],getConfigPath:(e,t,r,o)=>e==="win32"?n.join(r||n.join(t,"AppData","Roaming"),"Code - Insiders","User","mcp.json"):e==="darwin"?n.join(t,"Library","Application Support","Code - Insiders","User","mcp.json"):n.join(t,".config","Code - Insiders","User","mcp.json"),type:"json-servers",defaultConfig:(e,t)=>({command:e,args:t,type:"stdio"})},cursor:{name:"Cursor",aliases:["cursor"],getConfigPath:(e,t)=>n.join(t,".cursor","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},hermes:{name:"Hermes Desktop / Agent",aliases:["hermes","hermes-desktop"],getConfigPath:(e,t,r,o)=>{if(e==="win32"){let s=o||n.join(t,"AppData","Local");return n.join(s,"hermes","config.yaml")}return n.join(t,".hermes","config.yaml")},type:"yaml",defaultConfig:(e,t)=>({command:e,args:t})},kimi:{name:"Kimi Work / Kimi Code",aliases:["kimi","kimi-work","kimi-code"],getConfigPath:(e,t)=>n.join(t,".kimi-code","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},claude:{name:"Claude Desktop",aliases:["claude","claude-desktop"],getConfigPath:(e,t,r)=>e==="win32"?n.join(r||n.join(t,"AppData","Roaming"),"Claude","claude_desktop_config.json"):e==="darwin"?n.join(t,"Library","Application Support","Claude","claude_desktop_config.json"):n.join(t,".config","Claude","claude_desktop_config.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},devin:{name:"Devin Desktop (formerly Windsurf)",aliases:["devin","devin-desktop","windsurf","codeium"],getConfigPath:(e,t,r)=>{let o=e==="win32"&&r?r:n.join(t,".config"),s=n.join(o,"devin","mcp_config.json");return a.existsSync(s)?s:n.join(t,".codeium","windsurf","mcp_config.json")},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},antigravity:{name:"Antigravity (Google DeepMind)",aliases:["antigravity","agy","gemini"],getConfigPath:(e,t)=>n.join(t,".gemini","config","mcp_config.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},"pi-desktop":{name:"Pi Desktop / Pi Agent",aliases:["pi-desktop","pi","pi-agent"],getConfigPath:(e,t,r)=>{if(e==="win32"){let c=n.join(r||n.join(t,"AppData","Roaming"),".pi","agent","mcp.json");if(a.existsSync(c))return c;let i=n.join(t,".pi","agent","mcp.json");if(a.existsSync(i))return i;let p=n.join(t,".pi","mcp.json");return a.existsSync(p)?p:i}let o=n.join(t,".pi","agent","mcp.json");if(a.existsSync(o))return o;let s=n.join(t,".pi","mcp.json");return a.existsSync(s)?s:o},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},qwenpaw:{name:"QwenPaw (Personal Agent Workstation)",aliases:["qwenpaw","qwen-paw","copaw"],getConfigPath:(e,t)=>{let r=n.join(t,".qwenpaw","config.json");if(a.existsSync(r))return r;let o=n.join(t,".copaw","config.json");return a.existsSync(o)?o:r},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},cline:{name:"Cline (VS Code / CLI)",aliases:["cline","claude-dev"],getConfigPath:(e,t,r)=>{let o="";if(e==="win32"?o=n.join(r||n.join(t,"AppData","Roaming"),"Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"):e==="darwin"?o=n.join(t,"Library","Application Support","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"):o=n.join(t,".config","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),a.existsSync(o))return o;let s=n.join(t,".cline","data","settings","cline_mcp_settings.json");return a.existsSync(s)?s:o},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},kilo:{name:"Kilo Code",aliases:["kilo","kilocode","kilo-code"],getConfigPath:(e,t)=>{let r=n.join(t,".config","kilo","kilo.jsonc");if(a.existsSync(r))return r;let o=n.join(t,".config","kilo","kilo.json");return a.existsSync(o)?o:r},type:"json-mcp",defaultConfig:(e,t)=>({type:"local",command:[e,...t],enabled:!0})},qoder:{name:"Qoder",aliases:["qoder"],getConfigPath:(e,t)=>n.join(t,".qoder","settings.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},kiro:{name:"Kiro",aliases:["kiro","kiro-code"],getConfigPath:(e,t)=>n.join(t,".kiro","settings","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},trae:{name:"Trae",aliases:["trae"],getConfigPath:(e,t,r)=>{if(e==="win32"){let o=n.join(r||n.join(t,"AppData","Roaming"),"Trae","User","mcp.json");if(a.existsSync(o))return o;let s=n.join(r||n.join(t,"AppData","Roaming"),"Trae CN","User","mcp.json");return a.existsSync(s)?s:o}else if(e==="darwin"){let o=n.join(t,"Library","Application Support","Trae","User","mcp.json");if(a.existsSync(o))return o;let s=n.join(t,"Library","Application Support","Trae CN","User","mcp.json");return a.existsSync(s)?s:o}else{let o=n.join(t,".config","Trae","User","mcp.json");if(a.existsSync(o))return o;let s=n.join(t,".config","Trae CN","User","mcp.json");return a.existsSync(s)?s:o}},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})}},O=["mcpServers","servers","mcp"];function P(e){return Object.prototype.toString.call(e)==="[object Object]"}function I(e,t=!1){if(!e)return"";if(!t)try{return JSON.parse(e),e}catch{}let r=e.length,o=[],s=!1,c=!1,i=!1,p=!1,S=-1;for(let m=0;m<r;m++){let g=e[m],C=m+1<r?e[m+1]:"";if(i){(g===`
2
- `||g==="\r")&&(i=!1,o.push(g));continue}if(p){g==="*"&&C==="/"&&(p=!1,m++);continue}if(s){o.push(g),c?c=!1:g==="\\"?c=!0:g==='"'&&(s=!1);continue}if(g==='"'){s=!0,c=!1,S=-1,o.push(g);continue}if(g==="/"&&C==="/"){i=!0,m++;continue}if(g==="/"&&C==="*"){p=!0,m++;continue}if(g===","){S=o.length,o.push(g);continue}if(g==="}"||g==="]"){S!==-1&&(o[S]=" ",S=-1),o.push(g);continue}g!==" "&&g!==" "&&g!==`
3
- `&&g!=="\r"&&(S=-1),o.push(g)}return o.join("")}var W=/\s/;function G(e){for(let t=1;t<e.length;t++){if(e[t]!=="#"||!W.test(e[t-1]))continue;let r=t-1;for(;r>0&&W.test(e[r-1]);)r--;return e.slice(r)}return""}function N(e,t,r,o=!1){let s=e?e.split(/\r?\n/):[],c=s.map((l,d)=>{let y=l.match(/^(\s*)mcp_servers:/);return y?{index:d,indent:y[1],tail:l.slice(y[0].length).trim()}:null}).filter(l=>l!==null),i=c.filter(l=>l.indent==="");if(i.length>1)throw new Error("Cannot safely update YAML with duplicate mcp_servers keys");if(i.length===1){let l=i[0];if(l.tail!==""&&!l.tail.startsWith("#"))throw new Error("Cannot safely update YAML unless mcp_servers is a root-level block mapping")}else if(c.length>0)throw new Error("Cannot safely update YAML unless mcp_servers is a root-level block mapping");let p=" ";if(i.length===1)for(let l=i[0].index+1;l<s.length;l++){if(s[l].trim()===""||s[l].trimStart().startsWith("#"))continue;if(/^[^\s]/.test(s[l]))break;let d=s[l].match(/^(\s+)\S/);d&&(p=d[1]);break}if(o){let l=[],d=!1,y=0,j=!1,w=0;for(let f=0;f<s.length;f++){let u=s[f],v=u.match(/^(\s*)mcp_servers:\s*(?:#.*)?$/);if(v){d=!0,y=v[1].length,l.push(u);continue}if(d){let x=u.match(/^(\s*)/)?.[1].length||0;if(u.trimStart().startsWith("#")){l.push(u);continue}if(u.trim()!==""&&x<=y)d=!1,j=!1;else{let A=u.match(/^(\s*)superpowers:\s*(?:#.*)?$/);if(A&&A[1]===p){j=!0,w=A[1].length;continue}if(j){if(x>w||u.trim()==="")continue;j=!1}}}l.push(u)}return l.join(`
4
- `)}let S=JSON.stringify(t),m=JSON.stringify(r),g=[`${p}superpowers:`,`${p}${p}command: ${S}`,`${p}${p}args: ${m}`];if(!e||e.trim()==="")return`mcp_servers:
5
- ${g.join(`
1
+ "use strict";var V=Object.create;var R=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var Z=(e,t)=>{for(var r in t)R(e,r,{get:t[r],enumerable:!0})},T=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Y(t))!Q.call(e,s)&&s!==r&&R(e,s,{get:()=>t[s],enumerable:!(n=F(t,s))||n.enumerable});return e};var O=(e,t,r)=>(r=e!=null?V(B(e)):{},T(t||!e||!e.__esModule?R(r,"default",{value:e,enumerable:!0}):r,e)),X=e=>T(R({},"__esModule",{value:!0}),e);var ce={};Z(ce,{HARNESS_CONFIGS:()=>A,JSON_SERVER_ROOT_KEYS:()=>K,isPlainObject:()=>P,runSetup:()=>G,runSetupCli:()=>ae,safeWriteConfig:()=>z,stripJsonComments:()=>L,updateJsonConfig:()=>H,updateTomlConfig:()=>q,updateYamlConfig:()=>U});module.exports=X(ce);var u=O(require("fs")),o=O(require("path")),_=O(require("os")),M=O(require("crypto")),A={lmstudio:{name:"LM Studio",aliases:["lmstudio","lm-studio"],getConfigPath:(e,t)=>o.join(t,".lmstudio","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},roo:{name:"Roo Code (VS Code Desktop)",aliases:["roo","roo-code","roocode"],getConfigPath:(e,t,r)=>{let n=e==="win32"?r||o.join(t,"AppData","Roaming"):e==="darwin"?o.join(t,"Library","Application Support"):o.join(t,".config");return o.join(n,"Code","User","globalStorage","rooveterinaryinc.roo-cline","settings","mcp_settings.json")},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},copilot:{name:"GitHub Copilot (VS Code)",aliases:["vscode","code","copilot"],getConfigPath:(e,t,r,n)=>e==="win32"?o.join(r||o.join(t,"AppData","Roaming"),"Code","User","mcp.json"):e==="darwin"?o.join(t,"Library","Application Support","Code","User","mcp.json"):o.join(t,".config","Code","User","mcp.json"),type:"json-servers",defaultConfig:(e,t)=>({command:e,args:t,type:"stdio"})},"copilot-insiders":{name:"GitHub Copilot (VS Code Insiders)",aliases:["vscode-insiders","code-insiders","insiders","insider","vscode-insider","code-insider","copilot-insider"],getConfigPath:(e,t,r,n)=>e==="win32"?o.join(r||o.join(t,"AppData","Roaming"),"Code - Insiders","User","mcp.json"):e==="darwin"?o.join(t,"Library","Application Support","Code - Insiders","User","mcp.json"):o.join(t,".config","Code - Insiders","User","mcp.json"),type:"json-servers",defaultConfig:(e,t)=>({command:e,args:t,type:"stdio"})},cursor:{name:"Cursor",aliases:["cursor"],getConfigPath:(e,t)=>o.join(t,".cursor","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},hermes:{name:"Hermes Desktop / Agent",aliases:["hermes","hermes-desktop"],getConfigPath:(e,t,r,n)=>{if(e==="win32"){let s=n||o.join(t,"AppData","Local");return o.join(s,"hermes","config.yaml")}return o.join(t,".hermes","config.yaml")},type:"yaml",defaultConfig:(e,t)=>({command:e,args:t})},kimi:{name:"Kimi Work / Kimi Code",aliases:["kimi","kimi-work","kimi-code"],getConfigPath:(e,t)=>o.join(t,".kimi-code","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},claude:{name:"Claude Desktop",aliases:["claude","claude-desktop"],getConfigPath:(e,t,r)=>e==="win32"?o.join(r||o.join(t,"AppData","Roaming"),"Claude","claude_desktop_config.json"):e==="darwin"?o.join(t,"Library","Application Support","Claude","claude_desktop_config.json"):o.join(t,".config","Claude","claude_desktop_config.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},devin:{name:"Devin Desktop (formerly Windsurf)",aliases:["devin","devin-desktop","windsurf","codeium"],getConfigPath:(e,t,r)=>{let n=e==="win32"&&r?r:o.join(t,".config"),s=o.join(n,"devin","mcp_config.json");return u.existsSync(s)?s:o.join(t,".codeium","windsurf","mcp_config.json")},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},antigravity:{name:"Antigravity (Google DeepMind)",aliases:["antigravity","agy","gemini"],getConfigPath:(e,t)=>o.join(t,".gemini","config","mcp_config.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},"pi-desktop":{name:"Pi Desktop / Pi Agent",aliases:["pi-desktop","pi","pi-agent"],getConfigPath:(e,t,r)=>{if(e==="win32"){let p=o.join(r||o.join(t,"AppData","Roaming"),".pi","agent","mcp.json");if(u.existsSync(p))return p;let g=o.join(t,".pi","agent","mcp.json");if(u.existsSync(g))return g;let c=o.join(t,".pi","mcp.json");return u.existsSync(c)?c:g}let n=o.join(t,".pi","agent","mcp.json");if(u.existsSync(n))return n;let s=o.join(t,".pi","mcp.json");return u.existsSync(s)?s:n},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},qwenpaw:{name:"QwenPaw (Personal Agent Workstation)",aliases:["qwenpaw","qwen-paw","copaw"],getConfigPath:(e,t)=>{let r=o.join(t,".qwenpaw","config.json");if(u.existsSync(r))return r;let n=o.join(t,".copaw","config.json");return u.existsSync(n)?n:r},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},cline:{name:"Cline (VS Code / CLI)",aliases:["cline","claude-dev"],getConfigPath:(e,t,r)=>{let n="";if(e==="win32"?n=o.join(r||o.join(t,"AppData","Roaming"),"Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"):e==="darwin"?n=o.join(t,"Library","Application Support","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"):n=o.join(t,".config","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),u.existsSync(n))return n;let s=o.join(t,".cline","data","settings","cline_mcp_settings.json");return u.existsSync(s)?s:n},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},kilo:{name:"Kilo Code",aliases:["kilo","kilocode","kilo-code"],getConfigPath:(e,t)=>{let r=o.join(t,".config","kilo","kilo.jsonc");if(u.existsSync(r))return r;let n=o.join(t,".config","kilo","kilo.json");return u.existsSync(n)?n:r},type:"json-mcp",defaultConfig:(e,t)=>({type:"local",command:[e,...t],enabled:!0})},qoder:{name:"Qoder",aliases:["qoder"],getConfigPath:(e,t)=>o.join(t,".qoder","settings.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},kiro:{name:"Kiro",aliases:["kiro","kiro-code"],getConfigPath:(e,t)=>o.join(t,".kiro","settings","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},trae:{name:"Trae",aliases:["trae"],getConfigPath:(e,t,r)=>{if(e==="win32"){let n=o.join(r||o.join(t,"AppData","Roaming"),"Trae","User","mcp.json");if(u.existsSync(n))return n;let s=o.join(r||o.join(t,"AppData","Roaming"),"Trae CN","User","mcp.json");return u.existsSync(s)?s:n}else if(e==="darwin"){let n=o.join(t,"Library","Application Support","Trae","User","mcp.json");if(u.existsSync(n))return n;let s=o.join(t,"Library","Application Support","Trae CN","User","mcp.json");return u.existsSync(s)?s:n}else{let n=o.join(t,".config","Trae","User","mcp.json");if(u.existsSync(n))return n;let s=o.join(t,".config","Trae CN","User","mcp.json");return u.existsSync(s)?s:n}},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},codex:{name:"Codex",aliases:["codex"],getConfigPath:(e,t)=>o.join(t,".codex","config.toml"),type:"toml",defaultConfig:(e,t)=>({command:e,args:t})},openclaw:{name:"OpenClaw",aliases:["openclaw","open-claw"],getConfigPath:(e,t)=>o.join(t,".openclaw","openclaw.json"),type:"json-mcpServers",serverPath:["mcp","servers"],defaultConfig:(e,t)=>({command:e,args:t})},goose:{name:"Goose",aliases:["goose"],getConfigPath:(e,t,r)=>e==="win32"?o.join(r||o.join(t,"AppData","Roaming"),"Block","goose","config","config.yaml"):o.join(t,".config","goose","config.yaml"),type:"yaml",yamlProfile:"goose",defaultConfig:(e,t)=>({cmd:e,args:t})}},K=["mcpServers","servers","mcp"];function P(e){return Object.prototype.toString.call(e)==="[object Object]"}function L(e,t=!1){if(!e)return"";if(!t)try{return JSON.parse(e),e}catch{}let r=e.length,n=[],s=!1,p=!1,g=!1,c=!1,j=-1;for(let l=0;l<r;l++){let f=e[l],S=l+1<r?e[l+1]:"";if(g){(f===`
2
+ `||f==="\r")&&(g=!1,n.push(f));continue}if(c){f==="*"&&S==="/"&&(c=!1,l++);continue}if(s){n.push(f),p?p=!1:f==="\\"?p=!0:f==='"'&&(s=!1);continue}if(f==='"'){s=!0,p=!1,j=-1,n.push(f);continue}if(f==="/"&&S==="/"){g=!0,l++;continue}if(f==="/"&&S==="*"){c=!0,l++;continue}if(f===","){j=n.length,n.push(f);continue}if(f==="}"||f==="]"){j!==-1&&(n[j]=" ",j=-1),n.push(f);continue}f!==" "&&f!==" "&&f!==`
3
+ `&&f!=="\r"&&(j=-1),n.push(f)}return n.join("")}var W=/\s/;function ee(e){for(let t=1;t<e.length;t++){if(e[t]!=="#"||!W.test(e[t-1]))continue;let r=t-1;for(;r>0&&W.test(e[r-1]);)r--;return e.slice(r)}return""}function U(e,t,r,n=!1,s="mcp"){let p=s==="goose"?{rootKey:"extensions",ownedKeys:["cmd","args","type"],freshEntry:(i,d,a)=>[`${i}superpowers:`,`${i}${i}name: "Superpowers"`,`${i}${i}cmd: ${JSON.stringify(d)}`,`${i}${i}args: ${JSON.stringify(a)}`,`${i}${i}enabled: true`,`${i}${i}type: stdio`,`${i}${i}timeout: 300`]}:{rootKey:"mcp_servers",ownedKeys:["command","args"],freshEntry:(i,d,a)=>[`${i}superpowers:`,`${i}${i}command: ${JSON.stringify(d)}`,`${i}${i}args: ${JSON.stringify(a)}`]};if(!/^[A-Za-z0-9_-]+$/.test(p.rootKey))throw new Error("Invalid YAML root key");let g=new RegExp(`^(\\s*)${p.rootKey}\\s*:`),c=new RegExp(`^(\\s*)${p.rootKey}\\s*:\\s*(?:#.*)?$`),j=new RegExp(`^\\s*["']?(?:${p.ownedKeys.join("|")})["']?\\s*:`),l=e?e.split(/\r?\n/):[],f=l.map((i,d)=>{let a=i.match(g);return a?{index:d,indent:a[1],tail:i.slice(a[0].length).trim()}:null}).filter(i=>i!==null),S=f.filter(i=>i.indent==="");if(S.length>1)throw new Error(`Cannot safely update YAML with duplicate ${p.rootKey} keys`);if(S.length===1){let i=S[0];if(i.tail!==""&&!i.tail.startsWith("#"))throw new Error(`Cannot safely update YAML unless ${p.rootKey} is a root-level block mapping`)}else if(f.length>0)throw new Error(`Cannot safely update YAML unless ${p.rootKey} is a root-level block mapping`);let k=" ";if(S.length===1)for(let i=S[0].index+1;i<l.length;i++){if(l[i].trim()===""||l[i].trimStart().startsWith("#"))continue;if(/^[^\s]/.test(l[i]))break;let d=l[i].match(/^(\s+)\S/);d&&(k=d[1]);break}if(n){let i=[],d=!1,a=0,m=!1,C=0;for(let x=0;x<l.length;x++){let v=l[x],b=v.match(c);if(b){d=!0,a=b[1].length,i.push(v);continue}if(d){let $=v.match(/^(\s*)/)?.[1].length||0;if(v.trimStart().startsWith("#")){i.push(v);continue}if(v.trim()!==""&&$<=a)d=!1,m=!1;else{let N=v.match(/^(\s*)superpowers:\s*(?:#.*)?$/);if(N&&N[1]===k){m=!0,C=N[1].length;continue}if(m){if($>C||v.trim()==="")continue;m=!1}}}i.push(v)}return i.join(`
4
+ `)}let y=p.freshEntry(k,t,r);if(!e||e.trim()==="")return`${p.rootKey}:
5
+ ${y.join(`
6
6
  `)}
7
- `;let C=i.length===1?i[0].index:-1;if(C===-1)return`${e.trimEnd()}
7
+ `;let w=S.length===1?S[0].index:-1;if(w===-1)return`${e.trimEnd()}
8
8
 
9
- mcp_servers:
10
- ${g.join(`
9
+ ${p.rootKey}:
10
+ ${y.join(`
11
11
  `)}
12
- `;let h=-1;for(let l=C+1;l<s.length;l++){let d=s[l];if(/^[^\s#]/.test(d))break;if((d.match(/^(\s*)/)?.[1]||"")===p&&/^\s+["']?superpowers["']?\s*:\s*(?:#.*)?$/.test(d)){h=l;break}}if(h!==-1){let l=s[h].match(/^(\s*)/)?.[1].length||2,d=h+1;for(;d<s.length;){let w=s[d];if((w.match(/^(\s*)/)?.[1].length||0)>l||w.trim()==="")d++;else break}let y=[],j=-1;for(let w=h+1;w<d;w++){let f=s[w];if(f.trim()==="")continue;let u=f.match(/^(\s*)/)?.[1].length??0;if(!(j!==-1&&u>j)){if(j=-1,u>l&&/^\s*["']?(?:command|args)["']?\s*:/.test(f)){j=u;continue}y.push(f)}}return g[0]+=G(s[h]),s.splice(h,d-h,...g,...y),s.join(`
13
- `)}else return s.splice(C+1,0,...g),s.join(`
14
- `)}function T(e,t,r,o,s=!1,c){let i={},p=!1;if(e&&e.trim()!=="")try{let h=JSON.parse(e);if(!P(h))throw new Error("Existing JSON root must be an object");i=h}catch(h){try{let l=I(e,!0),d=JSON.parse(l);if(!P(d))throw new Error("Existing JSON root must be an object");i=d,p=l!==e}catch(l){let d=l instanceof Error?l.message:String(l),y=h instanceof Error?h.message:String(h);throw new Error(`Failed to parse existing JSON: ${d} (raw JSON error: ${y})`)}}let S=t==="json-servers"?"servers":t==="json-mcp"?"mcp":"mcpServers",m=O.find(h=>P(i[h])&&i[h].superpowers!==void 0)??S;if(i[m]!==void 0&&!P(i[m]))throw new Error(`Existing JSON field "${m}" must be an object`);i[m]===void 0&&(i[m]={});let g=i[m];if(s)delete g.superpowers;else{let h;c?h={...c}:t==="json-servers"?h={command:r,args:o,type:"stdio"}:t==="json-mcp"?h={type:"local",command:[r,...o],enabled:!0}:h={command:r,args:o};let l=g.superpowers;if(!P(l))g.superpowers=h;else{let d={...l,...h};(l.enabled!==void 0||l.disabled!==void 0)&&(l.enabled!==void 0?d.enabled=l.enabled:delete d.enabled),t==="json-mcp"&&Array.isArray(d.command)&&delete d.args,g.superpowers=d}}let C=JSON.stringify(i,null,2)+`
15
- `;return p&&C!==e&&process.stderr.write(`[superpowers-mcp] Warning: JSONC comments/trailing commas in the existing config were removed while updating it (the file is rewritten as plain JSON).
16
- `),C}function Y(e,t=10){try{let r=n.dirname(e),o=`${n.basename(e)}.`,s=".bak",c=a.readdirSync(r).filter(i=>{if(!i.startsWith(o)||!i.endsWith(s))return!1;let p=i.slice(o.length,i.length-s.length);return/^\d+$/.test(p)}).map(i=>{let p=n.join(r,i);try{return{full:p,mtimeMs:a.statSync(p).mtimeMs}}catch{return{full:p,mtimeMs:0}}}).sort((i,p)=>p.mtimeMs-i.mtimeMs);for(let i of c.slice(t))try{a.unlinkSync(i.full)}catch{}}catch{}}function U(e,t,r=!1,o=[],s){if(o.length===0)throw new Error("safeWriteConfig requires at least one allowed destination root");let c=e;try{let f=a.lstatSync(e,{throwIfNoEntry:!1});if(f&&f.isSymbolicLink()){try{c=a.realpathSync(e)}catch{let L=a.readlinkSync(e);c=n.resolve(n.dirname(e),L)}let u=n.normalize(n.resolve(c)).toLowerCase(),v=n.normalize(n.resolve(k.tmpdir())).toLowerCase();if(!(u===v||u.startsWith(v+n.sep))&&(["/etc","/bin","/sbin","/usr","/root","/sys","/proc","/dev","/private/etc","c:\\windows"].some(R=>u===R||u.startsWith(R+n.sep))||u==="/var"||u.startsWith("/var"+n.sep)&&!u.startsWith("/var/folders"+n.sep)||u==="/private/var"||u.startsWith("/private/var"+n.sep)&&!u.startsWith("/private/var/folders"+n.sep)))throw new Error(`Refusing to write to unsafe symlink target: ${c}`)}}catch(f){if(f instanceof Error&&f.message.includes("Refusing to write to unsafe symlink target"))throw f}let i=n.dirname(c);a.existsSync(i)||a.mkdirSync(i,{recursive:!0,mode:448});let p=a.realpathSync(i),S=a.statSync(p);c=n.join(p,n.basename(c));let m=n.normalize(n.resolve(c)).toLowerCase(),g=n.normalize(n.resolve(k.tmpdir())).toLowerCase(),C=m===g||m.startsWith(g+n.sep),l=["/etc","/bin","/sbin","/usr","/root","/sys","/proc","/dev","/private/etc","c:\\windows"].some(f=>m===f||m.startsWith(f+n.sep))||m==="/var"||m.startsWith("/var"+n.sep)&&!m.startsWith("/var/folders"+n.sep)||m==="/private/var"||m.startsWith("/private/var"+n.sep)&&!m.startsWith("/private/var/folders"+n.sep);if(!C&&l)throw new Error(`Refusing to write to unsafe configuration target: ${c}`);if(!o.some(f=>{if(!f)return!1;let u=n.resolve(f);try{u=a.realpathSync(u)}catch{}let v=n.relative(u,c);return v!==".."&&!v.startsWith(`..${n.sep}`)&&!n.isAbsolute(v)}))throw new Error(`Refusing to write configuration outside allowed roots: ${c}`);let y=384;if(a.existsSync(c)){try{y=a.statSync(c).mode}catch{}if(r){let f=a.readFileSync(c,"utf8"),u=`${c}.${Date.now()}.bak`;try{a.writeFileSync(u,f,{encoding:"utf8",mode:y})}catch(v){let x=v instanceof Error?v.message:String(v);throw new Error(`Failed to create safe backup before write: ${x}`)}Y(c)}}let j=D.randomBytes(8).toString("hex"),w=n.join(p,`.tmp.${n.basename(c)}.${process.pid}.${j}`);try{a.writeFileSync(w,t,{encoding:"utf8",mode:y,flag:"wx"});let f=a.existsSync(c);if(s===null&&f)throw new Error("Configuration changed concurrently before it could be created");if(s!=null&&(!f||a.readFileSync(c,"utf8")!==s))throw new Error("Configuration changed concurrently; refusing to overwrite newer content");let u=a.realpathSync(i),v=a.statSync(u);if(u!==p||v.dev!==S.dev||v.ino!==S.ino)throw new Error("Configuration directory changed while writing");a.renameSync(w,c)}catch(f){try{a.existsSync(w)&&a.unlinkSync(w)}catch{}throw f}}async function J(e={}){let t=e.platform||k.platform(),r=e.homeDir||k.homedir(),o=e.appData||process.env.APPDATA,s=e.localAppData||process.env.LOCALAPPDATA,c=!!e.dryRun,i=!!e.remove,p=!!e.bun,S=e.target?e.target.toLowerCase():null,m=p?"bunx":"npx",g=["-y","superpowers-mcp"],C=[];if(!S)throw new Error(`No target client specified. Please specify which client to configure using --target <${Object.keys(b).join("|")}>.`);let h=Object.keys(b).find(d=>d===S||b[d].aliases.includes(S));if(!h)throw new Error(`Unknown harness target: "${S}". Supported targets: ${Object.keys(b).join(", ")}`);let l=[h];for(let d of l){let y=b[d],j=y.getConfigPath(t,r,o,s),w=a.existsSync(j);if(i&&!w){C.push({target:d,name:y.name,path:j,status:"up-to-date",message:"Already not configured (file does not exist)"});continue}try{let f="";w&&(f=a.readFileSync(j,"utf8"));let u="";if(y.type==="yaml")u=N(f,m,g,i);else{let v=typeof y.defaultConfig=="function"?y.defaultConfig(m,g):void 0;u=T(f,y.type,m,g,i,v)}if(f.trim()===u.trim()&&w){C.push({target:d,name:y.name,path:j,status:"up-to-date",message:i?"Already not configured":"Already configured and up-to-date"});continue}c||U(j,u,!!e.backup,[r,o||"",s||""],w?f:null),C.push({target:d,name:y.name,path:j,status:i?"removed":w?"updated":"created",message:c?`[Dry Run] Would ${i?"remove from":w?"update":"create"} ${j}`:`Successfully ${i?"removed from":w?"updated":"configured"}!`})}catch(f){let u=f instanceof Error?f.message:String(f);C.push({target:d,name:y.name,path:j,status:"error",message:u})}}return C}async function Q(e=process.argv.slice(2)){let t=!1,r={dryRun:!1,remove:!1,bun:!1,backup:!1,target:null};for(let o=0;o<e.length;o++){let s=e[o];if(!(s==="setup"||s==="install"||s==="--setup"))if(s==="--print-config")t=!0;else if(s==="--dry-run")r.dryRun=!0;else if(s==="--remove"||s==="--uninstall")r.remove=!0;else if(s==="--bun")r.bun=!0;else if(s==="--backup")r.backup=!0;else if(s==="--target"||s==="-t"){let c=e[o+1];if(!c||c.startsWith("-")){console.error(`\u274C Error: Missing value for --target flag.
17
- `),process.exitCode=1;return}r.target=e[++o]}else if(s.startsWith("--target=")){let c=s.split("=")[1];if(!c){console.error(`\u274C Error: Missing value for --target flag.
18
- `),process.exitCode=1;return}r.target=c}else if(s==="--help"||s==="-h"){B();return}else if(s.startsWith("-")){console.error(`\u274C Error: Unknown option "${s}". Use --help for usage.
12
+ `;let h=-1;for(let i=w+1;i<l.length;i++){let d=l[i];if(/^[^\s#]/.test(d))break;if((d.match(/^(\s*)/)?.[1]||"")===k&&/^\s+["']?superpowers["']?\s*:\s*(?:#.*)?$/.test(d)){h=i;break}}if(h!==-1){let i=l[h].match(/^(\s*)/)?.[1].length||2,d=h+1;for(;d<l.length;){let v=l[d];if((v.match(/^(\s*)/)?.[1].length||0)>i||v.trim()==="")d++;else break}let a=[],m=-1,C=i+k.length;for(let v=h+1;v<d;v++){let b=l[v];if(b.trim()==="")continue;let $=b.match(/^(\s*)/)?.[1].length??0;if(!(m!==-1&&$>m)){if(m=-1,$===C&&j.test(b)){m=$;continue}a.push(b)}}y[0]+=ee(l[h]);let x=y.filter((v,b)=>{if(b===0)return!0;let $=v.match(/^\s*["']?([A-Za-z0-9_-]+)["']?\s*:/);return!$||p.ownedKeys.includes($[1])});return l.splice(h,d-h,...x,...a),l.join(`
13
+ `)}else return l.splice(w+1,0,...y),l.join(`
14
+ `)}function I(e){let t=null;for(let r=0;r<e.length;r++){let n=e[r];if(t){if(t==='"'&&n==="\\"&&r+1<e.length){r++;continue}n===t&&(t=null);continue}if(n==='"'||n==="'"){t=n;continue}if(n==="#"){let s=r;for(;s>0&&W.test(e[s-1]);)s--;return[e.slice(0,s),e.slice(s)]}}return[e,""]}var te=/^\s*\[\s*mcp_servers\s*\.\s*superpowers\s*\]\s*(?:#.*)?$/;function E(e){return e===" "||e===" "||e===`
15
+ `||e==="\r"||e==="\f"||e==="\v"}function J(e){let t=0;for(;t<e.length&&E(e[t]);)t++;if(t>=e.length||e[t]!=="[")return!1;let r=e.lastIndexOf("]");if(r<=t)return!1;let n=r+1;for(;n<e.length&&E(e[n]);)n++;return n>=e.length?!0:e[n]==="#"}var ne=/^\s*\[\s*mcp_servers\s*\.\s*superpowers\s*\./;function se(e){let t=0;for(;t<e.length&&E(e[t]);)t++;if(t>=e.length||e[t]!=="[")return!1;let r=e.lastIndexOf("]");if(r<=t)return!1;let n=r+1;for(;n<e.length&&E(e[n]);)n++;if(n<e.length&&e[n]!=="#")return!1;let s=e.slice(t+1,r);return!s.includes("mcp_servers")||!s.includes("superpowers")?!1:s.includes('"')||s.includes("'")}function re(e){let t=0;for(;t<e.length&&E(e[t]);)t++;let r=null;if(e.startsWith("command",t))r="command",t+=7;else if(e.startsWith("args",t))r="args",t+=4;else return null;for(;t<e.length&&E(e[t]);)t++;if(t>=e.length||e[t]!=="=")return null;for(t++;t<e.length&&E(e[t]);)t++;let n=e.length;for(;n>t&&E(e[n-1]);)n--;return{key:r,value:e.slice(t,n)}}var oe=/^\s*(command|args)\s*=/;function q(e,t,r,n=!1){let s=e?e.split(/\r?\n/):[];for(let a of s)if(/^\s*mcp_servers(?:\s*\.\s*[A-Za-z0-9_-]+)*\s*=/.test(a))throw new Error("Cannot safely update TOML with inline mcp_servers assignment (expected [mcp_servers.superpowers] table)");let p=[];for(let a=0;a<s.length;a++){if(se(s[a]))throw new Error("Cannot safely update TOML with quoted mcp_servers.superpowers table names");te.test(s[a])&&p.push(a)}if(p.length>1)throw new Error("Cannot safely update TOML with duplicate mcp_servers.superpowers tables");let g=`command = ${JSON.stringify(t)}`,c=`args = ${JSON.stringify(r)}`,j=a=>a.replace(/'/g,'"').replace(/\s+/g,"");if(p.length===0){if(n)return e;let a=`[mcp_servers.superpowers]
16
+ ${g}
17
+ ${c}
18
+ `;return!e||e.trim()===""?a:`${e.trimEnd()}
19
+
20
+ ${a}`}let l=p[0],f=l+1;for(;f<s.length&&!(J(s[f])&&!ne.test(s[f]));)f++;let S=f;for(let a=l+1;a<f;a++)if(J(s[a])){S=a;break}if(n)return s.slice(0,l).concat(s.slice(f)).join(`
21
+ `);let k=null,y=null,w={};for(let a=l+1;a<S;a++){let[m,C]=I(s[a]),x=re(m);x&&(x.key==="command"?k===null&&(k=j(x.value)):y===null&&(y=j(x.value)),x.key in w||(w[x.key]=C))}if(k===j(JSON.stringify(t))&&y===j(JSON.stringify(r)))return e;let h=[`${g}${w.command??""}`,`${c}${w.args??""}`],i=s.slice(0,l+1),d=!1;for(let a=l+1;a<S;a++){let[m]=I(s[a]);if(oe.test(m)){d||(i.push(...h),d=!0);continue}i.push(s[a])}return d||i.push(...h),i.push(...s.slice(S,f)),i.push(...s.slice(f)),i.join(`
22
+ `)}function D(e,t,r){if(!P(e))return t;let n={...e,...t};return(e.enabled!==void 0||e.disabled!==void 0)&&(e.enabled!==void 0?n.enabled=e.enabled:delete n.enabled),r==="json-mcp"&&Array.isArray(n.command)&&delete n.args,n}function H(e,t,r,n,s=!1,p,g){let c={},j=!1;if(e&&e.trim()!=="")try{let y=JSON.parse(e);if(!P(y))throw new Error("Existing JSON root must be an object");c=y}catch(y){try{let w=L(e,!0),h=JSON.parse(w);if(!P(h))throw new Error("Existing JSON root must be an object");c=h,j=w!==e}catch(w){let h=w instanceof Error?w.message:String(w),i=y instanceof Error?y.message:String(y);throw new Error(`Failed to parse existing JSON: ${h} (raw JSON error: ${i})`)}}let l=t==="json-servers"?"servers":t==="json-mcp"?"mcp":"mcpServers";if(g&&g.length>0){let y=g.join(".");for(let i of g){if(typeof i!="string"||i.length===0)throw new Error(`Invalid JSON field "${y}"`);if(i==="__proto__"||i==="constructor"||i==="prototype")throw new Error(`Refusing to use unsafe JSON field "${y}"`);if(!/^[A-Za-z0-9_-]+$/.test(i))throw new Error(`Invalid JSON field "${y}"`)}let w=c;for(let i of g){if(i==="__proto__"||i==="constructor"||i==="prototype")throw new Error(`Refusing to use unsafe JSON field "${y}"`);let d=w[i];if(d===void 0){if(s)return e;w[i]={}}else if(!P(d))throw new Error(`Existing JSON field "${y}" must be an object`);w=w[i]}if(s)delete w.superpowers;else{let i=p?{...p}:{command:r,args:n};w.superpowers=D(w.superpowers,i,t)}let h=JSON.stringify(c,null,2)+`
23
+ `;return j&&h!==e&&process.stderr.write(`[superpowers-mcp] Warning: JSONC comments/trailing commas in the existing config were removed while updating it (the file is rewritten as plain JSON).
24
+ `),h}let f=K.find(y=>P(c[y])&&c[y].superpowers!==void 0)??l;if(c[f]!==void 0&&!P(c[f]))throw new Error(`Existing JSON field "${f}" must be an object`);c[f]===void 0&&(c[f]={});let S=c[f];if(s)delete S.superpowers;else{let y;p?y={...p}:t==="json-servers"?y={command:r,args:n,type:"stdio"}:t==="json-mcp"?y={type:"local",command:[r,...n],enabled:!0}:y={command:r,args:n},S.superpowers=D(S.superpowers,y,t)}let k=JSON.stringify(c,null,2)+`
25
+ `;return j&&k!==e&&process.stderr.write(`[superpowers-mcp] Warning: JSONC comments/trailing commas in the existing config were removed while updating it (the file is rewritten as plain JSON).
26
+ `),k}function ie(e,t=10){try{let r=o.dirname(e),n=`${o.basename(e)}.`,s=".bak",p=u.readdirSync(r).filter(g=>{if(!g.startsWith(n)||!g.endsWith(s))return!1;let c=g.slice(n.length,g.length-s.length);return/^\d+$/.test(c)}).map(g=>{let c=o.join(r,g);try{return{full:c,mtimeMs:u.statSync(c).mtimeMs}}catch{return{full:c,mtimeMs:0}}}).sort((g,c)=>c.mtimeMs-g.mtimeMs);for(let g of p.slice(t))try{u.unlinkSync(g.full)}catch{}}catch{}}function z(e,t,r=!1,n=[],s){if(n.length===0)throw new Error("safeWriteConfig requires at least one allowed destination root");let p=e;try{let a=u.lstatSync(e,{throwIfNoEntry:!1});if(a&&a.isSymbolicLink()){try{p=u.realpathSync(e)}catch{let $=u.readlinkSync(e);p=o.resolve(o.dirname(e),$)}let m=o.normalize(o.resolve(p)).toLowerCase(),C=o.normalize(o.resolve(_.tmpdir())).toLowerCase();if(!(m===C||m.startsWith(C+o.sep))&&(["/etc","/bin","/sbin","/usr","/root","/sys","/proc","/dev","/private/etc","c:\\windows"].some(b=>m===b||m.startsWith(b+o.sep))||m==="/var"||m.startsWith("/var"+o.sep)&&!m.startsWith("/var/folders"+o.sep)||m==="/private/var"||m.startsWith("/private/var"+o.sep)&&!m.startsWith("/private/var/folders"+o.sep)))throw new Error(`Refusing to write to unsafe symlink target: ${p}`)}}catch(a){if(a instanceof Error&&a.message.includes("Refusing to write to unsafe symlink target"))throw a}let g=o.dirname(p);u.existsSync(g)||u.mkdirSync(g,{recursive:!0,mode:448});let c=u.realpathSync(g),j=u.statSync(c);p=o.join(c,o.basename(p));let l=o.normalize(o.resolve(p)).toLowerCase(),f=o.normalize(o.resolve(_.tmpdir())).toLowerCase(),S=l===f||l.startsWith(f+o.sep),y=["/etc","/bin","/sbin","/usr","/root","/sys","/proc","/dev","/private/etc","c:\\windows"].some(a=>l===a||l.startsWith(a+o.sep))||l==="/var"||l.startsWith("/var"+o.sep)&&!l.startsWith("/var/folders"+o.sep)||l==="/private/var"||l.startsWith("/private/var"+o.sep)&&!l.startsWith("/private/var/folders"+o.sep);if(!S&&y)throw new Error(`Refusing to write to unsafe configuration target: ${p}`);if(!n.some(a=>{if(!a)return!1;let m=o.resolve(a);try{m=u.realpathSync(m)}catch{}let C=o.relative(m,p);return C!==".."&&!C.startsWith(`..${o.sep}`)&&!o.isAbsolute(C)}))throw new Error(`Refusing to write configuration outside allowed roots: ${p}`);let h=384;if(u.existsSync(p)){try{h=u.statSync(p).mode}catch{}if(r){let a=u.readFileSync(p,"utf8"),m=`${p}.${Date.now()}.bak`;try{u.writeFileSync(m,a,{encoding:"utf8",mode:h})}catch(C){let x=C instanceof Error?C.message:String(C);throw new Error(`Failed to create safe backup before write: ${x}`)}ie(p)}}let i=M.randomBytes(8).toString("hex"),d=o.join(c,`.tmp.${o.basename(p)}.${process.pid}.${i}`);try{u.writeFileSync(d,t,{encoding:"utf8",mode:h,flag:"wx"});let a=u.existsSync(p);if(s===null&&a)throw new Error("Configuration changed concurrently before it could be created");if(s!=null&&(!a||u.readFileSync(p,"utf8")!==s))throw new Error("Configuration changed concurrently; refusing to overwrite newer content");let m=u.realpathSync(g),C=u.statSync(m);if(m!==c||C.dev!==j.dev||C.ino!==j.ino)throw new Error("Configuration directory changed while writing");u.renameSync(d,p)}catch(a){try{u.existsSync(d)&&u.unlinkSync(d)}catch{}throw a}}async function G(e={}){let t=e.platform||_.platform(),r=e.homeDir||_.homedir(),n=e.appData||process.env.APPDATA,s=e.localAppData||process.env.LOCALAPPDATA,p=!!e.dryRun,g=!!e.remove,c=!!e.bun,j=e.target?e.target.toLowerCase():null,l=c?"bunx":"npx",f=["-y","superpowers-mcp"],S=[];if(!j)throw new Error(`No target client specified. Please specify which client to configure using --target <${Object.keys(A).join("|")}>.`);let k=Object.keys(A).find(w=>w===j||A[w].aliases.includes(j));if(!k)throw new Error(`Unknown harness target: "${j}". Supported targets: ${Object.keys(A).join(", ")}`);let y=[k];for(let w of y){let h=A[w],i=h.getConfigPath(t,r,n,s),d=u.existsSync(i);if(g&&!d){S.push({target:w,name:h.name,path:i,status:"up-to-date",message:"Already not configured (file does not exist)"});continue}try{let a="";d&&(a=u.readFileSync(i,"utf8"));let m="";if(h.type==="yaml")m=U(a,l,f,g,h.yamlProfile);else if(h.type==="toml")m=q(a,l,f,g);else{let C=typeof h.defaultConfig=="function"?h.defaultConfig(l,f):void 0;m=H(a,h.type,l,f,g,C,h.serverPath)}if(a.trim()===m.trim()&&d){S.push({target:w,name:h.name,path:i,status:"up-to-date",message:g?"Already not configured":"Already configured and up-to-date"});continue}p||z(i,m,!!e.backup,[r,n||"",s||""],d?a:null),S.push({target:w,name:h.name,path:i,status:g?"removed":d?"updated":"created",message:p?`[Dry Run] Would ${g?"remove from":d?"update":"create"} ${i}`:`Successfully ${g?"removed from":d?"updated":"configured"}!`})}catch(a){let m=a instanceof Error?a.message:String(a);S.push({target:w,name:h.name,path:i,status:"error",message:m})}}return S}async function ae(e=process.argv.slice(2)){let t=!1,r={dryRun:!1,remove:!1,bun:!1,backup:!1,target:null};for(let n=0;n<e.length;n++){let s=e[n];if(!(s==="setup"||s==="install"||s==="--setup"))if(s==="--print-config")t=!0;else if(s==="--dry-run")r.dryRun=!0;else if(s==="--remove"||s==="--uninstall")r.remove=!0;else if(s==="--bun")r.bun=!0;else if(s==="--backup")r.backup=!0;else if(s==="--target"||s==="-t"){let p=e[n+1];if(!p||p.startsWith("-")){console.error(`\u274C Error: Missing value for --target flag.
27
+ `),process.exitCode=1;return}r.target=e[++n]}else if(s.startsWith("--target=")){let p=s.split("=")[1];if(!p){console.error(`\u274C Error: Missing value for --target flag.
28
+ `),process.exitCode=1;return}r.target=p}else if(s==="--help"||s==="-h"){pe();return}else if(s.startsWith("-")){console.error(`\u274C Error: Unknown option "${s}". Use --help for usage.
19
29
  `),process.exitCode=1;return}else if(!r.target)r.target=s;else{console.error(`\u274C Error: Unexpected argument "${s}". Use --help for usage.
20
30
  `),process.exitCode=1;return}}if(t){if(r.target||r.remove||r.backup||r.dryRun){console.error("--print-config supports only --bun; omit target and file-operation flags."),process.exitCode=1;return}console.log(JSON.stringify({mcpServers:{superpowers:{command:r.bun?"bunx":"npx",args:["-y","superpowers-mcp"]}}},null,2));return}if(console.log(`
21
31
  ========================================================`),console.log("\u26A1 Superpowers MCP - Targeted Client Setup"),console.log(`========================================================
22
32
  `),!r.target){console.log(`Please select which AI Agent client you would like to configure:
23
- `),console.log(" npx -y superpowers-mcp setup --target lmstudio # LM Studio (~/.lmstudio/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target roo # Roo Code in VS Code Desktop"),console.log(" npx -y superpowers-mcp setup --print-config # JSON for desktop app import"),console.log(" npx -y superpowers-mcp setup --target antigravity # Antigravity (~/.gemini/config/mcp_config.json)"),console.log(" npx -y superpowers-mcp setup --target pi-desktop # Pi Desktop / Pi Agent (~/.pi/agent/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target cursor # Cursor (~/.cursor/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target copilot # GitHub Copilot (VS Code mcp.json)"),console.log(" npx -y superpowers-mcp setup --target copilot-insiders # GitHub Copilot (VS Code Insiders mcp.json)"),console.log(" npx -y superpowers-mcp setup --target hermes # Hermes Desktop / Agent"),console.log(" npx -y superpowers-mcp setup --target kimi # Kimi Work / Kimi Code"),console.log(" npx -y superpowers-mcp setup --target claude # Claude Desktop"),console.log(" npx -y superpowers-mcp setup --target devin # Devin Desktop (formerly Windsurf)"),console.log(" npx -y superpowers-mcp setup --target qwenpaw # QwenPaw / CoPaw (~/.qwenpaw/config.json)"),console.log(" npx -y superpowers-mcp setup --target cline # Cline (~/.../cline_mcp_settings.json)"),console.log(" npx -y superpowers-mcp setup --target kilo # Kilo Code (~/.config/kilo/kilo.jsonc)"),console.log(" npx -y superpowers-mcp setup --target qoder # Qoder (~/.qoder/settings.json)"),console.log(" npx -y superpowers-mcp setup --target kiro # Kiro (~/.kiro/settings/mcp.json)"),console.log(` npx -y superpowers-mcp setup --target trae # Trae (~/.../Trae/User/mcp.json)
33
+ `),console.log(" npx -y superpowers-mcp setup --target lmstudio # LM Studio (~/.lmstudio/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target roo # Roo Code in VS Code Desktop"),console.log(" npx -y superpowers-mcp setup --print-config # JSON for desktop app import"),console.log(" npx -y superpowers-mcp setup --target antigravity # Antigravity (~/.gemini/config/mcp_config.json)"),console.log(" npx -y superpowers-mcp setup --target pi-desktop # Pi Desktop / Pi Agent (~/.pi/agent/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target cursor # Cursor (~/.cursor/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target copilot # GitHub Copilot (VS Code mcp.json)"),console.log(" npx -y superpowers-mcp setup --target copilot-insiders # GitHub Copilot (VS Code Insiders mcp.json)"),console.log(" npx -y superpowers-mcp setup --target hermes # Hermes Desktop / Agent"),console.log(" npx -y superpowers-mcp setup --target kimi # Kimi Work / Kimi Code"),console.log(" npx -y superpowers-mcp setup --target claude # Claude Desktop"),console.log(" npx -y superpowers-mcp setup --target devin # Devin Desktop (formerly Windsurf)"),console.log(" npx -y superpowers-mcp setup --target qwenpaw # QwenPaw / CoPaw (~/.qwenpaw/config.json)"),console.log(" npx -y superpowers-mcp setup --target cline # Cline (~/.../cline_mcp_settings.json)"),console.log(" npx -y superpowers-mcp setup --target kilo # Kilo Code (~/.config/kilo/kilo.jsonc)"),console.log(" npx -y superpowers-mcp setup --target qoder # Qoder (~/.qoder/settings.json)"),console.log(" npx -y superpowers-mcp setup --target kiro # Kiro (~/.kiro/settings/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target trae # Trae (~/.../Trae/User/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target codex # Codex (~/.codex/config.toml)"),console.log(" npx -y superpowers-mcp setup --target openclaw # OpenClaw (~/.openclaw/openclaw.json)"),console.log(` npx -y superpowers-mcp setup --target goose # Goose (~/.config/goose/config.yaml)
24
34
  `),console.log("\u{1F4A1} Tip:"),console.log(" You can run this setup command from ANY folder on your system."),console.log(` It automatically targets your global config files (~/...) without needing to clone this repo.
25
35
  `),console.log("\u{1F4A1} Privacy & Safety:"),console.log(" Superpowers MCP only configures the specific client you explicitly choose."),console.log(` It will NEVER silently scan or modify unselected environments.
26
- `),process.exitCode=1;return}try{let o=await J(r),s=0,c=0,i=0;for(let p of o){let S=p.status==="created"||p.status==="updated"||p.status==="removed"?"\u2705":p.status==="up-to-date"?"\u2728":p.status==="skipped"?"\u23ED\uFE0F ":"\u274C";console.log(`${S} [${p.name}] (${p.status})`),console.log(` Path: ${p.path}`),console.log(` Info: ${p.message}
27
- `),p.status==="created"||p.status==="updated"||p.status==="up-to-date"||p.status==="removed"?s++:p.status==="skipped"?c++:p.status==="error"&&i++}if(console.log("--------------------------------------------------------"),i>0){console.error(`\u26A0\uFE0F Setup finished with errors: ${i} failure(s), ${s} succeeded.`),process.exitCode=1;return}console.log(`\u{1F389} Setup complete! ${s} environment(s) ready.`)}catch(o){let s=o instanceof Error?o.message:String(o);console.error(`\u274C Setup failed: ${s}
28
- `),process.exitCode=1}}function B(){console.log(`
36
+ `),process.exitCode=1;return}try{let n=await G(r),s=0,p=0,g=0;for(let c of n){let j=c.status==="created"||c.status==="updated"||c.status==="removed"?"\u2705":c.status==="up-to-date"?"\u2728":c.status==="skipped"?"\u23ED\uFE0F ":"\u274C";console.log(`${j} [${c.name}] (${c.status})`),console.log(` Path: ${c.path}`),console.log(` Info: ${c.message}
37
+ `),c.status==="created"||c.status==="updated"||c.status==="up-to-date"||c.status==="removed"?s++:c.status==="skipped"?p++:c.status==="error"&&g++}if(console.log("--------------------------------------------------------"),g>0){console.error(`\u26A0\uFE0F Setup finished with errors: ${g} failure(s), ${s} succeeded.`),process.exitCode=1;return}console.log(`\u{1F389} Setup complete! ${s} environment(s) ready.`)}catch(n){let s=n instanceof Error?n.message:String(n);console.error(`\u274C Setup failed: ${s}
38
+ `),process.exitCode=1}}function pe(){console.log(`
29
39
  Superpowers MCP - Targeted Global Setup
30
40
 
31
41
  Usage:
@@ -37,7 +47,8 @@ Options:
37
47
  copilot (vscode), copilot-insiders (vscode-insiders, code-insiders, insiders),
38
48
  hermes, kimi, claude, devin (windsurf),
39
49
  qwenpaw (qwen-paw, copaw), cline (claude-dev), kilo (kilocode),
40
- qoder, kiro (kiro-code), trae, lmstudio (lm-studio), roo (roo-code, roocode)
50
+ qoder, kiro (kiro-code), trae, lmstudio (lm-studio), roo (roo-code, roocode),
51
+ codex, openclaw (open-claw), goose
41
52
  --print-config Print importable mcpServers JSON without writing files (optional --bun)
42
53
  --bun Use "bunx" instead of "npx" in server commands
43
54
  --backup Create a timestamped .bak backup before modifying (Default: false, zero-pollution)
@@ -61,6 +72,9 @@ Examples:
61
72
  npx -y superpowers-mcp setup --target qoder # Configure Qoder only
62
73
  npx -y superpowers-mcp setup --target kiro # Configure Kiro only
63
74
  npx -y superpowers-mcp setup --target trae # Configure Trae only
75
+ npx -y superpowers-mcp setup --target codex # Configure Codex only
76
+ npx -y superpowers-mcp setup --target openclaw # Configure OpenClaw only
77
+ npx -y superpowers-mcp setup --target goose # Configure Goose only
64
78
 
65
79
  Any Directory:
66
80
  You can run this command from ANY directory on your machine.
@@ -69,4 +83,4 @@ Any Directory:
69
83
  Privacy & Safety:
70
84
  Superpowers MCP only touches the client you explicitly choose.
71
85
  It never bulk-modifies your environment without your consent.
72
- `)}0&&(module.exports={HARNESS_CONFIGS,JSON_SERVER_ROOT_KEYS,isPlainObject,runSetup,runSetupCli,safeWriteConfig,stripJsonComments,updateJsonConfig,updateYamlConfig});
86
+ `)}0&&(module.exports={HARNESS_CONFIGS,JSON_SERVER_ROOT_KEYS,isPlainObject,runSetup,runSetupCli,safeWriteConfig,stripJsonComments,updateJsonConfig,updateTomlConfig,updateYamlConfig});
package/out/setup.js CHANGED
@@ -1,32 +1,42 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var q=Object.create;var E=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var z=(e,t)=>{for(var r in t)E(e,r,{get:t[r],enumerable:!0})},W=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of K(t))!V.call(e,s)&&s!==r&&E(e,s,{get:()=>t[s],enumerable:!(o=H(t,s))||o.enumerable});return e};var _=(e,t,r)=>(r=e!=null?q(F(e)):{},W(t||!e||!e.__esModule?E(r,"default",{value:e,enumerable:!0}):r,e)),G=e=>W(E({},"__esModule",{value:!0}),e);var X={};z(X,{HARNESS_CONFIGS:()=>b,JSON_SERVER_ROOT_KEYS:()=>I,isPlainObject:()=>P,runSetup:()=>L,runSetupCli:()=>R,safeWriteConfig:()=>J,stripJsonComments:()=>N,updateJsonConfig:()=>U,updateYamlConfig:()=>T});module.exports=G(X);var a=_(require("fs")),n=_(require("path")),k=_(require("os")),O=_(require("crypto")),b={lmstudio:{name:"LM Studio",aliases:["lmstudio","lm-studio"],getConfigPath:(e,t)=>n.join(t,".lmstudio","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},roo:{name:"Roo Code (VS Code Desktop)",aliases:["roo","roo-code","roocode"],getConfigPath:(e,t,r)=>{let o=e==="win32"?r||n.join(t,"AppData","Roaming"):e==="darwin"?n.join(t,"Library","Application Support"):n.join(t,".config");return n.join(o,"Code","User","globalStorage","rooveterinaryinc.roo-cline","settings","mcp_settings.json")},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},copilot:{name:"GitHub Copilot (VS Code)",aliases:["vscode","code","copilot"],getConfigPath:(e,t,r,o)=>e==="win32"?n.join(r||n.join(t,"AppData","Roaming"),"Code","User","mcp.json"):e==="darwin"?n.join(t,"Library","Application Support","Code","User","mcp.json"):n.join(t,".config","Code","User","mcp.json"),type:"json-servers",defaultConfig:(e,t)=>({command:e,args:t,type:"stdio"})},"copilot-insiders":{name:"GitHub Copilot (VS Code Insiders)",aliases:["vscode-insiders","code-insiders","insiders","insider","vscode-insider","code-insider","copilot-insider"],getConfigPath:(e,t,r,o)=>e==="win32"?n.join(r||n.join(t,"AppData","Roaming"),"Code - Insiders","User","mcp.json"):e==="darwin"?n.join(t,"Library","Application Support","Code - Insiders","User","mcp.json"):n.join(t,".config","Code - Insiders","User","mcp.json"),type:"json-servers",defaultConfig:(e,t)=>({command:e,args:t,type:"stdio"})},cursor:{name:"Cursor",aliases:["cursor"],getConfigPath:(e,t)=>n.join(t,".cursor","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},hermes:{name:"Hermes Desktop / Agent",aliases:["hermes","hermes-desktop"],getConfigPath:(e,t,r,o)=>{if(e==="win32"){let s=o||n.join(t,"AppData","Local");return n.join(s,"hermes","config.yaml")}return n.join(t,".hermes","config.yaml")},type:"yaml",defaultConfig:(e,t)=>({command:e,args:t})},kimi:{name:"Kimi Work / Kimi Code",aliases:["kimi","kimi-work","kimi-code"],getConfigPath:(e,t)=>n.join(t,".kimi-code","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},claude:{name:"Claude Desktop",aliases:["claude","claude-desktop"],getConfigPath:(e,t,r)=>e==="win32"?n.join(r||n.join(t,"AppData","Roaming"),"Claude","claude_desktop_config.json"):e==="darwin"?n.join(t,"Library","Application Support","Claude","claude_desktop_config.json"):n.join(t,".config","Claude","claude_desktop_config.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},devin:{name:"Devin Desktop (formerly Windsurf)",aliases:["devin","devin-desktop","windsurf","codeium"],getConfigPath:(e,t,r)=>{let o=e==="win32"&&r?r:n.join(t,".config"),s=n.join(o,"devin","mcp_config.json");return a.existsSync(s)?s:n.join(t,".codeium","windsurf","mcp_config.json")},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},antigravity:{name:"Antigravity (Google DeepMind)",aliases:["antigravity","agy","gemini"],getConfigPath:(e,t)=>n.join(t,".gemini","config","mcp_config.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},"pi-desktop":{name:"Pi Desktop / Pi Agent",aliases:["pi-desktop","pi","pi-agent"],getConfigPath:(e,t,r)=>{if(e==="win32"){let c=n.join(r||n.join(t,"AppData","Roaming"),".pi","agent","mcp.json");if(a.existsSync(c))return c;let i=n.join(t,".pi","agent","mcp.json");if(a.existsSync(i))return i;let p=n.join(t,".pi","mcp.json");return a.existsSync(p)?p:i}let o=n.join(t,".pi","agent","mcp.json");if(a.existsSync(o))return o;let s=n.join(t,".pi","mcp.json");return a.existsSync(s)?s:o},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},qwenpaw:{name:"QwenPaw (Personal Agent Workstation)",aliases:["qwenpaw","qwen-paw","copaw"],getConfigPath:(e,t)=>{let r=n.join(t,".qwenpaw","config.json");if(a.existsSync(r))return r;let o=n.join(t,".copaw","config.json");return a.existsSync(o)?o:r},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},cline:{name:"Cline (VS Code / CLI)",aliases:["cline","claude-dev"],getConfigPath:(e,t,r)=>{let o="";if(e==="win32"?o=n.join(r||n.join(t,"AppData","Roaming"),"Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"):e==="darwin"?o=n.join(t,"Library","Application Support","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"):o=n.join(t,".config","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),a.existsSync(o))return o;let s=n.join(t,".cline","data","settings","cline_mcp_settings.json");return a.existsSync(s)?s:o},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},kilo:{name:"Kilo Code",aliases:["kilo","kilocode","kilo-code"],getConfigPath:(e,t)=>{let r=n.join(t,".config","kilo","kilo.jsonc");if(a.existsSync(r))return r;let o=n.join(t,".config","kilo","kilo.json");return a.existsSync(o)?o:r},type:"json-mcp",defaultConfig:(e,t)=>({type:"local",command:[e,...t],enabled:!0})},qoder:{name:"Qoder",aliases:["qoder"],getConfigPath:(e,t)=>n.join(t,".qoder","settings.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},kiro:{name:"Kiro",aliases:["kiro","kiro-code"],getConfigPath:(e,t)=>n.join(t,".kiro","settings","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},trae:{name:"Trae",aliases:["trae"],getConfigPath:(e,t,r)=>{if(e==="win32"){let o=n.join(r||n.join(t,"AppData","Roaming"),"Trae","User","mcp.json");if(a.existsSync(o))return o;let s=n.join(r||n.join(t,"AppData","Roaming"),"Trae CN","User","mcp.json");return a.existsSync(s)?s:o}else if(e==="darwin"){let o=n.join(t,"Library","Application Support","Trae","User","mcp.json");if(a.existsSync(o))return o;let s=n.join(t,"Library","Application Support","Trae CN","User","mcp.json");return a.existsSync(s)?s:o}else{let o=n.join(t,".config","Trae","User","mcp.json");if(a.existsSync(o))return o;let s=n.join(t,".config","Trae CN","User","mcp.json");return a.existsSync(s)?s:o}},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})}},I=["mcpServers","servers","mcp"];function P(e){return Object.prototype.toString.call(e)==="[object Object]"}function N(e,t=!1){if(!e)return"";if(!t)try{return JSON.parse(e),e}catch{}let r=e.length,o=[],s=!1,c=!1,i=!1,p=!1,S=-1;for(let m=0;m<r;m++){let g=e[m],C=m+1<r?e[m+1]:"";if(i){(g===`
3
- `||g==="\r")&&(i=!1,o.push(g));continue}if(p){g==="*"&&C==="/"&&(p=!1,m++);continue}if(s){o.push(g),c?c=!1:g==="\\"?c=!0:g==='"'&&(s=!1);continue}if(g==='"'){s=!0,c=!1,S=-1,o.push(g);continue}if(g==="/"&&C==="/"){i=!0,m++;continue}if(g==="/"&&C==="*"){p=!0,m++;continue}if(g===","){S=o.length,o.push(g);continue}if(g==="}"||g==="]"){S!==-1&&(o[S]=" ",S=-1),o.push(g);continue}g!==" "&&g!==" "&&g!==`
4
- `&&g!=="\r"&&(S=-1),o.push(g)}return o.join("")}var D=/\s/;function Y(e){for(let t=1;t<e.length;t++){if(e[t]!=="#"||!D.test(e[t-1]))continue;let r=t-1;for(;r>0&&D.test(e[r-1]);)r--;return e.slice(r)}return""}function T(e,t,r,o=!1){let s=e?e.split(/\r?\n/):[],c=s.map((l,d)=>{let y=l.match(/^(\s*)mcp_servers:/);return y?{index:d,indent:y[1],tail:l.slice(y[0].length).trim()}:null}).filter(l=>l!==null),i=c.filter(l=>l.indent==="");if(i.length>1)throw new Error("Cannot safely update YAML with duplicate mcp_servers keys");if(i.length===1){let l=i[0];if(l.tail!==""&&!l.tail.startsWith("#"))throw new Error("Cannot safely update YAML unless mcp_servers is a root-level block mapping")}else if(c.length>0)throw new Error("Cannot safely update YAML unless mcp_servers is a root-level block mapping");let p=" ";if(i.length===1)for(let l=i[0].index+1;l<s.length;l++){if(s[l].trim()===""||s[l].trimStart().startsWith("#"))continue;if(/^[^\s]/.test(s[l]))break;let d=s[l].match(/^(\s+)\S/);d&&(p=d[1]);break}if(o){let l=[],d=!1,y=0,j=!1,w=0;for(let f=0;f<s.length;f++){let u=s[f],v=u.match(/^(\s*)mcp_servers:\s*(?:#.*)?$/);if(v){d=!0,y=v[1].length,l.push(u);continue}if(d){let x=u.match(/^(\s*)/)?.[1].length||0;if(u.trimStart().startsWith("#")){l.push(u);continue}if(u.trim()!==""&&x<=y)d=!1,j=!1;else{let A=u.match(/^(\s*)superpowers:\s*(?:#.*)?$/);if(A&&A[1]===p){j=!0,w=A[1].length;continue}if(j){if(x>w||u.trim()==="")continue;j=!1}}}l.push(u)}return l.join(`
5
- `)}let S=JSON.stringify(t),m=JSON.stringify(r),g=[`${p}superpowers:`,`${p}${p}command: ${S}`,`${p}${p}args: ${m}`];if(!e||e.trim()==="")return`mcp_servers:
6
- ${g.join(`
2
+ "use strict";var V=Object.create;var R=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty;var X=(e,t)=>{for(var r in t)R(e,r,{get:t[r],enumerable:!0})},I=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of B(t))!Z.call(e,s)&&s!==r&&R(e,s,{get:()=>t[s],enumerable:!(n=Y(t,s))||n.enumerable});return e};var O=(e,t,r)=>(r=e!=null?V(Q(e)):{},I(t||!e||!e.__esModule?R(r,"default",{value:e,enumerable:!0}):r,e)),ee=e=>I(R({},"__esModule",{value:!0}),e);var ce={};X(ce,{HARNESS_CONFIGS:()=>A,JSON_SERVER_ROOT_KEYS:()=>L,isPlainObject:()=>P,runSetup:()=>G,runSetupCli:()=>T,safeWriteConfig:()=>F,stripJsonComments:()=>U,updateJsonConfig:()=>z,updateTomlConfig:()=>H,updateYamlConfig:()=>q});module.exports=ee(ce);var u=O(require("fs")),o=O(require("path")),_=O(require("os")),K=O(require("crypto")),A={lmstudio:{name:"LM Studio",aliases:["lmstudio","lm-studio"],getConfigPath:(e,t)=>o.join(t,".lmstudio","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},roo:{name:"Roo Code (VS Code Desktop)",aliases:["roo","roo-code","roocode"],getConfigPath:(e,t,r)=>{let n=e==="win32"?r||o.join(t,"AppData","Roaming"):e==="darwin"?o.join(t,"Library","Application Support"):o.join(t,".config");return o.join(n,"Code","User","globalStorage","rooveterinaryinc.roo-cline","settings","mcp_settings.json")},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},copilot:{name:"GitHub Copilot (VS Code)",aliases:["vscode","code","copilot"],getConfigPath:(e,t,r,n)=>e==="win32"?o.join(r||o.join(t,"AppData","Roaming"),"Code","User","mcp.json"):e==="darwin"?o.join(t,"Library","Application Support","Code","User","mcp.json"):o.join(t,".config","Code","User","mcp.json"),type:"json-servers",defaultConfig:(e,t)=>({command:e,args:t,type:"stdio"})},"copilot-insiders":{name:"GitHub Copilot (VS Code Insiders)",aliases:["vscode-insiders","code-insiders","insiders","insider","vscode-insider","code-insider","copilot-insider"],getConfigPath:(e,t,r,n)=>e==="win32"?o.join(r||o.join(t,"AppData","Roaming"),"Code - Insiders","User","mcp.json"):e==="darwin"?o.join(t,"Library","Application Support","Code - Insiders","User","mcp.json"):o.join(t,".config","Code - Insiders","User","mcp.json"),type:"json-servers",defaultConfig:(e,t)=>({command:e,args:t,type:"stdio"})},cursor:{name:"Cursor",aliases:["cursor"],getConfigPath:(e,t)=>o.join(t,".cursor","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},hermes:{name:"Hermes Desktop / Agent",aliases:["hermes","hermes-desktop"],getConfigPath:(e,t,r,n)=>{if(e==="win32"){let s=n||o.join(t,"AppData","Local");return o.join(s,"hermes","config.yaml")}return o.join(t,".hermes","config.yaml")},type:"yaml",defaultConfig:(e,t)=>({command:e,args:t})},kimi:{name:"Kimi Work / Kimi Code",aliases:["kimi","kimi-work","kimi-code"],getConfigPath:(e,t)=>o.join(t,".kimi-code","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},claude:{name:"Claude Desktop",aliases:["claude","claude-desktop"],getConfigPath:(e,t,r)=>e==="win32"?o.join(r||o.join(t,"AppData","Roaming"),"Claude","claude_desktop_config.json"):e==="darwin"?o.join(t,"Library","Application Support","Claude","claude_desktop_config.json"):o.join(t,".config","Claude","claude_desktop_config.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},devin:{name:"Devin Desktop (formerly Windsurf)",aliases:["devin","devin-desktop","windsurf","codeium"],getConfigPath:(e,t,r)=>{let n=e==="win32"&&r?r:o.join(t,".config"),s=o.join(n,"devin","mcp_config.json");return u.existsSync(s)?s:o.join(t,".codeium","windsurf","mcp_config.json")},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},antigravity:{name:"Antigravity (Google DeepMind)",aliases:["antigravity","agy","gemini"],getConfigPath:(e,t)=>o.join(t,".gemini","config","mcp_config.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},"pi-desktop":{name:"Pi Desktop / Pi Agent",aliases:["pi-desktop","pi","pi-agent"],getConfigPath:(e,t,r)=>{if(e==="win32"){let p=o.join(r||o.join(t,"AppData","Roaming"),".pi","agent","mcp.json");if(u.existsSync(p))return p;let g=o.join(t,".pi","agent","mcp.json");if(u.existsSync(g))return g;let c=o.join(t,".pi","mcp.json");return u.existsSync(c)?c:g}let n=o.join(t,".pi","agent","mcp.json");if(u.existsSync(n))return n;let s=o.join(t,".pi","mcp.json");return u.existsSync(s)?s:n},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},qwenpaw:{name:"QwenPaw (Personal Agent Workstation)",aliases:["qwenpaw","qwen-paw","copaw"],getConfigPath:(e,t)=>{let r=o.join(t,".qwenpaw","config.json");if(u.existsSync(r))return r;let n=o.join(t,".copaw","config.json");return u.existsSync(n)?n:r},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},cline:{name:"Cline (VS Code / CLI)",aliases:["cline","claude-dev"],getConfigPath:(e,t,r)=>{let n="";if(e==="win32"?n=o.join(r||o.join(t,"AppData","Roaming"),"Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"):e==="darwin"?n=o.join(t,"Library","Application Support","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"):n=o.join(t,".config","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),u.existsSync(n))return n;let s=o.join(t,".cline","data","settings","cline_mcp_settings.json");return u.existsSync(s)?s:n},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},kilo:{name:"Kilo Code",aliases:["kilo","kilocode","kilo-code"],getConfigPath:(e,t)=>{let r=o.join(t,".config","kilo","kilo.jsonc");if(u.existsSync(r))return r;let n=o.join(t,".config","kilo","kilo.json");return u.existsSync(n)?n:r},type:"json-mcp",defaultConfig:(e,t)=>({type:"local",command:[e,...t],enabled:!0})},qoder:{name:"Qoder",aliases:["qoder"],getConfigPath:(e,t)=>o.join(t,".qoder","settings.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},kiro:{name:"Kiro",aliases:["kiro","kiro-code"],getConfigPath:(e,t)=>o.join(t,".kiro","settings","mcp.json"),type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},trae:{name:"Trae",aliases:["trae"],getConfigPath:(e,t,r)=>{if(e==="win32"){let n=o.join(r||o.join(t,"AppData","Roaming"),"Trae","User","mcp.json");if(u.existsSync(n))return n;let s=o.join(r||o.join(t,"AppData","Roaming"),"Trae CN","User","mcp.json");return u.existsSync(s)?s:n}else if(e==="darwin"){let n=o.join(t,"Library","Application Support","Trae","User","mcp.json");if(u.existsSync(n))return n;let s=o.join(t,"Library","Application Support","Trae CN","User","mcp.json");return u.existsSync(s)?s:n}else{let n=o.join(t,".config","Trae","User","mcp.json");if(u.existsSync(n))return n;let s=o.join(t,".config","Trae CN","User","mcp.json");return u.existsSync(s)?s:n}},type:"json-mcpServers",defaultConfig:(e,t)=>({command:e,args:t})},codex:{name:"Codex",aliases:["codex"],getConfigPath:(e,t)=>o.join(t,".codex","config.toml"),type:"toml",defaultConfig:(e,t)=>({command:e,args:t})},openclaw:{name:"OpenClaw",aliases:["openclaw","open-claw"],getConfigPath:(e,t)=>o.join(t,".openclaw","openclaw.json"),type:"json-mcpServers",serverPath:["mcp","servers"],defaultConfig:(e,t)=>({command:e,args:t})},goose:{name:"Goose",aliases:["goose"],getConfigPath:(e,t,r)=>e==="win32"?o.join(r||o.join(t,"AppData","Roaming"),"Block","goose","config","config.yaml"):o.join(t,".config","goose","config.yaml"),type:"yaml",yamlProfile:"goose",defaultConfig:(e,t)=>({cmd:e,args:t})}},L=["mcpServers","servers","mcp"];function P(e){return Object.prototype.toString.call(e)==="[object Object]"}function U(e,t=!1){if(!e)return"";if(!t)try{return JSON.parse(e),e}catch{}let r=e.length,n=[],s=!1,p=!1,g=!1,c=!1,j=-1;for(let l=0;l<r;l++){let f=e[l],S=l+1<r?e[l+1]:"";if(g){(f===`
3
+ `||f==="\r")&&(g=!1,n.push(f));continue}if(c){f==="*"&&S==="/"&&(c=!1,l++);continue}if(s){n.push(f),p?p=!1:f==="\\"?p=!0:f==='"'&&(s=!1);continue}if(f==='"'){s=!0,p=!1,j=-1,n.push(f);continue}if(f==="/"&&S==="/"){g=!0,l++;continue}if(f==="/"&&S==="*"){c=!0,l++;continue}if(f===","){j=n.length,n.push(f);continue}if(f==="}"||f==="]"){j!==-1&&(n[j]=" ",j=-1),n.push(f);continue}f!==" "&&f!==" "&&f!==`
4
+ `&&f!=="\r"&&(j=-1),n.push(f)}return n.join("")}var W=/\s/;function te(e){for(let t=1;t<e.length;t++){if(e[t]!=="#"||!W.test(e[t-1]))continue;let r=t-1;for(;r>0&&W.test(e[r-1]);)r--;return e.slice(r)}return""}function q(e,t,r,n=!1,s="mcp"){let p=s==="goose"?{rootKey:"extensions",ownedKeys:["cmd","args","type"],freshEntry:(i,d,a)=>[`${i}superpowers:`,`${i}${i}name: "Superpowers"`,`${i}${i}cmd: ${JSON.stringify(d)}`,`${i}${i}args: ${JSON.stringify(a)}`,`${i}${i}enabled: true`,`${i}${i}type: stdio`,`${i}${i}timeout: 300`]}:{rootKey:"mcp_servers",ownedKeys:["command","args"],freshEntry:(i,d,a)=>[`${i}superpowers:`,`${i}${i}command: ${JSON.stringify(d)}`,`${i}${i}args: ${JSON.stringify(a)}`]};if(!/^[A-Za-z0-9_-]+$/.test(p.rootKey))throw new Error("Invalid YAML root key");let g=new RegExp(`^(\\s*)${p.rootKey}\\s*:`),c=new RegExp(`^(\\s*)${p.rootKey}\\s*:\\s*(?:#.*)?$`),j=new RegExp(`^\\s*["']?(?:${p.ownedKeys.join("|")})["']?\\s*:`),l=e?e.split(/\r?\n/):[],f=l.map((i,d)=>{let a=i.match(g);return a?{index:d,indent:a[1],tail:i.slice(a[0].length).trim()}:null}).filter(i=>i!==null),S=f.filter(i=>i.indent==="");if(S.length>1)throw new Error(`Cannot safely update YAML with duplicate ${p.rootKey} keys`);if(S.length===1){let i=S[0];if(i.tail!==""&&!i.tail.startsWith("#"))throw new Error(`Cannot safely update YAML unless ${p.rootKey} is a root-level block mapping`)}else if(f.length>0)throw new Error(`Cannot safely update YAML unless ${p.rootKey} is a root-level block mapping`);let k=" ";if(S.length===1)for(let i=S[0].index+1;i<l.length;i++){if(l[i].trim()===""||l[i].trimStart().startsWith("#"))continue;if(/^[^\s]/.test(l[i]))break;let d=l[i].match(/^(\s+)\S/);d&&(k=d[1]);break}if(n){let i=[],d=!1,a=0,m=!1,C=0;for(let x=0;x<l.length;x++){let v=l[x],b=v.match(c);if(b){d=!0,a=b[1].length,i.push(v);continue}if(d){let $=v.match(/^(\s*)/)?.[1].length||0;if(v.trimStart().startsWith("#")){i.push(v);continue}if(v.trim()!==""&&$<=a)d=!1,m=!1;else{let N=v.match(/^(\s*)superpowers:\s*(?:#.*)?$/);if(N&&N[1]===k){m=!0,C=N[1].length;continue}if(m){if($>C||v.trim()==="")continue;m=!1}}}i.push(v)}return i.join(`
5
+ `)}let y=p.freshEntry(k,t,r);if(!e||e.trim()==="")return`${p.rootKey}:
6
+ ${y.join(`
7
7
  `)}
8
- `;let C=i.length===1?i[0].index:-1;if(C===-1)return`${e.trimEnd()}
8
+ `;let w=S.length===1?S[0].index:-1;if(w===-1)return`${e.trimEnd()}
9
9
 
10
- mcp_servers:
11
- ${g.join(`
10
+ ${p.rootKey}:
11
+ ${y.join(`
12
12
  `)}
13
- `;let h=-1;for(let l=C+1;l<s.length;l++){let d=s[l];if(/^[^\s#]/.test(d))break;if((d.match(/^(\s*)/)?.[1]||"")===p&&/^\s+["']?superpowers["']?\s*:\s*(?:#.*)?$/.test(d)){h=l;break}}if(h!==-1){let l=s[h].match(/^(\s*)/)?.[1].length||2,d=h+1;for(;d<s.length;){let w=s[d];if((w.match(/^(\s*)/)?.[1].length||0)>l||w.trim()==="")d++;else break}let y=[],j=-1;for(let w=h+1;w<d;w++){let f=s[w];if(f.trim()==="")continue;let u=f.match(/^(\s*)/)?.[1].length??0;if(!(j!==-1&&u>j)){if(j=-1,u>l&&/^\s*["']?(?:command|args)["']?\s*:/.test(f)){j=u;continue}y.push(f)}}return g[0]+=Y(s[h]),s.splice(h,d-h,...g,...y),s.join(`
14
- `)}else return s.splice(C+1,0,...g),s.join(`
15
- `)}function U(e,t,r,o,s=!1,c){let i={},p=!1;if(e&&e.trim()!=="")try{let h=JSON.parse(e);if(!P(h))throw new Error("Existing JSON root must be an object");i=h}catch(h){try{let l=N(e,!0),d=JSON.parse(l);if(!P(d))throw new Error("Existing JSON root must be an object");i=d,p=l!==e}catch(l){let d=l instanceof Error?l.message:String(l),y=h instanceof Error?h.message:String(h);throw new Error(`Failed to parse existing JSON: ${d} (raw JSON error: ${y})`)}}let S=t==="json-servers"?"servers":t==="json-mcp"?"mcp":"mcpServers",m=I.find(h=>P(i[h])&&i[h].superpowers!==void 0)??S;if(i[m]!==void 0&&!P(i[m]))throw new Error(`Existing JSON field "${m}" must be an object`);i[m]===void 0&&(i[m]={});let g=i[m];if(s)delete g.superpowers;else{let h;c?h={...c}:t==="json-servers"?h={command:r,args:o,type:"stdio"}:t==="json-mcp"?h={type:"local",command:[r,...o],enabled:!0}:h={command:r,args:o};let l=g.superpowers;if(!P(l))g.superpowers=h;else{let d={...l,...h};(l.enabled!==void 0||l.disabled!==void 0)&&(l.enabled!==void 0?d.enabled=l.enabled:delete d.enabled),t==="json-mcp"&&Array.isArray(d.command)&&delete d.args,g.superpowers=d}}let C=JSON.stringify(i,null,2)+`
16
- `;return p&&C!==e&&process.stderr.write(`[superpowers-mcp] Warning: JSONC comments/trailing commas in the existing config were removed while updating it (the file is rewritten as plain JSON).
17
- `),C}function Q(e,t=10){try{let r=n.dirname(e),o=`${n.basename(e)}.`,s=".bak",c=a.readdirSync(r).filter(i=>{if(!i.startsWith(o)||!i.endsWith(s))return!1;let p=i.slice(o.length,i.length-s.length);return/^\d+$/.test(p)}).map(i=>{let p=n.join(r,i);try{return{full:p,mtimeMs:a.statSync(p).mtimeMs}}catch{return{full:p,mtimeMs:0}}}).sort((i,p)=>p.mtimeMs-i.mtimeMs);for(let i of c.slice(t))try{a.unlinkSync(i.full)}catch{}}catch{}}function J(e,t,r=!1,o=[],s){if(o.length===0)throw new Error("safeWriteConfig requires at least one allowed destination root");let c=e;try{let f=a.lstatSync(e,{throwIfNoEntry:!1});if(f&&f.isSymbolicLink()){try{c=a.realpathSync(e)}catch{let M=a.readlinkSync(e);c=n.resolve(n.dirname(e),M)}let u=n.normalize(n.resolve(c)).toLowerCase(),v=n.normalize(n.resolve(k.tmpdir())).toLowerCase();if(!(u===v||u.startsWith(v+n.sep))&&(["/etc","/bin","/sbin","/usr","/root","/sys","/proc","/dev","/private/etc","c:\\windows"].some($=>u===$||u.startsWith($+n.sep))||u==="/var"||u.startsWith("/var"+n.sep)&&!u.startsWith("/var/folders"+n.sep)||u==="/private/var"||u.startsWith("/private/var"+n.sep)&&!u.startsWith("/private/var/folders"+n.sep)))throw new Error(`Refusing to write to unsafe symlink target: ${c}`)}}catch(f){if(f instanceof Error&&f.message.includes("Refusing to write to unsafe symlink target"))throw f}let i=n.dirname(c);a.existsSync(i)||a.mkdirSync(i,{recursive:!0,mode:448});let p=a.realpathSync(i),S=a.statSync(p);c=n.join(p,n.basename(c));let m=n.normalize(n.resolve(c)).toLowerCase(),g=n.normalize(n.resolve(k.tmpdir())).toLowerCase(),C=m===g||m.startsWith(g+n.sep),l=["/etc","/bin","/sbin","/usr","/root","/sys","/proc","/dev","/private/etc","c:\\windows"].some(f=>m===f||m.startsWith(f+n.sep))||m==="/var"||m.startsWith("/var"+n.sep)&&!m.startsWith("/var/folders"+n.sep)||m==="/private/var"||m.startsWith("/private/var"+n.sep)&&!m.startsWith("/private/var/folders"+n.sep);if(!C&&l)throw new Error(`Refusing to write to unsafe configuration target: ${c}`);if(!o.some(f=>{if(!f)return!1;let u=n.resolve(f);try{u=a.realpathSync(u)}catch{}let v=n.relative(u,c);return v!==".."&&!v.startsWith(`..${n.sep}`)&&!n.isAbsolute(v)}))throw new Error(`Refusing to write configuration outside allowed roots: ${c}`);let y=384;if(a.existsSync(c)){try{y=a.statSync(c).mode}catch{}if(r){let f=a.readFileSync(c,"utf8"),u=`${c}.${Date.now()}.bak`;try{a.writeFileSync(u,f,{encoding:"utf8",mode:y})}catch(v){let x=v instanceof Error?v.message:String(v);throw new Error(`Failed to create safe backup before write: ${x}`)}Q(c)}}let j=O.randomBytes(8).toString("hex"),w=n.join(p,`.tmp.${n.basename(c)}.${process.pid}.${j}`);try{a.writeFileSync(w,t,{encoding:"utf8",mode:y,flag:"wx"});let f=a.existsSync(c);if(s===null&&f)throw new Error("Configuration changed concurrently before it could be created");if(s!=null&&(!f||a.readFileSync(c,"utf8")!==s))throw new Error("Configuration changed concurrently; refusing to overwrite newer content");let u=a.realpathSync(i),v=a.statSync(u);if(u!==p||v.dev!==S.dev||v.ino!==S.ino)throw new Error("Configuration directory changed while writing");a.renameSync(w,c)}catch(f){try{a.existsSync(w)&&a.unlinkSync(w)}catch{}throw f}}async function L(e={}){let t=e.platform||k.platform(),r=e.homeDir||k.homedir(),o=e.appData||process.env.APPDATA,s=e.localAppData||process.env.LOCALAPPDATA,c=!!e.dryRun,i=!!e.remove,p=!!e.bun,S=e.target?e.target.toLowerCase():null,m=p?"bunx":"npx",g=["-y","superpowers-mcp"],C=[];if(!S)throw new Error(`No target client specified. Please specify which client to configure using --target <${Object.keys(b).join("|")}>.`);let h=Object.keys(b).find(d=>d===S||b[d].aliases.includes(S));if(!h)throw new Error(`Unknown harness target: "${S}". Supported targets: ${Object.keys(b).join(", ")}`);let l=[h];for(let d of l){let y=b[d],j=y.getConfigPath(t,r,o,s),w=a.existsSync(j);if(i&&!w){C.push({target:d,name:y.name,path:j,status:"up-to-date",message:"Already not configured (file does not exist)"});continue}try{let f="";w&&(f=a.readFileSync(j,"utf8"));let u="";if(y.type==="yaml")u=T(f,m,g,i);else{let v=typeof y.defaultConfig=="function"?y.defaultConfig(m,g):void 0;u=U(f,y.type,m,g,i,v)}if(f.trim()===u.trim()&&w){C.push({target:d,name:y.name,path:j,status:"up-to-date",message:i?"Already not configured":"Already configured and up-to-date"});continue}c||J(j,u,!!e.backup,[r,o||"",s||""],w?f:null),C.push({target:d,name:y.name,path:j,status:i?"removed":w?"updated":"created",message:c?`[Dry Run] Would ${i?"remove from":w?"update":"create"} ${j}`:`Successfully ${i?"removed from":w?"updated":"configured"}!`})}catch(f){let u=f instanceof Error?f.message:String(f);C.push({target:d,name:y.name,path:j,status:"error",message:u})}}return C}async function R(e=process.argv.slice(2)){let t=!1,r={dryRun:!1,remove:!1,bun:!1,backup:!1,target:null};for(let o=0;o<e.length;o++){let s=e[o];if(!(s==="setup"||s==="install"||s==="--setup"))if(s==="--print-config")t=!0;else if(s==="--dry-run")r.dryRun=!0;else if(s==="--remove"||s==="--uninstall")r.remove=!0;else if(s==="--bun")r.bun=!0;else if(s==="--backup")r.backup=!0;else if(s==="--target"||s==="-t"){let c=e[o+1];if(!c||c.startsWith("-")){console.error(`\u274C Error: Missing value for --target flag.
18
- `),process.exitCode=1;return}r.target=e[++o]}else if(s.startsWith("--target=")){let c=s.split("=")[1];if(!c){console.error(`\u274C Error: Missing value for --target flag.
19
- `),process.exitCode=1;return}r.target=c}else if(s==="--help"||s==="-h"){B();return}else if(s.startsWith("-")){console.error(`\u274C Error: Unknown option "${s}". Use --help for usage.
13
+ `;let h=-1;for(let i=w+1;i<l.length;i++){let d=l[i];if(/^[^\s#]/.test(d))break;if((d.match(/^(\s*)/)?.[1]||"")===k&&/^\s+["']?superpowers["']?\s*:\s*(?:#.*)?$/.test(d)){h=i;break}}if(h!==-1){let i=l[h].match(/^(\s*)/)?.[1].length||2,d=h+1;for(;d<l.length;){let v=l[d];if((v.match(/^(\s*)/)?.[1].length||0)>i||v.trim()==="")d++;else break}let a=[],m=-1,C=i+k.length;for(let v=h+1;v<d;v++){let b=l[v];if(b.trim()==="")continue;let $=b.match(/^(\s*)/)?.[1].length??0;if(!(m!==-1&&$>m)){if(m=-1,$===C&&j.test(b)){m=$;continue}a.push(b)}}y[0]+=te(l[h]);let x=y.filter((v,b)=>{if(b===0)return!0;let $=v.match(/^\s*["']?([A-Za-z0-9_-]+)["']?\s*:/);return!$||p.ownedKeys.includes($[1])});return l.splice(h,d-h,...x,...a),l.join(`
14
+ `)}else return l.splice(w+1,0,...y),l.join(`
15
+ `)}function J(e){let t=null;for(let r=0;r<e.length;r++){let n=e[r];if(t){if(t==='"'&&n==="\\"&&r+1<e.length){r++;continue}n===t&&(t=null);continue}if(n==='"'||n==="'"){t=n;continue}if(n==="#"){let s=r;for(;s>0&&W.test(e[s-1]);)s--;return[e.slice(0,s),e.slice(s)]}}return[e,""]}var ne=/^\s*\[\s*mcp_servers\s*\.\s*superpowers\s*\]\s*(?:#.*)?$/;function E(e){return e===" "||e===" "||e===`
16
+ `||e==="\r"||e==="\f"||e==="\v"}function D(e){let t=0;for(;t<e.length&&E(e[t]);)t++;if(t>=e.length||e[t]!=="[")return!1;let r=e.lastIndexOf("]");if(r<=t)return!1;let n=r+1;for(;n<e.length&&E(e[n]);)n++;return n>=e.length?!0:e[n]==="#"}var se=/^\s*\[\s*mcp_servers\s*\.\s*superpowers\s*\./;function re(e){let t=0;for(;t<e.length&&E(e[t]);)t++;if(t>=e.length||e[t]!=="[")return!1;let r=e.lastIndexOf("]");if(r<=t)return!1;let n=r+1;for(;n<e.length&&E(e[n]);)n++;if(n<e.length&&e[n]!=="#")return!1;let s=e.slice(t+1,r);return!s.includes("mcp_servers")||!s.includes("superpowers")?!1:s.includes('"')||s.includes("'")}function oe(e){let t=0;for(;t<e.length&&E(e[t]);)t++;let r=null;if(e.startsWith("command",t))r="command",t+=7;else if(e.startsWith("args",t))r="args",t+=4;else return null;for(;t<e.length&&E(e[t]);)t++;if(t>=e.length||e[t]!=="=")return null;for(t++;t<e.length&&E(e[t]);)t++;let n=e.length;for(;n>t&&E(e[n-1]);)n--;return{key:r,value:e.slice(t,n)}}var ie=/^\s*(command|args)\s*=/;function H(e,t,r,n=!1){let s=e?e.split(/\r?\n/):[];for(let a of s)if(/^\s*mcp_servers(?:\s*\.\s*[A-Za-z0-9_-]+)*\s*=/.test(a))throw new Error("Cannot safely update TOML with inline mcp_servers assignment (expected [mcp_servers.superpowers] table)");let p=[];for(let a=0;a<s.length;a++){if(re(s[a]))throw new Error("Cannot safely update TOML with quoted mcp_servers.superpowers table names");ne.test(s[a])&&p.push(a)}if(p.length>1)throw new Error("Cannot safely update TOML with duplicate mcp_servers.superpowers tables");let g=`command = ${JSON.stringify(t)}`,c=`args = ${JSON.stringify(r)}`,j=a=>a.replace(/'/g,'"').replace(/\s+/g,"");if(p.length===0){if(n)return e;let a=`[mcp_servers.superpowers]
17
+ ${g}
18
+ ${c}
19
+ `;return!e||e.trim()===""?a:`${e.trimEnd()}
20
+
21
+ ${a}`}let l=p[0],f=l+1;for(;f<s.length&&!(D(s[f])&&!se.test(s[f]));)f++;let S=f;for(let a=l+1;a<f;a++)if(D(s[a])){S=a;break}if(n)return s.slice(0,l).concat(s.slice(f)).join(`
22
+ `);let k=null,y=null,w={};for(let a=l+1;a<S;a++){let[m,C]=J(s[a]),x=oe(m);x&&(x.key==="command"?k===null&&(k=j(x.value)):y===null&&(y=j(x.value)),x.key in w||(w[x.key]=C))}if(k===j(JSON.stringify(t))&&y===j(JSON.stringify(r)))return e;let h=[`${g}${w.command??""}`,`${c}${w.args??""}`],i=s.slice(0,l+1),d=!1;for(let a=l+1;a<S;a++){let[m]=J(s[a]);if(ie.test(m)){d||(i.push(...h),d=!0);continue}i.push(s[a])}return d||i.push(...h),i.push(...s.slice(S,f)),i.push(...s.slice(f)),i.join(`
23
+ `)}function M(e,t,r){if(!P(e))return t;let n={...e,...t};return(e.enabled!==void 0||e.disabled!==void 0)&&(e.enabled!==void 0?n.enabled=e.enabled:delete n.enabled),r==="json-mcp"&&Array.isArray(n.command)&&delete n.args,n}function z(e,t,r,n,s=!1,p,g){let c={},j=!1;if(e&&e.trim()!=="")try{let y=JSON.parse(e);if(!P(y))throw new Error("Existing JSON root must be an object");c=y}catch(y){try{let w=U(e,!0),h=JSON.parse(w);if(!P(h))throw new Error("Existing JSON root must be an object");c=h,j=w!==e}catch(w){let h=w instanceof Error?w.message:String(w),i=y instanceof Error?y.message:String(y);throw new Error(`Failed to parse existing JSON: ${h} (raw JSON error: ${i})`)}}let l=t==="json-servers"?"servers":t==="json-mcp"?"mcp":"mcpServers";if(g&&g.length>0){let y=g.join(".");for(let i of g){if(typeof i!="string"||i.length===0)throw new Error(`Invalid JSON field "${y}"`);if(i==="__proto__"||i==="constructor"||i==="prototype")throw new Error(`Refusing to use unsafe JSON field "${y}"`);if(!/^[A-Za-z0-9_-]+$/.test(i))throw new Error(`Invalid JSON field "${y}"`)}let w=c;for(let i of g){if(i==="__proto__"||i==="constructor"||i==="prototype")throw new Error(`Refusing to use unsafe JSON field "${y}"`);let d=w[i];if(d===void 0){if(s)return e;w[i]={}}else if(!P(d))throw new Error(`Existing JSON field "${y}" must be an object`);w=w[i]}if(s)delete w.superpowers;else{let i=p?{...p}:{command:r,args:n};w.superpowers=M(w.superpowers,i,t)}let h=JSON.stringify(c,null,2)+`
24
+ `;return j&&h!==e&&process.stderr.write(`[superpowers-mcp] Warning: JSONC comments/trailing commas in the existing config were removed while updating it (the file is rewritten as plain JSON).
25
+ `),h}let f=L.find(y=>P(c[y])&&c[y].superpowers!==void 0)??l;if(c[f]!==void 0&&!P(c[f]))throw new Error(`Existing JSON field "${f}" must be an object`);c[f]===void 0&&(c[f]={});let S=c[f];if(s)delete S.superpowers;else{let y;p?y={...p}:t==="json-servers"?y={command:r,args:n,type:"stdio"}:t==="json-mcp"?y={type:"local",command:[r,...n],enabled:!0}:y={command:r,args:n},S.superpowers=M(S.superpowers,y,t)}let k=JSON.stringify(c,null,2)+`
26
+ `;return j&&k!==e&&process.stderr.write(`[superpowers-mcp] Warning: JSONC comments/trailing commas in the existing config were removed while updating it (the file is rewritten as plain JSON).
27
+ `),k}function ae(e,t=10){try{let r=o.dirname(e),n=`${o.basename(e)}.`,s=".bak",p=u.readdirSync(r).filter(g=>{if(!g.startsWith(n)||!g.endsWith(s))return!1;let c=g.slice(n.length,g.length-s.length);return/^\d+$/.test(c)}).map(g=>{let c=o.join(r,g);try{return{full:c,mtimeMs:u.statSync(c).mtimeMs}}catch{return{full:c,mtimeMs:0}}}).sort((g,c)=>c.mtimeMs-g.mtimeMs);for(let g of p.slice(t))try{u.unlinkSync(g.full)}catch{}}catch{}}function F(e,t,r=!1,n=[],s){if(n.length===0)throw new Error("safeWriteConfig requires at least one allowed destination root");let p=e;try{let a=u.lstatSync(e,{throwIfNoEntry:!1});if(a&&a.isSymbolicLink()){try{p=u.realpathSync(e)}catch{let $=u.readlinkSync(e);p=o.resolve(o.dirname(e),$)}let m=o.normalize(o.resolve(p)).toLowerCase(),C=o.normalize(o.resolve(_.tmpdir())).toLowerCase();if(!(m===C||m.startsWith(C+o.sep))&&(["/etc","/bin","/sbin","/usr","/root","/sys","/proc","/dev","/private/etc","c:\\windows"].some(b=>m===b||m.startsWith(b+o.sep))||m==="/var"||m.startsWith("/var"+o.sep)&&!m.startsWith("/var/folders"+o.sep)||m==="/private/var"||m.startsWith("/private/var"+o.sep)&&!m.startsWith("/private/var/folders"+o.sep)))throw new Error(`Refusing to write to unsafe symlink target: ${p}`)}}catch(a){if(a instanceof Error&&a.message.includes("Refusing to write to unsafe symlink target"))throw a}let g=o.dirname(p);u.existsSync(g)||u.mkdirSync(g,{recursive:!0,mode:448});let c=u.realpathSync(g),j=u.statSync(c);p=o.join(c,o.basename(p));let l=o.normalize(o.resolve(p)).toLowerCase(),f=o.normalize(o.resolve(_.tmpdir())).toLowerCase(),S=l===f||l.startsWith(f+o.sep),y=["/etc","/bin","/sbin","/usr","/root","/sys","/proc","/dev","/private/etc","c:\\windows"].some(a=>l===a||l.startsWith(a+o.sep))||l==="/var"||l.startsWith("/var"+o.sep)&&!l.startsWith("/var/folders"+o.sep)||l==="/private/var"||l.startsWith("/private/var"+o.sep)&&!l.startsWith("/private/var/folders"+o.sep);if(!S&&y)throw new Error(`Refusing to write to unsafe configuration target: ${p}`);if(!n.some(a=>{if(!a)return!1;let m=o.resolve(a);try{m=u.realpathSync(m)}catch{}let C=o.relative(m,p);return C!==".."&&!C.startsWith(`..${o.sep}`)&&!o.isAbsolute(C)}))throw new Error(`Refusing to write configuration outside allowed roots: ${p}`);let h=384;if(u.existsSync(p)){try{h=u.statSync(p).mode}catch{}if(r){let a=u.readFileSync(p,"utf8"),m=`${p}.${Date.now()}.bak`;try{u.writeFileSync(m,a,{encoding:"utf8",mode:h})}catch(C){let x=C instanceof Error?C.message:String(C);throw new Error(`Failed to create safe backup before write: ${x}`)}ae(p)}}let i=K.randomBytes(8).toString("hex"),d=o.join(c,`.tmp.${o.basename(p)}.${process.pid}.${i}`);try{u.writeFileSync(d,t,{encoding:"utf8",mode:h,flag:"wx"});let a=u.existsSync(p);if(s===null&&a)throw new Error("Configuration changed concurrently before it could be created");if(s!=null&&(!a||u.readFileSync(p,"utf8")!==s))throw new Error("Configuration changed concurrently; refusing to overwrite newer content");let m=u.realpathSync(g),C=u.statSync(m);if(m!==c||C.dev!==j.dev||C.ino!==j.ino)throw new Error("Configuration directory changed while writing");u.renameSync(d,p)}catch(a){try{u.existsSync(d)&&u.unlinkSync(d)}catch{}throw a}}async function G(e={}){let t=e.platform||_.platform(),r=e.homeDir||_.homedir(),n=e.appData||process.env.APPDATA,s=e.localAppData||process.env.LOCALAPPDATA,p=!!e.dryRun,g=!!e.remove,c=!!e.bun,j=e.target?e.target.toLowerCase():null,l=c?"bunx":"npx",f=["-y","superpowers-mcp"],S=[];if(!j)throw new Error(`No target client specified. Please specify which client to configure using --target <${Object.keys(A).join("|")}>.`);let k=Object.keys(A).find(w=>w===j||A[w].aliases.includes(j));if(!k)throw new Error(`Unknown harness target: "${j}". Supported targets: ${Object.keys(A).join(", ")}`);let y=[k];for(let w of y){let h=A[w],i=h.getConfigPath(t,r,n,s),d=u.existsSync(i);if(g&&!d){S.push({target:w,name:h.name,path:i,status:"up-to-date",message:"Already not configured (file does not exist)"});continue}try{let a="";d&&(a=u.readFileSync(i,"utf8"));let m="";if(h.type==="yaml")m=q(a,l,f,g,h.yamlProfile);else if(h.type==="toml")m=H(a,l,f,g);else{let C=typeof h.defaultConfig=="function"?h.defaultConfig(l,f):void 0;m=z(a,h.type,l,f,g,C,h.serverPath)}if(a.trim()===m.trim()&&d){S.push({target:w,name:h.name,path:i,status:"up-to-date",message:g?"Already not configured":"Already configured and up-to-date"});continue}p||F(i,m,!!e.backup,[r,n||"",s||""],d?a:null),S.push({target:w,name:h.name,path:i,status:g?"removed":d?"updated":"created",message:p?`[Dry Run] Would ${g?"remove from":d?"update":"create"} ${i}`:`Successfully ${g?"removed from":d?"updated":"configured"}!`})}catch(a){let m=a instanceof Error?a.message:String(a);S.push({target:w,name:h.name,path:i,status:"error",message:m})}}return S}async function T(e=process.argv.slice(2)){let t=!1,r={dryRun:!1,remove:!1,bun:!1,backup:!1,target:null};for(let n=0;n<e.length;n++){let s=e[n];if(!(s==="setup"||s==="install"||s==="--setup"))if(s==="--print-config")t=!0;else if(s==="--dry-run")r.dryRun=!0;else if(s==="--remove"||s==="--uninstall")r.remove=!0;else if(s==="--bun")r.bun=!0;else if(s==="--backup")r.backup=!0;else if(s==="--target"||s==="-t"){let p=e[n+1];if(!p||p.startsWith("-")){console.error(`\u274C Error: Missing value for --target flag.
28
+ `),process.exitCode=1;return}r.target=e[++n]}else if(s.startsWith("--target=")){let p=s.split("=")[1];if(!p){console.error(`\u274C Error: Missing value for --target flag.
29
+ `),process.exitCode=1;return}r.target=p}else if(s==="--help"||s==="-h"){pe();return}else if(s.startsWith("-")){console.error(`\u274C Error: Unknown option "${s}". Use --help for usage.
20
30
  `),process.exitCode=1;return}else if(!r.target)r.target=s;else{console.error(`\u274C Error: Unexpected argument "${s}". Use --help for usage.
21
31
  `),process.exitCode=1;return}}if(t){if(r.target||r.remove||r.backup||r.dryRun){console.error("--print-config supports only --bun; omit target and file-operation flags."),process.exitCode=1;return}console.log(JSON.stringify({mcpServers:{superpowers:{command:r.bun?"bunx":"npx",args:["-y","superpowers-mcp"]}}},null,2));return}if(console.log(`
22
32
  ========================================================`),console.log("\u26A1 Superpowers MCP - Targeted Client Setup"),console.log(`========================================================
23
33
  `),!r.target){console.log(`Please select which AI Agent client you would like to configure:
24
- `),console.log(" npx -y superpowers-mcp setup --target lmstudio # LM Studio (~/.lmstudio/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target roo # Roo Code in VS Code Desktop"),console.log(" npx -y superpowers-mcp setup --print-config # JSON for desktop app import"),console.log(" npx -y superpowers-mcp setup --target antigravity # Antigravity (~/.gemini/config/mcp_config.json)"),console.log(" npx -y superpowers-mcp setup --target pi-desktop # Pi Desktop / Pi Agent (~/.pi/agent/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target cursor # Cursor (~/.cursor/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target copilot # GitHub Copilot (VS Code mcp.json)"),console.log(" npx -y superpowers-mcp setup --target copilot-insiders # GitHub Copilot (VS Code Insiders mcp.json)"),console.log(" npx -y superpowers-mcp setup --target hermes # Hermes Desktop / Agent"),console.log(" npx -y superpowers-mcp setup --target kimi # Kimi Work / Kimi Code"),console.log(" npx -y superpowers-mcp setup --target claude # Claude Desktop"),console.log(" npx -y superpowers-mcp setup --target devin # Devin Desktop (formerly Windsurf)"),console.log(" npx -y superpowers-mcp setup --target qwenpaw # QwenPaw / CoPaw (~/.qwenpaw/config.json)"),console.log(" npx -y superpowers-mcp setup --target cline # Cline (~/.../cline_mcp_settings.json)"),console.log(" npx -y superpowers-mcp setup --target kilo # Kilo Code (~/.config/kilo/kilo.jsonc)"),console.log(" npx -y superpowers-mcp setup --target qoder # Qoder (~/.qoder/settings.json)"),console.log(" npx -y superpowers-mcp setup --target kiro # Kiro (~/.kiro/settings/mcp.json)"),console.log(` npx -y superpowers-mcp setup --target trae # Trae (~/.../Trae/User/mcp.json)
34
+ `),console.log(" npx -y superpowers-mcp setup --target lmstudio # LM Studio (~/.lmstudio/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target roo # Roo Code in VS Code Desktop"),console.log(" npx -y superpowers-mcp setup --print-config # JSON for desktop app import"),console.log(" npx -y superpowers-mcp setup --target antigravity # Antigravity (~/.gemini/config/mcp_config.json)"),console.log(" npx -y superpowers-mcp setup --target pi-desktop # Pi Desktop / Pi Agent (~/.pi/agent/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target cursor # Cursor (~/.cursor/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target copilot # GitHub Copilot (VS Code mcp.json)"),console.log(" npx -y superpowers-mcp setup --target copilot-insiders # GitHub Copilot (VS Code Insiders mcp.json)"),console.log(" npx -y superpowers-mcp setup --target hermes # Hermes Desktop / Agent"),console.log(" npx -y superpowers-mcp setup --target kimi # Kimi Work / Kimi Code"),console.log(" npx -y superpowers-mcp setup --target claude # Claude Desktop"),console.log(" npx -y superpowers-mcp setup --target devin # Devin Desktop (formerly Windsurf)"),console.log(" npx -y superpowers-mcp setup --target qwenpaw # QwenPaw / CoPaw (~/.qwenpaw/config.json)"),console.log(" npx -y superpowers-mcp setup --target cline # Cline (~/.../cline_mcp_settings.json)"),console.log(" npx -y superpowers-mcp setup --target kilo # Kilo Code (~/.config/kilo/kilo.jsonc)"),console.log(" npx -y superpowers-mcp setup --target qoder # Qoder (~/.qoder/settings.json)"),console.log(" npx -y superpowers-mcp setup --target kiro # Kiro (~/.kiro/settings/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target trae # Trae (~/.../Trae/User/mcp.json)"),console.log(" npx -y superpowers-mcp setup --target codex # Codex (~/.codex/config.toml)"),console.log(" npx -y superpowers-mcp setup --target openclaw # OpenClaw (~/.openclaw/openclaw.json)"),console.log(` npx -y superpowers-mcp setup --target goose # Goose (~/.config/goose/config.yaml)
25
35
  `),console.log("\u{1F4A1} Tip:"),console.log(" You can run this setup command from ANY folder on your system."),console.log(` It automatically targets your global config files (~/...) without needing to clone this repo.
26
36
  `),console.log("\u{1F4A1} Privacy & Safety:"),console.log(" Superpowers MCP only configures the specific client you explicitly choose."),console.log(` It will NEVER silently scan or modify unselected environments.
27
- `),process.exitCode=1;return}try{let o=await L(r),s=0,c=0,i=0;for(let p of o){let S=p.status==="created"||p.status==="updated"||p.status==="removed"?"\u2705":p.status==="up-to-date"?"\u2728":p.status==="skipped"?"\u23ED\uFE0F ":"\u274C";console.log(`${S} [${p.name}] (${p.status})`),console.log(` Path: ${p.path}`),console.log(` Info: ${p.message}
28
- `),p.status==="created"||p.status==="updated"||p.status==="up-to-date"||p.status==="removed"?s++:p.status==="skipped"?c++:p.status==="error"&&i++}if(console.log("--------------------------------------------------------"),i>0){console.error(`\u26A0\uFE0F Setup finished with errors: ${i} failure(s), ${s} succeeded.`),process.exitCode=1;return}console.log(`\u{1F389} Setup complete! ${s} environment(s) ready.`)}catch(o){let s=o instanceof Error?o.message:String(o);console.error(`\u274C Setup failed: ${s}
29
- `),process.exitCode=1}}function B(){console.log(`
37
+ `),process.exitCode=1;return}try{let n=await G(r),s=0,p=0,g=0;for(let c of n){let j=c.status==="created"||c.status==="updated"||c.status==="removed"?"\u2705":c.status==="up-to-date"?"\u2728":c.status==="skipped"?"\u23ED\uFE0F ":"\u274C";console.log(`${j} [${c.name}] (${c.status})`),console.log(` Path: ${c.path}`),console.log(` Info: ${c.message}
38
+ `),c.status==="created"||c.status==="updated"||c.status==="up-to-date"||c.status==="removed"?s++:c.status==="skipped"?p++:c.status==="error"&&g++}if(console.log("--------------------------------------------------------"),g>0){console.error(`\u26A0\uFE0F Setup finished with errors: ${g} failure(s), ${s} succeeded.`),process.exitCode=1;return}console.log(`\u{1F389} Setup complete! ${s} environment(s) ready.`)}catch(n){let s=n instanceof Error?n.message:String(n);console.error(`\u274C Setup failed: ${s}
39
+ `),process.exitCode=1}}function pe(){console.log(`
30
40
  Superpowers MCP - Targeted Global Setup
31
41
 
32
42
  Usage:
@@ -38,7 +48,8 @@ Options:
38
48
  copilot (vscode), copilot-insiders (vscode-insiders, code-insiders, insiders),
39
49
  hermes, kimi, claude, devin (windsurf),
40
50
  qwenpaw (qwen-paw, copaw), cline (claude-dev), kilo (kilocode),
41
- qoder, kiro (kiro-code), trae, lmstudio (lm-studio), roo (roo-code, roocode)
51
+ qoder, kiro (kiro-code), trae, lmstudio (lm-studio), roo (roo-code, roocode),
52
+ codex, openclaw (open-claw), goose
42
53
  --print-config Print importable mcpServers JSON without writing files (optional --bun)
43
54
  --bun Use "bunx" instead of "npx" in server commands
44
55
  --backup Create a timestamped .bak backup before modifying (Default: false, zero-pollution)
@@ -62,6 +73,9 @@ Examples:
62
73
  npx -y superpowers-mcp setup --target qoder # Configure Qoder only
63
74
  npx -y superpowers-mcp setup --target kiro # Configure Kiro only
64
75
  npx -y superpowers-mcp setup --target trae # Configure Trae only
76
+ npx -y superpowers-mcp setup --target codex # Configure Codex only
77
+ npx -y superpowers-mcp setup --target openclaw # Configure OpenClaw only
78
+ npx -y superpowers-mcp setup --target goose # Configure Goose only
65
79
 
66
80
  Any Directory:
67
81
  You can run this command from ANY directory on your machine.
@@ -70,4 +84,4 @@ Any Directory:
70
84
  Privacy & Safety:
71
85
  Superpowers MCP only touches the client you explicitly choose.
72
86
  It never bulk-modifies your environment without your consent.
73
- `)}R().catch(e=>{let t=e instanceof Error?e.message:String(e);console.error(`\u274C Fatal error: ${t}`),process.exitCode=1});0&&(module.exports={HARNESS_CONFIGS,JSON_SERVER_ROOT_KEYS,isPlainObject,runSetup,runSetupCli,safeWriteConfig,stripJsonComments,updateJsonConfig,updateYamlConfig});
87
+ `)}T().catch(e=>{let t=e instanceof Error?e.message:String(e);console.error(`\u274C Fatal error: ${t}`),process.exitCode=1});0&&(module.exports={HARNESS_CONFIGS,JSON_SERVER_ROOT_KEYS,isPlainObject,runSetup,runSetupCli,safeWriteConfig,stripJsonComments,updateJsonConfig,updateTomlConfig,updateYamlConfig});
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "superpowers-mcp",
3
3
  "displayName": "Superpowers MCP",
4
4
  "description": "Superpowers skills library (TDD, debugging, collaboration workflows) as an MCP server for VSCode and Antigravity",
5
- "version": "6.4.2",
5
+ "version": "6.4.4",
6
6
  "engines": {
7
7
  "node": ">=18"
8
8
  },
@@ -3,7 +3,7 @@
3
3
  # Superpowers MCP - One-Click Global Installer (macOS & Linux)
4
4
  # Usage:
5
5
  # curl -fsSL https://raw.githubusercontent.com/Poseidoncode/superpowers-mcp/main/scripts/install.sh | bash -s -- --target <client>
6
- # ./scripts/install.sh --target <antigravity|pi-desktop|cursor|copilot|copilot-insiders|hermes|kimi|claude|devin|qwenpaw|cline|kilo|qoder|kiro|trae|lmstudio|roo>
6
+ # ./scripts/install.sh --target <antigravity|pi-desktop|cursor|copilot|copilot-insiders|hermes|kimi|claude|devin|qwenpaw|cline|kilo|qoder|kiro|trae|lmstudio|roo|codex|openclaw|goose>
7
7
  # ==============================================================================
8
8
 
9
9
  set -euo pipefail