fluxflow-cli 4.37.3 → 4.39.0
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 +1 -0
- package/dist/chunks/{9router-CKETGMBB.js → 9router-LRFKCJF4.js} +1 -1
- package/dist/chunks/{addMemScore-76XLEW3K.js → addMemScore-PBVNSFPN.js} +1 -1
- package/dist/chunks/ai-Z2RCLVQR.js +1 -0
- package/dist/chunks/{aihubmix-YSGVPUM4.js → aihubmix-TETL5QYQ.js} +1 -1
- package/dist/chunks/{apinex-VI576FVJ.js → apinex-FAYOPQSL.js} +1 -1
- package/dist/chunks/app-IKYO4AHO.js +331 -0
- package/dist/chunks/auto_completion-AIWB2XM2.js +3 -0
- package/dist/chunks/{chat-RLEHK3MX.js → chat-C7HYXKVZ.js} +1 -1
- package/dist/chunks/chunk-26BQ45XP.js +2 -0
- package/dist/chunks/{chunk-T4ZG2WCV.js → chunk-4BLSASW6.js} +1 -1
- package/dist/chunks/{chunk-QOT4BYHM.js → chunk-52STSLCN.js} +1 -1
- package/dist/chunks/{chunk-3JI2CRXK.js → chunk-6EYQQ7GQ.js} +1 -1
- package/dist/chunks/{chunk-HOZQBBAO.js → chunk-6H2P5XUL.js} +1 -1
- package/dist/chunks/chunk-EUNKA2MP.js +1 -0
- package/dist/chunks/{chunk-ET66XVIM.js → chunk-FXRFFNRK.js} +1 -1
- package/dist/chunks/{chunk-FAEB3V5R.js → chunk-HFTI3R3Q.js} +1 -1
- package/dist/chunks/chunk-HIP66OBL.js +926 -0
- package/dist/chunks/{chunk-BTMPM5BT.js → chunk-IHDJDAG3.js} +1 -1
- package/dist/chunks/{chunk-MQCO3GXM.js → chunk-IUN7DBB4.js} +15 -15
- package/dist/chunks/{chunk-K4AZXTU6.js → chunk-IXXTQAO2.js} +1 -1
- package/dist/chunks/{chunk-PRTGV2R4.js → chunk-KMOTPBF5.js} +1 -1
- package/dist/chunks/{chunk-CBFC5KUU.js → chunk-M2LU3TCU.js} +1 -1
- package/dist/chunks/chunk-M46I73DX.js +42 -0
- package/dist/chunks/{chunk-MJL6DHQM.js → chunk-MX5Q32YU.js} +1 -1
- package/dist/chunks/chunk-P5HBJA23.js +1 -0
- package/dist/chunks/{chunk-NL4MAQSB.js → chunk-PTFCY2D5.js} +1 -1
- package/dist/chunks/{chunk-ODBYCQHC.js → chunk-SDPX2VPK.js} +1 -1
- package/dist/chunks/{click-B4ZRHV4Z.js → click-O33RKVOZ.js} +2 -2
- package/dist/chunks/{computer_action-2RYMIFAM.js → computer_action-BUZAZ3LJ.js} +1 -1
- package/dist/chunks/{custom_openai-TLPPKENJ.js → custom_openai-XMDYE7NM.js} +1 -1
- package/dist/chunks/{deepseek-2GJCWFSR.js → deepseek-WNWZJTNE.js} +1 -1
- package/dist/chunks/{drag-RNGTIO2V.js → drag-BZRZLDLG.js} +1 -1
- package/dist/chunks/{emergency_rollback-NXD2JKBG.js → emergency_rollback-ZHQXCIHW.js} +1 -1
- package/dist/chunks/{exec_command-A5JWE55Q.js → exec_command-WB2PILWK.js} +1 -1
- package/dist/chunks/{explabs-YICY4AMR.js → explabs-XHHXTERB.js} +1 -1
- package/dist/chunks/{export-C6VVIYP5.js → export-RU6LCZUB.js} +1 -1
- package/dist/chunks/{file_map-T5FHB3F6.js → file_map-UA4BA5OH.js} +1 -1
- package/dist/chunks/{find_file-LZR7NET3.js → find_file-HYHHFHUJ.js} +1 -1
- package/dist/chunks/{generate_image-75IV5P3L.js → generate_image-N2SIC5BA.js} +1 -1
- package/dist/chunks/{inferx-YMU7LMOQ.js → inferx-HP5AGET3.js} +2 -2
- package/dist/chunks/{infron-A4BOV2AA.js → infron-ULXG7VDA.js} +1 -1
- package/dist/chunks/{invoke-7JAD5QTF.js → invoke-O2YAE4FY.js} +2 -2
- package/dist/chunks/{invokeSync-WUKJNYGQ.js → invokeSync-URGZXNDC.js} +2 -2
- package/dist/chunks/{key_press-3VU6SHNQ.js → key_press-Y7F3VAKL.js} +1 -1
- package/dist/chunks/{keyboard_typing-PCW3ISET.js → keyboard_typing-IEVRWQJJ.js} +1 -1
- package/dist/chunks/{memory-4DXO4K5C.js → memory-7YOYCOXE.js} +1 -1
- package/dist/chunks/{mistral-2CZKHKDT.js → mistral-XDIMWAU3.js} +1 -1
- package/dist/chunks/{model_config-VYWFV55M.js → model_config-32SB7PTZ.js} +1 -1
- package/dist/chunks/{nvidia-EOLGFGFZ.js → nvidia-BN4YCFGY.js} +1 -1
- package/dist/chunks/{ollama-OHD5BFI7.js → ollama-4PI2BDMM.js} +1 -1
- package/dist/chunks/{openrouter-SK7LO52I.js → openrouter-6MRG4RT6.js} +1 -1
- package/dist/chunks/{paths-EQFOJDZC.js → paths-RQRI2XRY.js} +1 -1
- package/dist/chunks/{poolside-SAAXTNGR.js → poolside-ODFAIK4C.js} +1 -1
- package/dist/chunks/{saveSummary-ZSJ2UKLG.js → saveSummary-W2JMDVZJ.js} +1 -1
- package/dist/chunks/{screen_grid-Z2S4GMN5.js → screen_grid-7APUBF2H.js} +1 -1
- package/dist/chunks/{scroll-YSFTTROP.js → scroll-FIN5Z7W4.js} +1 -1
- package/dist/chunks/{search_keyword-SD6Q3UZE.js → search_keyword-YLKWY2XH.js} +1 -1
- package/dist/chunks/{secrets-GHW6AWRR.js → secrets-5TCTEPEV.js} +1 -1
- package/dist/chunks/{sensenova-MQKZ7TNO.js → sensenova-3K44URJQ.js} +1 -1
- package/dist/chunks/settings-IGHDSHFT.js +1 -0
- package/dist/chunks/{todo-KQCKHQBJ.js → todo-CJLWLWJB.js} +1 -1
- package/dist/chunks/{tokenharbor-QL33UGF4.js → tokenharbor-YV2GV2LM.js} +1 -1
- package/dist/chunks/{update_file-OQMKLO6R.js → update_file-CYGKZXSH.js} +1 -1
- package/dist/chunks/{usage-2WRVNL44.js → usage-IR23BYQX.js} +1 -1
- package/dist/chunks/{usageServer-6XH36WK3.js → usageServer-ZYJCDO27.js} +1 -1
- package/dist/chunks/view_file-I77KYUO5.js +1 -0
- package/dist/chunks/{web_scrape-KBKSNVBI.js → web_scrape-MW6YSZ7L.js} +1 -1
- package/dist/chunks/{web_search-HACFAHXR.js → web_search-NT3HXUO3.js} +1 -1
- package/dist/chunks/{write_docx-M5RMUI4W.js → write_docx-E3MTFXTQ.js} +1 -1
- package/dist/chunks/{write_file-2ZFCDYSW.js → write_file-TZ2Q6CEB.js} +1 -1
- package/dist/chunks/{write_pdf-E5HQYOTR.js → write_pdf-26OQPNEP.js} +1 -1
- package/dist/cli.js +13 -13
- package/dist/package.json +2 -2
- package/flux-flow.cjs +17 -17
- package/package.json +2 -2
- package/dist/chunks/ai-JI4UX2WD.js +0 -1
- package/dist/chunks/app-3NZMHG65.js +0 -331
- package/dist/chunks/chunk-2VV5ZE53.js +0 -41
- package/dist/chunks/chunk-FSE4BZZZ.js +0 -1
- package/dist/chunks/chunk-L3W2X74K.js +0 -1
- package/dist/chunks/chunk-M2ULCOL3.js +0 -2
- package/dist/chunks/chunk-M4GC3CRN.js +0 -919
- package/dist/chunks/settings-5R5ADGXX.js +0 -1
- package/dist/chunks/view_file-TZD6DAER.js +0 -1
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-PTFCY2D5.js";import{a as R}from"./chunk-HFTI3R3Q.js";import"./chunk-26BQ45XP.js";var P=async function*(m,_,N,D,d,j,b,O,$=1){let y=[];D&&y.push({role:"system",content:D});for(let r of N){let x=r.role==="user"?"user":"assistant",e=[];if(Array.isArray(r.parts)){for(let o of r.parts)if(o.text)e.push({type:"text",text:o.text});else if(o.inlineData&&b){let i=o.inlineData.mimeType,c=o.inlineData.data;i.startsWith("image/")&&e.push({type:"image_url",image_url:{url:`data:${i};base64,${c}`}})}}else{let o=r.text||"";o&&e.push({type:"text",text:o})}y.push({role:x,content:e.length===1&&e[0].type==="text"?e[0].text:e})}let k=R("9router",_,d)||R("9Router",_,d),w=k!==null?k:{Fast:"none",Low:"low",Medium:"medium",Standard:"medium",High:"high",xHigh:"high"}[d],U={model:_,messages:y,stream:!0,stream_options:{include_usage:!0},temperature:$,tools:[],tool_choice:"none"};w&&w!=="none"&&(k!==null||d!=="Fast")&&(U.reasoning_effort=w);let v=(process.env["9ROUTER_URL"]||process.env.NINEROUTER_URL||"http://127.0.0.1:20128/v1").trim(),l=v.replace(/\/+$/,"");if(!l.endsWith("/v1")&&!l.endsWith("/v1/chat/completions"))throw new Error(`Invalid 9Router URL: "${v}". Endpoint URL MUST end with /v1 (e.g. http://127.0.0.1:20128/v1 or https://.../v1).`);let A=l.endsWith("/chat/completions")?l:`${l}/chat/completions`,C={"Content-Type":"application/json"},L=m&&m!=="LOCAL"?m:process.env.NINEROUTER_KEY||"dummy-key";C.Authorization=`Bearer ${L}`;let u=await M(A,{method:"POST",headers:C,body:JSON.stringify(U),signal:O});if(!u.ok){let r=await u.json().catch(()=>({}));throw new Error(`9router Error (${u.status}): ${r.error?.message||u.statusText}`)}let S=u.body.getReader(),W=new TextDecoder,T="",t=[],p=null,h=Date.now(),a=!1;for(;;){let{done:r,value:x}=await S.read();if(r){a&&(t.length>0||p)&&(yield{candidates:t.length>0?[{content:{parts:t}}]:[],usageMetadata:p});break}T+=W.decode(x,{stream:!0});let e=T.split(`
|
|
2
2
|
`);T=e.pop();for(let o of e){let i=o.trim();if(!i||!i.startsWith("data: "))continue;let c=!1;if(i==="data: [DONE]")c=!0;else try{let f=JSON.parse(i.substring(6)),n=f.choices?.[0]?.delta,s=f.usage;if(f.choices?.[0]?.finish_reason&&(c=!0),s&&(p={totalTokenCount:s.total_tokens||(s.prompt_tokens||0)+(s.completion_tokens||0),promptTokenCount:s.prompt_tokens||0,candidatesTokenCount:s.completion_tokens||0,cachedContentTokenCount:s.prompt_tokens_details?.cached_tokens||0,thoughtsTokenCount:s.completion_tokens_details?.reasoning_tokens||s.reasoning_tokens||0},a=!0),n){let g=n.reasoning_content||n.reasoning||n.thinking||null;!g&&Array.isArray(n.reasoning_details)&&n.reasoning_details.length>0&&(g=n.reasoning_details.map(E=>typeof E=="string"?E:E?.text||"").filter(Boolean).join("")),g&&(t.push({text:g,thought:!0}),a=!0),n.content&&(t.push({text:n.content}),a=!0)}}catch{}if((c||Date.now()-h>=150)&&a&&(yield{candidates:t.length>0?[{content:{parts:[...t]}}]:[],usageMetadata:p},t=[],h=Date.now(),a=!1),c)break}Date.now()-h>=150&&a&&(yield{candidates:t.length>0?[{content:{parts:[...t]}}]:[],usageMetadata:p},t=[],h=Date.now(),a=!1)}};export{P as getNineRouterStream};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,d as m}from"./chunk-
|
|
1
|
+
import{c as i,d as m}from"./chunk-P5HBJA23.js";import{k as n}from"./chunk-26BQ45XP.js";var y=async(a,u={})=>{let s=(r=>{let t=new RegExp(`${r}\\s*[:=]\\s*(["'])(.*?)\\1(?=\\s*[,)]|\\s+\\w+\\s*[:=]|$)`,"s"),o=a.match(t);return o?o[2].trim():null})("id");if(!s)return"ERROR: Missing 'id' parameter for addMemScore tool.";try{let r=i(n,[]),t=!1,o=[];for(let e of r)e.score===void 0&&(e.score=.5),e.id===s?(e.score=Math.min(2,e.score+.2),t=!0):(e.score*=.98,e.score<.05&&(e.score=0)),e.score=Math.round(e.score*1e5)/1e5,e.score>0&&o.push(e);if(m(n,o),!t)return`WARNING: Memory ID [${s}] not found. Other memories decayed by -0.01.`;let c=o.find(e=>e.id===s),f=c?c.score.toFixed(2):"deleted (score <= 0)",d=r.length-o.length;return`Adjusted memory scores. Target [${s}] is now ${f}.${d>0?` Purged ${d} decayed memories.`:""}`}catch(r){let t=r instanceof Error?r.message:String(r);return`ERROR: Failed to adjust memory score for [${s}]: ${t}`}};export{y as addMemScore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as r,B as s,C as t,k as b,l as c,m as d,n as e,o as f,p as g,q as h,r as i,s as j,t as k,u as l,v as m,w as n,x as o,y as p,z as q}from"./chunk-HIP66OBL.js";import"./chunk-HFTI3R3Q.js";import"./chunk-52STSLCN.js";import"./chunk-56EJGQU3.js";import"./chunk-M46I73DX.js";import"./chunk-IUN7DBB4.js";import"./chunk-6H2P5XUL.js";import"./chunk-6EYQQ7GQ.js";import"./chunk-4BLSASW6.js";import"./chunk-Y5JU726N.js";import"./chunk-FXRFFNRK.js";import"./chunk-IXXTQAO2.js";import"./chunk-EUNKA2MP.js";import{l as a}from"./chunk-KMOTPBF5.js";import"./chunk-P5HBJA23.js";import"./chunk-26BQ45XP.js";export{c as RE_LEADING_THINK,q as compressHistory,b as convertChannelThinkTags,r as deleteChatSummary,e as findGenuineThinkClose,p as generateSimpleContent,s as getAIStream,j as getCleanGroupedLength,m as getGoogleClient,f as getLeadingThinkBlock,o as initAI,d as isInsideBacktick,a as isModelMultimodal,l as isTerminationSignaled,n as runJanitorTask,t as runSubagent,k as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags,i as stripTrailingFluffAfterTools};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-PTFCY2D5.js";import{a as T}from"./chunk-HFTI3R3Q.js";import"./chunk-26BQ45XP.js";var P=async function*(M,g,C,_,k,I,A,E,H=1){let d=[];_&&d.push({role:"system",content:_});for(let s of C){let m=s.role==="user"?"user":"assistant",e=[];if(Array.isArray(s.parts)){for(let o of s.parts)if(o.text)e.push({type:"text",text:o.text});else if(o.inlineData&&A){let i=o.inlineData.mimeType,r=o.inlineData.data;i.startsWith("image/")&&e.push({type:"image_url",image_url:{url:`data:${i};base64,${r}`}})}}else{let o=s.text||"";o&&e.push({type:"text",text:o})}d.push({role:m,content:e.length===1&&e[0].type==="text"?e[0].text:e})}let x=T("AIHubMix",g,k),y=x!==null?x:{Fast:"minimal",Low:"low",Medium:"medium",Standard:"medium",High:"high",xHigh:"high"}[k],w={model:g,messages:d,stream:!0,stream_options:{include_usage:!0},temperature:H,tools:[],tool_choice:"none"};y&&(w.reasoning_effort=y);let c=await b("https://aihubmix.com/v1/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${M}`,"Content-Type":"application/json"},body:JSON.stringify(w),signal:E});if(!c.ok){let s=await c.json().catch(()=>({}));throw new Error(`AIHubMix Error (${c.status}): ${s.error?.message||c.statusText}`)}let S=c.body.getReader(),$=new TextDecoder,h="",t=[],l=null,f=Date.now(),a=!1;for(;;){let{done:s,value:m}=await S.read();if(s){a&&(t.length>0||l)&&(yield{candidates:t.length>0?[{content:{parts:t}}]:[],usageMetadata:l});break}h+=$.decode(m,{stream:!0});let e=h.split(`
|
|
2
2
|
`);h=e.pop();for(let o of e){let i=o.trim();if(!i||!i.startsWith("data: "))continue;let r=!1;if(i==="data: [DONE]")r=!0;else try{let u=JSON.parse(i.substring(6)),p=u.choices?.[0]?.delta,n=u.usage;if(u.choices?.[0]?.finish_reason&&(r=!0),n&&(l={totalTokenCount:n.total_tokens||(n.prompt_tokens||0)+(n.completion_tokens||0),promptTokenCount:n.prompt_tokens||0,candidatesTokenCount:n.completion_tokens||0,cachedContentTokenCount:n.prompt_tokens_details?.cached_tokens||0,thoughtsTokenCount:n.completion_tokens_details?.reasoning_tokens||n.reasoning_tokens||0},a=!0),p){let D=p.reasoning_content||null;D&&(t.push({text:D,thought:!0}),a=!0),p.content&&(t.push({text:p.content}),a=!0)}}catch{}if((r||Date.now()-f>=150)&&a&&(yield{candidates:t.length>0?[{content:{parts:[...t]}}]:[],usageMetadata:l},t=[],f=Date.now(),a=!1),r)break}Date.now()-f>=150&&a&&(yield{candidates:t.length>0?[{content:{parts:[...t]}}]:[],usageMetadata:l},t=[],f=Date.now(),a=!1)}};export{P as getAIHubMixStream};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-PTFCY2D5.js";import{a as A}from"./chunk-HFTI3R3Q.js";import"./chunk-26BQ45XP.js";var H=async function*(b,_,E,x,y,j,C,M,I=1){let g=[];x&&g.push({role:"system",content:x});for(let o of E){let m=o.role==="user"?"user":"assistant",e=[];if(Array.isArray(o.parts)){for(let n of o.parts)if(n.text)e.push({type:"text",text:n.text});else if(n.inlineData&&C){let i=n.inlineData.mimeType,p=n.inlineData.data;i.startsWith("image/")&&e.push({type:"image_url",image_url:{url:`data:${i};base64,${p}`}})}}else{let n=o.text||"";n&&e.push({type:"text",text:n})}g.push({role:m,content:e.length===1&&e[0].type==="text"?e[0].text:e})}let k=A("APInex",_,y),w=k!==null?k:{Fast:"low",Low:"low",Medium:"medium",Standard:"medium",High:"high",xHigh:"high"}[y],T={model:_,messages:g,stream:!0,stream_options:{include_usage:!0},temperature:I,tools:[],tool_choice:"none"};w&&(T.reasoning_effort=w);let F=process.env.APINEX_URL||"https://api.apinex.bond/v1/chat/completions",D={"Content-Type":"application/json","X-Title":"Flux-Flow","User-Agent":"Flux-Flow","HTTP-Referer":"https://fluxflow-cli.onrender.com/"},N=b||process.env.APINEX_API_KEY||"";D.Authorization=`Bearer ${N}`;let l=await P(F,{method:"POST",headers:D,body:JSON.stringify(T),signal:M});if(!l.ok){let o=await l.json().catch(()=>({}));throw new Error(`APInex Error (${l.status}): ${o.error?.message||o.message||l.statusText}`)}let v=l.body.getReader(),S=new TextDecoder,h="",t=[],c=null,u=Date.now(),s=!1;for(;;){let{done:o,value:m}=await v.read();if(o){s&&(t.length>0||c)&&(yield{candidates:t.length>0?[{content:{parts:t}}]:[],usageMetadata:c});break}h+=S.decode(m,{stream:!0});let e=h.split(`
|
|
2
2
|
`);h=e.pop();for(let n of e){let i=n.trim();if(!i||!i.startsWith("data: "))continue;let p=!1;if(i==="data: [DONE]")p=!0;else try{let d=JSON.parse(i.substring(6)),r=d.choices?.[0]?.delta,a=d.usage;if(a&&(c={totalTokenCount:a.total_tokens||(a.prompt_tokens||0)+(a.completion_tokens||0),promptTokenCount:a.prompt_tokens||0,candidatesTokenCount:a.completion_tokens||0,cachedContentTokenCount:a.prompt_tokens_details?.cached_tokens||0,thoughtsTokenCount:a.completion_tokens_details?.reasoning_tokens||a.reasoning_tokens||0},s=!0),r){let f=r.reasoning_content||r.reasoning||null;!f&&Array.isArray(r.reasoning_details)&&r.reasoning_details.length>0&&(f=r.reasoning_details.map($=>$.text||"").filter(Boolean).join("")),f&&(t.push({text:f,thought:!0}),s=!0),r.content&&(t.push({text:r.content}),s=!0)}}catch{}if((p||Date.now()-u>=150)&&s&&(yield{candidates:t.length>0?[{content:{parts:[...t]}}]:[],usageMetadata:c},t=[],u=Date.now(),s=!1),p)break}Date.now()-u>=150&&s&&(yield{candidates:t.length>0?[{content:{parts:[...t]}}]:[],usageMetadata:c},t=[],u=Date.now(),s=!1)}};export{H as getAPInexStream};
|