fluxflow-cli 4.6.1 → 4.6.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 +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-BYSB5PYK.js";import"./chunk-JM3JCK2K.js";import"./chunk-QLPFOHKZ.js";import{c as a}from"./chunk-IJCIHHAH.js";import"./chunk-SIINYZWE.js";import"./chunk-4TZKD2XR.js";import"./chunk-56EJGQU3.js";import"./chunk-ROHVHR3J.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-JGU5KBCM.js";import"./chunk-JM3JCK2K.js";import"./chunk-QLPFOHKZ.js";import{c as a}from"./chunk-IJCIHHAH.js";import"./chunk-SIINYZWE.js";import"./chunk-4TZKD2XR.js";import"./chunk-56EJGQU3.js";import"./chunk-ROHVHR3J.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 Ii,B as Ai,C as Li,D as cr,E as Oi,F as Pi,G as Ni,H as Fi,I as is,J as jo,K as ur,T as $i,W as Xi,X as On,Y as _i,Z as Hi,_ as Wi,a as yt,b as ht,c as ut,d as Mi,e as os,f as ns,g as In,h as Bi,i as ho,j as Di,k as je,l as qe,m as lr,n as An,o as rs,p as vi,q as an,r as Gt,s as Ei,t as ar,u as ki,v as Ln,w as Ao,x as dn,y as dr,z as ss}from"./chunk-BYSB5PYK.js";import{b as ln,c as Zr,k as Ti}from"./chunk-JM3JCK2K.js";import{b as ts}from"./chunk-A2MCYGU4.js";import{a as bi,b as yi,c as sr,d as ir,f as bt,g as Vo,h as es,l as Si}from"./chunk-QLPFOHKZ.js";import{a as hi,b as xi,c as pi,e as Io,f as ro,g as wi,h as Rr,i as kt}from"./chunk-IJCIHHAH.js";import{c as mi,d as gi,e as fi}from"./chunk-SIINYZWE.js";import{e as Ci}from"./chunk-7PJOF5I2.js";import{a as ko,b as kn,c as no,d as rr,e as zr,j as Jr}from"./chunk-4TZKD2XR.js";import{a as Ui}from"./chunk-56EJGQU3.js";import"./chunk-ROHVHR3J.js";import Es from"os";import e,{useState as q,useEffect as Qe,useRef as Ve,useMemo as fn}from"react";import{Box as c,Text as s,useInput as Bd,useStdout as Dd,Static as vd}from"ink";import Ed from"ink-spinner";import rt from"fs-extra";import Dt from"path";import{exec as mo}from"child_process";import{fileURLToPath as kd}from"url";import Ut,{useState as mr,useEffect as ls,useMemo as Pn,useCallback as zl,useRef as xo}from"react";import{Box as Jl,Text as eo,useInput as Zl}from"ink";function Rl(t,g){return t.replace(/\t/g," ".repeat(g))}function gr(t){return t==null?"":t.replace(/\r\n/g,`
1
+ import{A as Ii,B as Ai,C as Li,D as cr,E as Oi,F as Pi,G as Ni,H as Fi,I as is,J as jo,K as ur,T as $i,W as Xi,X as On,Y as _i,Z as Hi,_ as Wi,a as yt,b as ht,c as ut,d as Mi,e as os,f as ns,g as In,h as Bi,i as ho,j as Di,k as je,l as qe,m as lr,n as An,o as rs,p as vi,q as an,r as Gt,s as Ei,t as ar,u as ki,v as Ln,w as Ao,x as dn,y as dr,z as ss}from"./chunk-JGU5KBCM.js";import{b as ln,c as Zr,k as Ti}from"./chunk-JM3JCK2K.js";import{b as ts}from"./chunk-A2MCYGU4.js";import{a as bi,b as yi,c as sr,d as ir,f as bt,g as Vo,h as es,l as Si}from"./chunk-QLPFOHKZ.js";import{a as hi,b as xi,c as pi,e as Io,f as ro,g as wi,h as Rr,i as kt}from"./chunk-IJCIHHAH.js";import{c as mi,d as gi,e as fi}from"./chunk-SIINYZWE.js";import{e as Ci}from"./chunk-7PJOF5I2.js";import{a as ko,b as kn,c as no,d as rr,e as zr,j as Jr}from"./chunk-4TZKD2XR.js";import{a as Ui}from"./chunk-56EJGQU3.js";import"./chunk-ROHVHR3J.js";import Es from"os";import e,{useState as q,useEffect as Qe,useRef as Ve,useMemo as fn}from"react";import{Box as c,Text as s,useInput as Bd,useStdout as Dd,Static as vd}from"ink";import Ed from"ink-spinner";import rt from"fs-extra";import Dt from"path";import{exec as mo}from"child_process";import{fileURLToPath as kd}from"url";import Ut,{useState as mr,useEffect as ls,useMemo as Pn,useCallback as zl,useRef as xo}from"react";import{Box as Jl,Text as eo,useInput as Zl}from"ink";function Rl(t,g){return t.replace(/\t/g," ".repeat(g))}function gr(t){return t==null?"":t.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `)}function Ko(t,g,x){let S=t,w=[...g].sort((i,v)=>i.start-v.start),p=0;for(let i of w){let v=i.start-p,m=gr(i.text).split(`
4
4
  `).length,B=i.text.length,M=(m>3?`[Pasted ${m} lines]`:`[Pasted ${B} chars]`).length,$=v+M;if(t<=v)break;if(t<$){S=i.end;break}else{let D=i.text.length-M;S+=D,p+=D}}return Math.min(S,x.length)}function as(t,g,x,S,w=[]){let p=(t||"").slice(0,g),i=S(p).length,v=S(t||""),m=[...w].sort((O,L)=>L.start-O.start);for(let O of m){let L=S(t.slice(0,O.start)).length,X=S(O.text),te=L+X.length,ae=gr(O.text).split(`
@@ -70,7 +70,7 @@ Invocations:
70
70
  -- TOOLS --
71
71
  You cant execute tools. To use tools, must output exactly [tool:functions.ToolName(arg1="value1")] structured string in chat output & wait for system response \u2190 no exception, tool:functions must
72
72
  Tool Rules:
73
- - Max 3 tool calls/turn${e==="Flux"||e.toLowerCase()==="fluxcu"?" (Todo: 3+)":""}
73
+ - Max 5 tool calls/turn${e==="Flux"||e.toLowerCase()==="fluxcu"?" (Todo: 5+)":""}
74
74
  - NO chat text with tool calls
75
75
  ${e==="Flux"||e.toLowerCase()==="fluxcu"?`${a}`:""}
76
76
  **User Communication**
@@ -123,7 +123,7 @@ Quick, focused thinking, intent & complexity, required tools/files/actions, befo
123
123
  Brief thoughts, think only enough to avoid mistakes, verify imports, tool results & system stability; avoid syntax errors`,Off:`Effort: Lowest
124
124
  No thinking. Immediate response
125
125
  Verify imports, tool results & system stability; avoid syntax errors`};import qn from"fs";import mr from"path";import el from"os";import tl from"screenshot-desktop";var Vs=(e,n)=>{try{if(!qn.existsSync(e))return null;let t=Array.isArray(n)?n.map(o=>o.toLowerCase()):[n.toLowerCase()],s=qn.readdirSync(e);for(let o of t){let r=s.find(a=>a.toLowerCase()===o);if(r){let a=mr.join(e,r);if(qn.statSync(a).isFile())return a}}}catch{}return null},Ii=(e,n)=>{let t=Vs(e,n);if(t)try{return qn.readFileSync(t,"utf8")}catch{}return""},nl=Vs(Wn,["fluxflow.md","agent.md"]),sl=Vs(process.cwd(),["fluxflow.md","agent.md"]),Ys=nl?Ii(Wn,["fluxflow.md","agent.md"]):"",Ro=sl?Ii(process.cwd(),["fluxflow.md","agent.md"]):"",ol=e=>{if(!e)return null;let n=e.match(/^\s*---\r?\n([\s\S]*?)\r?\n---/);if(!n)return null;let t=n[1],s="",o="",r=t.match(/^name:\s*(.+)$/m),a=t.match(/^description:\s*(.+)$/m);return r&&(s=r[1].trim().replace(/^["']|["']$/g,"")),a&&(o=a[1].trim().replace(/^["']|["']$/g,"")),s&&o?{name:s,description:o}:null},rl=e=>{let n=[];if(!e||!qn.existsSync(e))return n;let t=(s,o=0)=>{if(!(o>5))try{let r=qn.readdirSync(s,{withFileTypes:!0});for(let a of r){let i=mr.join(s,a.name),h=a.name.toLowerCase();a.isFile()?h==="skill.md"&&n.push(i):a.isDirectory()&&(o===0?(h==="skills"||h===".skills"||h==="skill"||h===".skill")&&t(i,o+1):t(i,o+1))}}catch{}};return t(e,0),n},Eo=e=>{let n=rl(e),t=[];for(let s of n)try{let o=qn.readFileSync(s,"utf8"),r=ol(o);r&&t.push({...r,filePath:s})}catch{}return t},Oi=e=>!e||e.length===0?"":e.map(n=>`- ${n.name}: ${n.description}`).join(`
126
- `),Li=Eo(Wn),Pi=Eo(process.cwd()),ur=Oi(Li),pr=Oi(Pi),hf=(Ys?1:0)+(Ro?1:0)+(Li?.length||0)+(Pi?.length||0),hr=(e,n="Project")=>{if(!e)return"";let t=e.replace(/\\/g,"/");if(n==="Global"){let o=el.homedir().replace(/\\/g,"/");return t.toLowerCase().startsWith(o.toLowerCase())?"~"+t.slice(o.length):t}let s=mr.relative(process.cwd(),e).replace(/\\/g,"/");return s.startsWith(".")?s:`./${s}`},mf=()=>{let e=Vs(Wn,["fluxflow.md","agent.md"]),n=Vs(process.cwd(),["fluxflow.md","agent.md"]),t=Eo(Wn),s=Eo(process.cwd()),o=[];e&&o.push({scope:"Global",path:e}),n&&o.push({scope:"Project",path:n});let r=o.length+(t?.length||0)+(s?.length||0);if(r===0)return`\u2726 Loaded Files & Instructions
126
+ `),Li=Eo(Wn),Pi=Eo(process.cwd()),ur=Oi(Li),pr=Oi(Pi),hf=(Ys?1:0)+(Ro?1:0)+(Li?.length||0)+(Pi?.length||0),hr=(e,n="Project")=>{if(!e)return"";let t=e.replace(/\\/g,"/");if(n==="Global"){let o=el.homedir().replace(/\\/g,"/");return t.toLowerCase().startsWith(o.toLowerCase())?"~"+t.slice(o.length):t}let s=mr.relative(process.cwd(),e).replace(/\\/g,"/");return s.startsWith(".")?s:`./${s}`},mf=()=>{let e=Vs(Wn,["fluxflow.md","agent.md","agents.md"]),n=Vs(process.cwd(),["fluxflow.md","agent.md","agents.md"]),t=Eo(Wn),s=Eo(process.cwd()),o=[];e&&o.push({scope:"Global",path:e}),n&&o.push({scope:"Project",path:n});let r=o.length+(t?.length||0)+(s?.length||0);if(r===0)return`\u2726 Loaded Files & Instructions
127
127
  \u2800\u2800\x1B[2m\u2514\u2500\x1B[22m No instruction or skill files are currently loaded.
128
128
  \u2800`;let a=[];return a.push(`\u2726 Loaded Files & Instructions (${r} ${r===1?"file":"files"} active)`),o.length>0&&(a.push(`
129
129
  \x1B[1mInstructions:\x1B[22m`),o.forEach(i=>{a.push(` \u2022 [${i.scope}] ${hr(i.path,i.scope)}`)})),(t?.length>0||s?.length>0)&&(a.push(`
@@ -449,14 +449,14 @@ Stack: ${a.stack}`:"";return`ERROR: Failed to map file: ${i}${h}`}};import Kn fr
449
449
  ${l}`}return`SUCCESS: TASK LIST CREATED (${d} total)
450
450
  ${l}`}if(t==="append"){if(!s)return'ERROR: Missing "tasks" for append method.';let l=f(s);await ht.recordFileChange(i),Kn.appendFileSync(i,l,"utf8");let u=Kn.readFileSync(i,"utf8"),d=u.split(/\r?\n/).map(m=>m.trim()),p=d.filter(m=>m.startsWith("- [ ]")||m.startsWith("- [x]")||m.startsWith("- [X]")).length,g=d.filter(m=>m.startsWith("- [x]")||m.startsWith("- [X]")).length,y=l.split(/\r?\n/).map(m=>m.trim()).filter(m=>m.startsWith("- [ ]")||m.startsWith("- [x]")||m.startsWith("- [X]")).length;return`SUCCESS: TASK APPENDED (${g} completed, ${p-g} left, ${y} added)
451
451
  ${u}`}if(t==="get"){if(!Kn.existsSync(i))return"TODO GET: No task list found for this session.";let l=Kn.readFileSync(i,"utf8"),u=0;if(o){let m=c(l,o);m.markedCount>0&&(l=m.content,u=m.markedCount,await ht.recordFileChange(i),Kn.writeFileSync(i,l,"utf8"))}let d=l.split(/\r?\n/).map(m=>m.trim()),p=d.filter(m=>m.startsWith("- [ ]")||m.startsWith("- [x]")||m.startsWith("- [X]")).length,g=d.filter(m=>m.startsWith("- [x]")||m.startsWith("- [X]")).length;return`${u>0?`SUCCESS: ${u} TASK(S) MARKED DONE`:"TODO GET"}: ${g} Completed, ${p-g} left
452
- ${l}`}return`ERROR: Unknown method "${t}". Use create, append, or get.`}catch(l){return`ERROR: Todo tool failure: ${l instanceof Error?l.message:String(l)}`}};var Br=async(e,n={})=>{let{runSubagent:t}=await import("./ai-2ADJ6USE.js"),s=L(e),o=s.task||s.instruction||s.prompt,r=s.model||null,a=s.tools||null;if(!o)return'ERROR: Missing "task" argument for invokeSync.';let i=null;if(a)try{let f=a.trim();f.startsWith("[")&&f.endsWith("]")&&(f=f.substring(1,f.length-1)),i=f.split(",").map(c=>c.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let h=s.title||o.substring(0,30);try{n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${h}`);let f=await t(o,n,r,i,50);return n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${h} [COMPLETED]
453
- `),f}catch(f){let{isTerminationSignaled:c}=await import("./ai-2ADJ6USE.js"),l=f.message==="Subagent task was cancelled by user."||c();if(n.onVisualFeedback){let u=l?"[CANCELLED]":"[FAILED]";n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${h} ${u}
454
- `)}return`ERROR: Subagent execution failed: ${f.message}`}};var fa=async(e,n={})=>{let{runSubagent:t}=await import("./ai-2ADJ6USE.js"),s=L(e),o=s.task||s.instruction||s.prompt,r=s.model||null,a=s.title||null,i=s.tools||null;if(!o)return'ERROR: Missing "task" argument for invoke.';let h=null;if(i)try{let m=i.trim();m.startsWith("[")&&m.endsWith("]")&&(m=m.substring(1,m.length-1)),h=m.split(",").map(w=>w.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let f=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,c=null,l=null,u=new Promise((m,w)=>{c=m,l=w}),d={id:f,title:a||o.substring(0,30),task:o,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:m=>{m&&d.pendingSteerMessages.push(m)},completionPromise:u,_resolveCompletion:c,_rejectCompletion:l,progress:[]},p={chunks:[],totalWords:0};Ve.push(d),n.onSubagentUpdate&&n.onSubagentUpdate();let g=[],y={...n,taskId:f,onAskMain:async m=>{let w=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,x=null,k=new Promise(S=>{x=S}),$={id:w,question:m,answered:!1,answer:null,askedAt:Date.now(),_resolve:x};return d.questions.push($),d.status="waiting",n.onSubagentUpdate&&n.onSubagentUpdate(),xo(`[SYSTEM] Background subagent "${d.title}" is WAITING FOR YOUR INPUT: "${m}"
452
+ ${l}`}return`ERROR: Unknown method "${t}". Use create, append, or get.`}catch(l){return`ERROR: Todo tool failure: ${l instanceof Error?l.message:String(l)}`}};var Br=async(e,n={})=>{let{runSubagent:t}=await import("./ai-P2EI77UO.js"),s=L(e),o=s.task||s.instruction||s.prompt,r=s.model||null,a=s.tools||null;if(!o)return'ERROR: Missing "task" argument for invokeSync.';let i=null;if(a)try{let f=a.trim();f.startsWith("[")&&f.endsWith("]")&&(f=f.substring(1,f.length-1)),i=f.split(",").map(c=>c.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let h=s.title||o.substring(0,30);try{n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${h}`);let f=await t(o,n,r,i,50);return n.onVisualFeedback&&n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${h} [COMPLETED]
453
+ `),f}catch(f){let{isTerminationSignaled:c}=await import("./ai-P2EI77UO.js"),l=f.message==="Subagent task was cancelled by user."||c();if(n.onVisualFeedback){let u=l?"[CANCELLED]":"[FAILED]";n.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${h} ${u}
454
+ `)}return`ERROR: Subagent execution failed: ${f.message}`}};var fa=async(e,n={})=>{let{runSubagent:t}=await import("./ai-P2EI77UO.js"),s=L(e),o=s.task||s.instruction||s.prompt,r=s.model||null,a=s.title||null,i=s.tools||null;if(!o)return'ERROR: Missing "task" argument for invoke.';let h=null;if(i)try{let m=i.trim();m.startsWith("[")&&m.endsWith("]")&&(m=m.substring(1,m.length-1)),h=m.split(",").map(w=>w.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let f=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,c=null,l=null,u=new Promise((m,w)=>{c=m,l=w}),d={id:f,title:a||o.substring(0,30),task:o,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:m=>{m&&d.pendingSteerMessages.push(m)},completionPromise:u,_resolveCompletion:c,_rejectCompletion:l,progress:[]},p={chunks:[],totalWords:0};Ve.push(d),n.onSubagentUpdate&&n.onSubagentUpdate();let g=[],y={...n,taskId:f,onAskMain:async m=>{let w=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,x=null,k=new Promise(S=>{x=S}),$={id:w,question:m,answered:!1,answer:null,askedAt:Date.now(),_resolve:x};return d.questions.push($),d.status="waiting",n.onSubagentUpdate&&n.onSubagentUpdate(),xo(`[SYSTEM] Background subagent "${d.title}" is WAITING FOR YOUR INPUT: "${m}"
455
455
  Respond using tool: [tool:functions.Answer(id="${f}", answer="...")]
456
456
  [/SYSTEM]`),await k},onVisualFeedback:m=>{d.lastChunkTime=Date.now();let w=m.replace(/\x1b\[[0-9;]*m/g,""),x=w.match(/[✔✘✗✖🔍📖→➕↻•]\s*([A-Za-z0-9\s-]+)/);x?d.currentTool=x[1].trim():d.currentTool=w,n.onSubagentUpdate&&n.onSubagentUpdate()},onTokenChunk:(m,w)=>{let x=Date.now();if(d.lastChunkTime=x,d.currentTool="Thinking",typeof w=="number"&&w>0){p.totalWords+=w,p.chunks.push({time:x,words:w});let k=x-400;if(p.chunks=p.chunks.filter($=>$.time>=k),p.chunks.length>0){let $=p.chunks.reduce((T,E)=>T+E.words,0),R=p.chunks[0].time,S=Math.max(.4,(x-R)/1e3);d.wps=Math.round($/S*10)/10}}n.onSubagentUpdate&&n.onSubagentUpdate()}};return t(o,y,r,h,50,m=>{if(d.status==="cancelled")return;if(m.startsWith("[Subagent Turn")&&g.length>0&&(d.progress.push([...g]),g=[]),m.includes("[Executing Tool]")){let x=m.match(/\[Executing Tool\]\s*([a-zA-Z0-9_]+)/);x&&(!d.currentTool||d.currentTool==="Thinking")&&(d.currentTool=x[1])}let w=m;if(w.startsWith("[Tool Result]")){let x=w.split(`
457
457
  `);x.length>5&&(w=x.slice(0,4).join(`
458
458
  `)+`
459
- ... [Content/Diff Truncated from Logs] ...`)}g.push(w),n.onSubagentUpdate&&n.onSubagentUpdate()},!0).then(m=>{if(d.status==="cancelled"){d._resolveCompletion&&d._resolveCompletion(m);return}g.length>0&&(d.progress.push([...g]),g=[]),d.status="completed",d.finalAnswer=m,n.onSubagentUpdate&&n.onSubagentUpdate(),xo(`[SYSTEM] Background subagent "${d.title}" (id: ${f}) has FINISHED. Call GetProgress(id="${f}") to see the final result. [/SYSTEM]`),d._resolveCompletion&&d._resolveCompletion(m)}).catch(async m=>{let{isTerminationSignaled:w}=await import("./ai-2ADJ6USE.js");if(m.message==="Subagent task was cancelled."||d.status==="cancelled"||w()){d.status="cancelled",g.push("[SUBAGENT CANCELLED] Task was cancelled."),d.progress.push([...g]),n.onSubagentUpdate&&n.onSubagentUpdate(),d._resolveCompletion&&d._resolveCompletion(null);return}g.push(`[SUBAGENT FAILURE] Error: ${m.message}`),d.progress.push([...g]),d.status="failed",d.error=m.message,n.onSubagentUpdate&&n.onSubagentUpdate(),xo(`[SYSTEM] Background subagent "${d.title}" (id: ${f}) FAILED with error: ${m.message}. [/SYSTEM]`),d._rejectCompletion&&d._rejectCompletion(m)}),`SUCCESS: Background subagent started. Task ID: ${f}`};var Ur=async(e,n={})=>{let s=L(e).id;if(!s)return'ERROR: Missing "id" argument for getProgress.';let o=Ve.find(i=>i.id===s);if(!o)return`ERROR: Subagent task with ID [${s}] not found.`;let r=`Subagent Task Status: ${o.status.toUpperCase()}
459
+ ... [Content/Diff Truncated from Logs] ...`)}g.push(w),n.onSubagentUpdate&&n.onSubagentUpdate()},!0).then(m=>{if(d.status==="cancelled"){d._resolveCompletion&&d._resolveCompletion(m);return}g.length>0&&(d.progress.push([...g]),g=[]),d.status="completed",d.finalAnswer=m,n.onSubagentUpdate&&n.onSubagentUpdate(),xo(`[SYSTEM] Background subagent "${d.title}" (id: ${f}) has FINISHED. Call GetProgress(id="${f}") to see the final result. [/SYSTEM]`),d._resolveCompletion&&d._resolveCompletion(m)}).catch(async m=>{let{isTerminationSignaled:w}=await import("./ai-P2EI77UO.js");if(m.message==="Subagent task was cancelled."||d.status==="cancelled"||w()){d.status="cancelled",g.push("[SUBAGENT CANCELLED] Task was cancelled."),d.progress.push([...g]),n.onSubagentUpdate&&n.onSubagentUpdate(),d._resolveCompletion&&d._resolveCompletion(null);return}g.push(`[SUBAGENT FAILURE] Error: ${m.message}`),d.progress.push([...g]),d.status="failed",d.error=m.message,n.onSubagentUpdate&&n.onSubagentUpdate(),xo(`[SYSTEM] Background subagent "${d.title}" (id: ${f}) FAILED with error: ${m.message}. [/SYSTEM]`),d._rejectCompletion&&d._rejectCompletion(m)}),`SUCCESS: Background subagent started. Task ID: ${f}`};var Ur=async(e,n={})=>{let s=L(e).id;if(!s)return'ERROR: Missing "id" argument for getProgress.';let o=Ve.find(i=>i.id===s);if(!o)return`ERROR: Subagent task with ID [${s}] not found.`;let r=`Subagent Task Status: ${o.status.toUpperCase()}
460
460
  `;if(r+=`Title: ${o.title}
461
461
  `,r+=`Task: ${o.task}
462
462
  `,o.startedAt){let i=Math.floor((Date.now()-o.startedAt)/1e3);r+=`Elapsed Time: ${i}s
package/dist/cli.js CHANGED
@@ -63,4 +63,4 @@ Usage: fluxflow --export error`),process.exit(1)}if(T&&(console.log(`v${m}`),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)),P){let w=o[1]||"latest";if(w==="check"){let i=o[2]==="latest";try{let f=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;f||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(i?`Latest version: v${f}`:f!==m?`A new version of FluxFlow is available: v${f} (current: v${m}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${m}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(w==="latest"){console.log("Checking latest version and settings...");try{let r=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;r||(console.error("Error: Could not retrieve latest version."),process.exit(1)),r===m&&(console.log(`FluxFlow is already up to date (v${m}).`),process.exit(0));let f=async()=>{let t=(await import("react")).default,{useState:$}=t,{render:q,Box:g,Text:h}=await import("ink"),z=(await import("ink-select-input")).default,J=(await import("ink-text-input")).default;return new Promise(K=>{let Q=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],Z=({label:v,isSelected:M})=>t.createElement(g,{width:"100%"},t.createElement(h,{bold:M},"\u2514\u2500 ",M?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",v)),k,ee=()=>{let[v,M]=$("select"),[te,se]=$(""),ae=E=>{E.value==="custom"?M("custom"):O({manager:E.value})},re=E=>{O({manager:"custom",customCommand:E})};return v==="custom"?t.createElement(g,{flexDirection:"column",marginY:1},t.createElement(g,{marginBottom:1},t.createElement(h,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),t.createElement(g,{flexDirection:"row"},t.createElement(h,{color:"cyan",bold:!0}," \u276F "),t.createElement(J,{value:te,onChange:se,onSubmit:re})),t.createElement(g,{marginTop:1},t.createElement(h,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):t.createElement(g,{flexDirection:"column",marginY:1},t.createElement(g,{marginBottom:1},t.createElement(h,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),t.createElement(z,{items:Q,onSelect:ae,itemComponent:Z,indicatorComponent:()=>null}))},O=v=>{k&&k(),K(v)},{unmount:oe}=q(t.createElement(ee,null));k=oe})},c,N="",b;try{let{loadSettings:t}=await import("./chunks/settings-QKREUSRE.js");b=await t(),c=b?.systemSettings?.updateManager||b?.updateManager}catch{}if(!c){let t=await f();c=t.manager,N=t.customCommand}let d="";c==="pnpm"?d=`pnpm add -g fluxflow-cli@${r}`:c==="bun"?d=`bun add -g fluxflow-cli@${r}`:c==="yarn"?d=`yarn global add fluxflow-cli@${r}`:c==="custom"?d=N||b?.customUpdateCommand||`npm install -g fluxflow-cli@${r}`:d=`npm install -g fluxflow-cli@${r}`,console.log(`Updating FluxFlow to v${r} using ${c}...`),console.log(`Running: ${d}`);let{execSync:X}=await import("child_process");X(d,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${r}.\x1B[0m`)}catch(i){console.error("\x1B[31m\u274C Update failed:\x1B[0m",i.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:U}=await import("react"),{render:j}=await import("ink"),{default:Y}=await import("./chunks/app-VJDC5MFQ.js");process.env.NODE_NO_WARNINGS="1";let G=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],H=console.log,W=console.warn,V=console.error,S=e=>{let a=e.map(String).join(" ");return G.some(n=>a.includes(n))};console.log=(...e)=>!S(e)&&H(...e),console.warn=(...e)=>!S(e)&&W(...e),console.error=(...e)=>!S(e)&&V(...e);let C=o.findIndex(e=>e==="--cwd"||e==="--path");if(C!==-1&&C+1<o.length){let e=o[C+1],a=await import("path"),n=await import("fs-extra"),p=a.default.resolve(e);try{n.default.existsSync(p)&&n.default.statSync(p).isDirectory()?process.chdir(p):(console.error(`[ERROR] Directory not found: "${e}"`),process.exit(0))}catch(x){console.error(`[ERROR] Failed to change directory to "${e}": ${x.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 I=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",I),["SIGINT","SIGTERM","SIGHUP"].forEach(e=>{process.once(e,()=>{I(),process.exit(0)})}),o.includes("--playground")){let e=process.cwd();process.argv.push("--original-cwd",e);let{DATA_DIR:a}=await import("./chunks/paths-CHZDSDRF.js"),n=await import("path"),p=await import("fs-extra"),x=n.default.join(a,"playground");try{p.default.ensureDirSync(x),process.chdir(x)}catch{}}j(U.createElement(Y,{args:process.argv.slice(2)}),{exitOnCtrlC:!1})}
66
+ /update latest Install latest release`),process.exit(0)),P){let w=o[1]||"latest";if(w==="check"){let i=o[2]==="latest";try{let f=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;f||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(i?`Latest version: v${f}`:f!==m?`A new version of FluxFlow is available: v${f} (current: v${m}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${m}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(w==="latest"){console.log("Checking latest version and settings...");try{let r=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;r||(console.error("Error: Could not retrieve latest version."),process.exit(1)),r===m&&(console.log(`FluxFlow is already up to date (v${m}).`),process.exit(0));let f=async()=>{let t=(await import("react")).default,{useState:$}=t,{render:q,Box:g,Text:h}=await import("ink"),z=(await import("ink-select-input")).default,J=(await import("ink-text-input")).default;return new Promise(K=>{let Q=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],Z=({label:v,isSelected:M})=>t.createElement(g,{width:"100%"},t.createElement(h,{bold:M},"\u2514\u2500 ",M?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",v)),k,ee=()=>{let[v,M]=$("select"),[te,se]=$(""),ae=E=>{E.value==="custom"?M("custom"):O({manager:E.value})},re=E=>{O({manager:"custom",customCommand:E})};return v==="custom"?t.createElement(g,{flexDirection:"column",marginY:1},t.createElement(g,{marginBottom:1},t.createElement(h,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),t.createElement(g,{flexDirection:"row"},t.createElement(h,{color:"cyan",bold:!0}," \u276F "),t.createElement(J,{value:te,onChange:se,onSubmit:re})),t.createElement(g,{marginTop:1},t.createElement(h,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):t.createElement(g,{flexDirection:"column",marginY:1},t.createElement(g,{marginBottom:1},t.createElement(h,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),t.createElement(z,{items:Q,onSelect:ae,itemComponent:Z,indicatorComponent:()=>null}))},O=v=>{k&&k(),K(v)},{unmount:oe}=q(t.createElement(ee,null));k=oe})},c,N="",b;try{let{loadSettings:t}=await import("./chunks/settings-QKREUSRE.js");b=await t(),c=b?.systemSettings?.updateManager||b?.updateManager}catch{}if(!c){let t=await f();c=t.manager,N=t.customCommand}let d="";c==="pnpm"?d=`pnpm add -g fluxflow-cli@${r}`:c==="bun"?d=`bun add -g fluxflow-cli@${r}`:c==="yarn"?d=`yarn global add fluxflow-cli@${r}`:c==="custom"?d=N||b?.customUpdateCommand||`npm install -g fluxflow-cli@${r}`:d=`npm install -g fluxflow-cli@${r}`,console.log(`Updating FluxFlow to v${r} using ${c}...`),console.log(`Running: ${d}`);let{execSync:X}=await import("child_process");X(d,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${r}.\x1B[0m`)}catch(i){console.error("\x1B[31m\u274C Update failed:\x1B[0m",i.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:U}=await import("react"),{render:j}=await import("ink"),{default:Y}=await import("./chunks/app-E4LPHXZS.js");process.env.NODE_NO_WARNINGS="1";let G=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],H=console.log,W=console.warn,V=console.error,S=e=>{let a=e.map(String).join(" ");return G.some(n=>a.includes(n))};console.log=(...e)=>!S(e)&&H(...e),console.warn=(...e)=>!S(e)&&W(...e),console.error=(...e)=>!S(e)&&V(...e);let C=o.findIndex(e=>e==="--cwd"||e==="--path");if(C!==-1&&C+1<o.length){let e=o[C+1],a=await import("path"),n=await import("fs-extra"),p=a.default.resolve(e);try{n.default.existsSync(p)&&n.default.statSync(p).isDirectory()?process.chdir(p):(console.error(`[ERROR] Directory not found: "${e}"`),process.exit(0))}catch(x){console.error(`[ERROR] Failed to change directory to "${e}": ${x.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 I=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",I),["SIGINT","SIGTERM","SIGHUP"].forEach(e=>{process.once(e,()=>{I(),process.exit(0)})}),o.includes("--playground")){let e=process.cwd();process.argv.push("--original-cwd",e);let{DATA_DIR:a}=await import("./chunks/paths-CHZDSDRF.js"),n=await import("path"),p=await import("fs-extra"),x=n.default.join(a,"playground");try{p.default.ensureDirSync(x),process.chdir(x)}catch{}}j(U.createElement(Y,{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.6.1",
3
+ "version": "4.6.2",
4
4
  "date": "2026-08-26",
5
5
  "description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era. Now has Computer Use.",
6
6
  "keywords": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "4.6.1",
3
+ "version": "4.6.2",
4
4
  "date": "2026-08-26",
5
5
  "description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era. Now has Computer Use.",
6
6
  "keywords": [