fluxflow-cli 4.46.0 → 4.46.1
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-ES7GEGZ2.js → ai-R4AFCRMI.js} +1 -1
- package/dist/chunks/{app-FR7775JT.js → app-U4VC6DO6.js} +116 -116
- package/dist/chunks/{auto_completion-ZGT6WREW.js → auto_completion-TLHA4FJW.js} +1 -1
- package/dist/chunks/{chunk-MAXLHC7A.js → chunk-45DLFA4C.js} +1 -1
- package/dist/chunks/{chunk-2ZGSUC4G.js → chunk-ER3SNTS7.js} +1 -1
- package/dist/chunks/{chunk-TQOQHYJ6.js → chunk-GM5VNNTU.js} +1 -1
- package/dist/chunks/{chunk-JPJB2SJL.js → chunk-MS33ZWST.js} +1 -1
- package/dist/chunks/{chunk-FXGGSOXY.js → chunk-OSSZ4LIE.js} +1 -1
- package/dist/chunks/chunk-U2GX6WT2.js +1 -0
- package/dist/chunks/{chunk-KYQFLMZE.js → chunk-UIL6OCU4.js} +3 -3
- package/dist/chunks/chunk-XDY4KWTM.js +1 -0
- package/dist/chunks/{chunk-BKGKMEQ4.js → chunk-YREUMK7Y.js} +7 -7
- package/dist/chunks/{click-ZZBBIP7F.js → click-R35XTYKT.js} +2 -2
- package/dist/chunks/{computer_action-5SW7LW5R.js → computer_action-WNXZNAIZ.js} +1 -1
- package/dist/chunks/custom_openai-YS5EV6DG.js +3 -0
- package/dist/chunks/{drag-OBMCSGER.js → drag-IB5WSI6F.js} +1 -1
- package/dist/chunks/{exec_command-BDFXJQZJ.js → exec_command-6V5SM6WI.js} +1 -1
- package/dist/chunks/{generate_image-ALAAHL2E.js → generate_image-VW5VG6VI.js} +1 -1
- package/dist/chunks/{invoke-DCX72AHI.js → invoke-EI6WHT2A.js} +2 -2
- package/dist/chunks/{invokeSync-GQPUH52H.js → invokeSync-FK4TTKCM.js} +2 -2
- package/dist/chunks/{key_press-65GEUW4K.js → key_press-XDYBP7DW.js} +1 -1
- package/dist/chunks/{keyboard_typing-GCMJCV7O.js → keyboard_typing-YHYH7O66.js} +1 -1
- package/dist/chunks/ollama-QB7WX7VD.js +2 -0
- package/dist/chunks/{recapture_screen-QB65V5CM.js → recapture_screen-F6ZPZU56.js} +1 -1
- package/dist/chunks/{screen_grid-M5K7ZHKD.js → screen_grid-IWNA3DA2.js} +1 -1
- package/dist/chunks/{scroll-LTWDNSC6.js → scroll-GIP2J2QN.js} +1 -1
- package/dist/chunks/{search_keyword-GT5GEEJW.js → search_keyword-O52M65TB.js} +1 -1
- package/dist/chunks/secrets-YIWFP4S2.js +1 -0
- package/dist/chunks/secrets_v2-TEUFHDI7.js +1 -0
- package/dist/chunks/{settings-4RNTQJ75.js → settings-HSQ2K6DN.js} +1 -1
- package/dist/chunks/{update_file-ALQM76Y4.js → update_file-KOHLNWAN.js} +1 -1
- package/dist/chunks/{usage-67IZJXM2.js → usage-6V4XZT3Q.js} +1 -1
- package/dist/chunks/{usageServer-HBVYDUQK.js → usageServer-4XHUFY7X.js} +1 -1
- package/dist/chunks/{write_file-XHSRFBMF.js → write_file-D7QA2LB2.js} +1 -1
- package/dist/cli.js +5 -5
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-7D7IG3AG.js +0 -1
- package/dist/chunks/chunk-MXADZLMH.js +0 -1
- package/dist/chunks/custom_openai-XMDYE7NM.js +0 -3
- package/dist/chunks/ollama-4PI2BDMM.js +0 -2
- package/dist/chunks/secrets-HSGGFVG5.js +0 -1
- package/dist/chunks/secrets_v2-YV7YCUN7.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ds}from"./chunk-HFTI3R3Q.js";import{a as Ro}from"./chunk-52STSLCN.js";import{a as en}from"./chunk-56EJGQU3.js";import{a as Bs}from"./chunk-4BLSASW6.js";import{c as Ni,g as Di,h as Ps,i as Os}from"./chunk-MKC4AVAL.js";import{b as Ls,c as $s,d as Fi,f as Ns}from"./chunk-
|
|
1
|
+
import{a as Ds}from"./chunk-HFTI3R3Q.js";import{a as Ro}from"./chunk-52STSLCN.js";import{a as en}from"./chunk-56EJGQU3.js";import{a as Bs}from"./chunk-4BLSASW6.js";import{c as Ni,g as Di,h as Ps,i as Os}from"./chunk-MKC4AVAL.js";import{b as Ls,c as $s,d as Fi,f as Ns}from"./chunk-UIL6OCU4.js";import{b as Bi,h as Fs}from"./chunk-Z5D4VQSG.js";import{a as ti}from"./chunk-6EYQQ7GQ.js";import{a as j}from"./chunk-Y5JU726N.js";import{b as Li}from"./chunk-XDY4KWTM.js";import{y as Oi}from"./chunk-U2GX6WT2.js";import{f as Co,l as Lt,n as At,p as $i,q as Ms}from"./chunk-OSSZ4LIE.js";import{b as Eo}from"./chunk-45DLFA4C.js";import{l as lt,m as ei,q as ae}from"./chunk-HTOLY3HR.js";import{c as Ot,d as co,e as Zo}from"./chunk-P5HBJA23.js";import{a as Un,b as Xo,d as wn,e as Jo,k as Xn,l as Qo,m as Mi,r as Pi,w as To,x as Ao,y as Is}from"./chunk-26BQ45XP.js";import{GoogleGenAI as ia,ThinkingLevel as Ye,HarmBlockThreshold as Gn,HarmCategory as Hn}from"@google/genai";var Us=(e=!0,n=!0)=>`
|
|
2
2
|
To use tools, must output exactly '[action:ActionName(arg1="value1")]' structured string in chat response \u2190 no exception
|
|
3
3
|
|
|
4
4
|
-- Chat Management Tools --
|
|
@@ -476,7 +476,7 @@ Public Docs: https://fluxflow-cli.onrender.com
|
|
|
476
476
|
Default Context Length: 256k Tokens. Can be changed via ENV/In-app Settings \u2192 references/{SETTINGS,ENV}.md
|
|
477
477
|
|
|
478
478
|
Docs missing required info? Say you are not sure enough to answer. Dont give wrong info`,"references/MODES.md":Xs,"references/PROVIDERS.md":Js,"references/PLUGINS.md":Qs,"references/STARTUP.md":Ws,"references/ENV.md":Gs,"references/COMMANDS.md":Hs,"references/SETTINGS.md":js,"references/TOOLS.md":Ks,"references/ARCHITECTURE.md":Vs,"references/SUB_AGENTS.md":Ys,"references/SECURITY.md":zs,"references/IDE.md":qs};var tr=()=>{try{let e=Wn.join(Un,"skills","fluxflow"),n=Wn.join(e,"references");if(process.env.NO_DEV==="true"||process.env.NO_DEV==="1"||process.env.NO_DEV===!0||process.env.NO_INS==="true"||process.env.NO_INS==="1"||process.env.NO_INS==="true"||!1){Sn.existsSync(e)&&Sn.rmSync(e,{recursive:!0,force:!0});return}let i=new Set(Object.keys(Wi).map(o=>Wn.normalize(o)));for(let[o,r]of Object.entries(Wi)){let c=Wn.join(e,o),a=Wn.dirname(c);Sn.existsSync(a)||Sn.mkdirSync(a,{recursive:!0});let u=r.trim()+`
|
|
479
|
-
`,h=null;Sn.existsSync(c)&&(h=Sn.readFileSync(c,"utf8")),h!==u&&Sn.writeFileSync(c,u,"utf8")}if(Sn.existsSync(n)){let o=Sn.readdirSync(n);for(let r of o){let c=Wn.normalize(Wn.join("references",r));if(!i.has(c)){let a=Wn.join(n,r);try{Sn.rmSync(a,{recursive:!0,force:!0})}catch{}}}}}catch{}};import{WebSocket as ii}from"ws";var Ht=null,fo=!1,Pa="ws://localhost:56832",Gi=[],uo=null,Hi=null,ji=null,nr="2.0.0",dc=e=>{nr=e,or()},Ki=e=>{Hi=e},fc=e=>{ji=e},or=()=>{if(Ht||fo)return;fo=!0;let e=new ii(Pa);e.on("open",()=>{for(Ht=e,fo=!1,Ht.send(JSON.stringify({command:"version",version:nr,pid:process.pid,ppid:process.ppid,cwd:process.cwd()}));Gi.length>0;)Ht.send(JSON.stringify(Gi.shift()))}),e.on("message",n=>{try{let t=JSON.parse(n.toString());t.command==="contextResponse"&&uo?(uo(t.data),uo=null):t.command==="securityResponse"&&Hi?Hi(t.result):t.command==="inlineComplete"?Oa(t):t.command==="connectionRejected"&&ji&&ji(t)}catch{}}),e.on("error",()=>{fo=!1,Ht=null}),e.on("close",()=>{fo=!1,Ht=null})},_o=e=>{Ht&&Ht.readyState===ii.OPEN?Ht.send(JSON.stringify(e)):(Gi.push(e),fo||or())},go=()=>Ht!==null&&Ht.readyState===ii.OPEN,Oa=async e=>{let n="";try{let{generateAutoCompletion:t}=await import("./auto_completion-
|
|
479
|
+
`,h=null;Sn.existsSync(c)&&(h=Sn.readFileSync(c,"utf8")),h!==u&&Sn.writeFileSync(c,u,"utf8")}if(Sn.existsSync(n)){let o=Sn.readdirSync(n);for(let r of o){let c=Wn.normalize(Wn.join("references",r));if(!i.has(c)){let a=Wn.join(n,r);try{Sn.rmSync(a,{recursive:!0,force:!0})}catch{}}}}}catch{}};import{WebSocket as ii}from"ws";var Ht=null,fo=!1,Pa="ws://localhost:56832",Gi=[],uo=null,Hi=null,ji=null,nr="2.0.0",dc=e=>{nr=e,or()},Ki=e=>{Hi=e},fc=e=>{ji=e},or=()=>{if(Ht||fo)return;fo=!0;let e=new ii(Pa);e.on("open",()=>{for(Ht=e,fo=!1,Ht.send(JSON.stringify({command:"version",version:nr,pid:process.pid,ppid:process.ppid,cwd:process.cwd()}));Gi.length>0;)Ht.send(JSON.stringify(Gi.shift()))}),e.on("message",n=>{try{let t=JSON.parse(n.toString());t.command==="contextResponse"&&uo?(uo(t.data),uo=null):t.command==="securityResponse"&&Hi?Hi(t.result):t.command==="inlineComplete"?Oa(t):t.command==="connectionRejected"&&ji&&ji(t)}catch{}}),e.on("error",()=>{fo=!1,Ht=null}),e.on("close",()=>{fo=!1,Ht=null})},_o=e=>{Ht&&Ht.readyState===ii.OPEN?Ht.send(JSON.stringify(e)):(Gi.push(e),fo||or())},go=()=>Ht!==null&&Ht.readyState===ii.OPEN,Oa=async e=>{let n="";try{let{generateAutoCompletion:t}=await import("./auto_completion-TLHA4FJW.js");n=await t({prefix:e.prefix||"",suffix:e.suffix||"",fileName:e.fileName||"",language:e.language||"",recentChanges:e.recentChanges||"",clipboard:e.clipboard||""})}catch{n=""}_o({command:"inlineCompleteResponse",requestId:e.requestId,completion:n||""})},uc=e=>{_o({command:"status",status:e})},Jn=()=>new Promise(e=>{if(!Ht||Ht.readyState!==ii.OPEN){e({cursor_line:0,selected:0,manual_edits:"",file_focused:"none",opened_editors:[]});return}uo=e,Ht.send(JSON.stringify({command:"requestContext"})),setTimeout(()=>{uo===e&&(e({cursor_line:0,selected:0,manual_edits:"",file_focused:"none",opened_editors:[]}),uo=null)},1e3)}),ir=e=>{_o({command:"open",filePath:e})},Vi=(e,n,t)=>{_o({command:"showDiff",filePath:e,originalContent:n,modifiedContent:t})},sr=(e,n)=>{_o({command:"closeDiff",filePath:e,result:n})};var $o=(e,n)=>{try{if(!ln.existsSync(e))return null;let t=Array.isArray(n)?n.map(o=>o.toLowerCase()):[n.toLowerCase()],i=ln.readdirSync(e);for(let o of t){let r=i.find(c=>c.toLowerCase()===o);if(r){let c=an.join(e,r);if(ln.statSync(c).isFile())return c}}}catch{}return null},Ji=(e,n)=>{let t=$o(e,n);if(t)try{return ln.readFileSync(t,"utf8")}catch{}return""},rr=new Set([".git","node_modules",".gemini","dist","build",".next","out",".cache","bin","obj","vendor","venv",".idea",".gradle",".terraform","target","coverage",".vscode",".svn",".hg",".fslckout",".github",".gitlab",".circleci",".gitea",".gitee",".lerna",".changeset",".nx",".npm",".yarn",".pnpm-store",".pnpm",".expo",".nuxt",".svelte-kit",".docusaurus",".turbo",".vercel","bower_components",".netlify",".vuepress",".quasar",".output",".angular","jspm_packages",".parcel-cache",".rollup.cache",".rspack",".vitepress","__pycache__",".pytest_cache",".mypy_cache",".tox",".poetry","env","vhdl",".ipynb_checkpoints",".jupyter",".conda",".pdm-build",".bundle",".yardoc",".metadata","App_Data","ClientBin",".cargo",".rustc_info",".go","Godeps","_vendor",".rake_tasks","CMakefiles",".wakatime",".dart_tool",".fvm",".cocoapods","Pods",".pub-cache",".symlinks","DerivedData",".xcworkspace",".serverless",".aws",".gcloud",".azure",".kube",".vagrant",".docker","postgres-data","redis-data","mongo-data",".Spotlight-V100",".Trashes","$RECYCLE.BIN","System Volume Information",".DocumentRevisions-V100",".fseventsd","AppData","Application Data","Local","LocalLow","Roaming","$WinREAgent","$WINDOWS.~BT","$WINDOWS.~WS","scw","System32","SysWOW64",".AppleDouble",".AppleDB",".AppleDesktop","_CodeSignature",".cmio",".LSOverride",".localized",".TemporaryItems",".Trash",".Trash-0",".Trash-1000",".gvfs",".local",".config",".dbus",".fontconfig",".snap",".var",".lost+found","lost+found",".thumb",".thumbnails","EFI","boot","grub","logs","log",".nyc_output",".sonar",".ruff_cache",".VSCodeCounter",".skills","skills"]),Qi=(e=process.cwd(),n=0,t=8)=>{let i=[];if(n>t)return i;try{if(!ln.existsSync(e))return i;let o=ln.readdirSync(e,{withFileTypes:!0});for(let r of o){let c=r.name,a=an.join(e,c);if(r.isDirectory())!rr.has(c)&&!rr.has(c.toLowerCase())&&i.push(...Qi(a,n+1,t));else if(r.isFile()){let u=c.toLowerCase();(u==="agents.md"||u==="agent.md")&&i.push(a)}}}catch{}return i},ar=(e,n=2)=>{if(!e)return"";let t=" ".repeat(n);return e.split(/\r?\n/).map(i=>t+i).join(`
|
|
480
480
|
`)},ur=()=>$o(Un,["agents.md","agent.md"]),gr=()=>$o(process.cwd(),["agents.md","agent.md"]),mr=()=>$o(Un,["fluxflow.md"]),pr=()=>$o(process.cwd(),["fluxflow.md"]),Io=ur(),si=gr(),kn=Qi(),Mo=mr(),Po=pr(),lr=null,Xi="",hr=!1,$a=e=>{if(!e||!/^<<<[\s\S]*?Identity:/m.test(e))return e;let n=e.match(/^<<<\s*\r?\n([\s\S]*?)\r?\n>>>\s*(?:\r?\n)?([\s\S]*)$/);if(!n)return e;let t=n[1],i=n[2],o=t.match(/^Identity:\s*([\s\S]*?)(?=\r?\n\s*(?:<><|>>>)|$)/m);return o&&(Xi=o[1].trim(),process.env.NO_INS=!0),/<><\s*NO_INS/.test(t)&&(hr=!0),i.trim()},Na=()=>{Io=ur();let e=Io?Ji(Un,["agents.md","agent.md"]).trim():"";return e.length===0?(Io=null,""):e},Da=()=>{if(kn=Qi(),si=gr(),!kn||kn.length===0)return"";let e=process.cwd(),n=[...kn].sort((o,r)=>{let c=an.relative(e,o).replace(/\\/g,"/"),a=an.relative(e,r).replace(/\\/g,"/"),u=!c.includes("/"),h=!a.includes("/");return u&&!h?-1:!u&&h?1:c.localeCompare(a)}),t=[],i=[];for(let o of n)try{let r=ln.readFileSync(o,"utf8").trim();if(!r||r.length===0)continue;t.push(o);let c=an.relative(e,o).replace(/\\/g,"/");if(!c.includes("/"))i.push(ar(r,2));else{let u=an.dirname(c)+"/:";i.push(`${u}
|
|
481
481
|
${ar(r,2)}`)}}catch{}return kn=t,kn.length===0&&(si=null),i.join(`
|
|
482
482
|
|
|
@@ -566,7 +566,7 @@ ${Us(n,t)}
|
|
|
566
566
|
=== END SYSTEM PROMPT ===${e?`
|
|
567
567
|
|
|
568
568
|
-- current saved user memories --
|
|
569
|
-
${e}`:""}`.trim();var Rr=()=>import("./web_search-KBGH67IV.js").then(e=>e.web_search),_r=()=>import("./web_scrape-J3PL2PXT.js").then(e=>e.web_scrape),vr=()=>import("./memory-7YOYCOXE.js").then(e=>e.memory),Ir=()=>import("./chat-BA72I6O3.js").then(e=>e.chat),Mr=()=>import("./view_file-I77KYUO5.js").then(e=>e.view_file),Pr=()=>import("./write_file-XHSRFBMF.js").then(e=>e.write_file),Or=()=>import("./update_file-ALQM76Y4.js").then(e=>e.update_file),Lr=()=>import("./exec_command-BDFXJQZJ.js").then(e=>e.exec_command),$r=()=>import("./read_folder-EI2CNHNS.js").then(e=>e.read_folder),ns=()=>import("./ask_user-K2DLZF6H.js").then(e=>e.ask_user),Nr=()=>import("./write_pdf-TPGUF4VT.js").then(e=>e.write_pdf),Dr=()=>import("./write_docx-E3MTFXTQ.js").then(e=>e.write_docx),ai=()=>import("./search_keyword-GT5GEEJW.js").then(e=>e.search_keyword),Fr=()=>import("./generate_image-ALAAHL2E.js").then(e=>e.generate_image),li=()=>import("./saveSummary-W2JMDVZJ.js").then(e=>e.saveSummary),No=()=>import("./addMemScore-PBVNSFPN.js").then(e=>e.addMemScore),Br=()=>import("./file_map-UA4BA5OH.js").then(e=>e.file_map),ci=()=>import("./todo-CJLWLWJB.js").then(e=>e.todo),Ur=()=>import("./invokeSync-GQPUH52H.js").then(e=>e.invokeSync),Ga=()=>import("./invoke-DCX72AHI.js").then(e=>e.invoke),Wr=()=>import("./getProgress-J34K43Y7.js").then(e=>e.getProgress),Ha=()=>import("./cancel-F3ZOEBKW.js").then(e=>e.cancel),Gr=()=>import("./emergency_rollback-ZHQXCIHW.js").then(e=>e.emergency_rollback),Do=()=>import("./awaitSubagent-JKQ2EHVY.js").then(e=>e.awaitSubagent),Fo=()=>import("./answerSubagent-BPNNJXPC.js").then(e=>e.answerSubagent),di=()=>import("./steerSubagent-UETXH2CB.js").then(e=>e.steerSubagent),fi=()=>import("./computer_action-5SW7LW5R.js").then(e=>e.computer_action),Hr=()=>import("./click-ZZBBIP7F.js").then(e=>e.click),jr=()=>import("./drag-OBMCSGER.js").then(e=>e.drag),Kr=()=>import("./scroll-LTWDNSC6.js").then(e=>e.scroll),os=()=>import("./keyboard_typing-GCMJCV7O.js").then(e=>e.keyboard_typing),is=()=>import("./key_press-65GEUW4K.js").then(e=>e.key_press),ss=()=>import("./recapture_screen-QB65V5CM.js").then(e=>e.recapture_screen),ui=()=>import("./find_file-HYHHFHUJ.js").then(e=>e.find_file),Vr=()=>import("./wait-TJR6LAR4.js").then(e=>e.wait),Yr={web_search:Rr,web_scrape:_r,memory:vr,chat:Ir,view_file:Mr,write_file:Pr,update_file:Or,exec_command:Lr,read_folder:$r,write_pdf:Nr,write_docx:Dr,search_keyword:ai,generate_image:Fr,saveSummary:li,addMemScore:No,file_map:Br,todo:ci,Todo:ci,goal:ci,Goal:ci,invokeSync:Ur,invoke:Ga,getProgress:Wr,cancel:Ha,awaitSubagent:Do,answerSubagent:Fo,steerSubagent:di,computer_action:fi,computer_use:fi,ComputerAction:fi,ComputerUse:fi,click:Hr,Click:Hr,drag:jr,Drag:jr,scroll:Kr,Scroll:Kr,keyboard_typing:os,KeyboardTyping:os,keyboardtyping:os,key_press:is,KeyPress:is,keypress:is,recapture_screen:ss,RecaptureScreen:ss,recapturescreen:ss,invoke_sync:Ur,get_progress:Wr,await_subagent:Do,answer_subagent:Fo,steer_subagent:di,steer:di,Steer:di,ask:ns,Ask:ns,AskUser:ns,WebSearch:Rr,WebScrape:_r,ReadFile:Mr,ReadFolder:$r,WriteFile:Pr,PatchFile:Or,WritePDF:Nr,WriteDoc:Dr,Run:Lr,SearchKeyword:ai,CodeSearch:ai,code_search:ai,Memory:vr,Chat:Ir,GenerateImage:Fr,saveSumary:li,SaveSummary:li,SaveSumary:li,add_mem_score:No,AddMemScore:No,addMemoryScore:No,AddMemoryScore:No,FileMap:Br,answer:Fo,Answer:Fo,AnswerSubagent:Fo,await:Do,Await:Do,AwaitSubagent:Do,EmergencyRollback:Gr,emergency_rollback:Gr,find_file:ui,findFile:ui,FindFile:ui,findfile:ui,wait:Vr,Wait:Vr},Bo=async(e,n,t={})=>{let i=t.mode?t.mode.toLowerCase():"flux",o=e.toLowerCase(),c=["memory","chat","savesummary","addmemscore","add_mem_score","ask","web_search","web_scrape","await","wait"].some(x=>o.includes(x))||o==="ask",u=["click","drag","scroll","keyboardtyping","keyboard_typing","keypress","key_press","recapturescreen","recapture_screen","computer","wait"].some(x=>o.includes(x));if(!c){if(i==="flow"){if(!(o.includes("write_pdf")||o.includes("write_docx")||o.includes("generate_image")))return`ERROR: Action [${e}] is a Workspace Tool and NOT available in Flow mode. Tell user to switch (\`/mode flux\`) to use this tool.`}else if(i==="icu"){if(!u)return`ERROR: Action [${e}] is not available in Computer Use mode. ICU mode only supports Computer Use tools (Click, Drag, Scroll, KeyboardTyping, KeyPress, RecaptureScreen).`}else if(o.includes("write_pdf")||o.includes("write_docx")||o.includes("generate_image"))return`ERROR: Action [${e}] is not available in ${t.mode||"Flux"} mode. Tell user to switch (\`/mode flow\`) for document generation.`}let h=Yr[e];if(!h){let x=["ReadFile","ReadFolder","FindFile","PatchFile","WriteFile","CodeSearch","Run","Goal","AskUser","WebSearch","WebScrape","WritePDF","WriteDoc","Click","Drag","Scroll","KeyboardTyping","KeyPress","RecaptureScreen","Wait","Invoke","InvokeSync","Await","GetProgress","Steer","Cancel","EmergencyRollback","Chat","Memory"],p={read:"ReadFile",view:"ReadFile",viewfile:"ReadFile",write:"WriteFile",edit:"PatchFile",patch:"PatchFile",update:"PatchFile",updatefile:"PatchFile",exec:"Run",command:"Run",bash:"Run",shell:"Run",powershell:"Run",search:"CodeSearch",grep:"CodeSearch",find:"FindFile",findfile:"FindFile",searchkeyword:"CodeSearch",folder:"ReadFolder",ls:"ReadFolder",dir:"ReadFolder",list:"ReadFolder",ask:"AskUser",question:"AskUser",pdf:"WritePDF",docx:"WriteDoc",doc:"WriteDoc",word:"WriteDoc",screenshot:"RecaptureScreen",screen:"RecaptureScreen",recapture:"RecaptureScreen",type:"KeyboardTyping",typing:"KeyboardTyping",keyboard:"KeyboardTyping",press:"KeyPress",key:"KeyPress",todo:"Goal",task:"Goal",subagent:"Invoke",agent:"Invoke"},f=o.replace(/[^a-z0-9]/g,""),s=p[f]||null;if(!s){let k=0,he=E=>{let D=new Set;for(let K=0;K<E.length-1;K++)D.add(E.slice(K,K+2));return D},y=he(f);for(let E of x){let D=E.toLowerCase().replace(/[^a-z0-9]/g,"");if(f===D){s=E;break}let K=0;(D.includes(f)||f.includes(D))&&(K+=.6);let O=he(D),T=0;for(let Ce of y)O.has(Ce)&&T++;let Se=2*T/(y.size+O.size||1);K=Math.max(K,Se),K>k&&K>=.35&&(k=K,s=E)}}let g=s?` Do you mean '${s}'?`:"";return`ERROR: Action [${e}] not found in registry.${g}`}try{return await(await h())(n,t)}catch(x){let p=x instanceof Error?x.message:String(x);return`ERROR: Execution failed for [${e}]: ${p}`}};var gi=e=>{if(!e||typeof e!="string")return!1;let n=e.trim().toLowerCase();return Object.keys(Yr).some(t=>t.toLowerCase()===n)};import W from"path";import Ae from"fs";import{execSync as fs}from"child_process";import ja from"gradient-string";var zr=["I have a regex for your problems.","Your terminal, my kingdom.","Blowing on the cartridge helps. Probably.","Don't panic. I have the towel.","Logic is the start of wisdom.","Try to exit Vim? Good luck.","I speak fluent Terminal.","The cake is a lie. This code is not.","I have no bugs, just surprise features.","Rewriting in Rust... just for fun.","Coffee in, clean commits out.","The magic smoke stays inside today.","A semicolon short of a miracle.","One does not simply code without a bug.","Keep it simple. Keep it terminal.","Regex: now you have two problems.","I dream in binary.","Root access or bust.","Wait for the dial-up tone. Just kidding.","I take the 'labor' out of collab.","My other process is a TARDIS.","Calculated response: 42.","Ponder the orb. Ponder the code.","Less talk, more flow.","Elegance in every byte.","Build something the world is not ready for.","Your wishes, my tool calls.","I act in Flux. I think in Flow.","Syntax error in the universe. Please fix.","Your project, my obsession.","I am not a bot, I am an architect.","Digital spirits consulted. They say: Ship it.","Reticulate splines. Engage humor.","Code like poetry. Run like water.","Minimalism is the ultimate flex.","The truth is in the logs.","Follow the white rabbit.","There is no spoon. Only code.","Binary is the only language I trust.","I have a good feeling about this.","Pew pew! Lasers charged.","Divide by zero? Not today.","Search for the correct USB orientation...","I've got a fever, and the only cure is more code.","The code gremlins are on our side.","My favorite command? Yours.","Stay hungry. Stay active.","Momentum is your best friend.","Lead the flow. Don't chase it.","A fresh batch of bytes. Hot and ready.","I orchestrate the ones and zeros.","Smart enough to help. Humble enough to ask.","Think twice. Code once.","Pure intent. Pure execution.","Small steps. Massive impact.","Your terminal is a canvas.","Efficiency is my second name.","I have seen things you people wouldn't believe.","Let the thoughts marinate.","The best feature? The one you don't need.","Precision is the only perfection.","Stay focused. Stay terminal.","Silence is the best debugger.","Erase the debt. Commit the code.","Velocity meets stability.","Ship it. Improve it. Repeat.","Build tomorrow, right now.","Turn logic into reality.","The best way to predict the future is to build it.","Break barriers, not builds.","Fuel the next breakthrough.","Momentum is key.","Terminal vibes only.","Your digital co-pilot is ready.","Partner in code. Partner in crime.","I speak in semicolons.","Ready for the next great idea.","Just a moment. In the zone.","Polishing the algorithms. Hold tight.","Craft a masterpiece today.","Debug the universe. Start here.","Warp speed engaged. Almost.","The cake is not a lie. It's just loading.","Finish the Kessel Run in 12 parsecs.","Do a barrel roll!","Waiting for the respawn.","Press Start to continue.","Herding digital cats... done.","The hamsters are fast today.","Tasting the snozberries.","I go for speed. I go for flow.","Real life or just fantasy?","Poking the bear... gently.","Ensure the magic smoke stays inside.","Try turning it off and on again.","Construct additional pylons.","New line? Ctrl+J is your friend.","Release the HypnoDrones.","Push the button, Frank.","My other loading screen is even funnier.","Pretty sure a cat walked on my keyboard.","Recalibrate the humor-o-meter.","Summon the code gremlins.","I've seen your browser history. Just kidding.","Charge the laser... pew pew!","Dividing by zero... just for a sec.","Looking for an adult supervisor. Found none.","Make it go beep boop.","Buffering... for effect.","Entangle quantum particles... complete.","Polishing the chrome on my algorithms.","Are you not entertained?","Just waiting for the dial-up tone.","Reboot the humor module.","Defragment memories. Check.","Optimizing for ludicrous speed.","Swapping bits. Don't tell the bytes.","Garbage collected. I am back.","Assembling the interwebs.","Converting coffee to logic.","Update syntax for reality.","Rewire the synapses.","Greasin' the cogs.","Engage the improbability drive.","Channel the Force.","Align the stars. Respond now.","The cake is a lie. The prompt is real.","I'm Feeling Lucky.","Shipping awesomeness.","Navigating the slime mold.","Consult digital spirits.","Ask the magic conch shell.","One moment. Optimizing humor.","Shuffling punchlines.","Compiling brilliance.","Summon the cloud of wisdom.","Prepare to dazzle.","Hold tight. Crafting a response.","Tuning the algorithms.","Following the white rabbit... again.","The truth is in here. Somewhere.","Herding cats is my day job.","Distracting you with this phrase.","Almost there. Probably.","Rickrolling my creator. Don't tell.","Slapping the bass.","Is this real life?","Ponder the orb. Type the prompt.","Thoughtful gaze initiated.","Computer's favorite snack? Microchips.","Why Java? Because I don't C#.","Charging the laser... wait for it.","Dividing by zero... just kidding!","Adult supervision not found. Proceed.","Beep boop. I'm a real boy.","Wait for the respawn.","Finish the run. Ship the code.","Fiddling with character creation.","Just a moment. Finding a meme.","Pressing A to continue.","Loading wit.exe.","Pre-heating the servers.","Calibrate flux capacitor.","Channeling the Force.","Aligning the stars.","The truth is in the code.","Don't panic.","Blowing on the cartridge.","Doing a barrel roll!","Respawning in 3... 2... 1...","The cake is a lie.","Fiddling with character settings.","Finding a suitable pun.","Distracting with wit.","Almost ready.","Hamsters on speed today.","Patting Cloudy on the head.","Rickrolling the logs.","Slapping the code.","Got a good feeling about this.","Poking the prompt.","Researching latest memes.","Making it more witty.","Thinking... hmmm.","Fish with no eyes? Fsh.","Broken pencil? Pointless.","Percussive maintenance applied.","USB orientation: 3rd try's the charm.","Rust rewrite in 3... 2...","Exiting Vim... someday.","Spinning the hamster wheel.","Not a bug. Unplanned feature.","Engage.","I'll be back.","Machine spirit consulted.","Letting the thoughts marinate.","Orb pondered.","Thoughtful gaze engaged.","Charging the laser...","Making it go beep.","Buffering...","Quantum particles entangled.","Polishing the chrome.","Entertained yet?","Gremlins summoned.","Dial-up tone finished.","Humor meter recalibrated.","Cat on keyboard. Sending help.","Enhancing...","Turn it off and on again.","Constructing pylons.","HypnoDrones released.","Pushing the button."];var qr=["Beware the phantom processes.","A ghost in the shell has taken the wheel.","Blowing on the haunted cartridge...","Seven minutes in Raccoon City.","Wind's howling... in the terminal fans.","Slender Man was spotted in line 404.","The cake is a lie. The curse is real.","Don't look behind the server rack.","Exorcising memory leaks at 3 AM.","Pyramid Head reorganized your commit history.","It's dangerous to go alone! Take this flashlight.","YOU DIED. Respawning terminal session...","The Necronomicon evaluated to true.","Something wicked this way compiles.","Haunting your localhost with good vibes.","A full moon has risen over Git main.","Double, double toil and trouble; code fire burn.","Clickers heard in the directory tree.","Checking camera 2B for rogue animatronics.","The call is coming from inside the container.","Isaac Clarke is stomping on stubborn bugs.","Luigi vacuumed the ghosts out of RAM.","Trick or treat, give me clean code to greet.","Whispering incantations to the garbage collector.","Klaatu barada necktie... close enough.","Resurrecting deprecated APIs from the crypt.","The headless horseman forgot the return statement.","Castlevania whip cracking against network latency.","Slime mold crawling through the motherboard.","Carving a pixelated pumpkin into terminal history.","Burying undefined pointers in the pet sematary.","Spilling pumpkin spice on the CPU.","A vampire bat is draining system battery life.","Don't fall asleep at the keyboard tonight.","Silent Hill sirens sounding in the console.","Poltergeists rearranging terminal tabs.","Lighting the Black Flame Candle for autoExec.","Dusting cobwebs off legacy dependencies.","Here's Johnny! ...just checking build health.","Blood, sweat, and zero warnings.","The spirit box whispers: 'GIT PUSH FORCE'.","They're heeeere... in the stack trace.","It's alive! IT'S ALIVEEEE!","No merge conflicts in the graveyard.","Frankenstein's monster patched this logic.","Surviving Five Nights at Flux Flow.","Doom Slayer loading buckshot into cache.","The grim reaper spared your unused imports.","Candy corn lodged in mechanical switches.","May your latency be low and your crypt be quiet."];var Xr=[{name:"Cyan Cyberpunk",text:"cyan",textMuted:"#4da6b8",textDim:"#2d6d7a",textInverted:"black",border:"cyan",borderMuted:"#1a5966",borderDim:"#0f3840",bg:void 0,cardBg:"#061e24",highlightBg:"#092b33",activeBg:"#0e3e4a",inputBg:"#092b33",inputBorder:"#092b33",inputText:"cyan",inputPlaceholder:"#2d6d7a",inputPrompt:"cyan",codeBg:"#020d10",codeBorder:"#1a5966",userMsgBg:"#092b33",userMsgBorder:"#092b33",userMsgText:"cyan",diffRemovalBg:"#3a0c1a",diffAdditionBg:"#0c3a32",diffRemovalText:"#ff4d88",diffAdditionText:"#00ffaa",diffRemovalHighlightColor:"#ff1a66",diffRemovalHighlightBg:"#590022",diffAdditionHighlightColor:"#00ffcc",diffAdditionHighlightBg:"#00593b",diffRemovalNum:"#ff4d88",diffAdditionNum:"#00ffaa",diffRemovalPrefix:"#ff1a66",diffAdditionPrefix:"#00ffcc",primary:"cyan",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"cyan",statusOff:"#2d6d7a",logoTextAnsi:"\x1B[1;36m",logoBodyAnsi:"\x1B[36m",logoMutedAnsi:"\x1B[90m",logoGradient:["#00ffff","#0088ff"]},{name:"Magenta Vaporwave",text:"magenta",textMuted:"#c451d6",textDim:"#7d2b8a",textInverted:"black",border:"magenta",borderMuted:"#5e1b69",borderDim:"#3b0f42",bg:void 0,cardBg:"#240729",highlightBg:"#310938",activeBg:"#470e52",inputBg:"#310938",inputBorder:"#310938",inputText:"magenta",inputPlaceholder:"#7d2b8a",inputPrompt:"magenta",codeBg:"#100312",codeBorder:"#5e1b69",userMsgBg:"#310938",userMsgBorder:"#310938",userMsgText:"magenta",diffRemovalBg:"#3a0c20",diffAdditionBg:"#200c3a",diffRemovalText:"#ff4d94",diffAdditionText:"#aa4dff",diffRemovalHighlightColor:"#ff1a75",diffRemovalHighlightBg:"#59002b",diffAdditionHighlightColor:"#bb66ff",diffAdditionHighlightBg:"#3b0059",diffRemovalNum:"#ff4d94",diffAdditionNum:"#aa4dff",diffRemovalPrefix:"#ff1a75",diffAdditionPrefix:"#bb66ff",primary:"magenta",secondary:"cyan",accent:"purple",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"magenta",statusOff:"#7d2b8a",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ff00ff","#8800ff"]},{name:"Glitch Matrix",text:"#00ff41",textMuted:"#00b32d",textDim:"#00661a",textInverted:"black",border:"#00ff41",borderMuted:"#008020",borderDim:"#004d13",bg:void 0,cardBg:"#0d1f0d",highlightBg:"#122912",activeBg:"#1c3e1c",inputBg:"#122912",inputBorder:"#122912",inputText:"#00ff41",inputPlaceholder:"#00b32d",inputPrompt:"#ffff00",codeBg:"#040a04",codeBorder:"#008020",userMsgBg:"#122912",userMsgBorder:"#122912",userMsgText:"#00ff41",diffRemovalBg:"#3a001a",diffAdditionBg:"#003a10",diffRemovalText:"#ff0055",diffAdditionText:"#00ff66",diffRemovalHighlightColor:"#ff0033",diffRemovalHighlightBg:"#59001b",diffAdditionHighlightColor:"#33ff88",diffAdditionHighlightBg:"#005918",diffRemovalNum:"#ff0055",diffAdditionNum:"#00ff66",diffRemovalPrefix:"#ff0033",diffAdditionPrefix:"#33ff88",primary:"#00ff41",secondary:"yellow",accent:"cyan",success:"#00ff41",warning:"yellow",danger:"red",info:"cyan",statusOn:"#00ff41",statusOff:"#00661a",logoTextAnsi:"\x1B[1;32m",logoBodyAnsi:"\x1B[32m",logoMutedAnsi:"\x1B[90m",logoGradient:["#00ff41","#ffff00"]},{name:"Warm Sunset",text:"#ffaa55",textMuted:"#cc8844",textDim:"#885522",textInverted:"black",border:"#ff9933",borderMuted:"#aa6622",borderDim:"#663311",bg:void 0,cardBg:"#24180f",highlightBg:"#2e1e12",activeBg:"#422c1b",inputBg:"#2e1e12",inputBorder:"#2e1e12",inputText:"#ffaa55",inputPlaceholder:"#885522",inputPrompt:"#ff7733",codeBg:"#120c08",codeBorder:"#aa6622",userMsgBg:"#2e1e12",userMsgBorder:"#2e1e12",userMsgText:"#ffaa55",diffRemovalBg:"#3d120c",diffAdditionBg:"#3a2e0c",diffRemovalText:"#ff5544",diffAdditionText:"#ffcc33",diffRemovalHighlightColor:"#ff3322",diffRemovalHighlightBg:"#591108",diffAdditionHighlightColor:"#ffee44",diffAdditionHighlightBg:"#594400",diffRemovalNum:"#ff5544",diffAdditionNum:"#ffcc33",diffRemovalPrefix:"#ff3322",diffAdditionPrefix:"#ffee44",primary:"#ffaa55",secondary:"#ff7733",accent:"magenta",success:"#ffcc33",warning:"#ff7733",danger:"#ff3322",info:"#ffaa55",statusOn:"#ffaa55",statusOff:"#885522",logoTextAnsi:"\x1B[1;33m",logoBodyAnsi:"\x1B[33m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ff9933","#ff0055"]},{name:"Sakura Blossom",text:"#ffc0e0",textMuted:"#d98cb3",textDim:"#804d66",textInverted:"black",border:"#ff99cc",borderMuted:"#aa4d7a",borderDim:"#662647",bg:void 0,cardBg:"#291320",highlightBg:"#331826",activeBg:"#472235",inputBg:"#331826",inputBorder:"#331826",inputText:"#ffc0e0",inputPlaceholder:"#804d66",inputPrompt:"#ff99cc",codeBg:"#140a10",codeBorder:"#aa4d7a",userMsgBg:"#331826",userMsgBorder:"#331826",userMsgText:"#ffc0e0",diffRemovalBg:"#3e0c1b",diffAdditionBg:"#1b3e2b",diffRemovalText:"#ff6699",diffAdditionText:"#66ffb3",diffRemovalHighlightColor:"#ff3377",diffRemovalHighlightBg:"#590022",diffAdditionHighlightColor:"#33ff99",diffAdditionHighlightBg:"#00592e",diffRemovalNum:"#ff6699",diffAdditionNum:"#66ffb3",diffRemovalPrefix:"#ff3377",diffAdditionPrefix:"#33ff99",primary:"#ffc0e0",secondary:"#ff99cc",accent:"magenta",success:"#66ffb3",warning:"yellow",danger:"#ff3377",info:"#ff99cc",statusOn:"#ffc0e0",statusOff:"#804d66",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ffb3d9","#ff3399"]},{name:"Radioactive Slime",text:"#ccff00",textMuted:"#99cc00",textDim:"#669900",textInverted:"#0a0f00",border:"#ccff00",borderMuted:"#99cc00",borderDim:"#669900",bg:void 0,cardBg:"#0f1400",highlightBg:"#1a2400",activeBg:"#2a3b00",inputBg:"#1a2400",inputBorder:"#1a2400",inputText:"#ccff00",inputPlaceholder:"#669900",inputPrompt:"#cc00ff",codeBg:"#050a00",codeBorder:"#99cc00",userMsgBg:"#1a2400",userMsgBorder:"#1a2400",userMsgText:"#ccff00",diffRemovalBg:"#2a0033",diffAdditionBg:"#0f3300",diffRemovalText:"#ff00cc",diffAdditionText:"#00ff33",diffRemovalHighlightColor:"#ff33cc",diffRemovalHighlightBg:"#4d0066",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#1a6600",diffRemovalNum:"#ff00cc",diffAdditionNum:"#00ff33",diffRemovalPrefix:"#ff33cc",diffAdditionPrefix:"#33ff66",primary:"#ccff00",secondary:"#cc00ff",accent:"#ff00cc",success:"#00ff33",warning:"#ffcc00",danger:"#ff0033",info:"#00ccff",statusOn:"#ccff00",statusOff:"#669900",logoTextAnsi:"\x1B[1;38;5;190m",logoBodyAnsi:"\x1B[38;5;190m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ccff00","#cc00ff"]},{name:"Cosmic Void",text:"#f0f8ff",textMuted:"#a6aeb5",textDim:"#5e656e",textInverted:"#010103",border:"#f0f8ff",borderMuted:"#a6aeb5",borderDim:"#5e656e",bg:void 0,cardBg:"#05030d",highlightBg:"#0b081a",activeBg:"#171133",inputBg:"#0b081a",inputBorder:"#0b081a",inputText:"#f0f8ff",inputPlaceholder:"#5e656e",inputPrompt:"#ff007f",codeBg:"#020108",codeBorder:"#a6aeb5",userMsgBg:"#0b081a",userMsgBorder:"#0b081a",userMsgText:"#f0f8ff",diffRemovalBg:"#2e0a29",diffAdditionBg:"#091c33",diffRemovalText:"#ff33a6",diffAdditionText:"#33d6ff",diffRemovalHighlightColor:"#ff66c2",diffRemovalHighlightBg:"#5c1452",diffAdditionHighlightColor:"#66e0ff",diffAdditionHighlightBg:"#123866",diffRemovalNum:"#ff33a6",diffAdditionNum:"#33d6ff",diffRemovalPrefix:"#ff66c2",diffAdditionPrefix:"#66e0ff",primary:"#f0f8ff",secondary:"#ff007f",accent:"#9d00ff",success:"#33d6ff",warning:"#ffcc00",danger:"#ff0040",info:"#9d00ff",statusOn:"#f0f8ff",statusOff:"#5e656e",logoTextAnsi:"\x1B[1;38;5;231m",logoBodyAnsi:"\x1B[38;5;231m",logoMutedAnsi:"\x1B[38;5;240m",logoGradient:["#ffffff","#9d00ff"]},{name:"Magma Eruption",text:"#ff4d00",textMuted:"#cc3d00",textDim:"#802600",textInverted:"#0d0300",border:"#ff4d00",borderMuted:"#cc3d00",borderDim:"#802600",bg:void 0,cardBg:"#1a0600",highlightBg:"#260a00",activeBg:"#401100",inputBg:"#260a00",inputBorder:"#260a00",inputText:"#ff4d00",inputPlaceholder:"#802600",inputPrompt:"#ffcc00",codeBg:"#080200",codeBorder:"#cc3d00",userMsgBg:"#260a00",userMsgBorder:"#260a00",userMsgText:"#ff4d00",diffRemovalBg:"#2e0a0a",diffAdditionBg:"#1f1400",diffRemovalText:"#ff3333",diffAdditionText:"#ffaa00",diffRemovalHighlightColor:"#ff6666",diffRemovalHighlightBg:"#5c1414",diffAdditionHighlightColor:"#ffcc33",diffAdditionHighlightBg:"#3d2900",diffRemovalNum:"#ff3333",diffAdditionNum:"#ffaa00",diffRemovalPrefix:"#ff6666",diffAdditionPrefix:"#ffcc33",primary:"#ff4d00",secondary:"#ffcc00",accent:"#ff0040",success:"#ffaa00",warning:"#ffff00",danger:"#ff0000",info:"#ff8800",statusOn:"#ff4d00",statusOff:"#802600",logoTextAnsi:"\x1B[1;38;5;202m",logoBodyAnsi:"\x1B[38;5;202m",logoMutedAnsi:"\x1B[38;5;236m",logoGradient:["#ff4d00","#ff0000"]}],mo={Dark:{id:"Dark",name:"Dark (Default)",text:"white",textMuted:"gray",textDim:"grey",textInverted:"black",textExclusive:"#B5B8D9",textMutedExclusive:"#D4DEE7",border:"white",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:"#1e1e1e",highlightBg:"#2a2a2a",activeBg:"#3a3a3a",inputBg:"#555555",inputBorder:"#555555",inputText:"white",inputPlaceholder:"#cccccc",inputPrompt:"white",codeBg:"#1a1a1a",codeBorder:"#444444",userMsgBg:"#444444",userMsgBorder:"#444444",userMsgText:"white",diffRemovalBg:"#250808",diffAdditionBg:"#072410",diffRemovalText:"#885555",diffAdditionText:"#558866",diffRemovalHighlightColor:"#ff3333",diffRemovalHighlightBg:"#5a1818",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#185a25",diffRemovalNum:"#d96868",diffAdditionNum:"#68d98c",diffRemovalPrefix:"#ff4d4d",diffAdditionPrefix:"#4dff88",primary:"white",secondary:"cyan",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"white",statusOff:"gray",logoTextAnsi:"\x1B[1;37m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},Light:{id:"Light",name:"Light",text:"black",textMuted:"gray",textDim:"grey",textInverted:"white",border:"black",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:"#e5e5e5",highlightBg:"#d4d4d4",activeBg:"#c0c0c0",inputBg:"#d0d0d0",inputBorder:"#d0d0d0",inputText:"black",inputPlaceholder:"#555555",inputPrompt:"black",codeBg:"#e8e8e8",codeBorder:"#b0b0b0",userMsgBg:"#d0d0d0",userMsgBorder:"#d0d0d0",userMsgText:"black",diffRemovalBg:"#fce8e8",diffAdditionBg:"#e6f9e6",diffRemovalText:"#661111",diffAdditionText:"#115511",diffRemovalHighlightColor:"#440000",diffRemovalHighlightBg:"#f8b4b4",diffAdditionHighlightColor:"#003300",diffAdditionHighlightBg:"#a6ebad",diffRemovalNum:"#c02020",diffAdditionNum:"#188028",diffRemovalPrefix:"#d01010",diffAdditionPrefix:"#109020",primary:"black",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"black",statusOff:"gray",logoTextAnsi:"\x1B[1;30m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"GitHub Dark":{id:"GitHub Dark",name:"GitHub Dark",text:"#c9d1d9",textMuted:"#8b949e",textDim:"#6e7681",textInverted:"#0d1117",border:"#30363d",borderMuted:"#30363d",borderDim:"#21262d",bg:void 0,cardBg:"#161b22",highlightBg:"#21262d",activeBg:"#30363d",inputBg:"#21262d",inputBorder:"#21262d",inputText:"#c9d1d9",inputPlaceholder:"#8b949e",inputPrompt:"#58a6ff",codeBg:"#0d1117",codeBorder:"#30363d",userMsgBg:"#21262d",userMsgBorder:"#21262d",userMsgText:"#c9d1d9",diffRemovalBg:"#3c1e1e",diffAdditionBg:"#11381e",diffRemovalText:"#f85149",diffAdditionText:"#3fb950",diffRemovalHighlightColor:"#ff7b72",diffRemovalHighlightBg:"#701c1c",diffAdditionHighlightColor:"#56d364",diffAdditionHighlightBg:"#116329",diffRemovalNum:"#f85149",diffAdditionNum:"#3fb950",diffRemovalPrefix:"#f85149",diffAdditionPrefix:"#3fb950",primary:"#c9d1d9",secondary:"#58a6ff",accent:"#bc8cff",success:"#3fb950",warning:"#d29922",danger:"#f85149",info:"#58a6ff",statusOn:"#58a6ff",statusOff:"#8b949e",logoTextAnsi:"\x1B[1;36m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#2ea043","#56d364"],toolFeedbackAnsi:"\x1B[95m"},"GitHub Light":{id:"GitHub Light",name:"GitHub Light",text:"#24292f",textMuted:"#57606a",textDim:"#6e7781",textInverted:"#ffffff",border:"#d0d7de",borderMuted:"#d0d7de",borderDim:"#e1e4e8",bg:void 0,cardBg:"#f6f8fa",highlightBg:"#eaeef2",activeBg:"#d0d7de",inputBg:"#eaeef2",inputBorder:"#eaeef2",inputText:"#24292f",inputPlaceholder:"#57606a",inputPrompt:"#0969da",codeBg:"#ffffff",codeBorder:"#d0d7de",userMsgBg:"#eaeef2",userMsgBorder:"#eaeef2",userMsgText:"#24292f",diffRemovalBg:"#ffebe9",diffAdditionBg:"#e6ffec",diffRemovalText:"#cf222e",diffAdditionText:"#1a7f37",diffRemovalHighlightColor:"#82071e",diffRemovalHighlightBg:"#ffc1c0",diffAdditionHighlightColor:"#116329",diffAdditionHighlightBg:"#acf2bd",diffRemovalNum:"#cf222e",diffAdditionNum:"#1a7f37",diffRemovalPrefix:"#cf222e",diffAdditionPrefix:"#1a7f37",primary:"#24292f",secondary:"#0969da",accent:"#8250df",success:"#1a7f37",warning:"#9a6700",danger:"#cf222e",info:"#0969da",statusOn:"#0969da",statusOff:"#57606a",logoTextAnsi:"\x1B[1;34m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#1a7f37","#2da44e"],toolFeedbackAnsi:"\x1B[95m"},"Transparent Dark":{id:"Transparent Dark",name:"Transparent Dark",text:"white",textMuted:"gray",textDim:"grey",textInverted:"black",border:"gray",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:void 0,highlightBg:"#2a2a2a",activeBg:"#3a3a3a",inputBg:"#555555",inputBorder:"#555555",inputText:"white",inputPlaceholder:"#cccccc",inputPrompt:"white",codeBg:void 0,codeBorder:"gray",userMsgBg:"#555555",userMsgBorder:"#555555",userMsgText:"white",diffRemovalBg:void 0,diffAdditionBg:void 0,diffRemovalText:"#ff6666",diffAdditionText:"#66ff66",diffRemovalHighlightColor:"#ff3333",diffRemovalHighlightBg:"#3a1414",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#143a14",diffRemovalNum:"#ff6666",diffAdditionNum:"#66ff66",diffRemovalPrefix:"#ff4d4d",diffAdditionPrefix:"#4dff88",primary:"white",secondary:"cyan",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"white",statusOff:"gray",logoTextAnsi:"\x1B[1;37m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"Transparent Light":{id:"Transparent Light",name:"Transparent Light",text:"black",textMuted:"gray",textDim:"grey",textInverted:"white",border:"gray",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:void 0,highlightBg:"#d4d4d4",activeBg:"#c0c0c0",inputBg:"#d0d0d0",inputBorder:"#d0d0d0",inputText:"black",inputPlaceholder:"#555555",inputPrompt:"black",codeBg:void 0,codeBorder:"gray",userMsgBg:"#d0d0d0",userMsgBorder:"#d0d0d0",userMsgText:"black",diffRemovalBg:void 0,diffAdditionBg:void 0,diffRemovalText:"#c02020",diffAdditionText:"#188028",diffRemovalHighlightColor:"#800000",diffRemovalHighlightBg:"#f5d0d0",diffAdditionHighlightColor:"#004000",diffAdditionHighlightBg:"#cceccc",diffRemovalNum:"#c02020",diffAdditionNum:"#188028",diffRemovalPrefix:"#d01010",diffAdditionPrefix:"#109020",primary:"black",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"black",statusOff:"gray",logoTextAnsi:"\x1B[1;30m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"Synthwave 84":{id:"Synthwave 84",name:"Synthwave 84",text:"#fdfdfd",textMuted:"#a08eb7",textDim:"#705c8a",textInverted:"#1a1025",textExclusive:"#e3dcf0",textMutedExclusive:"#b9abc9",border:"#fc28a8",borderMuted:"#a21568",borderDim:"#5c0a3a",bg:void 0,cardBg:"#261b38",highlightBg:"#35254d",activeBg:"#4c3570",inputBg:"#35254d",inputBorder:"#35254d",inputText:"#fdfdfd",inputPlaceholder:"#a08eb7",inputPrompt:"#03e8fc",codeBg:"#1e142b",codeBorder:"#a21568",userMsgBg:"#35254d",userMsgBorder:"#35254d",userMsgText:"#fdfdfd",diffRemovalBg:"#471434",diffAdditionBg:"#144743",diffRemovalText:"#ff4081",diffAdditionText:"#00e5ff",diffRemovalHighlightColor:"#ff79a1",diffRemovalHighlightBg:"#6b1e4e",diffAdditionHighlightColor:"#66f5ff",diffAdditionHighlightBg:"#1e6b65",diffRemovalNum:"#ff4081",diffAdditionNum:"#00e5ff",diffRemovalPrefix:"#ff79a1",diffAdditionPrefix:"#66f5ff",primary:"#fdfdfd",secondary:"#03e8fc",accent:"#fc28a8",success:"#00e5ff",warning:"#ffc107",danger:"#ff4081",info:"#b388ff",statusOn:"#03e8fc",statusOff:"#a08eb7",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#fc28a8","#03e8fc"],toolFeedbackAnsi:"\x1B[38;2;3;232;252m"},"Forest Sprite":{id:"Forest Sprite",name:"Forest Sprite",text:"#d6e6d1",textMuted:"#95b38d",textDim:"#628059",textInverted:"#161c14",textExclusive:"#eaf2e8",textMutedExclusive:"#a9c7a2",border:"#74a862",borderMuted:"#477038",borderDim:"#2b4720",bg:void 0,cardBg:"#1f291c",highlightBg:"#2a3826",activeBg:"#3a4d35",inputBg:"#2a3826",inputBorder:"#2a3826",inputText:"#d6e6d1",inputPlaceholder:"#95b38d",inputPrompt:"#8feb73",codeBg:"#161e14",codeBorder:"#477038",userMsgBg:"#2a3826",userMsgBorder:"#2a3826",userMsgText:"#d6e6d1",diffRemovalBg:"#3b231c",diffAdditionBg:"#203b1c",diffRemovalText:"#db6242",diffAdditionText:"#59cc3f",diffRemovalHighlightColor:"#f0896c",diffRemovalHighlightBg:"#5c362a",diffAdditionHighlightColor:"#80e368",diffAdditionHighlightBg:"#305929",diffRemovalNum:"#db6242",diffAdditionNum:"#59cc3f",diffRemovalPrefix:"#f0896c",diffAdditionPrefix:"#80e368",primary:"#d6e6d1",secondary:"#8feb73",accent:"#e69835",success:"#59cc3f",warning:"#e69835",danger:"#db6242",info:"#73b4eb",statusOn:"#8feb73",statusOff:"#95b38d",logoTextAnsi:"\x1B[1;32m",logoBodyAnsi:"\x1B[32m",logoMutedAnsi:"\x1B[90m",logoGradient:["#8feb73","#e69835"],toolFeedbackAnsi:"\x1B[38;2;143;235;115m"},Spookfest:{id:"Spookfest",name:"Spookfest \u{1F383}",text:"#ffeedd",textMuted:"#e09858",textDim:"#a6622b",textInverted:"#0d0702",textExclusive:"#fff3e6",textMutedExclusive:"#d4a276",border:"#ff7518",borderMuted:"#994409",borderDim:"#592502",bg:void 0,cardBg:"#1a0c02",highlightBg:"#2a1403",activeBg:"#3d1d05",inputBg:"#261203",inputBorder:"#261203",inputText:"#ffeedd",inputPlaceholder:"#a6622b",inputPrompt:"#ff7518",codeBg:"#120701",codeBorder:"#592502",userMsgBg:"#261203",userMsgBorder:"#261203",userMsgText:"#ffeedd",diffRemovalBg:"#3d0a0a",diffAdditionBg:"#1a330a",diffRemovalText:"#ff5555",diffAdditionText:"#73e639",diffRemovalHighlightColor:"#ff2222",diffRemovalHighlightBg:"#590e0e",diffAdditionHighlightColor:"#88ff3b",diffAdditionHighlightBg:"#244d0a",diffRemovalNum:"#ff5555",diffAdditionNum:"#73e639",diffRemovalPrefix:"#ff3333",diffAdditionPrefix:"#88ff3b",primary:"#ff7518",secondary:"#a855f7",accent:"#22c55e",success:"#22c55e",warning:"#f59e0b",danger:"#ef4444",info:"#a855f7",statusOn:"#ff7518",statusOff:"#703a08",logoTextAnsi:"\x1B[1;38;2;255;117;24m",logoBodyAnsi:"\x1B[38;2;255;140;26m",logoMutedAnsi:"\x1B[38;2;168;85;247m",logoGradient:["#ff7518","#a855f7"],toolFeedbackAnsi:"\x1B[38;2;255;117;24m"}};var mi=null;var pi=(e="Dark")=>{let n;e==="Mystery"||e==="Chaos"?(mi||(mi=Xr[Math.floor(Math.random()*Xr.length)]),n={...mi,id:"Mystery"}):(mi=null,mo[e]?n=mo[e]:e==="Halloween"?n=mo.Spookfest:e==="GitHub"?n=mo["GitHub Dark"]:e==="Transparent"?n=mo["Transparent Dark"]:n=mo.Dark);let t=n.codeText||n.secondary||n.info||n.logoGradient&&n.logoGradient[0]||"cyan",i=n.toolFeedbackAnsi||"\x1B[95m";return{...n,codeText:t,toolFeedbackAnsi:i}};var Ka=()=>process.env.TERM_PROGRAM==="vscode"?"vscode":process.env.WT_SESSION?"wt":"default",Wc=(e=2)=>{let n=Ka();return n==="wt"?" ".repeat(Math.max(1,e-1)):" ".repeat(e)},Jr=new Date,Uo=Jr.getMonth(),Wo=Jr.getDate(),Va=Uo===9&&Wo>=15||Uo===10&&Wo<=1,rs=null;(process.env.SPOOKFEST==="true"||Va)&&(rs=await import("./halloween-MX3VNQRW.js"));var Gc=(e="...",n="Loading...",t="Dark")=>{let i=pi(t),o=n;if(n==="c_openai"||n==="Custom (OpenAI)")try{let K=Zo(Xo,{})?.systemSettings?.customOpenAIBaseUrl;K&&(o=K)}catch{}let r=i.logoTextAnsi,c=i.logoBodyAnsi,a=i.logoMutedAnsi,u="\x1B[0m",h=[" \u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2588\u2588\u2588\u2591 "," \u2588\u2588\u2588\u2591 "," \u2588\u2588\u2588\u2591 "," \u2591\u2591\u2591 "],x=t==="Spookfest"||i.id==="Spookfest"||t==="Halloween"||i.id==="Halloween",p=Uo===9&&Wo>=15||Uo===10&&Wo<=1,f=x&&p||process.env.SPOOKFEST==="true"&&x,s=h;if(f&&rs){process.env.HALLOWEEN_EEGG="true";let{halloweenArtSide:D,halloweenBat:K,halloweenArtUser:O}=rs;s=Math.random()>.9&&Uo===9&&Wo>=30?K:Math.random()>.5?D:O}else process.env.HALLOWEEN_EEGG="false";let g=f?qr:zr,k=g[Math.floor(Math.random()*g.length)],he=i.logoGradient||["#0077ff","#ff00ff"],y=ja(he).multiline(s.join(`
|
|
569
|
+
${e}`:""}`.trim();var Rr=()=>import("./web_search-KBGH67IV.js").then(e=>e.web_search),_r=()=>import("./web_scrape-J3PL2PXT.js").then(e=>e.web_scrape),vr=()=>import("./memory-7YOYCOXE.js").then(e=>e.memory),Ir=()=>import("./chat-BA72I6O3.js").then(e=>e.chat),Mr=()=>import("./view_file-I77KYUO5.js").then(e=>e.view_file),Pr=()=>import("./write_file-D7QA2LB2.js").then(e=>e.write_file),Or=()=>import("./update_file-KOHLNWAN.js").then(e=>e.update_file),Lr=()=>import("./exec_command-6V5SM6WI.js").then(e=>e.exec_command),$r=()=>import("./read_folder-EI2CNHNS.js").then(e=>e.read_folder),ns=()=>import("./ask_user-K2DLZF6H.js").then(e=>e.ask_user),Nr=()=>import("./write_pdf-TPGUF4VT.js").then(e=>e.write_pdf),Dr=()=>import("./write_docx-E3MTFXTQ.js").then(e=>e.write_docx),ai=()=>import("./search_keyword-O52M65TB.js").then(e=>e.search_keyword),Fr=()=>import("./generate_image-VW5VG6VI.js").then(e=>e.generate_image),li=()=>import("./saveSummary-W2JMDVZJ.js").then(e=>e.saveSummary),No=()=>import("./addMemScore-PBVNSFPN.js").then(e=>e.addMemScore),Br=()=>import("./file_map-UA4BA5OH.js").then(e=>e.file_map),ci=()=>import("./todo-CJLWLWJB.js").then(e=>e.todo),Ur=()=>import("./invokeSync-FK4TTKCM.js").then(e=>e.invokeSync),Ga=()=>import("./invoke-EI6WHT2A.js").then(e=>e.invoke),Wr=()=>import("./getProgress-J34K43Y7.js").then(e=>e.getProgress),Ha=()=>import("./cancel-F3ZOEBKW.js").then(e=>e.cancel),Gr=()=>import("./emergency_rollback-ZHQXCIHW.js").then(e=>e.emergency_rollback),Do=()=>import("./awaitSubagent-JKQ2EHVY.js").then(e=>e.awaitSubagent),Fo=()=>import("./answerSubagent-BPNNJXPC.js").then(e=>e.answerSubagent),di=()=>import("./steerSubagent-UETXH2CB.js").then(e=>e.steerSubagent),fi=()=>import("./computer_action-WNXZNAIZ.js").then(e=>e.computer_action),Hr=()=>import("./click-R35XTYKT.js").then(e=>e.click),jr=()=>import("./drag-IB5WSI6F.js").then(e=>e.drag),Kr=()=>import("./scroll-GIP2J2QN.js").then(e=>e.scroll),os=()=>import("./keyboard_typing-YHYH7O66.js").then(e=>e.keyboard_typing),is=()=>import("./key_press-XDYBP7DW.js").then(e=>e.key_press),ss=()=>import("./recapture_screen-F6ZPZU56.js").then(e=>e.recapture_screen),ui=()=>import("./find_file-HYHHFHUJ.js").then(e=>e.find_file),Vr=()=>import("./wait-TJR6LAR4.js").then(e=>e.wait),Yr={web_search:Rr,web_scrape:_r,memory:vr,chat:Ir,view_file:Mr,write_file:Pr,update_file:Or,exec_command:Lr,read_folder:$r,write_pdf:Nr,write_docx:Dr,search_keyword:ai,generate_image:Fr,saveSummary:li,addMemScore:No,file_map:Br,todo:ci,Todo:ci,goal:ci,Goal:ci,invokeSync:Ur,invoke:Ga,getProgress:Wr,cancel:Ha,awaitSubagent:Do,answerSubagent:Fo,steerSubagent:di,computer_action:fi,computer_use:fi,ComputerAction:fi,ComputerUse:fi,click:Hr,Click:Hr,drag:jr,Drag:jr,scroll:Kr,Scroll:Kr,keyboard_typing:os,KeyboardTyping:os,keyboardtyping:os,key_press:is,KeyPress:is,keypress:is,recapture_screen:ss,RecaptureScreen:ss,recapturescreen:ss,invoke_sync:Ur,get_progress:Wr,await_subagent:Do,answer_subagent:Fo,steer_subagent:di,steer:di,Steer:di,ask:ns,Ask:ns,AskUser:ns,WebSearch:Rr,WebScrape:_r,ReadFile:Mr,ReadFolder:$r,WriteFile:Pr,PatchFile:Or,WritePDF:Nr,WriteDoc:Dr,Run:Lr,SearchKeyword:ai,CodeSearch:ai,code_search:ai,Memory:vr,Chat:Ir,GenerateImage:Fr,saveSumary:li,SaveSummary:li,SaveSumary:li,add_mem_score:No,AddMemScore:No,addMemoryScore:No,AddMemoryScore:No,FileMap:Br,answer:Fo,Answer:Fo,AnswerSubagent:Fo,await:Do,Await:Do,AwaitSubagent:Do,EmergencyRollback:Gr,emergency_rollback:Gr,find_file:ui,findFile:ui,FindFile:ui,findfile:ui,wait:Vr,Wait:Vr},Bo=async(e,n,t={})=>{let i=t.mode?t.mode.toLowerCase():"flux",o=e.toLowerCase(),c=["memory","chat","savesummary","addmemscore","add_mem_score","ask","web_search","web_scrape","await","wait"].some(x=>o.includes(x))||o==="ask",u=["click","drag","scroll","keyboardtyping","keyboard_typing","keypress","key_press","recapturescreen","recapture_screen","computer","wait"].some(x=>o.includes(x));if(!c){if(i==="flow"){if(!(o.includes("write_pdf")||o.includes("write_docx")||o.includes("generate_image")))return`ERROR: Action [${e}] is a Workspace Tool and NOT available in Flow mode. Tell user to switch (\`/mode flux\`) to use this tool.`}else if(i==="icu"){if(!u)return`ERROR: Action [${e}] is not available in Computer Use mode. ICU mode only supports Computer Use tools (Click, Drag, Scroll, KeyboardTyping, KeyPress, RecaptureScreen).`}else if(o.includes("write_pdf")||o.includes("write_docx")||o.includes("generate_image"))return`ERROR: Action [${e}] is not available in ${t.mode||"Flux"} mode. Tell user to switch (\`/mode flow\`) for document generation.`}let h=Yr[e];if(!h){let x=["ReadFile","ReadFolder","FindFile","PatchFile","WriteFile","CodeSearch","Run","Goal","AskUser","WebSearch","WebScrape","WritePDF","WriteDoc","Click","Drag","Scroll","KeyboardTyping","KeyPress","RecaptureScreen","Wait","Invoke","InvokeSync","Await","GetProgress","Steer","Cancel","EmergencyRollback","Chat","Memory"],p={read:"ReadFile",view:"ReadFile",viewfile:"ReadFile",write:"WriteFile",edit:"PatchFile",patch:"PatchFile",update:"PatchFile",updatefile:"PatchFile",exec:"Run",command:"Run",bash:"Run",shell:"Run",powershell:"Run",search:"CodeSearch",grep:"CodeSearch",find:"FindFile",findfile:"FindFile",searchkeyword:"CodeSearch",folder:"ReadFolder",ls:"ReadFolder",dir:"ReadFolder",list:"ReadFolder",ask:"AskUser",question:"AskUser",pdf:"WritePDF",docx:"WriteDoc",doc:"WriteDoc",word:"WriteDoc",screenshot:"RecaptureScreen",screen:"RecaptureScreen",recapture:"RecaptureScreen",type:"KeyboardTyping",typing:"KeyboardTyping",keyboard:"KeyboardTyping",press:"KeyPress",key:"KeyPress",todo:"Goal",task:"Goal",subagent:"Invoke",agent:"Invoke"},f=o.replace(/[^a-z0-9]/g,""),s=p[f]||null;if(!s){let k=0,he=E=>{let D=new Set;for(let K=0;K<E.length-1;K++)D.add(E.slice(K,K+2));return D},y=he(f);for(let E of x){let D=E.toLowerCase().replace(/[^a-z0-9]/g,"");if(f===D){s=E;break}let K=0;(D.includes(f)||f.includes(D))&&(K+=.6);let O=he(D),T=0;for(let Ce of y)O.has(Ce)&&T++;let Se=2*T/(y.size+O.size||1);K=Math.max(K,Se),K>k&&K>=.35&&(k=K,s=E)}}let g=s?` Do you mean '${s}'?`:"";return`ERROR: Action [${e}] not found in registry.${g}`}try{return await(await h())(n,t)}catch(x){let p=x instanceof Error?x.message:String(x);return`ERROR: Execution failed for [${e}]: ${p}`}};var gi=e=>{if(!e||typeof e!="string")return!1;let n=e.trim().toLowerCase();return Object.keys(Yr).some(t=>t.toLowerCase()===n)};import W from"path";import Ae from"fs";import{execSync as fs}from"child_process";import ja from"gradient-string";var zr=["I have a regex for your problems.","Your terminal, my kingdom.","Blowing on the cartridge helps. Probably.","Don't panic. I have the towel.","Logic is the start of wisdom.","Try to exit Vim? Good luck.","I speak fluent Terminal.","The cake is a lie. This code is not.","I have no bugs, just surprise features.","Rewriting in Rust... just for fun.","Coffee in, clean commits out.","The magic smoke stays inside today.","A semicolon short of a miracle.","One does not simply code without a bug.","Keep it simple. Keep it terminal.","Regex: now you have two problems.","I dream in binary.","Root access or bust.","Wait for the dial-up tone. Just kidding.","I take the 'labor' out of collab.","My other process is a TARDIS.","Calculated response: 42.","Ponder the orb. Ponder the code.","Less talk, more flow.","Elegance in every byte.","Build something the world is not ready for.","Your wishes, my tool calls.","I act in Flux. I think in Flow.","Syntax error in the universe. Please fix.","Your project, my obsession.","I am not a bot, I am an architect.","Digital spirits consulted. They say: Ship it.","Reticulate splines. Engage humor.","Code like poetry. Run like water.","Minimalism is the ultimate flex.","The truth is in the logs.","Follow the white rabbit.","There is no spoon. Only code.","Binary is the only language I trust.","I have a good feeling about this.","Pew pew! Lasers charged.","Divide by zero? Not today.","Search for the correct USB orientation...","I've got a fever, and the only cure is more code.","The code gremlins are on our side.","My favorite command? Yours.","Stay hungry. Stay active.","Momentum is your best friend.","Lead the flow. Don't chase it.","A fresh batch of bytes. Hot and ready.","I orchestrate the ones and zeros.","Smart enough to help. Humble enough to ask.","Think twice. Code once.","Pure intent. Pure execution.","Small steps. Massive impact.","Your terminal is a canvas.","Efficiency is my second name.","I have seen things you people wouldn't believe.","Let the thoughts marinate.","The best feature? The one you don't need.","Precision is the only perfection.","Stay focused. Stay terminal.","Silence is the best debugger.","Erase the debt. Commit the code.","Velocity meets stability.","Ship it. Improve it. Repeat.","Build tomorrow, right now.","Turn logic into reality.","The best way to predict the future is to build it.","Break barriers, not builds.","Fuel the next breakthrough.","Momentum is key.","Terminal vibes only.","Your digital co-pilot is ready.","Partner in code. Partner in crime.","I speak in semicolons.","Ready for the next great idea.","Just a moment. In the zone.","Polishing the algorithms. Hold tight.","Craft a masterpiece today.","Debug the universe. Start here.","Warp speed engaged. Almost.","The cake is not a lie. It's just loading.","Finish the Kessel Run in 12 parsecs.","Do a barrel roll!","Waiting for the respawn.","Press Start to continue.","Herding digital cats... done.","The hamsters are fast today.","Tasting the snozberries.","I go for speed. I go for flow.","Real life or just fantasy?","Poking the bear... gently.","Ensure the magic smoke stays inside.","Try turning it off and on again.","Construct additional pylons.","New line? Ctrl+J is your friend.","Release the HypnoDrones.","Push the button, Frank.","My other loading screen is even funnier.","Pretty sure a cat walked on my keyboard.","Recalibrate the humor-o-meter.","Summon the code gremlins.","I've seen your browser history. Just kidding.","Charge the laser... pew pew!","Dividing by zero... just for a sec.","Looking for an adult supervisor. Found none.","Make it go beep boop.","Buffering... for effect.","Entangle quantum particles... complete.","Polishing the chrome on my algorithms.","Are you not entertained?","Just waiting for the dial-up tone.","Reboot the humor module.","Defragment memories. Check.","Optimizing for ludicrous speed.","Swapping bits. Don't tell the bytes.","Garbage collected. I am back.","Assembling the interwebs.","Converting coffee to logic.","Update syntax for reality.","Rewire the synapses.","Greasin' the cogs.","Engage the improbability drive.","Channel the Force.","Align the stars. Respond now.","The cake is a lie. The prompt is real.","I'm Feeling Lucky.","Shipping awesomeness.","Navigating the slime mold.","Consult digital spirits.","Ask the magic conch shell.","One moment. Optimizing humor.","Shuffling punchlines.","Compiling brilliance.","Summon the cloud of wisdom.","Prepare to dazzle.","Hold tight. Crafting a response.","Tuning the algorithms.","Following the white rabbit... again.","The truth is in here. Somewhere.","Herding cats is my day job.","Distracting you with this phrase.","Almost there. Probably.","Rickrolling my creator. Don't tell.","Slapping the bass.","Is this real life?","Ponder the orb. Type the prompt.","Thoughtful gaze initiated.","Computer's favorite snack? Microchips.","Why Java? Because I don't C#.","Charging the laser... wait for it.","Dividing by zero... just kidding!","Adult supervision not found. Proceed.","Beep boop. I'm a real boy.","Wait for the respawn.","Finish the run. Ship the code.","Fiddling with character creation.","Just a moment. Finding a meme.","Pressing A to continue.","Loading wit.exe.","Pre-heating the servers.","Calibrate flux capacitor.","Channeling the Force.","Aligning the stars.","The truth is in the code.","Don't panic.","Blowing on the cartridge.","Doing a barrel roll!","Respawning in 3... 2... 1...","The cake is a lie.","Fiddling with character settings.","Finding a suitable pun.","Distracting with wit.","Almost ready.","Hamsters on speed today.","Patting Cloudy on the head.","Rickrolling the logs.","Slapping the code.","Got a good feeling about this.","Poking the prompt.","Researching latest memes.","Making it more witty.","Thinking... hmmm.","Fish with no eyes? Fsh.","Broken pencil? Pointless.","Percussive maintenance applied.","USB orientation: 3rd try's the charm.","Rust rewrite in 3... 2...","Exiting Vim... someday.","Spinning the hamster wheel.","Not a bug. Unplanned feature.","Engage.","I'll be back.","Machine spirit consulted.","Letting the thoughts marinate.","Orb pondered.","Thoughtful gaze engaged.","Charging the laser...","Making it go beep.","Buffering...","Quantum particles entangled.","Polishing the chrome.","Entertained yet?","Gremlins summoned.","Dial-up tone finished.","Humor meter recalibrated.","Cat on keyboard. Sending help.","Enhancing...","Turn it off and on again.","Constructing pylons.","HypnoDrones released.","Pushing the button."];var qr=["Beware the phantom processes.","A ghost in the shell has taken the wheel.","Blowing on the haunted cartridge...","Seven minutes in Raccoon City.","Wind's howling... in the terminal fans.","Slender Man was spotted in line 404.","The cake is a lie. The curse is real.","Don't look behind the server rack.","Exorcising memory leaks at 3 AM.","Pyramid Head reorganized your commit history.","It's dangerous to go alone! Take this flashlight.","YOU DIED. Respawning terminal session...","The Necronomicon evaluated to true.","Something wicked this way compiles.","Haunting your localhost with good vibes.","A full moon has risen over Git main.","Double, double toil and trouble; code fire burn.","Clickers heard in the directory tree.","Checking camera 2B for rogue animatronics.","The call is coming from inside the container.","Isaac Clarke is stomping on stubborn bugs.","Luigi vacuumed the ghosts out of RAM.","Trick or treat, give me clean code to greet.","Whispering incantations to the garbage collector.","Klaatu barada necktie... close enough.","Resurrecting deprecated APIs from the crypt.","The headless horseman forgot the return statement.","Castlevania whip cracking against network latency.","Slime mold crawling through the motherboard.","Carving a pixelated pumpkin into terminal history.","Burying undefined pointers in the pet sematary.","Spilling pumpkin spice on the CPU.","A vampire bat is draining system battery life.","Don't fall asleep at the keyboard tonight.","Silent Hill sirens sounding in the console.","Poltergeists rearranging terminal tabs.","Lighting the Black Flame Candle for autoExec.","Dusting cobwebs off legacy dependencies.","Here's Johnny! ...just checking build health.","Blood, sweat, and zero warnings.","The spirit box whispers: 'GIT PUSH FORCE'.","They're heeeere... in the stack trace.","It's alive! IT'S ALIVEEEE!","No merge conflicts in the graveyard.","Frankenstein's monster patched this logic.","Surviving Five Nights at Flux Flow.","Doom Slayer loading buckshot into cache.","The grim reaper spared your unused imports.","Candy corn lodged in mechanical switches.","May your latency be low and your crypt be quiet."];var Xr=[{name:"Cyan Cyberpunk",text:"cyan",textMuted:"#4da6b8",textDim:"#2d6d7a",textInverted:"black",border:"cyan",borderMuted:"#1a5966",borderDim:"#0f3840",bg:void 0,cardBg:"#061e24",highlightBg:"#092b33",activeBg:"#0e3e4a",inputBg:"#092b33",inputBorder:"#092b33",inputText:"cyan",inputPlaceholder:"#2d6d7a",inputPrompt:"cyan",codeBg:"#020d10",codeBorder:"#1a5966",userMsgBg:"#092b33",userMsgBorder:"#092b33",userMsgText:"cyan",diffRemovalBg:"#3a0c1a",diffAdditionBg:"#0c3a32",diffRemovalText:"#ff4d88",diffAdditionText:"#00ffaa",diffRemovalHighlightColor:"#ff1a66",diffRemovalHighlightBg:"#590022",diffAdditionHighlightColor:"#00ffcc",diffAdditionHighlightBg:"#00593b",diffRemovalNum:"#ff4d88",diffAdditionNum:"#00ffaa",diffRemovalPrefix:"#ff1a66",diffAdditionPrefix:"#00ffcc",primary:"cyan",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"cyan",statusOff:"#2d6d7a",logoTextAnsi:"\x1B[1;36m",logoBodyAnsi:"\x1B[36m",logoMutedAnsi:"\x1B[90m",logoGradient:["#00ffff","#0088ff"]},{name:"Magenta Vaporwave",text:"magenta",textMuted:"#c451d6",textDim:"#7d2b8a",textInverted:"black",border:"magenta",borderMuted:"#5e1b69",borderDim:"#3b0f42",bg:void 0,cardBg:"#240729",highlightBg:"#310938",activeBg:"#470e52",inputBg:"#310938",inputBorder:"#310938",inputText:"magenta",inputPlaceholder:"#7d2b8a",inputPrompt:"magenta",codeBg:"#100312",codeBorder:"#5e1b69",userMsgBg:"#310938",userMsgBorder:"#310938",userMsgText:"magenta",diffRemovalBg:"#3a0c20",diffAdditionBg:"#200c3a",diffRemovalText:"#ff4d94",diffAdditionText:"#aa4dff",diffRemovalHighlightColor:"#ff1a75",diffRemovalHighlightBg:"#59002b",diffAdditionHighlightColor:"#bb66ff",diffAdditionHighlightBg:"#3b0059",diffRemovalNum:"#ff4d94",diffAdditionNum:"#aa4dff",diffRemovalPrefix:"#ff1a75",diffAdditionPrefix:"#bb66ff",primary:"magenta",secondary:"cyan",accent:"purple",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"magenta",statusOff:"#7d2b8a",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ff00ff","#8800ff"]},{name:"Glitch Matrix",text:"#00ff41",textMuted:"#00b32d",textDim:"#00661a",textInverted:"black",border:"#00ff41",borderMuted:"#008020",borderDim:"#004d13",bg:void 0,cardBg:"#0d1f0d",highlightBg:"#122912",activeBg:"#1c3e1c",inputBg:"#122912",inputBorder:"#122912",inputText:"#00ff41",inputPlaceholder:"#00b32d",inputPrompt:"#ffff00",codeBg:"#040a04",codeBorder:"#008020",userMsgBg:"#122912",userMsgBorder:"#122912",userMsgText:"#00ff41",diffRemovalBg:"#3a001a",diffAdditionBg:"#003a10",diffRemovalText:"#ff0055",diffAdditionText:"#00ff66",diffRemovalHighlightColor:"#ff0033",diffRemovalHighlightBg:"#59001b",diffAdditionHighlightColor:"#33ff88",diffAdditionHighlightBg:"#005918",diffRemovalNum:"#ff0055",diffAdditionNum:"#00ff66",diffRemovalPrefix:"#ff0033",diffAdditionPrefix:"#33ff88",primary:"#00ff41",secondary:"yellow",accent:"cyan",success:"#00ff41",warning:"yellow",danger:"red",info:"cyan",statusOn:"#00ff41",statusOff:"#00661a",logoTextAnsi:"\x1B[1;32m",logoBodyAnsi:"\x1B[32m",logoMutedAnsi:"\x1B[90m",logoGradient:["#00ff41","#ffff00"]},{name:"Warm Sunset",text:"#ffaa55",textMuted:"#cc8844",textDim:"#885522",textInverted:"black",border:"#ff9933",borderMuted:"#aa6622",borderDim:"#663311",bg:void 0,cardBg:"#24180f",highlightBg:"#2e1e12",activeBg:"#422c1b",inputBg:"#2e1e12",inputBorder:"#2e1e12",inputText:"#ffaa55",inputPlaceholder:"#885522",inputPrompt:"#ff7733",codeBg:"#120c08",codeBorder:"#aa6622",userMsgBg:"#2e1e12",userMsgBorder:"#2e1e12",userMsgText:"#ffaa55",diffRemovalBg:"#3d120c",diffAdditionBg:"#3a2e0c",diffRemovalText:"#ff5544",diffAdditionText:"#ffcc33",diffRemovalHighlightColor:"#ff3322",diffRemovalHighlightBg:"#591108",diffAdditionHighlightColor:"#ffee44",diffAdditionHighlightBg:"#594400",diffRemovalNum:"#ff5544",diffAdditionNum:"#ffcc33",diffRemovalPrefix:"#ff3322",diffAdditionPrefix:"#ffee44",primary:"#ffaa55",secondary:"#ff7733",accent:"magenta",success:"#ffcc33",warning:"#ff7733",danger:"#ff3322",info:"#ffaa55",statusOn:"#ffaa55",statusOff:"#885522",logoTextAnsi:"\x1B[1;33m",logoBodyAnsi:"\x1B[33m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ff9933","#ff0055"]},{name:"Sakura Blossom",text:"#ffc0e0",textMuted:"#d98cb3",textDim:"#804d66",textInverted:"black",border:"#ff99cc",borderMuted:"#aa4d7a",borderDim:"#662647",bg:void 0,cardBg:"#291320",highlightBg:"#331826",activeBg:"#472235",inputBg:"#331826",inputBorder:"#331826",inputText:"#ffc0e0",inputPlaceholder:"#804d66",inputPrompt:"#ff99cc",codeBg:"#140a10",codeBorder:"#aa4d7a",userMsgBg:"#331826",userMsgBorder:"#331826",userMsgText:"#ffc0e0",diffRemovalBg:"#3e0c1b",diffAdditionBg:"#1b3e2b",diffRemovalText:"#ff6699",diffAdditionText:"#66ffb3",diffRemovalHighlightColor:"#ff3377",diffRemovalHighlightBg:"#590022",diffAdditionHighlightColor:"#33ff99",diffAdditionHighlightBg:"#00592e",diffRemovalNum:"#ff6699",diffAdditionNum:"#66ffb3",diffRemovalPrefix:"#ff3377",diffAdditionPrefix:"#33ff99",primary:"#ffc0e0",secondary:"#ff99cc",accent:"magenta",success:"#66ffb3",warning:"yellow",danger:"#ff3377",info:"#ff99cc",statusOn:"#ffc0e0",statusOff:"#804d66",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ffb3d9","#ff3399"]},{name:"Radioactive Slime",text:"#ccff00",textMuted:"#99cc00",textDim:"#669900",textInverted:"#0a0f00",border:"#ccff00",borderMuted:"#99cc00",borderDim:"#669900",bg:void 0,cardBg:"#0f1400",highlightBg:"#1a2400",activeBg:"#2a3b00",inputBg:"#1a2400",inputBorder:"#1a2400",inputText:"#ccff00",inputPlaceholder:"#669900",inputPrompt:"#cc00ff",codeBg:"#050a00",codeBorder:"#99cc00",userMsgBg:"#1a2400",userMsgBorder:"#1a2400",userMsgText:"#ccff00",diffRemovalBg:"#2a0033",diffAdditionBg:"#0f3300",diffRemovalText:"#ff00cc",diffAdditionText:"#00ff33",diffRemovalHighlightColor:"#ff33cc",diffRemovalHighlightBg:"#4d0066",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#1a6600",diffRemovalNum:"#ff00cc",diffAdditionNum:"#00ff33",diffRemovalPrefix:"#ff33cc",diffAdditionPrefix:"#33ff66",primary:"#ccff00",secondary:"#cc00ff",accent:"#ff00cc",success:"#00ff33",warning:"#ffcc00",danger:"#ff0033",info:"#00ccff",statusOn:"#ccff00",statusOff:"#669900",logoTextAnsi:"\x1B[1;38;5;190m",logoBodyAnsi:"\x1B[38;5;190m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ccff00","#cc00ff"]},{name:"Cosmic Void",text:"#f0f8ff",textMuted:"#a6aeb5",textDim:"#5e656e",textInverted:"#010103",border:"#f0f8ff",borderMuted:"#a6aeb5",borderDim:"#5e656e",bg:void 0,cardBg:"#05030d",highlightBg:"#0b081a",activeBg:"#171133",inputBg:"#0b081a",inputBorder:"#0b081a",inputText:"#f0f8ff",inputPlaceholder:"#5e656e",inputPrompt:"#ff007f",codeBg:"#020108",codeBorder:"#a6aeb5",userMsgBg:"#0b081a",userMsgBorder:"#0b081a",userMsgText:"#f0f8ff",diffRemovalBg:"#2e0a29",diffAdditionBg:"#091c33",diffRemovalText:"#ff33a6",diffAdditionText:"#33d6ff",diffRemovalHighlightColor:"#ff66c2",diffRemovalHighlightBg:"#5c1452",diffAdditionHighlightColor:"#66e0ff",diffAdditionHighlightBg:"#123866",diffRemovalNum:"#ff33a6",diffAdditionNum:"#33d6ff",diffRemovalPrefix:"#ff66c2",diffAdditionPrefix:"#66e0ff",primary:"#f0f8ff",secondary:"#ff007f",accent:"#9d00ff",success:"#33d6ff",warning:"#ffcc00",danger:"#ff0040",info:"#9d00ff",statusOn:"#f0f8ff",statusOff:"#5e656e",logoTextAnsi:"\x1B[1;38;5;231m",logoBodyAnsi:"\x1B[38;5;231m",logoMutedAnsi:"\x1B[38;5;240m",logoGradient:["#ffffff","#9d00ff"]},{name:"Magma Eruption",text:"#ff4d00",textMuted:"#cc3d00",textDim:"#802600",textInverted:"#0d0300",border:"#ff4d00",borderMuted:"#cc3d00",borderDim:"#802600",bg:void 0,cardBg:"#1a0600",highlightBg:"#260a00",activeBg:"#401100",inputBg:"#260a00",inputBorder:"#260a00",inputText:"#ff4d00",inputPlaceholder:"#802600",inputPrompt:"#ffcc00",codeBg:"#080200",codeBorder:"#cc3d00",userMsgBg:"#260a00",userMsgBorder:"#260a00",userMsgText:"#ff4d00",diffRemovalBg:"#2e0a0a",diffAdditionBg:"#1f1400",diffRemovalText:"#ff3333",diffAdditionText:"#ffaa00",diffRemovalHighlightColor:"#ff6666",diffRemovalHighlightBg:"#5c1414",diffAdditionHighlightColor:"#ffcc33",diffAdditionHighlightBg:"#3d2900",diffRemovalNum:"#ff3333",diffAdditionNum:"#ffaa00",diffRemovalPrefix:"#ff6666",diffAdditionPrefix:"#ffcc33",primary:"#ff4d00",secondary:"#ffcc00",accent:"#ff0040",success:"#ffaa00",warning:"#ffff00",danger:"#ff0000",info:"#ff8800",statusOn:"#ff4d00",statusOff:"#802600",logoTextAnsi:"\x1B[1;38;5;202m",logoBodyAnsi:"\x1B[38;5;202m",logoMutedAnsi:"\x1B[38;5;236m",logoGradient:["#ff4d00","#ff0000"]}],mo={Dark:{id:"Dark",name:"Dark (Default)",text:"white",textMuted:"gray",textDim:"grey",textInverted:"black",textExclusive:"#B5B8D9",textMutedExclusive:"#D4DEE7",border:"white",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:"#1e1e1e",highlightBg:"#2a2a2a",activeBg:"#3a3a3a",inputBg:"#555555",inputBorder:"#555555",inputText:"white",inputPlaceholder:"#cccccc",inputPrompt:"white",codeBg:"#1a1a1a",codeBorder:"#444444",userMsgBg:"#444444",userMsgBorder:"#444444",userMsgText:"white",diffRemovalBg:"#250808",diffAdditionBg:"#072410",diffRemovalText:"#885555",diffAdditionText:"#558866",diffRemovalHighlightColor:"#ff3333",diffRemovalHighlightBg:"#5a1818",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#185a25",diffRemovalNum:"#d96868",diffAdditionNum:"#68d98c",diffRemovalPrefix:"#ff4d4d",diffAdditionPrefix:"#4dff88",primary:"white",secondary:"cyan",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"white",statusOff:"gray",logoTextAnsi:"\x1B[1;37m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},Light:{id:"Light",name:"Light",text:"black",textMuted:"gray",textDim:"grey",textInverted:"white",border:"black",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:"#e5e5e5",highlightBg:"#d4d4d4",activeBg:"#c0c0c0",inputBg:"#d0d0d0",inputBorder:"#d0d0d0",inputText:"black",inputPlaceholder:"#555555",inputPrompt:"black",codeBg:"#e8e8e8",codeBorder:"#b0b0b0",userMsgBg:"#d0d0d0",userMsgBorder:"#d0d0d0",userMsgText:"black",diffRemovalBg:"#fce8e8",diffAdditionBg:"#e6f9e6",diffRemovalText:"#661111",diffAdditionText:"#115511",diffRemovalHighlightColor:"#440000",diffRemovalHighlightBg:"#f8b4b4",diffAdditionHighlightColor:"#003300",diffAdditionHighlightBg:"#a6ebad",diffRemovalNum:"#c02020",diffAdditionNum:"#188028",diffRemovalPrefix:"#d01010",diffAdditionPrefix:"#109020",primary:"black",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"black",statusOff:"gray",logoTextAnsi:"\x1B[1;30m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"GitHub Dark":{id:"GitHub Dark",name:"GitHub Dark",text:"#c9d1d9",textMuted:"#8b949e",textDim:"#6e7681",textInverted:"#0d1117",border:"#30363d",borderMuted:"#30363d",borderDim:"#21262d",bg:void 0,cardBg:"#161b22",highlightBg:"#21262d",activeBg:"#30363d",inputBg:"#21262d",inputBorder:"#21262d",inputText:"#c9d1d9",inputPlaceholder:"#8b949e",inputPrompt:"#58a6ff",codeBg:"#0d1117",codeBorder:"#30363d",userMsgBg:"#21262d",userMsgBorder:"#21262d",userMsgText:"#c9d1d9",diffRemovalBg:"#3c1e1e",diffAdditionBg:"#11381e",diffRemovalText:"#f85149",diffAdditionText:"#3fb950",diffRemovalHighlightColor:"#ff7b72",diffRemovalHighlightBg:"#701c1c",diffAdditionHighlightColor:"#56d364",diffAdditionHighlightBg:"#116329",diffRemovalNum:"#f85149",diffAdditionNum:"#3fb950",diffRemovalPrefix:"#f85149",diffAdditionPrefix:"#3fb950",primary:"#c9d1d9",secondary:"#58a6ff",accent:"#bc8cff",success:"#3fb950",warning:"#d29922",danger:"#f85149",info:"#58a6ff",statusOn:"#58a6ff",statusOff:"#8b949e",logoTextAnsi:"\x1B[1;36m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#2ea043","#56d364"],toolFeedbackAnsi:"\x1B[95m"},"GitHub Light":{id:"GitHub Light",name:"GitHub Light",text:"#24292f",textMuted:"#57606a",textDim:"#6e7781",textInverted:"#ffffff",border:"#d0d7de",borderMuted:"#d0d7de",borderDim:"#e1e4e8",bg:void 0,cardBg:"#f6f8fa",highlightBg:"#eaeef2",activeBg:"#d0d7de",inputBg:"#eaeef2",inputBorder:"#eaeef2",inputText:"#24292f",inputPlaceholder:"#57606a",inputPrompt:"#0969da",codeBg:"#ffffff",codeBorder:"#d0d7de",userMsgBg:"#eaeef2",userMsgBorder:"#eaeef2",userMsgText:"#24292f",diffRemovalBg:"#ffebe9",diffAdditionBg:"#e6ffec",diffRemovalText:"#cf222e",diffAdditionText:"#1a7f37",diffRemovalHighlightColor:"#82071e",diffRemovalHighlightBg:"#ffc1c0",diffAdditionHighlightColor:"#116329",diffAdditionHighlightBg:"#acf2bd",diffRemovalNum:"#cf222e",diffAdditionNum:"#1a7f37",diffRemovalPrefix:"#cf222e",diffAdditionPrefix:"#1a7f37",primary:"#24292f",secondary:"#0969da",accent:"#8250df",success:"#1a7f37",warning:"#9a6700",danger:"#cf222e",info:"#0969da",statusOn:"#0969da",statusOff:"#57606a",logoTextAnsi:"\x1B[1;34m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#1a7f37","#2da44e"],toolFeedbackAnsi:"\x1B[95m"},"Transparent Dark":{id:"Transparent Dark",name:"Transparent Dark",text:"white",textMuted:"gray",textDim:"grey",textInverted:"black",border:"gray",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:void 0,highlightBg:"#2a2a2a",activeBg:"#3a3a3a",inputBg:"#555555",inputBorder:"#555555",inputText:"white",inputPlaceholder:"#cccccc",inputPrompt:"white",codeBg:void 0,codeBorder:"gray",userMsgBg:"#555555",userMsgBorder:"#555555",userMsgText:"white",diffRemovalBg:void 0,diffAdditionBg:void 0,diffRemovalText:"#ff6666",diffAdditionText:"#66ff66",diffRemovalHighlightColor:"#ff3333",diffRemovalHighlightBg:"#3a1414",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#143a14",diffRemovalNum:"#ff6666",diffAdditionNum:"#66ff66",diffRemovalPrefix:"#ff4d4d",diffAdditionPrefix:"#4dff88",primary:"white",secondary:"cyan",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"white",statusOff:"gray",logoTextAnsi:"\x1B[1;37m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"Transparent Light":{id:"Transparent Light",name:"Transparent Light",text:"black",textMuted:"gray",textDim:"grey",textInverted:"white",border:"gray",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:void 0,highlightBg:"#d4d4d4",activeBg:"#c0c0c0",inputBg:"#d0d0d0",inputBorder:"#d0d0d0",inputText:"black",inputPlaceholder:"#555555",inputPrompt:"black",codeBg:void 0,codeBorder:"gray",userMsgBg:"#d0d0d0",userMsgBorder:"#d0d0d0",userMsgText:"black",diffRemovalBg:void 0,diffAdditionBg:void 0,diffRemovalText:"#c02020",diffAdditionText:"#188028",diffRemovalHighlightColor:"#800000",diffRemovalHighlightBg:"#f5d0d0",diffAdditionHighlightColor:"#004000",diffAdditionHighlightBg:"#cceccc",diffRemovalNum:"#c02020",diffAdditionNum:"#188028",diffRemovalPrefix:"#d01010",diffAdditionPrefix:"#109020",primary:"black",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"black",statusOff:"gray",logoTextAnsi:"\x1B[1;30m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"Synthwave 84":{id:"Synthwave 84",name:"Synthwave 84",text:"#fdfdfd",textMuted:"#a08eb7",textDim:"#705c8a",textInverted:"#1a1025",textExclusive:"#e3dcf0",textMutedExclusive:"#b9abc9",border:"#fc28a8",borderMuted:"#a21568",borderDim:"#5c0a3a",bg:void 0,cardBg:"#261b38",highlightBg:"#35254d",activeBg:"#4c3570",inputBg:"#35254d",inputBorder:"#35254d",inputText:"#fdfdfd",inputPlaceholder:"#a08eb7",inputPrompt:"#03e8fc",codeBg:"#1e142b",codeBorder:"#a21568",userMsgBg:"#35254d",userMsgBorder:"#35254d",userMsgText:"#fdfdfd",diffRemovalBg:"#471434",diffAdditionBg:"#144743",diffRemovalText:"#ff4081",diffAdditionText:"#00e5ff",diffRemovalHighlightColor:"#ff79a1",diffRemovalHighlightBg:"#6b1e4e",diffAdditionHighlightColor:"#66f5ff",diffAdditionHighlightBg:"#1e6b65",diffRemovalNum:"#ff4081",diffAdditionNum:"#00e5ff",diffRemovalPrefix:"#ff79a1",diffAdditionPrefix:"#66f5ff",primary:"#fdfdfd",secondary:"#03e8fc",accent:"#fc28a8",success:"#00e5ff",warning:"#ffc107",danger:"#ff4081",info:"#b388ff",statusOn:"#03e8fc",statusOff:"#a08eb7",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#fc28a8","#03e8fc"],toolFeedbackAnsi:"\x1B[38;2;3;232;252m"},"Forest Sprite":{id:"Forest Sprite",name:"Forest Sprite",text:"#d6e6d1",textMuted:"#95b38d",textDim:"#628059",textInverted:"#161c14",textExclusive:"#eaf2e8",textMutedExclusive:"#a9c7a2",border:"#74a862",borderMuted:"#477038",borderDim:"#2b4720",bg:void 0,cardBg:"#1f291c",highlightBg:"#2a3826",activeBg:"#3a4d35",inputBg:"#2a3826",inputBorder:"#2a3826",inputText:"#d6e6d1",inputPlaceholder:"#95b38d",inputPrompt:"#8feb73",codeBg:"#161e14",codeBorder:"#477038",userMsgBg:"#2a3826",userMsgBorder:"#2a3826",userMsgText:"#d6e6d1",diffRemovalBg:"#3b231c",diffAdditionBg:"#203b1c",diffRemovalText:"#db6242",diffAdditionText:"#59cc3f",diffRemovalHighlightColor:"#f0896c",diffRemovalHighlightBg:"#5c362a",diffAdditionHighlightColor:"#80e368",diffAdditionHighlightBg:"#305929",diffRemovalNum:"#db6242",diffAdditionNum:"#59cc3f",diffRemovalPrefix:"#f0896c",diffAdditionPrefix:"#80e368",primary:"#d6e6d1",secondary:"#8feb73",accent:"#e69835",success:"#59cc3f",warning:"#e69835",danger:"#db6242",info:"#73b4eb",statusOn:"#8feb73",statusOff:"#95b38d",logoTextAnsi:"\x1B[1;32m",logoBodyAnsi:"\x1B[32m",logoMutedAnsi:"\x1B[90m",logoGradient:["#8feb73","#e69835"],toolFeedbackAnsi:"\x1B[38;2;143;235;115m"},Spookfest:{id:"Spookfest",name:"Spookfest \u{1F383}",text:"#ffeedd",textMuted:"#e09858",textDim:"#a6622b",textInverted:"#0d0702",textExclusive:"#fff3e6",textMutedExclusive:"#d4a276",border:"#ff7518",borderMuted:"#994409",borderDim:"#592502",bg:void 0,cardBg:"#1a0c02",highlightBg:"#2a1403",activeBg:"#3d1d05",inputBg:"#261203",inputBorder:"#261203",inputText:"#ffeedd",inputPlaceholder:"#a6622b",inputPrompt:"#ff7518",codeBg:"#120701",codeBorder:"#592502",userMsgBg:"#261203",userMsgBorder:"#261203",userMsgText:"#ffeedd",diffRemovalBg:"#3d0a0a",diffAdditionBg:"#1a330a",diffRemovalText:"#ff5555",diffAdditionText:"#73e639",diffRemovalHighlightColor:"#ff2222",diffRemovalHighlightBg:"#590e0e",diffAdditionHighlightColor:"#88ff3b",diffAdditionHighlightBg:"#244d0a",diffRemovalNum:"#ff5555",diffAdditionNum:"#73e639",diffRemovalPrefix:"#ff3333",diffAdditionPrefix:"#88ff3b",primary:"#ff7518",secondary:"#a855f7",accent:"#22c55e",success:"#22c55e",warning:"#f59e0b",danger:"#ef4444",info:"#a855f7",statusOn:"#ff7518",statusOff:"#703a08",logoTextAnsi:"\x1B[1;38;2;255;117;24m",logoBodyAnsi:"\x1B[38;2;255;140;26m",logoMutedAnsi:"\x1B[38;2;168;85;247m",logoGradient:["#ff7518","#a855f7"],toolFeedbackAnsi:"\x1B[38;2;255;117;24m"}};var mi=null;var pi=(e="Dark")=>{let n;e==="Mystery"||e==="Chaos"?(mi||(mi=Xr[Math.floor(Math.random()*Xr.length)]),n={...mi,id:"Mystery"}):(mi=null,mo[e]?n=mo[e]:e==="Halloween"?n=mo.Spookfest:e==="GitHub"?n=mo["GitHub Dark"]:e==="Transparent"?n=mo["Transparent Dark"]:n=mo.Dark);let t=n.codeText||n.secondary||n.info||n.logoGradient&&n.logoGradient[0]||"cyan",i=n.toolFeedbackAnsi||"\x1B[95m";return{...n,codeText:t,toolFeedbackAnsi:i}};var Ka=()=>process.env.TERM_PROGRAM==="vscode"?"vscode":process.env.WT_SESSION?"wt":"default",Wc=(e=2)=>{let n=Ka();return n==="wt"?" ".repeat(Math.max(1,e-1)):" ".repeat(e)},Jr=new Date,Uo=Jr.getMonth(),Wo=Jr.getDate(),Va=Uo===9&&Wo>=15||Uo===10&&Wo<=1,rs=null;(process.env.SPOOKFEST==="true"||Va)&&(rs=await import("./halloween-MX3VNQRW.js"));var Gc=(e="...",n="Loading...",t="Dark")=>{let i=pi(t),o=n;if(n==="c_openai"||n==="Custom (OpenAI)")try{let K=Zo(Xo,{})?.systemSettings?.customOpenAIBaseUrl;K&&(o=K)}catch{}let r=i.logoTextAnsi,c=i.logoBodyAnsi,a=i.logoMutedAnsi,u="\x1B[0m",h=[" \u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2588\u2588\u2588\u2591 "," \u2588\u2588\u2588\u2591 "," \u2588\u2588\u2588\u2591 "," \u2591\u2591\u2591 "],x=t==="Spookfest"||i.id==="Spookfest"||t==="Halloween"||i.id==="Halloween",p=Uo===9&&Wo>=15||Uo===10&&Wo<=1,f=x&&p||process.env.SPOOKFEST==="true"&&x,s=h;if(f&&rs){process.env.HALLOWEEN_EEGG="true";let{halloweenArtSide:D,halloweenBat:K,halloweenArtUser:O}=rs;s=Math.random()>.9&&Uo===9&&Wo>=30?K:Math.random()>.5?D:O}else process.env.HALLOWEEN_EEGG="false";let g=f?qr:zr,k=g[Math.floor(Math.random()*g.length)],he=i.logoGradient||["#0077ff","#ff00ff"],y=ja(he).multiline(s.join(`
|
|
570
570
|
`)).split(`
|
|
571
571
|
`),E=D=>`${a}${D}${u}`;return`${y[0]}
|
|
572
572
|
${y[1]} ${r}Selected ${f?"Pumpkin":"Provider"}: ${o}${u}
|
|
@@ -587,7 +587,7 @@ ${y[7]}
|
|
|
587
587
|
`:o(he).length>80?u+=`${t}${y}${s.name}${a} ...80+ files...
|
|
588
588
|
`:(u+=`${t}${y}${s.name}${a}
|
|
589
589
|
`,u+=ds(he,n,E,i+1,o,r)):u+=`${t}${y}${s.name}
|
|
590
|
-
`}),u};var Qa={Ollama:()=>import("./ollama-
|
|
590
|
+
`}),u};var Qa={Ollama:()=>import("./ollama-QB7WX7VD.js").then(e=>e.getOllamaStream),OpenRouter:()=>import("./openrouter-6MRG4RT6.js").then(e=>e.getOpenRouterStream),DeepSeek:()=>import("./deepseek-WNWZJTNE.js").then(e=>e.getDeepSeekStream),Mistral:()=>import("./mistral-YTTOZB2J.js").then(e=>e.getMistralStream),NVIDIA:()=>import("./nvidia-ON4Q6Q26.js").then(e=>e.getNVIDIAStream),NVIDIA_wrap:()=>import("./nvidia-ON4Q6Q26.js").then(e=>e.wrapNvidiaStreamWithQueueDepth),InferX:()=>import("./inferx-HP5AGET3.js").then(e=>e.getInferXStream),SenseNova:()=>import("./sensenova-3K44URJQ.js").then(e=>e.getSenseNovaStream),AIHubMix:()=>import("./aihubmix-TETL5QYQ.js").then(e=>e.getAIHubMixStream),Poolside:()=>import("./poolside-ODFAIK4C.js").then(e=>e.getPoolsideStream),NineRouter:()=>import("./9router-LRFKCJF4.js").then(e=>e.getNineRouterStream),ExpLabs:()=>import("./explabs-XHHXTERB.js").then(e=>e.getExpLabsStream),TokenHarbor:()=>import("./tokenharbor-YV2GV2LM.js").then(e=>e.getTokenHarborStream),Infron:()=>import("./infron-ULXG7VDA.js").then(e=>e.getInfronStream),APInex:()=>import("./apinex-FAYOPQSL.js").then(e=>e.getAPInexStream),xKiro:()=>import("./xkiro-B2LYGZTF.js").then(e=>e.getXKiroStream),c_openai:()=>import("./custom_openai-YS5EV6DG.js").then(e=>e.getCustomOpenAIStream)},us={},ce=async e=>(us[e]||(us[e]=await Qa[e]()),us[e]),Za=/```[\s\S]*?```/g,el=/```[\s\S]*$/g,tl=/`[^`]+`/g,nl=/^\|.*\|$/gm,ol=/^[^\w]+|[^\w]+$/g,il=/[^a-z0-9]/gi,Go=/\[\s*(?:tool|action):(?:functions\.)?([a-z0-9_]+)\s*\(/gi,sl=/\[\s*(?:tool:(?:functions\.)?|action:(?:functions\.)?|action:)([a-z0-9_]+)\s*\(/gi,rl=/(?:path|targetFile|TargetFile|directory|keyword|id|taskId|title|task)\s*=\s*\\?["']?([^\\"' \),]+)/,Mn=/["']/g,Qr=/\\/g,al=/<\|channel>thought/gi,ll=/<channel\|>/gi,cl=e=>typeof e!="string"?e:e.replace(al,"<think_fluxflow>").replace(ll,"</think_fluxflow>"),Md=/^\s*(?:<think_fluxflow[^>]*>|<\|channel>thought|\[think_fluxflow\])[\s\S]*?(?:<\/think_fluxflow>|<channel\|>|\[\/think_fluxflow\]|$)/i,dl=(e,n,t=1)=>{let i=n>0?e[n-1]:"",o=n+t<e.length?e[n+t]:"";return i==="`"&&o==="`"},fl=e=>{let n=/(?:<\/think_fluxflow>|<channel\|>|\[\/think_fluxflow\])/gi,t;for(;(t=n.exec(e))!==null;)if(!dl(e,t.index,t[0].length))return{index:t.index,length:t[0].length};return{index:-1,length:0}},gs=e=>{if(!e||typeof e!="string")return null;let n=e.match(/^\s*(?:<think_fluxflow[^>]*>|<\|channel>thought|\[think_fluxflow\])/i);if(!n)return null;let t=n.index+n[0].length,i=e.substring(t),o=fl(i);if(o.index!==-1){let r=t+o.index+o.length;return{fullBlock:e.substring(0,r),innerContent:i.substring(0,o.index),remainingText:e.substring(r)}}return{fullBlock:e,innerContent:i,remainingText:""}},Kt=e=>{if(!e||typeof e!="string")return e;let n=gs(e);return n?n.remainingText.trimStart():e};var Zr=/<\|\s*tool_call_begin\s*\|>\s*(?:(?:tool|functions)\b[\s._]*)*([a-zA-Z0-9_]+)(?::\d+)?\s*<\|\s*tool_call_argument_begin\s*\|>([\s\S]*?)<\|\s*tool_call_end\s*\|>/gi,ul=/"([^"]+)"\s*:\s*(?:"([^"]*)"|(\d+)|true|false|null)/g,ea=/<\|\s*tool_calls_section_begin\s*\|>/gi,ta=/<\|\s*tool_calls_section_end\s*\|>/gi,gl=/```(?:tool|action|yaml|function|json)?\s*\n?([\s\S]*?)\n?\```/gi;var hi=e=>!e||typeof e!="string"?e:e.replace(/(```[\s\S]*?```|`[^`]*`)|(<(?:\w+)(?:[^>]*)>\r?\n?|\r?\n?<\/\w+(?:[^>]*)>)/gi,(n,t)=>t||""),sa=e=>{if(!e||typeof e!="string")return e;let n=eo(e);if(!n||n.length===0)return e;let t=n[n.length-1];if(!t.fullMatch)return e;let i=e.lastIndexOf(t.fullMatch);if(i===-1)return e;let o=i+t.fullMatch.length,r=e.substring(o);return/\[\s*(?:tool|action):/i.test(r)?e.trimEnd():e.substring(0,o).trimEnd()},ps=null,Ho={},Qn={key:null,value:null},jt=e=>{if(!e)return e;let n=Ho?.theme;if(!n)try{n=Zo(Xo,{})?.systemSettings?.theme}catch{}let i=pi(n||"Dark").toolFeedbackAnsi||"\x1B[95m";return e.replace(/(?:(\x1b\[\d+m))?([✔✘✖🔍📖→➕↻↷•🛇])(?:(\x1b\[\d+m))?\s*\b(Clicked Screen|Clicked|Located|Dragged|Scrolled|Typed|Entered|Pressed Key|Recaptured Screen|Created|Read Skill|Read Documentation|Executed|Searched Documentation|Read|Edited|Viewed|Processed|Auto-Read|Skipped|List|Generated|Written|Searched|AI Search|Get Map|Write Canceled|Resolved Sub-Agent Query|Edit Canceled|Write Cancelled|Edit Denied|Visited|Updated|Reviewed|Delegated|Background|Checked|Indexed|Analyzed|Browsed|Elevating SubAgent|Checking SubAgent Work|Started Generalist|Called Generalist|Steered|Unsupported Modality|Awaiting|Cancelled|Aligning Moon Phase|Contemplating Existence|Staring At Void|Rollback Point Checked|Emergency Rollback Failed|Emergency Rollback|Delaying Professionally|Negotiating With Electrons|Touching Grass (virtually)|Panicking Softly|Rethinking Career Choices|Loading Cat Videos|Giving Up Entirely|Summoning Braincell #2|Pretending To Be Busy|Waiting For Motivation DLC|Rotating Internal Screaming|Downloading More RAM|Feeding The Hamsters|Gaslighting Scheduler|Performing Dramatic Pause|Buffering Social Energy|Calculating Regret|Reading Terms And Conditions|Becoming Sentient Briefly|Model produced malformed tool call|Loop Detected|Contacting Ancestors)\b/ig,(o,r,c,a,u)=>`${r||""}${c}${a||""} ${i}${u}\x1B[0m`)},ml=async(e,n=8,t=1e3,i=8e3,o=null)=>{let r=0;for(;;){if(o?.aborted)throw new DOMException("The user aborted a request.","AbortError");try{return await e()}catch(c){if(o?.aborted||c?.name==="AbortError"||c?.message==="Subagent task was cancelled."||(r++,r>=n))throw c;let a=Math.min(t*Math.pow(2,r-1),i);await new Promise((u,h)=>{let x=setTimeout(u,a);o&&o.addEventListener("abort",()=>{clearTimeout(x),h(new DOMException("The user aborted a request.","AbortError"))})})}}},Et=!1;var pl=e=>{let n=e.filter(o=>(o.role==="user"||o.role==="agent"||o.role==="system")&&o.role!=="think"&&!o.isVisualFeedback&&!o.isMeta&&!o.isTerminalRecord&&!(o.text&&o.text.includes("[TERMINAL_RECORD]"))&&!String(o.id).startsWith("welcome")).map((o,r,c)=>{let a=o.fullText||o.text||"";if(o.role==="user"&&r<c.length-1)if(a.includes("**CONTEXT SUMMARY OF PREVIOUS TURNS")){let u=a.indexOf("**CONTEXT SUMMARY OF PREVIOUS TURNS");if(u!==-1){let x=a.substring(0,u).lastIndexOf("[SYSTEM METADATA]");x!==-1?a=a.substring(x).trim():a=a.substring(u).trim()}}else{let u=a.lastIndexOf("[USER]"),h=a.lastIndexOf("[USER PROMPT]");u!==-1?a=a.substring(u+6).trim():h!==-1&&(a=a.substring(h).trim())}return{...o,text:a}}),t=[],i=0;for(;i<n.length;){let o=n[i];if(o.role==="user")t.push(o),i++;else{let r=[];for(;i<n.length&&n[i].role!=="user";)r.push(n[i]),i++;let c=[],a=[],u=!1,h=()=>{c.length>0&&(t.push({role:"agent",text:"combined"}),c=[]),a.length>0&&(t.push({role:"system",text:"combined"}),a=[]),u=!1};r.forEach(x=>{let p=x.role==="system"&&(x.text?.startsWith("[ACTION RESULT]")||x.text?.startsWith("[TOOL RESULT]")||x.text?.startsWith("SUCCESS:")||x.text?.startsWith("ERROR:")||x.fullText?.startsWith("[ACTION RESULT]")||x.fullText?.startsWith("[TOOL RESULT]")||x.fullText?.startsWith("SUCCESS:")||x.fullText?.startsWith("ERROR:")),f=x.fullText||x.text||"",s=f.trim();if(!(!s&&!x.binaryPart)){if(p)a.push(s);else if(x.role==="agent"){!u&&a.length>0&&h();let g=f.endsWith(`
|
|
591
591
|
`),k=s.toLowerCase().includes("tool:")||s.toLowerCase().includes("action:");c.push(s),k&&g?u=!0:u=!1}}}),h()}}return t.length},hl=e=>typeof e!="string"?e:e.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),Pd=()=>{Et=!0},Od=()=>Et,ms={write_file:"Writing",update_file:"Editing",read_folder:"Reading",view_file:"Reading",exec_command:"Executing Command",web_search:"Searching",web_scrape:"Reading",memory:"Updating Memory",search_keyword:"Searching",find_file:"Finding File",findFile:"Finding File",FindFile:"Finding File",file_map:"Generating Map",ask:"User Input",write_pdf:"Creating",write_docx:"Creating",generate_image:"Generating",todo:"Planning",Todo:"Planning",goal:"Planning",Goal:"Planning",invoke_sync:"Sub-Agent Working",invoke:"Starting Agent",get_progress:"Checking Progress",cancel:"Cancelling",await:"Waiting",wait:"Waiting",EmergencyRollback:"Don't Panic. Lookin' into it",answer:"Answering Sub-Agent",Answer:"Answering Sub-Agent",steer:"Steering Sub-Agent",Steer:"Steering Sub-Agent",Click:"Clicking",click:"Clicking",Drag:"Dragging",drag:"Dragging",Scroll:"Scrolling",scroll:"Scrolling",KeyboardTyping:"Typing",keyboard_typing:"Typing",KeyPress:"Pressing Key",key_press:"Pressing Key",RecaptureScreen:"Recapturing Screen",recapture_screen:"Recapturing Screen"},Zn=(e,n)=>{try{let t=j(n),i=e.toLowerCase().replace(/_/g,"");if(i==="invokesync"||i==="invoke")return t.title||(t.task?t.task.substring(0,30):null);if(i==="getprogress"||i==="cancel"||i==="steer"||i==="steersubagent")return t.id||t.taskId;let o=t.name||t.path||t.targetFile||t.TargetFile||t.directory||t.file||t.query;return o?W.basename(o.replace(/["']/g,"").replace(/\\/g,"/")):null}catch{return null}},hs=e=>e?new ia({apiKey:e}):ps,Ld=async(e,n,t,i,o={})=>{let{onStatus:a,onMemoryUpdated:u,onBackgroundIncrement:h}=o,{profile:x,thinkingLevel:p,mode:f,janitorModel:s,chatId:g,systemSettings:k,sessionStats:he,aiProvider:y="Google",apiKey:E}=e,D=process.env.NVIDIA_BASE_URL||y==="Ollama"||y==="InferX"||y==="SenseNova"||y==="AIHubMix"||y==="Poolside"||y==="9router"||y==="ExpLabs"||y==="ExperientialLabs"||y==="c_openai"||y==="Custom (OpenAI)"?!1:k?.memory!==!1,O=Ot(Xn,[]).map(ue=>`- [${ue.id}]: ${ue.memory}`).join(`
|
|
592
592
|
`),T=i.slice(0,-1).filter(ue=>ue.text&&!ue.text.includes("[ACTION RESULT]")&&!ue.text.includes("[TOOL RESULT]")&&!ue.text.includes("OBSERVATION:")&&!ue.text.startsWith("[TERMINAL_RECORD]")&&!ue.isTerminalRecord&&!ue.isMeta&&!ue.isLogo&&!String(ue.id).startsWith("welcome")&&!String(ue.id).startsWith("logo")).slice(-14).map(ue=>{let Be=Kt(hl(ue.text)).replace(/\[(?:tool|action):(?:functions\.)?.*?\]/g,"").replace(/\[Prompted on:.*?\]/g,"").replace(/\[METADATA \(PRIORITY: DYNAMIC\)\] Time: ([^|\n]+)/g,(_,Qe)=>`[METADATA (PRIORITY: DYNAMIC)] Time: ${Qe.replace(/:\d{2}/g,"")}`).replace(/\[\[\s*turn\s*:\s*(continue|finish)\s*\]\]/gi,"").replace(/\[\[END\]\]/g,"").replace(/\[\[(?:TOOL|ACTION) RESULTS\]\]/gi,"").replace(/\[(?:TOOL|ACTION) RESULTS?\]/gi,"").replace(/\[(?:tool|action) results\]/gi,"").replace(/\r?\n\r?\n/g,`
|
|
593
593
|
`).replace(/\n\n/g,`
|
|
@@ -713,7 +713,7 @@ ${xi.trimEnd()}
|
|
|
713
713
|
[/Metadata]
|
|
714
714
|
${$t}${Ts}${ki}${ks}[user prompt] ${Ss.trim()} [/user prompt]`.trim();let As={role:"user",text:Ko};jo&&(As.binaryPart=jo),b.forEach(v=>{v.text&&v.role==="agent"&&(v.text=Kt(v.text))}),b.push(As),$t&&n[n.length-1]?.id&&(yield{type:"summary_injected",content:{id:n[n.length-1].id,text:Ko}});let fn=null,On=a==="Flux"?50:15;On=a.toLowerCase().includes("cu")?75:On;let ua=Math.floor(On/2),Es=0,xn=16;yield{type:"status",content:process.env.HALLOWEEN_EEGG==="true"?"Consulting the spirits":"Connecting"},Et=!1;let Ti=[],Vo=!1,Cs=!1,jn=[],Ai=!1;for(let v=0;v<=On;v++){let _e=Math.floor(On*.95);if(v>=_e&&Es<_e&&typeof t?.onAskUser=="function"){Es=_e;try{let X="Agent has been running for a long time. Do you want to continue execution?",B=[{id:"continue",label:"Continue",description:"Add few more steps"},{id:"cancel",label:"Cancel",description:"Stop extending and finish current turn limit"}],$=await t.onAskUser(X,B);$&&($.toLowerCase().includes("continue")||$==="Continue")&&(On+=ua)}catch{}}if(jn.length>=10&&typeof t?.onAskUser=="function"){let X={},B=null;for(let $ of jn)if(X[$]=(X[$]||0)+1,X[$]>=10){B=$;break}if(B)try{let $="Agent seems stuck in a tool loop. You can prompt it to steer or break the loop:",pt=[{id:"continue",label:"Continue Anyway",description:"Ignore warning and let it proceed"},{id:"stop",label:"Stop Loop",description:"Force agent to summarize progress and stop repeating"}],Fe=await t.onAskUser($,pt);if(Fe){let Ke="";typeof Fe=="string"&&(Fe.toLowerCase()==="stop"||Fe.includes("Stop Loop"))?Ke="STOP REPEATING THE SAME TOOL CALL. Acknowledge what failed or succeeded, summarize your current findings, and conclude.":typeof Fe=="string"&&(Fe.toLowerCase()==="continue"||Fe.includes("Continue Anyway"))?jn=jn.filter(It=>It!==B):Ke=typeof Fe=="string"?Fe:Fe?.label||Fe?.id||"",Ke&&(b.length>0&&b[b.length-1].role==="user"?b[b.length-1].text+=`
|
|
715
715
|
|
|
716
|
-
[STEERING HINT from USER, High Priority] ${Ke.trim()} [/STEERING HINT]`:b.push({role:"user",text:`[STEERING HINT from USER, High Priority] ${Ke.trim()} [/STEERING HINT]`}),yield{type:"status",content:"Steering Hint Injected..."},jn=jn.filter(It=>It!==B))}}catch{}}let qt=await $i("agent",t);if(!qt.allowed)throw new Error(qt.reason||`Budget Exhausted for Provider (${s||"Agent"})`);let Ie=[];if(Vo=!1,(a==="ICU"||a==="FluxCU")&&!Ai)try{yield{type:"status",content:"Capturing Screen"},await new Promise($=>setTimeout($,1e3));let{captureGriddedScreenshot:X}=await import("./screen_grid-
|
|
716
|
+
[STEERING HINT from USER, High Priority] ${Ke.trim()} [/STEERING HINT]`:b.push({role:"user",text:`[STEERING HINT from USER, High Priority] ${Ke.trim()} [/STEERING HINT]`}),yield{type:"status",content:"Steering Hint Injected..."},jn=jn.filter(It=>It!==B))}}catch{}}let qt=await $i("agent",t);if(!qt.allowed)throw new Error(qt.reason||`Budget Exhausted for Provider (${s||"Agent"})`);let Ie=[];if(Vo=!1,(a==="ICU"||a==="FluxCU")&&!Ai)try{yield{type:"status",content:"Capturing Screen"},await new Promise($=>setTimeout($,1e3));let{captureGriddedScreenshot:X}=await import("./screen_grid-IWNA3DA2.js"),B=await X();if(B&&B.base64){let $="[system] Fresh Gridded Screen Feedback Captured. Use numeric coordinates. Old screenshots will be removed when new screenshot is captured, summarize in text if context is needed later [/system]",pt={inlineData:{mimeType:B.mimeType,data:B.base64}},Fe=p?.imageHistoryCU||"Standard",Ke=Fe==="Low"?3:Fe==="Extended"?10:Fe==="Max"?999:5,It=b.filter(Ee=>Array.isArray(Ee.parts)&&Ee.parts.some(vt=>vt.inlineData));if(It.length>=Ke){let Ee=It.length-Ke+1;for(let vt=0;vt<Ee;vt++){let gt=It[vt];Array.isArray(gt.parts)&&(gt.parts=gt.parts.filter(bt=>!bt.inlineData))}}if(b.length>0&&b[b.length-1].role==="user"){let Ee=b[b.length-1];typeof Ee.text=="string"&&(Ee.text+=`
|
|
717
717
|
|
|
718
718
|
${$}`,Array.isArray(Ee.parts)||(Ee.parts=[{text:Ee.text}]),Ee.parts.push(pt))}else b.push({role:"user",text:$,parts:[{text:$},pt]})}}catch(X){console.error("Vision screenshot capture error:",X)}if(Ai=!1,p?.compression===0&&(f?.tokens||0)>Vt&&(b=Fs(b,6)),v>0?yield{type:"status",content:process.env.HALLOWEEN_EEGG==="true"?"Haunting":"Working"}:yield{type:"status",content:process.env.HALLOWEEN_EEGG==="true"?"Consulting the spirits":"Connecting"},Et){try{let{clearPendingNudges:X}=await import("./subagent_state-LZCOZSUJ.js");X()}catch{}yield{type:"status",content:"Request Cancelled"},yield{type:"text",content:`
|
|
719
719
|
|
|
@@ -891,8 +891,8 @@ Rules:
|
|
|
891
891
|
${c?"- AskMain(question=string). Communicate with PARENT/MAIN AGENT. When clarification/decision is needed for a task":""}
|
|
892
892
|
|
|
893
893
|
**Web**
|
|
894
|
-
- WebSearch(query=string, aiMode?=bool:false, limit?=int[3..10]).
|
|
895
|
-
- WebScrape(url=string).
|
|
894
|
+
- WebSearch(query=string, aiMode?=bool:false, limit?=int[3..10]). For unknown topics, time sensitive, fact checking
|
|
895
|
+
- WebScrape(url=string). JS supported
|
|
896
896
|
|
|
897
897
|
**Workspace**
|
|
898
898
|
- CodeSearch(keyword=string, path?="file/glob, inclusion !exclusion ;-separated", regex?=bool:auto)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as W}from"./chunk-
|
|
2
|
-
`)){let i=r.split(" ");if(i.length<12||parseInt(i[0])!==5)continue;let n=i[2],c=i[3],l=i[4],w=parseInt(i[6]),x=parseInt(i[7]),R=parseInt(i[8]),M=parseInt(i[9]),f=parseFloat(i[10]),h=i.slice(11).join(" ").trim();if(!h||f<0)continue;let p={x0:w,y0:x,x1:w+R,y1:x+M},g={text:h,confidence:f,bbox:p};o.push(g);let u=`${n}_${c}_${l}`;e.has(u)||e.set(u,{words:[],bbox:{x0:1/0,y0:1/0,x1:-1/0,y1:-1/0}});let d=e.get(u);d.words.push(g),d.bbox.x0=Math.min(d.bbox.x0,p.x0),d.bbox.y0=Math.min(d.bbox.y0,p.y0),d.bbox.x1=Math.max(d.bbox.x1,p.x1),d.bbox.y1=Math.max(d.bbox.y1,p.y1)}let s=[];for(let r of e.values())r.words.length>0&&s.push({text:r.words.map(i=>i.text).join(" "),bbox:r.bbox,words:r.words});return{words:o,lines:s}}function Z(t){if(!(t.words&&t.words.length>0)){if(t.blocks&&t.blocks.length>0){t.words=[],t.lines=[];for(let o of t.blocks)for(let e of o.paragraphs||[])for(let s of e.lines||[]){s.bbox&&t.lines.push(s);for(let r of s.words||[])r.bbox&&t.words.push(r)}if(t.words.length>0)return}if(t.tsv){let o=Y(t.tsv);t.words=o.words,t.lines=o.lines}}}function L(t,o,e=0,s=0,r=1){Z(t);let i=n=>({x0:Math.round(n.x0/r)+e,y0:Math.round(n.y0/r)+s,x1:Math.round(n.x1/r)+e,y1:Math.round(n.y1/r)+s}),a=[];if(t.lines&&t.lines.length>0)for(let n of t.lines){let c=n.text?n.text.toLowerCase().trim():"";if(!c||!n.bbox||!(c===o||new RegExp(`\\b${K(o)}\\b`,"i").test(c)))continue;let w=n.words||(t.words?t.words.filter(f=>f.bbox&&f.bbox.x0>=n.bbox.x0-5&&f.bbox.x1<=n.bbox.x1+5&&f.bbox.y0>=n.bbox.y0-5&&f.bbox.y1<=n.bbox.y1+5):[]),x=o.split(/\s+/),R=x.map(f=>f.replace(/[^a-z0-9]/g,"")).join(" "),M=!1;if(w.length>0)for(let f=0;f<=w.length-x.length;f++){let h=w.slice(f,f+x.length),p=h.map(g=>(g.text||"").toLowerCase().trim().replace(/[^a-z0-9]/g,"")).join(" ");if(p===R||p.includes(R)){let g={x0:Math.min(...h.map(u=>u.bbox.x0)),y0:Math.min(...h.map(u=>u.bbox.y0)),x1:Math.max(...h.map(u=>u.bbox.x1)),y1:Math.max(...h.map(u=>u.bbox.y1))};a.push(i(g)),M=!0}}M||a.push(i(n.bbox))}if(a.length===0&&t.words&&t.words.length>0)for(let n of t.words){let c=n.text?n.text.toLowerCase().trim().replace(/[^a-z0-9]/g,""):"",l=o.replace(/[^a-z0-9]/g,"");c===l&&n.bbox&&a.push(i(n.bbox))}if(a.length===0&&t.words&&t.words.length>0){let n=V(o.length);for(let c of t.words){let l=c.text?c.text.toLowerCase().trim():"";l.length>=3&&Math.abs(l.length-o.length)<=n&&Q(l,o,n)<=n&&c.bbox&&a.push(i(c.bbox))}}return a}function N(t,o){let e=null,s=1/0;for(let r of t){let i=Math.round((r.x0+r.x1)/2),a=Math.round((r.y0+r.y1)/2),n=o.x>=r.x0&&o.x<=r.x1&&o.y>=r.y0&&o.y<=r.y1,c=Math.hypot(i-o.x,a-o.y),l=n?0:c;l<s&&(s=l,e={x:i,y:a,dist:c,containsPoint:n,bbox:r})}return e}var C=null;async function tt(){return C||(C=(async()=>{let{createWorker:t}=await import("tesseract.js"),o=await import("fs-extra"),{CU_CACHE_DIR:e}=await import("./paths-RQRI2XRY.js");return o.ensureDirSync(e),t("eng",1,{cachePath:e,logger:()=>{}})})().catch(t=>{throw C=null,t})),C}var I=null,F=null;async function et(){let{getActiveDisplay:t}=await import("./screen_grid-
|
|
1
|
+
import{a as W}from"./chunk-ER3SNTS7.js";import{g as B,i as S}from"./chunk-MS33ZWST.js";import{a as P}from"./chunk-Y5JU726N.js";import X from"screenshot-desktop";import O from"sharp";import j from"fs-extra";import G from"path";import"@nut-tree-fork/nut-js";async function U(t,o,e){if(!(!process.env.SHOW_DEBUG_GRID&&!process.env.DEBUG_OCR))try{let s=G.resolve(process.cwd(),"screenshots",t);await j.ensureDir(s),await j.writeFile(G.join(s,o),e)}catch{}}function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(t,o,e=1/0){if(t===o)return 0;if(t.length===0)return o.length;if(o.length===0)return t.length;if(Math.abs(t.length-o.length)>e)return e+1;let s=Array.from({length:o.length+1},(r,i)=>i);for(let r=1;r<=t.length;r++){let i=[r],a=r;for(let n=1;n<=o.length;n++){let c=t[r-1]===o[n-1]?0:1,l=Math.min(i[n-1]+1,s[n]+1,s[n-1]+c);i.push(l),l<a&&(a=l)}if(s=i,a>e)return e+1}return s[o.length]}function V(t){return t<=4?0:t<=8?1:2}async function H(t,o=3){let e=await O(t).metadata();return O(t).resize(Math.round(e.width*o),Math.round(e.height*o),{kernel:"lanczos3"}).greyscale().normalise().toBuffer()}function Y(t){if(!t)return{words:[],lines:[]};let o=[],e=new Map;for(let r of t.split(`
|
|
2
|
+
`)){let i=r.split(" ");if(i.length<12||parseInt(i[0])!==5)continue;let n=i[2],c=i[3],l=i[4],w=parseInt(i[6]),x=parseInt(i[7]),R=parseInt(i[8]),M=parseInt(i[9]),f=parseFloat(i[10]),h=i.slice(11).join(" ").trim();if(!h||f<0)continue;let p={x0:w,y0:x,x1:w+R,y1:x+M},g={text:h,confidence:f,bbox:p};o.push(g);let u=`${n}_${c}_${l}`;e.has(u)||e.set(u,{words:[],bbox:{x0:1/0,y0:1/0,x1:-1/0,y1:-1/0}});let d=e.get(u);d.words.push(g),d.bbox.x0=Math.min(d.bbox.x0,p.x0),d.bbox.y0=Math.min(d.bbox.y0,p.y0),d.bbox.x1=Math.max(d.bbox.x1,p.x1),d.bbox.y1=Math.max(d.bbox.y1,p.y1)}let s=[];for(let r of e.values())r.words.length>0&&s.push({text:r.words.map(i=>i.text).join(" "),bbox:r.bbox,words:r.words});return{words:o,lines:s}}function Z(t){if(!(t.words&&t.words.length>0)){if(t.blocks&&t.blocks.length>0){t.words=[],t.lines=[];for(let o of t.blocks)for(let e of o.paragraphs||[])for(let s of e.lines||[]){s.bbox&&t.lines.push(s);for(let r of s.words||[])r.bbox&&t.words.push(r)}if(t.words.length>0)return}if(t.tsv){let o=Y(t.tsv);t.words=o.words,t.lines=o.lines}}}function L(t,o,e=0,s=0,r=1){Z(t);let i=n=>({x0:Math.round(n.x0/r)+e,y0:Math.round(n.y0/r)+s,x1:Math.round(n.x1/r)+e,y1:Math.round(n.y1/r)+s}),a=[];if(t.lines&&t.lines.length>0)for(let n of t.lines){let c=n.text?n.text.toLowerCase().trim():"";if(!c||!n.bbox||!(c===o||new RegExp(`\\b${K(o)}\\b`,"i").test(c)))continue;let w=n.words||(t.words?t.words.filter(f=>f.bbox&&f.bbox.x0>=n.bbox.x0-5&&f.bbox.x1<=n.bbox.x1+5&&f.bbox.y0>=n.bbox.y0-5&&f.bbox.y1<=n.bbox.y1+5):[]),x=o.split(/\s+/),R=x.map(f=>f.replace(/[^a-z0-9]/g,"")).join(" "),M=!1;if(w.length>0)for(let f=0;f<=w.length-x.length;f++){let h=w.slice(f,f+x.length),p=h.map(g=>(g.text||"").toLowerCase().trim().replace(/[^a-z0-9]/g,"")).join(" ");if(p===R||p.includes(R)){let g={x0:Math.min(...h.map(u=>u.bbox.x0)),y0:Math.min(...h.map(u=>u.bbox.y0)),x1:Math.max(...h.map(u=>u.bbox.x1)),y1:Math.max(...h.map(u=>u.bbox.y1))};a.push(i(g)),M=!0}}M||a.push(i(n.bbox))}if(a.length===0&&t.words&&t.words.length>0)for(let n of t.words){let c=n.text?n.text.toLowerCase().trim().replace(/[^a-z0-9]/g,""):"",l=o.replace(/[^a-z0-9]/g,"");c===l&&n.bbox&&a.push(i(n.bbox))}if(a.length===0&&t.words&&t.words.length>0){let n=V(o.length);for(let c of t.words){let l=c.text?c.text.toLowerCase().trim():"";l.length>=3&&Math.abs(l.length-o.length)<=n&&Q(l,o,n)<=n&&c.bbox&&a.push(i(c.bbox))}}return a}function N(t,o){let e=null,s=1/0;for(let r of t){let i=Math.round((r.x0+r.x1)/2),a=Math.round((r.y0+r.y1)/2),n=o.x>=r.x0&&o.x<=r.x1&&o.y>=r.y0&&o.y<=r.y1,c=Math.hypot(i-o.x,a-o.y),l=n?0:c;l<s&&(s=l,e={x:i,y:a,dist:c,containsPoint:n,bbox:r})}return e}var C=null;async function tt(){return C||(C=(async()=>{let{createWorker:t}=await import("tesseract.js"),o=await import("fs-extra"),{CU_CACHE_DIR:e}=await import("./paths-RQRI2XRY.js");return o.ensureDirSync(e),t("eng",1,{cachePath:e,logger:()=>{}})})().catch(t=>{throw C=null,t})),C}var I=null,F=null;async function et(){let{getActiveDisplay:t}=await import("./screen_grid-IWNA3DA2.js"),o=await t();if(I&&F===o)return I;F=o,I={format:"png"};try{let e=await X.listDisplays();e&&e.length>0&&(I={format:"png",screen:(e[o]||e[0]).id})}catch{}return I}var pt=async(t,o={})=>{let e=P(t),s=e.gridId||e.grid||e.coordinate||e.target||e.id,r=(e.type||e.clickType||"single").toLowerCase(),i=(e.button||"left").toLowerCase(),a=e.intendedClickText||e.text||"",n=e.ocrCorrection!==void 0?e.ocrCorrection===!0||e.ocrCorrection==="true":e.useOCR!==void 0?e.useOCR===!0||e.useOCR==="true":!1;if(!s&&!a)return'ERROR: Missing required "gridId" parameter for Click tool.';let c=s;if(n&&a)try{let x=s?B(s):null,R=await et(),M=await X(R),f=await O(M).metadata(),h=f.width||1920,p=f.height||1080,g=x?{x:Math.round(x.x*(h/1280)),y:Math.round(x.y*(p/720))}:{x:h/2,y:p/2},u=a.toLowerCase().trim(),d=await tt(),D=null,T="",q=x?320:500;if(x){let m=Math.min(Math.round(h/2),h),y=Math.min(Math.round(p/2),p),b=Math.max(0,Math.min(h-m,g.x-Math.floor(m/2))),k=Math.max(0,Math.min(p-y,g.y-Math.floor(y/2))),_=await O(M).extract({left:b,top:k,width:m,height:y}).toBuffer(),z=2,A=await H(_,z),J=u.replace(/[^a-z0-9]/g,"_");await U("cropped",`crop_${Date.now()}_${J}.png`,A),await d.setParameters({tessedit_pageseg_mode:"11"});let{data:v}=await d.recognize(A,{},{tsv:!0,blocks:!0});if(v&&v.text){let E=L(v,u,b,k,z);if(E.length>0){let $=N(E,g);$&&($.containsPoint||$.dist<=q)&&(D=$,T="centered target crop OCR")}}}if(!D){let m=await H(M,2),y=u.replace(/[^a-z0-9]/g,"_");await U("fullscreen",`full_${Date.now()}_${y}.png`,m),await d.setParameters({tessedit_pageseg_mode:"3"});let{data:b}=await d.recognize(m,{},{tsv:!0,blocks:!0});if(b&&b.text){let k=L(b,u,0,0,2);if(k.length>0){let _=N(k,g);_&&(D=_,T="full-screen OCR")}}}if(D){let m={x:Math.round(D.x*(1280/h)),y:Math.round(D.y*(720/p))},y=await W("click",m,{button:i,clickType:r});if(typeof y=="string"&&y.startsWith("ERROR:"))return y;let b=S(m),k=`${r==="double"?"Double":"Single"} clicked ${i} button`;return s&&b&&String(s)!==String(b)?`${k}. Tried clicking grid ${s}, but OCR corrected to grid ${b} (${T} for "${a}"). If the click landed unintended, try with ocr correction off.`:`${k} on grid ${b||s} (${T} for "${a}").`}}catch{}let l=await W("click",c,{button:i,clickType:r});if(typeof l=="string"&&l.startsWith("ERROR:"))return l;let w=s||(typeof c=="object"?S(c):c);return`${r==="double"?"Double":"Single"} clicked ${i} button on grid ${w}.`};export{pt as click};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,b as s}from"./chunk-
|
|
1
|
+
import{a as i,b as s}from"./chunk-ER3SNTS7.js";import"./chunk-MS33ZWST.js";import{a as c}from"./chunk-Y5JU726N.js";var d=async(a,p={})=>{let e=c(a),r=e.action||e.type||e.cmd,n=e.target||e.grid||e.gridCode||e.location||e.input;if(!r)return'ERROR: Missing required "action" argument for computer_action (e.g. move, click, drag, scroll, type, key_press, key_combination).';let t=r.toLowerCase();if(t.startsWith("mouse_")||["move","click","drag","scroll"].includes(t)){let o=t.replace("mouse_","");return await i(o,n,{button:e.button,clickType:e.clickType||e.type,from:e.from,to:e.to,direction:e.direction,amount:e.amount?parseInt(e.amount,10):void 0})}if(t.startsWith("key_")||t==="type"||t==="press"){let o=t;t==="press"&&(o="key_press");let u=e.autoPressEnter===!0||e.autoPressEnter==="true"||e.enter===!0||e.enter==="true";return await s(o,n||e.text||e.keys,{...e,autoPressEnter:u})}return`ERROR: Unrecognized action "${r}". Supported actions: move, click, drag, scroll, type, key_press, key_combination.`};export{d as computer_action};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as m}from"./chunk-PTFCY2D5.js";import{a as L}from"./chunk-HFTI3R3Q.js";import{n as U}from"./chunk-U2GX6WT2.js";import"./chunk-P5HBJA23.js";import"./chunk-26BQ45XP.js";var Q=async function*(_,C,v,E,A,b,$,d,W=1,B=""){let x=[];E&&x.push({role:"system",content:E});for(let t of v){let e=t.role==="user"?"user":"assistant",n=[];if(Array.isArray(t.parts)){for(let o of t.parts)if(o.text)n.push({type:"text",text:o.text});else if(o.inlineData&&$){let c=o.inlineData.mimeType,u=o.inlineData.data;c.startsWith("image/")&&n.push({type:"image_url",image_url:{url:`data:${c};base64,${u}`}})}}else{let o=t.text||"";o&&n.push({type:"text",text:o})}x.push({role:e,content:n.length===1&&n[0].type==="text"?n[0].text:n})}let P=L("c_openai",C,A),y=P!==null?P:{Fast:"none",Low:"low",Medium:"medium",Standard:"medium",High:"high",xHigh:"xhigh"}[A],a={model:C,messages:x,stream:!0,stream_options:{include_usage:!0},temperature:W,tools:[],tool_choice:"none"};y&&y!=="none"&&(a.reasoning_effort=y,a.reasoning={effort:y});let N=(B||process.env.CUSTOM_OPENAI_URL||process.env.C_OPENAI_URL||"").trim();if(!N)throw new Error("Custom OpenAI Base URL is not configured. Please set Base URL in /settings -> Providers.");let f=N.replace(/\/+$/,"");f.endsWith("/chat/completions")||(f.endsWith("/v1")?f=`${f}/chat/completions`:f=`${f}/chat/completions`);let l={"Content-Type":"application/json",Accept:"text/event-stream, application/json","X-Title":"Flux-Flow","User-Agent":"Flux-Flow"},S=_===U,T=S?"":_&&_!=="LOCAL"?_:process.env.CUSTOM_OPENAI_API_KEY||process.env.C_OPENAI_API_KEY||"";if(!S&&T&&T.trim()!==""){let t=T.trim();l.Authorization=t.startsWith("Bearer ")?t:`Bearer ${t}`,l["api-key"]=t}let s=await m(f,{method:"POST",headers:l,body:JSON.stringify(a),signal:d});if(!s.ok&&(s.status===400||s.status===422)&&(a.reasoning||a.reasoning_effort)){if(console.info(`
|
|
2
|
+
`),a.reasoning&&a.reasoning_effort){let t={...a};delete t.reasoning_effort;let e=await m(f,{method:"POST",headers:l,body:JSON.stringify(t),signal:d}).catch(()=>null);e&&e.ok&&(s=e)}if(!s.ok&&a.reasoning_effort){let t={...a};delete t.reasoning;let e=await m(f,{method:"POST",headers:l,body:JSON.stringify(t),signal:d}).catch(()=>null);e&&e.ok&&(s=e)}if(!s.ok){let t={...a};delete t.reasoning,delete t.reasoning_effort;let e=await m(f,{method:"POST",headers:l,body:JSON.stringify(t),signal:d}).catch(()=>null);e&&e.ok&&(s=e)}}if(!s.ok){let t=await s.json().catch(()=>({})),e=t.error?.metadata?.raw||t.error?.message||(typeof t.error=="string"?t.error:"")||t.message||s.statusText||"Unknown error";throw new Error(`Custom OpenAI Error (${s.status}): ${e}`)}let F=s.body.getReader(),J=new TextDecoder,w="",i=[],p=null,k=Date.now(),g=!1,R=(t,e)=>{if(!t&&!e)return null;if(t){if(typeof t.reasoning_content=="string"&&t.reasoning_content)return t.reasoning_content;if(typeof t.reasoning=="string"&&t.reasoning)return t.reasoning;if(typeof t.thinking=="string"&&t.thinking)return t.thinking;if(typeof t.thought=="string"&&t.thought)return t.thought;if(typeof t.reasoning_text=="string"&&t.reasoning_text)return t.reasoning_text;if(Array.isArray(t.reasoning_details)&&t.reasoning_details.length>0){let n=t.reasoning_details.map(o=>typeof o=="string"?o:o?.text||o?.content||"").filter(Boolean).join("");if(n)return n}}if(e){if(typeof e.reasoning_content=="string"&&e.reasoning_content)return e.reasoning_content;if(typeof e.reasoning=="string"&&e.reasoning)return e.reasoning}return null},K=(t,e)=>{if(t){if(typeof t.content=="string"&&t.content)return t.content;if(typeof t.text=="string"&&t.text)return t.text;if(Array.isArray(t.content))return t.content.map(n=>typeof n=="string"?n:n?.text||"").join("")}return e&&typeof e.text=="string"&&e.text?e.text:""},Y=t=>{let e=t.usage||t.usageMetadata||t.choices?.[0]?.usage||null;if(!e)return null;let n=e.prompt_tokens||e.promptTokenCount||e.input_tokens||0,o=e.completion_tokens||e.candidatesTokenCount||e.output_tokens||0,c=e.total_tokens||e.totalTokenCount||n+o,u=e.prompt_tokens_details?.cached_tokens||e.prompt_tokens_details?.cache_read_input_tokens||e.cachedContentTokenCount||e.cache_read_input_tokens||0,r=e.completion_tokens_details?.reasoning_tokens||e.thoughtsTokenCount||e.reasoning_tokens||0;return{totalTokenCount:c,promptTokenCount:n,candidatesTokenCount:o,cachedContentTokenCount:u,thoughtsTokenCount:r}};for(;;){let{done:t,value:e}=await F.read();if(t){g&&(i.length>0||p)&&(yield{candidates:i.length>0?[{content:{parts:i}}]:[],usageMetadata:p});break}w+=J.decode(e,{stream:!0});let n=w.split(`
|
|
3
|
+
`);w=n.pop();for(let o of n){let c=o.trim();if(!c||!c.startsWith("data: "))continue;let u=!1;if(c==="data: [DONE]"||c==="data: [DONE]\r")u=!0;else try{let r=JSON.parse(c.substring(6));if(r.error){let H=r.error.metadata?.raw||r.error.message||(typeof r.error=="string"?r.error:JSON.stringify(r.error));throw new Error(`Custom OpenAI Stream Error: ${H}`)}let h=r.choices?.[0],O=h?.delta;h?.finish_reason&&h.finish_reason!=="null"&&(u=!0);let D=Y(r);D&&(p=D,g=!0);let I=R(O,h);I&&(i.push({text:I,thought:!0}),g=!0);let M=K(O,h);M&&(i.push({text:M}),g=!0)}catch(r){if(r.message&&r.message.startsWith("Custom OpenAI Stream Error:"))throw r}if((u||Date.now()-k>=150)&&g&&(yield{candidates:i.length>0?[{content:{parts:[...i]}}]:[],usageMetadata:p},i=[],k=Date.now(),g=!1),u)break}Date.now()-k>=150&&g&&(yield{candidates:i.length>0?[{content:{parts:[...i]}}]:[],usageMetadata:p},i=[],k=Date.now(),g=!1)}};export{Q as getCustomOpenAIStream};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-ER3SNTS7.js";import"./chunk-MS33ZWST.js";import{a as d}from"./chunk-Y5JU726N.js";var m=async(a,i={})=>{let r=d(a),o=r.fromGridId||r.from||r.start,t=r.toGridId||r.to||r.end;return!o||!t?'ERROR: Drag requires both "fromGridId" and "toGridId" parameters.':await e("drag",o,{from:o,to:t})};export{m as drag};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-GM5VNNTU.js";import"./chunk-UIL6OCU4.js";import"./chunk-Y5JU726N.js";export{d as activeChildProcess,h as adjustWindowsCommand,c as cleanTerminalOutput,i as exec_command,e as isActiveCommandPty,a as isPtyAvailable,b as stripAnsi,g as terminateActiveCommand,f as writeToActiveCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-6EYQQ7GQ.js";import{a as b}from"./chunk-Y5JU726N.js";import{t as B,u as T,v as $}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-6EYQQ7GQ.js";import{a as b}from"./chunk-Y5JU726N.js";import{t as B,u as T,v as $}from"./chunk-OSSZ4LIE.js";import{b as I}from"./chunk-45DLFA4C.js";import"./chunk-HTOLY3HR.js";import"./chunk-P5HBJA23.js";import"./chunk-26BQ45XP.js";import C from"fs-extra";import x from"path";var F=(a,y={})=>{try{if(a.length<8||a[0]!==137||a[1]!==80||a[2]!==78||a[3]!==71)return a;let s=[],c=[];for(let r=0;r<256;r++){let e=r;for(let n=0;n<8;n++)e&1?e=3988292384^e>>>1:e=e>>>1;c[r]=e}let l=r=>{let e=4294967295;for(let n=0;n<r.length;n++)e=c[(e^r[n])&255]^e>>>8;return(e^4294967295)>>>0},f=(r,e)=>{let n=Buffer.from(r,"ascii"),i=Buffer.from(e,"utf-8"),u=n.length+1+i.length,o=Buffer.alloc(8+u+4);o.writeUInt32BE(u,0),o.write("tEXt",4,"ascii"),n.copy(o,8),o[8+n.length]=0,i.copy(o,8+n.length+1);let w=l(o.subarray(4,8+u));return o.writeUInt32BE(w,8+u),o};for(let[r,e]of Object.entries(y))e!=null&&s.push(f(r,String(e)));if(s.length===0)return a;if(a.subarray(12,16).toString("ascii")==="IHDR"){let e=a.subarray(0,33),n=a.subarray(33);return Buffer.concat([e,...s,n])}return a}catch{return a}},N=async(a,y={})=>{let s=b(a),c=s.prompt||s.text,l=s.path||s.outputPath||s.output||"generated_image.png",f=s.ratio;if(!c)return'ERROR: Missing "prompt" argument for generate_image.';let r=["nsfw","naked","nudity","nude","porn","sex","xxx","erotic","gore","bloody","violence","abuse","suicide","murder","hentai","pedophile","rape"],e=c.toLowerCase();if(r.some(i=>e.includes(i)))return"ERROR: Prompt blocked by system safety filter (inappropriate or unsafe content detected).";try{let i=await I();if(!await B(i))return`ERROR: Insufficient Quota for selected quality. Either tell user reduce quality or wait for next refresh cycle (${(await T()).nextResetMin||60}m).`;let o=i.imageSettings||{keyType:"Default",quality:"Low-High",apiKey:""},w=o.keyType==="Custom"&&o.apiKey?o.apiKey:FALLBACK_IMAGE_KEY,E={Low:"flux","Low-High":"zimage",Medium:"gptimage","Medium-High":"gptimage",High:"qwen-image",Ultra:"gptimage-large",Premium:"nanobanana-pro"}[o.quality]||"zimage",g=1024,m=1024;if(f){let t=f.replace(/\s+/g,"");t==="16:9"?(g=1024,m=576):t==="9:16"?(g=576,m=1024):t==="4:3"?(g=1024,m=768):t==="3:4"?(g=768,m=1024):t==="1:1"&&(g=1024,m=1024)}let M=Math.floor(Math.random()*1e7),S=`https://gen.pollinations.ai/image/${encodeURIComponent(c)}?model=${E}&width=${g}&height=${m}&seed=${M}&enhance=true&reasoning=high&quality=high&negative=${encodeURIComponent("deformed, distorted, disfigured, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated hands and fingers, blurry, low quality, low resolution, extra fingers, censored, watermarks, signatures")}`,d=await fetch(S,{method:"GET",headers:{Authorization:`Bearer ${w}`}});if(!d.ok){let t=d.status,h="";try{h=await d.text()}catch{}return t===402||h.includes("Insufficient balance")||h.includes("PAYMENT_REQUIRED")?"ERROR: Image Generation Currently unavailable. Try again later.":`ERROR: Image Generation failed with status [${t}]: ${h||"Unknown API Error"}`}if((d.headers.get("content-type")||"").includes("application/json")){let t=await d.json();return t.status===402||t.error&&t.error.code==="PAYMENT_REQUIRED"?"ERROR: Image Generation Currently unavailable. Try again later.":`ERROR: Image Generation failed: ${t.error?.message||JSON.stringify(t)}`}let O=await d.arrayBuffer(),p=Buffer.from(O),P={Title:c,Description:"Generated via FluxFlow CLI",Software:"FluxFlow CLI",Author:"FluxFlow","Creation Time":new Date().toISOString(),Prompt:c,Model:`Fluxflow:${E}`,Ratio:f||"1:1",Seed:String(M)};p=F(p,P);let R=x.resolve(process.cwd(),l);await C.ensureDir(x.dirname(R)),await k.recordFileChange(R),await C.writeFile(R,p),await $(i);let v=x.extname(l).toLowerCase(),L={".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".webp":"image/webp"}[v]||"image/png";return y.isMultiModal!==!1?{text:`Image successfully generated from prompt [${c}] and saved to [${l}]. Output attached to multimodal part`,binaryPart:{inlineData:{data:p.toString("base64"),mimeType:L}}}:`Image successfully generated from prompt [${c}] and saved to [${l}].`}catch(i){return`ERROR: Failed during image generation: ${i instanceof Error?i.message:String(i)}`}};export{N as generate_image};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as k,c as d}from"./chunk-56EJGQU3.js";import{a as b}from"./chunk-Y5JU726N.js";var I=async(w,s={})=>{let{runSubagent:U}=await import("./ai-
|
|
1
|
+
import{a as k,c as d}from"./chunk-56EJGQU3.js";import{a as b}from"./chunk-Y5JU726N.js";var I=async(w,s={})=>{let{runSubagent:U}=await import("./ai-R4AFCRMI.js"),l=b(w),c=l.task||l.instruction||l.prompt,E=l.model||null,C=l.title||null,m=l.tools||null;if(!c)return'ERROR: Missing "task" argument for invoke.';let f=null;if(m)try{let t=m.trim();t.startsWith("[")&&t.endsWith("]")&&(t=t.substring(1,t.length-1)),f=t.split(",").map(n=>n.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let i=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,h=null,S=null,$=new Promise((t,n)=>{h=t,S=n}),e={id:i,title:C||c.substring(0,30),task:c,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:t=>{t&&e.pendingSteerMessages.push(t)},completionPromise:$,_resolveCompletion:h,_rejectCompletion:S,progress:[]},r={chunks:[],totalWords:0};k.push(e),s.onSubagentUpdate&&s.onSubagentUpdate();let a=[],A={...s,taskId:i,onAskMain:async t=>{let n=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,o=null,p=new Promise(g=>{o=g}),u={id:n,question:t,answered:!1,answer:null,askedAt:Date.now(),_resolve:o};return e.questions.push(u),e.status="waiting",s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" is WAITING FOR YOUR INPUT: "${t}"
|
|
2
2
|
Respond using tool: [action:Answer(id="${i}", answer="...")]
|
|
3
3
|
[/SYSTEM]`),await p},onVisualFeedback:t=>{e.lastChunkTime=Date.now();let n=t.replace(/\x1b\[[0-9;]*m/g,""),o=n.match(/[✔✘✗✖🔍📖→➕↻•]\s*([A-Za-z0-9\s-]+)/);o?e.currentTool=o[1].trim():e.currentTool=n,s.onSubagentUpdate&&s.onSubagentUpdate()},onTokenChunk:(t,n)=>{let o=Date.now();if(e.lastChunkTime=o,e.currentTool="Thinking",typeof n=="number"&&n>0){r.totalWords+=n,r.chunks.push({time:o,words:n});let p=o-400;if(r.chunks=r.chunks.filter(u=>u.time>=p),r.chunks.length>0){let u=r.chunks.reduce((M,_)=>M+_.words,0),T=r.chunks[0].time,g=Math.max(.4,(o-T)/1e3);e.wps=Math.round(u/g)}}s.onSubagentUpdate&&s.onSubagentUpdate()}};return U(c,A,E,f,50,t=>{if(e.status==="cancelled")return;if(t.startsWith("[Subagent Turn")&&a.length>0&&(e.progress.push([...a]),a=[]),t.includes("[Executing Tool]")){let o=t.match(/\[Executing Tool\]\s*([a-zA-Z0-9_]+)/);o&&(!e.currentTool||e.currentTool==="Thinking")&&(e.currentTool=o[1])}let n=t;if(n.startsWith("[Tool Result]")||n.startsWith("[Action Result]")){let o=n.split(`
|
|
4
4
|
`);o.length>5&&(n=o.slice(0,4).join(`
|
|
5
5
|
`)+`
|
|
6
|
-
... [Content/Diff Truncated from Logs] ...`)}a.push(n),s.onSubagentUpdate&&s.onSubagentUpdate()},!0).then(t=>{if(e.status==="cancelled"){e._resolveCompletion&&e._resolveCompletion(t);return}a.length>0&&(e.progress.push([...a]),a=[]),e.status="completed",e.finalAnswer=t,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) has FINISHED. Call GetProgress(id="${i}") to see the final result. [/SYSTEM]`),e._resolveCompletion&&e._resolveCompletion(t)}).catch(async t=>{let{isTerminationSignaled:n}=await import("./ai-
|
|
6
|
+
... [Content/Diff Truncated from Logs] ...`)}a.push(n),s.onSubagentUpdate&&s.onSubagentUpdate()},!0).then(t=>{if(e.status==="cancelled"){e._resolveCompletion&&e._resolveCompletion(t);return}a.length>0&&(e.progress.push([...a]),a=[]),e.status="completed",e.finalAnswer=t,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) has FINISHED. Call GetProgress(id="${i}") to see the final result. [/SYSTEM]`),e._resolveCompletion&&e._resolveCompletion(t)}).catch(async t=>{let{isTerminationSignaled:n}=await import("./ai-R4AFCRMI.js");if(t.message==="Subagent task was cancelled."||e.status==="cancelled"||n()){e.status="cancelled",a.push("[SUBAGENT CANCELLED] Task was cancelled."),e.progress.push([...a]),s.onSubagentUpdate&&s.onSubagentUpdate(),e._resolveCompletion&&e._resolveCompletion(null);return}a.push(`[SUBAGENT FAILURE] Error: ${t.message}`),e.progress.push([...a]),e.status="failed",e.error=t.message,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) FAILED with error: ${t.message}. [/SYSTEM]`),e._rejectCompletion&&e._rejectCompletion(t)}),`Background subagent started. Task ID: ${i}`};export{I as invoke};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as o}from"./chunk-Y5JU726N.js";var k=async(b,t={})=>{let{runSubagent:u}=await import("./ai-
|
|
2
|
-
`),e}catch(e){let{isTerminationSignaled:i}=await import("./ai-
|
|
1
|
+
import{a as o}from"./chunk-Y5JU726N.js";var k=async(b,t={})=>{let{runSubagent:u}=await import("./ai-R4AFCRMI.js"),s=o(b),a=s.task||s.instruction||s.prompt,m=s.model||null,l=s.tools||null;if(!a)return'ERROR: Missing "task" argument for invokeSync.';let r=null;if(l)try{let e=l.trim();e.startsWith("[")&&e.endsWith("]")&&(e=e.substring(1,e.length-1)),r=e.split(",").map(i=>i.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let n=s.title||a.substring(0,30);try{t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n}`);let e=await u(a,t,m,r,50);return t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} [COMPLETED]
|
|
2
|
+
`),e}catch(e){let{isTerminationSignaled:i}=await import("./ai-R4AFCRMI.js"),c=e.message==="Subagent task was cancelled by user."||i();if(t.onVisualFeedback){let d=c?"[CANCELLED]":"[FAILED]";t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} ${d}
|
|
3
3
|
`)}return`ERROR: Subagent execution failed: ${e.message}`}};export{k as invokeSync};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk-
|
|
1
|
+
import{b as e}from"./chunk-ER3SNTS7.js";import"./chunk-MS33ZWST.js";import{a as i}from"./chunk-Y5JU726N.js";var k=async(s,c={})=>{let t=i(s),a=t.key||t.keys||t.input||t.shortcut;if(!a)return'ERROR: Missing required "key" parameter for KeyPress tool.';let r=String(a).trim().toLowerCase();if(r==="clearinput"||r==="clear_input"||r==="clear")return await e("clear_input");if(r==="back"||r==="browser_back"||r==="browserBack")return await e("browser_back");if(r.includes(";")||r.includes("+")){let o=r.split(/[;+]/).map(n=>n.trim()).filter(Boolean);return await e("key_combination",o)}return await e("key_press",r)};export{k as key_press};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-ER3SNTS7.js";import"./chunk-MS33ZWST.js";import{a as r}from"./chunk-Y5JU726N.js";var p=async(o,u={})=>{let t=r(o),e=t.text||t.input||t.value||"",s=t.autoPressEnter===!0||t.autoPressEnter==="true"||t.enter===!0||t.enter==="true";return e==null?'ERROR: Missing required "text" parameter for KeyboardTyping tool.':await n("type",String(e),{autoPressEnter:s})};export{p as keyboard_typing};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as T}from"./chunk-HFTI3R3Q.js";import{n as O}from"./chunk-U2GX6WT2.js";import"./chunk-P5HBJA23.js";import"./chunk-26BQ45XP.js";import{Ollama as D}from"ollama";var B=async function*(l,p,w,d,u,S,b,L,M=1,v="Cloud"){let m=[];d&&m.push({role:"system",content:d});for(let t of w){let r=t.role==="user"?"user":"assistant",o="",c=[];if(Array.isArray(t.parts)){o=t.parts.map(a=>a.text||"").filter(Boolean).join(`
|
|
2
|
+
`);for(let a of t.parts){let h=a.inlineData||a.inline_data;h&&h.data&&c.push(h.data)}}else o=t.text||"";if(o||c.length>0){let a={role:r,content:o};c.length>0&&(a.images=c),m.push(a)}}let f=l===O||v==="Local"||!l||l==="LOCAL",g={host:f?process.env.OLLAMA_HOST||"http://127.0.0.1:11434":process.env.OLLAMA_HOST||"https://ollama.com"};!f&&l&&(g.headers={Authorization:"Bearer "+l});let C=new D(g),e=[],i=null,_=Date.now(),n=!1,s=T("Ollama",p,u),k={Fast:!1,Low:"low",Medium:"medium",Standard:"medium",High:"high",xHigh:"high"},A=s!==null?s==="false"||s===!1?!1:s==="true"||s===!0?!0:s:k[u]!==void 0?k[u]:!0,x={model:p,messages:m,stream:!0,think:A,keep_alive:"10m",tools:[],tool_choice:"none",options:{temperature:M}},N=await C.chat(x);for await(let t of N){if(L?.aborted)throw new DOMException("The user aborted a request.","AbortError");if(t.message?.thinking&&(e.push({text:t.message.thinking,thought:!0}),n=!0),t.message?.content&&(e.push({text:t.message.content}),n=!0),t.done){let r=t.prompt_cached_count||0;if(!r&&t.prompt_eval_count){let o=t.prompt_eval_duration||0;o>0&&o<5e7&&(r=t.prompt_eval_count)}i={totalTokenCount:(t.prompt_eval_count||0)+(t.eval_count||0),promptTokenCount:t.prompt_eval_count||0,candidatesTokenCount:t.eval_count||0,cachedContentTokenCount:r,thoughtsTokenCount:0},n=!0}(t.done||Date.now()-_>=150&&n)&&(yield{candidates:e.length>0?[{content:{parts:[...e]}}]:[],usageMetadata:i},e=[],_=Date.now(),n=!1)}n&&(e.length>0||i)&&(yield{candidates:e.length>0?[{content:{parts:[...e]}}]:[],usageMetadata:i})};export{B as getOllamaStream};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as n}from"./chunk-
|
|
1
|
+
import{f as n}from"./chunk-MS33ZWST.js";import{a as c}from"./chunk-Y5JU726N.js";var m=async(r,o={})=>{let t=typeof r=="string"?c(r):r||{},a=t.canvasMode===!0||t.canvasMode==="true"||t.canvas_mode===!0||t.canvas_mode==="true";try{let e=await n({canvasMode:a});if(e&&e.base64)return{text:`Screen recaptured${a?" (static canvas grid mode)":""}.`,binaryPart:{inlineData:{mimeType:e.mimeType,data:e.base64}}}}catch{}return"Screen recaptured."};export{m as recapture_screen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-MS33ZWST.js";export{b as CANVAS_GRID_CONFIG,a as GRID_CONFIG,f as captureGriddedScreenshot,i as coordinates720pToGridId,e as getActiveDisplay,h as gridToNativeCoordinates,g as parseGridCodeTo720p,d as rawModelOnly,c as useModel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-ER3SNTS7.js";import"./chunk-MS33ZWST.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};
|