fluxflow-cli 4.22.0 → 4.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -66,7 +66,7 @@ Usage: fluxflow --export error`),process.exit(1)}if(V&&(console.log(`v${n}`),pro
66
66
  /docs View documentation
67
67
  /fluxflow init Create FluxFlow.md template
68
68
  /update check Check for new version
69
- /update latest Install latest release`),process.exit(0)),z){let C=t[1]||"latest";if(C==="check"){let w=t[2]==="latest";try{let y=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;y||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(w?`Latest version: v${y}`:y!==n?`A new version of FluxFlow is available: v${y} (current: v${n}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${n}).`)}catch(c){console.error("Error checking for updates:",c.message),process.exit(1)}process.exit(0)}else if(C==="latest"){console.log("Checking latest version and settings...");try{let p=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;p||(console.error("Error: Could not retrieve latest version."),process.exit(1)),p===n&&(console.log(`FluxFlow is already up to date (v${n}).`),process.exit(0));let y=async()=>{let s=(await import("react")).default,{useState:R}=s,{render:L,Box:a,Text:E}=await import("ink"),k=(await import("ink-select-input")).default,j=(await import("ink-text-input")).default;return new Promise(G=>{let Y=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],q=({label:M,isSelected:v})=>s.createElement(a,{width:"100%"},s.createElement(E,{bold:v},"\u2514\u2500 ",v?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",M)),I,H=()=>{let[M,v]=R("select"),[N,e]=R(""),l=F=>{F.value==="custom"?v("custom"):U({manager:F.value})},g=F=>{U({manager:"custom",customCommand:F})};return M==="custom"?s.createElement(a,{flexDirection:"column",marginY:1},s.createElement(a,{marginBottom:1},s.createElement(E,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),s.createElement(a,{flexDirection:"row"},s.createElement(E,{color:"cyan",bold:!0}," \u276F "),s.createElement(j,{value:N,onChange:e,onSubmit:g})),s.createElement(a,{marginTop:1},s.createElement(E,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):s.createElement(a,{flexDirection:"column",marginY:1},s.createElement(a,{marginBottom:1},s.createElement(E,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),s.createElement(k,{items:Y,onSelect:l,itemComponent:q,indicatorComponent:()=>null}))},U=M=>{I&&I(),G(M)},{unmount:W}=L(s.createElement(H,null));I=W})},i,A="",$;try{let{loadSettings:s}=await import("./chunks/settings-6BPZ6DG5.js");$=await s(),i=$?.systemSettings?.updateManager||$?.updateManager}catch{}if(!i){let s=await y();i=s.manager,A=s.customCommand}let m="";i==="pnpm"?m=`pnpm add -g fluxflow-cli@${p}`:i==="bun"?m=`bun add -g fluxflow-cli@${p}`:i==="yarn"?m=`yarn global add fluxflow-cli@${p}`:i==="custom"?m=A||$?.customUpdateCommand||`npm install -g fluxflow-cli@${p}`:m=`npm install -g fluxflow-cli@${p}`,console.log(`Updating FluxFlow to v${p} using ${i}...`),console.log(`Running: ${m}`);let{execSync:S}=await import("child_process");S(m,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${p}.\x1B[0m`)}catch(w){console.error("\x1B[31m\u274C Update failed:\x1B[0m",w.message),process.exit(1)}process.exit(0)}else console.error("Unknown update command. Available options: --update, --update check, --update check latest, --update latest"),process.exit(1)}}let{default:re}=await import("react"),{render:ne}=await import("ink"),{default:ie}=await import("./chunks/app-D7ZS4M6W.js");process.env.NODE_NO_WARNINGS="1";let ae=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],le=console.log,ce=console.warn,pe=console.error,B=o=>{let d=o.map(String).join(" ");return ae.some(r=>d.includes(r))};console.log=(...o)=>!B(o)&&le(...o),console.warn=(...o)=>!B(o)&&ce(...o),console.error=(...o)=>!B(o)&&pe(...o);let D=t.findIndex(o=>o==="--cwd"||o==="--path");if(D!==-1&&D+1<t.length){let o=t[D+1],d=await import("path"),r=await import("fs-extra"),u=d.default.resolve(o);try{r.default.existsSync(u)&&r.default.statSync(u).isDirectory()?process.chdir(u):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(h){console.error(`[ERROR] Failed to change directory to "${o}": ${h.message}`),process.exit(0)}}let K=t.findIndex(o=>o==="-p"||o==="--prompt");if(K!==-1){let o=t.includes("--new")||t.includes("-n"),r=t.slice(K+1).filter(e=>e!=="-n"&&e!=="--new")[0],u=t.findIndex(e=>e==="-r"||e==="--run"),h=null,n=null;if(u!==-1&&u+1<t.length){h=t[u+1];try{let{execSync:e}=await import("child_process");n=e(h,{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim()}catch(e){n=(e.stdout?e.stdout.toString().trim():"")||(e.stderr?e.stderr.toString().trim():"")||e.message}}if(n){let{stripAnsi:e}=await import("./chunks/exec_command-BP3TON5E.js");n=e(n).trim(),r?r=`Stdin Context (${h}):
69
+ /update latest Install latest release`),process.exit(0)),z){let C=t[1]||"latest";if(C==="check"){let w=t[2]==="latest";try{let y=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;y||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(w?`Latest version: v${y}`:y!==n?`A new version of FluxFlow is available: v${y} (current: v${n}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${n}).`)}catch(c){console.error("Error checking for updates:",c.message),process.exit(1)}process.exit(0)}else if(C==="latest"){console.log("Checking latest version and settings...");try{let p=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;p||(console.error("Error: Could not retrieve latest version."),process.exit(1)),p===n&&(console.log(`FluxFlow is already up to date (v${n}).`),process.exit(0));let y=async()=>{let s=(await import("react")).default,{useState:R}=s,{render:L,Box:a,Text:$}=await import("ink"),k=(await import("ink-select-input")).default,j=(await import("ink-text-input")).default;return new Promise(G=>{let Y=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],q=({label:M,isSelected:v})=>s.createElement(a,{width:"100%"},s.createElement($,{bold:v},"\u2514\u2500 ",v?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",M)),I,H=()=>{let[M,v]=R("select"),[N,e]=R(""),l=F=>{F.value==="custom"?v("custom"):U({manager:F.value})},g=F=>{U({manager:"custom",customCommand:F})};return M==="custom"?s.createElement(a,{flexDirection:"column",marginY:1},s.createElement(a,{marginBottom:1},s.createElement($,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),s.createElement(a,{flexDirection:"row"},s.createElement($,{color:"cyan",bold:!0}," \u276F "),s.createElement(j,{value:N,onChange:e,onSubmit:g})),s.createElement(a,{marginTop:1},s.createElement($,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):s.createElement(a,{flexDirection:"column",marginY:1},s.createElement(a,{marginBottom:1},s.createElement($,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),s.createElement(k,{items:Y,onSelect:l,itemComponent:q,indicatorComponent:()=>null}))},U=M=>{I&&I(),G(M)},{unmount:W}=L(s.createElement(H,null));I=W})},i,A="",E;try{let{loadSettings:s}=await import("./chunks/settings-6BPZ6DG5.js");E=await s(),i=E?.systemSettings?.updateManager||E?.updateManager}catch{}if(!i){let s=await y();i=s.manager,A=s.customCommand}let m="";i==="pnpm"?m=`pnpm add -g fluxflow-cli@${p}`:i==="bun"?m=`bun add -g fluxflow-cli@${p}`:i==="yarn"?m=`yarn global add fluxflow-cli@${p}`:i==="custom"?m=A||E?.customUpdateCommand||`npm install -g fluxflow-cli@${p}`:m=`npm install -g fluxflow-cli@${p}`,console.log(`Updating FluxFlow to v${p} using ${i}...`),console.log(`Running: ${m}`);let{execSync:S}=await import("child_process");S(m,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${p}.\x1B[0m`)}catch(w){console.error("\x1B[31m\u274C Update failed:\x1B[0m",w.message),process.exit(1)}process.exit(0)}else console.error("Unknown update command. Available options: --update, --update check, --update check latest, --update latest"),process.exit(1)}}let{default:re}=await import("react"),{render:ne}=await import("ink"),{default:ie}=await import("./chunks/app-D7ZS4M6W.js");process.env.NODE_NO_WARNINGS="1";let ae=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],le=console.log,ce=console.warn,pe=console.error,B=o=>{let d=o.map(String).join(" ");return ae.some(r=>d.includes(r))};console.log=(...o)=>!B(o)&&le(...o),console.warn=(...o)=>!B(o)&&ce(...o),console.error=(...o)=>!B(o)&&pe(...o);let D=t.findIndex(o=>o==="--cwd"||o==="--path");if(D!==-1&&D+1<t.length){let o=t[D+1],d=await import("path"),r=await import("fs-extra"),u=d.default.resolve(o);try{r.default.existsSync(u)&&r.default.statSync(u).isDirectory()?process.chdir(u):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(h){console.error(`[ERROR] Failed to change directory to "${o}": ${h.message}`),process.exit(0)}}let K=t.findIndex(o=>o==="-p"||o==="--prompt");if(K!==-1){let o=t.includes("--new")||t.includes("-n"),r=t.slice(K+1).filter(e=>e!=="-n"&&e!=="--new")[0],u=t.findIndex(e=>e==="-r"||e==="--run"),h=null,n=null;if(u!==-1&&u+1<t.length){h=t[u+1];try{let{execSync:e}=await import("child_process");n=e(h,{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim()}catch(e){n=(e.stdout?e.stdout.toString().trim():"")||(e.stderr?e.stderr.toString().trim():"")||e.message}}if(n){let{stripAnsi:e}=await import("./chunks/exec_command-BP3TON5E.js");n=e(n).trim(),r?r=`Stdin Context (${h}):
70
70
  ${n}
71
71
  ---
72
72
 
@@ -74,15 +74,16 @@ ${r}`:r=n}if(!process.stdin.isTTY){let e=[];for await(let g of process.stdin)e.p
74
74
  ${l}
75
75
  ---
76
76
 
77
- ${r}`:r=l}}r||(console.error("[ERROR] -p/--prompt requires a prompt string (or piped stdin input)."),process.exit(1));let{loadSettings:C}=await import("./chunks/settings-6BPZ6DG5.js"),{getProviderAPIKey:w}=await import("./chunks/secrets-RFEEPY3S.js"),{getDefaultModel:c}=await import("./chunks/model_config-UZLNHYP5.js"),{generateSimpleContent:p}=await import("./chunks/ai-RFTQLPYD.js"),{checkQuotaDetailed:y}=await import("./chunks/usage-5LVLEH5S.js"),i=await C(),A=t.filter(e=>e!=="-p"&&e!=="--prompt"&&e!==r&&e!=="-n"&&e!=="--new"),$=A.includes("--raw")||t.includes("--raw"),m=e=>{for(let l of e){let g=A.indexOf(l);if(g!==-1&&g+1<A.length)return A[g+1]}return null},S=m(["--provider"])||i.aiProvider||"Google",s=m(["--model"])||i.activeModel||c(S,i.apiTier)||c(S,"paid"),R=m(["--key"])||await w(S);R||(console.error(`[ERROR] No API key resolved for provider "${S}".`),process.exit(1));let L=await y("agent",{aiProvider:S});L.allowed||(console.error(`[ERROR] ${L.reason||"Budget Exhausted"} - adjust with /budget set.`),process.exit(1));let a={aiProvider:S,apiKey:R,model:s,mode:"flow",thinkingLevel:m(["--thinking"])||"Fast",systemSettings:i.systemSettings||{}},E=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",k=new Date,j=k.getFullYear(),G=k.toLocaleString("en-US",{month:"short"}).toUpperCase(),Y=String(k.getDate()).padStart(2,"0"),q=k.toLocaleTimeString([],{hour:"2-digit",hour12:!0}),I=`${j}-${G}-${Y}, ${q}`,H=`Identity: FluxFlow. Sassy, CLI Assistant
77
+ ${r}`:r=l}}r||(console.error("[ERROR] -p/--prompt requires a prompt string (or piped stdin input)."),process.exit(1));let{loadSettings:C}=await import("./chunks/settings-6BPZ6DG5.js"),{getProviderAPIKey:w}=await import("./chunks/secrets-RFEEPY3S.js"),{getDefaultModel:c}=await import("./chunks/model_config-UZLNHYP5.js"),{generateSimpleContent:p}=await import("./chunks/ai-RFTQLPYD.js"),{checkQuotaDetailed:y}=await import("./chunks/usage-5LVLEH5S.js"),i=await C(),A=t.filter(e=>e!=="-p"&&e!=="--prompt"&&e!==r&&e!=="-n"&&e!=="--new"),E=A.includes("--raw")||t.includes("--raw"),m=e=>{for(let l of e){let g=A.indexOf(l);if(g!==-1&&g+1<A.length)return A[g+1]}return null},S=m(["--provider"])||i.aiProvider||"Google",s=m(["--model"])||i.activeModel||c(S,i.apiTier)||c(S,"paid"),R=m(["--key"])||await w(S);R||(console.error(`[ERROR] No API key resolved for provider "${S}".`),process.exit(1));let L=await y("agent",{aiProvider:S});L.allowed||(console.error(`[ERROR] ${L.reason||"Budget Exhausted"} - adjust with /budget set.`),process.exit(1));let a={aiProvider:S,apiKey:R,model:s,mode:"flow",thinkingLevel:m(["--thinking"])||"Fast",systemSettings:i.systemSettings||{}},$=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",k=new Date,j=k.getFullYear(),G=k.toLocaleString("en-US",{month:"short"}).toUpperCase(),Y=String(k.getDate()).padStart(2,"0"),q=k.toLocaleTimeString([],{hour:"2-digit",hour12:!0}),I=`${j}-${G}-${Y}, ${q}`,H=`Identity: FluxFlow. Sassy, CLI Assistant
78
78
  Use NO markdown, only plain text
79
79
  Additional Context:
80
- - OS: ${E}
80
+ - OS: ${$}
81
81
  - Model: ${_.basename(a.model).trim().replace(":free","").replace("-free","").replace("/free","").replace("_free","").replace("free_","").replaceAll("-"," ").replaceAll("_"," ").replace(/\b\w/g,e=>e.toUpperCase().trim())}
82
82
  - Approx time: ${I}
83
83
  - Non interactive CLI, support piped inputs
84
- - 'fluxflow' TUI has full agentic tools & capabilities`.trim(),{getPromptSessionHistory:U,savePromptSessionHistory:W,clearPromptSessionHistory:M}=await import("./chunks/sessionDaemon-GHQTAGDG.js"),v=[];o?await M():v=await U();let N=[];if(Array.isArray(v)&&v.length>0)for(let e of v)e.text&&N.push({role:e.role==="model"?"model":"user",parts:[{text:e.text}]});N.push({role:"user",parts:[{text:r}]});try{if(!$){let g="\x1B[36m",F="\x1B[35m",Z="\x1B[0m",me=_.basename(a.model).trim().replace(":free","").replace("-free","").replace("free/","").replaceAll("-"," ").replace(/\b\w/g,de=>de.toUpperCase().trim());process.stdout.write(`Responding with ${g}${me}${Z} from ${F}${a.aiProvider}${Z}:
84
+ - 'fluxflow' TUI has full agentic tools & capabilities`.trim(),{getPromptSessionHistory:U,savePromptSessionHistory:W,clearPromptSessionHistory:M}=await import("./chunks/sessionDaemon-GHQTAGDG.js"),v=[];o?await M():v=await U();let N=[];if(Array.isArray(v)&&v.length>0)for(let e of v)e.text&&N.push({role:e.role==="model"?"model":"user",parts:[{text:e.text}]});N.push({role:"user",parts:[{text:r}]});try{if(!E){let g="\x1B[36m",F="\x1B[35m",Z="\x1B[0m",me=_.basename(a.model).trim().replace(":free","").replace("-free","").replace("free/","").replaceAll("-"," ").replace(/\b\w/g,de=>de.toUpperCase().trim());process.stdout.write(`Responding with ${g}${me}${Z} from ${F}${a.aiProvider}${Z}:
85
85
  `)}let{text:e}=await p(a,s,N,H,a.thinkingLevel),l=(e||"").trim();process.stdout.write(l+`
86
- `),l&&await W(r,l)}catch(e){console.error(`[ERROR] Prompt request failed: ${e.message.trim()}
86
+ ${E?"":`
87
+ `}`),l&&await W(r,l)}catch(e){console.error(`[ERROR] Prompt request failed: ${e.message.trim()}
87
88
 
88
89
  `),process.exit(1)}process.exit(0)}process.stdout.write("\x1B[2J\x1B[3J\x1B[H"),process.stdout.isTTY&&(process.stdout.write("\x1B]0;FluxFlow\x07"),process.stdout.write("\x1B]633;P;TerminalTitle=FluxFlow\x07"),process.stdout.write("\x1B[?2004h"));let Q=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",Q),["SIGINT","SIGTERM","SIGHUP"].forEach(o=>{process.once(o,()=>{Q(),process.exit(0)})}),t.includes("--playground")){let o=process.cwd();process.argv.push("--original-cwd",o);let{DATA_DIR:d}=await import("./chunks/paths-Y7ACZJAE.js"),r=await import("path"),u=await import("fs-extra"),h=r.default.join(d,"playground");try{u.default.ensureDirSync(h),process.chdir(h)}catch{}}ne(re.createElement(ie,{args:process.argv.slice(2)}),{exitOnCtrlC:!1})}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "4.22.0",
3
+ "version": "4.22.1",
4
4
  "date": "2026-09-28",
5
5
  "description": "One of the lightest, fastest, high-fidelity agentic CLI with sub-agents & computer use.",
6
6
  "keywords": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "4.22.0",
3
+ "version": "4.22.1",
4
4
  "date": "2026-09-28",
5
5
  "description": "One of the lightest, fastest, high-fidelity agentic CLI with sub-agents & computer use.",
6
6
  "keywords": [