woozlit 2.0.1 → 2.0.3

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 (52) hide show
  1. package/README.md +4 -1
  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/voice-agent.js +1 -1
  26. package/dist/telegram/bot.js +1 -1
  27. package/dist/telegram/config.js +1 -1
  28. package/dist/telegram/index.js +1 -1
  29. package/dist/telegram/reminders.d.ts +2 -2
  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.js +1 -1
  34. package/dist/tools/index.js +1 -1
  35. package/dist/tools/mcp.js +1 -1
  36. package/dist/tools/rollback.js +1 -1
  37. package/dist/tools/rules.js +1 -1
  38. package/dist/twilio/config.js +1 -1
  39. package/dist/twilio/index.js +1 -1
  40. package/dist/twilio/server.js +1 -1
  41. package/dist/twilio/setup.js +1 -1
  42. package/dist/ui/output.js +1 -1
  43. package/dist/ui/select.js +1 -1
  44. package/dist/ui/themes.js +1 -1
  45. package/dist/utils/api.js +1 -1
  46. package/dist/utils/history.js +1 -1
  47. package/dist/utils/mcp-installer.js +1 -1
  48. package/dist/utils/platform.js +1 -1
  49. package/dist/utils/storage.js +1 -1
  50. package/dist/utils/update-check.js +1 -1
  51. package/dist/verify_repro.js +1 -1
  52. package/package.json +11 -12
package/README.md CHANGED
@@ -65,7 +65,10 @@ Inside a chat session, you can use:
65
65
  **Manage MCP Servers:**
66
66
 
