woozlit 2.0.3 → 2.0.4

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 a0_0x37b1(){const _0x4760bd=['listen','1907015wjhyxG','userId','get','/callback','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head>\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','http://localhost:','12RsBnHD','3978288ftjLQR','text/html','displayName','1894908sDeEMM','/auth/cli?callback=http://localhost:','1488764WaqGDv','writeHead','5924982cSIQfq','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head><title>Woozlit\x20CLI</title></head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body\x20style=\x22font-family:\x20sans-serif;\x20text-align:\x20center;\x20padding:\x202rem;\x20background:\x20#0a0a0a;\x20color:\x20#fff;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1\x20style=\x22color:\x20#ef4444;\x22>Login\x20Failed</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Missing\x20authentication\x20data.\x20Please\x20try\x20again.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','searchParams','916703TxhOIC','close','email','pathname','end','1051758VvGURN','token'];a0_0x37b1=function(){return _0x4760bd;};return a0_0x37b1();}function a0_0x5205(_0x1eaa08,_0x34c2ab){_0x1eaa08=_0x1eaa08-0x1ce;const _0x37b135=a0_0x37b1();let _0x52051d=_0x37b135[_0x1eaa08];return _0x52051d;}(function(_0xde8939,_0x282a65){const _0x44e533=a0_0x5205,_0x44876e=_0xde8939();while(!![]){try{const _0x2fd9bd=parseInt(_0x44e533(0x1d3))/0x1+parseInt(_0x44e533(0x1ce))/0x2+-parseInt(_0x44e533(0x1e5))/0x3+parseInt(_0x44e533(0x1e1))/0x4*(parseInt(_0x44e533(0x1db))/0x5)+-parseInt(_0x44e533(0x1d8))/0x6+-parseInt(_0x44e533(0x1d0))/0x7+-parseInt(_0x44e533(0x1e2))/0x8;if(_0x2fd9bd===_0x282a65)break;else _0x44876e['push'](_0x44876e['shift']());}catch(_0x19011e){_0x44876e['push'](_0x44876e['shift']());}}}(a0_0x37b1,0x9fd3d));import a0_0x20daab from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x4cac09}from'../utils/storage.js';export async function login(){const _0x582221=getApiUrl(),_0x4a18ab=0x2694;return new Promise(_0x59d304=>{const _0x46dfad=a0_0x5205,_0x3b2e73=createServer(async(_0x2c1da2,_0x1665a4)=>{const _0x21e8cb=a0_0x5205,_0x33e8ed=new URL(_0x2c1da2['url']||'',_0x21e8cb(0x1e0)+_0x4a18ab);if(_0x33e8ed[_0x21e8cb(0x1d6)]==='/callback'){const _0x52c5da=_0x33e8ed[_0x21e8cb(0x1d2)][_0x21e8cb(0x1dd)](_0x21e8cb(0x1d9)),_0x363da5=_0x33e8ed[_0x21e8cb(0x1d2)][_0x21e8cb(0x1dd)](_0x21e8cb(0x1dc)),_0x4d799a=_0x33e8ed[_0x21e8cb(0x1d2)]['get'](_0x21e8cb(0x1d5)),_0x219468=_0x33e8ed[_0x21e8cb(0x1d2)][_0x21e8cb(0x1dd)](_0x21e8cb(0x1e4));_0x52c5da&&_0x363da5?(setToken(_0x52c5da),setUser(_0x363da5,_0x4d799a||'',_0x219468||''),_0x1665a4[_0x21e8cb(0x1cf)](0xc8,{'Content-Type':_0x21e8cb(0x1e3)}),_0x1665a4['end'](_0x21e8cb(0x1df)),_0x3b2e73['close'](),_0x59d304(!![])):(_0x1665a4['writeHead'](0x190,{'Content-Type':'text/html'}),_0x1665a4[_0x21e8cb(0x1d7)](_0x21e8cb(0x1d1)),_0x3b2e73[_0x21e8cb(0x1d4)](),_0x59d304(![]));}});_0x3b2e73[_0x46dfad(0x1da)](_0x4a18ab,()=>{const _0x49c191=_0x46dfad,_0x433b4a=_0x582221+_0x49c191(0x1e6)+_0x4a18ab+_0x49c191(0x1de);a0_0x20daab(_0x433b4a);}),setTimeout(()=>{_0x3b2e73['close'](),_0x59d304(![]);},0x1d4c0);});}export function logout(){a0_0x4cac09();}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
+ function a1_0x5d89(_0x1b0e48,_0x14d588){_0x1b0e48=_0x1b0e48-0x100;const _0x223125=a1_0x2231();let _0x5d89a8=_0x223125[_0x1b0e48];return _0x5d89a8;}function a1_0x2231(){const _0x50319a=['browser_click','tabId','35oyFZrE','top','Tab\x20ID','down','Click\x20an\x20element\x20on\x20the\x20page','Scroll\x20the\x20page\x20up\x20or\x20down','14jNmhNV','Text\x20to\x20fill','string','object','Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)','1800042SayIwc','Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)','number','CSS\x20selector\x20for\x20the\x20element','text','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','12179904WJtcQP','direction','11348hcuyTm','1662BmSdMT','query','499644HfGqlJ','77016700DeHMby','browser_scroll','bottom','46817ESvbUH','8999225oCEjAE'];a1_0x2231=function(){return _0x50319a;};return a1_0x2231();}const a1_0x297f57=a1_0x5d89;(function(_0x341b68,_0x4d5531){const _0x567bab=a1_0x5d89,_0x5e8e98=_0x341b68();while(!![]){try{const _0x158181=-parseInt(_0x567bab(0x103))/0x1*(parseInt(_0x567bab(0x10d))/0x2)+-parseInt(_0x567bab(0x11b))/0x3*(parseInt(_0x567bab(0x11a))/0x4)+-parseInt(_0x567bab(0x104))/0x5+-parseInt(_0x567bab(0x112))/0x6*(parseInt(_0x567bab(0x107))/0x7)+-parseInt(_0x567bab(0x118))/0x8+-parseInt(_0x567bab(0x11d))/0x9+parseInt(_0x567bab(0x100))/0xa;if(_0x158181===_0x4d5531)break;else _0x5e8e98['push'](_0x5e8e98['shift']());}catch(_0x32ef65){_0x5e8e98['push'](_0x5e8e98['shift']());}}}(a1_0x2231,0xe1ad1));export*from'./server.js';export*from'./tools.js';export*from'./server.js';export*from'./tools.js';export const tools=[{'name':'browser_fill','description':'Fill\x20a\x20form\x20field\x20or\x20input\x20element','input_schema':{'type':a1_0x297f57(0x110),'properties':{'tabId':{'type':a1_0x297f57(0x114),'description':'Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot'},'query':{'type':a1_0x297f57(0x10f),'description':'CSS\x20selector\x20for\x20the\x20element'},'text':{'type':'string','description':a1_0x297f57(0x10e)}},'required':['tabId',a1_0x297f57(0x11c),a1_0x297f57(0x116)]}},{'name':a1_0x297f57(0x105),'description':a1_0x297f57(0x10b),'input_schema':{'type':'object','properties':{'tabId':{'type':a1_0x297f57(0x114),'description':a1_0x297f57(0x117)},'query':{'type':a1_0x297f57(0x10f),'description':a1_0x297f57(0x115)},'index':{'type':a1_0x297f57(0x114),'description':a1_0x297f57(0x113)}},'required':[a1_0x297f57(0x106),a1_0x297f57(0x11c)]}},{'name':a1_0x297f57(0x101),'description':a1_0x297f57(0x10c),'input_schema':{'type':a1_0x297f57(0x110),'properties':{'tabId':{'type':a1_0x297f57(0x114),'description':a1_0x297f57(0x109)},'direction':{'type':a1_0x297f57(0x10f),'enum':['up',a1_0x297f57(0x10a),a1_0x297f57(0x108),a1_0x297f57(0x102)],'description':'Direction\x20to\x20scroll'},'amount':{'type':a1_0x297f57(0x114),'description':a1_0x297f57(0x111)}},'required':['tabId',a1_0x297f57(0x119)]}}];
@@ -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(_0x5a6383,_0x5155ff){const _0x598857=a2_0x77f4,_0x534949=_0x5a6383();while(!![]){try{const _0x245739=parseInt(_0x598857(0x143))/0x1+parseInt(_0x598857(0x121))/0x2+-parseInt(_0x598857(0x12e))/0x3*(parseInt(_0x598857(0x14a))/0x4)+-parseInt(_0x598857(0x133))/0x5+-parseInt(_0x598857(0x136))/0x6+-parseInt(_0x598857(0x12c))/0x7*(parseInt(_0x598857(0x130))/0x8)+parseInt(_0x598857(0x13b))/0x9;if(_0x245739===_0x5155ff)break;else _0x534949['push'](_0x534949['shift']());}catch(_0x2c2b77){_0x534949['push'](_0x534949['shift']());}}}(a2_0x4172,0x8ec86));import{WebSocketServer}from'ws';import*as a2_0xc8b456 from'../ui/output.js';const sessions=new Map();let server=null,isRunning=![];function a2_0x77f4(_0x15ca3f,_0x358e98){_0x15ca3f=_0x15ca3f-0x11e;const _0x4172c2=a2_0x4172();let _0x77f41e=_0x4172c2[_0x15ca3f];return _0x77f41e;}const pendingRequests=new Map();export function startBrowserServer(_0x212061=0x2408){return new Promise(_0x2f9bd5=>{const _0x24f4bf=a2_0x77f4;if(isRunning&&server){a2_0xc8b456['warn'](_0x24f4bf(0x125)),_0x2f9bd5(!![]);return;}try{server=new WebSocketServer({'port':_0x212061}),server['on']('listening',()=>{const _0x4ad1d3=_0x24f4bf;isRunning=!![],a2_0xc8b456[_0x4ad1d3(0x14d)](_0x4ad1d3(0x141)+_0x212061),a2_0xc8b456[_0x4ad1d3(0x13f)]('Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...'),_0x2f9bd5(!![]);}),server['on'](_0x24f4bf(0x12d),async _0x5e5b31=>{const _0x3ef59b=_0x24f4bf;let _0x1bd3d8=null;_0x5e5b31['on'](_0x3ef59b(0x152),async _0x2907d4=>{const _0x530506=_0x3ef59b;try{const _0x499055=JSON[_0x530506(0x11f)](_0x2907d4[_0x530506(0x149)]());if(_0x499055[_0x530506(0x127)]===_0x530506(0x153))_0x1bd3d8={'ws':_0x5e5b31,'userId':_0x499055[_0x530506(0x139)]?.['uid']||_0x530506(0x13d),'userEmail':_0x499055[_0x530506(0x139)]?.['email']||_0x530506(0x13d),'connectedAt':Date[_0x530506(0x11e)]()},sessions[_0x530506(0x144)](_0x1bd3d8[_0x530506(0x134)],_0x1bd3d8),_0x5e5b31[_0x530506(0x12a)](JSON[_0x530506(0x14c)]({'type':_0x530506(0x147),'userId':_0x1bd3d8[_0x530506(0x134)]}));else{if(_0x499055[_0x530506(0x127)]==='response'){const _0x2854c6=pendingRequests[_0x530506(0x14e)](_0x499055[_0x530506(0x138)]);_0x2854c6&&(clearTimeout(_0x2854c6[_0x530506(0x123)]),pendingRequests[_0x530506(0x142)](_0x499055[_0x530506(0x138)]),_0x499055[_0x530506(0x132)][_0x530506(0x14d)]?_0x2854c6[_0x530506(0x14b)](_0x499055[_0x530506(0x132)][_0x530506(0x135)]):_0x2854c6['reject'](new Error(_0x499055[_0x530506(0x132)][_0x530506(0x126)]||_0x530506(0x13e))));}}}catch(_0x42ff4d){console[_0x530506(0x126)](_0x530506(0x128),_0x42ff4d);}}),_0x5e5b31['on'](_0x3ef59b(0x151),()=>{const _0x5a2de6=_0x3ef59b;_0x1bd3d8&&sessions[_0x5a2de6(0x142)](_0x1bd3d8[_0x5a2de6(0x134)]);}),_0x5e5b31['on']('error',_0x2a669f=>{const _0x214df0=_0x3ef59b;console[_0x214df0(0x126)](_0x214df0(0x124),_0x2a669f);});}),server['on']('error',_0x5ad008=>{const _0x3d0cd7=_0x24f4bf;_0x5ad008[_0x3d0cd7(0x14f)]!==_0x3d0cd7(0x145)&&a2_0xc8b456[_0x3d0cd7(0x126)](_0x3d0cd7(0x13c)+_0x5ad008['message']),_0x2f9bd5(![]);});}catch(_0x483323){_0x483323['code']!==_0x24f4bf(0x145)&&a2_0xc8b456['error'](_0x24f4bf(0x131)+_0x483323[_0x24f4bf(0x152)]),_0x2f9bd5(![]);}});}export function stopBrowserServer(){const _0x50d0f3=a2_0x77f4;server&&(sessions['clear'](),pendingRequests[_0x50d0f3(0x12b)](({timeout:_0x4136b6,reject:_0x440e80})=>{clearTimeout(_0x4136b6),_0x440e80(new Error('Server\x20stopped'));}),pendingRequests[_0x50d0f3(0x137)](),server[_0x50d0f3(0x151)](),server=null,isRunning=![],a2_0xc8b456[_0x50d0f3(0x148)](_0x50d0f3(0x140)));}function a2_0x4172(){const _0x5ecdab=['WebSocket\x20error:','Browser\x20server\x20already\x20running','error','type','Error\x20processing\x20message:','substr','send','forEach','7OFzVqd','connection','153BKHSmb','Browser\x20server\x20not\x20running','8453416fWHOln','Failed\x20to\x20start\x20browser\x20server:\x20','result','3039800pxJrWj','userId','data','5245176sFORdN','clear','requestId','user','random','27069057keYKXG','Browser\x20server\x20error:\x20','unknown','Command\x20failed','dim','Browser\x20server\x20stopped','Browser\x20server\x20started\x20on\x20ws://localhost:','delete','774611IRnXsC','set','EADDRINUSE','Command\x20timeout\x20after\x20','auth_success','info','toString','83424pupJoW','resolve','stringify','success','get','code','from','close','message','auth','now','parse','values','810086EQgtgH','req_','timeout'];a2_0x4172=function(){return _0x5ecdab;};return a2_0x4172();}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x5c127d,_0xd3d2a9={},_0x10a694=0x7530){const _0x1dbb3e=a2_0x77f4;if(!isRunning)throw new Error(_0x1dbb3e(0x12f));const _0x3b3c17=Array[_0x1dbb3e(0x150)](sessions['values']())[0x0];if(!_0x3b3c17)throw new Error('No\x20browser\x20extension\x20connected');const _0x14cc57=generateRequestId();return new Promise((_0x3eeb9d,_0x22a9d6)=>{const _0x404b38=_0x1dbb3e,_0x2cfc82=setTimeout(()=>{const _0x5d122e=a2_0x77f4;pendingRequests[_0x5d122e(0x142)](_0x14cc57),_0x22a9d6(new Error(_0x5d122e(0x146)+_0x10a694+'ms'));},_0x10a694);pendingRequests[_0x404b38(0x144)](_0x14cc57,{'resolve':_0x3eeb9d,'reject':_0x22a9d6,'timeout':_0x2cfc82});const _0x2278cb={'requestId':_0x14cc57,'command':_0x5c127d,'args':_0xd3d2a9};_0x3b3c17['ws'][_0x404b38(0x12a)](JSON['stringify'](_0x2278cb));});}function generateRequestId(){const _0xbef97f=a2_0x77f4;return _0xbef97f(0x122)+Date[_0xbef97f(0x11e)]()+'_'+Math[_0xbef97f(0x13a)]()[_0xbef97f(0x149)](0x24)[_0xbef97f(0x129)](0x2,0x9);}export function getConnectedSessions(){const _0x4ec5af=a2_0x77f4;return Array[_0x4ec5af(0x150)](sessions[_0x4ec5af(0x120)]());}
@@ -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(_0x1cdb91,_0x496192){const _0x48ca4d=a3_0x1aed,_0x339d6d=_0x1cdb91();while(!![]){try{const _0x9a5df3=-parseInt(_0x48ca4d(0x1be))/0x1*(-parseInt(_0x48ca4d(0x1b6))/0x2)+parseInt(_0x48ca4d(0x1b7))/0x3+parseInt(_0x48ca4d(0x1c0))/0x4+parseInt(_0x48ca4d(0x1b1))/0x5+-parseInt(_0x48ca4d(0x1ba))/0x6+parseInt(_0x48ca4d(0x1b2))/0x7*(-parseInt(_0x48ca4d(0x1c3))/0x8)+-parseInt(_0x48ca4d(0x1b9))/0x9;if(_0x9a5df3===_0x496192)break;else _0x339d6d['push'](_0x339d6d['shift']());}catch(_0xd67c20){_0x339d6d['push'](_0x339d6d['shift']());}}}(a3_0x1574,0x35148));import{sendBrowserCommand,getConnectedSessions}from'./server.js';import a3_0x964de0 from'open';export async function browserOpen(_0x3c9691){const _0x228568=a3_0x1aed,_0x3aba49=getConnectedSessions();if(_0x3aba49[_0x228568(0x1bb)]===0x0)return await a3_0x964de0(_0x3c9691),{'success':!![],'message':_0x228568(0x1bf)};try{return await sendBrowserCommand(_0x228568(0x1c6),{'url':_0x3c9691});}catch(_0x39e583){return await a3_0x964de0(_0x3c9691),{'success':!![],'message':_0x228568(0x1bf)};}}export async function browserClick(_0x404883){const _0x4b075f=a3_0x1aed;return await sendBrowserCommand(_0x4b075f(0x1b3),{'selector':_0x404883});}export async function browserFill(_0x20d171,_0x37cde7){return await sendBrowserCommand('fill',{'selector':_0x20d171,'value':_0x37cde7});}export async function browserSnapshot(){const _0x54b171=a3_0x1aed;return await sendBrowserCommand(_0x54b171(0x1bc));}export async function browserScreenshot(){return await sendBrowserCommand('screenshot');}export async function browserGetText(_0x25b59f){const _0x3c9a52=a3_0x1aed;return await sendBrowserCommand(_0x3c9a52(0x1bd),{'selector':_0x25b59f});}export async function browserGetHtml(_0x2f309f){const _0x5734bb=a3_0x1aed;return await sendBrowserCommand(_0x5734bb(0x1c7),{'selector':_0x2f309f});}function a3_0x1aed(_0x191254,_0x21f3ea){_0x191254=_0x191254-0x1b1;const _0x15742f=a3_0x1574();let _0x1aed9b=_0x15742f[_0x191254];return _0x1aed9b;}export async function browserWait(_0x3548bb){const _0x231f48=a3_0x1aed;return typeof _0x3548bb===_0x231f48(0x1c2)?await sendBrowserCommand(_0x231f48(0x1c1),{'ms':_0x3548bb}):await sendBrowserCommand(_0x231f48(0x1c1),{'selector':_0x3548bb});}export async function browserBack(){const _0x5255fc=a3_0x1aed;return await sendBrowserCommand(_0x5255fc(0x1c5));}export async function browserForward(){const _0x46f4a4=a3_0x1aed;return await sendBrowserCommand(_0x46f4a4(0x1c4));}export async function browserReload(){const _0x1333dc=a3_0x1aed;return await sendBrowserCommand(_0x1333dc(0x1b8));}function a3_0x1574(){const _0x490e26=['1680705nUHfPE','280889wijFdM','click','close','scroll','540uytDDJ','302100tZjxbX','reload','1665927yDRrpi','441846wsehlR','length','snapshot','get_text','373sUtdIk','Opened\x20in\x20system\x20browser','396468LySMfH','wait','number','32WUBFRX','forward','back','open','get_html'];a3_0x1574=function(){return _0x490e26;};return a3_0x1574();}export async function browserScroll(_0x466107,_0x230c36){const _0x5426d1=a3_0x1aed;return await sendBrowserCommand(_0x5426d1(0x1b5),{'direction':_0x466107,'amount':_0x230c36});}export async function browserClose(){const _0x32dc9b=a3_0x1aed;return await sendBrowserCommand(_0x32dc9b(0x1b4));}
@@ -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
+ const a4_0x5dfe82=a4_0x208c;function a4_0x208c(_0x6b6951,_0x472ce0){_0x6b6951=_0x6b6951-0x9c;const _0x2f1c8f=a4_0x2f1c();let _0x208cac=_0x2f1c8f[_0x6b6951];return _0x208cac;}(function(_0x22db88,_0xe3231){const _0xe4eb34=a4_0x208c,_0x428e65=_0x22db88();while(!![]){try{const _0x5566fb=parseInt(_0xe4eb34(0x16c))/0x1+-parseInt(_0xe4eb34(0x121))/0x2+parseInt(_0xe4eb34(0x112))/0x3+parseInt(_0xe4eb34(0x10e))/0x4*(-parseInt(_0xe4eb34(0x163))/0x5)+parseInt(_0xe4eb34(0x15d))/0x6*(parseInt(_0xe4eb34(0x116))/0x7)+-parseInt(_0xe4eb34(0xd9))/0x8+parseInt(_0xe4eb34(0x109))/0x9*(parseInt(_0xe4eb34(0x15c))/0xa);if(_0x5566fb===_0xe3231)break;else _0x428e65['push'](_0x428e65['shift']());}catch(_0x4c44cf){_0x428e65['push'](_0x428e65['shift']());}}}(a4_0x2f1c,0x2ef8e));import{input}from'@inquirer/prompts';import a4_0x5220e4 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_0x214e6b from'../ui/output.js';function a4_0x2f1c(){const _0xc30480=['../telegram/index.js','Now,','search_file','\x0a>\x20','API\x20error:\x20','Yes','exit','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','exitCode','content','start','Read\x20','join','Tool\x20error\x20occurred:\x20','.\x20Use\x20','base','push','Error','/help','261LhaqvI','cwd','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','###','aiMessageEnd','20dnlgtu','createSpinner','find_files','GetText','180018GfZqKY','body','force\x20closed','\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status','28BBjjXx','Exited\x20with\x20code\x20','map','currentDir','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','AbortError','1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather','Find','List','header','2.\x20Send\x20/newbot\x20and\x20follow\x20instructions','77106XdRJTg','Connected\x20MCP\x20Tools:','selector','match','values','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','system','No\x20changes\x20to\x20rollback','\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration','Invalid\x20JSON\x20output\x20from\x20model:\x20','includes','stringify','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','branch','github_create_branch','trim','object','\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot','Unknown\x20tool:\x20','string','aborted','Operation\x20failed','github_read_file','size','toolSuccess','email','description','message','\x0aYou\x20are\x20running\x20on\x20','Running','return\x20','/github','path','\x20lines\x20of\x20output\x20(','\x22args\x22:','Completed\x20successfully\x20(','../utils/storage.js','warn','title','serverName','---','):\x20','owner','stopBot','setup','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','properties','Telegram\x20bot\x20is\x20running','isRateLimit','find','head','Commands','Bot\x20token\x20saved!','search_directory','startBot','replace','\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot','name','Telegram\x20bot\x20is\x20not\x20running','102730znOgzo','287814xjapBy','Browser\x20server\x20is\x20running','statusBar','Fill','user','then','285185dCclrl','Error:\x20','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','browser_open','substring','getThemeById','code','/model','Tool\x20result\x20for\x20','65859wVJwUP','Read','No\x20MCP\x20tools\x20connected.','Thinking...','\x20[Aborted]','startsWith','Done\x20in\x20','loggedInBox','primary','search','/themes','Create','removeListener','inputSchema','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','Goodbye!','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram','list_directory','../browser/index.js','github_create_pr','```','slice','stop','forEach','edit_file','/clear','filename','Browser\x20server\x20is\x20not\x20running','/telegram','command','assistant','registered\x20that','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','actionSpinner','/usage','stderr','displayName','@inquirer/prompts','Update','split','stdout','hex','Connected\x20browsers:\x20','script','.\x20Please\x20fix\x20this\x20and\x20continue.','\x0aAborting...','run_command','Stop.','file','signal','Current\x20model:\x20','../tools/file.js','abort','userEmail','must\x20greet','url','/rollback','repo','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','pattern','success','/quit','```tool','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','Theme\x20changed\x20to:\x20','/stats','Generating...','-\x20Running','Unknown\x20tool','<execute_tool>','toFixed','MCP\x20Tool\x20error:\x20','Snapshot','../github/api.js','../tools/rollback.js','SIGINT','\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','bold','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','\x20\x20-\x20','create_file','info','Fetching\x20usage...','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','796176jTQwWs','length','getTheme','Completed\x20with\x20','It\x20will\x20start\x20automatically\x20when\x20needed','Browser','3.\x20Copy\x20the\x20bot\x20token','Security\x20PIN\x20set!','SearchDir','mcpConnected','Let\x20me','dim','Click','error','browser_get_text','read_file','Bot\x20token:','args','isConfigured','I\x20am','Model\x20changed\x20to:\x20','fromBranch','catch','/theme','browser_click','</execute_tool>','browser_snapshot','isSpinning','browser_screenshot'];a4_0x2f1c=function(){return _0xc30480;};return a4_0x2f1c();}import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x5e5d84 from'../github/index.js';const SYSTEM_PROMPT=a4_0x5dfe82(0x11a);export async function startChat(_0x18eaa3){const _0xc9d8c=a4_0x5dfe82,{startBrowserServer:_0x2f70b8}=await import(_0xc9d8c(0x17e));_0x2f70b8()[_0xc9d8c(0xef)](()=>{});const _0x140f02=getSelectedModel();await connectToMcpServers();const _0xb28784=await getMcpTools(),_0x46a0c1=new Set(_0xb28784['map'](_0x27d9f7=>_0x27d9f7[_0xc9d8c(0x148)]));_0x46a0c1[_0xc9d8c(0x138)]>0x0&&a4_0x214e6b[_0xc9d8c(0xe2)](_0x46a0c1[_0xc9d8c(0x138)],_0xb28784[_0xc9d8c(0xda)]);process['on'](_0xc9d8c(0xfc),()=>closeMcpClients());const _0x5ca2b4=formatRulesForSystem(),_0x186696=getPlatformInfo(),_0x1af207=getShellPrefix(),_0x4be617=_0xb28784[_0xc9d8c(0xda)]>0x0?_0xc9d8c(0xbe)+_0xb28784[_0xc9d8c(0x118)](_0x3aa1a7=>{const _0x238d3e=_0xc9d8c,_0x4d417e=Object['keys'](_0x3aa1a7[_0x238d3e(0x179)]?.[_0x238d3e(0x14f)]||{})[_0x238d3e(0x102)](',\x20');return'-\x20'+_0x3aa1a7['name']+'('+_0x4d417e+_0x238d3e(0x14a)+_0x3aa1a7[_0x238d3e(0x13b)];})[_0xc9d8c(0x102)]('\x0a'):'',_0x2a62e9=isWindows()?_0xc9d8c(0x13d)+_0x186696+'.\x20Use\x20PowerShell\x20commands.':_0xc9d8c(0x13d)+_0x186696+_0xc9d8c(0x104)+_0x1af207+'\x20for\x20commands\x20requiring\x20elevated\x20privileges.',_0x5287e9=SYSTEM_PROMPT+_0x4be617+_0x2a62e9+'\x0a'+_0x5ca2b4,_0x5d4bc4=getUser(),_0x2be941=[{'role':_0xc9d8c(0x127),'content':_0x5287e9}];(_0x5d4bc4[_0xc9d8c(0xa8)]||_0x5d4bc4['email'])&&a4_0x214e6b[_0xc9d8c(0x173)](_0x5d4bc4[_0xc9d8c(0xa8)]||_0x5d4bc4[_0xc9d8c(0x13a)]||'Unknown');a4_0x214e6b[_0xc9d8c(0x119)](process[_0xc9d8c(0x10a)]()),a4_0x214e6b[_0xc9d8c(0xe4)](_0xc9d8c(0xc3)),a4_0x214e6b[_0xc9d8c(0x15f)](_0x140f02,0x64);const _0xc5bd1b=async _0x17a40c=>{const _0x301ac8=_0xc9d8c;if(!_0x17a40c||_0x17a40c[_0x301ac8(0x130)]()==='')return!![];const _0x564ca8=_0x17a40c[_0x301ac8(0x130)]();if(_0x564ca8==='/exit'||_0x564ca8===_0x301ac8(0xc1))return a4_0x214e6b[_0x301ac8(0xd6)](_0x301ac8(0x17b)),![];if(_0x564ca8===_0x301ac8(0x9d))return _0x2be941[_0x301ac8(0xda)]=0x1,a4_0x214e6b['info']('Conversation\x20cleared'),!![];if(_0x564ca8==='/mcp'){const _0x118202=await getMcpTools();return _0x118202[_0x301ac8(0xda)]===0x0?a4_0x214e6b[_0x301ac8(0xd6)](_0x301ac8(0x16e)):(a4_0x214e6b[_0x301ac8(0xd6)](_0x301ac8(0x122)),_0x118202[_0x301ac8(0x183)](_0x2472c4=>a4_0x214e6b[_0x301ac8(0xe4)]('-\x20'+_0x2472c4['name']+'\x20('+_0x2472c4[_0x301ac8(0x148)]+'):\x20'+(_0x2472c4[_0x301ac8(0x13b)]?.[_0x301ac8(0x181)](0x0,0x32)||'')))),a4_0x214e6b['dim'](_0x301ac8(0x17a)),!![];}if(_0x564ca8===_0x301ac8(0x108))return a4_0x214e6b[_0x301ac8(0x11f)](_0x301ac8(0x154)),a4_0x214e6b[_0x301ac8(0xe4)]('\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat'),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0xd0)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0xfd)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0x14e)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0xd3)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0x17c)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0x126)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0xa4)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0xd8)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0x129)),a4_0x214e6b['dim'](_0x301ac8(0x115)),!![];if(_0x564ca8==='/browser'){const {isBrowserServerRunning:_0x402ae8,getConnectedSessions:_0x2ff149}=await import('../browser/index.js');if(_0x402ae8()){const _0x349646=_0x2ff149();a4_0x214e6b['success'](_0x301ac8(0x15e)),a4_0x214e6b[_0x301ac8(0xd6)](_0x301ac8(0xae)+_0x349646[_0x301ac8(0xda)]),_0x349646[_0x301ac8(0x183)](_0x5cad7a=>a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0xd4)+_0x5cad7a[_0x301ac8(0xb9)]));}else a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0x9f)),a4_0x214e6b['dim'](_0x301ac8(0xdd));return!![];}if(_0x564ca8[_0x301ac8(0x171)](_0x301ac8(0x140))){const _0x35823d=_0x564ca8['split']('\x20')[0x1]||'';return await a4_0x5e5d84['handleGitHubCommand'](_0x35823d),!![];}if(_0x564ca8[_0x301ac8(0x171)](_0x301ac8(0xa0))){const _0x169f3e=await import(_0x301ac8(0xf6)),_0x19bf4c=_0x564ca8[_0x301ac8(0xab)]('\x20')[0x1]||'';if(_0x19bf4c===_0x301ac8(0x14d)){const {input:_0x3f1811,password:_0x482e16}=await import(_0x301ac8(0xa9));a4_0x214e6b['header']('Telegram\x20Bot\x20Setup'),a4_0x214e6b['dim'](_0x301ac8(0x11c)),a4_0x214e6b['dim'](_0x301ac8(0x120)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0xdf)),a4_0x214e6b[_0x301ac8(0xd6)]('');const _0x2f3022=await _0x482e16({'message':_0x301ac8(0xe9),'mask':'*'});_0x2f3022&&(_0x169f3e['setBotToken'](_0x2f3022),a4_0x214e6b['success'](_0x301ac8(0x155)));const _0x3495a7=await _0x3f1811({'message':'Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):'});return _0x3495a7&&(_0x169f3e['setSecurityPin'](_0x3495a7),a4_0x214e6b[_0x301ac8(0xc0)](_0x301ac8(0xe0))),a4_0x214e6b[_0x301ac8(0xd6)](_0x301ac8(0x10b)),!![];}if(_0x19bf4c==='start')return await _0x169f3e[_0x301ac8(0x157)](),!![];if(_0x19bf4c===_0x301ac8(0x182))return _0x169f3e[_0x301ac8(0x14c)](),a4_0x214e6b[_0x301ac8(0xd6)]('Telegram\x20bot\x20stopped.'),!![];if(_0x19bf4c==='status')return _0x169f3e['isBotRunning']()?a4_0x214e6b[_0x301ac8(0xc0)](_0x301ac8(0x150)):a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0x15b)),a4_0x214e6b['dim']('Configured:\x20'+(_0x169f3e[_0x301ac8(0xeb)]()?_0x301ac8(0xfb):'No')),!![];return a4_0x214e6b[_0x301ac8(0x11f)]('Telegram\x20Commands'),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0xd2)),a4_0x214e6b['dim'](_0x301ac8(0x159)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0x132)),a4_0x214e6b[_0x301ac8(0xe4)](_0x301ac8(0x12d)),!![];}if(_0x564ca8===_0x301ac8(0xbc)){const {rollbackLast:_0xe27962,getChanges:_0xd79877}=await import(_0x301ac8(0xce)),_0x913801=_0xd79877();if(_0x913801[_0x301ac8(0xda)]===0x0)a4_0x214e6b[_0x301ac8(0xd6)](_0x301ac8(0x128));else{const _0x39be4d=_0xe27962();_0x39be4d['success']?a4_0x214e6b[_0x301ac8(0xc0)](_0x39be4d['message']):a4_0x214e6b[_0x301ac8(0xe6)](_0x39be4d[_0x301ac8(0x13c)]);}return!![];}if(_0x564ca8===_0x301ac8(0x16a)){const _0x2cb05d=await selectModel();return _0x2cb05d!==_0x140f02?(a4_0x214e6b['info'](_0x301ac8(0xed)+_0x2cb05d),a4_0x214e6b['info'](_0x301ac8(0x165))):a4_0x214e6b['info'](_0x301ac8(0xb6)+_0x140f02),!![];}if(_0x564ca8===_0x301ac8(0xf0)||_0x564ca8===_0x301ac8(0x176)){const {selectTheme:_0x299cd4}=await import('../ui/themes.js'),_0x3bc476=await _0x299cd4();return a4_0x214e6b[_0x301ac8(0xd6)](_0x301ac8(0xc4)+_0x3bc476),!![];}if(_0x564ca8===_0x301ac8(0xa6)||_0x564ca8===_0x301ac8(0xc5)){const _0x56071e=a4_0x214e6b[_0x301ac8(0x10f)](_0x301ac8(0xd7));_0x56071e[_0x301ac8(0x100)]();const _0x4b21a8=await getUserUsage();return _0x56071e['stop'](),_0x4b21a8?a4_0x214e6b['usageBox'](_0x4b21a8['tokensUsed'],_0x4b21a8['monthlyLimit'],_0x4b21a8['isOverLimit']):a4_0x214e6b['error']('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}return _0x2be941[_0x301ac8(0x106)]({'role':'user','content':_0x564ca8}),await processAgentLoop(_0x2be941,_0x140f02),!![];};if(_0x18eaa3){const _0x2a8490=await _0xc5bd1b(_0x18eaa3);if(!_0x2a8490)return;}while(!![]){try{const _0x27e71a=await import(_0xc9d8c(0x145))[_0xc9d8c(0x162)](_0x428761=>_0x428761[_0xc9d8c(0xdb)]()),_0x29355b=await import('../ui/themes.js')[_0xc9d8c(0x162)](_0x357dfa=>_0x357dfa[_0xc9d8c(0x168)](_0x27e71a)),_0x4ff5ef=a4_0x5220e4[_0xc9d8c(0xd1)][_0xc9d8c(0xad)](_0x29355b[_0xc9d8c(0x174)])(_0xc9d8c(0xf9)),_0x3ebf33=await input({'message':_0x4ff5ef,'theme':{'prefix':''}}),_0x38d5fb=await _0xc5bd1b(_0x3ebf33);if(!_0x38d5fb)break;}catch(_0x19cb7e){if(_0x19cb7e instanceof Error&&_0x19cb7e[_0xc9d8c(0x13c)][_0xc9d8c(0x12b)](_0xc9d8c(0x114)))break;a4_0x214e6b[_0xc9d8c(0xe6)]('Unexpected\x20error:\x20'+_0x19cb7e);}}}function cleanTagsFromLine(_0x27a98f){const _0x26cd87=a4_0x5dfe82,_0x512624=_0x27a98f[_0x26cd87(0x130)]();if(!_0x512624)return'';if(_0x512624[_0x26cd87(0x171)]('**'))return'';if(_0x512624[_0x26cd87(0x171)](_0x26cd87(0x10c)))return'';if(_0x512624['startsWith'](_0x26cd87(0x149)))return'';if(_0x512624[_0x26cd87(0x171)]('```'))return'';if(_0x512624['includes']('\x22name\x22:')&&_0x512624[_0x26cd87(0x12b)](_0x26cd87(0x143)))return'';if(_0x512624[_0x26cd87(0x171)](_0x26cd87(0x13e)))return'';if(_0x512624[_0x26cd87(0x171)](_0x26cd87(0xc7)))return'';if(_0x512624[_0x26cd87(0x171)]('I\x27ve'))return'';if(_0x512624[_0x26cd87(0x171)](_0x26cd87(0xec)))return'';if(_0x512624[_0x26cd87(0x171)](_0x26cd87(0xf7)))return'';if(_0x512624[_0x26cd87(0x171)](_0x26cd87(0xe3)))return'';if(_0x512624[_0x26cd87(0x12b)](_0x26cd87(0xba)))return'';if(_0x512624[_0x26cd87(0x12b)](_0x26cd87(0xa3)))return'';return _0x27a98f['replace'](/<text>/g,'')[_0x26cd87(0x158)](/<\/text>/g,'')['replace'](/<\/text>/g,'')[_0x26cd87(0x158)](/<reasoning>/g,'')[_0x26cd87(0x158)](/<\/reasoning>/g,'')['replace'](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x5e4115,_0x508659){const _0x1165dd=a4_0x5dfe82;let _0x6c60c8=0x0;const _0x5d1550=0x3e8;while(_0x6c60c8<_0x5d1550){_0x6c60c8++;const _0x51a55a=a4_0x214e6b['createSpinner'](_0x1165dd(0x16f));_0x51a55a['start']();let _0xa93c35='',_0x1107fa=![],_0x1c53be='';const _0x33fb79=new AbortController(),_0x824269=()=>{const _0x3ff646=_0x1165dd;_0x33fb79[_0x3ff646(0xb8)](),a4_0x214e6b[_0x3ff646(0xd6)](_0x3ff646(0xb1));};process['on']('SIGINT',_0x824269);let _0x1ff348=null;try{const _0x28d848=await sendChatMessage(_0x508659,_0x5e4115,_0x52f811=>{const _0x32fbaa=_0x1165dd;_0x51a55a['isSpinning']&&_0x51a55a[_0x32fbaa(0x182)]();_0xa93c35+=_0x52f811;for(const _0x37a1cf of _0x52f811){_0x1c53be+=_0x37a1cf;if(_0x37a1cf==='\x0a'){if(!_0x1107fa){if(_0x1c53be[_0x32fbaa(0x12b)](_0x32fbaa(0xc9))||_0x1c53be['startsWith'](_0x32fbaa(0xc2))){_0x1107fa=!![],_0x1c53be='';!_0x1ff348&&(_0x1ff348=a4_0x214e6b['actionSpinner'](_0x32fbaa(0xc6)),_0x1ff348[_0x32fbaa(0x100)]());continue;}let _0x32ca0c=_0x1c53be['replace'](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x32fbaa(0x158)](/<reasoning.*?>/g,'')[_0x32fbaa(0x158)](/<\/reasoning>/g,'');if(_0x32ca0c[_0x32fbaa(0x171)]('```')&&!_0x32ca0c[_0x32fbaa(0x171)](_0x32fbaa(0xc2)))process[_0x32fbaa(0xac)]['write'](_0x32fbaa(0x180)+_0x32ca0c[_0x32fbaa(0x181)](0x3));else(_0x32ca0c[_0x32fbaa(0x130)]()||_0x32ca0c==='\x0a'||_0x32ca0c==='\x0d\x0a')&&process[_0x32fbaa(0xac)]['write'](_0x32ca0c);}else(_0x1c53be[_0x32fbaa(0x12b)](_0x32fbaa(0xf2))||_0x1c53be[_0x32fbaa(0x130)]()===_0x32fbaa(0x180))&&(_0x1107fa=![],_0x1ff348&&(_0x1ff348[_0x32fbaa(0x182)](),_0x1ff348=null));_0x1c53be='';}}},_0x33fb79[_0x1165dd(0xb5)]);_0x1ff348&&(_0x1ff348[_0x1165dd(0x182)](),_0x1ff348=null);if(_0x1c53be&&!_0x1107fa&&!_0x1c53be[_0x1165dd(0x12b)]('<execute_tool>')){let _0x358d4d=_0x1c53be[_0x1165dd(0x158)](/<text>/g,'')[_0x1165dd(0x158)](/<\/text>/g,'')[_0x1165dd(0x158)](/<reasoning.*?>/g,'')['replace'](/<\/reasoning>/g,'');if(_0x358d4d[_0x1165dd(0x130)]())process['stdout']['write'](_0x358d4d);}_0xa93c35=_0x28d848[_0x1165dd(0xff)];}catch(_0x51a1fa){_0x51a55a['stop'](),process[_0x1165dd(0x178)](_0x1165dd(0xcf),_0x824269);if(_0x51a1fa[_0x1165dd(0x15a)]===_0x1165dd(0x11b)||_0x51a1fa[_0x1165dd(0x13c)]['includes'](_0x1165dd(0x135))){a4_0x214e6b[_0x1165dd(0x146)]('User\x20aborted.'),_0x5e4115[_0x1165dd(0x106)]({'role':_0x1165dd(0xa2),'content':_0xa93c35+_0x1165dd(0x170)}),_0x5e4115[_0x1165dd(0x106)]({'role':'user','content':_0x1165dd(0xb3)});break;}if(_0x51a1fa[_0x1165dd(0x151)]){a4_0x214e6b['rateLimitWarning'](_0x51a1fa['resetIn']||0x3c);return;}a4_0x214e6b['error'](_0x1165dd(0xfa)+_0x51a1fa);return;}finally{process[_0x1165dd(0x178)](_0x1165dd(0xcf),_0x824269);}_0x51a55a[_0x1165dd(0xf4)]&&_0x51a55a[_0x1165dd(0x182)]();a4_0x214e6b[_0x1165dd(0x10d)](),_0x5e4115[_0x1165dd(0x106)]({'role':_0x1165dd(0xa2),'content':_0xa93c35});let _0x23548d=_0xa93c35[_0x1165dd(0x124)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x23548d&&(_0x23548d=_0xa93c35[_0x1165dd(0x124)](/```tool\s*([\s\S]*?)```/));!_0x23548d&&(_0x23548d=_0xa93c35[_0x1165dd(0x124)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x23548d)break;function _0x24ab5c(_0x1e0eaa){const _0x23fbaf=_0x1165dd,_0x4bd119=_0x1e0eaa[_0x23fbaf(0x130)]();try{return JSON['parse'](_0x4bd119);}catch(_0x3c390e){try{let _0x5a70a8='',_0x10a081=![];for(let _0x42cb2e=0x0;_0x42cb2e<_0x4bd119['length'];_0x42cb2e++){const _0x121279=_0x4bd119[_0x42cb2e];if(_0x121279==='\x22'&&_0x4bd119[_0x42cb2e-0x1]!=='\x5c')_0x10a081=!_0x10a081;if(_0x10a081&&_0x121279==='\x0a')_0x5a70a8+='\x5cn';else _0x5a70a8+=_0x121279;}return JSON['parse'](_0x5a70a8);}catch(_0xdf4045){try{return new Function(_0x23fbaf(0x13f)+_0x4bd119)();}catch(_0xddd31d){throw new Error(_0x23fbaf(0x12a)+_0x3c390e['message']);}}}}try{const _0x21b194=_0x24ab5c(_0x23548d[0x1]),_0x4412af={'write_file':'create_file','write':_0x1165dd(0xd5),'create':_0x1165dd(0xd5),'read':'read_file','read_text_file':_0x1165dd(0xe8),'search':_0x1165dd(0xf8),'list':_0x1165dd(0x17d),'ls':_0x1165dd(0x17d),'execute':_0x1165dd(0xb2),'cmd':_0x1165dd(0xb2)};_0x4412af[_0x21b194[_0x1165dd(0x15a)]]&&(_0x21b194['name']=_0x4412af[_0x21b194[_0x1165dd(0x15a)]]);_0x21b194['args']&&(!_0x21b194['args'][_0x1165dd(0x141)]&&(_0x21b194[_0x1165dd(0xea)][_0x1165dd(0x141)]=_0x21b194[_0x1165dd(0xea)]['file_path']||_0x21b194[_0x1165dd(0xea)]['filepath']||_0x21b194['args'][_0x1165dd(0xb4)]||_0x21b194[_0x1165dd(0xea)][_0x1165dd(0x9e)]),!_0x21b194[_0x1165dd(0xea)][_0x1165dd(0xff)]&&(_0x21b194['args']['content']=_0x21b194[_0x1165dd(0xea)]['text']||_0x21b194[_0x1165dd(0xea)][_0x1165dd(0x169)]||_0x21b194[_0x1165dd(0xea)]['data']||_0x21b194['args']['source']),!_0x21b194['args'][_0x1165dd(0xa1)]&&(_0x21b194[_0x1165dd(0xea)][_0x1165dd(0xa1)]=_0x21b194[_0x1165dd(0xea)]['cmd']||_0x21b194[_0x1165dd(0xea)][_0x1165dd(0xaf)]));const _0x396f30={'create_file':_0x1165dd(0x177),'read_file':_0x1165dd(0x16d),'edit_file':_0x1165dd(0xaa),'list_directory':_0x1165dd(0x11e),'search_file':'Search','find_files':_0x1165dd(0x11d),'search_directory':_0x1165dd(0xe1),'run_command':'Run','browser_open':_0x1165dd(0xde),'browser_click':_0x1165dd(0xe5),'browser_fill':_0x1165dd(0x160),'browser_snapshot':_0x1165dd(0xcc),'browser_screenshot':'Screenshot','browser_get_text':_0x1165dd(0x111),'browser_close':'CloseBrowser'},_0x5b4cf3=_0x396f30[_0x21b194[_0x1165dd(0x15a)]]||_0x21b194['name'];let _0x433980='';if(_0x21b194[_0x1165dd(0x15a)]===_0x1165dd(0xb2)&&_0x21b194['args']['command'])_0x433980=_0x21b194['args']['command'];else{if(_0x21b194[_0x1165dd(0xea)][_0x1165dd(0x141)])_0x433980=_0x21b194['args']['path'];else{if(_0x21b194[_0x1165dd(0xea)][_0x1165dd(0xbf)])_0x433980='\x22'+_0x21b194['args'][_0x1165dd(0xbf)]+'\x22';else _0x21b194['args'][_0x1165dd(0xbb)]?_0x433980=_0x21b194['args']['url']:_0x433980=Object[_0x1165dd(0x125)](_0x21b194['args'])[0x0]||'';}}const _0x6c0389=_0x433980[_0x1165dd(0xda)]>0x32?_0x433980[_0x1165dd(0x181)](0x0,0x2f)+'...':_0x433980,_0x37488e=a4_0x214e6b[_0x1165dd(0xa5)](_0x5b4cf3+'('+_0x6c0389+')');_0x37488e[_0x1165dd(0x100)]();const _0x18b217=performance['now']();let _0x2fa3af;try{_0x2fa3af=await executeToolCall(_0x21b194['name'],_0x21b194['args']);}catch(_0x484dad){if(_0x484dad[_0x1165dd(0x13c)]&&_0x484dad[_0x1165dd(0x13c)][_0x1165dd(0x12b)](_0x1165dd(0xc8))){const _0x2536f5=await getMcpTools(),_0x57bbe4=_0x2536f5[_0x1165dd(0x152)](_0x2706d3=>_0x2706d3[_0x1165dd(0x15a)]===_0x21b194[_0x1165dd(0x15a)]);if(_0x57bbe4)try{_0x2fa3af=await executeMcpTool(_0x57bbe4[_0x1165dd(0x148)],_0x57bbe4['name'],_0x21b194[_0x1165dd(0xea)]);}catch(_0x36d805){throw new Error(_0x1165dd(0xcb)+_0x36d805);}else throw _0x484dad;}else throw _0x484dad;}const _0x32ba29=((performance['now']()-_0x18b217)/0x3e8)[_0x1165dd(0xca)](0x1);_0x37488e[_0x1165dd(0x182)]();let _0x3e8c57=_0x1165dd(0x172)+_0x32ba29+'s',_0x576f18=![];const _0x5e6baf=_0x2fa3af;if(_0x5e6baf&&typeof _0x5e6baf===_0x1165dd(0x131)){if(_0x5e6baf['success']===![])_0x576f18=!![],_0x3e8c57=_0x1165dd(0x164)+(_0x5e6baf['message']||_0x1165dd(0x136));else _0x5e6baf[_0x1165dd(0xe6)]&&(_0x576f18=!![],_0x3e8c57='Error:\x20'+_0x5e6baf[_0x1165dd(0xe6)]);}if(!_0x576f18){if(_0x21b194['name']===_0x1165dd(0xb2)&&_0x5e6baf){if(_0x5e6baf[_0x1165dd(0xfe)]===0x0){const _0x2ae5d4=_0x5e6baf[_0x1165dd(0xac)]?_0x5e6baf[_0x1165dd(0xac)][_0x1165dd(0xab)]('\x0a')['length']:0x0;_0x3e8c57=_0x1165dd(0xdc)+_0x2ae5d4+_0x1165dd(0x142)+_0x32ba29+'s)';}else _0x5e6baf[_0x1165dd(0xfe)]!==undefined&&(_0x576f18=!![],_0x3e8c57=_0x1165dd(0x117)+_0x5e6baf[_0x1165dd(0xfe)],_0x5e6baf['stderr']&&(_0x3e8c57+=':\x20'+_0x5e6baf[_0x1165dd(0xa7)][_0x1165dd(0xab)]('\x0a')[0x0][_0x1165dd(0x167)](0x0,0x64)));}else{if(_0x21b194[_0x1165dd(0x15a)]===_0x1165dd(0xe8)&&_0x5e6baf&&typeof _0x5e6baf[_0x1165dd(0xff)]===_0x1165dd(0x134)){const _0xd9af67=_0x5e6baf[_0x1165dd(0xff)][_0x1165dd(0xab)]('\x0a')[_0x1165dd(0xda)];_0x3e8c57=_0x1165dd(0x101)+_0xd9af67+'\x20lines\x20('+_0x32ba29+'s)';}else(_0x21b194[_0x1165dd(0x15a)]===_0x1165dd(0x9c)||_0x21b194[_0x1165dd(0x15a)]===_0x1165dd(0xd5))&&(_0x3e8c57=_0x1165dd(0x144)+_0x32ba29+'s)');}}a4_0x214e6b[_0x1165dd(0x139)](_0x5b4cf3,_0x6c0389,_0x3e8c57,_0x576f18);let _0x5ea3d7=_0x2fa3af;_0x21b194[_0x1165dd(0x15a)]===_0x1165dd(0xb2)&&_0x5e6baf&&(_0x5ea3d7={'exitCode':_0x5e6baf[_0x1165dd(0xfe)],'stdout':_0x5e6baf['stdout'],'stderr':_0x5e6baf[_0x1165dd(0xa7)],'error':_0x5e6baf[_0x1165dd(0xe6)]}),_0x5e4115['push']({'role':_0x1165dd(0x161),'content':_0x1165dd(0x16b)+_0x21b194[_0x1165dd(0x15a)]+':\x0a'+JSON[_0x1165dd(0x12c)](_0x5ea3d7,null,0x2)}),await new Promise(_0x28dde0=>setTimeout(_0x28dde0,0x1f4));}catch(_0x50cf29){a4_0x214e6b[_0x1165dd(0x139)](_0x1165dd(0x107),'tool\x20execution\x20failed',_0x50cf29[_0x1165dd(0x13c)]||String(_0x50cf29),!![]),_0x5e4115[_0x1165dd(0x106)]({'role':_0x1165dd(0x161),'content':_0x1165dd(0x103)+_0x50cf29+_0x1165dd(0xb0)});}}_0x6c60c8>=_0x5d1550&&a4_0x214e6b[_0x1165dd(0x146)]('Reached\x20maximum\x20iterations');}async function executeToolCall(_0x4f3c1a,_0x2b600f){const _0x74c154=a4_0x5dfe82;switch(_0x4f3c1a){case _0x74c154(0xd5):return createFile(_0x2b600f[_0x74c154(0x141)],_0x2b600f[_0x74c154(0xff)]);case _0x74c154(0xe8):return readFile(_0x2b600f[_0x74c154(0x141)]);case _0x74c154(0x17d):return listDirectory(_0x2b600f[_0x74c154(0x141)]||'.');case _0x74c154(0x9c):return editFile(_0x2b600f[_0x74c154(0x141)],_0x2b600f[_0x74c154(0x175)],_0x2b600f[_0x74c154(0x158)]);case _0x74c154(0xf8):return searchFile(_0x2b600f[_0x74c154(0x141)],_0x2b600f[_0x74c154(0xbf)]);case _0x74c154(0xb2):const {command:_0x56c3e6,background:_0x334a11,wait:_0x32c581}=_0x2b600f,_0x3cf14b=await runCommand(_0x56c3e6,undefined,_0x334a11,_0x32c581);return _0x3cf14b;case _0x74c154(0x110):{const {findFiles:_0x384f93}=await import(_0x74c154(0xb7));return _0x384f93(_0x2b600f[_0x74c154(0x141)]||'.',_0x2b600f[_0x74c154(0xbf)]);}case _0x74c154(0x156):{const {searchDirectory:_0x3bbadd}=await import(_0x74c154(0xb7));return _0x3bbadd(_0x2b600f[_0x74c154(0x141)]||'.',_0x2b600f[_0x74c154(0xbf)]);}case _0x74c154(0x137):{const {readFile:_0x29ef10}=await import(_0x74c154(0xcd));return _0x29ef10(_0x2b600f['owner'],_0x2b600f['repo'],_0x2b600f[_0x74c154(0x141)],_0x2b600f[_0x74c154(0x12e)]);}case _0x74c154(0x17f):{const {createPullRequest:_0x10b78c}=await import('../github/api.js');return _0x10b78c(_0x2b600f[_0x74c154(0x14b)],_0x2b600f[_0x74c154(0xbd)],_0x2b600f[_0x74c154(0x147)],_0x2b600f[_0x74c154(0x153)],_0x2b600f[_0x74c154(0x105)],_0x2b600f[_0x74c154(0x113)]);}case _0x74c154(0x12f):{const {createBranch:_0x9f8c66}=await import('../github/api.js');return _0x9f8c66(_0x2b600f[_0x74c154(0x14b)],_0x2b600f[_0x74c154(0xbd)],_0x2b600f['branchName'],_0x2b600f[_0x74c154(0xee)]);}case _0x74c154(0x166):{const {browserOpen:_0x44fc9e,startBrowserServer:_0x5320fb,isBrowserServerRunning:_0x2770ea}=await import(_0x74c154(0x17e));return!_0x2770ea()&&await _0x5320fb(),_0x44fc9e(_0x2b600f[_0x74c154(0xbb)]);}case _0x74c154(0xf1):{const {browserClick:_0x180aed}=await import(_0x74c154(0x17e));return _0x180aed(_0x2b600f[_0x74c154(0x123)]);}case'browser_fill':{const {browserFill:_0x9cd9cc}=await import(_0x74c154(0x17e));return _0x9cd9cc(_0x2b600f['selector'],_0x2b600f['value']);}case _0x74c154(0xf3):{const {browserSnapshot:_0xd5a7b1}=await import(_0x74c154(0x17e));return _0xd5a7b1();}case _0x74c154(0xf5):{const {browserScreenshot:_0x3c8a64}=await import(_0x74c154(0x17e));return _0x3c8a64();}case _0x74c154(0xe7):{const {browserGetText:_0x35df9f}=await import(_0x74c154(0x17e));return _0x35df9f(_0x2b600f['selector']);}case'browser_close':{const {browserClose:_0x41b388}=await import(_0x74c154(0x17e));return _0x41b388();}default:return{'error':_0x74c154(0x133)+_0x4f3c1a};}}
@@ -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(_0x277973,_0x39f07d){const _0x4fb7bb=a5_0x46dd,_0x4e8199=_0x277973();while(!![]){try{const _0x4ed20b=-parseInt(_0x4fb7bb(0x18a))/0x1+parseInt(_0x4fb7bb(0x19d))/0x2*(parseInt(_0x4fb7bb(0x1a7))/0x3)+-parseInt(_0x4fb7bb(0x18d))/0x4+parseInt(_0x4fb7bb(0x1a6))/0x5*(parseInt(_0x4fb7bb(0x18f))/0x6)+parseInt(_0x4fb7bb(0x194))/0x7+parseInt(_0x4fb7bb(0x1a9))/0x8+-parseInt(_0x4fb7bb(0x18b))/0x9;if(_0x4ed20b===_0x39f07d)break;else _0x4e8199['push'](_0x4e8199['shift']());}catch(_0x11befa){_0x4e8199['push'](_0x4e8199['shift']());}}}(a5_0x2d10,0x31a18));import a5_0x39ed28 from'conf';import a5_0x131b54 from'path';import a5_0x39af7a from'fs';import{fileURLToPath}from'url';function a5_0x2d10(){const _0x6d45cf=['streamable-http','join','mcp.json','computer-use.ts','node','6914FsOsqJ','npx','utf-8','@modelcontextprotocol/server-filesystem','get','computer-use.js','windows-mcp','env','readFileSync','10NMdxUW','333fkTcrz','uvx','335952wPgppt','stdio','existsSync','src','.js','command','201697NjjFjK','1695924Bupdmp','dist','1100808dPlYyL','tsx','724674zNOlxJ','path','mcpServers','set','.woozlit','1409408DzQGdm','cwd','computer-use','USERPROFILE'];a5_0x2d10=function(){return _0x6d45cf;};return a5_0x2d10();}const config=new a5_0x39ed28({'projectName':'woozlit-cli','defaults':{'mcpServers':{}}});function a5_0x46dd(_0xbee3b8,_0x3a39e5){_0xbee3b8=_0xbee3b8-0x185;const _0x2d10fa=a5_0x2d10();let _0x46ddec=_0x2d10fa[_0xbee3b8];return _0x46ddec;}export function getMcpServers(){const _0x17de8f=a5_0x46dd,_0x15a11d=config[_0x17de8f(0x1a1)](_0x17de8f(0x191)),_0x42dfa4=loadMcpConfigFile();return{..._0x15a11d,..._0x42dfa4};}export function addMcpServer(_0x14ba44,_0x3a0dd1,_0x2fb26e=[],_0x1415b9){const _0x96494b=a5_0x46dd,_0x5861de=config[_0x96494b(0x1a1)](_0x96494b(0x191));_0x5861de[_0x14ba44]={'type':_0x96494b(0x185),'command':_0x3a0dd1,'args':_0x2fb26e,'env':_0x1415b9},config[_0x96494b(0x192)](_0x96494b(0x191),_0x5861de);}export function addMcpHttpServer(_0x9f10c3,_0x57be30){const _0x6fcca2=a5_0x46dd,_0x243770=config[_0x6fcca2(0x1a1)](_0x6fcca2(0x191));_0x243770[_0x9f10c3]={'type':_0x6fcca2(0x198),'url':_0x57be30},config[_0x6fcca2(0x192)](_0x6fcca2(0x191),_0x243770);}export function removeMcpServer(_0xb31c72){const _0x13edc8=a5_0x46dd,_0x4c218e=config[_0x13edc8(0x1a1)](_0x13edc8(0x191));if(_0x4c218e[_0xb31c72])return delete _0x4c218e[_0xb31c72],config[_0x13edc8(0x192)](_0x13edc8(0x191),_0x4c218e),!![];return![];}export function clearMcpServers(){const _0x57d794=a5_0x46dd;config[_0x57d794(0x192)]('mcpServers',{});}export function getMcpServer(_0xbeb578){return getMcpServers()[_0xbeb578];}function loadMcpConfigFile(){const _0x4b618b=a5_0x46dd,_0x1558ca=[a5_0x131b54[_0x4b618b(0x199)](process[_0x4b618b(0x195)](),_0x4b618b(0x19a)),a5_0x131b54['join'](process[_0x4b618b(0x195)](),_0x4b618b(0x193),_0x4b618b(0x19a)),a5_0x131b54[_0x4b618b(0x199)](process[_0x4b618b(0x1a4)]['HOME']||process['env'][_0x4b618b(0x197)]||'',_0x4b618b(0x193),_0x4b618b(0x19a))];for(const _0x3ab2cf of _0x1558ca){try{if(a5_0x39af7a[_0x4b618b(0x186)](_0x3ab2cf)){const _0x2db79e=a5_0x39af7a[_0x4b618b(0x1a5)](_0x3ab2cf,_0x4b618b(0x19f)),_0x277027=JSON['parse'](_0x2db79e);if(_0x277027['mcpServers']&&typeof _0x277027[_0x4b618b(0x191)]==='object')return _0x277027['mcpServers'];}}catch{}}return{};}export function ensureDefaultServers(){const _0x33cd33=a5_0x46dd,_0x4eeacd=config[_0x33cd33(0x1a1)](_0x33cd33(0x191)),_0x322955=fileURLToPath(import.meta.url),_0x3f2621=a5_0x131b54['dirname'](_0x322955),_0x587bf3=_0x3f2621['includes'](_0x33cd33(0x18c))||_0x322955['endsWith'](_0x33cd33(0x188)),_0x32e48b=_0x587bf3?a5_0x131b54[_0x33cd33(0x199)](_0x3f2621,'..','mcp-servers',_0x33cd33(0x1a2)):a5_0x131b54['join'](_0x3f2621,'..','..',_0x33cd33(0x187),'mcp-servers',_0x33cd33(0x19b)),_0x1195e9=_0x587bf3?_0x33cd33(0x19c):_0x33cd33(0x18e);_0x4eeacd[_0x33cd33(0x196)]={'type':_0x33cd33(0x185),'command':_0x1195e9,'args':[_0x32e48b],'env':{}},(!_0x4eeacd[_0x33cd33(0x1a3)]||_0x4eeacd[_0x33cd33(0x1a3)][_0x33cd33(0x189)]===_0x33cd33(0x1a8))&&(_0x4eeacd[_0x33cd33(0x1a3)]={'type':_0x33cd33(0x185),'command':_0x33cd33(0x19e),'args':['-y',_0x33cd33(0x1a0),'C:\x5cUsers'],'env':{}}),config[_0x33cd33(0x192)]('mcpServers',_0x4eeacd);}export function getConfigFilePath(){const _0x1f1ac8=a5_0x46dd;return config[_0x1f1ac8(0x190)];}
@@ -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
+ const a6_0x58eb7f=a6_0x42b5;function a6_0x42b5(_0x392f84,_0x317cb2){_0x392f84=_0x392f84-0x124;const _0x3f2c26=a6_0x3f2c();let _0x42b5b5=_0x3f2c26[_0x392f84];return _0x42b5b5;}(function(_0x547992,_0x2e9cd2){const _0x4f2d12=a6_0x42b5,_0x4cd3ae=_0x547992();while(!![]){try{const _0x24f5de=-parseInt(_0x4f2d12(0x12f))/0x1*(-parseInt(_0x4f2d12(0x137))/0x2)+parseInt(_0x4f2d12(0x12b))/0x3+parseInt(_0x4f2d12(0x136))/0x4+-parseInt(_0x4f2d12(0x130))/0x5*(-parseInt(_0x4f2d12(0x127))/0x6)+parseInt(_0x4f2d12(0x135))/0x7*(-parseInt(_0x4f2d12(0x152))/0x8)+parseInt(_0x4f2d12(0x12a))/0x9*(parseInt(_0x4f2d12(0x13a))/0xa)+-parseInt(_0x4f2d12(0x14c))/0xb*(parseInt(_0x4f2d12(0x142))/0xc);if(_0x24f5de===_0x2e9cd2)break;else _0x4cd3ae['push'](_0x4cd3ae['shift']());}catch(_0x3cc40b){_0x4cd3ae['push'](_0x4cd3ae['shift']());}}}(a6_0x3f2c,0x54c12));const API_URL=process[a6_0x58eb7f(0x12e)][a6_0x58eb7f(0x148)]||a6_0x58eb7f(0x140),PROD_URL=a6_0x58eb7f(0x140);export function getApiUrl(){return API_URL;}function a6_0x3f2c(){const _0x8d3618=['DeepSeek\x20V3','Mistral\x20Small\x203.2','moonshotai/kimi-k2','meta-llama/llama-4-maverick','7bZpnQB','2039656qvVuPV','509476IPNdrr','Latest\x20Mistral','qwen/qwen3-235b-a22b:free','10rXOgyX','NVIDIA\x20vision','mistralai/devstral-small','Reasoning\x20model','Qwen3\x20Coder','MiMo\x20V2','https://woozlit.com','Qwen3\x20235B','108tHLiCl','xiaomi/mimo-v2-flash:free','Xiaomi\x27s\x20fast\x20AI\x20model','Kimi\x20K2','Most\x20powerful\x20Gemini','Llama\x204\x20Maverick','WOOZLIT_API_URL','nvidia/nemotron-nano-12b-v2-vl:free','gemini-2.5-flash','Woozie','1730619cCxksE','Nemotron\x20Nano\x2012B','qwen/qwen3-coder:free','Coding\x20specialist','Meta\x27s\x20latest','deepseek/deepseek-chat','2495224tpDvGv','Llama\x203.3\x2070B','Gemini\x203\x20Flash','mistralai/mistral-small-3.2-24b-instruct','deepseek/deepseek-r1','150vVIPow','meta-llama/llama-3.3-70b-instruct:free','DeepSeek\x20R1','4982508xywPLY','284937UaLPPK','DeepSeek\x27s\x20latest\x20V3','Meta\x27s\x20powerful\x20model','env','1MoceZV','132355tyqKHZ'];a6_0x3f2c=function(){return _0x8d3618;};return a6_0x3f2c();}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':'gemini-2.5-flash','name':a6_0x58eb7f(0x14b),'description':'Fast\x20and\x20capable\x20(Default)','xp':0x1},{'id':'gemini-3-flash-preview','name':a6_0x58eb7f(0x124),'description':'Latest\x20Gemini\x203\x20model','xp':0x5},{'id':'gemini-3-pro-preview','name':'Gemini\x203\x20Pro','description':a6_0x58eb7f(0x146),'xp':0x5},{'id':a6_0x58eb7f(0x143),'name':a6_0x58eb7f(0x13f),'description':a6_0x58eb7f(0x144),'xp':0x1},{'id':a6_0x58eb7f(0x139),'name':a6_0x58eb7f(0x141),'description':'Alibaba\x27s\x20largest','xp':0x2},{'id':a6_0x58eb7f(0x14e),'name':a6_0x58eb7f(0x13e),'description':a6_0x58eb7f(0x14f),'xp':0x2},{'id':a6_0x58eb7f(0x128),'name':a6_0x58eb7f(0x153),'description':a6_0x58eb7f(0x12d),'xp':0x2},{'id':a6_0x58eb7f(0x134),'name':a6_0x58eb7f(0x147),'description':a6_0x58eb7f(0x150),'xp':0x3},{'id':a6_0x58eb7f(0x13c),'name':'Devstral\x20Small','description':'Developer-focused','xp':0x2},{'id':a6_0x58eb7f(0x125),'name':a6_0x58eb7f(0x132),'description':a6_0x58eb7f(0x138),'xp':0x2},{'id':a6_0x58eb7f(0x149),'name':a6_0x58eb7f(0x14d),'description':a6_0x58eb7f(0x13b),'xp':0x1},{'id':a6_0x58eb7f(0x133),'name':a6_0x58eb7f(0x145),'description':a6_0x58eb7f(0x13d),'xp':0x3},{'id':a6_0x58eb7f(0x151),'name':a6_0x58eb7f(0x131),'description':a6_0x58eb7f(0x12c),'xp':0x2},{'id':a6_0x58eb7f(0x126),'name':a6_0x58eb7f(0x129),'description':'Advanced\x20reasoning','xp':0x3}];export const DEFAULT_MODEL=a6_0x58eb7f(0x14a);
@@ -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(_0x59c57b,_0x3c295f){const _0x414f6e=a7_0xba0e,_0xd813b4=_0x59c57b();while(!![]){try{const _0x1b8d97=parseInt(_0x414f6e(0xa4))/0x1+-parseInt(_0x414f6e(0x94))/0x2+-parseInt(_0x414f6e(0x97))/0x3+parseInt(_0x414f6e(0x9e))/0x4*(parseInt(_0x414f6e(0xb1))/0x5)+-parseInt(_0x414f6e(0x99))/0x6+-parseInt(_0x414f6e(0xac))/0x7*(parseInt(_0x414f6e(0xa5))/0x8)+-parseInt(_0x414f6e(0x91))/0x9*(-parseInt(_0x414f6e(0x98))/0xa);if(_0x1b8d97===_0x3c295f)break;else _0xd813b4['push'](_0xd813b4['shift']());}catch(_0x4d34a6){_0xd813b4['push'](_0xd813b4['shift']());}}}(a7_0x1425,0x88189));function a7_0xba0e(_0x473067,_0x3db27f){_0x473067=_0x473067-0x86;const _0x142553=a7_0x1425();let _0xba0e7=_0x142553[_0x473067];return _0xba0e7;}function a7_0x1425(){const _0x4417c1=['get','getBotToken','author','[Discord]\x20Connected\x20as\x20','type','push','system','2247273gzGRbX','GuildMessages','Sorry,\x20I\x20encountered\x20an\x20error\x20processing\x20that.','57586hDfmCd','length','Guilds','2958852sxhfhb','90aqAXqB','2727390mCPJAI','info','mentions','ready','guildId','4RSNLRQ','match','channel','destroy','content','login','632143HQHssB','8jgbEGq','[Discord]\x20Error:\x20','set','bot','tag','message','has','6759074kYeVIl','success','channelId','[Discord]\x20Failed\x20to\x20start:\x20','username','566285iPoTqs','once','error','user','[Discord]\x20','reply'];a7_0x1425=function(){return _0x4417c1;};return a7_0x1425();}import{Client,GatewayIntentBits,ChannelType,Partials}from'discord.js';import*as a7_0x54937b from'./config.js';import*as a7_0x5186ad from'../ui/output.js';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 _0x43df78=a7_0xba0e,_0x408045=a7_0x54937b[_0x43df78(0x8b)]();if(!_0x408045)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits[_0x43df78(0x96)],GatewayIntentBits[_0x43df78(0x92)],GatewayIntentBits['MessageContent'],GatewayIntentBits['DirectMessages']],'partials':[Partials['Channel']]}),client[_0x43df78(0xb2)](_0x43df78(0x9c),()=>{const _0x46de00=_0x43df78;a7_0x5186ad[_0x46de00(0xad)](_0x46de00(0x8d)+client?.[_0x46de00(0x87)]?.[_0x46de00(0xa9)]),isRunning=!![];}),client['on']('messageCreate',async _0x152735=>{const _0x5c8974=_0x43df78;if(_0x152735[_0x5c8974(0x8c)][_0x5c8974(0xa8)])return;const _0x2580ff=_0x152735[_0x5c8974(0xa0)][_0x5c8974(0x8e)]===ChannelType['DM'],_0x44f3d8=client?.['user']&&_0x152735[_0x5c8974(0x9b)]['has'](client[_0x5c8974(0x87)]);if(!_0x2580ff&&!_0x44f3d8)return;await _0x152735[_0x5c8974(0xa0)]['sendTyping']()['catch'](()=>{});const _0x52458e=_0x152735[_0x5c8974(0x8c)]['id'],_0x2ef0f1=(_0x152735[_0x5c8974(0x9d)]||'dm')+'-'+_0x152735[_0x5c8974(0xae)]+'-'+_0x52458e;!chatHistories[_0x5c8974(0xab)](_0x2ef0f1)&&chatHistories[_0x5c8974(0xa7)](_0x2ef0f1,[{'role':_0x5c8974(0x90),'content':'You\x20are\x20Woozlit,\x20a\x20helpful\x20AI\x20assistant\x20connected\x20via\x20Discord.\x20Keep\x20responses\x20concise.'}]);const _0x293fb5=chatHistories[_0x5c8974(0x8a)](_0x2ef0f1),_0x1ff2e9=_0x152735[_0x5c8974(0xa2)]['replace'](/<@!?[0-9]+>/g,'')['trim']();if(!_0x1ff2e9)return;_0x293fb5[_0x5c8974(0x8f)]({'role':_0x5c8974(0x87),'content':_0x1ff2e9}),a7_0x5186ad[_0x5c8974(0x9a)](_0x5c8974(0x88)+_0x152735['author'][_0x5c8974(0xb0)]+':\x20'+_0x1ff2e9);const _0x27df50=getSelectedModel();try{let _0x580dd6='';const _0x576958=await sendChatMessage(_0x27df50,_0x293fb5,_0x4d8f3f=>{_0x580dd6+=_0x4d8f3f;});_0x580dd6=_0x576958[_0x5c8974(0xa2)],_0x293fb5['push']({'role':'assistant','content':_0x580dd6});if(_0x580dd6[_0x5c8974(0x95)]>0x7d0){const _0x5c8e45=_0x580dd6[_0x5c8974(0x9f)](/[\s\S]{1,2000}/g)||[];for(const _0xf29047 of _0x5c8e45){await _0x152735[_0x5c8974(0x89)](_0xf29047);}}else await _0x152735['reply'](_0x580dd6);}catch(_0x129aa2){a7_0x5186ad[_0x5c8974(0x86)](_0x5c8974(0xa6)+_0x129aa2[_0x5c8974(0xaa)]),await _0x152735[_0x5c8974(0x89)](_0x5c8974(0x93));}}),await client[_0x43df78(0xa3)](_0x408045),!![];}catch(_0x50ead){return a7_0x5186ad[_0x43df78(0x86)](_0x43df78(0xaf)+_0x50ead[_0x43df78(0xaa)]),![];}}export function stopBot(){const _0x3e1a6f=a7_0xba0e;client&&(client[_0x3e1a6f(0xa1)](),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_0x1eeaad=a8_0x393c;(function(_0x31676b,_0x1d01a5){const _0x298a07=a8_0x393c,_0x12639d=_0x31676b();while(!![]){try{const _0x495f33=-parseInt(_0x298a07(0x6a))/0x1*(-parseInt(_0x298a07(0x77))/0x2)+-parseInt(_0x298a07(0x6e))/0x3+parseInt(_0x298a07(0x85))/0x4*(parseInt(_0x298a07(0x82))/0x5)+parseInt(_0x298a07(0x73))/0x6*(parseInt(_0x298a07(0x7d))/0x7)+parseInt(_0x298a07(0x7a))/0x8+-parseInt(_0x298a07(0x84))/0x9*(-parseInt(_0x298a07(0x6f))/0xa)+-parseInt(_0x298a07(0x69))/0xb*(-parseInt(_0x298a07(0x74))/0xc);if(_0x495f33===_0x1d01a5)break;else _0x12639d['push'](_0x12639d['shift']());}catch(_0x5a715f){_0x12639d['push'](_0x12639d['shift']());}}}(a8_0x87d5,0xa7968));import a8_0x136647 from'conf';import a8_0x39e98e from'crypto';const config=new a8_0x136647({'projectName':a8_0x1eeaad(0x6d),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY='woozlit_discord_secure_key';function a8_0x393c(_0x52d714,_0x3685ab){_0x52d714=_0x52d714-0x69;const _0x87d5f8=a8_0x87d5();let _0x393ccc=_0x87d5f8[_0x52d714];return _0x393ccc;}function encrypt(_0x81ddae){const _0x1e9672=a8_0x1eeaad;if(!_0x81ddae)return'';const _0x5c3a7d=a8_0x39e98e[_0x1e9672(0x71)](0x10),_0x13f555=a8_0x39e98e['createHash'](_0x1e9672(0x7c))[_0x1e9672(0x76)](ENCRYPTION_KEY)[_0x1e9672(0x80)](),_0x44cb3d=a8_0x39e98e[_0x1e9672(0x75)]('aes-256-cbc',_0x13f555,_0x5c3a7d);let _0x6b1075=_0x44cb3d[_0x1e9672(0x76)](_0x81ddae,_0x1e9672(0x79),_0x1e9672(0x70));return _0x6b1075+=_0x44cb3d[_0x1e9672(0x78)](_0x1e9672(0x70)),_0x5c3a7d[_0x1e9672(0x83)]('hex')+':'+_0x6b1075;}function a8_0x87d5(){const _0x4fc896=['4205364xBrlCq','createCipheriv','update','11810gPftTv','final','utf8','767008iEgIfJ','clear','sha256','14AzktBQ','createHash','aes-256-cbc','digest','from','81815mflYye','toString','1878057kaLMjH','28TmaaOB','11hxDrnf','89xQffVV','set','botToken','woozlit-cli-discord','3049734jMmvLG','10AnLlqN','hex','randomBytes','get','1223808zesuDA'];a8_0x87d5=function(){return _0x4fc896;};return a8_0x87d5();}function decrypt(_0x1ac558){const _0x46f11a=a8_0x1eeaad;if(!_0x1ac558)return'';try{const [_0x3e0e21,_0x4bf72a]=_0x1ac558['split'](':');if(!_0x3e0e21||!_0x4bf72a)return'';const _0x38567f=Buffer[_0x46f11a(0x81)](_0x3e0e21,_0x46f11a(0x70)),_0xbe0714=a8_0x39e98e[_0x46f11a(0x7e)](_0x46f11a(0x7c))[_0x46f11a(0x76)](ENCRYPTION_KEY)['digest'](),_0x1a8b51=a8_0x39e98e['createDecipheriv'](_0x46f11a(0x7f),_0xbe0714,_0x38567f);let _0xdd4cfd=_0x1a8b51[_0x46f11a(0x76)](_0x4bf72a,'hex',_0x46f11a(0x79));return _0xdd4cfd+=_0x1a8b51[_0x46f11a(0x78)](_0x46f11a(0x79)),_0xdd4cfd;}catch{return'';}}export function setBotToken(_0x31da24){const _0x170fd5=a8_0x1eeaad;config[_0x170fd5(0x6b)](_0x170fd5(0x6c),encrypt(_0x31da24));}export function getBotToken(){const _0x52bf99=a8_0x1eeaad;return decrypt(config[_0x52bf99(0x72)](_0x52bf99(0x6c)));}export function isEnabled(){return!!getBotToken();}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x1f2571=a8_0x1eeaad;config[_0x1f2571(0x7b)]();}
@@ -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(_0x93424e,_0x3b3d83){var _0x2028f5=a9_0x4e99,_0x1e3aa9=_0x93424e();while(!![]){try{var _0x2f56e0=-parseInt(_0x2028f5(0xd6))/0x1+parseInt(_0x2028f5(0xd8))/0x2*(-parseInt(_0x2028f5(0xd4))/0x3)+-parseInt(_0x2028f5(0xd7))/0x4*(-parseInt(_0x2028f5(0xd1))/0x5)+parseInt(_0x2028f5(0xda))/0x6+parseInt(_0x2028f5(0xd5))/0x7*(-parseInt(_0x2028f5(0xd0))/0x8)+-parseInt(_0x2028f5(0xd9))/0x9+-parseInt(_0x2028f5(0xd2))/0xa*(-parseInt(_0x2028f5(0xd3))/0xb);if(_0x2f56e0===_0x3b3d83)break;else _0x1e3aa9['push'](_0x1e3aa9['shift']());}catch(_0x47447d){_0x1e3aa9['push'](_0x1e3aa9['shift']());}}}(a9_0x205c,0x21b78));function a9_0x4e99(_0x5143dc,_0x598d10){_0x5143dc=_0x5143dc-0xd0;var _0x205c92=a9_0x205c();var _0x4e9953=_0x205c92[_0x5143dc];return _0x4e9953;}export*from'./config.js';function a9_0x205c(){var _0x46c9a0=['144440UdwYkd','4165stYRtC','20tphLTJ','1956262dZVvMW','45813PeAQGs','7hhHLCl','213032ulfjxq','424dJUVOx','6rcUeEu','1555947hDraPZ','863430htyTnO'];a9_0x205c=function(){return _0x46c9a0;};return a9_0x205c();}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(_0x298cc0,_0x277006){const _0x37ae7c=a10_0x304a,_0x663b36=_0x298cc0();while(!![]){try{const _0x5653cc=parseInt(_0x37ae7c(0x102))/0x1+-parseInt(_0x37ae7c(0xfa))/0x2+parseInt(_0x37ae7c(0xf6))/0x3*(parseInt(_0x37ae7c(0x105))/0x4)+parseInt(_0x37ae7c(0xf8))/0x5+parseInt(_0x37ae7c(0x104))/0x6+-parseInt(_0x37ae7c(0xff))/0x7*(-parseInt(_0x37ae7c(0x103))/0x8)+-parseInt(_0x37ae7c(0xf5))/0x9;if(_0x5653cc===_0x277006)break;else _0x663b36['push'](_0x663b36['shift']());}catch(_0x502c71){_0x663b36['push'](_0x663b36['shift']());}}}(a10_0x53c6,0xc4be9));function a10_0x304a(_0x3b0333,_0xbf5ec3){_0x3b0333=_0x3b0333-0xf5;const _0x53c6aa=a10_0x53c6();let _0x304a42=_0x53c6aa[_0x3b0333];return _0x304a42;}import{input}from'@inquirer/prompts';import*as a10_0x43c108 from'./config.js';function a10_0x53c6(){const _0x1269b5=['setBotToken','Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','1456791AYfaNF','79096kFWXSO','7586982yEquvN','134580rgmQMU','Bot\x20Token:','24808914ZkVYve','105VIWLoG','You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.','1180575AleRZt','dim','1283552QrSUfB','length','info','success','Setup\x20Woozlit\x20Discord\x20Bot','49JuHQXJ'];a10_0x53c6=function(){return _0x1269b5;};return a10_0x53c6();}import*as a10_0x4a5821 from'../ui/output.js';export async function setupDiscord(){const _0xd5a918=a10_0x304a;a10_0x4a5821['info'](_0xd5a918(0xfe)),a10_0x4a5821[_0xd5a918(0xf9)](_0xd5a918(0xf7));const _0x211659=await input({'message':_0xd5a918(0x106),'validate':_0x2e5c33=>_0x2e5c33[_0xd5a918(0xfb)]>0xa?!![]:'Token\x20seems\x20too\x20short'}),_0x459915=await input({'message':_0xd5a918(0x101),'default':'!'});a10_0x43c108[_0xd5a918(0x100)](_0x211659),a10_0x4a5821[_0xd5a918(0xfd)]('Discord\x20configuration\x20saved!'),a10_0x4a5821[_0xd5a918(0xfc)]('Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.');}
@@ -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_0x5669a6=a11_0x1e20;(function(_0x558caa,_0x2a0a3c){const _0x5a3776=a11_0x1e20,_0x2b213e=_0x558caa();while(!![]){try{const _0x407582=-parseInt(_0x5a3776(0x14f))/0x1+parseInt(_0x5a3776(0x150))/0x2*(-parseInt(_0x5a3776(0x15b))/0x3)+parseInt(_0x5a3776(0x174))/0x4*(-parseInt(_0x5a3776(0x16d))/0x5)+parseInt(_0x5a3776(0x167))/0x6*(parseInt(_0x5a3776(0x168))/0x7)+parseInt(_0x5a3776(0x15c))/0x8*(parseInt(_0x5a3776(0x154))/0x9)+parseInt(_0x5a3776(0x162))/0xa*(-parseInt(_0x5a3776(0x157))/0xb)+parseInt(_0x5a3776(0x14d))/0xc;if(_0x407582===_0x2a0a3c)break;else _0x2b213e['push'](_0x2b213e['shift']());}catch(_0x397694){_0x2b213e['push'](_0x2b213e['shift']());}}}(a11_0x5a69,0xdb0af));import a11_0x4d72dc from'conf';function a11_0x5a69(){const _0x11a4d2=['checkInterval','hex','34988ecHokY','imapHost','smtp.gmail.com','get','12275880mpomkY','toString','585437mwakpy','16pkQYVY','final','imapUser','from','9IdTTCU','smtpHost','digest','2298241dkpTdL','imap','createHash','smtpPort','320259LGmWch','13185328beEVBH','imapPort','utf8','smtpPass','allowedSenders','push','50qrBmZz','includes','smtpUser','imap.gmail.com','imapPass','71892hlBURl','931xApCwR','enabled','update','split','sha256','505dpnwOi','createDecipheriv','aes-256-cbc','set','randomBytes'];a11_0x5a69=function(){return _0x11a4d2;};return a11_0x5a69();}import a11_0x34d879 from'crypto';const config=new a11_0x4d72dc({'projectName':'woozlit-cli-email','defaults':{'imapHost':a11_0x5669a6(0x165),'imapPort':0x3e1,'imapUser':'','imapPass':'','smtpHost':a11_0x5669a6(0x176),'smtpPort':0x24b,'smtpUser':'','smtpPass':'','checkInterval':0x5,'allowedSenders':[],'enabled':![]}}),ENCRYPTION_KEY='woozlit_email_secure_key';function encrypt(_0x30f4ec){const _0x1fcd0a=a11_0x5669a6;if(!_0x30f4ec)return'';const _0x258a94=a11_0x34d879[_0x1fcd0a(0x171)](0x10),_0x343a5a=a11_0x34d879[_0x1fcd0a(0x159)]('sha256')[_0x1fcd0a(0x16a)](ENCRYPTION_KEY)[_0x1fcd0a(0x156)](),_0x87a9dd=a11_0x34d879['createCipheriv'](_0x1fcd0a(0x16f),_0x343a5a,_0x258a94);let _0x2ef523=_0x87a9dd[_0x1fcd0a(0x16a)](_0x30f4ec,'utf8',_0x1fcd0a(0x173));return _0x2ef523+=_0x87a9dd[_0x1fcd0a(0x151)](_0x1fcd0a(0x173)),_0x258a94[_0x1fcd0a(0x14e)](_0x1fcd0a(0x173))+':'+_0x2ef523;}function decrypt(_0x492254){const _0x4bf694=a11_0x5669a6;if(!_0x492254)return'';try{const [_0x439eaa,_0x3bd34a]=_0x492254[_0x4bf694(0x16b)](':');if(!_0x439eaa||!_0x3bd34a)return'';const _0x53eadf=Buffer[_0x4bf694(0x153)](_0x439eaa,_0x4bf694(0x173)),_0x116839=a11_0x34d879[_0x4bf694(0x159)](_0x4bf694(0x16c))['update'](ENCRYPTION_KEY)[_0x4bf694(0x156)](),_0x3e663f=a11_0x34d879[_0x4bf694(0x16e)](_0x4bf694(0x16f),_0x116839,_0x53eadf);let _0x486560=_0x3e663f[_0x4bf694(0x16a)](_0x3bd34a,_0x4bf694(0x173),_0x4bf694(0x15e));return _0x486560+=_0x3e663f[_0x4bf694(0x151)](_0x4bf694(0x15e)),_0x486560;}catch{return'';}}function a11_0x1e20(_0x115895,_0xb72aa6){_0x115895=_0x115895-0x14c;const _0x5a6934=a11_0x5a69();let _0x1e20dd=_0x5a6934[_0x115895];return _0x1e20dd;}export function setCredentials(_0x132177,_0x4a4658,_0x284d05,_0x40fae9){const _0x375593=a11_0x5669a6;config[_0x375593(0x170)](_0x375593(0x152),_0x132177),config[_0x375593(0x170)]('imapPass',encrypt(_0x4a4658)),config['set'](_0x375593(0x164),_0x132177),config[_0x375593(0x170)]('smtpPass',encrypt(_0x4a4658));if(_0x284d05)config[_0x375593(0x170)](_0x375593(0x175),_0x284d05);}export function getConfig(){const _0x47dc4b=a11_0x5669a6;return{'imap':{'user':config[_0x47dc4b(0x14c)]('imapUser'),'password':decrypt(config[_0x47dc4b(0x14c)](_0x47dc4b(0x166))),'host':config[_0x47dc4b(0x14c)](_0x47dc4b(0x175)),'port':config[_0x47dc4b(0x14c)](_0x47dc4b(0x15d)),'tls':!![],'tlsOptions':{'rejectUnauthorized':![]},'authTimeout':0xbb8},'smtp':{'host':config[_0x47dc4b(0x14c)](_0x47dc4b(0x155)),'port':config['get'](_0x47dc4b(0x15a)),'auth':{'user':config[_0x47dc4b(0x14c)]('smtpUser'),'pass':decrypt(config[_0x47dc4b(0x14c)](_0x47dc4b(0x15f)))},'tls':{'rejectUnauthorized':![]}},'interval':config[_0x47dc4b(0x14c)](_0x47dc4b(0x172)),'allowedSenders':config['get'](_0x47dc4b(0x160))||[],'enabled':config['get']('enabled')};}export function isConfigured(){const _0x42ee1a=a11_0x5669a6,_0x5803cf=getConfig();return!!_0x5803cf[_0x42ee1a(0x158)]['user']&&!!_0x5803cf[_0x42ee1a(0x158)]['password'];}export function setEnabled(_0x428804){const _0x59e2a7=a11_0x5669a6;config[_0x59e2a7(0x170)](_0x59e2a7(0x169),_0x428804);}export function addAllowedSender(_0x226e2a){const _0x2b973a=a11_0x5669a6,_0x2e1826=config['get'](_0x2b973a(0x160))||[];!_0x2e1826[_0x2b973a(0x163)](_0x226e2a)&&(_0x2e1826[_0x2b973a(0x161)](_0x226e2a),config['set'](_0x2b973a(0x160),_0x2e1826));}
@@ -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(_0x2b2471,_0x933d1){var _0x29514f=a12_0x2377,_0x5b7de6=_0x2b2471();while(!![]){try{var _0x1912a5=parseInt(_0x29514f(0x16b))/0x1+parseInt(_0x29514f(0x16c))/0x2+-parseInt(_0x29514f(0x16d))/0x3*(-parseInt(_0x29514f(0x16e))/0x4)+parseInt(_0x29514f(0x170))/0x5+parseInt(_0x29514f(0x171))/0x6*(-parseInt(_0x29514f(0x16f))/0x7)+-parseInt(_0x29514f(0x169))/0x8+-parseInt(_0x29514f(0x16a))/0x9;if(_0x1912a5===_0x933d1)break;else _0x5b7de6['push'](_0x5b7de6['shift']());}catch(_0x1b8726){_0x5b7de6['push'](_0x5b7de6['shift']());}}}(a12_0x4bb4,0xf3b99));export*from'./config.js';function a12_0x2377(_0x930ef5,_0x35ca71){_0x930ef5=_0x930ef5-0x169;var _0x4bb44f=a12_0x4bb4();var _0x2377ae=_0x4bb44f[_0x930ef5];return _0x2377ae;}export{startBot,stopBot,isBotRunning}from'./service.js';function a12_0x4bb4(){var _0x141e31=['6392275MAXoNW','30PFnNaz','6854520tEvEMc','21561795qISJUp','849927uTTnZW','2526678aEGjcf','3839883pNEdHq','4JjAIdG','589141TetNui'];a12_0x4bb4=function(){return _0x141e31;};return a12_0x4bb4();}export{setupEmail}from'./setup.js';
@@ -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(_0x42c14e,_0xc427){const _0x8b96d=a13_0x3a71,_0x451718=_0x42c14e();while(!![]){try{const _0x595ae7=-parseInt(_0x8b96d(0x120))/0x1*(-parseInt(_0x8b96d(0x117))/0x2)+parseInt(_0x8b96d(0x10a))/0x3+-parseInt(_0x8b96d(0x116))/0x4*(-parseInt(_0x8b96d(0x11b))/0x5)+parseInt(_0x8b96d(0x125))/0x6*(parseInt(_0x8b96d(0x10d))/0x7)+-parseInt(_0x8b96d(0x10b))/0x8+-parseInt(_0x8b96d(0x12f))/0x9+-parseInt(_0x8b96d(0x112))/0xa*(parseInt(_0x8b96d(0x128))/0xb);if(_0x595ae7===_0xc427)break;else _0x451718['push'](_0x451718['shift']());}catch(_0x4b6a7f){_0x451718['push'](_0x451718['shift']());}}}(a13_0x431e,0x6ac1b));import a13_0x4fa2e7 from'imap-simple';import a13_0x19287c from'nodemailer';import*as a13_0x14d69d from'./config.js';import*as a13_0x2ac998 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';function a13_0x3a71(_0x3266f8,_0x36c93f){_0x3266f8=_0x3266f8-0x101;const _0x431e23=a13_0x431e();let _0x3a71a6=_0x431e23[_0x3266f8];return _0x3a71a6;}import{sendChatMessage}from'../utils/api.js';function a13_0x431e(){const _0x397e86=['No\x20Subject','subject','\x20|\x20Subj:\x20','UNSEEN','495559UYoPis','dim','length','auth',':\x0aSubject:\x20','1560PnmeNa','\x20(not\x20allowed)','createTransport','1175416XXdblJ','[Email]\x20Found\x20','You\x20received\x20an\x20email\x20from\x20','from','search','imap','\x20new\x20messages','7355376HoIIPY','info','allowedSenders','which','match','NODE_TLS_REJECT_UNAUTHORIZED','sendMail','Re:\x20','body','includes','isConfigured','success','1492563xBQvXX','1404000EmVykm','parts','18354gWPjYR','interval','TEXT','smtp','openBox','90ukVGge','\x0aBody:\x0a','end','[Email]\x20Reply\x20sent\x20to\x20','955924FhqfTa','2zjThDM','user','error','find','15QzOaMz'];a13_0x431e=function(){return _0x397e86;};return a13_0x431e();}let intervalId=null,isRunning=![];async function checkEmails(){const _0x237a3e=a13_0x3a71,_0x2878ee=a13_0x14d69d['getConfig']();try{const _0x296f93=await a13_0x4fa2e7['connect']({'imap':_0x2878ee[_0x237a3e(0x12d)]});await _0x296f93[_0x237a3e(0x111)]('INBOX');const _0x2a0604=[_0x237a3e(0x11f)],_0x9e3723={'bodies':['HEADER',_0x237a3e(0x10f)],'markSeen':!![]},_0x440476=await _0x296f93[_0x237a3e(0x12c)](_0x2a0604,_0x9e3723);_0x440476[_0x237a3e(0x122)]>0x0&&a13_0x2ac998[_0x237a3e(0x130)](_0x237a3e(0x129)+_0x440476[_0x237a3e(0x122)]+_0x237a3e(0x12e));for(const _0x5eb4ef of _0x440476){const _0xc9989=_0x5eb4ef[_0x237a3e(0x10c)]['find'](_0x4cf744=>_0x4cf744[_0x237a3e(0x101)]==='HEADER'),_0x250c03=_0xc9989['body'][_0x237a3e(0x12b)]?.[0x0]||'',_0x11c2d0=_0xc9989['body'][_0x237a3e(0x11d)]?.[0x0]||_0x237a3e(0x11c);if(_0x2878ee[_0x237a3e(0x131)][_0x237a3e(0x122)]>0x0){const _0x181671=_0x250c03[_0x237a3e(0x102)](/<(.+)>/)?.[0x1]||_0x250c03;if(!_0x2878ee[_0x237a3e(0x131)][_0x237a3e(0x107)](_0x181671)){a13_0x2ac998[_0x237a3e(0x121)]('[Email]\x20Ignored\x20mail\x20from\x20'+_0x250c03+_0x237a3e(0x126));continue;}}const _0x18e85a=_0x5eb4ef[_0x237a3e(0x10c)][_0x237a3e(0x11a)](_0x1398ed=>_0x1398ed[_0x237a3e(0x101)]===_0x237a3e(0x10f)),_0x240752=_0x18e85a?.[_0x237a3e(0x106)]||'';a13_0x2ac998[_0x237a3e(0x130)]('[Email]\x20From:\x20'+_0x250c03+_0x237a3e(0x11e)+_0x11c2d0);try{const _0x50803a=_0x237a3e(0x12a)+_0x250c03+_0x237a3e(0x124)+_0x11c2d0+_0x237a3e(0x113)+_0x240752+'\x0a\x0aDraft\x20a\x20helpful\x20reply.\x20Structure\x20it\x20clearly.',_0x1af120=await sendChatMessage(getSelectedModel(),[{'role':_0x237a3e(0x118),'content':_0x50803a}]),_0x509993=a13_0x19287c[_0x237a3e(0x127)](_0x2878ee[_0x237a3e(0x110)]);await _0x509993[_0x237a3e(0x104)]({'from':_0x2878ee[_0x237a3e(0x110)][_0x237a3e(0x123)][_0x237a3e(0x118)],'to':_0x250c03,'subject':_0x237a3e(0x105)+_0x11c2d0,'text':_0x1af120['content']}),a13_0x2ac998[_0x237a3e(0x109)](_0x237a3e(0x115)+_0x250c03);}catch(_0x321635){a13_0x2ac998[_0x237a3e(0x119)]('[Email]\x20Processing/Reply\x20error:\x20'+_0x321635['message']);}}_0x296f93[_0x237a3e(0x114)]();}catch(_0x204b74){}}export async function startBot(){const _0xa235d4=a13_0x3a71;if(!a13_0x14d69d[_0xa235d4(0x108)]())return![];if(isRunning)return!![];process['env'][_0xa235d4(0x103)]='0',checkEmails();const _0x21a5b7=a13_0x14d69d['getConfig']()[_0xa235d4(0x10e)]||0x5;return intervalId=setInterval(checkEmails,_0x21a5b7*0x3c*0x3e8),isRunning=!![],!![];}export function stopBot(){intervalId&&(clearInterval(intervalId),intervalId=null),isRunning=![];}export function isBotRunning(){return isRunning;}export{isConfigured}from'./config.js';