woozlit 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) 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.js +1 -1
  55. package/dist/utils/api.js +1 -1
  56. package/dist/utils/chat-history.js +1 -1
  57. package/dist/utils/history.js +1 -1
  58. package/dist/utils/mcp-installer.js +1 -1
  59. package/dist/utils/platform.js +1 -1
  60. package/dist/utils/storage.js +1 -1
  61. package/dist/utils/update-check.js +1 -1
  62. package/dist/verify_repro.js +1 -1
  63. package/package.json +1 -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(_0x3f042b,_0x86b5db){const _0x7e5c76=a0_0x22be,_0x552190=_0x3f042b();while(!![]){try{const _0x52c96b=-parseInt(_0x7e5c76(0x7d))/0x1*(-parseInt(_0x7e5c76(0x90))/0x2)+-parseInt(_0x7e5c76(0x7a))/0x3+parseInt(_0x7e5c76(0x7f))/0x4+parseInt(_0x7e5c76(0x89))/0x5+parseInt(_0x7e5c76(0x82))/0x6*(parseInt(_0x7e5c76(0x87))/0x7)+-parseInt(_0x7e5c76(0x7b))/0x8*(parseInt(_0x7e5c76(0x92))/0x9)+-parseInt(_0x7e5c76(0x8e))/0xa*(parseInt(_0x7e5c76(0x93))/0xb);if(_0x52c96b===_0x86b5db)break;else _0x552190['push'](_0x552190['shift']());}catch(_0x4c0853){_0x552190['push'](_0x552190['shift']());}}}(a0_0x1275,0x72547));import a0_0x3ea3b2 from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';function a0_0x22be(_0x1df57f,_0xd9cf70){_0x1df57f=_0x1df57f-0x79;const _0x127513=a0_0x1275();let _0x22be3f=_0x127513[_0x1df57f];return _0x22be3f;}import{setToken,setUser,isLoggedIn,logout as a0_0x90eabb}from'../utils/storage.js';export async function login(){const _0x4b6b6e=getApiUrl(),_0x1fb54b=0x2694;return new Promise(_0x1e2e29=>{const _0x2a5059=createServer(async(_0x168d15,_0xc51cea)=>{const _0x3070f5=a0_0x22be,_0xb45c95=new URL(_0x168d15[_0x3070f5(0x8d)]||'',_0x3070f5(0x84)+_0x1fb54b);if(_0xb45c95[_0x3070f5(0x79)]===_0x3070f5(0x85)){const _0x2d172c=_0xb45c95[_0x3070f5(0x88)][_0x3070f5(0x81)](_0x3070f5(0x8b)),_0x48088c=_0xb45c95[_0x3070f5(0x88)][_0x3070f5(0x81)](_0x3070f5(0x91)),_0x5b8eef=_0xb45c95[_0x3070f5(0x88)]['get']('email'),_0x260861=_0xb45c95[_0x3070f5(0x88)][_0x3070f5(0x81)](_0x3070f5(0x86));_0x2d172c&&_0x48088c?(setToken(_0x2d172c),setUser(_0x48088c,_0x5b8eef||'',_0x260861||''),_0xc51cea[_0x3070f5(0x83)](0xc8,{'Content-Type':_0x3070f5(0x8a)}),_0xc51cea['end'](_0x3070f5(0x7c)),_0x2a5059[_0x3070f5(0x8c)](),_0x1e2e29(!![])):(_0xc51cea[_0x3070f5(0x83)](0x190,{'Content-Type':_0x3070f5(0x8a)}),_0xc51cea[_0x3070f5(0x8f)](_0x3070f5(0x80)),_0x2a5059[_0x3070f5(0x8c)](),_0x1e2e29(![]));}});_0x2a5059['listen'](_0x1fb54b,()=>{const _0x3e2bde=a0_0x22be,_0x17eac1=_0x4b6b6e+_0x3e2bde(0x7e)+_0x1fb54b+_0x3e2bde(0x85);a0_0x3ea3b2(_0x17eac1);}),setTimeout(()=>{const _0x2a7b63=a0_0x22be;_0x2a5059[_0x2a7b63(0x8c)](),_0x1e2e29(![]);},0x1d4c0);});}function a0_0x1275(){const _0x566b98=['982917pkXkHa','536BrnzDN','\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','71977oMbZAh','/auth/cli?callback=http://localhost:','3147316GNHznI','\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','get','470700cgiepB','writeHead','http://localhost:','/callback','displayName','14qrPaHL','searchParams','611840kOKxiW','text/html','token','close','url','4030nINLIp','end','6UfSXXc','userId','14031soEDRM','10417ooCBxU','pathname'];a0_0x1275=function(){return _0x566b98;};return a0_0x1275();}export function logout(){a0_0x90eabb();}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_0xeaa8(_0x233bd6,_0x5755de){_0x233bd6=_0x233bd6-0xeb;const _0xae3172=a1_0xae31();let _0xeaa80c=_0xae3172[_0x233bd6];return _0xeaa80c;}function a1_0xae31(){const _0x446a72=['Click\x20an\x20element\x20on\x20the\x20page','browser_fill','bottom','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','string','807081VVurtb','287860ZvhtYK','Text\x20to\x20fill','direction','10321752iWxUrh','top','4674754cVBawU','query','number','Fill\x20a\x20form\x20field\x20or\x20input\x20element','Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)','down','6OyBjbc','CSS\x20selector\x20for\x20the\x20element','12858435ytIsyj','text','1214293PMXnYm','tabId','150lVFrQV','3190860ipSYtb','object','Scroll\x20the\x20page\x20up\x20or\x20down','Direction\x20to\x20scroll','Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)'];a1_0xae31=function(){return _0x446a72;};return a1_0xae31();}const a1_0x17dae1=a1_0xeaa8;(function(_0x363e6c,_0x344b93){const _0x180122=a1_0xeaa8,_0x10df35=_0x363e6c();while(!![]){try{const _0x4f1abf=-parseInt(_0x180122(0xef))/0x1+parseInt(_0x180122(0xeb))/0x2*(parseInt(_0x180122(0xfc))/0x3)+-parseInt(_0x180122(0xf2))/0x4+parseInt(_0x180122(0xfd))/0x5*(parseInt(_0x180122(0xf1))/0x6)+parseInt(_0x180122(0x102))/0x7+parseInt(_0x180122(0x100))/0x8+-parseInt(_0x180122(0xed))/0x9;if(_0x4f1abf===_0x344b93)break;else _0x10df35['push'](_0x10df35['shift']());}catch(_0x2b95cb){_0x10df35['push'](_0x10df35['shift']());}}}(a1_0xae31,0xba733));export*from'./server.js';export*from'./tools.js';export*from'./server.js';export*from'./tools.js';export const tools=[{'name':a1_0x17dae1(0xf8),'description':a1_0x17dae1(0x105),'input_schema':{'type':a1_0x17dae1(0xf3),'properties':{'tabId':{'type':a1_0x17dae1(0x104),'description':'Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot'},'query':{'type':'string','description':a1_0x17dae1(0xec)},'text':{'type':a1_0x17dae1(0xfb),'description':a1_0x17dae1(0xfe)}},'required':[a1_0x17dae1(0xf0),a1_0x17dae1(0x103),a1_0x17dae1(0xee)]}},{'name':'browser_click','description':a1_0x17dae1(0xf7),'input_schema':{'type':a1_0x17dae1(0xf3),'properties':{'tabId':{'type':a1_0x17dae1(0x104),'description':a1_0x17dae1(0xfa)},'query':{'type':a1_0x17dae1(0xfb),'description':a1_0x17dae1(0xec)},'index':{'type':a1_0x17dae1(0x104),'description':a1_0x17dae1(0x106)}},'required':['tabId','query']}},{'name':'browser_scroll','description':a1_0x17dae1(0xf4),'input_schema':{'type':a1_0x17dae1(0xf3),'properties':{'tabId':{'type':a1_0x17dae1(0x104),'description':'Tab\x20ID'},'direction':{'type':a1_0x17dae1(0xfb),'enum':['up',a1_0x17dae1(0x107),a1_0x17dae1(0x101),a1_0x17dae1(0xf9)],'description':a1_0x17dae1(0xf5)},'amount':{'type':'number','description':a1_0x17dae1(0xf6)}},'required':[a1_0x17dae1(0xf0),a1_0x17dae1(0xff)]}}];
