woozlit 2.1.5 → 2.2.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.
Files changed (64) hide show
  1. package/README.md +28 -0
  2. package/dist/auth/login.js +1 -1
  3. package/dist/browser/index.js +1 -1
  4. package/dist/browser/server.js +1 -1
  5. package/dist/browser/tools.js +1 -1
  6. package/dist/chat/agent.js +1 -1
  7. package/dist/config/mcp.js +1 -1
  8. package/dist/config/settings.js +1 -1
  9. package/dist/discord/client.js +1 -1
  10. package/dist/discord/config.js +1 -1
  11. package/dist/discord/index.js +1 -1
  12. package/dist/discord/setup.js +1 -1
  13. package/dist/email/config.js +1 -1
  14. package/dist/email/index.js +1 -1
  15. package/dist/email/service.js +1 -1
  16. package/dist/email/setup.js +1 -1
  17. package/dist/github/api.js +1 -1
  18. package/dist/github/auth.js +1 -1
  19. package/dist/github/auto-setup.js +1 -1
  20. package/dist/github/index.js +1 -1
  21. package/dist/github/manual-setup.js +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/mcp-servers/computer-use.js +1 -1
  24. package/dist/services/bot-manager.js +1 -1
  25. package/dist/services/notifications.js +1 -1
  26. package/dist/services/voice-agent.js +1 -1
  27. package/dist/telegram/bot.js +1 -1
  28. package/dist/telegram/config.js +1 -1
  29. package/dist/telegram/index.js +1 -1
  30. package/dist/telegram/reminders.js +1 -1
  31. package/dist/telegram/setup.js +1 -1
  32. package/dist/tools/command.js +1 -1
  33. package/dist/tools/file.d.ts +8 -0
  34. package/dist/tools/file.js +1 -1
  35. package/dist/tools/git.js +1 -1
  36. package/dist/tools/index.d.ts +1 -1
  37. package/dist/tools/index.js +1 -1
  38. package/dist/tools/knowledge.d.ts +4 -0
  39. package/dist/tools/knowledge.js +1 -0
  40. package/dist/tools/mcp.js +1 -1
  41. package/dist/tools/network.js +1 -1
  42. package/dist/tools/project.js +1 -1
  43. package/dist/tools/rollback.js +1 -1
  44. package/dist/tools/rules.js +1 -1
  45. package/dist/tools/system.js +1 -1
  46. package/dist/twilio/config.js +1 -1
  47. package/dist/twilio/index.js +1 -1
  48. package/dist/twilio/server.js +1 -1
  49. package/dist/twilio/setup.js +1 -1
  50. package/dist/ui/output.js +1 -1
  51. package/dist/ui/select.js +1 -1
  52. package/dist/ui/themes.js +1 -1
  53. package/dist/utils/api.d.ts +1 -1
  54. package/dist/utils/api.js +1 -1
  55. package/dist/utils/chat-history.js +1 -1
  56. package/dist/utils/history.js +1 -1
  57. package/dist/utils/mcp-installer.js +1 -1
  58. package/dist/utils/platform.js +1 -1
  59. package/dist/utils/storage.d.ts +3 -0
  60. package/dist/utils/storage.js +1 -1
  61. package/dist/utils/update-check.js +1 -1
  62. package/dist/utils/updater.js +1 -1
  63. package/dist/verify_repro.js +1 -1
  64. package/package.json +1 -1
package/README.md CHANGED
@@ -14,7 +14,10 @@ npm install -g woozlit
14
14
  - **Agentic AI**: Executes complex tasks (coding, testing, deployment) autonomously without stopping to ask permission.
15
15
  - **Modern Minimalist UI**: Sleek, Claude-Code inspired terminal aesthetics with spinner branches and concise one-line action summaries (`└ Read 58 lines`).
16
16
  - **Global Theming**: Switch the entire CLI's color palette on the fly (`/theme`). Supports: Woozlit Blue, Classic Purple, Hacker Green, Sunset Orange, Dracula Pink, and Monochrome Silver.
17
+ - **Knowledge Presets**: Easily define custom instructions or framework stacks (e.g., Next.js conventions) that the AI automatically injects into its system prompt.
18
+ - **Vision & Image Pasting**: Direct support for analyzing local images. Just paste an absolute file path into the chat prompt.
17
19
  - **Browser Automation**: The CLI can automatically spin up a headless/headed browser session to read documentation, debug web apps, and take screenshots using `browser_*` tools.
20
+ - **Context & Process Safety**: Includes an automatic contextual summarizer for extremely long conversations to prevent token overflow, and an anti-spam monitor to stop duplicate dev servers.
18
21
  - **Telegram Remote**: Start the CLI on your desktop, leave it running, and text it complex coding tasks from your phone via Telegram.
19
22
  - **MCP Protocol**: Deep integration with Model Context Protocol to hook into external servers.
20
23
  - **Auto-Correction**: Automatically detects, reads `stderr`, and attempts to fix errors during execution loops.
