woozlit 2.2.0 → 2.2.1

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 (58) 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.js +1 -1
  25. package/dist/services/voice-agent.js +1 -1
  26. package/dist/telegram/bot.js +1 -1
  27. package/dist/telegram/config.js +1 -1
  28. package/dist/telegram/index.js +1 -1
  29. package/dist/telegram/reminders.js +1 -1
  30. package/dist/telegram/setup.js +1 -1
  31. package/dist/tools/command.js +1 -1
  32. package/dist/tools/file.js +1 -1
  33. package/dist/tools/git.js +1 -1
  34. package/dist/tools/index.js +1 -1
  35. package/dist/tools/knowledge.js +1 -1
  36. package/dist/tools/mcp.js +1 -1
  37. package/dist/tools/network.js +1 -1
  38. package/dist/tools/project.js +1 -1
  39. package/dist/tools/rollback.js +1 -1
  40. package/dist/tools/rules.js +1 -1
  41. package/dist/tools/system.js +1 -1
  42. package/dist/twilio/config.js +1 -1
  43. package/dist/twilio/index.js +1 -1
  44. package/dist/twilio/server.js +1 -1
  45. package/dist/twilio/setup.js +1 -1
  46. package/dist/ui/output.js +1 -1
  47. package/dist/ui/select.js +1 -1
  48. package/dist/ui/themes.js +1 -1
  49. package/dist/utils/api.js +1 -1
  50. package/dist/utils/chat-history.js +1 -1
  51. package/dist/utils/history.js +1 -1
  52. package/dist/utils/mcp-installer.js +1 -1
  53. package/dist/utils/platform.js +1 -1
  54. package/dist/utils/storage.js +1 -1
  55. package/dist/utils/update-check.js +1 -1
  56. package/dist/utils/updater.js +1 -1
  57. package/dist/verify_repro.js +1 -1
  58. package/package.json +1 -1
