fluxflow-cli 4.3.2 → 4.3.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 +1 @@
1
- import{$ as l,R as b,S as c,T as d,U as e,V as f,W as g,X as h,Y as i,Z as j,_ as k}from"./chunk-KO7NPTXC.js";import"./chunk-ACHIC75V.js";import{c as a}from"./chunk-TKIVOTJ4.js";import"./chunk-SIINYZWE.js";import"./chunk-I27MASHH.js";import"./chunk-56EJGQU3.js";import"./chunk-GKFFLQSG.js";export{i as compressHistory,b as convertChannelThinkTags,j as deleteChatSummary,k as getAIStream,c as getCleanGroupedLength,f as getGoogleClient,h as initAI,a as isModelMultimodal,e as isTerminationSignaled,g as runJanitorTask,l as runSubagent,d as signalTermination};
1
+ import{$ as l,R as b,S as c,T as d,U as e,V as f,W as g,X as h,Y as i,Z as j,_ as k}from"./chunk-DKXPQAMB.js";import"./chunk-ACHIC75V.js";import{c as a}from"./chunk-TKIVOTJ4.js";import"./chunk-SIINYZWE.js";import"./chunk-I27MASHH.js";import"./chunk-56EJGQU3.js";import"./chunk-GKFFLQSG.js";export{i as compressHistory,b as convertChannelThinkTags,j as deleteChatSummary,k as getAIStream,c as getCleanGroupedLength,f as getGoogleClient,h as initAI,a as isModelMultimodal,e as isTerminationSignaled,g as runJanitorTask,l as runSubagent,d as signalTermination};
@@ -1,4 +1,4 @@
1
- import{e as ci}from"./chunk-3JTGIHTN.js";import{A as Bi,B as ir,C as vi,D as Di,E as lr,F as ar,G as wt,H as Vo,I as os,J as ki,K as Ii,L as Ai,M as Li,N as Oi,O as ns,P as jo,Q as dr,T as Ni,W as Fi,X as Ln,Y as Ui,Z as Xi,_ as $i,a as it,b as ht,c as dt,d as wi,e as Zr,f as Rr,g as kn,h as yi,i as xo,j as bi,k as je,l as qe,m as rr,n as In,o as es,p as Si,q as dn,r as Ht,s as Ci,t as An,u as ko,v as cn,w as sr,x as ts,y as Mi,z as Ei}from"./chunk-KO7NPTXC.js";import{b as an,c as zr,k as Ti}from"./chunk-ACHIC75V.js";import{a as fi,b as hi,c as xi,e as Do,f as no,g as pi,h as Jr,i as Mt}from"./chunk-TKIVOTJ4.js";import{c as ui,d as mi,e as gi}from"./chunk-SIINYZWE.js";import{a as ln,b as Dn,c as ho,d as nr,e as qr,j as Qr}from"./chunk-I27MASHH.js";import{a as Pi}from"./chunk-56EJGQU3.js";import"./chunk-GKFFLQSG.js";import Es from"os";import e,{useState as q,useEffect as Qe,useRef as Ye,useMemo as hn}from"react";import{Box as c,Text as i,useInput as Cd,useStdout as Md,Static as Ed}from"ink";import Bd from"ink-spinner";import rt from"fs-extra";import Dt from"path";import{exec as yr}from"child_process";import{fileURLToPath as vd}from"url";import Ot,{useState as cr,useEffect as rs,useMemo as On,useCallback as ql,useRef as po}from"react";import{Box as Ql,Text as Rt,useInput as zl}from"ink";function Jl(t,g){return t.replace(/\t/g," ".repeat(g))}function ur(t){return t==null?"":t.replace(/\r\n/g,`
1
+ import{e as ci}from"./chunk-3JTGIHTN.js";import{A as Bi,B as ir,C as vi,D as Di,E as lr,F as ar,G as wt,H as Vo,I as os,J as ki,K as Ii,L as Ai,M as Li,N as Oi,O as ns,P as jo,Q as dr,T as Ni,W as Fi,X as Ln,Y as Ui,Z as Xi,_ as $i,a as it,b as ht,c as dt,d as wi,e as Zr,f as Rr,g as kn,h as yi,i as xo,j as bi,k as je,l as qe,m as rr,n as In,o as es,p as Si,q as dn,r as Ht,s as Ci,t as An,u as ko,v as cn,w as sr,x as ts,y as Mi,z as Ei}from"./chunk-DKXPQAMB.js";import{b as an,c as zr,k as Ti}from"./chunk-ACHIC75V.js";import{a as fi,b as hi,c as xi,e as Do,f as no,g as pi,h as Jr,i as Mt}from"./chunk-TKIVOTJ4.js";import{c as ui,d as mi,e as gi}from"./chunk-SIINYZWE.js";import{a as ln,b as Dn,c as ho,d as nr,e as qr,j as Qr}from"./chunk-I27MASHH.js";import{a as Pi}from"./chunk-56EJGQU3.js";import"./chunk-GKFFLQSG.js";import Es from"os";import e,{useState as q,useEffect as Qe,useRef as Ye,useMemo as hn}from"react";import{Box as c,Text as i,useInput as Cd,useStdout as Md,Static as Ed}from"ink";import Bd from"ink-spinner";import rt from"fs-extra";import Dt from"path";import{exec as yr}from"child_process";import{fileURLToPath as vd}from"url";import Ot,{useState as cr,useEffect as rs,useMemo as On,useCallback as ql,useRef as po}from"react";import{Box as Ql,Text as Rt,useInput as zl}from"ink";function Jl(t,g){return t.replace(/\t/g," ".repeat(g))}function ur(t){return t==null?"":t.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `)}function Ko(t,g,h){let S=t,T=[...g].sort((s,v)=>s.start-v.start),p=0;for(let s of T){let v=s.start-p,u=ur(s.text).split(`
4
4
  `).length,E=s.text.length,M=(u>3?`[Pasted ${u} lines]`:`[Pasted ${E} chars]`).length,X=v+M;if(t<=v)break;if(t<X){S=s.end;break}else{let B=s.text.length-M;S+=B,p+=B}}return Math.min(S,h.length)}function ss(t,g,h,S,T=[]){let p=(t||"").slice(0,g),s=S(p).length,v=S(t||""),u=[...T].sort((O,L)=>L.start-O.start);for(let O of u){let L=S(t.slice(0,O.start)).length,$=S(O.text),ee=L+$.length,ae=ur(O.text).split(`
@@ -68,7 +68,7 @@ Invocations:
68
68
  - KeyPress(key="key or ;-separated combination, eg: enter, back, backspace, clearInput, ctrl;c, alt;tab, f5, f11, alt;f4"). Press key, shortcut, function key (f1-f12), or clear active input field
69
69
  - RecaptureScreen(). Request fresh gridded screenshot`;return`
70
70
  -- TOOLS --
71
- To use tools, must output exactly '[tool:functions.ToolName(arg1="value1")]' structured string in chat response \u2190 no exception
71
+ You cant execute tools. To call tools, must output exactly '[tool:functions.ToolName(arg1="value1")]' structured string in chat response \u2190 no exception, verify correct syntax/brackets
72
72
  Tool Rules:
73
73
  - Max 3 tool calls/turn${e==="Flux"||e.toLowerCase()==="fluxcu"?" (Todo: 3+)":""}
74
74
  ${e==="Flux"||e.toLowerCase()==="fluxcu"?`${a}`:""}
@@ -426,14 +426,14 @@ Stack: ${a.stack}`:"";return`ERROR: Failed to map file: ${i}${p}`}};import zn fr
426
426
  ${l}`}return`SUCCESS: TASK LIST CREATED (${u} total)
427
427
  ${l}`}if(t==="append"){if(!o)return'ERROR: Missing "tasks" for append method.';let l=d(o);await mt.recordFileChange(i),zn.appendFileSync(i,l,"utf8");let f=zn.readFileSync(i,"utf8"),u=f.split(/\r?\n/).map(m=>m.trim()),h=u.filter(m=>m.startsWith("- [ ]")||m.startsWith("- [x]")||m.startsWith("- [X]")).length,g=u.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, ${h-g} left, ${y} added)
428
428
  ${f}`}if(t==="get"){if(!zn.existsSync(i))return"TODO GET: No task list found for this session.";let l=zn.readFileSync(i,"utf8"),f=0;if(s){let m=c(l,s);m.markedCount>0&&(l=m.content,f=m.markedCount,await mt.recordFileChange(i),zn.writeFileSync(i,l,"utf8"))}let u=l.split(/\r?\n/).map(m=>m.trim()),h=u.filter(m=>m.startsWith("- [ ]")||m.startsWith("- [x]")||m.startsWith("- [X]")).length,g=u.filter(m=>m.startsWith("- [x]")||m.startsWith("- [X]")).length;return`${f>0?`SUCCESS: ${f} TASK(S) MARKED DONE`:"TODO GET"}: ${g} Completed, ${h-g} left
429
- ${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 Ir=async(e,n={})=>{let{runSubagent:t}=await import("./ai-K54RGGJG.js"),o=O(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]
430
- `),d}catch(d){let{isTerminationSignaled:c}=await import("./ai-K54RGGJG.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}
431
- `)}return`ERROR: Subagent execution failed: ${d.message}`}};var aa=async(e,n={})=>{let{runSubagent:t}=await import("./ai-K54RGGJG.js"),o=O(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 m=i.trim();m.startsWith("[")&&m.endsWith("]")&&(m=m.substring(1,m.length-1)),p=m.split(",").map(w=>w.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let d=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,c=null,l=null,f=new Promise((m,w)=>{c=m,l=w}),u={id:d,title:a||s.substring(0,30),task:s,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:m=>{m&&u.pendingSteerMessages.push(m)},completionPromise:f,_resolveCompletion:c,_rejectCompletion:l,progress:[]},h={chunks:[],totalWords:0};Xe.push(u),n.onSubagentUpdate&&n.onSubagentUpdate();let g=[],y={...n,taskId:d,onAskMain:async m=>{let w=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,b=null,x=new Promise(S=>{b=S}),E={id:w,question:m,answered:!1,answer:null,askedAt:Date.now(),_resolve:b};return u.questions.push(E),u.status="waiting",n.onSubagentUpdate&&n.onSubagentUpdate(),bo(`[SYSTEM] Background subagent "${u.title}" is WAITING FOR YOUR INPUT: "${m}"
429
+ ${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 Ir=async(e,n={})=>{let{runSubagent:t}=await import("./ai-QOUT5HQJ.js"),o=O(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]
430
+ `),d}catch(d){let{isTerminationSignaled:c}=await import("./ai-QOUT5HQJ.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}
431
+ `)}return`ERROR: Subagent execution failed: ${d.message}`}};var aa=async(e,n={})=>{let{runSubagent:t}=await import("./ai-QOUT5HQJ.js"),o=O(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 m=i.trim();m.startsWith("[")&&m.endsWith("]")&&(m=m.substring(1,m.length-1)),p=m.split(",").map(w=>w.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let d=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,c=null,l=null,f=new Promise((m,w)=>{c=m,l=w}),u={id:d,title:a||s.substring(0,30),task:s,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:m=>{m&&u.pendingSteerMessages.push(m)},completionPromise:f,_resolveCompletion:c,_rejectCompletion:l,progress:[]},h={chunks:[],totalWords:0};Xe.push(u),n.onSubagentUpdate&&n.onSubagentUpdate();let g=[],y={...n,taskId:d,onAskMain:async m=>{let w=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,b=null,x=new Promise(S=>{b=S}),E={id:w,question:m,answered:!1,answer:null,askedAt:Date.now(),_resolve:b};return u.questions.push(E),u.status="waiting",n.onSubagentUpdate&&n.onSubagentUpdate(),bo(`[SYSTEM] Background subagent "${u.title}" is WAITING FOR YOUR INPUT: "${m}"
432
432
  Respond using tool: [tool:functions.Answer(id="${d}", answer="...")]
433
433
  [/SYSTEM]`),await x},onVisualFeedback:m=>{u.lastChunkTime=Date.now();let w=m.replace(/\x1b\[[0-9;]*m/g,""),b=w.match(/[✔✘✗✖🔍📖→➕↻•]\s*([A-Za-z0-9\s-]+)/);b?u.currentTool=b[1].trim():u.currentTool=w,n.onSubagentUpdate&&n.onSubagentUpdate()},onTokenChunk:(m,w)=>{let b=Date.now();if(u.lastChunkTime=b,u.currentTool="Thinking",typeof w=="number"&&w>0){h.totalWords+=w,h.chunks.push({time:b,words:w});let x=b-400;if(h.chunks=h.chunks.filter(E=>E.time>=x),h.chunks.length>0){let E=h.chunks.reduce((T,$)=>T+$.words,0),R=h.chunks[0].time,S=Math.max(.4,(b-R)/1e3);u.wps=Math.round(E/S*10)/10}}n.onSubagentUpdate&&n.onSubagentUpdate()}};return t(s,y,r,p,50,m=>{if(u.status==="cancelled")return;if(m.startsWith("[Subagent Turn")&&g.length>0&&(u.progress.push([...g]),g=[]),m.includes("[Executing Tool]")){let b=m.match(/\[Executing Tool\]\s*([a-zA-Z0-9_]+)/);b&&(!u.currentTool||u.currentTool==="Thinking")&&(u.currentTool=b[1])}let w=m;if(w.startsWith("[Tool Result]")){let b=w.split(`
434
434
  `);b.length>5&&(w=b.slice(0,4).join(`
435
435
  `)+`
436
- ... [Content/Diff Truncated from Logs] ...`)}g.push(w),n.onSubagentUpdate&&n.onSubagentUpdate()},!0).then(m=>{if(u.status==="cancelled"){u._resolveCompletion&&u._resolveCompletion(m);return}g.length>0&&(u.progress.push([...g]),g=[]),u.status="completed",u.finalAnswer=m,n.onSubagentUpdate&&n.onSubagentUpdate(),bo(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) has FINISHED. Call GetProgress(id="${d}") to see the final result. [/SYSTEM]`),u._resolveCompletion&&u._resolveCompletion(m)}).catch(async m=>{let{isTerminationSignaled:w}=await import("./ai-K54RGGJG.js");if(m.message==="Subagent task was cancelled."||u.status==="cancelled"||w()){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: ${m.message}`),u.progress.push([...g]),u.status="failed",u.error=m.message,n.onSubagentUpdate&&n.onSubagentUpdate(),bo(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) FAILED with error: ${m.message}. [/SYSTEM]`),u._rejectCompletion&&u._rejectCompletion(m)}),`SUCCESS: Background subagent started. Task ID: ${d}`};var Or=async(e,n={})=>{let o=O(e).id;if(!o)return'ERROR: Missing "id" argument for getProgress.';let s=Xe.find(i=>i.id===o);if(!s)return`ERROR: Subagent task with ID [${o}] not found.`;let r=`Subagent Task Status: ${s.status.toUpperCase()}
436
+ ... [Content/Diff Truncated from Logs] ...`)}g.push(w),n.onSubagentUpdate&&n.onSubagentUpdate()},!0).then(m=>{if(u.status==="cancelled"){u._resolveCompletion&&u._resolveCompletion(m);return}g.length>0&&(u.progress.push([...g]),g=[]),u.status="completed",u.finalAnswer=m,n.onSubagentUpdate&&n.onSubagentUpdate(),bo(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) has FINISHED. Call GetProgress(id="${d}") to see the final result. [/SYSTEM]`),u._resolveCompletion&&u._resolveCompletion(m)}).catch(async m=>{let{isTerminationSignaled:w}=await import("./ai-QOUT5HQJ.js");if(m.message==="Subagent task was cancelled."||u.status==="cancelled"||w()){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: ${m.message}`),u.progress.push([...g]),u.status="failed",u.error=m.message,n.onSubagentUpdate&&n.onSubagentUpdate(),bo(`[SYSTEM] Background subagent "${u.title}" (id: ${d}) FAILED with error: ${m.message}. [/SYSTEM]`),u._rejectCompletion&&u._rejectCompletion(m)}),`SUCCESS: Background subagent started. Task ID: ${d}`};var Or=async(e,n={})=>{let o=O(e).id;if(!o)return'ERROR: Missing "id" argument for getProgress.';let s=Xe.find(i=>i.id===o);if(!s)return`ERROR: Subagent task with ID [${o}] not found.`;let r=`Subagent Task Status: ${s.status.toUpperCase()}
437
437
  `;if(r+=`Title: ${s.title}
438
438
  `,r+=`Task: ${s.task}
439
439
  `,s.startedAt){let i=Math.floor((Date.now()-s.startedAt)/1e3);r+=`Elapsed Time: ${i}s
@@ -627,7 +627,7 @@ WARNING: CWD Changed from previous: "${Rt}" to current: "${process.cwd()}", writ
627
627
  `:""}${_e}${Dn}
628
628
  [/Metadata]
629
629
  ${ci}${a!=="Fast"&&(u==="Mistral"&&!qs(e)||a!=="xHigh"&&u==="Google")?`${u==="Mistral"&&!qs(e)||e.toLowerCase().startsWith("gemma")||Ua?`[system] strictly follow thinking policy as high priority. do not start a response without <think>...</think> [/system]
630
- `:""}`:""}[system] exact tool string '[tool:functions.ToolName(arg="value")]' in chat [/system]
630
+ `:""}`:""}[system] exact tool string [tool:functions.ToolName(arg="value")] in chat [/system]
631
631
  ${pi}${Ba}[user prompt] ${Na.trim()} [/user prompt]`.trim(),gi={role:"user",text:mi};po&&(gi.binaryPart=po),k.forEach(G=>{G.text&&G.role==="agent"&&(G.text=G.text.replace(/(?:<(think|thought)>|\[(think|thought)\])[\s\S]*?(?:<\/(think|thought)>|\[\/(think|thought)\])/gi,""),G.text=G.text.replace(/(?:<(think|thought)>|\[(think|thought)\])[^\[\n]*/gi,"").trim())}),k.push(gi),ci&&n[n.length-1]?.id&&(yield{type:"summary_injected",content:{id:n[n.length-1].id,text:mi}});let Tn=null,Bs=i==="Flux"?100:10;Bs=i.toLowerCase().includes("cu")?250:Bs;let yn=16;yield{type:"status",content:"Connecting"},Lt=!1;let yi=[],mo=!1;for(let G=0;G<=Bs;G++){let Le=await ar("agent",t);if(!Le.allowed)throw new Error(Le.reason||`Budget Exhausted for Provider (${u||"Agent"})`);let nn=[];if(mo=!1,i==="ICU"||i==="FluxCU")try{yield{type:"status",content:"Capturing Screen"},await new Promise(Te=>setTimeout(Te,1e3));let ue=await xi();if(ue&&ue.base64){let Te="[system] Fresh Gridded Screen Feedback Captured. Use numeric coordinates. Old screenshots will be removed when new screenshot is captured, summarize in text if context is needed later [/system]",oe={inlineData:{mimeType:ue.mimeType,data:ue.base64}};for(let st of k)Array.isArray(st.parts)&&(st.parts=st.parts.filter(Mt=>!Mt.inlineData));if(k.length>0&&k[k.length-1].role==="user"){let st=k[k.length-1];typeof st.text=="string"&&(st.text+=`
632
632
 
633
633
  ${Te}`,Array.isArray(st.parts)||(st.parts=[{text:st.text}]),st.parts.push(oe))}else k.push({role:"user",text:Te,parts:[{text:Te},oe]})}}catch(ue){console.error("Vision screenshot capture error:",ue)}if(l?.compression===0&&(f?.tokens||0)>P&&(k=vi(k,6)),G>0?yield{type:"status",content:"Working"}:yield{type:"status",content:"Connecting"},Lt){try{let{clearPendingNudges:ue}=await import("./subagent_state-LZCOZSUJ.js");ue()}catch{}yield{type:"status",content:"Request Cancelled"},yield{type:"text",content:`
@@ -749,7 +749,7 @@ Error log can be found in \`/export logs\``)}}if(Tn){let ue=Tn.totalTokenCount||
749
749
  ----------------------------------------------------------------------
750
750
 
751
751
  `),typeof flushGoogleBuffer=="function"&&(yield*flushGoogleBuffer()),yield{type:"tool_result",content:`ERROR: [INTERNAL CRITICAL] ${C}`}}finally{$&&(clearInterval($),$=null),typeof performance<"u"&&performance.clearMeasures&&(performance.clearMeasures(),performance.clearMarks()),await mt.commitTransaction(),l?.advanceRollback&&await Kn.cleanup(d),await ms()}yield{type:"status",content:null}},vm=async(e,n,t=null,o=null,s=50,r=null,a=!1)=>{let i=await Ft(),p={...i,...n},d=process.env.SUBAGENT_MODEL?process.env.SUBAGENT_MODEL.trim():null,c=process.env.SUBAGENT_PROVIDER?process.env.SUBAGENT_PROVIDER.trim():null,l=new Date,f=`${l.getFullYear()}-${l.toLocaleString("en-US",{month:"short"}).toUpperCase()}-${String(l.getDate()).padStart(2,"0")}, ${l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!0}).replace(":","-")}`,h=(_=>{if(!_)return null;let k=_.toLowerCase();return k==="google"?"Google":k==="deepseek"?"DeepSeek":k==="openrouter"?"OpenRouter":k==="nvidia"?"NVIDIA":k==="mistral"?"Mistral":k==="ollama"?"Ollama":k==="crofai"||k==="crof"?"CrofAI":k==="inferx"?"InferX":k==="sensenova"?"SenseNova":null})(c),g=p?.systemSettings?.CustomSubAgent?p?.systemSettings?.SubAgentModel:null,y=p?.systemSettings?.CustomSubAgent?p?.systemSettings?.SubAgentProvider:null,m=null;if(g==="ENV"?(m=d,d&&h&&(p.aiProvider=h)):g&&g!=="Default"?(m=g,y&&(p.aiProvider=y)):d&&h&&(p.aiProvider=h),p.aiProvider){let _=await Qo(p.aiProvider);_&&(p.apiKey=_)}let w=_=>{if(!_||typeof _!="string")return{allowed:!0};let k=[/rm\s+-[rf]{1,2}\s+[\/*.]/i,/rmdir\s+\/[sq]/i,/del\s+\/[fsq]/i,/\bformat\b\s+[a-z]:/i,/mkfs/i,/dd\s+if=/i,/\b(shutdown|reboot|poweroff|init\s+0|init\s+6)\b/i,/chmod\s+(-R\s+)?777\s+[\/*.]/i,/chown\s+(-R\s+)?root/i,/git\s+push\s+.*--force/i,/git\s+clean\s+-fdx/i,/\bsudo\s+su\b/i,/\bsu\s+-\b/i];for(let C of k)if(C.test(_))return{allowed:!1,reason:`Blocked potentially destructive or unsafe command pattern: "${C.source}"`};return{allowed:!0}},b=t||m||n?.modelName||n?.activeModel||i.activeModel,x=process.platform==="win32"?"Windows":process.platform==="darwin"?"macOS":"Linux",E=`-- TOOL DEFINITIONS (path = relative to CWD, path separator: '/') --
752
- To use tools, must output exactly '[tool:functions.ToolName(arg1="value1")]' structured string in chat response \u2190 no exception
752
+ You cant execute tools. To call tools, must output exactly '[tool:functions.ToolName(arg1="value1")]' structured string in chat response \u2190 no exception, verify correct syntax/brackets
753
753
  Tool Rules:
754
754
  - JSON escape literal escape sequences in tool arguments
755
755
  - Same file, multiple edits? ONE PatchFile (\u226415 blocks) \u2190 Priority
package/dist/cli.js CHANGED
@@ -57,4 +57,4 @@ Usage: fluxflow --export error`),process.exit(1)}if(T&&(console.log(`v${u}`),pro
57
57
  /docs View documentation
58
58
  /fluxflow init Create FluxFlow.md template
59
59
  /update check Check for new version
60
- /update latest Install latest release`),process.exit(0)),R){let h=t[1]||"latest";if(h==="check"){let i=t[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!==u?`A new version of FluxFlow is available: v${f} (current: v${u}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${u}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(h==="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===u&&(console.log(`FluxFlow is already up to date (v${u}).`),process.exit(0));let f=async()=>{let o=(await import("react")).default,{useState:$}=o,{render:q,Box:g,Text:w}=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:b})=>o.createElement(g,{width:"100%"},o.createElement(w,{bold:b},"\u2514\u2500 ",b?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",v)),A,ee=()=>{let[v,b]=$("select"),[te,se]=$(""),re=E=>{E.value==="custom"?b("custom"):B({manager:E.value})},ae=E=>{B({manager:"custom",customCommand:E})};return v==="custom"?o.createElement(g,{flexDirection:"column",marginY:1},o.createElement(g,{marginBottom:1},o.createElement(w,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),o.createElement(g,{flexDirection:"row"},o.createElement(w,{color:"cyan",bold:!0}," \u276F "),o.createElement(J,{value:te,onChange:se,onSubmit:ae})),o.createElement(g,{marginTop:1},o.createElement(w,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):o.createElement(g,{flexDirection:"column",marginY:1},o.createElement(g,{marginBottom:1},o.createElement(w,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),o.createElement(z,{items:Q,onSelect:re,itemComponent:Z,indicatorComponent:()=>null}))},B=v=>{A&&A(),K(v)},{unmount:oe}=q(o.createElement(ee,null));A=oe})},c,N="",M;try{let{loadSettings:o}=await import("./chunks/settings-NKBYU2YV.js");M=await o(),c=M?.systemSettings?.updateManager||M?.updateManager}catch{}if(!c){let o=await f();c=o.manager,N=o.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||M?.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-WDAUXB5T.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=t.findIndex(e=>e==="--cwd"||e==="--path");if(C!==-1&&C+1<t.length){let e=t[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)})}),t.includes("--playground")){let e=process.cwd();process.argv.push("--original-cwd",e);let{DATA_DIR:a}=await import("./chunks/paths-R3DD7CRF.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})}
60
+ /update latest Install latest release`),process.exit(0)),R){let h=t[1]||"latest";if(h==="check"){let i=t[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!==u?`A new version of FluxFlow is available: v${f} (current: v${u}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${u}).`)}catch(l){console.error("Error checking for updates:",l.message),process.exit(1)}process.exit(0)}else if(h==="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===u&&(console.log(`FluxFlow is already up to date (v${u}).`),process.exit(0));let f=async()=>{let o=(await import("react")).default,{useState:$}=o,{render:q,Box:g,Text:w}=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:b})=>o.createElement(g,{width:"100%"},o.createElement(w,{bold:b},"\u2514\u2500 ",b?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",v)),A,ee=()=>{let[v,b]=$("select"),[te,se]=$(""),re=E=>{E.value==="custom"?b("custom"):B({manager:E.value})},ae=E=>{B({manager:"custom",customCommand:E})};return v==="custom"?o.createElement(g,{flexDirection:"column",marginY:1},o.createElement(g,{marginBottom:1},o.createElement(w,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),o.createElement(g,{flexDirection:"row"},o.createElement(w,{color:"cyan",bold:!0}," \u276F "),o.createElement(J,{value:te,onChange:se,onSubmit:ae})),o.createElement(g,{marginTop:1},o.createElement(w,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):o.createElement(g,{flexDirection:"column",marginY:1},o.createElement(g,{marginBottom:1},o.createElement(w,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),o.createElement(z,{items:Q,onSelect:re,itemComponent:Z,indicatorComponent:()=>null}))},B=v=>{A&&A(),K(v)},{unmount:oe}=q(o.createElement(ee,null));A=oe})},c,N="",M;try{let{loadSettings:o}=await import("./chunks/settings-NKBYU2YV.js");M=await o(),c=M?.systemSettings?.updateManager||M?.updateManager}catch{}if(!c){let o=await f();c=o.manager,N=o.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||M?.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-SW2Z6PDF.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=t.findIndex(e=>e==="--cwd"||e==="--path");if(C!==-1&&C+1<t.length){let e=t[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)})}),t.includes("--playground")){let e=process.cwd();process.argv.push("--original-cwd",e);let{DATA_DIR:a}=await import("./chunks/paths-R3DD7CRF.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.3.2",
3
+ "version": "4.3.3",
4
4
  "date": "2026-08-21",
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.3.2",
3
+ "version": "4.3.3",
4
4
  "date": "2026-08-21",
5
5
  "description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era. Now has Computer Use.",
6
6
  "keywords": [