fluxflow-cli 4.40.0 → 4.40.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-ZKC574A7.js → ai-7QKBUDTZ.js} +1 -1
- package/dist/chunks/app-UJZARXCV.js +324 -0
- package/dist/chunks/{auto_completion-NWIEI4SU.js → auto_completion-RBEVTROV.js} +1 -1
- package/dist/chunks/{chunk-M3NOFDLJ.js → chunk-APL7DQ7S.js} +1 -1
- package/dist/chunks/chunk-JTITXS7B.js +1 -0
- package/dist/chunks/{chunk-VJT4U6KR.js → chunk-OLQYLDNC.js} +1 -1
- package/dist/chunks/{chunk-4LL36ESE.js → chunk-UYWKQZ3D.js} +5 -5
- package/dist/chunks/{chunk-4DAFC4RK.js → chunk-WWRLNBDT.js} +1 -1
- package/dist/chunks/{click-T2BXRY7O.js → click-DL6M37AS.js} +2 -2
- package/dist/chunks/{computer_action-VQBY6TW2.js → computer_action-EMOKDYYR.js} +1 -1
- package/dist/chunks/{drag-B5ED6RY7.js → drag-WOY67DNR.js} +1 -1
- package/dist/chunks/{generate_image-UHMQ32EH.js → generate_image-NZGID2Y2.js} +1 -1
- package/dist/chunks/{invoke-CYDFNNQ4.js → invoke-ABHHLDTD.js} +2 -2
- package/dist/chunks/{invokeSync-YEOM3MAZ.js → invokeSync-RNFLZCPV.js} +2 -2
- package/dist/chunks/{key_press-MMN6Y3WZ.js → key_press-A7AVAUQA.js} +1 -1
- package/dist/chunks/{keyboard_typing-2OCGKXE2.js → keyboard_typing-COAVEOJM.js} +1 -1
- package/dist/chunks/{screen_grid-26MRFY7E.js → screen_grid-DMDO5YC3.js} +1 -1
- package/dist/chunks/{scroll-CVJDBGZL.js → scroll-OFESVZ7L.js} +1 -1
- package/dist/chunks/{search_keyword-WIVNNMLY.js → search_keyword-IXMFP35K.js} +1 -1
- package/dist/chunks/{settings-OPQ3GJ62.js → settings-4VMHJDHK.js} +1 -1
- package/dist/chunks/{update_file-NT666LF5.js → update_file-3WHORCBX.js} +1 -1
- package/dist/chunks/{usage-DFN6SYQ3.js → usage-FDNLBYGE.js} +1 -1
- package/dist/chunks/{usageServer-JWNNKDR3.js → usageServer-FRXNO6LD.js} +1 -1
- package/dist/chunks/{write_file-YYKJ3BGD.js → write_file-LNHCLACS.js} +1 -1
- package/dist/cli.js +3 -3
- package/dist/package.json +2 -2
- package/package.json +2 -2
- package/dist/chunks/app-S2QWIJAK.js +0 -324
- package/dist/chunks/chunk-RHZU5POT.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{y as u}from"./chunk-
|
|
1
|
+
import{y as u}from"./chunk-UYWKQZ3D.js";import"./chunk-HFTI3R3Q.js";import"./chunk-52STSLCN.js";import"./chunk-56EJGQU3.js";import"./chunk-M46I73DX.js";import"./chunk-IUN7DBB4.js";import"./chunk-6H2P5XUL.js";import"./chunk-6EYQQ7GQ.js";import"./chunk-4BLSASW6.js";import"./chunk-Y5JU726N.js";import{b as p}from"./chunk-FXRFFNRK.js";import"./chunk-WWRLNBDT.js";import{b as d}from"./chunk-JTITXS7B.js";import{o as a}from"./chunk-KMOTPBF5.js";import"./chunk-P5HBJA23.js";import{a as l}from"./chunk-26BQ45XP.js";import m from"fs";import g from"path";var f=["Identity: Embedded IDE code completion engine","Context given: Code \xB1 cursor, file name & language","Task: Predict contextually accurate code at cursor position","","Rules:","- Return ONLY the raw code to insert at the cursor. No explanations, commentary or rambling","- Do NOT wrap in markdown code fences","- NEVER repeat code that exist before & after cursor, if nothing sensible possible to predict, return empty string","- Match surrounding indentation and code style","- Complete the current line statement","- Never include placeholder comments like // TODO or # your code here","- Do not put anything except the code to insert between the tags"].join(`
|
|
2
2
|
`);try{let t=g.join(l,".cache");m.existsSync(t)||m.mkdirSync(t,{recursive:!0}),m.writeFileSync(g.join(t,"completion.json"),JSON.stringify({systemPrompt:f},null,2))}catch{}var y=t=>{if(!t)return"";let e=t.match(/<completion>([\s\S]*?)<\/completion>/i);return e?e[1]:t},x=({prefix:t="",suffix:e="",fileName:o="",language:n="",recentChanges:r="",clipboard:i=""})=>{let c=r?["### Recent manual changes (context):",r,""]:[],s=i?["### Clipboard (context):",i,""]:[];return[`File: ${o}`,`Language: ${n}`,"","### Code before cursor:",t,"","[cursor here]","","### Code after cursor:",e,"",...c,...s,"### Completion to insert at cursor:"].join(`
|
|
3
3
|
`)},T=async(t={})=>{try{let e=await d(),o=e.autoCompletion||{};if(!o.enabled)return"";let n=o.provider||e.aiProvider||"Google",r=o.model&&o.model!=="Default"?o.model:e.activeModel||a(n,e.apiTier)||a(n,"paid");if(!r)return"";let i=await p(n);if(!i&&!(n==="c_openai"&&e.systemSettings?.customOpenAIBaseUrl))return"";let c={aiProvider:n,apiKey:i,model:r,mode:"flow",thinkingLevel:"Fast",systemSettings:e.systemSettings||{}},s=[{role:"user",parts:[{text:x(t)}]}],{text:h}=await u(c,r,s,f,"Fast");return y(h||"")}catch{return""}};export{f as AUTOCOMPLETE_SYSTEM_PROMPT,y as extractCompletion,T as generateAutoCompletion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as f}from"./chunk-
|
|
1
|
+
import{g as f}from"./chunk-OLQYLDNC.js";import{mouse as c,keyboard as i,Button as u,Key as e,Point as l,clipboard as g}from"@nut-tree-fork/nut-js";c.config.autoDelayMs=50;i.config.autoDelayMs=50;async function w(){try{await i.releaseKey(e.LeftControl,e.RightControl,e.LeftAlt,e.RightAlt,e.LeftShift,e.RightShift,e.LeftSuper,e.RightSuper)}catch{}}async function h(n,t,s={}){let r=await f(t);if(!r&&(n==="move"||n==="click"||n==="drag"))return`ERROR: Invalid target location specified: ${JSON.stringify(t)}`;try{switch(n.toLowerCase()){case"move":return await c.setPosition(new l(r.x,r.y)),`Moved mouse to grid target ${typeof t=="string"?t:`(${r.x}, ${r.y})`}`;case"click":{await c.setPosition(new l(r.x,r.y));let a=s.button==="right"?u.RIGHT:s.button==="middle"?u.MIDDLE:u.LEFT;return s.clickType==="double"?await c.doubleClick(a):await c.click(a),`${s.clickType||"Single"} clicked ${s.button||"left"} button at ${typeof t=="string"?t:`(${r.x}, ${r.y})`}`}case"drag":{let a=await f(s.from||t),o=await f(s.to);return!a||!o?'ERROR: Drag requires valid "from" and "to" target coordinates/grid codes.':(await c.setPosition(new l(a.x,a.y)),await c.pressButton(u.LEFT),await c.setPosition(new l(o.x,o.y)),await c.releaseButton(u.LEFT),`Dragged mouse from (${a.x}, ${a.y}) to (${o.x}, ${o.y})`)}case"scroll":{let a=r||await f({x:640,y:360});a&&(await c.setPosition(new l(a.x,a.y)),await new Promise(d=>setTimeout(d,60)));let o=parseInt(s.amount,10);(isNaN(o)||o<=0)&&(o=5);let y=o>50?Math.min(20,Math.max(1,Math.round(o/100))):Math.min(20,o),R=s.direction==="up";for(let d=0;d<y;d++)R?await c.scrollUp(120):await c.scrollDown(120),await new Promise(L=>setTimeout(L,20));return`Scrolled ${s.direction||"down"} (${y} notches${r?` at target (${r.x}, ${r.y})`:" at screen center"})`}default:return`ERROR: Unsupported mouse action "${n}"`}}catch(a){return`ERROR: Mouse action failed: ${a.message}`}}var m={enter:e.Enter,return:e.Return,escape:e.Escape,esc:e.Escape,backspace:e.Backspace,tab:e.Tab,space:e.Space,up:e.Up,down:e.Down,left:e.Left,right:e.Right,ctrl:e.LeftControl,control:e.LeftControl,alt:e.LeftAlt,shift:e.LeftShift,cmd:e.LeftCmd,win:e.LeftWin,meta:e.LeftWin,super:e.LeftSuper,a:e.A,b:e.B,c:e.C,d:e.D,e:e.E,f:e.F,g:e.G,h:e.H,i:e.I,j:e.J,k:e.K,l:e.L,m:e.M,n:e.N,o:e.O,p:e.P,q:e.Q,r:e.R,s:e.S,t:e.T,u:e.U,v:e.V,w:e.W,x:e.X,y:e.Y,z:e.Z,0:e.Num0,1:e.Num1,2:e.Num2,3:e.Num3,4:e.Num4,5:e.Num5,6:e.Num6,7:e.Num7,8:e.Num8,9:e.Num9,f1:e.F1,f2:e.F2,f3:e.F3,f4:e.F4,f5:e.F5,f6:e.F6,f7:e.F7,f8:e.F8,f9:e.F9,f10:e.F10,f11:e.F11,f12:e.F12},p=n=>{if(!n)return;let t=String(n).toLowerCase().trim();if(m[t]!==void 0)return m[t];if(e[n]!==void 0)return e[n];if(e[t.toUpperCase()]!==void 0)return e[t.toUpperCase()]};async function E(n,t,s={}){try{switch(n.toLowerCase()){case"type":{if(typeof t!="string")return"ERROR: Type action requires a valid string input";await w(),await g.setContent(t);let a=process.platform==="darwin"?e.LeftSuper:e.LeftControl;return await i.pressKey(a,e.V),await i.releaseKey(a,e.V),await w(),s.autoPressEnter?(await new Promise(o=>setTimeout(o,50)),await i.type(e.Enter),`Typed text input ("${t.length>20?t.substring(0,20)+"...":t}") and pressed Enter`):`Typed text input ("${t.length>20?t.substring(0,20)+"...":t}")`}case"key_press":{let r=p(t);return r===void 0?`ERROR: Unknown key name "${t}"`:(await i.type(r),`Pressed key ${t}`)}case"key_combination":{if(!Array.isArray(t))return'ERROR: key_combination requires an array of keys (e.g. ["ctrl", "c"])';let r=t.map(a=>p(a)).filter(a=>a!==void 0);return r.length===0?"ERROR: Invalid key combination":(await i.pressKey(...r),await i.releaseKey(...r),`Executed key combination [${t.join(" + ")}]`)}case"clear_input":return await i.pressKey(e.LeftControl,e.A),await i.releaseKey(e.LeftControl,e.A),await i.type(e.Backspace),"Cleared active text input (Select All + Backspace)";case"browser_back":{let r=process.platform==="darwin";return r?(await i.pressKey(e.LeftSuper,e.Left),await i.releaseKey(e.LeftSuper,e.Left)):(await i.pressKey(e.LeftAlt,e.Left),await i.releaseKey(e.LeftAlt,e.Left)),await w(),`Browser back navigation (${r?"Cmd+Left":"Alt+Left"})`}default:return`ERROR: Unsupported keyboard action "${n}"`}}catch(r){return`ERROR: Keyboard action failed: ${r.message}`}}export{h as a,E as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as m,f as c}from"./chunk-P5HBJA23.js";import{b as s}from"./chunk-26BQ45XP.js";import r from"fs-extra";import p from"path";var o={mode:"Flux",display:0,thinkingLevel:"Medium",aiProvider:"",activeModel:"",showFullThinking:!0,apiTier:"Free",quotas:{agentLimit:999999,backgroundLimit:999999,searchLimit:100,customModelId:"",customLimit:0,providerTiers:{Google:"Free",DeepSeek:"Free",NVIDIA:"Free",OpenRouter:"Free",InferX:"Free",SenseNova:"Free",Poolside:"Free",ExpLabs:"Free",TokenHarbor:"Free",Infron:"Free",APInex:"Free",c_openai:"Free"}},systemSettings:{customOpenAIBaseUrl:"",memory:!1,theme:"Dark",compression:0,autoExec:!0,allowExternalAccess:!1,advanceRollback:!1,autoDeleteHistory:"7d",useExternalData:!1,externalDataPath:"",preserveThinking:!0,loadingPhrases:!1,progressiveRendering:!0,showTPMEstimate:!0,subAgents:!1,CustomSubAgent:!1,SubAgentModel:"Default",SubAgentProvider:"",dynamicDirAwareness:!1,indentationTree:!0,ollamaEndpoint:"Cloud",compressToolResults:!1,autoTruncateResults:!0,imageHistoryCU:"Standard",contextLength:"256k",keepReasoningContext:!1,autoExcludeMetadata:!1,disableTodo:!1,clipboardContext:!1,cacheCalculateMode:"Session",alwaysAskFiles:".env, .env.*, *.env"},profileData:{preset:"Default",name:null,nickname:null,instructions:null},imageSettings:{keyType:"Default",quality:"Low-High",apiKey:""},autoCompletion:{enabled:!1,model:"Default",provider:"",baseUrl:""}},x={Mistral:"https://api.mistral.ai/v1/chat/completions",DeepSeek:"https://api.deepseek.com/chat/completions",OpenRouter:"https://openrouter.ai/api/v1/chat/completions",NVIDIA:"https://integrate.api.nvidia.com/v1",Ollama:"https://ollama.com/v1",InferX:"https://model.inferx.net/endpoints/v1/chat/completions",SenseNova:"https://token.sensenova.ai/v1/chat/completions",Poolside:"https://inference.poolside.ai/v1/chat/completions",ExpLabs:"https://api.experientiallabs.ai/v1/chat/completions",TokenHarbor:"https://tokenharbor.ai/v1/chat/completions",Infron:"https://llm.onerouter.pro/v1/chat/completions",APInex:"https://api.apinex.bond/v1/chat/completions",AIHubMix:"https://aihubmix.com/v1/chat/completions",Google:"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions"},g=async()=>{let t={...o};try{if(await r.exists(s)){let e=m(s);if(e.imageSettings&&e.imageSettings.apiKey)try{let a=e.imageSettings.apiKey,{saveSecret:i}=await import("./secrets-5TCTEPEV.js");await i("POLLINATIONS_API_KEY",a),e.imageSettings.apiKey="",c(s,e)}catch{}t={...o,...e,quotas:{...o.quotas,...e.quotas,providerTiers:{...o.quotas.providerTiers,...e.quotas?.providerTiers||{}}},systemSettings:{...o.systemSettings,...e.systemSettings},profileData:{...o.profileData,...e.profileData},imageSettings:{...o.imageSettings,...e.imageSettings},autoCompletion:{...o.autoCompletion,...e.autoCompletion}}}}catch(e){console.error("Failed to load settings:",e)}try{let{getSecret:e}=await import("./secrets-5TCTEPEV.js"),a=await e("POLLINATIONS_API_KEY");a&&(t.imageSettings.apiKey=a)}catch{}if(t.showFullThinking===!1){t.showFullThinking=!0;try{c(s,t)}catch{}}return t},d=async t=>{let{FLUXFLOW_DIR:e}=await import("./paths-RQRI2XRY.js"),a=["logs","secret"];for(let i of a){let l=p.join(e,i),n=p.join(t,i);try{await r.exists(l)&&(await r.ensureDir(n),await r.copy(l,n,{overwrite:!0}))}catch(u){console.error(`Migration failed for ${i}:`,u)}}},D=async t=>{try{let e=await g();if(!e.systemSettings.useExternalData&&t.systemSettings?.useExternalData&&t.systemSettings?.externalDataPath&&await d(t.systemSettings.externalDataPath),t.imageSettings&&t.imageSettings.apiKey!==void 0){let{saveSecret:i,removeSecret:l}=await import("./secrets-5TCTEPEV.js"),n=t.imageSettings.apiKey;n?await i("POLLINATIONS_API_KEY",n):await l("POLLINATIONS_API_KEY")}let a={...e,...t};a.systemSettings&&(a.systemSettings.dynamicDirAwareness=!1),a.imageSettings&&(a.imageSettings={...a.imageSettings,apiKey:""}),await r.ensureDir(p.dirname(s)),c(s,a);try{let{invalidateCachedBaseUrl:i}=await import("./usage-FDNLBYGE.js");i()}catch{}return!0}catch(e){return console.error("Failed to save settings:",e),!1}};export{x as a,g as b,D as c};
|
|
@@ -2,4 +2,4 @@ import{screen as V}from"@nut-tree-fork/nut-js";import P from"screenshot-desktop"
|
|
|
2
2
|
<rect x="${M+1}" y="${m+1}" width="${X-2}" height="${a-2}" fill="rgba(0, 255, 255, 0.015)" stroke="rgba(255, 255, 0, 0.3)" stroke-width="1.1" rx="2"/>
|
|
3
3
|
`;let x=s.some(t=>t!==n&&t.startY+t.cellH>=m-6&&t.startY<m&&Math.max(0,Math.min(M+X,t.startX+t.cellW)-Math.max(M,t.startX))>10),T=s.some(t=>t!==n&&t.startY<=m+a+6&&t.startY>m&&Math.max(0,Math.min(M+X,t.startX+t.cellW)-Math.max(M,t.startX))>10),u;if(n.isCustomY)u=f,!x&&u<m+11&&(u=Math.max(10,Math.min(u,m+4)));else{let t=n.yOffset!==void 0?n.yOffset:3;!x&&t<0&&(t=Math.min(t,-12));let w=f+t,W=!x&&(t<0||w<m+11)?Math.max(10,m+4):m+11,I=!T&&(t>0||w>m+a-2)?Math.min(o-2,m+a+6):m+a+3;u=Math.max(W,Math.min(I,w))}p+=`
|
|
4
4
|
<text x="${l}" y="${u}" font-family="'Segoe UI', Roboto, sans-serif" font-size="14" font-weight="600" fill="#FFFF00" stroke="#000000" stroke-width="2" paint-order="stroke fill" stroke-linejoin="round" opacity="0.8" text-anchor="middle">${y}</text>
|
|
5
|
-
`}return`<svg width="${e}" height="${o}" xmlns="http://www.w3.org/2000/svg">${p}</svg>`}var tt=1,j=e=>new Promise(o=>setTimeout(o,e));async function et(){try{let{loadSettings:e}=await import("./settings-
|
|
5
|
+
`}return`<svg width="${e}" height="${o}" xmlns="http://www.w3.org/2000/svg">${p}</svg>`}var tt=1,j=e=>new Promise(o=>setTimeout(o,e));async function et(){try{let{loadSettings:e}=await import("./settings-4VMHJDHK.js"),o=await e();return Number(o.display||0)}catch{return 0}}async function lt(){let e=await et();try{let o=await P.listDisplays();if(o&&o.length>0)return{format:"png",screen:(o[e]||o[0]).id}}catch{}return{format:"png"}}async function ct(){let e=0,o=await lt();for(;e<2;){let C=await P(o);await j(500);let Y=await P(o);if(C.equals(Y))return Y;e++,e<2&&await j(3e3)}return await j(3e3),await P(o)}function at(e=[],o=[]){if(!e||e.length===0)return o||[];if(!o||o.length===0)return e;let C=[...e],Y=typeof e.getModelConfidence=="function"?e.getModelConfidence.bind(e):null;for(let s of o){if(Y&&Y(s.startX,s.startY,s.cellW,s.cellH)<.01)continue;let c=s.startX,i=s.startX+s.cellW,p=s.startY,n=s.startY+s.cellH;for(let y of e){let x=y.startX,T=y.startY,u=y.startX+y.cellW,t=y.startY+y.cellH;if(Math.max(0,Math.min(n,t)-Math.max(p,T))>s.cellH*.4&&x<i&&u>c){let W=(x+u)/2,I=(c+i)/2;W<=I?c=Math.max(c,u):i=Math.min(i,x)}}let r=i-c;if(r<18)continue;let g=c,M=p,m=i,X=n,a=Math.floor(c+r/2),l=s.cy,f=!1;for(let y of e){let x=y.startX,T=y.startY,u=y.startX+y.cellW,t=y.startY+y.cellH;if(a>=x&&a<=u&&l>=T&&l<=t){f=!0;break}let w=Math.max(g,x),W=Math.max(M,T),I=Math.min(m,u),v=Math.min(X,t),H=Math.max(0,I-w)*Math.max(0,v-W),d=(m-g)*(X-M);if(H/(d||1)>=.25){f=!0;break}}f||C.push({...s,startX:g,cellW:r,cx:a})}return C.sort((s,c)=>Math.abs(s.startY-c.startY)>18?s.startY-c.startY:s.startX-c.startX),C.forEach((s,c)=>{s.badgeId=c+1}),C}async function yt(){try{let e=await ct(),o=null;if(st){let n=(async()=>{try{let{detectUIBoxesONNX:r}=await import("./ui_detector_onnx-XRKXFWLG.js");return await r(e,h.TARGET_WIDTH,h.TARGET_HEIGHT)}catch{return null}})();if(nt)o=await n||[];else{let r=z(e,!0),[g,M]=await Promise.all([n,r]);o=g&&g.length>0?at(g,M):await z(e,!1)}}else o=await z(e,!1);L=o;let C=rt(h.TARGET_WIDTH,h.TARGET_HEIGHT,h.COLS,h.ROWS,o),Y=await Z(e).resize(h.TARGET_WIDTH,h.TARGET_HEIGHT,{fit:"fill"}).composite([{input:Buffer.from(C),top:0,left:0}]).png({quality:100}).toBuffer();if(process.env.SHOW_DEBUG_GRID)try{let n=Q.resolve(process.cwd(),"screenshots");await K.ensureDir(n);let r=Q.join(n,`${tt}.png`);await K.writeFile(r,Y),tt++}catch{}let s=Y.toString("base64"),c=o.length,i=e,p=Y;return i=null,p=null,{base64:s,mimeType:"image/png",width:h.TARGET_WIDTH,height:h.TARGET_HEIGHT,detectedCount:c}}catch(e){return console.error("Failed to capture gridded screenshot:",e),null}}function it(e){if(e==null)return null;let o=null;if(typeof e=="number")o=e;else if(typeof e=="string"){let g=e.trim();if(/^\d+$/.test(g))o=parseInt(g,10);else{let M=g.match(/^([A-Z])([0-9]{1,2})$/i);if(M){let m=M[1].toUpperCase().charCodeAt(0)-65,X=parseInt(M[2],10)-1;o=m*h.COLS+X+1}}}if(o===null||isNaN(o))return null;if(L&&L.length>0){let g=L.find(M=>M.badgeId===o)||L.find(M=>M.cellNum===o);if(g){let M=Math.floor((g.cellNum-1)%h.COLS),m=Math.floor((g.cellNum-1)/h.COLS);return{x:g.cx,y:g.cy,colIdx:M>=0?M:0,rowIdx:m>=0?m:0,cellNum:o}}}let C=h.COLS*h.ROWS;if(o<1||o>C)return null;let Y=o-1,s=Math.floor(Y/h.COLS),c=Y%h.COLS,i=h.TARGET_WIDTH/h.COLS,p=h.TARGET_HEIGHT/h.ROWS,n=Math.floor(c*i+i/2),r=Math.floor(s*p+p/2);return{x:n,y:r,colIdx:c,rowIdx:s,cellNum:o}}async function Mt(e,o,C){let Y=null;if(typeof e=="number"||typeof e=="string"?Y=it(e):e&&typeof e.x=="number"&&typeof e.y=="number"&&(Y=e),!Y)return null;let s=o,c=C,i=0,p=0,n=await et();try{let X=await P.listDisplays();if(X&&X.length>0){let a=X[n]||X[0];a.width&&a.height&&(s=a.width,c=a.height),a.left!==void 0&&(i=a.left),a.top!==void 0&&(p=a.top)}}catch{}if(!s||!c)try{let X=await P({}),a=await Z(X).metadata();a&&a.width&&a.height?(s=a.width,c=a.height):(s=await V.width(),c=await V.height())}catch{(!s||!c)&&(s=await V.width(),c=await V.height())}let r=s/h.TARGET_WIDTH,g=c/h.TARGET_HEIGHT,M=Math.round(Y.x*r)+i,m=Math.round(Y.y*g)+p;return{x:M,y:m,screenW:s,screenH:c,offsetX:i,offsetY:p}}function pt(e){if(!e||typeof e.x!="number"||typeof e.y!="number")return null;if(L&&L.length>0){let c=L.find(n=>e.x>=n.startX&&e.x<=n.startX+n.cellW&&e.y>=n.startY&&e.y<=n.startY+n.cellH);if(c)return c.badgeId!==void 0?c.badgeId:c.cellNum;let i=null,p=1/0;for(let n of L){let r=e.x-n.cx,g=e.y-n.cy,M=r*r+g*g;M<p&&(p=M,i=n)}if(i&&p<=2025)return i.badgeId!==void 0?i.badgeId:i.cellNum}let o=h.TARGET_WIDTH/h.COLS,C=h.TARGET_HEIGHT/h.ROWS,Y=Math.max(0,Math.min(h.COLS-1,Math.floor(e.x/o)));return Math.max(0,Math.min(h.ROWS-1,Math.floor(e.y/C)))*h.COLS+Y+1}export{h as a,st as b,nt as c,et as d,yt as e,it as f,Mt as g,pt as h};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Is}from"./chunk-HFTI3R3Q.js";import{a as Ao}from"./chunk-52STSLCN.js";import{a as Kt}from"./chunk-56EJGQU3.js";import{c as Oi,g as Li,h as Cs,i as Rs}from"./chunk-M46I73DX.js";import{a as _s,c as vs}from"./chunk-IUN7DBB4.js";import{a as $i,g as Ms}from"./chunk-6H2P5XUL.js";import{a as ei}from"./chunk-6EYQQ7GQ.js";import{a as Ps}from"./chunk-4BLSASW6.js";import{a as H}from"./chunk-Y5JU726N.js";import{b as Mi}from"./chunk-FXRFFNRK.js";import{f as To,l as Rt,n as pt,p as Pi,q as Es}from"./chunk-
|
|
1
|
+
import{a as Is}from"./chunk-HFTI3R3Q.js";import{a as Ao}from"./chunk-52STSLCN.js";import{a as Kt}from"./chunk-56EJGQU3.js";import{c as Oi,g as Li,h as Cs,i as Rs}from"./chunk-M46I73DX.js";import{a as _s,c as vs}from"./chunk-IUN7DBB4.js";import{a as $i,g as Ms}from"./chunk-6H2P5XUL.js";import{a as ei}from"./chunk-6EYQQ7GQ.js";import{a as Ps}from"./chunk-4BLSASW6.js";import{a as H}from"./chunk-Y5JU726N.js";import{b as Mi}from"./chunk-FXRFFNRK.js";import{f as To,l as Rt,n as pt,p as Pi,q as Es}from"./chunk-WWRLNBDT.js";import{b as ko}from"./chunk-JTITXS7B.js";import{l as rt,m as Zo,q as re}from"./chunk-KMOTPBF5.js";import{c as Ct,d as so,e as Qo}from"./chunk-P5HBJA23.js";import{a as $n,b as qo,d as Cn,e as Xo,k as zn,l as Jo,m as vi,r as Ii,w as wo,x as So,y as As}from"./chunk-26BQ45XP.js";import{GoogleGenAI as Jr,ThinkingLevel as He,HarmBlockThreshold as Dn,HarmCategory as Fn}from"@google/genai";var Os=(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 --
|
|
@@ -470,7 +470,7 @@ Public Docs: https://fluxflow-cli.onrender.com
|
|
|
470
470
|
Default Context Length: 256k Tokens. Can be changed via ENV/In-app Settings \u2192 references/{SETTINGS,ENV}.md
|
|
471
471
|
|
|
472
472
|
Docs missing required info? Say you are not sure enough to answer. Dont give wrong info`,"references/MODES.md":Hs,"references/PROVIDERS.md":js,"references/PLUGINS.md":Ks,"references/STARTUP.md":Ls,"references/ENV.md":$s,"references/COMMANDS.md":Ns,"references/SETTINGS.md":Ds,"references/TOOLS.md":Fs,"references/ARCHITECTURE.md":Bs,"references/SUB_AGENTS.md":Us,"references/SECURITY.md":Ws,"references/IDE.md":Gs};var zs=()=>{try{let e=Nn.join($n,"skills","fluxflow"),n=Nn.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){cn.existsSync(e)&&cn.rmSync(e,{recursive:!0,force:!0});return}let i=new Set(Object.keys(Di).map(o=>Nn.normalize(o)));for(let[o,r]of Object.entries(Di)){let d=Nn.join(e,o),a=Nn.dirname(d);cn.existsSync(a)||cn.mkdirSync(a,{recursive:!0});let u=r.trim()+`
|
|
473
|
-
`,p=null;cn.existsSync(d)&&(p=cn.readFileSync(d,"utf8")),p!==u&&cn.writeFileSync(d,u,"utf8")}if(cn.existsSync(n)){let o=cn.readdirSync(n);for(let r of o){let d=Nn.normalize(Nn.join("references",r));if(!i.has(d)){let a=Nn.join(n,r);try{cn.rmSync(a,{recursive:!0,force:!0})}catch{}}}}}catch{}};import{WebSocket as oi}from"ws";var Dt=null,ro=!1,Ca="ws://localhost:56832",Fi=[],ao=null,Bi=null,Ui=null,qs="2.0.0",ic=e=>{qs=e,Xs()},Wi=e=>{Bi=e},sc=e=>{Ui=e},Xs=()=>{if(Dt||ro)return;ro=!0;let e=new oi(Ca);e.on("open",()=>{for(Dt=e,ro=!1,Dt.send(JSON.stringify({command:"version",version:qs,pid:process.pid,ppid:process.ppid,cwd:process.cwd()}));Fi.length>0;)Dt.send(JSON.stringify(Fi.shift()))}),e.on("message",n=>{try{let t=JSON.parse(n.toString());t.command==="contextResponse"&&ao?(ao(t.data),ao=null):t.command==="securityResponse"&&Bi?Bi(t.result):t.command==="inlineComplete"?Ra(t):t.command==="connectionRejected"&&Ui&&Ui(t)}catch{}}),e.on("error",()=>{ro=!1,Dt=null}),e.on("close",()=>{ro=!1,Dt=null})},Eo=e=>{Dt&&Dt.readyState===oi.OPEN?Dt.send(JSON.stringify(e)):(Fi.push(e),ro||Xs())},lo=()=>Dt!==null&&Dt.readyState===oi.OPEN,Ra=async e=>{let n="";try{let{generateAutoCompletion:t}=await import("./auto_completion-
|
|
473
|
+
`,p=null;cn.existsSync(d)&&(p=cn.readFileSync(d,"utf8")),p!==u&&cn.writeFileSync(d,u,"utf8")}if(cn.existsSync(n)){let o=cn.readdirSync(n);for(let r of o){let d=Nn.normalize(Nn.join("references",r));if(!i.has(d)){let a=Nn.join(n,r);try{cn.rmSync(a,{recursive:!0,force:!0})}catch{}}}}}catch{}};import{WebSocket as oi}from"ws";var Dt=null,ro=!1,Ca="ws://localhost:56832",Fi=[],ao=null,Bi=null,Ui=null,qs="2.0.0",ic=e=>{qs=e,Xs()},Wi=e=>{Bi=e},sc=e=>{Ui=e},Xs=()=>{if(Dt||ro)return;ro=!0;let e=new oi(Ca);e.on("open",()=>{for(Dt=e,ro=!1,Dt.send(JSON.stringify({command:"version",version:qs,pid:process.pid,ppid:process.ppid,cwd:process.cwd()}));Fi.length>0;)Dt.send(JSON.stringify(Fi.shift()))}),e.on("message",n=>{try{let t=JSON.parse(n.toString());t.command==="contextResponse"&&ao?(ao(t.data),ao=null):t.command==="securityResponse"&&Bi?Bi(t.result):t.command==="inlineComplete"?Ra(t):t.command==="connectionRejected"&&Ui&&Ui(t)}catch{}}),e.on("error",()=>{ro=!1,Dt=null}),e.on("close",()=>{ro=!1,Dt=null})},Eo=e=>{Dt&&Dt.readyState===oi.OPEN?Dt.send(JSON.stringify(e)):(Fi.push(e),ro||Xs())},lo=()=>Dt!==null&&Dt.readyState===oi.OPEN,Ra=async e=>{let n="";try{let{generateAutoCompletion:t}=await import("./auto_completion-RBEVTROV.js");n=await t({prefix:e.prefix||"",suffix:e.suffix||"",fileName:e.fileName||"",language:e.language||"",recentChanges:e.recentChanges||"",clipboard:e.clipboard||""})}catch{n=""}Eo({command:"inlineCompleteResponse",requestId:e.requestId,completion:n||""})},rc=e=>{Eo({command:"status",status:e})},qn=()=>new Promise(e=>{if(!Dt||Dt.readyState!==oi.OPEN){e({cursor_line:0,selected:0,manual_edits:"",file_focused:"none",opened_editors:[]});return}ao=e,Dt.send(JSON.stringify({command:"requestContext"})),setTimeout(()=>{ao===e&&(e({cursor_line:0,selected:0,manual_edits:"",file_focused:"none",opened_editors:[]}),ao=null)},1e3)}),Js=e=>{Eo({command:"open",filePath:e})},Gi=(e,n,t)=>{Eo({command:"showDiff",filePath:e,originalContent:n,modifiedContent:t})},Qs=(e,n)=>{Eo({command:"closeDiff",filePath:e,result:n})};var Po=(e,n)=>{try{if(!sn.existsSync(e))return null;let t=Array.isArray(n)?n.map(o=>o.toLowerCase()):[n.toLowerCase()],i=sn.readdirSync(e);for(let o of t){let r=i.find(d=>d.toLowerCase()===o);if(r){let d=fn.join(e,r);if(sn.statSync(d).isFile())return d}}}catch{}return null},Yi=(e,n)=>{let t=Po(e,n);if(t)try{return sn.readFileSync(t,"utf8")}catch{}return""},Zs=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"]),zi=(e=process.cwd(),n=0,t=8)=>{let i=[];if(n>t)return i;try{if(!sn.existsSync(e))return i;let o=sn.readdirSync(e,{withFileTypes:!0});for(let r of o){let d=r.name,a=fn.join(e,d);if(r.isDirectory())!Zs.has(d)&&!Zs.has(d.toLowerCase())&&i.push(...zi(a,n+1,t));else if(r.isFile()){let u=d.toLowerCase();(u==="agents.md"||u==="agent.md")&&i.push(a)}}}catch{}return i},er=(e,n=2)=>{if(!e)return"";let t=" ".repeat(n);return e.split(/\r?\n/).map(i=>t+i).join(`
|
|
474
474
|
`)},sr=()=>Po($n,["agents.md","agent.md"]),rr=()=>Po(process.cwd(),["agents.md","agent.md"]),ar=()=>Po($n,["fluxflow.md"]),lr=()=>Po(process.cwd(),["fluxflow.md"]),Ro=sr(),ii=rr(),dn=zi(),_o=ar(),vo=lr(),tr=null,Vi="",cr=!1,va=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&&(Vi=o[1].trim(),process.env.NO_INS=!0),/<><\s*NO_INS/.test(t)&&(cr=!0),i.trim()},Ia=()=>{Ro=sr();let e=Ro?Yi($n,["agents.md","agent.md"]).trim():"";return e.length===0?(Ro=null,""):e},Ma=()=>{if(dn=zi(),ii=rr(),!dn||dn.length===0)return"";let e=process.cwd(),n=[...dn].sort((o,r)=>{let d=fn.relative(e,o).replace(/\\/g,"/"),a=fn.relative(e,r).replace(/\\/g,"/"),u=!d.includes("/"),p=!a.includes("/");return u&&!p?-1:!u&&p?1:d.localeCompare(a)}),t=[],i=[];for(let o of n)try{let r=sn.readFileSync(o,"utf8").trim();if(!r||r.length===0)continue;t.push(o);let d=fn.relative(e,o).replace(/\\/g,"/");if(!d.includes("/"))i.push(er(r,2));else{let u=fn.dirname(d)+"/:";i.push(`${u}
|
|
475
475
|
${er(r,2)}`)}}catch{}return dn=t,dn.length===0&&(ii=null),i.join(`
|
|
476
476
|
|
|
@@ -494,7 +494,7 @@ Plan step by step`));let g=e.instructions&&e.instructions?.length>0?`User Prefer
|
|
|
494
494
|
${g.length?"":`
|
|
495
495
|
`}`:"",ue=e.name&&e.name?.length>0?`User Name: ${e.name}
|
|
496
496
|
${T.length||g.length?"":`
|
|
497
|
-
`}`:"",y=process.cwd(),_=e.preset,K={Sassy:"Sassy",Friendly:"Warm & Chatty",Playful:"Playful",Efficient:"Quick, Concise & Efficient"}[_]||null,F=$a(p,o),E=F?.length>0?`--- Saved Memories ---
|
|
497
|
+
`}`:"",y=process.cwd(),_=e.preset,K={Sassy:"Sassy",Friendly:"Warm & Chatty",Playful:"Playful",Efficient:"Quick, Concise & Efficient",Professional:"Professional"}[_]||null,F=$a(p,o),E=F?.length>0?`--- Saved Memories ---
|
|
498
498
|
${F}
|
|
499
499
|
|
|
500
500
|
`:"";Pa(d,m);let me=nr(Io,m,d).trim(),ve=[Ji,me].filter(M=>M&&M.length>0).join(`
|
|
@@ -560,7 +560,7 @@ ${Os(n,t)}
|
|
|
560
560
|
=== END SYSTEM PROMPT ===${e?`
|
|
561
561
|
|
|
562
562
|
-- current saved user memories --
|
|
563
|
-
${e}`:""}`.trim();var wr=()=>import("./web_search-NT3HXUO3.js").then(e=>e.web_search),Sr=()=>import("./web_scrape-MW6YSZ7L.js").then(e=>e.web_scrape),kr=()=>import("./memory-7YOYCOXE.js").then(e=>e.memory),Tr=()=>import("./chat-C7HYXKVZ.js").then(e=>e.chat),Ar=()=>import("./view_file-I77KYUO5.js").then(e=>e.view_file),Er=()=>import("./write_file-YYKJ3BGD.js").then(e=>e.write_file),Cr=()=>import("./update_file-NT666LF5.js").then(e=>e.update_file),Rr=()=>import("./exec_command-WB2PILWK.js").then(e=>e.exec_command),_r=()=>import("./read_folder-EI2CNHNS.js").then(e=>e.read_folder),Qi=()=>import("./ask_user-K2DLZF6H.js").then(e=>e.ask_user),vr=()=>import("./write_pdf-26OQPNEP.js").then(e=>e.write_pdf),Ir=()=>import("./write_docx-E3MTFXTQ.js").then(e=>e.write_docx),ri=()=>import("./search_keyword-WIVNNMLY.js").then(e=>e.search_keyword),Mr=()=>import("./generate_image-UHMQ32EH.js").then(e=>e.generate_image),ai=()=>import("./saveSummary-W2JMDVZJ.js").then(e=>e.saveSummary),Oo=()=>import("./addMemScore-PBVNSFPN.js").then(e=>e.addMemScore),Pr=()=>import("./file_map-UA4BA5OH.js").then(e=>e.file_map),li=()=>import("./todo-CJLWLWJB.js").then(e=>e.todo),Or=()=>import("./invokeSync-YEOM3MAZ.js").then(e=>e.invokeSync),Na=()=>import("./invoke-CYDFNNQ4.js").then(e=>e.invoke),Lr=()=>import("./getProgress-A2TW34Q7.js").then(e=>e.getProgress),Da=()=>import("./cancel-F3ZOEBKW.js").then(e=>e.cancel),$r=()=>import("./emergency_rollback-ZHQXCIHW.js").then(e=>e.emergency_rollback),Lo=()=>import("./awaitSubagent-JKQ2EHVY.js").then(e=>e.awaitSubagent),$o=()=>import("./answerSubagent-BPNNJXPC.js").then(e=>e.answerSubagent),ci=()=>import("./steerSubagent-UETXH2CB.js").then(e=>e.steerSubagent),di=()=>import("./computer_action-VQBY6TW2.js").then(e=>e.computer_action),Nr=()=>import("./click-T2BXRY7O.js").then(e=>e.click),Dr=()=>import("./drag-B5ED6RY7.js").then(e=>e.drag),Fr=()=>import("./scroll-CVJDBGZL.js").then(e=>e.scroll),Zi=()=>import("./keyboard_typing-2OCGKXE2.js").then(e=>e.keyboard_typing),es=()=>import("./key_press-MMN6Y3WZ.js").then(e=>e.key_press),ts=()=>import("./recapture_screen-PPT2E3CK.js").then(e=>e.recapture_screen),fi=()=>import("./find_file-HYHHFHUJ.js").then(e=>e.find_file),Br=()=>import("./wait-TJR6LAR4.js").then(e=>e.wait),Ur={web_search:wr,web_scrape:Sr,memory:kr,chat:Tr,view_file:Ar,write_file:Er,update_file:Cr,exec_command:Rr,read_folder:_r,write_pdf:vr,write_docx:Ir,search_keyword:ri,generate_image:Mr,saveSummary:ai,addMemScore:Oo,file_map:Pr,todo:li,Todo:li,goal:li,Goal:li,invokeSync:Or,invoke:Na,getProgress:Lr,cancel:Da,awaitSubagent:Lo,answerSubagent:$o,steerSubagent:ci,computer_action:di,computer_use:di,ComputerAction:di,ComputerUse:di,click:Nr,Click:Nr,drag:Dr,Drag:Dr,scroll:Fr,Scroll:Fr,keyboard_typing:Zi,KeyboardTyping:Zi,keyboardtyping:Zi,key_press:es,KeyPress:es,keypress:es,recapture_screen:ts,RecaptureScreen:ts,recapturescreen:ts,invoke_sync:Or,get_progress:Lr,await_subagent:Lo,answer_subagent:$o,steer_subagent:ci,steer:ci,Steer:ci,ask:Qi,Ask:Qi,AskUser:Qi,WebSearch:wr,WebScrape:Sr,ReadFile:Ar,ReadFolder:_r,WriteFile:Er,PatchFile:Cr,WritePDF:vr,WriteDoc:Ir,Run:Rr,SearchKeyword:ri,CodeSearch:ri,code_search:ri,Memory:kr,Chat:Tr,GenerateImage:Mr,saveSumary:ai,SaveSummary:ai,SaveSumary:ai,add_mem_score:Oo,AddMemScore:Oo,addMemoryScore:Oo,AddMemoryScore:Oo,FileMap:Pr,answer:$o,Answer:$o,AnswerSubagent:$o,await:Lo,Await:Lo,AwaitSubagent:Lo,EmergencyRollback:$r,emergency_rollback:$r,find_file:fi,findFile:fi,FindFile:fi,findfile:fi,wait:Br,Wait:Br},No=async(e,n,t={})=>{let i=t.mode?t.mode.toLowerCase():"flux",o=e.toLowerCase(),d=["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(!d){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 p=Ur[e];if(!p){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"],m={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=m[f]||null;if(!s){let T=0,ue=_=>{let W=new Set;for(let K=0;K<_.length-1;K++)W.add(_.slice(K,K+2));return W},y=ue(f);for(let _ of x){let W=_.toLowerCase().replace(/[^a-z0-9]/g,"");if(f===W){s=_;break}let K=0;(W.includes(f)||f.includes(W))&&(K+=.6);let F=ue(W),E=0;for(let ke of y)F.has(ke)&&E++;let me=2*E/(y.size+F.size||1);K=Math.max(K,me),K>T&&K>=.35&&(T=K,s=_)}}let g=s?` Do you mean '${s}'?`:"";return`ERROR: Action [${e}] not found in registry.${g}`}try{return await(await p())(n,t)}catch(x){let m=x instanceof Error?x.message:String(x);return`ERROR: Execution failed for [${e}]: ${m}`}};var ui=e=>{if(!e||typeof e!="string")return!1;let n=e.trim().toLowerCase();return Object.keys(Ur).some(t=>t.toLowerCase()===n)};import j from"path";import Se from"fs";import{execSync as as}from"child_process";import Fa from"gradient-string";var Wr=["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 Gr=["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 Hr=[{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"]}],co={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 gi=null;var mi=(e="Dark")=>{let n;e==="Mystery"||e==="Chaos"?(gi||(gi=Hr[Math.floor(Math.random()*Hr.length)]),n={...gi,id:"Mystery"}):(gi=null,co[e]?n=co[e]:e==="Halloween"?n=co.Spookfest:e==="GitHub"?n=co["GitHub Dark"]:e==="Transparent"?n=co["Transparent Dark"]:n=co.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 Ba=()=>process.env.TERM_PROGRAM==="vscode"?"vscode":process.env.WT_SESSION?"wt":"default",$c=(e=2)=>{let n=Ba();return n==="wt"?" ".repeat(Math.max(1,e-1)):" ".repeat(e)},jr=new Date,Do=jr.getMonth(),Fo=jr.getDate(),Ua=Do===9&&Fo>=15||Do===10&&Fo<=1,ns=null;(process.env.SPOOKFEST==="true"||Ua)&&(ns=await import("./halloween-MX3VNQRW.js"));var Nc=(e="...",n="Loading...",t="Dark")=>{let i=mi(t),o=n;if(n==="c_openai"||n==="Custom (OpenAI)")try{let K=Qo(qo,{})?.systemSettings?.customOpenAIBaseUrl;K&&(o=K)}catch{}let r=i.logoTextAnsi,d=i.logoBodyAnsi,a=i.logoMutedAnsi,u="\x1B[0m",p=[" \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",m=Do===9&&Fo>=15||Do===10&&Fo<=1,f=x&&m||process.env.SPOOKFEST==="true"&&x,s=p;if(f&&ns){process.env.HALLOWEEN_EEGG="true";let{halloweenArtSide:W,halloweenBat:K,halloweenArtUser:F}=ns;s=Math.random()>.9&&Do===9&&Fo>=30?K:Math.random()>.5?W:F}else process.env.HALLOWEEN_EEGG="false";let g=f?Gr:Wr,T=g[Math.floor(Math.random()*g.length)],ue=i.logoGradient||["#0077ff","#ff00ff"],y=Fa(ue).multiline(s.join(`
|
|
563
|
+
${e}`:""}`.trim();var wr=()=>import("./web_search-NT3HXUO3.js").then(e=>e.web_search),Sr=()=>import("./web_scrape-MW6YSZ7L.js").then(e=>e.web_scrape),kr=()=>import("./memory-7YOYCOXE.js").then(e=>e.memory),Tr=()=>import("./chat-C7HYXKVZ.js").then(e=>e.chat),Ar=()=>import("./view_file-I77KYUO5.js").then(e=>e.view_file),Er=()=>import("./write_file-LNHCLACS.js").then(e=>e.write_file),Cr=()=>import("./update_file-3WHORCBX.js").then(e=>e.update_file),Rr=()=>import("./exec_command-WB2PILWK.js").then(e=>e.exec_command),_r=()=>import("./read_folder-EI2CNHNS.js").then(e=>e.read_folder),Qi=()=>import("./ask_user-K2DLZF6H.js").then(e=>e.ask_user),vr=()=>import("./write_pdf-26OQPNEP.js").then(e=>e.write_pdf),Ir=()=>import("./write_docx-E3MTFXTQ.js").then(e=>e.write_docx),ri=()=>import("./search_keyword-IXMFP35K.js").then(e=>e.search_keyword),Mr=()=>import("./generate_image-NZGID2Y2.js").then(e=>e.generate_image),ai=()=>import("./saveSummary-W2JMDVZJ.js").then(e=>e.saveSummary),Oo=()=>import("./addMemScore-PBVNSFPN.js").then(e=>e.addMemScore),Pr=()=>import("./file_map-UA4BA5OH.js").then(e=>e.file_map),li=()=>import("./todo-CJLWLWJB.js").then(e=>e.todo),Or=()=>import("./invokeSync-RNFLZCPV.js").then(e=>e.invokeSync),Na=()=>import("./invoke-ABHHLDTD.js").then(e=>e.invoke),Lr=()=>import("./getProgress-A2TW34Q7.js").then(e=>e.getProgress),Da=()=>import("./cancel-F3ZOEBKW.js").then(e=>e.cancel),$r=()=>import("./emergency_rollback-ZHQXCIHW.js").then(e=>e.emergency_rollback),Lo=()=>import("./awaitSubagent-JKQ2EHVY.js").then(e=>e.awaitSubagent),$o=()=>import("./answerSubagent-BPNNJXPC.js").then(e=>e.answerSubagent),ci=()=>import("./steerSubagent-UETXH2CB.js").then(e=>e.steerSubagent),di=()=>import("./computer_action-EMOKDYYR.js").then(e=>e.computer_action),Nr=()=>import("./click-DL6M37AS.js").then(e=>e.click),Dr=()=>import("./drag-WOY67DNR.js").then(e=>e.drag),Fr=()=>import("./scroll-OFESVZ7L.js").then(e=>e.scroll),Zi=()=>import("./keyboard_typing-COAVEOJM.js").then(e=>e.keyboard_typing),es=()=>import("./key_press-A7AVAUQA.js").then(e=>e.key_press),ts=()=>import("./recapture_screen-PPT2E3CK.js").then(e=>e.recapture_screen),fi=()=>import("./find_file-HYHHFHUJ.js").then(e=>e.find_file),Br=()=>import("./wait-TJR6LAR4.js").then(e=>e.wait),Ur={web_search:wr,web_scrape:Sr,memory:kr,chat:Tr,view_file:Ar,write_file:Er,update_file:Cr,exec_command:Rr,read_folder:_r,write_pdf:vr,write_docx:Ir,search_keyword:ri,generate_image:Mr,saveSummary:ai,addMemScore:Oo,file_map:Pr,todo:li,Todo:li,goal:li,Goal:li,invokeSync:Or,invoke:Na,getProgress:Lr,cancel:Da,awaitSubagent:Lo,answerSubagent:$o,steerSubagent:ci,computer_action:di,computer_use:di,ComputerAction:di,ComputerUse:di,click:Nr,Click:Nr,drag:Dr,Drag:Dr,scroll:Fr,Scroll:Fr,keyboard_typing:Zi,KeyboardTyping:Zi,keyboardtyping:Zi,key_press:es,KeyPress:es,keypress:es,recapture_screen:ts,RecaptureScreen:ts,recapturescreen:ts,invoke_sync:Or,get_progress:Lr,await_subagent:Lo,answer_subagent:$o,steer_subagent:ci,steer:ci,Steer:ci,ask:Qi,Ask:Qi,AskUser:Qi,WebSearch:wr,WebScrape:Sr,ReadFile:Ar,ReadFolder:_r,WriteFile:Er,PatchFile:Cr,WritePDF:vr,WriteDoc:Ir,Run:Rr,SearchKeyword:ri,CodeSearch:ri,code_search:ri,Memory:kr,Chat:Tr,GenerateImage:Mr,saveSumary:ai,SaveSummary:ai,SaveSumary:ai,add_mem_score:Oo,AddMemScore:Oo,addMemoryScore:Oo,AddMemoryScore:Oo,FileMap:Pr,answer:$o,Answer:$o,AnswerSubagent:$o,await:Lo,Await:Lo,AwaitSubagent:Lo,EmergencyRollback:$r,emergency_rollback:$r,find_file:fi,findFile:fi,FindFile:fi,findfile:fi,wait:Br,Wait:Br},No=async(e,n,t={})=>{let i=t.mode?t.mode.toLowerCase():"flux",o=e.toLowerCase(),d=["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(!d){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 p=Ur[e];if(!p){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"],m={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=m[f]||null;if(!s){let T=0,ue=_=>{let W=new Set;for(let K=0;K<_.length-1;K++)W.add(_.slice(K,K+2));return W},y=ue(f);for(let _ of x){let W=_.toLowerCase().replace(/[^a-z0-9]/g,"");if(f===W){s=_;break}let K=0;(W.includes(f)||f.includes(W))&&(K+=.6);let F=ue(W),E=0;for(let ke of y)F.has(ke)&&E++;let me=2*E/(y.size+F.size||1);K=Math.max(K,me),K>T&&K>=.35&&(T=K,s=_)}}let g=s?` Do you mean '${s}'?`:"";return`ERROR: Action [${e}] not found in registry.${g}`}try{return await(await p())(n,t)}catch(x){let m=x instanceof Error?x.message:String(x);return`ERROR: Execution failed for [${e}]: ${m}`}};var ui=e=>{if(!e||typeof e!="string")return!1;let n=e.trim().toLowerCase();return Object.keys(Ur).some(t=>t.toLowerCase()===n)};import j from"path";import Se from"fs";import{execSync as as}from"child_process";import Fa from"gradient-string";var Wr=["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 Gr=["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 Hr=[{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"]}],co={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 gi=null;var mi=(e="Dark")=>{let n;e==="Mystery"||e==="Chaos"?(gi||(gi=Hr[Math.floor(Math.random()*Hr.length)]),n={...gi,id:"Mystery"}):(gi=null,co[e]?n=co[e]:e==="Halloween"?n=co.Spookfest:e==="GitHub"?n=co["GitHub Dark"]:e==="Transparent"?n=co["Transparent Dark"]:n=co.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 Ba=()=>process.env.TERM_PROGRAM==="vscode"?"vscode":process.env.WT_SESSION?"wt":"default",$c=(e=2)=>{let n=Ba();return n==="wt"?" ".repeat(Math.max(1,e-1)):" ".repeat(e)},jr=new Date,Do=jr.getMonth(),Fo=jr.getDate(),Ua=Do===9&&Fo>=15||Do===10&&Fo<=1,ns=null;(process.env.SPOOKFEST==="true"||Ua)&&(ns=await import("./halloween-MX3VNQRW.js"));var Nc=(e="...",n="Loading...",t="Dark")=>{let i=mi(t),o=n;if(n==="c_openai"||n==="Custom (OpenAI)")try{let K=Qo(qo,{})?.systemSettings?.customOpenAIBaseUrl;K&&(o=K)}catch{}let r=i.logoTextAnsi,d=i.logoBodyAnsi,a=i.logoMutedAnsi,u="\x1B[0m",p=[" \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",m=Do===9&&Fo>=15||Do===10&&Fo<=1,f=x&&m||process.env.SPOOKFEST==="true"&&x,s=p;if(f&&ns){process.env.HALLOWEEN_EEGG="true";let{halloweenArtSide:W,halloweenBat:K,halloweenArtUser:F}=ns;s=Math.random()>.9&&Do===9&&Fo>=30?K:Math.random()>.5?W:F}else process.env.HALLOWEEN_EEGG="false";let g=f?Gr:Wr,T=g[Math.floor(Math.random()*g.length)],ue=i.logoGradient||["#0077ff","#ff00ff"],y=Fa(ue).multiline(s.join(`
|
|
564
564
|
`)).split(`
|
|
565
565
|
`),_=W=>`${a}${W}${u}`;return`${y[0]}
|
|
566
566
|
${y[1]} ${r}Selected ${f?"Pumpkin":"Provider"}: ${o}${u}
|
|
@@ -703,7 +703,7 @@ ${vt}${ys}${wi}${hs}${Zn.trim().length>0?`[Clipboard Context:
|
|
|
703
703
|
- ${Zn.trim()}
|
|
704
704
|
`:""}[user prompt] ${ps.trim()} [/user prompt]`.trim();let xs={role:"user",text:jo};Ho&&(xs.binaryPart=Ho),b.forEach(O=>{O.text&&O.role==="agent"&&(O.text=Bt(O.text))}),b.push(xs),vt&&n[n.length-1]?.id&&(yield{type:"summary_injected",content:{id:n[n.length-1].id,text:jo}});let Qt=null,_n=a==="Flux"?50:15;_n=a.toLowerCase().includes("cu")?75:_n;let ra=Math.floor(_n/2),bs=0,an=16;yield{type:"status",content:process.env.HALLOWEEN_EEGG==="true"?"Consulting the spirits":"Connecting"},ht=!1;let Si=[],Ko=!1,ws=!1,Un=[];for(let O=0;O<=_n;O++){let Be=Math.floor(_n*.95);if(O>=Be&&bs<Be&&typeof t?.onAskUser=="function"){bs=Be;try{let V="Agent has been running for a long time. Do you want to continue execution?",Y=[{id:"continue",label:"Continue",description:"Add few more steps"},{id:"cancel",label:"Cancel",description:"Stop extending and finish current turn limit"}],$=await t.onAskUser(V,Y);$&&($.toLowerCase().includes("continue")||$==="Continue")&&(_n+=ra)}catch{}}if(Un.length>=10&&typeof t?.onAskUser=="function"){let V={},Y=null;for(let $ of Un)if(V[$]=(V[$]||0)+1,V[$]>=10){Y=$;break}if(Y)try{let $="Agent seems stuck in a tool loop. You can prompt it to steer or break the loop:",at=[{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"}],Pe=await t.onAskUser($,at);if(Pe){let Ye="";typeof Pe=="string"&&(Pe.toLowerCase()==="stop"||Pe.includes("Stop Loop"))?Ye="STOP REPEATING THE SAME TOOL CALL. Acknowledge what failed or succeeded, summarize your current findings, and conclude.":typeof Pe=="string"&&(Pe.toLowerCase()==="continue"||Pe.includes("Continue Anyway"))?Un=Un.filter(wt=>wt!==Y):Ye=typeof Pe=="string"?Pe:Pe?.label||Pe?.id||"",Ye&&(b.length>0&&b[b.length-1].role==="user"?b[b.length-1].text+=`
|
|
705
705
|
|
|
706
|
-
[STEERING HINT from USER, High Priority] ${Ye.trim()} [/STEERING HINT]`:b.push({role:"user",text:`[STEERING HINT from USER, High Priority] ${Ye.trim()} [/STEERING HINT]`}),yield{type:"status",content:"Steering Hint Injected..."},Un=Un.filter(wt=>wt!==Y))}}catch{}}let yn=await Pi("agent",t);if(!yn.allowed)throw new Error(yn.reason||`Budget Exhausted for Provider (${s||"Agent"})`);let Xe=[];if(Ko=!1,a==="ICU"||a==="FluxCU")try{yield{type:"status",content:"Capturing Screen"},await new Promise($=>setTimeout($,1e3));let{captureGriddedScreenshot:V}=await import("./screen_grid-
|
|
706
|
+
[STEERING HINT from USER, High Priority] ${Ye.trim()} [/STEERING HINT]`:b.push({role:"user",text:`[STEERING HINT from USER, High Priority] ${Ye.trim()} [/STEERING HINT]`}),yield{type:"status",content:"Steering Hint Injected..."},Un=Un.filter(wt=>wt!==Y))}}catch{}}let yn=await Pi("agent",t);if(!yn.allowed)throw new Error(yn.reason||`Budget Exhausted for Provider (${s||"Agent"})`);let Xe=[];if(Ko=!1,a==="ICU"||a==="FluxCU")try{yield{type:"status",content:"Capturing Screen"},await new Promise($=>setTimeout($,1e3));let{captureGriddedScreenshot:V}=await import("./screen_grid-DMDO5YC3.js"),Y=await V();if(Y&&Y.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]",at={inlineData:{mimeType:Y.mimeType,data:Y.base64}},Pe=m?.imageHistoryCU||"Standard",Ye=Pe==="Low"?3:Pe==="Extended"?10:Pe==="Max"?999:5,wt=b.filter(Fe=>Array.isArray(Fe.parts)&&Fe.parts.some(St=>St.inlineData));if(wt.length>=Ye){let Fe=wt.length-Ye+1;for(let St=0;St<Fe;St++){let Tt=wt[St];Array.isArray(Tt.parts)&&(Tt.parts=Tt.parts.filter(kt=>!kt.inlineData))}}if(b.length>0&&b[b.length-1].role==="user"){let Fe=b[b.length-1];typeof Fe.text=="string"&&(Fe.text+=`
|
|
707
707
|
|
|
708
708
|
${$}`,Array.isArray(Fe.parts)||(Fe.parts=[{text:Fe.text}]),Fe.parts.push(at))}else b.push({role:"user",text:$,parts:[{text:$},at]})}}catch(V){console.error("Vision screenshot capture error:",V)}if(m?.compression===0&&(f?.tokens||0)>_t&&(b=Ms(b,6)),O>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"},ht){try{let{clearPendingNudges:V}=await import("./subagent_state-LZCOZSUJ.js");V()}catch{}yield{type:"status",content:"Request Cancelled"},yield{type:"text",content:`
|
|
709
709
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as z}from"./chunk-
|
|
1
|
+
import{b as z}from"./chunk-JTITXS7B.js";import{p as ut}from"./chunk-KMOTPBF5.js";import{a as mt,b as W}from"./chunk-P5HBJA23.js";import{d as J,h as Z,i as M,j as b}from"./chunk-26BQ45XP.js";import S from"fs-extra";import U from"path";import bt from"http";import N from"fs-extra";import et from"path";import{spawn as vt}from"child_process";import{fileURLToPath as Ft}from"url";var $=52991,Rt=15e3,ft=et.join(J,"usage","usage_error.txt"),ht=async(e,t)=>{let o=t?.stack||t?.message||String(t);console.error(`[Usage Daemon Error] [${e}]:`,t);try{await N.ensureDir(et.dirname(ft));let s=`[${new Date().toISOString()}] [Daemon:${e}] ${o}
|
|
2
2
|
-------------------------------------
|
|
3
3
|
|
|
4
4
|
`;await N.appendFile(ft,s,"utf8")}catch{}},B={agent:0,background:0,search:0,toolSuccess:0,toolFailure:0,toolDenied:0,duration:0,tokens:0,cachedTokens:0,candidateTokens:0,linesAdded:0,linesRemoved:0,cost:0,imageCalls:[]},tt=(e,t)=>{if(!e)return{};let o=Object.keys(e),i=new Date(new Date(t).getTime()-720*60*60*1e3),s={};for(let n of o)new Date(n)>=i&&(s[n]=e[n]);return s};async function Ut(){let e=new Date().toISOString().split("T")[0],t=null;try{if(await N.exists(M)){let o=(await N.readFile(M,"utf8")).trim();o.startsWith("{")||o.startsWith("[")?t=JSON.parse(o):t=JSON.parse(W(o))}}catch(o){await ht("loadUsageFromDisk",o)}if(t){let o={...B,...t.stats||{}};Array.isArray(o.imageCalls)||(o.imageCalls=[]);let i=t.history||{},s=tt(i,e);if(t.date===e)return{...t,stats:o,history:s};{let n=t.date,c={...s};return n&&(c[n]=o),{date:e,stats:{...B},history:tt(c,e)}}}return{date:e,stats:{...B},history:{}}}async function Ot(e=$){let t=await Ut(),o=!1,i=!1,s=Date.now(),n=null,c=async()=>{if(t)try{await N.ensureDir(et.dirname(M));let l=new Date().toISOString().split("T")[0];t.history=tt(t.history||{},t.date||l),t.saveId=Math.random().toString(36).substring(2)+Date.now().toString(36);let a=mt(JSON.stringify(t,null,2));await N.writeFile(M,a,"utf8"),i=!1}catch(l){await ht("flushToDisk",l)}},r=async()=>{n&&clearInterval(n),await c(),m.close(()=>{process.exit(0)}),setTimeout(()=>process.exit(0),1e3).unref()};n=setInterval(async()=>{if(o)return;Date.now()-s>Rt&&await r()},5e3),n.unref&&n.unref();let m=bt.createServer(async(l,a)=>{let u=l.url||"";if(l.method==="POST"&&u==="/heartbeat"){o||(s=Date.now()),a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({ok:!0}));return}if((l.method==="GET"||l.method==="POST")&&u==="/finalize"){o=!0,n&&clearInterval(n),await c(),a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({success:!0,message:"Finalized and written to disk"})),setTimeout(()=>{m.close(()=>process.exit(0)),setTimeout(()=>process.exit(0),500).unref()},3e3);return}if(l.method==="POST"&&u==="/flush"){o||(s=Date.now(),await c()),a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({success:!0}));return}if(l.method==="POST"&&u==="/write"){if(o){a.writeHead(403,{"Content-Type":"application/json"}),a.end(JSON.stringify({error:"Daemon finalized. Writes locked."}));return}s=Date.now();let d="";l.on("data",p=>{d+=p}),l.on("end",async()=>{try{let p=JSON.parse(d||"{}"),C=new Date().toISOString().split("T")[0];if(t.date!==C){let y=t.date;y&&(t.history||(t.history={}),t.history[y]={...t.stats}),t.date=C,t.stats={...B}}t.stats||(t.stats={...B});let{key:h,amount:f=1,provider:w,model:T}=p;if(h&&t.stats[h]!==void 0&&(h==="cost"?t.stats.cost=Number(((t.stats.cost||0)+Number(f)).toFixed(6)):typeof t.stats[h]=="number"&&(t.stats[h]+=Math.floor(f))),h==="agent"&&w&&(t.stats.providerRequests||(t.stats.providerRequests={}),t.stats.providerRequests[w]=(t.stats.providerRequests[w]||0)+Math.floor(f)),w&&T&&(h==="tokens"||h==="cachedTokens"||h==="candidateTokens"||h==="ttft"||h==="cost")){t.stats.models||(t.stats.models={}),t.stats.models[w]||(t.stats.models[w]={}),t.stats.models[w][T]||(t.stats.models[w][T]={tokens:0,cachedTokens:0,candidateTokens:0,ttftSum:0,ttftCalls:0,cost:0});let y=t.stats.models[w][T];h==="tokens"&&(y.tokens+=Math.floor(f)),h==="cachedTokens"&&(y.cachedTokens+=Math.floor(f)),h==="candidateTokens"&&(y.candidateTokens+=Math.floor(f)),h==="cost"&&(y.cost=Number(((y.cost||0)+Number(f)).toFixed(6))),h==="ttft"&&(y.ttftSum=(y.ttftSum||0)+Math.floor(f),y.ttftCalls=(y.ttftCalls||0)+1)}i=!0,await c(),a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({success:!0}))}catch(p){a.writeHead(400,{"Content-Type":"application/json"}),a.end(JSON.stringify({error:p.message}))}});return}a.writeHead(404,{"Content-Type":"text/plain"}),a.end("Not Found")});m.listen(e,"127.0.0.1",()=>{s=Date.now()}),m.on("error",l=>{l.code==="EADDRINUSE"&&process.exit(0)})}async function At(e=$){try{if((await fetch(`http://127.0.0.1:${e}/heartbeat`,{method:"POST",signal:AbortSignal.timeout(300)})).ok)return!0}catch{}try{let t=Ft(import.meta.url);vt(process.execPath,[t,"--usage-daemon-worker",`--port=${e}`],{detached:!0,stdio:"ignore",windowsHide:!0}).unref();for(let i=0;i<10;i++){await new Promise(s=>setTimeout(s,100));try{if((await fetch(`http://127.0.0.1:${e}/heartbeat`,{method:"POST",signal:AbortSignal.timeout(300)})).ok)return!0}catch{}}}catch{}return!1}async function st(e,t=$){try{await At(t),await fetch(`http://127.0.0.1:${t}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:AbortSignal.timeout(1e3)})}catch{}}async function It(e=$){try{await fetch(`http://127.0.0.1:${e}/heartbeat`,{method:"POST",signal:AbortSignal.timeout(600)})}catch{}}async function Et(e=$){try{await fetch(`http://127.0.0.1:${e}/finalize`,{method:"GET",signal:AbortSignal.timeout(1e3)})}catch{}}if(process.argv.includes("--usage-daemon-worker")){let e=process.argv.find(o=>o.startsWith("--port=")),t=e?parseInt(e.split("=")[1],10):$;Ot(t)}var pt=U.join(J,"usage","usage_error.txt"),H=new Map,Nt=(e,t)=>{let o=`${e}:${t}`;if(H.has(o))return H.get(o);try{let i=yt();if(S.existsSync(i)){let n=S.readFileSync(i,"utf8").split(`
|
|
@@ -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-APL7DQ7S.js";import{f as B,h as S}from"./chunk-OLQYLDNC.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-DMDO5YC3.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-APL7DQ7S.js";import"./chunk-OLQYLDNC.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-APL7DQ7S.js";import"./chunk-OLQYLDNC.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 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-WWRLNBDT.js";import{b as I}from"./chunk-JTITXS7B.js";import"./chunk-KMOTPBF5.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-7QKBUDTZ.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-7QKBUDTZ.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-7QKBUDTZ.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-7QKBUDTZ.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-APL7DQ7S.js";import"./chunk-OLQYLDNC.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-APL7DQ7S.js";import"./chunk-OLQYLDNC.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-OLQYLDNC.js";export{a as GRID_CONFIG,e as captureGriddedScreenshot,h as coordinates720pToGridId,d as getActiveDisplay,g as gridToNativeCoordinates,f as parseGridCodeTo720p,c as rawModelOnly,b as useModel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-APL7DQ7S.js";import"./chunk-OLQYLDNC.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};
|