fluxflow-cli 4.21.2 → 4.21.3

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-C62HNSLM.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-SYYFBVGD.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-C62HNSLM.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-SYYFBVGD.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-C62HNSLM.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-C62HNSLM.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-SYYFBVGD.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-SYYFBVGD.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
@@ -65,7 +65,7 @@ Usage: fluxflow --export error`),process.exit(1)}if(z&&(console.log(`v${a}`),pro
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)),J){let E=t[1]||"latest";if(E==="check"){let g=t[2]==="latest";try{let b=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;b||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(g?`Latest version: v${b}`:b!==a?`A new version of FluxFlow is available: v${b} (current: v${a}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${a}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(E==="latest"){console.log("Checking latest version and settings...");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)),c===a&&(console.log(`FluxFlow is already up to date (v${a}).`),process.exit(0));let b=async()=>{let s=(await import("react")).default,{useState:T}=s,{render:M,Box:y,Text:f}=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"}],Y=({label:x,isSelected:C})=>s.createElement(y,{width:"100%"},s.createElement(f,{bold:C},"\u2514\u2500 ",C?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",x)),R,q=()=>{let[x,C]=T("select"),[e,S]=T(""),w=k=>{k.value==="custom"?C("custom"):O({manager:k.value})},W=k=>{O({manager:"custom",customCommand:k})};return x==="custom"?s.createElement(y,{flexDirection:"column",marginY:1},s.createElement(y,{marginBottom:1},s.createElement(f,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),s.createElement(y,{flexDirection:"row"},s.createElement(f,{color:"cyan",bold:!0}," \u276F "),s.createElement(D,{value:e,onChange:S,onSubmit:W})),s.createElement(y,{marginTop:1},s.createElement(f,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):s.createElement(y,{flexDirection:"column",marginY:1},s.createElement(y,{marginBottom:1},s.createElement(f,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),s.createElement(B,{items:G,onSelect:w,itemComponent:Y,indicatorComponent:()=>null}))},O=x=>{R&&R(),j(x)},{unmount:H}=M(s.createElement(q,null));R=H})},i,$="",v;try{let{loadSettings:s}=await import("./chunks/settings-JGWWOFEC.js");v=await s(),i=v?.systemSettings?.updateManager||v?.updateManager}catch{}if(!i){let s=await b();i=s.manager,$=s.customCommand}let n="";i==="pnpm"?n=`pnpm add -g fluxflow-cli@${c}`:i==="bun"?n=`bun add -g fluxflow-cli@${c}`:i==="yarn"?n=`yarn global add fluxflow-cli@${c}`:i==="custom"?n=$||v?.customUpdateCommand||`npm install -g fluxflow-cli@${c}`:n=`npm install -g fluxflow-cli@${c}`,console.log(`Updating FluxFlow to v${c} using ${i}...`),console.log(`Running: ${n}`);let{execSync:N}=await import("child_process");N(n,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${c}.\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:re}=await import("react"),{render:ne}=await import("ink"),{default:ae}=await import("./chunks/app-ALPLHNCY.js");process.env.NODE_NO_WARNINGS="1";let ie=["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,U=o=>{let p=o.map(String).join(" ");return ie.some(r=>p.includes(r))};console.log=(...o)=>!U(o)&&le(...o),console.warn=(...o)=>!U(o)&&ce(...o),console.error=(...o)=>!U(o)&&pe(...o);let _=t.findIndex(o=>o==="--cwd"||o==="--path");if(_!==-1&&_+1<t.length){let o=t[_+1],p=await import("path"),r=await import("fs-extra"),m=p.default.resolve(o);try{r.default.existsSync(m)&&r.default.statSync(m).isDirectory()?process.chdir(m):(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 Q=t.findIndex(o=>o==="-p"||o==="--prompt");if(Q!==-1){let o=t.includes("--new")||t.includes("-n"),r=t.slice(Q+1).filter(e=>e!=="-n"&&e!=="--new")[0],m=t.findIndex(e=>e==="-r"||e==="--run"),h=null,a=null;if(m!==-1&&m+1<t.length){h=t[m+1];try{let{execSync:e}=await import("child_process");a=e(h,{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim()}catch(e){a=(e.stdout?e.stdout.toString().trim():"")||(e.stderr?e.stderr.toString().trim():"")||e.message}}if(a&&(r?r=`Stdin Context (${h}):
68
+ /update latest Install latest release`),process.exit(0)),J){let E=t[1]||"latest";if(E==="check"){let g=t[2]==="latest";try{let b=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;b||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(g?`Latest version: v${b}`:b!==a?`A new version of FluxFlow is available: v${b} (current: v${a}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${a}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(E==="latest"){console.log("Checking latest version and settings...");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)),c===a&&(console.log(`FluxFlow is already up to date (v${a}).`),process.exit(0));let b=async()=>{let s=(await import("react")).default,{useState:T}=s,{render:M,Box:y,Text:f}=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"}],Y=({label:x,isSelected:C})=>s.createElement(y,{width:"100%"},s.createElement(f,{bold:C},"\u2514\u2500 ",C?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",x)),R,q=()=>{let[x,C]=T("select"),[e,S]=T(""),w=k=>{k.value==="custom"?C("custom"):O({manager:k.value})},W=k=>{O({manager:"custom",customCommand:k})};return x==="custom"?s.createElement(y,{flexDirection:"column",marginY:1},s.createElement(y,{marginBottom:1},s.createElement(f,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),s.createElement(y,{flexDirection:"row"},s.createElement(f,{color:"cyan",bold:!0}," \u276F "),s.createElement(D,{value:e,onChange:S,onSubmit:W})),s.createElement(y,{marginTop:1},s.createElement(f,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):s.createElement(y,{flexDirection:"column",marginY:1},s.createElement(y,{marginBottom:1},s.createElement(f,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),s.createElement(B,{items:G,onSelect:w,itemComponent:Y,indicatorComponent:()=>null}))},O=x=>{R&&R(),j(x)},{unmount:H}=M(s.createElement(q,null));R=H})},i,$="",v;try{let{loadSettings:s}=await import("./chunks/settings-JGWWOFEC.js");v=await s(),i=v?.systemSettings?.updateManager||v?.updateManager}catch{}if(!i){let s=await b();i=s.manager,$=s.customCommand}let n="";i==="pnpm"?n=`pnpm add -g fluxflow-cli@${c}`:i==="bun"?n=`bun add -g fluxflow-cli@${c}`:i==="yarn"?n=`yarn global add fluxflow-cli@${c}`:i==="custom"?n=$||v?.customUpdateCommand||`npm install -g fluxflow-cli@${c}`:n=`npm install -g fluxflow-cli@${c}`,console.log(`Updating FluxFlow to v${c} using ${i}...`),console.log(`Running: ${n}`);let{execSync:N}=await import("child_process");N(n,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${c}.\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:re}=await import("react"),{render:ne}=await import("ink"),{default:ae}=await import("./chunks/app-LJ6CZIIS.js");process.env.NODE_NO_WARNINGS="1";let ie=["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,U=o=>{let p=o.map(String).join(" ");return ie.some(r=>p.includes(r))};console.log=(...o)=>!U(o)&&le(...o),console.warn=(...o)=>!U(o)&&ce(...o),console.error=(...o)=>!U(o)&&pe(...o);let _=t.findIndex(o=>o==="--cwd"||o==="--path");if(_!==-1&&_+1<t.length){let o=t[_+1],p=await import("path"),r=await import("fs-extra"),m=p.default.resolve(o);try{r.default.existsSync(m)&&r.default.statSync(m).isDirectory()?process.chdir(m):(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 Q=t.findIndex(o=>o==="-p"||o==="--prompt");if(Q!==-1){let o=t.includes("--new")||t.includes("-n"),r=t.slice(Q+1).filter(e=>e!=="-n"&&e!=="--new")[0],m=t.findIndex(e=>e==="-r"||e==="--run"),h=null,a=null;if(m!==-1&&m+1<t.length){h=t[m+1];try{let{execSync:e}=await import("child_process");a=e(h,{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim()}catch(e){a=(e.stdout?e.stdout.toString().trim():"")||(e.stderr?e.stderr.toString().trim():"")||e.message}}if(a&&(r?r=`Stdin Context (${h}):
69
69
  ${a}
70
70
  ---
71
71
 
@@ -73,7 +73,7 @@ ${r}`:r=a),!process.stdin.isTTY){let e=[];for await(let w of process.stdin)e.pus
73
73
  ${S}
74
74
  ---
75
75
 
76
- ${r}`:r=S)}r||(console.error("[ERROR] -p/--prompt requires a prompt string (or piped stdin input)."),process.exit(1));let{loadSettings:E}=await import("./chunks/settings-JGWWOFEC.js"),{getProviderAPIKey:g}=await import("./chunks/secrets-RFEEPY3S.js"),{getDefaultModel:l}=await import("./chunks/model_config-UZLNHYP5.js"),{generateSimpleContent:c}=await import("./chunks/ai-C62HNSLM.js"),{checkQuotaDetailed:b}=await import("./chunks/usage-XHKS6GHC.js"),i=await E(),$=t.filter(e=>e!=="-p"&&e!=="--prompt"&&e!==r&&e!=="-n"&&e!=="--new"),v=e=>{for(let S of e){let w=$.indexOf(S);if(w!==-1&&w+1<$.length)return $[w+1]}return null},n=v(["--provider"])||i.aiProvider||"Google",N=v(["--model"])||i.activeModel||l(n,i.apiTier)||l(n,"paid"),s=v(["--key"])||await g(n);s||(console.error(`[ERROR] No API key resolved for provider "${n}".`),process.exit(1));let T=await b("agent",{aiProvider:n});T.allowed||(console.error(`[ERROR] ${T.reason||"Budget Exhausted"} - adjust with /budget set.`),process.exit(1));let M={aiProvider:n,apiKey:s,model:N,mode:"flow",thinkingLevel:v(["--thinking"])||"Fast",systemSettings:i.systemSettings||{}},y=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",f=new Date,B=f.getFullYear(),D=f.toLocaleString("en-US",{month:"short"}).toUpperCase(),j=String(f.getDate()).padStart(2,"0"),G=f.toLocaleTimeString([],{hour:"2-digit",hour12:!0}),Y=`${B}-${D}-${j}, ${G}`,R=`Identity: FluxFlow. Sassy, CLI Assistant
76
+ ${r}`:r=S)}r||(console.error("[ERROR] -p/--prompt requires a prompt string (or piped stdin input)."),process.exit(1));let{loadSettings:E}=await import("./chunks/settings-JGWWOFEC.js"),{getProviderAPIKey:g}=await import("./chunks/secrets-RFEEPY3S.js"),{getDefaultModel:l}=await import("./chunks/model_config-UZLNHYP5.js"),{generateSimpleContent:c}=await import("./chunks/ai-SYYFBVGD.js"),{checkQuotaDetailed:b}=await import("./chunks/usage-XHKS6GHC.js"),i=await E(),$=t.filter(e=>e!=="-p"&&e!=="--prompt"&&e!==r&&e!=="-n"&&e!=="--new"),v=e=>{for(let S of e){let w=$.indexOf(S);if(w!==-1&&w+1<$.length)return $[w+1]}return null},n=v(["--provider"])||i.aiProvider||"Google",N=v(["--model"])||i.activeModel||l(n,i.apiTier)||l(n,"paid"),s=v(["--key"])||await g(n);s||(console.error(`[ERROR] No API key resolved for provider "${n}".`),process.exit(1));let T=await b("agent",{aiProvider:n});T.allowed||(console.error(`[ERROR] ${T.reason||"Budget Exhausted"} - adjust with /budget set.`),process.exit(1));let M={aiProvider:n,apiKey:s,model:N,mode:"flow",thinkingLevel:v(["--thinking"])||"Fast",systemSettings:i.systemSettings||{}},y=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",f=new Date,B=f.getFullYear(),D=f.toLocaleString("en-US",{month:"short"}).toUpperCase(),j=String(f.getDate()).padStart(2,"0"),G=f.toLocaleTimeString([],{hour:"2-digit",hour12:!0}),Y=`${B}-${D}-${j}, ${G}`,R=`Identity: FluxFlow. Sassy, CLI Assistant
77
77
  Use NO markdown, only plain text
78
78
  Additional Context:
79
79
  - OS: ${y}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "4.21.2",
3
+ "version": "4.21.3",
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.21.2",
3
+ "version": "4.21.3",
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": [