woozlit 2.1.2 → 2.1.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 (66) 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/notifications.d.ts +4 -0
  25. package/dist/services/notifications.js +1 -0
  26. package/dist/services/voice-agent.js +1 -1
  27. package/dist/telegram/bot.js +1 -1
  28. package/dist/telegram/config.js +1 -1
  29. package/dist/telegram/index.js +1 -1
  30. package/dist/telegram/reminders.js +1 -1
  31. package/dist/telegram/setup.js +1 -1
  32. package/dist/tools/command.js +1 -1
  33. package/dist/tools/file.d.ts +28 -0
  34. package/dist/tools/file.js +1 -1
  35. package/dist/tools/git.d.ts +30 -0
  36. package/dist/tools/git.js +1 -0
  37. package/dist/tools/index.d.ts +5 -1
  38. package/dist/tools/index.js +1 -1
  39. package/dist/tools/mcp.js +1 -1
  40. package/dist/tools/network.d.ts +10 -0
  41. package/dist/tools/network.js +1 -0
  42. package/dist/tools/project.d.ts +54 -0
  43. package/dist/tools/project.js +1 -0
  44. package/dist/tools/rollback.js +1 -1
  45. package/dist/tools/rules.js +1 -1
  46. package/dist/tools/system.d.ts +33 -0
  47. package/dist/tools/system.js +1 -0
  48. package/dist/twilio/config.js +1 -1
  49. package/dist/twilio/index.js +1 -1
  50. package/dist/twilio/server.js +1 -1
  51. package/dist/twilio/setup.js +1 -1
  52. package/dist/ui/output.js +1 -1
  53. package/dist/ui/select.js +1 -1
  54. package/dist/ui/themes.d.ts +13 -0
  55. package/dist/ui/themes.js +1 -1
  56. package/dist/utils/api.js +1 -1
  57. package/dist/utils/chat-history.js +1 -1
  58. package/dist/utils/history.js +1 -1
  59. package/dist/utils/mcp-installer.js +1 -1
  60. package/dist/utils/platform.js +1 -1
  61. package/dist/utils/storage.js +1 -1
  62. package/dist/utils/update-check.js +1 -1
  63. package/dist/utils/updater.d.ts +2 -0
  64. package/dist/utils/updater.js +1 -0
  65. package/dist/verify_repro.js +1 -1
  66. package/package.json +2 -1
