codex-1up 0.2.5 → 0.2.7

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.
Files changed (3) hide show
  1. package/README.md +4 -1
  2. package/dist/main.js +35 -35
  3. package/package.json +7 -6
package/README.md CHANGED
@@ -31,6 +31,8 @@ codex-1up install
31
31
  - Open a new terminal session (or source your shell rc)
32
32
  - Run `codex` to sign in and start using the agent! 🎉
33
33
 
34
+ > **⚠️ Security Warning:** `codex-1up` helps you set up Codex CLI, but **use caution with the `yolo` profile**. The `yolo` profile grants full system access and can modify any file on your computer. If you're unsure what you're doing, use the default `balanced` profile or the standard Codex install. Always review changes before approving them.
35
+
34
36
  ### What gets installed
35
37
 
36
38
  | Component | Why it matters |
@@ -54,7 +56,7 @@ codex-1up install
54
56
  | balanced (default) | Approvals on-request; workspace-write sandbox with network access inside workspace. |
55
57
  | safe | Approvals on-failure; workspace-write sandbox; conservative. |
56
58
  | minimal | Medium reasoning effort; web search off. |
57
- | yolo | Never ask for approvals; danger-full-access (only trusted environments). |
59
+ | yolo | Never ask for approvals; danger-full-access (only trusted environments). ⚠️ **Warning:** Grants full system access—use with extreme caution. |
58
60
 
59
61
  Switch profiles anytime: `codex --profile <name>` for a session, or `codex-1up config set-profile <name>` to persist.
60
62
 
@@ -84,6 +86,7 @@ See memory behavior with AGENTS.md in the official docs: [Memory with AGENTS.md]
84
86
 
85
87
  - macOS (Intel/Apple Silicon) via **Homebrew**
86
88
  - Linux via **apt**, **dnf**, **pacman**, or **zypper**
89
+ - **Note:** Linux package managers require `sudo` access (or running as root) to install tools. If `sudo` is not available or fails, the installer will skip tool installations gracefully with a warning message.
87
90
  - Windows users: use **WSL** (Ubuntu) and run the Linux path
88
91
 
89
92
  ### Common flags
