fluxflow-cli 5.1.0 → 5.2.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.
Files changed (94) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{9router-LRFKCJF4.js → 9router-KRJQK6JP.js} +1 -1
  3. package/dist/chunks/{addMemScore-PBVNSFPN.js → addMemScore-VUSJ2Q64.js} +1 -1
  4. package/dist/chunks/ai-BINPY3GV.js +1 -0
  5. package/dist/chunks/{aihubmix-TETL5QYQ.js → aihubmix-KJIG7CZO.js} +1 -1
  6. package/dist/chunks/{apinex-FAYOPQSL.js → apinex-EP3JJPZO.js} +1 -1
  7. package/dist/chunks/app-DRT7CX3P.js +331 -0
  8. package/dist/chunks/{auto_completion-FUOGJILX.js → auto_completion-I2GVIND6.js} +1 -1
  9. package/dist/chunks/{chat-ISCVWNVN.js → chat-OYRESDTX.js} +1 -1
  10. package/dist/chunks/{chunk-QESQR5GB.js → chunk-25EUCCH5.js} +1 -1
  11. package/dist/chunks/chunk-75OCC24T.js +2 -0
  12. package/dist/chunks/{chunk-J4J3F6BT.js → chunk-7CCULUZN.js} +1 -1
  13. package/dist/chunks/{chunk-52STSLCN.js → chunk-BLAXTPPN.js} +1 -1
  14. package/dist/chunks/chunk-BM4FWHBO.js +885 -0
  15. package/dist/chunks/{chunk-UIL6OCU4.js → chunk-BNKY5QOA.js} +2 -2
  16. package/dist/chunks/{chunk-IHDJDAG3.js → chunk-E5CFO23P.js} +1 -1
  17. package/dist/chunks/chunk-KIPZOUEA.js +44 -0
  18. package/dist/chunks/{chunk-6EYQQ7GQ.js → chunk-KOCMIEPK.js} +1 -1
  19. package/dist/chunks/chunk-L22YGL6T.js +15 -0
  20. package/dist/chunks/{chunk-P5HBJA23.js → chunk-NTZSL2UT.js} +1 -1
  21. package/dist/chunks/{chunk-EXT42EJZ.js → chunk-QVRPR3DJ.js} +1 -1
  22. package/dist/chunks/{chunk-GM5VNNTU.js → chunk-RINQH4H4.js} +1 -1
  23. package/dist/chunks/{chunk-B4UKMX5E.js → chunk-UMS5SEYB.js} +1 -1
  24. package/dist/chunks/{chunk-ZNO55RNG.js → chunk-VDO5TP6E.js} +1 -1
  25. package/dist/chunks/{chunk-V36DXF56.js → chunk-XAPXZ6KO.js} +1 -1
  26. package/dist/chunks/{chunk-HFTI3R3Q.js → chunk-XPIXBWTZ.js} +1 -1
  27. package/dist/chunks/{chunk-GBH7XI5A.js → chunk-XRTIQISS.js} +1 -1
  28. package/dist/chunks/chunk-YFIWMGCS.js +2 -0
  29. package/dist/chunks/{click-AWHZCV2E.js → click-3BB6KDIJ.js} +2 -2
  30. package/dist/chunks/{computer_action-MO2JR2XH.js → computer_action-6RHVNLZG.js} +1 -1
  31. package/dist/chunks/custom_openai-ODYQEMOR.js +3 -0
  32. package/dist/chunks/{deepseek-WNWZJTNE.js → deepseek-I2J4A7WQ.js} +1 -1
  33. package/dist/chunks/{drag-D2GVPIQB.js → drag-ZGNVQGXW.js} +1 -1
  34. package/dist/chunks/{emergency_rollback-ZHQXCIHW.js → emergency_rollback-LC4ZBOLP.js} +1 -1
  35. package/dist/chunks/{exec_command-6V5SM6WI.js → exec_command-SQB5LU5X.js} +1 -1
  36. package/dist/chunks/{explabs-XHHXTERB.js → explabs-OYP64XS6.js} +1 -1
  37. package/dist/chunks/{export-RU6LCZUB.js → export-I5DB7ESY.js} +1 -1
  38. package/dist/chunks/{file_map-UA4BA5OH.js → file_map-K6JQYV35.js} +1 -1
  39. package/dist/chunks/find_file-5RUNVQJO.js +4 -0
  40. package/dist/chunks/{generate_image-45UQ6P2B.js → generate_image-7UBJ3ODS.js} +1 -1
  41. package/dist/chunks/{inferx-HP5AGET3.js → inferx-B6PKXWLZ.js} +1 -1
  42. package/dist/chunks/{infron-ULXG7VDA.js → infron-4SLX3HMD.js} +1 -1
  43. package/dist/chunks/{invoke-HKCOHTBD.js → invoke-IXWW3N4C.js} +2 -2
  44. package/dist/chunks/{invokeSync-NWRHVGJ3.js → invokeSync-EUHHQZ2H.js} +2 -2
  45. package/dist/chunks/{key_press-AQNKL6UM.js → key_press-LO75QEJK.js} +1 -1
  46. package/dist/chunks/{keyboard_typing-QSBPTZJ6.js → keyboard_typing-DJ3HHTO7.js} +1 -1
  47. package/dist/chunks/{memory-7YOYCOXE.js → memory-AT7ARTG3.js} +1 -1
  48. package/dist/chunks/{mistral-ON6RQMK7.js → mistral-H23J6UYA.js} +1 -1
  49. package/dist/chunks/model_config-IVWGOIBK.js +1 -0
  50. package/dist/chunks/{nvidia-I6DPWP6U.js → nvidia-BUWXTYGV.js} +1 -1
  51. package/dist/chunks/{ollama-6WSZPCI5.js → ollama-53BJCQQX.js} +1 -1
  52. package/dist/chunks/{openrouter-6MRG4RT6.js → openrouter-LSG67TST.js} +1 -1
  53. package/dist/chunks/paths-MJECGRI2.js +1 -0
  54. package/dist/chunks/{poolside-ODFAIK4C.js → poolside-KWCBEP3P.js} +1 -1
  55. package/dist/chunks/{recapture_screen-PPXYK2YY.js → recapture_screen-LONV6G4U.js} +1 -1
  56. package/dist/chunks/{saveSummary-W2JMDVZJ.js → saveSummary-ZJDPCZSR.js} +1 -1
  57. package/dist/chunks/{screen_grid-3RU324CV.js → screen_grid-LK6IVH4B.js} +1 -1
  58. package/dist/chunks/{scroll-TSU6MTGU.js → scroll-XBXSN2EF.js} +1 -1
  59. package/dist/chunks/search_keyword-IRLPX555.js +9 -0
  60. package/dist/chunks/{secrets-TNMLVMST.js → secrets-LHP6ATGQ.js} +1 -1
  61. package/dist/chunks/{secrets_v2-OBRWR3UT.js → secrets_v2-4ZICSEV6.js} +1 -1
  62. package/dist/chunks/{sensenova-3K44URJQ.js → sensenova-MLFZTP7U.js} +1 -1
  63. package/dist/chunks/settings-IZC7UDNU.js +1 -0
  64. package/dist/chunks/{todo-CJLWLWJB.js → todo-YFLPXYFL.js} +1 -1
  65. package/dist/chunks/{tokenharbor-YV2GV2LM.js → tokenharbor-Y6HSTTHA.js} +1 -1
  66. package/dist/chunks/update_file-CH6YILXO.js +15 -0
  67. package/dist/chunks/{usage-EBE2OVES.js → usage-G7HRNQNU.js} +1 -1
  68. package/dist/chunks/{usageServer-RTK5N5KE.js → usageServer-SHBKSO4I.js} +13 -5
  69. package/dist/chunks/view_file-OYV2IEYG.js +1 -0
  70. package/dist/chunks/{web_scrape-J3PL2PXT.js → web_scrape-MVSCRDKO.js} +1 -1
  71. package/dist/chunks/{web_search-KBGH67IV.js → web_search-C3WKDOSZ.js} +1 -1
  72. package/dist/chunks/{write_docx-E3MTFXTQ.js → write_docx-QGW25TF7.js} +1 -1
  73. package/dist/chunks/write_file-WX4O436W.js +34 -0
  74. package/dist/chunks/{write_pdf-TPGUF4VT.js → write_pdf-5HOQYVQO.js} +1 -1
  75. package/dist/chunks/{xkiro-B2LYGZTF.js → xkiro-D3DTPVWY.js} +1 -1
  76. package/dist/cli.js +8 -8
  77. package/dist/package.json +2 -2
  78. package/package.json +2 -2
  79. package/dist/chunks/ai-ZMBQQ3QP.js +0 -1
  80. package/dist/chunks/app-DJV7SIS6.js +0 -325
  81. package/dist/chunks/chunk-26BQ45XP.js +0 -2
  82. package/dist/chunks/chunk-4BLSASW6.js +0 -13
  83. package/dist/chunks/chunk-7SGZ66KT.js +0 -44
  84. package/dist/chunks/chunk-LQM3JK7N.js +0 -1
  85. package/dist/chunks/chunk-WS35FH7W.js +0 -866
  86. package/dist/chunks/custom_openai-K554R7Q5.js +0 -3
  87. package/dist/chunks/find_file-HYHHFHUJ.js +0 -4
  88. package/dist/chunks/model_config-QRYAVWHF.js +0 -1
  89. package/dist/chunks/paths-RQRI2XRY.js +0 -1
  90. package/dist/chunks/search_keyword-4W6Q7Q7T.js +0 -8
  91. package/dist/chunks/settings-PUFSRWT3.js +0 -1
  92. package/dist/chunks/update_file-TGEB5UWK.js +0 -13
  93. package/dist/chunks/view_file-I77KYUO5.js +0 -1
  94. package/dist/chunks/write_file-O6OF7Z2W.js +0 -32
