fluxflow-cli 4.20.1 → 4.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import{a as k,c as d}from"./chunk-56EJGQU3.js";import{a as b}from"./chunk-Y5JU726N.js";var I=async(w,s={})=>{let{runSubagent:U}=await import("./ai-Y4IR3IJZ.js"),l=b(w),c=l.task||l.instruction||l.prompt,C=l.model||null,E=l.title||null,m=l.tools||null;if(!c)return'ERROR: Missing "task" argument for invoke.';let f=null;if(m)try{let t=m.trim();t.startsWith("[")&&t.endsWith("]")&&(t=t.substring(1,t.length-1)),f=t.split(",").map(n=>n.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let i=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,h=null,S=null,$=new Promise((t,n)=>{h=t,S=n}),e={id:i,title:E||c.substring(0,30),task:c,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:t=>{t&&e.pendingSteerMessages.push(t)},completionPromise:$,_resolveCompletion:h,_rejectCompletion:S,progress:[]},r={chunks:[],totalWords:0};k.push(e),s.onSubagentUpdate&&s.onSubagentUpdate();let a=[],M={...s,taskId:i,onAskMain:async t=>{let n=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,o=null,p=new Promise(g=>{o=g}),u={id:n,question:t,answered:!1,answer:null,askedAt:Date.now(),_resolve:o};return e.questions.push(u),e.status="waiting",s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" is WAITING FOR YOUR INPUT: "${t}"
1
+ import{a as k,c as d}from"./chunk-56EJGQU3.js";import{a as b}from"./chunk-Y5JU726N.js";var I=async(w,s={})=>{let{runSubagent:U}=await import("./ai-7WG52QSH.js"),l=b(w),c=l.task||l.instruction||l.prompt,C=l.model||null,E=l.title||null,m=l.tools||null;if(!c)return'ERROR: Missing "task" argument for invoke.';let f=null;if(m)try{let t=m.trim();t.startsWith("[")&&t.endsWith("]")&&(t=t.substring(1,t.length-1)),f=t.split(",").map(n=>n.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let i=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,h=null,S=null,$=new Promise((t,n)=>{h=t,S=n}),e={id:i,title:E||c.substring(0,30),task:c,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:t=>{t&&e.pendingSteerMessages.push(t)},completionPromise:$,_resolveCompletion:h,_rejectCompletion:S,progress:[]},r={chunks:[],totalWords:0};k.push(e),s.onSubagentUpdate&&s.onSubagentUpdate();let a=[],M={...s,taskId:i,onAskMain:async t=>{let n=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,o=null,p=new Promise(g=>{o=g}),u={id:n,question:t,answered:!1,answer:null,askedAt:Date.now(),_resolve:o};return e.questions.push(u),e.status="waiting",s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" is WAITING FOR YOUR INPUT: "${t}"
2
2
  Respond using tool: [tool:Answer(id="${i}", answer="...")]
3
3
  [/SYSTEM]`),await p},onVisualFeedback:t=>{e.lastChunkTime=Date.now();let n=t.replace(/\x1b\[[0-9;]*m/g,""),o=n.match(/[✔✘✗✖🔍📖→➕↻•]\s*([A-Za-z0-9\s-]+)/);o?e.currentTool=o[1].trim():e.currentTool=n,s.onSubagentUpdate&&s.onSubagentUpdate()},onTokenChunk:(t,n)=>{let o=Date.now();if(e.lastChunkTime=o,e.currentTool="Thinking",typeof n=="number"&&n>0){r.totalWords+=n,r.chunks.push({time:o,words:n});let p=o-400;if(r.chunks=r.chunks.filter(u=>u.time>=p),r.chunks.length>0){let u=r.chunks.reduce((_,A)=>_+A.words,0),T=r.chunks[0].time,g=Math.max(.4,(o-T)/1e3);e.wps=Math.round(u/g)}}s.onSubagentUpdate&&s.onSubagentUpdate()}};return U(c,M,C,f,50,t=>{if(e.status==="cancelled")return;if(t.startsWith("[Subagent Turn")&&a.length>0&&(e.progress.push([...a]),a=[]),t.includes("[Executing Tool]")){let o=t.match(/\[Executing Tool\]\s*([a-zA-Z0-9_]+)/);o&&(!e.currentTool||e.currentTool==="Thinking")&&(e.currentTool=o[1])}let n=t;if(n.startsWith("[Tool Result]")){let o=n.split(`
4
4
  `);o.length>5&&(n=o.slice(0,4).join(`
5
5
  `)+`
6
- ... [Content/Diff Truncated from Logs] ...`)}a.push(n),s.onSubagentUpdate&&s.onSubagentUpdate()},!0).then(t=>{if(e.status==="cancelled"){e._resolveCompletion&&e._resolveCompletion(t);return}a.length>0&&(e.progress.push([...a]),a=[]),e.status="completed",e.finalAnswer=t,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) has FINISHED. Call GetProgress(id="${i}") to see the final result. [/SYSTEM]`),e._resolveCompletion&&e._resolveCompletion(t)}).catch(async t=>{let{isTerminationSignaled:n}=await import("./ai-Y4IR3IJZ.js");if(t.message==="Subagent task was cancelled."||e.status==="cancelled"||n()){e.status="cancelled",a.push("[SUBAGENT CANCELLED] Task was cancelled."),e.progress.push([...a]),s.onSubagentUpdate&&s.onSubagentUpdate(),e._resolveCompletion&&e._resolveCompletion(null);return}a.push(`[SUBAGENT FAILURE] Error: ${t.message}`),e.progress.push([...a]),e.status="failed",e.error=t.message,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) FAILED with error: ${t.message}. [/SYSTEM]`),e._rejectCompletion&&e._rejectCompletion(t)}),`SUCCESS: Background subagent started. Task ID: ${i}`};export{I as invoke};
6
+ ... [Content/Diff Truncated from Logs] ...`)}a.push(n),s.onSubagentUpdate&&s.onSubagentUpdate()},!0).then(t=>{if(e.status==="cancelled"){e._resolveCompletion&&e._resolveCompletion(t);return}a.length>0&&(e.progress.push([...a]),a=[]),e.status="completed",e.finalAnswer=t,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) has FINISHED. Call GetProgress(id="${i}") to see the final result. [/SYSTEM]`),e._resolveCompletion&&e._resolveCompletion(t)}).catch(async t=>{let{isTerminationSignaled:n}=await import("./ai-7WG52QSH.js");if(t.message==="Subagent task was cancelled."||e.status==="cancelled"||n()){e.status="cancelled",a.push("[SUBAGENT CANCELLED] Task was cancelled."),e.progress.push([...a]),s.onSubagentUpdate&&s.onSubagentUpdate(),e._resolveCompletion&&e._resolveCompletion(null);return}a.push(`[SUBAGENT FAILURE] Error: ${t.message}`),e.progress.push([...a]),e.status="failed",e.error=t.message,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) FAILED with error: ${t.message}. [/SYSTEM]`),e._rejectCompletion&&e._rejectCompletion(t)}),`SUCCESS: Background subagent started. Task ID: ${i}`};export{I as invoke};
@@ -1,3 +1,3 @@
1
- import{a as o}from"./chunk-Y5JU726N.js";var k=async(b,t={})=>{let{runSubagent:u}=await import("./ai-Y4IR3IJZ.js"),s=o(b),a=s.task||s.instruction||s.prompt,m=s.model||null,l=s.tools||null;if(!a)return'ERROR: Missing "task" argument for invokeSync.';let r=null;if(l)try{let e=l.trim();e.startsWith("[")&&e.endsWith("]")&&(e=e.substring(1,e.length-1)),r=e.split(",").map(i=>i.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let n=s.title||a.substring(0,30);try{t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n}`);let e=await u(a,t,m,r,50);return t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} [COMPLETED]
2
- `),e}catch(e){let{isTerminationSignaled:i}=await import("./ai-Y4IR3IJZ.js"),c=e.message==="Subagent task was cancelled by user."||i();if(t.onVisualFeedback){let d=c?"[CANCELLED]":"[FAILED]";t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} ${d}
1
+ import{a as o}from"./chunk-Y5JU726N.js";var k=async(b,t={})=>{let{runSubagent:u}=await import("./ai-7WG52QSH.js"),s=o(b),a=s.task||s.instruction||s.prompt,m=s.model||null,l=s.tools||null;if(!a)return'ERROR: Missing "task" argument for invokeSync.';let r=null;if(l)try{let e=l.trim();e.startsWith("[")&&e.endsWith("]")&&(e=e.substring(1,e.length-1)),r=e.split(",").map(i=>i.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let n=s.title||a.substring(0,30);try{t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n}`);let e=await u(a,t,m,r,50);return t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} [COMPLETED]
2
+ `),e}catch(e){let{isTerminationSignaled:i}=await import("./ai-7WG52QSH.js"),c=e.message==="Subagent task was cancelled by user."||i();if(t.onVisualFeedback){let d=c?"[CANCELLED]":"[FAILED]";t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} ${d}
3
3
  `)}return`ERROR: Subagent execution failed: ${e.message}`}};export{k as invokeSync};
package/dist/cli.js CHANGED
@@ -64,12 +64,12 @@ Usage: fluxflow --export error`),process.exit(1)}if(V&&(console.log(`v${u}`),pro
64
64
  /docs View documentation
65
65
  /fluxflow init Create FluxFlow.md template
66
66
  /update check Check for new version
67
- /update latest Install latest release`),process.exit(0)),z){let S=e[1]||"latest";if(S==="check"){let g=e[2]==="latest";try{let c=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;c||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(g?`Latest version: v${c}`:c!==u?`A new version of FluxFlow is available: v${c} (current: v${u}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${u}).`)}catch(n){console.error("Error checking for updates:",n.message),process.exit(1)}process.exit(0)}else if(S==="latest"){console.log("Checking latest version and settings...");try{let a=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;a||(console.error("Error: Could not retrieve latest version."),process.exit(1)),a===u&&(console.log(`FluxFlow is already up to date (v${u}).`),process.exit(0));let c=async()=>{let o=(await import("react")).default,{useState:A}=o,{render:B,Box:w,Text:E}=await import("ink"),D=(await import("ink-select-input")).default,_=(await import("ink-text-input")).default;return new Promise(j=>{let G=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],q=({label:h,isSelected:p})=>o.createElement(w,{width:"100%"},o.createElement(E,{bold:p},"\u2514\u2500 ",p?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",h)),R,M=()=>{let[h,p]=A("select"),[Y,H]=A(""),T=N=>{N.value==="custom"?p("custom"):k({manager:N.value})},W=N=>{k({manager:"custom",customCommand:N})};return h==="custom"?o.createElement(w,{flexDirection:"column",marginY:1},o.createElement(w,{marginBottom:1},o.createElement(E,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),o.createElement(w,{flexDirection:"row"},o.createElement(E,{color:"cyan",bold:!0}," \u276F "),o.createElement(_,{value:Y,onChange:H,onSubmit:W})),o.createElement(w,{marginTop:1},o.createElement(E,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):o.createElement(w,{flexDirection:"column",marginY:1},o.createElement(w,{marginBottom:1},o.createElement(E,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),o.createElement(D,{items:G,onSelect:T,itemComponent:q,indicatorComponent:()=>null}))},k=h=>{R&&R(),j(h)},{unmount:s}=B(o.createElement(M,null));R=s})},r,$="",b;try{let{loadSettings:o}=await import("./chunks/settings-JGWWOFEC.js");b=await o(),r=b?.systemSettings?.updateManager||b?.updateManager}catch{}if(!r){let o=await c();r=o.manager,$=o.customCommand}let f="";r==="pnpm"?f=`pnpm add -g fluxflow-cli@${a}`:r==="bun"?f=`bun add -g fluxflow-cli@${a}`:r==="yarn"?f=`yarn global add fluxflow-cli@${a}`:r==="custom"?f=$||b?.customUpdateCommand||`npm install -g fluxflow-cli@${a}`:f=`npm install -g fluxflow-cli@${a}`,console.log(`Updating FluxFlow to v${a} using ${r}...`),console.log(`Running: ${f}`);let{execSync:C}=await import("child_process");C(f,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${a}.\x1B[0m`)}catch(g){console.error("\x1B[31m\u274C Update failed:\x1B[0m",g.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:se}=await import("react"),{render:re}=await import("ink"),{default:ne}=await import("./chunks/app-DHX3OTGL.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"],ie=console.log,le=console.warn,ce=console.error,L=t=>{let l=t.map(String).join(" ");return ae.some(i=>l.includes(i))};console.log=(...t)=>!L(t)&&ie(...t),console.warn=(...t)=>!L(t)&&le(...t),console.error=(...t)=>!L(t)&&ce(...t);let U=e.findIndex(t=>t==="--cwd"||t==="--path");if(U!==-1&&U+1<e.length){let t=e[U+1],l=await import("path"),i=await import("fs-extra"),x=l.default.resolve(t);try{i.default.existsSync(x)&&i.default.statSync(x).isDirectory()?process.chdir(x):(console.error(`[ERROR] Directory not found: "${t}"`),process.exit(0))}catch(y){console.error(`[ERROR] Failed to change directory to "${t}": ${y.message}`),process.exit(0)}}let K=e.findIndex(t=>t==="-p"||t==="--prompt");if(K!==-1){let t=e.includes("--new")||e.includes("-n"),i=e.slice(K+1).filter(s=>s!=="-n"&&s!=="--new")[0];i||(console.error("[ERROR] -p/--prompt requires a prompt string."),process.exit(1));let{loadSettings:x}=await import("./chunks/settings-JGWWOFEC.js"),{getProviderAPIKey:y}=await import("./chunks/secrets-RFEEPY3S.js"),{getDefaultModel:u}=await import("./chunks/model_config-UZLNHYP5.js"),{generateSimpleContent:S}=await import("./chunks/ai-Y4IR3IJZ.js"),{checkQuotaDetailed:g}=await import("./chunks/usage-XHKS6GHC.js"),n=await x(),a=e.filter(s=>s!=="-p"&&s!=="--prompt"&&s!==i&&s!=="-n"&&s!=="--new"),c=s=>{for(let h of s){let p=a.indexOf(h);if(p!==-1&&p+1<a.length)return a[p+1]}return null},r=c(["--provider"])||n.aiProvider||"Google",$=c(["--model"])||n.activeModel||u(r,n.apiTier)||u(r,"paid"),b=c(["--key"])||await y(r);b||(console.error(`[ERROR] No API key resolved for provider "${r}".`),process.exit(1));let f=await g("agent",{aiProvider:r});f.allowed||(console.error(`[ERROR] ${f.reason||"Budget Exhausted"} - adjust with /budget set.`),process.exit(1));let C={aiProvider:r,apiKey:b,model:$,mode:"flow",thinkingLevel:c(["--thinking"])||"Fast",systemSettings:n.systemSettings||{}},o=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",A=new Date,B=A.getFullYear(),w=A.toLocaleString("en-US",{month:"short"}).toUpperCase(),E=String(A.getDate()).padStart(2,"0"),D=A.toLocaleTimeString([],{hour:"2-digit",hour12:!0}),_=`${B}-${w}-${E}, ${D}`,j=`Identity: FluxFlow. Sassy, CLI Assistant
67
+ /update latest Install latest release`),process.exit(0)),z){let S=e[1]||"latest";if(S==="check"){let g=e[2]==="latest";try{let c=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;c||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(g?`Latest version: v${c}`:c!==u?`A new version of FluxFlow is available: v${c} (current: v${u}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${u}).`)}catch(n){console.error("Error checking for updates:",n.message),process.exit(1)}process.exit(0)}else if(S==="latest"){console.log("Checking latest version and settings...");try{let a=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;a||(console.error("Error: Could not retrieve latest version."),process.exit(1)),a===u&&(console.log(`FluxFlow is already up to date (v${u}).`),process.exit(0));let c=async()=>{let o=(await import("react")).default,{useState:A}=o,{render:_,Box:w,Text:E}=await import("ink"),B=(await import("ink-select-input")).default,D=(await import("ink-text-input")).default;return new Promise(j=>{let G=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],q=({label:h,isSelected:p})=>o.createElement(w,{width:"100%"},o.createElement(E,{bold:p},"\u2514\u2500 ",p?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",h)),R,M=()=>{let[h,p]=A("select"),[Y,H]=A(""),T=N=>{N.value==="custom"?p("custom"):k({manager:N.value})},W=N=>{k({manager:"custom",customCommand:N})};return h==="custom"?o.createElement(w,{flexDirection:"column",marginY:1},o.createElement(w,{marginBottom:1},o.createElement(E,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),o.createElement(w,{flexDirection:"row"},o.createElement(E,{color:"cyan",bold:!0}," \u276F "),o.createElement(D,{value:Y,onChange:H,onSubmit:W})),o.createElement(w,{marginTop:1},o.createElement(E,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):o.createElement(w,{flexDirection:"column",marginY:1},o.createElement(w,{marginBottom:1},o.createElement(E,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),o.createElement(B,{items:G,onSelect:T,itemComponent:q,indicatorComponent:()=>null}))},k=h=>{R&&R(),j(h)},{unmount:s}=_(o.createElement(M,null));R=s})},r,$="",b;try{let{loadSettings:o}=await import("./chunks/settings-JGWWOFEC.js");b=await o(),r=b?.systemSettings?.updateManager||b?.updateManager}catch{}if(!r){let o=await c();r=o.manager,$=o.customCommand}let f="";r==="pnpm"?f=`pnpm add -g fluxflow-cli@${a}`:r==="bun"?f=`bun add -g fluxflow-cli@${a}`:r==="yarn"?f=`yarn global add fluxflow-cli@${a}`:r==="custom"?f=$||b?.customUpdateCommand||`npm install -g fluxflow-cli@${a}`:f=`npm install -g fluxflow-cli@${a}`,console.log(`Updating FluxFlow to v${a} using ${r}...`),console.log(`Running: ${f}`);let{execSync:C}=await import("child_process");C(f,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${a}.\x1B[0m`)}catch(g){console.error("\x1B[31m\u274C Update failed:\x1B[0m",g.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:se}=await import("react"),{render:re}=await import("ink"),{default:ne}=await import("./chunks/app-NKMIWEAZ.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"],ie=console.log,le=console.warn,ce=console.error,L=t=>{let l=t.map(String).join(" ");return ae.some(i=>l.includes(i))};console.log=(...t)=>!L(t)&&ie(...t),console.warn=(...t)=>!L(t)&&le(...t),console.error=(...t)=>!L(t)&&ce(...t);let U=e.findIndex(t=>t==="--cwd"||t==="--path");if(U!==-1&&U+1<e.length){let t=e[U+1],l=await import("path"),i=await import("fs-extra"),x=l.default.resolve(t);try{i.default.existsSync(x)&&i.default.statSync(x).isDirectory()?process.chdir(x):(console.error(`[ERROR] Directory not found: "${t}"`),process.exit(0))}catch(y){console.error(`[ERROR] Failed to change directory to "${t}": ${y.message}`),process.exit(0)}}let K=e.findIndex(t=>t==="-p"||t==="--prompt");if(K!==-1){let t=e.includes("--new")||e.includes("-n"),i=e.slice(K+1).filter(s=>s!=="-n"&&s!=="--new")[0];i||(console.error("[ERROR] -p/--prompt requires a prompt string."),process.exit(1));let{loadSettings:x}=await import("./chunks/settings-JGWWOFEC.js"),{getProviderAPIKey:y}=await import("./chunks/secrets-RFEEPY3S.js"),{getDefaultModel:u}=await import("./chunks/model_config-UZLNHYP5.js"),{generateSimpleContent:S}=await import("./chunks/ai-7WG52QSH.js"),{checkQuotaDetailed:g}=await import("./chunks/usage-XHKS6GHC.js"),n=await x(),a=e.filter(s=>s!=="-p"&&s!=="--prompt"&&s!==i&&s!=="-n"&&s!=="--new"),c=s=>{for(let h of s){let p=a.indexOf(h);if(p!==-1&&p+1<a.length)return a[p+1]}return null},r=c(["--provider"])||n.aiProvider||"Google",$=c(["--model"])||n.activeModel||u(r,n.apiTier)||u(r,"paid"),b=c(["--key"])||await y(r);b||(console.error(`[ERROR] No API key resolved for provider "${r}".`),process.exit(1));let f=await g("agent",{aiProvider:r});f.allowed||(console.error(`[ERROR] ${f.reason||"Budget Exhausted"} - adjust with /budget set.`),process.exit(1));let C={aiProvider:r,apiKey:b,model:$,mode:"flow",thinkingLevel:c(["--thinking"])||"Fast",systemSettings:n.systemSettings||{}},o=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",A=new Date,_=A.getFullYear(),w=A.toLocaleString("en-US",{month:"short"}).toUpperCase(),E=String(A.getDate()).padStart(2,"0"),B=A.toLocaleTimeString([],{hour:"2-digit",hour12:!0}),D=`${_}-${w}-${E}, ${B}`,j=`Identity: FluxFlow. Sassy, CLI Assistant
68
68
  Use NO markdown, only plain text
69
69
  Additional Context:
70
70
  - OS: ${o}
71
- - Model: ${O.basename(C.model).trim().replace(":free","").replace("-free","").replace("/free","").replaceAll("-"," ").replace(/\b\w/g,s=>s.toUpperCase().trim())}
72
- - Approx time: ${_}
71
+ - Model: ${O.basename(C.model).trim().replace(":free","").replace("-free","").replace("/free","").replace("_free","").replace("free_","").replaceAll("-"," ").replaceAll("_"," ").replace(/\b\w/g,s=>s.toUpperCase().trim())}
72
+ - Approx time: ${D}
73
73
  - Non interactive CLI, no tools
74
74
  - \`fluxflow\` TUI for full capability`.trim(),{getPromptSessionHistory:G,savePromptSessionHistory:q,clearPromptSessionHistory:R}=await import("./chunks/sessionDaemon-GHQTAGDG.js"),M=[];t?await R():M=await G();let k=[];if(Array.isArray(M)&&M.length>0)for(let s of M)s.text&&k.push({role:s.role==="model"?"model":"user",parts:[{text:s.text}]});k.push({role:"user",parts:[{text:i}]});try{let s="\x1B[36m",h="\x1B[35m",p="\x1B[0m",Y=O.basename(C.model).trim().replace(":free","").replace("-free","").replace("free/","").replaceAll("-"," ").replace(/\b\w/g,W=>W.toUpperCase().trim());process.stdout.write(`Responding with ${s}${Y}${p} from ${h}${C.aiProvider}${p}:
75
75
  `);let{text:H}=await S(C,$,k,j,C.thinkingLevel),T=(H||"").trim();process.stdout.write(T+`
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "4.20.1",
3
+ "version": "4.20.2",
4
4
  "date": "2026-09-27",
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.20.1",
3
+ "version": "4.20.2",
4
4
  "date": "2026-09-27",
5
5
  "description": "One of the lightest, fastest, high-fidelity agentic CLI with sub-agents & computer use.",
6
6
  "keywords": [