67
67
  ```bash
68
- # Install specific tools (e.g. Chrome Control)
68
+ # Install specific tools (e.g. Browser Control)
69
+ woozlit mcp install browsermcp
70
+
71
+ # Install Chrome Bridge specifically
69
72
  woozlit mcp install mcp-chrome-bridge
70
73
 
71
74
  # Add standard MCP server (stdio)
@@ -1 +1 @@
1
- function a0_0xbc4b(){const _0x639e6=['displayName','1629fWzHVi','\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','339115jqwpLh','81790tJhYxV','get','30ZIPQyO','\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','searchParams','354993dTDaEx','pathname','http://localhost:','text/html','token','3066072grYRGW','email','959662jhggYW','end','12DDlLxv','825118mcYxus','/callback','userId','listen','writeHead','2955295XokLVZ','/auth/cli?callback=http://localhost:','close'];a0_0xbc4b=function(){return _0x639e6;};return a0_0xbc4b();}(function(_0xae9a2a,_0x3e0894){const _0x556b70=a0_0x16ed,_0x436ce0=_0xae9a2a();while(!![]){try{const _0x5e046a=-parseInt(_0x556b70(0x189))/0x1+-parseInt(_0x556b70(0x171))/0x2+parseInt(_0x556b70(0x182))/0x3*(parseInt(_0x556b70(0x18b))/0x4)+-parseInt(_0x556b70(0x176))/0x5+-parseInt(_0x556b70(0x17f))/0x6*(-parseInt(_0x556b70(0x17c))/0x7)+parseInt(_0x556b70(0x187))/0x8+parseInt(_0x556b70(0x17a))/0x9*(parseInt(_0x556b70(0x17d))/0xa);if(_0x5e046a===_0x3e0894)break;else _0x436ce0['push'](_0x436ce0['shift']());}catch(_0x433cc7){_0x436ce0['push'](_0x436ce0['shift']());}}}(a0_0xbc4b,0x797bc));import a0_0x202e17 from'open';function a0_0x16ed(_0x546042,_0x2cc4b1){_0x546042=_0x546042-0x171;const _0xbc4b46=a0_0xbc4b();let _0x16ed67=_0xbc4b46[_0x546042];return _0x16ed67;}import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x8baf54}from'../utils/storage.js';export async function login(){const _0x51acfa=getApiUrl(),_0x438f03=0x2694;return new Promise(_0x2d62bb=>{const _0x3d9b06=a0_0x16ed,_0x41c0e1=createServer(async(_0x46762e,_0x4abd5a)=>{const _0x44dbee=a0_0x16ed,_0x2c41e5=new URL(_0x46762e['url']||'',_0x44dbee(0x184)+_0x438f03);if(_0x2c41e5[_0x44dbee(0x183)]===_0x44dbee(0x172)){const _0x5ed441=_0x2c41e5['searchParams'][_0x44dbee(0x17e)](_0x44dbee(0x186)),_0x21b96e=_0x2c41e5[_0x44dbee(0x181)][_0x44dbee(0x17e)](_0x44dbee(0x173)),_0x3085e2=_0x2c41e5['searchParams'][_0x44dbee(0x17e)](_0x44dbee(0x188)),_0x3d1a81=_0x2c41e5['searchParams'][_0x44dbee(0x17e)](_0x44dbee(0x179));_0x5ed441&&_0x21b96e?(setToken(_0x5ed441),setUser(_0x21b96e,_0x3085e2||'',_0x3d1a81||''),_0x4abd5a[_0x44dbee(0x175)](0xc8,{'Content-Type':_0x44dbee(0x185)}),_0x4abd5a[_0x44dbee(0x18a)](_0x44dbee(0x17b)),_0x41c0e1[_0x44dbee(0x178)](),_0x2d62bb(!![])):(_0x4abd5a[_0x44dbee(0x175)](0x190,{'Content-Type':_0x44dbee(0x185)}),_0x4abd5a[_0x44dbee(0x18a)](_0x44dbee(0x180)),_0x41c0e1['close'](),_0x2d62bb(![]));}});_0x41c0e1[_0x3d9b06(0x174)](_0x438f03,()=>{const _0x14d9d9=_0x3d9b06,_0x204e89=_0x51acfa+_0x14d9d9(0x177)+_0x438f03+'/callback';a0_0x202e17(_0x204e89);}),setTimeout(()=>{const _0x529643=_0x3d9b06;_0x41c0e1[_0x529643(0x178)](),_0x2d62bb(![]);},0x1d4c0);});}export function logout(){a0_0x8baf54();}export{isLoggedIn};
1
+ (function(_0x2b1cb6,_0x584f91){const _0x597cea=a0_0x3bb3,_0x51dc4e=_0x2b1cb6();while(!![]){try{const _0x7ba335=-parseInt(_0x597cea(0x8b))/0x1*(-parseInt(_0x597cea(0x94))/0x2)+-parseInt(_0x597cea(0x99))/0x3+parseInt(_0x597cea(0x98))/0x4+-parseInt(_0x597cea(0x85))/0x5*(-parseInt(_0x597cea(0x9a))/0x6)+parseInt(_0x597cea(0x90))/0x7*(parseInt(_0x597cea(0x8a))/0x8)+parseInt(_0x597cea(0x8f))/0x9*(-parseInt(_0x597cea(0x8c))/0xa)+parseInt(_0x597cea(0x95))/0xb*(-parseInt(_0x597cea(0x93))/0xc);if(_0x7ba335===_0x584f91)break;else _0x51dc4e['push'](_0x51dc4e['shift']());}catch(_0x1543f9){_0x51dc4e['push'](_0x51dc4e['shift']());}}}(a0_0xdb9b,0x30223));import a0_0x2b3149 from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x2d1d2f}from'../utils/storage.js';function a0_0x3bb3(_0x31c505,_0x420eae){_0x31c505=_0x31c505-0x84;const _0xdb9ba9=a0_0xdb9b();let _0x3bb3ee=_0xdb9ba9[_0x31c505];return _0x3bb3ee;}export async function login(){const _0x5a4391=getApiUrl(),_0x265523=0x2694;return new Promise(_0x587bc0=>{const _0x391295=a0_0x3bb3,_0x4987e6=createServer(async(_0x558829,_0x589a54)=>{const _0xb74b77=a0_0x3bb3,_0x9380d2=new URL(_0x558829[_0xb74b77(0x9b)]||'','http://localhost:'+_0x265523);if(_0x9380d2['pathname']===_0xb74b77(0x87)){const _0xf44cea=_0x9380d2[_0xb74b77(0x96)]['get'](_0xb74b77(0x88)),_0x40731f=_0x9380d2[_0xb74b77(0x96)][_0xb74b77(0x8d)](_0xb74b77(0x97)),_0x23806c=_0x9380d2[_0xb74b77(0x96)][_0xb74b77(0x8d)](_0xb74b77(0x92)),_0x45ade8=_0x9380d2['searchParams'][_0xb74b77(0x8d)](_0xb74b77(0x8e));_0xf44cea&&_0x40731f?(setToken(_0xf44cea),setUser(_0x40731f,_0x23806c||'',_0x45ade8||''),_0x589a54[_0xb74b77(0x9c)](0xc8,{'Content-Type':_0xb74b77(0x89)}),_0x589a54['end']('\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'),_0x4987e6['close'](),_0x587bc0(!![])):(_0x589a54[_0xb74b77(0x9c)](0x190,{'Content-Type':'text/html'}),_0x589a54['end'](_0xb74b77(0x86)),_0x4987e6[_0xb74b77(0x84)](),_0x587bc0(![]));}});_0x4987e6[_0x391295(0x91)](_0x265523,()=>{const _0x34d9f9=_0x5a4391+'/auth/cli?callback=http://localhost:'+_0x265523+'/callback';a0_0x2b3149(_0x34d9f9);}),setTimeout(()=>{const _0x35930a=_0x391295;_0x4987e6[_0x35930a(0x84)](),_0x587bc0(![]);},0x1d4c0);});}function a0_0xdb9b(){const _0x43c804=['4476AwIUYh','1454DDcpQX','2013lYDXod','searchParams','userId','1548400PWAoDH','969087BngLgW','54HPmnXp','url','writeHead','close','91985DpdHUC','\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','/callback','token','text/html','262360pGKbSB','289qiapoh','3310tQsqff','get','displayName','8307KolYDq','28iVrKgR','listen','email'];a0_0xdb9b=function(){return _0x43c804;};return a0_0xdb9b();}export function logout(){a0_0x2d1d2f();}export{isLoggedIn};
@@ -1 +1 @@
1
- const a1_0x202ab3=a1_0x29f9;function a1_0x271b(){const _0xe27bb2=['string','query','Tab\x20ID','CSS\x20selector\x20for\x20the\x20element','Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)','4672068UdbtTE','30640410HtdiSP','1780TMTTxU','number','6744oDRYBm','Direction\x20to\x20scroll','6RfWmfO','tabId','object','down','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','246452LUDgSQ','top','Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot','4908883uoaNCB','browser_fill','11674720pBxnBW','318840UmumlO','bottom','Fill\x20a\x20form\x20field\x20or\x20input\x20element','Scroll\x20the\x20page\x20up\x20or\x20down','Text\x20to\x20fill'];a1_0x271b=function(){return _0xe27bb2;};return a1_0x271b();}(function(_0x630b7e,_0x279c62){const _0x553d17=a1_0x29f9,_0xc7ecd=_0x630b7e();while(!![]){try{const _0xef0bbd=parseInt(_0x553d17(0xe4))/0x1*(-parseInt(_0x553d17(0xdf))/0x2)+-parseInt(_0x553d17(0xdd))/0x3*(-parseInt(_0x553d17(0xf6))/0x4)+parseInt(_0x553d17(0xea))/0x5+-parseInt(_0x553d17(0xf4))/0x6+-parseInt(_0x553d17(0xe7))/0x7+-parseInt(_0x553d17(0xe9))/0x8+parseInt(_0x553d17(0xf5))/0x9;if(_0xef0bbd===_0x279c62)break;else _0xc7ecd['push'](_0xc7ecd['shift']());}catch(_0x573925){_0xc7ecd['push'](_0xc7ecd['shift']());}}}(a1_0x271b,0xc0dd7));export*from'./server.js';export*from'./tools.js';export*from'./server.js';export*from'./tools.js';function a1_0x29f9(_0x3657b9,_0xe1ad4d){_0x3657b9=_0x3657b9-0xdd;const _0x271ba6=a1_0x271b();let _0x29f9a3=_0x271ba6[_0x3657b9];return _0x29f9a3;}export const tools=[{'name':a1_0x202ab3(0xe8),'description':a1_0x202ab3(0xec),'input_schema':{'type':a1_0x202ab3(0xe1),'properties':{'tabId':{'type':a1_0x202ab3(0xf7),'description':a1_0x202ab3(0xe6)},'query':{'type':a1_0x202ab3(0xef),'description':a1_0x202ab3(0xf2)},'text':{'type':a1_0x202ab3(0xef),'description':a1_0x202ab3(0xee)}},'required':['tabId',a1_0x202ab3(0xf0),'text']}},{'name':'browser_click','description':'Click\x20an\x20element\x20on\x20the\x20page','input_schema':{'type':a1_0x202ab3(0xe1),'properties':{'tabId':{'type':a1_0x202ab3(0xf7),'description':a1_0x202ab3(0xe3)},'query':{'type':a1_0x202ab3(0xef),'description':a1_0x202ab3(0xf2)},'index':{'type':'number','description':a1_0x202ab3(0xf3)}},'required':[a1_0x202ab3(0xe0),a1_0x202ab3(0xf0)]}},{'name':'browser_scroll','description':a1_0x202ab3(0xed),'input_schema':{'type':a1_0x202ab3(0xe1),'properties':{'tabId':{'type':a1_0x202ab3(0xf7),'description':a1_0x202ab3(0xf1)},'direction':{'type':a1_0x202ab3(0xef),'enum':['up',a1_0x202ab3(0xe2),a1_0x202ab3(0xe5),a1_0x202ab3(0xeb)],'description':a1_0x202ab3(0xde)},'amount':{'type':a1_0x202ab3(0xf7),'description':'Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)'}},'required':[a1_0x202ab3(0xe0),'direction']}}];
1
+ const a1_0x442e0c=a1_0x3c18;function a1_0x5a1e(){const _0x4984bb=['23612beWguF','Tab\x20ID','486mOgnas','browser_fill','2500486nwmDqF','browser_scroll','tabId','1LOQeGd','Scroll\x20the\x20page\x20up\x20or\x20down','Direction\x20to\x20scroll','number','string','query','browser_click','87765FMkHUL','1829988SDXDzX','CSS\x20selector\x20for\x20the\x20element','object','direction','Click\x20an\x20element\x20on\x20the\x20page','bottom','384AwczWh','29164940iduqOD','7041377jMmQNe','4509888mtjXTR','Fill\x20a\x20form\x20field\x20or\x20input\x20element','Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','down'];a1_0x5a1e=function(){return _0x4984bb;};return a1_0x5a1e();}function a1_0x3c18(_0x2e8bd3,_0xe13448){_0x2e8bd3=_0x2e8bd3-0x166;const _0x5a1e3f=a1_0x5a1e();let _0x3c18ba=_0x5a1e3f[_0x2e8bd3];return _0x3c18ba;}(function(_0x4fa7c2,_0x40b202){const _0xf243a9=a1_0x3c18,_0x14b2ba=_0x4fa7c2();while(!![]){try{const _0x12ebc7=parseInt(_0xf243a9(0x172))/0x1*(-parseInt(_0xf243a9(0x16f))/0x2)+-parseInt(_0xf243a9(0x180))/0x3*(-parseInt(_0xf243a9(0x16b))/0x4)+parseInt(_0xf243a9(0x179))/0x5*(-parseInt(_0xf243a9(0x16d))/0x6)+-parseInt(_0xf243a9(0x182))/0x7+parseInt(_0xf243a9(0x166))/0x8+parseInt(_0xf243a9(0x17a))/0x9+parseInt(_0xf243a9(0x181))/0xa;if(_0x12ebc7===_0x40b202)break;else _0x14b2ba['push'](_0x14b2ba['shift']());}catch(_0x489bcc){_0x14b2ba['push'](_0x14b2ba['shift']());}}}(a1_0x5a1e,0xb9d6f));export*from'./server.js';export*from'./tools.js';export*from'./server.js';export*from'./tools.js';export const tools=[{'name':a1_0x442e0c(0x16e),'description':a1_0x442e0c(0x167),'input_schema':{'type':a1_0x442e0c(0x17c),'properties':{'tabId':{'type':a1_0x442e0c(0x175),'description':a1_0x442e0c(0x168)},'query':{'type':a1_0x442e0c(0x176),'description':a1_0x442e0c(0x17b)},'text':{'type':a1_0x442e0c(0x176),'description':'Text\x20to\x20fill'}},'required':['tabId',a1_0x442e0c(0x177),'text']}},{'name':a1_0x442e0c(0x178),'description':a1_0x442e0c(0x17e),'input_schema':{'type':a1_0x442e0c(0x17c),'properties':{'tabId':{'type':'number','description':a1_0x442e0c(0x169)},'query':{'type':'string','description':'CSS\x20selector\x20for\x20the\x20element'},'index':{'type':a1_0x442e0c(0x175),'description':'Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)'}},'required':[a1_0x442e0c(0x171),a1_0x442e0c(0x177)]}},{'name':a1_0x442e0c(0x170),'description':a1_0x442e0c(0x173),'input_schema':{'type':a1_0x442e0c(0x17c),'properties':{'tabId':{'type':a1_0x442e0c(0x175),'description':a1_0x442e0c(0x16c)},'direction':{'type':'string','enum':['up',a1_0x442e0c(0x16a),'top',a1_0x442e0c(0x17f)],'description':a1_0x442e0c(0x174)},'amount':{'type':a1_0x442e0c(0x175),'description':'Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)'}},'required':[a1_0x442e0c(0x171),a1_0x442e0c(0x17d)]}}];
@@ -1 +1 @@
1
- (function(_0x3a703e,_0x3f2222){const _0x4feb21=a2_0x1750,_0x379af0=_0x3a703e();while(!![]){try{const _0x9d6c2e=parseInt(_0x4feb21(0x102))/0x1+parseInt(_0x4feb21(0x108))/0x2*(-parseInt(_0x4feb21(0x120))/0x3)+-parseInt(_0x4feb21(0x12c))/0x4+-parseInt(_0x4feb21(0x124))/0x5+parseInt(_0x4feb21(0x101))/0x6*(parseInt(_0x4feb21(0x109))/0x7)+parseInt(_0x4feb21(0x119))/0x8*(-parseInt(_0x4feb21(0x117))/0x9)+parseInt(_0x4feb21(0x115))/0xa;if(_0x9d6c2e===_0x3f2222)break;else _0x379af0['push'](_0x379af0['shift']());}catch(_0x21bd5a){_0x379af0['push'](_0x379af0['shift']());}}}(a2_0x28ea,0x9dd2e));import{WebSocketServer}from'ws';import*as a2_0x12f878 from'../ui/output.js';const sessions=new Map();let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x365b3a=0x2408){return new Promise(_0x4ebd14=>{const _0x51e602=a2_0x1750;if(isRunning&&server){a2_0x12f878[_0x51e602(0x11e)](_0x51e602(0x100)),_0x4ebd14(!![]);return;}try{server=new WebSocketServer({'port':_0x365b3a}),server['on']('listening',()=>{const _0x23d340=_0x51e602;isRunning=!![],a2_0x12f878[_0x23d340(0x114)](_0x23d340(0x12f)+_0x365b3a),a2_0x12f878[_0x23d340(0x10c)]('Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...'),_0x4ebd14(!![]);}),server['on'](_0x51e602(0xfc),async _0xed6546=>{const _0x141de4=_0x51e602;let _0x532c96=null;_0xed6546['on'](_0x141de4(0x11c),async _0x3e0a37=>{const _0x340a9b=_0x141de4;try{const _0x429b8e=JSON[_0x340a9b(0xf8)](_0x3e0a37[_0x340a9b(0x113)]());if(_0x429b8e[_0x340a9b(0x11d)]==='auth')_0x532c96={'ws':_0xed6546,'userId':_0x429b8e[_0x340a9b(0x10e)]?.[_0x340a9b(0x12e)]||_0x340a9b(0x125),'userEmail':_0x429b8e[_0x340a9b(0x10e)]?.[_0x340a9b(0xfe)]||_0x340a9b(0x125),'connectedAt':Date[_0x340a9b(0xf7)]()},sessions['set'](_0x532c96[_0x340a9b(0x106)],_0x532c96),_0xed6546[_0x340a9b(0x105)](JSON[_0x340a9b(0x128)]({'type':_0x340a9b(0x12d),'userId':_0x532c96['userId']}));else{if(_0x429b8e[_0x340a9b(0x11d)]===_0x340a9b(0x11a)){const _0x517fac=pendingRequests[_0x340a9b(0x118)](_0x429b8e[_0x340a9b(0x112)]);_0x517fac&&(clearTimeout(_0x517fac[_0x340a9b(0x131)]),pendingRequests[_0x340a9b(0x107)](_0x429b8e['requestId']),_0x429b8e['result'][_0x340a9b(0x114)]?_0x517fac[_0x340a9b(0x10f)](_0x429b8e['result'][_0x340a9b(0x10b)]):_0x517fac[_0x340a9b(0x123)](new Error(_0x429b8e[_0x340a9b(0xfb)][_0x340a9b(0x121)]||'Command\x20failed')));}}}catch(_0x3e3d67){console[_0x340a9b(0x121)](_0x340a9b(0x126),_0x3e3d67);}}),_0xed6546['on'](_0x141de4(0x10a),()=>{const _0x13c02e=_0x141de4;_0x532c96&&sessions[_0x13c02e(0x107)](_0x532c96[_0x13c02e(0x106)]);}),_0xed6546['on'](_0x141de4(0x121),_0x26d1f7=>{const _0x222a4f=_0x141de4;console[_0x222a4f(0x121)](_0x222a4f(0x116),_0x26d1f7);});}),server['on'](_0x51e602(0x121),_0x365d04=>{const _0x415422=_0x51e602;_0x365d04[_0x415422(0x11f)]!==_0x415422(0x10d)&&a2_0x12f878[_0x415422(0x121)](_0x415422(0x12a)+_0x365d04['message']),_0x4ebd14(![]);});}catch(_0x3f40bd){_0x3f40bd[_0x51e602(0x11f)]!==_0x51e602(0x10d)&&a2_0x12f878[_0x51e602(0x121)](_0x51e602(0x111)+_0x3f40bd[_0x51e602(0x11c)]),_0x4ebd14(![]);}});}function a2_0x1750(_0x4fcf01,_0x4e4266){_0x4fcf01=_0x4fcf01-0xf7;const _0x28ead3=a2_0x28ea();let _0x17509a=_0x28ead3[_0x4fcf01];return _0x17509a;}export function stopBrowserServer(){const _0xd571e0=a2_0x1750;server&&(sessions[_0xd571e0(0xfa)](),pendingRequests[_0xd571e0(0x127)](({timeout:_0xe7e708,reject:_0x186b62})=>{const _0x4ed26e=_0xd571e0;clearTimeout(_0xe7e708),_0x186b62(new Error(_0x4ed26e(0x130)));}),pendingRequests['clear'](),server['close'](),server=null,isRunning=![],a2_0x12f878[_0xd571e0(0xfd)](_0xd571e0(0xf9)));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x44e919,_0x24de30={},_0x18716d=0x7530){const _0x2c29c6=a2_0x1750;if(!isRunning)throw new Error(_0x2c29c6(0xff));const _0x8e2b24=Array[_0x2c29c6(0x12b)](sessions[_0x2c29c6(0x103)]())[0x0];if(!_0x8e2b24)throw new Error('No\x20browser\x20extension\x20connected');const _0x2ffd02=generateRequestId();return new Promise((_0x1db2d5,_0x803081)=>{const _0x26f3c3=_0x2c29c6,_0x40f95c=setTimeout(()=>{const _0x44a830=a2_0x1750;pendingRequests[_0x44a830(0x107)](_0x2ffd02),_0x803081(new Error(_0x44a830(0x104)+_0x18716d+'ms'));},_0x18716d);pendingRequests[_0x26f3c3(0x129)](_0x2ffd02,{'resolve':_0x1db2d5,'reject':_0x803081,'timeout':_0x40f95c});const _0x4d34ec={'requestId':_0x2ffd02,'command':_0x44e919,'args':_0x24de30};_0x8e2b24['ws'][_0x26f3c3(0x105)](JSON[_0x26f3c3(0x128)](_0x4d34ec));});}function generateRequestId(){const _0x47e8f5=a2_0x1750;return _0x47e8f5(0x11b)+Date[_0x47e8f5(0xf7)]()+'_'+Math[_0x47e8f5(0x122)]()['toString'](0x24)[_0x47e8f5(0x110)](0x2,0x9);}function a2_0x28ea(){const _0x5e0333=['error','random','reject','3123275XxZoOg','unknown','Error\x20processing\x20message:','forEach','stringify','set','Browser\x20server\x20error:\x20','from','4543720tJBoTF','auth_success','uid','Browser\x20server\x20started\x20on\x20ws://localhost:','Server\x20stopped','timeout','now','parse','Browser\x20server\x20stopped','clear','result','connection','info','email','Browser\x20server\x20not\x20running','Browser\x20server\x20already\x20running','54KokOJR','562374BrNzlU','values','Command\x20timeout\x20after\x20','send','userId','delete','130122FGwXHM','420049yTxIbQ','close','data','dim','EADDRINUSE','user','resolve','substr','Failed\x20to\x20start\x20browser\x20server:\x20','requestId','toString','success','21269910SNjaEx','WebSocket\x20error:','16272eDzVUi','get','1048PzEZGg','response','req_','message','type','warn','code','27JPsjaj'];a2_0x28ea=function(){return _0x5e0333;};return a2_0x28ea();}export function getConnectedSessions(){const _0xd14e7f=a2_0x1750;return Array[_0xd14e7f(0x12b)](sessions['values']());}
1
+ (function(_0x57c0d9,_0x210275){const _0x3286a0=a2_0x3141,_0x354ea4=_0x57c0d9();while(!![]){try{const _0x198964=-parseInt(_0x3286a0(0x1a6))/0x1*(parseInt(_0x3286a0(0x1cc))/0x2)+parseInt(_0x3286a0(0x1b8))/0x3+-parseInt(_0x3286a0(0x1b5))/0x4+-parseInt(_0x3286a0(0x198))/0x5*(-parseInt(_0x3286a0(0x195))/0x6)+parseInt(_0x3286a0(0x1b7))/0x7*(-parseInt(_0x3286a0(0x1c8))/0x8)+parseInt(_0x3286a0(0x1c9))/0x9*(-parseInt(_0x3286a0(0x1c2))/0xa)+parseInt(_0x3286a0(0x196))/0xb;if(_0x198964===_0x210275)break;else _0x354ea4['push'](_0x354ea4['shift']());}catch(_0x4840a1){_0x354ea4['push'](_0x354ea4['shift']());}}}(a2_0x4ac5,0x8c752));import{WebSocketServer}from'ws';import*as a2_0x7c551 from'../ui/output.js';function a2_0x3141(_0x13201e,_0x198700){_0x13201e=_0x13201e-0x195;const _0x4ac5f0=a2_0x4ac5();let _0x314153=_0x4ac5f0[_0x13201e];return _0x314153;}const sessions=new Map();function a2_0x4ac5(){const _0x575c40=['delete','success','data','from','resolve','email','connection','dim','error','substr','listening','Error\x20processing\x20message:','info','Browser\x20server\x20not\x20running','4582948LczJph','values','14SVNYSx','2393085EhyXWE','auth','forEach','auth_success','random','get','send','clear','set','Browser\x20server\x20started\x20on\x20ws://localhost:','10DqdzXQ','parse','code','type','uid','unknown','1571664vVPXDd','2281770bYDHTd','Failed\x20to\x20start\x20browser\x20server:\x20','Command\x20failed','2yDvrJm','2166ZtixOH','17702465YbgaVB','userId','8170mGGLsd','Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...','user','toString','Command\x20timeout\x20after\x20','requestId','message','req_','EADDRINUSE','close','WebSocket\x20error:','No\x20browser\x20extension\x20connected','Browser\x20server\x20stopped','result','629387oXwxxs'];a2_0x4ac5=function(){return _0x575c40;};return a2_0x4ac5();}let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x554340=0x2408){return new Promise(_0x407d28=>{const _0x41c66d=a2_0x3141;if(isRunning&&server){a2_0x7c551['warn']('Browser\x20server\x20already\x20running'),_0x407d28(!![]);return;}try{server=new WebSocketServer({'port':_0x554340}),server['on'](_0x41c66d(0x1b1),()=>{const _0x50ab4f=_0x41c66d;isRunning=!![],a2_0x7c551[_0x50ab4f(0x1a8)](_0x50ab4f(0x1c1)+_0x554340),a2_0x7c551[_0x50ab4f(0x1ae)](_0x50ab4f(0x199)),_0x407d28(!![]);}),server['on'](_0x41c66d(0x1ad),async _0x35a953=>{const _0x48440e=_0x41c66d;let _0xf027d7=null;_0x35a953['on'](_0x48440e(0x19e),async _0x5005f0=>{const _0x5b2d45=_0x48440e;try{const _0x1d6688=JSON[_0x5b2d45(0x1c3)](_0x5005f0[_0x5b2d45(0x19b)]());if(_0x1d6688[_0x5b2d45(0x1c5)]===_0x5b2d45(0x1b9))_0xf027d7={'ws':_0x35a953,'userId':_0x1d6688[_0x5b2d45(0x19a)]?.[_0x5b2d45(0x1c6)]||_0x5b2d45(0x1c7),'userEmail':_0x1d6688[_0x5b2d45(0x19a)]?.[_0x5b2d45(0x1ac)]||'unknown','connectedAt':Date['now']()},sessions[_0x5b2d45(0x1c0)](_0xf027d7['userId'],_0xf027d7),_0x35a953['send'](JSON['stringify']({'type':_0x5b2d45(0x1bb),'userId':_0xf027d7[_0x5b2d45(0x197)]}));else{if(_0x1d6688['type']==='response'){const _0x142097=pendingRequests[_0x5b2d45(0x1bd)](_0x1d6688[_0x5b2d45(0x19d)]);_0x142097&&(clearTimeout(_0x142097['timeout']),pendingRequests['delete'](_0x1d6688[_0x5b2d45(0x19d)]),_0x1d6688[_0x5b2d45(0x1a5)][_0x5b2d45(0x1a8)]?_0x142097[_0x5b2d45(0x1ab)](_0x1d6688[_0x5b2d45(0x1a5)][_0x5b2d45(0x1a9)]):_0x142097['reject'](new Error(_0x1d6688['result']['error']||_0x5b2d45(0x1cb))));}}}catch(_0x29b501){console[_0x5b2d45(0x1af)](_0x5b2d45(0x1b2),_0x29b501);}}),_0x35a953['on'](_0x48440e(0x1a1),()=>{const _0x241878=_0x48440e;_0xf027d7&&sessions[_0x241878(0x1a7)](_0xf027d7['userId']);}),_0x35a953['on']('error',_0x5b0179=>{const _0x221650=_0x48440e;console[_0x221650(0x1af)](_0x221650(0x1a2),_0x5b0179);});}),server['on'](_0x41c66d(0x1af),_0x4e57c7=>{const _0x4b250c=_0x41c66d;_0x4e57c7['code']!==_0x4b250c(0x1a0)&&a2_0x7c551['error']('Browser\x20server\x20error:\x20'+_0x4e57c7[_0x4b250c(0x19e)]),_0x407d28(![]);});}catch(_0x39dec2){_0x39dec2[_0x41c66d(0x1c4)]!==_0x41c66d(0x1a0)&&a2_0x7c551[_0x41c66d(0x1af)](_0x41c66d(0x1ca)+_0x39dec2[_0x41c66d(0x19e)]),_0x407d28(![]);}});}export function stopBrowserServer(){const _0x495261=a2_0x3141;server&&(sessions[_0x495261(0x1bf)](),pendingRequests[_0x495261(0x1ba)](({timeout:_0x39af1c,reject:_0x22a119})=>{clearTimeout(_0x39af1c),_0x22a119(new Error('Server\x20stopped'));}),pendingRequests[_0x495261(0x1bf)](),server[_0x495261(0x1a1)](),server=null,isRunning=![],a2_0x7c551[_0x495261(0x1b3)](_0x495261(0x1a4)));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x5b698f,_0x14f664={},_0x153277=0x7530){const _0x1f90c8=a2_0x3141;if(!isRunning)throw new Error(_0x1f90c8(0x1b4));const _0x5ce54a=Array['from'](sessions['values']())[0x0];if(!_0x5ce54a)throw new Error(_0x1f90c8(0x1a3));const _0xb7ec1d=generateRequestId();return new Promise((_0x58a47d,_0x46f2d5)=>{const _0x120ce3=_0x1f90c8,_0x507062=setTimeout(()=>{const _0x1b373a=a2_0x3141;pendingRequests[_0x1b373a(0x1a7)](_0xb7ec1d),_0x46f2d5(new Error(_0x1b373a(0x19c)+_0x153277+'ms'));},_0x153277);pendingRequests[_0x120ce3(0x1c0)](_0xb7ec1d,{'resolve':_0x58a47d,'reject':_0x46f2d5,'timeout':_0x507062});const _0x190dcd={'requestId':_0xb7ec1d,'command':_0x5b698f,'args':_0x14f664};_0x5ce54a['ws'][_0x120ce3(0x1be)](JSON['stringify'](_0x190dcd));});}function generateRequestId(){const _0x1df88b=a2_0x3141;return _0x1df88b(0x19f)+Date['now']()+'_'+Math[_0x1df88b(0x1bc)]()[_0x1df88b(0x19b)](0x24)[_0x1df88b(0x1b0)](0x2,0x9);}export function getConnectedSessions(){const _0x579100=a2_0x3141;return Array[_0x579100(0x1aa)](sessions[_0x579100(0x1b6)]());}
@@ -1 +1 @@
1
- (function(_0x4c107f,_0x247447){const _0x84cc6e=a3_0x5c2e,_0x2ca37e=_0x4c107f();while(!![]){try{const _0x534221=-parseInt(_0x84cc6e(0x88))/0x1*(-parseInt(_0x84cc6e(0x89))/0x2)+-parseInt(_0x84cc6e(0x8c))/0x3+-parseInt(_0x84cc6e(0x7d))/0x4*(parseInt(_0x84cc6e(0x7a))/0x5)+parseInt(_0x84cc6e(0x81))/0x6*(parseInt(_0x84cc6e(0x84))/0x7)+parseInt(_0x84cc6e(0x7c))/0x8+parseInt(_0x84cc6e(0x7b))/0x9+-parseInt(_0x84cc6e(0x86))/0xa;if(_0x534221===_0x247447)break;else _0x2ca37e['push'](_0x2ca37e['shift']());}catch(_0x1e4ae4){_0x2ca37e['push'](_0x2ca37e['shift']());}}}(a3_0x3d7c,0x55778));import{sendBrowserCommand,getConnectedSessions}from'./server.js';import a3_0xa53a43 from'open';export async function browserOpen(_0xa5884d){const _0x28d4c6=a3_0x5c2e,_0x209653=getConnectedSessions();if(_0x209653['length']===0x0)return await a3_0xa53a43(_0xa5884d),{'success':!![],'message':_0x28d4c6(0x87)};try{return await sendBrowserCommand(_0x28d4c6(0x8b),{'url':_0xa5884d});}catch(_0x582441){return await a3_0xa53a43(_0xa5884d),{'success':!![],'message':_0x28d4c6(0x87)};}}export async function browserClick(_0x4ea65d){const _0x1d67d0=a3_0x5c2e;return await sendBrowserCommand(_0x1d67d0(0x7e),{'selector':_0x4ea65d});}export async function browserFill(_0x41760d,_0x7e78a3){return await sendBrowserCommand('fill',{'selector':_0x41760d,'value':_0x7e78a3});}export async function browserSnapshot(){const _0x19bf72=a3_0x5c2e;return await sendBrowserCommand(_0x19bf72(0x8a));}function a3_0x5c2e(_0xac5c8f,_0x1448f7){_0xac5c8f=_0xac5c8f-0x79;const _0x3d7c17=a3_0x3d7c();let _0x5c2e8d=_0x3d7c17[_0xac5c8f];return _0x5c2e8d;}export async function browserScreenshot(){const _0x129dc3=a3_0x5c2e;return await sendBrowserCommand(_0x129dc3(0x79));}export async function browserGetText(_0x1c54ab){const _0x5cde4f=a3_0x5c2e;return await sendBrowserCommand(_0x5cde4f(0x8e),{'selector':_0x1c54ab});}export async function browserGetHtml(_0x56df13){return await sendBrowserCommand('get_html',{'selector':_0x56df13});}export async function browserWait(_0xcd4bff){const _0x2bb624=a3_0x5c2e;return typeof _0xcd4bff===_0x2bb624(0x82)?await sendBrowserCommand(_0x2bb624(0x80),{'ms':_0xcd4bff}):await sendBrowserCommand('wait',{'selector':_0xcd4bff});}function a3_0x3d7c(){const _0x16ab90=['1866771sZRLfC','back','get_text','screenshot','414365Nvzzdj','2028258AGveIZ','4694088gezepX','32MWfGGz','click','close','wait','66ZTTILk','number','forward','217119WzutDh','scroll','249900bbtrNM','Opened\x20in\x20system\x20browser','1vDSuCv','1013986JTXIXb','snapshot','open'];a3_0x3d7c=function(){return _0x16ab90;};return a3_0x3d7c();}export async function browserBack(){const _0x5c5570=a3_0x5c2e;return await sendBrowserCommand(_0x5c5570(0x8d));}export async function browserForward(){const _0x2aa1a3=a3_0x5c2e;return await sendBrowserCommand(_0x2aa1a3(0x83));}export async function browserReload(){return await sendBrowserCommand('reload');}export async function browserScroll(_0x20e013,_0x33679f){const _0x5610b4=a3_0x5c2e;return await sendBrowserCommand(_0x5610b4(0x85),{'direction':_0x20e013,'amount':_0x33679f});}export async function browserClose(){const _0x5c8d8e=a3_0x5c2e;return await sendBrowserCommand(_0x5c8d8e(0x7f));}
1
+ (function(_0x16bcbc,_0x32f96b){const _0x77311d=a3_0x27e9,_0x3f6147=_0x16bcbc();while(!![]){try{const _0x32dc75=parseInt(_0x77311d(0x18b))/0x1*(-parseInt(_0x77311d(0x18f))/0x2)+-parseInt(_0x77311d(0x183))/0x3*(-parseInt(_0x77311d(0x18c))/0x4)+parseInt(_0x77311d(0x189))/0x5*(parseInt(_0x77311d(0x191))/0x6)+-parseInt(_0x77311d(0x18a))/0x7*(-parseInt(_0x77311d(0x18d))/0x8)+parseInt(_0x77311d(0x194))/0x9+-parseInt(_0x77311d(0x18e))/0xa+-parseInt(_0x77311d(0x187))/0xb;if(_0x32dc75===_0x32f96b)break;else _0x3f6147['push'](_0x3f6147['shift']());}catch(_0x87e3f1){_0x3f6147['push'](_0x3f6147['shift']());}}}(a3_0x4b9b,0x96711));import{sendBrowserCommand,getConnectedSessions}from'./server.js';import a3_0x1a6fe3 from'open';export async function browserOpen(_0x4690b3){const _0x50e773=a3_0x27e9,_0x41c583=getConnectedSessions();if(_0x41c583[_0x50e773(0x188)]===0x0)return await a3_0x1a6fe3(_0x4690b3),{'success':!![],'message':'Opened\x20in\x20system\x20browser'};try{return await sendBrowserCommand(_0x50e773(0x181),{'url':_0x4690b3});}catch(_0x57b3f7){return await a3_0x1a6fe3(_0x4690b3),{'success':!![],'message':_0x50e773(0x195)};}}export async function browserClick(_0x7e55a){return await sendBrowserCommand('click',{'selector':_0x7e55a});}function a3_0x27e9(_0xaf6a19,_0x5b6b80){_0xaf6a19=_0xaf6a19-0x181;const _0x4b9bae=a3_0x4b9b();let _0x27e915=_0x4b9bae[_0xaf6a19];return _0x27e915;}export async function browserFill(_0x1d1b87,_0x5ded56){const _0x579705=a3_0x27e9;return await sendBrowserCommand(_0x579705(0x190),{'selector':_0x1d1b87,'value':_0x5ded56});}export async function browserSnapshot(){const _0x14da2f=a3_0x27e9;return await sendBrowserCommand(_0x14da2f(0x186));}export async function browserScreenshot(){return await sendBrowserCommand('screenshot');}export async function browserGetText(_0x226eff){const _0x589e74=a3_0x27e9;return await sendBrowserCommand(_0x589e74(0x185),{'selector':_0x226eff});}function a3_0x4b9b(){const _0xde9378=['wait','open','close','3mgJqnH','back','get_text','snapshot','17064113kdCaVv','length','120KWEASP','321888sHszZl','1NRZhfG','2593704JeoNfd','152gzaDoc','3737650eiNyNy','1059026TnKolx','fill','248964neJdLa','forward','scroll','4975128SsdpWy','Opened\x20in\x20system\x20browser','get_html'];a3_0x4b9b=function(){return _0xde9378;};return a3_0x4b9b();}export async function browserGetHtml(_0x385697){const _0xf3a891=a3_0x27e9;return await sendBrowserCommand(_0xf3a891(0x196),{'selector':_0x385697});}export async function browserWait(_0x5f066b){const _0x1f235b=a3_0x27e9;return typeof _0x5f066b==='number'?await sendBrowserCommand(_0x1f235b(0x197),{'ms':_0x5f066b}):await sendBrowserCommand(_0x1f235b(0x197),{'selector':_0x5f066b});}export async function browserBack(){const _0x357639=a3_0x27e9;return await sendBrowserCommand(_0x357639(0x184));}export async function browserForward(){const _0x581502=a3_0x27e9;return await sendBrowserCommand(_0x581502(0x192));}export async function browserReload(){return await sendBrowserCommand('reload');}export async function browserScroll(_0x532ad9,_0x391000){const _0x3100e3=a3_0x27e9;return await sendBrowserCommand(_0x3100e3(0x193),{'direction':_0x532ad9,'amount':_0x391000});}export async function browserClose(){const _0x3d144f=a3_0x27e9;return await sendBrowserCommand(_0x3d144f(0x182));}
@@ -1 +1 @@
1
- const a4_0x6c46c5=a4_0x1684;(function(_0x4f8a0b,_0x2a424a){const _0x4933d5=a4_0x1684,_0x84dcfb=_0x4f8a0b();while(!![]){try{const _0x223a10=-parseInt(_0x4933d5(0x18d))/0x1+-parseInt(_0x4933d5(0x1b8))/0x2*(parseInt(_0x4933d5(0x1a7))/0x3)+parseInt(_0x4933d5(0x166))/0x4+-parseInt(_0x4933d5(0x214))/0x5*(parseInt(_0x4933d5(0x187))/0x6)+-parseInt(_0x4933d5(0x170))/0x7*(-parseInt(_0x4933d5(0x218))/0x8)+parseInt(_0x4933d5(0x168))/0x9*(parseInt(_0x4933d5(0x1ce))/0xa)+-parseInt(_0x4933d5(0x1f9))/0xb*(-parseInt(_0x4933d5(0x1ca))/0xc);if(_0x223a10===_0x2a424a)break;else _0x84dcfb['push'](_0x84dcfb['shift']());}catch(_0x47a982){_0x84dcfb['push'](_0x84dcfb['shift']());}}}(a4_0x2917,0xbccd7));import{input}from'@inquirer/prompts';import a4_0x2556bd from'chalk';import{sendChatMessage,getUserUsage}from'../utils/api.js';import{getSelectedModel,getUser}from'../utils/storage.js';function a4_0x1684(_0x46103e,_0x497d4c){_0x46103e=_0x46103e-0x154;const _0x2917b6=a4_0x2917();let _0x168472=_0x2917b6[_0x46103e];return _0x168472;}import{formatRulesForSystem}from'../tools/rules.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';function a4_0x2917(){const _0x5149ed=['../tools/rollback.js','browser_close','Failed\x20to\x20fetch\x20usage\x20data.','join','../ui/themes.js','exitCode','status','):\x20','Fill','../tools/file.js','stringify','\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status','```','774uYfUSs','It\x20will\x20start\x20automatically\x20when\x20needed','/model','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','then','Find','1391816RgUVxE','url','split','parse','name','<execute_tool>','args','Unknown','CloseBrowser','Bot\x20token\x20saved!','push','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','Tool\x20error\x20occurred:\x20','List','@inquirer/prompts','Bot\x20token:','loggedInBox','1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather','Let\x20me','No\x20MCP\x20tools\x20connected.','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.\x0a\x0aAVAILABLE\x20TOOLS:\x0a-\x20File\x20system:\x20create_file,\x20read_file,\x20edit_file,\x20list_directory,\x20search_file,\x20find_files,\x20search_directory\x0a-\x20GitHub:\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20Terminal:\x20run_command\x0a-\x20Browser:\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_snapshot,\x20browser_screenshot,\x20browser_get_text,\x20browser_close\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','header','search','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','Telegram\x20bot\x20stopped.','values','93nNJUWB','User\x20aborted.','aborted','length','write','Telegram\x20bot\x20is\x20running','setBotToken','Configured:\x20','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram','stop','/stats','actionSpinner','forEach','Running','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','path','.\x20Please\x20fix\x20this\x20and\x20continue.','79280hieROF','3.\x20Copy\x20the\x20bot\x20token','Fetching\x20usage...','search_directory','owner','\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot','userEmail','message','###','tokensUsed','Tool\x20result\x20for\x20','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','/telegram','isRateLimit','toFixed','API\x20error:\x20','start','bold','378516oKbZdh','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','Read','browser_open','30Ineokj','\x20lines\x20(','branchName','Updated\x20successfully\x20(','toolSuccess','/usage','create_file','/mcp','\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','Search','/theme','</execute_tool>','../github/api.js','find_files','abort','-\x20Running','/exit','Browser\x20server\x20is\x20not\x20running','isSpinning','dim','I\x27ve','browser_fill','Completed\x20with\x20','stderr','stdout','aiMessageEnd','pattern','read_file','startsWith','```tool','selector','size','setSecurityPin','MCP\x20Tool\x20error:\x20','Unknown\x20tool:\x20','Current\x20model:\x20','Browser\x20server\x20is\x20running','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','removeListener','signal','Error:\x20','includes','../browser/index.js','165FJkulq','Telegram\x20Commands','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','run_command','must\x20greet','/rollback','Done\x20in\x20','replace','object','/help','Telegram\x20bot\x20is\x20not\x20running','/clear','cwd','isOverLimit','\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration','aiMessage','serverName','success','description','\x0aYou\x20are\x20running\x20on\x20','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','Commands','AbortError','trim','Snapshot','\x20\x20-\x20','base','20290zCbvMG','email','Thinking...','list_directory','251432ZTXdSd','slice','warn','exit','properties','resetIn','assistant','monthlyLimit','keys','browser_get_text','\x20[Aborted]','github_read_file','Unknown\x20tool','Click','match','now','I\x20am','mcpConnected','Telegram\x20Bot\x20Setup','Yes','edit_file','.\x20Use\x20','error','content','\x0aAborting...','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','fromBranch','/github','getTheme','...','string','usageBox','\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot','SIGINT','Now,','info','\x22args\x22:','Error','../utils/storage.js','\x0a>\x20','handleGitHubCommand','5250824TQaYvE','repo','3660543zqEwWP','Reached\x20maximum\x20iterations','createSpinner','/quit','Unexpected\x20error:\x20','\x20lines\x20of\x20output\x20(','Goodbye!','../telegram/index.js','203TqAmya','user','rateLimitWarning','Connected\x20browsers:\x20','value','find','isConfigured','currentDir','search_file','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token'];a4_0x2917=function(){return _0x5149ed;};return a4_0x2917();}import*as a4_0x327534 from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x47f4ec from'../github/index.js';const SYSTEM_PROMPT=a4_0x6c46c5(0x1a1);export async function startChat(_0x3d2c1b){const _0x4e9afb=a4_0x6c46c5,{startBrowserServer:_0x363cf9}=await import(_0x4e9afb(0x1f8));_0x363cf9()['catch'](()=>{});const _0x561c8c=getSelectedModel();await connectToMcpServers();const _0x518b3c=await getMcpTools(),_0x363e83=new Set(_0x518b3c['map'](_0x2033bd=>_0x2033bd[_0x4e9afb(0x209)]));_0x363e83[_0x4e9afb(0x1ed)]>0x0&&a4_0x327534[_0x4e9afb(0x229)](_0x363e83[_0x4e9afb(0x1ed)],_0x518b3c[_0x4e9afb(0x1aa)]);process['on'](_0x4e9afb(0x21b),()=>closeMcpClients());const _0x2692dc=formatRulesForSystem(),_0x4ba271=getPlatformInfo(),_0x18d3d2=getShellPrefix(),_0x150b3c=_0x518b3c[_0x4e9afb(0x1aa)]>0x0?'\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a'+_0x518b3c['map'](_0x51af86=>{const _0x4ab682=_0x4e9afb,_0x5d8673=Object[_0x4ab682(0x220)](_0x51af86['inputSchema']?.[_0x4ab682(0x21c)]||{})['join'](',\x20');return'-\x20'+_0x51af86['name']+'('+_0x5d8673+_0x4ab682(0x181)+_0x51af86[_0x4ab682(0x20b)];})[_0x4e9afb(0x17d)]('\x0a'):'',_0x292a4d=isWindows()?_0x4e9afb(0x20c)+_0x4ba271+'.\x20Use\x20PowerShell\x20commands.':'\x0aYou\x20are\x20running\x20on\x20'+_0x4ba271+_0x4e9afb(0x22d)+_0x18d3d2+'\x20for\x20commands\x20requiring\x20elevated\x20privileges.',_0x20f40a=SYSTEM_PROMPT+_0x150b3c+_0x292a4d+'\x0a'+_0x2692dc,_0x2713c2=getUser(),_0x398255=[{'role':'system','content':_0x20f40a}];(_0x2713c2['displayName']||_0x2713c2[_0x4e9afb(0x215)])&&a4_0x327534[_0x4e9afb(0x19d)](_0x2713c2['displayName']||_0x2713c2[_0x4e9afb(0x215)]||_0x4e9afb(0x194));a4_0x327534[_0x4e9afb(0x177)](process[_0x4e9afb(0x205)]()),a4_0x327534[_0x4e9afb(0x1e1)](_0x4e9afb(0x1b5)),a4_0x327534['statusBar'](_0x561c8c,0x64);const _0x2e885f=async _0x3a5cd8=>{const _0x1c7d55=_0x4e9afb;if(!_0x3a5cd8||_0x3a5cd8[_0x1c7d55(0x210)]()==='')return!![];const _0x3e8fe4=_0x3a5cd8['trim']();if(_0x3e8fe4===_0x1c7d55(0x1de)||_0x3e8fe4===_0x1c7d55(0x16b))return a4_0x327534[_0x1c7d55(0x160)](_0x1c7d55(0x16e)),![];if(_0x3e8fe4===_0x1c7d55(0x204))return _0x398255[_0x1c7d55(0x1aa)]=0x1,a4_0x327534[_0x1c7d55(0x160)]('Conversation\x20cleared'),!![];if(_0x3e8fe4===_0x1c7d55(0x1d5)){const _0x182ee1=await getMcpTools();return _0x182ee1[_0x1c7d55(0x1aa)]===0x0?a4_0x327534[_0x1c7d55(0x160)](_0x1c7d55(0x1a0)):(a4_0x327534[_0x1c7d55(0x160)]('Connected\x20MCP\x20Tools:'),_0x182ee1[_0x1c7d55(0x1b3)](_0x25689a=>a4_0x327534['dim']('-\x20'+_0x25689a[_0x1c7d55(0x191)]+'\x20('+_0x25689a[_0x1c7d55(0x209)]+_0x1c7d55(0x181)+(_0x25689a[_0x1c7d55(0x20b)]?.['slice'](0x0,0x32)||'')))),a4_0x327534[_0x1c7d55(0x1e1)]('\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.'),!![];}if(_0x3e8fe4===_0x1c7d55(0x202))return a4_0x327534['header'](_0x1c7d55(0x20e)),a4_0x327534[_0x1c7d55(0x1e1)]('\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat'),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x1d6)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x18a)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x1f3)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x156)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x1af)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x1a4)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x1c3)),a4_0x327534['dim'](_0x1c7d55(0x1cb)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x207)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x185)),!![];if(_0x3e8fe4==='/browser'){const {isBrowserServerRunning:_0x15947f,getConnectedSessions:_0x3adee9}=await import(_0x1c7d55(0x1f8));if(_0x15947f()){const _0x5a641c=_0x3adee9();a4_0x327534[_0x1c7d55(0x20a)](_0x1c7d55(0x1f2)),a4_0x327534[_0x1c7d55(0x160)](_0x1c7d55(0x173)+_0x5a641c['length']),_0x5a641c[_0x1c7d55(0x1b3)](_0x135c43=>a4_0x327534['dim'](_0x1c7d55(0x212)+_0x135c43[_0x1c7d55(0x1be)]));}else a4_0x327534['dim'](_0x1c7d55(0x1df)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x188));return!![];}if(_0x3e8fe4['startsWith'](_0x1c7d55(0x158))){const _0x43c777=_0x3e8fe4[_0x1c7d55(0x18f)]('\x20')[0x1]||'';return await a4_0x47f4ec[_0x1c7d55(0x165)](_0x43c777),!![];}if(_0x3e8fe4[_0x1c7d55(0x1ea)](_0x1c7d55(0x1c4))){const _0x30ea9c=await import(_0x1c7d55(0x16f)),_0x28f27d=_0x3e8fe4[_0x1c7d55(0x18f)]('\x20')[0x1]||'';if(_0x28f27d==='setup'){const {input:_0x6cd43b,password:_0x16b233}=await import(_0x1c7d55(0x19b));a4_0x327534['header'](_0x1c7d55(0x22a)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x19e)),a4_0x327534[_0x1c7d55(0x1e1)]('2.\x20Send\x20/newbot\x20and\x20follow\x20instructions'),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x1b9)),a4_0x327534[_0x1c7d55(0x160)]('');const _0xa3b68a=await _0x16b233({'message':_0x1c7d55(0x19c),'mask':'*'});_0xa3b68a&&(_0x30ea9c[_0x1c7d55(0x1ad)](_0xa3b68a),a4_0x327534[_0x1c7d55(0x20a)](_0x1c7d55(0x196)));const _0x5d0e4f=await _0x6cd43b({'message':_0x1c7d55(0x198)});return _0x5d0e4f&&(_0x30ea9c[_0x1c7d55(0x1ee)](_0x5d0e4f),a4_0x327534['success']('Security\x20PIN\x20set!')),a4_0x327534[_0x1c7d55(0x160)](_0x1c7d55(0x1fb)),!![];}if(_0x28f27d==='start')return await _0x30ea9c['startBot'](),!![];if(_0x28f27d===_0x1c7d55(0x1b0))return _0x30ea9c['stopBot'](),a4_0x327534[_0x1c7d55(0x160)](_0x1c7d55(0x1a5)),!![];if(_0x28f27d===_0x1c7d55(0x180))return _0x30ea9c['isBotRunning']()?a4_0x327534[_0x1c7d55(0x20a)](_0x1c7d55(0x1ac)):a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x203)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x1ae)+(_0x30ea9c[_0x1c7d55(0x176)]()?_0x1c7d55(0x22b):'No')),!![];return a4_0x327534[_0x1c7d55(0x1a2)](_0x1c7d55(0x1fa)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x179)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x15d)),a4_0x327534[_0x1c7d55(0x1e1)](_0x1c7d55(0x1bd)),a4_0x327534[_0x1c7d55(0x1e1)]('\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status'),!![];}if(_0x3e8fe4===_0x1c7d55(0x1fe)){const {rollbackLast:_0x139fac,getChanges:_0x61babe}=await import(_0x1c7d55(0x17a)),_0x417a85=_0x61babe();if(_0x417a85[_0x1c7d55(0x1aa)]===0x0)a4_0x327534['info']('No\x20changes\x20to\x20rollback');else{const _0x24c444=_0x139fac();_0x24c444[_0x1c7d55(0x20a)]?a4_0x327534['success'](_0x24c444[_0x1c7d55(0x1bf)]):a4_0x327534[_0x1c7d55(0x22e)](_0x24c444[_0x1c7d55(0x1bf)]);}return!![];}if(_0x3e8fe4===_0x1c7d55(0x189)){const _0x252200=await selectModel();return _0x252200!==_0x561c8c?(a4_0x327534[_0x1c7d55(0x160)]('Model\x20changed\x20to:\x20'+_0x252200),a4_0x327534[_0x1c7d55(0x160)](_0x1c7d55(0x20d))):a4_0x327534[_0x1c7d55(0x160)](_0x1c7d55(0x1f1)+_0x561c8c),!![];}if(_0x3e8fe4===_0x1c7d55(0x1d8)||_0x3e8fe4==='/themes'){const {selectTheme:_0x3eea70}=await import(_0x1c7d55(0x17e)),_0x3d1d35=await _0x3eea70();return a4_0x327534[_0x1c7d55(0x160)]('Theme\x20changed\x20to:\x20'+_0x3d1d35),!![];}if(_0x3e8fe4===_0x1c7d55(0x1d3)||_0x3e8fe4===_0x1c7d55(0x1b1)){const _0x3cc8a8=a4_0x327534['createSpinner'](_0x1c7d55(0x1ba));_0x3cc8a8[_0x1c7d55(0x1c8)]();const _0x539919=await getUserUsage();return _0x3cc8a8[_0x1c7d55(0x1b0)](),_0x539919?a4_0x327534[_0x1c7d55(0x15c)](_0x539919[_0x1c7d55(0x1c1)],_0x539919[_0x1c7d55(0x21f)],_0x539919[_0x1c7d55(0x206)]):a4_0x327534[_0x1c7d55(0x22e)](_0x1c7d55(0x17c)),!![];}return _0x398255[_0x1c7d55(0x197)]({'role':'user','content':_0x3e8fe4}),await processAgentLoop(_0x398255,_0x561c8c),!![];};if(_0x3d2c1b){const _0xd2f296=await _0x2e885f(_0x3d2c1b);if(!_0xd2f296)return;}while(!![]){try{const _0x4b72a2=await import(_0x4e9afb(0x163))[_0x4e9afb(0x18b)](_0x3a95a7=>_0x3a95a7[_0x4e9afb(0x159)]()),_0x1f65b3=await import(_0x4e9afb(0x17e))[_0x4e9afb(0x18b)](_0x2b416a=>_0x2b416a['getThemeById'](_0x4b72a2)),_0x28d2f9=a4_0x2556bd[_0x4e9afb(0x1c9)]['hex'](_0x1f65b3['primary'])(_0x4e9afb(0x164)),_0x180eca=await input({'message':_0x28d2f9,'theme':{'prefix':''}}),_0x58555f=await _0x2e885f(_0x180eca);if(!_0x58555f)break;}catch(_0x146018){if(_0x146018 instanceof Error&&_0x146018[_0x4e9afb(0x1bf)][_0x4e9afb(0x1f7)]('force\x20closed'))break;a4_0x327534[_0x4e9afb(0x22e)](_0x4e9afb(0x16c)+_0x146018);}}}function cleanTagsFromLine(_0x51fcf7){const _0x17ab42=a4_0x6c46c5,_0x51aaad=_0x51fcf7[_0x17ab42(0x210)]();if(!_0x51aaad)return'';if(_0x51aaad['startsWith']('**'))return'';if(_0x51aaad[_0x17ab42(0x1ea)](_0x17ab42(0x1c0)))return'';if(_0x51aaad[_0x17ab42(0x1ea)]('---'))return'';if(_0x51aaad[_0x17ab42(0x1ea)]('```'))return'';if(_0x51aaad[_0x17ab42(0x1f7)]('\x22name\x22:')&&_0x51aaad[_0x17ab42(0x1f7)](_0x17ab42(0x161)))return'';if(_0x51aaad[_0x17ab42(0x1ea)](_0x17ab42(0x1b4)))return'';if(_0x51aaad['startsWith'](_0x17ab42(0x1dd)))return'';if(_0x51aaad['startsWith'](_0x17ab42(0x1e2)))return'';if(_0x51aaad[_0x17ab42(0x1ea)](_0x17ab42(0x228)))return'';if(_0x51aaad[_0x17ab42(0x1ea)](_0x17ab42(0x15f)))return'';if(_0x51aaad[_0x17ab42(0x1ea)](_0x17ab42(0x19f)))return'';if(_0x51aaad[_0x17ab42(0x1f7)](_0x17ab42(0x1fd)))return'';if(_0x51aaad[_0x17ab42(0x1f7)]('registered\x20that'))return'';return _0x51fcf7[_0x17ab42(0x200)](/<text>/g,'')[_0x17ab42(0x200)](/<\/text>/g,'')['replace'](/<\/text>/g,'')[_0x17ab42(0x200)](/<reasoning>/g,'')[_0x17ab42(0x200)](/<\/reasoning>/g,'')[_0x17ab42(0x200)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x1521d5,_0x322162){const _0x463dc7=a4_0x6c46c5;let _0x393197=0x0;const _0x2adccd=0x3e8;while(_0x393197<_0x2adccd){_0x393197++;const _0x390f71=a4_0x327534[_0x463dc7(0x16a)](_0x463dc7(0x216));_0x390f71[_0x463dc7(0x1c8)]();let _0x2cfcd6='',_0x452794=![],_0x47a6c0='';const _0x3287fd=new AbortController(),_0x5280f6=()=>{const _0x1fded0=_0x463dc7;_0x3287fd[_0x1fded0(0x1dc)](),a4_0x327534[_0x1fded0(0x160)](_0x1fded0(0x155));};process['on']('SIGINT',_0x5280f6);try{const _0x4ce278=await sendChatMessage(_0x322162,_0x1521d5,_0x4904e0=>{const _0x474398=_0x463dc7;_0x390f71[_0x474398(0x1e0)]&&(_0x390f71[_0x474398(0x1b0)](),a4_0x327534[_0x474398(0x208)](''));_0x2cfcd6+=_0x4904e0;for(const _0x97c63f of _0x4904e0){_0x47a6c0+=_0x97c63f;if(_0x97c63f==='\x0a'){if(!_0x452794){if(_0x47a6c0[_0x474398(0x1f7)](_0x474398(0x192))||_0x47a6c0[_0x474398(0x1ea)](_0x474398(0x1eb))){_0x452794=!![],_0x47a6c0='';continue;}let _0x185544=_0x47a6c0[_0x474398(0x200)](/<text>/g,'')[_0x474398(0x200)](/<\/text>/g,'')['replace'](/<reasoning.*?>/g,'')[_0x474398(0x200)](/<\/reasoning>/g,'');if(_0x185544['startsWith']('```')&&!_0x185544['startsWith'](_0x474398(0x1eb)))process['stdout'][_0x474398(0x1ab)](_0x474398(0x186)+_0x185544[_0x474398(0x219)](0x3));else(_0x185544[_0x474398(0x210)]()||_0x47a6c0['trim']()==='')&&process['stdout'][_0x474398(0x1ab)](_0x185544);}else(_0x47a6c0[_0x474398(0x1f7)](_0x474398(0x1d9))||_0x47a6c0[_0x474398(0x210)]()===_0x474398(0x186))&&(_0x452794=![]);_0x47a6c0='';}}},_0x3287fd[_0x463dc7(0x1f5)]);if(_0x47a6c0&&!_0x452794&&!_0x47a6c0[_0x463dc7(0x1f7)](_0x463dc7(0x192))){let _0x54fff0=_0x47a6c0[_0x463dc7(0x200)](/<text>/g,'')[_0x463dc7(0x200)](/<\/text>/g,'')[_0x463dc7(0x200)](/<reasoning.*?>/g,'')[_0x463dc7(0x200)](/<\/reasoning>/g,'');if(_0x54fff0[_0x463dc7(0x210)]())process[_0x463dc7(0x1e6)][_0x463dc7(0x1ab)](_0x54fff0);}_0x2cfcd6=_0x4ce278[_0x463dc7(0x154)];}catch(_0x41d257){_0x390f71[_0x463dc7(0x1b0)](),process[_0x463dc7(0x1f4)](_0x463dc7(0x15e),_0x5280f6);if(_0x41d257[_0x463dc7(0x191)]===_0x463dc7(0x20f)||_0x41d257[_0x463dc7(0x1bf)][_0x463dc7(0x1f7)](_0x463dc7(0x1a9))){a4_0x327534[_0x463dc7(0x21a)](_0x463dc7(0x1a8)),_0x1521d5[_0x463dc7(0x197)]({'role':_0x463dc7(0x21e),'content':_0x2cfcd6+_0x463dc7(0x222)}),_0x1521d5[_0x463dc7(0x197)]({'role':_0x463dc7(0x171),'content':'Stop.'});break;}if(_0x41d257[_0x463dc7(0x1c5)]){a4_0x327534[_0x463dc7(0x172)](_0x41d257[_0x463dc7(0x21d)]||0x3c);return;}a4_0x327534[_0x463dc7(0x22e)](_0x463dc7(0x1c7)+_0x41d257);return;}finally{process[_0x463dc7(0x1f4)](_0x463dc7(0x15e),_0x5280f6);}_0x390f71[_0x463dc7(0x1e0)]&&_0x390f71[_0x463dc7(0x1b0)]();a4_0x327534[_0x463dc7(0x1e7)](),_0x1521d5[_0x463dc7(0x197)]({'role':_0x463dc7(0x21e),'content':_0x2cfcd6});let _0x248680=_0x2cfcd6[_0x463dc7(0x226)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x248680&&(_0x248680=_0x2cfcd6[_0x463dc7(0x226)](/```tool\s*([\s\S]*?)```/));!_0x248680&&(_0x248680=_0x2cfcd6['match'](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x248680)break;try{const _0x16b746=_0x248680[0x1][_0x463dc7(0x210)](),_0x59f295=JSON[_0x463dc7(0x190)](_0x16b746),_0x344fe5={'create_file':'Create','read_file':_0x463dc7(0x1cc),'edit_file':'Update','list_directory':_0x463dc7(0x19a),'search_file':_0x463dc7(0x1d7),'find_files':_0x463dc7(0x18c),'search_directory':'SearchDir','run_command':'Run','browser_open':'Browser','browser_click':_0x463dc7(0x225),'browser_fill':_0x463dc7(0x182),'browser_snapshot':_0x463dc7(0x211),'browser_screenshot':'Screenshot','browser_get_text':'GetText','browser_close':_0x463dc7(0x195)},_0x502827=_0x344fe5[_0x59f295[_0x463dc7(0x191)]]||_0x59f295['name'];let _0x5c0309='';if(_0x59f295[_0x463dc7(0x191)]===_0x463dc7(0x1fc)&&_0x59f295[_0x463dc7(0x193)]['command'])_0x5c0309=_0x59f295[_0x463dc7(0x193)]['command'];else{if(_0x59f295[_0x463dc7(0x193)][_0x463dc7(0x1b6)])_0x5c0309=_0x59f295[_0x463dc7(0x193)][_0x463dc7(0x1b6)];else{if(_0x59f295[_0x463dc7(0x193)]['pattern'])_0x5c0309='\x22'+_0x59f295[_0x463dc7(0x193)][_0x463dc7(0x1e8)]+'\x22';else _0x59f295['args'][_0x463dc7(0x18e)]?_0x5c0309=_0x59f295[_0x463dc7(0x193)][_0x463dc7(0x18e)]:_0x5c0309=Object[_0x463dc7(0x1a6)](_0x59f295[_0x463dc7(0x193)])[0x0]||'';}}const _0xd0561c=_0x5c0309['length']>0x32?_0x5c0309[_0x463dc7(0x219)](0x0,0x2f)+_0x463dc7(0x15a):_0x5c0309,_0x5596c0=a4_0x327534[_0x463dc7(0x1b2)](_0x502827+'('+_0xd0561c+')');_0x5596c0[_0x463dc7(0x1c8)]();const _0x3a5bd3=performance[_0x463dc7(0x227)]();let _0x426dbc;try{_0x426dbc=await executeToolCall(_0x59f295[_0x463dc7(0x191)],_0x59f295[_0x463dc7(0x193)]);}catch(_0x510235){if(_0x510235[_0x463dc7(0x1bf)]&&_0x510235[_0x463dc7(0x1bf)][_0x463dc7(0x1f7)](_0x463dc7(0x224))){const _0x421741=await getMcpTools(),_0x2a40c5=_0x421741[_0x463dc7(0x175)](_0x2c26f5=>_0x2c26f5[_0x463dc7(0x191)]===_0x59f295[_0x463dc7(0x191)]);if(_0x2a40c5)try{_0x426dbc=await executeMcpTool(_0x2a40c5[_0x463dc7(0x209)],_0x2a40c5[_0x463dc7(0x191)],_0x59f295[_0x463dc7(0x193)]);}catch(_0x57c36b){throw new Error(_0x463dc7(0x1ef)+_0x57c36b);}else throw _0x510235;}else throw _0x510235;}const _0x35ebab=((performance[_0x463dc7(0x227)]()-_0x3a5bd3)/0x3e8)[_0x463dc7(0x1c6)](0x1);_0x5596c0[_0x463dc7(0x1b0)]();let _0x537422=_0x463dc7(0x1ff)+_0x35ebab+'s',_0x3d3c50=![];if(_0x59f295[_0x463dc7(0x191)]===_0x463dc7(0x1fc)&&_0x426dbc&&typeof _0x426dbc===_0x463dc7(0x201)){const _0x3c987b=_0x426dbc;if(_0x3c987b[_0x463dc7(0x17f)]===0x0){const _0x3021b1=_0x3c987b[_0x463dc7(0x1e6)]?_0x3c987b[_0x463dc7(0x1e6)][_0x463dc7(0x18f)]('\x0a')[_0x463dc7(0x1aa)]:0x0;_0x537422=_0x463dc7(0x1e4)+_0x3021b1+_0x463dc7(0x16d)+_0x35ebab+'s)';}else _0x3c987b[_0x463dc7(0x17f)]!==undefined&&(_0x3d3c50=!![],_0x537422='Exited\x20with\x20code\x20'+_0x3c987b[_0x463dc7(0x17f)],_0x3c987b[_0x463dc7(0x1e5)]&&(_0x537422+=':\x20'+_0x3c987b[_0x463dc7(0x1e5)]['split']('\x0a')[0x0]['substring'](0x0,0x64)));}else{if(_0x59f295['name']===_0x463dc7(0x1e9)&&_0x426dbc&&typeof _0x426dbc[_0x463dc7(0x154)]===_0x463dc7(0x15b)){const _0x3f07ca=_0x426dbc[_0x463dc7(0x154)][_0x463dc7(0x18f)]('\x0a')['length'];_0x537422='Read\x20'+_0x3f07ca+_0x463dc7(0x1cf)+_0x35ebab+'s)';}else{if(_0x59f295['name']===_0x463dc7(0x22c))_0x537422=_0x463dc7(0x1d1)+_0x35ebab+'s)';else _0x426dbc&&typeof _0x426dbc===_0x463dc7(0x201)&&'error'in _0x426dbc&&(_0x3d3c50=!![],_0x537422=_0x463dc7(0x1f6)+_0x426dbc[_0x463dc7(0x22e)]);}}a4_0x327534['toolSuccess'](_0x502827,_0xd0561c,_0x537422,_0x3d3c50),_0x1521d5['push']({'role':_0x463dc7(0x171),'content':_0x463dc7(0x1c2)+_0x59f295['name']+':\x0a'+JSON[_0x463dc7(0x184)](_0x426dbc,null,0x2)}),await new Promise(_0x312f65=>setTimeout(_0x312f65,0x1f4));}catch(_0x4a1ace){a4_0x327534[_0x463dc7(0x1d2)](_0x463dc7(0x162),'tool\x20execution\x20failed',_0x4a1ace[_0x463dc7(0x1bf)]||String(_0x4a1ace),!![]),_0x1521d5[_0x463dc7(0x197)]({'role':'user','content':_0x463dc7(0x199)+_0x4a1ace+_0x463dc7(0x1b7)});}}_0x393197>=_0x2adccd&&a4_0x327534[_0x463dc7(0x21a)](_0x463dc7(0x169));}async function executeToolCall(_0x41c023,_0xf69b6b){const _0x22953a=a4_0x6c46c5;switch(_0x41c023){case _0x22953a(0x1d4):return createFile(_0xf69b6b[_0x22953a(0x1b6)],_0xf69b6b[_0x22953a(0x154)]);case'read_file':return readFile(_0xf69b6b[_0x22953a(0x1b6)]);case _0x22953a(0x217):return listDirectory(_0xf69b6b[_0x22953a(0x1b6)]||'.');case'edit_file':return editFile(_0xf69b6b[_0x22953a(0x1b6)],_0xf69b6b[_0x22953a(0x1a3)],_0xf69b6b['replace']);case _0x22953a(0x178):return searchFile(_0xf69b6b[_0x22953a(0x1b6)],_0xf69b6b[_0x22953a(0x1e8)]);case _0x22953a(0x1fc):const {command:_0x1e7bf6,background:_0x4bfca8,wait:_0x3cb70b}=_0xf69b6b,_0x2058a3=await runCommand(_0x1e7bf6,undefined,_0x4bfca8,_0x3cb70b);return _0x2058a3;case _0x22953a(0x1db):{const {findFiles:_0xfd24e9}=await import(_0x22953a(0x183));return _0xfd24e9(_0xf69b6b[_0x22953a(0x1b6)]||'.',_0xf69b6b[_0x22953a(0x1e8)]);}case _0x22953a(0x1bb):{const {searchDirectory:_0x37c981}=await import(_0x22953a(0x183));return _0x37c981(_0xf69b6b['path']||'.',_0xf69b6b[_0x22953a(0x1e8)]);}case _0x22953a(0x223):{const {readFile:_0x211cd0}=await import(_0x22953a(0x1da));return _0x211cd0(_0xf69b6b[_0x22953a(0x1bc)],_0xf69b6b[_0x22953a(0x167)],_0xf69b6b[_0x22953a(0x1b6)],_0xf69b6b['branch']);}case'github_create_pr':{const {createPullRequest:_0x49ae08}=await import(_0x22953a(0x1da));return _0x49ae08(_0xf69b6b[_0x22953a(0x1bc)],_0xf69b6b[_0x22953a(0x167)],_0xf69b6b['title'],_0xf69b6b['head'],_0xf69b6b[_0x22953a(0x213)],_0xf69b6b['body']);}case'github_create_branch':{const {createBranch:_0x274b63}=await import('../github/api.js');return _0x274b63(_0xf69b6b[_0x22953a(0x1bc)],_0xf69b6b[_0x22953a(0x167)],_0xf69b6b[_0x22953a(0x1d0)],_0xf69b6b[_0x22953a(0x157)]);}case _0x22953a(0x1cd):{const {browserOpen:_0x42f7a6,startBrowserServer:_0x1a294d,isBrowserServerRunning:_0x1f2d98}=await import(_0x22953a(0x1f8));return!_0x1f2d98()&&await _0x1a294d(),_0x42f7a6(_0xf69b6b[_0x22953a(0x18e)]);}case'browser_click':{const {browserClick:_0x13e673}=await import(_0x22953a(0x1f8));return _0x13e673(_0xf69b6b[_0x22953a(0x1ec)]);}case _0x22953a(0x1e3):{const {browserFill:_0x2192fb}=await import(_0x22953a(0x1f8));return _0x2192fb(_0xf69b6b[_0x22953a(0x1ec)],_0xf69b6b[_0x22953a(0x174)]);}case'browser_snapshot':{const {browserSnapshot:_0x3cd5a8}=await import(_0x22953a(0x1f8));return _0x3cd5a8();}case'browser_screenshot':{const {browserScreenshot:_0x13876c}=await import(_0x22953a(0x1f8));return _0x13876c();}case _0x22953a(0x221):{const {browserGetText:_0x391931}=await import('../browser/index.js');return _0x391931(_0xf69b6b[_0x22953a(0x1ec)]);}case _0x22953a(0x17b):{const {browserClose:_0x3a8b22}=await import(_0x22953a(0x1f8));return _0x3a8b22();}default:return{'error':_0x22953a(0x1f0)+_0x41c023};}}
1
+ const a4_0x407f59=a4_0x1804;(function(_0x42eae2,_0x5b3b54){const _0x466c14=a4_0x1804,_0x27ebbe=_0x42eae2();while(!![]){try{const _0x522ac3=parseInt(_0x466c14(0x135))/0x1*(parseInt(_0x466c14(0x189))/0x2)+-parseInt(_0x466c14(0x16f))/0x3*(parseInt(_0x466c14(0xe8))/0x4)+parseInt(_0x466c14(0x15b))/0x5+parseInt(_0x466c14(0x186))/0x6+parseInt(_0x466c14(0x13c))/0x7+-parseInt(_0x466c14(0x109))/0x8*(parseInt(_0x466c14(0x184))/0x9)+parseInt(_0x466c14(0x145))/0xa;if(_0x522ac3===_0x5b3b54)break;else _0x27ebbe['push'](_0x27ebbe['shift']());}catch(_0x2b702f){_0x27ebbe['push'](_0x27ebbe['shift']());}}}(a4_0x67e6,0x6fcc8));import{input}from'@inquirer/prompts';import a4_0x3a27c3 from'chalk';import{sendChatMessage,getUserUsage}from'../utils/api.js';function a4_0x67e6(){const _0x229c5c=['actionSpinner','startBot','url','Updated\x20successfully\x20(','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','slice','cmd','2.\x20Send\x20/newbot\x20and\x20follow\x20instructions','edit_file','system','\x0a>\x20','Unexpected\x20error:\x20','loggedInBox','CloseBrowser','match','Unknown\x20tool:\x20','then','setBotToken','args','filename','\x20lines\x20of\x20output\x20(','Generating\x20tool\x20call...','inputSchema','Browser\x20server\x20is\x20running','keys','owner','now','Error','signal','removeListener','Tool\x20error\x20occurred:\x20','search_file','join','browser_close','file','branchName','run_command','/telegram','start','push','Stop.','aborted','I\x20am','file_path','write','I\x27ve','isOverLimit','values','length','exit','startsWith','hex','userEmail','Telegram\x20bot\x20is\x20not\x20running','/quit','3398312noezhf','Snapshot','forEach','trim','API\x20error:\x20','stderr','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','Connected\x20browsers:\x20','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','Security\x20PIN\x20set!','user','createSpinner','data','content','mcpConnected','force\x20closed','/stats','\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','../github/api.js','fromBranch','serverName','/themes','find_files','\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat','browser_screenshot','User\x20aborted.','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','```tool','message','stringify','usageBox','###','.\x20Please\x20fix\x20this\x20and\x20continue.','20056ygMVLc','Run','warn','@inquirer/prompts','AbortError','/browser','email','filepath','Goodbye!','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','/model','Now,','stop','/theme','cwd','dim','code','-\x20Running','value','resetIn','source','monthlyLimit','Telegram\x20bot\x20is\x20running','exitCode','Click','header','split','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram','github_create_branch','must\x20greet','SIGINT','../browser/index.js','Commands','bold','/help','tool\x20execution\x20failed','\x0aAborting...','getThemeById','info','Telegram\x20bot\x20stopped.','body','path','browser_fill','parse','55807fOpSzD','Completed\x20with\x20','selector','Create','Unknown\x20tool','```','text','5101810bjldYr','Configured:\x20','isSpinning','../telegram/index.js','Browser\x20server\x20is\x20not\x20running','.\x20Use\x20PowerShell\x20commands.','\x0aYou\x20are\x20running\x20on\x20','list_directory','size','4032290YwbiQG','\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration','description','Conversation\x20cleared','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','\x20lines\x20(','isRateLimit','Unknown','substring','Done\x20in\x20','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','Tool\x20result\x20for\x20','List','/exit','Reached\x20maximum\x20iterations','name','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','\x22args\x22:','error','...','primary','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','1438785osbEMD','../utils/storage.js','Fetching\x20usage...','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','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.\x0a\x0aAVAILABLE\x20TOOLS:\x0a-\x20File\x20system:\x20create_file,\x20read_file,\x20edit_file,\x20list_directory,\x20search_file,\x20find_files,\x20search_directory\x0a-\x20GitHub:\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20Terminal:\x20run_command\x0a-\x20Browser:\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_snapshot,\x20browser_screenshot,\x20browser_get_text,\x20browser_close\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','Search','stdout','branch','statusBar','handleGitHubCommand','\x20\x20-\x20','Screenshot','Exited\x20with\x20code\x20','includes','It\x20will\x20start\x20automatically\x20when\x20needed','Theme\x20changed\x20to:\x20','replace','Read','command','No\x20MCP\x20tools\x20connected.','3bPDOqa','toolSuccess','repo','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','Browser','Bot\x20token:','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','</execute_tool>','/usage','browser_click','Fill','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','):\x20','search_directory','base','pattern','success','Telegram\x20Bot\x20Setup','Connected\x20MCP\x20Tools:','Current\x20model:\x20','Model\x20changed\x20to:\x20','1818vFIEcf','github_read_file','1025256fheQMd','browser_snapshot','---','8hFUrEZ','3.\x20Copy\x20the\x20bot\x20token','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','status','stopBot','map','Update','catch','read_file','Telegram\x20Commands','GetText','../ui/themes.js','create_file','string','Invalid\x20JSON\x20output\x20from\x20model:\x20','/rollback','../tools/file.js','assistant'];a4_0x67e6=function(){return _0x229c5c;};return a4_0x67e6();}function a4_0x1804(_0x8165bb,_0x27de08){_0x8165bb=_0x8165bb-0xbf;const _0x67e634=a4_0x67e6();let _0x180428=_0x67e634[_0x8165bb];return _0x180428;}import{getSelectedModel,getUser}from'../utils/storage.js';import{formatRulesForSystem}from'../tools/rules.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import*as a4_0x14b1a5 from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x1c1e13 from'../github/index.js';const SYSTEM_PROMPT=a4_0x407f59(0x15f);export async function startChat(_0x58483e){const _0x43bcb9=a4_0x407f59,{startBrowserServer:_0x2d5d84}=await import(_0x43bcb9(0x128));_0x2d5d84()[_0x43bcb9(0x190)](()=>{});const _0xf1d58c=getSelectedModel();await connectToMcpServers();const _0x224e4c=await getMcpTools(),_0x3f1b17=new Set(_0x224e4c[_0x43bcb9(0x18e)](_0x544906=>_0x544906[_0x43bcb9(0xfc)]));_0x3f1b17[_0x43bcb9(0x144)]>0x0&&a4_0x14b1a5[_0x43bcb9(0xf6)](_0x3f1b17['size'],_0x224e4c[_0x43bcb9(0xe1)]);process['on'](_0x43bcb9(0xe2),()=>closeMcpClients());const _0x40790e=formatRulesForSystem(),_0xcbce2e=getPlatformInfo(),_0xef21f3=getShellPrefix(),_0x4767e7=_0x224e4c[_0x43bcb9(0xe1)]>0x0?_0x43bcb9(0x18b)+_0x224e4c[_0x43bcb9(0x18e)](_0x2b20ea=>{const _0x42cc73=_0x43bcb9,_0x5e08fd=Object[_0x42cc73(0xc9)](_0x2b20ea[_0x42cc73(0xc7)]?.['properties']||{})['join'](',\x20');return'-\x20'+_0x2b20ea[_0x42cc73(0x154)]+'('+_0x5e08fd+_0x42cc73(0x17b)+_0x2b20ea['description'];})[_0x43bcb9(0xd1)]('\x0a'):'',_0x2125fd=isWindows()?_0x43bcb9(0x142)+_0xcbce2e+_0x43bcb9(0x141):_0x43bcb9(0x142)+_0xcbce2e+'.\x20Use\x20'+_0xef21f3+_0x43bcb9(0xee),_0x4f25b1=SYSTEM_PROMPT+_0x4767e7+_0x2125fd+'\x0a'+_0x40790e,_0x4243f3=getUser(),_0x149515=[{'role':_0x43bcb9(0x1a4),'content':_0x4f25b1}];(_0x4243f3['displayName']||_0x4243f3[_0x43bcb9(0x10f)])&&a4_0x14b1a5[_0x43bcb9(0x1a7)](_0x4243f3['displayName']||_0x4243f3[_0x43bcb9(0x10f)]||_0x43bcb9(0x14c));a4_0x14b1a5['currentDir'](process[_0x43bcb9(0x117)]()),a4_0x14b1a5[_0x43bcb9(0x118)](_0x43bcb9(0xf0)),a4_0x14b1a5[_0x43bcb9(0x163)](_0xf1d58c,0x64);const _0x37f1c3=async _0xda001=>{const _0x1b03f6=_0x43bcb9;if(!_0xda001||_0xda001['trim']()==='')return!![];const _0x22cb3b=_0xda001[_0x1b03f6(0xeb)]();if(_0x22cb3b===_0x1b03f6(0x152)||_0x22cb3b===_0x1b03f6(0xe7))return a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x111)),![];if(_0x22cb3b==='/clear')return _0x149515[_0x1b03f6(0xe1)]=0x1,a4_0x14b1a5['info'](_0x1b03f6(0x148)),!![];if(_0x22cb3b==='/mcp'){const _0x36026d=await getMcpTools();return _0x36026d[_0x1b03f6(0xe1)]===0x0?a4_0x14b1a5['info'](_0x1b03f6(0x16e)):(a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x181)),_0x36026d[_0x1b03f6(0xea)](_0x19888b=>a4_0x14b1a5[_0x1b03f6(0x118)]('-\x20'+_0x19888b[_0x1b03f6(0x154)]+'\x20('+_0x19888b[_0x1b03f6(0xfc)]+_0x1b03f6(0x17b)+(_0x19888b[_0x1b03f6(0x147)]?.[_0x1b03f6(0x1a0)](0x0,0x32)||'')))),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x17a)),!![];}if(_0x22cb3b===_0x1b03f6(0x12b))return a4_0x14b1a5[_0x1b03f6(0x122)](_0x1b03f6(0x129)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0xff)),a4_0x14b1a5['dim'](_0x1b03f6(0xf9)),a4_0x14b1a5['dim'](_0x1b03f6(0x19f)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x112)),a4_0x14b1a5[_0x1b03f6(0x118)]('\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools'),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x124)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x15a)),a4_0x14b1a5['dim'](_0x1b03f6(0x15e)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x175)),a4_0x14b1a5['dim'](_0x1b03f6(0x146)),a4_0x14b1a5[_0x1b03f6(0x118)]('\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status'),!![];if(_0x22cb3b===_0x1b03f6(0x10e)){const {isBrowserServerRunning:_0x2d5e2b,getConnectedSessions:_0x54aa83}=await import('../browser/index.js');if(_0x2d5e2b()){const _0x2fd6f0=_0x54aa83();a4_0x14b1a5['success'](_0x1b03f6(0xc8)),a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0xef)+_0x2fd6f0['length']),_0x2fd6f0[_0x1b03f6(0xea)](_0x2b492e=>a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x165)+_0x2b492e[_0x1b03f6(0xe5)]));}else a4_0x14b1a5['dim'](_0x1b03f6(0x140)),a4_0x14b1a5['dim'](_0x1b03f6(0x169));return!![];}if(_0x22cb3b[_0x1b03f6(0xe3)]('/github')){const _0x299cca=_0x22cb3b[_0x1b03f6(0x123)]('\x20')[0x1]||'';return await a4_0x1c1e13[_0x1b03f6(0x164)](_0x299cca),!![];}if(_0x22cb3b[_0x1b03f6(0xe3)](_0x1b03f6(0xd6))){const _0x583343=await import(_0x1b03f6(0x13f)),_0x4f39ab=_0x22cb3b[_0x1b03f6(0x123)]('\x20')[0x1]||'';if(_0x4f39ab==='setup'){const {input:_0x377f6f,password:_0x46d189}=await import(_0x1b03f6(0x10c));a4_0x14b1a5['header'](_0x1b03f6(0x180)),a4_0x14b1a5[_0x1b03f6(0x118)]('1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather'),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x1a2)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x18a)),a4_0x14b1a5[_0x1b03f6(0x12f)]('');const _0x37ab08=await _0x46d189({'message':_0x1b03f6(0x174),'mask':'*'});_0x37ab08&&(_0x583343[_0x1b03f6(0xc2)](_0x37ab08),a4_0x14b1a5[_0x1b03f6(0x17f)]('Bot\x20token\x20saved!'));const _0x23c9a7=await _0x377f6f({'message':_0x1b03f6(0x14f)});return _0x23c9a7&&(_0x583343['setSecurityPin'](_0x23c9a7),a4_0x14b1a5[_0x1b03f6(0x17f)](_0x1b03f6(0xf1))),a4_0x14b1a5['info'](_0x1b03f6(0x155)),!![];}if(_0x4f39ab===_0x1b03f6(0xd7))return await _0x583343[_0x1b03f6(0x19c)](),!![];if(_0x4f39ab===_0x1b03f6(0x115))return _0x583343[_0x1b03f6(0x18d)](),a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x130)),!![];if(_0x4f39ab===_0x1b03f6(0x18c))return _0x583343['isBotRunning']()?a4_0x14b1a5['success'](_0x1b03f6(0x11f)):a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0xe6)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x13d)+(_0x583343['isConfigured']()?'Yes':'No')),!![];return a4_0x14b1a5['header'](_0x1b03f6(0x192)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x172)),a4_0x14b1a5[_0x1b03f6(0x118)]('\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot'),a4_0x14b1a5[_0x1b03f6(0x118)]('\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot'),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x149)),!![];}if(_0x22cb3b===_0x1b03f6(0x198)){const {rollbackLast:_0x5c8b16,getChanges:_0x4cf06b}=await import('../tools/rollback.js'),_0x431275=_0x4cf06b();if(_0x431275[_0x1b03f6(0xe1)]===0x0)a4_0x14b1a5[_0x1b03f6(0x12f)]('No\x20changes\x20to\x20rollback');else{const _0x4a11ef=_0x5c8b16();_0x4a11ef['success']?a4_0x14b1a5['success'](_0x4a11ef[_0x1b03f6(0x104)]):a4_0x14b1a5[_0x1b03f6(0x157)](_0x4a11ef[_0x1b03f6(0x104)]);}return!![];}if(_0x22cb3b===_0x1b03f6(0x113)){const _0x4f6631=await selectModel();return _0x4f6631!==_0xf1d58c?(a4_0x14b1a5['info'](_0x1b03f6(0x183)+_0x4f6631),a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x102))):a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x182)+_0xf1d58c),!![];}if(_0x22cb3b===_0x1b03f6(0x116)||_0x22cb3b===_0x1b03f6(0xfd)){const {selectTheme:_0x44e91c}=await import(_0x1b03f6(0x194)),_0x1fffde=await _0x44e91c();return a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x16a)+_0x1fffde),!![];}if(_0x22cb3b===_0x1b03f6(0x177)||_0x22cb3b===_0x1b03f6(0xf8)){const _0x1c795f=a4_0x14b1a5[_0x1b03f6(0xf3)](_0x1b03f6(0x15d));_0x1c795f[_0x1b03f6(0xd7)]();const _0x2f1d91=await getUserUsage();return _0x1c795f[_0x1b03f6(0x115)](),_0x2f1d91?a4_0x14b1a5[_0x1b03f6(0x106)](_0x2f1d91['tokensUsed'],_0x2f1d91[_0x1b03f6(0x11e)],_0x2f1d91[_0x1b03f6(0xdf)]):a4_0x14b1a5[_0x1b03f6(0x157)]('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}return _0x149515['push']({'role':_0x1b03f6(0xf2),'content':_0x22cb3b}),await processAgentLoop(_0x149515,_0xf1d58c),!![];};if(_0x58483e){const _0x2a9979=await _0x37f1c3(_0x58483e);if(!_0x2a9979)return;}while(!![]){try{const _0x2768da=await import(_0x43bcb9(0x15c))[_0x43bcb9(0xc1)](_0x37bf9a=>_0x37bf9a['getTheme']()),_0x6d07dc=await import(_0x43bcb9(0x194))[_0x43bcb9(0xc1)](_0x4f29e9=>_0x4f29e9[_0x43bcb9(0x12e)](_0x2768da)),_0x4d3678=a4_0x3a27c3[_0x43bcb9(0x12a)][_0x43bcb9(0xe4)](_0x6d07dc[_0x43bcb9(0x159)])(_0x43bcb9(0x1a5)),_0x3033ad=await input({'message':_0x4d3678,'theme':{'prefix':''}}),_0x415ddd=await _0x37f1c3(_0x3033ad);if(!_0x415ddd)break;}catch(_0x1baa55){if(_0x1baa55 instanceof Error&&_0x1baa55[_0x43bcb9(0x104)][_0x43bcb9(0x168)](_0x43bcb9(0xf7)))break;a4_0x14b1a5['error'](_0x43bcb9(0x1a6)+_0x1baa55);}}}function cleanTagsFromLine(_0x3f24c3){const _0x35790e=a4_0x407f59,_0x1fae32=_0x3f24c3[_0x35790e(0xeb)]();if(!_0x1fae32)return'';if(_0x1fae32[_0x35790e(0xe3)]('**'))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0x107)))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0x188)))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0x13a)))return'';if(_0x1fae32[_0x35790e(0x168)]('\x22name\x22:')&&_0x1fae32['includes'](_0x35790e(0x156)))return'';if(_0x1fae32['startsWith']('Running'))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0x11a)))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0xde)))return'';if(_0x1fae32['startsWith'](_0x35790e(0xdb)))return'';if(_0x1fae32['startsWith'](_0x35790e(0x114)))return'';if(_0x1fae32[_0x35790e(0xe3)]('Let\x20me'))return'';if(_0x1fae32['includes'](_0x35790e(0x126)))return'';if(_0x1fae32['includes']('registered\x20that'))return'';return _0x3f24c3[_0x35790e(0x16b)](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x35790e(0x16b)](/<\/text>/g,'')[_0x35790e(0x16b)](/<reasoning>/g,'')[_0x35790e(0x16b)](/<\/reasoning>/g,'')[_0x35790e(0x16b)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x5e1c87,_0x2a4459){const _0x4f7c94=a4_0x407f59;let _0x2c3bcf=0x0;const _0x4e46b2=0x3e8;while(_0x2c3bcf<_0x4e46b2){_0x2c3bcf++;const _0x2f6d27=a4_0x14b1a5[_0x4f7c94(0xf3)]('Thinking...');_0x2f6d27[_0x4f7c94(0xd7)]();let _0x1bb27c='',_0x405631=![],_0x42aee7='';const _0x5a14c1=new AbortController(),_0x162b10=()=>{const _0x33df71=_0x4f7c94;_0x5a14c1['abort'](),a4_0x14b1a5[_0x33df71(0x12f)](_0x33df71(0x12d));};process['on'](_0x4f7c94(0x127),_0x162b10);let _0x430d20=null;try{const _0x111525=await sendChatMessage(_0x2a4459,_0x5e1c87,_0x47bf02=>{const _0x315464=_0x4f7c94;_0x2f6d27['isSpinning']&&_0x2f6d27[_0x315464(0x115)]();_0x1bb27c+=_0x47bf02;for(const _0x41a102 of _0x47bf02){_0x42aee7+=_0x41a102;if(_0x41a102==='\x0a'){if(!_0x405631){if(_0x42aee7[_0x315464(0x168)]('<execute_tool>')||_0x42aee7[_0x315464(0xe3)]('```tool')){_0x405631=!![],_0x42aee7='';!_0x430d20&&(_0x430d20=a4_0x14b1a5[_0x315464(0x19b)](_0x315464(0xc6)),_0x430d20[_0x315464(0xd7)]());continue;}let _0x3f2df0=_0x42aee7[_0x315464(0x16b)](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x315464(0x16b)](/<reasoning.*?>/g,'')[_0x315464(0x16b)](/<\/reasoning>/g,'');if(_0x3f2df0[_0x315464(0xe3)]('```')&&!_0x3f2df0[_0x315464(0xe3)](_0x315464(0x103)))process[_0x315464(0x161)][_0x315464(0xdd)](_0x315464(0x13a)+_0x3f2df0[_0x315464(0x1a0)](0x3));else _0x3f2df0['trim']()&&process[_0x315464(0x161)][_0x315464(0xdd)](_0x3f2df0);}else(_0x42aee7[_0x315464(0x168)](_0x315464(0x176))||_0x42aee7[_0x315464(0xeb)]()===_0x315464(0x13a))&&(_0x405631=![],_0x430d20&&(_0x430d20[_0x315464(0x115)](),_0x430d20=null));_0x42aee7='';}}},_0x5a14c1[_0x4f7c94(0xcd)]);_0x430d20&&(_0x430d20[_0x4f7c94(0x115)](),_0x430d20=null);if(_0x42aee7&&!_0x405631&&!_0x42aee7[_0x4f7c94(0x168)]('<execute_tool>')){let _0x36a87b=_0x42aee7['replace'](/<text>/g,'')[_0x4f7c94(0x16b)](/<\/text>/g,'')[_0x4f7c94(0x16b)](/<reasoning.*?>/g,'')[_0x4f7c94(0x16b)](/<\/reasoning>/g,'');if(_0x36a87b['trim']())process[_0x4f7c94(0x161)]['write'](_0x36a87b);}_0x1bb27c=_0x111525[_0x4f7c94(0xf5)];}catch(_0x42544f){_0x2f6d27[_0x4f7c94(0x115)](),process[_0x4f7c94(0xce)](_0x4f7c94(0x127),_0x162b10);if(_0x42544f[_0x4f7c94(0x154)]===_0x4f7c94(0x10d)||_0x42544f['message'][_0x4f7c94(0x168)](_0x4f7c94(0xda))){a4_0x14b1a5[_0x4f7c94(0x10b)](_0x4f7c94(0x101)),_0x5e1c87[_0x4f7c94(0xd8)]({'role':_0x4f7c94(0x19a),'content':_0x1bb27c+'\x20[Aborted]'}),_0x5e1c87[_0x4f7c94(0xd8)]({'role':'user','content':_0x4f7c94(0xd9)});break;}if(_0x42544f[_0x4f7c94(0x14b)]){a4_0x14b1a5['rateLimitWarning'](_0x42544f[_0x4f7c94(0x11c)]||0x3c);return;}a4_0x14b1a5[_0x4f7c94(0x157)](_0x4f7c94(0xec)+_0x42544f);return;}finally{process['removeListener'](_0x4f7c94(0x127),_0x162b10);}_0x2f6d27[_0x4f7c94(0x13e)]&&_0x2f6d27[_0x4f7c94(0x115)]();a4_0x14b1a5['aiMessageEnd'](),_0x5e1c87['push']({'role':'assistant','content':_0x1bb27c});let _0x2011c7=_0x1bb27c[_0x4f7c94(0xbf)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x2011c7&&(_0x2011c7=_0x1bb27c['match'](/```tool\s*([\s\S]*?)```/));!_0x2011c7&&(_0x2011c7=_0x1bb27c[_0x4f7c94(0xbf)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x2011c7)break;function _0x1950fb(_0x5086a8){const _0x279d1e=_0x4f7c94,_0x437564=_0x5086a8[_0x279d1e(0xeb)]();try{return JSON[_0x279d1e(0x134)](_0x437564);}catch(_0x4b164a){try{let _0x4072cc='',_0x4bc871=![];for(let _0x47ff86=0x0;_0x47ff86<_0x437564[_0x279d1e(0xe1)];_0x47ff86++){const _0x447639=_0x437564[_0x47ff86];if(_0x447639==='\x22'&&_0x437564[_0x47ff86-0x1]!=='\x5c')_0x4bc871=!_0x4bc871;if(_0x4bc871&&_0x447639==='\x0a')_0x4072cc+='\x5cn';else _0x4072cc+=_0x447639;}return JSON[_0x279d1e(0x134)](_0x4072cc);}catch(_0x233123){try{return new Function('return\x20'+_0x437564)();}catch(_0x50900b){throw new Error(_0x279d1e(0x197)+_0x4b164a[_0x279d1e(0x104)]);}}}}try{const _0x3ba7b2=_0x1950fb(_0x2011c7[0x1]),_0x2c2754={'write_file':'create_file','write':'create_file','create':'create_file','read':_0x4f7c94(0x191),'read_text_file':_0x4f7c94(0x191),'search':_0x4f7c94(0xd0),'list':_0x4f7c94(0x143),'ls':_0x4f7c94(0x143),'execute':'run_command','cmd':_0x4f7c94(0xd5)};_0x2c2754[_0x3ba7b2[_0x4f7c94(0x154)]]&&(_0x3ba7b2['name']=_0x2c2754[_0x3ba7b2[_0x4f7c94(0x154)]]);_0x3ba7b2[_0x4f7c94(0xc3)]&&(!_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x132)]&&(_0x3ba7b2['args'][_0x4f7c94(0x132)]=_0x3ba7b2['args'][_0x4f7c94(0xdc)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x110)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0xd3)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0xc4)]),!_0x3ba7b2['args']['content']&&(_0x3ba7b2['args'][_0x4f7c94(0xf5)]=_0x3ba7b2['args'][_0x4f7c94(0x13b)]||_0x3ba7b2['args'][_0x4f7c94(0x119)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0xf4)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x11d)]),!_0x3ba7b2[_0x4f7c94(0xc3)]['command']&&(_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x16d)]=_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x1a1)]||_0x3ba7b2[_0x4f7c94(0xc3)]['script']));const _0x2f0128={'create_file':_0x4f7c94(0x138),'read_file':_0x4f7c94(0x16c),'edit_file':_0x4f7c94(0x18f),'list_directory':_0x4f7c94(0x151),'search_file':_0x4f7c94(0x160),'find_files':'Find','search_directory':'SearchDir','run_command':_0x4f7c94(0x10a),'browser_open':_0x4f7c94(0x173),'browser_click':_0x4f7c94(0x121),'browser_fill':_0x4f7c94(0x179),'browser_snapshot':_0x4f7c94(0xe9),'browser_screenshot':_0x4f7c94(0x166),'browser_get_text':_0x4f7c94(0x193),'browser_close':_0x4f7c94(0x1a8)},_0x39fda9=_0x2f0128[_0x3ba7b2[_0x4f7c94(0x154)]]||_0x3ba7b2['name'];let _0x116322='';if(_0x3ba7b2[_0x4f7c94(0x154)]==='run_command'&&_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x16d)])_0x116322=_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x16d)];else{if(_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x132)])_0x116322=_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x132)];else{if(_0x3ba7b2['args']['pattern'])_0x116322='\x22'+_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x17e)]+'\x22';else _0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x19d)]?_0x116322=_0x3ba7b2[_0x4f7c94(0xc3)]['url']:_0x116322=Object[_0x4f7c94(0xe0)](_0x3ba7b2[_0x4f7c94(0xc3)])[0x0]||'';}}const _0x13fdfe=_0x116322[_0x4f7c94(0xe1)]>0x32?_0x116322[_0x4f7c94(0x1a0)](0x0,0x2f)+_0x4f7c94(0x158):_0x116322,_0x4fa32b=a4_0x14b1a5[_0x4f7c94(0x19b)](_0x39fda9+'('+_0x13fdfe+')');_0x4fa32b[_0x4f7c94(0xd7)]();const _0xbe34ef=performance[_0x4f7c94(0xcb)]();let _0x26b498;try{_0x26b498=await executeToolCall(_0x3ba7b2['name'],_0x3ba7b2[_0x4f7c94(0xc3)]);}catch(_0x13f981){if(_0x13f981[_0x4f7c94(0x104)]&&_0x13f981[_0x4f7c94(0x104)][_0x4f7c94(0x168)](_0x4f7c94(0x139))){const _0x4d2bcb=await getMcpTools(),_0x189b59=_0x4d2bcb['find'](_0x1a2f4c=>_0x1a2f4c[_0x4f7c94(0x154)]===_0x3ba7b2[_0x4f7c94(0x154)]);if(_0x189b59)try{_0x26b498=await executeMcpTool(_0x189b59['serverName'],_0x189b59[_0x4f7c94(0x154)],_0x3ba7b2['args']);}catch(_0x3fb6b1){throw new Error('MCP\x20Tool\x20error:\x20'+_0x3fb6b1);}else throw _0x13f981;}else throw _0x13f981;}const _0x2f2801=((performance['now']()-_0xbe34ef)/0x3e8)['toFixed'](0x1);_0x4fa32b[_0x4f7c94(0x115)]();let _0xbc8881=_0x4f7c94(0x14e)+_0x2f2801+'s',_0x251acb=![];if(_0x3ba7b2[_0x4f7c94(0x154)]==='run_command'&&_0x26b498&&typeof _0x26b498==='object'){const _0x1bcf01=_0x26b498;if(_0x1bcf01['exitCode']===0x0){const _0x2d415b=_0x1bcf01[_0x4f7c94(0x161)]?_0x1bcf01[_0x4f7c94(0x161)][_0x4f7c94(0x123)]('\x0a')[_0x4f7c94(0xe1)]:0x0;_0xbc8881=_0x4f7c94(0x136)+_0x2d415b+_0x4f7c94(0xc5)+_0x2f2801+'s)';}else _0x1bcf01[_0x4f7c94(0x120)]!==undefined&&(_0x251acb=!![],_0xbc8881=_0x4f7c94(0x167)+_0x1bcf01[_0x4f7c94(0x120)],_0x1bcf01[_0x4f7c94(0xed)]&&(_0xbc8881+=':\x20'+_0x1bcf01[_0x4f7c94(0xed)][_0x4f7c94(0x123)]('\x0a')[0x0][_0x4f7c94(0x14d)](0x0,0x64)));}else{if(_0x3ba7b2[_0x4f7c94(0x154)]===_0x4f7c94(0x191)&&_0x26b498&&typeof _0x26b498['content']===_0x4f7c94(0x196)){const _0x8c8f3e=_0x26b498['content'][_0x4f7c94(0x123)]('\x0a')['length'];_0xbc8881='Read\x20'+_0x8c8f3e+_0x4f7c94(0x14a)+_0x2f2801+'s)';}else{if(_0x3ba7b2[_0x4f7c94(0x154)]==='edit_file')_0xbc8881=_0x4f7c94(0x19e)+_0x2f2801+'s)';else _0x26b498&&typeof _0x26b498==='object'&&_0x4f7c94(0x157)in _0x26b498&&(_0x251acb=!![],_0xbc8881='Error:\x20'+_0x26b498[_0x4f7c94(0x157)]);}}a4_0x14b1a5[_0x4f7c94(0x170)](_0x39fda9,_0x13fdfe,_0xbc8881,_0x251acb),_0x5e1c87['push']({'role':_0x4f7c94(0xf2),'content':_0x4f7c94(0x150)+_0x3ba7b2['name']+':\x0a'+JSON[_0x4f7c94(0x105)](_0x26b498,null,0x2)}),await new Promise(_0x3b3801=>setTimeout(_0x3b3801,0x1f4));}catch(_0x498b75){a4_0x14b1a5['toolSuccess'](_0x4f7c94(0xcc),_0x4f7c94(0x12c),_0x498b75['message']||String(_0x498b75),!![]),_0x5e1c87['push']({'role':_0x4f7c94(0xf2),'content':_0x4f7c94(0xcf)+_0x498b75+_0x4f7c94(0x108)});}}_0x2c3bcf>=_0x4e46b2&&a4_0x14b1a5[_0x4f7c94(0x10b)](_0x4f7c94(0x153));}async function executeToolCall(_0x5932f7,_0x527963){const _0x2af1d6=a4_0x407f59;switch(_0x5932f7){case _0x2af1d6(0x195):return createFile(_0x527963[_0x2af1d6(0x132)],_0x527963[_0x2af1d6(0xf5)]);case _0x2af1d6(0x191):return readFile(_0x527963['path']);case _0x2af1d6(0x143):return listDirectory(_0x527963['path']||'.');case _0x2af1d6(0x1a3):return editFile(_0x527963[_0x2af1d6(0x132)],_0x527963['search'],_0x527963[_0x2af1d6(0x16b)]);case'search_file':return searchFile(_0x527963[_0x2af1d6(0x132)],_0x527963['pattern']);case _0x2af1d6(0xd5):const {command:_0x3e8789,background:_0x178264,wait:_0x5e0b75}=_0x527963,_0x44e639=await runCommand(_0x3e8789,undefined,_0x178264,_0x5e0b75);return _0x44e639;case _0x2af1d6(0xfe):{const {findFiles:_0x47565b}=await import(_0x2af1d6(0x199));return _0x47565b(_0x527963[_0x2af1d6(0x132)]||'.',_0x527963[_0x2af1d6(0x17e)]);}case _0x2af1d6(0x17c):{const {searchDirectory:_0x490d78}=await import(_0x2af1d6(0x199));return _0x490d78(_0x527963[_0x2af1d6(0x132)]||'.',_0x527963['pattern']);}case _0x2af1d6(0x185):{const {readFile:_0x14bc41}=await import(_0x2af1d6(0xfa));return _0x14bc41(_0x527963[_0x2af1d6(0xca)],_0x527963[_0x2af1d6(0x171)],_0x527963[_0x2af1d6(0x132)],_0x527963[_0x2af1d6(0x162)]);}case'github_create_pr':{const {createPullRequest:_0x340247}=await import(_0x2af1d6(0xfa));return _0x340247(_0x527963['owner'],_0x527963[_0x2af1d6(0x171)],_0x527963['title'],_0x527963['head'],_0x527963[_0x2af1d6(0x17d)],_0x527963[_0x2af1d6(0x131)]);}case _0x2af1d6(0x125):{const {createBranch:_0x41b86c}=await import(_0x2af1d6(0xfa));return _0x41b86c(_0x527963[_0x2af1d6(0xca)],_0x527963[_0x2af1d6(0x171)],_0x527963[_0x2af1d6(0xd4)],_0x527963[_0x2af1d6(0xfb)]);}case'browser_open':{const {browserOpen:_0x48efff,startBrowserServer:_0xb36b60,isBrowserServerRunning:_0x4e945f}=await import(_0x2af1d6(0x128));return!_0x4e945f()&&await _0xb36b60(),_0x48efff(_0x527963[_0x2af1d6(0x19d)]);}case _0x2af1d6(0x178):{const {browserClick:_0x239c74}=await import(_0x2af1d6(0x128));return _0x239c74(_0x527963[_0x2af1d6(0x137)]);}case _0x2af1d6(0x133):{const {browserFill:_0x3272d2}=await import(_0x2af1d6(0x128));return _0x3272d2(_0x527963['selector'],_0x527963[_0x2af1d6(0x11b)]);}case _0x2af1d6(0x187):{const {browserSnapshot:_0x48d27a}=await import(_0x2af1d6(0x128));return _0x48d27a();}case _0x2af1d6(0x100):{const {browserScreenshot:_0x348762}=await import(_0x2af1d6(0x128));return _0x348762();}case'browser_get_text':{const {browserGetText:_0x432b01}=await import(_0x2af1d6(0x128));return _0x432b01(_0x527963[_0x2af1d6(0x137)]);}case _0x2af1d6(0xd2):{const {browserClose:_0x5256be}=await import(_0x2af1d6(0x128));return _0x5256be();}default:return{'error':_0x2af1d6(0xc0)+_0x5932f7};}}
@@ -1 +1 @@
1
- const a5_0x3e51da=a5_0x4bb4;(function(_0x47c2d7,_0x1d35b8){const _0x3daf77=a5_0x4bb4,_0x5b8856=_0x47c2d7();while(!![]){try{const _0x3a27b6=parseInt(_0x3daf77(0x7f))/0x1+-parseInt(_0x3daf77(0x96))/0x2+parseInt(_0x3daf77(0x97))/0x3+-parseInt(_0x3daf77(0x8b))/0x4+parseInt(_0x3daf77(0x85))/0x5*(parseInt(_0x3daf77(0x91))/0x6)+-parseInt(_0x3daf77(0x7e))/0x7+parseInt(_0x3daf77(0x80))/0x8;if(_0x3a27b6===_0x1d35b8)break;else _0x5b8856['push'](_0x5b8856['shift']());}catch(_0x376e0f){_0x5b8856['push'](_0x5b8856['shift']());}}}(a5_0x5b24,0xaff28));import a5_0x18e802 from'conf';import a5_0x4e8623 from'path';function a5_0x4bb4(_0x599741,_0x367a8d){_0x599741=_0x599741-0x70;const _0x5b24a2=a5_0x5b24();let _0x4bb426=_0x5b24a2[_0x599741];return _0x4bb426;}import a5_0x4cbaa6 from'fs';import{fileURLToPath}from'url';const config=new a5_0x18e802({'projectName':a5_0x3e51da(0x87),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x4cb5ae=a5_0x3e51da,_0xdca53e=config[_0x4cb5ae(0x93)](_0x4cb5ae(0x92)),_0xdf124c=loadMcpConfigFile();return{..._0xdca53e,..._0xdf124c};}export function addMcpServer(_0x4810f5,_0x53deeb,_0x44f529=[],_0x5993aa){const _0x3ebd30=a5_0x3e51da,_0x405d34=config[_0x3ebd30(0x93)]('mcpServers');_0x405d34[_0x4810f5]={'type':_0x3ebd30(0x75),'command':_0x53deeb,'args':_0x44f529,'env':_0x5993aa},config[_0x3ebd30(0x86)](_0x3ebd30(0x92),_0x405d34);}export function addMcpHttpServer(_0x1f0743,_0x4a7e91){const _0x536480=a5_0x3e51da,_0x28cbac=config['get'](_0x536480(0x92));_0x28cbac[_0x1f0743]={'type':_0x536480(0x7a),'url':_0x4a7e91},config[_0x536480(0x86)](_0x536480(0x92),_0x28cbac);}export function removeMcpServer(_0x6712c9){const _0x20e914=a5_0x3e51da,_0x3e725b=config[_0x20e914(0x93)](_0x20e914(0x92));if(_0x3e725b[_0x6712c9])return delete _0x3e725b[_0x6712c9],config['set'](_0x20e914(0x92),_0x3e725b),!![];return![];}export function clearMcpServers(){config['set']('mcpServers',{});}function a5_0x5b24(){const _0x196681=['USERPROFILE','11365GtzWMr','set','woozlit-cli','endsWith','.js','includes','555048dDfueO','parse','.woozlit','npx','dirname','cwd','1098ylGbek','mcpServers','get','path','src','2595690IbQbxv','938172lIiTYn','computer-use.js','computer-use.ts','node','windows-mcp','existsSync','HOME','mcp-servers','stdio','join','computer-use','uvx','@modelcontextprotocol/server-filesystem','streamable-http','tsx','mcp.json','dist','8268960uFdBsQ','1241025cSWhUj','10950872cWwqWF','env','C:\x5cUsers','command'];a5_0x5b24=function(){return _0x196681;};return a5_0x5b24();}export function getMcpServer(_0x35a664){return getMcpServers()[_0x35a664];}function loadMcpConfigFile(){const _0x5c4dd2=a5_0x3e51da,_0x6309c6=[a5_0x4e8623[_0x5c4dd2(0x76)](process[_0x5c4dd2(0x90)](),_0x5c4dd2(0x7c)),a5_0x4e8623[_0x5c4dd2(0x76)](process[_0x5c4dd2(0x90)](),'.woozlit',_0x5c4dd2(0x7c)),a5_0x4e8623[_0x5c4dd2(0x76)](process[_0x5c4dd2(0x81)][_0x5c4dd2(0x73)]||process['env'][_0x5c4dd2(0x84)]||'',_0x5c4dd2(0x8d),_0x5c4dd2(0x7c))];for(const _0x12d0c6 of _0x6309c6){try{if(a5_0x4cbaa6[_0x5c4dd2(0x72)](_0x12d0c6)){const _0x4282ec=a5_0x4cbaa6['readFileSync'](_0x12d0c6,'utf-8'),_0x2257e9=JSON[_0x5c4dd2(0x8c)](_0x4282ec);if(_0x2257e9['mcpServers']&&typeof _0x2257e9[_0x5c4dd2(0x92)]==='object')return _0x2257e9[_0x5c4dd2(0x92)];}}catch{}}return{};}export function ensureDefaultServers(){const _0x4f6180=a5_0x3e51da,_0x352827=config[_0x4f6180(0x93)](_0x4f6180(0x92)),_0x631737=fileURLToPath(import.meta.url),_0x11260c=a5_0x4e8623[_0x4f6180(0x8f)](_0x631737),_0x32f84c=_0x11260c[_0x4f6180(0x8a)](_0x4f6180(0x7d))||_0x631737[_0x4f6180(0x88)](_0x4f6180(0x89)),_0x1f6795=_0x32f84c?a5_0x4e8623[_0x4f6180(0x76)](_0x11260c,'..',_0x4f6180(0x74),_0x4f6180(0x98)):a5_0x4e8623['join'](_0x11260c,'..','..',_0x4f6180(0x95),_0x4f6180(0x74),_0x4f6180(0x99)),_0xd1e561=_0x32f84c?_0x4f6180(0x70):_0x4f6180(0x7b);_0x352827[_0x4f6180(0x77)]={'type':'stdio','command':_0xd1e561,'args':[_0x1f6795],'env':{}},(!_0x352827[_0x4f6180(0x71)]||_0x352827[_0x4f6180(0x71)][_0x4f6180(0x83)]===_0x4f6180(0x78))&&(_0x352827['windows-mcp']={'type':_0x4f6180(0x75),'command':_0x4f6180(0x8e),'args':['-y',_0x4f6180(0x79),_0x4f6180(0x82)],'env':{}}),config['set'](_0x4f6180(0x92),_0x352827);}export function getConfigFilePath(){const _0x3b8c0c=a5_0x3e51da;return config[_0x3b8c0c(0x94)];}
1
+ const a5_0x401de1=a5_0x3ca1;(function(_0x55b9af,_0x3021e4){const _0x5439ab=a5_0x3ca1,_0xf1fa5e=_0x55b9af();while(!![]){try{const _0x4ba011=-parseInt(_0x5439ab(0x1fc))/0x1+parseInt(_0x5439ab(0x209))/0x2*(-parseInt(_0x5439ab(0x200))/0x3)+-parseInt(_0x5439ab(0x1f4))/0x4+-parseInt(_0x5439ab(0x1f7))/0x5+parseInt(_0x5439ab(0x20a))/0x6*(-parseInt(_0x5439ab(0x1f8))/0x7)+parseInt(_0x5439ab(0x206))/0x8+parseInt(_0x5439ab(0x1fe))/0x9;if(_0x4ba011===_0x3021e4)break;else _0xf1fa5e['push'](_0xf1fa5e['shift']());}catch(_0x3941ba){_0xf1fa5e['push'](_0xf1fa5e['shift']());}}}(a5_0x1f03,0xb17b0));import a5_0x4b33c5 from'conf';function a5_0x1f03(){const _0x38e758=['computer-use','computer-use.js','command','dist','2666976RpjGKm','endsWith','path','7013925HlLJXK','14LbqNan','set','C:\x5cUsers','includes','751461Vldjad','windows-mcp','43310142pqWUDX','dirname','6OpBmVB','env','readFileSync','woozlit-cli','get','computer-use.ts','7584400wMySAC','streamable-http','src','808594WzkBLb','4211232UtgEjl','existsSync','mcp-servers','mcp.json','stdio','HOME','utf-8','cwd','object','mcpServers','join','.woozlit','parse'];a5_0x1f03=function(){return _0x38e758;};return a5_0x1f03();}import a5_0xead868 from'path';import a5_0x3bf8b4 from'fs';import{fileURLToPath}from'url';function a5_0x3ca1(_0x10055a,_0xe27fcd){_0x10055a=_0x10055a-0x1e4;const _0x1f03d5=a5_0x1f03();let _0x3ca18c=_0x1f03d5[_0x10055a];return _0x3ca18c;}const config=new a5_0x4b33c5({'projectName':a5_0x401de1(0x203),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x517889=a5_0x401de1,_0x5f38ef=config[_0x517889(0x204)]('mcpServers'),_0xbe58f5=loadMcpConfigFile();return{..._0x5f38ef,..._0xbe58f5};}export function addMcpServer(_0x292dbd,_0x1fb5ea,_0x1af2ce=[],_0x5158db){const _0x20b0c5=a5_0x401de1,_0x342b29=config['get'](_0x20b0c5(0x1ec));_0x342b29[_0x292dbd]={'type':_0x20b0c5(0x1e7),'command':_0x1fb5ea,'args':_0x1af2ce,'env':_0x5158db},config[_0x20b0c5(0x1f9)](_0x20b0c5(0x1ec),_0x342b29);}export function addMcpHttpServer(_0x2fb05c,_0x3d3a1d){const _0x82b3ae=a5_0x401de1,_0x1c3e67=config[_0x82b3ae(0x204)](_0x82b3ae(0x1ec));_0x1c3e67[_0x2fb05c]={'type':_0x82b3ae(0x207),'url':_0x3d3a1d},config[_0x82b3ae(0x1f9)](_0x82b3ae(0x1ec),_0x1c3e67);}export function removeMcpServer(_0x1d7d4d){const _0x114401=a5_0x401de1,_0x4a40f3=config[_0x114401(0x204)](_0x114401(0x1ec));if(_0x4a40f3[_0x1d7d4d])return delete _0x4a40f3[_0x1d7d4d],config[_0x114401(0x1f9)]('mcpServers',_0x4a40f3),!![];return![];}export function clearMcpServers(){const _0x103d8a=a5_0x401de1;config[_0x103d8a(0x1f9)](_0x103d8a(0x1ec),{});}export function getMcpServer(_0x51392b){return getMcpServers()[_0x51392b];}function loadMcpConfigFile(){const _0x4452d2=a5_0x401de1,_0x5ac724=[a5_0xead868['join'](process[_0x4452d2(0x1ea)](),'mcp.json'),a5_0xead868[_0x4452d2(0x1ed)](process['cwd'](),'.woozlit',_0x4452d2(0x1e6)),a5_0xead868[_0x4452d2(0x1ed)](process[_0x4452d2(0x201)][_0x4452d2(0x1e8)]||process[_0x4452d2(0x201)]['USERPROFILE']||'',_0x4452d2(0x1ee),'mcp.json')];for(const _0xa61241 of _0x5ac724){try{if(a5_0x3bf8b4[_0x4452d2(0x1e4)](_0xa61241)){const _0x1fe3b8=a5_0x3bf8b4[_0x4452d2(0x202)](_0xa61241,_0x4452d2(0x1e9)),_0x4c4be1=JSON[_0x4452d2(0x1ef)](_0x1fe3b8);if(_0x4c4be1['mcpServers']&&typeof _0x4c4be1[_0x4452d2(0x1ec)]===_0x4452d2(0x1eb))return _0x4c4be1[_0x4452d2(0x1ec)];}}catch{}}return{};}export function ensureDefaultServers(){const _0x2feb9e=a5_0x401de1,_0x555a39=config['get'](_0x2feb9e(0x1ec)),_0x461b42=fileURLToPath(import.meta.url),_0x2f7b3a=a5_0xead868[_0x2feb9e(0x1ff)](_0x461b42),_0x57e0a7=_0x2f7b3a[_0x2feb9e(0x1fb)](_0x2feb9e(0x1f3))||_0x461b42[_0x2feb9e(0x1f5)]('.js'),_0x308bec=_0x57e0a7?a5_0xead868['join'](_0x2f7b3a,'..',_0x2feb9e(0x1e5),_0x2feb9e(0x1f1)):a5_0xead868['join'](_0x2f7b3a,'..','..',_0x2feb9e(0x208),_0x2feb9e(0x1e5),_0x2feb9e(0x205)),_0x314dce=_0x57e0a7?'node':'tsx';_0x555a39[_0x2feb9e(0x1f0)]={'type':_0x2feb9e(0x1e7),'command':_0x314dce,'args':[_0x308bec],'env':{}},(!_0x555a39[_0x2feb9e(0x1fd)]||_0x555a39[_0x2feb9e(0x1fd)][_0x2feb9e(0x1f2)]==='uvx')&&(_0x555a39['windows-mcp']={'type':'stdio','command':'npx','args':['-y','@modelcontextprotocol/server-filesystem',_0x2feb9e(0x1fa)],'env':{}}),config['set']('mcpServers',_0x555a39);}export function getConfigFilePath(){const _0x4b5bd5=a5_0x401de1;return config[_0x4b5bd5(0x1f6)];}
@@ -1 +1 @@
1
- const a6_0x44dbe0=a6_0x23d0;(function(_0x5426cb,_0x176a5c){const _0x47e652=a6_0x23d0,_0x2772fc=_0x5426cb();while(!![]){try{const _0x5d6c91=parseInt(_0x47e652(0x11b))/0x1+parseInt(_0x47e652(0x117))/0x2*(parseInt(_0x47e652(0x139))/0x3)+-parseInt(_0x47e652(0x137))/0x4+parseInt(_0x47e652(0x13a))/0x5*(-parseInt(_0x47e652(0x131))/0x6)+-parseInt(_0x47e652(0x12f))/0x7*(parseInt(_0x47e652(0x12b))/0x8)+-parseInt(_0x47e652(0x118))/0x9+parseInt(_0x47e652(0x128))/0xa;if(_0x5d6c91===_0x176a5c)break;else _0x2772fc['push'](_0x2772fc['shift']());}catch(_0x102d73){_0x2772fc['push'](_0x2772fc['shift']());}}}(a6_0x3634,0xaf667));const API_URL=process[a6_0x44dbe0(0x13b)][a6_0x44dbe0(0x122)]||a6_0x44dbe0(0x12e),PROD_URL=a6_0x44dbe0(0x12e);export function getApiUrl(){return API_URL;}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}function a6_0x23d0(_0x885c68,_0x38b21c){_0x885c68=_0x885c68-0x116;const _0x363416=a6_0x3634();let _0x23d0c6=_0x363416[_0x885c68];return _0x23d0c6;}export const MODELS=[{'id':a6_0x44dbe0(0x12c),'name':'Woozie','description':a6_0x44dbe0(0x140),'xp':0x1},{'id':a6_0x44dbe0(0x125),'name':a6_0x44dbe0(0x12d),'description':a6_0x44dbe0(0x116),'xp':0x5},{'id':'gemini-3-pro-preview','name':a6_0x44dbe0(0x142),'description':a6_0x44dbe0(0x127),'xp':0x5},{'id':a6_0x44dbe0(0x141),'name':a6_0x44dbe0(0x11a),'description':'Xiaomi\x27s\x20fast\x20AI\x20model','xp':0x1},{'id':a6_0x44dbe0(0x11e),'name':a6_0x44dbe0(0x13d),'description':'Alibaba\x27s\x20largest','xp':0x2},{'id':'qwen/qwen3-coder:free','name':a6_0x44dbe0(0x11d),'description':'Coding\x20specialist','xp':0x2},{'id':a6_0x44dbe0(0x124),'name':a6_0x44dbe0(0x121),'description':a6_0x44dbe0(0x13c),'xp':0x2},{'id':a6_0x44dbe0(0x123),'name':a6_0x44dbe0(0x136),'description':a6_0x44dbe0(0x12a),'xp':0x3},{'id':a6_0x44dbe0(0x134),'name':a6_0x44dbe0(0x120),'description':'Developer-focused','xp':0x2},{'id':a6_0x44dbe0(0x135),'name':a6_0x44dbe0(0x11c),'description':a6_0x44dbe0(0x132),'xp':0x2},{'id':a6_0x44dbe0(0x13f),'name':a6_0x44dbe0(0x119),'description':a6_0x44dbe0(0x138),'xp':0x1},{'id':'moonshotai/kimi-k2','name':a6_0x44dbe0(0x11f),'description':a6_0x44dbe0(0x126),'xp':0x3},{'id':a6_0x44dbe0(0x133),'name':a6_0x44dbe0(0x130),'description':a6_0x44dbe0(0x13e),'xp':0x2},{'id':'deepseek/deepseek-r1','name':'DeepSeek\x20R1','description':a6_0x44dbe0(0x129),'xp':0x3}];function a6_0x3634(){const _0x1917d4=['nvidia/nemotron-nano-12b-v2-vl:free','Fast\x20and\x20capable\x20(Default)','xiaomi/mimo-v2-flash:free','Gemini\x203\x20Pro','Latest\x20Gemini\x203\x20model','10rdwWKC','1465137bPsibR','Nemotron\x20Nano\x2012B','MiMo\x20V2','99355buuISM','Mistral\x20Small\x203.2','Qwen3\x20Coder','qwen/qwen3-235b-a22b:free','Kimi\x20K2','Devstral\x20Small','Llama\x203.3\x2070B','WOOZLIT_API_URL','meta-llama/llama-4-maverick','meta-llama/llama-3.3-70b-instruct:free','gemini-3-flash-preview','Reasoning\x20model','Most\x20powerful\x20Gemini','25251290WQjXwV','Advanced\x20reasoning','Meta\x27s\x20latest','730704YRJFGR','gemini-2.5-flash','Gemini\x203\x20Flash','https://woozlit.com','91PziuEQ','DeepSeek\x20V3','3882skZIGp','Latest\x20Mistral','deepseek/deepseek-chat','mistralai/devstral-small','mistralai/mistral-small-3.2-24b-instruct','Llama\x204\x20Maverick','2308328sEpced','NVIDIA\x20vision','169179IJPqvH','2015aCpJUw','env','Meta\x27s\x20powerful\x20model','Qwen3\x20235B','DeepSeek\x27s\x20latest\x20V3'];a6_0x3634=function(){return _0x1917d4;};return a6_0x3634();}export const DEFAULT_MODEL=a6_0x44dbe0(0x12c);
1
+ function a6_0xca46(){const _0x24aee7=['12507552wVuTjy','Qwen3\x20Coder','5689374olGfXR','MiMo\x20V2','deepseek/deepseek-r1','https://woozlit.com','Latest\x20Mistral','mistralai/mistral-small-3.2-24b-instruct','gemini-2.5-flash','Kimi\x20K2','DeepSeek\x20R1','gemini-3-flash-preview','5684368GuLDNv','moonshotai/kimi-k2','Fast\x20and\x20capable\x20(Default)','qwen/qwen3-235b-a22b:free','nvidia/nemotron-nano-12b-v2-vl:free','Gemini\x203\x20Pro','57694mXeXZu','Coding\x20specialist','Xiaomi\x27s\x20fast\x20AI\x20model','Most\x20powerful\x20Gemini','Meta\x27s\x20latest','meta-llama/llama-4-maverick','NVIDIA\x20vision','WOOZLIT_API_URL','1266520XzTCMN','Reasoning\x20model','Woozie','Alibaba\x27s\x20largest','Developer-focused','env','864diBIOv','xiaomi/mimo-v2-flash:free','25577lxDusJ','76jiZYNe','Devstral\x20Small','22779783fqCcDH','DeepSeek\x27s\x20latest\x20V3','Gemini\x203\x20Flash','Llama\x204\x20Maverick','meta-llama/llama-3.3-70b-instruct:free'];a6_0xca46=function(){return _0x24aee7;};return a6_0xca46();}function a6_0x4321(_0x1c2fd0,_0x46c0d6){_0x1c2fd0=_0x1c2fd0-0x1e7;const _0xca46a2=a6_0xca46();let _0x432184=_0xca46a2[_0x1c2fd0];return _0x432184;}const a6_0x583f7c=a6_0x4321;(function(_0x160dfb,_0x1bbbb1){const _0x2105a1=a6_0x4321,_0x5600a1=_0x160dfb();while(!![]){try{const _0x59b8df=parseInt(_0x2105a1(0x205))/0x1*(parseInt(_0x2105a1(0x206))/0x2)+parseInt(_0x2105a1(0x20f))/0x3+-parseInt(_0x2105a1(0x1ef))/0x4+-parseInt(_0x2105a1(0x1fd))/0x5+-parseInt(_0x2105a1(0x203))/0x6*(parseInt(_0x2105a1(0x1f5))/0x7)+-parseInt(_0x2105a1(0x20d))/0x8+parseInt(_0x2105a1(0x208))/0x9;if(_0x59b8df===_0x1bbbb1)break;else _0x5600a1['push'](_0x5600a1['shift']());}catch(_0x1bb3f5){_0x5600a1['push'](_0x5600a1['shift']());}}}(a6_0xca46,0xedfbf));const API_URL=process[a6_0x583f7c(0x202)][a6_0x583f7c(0x1fc)]||a6_0x583f7c(0x1e8),PROD_URL=a6_0x583f7c(0x1e8);export function getApiUrl(){return API_URL;}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':a6_0x583f7c(0x1eb),'name':a6_0x583f7c(0x1ff),'description':a6_0x583f7c(0x1f1),'xp':0x1},{'id':a6_0x583f7c(0x1ee),'name':a6_0x583f7c(0x20a),'description':'Latest\x20Gemini\x203\x20model','xp':0x5},{'id':'gemini-3-pro-preview','name':a6_0x583f7c(0x1f4),'description':a6_0x583f7c(0x1f8),'xp':0x5},{'id':a6_0x583f7c(0x204),'name':a6_0x583f7c(0x210),'description':a6_0x583f7c(0x1f7),'xp':0x1},{'id':a6_0x583f7c(0x1f2),'name':'Qwen3\x20235B','description':a6_0x583f7c(0x200),'xp':0x2},{'id':'qwen/qwen3-coder:free','name':a6_0x583f7c(0x20e),'description':a6_0x583f7c(0x1f6),'xp':0x2},{'id':a6_0x583f7c(0x20c),'name':'Llama\x203.3\x2070B','description':'Meta\x27s\x20powerful\x20model','xp':0x2},{'id':a6_0x583f7c(0x1fa),'name':a6_0x583f7c(0x20b),'description':a6_0x583f7c(0x1f9),'xp':0x3},{'id':'mistralai/devstral-small','name':a6_0x583f7c(0x207),'description':a6_0x583f7c(0x201),'xp':0x2},{'id':a6_0x583f7c(0x1ea),'name':'Mistral\x20Small\x203.2','description':a6_0x583f7c(0x1e9),'xp':0x2},{'id':a6_0x583f7c(0x1f3),'name':'Nemotron\x20Nano\x2012B','description':a6_0x583f7c(0x1fb),'xp':0x1},{'id':a6_0x583f7c(0x1f0),'name':a6_0x583f7c(0x1ec),'description':a6_0x583f7c(0x1fe),'xp':0x3},{'id':'deepseek/deepseek-chat','name':'DeepSeek\x20V3','description':a6_0x583f7c(0x209),'xp':0x2},{'id':a6_0x583f7c(0x1e7),'name':a6_0x583f7c(0x1ed),'description':'Advanced\x20reasoning','xp':0x3}];export const DEFAULT_MODEL=a6_0x583f7c(0x1eb);
@@ -1 +1 @@
1
- (function(_0x381265,_0x4d8f20){const _0x334190=a7_0x417d,_0x1ddba1=_0x381265();while(!![]){try{const _0x3c9c6c=parseInt(_0x334190(0x156))/0x1+-parseInt(_0x334190(0x165))/0x2+parseInt(_0x334190(0x146))/0x3*(-parseInt(_0x334190(0x15c))/0x4)+-parseInt(_0x334190(0x160))/0x5*(parseInt(_0x334190(0x152))/0x6)+-parseInt(_0x334190(0x155))/0x7*(parseInt(_0x334190(0x145))/0x8)+parseInt(_0x334190(0x166))/0x9+parseInt(_0x334190(0x13f))/0xa*(parseInt(_0x334190(0x149))/0xb);if(_0x3c9c6c===_0x4d8f20)break;else _0x1ddba1['push'](_0x1ddba1['shift']());}catch(_0x314fcc){_0x1ddba1['push'](_0x1ddba1['shift']());}}}(a7_0x199b,0xf0507));function a7_0x199b(){const _0x3b46ad=['sendTyping','login','7NFFfhd','1905093ovvTTx','Sorry,\x20I\x20encountered\x20an\x20error\x20processing\x20that.','reply','ready','channelId','assistant','353844sgXFMp','destroy','catch','user','120560grJOmF','once','You\x20are\x20Woozlit,\x20a\x20helpful\x20AI\x20assistant\x20connected\x20via\x20Discord.\x20Keep\x20responses\x20concise.','mentions','error','2324730NCzaTv','17157150sKCoFD','length','author','success','system','getBotToken','bot','username','has','get','set','1708370PmFPTm','trim','push','channel','[Discord]\x20','message','10021736WUhLXu','15gnjhzI','Guilds','match','33TqqMua','type','messageCreate','Channel','MessageContent','tag','content','[Discord]\x20Error:\x20','replace','120PAMRFO'];a7_0x199b=function(){return _0x3b46ad;};return a7_0x199b();}import{Client,GatewayIntentBits,ChannelType,Partials}from'discord.js';import*as a7_0x2323b2 from'./config.js';import*as a7_0x295969 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let client=null,isRunning=![];const chatHistories=new Map();function a7_0x417d(_0x895f14,_0x5a6d76){_0x895f14=_0x895f14-0x13f;const _0x199be2=a7_0x199b();let _0x417d6f=_0x199be2[_0x895f14];return _0x417d6f;}export async function startBot(){const _0x18db7f=a7_0x417d,_0x581c15=a7_0x2323b2[_0x18db7f(0x16b)]();if(!_0x581c15)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits[_0x18db7f(0x147)],GatewayIntentBits['GuildMessages'],GatewayIntentBits[_0x18db7f(0x14d)],GatewayIntentBits['DirectMessages']],'partials':[Partials[_0x18db7f(0x14c)]]}),client[_0x18db7f(0x161)](_0x18db7f(0x159),()=>{const _0x5d5a26=_0x18db7f;a7_0x295969[_0x5d5a26(0x169)]('[Discord]\x20Connected\x20as\x20'+client?.[_0x5d5a26(0x15f)]?.[_0x5d5a26(0x14e)]),isRunning=!![];}),client['on'](_0x18db7f(0x14b),async _0x29ba2f=>{const _0x1e88d9=_0x18db7f;if(_0x29ba2f[_0x1e88d9(0x168)][_0x1e88d9(0x16c)])return;const _0x6bfa10=_0x29ba2f[_0x1e88d9(0x142)][_0x1e88d9(0x14a)]===ChannelType['DM'],_0x476c97=client?.[_0x1e88d9(0x15f)]&&_0x29ba2f[_0x1e88d9(0x163)][_0x1e88d9(0x16e)](client[_0x1e88d9(0x15f)]);if(!_0x6bfa10&&!_0x476c97)return;await _0x29ba2f[_0x1e88d9(0x142)][_0x1e88d9(0x153)]()[_0x1e88d9(0x15e)](()=>{});const _0x31bf9b=_0x29ba2f[_0x1e88d9(0x168)]['id'],_0x3126e6=(_0x29ba2f['guildId']||'dm')+'-'+_0x29ba2f[_0x1e88d9(0x15a)]+'-'+_0x31bf9b;!chatHistories[_0x1e88d9(0x16e)](_0x3126e6)&&chatHistories[_0x1e88d9(0x170)](_0x3126e6,[{'role':_0x1e88d9(0x16a),'content':_0x1e88d9(0x162)}]);const _0x24fa74=chatHistories[_0x1e88d9(0x16f)](_0x3126e6),_0x50bc50=_0x29ba2f[_0x1e88d9(0x14f)][_0x1e88d9(0x151)](/<@!?[0-9]+>/g,'')[_0x1e88d9(0x140)]();if(!_0x50bc50)return;_0x24fa74[_0x1e88d9(0x141)]({'role':_0x1e88d9(0x15f),'content':_0x50bc50}),a7_0x295969['info'](_0x1e88d9(0x143)+_0x29ba2f[_0x1e88d9(0x168)][_0x1e88d9(0x16d)]+':\x20'+_0x50bc50);const _0x5a04d0=getSelectedModel();try{let _0x5e0ff8='';const _0x5ab1fe=await sendChatMessage(_0x5a04d0,_0x24fa74,_0x4da171=>{_0x5e0ff8+=_0x4da171;});_0x5e0ff8=_0x5ab1fe['content'],_0x24fa74['push']({'role':_0x1e88d9(0x15b),'content':_0x5e0ff8});if(_0x5e0ff8[_0x1e88d9(0x167)]>0x7d0){const _0x30c7be=_0x5e0ff8[_0x1e88d9(0x148)](/[\s\S]{1,2000}/g)||[];for(const _0x38cf7c of _0x30c7be){await _0x29ba2f[_0x1e88d9(0x158)](_0x38cf7c);}}else await _0x29ba2f[_0x1e88d9(0x158)](_0x5e0ff8);}catch(_0x2bd089){a7_0x295969[_0x1e88d9(0x164)](_0x1e88d9(0x150)+_0x2bd089[_0x1e88d9(0x144)]),await _0x29ba2f[_0x1e88d9(0x158)](_0x1e88d9(0x157));}}),await client[_0x18db7f(0x154)](_0x581c15),!![];}catch(_0xa84999){return a7_0x295969[_0x18db7f(0x164)]('[Discord]\x20Failed\x20to\x20start:\x20'+_0xa84999[_0x18db7f(0x144)]),![];}}export function stopBot(){const _0x22a5f1=a7_0x417d;client&&(client[_0x22a5f1(0x15d)](),client=null),isRunning=![];}export function isBotRunning(){return isRunning;}
1
+ (function(_0x552bc1,_0x316c00){const _0x228f90=a7_0x38fd,_0xbe06f7=_0x552bc1();while(!![]){try{const _0x559b45=parseInt(_0x228f90(0xe5))/0x1*(parseInt(_0x228f90(0xf0))/0x2)+-parseInt(_0x228f90(0x104))/0x3*(parseInt(_0x228f90(0xe0))/0x4)+parseInt(_0x228f90(0xeb))/0x5+-parseInt(_0x228f90(0x102))/0x6*(-parseInt(_0x228f90(0xff))/0x7)+-parseInt(_0x228f90(0xe7))/0x8*(-parseInt(_0x228f90(0x103))/0x9)+-parseInt(_0x228f90(0xe9))/0xa+-parseInt(_0x228f90(0xe3))/0xb*(parseInt(_0x228f90(0xee))/0xc);if(_0x559b45===_0x316c00)break;else _0xbe06f7['push'](_0xbe06f7['shift']());}catch(_0x4d16a7){_0xbe06f7['push'](_0xbe06f7['shift']());}}}(a7_0x3706,0x5c046));import{Client,GatewayIntentBits,ChannelType,Partials}from'discord.js';import*as a7_0x4a67e1 from'./config.js';import*as a7_0x298953 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let client=null,isRunning=![];function a7_0x38fd(_0x44eb47,_0x49eead){_0x44eb47=_0x44eb47-0xdd;const _0x37063a=a7_0x3706();let _0x38fd6e=_0x37063a[_0x44eb47];return _0x38fd6e;}const chatHistories=new Map();export async function startBot(){const _0x422b72=a7_0x38fd,_0x53fbb3=a7_0x4a67e1['getBotToken']();if(!_0x53fbb3)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits['Guilds'],GatewayIntentBits[_0x422b72(0xe6)],GatewayIntentBits['MessageContent'],GatewayIntentBits['DirectMessages']],'partials':[Partials['Channel']]}),client[_0x422b72(0xe1)]('ready',()=>{const _0x3644c2=_0x422b72;a7_0x298953['success']('[Discord]\x20Connected\x20as\x20'+client?.[_0x3644c2(0xed)]?.[_0x3644c2(0xdf)]),isRunning=!![];}),client['on'](_0x422b72(0xec),async _0x3ebcb6=>{const _0x2530f5=_0x422b72;if(_0x3ebcb6[_0x2530f5(0x100)][_0x2530f5(0xfe)])return;const _0x4b5392=_0x3ebcb6[_0x2530f5(0xf7)]['type']===ChannelType['DM'],_0x4db1cc=client?.[_0x2530f5(0xed)]&&_0x3ebcb6[_0x2530f5(0x107)]['has'](client[_0x2530f5(0xed)]);if(!_0x4b5392&&!_0x4db1cc)return;await _0x3ebcb6[_0x2530f5(0xf7)][_0x2530f5(0x106)]()[_0x2530f5(0xde)](()=>{});const _0x326708=_0x3ebcb6['author']['id'],_0xe0f2ff=(_0x3ebcb6[_0x2530f5(0xfa)]||'dm')+'-'+_0x3ebcb6[_0x2530f5(0xf4)]+'-'+_0x326708;!chatHistories[_0x2530f5(0xf5)](_0xe0f2ff)&&chatHistories['set'](_0xe0f2ff,[{'role':_0x2530f5(0xe8),'content':_0x2530f5(0x101)}]);const _0x2a9474=chatHistories[_0x2530f5(0x105)](_0xe0f2ff),_0x361659=_0x3ebcb6['content'][_0x2530f5(0xe4)](/<@!?[0-9]+>/g,'')['trim']();if(!_0x361659)return;_0x2a9474[_0x2530f5(0xea)]({'role':_0x2530f5(0xed),'content':_0x361659}),a7_0x298953[_0x2530f5(0xef)](_0x2530f5(0xfb)+_0x3ebcb6[_0x2530f5(0x100)][_0x2530f5(0xf9)]+':\x20'+_0x361659);const _0x297e8c=getSelectedModel();try{let _0x291b0c='';const _0x4fad2c=await sendChatMessage(_0x297e8c,_0x2a9474,_0x247180=>{_0x291b0c+=_0x247180;});_0x291b0c=_0x4fad2c[_0x2530f5(0xf3)],_0x2a9474[_0x2530f5(0xea)]({'role':_0x2530f5(0xfc),'content':_0x291b0c});if(_0x291b0c[_0x2530f5(0x109)]>0x7d0){const _0x163919=_0x291b0c['match'](/[\s\S]{1,2000}/g)||[];for(const _0x4097c8 of _0x163919){await _0x3ebcb6[_0x2530f5(0xf2)](_0x4097c8);}}else await _0x3ebcb6[_0x2530f5(0xf2)](_0x291b0c);}catch(_0x10c1fb){a7_0x298953[_0x2530f5(0xf1)](_0x2530f5(0xf6)+_0x10c1fb[_0x2530f5(0xdd)]),await _0x3ebcb6['reply'](_0x2530f5(0xfd));}}),await client[_0x422b72(0xf8)](_0x53fbb3),!![];}catch(_0xa1b7f8){return a7_0x298953['error'](_0x422b72(0xe2)+_0xa1b7f8[_0x422b72(0xdd)]),![];}}function a7_0x3706(){const _0x24730c=['message','catch','tag','6644AvKwIw','once','[Discord]\x20Failed\x20to\x20start:\x20','22HZkVsQ','replace','23087qJmwBv','GuildMessages','3944ApHoib','system','4244660BWXPdR','push','1654295dUDFsO','messageCreate','user','8113104mvnsgu','info','38rhphjm','error','reply','content','channelId','has','[Discord]\x20Error:\x20','channel','login','username','guildId','[Discord]\x20','assistant','Sorry,\x20I\x20encountered\x20an\x20error\x20processing\x20that.','bot','281323grgAhB','author','You\x20are\x20Woozlit,\x20a\x20helpful\x20AI\x20assistant\x20connected\x20via\x20Discord.\x20Keep\x20responses\x20concise.','102qAUNSR','13734gwlMGm','93GJwsdn','get','sendTyping','mentions','destroy','length'];a7_0x3706=function(){return _0x24730c;};return a7_0x3706();}export function stopBot(){const _0x2c275c=a7_0x38fd;client&&(client[_0x2c275c(0x108)](),client=null),isRunning=![];}export function isBotRunning(){return isRunning;}
@@ -1 +1 @@
1
- const a8_0x1ed7fa=a8_0x35e1;(function(_0x2ce673,_0xbdc3a3){const _0x54d63c=a8_0x35e1,_0x2d6ff3=_0x2ce673();while(!![]){try{const _0x4c2d52=parseInt(_0x54d63c(0x19d))/0x1+-parseInt(_0x54d63c(0x197))/0x2*(-parseInt(_0x54d63c(0x19a))/0x3)+-parseInt(_0x54d63c(0x195))/0x4+parseInt(_0x54d63c(0x1ac))/0x5*(-parseInt(_0x54d63c(0x196))/0x6)+parseInt(_0x54d63c(0x1a8))/0x7*(-parseInt(_0x54d63c(0x1aa))/0x8)+-parseInt(_0x54d63c(0x19e))/0x9*(parseInt(_0x54d63c(0x1a7))/0xa)+parseInt(_0x54d63c(0x19f))/0xb;if(_0x4c2d52===_0xbdc3a3)break;else _0x2d6ff3['push'](_0x2d6ff3['shift']());}catch(_0x4f8382){_0x2d6ff3['push'](_0x2d6ff3['shift']());}}}(a8_0x46f0,0x574fb));import a8_0x5d1d32 from'conf';import a8_0x57394c from'crypto';const config=new a8_0x5d1d32({'projectName':'woozlit-cli-discord','defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x1ed7fa(0x199);function encrypt(_0x4f8332){const _0x1f7dfe=a8_0x1ed7fa;if(!_0x4f8332)return'';const _0x5c5c76=a8_0x57394c['randomBytes'](0x10),_0x18d495=a8_0x57394c[_0x1f7dfe(0x1a3)](_0x1f7dfe(0x193))[_0x1f7dfe(0x1a0)](ENCRYPTION_KEY)[_0x1f7dfe(0x1ab)](),_0x48d843=a8_0x57394c[_0x1f7dfe(0x1a9)](_0x1f7dfe(0x1ad),_0x18d495,_0x5c5c76);let _0x4bb969=_0x48d843[_0x1f7dfe(0x1a0)](_0x4f8332,'utf8','hex');return _0x4bb969+=_0x48d843[_0x1f7dfe(0x1ae)](_0x1f7dfe(0x1a2)),_0x5c5c76[_0x1f7dfe(0x1a6)]('hex')+':'+_0x4bb969;}function a8_0x35e1(_0x433758,_0x377367){_0x433758=_0x433758-0x193;const _0x46f008=a8_0x46f0();let _0x35e11c=_0x46f008[_0x433758];return _0x35e11c;}function decrypt(_0x4f0795){const _0x4cf42b=a8_0x1ed7fa;if(!_0x4f0795)return'';try{const [_0x1be82c,_0x4b6515]=_0x4f0795[_0x4cf42b(0x194)](':');if(!_0x1be82c||!_0x4b6515)return'';const _0x67979e=Buffer[_0x4cf42b(0x1a5)](_0x1be82c,_0x4cf42b(0x1a2)),_0x43d0c8=a8_0x57394c[_0x4cf42b(0x1a3)](_0x4cf42b(0x193))['update'](ENCRYPTION_KEY)['digest'](),_0xe1875a=a8_0x57394c[_0x4cf42b(0x1a4)](_0x4cf42b(0x1ad),_0x43d0c8,_0x67979e);let _0x36fe10=_0xe1875a[_0x4cf42b(0x1a0)](_0x4b6515,_0x4cf42b(0x1a2),'utf8');return _0x36fe10+=_0xe1875a[_0x4cf42b(0x1ae)](_0x4cf42b(0x19c)),_0x36fe10;}catch{return'';}}function a8_0x46f0(){const _0x143618=['createCipheriv','8zXXVUs','digest','5ZdcimY','aes-256-cbc','final','sha256','split','694616wAqUAO','2544042QMXerq','12634BtpoVp','get','woozlit_discord_secure_key','267MqlJUG','set','utf8','623082iFgToE','45MYOmtU','3643486GsbapK','update','botToken','hex','createHash','createDecipheriv','from','toString','779690RZYXJb','1199716qUwtbe'];a8_0x46f0=function(){return _0x143618;};return a8_0x46f0();}export function setBotToken(_0x329a1a){const _0x951db4=a8_0x1ed7fa;config[_0x951db4(0x19b)]('botToken',encrypt(_0x329a1a));}export function getBotToken(){const _0x12c8e4=a8_0x1ed7fa;return decrypt(config[_0x12c8e4(0x198)](_0x12c8e4(0x1a1)));}export function isEnabled(){return!!getBotToken();}export function isConfigured(){return!!getBotToken();}export function clearConfig(){config['clear']();}
1
+ const a8_0x5b6bd0=a8_0x10b5;(function(_0x33b67c,_0x567ae6){const _0x57bf77=a8_0x10b5,_0x2bf713=_0x33b67c();while(!![]){try{const _0x51704e=-parseInt(_0x57bf77(0x199))/0x1+parseInt(_0x57bf77(0x183))/0x2*(parseInt(_0x57bf77(0x197))/0x3)+parseInt(_0x57bf77(0x187))/0x4+-parseInt(_0x57bf77(0x190))/0x5*(-parseInt(_0x57bf77(0x188))/0x6)+-parseInt(_0x57bf77(0x17f))/0x7*(-parseInt(_0x57bf77(0x184))/0x8)+-parseInt(_0x57bf77(0x194))/0x9+-parseInt(_0x57bf77(0x186))/0xa;if(_0x51704e===_0x567ae6)break;else _0x2bf713['push'](_0x2bf713['shift']());}catch(_0x397bb8){_0x2bf713['push'](_0x2bf713['shift']());}}}(a8_0x2387,0x43b5c));import a8_0x24a4d6 from'conf';function a8_0x2387(){const _0x3875cc=['3rUWxmW','botToken','282543Coyizl','final','1699544FVhmiQ','woozlit-cli-discord','toString','createHash','701838EDxPvf','16mAViEq','aes-256-cbc','7955030UEvWES','1544704mZEKIL','589866NUdBKA','set','hex','clear','split','utf8','randomBytes','get','25kZrPWQ','update','digest','woozlit_discord_secure_key','3229632JCJHvJ','sha256','createDecipheriv'];a8_0x2387=function(){return _0x3875cc;};return a8_0x2387();}import a8_0x16f589 from'crypto';const config=new a8_0x24a4d6({'projectName':a8_0x5b6bd0(0x180),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x5b6bd0(0x193);function encrypt(_0x1b5854){const _0x57bcb5=a8_0x5b6bd0;if(!_0x1b5854)return'';const _0x201e4f=a8_0x16f589[_0x57bcb5(0x18e)](0x10),_0x5bd684=a8_0x16f589[_0x57bcb5(0x182)](_0x57bcb5(0x195))['update'](ENCRYPTION_KEY)[_0x57bcb5(0x192)](),_0xf7ff43=a8_0x16f589['createCipheriv'](_0x57bcb5(0x185),_0x5bd684,_0x201e4f);let _0x5b0df6=_0xf7ff43[_0x57bcb5(0x191)](_0x1b5854,_0x57bcb5(0x18d),_0x57bcb5(0x18a));return _0x5b0df6+=_0xf7ff43[_0x57bcb5(0x17e)](_0x57bcb5(0x18a)),_0x201e4f[_0x57bcb5(0x181)](_0x57bcb5(0x18a))+':'+_0x5b0df6;}function a8_0x10b5(_0x396794,_0x41ed83){_0x396794=_0x396794-0x17e;const _0x23872f=a8_0x2387();let _0x10b52a=_0x23872f[_0x396794];return _0x10b52a;}function decrypt(_0x10833f){const _0x4a262f=a8_0x5b6bd0;if(!_0x10833f)return'';try{const [_0xe2d84d,_0x4833ed]=_0x10833f[_0x4a262f(0x18c)](':');if(!_0xe2d84d||!_0x4833ed)return'';const _0x2d53dc=Buffer['from'](_0xe2d84d,_0x4a262f(0x18a)),_0x44c4ac=a8_0x16f589[_0x4a262f(0x182)](_0x4a262f(0x195))['update'](ENCRYPTION_KEY)[_0x4a262f(0x192)](),_0x1c7245=a8_0x16f589[_0x4a262f(0x196)](_0x4a262f(0x185),_0x44c4ac,_0x2d53dc);let _0x3e5029=_0x1c7245[_0x4a262f(0x191)](_0x4833ed,_0x4a262f(0x18a),_0x4a262f(0x18d));return _0x3e5029+=_0x1c7245[_0x4a262f(0x17e)](_0x4a262f(0x18d)),_0x3e5029;}catch{return'';}}export function setBotToken(_0x58ccf8){const _0x2186a6=a8_0x5b6bd0;config[_0x2186a6(0x189)](_0x2186a6(0x198),encrypt(_0x58ccf8));}export function getBotToken(){const _0x2afccf=a8_0x5b6bd0;return decrypt(config[_0x2afccf(0x18f)]('botToken'));}export function isEnabled(){return!!getBotToken();}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x4413f7=a8_0x5b6bd0;config[_0x4413f7(0x18b)]();}
@@ -1 +1 @@
1
- (function(_0x3558f7,_0x15a634){var _0xd74e0f=a9_0x20d1,_0x25d4f6=_0x3558f7();while(!![]){try{var _0x501e92=-parseInt(_0xd74e0f(0xb4))/0x1*(-parseInt(_0xd74e0f(0xb0))/0x2)+-parseInt(_0xd74e0f(0xaf))/0x3+parseInt(_0xd74e0f(0xae))/0x4+-parseInt(_0xd74e0f(0xad))/0x5+-parseInt(_0xd74e0f(0xb2))/0x6+parseInt(_0xd74e0f(0xb1))/0x7+parseInt(_0xd74e0f(0xb3))/0x8;if(_0x501e92===_0x15a634)break;else _0x25d4f6['push'](_0x25d4f6['shift']());}catch(_0x86ada6){_0x25d4f6['push'](_0x25d4f6['shift']());}}}(a9_0x17b2,0x2e8ad));function a9_0x20d1(_0x1aec5e,_0x59220c){_0x1aec5e=_0x1aec5e-0xad;var _0x17b2f3=a9_0x17b2();var _0x20d1a0=_0x17b2f3[_0x1aec5e];return _0x20d1a0;}export*from'./config.js';function a9_0x17b2(){var _0x37a230=['9OoQBsH','768505osViSF','380984JyNuYr','586074rvxrqm','3314uxzHjY','1426397shLbRq','443154srxmzD','2397000cwxDsE'];a9_0x17b2=function(){return _0x37a230;};return a9_0x17b2();}export{startBot,stopBot,isBotRunning}from'./client.js';export{setupDiscord}from'./setup.js';
1
+ (function(_0x41b998,_0x1d49fe){var _0x5d45d3=a9_0x1664,_0x596df3=_0x41b998();while(!![]){try{var _0x2f0ccb=-parseInt(_0x5d45d3(0x193))/0x1*(-parseInt(_0x5d45d3(0x194))/0x2)+-parseInt(_0x5d45d3(0x197))/0x3+-parseInt(_0x5d45d3(0x195))/0x4+-parseInt(_0x5d45d3(0x196))/0x5*(-parseInt(_0x5d45d3(0x19d))/0x6)+parseInt(_0x5d45d3(0x19c))/0x7*(-parseInt(_0x5d45d3(0x19a))/0x8)+-parseInt(_0x5d45d3(0x19b))/0x9*(parseInt(_0x5d45d3(0x199))/0xa)+parseInt(_0x5d45d3(0x198))/0xb;if(_0x2f0ccb===_0x1d49fe)break;else _0x596df3['push'](_0x596df3['shift']());}catch(_0x56c1a4){_0x596df3['push'](_0x596df3['shift']());}}}(a9_0x3c0c,0x934de));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./client.js';function a9_0x1664(_0x560e95,_0x5d8ef8){_0x560e95=_0x560e95-0x193;var _0x3c0c54=a9_0x3c0c();var _0x166488=_0x3c0c54[_0x560e95];return _0x166488;}function a9_0x3c0c(){var _0x239a73=['27785HmQUvs','627993wqsSuj','4388692YZOoVO','1020DrqEUe','26056rwKzDi','9927eoMgOd','154AQAIqp','1212wucKnN','139756oxzIne','2tCMYKn','2657572ygMPCS'];a9_0x3c0c=function(){return _0x239a73;};return a9_0x3c0c();}export{setupDiscord}from'./setup.js';
@@ -1 +1 @@
1
- (function(_0x591f6d,_0xf6befb){const _0x3b4788=a10_0x4f17,_0x359f8b=_0x591f6d();while(!![]){try{const _0xb52c6d=parseInt(_0x3b4788(0x193))/0x1*(parseInt(_0x3b4788(0x183))/0x2)+parseInt(_0x3b4788(0x18a))/0x3*(-parseInt(_0x3b4788(0x191))/0x4)+parseInt(_0x3b4788(0x185))/0x5*(-parseInt(_0x3b4788(0x187))/0x6)+-parseInt(_0x3b4788(0x18b))/0x7*(-parseInt(_0x3b4788(0x18f))/0x8)+parseInt(_0x3b4788(0x17f))/0x9+-parseInt(_0x3b4788(0x18e))/0xa*(-parseInt(_0x3b4788(0x190))/0xb)+parseInt(_0x3b4788(0x192))/0xc*(-parseInt(_0x3b4788(0x180))/0xd);if(_0xb52c6d===_0xf6befb)break;else _0x359f8b['push'](_0x359f8b['shift']());}catch(_0x5b9a40){_0x359f8b['push'](_0x359f8b['shift']());}}}(a10_0x3dc1,0x1df40));function a10_0x4f17(_0x42da7e,_0x53eda7){_0x42da7e=_0x42da7e-0x17f;const _0x3dc1e7=a10_0x3dc1();let _0x4f17e2=_0x3dc1e7[_0x42da7e];return _0x4f17e2;}import{input}from'@inquirer/prompts';function a10_0x3dc1(){const _0x5c53ec=['19205NVGQHt','Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','54DGJbYB','info','success','35844fvimpL','56IDUtbw','Bot\x20Token:','setBotToken','10GAiVKs','130144oqpDIq','1362977xYdcTT','68BJltaD','24PYTatV','25vrPwXx','174735Gngaew','54067DBSGXC','length','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.','7618kGfLqE','Discord\x20configuration\x20saved!'];a10_0x3dc1=function(){return _0x5c53ec;};return a10_0x3dc1();}import*as a10_0x277d81 from'./config.js';import*as a10_0x295b44 from'../ui/output.js';export async function setupDiscord(){const _0x177614=a10_0x4f17;a10_0x295b44['info']('Setup\x20Woozlit\x20Discord\x20Bot'),a10_0x295b44['dim']('You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.');const _0x310952=await input({'message':_0x177614(0x18c),'validate':_0x39b838=>_0x39b838[_0x177614(0x181)]>0xa?!![]:'Token\x20seems\x20too\x20short'}),_0x563a11=await input({'message':_0x177614(0x186),'default':'!'});a10_0x277d81[_0x177614(0x18d)](_0x310952),a10_0x295b44[_0x177614(0x189)](_0x177614(0x184)),a10_0x295b44[_0x177614(0x188)](_0x177614(0x182));}
1
+ (function(_0x2a4521,_0x4bc647){const _0x963aa1=a10_0x54d3,_0x3895ff=_0x2a4521();while(!![]){try{const _0x13538f=parseInt(_0x963aa1(0x85))/0x1*(-parseInt(_0x963aa1(0x72))/0x2)+parseInt(_0x963aa1(0x83))/0x3*(parseInt(_0x963aa1(0x84))/0x4)+parseInt(_0x963aa1(0x76))/0x5+-parseInt(_0x963aa1(0x77))/0x6*(parseInt(_0x963aa1(0x74))/0x7)+-parseInt(_0x963aa1(0x78))/0x8+-parseInt(_0x963aa1(0x7f))/0x9*(parseInt(_0x963aa1(0x7b))/0xa)+parseInt(_0x963aa1(0x82))/0xb;if(_0x13538f===_0x4bc647)break;else _0x3895ff['push'](_0x3895ff['shift']());}catch(_0x392a63){_0x3895ff['push'](_0x3895ff['shift']());}}}(a10_0x2e1a,0x96148));import{input}from'@inquirer/prompts';import*as a10_0x398997 from'./config.js';function a10_0x2e1a(){const _0x19381b=['9uVlctL','402472yLorLN','75839IGfWGS','length','18CvjwsG','Bot\x20Token:','6839ZZHMPG','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.','1033580YcSMcr','6312hFwLwh','6321640eXRJkN','setBotToken','Discord\x20configuration\x20saved!','3654340DIOaAN','info','Token\x20seems\x20too\x20short','success','9oQuolz','Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.','32693672RiEyij'];a10_0x2e1a=function(){return _0x19381b;};return a10_0x2e1a();}function a10_0x54d3(_0x30ad49,_0x1675be){_0x30ad49=_0x30ad49-0x72;const _0x2e1ab1=a10_0x2e1a();let _0x54d3e1=_0x2e1ab1[_0x30ad49];return _0x54d3e1;}import*as a10_0x465062 from'../ui/output.js';export async function setupDiscord(){const _0x3b2fb4=a10_0x54d3;a10_0x465062['info']('Setup\x20Woozlit\x20Discord\x20Bot'),a10_0x465062['dim'](_0x3b2fb4(0x81));const _0x1ba76e=await input({'message':_0x3b2fb4(0x73),'validate':_0x2259e3=>_0x2259e3[_0x3b2fb4(0x86)]>0xa?!![]:_0x3b2fb4(0x7d)}),_0x252919=await input({'message':_0x3b2fb4(0x80),'default':'!'});a10_0x398997[_0x3b2fb4(0x79)](_0x1ba76e),a10_0x465062[_0x3b2fb4(0x7e)](_0x3b2fb4(0x7a)),a10_0x465062[_0x3b2fb4(0x7c)](_0x3b2fb4(0x75));}
@@ -1 +1 @@
1
- const a11_0xc048ee=a11_0x4420;(function(_0x2adc8c,_0x597863){const _0x1c0100=a11_0x4420,_0x124579=_0x2adc8c();while(!![]){try{const _0x23556c=-parseInt(_0x1c0100(0x136))/0x1*(parseInt(_0x1c0100(0x133))/0x2)+parseInt(_0x1c0100(0x14e))/0x3+parseInt(_0x1c0100(0x150))/0x4+-parseInt(_0x1c0100(0x137))/0x5+parseInt(_0x1c0100(0x12c))/0x6*(-parseInt(_0x1c0100(0x139))/0x7)+-parseInt(_0x1c0100(0x13b))/0x8*(-parseInt(_0x1c0100(0x138))/0x9)+parseInt(_0x1c0100(0x132))/0xa;if(_0x23556c===_0x597863)break;else _0x124579['push'](_0x124579['shift']());}catch(_0x4ae867){_0x124579['push'](_0x124579['shift']());}}}(a11_0x3cdf,0x9f3d8));import a11_0x18689a from'conf';import a11_0x254d25 from'crypto';const config=new a11_0x18689a({'projectName':a11_0xc048ee(0x143),'defaults':{'imapHost':a11_0xc048ee(0x153),'imapPort':0x3e1,'imapUser':'','imapPass':'','smtpHost':'smtp.gmail.com','smtpPort':0x24b,'smtpUser':'','smtpPass':'','checkInterval':0x5,'allowedSenders':[],'enabled':![]}}),ENCRYPTION_KEY=a11_0xc048ee(0x13f);function encrypt(_0x272071){const _0x209f0c=a11_0xc048ee;if(!_0x272071)return'';const _0x359650=a11_0x254d25[_0x209f0c(0x152)](0x10),_0x121ec8=a11_0x254d25[_0x209f0c(0x131)](_0x209f0c(0x147))[_0x209f0c(0x12b)](ENCRYPTION_KEY)[_0x209f0c(0x13c)](),_0x3346ed=a11_0x254d25[_0x209f0c(0x144)]('aes-256-cbc',_0x121ec8,_0x359650);let _0x366d2b=_0x3346ed[_0x209f0c(0x12b)](_0x272071,_0x209f0c(0x149),_0x209f0c(0x135));return _0x366d2b+=_0x3346ed['final']('hex'),_0x359650[_0x209f0c(0x14c)](_0x209f0c(0x135))+':'+_0x366d2b;}function decrypt(_0x54ad13){const _0x541831=a11_0xc048ee;if(!_0x54ad13)return'';try{const [_0x268565,_0x3405cd]=_0x54ad13[_0x541831(0x142)](':');if(!_0x268565||!_0x3405cd)return'';const _0xa78912=Buffer[_0x541831(0x130)](_0x268565,_0x541831(0x135)),_0x5e5edb=a11_0x254d25[_0x541831(0x131)](_0x541831(0x147))[_0x541831(0x12b)](ENCRYPTION_KEY)[_0x541831(0x13c)](),_0x2ef80d=a11_0x254d25[_0x541831(0x14a)](_0x541831(0x13a),_0x5e5edb,_0xa78912);let _0x5a9e55=_0x2ef80d[_0x541831(0x12b)](_0x3405cd,_0x541831(0x135),_0x541831(0x149));return _0x5a9e55+=_0x2ef80d[_0x541831(0x14f)](_0x541831(0x149)),_0x5a9e55;}catch{return'';}}export function setCredentials(_0x4ecece,_0x539d52,_0x1e31c6,_0x44697f){const _0x17392b=a11_0xc048ee;config[_0x17392b(0x13e)](_0x17392b(0x140),_0x4ecece),config[_0x17392b(0x13e)](_0x17392b(0x12f),encrypt(_0x539d52)),config[_0x17392b(0x13e)](_0x17392b(0x12d),_0x4ecece),config[_0x17392b(0x13e)](_0x17392b(0x134),encrypt(_0x539d52));if(_0x1e31c6)config['set']('imapHost',_0x1e31c6);}function a11_0x4420(_0x38d42b,_0x457821){_0x38d42b=_0x38d42b-0x12a;const _0x3cdf1a=a11_0x3cdf();let _0x442094=_0x3cdf1a[_0x38d42b];return _0x442094;}export function getConfig(){const _0x3578f8=a11_0xc048ee;return{'imap':{'user':config[_0x3578f8(0x14b)]('imapUser'),'password':decrypt(config['get'](_0x3578f8(0x12f))),'host':config[_0x3578f8(0x14b)](_0x3578f8(0x148)),'port':config['get'](_0x3578f8(0x141)),'tls':!![],'tlsOptions':{'rejectUnauthorized':![]},'authTimeout':0xbb8},'smtp':{'host':config[_0x3578f8(0x14b)](_0x3578f8(0x12a)),'port':config[_0x3578f8(0x14b)]('smtpPort'),'auth':{'user':config[_0x3578f8(0x14b)](_0x3578f8(0x12d)),'pass':decrypt(config[_0x3578f8(0x14b)](_0x3578f8(0x134)))},'tls':{'rejectUnauthorized':![]}},'interval':config[_0x3578f8(0x14b)](_0x3578f8(0x12e)),'allowedSenders':config[_0x3578f8(0x14b)]('allowedSenders')||[],'enabled':config[_0x3578f8(0x14b)](_0x3578f8(0x146))};}export function isConfigured(){const _0x59160b=a11_0xc048ee,_0x301c45=getConfig();return!!_0x301c45[_0x59160b(0x151)]['user']&&!!_0x301c45[_0x59160b(0x151)][_0x59160b(0x13d)];}function a11_0x3cdf(){const _0x335a6b=['60473cxuVNt','aes-256-cbc','558224aeNBQh','digest','password','set','woozlit_email_secure_key','imapUser','imapPort','split','woozlit-cli-email','createCipheriv','allowedSenders','enabled','sha256','imapHost','utf8','createDecipheriv','get','toString','push','146763tATvIR','final','4133292icursq','imap','randomBytes','imap.gmail.com','smtpHost','update','552EznEGL','smtpUser','checkInterval','imapPass','from','createHash','4504750BzSKRX','4zlbGuw','smtpPass','hex','100357eyubfD','5007085wWVqRh','144yQWcxV'];a11_0x3cdf=function(){return _0x335a6b;};return a11_0x3cdf();}export function setEnabled(_0x50b8db){const _0x5c3b7d=a11_0xc048ee;config[_0x5c3b7d(0x13e)](_0x5c3b7d(0x146),_0x50b8db);}export function addAllowedSender(_0x6a8d4){const _0x2a725e=a11_0xc048ee,_0x1e36c0=config[_0x2a725e(0x14b)](_0x2a725e(0x145))||[];!_0x1e36c0['includes'](_0x6a8d4)&&(_0x1e36c0[_0x2a725e(0x14d)](_0x6a8d4),config[_0x2a725e(0x13e)](_0x2a725e(0x145),_0x1e36c0));}
1
+ const a11_0x68cf55=a11_0x42bb;(function(_0x59f177,_0x3e1686){const _0x430fc1=a11_0x42bb,_0x5ea2ad=_0x59f177();while(!![]){try{const _0x15b8e7=parseInt(_0x430fc1(0x12a))/0x1*(-parseInt(_0x430fc1(0x122))/0x2)+parseInt(_0x430fc1(0x129))/0x3*(parseInt(_0x430fc1(0x139))/0x4)+-parseInt(_0x430fc1(0x121))/0x5+-parseInt(_0x430fc1(0x138))/0x6+parseInt(_0x430fc1(0x13f))/0x7*(-parseInt(_0x430fc1(0x133))/0x8)+parseInt(_0x430fc1(0x13b))/0x9*(parseInt(_0x430fc1(0x11d))/0xa)+parseInt(_0x430fc1(0x119))/0xb;if(_0x15b8e7===_0x3e1686)break;else _0x5ea2ad['push'](_0x5ea2ad['shift']());}catch(_0x27ca10){_0x5ea2ad['push'](_0x5ea2ad['shift']());}}}(a11_0x1a44,0x2b2c0));import a11_0x32a9a8 from'conf';import a11_0x58af8f from'crypto';const config=new a11_0x32a9a8({'projectName':a11_0x68cf55(0x13a),'defaults':{'imapHost':a11_0x68cf55(0x124),'imapPort':0x3e1,'imapUser':'','imapPass':'','smtpHost':a11_0x68cf55(0x12c),'smtpPort':0x24b,'smtpUser':'','smtpPass':'','checkInterval':0x5,'allowedSenders':[],'enabled':![]}}),ENCRYPTION_KEY=a11_0x68cf55(0x118);function a11_0x1a44(){const _0xa1160e=['2948XuzPki','woozlit-cli-email','9lBFNxL','imapHost','final','password','1010037sYmpcu','get','split','toString','allowedSenders','woozlit_email_secure_key','2597199kGlGXY','createDecipheriv','smtpHost','createHash','3386790bDHxld','sha256','imap','aes-256-cbc','102010fmBokI','262sXDTXx','enabled','imap.gmail.com','createCipheriv','smtpPass','utf8','randomBytes','1167rAUvgR','1783JuZWrP','smtpUser','smtp.gmail.com','checkInterval','digest','set','update','imapUser','push','16RUMvtH','hex','smtpPort','imapPass','user','852552tzpYWC'];a11_0x1a44=function(){return _0xa1160e;};return a11_0x1a44();}function encrypt(_0x1b69c5){const _0x21d581=a11_0x68cf55;if(!_0x1b69c5)return'';const _0x9f48b7=a11_0x58af8f[_0x21d581(0x128)](0x10),_0x555508=a11_0x58af8f['createHash'](_0x21d581(0x11e))[_0x21d581(0x130)](ENCRYPTION_KEY)[_0x21d581(0x12e)](),_0x3673b3=a11_0x58af8f[_0x21d581(0x125)]('aes-256-cbc',_0x555508,_0x9f48b7);let _0x4d82f2=_0x3673b3['update'](_0x1b69c5,_0x21d581(0x127),_0x21d581(0x134));return _0x4d82f2+=_0x3673b3[_0x21d581(0x13d)](_0x21d581(0x134)),_0x9f48b7[_0x21d581(0x116)]('hex')+':'+_0x4d82f2;}function decrypt(_0xcfb5c0){const _0x38de8e=a11_0x68cf55;if(!_0xcfb5c0)return'';try{const [_0xdb118,_0x402471]=_0xcfb5c0[_0x38de8e(0x115)](':');if(!_0xdb118||!_0x402471)return'';const _0x3f4911=Buffer['from'](_0xdb118,'hex'),_0x3ee459=a11_0x58af8f[_0x38de8e(0x11c)]('sha256')[_0x38de8e(0x130)](ENCRYPTION_KEY)[_0x38de8e(0x12e)](),_0x3d76c5=a11_0x58af8f[_0x38de8e(0x11a)](_0x38de8e(0x120),_0x3ee459,_0x3f4911);let _0x217391=_0x3d76c5['update'](_0x402471,_0x38de8e(0x134),'utf8');return _0x217391+=_0x3d76c5[_0x38de8e(0x13d)](_0x38de8e(0x127)),_0x217391;}catch{return'';}}export function setCredentials(_0x22f5b1,_0xce33e3,_0x1b40da,_0x3c019c){const _0x55bec4=a11_0x68cf55;config['set'](_0x55bec4(0x131),_0x22f5b1),config[_0x55bec4(0x12f)]('imapPass',encrypt(_0xce33e3)),config[_0x55bec4(0x12f)](_0x55bec4(0x12b),_0x22f5b1),config['set'](_0x55bec4(0x126),encrypt(_0xce33e3));if(_0x1b40da)config[_0x55bec4(0x12f)](_0x55bec4(0x13c),_0x1b40da);}export function getConfig(){const _0x3232ff=a11_0x68cf55;return{'imap':{'user':config[_0x3232ff(0x114)]('imapUser'),'password':decrypt(config[_0x3232ff(0x114)](_0x3232ff(0x136))),'host':config[_0x3232ff(0x114)]('imapHost'),'port':config[_0x3232ff(0x114)]('imapPort'),'tls':!![],'tlsOptions':{'rejectUnauthorized':![]},'authTimeout':0xbb8},'smtp':{'host':config[_0x3232ff(0x114)](_0x3232ff(0x11b)),'port':config[_0x3232ff(0x114)](_0x3232ff(0x135)),'auth':{'user':config[_0x3232ff(0x114)](_0x3232ff(0x12b)),'pass':decrypt(config[_0x3232ff(0x114)](_0x3232ff(0x126)))},'tls':{'rejectUnauthorized':![]}},'interval':config['get'](_0x3232ff(0x12d)),'allowedSenders':config[_0x3232ff(0x114)](_0x3232ff(0x117))||[],'enabled':config['get'](_0x3232ff(0x123))};}export function isConfigured(){const _0x3881b6=a11_0x68cf55,_0x5b172d=getConfig();return!!_0x5b172d[_0x3881b6(0x11f)][_0x3881b6(0x137)]&&!!_0x5b172d['imap'][_0x3881b6(0x13e)];}function a11_0x42bb(_0x3cf34c,_0x41c2f1){_0x3cf34c=_0x3cf34c-0x114;const _0x1a44b4=a11_0x1a44();let _0x42bb57=_0x1a44b4[_0x3cf34c];return _0x42bb57;}export function setEnabled(_0x1fed38){const _0x230eb6=a11_0x68cf55;config[_0x230eb6(0x12f)](_0x230eb6(0x123),_0x1fed38);}export function addAllowedSender(_0x5ad594){const _0x5193c7=a11_0x68cf55,_0x472d8f=config[_0x5193c7(0x114)](_0x5193c7(0x117))||[];!_0x472d8f['includes'](_0x5ad594)&&(_0x472d8f[_0x5193c7(0x132)](_0x5ad594),config[_0x5193c7(0x12f)](_0x5193c7(0x117),_0x472d8f));}
@@ -1 +1 @@
1
- (function(_0x3f83db,_0x1fcb41){var _0x43c5a0=a12_0x3587,_0x2fa931=_0x3f83db();while(!![]){try{var _0x2931e8=parseInt(_0x43c5a0(0x16d))/0x1+parseInt(_0x43c5a0(0x168))/0x2+parseInt(_0x43c5a0(0x170))/0x3*(-parseInt(_0x43c5a0(0x16c))/0x4)+parseInt(_0x43c5a0(0x169))/0x5*(parseInt(_0x43c5a0(0x16b))/0x6)+parseInt(_0x43c5a0(0x16a))/0x7*(-parseInt(_0x43c5a0(0x16f))/0x8)+parseInt(_0x43c5a0(0x167))/0x9+parseInt(_0x43c5a0(0x171))/0xa*(-parseInt(_0x43c5a0(0x16e))/0xb);if(_0x2931e8===_0x1fcb41)break;else _0x2fa931['push'](_0x2fa931['shift']());}catch(_0x46dfe7){_0x2fa931['push'](_0x2fa931['shift']());}}}(a12_0x2573,0xdb868));function a12_0x2573(){var _0x95b3ce=['130OgteAM','5472000FHiJWd','1628466pkPzLP','5pXxPlt','805MlLyOn','8802546ieGpNa','8RdzIMD','1305776uDGfon','1351559hFephS','29560UWaUju','1910553OsviFx'];a12_0x2573=function(){return _0x95b3ce;};return a12_0x2573();}function a12_0x3587(_0x337ed5,_0x219cab){_0x337ed5=_0x337ed5-0x167;var _0x25736b=a12_0x2573();var _0x35879e=_0x25736b[_0x337ed5];return _0x35879e;}export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./service.js';export{setupEmail}from'./setup.js';
1
+ (function(_0x1becfb,_0xbb72fe){var _0x3987a5=a12_0x5889,_0x49acb6=_0x1becfb();while(!![]){try{var _0x45bf32=parseInt(_0x3987a5(0x71))/0x1+parseInt(_0x3987a5(0x6f))/0x2*(-parseInt(_0x3987a5(0x6c))/0x3)+parseInt(_0x3987a5(0x72))/0x4+-parseInt(_0x3987a5(0x74))/0x5+parseInt(_0x3987a5(0x73))/0x6+parseInt(_0x3987a5(0x6e))/0x7*(-parseInt(_0x3987a5(0x70))/0x8)+-parseInt(_0x3987a5(0x6d))/0x9;if(_0x45bf32===_0xbb72fe)break;else _0x49acb6['push'](_0x49acb6['shift']());}catch(_0x52604f){_0x49acb6['push'](_0x49acb6['shift']());}}}(a12_0x1d04,0x64a4b));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./service.js';function a12_0x1d04(){var _0x1eb16f=['1466635SQlUCE','1663767mzQywz','5953248twtNpj','91693YUeZQZ','2taXKMo','104hoTnOG','698852ckZDLt','2781996MUGfrH','4185354jiBjyJ'];a12_0x1d04=function(){return _0x1eb16f;};return a12_0x1d04();}function a12_0x5889(_0xd3379b,_0x23d998){_0xd3379b=_0xd3379b-0x6c;var _0x1d0478=a12_0x1d04();var _0x588963=_0x1d0478[_0xd3379b];return _0x588963;}export{setupEmail}from'./setup.js';
@@ -1 +1 @@
1
- (function(_0x1804ad,_0xd7b46c){const _0x1eb71b=a13_0x5ec7,_0xfcacd7=_0x1804ad();while(!![]){try{const _0x500841=parseInt(_0x1eb71b(0x1c6))/0x1*(parseInt(_0x1eb71b(0x1c4))/0x2)+-parseInt(_0x1eb71b(0x1d9))/0x3*(-parseInt(_0x1eb71b(0x1c0))/0x4)+parseInt(_0x1eb71b(0x1bf))/0x5*(parseInt(_0x1eb71b(0x1b3))/0x6)+-parseInt(_0x1eb71b(0x1b2))/0x7+parseInt(_0x1eb71b(0x1c7))/0x8+-parseInt(_0x1eb71b(0x1e0))/0x9+parseInt(_0x1eb71b(0x1ba))/0xa*(-parseInt(_0x1eb71b(0x1cf))/0xb);if(_0x500841===_0xd7b46c)break;else _0xfcacd7['push'](_0xfcacd7['shift']());}catch(_0x3b807d){_0xfcacd7['push'](_0xfcacd7['shift']());}}}(a13_0x39e8,0x2f071));import a13_0x26f502 from'imap-simple';function a13_0x5ec7(_0x4d8df0,_0x2afafe){_0x4d8df0=_0x4d8df0-0x1b2;const _0x39e85f=a13_0x39e8();let _0x5ec713=_0x39e85f[_0x4d8df0];return _0x5ec713;}import a13_0x230f42 from'nodemailer';import*as a13_0x1c56a0 from'./config.js';import*as a13_0xb2888f from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let intervalId=null,isRunning=![];async function checkEmails(){const _0x56e311=a13_0x5ec7,_0x342ddc=a13_0x1c56a0[_0x56e311(0x1ca)]();try{const _0x1f4c6d=await a13_0x26f502['connect']({'imap':_0x342ddc[_0x56e311(0x1e4)]});await _0x1f4c6d[_0x56e311(0x1e3)](_0x56e311(0x1d6));const _0x86465e=[_0x56e311(0x1d0)],_0x4dd9a2={'bodies':[_0x56e311(0x1cb),_0x56e311(0x1d3)],'markSeen':!![]},_0x4a8a81=await _0x1f4c6d[_0x56e311(0x1be)](_0x86465e,_0x4dd9a2);_0x4a8a81['length']>0x0&&a13_0xb2888f['info']('[Email]\x20Found\x20'+_0x4a8a81[_0x56e311(0x1d7)]+_0x56e311(0x1cc));for(const _0x446237 of _0x4a8a81){const _0x49d788=_0x446237[_0x56e311(0x1d1)][_0x56e311(0x1e5)](_0x259c93=>_0x259c93[_0x56e311(0x1dd)]==='HEADER'),_0xce6bb=_0x49d788['body'][_0x56e311(0x1bd)]?.[0x0]||'',_0x1bb9f5=_0x49d788[_0x56e311(0x1c1)][_0x56e311(0x1df)]?.[0x0]||'No\x20Subject';if(_0x342ddc['allowedSenders'][_0x56e311(0x1d7)]>0x0){const _0x50263c=_0xce6bb[_0x56e311(0x1d5)](/<(.+)>/)?.[0x1]||_0xce6bb;if(!_0x342ddc[_0x56e311(0x1c2)][_0x56e311(0x1e2)](_0x50263c)){a13_0xb2888f[_0x56e311(0x1c9)](_0x56e311(0x1d2)+_0xce6bb+_0x56e311(0x1d4));continue;}}const _0x1397bf=_0x446237['parts']['find'](_0x31bc2e=>_0x31bc2e[_0x56e311(0x1dd)]==='TEXT'),_0x3c286a=_0x1397bf?.[_0x56e311(0x1c1)]||'';a13_0xb2888f['info'](_0x56e311(0x1b8)+_0xce6bb+_0x56e311(0x1dc)+_0x1bb9f5);try{const _0x40de0b='You\x20received\x20an\x20email\x20from\x20'+_0xce6bb+_0x56e311(0x1b9)+_0x1bb9f5+_0x56e311(0x1da)+_0x3c286a+_0x56e311(0x1db),_0x9b946f=await sendChatMessage(getSelectedModel(),[{'role':_0x56e311(0x1c3),'content':_0x40de0b}]),_0xb6c46=a13_0x230f42[_0x56e311(0x1e1)](_0x342ddc['smtp']);await _0xb6c46[_0x56e311(0x1d8)]({'from':_0x342ddc[_0x56e311(0x1b5)][_0x56e311(0x1bb)][_0x56e311(0x1c3)],'to':_0xce6bb,'subject':_0x56e311(0x1de)+_0x1bb9f5,'text':_0x9b946f['content']}),a13_0xb2888f[_0x56e311(0x1c8)](_0x56e311(0x1b6)+_0xce6bb);}catch(_0x497ade){a13_0xb2888f[_0x56e311(0x1b4)](_0x56e311(0x1bc)+_0x497ade['message']);}}_0x1f4c6d[_0x56e311(0x1c5)]();}catch(_0x51cbe6){}}export async function startBot(){const _0x3beb34=a13_0x5ec7;if(!a13_0x1c56a0['isConfigured']())return![];if(isRunning)return!![];process[_0x3beb34(0x1ce)][_0x3beb34(0x1cd)]='0',checkEmails();const _0x3a74f8=a13_0x1c56a0[_0x3beb34(0x1ca)]()[_0x3beb34(0x1b7)]||0x5;return intervalId=setInterval(checkEmails,_0x3a74f8*0x3c*0x3e8),isRunning=!![],!![];}export function stopBot(){intervalId&&(clearInterval(intervalId),intervalId=null),isRunning=![];}export function isBotRunning(){return isRunning;}export{isConfigured}from'./config.js';function a13_0x39e8(){const _0x3af481=['166614CgytbJ','error','smtp','[Email]\x20Reply\x20sent\x20to\x20','interval','[Email]\x20From:\x20',':\x0aSubject:\x20','4883830iJozyE','auth','[Email]\x20Processing/Reply\x20error:\x20','from','search','50EobtmQ','4412ovYBvp','body','allowedSenders','user','14gjDLeT','end','9439kAOewJ','2782104YNSqJU','success','dim','getConfig','HEADER','\x20new\x20messages','NODE_TLS_REJECT_UNAUTHORIZED','env','11jfqIsB','UNSEEN','parts','[Email]\x20Ignored\x20mail\x20from\x20','TEXT','\x20(not\x20allowed)','match','INBOX','length','sendMail','633ShdAEE','\x0aBody:\x0a','\x0a\x0aDraft\x20a\x20helpful\x20reply.\x20Structure\x20it\x20clearly.','\x20|\x20Subj:\x20','which','Re:\x20','subject','853713hXllNm','createTransport','includes','openBox','imap','find','1038758uajpFd'];a13_0x39e8=function(){return _0x3af481;};return a13_0x39e8();}
1
+ (function(_0x25d919,_0x40f1ae){const _0x45dfdb=a13_0x4fe0,_0x31f630=_0x25d919();while(!![]){try{const _0x1e490b=parseInt(_0x45dfdb(0xea))/0x1*(parseInt(_0x45dfdb(0xd2))/0x2)+parseInt(_0x45dfdb(0xd8))/0x3*(parseInt(_0x45dfdb(0xf8))/0x4)+parseInt(_0x45dfdb(0xde))/0x5*(-parseInt(_0x45dfdb(0xec))/0x6)+parseInt(_0x45dfdb(0xf4))/0x7*(parseInt(_0x45dfdb(0xe7))/0x8)+parseInt(_0x45dfdb(0xe3))/0x9*(-parseInt(_0x45dfdb(0xcf))/0xa)+-parseInt(_0x45dfdb(0xdb))/0xb+parseInt(_0x45dfdb(0xf3))/0xc;if(_0x1e490b===_0x40f1ae)break;else _0x31f630['push'](_0x31f630['shift']());}catch(_0x2fc111){_0x31f630['push'](_0x31f630['shift']());}}}(a13_0x95ee,0x7be9b));import a13_0x422b1d from'imap-simple';import a13_0x53cada from'nodemailer';import*as a13_0x2f907d from'./config.js';import*as a13_0x10fc8d from'../ui/output.js';function a13_0x4fe0(_0xb1aa01,_0x2e4702){_0xb1aa01=_0xb1aa01-0xc9;const _0x95eee6=a13_0x95ee();let _0x4fe00b=_0x95eee6[_0xb1aa01];return _0x4fe00b;}import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let intervalId=null,isRunning=![];async function checkEmails(){const _0xa9fadd=a13_0x4fe0,_0x19f10a=a13_0x2f907d[_0xa9fadd(0xd4)]();try{const _0x35ba83=await a13_0x422b1d[_0xa9fadd(0xf2)]({'imap':_0x19f10a['imap']});await _0x35ba83[_0xa9fadd(0xd3)](_0xa9fadd(0xf6));const _0x406a85=['UNSEEN'],_0x2bbbf={'bodies':[_0xa9fadd(0xe0),'TEXT'],'markSeen':!![]},_0x69f897=await _0x35ba83[_0xa9fadd(0xf5)](_0x406a85,_0x2bbbf);_0x69f897[_0xa9fadd(0xd0)]>0x0&&a13_0x10fc8d['info'](_0xa9fadd(0xd7)+_0x69f897[_0xa9fadd(0xd0)]+_0xa9fadd(0xcb));for(const _0x29d1cb of _0x69f897){const _0x2be361=_0x29d1cb[_0xa9fadd(0xdf)]['find'](_0x2a4286=>_0x2a4286[_0xa9fadd(0xe1)]===_0xa9fadd(0xe0)),_0x2026c4=_0x2be361['body'][_0xa9fadd(0xe5)]?.[0x0]||'',_0x564ec5=_0x2be361[_0xa9fadd(0xd9)][_0xa9fadd(0xd6)]?.[0x0]||_0xa9fadd(0xf1);if(_0x19f10a['allowedSenders'][_0xa9fadd(0xd0)]>0x0){const _0x24c709=_0x2026c4['match'](/<(.+)>/)?.[0x1]||_0x2026c4;if(!_0x19f10a['allowedSenders'][_0xa9fadd(0xee)](_0x24c709)){a13_0x10fc8d[_0xa9fadd(0xe4)](_0xa9fadd(0xe8)+_0x2026c4+_0xa9fadd(0xe9));continue;}}const _0x30fc50=_0x29d1cb[_0xa9fadd(0xdf)][_0xa9fadd(0xdd)](_0x5aaa88=>_0x5aaa88[_0xa9fadd(0xe1)]===_0xa9fadd(0xd5)),_0x238e4b=_0x30fc50?.[_0xa9fadd(0xd9)]||'';a13_0x10fc8d[_0xa9fadd(0xc9)]('[Email]\x20From:\x20'+_0x2026c4+_0xa9fadd(0xcc)+_0x564ec5);try{const _0xfecf70=_0xa9fadd(0xfa)+_0x2026c4+':\x0aSubject:\x20'+_0x564ec5+_0xa9fadd(0xdc)+_0x238e4b+_0xa9fadd(0xed),_0x24ba3e=await sendChatMessage(getSelectedModel(),[{'role':_0xa9fadd(0xf7),'content':_0xfecf70}]),_0x1b3968=a13_0x53cada[_0xa9fadd(0xf9)](_0x19f10a[_0xa9fadd(0xca)]);await _0x1b3968[_0xa9fadd(0xda)]({'from':_0x19f10a[_0xa9fadd(0xca)]['auth']['user'],'to':_0x2026c4,'subject':'Re:\x20'+_0x564ec5,'text':_0x24ba3e[_0xa9fadd(0xd1)]}),a13_0x10fc8d[_0xa9fadd(0xe6)](_0xa9fadd(0xeb)+_0x2026c4);}catch(_0xc52648){a13_0x10fc8d[_0xa9fadd(0xcd)]('[Email]\x20Processing/Reply\x20error:\x20'+_0xc52648[_0xa9fadd(0xe2)]);}}_0x35ba83[_0xa9fadd(0xce)]();}catch(_0x2e42ff){}}export async function startBot(){const _0x394717=a13_0x4fe0;if(!a13_0x2f907d['isConfigured']())return![];if(isRunning)return!![];process[_0x394717(0xef)]['NODE_TLS_REJECT_UNAUTHORIZED']='0',checkEmails();const _0x57bc99=a13_0x2f907d[_0x394717(0xd4)]()[_0x394717(0xf0)]||0x5;return intervalId=setInterval(checkEmails,_0x57bc99*0x3c*0x3e8),isRunning=!![],!![];}function a13_0x95ee(){const _0x2c7384=['info','smtp','\x20new\x20messages','\x20|\x20Subj:\x20','error','end','4282820DzXjxB','length','content','32762pzWTxF','openBox','getConfig','TEXT','subject','[Email]\x20Found\x20','18eoRqyG','body','sendMail','2632927Zsivsg','\x0aBody:\x0a','find','1729955kEMNlb','parts','HEADER','which','message','9DwmcQI','dim','from','success','16hsoETF','[Email]\x20Ignored\x20mail\x20from\x20','\x20(not\x20allowed)','1BGIQpd','[Email]\x20Reply\x20sent\x20to\x20','12eYVuvI','\x0a\x0aDraft\x20a\x20helpful\x20reply.\x20Structure\x20it\x20clearly.','includes','env','interval','No\x20Subject','connect','3229428sVMdTv','2580214oNgsGE','search','INBOX','user','562976dftpHK','createTransport','You\x20received\x20an\x20email\x20from\x20'];a13_0x95ee=function(){return _0x2c7384;};return a13_0x95ee();}export function stopBot(){intervalId&&(clearInterval(intervalId),intervalId=null),isRunning=![];}export function isBotRunning(){return isRunning;}export{isConfigured}from'./config.js';