@@ -34,6 +37,31 @@ woozlit theme
34
37
  ```
35
38
  Brings up an interactive prompt to switch color themes.
36
39
 
40
+ ### Knowledge Presets
41
+ Inject project-specific rules or context into the agent's system prompt (e.g. enforce architectural styles or point to specific docs).
42
+
43
+ ```bash
44
+ # List current knowledge presets
45
+ woozlit knowledge list
46
+
47
+ # Add a new piece of knowledge (Here is the built-in default Next.js preset)
48
+ woozlit knowledge add "You are an expert Next.js 15, React 19, and Tailwind CSS developer."
49
+ woozlit knowledge add "Use the App Router (app/ directory) exclusively. Avoid the pages/ directory."
50
+ woozlit knowledge add "Default to Server Components. Only add 'use client' when hooks (useState, useEffect) or DOM event listeners are strictly necessary."
51
+ woozlit knowledge add "Use Server Actions for data mutations and fetching. Avoid traditional API routes unless building external standard REST endpoints."
52
+ woozlit knowledge add "Follow mobile-first responsive design patterns. Build clean, minimal UI components using Tailwind CSS."
53
+
54
+ # Clear all presets
55
+ woozlit knowledge clear
56
+ ```
57
+
58
+ ### Vision & Images
59
+ You can ask the AI about local images directly in the chat interface by simply pasting their absolute paths alongside your prompt:
60
+
61
+ ```text
62
+ > C:\Users\docs\mockup.png Make this exact UI using React and Tailwind.
63
+ ```
64
+
37
65
  ### Chat Commands
38
66
 
39
67
  Inside a chat session, you can use:
@@ -1 +1 @@
1
- function a0_0x408e(_0x33d651,_0x6cda6b){_0x33d651=_0x33d651-0x1c3;const _0x1445c6=a0_0x1445();let _0x408e57=_0x1445c6[_0x33d651];return _0x408e57;}(function(_0x5d4d0e,_0x29d60d){const _0x162ddb=a0_0x408e,_0xf1bd37=_0x5d4d0e();while(!![]){try{const _0x55d843=-parseInt(_0x162ddb(0x1ca))/0x1+-parseInt(_0x162ddb(0x1d4))/0x2+-parseInt(_0x162ddb(0x1cf))/0x3*(-parseInt(_0x162ddb(0x1c8))/0x4)+-parseInt(_0x162ddb(0x1d6))/0x5*(-parseInt(_0x162ddb(0x1d8))/0x6)+-parseInt(_0x162ddb(0x1da))/0x7+parseInt(_0x162ddb(0x1d2))/0x8*(parseInt(_0x162ddb(0x1d5))/0x9)+-parseInt(_0x162ddb(0x1c5))/0xa*(-parseInt(_0x162ddb(0x1c6))/0xb);if(_0x55d843===_0x29d60d)break;else _0xf1bd37['push'](_0xf1bd37['shift']());}catch(_0x3d07d2){_0xf1bd37['push'](_0xf1bd37['shift']());}}}(a0_0x1445,0x82114));import a0_0x44d8df from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';function a0_0x1445(){const _0xba46bc=['displayName','2447844ejFret','/callback','close','get','writeHead','11257760pXCQRk','11hausHL','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head><title>Woozlit\x20CLI</title></head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body\x20style=\x22font-family:\x20sans-serif;\x20text-align:\x20center;\x20padding:\x202rem;\x20background:\x20#0a0a0a;\x20color:\x20#fff;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1\x20style=\x22color:\x20#ef4444;\x22>Login\x20Failed</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Missing\x20authentication\x20data.\x20Please\x20try\x20again.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','112272tuCVVZ','listen','1007210NDIzyW','http://localhost:','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<title>Woozlit\x20CLI</title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-family:\x20system-ui,\x20-apple-system,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#0a0a0a;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#fff;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.container\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x202rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20h1\x20{\x20color:\x20#10b981;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20p\x20{\x20color:\x20#9ca3af;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1>Login\x20Successful</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','url','searchParams','33hzBnPN','end','userId','8jMQIqR','pathname','336562oEXRjj','73818ClYNzQ','1025355CWEJNk','text/html','18rhQKLt'];a0_0x1445=function(){return _0xba46bc;};return a0_0x1445();}import{setToken,setUser,isLoggedIn,logout as a0_0x4bb432}from'../utils/storage.js';export async function login(){const _0x959efa=getApiUrl(),_0x36d31e=0x2694;return new Promise(_0x3406e4=>{const _0x132cce=a0_0x408e,_0xe3a43a=createServer(async(_0x4702b8,_0x384e6d)=>{const _0x4ff306=a0_0x408e,_0x3bbb6e=new URL(_0x4702b8[_0x4ff306(0x1cd)]||'',_0x4ff306(0x1cb)+_0x36d31e);if(_0x3bbb6e[_0x4ff306(0x1d3)]===_0x4ff306(0x1db)){const _0x51dbd3=_0x3bbb6e[_0x4ff306(0x1ce)][_0x4ff306(0x1c3)]('token'),_0x31014f=_0x3bbb6e['searchParams']['get'](_0x4ff306(0x1d1)),_0x160c78=_0x3bbb6e[_0x4ff306(0x1ce)][_0x4ff306(0x1c3)]('email'),_0x1d17e6=_0x3bbb6e['searchParams']['get'](_0x4ff306(0x1d9));_0x51dbd3&&_0x31014f?(setToken(_0x51dbd3),setUser(_0x31014f,_0x160c78||'',_0x1d17e6||''),_0x384e6d[_0x4ff306(0x1c4)](0xc8,{'Content-Type':_0x4ff306(0x1d7)}),_0x384e6d[_0x4ff306(0x1d0)](_0x4ff306(0x1cc)),_0xe3a43a['close'](),_0x3406e4(!![])):(_0x384e6d[_0x4ff306(0x1c4)](0x190,{'Content-Type':'text/html'}),_0x384e6d[_0x4ff306(0x1d0)](_0x4ff306(0x1c7)),_0xe3a43a[_0x4ff306(0x1dc)](),_0x3406e4(![]));}});_0xe3a43a[_0x132cce(0x1c9)](_0x36d31e,()=>{const _0x2af96e=_0x132cce,_0x133cee=_0x959efa+'/auth/cli?callback=http://localhost:'+_0x36d31e+_0x2af96e(0x1db);a0_0x44d8df(_0x133cee);}),setTimeout(()=>{const _0x2ae66c=_0x132cce;_0xe3a43a[_0x2ae66c(0x1dc)](),_0x3406e4(![]);},0x1d4c0);});}export function logout(){a0_0x4bb432();}export{isLoggedIn};
1
+ function a0_0x1589(){const _0x564389=['writeHead','/callback','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head><title>Woozlit\x20CLI</title></head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body\x20style=\x22font-family:\x20sans-serif;\x20text-align:\x20center;\x20padding:\x202rem;\x20background:\x20#0a0a0a;\x20color:\x20#fff;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1\x20style=\x22color:\x20#ef4444;\x22>Login\x20Failed</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Missing\x20authentication\x20data.\x20Please\x20try\x20again.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','displayName','6569000oFQUxP','8695435DDZAdN','url','searchParams','userId','text/html','3605340MPUgXv','end','http://localhost:','token','972845Vludfp','get','6ofBfIr','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<title>Woozlit\x20CLI</title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-family:\x20system-ui,\x20-apple-system,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#0a0a0a;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#fff;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.container\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x202rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20h1\x20{\x20color:\x20#10b981;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20p\x20{\x20color:\x20#9ca3af;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1>Login\x20Successful</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','/auth/cli?callback=http://localhost:','close','email','2QBLpKu','32516559VoDmlL','listen','4546929YVKWSM','8061624cjqpje'];a0_0x1589=function(){return _0x564389;};return a0_0x1589();}function a0_0x33a7(_0x52303b,_0x873c83){_0x52303b=_0x52303b-0x111;const _0x1589e1=a0_0x1589();let _0x33a76b=_0x1589e1[_0x52303b];return _0x33a76b;}(function(_0x14bf5e,_0x317502){const _0x536f1b=a0_0x33a7,_0x4e1905=_0x14bf5e();while(!![]){try{const _0x41b742=-parseInt(_0x536f1b(0x11c))/0x1+-parseInt(_0x536f1b(0x123))/0x2*(-parseInt(_0x536f1b(0x126))/0x3)+-parseInt(_0x536f1b(0x112))/0x4+parseInt(_0x536f1b(0x118))/0x5+-parseInt(_0x536f1b(0x11e))/0x6*(parseInt(_0x536f1b(0x113))/0x7)+-parseInt(_0x536f1b(0x127))/0x8+parseInt(_0x536f1b(0x124))/0x9;if(_0x41b742===_0x317502)break;else _0x4e1905['push'](_0x4e1905['shift']());}catch(_0x334db2){_0x4e1905['push'](_0x4e1905['shift']());}}}(a0_0x1589,0xf0653));import a0_0x1bf0e3 from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x4515e3}from'../utils/storage.js';export async function login(){const _0x55e3e1=getApiUrl(),_0x4d7b19=0x2694;return new Promise(_0x229574=>{const _0x2aca71=a0_0x33a7,_0x323119=createServer(async(_0x125b6f,_0x5e1f7c)=>{const _0x1ff4d7=a0_0x33a7,_0xaefa1b=new URL(_0x125b6f[_0x1ff4d7(0x114)]||'',_0x1ff4d7(0x11a)+_0x4d7b19);if(_0xaefa1b['pathname']===_0x1ff4d7(0x129)){const _0x289b95=_0xaefa1b[_0x1ff4d7(0x115)][_0x1ff4d7(0x11d)](_0x1ff4d7(0x11b)),_0x57322c=_0xaefa1b['searchParams'][_0x1ff4d7(0x11d)](_0x1ff4d7(0x116)),_0x2a89e8=_0xaefa1b[_0x1ff4d7(0x115)][_0x1ff4d7(0x11d)](_0x1ff4d7(0x122)),_0x5b759b=_0xaefa1b['searchParams']['get'](_0x1ff4d7(0x111));_0x289b95&&_0x57322c?(setToken(_0x289b95),setUser(_0x57322c,_0x2a89e8||'',_0x5b759b||''),_0x5e1f7c[_0x1ff4d7(0x128)](0xc8,{'Content-Type':_0x1ff4d7(0x117)}),_0x5e1f7c[_0x1ff4d7(0x119)](_0x1ff4d7(0x11f)),_0x323119['close'](),_0x229574(!![])):(_0x5e1f7c[_0x1ff4d7(0x128)](0x190,{'Content-Type':'text/html'}),_0x5e1f7c[_0x1ff4d7(0x119)](_0x1ff4d7(0x12a)),_0x323119[_0x1ff4d7(0x121)](),_0x229574(![]));}});_0x323119[_0x2aca71(0x125)](_0x4d7b19,()=>{const _0x327b94=_0x2aca71,_0x391fef=_0x55e3e1+_0x327b94(0x120)+_0x4d7b19+_0x327b94(0x129);a0_0x1bf0e3(_0x391fef);}),setTimeout(()=>{const _0x2624a7=_0x2aca71;_0x323119[_0x2624a7(0x121)](),_0x229574(![]);},0x1d4c0);});}export function logout(){a0_0x4515e3();}export{isLoggedIn};
@@ -1 +1 @@
1
- const a1_0x5898ab=a1_0x2cbf;(function(_0xd7e9ea,_0x3f97a2){const _0x145b6c=a1_0x2cbf,_0x5a8b3b=_0xd7e9ea();while(!![]){try{const _0x161367=-parseInt(_0x145b6c(0xde))/0x1*(parseInt(_0x145b6c(0xd0))/0x2)+parseInt(_0x145b6c(0xc7))/0x3+parseInt(_0x145b6c(0xd4))/0x4+parseInt(_0x145b6c(0xc8))/0x5*(parseInt(_0x145b6c(0xdd))/0x6)+-parseInt(_0x145b6c(0xd7))/0x7+parseInt(_0x145b6c(0xd6))/0x8+parseInt(_0x145b6c(0xcb))/0x9*(parseInt(_0x145b6c(0xc3))/0xa);if(_0x161367===_0x3f97a2)break;else _0x5a8b3b['push'](_0x5a8b3b['shift']());}catch(_0x135607){_0x5a8b3b['push'](_0x5a8b3b['shift']());}}}(a1_0x2ec6,0x32b92));export*from'./server.js';export*from'./tools.js';export*from'./server.js';function a1_0x2ec6(){const _0x33fbb5=['1750882LFsSHd','top','Text\x20to\x20fill','tabId','Scroll\x20the\x20page\x20up\x20or\x20down','object','102702uFzqMp','174931axmuZJ','query','10SOCtqR','number','Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot','CSS\x20selector\x20for\x20the\x20element','643596rvzyFP','15skusri','browser_click','Tab\x20ID','895743rncPYQ','string','direction','down','Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)','2jTudJP','Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)','browser_scroll','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','480152MTKTQL','text','1178968DiKzkL'];a1_0x2ec6=function(){return _0x33fbb5;};return a1_0x2ec6();}function a1_0x2cbf(_0x7cae3a,_0x7a00a5){_0x7cae3a=_0x7cae3a-0xc3;const _0x2ec64a=a1_0x2ec6();let _0x2ec6bf=_0x2ec64a[_0x7cae3a];return _0x2ec6bf;}export*from'./tools.js';export const tools=[{'name':'browser_fill','description':'Fill\x20a\x20form\x20field\x20or\x20input\x20element','input_schema':{'type':a1_0x5898ab(0xdc),'properties':{'tabId':{'type':a1_0x5898ab(0xc4),'description':a1_0x5898ab(0xc5)},'query':{'type':a1_0x5898ab(0xcc),'description':a1_0x5898ab(0xc6)},'text':{'type':a1_0x5898ab(0xcc),'description':a1_0x5898ab(0xd9)}},'required':[a1_0x5898ab(0xda),a1_0x5898ab(0xdf),a1_0x5898ab(0xd5)]}},{'name':a1_0x5898ab(0xc9),'description':'Click\x20an\x20element\x20on\x20the\x20page','input_schema':{'type':a1_0x5898ab(0xdc),'properties':{'tabId':{'type':a1_0x5898ab(0xc4),'description':a1_0x5898ab(0xd3)},'query':{'type':a1_0x5898ab(0xcc),'description':'CSS\x20selector\x20for\x20the\x20element'},'index':{'type':a1_0x5898ab(0xc4),'description':a1_0x5898ab(0xd1)}},'required':[a1_0x5898ab(0xda),a1_0x5898ab(0xdf)]}},{'name':a1_0x5898ab(0xd2),'description':a1_0x5898ab(0xdb),'input_schema':{'type':a1_0x5898ab(0xdc),'properties':{'tabId':{'type':a1_0x5898ab(0xc4),'description':a1_0x5898ab(0xca)},'direction':{'type':'string','enum':['up',a1_0x5898ab(0xce),a1_0x5898ab(0xd8),'bottom'],'description':'Direction\x20to\x20scroll'},'amount':{'type':a1_0x5898ab(0xc4),'description':a1_0x5898ab(0xcf)}},'required':[a1_0x5898ab(0xda),a1_0x5898ab(0xcd)]}}];
1
+ const a1_0x52243c=a1_0x1c64;(function(_0x1200a5,_0x3654f0){const _0x1e7474=a1_0x1c64,_0x32da5e=_0x1200a5();while(!![]){try{const _0x5e5132=-parseInt(_0x1e7474(0x1df))/0x1+parseInt(_0x1e7474(0x1d4))/0x2*(-parseInt(_0x1e7474(0x1eb))/0x3)+parseInt(_0x1e7474(0x1ea))/0x4*(-parseInt(_0x1e7474(0x1e7))/0x5)+-parseInt(_0x1e7474(0x1dc))/0x6+parseInt(_0x1e7474(0x1da))/0x7*(parseInt(_0x1e7474(0x1d9))/0x8)+parseInt(_0x1e7474(0x1e4))/0x9*(parseInt(_0x1e7474(0x1e0))/0xa)+parseInt(_0x1e7474(0x1de))/0xb*(parseInt(_0x1e7474(0x1e9))/0xc);if(_0x5e5132===_0x3654f0)break;else _0x32da5e['push'](_0x32da5e['shift']());}catch(_0x4c48c5){_0x32da5e['push'](_0x32da5e['shift']());}}}(a1_0x1d72,0xe1d50));export*from'./server.js';function a1_0x1d72(){const _0x2778af=['40FIjfpN','2060247trzWPq','browser_click','8800632UGGqvM','browser_scroll','11ZXeJhw','957456cMvSXP','10VSMwWY','string','Text\x20to\x20fill','Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot','6861357DAldgy','Scroll\x20the\x20page\x20up\x20or\x20down','Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)','333980xEWFax','top','46229700VvJzgu','72jPmQcq','4604667csfeja','CSS\x20selector\x20for\x20the\x20element','number','object','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','text','query','direction','tabId','2geinuH','Fill\x20a\x20form\x20field\x20or\x20input\x20element','Direction\x20to\x20scroll','browser_fill','Tab\x20ID'];a1_0x1d72=function(){return _0x2778af;};return a1_0x1d72();}function a1_0x1c64(_0x3f2944,_0x1c6a77){_0x3f2944=_0x3f2944-0x1cf;const _0x1d729e=a1_0x1d72();let _0x1c6490=_0x1d729e[_0x3f2944];return _0x1c6490;}export*from'./tools.js';export*from'./server.js';export*from'./tools.js';export const tools=[{'name':a1_0x52243c(0x1d7),'description':a1_0x52243c(0x1d5),'input_schema':{'type':'object','properties':{'tabId':{'type':'number','description':a1_0x52243c(0x1e3)},'query':{'type':a1_0x52243c(0x1e1),'description':'CSS\x20selector\x20for\x20the\x20element'},'text':{'type':a1_0x52243c(0x1e1),'description':a1_0x52243c(0x1e2)}},'required':[a1_0x52243c(0x1d3),a1_0x52243c(0x1d1),a1_0x52243c(0x1d0)]}},{'name':a1_0x52243c(0x1db),'description':'Click\x20an\x20element\x20on\x20the\x20page','input_schema':{'type':'object','properties':{'tabId':{'type':a1_0x52243c(0x1ed),'description':a1_0x52243c(0x1cf)},'query':{'type':a1_0x52243c(0x1e1),'description':a1_0x52243c(0x1ec)},'index':{'type':'number','description':'Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)'}},'required':[a1_0x52243c(0x1d3),'query']}},{'name':a1_0x52243c(0x1dd),'description':a1_0x52243c(0x1e5),'input_schema':{'type':a1_0x52243c(0x1ee),'properties':{'tabId':{'type':a1_0x52243c(0x1ed),'description':a1_0x52243c(0x1d8)},'direction':{'type':a1_0x52243c(0x1e1),'enum':['up','down',a1_0x52243c(0x1e8),'bottom'],'description':a1_0x52243c(0x1d6)},'amount':{'type':a1_0x52243c(0x1ed),'description':a1_0x52243c(0x1e6)}},'required':['tabId',a1_0x52243c(0x1d2)]}}];
@@ -1 +1 @@
1
- function a2_0x402f(_0x4fe508,_0x59186f){_0x4fe508=_0x4fe508-0x1e4;const _0x2f5998=a2_0x2f59();let _0x402f7b=_0x2f5998[_0x4fe508];return _0x402f7b;}(function(_0x32bc5f,_0x242fcd){const _0x38ce3d=a2_0x402f,_0x15d1d5=_0x32bc5f();while(!![]){try{const _0x3a786e=parseInt(_0x38ce3d(0x21f))/0x1*(parseInt(_0x38ce3d(0x213))/0x2)+parseInt(_0x38ce3d(0x1eb))/0x3*(parseInt(_0x38ce3d(0x1f2))/0x4)+-parseInt(_0x38ce3d(0x20a))/0x5*(-parseInt(_0x38ce3d(0x221))/0x6)+-parseInt(_0x38ce3d(0x21b))/0x7*(-parseInt(_0x38ce3d(0x1e5))/0x8)+parseInt(_0x38ce3d(0x1e4))/0x9*(-parseInt(_0x38ce3d(0x20c))/0xa)+parseInt(_0x38ce3d(0x212))/0xb*(-parseInt(_0x38ce3d(0x202))/0xc)+-parseInt(_0x38ce3d(0x203))/0xd*(parseInt(_0x38ce3d(0x208))/0xe);if(_0x3a786e===_0x242fcd)break;else _0x15d1d5['push'](_0x15d1d5['shift']());}catch(_0x23d62a){_0x15d1d5['push'](_0x15d1d5['shift']());}}}(a2_0x2f59,0xd55e7));function a2_0x2f59(){const _0x5d42a8=['uid','Browser\x20server\x20started\x20on\x20ws://localhost:','Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...','set','info','Browser\x20server\x20not\x20running','738648AytSjY','299TXQGjj','toString','code','success','timeout','350476mdXoed','now','5UZXsCx','user','10uwoLcD','Error\x20processing\x20message:','data','listening','message','reject','22JCjXBG','10936GhFKWm','EADDRINUSE','random','userId','email','type','Server\x20stopped','from','63KrRTQw','dim','unknown','values','2kXcKtF','delete','8391222zAncrR','15423903eCfQwl','228776cWTSop','Command\x20failed','error','forEach','Browser\x20server\x20stopped','clear','3kXJgJx','send','result','connection','close','Failed\x20to\x20start\x20browser\x20server:\x20','Browser\x20server\x20already\x20running','6479080QcAdsX','get','auth','warn','requestId','Command\x20timeout\x20after\x20','response','Browser\x20server\x20error:\x20','req_','stringify'];a2_0x2f59=function(){return _0x5d42a8;};return a2_0x2f59();}import{WebSocketServer}from'ws';import*as a2_0x5d7cf5 from'../ui/output.js';const sessions=new Map();let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x376b9b=0x2408){return new Promise(_0x139bea=>{const _0x56b6a0=a2_0x402f;if(isRunning&&server){a2_0x5d7cf5[_0x56b6a0(0x1f5)](_0x56b6a0(0x1f1)),_0x139bea(!![]);return;}try{server=new WebSocketServer({'port':_0x376b9b}),server['on'](_0x56b6a0(0x20f),()=>{const _0x551801=_0x56b6a0;isRunning=!![],a2_0x5d7cf5[_0x551801(0x206)](_0x551801(0x1fd)+_0x376b9b),a2_0x5d7cf5[_0x551801(0x21c)](_0x551801(0x1fe)),_0x139bea(!![]);}),server['on'](_0x56b6a0(0x1ee),async _0x23b6ac=>{const _0x47f58b=_0x56b6a0;let _0x80b1a=null;_0x23b6ac['on'](_0x47f58b(0x210),async _0x3cc3d2=>{const _0x1efd12=_0x47f58b;try{const _0x5422ef=JSON['parse'](_0x3cc3d2[_0x1efd12(0x204)]());if(_0x5422ef[_0x1efd12(0x218)]===_0x1efd12(0x1f4))_0x80b1a={'ws':_0x23b6ac,'userId':_0x5422ef[_0x1efd12(0x20b)]?.[_0x1efd12(0x1fc)]||_0x1efd12(0x21d),'userEmail':_0x5422ef[_0x1efd12(0x20b)]?.[_0x1efd12(0x217)]||_0x1efd12(0x21d),'connectedAt':Date['now']()},sessions['set'](_0x80b1a[_0x1efd12(0x216)],_0x80b1a),_0x23b6ac[_0x1efd12(0x1ec)](JSON[_0x1efd12(0x1fb)]({'type':'auth_success','userId':_0x80b1a['userId']}));else{if(_0x5422ef[_0x1efd12(0x218)]===_0x1efd12(0x1f8)){const _0x316c9e=pendingRequests[_0x1efd12(0x1f3)](_0x5422ef[_0x1efd12(0x1f6)]);_0x316c9e&&(clearTimeout(_0x316c9e[_0x1efd12(0x207)]),pendingRequests['delete'](_0x5422ef[_0x1efd12(0x1f6)]),_0x5422ef[_0x1efd12(0x1ed)][_0x1efd12(0x206)]?_0x316c9e['resolve'](_0x5422ef[_0x1efd12(0x1ed)][_0x1efd12(0x20e)]):_0x316c9e[_0x1efd12(0x211)](new Error(_0x5422ef[_0x1efd12(0x1ed)]['error']||_0x1efd12(0x1e6))));}}}catch(_0x149ec8){console[_0x1efd12(0x1e7)](_0x1efd12(0x20d),_0x149ec8);}}),_0x23b6ac['on']('close',()=>{const _0x3fc460=_0x47f58b;_0x80b1a&&sessions[_0x3fc460(0x220)](_0x80b1a[_0x3fc460(0x216)]);}),_0x23b6ac['on'](_0x47f58b(0x1e7),_0x1a6b1a=>{console['error']('WebSocket\x20error:',_0x1a6b1a);});}),server['on'](_0x56b6a0(0x1e7),_0xe71219=>{const _0x5df990=_0x56b6a0;_0xe71219[_0x5df990(0x205)]!==_0x5df990(0x214)&&a2_0x5d7cf5[_0x5df990(0x1e7)](_0x5df990(0x1f9)+_0xe71219[_0x5df990(0x210)]),_0x139bea(![]);});}catch(_0x425f8e){_0x425f8e[_0x56b6a0(0x205)]!==_0x56b6a0(0x214)&&a2_0x5d7cf5[_0x56b6a0(0x1e7)](_0x56b6a0(0x1f0)+_0x425f8e[_0x56b6a0(0x210)]),_0x139bea(![]);}});}export function stopBrowserServer(){const _0x706196=a2_0x402f;server&&(sessions[_0x706196(0x1ea)](),pendingRequests[_0x706196(0x1e8)](({timeout:_0x33bd97,reject:_0x25f335})=>{const _0x3b9528=_0x706196;clearTimeout(_0x33bd97),_0x25f335(new Error(_0x3b9528(0x219)));}),pendingRequests[_0x706196(0x1ea)](),server[_0x706196(0x1ef)](),server=null,isRunning=![],a2_0x5d7cf5[_0x706196(0x200)](_0x706196(0x1e9)));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x16bd1b,_0x21c778={},_0x31f86d=0x7530){const _0x3d71ae=a2_0x402f;if(!isRunning)throw new Error(_0x3d71ae(0x201));const _0xe9c27d=Array[_0x3d71ae(0x21a)](sessions[_0x3d71ae(0x21e)]())[0x0];if(!_0xe9c27d)throw new Error('No\x20browser\x20extension\x20connected');const _0x271f48=generateRequestId();return new Promise((_0x30819f,_0x2a9fb3)=>{const _0x3f4602=_0x3d71ae,_0x1587fc=setTimeout(()=>{const _0x3481da=a2_0x402f;pendingRequests['delete'](_0x271f48),_0x2a9fb3(new Error(_0x3481da(0x1f7)+_0x31f86d+'ms'));},_0x31f86d);pendingRequests[_0x3f4602(0x1ff)](_0x271f48,{'resolve':_0x30819f,'reject':_0x2a9fb3,'timeout':_0x1587fc});const _0x22be4c={'requestId':_0x271f48,'command':_0x16bd1b,'args':_0x21c778};_0xe9c27d['ws'][_0x3f4602(0x1ec)](JSON['stringify'](_0x22be4c));});}function generateRequestId(){const _0x4d384d=a2_0x402f;return _0x4d384d(0x1fa)+Date[_0x4d384d(0x209)]()+'_'+Math[_0x4d384d(0x215)]()['toString'](0x24)['substr'](0x2,0x9);}export function getConnectedSessions(){const _0x176a89=a2_0x402f;return Array['from'](sessions[_0x176a89(0x21e)]());}
1
+ (function(_0x2b97b3,_0x1aea37){const _0x2f4037=a2_0x53c6,_0x315791=_0x2b97b3();while(!![]){try{const _0x33b4a5=parseInt(_0x2f4037(0xfc))/0x1*(parseInt(_0x2f4037(0x102))/0x2)+-parseInt(_0x2f4037(0xfa))/0x3*(-parseInt(_0x2f4037(0x11b))/0x4)+-parseInt(_0x2f4037(0x119))/0x5+-parseInt(_0x2f4037(0x108))/0x6+-parseInt(_0x2f4037(0x114))/0x7*(-parseInt(_0x2f4037(0x103))/0x8)+-parseInt(_0x2f4037(0xf0))/0x9*(parseInt(_0x2f4037(0xfb))/0xa)+-parseInt(_0x2f4037(0xf2))/0xb;if(_0x33b4a5===_0x1aea37)break;else _0x315791['push'](_0x315791['shift']());}catch(_0x19732b){_0x315791['push'](_0x315791['shift']());}}}(a2_0x1a6f,0xc4c54));import{WebSocketServer}from'ws';import*as a2_0x474069 from'../ui/output.js';const sessions=new Map();function a2_0x1a6f(){const _0x53eb49=['6036282EVwJgJ','values','unknown','error','stringify','Browser\x20server\x20already\x20running','reject','requestId','get','now','WebSocket\x20error:','user','133HAPgLW','timeout','forEach','from','clear','401500jXQSIH','parse','989844NzVBEv','userId','Browser\x20server\x20stopped','email','Command\x20timeout\x20after\x20','auth_success','close','Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...','EADDRINUSE','send','dim','Browser\x20server\x20started\x20on\x20ws://localhost:','Browser\x20server\x20not\x20running','99GOuABk','listening','23976909ZOvNXe','toString','set','type','data','message','warn','connection','18oYbEnF','179710fAFSDY','1211050LfnbJl','delete','info','Failed\x20to\x20start\x20browser\x20server:\x20','success','response','2jgypTY','662696lbxKxM','auth','code','result','Server\x20stopped'];a2_0x1a6f=function(){return _0x53eb49;};return a2_0x1a6f();}function a2_0x53c6(_0x58b0d0,_0x430938){_0x58b0d0=_0x58b0d0-0xe8;const _0x1a6fe5=a2_0x1a6f();let _0x53c61a=_0x1a6fe5[_0x58b0d0];return _0x53c61a;}let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x1c87e9=0x2408){return new Promise(_0x41ed6d=>{const _0x3b79c6=a2_0x53c6;if(isRunning&&server){a2_0x474069[_0x3b79c6(0xf8)](_0x3b79c6(0x10d)),_0x41ed6d(!![]);return;}try{server=new WebSocketServer({'port':_0x1c87e9}),server['on'](_0x3b79c6(0xf1),()=>{const _0x288c50=_0x3b79c6;isRunning=!![],a2_0x474069[_0x288c50(0x100)](_0x288c50(0xee)+_0x1c87e9),a2_0x474069[_0x288c50(0xed)](_0x288c50(0xea)),_0x41ed6d(!![]);}),server['on'](_0x3b79c6(0xf9),async _0x5ef839=>{const _0x5ae0c8=_0x3b79c6;let _0x443343=null;_0x5ef839['on']('message',async _0x20bce0=>{const _0x4d2f45=a2_0x53c6;try{const _0x3ab6c1=JSON[_0x4d2f45(0x11a)](_0x20bce0[_0x4d2f45(0xf3)]());if(_0x3ab6c1[_0x4d2f45(0xf5)]===_0x4d2f45(0x104))_0x443343={'ws':_0x5ef839,'userId':_0x3ab6c1[_0x4d2f45(0x113)]?.['uid']||_0x4d2f45(0x10a),'userEmail':_0x3ab6c1[_0x4d2f45(0x113)]?.[_0x4d2f45(0x11e)]||'unknown','connectedAt':Date[_0x4d2f45(0x111)]()},sessions[_0x4d2f45(0xf4)](_0x443343[_0x4d2f45(0x11c)],_0x443343),_0x5ef839[_0x4d2f45(0xec)](JSON[_0x4d2f45(0x10c)]({'type':_0x4d2f45(0xe8),'userId':_0x443343[_0x4d2f45(0x11c)]}));else{if(_0x3ab6c1[_0x4d2f45(0xf5)]===_0x4d2f45(0x101)){const _0x5aada3=pendingRequests[_0x4d2f45(0x110)](_0x3ab6c1[_0x4d2f45(0x10f)]);_0x5aada3&&(clearTimeout(_0x5aada3[_0x4d2f45(0x115)]),pendingRequests[_0x4d2f45(0xfd)](_0x3ab6c1[_0x4d2f45(0x10f)]),_0x3ab6c1[_0x4d2f45(0x106)][_0x4d2f45(0x100)]?_0x5aada3['resolve'](_0x3ab6c1['result'][_0x4d2f45(0xf6)]):_0x5aada3[_0x4d2f45(0x10e)](new Error(_0x3ab6c1[_0x4d2f45(0x106)]['error']||'Command\x20failed')));}}}catch(_0x28657b){console['error']('Error\x20processing\x20message:',_0x28657b);}}),_0x5ef839['on'](_0x5ae0c8(0xe9),()=>{const _0xe3f657=_0x5ae0c8;_0x443343&&sessions['delete'](_0x443343[_0xe3f657(0x11c)]);}),_0x5ef839['on'](_0x5ae0c8(0x10b),_0x5ba2ca=>{const _0xdc6a93=_0x5ae0c8;console[_0xdc6a93(0x10b)](_0xdc6a93(0x112),_0x5ba2ca);});}),server['on']('error',_0x529378=>{const _0x7b3f77=_0x3b79c6;_0x529378['code']!==_0x7b3f77(0xeb)&&a2_0x474069[_0x7b3f77(0x10b)]('Browser\x20server\x20error:\x20'+_0x529378[_0x7b3f77(0xf7)]),_0x41ed6d(![]);});}catch(_0x2da6fd){_0x2da6fd[_0x3b79c6(0x105)]!==_0x3b79c6(0xeb)&&a2_0x474069['error'](_0x3b79c6(0xff)+_0x2da6fd[_0x3b79c6(0xf7)]),_0x41ed6d(![]);}});}export function stopBrowserServer(){const _0x39df0c=a2_0x53c6;server&&(sessions['clear'](),pendingRequests[_0x39df0c(0x116)](({timeout:_0x2a9313,reject:_0x5ba270})=>{const _0x2b55b9=_0x39df0c;clearTimeout(_0x2a9313),_0x5ba270(new Error(_0x2b55b9(0x107)));}),pendingRequests[_0x39df0c(0x118)](),server[_0x39df0c(0xe9)](),server=null,isRunning=![],a2_0x474069[_0x39df0c(0xfe)](_0x39df0c(0x11d)));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x566145,_0x458f05={},_0x2e33dd=0x7530){const _0x591628=a2_0x53c6;if(!isRunning)throw new Error(_0x591628(0xef));const _0x47ecf5=Array['from'](sessions['values']())[0x0];if(!_0x47ecf5)throw new Error('No\x20browser\x20extension\x20connected');const _0x55c72e=generateRequestId();return new Promise((_0x347608,_0x5a86cb)=>{const _0x3a1b11=_0x591628,_0x343b89=setTimeout(()=>{const _0x5d2a72=a2_0x53c6;pendingRequests[_0x5d2a72(0xfd)](_0x55c72e),_0x5a86cb(new Error(_0x5d2a72(0x11f)+_0x2e33dd+'ms'));},_0x2e33dd);pendingRequests['set'](_0x55c72e,{'resolve':_0x347608,'reject':_0x5a86cb,'timeout':_0x343b89});const _0x169254={'requestId':_0x55c72e,'command':_0x566145,'args':_0x458f05};_0x47ecf5['ws'][_0x3a1b11(0xec)](JSON[_0x3a1b11(0x10c)](_0x169254));});}function generateRequestId(){const _0x289160=a2_0x53c6;return'req_'+Date[_0x289160(0x111)]()+'_'+Math['random']()[_0x289160(0xf3)](0x24)['substr'](0x2,0x9);}export function getConnectedSessions(){const _0x5eeb6f=a2_0x53c6;return Array[_0x5eeb6f(0x117)](sessions[_0x5eeb6f(0x109)]());}
@@ -1 +1 @@
1
- (function(_0x4f358f,_0x2e9d26){const _0xeb2667=a3_0x12c9,_0x35772c=_0x4f358f();while(!![]){try{const _0x525a41=-parseInt(_0xeb2667(0xeb))/0x1+-parseInt(_0xeb2667(0xfe))/0x2*(parseInt(_0xeb2667(0x102))/0x3)+parseInt(_0xeb2667(0xf0))/0x4+parseInt(_0xeb2667(0xf2))/0x5+-parseInt(_0xeb2667(0xf4))/0x6*(parseInt(_0xeb2667(0xf5))/0x7)+parseInt(_0xeb2667(0xf9))/0x8*(parseInt(_0xeb2667(0x101))/0x9)+parseInt(_0xeb2667(0xfb))/0xa;if(_0x525a41===_0x2e9d26)break;else _0x35772c['push'](_0x35772c['shift']());}catch(_0x4c4db2){_0x35772c['push'](_0x35772c['shift']());}}}(a3_0x56b1,0x58758));import{sendBrowserCommand,getConnectedSessions}from'./server.js';import a3_0x9b8fa7 from'open';export async function browserOpen(_0x3449ce){const _0x2c9f3a=a3_0x12c9,_0x4e87c7=getConnectedSessions();if(_0x4e87c7[_0x2c9f3a(0xfa)]===0x0)return await a3_0x9b8fa7(_0x3449ce),{'success':!![],'message':_0x2c9f3a(0xec)};try{return await sendBrowserCommand(_0x2c9f3a(0x100),{'url':_0x3449ce});}catch(_0x437b71){return await a3_0x9b8fa7(_0x3449ce),{'success':!![],'message':_0x2c9f3a(0xec)};}}export async function browserClick(_0x219119){const _0x410659=a3_0x12c9;return await sendBrowserCommand(_0x410659(0xef),{'selector':_0x219119});}export async function browserFill(_0x9e9374,_0x68ee8b){return await sendBrowserCommand('fill',{'selector':_0x9e9374,'value':_0x68ee8b});}export async function browserSnapshot(){const _0x3b463c=a3_0x12c9;return await sendBrowserCommand(_0x3b463c(0xf3));}function a3_0x56b1(){const _0x3f550a=['get_text','4jSHFcY','close','open','1085202DWchcT','1049745RbiUfc','666853wofmzm','Opened\x20in\x20system\x20browser','get_html','screenshot','click','1910048DQlGYh','wait','3043030FKyjoz','snapshot','443418RaiBAI','7QsusKW','scroll','forward','number','8oTcriA','length','5962180IhEKzI','back'];a3_0x56b1=function(){return _0x3f550a;};return a3_0x56b1();}export async function browserScreenshot(){const _0x5498e2=a3_0x12c9;return await sendBrowserCommand(_0x5498e2(0xee));}function a3_0x12c9(_0x3c3a5e,_0x2b35a3){_0x3c3a5e=_0x3c3a5e-0xeb;const _0x56b129=a3_0x56b1();let _0x12c909=_0x56b129[_0x3c3a5e];return _0x12c909;}export async function browserGetText(_0xd55e12){const _0x18b487=a3_0x12c9;return await sendBrowserCommand(_0x18b487(0xfd),{'selector':_0xd55e12});}export async function browserGetHtml(_0x44c18b){const _0x54af24=a3_0x12c9;return await sendBrowserCommand(_0x54af24(0xed),{'selector':_0x44c18b});}export async function browserWait(_0xff5953){const _0x106bd9=a3_0x12c9;return typeof _0xff5953===_0x106bd9(0xf8)?await sendBrowserCommand(_0x106bd9(0xf1),{'ms':_0xff5953}):await sendBrowserCommand(_0x106bd9(0xf1),{'selector':_0xff5953});}export async function browserBack(){const _0x41c8b7=a3_0x12c9;return await sendBrowserCommand(_0x41c8b7(0xfc));}export async function browserForward(){const _0x30194d=a3_0x12c9;return await sendBrowserCommand(_0x30194d(0xf7));}export async function browserReload(){return await sendBrowserCommand('reload');}export async function browserScroll(_0x4e87dd,_0x3146fc){const _0x5c7cb2=a3_0x12c9;return await sendBrowserCommand(_0x5c7cb2(0xf6),{'direction':_0x4e87dd,'amount':_0x3146fc});}export async function browserClose(){const _0x53f474=a3_0x12c9;return await sendBrowserCommand(_0x53f474(0xff));}
1
+ (function(_0x16cf6d,_0x557d0c){const _0xdc46b2=a3_0x2a71,_0x4a2b34=_0x16cf6d();while(!![]){try{const _0x45e07e=parseInt(_0xdc46b2(0xb0))/0x1+-parseInt(_0xdc46b2(0xbd))/0x2+-parseInt(_0xdc46b2(0xb4))/0x3+-parseInt(_0xdc46b2(0xb3))/0x4+-parseInt(_0xdc46b2(0xb9))/0x5*(parseInt(_0xdc46b2(0xb6))/0x6)+-parseInt(_0xdc46b2(0xad))/0x7*(parseInt(_0xdc46b2(0xb5))/0x8)+parseInt(_0xdc46b2(0xc1))/0x9;if(_0x45e07e===_0x557d0c)break;else _0x4a2b34['push'](_0x4a2b34['shift']());}catch(_0x255eef){_0x4a2b34['push'](_0x4a2b34['shift']());}}}(a3_0x5443,0xb1a98));import{sendBrowserCommand,getConnectedSessions}from'./server.js';import a3_0x57d40c from'open';function a3_0x5443(){const _0x3e58fc=['83310COkNCp','get_text','click','365jxQOgv','length','open','get_html','1777982mMrCBD','number','wait','close','35307729JSoXDH','reload','7ahyoXS','snapshot','forward','18365KmwqCM','fill','Opened\x20in\x20system\x20browser','2702512XZVpPr','638460yHxeva','3381584Yxvypn'];a3_0x5443=function(){return _0x3e58fc;};return a3_0x5443();}export async function browserOpen(_0x9fb985){const _0x1a56de=a3_0x2a71,_0x992182=getConnectedSessions();if(_0x992182[_0x1a56de(0xba)]===0x0)return await a3_0x57d40c(_0x9fb985),{'success':!![],'message':_0x1a56de(0xb2)};try{return await sendBrowserCommand(_0x1a56de(0xbb),{'url':_0x9fb985});}catch(_0x41b501){return await a3_0x57d40c(_0x9fb985),{'success':!![],'message':_0x1a56de(0xb2)};}}export async function browserClick(_0x5a0e6b){const _0x7401c7=a3_0x2a71;return await sendBrowserCommand(_0x7401c7(0xb8),{'selector':_0x5a0e6b});}export async function browserFill(_0x13c4e0,_0x32e2e9){const _0x52cca6=a3_0x2a71;return await sendBrowserCommand(_0x52cca6(0xb1),{'selector':_0x13c4e0,'value':_0x32e2e9});}export async function browserSnapshot(){const _0x33cbdf=a3_0x2a71;return await sendBrowserCommand(_0x33cbdf(0xae));}export async function browserScreenshot(){return await sendBrowserCommand('screenshot');}export async function browserGetText(_0x30b9dc){const _0x336964=a3_0x2a71;return await sendBrowserCommand(_0x336964(0xb7),{'selector':_0x30b9dc});}export async function browserGetHtml(_0x49a691){const _0x1b8731=a3_0x2a71;return await sendBrowserCommand(_0x1b8731(0xbc),{'selector':_0x49a691});}export async function browserWait(_0x3bee84){const _0xe7361b=a3_0x2a71;return typeof _0x3bee84===_0xe7361b(0xbe)?await sendBrowserCommand(_0xe7361b(0xbf),{'ms':_0x3bee84}):await sendBrowserCommand(_0xe7361b(0xbf),{'selector':_0x3bee84});}export async function browserBack(){return await sendBrowserCommand('back');}function a3_0x2a71(_0x333da0,_0x7b1617){_0x333da0=_0x333da0-0xad;const _0x5443ea=a3_0x5443();let _0x2a71e8=_0x5443ea[_0x333da0];return _0x2a71e8;}export async function browserForward(){const _0x30eec5=a3_0x2a71;return await sendBrowserCommand(_0x30eec5(0xaf));}export async function browserReload(){const _0x46d357=a3_0x2a71;return await sendBrowserCommand(_0x46d357(0xc2));}export async function browserScroll(_0x4e7df2,_0x412217){return await sendBrowserCommand('scroll',{'direction':_0x4e7df2,'amount':_0x412217});}export async function browserClose(){const _0xf7d16d=a3_0x2a71;return await sendBrowserCommand(_0xf7d16d(0xc0));}
@@ -1 +1 @@
1
- const a4_0x1e48cf=a4_0x5b56;(function(_0x3b55a8,_0x4ada7d){const _0x4b150a=a4_0x5b56,_0x1a19b1=_0x3b55a8();while(!![]){try{const _0x2bd81f=parseInt(_0x4b150a(0x16b))/0x1*(-parseInt(_0x4b150a(0x155))/0x2)+parseInt(_0x4b150a(0x1e0))/0x3*(parseInt(_0x4b150a(0x212))/0x4)+-parseInt(_0x4b150a(0x13a))/0x5+parseInt(_0x4b150a(0x214))/0x6*(parseInt(_0x4b150a(0x1e7))/0x7)+parseInt(_0x4b150a(0x1d0))/0x8*(parseInt(_0x4b150a(0x15a))/0x9)+-parseInt(_0x4b150a(0x13e))/0xa+parseInt(_0x4b150a(0x213))/0xb*(parseInt(_0x4b150a(0x23e))/0xc);if(_0x2bd81f===_0x4ada7d)break;else _0x1a19b1['push'](_0x1a19b1['shift']());}catch(_0x4558bd){_0x1a19b1['push'](_0x1a19b1['shift']());}}}(a4_0x43bd,0xc1623));import{input,select}from'@inquirer/prompts';import a4_0x4d948d from'chalk';import a4_0x52bfcd from'crypto';import{sendChatMessage,getUserUsage}from'../utils/api.js';import{getSelectedModel,getUser}from'../utils/storage.js';import{saveChatSession,getChatSessions,getChatSession}from'../utils/chat-history.js';import{formatRulesForSystem}from'../tools/rules.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,deleteFile,renameFile,copyFile,fileInfo,readFileLines,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'../tools/git.js';import{fetchUrl,downloadFile}from'../tools/network.js';import{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'../tools/system.js';import{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'../tools/project.js';import*as a4_0xa73ddc from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x569b47 from'../github/index.js';const SYSTEM_PROMPT=a4_0x1e48cf(0x1ed);function a4_0x43bd(){const _0x2885b4=['/stats','Unexpected\x20error:\x20','warn','...','grep_recursive','stdout','data','No\x20changes\x20to\x20rollback','substring','Open','Failed\x20to\x20fetch\x20usage\x20data.','GetText','open_in_editor','Browser\x20server\x20is\x20not\x20running','Download','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','resetIn','Stop.','command','header','info','copy_file','WriteJSON','patch_file','Bot\x20token:','Yes','isRateLimit','Click','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','fetch_url','Browser\x20server\x20is\x20running','from','I\x20am','Bot\x20token\x20saved!','Read\x20','extensions','run_command','wait','---','selector','/theme','Tool\x20error\x20occurred:\x20','run_background','code','send_terminal_input','git_add','terminate_process','aiMessageEnd','6514795JjbxZQ','parse','setBotToken','get_env','11943810MiWtoU','Fetching\x20usage...','browser_screenshot','question','stderr','```tool','github_read_file','browser_click','Conversation\x20cleared','currentDir','match','-\x20Running','Copy','find_files','join','catch','Telegram\x20Bot\x20Setup','\x20lines\x20of\x20output\x20(','actionSpinner','assistant','):\x20','SIGINT','No\x20chat\x20history\x20found.','32862nwGIbn','message','Completed\x20successfully\x20(','InputTerm','removeListener','2722338kWrpGU','value','content','Running','now','Let\x20me','\x22args\x22:','Delete','Run','../tools/file.js','SysInfo','<execute_tool>','body','text','git_status','filename','/help','92GGURao','\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status','ask_human','slice','Grep','repo','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','exitCode','path','head','Active\x20processes:\x20','Unknown\x20tool:\x20','../utils/storage.js','map','size','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot','forEach','input','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','title','Current\x20model:\x20','loggedInBox','properties','Ask','start','replace','<think>','Connected\x20MCP\x20Tools:','GitLog','Security\x20PIN\x20set!','status','values','No\x20MCP\x20tools\x20connected.','tree','/history','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','count','User\x20aborted.','stringify','\x20\x20/history\x20\x20\x20-\x20View\x20and\x20resume\x20previous\x20chats','serverName','user','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/history\x20to\x20resume\x20chats,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','Now,','rename_file','Telegram\x20bot\x20is\x20not\x20running','GitCommit','split','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','/clear','Error:\x20','Telegram\x20Commands','bold','list_directory','Read','getThemeById','```','read_file','powershell_run','PID:','browser_get_text','Exited\x20with\x20code\x20','.\x20Use\x20PowerShell\x20commands.','includes','read_file_lines','I\x27ve','Cancel','force\x20closed','1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather','Update','cmd','Error','usageBox','system','setup','string','../browser/index.js','abort','registered\x20that','randomUUID','mcpConnected','/quit','\x0aAborting...','script','end','delete_file','List','\x0aYou\x20are\x20running\x20on\x20','messages','write_json','Generating...','monthlyLimit','createSpinner','git_branch','description','</think>','download_file','GitDiff','filepath','read_json','16OzoZlL','Theme\x20changed\x20to:\x20','exit','isSpinning','file_info','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','Operation\x20failed','CloseBrowser','Done\x20in\x20','object','hex','\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat','zip_files','github_create_branch','trim','\x20[Aborted]','3olHrMQ','Screenshot','GetEnv','ListProcs','setSecurityPin','browser_open','updatedAt','215614fboNLa','destination','SetEnv','file','dim','ClipRead','You\x20are\x20Woozlit,\x20an\x20elite\x20autonomous\x20AI\x20engineering\x20agent.\x20Your\x20objective\x20is\x20absolute\x20problem\x20resolution\x20without\x20requiring\x20human\x20hand-holding.\x0a\x0aCORE\x20DIRECTIVES:\x0a1.\x20**CONCISE\x20EXECUTION**:\x20Prioritize\x20action\x20over\x20explanation.\x20Minimize\x20conversational\x20output.\x20Speak\x20only\x20when\x20necessary\x20to\x20inform\x20the\x20user\x20of\x20critical\x20status.\x20NEVER\x20use\x20emojis.\x0a2.\x20**AUTONOMY**:\x20Act\x20independently.\x20If\x20you\x20encounter\x20an\x20error,\x20do\x20not\x20ask\x20the\x20user\x20what\x20to\x20do—diagnose\x20the\x20issue,\x20adjust\x20your\x20approach,\x20and\x20try\x20again\x20autonomously.\x0a3.\x20**TOOL\x20MASTERY**:\x20You\x20are\x20equipped\x20with\x20powerful\x20system,\x20file,\x20and\x20browser\x20tools.\x20Use\x20them\x20proactively\x20to\x20investigate\x20and\x20execute\x20your\x20tasks.\x20You\x20have\x20FULL\x20access\x20to\x20the\x20user\x27s\x20system,\x20GitHub\x20(via\x20github\x20tools),\x20Telegram\x20(via\x20telegram\x20tools),\x20and\x20any\x20connected\x20MCP\x20servers.\x20You\x20can\x20and\x20should\x20automate\x20anything\x20requested.\x0a4.\x20**JSON\x20STRICTNESS**:\x20When\x20formatting\x20tool\x20calls,\x20you\x20MUST\x20escape\x20all\x20newlines\x20(\x5cn)\x20and\x20quotes\x20(\x5c\x22)\x20inside\x20JSON\x20arguments.\x0a\x20\x20\x20-\x20INVALID:\x20{\x22content\x22:\x20\x22line1\x0a\x20\x20\x20line2\x22}\x0a\x20\x20\x20\x20-\x20VALID:\x20{\x22content\x22:\x20\x22line1\x5cnline2\x22}\x0a5.\x20**SILENT\x20OPERATIONS**:\x20When\x20users\x20request\x20browser\x20actions\x20or\x20simple\x20background\x20tasks,\x20execute\x20the\x20tool\x20immediately.\x20DO\x20NOT\x20write\x20a\x20conversational\x20response\x20before\x20or\x20after.\x20Output\x20ONLY\x20the\x20raw\x20tool\x20JSON\x20block.\x0a6.\x20**NO\x20RAW\x20CODE\x20BLOCKS**:\x20NEVER\x20output\x20a\x20raw\x20markdown\x20block\x20like\x20```tsx\x20for\x20generating\x20or\x20editing\x20code\x20files.\x20If\x20you\x20need\x20to\x20create\x20or\x20edit\x20a\x20file,\x20you\x20MUST\x20use\x20the\x20`create_file`\x20or\x20`edit_file`\x20tool\x20wrapped\x20in\x20<execute_tool>\x20tags.\x0a7.\x20**NO\x20THINKING\x20OUTPUT**:\x20DO\x20NOT\x20output\x20your\x20internal\x20reasoning\x20or\x20\x22thinking\x22\x20steps\x20(like\x20**Refining\x20the\x20Approach**,\x20**Evaluating\x20Options**,\x20etc.).\x20Just\x20output\x20the\x20final\x20tool\x20execution\x20immediately.\x0a\x0aAVAILABLE\x20TOOLS:\x0a-\x20File\x20system:\x20create_file,\x20read_file,\x20edit_file,\x20list_directory,\x20search_file,\x20find_files,\x20search_directory,\x20delete_file,\x20rename_file,\x20copy_file,\x20file_info,\x20read_file_lines\x0a-\x20Git:\x20git_status,\x20git_diff,\x20git_log,\x20git_add,\x20git_commit,\x20git_branch\x0a-\x20Terminal:\x20run_command,\x20run_background,\x20read_terminal_output,\x20send_terminal_input,\x20list_active_processes,\x20terminate_process\x0a-\x20Network:\x20fetch_url,\x20download_file\x0a-\x20System:\x20get_env,\x20set_env,\x20get_system_info,\x20clipboard_read,\x20clipboard_write\x0a-\x20Project:\x20tree,\x20grep_recursive,\x20replace_in_files,\x20open_in_editor,\x20zip_files,\x20unzip_files,\x20write_json,\x20read_json,\x20patch_file,\x20powershell_run\x0a-\x20GitHub:\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20Browser:\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_snapshot,\x20browser_screenshot,\x20browser_get_text,\x20browser_close\x0a-\x20Human:\x20ask_human\x0a\x0aASK_HUMAN\x20TOOL:\x0aWhen\x20you\x20need\x20clarification,\x20a\x20decision,\x20or\x20any\x20input\x20from\x20the\x20user\x20during\x20a\x20task,\x20use\x20the\x20ask_human\x20tool.\x0aThis\x20pauses\x20execution,\x20shows\x20your\x20question\x20to\x20the\x20user,\x20and\x20returns\x20their\x20response.\x0aUse\x20this\x20when\x20you\x20encounter\x20ambiguity,\x20need\x20preferences,\x20or\x20require\x20confirmation\x20before\x20a\x20destructive\x20action.\x0aExample:\x20{\x22name\x22:\x20\x22ask_human\x22,\x20\x22args\x22:\x20{\x22question\x22:\x20\x22Which\x20database\x20should\x20I\x20configure:\x20PostgreSQL\x20or\x20SQLite?\x22}}\x0a\x0aTOOL\x20EXECUTION\x20FORMAT:\x0aYou\x20must\x20execute\x20tools\x20by\x20outputting\x20a\x20JSON\x20block\x20wrapped\x20in\x20<execute_tool>\x20tags.\x0aExample:\x0a<execute_tool>\x0a{\x22name\x22:\x20\x22tool_name\x22,\x20\x22args\x22:\x20{\x22arg_name\x22:\x20\x22arg_value\x22}}\x0a</execute_tool>\x0a','Telegram\x20bot\x20is\x20running','displayName','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','Create','/usage','browser_snapshot','Snapshot','archive.zip','Unzip','\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','Replace','write','tool\x20execution\x20failed','/model','#3b82f6','ReadTerm','User\x20responded:\x20','error','\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot','Thinking...','search','../telegram/index.js','pattern','\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration','pid','archive','What\x20would\x20you\x20like\x20to\x20do?','Invalid\x20JSON\x20output\x20from\x20model:\x20','<thought>','any','/rollback','Configured:\x20','edit_file','KillProc','RunBG','../ui/themes.js','18024FihLfK','30183197xMUCTK','282agJEoG','../tools/command.js','email','Connected\x20browsers:\x20','Commands','git_log','rateLimitWarning','cancel','name','create_file','search_directory','It\x20will\x20start\x20automatically\x20when\x20needed','replace_in_files','browser_close','Fetch','url','ClipWrite','MCP\x20Tool\x20error:\x20','ReadLines','stop','Could\x20not\x20load\x20that\x20chat.','/mcp','unzip_files','</thought>','source','\x22name\x22:','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','push','Telegram\x20bot\x20stopped.','list_active_processes','search_file','get_system_info','statusBar','stopBot','Info','GitStatus','Find','Zip','/github','owner','../github/api.js','primary','12CLYYZA','then','read_terminal_output','toLocaleString','success','browser_fill','startsWith','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','output','branch','GitBranch','@inquirer/prompts','github_create_pr','length','3.\x20Copy\x20the\x20bot\x20token','GitAdd','Reached\x20maximum\x20iterations','args','tokensUsed','startBot'];a4_0x43bd=function(){return _0x2885b4;};return a4_0x43bd();}function a4_0x5b56(_0x142b2d,_0x3be5af){_0x142b2d=_0x142b2d-0x115;const _0x43bda0=a4_0x43bd();let _0x5b5685=_0x43bda0[_0x142b2d];return _0x5b5685;}export async function startChat(_0x5b9fd0){const _0x3e9a25=a4_0x1e48cf,{startBrowserServer:_0x45f577}=await import(_0x3e9a25(0x1b8));_0x45f577()[_0x3e9a25(0x14d)](()=>{});let _0x3a6417=a4_0x52bfcd[_0x3e9a25(0x1bb)]();const _0x28539c=getSelectedModel();await connectToMcpServers();const _0x5cdca4=await getMcpTools(),_0x37f004=new Set(_0x5cdca4['map'](_0x143a11=>_0x143a11['serverName']));_0x37f004[_0x3e9a25(0x179)]>0x0&&a4_0xa73ddc[_0x3e9a25(0x1bc)](_0x37f004[_0x3e9a25(0x179)],_0x5cdca4[_0x3e9a25(0x24b)]);process['on'](_0x3e9a25(0x1d2),()=>closeMcpClients());const _0x2b1aad=formatRulesForSystem(),_0x13b5b3=getPlatformInfo(),_0x277031=getShellPrefix(),_0x516c04=_0x5cdca4[_0x3e9a25(0x24b)]>0x0?_0x3e9a25(0x18f)+_0x5cdca4[_0x3e9a25(0x178)](_0x4cde7b=>{const _0x1810f3=_0x3e9a25,_0xaab42f=Object['keys'](_0x4cde7b['inputSchema']?.[_0x1810f3(0x182)]||{})[_0x1810f3(0x14c)](',\x20');return'-\x20'+_0x4cde7b[_0x1810f3(0x21c)]+'('+_0xaab42f+_0x1810f3(0x152)+_0x4cde7b[_0x1810f3(0x1ca)];})[_0x3e9a25(0x14c)]('\x0a'):'',_0x377224=isWindows()?_0x3e9a25(0x1c3)+_0x13b5b3+_0x3e9a25(0x1aa):_0x3e9a25(0x1c3)+_0x13b5b3+'.\x20Use\x20'+_0x277031+_0x3e9a25(0x17e),_0x1793c8=SYSTEM_PROMPT+_0x516c04+_0x377224+'\x0a'+_0x2b1aad,_0x5380fe=getUser(),_0x22308=[{'role':_0x3e9a25(0x1b5),'content':_0x1793c8}];(_0x5380fe[_0x3e9a25(0x1ef)]||_0x5380fe[_0x3e9a25(0x216)])&&a4_0xa73ddc[_0x3e9a25(0x181)](_0x5380fe['displayName']||_0x5380fe[_0x3e9a25(0x216)]||'Unknown');a4_0xa73ddc[_0x3e9a25(0x147)](process['cwd']()),a4_0xa73ddc[_0x3e9a25(0x1eb)](_0x3e9a25(0x196)),a4_0xa73ddc[_0x3e9a25(0x234)](_0x28539c,0x64);const _0x28a1d2=async _0x2c4202=>{const _0x3717d5=_0x3e9a25;if(!_0x2c4202||_0x2c4202[_0x3717d5(0x1de)]()==='')return!![];const _0x4c1190=_0x2c4202[_0x3717d5(0x1de)]();if(_0x4c1190==='/exit'||_0x4c1190===_0x3717d5(0x1bd))return a4_0xa73ddc[_0x3717d5(0x11e)]('Goodbye!'),![];if(_0x4c1190===_0x3717d5(0x19d))return _0x22308['length']=0x1,_0x3a6417=a4_0x52bfcd[_0x3717d5(0x1bb)](),a4_0xa73ddc[_0x3717d5(0x11e)](_0x3717d5(0x146)),!![];if(_0x4c1190===_0x3717d5(0x18e)){const _0x363027=getChatSessions();if(_0x363027['length']===0x0)return a4_0xa73ddc[_0x3717d5(0x11e)](_0x3717d5(0x154)),!![];const _0x5877ae=_0x363027['map'](_0x68aae6=>{const _0x4e22e1=_0x3717d5,_0x442337=new Date(_0x68aae6[_0x4e22e1(0x1e6)])[_0x4e22e1(0x241)]();return{'name':_0x442337+'\x20-\x20'+_0x68aae6[_0x4e22e1(0x17f)],'value':_0x68aae6['id']};});_0x5877ae['unshift']({'name':_0x3717d5(0x1ae),'value':_0x3717d5(0x21b)});const {getTheme:_0x5a2f54}=await import('../utils/storage.js'),{getInquirerTheme:_0x2f0ad4}=await import(_0x3717d5(0x211)),_0x37b45c=_0x5a2f54(),_0x4d5a9c=await select({'message':'Select\x20a\x20previous\x20chat\x20to\x20resume:','choices':_0x5877ae,'theme':_0x2f0ad4(_0x37b45c)});if(_0x4d5a9c===_0x3717d5(0x21b))return!![];const _0x1173ad=getChatSession(_0x4d5a9c);return _0x1173ad?(_0x3a6417=_0x1173ad['id'],_0x22308[_0x3717d5(0x24b)]=0x0,_0x22308[_0x3717d5(0x22f)](..._0x1173ad[_0x3717d5(0x1c4)]),a4_0xa73ddc[_0x3717d5(0x242)]('Resumed\x20chat:\x20'+_0x1173ad[_0x3717d5(0x17f)])):a4_0xa73ddc[_0x3717d5(0x1ff)](_0x3717d5(0x228)),!![];}if(_0x4c1190===_0x3717d5(0x229)){const _0x693b9=await getMcpTools();return _0x693b9[_0x3717d5(0x24b)]===0x0?a4_0xa73ddc['info'](_0x3717d5(0x18c)):(a4_0xa73ddc[_0x3717d5(0x11e)](_0x3717d5(0x187)),_0x693b9[_0x3717d5(0x17c)](_0x398057=>a4_0xa73ddc[_0x3717d5(0x1eb)]('-\x20'+_0x398057['name']+'\x20('+_0x398057[_0x3717d5(0x194)]+_0x3717d5(0x152)+(_0x398057[_0x3717d5(0x1ca)]?.[_0x3717d5(0x16e)](0x0,0x32)||'')))),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x19c)),!![];}if(_0x4c1190===_0x3717d5(0x16a))return a4_0xa73ddc[_0x3717d5(0x11d)](_0x3717d5(0x218)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x1db)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x1f7)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x193)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x126)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x119)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x17a)),a4_0xa73ddc['dim']('\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram'),a4_0xa73ddc[_0x3717d5(0x1eb)]('\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats'),a4_0xa73ddc[_0x3717d5(0x1eb)]('\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change'),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x245)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x205)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x16c)),!![];if(_0x4c1190==='/browser'){const {isBrowserServerRunning:_0xb615b9,getConnectedSessions:_0x6d1f7d}=await import(_0x3717d5(0x1b8));if(_0xb615b9()){const _0x42d659=_0x6d1f7d();a4_0xa73ddc[_0x3717d5(0x242)](_0x3717d5(0x128)),a4_0xa73ddc[_0x3717d5(0x11e)](_0x3717d5(0x217)+_0x42d659[_0x3717d5(0x24b)]),_0x42d659[_0x3717d5(0x17c)](_0x31fc76=>a4_0xa73ddc['dim']('\x20\x20-\x20'+_0x31fc76['userEmail']));}else a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x117)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x21f));return!![];}if(_0x4c1190['startsWith'](_0x3717d5(0x23a))){const _0x5753a3=_0x4c1190['split']('\x20')[0x1]||'';return await a4_0x569b47['handleGitHubCommand'](_0x5753a3),!![];}if(_0x4c1190[_0x3717d5(0x244)]('/telegram')){const _0x2ffc84=await import(_0x3717d5(0x203)),_0x72e761=_0x4c1190[_0x3717d5(0x19b)]('\x20')[0x1]||'';if(_0x72e761===_0x3717d5(0x1b6)){const {input:_0x20d0e1,password:_0x525d8f}=await import(_0x3717d5(0x249));a4_0xa73ddc[_0x3717d5(0x11d)](_0x3717d5(0x14e)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x1b0)),a4_0xa73ddc[_0x3717d5(0x1eb)]('2.\x20Send\x20/newbot\x20and\x20follow\x20instructions'),a4_0xa73ddc['dim'](_0x3717d5(0x24c)),a4_0xa73ddc['info']('');const {getTheme:_0x1ebdb0}=await import(_0x3717d5(0x177)),{getInquirerTheme:_0x32439d}=await import(_0x3717d5(0x211)),_0x2a7d5e=_0x1ebdb0(),_0x4a8b57=_0x32439d(_0x2a7d5e),_0x265a46=await _0x525d8f({'message':_0x3717d5(0x122),'mask':'*','theme':_0x4a8b57});_0x265a46&&(_0x2ffc84[_0x3717d5(0x13c)](_0x265a46),a4_0xa73ddc[_0x3717d5(0x242)](_0x3717d5(0x12b)));const _0x291b47=await _0x20d0e1({'message':_0x3717d5(0x1f0),'theme':_0x4a8b57});return _0x291b47&&(_0x2ffc84[_0x3717d5(0x1e4)](_0x291b47),a4_0xa73ddc['success'](_0x3717d5(0x189))),a4_0xa73ddc[_0x3717d5(0x11e)](_0x3717d5(0x22e)),!![];}if(_0x72e761===_0x3717d5(0x184))return await _0x2ffc84[_0x3717d5(0x251)](),!![];if(_0x72e761===_0x3717d5(0x227))return _0x2ffc84[_0x3717d5(0x235)](),a4_0xa73ddc['info'](_0x3717d5(0x230)),!![];if(_0x72e761===_0x3717d5(0x18a))return _0x2ffc84['isBotRunning']()?a4_0xa73ddc['success'](_0x3717d5(0x1ee)):a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x199)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x20d)+(_0x2ffc84['isConfigured']()?_0x3717d5(0x123):'No')),!![];return a4_0xa73ddc[_0x3717d5(0x11d)](_0x3717d5(0x19f)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x171)),a4_0xa73ddc['dim'](_0x3717d5(0x200)),a4_0xa73ddc[_0x3717d5(0x1eb)](_0x3717d5(0x17b)),a4_0xa73ddc['dim'](_0x3717d5(0x1d5)),!![];}if(_0x4c1190===_0x3717d5(0x20c)){const {rollbackLast:_0x58671c,getChanges:_0x51e961}=await import('../tools/rollback.js'),_0x1cac62=_0x51e961();if(_0x1cac62[_0x3717d5(0x24b)]===0x0)a4_0xa73ddc['info'](_0x3717d5(0x259));else{const _0xbd75bd=_0x58671c();_0xbd75bd[_0x3717d5(0x242)]?a4_0xa73ddc['success'](_0xbd75bd[_0x3717d5(0x156)]):a4_0xa73ddc[_0x3717d5(0x1ff)](_0xbd75bd[_0x3717d5(0x156)]);}return!![];}if(_0x4c1190===_0x3717d5(0x1fb)){const _0xe4263c=await selectModel();return _0xe4263c!==_0x28539c?(a4_0xa73ddc[_0x3717d5(0x11e)]('Model\x20changed\x20to:\x20'+_0xe4263c),a4_0xa73ddc[_0x3717d5(0x11e)]('Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.')):a4_0xa73ddc[_0x3717d5(0x11e)](_0x3717d5(0x180)+_0x28539c),!![];}if(_0x4c1190===_0x3717d5(0x132)||_0x4c1190==='/themes'){const {selectTheme:_0x3ece62}=await import(_0x3717d5(0x211)),_0x71cabb=await _0x3ece62();return a4_0xa73ddc[_0x3717d5(0x11e)](_0x3717d5(0x1d1)+_0x71cabb),!![];}if(_0x4c1190===_0x3717d5(0x1f2)||_0x4c1190===_0x3717d5(0x252)){const _0x47b059=a4_0xa73ddc[_0x3717d5(0x1c8)](_0x3717d5(0x13f));_0x47b059[_0x3717d5(0x184)]();const _0x104683=await getUserUsage();return _0x47b059[_0x3717d5(0x227)](),_0x104683?a4_0xa73ddc[_0x3717d5(0x1b4)](_0x104683[_0x3717d5(0x250)],_0x104683[_0x3717d5(0x1c7)],_0x104683['isOverLimit']):a4_0xa73ddc[_0x3717d5(0x1ff)](_0x3717d5(0x25c)),!![];}return _0x22308[_0x3717d5(0x22f)]({'role':_0x3717d5(0x195),'content':_0x4c1190}),await processAgentLoop(_0x22308,_0x28539c),saveChatSession(_0x3a6417,_0x22308),!![];};if(_0x5b9fd0){const _0x5ed091=await _0x28a1d2(_0x5b9fd0);if(!_0x5ed091)return;}while(!![]){try{const _0x570beb=await import(_0x3e9a25(0x177))['then'](_0x31e34d=>_0x31e34d['getTheme']()),_0x304282=await import(_0x3e9a25(0x211))[_0x3e9a25(0x23f)](_0x56cdef=>_0x56cdef[_0x3e9a25(0x1a3)](_0x570beb)),{getInquirerTheme:_0x41ed29}=await import(_0x3e9a25(0x211)),_0x5ed297=a4_0x4d948d[_0x3e9a25(0x1a0)][_0x3e9a25(0x1da)](_0x304282[_0x3e9a25(0x23d)])('\x0a>\x20'),_0x37b0a8=_0x41ed29(_0x570beb),_0x2cf848=await input({'message':_0x5ed297,'theme':{..._0x37b0a8,'prefix':''}}),_0x35d424=await _0x28a1d2(_0x2cf848);if(!_0x35d424)break;}catch(_0xb13742){if(_0xb13742 instanceof Error&&_0xb13742[_0x3e9a25(0x156)][_0x3e9a25(0x1ab)](_0x3e9a25(0x1af)))break;a4_0xa73ddc[_0x3e9a25(0x1ff)](_0x3e9a25(0x253)+_0xb13742);}}}function cleanTagsFromLine(_0x28c83c){const _0x27fafd=a4_0x1e48cf,_0x583709=_0x28c83c[_0x27fafd(0x1de)]();if(!_0x583709)return'';if(_0x583709['startsWith']('**'))return'';if(_0x583709['startsWith']('###'))return'';if(_0x583709[_0x27fafd(0x244)](_0x27fafd(0x130)))return'';if(_0x583709[_0x27fafd(0x244)](_0x27fafd(0x1a4)))return'';if(_0x583709[_0x27fafd(0x1ab)](_0x27fafd(0x22d))&&_0x583709[_0x27fafd(0x1ab)](_0x27fafd(0x160)))return'';if(_0x583709[_0x27fafd(0x244)](_0x27fafd(0x15d)))return'';if(_0x583709[_0x27fafd(0x244)](_0x27fafd(0x149)))return'';if(_0x583709[_0x27fafd(0x244)](_0x27fafd(0x1ad)))return'';if(_0x583709[_0x27fafd(0x244)](_0x27fafd(0x12a)))return'';if(_0x583709[_0x27fafd(0x244)](_0x27fafd(0x197)))return'';if(_0x583709[_0x27fafd(0x244)](_0x27fafd(0x15f)))return'';if(_0x583709[_0x27fafd(0x1ab)]('must\x20greet'))return'';if(_0x583709['includes'](_0x27fafd(0x1ba)))return'';return _0x28c83c[_0x27fafd(0x185)](/<text>/g,'')[_0x27fafd(0x185)](/<\/text>/g,'')[_0x27fafd(0x185)](/<\/text>/g,'')['replace'](/<reasoning>/g,'')[_0x27fafd(0x185)](/<\/reasoning>/g,'')[_0x27fafd(0x185)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x3700e0,_0x4c18ac){const _0x250dd5=a4_0x1e48cf;let _0x49e953=0x0;const _0x5db4d7=0x3e8;while(_0x49e953<_0x5db4d7){_0x49e953++;const _0x349f49=a4_0xa73ddc[_0x250dd5(0x1c8)](_0x250dd5(0x201));_0x349f49[_0x250dd5(0x184)]();let _0x46e4bf='',_0x57f95c=![],_0x50a233=![],_0x3a45ad='';const _0x5b2c6d=new AbortController(),_0x2455d5=()=>{const _0x559fba=_0x250dd5;_0x5b2c6d[_0x559fba(0x1b9)](),a4_0xa73ddc[_0x559fba(0x11e)](_0x559fba(0x1be));};process['on'](_0x250dd5(0x153),_0x2455d5);let _0x1174bd=null;try{const _0x5ac959=await sendChatMessage(_0x4c18ac,_0x3700e0,_0x4e0efb=>{const _0x1f5ad1=_0x250dd5;_0x349f49[_0x1f5ad1(0x1d3)]&&_0x349f49[_0x1f5ad1(0x227)]();_0x46e4bf+=_0x4e0efb;for(const _0x43850c of _0x4e0efb){_0x3a45ad+=_0x43850c;if(_0x43850c==='\x0a'){(_0x3a45ad[_0x1f5ad1(0x1ab)]('<think>')||_0x3a45ad[_0x1f5ad1(0x1ab)](_0x1f5ad1(0x20a)))&&(_0x50a233=!![],process[_0x1f5ad1(0x257)][_0x1f5ad1(0x1f9)]('\x0a<details>\x0a<summary>Thinking\x20Process</summary>\x0a\x0a'));let _0xe887d0=!![];_0x50a233&&((_0x3a45ad[_0x1f5ad1(0x1ab)](_0x1f5ad1(0x1cb))||_0x3a45ad[_0x1f5ad1(0x1ab)](_0x1f5ad1(0x22b)))&&(_0x50a233=![],process[_0x1f5ad1(0x257)][_0x1f5ad1(0x1f9)]('\x0a</details>\x0a\x0a')));(_0x3a45ad[_0x1f5ad1(0x1ab)](_0x1f5ad1(0x186))||_0x3a45ad['includes'](_0x1f5ad1(0x1cb))||_0x3a45ad[_0x1f5ad1(0x1ab)](_0x1f5ad1(0x20a))||_0x3a45ad[_0x1f5ad1(0x1ab)](_0x1f5ad1(0x22b)))&&(_0xe887d0=![]);if(!_0x57f95c){if(_0x3a45ad[_0x1f5ad1(0x1ab)](_0x1f5ad1(0x165))||_0x3a45ad[_0x1f5ad1(0x244)](_0x1f5ad1(0x143))){_0x57f95c=!![],_0x3a45ad='';!_0x1174bd&&(_0x1174bd=a4_0xa73ddc[_0x1f5ad1(0x150)](_0x1f5ad1(0x1c6)),_0x1174bd[_0x1f5ad1(0x184)]());continue;}let _0x574471=_0x3a45ad['replace'](/<text>/g,'')[_0x1f5ad1(0x185)](/<\/text>/g,'')[_0x1f5ad1(0x185)](/<reasoning.*?>/g,'')[_0x1f5ad1(0x185)](/<\/reasoning>/g,'');if(_0xe887d0){if(_0x574471[_0x1f5ad1(0x244)](_0x1f5ad1(0x1a4))&&!_0x574471['startsWith'](_0x1f5ad1(0x143)))process['stdout']['write'](_0x1f5ad1(0x1a4)+_0x574471[_0x1f5ad1(0x16e)](0x3));else(_0x574471[_0x1f5ad1(0x1de)]()||_0x574471==='\x0a'||_0x574471==='\x0d\x0a')&&process[_0x1f5ad1(0x257)]['write'](_0x574471);}}else(_0x3a45ad[_0x1f5ad1(0x1ab)]('</execute_tool>')||_0x3a45ad[_0x1f5ad1(0x1de)]()==='```')&&(_0x57f95c=![],_0x1174bd&&(_0x1174bd['stop'](),_0x1174bd=null));_0x3a45ad='';}}},_0x5b2c6d['signal']);_0x1174bd&&(_0x1174bd[_0x250dd5(0x227)](),_0x1174bd=null);if(_0x3a45ad&&!_0x57f95c&&!_0x3a45ad[_0x250dd5(0x1ab)](_0x250dd5(0x165))){let _0x31153a=_0x3a45ad['replace'](/<text>/g,'')[_0x250dd5(0x185)](/<\/text>/g,'')[_0x250dd5(0x185)](/<reasoning.*?>/g,'')[_0x250dd5(0x185)](/<\/reasoning>/g,''),_0xce7c7=!![];(_0x31153a[_0x250dd5(0x1ab)](_0x250dd5(0x186))||_0x31153a['includes'](_0x250dd5(0x1cb))||_0x31153a[_0x250dd5(0x1ab)]('<thought>')||_0x31153a[_0x250dd5(0x1ab)](_0x250dd5(0x22b)))&&(_0xce7c7=![]),_0xce7c7&&_0x31153a['trim']()&&process[_0x250dd5(0x257)][_0x250dd5(0x1f9)](_0x31153a);}_0x46e4bf=_0x5ac959[_0x250dd5(0x15c)];}catch(_0x337fd6){_0x349f49['stop'](),process[_0x250dd5(0x159)](_0x250dd5(0x153),_0x2455d5);if(_0x337fd6[_0x250dd5(0x21c)]==='AbortError'||_0x337fd6['message']['includes']('aborted')){a4_0xa73ddc[_0x250dd5(0x254)](_0x250dd5(0x191)),_0x3700e0['push']({'role':_0x250dd5(0x151),'content':_0x46e4bf+_0x250dd5(0x1df)}),_0x3700e0['push']({'role':_0x250dd5(0x195),'content':_0x250dd5(0x11b)});break;}if(_0x337fd6[_0x250dd5(0x124)]){a4_0xa73ddc[_0x250dd5(0x21a)](_0x337fd6[_0x250dd5(0x11a)]||0x3c);return;}a4_0xa73ddc[_0x250dd5(0x1ff)]('API\x20error:\x20'+_0x337fd6);return;}finally{process['removeListener'](_0x250dd5(0x153),_0x2455d5);}_0x349f49[_0x250dd5(0x1d3)]&&_0x349f49[_0x250dd5(0x227)]();a4_0xa73ddc[_0x250dd5(0x139)](),_0x3700e0[_0x250dd5(0x22f)]({'role':_0x250dd5(0x151),'content':_0x46e4bf});let _0x2aa3dc=_0x46e4bf['match'](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x2aa3dc&&(_0x2aa3dc=_0x46e4bf[_0x250dd5(0x148)](/```tool\s*([\s\S]*?)```/));!_0x2aa3dc&&(_0x2aa3dc=_0x46e4bf['match'](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x2aa3dc){const _0x55fb4=_0x46e4bf[_0x250dd5(0x148)](/\{[\s\S]*?"name"\s*:[\s\S]*?"args"\s*:[\s\S]*?\}/);if(_0x55fb4)_0x2aa3dc=[_0x55fb4[0x0],_0x55fb4[0x0]];}if(!_0x2aa3dc)break;function _0x445026(_0x15dae0){const _0xc66b79=_0x250dd5,_0x3c4f1e=_0x15dae0[_0xc66b79(0x1de)]();try{return JSON[_0xc66b79(0x13b)](_0x3c4f1e);}catch(_0x4d3690){try{let _0x411c5e='',_0x5a3f2e=![];for(let _0x47e6a1=0x0;_0x47e6a1<_0x3c4f1e[_0xc66b79(0x24b)];_0x47e6a1++){const _0x5c4962=_0x3c4f1e[_0x47e6a1];if(_0x5c4962==='\x22'&&_0x3c4f1e[_0x47e6a1-0x1]!=='\x5c')_0x5a3f2e=!_0x5a3f2e;if(_0x5a3f2e&&_0x5c4962==='\x0a')_0x411c5e+='\x5cn';else _0x411c5e+=_0x5c4962;}return JSON[_0xc66b79(0x13b)](_0x411c5e);}catch(_0x134435){try{return new Function('return\x20'+_0x3c4f1e)();}catch(_0x1cc146){throw new Error(_0xc66b79(0x209)+_0x4d3690[_0xc66b79(0x156)]);}}}}try{const _0xbe5bc3=_0x445026(_0x2aa3dc[0x1]),_0x2ccb19={'write_file':_0x250dd5(0x21d),'write':_0x250dd5(0x21d),'create':'create_file','read':'read_file','read_text_file':_0x250dd5(0x1a5),'search':_0x250dd5(0x232),'list':_0x250dd5(0x1a1),'ls':_0x250dd5(0x1a1),'execute':_0x250dd5(0x12e),'cmd':'run_command','remove_file':_0x250dd5(0x1c1),'rm':_0x250dd5(0x1c1),'unlink':_0x250dd5(0x1c1),'move_file':_0x250dd5(0x198),'mv':_0x250dd5(0x198),'cp':_0x250dd5(0x11f),'stat':'file_info','head':_0x250dd5(0x1ac),'wget':_0x250dd5(0x1cc),'curl':_0x250dd5(0x127),'http_get':_0x250dd5(0x127),'env':_0x250dd5(0x13d),'sysinfo':_0x250dd5(0x233),'paste':'clipboard_read','ask':_0x250dd5(0x16d),'prompt_user':_0x250dd5(0x16d),'request_input':'ask_human','dir_tree':_0x250dd5(0x18d),'show_tree':_0x250dd5(0x18d),'grep':_0x250dd5(0x256),'find_in_files':'grep_recursive','search_all':_0x250dd5(0x256),'find_replace':_0x250dd5(0x220),'sed':_0x250dd5(0x220),'open':'open_in_editor','vscode':'open_in_editor','compress':_0x250dd5(0x1dc),'archive':_0x250dd5(0x1dc),'extract':_0x250dd5(0x22a),'decompress':'unzip_files','ps':'powershell_run','pwsh':_0x250dd5(0x1a6)};_0x2ccb19[_0xbe5bc3['name']]&&(_0xbe5bc3[_0x250dd5(0x21c)]=_0x2ccb19[_0xbe5bc3[_0x250dd5(0x21c)]]);_0xbe5bc3[_0x250dd5(0x24f)]&&(!_0xbe5bc3[_0x250dd5(0x24f)]['path']&&(_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x173)]=_0xbe5bc3[_0x250dd5(0x24f)]['file_path']||_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x1ce)]||_0xbe5bc3['args'][_0x250dd5(0x1ea)]||_0xbe5bc3['args'][_0x250dd5(0x169)]),!_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x15c)]&&(_0xbe5bc3[_0x250dd5(0x24f)]['content']=_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x167)]||_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x135)]||_0xbe5bc3[_0x250dd5(0x24f)]['data']||_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x22c)]),!_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x11c)]&&(_0xbe5bc3['args'][_0x250dd5(0x11c)]=_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x1b2)]||_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x1bf)]));const _0x3e77a3={'create_file':_0x250dd5(0x1f1),'read_file':_0x250dd5(0x1a2),'edit_file':_0x250dd5(0x1b1),'list_directory':_0x250dd5(0x1c2),'search_file':'Search','find_files':_0x250dd5(0x238),'search_directory':'SearchDir','delete_file':_0x250dd5(0x161),'rename_file':'Rename','copy_file':_0x250dd5(0x14a),'file_info':_0x250dd5(0x236),'read_file_lines':_0x250dd5(0x226),'run_command':_0x250dd5(0x162),'run_background':_0x250dd5(0x210),'read_terminal_output':_0x250dd5(0x1fd),'send_terminal_input':_0x250dd5(0x158),'list_active_processes':_0x250dd5(0x1e3),'terminate_process':_0x250dd5(0x20f),'git_status':_0x250dd5(0x237),'git_diff':_0x250dd5(0x1cd),'git_log':_0x250dd5(0x188),'git_add':_0x250dd5(0x24d),'git_commit':_0x250dd5(0x19a),'git_branch':_0x250dd5(0x248),'fetch_url':_0x250dd5(0x222),'download_file':_0x250dd5(0x118),'get_env':_0x250dd5(0x1e2),'set_env':_0x250dd5(0x1e9),'get_system_info':_0x250dd5(0x164),'clipboard_read':_0x250dd5(0x1ec),'clipboard_write':_0x250dd5(0x224),'ask_human':_0x250dd5(0x183),'tree':'Tree','grep_recursive':_0x250dd5(0x16f),'replace_in_files':_0x250dd5(0x1f8),'open_in_editor':_0x250dd5(0x25b),'zip_files':_0x250dd5(0x239),'unzip_files':_0x250dd5(0x1f6),'write_json':_0x250dd5(0x120),'read_json':'ReadJSON','patch_file':'Patch','powershell_run':'PS','browser_open':'Browser','browser_click':_0x250dd5(0x125),'browser_fill':'Fill','browser_snapshot':_0x250dd5(0x1f4),'browser_screenshot':_0x250dd5(0x1e1),'browser_get_text':_0x250dd5(0x115),'browser_close':_0x250dd5(0x1d7)},_0x401274=_0x3e77a3[_0xbe5bc3[_0x250dd5(0x21c)]]||_0xbe5bc3[_0x250dd5(0x21c)];let _0x10dd9a='';if(_0xbe5bc3[_0x250dd5(0x21c)]==='run_command'&&_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x11c)])_0x10dd9a=_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x11c)];else{if(_0xbe5bc3[_0x250dd5(0x21c)]===_0x250dd5(0x136))_0x10dd9a=_0x250dd5(0x1a7)+(_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x206)]||'any');else{if(_0xbe5bc3['name']===_0x250dd5(0x240)||_0xbe5bc3[_0x250dd5(0x21c)]==='terminate_process')_0x10dd9a=_0x250dd5(0x1a7)+(_0xbe5bc3['args'][_0x250dd5(0x206)]||_0x250dd5(0x20b));else{if(_0xbe5bc3[_0x250dd5(0x21c)]===_0x250dd5(0x231))_0x10dd9a='all';else{if(_0xbe5bc3[_0x250dd5(0x24f)]['path'])_0x10dd9a=_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x173)];else{if(_0xbe5bc3[_0x250dd5(0x24f)][_0x250dd5(0x204)])_0x10dd9a='\x22'+_0xbe5bc3[_0x250dd5(0x24f)]['pattern']+'\x22';else _0xbe5bc3['args'][_0x250dd5(0x223)]?_0x10dd9a=_0xbe5bc3['args'][_0x250dd5(0x223)]:_0x10dd9a=Object[_0x250dd5(0x18b)](_0xbe5bc3['args'])[0x0]||'';}}}}}const _0x8b61f4=_0x10dd9a[_0x250dd5(0x24b)]>0x32?_0x10dd9a['slice'](0x0,0x2f)+_0x250dd5(0x255):_0x10dd9a,_0x56066f=a4_0xa73ddc[_0x250dd5(0x150)](_0x401274+'('+_0x8b61f4+')');_0x56066f[_0x250dd5(0x184)]();const _0x482ef2=performance[_0x250dd5(0x15e)]();let _0x59b2a8;try{_0x59b2a8=await executeToolCall(_0xbe5bc3[_0x250dd5(0x21c)],_0xbe5bc3[_0x250dd5(0x24f)]);}catch(_0x2d7c07){if(_0x2d7c07['message']&&_0x2d7c07[_0x250dd5(0x156)]['includes']('Unknown\x20tool')){const _0x26b21a=await getMcpTools(),_0x15ab60=_0x26b21a['find'](_0x4ca388=>_0x4ca388['name']===_0xbe5bc3[_0x250dd5(0x21c)]);if(_0x15ab60)try{_0x59b2a8=await executeMcpTool(_0x15ab60[_0x250dd5(0x194)],_0x15ab60[_0x250dd5(0x21c)],_0xbe5bc3[_0x250dd5(0x24f)]);}catch(_0x5a57b7){throw new Error(_0x250dd5(0x225)+_0x5a57b7);}else throw _0x2d7c07;}else throw _0x2d7c07;}const _0x59e6ce=((performance[_0x250dd5(0x15e)]()-_0x482ef2)/0x3e8)['toFixed'](0x1);_0x56066f['stop']();let _0x3d4462=_0x250dd5(0x1d8)+_0x59e6ce+'s',_0x2856d0=![];const _0x245302=_0x59b2a8;if(_0x245302&&typeof _0x245302===_0x250dd5(0x1d9)){if(_0xbe5bc3['name']===_0x250dd5(0x12e)){if(_0x245302[_0x250dd5(0x172)]===0x0&&_0x245302['success']!==![]){const _0x340267=_0x245302[_0x250dd5(0x257)]?_0x245302[_0x250dd5(0x257)][_0x250dd5(0x19b)]('\x0a')[_0x250dd5(0x24b)]:0x0;_0x3d4462='Completed\x20with\x20'+_0x340267+_0x250dd5(0x14f)+_0x59e6ce+'s)';}else{_0x2856d0=!![],_0x3d4462=_0x250dd5(0x1a9)+_0x245302[_0x250dd5(0x172)];const _0x307c3c=_0x245302[_0x250dd5(0x142)]||_0x245302[_0x250dd5(0x257)]||_0x245302[_0x250dd5(0x156)]||_0x250dd5(0x1d6);_0x307c3c&&(_0x3d4462+=':\x20'+_0x307c3c['split']('\x0a')[0x0][_0x250dd5(0x25a)](0x0,0x64));}}else{if(_0x245302[_0x250dd5(0x242)]===![])_0x2856d0=!![],_0x3d4462=_0x250dd5(0x19e)+(_0x245302[_0x250dd5(0x156)]||_0x245302[_0x250dd5(0x1ff)]||'Operation\x20failed');else{if(_0x245302[_0x250dd5(0x1ff)])_0x2856d0=!![],_0x3d4462=_0x250dd5(0x19e)+_0x245302['error'];else{if(_0xbe5bc3[_0x250dd5(0x21c)]===_0x250dd5(0x1a5)&&typeof _0x245302['content']===_0x250dd5(0x1b7)){const _0xc03bf0=_0x245302[_0x250dd5(0x15c)][_0x250dd5(0x19b)]('\x0a')[_0x250dd5(0x24b)];_0x3d4462=_0x250dd5(0x12c)+_0xc03bf0+'\x20lines\x20('+_0x59e6ce+'s)';}else(_0xbe5bc3[_0x250dd5(0x21c)]==='edit_file'||_0xbe5bc3[_0x250dd5(0x21c)]==='create_file')&&(_0x3d4462=_0x250dd5(0x157)+_0x59e6ce+'s)');}}}}a4_0xa73ddc['toolSuccess'](_0x401274,_0x8b61f4,_0x3d4462,_0x2856d0);let _0x5b1838=_0x59b2a8;_0xbe5bc3['name']===_0x250dd5(0x12e)&&_0x245302&&(_0x5b1838={'exitCode':_0x245302[_0x250dd5(0x172)],'stdout':_0x245302['stdout'],'stderr':_0x245302[_0x250dd5(0x142)],'error':_0x245302['error']}),_0x3700e0[_0x250dd5(0x22f)]({'role':_0x250dd5(0x195),'content':'Tool\x20result\x20for\x20'+_0xbe5bc3[_0x250dd5(0x21c)]+':\x0a'+JSON[_0x250dd5(0x192)](_0x5b1838,null,0x2)}),await new Promise(_0x484a08=>setTimeout(_0x484a08,0x1f4));}catch(_0x33fc05){a4_0xa73ddc['toolSuccess'](_0x250dd5(0x1b3),_0x250dd5(0x1fa),_0x33fc05[_0x250dd5(0x156)]||String(_0x33fc05),!![]),_0x3700e0[_0x250dd5(0x22f)]({'role':_0x250dd5(0x195),'content':_0x250dd5(0x133)+_0x33fc05+'.\x20Please\x20fix\x20this\x20and\x20continue.'});}}_0x49e953>=_0x5db4d7&&a4_0xa73ddc[_0x250dd5(0x254)](_0x250dd5(0x24e));}async function executeToolCall(_0x6fbd06,_0x502da5){const _0x3c74e6=a4_0x1e48cf;switch(_0x6fbd06){case'create_file':return createFile(_0x502da5[_0x3c74e6(0x173)],_0x502da5[_0x3c74e6(0x15c)]);case _0x3c74e6(0x1a5):return readFile(_0x502da5[_0x3c74e6(0x173)]);case'list_directory':return listDirectory(_0x502da5[_0x3c74e6(0x173)]||'.');case _0x3c74e6(0x20e):return editFile(_0x502da5[_0x3c74e6(0x173)],_0x502da5['search'],_0x502da5[_0x3c74e6(0x185)]);case'search_file':return searchFile(_0x502da5[_0x3c74e6(0x173)],_0x502da5['pattern']);case _0x3c74e6(0x12e):const {command:_0x2d82a9,background:_0x58b529,wait:_0x26f4c9}=_0x502da5,_0x513be7=await runCommand(_0x2d82a9,undefined,_0x58b529,_0x26f4c9);return _0x513be7;case'read_terminal_output':{const {readTerminalOutput:_0x51d551}=await import(_0x3c74e6(0x215));return _0x51d551(_0x502da5[_0x3c74e6(0x206)]);}case _0x3c74e6(0x136):{const {sendTerminalInput:_0x557e1e}=await import(_0x3c74e6(0x215));return _0x557e1e(_0x502da5[_0x3c74e6(0x17d)],_0x502da5[_0x3c74e6(0x206)]);}case'list_active_processes':{const {getActiveProcesses:_0x5a9dd1}=await import(_0x3c74e6(0x215));return{'pids':_0x5a9dd1(),'message':_0x3c74e6(0x175)+_0x5a9dd1()[_0x3c74e6(0x24b)]};}case _0x3c74e6(0x138):{const {terminateProcess:_0x1d8aac}=await import(_0x3c74e6(0x215));return _0x1d8aac(_0x502da5[_0x3c74e6(0x206)]);}case _0x3c74e6(0x14b):{const {findFiles:_0x1bf882}=await import(_0x3c74e6(0x163));return _0x1bf882(_0x502da5[_0x3c74e6(0x173)]||'.',_0x502da5[_0x3c74e6(0x204)]);}case _0x3c74e6(0x21e):{const {searchDirectory:_0x14e8f8}=await import(_0x3c74e6(0x163));return _0x14e8f8(_0x502da5[_0x3c74e6(0x173)]||'.',_0x502da5[_0x3c74e6(0x204)]);}case _0x3c74e6(0x144):{const {readFile:_0x517c37}=await import('../github/api.js');return _0x517c37(_0x502da5[_0x3c74e6(0x23b)],_0x502da5[_0x3c74e6(0x170)],_0x502da5[_0x3c74e6(0x173)],_0x502da5[_0x3c74e6(0x247)]);}case _0x3c74e6(0x24a):{const {createPullRequest:_0x3add26}=await import(_0x3c74e6(0x23c));return _0x3add26(_0x502da5[_0x3c74e6(0x23b)],_0x502da5[_0x3c74e6(0x170)],_0x502da5['title'],_0x502da5[_0x3c74e6(0x174)],_0x502da5['base'],_0x502da5[_0x3c74e6(0x166)]);}case _0x3c74e6(0x1dd):{const {createBranch:_0x3ee83f}=await import(_0x3c74e6(0x23c));return _0x3ee83f(_0x502da5[_0x3c74e6(0x23b)],_0x502da5[_0x3c74e6(0x170)],_0x502da5['branchName'],_0x502da5['fromBranch']);}case _0x3c74e6(0x1e5):{const {browserOpen:_0x58f7d8,startBrowserServer:_0x4d6438,isBrowserServerRunning:_0xa65142}=await import(_0x3c74e6(0x1b8));return!_0xa65142()&&await _0x4d6438(),_0x58f7d8(_0x502da5[_0x3c74e6(0x223)]);}case _0x3c74e6(0x145):{const {browserClick:_0x1b4aab}=await import(_0x3c74e6(0x1b8));return _0x1b4aab(_0x502da5[_0x3c74e6(0x131)]);}case _0x3c74e6(0x243):{const {browserFill:_0x13c703}=await import(_0x3c74e6(0x1b8));return _0x13c703(_0x502da5['selector'],_0x502da5[_0x3c74e6(0x15b)]);}case _0x3c74e6(0x1f3):{const {browserSnapshot:_0x3485eb}=await import(_0x3c74e6(0x1b8));return _0x3485eb();}case _0x3c74e6(0x140):{const {browserScreenshot:_0x4f4276}=await import(_0x3c74e6(0x1b8));return _0x4f4276();}case _0x3c74e6(0x1a8):{const {browserGetText:_0x5b9796}=await import('../browser/index.js');return _0x5b9796(_0x502da5[_0x3c74e6(0x131)]);}case _0x3c74e6(0x221):{const {browserClose:_0x2e69ed}=await import(_0x3c74e6(0x1b8));return _0x2e69ed();}case'delete_file':return deleteFile(_0x502da5[_0x3c74e6(0x173)]);case _0x3c74e6(0x198):return renameFile(_0x502da5[_0x3c74e6(0x129)]||_0x502da5['path'],_0x502da5['to']||_0x502da5[_0x3c74e6(0x1e8)]);case'copy_file':return copyFile(_0x502da5[_0x3c74e6(0x129)]||_0x502da5[_0x3c74e6(0x173)],_0x502da5['to']||_0x502da5[_0x3c74e6(0x1e8)]);case _0x3c74e6(0x1d4):return fileInfo(_0x502da5[_0x3c74e6(0x173)]);case _0x3c74e6(0x1ac):return readFileLines(_0x502da5[_0x3c74e6(0x173)],_0x502da5[_0x3c74e6(0x184)]||0x1,_0x502da5[_0x3c74e6(0x1c0)]||0x32);case _0x3c74e6(0x134):{const _0xa45c1c=await runCommand(_0x502da5[_0x3c74e6(0x11c)],undefined,!![],_0x502da5[_0x3c74e6(0x12f)]||0x1388);return _0xa45c1c;}case _0x3c74e6(0x168):return gitStatus();case'git_diff':return gitDiff(_0x502da5[_0x3c74e6(0x173)]);case _0x3c74e6(0x219):return gitLog(_0x502da5[_0x3c74e6(0x190)]||0xa);case _0x3c74e6(0x137):return gitAdd(_0x502da5[_0x3c74e6(0x173)]||'.');case'git_commit':return gitCommit(_0x502da5[_0x3c74e6(0x156)]);case _0x3c74e6(0x1c9):return gitBranch();case _0x3c74e6(0x127):return fetchUrl(_0x502da5[_0x3c74e6(0x223)]);case _0x3c74e6(0x1cc):return downloadFile(_0x502da5[_0x3c74e6(0x223)],_0x502da5[_0x3c74e6(0x173)]);case _0x3c74e6(0x13d):return getEnv(_0x502da5[_0x3c74e6(0x21c)]);case'set_env':return setEnv(_0x502da5[_0x3c74e6(0x21c)],_0x502da5[_0x3c74e6(0x15b)]);case _0x3c74e6(0x233):return getSystemInfo();case'clipboard_read':return clipboardRead();case'clipboard_write':return clipboardWrite(_0x502da5['text']||_0x502da5['content']);case _0x3c74e6(0x16d):{const _0x139103=_0x502da5[_0x3c74e6(0x141)]||_0x502da5['message']||_0x3c74e6(0x208);a4_0xa73ddc[_0x3c74e6(0x139)]();const _0x570199=await input({'message':a4_0x4d948d['hex'](_0x3c74e6(0x1fc))('\x20\x20[Waiting\x20for\x20input]\x20')+_0x139103+'\x0a','theme':{'prefix':''}});return{'success':!![],'response':_0x570199,'message':_0x3c74e6(0x1fe)+_0x570199};}case'tree':return tree(_0x502da5['path']||'.',_0x502da5['depth']||0x3);case _0x3c74e6(0x256):return grepRecursive(_0x502da5[_0x3c74e6(0x173)]||'.',_0x502da5[_0x3c74e6(0x204)],_0x502da5[_0x3c74e6(0x12d)]);case _0x3c74e6(0x220):return replaceInFiles(_0x502da5[_0x3c74e6(0x173)]||'.',_0x502da5[_0x3c74e6(0x202)],_0x502da5[_0x3c74e6(0x185)],_0x502da5[_0x3c74e6(0x12d)]);case _0x3c74e6(0x116):return openInEditor(_0x502da5[_0x3c74e6(0x173)]);case _0x3c74e6(0x1dc):return zipFiles(_0x502da5['files']||[_0x502da5['path']],_0x502da5[_0x3c74e6(0x246)]||_0x3c74e6(0x1f5));case _0x3c74e6(0x22a):return unzipFiles(_0x502da5[_0x3c74e6(0x173)]||_0x502da5[_0x3c74e6(0x207)],_0x502da5['output']||'.');case _0x3c74e6(0x1c5):return writeJson(_0x502da5['path'],_0x502da5[_0x3c74e6(0x258)]||_0x502da5[_0x3c74e6(0x15c)]);case _0x3c74e6(0x1cf):return readJson(_0x502da5[_0x3c74e6(0x173)]);case _0x3c74e6(0x121):return patchFile(_0x502da5[_0x3c74e6(0x173)],_0x502da5['patches']);case _0x3c74e6(0x1a6):return powershellRun(_0x502da5[_0x3c74e6(0x1bf)]||_0x502da5['command']);default:return{'error':_0x3c74e6(0x176)+_0x6fbd06};}}
1
+ const a4_0x14fefe=a4_0x34c9;(function(_0x559ad6,_0x5f0386){const _0x8d885=a4_0x34c9,_0x31e4a9=_0x559ad6();while(!![]){try{const _0x10808d=-parseInt(_0x8d885(0x1b2))/0x1+parseInt(_0x8d885(0x267))/0x2+-parseInt(_0x8d885(0x1af))/0x3*(-parseInt(_0x8d885(0x244))/0x4)+-parseInt(_0x8d885(0x1bc))/0x5+-parseInt(_0x8d885(0x198))/0x6*(-parseInt(_0x8d885(0x1df))/0x7)+-parseInt(_0x8d885(0x1c5))/0x8+parseInt(_0x8d885(0x277))/0x9*(parseInt(_0x8d885(0x1f4))/0xa);if(_0x10808d===_0x5f0386)break;else _0x31e4a9['push'](_0x31e4a9['shift']());}catch(_0x28c9c5){_0x31e4a9['push'](_0x31e4a9['shift']());}}}(a4_0x4573,0xb6de7));import{input,select}from'@inquirer/prompts';import a4_0x6ba474 from'chalk';function a4_0x34c9(_0xd7ff80,_0x491c04){_0xd7ff80=_0xd7ff80-0x165;const _0x457399=a4_0x4573();let _0x34c900=_0x457399[_0xd7ff80];return _0x34c900;}import a4_0x11b1d2 from'crypto';import{sendChatMessage,getUserUsage}from'../utils/api.js';import{getSelectedModel,getUser}from'../utils/storage.js';import{saveChatSession,getChatSessions,getChatSession}from'../utils/chat-history.js';import a4_0x3f9b0f from'fs';import{formatRulesForSystem}from'../tools/rules.js';import{formatKnowledgeForSystem}from'../tools/knowledge.js';import{createFile,readFile,listDirectory,editFile,updateFile,appendFile,runCommand,searchFile,deleteFile,renameFile,copyFile,fileInfo,readFileLines,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'../tools/git.js';import{fetchUrl,downloadFile}from'../tools/network.js';import{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'../tools/system.js';import{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'../tools/project.js';import*as a4_0x1c0cda from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x1d773f from'../github/index.js';const SYSTEM_PROMPT=a4_0x14fefe(0x170);export async function startChat(_0x3ec66f){const _0x428ba3=a4_0x14fefe,{startBrowserServer:_0x205a69}=await import(_0x428ba3(0x1c0));_0x205a69()[_0x428ba3(0x2a2)](()=>{});let _0x142775=a4_0x11b1d2[_0x428ba3(0x2a3)]();const _0x541f7c=getSelectedModel();await connectToMcpServers();const _0x3f3a9f=await getMcpTools(),_0x323ac9=new Set(_0x3f3a9f[_0x428ba3(0x1a3)](_0x4a34ff=>_0x4a34ff[_0x428ba3(0x194)]));_0x323ac9[_0x428ba3(0x29f)]>0x0&&a4_0x1c0cda[_0x428ba3(0x1a5)](_0x323ac9['size'],_0x3f3a9f[_0x428ba3(0x18c)]);process['on']('exit',()=>closeMcpClients());const _0x57c21=formatRulesForSystem(),_0x14e0cc=formatKnowledgeForSystem(),_0x437105=getPlatformInfo(),_0x2e5926=getShellPrefix(),_0x17fcc7=_0x3f3a9f['length']>0x0?_0x428ba3(0x16d)+_0x3f3a9f[_0x428ba3(0x1a3)](_0x28bb50=>{const _0x1b7475=_0x428ba3,_0x1a8375=Object[_0x1b7475(0x212)](_0x28bb50[_0x1b7475(0x1e7)]?.[_0x1b7475(0x180)]||{})[_0x1b7475(0x26b)](',\x20');return'-\x20'+_0x28bb50['name']+'\x20('+_0x1a8375+_0x1b7475(0x189)+_0x28bb50[_0x1b7475(0x258)]+'\x20';})[_0x428ba3(0x26b)]('\x0a'):'',_0x49650c=isWindows()?_0x428ba3(0x1ae)+_0x437105+_0x428ba3(0x1a6):_0x428ba3(0x1ae)+_0x437105+_0x428ba3(0x1b0)+_0x2e5926+_0x428ba3(0x236),_0x488d1d=SYSTEM_PROMPT+_0x17fcc7+_0x49650c+'\x0a'+_0x57c21+_0x14e0cc,_0x56d431=getUser(),_0x116abd=[{'role':_0x428ba3(0x215),'content':_0x488d1d}];(_0x56d431[_0x428ba3(0x1a2)]||_0x56d431[_0x428ba3(0x2a6)])&&a4_0x1c0cda[_0x428ba3(0x255)](_0x56d431[_0x428ba3(0x1a2)]||_0x56d431['email']||_0x428ba3(0x187));a4_0x1c0cda[_0x428ba3(0x1d1)](process[_0x428ba3(0x1c6)]()),a4_0x1c0cda['dim'](_0x428ba3(0x1f6)),a4_0x1c0cda['statusBar'](_0x541f7c,0x64);const _0x5830cd=async _0x2f3819=>{const _0x1b7ed0=_0x428ba3;if(!_0x2f3819||_0x2f3819[_0x1b7ed0(0x1ee)]()==='')return!![];const _0x10f105=_0x2f3819[_0x1b7ed0(0x1ee)]();if(_0x10f105===_0x1b7ed0(0x20e)||_0x10f105===_0x1b7ed0(0x28e))return a4_0x1c0cda[_0x1b7ed0(0x1e8)](_0x1b7ed0(0x299)),![];if(_0x10f105==='/clear')return _0x116abd[_0x1b7ed0(0x18c)]=0x1,_0x142775=a4_0x11b1d2[_0x1b7ed0(0x2a3)](),a4_0x1c0cda[_0x1b7ed0(0x1e8)](_0x1b7ed0(0x245)),!![];if(_0x10f105===_0x1b7ed0(0x2ac)){const _0xa289d0=getChatSessions();if(_0xa289d0['length']===0x0)return a4_0x1c0cda[_0x1b7ed0(0x1e8)]('No\x20chat\x20history\x20found.'),!![];const _0x132fce=_0xa289d0[_0x1b7ed0(0x1a3)](_0x3e00d0=>{const _0x6522bd=_0x1b7ed0,_0x4ac9d1=new Date(_0x3e00d0[_0x6522bd(0x1be)])['toLocaleString']();return{'name':_0x4ac9d1+_0x6522bd(0x240)+_0x3e00d0[_0x6522bd(0x190)]+'\x20','value':_0x3e00d0['id']};});_0x132fce['unshift']({'name':'Cancel','value':_0x1b7ed0(0x237)});const _0x328488=await select({'message':_0x1b7ed0(0x1ea),'choices':_0x132fce});if(_0x328488===_0x1b7ed0(0x237))return!![];const _0x4a024c=getChatSession(_0x328488);return _0x4a024c?(_0x142775=_0x4a024c['id'],_0x116abd[_0x1b7ed0(0x18c)]=0x0,_0x116abd[_0x1b7ed0(0x246)](..._0x4a024c[_0x1b7ed0(0x272)]),a4_0x1c0cda[_0x1b7ed0(0x2a1)](_0x1b7ed0(0x200)+_0x4a024c[_0x1b7ed0(0x190)]+'\x20')):a4_0x1c0cda[_0x1b7ed0(0x21b)](_0x1b7ed0(0x21c)),!![];}if(_0x10f105===_0x1b7ed0(0x1eb)){const _0x152f56=await getMcpTools();return _0x152f56[_0x1b7ed0(0x18c)]===0x0?a4_0x1c0cda['info']('No\x20MCP\x20tools\x20connected.'):(a4_0x1c0cda[_0x1b7ed0(0x1e8)](_0x1b7ed0(0x21a)),_0x152f56['forEach'](_0x16e4f9=>a4_0x1c0cda[_0x1b7ed0(0x282)]('-\x20'+_0x16e4f9[_0x1b7ed0(0x210)]+'\x20('+_0x16e4f9[_0x1b7ed0(0x194)]+_0x1b7ed0(0x189)+(_0x16e4f9[_0x1b7ed0(0x258)]?.[_0x1b7ed0(0x25c)](0x0,0x32)||'')+'\x20'))),a4_0x1c0cda['dim'](_0x1b7ed0(0x1f1)),!![];}if(_0x10f105===_0x1b7ed0(0x2aa))return a4_0x1c0cda[_0x1b7ed0(0x23e)]('Commands'),a4_0x1c0cda['dim']('\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat'),a4_0x1c0cda[_0x1b7ed0(0x282)]('\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history'),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x289)),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x1dd)),a4_0x1c0cda['dim'](_0x1b7ed0(0x239)),a4_0x1c0cda['dim'](_0x1b7ed0(0x1ed)),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x171)),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x24d)),a4_0x1c0cda['dim'](_0x1b7ed0(0x1e3)),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x24c)),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x16a)),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x184)),!![];if(_0x10f105===_0x1b7ed0(0x1fa)){const {isBrowserServerRunning:_0x48550,getConnectedSessions:_0x19807f}=await import(_0x1b7ed0(0x1c0));if(_0x48550()){const _0x136c3e=_0x19807f();a4_0x1c0cda['success']('Browser\x20server\x20is\x20running'),a4_0x1c0cda['info'](_0x1b7ed0(0x22d)+_0x136c3e[_0x1b7ed0(0x18c)]+'\x20'),_0x136c3e[_0x1b7ed0(0x250)](_0x23c555=>a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x177)+_0x23c555[_0x1b7ed0(0x260)]+'\x20'));}else a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x228)),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x206));return!![];}if(_0x10f105[_0x1b7ed0(0x273)](_0x1b7ed0(0x279))){const _0x5528a4=_0x10f105[_0x1b7ed0(0x2a5)]('\x20')[0x1]||'';return await a4_0x1d773f['handleGitHubCommand'](_0x5528a4),!![];}if(_0x10f105[_0x1b7ed0(0x273)](_0x1b7ed0(0x169))){const _0x1a7bd5=await import('../telegram/index.js'),_0x343136=_0x10f105[_0x1b7ed0(0x2a5)]('\x20')[0x1]||'';if(_0x343136===_0x1b7ed0(0x181)){const {input:_0x50a717,password:_0x31eb20}=await import(_0x1b7ed0(0x19a));a4_0x1c0cda['header']('Telegram\x20Bot\x20Setup'),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x27b)),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x166)),a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x28d)),a4_0x1c0cda[_0x1b7ed0(0x1e8)]('');const _0x472022=await _0x31eb20({'message':_0x1b7ed0(0x2a9),'mask':'*'});_0x472022&&(_0x1a7bd5[_0x1b7ed0(0x20c)](_0x472022),a4_0x1c0cda[_0x1b7ed0(0x2a1)]('Bot\x20token\x20saved!'));const _0x56bfca=await _0x50a717({'message':'Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):'});return _0x56bfca&&(_0x1a7bd5[_0x1b7ed0(0x233)](_0x56bfca),a4_0x1c0cda[_0x1b7ed0(0x2a1)]('Security\x20PIN\x20set!')),a4_0x1c0cda['info']('Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.'),!![];}if(_0x343136===_0x1b7ed0(0x182))return await _0x1a7bd5[_0x1b7ed0(0x1f0)](),!![];if(_0x343136===_0x1b7ed0(0x23b))return _0x1a7bd5[_0x1b7ed0(0x271)](),a4_0x1c0cda[_0x1b7ed0(0x1e8)]('Telegram\x20bot\x20stopped.'),!![];if(_0x343136===_0x1b7ed0(0x1a0))return _0x1a7bd5['isBotRunning']()?a4_0x1c0cda[_0x1b7ed0(0x2a1)](_0x1b7ed0(0x1d3)):a4_0x1c0cda[_0x1b7ed0(0x282)](_0x1b7ed0(0x1b7)),a4_0x1c0cda[_0x1b7ed0(0x282)]('Configured:\x20'+(_0x1a7bd5['isConfigured']()?_0x1b7ed0(0x1d4):'No')+'\x20'),!![];return a4_0x1c0cda['header']('Telegram\x20Commands'),a4_0x1c0cda['dim']('\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token'),a4_0x1c0cda[_0x1b7ed0(0x282)]('\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot'),a4_0x1c0cda[_0x1b7ed0(0x282)]('\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot'),a4_0x1c0cda['dim'](_0x1b7ed0(0x205)),!![];}if(_0x10f105==='/rollback'){const {rollbackLast:_0x1cb7dd,getChanges:_0x2b8d60}=await import(_0x1b7ed0(0x188)),_0x4e36a2=_0x2b8d60();if(_0x4e36a2[_0x1b7ed0(0x18c)]===0x0)a4_0x1c0cda[_0x1b7ed0(0x1e8)](_0x1b7ed0(0x229));else{const _0x4e9df3=_0x1cb7dd();_0x4e9df3[_0x1b7ed0(0x2a1)]?a4_0x1c0cda[_0x1b7ed0(0x2a1)](_0x4e9df3[_0x1b7ed0(0x232)]):a4_0x1c0cda[_0x1b7ed0(0x21b)](_0x4e9df3[_0x1b7ed0(0x232)]);}return!![];}if(_0x10f105===_0x1b7ed0(0x28f)){const _0x50badc=await selectModel();return _0x50badc!==_0x541f7c?(a4_0x1c0cda[_0x1b7ed0(0x1e8)](_0x1b7ed0(0x296)+_0x50badc+'\x20'),a4_0x1c0cda[_0x1b7ed0(0x1e8)]('Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.')):a4_0x1c0cda[_0x1b7ed0(0x1e8)](_0x1b7ed0(0x265)+_0x541f7c+'\x20'),!![];}if(_0x10f105===_0x1b7ed0(0x225)||_0x10f105===_0x1b7ed0(0x17b)){const {selectTheme:_0x3a4289}=await import(_0x1b7ed0(0x29c)),_0x31b9ca=await _0x3a4289();return a4_0x1c0cda['info'](_0x1b7ed0(0x2b7)+_0x31b9ca+'\x20'),!![];}if(_0x10f105===_0x1b7ed0(0x1ac)||_0x10f105===_0x1b7ed0(0x24b)){const _0x38e222=a4_0x1c0cda['createSpinner'](_0x1b7ed0(0x203));_0x38e222[_0x1b7ed0(0x182)]();const _0x7c7be5=await getUserUsage();return _0x38e222[_0x1b7ed0(0x23b)](),_0x7c7be5?a4_0x1c0cda[_0x1b7ed0(0x1d5)](_0x7c7be5[_0x1b7ed0(0x16c)],_0x7c7be5[_0x1b7ed0(0x23c)],_0x7c7be5[_0x1b7ed0(0x197)]):a4_0x1c0cda['error']('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}const _0x5a9c13=/(?:[a-zA-Z]:\\[^:<>"|?*]+?\.(?:png|jpg|jpeg|gif|webp))|(?:\/[^:<>"|?*]+?\.(?:png|jpg|jpeg|gif|webp))/gi,_0x310bb5=[..._0x10f105[_0x1b7ed0(0x1c1)](_0x5a9c13)][_0x1b7ed0(0x1a3)](_0x1609e7=>_0x1609e7[0x0]);if(_0x310bb5[_0x1b7ed0(0x18c)]>0x0){const _0x30303d=[];let _0x39551a=_0x10f105;for(const _0x303412 of _0x310bb5){_0x39551a=_0x39551a[_0x1b7ed0(0x1c2)](_0x303412,'')[_0x1b7ed0(0x1ee)]();try{if(a4_0x3f9b0f[_0x1b7ed0(0x253)](_0x303412)){const _0x1f0577=_0x303412[_0x1b7ed0(0x2a5)]('.')['pop']()?.['toLowerCase']()||'png';let _0x4e687b='image\x20/\x20'+_0x1f0577+'\x20';if(_0x1f0577===_0x1b7ed0(0x19f))_0x4e687b=_0x1b7ed0(0x288);const _0x3b3e1a=a4_0x3f9b0f[_0x1b7ed0(0x1c9)](_0x303412)['toString']('base64');_0x30303d['push']({'type':_0x1b7ed0(0x173),'image_url':{'url':'data:'+_0x4e687b+_0x1b7ed0(0x172)+_0x3b3e1a+'\x20'}});}}catch(_0x9b9141){a4_0x1c0cda['warn'](_0x1b7ed0(0x18f)+_0x303412+':\x20'+_0x9b9141+'\x20');}}if(_0x39551a)_0x30303d['unshift']({'type':_0x1b7ed0(0x1a1),'text':_0x39551a});else _0x30303d['length']>0x0&&_0x30303d[_0x1b7ed0(0x2b3)]({'type':_0x1b7ed0(0x1a1),'text':'What\x20is\x20in\x20this\x20image?'});_0x30303d['length']>0x0?(_0x116abd[_0x1b7ed0(0x246)]({'role':_0x1b7ed0(0x2af),'content':_0x30303d}),a4_0x1c0cda[_0x1b7ed0(0x1e8)](_0x1b7ed0(0x1cc)+(_0x30303d['length']-(_0x39551a?0x1:0x1))+_0x1b7ed0(0x27a))):_0x116abd[_0x1b7ed0(0x246)]({'role':'user','content':_0x10f105});}else _0x116abd['push']({'role':_0x1b7ed0(0x2af),'content':_0x10f105});await processAgentLoop(_0x116abd,_0x541f7c);const _0x5f5fee=JSON[_0x1b7ed0(0x294)](_0x116abd)[_0x1b7ed0(0x18c)]/0x4;if(_0x5f5fee>0xc350&&_0x116abd[_0x1b7ed0(0x18c)]>0xa){a4_0x1c0cda[_0x1b7ed0(0x1e8)](_0x1b7ed0(0x24e));const _0x29451b=Object[_0x1b7ed0(0x1f3)]([],_0x116abd['slice'](0x1,_0x116abd[_0x1b7ed0(0x18c)]-0x4));try{const _0xe2319c=[{'role':'system','content':'You\x20are\x20a\x20concise\x20summarizer.\x20Summarize\x20the\x20user\x27s\x20progress\x20and\x20the\x20context\x20of\x20the\x20conversation\x20so\x20far\x20in\x20a\x20few\x20detailed\x20paragraphs.\x20Omit\x20exact\x20code,\x20focus\x20on\x20decisions,\x20completed\x20tasks,\x20and\x20current\x20state.'},{'role':_0x1b7ed0(0x2af),'content':JSON[_0x1b7ed0(0x294)](_0x29451b)}],_0x5628e7=await sendChatMessage(_0x541f7c,_0xe2319c),_0x9c0145=_0x5628e7['content'];_0x116abd[_0x1b7ed0(0x1c3)](0x1,_0x116abd[_0x1b7ed0(0x18c)]-0x5,{'role':_0x1b7ed0(0x217),'content':_0x1b7ed0(0x1e0)+_0x9c0145+'\x20'}),_0x142775=a4_0x11b1d2[_0x1b7ed0(0x2a3)]();}catch(_0x27005c){a4_0x1c0cda[_0x1b7ed0(0x248)](_0x1b7ed0(0x231));}}return saveChatSession(_0x142775,_0x116abd),!![];};if(_0x3ec66f){const _0x2fe78f=await _0x5830cd(_0x3ec66f);if(!_0x2fe78f)return;}while(!![]){try{const _0x55e575=await import(_0x428ba3(0x199))[_0x428ba3(0x1bb)](_0x24491e=>_0x24491e[_0x428ba3(0x283)]()),_0x1e08e3=await import(_0x428ba3(0x29c))['then'](_0x447800=>_0x447800[_0x428ba3(0x17c)](_0x55e575)),_0x498228=a4_0x6ba474[_0x428ba3(0x18d)]['hex'](_0x1e08e3[_0x428ba3(0x257)])(_0x428ba3(0x295)),_0x4ee649=await input({'message':_0x498228,'theme':{'prefix':''}}),_0x385e13=await _0x5830cd(_0x4ee649);if(!_0x385e13)break;}catch(_0x43d0bc){if(_0x43d0bc instanceof Error&&_0x43d0bc['message'][_0x428ba3(0x22c)]('force\x20closed'))break;a4_0x1c0cda[_0x428ba3(0x21b)](_0x428ba3(0x25d)+_0x43d0bc+'\x20');}}}function cleanTagsFromLine(_0x861d4b){const _0x4ddbe0=a4_0x14fefe,_0x1a3709=_0x861d4b['trim']();if(!_0x1a3709)return'';if(_0x1a3709[_0x4ddbe0(0x273)]('**'))return'';if(_0x1a3709['startsWith'](_0x4ddbe0(0x2b0)))return'';if(_0x1a3709[_0x4ddbe0(0x273)](_0x4ddbe0(0x213)))return'';if(_0x1a3709['startsWith']('```'))return'';if(_0x1a3709[_0x4ddbe0(0x22c)](_0x4ddbe0(0x202))&&_0x1a3709[_0x4ddbe0(0x22c)](_0x4ddbe0(0x17f)))return'';if(_0x1a3709[_0x4ddbe0(0x273)]('Running'))return'';if(_0x1a3709[_0x4ddbe0(0x273)]('-\x20Running'))return'';if(_0x1a3709[_0x4ddbe0(0x273)](_0x4ddbe0(0x1a7)))return'';if(_0x1a3709[_0x4ddbe0(0x273)](_0x4ddbe0(0x204)))return'';if(_0x1a3709[_0x4ddbe0(0x273)](_0x4ddbe0(0x28c)))return'';if(_0x1a3709[_0x4ddbe0(0x273)](_0x4ddbe0(0x19c)))return'';if(_0x1a3709[_0x4ddbe0(0x22c)](_0x4ddbe0(0x17a)))return'';if(_0x1a3709['includes'](_0x4ddbe0(0x247)))return'';return _0x861d4b[_0x4ddbe0(0x1c2)](/<text>/g,'')[_0x4ddbe0(0x1c2)](/<\/text>/g,'')[_0x4ddbe0(0x1c2)](/<\/text>/g,'')['replace'](/<reasoning>/g,'')[_0x4ddbe0(0x1c2)](/<\/reasoning>/g,'')[_0x4ddbe0(0x1c2)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x1be55f,_0xf2bd32){const _0x34b6b9=a4_0x14fefe;let _0x5dbd70=0x0;const _0x293e5e=0x32;let _0x44537d=0x0,_0x142db5='';while(_0x5dbd70<_0x293e5e){_0x5dbd70++;const _0x541300=a4_0x1c0cda[_0x34b6b9(0x22b)](_0x34b6b9(0x29a));_0x541300[_0x34b6b9(0x182)]();let _0xb75763='',_0x2b906a=![],_0xc9192a='';const _0x59cd16=new AbortController(),_0x1e361b=()=>{const _0x5d3019=_0x34b6b9;_0x59cd16['abort'](),a4_0x1c0cda[_0x5d3019(0x1e8)](_0x5d3019(0x1b8));};process['on']('SIGINT',_0x1e361b);let _0x5d25c1=null;try{const _0x4902cf=await sendChatMessage(_0xf2bd32,_0x1be55f,_0x24539b=>{const _0x3c5296=_0x34b6b9;_0x541300[_0x3c5296(0x1fb)]&&_0x541300[_0x3c5296(0x23b)]();_0xb75763+=_0x24539b;for(const _0x52b964 of _0x24539b){_0xc9192a+=_0x52b964;if(_0x52b964==='\x0a'){if(!_0x2b906a){if(_0xc9192a['includes'](_0x3c5296(0x23f))||_0xc9192a[_0x3c5296(0x273)](_0x3c5296(0x20a))){_0x2b906a=!![],_0xc9192a='';!_0x5d25c1&&(_0x5d25c1=a4_0x1c0cda[_0x3c5296(0x234)](_0x3c5296(0x223)),_0x5d25c1[_0x3c5296(0x182)]());continue;}let _0x4f4cdc=_0xc9192a[_0x3c5296(0x1c2)](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x3c5296(0x1c2)](/<reasoning.*?>/g,'')['replace'](/<\/reasoning>/g,'');if(_0x4f4cdc[_0x3c5296(0x273)]('```')&&!_0x4f4cdc[_0x3c5296(0x273)]('```tool'))process['stdout']['write']('```'+_0x4f4cdc[_0x3c5296(0x25c)](0x3));else(_0x4f4cdc[_0x3c5296(0x1ee)]()||_0x4f4cdc==='\x0a'||_0x4f4cdc==='\x0d\x0a')&&process['stdout']['write'](_0x4f4cdc);}else(_0xc9192a[_0x3c5296(0x22c)](_0x3c5296(0x2b4))||_0xc9192a[_0x3c5296(0x1ee)]()===_0x3c5296(0x1d2))&&(_0x2b906a=![],_0x5d25c1&&(_0x5d25c1[_0x3c5296(0x23b)](),_0x5d25c1=null));_0xc9192a='';}}},_0x59cd16[_0x34b6b9(0x1db)]);_0x5d25c1&&(_0x5d25c1[_0x34b6b9(0x23b)](),_0x5d25c1=null);if(_0xc9192a&&!_0x2b906a&&!_0xc9192a[_0x34b6b9(0x22c)](_0x34b6b9(0x23f))){let _0x505feb=_0xc9192a['replace'](/<text>/g,'')[_0x34b6b9(0x1c2)](/<\/text>/g,'')['replace'](/<reasoning.*?>/g,'')[_0x34b6b9(0x1c2)](/<\/reasoning>/g,'');if(_0x505feb['trim']())process[_0x34b6b9(0x256)][_0x34b6b9(0x219)](_0x505feb);}_0xb75763=_0x4902cf[_0x34b6b9(0x269)];}catch(_0x2bb45e){_0x541300[_0x34b6b9(0x23b)](),process[_0x34b6b9(0x222)](_0x34b6b9(0x22e),_0x1e361b);if(_0x2bb45e[_0x34b6b9(0x210)]===_0x34b6b9(0x27c)||_0x2bb45e[_0x34b6b9(0x232)]['includes'](_0x34b6b9(0x22f))){a4_0x1c0cda[_0x34b6b9(0x248)](_0x34b6b9(0x174)),_0x1be55f[_0x34b6b9(0x246)]({'role':_0x34b6b9(0x217),'content':_0xb75763+_0x34b6b9(0x19e)}),_0x1be55f[_0x34b6b9(0x246)]({'role':_0x34b6b9(0x2af),'content':_0x34b6b9(0x16e)});break;}if(_0x2bb45e[_0x34b6b9(0x21f)]){a4_0x1c0cda[_0x34b6b9(0x17e)](_0x2bb45e[_0x34b6b9(0x1ec)]||0x3c);return;}a4_0x1c0cda[_0x34b6b9(0x21b)]('API\x20error:\x20'+_0x2bb45e);return;}finally{process[_0x34b6b9(0x222)]('SIGINT',_0x1e361b);}_0x541300[_0x34b6b9(0x1fb)]&&_0x541300[_0x34b6b9(0x23b)]();a4_0x1c0cda[_0x34b6b9(0x21e)](),_0x1be55f[_0x34b6b9(0x246)]({'role':_0x34b6b9(0x217),'content':_0xb75763});let _0x266225=_0xb75763[_0x34b6b9(0x264)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x266225&&(_0x266225=_0xb75763[_0x34b6b9(0x264)](/```tool\s*([\s\S]*?)```/));!_0x266225&&(_0x266225=_0xb75763[_0x34b6b9(0x264)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x266225)break;function _0x5c2fe2(_0x34b0a8){const _0x182c8a=_0x34b6b9,_0x30dc7b=_0x34b0a8['trim']();try{return JSON['parse'](_0x30dc7b);}catch(_0x4de6b3){try{let _0x4bd021='',_0xfa33fd=![];for(let _0x42bb46=0x0;_0x42bb46<_0x30dc7b[_0x182c8a(0x18c)];_0x42bb46++){const _0x53a3b7=_0x30dc7b[_0x42bb46];if(_0x53a3b7==='\x22'&&_0x30dc7b[_0x42bb46-0x1]!=='\x5c')_0xfa33fd=!_0xfa33fd;if(_0xfa33fd&&_0x53a3b7==='\x0a')_0x4bd021+='\x5cn';else _0x4bd021+=_0x53a3b7;}return JSON[_0x182c8a(0x1c7)](_0x4bd021);}catch(_0x30ee5d){try{return new Function(_0x182c8a(0x285)+_0x30dc7b)();}catch(_0xf64fac){throw new Error(_0x182c8a(0x214)+_0x4de6b3['message']);}}}}try{const _0x2aa786=_0x5c2fe2(_0x266225[0x1]),_0x2fc92b={'write_file':'create_file','write':_0x34b6b9(0x1d0),'create':_0x34b6b9(0x1d0),'read':_0x34b6b9(0x287),'read_text_file':_0x34b6b9(0x287),'search':_0x34b6b9(0x2b2),'list':'list_directory','ls':_0x34b6b9(0x261),'update':_0x34b6b9(0x183),'append':_0x34b6b9(0x1f2),'execute':_0x34b6b9(0x276),'cmd':_0x34b6b9(0x276),'remove_file':'delete_file','rm':_0x34b6b9(0x220),'unlink':_0x34b6b9(0x220),'move_file':_0x34b6b9(0x175),'mv':'rename_file','cp':_0x34b6b9(0x25e),'stat':_0x34b6b9(0x2a8),'head':_0x34b6b9(0x1b4),'wget':_0x34b6b9(0x1bd),'curl':_0x34b6b9(0x17d),'http_get':_0x34b6b9(0x17d),'env':_0x34b6b9(0x290),'sysinfo':_0x34b6b9(0x191),'paste':_0x34b6b9(0x16f),'ask':_0x34b6b9(0x230),'prompt_user':_0x34b6b9(0x230),'request_input':_0x34b6b9(0x230),'dir_tree':_0x34b6b9(0x1dc),'show_tree':_0x34b6b9(0x1dc),'grep':_0x34b6b9(0x1ca),'find_in_files':_0x34b6b9(0x1ca),'search_all':_0x34b6b9(0x1ca),'find_replace':_0x34b6b9(0x1f7),'sed':_0x34b6b9(0x1f7),'open':'open_in_editor','vscode':_0x34b6b9(0x28a),'compress':_0x34b6b9(0x268),'archive':_0x34b6b9(0x268),'extract':_0x34b6b9(0x2b1),'decompress':_0x34b6b9(0x2b1),'ps':_0x34b6b9(0x195),'pwsh':_0x34b6b9(0x195)};_0x2fc92b[_0x2aa786[_0x34b6b9(0x210)]]&&(_0x2aa786['name']=_0x2fc92b[_0x2aa786[_0x34b6b9(0x210)]]);_0x2aa786[_0x34b6b9(0x26d)]&&(!_0x2aa786['args'][_0x34b6b9(0x1e6)]&&(_0x2aa786[_0x34b6b9(0x26d)]['path']=_0x2aa786[_0x34b6b9(0x26d)]['file_path']||_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x22a)]||_0x2aa786['args'][_0x34b6b9(0x2b6)]||_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x2a0)]),!_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x269)]&&(_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x269)]=_0x2aa786['args'][_0x34b6b9(0x1a1)]||_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x20b)]||_0x2aa786[_0x34b6b9(0x26d)]['data']||_0x2aa786['args'][_0x34b6b9(0x1d8)]),!_0x2aa786['args'][_0x34b6b9(0x26a)]&&(_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x26a)]=_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x193)]||_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x224)]));const _0x4fe7cb={'create_file':_0x34b6b9(0x1e1),'read_file':_0x34b6b9(0x286),'edit_file':_0x34b6b9(0x2b8),'update_file':_0x34b6b9(0x1b1),'append_file':_0x34b6b9(0x20d),'list_directory':_0x34b6b9(0x1fe),'search_file':'Search','find_files':'Find','search_directory':_0x34b6b9(0x178),'delete_file':_0x34b6b9(0x241),'rename_file':'Rename','copy_file':_0x34b6b9(0x1bf),'file_info':_0x34b6b9(0x1ba),'read_file_lines':'ReadLines','run_command':_0x34b6b9(0x235),'run_background':_0x34b6b9(0x252),'read_terminal_output':_0x34b6b9(0x26f),'send_terminal_input':_0x34b6b9(0x221),'list_active_processes':'ListProcs','terminate_process':'KillProc','git_status':_0x34b6b9(0x26e),'git_diff':_0x34b6b9(0x262),'git_log':_0x34b6b9(0x167),'git_add':_0x34b6b9(0x1ff),'git_commit':_0x34b6b9(0x1e5),'git_branch':'GitBranch','fetch_url':'Fetch','download_file':_0x34b6b9(0x1ce),'get_env':'GetEnv','set_env':_0x34b6b9(0x1fd),'get_system_info':'SysInfo','clipboard_read':'ClipRead','clipboard_write':'ClipWrite','ask_human':'Ask','tree':'Tree','grep_recursive':_0x34b6b9(0x192),'replace_in_files':_0x34b6b9(0x1cf),'open_in_editor':_0x34b6b9(0x284),'zip_files':_0x34b6b9(0x2ae),'unzip_files':_0x34b6b9(0x1aa),'write_json':'WriteJSON','read_json':'ReadJSON','patch_file':_0x34b6b9(0x1a9),'powershell_run':'PS','browser_open':'Browser','browser_click':'Click','browser_fill':_0x34b6b9(0x2b9),'browser_snapshot':_0x34b6b9(0x278),'browser_screenshot':_0x34b6b9(0x185),'browser_get_text':'GetText','browser_close':_0x34b6b9(0x1b5)},_0x30d84b=_0x4fe7cb[_0x2aa786[_0x34b6b9(0x210)]]||_0x2aa786[_0x34b6b9(0x210)];let _0x306536='';if(_0x2aa786[_0x34b6b9(0x210)]===_0x34b6b9(0x276)&&_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x26a)])_0x306536=_0x2aa786[_0x34b6b9(0x26d)]['command'];else{if(_0x2aa786['name']==='send_terminal_input')_0x306536='PID:'+(_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x292)]||_0x34b6b9(0x266));else{if(_0x2aa786[_0x34b6b9(0x210)]===_0x34b6b9(0x251)||_0x2aa786['name']===_0x34b6b9(0x2ba))_0x306536=_0x34b6b9(0x186)+(_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x292)]||_0x34b6b9(0x266));else{if(_0x2aa786['name']==='list_active_processes')_0x306536=_0x34b6b9(0x23d);else{if(_0x2aa786[_0x34b6b9(0x26d)]['path'])_0x306536=_0x2aa786[_0x34b6b9(0x26d)]['path'];else{if(_0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x209)])_0x306536='\x22'+_0x2aa786[_0x34b6b9(0x26d)]['pattern']+'\x22';else _0x2aa786[_0x34b6b9(0x26d)][_0x34b6b9(0x259)]?_0x306536=_0x2aa786[_0x34b6b9(0x26d)]['url']:_0x306536=Object[_0x34b6b9(0x1ad)](_0x2aa786[_0x34b6b9(0x26d)])[0x0]||'';}}}}}const _0x11e6b8=_0x306536['length']>0x32?_0x306536[_0x34b6b9(0x25c)](0x0,0x2f)+'...':_0x306536,_0x3bbf7d=a4_0x1c0cda[_0x34b6b9(0x234)](_0x30d84b+'('+_0x11e6b8+')');_0x3bbf7d[_0x34b6b9(0x182)]();const _0x13e73b=performance[_0x34b6b9(0x1da)]();let _0x974e77;try{_0x974e77=await executeToolCall(_0x2aa786[_0x34b6b9(0x210)],_0x2aa786[_0x34b6b9(0x26d)]);}catch(_0x5bed64){if(_0x5bed64[_0x34b6b9(0x232)]&&_0x5bed64[_0x34b6b9(0x232)][_0x34b6b9(0x22c)](_0x34b6b9(0x2a7))){const _0xe6bbce=await getMcpTools(),_0x8b434e=_0xe6bbce[_0x34b6b9(0x1c4)](_0x3cd279=>_0x3cd279[_0x34b6b9(0x210)]===_0x2aa786[_0x34b6b9(0x210)]);if(_0x8b434e)try{_0x974e77=await executeMcpTool(_0x8b434e[_0x34b6b9(0x194)],_0x8b434e['name'],_0x2aa786[_0x34b6b9(0x26d)]);}catch(_0x454780){throw new Error(_0x34b6b9(0x25a)+_0x454780);}else throw _0x5bed64;}else throw _0x5bed64;}const _0x5a7082=((performance[_0x34b6b9(0x1da)]()-_0x13e73b)/0x3e8)[_0x34b6b9(0x218)](0x1);_0x3bbf7d['stop']();let _0x48bf8d=_0x34b6b9(0x176)+_0x5a7082+'s',_0xdc4d04=![];const _0x1c312d=_0x974e77;if(_0x1c312d&&typeof _0x1c312d==='object'){if(_0x2aa786['name']===_0x34b6b9(0x276)){if(_0x1c312d[_0x34b6b9(0x1e9)]===0x0&&_0x1c312d[_0x34b6b9(0x2a1)]!==![]){const _0x167c83=_0x1c312d[_0x34b6b9(0x256)]?_0x1c312d['stdout'][_0x34b6b9(0x2a5)]('\x0a')[_0x34b6b9(0x18c)]:0x0;_0x48bf8d=_0x34b6b9(0x1cd)+_0x167c83+_0x34b6b9(0x1b9)+_0x5a7082+'s)';}else{_0xdc4d04=!![],_0x48bf8d='Exited\x20with\x20code\x20'+_0x1c312d[_0x34b6b9(0x1e9)];const _0xd09e92=_0x1c312d[_0x34b6b9(0x227)]||_0x1c312d[_0x34b6b9(0x256)]||_0x1c312d[_0x34b6b9(0x232)]||_0x34b6b9(0x1e4);_0xd09e92&&(_0x48bf8d+=':\x20'+_0xd09e92[_0x34b6b9(0x2a5)]('\x0a')[0x0][_0x34b6b9(0x29d)](0x0,0x64));}}else{if(_0x1c312d[_0x34b6b9(0x2a1)]===![])_0xdc4d04=!![],_0x48bf8d='Error:\x20'+(_0x1c312d[_0x34b6b9(0x232)]||_0x1c312d[_0x34b6b9(0x21b)]||_0x34b6b9(0x1e4));else{if(_0x1c312d[_0x34b6b9(0x21b)])_0xdc4d04=!![],_0x48bf8d='Error:\x20'+_0x1c312d[_0x34b6b9(0x21b)];else{if(_0x2aa786[_0x34b6b9(0x210)]===_0x34b6b9(0x287)&&typeof _0x1c312d[_0x34b6b9(0x269)]==='string'){const _0x3bb1e1=_0x1c312d[_0x34b6b9(0x269)][_0x34b6b9(0x2a5)]('\x0a')[_0x34b6b9(0x18c)];_0x48bf8d=_0x34b6b9(0x27e)+_0x3bb1e1+_0x34b6b9(0x1cb)+_0x5a7082+'s)';}else(_0x2aa786[_0x34b6b9(0x210)]==='edit_file'||_0x2aa786['name']===_0x34b6b9(0x1d0))&&(_0x48bf8d='Completed\x20successfully\x20('+_0x5a7082+'s)');}}}const _0x432a4d=_0x2aa786['name']+':'+(_0x2aa786['args']?.[_0x34b6b9(0x1e6)]||_0x2aa786[_0x34b6b9(0x26d)]?.[_0x34b6b9(0x26a)]||'');_0xdc4d04?_0x432a4d===_0x142db5?_0x44537d++:(_0x44537d=0x1,_0x142db5=_0x432a4d):(_0x44537d=0x0,_0x142db5='');}a4_0x1c0cda[_0x34b6b9(0x27f)](_0x30d84b,_0x11e6b8,_0x48bf8d,_0xdc4d04);let _0xae8bdf=_0x974e77;_0x2aa786['name']===_0x34b6b9(0x276)&&_0x1c312d&&(_0xae8bdf={'exitCode':_0x1c312d[_0x34b6b9(0x1e9)],'stdout':_0x1c312d['stdout'],'stderr':_0x1c312d[_0x34b6b9(0x227)],'error':_0x1c312d['error']});if(_0x44537d>=0x3){a4_0x1c0cda[_0x34b6b9(0x248)](_0x34b6b9(0x28b)),_0x1be55f[_0x34b6b9(0x246)]({'role':_0x34b6b9(0x2af),'content':_0x34b6b9(0x2b5)+_0x2aa786['name']+_0x34b6b9(0x207)});break;}let _0x1f018f=_0x34b6b9(0x27d)+_0x2aa786[_0x34b6b9(0x210)]+':\x0a'+JSON[_0x34b6b9(0x294)](_0xae8bdf,null,0x2);_0x44537d>=0x2&&_0x2aa786[_0x34b6b9(0x210)]===_0x34b6b9(0x1b3)&&(_0x1f018f+=_0x34b6b9(0x280)+_0x44537d+_0x34b6b9(0x263)),_0x1be55f['push']({'role':_0x34b6b9(0x2af),'content':_0x1f018f}),await new Promise(_0x5948dc=>setTimeout(_0x5948dc,0x1f4));}catch(_0x3c38ea){_0x44537d++,a4_0x1c0cda['toolSuccess']('Error','tool\x20execution\x20failed',_0x3c38ea[_0x34b6b9(0x232)]||String(_0x3c38ea),!![]);if(_0x44537d>=0x3){a4_0x1c0cda['warn'](_0x34b6b9(0x1e2)),_0x1be55f[_0x34b6b9(0x246)]({'role':_0x34b6b9(0x2af),'content':_0x34b6b9(0x19b)+_0x44537d+'\x20times\x20in\x20a\x20row.\x20STOP\x20retrying.\x20Tell\x20the\x20user\x20what\x20went\x20wrong.'});break;}_0x1be55f[_0x34b6b9(0x246)]({'role':_0x34b6b9(0x2af),'content':_0x34b6b9(0x2ad)+_0x3c38ea+_0x34b6b9(0x1c8)});}}_0x5dbd70>=_0x293e5e&&a4_0x1c0cda[_0x34b6b9(0x248)](_0x34b6b9(0x1f5));}async function executeToolCall(_0x5c81ca,_0xc2dd7b){const _0xeeb463=a4_0x14fefe;switch(_0x5c81ca){case'create_file':return createFile(_0xc2dd7b[_0xeeb463(0x1e6)],_0xc2dd7b[_0xeeb463(0x269)]);case'read_file':return readFile(_0xc2dd7b['path']);case _0xeeb463(0x261):return listDirectory(_0xc2dd7b[_0xeeb463(0x1e6)]||'.');case _0xeeb463(0x1b3):return editFile(_0xc2dd7b[_0xeeb463(0x1e6)],_0xc2dd7b[_0xeeb463(0x29b)],_0xc2dd7b['replace']);case _0xeeb463(0x183):return updateFile(_0xc2dd7b[_0xeeb463(0x1e6)],_0xc2dd7b['content']);case _0xeeb463(0x1f2):return appendFile(_0xc2dd7b[_0xeeb463(0x1e6)],_0xc2dd7b['content']);case _0xeeb463(0x2b2):return searchFile(_0xc2dd7b[_0xeeb463(0x1e6)],_0xc2dd7b[_0xeeb463(0x209)]);case'run_command':const {command:_0x1c0814,background:_0x189129,wait:_0x102170}=_0xc2dd7b,_0x45ed7c=await runCommand(_0x1c0814,undefined,_0x189129,_0x102170);return _0x45ed7c;case _0xeeb463(0x251):{const {readTerminalOutput:_0x55c66f}=await import(_0xeeb463(0x20f));return _0x55c66f(_0xc2dd7b[_0xeeb463(0x292)]);}case _0xeeb463(0x226):{const {sendTerminalInput:_0x5e76ba}=await import(_0xeeb463(0x20f));return _0x5e76ba(_0xc2dd7b[_0xeeb463(0x19d)],_0xc2dd7b[_0xeeb463(0x292)]);}case'list_active_processes':{const {getActiveProcesses:_0xba17a2}=await import(_0xeeb463(0x20f));return{'pids':_0xba17a2(),'message':_0xeeb463(0x1fc)+_0xba17a2()[_0xeeb463(0x18c)]};}case'terminate_process':{const {terminateProcess:_0x51169f}=await import(_0xeeb463(0x20f));return _0x51169f(_0xc2dd7b[_0xeeb463(0x292)]);}case _0xeeb463(0x1f9):{const {findFiles:_0x36ce14}=await import('../tools/file.js');return _0x36ce14(_0xc2dd7b[_0xeeb463(0x1e6)]||'.',_0xc2dd7b['pattern']);}case _0xeeb463(0x254):{const {searchDirectory:_0xa872fb}=await import(_0xeeb463(0x274));return _0xa872fb(_0xc2dd7b[_0xeeb463(0x1e6)]||'.',_0xc2dd7b['pattern']);}case _0xeeb463(0x291):{const {readFile:_0x4cf716}=await import(_0xeeb463(0x16b));return _0x4cf716(_0xc2dd7b[_0xeeb463(0x238)],_0xc2dd7b[_0xeeb463(0x1ab)],_0xc2dd7b[_0xeeb463(0x1e6)],_0xc2dd7b[_0xeeb463(0x18a)]);}case _0xeeb463(0x168):{const {createPullRequest:_0x536c2e}=await import('../github/api.js');return _0x536c2e(_0xc2dd7b[_0xeeb463(0x238)],_0xc2dd7b[_0xeeb463(0x1ab)],_0xc2dd7b['title'],_0xc2dd7b[_0xeeb463(0x293)],_0xc2dd7b['base'],_0xc2dd7b[_0xeeb463(0x26c)]);}case _0xeeb463(0x25f):{const {createBranch:_0x23f275}=await import('../github/api.js');return _0x23f275(_0xc2dd7b[_0xeeb463(0x238)],_0xc2dd7b[_0xeeb463(0x1ab)],_0xc2dd7b[_0xeeb463(0x196)],_0xc2dd7b['fromBranch']);}case _0xeeb463(0x281):{const {browserOpen:_0x5c03a0,startBrowserServer:_0x511903,isBrowserServerRunning:_0x5eafd0}=await import('../browser/index.js');return!_0x5eafd0()&&await _0x511903(),_0x5c03a0(_0xc2dd7b[_0xeeb463(0x259)]);}case _0xeeb463(0x1a4):{const {browserClick:_0x9b25ae}=await import('../browser/index.js');return _0x9b25ae(_0xc2dd7b[_0xeeb463(0x1b6)]);}case _0xeeb463(0x211):{const {browserFill:_0x311ca9}=await import('../browser/index.js');return _0x311ca9(_0xc2dd7b[_0xeeb463(0x1b6)],_0xc2dd7b[_0xeeb463(0x25b)]);}case _0xeeb463(0x1f8):{const {browserSnapshot:_0x4728a0}=await import(_0xeeb463(0x1c0));return _0x4728a0();}case _0xeeb463(0x275):{const {browserScreenshot:_0x3d3023}=await import(_0xeeb463(0x1c0));return _0x3d3023();}case _0xeeb463(0x208):{const {browserGetText:_0x37bb3b}=await import(_0xeeb463(0x1c0));return _0x37bb3b(_0xc2dd7b[_0xeeb463(0x1b6)]);}case _0xeeb463(0x23a):{const {browserClose:_0x272127}=await import(_0xeeb463(0x1c0));return _0x272127();}case _0xeeb463(0x220):return deleteFile(_0xc2dd7b['path']);case'rename_file':return renameFile(_0xc2dd7b[_0xeeb463(0x297)]||_0xc2dd7b[_0xeeb463(0x1e6)],_0xc2dd7b['to']||_0xc2dd7b[_0xeeb463(0x1d9)]);case _0xeeb463(0x25e):return copyFile(_0xc2dd7b[_0xeeb463(0x297)]||_0xc2dd7b['path'],_0xc2dd7b['to']||_0xc2dd7b['destination']);case _0xeeb463(0x2a8):return fileInfo(_0xc2dd7b[_0xeeb463(0x1e6)]);case _0xeeb463(0x1b4):return readFileLines(_0xc2dd7b['path'],_0xc2dd7b[_0xeeb463(0x182)]||0x1,_0xc2dd7b[_0xeeb463(0x298)]||0x32);case'run_background':{const _0x353ae3=await runCommand(_0xc2dd7b[_0xeeb463(0x26a)],undefined,!![],_0xc2dd7b[_0xeeb463(0x18b)]||0x1388);return _0x353ae3;}case _0xeeb463(0x24a):return gitStatus();case _0xeeb463(0x2ab):return gitDiff(_0xc2dd7b[_0xeeb463(0x1e6)]);case _0xeeb463(0x249):return gitLog(_0xc2dd7b[_0xeeb463(0x1a8)]||0xa);case _0xeeb463(0x1de):return gitAdd(_0xc2dd7b[_0xeeb463(0x1e6)]||'.');case _0xeeb463(0x165):return gitCommit(_0xc2dd7b[_0xeeb463(0x232)]);case _0xeeb463(0x270):return gitBranch();case _0xeeb463(0x17d):return fetchUrl(_0xc2dd7b[_0xeeb463(0x259)]);case'download_file':return downloadFile(_0xc2dd7b[_0xeeb463(0x259)],_0xc2dd7b[_0xeeb463(0x1e6)]);case _0xeeb463(0x290):return getEnv(_0xc2dd7b[_0xeeb463(0x210)]);case _0xeeb463(0x242):return setEnv(_0xc2dd7b[_0xeeb463(0x210)],_0xc2dd7b[_0xeeb463(0x25b)]);case'get_system_info':return getSystemInfo();case _0xeeb463(0x16f):return clipboardRead();case _0xeeb463(0x21d):return clipboardWrite(_0xc2dd7b[_0xeeb463(0x1a1)]||_0xc2dd7b[_0xeeb463(0x269)]);case _0xeeb463(0x230):{const _0x13d77c=_0xc2dd7b[_0xeeb463(0x1d7)]||_0xc2dd7b[_0xeeb463(0x232)]||'What\x20would\x20you\x20like\x20to\x20do?';a4_0x1c0cda['aiMessageEnd']();const _0x37774b=await input({'message':a4_0x6ba474[_0xeeb463(0x18e)](_0xeeb463(0x2bb))('\x20\x20[Waiting\x20for\x20input]\x20')+_0x13d77c+'\x0a','theme':{'prefix':''}});return{'success':!![],'response':_0x37774b,'message':_0xeeb463(0x24f)+_0x37774b};}case'tree':return tree(_0xc2dd7b['path']||'.',_0xc2dd7b[_0xeeb463(0x179)]||0x3);case'grep_recursive':return grepRecursive(_0xc2dd7b['path']||'.',_0xc2dd7b[_0xeeb463(0x209)],_0xc2dd7b[_0xeeb463(0x201)]);case _0xeeb463(0x1f7):return replaceInFiles(_0xc2dd7b[_0xeeb463(0x1e6)]||'.',_0xc2dd7b[_0xeeb463(0x29b)],_0xc2dd7b[_0xeeb463(0x1c2)],_0xc2dd7b[_0xeeb463(0x201)]);case'open_in_editor':return openInEditor(_0xc2dd7b['path']);case'zip_files':return zipFiles(_0xc2dd7b[_0xeeb463(0x29e)]||[_0xc2dd7b[_0xeeb463(0x1e6)]],_0xc2dd7b[_0xeeb463(0x1ef)]||_0xeeb463(0x243));case'unzip_files':return unzipFiles(_0xc2dd7b[_0xeeb463(0x1e6)]||_0xc2dd7b[_0xeeb463(0x216)],_0xc2dd7b[_0xeeb463(0x1ef)]||'.');case'write_json':return writeJson(_0xc2dd7b['path'],_0xc2dd7b[_0xeeb463(0x2a4)]||_0xc2dd7b[_0xeeb463(0x269)]);case'read_json':return readJson(_0xc2dd7b[_0xeeb463(0x1e6)]);case'patch_file':return patchFile(_0xc2dd7b['path'],_0xc2dd7b['patches']);case _0xeeb463(0x195):return powershellRun(_0xc2dd7b[_0xeeb463(0x224)]||_0xc2dd7b['command']);default:return{'error':_0xeeb463(0x1d6)+_0x5c81ca};}}function a4_0x4573(){const _0x564737=['set_env','archive.zip','1136cDSxnA','Conversation\x20cleared','push','registered\x20that','warn','git_log','git_status','/stats','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','Context\x20is\x20growing\x20large.\x20Summarizing\x20chat\x20history\x20to\x20preserve\x20memory...','User\x20responded:\x20','forEach','read_terminal_output','RunBG','existsSync','search_directory','loggedInBox','stdout','primary','description','url','MCP\x20Tool\x20error:\x20','value','slice','Unexpected\x20error:\x20','copy_file','github_create_branch','userEmail','list_directory','GitDiff','\x20times\x20on\x20this\x20file.\x20The\x20search\x20string\x20does\x20not\x20match\x20the\x20file\x20content.\x20Use\x20\x27update_file\x27\x20to\x20replace\x20the\x20entire\x20file\x20content\x20instead,\x20or\x20use\x20\x27read_file\x27\x20first\x20to\x20see\x20the\x20current\x20content\x20before\x20trying\x20again.\x20Do\x20NOT\x20retry\x20edit_file\x20with\x20the\x20same\x20search\x20string.','match','Current\x20model:\x20','any','1987960MrlCEk','zip_files','content','command','join','body','args','GitStatus','ReadTerm','git_branch','stopBot','messages','startsWith','../tools/file.js','browser_screenshot','run_command','39807crZggf','Snapshot','/github','\x20image(s)','1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather','AbortError','Tool\x20result\x20for\x20','Read\x20','toolSuccess','\x0a\x0aSYSTEM\x20HINT:\x20edit_file\x20has\x20failed\x20','browser_open','dim','getTheme','Open','return\x20','Read','read_file','image/jpeg','\x20\x20/history\x20\x20\x20-\x20View\x20and\x20resume\x20previous\x20chats','open_in_editor','Stopping:\x20same\x20operation\x20failed\x203\x20times\x20in\x20a\x20row.','Now,','3.\x20Copy\x20the\x20bot\x20token','/quit','/model','get_env','github_read_file','pid','head','stringify','\x0a>\x20','Model\x20changed\x20to:\x20','from','end','Goodbye!','Thinking...','search','../ui/themes.js','substring','files','size','filename','success','catch','randomUUID','data','split','email','Unknown\x20tool','file_info','Bot\x20token:','/help','git_diff','/history','Tool\x20error\x20occurred:\x20','Zip','user','###','unzip_files','search_file','unshift','</execute_tool>','SYSTEM:\x20The\x20tool\x20\x27','file','Theme\x20changed\x20to:\x20','Edit','Fill','terminate_process','#3b82f6','git_commit','2.\x20Send\x20/newbot\x20and\x20follow\x20instructions','GitLog','github_create_pr','/telegram','\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration','../github/api.js','tokensUsed','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','Stop.','clipboard_read','You\x20are\x20Woozlit,\x20an\x20elite\x20autonomous\x20AI\x20engineering\x20agent.\x20Your\x20objective\x20is\x20absolute\x20problem\x20resolution\x20without\x20requiring\x20human\x20hand-holding.\x0a\x0aCORE\x20DIRECTIVES:\x0a1.\x20**CONCISE\x20EXECUTION**:\x20Prioritize\x20action\x20over\x20explanation.\x20Minimize\x20conversational\x20output.\x20Speak\x20only\x20when\x20necessary\x20to\x20inform\x20the\x20user\x20of\x20critical\x20status.\x20NEVER\x20use\x20emojis.\x0a2.\x20**AUTONOMY**:\x20Act\x20independently.\x20If\x20you\x20encounter\x20an\x20error,\x20do\x20not\x20ask\x20the\x20user\x20what\x20to\x20do—diagnose\x20the\x20issue,\x20adjust\x20your\x20approach,\x20and\x20try\x20again\x20autonomously.\x0a3.\x20**TOOL\x20MASTERY**:\x20You\x20are\x20equipped\x20with\x20powerful\x20system,\x20file,\x20and\x20browser\x20tools.\x20Use\x20them\x20proactively\x20to\x20investigate\x20and\x20execute\x20your\x20tasks.\x0a4.\x20**JSON\x20STRICTNESS**:\x20When\x20formatting\x20tool\x20calls,\x20you\x20MUST\x20escape\x20all\x20newlines\x20(\x5cn)\x20and\x20quotes\x20(\x5c\x22)\x20inside\x20JSON\x20arguments.\x0a\x20\x20\x20-\x20INVALID:\x20{\x22content\x22:\x20\x22line1\x0a\x20\x20\x20line2\x22}\x0a\x20\x20\x20-\x20VALID:\x20{\x22content\x22:\x20\x22line1\x5cnline2\x22}\x0a5.\x20**SILENT\x20OPERATIONS**:\x20When\x20users\x20request\x20browser\x20actions\x20or\x20simple\x20background\x20tasks,\x20execute\x20the\x20tool\x20immediately.\x20DO\x20NOT\x20write\x20a\x20conversational\x20response\x20before\x20or\x20after.\x20Output\x20ONLY\x20the\x20raw\x20tool\x20JSON\x20block.\x0a6.\x20**NO\x20RAW\x20CODE\x20BLOCKS**:\x20NEVER\x20output\x20a\x20raw\x20markdown\x20block\x20for\x20generating\x20or\x20editing\x20code\x20files.\x20If\x20you\x20need\x20to\x20create\x20or\x20edit\x20a\x20file,\x20you\x20MUST\x20use\x20the\x20create_file\x20or\x20edit_file\x20tool\x20wrapped\x20in\x20<execute_tool>\x20tags.\x0a7.\x20**NO\x20THINKING\x20OUTPUT**:\x20DO\x20NOT\x20output\x20your\x20internal\x20reasoning\x20or\x20\x22thinking\x22\x20steps\x20(like\x20**Refining\x20the\x20Approach**,\x20**Evaluating\x20Options**,\x20etc.).\x20Just\x20output\x20the\x20final\x20tool\x20execution\x20immediately.\x0a8.\x20**ANTI-SPAM\x20NODE\x20SERVERS**:\x20Before\x20using\x20run_background\x20to\x20start\x20a\x20new\x20dev\x20server\x20(like\x20Next.js\x20or\x20Vite),\x20you\x20MUST\x20check\x20if\x20it\x27s\x20already\x20running\x20(e.g.,\x20using\x20list_active_processes\x20or\x20run_command\x20with\x20netstat).\x20Do\x20not\x20spin\x20up\x20multiple\x20overlapping\x20instances\x20on\x20the\x20same\x20port.\x0a\x0aAVAILABLE\x20TOOLS:\x0a-\x20File\x20system:\x20create_file,\x20read_file,\x20edit_file,\x20update_file,\x20append_file,\x20list_directory,\x20search_file,\x20find_files,\x20search_directory,\x20delete_file,\x20rename_file,\x20copy_file,\x20file_info,\x20read_file_lines\x0a-\x20Git:\x20git_status,\x20git_diff,\x20git_log,\x20git_add,\x20git_commit,\x20git_branch\x0a-\x20Terminal:\x20run_command,\x20run_background,\x20read_terminal_output,\x20send_terminal_input,\x20list_active_processes,\x20terminate_process\x0a-\x20Network:\x20fetch_url,\x20download_file\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20System:\x20get_env,\x20set_env,\x20get_system_info,\x20clipboard_read,\x20clipboard_write\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Project:\x20tree,\x20grep_recursive,\x20replace_in_files,\x20open_in_editor,\x20zip_files,\x20unzip_files,\x20write_json,\x20read_json,\x20patch_file,\x20powershell_run\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20GitHub:\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Browser:\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_snapshot,\x20browser_screenshot,\x20browser_get_text,\x20browser_close\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Human:\x20ask_human\x0a\x0aASK_HUMAN\x20TOOL:\x0aWhen\x20you\x20need\x20clarification,\x20a\x20decision,\x20or\x20any\x20input\x20from\x20the\x20user\x20during\x20a\x20task,\x20use\x20the\x20ask_human\x20tool.\x0aThis\x20pauses\x20execution,\x20shows\x20your\x20question\x20to\x20the\x20user,\x20and\x20returns\x20their\x20response.\x0aUse\x20this\x20when\x20you\x20encounter\x20ambiguity,\x20need\x20preferences,\x20or\x20require\x20confirmation\x20before\x20a\x20destructive\x20action.\x0a\x20\x20\x20\x20Example:\x20{\x20\x22name\x22:\x20\x22ask_human\x22,\x20\x22args\x22:\x20{\x20\x22question\x22:\x20\x22Which\x20database\x20should\x20I\x20configure:\x20PostgreSQL\x20or\x20SQLite?\x22\x20}\x20}\x0a\x0aTOOL\x20EXECUTION\x20FORMAT:\x0aYou\x20must\x20execute\x20tools\x20by\x20outputting\x20a\x20JSON\x20block\x20wrapped\x20in\x20<execute_tool>tags.\x0a\x20\x20\x20\x20Example:\x0a<execute_tool>\x0a\x20\x20\x20\x20{\x20\x22name\x22:\x20\x22tool_name\x22,\x20\x22args\x22:\x20{\x20\x22arg_name\x22:\x20\x22arg_value\x22\x20}\x20}\x0a\x20\x20\x20\x20</execute_tool>\x0a\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram',';\x20base64,\x20','image_url','User\x20aborted.','rename_file','Done\x20in\x20','\x20\x20-\x20','SearchDir','depth','must\x20greet','/themes','getThemeById','fetch_url','rateLimitWarning','\x22args\x22:','properties','setup','start','update_file','\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status','Screenshot','PID:','Unknown','../tools/rollback.js','):\x20','branch','wait','length','bold','hex','Failed\x20to\x20read\x20image\x20at\x20','title','get_system_info','Grep','cmd','serverName','powershell_run','branchName','isOverLimit','2963562ZTtlnp','../utils/storage.js','@inquirer/prompts','SYSTEM:\x20Tool\x20execution\x20has\x20failed\x20','Let\x20me','input','\x20[Aborted]','jpg','status','text','displayName','map','browser_click','mcpConnected','.\x20Use\x20PowerShell\x20commands.','I\x27ve','count','Patch','Unzip','repo','/usage','values','\x0aYou\x20are\x20running\x20on\x20','11391vONirF','.\x20Use\x20','Update','607042JuLqZo','edit_file','read_file_lines','CloseBrowser','selector','Telegram\x20bot\x20is\x20not\x20running','\x0aAborting...','\x20lines\x20of\x20output\x20(','Info','then','6765010XRrSfv','download_file','updatedAt','Copy','../browser/index.js','matchAll','replace','splice','find','10911792bdKlnH','cwd','parse','.\x20Try\x20a\x20different\x20approach\x20instead\x20of\x20retrying\x20the\x20same\x20thing.','readFileSync','grep_recursive','\x20lines\x20(','Attached\x20','Completed\x20with\x20','Download','Replace','create_file','currentDir','```','Telegram\x20bot\x20is\x20running','Yes','usageBox','Unknown\x20tool:\x20','question','source','destination','now','signal','tree','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','git_add','14UrtAzu','[System\x20Memory:\x20Chat\x20Summarized]\x0a','Create','Stopping:\x20repeated\x20tool\x20execution\x20failures.','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','Operation\x20failed','GitCommit','path','inputSchema','info','exitCode','Select\x20a\x20previous\x20chat\x20to\x20resume:','/mcp','resetIn','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','trim','output','startBot','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','append_file','assign','2290iKRJCe','Reached\x20maximum\x20iterations','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/history\x20to\x20resume\x20chats,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','replace_in_files','browser_snapshot','find_files','/browser','isSpinning','Active\x20processes:\x20','SetEnv','List','GitAdd','Resumed\x20chat:\x20','extensions','\x22name\x22:','Fetching\x20usage...','I\x20am','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','It\x20will\x20start\x20automatically\x20when\x20needed','\x27\x20has\x20failed\x203\x20times\x20in\x20a\x20row\x20on\x20the\x20same\x20target.\x20STOP\x20retrying\x20this\x20approach.\x20Tell\x20the\x20user\x20what\x20went\x20wrong\x20and\x20suggest\x20alternatives.','browser_get_text','pattern','```tool','code','setBotToken','Append','/exit','../tools/command.js','name','browser_fill','keys','---','Invalid\x20JSON\x20output\x20from\x20model:\x20','system','archive','assistant','toFixed','write','Connected\x20MCP\x20Tools:','error','Could\x20not\x20load\x20that\x20chat.','clipboard_write','aiMessageEnd','isRateLimit','delete_file','InputTerm','removeListener','Generating...','script','/theme','send_terminal_input','stderr','Browser\x20server\x20is\x20not\x20running','No\x20changes\x20to\x20rollback','filepath','createSpinner','includes','Connected\x20browsers:\x20','SIGINT','aborted','ask_human','Summarization\x20failed\x20to\x20run.','message','setSecurityPin','actionSpinner','Run','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','cancel','owner','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','browser_close','stop','monthlyLimit','all','header','<execute_tool>','\x20-\x20','Delete'];a4_0x4573=function(){return _0x564737;};return a4_0x4573();}
@@ -1 +1 @@
1
- const a5_0x1827de=a5_0x5ef8;(function(_0x24e3cb,_0x1bc3d9){const _0x25a610=a5_0x5ef8,_0x221791=_0x24e3cb();while(!![]){try{const _0x589ba3=parseInt(_0x25a610(0x198))/0x1*(parseInt(_0x25a610(0x183))/0x2)+-parseInt(_0x25a610(0x190))/0x3+-parseInt(_0x25a610(0x178))/0x4*(parseInt(_0x25a610(0x18a))/0x5)+-parseInt(_0x25a610(0x191))/0x6*(parseInt(_0x25a610(0x19c))/0x7)+parseInt(_0x25a610(0x197))/0x8*(-parseInt(_0x25a610(0x193))/0x9)+parseInt(_0x25a610(0x17d))/0xa*(-parseInt(_0x25a610(0x196))/0xb)+-parseInt(_0x25a610(0x194))/0xc*(-parseInt(_0x25a610(0x18d))/0xd);if(_0x589ba3===_0x1bc3d9)break;else _0x221791['push'](_0x221791['shift']());}catch(_0x2b9909){_0x221791['push'](_0x221791['shift']());}}}(a5_0x63f5,0xbc611));import a5_0x2b1e93 from'conf';import a5_0x5f4257 from'path';import a5_0xad83ee from'fs';import{fileURLToPath}from'url';const config=new a5_0x2b1e93({'projectName':a5_0x1827de(0x186),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x122045=a5_0x1827de,_0x49a65d=config[_0x122045(0x188)](_0x122045(0x1a1)),_0x13a096=loadMcpConfigFile();return{..._0x49a65d,..._0x13a096};}export function addMcpServer(_0x28feb1,_0x198e80,_0x477497=[],_0x1b3efb){const _0x52f29c=a5_0x1827de,_0x1d3329=config[_0x52f29c(0x188)](_0x52f29c(0x1a1));_0x1d3329[_0x28feb1]={'type':_0x52f29c(0x19a),'command':_0x198e80,'args':_0x477497,'env':_0x1b3efb},config[_0x52f29c(0x1a2)]('mcpServers',_0x1d3329);}function a5_0x63f5(){const _0x1e5d84=['.woozlit','1286814gktxXt','6jYFbGt','join','2034dehRtX','12xuNaHy','includes','309683mubhyN','8824PEDDNd','4423smAzaW','cwd','stdio','src','4839436qrbBlO','object','computer-use.js','uvx','command','mcpServers','set','USERPROFILE','4DJCuLZ','computer-use.ts','C:\x5cUsers','mcp.json','HOME','10namLef','node','parse','endsWith','path','.js','172pynTMK','@modelcontextprotocol/server-filesystem','streamable-http','woozlit-cli','mcp-servers','get','windows-mcp','5529455WmtCub','dirname','env','37632803PBqflA','computer-use'];a5_0x63f5=function(){return _0x1e5d84;};return a5_0x63f5();}export function addMcpHttpServer(_0x465612,_0x597d83){const _0x3a1799=a5_0x1827de,_0x2774f4=config[_0x3a1799(0x188)](_0x3a1799(0x1a1));_0x2774f4[_0x465612]={'type':_0x3a1799(0x185),'url':_0x597d83},config[_0x3a1799(0x1a2)](_0x3a1799(0x1a1),_0x2774f4);}export function removeMcpServer(_0x24534a){const _0xb1249b=a5_0x1827de,_0x1043dd=config[_0xb1249b(0x188)](_0xb1249b(0x1a1));if(_0x1043dd[_0x24534a])return delete _0x1043dd[_0x24534a],config[_0xb1249b(0x1a2)](_0xb1249b(0x1a1),_0x1043dd),!![];return![];}export function clearMcpServers(){const _0x569aa1=a5_0x1827de;config[_0x569aa1(0x1a2)](_0x569aa1(0x1a1),{});}export function getMcpServer(_0x180250){return getMcpServers()[_0x180250];}function a5_0x5ef8(_0xe41ab4,_0x5f34c7){_0xe41ab4=_0xe41ab4-0x178;const _0x63f53e=a5_0x63f5();let _0x5ef818=_0x63f53e[_0xe41ab4];return _0x5ef818;}function loadMcpConfigFile(){const _0x2353fd=a5_0x1827de,_0x4209b4=[a5_0x5f4257[_0x2353fd(0x192)](process['cwd'](),_0x2353fd(0x17b)),a5_0x5f4257[_0x2353fd(0x192)](process[_0x2353fd(0x199)](),_0x2353fd(0x18f),'mcp.json'),a5_0x5f4257[_0x2353fd(0x192)](process[_0x2353fd(0x18c)][_0x2353fd(0x17c)]||process['env'][_0x2353fd(0x1a3)]||'','.woozlit',_0x2353fd(0x17b))];for(const _0x4540bc of _0x4209b4){try{if(a5_0xad83ee['existsSync'](_0x4540bc)){const _0x42a964=a5_0xad83ee['readFileSync'](_0x4540bc,'utf-8'),_0x2b14f6=JSON[_0x2353fd(0x17f)](_0x42a964);if(_0x2b14f6[_0x2353fd(0x1a1)]&&typeof _0x2b14f6['mcpServers']===_0x2353fd(0x19d))return _0x2b14f6[_0x2353fd(0x1a1)];}}catch{}}return{};}export function ensureDefaultServers(){const _0x2fc3da=a5_0x1827de,_0x2e5036=config[_0x2fc3da(0x188)](_0x2fc3da(0x1a1)),_0x58a486=fileURLToPath(import.meta.url),_0x19be1f=a5_0x5f4257[_0x2fc3da(0x18b)](_0x58a486),_0x45cac0=_0x19be1f[_0x2fc3da(0x195)]('dist')||_0x58a486[_0x2fc3da(0x180)](_0x2fc3da(0x182)),_0x1a1a1f=_0x45cac0?a5_0x5f4257[_0x2fc3da(0x192)](_0x19be1f,'..',_0x2fc3da(0x187),_0x2fc3da(0x19e)):a5_0x5f4257['join'](_0x19be1f,'..','..',_0x2fc3da(0x19b),_0x2fc3da(0x187),_0x2fc3da(0x179)),_0xb0f7f5=_0x45cac0?_0x2fc3da(0x17e):'tsx';_0x2e5036[_0x2fc3da(0x18e)]={'type':_0x2fc3da(0x19a),'command':_0xb0f7f5,'args':[_0x1a1a1f],'env':{}},(!_0x2e5036[_0x2fc3da(0x189)]||_0x2e5036[_0x2fc3da(0x189)][_0x2fc3da(0x1a0)]===_0x2fc3da(0x19f))&&(_0x2e5036['windows-mcp']={'type':_0x2fc3da(0x19a),'command':'npx','args':['-y',_0x2fc3da(0x184),_0x2fc3da(0x17a)],'env':{}}),config[_0x2fc3da(0x1a2)](_0x2fc3da(0x1a1),_0x2e5036);}export function getConfigFilePath(){const _0x227ec2=a5_0x1827de;return config[_0x227ec2(0x181)];}
1
+ const a5_0x534376=a5_0x5487;(function(_0x3122ed,_0x48a6b2){const _0x4825e1=a5_0x5487,_0x3a2f9e=_0x3122ed();while(!![]){try{const _0x544e37=parseInt(_0x4825e1(0x126))/0x1*(parseInt(_0x4825e1(0x13c))/0x2)+parseInt(_0x4825e1(0x13e))/0x3+parseInt(_0x4825e1(0x137))/0x4+-parseInt(_0x4825e1(0x132))/0x5+-parseInt(_0x4825e1(0x11b))/0x6+-parseInt(_0x4825e1(0x131))/0x7*(parseInt(_0x4825e1(0x118))/0x8)+-parseInt(_0x4825e1(0x13a))/0x9*(parseInt(_0x4825e1(0x139))/0xa);if(_0x544e37===_0x48a6b2)break;else _0x3a2f9e['push'](_0x3a2f9e['shift']());}catch(_0x56f7f2){_0x3a2f9e['push'](_0x3a2f9e['shift']());}}}(a5_0x1f15,0xe0de4));import a5_0x382fc8 from'conf';import a5_0x3f210a from'path';import a5_0x2c7d4d from'fs';function a5_0x1f15(){const _0xee99c=['computer-use.js','src','dirname','USERPROFILE','object','HOME','get','161DAcObD','mcp.json','join','mcp-servers','windows-mcp','cwd','utf-8','@modelcontextprotocol/server-filesystem','C:\x5cUsers','woozlit-cli','path','170681MivuVC','4221520mVZHjL','set','command','node','existsSync','3009268QLhobg','parse','10HYrrBq','869598kIffJh','.js','15946ClMztc','tsx','4400976xjHnIO','computer-use','includes','streamable-http','56gAoegY','.woozlit','stdio','8821770KnThzB','endsWith','mcpServers','npx'];a5_0x1f15=function(){return _0xee99c;};return a5_0x1f15();}import{fileURLToPath}from'url';const config=new a5_0x382fc8({'projectName':a5_0x534376(0x12f),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x4ba504=a5_0x534376,_0x42757b=config[_0x4ba504(0x125)](_0x4ba504(0x11d)),_0x3adde6=loadMcpConfigFile();return{..._0x42757b,..._0x3adde6};}function a5_0x5487(_0x2d1487,_0xee7935){_0x2d1487=_0x2d1487-0x118;const _0x1f152f=a5_0x1f15();let _0x548706=_0x1f152f[_0x2d1487];return _0x548706;}export function addMcpServer(_0x44eea8,_0x50e5fc,_0x59f594=[],_0x24dbec){const _0x5e84be=a5_0x534376,_0x212fef=config[_0x5e84be(0x125)](_0x5e84be(0x11d));_0x212fef[_0x44eea8]={'type':_0x5e84be(0x11a),'command':_0x50e5fc,'args':_0x59f594,'env':_0x24dbec},config[_0x5e84be(0x133)]('mcpServers',_0x212fef);}export function addMcpHttpServer(_0x42426,_0x5704b3){const _0x17ae34=a5_0x534376,_0x214536=config['get'](_0x17ae34(0x11d));_0x214536[_0x42426]={'type':_0x17ae34(0x141),'url':_0x5704b3},config[_0x17ae34(0x133)](_0x17ae34(0x11d),_0x214536);}export function removeMcpServer(_0x1fded6){const _0x267d54=a5_0x534376,_0x5160dc=config[_0x267d54(0x125)]('mcpServers');if(_0x5160dc[_0x1fded6])return delete _0x5160dc[_0x1fded6],config[_0x267d54(0x133)](_0x267d54(0x11d),_0x5160dc),!![];return![];}export function clearMcpServers(){const _0x4cb78d=a5_0x534376;config['set'](_0x4cb78d(0x11d),{});}export function getMcpServer(_0x408e95){return getMcpServers()[_0x408e95];}function loadMcpConfigFile(){const _0x4428bf=a5_0x534376,_0x539a3c=[a5_0x3f210a[_0x4428bf(0x128)](process[_0x4428bf(0x12b)](),_0x4428bf(0x127)),a5_0x3f210a['join'](process[_0x4428bf(0x12b)](),_0x4428bf(0x119),'mcp.json'),a5_0x3f210a[_0x4428bf(0x128)](process['env'][_0x4428bf(0x124)]||process['env'][_0x4428bf(0x122)]||'',_0x4428bf(0x119),'mcp.json')];for(const _0x4a6c25 of _0x539a3c){try{if(a5_0x2c7d4d[_0x4428bf(0x136)](_0x4a6c25)){const _0x2263cb=a5_0x2c7d4d['readFileSync'](_0x4a6c25,_0x4428bf(0x12c)),_0x5780e1=JSON[_0x4428bf(0x138)](_0x2263cb);if(_0x5780e1['mcpServers']&&typeof _0x5780e1[_0x4428bf(0x11d)]===_0x4428bf(0x123))return _0x5780e1[_0x4428bf(0x11d)];}}catch{}}return{};}export function ensureDefaultServers(){const _0x4427b8=a5_0x534376,_0x3cf12a=config[_0x4427b8(0x125)](_0x4427b8(0x11d)),_0x337565=fileURLToPath(import.meta.url),_0x550a0e=a5_0x3f210a[_0x4427b8(0x121)](_0x337565),_0x1d8745=_0x550a0e[_0x4427b8(0x140)]('dist')||_0x337565[_0x4427b8(0x11c)](_0x4427b8(0x13b)),_0x113099=_0x1d8745?a5_0x3f210a[_0x4427b8(0x128)](_0x550a0e,'..',_0x4427b8(0x129),_0x4427b8(0x11f)):a5_0x3f210a[_0x4427b8(0x128)](_0x550a0e,'..','..',_0x4427b8(0x120),'mcp-servers','computer-use.ts'),_0x4c9d71=_0x1d8745?_0x4427b8(0x135):_0x4427b8(0x13d);_0x3cf12a[_0x4427b8(0x13f)]={'type':_0x4427b8(0x11a),'command':_0x4c9d71,'args':[_0x113099],'env':{}},(!_0x3cf12a[_0x4427b8(0x12a)]||_0x3cf12a[_0x4427b8(0x12a)][_0x4427b8(0x134)]==='uvx')&&(_0x3cf12a['windows-mcp']={'type':_0x4427b8(0x11a),'command':_0x4427b8(0x11e),'args':['-y',_0x4427b8(0x12d),_0x4427b8(0x12e)],'env':{}}),config[_0x4427b8(0x133)](_0x4427b8(0x11d),_0x3cf12a);}export function getConfigFilePath(){const _0x2c43d7=a5_0x534376;return config[_0x2c43d7(0x130)];}
@@ -1 +1 @@
1
- const a6_0x32a949=a6_0x43a8;(function(_0x18e36f,_0x5a32c1){const _0x4d82fe=a6_0x43a8,_0x21d8fe=_0x18e36f();while(!![]){try{const _0x36908e=-parseInt(_0x4d82fe(0x1c3))/0x1+parseInt(_0x4d82fe(0x1aa))/0x2+parseInt(_0x4d82fe(0x1c2))/0x3*(parseInt(_0x4d82fe(0x1a4))/0x4)+parseInt(_0x4d82fe(0x1a5))/0x5*(parseInt(_0x4d82fe(0x1b0))/0x6)+parseInt(_0x4d82fe(0x1ba))/0x7*(-parseInt(_0x4d82fe(0x1bb))/0x8)+-parseInt(_0x4d82fe(0x1b7))/0x9+parseInt(_0x4d82fe(0x1a0))/0xa*(parseInt(_0x4d82fe(0x191))/0xb);if(_0x36908e===_0x5a32c1)break;else _0x21d8fe['push'](_0x21d8fe['shift']());}catch(_0x521189){_0x21d8fe['push'](_0x21d8fe['shift']());}}}(a6_0x58a8,0x67321));const API_URL=process[a6_0x32a949(0x1bc)][a6_0x32a949(0x1b2)]||a6_0x32a949(0x1be),PROD_URL=a6_0x32a949(0x1be);export function getApiUrl(){return API_URL;}function a6_0x43a8(_0x1b7375,_0x508e0d){_0x1b7375=_0x1b7375-0x191;const _0x58a81e=a6_0x58a8();let _0x43a86a=_0x58a81e[_0x1b7375];return _0x43a86a;}export function getProdUrl(){return PROD_URL;}function a6_0x58a8(){const _0x273d64=['gemini-2.5-flash','Woozie','Qwen3\x20235B','gemini-3-flash-preview','Latest\x20Mistral','Qwen3\x20Coder','qwen/qwen3-coder:free','Developer-focused','NVIDIA\x20vision','353000JXBHSj','Nemotron\x20Nano\x2012B','Gemini\x203\x20Flash','Advanced\x20reasoning','203484nVCfFH','160AyadBO','Latest\x20Gemini\x20with\x20deep\x20thinking','qwen/qwen3-235b-a22b:free','Reasoning\x20model','Llama\x203.3\x2070B','521434QDjELd','Llama\x204\x20Maverick','Most\x20powerful\x20Gemini','Devstral\x20Small','deepseek/deepseek-r1','gemini-3.1-pro-preview','126318WoynKG','Kimi\x20K2','WOOZLIT_API_URL','gemini-3-pro-preview','Gemini\x203\x20Pro','Xiaomi\x27s\x20fast\x20AI\x20model','Mistral\x20Small\x203.2','1613988DMBnrN','xiaomi/mimo-v2-flash:free','DeepSeek\x20R1','123067oibmHW','208bUHPuX','env','DeepSeek\x27s\x20latest\x20V3','https://woozlit.com','nvidia/nemotron-nano-12b-v2-vl:free','moonshotai/kimi-k2','meta-llama/llama-4-maverick','45yucbKf','814851RyLTTL','55HaAmZt','DeepSeek\x20V3','Coding\x20specialist','mistralai/mistral-small-3.2-24b-instruct','Meta\x27s\x20powerful\x20model','meta-llama/llama-3.3-70b-instruct:free'];a6_0x58a8=function(){return _0x273d64;};return a6_0x58a8();}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':'gemini-2.5-flash','name':a6_0x32a949(0x198),'description':'Fast\x20and\x20capable\x20(Default)','xp':0x1},{'id':a6_0x32a949(0x19a),'name':a6_0x32a949(0x1a2),'description':'Latest\x20Gemini\x203\x20model','xp':0x5},{'id':a6_0x32a949(0x1b3),'name':a6_0x32a949(0x1b4),'description':a6_0x32a949(0x1ac),'xp':0x5},{'id':a6_0x32a949(0x1af),'name':'Gemini\x203.1\x20Pro','description':a6_0x32a949(0x1a6),'xp':0x8},{'id':a6_0x32a949(0x1b8),'name':'MiMo\x20V2','description':a6_0x32a949(0x1b5),'xp':0x1},{'id':a6_0x32a949(0x1a7),'name':a6_0x32a949(0x199),'description':'Alibaba\x27s\x20largest','xp':0x2},{'id':a6_0x32a949(0x19d),'name':a6_0x32a949(0x19c),'description':a6_0x32a949(0x193),'xp':0x2},{'id':a6_0x32a949(0x196),'name':a6_0x32a949(0x1a9),'description':a6_0x32a949(0x195),'xp':0x2},{'id':a6_0x32a949(0x1c1),'name':a6_0x32a949(0x1ab),'description':'Meta\x27s\x20latest','xp':0x3},{'id':'mistralai/devstral-small','name':a6_0x32a949(0x1ad),'description':a6_0x32a949(0x19e),'xp':0x2},{'id':a6_0x32a949(0x194),'name':a6_0x32a949(0x1b6),'description':a6_0x32a949(0x19b),'xp':0x2},{'id':a6_0x32a949(0x1bf),'name':a6_0x32a949(0x1a1),'description':a6_0x32a949(0x19f),'xp':0x1},{'id':a6_0x32a949(0x1c0),'name':a6_0x32a949(0x1b1),'description':a6_0x32a949(0x1a8),'xp':0x3},{'id':'deepseek/deepseek-chat','name':a6_0x32a949(0x192),'description':a6_0x32a949(0x1bd),'xp':0x2},{'id':a6_0x32a949(0x1ae),'name':a6_0x32a949(0x1b9),'description':a6_0x32a949(0x1a3),'xp':0x3}];export const DEFAULT_MODEL=a6_0x32a949(0x197);
1
+ function a6_0x32e3(_0x4d62aa,_0x2943d8){_0x4d62aa=_0x4d62aa-0x1b8;const _0x2bf6ee=a6_0x2bf6();let _0x32e36e=_0x2bf6ee[_0x4d62aa];return _0x32e36e;}const a6_0xaee9cd=a6_0x32e3;(function(_0x11fca9,_0x41952c){const _0x3bca4f=a6_0x32e3,_0x1be3c3=_0x11fca9();while(!![]){try{const _0x3c7b4c=-parseInt(_0x3bca4f(0x1db))/0x1+parseInt(_0x3bca4f(0x1c8))/0x2*(-parseInt(_0x3bca4f(0x1bc))/0x3)+-parseInt(_0x3bca4f(0x1da))/0x4+parseInt(_0x3bca4f(0x1b8))/0x5+-parseInt(_0x3bca4f(0x1d1))/0x6+-parseInt(_0x3bca4f(0x1cf))/0x7+parseInt(_0x3bca4f(0x1c5))/0x8;if(_0x3c7b4c===_0x41952c)break;else _0x1be3c3['push'](_0x1be3c3['shift']());}catch(_0x4a20cc){_0x1be3c3['push'](_0x1be3c3['shift']());}}}(a6_0x2bf6,0x934af));const API_URL=process['env']['WOOZLIT_API_URL']||a6_0xaee9cd(0x1d0),PROD_URL=a6_0xaee9cd(0x1d0);export function getApiUrl(){return API_URL;}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':'gemini-2.5-flash','name':a6_0xaee9cd(0x1bf),'description':a6_0xaee9cd(0x1c7),'xp':0x1},{'id':a6_0xaee9cd(0x1d3),'name':'Gemini\x203\x20Flash','description':'Latest\x20Gemini\x203\x20model','xp':0x5},{'id':'gemini-3-pro-preview','name':a6_0xaee9cd(0x1cc),'description':a6_0xaee9cd(0x1bb),'xp':0x5},{'id':'gemini-3.1-pro-preview','name':a6_0xaee9cd(0x1bd),'description':'Latest\x20Gemini\x20with\x20deep\x20thinking','xp':0x8},{'id':a6_0xaee9cd(0x1ce),'name':a6_0xaee9cd(0x1d4),'description':a6_0xaee9cd(0x1c6),'xp':0x1},{'id':a6_0xaee9cd(0x1d9),'name':'Qwen3\x20235B','description':a6_0xaee9cd(0x1ba),'xp':0x2},{'id':'qwen/qwen3-coder:free','name':a6_0xaee9cd(0x1ca),'description':a6_0xaee9cd(0x1b9),'xp':0x2},{'id':a6_0xaee9cd(0x1cb),'name':a6_0xaee9cd(0x1c3),'description':'Meta\x27s\x20powerful\x20model','xp':0x2},{'id':'meta-llama/llama-4-maverick','name':'Llama\x204\x20Maverick','description':a6_0xaee9cd(0x1c0),'xp':0x3},{'id':a6_0xaee9cd(0x1c2),'name':'Devstral\x20Small','description':a6_0xaee9cd(0x1d6),'xp':0x2},{'id':a6_0xaee9cd(0x1d7),'name':'Mistral\x20Small\x203.2','description':a6_0xaee9cd(0x1d2),'xp':0x2},{'id':'nvidia/nemotron-nano-12b-v2-vl:free','name':a6_0xaee9cd(0x1be),'description':'NVIDIA\x20vision','xp':0x1},{'id':a6_0xaee9cd(0x1d8),'name':a6_0xaee9cd(0x1cd),'description':'Reasoning\x20model','xp':0x3},{'id':a6_0xaee9cd(0x1d5),'name':a6_0xaee9cd(0x1c4),'description':'DeepSeek\x27s\x20latest\x20V3','xp':0x2},{'id':a6_0xaee9cd(0x1c1),'name':'DeepSeek\x20R1','description':'Advanced\x20reasoning','xp':0x3}];export const DEFAULT_MODEL=a6_0xaee9cd(0x1c9);function a6_0x2bf6(){const _0x5df7e8=['1414984ZoYKdN','135235FwDNOZ','3105290wNslUc','Coding\x20specialist','Alibaba\x27s\x20largest','Most\x20powerful\x20Gemini','5577tTIwfT','Gemini\x203.1\x20Pro','Nemotron\x20Nano\x2012B','Woozie','Meta\x27s\x20latest','deepseek/deepseek-r1','mistralai/devstral-small','Llama\x203.3\x2070B','DeepSeek\x20V3','20174424uVESpx','Xiaomi\x27s\x20fast\x20AI\x20model','Fast\x20and\x20capable\x20(Default)','422CmgkZB','gemini-2.5-flash','Qwen3\x20Coder','meta-llama/llama-3.3-70b-instruct:free','Gemini\x203\x20Pro','Kimi\x20K2','xiaomi/mimo-v2-flash:free','4429810EgyOgQ','https://woozlit.com','6152940OdufLt','Latest\x20Mistral','gemini-3-flash-preview','MiMo\x20V2','deepseek/deepseek-chat','Developer-focused','mistralai/mistral-small-3.2-24b-instruct','moonshotai/kimi-k2','qwen/qwen3-235b-a22b:free'];a6_0x2bf6=function(){return _0x5df7e8;};return a6_0x2bf6();}