@@ -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(_0x5b0b13,_0x48c82){const _0x4ede86=a2_0x48af,_0x5f4bee=_0x5b0b13();while(!![]){try{const _0x126c79=-parseInt(_0x4ede86(0xa4))/0x1*(-parseInt(_0x4ede86(0xac))/0x2)+parseInt(_0x4ede86(0x85))/0x3*(-parseInt(_0x4ede86(0x90))/0x4)+parseInt(_0x4ede86(0x99))/0x5+parseInt(_0x4ede86(0x98))/0x6*(parseInt(_0x4ede86(0x87))/0x7)+parseInt(_0x4ede86(0xa0))/0x8*(-parseInt(_0x4ede86(0x88))/0x9)+-parseInt(_0x4ede86(0x91))/0xa+parseInt(_0x4ede86(0x8d))/0xb;if(_0x126c79===_0x48c82)break;else _0x5f4bee['push'](_0x5f4bee['shift']());}catch(_0x260a77){_0x5f4bee['push'](_0x5f4bee['shift']());}}}(a2_0x748d,0x36976));import{WebSocketServer}from'ws';function a2_0x48af(_0x41f519,_0x5d9eca){_0x41f519=_0x41f519-0x7e;const _0x748d51=a2_0x748d();let _0x48afc3=_0x748d51[_0x41f519];return _0x48afc3;}function a2_0x748d(){const _0x448ccb=['type','userId','parse','clear','data','dim','6tGuzBy','1160605DUxjOH','values','success','requestId','EADDRINUSE','code','uid','1713608wnyOkD','Failed\x20to\x20start\x20browser\x20server:\x20','resolve','email','15033CHEWUC','get','auth','Browser\x20server\x20error:\x20','reject','close','Command\x20timeout\x20after\x20','Server\x20stopped','50YvdYPU','auth_success','No\x20browser\x20extension\x20connected','Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...','stringify','forEach','result','user','error','info','Browser\x20server\x20already\x20running','send','toString','timeout','Browser\x20server\x20not\x20running','10188KgmjqW','message','1339471ksQUeS','18vjmPjJ','from','Browser\x20server\x20started\x20on\x20ws://localhost:','delete','connection','5669048eFuwzR','random','Command\x20failed','524xqkrSt','2177830joKKPk'];a2_0x748d=function(){return _0x448ccb;};return a2_0x748d();}import*as a2_0x49b35b from'../ui/output.js';const sessions=new Map();let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x3451f7=0x2408){return new Promise(_0x21a84a=>{const _0x5d85d4=a2_0x48af;if(isRunning&&server){a2_0x49b35b['warn'](_0x5d85d4(0x80)),_0x21a84a(!![]);return;}try{server=new WebSocketServer({'port':_0x3451f7}),server['on']('listening',()=>{const _0x33cfa0=_0x5d85d4;isRunning=!![],a2_0x49b35b[_0x33cfa0(0x9b)](_0x33cfa0(0x8a)+_0x3451f7),a2_0x49b35b[_0x33cfa0(0x97)](_0x33cfa0(0xaf)),_0x21a84a(!![]);}),server['on'](_0x5d85d4(0x8c),async _0x5af338=>{const _0x3140dd=_0x5d85d4;let _0xe6ac02=null;_0x5af338['on'](_0x3140dd(0x86),async _0x3fe920=>{const _0x11592a=_0x3140dd;try{const _0x457d92=JSON[_0x11592a(0x94)](_0x3fe920['toString']());if(_0x457d92[_0x11592a(0x92)]===_0x11592a(0xa6))_0xe6ac02={'ws':_0x5af338,'userId':_0x457d92[_0x11592a(0xb3)]?.[_0x11592a(0x9f)]||'unknown','userEmail':_0x457d92[_0x11592a(0xb3)]?.[_0x11592a(0xa3)]||'unknown','connectedAt':Date['now']()},sessions['set'](_0xe6ac02[_0x11592a(0x93)],_0xe6ac02),_0x5af338[_0x11592a(0x81)](JSON['stringify']({'type':_0x11592a(0xad),'userId':_0xe6ac02[_0x11592a(0x93)]}));else{if(_0x457d92[_0x11592a(0x92)]==='response'){const _0x3c61e5=pendingRequests[_0x11592a(0xa5)](_0x457d92[_0x11592a(0x9c)]);_0x3c61e5&&(clearTimeout(_0x3c61e5[_0x11592a(0x83)]),pendingRequests['delete'](_0x457d92['requestId']),_0x457d92[_0x11592a(0xb2)][_0x11592a(0x9b)]?_0x3c61e5[_0x11592a(0xa2)](_0x457d92[_0x11592a(0xb2)][_0x11592a(0x96)]):_0x3c61e5[_0x11592a(0xa8)](new Error(_0x457d92[_0x11592a(0xb2)][_0x11592a(0x7e)]||_0x11592a(0x8f))));}}}catch(_0x9d0e84){console[_0x11592a(0x7e)]('Error\x20processing\x20message:',_0x9d0e84);}}),_0x5af338['on'](_0x3140dd(0xa9),()=>{const _0x3e1c34=_0x3140dd;_0xe6ac02&&sessions[_0x3e1c34(0x8b)](_0xe6ac02[_0x3e1c34(0x93)]);}),_0x5af338['on'](_0x3140dd(0x7e),_0x2581a6=>{console['error']('WebSocket\x20error:',_0x2581a6);});}),server['on'](_0x5d85d4(0x7e),_0x4f7dd5=>{const _0x2e8305=_0x5d85d4;_0x4f7dd5[_0x2e8305(0x9e)]!==_0x2e8305(0x9d)&&a2_0x49b35b[_0x2e8305(0x7e)](_0x2e8305(0xa7)+_0x4f7dd5['message']),_0x21a84a(![]);});}catch(_0x27df0d){_0x27df0d[_0x5d85d4(0x9e)]!==_0x5d85d4(0x9d)&&a2_0x49b35b[_0x5d85d4(0x7e)](_0x5d85d4(0xa1)+_0x27df0d['message']),_0x21a84a(![]);}});}export function stopBrowserServer(){const _0x54f709=a2_0x48af;server&&(sessions['clear'](),pendingRequests[_0x54f709(0xb1)](({timeout:_0x433d3e,reject:_0x195027})=>{const _0x357e27=_0x54f709;clearTimeout(_0x433d3e),_0x195027(new Error(_0x357e27(0xab)));}),pendingRequests[_0x54f709(0x95)](),server[_0x54f709(0xa9)](),server=null,isRunning=![],a2_0x49b35b[_0x54f709(0x7f)]('Browser\x20server\x20stopped'));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0xce4178,_0xb86d6d={},_0x374d09=0x7530){const _0x3cac68=a2_0x48af;if(!isRunning)throw new Error(_0x3cac68(0x84));const _0x3ea2c6=Array[_0x3cac68(0x89)](sessions[_0x3cac68(0x9a)]())[0x0];if(!_0x3ea2c6)throw new Error(_0x3cac68(0xae));const _0x5ec45e=generateRequestId();return new Promise((_0x184e76,_0x19d5c8)=>{const _0x45fb9f=_0x3cac68,_0x3885cb=setTimeout(()=>{const _0x207eba=a2_0x48af;pendingRequests[_0x207eba(0x8b)](_0x5ec45e),_0x19d5c8(new Error(_0x207eba(0xaa)+_0x374d09+'ms'));},_0x374d09);pendingRequests['set'](_0x5ec45e,{'resolve':_0x184e76,'reject':_0x19d5c8,'timeout':_0x3885cb});const _0x48f630={'requestId':_0x5ec45e,'command':_0xce4178,'args':_0xb86d6d};_0x3ea2c6['ws'][_0x45fb9f(0x81)](JSON[_0x45fb9f(0xb0)](_0x48f630));});}function generateRequestId(){const _0x1945f8=a2_0x48af;return'req_'+Date['now']()+'_'+Math[_0x1945f8(0x8e)]()[_0x1945f8(0x82)](0x24)['substr'](0x2,0x9);}export function getConnectedSessions(){const _0x24af99=a2_0x48af;return Array[_0x24af99(0x89)](sessions[_0x24af99(0x9a)]());}
@@ -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(_0x25f206,_0x47ab1f){const _0x53f29d=a3_0x1885,_0xd196d8=_0x25f206();while(!![]){try{const _0x2db711=-parseInt(_0x53f29d(0x18a))/0x1+-parseInt(_0x53f29d(0x193))/0x2*(-parseInt(_0x53f29d(0x19f))/0x3)+-parseInt(_0x53f29d(0x18d))/0x4*(-parseInt(_0x53f29d(0x19d))/0x5)+parseInt(_0x53f29d(0x191))/0x6+-parseInt(_0x53f29d(0x19a))/0x7*(-parseInt(_0x53f29d(0x1a0))/0x8)+-parseInt(_0x53f29d(0x197))/0x9*(parseInt(_0x53f29d(0x18f))/0xa)+-parseInt(_0x53f29d(0x198))/0xb*(-parseInt(_0x53f29d(0x18b))/0xc);if(_0x2db711===_0x47ab1f)break;else _0xd196d8['push'](_0xd196d8['shift']());}catch(_0x36598e){_0xd196d8['push'](_0xd196d8['shift']());}}}(a3_0x2ccc,0x8da62));import{sendBrowserCommand,getConnectedSessions}from'./server.js';function a3_0x2ccc(){const _0x2241f6=['2376OiiBgo','length','2611zOTZrp','Opened\x20in\x20system\x20browser','get_text','141070FCQlWX','wait','174729UPAqgj','10456SoVjRn','get_html','snapshot','849536HYczWx','1668TvTlJJ','close','128Sftaxd','number','20tFJZET','forward','4711308TeQxXg','reload','2LKpKvJ','screenshot','click','scroll','3753513JfVZvj'];a3_0x2ccc=function(){return _0x2241f6;};return a3_0x2ccc();}import a3_0x5d8405 from'open';export async function browserOpen(_0x3c778e){const _0x2f9214=a3_0x1885,_0x14c0b3=getConnectedSessions();if(_0x14c0b3[_0x2f9214(0x199)]===0x0)return await a3_0x5d8405(_0x3c778e),{'success':!![],'message':_0x2f9214(0x19b)};try{return await sendBrowserCommand('open',{'url':_0x3c778e});}catch(_0x1b01a4){return await a3_0x5d8405(_0x3c778e),{'success':!![],'message':_0x2f9214(0x19b)};}}export async function browserClick(_0x41864a){const _0xcd431c=a3_0x1885;return await sendBrowserCommand(_0xcd431c(0x195),{'selector':_0x41864a});}export async function browserFill(_0xeba1a1,_0x5acc4a){return await sendBrowserCommand('fill',{'selector':_0xeba1a1,'value':_0x5acc4a});}export async function browserSnapshot(){const _0x1c8cc9=a3_0x1885;return await sendBrowserCommand(_0x1c8cc9(0x1a2));}export async function browserScreenshot(){const _0x3a97f1=a3_0x1885;return await sendBrowserCommand(_0x3a97f1(0x194));}export async function browserGetText(_0x3ac95c){const _0x1ef2e8=a3_0x1885;return await sendBrowserCommand(_0x1ef2e8(0x19c),{'selector':_0x3ac95c});}export async function browserGetHtml(_0x4e2cb3){const _0x4a9495=a3_0x1885;return await sendBrowserCommand(_0x4a9495(0x1a1),{'selector':_0x4e2cb3});}export async function browserWait(_0x152d57){const _0x540106=a3_0x1885;return typeof _0x152d57===_0x540106(0x18e)?await sendBrowserCommand(_0x540106(0x19e),{'ms':_0x152d57}):await sendBrowserCommand('wait',{'selector':_0x152d57});}export async function browserBack(){return await sendBrowserCommand('back');}export async function browserForward(){const _0x1771db=a3_0x1885;return await sendBrowserCommand(_0x1771db(0x190));}function a3_0x1885(_0x3b206a,_0x2917a4){_0x3b206a=_0x3b206a-0x18a;const _0x2ccc5a=a3_0x2ccc();let _0x188547=_0x2ccc5a[_0x3b206a];return _0x188547;}export async function browserReload(){const _0x4c0efd=a3_0x1885;return await sendBrowserCommand(_0x4c0efd(0x192));}export async function browserScroll(_0x1c225a,_0x46fd53){const _0x532473=a3_0x1885;return await sendBrowserCommand(_0x532473(0x196),{'direction':_0x1c225a,'amount':_0x46fd53});}export async function browserClose(){const _0x222c5e=a3_0x1885;return await sendBrowserCommand(_0x222c5e(0x18c));}
@@ -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
+ const a4_0x3519b3=a4_0x36bc;(function(_0x9d1246,_0x1fe934){const _0x44112e=a4_0x36bc,_0x39c1cf=_0x9d1246();while(!![]){try{const _0x3818c0=-parseInt(_0x44112e(0x1fd))/0x1+parseInt(_0x44112e(0x1fe))/0x2*(parseInt(_0x44112e(0x188))/0x3)+-parseInt(_0x44112e(0x224))/0x4+-parseInt(_0x44112e(0x16f))/0x5+-parseInt(_0x44112e(0x13e))/0x6+-parseInt(_0x44112e(0x20c))/0x7*(parseInt(_0x44112e(0x244))/0x8)+parseInt(_0x44112e(0x1de))/0x9;if(_0x3818c0===_0x1fe934)break;else _0x39c1cf['push'](_0x39c1cf['shift']());}catch(_0x17d33c){_0x39c1cf['push'](_0x39c1cf['shift']());}}}(a4_0x5b87,0x7d55b));import{input,select}from'@inquirer/prompts';import a4_0x204fb0 from'chalk';import a4_0x5d769c 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_0x36bc(_0x4f6cfb,_0x4a8ef0){_0x4f6cfb=_0x4f6cfb-0x11f;const _0x5b8786=a4_0x5b87();let _0x36bc1d=_0x5b8786[_0x4f6cfb];return _0x36bc1d;}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';function a4_0x5b87(){const _0x5db80f=['depth','1561cgnwhR','Replace','success','WriteJSON','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','info','terminate_process','browser_get_text','Snapshot','Patch','size','\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration','wait','monthlyLimit','actionSpinner','status','../tools/command.js','../telegram/index.js','Screenshot','powershell_run','resetIn','User\x20responded:\x20','displayName','match','448072rhvuCz','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','filepath','CloseBrowser','body','Now,','\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot','path','browser_close','force\x20closed','list_active_processes','files','browser_click','GitLog','browser_snapshot','../github/api.js','I\x20am','ClipRead','```','GetEnv','title','stdout','output','../utils/storage.js','Fetch','Bot\x20token:','Tool\x20error\x20occurred:\x20','Read','Open','stop','/rollback','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram','30584pMhhUS','Done\x20in\x20','isBotRunning','SetEnv','\x20lines\x20of\x20output\x20(','Browser\x20server\x20is\x20not\x20running','Goodbye!','User\x20aborted.','No\x20changes\x20to\x20rollback','Rename','aiMessageEnd','stopBot','slice','RunBG','\x0aAborting...','rename_file','Active\x20processes:\x20','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','/browser','../ui/themes.js','Update','loggedInBox','bold','\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status','assistant','signal','unzip_files','read_terminal_output','Telegram\x20Bot\x20Setup','args','Model\x20changed\x20to:\x20','github_read_file','keys','Zip','Exited\x20with\x20code\x20','now','createSpinner','edit_file','includes','script','Unknown\x20tool:\x20','trim','patches','abort','/help','461046aZFGMB','warn','browser_fill','length','file_info','must\x20greet','```tool','destination','Copy','Read\x20','registered\x20that','/quit','../browser/index.js','branchName','read_file_lines','fetch_url','/theme','archive.zip','updatedAt','url','command','selector','ListProcs','No\x20chat\x20history\x20found.','toLocaleString','pid','isOverLimit','List','toolSuccess','map','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','ReadJSON','setSecurityPin','set_env','AbortError','cwd','git_add','Ask','SearchDir','browser_screenshot','1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather','Error','clipboard_read','startBot','git_log','Connected\x20browsers:\x20','Fill','Telegram\x20Commands','PID:','2504060GnALch','user','text','.\x20Please\x20fix\x20this\x20and\x20continue.','message','input','../tools/rollback.js','isConfigured','GitStatus','/clear','mcpConnected','startsWith','###','isSpinning','value','What\x20would\x20you\x20like\x20to\x20do?','Invalid\x20JSON\x20output\x20from\x20model:\x20','Conversation\x20cleared','userEmail','\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot','copy_file','forEach','<execute_tool>','/model','write','4227smzrrf','any','exitCode','currentDir','Stop.','source','data','Find','removeListener','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','setup','run_command','end','ask_human','string','Operation\x20failed','MCP\x20Tool\x20error:\x20','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','Info','Unzip','tool\x20execution\x20failed','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,\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','aborted','filename','Error:\x20','statusBar','repo','):\x20','stderr','</execute_tool>','substring','Browser','get_system_info','\x0a>\x20','file_path','zip_files','Create','grep_recursive','SysInfo','tree','code','Run','/history','system','stringify','serverName','Thinking...','get_env','then','question','GitBranch','Grep','primary','find','values','all','toFixed','/mcp','name','archive','Security\x20PIN\x20set!','Theme\x20changed\x20to:\x20','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','dim','Completed\x20with\x20','Connected\x20MCP\x20Tools:','hex','pattern','open_in_editor','Completed\x20successfully\x20(','../tools/file.js','\x0aYou\x20are\x20running\x20on\x20','Reached\x20maximum\x20iterations','Telegram\x20bot\x20is\x20running','InputTerm','header','Download','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/history\x20to\x20resume\x20chats,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','read_file','owner','git_status','I\x27ve','download_file','github_create_branch','push','parse','15418431kXBvOC','API\x20error:\x20','Unknown\x20tool','error','ClipWrite','GitAdd','branch','email','Let\x20me','3.\x20Copy\x20the\x20bot\x20token','browser_open','@inquirer/prompts','...','KillProc','list_directory','tokensUsed','create_file','start','replace','rateLimitWarning','.\x20Use\x20PowerShell\x20commands.','run_background','\x20-\x20','messages','\x20\x20-\x20','send_terminal_input','split','Failed\x20to\x20fetch\x20usage\x20data.','Unexpected\x20error:\x20','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','head','301501hLbHyL','914VgZDKm','git_diff','getThemeById','Resumed\x20chat:\x20','exit','content','SIGINT','search','unshift','Tool\x20result\x20for\x20','\x20[Aborted]','replace_in_files','delete_file'];a4_0x5b87=function(){return _0x5db80f;};return a4_0x5b87();}import*as a4_0x55c6b3 from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x8f143e from'../github/index.js';const SYSTEM_PROMPT=a4_0x3519b3(0x19d);export async function startChat(_0x9af23d){const _0x56dcaf=a4_0x3519b3,{startBrowserServer:_0x5a607d}=await import(_0x56dcaf(0x14a));_0x5a607d()['catch'](()=>{});let _0x26512d=a4_0x5d769c['randomUUID']();const _0x18021a=getSelectedModel();await connectToMcpServers();const _0x26564a=await getMcpTools(),_0xd97061=new Set(_0x26564a['map'](_0x38cc05=>_0x38cc05[_0x56dcaf(0x1b5)]));_0xd97061[_0x56dcaf(0x216)]>0x0&&a4_0x55c6b3[_0x56dcaf(0x179)](_0xd97061[_0x56dcaf(0x216)],_0x26564a[_0x56dcaf(0x141)]);process['on'](_0x56dcaf(0x202),()=>closeMcpClients());const _0xf71b5b=formatRulesForSystem(),_0xd9260d=getPlatformInfo(),_0x1ef80c=getShellPrefix(),_0x16eb97=_0x26564a['length']>0x0?'\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a'+_0x26564a['map'](_0x466f26=>{const _0x4f2a41=_0x56dcaf,_0x365027=Object[_0x4f2a41(0x131)](_0x466f26['inputSchema']?.['properties']||{})['join'](',\x20');return'-\x20'+_0x466f26[_0x4f2a41(0x1c2)]+'('+_0x365027+_0x4f2a41(0x1a3)+_0x466f26['description'];})['join']('\x0a'):'',_0xab92da=isWindows()?_0x56dcaf(0x1cf)+_0xd9260d+_0x56dcaf(0x1f2):_0x56dcaf(0x1cf)+_0xd9260d+'.\x20Use\x20'+_0x1ef80c+'\x20for\x20commands\x20requiring\x20elevated\x20privileges.',_0x1f40f3=SYSTEM_PROMPT+_0x16eb97+_0xab92da+'\x0a'+_0xf71b5b,_0x4d1a95=getUser(),_0x5c25d2=[{'role':_0x56dcaf(0x1b3),'content':_0x1f40f3}];(_0x4d1a95[_0x56dcaf(0x222)]||_0x4d1a95[_0x56dcaf(0x1e5)])&&a4_0x55c6b3[_0x56dcaf(0x126)](_0x4d1a95[_0x56dcaf(0x222)]||_0x4d1a95['email']||'Unknown');a4_0x55c6b3[_0x56dcaf(0x18b)](process[_0x56dcaf(0x161)]()),a4_0x55c6b3[_0x56dcaf(0x1c7)](_0x56dcaf(0x1d5)),a4_0x55c6b3[_0x56dcaf(0x1a1)](_0x18021a,0x64);const _0x106b3=async _0x207243=>{const _0x5523f2=_0x56dcaf;if(!_0x207243||_0x207243[_0x5523f2(0x13a)]()==='')return!![];const _0x13be3b=_0x207243[_0x5523f2(0x13a)]();if(_0x13be3b==='/exit'||_0x13be3b===_0x5523f2(0x149))return a4_0x55c6b3[_0x5523f2(0x211)](_0x5523f2(0x24a)),![];if(_0x13be3b===_0x5523f2(0x178))return _0x5c25d2['length']=0x1,_0x26512d=a4_0x5d769c['randomUUID'](),a4_0x55c6b3[_0x5523f2(0x211)](_0x5523f2(0x180)),!![];if(_0x13be3b===_0x5523f2(0x1b2)){const _0x1878a6=getChatSessions();if(_0x1878a6[_0x5523f2(0x141)]===0x0)return a4_0x55c6b3['info'](_0x5523f2(0x155)),!![];const _0x300489=_0x1878a6[_0x5523f2(0x15b)](_0xfa7691=>{const _0x3f29c6=_0x5523f2,_0xbdade3=new Date(_0xfa7691[_0x3f29c6(0x150)])[_0x3f29c6(0x156)]();return{'name':_0xbdade3+_0x3f29c6(0x1f4)+_0xfa7691[_0x3f29c6(0x238)],'value':_0xfa7691['id']};});_0x300489[_0x5523f2(0x206)]({'name':'Cancel','value':'cancel'});const _0x37ceb6=await select({'message':'Select\x20a\x20previous\x20chat\x20to\x20resume:','choices':_0x300489});if(_0x37ceb6==='cancel')return!![];const _0x5453c1=getChatSession(_0x37ceb6);return _0x5453c1?(_0x26512d=_0x5453c1['id'],_0x5c25d2[_0x5523f2(0x141)]=0x0,_0x5c25d2[_0x5523f2(0x1dc)](..._0x5453c1[_0x5523f2(0x1f5)]),a4_0x55c6b3[_0x5523f2(0x20e)](_0x5523f2(0x201)+_0x5453c1[_0x5523f2(0x238)])):a4_0x55c6b3[_0x5523f2(0x1e1)]('Could\x20not\x20load\x20that\x20chat.'),!![];}if(_0x13be3b===_0x5523f2(0x1c1)){const _0x4908d9=await getMcpTools();return _0x4908d9[_0x5523f2(0x141)]===0x0?a4_0x55c6b3['info']('No\x20MCP\x20tools\x20connected.'):(a4_0x55c6b3[_0x5523f2(0x211)](_0x5523f2(0x1c9)),_0x4908d9['forEach'](_0x35eaed=>a4_0x55c6b3[_0x5523f2(0x1c7)]('-\x20'+_0x35eaed['name']+'\x20('+_0x35eaed[_0x5523f2(0x1b5)]+_0x5523f2(0x1a3)+(_0x35eaed['description']?.[_0x5523f2(0x250)](0x0,0x32)||'')))),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x15c)),!![];}if(_0x13be3b===_0x5523f2(0x13d))return a4_0x55c6b3[_0x5523f2(0x1d3)]('Commands'),a4_0x55c6b3['dim']('\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat'),a4_0x55c6b3['dim']('\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history'),a4_0x55c6b3[_0x5523f2(0x1c7)]('\x20\x20/history\x20\x20\x20-\x20View\x20and\x20resume\x20previous\x20chats'),a4_0x55c6b3[_0x5523f2(0x1c7)]('\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model'),a4_0x55c6b3[_0x5523f2(0x1c7)]('\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme'),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x199)),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x243)),a4_0x55c6b3[_0x5523f2(0x1c7)]('\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats'),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x191)),a4_0x55c6b3['dim'](_0x5523f2(0x210)),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x217)),a4_0x55c6b3['dim'](_0x5523f2(0x128)),!![];if(_0x13be3b===_0x5523f2(0x123)){const {isBrowserServerRunning:_0x528718,getConnectedSessions:_0x552850}=await import(_0x5523f2(0x14a));if(_0x528718()){const _0x2ed3fe=_0x552850();a4_0x55c6b3['success']('Browser\x20server\x20is\x20running'),a4_0x55c6b3[_0x5523f2(0x211)](_0x5523f2(0x16b)+_0x2ed3fe[_0x5523f2(0x141)]),_0x2ed3fe[_0x5523f2(0x184)](_0x379eef=>a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x1f6)+_0x379eef[_0x5523f2(0x181)]));}else a4_0x55c6b3['dim'](_0x5523f2(0x249)),a4_0x55c6b3[_0x5523f2(0x1c7)]('It\x20will\x20start\x20automatically\x20when\x20needed');return!![];}if(_0x13be3b[_0x5523f2(0x17a)]('/github')){const _0x4fc235=_0x13be3b['split']('\x20')[0x1]||'';return await a4_0x8f143e['handleGitHubCommand'](_0x4fc235),!![];}if(_0x13be3b[_0x5523f2(0x17a)]('/telegram')){const _0x57cd65=await import(_0x5523f2(0x21d)),_0x3b0984=_0x13be3b['split']('\x20')[0x1]||'';if(_0x3b0984===_0x5523f2(0x192)){const {input:_0x2c7ed0,password:_0x208bb3}=await import(_0x5523f2(0x1e9));a4_0x55c6b3['header'](_0x5523f2(0x12d)),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x166)),a4_0x55c6b3[_0x5523f2(0x1c7)]('2.\x20Send\x20/newbot\x20and\x20follow\x20instructions'),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x1e7)),a4_0x55c6b3[_0x5523f2(0x211)]('');const _0xdc05b5=await _0x208bb3({'message':_0x5523f2(0x23d),'mask':'*'});_0xdc05b5&&(_0x57cd65['setBotToken'](_0xdc05b5),a4_0x55c6b3[_0x5523f2(0x20e)]('Bot\x20token\x20saved!'));const _0x252298=await _0x2c7ed0({'message':_0x5523f2(0x225)});return _0x252298&&(_0x57cd65[_0x5523f2(0x15e)](_0x252298),a4_0x55c6b3[_0x5523f2(0x20e)](_0x5523f2(0x1c4))),a4_0x55c6b3['info'](_0x5523f2(0x1fb)),!![];}if(_0x3b0984==='start')return await _0x57cd65[_0x5523f2(0x169)](),!![];if(_0x3b0984===_0x5523f2(0x241))return _0x57cd65[_0x5523f2(0x24f)](),a4_0x55c6b3[_0x5523f2(0x211)]('Telegram\x20bot\x20stopped.'),!![];if(_0x3b0984===_0x5523f2(0x21b))return _0x57cd65[_0x5523f2(0x246)]()?a4_0x55c6b3[_0x5523f2(0x20e)](_0x5523f2(0x1d1)):a4_0x55c6b3[_0x5523f2(0x1c7)]('Telegram\x20bot\x20is\x20not\x20running'),a4_0x55c6b3[_0x5523f2(0x1c7)]('Configured:\x20'+(_0x57cd65[_0x5523f2(0x176)]()?'Yes':'No')),!![];return a4_0x55c6b3['header'](_0x5523f2(0x16d)),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x122)),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x182)),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x22a)),a4_0x55c6b3[_0x5523f2(0x1c7)](_0x5523f2(0x1c6)),!![];}if(_0x13be3b===_0x5523f2(0x242)){const {rollbackLast:_0x5a746e,getChanges:_0x1f1f24}=await import(_0x5523f2(0x175)),_0x41c30e=_0x1f1f24();if(_0x41c30e[_0x5523f2(0x141)]===0x0)a4_0x55c6b3[_0x5523f2(0x211)](_0x5523f2(0x24c));else{const _0x503345=_0x5a746e();_0x503345[_0x5523f2(0x20e)]?a4_0x55c6b3['success'](_0x503345[_0x5523f2(0x173)]):a4_0x55c6b3['error'](_0x503345[_0x5523f2(0x173)]);}return!![];}if(_0x13be3b===_0x5523f2(0x186)){const _0x5c4491=await selectModel();return _0x5c4491!==_0x18021a?(a4_0x55c6b3[_0x5523f2(0x211)](_0x5523f2(0x12f)+_0x5c4491),a4_0x55c6b3[_0x5523f2(0x211)]('Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.')):a4_0x55c6b3['info']('Current\x20model:\x20'+_0x18021a),!![];}if(_0x13be3b===_0x5523f2(0x14e)||_0x13be3b==='/themes'){const {selectTheme:_0x544765}=await import(_0x5523f2(0x124)),_0x3106fa=await _0x544765();return a4_0x55c6b3['info'](_0x5523f2(0x1c5)+_0x3106fa),!![];}if(_0x13be3b==='/usage'||_0x13be3b==='/stats'){const _0x5d20d7=a4_0x55c6b3[_0x5523f2(0x135)]('Fetching\x20usage...');_0x5d20d7[_0x5523f2(0x1ef)]();const _0x22b1a5=await getUserUsage();return _0x5d20d7['stop'](),_0x22b1a5?a4_0x55c6b3['usageBox'](_0x22b1a5[_0x5523f2(0x1ed)],_0x22b1a5[_0x5523f2(0x219)],_0x22b1a5[_0x5523f2(0x158)]):a4_0x55c6b3[_0x5523f2(0x1e1)](_0x5523f2(0x1f9)),!![];}return _0x5c25d2[_0x5523f2(0x1dc)]({'role':'user','content':_0x13be3b}),await processAgentLoop(_0x5c25d2,_0x18021a),saveChatSession(_0x26512d,_0x5c25d2),!![];};if(_0x9af23d){const _0x4f8d64=await _0x106b3(_0x9af23d);if(!_0x4f8d64)return;}while(!![]){try{const _0x5e893b=await import(_0x56dcaf(0x23b))[_0x56dcaf(0x1b8)](_0x3ae2c4=>_0x3ae2c4['getTheme']()),_0x479b27=await import('../ui/themes.js')['then'](_0x75ef9=>_0x75ef9[_0x56dcaf(0x200)](_0x5e893b)),_0x1a8d0d=a4_0x204fb0[_0x56dcaf(0x127)][_0x56dcaf(0x1ca)](_0x479b27[_0x56dcaf(0x1bc)])(_0x56dcaf(0x1a9)),_0x31c60d=await input({'message':_0x1a8d0d,'theme':{'prefix':''}}),_0x5d196e=await _0x106b3(_0x31c60d);if(!_0x5d196e)break;}catch(_0x5eec63){if(_0x5eec63 instanceof Error&&_0x5eec63['message'][_0x56dcaf(0x137)](_0x56dcaf(0x22d)))break;a4_0x55c6b3[_0x56dcaf(0x1e1)](_0x56dcaf(0x1fa)+_0x5eec63);}}}function cleanTagsFromLine(_0x4e19c8){const _0x26b748=a4_0x3519b3,_0x1bfc81=_0x4e19c8[_0x26b748(0x13a)]();if(!_0x1bfc81)return'';if(_0x1bfc81[_0x26b748(0x17a)]('**'))return'';if(_0x1bfc81[_0x26b748(0x17a)](_0x26b748(0x17b)))return'';if(_0x1bfc81[_0x26b748(0x17a)]('---'))return'';if(_0x1bfc81['startsWith'](_0x26b748(0x236)))return'';if(_0x1bfc81[_0x26b748(0x137)]('\x22name\x22:')&&_0x1bfc81[_0x26b748(0x137)]('\x22args\x22:'))return'';if(_0x1bfc81[_0x26b748(0x17a)]('Running'))return'';if(_0x1bfc81[_0x26b748(0x17a)]('-\x20Running'))return'';if(_0x1bfc81[_0x26b748(0x17a)](_0x26b748(0x1d9)))return'';if(_0x1bfc81[_0x26b748(0x17a)](_0x26b748(0x234)))return'';if(_0x1bfc81[_0x26b748(0x17a)](_0x26b748(0x229)))return'';if(_0x1bfc81[_0x26b748(0x17a)](_0x26b748(0x1e6)))return'';if(_0x1bfc81['includes'](_0x26b748(0x143)))return'';if(_0x1bfc81[_0x26b748(0x137)](_0x26b748(0x148)))return'';return _0x4e19c8[_0x26b748(0x1f0)](/<text>/g,'')[_0x26b748(0x1f0)](/<\/text>/g,'')['replace'](/<\/text>/g,'')[_0x26b748(0x1f0)](/<reasoning>/g,'')[_0x26b748(0x1f0)](/<\/reasoning>/g,'')[_0x26b748(0x1f0)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x49545d,_0x39faf9){const _0x5d441f=a4_0x3519b3;let _0x5746b3=0x0;const _0x2d9d87=0x3e8;while(_0x5746b3<_0x2d9d87){_0x5746b3++;const _0x48c470=a4_0x55c6b3[_0x5d441f(0x135)](_0x5d441f(0x1b6));_0x48c470[_0x5d441f(0x1ef)]();let _0x264058='',_0x2c1ba4=![],_0x3170b9='';const _0x22a273=new AbortController(),_0x4b4e80=()=>{const _0x124c17=_0x5d441f;_0x22a273[_0x124c17(0x13c)](),a4_0x55c6b3[_0x124c17(0x211)](_0x124c17(0x11f));};process['on'](_0x5d441f(0x204),_0x4b4e80);let _0x476e91=null;try{const _0xc1ccc8=await sendChatMessage(_0x39faf9,_0x49545d,_0x4bdea3=>{const _0x4edb32=_0x5d441f;_0x48c470['isSpinning']&&_0x48c470[_0x4edb32(0x241)]();_0x264058+=_0x4bdea3;for(const _0x25ad58 of _0x4bdea3){_0x3170b9+=_0x25ad58;if(_0x25ad58==='\x0a'){if(!_0x2c1ba4){if(_0x3170b9[_0x4edb32(0x137)](_0x4edb32(0x185))||_0x3170b9[_0x4edb32(0x17a)](_0x4edb32(0x144))){_0x2c1ba4=!![],_0x3170b9='';!_0x476e91&&(_0x476e91=a4_0x55c6b3['actionSpinner']('Generating...'),_0x476e91[_0x4edb32(0x1ef)]());continue;}let _0x550c11=_0x3170b9['replace'](/<text>/g,'')[_0x4edb32(0x1f0)](/<\/text>/g,'')[_0x4edb32(0x1f0)](/<reasoning.*?>/g,'')[_0x4edb32(0x1f0)](/<\/reasoning>/g,'');if(_0x550c11[_0x4edb32(0x17a)]('```')&&!_0x550c11[_0x4edb32(0x17a)](_0x4edb32(0x144)))process['stdout'][_0x4edb32(0x187)]('```'+_0x550c11['slice'](0x3));else(_0x550c11['trim']()||_0x550c11==='\x0a'||_0x550c11==='\x0d\x0a')&&process[_0x4edb32(0x239)][_0x4edb32(0x187)](_0x550c11);}else(_0x3170b9[_0x4edb32(0x137)](_0x4edb32(0x1a5))||_0x3170b9[_0x4edb32(0x13a)]()===_0x4edb32(0x236))&&(_0x2c1ba4=![],_0x476e91&&(_0x476e91[_0x4edb32(0x241)](),_0x476e91=null));_0x3170b9='';}}},_0x22a273[_0x5d441f(0x12a)]);_0x476e91&&(_0x476e91[_0x5d441f(0x241)](),_0x476e91=null);if(_0x3170b9&&!_0x2c1ba4&&!_0x3170b9['includes'](_0x5d441f(0x185))){let _0x1ab289=_0x3170b9[_0x5d441f(0x1f0)](/<text>/g,'')[_0x5d441f(0x1f0)](/<\/text>/g,'')[_0x5d441f(0x1f0)](/<reasoning.*?>/g,'')['replace'](/<\/reasoning>/g,'');if(_0x1ab289['trim']())process['stdout'][_0x5d441f(0x187)](_0x1ab289);}_0x264058=_0xc1ccc8[_0x5d441f(0x203)];}catch(_0xebcb14){_0x48c470[_0x5d441f(0x241)](),process[_0x5d441f(0x190)](_0x5d441f(0x204),_0x4b4e80);if(_0xebcb14[_0x5d441f(0x1c2)]===_0x5d441f(0x160)||_0xebcb14['message']['includes'](_0x5d441f(0x19e))){a4_0x55c6b3[_0x5d441f(0x13f)](_0x5d441f(0x24b)),_0x49545d[_0x5d441f(0x1dc)]({'role':_0x5d441f(0x129),'content':_0x264058+_0x5d441f(0x208)}),_0x49545d[_0x5d441f(0x1dc)]({'role':_0x5d441f(0x170),'content':_0x5d441f(0x18c)});break;}if(_0xebcb14['isRateLimit']){a4_0x55c6b3[_0x5d441f(0x1f1)](_0xebcb14[_0x5d441f(0x220)]||0x3c);return;}a4_0x55c6b3[_0x5d441f(0x1e1)](_0x5d441f(0x1df)+_0xebcb14);return;}finally{process['removeListener'](_0x5d441f(0x204),_0x4b4e80);}_0x48c470[_0x5d441f(0x17c)]&&_0x48c470[_0x5d441f(0x241)]();a4_0x55c6b3[_0x5d441f(0x24e)](),_0x49545d[_0x5d441f(0x1dc)]({'role':_0x5d441f(0x129),'content':_0x264058});let _0x1bd4af=_0x264058[_0x5d441f(0x223)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x1bd4af&&(_0x1bd4af=_0x264058[_0x5d441f(0x223)](/```tool\s*([\s\S]*?)```/));!_0x1bd4af&&(_0x1bd4af=_0x264058[_0x5d441f(0x223)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x1bd4af)break;function _0x1f96ab(_0x184c59){const _0x347a2c=_0x5d441f,_0x409ea5=_0x184c59['trim']();try{return JSON['parse'](_0x409ea5);}catch(_0x5e8a75){try{let _0x3449dc='',_0x117015=![];for(let _0x32b382=0x0;_0x32b382<_0x409ea5[_0x347a2c(0x141)];_0x32b382++){const _0x57b045=_0x409ea5[_0x32b382];if(_0x57b045==='\x22'&&_0x409ea5[_0x32b382-0x1]!=='\x5c')_0x117015=!_0x117015;if(_0x117015&&_0x57b045==='\x0a')_0x3449dc+='\x5cn';else _0x3449dc+=_0x57b045;}return JSON[_0x347a2c(0x1dd)](_0x3449dc);}catch(_0x32b81f){try{return new Function('return\x20'+_0x409ea5)();}catch(_0x27618a){throw new Error(_0x347a2c(0x17f)+_0x5e8a75[_0x347a2c(0x173)]);}}}}try{const _0x41fb3b=_0x1f96ab(_0x1bd4af[0x1]),_0x19168b={'write_file':_0x5d441f(0x1ee),'write':_0x5d441f(0x1ee),'create':_0x5d441f(0x1ee),'read':_0x5d441f(0x1d6),'read_text_file':_0x5d441f(0x1d6),'search':'search_file','list':_0x5d441f(0x1ec),'ls':_0x5d441f(0x1ec),'execute':_0x5d441f(0x193),'cmd':_0x5d441f(0x193),'remove_file':_0x5d441f(0x20a),'rm':_0x5d441f(0x20a),'unlink':'delete_file','move_file':_0x5d441f(0x120),'mv':'rename_file','cp':'copy_file','stat':_0x5d441f(0x142),'head':_0x5d441f(0x14c),'wget':'download_file','curl':_0x5d441f(0x14d),'http_get':_0x5d441f(0x14d),'env':_0x5d441f(0x1b7),'sysinfo':_0x5d441f(0x1a8),'paste':_0x5d441f(0x168),'ask':_0x5d441f(0x195),'prompt_user':_0x5d441f(0x195),'request_input':'ask_human','dir_tree':_0x5d441f(0x1af),'show_tree':_0x5d441f(0x1af),'grep':'grep_recursive','find_in_files':_0x5d441f(0x1ad),'search_all':'grep_recursive','find_replace':'replace_in_files','sed':_0x5d441f(0x209),'open':_0x5d441f(0x1cc),'vscode':_0x5d441f(0x1cc),'compress':_0x5d441f(0x1ab),'archive':_0x5d441f(0x1ab),'extract':'unzip_files','decompress':_0x5d441f(0x12b),'ps':_0x5d441f(0x21f),'pwsh':'powershell_run'};_0x19168b[_0x41fb3b['name']]&&(_0x41fb3b['name']=_0x19168b[_0x41fb3b['name']]);_0x41fb3b[_0x5d441f(0x12e)]&&(!_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x22b)]&&(_0x41fb3b[_0x5d441f(0x12e)]['path']=_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x1aa)]||_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x226)]||_0x41fb3b[_0x5d441f(0x12e)]['file']||_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x19f)]),!_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x203)]&&(_0x41fb3b['args'][_0x5d441f(0x203)]=_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x171)]||_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x1b0)]||_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x18e)]||_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x18d)]),!_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x152)]&&(_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x152)]=_0x41fb3b[_0x5d441f(0x12e)]['cmd']||_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x138)]));const _0x34d761={'create_file':_0x5d441f(0x1ac),'read_file':_0x5d441f(0x23f),'edit_file':_0x5d441f(0x125),'list_directory':_0x5d441f(0x159),'search_file':'Search','find_files':_0x5d441f(0x18f),'search_directory':_0x5d441f(0x164),'delete_file':'Delete','rename_file':_0x5d441f(0x24d),'copy_file':_0x5d441f(0x146),'file_info':_0x5d441f(0x19a),'read_file_lines':'ReadLines','run_command':_0x5d441f(0x1b1),'run_background':_0x5d441f(0x251),'read_terminal_output':'ReadTerm','send_terminal_input':_0x5d441f(0x1d2),'list_active_processes':_0x5d441f(0x154),'terminate_process':_0x5d441f(0x1eb),'git_status':_0x5d441f(0x177),'git_diff':'GitDiff','git_log':_0x5d441f(0x231),'git_add':_0x5d441f(0x1e3),'git_commit':'GitCommit','git_branch':_0x5d441f(0x1ba),'fetch_url':_0x5d441f(0x23c),'download_file':_0x5d441f(0x1d4),'get_env':_0x5d441f(0x237),'set_env':_0x5d441f(0x247),'get_system_info':_0x5d441f(0x1ae),'clipboard_read':_0x5d441f(0x235),'clipboard_write':_0x5d441f(0x1e2),'ask_human':_0x5d441f(0x163),'tree':'Tree','grep_recursive':_0x5d441f(0x1bb),'replace_in_files':_0x5d441f(0x20d),'open_in_editor':_0x5d441f(0x240),'zip_files':_0x5d441f(0x132),'unzip_files':_0x5d441f(0x19b),'write_json':_0x5d441f(0x20f),'read_json':_0x5d441f(0x15d),'patch_file':_0x5d441f(0x215),'powershell_run':'PS','browser_open':_0x5d441f(0x1a7),'browser_click':'Click','browser_fill':_0x5d441f(0x16c),'browser_snapshot':_0x5d441f(0x214),'browser_screenshot':_0x5d441f(0x21e),'browser_get_text':'GetText','browser_close':_0x5d441f(0x227)},_0x226a92=_0x34d761[_0x41fb3b['name']]||_0x41fb3b[_0x5d441f(0x1c2)];let _0x4025dc='';if(_0x41fb3b['name']===_0x5d441f(0x193)&&_0x41fb3b[_0x5d441f(0x12e)]['command'])_0x4025dc=_0x41fb3b[_0x5d441f(0x12e)]['command'];else{if(_0x41fb3b['name']===_0x5d441f(0x1f7))_0x4025dc=_0x5d441f(0x16e)+(_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x157)]||_0x5d441f(0x189));else{if(_0x41fb3b[_0x5d441f(0x1c2)]===_0x5d441f(0x12c)||_0x41fb3b[_0x5d441f(0x1c2)]===_0x5d441f(0x212))_0x4025dc=_0x5d441f(0x16e)+(_0x41fb3b[_0x5d441f(0x12e)]['pid']||_0x5d441f(0x189));else{if(_0x41fb3b[_0x5d441f(0x1c2)]===_0x5d441f(0x22e))_0x4025dc=_0x5d441f(0x1bf);else{if(_0x41fb3b['args'][_0x5d441f(0x22b)])_0x4025dc=_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x22b)];else{if(_0x41fb3b[_0x5d441f(0x12e)]['pattern'])_0x4025dc='\x22'+_0x41fb3b['args'][_0x5d441f(0x1cb)]+'\x22';else _0x41fb3b[_0x5d441f(0x12e)]['url']?_0x4025dc=_0x41fb3b[_0x5d441f(0x12e)][_0x5d441f(0x151)]:_0x4025dc=Object[_0x5d441f(0x1be)](_0x41fb3b[_0x5d441f(0x12e)])[0x0]||'';}}}}}const _0x5d9980=_0x4025dc[_0x5d441f(0x141)]>0x32?_0x4025dc[_0x5d441f(0x250)](0x0,0x2f)+_0x5d441f(0x1ea):_0x4025dc,_0x3aa151=a4_0x55c6b3[_0x5d441f(0x21a)](_0x226a92+'('+_0x5d9980+')');_0x3aa151['start']();const _0x3a5ea7=performance[_0x5d441f(0x134)]();let _0x29168c;try{_0x29168c=await executeToolCall(_0x41fb3b['name'],_0x41fb3b['args']);}catch(_0x477dba){if(_0x477dba[_0x5d441f(0x173)]&&_0x477dba[_0x5d441f(0x173)][_0x5d441f(0x137)](_0x5d441f(0x1e0))){const _0x5974c4=await getMcpTools(),_0x28ed7d=_0x5974c4[_0x5d441f(0x1bd)](_0x5c2755=>_0x5c2755[_0x5d441f(0x1c2)]===_0x41fb3b[_0x5d441f(0x1c2)]);if(_0x28ed7d)try{_0x29168c=await executeMcpTool(_0x28ed7d[_0x5d441f(0x1b5)],_0x28ed7d['name'],_0x41fb3b[_0x5d441f(0x12e)]);}catch(_0x565b35){throw new Error(_0x5d441f(0x198)+_0x565b35);}else throw _0x477dba;}else throw _0x477dba;}const _0x17945b=((performance[_0x5d441f(0x134)]()-_0x3a5ea7)/0x3e8)[_0x5d441f(0x1c0)](0x1);_0x3aa151[_0x5d441f(0x241)]();let _0x9f36ff=_0x5d441f(0x245)+_0x17945b+'s',_0x1148ba=![];const _0x34473a=_0x29168c;if(_0x34473a&&typeof _0x34473a==='object'){if(_0x41fb3b[_0x5d441f(0x1c2)]===_0x5d441f(0x193)){if(_0x34473a[_0x5d441f(0x18a)]===0x0&&_0x34473a['success']!==![]){const _0x4b508b=_0x34473a[_0x5d441f(0x239)]?_0x34473a[_0x5d441f(0x239)][_0x5d441f(0x1f8)]('\x0a')[_0x5d441f(0x141)]:0x0;_0x9f36ff=_0x5d441f(0x1c8)+_0x4b508b+_0x5d441f(0x248)+_0x17945b+'s)';}else{_0x1148ba=!![],_0x9f36ff=_0x5d441f(0x133)+_0x34473a['exitCode'];const _0x5cee0f=_0x34473a[_0x5d441f(0x1a4)]||_0x34473a[_0x5d441f(0x239)]||_0x34473a[_0x5d441f(0x173)]||_0x5d441f(0x197);_0x5cee0f&&(_0x9f36ff+=':\x20'+_0x5cee0f[_0x5d441f(0x1f8)]('\x0a')[0x0][_0x5d441f(0x1a6)](0x0,0x64));}}else{if(_0x34473a[_0x5d441f(0x20e)]===![])_0x1148ba=!![],_0x9f36ff='Error:\x20'+(_0x34473a[_0x5d441f(0x173)]||_0x34473a[_0x5d441f(0x1e1)]||_0x5d441f(0x197));else{if(_0x34473a['error'])_0x1148ba=!![],_0x9f36ff=_0x5d441f(0x1a0)+_0x34473a[_0x5d441f(0x1e1)];else{if(_0x41fb3b[_0x5d441f(0x1c2)]===_0x5d441f(0x1d6)&&typeof _0x34473a[_0x5d441f(0x203)]===_0x5d441f(0x196)){const _0x12bfdb=_0x34473a[_0x5d441f(0x203)]['split']('\x0a')[_0x5d441f(0x141)];_0x9f36ff=_0x5d441f(0x147)+_0x12bfdb+'\x20lines\x20('+_0x17945b+'s)';}else(_0x41fb3b['name']===_0x5d441f(0x136)||_0x41fb3b[_0x5d441f(0x1c2)]===_0x5d441f(0x1ee))&&(_0x9f36ff=_0x5d441f(0x1cd)+_0x17945b+'s)');}}}}a4_0x55c6b3[_0x5d441f(0x15a)](_0x226a92,_0x5d9980,_0x9f36ff,_0x1148ba);let _0x576198=_0x29168c;_0x41fb3b[_0x5d441f(0x1c2)]===_0x5d441f(0x193)&&_0x34473a&&(_0x576198={'exitCode':_0x34473a['exitCode'],'stdout':_0x34473a[_0x5d441f(0x239)],'stderr':_0x34473a[_0x5d441f(0x1a4)],'error':_0x34473a[_0x5d441f(0x1e1)]}),_0x49545d['push']({'role':_0x5d441f(0x170),'content':_0x5d441f(0x207)+_0x41fb3b['name']+':\x0a'+JSON[_0x5d441f(0x1b4)](_0x576198,null,0x2)}),await new Promise(_0x57eee0=>setTimeout(_0x57eee0,0x1f4));}catch(_0x135268){a4_0x55c6b3[_0x5d441f(0x15a)](_0x5d441f(0x167),_0x5d441f(0x19c),_0x135268[_0x5d441f(0x173)]||String(_0x135268),!![]),_0x49545d['push']({'role':'user','content':_0x5d441f(0x23e)+_0x135268+_0x5d441f(0x172)});}}_0x5746b3>=_0x2d9d87&&a4_0x55c6b3[_0x5d441f(0x13f)](_0x5d441f(0x1d0));}async function executeToolCall(_0x1d66f7,_0x101f88){const _0x1f9af5=a4_0x3519b3;switch(_0x1d66f7){case _0x1f9af5(0x1ee):return createFile(_0x101f88[_0x1f9af5(0x22b)],_0x101f88['content']);case _0x1f9af5(0x1d6):return readFile(_0x101f88[_0x1f9af5(0x22b)]);case _0x1f9af5(0x1ec):return listDirectory(_0x101f88[_0x1f9af5(0x22b)]||'.');case _0x1f9af5(0x136):return editFile(_0x101f88[_0x1f9af5(0x22b)],_0x101f88[_0x1f9af5(0x205)],_0x101f88[_0x1f9af5(0x1f0)]);case'search_file':return searchFile(_0x101f88[_0x1f9af5(0x22b)],_0x101f88[_0x1f9af5(0x1cb)]);case _0x1f9af5(0x193):const {command:_0x4ffc19,background:_0xf915ef,wait:_0x210ca3}=_0x101f88,_0x228b13=await runCommand(_0x4ffc19,undefined,_0xf915ef,_0x210ca3);return _0x228b13;case _0x1f9af5(0x12c):{const {readTerminalOutput:_0x5e2f5a}=await import(_0x1f9af5(0x21c));return _0x5e2f5a(_0x101f88[_0x1f9af5(0x157)]);}case'send_terminal_input':{const {sendTerminalInput:_0x33a737}=await import(_0x1f9af5(0x21c));return _0x33a737(_0x101f88[_0x1f9af5(0x174)],_0x101f88['pid']);}case _0x1f9af5(0x22e):{const {getActiveProcesses:_0x2baf3e}=await import(_0x1f9af5(0x21c));return{'pids':_0x2baf3e(),'message':_0x1f9af5(0x121)+_0x2baf3e()[_0x1f9af5(0x141)]};}case _0x1f9af5(0x212):{const {terminateProcess:_0x3ebc2a}=await import(_0x1f9af5(0x21c));return _0x3ebc2a(_0x101f88[_0x1f9af5(0x157)]);}case'find_files':{const {findFiles:_0x135474}=await import(_0x1f9af5(0x1ce));return _0x135474(_0x101f88[_0x1f9af5(0x22b)]||'.',_0x101f88['pattern']);}case'search_directory':{const {searchDirectory:_0x231794}=await import(_0x1f9af5(0x1ce));return _0x231794(_0x101f88['path']||'.',_0x101f88[_0x1f9af5(0x1cb)]);}case _0x1f9af5(0x130):{const {readFile:_0x26a86a}=await import('../github/api.js');return _0x26a86a(_0x101f88[_0x1f9af5(0x1d7)],_0x101f88[_0x1f9af5(0x1a2)],_0x101f88[_0x1f9af5(0x22b)],_0x101f88[_0x1f9af5(0x1e4)]);}case'github_create_pr':{const {createPullRequest:_0x5c02dd}=await import('../github/api.js');return _0x5c02dd(_0x101f88[_0x1f9af5(0x1d7)],_0x101f88[_0x1f9af5(0x1a2)],_0x101f88['title'],_0x101f88[_0x1f9af5(0x1fc)],_0x101f88['base'],_0x101f88[_0x1f9af5(0x228)]);}case _0x1f9af5(0x1db):{const {createBranch:_0x4acd2a}=await import(_0x1f9af5(0x233));return _0x4acd2a(_0x101f88[_0x1f9af5(0x1d7)],_0x101f88[_0x1f9af5(0x1a2)],_0x101f88[_0x1f9af5(0x14b)],_0x101f88['fromBranch']);}case _0x1f9af5(0x1e8):{const {browserOpen:_0x44b55a,startBrowserServer:_0x3b6276,isBrowserServerRunning:_0x5a2bd6}=await import(_0x1f9af5(0x14a));return!_0x5a2bd6()&&await _0x3b6276(),_0x44b55a(_0x101f88['url']);}case _0x1f9af5(0x230):{const {browserClick:_0x12a869}=await import(_0x1f9af5(0x14a));return _0x12a869(_0x101f88[_0x1f9af5(0x153)]);}case _0x1f9af5(0x140):{const {browserFill:_0x42d5f6}=await import(_0x1f9af5(0x14a));return _0x42d5f6(_0x101f88[_0x1f9af5(0x153)],_0x101f88[_0x1f9af5(0x17d)]);}case _0x1f9af5(0x232):{const {browserSnapshot:_0x58484c}=await import(_0x1f9af5(0x14a));return _0x58484c();}case _0x1f9af5(0x165):{const {browserScreenshot:_0x25f016}=await import(_0x1f9af5(0x14a));return _0x25f016();}case _0x1f9af5(0x213):{const {browserGetText:_0x19b4da}=await import(_0x1f9af5(0x14a));return _0x19b4da(_0x101f88['selector']);}case _0x1f9af5(0x22c):{const {browserClose:_0x13654d}=await import(_0x1f9af5(0x14a));return _0x13654d();}case'delete_file':return deleteFile(_0x101f88['path']);case _0x1f9af5(0x120):return renameFile(_0x101f88['from']||_0x101f88['path'],_0x101f88['to']||_0x101f88[_0x1f9af5(0x145)]);case _0x1f9af5(0x183):return copyFile(_0x101f88['from']||_0x101f88[_0x1f9af5(0x22b)],_0x101f88['to']||_0x101f88[_0x1f9af5(0x145)]);case _0x1f9af5(0x142):return fileInfo(_0x101f88['path']);case _0x1f9af5(0x14c):return readFileLines(_0x101f88['path'],_0x101f88[_0x1f9af5(0x1ef)]||0x1,_0x101f88[_0x1f9af5(0x194)]||0x32);case _0x1f9af5(0x1f3):{const _0x470010=await runCommand(_0x101f88['command'],undefined,!![],_0x101f88[_0x1f9af5(0x218)]||0x1388);return _0x470010;}case _0x1f9af5(0x1d8):return gitStatus();case _0x1f9af5(0x1ff):return gitDiff(_0x101f88['path']);case _0x1f9af5(0x16a):return gitLog(_0x101f88['count']||0xa);case _0x1f9af5(0x162):return gitAdd(_0x101f88[_0x1f9af5(0x22b)]||'.');case'git_commit':return gitCommit(_0x101f88[_0x1f9af5(0x173)]);case'git_branch':return gitBranch();case _0x1f9af5(0x14d):return fetchUrl(_0x101f88[_0x1f9af5(0x151)]);case _0x1f9af5(0x1da):return downloadFile(_0x101f88[_0x1f9af5(0x151)],_0x101f88[_0x1f9af5(0x22b)]);case _0x1f9af5(0x1b7):return getEnv(_0x101f88[_0x1f9af5(0x1c2)]);case _0x1f9af5(0x15f):return setEnv(_0x101f88[_0x1f9af5(0x1c2)],_0x101f88[_0x1f9af5(0x17d)]);case _0x1f9af5(0x1a8):return getSystemInfo();case _0x1f9af5(0x168):return clipboardRead();case'clipboard_write':return clipboardWrite(_0x101f88[_0x1f9af5(0x171)]||_0x101f88[_0x1f9af5(0x203)]);case _0x1f9af5(0x195):{const _0x3a038c=_0x101f88[_0x1f9af5(0x1b9)]||_0x101f88[_0x1f9af5(0x173)]||_0x1f9af5(0x17e);a4_0x55c6b3['aiMessageEnd']();const _0x1c1b13=await input({'message':a4_0x204fb0[_0x1f9af5(0x1ca)]('#3b82f6')('\x20\x20[Waiting\x20for\x20input]\x20')+_0x3a038c+'\x0a','theme':{'prefix':''}});return{'success':!![],'response':_0x1c1b13,'message':_0x1f9af5(0x221)+_0x1c1b13};}case _0x1f9af5(0x1af):return tree(_0x101f88['path']||'.',_0x101f88[_0x1f9af5(0x20b)]||0x3);case'grep_recursive':return grepRecursive(_0x101f88[_0x1f9af5(0x22b)]||'.',_0x101f88[_0x1f9af5(0x1cb)],_0x101f88['extensions']);case _0x1f9af5(0x209):return replaceInFiles(_0x101f88[_0x1f9af5(0x22b)]||'.',_0x101f88['search'],_0x101f88[_0x1f9af5(0x1f0)],_0x101f88['extensions']);case _0x1f9af5(0x1cc):return openInEditor(_0x101f88[_0x1f9af5(0x22b)]);case _0x1f9af5(0x1ab):return zipFiles(_0x101f88[_0x1f9af5(0x22f)]||[_0x101f88[_0x1f9af5(0x22b)]],_0x101f88[_0x1f9af5(0x23a)]||_0x1f9af5(0x14f));case'unzip_files':return unzipFiles(_0x101f88['path']||_0x101f88[_0x1f9af5(0x1c3)],_0x101f88[_0x1f9af5(0x23a)]||'.');case'write_json':return writeJson(_0x101f88[_0x1f9af5(0x22b)],_0x101f88['data']||_0x101f88['content']);case'read_json':return readJson(_0x101f88[_0x1f9af5(0x22b)]);case'patch_file':return patchFile(_0x101f88['path'],_0x101f88[_0x1f9af5(0x13b)]);case _0x1f9af5(0x21f):return powershellRun(_0x101f88[_0x1f9af5(0x138)]||_0x101f88[_0x1f9af5(0x152)]);default:return{'error':_0x1f9af5(0x139)+_0x1d66f7};}}
@@ -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_0x316a78=a5_0x5e06;(function(_0x2fc295,_0x539684){const _0x3ae236=a5_0x5e06,_0x5cc33c=_0x2fc295();while(!![]){try{const _0x262c3a=parseInt(_0x3ae236(0x1cf))/0x1+parseInt(_0x3ae236(0x1d7))/0x2+parseInt(_0x3ae236(0x1d3))/0x3*(parseInt(_0x3ae236(0x1db))/0x4)+-parseInt(_0x3ae236(0x1d1))/0x5+parseInt(_0x3ae236(0x1c4))/0x6+-parseInt(_0x3ae236(0x1c0))/0x7+parseInt(_0x3ae236(0x1c5))/0x8;if(_0x262c3a===_0x539684)break;else _0x5cc33c['push'](_0x5cc33c['shift']());}catch(_0x4a3463){_0x5cc33c['push'](_0x5cc33c['shift']());}}}(a5_0x44a1,0x22549));import a5_0x257dca from'conf';import a5_0x338127 from'path';import a5_0x2cb259 from'fs';import{fileURLToPath}from'url';const config=new a5_0x257dca({'projectName':a5_0x316a78(0x1c3),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x2ed68a=a5_0x316a78,_0x7e367a=config[_0x2ed68a(0x1c2)](_0x2ed68a(0x1b7)),_0xa8c6e5=loadMcpConfigFile();return{..._0x7e367a,..._0xa8c6e5};}export function addMcpServer(_0x3c19ca,_0x1575e2,_0x5f48f8=[],_0x387149){const _0x2df92d=a5_0x316a78,_0x6d1ef9=config[_0x2df92d(0x1c2)](_0x2df92d(0x1b7));_0x6d1ef9[_0x3c19ca]={'type':'stdio','command':_0x1575e2,'args':_0x5f48f8,'env':_0x387149},config[_0x2df92d(0x1bb)](_0x2df92d(0x1b7),_0x6d1ef9);}export function addMcpHttpServer(_0x192d24,_0x3c0789){const _0x5e2a12=a5_0x316a78,_0x48dbc9=config[_0x5e2a12(0x1c2)]('mcpServers');_0x48dbc9[_0x192d24]={'type':_0x5e2a12(0x1bc),'url':_0x3c0789},config['set'](_0x5e2a12(0x1b7),_0x48dbc9);}export function removeMcpServer(_0x2a7ef4){const _0x73b8c=a5_0x316a78,_0xc4beb3=config[_0x73b8c(0x1c2)](_0x73b8c(0x1b7));if(_0xc4beb3[_0x2a7ef4])return delete _0xc4beb3[_0x2a7ef4],config['set'](_0x73b8c(0x1b7),_0xc4beb3),!![];return![];}export function clearMcpServers(){const _0x15e096=a5_0x316a78;config[_0x15e096(0x1bb)]('mcpServers',{});}export function getMcpServer(_0x32152a){return getMcpServers()[_0x32152a];}function loadMcpConfigFile(){const _0x489e7c=a5_0x316a78,_0x3a0cee=[a5_0x338127[_0x489e7c(0x1c1)](process[_0x489e7c(0x1d6)](),_0x489e7c(0x1ce)),a5_0x338127[_0x489e7c(0x1c1)](process[_0x489e7c(0x1d6)](),_0x489e7c(0x1bf),'mcp.json'),a5_0x338127[_0x489e7c(0x1c1)](process[_0x489e7c(0x1d5)][_0x489e7c(0x1b2)]||process[_0x489e7c(0x1d5)][_0x489e7c(0x1b1)]||'',_0x489e7c(0x1bf),_0x489e7c(0x1ce))];for(const _0x29a2fc of _0x3a0cee){try{if(a5_0x2cb259[_0x489e7c(0x1ca)](_0x29a2fc)){const _0x1a84d8=a5_0x2cb259[_0x489e7c(0x1b3)](_0x29a2fc,_0x489e7c(0x1d0)),_0x24f789=JSON[_0x489e7c(0x1c6)](_0x1a84d8);if(_0x24f789['mcpServers']&&typeof _0x24f789[_0x489e7c(0x1b7)]===_0x489e7c(0x1b0))return _0x24f789[_0x489e7c(0x1b7)];}}catch{}}return{};}function a5_0x44a1(){const _0x39a00f=['computer-use','command','274900AEhpUo','windows-mcp','object','USERPROFILE','HOME','readFileSync','stdio','includes','computer-use.js','mcpServers','mcp-servers','dirname','@modelcontextprotocol/server-filesystem','set','streamable-http','path','uvx','.woozlit','652477UNLJDV','join','get','woozlit-cli','93594MFJnBf','113576PsBYoW','parse','endsWith','dist','.js','existsSync','C:\x5cUsers','computer-use.ts','node','mcp.json','141256rlppUH','utf-8','459835wrPfmn','tsx','6bmlOHL','npx','env','cwd','34586NFwKch','src'];a5_0x44a1=function(){return _0x39a00f;};return a5_0x44a1();}export function ensureDefaultServers(){const _0x24e48e=a5_0x316a78,_0xbd3b0b=config[_0x24e48e(0x1c2)](_0x24e48e(0x1b7)),_0x2ce16a=fileURLToPath(import.meta.url),_0x159d26=a5_0x338127[_0x24e48e(0x1b9)](_0x2ce16a),_0x475226=_0x159d26[_0x24e48e(0x1b5)](_0x24e48e(0x1c8))||_0x2ce16a[_0x24e48e(0x1c7)](_0x24e48e(0x1c9)),_0x7402f7=_0x475226?a5_0x338127[_0x24e48e(0x1c1)](_0x159d26,'..',_0x24e48e(0x1b8),_0x24e48e(0x1b6)):a5_0x338127['join'](_0x159d26,'..','..',_0x24e48e(0x1d8),_0x24e48e(0x1b8),_0x24e48e(0x1cc)),_0x585bbe=_0x475226?_0x24e48e(0x1cd):_0x24e48e(0x1d2);_0xbd3b0b[_0x24e48e(0x1d9)]={'type':_0x24e48e(0x1b4),'command':_0x585bbe,'args':[_0x7402f7],'env':{}},(!_0xbd3b0b[_0x24e48e(0x1dc)]||_0xbd3b0b[_0x24e48e(0x1dc)][_0x24e48e(0x1da)]===_0x24e48e(0x1be))&&(_0xbd3b0b[_0x24e48e(0x1dc)]={'type':_0x24e48e(0x1b4),'command':_0x24e48e(0x1d4),'args':['-y',_0x24e48e(0x1ba),_0x24e48e(0x1cb)],'env':{}}),config['set'](_0x24e48e(0x1b7),_0xbd3b0b);}function a5_0x5e06(_0x5469ae,_0x5f071b){_0x5469ae=_0x5469ae-0x1b0;const _0x44a115=a5_0x44a1();let _0x5e06a8=_0x44a115[_0x5469ae];return _0x5e06a8;}export function getConfigFilePath(){const _0x3cea9e=a5_0x316a78;return config[_0x3cea9e(0x1bd)];}
@@ -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_0x23b132=a6_0x100a;(function(_0x351ca6,_0x378d4a){const _0x28811b=a6_0x100a,_0x3cb1f8=_0x351ca6();while(!![]){try{const _0x319ab6=-parseInt(_0x28811b(0xdb))/0x1*(parseInt(_0x28811b(0xdd))/0x2)+-parseInt(_0x28811b(0xc2))/0x3+-parseInt(_0x28811b(0xcd))/0x4*(-parseInt(_0x28811b(0xe3))/0x5)+parseInt(_0x28811b(0xbe))/0x6*(parseInt(_0x28811b(0xde))/0x7)+-parseInt(_0x28811b(0xd3))/0x8*(-parseInt(_0x28811b(0xc3))/0x9)+parseInt(_0x28811b(0xbc))/0xa*(parseInt(_0x28811b(0xc8))/0xb)+-parseInt(_0x28811b(0xcb))/0xc*(-parseInt(_0x28811b(0xce))/0xd);if(_0x319ab6===_0x378d4a)break;else _0x3cb1f8['push'](_0x3cb1f8['shift']());}catch(_0xbf0716){_0x3cb1f8['push'](_0x3cb1f8['shift']());}}}(a6_0x2ca6,0x3ef38));function a6_0x2ca6(){const _0x91dca=['qwen/qwen3-coder:free','Gemini\x203\x20Flash','Meta\x27s\x20powerful\x20model','Devstral\x20Small','mistralai/mistral-small-3.2-24b-instruct','212210NxEGdQ','Latest\x20Mistral','14502eFrsct','gemini-3.1-pro-preview','env','Llama\x204\x20Maverick','1378134ZPQvTt','18xiRLUO','Advanced\x20reasoning','nvidia/nemotron-nano-12b-v2-vl:free','deepseek/deepseek-chat','gemini-3-pro-preview','88iNQRSl','xiaomi/mimo-v2-flash:free','NVIDIA\x20vision','4835724dkwPpB','Gemini\x203.1\x20Pro','4pqguVr','13lnUQcs','Llama\x203.3\x2070B','Most\x20powerful\x20Gemini','Xiaomi\x27s\x20fast\x20AI\x20model','DeepSeek\x27s\x20latest\x20V3','803760mJbEuC','deepseek/deepseek-r1','Reasoning\x20model','Developer-focused','MiMo\x20V2','Woozie','gemini-3-flash-preview','Meta\x27s\x20latest','1LXfkbN','WOOZLIT_API_URL','540676nwIJQW','28XCQCaw','Mistral\x20Small\x203.2','Alibaba\x27s\x20largest','gemini-2.5-flash','Coding\x20specialist','1021055HucoCN','Qwen3\x20Coder','https://woozlit.com','Latest\x20Gemini\x203\x20model','mistralai/devstral-small','qwen/qwen3-235b-a22b:free'];a6_0x2ca6=function(){return _0x91dca;};return a6_0x2ca6();}const API_URL=process[a6_0x23b132(0xc0)][a6_0x23b132(0xdc)]||a6_0x23b132(0xb3),PROD_URL='https://woozlit.com';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_0x23b132(0xe1),'name':a6_0x23b132(0xd8),'description':'Fast\x20and\x20capable\x20(Default)','xp':0x1},{'id':a6_0x23b132(0xd9),'name':a6_0x23b132(0xb8),'description':a6_0x23b132(0xb4),'xp':0x5},{'id':a6_0x23b132(0xc7),'name':'Gemini\x203\x20Pro','description':a6_0x23b132(0xd0),'xp':0x5},{'id':a6_0x23b132(0xbf),'name':a6_0x23b132(0xcc),'description':'Latest\x20Gemini\x20with\x20deep\x20thinking','xp':0x8},{'id':a6_0x23b132(0xc9),'name':a6_0x23b132(0xd7),'description':a6_0x23b132(0xd1),'xp':0x1},{'id':a6_0x23b132(0xb6),'name':'Qwen3\x20235B','description':a6_0x23b132(0xe0),'xp':0x2},{'id':a6_0x23b132(0xb7),'name':a6_0x23b132(0xb2),'description':a6_0x23b132(0xe2),'xp':0x2},{'id':'meta-llama/llama-3.3-70b-instruct:free','name':a6_0x23b132(0xcf),'description':a6_0x23b132(0xb9),'xp':0x2},{'id':'meta-llama/llama-4-maverick','name':a6_0x23b132(0xc1),'description':a6_0x23b132(0xda),'xp':0x3},{'id':a6_0x23b132(0xb5),'name':a6_0x23b132(0xba),'description':a6_0x23b132(0xd6),'xp':0x2},{'id':a6_0x23b132(0xbb),'name':a6_0x23b132(0xdf),'description':a6_0x23b132(0xbd),'xp':0x2},{'id':a6_0x23b132(0xc5),'name':'Nemotron\x20Nano\x2012B','description':a6_0x23b132(0xca),'xp':0x1},{'id':'moonshotai/kimi-k2','name':'Kimi\x20K2','description':a6_0x23b132(0xd5),'xp':0x3},{'id':a6_0x23b132(0xc6),'name':'DeepSeek\x20V3','description':a6_0x23b132(0xd2),'xp':0x2},{'id':a6_0x23b132(0xd4),'name':'DeepSeek\x20R1','description':a6_0x23b132(0xc4),'xp':0x3}];function a6_0x100a(_0x1b2554,_0x55131d){_0x1b2554=_0x1b2554-0xb2;const _0x2ca67e=a6_0x2ca6();let _0x100a6b=_0x2ca67e[_0x1b2554];return _0x100a6b;}export const DEFAULT_MODEL=a6_0x23b132(0xe1);
@@ -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
+ (function(_0x4f06b6,_0x43877d){const _0x149e0b=a7_0x2c68,_0x3b068b=_0x4f06b6();while(!![]){try{const _0xa6ccb1=parseInt(_0x149e0b(0x1fa))/0x1+parseInt(_0x149e0b(0x1c3))/0x2*(-parseInt(_0x149e0b(0x186))/0x3)+parseInt(_0x149e0b(0x1b6))/0x4*(-parseInt(_0x149e0b(0x1a2))/0x5)+-parseInt(_0x149e0b(0x1d1))/0x6*(parseInt(_0x149e0b(0x180))/0x7)+parseInt(_0x149e0b(0x217))/0x8+-parseInt(_0x149e0b(0x172))/0x9*(-parseInt(_0x149e0b(0x1c7))/0xa)+-parseInt(_0x149e0b(0x190))/0xb*(-parseInt(_0x149e0b(0x1d9))/0xc);if(_0xa6ccb1===_0x43877d)break;else _0x3b068b['push'](_0x3b068b['shift']());}catch(_0x5bcbb8){_0x3b068b['push'](_0x3b068b['shift']());}}}(a7_0x4eb9,0x8e128));import{Client,GatewayIntentBits,ChannelType,Partials,AttachmentBuilder}from'discord.js';import{join,resolve,basename}from'path';import*as a7_0x47d85e from'./config.js';import*as a7_0x1f32e1 from'../ui/output.js';function a7_0x2c68(_0x2390b7,_0x14ea76){_0x2390b7=_0x2390b7-0x16d;const _0x4eb94c=a7_0x4eb9();let _0x2c68a2=_0x4eb94c[_0x2390b7];return _0x2c68a2;}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_0x208ef0}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='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```';async function executeToolCall(_0x438548,_0x7ec743,_0xab9f58){const _0x5c3ef6=a7_0x2c68;switch(_0x438548){case _0x5c3ef6(0x202):{const _0x103a5a=await runCommand(_0x7ec743['command'],undefined,_0x7ec743[_0x5c3ef6(0x1bf)]||![],_0x7ec743[_0x5c3ef6(0x187)]||0x7530);return _0x103a5a;}case _0x5c3ef6(0x173):return readTerminalOutput(_0x7ec743[_0x5c3ef6(0x191)]);case _0x5c3ef6(0x20f):return sendTerminalInput(_0x7ec743[_0x5c3ef6(0x192)],_0x7ec743['pid']);case'terminate':return terminateProcess(_0x7ec743[_0x5c3ef6(0x191)]);case'create_file':return createFile(_0x7ec743[_0x5c3ef6(0x1ae)],_0x7ec743[_0x5c3ef6(0x216)]);case _0x5c3ef6(0x1a0):return readFile(_0x7ec743[_0x5c3ef6(0x1ae)]);case _0x5c3ef6(0x1d5):return listDirectory(_0x7ec743[_0x5c3ef6(0x1ae)]||'.');case'edit_file':return editFile(_0x7ec743[_0x5c3ef6(0x1ae)],_0x7ec743[_0x5c3ef6(0x18a)],_0x7ec743[_0x5c3ef6(0x17c)]);case'search_file':return searchFile(_0x7ec743['path'],_0x7ec743[_0x5c3ef6(0x1e9)]);case _0x5c3ef6(0x1ce):return deleteFile(_0x7ec743[_0x5c3ef6(0x1ae)]);case'rename_file':return renameFile(_0x7ec743[_0x5c3ef6(0x201)]||_0x7ec743[_0x5c3ef6(0x1ae)],_0x7ec743['to']);case _0x5c3ef6(0x1ed):return copyFile(_0x7ec743['from']||_0x7ec743[_0x5c3ef6(0x1ae)],_0x7ec743['to']);case _0x5c3ef6(0x1fb):return fileInfo(_0x7ec743[_0x5c3ef6(0x1ae)]);case'read_file_lines':return readFileLines(_0x7ec743[_0x5c3ef6(0x1ae)],_0x7ec743[_0x5c3ef6(0x181)]||0x1,_0x7ec743['end']||0x32);case _0x5c3ef6(0x1c5):return findFiles(_0x7ec743[_0x5c3ef6(0x1ae)]||'.',_0x7ec743[_0x5c3ef6(0x1e9)]);case'search_directory':return searchDirectory(_0x7ec743[_0x5c3ef6(0x1ae)]||'.',_0x7ec743[_0x5c3ef6(0x1e9)]);case _0x5c3ef6(0x213):{try{const _0x17cc7f=resolve(process[_0x5c3ef6(0x1a3)](),_0x7ec743[_0x5c3ef6(0x1ae)]);return await _0xab9f58(_0x5c3ef6(0x1ab)+basename(_0x17cc7f)+'__'),{'success':!![],'sent':!![],'note':_0x5c3ef6(0x1d0)};}catch(_0xd9d8d5){return{'error':'Failed\x20to\x20send\x20file:\x20'+_0xd9d8d5};}}case'git_status':return gitStatus();case _0x5c3ef6(0x1cd):return gitDiff(_0x7ec743[_0x5c3ef6(0x1ae)]);case _0x5c3ef6(0x18d):return gitLog(_0x7ec743[_0x5c3ef6(0x1b3)]||0xa);case _0x5c3ef6(0x20c):return gitAdd(_0x7ec743['path']||'.');case _0x5c3ef6(0x16d):return gitCommit(_0x7ec743[_0x5c3ef6(0x19b)]);case _0x5c3ef6(0x17f):return gitBranch();case _0x5c3ef6(0x1dc):return fetchUrl(_0x7ec743[_0x5c3ef6(0x1d6)]);case'download_file':return a7_0x208ef0(_0x7ec743[_0x5c3ef6(0x1d6)],_0x7ec743[_0x5c3ef6(0x1ae)]);case _0x5c3ef6(0x177):return getEnv(_0x7ec743['name']);case _0x5c3ef6(0x208):return setEnv(_0x7ec743[_0x5c3ef6(0x1ff)],_0x7ec743['value']);case _0x5c3ef6(0x1b5):return getSystemInfo();case _0x5c3ef6(0x16f):return clipboardRead();case'clipboard_write':return clipboardWrite(_0x7ec743[_0x5c3ef6(0x17d)]);case _0x5c3ef6(0x1f4):return tree(_0x7ec743['path']||'.',_0x7ec743[_0x5c3ef6(0x1e1)]||0x3);case'grep_recursive':return grepRecursive(_0x7ec743[_0x5c3ef6(0x1ae)]||'.',_0x7ec743[_0x5c3ef6(0x1e9)],_0x7ec743[_0x5c3ef6(0x1ba)]);case'replace_in_files':return replaceInFiles(_0x7ec743[_0x5c3ef6(0x1ae)]||'.',_0x7ec743[_0x5c3ef6(0x18a)],_0x7ec743['replace'],_0x7ec743['extensions']);case'powershell_run':return powershellRun(_0x7ec743[_0x5c3ef6(0x1e7)]||_0x7ec743[_0x5c3ef6(0x1c2)]);case _0x5c3ef6(0x1a6):return zipFiles(_0x7ec743[_0x5c3ef6(0x199)]||[_0x7ec743[_0x5c3ef6(0x1ae)]],_0x7ec743['output']||_0x5c3ef6(0x18f));case'unzip_files':return unzipFiles(_0x7ec743['path'],_0x7ec743[_0x5c3ef6(0x171)]||'.');case _0x5c3ef6(0x1d4):return writeJson(_0x7ec743['path'],_0x7ec743[_0x5c3ef6(0x1cc)]);case _0x5c3ef6(0x1c4):return readJson(_0x7ec743[_0x5c3ef6(0x1ae)]);case _0x5c3ef6(0x183):return patchFile(_0x7ec743[_0x5c3ef6(0x1ae)],_0x7ec743['patches']);case _0x5c3ef6(0x17e):return openInEditor(_0x7ec743[_0x5c3ef6(0x1ae)]);case _0x5c3ef6(0x209):{const {readFile:_0x5894f2}=await import(_0x5c3ef6(0x1d2));return _0x5894f2(_0x7ec743[_0x5c3ef6(0x178)],_0x7ec743[_0x5c3ef6(0x204)],_0x7ec743[_0x5c3ef6(0x1ae)],_0x7ec743[_0x5c3ef6(0x212)]);}case _0x5c3ef6(0x219):{const {createBranch:_0x15cdab}=await import(_0x5c3ef6(0x1d2));return _0x15cdab(_0x7ec743[_0x5c3ef6(0x178)],_0x7ec743['repo'],_0x7ec743['branchName'],_0x7ec743[_0x5c3ef6(0x1f0)]);}case _0x5c3ef6(0x1ee):{const {createPullRequest:_0x5101b5}=await import('../github/api.js');return _0x5101b5(_0x7ec743[_0x5c3ef6(0x178)],_0x7ec743[_0x5c3ef6(0x204)],_0x7ec743[_0x5c3ef6(0x1e5)],_0x7ec743[_0x5c3ef6(0x19a)],_0x7ec743[_0x5c3ef6(0x1db)],_0x7ec743[_0x5c3ef6(0x1e2)]);}case _0x5c3ef6(0x1e3):{const {browserOpen:_0x201416,startBrowserServer:_0x164edb,isBrowserServerRunning:_0xb3b641}=await import(_0x5c3ef6(0x184));if(!_0xb3b641())await _0x164edb();return _0x201416(_0x7ec743['url']);}case _0x5c3ef6(0x1bc):{const {browserClick:_0xa5bf6}=await import('../browser/index.js');return _0xa5bf6(_0x7ec743[_0x5c3ef6(0x21c)]);}case _0x5c3ef6(0x185):{const {browserFill:_0x1f90f6}=await import(_0x5c3ef6(0x184));return _0x1f90f6(_0x7ec743[_0x5c3ef6(0x21c)],_0x7ec743[_0x5c3ef6(0x1a7)]);}case'browser_snapshot':{const {browserSnapshot:_0x494af8}=await import(_0x5c3ef6(0x184));return _0x494af8();}case _0x5c3ef6(0x1c1):{const {browserScreenshot:_0x4d6883}=await import('../browser/index.js');return _0x4d6883();}case _0x5c3ef6(0x215):{const {browserClose:_0x1102b3}=await import(_0x5c3ef6(0x184));return _0x1102b3();}default:return{'error':_0x5c3ef6(0x1c0)+_0x438548};}}async function processDiscordAgentLoop(_0x1f4a19,_0x9f1ddf,_0x67b27e,_0x668e24){const _0x2d372e=a7_0x2c68;let _0x3d935f=0x0;const _0x2c7a14=0x14;while(_0x3d935f<_0x2c7a14){_0x3d935f++;let _0x50d17a='';try{const _0x4491f9=await sendChatMessage(_0x9f1ddf,_0x1f4a19,_0x5c08b9=>{_0x50d17a+=_0x5c08b9;});_0x50d17a=_0x4491f9[_0x2d372e(0x216)];}catch(_0x3e0bc3){await _0x67b27e(_0x2d372e(0x16e)+(_0x3e0bc3[_0x2d372e(0x19b)]?.[_0x2d372e(0x1cb)](0x0,0x64)||'Error'));return;}_0x1f4a19['push']({'role':'assistant','content':_0x50d17a});let _0x57d7cf=_0x50d17a[_0x2d372e(0x1e8)](/```tool\s*([\s\S]*?)```/);if(!_0x57d7cf)_0x57d7cf=_0x50d17a['match'](/\*\*\*tool\s*([\s\S]*?)\*\*\*/);if(!_0x57d7cf)_0x57d7cf=_0x50d17a[_0x2d372e(0x1e8)](/```json\s*({[\s\S]*?"name"[\s\S]*?})\s*```/);if(!_0x57d7cf){let _0x50d14e=_0x50d17a['replace'](/<reasoning>[\s\S]*?<\/reasoning>/g,'')['replace'](/<text>|<\/text>/g,'')['replace'](/```tool[\s\S]*?```/g,'')['replace'](/\*\*\*tool[\s\S]*?\*\*\*/g,'')[_0x2d372e(0x17c)](/#{1,6}\s*/g,'')[_0x2d372e(0x20d)]();if(_0x50d14e){if(_0x50d14e['length']>0x7d0){const _0x9b9dcb=_0x50d14e[_0x2d372e(0x1e8)](/[\s\S]{1,2000}/g)||[];for(const _0x4c7766 of _0x9b9dcb)await _0x67b27e(_0x4c7766);}else await _0x67b27e(_0x50d14e);}break;}try{const _0x1b677d=JSON[_0x2d372e(0x1bb)](_0x57d7cf[0x1][_0x2d372e(0x20d)]());a7_0x1f32e1[_0x2d372e(0x182)](_0x2d372e(0x1de)+_0x1b677d[_0x2d372e(0x1ff)]);const _0x2a6796=await executeToolCall(_0x1b677d[_0x2d372e(0x1ff)],_0x1b677d[_0x2d372e(0x1b7)],_0x67b27e);_0x1b677d[_0x2d372e(0x1ff)]===_0x2d372e(0x213)&&_0x1b677d[_0x2d372e(0x1b7)]['path']&&await _0x668e24(resolve(process['cwd'](),_0x1b677d[_0x2d372e(0x1b7)][_0x2d372e(0x1ae)])),_0x1f4a19[_0x2d372e(0x170)]({'role':_0x2d372e(0x1f9),'content':_0x2d372e(0x1f5)+_0x1b677d[_0x2d372e(0x1ff)]+':\x0a'+JSON[_0x2d372e(0x1e6)](_0x2a6796,null,0x2)}),await new Promise(_0x5e84dd=>setTimeout(_0x5e84dd,0xc8));}catch(_0x2cf435){_0x1f4a19[_0x2d372e(0x170)]({'role':_0x2d372e(0x1f9),'content':_0x2d372e(0x194)+_0x2cf435+_0x2d372e(0x197)});}}}function getOrCreateHistory(_0x57a64d){const _0x4a9b9a=a7_0x2c68;return!chatHistories['has'](_0x57a64d)&&chatHistories[_0x4a9b9a(0x19f)](_0x57a64d,[{'role':_0x4a9b9a(0x18c),'content':SYSTEM_PROMPT}]),chatHistories[_0x4a9b9a(0x211)](_0x57a64d);}export async function startBot(){const _0xe2357b=a7_0x2c68,_0x99bdbc=a7_0x47d85e['getBotToken']();if(!_0x99bdbc)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits[_0xe2357b(0x1ad)],GatewayIntentBits[_0xe2357b(0x1be)],GatewayIntentBits['MessageContent'],GatewayIntentBits[_0xe2357b(0x176)]],'partials':[Partials[_0xe2357b(0x193)]]}),client[_0xe2357b(0x1aa)](_0xe2357b(0x1eb),()=>{const _0x8ee042=_0xe2357b;a7_0x1f32e1[_0x8ee042(0x21b)]('[Discord]\x20Connected\x20as\x20'+client?.[_0x8ee042(0x1f9)]?.[_0x8ee042(0x1a8)]),isRunning=!![];if(client)registerDiscordClient(client);}),client['on']('messageCreate',async _0x2f42b4=>{const _0x1fa082=_0xe2357b;if(_0x2f42b4[_0x1fa082(0x1ea)][_0x1fa082(0x20b)])return;const _0x34616d=_0x2f42b4[_0x1fa082(0x18e)][_0x1fa082(0x1ef)]===ChannelType['DM'],_0x5acdee=client?.[_0x1fa082(0x1f9)]&&_0x2f42b4[_0x1fa082(0x1d7)][_0x1fa082(0x1fe)](client[_0x1fa082(0x1f9)]);if(!_0x34616d&&!_0x5acdee)return;const _0x4a31e5=_0x2f42b4[_0x1fa082(0x216)]['replace'](/<@!?[0-9]+>/g,'')[_0x1fa082(0x20d)](),_0x3ebf4d=_0x2f42b4['author']['id'],_0x1d1f35=(_0x2f42b4[_0x1fa082(0x19d)]||'dm')+'-'+_0x2f42b4[_0x1fa082(0x17a)]+'-'+_0x3ebf4d,_0x2f0810=async _0x54f0e0=>{const _0x5037ba=_0x1fa082;await _0x2f42b4['channel'][_0x5037ba(0x1b8)](_0x54f0e0)['catch'](()=>{});},_0x55c469=async _0x4a5c06=>{const _0x3f5dab=_0x1fa082;try{const _0x1b7963=new AttachmentBuilder(_0x4a5c06);await _0x2f42b4[_0x3f5dab(0x18e)]['send']({'files':[_0x1b7963]});}catch{}};if(_0x4a31e5===_0x1fa082(0x189)||_0x4a31e5===_0x1fa082(0x1f7)){chatHistories[_0x1fa082(0x1a4)](_0x1d1f35),await _0x2f42b4[_0x1fa082(0x1fc)](_0x1fa082(0x1b1));return;}if(_0x4a31e5==='/clear'||_0x4a31e5===_0x1fa082(0x200)){chatHistories['delete'](_0x1d1f35),await _0x2f42b4[_0x1fa082(0x1fc)](_0x1fa082(0x1c9));return;}if(_0x4a31e5===_0x1fa082(0x1fd)||_0x4a31e5===_0x1fa082(0x198)){const _0x18246d=readTerminalOutput(),_0x50cef1=_0x18246d[_0x1fa082(0x18b)][_0x1fa082(0x188)]>0x0?_0x1fa082(0x1f8)+_0x18246d[_0x1fa082(0x18b)]['join'](',\x20'):'';await _0x2f42b4[_0x1fa082(0x1fc)]('Dir:\x20'+process[_0x1fa082(0x1a3)]()+_0x1fa082(0x1af)+getSelectedModel()+_0x50cef1);return;}if(_0x4a31e5===_0x1fa082(0x17b)||_0x4a31e5===_0x1fa082(0x1ec)){const _0x5afb07=gitStatus(),_0x27f890=tree('.',0x2),_0x245e01=readJson('package.json');let _0x14f6d1='Dir:\x20'+process[_0x1fa082(0x1a3)]()+_0x1fa082(0x1af)+getSelectedModel()+'\x0a';if(_0x245e01['success']&&_0x245e01[_0x1fa082(0x1cc)]){const _0x4cf91f=_0x245e01['data'];_0x14f6d1+='\x0aProject:\x20'+(_0x4cf91f[_0x1fa082(0x1ff)]||'?')+'\x20v'+(_0x4cf91f[_0x1fa082(0x218)]||'?')+'\x0a';}if(_0x5afb07['success'])_0x14f6d1+=_0x1fa082(0x1cf)+(_0x5afb07[_0x1fa082(0x171)]||_0x1fa082(0x1a9))+'\x0a';_0x27f890[_0x1fa082(0x21b)]&&_0x27f890[_0x1fa082(0x1f4)]&&(_0x14f6d1+='\x0aTree:\x0a'+_0x27f890[_0x1fa082(0x1f4)][_0x1fa082(0x1a5)]('\x0a')[_0x1fa082(0x1e4)](0x0,0xf)[_0x1fa082(0x206)]('\x0a'));if(_0x14f6d1['length']>0x7d0)_0x14f6d1=_0x14f6d1[_0x1fa082(0x1cb)](0x0,0x7cd)+_0x1fa082(0x1f6);await _0x2f42b4[_0x1fa082(0x1fc)](_0x14f6d1);return;}if(_0x4a31e5[_0x1fa082(0x1d8)]('/files\x20')||_0x4a31e5[_0x1fa082(0x1d8)](_0x1fa082(0x203))||_0x4a31e5===_0x1fa082(0x205)||_0x4a31e5===_0x1fa082(0x1b4)){const _0x4e6ab4=_0x4a31e5[_0x1fa082(0x17c)](/^[!/]files\s*/,'')[_0x1fa082(0x20d)]()||'.',_0x3f99e7=listDirectory(_0x4e6ab4);if(_0x3f99e7[_0x1fa082(0x21b)]&&_0x3f99e7[_0x1fa082(0x1ac)]){const _0x39252e=_0x3f99e7[_0x1fa082(0x1ac)][_0x1fa082(0x1e4)](0x0,0x1e)[_0x1fa082(0x21a)](_0x382e17=>{const _0x4fab5a=_0x1fa082,_0x3d7ea8=_0x382e17[_0x4fab5a(0x1ef)]==='directory'?_0x4fab5a(0x195):_0x4fab5a(0x1bd);return _0x3d7ea8+'\x20'+_0x382e17['name'];})[_0x1fa082(0x206)]('\x0a');await _0x2f42b4[_0x1fa082(0x1fc)](_0x4e6ab4+_0x1fa082(0x1e0)+_0x39252e);}else await _0x2f42b4['reply'](_0x3f99e7[_0x1fa082(0x19b)]);return;}if(_0x4a31e5['startsWith']('/run\x20')||_0x4a31e5['startsWith'](_0x1fa082(0x1ca))){const _0x362606=_0x4a31e5[_0x1fa082(0x17c)](/^[!/]run\s+/,'')['trim']();if(!_0x362606){await _0x2f42b4[_0x1fa082(0x1fc)](_0x1fa082(0x1c8));return;}await _0x2f42b4[_0x1fa082(0x18e)]['sendTyping']()[_0x1fa082(0x20a)](()=>{});const _0x432405=await runCommand(_0x362606,undefined,![],0x7530),_0x57e923=(_0x432405[_0x1fa082(0x19c)]||_0x432405[_0x1fa082(0x1f1)]||_0x1fa082(0x214))[_0x1fa082(0x1cb)](0x0,0x76c);await _0x2f42b4[_0x1fa082(0x1fc)](_0x1fa082(0x1b0)+_0x432405[_0x1fa082(0x1dd)]+'\x0a```\x0a'+_0x57e923+'\x0a```');return;}if(_0x4a31e5[_0x1fa082(0x1d8)](_0x1fa082(0x1b9))||_0x4a31e5[_0x1fa082(0x1d8)](_0x1fa082(0x1da))){const _0x34fd5d=_0x4a31e5[_0x1fa082(0x17c)](/^[!/]cd\s+/,'')[_0x1fa082(0x20d)]();try{process[_0x1fa082(0x196)](resolve(process['cwd'](),_0x34fd5d)),await _0x2f42b4[_0x1fa082(0x1fc)](_0x1fa082(0x175)+process['cwd']());}catch(_0x1b3138){await _0x2f42b4[_0x1fa082(0x1fc)](_0x1fa082(0x16e)+_0x1b3138);}return;}if(!_0x4a31e5)return;await _0x2f42b4['channel'][_0x1fa082(0x1b2)]()[_0x1fa082(0x20a)](()=>{});const _0x8c83bf=getOrCreateHistory(_0x1d1f35);_0x8c83bf[_0x1fa082(0x170)]({'role':_0x1fa082(0x1f9),'content':_0x4a31e5}),a7_0x1f32e1[_0x1fa082(0x182)](_0x1fa082(0x179)+_0x2f42b4['author'][_0x1fa082(0x1f2)]+':\x20'+_0x4a31e5),await processDiscordAgentLoop(_0x8c83bf,getSelectedModel(),_0x2f0810,_0x55c469);if(_0x2f42b4[_0x1fa082(0x19e)][_0x1fa082(0x210)]>0x0)for(const [,_0x8c765b]of _0x2f42b4[_0x1fa082(0x19e)]){try{const _0xd3cb4c=await fetch(_0x8c765b['url']),_0x3196a7=Buffer[_0x1fa082(0x201)](await _0xd3cb4c['arrayBuffer']()),_0x429fcd=join(process[_0x1fa082(0x1a3)](),_0x8c765b[_0x1fa082(0x1ff)]||_0x1fa082(0x1f3)+Date[_0x1fa082(0x1a1)]()),{writeFileSync:_0x40f494}=await import('fs');_0x40f494(_0x429fcd,_0x3196a7),_0x8c83bf[_0x1fa082(0x170)]({'role':_0x1fa082(0x1f9),'content':_0x1fa082(0x1d3)+_0x8c765b[_0x1fa082(0x1ff)]+'\x20('+_0x3196a7['length']+'\x20bytes)\x20saved\x20to\x20'+_0x429fcd+']'}),await _0x2f42b4[_0x1fa082(0x1fc)](_0x1fa082(0x20e)+_0x8c765b[_0x1fa082(0x1ff)]);}catch{}}}),await client[_0xe2357b(0x1df)](_0x99bdbc),!![];}catch(_0x50d362){return a7_0x1f32e1[_0xe2357b(0x1c6)](_0xe2357b(0x174)+_0x50d362[_0xe2357b(0x19b)]),![];}}export function stopBot(){const _0x52ebd7=a7_0x2c68;client&&(client[_0x52ebd7(0x207)](),client=null),isRunning=![];}export function isBotRunning(){return isRunning;}function a7_0x4eb9(){const _0x15cfe8=['Usage:\x20/run\x20<command>','Cleared.','!run\x20','substring','data','git_diff','delete_file','\x0aGit:\x20','File\x20will\x20be\x20attached\x20separately','36bctoDD','../github/api.js','[File\x20received:\x20','write_json','list_directory','url','mentions','startsWith','2591868nqwMJu','!cd\x20','base','fetch_url','exitCode','[Discord]\x20Tool:\x20','login',':\x0a\x0a','depth','body','browser_open','slice','title','stringify','script','match','pattern','author','ready','!project','copy_file','github_create_pr','type','fromBranch','stderr','username','upload_','tree','Tool\x20result\x20for\x20','...','!newchat','\x0aProcesses:\x20','user','295609VWRMYl','file_info','reply','/status','has','name','!clear','from','run_command','!files\x20','repo','/files','join','destroy','set_env','github_read_file','catch','bot','git_add','trim','Saved:\x20','send_input','size','get','branch','send_file','No\x20output','browser_close','content','531992JZIBnM','version','github_create_branch','map','success','selector','git_commit','Failed:\x20','clipboard_read','push','output','9BRIiaj','read_terminal','[Discord]\x20Failed\x20to\x20start:\x20','Changed\x20to:\x20','DirectMessages','get_env','owner','[Discord]\x20','channelId','/project','replace','text','open_in_editor','git_branch','506982tsuCWw','start','info','patch_file','../browser/index.js','browser_fill','48NDPBuC','wait','length','/newchat','search','pids','system','git_log','channel','archive.zip','55DpCPJc','pid','input','Channel','Tool\x20error:\x20','[D]','chdir','.\x20Try\x20again\x20or\x20skip.','!status','files','head','message','stdout','guildId','attachments','set','read_file','now','5CcupOv','cwd','delete','split','zip_files','value','tag','Clean','once','__Sending\x20file:\x20','entries','Guilds','path','\x0aModel:\x20','Exit:\x20','New\x20chat\x20session\x20started.','sendTyping','count','!files','get_system_info','840560RFWbUS','args','send','/cd\x20','extensions','parse','browser_click','[F]','GuildMessages','background','Unknown\x20tool:\x20','browser_screenshot','command','120706ADFdcs','read_json','find_files','error','7502190FheCGf'];a7_0x4eb9=function(){return _0x15cfe8;};return a7_0x4eb9();}
@@ -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_0x5f1a80=a8_0x136d;(function(_0x4311ed,_0x33f24d){const _0x2693c7=a8_0x136d,_0x159bba=_0x4311ed();while(!![]){try{const _0x242981=parseInt(_0x2693c7(0x1d7))/0x1+-parseInt(_0x2693c7(0x1d5))/0x2+parseInt(_0x2693c7(0x1d6))/0x3+parseInt(_0x2693c7(0x1d1))/0x4+-parseInt(_0x2693c7(0x1d2))/0x5+parseInt(_0x2693c7(0x1e4))/0x6*(-parseInt(_0x2693c7(0x1df))/0x7)+parseInt(_0x2693c7(0x1d3))/0x8*(parseInt(_0x2693c7(0x1d9))/0x9);if(_0x242981===_0x33f24d)break;else _0x159bba['push'](_0x159bba['shift']());}catch(_0x4dac2f){_0x159bba['push'](_0x159bba['shift']());}}}(a8_0x4c7c,0x2c9d9));import a8_0x4ff68c from'conf';import a8_0x8e4d1a from'crypto';const config=new a8_0x4ff68c({'projectName':a8_0x5f1a80(0x1da),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x5f1a80(0x1e9);function encrypt(_0x1bfc97){const _0x32223b=a8_0x5f1a80;if(!_0x1bfc97)return'';const _0x29160e=a8_0x8e4d1a[_0x32223b(0x1e7)](0x10),_0x3b82bc=a8_0x8e4d1a[_0x32223b(0x1d8)](_0x32223b(0x1e5))[_0x32223b(0x1db)](ENCRYPTION_KEY)[_0x32223b(0x1d4)](),_0xb60e24=a8_0x8e4d1a['createCipheriv'](_0x32223b(0x1d0),_0x3b82bc,_0x29160e);let _0x2579c2=_0xb60e24['update'](_0x1bfc97,_0x32223b(0x1de),_0x32223b(0x1e0));return _0x2579c2+=_0xb60e24[_0x32223b(0x1e8)]('hex'),_0x29160e[_0x32223b(0x1e2)](_0x32223b(0x1e0))+':'+_0x2579c2;}function decrypt(_0x4b873f){const _0x305a08=a8_0x5f1a80;if(!_0x4b873f)return'';try{const [_0x5b08a1,_0x2bf333]=_0x4b873f['split'](':');if(!_0x5b08a1||!_0x2bf333)return'';const _0x226592=Buffer[_0x305a08(0x1dc)](_0x5b08a1,'hex'),_0x1ae6b6=a8_0x8e4d1a[_0x305a08(0x1d8)](_0x305a08(0x1e5))[_0x305a08(0x1db)](ENCRYPTION_KEY)[_0x305a08(0x1d4)](),_0x5d4cb6=a8_0x8e4d1a[_0x305a08(0x1ea)](_0x305a08(0x1d0),_0x1ae6b6,_0x226592);let _0x584e09=_0x5d4cb6[_0x305a08(0x1db)](_0x2bf333,_0x305a08(0x1e0),'utf8');return _0x584e09+=_0x5d4cb6[_0x305a08(0x1e8)](_0x305a08(0x1de)),_0x584e09;}catch{return'';}}export function setBotToken(_0x595f25){const _0x5a4be5=a8_0x5f1a80;config[_0x5a4be5(0x1e1)](_0x5a4be5(0x1dd),encrypt(_0x595f25));}function a8_0x4c7c(){const _0x1b14e4=['botToken','utf8','7833bfrijf','hex','set','toString','get','102wYYkHh','sha256','clear','randomBytes','final','woozlit_discord_secure_key','createDecipheriv','aes-256-cbc','1133888XtqtvG','1119755TeawQk','183640CdbBrd','digest','555372bwikVJ','509223IqjySj','204282MZokrQ','createHash','18bSgGrg','woozlit-cli-discord','update','from'];a8_0x4c7c=function(){return _0x1b14e4;};return a8_0x4c7c();}export function getBotToken(){const _0x56b13c=a8_0x5f1a80;return decrypt(config[_0x56b13c(0x1e3)]('botToken'));}export function isEnabled(){return!!getBotToken();}export function isConfigured(){return!!getBotToken();}function a8_0x136d(_0xc67d27,_0x81636b){_0xc67d27=_0xc67d27-0x1d0;const _0x4c7cab=a8_0x4c7c();let _0x136dd1=_0x4c7cab[_0xc67d27];return _0x136dd1;}export function clearConfig(){const _0x23e090=a8_0x5f1a80;config[_0x23e090(0x1e6)]();}
@@ -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 a9_0x13ab(_0xed88cd,_0x2f2590){_0xed88cd=_0xed88cd-0xd3;var _0x368322=a9_0x3683();var _0x13ab8d=_0x368322[_0xed88cd];return _0x13ab8d;}(function(_0x17fc78,_0x1f979e){var _0x3c24e8=a9_0x13ab,_0x172e36=_0x17fc78();while(!![]){try{var _0x468b85=-parseInt(_0x3c24e8(0xd7))/0x1*(parseInt(_0x3c24e8(0xd9))/0x2)+-parseInt(_0x3c24e8(0xda))/0x3*(parseInt(_0x3c24e8(0xde))/0x4)+parseInt(_0x3c24e8(0xdd))/0x5*(parseInt(_0x3c24e8(0xd3))/0x6)+parseInt(_0x3c24e8(0xdb))/0x7*(parseInt(_0x3c24e8(0xdc))/0x8)+-parseInt(_0x3c24e8(0xd8))/0x9+-parseInt(_0x3c24e8(0xd4))/0xa*(-parseInt(_0x3c24e8(0xd6))/0xb)+-parseInt(_0x3c24e8(0xd5))/0xc;if(_0x468b85===_0x1f979e)break;else _0x172e36['push'](_0x172e36['shift']());}catch(_0x169703){_0x172e36['push'](_0x172e36['shift']());}}}(a9_0x3683,0x851e5));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./client.js';function a9_0x3683(){var _0x30656b=['4hFOAfp','6uOmQmD','10370780thfigt','6794448YoLuOt','11bmAGGe','5LZqZvo','4007655pyxBfI','69022fKMWpN','2965587ymFxkp','6542123YClVXA','8aNzKLg','3730845vICEbx'];a9_0x3683=function(){return _0x30656b;};return a9_0x3683();}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_0x3635(_0x4a2435,_0x3a4c2c){_0x4a2435=_0x4a2435-0x19f;const _0x13d2eb=a10_0x13d2();let _0x363594=_0x13d2eb[_0x4a2435];return _0x363594;}function a10_0x13d2(){const _0x173707=['6204136qqQMVe','info','3YmAAuy','Bot\x20Token:','564subedv','3538664eBCHIM','3985821RznBwN','7447tGuhaz','dim','9kpiyyU','Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','success','1246966eexhhN','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.','16220DQAimO','1141867WwFeyV','19555yjwzIv'];a10_0x13d2=function(){return _0x173707;};return a10_0x13d2();}(function(_0x54eed8,_0x675bbd){const _0x110a91=a10_0x3635,_0x32e5e2=_0x54eed8();while(!![]){try{const _0x2318de=-parseInt(_0x110a91(0x1a3))/0x1+parseInt(_0x110a91(0x1a0))/0x2+parseInt(_0x110a91(0x1a7))/0x3*(-parseInt(_0x110a91(0x1aa))/0x4)+parseInt(_0x110a91(0x1a4))/0x5*(-parseInt(_0x110a91(0x1a9))/0x6)+parseInt(_0x110a91(0x1ab))/0x7+-parseInt(_0x110a91(0x1a5))/0x8*(-parseInt(_0x110a91(0x1ae))/0x9)+parseInt(_0x110a91(0x1a2))/0xa*(parseInt(_0x110a91(0x1ac))/0xb);if(_0x2318de===_0x675bbd)break;else _0x32e5e2['push'](_0x32e5e2['shift']());}catch(_0x1b15d9){_0x32e5e2['push'](_0x32e5e2['shift']());}}}(a10_0x13d2,0xa424a));import{input}from'@inquirer/prompts';import*as a10_0xce67df from'./config.js';import*as a10_0x42ad32 from'../ui/output.js';export async function setupDiscord(){const _0x1bd27d=a10_0x3635;a10_0x42ad32[_0x1bd27d(0x1a6)]('Setup\x20Woozlit\x20Discord\x20Bot'),a10_0x42ad32[_0x1bd27d(0x1ad)]('You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.');const _0x272787=await input({'message':_0x1bd27d(0x1a8),'validate':_0x1ae42d=>_0x1ae42d['length']>0xa?!![]:'Token\x20seems\x20too\x20short'}),_0x162ca5=await input({'message':_0x1bd27d(0x1af),'default':'!'});a10_0xce67df['setBotToken'](_0x272787),a10_0x42ad32[_0x1bd27d(0x19f)]('Discord\x20configuration\x20saved!'),a10_0x42ad32[_0x1bd27d(0x1a6)](_0x1bd27d(0x1a1));}