package/dist/cli.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import{a as $}from"./chunks/chunk-26BQ45XP.js";import{spawn as ye}from"child_process";import{fileURLToPath as le}from"url";import Se from"os";import ee from"path";import T from"fs";import N from"dotenv";try{let t=ee.join($,"AGENTS.md"),f=ee.join($,"FLUXFLOW.md");T.existsSync($)||T.mkdirSync($,{recursive:!0}),T.existsSync(t)||T.writeFileSync(t,"","utf8"),T.existsSync(f)||T.writeFileSync(f,"","utf8")}catch{}N.config({path:"./.env",override:!0,quiet:!0});N.config({path:`${$}/.env`,override:!0,quiet:!0});N.config({path:`${$}/.env.agents`,override:!0,quiet:!0});N.config({path:`${$}/.env.fluxflow`,override:!0,quiet:!0});N.config({path:"./.env.agents",override:!0,quiet:!0});N.config({path:"./.env.fluxflow",override:!0,quiet:!0});process.env.NO_INS=!1;var be=Se.totalmem(),ce=be/(1024*1024),$e=.5,Me=Math.floor(ce*$e),me=process.argv.slice(2),ae=me.indexOf("--allocation"),g=ae!==-1?parseInt(me[ae+1],10):NaN,Ce=process.env.EXPERIMENTAL_MEMORY_MANAGER==="true"||process.env.EXPERIMENTAL_MEMORY_MANAGER==="1"||process.env.EXPERIMENTAL_MEMORY_MANAGER===!0||process.env.EXPERIMENTAL_MEMORY_MANAGER===1||!1,ke=!isNaN(g)||Ce||!1;!isNaN(g)&&g<64&&(console.error(`
2
+ import{a as $}from"./chunks/chunk-YFIWMGCS.js";import{spawn as ye}from"child_process";import{fileURLToPath as le}from"url";import Se from"os";import ee from"path";import T from"fs";import N from"dotenv";try{let t=ee.join($,"AGENTS.md"),f=ee.join($,"FLUXFLOW.md");T.existsSync($)||T.mkdirSync($,{recursive:!0}),T.existsSync(t)||T.writeFileSync(t,"","utf8"),T.existsSync(f)||T.writeFileSync(f,"","utf8")}catch{}N.config({path:"./.env",override:!0,quiet:!0});N.config({path:`${$}/.env`,override:!0,quiet:!0});N.config({path:`${$}/.env.agents`,override:!0,quiet:!0});N.config({path:`${$}/.env.fluxflow`,override:!0,quiet:!0});N.config({path:"./.env.agents",override:!0,quiet:!0});N.config({path:"./.env.fluxflow",override:!0,quiet:!0});process.env.NO_INS=!1;var be=Se.totalmem(),ce=be/(1024*1024),$e=.5,Me=Math.floor(ce*$e),me=process.argv.slice(2),ae=me.indexOf("--allocation"),g=ae!==-1?parseInt(me[ae+1],10):NaN,Ce=process.env.EXPERIMENTAL_MEMORY_MANAGER==="true"||process.env.EXPERIMENTAL_MEMORY_MANAGER==="1"||process.env.EXPERIMENTAL_MEMORY_MANAGER===!0||process.env.EXPERIMENTAL_MEMORY_MANAGER===1||!1,ke=!isNaN(g)||Ce||!1;!isNaN(g)&&g<64&&(console.error(`
3
3
  [ERROR] Allocation value '${g} MB' is too low. Minimum: 64 MB, Recommended: 4096 MB.
4
4
  `),process.exit(1));var O=Math.floor(ce*.75),Ae=!isNaN(g)&&g>0?Math.min(g,O):Math.max(1536,Math.min(32768,Me)),Ee=le(import.meta.url).endsWith(".js");if(Ee&&!process.execArgv.some(t=>t.includes("max-old-space-size"))&&ke)Number.isNaN(g)||(console.log(`
5
- [MEMORY] Starting with: '${g>O?O:g} MB' Allocation${g>O?" (Max allowed: '"+O+" MB')":""}. Please Wait...`),await new Promise(f=>setTimeout(f,5e3))),ye(process.execPath,[`--max-old-space-size=${Ae}`,"--expose-gc","--max-semi-space-size=1",le(import.meta.url),...process.argv.slice(2)],{stdio:"inherit"}).on("exit",f=>process.exit(f||0));else{let t=process.argv.slice(2),f=t.includes("--help")&&t[t.indexOf("--help")+1]==="commands",te=t.includes("--help")&&!f,oe=t.includes("--version")||t.includes("-v"),se=t[0]==="--update",re=t[0]==="--export";if(t[0]==="--usage"||t.includes("--usage")||t[0]==="--budget"||t.includes("--budget")){let{openUsageDashboard:o}=await import("./chunks/usageServer-RTK5N5KE.js"),{url:d}=await o();console.log(`
5
+ [MEMORY] Starting with: '${g>O?O:g} MB' Allocation${g>O?" (Max allowed: '"+O+" MB')":""}. Please Wait...`),await new Promise(f=>setTimeout(f,5e3))),ye(process.execPath,[`--max-old-space-size=${Ae}`,"--expose-gc","--max-semi-space-size=1",le(import.meta.url),...process.argv.slice(2)],{stdio:"inherit"}).on("exit",f=>process.exit(f||0));else{let t=process.argv.slice(2),f=t.includes("--help")&&t[t.indexOf("--help")+1]==="commands",te=t.includes("--help")&&!f,oe=t.includes("--version")||t.includes("-v"),se=t[0]==="--update",re=t[0]==="--export";if(t[0]==="--usage"||t.includes("--usage")||t[0]==="--budget"||t.includes("--budget")){let{openUsageDashboard:o}=await import("./chunks/usageServer-SHBKSO4I.js"),{url:d}=await o();console.log(`
6
6
  \u2726 FluxFlow Token Usage & Analytics Dashboard
7
7
  \u2800\u2800\u2514\u2500 Serving at: ${d}
8
8
  \u2800\u2800\u2514\u2500 Opened in default browser. Press Ctrl+C to stop.
9
- `),await new Promise(()=>{})}if(oe||te||f||se||re){let o=await import("fs"),d=await import("path"),{fileURLToPath:s}=await import("url"),u=d.join(d.dirname(s(import.meta.url)),"../package.json"),i=JSON.parse(o.readFileSync(u,"utf8")).version;if(re){let C=(t[1]||"").toLowerCase();if(C==="error"||C==="logs")try{let{exportErrorLogs:x}=await import("./chunks/export-RU6LCZUB.js"),c=await x();console.log(`[EXPORT LOGS] Exported ${c.entryCount} error log entries (FluxFlow: ${c.fluxflowCount}, Memory: ${c.memoryCount}, Usage: ${c.usageCount}) to "${c.exportFile}"`),process.exit(0)}catch(x){console.error(`[EXPORT ERROR] Failed to export error logs: ${x.message}`),process.exit(1)}else console.error(`[EXPORT ERROR] Invalid export target "${t[1]||""}". --export only supports 'error'.
9
+ `),await new Promise(()=>{})}if(oe||te||f||se||re){let o=await import("fs"),d=await import("path"),{fileURLToPath:s}=await import("url"),u=d.join(d.dirname(s(import.meta.url)),"../package.json"),i=JSON.parse(o.readFileSync(u,"utf8")).version;if(re){let C=(t[1]||"").toLowerCase();if(C==="error"||C==="logs")try{let{exportErrorLogs:x}=await import("./chunks/export-I5DB7ESY.js"),c=await x();console.log(`[EXPORT LOGS] Exported ${c.entryCount} error log entries (FluxFlow: ${c.fluxflowCount}, Memory: ${c.memoryCount}, Usage: ${c.usageCount}) to "${c.exportFile}"`),process.exit(0)}catch(x){console.error(`[EXPORT ERROR] Failed to export error logs: ${x.message}`),process.exit(1)}else console.error(`[EXPORT ERROR] Invalid export target "${t[1]||""}". --export only supports 'error'.
10
10
  Usage: fluxflow --export error`),process.exit(1)}if(oe&&(console.log(`v${i}`),process.exit(0)),te&&(console.log(`FluxFlow CLI Arguments:
11
11
  --mode <flux|flow|icu|omni> Set startup mode (Agent / Chat / Computer Use / Sentient being)
12
12
  --model <model_name> Set startup AI model
@@ -65,7 +65,7 @@ Usage: fluxflow --export error`),process.exit(1)}if(oe&&(console.log(`v${i}`),pr
65
65
  /docs View documentation
66
66
  /fluxflow init Create FluxFlow.md template
67
67
  /update check Check for new version
68
- /update latest Install latest release`),process.exit(0)),se){let C=t[1]||"latest";if(C==="check"){let x=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(x?`Latest version: v${y}`:y!==i?`A new version of FluxFlow is available: v${y} (current: v${i}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${i}).`)}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 m=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;m||(console.error("Error: Could not retrieve latest version."),process.exit(1)),m===i&&(console.log(`FluxFlow is already up to date (v${i}).`),process.exit(0));let y=async()=>{let r=(await import("react")).default,{useState:w}=r,{render:U,Box:h,Text:S}=await import("ink"),ie=(await import("ink-select-input")).default,_=(await import("ink-text-input")).default;return new Promise(D=>{let P=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],H=({label:E,isSelected:F})=>r.createElement(h,{width:"100%"},r.createElement(S,{bold:F},"\u2514\u2500 ",F?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",E)),b,X=()=>{let[E,F]=w("select"),[J,j]=w(""),z=R=>{R.value==="custom"?F("custom"):B({manager:R.value})},K=R=>{B({manager:"custom",customCommand:R})};return E==="custom"?r.createElement(h,{flexDirection:"column",marginY:1},r.createElement(h,{marginBottom:1},r.createElement(S,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),r.createElement(h,{flexDirection:"row"},r.createElement(S,{color:"cyan",bold:!0}," \u276F "),r.createElement(_,{value:J,onChange:j,onSubmit:K})),r.createElement(h,{marginTop:1},r.createElement(S,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):r.createElement(h,{flexDirection:"column",marginY:1},r.createElement(h,{marginBottom:1},r.createElement(S,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),r.createElement(ie,{items:P,onSelect:z,itemComponent:H,indicatorComponent:()=>null}))},B=E=>{b&&b(),D(E)},{unmount:V}=U(r.createElement(X,null));b=V})},n,k="",A;try{let{loadSettings:r}=await import("./chunks/settings-PUFSRWT3.js");A=await r(),n=A?.systemSettings?.updateManager||A?.updateManager}catch{}if(!n){let r=await y();n=r.manager,k=r.customCommand}let p="";n==="pnpm"?p=`pnpm add -g fluxflow-cli@${m}`:n==="bun"?p=`bun add -g fluxflow-cli@${m}`:n==="yarn"?p=`yarn global add fluxflow-cli@${m}`:n==="custom"?p=k||A?.customUpdateCommand||`npm install -g fluxflow-cli@${m}`:p=`npm install -g fluxflow-cli@${m}`,console.log(`Updating FluxFlow to v${m} using ${n}...`),console.log(`Running: ${p}`);let{execSync:L}=await import("child_process");L(p,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${m}.\x1B[0m`)}catch(x){console.error("\x1B[31m\u274C Update failed:\x1B[0m",x.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:pe}=await import("react"),{render:de}=await import("ink"),{default:ue}=await import("./chunks/app-DJV7SIS6.js");process.env.NODE_NO_WARNINGS="1";let ge=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],fe=console.log,xe=console.warn,we=console.error,W=o=>{let d=o.map(String).join(" ");return ge.some(s=>d.includes(s))};console.log=(...o)=>!W(o)&&fe(...o),console.warn=(...o)=>!W(o)&&xe(...o),console.error=(...o)=>!W(o)&&we(...o);let Y=t.findIndex(o=>o==="--cwd"||o==="--path");if(Y!==-1&&Y+1<t.length){let o=t[Y+1],d=await import("path"),s=await import("fs-extra"),u=d.default.resolve(o);try{s.default.existsSync(u)&&s.default.statSync(u).isDirectory()?process.chdir(u):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(v){console.error(`[ERROR] Failed to change directory to "${o}": ${v.message}`),process.exit(0)}}let M=t.includes("--commit_8f4a2b9c"),q=t.findIndex(o=>o==="-p"||o==="--prompt");if(q!==-1||M){let o=t.includes("--new")||t.includes("-n"),s=(q!==-1?t.slice(q+1).filter(e=>e!=="-n"&&e!=="--new"):[])[0];if(M)try{let{execSync:e}=await import("child_process"),a=e("git diff --cached",{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim();a||process.exit(0);let l="";if(s&&s.trim()){let I=s.trim();I.startsWith("={")&&I.endsWith("}")?l=`
68
+ /update latest Install latest release`),process.exit(0)),se){let C=t[1]||"latest";if(C==="check"){let x=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(x?`Latest version: v${y}`:y!==i?`A new version of FluxFlow is available: v${y} (current: v${i}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${i}).`)}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 m=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;m||(console.error("Error: Could not retrieve latest version."),process.exit(1)),m===i&&(console.log(`FluxFlow is already up to date (v${i}).`),process.exit(0));let y=async()=>{let r=(await import("react")).default,{useState:w}=r,{render:U,Box:h,Text:S}=await import("ink"),ie=(await import("ink-select-input")).default,_=(await import("ink-text-input")).default;return new Promise(D=>{let P=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],H=({label:E,isSelected:F})=>r.createElement(h,{width:"100%"},r.createElement(S,{bold:F},"\u2514\u2500 ",F?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",E)),b,X=()=>{let[E,F]=w("select"),[J,j]=w(""),z=R=>{R.value==="custom"?F("custom"):B({manager:R.value})},K=R=>{B({manager:"custom",customCommand:R})};return E==="custom"?r.createElement(h,{flexDirection:"column",marginY:1},r.createElement(h,{marginBottom:1},r.createElement(S,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),r.createElement(h,{flexDirection:"row"},r.createElement(S,{color:"cyan",bold:!0}," \u276F "),r.createElement(_,{value:J,onChange:j,onSubmit:K})),r.createElement(h,{marginTop:1},r.createElement(S,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):r.createElement(h,{flexDirection:"column",marginY:1},r.createElement(h,{marginBottom:1},r.createElement(S,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),r.createElement(ie,{items:P,onSelect:z,itemComponent:H,indicatorComponent:()=>null}))},B=E=>{b&&b(),D(E)},{unmount:V}=U(r.createElement(X,null));b=V})},n,k="",A;try{let{loadSettings:r}=await import("./chunks/settings-IZC7UDNU.js");A=await r(),n=A?.systemSettings?.updateManager||A?.updateManager}catch{}if(!n){let r=await y();n=r.manager,k=r.customCommand}let p="";n==="pnpm"?p=`pnpm add -g fluxflow-cli@${m}`:n==="bun"?p=`bun add -g fluxflow-cli@${m}`:n==="yarn"?p=`yarn global add fluxflow-cli@${m}`:n==="custom"?p=k||A?.customUpdateCommand||`npm install -g fluxflow-cli@${m}`:p=`npm install -g fluxflow-cli@${m}`,console.log(`Updating FluxFlow to v${m} using ${n}...`),console.log(`Running: ${p}`);let{execSync:L}=await import("child_process");L(p,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${m}.\x1B[0m`)}catch(x){console.error("\x1B[31m\u274C Update failed:\x1B[0m",x.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:pe}=await import("react"),{render:de}=await import("ink"),{default:ue}=await import("./chunks/app-DRT7CX3P.js");process.env.NODE_NO_WARNINGS="1";let ge=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],fe=console.log,xe=console.warn,we=console.error,W=o=>{let d=o.map(String).join(" ");return ge.some(s=>d.includes(s))};console.log=(...o)=>!W(o)&&fe(...o),console.warn=(...o)=>!W(o)&&xe(...o),console.error=(...o)=>!W(o)&&we(...o);let Y=t.findIndex(o=>o==="--cwd"||o==="--path");if(Y!==-1&&Y+1<t.length){let o=t[Y+1],d=await import("path"),s=await import("fs-extra"),u=d.default.resolve(o);try{s.default.existsSync(u)&&s.default.statSync(u).isDirectory()?process.chdir(u):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(v){console.error(`[ERROR] Failed to change directory to "${o}": ${v.message}`),process.exit(0)}}let M=t.includes("--commit_8f4a2b9c"),q=t.findIndex(o=>o==="-p"||o==="--prompt");if(q!==-1||M){let o=t.includes("--new")||t.includes("-n"),s=(q!==-1?t.slice(q+1).filter(e=>e!=="-n"&&e!=="--new"):[])[0];if(M)try{let{execSync:e}=await import("child_process"),a=e("git diff --cached",{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim();a||process.exit(0);let l="";if(s&&s.trim()){let I=s.trim();I.startsWith("={")&&I.endsWith("}")?l=`
69
69
 
70
70
  Instruction: ${I.slice(2,-1).trim()}`:l=`
71
71
 
@@ -73,15 +73,15 @@ Hint: ${I}`}s=`Git Staged Diff:
73
73
  ${a}
74
74
  ---
75
75
 
76
- Write as conventional, title + bullet description style commit message. No markdown, emojis, fluff${l}`}catch{process.exit(0)}let u=t.findIndex(e=>e==="-r"||e==="--run"),v=null,i=null;if(u!==-1&&u+1<t.length){v=t[u+1];try{let{execSync:e}=await import("child_process");i=e(v,{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim()}catch(e){i=(e.stdout?e.stdout.toString().trim():"")||(e.stderr?e.stderr.toString().trim():"")||e.message}}if(i){let{stripAnsi:e}=await import("./chunks/exec_command-6V5SM6WI.js");i=e(i).trim(),s?s=`Stdin Context (${v}):
76
+ Write as conventional, title + bullet description style commit message. No markdown, emojis, fluff${l}`}catch{process.exit(0)}let u=t.findIndex(e=>e==="-r"||e==="--run"),v=null,i=null;if(u!==-1&&u+1<t.length){v=t[u+1];try{let{execSync:e}=await import("child_process");i=e(v,{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim()}catch(e){i=(e.stdout?e.stdout.toString().trim():"")||(e.stderr?e.stderr.toString().trim():"")||e.message}}if(i){let{stripAnsi:e}=await import("./chunks/exec_command-SQB5LU5X.js");i=e(i).trim(),s?s=`Stdin Context (${v}):
77
77
  ${i}
78
78
  ---
79
79
 
80
- ${s}`:s=i}if(!M&&!process.stdin.isTTY){let e=[];for await(let l of process.stdin)e.push(l);let a=Buffer.concat(e).toString("utf8").trim();if(a){let{stripAnsi:l}=await import("./chunks/exec_command-6V5SM6WI.js");a=l(a).trim(),s?s=`Stdin Context:
80
+ ${s}`:s=i}if(!M&&!process.stdin.isTTY){let e=[];for await(let l of process.stdin)e.push(l);let a=Buffer.concat(e).toString("utf8").trim();if(a){let{stripAnsi:l}=await import("./chunks/exec_command-SQB5LU5X.js");a=l(a).trim(),s?s=`Stdin Context:
81
81
  ${a}
82
82
  ---
83
83
 
84
- ${s}`:s=a}}s||(console.error("[ERROR] -p/--prompt requires a prompt string (or piped stdin input)."),process.exit(1));let{loadSettings:C}=await import("./chunks/settings-PUFSRWT3.js"),{getProviderAPIKey:x}=await import("./chunks/secrets-TNMLVMST.js"),{getDefaultModel:c}=await import("./chunks/model_config-QRYAVWHF.js"),{generateSimpleContent:m}=await import("./chunks/ai-ZMBQQ3QP.js"),{checkQuotaDetailed:y}=await import("./chunks/usage-EBE2OVES.js"),n=await C(),k=t.filter(e=>e!=="-p"&&e!=="--prompt"&&e!==s&&e!=="-n"&&e!=="--new"),A=M||k.includes("--raw")||t.includes("--raw"),p=e=>{for(let a of e){let l=k.indexOf(a);if(l!==-1&&l+1<k.length)return k[l+1]}return null},L=M&&n.systemSettings?.commitMessageModel&&n.systemSettings.commitMessageModel!=="Default"?n.systemSettings.commitMessageModel:null,r=M&&L&&n.systemSettings?.commitMessageProvider?n.systemSettings.commitMessageProvider:null,w=p(["--provider"])||r||n.aiProvider||"Google",U=p(["--model"])||L||n.activeModel||c(w,n.apiTier)||c(w,"paid"),h=p(["--key"])||await x(w);!h&&!(w==="c_openai"&&n.systemSettings?.customOpenAIBaseUrl)&&(console.error(`[ERROR] No API key resolved for provider "${w}".`),process.exit(1));let S=await y("agent",{aiProvider:w});S.allowed||(console.error(`[ERROR] ${S.reason||"Budget Exhausted"} - adjust with /budget set.`),process.exit(1));let{name:ie="",nickname:_="",instructions:D=""}=n?.profileData??{},P={aiProvider:w,apiKey:h,model:U,mode:"flow",thinkingLevel:p(["--thinking"])||"Fast",systemSettings:n.systemSettings||{}},H=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",b=new Date,X=b.getFullYear(),B=b.toLocaleString("en-US",{month:"short"}).toUpperCase(),V=String(b.getDate()).padStart(2,"0"),E=b.toLocaleTimeString([],{hour:"2-digit",hour12:!0}),F=`${X}-${B}-${V}, ${E}`,J=(P.model||"").replace(/^.*::/,"").split(":")[0].replace(/\/free$/,"").trim(),j=ee.basename(J).replace(/-free$/,"").replace(/_free$/,"").replace(/^free_/,"").replaceAll("-"," ").replaceAll("_"," ").replace(/\b\w/g,e=>e.toUpperCase().trim()),z=`Identity: FluxFlow. Sassy, CLI Assistant
84
+ ${s}`:s=a}}s||(console.error("[ERROR] -p/--prompt requires a prompt string (or piped stdin input)."),process.exit(1));let{loadSettings:C}=await import("./chunks/settings-IZC7UDNU.js"),{getProviderAPIKey:x}=await import("./chunks/secrets-LHP6ATGQ.js"),{getDefaultModel:c}=await import("./chunks/model_config-IVWGOIBK.js"),{generateSimpleContent:m}=await import("./chunks/ai-BINPY3GV.js"),{checkQuotaDetailed:y}=await import("./chunks/usage-G7HRNQNU.js"),n=await C(),k=t.filter(e=>e!=="-p"&&e!=="--prompt"&&e!==s&&e!=="-n"&&e!=="--new"),A=M||k.includes("--raw")||t.includes("--raw"),p=e=>{for(let a of e){let l=k.indexOf(a);if(l!==-1&&l+1<k.length)return k[l+1]}return null},L=M&&n.systemSettings?.commitMessageModel&&n.systemSettings.commitMessageModel!=="Default"?n.systemSettings.commitMessageModel:null,r=M&&L&&n.systemSettings?.commitMessageProvider?n.systemSettings.commitMessageProvider:null,w=p(["--provider"])||r||n.aiProvider||"Google",U=p(["--model"])||L||n.activeModel||c(w,n.apiTier)||c(w,"paid"),h=p(["--key"])||await x(w);!h&&!(w==="c_openai"&&n.systemSettings?.customOpenAIBaseUrl)&&(console.error(`[ERROR] No API key resolved for provider "${w}".`),process.exit(1));let S=await y("agent",{aiProvider:w});S.allowed||(console.error(`[ERROR] ${S.reason||"Budget Exhausted"} - adjust with /budget set.`),process.exit(1));let{name:ie="",nickname:_="",instructions:D=""}=n?.profileData??{},P={aiProvider:w,apiKey:h,model:U,mode:"flow",thinkingLevel:p(["--thinking"])||"Fast",systemSettings:n.systemSettings||{}},H=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",b=new Date,X=b.getFullYear(),B=b.toLocaleString("en-US",{month:"short"}).toUpperCase(),V=String(b.getDate()).padStart(2,"0"),E=b.toLocaleTimeString([],{hour:"2-digit",hour12:!0}),F=`${X}-${B}-${V}, ${E}`,J=(P.model||"").replace(/^.*::/,"").split(":")[0].replace(/\/free$/,"").trim(),j=ee.basename(J).replace(/-free$/,"").replace(/_free$/,"").replace(/^free_/,"").replaceAll("-"," ").replaceAll("_"," ").replace(/\b\w/g,e=>e.toUpperCase().trim()),z=`Identity: FluxFlow. Sassy, CLI Assistant
85
85
  Use NO markdown, only plain text
86
86
  Context:
87
87
  - OS: ${H}
@@ -95,4 +95,4 @@ User Preferences: ${D.trim()}`:""}`.trim(),{getPromptSessionHistory:K,savePrompt
95
95
  ${A?"":`
96
96
  `}`),a&&await R(s,a)}catch(e){console.error(`[ERROR] Prompt request failed: ${e.message.trim()}
97
97
 
98
- `),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 ne=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",ne),["SIGINT","SIGTERM","SIGHUP"].forEach(o=>{process.once(o,()=>{ne(),process.exit(0)})}),t.includes("--playground")){let o=process.cwd();process.argv.push("--original-cwd",o);let{DATA_DIR:d}=await import("./chunks/paths-RQRI2XRY.js"),s=await import("path"),u=await import("fs-extra"),v=s.default.join(d,"playground");try{u.default.ensureDirSync(v),process.chdir(v)}catch{}}de(pe.createElement(ue,{args:process.argv.slice(2)}),{exitOnCtrlC:!1})}
98
+ `),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 ne=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",ne),["SIGINT","SIGTERM","SIGHUP"].forEach(o=>{process.once(o,()=>{ne(),process.exit(0)})}),t.includes("--playground")){let o=process.cwd();process.argv.push("--original-cwd",o);let{DATA_DIR:d}=await import("./chunks/paths-MJECGRI2.js"),s=await import("path"),u=await import("fs-extra"),v=s.default.join(d,"playground");try{u.default.ensureDirSync(v),process.chdir(v)}catch{}}de(pe.createElement(ue,{args:process.argv.slice(2)}),{exitOnCtrlC:!1})}
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "5.1.0",
4
- "date": "2026-11-07",
3
+ "version": "5.2.1",
4
+ "date": "2026-11-08",
5
5
  "description": "One of the lightest, fastest, high-fidelity agentic CLI with sub-agents & advance computer use.",
6
6
  "keywords": [
7
7
  "ai",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "5.1.0",
4
- "date": "2026-11-07",
3
+ "version": "5.2.1",
4
+ "date": "2026-11-08",
5
5
  "description": "One of the lightest, fastest, high-fidelity agentic CLI with sub-agents & advance computer use.",
6
6
  "keywords": [
7
7
  "ai",
@@ -1 +0,0 @@
1
- import{A as r,B as s,C as t,D as u,E as v,k as b,l as c,m as d,n as e,o as f,p as g,q as h,r as i,s as j,t as k,u as l,v as m,w as n,x as o,y as p,z as q}from"./chunk-WS35FH7W.js";import"./chunk-HFTI3R3Q.js";import"./chunk-52STSLCN.js";import"./chunk-56EJGQU3.js";import"./chunk-4BLSASW6.js";import"./chunk-7SGZ66KT.js";import"./chunk-UIL6OCU4.js";import"./chunk-EXT42EJZ.js";import"./chunk-6EYQQ7GQ.js";import"./chunk-Y5JU726N.js";import"./chunk-QESQR5GB.js";import"./chunk-J4J3F6BT.js";import"./chunk-V36DXF56.js";import"./chunk-B4UKMX5E.js";import{l as a}from"./chunk-LQM3JK7N.js";import"./chunk-P5HBJA23.js";import"./chunk-26BQ45XP.js";export{c as RE_LEADING_THINK,b as convertChannelThinkTags,r as detectToolCalls,e as findGenuineThinkClose,t as generateSimpleContent,u as getAIStream,q as getActiveToolContext,j as getCleanGroupedLength,m as getGoogleClient,f as getLeadingThinkBlock,s as initAI,d as isInsideBacktick,a as isModelMultimodal,l as isTerminationSignaled,o as maskCodeSpans,p as maskExecutedTools,n as runJanitorTask,v as runSubagent,k as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags,i as stripTrailingFluffAfterTools};