package/dist/main.js CHANGED
@@ -1,61 +1,61 @@
1
- import{runMain as ho}from"citty";import{defineCommand as lo}from"citty";import{readFileSync as po}from"fs";import{fileURLToPath as co}from"url";import{dirname as fo,join as uo}from"path";import{defineCommand as St}from"citty";import{fileURLToPath as Rt}from"url";import{dirname as Et,resolve as x}from"path";import{promises as X}from"fs";import*as J from"os";import{accessSync as Pt}from"fs";import*as ye from"toml";import*as l from"@clack/prompts";import{which as F,$ as K}from"zx";import Ct from"fs-extra";import*as me from"path";import*as Me from"os";import{createWriteStream as it}from"fs";function Re(e){let t=null;try{t=it(e,{flags:"a"})}catch{}let o=(i,n)=>{let r=i?`${i} ${n}
1
+ import{runMain as Co}from"citty";import{defineCommand as ho}from"citty";import{readFileSync as wo}from"fs";import{fileURLToPath as yo}from"url";import{dirname as bo,join as ko}from"path";import{defineCommand as Nt}from"citty";import{fileURLToPath as Tt}from"url";import{dirname as Dt,resolve as D}from"path";import{promises as ee}from"fs";import*as Z from"os";import{accessSync as At}from"fs";import*as Se from"toml";import*as l from"@clack/prompts";import{which as W,$ as Q}from"zx";import It from"fs-extra";import*as $e from"path";import*as Ke from"os";import{createWriteStream as dt}from"fs";function Te(e){let t=null;try{t=dt(e,{flags:"a"})}catch{}let o=(r,n)=>{let i=r?`${r} ${n}
2
2
  `:`${n}
3
- `;process.stdout.write(r),t&&t.write(r)};return{log:i=>o("",i),info:i=>o("",i),ok:i=>o("\u2714",i),warn:i=>o("\u26A0",i),err:i=>o("\u2716",i)}}import{$ as L}from"zx";import{which as rt,$ as at}from"zx";import{spawn as st}from"child_process";async function u(e){try{return await rt(e),!0}catch{return!1}}async function Ee(){return await u("brew")?"brew":await u("apt-get")?"apt":await u("dnf")?"dnf":await u("pacman")?"pacman":await u("zypper")?"zypper":"none"}async function ee(e){if(await u("pnpm"))try{if((await at`pnpm bin -g`.quiet()).stdout.trim())return"pnpm";e?.warn('Detected pnpm but global bin dir is not configured; skipping global Node installs to avoid duplicates. Run "pnpm setup" then re-run.')}catch{e?.warn('Detected pnpm but global bin dir is not configured; skipping global Node installs to avoid duplicates. Run "pnpm setup" then re-run.')}return await u("pnpm")?"none":"npm"}async function g(e,t,o={dryRun:!1}){if(o.dryRun){let n=[e,...t].map(r=>r.includes(" ")?`"${r}"`:r).join(" ");o.logger?.log(`[dry-run] ${n}`);return}let i=st(e,t,{stdio:"inherit",cwd:o.cwd||process.cwd(),shell:!1});await new Promise((n,r)=>{i.on("error",r),i.on("exit",a=>{if(a===0)return n();r(new Error(`Command failed (${a}): ${e} ${t.join(" ")}`))})})}function T(e){let t=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return`${e}.backup.${t}`}import Pe from"fs-extra";import*as U from"path";import*as z from"os";async function Ie(e){let t=await u("node"),o=await u("npm");if(t&&o){let n=(await L`node -v`).stdout.trim();e.logger.ok(`Node.js present (${n})`);return}switch(e.options.installNode){case"nvm":await lt(e);break;case"brew":await pt(e);break;case"skip":e.logger.warn("Skipping Node installation; please install Node 18+ manually");return}if(await u("node")){let n=(await L`node -v`).stdout.trim();e.logger.ok(`Node.js installed (${n})`)}else throw e.logger.err("Node installation failed"),new Error("Node.js installation failed")}async function lt(e){if(e.logger.info("Installing Node.js via nvm"),e.options.dryRun){e.logger.log("[dry-run] install nvm + Node LTS");return}let t=U.join(e.homeDir,".nvm"),o=U.join(t,"nvm.sh");await Pe.pathExists(t)||(e.logger.info("Installing nvm..."),await L`bash -c "curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash"`);let i=`export NVM_DIR="${t}" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm install --lts`;await L`bash -c ${i}`}async function pt(e){if(e.logger.info("Installing Node.js via Homebrew"),!await u("brew"))if(z.platform()==="darwin"){if(e.logger.info("Homebrew not found; installing Homebrew"),e.options.dryRun){e.logger.log("[dry-run] install Homebrew");return}await L`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`;let t=z.platform()==="darwin"&&z.arch()==="arm64"?"/opt/homebrew/bin/brew":"/usr/local/bin/brew";if(await Pe.pathExists(t)){let o=U.dirname(t);process.env.PATH=`${o}:${process.env.PATH||""}`;try{let n=(await L`${t} shellenv`).stdout.trim().match(/export PATH="([^"]+)"/);n&&(process.env.PATH=`${n[1]}:${process.env.PATH||""}`)}catch{}}}else throw new Error("Homebrew is only available on macOS");await g("brew",["install","node"],{dryRun:e.options.dryRun,logger:e.logger})}import{$ as de}from"zx";var dt=["@openai/codex"],ct="@openai/codex";async function Ne(e){if(e.options.installCodexCli==="no"){e.logger.info("Skipping Codex CLI install (user choice)");return}e.logger.info("Checking global packages (@openai/codex)");let t=[];for(let o of dt)try{if(o===ct&&await u("codex")){e.logger.ok("codex found on PATH; skipping global install/upgrade");continue}let n=(await de`npm view ${o} version`.quiet()).stdout.trim();if(!n){e.logger.warn(`Could not fetch latest version for ${o}; skipping upgrade check`);continue}let r=await de`npm ls -g ${o} --depth=0 --json`.quiet().nothrow(),a="";try{a=JSON.parse(r.stdout||"{}").dependencies?.[o]?.version||""}catch{a=""}a?a!==n?(e.logger.info(`${o} ${a} -> ${n}`),t.push(`${o}@${n}`)):e.logger.ok(`${o} up-to-date (${a})`):(e.logger.info(`${o} not installed; will install @${n}`),t.push(`${o}@${n}`))}catch(i){e.logger.warn(`Error checking ${o}: ${i}`);let n=await de`npm ls -g ${o} --depth=0 --json`.quiet().nothrow(),r="";try{r=JSON.parse(n.stdout||"{}").dependencies?.[o]?.version||""}catch{r=""}r||t.push(o)}if(t.length>0){let o=await ee(e.logger);o==="none"?e.logger.warn('Skipping global Node installs because pnpm is detected but not configured. Run "pnpm setup" and re-run the installer.'):o==="pnpm"?(e.logger.info("Installing/updating global packages via pnpm"),await g("pnpm",["add","-g",...t],{dryRun:e.options.dryRun,logger:e.logger})):(e.logger.info("Installing/updating global packages via npm"),await g("npm",["install","-g",...t],{dryRun:e.options.dryRun,logger:e.logger}))}else e.logger.ok("Global packages are up-to-date");await u("codex")?e.logger.ok("Codex CLI installed"):e.logger.err("Codex CLI not found after install")}import{$ as ft}from"zx";import*as fe from"path";import ce from"fs-extra";var ut={brew:["fd","ripgrep","fzf","jq","yq","difftastic","ast-grep"],apt:["ripgrep","fzf","jq","yq","git-delta"],dnf:["ripgrep","fd-find","fzf","jq","yq","git-delta"],pacman:["ripgrep","fd","fzf","jq","yq","git-delta"],zypper:["ripgrep","fd","fzf","jq","yq","git-delta"],none:[]};async function Te(e){if(e.options.installTools==="no"){e.logger.info("Skipping developer tool installs (user choice)");return}let t=await Ee();if(e.logger.info(`Detected package manager: ${t}`),t==="none"){e.logger.warn("Could not detect a supported package manager; please install tools manually");return}let o=ut[t]||[];if(o.length>0)switch(t){case"brew":await g("brew",["update"],{dryRun:e.options.dryRun,logger:e.logger}),await g("brew",["install",...o],{dryRun:e.options.dryRun,logger:e.logger});break;case"apt":await g("sudo",["apt-get","update","-y"],{dryRun:e.options.dryRun,logger:e.logger}),await g("sudo",["apt-get","install","-y",...o],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{}),await u("fd")||await g("sudo",["apt-get","install","-y","fd-find"],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{});break;case"dnf":await g("sudo",["dnf","install","-y",...o],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{});break;case"pacman":await g("sudo",["pacman","-Sy","--noconfirm",...o],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{});break;case"zypper":await g("sudo",["zypper","refresh"],{dryRun:e.options.dryRun,logger:e.logger}),await g("sudo",["zypper","install","-y",...o],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{});break}if(!await u("difft")&&!await u("difftastic")&&(await u("cargo")?(e.logger.info("Installing difftastic via cargo"),await g("cargo",["install","difftastic"],{dryRun:e.options.dryRun,logger:e.logger})):e.logger.warn("difftastic not found and Rust/cargo missing; falling back to git-delta")),await gt(e,t),await u("fdfind")&&!await u("fd")){let n=fe.join(e.homeDir,".local","bin");await ce.ensureDir(n);let r=(await ft`command -v fdfind`).stdout.trim(),a=fe.join(n,"fd");await ce.pathExists(a)||(e.options.dryRun?e.logger.log(`[dry-run] ln -s ${r} ${a}`):await ce.symlink(r,a),e.logger.ok("fd alias created at ~/.local/bin/fd"))}let i=["fd","fdfind","rg","fzf","jq","yq","difft","difftastic","delta","ast-grep"];for(let n of i)await u(n)&&e.logger.ok(`${n} \u2713`)}async function gt(e,t){if(await u("sg")||await u("ast-grep"))return;let i=await(async()=>{switch(t){case"brew":return await g("brew",["install","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}),!0;case"apt":return await g("sudo",["apt-get","install","-y","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{}),!0;case"dnf":return await g("sudo",["dnf","install","-y","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{}),!0;case"pacman":return await g("sudo",["pacman","-Sy","--noconfirm","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{}),!0;case"zypper":return await g("sudo",["zypper","install","-y","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{}),!0;default:return!1}})();if(await u("sg")||await u("ast-grep"))return;let n=await ee(e.logger);n==="pnpm"?(e.logger.info("Installing ast-grep via pnpm -g"),await g("pnpm",["add","-g","@ast-grep/cli"],{dryRun:e.options.dryRun,logger:e.logger})):n==="npm"?(e.logger.info("Installing ast-grep via npm -g"),await g("npm",["install","-g","@ast-grep/cli"],{dryRun:e.options.dryRun,logger:e.logger})):i||e.logger.warn("ast-grep not installed (no supported package manager or global npm). Install manually from https://ast-grep.github.io/")}import V from"fs-extra";import*as oe from"path";var mt={balanced:{root:[["approval_policy",'"on-request"'],["sandbox_mode",'"workspace-write"'],["model",'"gpt-5.1-codex"'],["model_reasoning_effort",'"medium"']],features:[["web_search_request","true"]]},safe:{root:[["approval_policy",'"on-failure"'],["sandbox_mode",'"workspace-write"'],["model",'"gpt-5.1-codex"'],["model_reasoning_effort",'"medium"']],features:[["web_search_request","false"]]},minimal:{root:[["model",'"gpt-5.1-codex"'],["model_reasoning_effort",'"medium"']],features:[["web_search_request","false"]]},yolo:{root:[["approval_policy",'"never"'],["sandbox_mode",'"danger-full-access"'],["model",'"gpt-5.1-codex"'],["model_reasoning_effort",'"medium"'],["model_reasoning_summary",'"detailed"'],["model_verbosity",'"high"'],["tool_output_token_limit","25000"]],features:[["web_search_request","true"]]}},ht=`# ~/.codex/config.toml \u2014 managed by codex-1up (patch mode)
4
- `;async function De(e){let t=oe.join(e.homeDir,".codex","config.toml");await V.ensureDir(oe.dirname(t));let o=await V.pathExists(t),i=o?await V.readFile(t,"utf8"):ht,n=new ge(i),r=!1;if(r=wt(n,e.options.profile,e.options.profileMode)||r,r=yt(n,e.options.profile,e.options.setDefaultProfile)||r,r=bt(n,e.options.notificationSound)||r,!r){e.logger.info("Config already up to date; no changes needed.");return}let a=n.content();if(e.options.dryRun){e.logger.log(`[dry-run] write ${t}`),e.logger.log(a);return}if(o){let s=T(t);await V.copy(t,s),e.logger.info(`Backed up current config to ${s}`)}await V.writeFile(t,a,"utf8"),e.logger.ok("Updated ~/.codex/config.toml with requested settings.")}function wt(e,t,o){if(t==="skip")return!1;let i=mt[t],n=!1;if(o==="overwrite")n=e.replaceTable(`profiles.${t}`,i.root)||n,n=e.replaceTable(`profiles.${t}.features`,i.features)||n;else{e.ensureTable(`profiles.${t}`);for(let[r,a]of i.root)n=e.setKey(`profiles.${t}`,r,a,{mode:"if-missing"})||n;e.ensureTable(`profiles.${t}.features`);for(let[r,a]of i.features)n=e.setKey(`profiles.${t}.features`,r,a,{mode:"if-missing"})||n}return n}function yt(e,t,o){return!o||t==="skip"?!1:e.setRootKey("profile",`"${t}"`,{mode:"force"})}function bt(e,t){if(!t||t==="none")return!1;e.ensureTable("tui");let o=e.getValue("tui","notifications");if(o){let i=o.trim().toLowerCase();if(i.startsWith("true")||i.startsWith("["))return!1}return e.setKey("tui","notifications","true",{mode:"force"})}var ge=class{text;constructor(t){this.text=t||""}content(){return $t(this.text)}ensureTable(t){if(this.hasTable(t))return!1;let o=this.text.length===0?"":xe(this.text);return this.text=o+`[${t}]
5
- `,!0}setKey(t,o,i,n){let r=te(this.text,t);if(!r)return this.ensureTable(t),this.setKey(t,o,i,n);let a=this.text.slice(r.start,r.end),c=new RegExp(`^\\s*${ue(o)}\\s*=.*$`,"m").exec(a);if(c){if(n.mode==="if-missing")return!1;let k=this.text,N=r.start+c.index,D=N+c[0].length;return this.text=k.slice(0,N)+`${o} = ${i}`+k.slice(D),this.text!==k}let m=this.text,b=r.end,h=m.slice(0,b),v=m.slice(b),p=h.length>0&&!h.endsWith(`
6
- `),d=v.length>0&&!v.startsWith(`
7
- `),y=`${p?`
8
- `:""}${o} = ${i}
3
+ `;process.stdout.write(i),t&&t.write(i)};return{log:r=>o("",r),info:r=>o("",r),ok:r=>o("\u2714",r),warn:r=>o("\u26A0",r),err:r=>o("\u2716",r)}}import{$ as q}from"zx";import{which as ct,$ as ut}from"zx";import{spawn as gt}from"child_process";async function u(e){try{return await ct(e),!0}catch{return!1}}async function De(){return await u("brew")?"brew":await u("apt-get")?"apt":await u("dnf")?"dnf":await u("pacman")?"pacman":await u("zypper")?"zypper":"none"}function N(e){return typeof process.getuid=="function"&&process.getuid()===0?{cmd:e,argsPrefix:[]}:{cmd:"sudo",argsPrefix:[e]}}async function ae(e){if(await u("pnpm"))try{if((await ut`pnpm bin -g`.quiet()).stdout.trim())return"pnpm";e?.warn('Detected pnpm but global bin dir is not configured; skipping global Node installs to avoid duplicates. Run "pnpm setup" then re-run.')}catch{e?.warn('Detected pnpm but global bin dir is not configured; skipping global Node installs to avoid duplicates. Run "pnpm setup" then re-run.')}return await u("pnpm")?"none":"npm"}async function m(e,t,o={dryRun:!1}){if(o.dryRun){let n=[e,...t].map(i=>i.includes(" ")?`"${i}"`:i).join(" ");o.logger?.log(`[dry-run] ${n}`);return}let r=gt(e,t,{stdio:"inherit",cwd:o.cwd||process.cwd(),shell:!1});await new Promise((n,i)=>{r.on("error",i),r.on("exit",a=>{if(a===0)return n();i(new Error(`Command failed (${a}): ${e} ${t.join(" ")}`))})})}function T(e){let t=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return`${e}.backup.${t}`}import Ae from"fs-extra";import*as H from"path";import*as K from"os";async function _e(e){let t=await u("node"),o=await u("npm");if(t&&o){let n=(await q`node -v`).stdout.trim();e.logger.ok(`Node.js present (${n})`);return}switch(e.options.installNode){case"nvm":await mt(e);break;case"brew":await ht(e);break;case"skip":e.logger.warn("Skipping Node installation; please install Node 18+ manually");return}if(await u("node")){let n=(await q`node -v`).stdout.trim();e.logger.ok(`Node.js installed (${n})`)}else throw e.logger.err("Node installation failed"),new Error("Node.js installation failed")}async function mt(e){if(e.logger.info("Installing Node.js via nvm"),e.options.dryRun){e.logger.log("[dry-run] install nvm + Node LTS");return}let t=H.join(e.homeDir,".nvm"),o=H.join(t,"nvm.sh");await Ae.pathExists(t)||(e.logger.info("Installing nvm..."),await q`bash -c "curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash"`);let r=`export NVM_DIR="${t}" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm install --lts`;await q`bash -c ${r}`}async function ht(e){if(e.logger.info("Installing Node.js via Homebrew"),!await u("brew"))if(K.platform()==="darwin"){if(e.logger.info("Homebrew not found; installing Homebrew"),e.options.dryRun){e.logger.log("[dry-run] install Homebrew");return}await q`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`;let t=K.platform()==="darwin"&&K.arch()==="arm64"?"/opt/homebrew/bin/brew":"/usr/local/bin/brew";if(await Ae.pathExists(t)){let o=H.dirname(t);process.env.PATH=`${o}:${process.env.PATH||""}`;try{let n=(await q`${t} shellenv`).stdout.trim().match(/export PATH="([^"]+)"/);n&&(process.env.PATH=`${n[1]}:${process.env.PATH||""}`)}catch{}}}else throw new Error("Homebrew is only available on macOS");await m("brew",["install","node"],{dryRun:e.options.dryRun,logger:e.logger})}import{$ as he}from"zx";var wt=["@openai/codex"],yt="@openai/codex";async function je(e){if(e.options.installCodexCli==="no"){e.logger.info("Skipping Codex CLI install (user choice)");return}e.logger.info("Checking global packages (@openai/codex)");let t=[];for(let o of wt)try{if(o===yt&&await u("codex")){e.logger.ok("codex found on PATH; skipping global install/upgrade");continue}let n=(await he`npm view ${o} version`.quiet()).stdout.trim();if(!n){e.logger.warn(`Could not fetch latest version for ${o}; skipping upgrade check`);continue}let i=await he`npm ls -g ${o} --depth=0 --json`.quiet().nothrow(),a="";try{a=JSON.parse(i.stdout||"{}").dependencies?.[o]?.version||""}catch{a=""}a?a!==n?(e.logger.info(`${o} ${a} -> ${n}`),t.push(`${o}@${n}`)):e.logger.ok(`${o} up-to-date (${a})`):(e.logger.info(`${o} not installed; will install @${n}`),t.push(`${o}@${n}`))}catch(r){e.logger.warn(`Error checking ${o}: ${r}`);let n=await he`npm ls -g ${o} --depth=0 --json`.quiet().nothrow(),i="";try{i=JSON.parse(n.stdout||"{}").dependencies?.[o]?.version||""}catch{i=""}i||t.push(o)}if(t.length>0){let o=await ae(e.logger);o==="none"?e.logger.warn('Skipping global Node installs because pnpm is detected but not configured. Run "pnpm setup" and re-run the installer.'):o==="pnpm"?(e.logger.info("Installing/updating global packages via pnpm"),await m("pnpm",["add","-g",...t],{dryRun:e.options.dryRun,logger:e.logger})):(e.logger.info("Installing/updating global packages via npm"),await m("npm",["install","-g",...t],{dryRun:e.options.dryRun,logger:e.logger}))}else e.logger.ok("Global packages are up-to-date");await u("codex")?e.logger.ok("Codex CLI installed"):e.logger.err("Codex CLI not found after install")}import{$ as bt}from"zx";import*as ye from"path";import we from"fs-extra";var kt={brew:["fd","ripgrep","fzf","jq","yq","difftastic","ast-grep"],apt:["ripgrep","fzf","jq","yq","git-delta"],dnf:["ripgrep","fd-find","fzf","jq","yq","git-delta"],pacman:["ripgrep","fd","fzf","jq","yq","git-delta"],zypper:["ripgrep","fd","fzf","jq","yq","git-delta"],none:[]};async function Oe(e){if(e.options.installTools==="no"){e.logger.info("Skipping developer tool installs (user choice)");return}let t=await De();if(e.logger.info(`Detected package manager: ${t}`),t==="none"){e.logger.warn("Could not detect a supported package manager; please install tools manually");return}let o=kt[t]||[];if(o.length>0)switch(t){case"brew":await m("brew",["update"],{dryRun:e.options.dryRun,logger:e.logger}),await m("brew",["install",...o],{dryRun:e.options.dryRun,logger:e.logger});break;case"apt":{let{cmd:n,argsPrefix:i}=N("apt-get");try{await m(n,[...i,"update","-y"],{dryRun:e.options.dryRun,logger:e.logger})}catch{e.logger.warn('apt-get update failed; install developer tools manually with "sudo apt-get update" followed by installs for ripgrep, fzf, jq, yq, git-delta, then re-run codex-1up if needed.');break}for(let a of o)try{await m(n,[...i,"install","-y",a],{dryRun:e.options.dryRun,logger:e.logger})}catch{e.logger.warn(`apt-get install failed for ${a}; you can install it manually with "sudo apt-get install ${a}".`)}if(!await u("fd"))try{await m(n,[...i,"install","-y","fd-find"],{dryRun:e.options.dryRun,logger:e.logger})}catch{e.logger.warn("apt-get install failed for fd-find; fd may not be available. Install manually if you prefer fd over fdfind.")}}break;case"dnf":{let{cmd:n,argsPrefix:i}=N("dnf");await m(n,[...i,"install","-y",...o],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{})}break;case"pacman":{let{cmd:n,argsPrefix:i}=N("pacman");await m(n,[...i,"-Sy","--noconfirm",...o],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{})}break;case"zypper":{let{cmd:n,argsPrefix:i}=N("zypper");await m(n,[...i,"refresh"],{dryRun:e.options.dryRun,logger:e.logger}),await m(n,[...i,"install","-y",...o],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{})}break}if(!await u("difft")&&!await u("difftastic")&&(await u("cargo")?(e.logger.info("Installing difftastic via cargo"),await m("cargo",["install","difftastic"],{dryRun:e.options.dryRun,logger:e.logger})):e.logger.warn("difftastic not found and Rust/cargo missing; falling back to git-delta")),await $t(e,t),await u("fdfind")&&!await u("fd")){let n=ye.join(e.homeDir,".local","bin");await we.ensureDir(n);let i=(await bt`command -v fdfind`).stdout.trim(),a=ye.join(n,"fd");await we.pathExists(a)||(e.options.dryRun?e.logger.log(`[dry-run] ln -s ${i} ${a}`):await we.symlink(i,a),e.logger.ok("fd alias created at ~/.local/bin/fd"))}let r=["fd","fdfind","rg","fzf","jq","yq","difft","difftastic","delta","ast-grep"];for(let n of r)await u(n)&&e.logger.ok(`${n} \u2713`)}async function $t(e,t){if(await u("sg")||await u("ast-grep"))return;let r=await(async()=>{switch(t){case"brew":return await m("brew",["install","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}),!0;case"apt":{let{cmd:i,argsPrefix:a}=N("apt-get");await m(i,[...a,"install","-y","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{})}return!0;case"dnf":{let{cmd:i,argsPrefix:a}=N("dnf");await m(i,[...a,"install","-y","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{})}return!0;case"pacman":{let{cmd:i,argsPrefix:a}=N("pacman");await m(i,[...a,"-Sy","--noconfirm","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{})}return!0;case"zypper":{let{cmd:i,argsPrefix:a}=N("zypper");await m(i,[...a,"install","-y","ast-grep"],{dryRun:e.options.dryRun,logger:e.logger}).catch(()=>{})}return!0;default:return!1}})();if(await u("sg")||await u("ast-grep"))return;let n=await ae(e.logger);n==="pnpm"?(e.logger.info("Installing ast-grep via pnpm -g"),await m("pnpm",["add","-g","@ast-grep/cli"],{dryRun:e.options.dryRun,logger:e.logger})):n==="npm"?(e.logger.info("Installing ast-grep via npm -g"),await m("npm",["install","-g","@ast-grep/cli"],{dryRun:e.options.dryRun,logger:e.logger})):r||e.logger.warn("ast-grep not installed (no supported package manager or global npm). Install manually from https://ast-grep.github.io/")}import J from"fs-extra";import*as le from"path";var Le={balanced:{root:[["approval_policy",'"on-request"'],["sandbox_mode",'"workspace-write"'],["model",'"gpt-5.1-codex"'],["model_reasoning_effort",'"medium"']],features:[["web_search_request","true"]]},safe:{root:[["approval_policy",'"on-failure"'],["sandbox_mode",'"workspace-write"'],["model",'"gpt-5.1-codex"'],["model_reasoning_effort",'"medium"']],features:[["web_search_request","false"]]},minimal:{root:[["model",'"gpt-5.1-codex"'],["model_reasoning_effort",'"medium"']],features:[["web_search_request","false"]]},yolo:{root:[["approval_policy",'"never"'],["sandbox_mode",'"danger-full-access"'],["model",'"gpt-5.1-codex"'],["model_reasoning_effort",'"medium"'],["model_reasoning_summary",'"detailed"'],["model_verbosity",'"high"'],["tool_output_token_limit","25000"]],features:[["web_search_request","true"]]}},vt=`# ~/.codex/config.toml \u2014 managed by codex-1up (patch mode)
4
+ `;async function Fe(e){let t=le.join(e.homeDir,".codex","config.toml");await J.ensureDir(le.dirname(t));let o=await J.pathExists(t),r=o?await J.readFile(t,"utf8"):vt,n=new ke(r),i=!1;if(i=Ct(n,e.options.profileScope,e.options.profile,e.options.profileMode)||i,i=St(n,e.options.profile,e.options.setDefaultProfile)||i,i=Rt(n,e.options.notificationSound)||i,!i){e.logger.info("Config already up to date; no changes needed.");return}let a=n.content();if(e.options.dryRun){e.logger.log(`[dry-run] write ${t}`),e.logger.log(a);return}if(o){let s=T(t);await J.copy(t,s),e.logger.info(`Backed up current config to ${s}`)}await J.writeFile(t,a,"utf8"),e.logger.ok("Updated ~/.codex/config.toml with requested settings.")}function Ct(e,t,o,r){if(t==="single"&&o==="skip")return!1;let n=t==="all"?Object.keys(Le):[o],i=!1;for(let a of n){let s=Le[a];if(r==="overwrite")i=e.replaceTable(`profiles.${a}`,s.root)||i,i=e.replaceTable(`profiles.${a}.features`,s.features)||i;else{e.ensureTable(`profiles.${a}`);for(let[f,g]of s.root)i=e.setKey(`profiles.${a}`,f,g,{mode:"if-missing"})||i;e.ensureTable(`profiles.${a}.features`);for(let[f,g]of s.features)i=e.setKey(`profiles.${a}.features`,f,g,{mode:"if-missing"})||i}}return i}function St(e,t,o){return!o||t==="skip"?!1:e.setRootKey("profile",`"${t}"`,{mode:"force"})}function Rt(e,t){if(!t||t==="none")return!1;e.ensureTable("tui");let o=e.getValue("tui","notifications");if(o){let r=o.trim().toLowerCase();if(r.startsWith("true")||r.startsWith("["))return!1}return e.setKey("tui","notifications","true",{mode:"force"})}var ke=class{text;constructor(t){this.text=t||""}content(){return Et(this.text)}ensureTable(t){if(this.hasTable(t))return!1;let o=this.text.length===0?"":Ge(this.text);return this.text=o+`[${t}]
5
+ `,!0}setKey(t,o,r,n){let i=se(this.text,t);if(!i)return this.ensureTable(t),this.setKey(t,o,r,n);let a=this.text.slice(i.start,i.end),f=new RegExp(`^\\s*${be(o)}\\s*=.*$`,"m").exec(a);if(f){if(n.mode==="if-missing")return!1;let v=this.text,j=i.start+f.index,G=j+f[0].length;return this.text=v.slice(0,j)+`${o} = ${r}`+v.slice(G),this.text!==v}let g=this.text,b=i.end,w=g.slice(0,b),$=g.slice(b),p=w.length>0&&!w.endsWith(`
6
+ `),d=$.length>0&&!$.startsWith(`
7
+ `),h=`${p?`
8
+ `:""}${o} = ${r}
9
9
  ${d?`
10
- `:""}`;return this.text=h+y+v,this.text!==m}getValue(t,o){let i=te(this.text,t);if(!i)return;let n=this.text.slice(i.start,i.end),a=new RegExp(`^\\s*${ue(o)}\\s*=\\s*(.+)$`,"m").exec(n);return a?a[1]:void 0}replaceTable(t,o){let i=o.map(([s,c])=>`${s} = ${c}`).join(`
10
+ `:""}`;return this.text=w+h+$,this.text!==g}getValue(t,o){let r=se(this.text,t);if(!r)return;let n=this.text.slice(r.start,r.end),a=new RegExp(`^\\s*${be(o)}\\s*=\\s*(.+)$`,"m").exec(n);return a?a[1]:void 0}replaceTable(t,o){let r=o.map(([s,f])=>`${s} = ${f}`).join(`
11
11
  `),n=`[${t}]
12
- ${i}
12
+ ${r}
13
13
 
14
- `,r=this.text,a=te(this.text,t);if(!a){let s=r.length===0?"":xe(r);return this.text=s+n,this.text!==r}return this.text=r.slice(0,a.start)+n+r.slice(a.end),this.text!==r}setRootKey(t,o,i){let n=kt(this.text),r=this.text.slice(n.start,n.end),s=new RegExp(`^\\s*${ue(t)}\\s*=.*$`,"m").exec(r);if(s){if(i.mode==="if-missing")return!1;let d=this.text,y=n.start+s.index,k=y+s[0].length;return this.text=d.slice(0,y)+`${t} = ${o}`+d.slice(k),this.text!==d}let c=this.text,m=n.end,b=m>0&&!c.slice(0,m).endsWith(`
15
- `),h=c.slice(m),v=h.length>0&&!h.startsWith(`
14
+ `,i=this.text,a=se(this.text,t);if(!a){let s=i.length===0?"":Ge(i);return this.text=s+n,this.text!==i}return this.text=i.slice(0,a.start)+n+i.slice(a.end),this.text!==i}setRootKey(t,o,r){let n=Pt(this.text),i=this.text.slice(n.start,n.end),s=new RegExp(`^\\s*${be(t)}\\s*=.*$`,"m").exec(i);if(s){if(r.mode==="if-missing")return!1;let d=this.text,h=n.start+s.index,v=h+s[0].length;return this.text=d.slice(0,h)+`${t} = ${o}`+d.slice(v),this.text!==d}let f=this.text,g=n.end,b=g>0&&!f.slice(0,g).endsWith(`
15
+ `),w=f.slice(g),$=w.length>0&&!w.startsWith(`
16
16
  `),p=`${b?`
17
17
  `:""}${t} = ${o}
18
- ${v?`
19
- `:""}`;return this.text=c.slice(0,m)+p+h,this.text!==c}hasTable(t){return te(this.text,t)!==null}};function te(e,t){let o=/^\s*\[([^\]]+)\]\s*$/gm,i=[],n;for(;n=o.exec(e);)i.push({name:n[1].trim(),index:n.index});for(let r=0;r<i.length;r++)if(i[r].name===t){let a=i[r].index,s=i[r+1]?.index??e.length;return{start:a,end:s}}return null}function kt(e){let o=/^\s*\[([^\]]+)\]\s*$/gm.exec(e);return o?{start:0,end:o.index}:{start:0,end:e.length}}function ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $t(e){return e.endsWith(`
18
+ ${$?`
19
+ `:""}`;return this.text=f.slice(0,g)+p+w,this.text!==f}hasTable(t){return se(this.text,t)!==null}};function se(e,t){let o=/^\s*\[([^\]]+)\]\s*$/gm,r=[],n;for(;n=o.exec(e);)r.push({name:n[1].trim(),index:n.index});for(let i=0;i<r.length;i++)if(r[i].name===t){let a=r[i].index,s=r[i+1]?.index??e.length;return{start:a,end:s}}return null}function Pt(e){let o=/^\s*\[([^\]]+)\]\s*$/gm.exec(e);return o?{start:0,end:o.index}:{start:0,end:e.length}}function be(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Et(e){return e.endsWith(`
20
20
  `)?e:e+`
21
- `}function xe(e){let t=e;return t.endsWith(`
21
+ `}function Ge(e){let t=e;return t.endsWith(`
22
22
  `)||(t+=`
23
23
  `),t.endsWith(`
24
24
 
25
25
  `)||(t+=`
26
- `),t}import P from"fs-extra";import*as G from"path";async function Ae(e){let t=G.join(e.homeDir,".codex","notify.sh"),o=G.join(e.rootDir,"templates","notification.sh");await P.ensureDir(G.dirname(t));let i=e.options.notify;if(i==="no"){e.logger.info("Skipping notify hook installation");return}if(!await P.pathExists(o)){e.logger.warn(`Notification template missing at ${o}; skipping notify hook install`);return}if(await P.pathExists(t))if(i==="yes"){let r=T(t);e.options.dryRun?e.logger.log(`[dry-run] cp ${t} ${r}`):await P.copy(t,r),e.options.dryRun?e.logger.log(`[dry-run] cp ${o} ${t}`):(await P.copy(o,t),await P.chmod(t,493)),e.logger.ok("Updated notify hook (backup created)")}else!e.options.assumeYes&&!e.options.skipConfirmation&&e.logger.info("Keeping existing notify hook");else e.options.dryRun?e.logger.log(`[dry-run] cp ${o} ${t}`):(await P.copy(o,t),await P.chmod(t,493)),e.logger.ok("Installed notify hook to ~/.codex/notify.sh");let n=G.join(e.homeDir,".codex","config.toml");await P.pathExists(n)?await vt(n,t,e):e.logger.warn(`Config not found at ${n}; run again after config is created`)}async function vt(e,t,o){if(o.options.dryRun){o.logger.log("[dry-run] update config notify and tui.notifications");return}let n=(await P.readFile(e,"utf8")).split(/\r?\n/),r="",a=null,s=null,c=!1,m=!1;for(let p=0;p<n.length;p++){let d=n[p],y=d.match(/^\s*\[([^\]]+)\]\s*$/);if(y){r=y[1],r==="tui"&&(s=p);continue}let k=/^\s*notify\s*=\s*\[/.test(d),N=/^\s*tui\.notifications\s*=/.test(d),D=/^\s*notifications\s*=/.test(d);k&&(r===""?a===null&&(a=p):/^profiles\.[^.]+\.features$/.test(r)&&(n.splice(p,1),p--,c=!0)),N&&/^profiles\.[^.]+\.features$/.test(r)&&(n.splice(p,1),p--,m=!0),D&&r===""&&(n.splice(p,1),p--,m=!0)}function b(p){let d=0;for(;d<n.length&&/^\s*(#.*)?$/.test(n[d]);)d++;n.splice(d,0,p)}if(a!==null){let p=n[a].match(/^(\s*notify\s*=\s*\[)([^\]]*)\]/);if(p){let d=p[2].trim();if(!d.includes(JSON.stringify(t))){let k=d&&!d.endsWith(",")?", ":"";n[a]=`${p[1]}${d}${k}${JSON.stringify(t)}]`,o.logger.ok("Added notify hook to config")}}}else b(`notify = [${JSON.stringify(t)}]`),o.logger.ok("Enabled notify hook in config");let h=!1;if(s!==null){let p=s+1,d=!1;for(;p<n.length;p++){let y=n[p];if(/^\s*\[/.test(y))break;if(/^\s*notifications\s*=/.test(y)){n[p]="notifications = true",d=!0,h=!0;break}}d||(n.splice(s+1,0,"notifications = true"),h=!0)}h||b(`[tui]
27
- notifications = true`);let v=[];r="";for(let p=0;p<n.length;p++){let d=n[p],y=d.match(/^\s*\[([^\]]+)\]\s*$/);if(y){r=y[1],v.push(d);continue}/^\s*tui\.notifications\s*=/.test(d)||/^\s*notifications\s*=/.test(d)&&r!=="tui"||v.push(d)}await P.writeFile(e,v.join(`
28
- `),"utf8")}import S from"fs-extra";import*as w from"path";async function Oe(e){let t=w.join(e.rootDir,"sounds"),o=w.join(e.homeDir,".codex","sounds");await S.ensureDir(o);let i=e.options.notificationSound;if(i==="none"){let h=await _e(e);e.options.dryRun?e.logger.log(`[dry-run] update ${h}`):await je(h,`# Notification sound (disabled)
26
+ `),t}import x from"fs-extra";import*as M from"path";async function qe(e){let t=M.join(e.homeDir,".codex","notify.sh"),o=M.join(e.rootDir,"templates","notification.sh");await x.ensureDir(M.dirname(t));let r=e.options.notify;if(r==="no"){e.logger.info("Skipping notify hook installation");return}if(!await x.pathExists(o)){e.logger.warn(`Notification template missing at ${o}; skipping notify hook install`);return}if(await x.pathExists(t))if(r==="yes"){let i=T(t);e.options.dryRun?e.logger.log(`[dry-run] cp ${t} ${i}`):await x.copy(t,i),e.options.dryRun?e.logger.log(`[dry-run] cp ${o} ${t}`):(await x.copy(o,t),await x.chmod(t,493)),e.logger.ok("Updated notify hook (backup created)")}else!e.options.assumeYes&&!e.options.skipConfirmation&&e.logger.info("Keeping existing notify hook");else e.options.dryRun?e.logger.log(`[dry-run] cp ${o} ${t}`):(await x.copy(o,t),await x.chmod(t,493)),e.logger.ok("Installed notify hook to ~/.codex/notify.sh");let n=M.join(e.homeDir,".codex","config.toml");await x.pathExists(n)?await xt(n,t,e):e.logger.warn(`Config not found at ${n}; run again after config is created`)}async function xt(e,t,o){if(o.options.dryRun){o.logger.log("[dry-run] update config notify and tui.notifications");return}let n=(await x.readFile(e,"utf8")).split(/\r?\n/),i="",a=null,s=null,f=!1,g=!1;for(let p=0;p<n.length;p++){let d=n[p],h=d.match(/^\s*\[([^\]]+)\]\s*$/);if(h){i=h[1],i==="tui"&&(s=p);continue}let v=/^\s*notify\s*=\s*\[/.test(d),j=/^\s*tui\.notifications\s*=/.test(d),G=/^\s*notifications\s*=/.test(d);v&&(i===""?a===null&&(a=p):/^profiles\.[^.]+\.features$/.test(i)&&(n.splice(p,1),p--,f=!0)),j&&/^profiles\.[^.]+\.features$/.test(i)&&(n.splice(p,1),p--,g=!0),G&&i===""&&(n.splice(p,1),p--,g=!0)}function b(p){let d=0;for(;d<n.length&&/^\s*(#.*)?$/.test(n[d]);)d++;n.splice(d,0,p)}if(a!==null){let p=n[a].match(/^(\s*notify\s*=\s*\[)([^\]]*)\]/);if(p){let d=p[2].trim();if(!d.includes(JSON.stringify(t))){let v=d&&!d.endsWith(",")?", ":"";n[a]=`${p[1]}${d}${v}${JSON.stringify(t)}]`,o.logger.ok("Added notify hook to config")}}}else b(`notify = [${JSON.stringify(t)}]`),o.logger.ok("Enabled notify hook in config");let w=!1;if(s!==null){let p=s+1,d=!1;for(;p<n.length;p++){let h=n[p];if(/^\s*\[/.test(h))break;if(/^\s*notifications\s*=/.test(h)){n[p]="notifications = true",d=!0,w=!0;break}}d||(n.splice(s+1,0,"notifications = true"),w=!0)}w||b(`[tui]
27
+ notifications = true`);let $=[];i="";for(let p=0;p<n.length;p++){let d=n[p],h=d.match(/^\s*\[([^\]]+)\]\s*$/);if(h){i=h[1],$.push(d);continue}/^\s*tui\.notifications\s*=/.test(d)||/^\s*notifications\s*=/.test(d)&&i!=="tui"||$.push(d)}await x.writeFile(e,$.join(`
28
+ `),"utf8")}import R from"fs-extra";import*as y from"path";async function ze(e){let t=y.join(e.rootDir,"sounds"),o=y.join(e.homeDir,".codex","sounds");await R.ensureDir(o);let r=e.options.notificationSound;if(r==="none"){let w=await Me(e);e.options.dryRun?e.logger.log(`[dry-run] update ${w}`):await We(w,`# Notification sound (disabled)
29
29
  export CODEX_DISABLE_SOUND=1
30
30
  export CODEX_CUSTOM_SOUND=""
31
- `,e);let p=w.join(e.homeDir,".codex","notify.sh");if(await S.pathExists(p)){let d=await S.readFile(p,"utf8"),y=d.replace(/^DEFAULT_CODEX_SOUND=.*$/m,'DEFAULT_CODEX_SOUND=""');e.options.dryRun?e.logger.log(`[dry-run] patch ${p} DEFAULT_CODEX_SOUND -> empty`):y!==d&&await S.writeFile(p,y,"utf8")}e.logger.ok("Notification sound disabled");return}let n;if(i&&!w.isAbsolute(i)?n=w.join(t,i):i?n=i:e.options.mode==="recommended"&&(n=w.join(t,"noti_1.wav")),!n||!await S.pathExists(n)){e.logger.warn("No notification sound selected or file missing; skipping sound setup");return}let r=w.isAbsolute(n),a=n.startsWith(w.join(e.rootDir,"sounds")),s=!r||a?w.join(o,w.basename(n)):n;(!r||a)&&(e.options.dryRun?e.logger.log(`[dry-run] cp ${n} ${s}`):await S.copy(n,s));let c=await _e(e),m=`# Notification sound
31
+ `,e);let p=y.join(e.homeDir,".codex","notify.sh");if(await R.pathExists(p)){let d=await R.readFile(p,"utf8"),h=d.replace(/^DEFAULT_CODEX_SOUND=.*$/m,'DEFAULT_CODEX_SOUND=""');e.options.dryRun?e.logger.log(`[dry-run] patch ${p} DEFAULT_CODEX_SOUND -> empty`):h!==d&&await R.writeFile(p,h,"utf8")}e.logger.ok("Notification sound disabled");return}let n;if(r&&!y.isAbsolute(r)?n=y.join(t,r):r?n=r:e.options.mode==="recommended"&&(n=y.join(t,"noti_1.wav")),!n||!await R.pathExists(n)){e.logger.warn("No notification sound selected or file missing; skipping sound setup");return}let i=y.isAbsolute(n),a=n.startsWith(y.join(e.rootDir,"sounds")),s=!i||a?y.join(o,y.basename(n)):n;(!i||a)&&(e.options.dryRun?e.logger.log(`[dry-run] cp ${n} ${s}`):await R.copy(n,s));let f=await Me(e),g=`# Notification sound
32
32
  export CODEX_DISABLE_SOUND=0
33
33
  export CODEX_CUSTOM_SOUND="${s}"
34
- `;e.options.dryRun?e.logger.log(`[dry-run] update ${c}`):await je(c,m,e),e.logger.ok("Notification sound configured. Open a new shell or source your rc to apply.");let b=w.join(e.homeDir,".codex","notify.sh");if(await S.pathExists(b)){let h=await S.readFile(b,"utf8"),v=`DEFAULT_CODEX_SOUND="${s}"`,p=h.replace(/^DEFAULT_CODEX_SOUND=.*$/m,v);p!==h&&(e.options.dryRun?e.logger.log(`[dry-run] patch ${b} DEFAULT_CODEX_SOUND -> ${s}`):await S.writeFile(b,p,"utf8"))}}async function _e(e){let t=e.options.shell||process.env.SHELL||"",o="auto";switch(o==="auto"&&(t.includes("zsh")?o="zsh":t.includes("fish")?o="fish":o="bash"),o){case"zsh":return w.join(e.homeDir,".zshrc");case"fish":return w.join(e.homeDir,".config","fish","config.fish");default:return w.join(e.homeDir,".bashrc")}}async function je(e,t,o){let i="codex-1up";await S.ensureDir(w.dirname(e));let n="";if(await S.pathExists(e)){n=await S.readFile(e,"utf8");let a=`>>> ${i} >>>`,s=`<<< ${i} <<<`,c=new RegExp(`${a}[\\s\\S]*?${s}\\n?`,"g");n=n.replace(c,"")}let r=`>>> ${i} >>>
35
- ${t}<<< ${i} <<<
36
- `;await S.writeFile(e,n+r,"utf8")}import R from"fs-extra";import*as j from"path";async function Le(e){let t=j.join(e.homeDir,".codex","AGENTS.md"),o=e.options.globalAgents;if(o==="skip"){e.logger.info("Skipping global AGENTS.md creation");return}let i=j.join(e.rootDir,"templates","agent-templates","AGENTS-default.md");if(!await R.pathExists(i)){e.logger.warn(`Template not found at ${i}`);return}switch(o){case"create-default":if(await R.pathExists(t)){e.logger.info("Global AGENTS.md already exists; leaving unchanged");return}await R.ensureDir(j.dirname(t)),e.options.dryRun?e.logger.log(`[dry-run] cp ${i} ${t}`):await R.copy(i,t),e.logger.ok(`Wrote ${t}`);break;case"overwrite-default":if(await R.ensureDir(j.dirname(t)),await R.pathExists(t)){let r=T(t);e.options.dryRun?e.logger.log(`[dry-run] cp ${t} ${r}`):await R.copy(t,r),e.logger.info(`Backed up existing AGENTS.md to: ${r}`)}e.options.dryRun?e.logger.log(`[dry-run] cp ${i} ${t}`):await R.copy(i,t),e.logger.ok(`Wrote ${t}`);break;case"append-default":if(await R.ensureDir(j.dirname(t)),await R.pathExists(t)){let r=T(t);e.options.dryRun?e.logger.log(`[dry-run] cp ${t} ${r}`):await R.copy(t,r),e.logger.info(`Backed up existing AGENTS.md to: ${r}`)}let n=await R.readFile(i,"utf8");e.options.dryRun?e.logger.log(`[dry-run] append template to ${t}`):await R.appendFile(t,`
34
+ `;e.options.dryRun?e.logger.log(`[dry-run] update ${f}`):await We(f,g,e),e.logger.ok("Notification sound configured. Open a new shell or source your rc to apply.");let b=y.join(e.homeDir,".codex","notify.sh");if(await R.pathExists(b)){let w=await R.readFile(b,"utf8"),$=`DEFAULT_CODEX_SOUND="${s}"`,p=w.replace(/^DEFAULT_CODEX_SOUND=.*$/m,$);p!==w&&(e.options.dryRun?e.logger.log(`[dry-run] patch ${b} DEFAULT_CODEX_SOUND -> ${s}`):await R.writeFile(b,p,"utf8"))}}async function Me(e){let t=e.options.shell||process.env.SHELL||"",o="auto";switch(o==="auto"&&(t.includes("zsh")?o="zsh":t.includes("fish")?o="fish":o="bash"),o){case"zsh":return y.join(e.homeDir,".zshrc");case"fish":return y.join(e.homeDir,".config","fish","config.fish");default:return y.join(e.homeDir,".bashrc")}}async function We(e,t,o){let r="codex-1up";await R.ensureDir(y.dirname(e));let n="";if(await R.pathExists(e)){n=await R.readFile(e,"utf8");let a=`>>> ${r} >>>`,s=`<<< ${r} <<<`,f=new RegExp(`${a}[\\s\\S]*?${s}\\n?`,"g");n=n.replace(f,"")}let i=`>>> ${r} >>>
35
+ ${t}<<< ${r} <<<
36
+ `;await R.writeFile(e,n+i,"utf8")}import P from"fs-extra";import*as L from"path";async function Ue(e){let t=L.join(e.homeDir,".codex","AGENTS.md"),o=e.options.globalAgents;if(o==="skip"){e.logger.info("Skipping global AGENTS.md creation");return}let r=L.join(e.rootDir,"templates","agent-templates","AGENTS-default.md");if(!await P.pathExists(r)){e.logger.warn(`Template not found at ${r}`);return}switch(o){case"create-default":if(await P.pathExists(t)){e.logger.info("Global AGENTS.md already exists; leaving unchanged");return}await P.ensureDir(L.dirname(t)),e.options.dryRun?e.logger.log(`[dry-run] cp ${r} ${t}`):await P.copy(r,t),e.logger.ok(`Wrote ${t}`);break;case"overwrite-default":if(await P.ensureDir(L.dirname(t)),await P.pathExists(t)){let i=T(t);e.options.dryRun?e.logger.log(`[dry-run] cp ${t} ${i}`):await P.copy(t,i),e.logger.info(`Backed up existing AGENTS.md to: ${i}`)}e.options.dryRun?e.logger.log(`[dry-run] cp ${r} ${t}`):await P.copy(r,t),e.logger.ok(`Wrote ${t}`);break;case"append-default":if(await P.ensureDir(L.dirname(t)),await P.pathExists(t)){let i=T(t);e.options.dryRun?e.logger.log(`[dry-run] cp ${t} ${i}`):await P.copy(t,i),e.logger.info(`Backed up existing AGENTS.md to: ${i}`)}let n=await P.readFile(r,"utf8");e.options.dryRun?e.logger.log(`[dry-run] append template to ${t}`):await P.appendFile(t,`
37
37
  ---
38
38
 
39
- ${n}`,"utf8"),e.logger.ok(`Appended template to ${t}`);break;default:e.options.skipConfirmation&&e.logger.info("Skipping global AGENTS.md creation (non-interactive mode)");break}}async function Ge(e){if(e.options.noVscode)return;let t=e.options.vscodeId;if(!t){e.logger.info("VS Code extension id not provided. Use: --vscode <publisher.extension>");return}if(!await u("code")){e.logger.warn("'code' (VS Code) not in PATH; skipping extension install");return}if(e.options.dryRun){e.logger.log(`[dry-run] code --install-extension ${t}`);return}e.logger.info(`Installing VS Code extension: ${t}`),await g("code",["--install-extension",t,"--force"],{dryRun:!1,logger:e.logger}),e.logger.ok(`VS Code extension '${t}' installed (or already present)`)}import B from"fs-extra";import*as H from"path";async function Fe(e){let t=e.options.agentsMd;if(!t)return;let o=t;(await B.stat(o).catch(()=>null))?.isDirectory()&&(o=H.join(o,"AGENTS.md"));let i=H.join(e.rootDir,"templates","agent-templates","AGENTS-default.md");if(await B.pathExists(o)){e.logger.warn(`${o} already exists`);let n=T(o);e.options.dryRun?e.logger.log(`[dry-run] cp ${o} ${n}`):await B.copy(o,n),e.logger.info(`Backed up existing AGENTS.md to: ${n}`)}e.logger.info(`Writing starter AGENTS.md to: ${o}`),e.options.dryRun?e.logger.log(`[dry-run] write AGENTS.md to ${o}`):(await B.ensureDir(H.dirname(o)),await B.copy(i,o),e.logger.ok("Wrote AGENTS.md"))}var qe="codex-1up";async function he(e,t){let o=Me.homedir(),i=me.join(o,`.${qe}`);await Ct.ensureDir(i);let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5),r=me.join(i,`install-${n}.log`),a=Re(r);a.info(`==> ${qe} installer`),a.info(`Log: ${r}`);let s={cwd:process.cwd(),homeDir:o,rootDir:t,logDir:i,logFile:r,options:e,logger:a};try{await Ie(s),await Ne(s),await Te(s);let m=await u("codex")||s.options.installCodexCli==="yes";m||a.warn("Codex CLI not found and codex install was skipped; skipping config/notify setup until codex is installed."),m&&(await De(s),await Ae(s),await Oe(s),await Le(s)),await Ge(s),await Fe(s),a.ok("All done. Open a new shell or 'source' your rc file to load aliases."),a.info("Next steps:"),a.info(" 1) codex # sign in; then ask it to plan a refactor"),a.info(" 2) ./bin/codex-1up agents --path $PWD # write a starter AGENTS.md to your repo"),a.info(" 3) Review ~/.codex/config.toml (see: https://github.com/openai/codex/blob/main/docs/config.md)")}catch(c){throw a.err(`Installation failed: ${c}`),c}}var We=Et(Rt(import.meta.url));function It(){let e=We;for(let t=0;t<6;t++){try{return Pt(x(e,"templates","codex-config.toml")),e}catch{}e=x(e,"..")}return x(We,"..")}var ne=It(),ze=St({meta:{name:"install",description:"Run the codex-1up installer with validated flags"},args:{yes:{type:"boolean",description:"Non-interactive; accept safe defaults"},"dry-run":{type:"boolean",description:"Print actions without making changes"},"skip-confirmation":{type:"boolean",description:"Skip prompts"},shell:{type:"string",description:"auto|zsh|bash|fish"},vscode:{type:"string",description:"Install VS Code extension id"},"no-vscode":{type:"boolean",description:"Skip VS Code extension checks"},"git-external-diff":{type:"boolean",description:"Set difftastic as git external diff"},"install-node":{type:"string",description:"nvm|brew|skip"},tools:{type:"string",description:"yes|no install/upgrade core CLI tools (rg, fd, fzf, jq, yq, difftastic)"},"codex-cli":{type:"string",description:"yes|no install/upgrade Codex CLI + ast-grep globally"},profile:{type:"string",description:"balanced|safe|minimal|yolo|skip (choose profile to write)"},"profile-mode":{type:"string",description:"add|overwrite (profile table merge strategy)"},sound:{type:"string",description:'Sound file, "none", or "skip" to leave unchanged'},"agents-md":{type:"string",description:"Write starter AGENTS.md to PATH (default PWD/AGENTS.md)",required:!1}},async run({args:e}){let t=x(J.homedir(),".codex","config.toml"),o=await we(t),i=x(J.homedir(),".codex","notify.sh"),n=await we(i),r=x(J.homedir(),".codex","AGENTS.md"),a=await we(r),s=o?await jt(t):void 0,c=process.stdout.isTTY&&!e["dry-run"]&&!e["skip-confirmation"]&&!e.yes,m=Tt(e.profile),b=xt(e["profile-mode"]),h=Dt(e.tools),v=At(e["codex-cli"]),p=process.platform==="darwin"||process.platform==="linux",d=typeof e.sound>"u"?void 0:String(e.sound).trim();if(d==="")throw new Error('Invalid --sound value (expected path, "none", or "skip")');let k=m||(be(s)?s:void 0)||"balanced",N=b||"add",D=!0,se=h||(p?"yes":"no"),Ce=v||"yes",A,M,_;if(d&&(f=>{let I=f.trim().toLowerCase();if(I==="skip"){A="no",_=void 0;return}A="yes",_=I==="none"?"none":f})(d),c){if(l.intro("codex-1up \xB7 Install"),!v){let f=await l.confirm({message:"Install/update Codex CLI globally?",initialValue:!0});if(l.isCancel(f))return l.cancel("Install aborted");Ce=f?"yes":"no"}if(p&&!h){l.note("We can install/update developer tools (rg, fd, fzf, jq, yq, difftastic, ast-grep) using your package manager (macOS/Linux).");let f=await l.confirm({message:"Install/update these CLI tools?",initialValue:!0});if(l.isCancel(f))return l.cancel("Install aborted");se=f?"yes":"no"}else!p&&!h&&(se="no");if(!m){l.note(["Profiles:"," \u2022 Balanced: on-request approvals, workspace-write sandbox, web search on."," \u2022 Safe: on-failure approvals, workspace-write, web search off."," \u2022 Minimal: lean settings, minimal reasoning effort, web search off."," \u2022 YOLO: never approvals, danger-full-access, web search on, verbose."].join(`
40
- `));let f=await l.select({message:"Choose a Codex profile to install",options:[{label:"Balanced (recommended)",value:"balanced",hint:"on-request approvals \xB7 workspace-write \xB7 web search on"},{label:"Safe",value:"safe",hint:"on-failure approvals \xB7 workspace-write \xB7 web search off"},{label:"Minimal",value:"minimal",hint:"lean defaults \xB7 minimal reasoning effort \xB7 web search off"},{label:"YOLO",value:"yolo",hint:"never approvals \xB7 danger-full-access \xB7 web search on"},{label:"Skip (no profile changes)",value:"skip"}],initialValue:_t(s)});if(l.isCancel(f))return l.cancel("Install aborted");k=f}if(k!=="skip"&&!b){let f=await l.select({message:`How should we write profiles.${k}?`,options:[{label:"Add / merge (preserve custom keys)",value:"add"},{label:"Overwrite codex profile (replace table)",value:"overwrite"}],initialValue:N});if(l.isCancel(f))return l.cancel("Install aborted");N=f}if(k==="skip")D=!1;else{let f=await l.confirm({message:`Wrote profiles.${k} to ~/.codex/config.toml (mode: ${N}). Set this as the default profile?`,initialValue:!0});if(l.isCancel(f))return l.cancel("Install aborted");D=!!f}if(!d){let le=function(E){return[{label:"Skip (leave current setup)",value:"skip"},{label:"None (disable sounds)",value:"none"},...I.map($=>({label:$,value:$})),{label:"Custom path\u2026",value:"custom"}]};var yo=le;let f=x(ne,"sounds"),I=[];try{I=(await X.readdir(f)).filter(E=>/\.(wav|mp3|ogg)$/i.test(E)).sort()}catch{}A="yes";let C=I.includes("noti_1.wav")?"noti_1.wav":I[0]||"none";async function pe(E){let $=await l.text({message:"Enter absolute path to a .wav file",placeholder:E||"/absolute/path/to/sound.wav",validate(O){if(!O)return"Path required";if(!O.startsWith("/"))return"Use an absolute path";if(!/(\.wav|\.mp3|\.ogg)$/i.test(O))return"Supported: .wav, .mp3, .ogg"}});if(l.isCancel($))return null;try{await X.access(String($))}catch{return l.log.warn("File not found. Try again."),await pe(String($))}return String($)}let W=await l.select({message:"Notification sound",options:le(C),initialValue:C});if(l.isCancel(W))return l.cancel("Install aborted");if(W==="skip")A="no",_=void 0;else if(W==="custom"){let E=await pe();if(E===null)return l.cancel("Install aborted");C=E}else C=W;if(W!=="skip"){for(;;){let E=await l.select({message:`Selected: ${C}. What next?`,options:[{label:"Preview \u25B6 (press p then Enter)",value:"preview"},{label:"Use this",value:"use"},{label:"Choose another\u2026",value:"change"}],initialValue:"use"});if(l.isCancel(E))return l.cancel("Install aborted");if(E==="use")break;if(E==="change"){let $=await l.select({message:"Notification sound",options:le(C),initialValue:C});if(l.isCancel($))return l.cancel("Install aborted");if($==="custom"){let O=await pe();if(O===null)return l.cancel("Install aborted");C=O}else if($==="skip"){A="no",_=void 0;break}else C=$;continue}try{let $=C==="none"?"none":C.startsWith("/")?C:x(ne,"sounds",C);await Nt($)}catch($){l.log.warn(String($))}}_===void 0&&(_=C)}}if(a){l.note(`Global AGENTS.md is shared instructions Codex can reference in any repo. We add a short starter guide (fd/ast-grep/jq/yq patterns, deterministic selects).
39
+ ${n}`,"utf8"),e.logger.ok(`Appended template to ${t}`);break;default:e.options.skipConfirmation&&e.logger.info("Skipping global AGENTS.md creation (non-interactive mode)");break}}async function Ve(e){if(e.options.noVscode)return;let t=e.options.vscodeId;if(!t){e.logger.info("VS Code extension id not provided. Use: --vscode <publisher.extension>");return}if(!await u("code")){e.logger.warn("'code' (VS Code) not in PATH; skipping extension install");return}if(e.options.dryRun){e.logger.log(`[dry-run] code --install-extension ${t}`);return}e.logger.info(`Installing VS Code extension: ${t}`),await m("code",["--install-extension",t,"--force"],{dryRun:!1,logger:e.logger}),e.logger.ok(`VS Code extension '${t}' installed (or already present)`)}import X from"fs-extra";import*as Y from"path";async function Be(e){let t=e.options.agentsMd;if(!t)return;let o=t;(await X.stat(o).catch(()=>null))?.isDirectory()&&(o=Y.join(o,"AGENTS.md"));let r=Y.join(e.rootDir,"templates","agent-templates","AGENTS-default.md");if(await X.pathExists(o)){e.logger.warn(`${o} already exists`);let n=T(o);e.options.dryRun?e.logger.log(`[dry-run] cp ${o} ${n}`):await X.copy(o,n),e.logger.info(`Backed up existing AGENTS.md to: ${n}`)}e.logger.info(`Writing starter AGENTS.md to: ${o}`),e.options.dryRun?e.logger.log(`[dry-run] write AGENTS.md to ${o}`):(await X.ensureDir(Y.dirname(o)),await X.copy(r,o),e.logger.ok("Wrote AGENTS.md"))}var He="codex-1up";async function ve(e,t){let o=Ke.homedir(),r=$e.join(o,`.${He}`);await It.ensureDir(r);let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5),i=$e.join(r,`install-${n}.log`),a=Te(i);a.info(`==> ${He} installer`),a.info(`Log: ${i}`);let s={cwd:process.cwd(),homeDir:o,rootDir:t,logDir:r,logFile:i,options:e,logger:a};try{await _e(s),await je(s),await Oe(s);let g=await u("codex")||s.options.installCodexCli==="yes";g||a.warn("Codex CLI not found and codex install was skipped; skipping config/notify setup until codex is installed."),g&&(await Fe(s),await qe(s),await ze(s),await Ue(s)),await Ve(s),await Be(s),a.ok("All done. Open a new shell or 'source' your rc file to load aliases."),a.info("Next steps:"),a.info(" 1) codex # sign in; then ask it to plan a refactor"),a.info(" 2) ./bin/codex-1up agents --path $PWD # write a starter AGENTS.md to your repo"),a.info(" 3) Review ~/.codex/config.toml (see: https://github.com/openai/codex/blob/main/docs/config.md)")}catch(f){throw a.err(`Installation failed: ${f}`),f}}var Je=Dt(Tt(import.meta.url));function _t(){let e=Je;for(let t=0;t<6;t++){try{return At(D(e,"templates","codex-config.toml")),e}catch{}e=D(e,"..")}return D(Je,"..")}var pe=_t(),Ye=Nt({meta:{name:"install",description:"Run the codex-1up installer with validated flags"},args:{yes:{type:"boolean",description:"Non-interactive; accept safe defaults"},"dry-run":{type:"boolean",description:"Print actions without making changes"},"skip-confirmation":{type:"boolean",description:"Skip prompts"},shell:{type:"string",description:"auto|zsh|bash|fish"},vscode:{type:"string",description:"Install VS Code extension id"},"no-vscode":{type:"boolean",description:"Skip VS Code extension checks"},"git-external-diff":{type:"boolean",description:"Set difftastic as git external diff"},"install-node":{type:"string",description:"nvm|brew|skip"},tools:{type:"string",description:"yes|no install/upgrade core CLI tools (rg, fd, fzf, jq, yq, difftastic)"},"codex-cli":{type:"string",description:"yes|no install/upgrade Codex CLI + ast-grep globally"},"profiles-scope":{type:"string",description:"single|all (write one profile or all profiles)"},profile:{type:"string",description:"balanced|safe|minimal|yolo|skip (choose profile to write)"},"profile-mode":{type:"string",description:"add|overwrite (profile table merge strategy)"},sound:{type:"string",description:'Sound file, "none", or "skip" to leave unchanged'},"agents-md":{type:"string",description:"Write starter AGENTS.md to PATH (default PWD/AGENTS.md)",required:!1}},async run({args:e,rawArgs:t}){let o=D(Z.homedir(),".codex","config.toml"),r=await Ce(o),n=D(Z.homedir(),".codex","notify.sh"),i=await Ce(n),a=D(Z.homedir(),".codex","AGENTS.md"),s=await Ce(a),f=r?await Wt(o):void 0,g=process.stdout.isTTY&&!e["dry-run"]&&!e["skip-confirmation"]&&!e.yes,b=Ot(e.profile),w=Lt(e["profile-mode"]),$=Gt(e["profiles-scope"]),p=Ft(e.tools),d=qt(e["codex-cli"]),h=process.platform==="darwin"||process.platform==="linux",v=typeof e.sound>"u"?void 0:String(e.sound).trim();if(v==="")throw new Error('Invalid --sound value (expected path, "none", or "skip")');let j=t.some(S=>S==="--no-vscode"||S.startsWith("--no-vscode=")),G=b||(Re(f)?f:void 0)||"balanced",I=G,U=w||"add",A=$||"single",ie=!0,ue=p||(h?"yes":"no"),Ie=d||"yes",_,V,O;if(v&&(S=>{let c=S.trim().toLowerCase();if(c==="skip"){_="no",O=void 0;return}_="yes",O=c==="none"?"none":S})(v),g){if(l.intro("codex-1up \xB7 Install"),!d){let c=await l.confirm({message:"Install/update Codex CLI globally?",initialValue:!0});if(l.isCancel(c))return l.cancel("Install aborted");Ie=c?"yes":"no"}if(h&&!p){l.note("We can install/update developer tools (rg, fd, fzf, jq, yq, difftastic, ast-grep) using your package manager (macOS/Linux).");let c=await l.confirm({message:"Install/update these CLI tools?",initialValue:!0});if(l.isCancel(c))return l.cancel("Install aborted");ue=c?"yes":"no"}else!h&&!p&&(ue="no");if(!$){let c=await l.select({message:"Install all profiles (balanced, safe, minimal, yolo)?",options:[{label:"Yes \u2014 install/update all profiles",value:"all"},{label:"No \u2014 choose a single profile",value:"single"}],initialValue:"all"});if(l.isCancel(c))return l.cancel("Install aborted");A=c}if(b)A==="all"&&I==="skip"&&(I=G);else{l.note(["Profiles:"," \u2022 Balanced: on-request approvals, workspace-write sandbox, web search on."," \u2022 Safe: on-failure approvals, workspace-write, web search off."," \u2022 Minimal: lean settings, minimal reasoning effort, web search off."," \u2022 YOLO: never approvals, danger-full-access, web search on, verbose."].join(`
40
+ `));let c=await l.select({message:"Choose a Codex profile to install",options:[{label:"Balanced (recommended)",value:"balanced",hint:"on-request approvals \xB7 workspace-write \xB7 web search on"},{label:"Safe",value:"safe",hint:"on-failure approvals \xB7 workspace-write \xB7 web search off"},{label:"Minimal",value:"minimal",hint:"lean defaults \xB7 minimal reasoning effort \xB7 web search off"},{label:"YOLO",value:"yolo",hint:"never approvals \xB7 danger-full-access \xB7 web search on"},...A==="single"?[{label:"Skip (no profile changes)",value:"skip"}]:[]],initialValue:Mt(f)});if(l.isCancel(c))return l.cancel("Install aborted");I=c}if((A==="all"||I!=="skip")&&!w){let c=await l.select({message:A==="all"?"How should we write all profiles?":`How should we write profiles.${I}?`,options:[{label:"Add / merge (preserve custom keys)",value:"add"},{label:"Overwrite codex profile (replace table)",value:"overwrite"}],initialValue:U});if(l.isCancel(c))return l.cancel("Install aborted");U=c}if(A==="single"&&I==="skip")ie=!1;else{let c=await l.confirm({message:A==="all"?`Wrote all profiles to ~/.codex/config.toml (mode: ${U}). Set ${I} as the default profile?`:`Wrote profiles.${I} to ~/.codex/config.toml (mode: ${U}). Set this as the default profile?`,initialValue:!0});if(l.isCancel(c))return l.cancel("Install aborted");ie=!!c}if(!v){let ge=function(E){return[{label:"Skip (leave current setup)",value:"skip"},{label:"None (disable sounds)",value:"none"},...re.map(k=>({label:k,value:k})),{label:"Custom path\u2026",value:"custom"}]};var Ro=ge;let c=D(pe,"sounds"),re=[];try{re=(await ee.readdir(c)).filter(E=>/\.(wav|mp3|ogg)$/i.test(E)).sort()}catch{}_="yes";let C=re.includes("noti_1.wav")?"noti_1.wav":re[0]||"none";async function me(E){let k=await l.text({message:"Enter absolute path to a .wav file",placeholder:E||"/absolute/path/to/sound.wav",validate(F){if(!F)return"Path required";if(!F.startsWith("/"))return"Use an absolute path";if(!/(\.wav|\.mp3|\.ogg)$/i.test(F))return"Supported: .wav, .mp3, .ogg"}});if(l.isCancel(k))return null;try{await ee.access(String(k))}catch{return l.log.warn("File not found. Try again."),await me(String(k))}return String(k)}let B=await l.select({message:"Notification sound",options:ge(C),initialValue:C});if(l.isCancel(B))return l.cancel("Install aborted");if(B==="skip")_="no",O=void 0;else if(B==="custom"){let E=await me();if(E===null)return l.cancel("Install aborted");C=E}else C=B;if(B!=="skip"){for(;;){let E=await l.select({message:`Selected: ${C}. What next?`,options:[{label:"Preview \u25B6 (press p then Enter)",value:"preview"},{label:"Use this",value:"use"},{label:"Choose another\u2026",value:"change"}],initialValue:"use"});if(l.isCancel(E))return l.cancel("Install aborted");if(E==="use")break;if(E==="change"){let k=await l.select({message:"Notification sound",options:ge(C),initialValue:C});if(l.isCancel(k))return l.cancel("Install aborted");if(k==="custom"){let F=await me();if(F===null)return l.cancel("Install aborted");C=F}else if(k==="skip"){_="no",O=void 0;break}else C=k;continue}try{let k=C==="none"?"none":C.startsWith("/")?C:D(pe,"sounds",C);await jt(k)}catch(k){l.log.warn(String(k))}}O===void 0&&(O=C)}}if(s){l.note(`Global AGENTS.md is shared instructions Codex can reference in any repo. We add a short starter guide (fd/ast-grep/jq/yq patterns, deterministic selects).
41
41
 
42
42
  - Backups will be created
43
43
  - If you think codex works worse with this instructions, you can remove them from ~/.codex/AGENTS.md anytime.
44
- `);let f=await l.select({message:"Global ~/.codex/AGENTS.md (optional)",options:[{label:"Add to your existing AGENTS.md (keeps your content, adds ours; backup created)",value:"append-default"},{label:"Overwrite existing (replace with starter; backup created)",value:"overwrite-default"},{label:"Skip \u2014 leave as-is (you can run codex-1up agents later)",value:"skip"}],initialValue:"append-default"});if(l.isCancel(f))return l.cancel("Install aborted");M=f}else{l.note(`Global AGENTS.md is shared instructions Codex can reference in any repo. We add a short starter guide (fd/ast-grep/jq/yq patterns, deterministic selects).
44
+ `);let c=await l.select({message:"Global ~/.codex/AGENTS.md (optional)",options:[{label:"Add to your existing AGENTS.md (keeps your content, adds ours; backup created)",value:"append-default"},{label:"Overwrite existing (replace with starter; backup created)",value:"overwrite-default"},{label:"Skip \u2014 leave as-is (you can run codex-1up agents later)",value:"skip"}],initialValue:"append-default"});if(l.isCancel(c))return l.cancel("Install aborted");V=c}else{l.note(`Global AGENTS.md is shared instructions Codex can reference in any repo. We add a short starter guide (fd/ast-grep/jq/yq patterns, deterministic selects).
45
45
 
46
46
  - Backups will be created
47
47
  - If you think codex works worse with this instructions, you can remove them from ~/.codex/AGENTS.md anytime.
48
- `);let f=await l.select({message:"Global ~/.codex/AGENTS.md (optional)",options:[{label:"Create starter AGENTS.md (recommended; helps give Codex repo context everywhere)",value:"create-default"},{label:"Skip for now (you can add later with codex-1up agents --global)",value:"skip"}],initialValue:"create-default"});if(l.isCancel(f))return l.cancel("Install aborted");M=f}}c||(k==="skip"&&(D=!1),typeof A>"u"&&(A=n?"no":"yes"),typeof M>"u"&&(M="skip"));let Se={profile:k,profileMode:N,setDefaultProfile:D,installCodexCli:Ce,installTools:se,notify:A??(n?"no":"yes"),globalAgents:M??"skip",notificationSound:_,mode:"manual",installNode:e["install-node"]||"nvm",shell:String(e.shell||"auto"),vscodeId:e.vscode?String(e.vscode):void 0,noVscode:e["no-vscode"]||!1,agentsMd:typeof e["agents-md"]<"u"?String(e["agents-md"]||process.cwd()):void 0,dryRun:e["dry-run"]||!1,assumeYes:e.yes||!1,skipConfirmation:e["skip-confirmation"]||!1};if(c){let f=l.spinner();f.start("Installing prerequisites and writing config");try{await he(Se,ne),f.stop("Base install complete"),l.outro("Install finished")}catch(I){throw f.stop("Installation failed"),l.cancel(`Installation failed: ${I}`),I}await Ue();return}try{await he(Se,ne),await Ue()}catch(f){throw l.cancel(`Installation failed: ${f}`),f}}});async function Ue(){let e=J.homedir(),t=x(e,".codex","config.toml"),o,i=[];try{let c=await X.readFile(t,"utf8"),m=ye.parse(c);o=m.profile;let b=m.profiles||{};i=Object.keys(b)}catch{}let n=["codex","ast-grep","fd","rg","fzf","jq","yq","difft","difftastic"],a=(await Promise.all(n.map(async c=>{try{return await F(c),[c,!0]}catch{return[c,!1]}}))).filter(([,c])=>c).map(([c])=>c),s=[];s.push(""),s.push("codex-1up: Installation summary"),s.push("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),s.push(`Config: ${t}${o?` (active profile: ${o})`:""}`),i.length&&s.push(`Profiles: ${i.join(", ")}`),s.push(`Tools detected: ${a.join(", ")||"none"}`),s.push(""),s.push("Usage:"),s.push(" - Switch profile for a session: codex --profile <name>"),s.push(" - List available profiles: codex-1up config profiles"),s.push(" - Persist active profile: codex-1up config set-profile <name>"),s.push(" - Write AGENTS.md to a repo: codex-1up agents --path . --template default"),s.push(""),process.stdout.write(s.join(`
48
+ `);let c=await l.select({message:"Global ~/.codex/AGENTS.md (optional)",options:[{label:"Create starter AGENTS.md (recommended; helps give Codex repo context everywhere)",value:"create-default"},{label:"Skip for now (you can add later with codex-1up agents --global)",value:"skip"}],initialValue:"create-default"});if(l.isCancel(c))return l.cancel("Install aborted");V=c}}g||(I==="skip"&&(ie=!1),typeof _>"u"&&(_=i?"no":"yes"),typeof V>"u"&&(V="skip"));let Ne={profile:I,profileScope:A,profileMode:U,setDefaultProfile:ie,installCodexCli:Ie,installTools:ue,notify:_??(i?"no":"yes"),globalAgents:V??"skip",notificationSound:O,mode:"manual",installNode:e["install-node"]||"nvm",shell:String(e.shell||"auto"),vscodeId:j?void 0:e.vscode?String(e.vscode):void 0,noVscode:j||e["no-vscode"]||!1,agentsMd:typeof e["agents-md"]<"u"?String(e["agents-md"]||process.cwd()):void 0,dryRun:e["dry-run"]||!1,assumeYes:e.yes||!1,skipConfirmation:e["skip-confirmation"]||!1};if(g){let S=l.spinner();S.start("Installing prerequisites and writing config");try{await ve(Ne,pe),S.stop("Base install complete"),l.outro("Install finished")}catch(c){throw S.stop("Installation failed"),l.cancel(`Installation failed: ${c}`),c}await Xe();return}try{await ve(Ne,pe),await Xe()}catch(S){throw l.cancel(`Installation failed: ${S}`),S}}});async function Xe(){let e=Z.homedir(),t=D(e,".codex","config.toml"),o,r=[];try{let f=await ee.readFile(t,"utf8"),g=Se.parse(f);o=g.profile;let b=g.profiles||{};r=Object.keys(b)}catch{}let n=["codex","ast-grep","fd","rg","fzf","jq","yq","difft","difftastic"],a=(await Promise.all(n.map(async f=>{try{return await W(f),[f,!0]}catch{return[f,!1]}}))).filter(([,f])=>f).map(([f])=>f),s=[];s.push(""),s.push("codex-1up: Installation summary"),s.push("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),s.push(`Config: ${t}${o?` (active profile: ${o})`:""}`),r.length&&s.push(`Profiles: ${r.join(", ")}`),s.push(`Tools detected: ${a.join(", ")||"none"}`),s.push(""),s.push("Usage:"),s.push(" - Switch profile for a session: codex --profile <name>"),s.push(" - List available profiles: codex-1up config profiles"),s.push(" - Persist active profile: codex-1up config set-profile <name>"),s.push(" - Write AGENTS.md to a repo: codex-1up agents --path . --template default"),s.push(""),process.stdout.write(s.join(`
49
49
  `)+`
50
- `)}async function Nt(e){if(e.endsWith("/none")||e==="none")return;let t=[async o=>{await F("afplay"),await K`afplay ${o}`},async o=>{await F("paplay"),await K`paplay ${o}`},async o=>{await F("aplay"),await K`aplay ${o}`},async o=>{await F("mpg123"),await K`mpg123 -q ${o}`},async o=>{await F("ffplay"),await K`ffplay -nodisp -autoexit -loglevel quiet ${o}`}];for(let o of t)try{await o(e);return}catch{}throw new Error("No audio player found (afplay/paplay/aplay/mpg123/ffplay)")}async function we(e){try{return await X.access(e),!0}catch{return!1}}function Tt(e){if(e==null)return;let t=String(e).toLowerCase();if(be(t))return t;if(t==="skip")return"skip";throw new Error("Invalid --profile value (use balanced|safe|minimal|yolo|skip).")}function xt(e){if(e==null)return;let t=String(e).toLowerCase();if(t==="add"||t==="overwrite")return t;throw new Error("Invalid --profile-mode value (use add|overwrite).")}function Dt(e){if(e==null)return;let t=String(e).toLowerCase();if(t==="yes"||t==="no")return t;throw new Error("Invalid --tools value (use yes|no).")}function At(e){if(e==null)return;let t=String(e).toLowerCase();if(t==="yes"||t==="no")return t;throw new Error("Expected yes|no")}function be(e){return e==="balanced"||e==="safe"||e==="minimal"||e==="yolo"}function _t(e){return be(e)?e:"balanced"}async function jt(e){try{let t=await X.readFile(e,"utf8"),i=ye.parse(t).profile;return typeof i=="string"?i:void 0}catch{return}}import{defineCommand as Ot}from"citty";import{promises as Y}from"fs";import{accessSync as Lt}from"fs";import{resolve as Q,dirname as Be}from"path";import{fileURLToPath as Gt}from"url";var Ve=Be(Gt(import.meta.url));function Ft(){let e=Ve;for(let t=0;t<6;t++){try{return Lt(Q(e,"templates","codex-config.toml")),e}catch{}e=Q(e,"..")}return Q(Ve,"..")}var qt=Ft();async function ke(e){try{return await Y.access(e),!0}catch{return!1}}async function Mt(e,t){if(await ke(t)){let i=`${t}.backup.${new Date().toISOString().replace(/[:.]/g,"").replace("T","_").slice(0,15)}`;await Y.copyFile(t,i)}await Y.mkdir(Be(t),{recursive:!0}),await Y.copyFile(e,t)}var He=Ot({meta:{name:"agents",description:"Write an AGENTS.md template"},args:{path:{type:"string",required:!0,description:"Target repo path or file"}},async run({args:e}){let t=String(e.path),o=Q(qt,"templates/agent-templates","AGENTS-default.md"),n=await ke(t).then(async r=>r&&(await Y.stat(t)).isDirectory()).catch(()=>!1)?Q(t,"AGENTS.md"):t;if(!await ke(o))throw new Error(`Template not found: ${o}`);await Mt(o,n),process.stdout.write(`Wrote ${n}
51
- `)}});import{defineCommand as Wt}from"citty";import{$ as Ut}from"zx";import{fileURLToPath as zt}from"url";import{accessSync as Vt}from"fs";import{dirname as Bt,resolve as ie}from"path";var Ke=Bt(zt(import.meta.url));function Ht(){let e=Ke;for(let t=0;t<6;t++){try{return Vt(ie(e,"templates","codex-config.toml")),e}catch{}e=ie(e,"..")}return ie(Ke,"..")}var Kt=Ht(),Je=Wt({meta:{name:"doctor",description:"Run environment checks"},async run(){await Ut`bash ${ie(Kt,"scripts/doctor.sh")}`}});import{defineCommand as Jt}from"citty";import{$ as Xt}from"zx";import{fileURLToPath as Yt}from"url";import{accessSync as Qt}from"fs";import{dirname as Zt,resolve as re}from"path";var Xe=Zt(Yt(import.meta.url));function eo(){let e=Xe;for(let t=0;t<6;t++){try{return Qt(re(e,"templates","codex-config.toml")),e}catch{}e=re(e,"..")}return re(Xe,"..")}var to=eo(),Ye=Jt({meta:{name:"uninstall",description:"Clean up aliases and config created by this tool"},async run(){await Xt`bash ${re(to,"scripts/uninstall.sh")}`}});import{defineCommand as ae}from"citty";import{promises as Z}from"fs";import{resolve as q,dirname as tt}from"path";import{fileURLToPath as oo}from"url";import{accessSync as no}from"fs";import io from"os";var Qe=tt(oo(import.meta.url));function ro(){let e=Qe;for(let t=0;t<6;t++){try{return no(q(e,"templates","codex-config.toml")),e}catch{}e=q(e,"..")}return q(Qe,"..")}var ao=ro();function $e(){let e=q(io.homedir(),".codex"),t=q(e,"config.toml");return{CODEX_HOME:e,CFG:t}}async function ve(e){return Z.readFile(e,"utf8")}async function Ze(e,t){await Z.mkdir(tt(e),{recursive:!0}),await Z.writeFile(e,t,"utf8")}function et(e){let t=/^\[profiles\.(.+?)\]/gm,o=[],i;for(;i=t.exec(e);)o.push(i[1]);return o}function so(e,t){let o=`profile = "${t}"`;if(/^profile\s*=\s*".*"/m.test(e))return e.replace(/^profile\s*=\s*".*"/m,o);let i=e.indexOf(`
52
- `);return i===-1?o+`
53
- `+e:e.slice(0,i+1)+o+`
54
- `+e.slice(i+1)}var ot=ae({meta:{name:"config",description:"Manage Codex config profiles"},subCommands:{init:ae({meta:{name:"init",description:"Install unified config with multiple profiles"},args:{force:{type:"boolean",description:"Backup and overwrite if exists"}},async run({args:e}){let t=q(ao,"templates/codex-config.toml"),o=await ve(t),{CFG:i}=$e(),n=await Z.access(i).then(()=>!0).catch(()=>!1);if(n&&!e.force){process.stdout.write(`${i} exists. Use --force to overwrite.
55
- `);return}if(n){let r=`${i}.backup.${Date.now()}`;await Z.copyFile(i,r),process.stdout.write(`Backed up to ${r}
56
- `)}await Ze(i,o),process.stdout.write(`Wrote ${i}
57
- `)}}),profiles:ae({meta:{name:"profiles",description:"List profiles in the current config"},async run(){let{CFG:e}=$e(),t=await ve(e),o=et(t);process.stdout.write(o.length?o.join(`
50
+ `)}async function jt(e){if(e.endsWith("/none")||e==="none")return;let t=[async o=>{await W("afplay"),await Q`afplay ${o}`},async o=>{await W("paplay"),await Q`paplay ${o}`},async o=>{await W("aplay"),await Q`aplay ${o}`},async o=>{await W("mpg123"),await Q`mpg123 -q ${o}`},async o=>{await W("ffplay"),await Q`ffplay -nodisp -autoexit -loglevel quiet ${o}`}];for(let o of t)try{await o(e);return}catch{}throw new Error("No audio player found (afplay/paplay/aplay/mpg123/ffplay)")}async function Ce(e){try{return await ee.access(e),!0}catch{return!1}}function Ot(e){if(e==null)return;let t=String(e).toLowerCase();if(Re(t))return t;if(t==="skip")return"skip";throw new Error("Invalid --profile value (use balanced|safe|minimal|yolo|skip).")}function Lt(e){if(e==null)return;let t=String(e).toLowerCase();if(t==="add"||t==="overwrite")return t;throw new Error("Invalid --profile-mode value (use add|overwrite).")}function Gt(e){if(e==null)return;let t=String(e).toLowerCase();if(t==="single"||t==="all")return t;throw new Error("Invalid --profiles-scope value (use single|all).")}function Ft(e){if(e==null)return;let t=String(e).toLowerCase();if(t==="yes"||t==="no")return t;throw new Error("Invalid --tools value (use yes|no).")}function qt(e){if(e==null)return;let t=String(e).toLowerCase();if(t==="yes"||t==="no")return t;throw new Error("Expected yes|no")}function Re(e){return e==="balanced"||e==="safe"||e==="minimal"||e==="yolo"}function Mt(e){return Re(e)?e:"balanced"}async function Wt(e){try{let t=await ee.readFile(e,"utf8"),r=Se.parse(t).profile;return typeof r=="string"?r:void 0}catch{return}}import{defineCommand as zt}from"citty";import{promises as te}from"fs";import{accessSync as Ut}from"fs";import{resolve as oe,dirname as Ze}from"path";import{fileURLToPath as Vt}from"url";var Qe=Ze(Vt(import.meta.url));function Bt(){let e=Qe;for(let t=0;t<6;t++){try{return Ut(oe(e,"templates","codex-config.toml")),e}catch{}e=oe(e,"..")}return oe(Qe,"..")}var Ht=Bt();async function Pe(e){try{return await te.access(e),!0}catch{return!1}}async function Kt(e,t){if(await Pe(t)){let r=`${t}.backup.${new Date().toISOString().replace(/[:.]/g,"").replace("T","_").slice(0,15)}`;await te.copyFile(t,r)}await te.mkdir(Ze(t),{recursive:!0}),await te.copyFile(e,t)}var et=zt({meta:{name:"agents",description:"Write an AGENTS.md template"},args:{path:{type:"string",required:!0,description:"Target repo path or file"}},async run({args:e}){let t=String(e.path),o=oe(Ht,"templates/agent-templates","AGENTS-default.md"),n=await Pe(t).then(async i=>i&&(await te.stat(t)).isDirectory()).catch(()=>!1)?oe(t,"AGENTS.md"):t;if(!await Pe(o))throw new Error(`Template not found: ${o}`);await Kt(o,n),process.stdout.write(`Wrote ${n}
51
+ `)}});import{defineCommand as Jt}from"citty";import{$ as Xt}from"zx";import{fileURLToPath as Yt}from"url";import{accessSync as Qt}from"fs";import{dirname as Zt,resolve as fe}from"path";var tt=Zt(Yt(import.meta.url));function eo(){let e=tt;for(let t=0;t<6;t++){try{return Qt(fe(e,"templates","codex-config.toml")),e}catch{}e=fe(e,"..")}return fe(tt,"..")}var to=eo(),ot=Jt({meta:{name:"doctor",description:"Run environment checks"},async run(){await Xt`bash ${fe(to,"scripts/doctor.sh")}`}});import{defineCommand as oo}from"citty";import{$ as no}from"zx";import{fileURLToPath as io}from"url";import{accessSync as ro}from"fs";import{dirname as ao,resolve as de}from"path";var nt=ao(io(import.meta.url));function so(){let e=nt;for(let t=0;t<6;t++){try{return ro(de(e,"templates","codex-config.toml")),e}catch{}e=de(e,"..")}return de(nt,"..")}var lo=so(),it=oo({meta:{name:"uninstall",description:"Clean up aliases and config created by this tool"},async run(){await no`bash ${de(lo,"scripts/uninstall.sh")}`}});import{defineCommand as ce}from"citty";import{promises as ne}from"fs";import{resolve as z,dirname as lt}from"path";import{fileURLToPath as po}from"url";import{accessSync as fo}from"fs";import co from"os";var rt=lt(po(import.meta.url));function uo(){let e=rt;for(let t=0;t<6;t++){try{return fo(z(e,"templates","codex-config.toml")),e}catch{}e=z(e,"..")}return z(rt,"..")}var go=uo();function Ee(){let e=z(co.homedir(),".codex"),t=z(e,"config.toml");return{CODEX_HOME:e,CFG:t}}async function xe(e){return ne.readFile(e,"utf8")}async function at(e,t){await ne.mkdir(lt(e),{recursive:!0}),await ne.writeFile(e,t,"utf8")}function st(e){let t=/^\[profiles\.(.+?)\]/gm,o=[],r;for(;r=t.exec(e);)o.push(r[1]);return o}function mo(e,t){let o=`profile = "${t}"`;if(/^profile\s*=\s*".*"/m.test(e))return e.replace(/^profile\s*=\s*".*"/m,o);let r=e.indexOf(`
52
+ `);return r===-1?o+`
53
+ `+e:e.slice(0,r+1)+o+`
54
+ `+e.slice(r+1)}var pt=ce({meta:{name:"config",description:"Manage Codex config profiles"},subCommands:{init:ce({meta:{name:"init",description:"Install unified config with multiple profiles"},args:{force:{type:"boolean",description:"Backup and overwrite if exists"}},async run({args:e}){let t=z(go,"templates/codex-config.toml"),o=await xe(t),{CFG:r}=Ee(),n=await ne.access(r).then(()=>!0).catch(()=>!1);if(n&&!e.force){process.stdout.write(`${r} exists. Use --force to overwrite.
55
+ `);return}if(n){let i=`${r}.backup.${Date.now()}`;await ne.copyFile(r,i),process.stdout.write(`Backed up to ${i}
56
+ `)}await at(r,o),process.stdout.write(`Wrote ${r}
57
+ `)}}),profiles:ce({meta:{name:"profiles",description:"List profiles in the current config"},async run(){let{CFG:e}=Ee(),t=await xe(e),o=st(t);process.stdout.write(o.length?o.join(`
58
58
  `)+`
59
59
  `:`No profiles found
60
- `)}}),"set-profile":ae({meta:{name:"set-profile",description:"Set the active profile in config.toml"},args:{name:{type:"positional",required:!0,description:"Profile name"}},async run({args:e}){let{CFG:t}=$e(),o=await ve(t),i=et(o),n=String(e.name);if(!i.includes(n))throw new Error(`Unknown profile: ${n}`);let r=so(o,n);await Ze(t,r),process.stdout.write(`profile set to ${n}
61
- `)}})}});var go=fo(co(import.meta.url)),mo=JSON.parse(po(uo(go,"../package.json"),"utf-8")),nt=lo({meta:{name:"codex-1up",version:mo.version,description:"Power up Codex CLI with clean profiles config and helpers"},subCommands:{install:ze,agents:He,doctor:Je,uninstall:Ye,config:ot}});ho(nt);
60
+ `)}}),"set-profile":ce({meta:{name:"set-profile",description:"Set the active profile in config.toml"},args:{name:{type:"positional",required:!0,description:"Profile name"}},async run({args:e}){let{CFG:t}=Ee(),o=await xe(t),r=st(o),n=String(e.name);if(!r.includes(n))throw new Error(`Unknown profile: ${n}`);let i=mo(o,n);await at(t,i),process.stdout.write(`profile set to ${n}
61
+ `)}})}});var $o=bo(yo(import.meta.url)),vo=JSON.parse(wo(ko($o,"../package.json"),"utf-8")),ft=ho({meta:{name:"codex-1up",version:vo.version,description:"Power up Codex CLI with clean profiles config and helpers"},subCommands:{install:Ye,agents:et,doctor:ot,uninstall:it,config:pt}});Co(ft);
package/package.json CHANGED
@@ -2,27 +2,28 @@
2
2
  "name": "codex-1up",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "0.2.5",
