woozlit 2.0.3 → 2.1.0

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 (50) hide show
  1. package/dist/auth/login.js +1 -1
  2. package/dist/browser/index.js +1 -1
  3. package/dist/browser/server.js +1 -1
  4. package/dist/browser/tools.js +1 -1
  5. package/dist/chat/agent.js +1 -1
  6. package/dist/config/mcp.js +1 -1
  7. package/dist/config/settings.js +1 -1
  8. package/dist/discord/client.js +1 -1
  9. package/dist/discord/config.js +1 -1
  10. package/dist/discord/index.js +1 -1
  11. package/dist/discord/setup.js +1 -1
  12. package/dist/email/config.js +1 -1
  13. package/dist/email/index.js +1 -1
  14. package/dist/email/service.js +1 -1
  15. package/dist/email/setup.js +1 -1
  16. package/dist/github/api.js +1 -1
  17. package/dist/github/auth.js +1 -1
  18. package/dist/github/auto-setup.js +1 -1
  19. package/dist/github/index.js +1 -1
  20. package/dist/github/manual-setup.js +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/mcp-servers/computer-use.js +1 -1
  23. package/dist/services/bot-manager.js +1 -1
  24. package/dist/services/voice-agent.js +1 -1
  25. package/dist/telegram/bot.js +1 -1
  26. package/dist/telegram/config.js +1 -1
  27. package/dist/telegram/index.js +1 -1
  28. package/dist/telegram/reminders.js +1 -1
  29. package/dist/telegram/setup.js +1 -1
  30. package/dist/tools/command.js +1 -1
  31. package/dist/tools/file.js +1 -1
  32. package/dist/tools/index.js +1 -1
  33. package/dist/tools/mcp.js +1 -1
  34. package/dist/tools/rollback.js +1 -1
  35. package/dist/tools/rules.js +1 -1
  36. package/dist/twilio/config.js +1 -1
  37. package/dist/twilio/index.js +1 -1
  38. package/dist/twilio/server.js +1 -1
  39. package/dist/twilio/setup.js +1 -1
  40. package/dist/ui/output.js +1 -1
  41. package/dist/ui/select.js +1 -1
  42. package/dist/ui/themes.js +1 -1
  43. package/dist/utils/api.js +1 -1
  44. package/dist/utils/history.js +1 -1
  45. package/dist/utils/mcp-installer.js +1 -1
  46. package/dist/utils/platform.js +1 -1
  47. package/dist/utils/storage.js +1 -1
  48. package/dist/utils/update-check.js +1 -1
  49. package/dist/verify_repro.js +1 -1
  50. package/package.json +1 -1
