fluxflow-cli 4.36.0 → 4.36.2
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/dist/chunks/{ai-DUQ7JTFT.js → ai-CADJB6OC.js} +1 -1
- package/dist/chunks/app-VYIYEEZN.js +323 -0
- package/dist/chunks/chunk-BGIZLZQF.js +1 -0
- package/dist/chunks/{chunk-EKTQJIFL.js → chunk-IS6NOF47.js} +1 -1
- package/dist/chunks/{chunk-HWQD4HC4.js → chunk-OA7SWSBR.js} +1 -1
- package/dist/chunks/{chunk-PUCRX3HD.js → chunk-PQINB4JW.js} +5 -5
- package/dist/chunks/{chunk-NXGWQV2R.js → chunk-QWEEC3PP.js} +1 -1
- package/dist/chunks/{chunk-ARVJHIPP.js → chunk-QYNGDXPT.js} +1 -1
- package/dist/chunks/{click-YDLHTDEK.js → click-PNIGPARB.js} +2 -2
- package/dist/chunks/{computer_action-2JLV6MY4.js → computer_action-WORDXIQY.js} +1 -1
- package/dist/chunks/{drag-PUEGJCAB.js → drag-LC3MFJZ7.js} +1 -1
- package/dist/chunks/{generate_image-L2LXNTNE.js → generate_image-EKX5PUUR.js} +1 -1
- package/dist/chunks/{invoke-7S44ZFQY.js → invoke-AQ3E3T5N.js} +2 -2
- package/dist/chunks/{invokeSync-SAKOE3G5.js → invokeSync-AVVEKI3J.js} +2 -2
- package/dist/chunks/{key_press-KR2O7S6E.js → key_press-PDKXVENN.js} +1 -1
- package/dist/chunks/{keyboard_typing-V4ALD3BD.js → keyboard_typing-UTFSDB4P.js} +1 -1
- package/dist/chunks/{mistral-O5VGMA23.js → mistral-LNEFQAV5.js} +1 -1
- package/dist/chunks/{model_config-C72R7DKL.js → model_config-55WPIUYV.js} +1 -1
- package/dist/chunks/{nvidia-OVQSNJOT.js → nvidia-GMX2ROSD.js} +1 -1
- package/dist/chunks/{screen_grid-XZKZBWOH.js → screen_grid-PVVRYV5G.js} +1 -1
- package/dist/chunks/{scroll-YTLIQ6C5.js → scroll-UPGZCBPD.js} +1 -1
- package/dist/chunks/{settings-LO76WAO4.js → settings-GLFTNEAT.js} +1 -1
- package/dist/chunks/{update_file-HGCNRGTK.js → update_file-NBLTUYHL.js} +1 -1
- package/dist/chunks/{usage-MHRBABMW.js → usage-CAY5LYRU.js} +1 -1
- package/dist/chunks/{usageServer-YSHTV2E3.js → usageServer-PJOHIWJT.js} +44 -9
- package/dist/chunks/{write_file-A67UXLZ2.js → write_file-FZZRCU3L.js} +1 -1
- package/dist/cli.js +3 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/chunks/app-3RT5WIFW.js +0 -322
- package/dist/chunks/chunk-NJADNSYK.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as O,b as j,c as f}from"./chunk-NL4MAQSB.js";import{a as N}from"./chunk-JS5ZIGFR.js";import"./chunk-
|
|
1
|
+
import{a as O,b as j,c as f}from"./chunk-NL4MAQSB.js";import{a as N}from"./chunk-JS5ZIGFR.js";import"./chunk-BGIZLZQF.js";import"./chunk-DSVLWYIT.js";var X=async function*(M,T,B,b,m,K,E,J,P=1,W=null){let w=[];b&&w.push({role:"system",content:b});for(let t of B){let g=t.role==="user"?"user":"assistant",e=[];if(Array.isArray(t.parts)){for(let i of t.parts)if(i.text)e.push({type:"text",text:i.text});else if(i.inlineData&&E){let p=i.inlineData.mimeType,d=i.inlineData.data;p.startsWith("image/")&&e.push({type:"image_url",image_url:`data:${p};base64,${d}`})}}else{let i=t.text||"";i&&e.push({type:"text",text:i})}e.length>0&&w.push({role:g,content:e.length===1&&e[0].type==="text"?e[0].text:e})}let S={Fast:"none",Low:"none",Medium:"high",Standard:"high",High:"high",xHigh:"high"},F=`${M.slice(-5)}${W||""}${m}${T}`,H=await j(F),C={model:T,messages:w,stream:!0,temperature:P,prompt_cache_key:H,tools:[],tool_choice:"none"},h=N("Mistral",T,m);h!==null&&h!=="none"?h&&h!=="none"&&h!=="disabled"&&h!==!1&&(C.reasoning_effort=h):m&&S[m]!=="none"&&(C.reasoning_effort=S[m]||"high");let y=await O("https://api.mistral.ai/v1/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${M}`,"Content-Type":"application/json"},body:JSON.stringify(C),signal:J});if(!y.ok){let t=await y.text().catch(()=>""),g=y.statusText;try{let e=JSON.parse(t);g=e.error?.message||e.message||JSON.stringify(e.detail||e)}catch{t&&(g=t)}throw new Error(`Mistral Error (${y.status}): ${JSON.stringify(g)}`)}let R=y.body.getReader(),q=new TextDecoder,D="",n=[],x=null,k=Date.now(),r=!1,o=t=>t?typeof t=="string"?f(t):Array.isArray(t)?t.map(o).filter(Boolean).join(""):typeof t=="object"&&t!==null?typeof t.text=="string"?f(t.text):typeof t.content=="string"?f(t.content):typeof t.thinking=="string"?f(t.thinking):typeof t.reasoning_content=="string"?f(t.reasoning_content):typeof t.reasoning=="string"?f(t.reasoning):typeof t.value=="string"?f(t.value):t.text?o(t.text):t.content?o(t.content):t.thinking?o(t.thinking):t.reasoning_content?o(t.reasoning_content):t.reasoning?o(t.reasoning):t.value?o(t.value):"":f(String(t)):"";for(;;){let{done:t,value:g}=await R.read();if(t){r&&(n.length>0||x)&&(yield{candidates:n.length>0?[{content:{parts:n}}]:[],usageMetadata:x});break}D+=q.decode(g,{stream:!0});let e=D.split(`
|
|
2
2
|
`);D=e.pop();for(let i of e){let p=i.trim();if(!p||!p.startsWith("data: "))continue;let d=!1;if(p==="data: [DONE]")d=!0;else try{let _=JSON.parse(p.substring(6)),c=_.choices?.[0]?.delta,u=_.usage;if(_.choices?.[0]?.finish_reason&&(d=!0),u&&(x={totalTokenCount:u.total_tokens||(u.prompt_tokens||0)+(u.completion_tokens||0),promptTokenCount:u.prompt_tokens||0,candidatesTokenCount:u.completion_tokens||0,cachedContentTokenCount:u.prompt_tokens_details?.cached_tokens||0,thoughtsTokenCount:u.completion_tokens_details?.reasoning_tokens||0},r=!0),c){let z=c.thinking||c.reasoning_content||c.reasoning,$=o(z);$&&(n.push({text:$,thought:!0}),r=!0);let a=c.content||(!c.thinking&&!c.reasoning_content&&!c.reasoning?c.text:null);if(a)if(Array.isArray(a))for(let s of a)if(typeof s=="object"&&s!==null){let l=s.type==="thinking"||s.type==="reasoning"||!!s.thought,A=o(s);A&&(n.push({text:A,...l?{thought:!0}:{}}),r=!0)}else{let l=o(s);l&&(n.push({text:l}),r=!0)}else if(typeof a=="object"&&a!==null){let s=a.type==="thinking"||a.type==="reasoning"||!!a.thought,l=o(a);l&&(n.push({text:l,...s?{thought:!0}:{}}),r=!0)}else{let s=o(a);s&&(n.push({text:s}),r=!0)}}}catch{}if((d||Date.now()-k>=150)&&r&&(yield{candidates:n.length>0?[{content:{parts:[...n]}}]:[],usageMetadata:x},n=[],k=Date.now(),r=!1),d)break}Date.now()-k>=150&&r&&(yield{candidates:n.length>0?[{content:{parts:[...n]}}]:[],usageMetadata:x},n=[],k=Date.now(),r=!1)}};export{X as getMistralStream};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"./chunk-BGIZLZQF.js";import"./chunk-DSVLWYIT.js";export{a as DEFAULT_MODEL_CONFIG,o as getDefaultModel,q as getFallbackValue,b as getModelConfig,p as getModelPricing,n as getModels,m as hasModelReasoning,l as isModelMultimodal,h as removeModelFromProvider,i as renameModelInProvider,c as saveModelConfigToDisk,d as saveModelToProvider,j as setCustomMultimodal,g as setDefaultModelForProvider,f as setModelMultimodalInProvider,k as setOllamaMultimodal,e as updateModelInfoInProvider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as j}from"./chunk-NL4MAQSB.js";import{a as W}from"./chunk-JS5ZIGFR.js";import{l as K}from"./chunk-
|
|
1
|
+
import{a as j}from"./chunk-NL4MAQSB.js";import{a as W}from"./chunk-JS5ZIGFR.js";import{l as K}from"./chunk-BGIZLZQF.js";import"./chunk-DSVLWYIT.js";var ue=async function*(M,e,k,c,g,D,w=!1,I,H=1){let A=[];c&&A.push({role:"system",content:c}),k.forEach(i=>{let N=i.role==="model"?"assistant":"user",d=[];Array.isArray(i.parts)&&i.parts.forEach(u=>{if(u.text)d.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)&&d.push({type:"image_url",image_url:{url:`data:${r};base64,${f}`}})}}),A.push({role:N,content:d.length===1&&d[0].type==="text"?d[0].text:d})});let T=W("NVIDIA",e,g),t=T!==null?T:{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"),P=e.includes("minimax"),J=e.includes("gpt"),Y=e.includes("qwen"),Q=e.includes("nemotron"),X=e.includes("llama-3"),Z=e.includes("seed"),B=e.includes("poolside"),C=e.includes("thinkingmachines")||e.includes("muse"),ee=X,te={Fast:"low",Low:"low",Medium:"medium",Standard:"medium",High:"high",xHigh:"high"},se={Fast:"64",Low:"64",Medium:"4096",Standard:"4096",High:"16384",xHigh:"16384"},ne={Fast:"none",Low:"minimal",Medium:"medium",Standard:"medium",High:"max",xHigh:"max"},U=P||h||B||C?16384:32768;U=process.env.NVIDIA_BASE_URL?1024:U;let a={model:e,messages:A,max_tokens:U,stream:!0,stream_options:{include_usage:!0},temperature:H,tools:[],tool_choice:"none",...J&&{thinking:te[g]||"high"}};if(!(process.env.NVIDIA_BASE_URL||ee))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":P&&e.includes("minimax-m3")?a.chat_template_kwargs={thinking_mode:o?"enabled":"disabled"}:Y?a.chat_template_kwargs={enable_thinking:o}:Q?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}:Z?o&&(a.extra_body={thinking_budget:parseInt(se[t]??"4096")}):B?a.chat_template_kwargs={enable_thinking:o}:C&&(a.reasoning_effort=ne[t]||"medium");let V=0,G=6,$=!1,R=(process.env.NVIDIA_BASE_URL||"https://integrate.api.nvidia.com/v1").trim(),v=R.replace(/\/+$/,"");if(!v.endsWith("/v1")&&!v.endsWith("/v1/chat/completions"))throw new Error(`Invalid NVIDIA Base URL: "${R}". Endpoint URL MUST end with /v1 (e.g. https://integrate.api.nvidia.com/v1 or http://.../v1).`);let ae=v.endsWith("/chat/completions")?v:`${v}/chat/completions`,ie=process.env.NVIDIA_API_KEY&&process.env.NVIDIA_BASE_URL?process.env.NVIDIA_API_KEY:M;for(;V<G;){V++;try{let i=await j(ae,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ie}`},body:JSON.stringify(a),signal:I});if(!i.ok){let x=await i.text().catch(()=>""),S=i.statusText;try{let m=JSON.parse(x);S=m.error?.message||m.message||JSON.stringify(m.detail||m)}catch{x&&(S=x)}let b=new Error(`NVIDIA API Error (${i.status}): ${S}`);throw b.status=i.status,b}let N=i.body.getReader(),d=new TextDecoder,u="",r=[],f=null,q=Date.now(),_=!1;for(;;){let{done:x,value:S}=await N.read();if(x){_&&(r.length>0||f)&&(yield{candidates:r.length>0?[{content:{parts:r}}]:[],usageMetadata:f},$=!0);break}u+=d.decode(S,{stream:!0});let b=u.split(`
|
|
2
2
|
`);u=b.pop();let m=!1;for(let oe of b){let E=oe.trim();if(E){if(E==="data: [DONE]"){m=!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((m||Date.now()-q>=350)&&_&&(yield{candidates:r.length>0?[{content:{parts:[...r]}}]:[],usageMetadata:f},$=!0,r=[],q=Date.now(),_=!1),m)break}break}catch(i){if($||V>=G)throw i;await new Promise(N=>setTimeout(N,3500))}}},he=async function*(M,e){let k=[],c=null,g=!1,D=null,w=s=>{if(k.push(s),c){let n=c;c=null,n()}},I=e.split("/").pop(),H=Array.from(new Set([I,I.replace(/\./g,"-"),I.replace(/\./g,"_")])),T=["https://buildapi.ngc.nvidia.com/v2/predict/queues/models/qc69jvmznzxy","https://api.ngc.nvidia.com/v2/predict/queues/models/qc69jvmznzxy"].flatMap(s=>H.map(n=>`${s}/${n}`)),L=!1,t=null,o=async()=>{try{let n=await(await Promise.any(T.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=M[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(D=s,t&&(clearInterval(t),t=null),c){let n=c;c=null,n()}}})();try{for(;;){if(D)throw D;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{ue as getNVIDIAStream,he as wrapNvidiaStreamWithQueueDepth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-IS6NOF47.js";export{a as GRID_CONFIG,e as captureGriddedScreenshot,d as getActiveDisplay,g as gridToNativeCoordinates,f as parseGridCodeTo720p,c as rawModelOnly,b as useModel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-QYNGDXPT.js";import"./chunk-IS6NOF47.js";import{a as t}from"./chunk-Y5JU726N.js";var m=async(n,i={})=>{let o=t(n),e=(o.direction||"down").toLowerCase(),c=o.amount?parseInt(o.amount,10):6,s=o.gridId||o.grid||o.coordinate||o.target||o.id||null;return await r("scroll",s,{direction:e,amount:c})};export{m as scroll};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
import{a,b}from"./chunk-QWEEC3PP.js";import"./chunk-BGIZLZQF.js";import"./chunk-L3W2X74K.js";import"./chunk-DSVLWYIT.js";export{a as loadSettings,b as saveSettings};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as h,h as m,i as R}from"./chunk-4MDSKJGX.js";import{a as F}from"./chunk-FQBBOFNP.js";import{a as $}from"./chunk-Y5JU726N.js";import{a as g}from"./chunk-
|
|
1
|
+
import{g as h,h as m,i as R}from"./chunk-4MDSKJGX.js";import{a as F}from"./chunk-FQBBOFNP.js";import{a as $}from"./chunk-Y5JU726N.js";import{a as g}from"./chunk-QWEEC3PP.js";import"./chunk-BGIZLZQF.js";import"./chunk-L3W2X74K.js";import"./chunk-DSVLWYIT.js";import c from"fs";import P from"path";var j=async(w,y={})=>{let n=$(w),t=n.path;if(!t)return'ERROR: Missing "path" argument for PatchFile.';let{patchPairs:o,allowMultiple:E,error:p}=h(n);if(p)return`ERROR: ${p}`;if(o.length===0)return"ERROR: No valid replacement pairs found. Use searchContent1, newContent1, etc.";let M=n.allowMultiple!==void 0?n.allowMultiple===!0||String(n.allowMultiple).toLowerCase()==="true":E,i=P.resolve(process.cwd(),t);try{if(!c.existsSync(i))return`ERROR: File [${t}] does not exist. Use WriteFile instead.`;let e=y.forcedContent||c.readFileSync(i,"utf8");e.startsWith("\uFEFF")&&(e=e.slice(1));let s=e.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`),{content:u,results:l}=m(s,o,{allowMultiple:M}),a=l.filter(r=>!r.success),f=l.filter(r=>r.success);if(f.length===0)return`ERROR: Patch Failed to apply to [${t}].
|
|
4
4
|
${a.map(r=>` \u2022 ${r.error}`).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w}from"./chunk-OA7SWSBR.js";import"./chunk-QWEEC3PP.js";import"./chunk-BGIZLZQF.js";import"./chunk-L3W2X74K.js";import"./chunk-DSVLWYIT.js";export{n as addToUsage,c as calculateTokenCost,t as checkImageQuota,q as checkQuota,p as checkQuotaDetailed,e as forceFlushUsage,w as getAllUsageData,o as getCustomPeriodUsage,j as getDailyUsage,r as getImageQuotaBuckets,s as getImageQuotaLimit,u as getImageQuotaStats,k as getMonthlyUsage,h as getTimedUsage,l as incrementUsage,i as initUsage,d as invalidateCachedBaseUrl,g as purgeTimedUsage,v as recordImageGeneration,f as recordTimedUsage,m as runtimeSession,b as sendUsageFinalize,a as sendUsageHeartbeat};
|