fluxflow-cli 4.27.2 → 4.29.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 +2 -2
- package/dist/chunks/9router-4EJCHCIO.js +2 -0
- package/dist/chunks/{ai-MITVDGLH.js → ai-3TOJ2MCJ.js} +1 -1
- package/dist/chunks/app-P5THRXWH.js +299 -0
- package/dist/chunks/chunk-46DTZUUE.js +893 -0
- package/dist/chunks/chunk-53AFLLUU.js +41 -0
- package/dist/chunks/chunk-63V6P5DU.js +1 -0
- package/dist/chunks/{chunk-OVAMHM6C.js → chunk-7RRLGIGO.js} +1 -1
- package/dist/chunks/{chunk-Z2DWLMRC.js → chunk-B4A6DCXB.js} +1 -1
- package/dist/chunks/{chunk-QNUIT5G4.js → chunk-BEJW3JGZ.js} +1 -1
- package/dist/chunks/chunk-KHCAQOSP.js +1 -0
- package/dist/chunks/{chunk-37QHXCGM.js → chunk-RSLAMTAV.js} +1 -1
- package/dist/chunks/chunk-RVCMZTHS.js +1 -0
- package/dist/chunks/{click-BIP2KIKK.js → click-AHOXSDH6.js} +2 -2
- package/dist/chunks/{computer_action-W532LBFE.js → computer_action-NNJOTL7H.js} +1 -1
- package/dist/chunks/custom_openai-VP2CSZUQ.js +3 -0
- package/dist/chunks/{drag-XXDYAMBU.js → drag-SOCUV5Z7.js} +1 -1
- package/dist/chunks/{generate_image-G4RCNVPH.js → generate_image-BU3BYQYC.js} +1 -1
- package/dist/chunks/infron-RO25LZEE.js +2 -0
- package/dist/chunks/{invoke-EEIA3QTL.js → invoke-HLIC6ABO.js} +2 -2
- package/dist/chunks/{invokeSync-Z277KUKJ.js → invokeSync-FNEIF7CS.js} +2 -2
- package/dist/chunks/{key_press-EJFHIVWP.js → key_press-A5PRGC7E.js} +1 -1
- package/dist/chunks/{keyboard_typing-4M63JGZ4.js → keyboard_typing-OGUSR6BH.js} +1 -1
- package/dist/chunks/{mistral-7PATNJTO.js → mistral-N6352JPY.js} +1 -1
- package/dist/chunks/{model_config-YD5AWI33.js → model_config-EN3OYDPU.js} +1 -1
- package/dist/chunks/nvidia-L6QMFBL3.js +2 -0
- package/dist/chunks/{screen_grid-BK5KF7MP.js → screen_grid-VV7JGWQB.js} +1 -1
- package/dist/chunks/{scroll-5V7P3DXY.js → scroll-JDGCDDUB.js} +1 -1
- package/dist/chunks/{secrets-4GLUJF7A.js → secrets-UNXNDOLK.js} +1 -1
- package/dist/chunks/{settings-RB45GKVI.js → settings-EMTQHDIH.js} +1 -1
- package/dist/chunks/{update_file-FUWOJ4JN.js → update_file-WBHNB4AY.js} +1 -1
- package/dist/chunks/{usage-VL7YBDD6.js → usage-6B7WSR44.js} +1 -1
- package/dist/chunks/usageServer-5ID7XHPC.js +1 -0
- package/dist/chunks/{write_file-HH7WRRDJ.js → write_file-LSRYHZN6.js} +1 -1
- package/dist/cli.js +11 -11
- package/dist/model_config.json +2 -1
- package/dist/package.json +2 -2
- package/model_config.json +2 -1
- package/package.json +2 -2
- package/dist/chunks/9router-J5GHSSMY.js +0 -2
- package/dist/chunks/app-MUOV5KOQ.js +0 -287
- package/dist/chunks/chunk-6NWU3ML6.js +0 -48
- package/dist/chunks/chunk-HM3CMNOJ.js +0 -1
- package/dist/chunks/chunk-QWTKV7Q4.js +0 -1
- package/dist/chunks/chunk-ZASTARPE.js +0 -881
- package/dist/chunks/chunk-ZLWYMCCW.js +0 -1
- package/dist/chunks/infron-6QUT2E5V.js +0 -2
- package/dist/chunks/nvidia-FORTI2DZ.js +0 -2
- package/dist/chunks/usageServer-H652FHPA.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as u}from"./chunk-QWTKV7Q4.js";import{e as m,f as c}from"./chunk-L3W2X74K.js";import{b as s}from"./chunk-DSVLWYIT.js";import n from"fs-extra";import g from"path";var r={mode:"Flux",display:0,thinkingLevel:"Medium",aiProvider:"Google",activeModel:u("Google","Free")||"gemma-4-31b-it",showFullThinking:!0,apiTier:"Free",quotas:{agentLimit:999999,backgroundLimit:999999,searchLimit:100,customModelId:"",customLimit:0,providerTiers:{Google:"Free",DeepSeek:"Free",NVIDIA:"Free",OpenRouter:"Free",InferX:"Free",SenseNova:"Free",Poolside:"Free",ExpLabs:"Free",TokenHarbor:"Free",Infron:"Free",APInex:"Free"}},systemSettings:{memory:!1,theme:"Dark",compression:0,autoExec:!0,allowExternalAccess:!1,advanceRollback:!1,autoDeleteHistory:"7d",useExternalData:!1,externalDataPath:"",preserveThinking:!0,loadingPhrases:!0,progressiveRendering:!0,showTPMEstimate:!0,subAgents:!1,CustomSubAgent:!1,SubAgentModel:"Default",SubAgentProvider:"",dynamicDirAwareness:!1,indentationTree:!0,ollamaEndpoint:"Cloud",compressToolResults:!1,autoTruncateResults:!0,imageHistoryCU:"Standard",contextLength:"256k",keepReasoningContext:!1,autoExcludeMetadata:!1,disableTodo:!1},profileData:{name:null,nickname:null,instructions:null},imageSettings:{keyType:"Default",quality:"Low-High",apiKey:""}},f=async()=>{let t={...r};try{if(await n.exists(s)){let e=m(s);if(e.imageSettings&&e.imageSettings.apiKey)try{let a=e.imageSettings.apiKey,{saveSecret:i}=await import("./secrets-4GLUJF7A.js");await i("POLLINATIONS_API_KEY",a),e.imageSettings.apiKey="",c(s,e)}catch{}t={...r,...e,quotas:{...r.quotas,...e.quotas,providerTiers:{...r.quotas.providerTiers,...e.quotas?.providerTiers||{}}},systemSettings:{...r.systemSettings,...e.systemSettings},profileData:{...r.profileData,...e.profileData},imageSettings:{...r.imageSettings,...e.imageSettings}}}}catch(e){console.error("Failed to load settings:",e)}try{let{getSecret:e}=await import("./secrets-4GLUJF7A.js"),a=await e("POLLINATIONS_API_KEY");a&&(t.imageSettings.apiKey=a)}catch{}if(t.showFullThinking===!1){t.showFullThinking=!0;try{c(s,t)}catch{}}return t},S=async t=>{let{FLUXFLOW_DIR:e}=await import("./paths-2EXHWUSL.js"),a=["logs","secret"];for(let i of a){let l=g.join(e,i),o=g.join(t,i);try{await n.exists(l)&&(await n.ensureDir(o),await n.copy(l,o,{overwrite:!0}))}catch(d){console.error(`Migration failed for ${i}:`,d)}}},D=async t=>{try{let e=await f();if(!e.systemSettings.useExternalData&&t.systemSettings?.useExternalData&&t.systemSettings?.externalDataPath&&await S(t.systemSettings.externalDataPath),t.imageSettings&&t.imageSettings.apiKey!==void 0){let{saveSecret:i,removeSecret:l}=await import("./secrets-4GLUJF7A.js"),o=t.imageSettings.apiKey;o?await i("POLLINATIONS_API_KEY",o):await l("POLLINATIONS_API_KEY")}let a={...e,...t};return a.systemSettings&&(a.systemSettings.dynamicDirAwareness=!1),a.imageSettings&&(a.imageSettings={...a.imageSettings,apiKey:""}),await n.ensureDir(g.dirname(s)),c(s,a),!0}catch(e){return console.error("Failed to save settings:",e),!1}};export{f as a,D as b};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as C}from"./chunk-NL4MAQSB.js";import{a as b}from"./chunk-JS5ZIGFR.js";import"./chunk-DSVLWYIT.js";var B=async function*(F,_,M,y,k,S,N,A,E=1){let g=[];y&&g.push({role:"system",content:y});for(let o of M){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&&N){let i=n.inlineData.mimeType,u=n.inlineData.data;i.startsWith("image/")&&e.push({type:"image_url",image_url:{url:`data:${i};base64,${u}`}})}}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 x=b("Infron",_,k),w=x!==null?x:{Fast:"none",Low:"low",Medium:"medium",Standard:"medium",High:"high",xHigh:"high"}[k],T={model:_,messages:g,stream:!0,stream_options:{include_usage:!0},temperature:E,tools:[],tool_choice:"none"};w&&(T.reasoning={effort:w});let I=process.env.INFRON_URL||"https://llm.onerouter.pro/v1/chat/completions",D={"Content-Type":"application/json","X-Title":"Flux-Flow","User-Agent":"Flux-Flow","HTTP-Referer":"https://fluxflow-cli.onrender.com/"},O=F||process.env.INFRON_API_KEY||"";D.Authorization=`Bearer ${O}`;let l=await C(I,{method:"POST",headers:D,body:JSON.stringify(T),signal:A});if(!l.ok){let o=await l.json().catch(()=>({}));throw new Error(`Infron Error (${l.status}): ${o.error?.message||o.message||l.statusText}`)}let v=l.body.getReader(),P=new TextDecoder,h="",t=[],c=null,f=Date.now(),a=!1;for(;;){let{done:o,value:m}=await v.read();if(o){a&&(t.length>0||c)&&(yield{candidates:t.length>0?[{content:{parts:t}}]:[],usageMetadata:c});break}h+=P.decode(m,{stream:!0});let e=h.split(`
|
|
2
|
-
`);h=e.pop();for(let n of e){let i=n.trim();if(!i||!i.startsWith("data: "))continue;let u=!1;if(i==="data: [DONE]")u=!0;else try{let p=JSON.parse(i.substring(6)),r=p.choices?.[0]?.delta,s=p.usage;if(s&&(c={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),r){let d=r.reasoning_content||r.reasoning||null;!d&&Array.isArray(r.reasoning_details)&&r.reasoning_details.length>0&&(d=r.reasoning_details.map(R=>R.text||"").filter(Boolean).join("")),d&&(t.push({text:d,thought:!0}),a=!0),r.content&&(t.push({text:r.content}),a=!0)}}catch{}if((u||Date.now()-f>=150)&&a&&(yield{candidates:t.length>0?[{content:{parts:[...t]}}]:[],usageMetadata:c},t=[],f=Date.now(),a=!1),u)break}Date.now()-f>=150&&a&&(yield{candidates:t.length>0?[{content:{parts:[...t]}}]:[],usageMetadata:c},t=[],f=Date.now(),a=!1)}};export{B as getInfronStream};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as j}from"./chunk-NL4MAQSB.js";import{a as R}from"./chunk-JS5ZIGFR.js";import{k as K}from"./chunk-QWTKV7Q4.js";import"./chunk-DSVLWYIT.js";var le=async function*(H,e,k,c,g,S,w=!1,I,M=1){let D=[];c&&D.push({role:"system",content:c}),k.forEach(i=>{let x=i.role==="model"?"assistant":"user",m=[];Array.isArray(i.parts)&&i.parts.forEach(u=>{if(u.text)m.push({type:"text",text:u.text});else if(u.inlineData&&w){let r=u.inlineData.mimeType,f=u.inlineData.data;r.startsWith("image/")&&K(e)&&m.push({type:"image_url",image_url:{url:`data:${r};base64,${f}`}})}}),D.push({role:x,content:m.length===1&&m[0].type==="text"?m[0].text:m})});let A=R("NVIDIA",e,g),t=A!==null?A:{Fast:"Fast",Low:"Fast",Medium:"Standard",Standard:"Standard",High:"High",xHigh:"High"}[g]||"High",o=t!=="Fast"&&t!=="none"&&t!=="disabled"&&t!==!1,s=e.includes("kimi"),n=e.includes("gemma"),h=e.includes("deepseek"),y=e.includes("glm"),z=e.includes("mistral"),$=e.includes("minimax"),J=e.includes("gpt"),W=e.includes("qwen"),Y=e.includes("nemotron"),Q=e.includes("llama-3"),X=e.includes("seed"),B=e.includes("poolside"),C=e.includes("thinkingmachines")||e.includes("muse"),Z=Q,ee={Fast:"low",Low:"low",Medium:"medium",Standard:"medium",High:"high",xHigh:"high"},te={Fast:"64",Low:"64",Medium:"4096",Standard:"4096",High:"16384",xHigh:"16384"},se={Fast:"none",Low:"minimal",Medium:"medium",Standard:"medium",High:"max",xHigh:"max"},V=$||h||B||C?16384:32768;V=process.env.NVIDIA_BASE_URL?1024:V;let a={model:e,messages:D,max_tokens:V,stream:!0,stream_options:{include_usage:!0},temperature:M,tools:[],tool_choice:"none",...J&&{thinking:ee[g]||"high"}};if(!(process.env.NVIDIA_BASE_URL||Z))if(s)a.chat_template_kwargs={thinking:o};else if(n)a.chat_template_kwargs={enable_thinking:o};else if(h)if(o){let i=t==="High"?"max":"high";a.chat_template_kwargs={thinking:!0,reasoning_effort:i}}else a.chat_template_kwargs={thinking:!1};else y?a.chat_template_kwargs={enable_thinking:o,clear_thinking:!o}:z?a.reasoning_effort=o?"high":"none":$&&e.includes("minimax-m3")?a.chat_template_kwargs={thinking_mode:o?"enabled":"disabled"}:W?a.chat_template_kwargs={enable_thinking:o}:Y?t==="High"?a.chat_template_kwargs={enable_thinking:!0}:t==="Standard"?a.chat_template_kwargs={enable_thinking:!0,medium_effort:!0}:a.chat_template_kwargs={enable_thinking:!1}:X?o&&(a.extra_body={thinking_budget:parseInt(te[t]??"4096")}):B?a.chat_template_kwargs={enable_thinking:o}:C&&(a.reasoning_effort=se[t]||"medium");let q=0,G=6,P=!1,T=process.env.NVIDIA_BASE_URL||"https://integrate.api.nvidia.com/v1/chat/completions",ne=process.env.NVIDIA_API_KEY&&process.env.NVIDIA_BASE_URL?process.env.NVIDIA_API_KEY:H;for(T.endsWith("/chat/completions")||(T=T.replace(/\/+$/,"")+"/chat/completions");q<G;){q++;try{let i=await j(T,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ne}`},body:JSON.stringify(a),signal:I});if(!i.ok){let b=await i.text().catch(()=>""),v=i.statusText;try{let d=JSON.parse(b);v=d.error?.message||d.message||JSON.stringify(d.detail||d)}catch{b&&(v=b)}let N=new Error(`NVIDIA API Error (${i.status}): ${v}`);throw N.status=i.status,N}let x=i.body.getReader(),m=new TextDecoder,u="",r=[],f=null,U=Date.now(),_=!1;for(;;){let{done:b,value:v}=await x.read();if(b){_&&(r.length>0||f)&&(yield{candidates:r.length>0?[{content:{parts:r}}]:[],usageMetadata:f},P=!0);break}u+=m.decode(v,{stream:!0});let N=u.split(`
|
|
2
|
-
`);u=N.pop();let d=!1;for(let ae of N){let E=ae.trim();if(E){if(E==="data: [DONE]"){d=!0;break}if(E.startsWith("data: ")){let p;try{p=JSON.parse(E.substring(6))}catch{continue}if(p.error)throw new Error(`NVIDIA Stream Error: ${p.error.message||JSON.stringify(p.error)}`);try{let l=p.usage;l&&(f={totalTokenCount:l.total_tokens||l.prompt_tokens+l.completion_tokens,promptTokenCount:l.prompt_tokens||0,candidatesTokenCount:l.completion_tokens||0,cachedContentTokenCount:l.prompt_tokens_details?.cached_tokens||0,thoughtsTokenCount:(l.completion_tokens_details?.reasoning_tokens||0)+(l.completion_tokens_details?.thoughts_tokens||0)},_=!0);let F=p.choices?.[0]?.delta?.reasoning||p.choices?.[0]?.delta?.reasoning_content||"",O=p.choices?.[0]?.delta?.content||"";F&&(r.push({text:F,thought:!0}),_=!0),O&&(r.push({text:O}),_=!0)}catch{}}}}if((d||Date.now()-U>=350)&&_&&(yield{candidates:r.length>0?[{content:{parts:[...r]}}]:[],usageMetadata:f},P=!0,r=[],U=Date.now(),_=!1),d)break}break}catch(i){if(P||q>=G)throw i;await new Promise(x=>setTimeout(x,3500))}}},ce=async function*(H,e){let k=[],c=null,g=!1,S=null,w=s=>{if(k.push(s),c){let n=c;c=null,n()}},I=e.split("/").pop(),M=Array.from(new Set([I,I.replace(/\./g,"-"),I.replace(/\./g,"_")])),A=["https://buildapi.ngc.nvidia.com/v2/predict/queues/models/qc69jvmznzxy","https://api.ngc.nvidia.com/v2/predict/queues/models/qc69jvmznzxy"].flatMap(s=>M.map(n=>`${s}/${n}`)),L=!1,t=null,o=async()=>{try{let n=await(await Promise.any(A.map(async h=>{let y=await fetch(h);if(!y.ok)throw new Error(`HTTP ${y.status}`);return y}))).json();if(n&&n.queues&&n.queues[0]&&typeof n.queues[0].queueDepth=="number"){let h=n.queues[0].queueDepth;L||w({value:{type:"status",content:`Queue ${h||1}`},done:!1})}}catch{}};process.env.NVIDIA_BASE_URL||(o(),t=setInterval(o,5e3)),(async()=>{try{let s=H[Symbol.asyncIterator]();for(;;){let{value:n,done:h}=await s.next();if(h)break;L=!0,t&&(clearInterval(t),t=null),w({value:n,done:!1})}g=!0,w(null)}catch(s){if(S=s,t&&(clearInterval(t),t=null),c){let n=c;c=null,n()}}})();try{for(;;){if(S)throw S;if(k.length>0){let s=k.shift();if(s===null&&g)break;yield s.value}else{if(g)break;await new Promise(s=>{c=s})}}}finally{t&&(clearInterval(t),t=null)}};export{le as getNVIDIAStream,ce as wrapNvidiaStreamWithQueueDepth};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk-OVAMHM6C.js";import"./chunk-Z2DWLMRC.js";import"./chunk-ZLWYMCCW.js";import"./chunk-QWTKV7Q4.js";import"./chunk-L3W2X74K.js";import"./chunk-DSVLWYIT.js";export{b as openUsageDashboard,a as startUsageServer};
|