@@ -1 +1 @@
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
+ (function(_0x265744,_0x4264d1){const _0xf0b34d=a0_0x79a7,_0x58b5cf=_0x265744();while(!![]){try{const _0x52283d=parseInt(_0xf0b34d(0x1cb))/0x1*(parseInt(_0xf0b34d(0x1b9))/0x2)+parseInt(_0xf0b34d(0x1c2))/0x3+parseInt(_0xf0b34d(0x1bb))/0x4*(-parseInt(_0xf0b34d(0x1b7))/0x5)+parseInt(_0xf0b34d(0x1c8))/0x6+-parseInt(_0xf0b34d(0x1c6))/0x7*(parseInt(_0xf0b34d(0x1b5))/0x8)+parseInt(_0xf0b34d(0x1bd))/0x9*(parseInt(_0xf0b34d(0x1cd))/0xa)+-parseInt(_0xf0b34d(0x1b8))/0xb;if(_0x52283d===_0x4264d1)break;else _0x58b5cf['push'](_0x58b5cf['shift']());}catch(_0x450436){_0x58b5cf['push'](_0x58b5cf['shift']());}}}(a0_0x2866,0xcd7b9));import a0_0x130e74 from'open';import{createServer}from'http';function a0_0x2866(){const _0x49f3f1=['close','text/html','\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','3417036Bnyjnp','end','token','get','7dbutYv','pathname','8727960gOrbiE','\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','email','8wsltfE','userId','150690JOEDaq','1833632sGULYv','/auth/cli?callback=http://localhost:','256855CLThvf','8136084HDAiZe','3184pupurR','searchParams','96eOfEBT','/callback','261XjOURc','displayName'];a0_0x2866=function(){return _0x49f3f1;};return a0_0x2866();}import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x4ea3ff}from'../utils/storage.js';function a0_0x79a7(_0x433955,_0x48d42d){_0x433955=_0x433955-0x1b5;const _0x286639=a0_0x2866();let _0x79a791=_0x286639[_0x433955];return _0x79a791;}export async function login(){const _0x39a286=getApiUrl(),_0x127c3=0x2694;return new Promise(_0x235df0=>{const _0x1411eb=createServer(async(_0x22784f,_0x4d14e1)=>{const _0x33fd6c=a0_0x79a7,_0x50a2b2=new URL(_0x22784f['url']||'','http://localhost:'+_0x127c3);if(_0x50a2b2[_0x33fd6c(0x1c7)]==='/callback'){const _0x9f9133=_0x50a2b2[_0x33fd6c(0x1ba)][_0x33fd6c(0x1c5)](_0x33fd6c(0x1c4)),_0x2faeae=_0x50a2b2[_0x33fd6c(0x1ba)][_0x33fd6c(0x1c5)](_0x33fd6c(0x1cc)),_0x5e6506=_0x50a2b2[_0x33fd6c(0x1ba)]['get'](_0x33fd6c(0x1ca)),_0x302729=_0x50a2b2[_0x33fd6c(0x1ba)]['get'](_0x33fd6c(0x1be));_0x9f9133&&_0x2faeae?(setToken(_0x9f9133),setUser(_0x2faeae,_0x5e6506||'',_0x302729||''),_0x4d14e1['writeHead'](0xc8,{'Content-Type':_0x33fd6c(0x1c0)}),_0x4d14e1[_0x33fd6c(0x1c3)](_0x33fd6c(0x1c9)),_0x1411eb[_0x33fd6c(0x1bf)](),_0x235df0(!![])):(_0x4d14e1['writeHead'](0x190,{'Content-Type':_0x33fd6c(0x1c0)}),_0x4d14e1[_0x33fd6c(0x1c3)](_0x33fd6c(0x1c1)),_0x1411eb[_0x33fd6c(0x1bf)](),_0x235df0(![]));}});_0x1411eb['listen'](_0x127c3,()=>{const _0x2d22e6=a0_0x79a7,_0x4e9b39=_0x39a286+_0x2d22e6(0x1b6)+_0x127c3+_0x2d22e6(0x1bc);a0_0x130e74(_0x4e9b39);}),setTimeout(()=>{_0x1411eb['close'](),_0x235df0(![]);},0x1d4c0);});}export function logout(){a0_0x4ea3ff();}export{isLoggedIn};
@@ -1 +1 @@
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
+ const a1_0xb2d6f4=a1_0x5b9a;(function(_0x5a6e66,_0x17bbaf){const _0x290f5c=a1_0x5b9a,_0x24ac01=_0x5a6e66();while(!![]){try{const _0x2c4a1e=parseInt(_0x290f5c(0xf8))/0x1+-parseInt(_0x290f5c(0xec))/0x2+parseInt(_0x290f5c(0xef))/0x3*(parseInt(_0x290f5c(0xf9))/0x4)+-parseInt(_0x290f5c(0xeb))/0x5*(parseInt(_0x290f5c(0xe7))/0x6)+parseInt(_0x290f5c(0xf6))/0x7+-parseInt(_0x290f5c(0xf7))/0x8*(parseInt(_0x290f5c(0xf3))/0x9)+parseInt(_0x290f5c(0xe8))/0xa;if(_0x2c4a1e===_0x17bbaf)break;else _0x24ac01['push'](_0x24ac01['shift']());}catch(_0x391900){_0x24ac01['push'](_0x24ac01['shift']());}}}(a1_0x1417,0x9ebc7));function a1_0x1417(){const _0x49ca92=['Scroll\x20the\x20page\x20up\x20or\x20down','1361276qeIVjh','2616dsgxNO','883248cSWeAn','676468VzqCXM','query','string','number','Fill\x20a\x20form\x20field\x20or\x20input\x20element','Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)','browser_fill','object','direction','Direction\x20to\x20scroll','down','Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot','text','30xoohVi','223040YuJJvu','CSS\x20selector\x20for\x20the\x20element','Click\x20an\x20element\x20on\x20the\x20page','626105Lptcxc','1205218qCtkPO','tabId','browser_click','15fABegW','browser_scroll','Text\x20to\x20fill','Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)','1836kmZLed','top'];a1_0x1417=function(){return _0x49ca92;};return a1_0x1417();}function a1_0x5b9a(_0xad98da,_0xf8bb8c){_0xad98da=_0xad98da-0xe5;const _0x141763=a1_0x1417();let _0x5b9ac1=_0x141763[_0xad98da];return _0x5b9ac1;}export*from'./server.js';export*from'./tools.js';export*from'./server.js';export*from'./tools.js';export const tools=[{'name':a1_0xb2d6f4(0xff),'description':a1_0xb2d6f4(0xfd),'input_schema':{'type':a1_0xb2d6f4(0x100),'properties':{'tabId':{'type':a1_0xb2d6f4(0xfc),'description':a1_0xb2d6f4(0xe5)},'query':{'type':a1_0xb2d6f4(0xfb),'description':a1_0xb2d6f4(0xe9)},'text':{'type':a1_0xb2d6f4(0xfb),'description':a1_0xb2d6f4(0xf1)}},'required':['tabId',a1_0xb2d6f4(0xfa),a1_0xb2d6f4(0xe6)]}},{'name':a1_0xb2d6f4(0xee),'description':a1_0xb2d6f4(0xea),'input_schema':{'type':'object','properties':{'tabId':{'type':'number','description':'Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot'},'query':{'type':a1_0xb2d6f4(0xfb),'description':a1_0xb2d6f4(0xe9)},'index':{'type':'number','description':a1_0xb2d6f4(0xf2)}},'required':[a1_0xb2d6f4(0xed),a1_0xb2d6f4(0xfa)]}},{'name':a1_0xb2d6f4(0xf0),'description':a1_0xb2d6f4(0xf5),'input_schema':{'type':a1_0xb2d6f4(0x100),'properties':{'tabId':{'type':a1_0xb2d6f4(0xfc),'description':'Tab\x20ID'},'direction':{'type':a1_0xb2d6f4(0xfb),'enum':['up',a1_0xb2d6f4(0x103),a1_0xb2d6f4(0xf4),'bottom'],'description':a1_0xb2d6f4(0x102)},'amount':{'type':a1_0xb2d6f4(0xfc),'description':a1_0xb2d6f4(0xfe)}},'required':[a1_0xb2d6f4(0xed),a1_0xb2d6f4(0x101)]}}];
@@ -1 +1 @@
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
+ (function(_0x897791,_0x36b7fc){const _0xf3fa9c=a2_0x4c5e,_0x266c30=_0x897791();while(!![]){try{const _0x5e7570=-parseInt(_0xf3fa9c(0xa8))/0x1+-parseInt(_0xf3fa9c(0xb1))/0x2*(-parseInt(_0xf3fa9c(0xd7))/0x3)+-parseInt(_0xf3fa9c(0xac))/0x4+parseInt(_0xf3fa9c(0xab))/0x5+parseInt(_0xf3fa9c(0xcc))/0x6*(parseInt(_0xf3fa9c(0xbf))/0x7)+parseInt(_0xf3fa9c(0xbb))/0x8*(parseInt(_0xf3fa9c(0xaf))/0x9)+parseInt(_0xf3fa9c(0xca))/0xa*(-parseInt(_0xf3fa9c(0xd1))/0xb);if(_0x5e7570===_0x36b7fc)break;else _0x266c30['push'](_0x266c30['shift']());}catch(_0x55632d){_0x266c30['push'](_0x266c30['shift']());}}}(a2_0xf6e1,0xae468));import{WebSocketServer}from'ws';import*as a2_0x24a708 from'../ui/output.js';const sessions=new Map();let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x396b2d=0x2408){return new Promise(_0x2f486a=>{const _0x436fe2=a2_0x4c5e;if(isRunning&&server){a2_0x24a708[_0x436fe2(0xa4)]('Browser\x20server\x20already\x20running'),_0x2f486a(!![]);return;}try{server=new WebSocketServer({'port':_0x396b2d}),server['on']('listening',()=>{const _0x2159ec=_0x436fe2;isRunning=!![],a2_0x24a708[_0x2159ec(0xad)](_0x2159ec(0xa9)+_0x396b2d),a2_0x24a708[_0x2159ec(0xae)](_0x2159ec(0xa5)),_0x2f486a(!![]);}),server['on'](_0x436fe2(0xd8),async _0x37a32b=>{const _0x1d0083=_0x436fe2;let _0x4a7dc5=null;_0x37a32b['on']('message',async _0x48fa4d=>{const _0x412f42=a2_0x4c5e;try{const _0x2297ab=JSON[_0x412f42(0xb9)](_0x48fa4d[_0x412f42(0xc5)]());if(_0x2297ab[_0x412f42(0xd5)]==='auth')_0x4a7dc5={'ws':_0x37a32b,'userId':_0x2297ab['user']?.[_0x412f42(0xb3)]||'unknown','userEmail':_0x2297ab[_0x412f42(0xbe)]?.[_0x412f42(0xc1)]||_0x412f42(0xa7),'connectedAt':Date[_0x412f42(0xd0)]()},sessions[_0x412f42(0xb7)](_0x4a7dc5['userId'],_0x4a7dc5),_0x37a32b[_0x412f42(0xbd)](JSON['stringify']({'type':_0x412f42(0xc4),'userId':_0x4a7dc5[_0x412f42(0xc3)]}));else{if(_0x2297ab[_0x412f42(0xd5)]===_0x412f42(0xb5)){const _0x14be27=pendingRequests[_0x412f42(0xb6)](_0x2297ab[_0x412f42(0xda)]);_0x14be27&&(clearTimeout(_0x14be27[_0x412f42(0xaa)]),pendingRequests[_0x412f42(0xa6)](_0x2297ab[_0x412f42(0xda)]),_0x2297ab[_0x412f42(0xc8)][_0x412f42(0xad)]?_0x14be27[_0x412f42(0xd4)](_0x2297ab['result']['data']):_0x14be27[_0x412f42(0xc6)](new Error(_0x2297ab[_0x412f42(0xc8)][_0x412f42(0xbc)]||'Command\x20failed')));}}}catch(_0x103f80){console[_0x412f42(0xbc)](_0x412f42(0xd9),_0x103f80);}}),_0x37a32b['on'](_0x1d0083(0xb8),()=>{const _0x14856e=_0x1d0083;_0x4a7dc5&&sessions[_0x14856e(0xa6)](_0x4a7dc5['userId']);}),_0x37a32b['on']('error',_0xa770f7=>{const _0x2c67b6=_0x1d0083;console['error'](_0x2c67b6(0xd3),_0xa770f7);});}),server['on'](_0x436fe2(0xbc),_0x310d3a=>{const _0x9ee874=_0x436fe2;_0x310d3a['code']!==_0x9ee874(0xb2)&&a2_0x24a708[_0x9ee874(0xbc)]('Browser\x20server\x20error:\x20'+_0x310d3a['message']),_0x2f486a(![]);});}catch(_0x50c3e7){_0x50c3e7[_0x436fe2(0xcd)]!==_0x436fe2(0xb2)&&a2_0x24a708[_0x436fe2(0xbc)]('Failed\x20to\x20start\x20browser\x20server:\x20'+_0x50c3e7[_0x436fe2(0xc2)]),_0x2f486a(![]);}});}function a2_0x4c5e(_0x1f322a,_0x221b7e){_0x1f322a=_0x1f322a-0xa4;const _0xf6e18d=a2_0xf6e1();let _0x4c5ea8=_0xf6e18d[_0x1f322a];return _0x4c5ea8;}export function stopBrowserServer(){const _0x53ea24=a2_0x4c5e;server&&(sessions[_0x53ea24(0xd2)](),pendingRequests['forEach'](({timeout:_0x1375ac,reject:_0xb296c0})=>{clearTimeout(_0x1375ac),_0xb296c0(new Error('Server\x20stopped'));}),pendingRequests[_0x53ea24(0xd2)](),server[_0x53ea24(0xb8)](),server=null,isRunning=![],a2_0x24a708[_0x53ea24(0xcb)](_0x53ea24(0xd6)));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x16499a,_0x291310={},_0x5c9e6=0x7530){const _0x358360=a2_0x4c5e;if(!isRunning)throw new Error(_0x358360(0xb4));const _0x4a90a3=Array[_0x358360(0xcf)](sessions[_0x358360(0xc7)]())[0x0];if(!_0x4a90a3)throw new Error(_0x358360(0xc9));const _0xed7111=generateRequestId();return new Promise((_0x40b59f,_0x4eac6e)=>{const _0x42bb69=_0x358360,_0x184677=setTimeout(()=>{const _0xecb5e4=a2_0x4c5e;pendingRequests[_0xecb5e4(0xa6)](_0xed7111),_0x4eac6e(new Error(_0xecb5e4(0xc0)+_0x5c9e6+'ms'));},_0x5c9e6);pendingRequests[_0x42bb69(0xb7)](_0xed7111,{'resolve':_0x40b59f,'reject':_0x4eac6e,'timeout':_0x184677});const _0x5961c4={'requestId':_0xed7111,'command':_0x16499a,'args':_0x291310};_0x4a90a3['ws'][_0x42bb69(0xbd)](JSON[_0x42bb69(0xba)](_0x5961c4));});}function generateRequestId(){const _0x2a4e9a=a2_0x4c5e;return _0x2a4e9a(0xce)+Date[_0x2a4e9a(0xd0)]()+'_'+Math['random']()['toString'](0x24)[_0x2a4e9a(0xb0)](0x2,0x9);}export function getConnectedSessions(){return Array['from'](sessions['values']());}function a2_0xf6e1(){const _0xcdf16a=['Browser\x20server\x20stopped','4689RNBzsf','connection','Error\x20processing\x20message:','requestId','warn','Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...','delete','unknown','278566Dminqx','Browser\x20server\x20started\x20on\x20ws://localhost:','timeout','4887310czspUf','4734136hCuNua','success','dim','144tgjqvq','substr','1042xcYHTT','EADDRINUSE','uid','Browser\x20server\x20not\x20running','response','get','set','close','parse','stringify','444328TnKEZt','error','send','user','49ZSrbhi','Command\x20timeout\x20after\x20','email','message','userId','auth_success','toString','reject','values','result','No\x20browser\x20extension\x20connected','60mRAImd','info','674682ziHTfy','code','req_','from','now','2368003ArMCAm','clear','WebSocket\x20error:','resolve','type'];a2_0xf6e1=function(){return _0xcdf16a;};return a2_0xf6e1();}
@@ -1 +1 @@
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
+ (function(_0x52b4f0,_0x1b2542){const _0x43a1e5=a3_0x5e01,_0x157327=_0x52b4f0();while(!![]){try{const _0x26f65e=parseInt(_0x43a1e5(0x1f6))/0x1*(-parseInt(_0x43a1e5(0x205))/0x2)+-parseInt(_0x43a1e5(0x1fc))/0x3*(-parseInt(_0x43a1e5(0x204))/0x4)+parseInt(_0x43a1e5(0x1fe))/0x5*(parseInt(_0x43a1e5(0x20a))/0x6)+-parseInt(_0x43a1e5(0x1f3))/0x7*(parseInt(_0x43a1e5(0x1fd))/0x8)+-parseInt(_0x43a1e5(0x206))/0x9*(-parseInt(_0x43a1e5(0x201))/0xa)+-parseInt(_0x43a1e5(0x1f2))/0xb+parseInt(_0x43a1e5(0x1fb))/0xc*(parseInt(_0x43a1e5(0x200))/0xd);if(_0x26f65e===_0x1b2542)break;else _0x157327['push'](_0x157327['shift']());}catch(_0x206b8a){_0x157327['push'](_0x157327['shift']());}}}(a3_0x1bf9,0x95c34));import{sendBrowserCommand,getConnectedSessions}from'./server.js';function a3_0x1bf9(){const _0x1b153b=['Opened\x20in\x20system\x20browser','1038508cExJBh','1179702xzzemO','16812mYwSGz','fill','back','wait','7310976yuOsKL','get_text','3724281drEbsu','182thOlPn','screenshot','number','2FJWqCC','get_html','click','scroll','snapshot','96XsguEl','3BmRtYa','352856jtoCSc','5dCuuLW','close','2846662WweAed','260UMAHSC','reload'];a3_0x1bf9=function(){return _0x1b153b;};return a3_0x1bf9();}import a3_0x323116 from'open';function a3_0x5e01(_0x48c4a3,_0x1638c1){_0x48c4a3=_0x48c4a3-0x1f2;const _0x1bf9f4=a3_0x1bf9();let _0x5e0106=_0x1bf9f4[_0x48c4a3];return _0x5e0106;}export async function browserOpen(_0x40588b){const _0x18e536=a3_0x5e01,_0x40bf93=getConnectedSessions();if(_0x40bf93['length']===0x0)return await a3_0x323116(_0x40588b),{'success':!![],'message':_0x18e536(0x203)};try{return await sendBrowserCommand('open',{'url':_0x40588b});}catch(_0xf31541){return await a3_0x323116(_0x40588b),{'success':!![],'message':'Opened\x20in\x20system\x20browser'};}}export async function browserClick(_0x408e21){const _0x50cbff=a3_0x5e01;return await sendBrowserCommand(_0x50cbff(0x1f8),{'selector':_0x408e21});}export async function browserFill(_0x451680,_0x45c1c3){const _0x55e57a=a3_0x5e01;return await sendBrowserCommand(_0x55e57a(0x207),{'selector':_0x451680,'value':_0x45c1c3});}export async function browserSnapshot(){const _0x1a748f=a3_0x5e01;return await sendBrowserCommand(_0x1a748f(0x1fa));}export async function browserScreenshot(){const _0x54e3ea=a3_0x5e01;return await sendBrowserCommand(_0x54e3ea(0x1f4));}export async function browserGetText(_0x7ad78a){const _0x242667=a3_0x5e01;return await sendBrowserCommand(_0x242667(0x20b),{'selector':_0x7ad78a});}export async function browserGetHtml(_0x3df3b7){const _0x2da3e2=a3_0x5e01;return await sendBrowserCommand(_0x2da3e2(0x1f7),{'selector':_0x3df3b7});}export async function browserWait(_0xc87ff9){const _0x5c135a=a3_0x5e01;return typeof _0xc87ff9===_0x5c135a(0x1f5)?await sendBrowserCommand('wait',{'ms':_0xc87ff9}):await sendBrowserCommand(_0x5c135a(0x209),{'selector':_0xc87ff9});}export async function browserBack(){const _0x6e4435=a3_0x5e01;return await sendBrowserCommand(_0x6e4435(0x208));}export async function browserForward(){return await sendBrowserCommand('forward');}export async function browserReload(){const _0x26c0b1=a3_0x5e01;return await sendBrowserCommand(_0x26c0b1(0x202));}export async function browserScroll(_0x31ac65,_0x1e044c){const _0x54f802=a3_0x5e01;return await sendBrowserCommand(_0x54f802(0x1f9),{'direction':_0x31ac65,'amount':_0x1e044c});}export async function browserClose(){const _0x5e33f2=a3_0x5e01;return await sendBrowserCommand(_0x5e33f2(0x1ff));}
@@ -1 +1 @@
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
+ function a4_0x1f9c(_0x4725b6,_0xce887e){_0x4725b6=_0x4725b6-0xab;const _0x42ea64=a4_0x42ea();let _0x1f9cdf=_0x42ea64[_0x4725b6];return _0x1f9cdf;}const a4_0x3df5f1=a4_0x1f9c;(function(_0x2d53d8,_0xcb8789){const _0x18697b=a4_0x1f9c,_0x4816a0=_0x2d53d8();while(!![]){try{const _0x508182=-parseInt(_0x18697b(0x14b))/0x1+-parseInt(_0x18697b(0xbb))/0x2*(parseInt(_0x18697b(0xcb))/0x3)+parseInt(_0x18697b(0x16c))/0x4*(-parseInt(_0x18697b(0x10f))/0x5)+-parseInt(_0x18697b(0xc8))/0x6+parseInt(_0x18697b(0x11c))/0x7*(parseInt(_0x18697b(0xbc))/0x8)+-parseInt(_0x18697b(0x17e))/0x9*(parseInt(_0x18697b(0x110))/0xa)+parseInt(_0x18697b(0xf6))/0xb;if(_0x508182===_0xcb8789)break;else _0x4816a0['push'](_0x4816a0['shift']());}catch(_0x3ac0cf){_0x4816a0['push'](_0x4816a0['shift']());}}}(a4_0x42ea,0x485a5));function a4_0x42ea(){const _0x55ec31=['startBot','name','selector','args','path','/clear','Unknown\x20tool','Browser\x20server\x20is\x20not\x20running','Model\x20changed\x20to:\x20','values','InputTerm','match','start','/github','Running','2.\x20Send\x20/newbot\x20and\x20follow\x20instructions','Yes','toFixed','read_terminal_output','url','Conversation\x20cleared','setSecurityPin','bold','\x20\x20-\x20','body','.\x20Use\x20','../browser/index.js','warn','all','Security\x20PIN\x20set!','\x22args\x22:','25166glqkay','2565704pLvRzl','Exited\x20with\x20code\x20','send_terminal_input','status','dim','```','browser_open','loggedInBox','file_path','repo','setup','header','1645626sLbCAS','PID:','../tools/file.js','9MAGEEm','github_create_pr','run_command','source','Connected\x20MCP\x20Tools:','pid','.\x20Use\x20PowerShell\x20commands.','I\x20am','/stats','stderr','pattern','3.\x20Copy\x20the\x20bot\x20token','Invalid\x20JSON\x20output\x20from\x20model:\x20','list_active_processes','Failed\x20to\x20fetch\x20usage\x20data.','startsWith','slice','Done\x20in\x20','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot','registered\x20that','browser_get_text','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','data','Operation\x20failed','getThemeById','createSpinner','API\x20error:\x20','isSpinning','-\x20Running','command','...','branch','statusBar','\x20lines\x20of\x20output\x20(','signal','Fill','/mcp','AbortError','Read\x20','now','../tools/rollback.js','aborted','12192158NLINnG','setBotToken','serverName','value','create_file','I\x27ve','filename','Snapshot','@inquirer/prompts','properties','It\x20will\x20start\x20automatically\x20when\x20needed','displayName','Let\x20me','\x20lines\x20(','\x22name\x22:','browser_snapshot','inputSchema','CloseBrowser','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,\x20read_terminal_output,\x20send_terminal_input,\x20list_active_processes,\x20terminate_process\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','any','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','\x20[Aborted]','error','length','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','25CtMrTM','30cRZDcm','Search','email','GetText','stringify','1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather','MCP\x20Tool\x20error:\x20','Unexpected\x20error:\x20','aiMessageEnd','object','List','Browser\x20server\x20is\x20running','7kJeoQi','message','/theme','catch','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','SearchDir','Fetching\x20usage...','parse','push','forEach','Unknown','actionSpinner','browser_click','force\x20closed','../github/api.js','):\x20','content','Find','isRateLimit','must\x20greet','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','Tool\x20result\x20for\x20','owner','Error:\x20','tokensUsed','search_directory','fromBranch','isConfigured','currentDir','trim','isBotRunning','keys','find_files','info','Bot\x20token:','Bot\x20token\x20saved!','../tools/command.js','SIGINT','hex','.\x20Please\x20fix\x20this\x20and\x20continue.','stdout','split','user','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','script','###','Read','361511rdKcDn','../ui/themes.js','substring','browser_close','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','../telegram/index.js','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','Unknown\x20tool:\x20','Tool\x20error\x20occurred:\x20','cmd','getTheme','exitCode','/exit','toolSuccess','stopBot','No\x20changes\x20to\x20rollback','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','search_file','rateLimitWarning','monthlyLimit','/themes','/telegram','edit_file','size','Telegram\x20Commands','then','\x0aAborting...','usageBox','Screenshot','browser_screenshot','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram','Reached\x20maximum\x20iterations','read_file','322384tDjqiv','Completed\x20with\x20','Telegram\x20bot\x20stopped.','\x0aYou\x20are\x20running\x20on\x20','stop','system','Now,','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','includes','terminate_process','file','description','write','\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status','Telegram\x20bot\x20is\x20not\x20running','join','No\x20MCP\x20tools\x20connected.','cwd','168669HHfGEQ','return\x20','filepath','removeListener','replace','list_directory','Current\x20model:\x20','Error','ReadTerm','```tool','success'];a4_0x42ea=function(){return _0x55ec31;};return a4_0x42ea();}import{input}from'@inquirer/prompts';import a4_0x559612 from'chalk';import{sendChatMessage,getUserUsage}from'../utils/api.js';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_0x2de05f from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x3747f4 from'../github/index.js';const SYSTEM_PROMPT=a4_0x3df5f1(0x108);export async function startChat(_0x2c6b92){const _0x402e79=a4_0x3df5f1,{startBrowserServer:_0x98415b}=await import('../browser/index.js');_0x98415b()[_0x402e79(0x11f)](()=>{});const _0x4f496d=getSelectedModel();await connectToMcpServers();const _0x1adeef=await getMcpTools(),_0x2f0e72=new Set(_0x1adeef['map'](_0x16f093=>_0x16f093[_0x402e79(0xf8)]));_0x2f0e72[_0x402e79(0x162)]>0x0&&a4_0x2de05f['mcpConnected'](_0x2f0e72['size'],_0x1adeef[_0x402e79(0x10d)]);process['on']('exit',()=>closeMcpClients());const _0x2597bc=formatRulesForSystem(),_0x589744=getPlatformInfo(),_0x24dfd9=getShellPrefix(),_0x45ff00=_0x1adeef[_0x402e79(0x10d)]>0x0?_0x402e79(0x130)+_0x1adeef['map'](_0x5d16c9=>{const _0x16c018=_0x402e79,_0x46f570=Object[_0x16c018(0x13b)](_0x5d16c9[_0x16c018(0x106)]?.[_0x16c018(0xff)]||{})['join'](',\x20');return'-\x20'+_0x5d16c9[_0x16c018(0x18a)]+'('+_0x46f570+_0x16c018(0x12b)+_0x5d16c9[_0x16c018(0x177)];})[_0x402e79(0x17b)]('\x0a'):'',_0x33b070=isWindows()?_0x402e79(0x16f)+_0x589744+_0x402e79(0xd1):'\x0aYou\x20are\x20running\x20on\x20'+_0x589744+_0x402e79(0xb5)+_0x24dfd9+'\x20for\x20commands\x20requiring\x20elevated\x20privileges.',_0x21686a=SYSTEM_PROMPT+_0x45ff00+_0x33b070+'\x0a'+_0x2597bc,_0x2a5120=getUser(),_0x462c9f=[{'role':_0x402e79(0x171),'content':_0x21686a}];(_0x2a5120['displayName']||_0x2a5120[_0x402e79(0x112)])&&a4_0x2de05f[_0x402e79(0xc3)](_0x2a5120[_0x402e79(0x101)]||_0x2a5120['email']||_0x402e79(0x126));a4_0x2de05f[_0x402e79(0x138)](process[_0x402e79(0x17d)]()),a4_0x2de05f['dim']('Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more'),a4_0x2de05f[_0x402e79(0xec)](_0x4f496d,0x64);const _0x44db37=async _0x1cbb74=>{const _0x481e34=_0x402e79;if(!_0x1cbb74||_0x1cbb74[_0x481e34(0x139)]()==='')return!![];const _0x3bcc92=_0x1cbb74['trim']();if(_0x3bcc92===_0x481e34(0x157)||_0x3bcc92==='/quit')return a4_0x2de05f['info']('Goodbye!'),![];if(_0x3bcc92===_0x481e34(0x18e))return _0x462c9f[_0x481e34(0x10d)]=0x1,a4_0x2de05f['info'](_0x481e34(0xb0)),!![];if(_0x3bcc92===_0x481e34(0xf0)){const _0x36616b=await getMcpTools();return _0x36616b['length']===0x0?a4_0x2de05f[_0x481e34(0x13d)](_0x481e34(0x17c)):(a4_0x2de05f[_0x481e34(0x13d)](_0x481e34(0xcf)),_0x36616b[_0x481e34(0x125)](_0x1cae93=>a4_0x2de05f[_0x481e34(0xc0)]('-\x20'+_0x1cae93['name']+'\x20('+_0x1cae93[_0x481e34(0xf8)]+'):\x20'+(_0x1cae93[_0x481e34(0x177)]?.[_0x481e34(0xdb)](0x0,0x32)||'')))),a4_0x2de05f[_0x481e34(0xc0)]('\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.'),!![];}if(_0x3bcc92==='/help')return a4_0x2de05f['header']('Commands'),a4_0x2de05f[_0x481e34(0xc0)]('\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat'),a4_0x2de05f[_0x481e34(0xc0)]('\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history'),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x15b)),a4_0x2de05f[_0x481e34(0xc0)]('\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme'),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x173)),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x169)),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x120)),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x147)),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x14f)),a4_0x2de05f[_0x481e34(0xc0)]('\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration'),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x179)),!![];if(_0x3bcc92==='/browser'){const {isBrowserServerRunning:_0x40c317,getConnectedSessions:_0x4293c5}=await import(_0x481e34(0xb6));if(_0x40c317()){const _0x505ef9=_0x4293c5();a4_0x2de05f[_0x481e34(0x188)](_0x481e34(0x11b)),a4_0x2de05f['info']('Connected\x20browsers:\x20'+_0x505ef9[_0x481e34(0x10d)]),_0x505ef9[_0x481e34(0x125)](_0x479832=>a4_0x2de05f['dim'](_0x481e34(0xb3)+_0x479832['userEmail']));}else a4_0x2de05f['dim'](_0x481e34(0x190)),a4_0x2de05f['dim'](_0x481e34(0x100));return!![];}if(_0x3bcc92['startsWith'](_0x481e34(0x196))){const _0x266521=_0x3bcc92['split']('\x20')[0x1]||'';return await a4_0x3747f4['handleGitHubCommand'](_0x266521),!![];}if(_0x3bcc92[_0x481e34(0xda)](_0x481e34(0x160))){const _0x10f536=await import(_0x481e34(0x150)),_0x1fed44=_0x3bcc92['split']('\x20')[0x1]||'';if(_0x1fed44===_0x481e34(0xc6)){const {input:_0x2313a9,password:_0x2f4ff2}=await import(_0x481e34(0xfe));a4_0x2de05f[_0x481e34(0xc7)]('Telegram\x20Bot\x20Setup'),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x115)),a4_0x2de05f['dim'](_0x481e34(0xab)),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0xd6)),a4_0x2de05f['info']('');const _0x2d3985=await _0x2f4ff2({'message':_0x481e34(0x13e),'mask':'*'});_0x2d3985&&(_0x10f536[_0x481e34(0xf7)](_0x2d3985),a4_0x2de05f['success'](_0x481e34(0x13f)));const _0x125112=await _0x2313a9({'message':_0x481e34(0x151)});return _0x125112&&(_0x10f536[_0x481e34(0xb1)](_0x125112),a4_0x2de05f[_0x481e34(0x188)](_0x481e34(0xb9))),a4_0x2de05f[_0x481e34(0x13d)](_0x481e34(0x10a)),!![];}if(_0x1fed44==='start')return await _0x10f536[_0x481e34(0x189)](),!![];if(_0x1fed44===_0x481e34(0x170))return _0x10f536[_0x481e34(0x159)](),a4_0x2de05f[_0x481e34(0x13d)](_0x481e34(0x16e)),!![];if(_0x1fed44===_0x481e34(0xbf))return _0x10f536[_0x481e34(0x13a)]()?a4_0x2de05f[_0x481e34(0x188)]('Telegram\x20bot\x20is\x20running'):a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x17a)),a4_0x2de05f[_0x481e34(0xc0)]('Configured:\x20'+(_0x10f536[_0x481e34(0x137)]()?_0x481e34(0xac):'No')),!![];return a4_0x2de05f[_0x481e34(0xc7)](_0x481e34(0x163)),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0xdd)),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0xde)),a4_0x2de05f['dim']('\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot'),a4_0x2de05f[_0x481e34(0xc0)](_0x481e34(0x10e)),!![];}if(_0x3bcc92==='/rollback'){const {rollbackLast:_0x3ed651,getChanges:_0x52be71}=await import(_0x481e34(0xf4)),_0x203210=_0x52be71();if(_0x203210[_0x481e34(0x10d)]===0x0)a4_0x2de05f['info'](_0x481e34(0x15a));else{const _0x553afa=_0x3ed651();_0x553afa[_0x481e34(0x188)]?a4_0x2de05f[_0x481e34(0x188)](_0x553afa[_0x481e34(0x11d)]):a4_0x2de05f[_0x481e34(0x10c)](_0x553afa['message']);}return!![];}if(_0x3bcc92==='/model'){const _0x3fb039=await selectModel();return _0x3fb039!==_0x4f496d?(a4_0x2de05f[_0x481e34(0x13d)](_0x481e34(0x191)+_0x3fb039),a4_0x2de05f[_0x481e34(0x13d)](_0x481e34(0xe1))):a4_0x2de05f[_0x481e34(0x13d)](_0x481e34(0x184)+_0x4f496d),!![];}if(_0x3bcc92===_0x481e34(0x11e)||_0x3bcc92===_0x481e34(0x15f)){const {selectTheme:_0x27277a}=await import(_0x481e34(0x14c)),_0x451995=await _0x27277a();return a4_0x2de05f[_0x481e34(0x13d)]('Theme\x20changed\x20to:\x20'+_0x451995),!![];}if(_0x3bcc92==='/usage'||_0x3bcc92===_0x481e34(0xd3)){const _0x19f5e4=a4_0x2de05f[_0x481e34(0xe5)](_0x481e34(0x122));_0x19f5e4[_0x481e34(0x195)]();const _0x46dd00=await getUserUsage();return _0x19f5e4[_0x481e34(0x170)](),_0x46dd00?a4_0x2de05f[_0x481e34(0x166)](_0x46dd00[_0x481e34(0x134)],_0x46dd00[_0x481e34(0x15e)],_0x46dd00['isOverLimit']):a4_0x2de05f[_0x481e34(0x10c)](_0x481e34(0xd9)),!![];}return _0x462c9f[_0x481e34(0x124)]({'role':_0x481e34(0x146),'content':_0x3bcc92}),await processAgentLoop(_0x462c9f,_0x4f496d),!![];};if(_0x2c6b92){const _0x79fa90=await _0x44db37(_0x2c6b92);if(!_0x79fa90)return;}while(!![]){try{const _0x42ea2d=await import('../utils/storage.js')['then'](_0x4f7af1=>_0x4f7af1[_0x402e79(0x155)]()),_0x45df56=await import(_0x402e79(0x14c))[_0x402e79(0x164)](_0x66e416=>_0x66e416[_0x402e79(0xe4)](_0x42ea2d)),_0x13888d=a4_0x559612[_0x402e79(0xb2)][_0x402e79(0x142)](_0x45df56['primary'])('\x0a>\x20'),_0x129587=await input({'message':_0x13888d,'theme':{'prefix':''}}),_0x32634a=await _0x44db37(_0x129587);if(!_0x32634a)break;}catch(_0x2b22ef){if(_0x2b22ef instanceof Error&&_0x2b22ef['message'][_0x402e79(0x174)](_0x402e79(0x129)))break;a4_0x2de05f['error'](_0x402e79(0x117)+_0x2b22ef);}}}function cleanTagsFromLine(_0x26ec30){const _0x1d418f=a4_0x3df5f1,_0x34690b=_0x26ec30['trim']();if(!_0x34690b)return'';if(_0x34690b[_0x1d418f(0xda)]('**'))return'';if(_0x34690b['startsWith'](_0x1d418f(0x149)))return'';if(_0x34690b[_0x1d418f(0xda)]('---'))return'';if(_0x34690b[_0x1d418f(0xda)](_0x1d418f(0xc1)))return'';if(_0x34690b['includes'](_0x1d418f(0x104))&&_0x34690b[_0x1d418f(0x174)](_0x1d418f(0xba)))return'';if(_0x34690b['startsWith'](_0x1d418f(0x197)))return'';if(_0x34690b['startsWith'](_0x1d418f(0xe8)))return'';if(_0x34690b[_0x1d418f(0xda)](_0x1d418f(0xfb)))return'';if(_0x34690b[_0x1d418f(0xda)](_0x1d418f(0xd2)))return'';if(_0x34690b[_0x1d418f(0xda)](_0x1d418f(0x172)))return'';if(_0x34690b[_0x1d418f(0xda)](_0x1d418f(0x102)))return'';if(_0x34690b[_0x1d418f(0x174)](_0x1d418f(0x12f)))return'';if(_0x34690b[_0x1d418f(0x174)](_0x1d418f(0xdf)))return'';return _0x26ec30[_0x1d418f(0x182)](/<text>/g,'')[_0x1d418f(0x182)](/<\/text>/g,'')[_0x1d418f(0x182)](/<\/text>/g,'')[_0x1d418f(0x182)](/<reasoning>/g,'')[_0x1d418f(0x182)](/<\/reasoning>/g,'')[_0x1d418f(0x182)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x3593aa,_0x20d3ea){const _0x3132d4=a4_0x3df5f1;let _0x16af22=0x0;const _0x27ff7d=0x3e8;while(_0x16af22<_0x27ff7d){_0x16af22++;const _0x502856=a4_0x2de05f['createSpinner']('Thinking...');_0x502856[_0x3132d4(0x195)]();let _0x2fdb95='',_0x32e6ed=![],_0x262257='';const _0x3ea71a=new AbortController(),_0x68b309=()=>{const _0x1dbea2=_0x3132d4;_0x3ea71a['abort'](),a4_0x2de05f['info'](_0x1dbea2(0x165));};process['on'](_0x3132d4(0x141),_0x68b309);let _0x5b3c23=null;try{const _0x27f021=await sendChatMessage(_0x20d3ea,_0x3593aa,_0xf9936d=>{const _0x410205=_0x3132d4;_0x502856[_0x410205(0xe7)]&&_0x502856[_0x410205(0x170)]();_0x2fdb95+=_0xf9936d;for(const _0x1b211a of _0xf9936d){_0x262257+=_0x1b211a;if(_0x1b211a==='\x0a'){if(!_0x32e6ed){if(_0x262257[_0x410205(0x174)]('<execute_tool>')||_0x262257['startsWith'](_0x410205(0x187))){_0x32e6ed=!![],_0x262257='';!_0x5b3c23&&(_0x5b3c23=a4_0x2de05f['actionSpinner']('Generating...'),_0x5b3c23['start']());continue;}let _0x3bf8c2=_0x262257[_0x410205(0x182)](/<text>/g,'')[_0x410205(0x182)](/<\/text>/g,'')[_0x410205(0x182)](/<reasoning.*?>/g,'')[_0x410205(0x182)](/<\/reasoning>/g,'');if(_0x3bf8c2[_0x410205(0xda)]('```')&&!_0x3bf8c2['startsWith'](_0x410205(0x187)))process['stdout'][_0x410205(0x178)]('```'+_0x3bf8c2[_0x410205(0xdb)](0x3));else(_0x3bf8c2[_0x410205(0x139)]()||_0x3bf8c2==='\x0a'||_0x3bf8c2==='\x0d\x0a')&&process[_0x410205(0x144)][_0x410205(0x178)](_0x3bf8c2);}else(_0x262257[_0x410205(0x174)]('</execute_tool>')||_0x262257[_0x410205(0x139)]()===_0x410205(0xc1))&&(_0x32e6ed=![],_0x5b3c23&&(_0x5b3c23['stop'](),_0x5b3c23=null));_0x262257='';}}},_0x3ea71a[_0x3132d4(0xee)]);_0x5b3c23&&(_0x5b3c23[_0x3132d4(0x170)](),_0x5b3c23=null);if(_0x262257&&!_0x32e6ed&&!_0x262257[_0x3132d4(0x174)]('<execute_tool>')){let _0x593591=_0x262257[_0x3132d4(0x182)](/<text>/g,'')[_0x3132d4(0x182)](/<\/text>/g,'')[_0x3132d4(0x182)](/<reasoning.*?>/g,'')[_0x3132d4(0x182)](/<\/reasoning>/g,'');if(_0x593591[_0x3132d4(0x139)]())process[_0x3132d4(0x144)][_0x3132d4(0x178)](_0x593591);}_0x2fdb95=_0x27f021[_0x3132d4(0x12c)];}catch(_0x57592a){_0x502856['stop'](),process[_0x3132d4(0x181)]('SIGINT',_0x68b309);if(_0x57592a[_0x3132d4(0x18a)]===_0x3132d4(0xf1)||_0x57592a['message'][_0x3132d4(0x174)](_0x3132d4(0xf5))){a4_0x2de05f['warn']('User\x20aborted.'),_0x3593aa[_0x3132d4(0x124)]({'role':'assistant','content':_0x2fdb95+_0x3132d4(0x10b)}),_0x3593aa[_0x3132d4(0x124)]({'role':_0x3132d4(0x146),'content':'Stop.'});break;}if(_0x57592a[_0x3132d4(0x12e)]){a4_0x2de05f[_0x3132d4(0x15d)](_0x57592a['resetIn']||0x3c);return;}a4_0x2de05f['error'](_0x3132d4(0xe6)+_0x57592a);return;}finally{process[_0x3132d4(0x181)]('SIGINT',_0x68b309);}_0x502856[_0x3132d4(0xe7)]&&_0x502856[_0x3132d4(0x170)]();a4_0x2de05f[_0x3132d4(0x118)](),_0x3593aa[_0x3132d4(0x124)]({'role':'assistant','content':_0x2fdb95});let _0x53c752=_0x2fdb95[_0x3132d4(0x194)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x53c752&&(_0x53c752=_0x2fdb95['match'](/```tool\s*([\s\S]*?)```/));!_0x53c752&&(_0x53c752=_0x2fdb95[_0x3132d4(0x194)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x53c752)break;function _0x2c2524(_0x16ca28){const _0x1e094c=_0x3132d4,_0x223d8b=_0x16ca28['trim']();try{return JSON[_0x1e094c(0x123)](_0x223d8b);}catch(_0x2d83f8){try{let _0x55b8d3='',_0x67a9de=![];for(let _0x107638=0x0;_0x107638<_0x223d8b['length'];_0x107638++){const _0x227add=_0x223d8b[_0x107638];if(_0x227add==='\x22'&&_0x223d8b[_0x107638-0x1]!=='\x5c')_0x67a9de=!_0x67a9de;if(_0x67a9de&&_0x227add==='\x0a')_0x55b8d3+='\x5cn';else _0x55b8d3+=_0x227add;}return JSON[_0x1e094c(0x123)](_0x55b8d3);}catch(_0x59c81b){try{return new Function(_0x1e094c(0x17f)+_0x223d8b)();}catch(_0xa158be){throw new Error(_0x1e094c(0xd7)+_0x2d83f8[_0x1e094c(0x11d)]);}}}}try{const _0x161fc1=_0x2c2524(_0x53c752[0x1]),_0x14a38e={'write_file':_0x3132d4(0xfa),'write':_0x3132d4(0xfa),'create':_0x3132d4(0xfa),'read':'read_file','read_text_file':_0x3132d4(0x16b),'search':_0x3132d4(0x15c),'list':_0x3132d4(0x183),'ls':'list_directory','execute':_0x3132d4(0xcd),'cmd':'run_command'};_0x14a38e[_0x161fc1[_0x3132d4(0x18a)]]&&(_0x161fc1[_0x3132d4(0x18a)]=_0x14a38e[_0x161fc1[_0x3132d4(0x18a)]]);_0x161fc1[_0x3132d4(0x18c)]&&(!_0x161fc1[_0x3132d4(0x18c)]['path']&&(_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0x18d)]=_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0xc4)]||_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0x180)]||_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0x176)]||_0x161fc1['args'][_0x3132d4(0xfc)]),!_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0x12c)]&&(_0x161fc1[_0x3132d4(0x18c)]['content']=_0x161fc1[_0x3132d4(0x18c)]['text']||_0x161fc1[_0x3132d4(0x18c)]['code']||_0x161fc1['args'][_0x3132d4(0xe2)]||_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0xce)]),!_0x161fc1[_0x3132d4(0x18c)]['command']&&(_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0xe9)]=_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0x154)]||_0x161fc1['args'][_0x3132d4(0x148)]));const _0x3e957a={'create_file':'Create','read_file':_0x3132d4(0x14a),'edit_file':'Update','list_directory':_0x3132d4(0x11a),'search_file':_0x3132d4(0x111),'find_files':_0x3132d4(0x12d),'search_directory':_0x3132d4(0x121),'run_command':'Run','read_terminal_output':_0x3132d4(0x186),'send_terminal_input':_0x3132d4(0x193),'list_active_processes':'ListProcs','terminate_process':'KillProc','browser_open':'Browser','browser_click':'Click','browser_fill':_0x3132d4(0xef),'browser_snapshot':_0x3132d4(0xfd),'browser_screenshot':_0x3132d4(0x167),'browser_get_text':_0x3132d4(0x113),'browser_close':_0x3132d4(0x107)},_0x3f28a5=_0x3e957a[_0x161fc1['name']]||_0x161fc1['name'];let _0x4bd6be='';if(_0x161fc1['name']===_0x3132d4(0xcd)&&_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0xe9)])_0x4bd6be=_0x161fc1['args'][_0x3132d4(0xe9)];else{if(_0x161fc1['name']==='send_terminal_input')_0x4bd6be='PID:'+(_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0xd0)]||'any');else{if(_0x161fc1['name']===_0x3132d4(0xae)||_0x161fc1['name']===_0x3132d4(0x175))_0x4bd6be=_0x3132d4(0xc9)+(_0x161fc1['args']['pid']||_0x3132d4(0x109));else{if(_0x161fc1[_0x3132d4(0x18a)]===_0x3132d4(0xd8))_0x4bd6be=_0x3132d4(0xb8);else{if(_0x161fc1['args'][_0x3132d4(0x18d)])_0x4bd6be=_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0x18d)];else{if(_0x161fc1[_0x3132d4(0x18c)]['pattern'])_0x4bd6be='\x22'+_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0xd5)]+'\x22';else _0x161fc1['args'][_0x3132d4(0xaf)]?_0x4bd6be=_0x161fc1[_0x3132d4(0x18c)][_0x3132d4(0xaf)]:_0x4bd6be=Object[_0x3132d4(0x192)](_0x161fc1[_0x3132d4(0x18c)])[0x0]||'';}}}}}const _0x3cb2c6=_0x4bd6be[_0x3132d4(0x10d)]>0x32?_0x4bd6be['slice'](0x0,0x2f)+_0x3132d4(0xea):_0x4bd6be,_0x3e476d=a4_0x2de05f[_0x3132d4(0x127)](_0x3f28a5+'('+_0x3cb2c6+')');_0x3e476d[_0x3132d4(0x195)]();const _0x19e689=performance[_0x3132d4(0xf3)]();let _0x1863aa;try{_0x1863aa=await executeToolCall(_0x161fc1['name'],_0x161fc1[_0x3132d4(0x18c)]);}catch(_0x60e0c4){if(_0x60e0c4[_0x3132d4(0x11d)]&&_0x60e0c4[_0x3132d4(0x11d)][_0x3132d4(0x174)](_0x3132d4(0x18f))){const _0x431d4d=await getMcpTools(),_0xbd4349=_0x431d4d['find'](_0x382a7c=>_0x382a7c[_0x3132d4(0x18a)]===_0x161fc1[_0x3132d4(0x18a)]);if(_0xbd4349)try{_0x1863aa=await executeMcpTool(_0xbd4349['serverName'],_0xbd4349['name'],_0x161fc1['args']);}catch(_0x47920b){throw new Error(_0x3132d4(0x116)+_0x47920b);}else throw _0x60e0c4;}else throw _0x60e0c4;}const _0x5bdec3=((performance[_0x3132d4(0xf3)]()-_0x19e689)/0x3e8)[_0x3132d4(0xad)](0x1);_0x3e476d[_0x3132d4(0x170)]();let _0x39eae6=_0x3132d4(0xdc)+_0x5bdec3+'s',_0x1c080f=![];const _0xcc85cd=_0x1863aa;if(_0xcc85cd&&typeof _0xcc85cd===_0x3132d4(0x119)){if(_0x161fc1[_0x3132d4(0x18a)]===_0x3132d4(0xcd)){if(_0xcc85cd[_0x3132d4(0x156)]===0x0&&_0xcc85cd[_0x3132d4(0x188)]!==![]){const _0x52cae5=_0xcc85cd[_0x3132d4(0x144)]?_0xcc85cd['stdout'][_0x3132d4(0x145)]('\x0a')[_0x3132d4(0x10d)]:0x0;_0x39eae6=_0x3132d4(0x16d)+_0x52cae5+_0x3132d4(0xed)+_0x5bdec3+'s)';}else{_0x1c080f=!![],_0x39eae6=_0x3132d4(0xbd)+_0xcc85cd[_0x3132d4(0x156)];const _0x48443e=_0xcc85cd[_0x3132d4(0xd4)]||_0xcc85cd[_0x3132d4(0x144)]||_0xcc85cd['message']||_0x3132d4(0xe3);_0x48443e&&(_0x39eae6+=':\x20'+_0x48443e['split']('\x0a')[0x0][_0x3132d4(0x14d)](0x0,0x64));}}else{if(_0xcc85cd[_0x3132d4(0x188)]===![])_0x1c080f=!![],_0x39eae6=_0x3132d4(0x133)+(_0xcc85cd['message']||_0xcc85cd[_0x3132d4(0x10c)]||_0x3132d4(0xe3));else{if(_0xcc85cd['error'])_0x1c080f=!![],_0x39eae6='Error:\x20'+_0xcc85cd[_0x3132d4(0x10c)];else{if(_0x161fc1['name']==='read_file'&&typeof _0xcc85cd[_0x3132d4(0x12c)]==='string'){const _0x205bd5=_0xcc85cd['content'][_0x3132d4(0x145)]('\x0a')[_0x3132d4(0x10d)];_0x39eae6=_0x3132d4(0xf2)+_0x205bd5+_0x3132d4(0x103)+_0x5bdec3+'s)';}else(_0x161fc1[_0x3132d4(0x18a)]===_0x3132d4(0x161)||_0x161fc1[_0x3132d4(0x18a)]===_0x3132d4(0xfa))&&(_0x39eae6='Completed\x20successfully\x20('+_0x5bdec3+'s)');}}}}a4_0x2de05f[_0x3132d4(0x158)](_0x3f28a5,_0x3cb2c6,_0x39eae6,_0x1c080f);let _0x1192fe=_0x1863aa;_0x161fc1[_0x3132d4(0x18a)]==='run_command'&&_0xcc85cd&&(_0x1192fe={'exitCode':_0xcc85cd[_0x3132d4(0x156)],'stdout':_0xcc85cd[_0x3132d4(0x144)],'stderr':_0xcc85cd[_0x3132d4(0xd4)],'error':_0xcc85cd['error']}),_0x3593aa[_0x3132d4(0x124)]({'role':_0x3132d4(0x146),'content':_0x3132d4(0x131)+_0x161fc1[_0x3132d4(0x18a)]+':\x0a'+JSON[_0x3132d4(0x114)](_0x1192fe,null,0x2)}),await new Promise(_0x109d47=>setTimeout(_0x109d47,0x1f4));}catch(_0x3941dd){a4_0x2de05f[_0x3132d4(0x158)](_0x3132d4(0x185),'tool\x20execution\x20failed',_0x3941dd[_0x3132d4(0x11d)]||String(_0x3941dd),!![]),_0x3593aa[_0x3132d4(0x124)]({'role':'user','content':_0x3132d4(0x153)+_0x3941dd+_0x3132d4(0x143)});}}_0x16af22>=_0x27ff7d&&a4_0x2de05f[_0x3132d4(0xb7)](_0x3132d4(0x16a));}async function executeToolCall(_0x3788a5,_0x1732c2){const _0x4791c0=a4_0x3df5f1;switch(_0x3788a5){case _0x4791c0(0xfa):return createFile(_0x1732c2['path'],_0x1732c2[_0x4791c0(0x12c)]);case'read_file':return readFile(_0x1732c2[_0x4791c0(0x18d)]);case _0x4791c0(0x183):return listDirectory(_0x1732c2[_0x4791c0(0x18d)]||'.');case _0x4791c0(0x161):return editFile(_0x1732c2[_0x4791c0(0x18d)],_0x1732c2['search'],_0x1732c2['replace']);case'search_file':return searchFile(_0x1732c2[_0x4791c0(0x18d)],_0x1732c2['pattern']);case _0x4791c0(0xcd):const {command:_0xeff0a3,background:_0x28a6c2,wait:_0x16362e}=_0x1732c2,_0x56e4c2=await runCommand(_0xeff0a3,undefined,_0x28a6c2,_0x16362e);return _0x56e4c2;case _0x4791c0(0xae):{const {readTerminalOutput:_0x4035c9}=await import('../tools/command.js');return _0x4035c9(_0x1732c2['pid']);}case _0x4791c0(0xbe):{const {sendTerminalInput:_0x459ca9}=await import(_0x4791c0(0x140));return _0x459ca9(_0x1732c2['input'],_0x1732c2[_0x4791c0(0xd0)]);}case _0x4791c0(0xd8):{const {getActiveProcesses:_0x3d631e}=await import(_0x4791c0(0x140));return{'pids':_0x3d631e(),'message':'Active\x20processes:\x20'+_0x3d631e()[_0x4791c0(0x10d)]};}case'terminate_process':{const {terminateProcess:_0x27bccf}=await import(_0x4791c0(0x140));return _0x27bccf(_0x1732c2[_0x4791c0(0xd0)]);}case _0x4791c0(0x13c):{const {findFiles:_0x4fea00}=await import(_0x4791c0(0xca));return _0x4fea00(_0x1732c2[_0x4791c0(0x18d)]||'.',_0x1732c2[_0x4791c0(0xd5)]);}case _0x4791c0(0x135):{const {searchDirectory:_0x575484}=await import(_0x4791c0(0xca));return _0x575484(_0x1732c2[_0x4791c0(0x18d)]||'.',_0x1732c2[_0x4791c0(0xd5)]);}case'github_read_file':{const {readFile:_0x5c5dc5}=await import(_0x4791c0(0x12a));return _0x5c5dc5(_0x1732c2[_0x4791c0(0x132)],_0x1732c2[_0x4791c0(0xc5)],_0x1732c2[_0x4791c0(0x18d)],_0x1732c2[_0x4791c0(0xeb)]);}case _0x4791c0(0xcc):{const {createPullRequest:_0xc1c279}=await import(_0x4791c0(0x12a));return _0xc1c279(_0x1732c2[_0x4791c0(0x132)],_0x1732c2[_0x4791c0(0xc5)],_0x1732c2['title'],_0x1732c2['head'],_0x1732c2['base'],_0x1732c2[_0x4791c0(0xb4)]);}case'github_create_branch':{const {createBranch:_0x39bca9}=await import(_0x4791c0(0x12a));return _0x39bca9(_0x1732c2[_0x4791c0(0x132)],_0x1732c2[_0x4791c0(0xc5)],_0x1732c2['branchName'],_0x1732c2[_0x4791c0(0x136)]);}case _0x4791c0(0xc2):{const {browserOpen:_0xd81a79,startBrowserServer:_0x1910ad,isBrowserServerRunning:_0x145ceb}=await import('../browser/index.js');return!_0x145ceb()&&await _0x1910ad(),_0xd81a79(_0x1732c2['url']);}case _0x4791c0(0x128):{const {browserClick:_0x1eab88}=await import(_0x4791c0(0xb6));return _0x1eab88(_0x1732c2[_0x4791c0(0x18b)]);}case'browser_fill':{const {browserFill:_0x1d10bd}=await import('../browser/index.js');return _0x1d10bd(_0x1732c2[_0x4791c0(0x18b)],_0x1732c2[_0x4791c0(0xf9)]);}case _0x4791c0(0x105):{const {browserSnapshot:_0x2867b8}=await import(_0x4791c0(0xb6));return _0x2867b8();}case _0x4791c0(0x168):{const {browserScreenshot:_0x41db09}=await import(_0x4791c0(0xb6));return _0x41db09();}case _0x4791c0(0xe0):{const {browserGetText:_0x4e9e14}=await import(_0x4791c0(0xb6));return _0x4e9e14(_0x1732c2[_0x4791c0(0x18b)]);}case _0x4791c0(0x14e):{const {browserClose:_0x2ca5bf}=await import('../browser/index.js');return _0x2ca5bf();}default:return{'error':_0x4791c0(0x152)+_0x3788a5};}}
@@ -1 +1 @@
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
+ function a5_0x9db2(_0x2d94bd,_0x1705d2){_0x2d94bd=_0x2d94bd-0xe5;const _0x274e68=a5_0x274e();let _0x9db2f2=_0x274e68[_0x2d94bd];return _0x9db2f2;}const a5_0x4867fe=a5_0x9db2;(function(_0x5d5ba3,_0xed855a){const _0x31c517=a5_0x9db2,_0x227f37=_0x5d5ba3();while(!![]){try{const _0x3b3041=-parseInt(_0x31c517(0xf8))/0x1*(-parseInt(_0x31c517(0xf0))/0x2)+-parseInt(_0x31c517(0xf3))/0x3*(parseInt(_0x31c517(0xfc))/0x4)+parseInt(_0x31c517(0x100))/0x5*(-parseInt(_0x31c517(0xf7))/0x6)+-parseInt(_0x31c517(0xea))/0x7*(-parseInt(_0x31c517(0x104))/0x8)+parseInt(_0x31c517(0x10e))/0x9+-parseInt(_0x31c517(0x10c))/0xa+parseInt(_0x31c517(0xf1))/0xb*(parseInt(_0x31c517(0xee))/0xc);if(_0x3b3041===_0xed855a)break;else _0x227f37['push'](_0x227f37['shift']());}catch(_0x4e4578){_0x227f37['push'](_0x227f37['shift']());}}}(a5_0x274e,0xe85e2));import a5_0x637b35 from'conf';import a5_0x521889 from'path';import a5_0x17055e from'fs';import{fileURLToPath}from'url';const config=new a5_0x637b35({'projectName':a5_0x4867fe(0x10b),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x324a76=a5_0x4867fe,_0x41b1e8=config[_0x324a76(0x103)](_0x324a76(0xe8)),_0x6ba9ff=loadMcpConfigFile();return{..._0x41b1e8,..._0x6ba9ff};}export function addMcpServer(_0x1ed787,_0x4c6ba3,_0x5efc82=[],_0x47395e){const _0x251947=a5_0x4867fe,_0x51a6d6=config[_0x251947(0x103)](_0x251947(0xe8));_0x51a6d6[_0x1ed787]={'type':'stdio','command':_0x4c6ba3,'args':_0x5efc82,'env':_0x47395e},config[_0x251947(0xe9)](_0x251947(0xe8),_0x51a6d6);}export function addMcpHttpServer(_0x34b291,_0x1d5b0e){const _0x213514=a5_0x4867fe,_0x14c408=config['get'](_0x213514(0xe8));_0x14c408[_0x34b291]={'type':_0x213514(0xe6),'url':_0x1d5b0e},config[_0x213514(0xe9)](_0x213514(0xe8),_0x14c408);}export function removeMcpServer(_0xef8103){const _0x3425d9=a5_0x4867fe,_0x2725c8=config['get']('mcpServers');if(_0x2725c8[_0xef8103])return delete _0x2725c8[_0xef8103],config[_0x3425d9(0xe9)](_0x3425d9(0xe8),_0x2725c8),!![];return![];}export function clearMcpServers(){const _0x49032f=a5_0x4867fe;config[_0x49032f(0xe9)](_0x49032f(0xe8),{});}function a5_0x274e(){const _0xe80c6f=['windows-mcp','uvx','woozlit-cli','2462770cChmBn','stdio','4834971ewnEdp','computer-use','streamable-http','@modelcontextprotocol/server-filesystem','mcpServers','set','7645939isURmG','path','dirname','src','2388kXuhHn','endsWith','7592MVWkZr','30734cZSeMP','join','3edMjPX','HOME','readFileSync','npx','12inUQZl','466eMuKTt','computer-use.js','object','dist','6313252WmwtaK','command','parse','.woozlit','2945175qsnpmg','C:\x5cUsers','mcp-servers','get','8NPvuaT','mcp.json','env','cwd','.js'];a5_0x274e=function(){return _0xe80c6f;};return a5_0x274e();}export function getMcpServer(_0x5936bb){return getMcpServers()[_0x5936bb];}function loadMcpConfigFile(){const _0x2d8509=a5_0x4867fe,_0x2e24e4=[a5_0x521889[_0x2d8509(0xf2)](process[_0x2d8509(0x107)](),_0x2d8509(0x105)),a5_0x521889['join'](process[_0x2d8509(0x107)](),'.woozlit',_0x2d8509(0x105)),a5_0x521889['join'](process['env'][_0x2d8509(0xf4)]||process[_0x2d8509(0x106)]['USERPROFILE']||'',_0x2d8509(0xff),_0x2d8509(0x105))];for(const _0x300f3a of _0x2e24e4){try{if(a5_0x17055e['existsSync'](_0x300f3a)){const _0x549db0=a5_0x17055e[_0x2d8509(0xf5)](_0x300f3a,'utf-8'),_0x3141c3=JSON[_0x2d8509(0xfe)](_0x549db0);if(_0x3141c3[_0x2d8509(0xe8)]&&typeof _0x3141c3[_0x2d8509(0xe8)]===_0x2d8509(0xfa))return _0x3141c3['mcpServers'];}}catch{}}return{};}export function ensureDefaultServers(){const _0x4e2e6b=a5_0x4867fe,_0x18d040=config[_0x4e2e6b(0x103)](_0x4e2e6b(0xe8)),_0x222c46=fileURLToPath(import.meta.url),_0x4e63d2=a5_0x521889[_0x4e2e6b(0xec)](_0x222c46),_0x14eff9=_0x4e63d2['includes'](_0x4e2e6b(0xfb))||_0x222c46[_0x4e2e6b(0xef)](_0x4e2e6b(0x108)),_0x3b271a=_0x14eff9?a5_0x521889['join'](_0x4e63d2,'..',_0x4e2e6b(0x102),_0x4e2e6b(0xf9)):a5_0x521889[_0x4e2e6b(0xf2)](_0x4e63d2,'..','..',_0x4e2e6b(0xed),_0x4e2e6b(0x102),'computer-use.ts'),_0x33f3b1=_0x14eff9?'node':'tsx';_0x18d040[_0x4e2e6b(0xe5)]={'type':'stdio','command':_0x33f3b1,'args':[_0x3b271a],'env':{}},(!_0x18d040[_0x4e2e6b(0x109)]||_0x18d040['windows-mcp'][_0x4e2e6b(0xfd)]===_0x4e2e6b(0x10a))&&(_0x18d040[_0x4e2e6b(0x109)]={'type':_0x4e2e6b(0x10d),'command':_0x4e2e6b(0xf6),'args':['-y',_0x4e2e6b(0xe7),_0x4e2e6b(0x101)],'env':{}}),config[_0x4e2e6b(0xe9)](_0x4e2e6b(0xe8),_0x18d040);}export function getConfigFilePath(){const _0x40aea7=a5_0x4867fe;return config[_0x40aea7(0xeb)];}
@@ -1 +1 @@
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
+ function a6_0x9361(){const _0x3eb43a=['meta-llama/llama-4-maverick','Xiaomi\x27s\x20fast\x20AI\x20model','Latest\x20Mistral','deepseek/deepseek-chat','99GrhrnH','Gemini\x203\x20Pro','Qwen3\x20235B','71814vWlcFr','Latest\x20Gemini\x203\x20model','Mistral\x20Small\x203.2','Advanced\x20reasoning','qwen/qwen3-coder:free','3008756eqzLsP','7309940dstXFp','467772dHKzGX','gemini-3-flash-preview','meta-llama/llama-3.3-70b-instruct:free','mistralai/devstral-small','Gemini\x203\x20Flash','Woozie','Most\x20powerful\x20Gemini','Coding\x20specialist','Developer-focused','119rRtVri','Meta\x27s\x20latest','DeepSeek\x27s\x20latest\x20V3','Fast\x20and\x20capable\x20(Default)','DeepSeek\x20V3','xiaomi/mimo-v2-flash:free','20998769zrRBcR','Kimi\x20K2','649888bKvCCe','5hYwdsJ','deepseek/deepseek-r1','env','865534eqisDr','moonshotai/kimi-k2','DeepSeek\x20R1','gemini-3-pro-preview','https://woozlit.com','nvidia/nemotron-nano-12b-v2-vl:free','Devstral\x20Small','Qwen3\x20Coder','16VrFfre','Alibaba\x27s\x20largest','gemini-2.5-flash','mistralai/mistral-small-3.2-24b-instruct'];a6_0x9361=function(){return _0x3eb43a;};return a6_0x9361();}const a6_0x55dfc1=a6_0x3c1f;(function(_0x355f6b,_0x1fa483){const _0xb9d0a0=a6_0x3c1f,_0x3fa5e3=_0x355f6b();while(!![]){try{const _0x1e8579=parseInt(_0xb9d0a0(0x17a))/0x1+-parseInt(_0xb9d0a0(0x182))/0x2*(-parseInt(_0xb9d0a0(0x18d))/0x3)+parseInt(_0xb9d0a0(0x163))/0x4*(-parseInt(_0xb9d0a0(0x177))/0x5)+-parseInt(_0xb9d0a0(0x165))/0x6*(parseInt(_0xb9d0a0(0x16e))/0x7)+-parseInt(_0xb9d0a0(0x176))/0x8*(parseInt(_0xb9d0a0(0x18a))/0x9)+parseInt(_0xb9d0a0(0x164))/0xa+parseInt(_0xb9d0a0(0x174))/0xb;if(_0x1e8579===_0x1fa483)break;else _0x3fa5e3['push'](_0x3fa5e3['shift']());}catch(_0xe9bc6d){_0x3fa5e3['push'](_0x3fa5e3['shift']());}}}(a6_0x9361,0xb1370));const API_URL=process[a6_0x55dfc1(0x179)]['WOOZLIT_API_URL']||a6_0x55dfc1(0x17e),PROD_URL=a6_0x55dfc1(0x17e);export function getApiUrl(){return API_URL;}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':'gemini-2.5-flash','name':a6_0x55dfc1(0x16a),'description':a6_0x55dfc1(0x171),'xp':0x1},{'id':a6_0x55dfc1(0x166),'name':a6_0x55dfc1(0x169),'description':a6_0x55dfc1(0x18e),'xp':0x5},{'id':a6_0x55dfc1(0x17d),'name':a6_0x55dfc1(0x18b),'description':a6_0x55dfc1(0x16b),'xp':0x5},{'id':a6_0x55dfc1(0x173),'name':'MiMo\x20V2','description':a6_0x55dfc1(0x187),'xp':0x1},{'id':'qwen/qwen3-235b-a22b:free','name':a6_0x55dfc1(0x18c),'description':a6_0x55dfc1(0x183),'xp':0x2},{'id':a6_0x55dfc1(0x162),'name':a6_0x55dfc1(0x181),'description':a6_0x55dfc1(0x16c),'xp':0x2},{'id':a6_0x55dfc1(0x167),'name':'Llama\x203.3\x2070B','description':'Meta\x27s\x20powerful\x20model','xp':0x2},{'id':a6_0x55dfc1(0x186),'name':'Llama\x204\x20Maverick','description':a6_0x55dfc1(0x16f),'xp':0x3},{'id':a6_0x55dfc1(0x168),'name':a6_0x55dfc1(0x180),'description':a6_0x55dfc1(0x16d),'xp':0x2},{'id':a6_0x55dfc1(0x185),'name':a6_0x55dfc1(0x18f),'description':a6_0x55dfc1(0x188),'xp':0x2},{'id':a6_0x55dfc1(0x17f),'name':'Nemotron\x20Nano\x2012B','description':'NVIDIA\x20vision','xp':0x1},{'id':a6_0x55dfc1(0x17b),'name':a6_0x55dfc1(0x175),'description':'Reasoning\x20model','xp':0x3},{'id':a6_0x55dfc1(0x189),'name':a6_0x55dfc1(0x172),'description':a6_0x55dfc1(0x170),'xp':0x2},{'id':a6_0x55dfc1(0x178),'name':a6_0x55dfc1(0x17c),'description':a6_0x55dfc1(0x190),'xp':0x3}];function a6_0x3c1f(_0x3b4b6a,_0x49df7e){_0x3b4b6a=_0x3b4b6a-0x162;const _0x936189=a6_0x9361();let _0x3c1f54=_0x936189[_0x3b4b6a];return _0x3c1f54;}export const DEFAULT_MODEL=a6_0x55dfc1(0x184);
@@ -1 +1 @@
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
+ (function(_0x133644,_0x4be917){const _0x3e23ae=a7_0x5e53,_0x57e9ce=_0x133644();while(!![]){try{const _0x58ccf7=parseInt(_0x3e23ae(0x1b5))/0x1*(parseInt(_0x3e23ae(0x1cb))/0x2)+-parseInt(_0x3e23ae(0x1b1))/0x3*(-parseInt(_0x3e23ae(0x1aa))/0x4)+-parseInt(_0x3e23ae(0x1cd))/0x5*(-parseInt(_0x3e23ae(0x1b4))/0x6)+parseInt(_0x3e23ae(0x1a6))/0x7*(-parseInt(_0x3e23ae(0x1a8))/0x8)+-parseInt(_0x3e23ae(0x1c2))/0x9+parseInt(_0x3e23ae(0x1d0))/0xa+-parseInt(_0x3e23ae(0x1cc))/0xb;if(_0x58ccf7===_0x4be917)break;else _0x57e9ce['push'](_0x57e9ce['shift']());}catch(_0x417c6d){_0x57e9ce['push'](_0x57e9ce['shift']());}}}(a7_0x166c,0x4ed93));import{Client,GatewayIntentBits,ChannelType,Partials}from'discord.js';import*as a7_0x56e673 from'./config.js';import*as a7_0x18cbaf from'../ui/output.js';function a7_0x5e53(_0x167b81,_0x3290b2){_0x167b81=_0x167b81-0x1a2;const _0x166c3b=a7_0x166c();let _0x5e5357=_0x166c3b[_0x167b81];return _0x5e5357;}import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let client=null,isRunning=![];const chatHistories=new Map();export async function startBot(){const _0x51562b=a7_0x5e53,_0x4842e9=a7_0x56e673[_0x51562b(0x1c7)]();if(!_0x4842e9)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits[_0x51562b(0x1bf)],GatewayIntentBits['GuildMessages'],GatewayIntentBits['MessageContent'],GatewayIntentBits[_0x51562b(0x1ae)]],'partials':[Partials[_0x51562b(0x1b3)]]}),client[_0x51562b(0x1ad)](_0x51562b(0x1ac),()=>{const _0x58ef49=_0x51562b;a7_0x18cbaf[_0x58ef49(0x1b2)](_0x58ef49(0x1a4)+client?.[_0x58ef49(0x1b8)]?.[_0x58ef49(0x1ba)]),isRunning=!![];}),client['on']('messageCreate',async _0x2fb8f1=>{const _0x2032fd=_0x51562b;if(_0x2fb8f1['author'][_0x2032fd(0x1a3)])return;const _0x47809c=_0x2fb8f1[_0x2032fd(0x1a9)][_0x2032fd(0x1af)]===ChannelType['DM'],_0x1d0d05=client?.['user']&&_0x2fb8f1[_0x2032fd(0x1c0)][_0x2032fd(0x1bd)](client[_0x2032fd(0x1b8)]);if(!_0x47809c&&!_0x1d0d05)return;await _0x2fb8f1['channel'][_0x2032fd(0x1c1)]()[_0x2032fd(0x1a5)](()=>{});const _0x1b56e6=_0x2fb8f1[_0x2032fd(0x1bb)]['id'],_0x337be9=(_0x2fb8f1[_0x2032fd(0x1c6)]||'dm')+'-'+_0x2fb8f1[_0x2032fd(0x1b7)]+'-'+_0x1b56e6;!chatHistories[_0x2032fd(0x1bd)](_0x337be9)&&chatHistories[_0x2032fd(0x1be)](_0x337be9,[{'role':_0x2032fd(0x1ab),'content':_0x2032fd(0x1cf)}]);const _0xf409c8=chatHistories['get'](_0x337be9),_0x1037c2=_0x2fb8f1['content'][_0x2032fd(0x1c5)](/<@!?[0-9]+>/g,'')[_0x2032fd(0x1ca)]();if(!_0x1037c2)return;_0xf409c8['push']({'role':'user','content':_0x1037c2}),a7_0x18cbaf[_0x2032fd(0x1b9)](_0x2032fd(0x1ce)+_0x2fb8f1[_0x2032fd(0x1bb)][_0x2032fd(0x1c9)]+':\x20'+_0x1037c2);const _0x17eb29=getSelectedModel();try{let _0x54a06f='';const _0xa8b02d=await sendChatMessage(_0x17eb29,_0xf409c8,_0x23489c=>{_0x54a06f+=_0x23489c;});_0x54a06f=_0xa8b02d['content'],_0xf409c8[_0x2032fd(0x1b6)]({'role':_0x2032fd(0x1a2),'content':_0x54a06f});if(_0x54a06f[_0x2032fd(0x1c4)]>0x7d0){const _0x3dd501=_0x54a06f['match'](/[\s\S]{1,2000}/g)||[];for(const _0xfca9b9 of _0x3dd501){await _0x2fb8f1[_0x2032fd(0x1c8)](_0xfca9b9);}}else await _0x2fb8f1[_0x2032fd(0x1c8)](_0x54a06f);}catch(_0x4e5d3a){a7_0x18cbaf[_0x2032fd(0x1a7)]('[Discord]\x20Error:\x20'+_0x4e5d3a['message']),await _0x2fb8f1[_0x2032fd(0x1c8)]('Sorry,\x20I\x20encountered\x20an\x20error\x20processing\x20that.');}}),await client['login'](_0x4842e9),!![];}catch(_0x4a2698){return a7_0x18cbaf[_0x51562b(0x1a7)](_0x51562b(0x1c3)+_0x4a2698[_0x51562b(0x1bc)]),![];}}function a7_0x166c(){const _0x3d6596=['DirectMessages','type','destroy','337503fiiTNZ','success','Channel','2670eRyfFG','405905suowBR','push','channelId','user','info','tag','author','message','has','set','Guilds','mentions','sendTyping','2882304GQpvoh','[Discord]\x20Failed\x20to\x20start:\x20','length','replace','guildId','getBotToken','reply','username','trim','2ttmjjo','4345242JREcTD','3770qCATle','[Discord]\x20','You\x20are\x20Woozlit,\x20a\x20helpful\x20AI\x20assistant\x20connected\x20via\x20Discord.\x20Keep\x20responses\x20concise.','4798110TUpxtH','assistant','bot','[Discord]\x20Connected\x20as\x20','catch','2856049uvnvrM','error','8NGRJeA','channel','8vghzCR','system','ready','once'];a7_0x166c=function(){return _0x3d6596;};return a7_0x166c();}export function stopBot(){const _0x53100c=a7_0x5e53;client&&(client[_0x53100c(0x1b0)](),client=null),isRunning=![];}export function isBotRunning(){return isRunning;}
@@ -1 +1 @@
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
+ const a8_0xcef541=a8_0x4971;(function(_0x5d6b9e,_0x569b23){const _0x432067=a8_0x4971,_0x4ff860=_0x5d6b9e();while(!![]){try{const _0x484713=-parseInt(_0x432067(0x142))/0x1+-parseInt(_0x432067(0x137))/0x2*(parseInt(_0x432067(0x134))/0x3)+-parseInt(_0x432067(0x133))/0x4*(parseInt(_0x432067(0x12f))/0x5)+-parseInt(_0x432067(0x13a))/0x6*(-parseInt(_0x432067(0x132))/0x7)+parseInt(_0x432067(0x140))/0x8*(-parseInt(_0x432067(0x139))/0x9)+-parseInt(_0x432067(0x13e))/0xa*(parseInt(_0x432067(0x12c))/0xb)+parseInt(_0x432067(0x13b))/0xc;if(_0x484713===_0x569b23)break;else _0x4ff860['push'](_0x4ff860['shift']());}catch(_0x236e12){_0x4ff860['push'](_0x4ff860['shift']());}}}(a8_0x54dc,0xa6a36));import a8_0x481fb3 from'conf';import a8_0x56b0bd from'crypto';const config=new a8_0x481fb3({'projectName':'woozlit-cli-discord','defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0xcef541(0x13f);function encrypt(_0x48e560){const _0xb35f22=a8_0xcef541;if(!_0x48e560)return'';const _0x3c892d=a8_0x56b0bd[_0xb35f22(0x131)](0x10),_0x5592c9=a8_0x56b0bd[_0xb35f22(0x135)](_0xb35f22(0x138))[_0xb35f22(0x12d)](ENCRYPTION_KEY)['digest'](),_0x46be0d=a8_0x56b0bd['createCipheriv'](_0xb35f22(0x130),_0x5592c9,_0x3c892d);let _0x1d8ed5=_0x46be0d[_0xb35f22(0x12d)](_0x48e560,_0xb35f22(0x143),_0xb35f22(0x12e));return _0x1d8ed5+=_0x46be0d[_0xb35f22(0x13c)](_0xb35f22(0x12e)),_0x3c892d[_0xb35f22(0x141)](_0xb35f22(0x12e))+':'+_0x1d8ed5;}function a8_0x54dc(){const _0x3a1138=['915GMEzFf','aes-256-cbc','randomBytes','2807707TYdvWd','25516aFgHuX','3693YYHWaG','createHash','split','1458NxtfaD','sha256','809109raBFJc','6rBVPnA','54553944xuEWLa','final','digest','10rwRimE','woozlit_discord_secure_key','24GNllil','toString','1310742IPVxIz','utf8','botToken','6814632nhROYd','update','hex'];a8_0x54dc=function(){return _0x3a1138;};return a8_0x54dc();}function decrypt(_0x13945f){const _0x41916a=a8_0xcef541;if(!_0x13945f)return'';try{const [_0x4b7365,_0x537c21]=_0x13945f[_0x41916a(0x136)](':');if(!_0x4b7365||!_0x537c21)return'';const _0x20802d=Buffer['from'](_0x4b7365,'hex'),_0x1b8b36=a8_0x56b0bd[_0x41916a(0x135)](_0x41916a(0x138))[_0x41916a(0x12d)](ENCRYPTION_KEY)[_0x41916a(0x13d)](),_0x519d63=a8_0x56b0bd['createDecipheriv'](_0x41916a(0x130),_0x1b8b36,_0x20802d);let _0xeb12d=_0x519d63[_0x41916a(0x12d)](_0x537c21,_0x41916a(0x12e),_0x41916a(0x143));return _0xeb12d+=_0x519d63['final'](_0x41916a(0x143)),_0xeb12d;}catch{return'';}}function a8_0x4971(_0x4a33fb,_0x5d6f00){_0x4a33fb=_0x4a33fb-0x12b;const _0x54dcea=a8_0x54dc();let _0x497125=_0x54dcea[_0x4a33fb];return _0x497125;}export function setBotToken(_0x3264ad){config['set']('botToken',encrypt(_0x3264ad));}export function getBotToken(){const _0x101e04=a8_0xcef541;return decrypt(config['get'](_0x101e04(0x12b)));}export function isEnabled(){return!!getBotToken();}export function isConfigured(){return!!getBotToken();}export function clearConfig(){config['clear']();}
@@ -1 +1 @@
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
+ function a9_0x1ca3(_0x1597a1,_0x85ca){_0x1597a1=_0x1597a1-0xb6;var _0x24cd40=a9_0x24cd();var _0x1ca322=_0x24cd40[_0x1597a1];return _0x1ca322;}(function(_0xf09c4e,_0x5902fd){var _0x1f46a7=a9_0x1ca3,_0x520f0b=_0xf09c4e();while(!![]){try{var _0x4f0d99=-parseInt(_0x1f46a7(0xbc))/0x1+parseInt(_0x1f46a7(0xbe))/0x2*(parseInt(_0x1f46a7(0xb6))/0x3)+parseInt(_0x1f46a7(0xba))/0x4+parseInt(_0x1f46a7(0xbb))/0x5+-parseInt(_0x1f46a7(0xbd))/0x6+-parseInt(_0x1f46a7(0xbf))/0x7*(parseInt(_0x1f46a7(0xb7))/0x8)+-parseInt(_0x1f46a7(0xb8))/0x9*(-parseInt(_0x1f46a7(0xb9))/0xa);if(_0x4f0d99===_0x5902fd)break;else _0x520f0b['push'](_0x520f0b['shift']());}catch(_0x990a48){_0x520f0b['push'](_0x520f0b['shift']());}}}(a9_0x24cd,0xc313b));export*from'./config.js';function a9_0x24cd(){var _0xb6db52=['175722QlMmZU','2226064sRFllG','99BsIrdv','354890dsHkCB','6063184dRypbR','1898970LfwjAn','195787SBNyXV','5198346aiUfSf','14GpytKs','21ETpnAu'];a9_0x24cd=function(){return _0xb6db52;};return a9_0x24cd();}export{startBot,stopBot,isBotRunning}from'./client.js';export{setupDiscord}from'./setup.js';
@@ -1 +1 @@
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
+ (function(_0x3f8c49,_0x26ac32){const _0x100c35=a10_0x4bf5,_0x2026b1=_0x3f8c49();while(!![]){try{const _0x377290=parseInt(_0x100c35(0x1ba))/0x1*(-parseInt(_0x100c35(0x1b5))/0x2)+-parseInt(_0x100c35(0x1bc))/0x3*(-parseInt(_0x100c35(0x1b6))/0x4)+-parseInt(_0x100c35(0x1b4))/0x5+parseInt(_0x100c35(0x1b7))/0x6+-parseInt(_0x100c35(0x1b9))/0x7*(-parseInt(_0x100c35(0x1b8))/0x8)+parseInt(_0x100c35(0x1bd))/0x9+-parseInt(_0x100c35(0x1b3))/0xa;if(_0x377290===_0x26ac32)break;else _0x2026b1['push'](_0x2026b1['shift']());}catch(_0x41a10c){_0x2026b1['push'](_0x2026b1['shift']());}}}(a10_0x22a8,0x46889));import{input}from'@inquirer/prompts';import*as a10_0x36193d from'./config.js';function a10_0x4bf5(_0x104e8e,_0x455895){_0x104e8e=_0x104e8e-0x1ab;const _0x22a8f7=a10_0x22a8();let _0x4bf58b=_0x22a8f7[_0x104e8e];return _0x4bf58b;}import*as a10_0x5d308d from'../ui/output.js';export async function setupDiscord(){const _0x49cd3b=a10_0x4bf5;a10_0x5d308d[_0x49cd3b(0x1ad)](_0x49cd3b(0x1b1)),a10_0x5d308d[_0x49cd3b(0x1bb)]('You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.');const _0x36a983=await input({'message':_0x49cd3b(0x1ac),'validate':_0xe2520d=>_0xe2520d[_0x49cd3b(0x1ae)]>0xa?!![]:_0x49cd3b(0x1ab)}),_0x190523=await input({'message':_0x49cd3b(0x1b2),'default':'!'});a10_0x36193d[_0x49cd3b(0x1b0)](_0x36a983),a10_0x5d308d[_0x49cd3b(0x1af)]('Discord\x20configuration\x20saved!'),a10_0x5d308d[_0x49cd3b(0x1ad)]('Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.');}function a10_0x22a8(){const _0x39ea2b=['5580460hzInRY','2269400pnfdQV','44920oTdiYq','1812KoiqbG','1144596cHZfSz','24ihSKqb','1069383kMatxs','7AneTSR','dim','2058leQIxH','4483980PORzzR','Token\x20seems\x20too\x20short','Bot\x20Token:','info','length','success','setBotToken','Setup\x20Woozlit\x20Discord\x20Bot','Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):'];a10_0x22a8=function(){return _0x39ea2b;};return a10_0x22a8();}
@@ -1 +1 @@
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
+ const a11_0x3b342e=a11_0xaaa7;function a11_0xaaa7(_0x3216a,_0x5e80f9){_0x3216a=_0x3216a-0x72;const _0x4ddb62=a11_0x4ddb();let _0xaaa7ee=_0x4ddb62[_0x3216a];return _0xaaa7ee;}(function(_0x302cb4,_0x2300ff){const _0x112c7e=a11_0xaaa7,_0x1d362d=_0x302cb4();while(!![]){try{const _0x514f28=parseInt(_0x112c7e(0x79))/0x1+-parseInt(_0x112c7e(0x8b))/0x2*(-parseInt(_0x112c7e(0x77))/0x3)+parseInt(_0x112c7e(0x8a))/0x4*(parseInt(_0x112c7e(0x7e))/0x5)+parseInt(_0x112c7e(0x94))/0x6+parseInt(_0x112c7e(0x92))/0x7+parseInt(_0x112c7e(0x7c))/0x8*(-parseInt(_0x112c7e(0x84))/0x9)+-parseInt(_0x112c7e(0x73))/0xa;if(_0x514f28===_0x2300ff)break;else _0x1d362d['push'](_0x1d362d['shift']());}catch(_0x129baf){_0x1d362d['push'](_0x1d362d['shift']());}}}(a11_0x4ddb,0x2420c));import a11_0x3b856f from'conf';function a11_0x4ddb(){const _0x8cd7ee=['password','imapUser','1413HvTHwS','user','imap.gmail.com','smtpPass','enabled','smtpUser','41224YMvWJA','2Rflmkw','update','randomBytes','imapPass','get','push','final','1883840oVYBiE','imap','253062NCrVvd','smtpHost','allowedSenders','digest','imapPort','imapHost','utf8','5467880rXotXo','createDecipheriv','hex','set','714078NiOXtB','woozlit-cli-email','50268dPeDns','createHash','toString','5128vxhggP','woozlit_email_secure_key','95xtXyNE','sha256','createCipheriv','aes-256-cbc'];a11_0x4ddb=function(){return _0x8cd7ee;};return a11_0x4ddb();}import a11_0x5f0ca5 from'crypto';const config=new a11_0x3b856f({'projectName':a11_0x3b342e(0x78),'defaults':{'imapHost':a11_0x3b342e(0x86),'imapPort':0x3e1,'imapUser':'','imapPass':'','smtpHost':'smtp.gmail.com','smtpPort':0x24b,'smtpUser':'','smtpPass':'','checkInterval':0x5,'allowedSenders':[],'enabled':![]}}),ENCRYPTION_KEY=a11_0x3b342e(0x7d);function encrypt(_0x35ef13){const _0x5b9509=a11_0x3b342e;if(!_0x35ef13)return'';const _0x95b755=a11_0x5f0ca5[_0x5b9509(0x8d)](0x10),_0x52a3ea=a11_0x5f0ca5['createHash'](_0x5b9509(0x7f))[_0x5b9509(0x8c)](ENCRYPTION_KEY)[_0x5b9509(0x97)](),_0x148876=a11_0x5f0ca5[_0x5b9509(0x80)](_0x5b9509(0x81),_0x52a3ea,_0x95b755);let _0x8d2ad4=_0x148876[_0x5b9509(0x8c)](_0x35ef13,'utf8',_0x5b9509(0x75));return _0x8d2ad4+=_0x148876[_0x5b9509(0x91)]('hex'),_0x95b755[_0x5b9509(0x7b)]('hex')+':'+_0x8d2ad4;}function decrypt(_0x45e3c1){const _0x124541=a11_0x3b342e;if(!_0x45e3c1)return'';try{const [_0x3463c3,_0x537e33]=_0x45e3c1['split'](':');if(!_0x3463c3||!_0x537e33)return'';const _0x2ae029=Buffer['from'](_0x3463c3,_0x124541(0x75)),_0x74e860=a11_0x5f0ca5[_0x124541(0x7a)]('sha256')[_0x124541(0x8c)](ENCRYPTION_KEY)[_0x124541(0x97)](),_0x28c45f=a11_0x5f0ca5[_0x124541(0x74)](_0x124541(0x81),_0x74e860,_0x2ae029);let _0x26c0a0=_0x28c45f['update'](_0x537e33,_0x124541(0x75),_0x124541(0x72));return _0x26c0a0+=_0x28c45f[_0x124541(0x91)]('utf8'),_0x26c0a0;}catch{return'';}}export function setCredentials(_0x17186c,_0x160310,_0x2c70ca,_0x3a6369){const _0x3dc4ff=a11_0x3b342e;config[_0x3dc4ff(0x76)](_0x3dc4ff(0x83),_0x17186c),config[_0x3dc4ff(0x76)](_0x3dc4ff(0x8e),encrypt(_0x160310)),config['set'](_0x3dc4ff(0x89),_0x17186c),config['set'](_0x3dc4ff(0x87),encrypt(_0x160310));if(_0x2c70ca)config[_0x3dc4ff(0x76)](_0x3dc4ff(0x99),_0x2c70ca);}export function getConfig(){const _0x415ca5=a11_0x3b342e;return{'imap':{'user':config[_0x415ca5(0x8f)]('imapUser'),'password':decrypt(config[_0x415ca5(0x8f)](_0x415ca5(0x8e))),'host':config[_0x415ca5(0x8f)](_0x415ca5(0x99)),'port':config[_0x415ca5(0x8f)](_0x415ca5(0x98)),'tls':!![],'tlsOptions':{'rejectUnauthorized':![]},'authTimeout':0xbb8},'smtp':{'host':config[_0x415ca5(0x8f)](_0x415ca5(0x95)),'port':config['get']('smtpPort'),'auth':{'user':config[_0x415ca5(0x8f)](_0x415ca5(0x89)),'pass':decrypt(config[_0x415ca5(0x8f)]('smtpPass'))},'tls':{'rejectUnauthorized':![]}},'interval':config[_0x415ca5(0x8f)]('checkInterval'),'allowedSenders':config[_0x415ca5(0x8f)](_0x415ca5(0x96))||[],'enabled':config['get'](_0x415ca5(0x88))};}export function isConfigured(){const _0x7d7d0c=a11_0x3b342e,_0x3a591e=getConfig();return!!_0x3a591e[_0x7d7d0c(0x93)][_0x7d7d0c(0x85)]&&!!_0x3a591e[_0x7d7d0c(0x93)][_0x7d7d0c(0x82)];}export function setEnabled(_0x431730){const _0x45cc01=a11_0x3b342e;config[_0x45cc01(0x76)]('enabled',_0x431730);}export function addAllowedSender(_0x5e0475){const _0x5b2f61=a11_0x3b342e,_0x5e047e=config[_0x5b2f61(0x8f)](_0x5b2f61(0x96))||[];!_0x5e047e['includes'](_0x5e0475)&&(_0x5e047e[_0x5b2f61(0x90)](_0x5e0475),config[_0x5b2f61(0x76)]('allowedSenders',_0x5e047e));}
@@ -1 +1 @@
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
+ (function(_0x5a4f02,_0x278032){var _0x1196bd=a12_0x2ffe,_0x495497=_0x5a4f02();while(!![]){try{var _0x28aa38=-parseInt(_0x1196bd(0xd4))/0x1*(-parseInt(_0x1196bd(0xd9))/0x2)+-parseInt(_0x1196bd(0xd7))/0x3*(parseInt(_0x1196bd(0xdb))/0x4)+-parseInt(_0x1196bd(0xd6))/0x5*(parseInt(_0x1196bd(0xda))/0x6)+parseInt(_0x1196bd(0xd8))/0x7*(parseInt(_0x1196bd(0xd3))/0x8)+-parseInt(_0x1196bd(0xdd))/0x9*(-parseInt(_0x1196bd(0xde))/0xa)+-parseInt(_0x1196bd(0xd5))/0xb+-parseInt(_0x1196bd(0xdc))/0xc*(-parseInt(_0x1196bd(0xdf))/0xd);if(_0x28aa38===_0x278032)break;else _0x495497['push'](_0x495497['shift']());}catch(_0x137719){_0x495497['push'](_0x495497['shift']());}}}(a12_0xd0aa,0x244fd));export*from'./config.js';function a12_0x2ffe(_0x3b2eee,_0x464ebd){_0x3b2eee=_0x3b2eee-0xd3;var _0xd0aa78=a12_0xd0aa();var _0x2ffe29=_0xd0aa78[_0x3b2eee];return _0x2ffe29;}export{startBot,stopBot,isBotRunning}from'./service.js';export{setupEmail}from'./setup.js';function a12_0xd0aa(){var _0x7c9a60=['1933582FHynsc','3226PHcZrp','44094uRwiRV','420AnKuMt','84nYLeyH','27ZbICLH','741970uwuiUs','593411mXYZsP','8iBOecS','1WHexgL','2906915JszBZp','95YdEOBU','7638KpvuWI'];a12_0xd0aa=function(){return _0x7c9a60;};return a12_0xd0aa();}
@@ -1 +1 @@
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';
1
+ function a13_0x3a4f(){const _0x5f595f=['1723497JJGQpR','user','length','info','INBOX','imap',':\x0aSubject:\x20','from','1036910jQaGVp','UNSEEN','smtp','9qondmR','error','\x0a\x0aDraft\x20a\x20helpful\x20reply.\x20Structure\x20it\x20clearly.','interval','openBox','sendMail','search','\x20new\x20messages','794958AsLYAD','NODE_TLS_REJECT_UNAUTHORIZED','\x0aBody:\x0a','\x20(not\x20allowed)','1007841qxJYwW','1617335qvvDmm','[Email]\x20From:\x20','body','find','[Email]\x20Reply\x20sent\x20to\x20','You\x20received\x20an\x20email\x20from\x20','5323036vXXEGn','which','allowedSenders','subject','isConfigured','getConfig','content','parts','message','match','connect','41027944lVtfcn','success','HEADER','24mvandn','[Email]\x20Ignored\x20mail\x20from\x20','end'];a13_0x3a4f=function(){return _0x5f595f;};return a13_0x3a4f();}(function(_0x560a5f,_0x33d1fc){const _0x548312=a13_0x597a,_0x162d3c=_0x560a5f();while(!![]){try{const _0x20c1ee=-parseInt(_0x548312(0x1fa))/0x1+-parseInt(_0x548312(0x1de))/0x2+parseInt(_0x548312(0x1e2))/0x3+-parseInt(_0x548312(0x1e9))/0x4+parseInt(_0x548312(0x1e3))/0x5*(-parseInt(_0x548312(0x1f7))/0x6)+parseInt(_0x548312(0x202))/0x7+-parseInt(_0x548312(0x1f4))/0x8*(-parseInt(_0x548312(0x205))/0x9);if(_0x20c1ee===_0x33d1fc)break;else _0x162d3c['push'](_0x162d3c['shift']());}catch(_0x3a59ea){_0x162d3c['push'](_0x162d3c['shift']());}}}(a13_0x3a4f,0xd3a97));import a13_0x7cde61 from'imap-simple';import a13_0x5a6030 from'nodemailer';import*as a13_0x1225d2 from'./config.js';import*as a13_0x266db4 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let intervalId=null,isRunning=![];function a13_0x597a(_0x48698f,_0x5bde69){_0x48698f=_0x48698f-0x1dc;const _0x3a4f29=a13_0x3a4f();let _0x597afc=_0x3a4f29[_0x48698f];return _0x597afc;}async function checkEmails(){const _0x85c9ae=a13_0x597a,_0x14a48d=a13_0x1225d2[_0x85c9ae(0x1ee)]();try{const _0x470506=await a13_0x7cde61[_0x85c9ae(0x1f3)]({'imap':_0x14a48d[_0x85c9ae(0x1ff)]});await _0x470506[_0x85c9ae(0x209)](_0x85c9ae(0x1fe));const _0x248d42=[_0x85c9ae(0x203)],_0x3e55c7={'bodies':[_0x85c9ae(0x1f6),'TEXT'],'markSeen':!![]},_0x2e2344=await _0x470506[_0x85c9ae(0x1dc)](_0x248d42,_0x3e55c7);_0x2e2344['length']>0x0&&a13_0x266db4[_0x85c9ae(0x1fd)]('[Email]\x20Found\x20'+_0x2e2344['length']+_0x85c9ae(0x1dd));for(const _0x156748 of _0x2e2344){const _0x3f2bef=_0x156748['parts'][_0x85c9ae(0x1e6)](_0x2ba711=>_0x2ba711[_0x85c9ae(0x1ea)]===_0x85c9ae(0x1f6)),_0x3d4dde=_0x3f2bef[_0x85c9ae(0x1e5)][_0x85c9ae(0x201)]?.[0x0]||'',_0x3d1191=_0x3f2bef[_0x85c9ae(0x1e5)][_0x85c9ae(0x1ec)]?.[0x0]||'No\x20Subject';if(_0x14a48d['allowedSenders'][_0x85c9ae(0x1fc)]>0x0){const _0x47a26c=_0x3d4dde[_0x85c9ae(0x1f2)](/<(.+)>/)?.[0x1]||_0x3d4dde;if(!_0x14a48d[_0x85c9ae(0x1eb)]['includes'](_0x47a26c)){a13_0x266db4['dim'](_0x85c9ae(0x1f8)+_0x3d4dde+_0x85c9ae(0x1e1));continue;}}const _0x4e045d=_0x156748[_0x85c9ae(0x1f0)][_0x85c9ae(0x1e6)](_0x4efb90=>_0x4efb90[_0x85c9ae(0x1ea)]==='TEXT'),_0x1ee799=_0x4e045d?.[_0x85c9ae(0x1e5)]||'';a13_0x266db4['info'](_0x85c9ae(0x1e4)+_0x3d4dde+'\x20|\x20Subj:\x20'+_0x3d1191);try{const _0x2ebc0b=_0x85c9ae(0x1e8)+_0x3d4dde+_0x85c9ae(0x200)+_0x3d1191+_0x85c9ae(0x1e0)+_0x1ee799+_0x85c9ae(0x207),_0x3ee8df=await sendChatMessage(getSelectedModel(),[{'role':_0x85c9ae(0x1fb),'content':_0x2ebc0b}]),_0x53fb71=a13_0x5a6030['createTransport'](_0x14a48d[_0x85c9ae(0x204)]);await _0x53fb71[_0x85c9ae(0x20a)]({'from':_0x14a48d[_0x85c9ae(0x204)]['auth'][_0x85c9ae(0x1fb)],'to':_0x3d4dde,'subject':'Re:\x20'+_0x3d1191,'text':_0x3ee8df[_0x85c9ae(0x1ef)]}),a13_0x266db4[_0x85c9ae(0x1f5)](_0x85c9ae(0x1e7)+_0x3d4dde);}catch(_0xcbc016){a13_0x266db4[_0x85c9ae(0x206)]('[Email]\x20Processing/Reply\x20error:\x20'+_0xcbc016[_0x85c9ae(0x1f1)]);}}_0x470506[_0x85c9ae(0x1f9)]();}catch(_0x32d122){}}export async function startBot(){const _0x15193b=a13_0x597a;if(!a13_0x1225d2[_0x15193b(0x1ed)]())return![];if(isRunning)return!![];process['env'][_0x15193b(0x1df)]='0',checkEmails();const _0x4a3380=a13_0x1225d2[_0x15193b(0x1ee)]()[_0x15193b(0x208)]||0x5;return intervalId=setInterval(checkEmails,_0x4a3380*0x3c*0x3e8),isRunning=!![],!![];}export function stopBot(){intervalId&&(clearInterval(intervalId),intervalId=null),isRunning=![];}export function isBotRunning(){return isRunning;}export{isConfigured}from'./config.js';