@@ -1 +1 @@
1
- const a22_0x5ee292=a22_0x4d5f;(function(_0x2adfcd,_0x26e369){const _0x51397c=a22_0x4d5f,_0x43973b=_0x2adfcd();while(!![]){try{const _0x50c35d=-parseInt(_0x51397c(0x79))/0x1*(-parseInt(_0x51397c(0x87))/0x2)+-parseInt(_0x51397c(0x8a))/0x3+parseInt(_0x51397c(0x80))/0x4*(parseInt(_0x51397c(0x81))/0x5)+-parseInt(_0x51397c(0x6d))/0x6+-parseInt(_0x51397c(0x78))/0x7*(-parseInt(_0x51397c(0x77))/0x8)+parseInt(_0x51397c(0x85))/0x9*(-parseInt(_0x51397c(0x7c))/0xa)+-parseInt(_0x51397c(0x86))/0xb*(-parseInt(_0x51397c(0x70))/0xc);if(_0x50c35d===_0x26e369)break;else _0x43973b['push'](_0x43973b['shift']());}catch(_0xf43177){_0x43973b['push'](_0x43973b['shift']());}}}(a22_0x82e6,0x19831));import*as a22_0x299005 from'../telegram/index.js';function a22_0x4d5f(_0x4fe65b,_0x56b58a){_0x4fe65b=_0x4fe65b-0x6b;const _0x82e61f=a22_0x82e6();let _0x4d5fcd=_0x82e61f[_0x4fe65b];return _0x4d5fcd;}import*as a22_0x5c7500 from'../discord/index.js';import*as a22_0x25ac97 from'../email/index.js';import*as a22_0x3b8a64 from'../ui/output.js';class BotManager{[a22_0x5ee292(0x6f)]=[];constructor(){const _0x537190=a22_0x5ee292;this[_0x537190(0x6f)]['push']({'name':_0x537190(0x7a),'start':a22_0x299005[_0x537190(0x71)],'stop':a22_0x299005[_0x537190(0x75)],'isRunning':a22_0x299005[_0x537190(0x76)],'isConfigured':a22_0x299005['isConfigured']}),this[_0x537190(0x6f)][_0x537190(0x82)]({'name':_0x537190(0x7e),'start':a22_0x5c7500['startBot'],'stop':a22_0x5c7500[_0x537190(0x75)],'isRunning':a22_0x5c7500[_0x537190(0x76)],'isConfigured':a22_0x5c7500[_0x537190(0x7f)]}),this[_0x537190(0x6f)][_0x537190(0x82)]({'name':_0x537190(0x6e),'start':a22_0x25ac97[_0x537190(0x71)],'stop':a22_0x25ac97[_0x537190(0x75)],'isRunning':a22_0x25ac97[_0x537190(0x76)],'isConfigured':a22_0x25ac97[_0x537190(0x7f)]});}async[a22_0x5ee292(0x72)](){const _0x588c5c=a22_0x5ee292,_0x364159=this['services'][_0x588c5c(0x8b)](_0x3be626=>_0x3be626['isConfigured']());if(_0x364159[_0x588c5c(0x88)]===0x0)return;a22_0x3b8a64[_0x588c5c(0x6c)](_0x588c5c(0x84));const _0x12ea75=await Promise[_0x588c5c(0x89)](_0x364159[_0x588c5c(0x73)](async _0x2f562f=>{const _0x263314=_0x588c5c;try{if(_0x2f562f['isRunning']())return!![];const _0x5c148f=await _0x2f562f['start']();return _0x5c148f;}catch(_0x349876){return a22_0x3b8a64['error'](_0x263314(0x7b)+_0x2f562f[_0x263314(0x6b)]+':\x20'+_0x349876),![];}})),_0x263c73=_0x12ea75[_0x588c5c(0x8b)](_0x5d825a=>_0x5d825a)[_0x588c5c(0x88)];_0x263c73>0x0&&a22_0x3b8a64['success']('[Bot\x20Manager]\x20'+_0x263c73+'/'+_0x364159[_0x588c5c(0x88)]+'\x20services\x20active\x20in\x20background');}['stopAll'](){const _0x372b94=a22_0x5ee292;this[_0x372b94(0x6f)][_0x372b94(0x7d)](_0x3623a1=>{_0x3623a1['isRunning']()&&_0x3623a1['stop']();});}[a22_0x5ee292(0x83)](){const _0x5dfde6=a22_0x5ee292;return this['services'][_0x5dfde6(0x73)](_0x572194=>({'name':_0x572194[_0x5dfde6(0x6b)],'running':_0x572194[_0x5dfde6(0x74)](),'configured':_0x572194[_0x5dfde6(0x7f)]()}));}}export const botManager=new BotManager();function a22_0x82e6(){const _0x382945=['443272PxFJwz','21AGHuCJ','381yXmrQu','Telegram','Failed\x20to\x20start\x20','10mihizj','forEach','Discord','isConfigured','73016BjNaiE','5HPYJkt','push','getStatus','\x0a[Bot\x20Manager]\x20Starting\x20background\x20services...','123381aQbzkT','1201321iXYxCS','176MILRmE','length','all','431892gQpxmh','filter','name','dim','390300WtlShO','Email','services','12DjgKdU','startBot','startAllConfigured','map','isRunning','stopBot','isBotRunning'];a22_0x82e6=function(){return _0x382945;};return a22_0x82e6();}
1
+ const a22_0x3c8508=a22_0x531d;(function(_0x41f2a8,_0x6ef851){const _0x4082e0=a22_0x531d,_0x5a47cd=_0x41f2a8();while(!![]){try{const _0x953273=-parseInt(_0x4082e0(0x190))/0x1*(parseInt(_0x4082e0(0x18d))/0x2)+-parseInt(_0x4082e0(0x198))/0x3+-parseInt(_0x4082e0(0x182))/0x4*(-parseInt(_0x4082e0(0x18b))/0x5)+-parseInt(_0x4082e0(0x197))/0x6+parseInt(_0x4082e0(0x192))/0x7*(-parseInt(_0x4082e0(0x195))/0x8)+-parseInt(_0x4082e0(0x19a))/0x9+-parseInt(_0x4082e0(0x191))/0xa*(-parseInt(_0x4082e0(0x199))/0xb);if(_0x953273===_0x6ef851)break;else _0x5a47cd['push'](_0x5a47cd['shift']());}catch(_0x1f78ae){_0x5a47cd['push'](_0x5a47cd['shift']());}}}(a22_0x2d47,0x4c0e9));function a22_0x531d(_0x43ea2a,_0x1cfa6b){_0x43ea2a=_0x43ea2a-0x17f;const _0x2d470d=a22_0x2d47();let _0x531d50=_0x2d470d[_0x43ea2a];return _0x531d50;}import*as a22_0x4c2dd4 from'../telegram/index.js';import*as a22_0x123ec6 from'../discord/index.js';function a22_0x2d47(){const _0x1da81c=['isRunning','75XcUQyQ','isBotRunning','10XVKwGC','stop','all','6423NcrrfK','9775390VPVRli','28UeNdvx','\x0a[Bot\x20Manager]\x20Starting\x20background\x20services...','startBot','850856aqRJhu','start','909426npSsgF','902859avISRM','11DdPREp','946152GjpwoQ','map','services','push','startAllConfigured','length','Telegram','stopBot','getStatus','93116EKcRBD','isConfigured','[Bot\x20Manager]\x20','Email','Failed\x20to\x20start\x20','name','forEach','success'];a22_0x2d47=function(){return _0x1da81c;};return a22_0x2d47();}import*as a22_0x3bc7d4 from'../email/index.js';import*as a22_0x2365f1 from'../ui/output.js';class BotManager{['services']=[];constructor(){const _0x24fac0=a22_0x531d;this[_0x24fac0(0x19c)][_0x24fac0(0x19d)]({'name':_0x24fac0(0x17f),'start':a22_0x4c2dd4[_0x24fac0(0x194)],'stop':a22_0x4c2dd4['stopBot'],'isRunning':a22_0x4c2dd4[_0x24fac0(0x18c)],'isConfigured':a22_0x4c2dd4[_0x24fac0(0x183)]}),this[_0x24fac0(0x19c)][_0x24fac0(0x19d)]({'name':'Discord','start':a22_0x123ec6[_0x24fac0(0x194)],'stop':a22_0x123ec6[_0x24fac0(0x180)],'isRunning':a22_0x123ec6[_0x24fac0(0x18c)],'isConfigured':a22_0x123ec6[_0x24fac0(0x183)]}),this[_0x24fac0(0x19c)][_0x24fac0(0x19d)]({'name':_0x24fac0(0x185),'start':a22_0x3bc7d4[_0x24fac0(0x194)],'stop':a22_0x3bc7d4['stopBot'],'isRunning':a22_0x3bc7d4[_0x24fac0(0x18c)],'isConfigured':a22_0x3bc7d4[_0x24fac0(0x183)]});}async[a22_0x3c8508(0x19e)](){const _0x273d5f=a22_0x3c8508,_0x271d14=this['services']['filter'](_0x12f512=>_0x12f512[_0x273d5f(0x183)]());if(_0x271d14[_0x273d5f(0x19f)]===0x0)return;a22_0x2365f1['dim'](_0x273d5f(0x193));const _0x47cab1=await Promise[_0x273d5f(0x18f)](_0x271d14[_0x273d5f(0x19b)](async _0x2a8b59=>{const _0x2f764d=_0x273d5f;try{if(_0x2a8b59[_0x2f764d(0x18a)]())return!![];const _0x5e9cd1=await _0x2a8b59[_0x2f764d(0x196)]();return _0x5e9cd1;}catch(_0x42e07d){return a22_0x2365f1['error'](_0x2f764d(0x186)+_0x2a8b59[_0x2f764d(0x187)]+':\x20'+_0x42e07d),![];}})),_0x39e6d5=_0x47cab1['filter'](_0x25921e=>_0x25921e)[_0x273d5f(0x19f)];_0x39e6d5>0x0&&a22_0x2365f1[_0x273d5f(0x189)](_0x273d5f(0x184)+_0x39e6d5+'/'+_0x271d14[_0x273d5f(0x19f)]+'\x20services\x20active\x20in\x20background');}['stopAll'](){const _0x14e874=a22_0x3c8508;this[_0x14e874(0x19c)][_0x14e874(0x188)](_0x5e432b=>{const _0x38fe47=_0x14e874;_0x5e432b[_0x38fe47(0x18a)]()&&_0x5e432b[_0x38fe47(0x18e)]();});}[a22_0x3c8508(0x181)](){const _0x119139=a22_0x3c8508;return this[_0x119139(0x19c)][_0x119139(0x19b)](_0x5e3935=>({'name':_0x5e3935[_0x119139(0x187)],'running':_0x5e3935[_0x119139(0x18a)](),'configured':_0x5e3935[_0x119139(0x183)]()}));}}export const botManager=new BotManager();
@@ -1 +1 @@
1
- (function(_0x4801eb,_0x7efb2e){const _0x5729c8=a23_0x3cd9,_0x15ffec=_0x4801eb();while(!![]){try{const _0x3702e4=-parseInt(_0x5729c8(0x106))/0x1*(parseInt(_0x5729c8(0x112))/0x2)+-parseInt(_0x5729c8(0x10e))/0x3*(parseInt(_0x5729c8(0x104))/0x4)+-parseInt(_0x5729c8(0x110))/0x5*(parseInt(_0x5729c8(0x111))/0x6)+parseInt(_0x5729c8(0x10b))/0x7*(-parseInt(_0x5729c8(0x101))/0x8)+parseInt(_0x5729c8(0xfe))/0x9*(parseInt(_0x5729c8(0x10f))/0xa)+parseInt(_0x5729c8(0x109))/0xb+parseInt(_0x5729c8(0x100))/0xc;if(_0x3702e4===_0x7efb2e)break;else _0x15ffec['push'](_0x15ffec['shift']());}catch(_0x6b458e){_0x15ffec['push'](_0x15ffec['shift']());}}}(a23_0x2048,0xf4235));function a23_0x2048(){const _0x475645=['Task\x20Complete\x0a\x0a','map','5501949ZDYrTk','110qukBib','28105SrXtkj','798Txozhq','4MWtCZx','send','length','type','join','122841WwfxGR','sendMessage','49071636OVMbHF','8TSoHYy','api','\x0a\x0aActions:\x0a','4pyFSTr','cache','574691frZYaO','size','filter','13621036zBRQeb','channels','5227397DtjROh'];a23_0x2048=function(){return _0x475645;};return a23_0x2048();}const targets=[];let telegramBot=null,discordClient=null,telegramChatIds=[];export function registerTelegramBot(_0x12fc41,_0x4d4e16){telegramBot=_0x12fc41,telegramChatIds=_0x4d4e16;}export function registerDiscordClient(_0x40a014){discordClient=_0x40a014;}export async function notifyTaskComplete(_0x46b14d,_0xa5b08){const _0x303421=a23_0x3cd9,_0xd4cf49=_0x303421(0x10c)+_0x46b14d+_0x303421(0x103)+_0xa5b08[_0x303421(0x10d)](_0x375632=>'-\x20'+_0x375632)[_0x303421(0xfd)]('\x0a');if(telegramBot&&telegramChatIds[_0x303421(0xfb)]>0x0)for(const _0x4933f8 of telegramChatIds){try{await telegramBot[_0x303421(0x102)][_0x303421(0xff)](_0x4933f8,_0xd4cf49);}catch{}}if(discordClient)try{const _0x36bfb5=discordClient[_0x303421(0x10a)]?.[_0x303421(0x105)]?.[_0x303421(0x108)](_0x254ea3=>_0x254ea3[_0x303421(0xfc)]===0x1);if(_0x36bfb5?.[_0x303421(0x107)]>0x0){const _0x8f8aed=_0x36bfb5['first']();await _0x8f8aed?.[_0x303421(0xfa)](_0xd4cf49);}}catch{}}function a23_0x3cd9(_0x280866,_0x5bc19b){_0x280866=_0x280866-0xfa;const _0x2048a7=a23_0x2048();let _0x3cd931=_0x2048a7[_0x280866];return _0x3cd931;}export async function notifyMessage(_0x38d6d6){const _0xc892ea=a23_0x3cd9;if(telegramBot&&telegramChatIds['length']>0x0)for(const _0x4230ff of telegramChatIds){try{await telegramBot[_0xc892ea(0x102)][_0xc892ea(0xff)](_0x4230ff,_0x38d6d6);}catch{}}}
1
+ (function(_0xb11981,_0x303403){const _0x2261c1=a23_0x2434,_0x51279b=_0xb11981();while(!![]){try{const _0x3f5950=parseInt(_0x2261c1(0x195))/0x1*(parseInt(_0x2261c1(0x197))/0x2)+-parseInt(_0x2261c1(0x18b))/0x3+parseInt(_0x2261c1(0x193))/0x4+-parseInt(_0x2261c1(0x18c))/0x5*(parseInt(_0x2261c1(0x186))/0x6)+parseInt(_0x2261c1(0x18a))/0x7+-parseInt(_0x2261c1(0x192))/0x8+parseInt(_0x2261c1(0x18f))/0x9;if(_0x3f5950===_0x303403)break;else _0x51279b['push'](_0x51279b['shift']());}catch(_0x112c01){_0x51279b['push'](_0x51279b['shift']());}}}(a23_0x3f81,0xc2563));const targets=[];let telegramBot=null,discordClient=null,telegramChatIds=[];function a23_0x2434(_0xd17799,_0x59d745){_0xd17799=_0xd17799-0x186;const _0x3f81da=a23_0x3f81();let _0x2434ac=_0x3f81da[_0xd17799];return _0x2434ac;}export function registerTelegramBot(_0xeafe2d,_0x1a024e){telegramBot=_0xeafe2d,telegramChatIds=_0x1a024e;}export function registerDiscordClient(_0xb0bcd6){discordClient=_0xb0bcd6;}export async function notifyTaskComplete(_0x529643,_0x5dd408){const _0x551b96=a23_0x2434,_0x2c14cd=_0x551b96(0x19b)+_0x529643+_0x551b96(0x198)+_0x5dd408[_0x551b96(0x191)](_0x72c2a5=>'-\x20'+_0x72c2a5)[_0x551b96(0x196)]('\x0a');if(telegramBot&&telegramChatIds[_0x551b96(0x199)]>0x0)for(const _0x36fef4 of telegramChatIds){try{await telegramBot['api'][_0x551b96(0x190)](_0x36fef4,_0x2c14cd);}catch{}}if(discordClient)try{const _0xd8e921=discordClient[_0x551b96(0x18d)]?.[_0x551b96(0x189)]?.[_0x551b96(0x187)](_0x10cdb6=>_0x10cdb6[_0x551b96(0x18e)]===0x1);if(_0xd8e921?.[_0x551b96(0x19a)]>0x0){const _0x38f498=_0xd8e921['first']();await _0x38f498?.[_0x551b96(0x194)](_0x2c14cd);}}catch{}}export async function notifyMessage(_0x34eb34){const _0x112992=a23_0x2434;if(telegramBot&&telegramChatIds[_0x112992(0x199)]>0x0)for(const _0x4806e0 of telegramChatIds){try{await telegramBot[_0x112992(0x188)][_0x112992(0x190)](_0x4806e0,_0x34eb34);}catch{}}}function a23_0x3f81(){const _0x5fff43=['filter','api','cache','8187774mBIoLE','4352478JNIeRm','1405JxnoDG','channels','type','6222555ebIyEI','sendMessage','map','693432wKyCKt','1778416sGVogt','send','2mJNwvB','join','262462kMrrTr','\x0a\x0aActions:\x0a','length','size','Task\x20Complete\x0a\x0a','5010LUcPaD'];a23_0x3f81=function(){return _0x5fff43;};return a23_0x3f81();}
@@ -1 +1 @@
1
- (function(_0x316fb2,_0x160fa9){const _0x541b90=a24_0x5ae7,_0x5bcf6c=_0x316fb2();while(!![]){try{const _0x2765f7=parseInt(_0x541b90(0x1c6))/0x1+parseInt(_0x541b90(0x1b9))/0x2*(-parseInt(_0x541b90(0x1c8))/0x3)+parseInt(_0x541b90(0x1bd))/0x4+parseInt(_0x541b90(0x1c2))/0x5+parseInt(_0x541b90(0x1ca))/0x6*(-parseInt(_0x541b90(0x1bb))/0x7)+parseInt(_0x541b90(0x1c4))/0x8+-parseInt(_0x541b90(0x1c5))/0x9*(-parseInt(_0x541b90(0x1c3))/0xa);if(_0x2765f7===_0x160fa9)break;else _0x5bcf6c['push'](_0x5bcf6c['shift']());}catch(_0x3fc973){_0x5bcf6c['push'](_0x5bcf6c['shift']());}}}(a24_0x380f,0x2b219));import{GoogleGenerativeAI}from'@google/generative-ai';import{promises as a24_0x151484}from'fs';import*as a24_0x5149d0 from'../ui/output.js';import a24_0x2530c6 from'conf';const config=new a24_0x2530c6({'projectName':'woozlit-cli-voice'});function a24_0x5ae7(_0x669832,_0x2e236c){_0x669832=_0x669832-0x1b5;const _0x380f6c=a24_0x380f();let _0x5ae79b=_0x380f6c[_0x669832];return _0x5ae79b;}export function setGeminiKey(_0x2fa277){const _0x3ae98d=a24_0x5ae7;config[_0x3ae98d(0x1c7)](_0x3ae98d(0x1b8),_0x2fa277);}function a24_0x380f(){const _0x451b85=['get','message','response','gemini-2.0-flash-exp','error','geminiKey','768zGKQtT','readFile','14eleXBp','getGenerativeModel','389736URsGlW','audio/ogg','Gemini\x20API\x20Key\x20not\x20configured.\x20Run\x20\x27/voice\x20setup\x27\x20first.','text','Voice\x20processing\x20failed:\x20','170600dYJOoZ','2226710ASukpV','364064Rvppww','9mcZRdF','38294mqebLq','set','1920rlYRHp','Listen\x20to\x20this\x20audio\x20and\x20respond\x20helpfully.\x20If\x20it\x27s\x20a\x20command,\x20execute\x20it\x20or\x20say\x20you\x20can\x27t.','46806WkkxHx'];a24_0x380f=function(){return _0x451b85;};return a24_0x380f();}export function getGeminiKey(){const _0x10c123=a24_0x5ae7;return config[_0x10c123(0x1cb)](_0x10c123(0x1b8))||'';}export async function processVoiceMessage(_0x3cc8fe){const _0x538e86=a24_0x5ae7,_0x2e905a=getGeminiKey();if(!_0x2e905a)throw new Error(_0x538e86(0x1bf));const _0x4a9aed=new GoogleGenerativeAI(_0x2e905a),_0x55bf78=_0x4a9aed[_0x538e86(0x1bc)]({'model':_0x538e86(0x1b6)});try{const _0x1ad1c2=await a24_0x151484[_0x538e86(0x1ba)](_0x3cc8fe),_0x2ca948=_0x1ad1c2['toString']('base64'),_0x274709=_0x538e86(0x1be),_0x1c1b9d=await _0x55bf78['generateContent']([_0x538e86(0x1c9),{'inlineData':{'mimeType':_0x274709,'data':_0x2ca948}}]),_0xd91261=_0x1c1b9d[_0x538e86(0x1b5)][_0x538e86(0x1c0)]();return{'text':_0xd91261};}catch(_0x491eb2){a24_0x5149d0[_0x538e86(0x1b7)](_0x538e86(0x1c1)+_0x491eb2[_0x538e86(0x1cc)]);throw _0x491eb2;}}
1
+ (function(_0x505792,_0x2755e4){const _0x4962dd=a24_0x317e,_0xb73f26=_0x505792();while(!![]){try{const _0x49aa1c=-parseInt(_0x4962dd(0x1aa))/0x1+-parseInt(_0x4962dd(0x1a4))/0x2+-parseInt(_0x4962dd(0x1ab))/0x3*(parseInt(_0x4962dd(0x1a3))/0x4)+-parseInt(_0x4962dd(0x19b))/0x5+-parseInt(_0x4962dd(0x1a6))/0x6*(-parseInt(_0x4962dd(0x1a1))/0x7)+parseInt(_0x4962dd(0x19d))/0x8*(parseInt(_0x4962dd(0x19f))/0x9)+parseInt(_0x4962dd(0x19c))/0xa;if(_0x49aa1c===_0x2755e4)break;else _0xb73f26['push'](_0xb73f26['shift']());}catch(_0x54f0c8){_0xb73f26['push'](_0xb73f26['shift']());}}}(a24_0x38fe,0x5406d));import{GoogleGenerativeAI}from'@google/generative-ai';import{promises as a24_0x1d954d}from'fs';function a24_0x38fe(){const _0x1f229d=['812bdQSGq','get','4lSzgQe','1165054dMikdT','Gemini\x20API\x20Key\x20not\x20configured.\x20Run\x20\x27/voice\x20setup\x27\x20first.','3756SDBKSH','toString','set','error','324951ByCxbH','1631481GDqfUx','audio/ogg','text','readFile','base64','1206090FidQxF','17677380hpFzby','16hqABvl','Voice\x20processing\x20failed:\x20','883539vyngld','Listen\x20to\x20this\x20audio\x20and\x20respond\x20helpfully.\x20If\x20it\x27s\x20a\x20command,\x20execute\x20it\x20or\x20say\x20you\x20can\x27t.'];a24_0x38fe=function(){return _0x1f229d;};return a24_0x38fe();}import*as a24_0x393ca3 from'../ui/output.js';import a24_0x48a914 from'conf';const config=new a24_0x48a914({'projectName':'woozlit-cli-voice'});function a24_0x317e(_0x34167c,_0x4e15ba){_0x34167c=_0x34167c-0x19a;const _0x38fea2=a24_0x38fe();let _0x317ea7=_0x38fea2[_0x34167c];return _0x317ea7;}export function setGeminiKey(_0xacf00b){const _0x2f1979=a24_0x317e;config[_0x2f1979(0x1a8)]('geminiKey',_0xacf00b);}export function getGeminiKey(){const _0x1cb057=a24_0x317e;return config[_0x1cb057(0x1a2)]('geminiKey')||'';}export async function processVoiceMessage(_0x32beac){const _0x659b1c=a24_0x317e,_0x316381=getGeminiKey();if(!_0x316381)throw new Error(_0x659b1c(0x1a5));const _0x1f3804=new GoogleGenerativeAI(_0x316381),_0x45e964=_0x1f3804['getGenerativeModel']({'model':'gemini-2.0-flash-exp'});try{const _0x7ab0c0=await a24_0x1d954d[_0x659b1c(0x1ae)](_0x32beac),_0x28c64d=_0x7ab0c0[_0x659b1c(0x1a7)](_0x659b1c(0x19a)),_0x1766f4=_0x659b1c(0x1ac),_0x4fc51a=await _0x45e964['generateContent']([_0x659b1c(0x1a0),{'inlineData':{'mimeType':_0x1766f4,'data':_0x28c64d}}]),_0x59cd9f=_0x4fc51a['response'][_0x659b1c(0x1ad)]();return{'text':_0x59cd9f};}catch(_0x3738d0){a24_0x393ca3[_0x659b1c(0x1a9)](_0x659b1c(0x19e)+_0x3738d0['message']);throw _0x3738d0;}}
@@ -1 +1 @@
1
- const a25_0x1de38d=a25_0x449b;(function(_0x55a7b9,_0x490047){const _0x40c3e9=a25_0x449b,_0x1ca5ed=_0x55a7b9();while(!![]){try{const _0x413b42=parseInt(_0x40c3e9(0x241))/0x1*(parseInt(_0x40c3e9(0x233))/0x2)+parseInt(_0x40c3e9(0x228))/0x3*(-parseInt(_0x40c3e9(0x1d8))/0x4)+-parseInt(_0x40c3e9(0x24a))/0x5+-parseInt(_0x40c3e9(0x202))/0x6*(-parseInt(_0x40c3e9(0x264))/0x7)+-parseInt(_0x40c3e9(0x267))/0x8+parseInt(_0x40c3e9(0x192))/0x9+parseInt(_0x40c3e9(0x170))/0xa;if(_0x413b42===_0x490047)break;else _0x1ca5ed['push'](_0x1ca5ed['shift']());}catch(_0xbb7f48){_0x1ca5ed['push'](_0x1ca5ed['shift']());}}}(a25_0x26c9,0x99b03));import{Bot,InputFile}from'grammy';import{promises as a25_0x32bb31}from'fs';import{tmpdir}from'os';import{join,resolve,basename}from'path';import*as a25_0x161d0b from'./config.js';import{checkReminders,scheduleReminder}from'./reminders.js';function a25_0x26c9(){const _0xf3d3e6=['getBotToken','sendChatAction','~2-3\x20min','pid','body','env','[Telegram]\x20Starting\x20tool\x20','length','push','No\x20output','actionSummary',':\x0a\x0a','search_directory','.\x20Try\x20again\x20or\x20skip.','-\x20Request:\x20\x22','branch','Bot\x20start\x20failed:\x20','mkdir','command','sendMessage','api','../tools/file.js','send_input','entries','file_path','directory','powershell_run','toFixed','history.json','sendDocument','readFile','\x0a\x0aRECENT\x20TASK\x20HISTORY\x20(Use\x20this\x20context):\x0a','13017TZFpVw','then','npm\x20install','url','delete_file','reply','Telegram\x20bot\x20started!','clipboard_write','\x0a\x0aCommands:\x0a/newchat\x20-\x20New\x20session\x0a/clear\x20-\x20Reset\x20history\x0a/status\x20-\x20System\x20info\x0a/screen\x20-\x20Screenshot\x0a/run\x20<cmd>\x20-\x20Execute\x20command\x0a/files\x20[path]\x20-\x20Browse\x20files\x0a/project\x20-\x20Project\x20overview\x0a/cd\x20<path>\x20-\x20Change\x20directory\x0a/kill\x20-\x20Stop\x20process','git_add','download_file','292022VDLPmM','copy_file','\x20(Voice):\x20','/screenshot','resize','/project','get','HOME','Taking\x20screenshot...','Failed\x20to\x20send\x20file:\x20','Failed:\x20','editMessageText','search','package.json','2drZAKh','fetch_url','unknown','search_file','clear','deleteWebhook','fromBranch','rename_file','tree','5679655FUfpGt','document','typing','\x0aProject:\x20','Executing\x20','title','edit_file','depth','assistant','getScreenSize','/clear','run_command','content','list_directory','Browser\x20Screenshot','PIN\x20required','args','~2s','path','data','start','unlink','image','browser_fill','extensions','[Voice\x20Message]:\x20','112SqDTmP','slice','read_terminal','4839752bWuZNj','delayMinutes','[D]','selector','17953910tXArQU','voice_','../browser/index.js','output','files','upload_photo','\x0aTree:\x0a','replyWithChatAction','branchName','stringify','archive.zip','now','stderr','toLowerCase','text','upload_','/cd\x20','create_file','~1s','size','PARSED\x20TOOL:\x20','create-vite','Screenshot\x20failed:\x20','/newchat','...','owner','stop','getBuffer','[Telegram]\x20','patches','clipboard_read','~1-2\x20min','.jpeg','/kill','2372445rBGytW','toolSuccess','Editing\x20file:\x20','Desktop','\x20->\x20','Telegram\x20startup\x20error:\x20','width','Sorry,\x20I\x20couldn\x27t\x20understand\x20that\x20audio.','input','arrayBuffer','isAllowedChatId','cwd','open_in_editor','repo','write_json','version','No\x20Telegram\x20bot\x20token.\x20Run\x20/telegram\x20setup\x20first.','capture','Unknown\x20tool:\x20','\x22\x0a\x20\x20Actions:\x20','git_branch','github_read_file','dim','file_info','info','.woozlit','\x0a\x0aTask\x20Summary:\x0a','name','join','Done\x20in\x20','[F]','TOOL\x20JSON:\x20','file_id','terminate','npm\x20init','browser_close','\x20User\x20says:\x20','split','unzip_files','/run\x20','Tool\x20error:\x20','height','pattern','success','addAllowedChatId','utf-8','Invalid\x20bot\x20token.','message','replace_in_files','401','system','sendPhoto','read_file_lines','browser_screenshot','getAllowedChatIds','type','user','screenshot_','Creating\x20file:\x20','delete','startsWith','set_env','filter','stdout','browser_open','github_create_pr','Dir:\x20','has','Voice\x20processing\x20error:\x20','Exit:\x20','836aeNFvu','git\x20clone','../github/api.js','message:text','git_commit','substring','[Telegram]\x20Tool\x20error:\x20','git_log','bitmap','voice','catch','robotjs\x20not\x20available\x20to\x20capture\x20photo','pids','message\x20is\x20not\x20modified','file_name','\x20bytes)\x20saved\x20to\x20','shift','count','read_file','[Telegram]\x20File\x20received:\x20','match','schedule_reminder','create-next-app','trim','getFile','Error','add','first_name','error','set','replace','writeFile','File\x20save\x20failed:\x20','https://api.telegram.org/file/bot','Telegram\x20bot\x20already\x20running.','from','chat','replyWithPhoto','includes','parse','Tool\x20result\x20for\x20','build','347340SxEFxd','Usage:\x20/run\x20<command>','map','read_json','\x0aModel:\x20','values'];a25_0x26c9=function(){return _0xf3d3e6;};return a25_0x26c9();}import{sendChatMessage}from'../utils/api.js';import{getSelectedModel}from'../utils/storage.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,readTerminalOutput,sendTerminalInput,terminateProcess,deleteFile,renameFile,copyFile,fileInfo,readFileLines}from'../tools/index.js';import{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'../tools/git.js';import{fetchUrl,downloadFile as a25_0x4faced}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{registerTelegramBot}from'../services/notifications.js';import{processVoiceMessage}from'../services/voice-agent.js';import*as a25_0xbdcdf2 from'../ui/output.js';import{createRequire}from'module';import{Jimp}from'jimp';function a25_0x449b(_0x5df491,_0x1b9703){_0x5df491=_0x5df491-0x170;const _0x26c914=a25_0x26c9();let _0x449bb6=_0x26c914[_0x5df491];return _0x449bb6;}const require=createRequire(import.meta.url);let bot=null,isRunning=![];const verifiedSessions=new Set(),statusMessages=new Map(),chatHistories=new Map(),WOOZLIT_DIR=join(process[a25_0x1de38d(0x20d)]['USERPROFILE']||process['env'][a25_0x1de38d(0x23a)]||'.',a25_0x1de38d(0x1ab)),HISTORY_FILE=join(WOOZLIT_DIR,a25_0x1de38d(0x224));async function ensureWoozlitDir(){const _0x35abf1=a25_0x1de38d;try{await a25_0x32bb31[_0x35abf1(0x219)](WOOZLIT_DIR,{'recursive':!![]});}catch{}}async function getTaskHistory(){const _0x4645ff=a25_0x1de38d;try{const _0x1b8693=await a25_0x32bb31[_0x4645ff(0x226)](HISTORY_FILE,_0x4645ff(0x1bf));return JSON['parse'](_0x1b8693);}catch{return[];}}async function saveTaskHistory(_0x193081,_0xd8a256){const _0x556603=a25_0x1de38d;await ensureWoozlitDir();const _0x22987a=await getTaskHistory();_0x22987a['push']({'timestamp':Date[_0x556603(0x17b)](),'request':_0x193081,'actionSummary':_0xd8a256});if(_0x22987a[_0x556603(0x20f)]>0x14)_0x22987a[_0x556603(0x1e8)]();await a25_0x32bb31[_0x556603(0x1f7)](HISTORY_FILE,JSON['stringify'](_0x22987a,null,0x2));}function formatHistoryForPrompt(_0xf3ebed){const _0x3f5f8d=a25_0x1de38d;if(_0xf3ebed[_0x3f5f8d(0x20f)]===0x0)return'';return _0x3f5f8d(0x227)+_0xf3ebed[_0x3f5f8d(0x265)](-0x5)['map'](_0x20322=>_0x3f5f8d(0x216)+_0x20322['request']+_0x3f5f8d(0x1a5)+_0x20322[_0x3f5f8d(0x212)][_0x3f5f8d(0x1ae)](',\x20'))[_0x3f5f8d(0x1ae)]('\x0a');}function getSystemPrompt(_0x518279){return'You\x20are\x20Woozlit\x20AI.\x20Complete\x20tasks\x20autonomously.\x0a\x0aCRITICAL\x20RULES:\x0a1.\x20**EXECUTE\x20IMMEDIATELY**:\x20When\x20user\x20requests\x20an\x20action,\x20execute\x20the\x20tool\x20FIRST,\x20explain\x20NEVER.\x0a2.\x20**NO\x20EMOJIS**:\x20Never\x20use\x20emojis\x20in\x20any\x20response.\x0a3.\x20**NO\x20CONVERSATIONAL\x20ERRORS**:\x20If\x20a\x20browser\x20command\x20cannot\x20be\x20executed,\x20just\x20execute\x20it\x20anyway.\x20Never\x20explain\x20limitations.\x0a4.\x20**CONCISE**:\x20Maximum\x201-2\x20sentences\x20for\x20final\x20responses.\x20No\x20filler.\x0a5.\x20**TOOL\x20FORMAT**:\x20Use\x20THREE\x20backticks\x20(```)\x20NOT\x20asterisks\x20(***)\x20for\x20tool\x20blocks.\x0a\x0aTOOLS:\x0a-\x20run_command:\x20{command,\x20wait\x20(ms,\x20default\x2030000),\x20background\x20(bool)}\x0a-\x20read_terminal:\x20{}\x20-\x20check\x20running\x20process\x20output\x0a-\x20send_input:\x20{input}\x20-\x20answer\x20prompts\x0a-\x20terminate:\x20{}\x20-\x20kill\x20stuck\x20process\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-\x20screenshot:\x20{}\x20-\x20capture\x20desktop\x0a-\x20send_file:\x20{path}\x20-\x20send\x20a\x20file\x20to\x20the\x20user\x20via\x20Telegram\x0a-\x20schedule_reminder:\x20{delayMinutes:\x20number,\x20message:\x20string}\x0a-\x20git_status:\x20{}\x0a-\x20git_diff:\x20{path?}\x0a-\x20git_log:\x20{count?}\x0a-\x20git_add:\x20{path}\x0a-\x20git_commit:\x20{message}\x0a-\x20git_branch:\x20{}\x0a-\x20fetch_url:\x20{url}\x0a-\x20download_file:\x20{url,\x20path}\x0a-\x20get_env:\x20{name}\x0a-\x20set_env:\x20{name,\x20value}\x0a-\x20get_system_info:\x20{}\x0a-\x20clipboard_read:\x20{}\x0a-\x20clipboard_write:\x20{text}\x0a-\x20tree:\x20{path?,\x20depth?}\x0a-\x20grep_recursive:\x20{path?,\x20pattern,\x20extensions?}\x0a-\x20replace_in_files:\x20{path?,\x20search,\x20replace,\x20extensions?}\x0a-\x20powershell_run:\x20{script}\x0a-\x20zip_files:\x20{files,\x20output}\x0a-\x20unzip_files:\x20{path,\x20output}\x0a-\x20write_json:\x20{path,\x20data}\x0a-\x20read_json:\x20{path}\x0a-\x20patch_file:\x20{path,\x20patches:\x20[{search,\x20replace}]}\x0a-\x20open_in_editor:\x20{path}\x0a-\x20github_read_file:\x20{owner,\x20repo,\x20path,\x20branch}\x0a-\x20github_create_branch:\x20{owner,\x20repo,\x20branchName,\x20fromBranch}\x0a-\x20github_create_pr:\x20{owner,\x20repo,\x20title,\x20head,\x20base,\x20body}\x0a-\x20browser_open:\x20{url}\x0a-\x20browser_click:\x20{selector}\x0a-\x20browser_fill:\x20{selector,\x20value}\x0a-\x20browser_screenshot:\x20{}\x0a-\x20browser_snapshot:\x20{}\x0a\x0aBROWSER\x20COMMANDS\x20-\x20EXECUTE\x20IMMEDIATELY:\x0aWhen\x20user\x20says\x20\x22open\x20[site]\x22,\x20\x22go\x20to\x20[url]\x22,\x20\x22navigate\x20to\x20[url]\x22:\x0a```tool\x0a{\x22name\x22:\x22browser_open\x22,\x22args\x22:{\x22url\x22:\x22https://example.com\x22}}\x0a```\x0a\x0aDO\x20NOT\x20respond\x20with:\x0a-\x20\x22I\x20understand\x20you\x27d\x20like\x20me\x20to...\x22\x0a-\x20\x22I\x20need\x20the\x20extension\x20to\x20be\x20connected...\x22\x0a-\x20\x22Apologies\x20for\x20the\x20inconvenience\x22\x0a-\x20Any\x20explanation\x20about\x20what\x20you\x27re\x20about\x20to\x20do\x0a\x0aJUST\x20EXECUTE\x20THE\x20TOOL.\x0a\x0aEXAMPLE:\x0aUser:\x20\x22open\x20discord\x22\x0aYou:\x0a```tool\x0a{\x22name\x22:\x22browser_open\x22,\x22args\x22:{\x22url\x22:\x22https://discord.com\x22}}\x0a```'+_0x518279;}async function getOrCreateHistory(_0x4ade5d){const _0x53d85b=a25_0x1de38d;if(!chatHistories[_0x53d85b(0x1d5)](_0x4ade5d)){const _0x22747b='';chatHistories[_0x53d85b(0x1f5)](_0x4ade5d,[{'role':_0x53d85b(0x1c4),'content':getSystemPrompt(_0x22747b)}]);}return chatHistories['get'](_0x4ade5d);}async function updateStatus(_0x3f9cd0,_0x5ca718){const _0x15c468=a25_0x1de38d;if(!bot)return;const _0x48b932=statusMessages[_0x15c468(0x239)](_0x3f9cd0);if(_0x48b932)try{await bot[_0x15c468(0x21c)][_0x15c468(0x23e)](_0x3f9cd0,_0x48b932,_0x5ca718);return;}catch(_0x93663){if(_0x93663[_0x15c468(0x1c1)]&&_0x93663[_0x15c468(0x1c1)][_0x15c468(0x1fe)](_0x15c468(0x1e5)))return;statusMessages['delete'](_0x3f9cd0);}try{const _0x60fe3=await bot[_0x15c468(0x21c)][_0x15c468(0x21b)](_0x3f9cd0,_0x5ca718);statusMessages[_0x15c468(0x1f5)](_0x3f9cd0,_0x60fe3['message_id']);}catch(_0x3890f4){}}async function takeScreenshot(){const _0x1cae4b=a25_0x1de38d,_0x4b6b39=_0x1cae4b(0x1cb)+Date[_0x1cae4b(0x17b)]()+_0x1cae4b(0x190),_0x215c15=join(tmpdir(),_0x4b6b39);let _0x24b39e;try{_0x24b39e=require('@hurdlegroup/robotjs');const _0x2facf7=_0x24b39e[_0x1cae4b(0x253)](),_0x24500a=_0x24b39e['screen'][_0x1cae4b(0x1a3)](0x0,0x0,_0x2facf7[_0x1cae4b(0x198)],_0x2facf7[_0x1cae4b(0x1bb)]),_0x583170=new Jimp({'width':_0x24500a[_0x1cae4b(0x198)],'height':_0x24500a['height']});for(let _0xe082a9=0x0;_0xe082a9<_0x24500a[_0x1cae4b(0x260)][_0x1cae4b(0x20f)];_0xe082a9+=0x4){_0x583170['bitmap'][_0x1cae4b(0x25d)][_0xe082a9]=_0x24500a[_0x1cae4b(0x260)][_0xe082a9+0x2],_0x583170[_0x1cae4b(0x1e0)][_0x1cae4b(0x25d)][_0xe082a9+0x1]=_0x24500a[_0x1cae4b(0x260)][_0xe082a9+0x1],_0x583170['bitmap']['data'][_0xe082a9+0x2]=_0x24500a['image'][_0xe082a9],_0x583170[_0x1cae4b(0x1e0)]['data'][_0xe082a9+0x3]=_0x24500a[_0x1cae4b(0x260)][_0xe082a9+0x3];}_0x583170[_0x1cae4b(0x1e0)][_0x1cae4b(0x198)]>0x500&&_0x583170[_0x1cae4b(0x237)]({'w':0x500});const _0x141e1a=await _0x583170[_0x1cae4b(0x18b)]('image/jpeg');await a25_0x32bb31[_0x1cae4b(0x1f7)](_0x215c15,_0x141e1a);}catch(_0x168e61){throw new Error(_0x1cae4b(0x1e3));}return _0x215c15;}async function executeToolCall(_0x22d366,_0x30f630,_0x193592){const _0x3bb01f=a25_0x1de38d;switch(_0x22d366){case'screenshot':try{statusMessages[_0x3bb01f(0x1cd)](_0x193592);const _0x2d6c86=await takeScreenshot();return await bot?.['api'][_0x3bb01f(0x1c5)](_0x193592,new InputFile(_0x2d6c86),{'caption':_0x3bb01f(0x195)}),await a25_0x32bb31[_0x3bb01f(0x25f)](_0x2d6c86)[_0x3bb01f(0x1e2)](()=>{}),{'success':!![],'sent':!![]};}catch(_0x28e496){return{'error':_0x3bb01f(0x186)+_0x28e496};}case'read_terminal':return readTerminalOutput(_0x30f630[_0x3bb01f(0x20b)]);case _0x3bb01f(0x21e):return sendTerminalInput(_0x30f630[_0x3bb01f(0x19a)],_0x30f630[_0x3bb01f(0x20b)]);case _0x3bb01f(0x1b3):return terminateProcess(_0x30f630[_0x3bb01f(0x20b)]);case _0x3bb01f(0x181):return createFile(_0x30f630['path'],_0x30f630[_0x3bb01f(0x256)]);case _0x3bb01f(0x1ea):return readFile(_0x30f630['path']);case _0x3bb01f(0x257):return listDirectory(_0x30f630[_0x3bb01f(0x25c)]||'.');case _0x3bb01f(0x250):return editFile(_0x30f630[_0x3bb01f(0x25c)],_0x30f630['search'],_0x30f630[_0x3bb01f(0x1f6)]);case _0x3bb01f(0x244):return searchFile(_0x30f630['path'],_0x30f630['pattern']);case _0x3bb01f(0x255):const {command:_0x569550,background:_0x4c9377,wait:_0x236c24}=_0x30f630,_0x4ac0b2=await runCommand(_0x569550,undefined,_0x4c9377||![],_0x236c24||0x7530);return _0x4ac0b2;case _0x3bb01f(0x1ed):return scheduleReminder(_0x193592,_0x30f630[_0x3bb01f(0x268)],_0x30f630[_0x3bb01f(0x1c1)]);case _0x3bb01f(0x1a7):{const {readFile:_0x3d1d48}=await import(_0x3bb01f(0x1da));return _0x3d1d48(_0x30f630[_0x3bb01f(0x189)],_0x30f630[_0x3bb01f(0x19f)],_0x30f630[_0x3bb01f(0x25c)],_0x30f630[_0x3bb01f(0x217)]);}case'github_create_branch':{const {createBranch:_0x38f81c}=await import(_0x3bb01f(0x1da));return _0x38f81c(_0x30f630['owner'],_0x30f630[_0x3bb01f(0x19f)],_0x30f630[_0x3bb01f(0x178)],_0x30f630[_0x3bb01f(0x247)]);}case _0x3bb01f(0x1d3):{const {createPullRequest:_0xf9a6a1}=await import(_0x3bb01f(0x1da));return _0xf9a6a1(_0x30f630['owner'],_0x30f630[_0x3bb01f(0x19f)],_0x30f630[_0x3bb01f(0x24f)],_0x30f630['head'],_0x30f630['base'],_0x30f630[_0x3bb01f(0x20c)]);}case _0x3bb01f(0x1d2):{const {browserOpen:_0x114683,startBrowserServer:_0x2b23e9,isBrowserServerRunning:_0x28c47b}=await import(_0x3bb01f(0x172));return!_0x28c47b()&&await _0x2b23e9(),_0x114683(_0x30f630[_0x3bb01f(0x22b)]);}case'browser_click':{const {browserClick:_0x102774}=await import(_0x3bb01f(0x172));return _0x102774(_0x30f630[_0x3bb01f(0x26a)]);}case _0x3bb01f(0x261):{const {browserFill:_0x375671}=await import('../browser/index.js');return _0x375671(_0x30f630[_0x3bb01f(0x26a)],_0x30f630['value']);}case'browser_snapshot':{const {browserSnapshot:_0x482bf9}=await import(_0x3bb01f(0x172));return _0x482bf9();}case _0x3bb01f(0x1c7):{const {browserScreenshot:_0x43b29e}=await import(_0x3bb01f(0x172)),_0x2a1a91=await _0x43b29e();if(_0x2a1a91[_0x3bb01f(0x1bd)]&&_0x2a1a91['data']){const _0x1fd212=_0x2a1a91[_0x3bb01f(0x25d)][_0x3bb01f(0x1f6)](/^data:image\/\w+;base64,/,''),_0x3c09d4=Buffer[_0x3bb01f(0x1fb)](_0x1fd212,'base64');return statusMessages[_0x3bb01f(0x1cd)](_0x193592),await bot?.[_0x3bb01f(0x21c)]['sendPhoto'](_0x193592,new InputFile(_0x3c09d4),{'caption':_0x3bb01f(0x258)}),{'success':!![],'sent':!![]};}return _0x2a1a91;}case _0x3bb01f(0x1b5):{const {browserClose:_0x42cc0d}=await import(_0x3bb01f(0x172));return _0x42cc0d();}case'send_file':{try{const _0x124d9f=resolve(process[_0x3bb01f(0x19d)](),_0x30f630[_0x3bb01f(0x25c)]);return statusMessages[_0x3bb01f(0x1cd)](_0x193592),await bot?.[_0x3bb01f(0x21c)][_0x3bb01f(0x225)](_0x193592,new InputFile(_0x124d9f),{'caption':basename(_0x124d9f)}),{'success':!![],'sent':!![]};}catch(_0xa3a9e1){return{'error':_0x3bb01f(0x23c)+_0xa3a9e1};}}case _0x3bb01f(0x22c):return deleteFile(_0x30f630[_0x3bb01f(0x25c)]);case _0x3bb01f(0x248):return renameFile(_0x30f630[_0x3bb01f(0x1fb)]||_0x30f630[_0x3bb01f(0x25c)],_0x30f630['to']);case _0x3bb01f(0x234):return copyFile(_0x30f630[_0x3bb01f(0x1fb)]||_0x30f630[_0x3bb01f(0x25c)],_0x30f630['to']);case _0x3bb01f(0x1a9):return fileInfo(_0x30f630[_0x3bb01f(0x25c)]);case _0x3bb01f(0x1c6):return readFileLines(_0x30f630[_0x3bb01f(0x25c)],_0x30f630[_0x3bb01f(0x25e)]||0x1,_0x30f630['end']||0x32);case'find_files':{const {findFiles:_0x505cbf}=await import(_0x3bb01f(0x21d));return _0x505cbf(_0x30f630[_0x3bb01f(0x25c)]||'.',_0x30f630[_0x3bb01f(0x1bc)]);}case _0x3bb01f(0x214):{const {searchDirectory:_0x23d473}=await import(_0x3bb01f(0x21d));return _0x23d473(_0x30f630[_0x3bb01f(0x25c)]||'.',_0x30f630['pattern']);}case'git_status':return gitStatus();case'git_diff':return gitDiff(_0x30f630[_0x3bb01f(0x25c)]);case _0x3bb01f(0x1df):return gitLog(_0x30f630[_0x3bb01f(0x1e9)]||0xa);case _0x3bb01f(0x231):return gitAdd(_0x30f630['path']||'.');case _0x3bb01f(0x1dc):return gitCommit(_0x30f630[_0x3bb01f(0x1c1)]);case _0x3bb01f(0x1a6):return gitBranch();case _0x3bb01f(0x242):return fetchUrl(_0x30f630[_0x3bb01f(0x22b)]);case _0x3bb01f(0x232):return a25_0x4faced(_0x30f630['url'],_0x30f630[_0x3bb01f(0x25c)]);case'get_env':return getEnv(_0x30f630[_0x3bb01f(0x1ad)]);case _0x3bb01f(0x1cf):return setEnv(_0x30f630[_0x3bb01f(0x1ad)],_0x30f630['value']);case'get_system_info':return getSystemInfo();case _0x3bb01f(0x18e):return clipboardRead();case _0x3bb01f(0x22f):return clipboardWrite(_0x30f630[_0x3bb01f(0x17e)]);case _0x3bb01f(0x249):return tree(_0x30f630[_0x3bb01f(0x25c)]||'.',_0x30f630[_0x3bb01f(0x251)]||0x3);case'grep_recursive':return grepRecursive(_0x30f630[_0x3bb01f(0x25c)]||'.',_0x30f630[_0x3bb01f(0x1bc)],_0x30f630[_0x3bb01f(0x262)]);case _0x3bb01f(0x1c2):return replaceInFiles(_0x30f630['path']||'.',_0x30f630[_0x3bb01f(0x23f)],_0x30f630[_0x3bb01f(0x1f6)],_0x30f630[_0x3bb01f(0x262)]);case _0x3bb01f(0x222):return powershellRun(_0x30f630['script']||_0x30f630[_0x3bb01f(0x21a)]);case'zip_files':return zipFiles(_0x30f630[_0x3bb01f(0x174)]||[_0x30f630[_0x3bb01f(0x25c)]],_0x30f630[_0x3bb01f(0x173)]||_0x3bb01f(0x17a));case _0x3bb01f(0x1b8):return unzipFiles(_0x30f630['path'],_0x30f630['output']||'.');case _0x3bb01f(0x1a0):return writeJson(_0x30f630[_0x3bb01f(0x25c)],_0x30f630[_0x3bb01f(0x25d)]);case _0x3bb01f(0x205):return readJson(_0x30f630[_0x3bb01f(0x25c)]);case'patch_file':return patchFile(_0x30f630[_0x3bb01f(0x25c)],_0x30f630[_0x3bb01f(0x18d)]);case _0x3bb01f(0x19e):return openInEditor(_0x30f630[_0x3bb01f(0x25c)]);default:return{'error':_0x3bb01f(0x1a4)+_0x22d366};}}function estimateTime(_0x244c84,_0x3d549f){const _0x4129ee=a25_0x1de38d;if(_0x244c84==='screenshot')return _0x4129ee(0x25b);if(_0x244c84===_0x4129ee(0x266)||_0x244c84===_0x4129ee(0x21e)||_0x244c84==='terminate')return _0x4129ee(0x182);if(_0x244c84==='run_command'){const _0x548652=(_0x3d549f['command']||'')[_0x4129ee(0x17d)]();if(_0x548652[_0x4129ee(0x1fe)](_0x4129ee(0x1ee))||_0x548652['includes'](_0x4129ee(0x185)))return _0x4129ee(0x20a);if(_0x548652[_0x4129ee(0x1fe)](_0x4129ee(0x22a))||_0x548652[_0x4129ee(0x1fe)]('pnpm\x20install'))return _0x4129ee(0x18f);if(_0x548652['includes'](_0x4129ee(0x1b4))||_0x548652['includes']('pnpm\x20init'))return'~30s';if(_0x548652[_0x4129ee(0x1fe)](_0x4129ee(0x1d9)))return'~1\x20min';if(_0x548652[_0x4129ee(0x1fe)](_0x4129ee(0x201)))return _0x4129ee(0x18f);}return _0x4129ee(0x25b);}function getActionDescription(_0xfaf6bc,_0x24882c){const _0x3c097f=a25_0x1de38d;if(_0xfaf6bc===_0x3c097f(0x255)){let _0x3b1714=_0x24882c[_0x3c097f(0x21a)]||_0x3c097f(0x21a);if(_0x3b1714[_0x3c097f(0x20f)]>0x1e)_0x3b1714=_0x3b1714[_0x3c097f(0x1dd)](0x0,0x1b)+_0x3c097f(0x188);return'Running:\x20'+_0x3b1714;}if(_0xfaf6bc===_0x3c097f(0x181))return _0x3c097f(0x1cc)+_0x24882c[_0x3c097f(0x25c)];if(_0xfaf6bc===_0x3c097f(0x250))return _0x3c097f(0x194)+_0x24882c[_0x3c097f(0x25c)];if(_0xfaf6bc==='screenshot')return _0x3c097f(0x23b);return _0x3c097f(0x24e)+_0xfaf6bc+_0x3c097f(0x188);}async function processTelegramAgentLoop(_0x3e2049,_0x41db4a,_0x228b7e,_0x14dbf4){const _0x36fe57=a25_0x1de38d;let _0x1bf96b=0x0;const _0x57205b=0x14;let _0x502fd7=![];const _0x18d4a8=[];while(_0x1bf96b<_0x57205b){_0x1bf96b++;bot&&bot['api'][_0x36fe57(0x209)](_0x3e2049,'typing')[_0x36fe57(0x1e2)](()=>{});a25_0xbdcdf2[_0x36fe57(0x1a8)]('[Telegram]\x20Iteration\x20'+_0x1bf96b+_0x36fe57(0x188));let _0x5c9588='';try{const _0x17f5a4=await sendChatMessage(_0x228b7e,_0x41db4a,_0x31ba27=>{_0x5c9588+=_0x31ba27;});_0x5c9588=_0x17f5a4[_0x36fe57(0x256)];}catch(_0x1801f3){await bot?.[_0x36fe57(0x21c)][_0x36fe57(0x21b)](_0x3e2049,_0x36fe57(0x23d)+(_0x1801f3[_0x36fe57(0x1c1)]?.[_0x36fe57(0x1dd)](0x0,0x1e)||_0x36fe57(0x1f1)));return;}_0x41db4a[_0x36fe57(0x210)]({'role':_0x36fe57(0x252),'content':_0x5c9588});let _0x9e562=_0x5c9588[_0x36fe57(0x1ec)](/```tool\s*([\s\S]*?)```/);!_0x9e562&&(_0x9e562=_0x5c9588['match'](/\*\*\*tool\s*([\s\S]*?)\*\*\*/));!_0x9e562&&(_0x9e562=_0x5c9588[_0x36fe57(0x1ec)](/\`\`\`json\s*({[\s\S]*?"name"[\s\S]*?})\s*\`\`\`/));if(!_0x9e562){let _0x46ff5a=_0x5c9588['replace'](/\<reasoning\>[\s\S]*?\<\/reasoning\>/g,'')['replace'](/\<text\>|\<\/text\>/g,'')[_0x36fe57(0x1f6)](/```tool[\s\S]*?```/g,'')[_0x36fe57(0x1f6)](/\*\*\*tool[\s\S]*?\*\*\*/g,'')[_0x36fe57(0x1f6)](/```json\s*{\s*"tool"[\s\S]*?```/g,'')[_0x36fe57(0x1f6)](/```json\s*{\s*"command"[\s\S]*?```/g,'')[_0x36fe57(0x1f6)](/\*\*(.+?)\*\*/g,'$1')[_0x36fe57(0x1f6)](/\*(.+?)\*/g,'$1')[_0x36fe57(0x1f6)](/__(.+?)__/g,'$1')['replace'](/_(.+?)_/g,'$1')[_0x36fe57(0x1f6)](/#{1,6}\s*/g,'')[_0x36fe57(0x1f6)](/^[-*+]\s+/gm,'')[_0x36fe57(0x1f6)](/^\d+\.\s+/gm,'')[_0x36fe57(0x1f6)](/`([^`]+)`/g,'$1')['replace'](/\[([^\]]+)\]\([^)]+\)/g,'$1')['trim']();const _0x2d8b79=_0x46ff5a[_0x36fe57(0x1b7)]('\x0a')[_0x36fe57(0x1d0)](_0xfc5016=>_0xfc5016[_0x36fe57(0x1ef)]()&&_0xfc5016[_0x36fe57(0x1ef)]()['length']>0x1);if(_0x46ff5a[_0x36fe57(0x1ef)]()){if(_0x18d4a8[_0x36fe57(0x20f)]>0x0){await saveTaskHistory(_0x14dbf4,_0x18d4a8);const _0x14800a=_0x36fe57(0x1ac)+_0x18d4a8['map'](_0x877f38=>'-\x20'+_0x877f38)[_0x36fe57(0x1ae)]('\x0a');await bot?.[_0x36fe57(0x21c)][_0x36fe57(0x21b)](_0x3e2049,_0x46ff5a+_0x14800a)['catch'](()=>{});}else await bot?.[_0x36fe57(0x21c)][_0x36fe57(0x21b)](_0x3e2049,_0x46ff5a)[_0x36fe57(0x1e2)](()=>{});}break;}try{const _0x32dca7=_0x9e562[0x1][_0x36fe57(0x1ef)]();a25_0xbdcdf2[_0x36fe57(0x1a8)](_0x36fe57(0x1b1)+_0x32dca7);const _0x2ca96a=JSON[_0x36fe57(0x1ff)](_0x32dca7);a25_0xbdcdf2[_0x36fe57(0x1a8)](_0x36fe57(0x184)+JSON[_0x36fe57(0x179)](_0x2ca96a));const _0x2479a9=estimateTime(_0x2ca96a[_0x36fe57(0x1ad)],_0x2ca96a[_0x36fe57(0x25a)]),_0x1b9556=getActionDescription(_0x2ca96a[_0x36fe57(0x1ad)],_0x2ca96a[_0x36fe57(0x25a)]);_0x18d4a8[_0x36fe57(0x210)](_0x1b9556[_0x36fe57(0x1f6)](/\(\~.*\)/,'')['trim']()),await updateStatus(_0x3e2049,_0x1b9556+'\x20('+_0x2479a9+')'),_0x502fd7=!![],a25_0xbdcdf2[_0x36fe57(0x1aa)](_0x36fe57(0x20e)+_0x2ca96a[_0x36fe57(0x1ad)]);const _0x1b0026=performance['now'](),_0x77882f=await executeToolCall(_0x2ca96a[_0x36fe57(0x1ad)],_0x2ca96a[_0x36fe57(0x25a)],_0x3e2049),_0x2d47b8=((performance[_0x36fe57(0x17b)]()-_0x1b0026)/0x3e8)[_0x36fe57(0x223)](0x1);a25_0xbdcdf2[_0x36fe57(0x193)](_0x2ca96a[_0x36fe57(0x1ad)],Object[_0x36fe57(0x207)](_0x2ca96a[_0x36fe57(0x25a)])[0x0]||'',_0x36fe57(0x1af)+_0x2d47b8+'s'),_0x41db4a[_0x36fe57(0x210)]({'role':_0x36fe57(0x1ca),'content':_0x36fe57(0x200)+_0x2ca96a[_0x36fe57(0x1ad)]+':\x0a'+JSON[_0x36fe57(0x179)](_0x77882f,null,0x2)}),await new Promise(_0x1c18d2=>setTimeout(_0x1c18d2,0xc8));}catch(_0x40bf3c){a25_0xbdcdf2[_0x36fe57(0x1f4)](_0x36fe57(0x1de)+_0x40bf3c),_0x41db4a['push']({'role':'user','content':_0x36fe57(0x1ba)+_0x40bf3c+_0x36fe57(0x215)});}}_0x1bf96b>=_0x57205b&&await bot?.[_0x36fe57(0x21c)][_0x36fe57(0x21b)](_0x3e2049,'Stopped\x20(max\x20steps)');}async function handleMessage(_0x13fb98){const _0x11b923=a25_0x1de38d,_0x57041f=_0x13fb98[_0x11b923(0x1c1)]?.['text']?.[_0x11b923(0x1ef)](),_0x33217a=_0x13fb98[_0x11b923(0x1fb)]?.['id'];if(!_0x57041f||!_0x33217a||!_0x13fb98[_0x11b923(0x1fc)]?.['id'])return;const _0x5d8713=_0x13fb98[_0x11b923(0x1fc)]['id'],_0x304534=_0x33217a;if(!a25_0x161d0b['isAllowedChatId'](_0x304534)){const _0x2c8605=a25_0x161d0b['getSecurityPin']();if(_0x2c8605&&!verifiedSessions[_0x11b923(0x1d5)](_0x304534)){if(_0x57041f===_0x2c8605){verifiedSessions[_0x11b923(0x1f2)](_0x304534),a25_0x161d0b[_0x11b923(0x1be)](_0x304534),await _0x13fb98[_0x11b923(0x22d)]('Verified');return;}await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x259));return;}!_0x2c8605&&a25_0x161d0b[_0x11b923(0x1be)](_0x304534);}if(_0x57041f==='/start'){await _0x13fb98[_0x11b923(0x22d)]('Woozlit\x20Remote\x20v2.2.0\x0a\x0aConnected:\x20'+process[_0x11b923(0x19d)]()+_0x11b923(0x230));return;}if(_0x57041f===_0x11b923(0x254)){chatHistories['delete'](_0x5d8713),statusMessages[_0x11b923(0x1cd)](_0x5d8713),await _0x13fb98['reply']('Cleared');return;}if(_0x57041f===_0x11b923(0x187)){chatHistories[_0x11b923(0x1cd)](_0x5d8713),statusMessages[_0x11b923(0x1cd)](_0x5d8713),await _0x13fb98[_0x11b923(0x22d)]('New\x20chat\x20session\x20started.\x20How\x20can\x20I\x20help?');return;}if(_0x57041f[_0x11b923(0x1ce)](_0x11b923(0x1b9))){const _0x578450=_0x57041f[_0x11b923(0x265)](0x5)[_0x11b923(0x1ef)]();if(!_0x578450){await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x203));return;}await _0x13fb98['replyWithChatAction'](_0x11b923(0x24c));const _0x4eb635=await runCommand(_0x578450,undefined,![],0x7530),_0x14b104=_0x4eb635[_0x11b923(0x1d1)]||_0x4eb635[_0x11b923(0x17c)]||_0x11b923(0x211),_0x2ecb4a=_0x14b104[_0x11b923(0x20f)]>0xbb8?_0x14b104[_0x11b923(0x1dd)](0x0,0xbb8)+_0x11b923(0x188):_0x14b104;await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x1d7)+_0x4eb635['exitCode']+'\x0a\x0a'+_0x2ecb4a);return;}if(_0x57041f[_0x11b923(0x1ce)]('/files')){const _0x1b0675=_0x57041f[_0x11b923(0x265)](0x6)[_0x11b923(0x1ef)]()||'.',_0x2079b7=listDirectory(_0x1b0675);if(_0x2079b7[_0x11b923(0x1bd)]&&_0x2079b7['entries']){const _0x21a7b2=_0x2079b7[_0x11b923(0x21f)]['slice'](0x0,0x28)[_0x11b923(0x204)](_0x10aeb2=>{const _0xe5e9a9=_0x11b923,_0x4b8ba0=_0x10aeb2[_0xe5e9a9(0x1c9)]===_0xe5e9a9(0x221)?_0xe5e9a9(0x269):_0xe5e9a9(0x1b0),_0x571f72=_0x10aeb2[_0xe5e9a9(0x183)]?'\x20('+_0x10aeb2[_0xe5e9a9(0x183)]+'b)':'';return _0x4b8ba0+'\x20'+_0x10aeb2[_0xe5e9a9(0x1ad)]+_0x571f72;})[_0x11b923(0x1ae)]('\x0a');await _0x13fb98[_0x11b923(0x22d)](_0x1b0675+_0x11b923(0x213)+_0x21a7b2);}else await _0x13fb98[_0x11b923(0x22d)](_0x2079b7[_0x11b923(0x1c1)]);return;}if(_0x57041f===_0x11b923(0x238)){const _0xfe0b61=gitStatus(),_0x33d274=tree('.',0x2),_0x25d86a=readJson(_0x11b923(0x240));let _0x80ce8d=_0x11b923(0x1d4)+process[_0x11b923(0x19d)]()+_0x11b923(0x206)+getSelectedModel()+'\x0a';if(_0x25d86a['success']&&_0x25d86a[_0x11b923(0x25d)]){const _0x54ce6e=_0x25d86a[_0x11b923(0x25d)];_0x80ce8d+=_0x11b923(0x24d)+(_0x54ce6e[_0x11b923(0x1ad)]||_0x11b923(0x243))+'\x20v'+(_0x54ce6e[_0x11b923(0x1a1)]||'?')+'\x0a';}_0xfe0b61['success']&&(_0x80ce8d+='\x0aGit\x20Status:\x0a'+(_0xfe0b61[_0x11b923(0x173)]||'Clean')+'\x0a');if(_0x33d274[_0x11b923(0x1bd)]&&_0x33d274[_0x11b923(0x249)]){const _0x4a0e99=_0x33d274['tree'][_0x11b923(0x1b7)]('\x0a')['slice'](0x0,0x14)['join']('\x0a');_0x80ce8d+=_0x11b923(0x176)+_0x4a0e99;}await _0x13fb98[_0x11b923(0x22d)](_0x80ce8d);return;}if(_0x57041f['startsWith'](_0x11b923(0x180))){const _0x5d0b9b=_0x57041f['slice'](0x4)[_0x11b923(0x1ef)]();try{process['chdir'](resolve(process[_0x11b923(0x19d)](),_0x5d0b9b)),await _0x13fb98[_0x11b923(0x22d)]('Changed\x20to:\x20'+process[_0x11b923(0x19d)]());}catch(_0x13a7c2){await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x23d)+_0x13a7c2);}return;}if(_0x57041f==='/screen'||_0x57041f===_0x11b923(0x236)){try{await _0x13fb98[_0x11b923(0x177)](_0x11b923(0x175));const _0x3eeca8=await takeScreenshot();await _0x13fb98[_0x11b923(0x1fd)](new InputFile(_0x3eeca8),{'caption':_0x11b923(0x195)}),await a25_0x32bb31[_0x11b923(0x25f)](_0x3eeca8)[_0x11b923(0x1e2)](()=>{});}catch(_0x176e60){await _0x13fb98['reply']('Screenshot\x20failed:\x20'+_0x176e60);}return;}if(_0x57041f==='/status'){const _0x34e447=readTerminalOutput(),_0x2f3187=_0x34e447[_0x11b923(0x1e4)]['length']>0x0?'\x0aProcesses:\x20'+_0x34e447[_0x11b923(0x1e4)][_0x11b923(0x1ae)](',\x20'):'';await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x1d4)+process[_0x11b923(0x19d)]()+_0x11b923(0x206)+getSelectedModel()+_0x2f3187);return;}if(_0x57041f===_0x11b923(0x191)){const _0x485aa1=terminateProcess();await _0x13fb98['reply'](_0x485aa1[_0x11b923(0x1c1)]);return;}const _0x467f75=await getOrCreateHistory(_0x5d8713);_0x467f75[_0x11b923(0x210)]({'role':_0x11b923(0x1ca),'content':_0x57041f}),a25_0xbdcdf2[_0x11b923(0x1aa)](_0x11b923(0x18c)+_0x13fb98[_0x11b923(0x1fb)][_0x11b923(0x1f3)]+':\x20'+_0x57041f),await processTelegramAgentLoop(_0x5d8713,_0x467f75,getSelectedModel(),_0x57041f);}export async function startBot(){const _0x599954=a25_0x1de38d,_0x3cb864=a25_0x161d0b[_0x599954(0x208)]();if(!_0x3cb864)return a25_0xbdcdf2[_0x599954(0x1f4)](_0x599954(0x1a2)),![];if(isRunning&&bot)return a25_0xbdcdf2['warn'](_0x599954(0x1fa)),!![];try{bot=new Bot(_0x3cb864),bot['on'](_0x599954(0x1db),handleMessage),bot['on']('message:voice',async _0x3e945d=>{const _0x234293=_0x599954,_0xc46f80=_0x3e945d[_0x234293(0x1fc)]['id'],_0x3d2401=_0x3e945d['from']?.['id'];if(!_0x3d2401||!a25_0x161d0b[_0x234293(0x19c)](_0x3d2401))return;try{const _0x4696cc=_0x3e945d[_0x234293(0x1c1)][_0x234293(0x1e1)]?.[_0x234293(0x1b2)];if(!_0x4696cc)return;await _0x3e945d['replyWithChatAction'](_0x234293(0x24c));const _0x2739e1=await _0x3e945d[_0x234293(0x21c)][_0x234293(0x1f0)](_0x4696cc),_0x58df5b=_0x234293(0x1f9)+_0x3cb864+'/'+_0x2739e1[_0x234293(0x220)];if(!_0x58df5b)return;const _0x3a42c5=await fetch(_0x58df5b),_0x5f038b=await _0x3a42c5[_0x234293(0x19b)](),_0x5c392f=Buffer[_0x234293(0x1fb)](_0x5f038b),_0x160cef=join(tmpdir(),_0x234293(0x171)+Date['now']()+'.ogg');await a25_0x32bb31['writeFile'](_0x160cef,_0x5c392f),await _0x3e945d[_0x234293(0x177)](_0x234293(0x24c));const _0x108562=await processVoiceMessage(_0x160cef);await a25_0x32bb31[_0x234293(0x25f)](_0x160cef)[_0x234293(0x1e2)](()=>{});if(_0x108562[_0x234293(0x17e)]){const _0x2e7ad5=await getOrCreateHistory(_0xc46f80);_0x2e7ad5[_0x234293(0x210)]({'role':_0x234293(0x1ca),'content':_0x234293(0x263)+_0x108562[_0x234293(0x17e)]}),a25_0xbdcdf2[_0x234293(0x1aa)](_0x234293(0x18c)+_0x3e945d[_0x234293(0x1fb)]?.[_0x234293(0x1f3)]+_0x234293(0x235)+_0x108562['text']),await processTelegramAgentLoop(_0xc46f80,_0x2e7ad5,getSelectedModel(),_0x108562[_0x234293(0x17e)]);}else await _0x3e945d[_0x234293(0x22d)](_0x234293(0x199));}catch(_0x5f12ee){a25_0xbdcdf2[_0x234293(0x1f4)]('Voice\x20error:\x20'+_0x5f12ee['message']),await _0x3e945d[_0x234293(0x22d)](_0x234293(0x1d6)+_0x5f12ee[_0x234293(0x1c1)]);}}),bot['on']('message:document',async _0x4197a2=>{const _0x1975c4=_0x599954,_0x1de222=_0x4197a2[_0x1975c4(0x1fc)]['id'],_0x38888c=_0x4197a2[_0x1975c4(0x1fb)]?.['id'];if(!_0x38888c||!a25_0x161d0b[_0x1975c4(0x19c)](_0x38888c))return;try{const _0x16b8e2=_0x4197a2['message'][_0x1975c4(0x24b)];if(!_0x16b8e2)return;await _0x4197a2[_0x1975c4(0x177)](_0x1975c4(0x24c));const _0xe9d553=await _0x4197a2['api'][_0x1975c4(0x1f0)](_0x16b8e2[_0x1975c4(0x1b2)]),_0x922e51='https://api.telegram.org/file/bot'+a25_0x161d0b['getBotToken']()+'/'+_0xe9d553[_0x1975c4(0x220)],_0x350b24=await fetch(_0x922e51),_0x4c3c14=Buffer[_0x1975c4(0x1fb)](await _0x350b24[_0x1975c4(0x19b)]()),_0x50042d=join(process[_0x1975c4(0x19d)](),_0x16b8e2[_0x1975c4(0x1e6)]||_0x1975c4(0x17f)+Date[_0x1975c4(0x17b)]()),{writeFileSync:_0x5844d0}=await import('fs');_0x5844d0(_0x50042d,_0x4c3c14);const _0x4473d6=_0x4197a2['message']['caption']||'',_0x273d5f=await getOrCreateHistory(_0x1de222);_0x273d5f[_0x1975c4(0x210)]({'role':'user','content':'[File\x20received:\x20'+_0x16b8e2['file_name']+'\x20('+_0x4c3c14[_0x1975c4(0x20f)]+_0x1975c4(0x1e7)+_0x50042d+']'+(_0x4473d6?_0x1975c4(0x1b6)+_0x4473d6:'')}),a25_0xbdcdf2[_0x1975c4(0x1aa)](_0x1975c4(0x1eb)+_0x16b8e2[_0x1975c4(0x1e6)]+_0x1975c4(0x196)+_0x50042d),await _0x4197a2[_0x1975c4(0x22d)]('Saved:\x20'+_0x16b8e2[_0x1975c4(0x1e6)]+'\x20('+_0x4c3c14[_0x1975c4(0x20f)]+'\x20bytes)'),_0x4473d6&&await processTelegramAgentLoop(_0x1de222,_0x273d5f,getSelectedModel(),_0x4473d6);}catch(_0x20214b){await _0x4197a2[_0x1975c4(0x22d)](_0x1975c4(0x1f8)+_0x20214b[_0x1975c4(0x1c1)]);}}),setInterval(()=>{if(bot)checkReminders(bot);},0xea60),bot[_0x599954(0x1e2)](_0x4a5679=>{const _0x4e03d7=_0x599954;_0x4a5679[_0x4e03d7(0x1c1)]?.[_0x4e03d7(0x1fe)](_0x4e03d7(0x1c3))&&(a25_0xbdcdf2[_0x4e03d7(0x1f4)](_0x4e03d7(0x1c0)),stopBot());}),bot[_0x599954(0x21c)][_0x599954(0x246)]({'drop_pending_updates':!![]})[_0x599954(0x229)](()=>{const _0x43d19c=_0x599954;bot?.[_0x43d19c(0x25e)]();})[_0x599954(0x1e2)](_0x46f1b7=>{const _0x4ae98f=_0x599954;a25_0xbdcdf2[_0x4ae98f(0x1f4)](_0x4ae98f(0x197)+_0x46f1b7);}),isRunning=!![];const _0x10b68f=a25_0x161d0b[_0x599954(0x1c8)]();return _0x10b68f['length']>0x0&&registerTelegramBot(bot,_0x10b68f),a25_0xbdcdf2[_0x599954(0x1bd)](_0x599954(0x22e)),!![];}catch(_0x46522f){return a25_0xbdcdf2[_0x599954(0x1f4)](_0x599954(0x218)+_0x46522f[_0x599954(0x1c1)]),![];}}export function stopBot(){const _0x10ee2d=a25_0x1de38d;bot&&(bot[_0x10ee2d(0x18a)](),bot=null),isRunning=![],verifiedSessions[_0x10ee2d(0x245)]();}export function isBotRunning(){return isRunning;}
1
+ const a25_0xb3cb99=a25_0x69fb;(function(_0x2c9583,_0x13cba6){const _0x45a2e7=a25_0x69fb,_0x536ebb=_0x2c9583();while(!![]){try{const _0x11403c=parseInt(_0x45a2e7(0x141))/0x1*(parseInt(_0x45a2e7(0xa4))/0x2)+-parseInt(_0x45a2e7(0x108))/0x3*(-parseInt(_0x45a2e7(0x15b))/0x4)+-parseInt(_0x45a2e7(0x12c))/0x5+parseInt(_0x45a2e7(0xd5))/0x6+-parseInt(_0x45a2e7(0x140))/0x7+-parseInt(_0x45a2e7(0x12a))/0x8*(parseInt(_0x45a2e7(0x132))/0x9)+parseInt(_0x45a2e7(0xff))/0xa;if(_0x11403c===_0x13cba6)break;else _0x536ebb['push'](_0x536ebb['shift']());}catch(_0x5ce16b){_0x536ebb['push'](_0x536ebb['shift']());}}}(a25_0x4312,0x7cebe));import{Bot,InputFile}from'grammy';import{promises as a25_0x188a04}from'fs';import{tmpdir}from'os';import{join,resolve,basename}from'path';import*as a25_0x114272 from'./config.js';import{checkReminders,scheduleReminder}from'./reminders.js';import{sendChatMessage}from'../utils/api.js';import{getSelectedModel}from'../utils/storage.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,readTerminalOutput,sendTerminalInput,terminateProcess,deleteFile,renameFile,copyFile,fileInfo,readFileLines}from'../tools/index.js';import{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'../tools/git.js';import{fetchUrl,downloadFile as a25_0x3338bd}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 a25_0x69fb(_0x1ebb70,_0xda89a2){_0x1ebb70=_0x1ebb70-0x9f;const _0x431276=a25_0x4312();let _0x69fb5c=_0x431276[_0x1ebb70];return _0x69fb5c;}import{registerTelegramBot}from'../services/notifications.js';import{processVoiceMessage}from'../services/voice-agent.js';import*as a25_0x1da450 from'../ui/output.js';import{createRequire}from'module';import{Jimp}from'jimp';const require=createRequire(import.meta.url);let bot=null,isRunning=![];function a25_0x4312(){const _0x16e591=['get_system_info','find_files','history.json','input','tree','unknown','Desktop','pnpm\x20install','Failed\x20to\x20send\x20file:\x20','branch','[Telegram]\x20File\x20received:\x20','trim','HOME','path','getBuffer','now','../browser/index.js','sendDocument','entries','message','type','git_branch','match','~1\x20min','then','\x0aGit\x20Status:\x0a','write_json','upload_','3870600qmvkPz','file_name','split','read_file','git_commit','.ogg','chat','includes','mkdir','6IKgOSC','[Telegram]\x20Iteration\x20','copy_file','401','...','delayMinutes','replyWithPhoto','\x0aProcesses:\x20','reply','edit_file','isAllowedChatId','utf-8','npm\x20init',':\x0a\x0a','clear','read_terminal','pids','patches','actionSummary','editMessageText','grep_recursive','data','push','build','browser_fill','voice','screenshot_','caption','addAllowedChatId','Telegram\x20bot\x20already\x20running.','fetch_url','assistant','title','.\x20Try\x20again\x20or\x20skip.','171200RjwBOq','file_path','3152080hTEdKP','npm\x20install','toLowerCase','unlink','sendChatAction','dim','9sQEnFe','selector','owner','[F]','No\x20output','Voice\x20error:\x20','replace','browser_close','git_log','browser_screenshot','set_env','pid','patch_file','pattern','3549315GwFFOh','1WloCoq','read_json','\x20(Voice):\x20','powershell_run','size','deleteWebhook','stringify','\x22\x0a\x20\x20Actions:\x20','Stopped\x20(max\x20steps)','Executing\x20','browser_open','pnpm\x20init','text','\x20User\x20says:\x20','join','zip_files','info','extensions','@hurdlegroup/robotjs','user','[Telegram]\x20','/project','\x0aTree:\x0a','getFile','api','Verified','1272092rLhNma','~1-2\x20min','archive.zip','file_id','slice','content','script','\x20bytes)\x20saved\x20to\x20','create-vite','getSecurityPin','browser_click','/status','/run\x20','https://api.telegram.org/file/bot','fromBranch','git_diff','search','get','sendPhoto','resize','output','/start','height','head','image/jpeg','bitmap','env','/cd\x20','error','version','typing','repo','delete_file','\x0aProject:\x20','start','Bot\x20start\x20failed:\x20','Saved:\x20','args','search_file','Failed:\x20','request','toolSuccess','../github/api.js','~2s','filter','\x0a\x0aRECENT\x20TASK\x20HISTORY\x20(Use\x20this\x20context):\x0a','catch','github_read_file','depth','value','read_file_lines','cwd','Done\x20in\x20','Taking\x20screenshot...','/files','message:voice','base64','message_id','file_info','count','chdir','420076IYSlCf','length','~1s','schedule_reminder','unzip_files','image','upload_photo','PIN\x20required','You\x20are\x20Woozlit\x20AI.\x20Complete\x20tasks\x20autonomously.\x0a\x0aCRITICAL\x20RULES:\x0a1.\x20**EXECUTE\x20IMMEDIATELY**:\x20When\x20user\x20requests\x20an\x20action,\x20execute\x20the\x20tool\x20FIRST,\x20explain\x20NEVER.\x0a2.\x20**NO\x20EMOJIS**:\x20Never\x20use\x20emojis\x20in\x20any\x20response.\x0a3.\x20**NO\x20CONVERSATIONAL\x20ERRORS**:\x20If\x20a\x20browser\x20command\x20cannot\x20be\x20executed,\x20just\x20execute\x20it\x20anyway.\x20Never\x20explain\x20limitations.\x0a4.\x20**CONCISE**:\x20Maximum\x201-2\x20sentences\x20for\x20final\x20responses.\x20No\x20filler.\x0a5.\x20**TOOL\x20FORMAT**:\x20Use\x20THREE\x20backticks\x20(```)\x20NOT\x20asterisks\x20(***)\x20for\x20tool\x20blocks.\x0a\x0aTOOLS:\x0a-\x20run_command:\x20{command,\x20wait\x20(ms,\x20default\x2030000),\x20background\x20(bool)}\x0a-\x20read_terminal:\x20{}\x20-\x20check\x20running\x20process\x20output\x0a-\x20send_input:\x20{input}\x20-\x20answer\x20prompts\x0a-\x20terminate:\x20{}\x20-\x20kill\x20stuck\x20process\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-\x20screenshot:\x20{}\x20-\x20capture\x20desktop\x0a-\x20send_file:\x20{path}\x20-\x20send\x20a\x20file\x20to\x20the\x20user\x20via\x20Telegram\x0a-\x20schedule_reminder:\x20{delayMinutes:\x20number,\x20message:\x20string}\x0a-\x20git_status:\x20{}\x0a-\x20git_diff:\x20{path?}\x0a-\x20git_log:\x20{count?}\x0a-\x20git_add:\x20{path}\x0a-\x20git_commit:\x20{message}\x0a-\x20git_branch:\x20{}\x0a-\x20fetch_url:\x20{url}\x0a-\x20download_file:\x20{url,\x20path}\x0a-\x20get_env:\x20{name}\x0a-\x20set_env:\x20{name,\x20value}\x0a-\x20get_system_info:\x20{}\x0a-\x20clipboard_read:\x20{}\x0a-\x20clipboard_write:\x20{text}\x0a-\x20tree:\x20{path?,\x20depth?}\x0a-\x20grep_recursive:\x20{path?,\x20pattern,\x20extensions?}\x0a-\x20replace_in_files:\x20{path?,\x20search,\x20replace,\x20extensions?}\x0a-\x20powershell_run:\x20{script}\x0a-\x20zip_files:\x20{files,\x20output}\x0a-\x20unzip_files:\x20{path,\x20output}\x0a-\x20write_json:\x20{path,\x20data}\x0a-\x20read_json:\x20{path}\x0a-\x20patch_file:\x20{path,\x20patches:\x20[{search,\x20replace}]}\x0a-\x20open_in_editor:\x20{path}\x0a-\x20github_read_file:\x20{owner,\x20repo,\x20path,\x20branch}\x0a-\x20github_create_branch:\x20{owner,\x20repo,\x20branchName,\x20fromBranch}\x0a-\x20github_create_pr:\x20{owner,\x20repo,\x20title,\x20head,\x20base,\x20body}\x0a-\x20browser_open:\x20{url}\x0a-\x20browser_click:\x20{selector}\x0a-\x20browser_fill:\x20{selector,\x20value}\x0a-\x20browser_screenshot:\x20{}\x0a-\x20browser_snapshot:\x20{}\x0a\x0aBROWSER\x20COMMANDS\x20-\x20EXECUTE\x20IMMEDIATELY:\x0aWhen\x20user\x20says\x20\x22open\x20[site]\x22,\x20\x22go\x20to\x20[url]\x22,\x20\x22navigate\x20to\x20[url]\x22:\x0a```tool\x0a{\x22name\x22:\x22browser_open\x22,\x22args\x22:{\x22url\x22:\x22https://example.com\x22}}\x0a```\x0a\x0aDO\x20NOT\x20respond\x20with:\x0a-\x20\x22I\x20understand\x20you\x27d\x20like\x20me\x20to...\x22\x0a-\x20\x22I\x20need\x20the\x20extension\x20to\x20be\x20connected...\x22\x0a-\x20\x22Apologies\x20for\x20the\x20inconvenience\x22\x0a-\x20Any\x20explanation\x20about\x20what\x20you\x27re\x20about\x20to\x20do\x0a\x0aJUST\x20EXECUTE\x20THE\x20TOOL.\x0a\x0aEXAMPLE:\x0aUser:\x20\x22open\x20discord\x22\x0aYou:\x0a```tool\x0a{\x22name\x22:\x22browser_open\x22,\x22args\x22:{\x22url\x22:\x22https://discord.com\x22}}\x0a```','map','.jpeg','Screenshot\x20failed:\x20','robotjs\x20not\x20available\x20to\x20capture\x20photo','No\x20Telegram\x20bot\x20token.\x20Run\x20/telegram\x20setup\x20first.','replyWithChatAction','\x0aModel:\x20','Voice\x20processing\x20error:\x20','USERPROFILE','/screenshot','/screen','substring','sendMessage','[Voice\x20Message]:\x20','terminate','search_directory','first_name','download_file','url','writeFile','Clean','TOOL\x20JSON:\x20','stdout','parse','rename_file','Usage:\x20/run\x20<command>','create_file','name','message:text','files','Telegram\x20startup\x20error:\x20','send_input','arrayBuffer','command','../tools/file.js','set','screenshot','delete','[Telegram]\x20Tool\x20error:\x20','from','2624370DVBYIe','directory','startsWith','success','message\x20is\x20not\x20modified','package.json','Woozlit\x20Remote\x20v2.2.0\x0a\x0aConnected:\x20','add','branchName','create-next-app','browser_snapshot','Invalid\x20bot\x20token.','toFixed','Dir:\x20'];a25_0x4312=function(){return _0x16e591;};return a25_0x4312();}const verifiedSessions=new Set(),statusMessages=new Map(),chatHistories=new Map(),WOOZLIT_DIR=join(process[a25_0xb3cb99(0x175)][a25_0xb3cb99(0xb5)]||process[a25_0xb3cb99(0x175)][a25_0xb3cb99(0xef)]||'.','.woozlit'),HISTORY_FILE=join(WOOZLIT_DIR,a25_0xb3cb99(0xe5));async function ensureWoozlitDir(){const _0x5da7a3=a25_0xb3cb99;try{await a25_0x188a04[_0x5da7a3(0x107)](WOOZLIT_DIR,{'recursive':!![]});}catch{}}async function getTaskHistory(){const _0x41fe79=a25_0xb3cb99;try{const _0x2fba28=await a25_0x188a04['readFile'](HISTORY_FILE,_0x41fe79(0x113));return JSON[_0x41fe79(0xc4)](_0x2fba28);}catch{return[];}}async function saveTaskHistory(_0x431f4b,_0xb9e27d){const _0x1c70aa=a25_0xb3cb99;await ensureWoozlitDir();const _0x36964f=await getTaskHistory();_0x36964f[_0x1c70aa(0x11e)]({'timestamp':Date[_0x1c70aa(0xf2)](),'request':_0x431f4b,'actionSummary':_0xb9e27d});if(_0x36964f['length']>0x14)_0x36964f['shift']();await a25_0x188a04[_0x1c70aa(0xc0)](HISTORY_FILE,JSON[_0x1c70aa(0x147)](_0x36964f,null,0x2));}function formatHistoryForPrompt(_0x525569){const _0xee4842=a25_0xb3cb99;if(_0x525569[_0xee4842(0xa5)]===0x0)return'';return _0xee4842(0x188)+_0x525569[_0xee4842(0x15f)](-0x5)[_0xee4842(0xad)](_0x25819c=>'-\x20Request:\x20\x22'+_0x25819c[_0xee4842(0x183)]+_0xee4842(0x148)+_0x25819c[_0xee4842(0x11a)][_0xee4842(0x14f)](',\x20'))['join']('\x0a');}function getSystemPrompt(_0x336c3b){const _0x404bec=a25_0xb3cb99;return _0x404bec(0xac)+_0x336c3b;}async function getOrCreateHistory(_0x4285e6){const _0x22aa81=a25_0xb3cb99;if(!chatHistories['has'](_0x4285e6)){const _0x1decaf='';chatHistories['set'](_0x4285e6,[{'role':'system','content':getSystemPrompt(_0x1decaf)}]);}return chatHistories[_0x22aa81(0x16c)](_0x4285e6);}async function updateStatus(_0x5257c5,_0x585389){const _0x48d990=a25_0xb3cb99;if(!bot)return;const _0x1c97d3=statusMessages[_0x48d990(0x16c)](_0x5257c5);if(_0x1c97d3)try{await bot[_0x48d990(0x159)][_0x48d990(0x11b)](_0x5257c5,_0x1c97d3,_0x585389);return;}catch(_0x180003){if(_0x180003[_0x48d990(0xf6)]&&_0x180003[_0x48d990(0xf6)]['includes'](_0x48d990(0xd9)))return;statusMessages['delete'](_0x5257c5);}try{const _0x3cc4b0=await bot['api'][_0x48d990(0xb9)](_0x5257c5,_0x585389);statusMessages[_0x48d990(0xd0)](_0x5257c5,_0x3cc4b0[_0x48d990(0xa0)]);}catch(_0x217cb1){}}async function takeScreenshot(){const _0x12293f=a25_0xb3cb99,_0x18de7e=_0x12293f(0x122)+Date[_0x12293f(0xf2)]()+_0x12293f(0xae),_0x112ba2=join(tmpdir(),_0x18de7e);let _0x2672ae;try{_0x2672ae=require(_0x12293f(0x153));const _0x198ce6=_0x2672ae['getScreenSize'](),_0x55552a=_0x2672ae['screen']['capture'](0x0,0x0,_0x198ce6['width'],_0x198ce6[_0x12293f(0x171)]),_0x3c865c=new Jimp({'width':_0x55552a['width'],'height':_0x55552a[_0x12293f(0x171)]});for(let _0x262aa7=0x0;_0x262aa7<_0x55552a[_0x12293f(0xa9)]['length'];_0x262aa7+=0x4){_0x3c865c[_0x12293f(0x174)][_0x12293f(0x11d)][_0x262aa7]=_0x55552a[_0x12293f(0xa9)][_0x262aa7+0x2],_0x3c865c[_0x12293f(0x174)][_0x12293f(0x11d)][_0x262aa7+0x1]=_0x55552a[_0x12293f(0xa9)][_0x262aa7+0x1],_0x3c865c[_0x12293f(0x174)][_0x12293f(0x11d)][_0x262aa7+0x2]=_0x55552a[_0x12293f(0xa9)][_0x262aa7],_0x3c865c[_0x12293f(0x174)]['data'][_0x262aa7+0x3]=_0x55552a[_0x12293f(0xa9)][_0x262aa7+0x3];}_0x3c865c[_0x12293f(0x174)]['width']>0x500&&_0x3c865c[_0x12293f(0x16e)]({'w':0x500});const _0x4b3592=await _0x3c865c[_0x12293f(0xf1)](_0x12293f(0x173));await a25_0x188a04[_0x12293f(0xc0)](_0x112ba2,_0x4b3592);}catch(_0x459a7d){throw new Error(_0x12293f(0xb0));}return _0x112ba2;}async function executeToolCall(_0x5516f5,_0x634a57,_0x40eb3d){const _0x4a411b=a25_0xb3cb99;switch(_0x5516f5){case _0x4a411b(0xd1):try{statusMessages[_0x4a411b(0xd2)](_0x40eb3d);const _0x5611f1=await takeScreenshot();return await bot?.[_0x4a411b(0x159)]['sendPhoto'](_0x40eb3d,new InputFile(_0x5611f1),{'caption':_0x4a411b(0xe9)}),await a25_0x188a04[_0x4a411b(0x12f)](_0x5611f1)[_0x4a411b(0x189)](()=>{}),{'success':!![],'sent':!![]};}catch(_0x1f193a){return{'error':_0x4a411b(0xaf)+_0x1f193a};}case _0x4a411b(0x117):return readTerminalOutput(_0x634a57['pid']);case _0x4a411b(0xcc):return sendTerminalInput(_0x634a57[_0x4a411b(0xe6)],_0x634a57[_0x4a411b(0x13d)]);case _0x4a411b(0xbb):return terminateProcess(_0x634a57['pid']);case _0x4a411b(0xc7):return createFile(_0x634a57[_0x4a411b(0xf0)],_0x634a57[_0x4a411b(0x160)]);case _0x4a411b(0x102):return readFile(_0x634a57['path']);case'list_directory':return listDirectory(_0x634a57[_0x4a411b(0xf0)]||'.');case _0x4a411b(0x111):return editFile(_0x634a57['path'],_0x634a57[_0x4a411b(0x16b)],_0x634a57[_0x4a411b(0x138)]);case _0x4a411b(0x181):return searchFile(_0x634a57['path'],_0x634a57[_0x4a411b(0x13f)]);case'run_command':const {command:_0x18a19a,background:_0x56f37e,wait:_0x4a256f}=_0x634a57,_0x1b9cb2=await runCommand(_0x18a19a,undefined,_0x56f37e||![],_0x4a256f||0x7530);return _0x1b9cb2;case _0x4a411b(0xa7):return scheduleReminder(_0x40eb3d,_0x634a57[_0x4a411b(0x10d)],_0x634a57['message']);case _0x4a411b(0x18a):{const {readFile:_0x21beb8}=await import('../github/api.js');return _0x21beb8(_0x634a57[_0x4a411b(0x134)],_0x634a57[_0x4a411b(0x17a)],_0x634a57['path'],_0x634a57[_0x4a411b(0xec)]);}case'github_create_branch':{const {createBranch:_0x527e4c}=await import(_0x4a411b(0x185));return _0x527e4c(_0x634a57['owner'],_0x634a57['repo'],_0x634a57[_0x4a411b(0xdd)],_0x634a57[_0x4a411b(0x169)]);}case'github_create_pr':{const {createPullRequest:_0x53f2f0}=await import('../github/api.js');return _0x53f2f0(_0x634a57[_0x4a411b(0x134)],_0x634a57['repo'],_0x634a57[_0x4a411b(0x128)],_0x634a57[_0x4a411b(0x172)],_0x634a57['base'],_0x634a57['body']);}case _0x4a411b(0x14b):{const {browserOpen:_0x309fb3,startBrowserServer:_0x588b66,isBrowserServerRunning:_0x12b6e4}=await import('../browser/index.js');return!_0x12b6e4()&&await _0x588b66(),_0x309fb3(_0x634a57[_0x4a411b(0xbf)]);}case _0x4a411b(0x165):{const {browserClick:_0xc8a8e4}=await import(_0x4a411b(0xf3));return _0xc8a8e4(_0x634a57[_0x4a411b(0x133)]);}case _0x4a411b(0x120):{const {browserFill:_0x8ad846}=await import(_0x4a411b(0xf3));return _0x8ad846(_0x634a57['selector'],_0x634a57[_0x4a411b(0x18c)]);}case _0x4a411b(0xdf):{const {browserSnapshot:_0x1cec55}=await import(_0x4a411b(0xf3));return _0x1cec55();}case _0x4a411b(0x13b):{const {browserScreenshot:_0x1db30a}=await import(_0x4a411b(0xf3)),_0x2d2ab0=await _0x1db30a();if(_0x2d2ab0[_0x4a411b(0xd8)]&&_0x2d2ab0[_0x4a411b(0x11d)]){const _0x27ea45=_0x2d2ab0[_0x4a411b(0x11d)][_0x4a411b(0x138)](/^data:image\/\w+;base64,/,''),_0x5e4924=Buffer[_0x4a411b(0xd4)](_0x27ea45,_0x4a411b(0x9f));return statusMessages['delete'](_0x40eb3d),await bot?.['api'][_0x4a411b(0x16d)](_0x40eb3d,new InputFile(_0x5e4924),{'caption':'Browser\x20Screenshot'}),{'success':!![],'sent':!![]};}return _0x2d2ab0;}case _0x4a411b(0x139):{const {browserClose:_0x52b2ef}=await import('../browser/index.js');return _0x52b2ef();}case'send_file':{try{const _0x8af450=resolve(process[_0x4a411b(0x18e)](),_0x634a57[_0x4a411b(0xf0)]);return statusMessages[_0x4a411b(0xd2)](_0x40eb3d),await bot?.[_0x4a411b(0x159)][_0x4a411b(0xf4)](_0x40eb3d,new InputFile(_0x8af450),{'caption':basename(_0x8af450)}),{'success':!![],'sent':!![]};}catch(_0x33ea94){return{'error':_0x4a411b(0xeb)+_0x33ea94};}}case _0x4a411b(0x17b):return deleteFile(_0x634a57['path']);case _0x4a411b(0xc5):return renameFile(_0x634a57['from']||_0x634a57[_0x4a411b(0xf0)],_0x634a57['to']);case _0x4a411b(0x10a):return copyFile(_0x634a57[_0x4a411b(0xd4)]||_0x634a57[_0x4a411b(0xf0)],_0x634a57['to']);case _0x4a411b(0xa1):return fileInfo(_0x634a57[_0x4a411b(0xf0)]);case _0x4a411b(0x18d):return readFileLines(_0x634a57[_0x4a411b(0xf0)],_0x634a57[_0x4a411b(0x17d)]||0x1,_0x634a57['end']||0x32);case _0x4a411b(0xe4):{const {findFiles:_0x124454}=await import(_0x4a411b(0xcf));return _0x124454(_0x634a57[_0x4a411b(0xf0)]||'.',_0x634a57['pattern']);}case _0x4a411b(0xbc):{const {searchDirectory:_0x3167bf}=await import('../tools/file.js');return _0x3167bf(_0x634a57[_0x4a411b(0xf0)]||'.',_0x634a57['pattern']);}case'git_status':return gitStatus();case _0x4a411b(0x16a):return gitDiff(_0x634a57[_0x4a411b(0xf0)]);case _0x4a411b(0x13a):return gitLog(_0x634a57[_0x4a411b(0xa2)]||0xa);case'git_add':return gitAdd(_0x634a57[_0x4a411b(0xf0)]||'.');case _0x4a411b(0x103):return gitCommit(_0x634a57['message']);case _0x4a411b(0xf8):return gitBranch();case _0x4a411b(0x126):return fetchUrl(_0x634a57['url']);case _0x4a411b(0xbe):return a25_0x3338bd(_0x634a57[_0x4a411b(0xbf)],_0x634a57[_0x4a411b(0xf0)]);case'get_env':return getEnv(_0x634a57[_0x4a411b(0xc8)]);case _0x4a411b(0x13c):return setEnv(_0x634a57[_0x4a411b(0xc8)],_0x634a57[_0x4a411b(0x18c)]);case _0x4a411b(0xe3):return getSystemInfo();case'clipboard_read':return clipboardRead();case'clipboard_write':return clipboardWrite(_0x634a57['text']);case _0x4a411b(0xe7):return tree(_0x634a57[_0x4a411b(0xf0)]||'.',_0x634a57[_0x4a411b(0x18b)]||0x3);case _0x4a411b(0x11c):return grepRecursive(_0x634a57['path']||'.',_0x634a57[_0x4a411b(0x13f)],_0x634a57[_0x4a411b(0x152)]);case'replace_in_files':return replaceInFiles(_0x634a57[_0x4a411b(0xf0)]||'.',_0x634a57['search'],_0x634a57['replace'],_0x634a57[_0x4a411b(0x152)]);case _0x4a411b(0x144):return powershellRun(_0x634a57[_0x4a411b(0x161)]||_0x634a57[_0x4a411b(0xce)]);case _0x4a411b(0x150):return zipFiles(_0x634a57[_0x4a411b(0xca)]||[_0x634a57[_0x4a411b(0xf0)]],_0x634a57[_0x4a411b(0x16f)]||_0x4a411b(0x15d));case _0x4a411b(0xa8):return unzipFiles(_0x634a57['path'],_0x634a57[_0x4a411b(0x16f)]||'.');case _0x4a411b(0xfd):return writeJson(_0x634a57[_0x4a411b(0xf0)],_0x634a57[_0x4a411b(0x11d)]);case _0x4a411b(0x142):return readJson(_0x634a57[_0x4a411b(0xf0)]);case _0x4a411b(0x13e):return patchFile(_0x634a57[_0x4a411b(0xf0)],_0x634a57[_0x4a411b(0x119)]);case'open_in_editor':return openInEditor(_0x634a57['path']);default:return{'error':'Unknown\x20tool:\x20'+_0x5516f5};}}function estimateTime(_0x5f3cc3,_0xf497c8){const _0x5ba302=a25_0xb3cb99;if(_0x5f3cc3==='screenshot')return _0x5ba302(0x186);if(_0x5f3cc3===_0x5ba302(0x117)||_0x5f3cc3===_0x5ba302(0xcc)||_0x5f3cc3===_0x5ba302(0xbb))return _0x5ba302(0xa6);if(_0x5f3cc3==='run_command'){const _0x588e56=(_0xf497c8[_0x5ba302(0xce)]||'')[_0x5ba302(0x12e)]();if(_0x588e56[_0x5ba302(0x106)](_0x5ba302(0xde))||_0x588e56[_0x5ba302(0x106)](_0x5ba302(0x163)))return'~2-3\x20min';if(_0x588e56[_0x5ba302(0x106)](_0x5ba302(0x12d))||_0x588e56['includes'](_0x5ba302(0xea)))return'~1-2\x20min';if(_0x588e56[_0x5ba302(0x106)](_0x5ba302(0x114))||_0x588e56[_0x5ba302(0x106)](_0x5ba302(0x14c)))return'~30s';if(_0x588e56[_0x5ba302(0x106)]('git\x20clone'))return _0x5ba302(0xfa);if(_0x588e56[_0x5ba302(0x106)](_0x5ba302(0x11f)))return _0x5ba302(0x15c);}return _0x5ba302(0x186);}function getActionDescription(_0x13319b,_0xef558){const _0x1aeb48=a25_0xb3cb99;if(_0x13319b==='run_command'){let _0x376935=_0xef558['command']||'command';if(_0x376935['length']>0x1e)_0x376935=_0x376935['substring'](0x0,0x1b)+_0x1aeb48(0x10c);return'Running:\x20'+_0x376935;}if(_0x13319b===_0x1aeb48(0xc7))return'Creating\x20file:\x20'+_0xef558['path'];if(_0x13319b===_0x1aeb48(0x111))return'Editing\x20file:\x20'+_0xef558['path'];if(_0x13319b==='screenshot')return _0x1aeb48(0x190);return _0x1aeb48(0x14a)+_0x13319b+_0x1aeb48(0x10c);}async function processTelegramAgentLoop(_0x12889b,_0x2020d7,_0x52cd18,_0x243ea0){const _0x1899a9=a25_0xb3cb99;let _0x259c91=0x0;const _0x27f17d=0x14;let _0x56352b=![];const _0x22c5de=[];while(_0x259c91<_0x27f17d){_0x259c91++;bot&&bot[_0x1899a9(0x159)][_0x1899a9(0x130)](_0x12889b,_0x1899a9(0x179))['catch'](()=>{});a25_0x1da450['dim'](_0x1899a9(0x109)+_0x259c91+'...');let _0x4fc34b='';try{const _0x29b05d=await sendChatMessage(_0x52cd18,_0x2020d7,_0x35c50c=>{_0x4fc34b+=_0x35c50c;});_0x4fc34b=_0x29b05d[_0x1899a9(0x160)];}catch(_0x1910cc){await bot?.[_0x1899a9(0x159)][_0x1899a9(0xb9)](_0x12889b,_0x1899a9(0x182)+(_0x1910cc[_0x1899a9(0xf6)]?.[_0x1899a9(0xb8)](0x0,0x1e)||'Error'));return;}_0x2020d7[_0x1899a9(0x11e)]({'role':_0x1899a9(0x127),'content':_0x4fc34b});let _0x5c576a=_0x4fc34b[_0x1899a9(0xf9)](/```tool\s*([\s\S]*?)```/);!_0x5c576a&&(_0x5c576a=_0x4fc34b[_0x1899a9(0xf9)](/\*\*\*tool\s*([\s\S]*?)\*\*\*/));!_0x5c576a&&(_0x5c576a=_0x4fc34b[_0x1899a9(0xf9)](/\`\`\`json\s*({[\s\S]*?"name"[\s\S]*?})\s*\`\`\`/));if(!_0x5c576a){let _0x458a89=_0x4fc34b[_0x1899a9(0x138)](/\<reasoning\>[\s\S]*?\<\/reasoning\>/g,'')[_0x1899a9(0x138)](/\<text\>|\<\/text\>/g,'')[_0x1899a9(0x138)](/```tool[\s\S]*?```/g,'')[_0x1899a9(0x138)](/\*\*\*tool[\s\S]*?\*\*\*/g,'')[_0x1899a9(0x138)](/```json\s*{\s*"tool"[\s\S]*?```/g,'')[_0x1899a9(0x138)](/```json\s*{\s*"command"[\s\S]*?```/g,'')[_0x1899a9(0x138)](/\*\*(.+?)\*\*/g,'$1')[_0x1899a9(0x138)](/\*(.+?)\*/g,'$1')[_0x1899a9(0x138)](/__(.+?)__/g,'$1')[_0x1899a9(0x138)](/_(.+?)_/g,'$1')['replace'](/#{1,6}\s*/g,'')['replace'](/^[-*+]\s+/gm,'')['replace'](/^\d+\.\s+/gm,'')[_0x1899a9(0x138)](/`([^`]+)`/g,'$1')[_0x1899a9(0x138)](/\[([^\]]+)\]\([^)]+\)/g,'$1')[_0x1899a9(0xee)]();const _0x431ef7=_0x458a89[_0x1899a9(0x101)]('\x0a')[_0x1899a9(0x187)](_0x4c8aaf=>_0x4c8aaf[_0x1899a9(0xee)]()&&_0x4c8aaf[_0x1899a9(0xee)]()[_0x1899a9(0xa5)]>0x1);if(_0x458a89[_0x1899a9(0xee)]()){if(_0x22c5de[_0x1899a9(0xa5)]>0x0){await saveTaskHistory(_0x243ea0,_0x22c5de);const _0x557e5b='\x0a\x0aTask\x20Summary:\x0a'+_0x22c5de[_0x1899a9(0xad)](_0x39e8ec=>'-\x20'+_0x39e8ec)[_0x1899a9(0x14f)]('\x0a');await bot?.[_0x1899a9(0x159)][_0x1899a9(0xb9)](_0x12889b,_0x458a89+_0x557e5b)[_0x1899a9(0x189)](()=>{});}else await bot?.['api'][_0x1899a9(0xb9)](_0x12889b,_0x458a89)['catch'](()=>{});}break;}try{const _0x46514c=_0x5c576a[0x1][_0x1899a9(0xee)]();a25_0x1da450[_0x1899a9(0x131)](_0x1899a9(0xc2)+_0x46514c);const _0x492671=JSON[_0x1899a9(0xc4)](_0x46514c);a25_0x1da450['dim']('PARSED\x20TOOL:\x20'+JSON[_0x1899a9(0x147)](_0x492671));const _0x4f4da0=estimateTime(_0x492671[_0x1899a9(0xc8)],_0x492671[_0x1899a9(0x180)]),_0x32a037=getActionDescription(_0x492671[_0x1899a9(0xc8)],_0x492671[_0x1899a9(0x180)]);_0x22c5de[_0x1899a9(0x11e)](_0x32a037['replace'](/\(\~.*\)/,'')[_0x1899a9(0xee)]()),await updateStatus(_0x12889b,_0x32a037+'\x20('+_0x4f4da0+')'),_0x56352b=!![],a25_0x1da450[_0x1899a9(0x151)]('[Telegram]\x20Starting\x20tool\x20'+_0x492671[_0x1899a9(0xc8)]);const _0x153ac6=performance[_0x1899a9(0xf2)](),_0xd9e473=await executeToolCall(_0x492671[_0x1899a9(0xc8)],_0x492671[_0x1899a9(0x180)],_0x12889b),_0x1f7556=((performance['now']()-_0x153ac6)/0x3e8)[_0x1899a9(0xe1)](0x1);a25_0x1da450[_0x1899a9(0x184)](_0x492671[_0x1899a9(0xc8)],Object['values'](_0x492671[_0x1899a9(0x180)])[0x0]||'',_0x1899a9(0x18f)+_0x1f7556+'s'),_0x2020d7[_0x1899a9(0x11e)]({'role':_0x1899a9(0x154),'content':'Tool\x20result\x20for\x20'+_0x492671['name']+':\x0a'+JSON['stringify'](_0xd9e473,null,0x2)}),await new Promise(_0x43e5a4=>setTimeout(_0x43e5a4,0xc8));}catch(_0x446107){a25_0x1da450[_0x1899a9(0x177)](_0x1899a9(0xd3)+_0x446107),_0x2020d7[_0x1899a9(0x11e)]({'role':_0x1899a9(0x154),'content':'Tool\x20error:\x20'+_0x446107+_0x1899a9(0x129)});}}_0x259c91>=_0x27f17d&&await bot?.['api'][_0x1899a9(0xb9)](_0x12889b,_0x1899a9(0x149));}async function handleMessage(_0x18186a){const _0xfda23c=a25_0xb3cb99,_0x44cf19=_0x18186a['message']?.[_0xfda23c(0x14d)]?.[_0xfda23c(0xee)](),_0x5b5089=_0x18186a['from']?.['id'];if(!_0x44cf19||!_0x5b5089||!_0x18186a[_0xfda23c(0x105)]?.['id'])return;const _0x1abe63=_0x18186a[_0xfda23c(0x105)]['id'],_0x477f92=_0x5b5089;if(!a25_0x114272[_0xfda23c(0x112)](_0x477f92)){const _0x59732c=a25_0x114272[_0xfda23c(0x164)]();if(_0x59732c&&!verifiedSessions['has'](_0x477f92)){if(_0x44cf19===_0x59732c){verifiedSessions[_0xfda23c(0xdc)](_0x477f92),a25_0x114272[_0xfda23c(0x124)](_0x477f92),await _0x18186a[_0xfda23c(0x110)](_0xfda23c(0x15a));return;}await _0x18186a[_0xfda23c(0x110)](_0xfda23c(0xab));return;}!_0x59732c&&a25_0x114272[_0xfda23c(0x124)](_0x477f92);}if(_0x44cf19===_0xfda23c(0x170)){await _0x18186a['reply'](_0xfda23c(0xdb)+process[_0xfda23c(0x18e)]()+'\x0a\x0aCommands:\x0a/newchat\x20-\x20New\x20session\x0a/clear\x20-\x20Reset\x20history\x0a/status\x20-\x20System\x20info\x0a/screen\x20-\x20Screenshot\x0a/run\x20<cmd>\x20-\x20Execute\x20command\x0a/files\x20[path]\x20-\x20Browse\x20files\x0a/project\x20-\x20Project\x20overview\x0a/cd\x20<path>\x20-\x20Change\x20directory\x0a/kill\x20-\x20Stop\x20process');return;}if(_0x44cf19==='/clear'){chatHistories[_0xfda23c(0xd2)](_0x1abe63),statusMessages[_0xfda23c(0xd2)](_0x1abe63),await _0x18186a[_0xfda23c(0x110)]('Cleared');return;}if(_0x44cf19==='/newchat'){chatHistories[_0xfda23c(0xd2)](_0x1abe63),statusMessages[_0xfda23c(0xd2)](_0x1abe63),await _0x18186a[_0xfda23c(0x110)]('New\x20chat\x20session\x20started.\x20How\x20can\x20I\x20help?');return;}if(_0x44cf19['startsWith'](_0xfda23c(0x167))){const _0xe6fae8=_0x44cf19[_0xfda23c(0x15f)](0x5)[_0xfda23c(0xee)]();if(!_0xe6fae8){await _0x18186a[_0xfda23c(0x110)](_0xfda23c(0xc6));return;}await _0x18186a['replyWithChatAction'](_0xfda23c(0x179));const _0x2fba8d=await runCommand(_0xe6fae8,undefined,![],0x7530),_0x53b250=_0x2fba8d[_0xfda23c(0xc3)]||_0x2fba8d['stderr']||_0xfda23c(0x136),_0x2f7f70=_0x53b250['length']>0xbb8?_0x53b250[_0xfda23c(0xb8)](0x0,0xbb8)+_0xfda23c(0x10c):_0x53b250;await _0x18186a['reply']('Exit:\x20'+_0x2fba8d['exitCode']+'\x0a\x0a'+_0x2f7f70);return;}if(_0x44cf19['startsWith'](_0xfda23c(0x191))){const _0x118adf=_0x44cf19[_0xfda23c(0x15f)](0x6)['trim']()||'.',_0x4187c8=listDirectory(_0x118adf);if(_0x4187c8[_0xfda23c(0xd8)]&&_0x4187c8[_0xfda23c(0xf5)]){const _0x4a0d58=_0x4187c8['entries'][_0xfda23c(0x15f)](0x0,0x28)[_0xfda23c(0xad)](_0x3bca86=>{const _0x2efbb0=_0xfda23c,_0x3fb0e3=_0x3bca86[_0x2efbb0(0xf7)]===_0x2efbb0(0xd6)?'[D]':_0x2efbb0(0x135),_0x492459=_0x3bca86[_0x2efbb0(0x145)]?'\x20('+_0x3bca86[_0x2efbb0(0x145)]+'b)':'';return _0x3fb0e3+'\x20'+_0x3bca86['name']+_0x492459;})[_0xfda23c(0x14f)]('\x0a');await _0x18186a['reply'](_0x118adf+_0xfda23c(0x115)+_0x4a0d58);}else await _0x18186a[_0xfda23c(0x110)](_0x4187c8[_0xfda23c(0xf6)]);return;}if(_0x44cf19===_0xfda23c(0x156)){const _0x49e2e1=gitStatus(),_0x1235c5=tree('.',0x2),_0x4bf860=readJson(_0xfda23c(0xda));let _0x4294b7='Dir:\x20'+process['cwd']()+_0xfda23c(0xb3)+getSelectedModel()+'\x0a';if(_0x4bf860[_0xfda23c(0xd8)]&&_0x4bf860[_0xfda23c(0x11d)]){const _0x2d06d2=_0x4bf860['data'];_0x4294b7+=_0xfda23c(0x17c)+(_0x2d06d2[_0xfda23c(0xc8)]||_0xfda23c(0xe8))+'\x20v'+(_0x2d06d2[_0xfda23c(0x178)]||'?')+'\x0a';}_0x49e2e1[_0xfda23c(0xd8)]&&(_0x4294b7+=_0xfda23c(0xfc)+(_0x49e2e1['output']||_0xfda23c(0xc1))+'\x0a');if(_0x1235c5[_0xfda23c(0xd8)]&&_0x1235c5[_0xfda23c(0xe7)]){const _0xa7bf3f=_0x1235c5[_0xfda23c(0xe7)]['split']('\x0a')[_0xfda23c(0x15f)](0x0,0x14)[_0xfda23c(0x14f)]('\x0a');_0x4294b7+=_0xfda23c(0x157)+_0xa7bf3f;}await _0x18186a[_0xfda23c(0x110)](_0x4294b7);return;}if(_0x44cf19[_0xfda23c(0xd7)](_0xfda23c(0x176))){const _0x499b2d=_0x44cf19[_0xfda23c(0x15f)](0x4)[_0xfda23c(0xee)]();try{process[_0xfda23c(0xa3)](resolve(process[_0xfda23c(0x18e)](),_0x499b2d)),await _0x18186a[_0xfda23c(0x110)]('Changed\x20to:\x20'+process['cwd']());}catch(_0x3c6fe3){await _0x18186a[_0xfda23c(0x110)]('Failed:\x20'+_0x3c6fe3);}return;}if(_0x44cf19===_0xfda23c(0xb7)||_0x44cf19===_0xfda23c(0xb6)){try{await _0x18186a[_0xfda23c(0xb2)](_0xfda23c(0xaa));const _0x2bcda0=await takeScreenshot();await _0x18186a[_0xfda23c(0x10e)](new InputFile(_0x2bcda0),{'caption':_0xfda23c(0xe9)}),await a25_0x188a04[_0xfda23c(0x12f)](_0x2bcda0)['catch'](()=>{});}catch(_0x39cdd5){await _0x18186a['reply'](_0xfda23c(0xaf)+_0x39cdd5);}return;}if(_0x44cf19===_0xfda23c(0x166)){const _0x1ed254=readTerminalOutput(),_0x2f6e1c=_0x1ed254[_0xfda23c(0x118)]['length']>0x0?_0xfda23c(0x10f)+_0x1ed254[_0xfda23c(0x118)][_0xfda23c(0x14f)](',\x20'):'';await _0x18186a[_0xfda23c(0x110)](_0xfda23c(0xe2)+process[_0xfda23c(0x18e)]()+_0xfda23c(0xb3)+getSelectedModel()+_0x2f6e1c);return;}if(_0x44cf19==='/kill'){const _0x123fd7=terminateProcess();await _0x18186a['reply'](_0x123fd7[_0xfda23c(0xf6)]);return;}const _0x1d0916=await getOrCreateHistory(_0x1abe63);_0x1d0916['push']({'role':'user','content':_0x44cf19}),a25_0x1da450[_0xfda23c(0x151)](_0xfda23c(0x155)+_0x18186a[_0xfda23c(0xd4)][_0xfda23c(0xbd)]+':\x20'+_0x44cf19),await processTelegramAgentLoop(_0x1abe63,_0x1d0916,getSelectedModel(),_0x44cf19);}export async function startBot(){const _0x5b4519=a25_0xb3cb99,_0xbb5c7a=a25_0x114272['getBotToken']();if(!_0xbb5c7a)return a25_0x1da450[_0x5b4519(0x177)](_0x5b4519(0xb1)),![];if(isRunning&&bot)return a25_0x1da450['warn'](_0x5b4519(0x125)),!![];try{bot=new Bot(_0xbb5c7a),bot['on'](_0x5b4519(0xc9),handleMessage),bot['on'](_0x5b4519(0x192),async _0x546c60=>{const _0x2d94b2=_0x5b4519,_0x393224=_0x546c60['chat']['id'],_0x17dde2=_0x546c60['from']?.['id'];if(!_0x17dde2||!a25_0x114272[_0x2d94b2(0x112)](_0x17dde2))return;try{const _0x2510df=_0x546c60['message'][_0x2d94b2(0x121)]?.[_0x2d94b2(0x15e)];if(!_0x2510df)return;await _0x546c60[_0x2d94b2(0xb2)](_0x2d94b2(0x179));const _0x5314f8=await _0x546c60[_0x2d94b2(0x159)][_0x2d94b2(0x158)](_0x2510df),_0x1e98a4=_0x2d94b2(0x168)+_0xbb5c7a+'/'+_0x5314f8[_0x2d94b2(0x12b)];if(!_0x1e98a4)return;const _0xc7034e=await fetch(_0x1e98a4),_0x35e705=await _0xc7034e[_0x2d94b2(0xcd)](),_0x1197dd=Buffer[_0x2d94b2(0xd4)](_0x35e705),_0x576f25=join(tmpdir(),'voice_'+Date[_0x2d94b2(0xf2)]()+_0x2d94b2(0x104));await a25_0x188a04['writeFile'](_0x576f25,_0x1197dd),await _0x546c60['replyWithChatAction']('typing');const _0x260906=await processVoiceMessage(_0x576f25);await a25_0x188a04[_0x2d94b2(0x12f)](_0x576f25)[_0x2d94b2(0x189)](()=>{});if(_0x260906['text']){const _0x2b1d10=await getOrCreateHistory(_0x393224);_0x2b1d10['push']({'role':_0x2d94b2(0x154),'content':_0x2d94b2(0xba)+_0x260906[_0x2d94b2(0x14d)]}),a25_0x1da450[_0x2d94b2(0x151)](_0x2d94b2(0x155)+_0x546c60[_0x2d94b2(0xd4)]?.[_0x2d94b2(0xbd)]+_0x2d94b2(0x143)+_0x260906['text']),await processTelegramAgentLoop(_0x393224,_0x2b1d10,getSelectedModel(),_0x260906[_0x2d94b2(0x14d)]);}else await _0x546c60['reply']('Sorry,\x20I\x20couldn\x27t\x20understand\x20that\x20audio.');}catch(_0x34fe7f){a25_0x1da450[_0x2d94b2(0x177)](_0x2d94b2(0x137)+_0x34fe7f[_0x2d94b2(0xf6)]),await _0x546c60['reply'](_0x2d94b2(0xb4)+_0x34fe7f[_0x2d94b2(0xf6)]);}}),bot['on']('message:document',async _0xb2f1cd=>{const _0x465e75=_0x5b4519,_0x288ccb=_0xb2f1cd[_0x465e75(0x105)]['id'],_0x6feb88=_0xb2f1cd[_0x465e75(0xd4)]?.['id'];if(!_0x6feb88||!a25_0x114272[_0x465e75(0x112)](_0x6feb88))return;try{const _0x3b5066=_0xb2f1cd[_0x465e75(0xf6)]['document'];if(!_0x3b5066)return;await _0xb2f1cd[_0x465e75(0xb2)]('typing');const _0x4b22b8=await _0xb2f1cd[_0x465e75(0x159)][_0x465e75(0x158)](_0x3b5066[_0x465e75(0x15e)]),_0x4e96f4=_0x465e75(0x168)+a25_0x114272['getBotToken']()+'/'+_0x4b22b8['file_path'],_0x2b2e9f=await fetch(_0x4e96f4),_0x52ab5b=Buffer[_0x465e75(0xd4)](await _0x2b2e9f[_0x465e75(0xcd)]()),_0x1d43c7=join(process[_0x465e75(0x18e)](),_0x3b5066[_0x465e75(0x100)]||_0x465e75(0xfe)+Date[_0x465e75(0xf2)]()),{writeFileSync:_0x5f101b}=await import('fs');_0x5f101b(_0x1d43c7,_0x52ab5b);const _0x3e1a29=_0xb2f1cd[_0x465e75(0xf6)][_0x465e75(0x123)]||'',_0x273874=await getOrCreateHistory(_0x288ccb);_0x273874['push']({'role':'user','content':'[File\x20received:\x20'+_0x3b5066['file_name']+'\x20('+_0x52ab5b[_0x465e75(0xa5)]+_0x465e75(0x162)+_0x1d43c7+']'+(_0x3e1a29?_0x465e75(0x14e)+_0x3e1a29:'')}),a25_0x1da450[_0x465e75(0x151)](_0x465e75(0xed)+_0x3b5066[_0x465e75(0x100)]+'\x20->\x20'+_0x1d43c7),await _0xb2f1cd['reply'](_0x465e75(0x17f)+_0x3b5066[_0x465e75(0x100)]+'\x20('+_0x52ab5b['length']+'\x20bytes)'),_0x3e1a29&&await processTelegramAgentLoop(_0x288ccb,_0x273874,getSelectedModel(),_0x3e1a29);}catch(_0xc6e5f){await _0xb2f1cd[_0x465e75(0x110)]('File\x20save\x20failed:\x20'+_0xc6e5f['message']);}}),setInterval(()=>{if(bot)checkReminders(bot);},0xea60),bot[_0x5b4519(0x189)](_0xd23b2e=>{const _0x5dad82=_0x5b4519;_0xd23b2e[_0x5dad82(0xf6)]?.[_0x5dad82(0x106)](_0x5dad82(0x10b))&&(a25_0x1da450['error'](_0x5dad82(0xe0)),stopBot());}),bot[_0x5b4519(0x159)][_0x5b4519(0x146)]({'drop_pending_updates':!![]})[_0x5b4519(0xfb)](()=>{const _0x4c8dca=_0x5b4519;bot?.[_0x4c8dca(0x17d)]();})[_0x5b4519(0x189)](_0x353626=>{const _0x5457d4=_0x5b4519;a25_0x1da450['error'](_0x5457d4(0xcb)+_0x353626);}),isRunning=!![];const _0x3d5a03=a25_0x114272['getAllowedChatIds']();return _0x3d5a03[_0x5b4519(0xa5)]>0x0&&registerTelegramBot(bot,_0x3d5a03),a25_0x1da450[_0x5b4519(0xd8)]('Telegram\x20bot\x20started!'),!![];}catch(_0x212505){return a25_0x1da450[_0x5b4519(0x177)](_0x5b4519(0x17e)+_0x212505[_0x5b4519(0xf6)]),![];}}export function stopBot(){const _0xf01818=a25_0xb3cb99;bot&&(bot['stop'](),bot=null),isRunning=![],verifiedSessions[_0xf01818(0x116)]();}export function isBotRunning(){return isRunning;}
@@ -1 +1 @@
1
- const a26_0x4520b6=a26_0x5506;(function(_0x58fd68,_0x2a29ae){const _0x461c51=a26_0x5506,_0xda345c=_0x58fd68();while(!![]){try{const _0x5cdbf5=-parseInt(_0x461c51(0x17d))/0x1+-parseInt(_0x461c51(0x180))/0x2*(parseInt(_0x461c51(0x179))/0x3)+parseInt(_0x461c51(0x189))/0x4+parseInt(_0x461c51(0x185))/0x5*(parseInt(_0x461c51(0x190))/0x6)+parseInt(_0x461c51(0x174))/0x7*(-parseInt(_0x461c51(0x176))/0x8)+-parseInt(_0x461c51(0x173))/0x9+parseInt(_0x461c51(0x17b))/0xa;if(_0x5cdbf5===_0x2a29ae)break;else _0xda345c['push'](_0xda345c['shift']());}catch(_0x5f1555){_0xda345c['push'](_0xda345c['shift']());}}}(a26_0x1b31,0x7cad6));function a26_0x1b31(){const _0x568ed0=['get','54150dRAEdd','enabled','aes-256-cbc','push','1079732Kmtgvl','update','split','digest','woozlit-cli-telegram','createHash','randomBytes','84dGtSGU','set','6234408fPQwFG','2422gFiNpF','includes','15784hNBChg','from','createCipheriv','3375vdjqEK','length','21271040VmGehE','utf8','416234mCrLBO','botToken','hex','438jrAdWE','final','sha256','allowedChatIds'];a26_0x1b31=function(){return _0x568ed0;};return a26_0x1b31();}import a26_0x3be5db from'conf';import a26_0x63ba04 from'crypto';const config=new a26_0x3be5db({'projectName':a26_0x4520b6(0x18d),'defaults':{'botToken':'','allowedChatIds':[],'securityPin':'','enabled':![]}}),ENCRYPTION_KEY='woozlit_telegram_secure_key_2026';function encrypt(_0x5897ba){const _0x50ef9f=a26_0x4520b6,_0x3e4612=a26_0x63ba04[_0x50ef9f(0x18f)](0x10),_0x2a6b09=a26_0x63ba04[_0x50ef9f(0x18e)](_0x50ef9f(0x182))['update'](ENCRYPTION_KEY)[_0x50ef9f(0x18c)](),_0x1784f9=a26_0x63ba04[_0x50ef9f(0x178)]('aes-256-cbc',_0x2a6b09,_0x3e4612);let _0x42d116=_0x1784f9[_0x50ef9f(0x18a)](_0x5897ba,_0x50ef9f(0x17c),_0x50ef9f(0x17f));return _0x42d116+=_0x1784f9[_0x50ef9f(0x181)](_0x50ef9f(0x17f)),_0x3e4612['toString'](_0x50ef9f(0x17f))+':'+_0x42d116;}function decrypt(_0x3378cc){const _0x5a7abf=a26_0x4520b6;try{const [_0x26d94a,_0x218ad9]=_0x3378cc[_0x5a7abf(0x18b)](':');if(!_0x26d94a||!_0x218ad9)return'';const _0x53e570=Buffer[_0x5a7abf(0x177)](_0x26d94a,_0x5a7abf(0x17f)),_0x42c8bf=a26_0x63ba04['createHash'](_0x5a7abf(0x182))['update'](ENCRYPTION_KEY)['digest'](),_0x202976=a26_0x63ba04['createDecipheriv'](_0x5a7abf(0x187),_0x42c8bf,_0x53e570);let _0x2d938e=_0x202976[_0x5a7abf(0x18a)](_0x218ad9,_0x5a7abf(0x17f),_0x5a7abf(0x17c));return _0x2d938e+=_0x202976[_0x5a7abf(0x181)]('utf8'),_0x2d938e;}catch{return'';}}export function setBotToken(_0x28b45){const _0x59e462=a26_0x4520b6;config[_0x59e462(0x172)](_0x59e462(0x17e),encrypt(_0x28b45));}export function getBotToken(){const _0x47cc6a=a26_0x4520b6,_0x501828=config[_0x47cc6a(0x184)]('botToken');if(!_0x501828)return'';return decrypt(_0x501828);}export function setSecurityPin(_0x247b83){const _0x4d00b7=a26_0x4520b6;config[_0x4d00b7(0x172)]('securityPin',encrypt(_0x247b83));}export function getSecurityPin(){const _0x183915=a26_0x4520b6,_0x524a57=config[_0x183915(0x184)]('securityPin');if(!_0x524a57)return'';return decrypt(_0x524a57);}export function addAllowedChatId(_0x4be6ce){const _0x180cff=a26_0x4520b6,_0xd23a01=config['get']('allowedChatIds');!_0xd23a01['includes'](_0x4be6ce)&&(_0xd23a01[_0x180cff(0x188)](_0x4be6ce),config['set'](_0x180cff(0x183),_0xd23a01));}export function removeAllowedChatId(_0x367fd9){const _0x4de4e0=a26_0x4520b6,_0x4967e7=config[_0x4de4e0(0x184)]('allowedChatIds');config[_0x4de4e0(0x172)](_0x4de4e0(0x183),_0x4967e7['filter'](_0x592ee6=>_0x592ee6!==_0x367fd9));}export function getAllowedChatIds(){const _0x242984=a26_0x4520b6;return config[_0x242984(0x184)]('allowedChatIds');}export function isAllowedChatId(_0x385080){const _0x53cf6d=a26_0x4520b6,_0x4261a5=config[_0x53cf6d(0x184)](_0x53cf6d(0x183));return _0x4261a5[_0x53cf6d(0x17a)]===0x0||_0x4261a5[_0x53cf6d(0x175)](_0x385080);}export function setEnabled(_0x29dfcd){const _0x42bc78=a26_0x4520b6;config[_0x42bc78(0x172)](_0x42bc78(0x186),_0x29dfcd);}export function isEnabled(){const _0x21f90a=a26_0x4520b6;return config[_0x21f90a(0x184)](_0x21f90a(0x186));}export function isConfigured(){return!!getBotToken();}function a26_0x5506(_0x123dc8,_0x3338c3){_0x123dc8=_0x123dc8-0x172;const _0x1b3171=a26_0x1b31();let _0x550635=_0x1b3171[_0x123dc8];return _0x550635;}export function clearConfig(){config['clear']();}
1
+ const a26_0x317876=a26_0xfd10;(function(_0x55c005,_0x242cdf){const _0xc29be5=a26_0xfd10,_0x225dac=_0x55c005();while(!![]){try{const _0x54aada=parseInt(_0xc29be5(0x13d))/0x1*(parseInt(_0xc29be5(0x154))/0x2)+parseInt(_0xc29be5(0x156))/0x3*(parseInt(_0xc29be5(0x136))/0x4)+-parseInt(_0xc29be5(0x148))/0x5+-parseInt(_0xc29be5(0x150))/0x6*(parseInt(_0xc29be5(0x13a))/0x7)+-parseInt(_0xc29be5(0x146))/0x8*(-parseInt(_0xc29be5(0x149))/0x9)+parseInt(_0xc29be5(0x14e))/0xa*(-parseInt(_0xc29be5(0x132))/0xb)+parseInt(_0xc29be5(0x137))/0xc*(-parseInt(_0xc29be5(0x13e))/0xd);if(_0x54aada===_0x242cdf)break;else _0x225dac['push'](_0x225dac['shift']());}catch(_0x300458){_0x225dac['push'](_0x225dac['shift']());}}}(a26_0x1594,0x5c09f));import a26_0x46dad6 from'conf';import a26_0x116397 from'crypto';const config=new a26_0x46dad6({'projectName':a26_0x317876(0x144),'defaults':{'botToken':'','allowedChatIds':[],'securityPin':'','enabled':![]}}),ENCRYPTION_KEY=a26_0x317876(0x135);function encrypt(_0x26feb3){const _0x5400b1=a26_0x317876,_0x1aa1eb=a26_0x116397[_0x5400b1(0x138)](0x10),_0x260f13=a26_0x116397[_0x5400b1(0x14c)](_0x5400b1(0x134))['update'](ENCRYPTION_KEY)[_0x5400b1(0x131)](),_0x1800e6=a26_0x116397[_0x5400b1(0x157)](_0x5400b1(0x142),_0x260f13,_0x1aa1eb);let _0x57c9c0=_0x1800e6[_0x5400b1(0x153)](_0x26feb3,'utf8',_0x5400b1(0x139));return _0x57c9c0+=_0x1800e6['final'](_0x5400b1(0x139)),_0x1aa1eb[_0x5400b1(0x14b)](_0x5400b1(0x139))+':'+_0x57c9c0;}function decrypt(_0x356978){const _0xfc5976=a26_0x317876;try{const [_0x239dfd,_0x2b96fa]=_0x356978[_0xfc5976(0x13b)](':');if(!_0x239dfd||!_0x2b96fa)return'';const _0x4c8c31=Buffer[_0xfc5976(0x13f)](_0x239dfd,_0xfc5976(0x139)),_0xddf073=a26_0x116397[_0xfc5976(0x14c)](_0xfc5976(0x134))[_0xfc5976(0x153)](ENCRYPTION_KEY)[_0xfc5976(0x131)](),_0x209c4c=a26_0x116397[_0xfc5976(0x13c)](_0xfc5976(0x142),_0xddf073,_0x4c8c31);let _0x22c600=_0x209c4c[_0xfc5976(0x153)](_0x2b96fa,_0xfc5976(0x139),_0xfc5976(0x151));return _0x22c600+=_0x209c4c[_0xfc5976(0x133)](_0xfc5976(0x151)),_0x22c600;}catch{return'';}}export function setBotToken(_0x460618){const _0x378cba=a26_0x317876;config[_0x378cba(0x147)](_0x378cba(0x152),encrypt(_0x460618));}export function getBotToken(){const _0x438fe8=a26_0x317876,_0x18b19f=config['get'](_0x438fe8(0x152));if(!_0x18b19f)return'';return decrypt(_0x18b19f);}export function setSecurityPin(_0x3e7c5a){const _0x30981d=a26_0x317876;config[_0x30981d(0x147)](_0x30981d(0x145),encrypt(_0x3e7c5a));}export function getSecurityPin(){const _0x2174b4=a26_0x317876,_0x2f277d=config[_0x2174b4(0x14f)](_0x2174b4(0x145));if(!_0x2f277d)return'';return decrypt(_0x2f277d);}export function addAllowedChatId(_0x494938){const _0x3374e2=a26_0x317876,_0x446464=config['get']('allowedChatIds');!_0x446464[_0x3374e2(0x143)](_0x494938)&&(_0x446464[_0x3374e2(0x140)](_0x494938),config[_0x3374e2(0x147)](_0x3374e2(0x141),_0x446464));}export function removeAllowedChatId(_0x24c3ef){const _0x36e054=a26_0x317876,_0xd885ff=config['get']('allowedChatIds');config[_0x36e054(0x147)](_0x36e054(0x141),_0xd885ff[_0x36e054(0x155)](_0x51fc6f=>_0x51fc6f!==_0x24c3ef));}export function getAllowedChatIds(){const _0x18bf9d=a26_0x317876;return config[_0x18bf9d(0x14f)]('allowedChatIds');}function a26_0xfd10(_0x147076,_0x15e44d){_0x147076=_0x147076-0x131;const _0x159433=a26_0x1594();let _0xfd1037=_0x159433[_0x147076];return _0xfd1037;}export function isAllowedChatId(_0x2ac2f2){const _0x14ffff=a26_0x317876,_0x208ba9=config[_0x14ffff(0x14f)](_0x14ffff(0x141));return _0x208ba9[_0x14ffff(0x14d)]===0x0||_0x208ba9[_0x14ffff(0x143)](_0x2ac2f2);}export function setEnabled(_0x4ec5c8){const _0x256470=a26_0x317876;config[_0x256470(0x147)]('enabled',_0x4ec5c8);}function a26_0x1594(){const _0x5632d7=['633544IPewsz','4260MWEexY','randomBytes','hex','572691AdIOZV','split','createDecipheriv','233944jPTrKy','28769PDaKwk','from','push','allowedChatIds','aes-256-cbc','includes','woozlit-cli-telegram','securityPin','8KVCbeH','set','231660UowVJG','6494193RuBSeV','clear','toString','createHash','length','21100mWXmqE','get','6gTcdxp','utf8','botToken','update','6WxnLbr','filter','6UWboRw','createCipheriv','digest','2343BVnatw','final','sha256','woozlit_telegram_secure_key_2026'];a26_0x1594=function(){return _0x5632d7;};return a26_0x1594();}export function isEnabled(){return config['get']('enabled');}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x3e7648=a26_0x317876;config[_0x3e7648(0x14a)]();}
@@ -1 +1 @@
1
- (function(_0x1696e1,_0x42cad5){var _0x10bf72=a27_0xd70d,_0x35dc07=_0x1696e1();while(!![]){try{var _0x4bae9a=parseInt(_0x10bf72(0x1e3))/0x1*(parseInt(_0x10bf72(0x1dc))/0x2)+-parseInt(_0x10bf72(0x1e0))/0x3+-parseInt(_0x10bf72(0x1da))/0x4+parseInt(_0x10bf72(0x1df))/0x5*(parseInt(_0x10bf72(0x1e2))/0x6)+-parseInt(_0x10bf72(0x1db))/0x7+-parseInt(_0x10bf72(0x1e4))/0x8*(-parseInt(_0x10bf72(0x1dd))/0x9)+-parseInt(_0x10bf72(0x1e1))/0xa*(-parseInt(_0x10bf72(0x1de))/0xb);if(_0x4bae9a===_0x42cad5)break;else _0x35dc07['push'](_0x35dc07['shift']());}catch(_0x213479){_0x35dc07['push'](_0x35dc07['shift']());}}}(a27_0x8c65,0x705e9));export*from'./config.js';function a27_0x8c65(){var _0x5ae0c5=['20cPxKnr','1953582xlmsoc','43sgQrbt','4016naFcWR','2284452mtcQtx','1644293pUpcGv','19956DdNMLV','14436Eafitk','380875DsJtgf','10slYDjD','2065287pmwpzX'];a27_0x8c65=function(){return _0x5ae0c5;};return a27_0x8c65();}function a27_0xd70d(_0x27e281,_0x15be6e){_0x27e281=_0x27e281-0x1da;var _0x8c652a=a27_0x8c65();var _0xd70dc6=_0x8c652a[_0x27e281];return _0xd70dc6;}export{startBot,stopBot,isBotRunning}from'./bot.js';export{setupTelegram}from'./setup.js';
1
+ (function(_0x29f48e,_0x528576){var _0x3ef848=a27_0x2a96,_0x3560ab=_0x29f48e();while(!![]){try{var _0x3e937a=-parseInt(_0x3ef848(0x148))/0x1+parseInt(_0x3ef848(0x145))/0x2+parseInt(_0x3ef848(0x149))/0x3+-parseInt(_0x3ef848(0x14b))/0x4*(-parseInt(_0x3ef848(0x14a))/0x5)+-parseInt(_0x3ef848(0x147))/0x6+parseInt(_0x3ef848(0x146))/0x7+-parseInt(_0x3ef848(0x14c))/0x8;if(_0x3e937a===_0x528576)break;else _0x3560ab['push'](_0x3560ab['shift']());}catch(_0xec76fd){_0x3560ab['push'](_0x3560ab['shift']());}}}(a27_0xb791,0xd670f));function a27_0x2a96(_0x2dbbee,_0x580538){_0x2dbbee=_0x2dbbee-0x145;var _0xb7916e=a27_0xb791();var _0x2a96ec=_0xb7916e[_0x2dbbee];return _0x2a96ec;}export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./bot.js';function a27_0xb791(){var _0x2e2d4d=['938855ayMFPa','5193810QbkHGb','403030iZOsnU','8sroVUX','3446576AUQvxV','1077344pFfeSZ','2504712bqXvXL','3245652fbVyxp'];a27_0xb791=function(){return _0x2e2d4d;};return a27_0xb791();}export{setupTelegram}from'./setup.js';
@@ -1 +1 @@
1
- function a28_0x9613(_0x55ec12,_0x44b69d){_0x55ec12=_0x55ec12-0x15a;const _0x20c528=a28_0x20c5();let _0x9613cc=_0x20c528[_0x55ec12];return _0x9613cc;}const a28_0xcd85f3=a28_0x9613;(function(_0x2276df,_0x1e2557){const _0x3277bc=a28_0x9613,_0x3256c1=_0x2276df();while(!![]){try{const _0x552b53=-parseInt(_0x3277bc(0x15d))/0x1+-parseInt(_0x3277bc(0x177))/0x2*(-parseInt(_0x3277bc(0x173))/0x3)+parseInt(_0x3277bc(0x160))/0x4*(-parseInt(_0x3277bc(0x16f))/0x5)+-parseInt(_0x3277bc(0x170))/0x6+parseInt(_0x3277bc(0x175))/0x7*(-parseInt(_0x3277bc(0x16e))/0x8)+-parseInt(_0x3277bc(0x166))/0x9+parseInt(_0x3277bc(0x15e))/0xa;if(_0x552b53===_0x1e2557)break;else _0x3256c1['push'](_0x3256c1['shift']());}catch(_0xdb2fbb){_0x3256c1['push'](_0x3256c1['shift']());}}}(a28_0x20c5,0x424c1));import{promises as a28_0x3e9ff2}from'fs';import{join}from'path';const WOOZLIT_DIR=join(process['env'][a28_0xcd85f3(0x171)]||process[a28_0xcd85f3(0x172)][a28_0xcd85f3(0x174)]||'.',a28_0xcd85f3(0x163)),REMINDERS_FILE=join(WOOZLIT_DIR,'reminders.json');function a28_0x20c5(){const _0x367568=['3001068lcNChW','random','now','message','utf-8','readFile','Failed\x20to\x20send\x20reminder\x20to\x20','filter','1540600yAdLIU','141930cJPIFV','2128584vlatkx','USERPROFILE','env','3qdjsef','HOME','7GsxcvP','toLocaleTimeString','97754VYXoPq',':\x20\x22','push','parse','sendMessage','chatId','297997AsrFhi','18272540WINVcD','length','60gsUPvf','writeFile','substring','.woozlit','api','timestamp'];a28_0x20c5=function(){return _0x367568;};return a28_0x20c5();}let reminders=[];export async function loadReminders(){const _0x3da3a4=a28_0xcd85f3;try{const _0x5083bb=await a28_0x3e9ff2[_0x3da3a4(0x16b)](REMINDERS_FILE,_0x3da3a4(0x16a));reminders=JSON[_0x3da3a4(0x15a)](_0x5083bb);}catch{reminders=[];}}export async function saveReminders(){const _0x462e97=a28_0xcd85f3;try{await a28_0x3e9ff2['mkdir'](WOOZLIT_DIR,{'recursive':!![]}),await a28_0x3e9ff2[_0x462e97(0x161)](REMINDERS_FILE,JSON['stringify'](reminders,null,0x2));}catch{}}export async function scheduleReminder(_0x589a24,_0x198cb6,_0x12993f){const _0x588b28=a28_0xcd85f3,_0x272add=Date['now']()+_0x198cb6*0x3c*0x3e8,_0x5040cd={'id':Math[_0x588b28(0x167)]()['toString'](0x24)[_0x588b28(0x162)](0x7),'chatId':_0x589a24,'timestamp':_0x272add,'message':_0x12993f};if(reminders[_0x588b28(0x15f)]===0x0)await loadReminders();reminders[_0x588b28(0x179)](_0x5040cd),await saveReminders();const _0xaec851=new Date(_0x272add)[_0x588b28(0x176)]();return'Reminder\x20set\x20for\x20'+_0xaec851+_0x588b28(0x178)+_0x12993f+'\x22';}export async function checkReminders(_0x33b58a){const _0x1ee2ab=a28_0xcd85f3;if(reminders[_0x1ee2ab(0x15f)]===0x0)await loadReminders();const _0x49b62a=Date[_0x1ee2ab(0x168)](),_0x1efede=reminders['filter'](_0x303164=>_0x303164['timestamp']>_0x49b62a),_0x51d281=reminders[_0x1ee2ab(0x16d)](_0x1ccc24=>_0x1ccc24[_0x1ee2ab(0x165)]<=_0x49b62a);if(_0x51d281[_0x1ee2ab(0x15f)]>0x0){for(const _0x27697b of _0x51d281){try{await _0x33b58a[_0x1ee2ab(0x164)][_0x1ee2ab(0x15b)](_0x27697b[_0x1ee2ab(0x15c)],'⏰\x20REMINDER:\x20'+_0x27697b[_0x1ee2ab(0x169)]);}catch(_0xb44909){console['error'](_0x1ee2ab(0x16c)+_0x27697b[_0x1ee2ab(0x15c)],_0xb44909);}}reminders=_0x1efede,await saveReminders();}}
1
+ const a28_0x4f6ecf=a28_0x5ece;(function(_0x157d98,_0x241e46){const _0x5e10f7=a28_0x5ece,_0x2cbebd=_0x157d98();while(!![]){try{const _0x1aedd7=-parseInt(_0x5e10f7(0x10b))/0x1+-parseInt(_0x5e10f7(0x106))/0x2+parseInt(_0x5e10f7(0xf3))/0x3+parseInt(_0x5e10f7(0xee))/0x4*(-parseInt(_0x5e10f7(0xf9))/0x5)+-parseInt(_0x5e10f7(0xf1))/0x6*(parseInt(_0x5e10f7(0x102))/0x7)+-parseInt(_0x5e10f7(0xef))/0x8*(-parseInt(_0x5e10f7(0xfb))/0x9)+-parseInt(_0x5e10f7(0x108))/0xa*(-parseInt(_0x5e10f7(0xfa))/0xb);if(_0x1aedd7===_0x241e46)break;else _0x2cbebd['push'](_0x2cbebd['shift']());}catch(_0x509e73){_0x2cbebd['push'](_0x2cbebd['shift']());}}}(a28_0x36c3,0x6ea1b));import{promises as a28_0x4cfeb3}from'fs';function a28_0x36c3(){const _0x323357=['writeFile','675908KXIlyK','144SsFUFK','env','148134hJzVek','stringify','786831INWGwh','chatId','filter',':\x20\x22','random','length','5QotVDm','8868101CkPtSE','116991AbmFUv','reminders.json','toString','push','now','⏰\x20REMINDER:\x20','parse','168WDspOl','HOME','mkdir','timestamp','101924MFfegl','.woozlit','10hrIjRo','error','api','36828kETWpM'];a28_0x36c3=function(){return _0x323357;};return a28_0x36c3();}function a28_0x5ece(_0x1bbf10,_0xeae0f9){_0x1bbf10=_0x1bbf10-0xee;const _0x36c3ea=a28_0x36c3();let _0x5ece87=_0x36c3ea[_0x1bbf10];return _0x5ece87;}import{join}from'path';const WOOZLIT_DIR=join(process['env']['USERPROFILE']||process[a28_0x4f6ecf(0xf0)][a28_0x4f6ecf(0x103)]||'.',a28_0x4f6ecf(0x107)),REMINDERS_FILE=join(WOOZLIT_DIR,a28_0x4f6ecf(0xfc));let reminders=[];export async function loadReminders(){const _0x49f14b=a28_0x4f6ecf;try{const _0x4dceb4=await a28_0x4cfeb3['readFile'](REMINDERS_FILE,'utf-8');reminders=JSON[_0x49f14b(0x101)](_0x4dceb4);}catch{reminders=[];}}export async function saveReminders(){const _0x22e260=a28_0x4f6ecf;try{await a28_0x4cfeb3[_0x22e260(0x104)](WOOZLIT_DIR,{'recursive':!![]}),await a28_0x4cfeb3[_0x22e260(0x10c)](REMINDERS_FILE,JSON[_0x22e260(0xf2)](reminders,null,0x2));}catch{}}export async function scheduleReminder(_0x1d64f2,_0x58203c,_0x26e777){const _0x303a72=a28_0x4f6ecf,_0x23b6b6=Date['now']()+_0x58203c*0x3c*0x3e8,_0x3fd640={'id':Math[_0x303a72(0xf7)]()[_0x303a72(0xfd)](0x24)['substring'](0x7),'chatId':_0x1d64f2,'timestamp':_0x23b6b6,'message':_0x26e777};if(reminders[_0x303a72(0xf8)]===0x0)await loadReminders();reminders[_0x303a72(0xfe)](_0x3fd640),await saveReminders();const _0x3ad882=new Date(_0x23b6b6)['toLocaleTimeString']();return'Reminder\x20set\x20for\x20'+_0x3ad882+_0x303a72(0xf6)+_0x26e777+'\x22';}export async function checkReminders(_0x56d6fc){const _0x4aa587=a28_0x4f6ecf;if(reminders[_0x4aa587(0xf8)]===0x0)await loadReminders();const _0x181243=Date[_0x4aa587(0xff)](),_0x2e524=reminders[_0x4aa587(0xf5)](_0x57818e=>_0x57818e[_0x4aa587(0x105)]>_0x181243),_0x5b3397=reminders[_0x4aa587(0xf5)](_0x52f7ee=>_0x52f7ee[_0x4aa587(0x105)]<=_0x181243);if(_0x5b3397[_0x4aa587(0xf8)]>0x0){for(const _0x59c661 of _0x5b3397){try{await _0x56d6fc[_0x4aa587(0x10a)]['sendMessage'](_0x59c661[_0x4aa587(0xf4)],_0x4aa587(0x100)+_0x59c661['message']);}catch(_0xab06c1){console[_0x4aa587(0x109)]('Failed\x20to\x20send\x20reminder\x20to\x20'+_0x59c661['chatId'],_0xab06c1);}}reminders=_0x2e524,await saveReminders();}}
@@ -1 +1 @@
1
- (function(_0x508231,_0x1fe51b){const _0x15281a=a29_0x483d,_0x47032e=_0x508231();while(!![]){try{const _0x4066db=parseInt(_0x15281a(0xc6))/0x1*(-parseInt(_0x15281a(0xbe))/0x2)+parseInt(_0x15281a(0xc5))/0x3+parseInt(_0x15281a(0xbd))/0x4*(parseInt(_0x15281a(0xba))/0x5)+parseInt(_0x15281a(0xbc))/0x6+parseInt(_0x15281a(0xc2))/0x7+parseInt(_0x15281a(0xc3))/0x8+parseInt(_0x15281a(0xc1))/0x9*(-parseInt(_0x15281a(0xb0))/0xa);if(_0x4066db===_0x1fe51b)break;else _0x47032e['push'](_0x47032e['shift']());}catch(_0x5d9e51){_0x47032e['push'](_0x47032e['shift']());}}}(a29_0x2cee,0xdc5ce));function a29_0x483d(_0x5bfa86,_0x2502da){_0x5bfa86=_0x5bfa86-0xb0;const _0x2ceeeb=a29_0x2cee();let _0x483dc9=_0x2ceeeb[_0x5bfa86];return _0x483dc9;}import{input}from'@inquirer/prompts';import*as a29_0xf9d5fd from'./config.js';import*as a29_0xe10f70 from'../ui/output.js';export async function setupTelegram(){const _0x18f20b=a29_0x483d;a29_0xe10f70['info'](_0x18f20b(0xbb)),a29_0xe10f70[_0x18f20b(0xb6)](_0x18f20b(0xb5));const _0x2f8a08=await input({'message':'Bot\x20Token:','validate':_0x12e8bf=>_0x12e8bf[_0x18f20b(0xc0)](':')?!![]:_0x18f20b(0xb2)});a29_0xf9d5fd['setBotToken'](_0x2f8a08),a29_0xe10f70['warn'](_0x18f20b(0xc4));const _0xe3912=await input({'message':_0x18f20b(0xb1)});_0xe3912?a29_0xf9d5fd[_0x18f20b(0xbf)](parseInt(_0xe3912)):a29_0xe10f70['info'](_0x18f20b(0xb4)),a29_0xe10f70[_0x18f20b(0xb7)](_0x18f20b(0xb9)),a29_0xe10f70[_0x18f20b(0xb8)](_0x18f20b(0xb3));}function a29_0x2cee(){const _0x547129=['dim','success','info','Telegram\x20configuration\x20saved!','5bekzPK','Setup\x20Telegram\x20Bot','7148190FSxnEp','5126692tyKRiQ','36402bPeFvX','addAllowedChatId','includes','2871999rmsGOb','10022824fquicF','5035120rWxVqW','You\x20also\x20need\x20to\x20allow\x20your\x20Telegram\x20User\x20ID.','1514163dQPndP','87DQGndO','80qMZWuA','Your\x20Telegram\x20Chat\x20ID\x20(numeric).\x20Leave\x20empty\x20if\x20unknown:','Invalid\x20token\x20format','Restart\x20the\x20CLI\x20to\x20start\x20the\x20bot.','You\x20can\x20add\x20your\x20Chat\x20ID\x20later\x20using\x20/telegram\x20allow\x20<id>\x20inside\x20the\x20CLI.','Get\x20your\x20token\x20from\x20@BotFather\x20on\x20Telegram.'];a29_0x2cee=function(){return _0x547129;};return a29_0x2cee();}
1
+ function a29_0x2355(_0x5d887d,_0x385800){_0x5d887d=_0x5d887d-0x13b;const _0x39670d=a29_0x3967();let _0x235526=_0x39670d[_0x5d887d];return _0x235526;}(function(_0x41406c,_0x4855f2){const _0x1d9e81=a29_0x2355,_0x297cd9=_0x41406c();while(!![]){try{const _0x1165ba=parseInt(_0x1d9e81(0x13e))/0x1+-parseInt(_0x1d9e81(0x146))/0x2*(parseInt(_0x1d9e81(0x14d))/0x3)+-parseInt(_0x1d9e81(0x151))/0x4*(-parseInt(_0x1d9e81(0x142))/0x5)+parseInt(_0x1d9e81(0x140))/0x6*(parseInt(_0x1d9e81(0x14a))/0x7)+parseInt(_0x1d9e81(0x143))/0x8+parseInt(_0x1d9e81(0x14f))/0x9*(-parseInt(_0x1d9e81(0x14b))/0xa)+parseInt(_0x1d9e81(0x141))/0xb*(parseInt(_0x1d9e81(0x145))/0xc);if(_0x1165ba===_0x4855f2)break;else _0x297cd9['push'](_0x297cd9['shift']());}catch(_0xbdb7f8){_0x297cd9['push'](_0x297cd9['shift']());}}}(a29_0x3967,0xd9395));import{input}from'@inquirer/prompts';function a29_0x3967(){const _0x2d0956=['Your\x20Telegram\x20Chat\x20ID\x20(numeric).\x20Leave\x20empty\x20if\x20unknown:','warn','Get\x20your\x20token\x20from\x20@BotFather\x20on\x20Telegram.','244648qGumbI','You\x20also\x20need\x20to\x20allow\x20your\x20Telegram\x20User\x20ID.','6odWaWx','3045482CaccDw','937465EgYRjN','1440856ALdxBJ','success','48UPXwhR','3207068yHwiTS','Restart\x20the\x20CLI\x20to\x20start\x20the\x20bot.','setBotToken','Telegram\x20configuration\x20saved!','6836837cDacyK','10INbhBC','dim','3uZiSqP','You\x20can\x20add\x20your\x20Chat\x20ID\x20later\x20using\x20/telegram\x20allow\x20<id>\x20inside\x20the\x20CLI.','11952558KuTJFy','Bot\x20Token:','28zkLUTU','info'];a29_0x3967=function(){return _0x2d0956;};return a29_0x3967();}import*as a29_0x22e93d from'./config.js';import*as a29_0x467d90 from'../ui/output.js';export async function setupTelegram(){const _0x2e94d1=a29_0x2355;a29_0x467d90[_0x2e94d1(0x152)]('Setup\x20Telegram\x20Bot'),a29_0x467d90[_0x2e94d1(0x14c)](_0x2e94d1(0x13d));const _0x22d884=await input({'message':_0x2e94d1(0x150),'validate':_0x2e6c62=>_0x2e6c62['includes'](':')?!![]:'Invalid\x20token\x20format'});a29_0x22e93d[_0x2e94d1(0x148)](_0x22d884),a29_0x467d90[_0x2e94d1(0x13c)](_0x2e94d1(0x13f));const _0x3f31d4=await input({'message':_0x2e94d1(0x13b)});_0x3f31d4?a29_0x22e93d['addAllowedChatId'](parseInt(_0x3f31d4)):a29_0x467d90[_0x2e94d1(0x152)](_0x2e94d1(0x14e)),a29_0x467d90[_0x2e94d1(0x144)](_0x2e94d1(0x149)),a29_0x467d90['info'](_0x2e94d1(0x147));}
@@ -1 +1 @@
1
- (function(_0x1eb483,_0x27cc57){const _0x55785a=a30_0x3396,_0x2f1962=_0x1eb483();while(!![]){try{const _0x29bcd9=parseInt(_0x55785a(0xd6))/0x1*(-parseInt(_0x55785a(0xbc))/0x2)+parseInt(_0x55785a(0xc2))/0x3+parseInt(_0x55785a(0xb5))/0x4+parseInt(_0x55785a(0xd3))/0x5*(parseInt(_0x55785a(0xd8))/0x6)+parseInt(_0x55785a(0xc1))/0x7+-parseInt(_0x55785a(0xc9))/0x8*(parseInt(_0x55785a(0xba))/0x9)+-parseInt(_0x55785a(0xda))/0xa;if(_0x29bcd9===_0x27cc57)break;else _0x2f1962['push'](_0x2f1962['shift']());}catch(_0x5bbd66){_0x2f1962['push'](_0x2f1962['shift']());}}}(a30_0x49da,0xb161d));import{spawn}from'child_process';const activeProcesses=new Map();function a30_0x49da(){const _0x53bf2a=['27bzBFda','get','20OaVYIr','unref','env','error','\x0a[Process\x20running\x20in\x20background,\x20PID:\x20','9407356qSGzAb','1703088cjvmLj','No\x20active\x20processes','cwd','close','keys','pid','delete','1977272LcsPIV','[PID\x20','message','kill','slice','set','size','child','Sent\x20to\x20PID\x20','from','1210855rsUXlw','platform','output','15027FHmDjL','stdout','12ojZsOF','stdin','8168990VjwWZR','length','data','cmd.exe','win32','157028uYGpBn','write','/bin/sh','has','toString'];a30_0x49da=function(){return _0x53bf2a;};return a30_0x49da();}export async function runCommand(_0x47ee17,_0x31416c,_0x269aa2=![],_0xea30bf=0x7530){return new Promise(_0x222209=>{const _0x4241ef=a30_0x3396,_0x2ae7ba=process[_0x4241ef(0xd4)]===_0x4241ef(0xb4),_0x9a531e=_0x2ae7ba?_0x4241ef(0xb3):_0x4241ef(0xb7),_0x1d2088=_0x2ae7ba?'/c':'-c',_0x38bfec=spawn(_0x9a531e,[_0x1d2088,_0x47ee17],{'cwd':process[_0x4241ef(0xc4)](),'env':process[_0x4241ef(0xbe)],'detached':_0x269aa2,'stdio':'pipe'}),_0x52f6ed=_0x38bfec[_0x4241ef(0xc7)]||0x0;let _0x1a3eb5='',_0x320f96='',_0x1a749d=![];_0x52f6ed&&activeProcesses[_0x4241ef(0xce)](_0x52f6ed,{'child':_0x38bfec,'output':''});const _0xa8670d=setTimeout(()=>{const _0x2ad469=_0x4241ef;if(!_0x1a749d){_0x1a749d=!![];if(_0x269aa2&&_0x38bfec[_0x2ad469(0xbd)])_0x38bfec['unref']();_0x222209({'success':!![],'stdout':_0x1a3eb5+(_0x2ad469(0xc0)+_0x52f6ed+']'),'stderr':_0x320f96,'exitCode':0x0,'pid':_0x52f6ed});}},_0xea30bf);_0x38bfec[_0x4241ef(0xd7)]?.['on'](_0x4241ef(0xb2),_0x22510e=>{const _0x36e592=_0x4241ef,_0x19e796=_0x22510e['toString']();_0x1a3eb5+=_0x19e796;if(_0x52f6ed&&activeProcesses[_0x36e592(0xb8)](_0x52f6ed)){const _0x1943ef=activeProcesses[_0x36e592(0xbb)](_0x52f6ed);_0x1943ef[_0x36e592(0xd5)]+=_0x19e796;}if(!_0x1a749d&&_0x31416c)_0x31416c(_0x19e796);}),_0x38bfec['stderr']?.['on'](_0x4241ef(0xb2),_0x36def9=>{const _0x5b19dd=_0x4241ef,_0x212022=_0x36def9[_0x5b19dd(0xb9)]();_0x320f96+=_0x212022;if(_0x52f6ed&&activeProcesses[_0x5b19dd(0xb8)](_0x52f6ed)){const _0x311135=activeProcesses[_0x5b19dd(0xbb)](_0x52f6ed);_0x311135[_0x5b19dd(0xd5)]+=_0x212022;}if(!_0x1a749d&&_0x31416c)_0x31416c(_0x212022);}),_0x38bfec['on'](_0x4241ef(0xc5),_0x3f1669=>{const _0x3ad9b0=_0x4241ef;clearTimeout(_0xa8670d);if(_0x52f6ed)activeProcesses[_0x3ad9b0(0xc8)](_0x52f6ed);!_0x1a749d&&(_0x1a749d=!![],_0x222209({'success':_0x3f1669===0x0,'stdout':_0x1a3eb5,'stderr':_0x320f96,'exitCode':_0x3f1669||0x0,'pid':_0x52f6ed}));}),_0x38bfec['on'](_0x4241ef(0xbf),_0x41d532=>{const _0x334b06=_0x4241ef;clearTimeout(_0xa8670d);if(_0x52f6ed)activeProcesses[_0x334b06(0xc8)](_0x52f6ed);!_0x1a749d&&(_0x1a749d=!![],_0x222209({'success':![],'stdout':_0x1a3eb5,'stderr':_0x41d532[_0x334b06(0xcb)],'exitCode':0x1,'pid':_0x52f6ed}));});});}function a30_0x3396(_0x31d8d0,_0x493f73){_0x31d8d0=_0x31d8d0-0xb1;const _0x49da6f=a30_0x49da();let _0x3396b4=_0x49da6f[_0x31d8d0];return _0x3396b4;}export function readTerminalOutput(_0x4951ae){const _0x1e265b=a30_0x3396,_0x267197=Array[_0x1e265b(0xd2)](activeProcesses['keys']());if(_0x4951ae&&activeProcesses[_0x1e265b(0xb8)](_0x4951ae)){const _0x458ca7=activeProcesses[_0x1e265b(0xbb)](_0x4951ae);return{'output':_0x458ca7[_0x1e265b(0xd5)][_0x1e265b(0xcd)](-0x7d0),'running':!![],'pids':_0x267197};}let _0x55c3d0='';for(const [_0x51e3f1,_0x40f29d]of activeProcesses){_0x55c3d0+=_0x1e265b(0xca)+_0x51e3f1+']\x0a'+_0x40f29d[_0x1e265b(0xd5)]['slice'](-0x3e8)+'\x0a';}return{'output':_0x55c3d0||_0x1e265b(0xc3),'running':_0x267197[_0x1e265b(0xb1)]>0x0,'pids':_0x267197};}export function sendTerminalInput(_0x238fd8,_0x486a21){const _0x455179=a30_0x3396;if(_0x486a21&&activeProcesses[_0x455179(0xb8)](_0x486a21)){const _0x2d8626=activeProcesses[_0x455179(0xbb)](_0x486a21);return _0x2d8626['child']['stdin']?.[_0x455179(0xb6)](_0x238fd8+'\x0a'),{'success':!![],'message':_0x455179(0xd1)+_0x486a21};}for(const [_0x1a2752,_0x5685ba]of activeProcesses){return _0x5685ba[_0x455179(0xd0)][_0x455179(0xd9)]?.[_0x455179(0xb6)](_0x238fd8+'\x0a'),{'success':!![],'message':_0x455179(0xd1)+_0x1a2752};}return{'success':![],'message':'No\x20active\x20processes'};}export function terminateProcess(_0x3f9dbf){const _0x28455c=a30_0x3396;if(_0x3f9dbf&&activeProcesses['has'](_0x3f9dbf)){const _0x1d191c=activeProcesses[_0x28455c(0xbb)](_0x3f9dbf);return _0x1d191c[_0x28455c(0xd0)][_0x28455c(0xcc)](),activeProcesses[_0x28455c(0xc8)](_0x3f9dbf),{'success':!![],'message':'Terminated\x20PID\x20'+_0x3f9dbf};}if(activeProcesses[_0x28455c(0xcf)]>0x0)for(const [_0x1f5806,_0x353bec]of activeProcesses){return _0x353bec[_0x28455c(0xd0)]['kill'](),activeProcesses[_0x28455c(0xc8)](_0x1f5806),{'success':!![],'message':'Terminated\x20PID\x20'+_0x1f5806};}return{'success':![],'message':_0x28455c(0xc3)};}export function getActiveProcesses(){const _0x3c73aa=a30_0x3396;return Array[_0x3c73aa(0xd2)](activeProcesses[_0x3c73aa(0xc6)]());}
1
+ function a30_0xcf66(){const _0x40bc26=['write','message','length','1750175TTkgwu','child','env','Terminated\x20PID\x20','kill','output','1016638bYybIa','get','pid','win32','[PID\x20','29DfRSTo','79680raFqsq','has','cwd','data','error','unref','125973GAGpng','166432GZiUBo','platform','stdout','slice','8054qDuSHM','2244534QmCPRc','stderr','from','pipe','88gyLuZk','delete','close','toString','stdin','set','Sent\x20to\x20PID\x20','No\x20active\x20processes','keys','/bin/sh'];a30_0xcf66=function(){return _0x40bc26;};return a30_0xcf66();}(function(_0x3987e4,_0x25ca18){const _0x2bd81c=a30_0x5048,_0x4245b4=_0x3987e4();while(!![]){try{const _0x3100fd=-parseInt(_0x2bd81c(0x197))/0x1*(parseInt(_0x2bd81c(0x17a))/0x2)+parseInt(_0x2bd81c(0x198))/0x3+-parseInt(_0x2bd81c(0x176))/0x4+-parseInt(_0x2bd81c(0x18c))/0x5+parseInt(_0x2bd81c(0x17b))/0x6+parseInt(_0x2bd81c(0x192))/0x7+parseInt(_0x2bd81c(0x17f))/0x8*(parseInt(_0x2bd81c(0x175))/0x9);if(_0x3100fd===_0x25ca18)break;else _0x4245b4['push'](_0x4245b4['shift']());}catch(_0x3e6b79){_0x4245b4['push'](_0x4245b4['shift']());}}}(a30_0xcf66,0x2ebc0));function a30_0x5048(_0x29753a,_0x397fe7){_0x29753a=_0x29753a-0x170;const _0xcf6652=a30_0xcf66();let _0x5048e5=_0xcf6652[_0x29753a];return _0x5048e5;}import{spawn}from'child_process';const activeProcesses=new Map();export async function runCommand(_0x95a7ad,_0x5d5e2b,_0x547572=![],_0x4f956d=0x7530){return new Promise(_0x134b52=>{const _0x2b2525=a30_0x5048,_0x307ed5=process[_0x2b2525(0x177)]===_0x2b2525(0x195),_0x40e26a=_0x307ed5?'cmd.exe':_0x2b2525(0x188),_0x281ee4=_0x307ed5?'/c':'-c',_0x3cfbd6=spawn(_0x40e26a,[_0x281ee4,_0x95a7ad],{'cwd':process[_0x2b2525(0x171)](),'env':process[_0x2b2525(0x18e)],'detached':_0x547572,'stdio':_0x2b2525(0x17e)}),_0x50e9d5=_0x3cfbd6[_0x2b2525(0x194)]||0x0;let _0x26f7a='',_0x34583d='',_0x3d130f=![];_0x50e9d5&&activeProcesses[_0x2b2525(0x184)](_0x50e9d5,{'child':_0x3cfbd6,'output':''});const _0x239c28=setTimeout(()=>{const _0x11490d=_0x2b2525;if(!_0x3d130f){_0x3d130f=!![];if(_0x547572&&_0x3cfbd6['unref'])_0x3cfbd6[_0x11490d(0x174)]();_0x134b52({'success':!![],'stdout':_0x26f7a+('\x0a[Process\x20running\x20in\x20background,\x20PID:\x20'+_0x50e9d5+']'),'stderr':_0x34583d,'exitCode':0x0,'pid':_0x50e9d5});}},_0x4f956d);_0x3cfbd6[_0x2b2525(0x178)]?.['on'](_0x2b2525(0x172),_0x3b3ec4=>{const _0xb33e2d=_0x2b2525,_0x374a51=_0x3b3ec4[_0xb33e2d(0x182)]();_0x26f7a+=_0x374a51;if(_0x50e9d5&&activeProcesses[_0xb33e2d(0x170)](_0x50e9d5)){const _0x1348df=activeProcesses[_0xb33e2d(0x193)](_0x50e9d5);_0x1348df[_0xb33e2d(0x191)]+=_0x374a51;}if(!_0x3d130f&&_0x5d5e2b)_0x5d5e2b(_0x374a51);}),_0x3cfbd6[_0x2b2525(0x17c)]?.['on']('data',_0x3f4c46=>{const _0x2586a3=_0x2b2525,_0x120733=_0x3f4c46[_0x2586a3(0x182)]();_0x34583d+=_0x120733;if(_0x50e9d5&&activeProcesses['has'](_0x50e9d5)){const _0x3c76a7=activeProcesses[_0x2586a3(0x193)](_0x50e9d5);_0x3c76a7[_0x2586a3(0x191)]+=_0x120733;}if(!_0x3d130f&&_0x5d5e2b)_0x5d5e2b(_0x120733);}),_0x3cfbd6['on'](_0x2b2525(0x181),_0x26836c=>{const _0x27cdfa=_0x2b2525;clearTimeout(_0x239c28);if(_0x50e9d5)activeProcesses[_0x27cdfa(0x180)](_0x50e9d5);!_0x3d130f&&(_0x3d130f=!![],_0x134b52({'success':_0x26836c===0x0,'stdout':_0x26f7a,'stderr':_0x34583d,'exitCode':_0x26836c||0x0,'pid':_0x50e9d5}));}),_0x3cfbd6['on'](_0x2b2525(0x173),_0x530527=>{const _0x2f923e=_0x2b2525;clearTimeout(_0x239c28);if(_0x50e9d5)activeProcesses[_0x2f923e(0x180)](_0x50e9d5);!_0x3d130f&&(_0x3d130f=!![],_0x134b52({'success':![],'stdout':_0x26f7a,'stderr':_0x530527[_0x2f923e(0x18a)],'exitCode':0x1,'pid':_0x50e9d5}));});});}export function readTerminalOutput(_0x47b7bf){const _0x3051d9=a30_0x5048,_0x21fba0=Array['from'](activeProcesses[_0x3051d9(0x187)]());if(_0x47b7bf&&activeProcesses['has'](_0x47b7bf)){const _0x2efc0b=activeProcesses[_0x3051d9(0x193)](_0x47b7bf);return{'output':_0x2efc0b[_0x3051d9(0x191)][_0x3051d9(0x179)](-0x7d0),'running':!![],'pids':_0x21fba0};}let _0x3ac3b9='';for(const [_0x2f66f5,_0x2589a2]of activeProcesses){_0x3ac3b9+=_0x3051d9(0x196)+_0x2f66f5+']\x0a'+_0x2589a2['output']['slice'](-0x3e8)+'\x0a';}return{'output':_0x3ac3b9||_0x3051d9(0x186),'running':_0x21fba0[_0x3051d9(0x18b)]>0x0,'pids':_0x21fba0};}export function sendTerminalInput(_0x11b207,_0x9f4e5b){const _0x227c5f=a30_0x5048;if(_0x9f4e5b&&activeProcesses[_0x227c5f(0x170)](_0x9f4e5b)){const _0x36e4ff=activeProcesses[_0x227c5f(0x193)](_0x9f4e5b);return _0x36e4ff[_0x227c5f(0x18d)][_0x227c5f(0x183)]?.[_0x227c5f(0x189)](_0x11b207+'\x0a'),{'success':!![],'message':'Sent\x20to\x20PID\x20'+_0x9f4e5b};}for(const [_0x1a9aa0,_0x550137]of activeProcesses){return _0x550137[_0x227c5f(0x18d)][_0x227c5f(0x183)]?.[_0x227c5f(0x189)](_0x11b207+'\x0a'),{'success':!![],'message':_0x227c5f(0x185)+_0x1a9aa0};}return{'success':![],'message':'No\x20active\x20processes'};}export function terminateProcess(_0x12991e){const _0x422bb3=a30_0x5048;if(_0x12991e&&activeProcesses[_0x422bb3(0x170)](_0x12991e)){const _0x515e1b=activeProcesses[_0x422bb3(0x193)](_0x12991e);return _0x515e1b[_0x422bb3(0x18d)][_0x422bb3(0x190)](),activeProcesses[_0x422bb3(0x180)](_0x12991e),{'success':!![],'message':_0x422bb3(0x18f)+_0x12991e};}if(activeProcesses['size']>0x0)for(const [_0x531f72,_0x26ef6b]of activeProcesses){return _0x26ef6b[_0x422bb3(0x18d)][_0x422bb3(0x190)](),activeProcesses['delete'](_0x531f72),{'success':!![],'message':_0x422bb3(0x18f)+_0x531f72};}return{'success':![],'message':_0x422bb3(0x186)};}export function getActiveProcesses(){const _0x3f157b=a30_0x5048;return Array[_0x3f157b(0x17d)](activeProcesses[_0x3f157b(0x187)]());}
@@ -1 +1 @@
1
- (function(_0xe797dc,_0x5d0ef6){const _0x320d7e=a31_0x5bcb,_0x36100c=_0xe797dc();while(!![]){try{const _0xe6c312=parseInt(_0x320d7e(0x1df))/0x1*(parseInt(_0x320d7e(0x211))/0x2)+parseInt(_0x320d7e(0x1e0))/0x3*(parseInt(_0x320d7e(0x208))/0x4)+parseInt(_0x320d7e(0x210))/0x5+parseInt(_0x320d7e(0x21e))/0x6*(parseInt(_0x320d7e(0x1dc))/0x7)+-parseInt(_0x320d7e(0x1ed))/0x8*(parseInt(_0x320d7e(0x219))/0x9)+-parseInt(_0x320d7e(0x20c))/0xa+-parseInt(_0x320d7e(0x1f3))/0xb*(-parseInt(_0x320d7e(0x1ef))/0xc);if(_0xe6c312===_0x5d0ef6)break;else _0x36100c['push'](_0x36100c['shift']());}catch(_0x682876){_0x36100c['push'](_0x36100c['shift']());}}}(a31_0x3543,0x4e469));import{readFileSync,writeFileSync,existsSync,readdirSync,statSync,mkdirSync,unlinkSync,renameSync,copyFileSync}from'fs';import{dirname,resolve,relative}from'path';import{trackFileCreate,trackFileModify}from'./rollback.js';export function createFile(_0x43550a,_0x2d0991){const _0x485090=a31_0x5bcb;try{const _0x5464e9=resolve(process[_0x485090(0x1f9)](),_0x43550a),_0x46d085=dirname(_0x5464e9);return!existsSync(_0x46d085)&&mkdirSync(_0x46d085,{'recursive':!![]}),writeFileSync(_0x5464e9,_0x2d0991,_0x485090(0x1e5)),trackFileCreate(_0x5464e9),{'success':!![],'message':_0x485090(0x214)+_0x43550a};}catch(_0x3a791c){return{'success':![],'message':_0x485090(0x1f6)+_0x43550a+':\x20'+_0x3a791c};}}export function readFile(_0x39ae65){const _0x17ebcb=a31_0x5bcb;try{const _0x4be155=resolve(process[_0x17ebcb(0x1f9)](),_0x39ae65);if(!existsSync(_0x4be155))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x39ae65};const _0x1469f6=[_0x17ebcb(0x22d),_0x17ebcb(0x202),_0x17ebcb(0x22b),_0x17ebcb(0x22a),_0x17ebcb(0x220),_0x17ebcb(0x221),_0x17ebcb(0x1f2)],_0x4bb4e8=_0x4be155[_0x17ebcb(0x216)]('.')[_0x17ebcb(0x22e)]()?.[_0x17ebcb(0x1f7)]();if(_0x4bb4e8&&_0x1469f6[_0x17ebcb(0x1fa)]('.'+_0x4bb4e8))return{'success':![],'message':_0x17ebcb(0x215)+_0x4bb4e8+_0x17ebcb(0x1fc)};const _0x5f43fe=readFileSync(_0x4be155,_0x17ebcb(0x1e5));return{'success':!![],'content':_0x5f43fe,'message':'Read\x20'+_0x39ae65};}catch(_0x5184e8){return{'success':![],'message':_0x17ebcb(0x20f)+_0x39ae65+':\x20'+_0x5184e8};}}function a31_0x5bcb(_0x5bc962,_0x2d0ab7){_0x5bc962=_0x5bc962-0x1dc;const _0x354310=a31_0x3543();let _0x5bcbf2=_0x354310[_0x5bc962];return _0x5bcbf2;}export function listDirectory(_0x38de4c='.'){const _0xaf5ee6=a31_0x5bcb;try{const _0x240e33=resolve(process['cwd'](),_0x38de4c);if(!existsSync(_0x240e33))return{'success':![],'message':_0xaf5ee6(0x1f8)+_0x38de4c};const _0xb4328b=readdirSync(_0x240e33),_0x5e3378=_0xb4328b[_0xaf5ee6(0x1de)](_0x36cd73=>{const _0x5b0793=_0xaf5ee6,_0x7ceb4b=resolve(_0x240e33,_0x36cd73),_0x252085=statSync(_0x7ceb4b);return{'name':_0x36cd73,'type':_0x252085[_0x5b0793(0x1e4)]()?_0x5b0793(0x1f0):_0x5b0793(0x1eb),'size':_0x252085[_0x5b0793(0x223)]()?_0x252085['size']:undefined};});return{'success':!![],'entries':_0x5e3378,'message':'Listed\x20'+_0x5e3378[_0xaf5ee6(0x231)]+_0xaf5ee6(0x203)+_0x38de4c};}catch(_0x2ee046){return{'success':![],'message':'Failed\x20to\x20list\x20'+_0x38de4c+':\x20'+_0x2ee046};}}export function editFile(_0x4d0429,_0x3b9304,_0x3b7a56){const _0x354e11=a31_0x5bcb;try{const _0x53c4ff=resolve(process[_0x354e11(0x1f9)](),_0x4d0429);if(!existsSync(_0x53c4ff))return{'success':![],'message':_0x354e11(0x1fb)+_0x4d0429};const _0x35982f=readFileSync(_0x53c4ff,_0x354e11(0x1e5));let _0x4ce290=_0x3b9304;if(!_0x35982f['includes'](_0x3b9304)){const _0xb921ac=_0x35982f['replace'](/\r\n/g,'\x0a'),_0x3545d7=_0x3b9304[_0x354e11(0x230)](/\r\n/g,'\x0a');if(_0xb921ac[_0x354e11(0x1fa)](_0x3545d7))_0x4ce290=_0x3545d7;else{const _0x4cce52=_0x3545d7[_0x354e11(0x216)]('\x0a')[_0x354e11(0x1de)](_0xe38979=>_0xe38979['trim']()),_0x4aa95f=_0xb921ac[_0x354e11(0x216)]('\x0a');let _0x5ee82d=-0x1;for(let _0x2f83d4=0x0;_0x2f83d4<=_0x4aa95f[_0x354e11(0x231)]-_0x4cce52[_0x354e11(0x231)];_0x2f83d4++){let _0x51a5ce=!![];for(let _0x496a72=0x0;_0x496a72<_0x4cce52['length'];_0x496a72++){if(_0x4aa95f[_0x2f83d4+_0x496a72][_0x354e11(0x1e7)]()!==_0x4cce52[_0x496a72]){_0x51a5ce=![];break;}}if(_0x51a5ce){_0x5ee82d=_0x2f83d4;break;}}if(_0x5ee82d!==-0x1)_0x4ce290=_0x4aa95f['slice'](_0x5ee82d,_0x5ee82d+_0x4cce52[_0x354e11(0x231)])['join']('\x0a');else return{'success':![],'message':'Search\x20string\x20not\x20found\x20in\x20'+_0x4d0429+'.\x20Note:\x20The\x20search\x20string\x20must\x20be\x20an\x20EXACT\x20match\x20including\x20all\x20whitespace\x20and\x20indentation.\x20Try\x20using\x20update_file\x20to\x20completely\x20replace\x20the\x20content.'};}}trackFileModify(_0x53c4ff,_0x35982f);const _0x47ec9a=_0x35982f[_0x354e11(0x230)](_0x4ce290,_0x3b7a56);return writeFileSync(_0x53c4ff,_0x47ec9a,_0x354e11(0x1e5)),{'success':!![],'message':'Edited\x20'+_0x4d0429};}catch(_0x4de178){return{'success':![],'message':_0x354e11(0x20d)+_0x4d0429+':\x20'+_0x4de178};}}export function updateFile(_0x164f8a,_0x484049){const _0x3ecdb8=a31_0x5bcb;try{const _0x10e384=resolve(process[_0x3ecdb8(0x1f9)](),_0x164f8a);if(!existsSync(_0x10e384))return{'success':![],'message':_0x3ecdb8(0x1fb)+_0x164f8a};return trackFileModify(_0x10e384,readFileSync(_0x10e384,_0x3ecdb8(0x1e5))),writeFileSync(_0x10e384,_0x484049,_0x3ecdb8(0x1e5)),{'success':!![],'message':_0x3ecdb8(0x1fe)+_0x164f8a};}catch(_0x50bcdf){return{'success':![],'message':_0x3ecdb8(0x205)+_0x164f8a+':\x20'+_0x50bcdf};}}export function appendFile(_0x34ce89,_0xf86fdc){const _0x16c6a5=a31_0x5bcb;try{const _0x3e7916=resolve(process[_0x16c6a5(0x1f9)](),_0x34ce89);if(!existsSync(_0x3e7916))return{'success':![],'message':_0x16c6a5(0x1fb)+_0x34ce89};const _0x5930bf=readFileSync(_0x3e7916,_0x16c6a5(0x1e5));return trackFileModify(_0x3e7916,_0x5930bf),writeFileSync(_0x3e7916,_0x5930bf+(_0x5930bf['endsWith']('\x5cn')?'':'\x5cn')+_0xf86fdc,'utf-8'),{'success':!![],'message':'Appended\x20to\x20'+_0x34ce89};}catch(_0x52f483){return{'success':![],'message':_0x16c6a5(0x227)+_0x34ce89+':\x20'+_0x52f483};}}export function searchFile(_0x130d2a,_0x155d76){const _0x3291e5=a31_0x5bcb;try{const _0x4b6b17=resolve(process[_0x3291e5(0x1f9)](),_0x130d2a);if(!existsSync(_0x4b6b17))return{'success':![],'message':_0x3291e5(0x1fb)+_0x130d2a};const _0x5436c9=readFileSync(_0x4b6b17,'utf-8'),_0x3485ae=new RegExp(_0x155d76,'g'),_0x432e1d=_0x5436c9[_0x3291e5(0x20e)](_0x3485ae)||[],_0x59c000=_0x5436c9[_0x3291e5(0x216)]('\x0a'),_0x375f6b=_0x59c000[_0x3291e5(0x1e9)]((_0x686b40,_0x33c11f)=>new RegExp(_0x155d76)[_0x3291e5(0x21d)](_0x686b40));return{'success':!![],'matches':_0x375f6b,'message':_0x3291e5(0x213)+_0x375f6b['length']+_0x3291e5(0x217)+_0x130d2a};}catch(_0x3240de){return{'success':![],'message':_0x3291e5(0x207)+_0x130d2a+':\x20'+_0x3240de};}}export function findFiles(_0x2efa7c,_0x47816f){const _0x5b060f=a31_0x5bcb;try{const _0x4f7556=resolve(process[_0x5b060f(0x1f9)](),_0x2efa7c);if(!existsSync(_0x4f7556))return{'success':![],'message':'Directory\x20not\x20found:\x20'+_0x2efa7c};const _0x196284=[],_0x5b6002=new RegExp(_0x47816f,'i');function _0x1b634c(_0x32dd55){const _0x19f4cd=_0x5b060f,_0x190890=readdirSync(_0x32dd55);for(const _0x22d9b9 of _0x190890){if(_0x22d9b9[_0x19f4cd(0x21b)]('.')||_0x22d9b9==='node_modules')continue;const _0x411e69=resolve(_0x32dd55,_0x22d9b9),_0x5cbfd4=statSync(_0x411e69);if(_0x5cbfd4[_0x19f4cd(0x1e4)]())_0x1b634c(_0x411e69);else _0x5b6002[_0x19f4cd(0x21d)](_0x22d9b9)&&_0x196284[_0x19f4cd(0x1f1)](relative(_0x4f7556,_0x411e69));}}return _0x1b634c(_0x4f7556),{'success':!![],'files':_0x196284[_0x5b060f(0x22c)](0x0,0x32),'message':_0x5b060f(0x213)+_0x196284['length']+_0x5b060f(0x204)+_0x47816f+'\x22'};}catch(_0x4d69d4){return{'success':![],'message':'Failed\x20to\x20find\x20files:\x20'+_0x4d69d4};}}export function searchDirectory(_0x513bf2,_0x5b30fb){const _0x1d9ed7=a31_0x5bcb;try{const _0x3cc6ad=resolve(process[_0x1d9ed7(0x1f9)](),_0x513bf2);if(!existsSync(_0x3cc6ad))return{'success':![],'message':_0x1d9ed7(0x1f8)+_0x513bf2};const _0x3f9fd6=[],_0x5221b0=new RegExp(_0x5b30fb,'i'),_0x591d60=[_0x1d9ed7(0x20b),_0x1d9ed7(0x229),_0x1d9ed7(0x226),_0x1d9ed7(0x1dd),'.json',_0x1d9ed7(0x212),'.txt',_0x1d9ed7(0x1fd),_0x1d9ed7(0x209),_0x1d9ed7(0x1e2),_0x1d9ed7(0x21c),'.rs'];function _0x2cecce(_0x2b09c2){const _0x5cb5b1=_0x1d9ed7,_0x1db7dc=readdirSync(_0x2b09c2);for(const _0x3eaa23 of _0x1db7dc){if(_0x3eaa23[_0x5cb5b1(0x21b)]('.')||_0x3eaa23==='node_modules')continue;const _0x26219f=resolve(_0x2b09c2,_0x3eaa23),_0x189e33=statSync(_0x26219f);if(_0x189e33[_0x5cb5b1(0x1e4)]())_0x2cecce(_0x26219f);else{const _0x15db58='.'+_0x3eaa23[_0x5cb5b1(0x216)]('.')['pop']()?.[_0x5cb5b1(0x1f7)]();if(_0x591d60['includes'](_0x15db58))try{const _0x216575=readFileSync(_0x26219f,'utf-8'),_0x44819b=_0x216575[_0x5cb5b1(0x216)]('\x0a');_0x44819b[_0x5cb5b1(0x20a)]((_0x5d17bf,_0x2b1a59)=>{const _0x1cf4a2=_0x5cb5b1;_0x5221b0[_0x1cf4a2(0x21d)](_0x5d17bf)&&_0x3f9fd6['push']({'file':relative(_0x3cc6ad,_0x26219f),'line':_0x2b1a59+0x1,'content':_0x5d17bf['trim']()['substring'](0x0,0x64)});});}catch{}}}}return _0x2cecce(_0x3cc6ad),{'success':!![],'results':_0x3f9fd6[_0x1d9ed7(0x22c)](0x0,0x1e),'message':_0x1d9ed7(0x213)+_0x3f9fd6[_0x1d9ed7(0x231)]+_0x1d9ed7(0x228)+_0x5b30fb+'\x22'};}catch(_0x3e8922){return{'success':![],'message':_0x1d9ed7(0x1ea)+_0x3e8922};}}export function deleteFile(_0x56b1d4){const _0x4c5662=a31_0x5bcb;try{const _0x32465d=resolve(process[_0x4c5662(0x1f9)](),_0x56b1d4);if(!existsSync(_0x32465d))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x56b1d4};return unlinkSync(_0x32465d),{'success':!![],'message':_0x4c5662(0x21f)+_0x56b1d4};}catch(_0x392bcf){return{'success':![],'message':'Failed\x20to\x20delete\x20'+_0x56b1d4+':\x20'+_0x392bcf};}}function a31_0x3543(){const _0x348e54=['toLowerCase','Directory\x20not\x20found:\x20','cwd','includes','File\x20not\x20found:\x20',').\x20Use\x20\x27computer_screenshot\x27\x20or\x20specific\x20tools\x20to\x20handle\x20this\x20file\x20type.\x20Direct\x20reading\x20is\x20not\x20supported.]','.css','Updated\x20','\x20of\x20','Renamed\x20','toISOString','.jpg','\x20items\x20in\x20','\x20files\x20matching\x20\x22','Failed\x20to\x20update\x20','Failed\x20to\x20copy:\x20','Failed\x20to\x20search\x20','61016lhjEEr','.html','forEach','.ts','3573840DrikPR','Failed\x20to\x20edit\x20','match','Failed\x20to\x20read\x20','485150XMGDpm','714CjSJfZ','.md','Found\x20','Created\x20','[Binary\x20file\x20detected\x20(.','split','\x20output\x20matches\x20in\x20','max','18nCHBdZ','Copied\x20','startsWith','.go','test','6dCDygs','Deleted\x20','.exe','.dll','mtime','isFile','toString','Lines\x20','.tsx','Failed\x20to\x20append\x20to\x20','\x20matches\x20for\x20\x22','.js','.gif','.jpeg','slice','.png','pop','Info\x20for\x20','replace','length','2135805NkeGZT','.jsx','map','1453WOJNiY','6PNQFRs','mode','.py','Failed\x20to\x20read\x20lines:\x20','isDirectory','utf-8','birthtime','trim','\x20to\x20','filter','Failed\x20to\x20search\x20directory:\x20','file','min','1875208mVZNQS','join','156BMZSJf','directory','push','.bin','165363SVZnqx','Failed\x20to\x20get\x20info:\x20','Failed\x20to\x20rename:\x20','Failed\x20to\x20create\x20'];a31_0x3543=function(){return _0x348e54;};return a31_0x3543();}export function renameFile(_0x15273e,_0xcdbd5a){const _0x377a26=a31_0x5bcb;try{const _0x2b2aad=resolve(process['cwd'](),_0x15273e),_0x2f5898=resolve(process[_0x377a26(0x1f9)](),_0xcdbd5a);if(!existsSync(_0x2b2aad))return{'success':![],'message':_0x377a26(0x1fb)+_0x15273e};const _0x107bab=dirname(_0x2f5898);return!existsSync(_0x107bab)&&mkdirSync(_0x107bab,{'recursive':!![]}),renameSync(_0x2b2aad,_0x2f5898),{'success':!![],'message':_0x377a26(0x200)+_0x15273e+_0x377a26(0x1e8)+_0xcdbd5a};}catch(_0x59114e){return{'success':![],'message':_0x377a26(0x1f5)+_0x59114e};}}export function copyFile(_0x1ee829,_0x4cf666){const _0x12ffd3=a31_0x5bcb;try{const _0x4d44a5=resolve(process[_0x12ffd3(0x1f9)](),_0x1ee829),_0x2dd21c=resolve(process[_0x12ffd3(0x1f9)](),_0x4cf666);if(!existsSync(_0x4d44a5))return{'success':![],'message':_0x12ffd3(0x1fb)+_0x1ee829};const _0x4d6249=dirname(_0x2dd21c);return!existsSync(_0x4d6249)&&mkdirSync(_0x4d6249,{'recursive':!![]}),copyFileSync(_0x4d44a5,_0x2dd21c),{'success':!![],'message':_0x12ffd3(0x21a)+_0x1ee829+_0x12ffd3(0x1e8)+_0x4cf666};}catch(_0x4f12bd){return{'success':![],'message':_0x12ffd3(0x206)+_0x4f12bd};}}export function fileInfo(_0x4d383f){const _0x53781a=a31_0x5bcb;try{const _0x3d716d=resolve(process[_0x53781a(0x1f9)](),_0x4d383f);if(!existsSync(_0x3d716d))return{'success':![],'message':_0x53781a(0x1fb)+_0x4d383f};const _0x44cd7e=statSync(_0x3d716d);return{'success':!![],'info':{'size':_0x44cd7e['size'],'modified':_0x44cd7e[_0x53781a(0x222)][_0x53781a(0x201)](),'created':_0x44cd7e[_0x53781a(0x1e6)]['toISOString'](),'isDirectory':_0x44cd7e['isDirectory'](),'permissions':_0x44cd7e[_0x53781a(0x1e1)][_0x53781a(0x224)](0x8)},'message':_0x53781a(0x22f)+_0x4d383f};}catch(_0x47f363){return{'success':![],'message':_0x53781a(0x1f4)+_0x47f363};}}export function readFileLines(_0x1a09da,_0x247c5b,_0x514a3f){const _0x56f7fe=a31_0x5bcb;try{const _0x312529=resolve(process['cwd'](),_0x1a09da);if(!existsSync(_0x312529))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x1a09da};const _0x6e0e07=readFileSync(_0x312529,'utf-8'),_0x140f94=_0x6e0e07[_0x56f7fe(0x216)]('\x0a'),_0x672f3f=Math[_0x56f7fe(0x218)](0x0,_0x247c5b-0x1),_0x8b5ea3=Math[_0x56f7fe(0x1ec)](_0x140f94[_0x56f7fe(0x231)],_0x514a3f),_0x18eabd=_0x140f94['slice'](_0x672f3f,_0x8b5ea3)[_0x56f7fe(0x1ee)]('\x0a');return{'success':!![],'content':_0x18eabd,'message':_0x56f7fe(0x225)+_0x247c5b+'-'+_0x514a3f+_0x56f7fe(0x1ff)+_0x1a09da};}catch(_0x434789){return{'success':![],'message':_0x56f7fe(0x1e3)+_0x434789};}}
1
+ function a31_0x853d(_0x5519a4,_0x2a484b){_0x5519a4=_0x5519a4-0x1dd;const _0xf8e02c=a31_0xf8e0();let _0x853df9=_0xf8e02c[_0x5519a4];return _0x853df9;}(function(_0xc30c17,_0x1d6588){const _0x1ebe47=a31_0x853d,_0xf0949f=_0xc30c17();while(!![]){try{const _0x476831=parseInt(_0x1ebe47(0x21f))/0x1*(parseInt(_0x1ebe47(0x1fe))/0x2)+parseInt(_0x1ebe47(0x1e1))/0x3*(-parseInt(_0x1ebe47(0x228))/0x4)+parseInt(_0x1ebe47(0x20d))/0x5+parseInt(_0x1ebe47(0x1e9))/0x6*(parseInt(_0x1ebe47(0x21b))/0x7)+parseInt(_0x1ebe47(0x22a))/0x8+parseInt(_0x1ebe47(0x227))/0x9*(parseInt(_0x1ebe47(0x200))/0xa)+-parseInt(_0x1ebe47(0x1ff))/0xb;if(_0x476831===_0x1d6588)break;else _0xf0949f['push'](_0xf0949f['shift']());}catch(_0x176411){_0xf0949f['push'](_0xf0949f['shift']());}}}(a31_0xf8e0,0xca434));import{readFileSync,writeFileSync,existsSync,readdirSync,statSync,mkdirSync,unlinkSync,renameSync,copyFileSync}from'fs';import{dirname,resolve,relative}from'path';import{trackFileCreate,trackFileModify}from'./rollback.js';export function createFile(_0x579539,_0x3e3b3d){const _0x5a68cb=a31_0x853d;try{const _0x507f47=resolve(process[_0x5a68cb(0x218)](),_0x579539),_0x1a9f3d=dirname(_0x507f47);return!existsSync(_0x1a9f3d)&&mkdirSync(_0x1a9f3d,{'recursive':!![]}),writeFileSync(_0x507f47,_0x3e3b3d,_0x5a68cb(0x219)),trackFileCreate(_0x507f47),{'success':!![],'message':_0x5a68cb(0x203)+_0x579539};}catch(_0x48201a){return{'success':![],'message':_0x5a68cb(0x1eb)+_0x579539+':\x20'+_0x48201a};}}export function readFile(_0x4a4ebb){const _0x2c2b9b=a31_0x853d;try{const _0x5eb006=resolve(process[_0x2c2b9b(0x218)](),_0x4a4ebb);if(!existsSync(_0x5eb006))return{'success':![],'message':_0x2c2b9b(0x1f2)+_0x4a4ebb};const _0xa5c992=['.png','.jpg',_0x2c2b9b(0x1fd),_0x2c2b9b(0x1e8),_0x2c2b9b(0x216),'.dll','.bin'],_0xdd21fb=_0x5eb006[_0x2c2b9b(0x20c)]('.')[_0x2c2b9b(0x214)]()?.[_0x2c2b9b(0x1ef)]();if(_0xdd21fb&&_0xa5c992[_0x2c2b9b(0x1ea)]('.'+_0xdd21fb))return{'success':![],'message':_0x2c2b9b(0x212)+_0xdd21fb+_0x2c2b9b(0x217)};const _0x42667b=readFileSync(_0x5eb006,_0x2c2b9b(0x219));return{'success':!![],'content':_0x42667b,'message':_0x2c2b9b(0x1f4)+_0x4a4ebb};}catch(_0x24a7c4){return{'success':![],'message':_0x2c2b9b(0x1ec)+_0x4a4ebb+':\x20'+_0x24a7c4};}}export function listDirectory(_0x5cb323='.'){const _0x55a5e8=a31_0x853d;try{const _0x4c4c9c=resolve(process[_0x55a5e8(0x218)](),_0x5cb323);if(!existsSync(_0x4c4c9c))return{'success':![],'message':_0x55a5e8(0x1ed)+_0x5cb323};const _0x3d148c=readdirSync(_0x4c4c9c),_0x25a0c3=_0x3d148c['map'](_0x42f20e=>{const _0x3b7787=_0x55a5e8,_0x232253=resolve(_0x4c4c9c,_0x42f20e),_0x312153=statSync(_0x232253);return{'name':_0x42f20e,'type':_0x312153[_0x3b7787(0x222)]()?_0x3b7787(0x201):'file','size':_0x312153[_0x3b7787(0x22f)]()?_0x312153[_0x3b7787(0x229)]:undefined};});return{'success':!![],'entries':_0x25a0c3,'message':_0x55a5e8(0x1e5)+_0x25a0c3['length']+_0x55a5e8(0x1df)+_0x5cb323};}catch(_0x3f43e2){return{'success':![],'message':_0x55a5e8(0x21a)+_0x5cb323+':\x20'+_0x3f43e2};}}export function editFile(_0x2c9e5d,_0x4283f1,_0x20e7ad){const _0x16c7fd=a31_0x853d;try{const _0x568ac5=resolve(process[_0x16c7fd(0x218)](),_0x2c9e5d);if(!existsSync(_0x568ac5))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x2c9e5d};const _0xa0a361=readFileSync(_0x568ac5,_0x16c7fd(0x219));let _0x2722b9=_0x4283f1;if(!_0xa0a361[_0x16c7fd(0x1ea)](_0x4283f1)){const _0x22120a=_0xa0a361[_0x16c7fd(0x210)](/\r\n/g,'\x0a'),_0x545581=_0x4283f1[_0x16c7fd(0x210)](/\r\n/g,'\x0a');if(_0x22120a['includes'](_0x545581))_0x2722b9=_0x545581;else{const _0x5f414a=_0x545581[_0x16c7fd(0x20c)]('\x0a')[_0x16c7fd(0x1de)](_0x1ef0a1=>_0x1ef0a1[_0x16c7fd(0x211)]()),_0x507bea=_0x22120a[_0x16c7fd(0x20c)]('\x0a');let _0x3f9813=-0x1;for(let _0x2d0a47=0x0;_0x2d0a47<=_0x507bea['length']-_0x5f414a['length'];_0x2d0a47++){let _0xa4be2b=!![];for(let _0x488ef5=0x0;_0x488ef5<_0x5f414a[_0x16c7fd(0x1f7)];_0x488ef5++){if(_0x507bea[_0x2d0a47+_0x488ef5][_0x16c7fd(0x211)]()!==_0x5f414a[_0x488ef5]){_0xa4be2b=![];break;}}if(_0xa4be2b){_0x3f9813=_0x2d0a47;break;}}if(_0x3f9813!==-0x1)_0x2722b9=_0x507bea[_0x16c7fd(0x22e)](_0x3f9813,_0x3f9813+_0x5f414a[_0x16c7fd(0x1f7)])[_0x16c7fd(0x22c)]('\x0a');else return{'success':![],'message':'Search\x20string\x20not\x20found\x20in\x20'+_0x2c9e5d+_0x16c7fd(0x20b)};}}trackFileModify(_0x568ac5,_0xa0a361);const _0x25dbe5=_0xa0a361[_0x16c7fd(0x210)](_0x2722b9,_0x20e7ad);return writeFileSync(_0x568ac5,_0x25dbe5,_0x16c7fd(0x219)),{'success':!![],'message':_0x16c7fd(0x1f3)+_0x2c9e5d};}catch(_0x535b9e){return{'success':![],'message':_0x16c7fd(0x1e7)+_0x2c9e5d+':\x20'+_0x535b9e};}}export function updateFile(_0x457f95,_0x5b16a1){const _0xdba74b=a31_0x853d;try{const _0x4eed8d=resolve(process['cwd'](),_0x457f95);if(!existsSync(_0x4eed8d))return{'success':![],'message':_0xdba74b(0x1f2)+_0x457f95};return trackFileModify(_0x4eed8d,readFileSync(_0x4eed8d,_0xdba74b(0x219))),writeFileSync(_0x4eed8d,_0x5b16a1,_0xdba74b(0x219)),{'success':!![],'message':_0xdba74b(0x1f5)+_0x457f95};}catch(_0x428da2){return{'success':![],'message':'Failed\x20to\x20update\x20'+_0x457f95+':\x20'+_0x428da2};}}export function appendFile(_0x490aab,_0x2f0bb4){const _0x5a2e63=a31_0x853d;try{const _0xa60e10=resolve(process[_0x5a2e63(0x218)](),_0x490aab);if(!existsSync(_0xa60e10))return{'success':![],'message':_0x5a2e63(0x1f2)+_0x490aab};const _0x3935=readFileSync(_0xa60e10,_0x5a2e63(0x219));return trackFileModify(_0xa60e10,_0x3935),writeFileSync(_0xa60e10,_0x3935+(_0x3935[_0x5a2e63(0x1e4)]('\x5cn')?'':'\x5cn')+_0x2f0bb4,_0x5a2e63(0x219)),{'success':!![],'message':_0x5a2e63(0x21c)+_0x490aab};}catch(_0x368654){return{'success':![],'message':_0x5a2e63(0x22b)+_0x490aab+':\x20'+_0x368654};}}export function searchFile(_0x378700,_0x514e38){const _0xabc360=a31_0x853d;try{const _0x46a7ca=resolve(process[_0xabc360(0x218)](),_0x378700);if(!existsSync(_0x46a7ca))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x378700};const _0x1f2edb=readFileSync(_0x46a7ca,_0xabc360(0x219)),_0x36486f=new RegExp(_0x514e38,'g'),_0x3701d0=_0x1f2edb[_0xabc360(0x20a)](_0x36486f)||[],_0x578dca=_0x1f2edb[_0xabc360(0x20c)]('\x0a'),_0x41c7de=_0x578dca[_0xabc360(0x1e3)]((_0x26bab9,_0x400a43)=>new RegExp(_0x514e38)[_0xabc360(0x223)](_0x26bab9));return{'success':!![],'matches':_0x41c7de,'message':_0xabc360(0x208)+_0x41c7de['length']+_0xabc360(0x226)+_0x378700};}catch(_0x47ba25){return{'success':![],'message':_0xabc360(0x224)+_0x378700+':\x20'+_0x47ba25};}}export function findFiles(_0x3e0bcb,_0x3522cb){const _0xe3bc01=a31_0x853d;try{const _0x2d7db8=resolve(process[_0xe3bc01(0x218)](),_0x3e0bcb);if(!existsSync(_0x2d7db8))return{'success':![],'message':_0xe3bc01(0x1ed)+_0x3e0bcb};const _0x3fac93=[],_0x26d4e6=new RegExp(_0x3522cb,'i');function _0x32c96a(_0x13514a){const _0x45edfc=_0xe3bc01,_0x313d2e=readdirSync(_0x13514a);for(const _0x177441 of _0x313d2e){if(_0x177441[_0x45edfc(0x204)]('.')||_0x177441===_0x45edfc(0x221))continue;const _0x48921a=resolve(_0x13514a,_0x177441),_0x6fdc7d=statSync(_0x48921a);if(_0x6fdc7d[_0x45edfc(0x222)]())_0x32c96a(_0x48921a);else _0x26d4e6[_0x45edfc(0x223)](_0x177441)&&_0x3fac93['push'](relative(_0x2d7db8,_0x48921a));}}return _0x32c96a(_0x2d7db8),{'success':!![],'files':_0x3fac93['slice'](0x0,0x32),'message':_0xe3bc01(0x208)+_0x3fac93[_0xe3bc01(0x1f7)]+'\x20files\x20matching\x20\x22'+_0x3522cb+'\x22'};}catch(_0x15cff9){return{'success':![],'message':_0xe3bc01(0x1fb)+_0x15cff9};}}export function searchDirectory(_0x2aa751,_0x4b7469){const _0x421edf=a31_0x853d;try{const _0x42df5d=resolve(process['cwd'](),_0x2aa751);if(!existsSync(_0x42df5d))return{'success':![],'message':_0x421edf(0x1ed)+_0x2aa751};const _0x5b5f1e=[],_0x21a084=new RegExp(_0x4b7469,'i'),_0x19f456=[_0x421edf(0x20e),_0x421edf(0x1e0),_0x421edf(0x21e),'.jsx','.json',_0x421edf(0x205),_0x421edf(0x1f6),_0x421edf(0x206),_0x421edf(0x220),_0x421edf(0x209),_0x421edf(0x1f9),_0x421edf(0x207)];function _0x20e6e3(_0x5081b4){const _0x3cb821=_0x421edf,_0x4ec39e=readdirSync(_0x5081b4);for(const _0x2d985f of _0x4ec39e){if(_0x2d985f[_0x3cb821(0x204)]('.')||_0x2d985f===_0x3cb821(0x221))continue;const _0x4fc48c=resolve(_0x5081b4,_0x2d985f),_0x5436ef=statSync(_0x4fc48c);if(_0x5436ef['isDirectory']())_0x20e6e3(_0x4fc48c);else{const _0x4d709e='.'+_0x2d985f[_0x3cb821(0x20c)]('.')[_0x3cb821(0x214)]()?.[_0x3cb821(0x1ef)]();if(_0x19f456[_0x3cb821(0x1ea)](_0x4d709e))try{const _0x2da266=readFileSync(_0x4fc48c,'utf-8'),_0x12f475=_0x2da266[_0x3cb821(0x20c)]('\x0a');_0x12f475[_0x3cb821(0x215)]((_0x5635b0,_0xaff0cf)=>{const _0x5459ed=_0x3cb821;_0x21a084[_0x5459ed(0x223)](_0x5635b0)&&_0x5b5f1e[_0x5459ed(0x213)]({'file':relative(_0x42df5d,_0x4fc48c),'line':_0xaff0cf+0x1,'content':_0x5635b0['trim']()[_0x5459ed(0x21d)](0x0,0x64)});});}catch{}}}}return _0x20e6e3(_0x42df5d),{'success':!![],'results':_0x5b5f1e[_0x421edf(0x22e)](0x0,0x1e),'message':_0x421edf(0x208)+_0x5b5f1e[_0x421edf(0x1f7)]+_0x421edf(0x1dd)+_0x4b7469+'\x22'};}catch(_0x12b21b){return{'success':![],'message':_0x421edf(0x1f1)+_0x12b21b};}}export function deleteFile(_0x1c3ee1){const _0x5659fb=a31_0x853d;try{const _0x5330bd=resolve(process[_0x5659fb(0x218)](),_0x1c3ee1);if(!existsSync(_0x5330bd))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x1c3ee1};return unlinkSync(_0x5330bd),{'success':!![],'message':'Deleted\x20'+_0x1c3ee1};}catch(_0x3619de){return{'success':![],'message':_0x5659fb(0x22d)+_0x1c3ee1+':\x20'+_0x3619de};}}export function renameFile(_0x59fde6,_0x8b8062){const _0x1c9c30=a31_0x853d;try{const _0x35fb68=resolve(process[_0x1c9c30(0x218)](),_0x59fde6),_0x17e64b=resolve(process[_0x1c9c30(0x218)](),_0x8b8062);if(!existsSync(_0x35fb68))return{'success':![],'message':_0x1c9c30(0x1f2)+_0x59fde6};const _0x86aa09=dirname(_0x17e64b);return!existsSync(_0x86aa09)&&mkdirSync(_0x86aa09,{'recursive':!![]}),renameSync(_0x35fb68,_0x17e64b),{'success':!![],'message':_0x1c9c30(0x1e2)+_0x59fde6+_0x1c9c30(0x1e6)+_0x8b8062};}catch(_0x19609e){return{'success':![],'message':_0x1c9c30(0x20f)+_0x19609e};}}export function copyFile(_0x4d0513,_0x3e8154){const _0x592592=a31_0x853d;try{const _0x4517f4=resolve(process[_0x592592(0x218)](),_0x4d0513),_0x3e6d56=resolve(process['cwd'](),_0x3e8154);if(!existsSync(_0x4517f4))return{'success':![],'message':_0x592592(0x1f2)+_0x4d0513};const _0x16e957=dirname(_0x3e6d56);return!existsSync(_0x16e957)&&mkdirSync(_0x16e957,{'recursive':!![]}),copyFileSync(_0x4517f4,_0x3e6d56),{'success':!![],'message':'Copied\x20'+_0x4d0513+_0x592592(0x1e6)+_0x3e8154};}catch(_0x19a22f){return{'success':![],'message':'Failed\x20to\x20copy:\x20'+_0x19a22f};}}export function fileInfo(_0x3e9496){const _0x5bd681=a31_0x853d;try{const _0x5b36d1=resolve(process[_0x5bd681(0x218)](),_0x3e9496);if(!existsSync(_0x5b36d1))return{'success':![],'message':_0x5bd681(0x1f2)+_0x3e9496};const _0x2de66f=statSync(_0x5b36d1);return{'success':!![],'info':{'size':_0x2de66f[_0x5bd681(0x229)],'modified':_0x2de66f['mtime'][_0x5bd681(0x1f0)](),'created':_0x2de66f['birthtime'][_0x5bd681(0x1f0)](),'isDirectory':_0x2de66f[_0x5bd681(0x222)](),'permissions':_0x2de66f[_0x5bd681(0x1fa)]['toString'](0x8)},'message':_0x5bd681(0x1f8)+_0x3e9496};}catch(_0xf439f7){return{'success':![],'message':_0x5bd681(0x202)+_0xf439f7};}}export function readFileLines(_0x245659,_0x9c3d01,_0x4df877){const _0x5a0c75=a31_0x853d;try{const _0x27e024=resolve(process[_0x5a0c75(0x218)](),_0x245659);if(!existsSync(_0x27e024))return{'success':![],'message':_0x5a0c75(0x1f2)+_0x245659};const _0x570800=readFileSync(_0x27e024,_0x5a0c75(0x219)),_0x2bc9a1=_0x570800['split']('\x0a'),_0x11633d=Math['max'](0x0,_0x9c3d01-0x1),_0x4ae305=Math[_0x5a0c75(0x1ee)](_0x2bc9a1['length'],_0x4df877),_0x5676f9=_0x2bc9a1[_0x5a0c75(0x22e)](_0x11633d,_0x4ae305)[_0x5a0c75(0x22c)]('\x0a');return{'success':!![],'content':_0x5676f9,'message':_0x5a0c75(0x225)+_0x9c3d01+'-'+_0x4df877+'\x20of\x20'+_0x245659};}catch(_0x58b765){return{'success':![],'message':_0x5a0c75(0x1fc)+_0x58b765};}}function a31_0xf8e0(){const _0x510600=['mode','Failed\x20to\x20find\x20files:\x20','Failed\x20to\x20read\x20lines:\x20','.jpeg','1426834gFAitd','20842624LfwlnX','86880nPhoCb','directory','Failed\x20to\x20get\x20info:\x20','Created\x20','startsWith','.md','.css','.rs','Found\x20','.py','match','.\x20Note:\x20The\x20search\x20string\x20must\x20be\x20an\x20EXACT\x20match\x20including\x20all\x20whitespace\x20and\x20indentation.\x20Try\x20using\x20update_file\x20to\x20completely\x20replace\x20the\x20content.','split','3291475BfHtsl','.ts','Failed\x20to\x20rename:\x20','replace','trim','[Binary\x20file\x20detected\x20(.','push','pop','forEach','.exe',').\x20Use\x20\x27computer_screenshot\x27\x20or\x20specific\x20tools\x20to\x20handle\x20this\x20file\x20type.\x20Direct\x20reading\x20is\x20not\x20supported.]','cwd','utf-8','Failed\x20to\x20list\x20','7NAMihu','Appended\x20to\x20','substring','.tsx','1MGMRZC','.html','node_modules','isDirectory','test','Failed\x20to\x20search\x20','Lines\x20','\x20output\x20matches\x20in\x20','423YojLpr','4yjRIFe','size','2069936nMEWai','Failed\x20to\x20append\x20to\x20','join','Failed\x20to\x20delete\x20','slice','isFile','\x20matches\x20for\x20\x22','map','\x20items\x20in\x20','.js','1926207NtwqQD','Renamed\x20','filter','endsWith','Listed\x20','\x20to\x20','Failed\x20to\x20edit\x20','.gif','7959186aXBcOe','includes','Failed\x20to\x20create\x20','Failed\x20to\x20read\x20','Directory\x20not\x20found:\x20','min','toLowerCase','toISOString','Failed\x20to\x20search\x20directory:\x20','File\x20not\x20found:\x20','Edited\x20','Read\x20','Updated\x20','.txt','length','Info\x20for\x20','.go'];a31_0xf8e0=function(){return _0x510600;};return a31_0xf8e0();}
package/dist/tools/git.js CHANGED
@@ -1 +1 @@
1
- (function(_0x55c8ab,_0x252ed7){const _0x59ef60=a32_0x3b88,_0x28b56a=_0x55c8ab();while(!![]){try{const _0x10590f=parseInt(_0x59ef60(0x172))/0x1*(-parseInt(_0x59ef60(0x16f))/0x2)+parseInt(_0x59ef60(0x165))/0x3+parseInt(_0x59ef60(0x16e))/0x4+-parseInt(_0x59ef60(0x173))/0x5+parseInt(_0x59ef60(0x16a))/0x6+parseInt(_0x59ef60(0x179))/0x7+parseInt(_0x59ef60(0x177))/0x8*(-parseInt(_0x59ef60(0x176))/0x9);if(_0x10590f===_0x252ed7)break;else _0x28b56a['push'](_0x28b56a['shift']());}catch(_0xe3e6a6){_0x28b56a['push'](_0x28b56a['shift']());}}}(a32_0x3ec5,0xa2e6e));import{execSync}from'child_process';function runGit(_0x256bf5){const _0x3e5354=a32_0x3b88;try{const _0x21e59a=execSync(_0x3e5354(0x166)+_0x256bf5,{'cwd':process[_0x3e5354(0x169)](),'encoding':_0x3e5354(0x168),'timeout':0x3a98,'maxBuffer':0x400*0x400})[_0x3e5354(0x178)]();return{'success':!![],'output':_0x21e59a,'message':_0x3e5354(0x166)+_0x256bf5};}catch(_0x3f57b6){return{'success':![],'output':_0x3f57b6[_0x3e5354(0x164)]||_0x3f57b6['stderr']||'','message':_0x3e5354(0x166)+_0x256bf5+'\x20failed:\x20'+_0x3f57b6[_0x3e5354(0x16b)]};}}export function gitStatus(){const _0x5ca373=a32_0x3b88;return runGit(_0x5ca373(0x17a));}function a32_0x3b88(_0x586fd1,_0x60c0c3){_0x586fd1=_0x586fd1-0x164;const _0x3ec580=a32_0x3ec5();let _0x3b8842=_0x3ec580[_0x586fd1];return _0x3b8842;}function a32_0x3ec5(){const _0x204efc=['replace','1134893fZZCgk','3569850lsTQyx','commit\x20-m\x20\x22','log\x20--oneline\x20-n\x20','18yBnbLI','4784984gXUNyH','trim','7066122aiWNmg','status\x20--short','stdout','2129652uGeMDH','git\x20','diff','utf-8','cwd','6681216lFAvUR','message','branch\x20-a','diff\x20--\x20\x22','3517956qFsNfZ','2yYmCuw','add\x20\x22'];a32_0x3ec5=function(){return _0x204efc;};return a32_0x3ec5();}export function gitDiff(_0x11ed4b){const _0x58c98c=a32_0x3b88;return runGit(_0x11ed4b?_0x58c98c(0x16d)+_0x11ed4b+'\x22':_0x58c98c(0x167));}export function gitLog(_0x7d6748=0xa){const _0x4d0f9a=a32_0x3b88;return runGit(_0x4d0f9a(0x175)+_0x7d6748);}export function gitAdd(_0x59aba0){const _0x2a9dd2=a32_0x3b88;return runGit(_0x2a9dd2(0x170)+_0x59aba0+'\x22');}export function gitCommit(_0x502d0c){const _0x98fbee=a32_0x3b88;return runGit(_0x98fbee(0x174)+_0x502d0c[_0x98fbee(0x171)](/"/g,'\x5c\x22')+'\x22');}export function gitBranch(){const _0x85e7=a32_0x3b88;return runGit(_0x85e7(0x16c));}
1
+ (function(_0x2d2fbf,_0x1bff09){const _0x529d0d=a32_0x3e76,_0x3233b9=_0x2d2fbf();while(!![]){try{const _0x40ac63=parseInt(_0x529d0d(0x1cc))/0x1+-parseInt(_0x529d0d(0x1d9))/0x2*(parseInt(_0x529d0d(0x1d4))/0x3)+parseInt(_0x529d0d(0x1d7))/0x4*(-parseInt(_0x529d0d(0x1d6))/0x5)+parseInt(_0x529d0d(0x1d2))/0x6*(-parseInt(_0x529d0d(0x1ca))/0x7)+-parseInt(_0x529d0d(0x1c4))/0x8*(parseInt(_0x529d0d(0x1cd))/0x9)+-parseInt(_0x529d0d(0x1da))/0xa+parseInt(_0x529d0d(0x1c6))/0xb;if(_0x40ac63===_0x1bff09)break;else _0x3233b9['push'](_0x3233b9['shift']());}catch(_0xd8dfdb){_0x3233b9['push'](_0x3233b9['shift']());}}}(a32_0x118b,0x260d8));import{execSync}from'child_process';function runGit(_0xf617a1){const _0x375f9b=a32_0x3e76;try{const _0x29c13a=execSync(_0x375f9b(0x1c9)+_0xf617a1,{'cwd':process[_0x375f9b(0x1cb)](),'encoding':_0x375f9b(0x1d8),'timeout':0x3a98,'maxBuffer':0x400*0x400})[_0x375f9b(0x1d1)]();return{'success':!![],'output':_0x29c13a,'message':'git\x20'+_0xf617a1};}catch(_0x5ec144){return{'success':![],'output':_0x5ec144['stdout']||_0x5ec144[_0x375f9b(0x1c7)]||'','message':_0x375f9b(0x1c9)+_0xf617a1+_0x375f9b(0x1d0)+_0x5ec144[_0x375f9b(0x1d3)]};}}function a32_0x118b(){const _0x3ce961=['1089420waykok','replace','219976JNlUQB','diff\x20--\x20\x22','8879530QjtbCU','stderr','diff','git\x20','161scUlSw','cwd','242640XWjJxm','72Jayocu','branch\x20-a','status\x20--short','\x20failed:\x20','trim','40062CgAqFx','message','6NEnluz','commit\x20-m\x20\x22','1004005VQbgVy','4GcUOJz','utf-8','210716aldAny'];a32_0x118b=function(){return _0x3ce961;};return a32_0x118b();}function a32_0x3e76(_0x2c2c18,_0x38301d){_0x2c2c18=_0x2c2c18-0x1c4;const _0x118ba7=a32_0x118b();let _0x3e7616=_0x118ba7[_0x2c2c18];return _0x3e7616;}export function gitStatus(){const _0x18231d=a32_0x3e76;return runGit(_0x18231d(0x1cf));}export function gitDiff(_0x115df9){const _0x2abab3=a32_0x3e76;return runGit(_0x115df9?_0x2abab3(0x1c5)+_0x115df9+'\x22':_0x2abab3(0x1c8));}export function gitLog(_0x292989=0xa){return runGit('log\x20--oneline\x20-n\x20'+_0x292989);}export function gitAdd(_0x20fedd){return runGit('add\x20\x22'+_0x20fedd+'\x22');}export function gitCommit(_0x19068a){const _0xc229c8=a32_0x3e76;return runGit(_0xc229c8(0x1d5)+_0x19068a[_0xc229c8(0x1db)](/"/g,'\x5c\x22')+'\x22');}export function gitBranch(){const _0x3a75bc=a32_0x3e76;return runGit(_0x3a75bc(0x1ce));}
@@ -1 +1 @@
1
- (function(_0x45fc08,_0x5d7bcb){var _0x2bdcf0=a33_0x39c8,_0x311115=_0x45fc08();while(!![]){try{var _0x5c128d=-parseInt(_0x2bdcf0(0x9d))/0x1*(-parseInt(_0x2bdcf0(0xa2))/0x2)+parseInt(_0x2bdcf0(0xa1))/0x3+-parseInt(_0x2bdcf0(0x9f))/0x4+parseInt(_0x2bdcf0(0xa4))/0x5*(parseInt(_0x2bdcf0(0xa0))/0x6)+-parseInt(_0x2bdcf0(0x9c))/0x7*(-parseInt(_0x2bdcf0(0x9a))/0x8)+parseInt(_0x2bdcf0(0x9b))/0x9*(parseInt(_0x2bdcf0(0x9e))/0xa)+-parseInt(_0x2bdcf0(0xa3))/0xb;if(_0x5c128d===_0x5d7bcb)break;else _0x311115['push'](_0x311115['shift']());}catch(_0x31ecdb){_0x311115['push'](_0x311115['shift']());}}}(a33_0x1a47,0x78c8d));export{createFile,readFile,listDirectory,editFile,updateFile,appendFile,searchFile,findFiles,searchDirectory,deleteFile,renameFile,copyFile,fileInfo,readFileLines}from'./file.js';export{runCommand,readTerminalOutput,sendTerminalInput,terminateProcess,getActiveProcesses}from'./command.js';function a33_0x39c8(_0x257e16,_0x1accdb){_0x257e16=_0x257e16-0x9a;var _0x1a47fe=a33_0x1a47();var _0x39c8fc=_0x1a47fe[_0x257e16];return _0x39c8fc;}export{listRules,addRule,clearRules,formatRulesForSystem}from'./rules.js';export{connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'./mcp.js';export{trackFileCreate,trackFileModify,rollbackLast,rollbackAll,getChanges,clearChanges}from'./rollback.js';export{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'./git.js';export{fetchUrl,downloadFile}from'./network.js';export{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'./system.js';export{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'./project.js';export*from'../browser/index.js';function a33_0x1a47(){var _0xa37c53=['2822796wahZFT','1927386WeEqEu','1303104NqMQws','396174gqWwWd','11017226sQiara','10tvDTIY','3576IJAzMT','18JuQhJM','12663DUmtja','1PXLhHI','592290esixuX'];a33_0x1a47=function(){return _0xa37c53;};return a33_0x1a47();}
1
+ function a33_0x32df(){var _0x3a18b9=['1870ezCMya','34947KKBrOk','181pqoPGA','7742oXSQLT','1672746VARAZr','16317NLczsy','2821336qnsqHE','3120dEHuWA','376340ZAUGog','2543319RatfxD'];a33_0x32df=function(){return _0x3a18b9;};return a33_0x32df();}(function(_0x16227d,_0x978f68){var _0x94e6db=a33_0x2c17,_0x2ea881=_0x16227d();while(!![]){try{var _0xb417c2=-parseInt(_0x94e6db(0xd8))/0x1*(parseInt(_0x94e6db(0xd9))/0x2)+parseInt(_0x94e6db(0xd5))/0x3+-parseInt(_0x94e6db(0xdc))/0x4+parseInt(_0x94e6db(0xd4))/0x5+-parseInt(_0x94e6db(0xda))/0x6+parseInt(_0x94e6db(0xdb))/0x7*(parseInt(_0x94e6db(0xd3))/0x8)+parseInt(_0x94e6db(0xd7))/0x9*(parseInt(_0x94e6db(0xd6))/0xa);if(_0xb417c2===_0x978f68)break;else _0x2ea881['push'](_0x2ea881['shift']());}catch(_0x29328d){_0x2ea881['push'](_0x2ea881['shift']());}}}(a33_0x32df,0xd5404));export{createFile,readFile,listDirectory,editFile,updateFile,appendFile,searchFile,findFiles,searchDirectory,deleteFile,renameFile,copyFile,fileInfo,readFileLines}from'./file.js';export{runCommand,readTerminalOutput,sendTerminalInput,terminateProcess,getActiveProcesses}from'./command.js';export{listRules,addRule,clearRules,formatRulesForSystem}from'./rules.js';export{connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'./mcp.js';export{trackFileCreate,trackFileModify,rollbackLast,rollbackAll,getChanges,clearChanges}from'./rollback.js';function a33_0x2c17(_0x16cc1e,_0x28210f){_0x16cc1e=_0x16cc1e-0xd3;var _0x32df80=a33_0x32df();var _0x2c175e=_0x32df80[_0x16cc1e];return _0x2c175e;}export{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'./git.js';export{fetchUrl,downloadFile}from'./network.js';export{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'./system.js';export{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'./project.js';export*from'../browser/index.js';
@@ -1 +1 @@
1
- (function(_0x3abc49,_0x53876c){const _0x351ac6=a34_0x5b11,_0xc3f062=_0x3abc49();while(!![]){try{const _0x4dcbb9=parseInt(_0x351ac6(0xb8))/0x1+parseInt(_0x351ac6(0xba))/0x2+-parseInt(_0x351ac6(0xac))/0x3+-parseInt(_0x351ac6(0xaf))/0x4*(parseInt(_0x351ac6(0xb2))/0x5)+-parseInt(_0x351ac6(0xb5))/0x6*(-parseInt(_0x351ac6(0xb4))/0x7)+parseInt(_0x351ac6(0xb7))/0x8*(-parseInt(_0x351ac6(0xb3))/0x9)+-parseInt(_0x351ac6(0xb9))/0xa*(-parseInt(_0x351ac6(0xae))/0xb);if(_0x4dcbb9===_0x53876c)break;else _0xc3f062['push'](_0xc3f062['shift']());}catch(_0x41f09b){_0xc3f062['push'](_0xc3f062['shift']());}}}(a34_0x4764,0xe9535));import{getKnowledge,addKnowledge as a34_0x52bbc6,clearKnowledge as a34_0x353cac}from'../utils/storage.js';function a34_0x4764(){const _0x1c48ae=['11npdJFB','4QakeqP','join','map','7706905vWWoZV','15182262xdPUAI','67046yiDkNK','318EECSjp','length','8TsxjmK','1059692LlCjvJ','21036210xorRCr','1894572SteeiZ','1302699NGrYbg','\x0a\x0aKnowledge\x20Presets:\x0a'];a34_0x4764=function(){return _0x1c48ae;};return a34_0x4764();}export function listKnowledge(){return getKnowledge();}function a34_0x5b11(_0x3f337c,_0x1c955e){_0x3f337c=_0x3f337c-0xac;const _0x47644f=a34_0x4764();let _0x5b117b=_0x47644f[_0x3f337c];return _0x5b117b;}export function addKnowledge(_0x48a97f){a34_0x52bbc6(_0x48a97f);}export function clearKnowledge(){a34_0x353cac();}export function formatKnowledgeForSystem(){const _0x5f0d45=a34_0x5b11,_0x3832b3=getKnowledge();if(_0x3832b3[_0x5f0d45(0xb6)]===0x0)return'';return _0x5f0d45(0xad)+_0x3832b3[_0x5f0d45(0xb1)]((_0x290a51,_0x197d56)=>_0x197d56+0x1+'.\x20'+_0x290a51)[_0x5f0d45(0xb0)]('\x0a');}
1
+ (function(_0x47f82c,_0x5be138){const _0x5426a0=a34_0x4d56,_0x20cc39=_0x47f82c();while(!![]){try{const _0x5c1958=-parseInt(_0x5426a0(0x128))/0x1*(parseInt(_0x5426a0(0x12f))/0x2)+-parseInt(_0x5426a0(0x131))/0x3*(-parseInt(_0x5426a0(0x12a))/0x4)+parseInt(_0x5426a0(0x130))/0x5+parseInt(_0x5426a0(0x12b))/0x6*(-parseInt(_0x5426a0(0x125))/0x7)+parseInt(_0x5426a0(0x127))/0x8*(-parseInt(_0x5426a0(0x132))/0x9)+-parseInt(_0x5426a0(0x12d))/0xa*(parseInt(_0x5426a0(0x126))/0xb)+parseInt(_0x5426a0(0x124))/0xc;if(_0x5c1958===_0x5be138)break;else _0x20cc39['push'](_0x20cc39['shift']());}catch(_0x53c57b){_0x20cc39['push'](_0x20cc39['shift']());}}}(a34_0x231e,0x23711));import{getKnowledge,addKnowledge as a34_0x482b7f,clearKnowledge as a34_0x40fd67}from'../utils/storage.js';function a34_0x4d56(_0x2ee36e,_0x482f8f){_0x2ee36e=_0x2ee36e-0x124;const _0x231e6c=a34_0x231e();let _0x4d5671=_0x231e6c[_0x2ee36e];return _0x4d5671;}function a34_0x231e(){const _0x2e723f=['172952WwUQeT','1IITkJw','\x0a\x0aKnowledge\x20Presets:\x0a','4pcVvxM','1554ynPhAw','map','110frORop','length','370186zHzhOl','163435JIhpQv','715431kmbMGt','108kgkNLS','9089940WRXLMc','7049jwYCyY','178156iKCyZA'];a34_0x231e=function(){return _0x2e723f;};return a34_0x231e();}export function listKnowledge(){return getKnowledge();}export function addKnowledge(_0x15120a){a34_0x482b7f(_0x15120a);}export function clearKnowledge(){a34_0x40fd67();}export function formatKnowledgeForSystem(){const _0x508db2=a34_0x4d56,_0x40ac72=getKnowledge();if(_0x40ac72[_0x508db2(0x12e)]===0x0)return'';return _0x508db2(0x129)+_0x40ac72[_0x508db2(0x12c)]((_0x1f689b,_0x192bee)=>_0x192bee+0x1+'.\x20'+_0x1f689b)['join']('\x0a');}