fluxflow-cli 4.2.2 → 4.2.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.
package/README.md CHANGED
@@ -113,17 +113,19 @@ fluxflow [options]
113
113
  ```
114
114
 
115
115
  ### Supported Flags:
116
- - `--model <model-name>`: Temporary override for the active AI model (e.g., `gemini-2.5-pro`). Keeps settings file untouched.
117
- - `--memory <on | off>`: Toggle persistent long-term agent memory for the session.
118
- - `--resume <session-id>`: Resume a previous chat session programmatically.
119
- - `--update <check | latest>`: Manually run an update check (`check`) or execute latest update setup (`latest`).
120
- - `--package <npm | pnpm | yarn | bun>`: Override default package manager to run core application updates.
121
- - `--auto-del <1d | 7d | 30d>`: Set automated chat log deletion schedule.
122
- - `--yolo <on | off>`: Toggle autonomous execution permission.
123
- - `--external-access <on | off>`: Toggle permission to let agent read files outside CWD.
124
- - `--thinking <Fast | Low | Medium/Standard | High | xHigh>`: Override thinking level for reasoning depth. `Medium` and `Standard` is the same (Deepseek compatibility).
125
- - `--key <key@google | key@deepseek | key@openrouter>`: Set API key and provider.
126
- - `--provider <google | deepseek | openrouter>`: Override default provider.
116
+ - `--model <model-name>`: Temporary override for the active AI model (e.g., `gemini-2.5-pro`). Keeps settings file untouched.
117
+ - `--cwd <path>`: Set the working directory for the session (relative or absolute path).
118
+ - `--path <path>`: Alias for `--cwd`. Set the working directory for the session.
119
+ - `--memory <on | off>`: Toggle persistent long-term agent memory for the session.
120
+ - `--resume <session-id>`: Resume a previous chat session programmatically.
121
+ - `--update <check | latest>`: Manually run an update check (`check`) or execute latest update setup (`latest`).
122
+ - `--package <npm | pnpm | yarn | bun>`: Override default package manager to run core application updates.
123
+ - `--auto-del <1d | 7d | 30d>`: Set automated chat log deletion schedule.
124
+ - `--yolo <on | off>`: Toggle autonomous execution permission.
125
+ - `--external-access <on | off>`: Toggle permission to let agent read files outside CWD.
126
+ - `--thinking <Fast | Low | Medium/Standard | High | xHigh>`: Override thinking level for reasoning depth. `Medium` and `Standard` is the same (Deepseek compatibility).
127
+ - `--key <key@google | key@deepseek | key@openrouter>`: Set API key and provider.
128
+ - `--provider <google | deepseek | openrouter>`: Override default provider.
127
129
 
128
130
  ----
129
131
 
@@ -147,6 +149,7 @@ Set these in your shell/session to override defaults:
147
149
  - `SHOW_DEBUG_GRID` - true|false, default: false
148
150
  - `DEBUG_OCR` - true|false, default: false
149
151
  - `NO_DEV` - true|false, default: false
152
+ - `EXPERIMENTAL_MEMORY_MANAGER` - true|false, default: false
150
153
 
151
154
  ---
152
155
 
@@ -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-6QMKNP4E.js";import"./chunk-M7QN5C2K.js";import{c as a}from"./chunk-6ENN7MJR.js";import"./chunk-SIINYZWE.js";import"./chunk-I27MASHH.js";import"./chunk-56EJGQU3.js";import"./chunk-3JHCQ2JD.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-JCQAQRMY.js";import"./chunk-M7QN5C2K.js";import{c as a}from"./chunk-6ENN7MJR.js";import"./chunk-SIINYZWE.js";import"./chunk-I27MASHH.js";import"./chunk-56EJGQU3.js";import"./chunk-3JHCQ2JD.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 li}from"./chunk-3JTGIHTN.js";import{A as Ci,B as rr,C as Mi,D as Ei,E as sr,F as ir,G as Tt,H as Ho,I as Rr,J as Di,K as Bi,L as vi,M as ki,N as Ii,O as es,P as Go,Q as lr,T as Li,W as Oi,X as An,Y as Pi,Z as Fi,_ as Ni,a as st,b as ft,c as at,d as xi,e as Qr,f as zr,g as vn,h as pi,i as mo,j as Ti,k as Ve,l as qe,m as or,n as kn,o as Jr,p as wi,q as sn,r as Wt,s as yi,t as In,u as Do,v as ln,w as nr,x as Zr,y as bi,z as Si}from"./chunk-6QMKNP4E.js";import{b as rn,c as Kr,k as hi}from"./chunk-M7QN5C2K.js";import{a as ui,b as mi,c as gi,e as Eo,f as to,g as fi,h as qr,i as Ct}from"./chunk-6ENN7MJR.js";import{c as ai,d as di,e as ci}from"./chunk-SIINYZWE.js";import{a as nn,b as Bn,c as uo,d as tr,e as jr,j as Vr}from"./chunk-I27MASHH.js";import{a as Ai}from"./chunk-56EJGQU3.js";import"./chunk-3JHCQ2JD.js";import Ss from"os";import e,{useState as q,useEffect as Qe,useRef as Ye,useMemo as gn}from"react";import{Box as m,Text as s,useInput as wd,useStdout as yd,Static as bd}from"ink";import Sd from"ink-spinner";import nt from"fs-extra";import Bt from"path";import{exec as wr}from"child_process";import{fileURLToPath as Cd}from"url";import Lt,{useState as ar,useEffect as ts,useMemo as Ln,useCallback as Kl,useRef as go}from"react";import{Box as ql,Text as Jt,useInput as Ql}from"ink";function zl(t,u){return t.replace(/\t/g," ".repeat(u))}function dr(t){return t==null?"":t.replace(/\r\n/g,`
1
+ import{e as li}from"./chunk-3JTGIHTN.js";import{A as Ci,B as rr,C as Mi,D as Ei,E as sr,F as ir,G as Tt,H as Ho,I as Rr,J as Di,K as Bi,L as vi,M as ki,N as Ii,O as es,P as Go,Q as lr,T as Li,W as Oi,X as An,Y as Pi,Z as Fi,_ as Ni,a as st,b as ft,c as at,d as xi,e as Qr,f as zr,g as vn,h as pi,i as mo,j as Ti,k as Ve,l as qe,m as or,n as kn,o as Jr,p as wi,q as sn,r as Wt,s as yi,t as In,u as Do,v as ln,w as nr,x as Zr,y as bi,z as Si}from"./chunk-JCQAQRMY.js";import{b as rn,c as Kr,k as hi}from"./chunk-M7QN5C2K.js";import{a as ui,b as mi,c as gi,e as Eo,f as to,g as fi,h as qr,i as Ct}from"./chunk-6ENN7MJR.js";import{c as ai,d as di,e as ci}from"./chunk-SIINYZWE.js";import{a as nn,b as Bn,c as uo,d as tr,e as jr,j as Vr}from"./chunk-I27MASHH.js";import{a as Ai}from"./chunk-56EJGQU3.js";import"./chunk-3JHCQ2JD.js";import Ss from"os";import e,{useState as q,useEffect as Qe,useRef as Ye,useMemo as gn}from"react";import{Box as m,Text as s,useInput as wd,useStdout as yd,Static as bd}from"ink";import Sd from"ink-spinner";import nt from"fs-extra";import Bt from"path";import{exec as wr}from"child_process";import{fileURLToPath as Cd}from"url";import Lt,{useState as ar,useEffect as ts,useMemo as Ln,useCallback as Kl,useRef as go}from"react";import{Box as ql,Text as Jt,useInput as Ql}from"ink";function zl(t,u){return t.replace(/\t/g," ".repeat(u))}function dr(t){return t==null?"":t.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `)}function Yo(t,u,h){let S=t,p=[...u].sort((i,v)=>i.start-v.start),x=0;for(let i of p){let v=i.start-x,c=dr(i.text).split(`
4
4
  `).length,M=i.text.length,E=(c>3?`[Pasted ${c} lines]`:`[Pasted ${M} chars]`).length,$=v+E;if(t<=v)break;if(t<$){S=i.end;break}else{let D=i.text.length-E;S+=D,x+=D}}return Math.min(S,h.length)}function os(t,u,h,S,p=[]){let x=(t||"").slice(0,u),i=S(x).length,v=S(t||""),c=[...p].sort((P,F)=>F.start-P.start);for(let P of c){let F=S(t.slice(0,P.start)).length,W=S(P.text),ee=F+W.length,ae=dr(P.text).split(`
@@ -66,7 +66,7 @@ import{e as li}from"./chunk-3JTGIHTN.js";import{A as Ci,B as rr,C as Mi,D as Ei,
66
66
  `)}}),Qe(()=>{process.stdout.write("\x1B[?1004h");let o=n=>{let d=n.toString();d.includes("\x1B[I")?(Ht(!0),Ge.current=Date.now()):d.includes("\x1B[O")&&(Ht(!1),Ge.current=Date.now())};return process.stdin.on("data",o),()=>{process.stdout.write("\x1B[?1004l"),process.stdin.off("data",o)}},[]);let Jn=Ye(ce.theme);Qe(()=>{Jn.current&&Jn.current!==ce.theme?(Jn.current=ce.theme,i&&(i.write("\x1B[2J\x1B[3J\x1B[H"),i.isTTY&&i.write("\x1B[?2004h")),Yr(o=>o+1),mo()):Jn.current=ce.theme},[ce.theme,i]),Qe(()=>{async function o(){try{let B=JSON.parse(nt.readFileSync(Bt.join(process.cwd(),"package.json"),"utf8"));es(Rt||B.version||"2.0.0")}catch{es("2.0.0")}process.stdout.isTTY&&(process.stdout.write("\x1B]0;FluxFlow\x07"),process.stdout.write("\x1B]633;P;TerminalTitle=FluxFlow\x07")),tl()||(N(B=>(j(B.length+1),[...B,{id:"setup-"+Date.now(),role:"system",text:"\u2726 Installing Required dependencies... (One-time setup)",isMeta:!0}])),await ol(),N(B=>(j(B.length+1),[...B,{id:"setup-done-"+Date.now(),role:"system",text:`\u2800\u2800\u2514\u2500 All dependencies installed successfully.
67
67
  \u2800`,isMeta:!0}]))),await ui();let n=await qr();Pr.current=n.systemSettings?.allowExternalAccess??!1,Fr.current=n.systemSettings?.memory??!0,ve.mode?A(ve.mode):A(n.mode),F(n.display??0),ve.thinking?Xe(ve.thinking):Xe(n.thinkingLevel);let d=ve.provider||n.aiProvider||"Google";bt(d);let f=(n.quotas?.providerTiers||{})[d]||n.apiTier||"Free";if(xe.current=n.activeModel,ve.model)ie(ve.model);else if(ve.provider){let B=to(d,f);ie(B)}else ie(n.activeModel);br(n.showFullThinking),Oo(f),Ot(n.quotas||{limitMode:"Daily",agentLimit:99999999,tokenLimit:99999999999999,backgroundLimit:999999,searchLimit:100,customModelId:"",customLimit:0,providerBudgets:{}});let w={memory:!0,compression:0,autoExec:!1,autoDeleteHistory:"7d",autoUpdate:!1,updateManager:"npm",customUpdateCommand:"",...n.systemSettings||{}};ve.memory==="on"?w.memory=!0:ve.memory==="off"&&(w.memory=!1),d==="NVIDIA"&&process.env.NVIDIA_BASE_URL&&(w.memory=!1,N(B=>[...B,{role:"system",text:`\u2726 MEMORY
68
68
  \u2800\u2800\u2514\u2500 Currently not available.
69
- \u2800`,isMeta:!0}])),ve.package&&(w.updateManager=ve.package),ve.autoDel&&(w.autoDeleteHistory=ve.autoDel),ve.autoExec==="on"?w.autoExec=!0:ve.autoExec==="off"&&(w.autoExec=!1),ve.externalAccess==="on"?w.allowExternalAccess=!0:ve.externalAccess==="off"&&(w.allowExternalAccess=!1),ve.playground&&(w.allowExternalAccess=!1,w.memory=!1),St(w),Bs(n.profileData),Xn(n.imageSettings||{keyType:"Default",quality:"Low-High",apiKey:""});let g=ve.key;if(g||(g=await rn(d)),g&&(Gt(g),An(g,{aiProvider:d,onIDEApproval:Qn})),n.systemSettings?.autoDeleteHistory&&bi(n.systemSettings.autoDeleteHistory),Si(tr),ve.playground||(nr(yn).catch(()=>{}),nt.remove(Bt.join(uo,"playground")).catch(()=>{})),setTimeout(()=>{te(!1,w)},1e3),await Promise.all([Mi(),In.recoverCrashedTransaction()]),ve.resume){let B=await Do(),U=ve.resume;if(B[U]){_o.current=!0,Kn(U);let z=await rr(U);Tn.current=jt-z.total,_o.current=!1,pn(z.total),Po({tokens:z.context});let be=[...B[U].messages];be[0]?.text?.includes("\u2591\u2591\u2591\u2588\u2588\u2588")||be.unshift({id:"logo-"+Date.now(),role:"system",isLogo:!0,isMeta:!0}),N(be),G("chat"),N(Me=>{let Ee=[...Me,{id:"sys-"+Date.now(),role:"system",text:`\u2726 SESSION RESUMED
69
+ \u2800`,isMeta:!0}])),ve.package&&(w.updateManager=ve.package),ve.autoDel&&(w.autoDeleteHistory=ve.autoDel),ve.autoExec==="on"?w.autoExec=!0:ve.autoExec==="off"&&(w.autoExec=!1),ve.externalAccess==="on"?w.allowExternalAccess=!0:ve.externalAccess==="off"&&(w.allowExternalAccess=!1),ve.playground&&(w.allowExternalAccess=!1,w.memory=!1),St(w),Bs(n.profileData),Xn(n.imageSettings||{keyType:"Default",quality:"Low-High",apiKey:""});let g=ve.key;if(g||(g=await rn(d)),g&&(Gt(g),An(g,{aiProvider:d,onIDEApproval:Qn})),n.systemSettings?.autoDeleteHistory&&bi(n.systemSettings.autoDeleteHistory),Si(tr),ve.playground||(nr(yn).catch(()=>{}),nt.remove(Bt.join(uo,"playground")).catch(()=>{})),te(!1,w),await Promise.all([Mi(),In.recoverCrashedTransaction()]),ve.resume){let B=await Do(),U=ve.resume;if(B[U]){_o.current=!0,Kn(U);let z=await rr(U);Tn.current=jt-z.total,_o.current=!1,pn(z.total),Po({tokens:z.context});let be=[...B[U].messages];be[0]?.text?.includes("\u2591\u2591\u2591\u2588\u2588\u2588")||be.unshift({id:"logo-"+Date.now(),role:"system",isLogo:!0,isMeta:!0}),N(be),G("chat"),N(Me=>{let Ee=[...Me,{id:"sys-"+Date.now(),role:"system",text:`\u2726 SESSION RESUMED
70
70
  \u2800\u2800\u2514\u2500 '${U}'.
71
71
  \u2800`,isMeta:!0}];return j(Ee.length),Ee})}else N(z=>[...z,{id:"sys-err-"+Date.now(),role:"system",text:`\u2726 Chat session [${U}] not found. Started new session.
72
72
  \u2800`,isMeta:!0}])}if(ve.playground){let B=Bt.join(uo,"playground");try{nt.ensureDirSync(B),process.chdir(B)}catch{}let U=await Do();if(U[yn]){let z=[...U[yn].messages];z[0]?.isLogo||z.unshift({id:"logo-"+Date.now(),role:"system",isLogo:!0,isMeta:!0}),N(z),N(be=>{let oe=[...be,{id:"playground-"+Date.now(),role:"system",text:`\u2726 PLAYGROUND Session restored
@@ -116,7 +116,9 @@ ${a}`,color:"magenta"}]}),c("");return}if(!pt){ti(T),Ko("");return}if(T.startsWi
116
116
  \u2022 Requests (Last 1hr): ${a.activeCallsCount} requests
117
117
  `+(a.nextResetMin>0?`\u2022 Refreshes in: ${a.nextResetMin}m`:""),isMeta:!0}]))}catch{N(b=>(j(b.length+1),[...b,{id:Date.now(),role:"system",text:"[SYSTEM] Failed to load image quota stats.",isMeta:!0}]))}}else if(f[1]?.toLowerCase()==="setup")if(f[2]?.toLowerCase()==="key")if(f[3]){let g=["default","custom"].find(a=>a===f[3].toLowerCase());if(g){let a=g==="default"?"Default":"Custom";Xn(B=>({...B,keyType:a}));let b=qe(2);N(B=>(j(B.length+1),[...B,{id:Date.now(),role:"system",text:`[SYSTEM] Image key strategy set to ${a}`,isMeta:!0}])),a==="Custom"&&(Yt({label:"Enter Pollinations API key (starting with sk_):",note:"Get a key from https://enter.pollinations.ai",key:"imageSettings",subKey:"apiKey",value:wo.apiKey||"",returnView:"chat"}),G("input"))}else{let a=qe(2);N(b=>(j(b.length+1),[...b,{id:Date.now(),role:"system",text:"[SYSTEM] Invalid key option. Choose: Default or Custom.",isMeta:!0}]))}}else{let g=qe(2);N(a=>(j(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup Key <Default|Custom>",isMeta:!0}]))}else if(f[2]?.toLowerCase()==="quality")if(f[3]){let g=["low","low-high","medium","medium-high","high","ultra","premium"].find(a=>a===f[3].toLowerCase());if(g){let b={low:"Low","low-high":"Low-High",medium:"Medium","medium-high":"Medium-High",high:"High",ultra:"Ultra",premium:"Premium"}[g];Xn(U=>({...U,quality:b}));let B=qe(2);N(U=>(j(U.length+1),[...U,{id:Date.now(),role:"system",text:`[SYSTEM] Image quality set to ${b}`,isMeta:!0}]))}else{let a=qe(2);N(b=>(j(b.length+1),[...b,{id:Date.now(),role:"system",text:"[SYSTEM] Invalid quality level. Choose from: Low, Low-High, Medium, Medium-High, High, Ultra, Premium.",isMeta:!0}]))}}else{let g=qe(2);N(a=>(j(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup Quality <Low|Low-High|Medium|Medium-High|High|Ultra>",isMeta:!0}]))}else{let g=qe(2);N(a=>(j(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup <Key|Quality> ...",isMeta:!0}]))}else{let g=qe(2);N(a=>(j(a.length+1),[...a,{id:Date.now(),role:"system",text:"[SYSTEM] Usage: /image setup <Key|Quality> ...",isMeta:!0}]))}break}case"/thinking":{let g;if(f[1]){let a=f[1].toLowerCase(),b=f.includes("--bypass"),B=f.includes("--force");g=a.charAt(0).toUpperCase()+a.slice(1),a==="xhigh"&&(g="xHigh");let U="";if(B&&(process.env.NVIDIA_BASE_URL?U=`\u2800\u2800\u2514\u2500 Enabled Forced Reasoning.
118
118
  \u2800`:U=`\u2800\u2800\u2514\u2500 --force is not supported in this context.
119
- \u2800`,process.env.forcedReasoning="true"),!b&&k==="Flow"&&g==="xHigh")N(z=>(j(z.length+1),[...z,{id:Date.now(),role:"system",text:`\u2726 RESTRICTED\u2800\u2800\u2514\u2500"${g}" is restricted in Flow mode. Switch to Flux to enable Higher Thinking Levels.${U}.`,isMeta:!0}]));else{Xe(g);let z=qe(1);N(be=>(j(be.length+1),[...be,{id:Date.now(),role:"system",text:`\u2726 ${Y}
119
+ \u2800`,process.env.forcedReasoning="true"),!b&&k==="Flow"&&g==="xHigh")N(z=>(j(z.length+1),[...z,{id:Date.now(),role:"system",text:`\u2726 RESTRICTED
120
+ \u2800\u2800\u2514\u2500"${g}" is restricted in Flow mode. Switch to Flux to enable Higher Thinking Levels.
121
+ \u2800${U}.`,isMeta:!0}]));else{Xe(g);let z=qe(1);N(be=>(j(be.length+1),[...be,{id:Date.now(),role:"system",text:`\u2726 ${Y}
120
122
  \u2800\u2800\u2514\u2500 ${ne}.
121
123
  \u2800\u2800\u2514\u2500 Thinking Level: ${g}.
122
124
  ${U} \u2800`,isMeta:!0}]))}}else G("thinking");break}case"/model":{if(f[1]){let g=f.slice(1),a=!1,b=!1,B=[];for(let z of g)z==="--multimodal"||z==="-m"?Y==="Ollama"?a=!0:b=!0:B.push(z);let U=B.join(" ");if(Y==="Ollama"&&mi(a),b&&N(z=>(j(z.length+1),[...z,{id:Date.now(),role:"system",text:`\u2726 ERROR