@@ -1 +1 @@
1
- (function(_0x4645e1,_0x46e734){const _0x5c600a=a0_0x5249,_0x568023=_0x4645e1();while(!![]){try{const _0x52ec6d=-parseInt(_0x5c600a(0x1a8))/0x1*(parseInt(_0x5c600a(0x1a0))/0x2)+parseInt(_0x5c600a(0x1a4))/0x3+parseInt(_0x5c600a(0x195))/0x4*(parseInt(_0x5c600a(0x1a2))/0x5)+parseInt(_0x5c600a(0x1ac))/0x6+-parseInt(_0x5c600a(0x1ad))/0x7*(parseInt(_0x5c600a(0x1a5))/0x8)+parseInt(_0x5c600a(0x192))/0x9*(parseInt(_0x5c600a(0x19b))/0xa)+parseInt(_0x5c600a(0x193))/0xb*(parseInt(_0x5c600a(0x1a7))/0xc);if(_0x52ec6d===_0x46e734)break;else _0x568023['push'](_0x568023['shift']());}catch(_0x394363){_0x568023['push'](_0x568023['shift']());}}}(a0_0x1691,0x26296));import a0_0x488a40 from'open';import{createServer}from'http';function a0_0x1691(){const _0x5808d2=['520539XFIBFU','29360ZhkGzC','http://localhost:','71088ztcQCS','279298ZlbeJq','userId','writeHead','close','1516104SgzzNi','511DPGomA','get','url','33021iuaHoO','374THmMbw','text/html','215564lctZNq','/callback','listen','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<title>Woozlit\x20CLI</title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-family:\x20system-ui,\x20-apple-system,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#0a0a0a;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#fff;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.container\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x202rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20h1\x20{\x20color:\x20#10b981;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20p\x20{\x20color:\x20#9ca3af;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1>Login\x20Successful</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','email','token','60nedluH','end','displayName','pathname','\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','2CmDLrk','/auth/cli?callback=http://localhost:','5VdroOm','searchParams'];a0_0x1691=function(){return _0x5808d2;};return a0_0x1691();}import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x3a0cc0}from'../utils/storage.js';export async function login(){const _0x3aac10=getApiUrl(),_0x45f2e3=0x2694;return new Promise(_0x281e54=>{const _0x4f3272=a0_0x5249,_0x1b885d=createServer(async(_0x14c8fe,_0x24b6fa)=>{const _0x2e3ecb=a0_0x5249,_0x12276a=new URL(_0x14c8fe[_0x2e3ecb(0x191)]||'',_0x2e3ecb(0x1a6)+_0x45f2e3);if(_0x12276a[_0x2e3ecb(0x19e)]==='/callback'){const _0x28918f=_0x12276a[_0x2e3ecb(0x1a3)][_0x2e3ecb(0x190)](_0x2e3ecb(0x19a)),_0x2e4d6d=_0x12276a['searchParams'][_0x2e3ecb(0x190)](_0x2e3ecb(0x1a9)),_0x2db03f=_0x12276a['searchParams'][_0x2e3ecb(0x190)](_0x2e3ecb(0x199)),_0xb2f243=_0x12276a[_0x2e3ecb(0x1a3)][_0x2e3ecb(0x190)](_0x2e3ecb(0x19d));_0x28918f&&_0x2e4d6d?(setToken(_0x28918f),setUser(_0x2e4d6d,_0x2db03f||'',_0xb2f243||''),_0x24b6fa[_0x2e3ecb(0x1aa)](0xc8,{'Content-Type':_0x2e3ecb(0x194)}),_0x24b6fa[_0x2e3ecb(0x19c)](_0x2e3ecb(0x198)),_0x1b885d[_0x2e3ecb(0x1ab)](),_0x281e54(!![])):(_0x24b6fa[_0x2e3ecb(0x1aa)](0x190,{'Content-Type':_0x2e3ecb(0x194)}),_0x24b6fa[_0x2e3ecb(0x19c)](_0x2e3ecb(0x19f)),_0x1b885d['close'](),_0x281e54(![]));}});_0x1b885d[_0x4f3272(0x197)](_0x45f2e3,()=>{const _0x3e22c2=_0x4f3272,_0x4256d2=_0x3aac10+_0x3e22c2(0x1a1)+_0x45f2e3+_0x3e22c2(0x196);a0_0x488a40(_0x4256d2);}),setTimeout(()=>{_0x1b885d['close'](),_0x281e54(![]);},0x1d4c0);});}function a0_0x5249(_0x4ffd2b,_0x3d0cad){_0x4ffd2b=_0x4ffd2b-0x190;const _0x1691df=a0_0x1691();let _0x52498d=_0x1691df[_0x4ffd2b];return _0x52498d;}export function logout(){a0_0x3a0cc0();}export{isLoggedIn};
1
+ function a0_0x5b2f(){const _0x3965fa=['searchParams','126840GSYnMu','end','/callback','close','1500443zVYDhS','listen','get','email','pathname','2727052gofJeL','displayName','writeHead','4487451SlRbnv','7421250QQOENJ','text/html','userId','http://localhost:','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<title>Woozlit\x20CLI</title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-family:\x20system-ui,\x20-apple-system,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#0a0a0a;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#fff;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.container\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x202rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20h1\x20{\x20color:\x20#10b981;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20p\x20{\x20color:\x20#9ca3af;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1>Login\x20Successful</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','4303910lvlGSO','url','9077019CrfWIO'];a0_0x5b2f=function(){return _0x3965fa;};return a0_0x5b2f();}(function(_0x51678b,_0x33bcff){const _0x3e4549=a0_0x3605,_0x2c07ef=_0x51678b();while(!![]){try{const _0x462362=parseInt(_0x3e4549(0x1cd))/0x1+parseInt(_0x3e4549(0x1d2))/0x2+parseInt(_0x3e4549(0x1d5))/0x3+parseInt(_0x3e4549(0x1c9))/0x4+-parseInt(_0x3e4549(0x1db))/0x5+-parseInt(_0x3e4549(0x1d6))/0x6+-parseInt(_0x3e4549(0x1c7))/0x7;if(_0x462362===_0x33bcff)break;else _0x2c07ef['push'](_0x2c07ef['shift']());}catch(_0x477ed3){_0x2c07ef['push'](_0x2c07ef['shift']());}}}(a0_0x5b2f,0xf3702));import a0_0x15c413 from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x230ff6}from'../utils/storage.js';export async function login(){const _0x1b3c77=getApiUrl(),_0x2f67bd=0x2694;return new Promise(_0x1fc115=>{const _0x23173a=a0_0x3605,_0x4e337b=createServer(async(_0x10aea2,_0x147ef5)=>{const _0x3b2aea=a0_0x3605,_0x1032c2=new URL(_0x10aea2[_0x3b2aea(0x1dc)]||'',_0x3b2aea(0x1d9)+_0x2f67bd);if(_0x1032c2[_0x3b2aea(0x1d1)]===_0x3b2aea(0x1cb)){const _0x261d0a=_0x1032c2[_0x3b2aea(0x1c8)][_0x3b2aea(0x1cf)]('token'),_0x3bab9d=_0x1032c2[_0x3b2aea(0x1c8)][_0x3b2aea(0x1cf)](_0x3b2aea(0x1d8)),_0x33cebf=_0x1032c2[_0x3b2aea(0x1c8)]['get'](_0x3b2aea(0x1d0)),_0x2e7662=_0x1032c2[_0x3b2aea(0x1c8)][_0x3b2aea(0x1cf)](_0x3b2aea(0x1d3));_0x261d0a&&_0x3bab9d?(setToken(_0x261d0a),setUser(_0x3bab9d,_0x33cebf||'',_0x2e7662||''),_0x147ef5[_0x3b2aea(0x1d4)](0xc8,{'Content-Type':_0x3b2aea(0x1d7)}),_0x147ef5[_0x3b2aea(0x1ca)](_0x3b2aea(0x1da)),_0x4e337b[_0x3b2aea(0x1cc)](),_0x1fc115(!![])):(_0x147ef5[_0x3b2aea(0x1d4)](0x190,{'Content-Type':'text/html'}),_0x147ef5[_0x3b2aea(0x1ca)]('\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'),_0x4e337b[_0x3b2aea(0x1cc)](),_0x1fc115(![]));}});_0x4e337b[_0x23173a(0x1ce)](_0x2f67bd,()=>{const _0x4d1e3b=_0x23173a,_0x2a13bb=_0x1b3c77+'/auth/cli?callback=http://localhost:'+_0x2f67bd+_0x4d1e3b(0x1cb);a0_0x15c413(_0x2a13bb);}),setTimeout(()=>{const _0x5d6f68=_0x23173a;_0x4e337b[_0x5d6f68(0x1cc)](),_0x1fc115(![]);},0x1d4c0);});}export function logout(){a0_0x230ff6();}function a0_0x3605(_0x5915f5,_0xb0356b){_0x5915f5=_0x5915f5-0x1c7;const _0x5b2f2d=a0_0x5b2f();let _0x36054e=_0x5b2f2d[_0x5915f5];return _0x36054e;}export{isLoggedIn};
@@ -1 +1 @@
1
- function a1_0x40d3(){const _0x28dc18=['query','17370490fLnUuB','object','Direction\x20to\x20scroll','Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)','browser_click','161949nDvpxQ','225KeTsst','5575710VDNTzb','1847562bNSkbr','12tTXgiS','CSS\x20selector\x20for\x20the\x20element','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','string','Fill\x20a\x20form\x20field\x20or\x20input\x20element','Text\x20to\x20fill','9MpxZOA','2369646MnnEtZ','down','8427376pwTaFe','85588QhLxxH','tabId','browser_fill','bottom','Tab\x20ID','number'];a1_0x40d3=function(){return _0x28dc18;};return a1_0x40d3();}const a1_0x46d111=a1_0x1bb8;(function(_0x29564c,_0x36387b){const _0x3b4a81=a1_0x1bb8,_0x1ed3af=_0x29564c();while(!![]){try{const _0x44c71c=parseInt(_0x3b4a81(0x12b))/0x1*(parseInt(_0x3b4a81(0x12f))/0x2)+-parseInt(_0x3b4a81(0x11c))/0x3+-parseInt(_0x3b4a81(0x11f))/0x4*(parseInt(_0x3b4a81(0x12c))/0x5)+-parseInt(_0x3b4a81(0x12e))/0x6+-parseInt(_0x3b4a81(0x12d))/0x7+parseInt(_0x3b4a81(0x11e))/0x8*(parseInt(_0x3b4a81(0x11b))/0x9)+parseInt(_0x3b4a81(0x126))/0xa;if(_0x44c71c===_0x36387b)break;else _0x1ed3af['push'](_0x1ed3af['shift']());}catch(_0x6102ac){_0x1ed3af['push'](_0x1ed3af['shift']());}}}(a1_0x40d3,0xdcf01));export*from'./server.js';export*from'./tools.js';function a1_0x1bb8(_0x38385e,_0x172a25){_0x38385e=_0x38385e-0x118;const _0x40d34b=a1_0x40d3();let _0x1bb8ba=_0x40d34b[_0x38385e];return _0x1bb8ba;}export*from'./server.js';export*from'./tools.js';export const tools=[{'name':a1_0x46d111(0x121),'description':a1_0x46d111(0x119),'input_schema':{'type':a1_0x46d111(0x127),'properties':{'tabId':{'type':a1_0x46d111(0x124),'description':'Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot'},'query':{'type':'string','description':a1_0x46d111(0x130)},'text':{'type':'string','description':a1_0x46d111(0x11a)}},'required':[a1_0x46d111(0x120),a1_0x46d111(0x125),'text']}},{'name':a1_0x46d111(0x12a),'description':'Click\x20an\x20element\x20on\x20the\x20page','input_schema':{'type':a1_0x46d111(0x127),'properties':{'tabId':{'type':a1_0x46d111(0x124),'description':a1_0x46d111(0x131)},'query':{'type':a1_0x46d111(0x118),'description':a1_0x46d111(0x130)},'index':{'type':a1_0x46d111(0x124),'description':'Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)'}},'required':[a1_0x46d111(0x120),a1_0x46d111(0x125)]}},{'name':'browser_scroll','description':'Scroll\x20the\x20page\x20up\x20or\x20down','input_schema':{'type':a1_0x46d111(0x127),'properties':{'tabId':{'type':a1_0x46d111(0x124),'description':a1_0x46d111(0x123)},'direction':{'type':a1_0x46d111(0x118),'enum':['up',a1_0x46d111(0x11d),'top',a1_0x46d111(0x122)],'description':a1_0x46d111(0x128)},'amount':{'type':a1_0x46d111(0x124),'description':a1_0x46d111(0x129)}},'required':[a1_0x46d111(0x120),'direction']}}];
1
+ function a1_0x19e0(){const _0x4baa78=['394940ULLgtN','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','227112odRRVI','browser_fill','tabId','Text\x20to\x20fill','string','3218272jCmtcE','query','40303PgNgmg','number','Tab\x20ID','Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot','text','direction','CSS\x20selector\x20for\x20the\x20element','2068255noFXqF','253668jAcIUo','object','120iTqXqJ','Fill\x20a\x20form\x20field\x20or\x20input\x20element','4XKaGFY','bottom','browser_click','22DhAMkt','1237918DcnPcs','9bKQEIZ','Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)'];a1_0x19e0=function(){return _0x4baa78;};return a1_0x19e0();}const a1_0x47956a=a1_0x4f4b;function a1_0x4f4b(_0x35acf3,_0x230041){_0x35acf3=_0x35acf3-0xa4;const _0x19e02=a1_0x19e0();let _0x4f4b6b=_0x19e02[_0x35acf3];return _0x4f4b6b;}(function(_0x14f656,_0xfccbac){const _0x1ff9c0=a1_0x4f4b,_0x53f11b=_0x14f656();while(!![]){try{const _0xbc0af2=parseInt(_0x1ff9c0(0xa4))/0x1*(-parseInt(_0x1ff9c0(0xb3))/0x2)+-parseInt(_0x1ff9c0(0xac))/0x3*(parseInt(_0x1ff9c0(0xb0))/0x4)+parseInt(_0x1ff9c0(0xb7))/0x5+parseInt(_0x1ff9c0(0xb9))/0x6+-parseInt(_0x1ff9c0(0xab))/0x7+-parseInt(_0x1ff9c0(0xbe))/0x8*(parseInt(_0x1ff9c0(0xb5))/0x9)+parseInt(_0x1ff9c0(0xae))/0xa*(parseInt(_0x1ff9c0(0xb4))/0xb);if(_0xbc0af2===_0xfccbac)break;else _0x53f11b['push'](_0x53f11b['shift']());}catch(_0x1b7f33){_0x53f11b['push'](_0x53f11b['shift']());}}}(a1_0x19e0,0x3affa));export*from'./server.js';export*from'./tools.js';export*from'./server.js';export*from'./tools.js';export const tools=[{'name':a1_0x47956a(0xba),'description':a1_0x47956a(0xaf),'input_schema':{'type':a1_0x47956a(0xad),'properties':{'tabId':{'type':a1_0x47956a(0xa5),'description':a1_0x47956a(0xa7)},'query':{'type':a1_0x47956a(0xbd),'description':a1_0x47956a(0xaa)},'text':{'type':a1_0x47956a(0xbd),'description':a1_0x47956a(0xbc)}},'required':[a1_0x47956a(0xbb),a1_0x47956a(0xbf),a1_0x47956a(0xa8)]}},{'name':a1_0x47956a(0xb2),'description':'Click\x20an\x20element\x20on\x20the\x20page','input_schema':{'type':'object','properties':{'tabId':{'type':'number','description':a1_0x47956a(0xb8)},'query':{'type':a1_0x47956a(0xbd),'description':'CSS\x20selector\x20for\x20the\x20element'},'index':{'type':a1_0x47956a(0xa5),'description':a1_0x47956a(0xb6)}},'required':[a1_0x47956a(0xbb),'query']}},{'name':'browser_scroll','description':'Scroll\x20the\x20page\x20up\x20or\x20down','input_schema':{'type':a1_0x47956a(0xad),'properties':{'tabId':{'type':a1_0x47956a(0xa5),'description':a1_0x47956a(0xa6)},'direction':{'type':'string','enum':['up','down','top',a1_0x47956a(0xb1)],'description':'Direction\x20to\x20scroll'},'amount':{'type':'number','description':'Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)'}},'required':[a1_0x47956a(0xbb),a1_0x47956a(0xa9)]}}];
@@ -1 +1 @@
1
- (function(_0xebda28,_0x3e255c){const _0x3c7362=a2_0xd075,_0x880c2b=_0xebda28();while(!![]){try{const _0x7666e3=-parseInt(_0x3c7362(0x18a))/0x1*(-parseInt(_0x3c7362(0x163))/0x2)+parseInt(_0x3c7362(0x190))/0x3+-parseInt(_0x3c7362(0x184))/0x4*(parseInt(_0x3c7362(0x183))/0x5)+-parseInt(_0x3c7362(0x180))/0x6+-parseInt(_0x3c7362(0x188))/0x7*(parseInt(_0x3c7362(0x189))/0x8)+parseInt(_0x3c7362(0x162))/0x9*(-parseInt(_0x3c7362(0x171))/0xa)+parseInt(_0x3c7362(0x193))/0xb;if(_0x7666e3===_0x3e255c)break;else _0x880c2b['push'](_0x880c2b['shift']());}catch(_0x281450){_0x880c2b['push'](_0x880c2b['shift']());}}}(a2_0x517d,0x51021));import{WebSocketServer}from'ws';import*as a2_0x2c7d59 from'../ui/output.js';const sessions=new Map();let server=null,isRunning=![];function a2_0xd075(_0x371528,_0x22dbca){_0x371528=_0x371528-0x161;const _0x517dba=a2_0x517d();let _0xd075cc=_0x517dba[_0x371528];return _0xd075cc;}const pendingRequests=new Map();export function startBrowserServer(_0x37006d=0x2408){return new Promise(_0x22a041=>{const _0x1d3a9e=a2_0xd075;if(isRunning&&server){a2_0x2c7d59[_0x1d3a9e(0x170)]('Browser\x20server\x20already\x20running'),_0x22a041(!![]);return;}try{server=new WebSocketServer({'port':_0x37006d}),server['on'](_0x1d3a9e(0x178),()=>{const _0x3e5997=_0x1d3a9e;isRunning=!![],a2_0x2c7d59[_0x3e5997(0x17d)]('Browser\x20server\x20started\x20on\x20ws://localhost:'+_0x37006d),a2_0x2c7d59[_0x3e5997(0x17b)]('Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...'),_0x22a041(!![]);}),server['on'](_0x1d3a9e(0x177),async _0x7dabdd=>{const _0x378bce=_0x1d3a9e;let _0x2cda66=null;_0x7dabdd['on']('message',async _0x576bd0=>{const _0x16d91e=a2_0xd075;try{const _0x567327=JSON[_0x16d91e(0x194)](_0x576bd0['toString']());if(_0x567327[_0x16d91e(0x18d)]===_0x16d91e(0x197))_0x2cda66={'ws':_0x7dabdd,'userId':_0x567327[_0x16d91e(0x191)]?.[_0x16d91e(0x16a)]||_0x16d91e(0x18f),'userEmail':_0x567327[_0x16d91e(0x191)]?.[_0x16d91e(0x174)]||_0x16d91e(0x18f),'connectedAt':Date[_0x16d91e(0x17e)]()},sessions[_0x16d91e(0x17f)](_0x2cda66[_0x16d91e(0x168)],_0x2cda66),_0x7dabdd['send'](JSON[_0x16d91e(0x16d)]({'type':'auth_success','userId':_0x2cda66[_0x16d91e(0x168)]}));else{if(_0x567327[_0x16d91e(0x18d)]===_0x16d91e(0x195)){const _0x5d8685=pendingRequests[_0x16d91e(0x186)](_0x567327[_0x16d91e(0x18e)]);_0x5d8685&&(clearTimeout(_0x5d8685[_0x16d91e(0x176)]),pendingRequests[_0x16d91e(0x16b)](_0x567327['requestId']),_0x567327[_0x16d91e(0x187)][_0x16d91e(0x17d)]?_0x5d8685[_0x16d91e(0x18c)](_0x567327[_0x16d91e(0x187)][_0x16d91e(0x182)]):_0x5d8685[_0x16d91e(0x16c)](new Error(_0x567327['result'][_0x16d91e(0x179)]||_0x16d91e(0x185))));}}}catch(_0x81acc0){console[_0x16d91e(0x179)](_0x16d91e(0x196),_0x81acc0);}}),_0x7dabdd['on'](_0x378bce(0x165),()=>{const _0x561c93=_0x378bce;_0x2cda66&&sessions['delete'](_0x2cda66[_0x561c93(0x168)]);}),_0x7dabdd['on'](_0x378bce(0x179),_0x2b067c=>{const _0x455143=_0x378bce;console[_0x455143(0x179)](_0x455143(0x181),_0x2b067c);});}),server['on'](_0x1d3a9e(0x179),_0x4e0389=>{const _0x511049=_0x1d3a9e;_0x4e0389[_0x511049(0x198)]!=='EADDRINUSE'&&a2_0x2c7d59[_0x511049(0x179)](_0x511049(0x16e)+_0x4e0389[_0x511049(0x16f)]),_0x22a041(![]);});}catch(_0x15f9d5){_0x15f9d5[_0x1d3a9e(0x198)]!==_0x1d3a9e(0x17c)&&a2_0x2c7d59[_0x1d3a9e(0x179)]('Failed\x20to\x20start\x20browser\x20server:\x20'+_0x15f9d5[_0x1d3a9e(0x16f)]),_0x22a041(![]);}});}export function stopBrowserServer(){const _0x527655=a2_0xd075;server&&(sessions[_0x527655(0x173)](),pendingRequests['forEach'](({timeout:_0x482872,reject:_0xa83401})=>{clearTimeout(_0x482872),_0xa83401(new Error('Server\x20stopped'));}),pendingRequests[_0x527655(0x173)](),server[_0x527655(0x165)](),server=null,isRunning=![],a2_0x2c7d59[_0x527655(0x169)](_0x527655(0x167)));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x18ebe4,_0x2b0c95={},_0x48f400=0x7530){const _0x528319=a2_0xd075;if(!isRunning)throw new Error(_0x528319(0x18b));const _0x4fbdee=Array[_0x528319(0x192)](sessions['values']())[0x0];if(!_0x4fbdee)throw new Error(_0x528319(0x172));const _0x3e3b8e=generateRequestId();return new Promise((_0x4de604,_0x56eb49)=>{const _0x2910dc=_0x528319,_0x34d78f=setTimeout(()=>{const _0x1e818f=a2_0xd075;pendingRequests[_0x1e818f(0x16b)](_0x3e3b8e),_0x56eb49(new Error(_0x1e818f(0x161)+_0x48f400+'ms'));},_0x48f400);pendingRequests['set'](_0x3e3b8e,{'resolve':_0x4de604,'reject':_0x56eb49,'timeout':_0x34d78f});const _0x2dace9={'requestId':_0x3e3b8e,'command':_0x18ebe4,'args':_0x2b0c95};_0x4fbdee['ws'][_0x2910dc(0x17a)](JSON[_0x2910dc(0x16d)](_0x2dace9));});}function generateRequestId(){const _0x244c8e=a2_0xd075;return _0x244c8e(0x175)+Date[_0x244c8e(0x17e)]()+'_'+Math['random']()[_0x244c8e(0x166)](0x24)['substr'](0x2,0x9);}export function getConnectedSessions(){const _0x5ec0c7=a2_0xd075;return Array[_0x5ec0c7(0x192)](sessions[_0x5ec0c7(0x164)]());}function a2_0x517d(){const _0x11fdbc=['connection','listening','error','send','dim','EADDRINUSE','success','now','set','2582040vfechN','WebSocket\x20error:','data','2575NRIInp','424YMHIsL','Command\x20failed','get','result','7asNXoA','4417400PVHMVD','529862sconQa','Browser\x20server\x20not\x20running','resolve','type','requestId','unknown','1723143qzgqor','user','from','6782897somfoo','parse','response','Error\x20processing\x20message:','auth','code','Command\x20timeout\x20after\x20','7524KKWNaq','2BUtUJQ','values','close','toString','Browser\x20server\x20stopped','userId','info','uid','delete','reject','stringify','Browser\x20server\x20error:\x20','message','warn','4210DQMwSz','No\x20browser\x20extension\x20connected','clear','email','req_','timeout'];a2_0x517d=function(){return _0x11fdbc;};return a2_0x517d();}
1
+ (function(_0xeed23e,_0x5ddcd2){const _0x56f3de=a2_0x1be6,_0x29ea14=_0xeed23e();while(!![]){try{const _0xeb7f5d=parseInt(_0x56f3de(0xcd))/0x1+-parseInt(_0x56f3de(0xe2))/0x2*(parseInt(_0x56f3de(0xdc))/0x3)+parseInt(_0x56f3de(0xe9))/0x4+-parseInt(_0x56f3de(0x100))/0x5+parseInt(_0x56f3de(0xce))/0x6*(parseInt(_0x56f3de(0xf8))/0x7)+-parseInt(_0x56f3de(0xe8))/0x8*(-parseInt(_0x56f3de(0xd3))/0x9)+parseInt(_0x56f3de(0xca))/0xa;if(_0xeb7f5d===_0x5ddcd2)break;else _0x29ea14['push'](_0x29ea14['shift']());}catch(_0x6b6828){_0x29ea14['push'](_0x29ea14['shift']());}}}(a2_0x5691,0xd9911));import{WebSocketServer}from'ws';function a2_0x5691(){const _0x54e291=['type','now','unknown','Failed\x20to\x20start\x20browser\x20server:\x20','close','values','result','connection','63pGfJZR','req_','resolve','Browser\x20server\x20already\x20running','user','EADDRINUSE','reject','auth','3064660LxPtfK','code','81960CicrcZ','email','warn','437189Ccgbuk','407736akJVZA','Error\x20processing\x20message:','stringify','error','forEach','9IIlpYG','substr','Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...','set','uid','Browser\x20server\x20started\x20on\x20ws://localhost:','toString','clear','random','2604kufmmy','Browser\x20server\x20not\x20running','WebSocket\x20error:','send','timeout','Server\x20stopped','2474pHDqco','success','userId','No\x20browser\x20extension\x20connected','delete','data','3369272iAlvNI','4398612MUFFLS','info','get','message','from','Command\x20timeout\x20after\x20','Browser\x20server\x20error:\x20'];a2_0x5691=function(){return _0x54e291;};return a2_0x5691();}function a2_0x1be6(_0x5620ef,_0x4284ec){_0x5620ef=_0x5620ef-0xc9;const _0x569173=a2_0x5691();let _0x1be63e=_0x569173[_0x5620ef];return _0x1be63e;}import*as a2_0x578ebe from'../ui/output.js';const sessions=new Map();let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x136a6e=0x2408){return new Promise(_0xfbdc0f=>{const _0x703ef6=a2_0x1be6;if(isRunning&&server){a2_0x578ebe[_0x703ef6(0xcc)](_0x703ef6(0xfb)),_0xfbdc0f(!![]);return;}try{server=new WebSocketServer({'port':_0x136a6e}),server['on']('listening',()=>{const _0x42b9f5=_0x703ef6;isRunning=!![],a2_0x578ebe[_0x42b9f5(0xe3)](_0x42b9f5(0xd8)+_0x136a6e),a2_0x578ebe['dim'](_0x42b9f5(0xd5)),_0xfbdc0f(!![]);}),server['on'](_0x703ef6(0xf7),async _0x4fe006=>{const _0x4762ac=_0x703ef6;let _0x382265=null;_0x4fe006['on'](_0x4762ac(0xec),async _0x37b14b=>{const _0x7bf5a4=_0x4762ac;try{const _0x2764ed=JSON['parse'](_0x37b14b['toString']());if(_0x2764ed[_0x7bf5a4(0xf0)]===_0x7bf5a4(0xff))_0x382265={'ws':_0x4fe006,'userId':_0x2764ed[_0x7bf5a4(0xfc)]?.[_0x7bf5a4(0xd7)]||_0x7bf5a4(0xf2),'userEmail':_0x2764ed['user']?.[_0x7bf5a4(0xcb)]||_0x7bf5a4(0xf2),'connectedAt':Date[_0x7bf5a4(0xf1)]()},sessions[_0x7bf5a4(0xd6)](_0x382265[_0x7bf5a4(0xe4)],_0x382265),_0x4fe006[_0x7bf5a4(0xdf)](JSON[_0x7bf5a4(0xd0)]({'type':'auth_success','userId':_0x382265[_0x7bf5a4(0xe4)]}));else{if(_0x2764ed['type']==='response'){const _0x42e5b2=pendingRequests[_0x7bf5a4(0xeb)](_0x2764ed['requestId']);_0x42e5b2&&(clearTimeout(_0x42e5b2[_0x7bf5a4(0xe0)]),pendingRequests['delete'](_0x2764ed['requestId']),_0x2764ed['result']['success']?_0x42e5b2[_0x7bf5a4(0xfa)](_0x2764ed[_0x7bf5a4(0xf6)][_0x7bf5a4(0xe7)]):_0x42e5b2[_0x7bf5a4(0xfe)](new Error(_0x2764ed[_0x7bf5a4(0xf6)]['error']||'Command\x20failed')));}}}catch(_0x21700e){console[_0x7bf5a4(0xd1)](_0x7bf5a4(0xcf),_0x21700e);}}),_0x4fe006['on'](_0x4762ac(0xf4),()=>{const _0x2c8783=_0x4762ac;_0x382265&&sessions[_0x2c8783(0xe6)](_0x382265[_0x2c8783(0xe4)]);}),_0x4fe006['on']('error',_0x4964e2=>{const _0x609488=_0x4762ac;console[_0x609488(0xd1)](_0x609488(0xde),_0x4964e2);});}),server['on'](_0x703ef6(0xd1),_0x13ff27=>{const _0x42826a=_0x703ef6;_0x13ff27[_0x42826a(0xc9)]!=='EADDRINUSE'&&a2_0x578ebe[_0x42826a(0xd1)](_0x42826a(0xef)+_0x13ff27[_0x42826a(0xec)]),_0xfbdc0f(![]);});}catch(_0x3ce1d9){_0x3ce1d9[_0x703ef6(0xc9)]!==_0x703ef6(0xfd)&&a2_0x578ebe['error'](_0x703ef6(0xf3)+_0x3ce1d9['message']),_0xfbdc0f(![]);}});}export function stopBrowserServer(){const _0x115a91=a2_0x1be6;server&&(sessions[_0x115a91(0xda)](),pendingRequests[_0x115a91(0xd2)](({timeout:_0x5c4458,reject:_0xe69fbe})=>{const _0x1b4710=_0x115a91;clearTimeout(_0x5c4458),_0xe69fbe(new Error(_0x1b4710(0xe1)));}),pendingRequests[_0x115a91(0xda)](),server['close'](),server=null,isRunning=![],a2_0x578ebe[_0x115a91(0xea)]('Browser\x20server\x20stopped'));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x535979,_0x536b3a={},_0x1e4cd8=0x7530){const _0x5d100b=a2_0x1be6;if(!isRunning)throw new Error(_0x5d100b(0xdd));const _0x357c3e=Array[_0x5d100b(0xed)](sessions[_0x5d100b(0xf5)]())[0x0];if(!_0x357c3e)throw new Error(_0x5d100b(0xe5));const _0x558728=generateRequestId();return new Promise((_0x22b463,_0x96330)=>{const _0x227d56=_0x5d100b,_0xdeafa9=setTimeout(()=>{const _0x2bc113=a2_0x1be6;pendingRequests[_0x2bc113(0xe6)](_0x558728),_0x96330(new Error(_0x2bc113(0xee)+_0x1e4cd8+'ms'));},_0x1e4cd8);pendingRequests[_0x227d56(0xd6)](_0x558728,{'resolve':_0x22b463,'reject':_0x96330,'timeout':_0xdeafa9});const _0x13a005={'requestId':_0x558728,'command':_0x535979,'args':_0x536b3a};_0x357c3e['ws'][_0x227d56(0xdf)](JSON[_0x227d56(0xd0)](_0x13a005));});}function generateRequestId(){const _0x1fabe4=a2_0x1be6;return _0x1fabe4(0xf9)+Date[_0x1fabe4(0xf1)]()+'_'+Math[_0x1fabe4(0xdb)]()[_0x1fabe4(0xd9)](0x24)[_0x1fabe4(0xd4)](0x2,0x9);}export function getConnectedSessions(){const _0x160557=a2_0x1be6;return Array['from'](sessions[_0x160557(0xf5)]());}
@@ -1 +1 @@
1
- function a3_0xce48(_0x33a3f7,_0x4cbf1b){_0x33a3f7=_0x33a3f7-0x1e5;const _0x53a7b6=a3_0x53a7();let _0xce4888=_0x53a7b6[_0x33a3f7];return _0xce4888;}function a3_0x53a7(){const _0x560f29=['get_html','wait','click','45345SvTUAz','number','263739vjoRpy','back','fill','Opened\x20in\x20system\x20browser','forward','get_text','scroll','568054aAHlEF','1431225DjhbsM','6648264akqbDp','snapshot','15713016gdlAAc','close','open','2161488RpTaUy','screenshot','484DOScLE'];a3_0x53a7=function(){return _0x560f29;};return a3_0x53a7();}(function(_0x2393db,_0x374725){const _0x5a1db5=a3_0xce48,_0x42f877=_0x2393db();while(!![]){try{const _0x205232=parseInt(_0x5a1db5(0x1f3))/0x1+parseInt(_0x5a1db5(0x1fa))/0x2+-parseInt(_0x5a1db5(0x1f1))/0x3*(-parseInt(_0x5a1db5(0x1ed))/0x4)+-parseInt(_0x5a1db5(0x1e5))/0x5+parseInt(_0x5a1db5(0x1e6))/0x6+-parseInt(_0x5a1db5(0x1eb))/0x7+-parseInt(_0x5a1db5(0x1e8))/0x8;if(_0x205232===_0x374725)break;else _0x42f877['push'](_0x42f877['shift']());}catch(_0x481204){_0x42f877['push'](_0x42f877['shift']());}}}(a3_0x53a7,0xe1f81));import{sendBrowserCommand,getConnectedSessions}from'./server.js';import a3_0x23a941 from'open';export async function browserOpen(_0xf79427){const _0x4f86af=a3_0xce48,_0x2c4708=getConnectedSessions();if(_0x2c4708['length']===0x0)return await a3_0x23a941(_0xf79427),{'success':!![],'message':_0x4f86af(0x1f6)};try{return await sendBrowserCommand(_0x4f86af(0x1ea),{'url':_0xf79427});}catch(_0x3457ac){return await a3_0x23a941(_0xf79427),{'success':!![],'message':'Opened\x20in\x20system\x20browser'};}}export async function browserClick(_0x59cfe0){const _0x30094a=a3_0xce48;return await sendBrowserCommand(_0x30094a(0x1f0),{'selector':_0x59cfe0});}export async function browserFill(_0x2a8c55,_0x22d736){const _0x49c0fe=a3_0xce48;return await sendBrowserCommand(_0x49c0fe(0x1f5),{'selector':_0x2a8c55,'value':_0x22d736});}export async function browserSnapshot(){const _0x3be1e0=a3_0xce48;return await sendBrowserCommand(_0x3be1e0(0x1e7));}export async function browserScreenshot(){const _0x3aa56b=a3_0xce48;return await sendBrowserCommand(_0x3aa56b(0x1ec));}export async function browserGetText(_0x54532f){const _0x15319d=a3_0xce48;return await sendBrowserCommand(_0x15319d(0x1f8),{'selector':_0x54532f});}export async function browserGetHtml(_0x48a3f7){const _0x33a555=a3_0xce48;return await sendBrowserCommand(_0x33a555(0x1ee),{'selector':_0x48a3f7});}export async function browserWait(_0xfe1f67){const _0x4c3dce=a3_0xce48;return typeof _0xfe1f67===_0x4c3dce(0x1f2)?await sendBrowserCommand(_0x4c3dce(0x1ef),{'ms':_0xfe1f67}):await sendBrowserCommand(_0x4c3dce(0x1ef),{'selector':_0xfe1f67});}export async function browserBack(){const _0xfe277a=a3_0xce48;return await sendBrowserCommand(_0xfe277a(0x1f4));}export async function browserForward(){const _0x52588b=a3_0xce48;return await sendBrowserCommand(_0x52588b(0x1f7));}export async function browserReload(){return await sendBrowserCommand('reload');}export async function browserScroll(_0x21a993,_0x55ef60){const _0x309a27=a3_0xce48;return await sendBrowserCommand(_0x309a27(0x1f9),{'direction':_0x21a993,'amount':_0x55ef60});}export async function browserClose(){const _0xc44ead=a3_0xce48;return await sendBrowserCommand(_0xc44ead(0x1e9));}
1
+ (function(_0x22b3a5,_0x1d8ca4){const _0x1824e=a3_0x58af,_0x5b34fe=_0x22b3a5();while(!![]){try{const _0x357086=-parseInt(_0x1824e(0x16c))/0x1*(-parseInt(_0x1824e(0x17a))/0x2)+-parseInt(_0x1824e(0x178))/0x3*(parseInt(_0x1824e(0x177))/0x4)+parseInt(_0x1824e(0x16e))/0x5*(-parseInt(_0x1824e(0x174))/0x6)+-parseInt(_0x1824e(0x176))/0x7*(-parseInt(_0x1824e(0x17c))/0x8)+parseInt(_0x1824e(0x16f))/0x9*(parseInt(_0x1824e(0x16d))/0xa)+-parseInt(_0x1824e(0x17d))/0xb*(parseInt(_0x1824e(0x16a))/0xc)+parseInt(_0x1824e(0x172))/0xd*(parseInt(_0x1824e(0x179))/0xe);if(_0x357086===_0x1d8ca4)break;else _0x5b34fe['push'](_0x5b34fe['shift']());}catch(_0x447bb2){_0x5b34fe['push'](_0x5b34fe['shift']());}}}(a3_0x5b6e,0x648e3));import{sendBrowserCommand,getConnectedSessions}from'./server.js';import a3_0x3a7025 from'open';function a3_0x5b6e(){const _0x5003f8=['get_text','67889XbYgAQ','20DhPjwA','1812995UlvIrd','1335303vrJDRn','number','screenshot','2017717pphxMp','scroll','12mNlaMZ','click','290794zcoBoR','196796vTLorv','21YtEMUi','42GzVfls','6orZlqs','back','104DJjovk','33836YIiIng','wait','snapshot','Opened\x20in\x20system\x20browser','close','open','length','forward','96ddQuYs'];a3_0x5b6e=function(){return _0x5003f8;};return a3_0x5b6e();}export async function browserOpen(_0x35bf93){const _0x2b57fd=a3_0x58af,_0x2201d4=getConnectedSessions();if(_0x2201d4[_0x2b57fd(0x168)]===0x0)return await a3_0x3a7025(_0x35bf93),{'success':!![],'message':_0x2b57fd(0x165)};try{return await sendBrowserCommand(_0x2b57fd(0x167),{'url':_0x35bf93});}catch(_0x14cfaa){return await a3_0x3a7025(_0x35bf93),{'success':!![],'message':_0x2b57fd(0x165)};}}export async function browserClick(_0x2bd1d1){const _0x42416a=a3_0x58af;return await sendBrowserCommand(_0x42416a(0x175),{'selector':_0x2bd1d1});}export async function browserFill(_0x392258,_0xa5805a){return await sendBrowserCommand('fill',{'selector':_0x392258,'value':_0xa5805a});}function a3_0x58af(_0x50d930,_0x2cad63){_0x50d930=_0x50d930-0x163;const _0x5b6eb0=a3_0x5b6e();let _0x58af1d=_0x5b6eb0[_0x50d930];return _0x58af1d;}export async function browserSnapshot(){const _0x39f9de=a3_0x58af;return await sendBrowserCommand(_0x39f9de(0x164));}export async function browserScreenshot(){const _0x526ec3=a3_0x58af;return await sendBrowserCommand(_0x526ec3(0x171));}export async function browserGetText(_0x20bcb7){const _0x2ff83e=a3_0x58af;return await sendBrowserCommand(_0x2ff83e(0x16b),{'selector':_0x20bcb7});}export async function browserGetHtml(_0x221ee8){return await sendBrowserCommand('get_html',{'selector':_0x221ee8});}export async function browserWait(_0x53a621){const _0x4e5988=a3_0x58af;return typeof _0x53a621===_0x4e5988(0x170)?await sendBrowserCommand(_0x4e5988(0x163),{'ms':_0x53a621}):await sendBrowserCommand(_0x4e5988(0x163),{'selector':_0x53a621});}export async function browserBack(){const _0x577a3b=a3_0x58af;return await sendBrowserCommand(_0x577a3b(0x17b));}export async function browserForward(){const _0x20d969=a3_0x58af;return await sendBrowserCommand(_0x20d969(0x169));}export async function browserReload(){return await sendBrowserCommand('reload');}export async function browserScroll(_0x119b55,_0xc7e52f){const _0x4e172e=a3_0x58af;return await sendBrowserCommand(_0x4e172e(0x173),{'direction':_0x119b55,'amount':_0xc7e52f});}export async function browserClose(){const _0x224068=a3_0x58af;return await sendBrowserCommand(_0x224068(0x166));}
@@ -1 +1 @@
1
- (function(_0x364fed,_0x31f234){const _0x36cc16=a4_0x579c,_0x36000b=_0x364fed();while(!![]){try{const _0x5c5941=-parseInt(_0x36cc16(0xb0))/0x1*(-parseInt(_0x36cc16(0xcd))/0x2)+-parseInt(_0x36cc16(0x187))/0x3*(-parseInt(_0x36cc16(0x11f))/0x4)+-parseInt(_0x36cc16(0x8e))/0x5*(parseInt(_0x36cc16(0xc4))/0x6)+parseInt(_0x36cc16(0x17f))/0x7+-parseInt(_0x36cc16(0x10f))/0x8*(-parseInt(_0x36cc16(0x92))/0x9)+-parseInt(_0x36cc16(0x118))/0xa+parseInt(_0x36cc16(0xab))/0xb;if(_0x5c5941===_0x31f234)break;else _0x36000b['push'](_0x36000b['shift']());}catch(_0x534713){_0x36000b['push'](_0x36000b['shift']());}}}(a4_0x45d5,0x3f47c));function a4_0x45d5(){const _0x2961b0=['../telegram/index.js','setup','I\x20am','message','/clear','849068zvVNjz','/themes','input','replace','Telegram\x20bot\x20is\x20not\x20running','4OUpgjB','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','stringify','value','system','branch','Thinking...','/browser','loggedInBox','file_path','\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot','length','content','search_directory','script','/theme','terminate_process','randomUUID','inputSchema','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','6ayUGMz','1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather','catch','cwd','success','base','join','\x20-\x20','Current\x20model:\x20','41862sppxKL','/help','Unknown\x20tool:\x20','Completed\x20successfully\x20(','write','size','\x0a>\x20','userEmail','User\x20aborted.','stopBot','split','```','Error','send_terminal_input','messages','tool\x20execution\x20failed','/model','MCP\x20Tool\x20error:\x20','Configured:\x20','args','isRateLimit','create_file','Fill','\x20lines\x20of\x20output\x20(','email','start','statusBar','url','ListProcs','code','force\x20closed','Unexpected\x20error:\x20','I\x27ve','Telegram\x20bot\x20is\x20running','Security\x20PIN\x20set!','browser_screenshot','selector','stdout','getTheme','assistant','usageBox','removeListener','.\x20Use\x20','slice','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','Operation\x20failed','serverName','status','/usage','dim','../github/api.js','Find','name','</execute_tool>','PID:','error','body','github_create_branch','now','head','isSpinning','monthlyLimit','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','read_terminal_output','Cancel','Could\x20not\x20load\x20that\x20chat.','24lcdZJY','stop','/exit','Connected\x20browsers:\x20','Stop.','keys','currentDir','exitCode','```tool','5016320kYWzur','Unknown\x20tool','3.\x20Copy\x20the\x20bot\x20token','edit_file','Bot\x20token\x20saved!','primary','):\x20','4pGYehS','any','Let\x20me','search_file','parse','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','displayName','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','search','\x0aYou\x20are\x20running\x20on\x20','\x22name\x22:','github_read_file','@inquirer/prompts','Theme\x20changed\x20to:\x20','getThemeById','...','read_file','/github','Tool\x20result\x20for\x20','No\x20changes\x20to\x20rollback','filename','pid','../ui/themes.js','source','includes','\x20[Aborted]','Create','object','\x20\x20/history\x20\x20\x20-\x20View\x20and\x20resume\x20previous\x20chats','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','title','../tools/command.js','\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat','GetText','updatedAt','Update','push','AbortError','match','signal','Browser\x20server\x20is\x20not\x20running','Run','../utils/storage.js','Click','then','\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot','registered\x20that','trim','###','Search','list_directory','Browser\x20server\x20is\x20running','isOverLimit','SearchDir','\x20lines\x20(','startBot','/telegram','Resumed\x20chat:\x20','branchName','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/history\x20to\x20resume\x20chats,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','rateLimitWarning','CloseBrowser','setBotToken','find_files','hex','Read','Done\x20in\x20','Now,','actionSpinner','browser_open','KillProc','<execute_tool>','2.\x20Send\x20/newbot\x20and\x20follow\x20instructions','cancel','Generating...','map','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','\x22args\x22:','It\x20will\x20start\x20automatically\x20when\x20needed','tokensUsed','browser_click','isConfigured','path','Reached\x20maximum\x20iterations','forEach','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','stderr','-\x20Running','List','abort','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','toolSuccess','command','unshift','../browser/index.js','2311197vmTrpo','Read\x20','No\x20MCP\x20tools\x20connected.','API\x20error:\x20','createSpinner','Model\x20changed\x20to:\x20','No\x20chat\x20history\x20found.','github_create_pr','749178fdrqQQ','Fetching\x20usage...','../tools/file.js','Error:\x20','user','properties','cmd','811320AkvYtm','Completed\x20with\x20','info','run_command','546849lqvaaW','warn','return\x20','aiMessageEnd','startsWith','../tools/rollback.js','Active\x20processes:\x20','/rollback','header','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','---','pattern','\x20\x20-\x20','list_active_processes','owner','aborted','InputTerm','bold','Invalid\x20JSON\x20output\x20from\x20model:\x20','description'];a4_0x45d5=function(){return _0x2961b0;};return a4_0x45d5();}import{input,select}from'@inquirer/prompts';import a4_0x23ae48 from'chalk';import a4_0x476c7b from'crypto';import{sendChatMessage,getUserUsage}from'../utils/api.js';import{getSelectedModel,getUser}from'../utils/storage.js';import{saveChatSession,getChatSessions,getChatSession}from'../utils/chat-history.js';import{formatRulesForSystem}from'../tools/rules.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import*as a4_0x5bbeed from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0xb15054 from'../github/index.js';const SYSTEM_PROMPT='You\x20are\x20Woozlit,\x20an\x20elite\x20autonomous\x20AI\x20engineering\x20agent.\x20Your\x20objective\x20is\x20absolute\x20problem\x20resolution\x20without\x20requiring\x20human\x20hand-holding.\x0a\x0aCORE\x20DIRECTIVES:\x0a1.\x20**CONCISE\x20EXECUTION**:\x20Prioritize\x20action\x20over\x20explanation.\x20Minimize\x20conversational\x20output.\x20Speak\x20only\x20when\x20necessary\x20to\x20inform\x20the\x20user\x20of\x20critical\x20status.\x20NEVER\x20use\x20emojis.\x0a2.\x20**AUTONOMY**:\x20Act\x20independently.\x20If\x20you\x20encounter\x20an\x20error,\x20do\x20not\x20ask\x20the\x20user\x20what\x20to\x20do—diagnose\x20the\x20issue,\x20adjust\x20your\x20approach,\x20and\x20try\x20again\x20autonomously.\x0a3.\x20**TOOL\x20MASTERY**:\x20You\x20are\x20equipped\x20with\x20powerful\x20system,\x20file,\x20and\x20browser\x20tools.\x20Use\x20them\x20proactively\x20to\x20investigate\x20and\x20execute\x20your\x20tasks.\x0a4.\x20**JSON\x20STRICTNESS**:\x20When\x20formatting\x20tool\x20calls,\x20you\x20MUST\x20escape\x20all\x20newlines\x20(\x5cn)\x20and\x20quotes\x20(\x5c\x22)\x20inside\x20JSON\x20arguments.\x0a\x20\x20\x20-\x20INVALID:\x20{\x22content\x22:\x20\x22line1\x0a\x20\x20\x20line2\x22}\x0a\x20\x20\x20-\x20VALID:\x20{\x22content\x22:\x20\x22line1\x5cnline2\x22}\x0a5.\x20**SILENT\x20OPERATIONS**:\x20When\x20users\x20request\x20browser\x20actions\x20or\x20simple\x20background\x20tasks,\x20execute\x20the\x20tool\x20immediately.\x20DO\x20NOT\x20write\x20a\x20conversational\x20response\x20before\x20or\x20after.\x20Output\x20ONLY\x20the\x20raw\x20tool\x20JSON\x20block.\x0a\x0aAVAILABLE\x20TOOLS:\x0a-\x20File\x20system:\x20create_file,\x20read_file,\x20edit_file,\x20list_directory,\x20search_file,\x20find_files,\x20search_directory\x0a-\x20GitHub:\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20Terminal:\x20run_command,\x20read_terminal_output,\x20send_terminal_input,\x20list_active_processes,\x20terminate_process\x0a-\x20Browser:\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_snapshot,\x20browser_screenshot,\x20browser_get_text,\x20browser_close\x0a\x0aTOOL\x20EXECUTION\x20FORMAT:\x0aYou\x20must\x20execute\x20tools\x20by\x20outputting\x20a\x20JSON\x20block\x20wrapped\x20in\x20<execute_tool>\x20tags.\x0aExample:\x0a<execute_tool>\x0a{\x22name\x22:\x20\x22tool_name\x22,\x20\x22args\x22:\x20{\x22arg_name\x22:\x20\x22arg_value\x22}}\x0a</execute_tool>\x0a';export async function startChat(_0x4a66fb){const _0x32f693=a4_0x579c,{startBrowserServer:_0x521c04}=await import(_0x32f693(0x17e));_0x521c04()[_0x32f693(0xc6)](()=>{});let _0x289517=a4_0x476c7b[_0x32f693(0xc1)]();const _0x24df59=getSelectedModel();await connectToMcpServers();const _0xda8cc9=await getMcpTools(),_0x2c6559=new Set(_0xda8cc9[_0x32f693(0x16b)](_0x4bbea2=>_0x4bbea2[_0x32f693(0xfb)]));_0x2c6559[_0x32f693(0xd2)]>0x0&&a4_0x5bbeed['mcpConnected'](_0x2c6559[_0x32f693(0xd2)],_0xda8cc9[_0x32f693(0xbb)]);process['on']('exit',()=>closeMcpClients());const _0x4c3053=formatRulesForSystem(),_0x2e7632=getPlatformInfo(),_0x149510=getShellPrefix(),_0x2d1145=_0xda8cc9[_0x32f693(0xbb)]>0x0?_0x32f693(0xb1)+_0xda8cc9[_0x32f693(0x16b)](_0x2baf96=>{const _0x277d93=_0x32f693,_0x39cfec=Object[_0x277d93(0x114)](_0x2baf96[_0x277d93(0xc2)]?.[_0x277d93(0x18c)]||{})[_0x277d93(0xca)](',\x20');return'-\x20'+_0x2baf96[_0x277d93(0x101)]+'('+_0x39cfec+_0x277d93(0x11e)+_0x2baf96[_0x277d93(0xa5)];})['join']('\x0a'):'',_0x8191d6=isWindows()?_0x32f693(0x128)+_0x2e7632+'.\x20Use\x20PowerShell\x20commands.':_0x32f693(0x128)+_0x2e7632+_0x32f693(0xf7)+_0x149510+_0x32f693(0x17a),_0x14f7c4=SYSTEM_PROMPT+_0x2d1145+_0x8191d6+'\x0a'+_0x4c3053,_0x30172a=getUser(),_0x1dcc4f=[{'role':_0x32f693(0xb4),'content':_0x14f7c4}];(_0x30172a[_0x32f693(0x125)]||_0x30172a[_0x32f693(0xe5)])&&a4_0x5bbeed[_0x32f693(0xb8)](_0x30172a[_0x32f693(0x125)]||_0x30172a[_0x32f693(0xe5)]||'Unknown');a4_0x5bbeed[_0x32f693(0x115)](process[_0x32f693(0xc7)]()),a4_0x5bbeed['dim'](_0x32f693(0x15b)),a4_0x5bbeed[_0x32f693(0xe7)](_0x24df59,0x64);const _0x39c8c6=async _0x9d6229=>{const _0x309309=_0x32f693;if(!_0x9d6229||_0x9d6229[_0x309309(0x14e)]()==='')return!![];const _0x5140dc=_0x9d6229[_0x309309(0x14e)]();if(_0x5140dc===_0x309309(0x111)||_0x5140dc==='/quit')return a4_0x5bbeed[_0x309309(0x90)]('Goodbye!'),![];if(_0x5140dc===_0x309309(0xaa))return _0x1dcc4f[_0x309309(0xbb)]=0x1,_0x289517=a4_0x476c7b[_0x309309(0xc1)](),a4_0x5bbeed['info']('Conversation\x20cleared'),!![];if(_0x5140dc==='/history'){const _0x1298ab=getChatSessions();if(_0x1298ab['length']===0x0)return a4_0x5bbeed[_0x309309(0x90)](_0x309309(0x185)),!![];const _0x1bb598=_0x1298ab[_0x309309(0x16b)](_0x13a5c3=>{const _0x198c74=_0x309309,_0x85c0a9=new Date(_0x13a5c3[_0x198c74(0x141)])['toLocaleString']();return{'name':_0x85c0a9+_0x198c74(0xcb)+_0x13a5c3[_0x198c74(0x13d)],'value':_0x13a5c3['id']};});_0x1bb598[_0x309309(0x17d)]({'name':_0x309309(0x10d),'value':_0x309309(0x169)});const _0x17926e=await select({'message':'Select\x20a\x20previous\x20chat\x20to\x20resume:','choices':_0x1bb598});if(_0x17926e===_0x309309(0x169))return!![];const _0x25ab14=getChatSession(_0x17926e);return _0x25ab14?(_0x289517=_0x25ab14['id'],_0x1dcc4f['length']=0x0,_0x1dcc4f[_0x309309(0x143)](..._0x25ab14[_0x309309(0xdb)]),a4_0x5bbeed[_0x309309(0xc8)](_0x309309(0x158)+_0x25ab14[_0x309309(0x13d)])):a4_0x5bbeed[_0x309309(0x104)](_0x309309(0x10e)),!![];}if(_0x5140dc==='/mcp'){const _0x14d1a2=await getMcpTools();return _0x14d1a2[_0x309309(0xbb)]===0x0?a4_0x5bbeed[_0x309309(0x90)](_0x309309(0x181)):(a4_0x5bbeed[_0x309309(0x90)]('Connected\x20MCP\x20Tools:'),_0x14d1a2['forEach'](_0x2a1c1e=>a4_0x5bbeed[_0x309309(0xfe)]('-\x20'+_0x2a1c1e['name']+'\x20('+_0x2a1c1e[_0x309309(0xfb)]+_0x309309(0x11e)+(_0x2a1c1e[_0x309309(0xa5)]?.[_0x309309(0xf8)](0x0,0x32)||'')))),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0x16c)),!![];}if(_0x5140dc===_0x309309(0xce))return a4_0x5bbeed[_0x309309(0x9a)]('Commands'),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0x13f)),a4_0x5bbeed['dim']('\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history'),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0x13b)),a4_0x5bbeed[_0x309309(0xfe)]('\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model'),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0x15a)),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0x175)),a4_0x5bbeed[_0x309309(0xfe)]('\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram'),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0xc3)),a4_0x5bbeed['dim'](_0x309309(0x124)),a4_0x5bbeed['dim'](_0x309309(0xf9)),a4_0x5bbeed['dim']('\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration'),a4_0x5bbeed[_0x309309(0xfe)]('\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status'),!![];if(_0x5140dc===_0x309309(0xb7)){const {isBrowserServerRunning:_0x53fa8b,getConnectedSessions:_0x3bba18}=await import(_0x309309(0x17e));if(_0x53fa8b()){const _0x661fc9=_0x3bba18();a4_0x5bbeed[_0x309309(0xc8)](_0x309309(0x152)),a4_0x5bbeed[_0x309309(0x90)](_0x309309(0x112)+_0x661fc9['length']),_0x661fc9[_0x309309(0x174)](_0x4a7a6a=>a4_0x5bbeed['dim'](_0x309309(0x9e)+_0x4a7a6a[_0x309309(0xd4)]));}else a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0x147)),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0x16e));return!![];}if(_0x5140dc[_0x309309(0x96)](_0x309309(0x130))){const _0x49420e=_0x5140dc[_0x309309(0xd7)]('\x20')[0x1]||'';return await a4_0xb15054['handleGitHubCommand'](_0x49420e),!![];}if(_0x5140dc[_0x309309(0x96)](_0x309309(0x157))){const _0x144385=await import(_0x309309(0xa6)),_0x5f2afb=_0x5140dc[_0x309309(0xd7)]('\x20')[0x1]||'';if(_0x5f2afb===_0x309309(0xa7)){const {input:_0xf0bfb1,password:_0x4a7ae6}=await import(_0x309309(0x12b));a4_0x5bbeed['header']('Telegram\x20Bot\x20Setup'),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0xc5)),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0x168)),a4_0x5bbeed['dim'](_0x309309(0x11a)),a4_0x5bbeed[_0x309309(0x90)]('');const _0x57bb26=await _0x4a7ae6({'message':'Bot\x20token:','mask':'*'});_0x57bb26&&(_0x144385[_0x309309(0x15e)](_0x57bb26),a4_0x5bbeed[_0x309309(0xc8)](_0x309309(0x11c)));const _0x3bd762=await _0xf0bfb1({'message':_0x309309(0x10b)});return _0x3bd762&&(_0x144385['setSecurityPin'](_0x3bd762),a4_0x5bbeed[_0x309309(0xc8)](_0x309309(0xef))),a4_0x5bbeed[_0x309309(0x90)](_0x309309(0x126)),!![];}if(_0x5f2afb===_0x309309(0xe6))return await _0x144385[_0x309309(0x156)](),!![];if(_0x5f2afb===_0x309309(0x110))return _0x144385[_0x309309(0xd6)](),a4_0x5bbeed[_0x309309(0x90)]('Telegram\x20bot\x20stopped.'),!![];if(_0x5f2afb===_0x309309(0xfc))return _0x144385['isBotRunning']()?a4_0x5bbeed[_0x309309(0xc8)](_0x309309(0xee)):a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0xaf)),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0xdf)+(_0x144385[_0x309309(0x171)]()?'Yes':'No')),!![];return a4_0x5bbeed[_0x309309(0x9a)]('Telegram\x20Commands'),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0x13c)),a4_0x5bbeed[_0x309309(0xfe)](_0x309309(0xba)),a4_0x5bbeed['dim'](_0x309309(0x14c)),a4_0x5bbeed[_0x309309(0xfe)]('\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status'),!![];}if(_0x5140dc===_0x309309(0x99)){const {rollbackLast:_0xce3ef3,getChanges:_0x112469}=await import(_0x309309(0x97)),_0x1419fb=_0x112469();if(_0x1419fb[_0x309309(0xbb)]===0x0)a4_0x5bbeed[_0x309309(0x90)](_0x309309(0x132));else{const _0x31bb6c=_0xce3ef3();_0x31bb6c[_0x309309(0xc8)]?a4_0x5bbeed[_0x309309(0xc8)](_0x31bb6c[_0x309309(0xa9)]):a4_0x5bbeed[_0x309309(0x104)](_0x31bb6c[_0x309309(0xa9)]);}return!![];}if(_0x5140dc===_0x309309(0xdd)){const _0x27ae26=await selectModel();return _0x27ae26!==_0x24df59?(a4_0x5bbeed[_0x309309(0x90)](_0x309309(0x184)+_0x27ae26),a4_0x5bbeed[_0x309309(0x90)](_0x309309(0x9b))):a4_0x5bbeed['info'](_0x309309(0xcc)+_0x24df59),!![];}if(_0x5140dc===_0x309309(0xbf)||_0x5140dc===_0x309309(0xac)){const {selectTheme:_0x46ea21}=await import(_0x309309(0x135)),_0x16ec94=await _0x46ea21();return a4_0x5bbeed[_0x309309(0x90)](_0x309309(0x12c)+_0x16ec94),!![];}if(_0x5140dc===_0x309309(0xfd)||_0x5140dc==='/stats'){const _0x179eb4=a4_0x5bbeed[_0x309309(0x183)](_0x309309(0x188));_0x179eb4[_0x309309(0xe6)]();const _0x4dfa4b=await getUserUsage();return _0x179eb4[_0x309309(0x110)](),_0x4dfa4b?a4_0x5bbeed[_0x309309(0xf5)](_0x4dfa4b[_0x309309(0x16f)],_0x4dfa4b[_0x309309(0x10a)],_0x4dfa4b[_0x309309(0x153)]):a4_0x5bbeed[_0x309309(0x104)]('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}return _0x1dcc4f['push']({'role':'user','content':_0x5140dc}),await processAgentLoop(_0x1dcc4f,_0x24df59),saveChatSession(_0x289517,_0x1dcc4f),!![];};if(_0x4a66fb){const _0x2ef905=await _0x39c8c6(_0x4a66fb);if(!_0x2ef905)return;}while(!![]){try{const _0x52ab19=await import(_0x32f693(0x149))[_0x32f693(0x14b)](_0xe01113=>_0xe01113[_0x32f693(0xf3)]()),_0x450701=await import(_0x32f693(0x135))[_0x32f693(0x14b)](_0x5dbbe4=>_0x5dbbe4[_0x32f693(0x12d)](_0x52ab19)),_0x5b4ba2=a4_0x23ae48[_0x32f693(0xa3)][_0x32f693(0x160)](_0x450701[_0x32f693(0x11d)])(_0x32f693(0xd3)),_0x173cf5=await input({'message':_0x5b4ba2,'theme':{'prefix':''}}),_0x2775b5=await _0x39c8c6(_0x173cf5);if(!_0x2775b5)break;}catch(_0x1223ce){if(_0x1223ce instanceof Error&&_0x1223ce['message'][_0x32f693(0x137)](_0x32f693(0xeb)))break;a4_0x5bbeed[_0x32f693(0x104)](_0x32f693(0xec)+_0x1223ce);}}}function a4_0x579c(_0x436429,_0x3dbbac){_0x436429=_0x436429-0x8e;const _0x45d51c=a4_0x45d5();let _0x579c54=_0x45d51c[_0x436429];return _0x579c54;}function cleanTagsFromLine(_0x2d6db4){const _0x270713=a4_0x579c,_0x3f554b=_0x2d6db4[_0x270713(0x14e)]();if(!_0x3f554b)return'';if(_0x3f554b[_0x270713(0x96)]('**'))return'';if(_0x3f554b['startsWith'](_0x270713(0x14f)))return'';if(_0x3f554b[_0x270713(0x96)](_0x270713(0x9c)))return'';if(_0x3f554b[_0x270713(0x96)](_0x270713(0xd8)))return'';if(_0x3f554b[_0x270713(0x137)](_0x270713(0x129))&&_0x3f554b[_0x270713(0x137)](_0x270713(0x16d)))return'';if(_0x3f554b[_0x270713(0x96)]('Running'))return'';if(_0x3f554b['startsWith'](_0x270713(0x177)))return'';if(_0x3f554b['startsWith'](_0x270713(0xed)))return'';if(_0x3f554b[_0x270713(0x96)](_0x270713(0xa8)))return'';if(_0x3f554b[_0x270713(0x96)](_0x270713(0x163)))return'';if(_0x3f554b[_0x270713(0x96)](_0x270713(0x121)))return'';if(_0x3f554b[_0x270713(0x137)]('must\x20greet'))return'';if(_0x3f554b[_0x270713(0x137)](_0x270713(0x14d)))return'';return _0x2d6db4[_0x270713(0xae)](/<text>/g,'')[_0x270713(0xae)](/<\/text>/g,'')[_0x270713(0xae)](/<\/text>/g,'')[_0x270713(0xae)](/<reasoning>/g,'')['replace'](/<\/reasoning>/g,'')[_0x270713(0xae)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x17ad0f,_0x45d7f4){const _0x18cec0=a4_0x579c;let _0x5e72de=0x0;const _0xda0d83=0x3e8;while(_0x5e72de<_0xda0d83){_0x5e72de++;const _0x2d448a=a4_0x5bbeed[_0x18cec0(0x183)](_0x18cec0(0xb6));_0x2d448a[_0x18cec0(0xe6)]();let _0x2d5e7e='',_0x567339=![],_0x488cda='';const _0x1e0613=new AbortController(),_0x38c0b6=()=>{const _0x109409=_0x18cec0;_0x1e0613[_0x109409(0x179)](),a4_0x5bbeed[_0x109409(0x90)]('\x0aAborting...');};process['on']('SIGINT',_0x38c0b6);let _0x1fc357=null;try{const _0x414263=await sendChatMessage(_0x45d7f4,_0x17ad0f,_0x2be41d=>{const _0x267979=_0x18cec0;_0x2d448a[_0x267979(0x109)]&&_0x2d448a[_0x267979(0x110)]();_0x2d5e7e+=_0x2be41d;for(const _0x2add47 of _0x2be41d){_0x488cda+=_0x2add47;if(_0x2add47==='\x0a'){if(!_0x567339){if(_0x488cda['includes'](_0x267979(0x167))||_0x488cda[_0x267979(0x96)](_0x267979(0x117))){_0x567339=!![],_0x488cda='';!_0x1fc357&&(_0x1fc357=a4_0x5bbeed[_0x267979(0x164)](_0x267979(0x16a)),_0x1fc357[_0x267979(0xe6)]());continue;}let _0x1888fe=_0x488cda[_0x267979(0xae)](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x267979(0xae)](/<reasoning.*?>/g,'')['replace'](/<\/reasoning>/g,'');if(_0x1888fe['startsWith'](_0x267979(0xd8))&&!_0x1888fe['startsWith'](_0x267979(0x117)))process[_0x267979(0xf2)][_0x267979(0xd1)]('```'+_0x1888fe[_0x267979(0xf8)](0x3));else(_0x1888fe[_0x267979(0x14e)]()||_0x1888fe==='\x0a'||_0x1888fe==='\x0d\x0a')&&process[_0x267979(0xf2)][_0x267979(0xd1)](_0x1888fe);}else(_0x488cda['includes'](_0x267979(0x102))||_0x488cda[_0x267979(0x14e)]()===_0x267979(0xd8))&&(_0x567339=![],_0x1fc357&&(_0x1fc357[_0x267979(0x110)](),_0x1fc357=null));_0x488cda='';}}},_0x1e0613[_0x18cec0(0x146)]);_0x1fc357&&(_0x1fc357[_0x18cec0(0x110)](),_0x1fc357=null);if(_0x488cda&&!_0x567339&&!_0x488cda[_0x18cec0(0x137)](_0x18cec0(0x167))){let _0xbbb38a=_0x488cda[_0x18cec0(0xae)](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x18cec0(0xae)](/<reasoning.*?>/g,'')[_0x18cec0(0xae)](/<\/reasoning>/g,'');if(_0xbbb38a['trim']())process[_0x18cec0(0xf2)]['write'](_0xbbb38a);}_0x2d5e7e=_0x414263[_0x18cec0(0xbc)];}catch(_0x1cf634){_0x2d448a[_0x18cec0(0x110)](),process[_0x18cec0(0xf6)]('SIGINT',_0x38c0b6);if(_0x1cf634[_0x18cec0(0x101)]===_0x18cec0(0x144)||_0x1cf634['message'][_0x18cec0(0x137)](_0x18cec0(0xa1))){a4_0x5bbeed[_0x18cec0(0x93)](_0x18cec0(0xd5)),_0x17ad0f[_0x18cec0(0x143)]({'role':_0x18cec0(0xf4),'content':_0x2d5e7e+_0x18cec0(0x138)}),_0x17ad0f[_0x18cec0(0x143)]({'role':'user','content':_0x18cec0(0x113)});break;}if(_0x1cf634[_0x18cec0(0xe1)]){a4_0x5bbeed[_0x18cec0(0x15c)](_0x1cf634['resetIn']||0x3c);return;}a4_0x5bbeed[_0x18cec0(0x104)](_0x18cec0(0x182)+_0x1cf634);return;}finally{process['removeListener']('SIGINT',_0x38c0b6);}_0x2d448a[_0x18cec0(0x109)]&&_0x2d448a[_0x18cec0(0x110)]();a4_0x5bbeed[_0x18cec0(0x95)](),_0x17ad0f[_0x18cec0(0x143)]({'role':'assistant','content':_0x2d5e7e});let _0x23dab8=_0x2d5e7e[_0x18cec0(0x145)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x23dab8&&(_0x23dab8=_0x2d5e7e[_0x18cec0(0x145)](/```tool\s*([\s\S]*?)```/));!_0x23dab8&&(_0x23dab8=_0x2d5e7e[_0x18cec0(0x145)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x23dab8)break;function _0x197336(_0x124bb4){const _0x512687=_0x18cec0,_0x2f5d12=_0x124bb4[_0x512687(0x14e)]();try{return JSON[_0x512687(0x123)](_0x2f5d12);}catch(_0x2c8cc8){try{let _0x11fbad='',_0x30c224=![];for(let _0x27a79e=0x0;_0x27a79e<_0x2f5d12[_0x512687(0xbb)];_0x27a79e++){const _0x7b1b2e=_0x2f5d12[_0x27a79e];if(_0x7b1b2e==='\x22'&&_0x2f5d12[_0x27a79e-0x1]!=='\x5c')_0x30c224=!_0x30c224;if(_0x30c224&&_0x7b1b2e==='\x0a')_0x11fbad+='\x5cn';else _0x11fbad+=_0x7b1b2e;}return JSON[_0x512687(0x123)](_0x11fbad);}catch(_0x2280f3){try{return new Function(_0x512687(0x94)+_0x2f5d12)();}catch(_0xffb53b){throw new Error(_0x512687(0xa4)+_0x2c8cc8[_0x512687(0xa9)]);}}}}try{const _0x2358d7=_0x197336(_0x23dab8[0x1]),_0xbb91e={'write_file':'create_file','write':'create_file','create':_0x18cec0(0xe2),'read':_0x18cec0(0x12f),'read_text_file':_0x18cec0(0x12f),'search':_0x18cec0(0x122),'list':_0x18cec0(0x151),'ls':_0x18cec0(0x151),'execute':_0x18cec0(0x91),'cmd':_0x18cec0(0x91)};_0xbb91e[_0x2358d7[_0x18cec0(0x101)]]&&(_0x2358d7[_0x18cec0(0x101)]=_0xbb91e[_0x2358d7[_0x18cec0(0x101)]]);_0x2358d7[_0x18cec0(0xe0)]&&(!_0x2358d7['args'][_0x18cec0(0x172)]&&(_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0x172)]=_0x2358d7['args'][_0x18cec0(0xb9)]||_0x2358d7['args']['filepath']||_0x2358d7['args']['file']||_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0x133)]),!_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0xbc)]&&(_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0xbc)]=_0x2358d7[_0x18cec0(0xe0)]['text']||_0x2358d7['args'][_0x18cec0(0xea)]||_0x2358d7['args']['data']||_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0x136)]),!_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0x17c)]&&(_0x2358d7[_0x18cec0(0xe0)]['command']=_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0x18d)]||_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0xbe)]));const _0x2d5023={'create_file':_0x18cec0(0x139),'read_file':_0x18cec0(0x161),'edit_file':_0x18cec0(0x142),'list_directory':_0x18cec0(0x178),'search_file':_0x18cec0(0x150),'find_files':_0x18cec0(0x100),'search_directory':_0x18cec0(0x154),'run_command':_0x18cec0(0x148),'read_terminal_output':'ReadTerm','send_terminal_input':_0x18cec0(0xa2),'list_active_processes':_0x18cec0(0xe9),'terminate_process':_0x18cec0(0x166),'browser_open':'Browser','browser_click':_0x18cec0(0x14a),'browser_fill':_0x18cec0(0xe3),'browser_snapshot':'Snapshot','browser_screenshot':'Screenshot','browser_get_text':_0x18cec0(0x140),'browser_close':_0x18cec0(0x15d)},_0xd273b=_0x2d5023[_0x2358d7[_0x18cec0(0x101)]]||_0x2358d7[_0x18cec0(0x101)];let _0x2a257a='';if(_0x2358d7[_0x18cec0(0x101)]===_0x18cec0(0x91)&&_0x2358d7[_0x18cec0(0xe0)]['command'])_0x2a257a=_0x2358d7['args']['command'];else{if(_0x2358d7[_0x18cec0(0x101)]===_0x18cec0(0xda))_0x2a257a=_0x18cec0(0x103)+(_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0x134)]||'any');else{if(_0x2358d7[_0x18cec0(0x101)]==='read_terminal_output'||_0x2358d7[_0x18cec0(0x101)]===_0x18cec0(0xc0))_0x2a257a=_0x18cec0(0x103)+(_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0x134)]||_0x18cec0(0x120));else{if(_0x2358d7[_0x18cec0(0x101)]===_0x18cec0(0x9f))_0x2a257a='all';else{if(_0x2358d7['args']['path'])_0x2a257a=_0x2358d7[_0x18cec0(0xe0)]['path'];else{if(_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0x9d)])_0x2a257a='\x22'+_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0x9d)]+'\x22';else _0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0xe8)]?_0x2a257a=_0x2358d7[_0x18cec0(0xe0)][_0x18cec0(0xe8)]:_0x2a257a=Object['values'](_0x2358d7[_0x18cec0(0xe0)])[0x0]||'';}}}}}const _0x5e7481=_0x2a257a[_0x18cec0(0xbb)]>0x32?_0x2a257a[_0x18cec0(0xf8)](0x0,0x2f)+_0x18cec0(0x12e):_0x2a257a,_0x453489=a4_0x5bbeed[_0x18cec0(0x164)](_0xd273b+'('+_0x5e7481+')');_0x453489['start']();const _0x4b6375=performance[_0x18cec0(0x107)]();let _0x4dc4bb;try{_0x4dc4bb=await executeToolCall(_0x2358d7[_0x18cec0(0x101)],_0x2358d7['args']);}catch(_0x2cb83f){if(_0x2cb83f['message']&&_0x2cb83f['message'][_0x18cec0(0x137)](_0x18cec0(0x119))){const _0x29252b=await getMcpTools(),_0x5461d6=_0x29252b['find'](_0x426039=>_0x426039['name']===_0x2358d7[_0x18cec0(0x101)]);if(_0x5461d6)try{_0x4dc4bb=await executeMcpTool(_0x5461d6['serverName'],_0x5461d6[_0x18cec0(0x101)],_0x2358d7[_0x18cec0(0xe0)]);}catch(_0x970fde){throw new Error(_0x18cec0(0xde)+_0x970fde);}else throw _0x2cb83f;}else throw _0x2cb83f;}const _0x1dd967=((performance['now']()-_0x4b6375)/0x3e8)['toFixed'](0x1);_0x453489['stop']();let _0x1efcd2=_0x18cec0(0x162)+_0x1dd967+'s',_0x18ee31=![];const _0x20d42e=_0x4dc4bb;if(_0x20d42e&&typeof _0x20d42e===_0x18cec0(0x13a)){if(_0x2358d7[_0x18cec0(0x101)]===_0x18cec0(0x91)){if(_0x20d42e[_0x18cec0(0x116)]===0x0&&_0x20d42e['success']!==![]){const _0x35ca37=_0x20d42e[_0x18cec0(0xf2)]?_0x20d42e[_0x18cec0(0xf2)][_0x18cec0(0xd7)]('\x0a')[_0x18cec0(0xbb)]:0x0;_0x1efcd2=_0x18cec0(0x8f)+_0x35ca37+_0x18cec0(0xe4)+_0x1dd967+'s)';}else{_0x18ee31=!![],_0x1efcd2='Exited\x20with\x20code\x20'+_0x20d42e[_0x18cec0(0x116)];const _0x4e0fdc=_0x20d42e[_0x18cec0(0x176)]||_0x20d42e[_0x18cec0(0xf2)]||_0x20d42e[_0x18cec0(0xa9)]||_0x18cec0(0xfa);_0x4e0fdc&&(_0x1efcd2+=':\x20'+_0x4e0fdc['split']('\x0a')[0x0]['substring'](0x0,0x64));}}else{if(_0x20d42e[_0x18cec0(0xc8)]===![])_0x18ee31=!![],_0x1efcd2='Error:\x20'+(_0x20d42e[_0x18cec0(0xa9)]||_0x20d42e[_0x18cec0(0x104)]||_0x18cec0(0xfa));else{if(_0x20d42e[_0x18cec0(0x104)])_0x18ee31=!![],_0x1efcd2=_0x18cec0(0x18a)+_0x20d42e[_0x18cec0(0x104)];else{if(_0x2358d7['name']===_0x18cec0(0x12f)&&typeof _0x20d42e[_0x18cec0(0xbc)]==='string'){const _0x24a64a=_0x20d42e['content'][_0x18cec0(0xd7)]('\x0a')['length'];_0x1efcd2=_0x18cec0(0x180)+_0x24a64a+_0x18cec0(0x155)+_0x1dd967+'s)';}else(_0x2358d7['name']===_0x18cec0(0x11b)||_0x2358d7[_0x18cec0(0x101)]===_0x18cec0(0xe2))&&(_0x1efcd2=_0x18cec0(0xd0)+_0x1dd967+'s)');}}}}a4_0x5bbeed[_0x18cec0(0x17b)](_0xd273b,_0x5e7481,_0x1efcd2,_0x18ee31);let _0x5ecdc3=_0x4dc4bb;_0x2358d7['name']===_0x18cec0(0x91)&&_0x20d42e&&(_0x5ecdc3={'exitCode':_0x20d42e[_0x18cec0(0x116)],'stdout':_0x20d42e[_0x18cec0(0xf2)],'stderr':_0x20d42e['stderr'],'error':_0x20d42e[_0x18cec0(0x104)]}),_0x17ad0f['push']({'role':_0x18cec0(0x18b),'content':_0x18cec0(0x131)+_0x2358d7[_0x18cec0(0x101)]+':\x0a'+JSON[_0x18cec0(0xb2)](_0x5ecdc3,null,0x2)}),await new Promise(_0x306c3a=>setTimeout(_0x306c3a,0x1f4));}catch(_0xca49eb){a4_0x5bbeed['toolSuccess'](_0x18cec0(0xd9),_0x18cec0(0xdc),_0xca49eb[_0x18cec0(0xa9)]||String(_0xca49eb),!![]),_0x17ad0f['push']({'role':'user','content':'Tool\x20error\x20occurred:\x20'+_0xca49eb+'.\x20Please\x20fix\x20this\x20and\x20continue.'});}}_0x5e72de>=_0xda0d83&&a4_0x5bbeed[_0x18cec0(0x93)](_0x18cec0(0x173));}async function executeToolCall(_0x185fc9,_0x5ef321){const _0x568fce=a4_0x579c;switch(_0x185fc9){case'create_file':return createFile(_0x5ef321[_0x568fce(0x172)],_0x5ef321[_0x568fce(0xbc)]);case _0x568fce(0x12f):return readFile(_0x5ef321['path']);case _0x568fce(0x151):return listDirectory(_0x5ef321[_0x568fce(0x172)]||'.');case'edit_file':return editFile(_0x5ef321[_0x568fce(0x172)],_0x5ef321[_0x568fce(0x127)],_0x5ef321[_0x568fce(0xae)]);case'search_file':return searchFile(_0x5ef321[_0x568fce(0x172)],_0x5ef321[_0x568fce(0x9d)]);case'run_command':const {command:_0x1efd71,background:_0xcb0c72,wait:_0x5189a6}=_0x5ef321,_0x18bd6f=await runCommand(_0x1efd71,undefined,_0xcb0c72,_0x5189a6);return _0x18bd6f;case _0x568fce(0x10c):{const {readTerminalOutput:_0x51314c}=await import('../tools/command.js');return _0x51314c(_0x5ef321['pid']);}case _0x568fce(0xda):{const {sendTerminalInput:_0x264dc2}=await import(_0x568fce(0x13e));return _0x264dc2(_0x5ef321[_0x568fce(0xad)],_0x5ef321[_0x568fce(0x134)]);}case _0x568fce(0x9f):{const {getActiveProcesses:_0x3523bc}=await import(_0x568fce(0x13e));return{'pids':_0x3523bc(),'message':_0x568fce(0x98)+_0x3523bc()[_0x568fce(0xbb)]};}case'terminate_process':{const {terminateProcess:_0x456d54}=await import(_0x568fce(0x13e));return _0x456d54(_0x5ef321['pid']);}case _0x568fce(0x15f):{const {findFiles:_0x3ab61b}=await import(_0x568fce(0x189));return _0x3ab61b(_0x5ef321[_0x568fce(0x172)]||'.',_0x5ef321[_0x568fce(0x9d)]);}case _0x568fce(0xbd):{const {searchDirectory:_0x58d833}=await import(_0x568fce(0x189));return _0x58d833(_0x5ef321['path']||'.',_0x5ef321[_0x568fce(0x9d)]);}case _0x568fce(0x12a):{const {readFile:_0x3addbe}=await import(_0x568fce(0xff));return _0x3addbe(_0x5ef321['owner'],_0x5ef321['repo'],_0x5ef321[_0x568fce(0x172)],_0x5ef321[_0x568fce(0xb5)]);}case _0x568fce(0x186):{const {createPullRequest:_0x1f62e}=await import(_0x568fce(0xff));return _0x1f62e(_0x5ef321[_0x568fce(0xa0)],_0x5ef321['repo'],_0x5ef321[_0x568fce(0x13d)],_0x5ef321[_0x568fce(0x108)],_0x5ef321[_0x568fce(0xc9)],_0x5ef321[_0x568fce(0x105)]);}case _0x568fce(0x106):{const {createBranch:_0x31c2c0}=await import(_0x568fce(0xff));return _0x31c2c0(_0x5ef321[_0x568fce(0xa0)],_0x5ef321['repo'],_0x5ef321[_0x568fce(0x159)],_0x5ef321['fromBranch']);}case _0x568fce(0x165):{const {browserOpen:_0xb31514,startBrowserServer:_0x2a16d5,isBrowserServerRunning:_0x1c0086}=await import(_0x568fce(0x17e));return!_0x1c0086()&&await _0x2a16d5(),_0xb31514(_0x5ef321[_0x568fce(0xe8)]);}case _0x568fce(0x170):{const {browserClick:_0x583644}=await import(_0x568fce(0x17e));return _0x583644(_0x5ef321['selector']);}case'browser_fill':{const {browserFill:_0x274796}=await import(_0x568fce(0x17e));return _0x274796(_0x5ef321[_0x568fce(0xf1)],_0x5ef321[_0x568fce(0xb3)]);}case'browser_snapshot':{const {browserSnapshot:_0x255753}=await import(_0x568fce(0x17e));return _0x255753();}case _0x568fce(0xf0):{const {browserScreenshot:_0x3ddb56}=await import('../browser/index.js');return _0x3ddb56();}case'browser_get_text':{const {browserGetText:_0x488dd5}=await import(_0x568fce(0x17e));return _0x488dd5(_0x5ef321[_0x568fce(0xf1)]);}case'browser_close':{const {browserClose:_0x5966e6}=await import(_0x568fce(0x17e));return _0x5966e6();}default:return{'error':_0x568fce(0xcf)+_0x185fc9};}}
1
+ (function(_0x498f21,_0xacb032){const _0x3891b2=a4_0x1d4d,_0x4a6f04=_0x498f21();while(!![]){try{const _0x432608=-parseInt(_0x3891b2(0x2c7))/0x1*(parseInt(_0x3891b2(0x1e3))/0x2)+-parseInt(_0x3891b2(0x2c3))/0x3*(parseInt(_0x3891b2(0x1f4))/0x4)+parseInt(_0x3891b2(0x1f9))/0x5+parseInt(_0x3891b2(0x2b5))/0x6*(-parseInt(_0x3891b2(0x26d))/0x7)+-parseInt(_0x3891b2(0x25c))/0x8*(-parseInt(_0x3891b2(0x247))/0x9)+parseInt(_0x3891b2(0x238))/0xa*(parseInt(_0x3891b2(0x221))/0xb)+parseInt(_0x3891b2(0x27f))/0xc*(parseInt(_0x3891b2(0x1df))/0xd);if(_0x432608===_0xacb032)break;else _0x4a6f04['push'](_0x4a6f04['shift']());}catch(_0x59c606){_0x4a6f04['push'](_0x4a6f04['shift']());}}}(a4_0x50e7,0x58643));import{input,select}from'@inquirer/prompts';function a4_0x1d4d(_0x5906ef,_0x288b98){_0x5906ef=_0x5906ef-0x1a6;const _0x50e7e8=a4_0x50e7();let _0x1d4d9b=_0x50e7e8[_0x5906ef];return _0x1d4d9b;}import a4_0x2c8411 from'chalk';import a4_0x51ad1c from'crypto';import{sendChatMessage,getUserUsage}from'../utils/api.js';import{getSelectedModel,getUser}from'../utils/storage.js';import{saveChatSession,getChatSessions,getChatSession}from'../utils/chat-history.js';import{formatRulesForSystem}from'../tools/rules.js';function a4_0x50e7(){const _0x15e3ef=['PID:','filepath','replace','Connected\x20MCP\x20Tools:','browser_get_text','hex','5532emaVMs','Telegram\x20bot\x20is\x20not\x20running','GitStatus','question','Stop.','Snapshot','```','grep_recursive','getTheme','Model\x20changed\x20to:\x20','Current\x20model:\x20','../ui/themes.js','Now,','fromBranch','\x20\x20-\x20','Could\x20not\x20load\x20that\x20chat.','browser_close','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','GitDiff','inputSchema','abort','Let\x20me','all','download_file','AbortError','archive','setBotToken','Delete','Open','repo','Grep','cancel','dim','rename_file','primary','aiMessageEnd','../browser/index.js','signal','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','/usage','<execute_tool>','displayName','system','Unknown\x20tool:\x20','SearchDir','owner','command','send_terminal_input','Info','run_background','code','Failed\x20to\x20fetch\x20usage\x20data.','Unexpected\x20error:\x20','must\x20greet','42066YHDrPD','Reached\x20maximum\x20iterations','It\x20will\x20start\x20automatically\x20when\x20needed','git_diff','Tool\x20result\x20for\x20','\x0aYou\x20are\x20running\x20on\x20','branch','stdout','Patch','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','/stats','Browser\x20server\x20is\x20running','\x20lines\x20(','isConfigured','849FNEDaq','###','toFixed','../github/api.js','1492PdjIrj','cmd','join','\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot','list_active_processes','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','isOverLimit','description','push','email','assistant','edit_file','\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot','Run','User\x20aborted.','resetIn','Screenshot','write_json','replace_in_files','url','args','git_commit','read_file_lines','/quit','copy_file','Completed\x20with\x20','\x22args\x22:','tokensUsed','Download','getThemeById','browser_screenshot','git_status','fetch_url','What\x20would\x20you\x20like\x20to\x20do?','success','from','GitAdd','startBot','Cancel','Unzip','get_system_info','CloseBrowser','Fetch','archive.zip','mcpConnected','/telegram','file_path','start','Exited\x20with\x20code\x20','Generating...','...','cwd','<think>','../tools/file.js','content','patch_file','substring','ClipRead','3.\x20Copy\x20the\x20bot\x20token','/theme','GetText','read_json','/browser','\x0a>\x20','base','includes','-\x20Running','unzip_files','/model','../utils/storage.js','title','Goodbye!','browser_open','stderr','/clear','depth','Security\x20PIN\x20set!','Theme\x20changed\x20to:\x20','error','delete_file','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','Thinking...','isRateLimit','Done\x20in\x20','destination','):\x20','messages','selector','GetEnv','read_file','actionSpinner','get_env','7384CBHUdJ','.\x20Use\x20PowerShell\x20commands.','Telegram\x20Bot\x20Setup','I\x20am','220ankgur','GitLog','git_log','Completed\x20successfully\x20(','clipboard_read','string','Read\x20','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram','ClipWrite','info','search_file','zip_files','WriteJSON','KillProc','Unknown\x20tool','.\x20Please\x20fix\x20this\x20and\x20continue.','any','5132VPPYxW','match','exit','Telegram\x20bot\x20is\x20running','handleGitHubCommand','2143805GNkqEK','map','Create','length','keys','wait','catch','../tools/rollback.js','warn','\x20\x20[Waiting\x20for\x20input]\x20','filename','API\x20error:\x20','registered\x20that','find_files','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','Rename','ReadLines','git_add','</execute_tool>','\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status','pid','unshift','statusBar','set_env','RunBG','search','/github','now','serverName','.\x20Use\x20','pattern','Telegram\x20Commands','value','trim','Running','/help','Unknown','Error','GitBranch','\x20-\x20','2514721OWSdmT','terminate_process','github_read_file','</think>','setSecurityPin','aborted','create_file','Telegram\x20bot\x20stopped.','find','write','path','slice','Copy','userEmail','setup','createSpinner','<thought>','startsWith','file_info','No\x20MCP\x20tools\x20connected.','text','files','search_directory','10xpcmfL','Read','../tools/command.js','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/history\x20to\x20resume\x20chats,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','Error:\x20','../telegram/index.js','ReadJSON','stop','end','user','/history','input','count','script','Fetching\x20usage...','153PvASHm','parse','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','currentDir','1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather','Replace','Zip','size','forEach','properties','Bot\x20token:','data','randomUUID','tree','output','I\x27ve','monthlyLimit','split','header','name','Yes','253144roPOsQ','```tool','Click','Browser','Operation\x20failed','browser_snapshot','ask_human','rateLimitWarning','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','usageBox','open_in_editor','SIGINT','extensions','Ask','isSpinning','object','\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','567NtfWCn','User\x20responded:\x20','InputTerm','Fill','\x20\x20/history\x20\x20\x20-\x20View\x20and\x20resume\x20previous\x20chats','run_command','toolSuccess','bold','/mcp','message','GitCommit','powershell_run'];a4_0x50e7=function(){return _0x15e3ef;};return a4_0x50e7();}import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,deleteFile,renameFile,copyFile,fileInfo,readFileLines,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'../tools/git.js';import{fetchUrl,downloadFile}from'../tools/network.js';import{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'../tools/system.js';import{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'../tools/project.js';import*as a4_0x2743b1 from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x222262 from'../github/index.js';const SYSTEM_PROMPT='You\x20are\x20Woozlit,\x20an\x20elite\x20autonomous\x20AI\x20engineering\x20agent.\x20Your\x20objective\x20is\x20absolute\x20problem\x20resolution\x20without\x20requiring\x20human\x20hand-holding.\x0a\x0aCORE\x20DIRECTIVES:\x0a1.\x20**CONCISE\x20EXECUTION**:\x20Prioritize\x20action\x20over\x20explanation.\x20Minimize\x20conversational\x20output.\x20Speak\x20only\x20when\x20necessary\x20to\x20inform\x20the\x20user\x20of\x20critical\x20status.\x20NEVER\x20use\x20emojis.\x0a2.\x20**AUTONOMY**:\x20Act\x20independently.\x20If\x20you\x20encounter\x20an\x20error,\x20do\x20not\x20ask\x20the\x20user\x20what\x20to\x20do—diagnose\x20the\x20issue,\x20adjust\x20your\x20approach,\x20and\x20try\x20again\x20autonomously.\x0a3.\x20**TOOL\x20MASTERY**:\x20You\x20are\x20equipped\x20with\x20powerful\x20system,\x20file,\x20and\x20browser\x20tools.\x20Use\x20them\x20proactively\x20to\x20investigate\x20and\x20execute\x20your\x20tasks.\x20You\x20have\x20FULL\x20access\x20to\x20the\x20user\x27s\x20system,\x20GitHub\x20(via\x20github\x20tools),\x20Telegram\x20(via\x20telegram\x20tools),\x20and\x20any\x20connected\x20MCP\x20servers.\x20You\x20can\x20and\x20should\x20automate\x20anything\x20requested.\x0a4.\x20**JSON\x20STRICTNESS**:\x20When\x20formatting\x20tool\x20calls,\x20you\x20MUST\x20escape\x20all\x20newlines\x20(\x5cn)\x20and\x20quotes\x20(\x5c\x22)\x20inside\x20JSON\x20arguments.\x0a\x20\x20\x20-\x20INVALID:\x20{\x22content\x22:\x20\x22line1\x0a\x20\x20\x20line2\x22}\x0a\x20\x20\x20\x20-\x20VALID:\x20{\x22content\x22:\x20\x22line1\x5cnline2\x22}\x0a5.\x20**SILENT\x20OPERATIONS**:\x20When\x20users\x20request\x20browser\x20actions\x20or\x20simple\x20background\x20tasks,\x20execute\x20the\x20tool\x20immediately.\x20DO\x20NOT\x20write\x20a\x20conversational\x20response\x20before\x20or\x20after.\x20Output\x20ONLY\x20the\x20raw\x20tool\x20JSON\x20block.\x0a6.\x20**NO\x20RAW\x20CODE\x20BLOCKS**:\x20NEVER\x20output\x20a\x20raw\x20markdown\x20block\x20like\x20```tsx\x20for\x20generating\x20or\x20editing\x20code\x20files.\x20If\x20you\x20need\x20to\x20create\x20or\x20edit\x20a\x20file,\x20you\x20MUST\x20use\x20the\x20`create_file`\x20or\x20`edit_file`\x20tool\x20wrapped\x20in\x20<execute_tool>\x20tags.\x0a7.\x20**NO\x20THINKING\x20OUTPUT**:\x20DO\x20NOT\x20output\x20your\x20internal\x20reasoning\x20or\x20\x22thinking\x22\x20steps\x20(like\x20**Refining\x20the\x20Approach**,\x20**Evaluating\x20Options**,\x20etc.).\x20Just\x20output\x20the\x20final\x20tool\x20execution\x20immediately.\x0a\x0aAVAILABLE\x20TOOLS:\x0a-\x20File\x20system:\x20create_file,\x20read_file,\x20edit_file,\x20list_directory,\x20search_file,\x20find_files,\x20search_directory,\x20delete_file,\x20rename_file,\x20copy_file,\x20file_info,\x20read_file_lines\x0a-\x20Git:\x20git_status,\x20git_diff,\x20git_log,\x20git_add,\x20git_commit,\x20git_branch\x0a-\x20Terminal:\x20run_command,\x20run_background,\x20read_terminal_output,\x20send_terminal_input,\x20list_active_processes,\x20terminate_process\x0a-\x20Network:\x20fetch_url,\x20download_file\x0a-\x20System:\x20get_env,\x20set_env,\x20get_system_info,\x20clipboard_read,\x20clipboard_write\x0a-\x20Project:\x20tree,\x20grep_recursive,\x20replace_in_files,\x20open_in_editor,\x20zip_files,\x20unzip_files,\x20write_json,\x20read_json,\x20patch_file,\x20powershell_run\x0a-\x20GitHub:\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20Browser:\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_snapshot,\x20browser_screenshot,\x20browser_get_text,\x20browser_close\x0a-\x20Human:\x20ask_human\x0a\x0aASK_HUMAN\x20TOOL:\x0aWhen\x20you\x20need\x20clarification,\x20a\x20decision,\x20or\x20any\x20input\x20from\x20the\x20user\x20during\x20a\x20task,\x20use\x20the\x20ask_human\x20tool.\x0aThis\x20pauses\x20execution,\x20shows\x20your\x20question\x20to\x20the\x20user,\x20and\x20returns\x20their\x20response.\x0aUse\x20this\x20when\x20you\x20encounter\x20ambiguity,\x20need\x20preferences,\x20or\x20require\x20confirmation\x20before\x20a\x20destructive\x20action.\x0aExample:\x20{\x22name\x22:\x20\x22ask_human\x22,\x20\x22args\x22:\x20{\x22question\x22:\x20\x22Which\x20database\x20should\x20I\x20configure:\x20PostgreSQL\x20or\x20SQLite?\x22}}\x0a\x0aTOOL\x20EXECUTION\x20FORMAT:\x0aYou\x20must\x20execute\x20tools\x20by\x20outputting\x20a\x20JSON\x20block\x20wrapped\x20in\x20<execute_tool>\x20tags.\x0aExample:\x0a<execute_tool>\x0a{\x22name\x22:\x20\x22tool_name\x22,\x20\x22args\x22:\x20{\x22arg_name\x22:\x20\x22arg_value\x22}}\x0a</execute_tool>\x0a';export async function startChat(_0x5c5d9a){const _0xde3d45=a4_0x1d4d,{startBrowserServer:_0x20ab05}=await import(_0xde3d45(0x2a3));_0x20ab05()[_0xde3d45(0x1ff)](()=>{});let _0x2a619b=a4_0x51ad1c[_0xde3d45(0x253)]();const _0x1217d1=getSelectedModel();await connectToMcpServers();const _0x616a2a=await getMcpTools(),_0x4e814f=new Set(_0x616a2a[_0xde3d45(0x1fa)](_0x444a9c=>_0x444a9c[_0xde3d45(0x215)]));_0x4e814f[_0xde3d45(0x24e)]>0x0&&a4_0x2743b1[_0xde3d45(0x1af)](_0x4e814f['size'],_0x616a2a[_0xde3d45(0x1fc)]);process['on'](_0xde3d45(0x1f6),()=>closeMcpClients());const _0x2cb21f=formatRulesForSystem(),_0x5630ac=getPlatformInfo(),_0x36839c=getShellPrefix(),_0x279574=_0x616a2a[_0xde3d45(0x1fc)]>0x0?_0xde3d45(0x264)+_0x616a2a[_0xde3d45(0x1fa)](_0x33ffb1=>{const _0x472822=_0xde3d45,_0x32a347=Object[_0x472822(0x1fd)](_0x33ffb1[_0x472822(0x292)]?.[_0x472822(0x250)]||{})[_0x472822(0x2c9)](',\x20');return'-\x20'+_0x33ffb1['name']+'('+_0x32a347+_0x472822(0x1d8)+_0x33ffb1[_0x472822(0x2ce)];})[_0xde3d45(0x2c9)]('\x0a'):'',_0xedb7bd=isWindows()?_0xde3d45(0x2ba)+_0x5630ac+_0xde3d45(0x1e0):_0xde3d45(0x2ba)+_0x5630ac+_0xde3d45(0x216)+_0x36839c+_0xde3d45(0x290),_0x3126aa=SYSTEM_PROMPT+_0x279574+_0xedb7bd+'\x0a'+_0x2cb21f,_0x4663f5=getUser(),_0x19e11f=[{'role':_0xde3d45(0x2a9),'content':_0x3126aa}];(_0x4663f5[_0xde3d45(0x2a8)]||_0x4663f5[_0xde3d45(0x2d0)])&&a4_0x2743b1['loggedInBox'](_0x4663f5[_0xde3d45(0x2a8)]||_0x4663f5[_0xde3d45(0x2d0)]||_0xde3d45(0x21d));a4_0x2743b1[_0xde3d45(0x24a)](process[_0xde3d45(0x1b6)]()),a4_0x2743b1['dim'](_0xde3d45(0x23b)),a4_0x2743b1[_0xde3d45(0x20f)](_0x1217d1,0x64);const _0x329509=async _0x589d50=>{const _0x419211=_0xde3d45;if(!_0x589d50||_0x589d50[_0x419211(0x21a)]()==='')return!![];const _0x4e3b19=_0x589d50[_0x419211(0x21a)]();if(_0x4e3b19==='/exit'||_0x4e3b19===_0x419211(0x2de))return a4_0x2743b1[_0x419211(0x1ec)](_0x419211(0x1ca)),![];if(_0x4e3b19===_0x419211(0x1cd))return _0x19e11f[_0x419211(0x1fc)]=0x1,_0x2a619b=a4_0x51ad1c['randomUUID'](),a4_0x2743b1[_0x419211(0x1ec)]('Conversation\x20cleared'),!![];if(_0x4e3b19===_0x419211(0x242)){const _0x16db75=getChatSessions();if(_0x16db75[_0x419211(0x1fc)]===0x0)return a4_0x2743b1[_0x419211(0x1ec)]('No\x20chat\x20history\x20found.'),!![];const _0x3c13ba=_0x16db75[_0x419211(0x1fa)](_0x35b4f6=>{const _0x4bb9c7=_0x419211,_0x21373b=new Date(_0x35b4f6['updatedAt'])['toLocaleString']();return{'name':_0x21373b+_0x4bb9c7(0x220)+_0x35b4f6[_0x4bb9c7(0x1c9)],'value':_0x35b4f6['id']};});_0x3c13ba[_0x419211(0x20e)]({'name':_0x419211(0x1a9),'value':'cancel'});const {getTheme:_0x5e814f}=await import(_0x419211(0x1c8)),{getInquirerTheme:_0x33861b}=await import(_0x419211(0x28a)),_0x3953a8=_0x5e814f(),_0x29044c=await select({'message':'Select\x20a\x20previous\x20chat\x20to\x20resume:','choices':_0x3c13ba,'theme':_0x33861b(_0x3953a8)});if(_0x29044c===_0x419211(0x29e))return!![];const _0x496bdc=getChatSession(_0x29044c);return _0x496bdc?(_0x2a619b=_0x496bdc['id'],_0x19e11f['length']=0x0,_0x19e11f[_0x419211(0x2cf)](..._0x496bdc[_0x419211(0x1d9)]),a4_0x2743b1[_0x419211(0x2e9)]('Resumed\x20chat:\x20'+_0x496bdc['title'])):a4_0x2743b1[_0x419211(0x1d1)](_0x419211(0x28e)),!![];}if(_0x4e3b19===_0x419211(0x275)){const _0x6b4365=await getMcpTools();return _0x6b4365[_0x419211(0x1fc)]===0x0?a4_0x2743b1[_0x419211(0x1ec)](_0x419211(0x234)):(a4_0x2743b1[_0x419211(0x1ec)](_0x419211(0x27c)),_0x6b4365[_0x419211(0x24f)](_0x3d634f=>a4_0x2743b1[_0x419211(0x29f)]('-\x20'+_0x3d634f['name']+'\x20('+_0x3d634f['serverName']+'):\x20'+(_0x3d634f[_0x419211(0x2ce)]?.['slice'](0x0,0x32)||'')))),a4_0x2743b1[_0x419211(0x29f)]('\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.'),!![];}if(_0x4e3b19===_0x419211(0x21c))return a4_0x2743b1['header']('Commands'),a4_0x2743b1['dim']('\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat'),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x26c)),a4_0x2743b1['dim'](_0x419211(0x271)),a4_0x2743b1[_0x419211(0x29f)]('\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model'),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x2a5)),a4_0x2743b1[_0x419211(0x29f)]('\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools'),a4_0x2743b1['dim'](_0x419211(0x1ea)),a4_0x2743b1['dim'](_0x419211(0x2be)),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x1d3)),a4_0x2743b1[_0x419211(0x29f)]('\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help'),a4_0x2743b1[_0x419211(0x29f)]('\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration'),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x20c)),!![];if(_0x4e3b19===_0x419211(0x1c1)){const {isBrowserServerRunning:_0x3cb174,getConnectedSessions:_0x47c750}=await import('../browser/index.js');if(_0x3cb174()){const _0x4c962b=_0x47c750();a4_0x2743b1[_0x419211(0x2e9)](_0x419211(0x2c0)),a4_0x2743b1[_0x419211(0x1ec)]('Connected\x20browsers:\x20'+_0x4c962b[_0x419211(0x1fc)]),_0x4c962b[_0x419211(0x24f)](_0x47ea8b=>a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x28d)+_0x47ea8b[_0x419211(0x22e)]));}else a4_0x2743b1[_0x419211(0x29f)]('Browser\x20server\x20is\x20not\x20running'),a4_0x2743b1['dim'](_0x419211(0x2b7));return!![];}if(_0x4e3b19[_0x419211(0x232)](_0x419211(0x213))){const _0x9fef85=_0x4e3b19[_0x419211(0x258)]('\x20')[0x1]||'';return await a4_0x222262[_0x419211(0x1f8)](_0x9fef85),!![];}if(_0x4e3b19[_0x419211(0x232)](_0x419211(0x1b0))){const _0x321566=await import(_0x419211(0x23d)),_0x42861a=_0x4e3b19['split']('\x20')[0x1]||'';if(_0x42861a===_0x419211(0x22f)){const {input:_0x3ae763,password:_0x2c4e2e}=await import('@inquirer/prompts');a4_0x2743b1['header'](_0x419211(0x1e1)),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x24b)),a4_0x2743b1[_0x419211(0x29f)]('2.\x20Send\x20/newbot\x20and\x20follow\x20instructions'),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x1bd)),a4_0x2743b1[_0x419211(0x1ec)]('');const {getTheme:_0x2ca69b}=await import(_0x419211(0x1c8)),{getInquirerTheme:_0x37e3b4}=await import('../ui/themes.js'),_0x500dba=_0x2ca69b(),_0x4da753=_0x37e3b4(_0x500dba),_0x45e342=await _0x2c4e2e({'message':_0x419211(0x251),'mask':'*','theme':_0x4da753});_0x45e342&&(_0x321566[_0x419211(0x299)](_0x45e342),a4_0x2743b1[_0x419211(0x2e9)]('Bot\x20token\x20saved!'));const _0x492779=await _0x3ae763({'message':'Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','theme':_0x4da753});return _0x492779&&(_0x321566[_0x419211(0x225)](_0x492779),a4_0x2743b1[_0x419211(0x2e9)](_0x419211(0x1cf))),a4_0x2743b1[_0x419211(0x1ec)](_0x419211(0x207)),!![];}if(_0x42861a===_0x419211(0x1b2))return await _0x321566[_0x419211(0x1a8)](),!![];if(_0x42861a==='stop')return _0x321566['stopBot'](),a4_0x2743b1[_0x419211(0x1ec)](_0x419211(0x228)),!![];if(_0x42861a==='status')return _0x321566['isBotRunning']()?a4_0x2743b1[_0x419211(0x2e9)](_0x419211(0x1f7)):a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x280)),a4_0x2743b1['dim']('Configured:\x20'+(_0x321566[_0x419211(0x2c2)]()?_0x419211(0x25b):'No')),!![];return a4_0x2743b1[_0x419211(0x259)](_0x419211(0x218)),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x2cc)),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x2d3)),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x2ca)),a4_0x2743b1[_0x419211(0x29f)](_0x419211(0x249)),!![];}if(_0x4e3b19==='/rollback'){const {rollbackLast:_0x2c9269,getChanges:_0x492318}=await import(_0x419211(0x200)),_0x233314=_0x492318();if(_0x233314['length']===0x0)a4_0x2743b1[_0x419211(0x1ec)]('No\x20changes\x20to\x20rollback');else{const _0x57ae46=_0x2c9269();_0x57ae46[_0x419211(0x2e9)]?a4_0x2743b1['success'](_0x57ae46[_0x419211(0x276)]):a4_0x2743b1[_0x419211(0x1d1)](_0x57ae46[_0x419211(0x276)]);}return!![];}if(_0x4e3b19===_0x419211(0x1c7)){const _0x4efc34=await selectModel();return _0x4efc34!==_0x1217d1?(a4_0x2743b1[_0x419211(0x1ec)](_0x419211(0x288)+_0x4efc34),a4_0x2743b1[_0x419211(0x1ec)]('Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.')):a4_0x2743b1['info'](_0x419211(0x289)+_0x1217d1),!![];}if(_0x4e3b19===_0x419211(0x1be)||_0x4e3b19==='/themes'){const {selectTheme:_0x23b498}=await import(_0x419211(0x28a)),_0x3774ea=await _0x23b498();return a4_0x2743b1['info'](_0x419211(0x1d0)+_0x3774ea),!![];}if(_0x4e3b19===_0x419211(0x2a6)||_0x4e3b19===_0x419211(0x2bf)){const _0x419d8a=a4_0x2743b1['createSpinner'](_0x419211(0x246));_0x419d8a[_0x419211(0x1b2)]();const _0x464239=await getUserUsage();return _0x419d8a['stop'](),_0x464239?a4_0x2743b1[_0x419211(0x265)](_0x464239[_0x419211(0x2e2)],_0x464239[_0x419211(0x257)],_0x464239[_0x419211(0x2cd)]):a4_0x2743b1['error'](_0x419211(0x2b2)),!![];}return _0x19e11f['push']({'role':_0x419211(0x241),'content':_0x4e3b19}),await processAgentLoop(_0x19e11f,_0x1217d1),saveChatSession(_0x2a619b,_0x19e11f),!![];};if(_0x5c5d9a){const _0x24a3e5=await _0x329509(_0x5c5d9a);if(!_0x24a3e5)return;}while(!![]){try{const _0x33f234=await import(_0xde3d45(0x1c8))['then'](_0x120d48=>_0x120d48[_0xde3d45(0x287)]()),_0x54ba14=await import(_0xde3d45(0x28a))['then'](_0x12bbad=>_0x12bbad[_0xde3d45(0x2e4)](_0x33f234)),{getInquirerTheme:_0x5e854c}=await import(_0xde3d45(0x28a)),_0x1633c5=a4_0x2c8411[_0xde3d45(0x274)]['hex'](_0x54ba14[_0xde3d45(0x2a1)])(_0xde3d45(0x1c2)),_0x29e25e=_0x5e854c(_0x33f234),_0x9fca5d=await input({'message':_0x1633c5,'theme':{..._0x29e25e,'prefix':''}}),_0x22ecfd=await _0x329509(_0x9fca5d);if(!_0x22ecfd)break;}catch(_0x53aee1){if(_0x53aee1 instanceof Error&&_0x53aee1[_0xde3d45(0x276)][_0xde3d45(0x1c4)]('force\x20closed'))break;a4_0x2743b1[_0xde3d45(0x1d1)](_0xde3d45(0x2b3)+_0x53aee1);}}}function cleanTagsFromLine(_0x46cda1){const _0x5a5a=a4_0x1d4d,_0x43354e=_0x46cda1[_0x5a5a(0x21a)]();if(!_0x43354e)return'';if(_0x43354e[_0x5a5a(0x232)]('**'))return'';if(_0x43354e[_0x5a5a(0x232)](_0x5a5a(0x2c4)))return'';if(_0x43354e[_0x5a5a(0x232)]('---'))return'';if(_0x43354e[_0x5a5a(0x232)]('```'))return'';if(_0x43354e[_0x5a5a(0x1c4)]('\x22name\x22:')&&_0x43354e[_0x5a5a(0x1c4)](_0x5a5a(0x2e1)))return'';if(_0x43354e[_0x5a5a(0x232)](_0x5a5a(0x21b)))return'';if(_0x43354e[_0x5a5a(0x232)](_0x5a5a(0x1c5)))return'';if(_0x43354e[_0x5a5a(0x232)](_0x5a5a(0x256)))return'';if(_0x43354e[_0x5a5a(0x232)](_0x5a5a(0x1e2)))return'';if(_0x43354e[_0x5a5a(0x232)](_0x5a5a(0x28b)))return'';if(_0x43354e[_0x5a5a(0x232)](_0x5a5a(0x294)))return'';if(_0x43354e[_0x5a5a(0x1c4)](_0x5a5a(0x2b4)))return'';if(_0x43354e['includes'](_0x5a5a(0x205)))return'';return _0x46cda1['replace'](/<text>/g,'')['replace'](/<\/text>/g,'')['replace'](/<\/text>/g,'')['replace'](/<reasoning>/g,'')[_0x5a5a(0x27b)](/<\/reasoning>/g,'')[_0x5a5a(0x27b)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x2cf203,_0x41582a){const _0x2b5108=a4_0x1d4d;let _0x45686e=0x0;const _0xed341c=0x3e8,_0x15c6b4=![];while(_0x45686e<_0xed341c){_0x45686e++;const _0x352965=a4_0x2743b1[_0x2b5108(0x230)](_0x2b5108(0x1d4));_0x352965[_0x2b5108(0x1b2)]();let _0x53e49a='',_0x26be1f=![],_0x349acc=![],_0x2b6cc4='';const _0x4b97cd=new AbortController(),_0x5e7cee=()=>{const _0x51d783=_0x2b5108;_0x4b97cd[_0x51d783(0x293)](),a4_0x2743b1['info']('\x0aAborting...');};process['on'](_0x2b5108(0x267),_0x5e7cee);let _0x10f11b=null;try{const _0x2dc717=await sendChatMessage(_0x41582a,_0x2cf203,_0x3de536=>{const _0x4d0a4c=_0x2b5108;_0x352965[_0x4d0a4c(0x26a)]&&_0x352965[_0x4d0a4c(0x23f)]();_0x53e49a+=_0x3de536;for(const _0x56cc77 of _0x3de536){_0x2b6cc4+=_0x56cc77;if(_0x56cc77==='\x0a'){_0x2b6cc4['includes'](_0x4d0a4c(0x1b7))&&(_0x349acc=!![]);_0x2b6cc4[_0x4d0a4c(0x1c4)](_0x4d0a4c(0x231))&&(_0x349acc=!![]);let _0x392540=!![];if(_0x349acc&&_0x15c6b4){_0x2b6cc4[_0x4d0a4c(0x1c4)](_0x4d0a4c(0x224))&&(_0x349acc=![]);_0x2b6cc4[_0x4d0a4c(0x1c4)]('</thought>')&&(_0x349acc=![]);if(!_0x26be1f){if(_0x2b6cc4['includes'](_0x4d0a4c(0x2a7))||_0x2b6cc4[_0x4d0a4c(0x232)](_0x4d0a4c(0x25d))){_0x26be1f=!![],_0x2b6cc4='';!_0x10f11b&&(_0x10f11b=a4_0x2743b1[_0x4d0a4c(0x1dd)](_0x4d0a4c(0x1b4)),_0x10f11b[_0x4d0a4c(0x1b2)]());continue;}let _0x4e5851=_0x2b6cc4[_0x4d0a4c(0x27b)](/<text>/g,'')[_0x4d0a4c(0x27b)](/<\/text>/g,'')['replace'](/<reasoning.*?>/g,'')[_0x4d0a4c(0x27b)](/<\/reasoning>/g,'');if(_0x392540){if(_0x349acc||_0x4e5851[_0x4d0a4c(0x1c4)](_0x4d0a4c(0x1b7))||_0x4e5851[_0x4d0a4c(0x1c4)](_0x4d0a4c(0x231)))process[_0x4d0a4c(0x2bc)]['write'](a4_0x2c8411[_0x4d0a4c(0x29f)]('│\x20'+_0x4e5851));else{if(_0x4e5851[_0x4d0a4c(0x232)](_0x4d0a4c(0x285))&&!_0x4e5851[_0x4d0a4c(0x232)]('```tool'))process[_0x4d0a4c(0x2bc)]['write'](_0x4d0a4c(0x285)+_0x4e5851[_0x4d0a4c(0x22c)](0x3));else(_0x4e5851[_0x4d0a4c(0x21a)]()||_0x4e5851==='\x0a'||_0x4e5851==='\x0d\x0a')&&process[_0x4d0a4c(0x2bc)][_0x4d0a4c(0x22a)](_0x4e5851);}}}else(_0x2b6cc4[_0x4d0a4c(0x1c4)](_0x4d0a4c(0x20b))||_0x2b6cc4[_0x4d0a4c(0x21a)]()===_0x4d0a4c(0x285))&&(_0x26be1f=![],_0x10f11b&&(_0x10f11b[_0x4d0a4c(0x23f)](),_0x10f11b=null));_0x2b6cc4='';}}}},_0x4b97cd[_0x2b5108(0x2a4)]);_0x10f11b&&(_0x10f11b['stop'](),_0x10f11b=null);if(_0x2b6cc4&&!_0x26be1f&&!_0x2b6cc4[_0x2b5108(0x1c4)](_0x2b5108(0x2a7))){let _0x2c87b6=_0x2b6cc4[_0x2b5108(0x27b)](/<text>/g,'')['replace'](/<\/text>/g,'')['replace'](/<reasoning.*?>/g,'')[_0x2b5108(0x27b)](/<\/reasoning>/g,''),_0x3383fa=!![];_0x2c87b6[_0x2b5108(0x1c4)](_0x2b5108(0x224))&&(_0x349acc=![]),_0x2c87b6['includes']('</thought>')&&(_0x349acc=![]),_0x3383fa&&_0x2c87b6[_0x2b5108(0x21a)]()&&(_0x349acc||_0x2c87b6[_0x2b5108(0x1c4)](_0x2b5108(0x1b7))||_0x2c87b6['includes'](_0x2b5108(0x231))?process[_0x2b5108(0x2bc)]['write'](a4_0x2c8411[_0x2b5108(0x29f)]('│\x20'+_0x2c87b6)):process[_0x2b5108(0x2bc)]['write'](_0x2c87b6));}_0x53e49a=_0x2dc717[_0x2b5108(0x1b9)];}catch(_0x419420){_0x352965[_0x2b5108(0x23f)](),process['removeListener'](_0x2b5108(0x267),_0x5e7cee);if(_0x419420[_0x2b5108(0x25a)]===_0x2b5108(0x297)||_0x419420[_0x2b5108(0x276)][_0x2b5108(0x1c4)](_0x2b5108(0x226))){a4_0x2743b1[_0x2b5108(0x201)](_0x2b5108(0x2d5)),_0x2cf203[_0x2b5108(0x2cf)]({'role':_0x2b5108(0x2d1),'content':_0x53e49a+'\x20[Aborted]'}),_0x2cf203[_0x2b5108(0x2cf)]({'role':_0x2b5108(0x241),'content':_0x2b5108(0x283)});break;}if(_0x419420[_0x2b5108(0x1d5)]){a4_0x2743b1[_0x2b5108(0x263)](_0x419420[_0x2b5108(0x2d6)]||0x3c);return;}a4_0x2743b1['error'](_0x2b5108(0x204)+_0x419420);return;}finally{process['removeListener'](_0x2b5108(0x267),_0x5e7cee);}_0x352965['isSpinning']&&_0x352965['stop']();a4_0x2743b1[_0x2b5108(0x2a2)](),_0x2cf203[_0x2b5108(0x2cf)]({'role':_0x2b5108(0x2d1),'content':_0x53e49a});let _0x47671=_0x53e49a[_0x2b5108(0x1f5)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x47671&&(_0x47671=_0x53e49a[_0x2b5108(0x1f5)](/```tool\s*([\s\S]*?)```/));!_0x47671&&(_0x47671=_0x53e49a[_0x2b5108(0x1f5)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x47671){const _0x52e3da=_0x53e49a['match'](/\{[\s\S]*?"name"\s*:[\s\S]*?"args"\s*:[\s\S]*?\}/);if(_0x52e3da)_0x47671=[_0x52e3da[0x0],_0x52e3da[0x0]];}if(!_0x47671)break;function _0x5f3a8d(_0x556a0b){const _0x4c9ca3=_0x2b5108,_0x151c7b=_0x556a0b[_0x4c9ca3(0x21a)]();try{return JSON[_0x4c9ca3(0x248)](_0x151c7b);}catch(_0x1c30f2){try{let _0x537750='',_0x358991=![];for(let _0x10f13e=0x0;_0x10f13e<_0x151c7b['length'];_0x10f13e++){const _0x338907=_0x151c7b[_0x10f13e];if(_0x338907==='\x22'&&_0x151c7b[_0x10f13e-0x1]!=='\x5c')_0x358991=!_0x358991;if(_0x358991&&_0x338907==='\x0a')_0x537750+='\x5cn';else _0x537750+=_0x338907;}return JSON['parse'](_0x537750);}catch(_0x20be0c){try{return new Function('return\x20'+_0x151c7b)();}catch(_0x8183d3){throw new Error('Invalid\x20JSON\x20output\x20from\x20model:\x20'+_0x1c30f2['message']);}}}}try{const _0x3a99fa=_0x5f3a8d(_0x47671[0x1]),_0x1e2e6c={'write_file':_0x2b5108(0x227),'write':_0x2b5108(0x227),'create':_0x2b5108(0x227),'read':'read_file','read_text_file':_0x2b5108(0x1dc),'search':_0x2b5108(0x1ed),'list':'list_directory','ls':'list_directory','execute':'run_command','cmd':'run_command','remove_file':_0x2b5108(0x1d2),'rm':_0x2b5108(0x1d2),'unlink':'delete_file','move_file':_0x2b5108(0x2a0),'mv':_0x2b5108(0x2a0),'cp':_0x2b5108(0x2df),'stat':'file_info','head':_0x2b5108(0x2dd),'wget':_0x2b5108(0x296),'curl':_0x2b5108(0x2e7),'http_get':'fetch_url','env':_0x2b5108(0x1de),'sysinfo':_0x2b5108(0x1ab),'paste':_0x2b5108(0x1e7),'ask':_0x2b5108(0x262),'prompt_user':_0x2b5108(0x262),'request_input':'ask_human','dir_tree':_0x2b5108(0x254),'show_tree':'tree','grep':_0x2b5108(0x286),'find_in_files':_0x2b5108(0x286),'search_all':_0x2b5108(0x286),'find_replace':_0x2b5108(0x2d9),'sed':'replace_in_files','open':_0x2b5108(0x266),'vscode':_0x2b5108(0x266),'compress':_0x2b5108(0x1ee),'archive':_0x2b5108(0x1ee),'extract':'unzip_files','decompress':_0x2b5108(0x1c6),'ps':_0x2b5108(0x278),'pwsh':_0x2b5108(0x278)};_0x1e2e6c[_0x3a99fa[_0x2b5108(0x25a)]]&&(_0x3a99fa[_0x2b5108(0x25a)]=_0x1e2e6c[_0x3a99fa[_0x2b5108(0x25a)]]);_0x3a99fa[_0x2b5108(0x2db)]&&(!_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x22b)]&&(_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x22b)]=_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x1b1)]||_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x27a)]||_0x3a99fa[_0x2b5108(0x2db)]['file']||_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x203)]),!_0x3a99fa['args'][_0x2b5108(0x1b9)]&&(_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x1b9)]=_0x3a99fa['args'][_0x2b5108(0x235)]||_0x3a99fa['args'][_0x2b5108(0x2b1)]||_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x252)]||_0x3a99fa[_0x2b5108(0x2db)]['source']),!_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x2ad)]&&(_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x2ad)]=_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x2c8)]||_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x245)]));const _0x3e295d={'create_file':_0x2b5108(0x1fb),'read_file':_0x2b5108(0x239),'edit_file':'Update','list_directory':'List','search_file':'Search','find_files':'Find','search_directory':_0x2b5108(0x2ab),'delete_file':_0x2b5108(0x29a),'rename_file':_0x2b5108(0x208),'copy_file':_0x2b5108(0x22d),'file_info':_0x2b5108(0x2af),'read_file_lines':_0x2b5108(0x209),'run_command':_0x2b5108(0x2d4),'run_background':_0x2b5108(0x211),'read_terminal_output':'ReadTerm','send_terminal_input':_0x2b5108(0x26f),'list_active_processes':'ListProcs','terminate_process':_0x2b5108(0x1f0),'git_status':_0x2b5108(0x281),'git_diff':_0x2b5108(0x291),'git_log':_0x2b5108(0x1e4),'git_add':_0x2b5108(0x1a7),'git_commit':_0x2b5108(0x277),'git_branch':_0x2b5108(0x21f),'fetch_url':_0x2b5108(0x1ad),'download_file':_0x2b5108(0x2e3),'get_env':_0x2b5108(0x1db),'set_env':'SetEnv','get_system_info':'SysInfo','clipboard_read':_0x2b5108(0x1bc),'clipboard_write':_0x2b5108(0x1eb),'ask_human':_0x2b5108(0x269),'tree':'Tree','grep_recursive':_0x2b5108(0x29d),'replace_in_files':_0x2b5108(0x24c),'open_in_editor':_0x2b5108(0x29b),'zip_files':_0x2b5108(0x24d),'unzip_files':_0x2b5108(0x1aa),'write_json':_0x2b5108(0x1ef),'read_json':_0x2b5108(0x23e),'patch_file':_0x2b5108(0x2bd),'powershell_run':'PS','browser_open':_0x2b5108(0x25f),'browser_click':_0x2b5108(0x25e),'browser_fill':_0x2b5108(0x270),'browser_snapshot':_0x2b5108(0x284),'browser_screenshot':_0x2b5108(0x2d7),'browser_get_text':_0x2b5108(0x1bf),'browser_close':_0x2b5108(0x1ac)},_0x4246d7=_0x3e295d[_0x3a99fa[_0x2b5108(0x25a)]]||_0x3a99fa[_0x2b5108(0x25a)];let _0x161ef8='';if(_0x3a99fa['name']===_0x2b5108(0x272)&&_0x3a99fa['args']['command'])_0x161ef8=_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x2ad)];else{if(_0x3a99fa[_0x2b5108(0x25a)]===_0x2b5108(0x2ae))_0x161ef8=_0x2b5108(0x279)+(_0x3a99fa['args'][_0x2b5108(0x20d)]||_0x2b5108(0x1f3));else{if(_0x3a99fa[_0x2b5108(0x25a)]==='read_terminal_output'||_0x3a99fa[_0x2b5108(0x25a)]==='terminate_process')_0x161ef8=_0x2b5108(0x279)+(_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x20d)]||_0x2b5108(0x1f3));else{if(_0x3a99fa[_0x2b5108(0x25a)]===_0x2b5108(0x2cb))_0x161ef8=_0x2b5108(0x295);else{if(_0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x22b)])_0x161ef8=_0x3a99fa[_0x2b5108(0x2db)]['path'];else{if(_0x3a99fa[_0x2b5108(0x2db)]['pattern'])_0x161ef8='\x22'+_0x3a99fa[_0x2b5108(0x2db)]['pattern']+'\x22';else _0x3a99fa[_0x2b5108(0x2db)][_0x2b5108(0x2da)]?_0x161ef8=_0x3a99fa['args'][_0x2b5108(0x2da)]:_0x161ef8=Object['values'](_0x3a99fa[_0x2b5108(0x2db)])[0x0]||'';}}}}}const _0x977bc0=_0x161ef8[_0x2b5108(0x1fc)]>0x32?_0x161ef8[_0x2b5108(0x22c)](0x0,0x2f)+_0x2b5108(0x1b5):_0x161ef8,_0x458ca3=a4_0x2743b1[_0x2b5108(0x1dd)](_0x4246d7+'('+_0x977bc0+')');_0x458ca3[_0x2b5108(0x1b2)]();const _0x501771=performance[_0x2b5108(0x214)]();let _0x367ab9;try{_0x367ab9=await executeToolCall(_0x3a99fa['name'],_0x3a99fa['args']);}catch(_0x40b3ff){if(_0x40b3ff['message']&&_0x40b3ff[_0x2b5108(0x276)]['includes'](_0x2b5108(0x1f1))){const _0x94bc55=await getMcpTools(),_0x114428=_0x94bc55[_0x2b5108(0x229)](_0x589621=>_0x589621[_0x2b5108(0x25a)]===_0x3a99fa[_0x2b5108(0x25a)]);if(_0x114428)try{_0x367ab9=await executeMcpTool(_0x114428['serverName'],_0x114428[_0x2b5108(0x25a)],_0x3a99fa[_0x2b5108(0x2db)]);}catch(_0x603f00){throw new Error('MCP\x20Tool\x20error:\x20'+_0x603f00);}else throw _0x40b3ff;}else throw _0x40b3ff;}const _0x3d7fa7=((performance['now']()-_0x501771)/0x3e8)[_0x2b5108(0x2c5)](0x1);_0x458ca3['stop']();let _0x329628=_0x2b5108(0x1d6)+_0x3d7fa7+'s',_0x2bd2d3=![];const _0x3042ec=_0x367ab9;if(_0x3042ec&&typeof _0x3042ec===_0x2b5108(0x26b)){if(_0x3a99fa[_0x2b5108(0x25a)]==='run_command'){if(_0x3042ec['exitCode']===0x0&&_0x3042ec[_0x2b5108(0x2e9)]!==![]){const _0x4f8152=_0x3042ec[_0x2b5108(0x2bc)]?_0x3042ec[_0x2b5108(0x2bc)]['split']('\x0a')[_0x2b5108(0x1fc)]:0x0;_0x329628=_0x2b5108(0x2e0)+_0x4f8152+'\x20lines\x20of\x20output\x20('+_0x3d7fa7+'s)';}else{_0x2bd2d3=!![],_0x329628=_0x2b5108(0x1b3)+_0x3042ec['exitCode'];const _0x3bce41=_0x3042ec[_0x2b5108(0x1cc)]||_0x3042ec[_0x2b5108(0x2bc)]||_0x3042ec[_0x2b5108(0x276)]||'Operation\x20failed';_0x3bce41&&(_0x329628+=':\x20'+_0x3bce41[_0x2b5108(0x258)]('\x0a')[0x0][_0x2b5108(0x1bb)](0x0,0x64));}}else{if(_0x3042ec['success']===![])_0x2bd2d3=!![],_0x329628=_0x2b5108(0x23c)+(_0x3042ec['message']||_0x3042ec['error']||_0x2b5108(0x260));else{if(_0x3042ec[_0x2b5108(0x1d1)])_0x2bd2d3=!![],_0x329628=_0x2b5108(0x23c)+_0x3042ec[_0x2b5108(0x1d1)];else{if(_0x3a99fa['name']===_0x2b5108(0x1dc)&&typeof _0x3042ec[_0x2b5108(0x1b9)]===_0x2b5108(0x1e8)){const _0x4e2d91=_0x3042ec[_0x2b5108(0x1b9)][_0x2b5108(0x258)]('\x0a')[_0x2b5108(0x1fc)];_0x329628=_0x2b5108(0x1e9)+_0x4e2d91+_0x2b5108(0x2c1)+_0x3d7fa7+'s)';}else(_0x3a99fa[_0x2b5108(0x25a)]===_0x2b5108(0x2d2)||_0x3a99fa[_0x2b5108(0x25a)]==='create_file')&&(_0x329628=_0x2b5108(0x1e6)+_0x3d7fa7+'s)');}}}}a4_0x2743b1[_0x2b5108(0x273)](_0x4246d7,_0x977bc0,_0x329628,_0x2bd2d3);let _0x228799=_0x367ab9;_0x3a99fa[_0x2b5108(0x25a)]===_0x2b5108(0x272)&&_0x3042ec&&(_0x228799={'exitCode':_0x3042ec['exitCode'],'stdout':_0x3042ec['stdout'],'stderr':_0x3042ec['stderr'],'error':_0x3042ec[_0x2b5108(0x1d1)]}),_0x2cf203[_0x2b5108(0x2cf)]({'role':'user','content':_0x2b5108(0x2b9)+_0x3a99fa[_0x2b5108(0x25a)]+':\x0a'+JSON['stringify'](_0x228799,null,0x2)}),await new Promise(_0xd83dd5=>setTimeout(_0xd83dd5,0x1f4));}catch(_0x5d164f){a4_0x2743b1['toolSuccess'](_0x2b5108(0x21e),'tool\x20execution\x20failed',_0x5d164f[_0x2b5108(0x276)]||String(_0x5d164f),!![]),_0x2cf203['push']({'role':_0x2b5108(0x241),'content':'Tool\x20error\x20occurred:\x20'+_0x5d164f+_0x2b5108(0x1f2)});}}_0x45686e>=_0xed341c&&a4_0x2743b1[_0x2b5108(0x201)](_0x2b5108(0x2b6));}async function executeToolCall(_0x376805,_0x14599e){const _0x185ad3=a4_0x1d4d;switch(_0x376805){case _0x185ad3(0x227):return createFile(_0x14599e[_0x185ad3(0x22b)],_0x14599e['content']);case _0x185ad3(0x1dc):return readFile(_0x14599e[_0x185ad3(0x22b)]);case'list_directory':return listDirectory(_0x14599e[_0x185ad3(0x22b)]||'.');case'edit_file':return editFile(_0x14599e[_0x185ad3(0x22b)],_0x14599e[_0x185ad3(0x212)],_0x14599e[_0x185ad3(0x27b)]);case _0x185ad3(0x1ed):return searchFile(_0x14599e[_0x185ad3(0x22b)],_0x14599e[_0x185ad3(0x217)]);case'run_command':const {command:_0x1bf303,background:_0x3c122a,wait:_0x576e22}=_0x14599e,_0xb9b4d2=await runCommand(_0x1bf303,undefined,_0x3c122a,_0x576e22);return _0xb9b4d2;case'read_terminal_output':{const {readTerminalOutput:_0x23f809}=await import(_0x185ad3(0x23a));return _0x23f809(_0x14599e[_0x185ad3(0x20d)]);}case'send_terminal_input':{const {sendTerminalInput:_0x328a6f}=await import('../tools/command.js');return _0x328a6f(_0x14599e[_0x185ad3(0x243)],_0x14599e['pid']);}case'list_active_processes':{const {getActiveProcesses:_0x1783f4}=await import('../tools/command.js');return{'pids':_0x1783f4(),'message':'Active\x20processes:\x20'+_0x1783f4()['length']};}case _0x185ad3(0x222):{const {terminateProcess:_0x5d81f9}=await import(_0x185ad3(0x23a));return _0x5d81f9(_0x14599e[_0x185ad3(0x20d)]);}case _0x185ad3(0x206):{const {findFiles:_0x55c486}=await import(_0x185ad3(0x1b8));return _0x55c486(_0x14599e[_0x185ad3(0x22b)]||'.',_0x14599e[_0x185ad3(0x217)]);}case _0x185ad3(0x237):{const {searchDirectory:_0x5d9654}=await import('../tools/file.js');return _0x5d9654(_0x14599e[_0x185ad3(0x22b)]||'.',_0x14599e[_0x185ad3(0x217)]);}case _0x185ad3(0x223):{const {readFile:_0x4a2e05}=await import(_0x185ad3(0x2c6));return _0x4a2e05(_0x14599e['owner'],_0x14599e[_0x185ad3(0x29c)],_0x14599e[_0x185ad3(0x22b)],_0x14599e[_0x185ad3(0x2bb)]);}case'github_create_pr':{const {createPullRequest:_0x30ac0d}=await import(_0x185ad3(0x2c6));return _0x30ac0d(_0x14599e[_0x185ad3(0x2ac)],_0x14599e[_0x185ad3(0x29c)],_0x14599e[_0x185ad3(0x1c9)],_0x14599e['head'],_0x14599e[_0x185ad3(0x1c3)],_0x14599e['body']);}case'github_create_branch':{const {createBranch:_0x4b8d1d}=await import(_0x185ad3(0x2c6));return _0x4b8d1d(_0x14599e['owner'],_0x14599e[_0x185ad3(0x29c)],_0x14599e['branchName'],_0x14599e[_0x185ad3(0x28c)]);}case _0x185ad3(0x1cb):{const {browserOpen:_0x3645b3,startBrowserServer:_0x39d973,isBrowserServerRunning:_0x54075b}=await import(_0x185ad3(0x2a3));return!_0x54075b()&&await _0x39d973(),_0x3645b3(_0x14599e[_0x185ad3(0x2da)]);}case'browser_click':{const {browserClick:_0x294bf6}=await import(_0x185ad3(0x2a3));return _0x294bf6(_0x14599e[_0x185ad3(0x1da)]);}case'browser_fill':{const {browserFill:_0x3f89e8}=await import(_0x185ad3(0x2a3));return _0x3f89e8(_0x14599e[_0x185ad3(0x1da)],_0x14599e[_0x185ad3(0x219)]);}case _0x185ad3(0x261):{const {browserSnapshot:_0x4baf28}=await import('../browser/index.js');return _0x4baf28();}case _0x185ad3(0x2e5):{const {browserScreenshot:_0x40c4e4}=await import(_0x185ad3(0x2a3));return _0x40c4e4();}case _0x185ad3(0x27d):{const {browserGetText:_0x4b3de3}=await import(_0x185ad3(0x2a3));return _0x4b3de3(_0x14599e[_0x185ad3(0x1da)]);}case _0x185ad3(0x28f):{const {browserClose:_0x39a6ec}=await import(_0x185ad3(0x2a3));return _0x39a6ec();}case _0x185ad3(0x1d2):return deleteFile(_0x14599e[_0x185ad3(0x22b)]);case _0x185ad3(0x2a0):return renameFile(_0x14599e['from']||_0x14599e[_0x185ad3(0x22b)],_0x14599e['to']||_0x14599e[_0x185ad3(0x1d7)]);case _0x185ad3(0x2df):return copyFile(_0x14599e[_0x185ad3(0x1a6)]||_0x14599e[_0x185ad3(0x22b)],_0x14599e['to']||_0x14599e['destination']);case _0x185ad3(0x233):return fileInfo(_0x14599e[_0x185ad3(0x22b)]);case _0x185ad3(0x2dd):return readFileLines(_0x14599e[_0x185ad3(0x22b)],_0x14599e[_0x185ad3(0x1b2)]||0x1,_0x14599e[_0x185ad3(0x240)]||0x32);case _0x185ad3(0x2b0):{const _0x30fe9b=await runCommand(_0x14599e[_0x185ad3(0x2ad)],undefined,!![],_0x14599e[_0x185ad3(0x1fe)]||0x1388);return _0x30fe9b;}case _0x185ad3(0x2e6):return gitStatus();case _0x185ad3(0x2b8):return gitDiff(_0x14599e[_0x185ad3(0x22b)]);case _0x185ad3(0x1e5):return gitLog(_0x14599e[_0x185ad3(0x244)]||0xa);case _0x185ad3(0x20a):return gitAdd(_0x14599e['path']||'.');case _0x185ad3(0x2dc):return gitCommit(_0x14599e[_0x185ad3(0x276)]);case'git_branch':return gitBranch();case _0x185ad3(0x2e7):return fetchUrl(_0x14599e[_0x185ad3(0x2da)]);case'download_file':return downloadFile(_0x14599e['url'],_0x14599e[_0x185ad3(0x22b)]);case'get_env':return getEnv(_0x14599e[_0x185ad3(0x25a)]);case _0x185ad3(0x210):return setEnv(_0x14599e[_0x185ad3(0x25a)],_0x14599e[_0x185ad3(0x219)]);case _0x185ad3(0x1ab):return getSystemInfo();case _0x185ad3(0x1e7):return clipboardRead();case'clipboard_write':return clipboardWrite(_0x14599e[_0x185ad3(0x235)]||_0x14599e['content']);case _0x185ad3(0x262):{const _0x2a5b79=_0x14599e[_0x185ad3(0x282)]||_0x14599e[_0x185ad3(0x276)]||_0x185ad3(0x2e8);a4_0x2743b1[_0x185ad3(0x2a2)]();const _0x2e0011=await input({'message':a4_0x2c8411[_0x185ad3(0x27e)]('#3b82f6')(_0x185ad3(0x202))+_0x2a5b79+'\x0a','theme':{'prefix':''}});return{'success':!![],'response':_0x2e0011,'message':_0x185ad3(0x26e)+_0x2e0011};}case _0x185ad3(0x254):return tree(_0x14599e['path']||'.',_0x14599e[_0x185ad3(0x1ce)]||0x3);case _0x185ad3(0x286):return grepRecursive(_0x14599e['path']||'.',_0x14599e[_0x185ad3(0x217)],_0x14599e[_0x185ad3(0x268)]);case _0x185ad3(0x2d9):return replaceInFiles(_0x14599e[_0x185ad3(0x22b)]||'.',_0x14599e[_0x185ad3(0x212)],_0x14599e[_0x185ad3(0x27b)],_0x14599e[_0x185ad3(0x268)]);case _0x185ad3(0x266):return openInEditor(_0x14599e[_0x185ad3(0x22b)]);case _0x185ad3(0x1ee):return zipFiles(_0x14599e[_0x185ad3(0x236)]||[_0x14599e['path']],_0x14599e[_0x185ad3(0x255)]||_0x185ad3(0x1ae));case _0x185ad3(0x1c6):return unzipFiles(_0x14599e[_0x185ad3(0x22b)]||_0x14599e[_0x185ad3(0x298)],_0x14599e['output']||'.');case _0x185ad3(0x2d8):return writeJson(_0x14599e[_0x185ad3(0x22b)],_0x14599e[_0x185ad3(0x252)]||_0x14599e['content']);case _0x185ad3(0x1c0):return readJson(_0x14599e[_0x185ad3(0x22b)]);case _0x185ad3(0x1ba):return patchFile(_0x14599e[_0x185ad3(0x22b)],_0x14599e['patches']);case _0x185ad3(0x278):return powershellRun(_0x14599e[_0x185ad3(0x245)]||_0x14599e[_0x185ad3(0x2ad)]);default:return{'error':_0x185ad3(0x2aa)+_0x376805};}}
@@ -1 +1 @@
1
- const a5_0x230fab=a5_0x1bd7;(function(_0x5cc96a,_0x369669){const _0xcd41a=a5_0x1bd7,_0x2755bf=_0x5cc96a();while(!![]){try{const _0x4df0db=parseInt(_0xcd41a(0xf6))/0x1*(parseInt(_0xcd41a(0x104))/0x2)+-parseInt(_0xcd41a(0xe1))/0x3+-parseInt(_0xcd41a(0xe2))/0x4*(parseInt(_0xcd41a(0x101))/0x5)+parseInt(_0xcd41a(0xf9))/0x6*(parseInt(_0xcd41a(0xe5))/0x7)+parseInt(_0xcd41a(0xf4))/0x8*(-parseInt(_0xcd41a(0xec))/0x9)+parseInt(_0xcd41a(0x100))/0xa+parseInt(_0xcd41a(0xf0))/0xb*(parseInt(_0xcd41a(0xfd))/0xc);if(_0x4df0db===_0x369669)break;else _0x2755bf['push'](_0x2755bf['shift']());}catch(_0x1c1419){_0x2755bf['push'](_0x2755bf['shift']());}}}(a5_0x35a2,0x93922));function a5_0x1bd7(_0x2f4e04,_0x2f77d9){_0x2f4e04=_0x2f4e04-0xde;const _0x35a25a=a5_0x35a2();let _0x1bd7a4=_0x35a25a[_0x2f4e04];return _0x1bd7a4;}import a5_0x15c740 from'conf';import a5_0x36df13 from'path';import a5_0x599408 from'fs';import{fileURLToPath}from'url';const config=new a5_0x15c740({'projectName':a5_0x230fab(0xde),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x2b4476=a5_0x230fab,_0x3ba002=config[_0x2b4476(0xfe)]('mcpServers'),_0x5c230f=loadMcpConfigFile();return{..._0x3ba002,..._0x5c230f};}export function addMcpServer(_0x30a31e,_0x587531,_0x61197f=[],_0x1eec8d){const _0xd07350=a5_0x230fab,_0xc37573=config['get'](_0xd07350(0xe9));_0xc37573[_0x30a31e]={'type':_0xd07350(0xef),'command':_0x587531,'args':_0x61197f,'env':_0x1eec8d},config['set'](_0xd07350(0xe9),_0xc37573);}export function addMcpHttpServer(_0x5c1356,_0x22240f){const _0x33a876=a5_0x230fab,_0x70ed01=config[_0x33a876(0xfe)](_0x33a876(0xe9));_0x70ed01[_0x5c1356]={'type':'streamable-http','url':_0x22240f},config[_0x33a876(0xf5)](_0x33a876(0xe9),_0x70ed01);}export function removeMcpServer(_0x3a5fd0){const _0x21b41f=a5_0x230fab,_0x3389bd=config[_0x21b41f(0xfe)]('mcpServers');if(_0x3389bd[_0x3a5fd0])return delete _0x3389bd[_0x3a5fd0],config[_0x21b41f(0xf5)]('mcpServers',_0x3389bd),!![];return![];}export function clearMcpServers(){config['set']('mcpServers',{});}function a5_0x35a2(){const _0x4c276e=['command','cwd','204QUSjsg','USERPROFILE','.woozlit','@modelcontextprotocol/server-filesystem','19691148hKntTv','get','uvx','3396460ohQJkZ','109015wPOLHE','mcp.json','path','1675118hUUsHp','woozlit-cli','mcp-servers','join','2173821vMuEKi','184pbZSsz','computer-use.js','dist','113911WqMorH','computer-use','tsx','src','mcpServers','existsSync','readFileSync','9354789BrJHXQ','.js','parse','stdio','11LATJxB','env','windows-mcp','utf-8','8UBqyzh','set','1PedVTt'];a5_0x35a2=function(){return _0x4c276e;};return a5_0x35a2();}export function getMcpServer(_0x1a5988){return getMcpServers()[_0x1a5988];}function loadMcpConfigFile(){const _0x243d69=a5_0x230fab,_0x3bb63b=[a5_0x36df13[_0x243d69(0xe0)](process[_0x243d69(0xf8)](),_0x243d69(0x102)),a5_0x36df13[_0x243d69(0xe0)](process['cwd'](),_0x243d69(0xfb),_0x243d69(0x102)),a5_0x36df13[_0x243d69(0xe0)](process[_0x243d69(0xf1)]['HOME']||process['env'][_0x243d69(0xfa)]||'','.woozlit',_0x243d69(0x102))];for(const _0x1f6b1f of _0x3bb63b){try{if(a5_0x599408[_0x243d69(0xea)](_0x1f6b1f)){const _0x5a9e1b=a5_0x599408[_0x243d69(0xeb)](_0x1f6b1f,_0x243d69(0xf3)),_0x5eb4c8=JSON[_0x243d69(0xee)](_0x5a9e1b);if(_0x5eb4c8[_0x243d69(0xe9)]&&typeof _0x5eb4c8[_0x243d69(0xe9)]==='object')return _0x5eb4c8[_0x243d69(0xe9)];}}catch{}}return{};}export function ensureDefaultServers(){const _0x40b9f8=a5_0x230fab,_0x2249d2=config[_0x40b9f8(0xfe)]('mcpServers'),_0x163c34=fileURLToPath(import.meta.url),_0x5e9833=a5_0x36df13['dirname'](_0x163c34),_0x26772a=_0x5e9833['includes'](_0x40b9f8(0xe4))||_0x163c34['endsWith'](_0x40b9f8(0xed)),_0x36e909=_0x26772a?a5_0x36df13[_0x40b9f8(0xe0)](_0x5e9833,'..',_0x40b9f8(0xdf),_0x40b9f8(0xe3)):a5_0x36df13[_0x40b9f8(0xe0)](_0x5e9833,'..','..',_0x40b9f8(0xe8),_0x40b9f8(0xdf),'computer-use.ts'),_0x1c9a14=_0x26772a?'node':_0x40b9f8(0xe7);_0x2249d2[_0x40b9f8(0xe6)]={'type':_0x40b9f8(0xef),'command':_0x1c9a14,'args':[_0x36e909],'env':{}},(!_0x2249d2[_0x40b9f8(0xf2)]||_0x2249d2[_0x40b9f8(0xf2)][_0x40b9f8(0xf7)]===_0x40b9f8(0xff))&&(_0x2249d2['windows-mcp']={'type':'stdio','command':'npx','args':['-y',_0x40b9f8(0xfc),'C:\x5cUsers'],'env':{}}),config[_0x40b9f8(0xf5)](_0x40b9f8(0xe9),_0x2249d2);}export function getConfigFilePath(){const _0x44a932=a5_0x230fab;return config[_0x44a932(0x103)];}
1
+ const a5_0x40f58d=a5_0x1809;(function(_0x6543da,_0x33c4ff){const _0x3d97cd=a5_0x1809,_0x4758e8=_0x6543da();while(!![]){try{const _0x5574a1=parseInt(_0x3d97cd(0xcb))/0x1*(-parseInt(_0x3d97cd(0xa9))/0x2)+parseInt(_0x3d97cd(0xaa))/0x3+parseInt(_0x3d97cd(0xc6))/0x4*(parseInt(_0x3d97cd(0xc1))/0x5)+-parseInt(_0x3d97cd(0xbb))/0x6*(-parseInt(_0x3d97cd(0xb3))/0x7)+-parseInt(_0x3d97cd(0xc0))/0x8+-parseInt(_0x3d97cd(0xc2))/0x9+parseInt(_0x3d97cd(0xa5))/0xa*(parseInt(_0x3d97cd(0xc7))/0xb);if(_0x5574a1===_0x33c4ff)break;else _0x4758e8['push'](_0x4758e8['shift']());}catch(_0x4050e7){_0x4758e8['push'](_0x4758e8['shift']());}}}(a5_0x1e98,0xd5926));import a5_0x5fa34 from'conf';import a5_0x97de45 from'path';import a5_0x32ced7 from'fs';import{fileURLToPath}from'url';const config=new a5_0x5fa34({'projectName':a5_0x40f58d(0xca),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0xe68cfc=a5_0x40f58d,_0x1e7977=config[_0xe68cfc(0xb2)](_0xe68cfc(0xab)),_0x273168=loadMcpConfigFile();return{..._0x1e7977,..._0x273168};}export function addMcpServer(_0x3d78ae,_0x314ebb,_0x2af0ea=[],_0x944843){const _0x2ccd7e=a5_0x40f58d,_0x1b6b6e=config[_0x2ccd7e(0xb2)](_0x2ccd7e(0xab));_0x1b6b6e[_0x3d78ae]={'type':_0x2ccd7e(0xa2),'command':_0x314ebb,'args':_0x2af0ea,'env':_0x944843},config[_0x2ccd7e(0xc8)](_0x2ccd7e(0xab),_0x1b6b6e);}export function addMcpHttpServer(_0x24cb67,_0xa2255a){const _0x1b07bf=a5_0x40f58d,_0x35d216=config[_0x1b07bf(0xb2)](_0x1b07bf(0xab));_0x35d216[_0x24cb67]={'type':_0x1b07bf(0xb5),'url':_0xa2255a},config[_0x1b07bf(0xc8)]('mcpServers',_0x35d216);}export function removeMcpServer(_0x25be11){const _0x3ca1be=a5_0x40f58d,_0x144054=config[_0x3ca1be(0xb2)](_0x3ca1be(0xab));if(_0x144054[_0x25be11])return delete _0x144054[_0x25be11],config[_0x3ca1be(0xc8)]('mcpServers',_0x144054),!![];return![];}function a5_0x1e98(){const _0x1bf4c4=['12946qWioCe','3110472avouGA','mcpServers','USERPROFILE','tsx','uvx','computer-use.ts','windows-mcp','@modelcontextprotocol/server-filesystem','get','7BOOvmH','mcp-servers','streamable-http','cwd','parse','object','includes','.woozlit','7405386OfzHDT','readFileSync','dist','command','src','7720560KsGSyo','221405xdVQla','15587586ELhfBj','mcp.json','join','utf-8','36pTvlha','44kCtoIU','set','env','woozlit-cli','114XVilOJ','stdio','dirname','C:\x5cUsers','4100380dLNiPw','npx','.js','endsWith'];a5_0x1e98=function(){return _0x1bf4c4;};return a5_0x1e98();}export function clearMcpServers(){const _0x4f1cd0=a5_0x40f58d;config['set'](_0x4f1cd0(0xab),{});}export function getMcpServer(_0x465a9b){return getMcpServers()[_0x465a9b];}function loadMcpConfigFile(){const _0x560c50=a5_0x40f58d,_0x4b8e0d=[a5_0x97de45[_0x560c50(0xc4)](process[_0x560c50(0xb6)](),_0x560c50(0xc3)),a5_0x97de45[_0x560c50(0xc4)](process[_0x560c50(0xb6)](),'.woozlit',_0x560c50(0xc3)),a5_0x97de45[_0x560c50(0xc4)](process[_0x560c50(0xc9)]['HOME']||process[_0x560c50(0xc9)][_0x560c50(0xac)]||'',_0x560c50(0xba),_0x560c50(0xc3))];for(const _0x249e13 of _0x4b8e0d){try{if(a5_0x32ced7['existsSync'](_0x249e13)){const _0x57f016=a5_0x32ced7[_0x560c50(0xbc)](_0x249e13,_0x560c50(0xc5)),_0x5a2d31=JSON[_0x560c50(0xb7)](_0x57f016);if(_0x5a2d31[_0x560c50(0xab)]&&typeof _0x5a2d31[_0x560c50(0xab)]===_0x560c50(0xb8))return _0x5a2d31[_0x560c50(0xab)];}}catch{}}return{};}export function ensureDefaultServers(){const _0x2bbb4e=a5_0x40f58d,_0x358b98=config[_0x2bbb4e(0xb2)](_0x2bbb4e(0xab)),_0x535153=fileURLToPath(import.meta.url),_0x5c5ace=a5_0x97de45[_0x2bbb4e(0xa3)](_0x535153),_0xd5d8c8=_0x5c5ace[_0x2bbb4e(0xb9)](_0x2bbb4e(0xbd))||_0x535153[_0x2bbb4e(0xa8)](_0x2bbb4e(0xa7)),_0x168c50=_0xd5d8c8?a5_0x97de45['join'](_0x5c5ace,'..',_0x2bbb4e(0xb4),'computer-use.js'):a5_0x97de45[_0x2bbb4e(0xc4)](_0x5c5ace,'..','..',_0x2bbb4e(0xbf),_0x2bbb4e(0xb4),_0x2bbb4e(0xaf)),_0x376159=_0xd5d8c8?'node':_0x2bbb4e(0xad);_0x358b98['computer-use']={'type':_0x2bbb4e(0xa2),'command':_0x376159,'args':[_0x168c50],'env':{}},(!_0x358b98[_0x2bbb4e(0xb0)]||_0x358b98['windows-mcp'][_0x2bbb4e(0xbe)]===_0x2bbb4e(0xae))&&(_0x358b98[_0x2bbb4e(0xb0)]={'type':_0x2bbb4e(0xa2),'command':_0x2bbb4e(0xa6),'args':['-y',_0x2bbb4e(0xb1),_0x2bbb4e(0xa4)],'env':{}}),config[_0x2bbb4e(0xc8)](_0x2bbb4e(0xab),_0x358b98);}function a5_0x1809(_0x329c8d,_0xcb7ef2){_0x329c8d=_0x329c8d-0xa2;const _0x1e98ce=a5_0x1e98();let _0x180910=_0x1e98ce[_0x329c8d];return _0x180910;}export function getConfigFilePath(){return config['path'];}
@@ -1 +1 @@
1
- const a6_0x3fddae=a6_0x29b6;(function(_0x165cd6,_0x44c610){const _0x245039=a6_0x29b6,_0x41eb1c=_0x165cd6();while(!![]){try{const _0x4ed12d=-parseInt(_0x245039(0x196))/0x1*(parseInt(_0x245039(0x184))/0x2)+parseInt(_0x245039(0x191))/0x3+parseInt(_0x245039(0x19e))/0x4+parseInt(_0x245039(0x179))/0x5+parseInt(_0x245039(0x17b))/0x6+-parseInt(_0x245039(0x182))/0x7*(parseInt(_0x245039(0x198))/0x8)+parseInt(_0x245039(0x188))/0x9*(-parseInt(_0x245039(0x19c))/0xa);if(_0x4ed12d===_0x44c610)break;else _0x41eb1c['push'](_0x41eb1c['shift']());}catch(_0x1e829d){_0x41eb1c['push'](_0x41eb1c['shift']());}}}(a6_0x7a29,0x675c4));function a6_0x29b6(_0x314102,_0x191531){_0x314102=_0x314102-0x177;const _0x7a2998=a6_0x7a29();let _0x29b6ba=_0x7a2998[_0x314102];return _0x29b6ba;}const API_URL=process[a6_0x3fddae(0x1a0)][a6_0x3fddae(0x185)]||'https://woozlit.com',PROD_URL=a6_0x3fddae(0x19b);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_0x3fddae(0x193),'name':a6_0x3fddae(0x17c),'description':a6_0x3fddae(0x17f),'xp':0x1},{'id':a6_0x3fddae(0x180),'name':'Gemini\x203\x20Flash','description':'Latest\x20Gemini\x203\x20model','xp':0x5},{'id':a6_0x3fddae(0x18c),'name':a6_0x3fddae(0x177),'description':a6_0x3fddae(0x19d),'xp':0x5},{'id':a6_0x3fddae(0x18d),'name':a6_0x3fddae(0x194),'description':a6_0x3fddae(0x18a),'xp':0x1},{'id':'qwen/qwen3-235b-a22b:free','name':a6_0x3fddae(0x18f),'description':a6_0x3fddae(0x17a),'xp':0x2},{'id':a6_0x3fddae(0x197),'name':a6_0x3fddae(0x18b),'description':a6_0x3fddae(0x199),'xp':0x2},{'id':a6_0x3fddae(0x19a),'name':a6_0x3fddae(0x186),'description':a6_0x3fddae(0x183),'xp':0x2},{'id':'meta-llama/llama-4-maverick','name':'Llama\x204\x20Maverick','description':a6_0x3fddae(0x192),'xp':0x3},{'id':a6_0x3fddae(0x189),'name':'Devstral\x20Small','description':a6_0x3fddae(0x195),'xp':0x2},{'id':a6_0x3fddae(0x1a1),'name':'Mistral\x20Small\x203.2','description':a6_0x3fddae(0x181),'xp':0x2},{'id':a6_0x3fddae(0x19f),'name':'Nemotron\x20Nano\x2012B','description':a6_0x3fddae(0x17d),'xp':0x1},{'id':'moonshotai/kimi-k2','name':a6_0x3fddae(0x187),'description':a6_0x3fddae(0x17e),'xp':0x3},{'id':'deepseek/deepseek-chat','name':a6_0x3fddae(0x178),'description':'DeepSeek\x27s\x20latest\x20V3','xp':0x2},{'id':a6_0x3fddae(0x190),'name':'DeepSeek\x20R1','description':a6_0x3fddae(0x18e),'xp':0x3}];export const DEFAULT_MODEL=a6_0x3fddae(0x193);function a6_0x7a29(){const _0xb0943d=['mistralai/devstral-small','Xiaomi\x27s\x20fast\x20AI\x20model','Qwen3\x20Coder','gemini-3-pro-preview','xiaomi/mimo-v2-flash:free','Advanced\x20reasoning','Qwen3\x20235B','deepseek/deepseek-r1','946755qOJBIQ','Meta\x27s\x20latest','gemini-2.5-flash','MiMo\x20V2','Developer-focused','186dkVODq','qwen/qwen3-coder:free','8TPvwtF','Coding\x20specialist','meta-llama/llama-3.3-70b-instruct:free','https://woozlit.com','84250qXDIfo','Most\x20powerful\x20Gemini','5472EmiSWS','nvidia/nemotron-nano-12b-v2-vl:free','env','mistralai/mistral-small-3.2-24b-instruct','Gemini\x203\x20Pro','DeepSeek\x20V3','3582620hUETHd','Alibaba\x27s\x20largest','3098982eIQHGg','Woozie','NVIDIA\x20vision','Reasoning\x20model','Fast\x20and\x20capable\x20(Default)','gemini-3-flash-preview','Latest\x20Mistral','3937507rXAAno','Meta\x27s\x20powerful\x20model','4888bcivAh','WOOZLIT_API_URL','Llama\x203.3\x2070B','Kimi\x20K2','117ZMdxrl'];a6_0x7a29=function(){return _0xb0943d;};return a6_0x7a29();}
1
+ const a6_0x9f23d5=a6_0x5577;function a6_0x5577(_0x515f5f,_0x2e294e){_0x515f5f=_0x515f5f-0xf3;const _0x404c9e=a6_0x404c();let _0x5577e3=_0x404c9e[_0x515f5f];return _0x5577e3;}(function(_0x1f9660,_0x24f897){const _0x280810=a6_0x5577,_0x58d2ac=_0x1f9660();while(!![]){try{const _0x3ef897=parseInt(_0x280810(0x116))/0x1+parseInt(_0x280810(0x108))/0x2+-parseInt(_0x280810(0x111))/0x3+parseInt(_0x280810(0xfa))/0x4+parseInt(_0x280810(0x113))/0x5+-parseInt(_0x280810(0x10b))/0x6*(parseInt(_0x280810(0xfd))/0x7)+parseInt(_0x280810(0xf9))/0x8;if(_0x3ef897===_0x24f897)break;else _0x58d2ac['push'](_0x58d2ac['shift']());}catch(_0x483bd2){_0x58d2ac['push'](_0x58d2ac['shift']());}}}(a6_0x404c,0x4ade3));function a6_0x404c(){const _0x237231=['deepseek/deepseek-chat','206808SzyQBw','Gemini\x203\x20Pro','Alibaba\x27s\x20largest','6OxkTuB','Llama\x204\x20Maverick','meta-llama/llama-3.3-70b-instruct:free','gemini-3-pro-preview','Latest\x20Gemini\x20with\x20deep\x20thinking','Xiaomi\x27s\x20fast\x20AI\x20model','1488522wlRHwT','Coding\x20specialist','2645835BQKmqf','Qwen3\x20Coder','Devstral\x20Small','297575fyydDE','mistralai/devstral-small','qwen/qwen3-235b-a22b:free','DeepSeek\x20V3','gemini-2.5-flash','Llama\x203.3\x2070B','NVIDIA\x20vision','Woozie','WOOZLIT_API_URL','MiMo\x20V2','DeepSeek\x27s\x20latest\x20V3','Meta\x27s\x20latest','DeepSeek\x20R1','qwen/qwen3-coder:free','deepseek/deepseek-r1','1953656sdZhFv','264052rLTzOm','Fast\x20and\x20capable\x20(Default)','meta-llama/llama-4-maverick','3062731cFBayD','mistralai/mistral-small-3.2-24b-instruct','Advanced\x20reasoning','moonshotai/kimi-k2','gemini-3.1-pro-preview','Most\x20powerful\x20Gemini','Meta\x27s\x20powerful\x20model','Developer-focused','https://woozlit.com','Gemini\x203.1\x20Pro'];a6_0x404c=function(){return _0x237231;};return a6_0x404c();}const API_URL=process['env'][a6_0x9f23d5(0x11e)]||a6_0x9f23d5(0x105),PROD_URL=a6_0x9f23d5(0x105);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_0x9f23d5(0x11a),'name':a6_0x9f23d5(0x11d),'description':a6_0x9f23d5(0xfb),'xp':0x1},{'id':'gemini-3-flash-preview','name':'Gemini\x203\x20Flash','description':'Latest\x20Gemini\x203\x20model','xp':0x5},{'id':a6_0x9f23d5(0x10e),'name':a6_0x9f23d5(0x109),'description':a6_0x9f23d5(0x102),'xp':0x5},{'id':a6_0x9f23d5(0x101),'name':a6_0x9f23d5(0x106),'description':a6_0x9f23d5(0x10f),'xp':0x8},{'id':'xiaomi/mimo-v2-flash:free','name':a6_0x9f23d5(0xf3),'description':a6_0x9f23d5(0x110),'xp':0x1},{'id':a6_0x9f23d5(0x118),'name':'Qwen3\x20235B','description':a6_0x9f23d5(0x10a),'xp':0x2},{'id':a6_0x9f23d5(0xf7),'name':a6_0x9f23d5(0x114),'description':a6_0x9f23d5(0x112),'xp':0x2},{'id':a6_0x9f23d5(0x10d),'name':a6_0x9f23d5(0x11b),'description':a6_0x9f23d5(0x103),'xp':0x2},{'id':a6_0x9f23d5(0xfc),'name':a6_0x9f23d5(0x10c),'description':a6_0x9f23d5(0xf5),'xp':0x3},{'id':a6_0x9f23d5(0x117),'name':a6_0x9f23d5(0x115),'description':a6_0x9f23d5(0x104),'xp':0x2},{'id':a6_0x9f23d5(0xfe),'name':'Mistral\x20Small\x203.2','description':'Latest\x20Mistral','xp':0x2},{'id':'nvidia/nemotron-nano-12b-v2-vl:free','name':'Nemotron\x20Nano\x2012B','description':a6_0x9f23d5(0x11c),'xp':0x1},{'id':a6_0x9f23d5(0x100),'name':'Kimi\x20K2','description':'Reasoning\x20model','xp':0x3},{'id':a6_0x9f23d5(0x107),'name':a6_0x9f23d5(0x119),'description':a6_0x9f23d5(0xf4),'xp':0x2},{'id':a6_0x9f23d5(0xf8),'name':a6_0x9f23d5(0xf6),'description':a6_0x9f23d5(0xff),'xp':0x3}];export const DEFAULT_MODEL='gemini-2.5-flash';
@@ -1 +1 @@
1
- (function(_0x35be01,_0x29d8b2){const _0x4ab129=a7_0x2e32,_0x330ef2=_0x35be01();while(!![]){try{const _0x46f3fb=-parseInt(_0x4ab129(0x186))/0x1+parseInt(_0x4ab129(0x199))/0x2+-parseInt(_0x4ab129(0x198))/0x3+-parseInt(_0x4ab129(0x1a4))/0x4*(-parseInt(_0x4ab129(0x184))/0x5)+-parseInt(_0x4ab129(0x188))/0x6*(parseInt(_0x4ab129(0x182))/0x7)+parseInt(_0x4ab129(0x17e))/0x8+parseInt(_0x4ab129(0x19c))/0x9;if(_0x46f3fb===_0x29d8b2)break;else _0x330ef2['push'](_0x330ef2['shift']());}catch(_0x5cc253){_0x330ef2['push'](_0x330ef2['shift']());}}}(a7_0x3bcf,0xd530d));import{Client,GatewayIntentBits,ChannelType,Partials}from'discord.js';import*as a7_0x40b73d from'./config.js';function a7_0x2e32(_0x6d6539,_0x3452e2){_0x6d6539=_0x6d6539-0x174;const _0x3bcf7d=a7_0x3bcf();let _0x2e320d=_0x3bcf7d[_0x6d6539];return _0x2e320d;}import*as a7_0x4f1d47 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 _0x2bd062=a7_0x2e32,_0x466954=a7_0x40b73d[_0x2bd062(0x187)]();if(!_0x466954)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits[_0x2bd062(0x180)],GatewayIntentBits[_0x2bd062(0x192)],GatewayIntentBits[_0x2bd062(0x174)],GatewayIntentBits[_0x2bd062(0x18a)]],'partials':[Partials[_0x2bd062(0x189)]]}),client[_0x2bd062(0x19e)]('ready',()=>{const _0xf0196e=_0x2bd062;a7_0x4f1d47['success'](_0xf0196e(0x183)+client?.['user']?.['tag']),isRunning=!![];}),client['on'](_0x2bd062(0x18d),async _0x552fd0=>{const _0x2a2bbb=_0x2bd062;if(_0x552fd0[_0x2a2bbb(0x1a1)][_0x2a2bbb(0x19b)])return;const _0x4d6ddd=_0x552fd0[_0x2a2bbb(0x193)][_0x2a2bbb(0x185)]===ChannelType['DM'],_0x506dbb=client?.[_0x2a2bbb(0x176)]&&_0x552fd0[_0x2a2bbb(0x197)][_0x2a2bbb(0x175)](client['user']);if(!_0x4d6ddd&&!_0x506dbb)return;await _0x552fd0['channel'][_0x2a2bbb(0x19d)]()[_0x2a2bbb(0x17a)](()=>{});const _0x567198=_0x552fd0['author']['id'],_0x3891a8=(_0x552fd0[_0x2a2bbb(0x19a)]||'dm')+'-'+_0x552fd0[_0x2a2bbb(0x1a2)]+'-'+_0x567198;!chatHistories[_0x2a2bbb(0x175)](_0x3891a8)&&chatHistories[_0x2a2bbb(0x17f)](_0x3891a8,[{'role':_0x2a2bbb(0x1a0),'content':_0x2a2bbb(0x18c)}]);const _0x48e06f=chatHistories[_0x2a2bbb(0x194)](_0x3891a8),_0x590b59=_0x552fd0[_0x2a2bbb(0x196)][_0x2a2bbb(0x179)](/<@!?[0-9]+>/g,'')[_0x2a2bbb(0x1a3)]();if(!_0x590b59)return;_0x48e06f[_0x2a2bbb(0x181)]({'role':_0x2a2bbb(0x176),'content':_0x590b59}),a7_0x4f1d47[_0x2a2bbb(0x17b)](_0x2a2bbb(0x178)+_0x552fd0[_0x2a2bbb(0x1a1)]['username']+':\x20'+_0x590b59);const _0x4c5199=getSelectedModel();try{let _0x435da2='';const _0x218aaf=await sendChatMessage(_0x4c5199,_0x48e06f,_0x283a2f=>{_0x435da2+=_0x283a2f;});_0x435da2=_0x218aaf['content'],_0x48e06f[_0x2a2bbb(0x181)]({'role':_0x2a2bbb(0x18e),'content':_0x435da2});if(_0x435da2[_0x2a2bbb(0x190)]>0x7d0){const _0x69c70a=_0x435da2[_0x2a2bbb(0x18f)](/[\s\S]{1,2000}/g)||[];for(const _0x1c72fe of _0x69c70a){await _0x552fd0['reply'](_0x1c72fe);}}else await _0x552fd0[_0x2a2bbb(0x17c)](_0x435da2);}catch(_0x439ae1){a7_0x4f1d47['error'](_0x2a2bbb(0x18b)+_0x439ae1[_0x2a2bbb(0x17d)]),await _0x552fd0[_0x2a2bbb(0x17c)](_0x2a2bbb(0x191));}}),await client[_0x2bd062(0x195)](_0x466954),!![];}catch(_0x19aafa){return a7_0x4f1d47['error'](_0x2bd062(0x19f)+_0x19aafa[_0x2bd062(0x17d)]),![];}}export function stopBot(){const _0x57370f=a7_0x2e32;client&&(client[_0x57370f(0x177)](),client=null),isRunning=![];}function a7_0x3bcf(){const _0x4a3d79=['4928685aKtQWJ','2750004EfFlEw','guildId','bot','21661650CpNikQ','sendTyping','once','[Discord]\x20Failed\x20to\x20start:\x20','system','author','channelId','trim','459444CUFRLq','MessageContent','has','user','destroy','[Discord]\x20','replace','catch','info','reply','message','1458896sVNaKW','set','Guilds','push','154189ApPoLs','[Discord]\x20Connected\x20as\x20','15bkRByQ','type','669296Nrjhyv','getBotToken','306SmTvdk','Channel','DirectMessages','[Discord]\x20Error:\x20','You\x20are\x20Woozlit,\x20a\x20helpful\x20AI\x20assistant\x20connected\x20via\x20Discord.\x20Keep\x20responses\x20concise.','messageCreate','assistant','match','length','Sorry,\x20I\x20encountered\x20an\x20error\x20processing\x20that.','GuildMessages','channel','get','login','content','mentions'];a7_0x3bcf=function(){return _0x4a3d79;};return a7_0x3bcf();}export function isBotRunning(){return isRunning;}
1
+ const a7_0x306b19=a7_0x42bd;function a7_0x3dff(){const _0x20751a=['/project','join','chdir','name','text','ready','sendTyping','copy_file','channel','6CYrjnS','input','browser_fill','directory','send_input','parse','startsWith','!status','delete','attachments','/newchat','read_file_lines','branch','match','file_info','get','Changed\x20to:\x20','!cd\x20','search','read_json','open_in_editor','Failed\x20to\x20send\x20file:\x20','rename_file','username','list_directory','system','set','Cleared.','!project','write_json','messageCreate','clipboard_read','Exit:\x20','info','...','88UnRmhn','pattern','/files','reply','body','mentions','getBotToken','grep_recursive','assistant','\x0aModel:\x20','replace_in_files','pid','pids','!newchat','length','send','once','stderr','success','search_file','10781880mkxRnx','[Discord]\x20','args','slice','split','Tool\x20result\x20for\x20','tree','browser_open','Failed:\x20','version','/status','1788410zZpVxW','wait','has','4526838XoPOaW','browser_close','fetch_url','url','\x0aTree:\x0a','\x20bytes)\x20saved\x20to\x20','\x0a```\x0a','user','script','value','GuildMessages','delete_file','github_create_pr','git_add','size','command','528760tbugjI','github_read_file','DirectMessages','run_command','message','tag','content','upload_','git_log','5738WUnhGO','/run\x20','push','!clear','Guilds','MessageContent','replace','owner','\x0aProject:\x20','No\x20output','depth','extensions','git_diff','New\x20chat\x20session\x20started.','path','Saved:\x20','Unknown\x20tool:\x20','head','\x0a```','catch','git_branch','type','author','stringify','../github/api.js','94lbJusQ','patches','guildId','set_env','send_file','browser_screenshot','patch_file','title','git_status','from','cwd','56jxHaDb','entries','.\x20Try\x20again\x20or\x20skip.','selector','../browser/index.js','/clear','output','browser_click','arrayBuffer','base','branchName','[F]','6TTlVTt','[File\x20received:\x20','Channel','terminate','25148KgbvqC','edit_file','data','393323iaReYx','!run\x20','[Discord]\x20Connected\x20as\x20','substring','You\x20are\x20Woozlit\x20AI,\x20an\x20autonomous\x20agent\x20connected\x20via\x20Discord.\x20Complete\x20tasks\x20immediately.\x0a\x0aRULES:\x0a1.\x20Execute\x20tools\x20FIRST,\x20explain\x20NEVER.\x20Be\x20concise.\x0a2.\x20No\x20emojis.\x20Maximum\x201-2\x20sentences\x20for\x20final\x20responses.\x0a3.\x20Use\x20tool\x20blocks\x20to\x20execute\x20actions.\x0a\x0aTOOLS:\x0a-\x20run_command:\x20{command,\x20wait,\x20background}\x0a-\x20read_terminal:\x20{}\x0a-\x20send_input:\x20{input}\x0a-\x20terminate:\x20{}\x0a-\x20create_file:\x20{path,\x20content}\x0a-\x20read_file:\x20{path}\x0a-\x20list_directory:\x20{path}\x0a-\x20edit_file:\x20{path,\x20search,\x20replace}\x0a-\x20delete_file:\x20{path}\x0a-\x20rename_file:\x20{from,\x20to}\x0a-\x20copy_file:\x20{from,\x20to}\x0a-\x20file_info:\x20{path}\x0a-\x20read_file_lines:\x20{path,\x20start,\x20end}\x0a-\x20find_files:\x20{path,\x20pattern}\x0a-\x20search_directory:\x20{path,\x20pattern}\x0a-\x20send_file:\x20{path}\x20-\x20send\x20file\x20to\x20Discord\x0a-\x20git_status,\x20git_diff,\x20git_log,\x20git_add,\x20git_commit,\x20git_branch\x0a-\x20fetch_url:\x20{url}\x0a-\x20download_file:\x20{url,\x20path}\x0a-\x20get_env:\x20{name},\x20set_env:\x20{name,\x20value}\x0a-\x20get_system_info:\x20{}\x0a-\x20clipboard_read,\x20clipboard_write:\x20{text}\x0a-\x20tree:\x20{path,\x20depth}\x0a-\x20grep_recursive:\x20{path,\x20pattern}\x0a-\x20replace_in_files:\x20{path,\x20search,\x20replace}\x0a-\x20powershell_run:\x20{script}\x0a-\x20zip_files:\x20{files,\x20output},\x20unzip_files:\x20{path,\x20output}\x0a-\x20write_json:\x20{path,\x20data},\x20read_json:\x20{path}\x0a-\x20patch_file:\x20{path,\x20patches}\x0a-\x20open_in_editor:\x20{path}\x0a-\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_screenshot,\x20browser_snapshot,\x20browser_close\x0a\x0aTOOL\x20FORMAT:\x0a```tool\x0a{\x22name\x22:\x22tool_name\x22,\x22args\x22:{\x22key\x22:\x22value\x22}}\x0a```','!files\x20','stdout','trim','repo','github_create_branch'];a7_0x3dff=function(){return _0x20751a;};return a7_0x3dff();}(function(_0x386f31,_0x5641ee){const _0x3d0bec=a7_0x42bd,_0x2c3d19=_0x386f31();while(!![]){try{const _0x564791=parseInt(_0x3d0bec(0x11b))/0x1*(parseInt(_0x3d0bec(0x134))/0x2)+-parseInt(_0x3d0bec(0xa3))/0x3*(-parseInt(_0x3d0bec(0xa7))/0x4)+parseInt(_0x3d0bec(0xff))/0x5*(-parseInt(_0x3d0bec(0xbd))/0x6)+parseInt(_0x3d0bec(0xaa))/0x7*(parseInt(_0x3d0bec(0x13f))/0x8)+-parseInt(_0x3d0bec(0x102))/0x9+parseInt(_0x3d0bec(0x112))/0xa*(-parseInt(_0x3d0bec(0xe0))/0xb)+parseInt(_0x3d0bec(0xf4))/0xc;if(_0x564791===_0x5641ee)break;else _0x2c3d19['push'](_0x2c3d19['shift']());}catch(_0x5080fe){_0x2c3d19['push'](_0x2c3d19['shift']());}}}(a7_0x3dff,0x46e61));function a7_0x42bd(_0x521f8d,_0x34812e){_0x521f8d=_0x521f8d-0xa0;const _0x3dfff7=a7_0x3dff();let _0x42bdb3=_0x3dfff7[_0x521f8d];return _0x42bdb3;}import{Client,GatewayIntentBits,ChannelType,Partials,AttachmentBuilder}from'discord.js';import{join,resolve,basename}from'path';import*as a7_0x3f22f4 from'./config.js';import*as a7_0x52a934 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,readTerminalOutput,sendTerminalInput,terminateProcess,deleteFile,renameFile,copyFile,fileInfo,readFileLines,findFiles,searchDirectory}from'../tools/index.js';import{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'../tools/git.js';import{fetchUrl,downloadFile as a7_0x1c493b}from'../tools/network.js';import{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'../tools/system.js';import{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'../tools/project.js';import{registerDiscordClient}from'../services/notifications.js';let client=null,isRunning=![];const chatHistories=new Map(),SYSTEM_PROMPT=a7_0x306b19(0xae);async function executeToolCall(_0x5545f6,_0x4fc17d,_0x3f590f){const _0x79e12d=a7_0x306b19;switch(_0x5545f6){case _0x79e12d(0x115):{const _0xe0758c=await runCommand(_0x4fc17d[_0x79e12d(0x111)],undefined,_0x4fc17d['background']||![],_0x4fc17d[_0x79e12d(0x100)]||0x7530);return _0xe0758c;}case'read_terminal':return readTerminalOutput(_0x4fc17d[_0x79e12d(0xeb)]);case _0x79e12d(0xc1):return sendTerminalInput(_0x4fc17d[_0x79e12d(0xbe)],_0x4fc17d['pid']);case _0x79e12d(0xa6):return terminateProcess(_0x4fc17d[_0x79e12d(0xeb)]);case'create_file':return createFile(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d[_0x79e12d(0x118)]);case'read_file':return readFile(_0x4fc17d['path']);case _0x79e12d(0xd5):return listDirectory(_0x4fc17d[_0x79e12d(0x129)]||'.');case _0x79e12d(0xa8):return editFile(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['search'],_0x4fc17d[_0x79e12d(0x121)]);case _0x79e12d(0xf3):return searchFile(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d[_0x79e12d(0xe1)]);case _0x79e12d(0x10d):return deleteFile(_0x4fc17d[_0x79e12d(0x129)]);case _0x79e12d(0xd3):return renameFile(_0x4fc17d[_0x79e12d(0x13d)]||_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['to']);case _0x79e12d(0xbb):return copyFile(_0x4fc17d['from']||_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['to']);case _0x79e12d(0xcb):return fileInfo(_0x4fc17d['path']);case _0x79e12d(0xc8):return readFileLines(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['start']||0x1,_0x4fc17d['end']||0x32);case'find_files':return findFiles(_0x4fc17d['path']||'.',_0x4fc17d[_0x79e12d(0xe1)]);case'search_directory':return searchDirectory(_0x4fc17d['path']||'.',_0x4fc17d[_0x79e12d(0xe1)]);case _0x79e12d(0x138):{try{const _0x5a553d=resolve(process[_0x79e12d(0x13e)](),_0x4fc17d[_0x79e12d(0x129)]);return await _0x3f590f('__Sending\x20file:\x20'+basename(_0x5a553d)+'__'),{'success':!![],'sent':!![],'note':'File\x20will\x20be\x20attached\x20separately'};}catch(_0x4188a0){return{'error':_0x79e12d(0xd2)+_0x4188a0};}}case _0x79e12d(0x13c):return gitStatus();case _0x79e12d(0x127):return gitDiff(_0x4fc17d[_0x79e12d(0x129)]);case _0x79e12d(0x11a):return gitLog(_0x4fc17d['count']||0xa);case _0x79e12d(0x10f):return gitAdd(_0x4fc17d[_0x79e12d(0x129)]||'.');case'git_commit':return gitCommit(_0x4fc17d[_0x79e12d(0x116)]);case _0x79e12d(0x12f):return gitBranch();case _0x79e12d(0x104):return fetchUrl(_0x4fc17d[_0x79e12d(0x105)]);case'download_file':return a7_0x1c493b(_0x4fc17d[_0x79e12d(0x105)],_0x4fc17d[_0x79e12d(0x129)]);case'get_env':return getEnv(_0x4fc17d[_0x79e12d(0xb7)]);case _0x79e12d(0x137):return setEnv(_0x4fc17d[_0x79e12d(0xb7)],_0x4fc17d['value']);case'get_system_info':return getSystemInfo();case _0x79e12d(0xdc):return clipboardRead();case'clipboard_write':return clipboardWrite(_0x4fc17d[_0x79e12d(0xb8)]);case _0x79e12d(0xfa):return tree(_0x4fc17d[_0x79e12d(0x129)]||'.',_0x4fc17d[_0x79e12d(0x125)]||0x3);case _0x79e12d(0xe7):return grepRecursive(_0x4fc17d[_0x79e12d(0x129)]||'.',_0x4fc17d[_0x79e12d(0xe1)],_0x4fc17d[_0x79e12d(0x126)]);case _0x79e12d(0xea):return replaceInFiles(_0x4fc17d[_0x79e12d(0x129)]||'.',_0x4fc17d[_0x79e12d(0xcf)],_0x4fc17d['replace'],_0x4fc17d['extensions']);case'powershell_run':return powershellRun(_0x4fc17d[_0x79e12d(0x10a)]||_0x4fc17d['command']);case'zip_files':return zipFiles(_0x4fc17d['files']||[_0x4fc17d[_0x79e12d(0x129)]],_0x4fc17d[_0x79e12d(0x145)]||'archive.zip');case'unzip_files':return unzipFiles(_0x4fc17d['path'],_0x4fc17d[_0x79e12d(0x145)]||'.');case _0x79e12d(0xda):return writeJson(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d['data']);case _0x79e12d(0xd0):return readJson(_0x4fc17d[_0x79e12d(0x129)]);case _0x79e12d(0x13a):return patchFile(_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d[_0x79e12d(0x135)]);case _0x79e12d(0xd1):return openInEditor(_0x4fc17d[_0x79e12d(0x129)]);case _0x79e12d(0x113):{const {readFile:_0x5a692c}=await import(_0x79e12d(0x133));return _0x5a692c(_0x4fc17d[_0x79e12d(0x122)],_0x4fc17d['repo'],_0x4fc17d[_0x79e12d(0x129)],_0x4fc17d[_0x79e12d(0xc9)]);}case _0x79e12d(0xb3):{const {createBranch:_0x2e371c}=await import('../github/api.js');return _0x2e371c(_0x4fc17d[_0x79e12d(0x122)],_0x4fc17d[_0x79e12d(0xb2)],_0x4fc17d[_0x79e12d(0xa1)],_0x4fc17d['fromBranch']);}case _0x79e12d(0x10e):{const {createPullRequest:_0x348232}=await import('../github/api.js');return _0x348232(_0x4fc17d[_0x79e12d(0x122)],_0x4fc17d[_0x79e12d(0xb2)],_0x4fc17d[_0x79e12d(0x13b)],_0x4fc17d[_0x79e12d(0x12c)],_0x4fc17d[_0x79e12d(0xa0)],_0x4fc17d[_0x79e12d(0xe4)]);}case _0x79e12d(0xfb):{const {browserOpen:_0x47069e,startBrowserServer:_0x41dd6d,isBrowserServerRunning:_0x28b496}=await import('../browser/index.js');if(!_0x28b496())await _0x41dd6d();return _0x47069e(_0x4fc17d[_0x79e12d(0x105)]);}case _0x79e12d(0x146):{const {browserClick:_0x27e9c6}=await import(_0x79e12d(0x143));return _0x27e9c6(_0x4fc17d['selector']);}case _0x79e12d(0xbf):{const {browserFill:_0x6c5db7}=await import(_0x79e12d(0x143));return _0x6c5db7(_0x4fc17d[_0x79e12d(0x142)],_0x4fc17d[_0x79e12d(0x10b)]);}case'browser_snapshot':{const {browserSnapshot:_0x464814}=await import('../browser/index.js');return _0x464814();}case _0x79e12d(0x139):{const {browserScreenshot:_0x2986af}=await import(_0x79e12d(0x143));return _0x2986af();}case _0x79e12d(0x103):{const {browserClose:_0x412f0d}=await import('../browser/index.js');return _0x412f0d();}default:return{'error':_0x79e12d(0x12b)+_0x5545f6};}}async function processDiscordAgentLoop(_0x143c08,_0xd83f7b,_0x27eb11,_0x51db0d){const _0x2de6bc=a7_0x306b19;let _0x1202bb=0x0;const _0x29d2f3=0x14;while(_0x1202bb<_0x29d2f3){_0x1202bb++;let _0x5d60c0='';try{const _0x51bdcf=await sendChatMessage(_0xd83f7b,_0x143c08,_0x33feea=>{_0x5d60c0+=_0x33feea;});_0x5d60c0=_0x51bdcf[_0x2de6bc(0x118)];}catch(_0x50c86b){await _0x27eb11(_0x2de6bc(0xfc)+(_0x50c86b[_0x2de6bc(0x116)]?.['substring'](0x0,0x64)||'Error'));return;}_0x143c08[_0x2de6bc(0x11d)]({'role':_0x2de6bc(0xe8),'content':_0x5d60c0});let _0x1b9f41=_0x5d60c0['match'](/```tool\s*([\s\S]*?)```/);if(!_0x1b9f41)_0x1b9f41=_0x5d60c0[_0x2de6bc(0xca)](/\*\*\*tool\s*([\s\S]*?)\*\*\*/);if(!_0x1b9f41)_0x1b9f41=_0x5d60c0[_0x2de6bc(0xca)](/```json\s*({[\s\S]*?"name"[\s\S]*?})\s*```/);if(!_0x1b9f41){let _0x179da6=_0x5d60c0[_0x2de6bc(0x121)](/<reasoning>[\s\S]*?<\/reasoning>/g,'')['replace'](/<text>|<\/text>/g,'')[_0x2de6bc(0x121)](/```tool[\s\S]*?```/g,'')[_0x2de6bc(0x121)](/\*\*\*tool[\s\S]*?\*\*\*/g,'')[_0x2de6bc(0x121)](/#{1,6}\s*/g,'')[_0x2de6bc(0xb1)]();if(_0x179da6){if(_0x179da6['length']>0x7d0){const _0x3977fe=_0x179da6[_0x2de6bc(0xca)](/[\s\S]{1,2000}/g)||[];for(const _0x56f29c of _0x3977fe)await _0x27eb11(_0x56f29c);}else await _0x27eb11(_0x179da6);}break;}try{const _0x46ae32=JSON[_0x2de6bc(0xc2)](_0x1b9f41[0x1]['trim']());a7_0x52a934[_0x2de6bc(0xde)]('[Discord]\x20Tool:\x20'+_0x46ae32['name']);const _0x5c4779=await executeToolCall(_0x46ae32[_0x2de6bc(0xb7)],_0x46ae32[_0x2de6bc(0xf6)],_0x27eb11);_0x46ae32['name']===_0x2de6bc(0x138)&&_0x46ae32[_0x2de6bc(0xf6)][_0x2de6bc(0x129)]&&await _0x51db0d(resolve(process[_0x2de6bc(0x13e)](),_0x46ae32[_0x2de6bc(0xf6)]['path'])),_0x143c08[_0x2de6bc(0x11d)]({'role':_0x2de6bc(0x109),'content':_0x2de6bc(0xf9)+_0x46ae32[_0x2de6bc(0xb7)]+':\x0a'+JSON[_0x2de6bc(0x132)](_0x5c4779,null,0x2)}),await new Promise(_0x5da042=>setTimeout(_0x5da042,0xc8));}catch(_0x5b3cb7){_0x143c08['push']({'role':_0x2de6bc(0x109),'content':'Tool\x20error:\x20'+_0x5b3cb7+_0x2de6bc(0x141)});}}}function getOrCreateHistory(_0x4646ce){const _0x102756=a7_0x306b19;return!chatHistories[_0x102756(0x101)](_0x4646ce)&&chatHistories[_0x102756(0xd7)](_0x4646ce,[{'role':_0x102756(0xd6),'content':SYSTEM_PROMPT}]),chatHistories[_0x102756(0xcc)](_0x4646ce);}export async function startBot(){const _0x4170cd=a7_0x306b19,_0x3326c7=a7_0x3f22f4[_0x4170cd(0xe6)]();if(!_0x3326c7)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits[_0x4170cd(0x11f)],GatewayIntentBits[_0x4170cd(0x10c)],GatewayIntentBits[_0x4170cd(0x120)],GatewayIntentBits[_0x4170cd(0x114)]],'partials':[Partials[_0x4170cd(0xa5)]]}),client[_0x4170cd(0xf0)](_0x4170cd(0xb9),()=>{const _0x484107=_0x4170cd;a7_0x52a934[_0x484107(0xf2)](_0x484107(0xac)+client?.[_0x484107(0x109)]?.[_0x484107(0x117)]),isRunning=!![];if(client)registerDiscordClient(client);}),client['on'](_0x4170cd(0xdb),async _0x47101b=>{const _0x4eb7a5=_0x4170cd;if(_0x47101b[_0x4eb7a5(0x131)]['bot'])return;const _0x3e82e1=_0x47101b[_0x4eb7a5(0xbc)][_0x4eb7a5(0x130)]===ChannelType['DM'],_0x3c424a=client?.['user']&&_0x47101b[_0x4eb7a5(0xe5)][_0x4eb7a5(0x101)](client[_0x4eb7a5(0x109)]);if(!_0x3e82e1&&!_0x3c424a)return;const _0x39392d=_0x47101b['content'][_0x4eb7a5(0x121)](/<@!?[0-9]+>/g,'')[_0x4eb7a5(0xb1)](),_0x1c948e=_0x47101b[_0x4eb7a5(0x131)]['id'],_0x436dde=(_0x47101b[_0x4eb7a5(0x136)]||'dm')+'-'+_0x47101b['channelId']+'-'+_0x1c948e,_0x5cdbf1=async _0x33d90e=>{const _0x53be32=_0x4eb7a5;await _0x47101b[_0x53be32(0xbc)][_0x53be32(0xef)](_0x33d90e)[_0x53be32(0x12e)](()=>{});},_0x17ba4b=async _0x2ba4b7=>{const _0x41a038=_0x4eb7a5;try{const _0xdbb13c=new AttachmentBuilder(_0x2ba4b7);await _0x47101b[_0x41a038(0xbc)][_0x41a038(0xef)]({'files':[_0xdbb13c]});}catch{}};if(_0x39392d===_0x4eb7a5(0xc7)||_0x39392d===_0x4eb7a5(0xed)){chatHistories[_0x4eb7a5(0xc5)](_0x436dde),await _0x47101b[_0x4eb7a5(0xe3)](_0x4eb7a5(0x128));return;}if(_0x39392d===_0x4eb7a5(0x144)||_0x39392d===_0x4eb7a5(0x11e)){chatHistories[_0x4eb7a5(0xc5)](_0x436dde),await _0x47101b[_0x4eb7a5(0xe3)](_0x4eb7a5(0xd8));return;}if(_0x39392d===_0x4eb7a5(0xfe)||_0x39392d===_0x4eb7a5(0xc4)){const _0x135c39=readTerminalOutput(),_0x41cea6=_0x135c39[_0x4eb7a5(0xec)][_0x4eb7a5(0xee)]>0x0?'\x0aProcesses:\x20'+_0x135c39[_0x4eb7a5(0xec)][_0x4eb7a5(0xb5)](',\x20'):'';await _0x47101b['reply']('Dir:\x20'+process[_0x4eb7a5(0x13e)]()+_0x4eb7a5(0xe9)+getSelectedModel()+_0x41cea6);return;}if(_0x39392d===_0x4eb7a5(0xb4)||_0x39392d===_0x4eb7a5(0xd9)){const _0x4c94d5=gitStatus(),_0x3c1b36=tree('.',0x2),_0x4a477b=readJson('package.json');let _0x2896a6='Dir:\x20'+process[_0x4eb7a5(0x13e)]()+'\x0aModel:\x20'+getSelectedModel()+'\x0a';if(_0x4a477b['success']&&_0x4a477b[_0x4eb7a5(0xa9)]){const _0x40c311=_0x4a477b['data'];_0x2896a6+=_0x4eb7a5(0x123)+(_0x40c311[_0x4eb7a5(0xb7)]||'?')+'\x20v'+(_0x40c311[_0x4eb7a5(0xfd)]||'?')+'\x0a';}if(_0x4c94d5['success'])_0x2896a6+='\x0aGit:\x20'+(_0x4c94d5['output']||'Clean')+'\x0a';_0x3c1b36['success']&&_0x3c1b36['tree']&&(_0x2896a6+=_0x4eb7a5(0x106)+_0x3c1b36['tree'][_0x4eb7a5(0xf8)]('\x0a')['slice'](0x0,0xf)[_0x4eb7a5(0xb5)]('\x0a'));if(_0x2896a6[_0x4eb7a5(0xee)]>0x7d0)_0x2896a6=_0x2896a6[_0x4eb7a5(0xad)](0x0,0x7cd)+_0x4eb7a5(0xdf);await _0x47101b['reply'](_0x2896a6);return;}if(_0x39392d[_0x4eb7a5(0xc3)]('/files\x20')||_0x39392d[_0x4eb7a5(0xc3)](_0x4eb7a5(0xaf))||_0x39392d===_0x4eb7a5(0xe2)||_0x39392d==='!files'){const _0x3b66b3=_0x39392d['replace'](/^[!/]files\s*/,'')[_0x4eb7a5(0xb1)]()||'.',_0x164fdf=listDirectory(_0x3b66b3);if(_0x164fdf[_0x4eb7a5(0xf2)]&&_0x164fdf['entries']){const _0x5c6829=_0x164fdf[_0x4eb7a5(0x140)][_0x4eb7a5(0xf7)](0x0,0x1e)['map'](_0xaefe8b=>{const _0x48807a=_0x4eb7a5,_0x31396b=_0xaefe8b['type']===_0x48807a(0xc0)?'[D]':_0x48807a(0xa2);return _0x31396b+'\x20'+_0xaefe8b[_0x48807a(0xb7)];})[_0x4eb7a5(0xb5)]('\x0a');await _0x47101b[_0x4eb7a5(0xe3)](_0x3b66b3+':\x0a\x0a'+_0x5c6829);}else await _0x47101b[_0x4eb7a5(0xe3)](_0x164fdf[_0x4eb7a5(0x116)]);return;}if(_0x39392d[_0x4eb7a5(0xc3)](_0x4eb7a5(0x11c))||_0x39392d[_0x4eb7a5(0xc3)](_0x4eb7a5(0xab))){const _0x58333c=_0x39392d['replace'](/^[!/]run\s+/,'')[_0x4eb7a5(0xb1)]();if(!_0x58333c){await _0x47101b[_0x4eb7a5(0xe3)]('Usage:\x20/run\x20<command>');return;}await _0x47101b[_0x4eb7a5(0xbc)][_0x4eb7a5(0xba)]()['catch'](()=>{});const _0x22ee0f=await runCommand(_0x58333c,undefined,![],0x7530),_0x5a15db=(_0x22ee0f[_0x4eb7a5(0xb0)]||_0x22ee0f[_0x4eb7a5(0xf1)]||_0x4eb7a5(0x124))['substring'](0x0,0x76c);await _0x47101b['reply'](_0x4eb7a5(0xdd)+_0x22ee0f['exitCode']+_0x4eb7a5(0x108)+_0x5a15db+_0x4eb7a5(0x12d));return;}if(_0x39392d[_0x4eb7a5(0xc3)]('/cd\x20')||_0x39392d['startsWith'](_0x4eb7a5(0xce))){const _0x2527f4=_0x39392d[_0x4eb7a5(0x121)](/^[!/]cd\s+/,'')[_0x4eb7a5(0xb1)]();try{process[_0x4eb7a5(0xb6)](resolve(process[_0x4eb7a5(0x13e)](),_0x2527f4)),await _0x47101b[_0x4eb7a5(0xe3)](_0x4eb7a5(0xcd)+process[_0x4eb7a5(0x13e)]());}catch(_0xa1ca81){await _0x47101b['reply']('Failed:\x20'+_0xa1ca81);}return;}if(!_0x39392d)return;await _0x47101b[_0x4eb7a5(0xbc)][_0x4eb7a5(0xba)]()['catch'](()=>{});const _0x2355c6=getOrCreateHistory(_0x436dde);_0x2355c6[_0x4eb7a5(0x11d)]({'role':_0x4eb7a5(0x109),'content':_0x39392d}),a7_0x52a934[_0x4eb7a5(0xde)](_0x4eb7a5(0xf5)+_0x47101b[_0x4eb7a5(0x131)][_0x4eb7a5(0xd4)]+':\x20'+_0x39392d),await processDiscordAgentLoop(_0x2355c6,getSelectedModel(),_0x5cdbf1,_0x17ba4b);if(_0x47101b['attachments'][_0x4eb7a5(0x110)]>0x0)for(const [,_0x58a35f]of _0x47101b[_0x4eb7a5(0xc6)]){try{const _0x1203c4=await fetch(_0x58a35f[_0x4eb7a5(0x105)]),_0x3b518b=Buffer[_0x4eb7a5(0x13d)](await _0x1203c4[_0x4eb7a5(0x147)]()),_0x44be59=join(process[_0x4eb7a5(0x13e)](),_0x58a35f[_0x4eb7a5(0xb7)]||_0x4eb7a5(0x119)+Date['now']()),{writeFileSync:_0x46a15f}=await import('fs');_0x46a15f(_0x44be59,_0x3b518b),_0x2355c6['push']({'role':'user','content':_0x4eb7a5(0xa4)+_0x58a35f[_0x4eb7a5(0xb7)]+'\x20('+_0x3b518b['length']+_0x4eb7a5(0x107)+_0x44be59+']'}),await _0x47101b['reply'](_0x4eb7a5(0x12a)+_0x58a35f[_0x4eb7a5(0xb7)]);}catch{}}}),await client['login'](_0x3326c7),!![];}catch(_0x2c354c){return a7_0x52a934['error']('[Discord]\x20Failed\x20to\x20start:\x20'+_0x2c354c[_0x4170cd(0x116)]),![];}}export function stopBot(){client&&(client['destroy'](),client=null),isRunning=![];}export function isBotRunning(){return isRunning;}
@@ -1 +1 @@
1
- const a8_0x2e558d=a8_0x2493;function a8_0x547d(){const _0x4b3d74=['sha256','clear','final','126uZpZjj','from','split','914733wRqFxz','120taFITr','4121020AdVyzr','update','utf8','get','digest','createCipheriv','55966NPbEkX','randomBytes','88HdXImA','createHash','botToken','woozlit_discord_secure_key','hex','5170008zsEyuX','toString','aes-256-cbc','6179495FGDwuL','389655obgsIJ','69wxOUnN','700938EQqmKr','woozlit-cli-discord'];a8_0x547d=function(){return _0x4b3d74;};return a8_0x547d();}(function(_0x227946,_0x1b6bbc){const _0x34d393=a8_0x2493,_0x28c997=_0x227946();while(!![]){try{const _0x1ebca4=parseInt(_0x34d393(0x102))/0x1+-parseInt(_0x34d393(0xed))/0x2*(-parseInt(_0x34d393(0xf9))/0x3)+parseInt(_0x34d393(0xf4))/0x4+parseInt(_0x34d393(0xf7))/0x5+-parseInt(_0x34d393(0xff))/0x6*(-parseInt(_0x34d393(0xf8))/0x7)+-parseInt(_0x34d393(0x103))/0x8*(parseInt(_0x34d393(0xfa))/0x9)+-parseInt(_0x34d393(0x104))/0xa*(parseInt(_0x34d393(0xef))/0xb);if(_0x1ebca4===_0x1b6bbc)break;else _0x28c997['push'](_0x28c997['shift']());}catch(_0x285af0){_0x28c997['push'](_0x28c997['shift']());}}}(a8_0x547d,0xc1086));import a8_0x441c11 from'conf';import a8_0x48c3d5 from'crypto';const config=new a8_0x441c11({'projectName':a8_0x2e558d(0xfb),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x2e558d(0xf2);function a8_0x2493(_0x46860d,_0x2d7a07){_0x46860d=_0x46860d-0xe9;const _0x547d81=a8_0x547d();let _0x249386=_0x547d81[_0x46860d];return _0x249386;}function encrypt(_0x2786de){const _0x59b168=a8_0x2e558d;if(!_0x2786de)return'';const _0x3bd4e1=a8_0x48c3d5[_0x59b168(0xee)](0x10),_0x5bea9b=a8_0x48c3d5[_0x59b168(0xf0)](_0x59b168(0xfc))[_0x59b168(0x105)](ENCRYPTION_KEY)[_0x59b168(0xeb)](),_0x4b9cee=a8_0x48c3d5[_0x59b168(0xec)](_0x59b168(0xf6),_0x5bea9b,_0x3bd4e1);let _0x3e5cf4=_0x4b9cee[_0x59b168(0x105)](_0x2786de,_0x59b168(0xe9),_0x59b168(0xf3));return _0x3e5cf4+=_0x4b9cee['final'](_0x59b168(0xf3)),_0x3bd4e1[_0x59b168(0xf5)](_0x59b168(0xf3))+':'+_0x3e5cf4;}function decrypt(_0x1a0f4e){const _0x3c7a33=a8_0x2e558d;if(!_0x1a0f4e)return'';try{const [_0xe508af,_0x5dc7b2]=_0x1a0f4e[_0x3c7a33(0x101)](':');if(!_0xe508af||!_0x5dc7b2)return'';const _0x246594=Buffer[_0x3c7a33(0x100)](_0xe508af,_0x3c7a33(0xf3)),_0x556af9=a8_0x48c3d5[_0x3c7a33(0xf0)]('sha256')[_0x3c7a33(0x105)](ENCRYPTION_KEY)[_0x3c7a33(0xeb)](),_0x2cf99e=a8_0x48c3d5['createDecipheriv']('aes-256-cbc',_0x556af9,_0x246594);let _0x2fec72=_0x2cf99e['update'](_0x5dc7b2,_0x3c7a33(0xf3),_0x3c7a33(0xe9));return _0x2fec72+=_0x2cf99e[_0x3c7a33(0xfe)]('utf8'),_0x2fec72;}catch{return'';}}export function setBotToken(_0x50a7e9){const _0x5d97a6=a8_0x2e558d;config['set'](_0x5d97a6(0xf1),encrypt(_0x50a7e9));}export function getBotToken(){const _0x5b5923=a8_0x2e558d;return decrypt(config[_0x5b5923(0xea)](_0x5b5923(0xf1)));}export function isEnabled(){return!!getBotToken();}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x474c81=a8_0x2e558d;config[_0x474c81(0xfd)]();}
1
+ const a8_0x1a0f56=a8_0x2631;(function(_0x23fb50,_0x2bb2eb){const _0x24b705=a8_0x2631,_0x1e9975=_0x23fb50();while(!![]){try{const _0x5a8bf0=-parseInt(_0x24b705(0xc9))/0x1+parseInt(_0x24b705(0xb4))/0x2*(parseInt(_0x24b705(0xc0))/0x3)+-parseInt(_0x24b705(0xc2))/0x4*(parseInt(_0x24b705(0xbd))/0x5)+-parseInt(_0x24b705(0xc5))/0x6+parseInt(_0x24b705(0xbf))/0x7*(-parseInt(_0x24b705(0xc6))/0x8)+-parseInt(_0x24b705(0xba))/0x9*(-parseInt(_0x24b705(0xbb))/0xa)+parseInt(_0x24b705(0xcb))/0xb*(parseInt(_0x24b705(0xb7))/0xc);if(_0x5a8bf0===_0x2bb2eb)break;else _0x1e9975['push'](_0x1e9975['shift']());}catch(_0xd65edf){_0x1e9975['push'](_0x1e9975['shift']());}}}(a8_0xe412,0xabb45));function a8_0x2631(_0x1e1397,_0x46471d){_0x1e1397=_0x1e1397-0xb0;const _0xe412c1=a8_0xe412();let _0x26314e=_0xe412c1[_0x1e1397];return _0x26314e;}import a8_0xaeacc from'conf';import a8_0x4abd58 from'crypto';const config=new a8_0xaeacc({'projectName':a8_0x1a0f56(0xb5),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x1a0f56(0xb6);function encrypt(_0x111fa0){const _0x314def=a8_0x1a0f56;if(!_0x111fa0)return'';const _0x3f5b21=a8_0x4abd58[_0x314def(0xbc)](0x10),_0x2cd81c=a8_0x4abd58['createHash'](_0x314def(0xb3))['update'](ENCRYPTION_KEY)['digest'](),_0xbb5c38=a8_0x4abd58[_0x314def(0xca)](_0x314def(0xbe),_0x2cd81c,_0x3f5b21);let _0x48d5e1=_0xbb5c38[_0x314def(0xb8)](_0x111fa0,'utf8',_0x314def(0xc4));return _0x48d5e1+=_0xbb5c38[_0x314def(0xb1)](_0x314def(0xc4)),_0x3f5b21[_0x314def(0xcc)](_0x314def(0xc4))+':'+_0x48d5e1;}function decrypt(_0xbb5c09){const _0x27f14f=a8_0x1a0f56;if(!_0xbb5c09)return'';try{const [_0x55a787,_0x541cb4]=_0xbb5c09[_0x27f14f(0xc1)](':');if(!_0x55a787||!_0x541cb4)return'';const _0x41db80=Buffer['from'](_0x55a787,_0x27f14f(0xc4)),_0x2e004c=a8_0x4abd58[_0x27f14f(0xb0)](_0x27f14f(0xb3))[_0x27f14f(0xb8)](ENCRYPTION_KEY)[_0x27f14f(0xc3)](),_0x5c57e6=a8_0x4abd58['createDecipheriv'](_0x27f14f(0xbe),_0x2e004c,_0x41db80);let _0x12a61e=_0x5c57e6['update'](_0x541cb4,_0x27f14f(0xc4),'utf8');return _0x12a61e+=_0x5c57e6[_0x27f14f(0xb1)](_0x27f14f(0xb9)),_0x12a61e;}catch{return'';}}export function setBotToken(_0x5b16f1){const _0x7a01d4=a8_0x1a0f56;config['set'](_0x7a01d4(0xc7),encrypt(_0x5b16f1));}export function getBotToken(){const _0x26facd=a8_0x1a0f56;return decrypt(config[_0x26facd(0xc8)](_0x26facd(0xc7)));}export function isEnabled(){return!!getBotToken();}function a8_0xe412(){const _0x2a4f89=['createHash','final','clear','sha256','44802GKRECo','woozlit-cli-discord','woozlit_discord_secure_key','12NineCK','update','utf8','45DEhhIr','2744710LozoKY','randomBytes','118545uXGffl','aes-256-cbc','14hfUrNV','108LrPAUs','split','56gmIpfD','digest','hex','2779362lXCmpM','3467560mtcrvY','botToken','get','387990ORzMEY','createCipheriv','6319973FIhuie','toString'];a8_0xe412=function(){return _0x2a4f89;};return a8_0xe412();}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x48cc2d=a8_0x1a0f56;config[_0x48cc2d(0xb2)]();}
@@ -1 +1 @@
1
- (function(_0x29de33,_0x4499b1){var _0x37c6ce=a9_0x16a0,_0x59ea5d=_0x29de33();while(!![]){try{var _0x2916a7=parseInt(_0x37c6ce(0xae))/0x1*(-parseInt(_0x37c6ce(0xb3))/0x2)+parseInt(_0x37c6ce(0xb0))/0x3+parseInt(_0x37c6ce(0xac))/0x4+-parseInt(_0x37c6ce(0xb4))/0x5+-parseInt(_0x37c6ce(0xb1))/0x6+parseInt(_0x37c6ce(0xb5))/0x7*(-parseInt(_0x37c6ce(0xb2))/0x8)+parseInt(_0x37c6ce(0xaf))/0x9*(parseInt(_0x37c6ce(0xad))/0xa);if(_0x2916a7===_0x4499b1)break;else _0x59ea5d['push'](_0x59ea5d['shift']());}catch(_0x456e13){_0x59ea5d['push'](_0x59ea5d['shift']());}}}(a9_0x513b,0xf2eb1));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./client.js';export{setupDiscord}from'./setup.js';function a9_0x16a0(_0x2af8ef,_0x185615){_0x2af8ef=_0x2af8ef-0xac;var _0x513b10=a9_0x513b();var _0x16a0b9=_0x513b10[_0x2af8ef];return _0x16a0b9;}function a9_0x513b(){var _0x4bee67=['12408730ItvgTb','1hxuOtE','18wycJAf','5944398eYOIGK','8936298IIiZIs','1162648BrfhXB','1743438KqfPEY','2864225XvlZDK','70vukvAI','3676152rFkRKz'];a9_0x513b=function(){return _0x4bee67;};return a9_0x513b();}
1
+ (function(_0x5d95f2,_0x458caf){var _0x307532=a9_0x5227,_0x22082=_0x5d95f2();while(!![]){try{var _0x28eb6b=-parseInt(_0x307532(0x15f))/0x1*(parseInt(_0x307532(0x162))/0x2)+parseInt(_0x307532(0x164))/0x3*(-parseInt(_0x307532(0x167))/0x4)+-parseInt(_0x307532(0x160))/0x5+parseInt(_0x307532(0x166))/0x6+parseInt(_0x307532(0x165))/0x7+parseInt(_0x307532(0x161))/0x8*(-parseInt(_0x307532(0x163))/0x9)+-parseInt(_0x307532(0x168))/0xa*(-parseInt(_0x307532(0x169))/0xb);if(_0x28eb6b===_0x458caf)break;else _0x22082['push'](_0x22082['shift']());}catch(_0x36b810){_0x22082['push'](_0x22082['shift']());}}}(a9_0x52b8,0x96ef6));export*from'./config.js';function a9_0x5227(_0x2bb9a9,_0x3f2579){_0x2bb9a9=_0x2bb9a9-0x15f;var _0x52b87a=a9_0x52b8();var _0x5227a1=_0x52b87a[_0x2bb9a9];return _0x5227a1;}function a9_0x52b8(){var _0x113d0b=['154297uCLNap','7rdeRtz','2427975iNDSwz','384976RUTPLM','234636GPHEEB','36miIsvA','3TBKnFu','4808496KTpRDL','2241474iokDVC','428836zflmDr','830fajeFQ'];a9_0x52b8=function(){return _0x113d0b;};return a9_0x52b8();}export{startBot,stopBot,isBotRunning}from'./client.js';export{setupDiscord}from'./setup.js';
@@ -1 +1 @@
1
- function a10_0x4d9e(){const _0x3a586a=['1361943JsStOf','18992920VgQkxk','90786UBKmTJ','dim','40732lHTmHv','15rHYgXV','Discord\x20configuration\x20saved!','16JHBUlK','1600232sihuMp','info','73728TIiREv','607019JeYnQm','280aOSvRY','You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.','Token\x20seems\x20too\x20short','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.'];a10_0x4d9e=function(){return _0x3a586a;};return a10_0x4d9e();}(function(_0x17e576,_0x533b1a){const _0x12a6a4=a10_0xa806,_0x54fcc3=_0x17e576();while(!![]){try{const _0x564afb=parseInt(_0x12a6a4(0x173))/0x1+parseInt(_0x12a6a4(0x17c))/0x2+parseInt(_0x12a6a4(0x172))/0x3+-parseInt(_0x12a6a4(0x180))/0x4*(-parseInt(_0x12a6a4(0x17d))/0x5)+-parseInt(_0x12a6a4(0x17a))/0x6*(-parseInt(_0x12a6a4(0x174))/0x7)+parseInt(_0x12a6a4(0x17f))/0x8*(parseInt(_0x12a6a4(0x178))/0x9)+-parseInt(_0x12a6a4(0x179))/0xa;if(_0x564afb===_0x533b1a)break;else _0x54fcc3['push'](_0x54fcc3['shift']());}catch(_0x37b27c){_0x54fcc3['push'](_0x54fcc3['shift']());}}}(a10_0x4d9e,0xd2241));import{input}from'@inquirer/prompts';function a10_0xa806(_0x37fabf,_0x1e6dd1){_0x37fabf=_0x37fabf-0x172;const _0x4d9ecf=a10_0x4d9e();let _0xa80600=_0x4d9ecf[_0x37fabf];return _0xa80600;}import*as a10_0x47bb89 from'./config.js';import*as a10_0x3184f3 from'../ui/output.js';export async function setupDiscord(){const _0x5e11b0=a10_0xa806;a10_0x3184f3[_0x5e11b0(0x181)]('Setup\x20Woozlit\x20Discord\x20Bot'),a10_0x3184f3[_0x5e11b0(0x17b)](_0x5e11b0(0x175));const _0x11e866=await input({'message':'Bot\x20Token:','validate':_0x557c3a=>_0x557c3a['length']>0xa?!![]:_0x5e11b0(0x176)}),_0x3e1941=await input({'message':'Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','default':'!'});a10_0x47bb89['setBotToken'](_0x11e866),a10_0x3184f3['success'](_0x5e11b0(0x17e)),a10_0x3184f3['info'](_0x5e11b0(0x177));}
1
+ function a10_0x37f6(_0x3d02f9,_0x9740d4){_0x3d02f9=_0x3d02f9-0x117;const _0x149616=a10_0x1496();let _0x37f6c0=_0x149616[_0x3d02f9];return _0x37f6c0;}(function(_0x3b79f9,_0x36ea11){const _0x1023c6=a10_0x37f6,_0x2ced43=_0x3b79f9();while(!![]){try{const _0x286f97=parseInt(_0x1023c6(0x12a))/0x1+parseInt(_0x1023c6(0x12b))/0x2*(-parseInt(_0x1023c6(0x11d))/0x3)+parseInt(_0x1023c6(0x127))/0x4*(parseInt(_0x1023c6(0x123))/0x5)+-parseInt(_0x1023c6(0x117))/0x6+-parseInt(_0x1023c6(0x119))/0x7*(parseInt(_0x1023c6(0x11e))/0x8)+-parseInt(_0x1023c6(0x122))/0x9*(-parseInt(_0x1023c6(0x12c))/0xa)+-parseInt(_0x1023c6(0x11f))/0xb*(-parseInt(_0x1023c6(0x124))/0xc);if(_0x286f97===_0x36ea11)break;else _0x2ced43['push'](_0x2ced43['shift']());}catch(_0x1bcf64){_0x2ced43['push'](_0x2ced43['shift']());}}}(a10_0x1496,0x2525c));function a10_0x1496(){const _0x1791d4=['You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.','Token\x20seems\x20too\x20short','507340hysigf','Discord\x20configuration\x20saved!','length','153177LXRYOh','2408zqtNrr','464310RxGzOf','1571814wbaUdS','dim','56dKofxe','Bot\x20Token:','info','Setup\x20Woozlit\x20Discord\x20Bot','489gmkpBY','274816JjHTYN','4103286bpxFOe','setBotToken','Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','45esgIWR','5xXIEER','12jvMyQK'];a10_0x1496=function(){return _0x1791d4;};return a10_0x1496();}import{input}from'@inquirer/prompts';import*as a10_0x5155b5 from'./config.js';import*as a10_0x2b4548 from'../ui/output.js';export async function setupDiscord(){const _0x41b1d0=a10_0x37f6;a10_0x2b4548['info'](_0x41b1d0(0x11c)),a10_0x2b4548[_0x41b1d0(0x118)](_0x41b1d0(0x125));const _0x204eb7=await input({'message':_0x41b1d0(0x11a),'validate':_0xefeb07=>_0xefeb07[_0x41b1d0(0x129)]>0xa?!![]:_0x41b1d0(0x126)}),_0x109abd=await input({'message':_0x41b1d0(0x121),'default':'!'});a10_0x5155b5[_0x41b1d0(0x120)](_0x204eb7),a10_0x2b4548['success'](_0x41b1d0(0x128)),a10_0x2b4548[_0x41b1d0(0x11b)]('Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.');}