fluxflow-cli 4.9.2 → 4.9.4

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 +1 @@
1
- import{$ as r,L as b,M as c,N as d,O as e,P as f,Q as g,R as h,S as i,T as j,U as k,V as l,W as m,X as n,Y as o,Z as p,_ as q}from"./chunk-THILP7P5.js";import"./chunk-JSVFQZL2.js";import"./chunk-W3TQYL57.js";import{c as a}from"./chunk-QQXHAYOT.js";import"./chunk-SIINYZWE.js";import"./chunk-4TZKD2XR.js";import"./chunk-56EJGQU3.js";import"./chunk-OZ2EUJLG.js";export{c as RE_LEADING_THINK,o as compressHistory,b as convertChannelThinkTags,p as deleteChatSummary,e as findGenuineThinkClose,q as getAIStream,i as getCleanGroupedLength,l as getGoogleClient,f as getLeadingThinkBlock,n as initAI,d as isInsideBacktick,a as isModelMultimodal,k as isTerminationSignaled,m as runJanitorTask,r as runSubagent,j as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags};
1
+ import{$ as r,L as b,M as c,N as d,O as e,P as f,Q as g,R as h,S as i,T as j,U as k,V as l,W as m,X as n,Y as o,Z as p,_ as q}from"./chunk-PRWIC6CN.js";import"./chunk-JSVFQZL2.js";import"./chunk-W3TQYL57.js";import{c as a}from"./chunk-QQXHAYOT.js";import"./chunk-SIINYZWE.js";import"./chunk-4TZKD2XR.js";import"./chunk-56EJGQU3.js";import"./chunk-OZ2EUJLG.js";export{c as RE_LEADING_THINK,o as compressHistory,b as convertChannelThinkTags,p as deleteChatSummary,e as findGenuineThinkClose,q as getAIStream,i as getCleanGroupedLength,l as getGoogleClient,f as getLeadingThinkBlock,n as initAI,d as isInsideBacktick,a as isModelMultimodal,k as isTerminationSignaled,m as runJanitorTask,r as runSubagent,j as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags};
@@ -1,4 +1,4 @@
1
- import{A as Oi,B as Pi,C as Ni,D as gr,E as Fi,F as Ui,G as _i,H as Xi,I as cs,J as Ko,K as fr,T as Hi,W as Gi,X as Un,Y as Wi,Z as Yi,_ as Vi,a as Ct,b as pt,c as ut,d as Bi,e as is,f as ls,g as Pn,h as Di,i as po,j as Ii,k as je,l as qe,m as cr,n as Nn,o as as,p as Ai,q as dn,r as Wt,s as ki,t as ur,u as Li,v as Fn,w as Lo,x as cn,y as mr,z as ds}from"./chunk-THILP7P5.js";import{b as an,c as os,k as Si}from"./chunk-JSVFQZL2.js";import{b as ss}from"./chunk-Y3JUWKDQ.js";import{a as Ci,b as Mi,c as ar,d as dr,f as St,g as jo,h as rs,l as Ei}from"./chunk-W3TQYL57.js";import{a as Ti,b as bi,c as ts,e as ko,f as io,g as yi,h as ns,i as At}from"./chunk-QQXHAYOT.js";import{c as xi,d as pi,e as wi}from"./chunk-SIINYZWE.js";import{e as vi}from"./chunk-7PJOF5I2.js";import{a as Ao,b as On,c as so,d as lr,e as Rr,j as es}from"./chunk-4TZKD2XR.js";import{a as $i}from"./chunk-56EJGQU3.js";import"./chunk-OZ2EUJLG.js";import Ls from"os";import e,{useState as j,useEffect as Qe,useRef as Ye,useMemo as hn}from"react";import{Box as c,Text as i,useInput as Id,useStdout as Ad,Static as kd}from"ink";import Ld from"ink-spinner";import it from"fs-extra";import Mt from"path";import{exec as fo}from"child_process";import{fileURLToPath as Od}from"url";import Ut,{useState as hr,useEffect as us,useMemo as _n,useCallback as ea,useRef as wo}from"react";import{Box as ta,Text as eo,useInput as oa}from"ink";function na(t,h){return t.replace(/\t/g," ".repeat(h))}function xr(t){return t==null?"":t.replace(/\r\n/g,`
1
+ import{A as Oi,B as Pi,C as Ni,D as gr,E as Fi,F as Ui,G as _i,H as Xi,I as cs,J as Ko,K as fr,T as Hi,W as Gi,X as Un,Y as Wi,Z as Yi,_ as Vi,a as Ct,b as pt,c as ut,d as Bi,e as is,f as ls,g as Pn,h as Di,i as po,j as Ii,k as je,l as qe,m as cr,n as Nn,o as as,p as Ai,q as dn,r as Wt,s as ki,t as ur,u as Li,v as Fn,w as Lo,x as cn,y as mr,z as ds}from"./chunk-PRWIC6CN.js";import{b as an,c as os,k as Si}from"./chunk-JSVFQZL2.js";import{b as ss}from"./chunk-Y3JUWKDQ.js";import{a as Ci,b as Mi,c as ar,d as dr,f as St,g as jo,h as rs,l as Ei}from"./chunk-W3TQYL57.js";import{a as Ti,b as bi,c as ts,e as ko,f as io,g as yi,h as ns,i as At}from"./chunk-QQXHAYOT.js";import{c as xi,d as pi,e as wi}from"./chunk-SIINYZWE.js";import{e as vi}from"./chunk-7PJOF5I2.js";import{a as Ao,b as On,c as so,d as lr,e as Rr,j as es}from"./chunk-4TZKD2XR.js";import{a as $i}from"./chunk-56EJGQU3.js";import"./chunk-OZ2EUJLG.js";import Ls from"os";import e,{useState as j,useEffect as Qe,useRef as Ye,useMemo as hn}from"react";import{Box as c,Text as i,useInput as Id,useStdout as Ad,Static as kd}from"ink";import Ld from"ink-spinner";import it from"fs-extra";import Mt from"path";import{exec as fo}from"child_process";import{fileURLToPath as Od}from"url";import Ut,{useState as hr,useEffect as us,useMemo as _n,useCallback as ea,useRef as wo}from"react";import{Box as ta,Text as eo,useInput as oa}from"ink";function na(t,h){return t.replace(/\t/g," ".repeat(h))}function xr(t){return t==null?"":t.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `)}function qo(t,h,x){let S=t,p=[...h].sort((s,D)=>s.start-D.start),T=0;for(let s of p){let D=s.start-T,m=xr(s.text).split(`
4
4
  `).length,M=s.text.length,E=(m>3?`[Pasted ${m} lines]`:`[Pasted ${M} chars]`).length,N=D+E;if(t<=D)break;if(t<N){S=s.end;break}else{let I=s.text.length-E;S+=I,T+=I}}return Math.min(S,x.length)}function ms(t,h,x,S,p=[]){let T=(t||"").slice(0,h),s=S(T).length,D=S(t||""),m=[...p].sort((A,O)=>O.start-A.start);for(let A of m){let O=S(t.slice(0,A.start)).length,X=S(A.text),R=O+X.length,ae=xr(A.text).split(`
@@ -116,7 +116,7 @@ Usage Rules:
116
116
  Think before complex tasks
117
117
  Prefer simplest correct solution, assess architecture, performance & maintainability, verify error handling, assumptions, edge cases, dependencies & regressions, plan: files, functions, logic & interactions
118
118
  Verify from first principles, seek failure paths, verify imports, system stability
119
- Use as LESS as possible thinking tokens. Just achieve the final result without wasting any tokens. Save tokens`,High:`Effort: High
119
+ Use as less as possible thinking tokens. Achieve the final result with quality without wasting tokens`,High:`Effort: High
120
120
  Think before complex tasks
121
121
  Prefer simplest correct solution, assess architecture, performance & maintainability, verify error handling, assumptions, edge cases, dependencies & regressions, plan: files, functions, logic & interactions
122
122
  Continuous analysis, verify from first principles, seek failure paths, verify imports, system stability
@@ -843,14 +843,14 @@ Stack: ${a.stack}`:"";return`ERROR: Failed to map file: ${i}${p}`}};import Qn fr
843
843
  ${l}`}return`SUCCESS: Goal Created (${u} total)
844
844
  ${l}`}if(t==="append"){if(!o)return'ERROR: Missing "tasks" for append method.';let l=d(o);await yt.recordFileChange(i),Qn.appendFileSync(i,l,"utf8");let f=Qn.readFileSync(i,"utf8"),u=f.split(/\r?\n/).map(h=>h.trim()),m=u.filter(h=>h.startsWith("- [ ]")||h.startsWith("- [x]")||h.startsWith("- [X]")).length,g=u.filter(h=>h.startsWith("- [x]")||h.startsWith("- [X]")).length,y=l.split(/\r?\n/).map(h=>h.trim()).filter(h=>h.startsWith("- [ ]")||h.startsWith("- [x]")||h.startsWith("- [X]")).length;return`SUCCESS: Goal Appended (${g} completed, ${m-g} left, ${y} added)
845
845
  ${f}`}if(t==="get"){if(!Qn.existsSync(i))return"Goal: No task list found for this session.";let l=Qn.readFileSync(i,"utf8"),f=0;if(s){let h=c(l,s);h.markedCount>0&&(l=h.content,f=h.markedCount,await yt.recordFileChange(i),Qn.writeFileSync(i,l,"utf8"))}let u=l.split(/\r?\n/).map(h=>h.trim()),m=u.filter(h=>h.startsWith("- [ ]")||h.startsWith("- [x]")||h.startsWith("- [X]")).length,g=u.filter(h=>h.startsWith("- [x]")||h.startsWith("- [X]")).length;return`${f>0?`SUCCESS: ${f} Goal(s) Marked Done`:"Goal"}: ${g} Completed, ${m-g} left
846
- ${l}`}return`ERROR: Unknown method "${t}". Use create, append, or get.`}catch(l){return`ERROR: Goal failure: ${l instanceof Error?l.message:String(l)}`}};var Jr=async(e,n={})=>{let{runSubagent:t}=await import("./ai-5QIAOHQ7.js"),o=D(e),s=o.task||o.instruction||o.prompt,r=o.model||null,a=o.tools||null;if(!s)return'ERROR: Missing "task" argument for invokeSync.';let i=null;if(a)try{let d=a.trim();d.startsWith("[")&&d.endsWith("]")&&(d=d.substring(1,d.length-1)),i=d.split(",").map(c=>c.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let p=o.title||s.substring(0,30);try{n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${p}`);let d=await t(s,n,r,i,50);return n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${p} [COMPLETED]
847
- `),d}catch(d){let{isTerminationSignaled:c}=await import("./ai-5QIAOHQ7.js"),l=d.message==="Subagent task was cancelled by user."||c();if(n.onVisualFeedback){let f=l?"[CANCELLED]":"[FAILED]";n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${p} ${f}
848
- `)}return`ERROR: Subagent execution failed: ${d.message}`}};var qa=async(e,n={})=>{let{runSubagent:t}=await import("./ai-5QIAOHQ7.js"),o=D(e),s=o.task||o.instruction||o.prompt,r=o.model||null,a=o.title||null,i=o.tools||null;if(!s)return'ERROR: Missing "task" argument for invoke.';let p=null;if(i)try{let h=i.trim();h.startsWith("[")&&h.endsWith("]")&&(h=h.substring(1,h.length-1)),p=h.split(",").map(b=>b.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let d=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,c=null,l=null,f=new Promise((h,b)=>{c=h,l=b}),u={id:d,title:a||s.substring(0,30),task:s,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:h=>{h&&u.pendingSteerMessages.push(h)},completionPromise:f,_resolveCompletion:c,_rejectCompletion:l,progress:[]},m={chunks:[],totalWords:0};Qe.push(u),n.onSubagentUpdate&&n.onSubagentUpdate();let g=[],y={...n,taskId:d,onAskMain:async h=>{let b=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,w=null,T=new Promise(k=>{w=k}),$={id:b,question:h,answered:!1,answer:null,askedAt:Date.now(),_resolve:w};return u.questions.push($),u.status="waiting",n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" is WAITING FOR YOUR INPUT: "${h}"
846
+ ${l}`}return`ERROR: Unknown method "${t}". Use create, append, or get.`}catch(l){return`ERROR: Goal failure: ${l instanceof Error?l.message:String(l)}`}};var Jr=async(e,n={})=>{let{runSubagent:t}=await import("./ai-7ZIGMQFI.js"),o=D(e),s=o.task||o.instruction||o.prompt,r=o.model||null,a=o.tools||null;if(!s)return'ERROR: Missing "task" argument for invokeSync.';let i=null;if(a)try{let d=a.trim();d.startsWith("[")&&d.endsWith("]")&&(d=d.substring(1,d.length-1)),i=d.split(",").map(c=>c.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let p=o.title||s.substring(0,30);try{n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${p}`);let d=await t(s,n,r,i,50);return n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${p} [COMPLETED]
847
+ `),d}catch(d){let{isTerminationSignaled:c}=await import("./ai-7ZIGMQFI.js"),l=d.message==="Subagent task was cancelled by user."||c();if(n.onVisualFeedback){let f=l?"[CANCELLED]":"[FAILED]";n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${p} ${f}
848
+ `)}return`ERROR: Subagent execution failed: ${d.message}`}};var qa=async(e,n={})=>{let{runSubagent:t}=await import("./ai-7ZIGMQFI.js"),o=D(e),s=o.task||o.instruction||o.prompt,r=o.model||null,a=o.title||null,i=o.tools||null;if(!s)return'ERROR: Missing "task" argument for invoke.';let p=null;if(i)try{let h=i.trim();h.startsWith("[")&&h.endsWith("]")&&(h=h.substring(1,h.length-1)),p=h.split(",").map(b=>b.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let d=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,c=null,l=null,f=new Promise((h,b)=>{c=h,l=b}),u={id:d,title:a||s.substring(0,30),task:s,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:h=>{h&&u.pendingSteerMessages.push(h)},completionPromise:f,_resolveCompletion:c,_rejectCompletion:l,progress:[]},m={chunks:[],totalWords:0};Qe.push(u),n.onSubagentUpdate&&n.onSubagentUpdate();let g=[],y={...n,taskId:d,onAskMain:async h=>{let b=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,w=null,T=new Promise(k=>{w=k}),$={id:b,question:h,answered:!1,answer:null,askedAt:Date.now(),_resolve:w};return u.questions.push($),u.status="waiting",n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" is WAITING FOR YOUR INPUT: "${h}"
849
849
  Respond using tool: [tool:functions.Answer(id="${d}", answer="...")]
850
850
  [/SYSTEM]`),await T},onVisualFeedback:h=>{u.lastChunkTime=Date.now();let b=h.replace(/\x1b\[[0-9;]*m/g,""),w=b.match(/[✔✘✗✖🔍📖→➕↻•]\s*([A-Za-z0-9\s-]+)/);w?u.currentTool=w[1].trim():u.currentTool=b,n.onSubagentUpdate&&n.onSubagentUpdate()},onTokenChunk:(h,b)=>{let w=Date.now();if(u.lastChunkTime=w,u.currentTool="Thinking",typeof b=="number"&&b>0){m.totalWords+=b,m.chunks.push({time:w,words:b});let T=w-400;if(m.chunks=m.chunks.filter($=>$.time>=T),m.chunks.length>0){let $=m.chunks.reduce((S,_)=>S+_.words,0),R=m.chunks[0].time,k=Math.max(.4,(w-R)/1e3);u.wps=Math.round($/k*10)/10}}n.onSubagentUpdate&&n.onSubagentUpdate()}};return t(s,y,r,p,50,h=>{if(u.status==="cancelled")return;if(h.startsWith("[Subagent Turn")&&g.length>0&&(u.progress.push([...g]),g=[]),h.includes("[Executing Tool]")){let w=h.match(/\[Executing Tool\]\s*([a-zA-Z0-9_]+)/);w&&(!u.currentTool||u.currentTool==="Thinking")&&(u.currentTool=w[1])}let b=h;if(b.startsWith("[Tool Result]")){let w=b.split(`
851
851
  `);w.length>5&&(b=w.slice(0,4).join(`
852
852
  `)+`
853
- ... [Content/Diff Truncated from Logs] ...`)}g.push(b),n.onSubagentUpdate&&n.onSubagentUpdate()},!0).then(h=>{if(u.status==="cancelled"){u._resolveCompletion&&u._resolveCompletion(h);return}g.length>0&&(u.progress.push([...g]),g=[]),u.status="completed",u.finalAnswer=h,n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) has FINISHED. Call GetProgress(id="${d}") to see the final result. [/SYSTEM]`),u._resolveCompletion&&u._resolveCompletion(h)}).catch(async h=>{let{isTerminationSignaled:b}=await import("./ai-5QIAOHQ7.js");if(h.message==="Subagent task was cancelled."||u.status==="cancelled"||b()){u.status="cancelled",g.push("[SUBAGENT CANCELLED] Task was cancelled."),u.progress.push([...g]),n.onSubagentUpdate&&n.onSubagentUpdate(),u._resolveCompletion&&u._resolveCompletion(null);return}g.push(`[SUBAGENT FAILURE] Error: ${h.message}`),u.progress.push([...g]),u.status="failed",u.error=h.message,n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) FAILED with error: ${h.message}. [/SYSTEM]`),u._rejectCompletion&&u._rejectCompletion(h)}),`SUCCESS: Background subagent started. Task ID: ${d}`};var Qr=async(e,n={})=>{let o=D(e).id;if(!o)return'ERROR: Missing "id" argument for getProgress.';let s=Qe.find(i=>i.id===o);if(!s)return`ERROR: Subagent task with ID [${o}] not found.`;let r=`Subagent Task Status: ${s.status.toUpperCase()}
853
+ ... [Content/Diff Truncated from Logs] ...`)}g.push(b),n.onSubagentUpdate&&n.onSubagentUpdate()},!0).then(h=>{if(u.status==="cancelled"){u._resolveCompletion&&u._resolveCompletion(h);return}g.length>0&&(u.progress.push([...g]),g=[]),u.status="completed",u.finalAnswer=h,n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) has FINISHED. Call GetProgress(id="${d}") to see the final result. [/SYSTEM]`),u._resolveCompletion&&u._resolveCompletion(h)}).catch(async h=>{let{isTerminationSignaled:b}=await import("./ai-7ZIGMQFI.js");if(h.message==="Subagent task was cancelled."||u.status==="cancelled"||b()){u.status="cancelled",g.push("[SUBAGENT CANCELLED] Task was cancelled."),u.progress.push([...g]),n.onSubagentUpdate&&n.onSubagentUpdate(),u._resolveCompletion&&u._resolveCompletion(null);return}g.push(`[SUBAGENT FAILURE] Error: ${h.message}`),u.progress.push([...g]),u.status="failed",u.error=h.message,n.onSubagentUpdate&&n.onSubagentUpdate(),Rs(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) FAILED with error: ${h.message}. [/SYSTEM]`),u._rejectCompletion&&u._rejectCompletion(h)}),`SUCCESS: Background subagent started. Task ID: ${d}`};var Qr=async(e,n={})=>{let o=D(e).id;if(!o)return'ERROR: Missing "id" argument for getProgress.';let s=Qe.find(i=>i.id===o);if(!s)return`ERROR: Subagent task with ID [${o}] not found.`;let r=`Subagent Task Status: ${s.status.toUpperCase()}
854
854
  `;if(r+=`Title: ${s.title}
855
855
  `,r+=`Task: ${s.task}
856
856
  `,s.startedAt){let i=Math.floor((Date.now()-s.startedAt)/1e3);r+=`Elapsed Time: ${i}s
package/dist/cli.js CHANGED
@@ -63,4 +63,4 @@ Usage: fluxflow --export error`),process.exit(1)}if($&&(console.log(`v${g}`),pro
63
63
  /docs View documentation
64
64
  /fluxflow init Create FluxFlow.md template
65
65
  /update check Check for new version
66
- /update latest Install latest release`),process.exit(0)),R){let v=e[1]||"latest";if(v==="check"){let u=e[2]==="latest";try{let h=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;h||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(u?`Latest version: v${h}`:h!==g?`A new version of FluxFlow is available: v${h} (current: v${g}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${g}).`)}catch(p){console.error("Error checking for updates:",p.message),process.exit(1)}process.exit(0)}else if(v==="latest"){console.log("Checking latest version and settings...");try{let i=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;i||(console.error("Error: Could not retrieve latest version."),process.exit(1)),i===g&&(console.log(`FluxFlow is already up to date (v${g}).`),process.exit(0));let h=async()=>{let t=(await import("react")).default,{useState:L}=t,{render:K,Box:x,Text:y}=await import("ink"),Q=(await import("ink-select-input")).default,Z=(await import("ink-text-input")).default;return new Promise(ee=>{let oe=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],te=({label:b,isSelected:C})=>t.createElement(x,{width:"100%"},t.createElement(y,{bold:C},"\u2514\u2500 ",C?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",b)),T,se=()=>{let[b,C]=L("select"),[ne,ae]=L(""),ie=F=>{F.value==="custom"?C("custom"):_({manager:F.value})},le=F=>{_({manager:"custom",customCommand:F})};return b==="custom"?t.createElement(x,{flexDirection:"column",marginY:1},t.createElement(x,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),t.createElement(x,{flexDirection:"row"},t.createElement(y,{color:"cyan",bold:!0}," \u276F "),t.createElement(Z,{value:ne,onChange:ae,onSubmit:le})),t.createElement(x,{marginTop:1},t.createElement(y,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):t.createElement(x,{flexDirection:"column",marginY:1},t.createElement(x,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),t.createElement(Q,{items:oe,onSelect:ie,itemComponent:te,indicatorComponent:()=>null}))},_=b=>{T&&T(),ee(b)},{unmount:re}=K(t.createElement(se,null));T=re})},d,O="",E;try{let{loadSettings:t}=await import("./chunks/settings-V4MURDR6.js");E=await t(),d=E?.systemSettings?.updateManager||E?.updateManager}catch{}if(!d){let t=await h();d=t.manager,O=t.customCommand}let f="";d==="pnpm"?f=`pnpm add -g fluxflow-cli@${i}`:d==="bun"?f=`bun add -g fluxflow-cli@${i}`:d==="yarn"?f=`yarn global add fluxflow-cli@${i}`:d==="custom"?f=O||E?.customUpdateCommand||`npm install -g fluxflow-cli@${i}`:f=`npm install -g fluxflow-cli@${i}`,console.log(`Updating FluxFlow to v${i} using ${d}...`),console.log(`Running: ${f}`);let{execSync:J}=await import("child_process");J(f,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${i}.\x1B[0m`)}catch(u){console.error("\x1B[31m\u274C Update failed:\x1B[0m",u.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:G}=await import("react"),{render:Y}=await import("ink"),{default:W}=await import("./chunks/app-RGBQV6J6.js");process.env.NODE_NO_WARNINGS="1";let H=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],X=console.log,V=console.warn,z=console.error,A=o=>{let a=o.map(String).join(" ");return H.some(c=>a.includes(c))};console.log=(...o)=>!A(o)&&X(...o),console.warn=(...o)=>!A(o)&&V(...o),console.error=(...o)=>!A(o)&&z(...o);let k=e.findIndex(o=>o==="--cwd"||o==="--path");if(k!==-1&&k+1<e.length){let o=e[k+1],a=await import("path"),c=await import("fs-extra"),m=a.default.resolve(o);try{c.default.existsSync(m)&&c.default.statSync(m).isDirectory()?process.chdir(m):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(w){console.error(`[ERROR] Failed to change directory to "${o}": ${w.message}`),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 N=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",N),["SIGINT","SIGTERM","SIGHUP"].forEach(o=>{process.once(o,()=>{N(),process.exit(0)})}),e.includes("--playground")){let o=process.cwd();process.argv.push("--original-cwd",o);let{DATA_DIR:a}=await import("./chunks/paths-CHZDSDRF.js"),c=await import("path"),m=await import("fs-extra"),w=c.default.join(a,"playground");try{m.default.ensureDirSync(w),process.chdir(w)}catch{}}Y(G.createElement(W,{args:process.argv.slice(2)}),{exitOnCtrlC:!1})}
66
+ /update latest Install latest release`),process.exit(0)),R){let v=e[1]||"latest";if(v==="check"){let u=e[2]==="latest";try{let h=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;h||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(u?`Latest version: v${h}`:h!==g?`A new version of FluxFlow is available: v${h} (current: v${g}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${g}).`)}catch(p){console.error("Error checking for updates:",p.message),process.exit(1)}process.exit(0)}else if(v==="latest"){console.log("Checking latest version and settings...");try{let i=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;i||(console.error("Error: Could not retrieve latest version."),process.exit(1)),i===g&&(console.log(`FluxFlow is already up to date (v${g}).`),process.exit(0));let h=async()=>{let t=(await import("react")).default,{useState:L}=t,{render:K,Box:x,Text:y}=await import("ink"),Q=(await import("ink-select-input")).default,Z=(await import("ink-text-input")).default;return new Promise(ee=>{let oe=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],te=({label:b,isSelected:C})=>t.createElement(x,{width:"100%"},t.createElement(y,{bold:C},"\u2514\u2500 ",C?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",b)),T,se=()=>{let[b,C]=L("select"),[ne,ae]=L(""),ie=F=>{F.value==="custom"?C("custom"):_({manager:F.value})},le=F=>{_({manager:"custom",customCommand:F})};return b==="custom"?t.createElement(x,{flexDirection:"column",marginY:1},t.createElement(x,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),t.createElement(x,{flexDirection:"row"},t.createElement(y,{color:"cyan",bold:!0}," \u276F "),t.createElement(Z,{value:ne,onChange:ae,onSubmit:le})),t.createElement(x,{marginTop:1},t.createElement(y,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):t.createElement(x,{flexDirection:"column",marginY:1},t.createElement(x,{marginBottom:1},t.createElement(y,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),t.createElement(Q,{items:oe,onSelect:ie,itemComponent:te,indicatorComponent:()=>null}))},_=b=>{T&&T(),ee(b)},{unmount:re}=K(t.createElement(se,null));T=re})},d,O="",E;try{let{loadSettings:t}=await import("./chunks/settings-V4MURDR6.js");E=await t(),d=E?.systemSettings?.updateManager||E?.updateManager}catch{}if(!d){let t=await h();d=t.manager,O=t.customCommand}let f="";d==="pnpm"?f=`pnpm add -g fluxflow-cli@${i}`:d==="bun"?f=`bun add -g fluxflow-cli@${i}`:d==="yarn"?f=`yarn global add fluxflow-cli@${i}`:d==="custom"?f=O||E?.customUpdateCommand||`npm install -g fluxflow-cli@${i}`:f=`npm install -g fluxflow-cli@${i}`,console.log(`Updating FluxFlow to v${i} using ${d}...`),console.log(`Running: ${f}`);let{execSync:J}=await import("child_process");J(f,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${i}.\x1B[0m`)}catch(u){console.error("\x1B[31m\u274C Update failed:\x1B[0m",u.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:G}=await import("react"),{render:Y}=await import("ink"),{default:W}=await import("./chunks/app-AYB4XW3N.js");process.env.NODE_NO_WARNINGS="1";let H=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],X=console.log,V=console.warn,z=console.error,A=o=>{let a=o.map(String).join(" ");return H.some(c=>a.includes(c))};console.log=(...o)=>!A(o)&&X(...o),console.warn=(...o)=>!A(o)&&V(...o),console.error=(...o)=>!A(o)&&z(...o);let k=e.findIndex(o=>o==="--cwd"||o==="--path");if(k!==-1&&k+1<e.length){let o=e[k+1],a=await import("path"),c=await import("fs-extra"),m=a.default.resolve(o);try{c.default.existsSync(m)&&c.default.statSync(m).isDirectory()?process.chdir(m):(console.error(`[ERROR] Directory not found: "${o}"`),process.exit(0))}catch(w){console.error(`[ERROR] Failed to change directory to "${o}": ${w.message}`),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 N=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",N),["SIGINT","SIGTERM","SIGHUP"].forEach(o=>{process.once(o,()=>{N(),process.exit(0)})}),e.includes("--playground")){let o=process.cwd();process.argv.push("--original-cwd",o);let{DATA_DIR:a}=await import("./chunks/paths-CHZDSDRF.js"),c=await import("path"),m=await import("fs-extra"),w=c.default.join(a,"playground");try{m.default.ensureDirSync(w),process.chdir(w)}catch{}}Y(G.createElement(W,{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.9.2",
3
+ "version": "4.9.4",
4
4
  "date": "2026-09-10",
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.9.2",
3
+ "version": "4.9.4",
4
4
  "date": "2026-09-10",
5
5
  "description": "One of the lightest, fastest, high-fidelity agentic CLI with sub-agents & computer use.",
6
6
  "keywords": [