fluxflow-cli 4.38.0 → 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-E4LQZ5XF.js → 9router-LRFKCJF4.js} +1 -1
- package/dist/chunks/{ai-YQJYUPXQ.js → ai-Z2RCLVQR.js} +1 -1
- package/dist/chunks/{aihubmix-UBV5ARET.js → aihubmix-TETL5QYQ.js} +1 -1
- package/dist/chunks/{apinex-L3Y6BP6J.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/chunk-EUNKA2MP.js +1 -0
- package/dist/chunks/chunk-HIP66OBL.js +926 -0
- package/dist/chunks/{chunk-MQCO3GXM.js → chunk-IUN7DBB4.js} +15 -15
- package/dist/chunks/{chunk-QW6IGMYV.js → chunk-IXXTQAO2.js} +1 -1
- package/dist/chunks/{chunk-CZK3QF2C.js → chunk-M2LU3TCU.js} +1 -1
- package/dist/chunks/chunk-M46I73DX.js +42 -0
- package/dist/chunks/{chunk-77QN4HDY.js → chunk-MX5Q32YU.js} +1 -1
- 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-J7DMHVDU.js → click-O33RKVOZ.js} +2 -2
- package/dist/chunks/{computer_action-D52LLX3E.js → computer_action-BUZAZ3LJ.js} +1 -1
- package/dist/chunks/{custom_openai-S6YIOHQN.js → custom_openai-XMDYE7NM.js} +1 -1
- package/dist/chunks/{deepseek-CQRKTOL6.js → deepseek-WNWZJTNE.js} +1 -1
- package/dist/chunks/{drag-CMUD2ZB5.js → drag-BZRZLDLG.js} +1 -1
- package/dist/chunks/{exec_command-A5JWE55Q.js → exec_command-WB2PILWK.js} +1 -1
- package/dist/chunks/{explabs-6TWS34VQ.js → explabs-XHHXTERB.js} +1 -1
- package/dist/chunks/{generate_image-5D57XGLP.js → generate_image-N2SIC5BA.js} +1 -1
- package/dist/chunks/{inferx-A42H43ZV.js → inferx-HP5AGET3.js} +2 -2
- package/dist/chunks/{infron-NZI2FQFA.js → infron-ULXG7VDA.js} +1 -1
- package/dist/chunks/{invoke-4P5QQPCF.js → invoke-O2YAE4FY.js} +2 -2
- package/dist/chunks/{invokeSync-BSFWXLD7.js → invokeSync-URGZXNDC.js} +2 -2
- package/dist/chunks/{key_press-LWJGR25H.js → key_press-Y7F3VAKL.js} +1 -1
- package/dist/chunks/{keyboard_typing-A72GI7EW.js → keyboard_typing-IEVRWQJJ.js} +1 -1
- package/dist/chunks/{mistral-OXTDZX3G.js → mistral-XDIMWAU3.js} +1 -1
- package/dist/chunks/{nvidia-5DDRU422.js → nvidia-BN4YCFGY.js} +1 -1
- package/dist/chunks/{openrouter-YU3RE7RH.js → openrouter-6MRG4RT6.js} +1 -1
- package/dist/chunks/{poolside-H2NCP5XT.js → poolside-ODFAIK4C.js} +1 -1
- package/dist/chunks/{screen_grid-4Z2EBIB2.js → screen_grid-7APUBF2H.js} +1 -1
- package/dist/chunks/{scroll-LXQJ25NK.js → scroll-FIN5Z7W4.js} +1 -1
- package/dist/chunks/{search_keyword-ABVAWJKX.js → search_keyword-YLKWY2XH.js} +1 -1
- package/dist/chunks/{sensenova-UT5CZFCW.js → sensenova-3K44URJQ.js} +1 -1
- package/dist/chunks/settings-IGHDSHFT.js +1 -0
- package/dist/chunks/{tokenharbor-S66MGK52.js → tokenharbor-YV2GV2LM.js} +1 -1
- package/dist/chunks/{update_file-6F64CFSU.js → update_file-CYGKZXSH.js} +1 -1
- package/dist/chunks/{usage-WOYKJLZL.js → usage-IR23BYQX.js} +1 -1
- package/dist/chunks/{usageServer-3KLDOFIX.js → usageServer-ZYJCDO27.js} +1 -1
- package/dist/chunks/{write_file-JDMRLJKT.js → write_file-TZ2Q6CEB.js} +1 -1
- package/dist/cli.js +10 -10
- package/dist/package.json +2 -2
- package/package.json +2 -2
- package/dist/chunks/app-SIXVPE6Z.js +0 -331
- package/dist/chunks/chunk-EYTM4NZD.js +0 -41
- package/dist/chunks/chunk-IZQAF6KJ.js +0 -1
- package/dist/chunks/chunk-ZCXQPXVK.js +0 -919
- package/dist/chunks/settings-ZBXCJL25.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{A as
|
|
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};
|