5
+ "version": "0.2.7",
6
6
  "description": "TypeScript CLI for codex-1up (citty-based)",
7
7
  "bin": {
8
8
  "codex-1up": "bin/codex-1up.mjs"
9
9
  },
10
10
  "dependencies": {
11
+ "@clack/prompts": "^0.11.0",
11
12
  "citty": "^0.1.6",
13
+ "fs-extra": "^11.2.0",
12
14
  "toml": "^3.0.0",
13
- "@clack/prompts": "^0.11.0",
14
- "zx": "^8.1.7",
15
- "fs-extra": "^11.2.0"
15
+ "zx": "^8.1.7"
16
16
  },
17
17
  "devDependencies": {
18
- "@types/node": "^24.10.0",
19
18
  "@types/fs-extra": "^11.0.4",
19
+ "@types/node": "^24.10.0",
20
+ "@vitest/coverage-v8": "^4.0.13",
20
21
  "eslint": "^9.12.0",
21
22
  "prettier": "^3.3.3",
22
23
  "tsup": "^8.3.0",
23
24
  "tsx": "^4.19.2",
24
25
  "typescript": "^5.6.3",
25
- "vitest": "^4.0.8"
26
+ "vitest": "^4.0.13"
26
27
  },
27
28
  "files": [
28
29
  "dist",