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 a8_0x59332c=a8_0x303e;(function(_0x418672,_0x21c36e){const _0x3c21a5=a8_0x303e,_0xfd98fd=_0x418672();while(!![]){try{const _0x3fd0ef=-parseInt(_0x3c21a5(0xb5))/0x1+-parseInt(_0x3c21a5(0xbe))/0x2+-parseInt(_0x3c21a5(0xcd))/0x3*(parseInt(_0x3c21a5(0xc5))/0x4)+-parseInt(_0x3c21a5(0xba))/0x5*(-parseInt(_0x3c21a5(0xcc))/0x6)+parseInt(_0x3c21a5(0xbb))/0x7*(parseInt(_0x3c21a5(0xd1))/0x8)+-parseInt(_0x3c21a5(0xd2))/0x9*(-parseInt(_0x3c21a5(0xc4))/0xa)+-parseInt(_0x3c21a5(0xce))/0xb*(-parseInt(_0x3c21a5(0xcb))/0xc);if(_0x3fd0ef===_0x21c36e)break;else _0xfd98fd['push'](_0xfd98fd['shift']());}catch(_0x3c2ee6){_0xfd98fd['push'](_0xfd98fd['shift']());}}}(a8_0x4f7a,0x4ab02));import a8_0x53a47d from'conf';import a8_0x2dd0f7 from'crypto';const config=new a8_0x53a47d({'projectName':a8_0x59332c(0xc9),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x59332c(0xcf);function encrypt(_0x31188c){const _0x3bd7ca=a8_0x59332c;if(!_0x31188c)return'';const _0x8e8c2d=a8_0x2dd0f7[_0x3bd7ca(0xc1)](0x10),_0x242cc6=a8_0x2dd0f7['createHash']('sha256')[_0x3bd7ca(0xb9)](ENCRYPTION_KEY)[_0x3bd7ca(0xc2)](),_0x2cb3fc=a8_0x2dd0f7[_0x3bd7ca(0xb7)]('aes-256-cbc',_0x242cc6,_0x8e8c2d);let _0xb3780=_0x2cb3fc[_0x3bd7ca(0xb9)](_0x31188c,'utf8',_0x3bd7ca(0xb8));return _0xb3780+=_0x2cb3fc[_0x3bd7ca(0xbd)](_0x3bd7ca(0xb8)),_0x8e8c2d['toString']('hex')+':'+_0xb3780;}function decrypt(_0x13ff21){const _0x6491df=a8_0x59332c;if(!_0x13ff21)return'';try{const [_0x4fef03,_0x392200]=_0x13ff21[_0x6491df(0xca)](':');if(!_0x4fef03||!_0x392200)return'';const _0x5680df=Buffer['from'](_0x4fef03,_0x6491df(0xb8)),_0xc42161=a8_0x2dd0f7[_0x6491df(0xc7)](_0x6491df(0xc8))['update'](ENCRYPTION_KEY)[_0x6491df(0xc2)](),_0x254c5c=a8_0x2dd0f7[_0x6491df(0xc0)](_0x6491df(0xb6),_0xc42161,_0x5680df);let _0x2d623c=_0x254c5c[_0x6491df(0xb9)](_0x392200,_0x6491df(0xb8),_0x6491df(0xc6));return _0x2d623c+=_0x254c5c[_0x6491df(0xbd)](_0x6491df(0xc6)),_0x2d623c;}catch{return'';}}export function setBotToken(_0x245f40){const _0xff497e=a8_0x59332c;config[_0xff497e(0xbc)](_0xff497e(0xc3),encrypt(_0x245f40));}function a8_0x4f7a(){const _0x3076ce=['clear','8QqWPLL','13743jCTtzY','588357lrfVFH','aes-256-cbc','createCipheriv','hex','update','328510vrwTOd','2175628Zdocxo','set','final','183764MlcRxg','get','createDecipheriv','randomBytes','digest','botToken','1130UmIXtd','17648oZtPiV','utf8','createHash','sha256','woozlit-cli-discord','split','3484068yzbVxd','36tRcHVN','321KihCqa','22KBBpmD','woozlit_discord_secure_key'];a8_0x4f7a=function(){return _0x3076ce;};return a8_0x4f7a();}export function getBotToken(){const _0x462b3a=a8_0x59332c;return decrypt(config[_0x462b3a(0xbf)](_0x462b3a(0xc3)));}export function isEnabled(){return!!getBotToken();}function a8_0x303e(_0x5b62cc,_0x4ea4dd){_0x5b62cc=_0x5b62cc-0xb5;const _0x4f7a49=a8_0x4f7a();let _0x303e57=_0x4f7a49[_0x5b62cc];return _0x303e57;}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x2df665=a8_0x59332c;config[_0x2df665(0xd0)]();}
1
+ const a8_0x3e2612=a8_0x3216;(function(_0x37f3eb,_0x4128b6){const _0x2cad79=a8_0x3216,_0x59710d=_0x37f3eb();while(!![]){try{const _0x8ee1db=-parseInt(_0x2cad79(0x176))/0x1*(parseInt(_0x2cad79(0x171))/0x2)+-parseInt(_0x2cad79(0x17b))/0x3*(parseInt(_0x2cad79(0x16f))/0x4)+-parseInt(_0x2cad79(0x178))/0x5*(parseInt(_0x2cad79(0x16c))/0x6)+-parseInt(_0x2cad79(0x16a))/0x7+parseInt(_0x2cad79(0x16d))/0x8+parseInt(_0x2cad79(0x175))/0x9+-parseInt(_0x2cad79(0x161))/0xa*(-parseInt(_0x2cad79(0x16b))/0xb);if(_0x8ee1db===_0x4128b6)break;else _0x59710d['push'](_0x59710d['shift']());}catch(_0x35a22b){_0x59710d['push'](_0x59710d['shift']());}}}(a8_0x5daf,0x9eb74));import a8_0x23bec2 from'conf';import a8_0xec859b from'crypto';const config=new a8_0x23bec2({'projectName':a8_0x3e2612(0x167),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x3e2612(0x166);function encrypt(_0x298e33){const _0x572295=a8_0x3e2612;if(!_0x298e33)return'';const _0x32da7a=a8_0xec859b[_0x572295(0x17a)](0x10),_0x2ee855=a8_0xec859b['createHash'](_0x572295(0x174))['update'](ENCRYPTION_KEY)[_0x572295(0x179)](),_0x43a309=a8_0xec859b[_0x572295(0x173)](_0x572295(0x162),_0x2ee855,_0x32da7a);let _0x25e85e=_0x43a309['update'](_0x298e33,'utf8','hex');return _0x25e85e+=_0x43a309[_0x572295(0x164)](_0x572295(0x17c)),_0x32da7a['toString']('hex')+':'+_0x25e85e;}function decrypt(_0x15ffe5){const _0x541e20=a8_0x3e2612;if(!_0x15ffe5)return'';try{const [_0x2a1e17,_0x52a560]=_0x15ffe5[_0x541e20(0x177)](':');if(!_0x2a1e17||!_0x52a560)return'';const _0x9d58a5=Buffer[_0x541e20(0x16e)](_0x2a1e17,_0x541e20(0x17c)),_0x7f7612=a8_0xec859b['createHash'](_0x541e20(0x174))[_0x541e20(0x170)](ENCRYPTION_KEY)['digest'](),_0x181ace=a8_0xec859b[_0x541e20(0x17d)](_0x541e20(0x162),_0x7f7612,_0x9d58a5);let _0x48b969=_0x181ace[_0x541e20(0x170)](_0x52a560,_0x541e20(0x17c),_0x541e20(0x163));return _0x48b969+=_0x181ace[_0x541e20(0x164)](_0x541e20(0x163)),_0x48b969;}catch{return'';}}export function setBotToken(_0x2b86aa){const _0x416f32=a8_0x3e2612;config[_0x416f32(0x168)](_0x416f32(0x172),encrypt(_0x2b86aa));}export function getBotToken(){const _0x45f8df=a8_0x3e2612;return decrypt(config[_0x45f8df(0x169)](_0x45f8df(0x172)));}function a8_0x5daf(){const _0x24c197=['set','get','3638565TCxinh','50303eMffEL','48GJjgmN','4129568qHuuzI','from','108DPcZOc','update','12mrVqyk','botToken','createCipheriv','sha256','3484206Pqmhmj','186551oIyQFz','split','457885gGswTw','digest','randomBytes','68463lCvmsh','hex','createDecipheriv','5980CYfxun','aes-256-cbc','utf8','final','clear','woozlit_discord_secure_key','woozlit-cli-discord'];a8_0x5daf=function(){return _0x24c197;};return a8_0x5daf();}export function isEnabled(){return!!getBotToken();}export function isConfigured(){return!!getBotToken();}function a8_0x3216(_0xe6cae7,_0x4fe996){_0xe6cae7=_0xe6cae7-0x161;const _0x5daf6f=a8_0x5daf();let _0x321603=_0x5daf6f[_0xe6cae7];return _0x321603;}export function clearConfig(){const _0x41ef1e=a8_0x3e2612;config[_0x41ef1e(0x165)]();}
@@ -1 +1 @@
1
- function a9_0x463d(){var _0x24f237=['3469929XVslaU','474132cMiLML','10NctMpF','10cPotVg','63230ZbHcqQ','32834796kIEwsN','7fCyVse','6325443YMnjYO','9WYFVYV','1574392CMmTlu','1423796dplHrl','4zViEtQ'];a9_0x463d=function(){return _0x24f237;};return a9_0x463d();}(function(_0x275e60,_0xcd6a4e){var _0x1fe6b4=a9_0x2f78,_0x2ee064=_0x275e60();while(!![]){try{var _0xe20220=parseInt(_0x1fe6b4(0x1a2))/0x1*(parseInt(_0x1fe6b4(0x19e))/0x2)+parseInt(_0x1fe6b4(0x1a6))/0x3*(-parseInt(_0x1fe6b4(0x1a5))/0x4)+parseInt(_0x1fe6b4(0x1a8))/0x5*(-parseInt(_0x1fe6b4(0x1a7))/0x6)+parseInt(_0x1fe6b4(0x1a0))/0x7*(-parseInt(_0x1fe6b4(0x1a3))/0x8)+-parseInt(_0x1fe6b4(0x1a1))/0x9*(parseInt(_0x1fe6b4(0x19d))/0xa)+-parseInt(_0x1fe6b4(0x1a4))/0xb+parseInt(_0x1fe6b4(0x19f))/0xc;if(_0xe20220===_0xcd6a4e)break;else _0x2ee064['push'](_0x2ee064['shift']());}catch(_0x5d6876){_0x2ee064['push'](_0x2ee064['shift']());}}}(a9_0x463d,0xa549b));export*from'./config.js';function a9_0x2f78(_0x1bdd23,_0x590584){_0x1bdd23=_0x1bdd23-0x19d;var _0x463ddf=a9_0x463d();var _0x2f7815=_0x463ddf[_0x1bdd23];return _0x2f7815;}export{startBot,stopBot,isBotRunning}from'./client.js';export{setupDiscord}from'./setup.js';
1
+ (function(_0x4ad6ac,_0x26a3c4){var _0x3c57ef=a9_0x32ca,_0x2e7c6e=_0x4ad6ac();while(!![]){try{var _0x2a2fbd=parseInt(_0x3c57ef(0x1d5))/0x1+parseInt(_0x3c57ef(0x1d4))/0x2*(-parseInt(_0x3c57ef(0x1d2))/0x3)+-parseInt(_0x3c57ef(0x1d7))/0x4+-parseInt(_0x3c57ef(0x1d1))/0x5*(parseInt(_0x3c57ef(0x1d3))/0x6)+parseInt(_0x3c57ef(0x1cf))/0x7*(parseInt(_0x3c57ef(0x1d0))/0x8)+parseInt(_0x3c57ef(0x1d8))/0x9+parseInt(_0x3c57ef(0x1d6))/0xa;if(_0x2a2fbd===_0x26a3c4)break;else _0x2e7c6e['push'](_0x2e7c6e['shift']());}catch(_0x4aedb7){_0x2e7c6e['push'](_0x2e7c6e['shift']());}}}(a9_0x1c4c,0x39b82));export*from'./config.js';function a9_0x1c4c(){var _0x5764cc=['5uyVNIC','6VRgnEl','2122674QndspL','267832EvaVdy','309327OIVUef','6176060XanMLB','1353168Fdxcuj','1515546BXVppl','7JIxFyp','807952mdFwGd'];a9_0x1c4c=function(){return _0x5764cc;};return a9_0x1c4c();}function a9_0x32ca(_0x1dcc2d,_0x548a75){_0x1dcc2d=_0x1dcc2d-0x1cf;var _0x1c4c67=a9_0x1c4c();var _0x32cad0=_0x1c4c67[_0x1dcc2d];return _0x32cad0;}export{startBot,stopBot,isBotRunning}from'./client.js';export{setupDiscord}from'./setup.js';
@@ -1 +1 @@
1
- (function(_0x2a2a28,_0x19d368){const _0x1cb1eb=a10_0x542f,_0x65ed6c=_0x2a2a28();while(!![]){try{const _0xce55a8=parseInt(_0x1cb1eb(0x15e))/0x1*(parseInt(_0x1cb1eb(0x15c))/0x2)+-parseInt(_0x1cb1eb(0x15a))/0x3+-parseInt(_0x1cb1eb(0x156))/0x4*(parseInt(_0x1cb1eb(0x150))/0x5)+-parseInt(_0x1cb1eb(0x161))/0x6*(-parseInt(_0x1cb1eb(0x14f))/0x7)+-parseInt(_0x1cb1eb(0x154))/0x8*(-parseInt(_0x1cb1eb(0x151))/0x9)+parseInt(_0x1cb1eb(0x15d))/0xa+-parseInt(_0x1cb1eb(0x15b))/0xb;if(_0xce55a8===_0x19d368)break;else _0x65ed6c['push'](_0x65ed6c['shift']());}catch(_0x540122){_0x65ed6c['push'](_0x65ed6c['shift']());}}}(a10_0x4861,0x2f17f));function a10_0x4861(){const _0x5811fb=['6648uoxVvX','Token\x20seems\x20too\x20short','3268YRKmhn','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.','You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.','success','628743aYVWmm','4007443RbwdUX','636428kPletA','3719390BhshbV','1iyEOIT','Discord\x20configuration\x20saved!','dim','144JQyVSR','17332pSQzpm','805hXOyzr','1611gmCPNE','info','Setup\x20Woozlit\x20Discord\x20Bot'];a10_0x4861=function(){return _0x5811fb;};return a10_0x4861();}import{input}from'@inquirer/prompts';import*as a10_0x23807f from'./config.js';import*as a10_0x511f7f from'../ui/output.js';function a10_0x542f(_0x599898,_0x1d44e7){_0x599898=_0x599898-0x14f;const _0x486172=a10_0x4861();let _0x542fd3=_0x486172[_0x599898];return _0x542fd3;}export async function setupDiscord(){const _0x44f7e8=a10_0x542f;a10_0x511f7f['info'](_0x44f7e8(0x153)),a10_0x511f7f[_0x44f7e8(0x160)](_0x44f7e8(0x158));const _0x126866=await input({'message':'Bot\x20Token:','validate':_0xccf8c8=>_0xccf8c8['length']>0xa?!![]:_0x44f7e8(0x155)}),_0x1e5fd8=await input({'message':'Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','default':'!'});a10_0x23807f['setBotToken'](_0x126866),a10_0x511f7f[_0x44f7e8(0x159)](_0x44f7e8(0x15f)),a10_0x511f7f[_0x44f7e8(0x152)](_0x44f7e8(0x157));}
1
+ (function(_0x20ff48,_0x55a007){const _0x57e0be=a10_0x6a61,_0x1a41b2=_0x20ff48();while(!![]){try{const _0x58847a=parseInt(_0x57e0be(0x1a8))/0x1*(parseInt(_0x57e0be(0x1b2))/0x2)+-parseInt(_0x57e0be(0x1ab))/0x3*(parseInt(_0x57e0be(0x1a7))/0x4)+parseInt(_0x57e0be(0x1b3))/0x5+parseInt(_0x57e0be(0x1ad))/0x6+parseInt(_0x57e0be(0x1b4))/0x7+-parseInt(_0x57e0be(0x1af))/0x8+-parseInt(_0x57e0be(0x1b5))/0x9;if(_0x58847a===_0x55a007)break;else _0x1a41b2['push'](_0x1a41b2['shift']());}catch(_0x17c4e2){_0x1a41b2['push'](_0x1a41b2['shift']());}}}(a10_0x1fca,0xc2d10));function a10_0x1fca(){const _0x3f94f=['29009304Ftdyqo','8jsaHzM','18xYeJGn','info','Token\x20seems\x20too\x20short','218175TrmkGt','Discord\x20configuration\x20saved!','4782954GuMHUZ','length','1639112eLWxfy','setBotToken','You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.','152994dTUVBn','3951485xPvXac','9850127AdTYcr'];a10_0x1fca=function(){return _0x3f94f;};return a10_0x1fca();}function a10_0x6a61(_0x2c1099,_0x4f8b92){_0x2c1099=_0x2c1099-0x1a7;const _0x1fca32=a10_0x1fca();let _0x6a6100=_0x1fca32[_0x2c1099];return _0x6a6100;}import{input}from'@inquirer/prompts';import*as a10_0x4485c2 from'./config.js';import*as a10_0x287b98 from'../ui/output.js';export async function setupDiscord(){const _0x58a419=a10_0x6a61;a10_0x287b98[_0x58a419(0x1a9)]('Setup\x20Woozlit\x20Discord\x20Bot'),a10_0x287b98['dim'](_0x58a419(0x1b1));const _0x4ee16d=await input({'message':'Bot\x20Token:','validate':_0x274e7f=>_0x274e7f[_0x58a419(0x1ae)]>0xa?!![]:_0x58a419(0x1aa)}),_0x1d4a3e=await input({'message':'Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','default':'!'});a10_0x4485c2[_0x58a419(0x1b0)](_0x4ee16d),a10_0x287b98['success'](_0x58a419(0x1ac)),a10_0x287b98[_0x58a419(0x1a9)]('Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.');}
@@ -1 +1 @@
1
- const a11_0x5a163f=a11_0x3f67;function a11_0xe7e4(){const _0x331ca8=['woozlit_email_secure_key','allowedSenders','imapPass','set','hex','smtpPort','from','6160tjmPAV','split','20cggOzf','enabled','digest','smtpUser','createDecipheriv','232RdBKEx','password','get','createHash','update','sha256','final','includes','784644MoBHpz','user','imapUser','76DRKhcd','imapPort','aes-256-cbc','427516jRoMjh','woozlit-cli-email','1681575ACRhBa','2671526VghzSi','38010nCLfsg','4131369VRxzcR','smtpPass','60GVmTNU','imap.gmail.com','imapHost','createCipheriv','smtpHost','utf8'];a11_0xe7e4=function(){return _0x331ca8;};return a11_0xe7e4();}(function(_0x7a552a,_0x8da68c){const _0x499b1f=a11_0x3f67,_0x3707c3=_0x7a552a();while(!![]){try{const _0x4e9762=parseInt(_0x499b1f(0x1ac))/0x1*(-parseInt(_0x499b1f(0x19a))/0x2)+-parseInt(_0x499b1f(0x1b1))/0x3+-parseInt(_0x499b1f(0x1af))/0x4+-parseInt(_0x499b1f(0x19c))/0x5*(parseInt(_0x499b1f(0x1a9))/0x6)+parseInt(_0x499b1f(0x1b3))/0x7*(-parseInt(_0x499b1f(0x1a1))/0x8)+parseInt(_0x499b1f(0x1b4))/0x9+-parseInt(_0x499b1f(0x1b6))/0xa*(-parseInt(_0x499b1f(0x1b2))/0xb);if(_0x4e9762===_0x8da68c)break;else _0x3707c3['push'](_0x3707c3['shift']());}catch(_0x256f03){_0x3707c3['push'](_0x3707c3['shift']());}}}(a11_0xe7e4,0x5196b));import a11_0x3c1887 from'conf';import a11_0x5eaf1d from'crypto';const config=new a11_0x3c1887({'projectName':a11_0x5a163f(0x1b0),'defaults':{'imapHost':a11_0x5a163f(0x1b7),'imapPort':0x3e1,'imapUser':'','imapPass':'','smtpHost':'smtp.gmail.com','smtpPort':0x24b,'smtpUser':'','smtpPass':'','checkInterval':0x5,'allowedSenders':[],'enabled':![]}}),ENCRYPTION_KEY=a11_0x5a163f(0x1bc);function encrypt(_0x2c14c1){const _0x2a91d0=a11_0x5a163f;if(!_0x2c14c1)return'';const _0x5daef5=a11_0x5eaf1d['randomBytes'](0x10),_0x17cd8a=a11_0x5eaf1d[_0x2a91d0(0x1a4)](_0x2a91d0(0x1a6))['update'](ENCRYPTION_KEY)[_0x2a91d0(0x19e)](),_0x411e3d=a11_0x5eaf1d[_0x2a91d0(0x1b9)](_0x2a91d0(0x1ae),_0x17cd8a,_0x5daef5);let _0xce8657=_0x411e3d[_0x2a91d0(0x1a5)](_0x2c14c1,_0x2a91d0(0x1bb),_0x2a91d0(0x1c0));return _0xce8657+=_0x411e3d['final'](_0x2a91d0(0x1c0)),_0x5daef5['toString'](_0x2a91d0(0x1c0))+':'+_0xce8657;}function decrypt(_0x51d6a2){const _0x4ef55d=a11_0x5a163f;if(!_0x51d6a2)return'';try{const [_0x58f16d,_0x3394be]=_0x51d6a2[_0x4ef55d(0x19b)](':');if(!_0x58f16d||!_0x3394be)return'';const _0x2f389b=Buffer[_0x4ef55d(0x199)](_0x58f16d,_0x4ef55d(0x1c0)),_0xe8f6b0=a11_0x5eaf1d[_0x4ef55d(0x1a4)]('sha256')['update'](ENCRYPTION_KEY)[_0x4ef55d(0x19e)](),_0x40e409=a11_0x5eaf1d[_0x4ef55d(0x1a0)](_0x4ef55d(0x1ae),_0xe8f6b0,_0x2f389b);let _0x5990de=_0x40e409[_0x4ef55d(0x1a5)](_0x3394be,_0x4ef55d(0x1c0),'utf8');return _0x5990de+=_0x40e409[_0x4ef55d(0x1a7)](_0x4ef55d(0x1bb)),_0x5990de;}catch{return'';}}function a11_0x3f67(_0x44d01e,_0x1832a9){_0x44d01e=_0x44d01e-0x198;const _0xe7e4c=a11_0xe7e4();let _0x3f6751=_0xe7e4c[_0x44d01e];return _0x3f6751;}export function setCredentials(_0x4c0eb7,_0x2d0c96,_0x36b4c4,_0x2d844a){const _0xa124fb=a11_0x5a163f;config['set'](_0xa124fb(0x1ab),_0x4c0eb7),config[_0xa124fb(0x1bf)](_0xa124fb(0x1be),encrypt(_0x2d0c96)),config[_0xa124fb(0x1bf)](_0xa124fb(0x19f),_0x4c0eb7),config[_0xa124fb(0x1bf)](_0xa124fb(0x1b5),encrypt(_0x2d0c96));if(_0x36b4c4)config[_0xa124fb(0x1bf)](_0xa124fb(0x1b8),_0x36b4c4);}export function getConfig(){const _0x2db6b1=a11_0x5a163f;return{'imap':{'user':config[_0x2db6b1(0x1a3)]('imapUser'),'password':decrypt(config[_0x2db6b1(0x1a3)]('imapPass')),'host':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x1b8)),'port':config['get'](_0x2db6b1(0x1ad)),'tls':!![],'tlsOptions':{'rejectUnauthorized':![]},'authTimeout':0xbb8},'smtp':{'host':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x1ba)),'port':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x198)),'auth':{'user':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x19f)),'pass':decrypt(config[_0x2db6b1(0x1a3)](_0x2db6b1(0x1b5)))},'tls':{'rejectUnauthorized':![]}},'interval':config['get']('checkInterval'),'allowedSenders':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x1bd))||[],'enabled':config[_0x2db6b1(0x1a3)](_0x2db6b1(0x19d))};}export function isConfigured(){const _0x37bec8=a11_0x5a163f,_0x1a95ba=getConfig();return!!_0x1a95ba['imap'][_0x37bec8(0x1aa)]&&!!_0x1a95ba['imap'][_0x37bec8(0x1a2)];}export function setEnabled(_0x2565df){config['set']('enabled',_0x2565df);}export function addAllowedSender(_0x50292a){const _0x20851d=a11_0x5a163f,_0x255309=config[_0x20851d(0x1a3)]('allowedSenders')||[];!_0x255309[_0x20851d(0x1a8)](_0x50292a)&&(_0x255309['push'](_0x50292a),config['set']('allowedSenders',_0x255309));}
1
+ const a11_0x3a6c7d=a11_0x5039;(function(_0x4adeac,_0x48834a){const _0x5bd55f=a11_0x5039,_0x4400a3=_0x4adeac();while(!![]){try{const _0x3a5ca7=parseInt(_0x5bd55f(0x92))/0x1*(parseInt(_0x5bd55f(0x7c))/0x2)+parseInt(_0x5bd55f(0x9a))/0x3*(-parseInt(_0x5bd55f(0x7b))/0x4)+parseInt(_0x5bd55f(0x98))/0x5+parseInt(_0x5bd55f(0xa1))/0x6*(parseInt(_0x5bd55f(0x7f))/0x7)+-parseInt(_0x5bd55f(0x87))/0x8+parseInt(_0x5bd55f(0xa0))/0x9+-parseInt(_0x5bd55f(0x8c))/0xa;if(_0x3a5ca7===_0x48834a)break;else _0x4400a3['push'](_0x4400a3['shift']());}catch(_0x24a613){_0x4400a3['push'](_0x4400a3['shift']());}}}(a11_0x42f7,0x59671));import a11_0xa03aa6 from'conf';import a11_0x76cf58 from'crypto';const config=new a11_0xa03aa6({'projectName':'woozlit-cli-email','defaults':{'imapHost':a11_0x3a6c7d(0x7e),'imapPort':0x3e1,'imapUser':'','imapPass':'','smtpHost':a11_0x3a6c7d(0x9c),'smtpPort':0x24b,'smtpUser':'','smtpPass':'','checkInterval':0x5,'allowedSenders':[],'enabled':![]}}),ENCRYPTION_KEY='woozlit_email_secure_key';function encrypt(_0xc24ca9){const _0x105e38=a11_0x3a6c7d;if(!_0xc24ca9)return'';const _0x5db623=a11_0x76cf58[_0x105e38(0x82)](0x10),_0x3d5fbe=a11_0x76cf58['createHash'](_0x105e38(0x9e))['update'](ENCRYPTION_KEY)[_0x105e38(0xa2)](),_0x51f0d2=a11_0x76cf58[_0x105e38(0x8b)](_0x105e38(0x88),_0x3d5fbe,_0x5db623);let _0x2d01d3=_0x51f0d2[_0x105e38(0x8f)](_0xc24ca9,'utf8',_0x105e38(0x95));return _0x2d01d3+=_0x51f0d2[_0x105e38(0x85)]('hex'),_0x5db623[_0x105e38(0x84)](_0x105e38(0x95))+':'+_0x2d01d3;}function a11_0x5039(_0x35dfe4,_0x5a4903){_0x35dfe4=_0x35dfe4-0x7b;const _0x42f701=a11_0x42f7();let _0x503969=_0x42f701[_0x35dfe4];return _0x503969;}function decrypt(_0x8dd693){const _0x4380a9=a11_0x3a6c7d;if(!_0x8dd693)return'';try{const [_0x40d710,_0x1bbca0]=_0x8dd693[_0x4380a9(0x94)](':');if(!_0x40d710||!_0x1bbca0)return'';const _0xff4ef0=Buffer['from'](_0x40d710,'hex'),_0x5c6566=a11_0x76cf58[_0x4380a9(0x8e)](_0x4380a9(0x9e))[_0x4380a9(0x8f)](ENCRYPTION_KEY)['digest'](),_0x5066c8=a11_0x76cf58[_0x4380a9(0x89)]('aes-256-cbc',_0x5c6566,_0xff4ef0);let _0x36b648=_0x5066c8[_0x4380a9(0x8f)](_0x1bbca0,_0x4380a9(0x95),'utf8');return _0x36b648+=_0x5066c8[_0x4380a9(0x85)](_0x4380a9(0x97)),_0x36b648;}catch{return'';}}export function setCredentials(_0x56c294,_0xa69fb5,_0x14c2ba,_0x128ec8){const _0x3e602b=a11_0x3a6c7d;config[_0x3e602b(0x86)](_0x3e602b(0x7d),_0x56c294),config[_0x3e602b(0x86)]('imapPass',encrypt(_0xa69fb5)),config[_0x3e602b(0x86)]('smtpUser',_0x56c294),config[_0x3e602b(0x86)](_0x3e602b(0x99),encrypt(_0xa69fb5));if(_0x14c2ba)config[_0x3e602b(0x86)](_0x3e602b(0x9f),_0x14c2ba);}export function getConfig(){const _0x465815=a11_0x3a6c7d;return{'imap':{'user':config[_0x465815(0x83)]('imapUser'),'password':decrypt(config['get']('imapPass')),'host':config[_0x465815(0x83)](_0x465815(0x9f)),'port':config[_0x465815(0x83)](_0x465815(0x96)),'tls':!![],'tlsOptions':{'rejectUnauthorized':![]},'authTimeout':0xbb8},'smtp':{'host':config[_0x465815(0x83)](_0x465815(0x8d)),'port':config['get'](_0x465815(0x9b)),'auth':{'user':config[_0x465815(0x83)](_0x465815(0x80)),'pass':decrypt(config[_0x465815(0x83)](_0x465815(0x99)))},'tls':{'rejectUnauthorized':![]}},'interval':config['get']('checkInterval'),'allowedSenders':config[_0x465815(0x83)]('allowedSenders')||[],'enabled':config['get']('enabled')};}export function isConfigured(){const _0x403661=a11_0x3a6c7d,_0x565c95=getConfig();return!!_0x565c95['imap'][_0x403661(0x90)]&&!!_0x565c95[_0x403661(0x9d)]['password'];}export function setEnabled(_0x1caa25){const _0x4d2411=a11_0x3a6c7d;config[_0x4d2411(0x86)](_0x4d2411(0x81),_0x1caa25);}function a11_0x42f7(){const _0x3e6d10=['randomBytes','get','toString','final','set','1984024EADfxS','aes-256-cbc','createDecipheriv','allowedSenders','createCipheriv','8396330HTHGyP','smtpHost','createHash','update','user','includes','1qidMRs','push','split','hex','imapPort','utf8','2105605AllNmY','smtpPass','501cBUUQp','smtpPort','smtp.gmail.com','imap','sha256','imapHost','6256782ypPpvQ','636642BfnQwU','digest','5008lxNsUQ','456546UVaOjt','imapUser','imap.gmail.com','21rrtTZJ','smtpUser','enabled'];a11_0x42f7=function(){return _0x3e6d10;};return a11_0x42f7();}export function addAllowedSender(_0xeaf91c){const _0x5b9ff7=a11_0x3a6c7d,_0x3fedcd=config[_0x5b9ff7(0x83)]('allowedSenders')||[];!_0x3fedcd[_0x5b9ff7(0x91)](_0xeaf91c)&&(_0x3fedcd[_0x5b9ff7(0x93)](_0xeaf91c),config[_0x5b9ff7(0x86)](_0x5b9ff7(0x8a),_0x3fedcd));}
@@ -1 +1 @@
1
- (function(_0x1bc5e7,_0x2281ce){var _0xe21656=a12_0x1105,_0x2eb13e=_0x1bc5e7();while(!![]){try{var _0x518238=-parseInt(_0xe21656(0xd9))/0x1+parseInt(_0xe21656(0xe1))/0x2+parseInt(_0xe21656(0xe2))/0x3+parseInt(_0xe21656(0xdd))/0x4+parseInt(_0xe21656(0xda))/0x5*(-parseInt(_0xe21656(0xde))/0x6)+parseInt(_0xe21656(0xdc))/0x7*(parseInt(_0xe21656(0xe0))/0x8)+-parseInt(_0xe21656(0xdf))/0x9*(parseInt(_0xe21656(0xdb))/0xa);if(_0x518238===_0x2281ce)break;else _0x2eb13e['push'](_0x2eb13e['shift']());}catch(_0x54fd9c){_0x2eb13e['push'](_0x2eb13e['shift']());}}}(a12_0xb0e9,0x1cd23));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./service.js';function a12_0x1105(_0x267c29,_0x5e6eb1){_0x267c29=_0x267c29-0xd9;var _0xb0e98f=a12_0xb0e9();var _0x110507=_0xb0e98f[_0x267c29];return _0x110507;}export{setupEmail}from'./setup.js';function a12_0xb0e9(){var _0x28b27e=['10yvaNqs','217MpBySz','662060NllnYm','211902moeWVx','814833lAmIlx','43672gyDscB','167896nqFkcJ','463941oNdqCC','188166nTEgiS','25rXvsfi'];a12_0xb0e9=function(){return _0x28b27e;};return a12_0xb0e9();}
1
+ function a12_0x2a94(){var _0x536978=['8818464mBtNbG','2652jJLNUg','11824yWjOrq','4270079RqgBii','11535tPsBwv','250569PBZRSA','81pSUVqu','2JnZUqA','6573wJThlw','367063Pqkpsx','756830XvQafQ'];a12_0x2a94=function(){return _0x536978;};return a12_0x2a94();}(function(_0x4f6d87,_0x27c576){var _0x42993=a12_0x59aa,_0x12e2c9=_0x4f6d87();while(!![]){try{var _0x41d501=parseInt(_0x42993(0xa1))/0x1+parseInt(_0x42993(0x9f))/0x2*(parseInt(_0x42993(0x9d))/0x3)+-parseInt(_0x42993(0x99))/0x4*(-parseInt(_0x42993(0x9c))/0x5)+parseInt(_0x42993(0x98))/0x6+parseInt(_0x42993(0xa0))/0x7*(-parseInt(_0x42993(0x9a))/0x8)+-parseInt(_0x42993(0x9e))/0x9*(parseInt(_0x42993(0xa2))/0xa)+-parseInt(_0x42993(0x9b))/0xb;if(_0x41d501===_0x27c576)break;else _0x12e2c9['push'](_0x12e2c9['shift']());}catch(_0x581a7a){_0x12e2c9['push'](_0x12e2c9['shift']());}}}(a12_0x2a94,0xf25b5));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./service.js';function a12_0x59aa(_0x33d46c,_0x26e826){_0x33d46c=_0x33d46c-0x98;var _0x2a9466=a12_0x2a94();var _0x59aa84=_0x2a9466[_0x33d46c];return _0x59aa84;}export{setupEmail}from'./setup.js';
@@ -1 +1 @@
1
- (function(_0x4c1d00,_0x39f5da){const _0x3882f8=a13_0x13f2,_0x398dc8=_0x4c1d00();while(!![]){try{const _0x4ed48d=-parseInt(_0x3882f8(0x108))/0x1*(parseInt(_0x3882f8(0xfa))/0x2)+parseInt(_0x3882f8(0xef))/0x3*(parseInt(_0x3882f8(0xfc))/0x4)+parseInt(_0x3882f8(0xfe))/0x5*(parseInt(_0x3882f8(0xf9))/0x6)+parseInt(_0x3882f8(0xfd))/0x7*(parseInt(_0x3882f8(0xdf))/0x8)+parseInt(_0x3882f8(0xe7))/0x9+-parseInt(_0x3882f8(0xf3))/0xa+-parseInt(_0x3882f8(0x102))/0xb;if(_0x4ed48d===_0x39f5da)break;else _0x398dc8['push'](_0x398dc8['shift']());}catch(_0x5a2636){_0x398dc8['push'](_0x398dc8['shift']());}}}(a13_0x50c0,0xe1a33));import a13_0x33c0b1 from'imap-simple';import a13_0x2b7379 from'nodemailer';import*as a13_0x3d8536 from'./config.js';import*as a13_0x793ae4 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let intervalId=null,isRunning=![];async function checkEmails(){const _0x59245d=a13_0x13f2,_0x468978=a13_0x3d8536[_0x59245d(0xea)]();try{const _0x11a183=await a13_0x33c0b1['connect']({'imap':_0x468978['imap']});await _0x11a183[_0x59245d(0xee)](_0x59245d(0xd9));const _0x508afa=['UNSEEN'],_0x15471d={'bodies':['HEADER',_0x59245d(0xf8)],'markSeen':!![]},_0x2df097=await _0x11a183['search'](_0x508afa,_0x15471d);_0x2df097['length']>0x0&&a13_0x793ae4[_0x59245d(0xe6)]('[Email]\x20Found\x20'+_0x2df097[_0x59245d(0xde)]+_0x59245d(0xdc));for(const _0x46589e of _0x2df097){const _0x3e5996=_0x46589e[_0x59245d(0x107)]['find'](_0x46b21b=>_0x46b21b[_0x59245d(0xfb)]===_0x59245d(0x10d)),_0x3b2a4f=_0x3e5996['body'][_0x59245d(0xe2)]?.[0x0]||'',_0x2b000d=_0x3e5996[_0x59245d(0xdb)][_0x59245d(0xe4)]?.[0x0]||_0x59245d(0xec);if(_0x468978[_0x59245d(0xf7)][_0x59245d(0xde)]>0x0){const _0x2770e9=_0x3b2a4f[_0x59245d(0x109)](/<(.+)>/)?.[0x1]||_0x3b2a4f;if(!_0x468978[_0x59245d(0xf7)][_0x59245d(0xe1)](_0x2770e9)){a13_0x793ae4[_0x59245d(0x106)](_0x59245d(0xe5)+_0x3b2a4f+_0x59245d(0x100));continue;}}const _0x1afbe2=_0x46589e[_0x59245d(0x107)][_0x59245d(0x10b)](_0x40f626=>_0x40f626[_0x59245d(0xfb)]===_0x59245d(0xf8)),_0x4a2a73=_0x1afbe2?.[_0x59245d(0xdb)]||'';a13_0x793ae4[_0x59245d(0xe6)](_0x59245d(0xf4)+_0x3b2a4f+_0x59245d(0xf2)+_0x2b000d);try{const _0x12bbfb=_0x59245d(0xe9)+_0x3b2a4f+_0x59245d(0x105)+_0x2b000d+_0x59245d(0xdd)+_0x4a2a73+_0x59245d(0xed),_0x10a35b=await sendChatMessage(getSelectedModel(),[{'role':'user','content':_0x12bbfb}]),_0x49ebd9=a13_0x2b7379[_0x59245d(0x103)](_0x468978[_0x59245d(0xf0)]);await _0x49ebd9[_0x59245d(0xe0)]({'from':_0x468978['smtp'][_0x59245d(0xeb)][_0x59245d(0x10c)],'to':_0x3b2a4f,'subject':_0x59245d(0xe8)+_0x2b000d,'text':_0x10a35b[_0x59245d(0x10a)]}),a13_0x793ae4[_0x59245d(0xe3)]('[Email]\x20Reply\x20sent\x20to\x20'+_0x3b2a4f);}catch(_0x70039d){a13_0x793ae4['error'](_0x59245d(0xf5)+_0x70039d[_0x59245d(0x101)]);}}_0x11a183[_0x59245d(0xda)]();}catch(_0x57f4b9){}}export async function startBot(){const _0x5cec9a=a13_0x13f2;if(!a13_0x3d8536[_0x5cec9a(0xf6)]())return![];if(isRunning)return!![];process[_0x5cec9a(0xf1)][_0x5cec9a(0xff)]='0',checkEmails();const _0x2260b9=a13_0x3d8536[_0x5cec9a(0xea)]()[_0x5cec9a(0x104)]||0x5;return intervalId=setInterval(checkEmails,_0x2260b9*0x3c*0x3e8),isRunning=!![],!![];}function a13_0x50c0(){const _0x1010d2=['find','user','HEADER','INBOX','end','body','\x20new\x20messages','\x0aBody:\x0a','length','369592UGjEUw','sendMail','includes','from','success','subject','[Email]\x20Ignored\x20mail\x20from\x20','info','9503613Wimxgu','Re:\x20','You\x20received\x20an\x20email\x20from\x20','getConfig','auth','No\x20Subject','\x0a\x0aDraft\x20a\x20helpful\x20reply.\x20Structure\x20it\x20clearly.','openBox','75AaXSry','smtp','env','\x20|\x20Subj:\x20','15165900jtdGZb','[Email]\x20From:\x20','[Email]\x20Processing/Reply\x20error:\x20','isConfigured','allowedSenders','TEXT','5232594yegTFv','2302oOWiWz','which','269736wmZSQJ','245khvkeJ','5IDeyOj','NODE_TLS_REJECT_UNAUTHORIZED','\x20(not\x20allowed)','message','29627246ygULnc','createTransport','interval',':\x0aSubject:\x20','dim','parts','84hvrFvF','match','content'];a13_0x50c0=function(){return _0x1010d2;};return a13_0x50c0();}export function stopBot(){intervalId&&(clearInterval(intervalId),intervalId=null),isRunning=![];}export function isBotRunning(){return isRunning;}function a13_0x13f2(_0x5eb7fe,_0x4ec4c8){_0x5eb7fe=_0x5eb7fe-0xd9;const _0x50c0de=a13_0x50c0();let _0x13f2bf=_0x50c0de[_0x5eb7fe];return _0x13f2bf;}export{isConfigured}from'./config.js';
1
+ (function(_0x574c25,_0x429759){const _0x4883fc=a13_0x1f3e,_0x5eca2e=_0x574c25();while(!![]){try{const _0x48722b=parseInt(_0x4883fc(0x11e))/0x1+parseInt(_0x4883fc(0x10e))/0x2*(parseInt(_0x4883fc(0x110))/0x3)+parseInt(_0x4883fc(0x10f))/0x4*(parseInt(_0x4883fc(0x105))/0x5)+-parseInt(_0x4883fc(0x119))/0x6+parseInt(_0x4883fc(0x12d))/0x7+-parseInt(_0x4883fc(0xfe))/0x8*(-parseInt(_0x4883fc(0x10a))/0x9)+parseInt(_0x4883fc(0x111))/0xa;if(_0x48722b===_0x429759)break;else _0x5eca2e['push'](_0x5eca2e['shift']());}catch(_0xf643e4){_0x5eca2e['push'](_0x5eca2e['shift']());}}}(a13_0x4270,0x6717d));function a13_0x4270(){const _0x2b2f23=['\x0a\x0aDraft\x20a\x20helpful\x20reply.\x20Structure\x20it\x20clearly.','TEXT','HEADER','\x20(not\x20allowed)','[Email]\x20From:\x20','8464rpzyEi','info','smtp','UNSEEN','find','includes','\x20|\x20Subj:\x20','5mLSQNQ','isConfigured','[Email]\x20Found\x20','You\x20received\x20an\x20email\x20from\x20','sendMail','45phJdtv','getConfig','Re:\x20','NODE_TLS_REJECT_UNAUTHORIZED','4PEWYzQ','757832LBAXRE','111015gNdUhg','1283650inSIqy','success','user','content','parts','\x20new\x20messages','imap','allowedSenders','4212072uHgIeg','match','dim','body','length','392850hRyKIz','INBOX','message','createTransport','which','[Email]\x20Processing/Reply\x20error:\x20','env','from',':\x0aSubject:\x20','auth','end','error','[Email]\x20Reply\x20sent\x20to\x20','subject','openBox','2340156TojEGT'];a13_0x4270=function(){return _0x2b2f23;};return a13_0x4270();}import a13_0x23325c from'imap-simple';function a13_0x1f3e(_0x4ece0d,_0x4df278){_0x4ece0d=_0x4ece0d-0xfc;const _0x4270cf=a13_0x4270();let _0x1f3ec0=_0x4270cf[_0x4ece0d];return _0x1f3ec0;}import a13_0x1032ae from'nodemailer';import*as a13_0x2d1237 from'./config.js';import*as a13_0x4eafb9 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let intervalId=null,isRunning=![];async function checkEmails(){const _0x4cfe=a13_0x1f3e,_0x474eb9=a13_0x2d1237[_0x4cfe(0x10b)]();try{const _0x3d57b6=await a13_0x23325c['connect']({'imap':_0x474eb9[_0x4cfe(0x117)]});await _0x3d57b6[_0x4cfe(0x12c)](_0x4cfe(0x11f));const _0x12b430=[_0x4cfe(0x101)],_0x63f7b1={'bodies':['HEADER',_0x4cfe(0x12f)],'markSeen':!![]},_0x2f74e2=await _0x3d57b6['search'](_0x12b430,_0x63f7b1);_0x2f74e2[_0x4cfe(0x11d)]>0x0&&a13_0x4eafb9['info'](_0x4cfe(0x107)+_0x2f74e2[_0x4cfe(0x11d)]+_0x4cfe(0x116));for(const _0x1cea24 of _0x2f74e2){const _0x29887b=_0x1cea24[_0x4cfe(0x115)][_0x4cfe(0x102)](_0x321c74=>_0x321c74['which']===_0x4cfe(0x130)),_0x543686=_0x29887b[_0x4cfe(0x11c)][_0x4cfe(0x125)]?.[0x0]||'',_0x1f5676=_0x29887b[_0x4cfe(0x11c)][_0x4cfe(0x12b)]?.[0x0]||'No\x20Subject';if(_0x474eb9[_0x4cfe(0x118)][_0x4cfe(0x11d)]>0x0){const _0x18e6c6=_0x543686[_0x4cfe(0x11a)](/<(.+)>/)?.[0x1]||_0x543686;if(!_0x474eb9['allowedSenders'][_0x4cfe(0x103)](_0x18e6c6)){a13_0x4eafb9[_0x4cfe(0x11b)]('[Email]\x20Ignored\x20mail\x20from\x20'+_0x543686+_0x4cfe(0xfc));continue;}}const _0x200ed9=_0x1cea24[_0x4cfe(0x115)][_0x4cfe(0x102)](_0x5bb43f=>_0x5bb43f[_0x4cfe(0x122)]===_0x4cfe(0x12f)),_0x17d05d=_0x200ed9?.['body']||'';a13_0x4eafb9[_0x4cfe(0xff)](_0x4cfe(0xfd)+_0x543686+_0x4cfe(0x104)+_0x1f5676);try{const _0xed2cb6=_0x4cfe(0x108)+_0x543686+_0x4cfe(0x126)+_0x1f5676+'\x0aBody:\x0a'+_0x17d05d+_0x4cfe(0x12e),_0x548fd1=await sendChatMessage(getSelectedModel(),[{'role':_0x4cfe(0x113),'content':_0xed2cb6}]),_0x5d2dce=a13_0x1032ae[_0x4cfe(0x121)](_0x474eb9['smtp']);await _0x5d2dce[_0x4cfe(0x109)]({'from':_0x474eb9[_0x4cfe(0x100)][_0x4cfe(0x127)][_0x4cfe(0x113)],'to':_0x543686,'subject':_0x4cfe(0x10c)+_0x1f5676,'text':_0x548fd1[_0x4cfe(0x114)]}),a13_0x4eafb9[_0x4cfe(0x112)](_0x4cfe(0x12a)+_0x543686);}catch(_0x2f0b11){a13_0x4eafb9[_0x4cfe(0x129)](_0x4cfe(0x123)+_0x2f0b11[_0x4cfe(0x120)]);}}_0x3d57b6[_0x4cfe(0x128)]();}catch(_0x47e28c){}}export async function startBot(){const _0x830025=a13_0x1f3e;if(!a13_0x2d1237[_0x830025(0x106)]())return![];if(isRunning)return!![];process[_0x830025(0x124)][_0x830025(0x10d)]='0',checkEmails();const _0x443065=a13_0x2d1237[_0x830025(0x10b)]()['interval']||0x5;return intervalId=setInterval(checkEmails,_0x443065*0x3c*0x3e8),isRunning=!![],!![];}export function stopBot(){intervalId&&(clearInterval(intervalId),intervalId=null),isRunning=![];}export function isBotRunning(){return isRunning;}export{isConfigured}from'./config.js';
@@ -1 +1 @@
1
- (function(_0x37db06,_0x57114b){const _0x187b7e=a14_0xefdc,_0x3c7b63=_0x37db06();while(!![]){try{const _0x3c9b3c=-parseInt(_0x187b7e(0x1d0))/0x1*(parseInt(_0x187b7e(0x1dd))/0x2)+-parseInt(_0x187b7e(0x1c5))/0x3*(parseInt(_0x187b7e(0x1cc))/0x4)+parseInt(_0x187b7e(0x1dc))/0x5*(-parseInt(_0x187b7e(0x1ce))/0x6)+parseInt(_0x187b7e(0x1e0))/0x7+parseInt(_0x187b7e(0x1c3))/0x8*(parseInt(_0x187b7e(0x1d5))/0x9)+-parseInt(_0x187b7e(0x1d4))/0xa+parseInt(_0x187b7e(0x1c2))/0xb;if(_0x3c9b3c===_0x57114b)break;else _0x3c7b63['push'](_0x3c7b63['shift']());}catch(_0x6277c8){_0x3c7b63['push'](_0x3c7b63['shift']());}}}(a14_0x5dee,0xc713f));function a14_0x5dee(){const _0xc455fe=['1532742zXaFjd','addAllowedSender','4StEVuW','Your\x20personal\x20email\x20(that\x20you\x20will\x20send\x20FROM):','success','gmail','14588920bOAlWi','7906617SSgkPA','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Email\x20Agent.','imap.gmail.com','Configure\x20advanced\x20server\x20settings?','SMTP\x20Port:','IMAP\x20Host:','Email\x20Provider\x20(gmail/outlook/other):','5wZepso','751486ZwiyFK','smtp.gmail.com','Email\x20configuration\x20saved!','5738348yiNVpD','info','setEnabled','Password\x20(or\x20App\x20Password):','43075615MTtBEb','8IilXKo','This\x20setup\x20will\x20configure\x20Woozlit\x20to\x20check\x20your\x20email\x20and\x20reply.','81wvTZEE','587','Email\x20Address:','SMTP\x20Host:','993','Only\x20allow\x20emails\x20from\x20yourself\x20(recommended)?','IMAP\x20Port:','234296DGMiwB','toLowerCase'];a14_0x5dee=function(){return _0xc455fe;};return a14_0x5dee();}import{password,input,confirm}from'@inquirer/prompts';import*as a14_0x49c584 from'./config.js';import*as a14_0x156ff2 from'../ui/output.js';function a14_0xefdc(_0x3598fa,_0x23d415){_0x3598fa=_0x3598fa-0x1c1;const _0x5dee05=a14_0x5dee();let _0xefdccc=_0x5dee05[_0x3598fa];return _0xefdccc;}export async function setupEmail(){const _0x2164d0=a14_0xefdc;a14_0x156ff2[_0x2164d0(0x1e1)](_0x2164d0(0x1c4)),a14_0x156ff2['warn']('Use\x20an\x20App\x20Password\x20if\x20you\x20are\x20using\x20Gmail\x20(2FA\x20enabled).');const _0x36df0e=await input({'message':_0x2164d0(0x1db),'default':_0x2164d0(0x1d3)}),_0x3a83f3=await input({'message':_0x2164d0(0x1c7)}),_0x572b86=await password({'message':_0x2164d0(0x1c1)});let _0xcf7ea0=_0x2164d0(0x1d7),_0x12a716=0x3e1,_0x510740=_0x2164d0(0x1de),_0x4c3b62=0x24b;if(_0x36df0e[_0x2164d0(0x1cd)]()!==_0x2164d0(0x1d3)){const _0x415b97=await confirm({'message':_0x2164d0(0x1d8),'default':![]});if(_0x415b97){_0xcf7ea0=await input({'message':_0x2164d0(0x1da),'default':_0xcf7ea0});const _0x3aa800=await input({'message':_0x2164d0(0x1cb),'default':_0x2164d0(0x1c9)});_0x12a716=parseInt(_0x3aa800),_0x510740=await input({'message':_0x2164d0(0x1c8),'default':_0x510740});const _0x3c99d2=await input({'message':_0x2164d0(0x1d9),'default':_0x2164d0(0x1c6)});_0x4c3b62=parseInt(_0x3c99d2);}}a14_0x49c584['setCredentials'](_0x3a83f3,_0x572b86,_0xcf7ea0,_0x12a716),a14_0x49c584[_0x2164d0(0x1e2)](!![]);const _0x47731f=await confirm({'message':_0x2164d0(0x1ca),'default':!![]});if(_0x47731f){a14_0x49c584['addAllowedSender'](_0x3a83f3);const _0x56570a=await input({'message':_0x2164d0(0x1d1)});if(_0x56570a)a14_0x49c584[_0x2164d0(0x1cf)](_0x56570a);}a14_0x156ff2[_0x2164d0(0x1d2)](_0x2164d0(0x1df)),a14_0x156ff2[_0x2164d0(0x1e1)](_0x2164d0(0x1d6));}
1
+ (function(_0x576982,_0x31cd40){const _0x1c0412=a14_0x1650,_0x551b04=_0x576982();while(!![]){try{const _0x22f3da=parseInt(_0x1c0412(0x122))/0x1+parseInt(_0x1c0412(0x123))/0x2+-parseInt(_0x1c0412(0x12e))/0x3+parseInt(_0x1c0412(0x12a))/0x4*(-parseInt(_0x1c0412(0x126))/0x5)+-parseInt(_0x1c0412(0x12c))/0x6+parseInt(_0x1c0412(0x124))/0x7+parseInt(_0x1c0412(0x127))/0x8;if(_0x22f3da===_0x31cd40)break;else _0x551b04['push'](_0x551b04['shift']());}catch(_0x17d444){_0x551b04['push'](_0x551b04['shift']());}}}(a14_0x404b,0xe130e));function a14_0x404b(){const _0x46f48d=['Configure\x20advanced\x20server\x20settings?','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Email\x20Agent.','gmail','setEnabled','Password\x20(or\x20App\x20Password):','SMTP\x20Host:','addAllowedSender','toLowerCase','IMAP\x20Host:','setCredentials','SMTP\x20Port:','587','37603SXTcuG','1060802HwQVnp','12192320gIRAOp','IMAP\x20Port:','1219685PdnxQZ','10289616ngjsMk','warn','info','12HVkCIO','Only\x20allow\x20emails\x20from\x20yourself\x20(recommended)?','4793214TLkver','imap.gmail.com','3428712hlsEYR'];a14_0x404b=function(){return _0x46f48d;};return a14_0x404b();}import{password,input,confirm}from'@inquirer/prompts';import*as a14_0x4519f1 from'./config.js';function a14_0x1650(_0x256573,_0x5e07aa){_0x256573=_0x256573-0x11b;const _0x404bba=a14_0x404b();let _0x165055=_0x404bba[_0x256573];return _0x165055;}import*as a14_0x52a87d from'../ui/output.js';export async function setupEmail(){const _0x33acdf=a14_0x1650;a14_0x52a87d[_0x33acdf(0x129)]('This\x20setup\x20will\x20configure\x20Woozlit\x20to\x20check\x20your\x20email\x20and\x20reply.'),a14_0x52a87d[_0x33acdf(0x128)]('Use\x20an\x20App\x20Password\x20if\x20you\x20are\x20using\x20Gmail\x20(2FA\x20enabled).');const _0x419753=await input({'message':'Email\x20Provider\x20(gmail/outlook/other):','default':_0x33acdf(0x131)}),_0x4ae75a=await input({'message':'Email\x20Address:'}),_0x1e4472=await password({'message':_0x33acdf(0x133)});let _0x9c3886=_0x33acdf(0x12d),_0x5b884d=0x3e1,_0x154813='smtp.gmail.com',_0x39ca8a=0x24b;if(_0x419753[_0x33acdf(0x11d)]()!==_0x33acdf(0x131)){const _0x1ce7f2=await confirm({'message':_0x33acdf(0x12f),'default':![]});if(_0x1ce7f2){_0x9c3886=await input({'message':_0x33acdf(0x11e),'default':_0x9c3886});const _0x3b4e81=await input({'message':_0x33acdf(0x125),'default':'993'});_0x5b884d=parseInt(_0x3b4e81),_0x154813=await input({'message':_0x33acdf(0x11b),'default':_0x154813});const _0x3ba7f5=await input({'message':_0x33acdf(0x120),'default':_0x33acdf(0x121)});_0x39ca8a=parseInt(_0x3ba7f5);}}a14_0x4519f1[_0x33acdf(0x11f)](_0x4ae75a,_0x1e4472,_0x9c3886,_0x5b884d),a14_0x4519f1[_0x33acdf(0x132)](!![]);const _0x3c4ccd=await confirm({'message':_0x33acdf(0x12b),'default':!![]});if(_0x3c4ccd){a14_0x4519f1[_0x33acdf(0x11c)](_0x4ae75a);const _0x4e7e8a=await input({'message':'Your\x20personal\x20email\x20(that\x20you\x20will\x20send\x20FROM):'});if(_0x4e7e8a)a14_0x4519f1[_0x33acdf(0x11c)](_0x4e7e8a);}a14_0x52a87d['success']('Email\x20configuration\x20saved!'),a14_0x52a87d['info'](_0x33acdf(0x130));}
@@ -1 +1 @@
1
- const a15_0x28091d=a15_0x2226;(function(_0x310352,_0x569529){const _0x3339c5=a15_0x2226,_0x70cc44=_0x310352();while(!![]){try{const _0x13b024=-parseInt(_0x3339c5(0xe3))/0x1+parseInt(_0x3339c5(0xe2))/0x2+parseInt(_0x3339c5(0xc6))/0x3+-parseInt(_0x3339c5(0xba))/0x4*(parseInt(_0x3339c5(0xc3))/0x5)+-parseInt(_0x3339c5(0xbe))/0x6+parseInt(_0x3339c5(0xe0))/0x7*(-parseInt(_0x3339c5(0xe1))/0x8)+-parseInt(_0x3339c5(0xcc))/0x9*(-parseInt(_0x3339c5(0xc9))/0xa);if(_0x13b024===_0x569529)break;else _0x70cc44['push'](_0x70cc44['shift']());}catch(_0x5212c9){_0x70cc44['push'](_0x70cc44['shift']());}}}(a15_0x4e93,0x9ddc6));function a15_0x4e93(){const _0x192147=['text','headers','toString','stringify','total_count','/comments','open','json','654241TVzAna','24hklGiQ','435400NvskGi','751537pPNJUG','2022-11-28','content','20UBXhYx','https://api.github.com','/pulls?state=','/contents/','4299168oyKpAX','POST','main','/installation/repositories?per_page=1','base64','47225LidktG','/pulls','GitHub\x20App','371916kEFVTq','Not\x20authenticated\x20with\x20GitHub.\x20Run\x20\x27/github\x20login\x27\x20first.','from','1235650ifhUXu','/issues/','Bearer\x20','153VMfmay','refs/heads/','/repos/','login','sha','length','?ref=','repositories','GitHub\x20API\x20error:\x20','owner','/user/repos?per_page=100&sort=updated','&per_page=50'];a15_0x4e93=function(){return _0x192147;};return a15_0x4e93();}import{getGitHubToken}from'./auth.js';function a15_0x2226(_0x42cf12,_0xda7111){_0x42cf12=_0x42cf12-0xb9;const _0x4e9330=a15_0x4e93();let _0x2226d4=_0x4e9330[_0x42cf12];return _0x2226d4;}async function githubRequest(_0x3988f6,_0xaae04c={}){const _0x2b055f=a15_0x2226,_0xe1eb0a=await getGitHubToken();if(!_0xe1eb0a)throw new Error(_0x2b055f(0xc7));const _0x51bfc6=await fetch(_0x2b055f(0xbb)+_0x3988f6,{..._0xaae04c,'headers':{'Authorization':_0x2b055f(0xcb)+_0xe1eb0a,'Accept':'application/vnd.github+json','X-GitHub-Api-Version':_0x2b055f(0xe4),..._0xaae04c[_0x2b055f(0xd9)]}});if(!_0x51bfc6['ok']){const _0x519a06=await _0x51bfc6[_0x2b055f(0xd8)]();throw new Error(_0x2b055f(0xd4)+_0x51bfc6['status']+'\x20-\x20'+_0x519a06);}return _0x51bfc6[_0x2b055f(0xdf)]();}export async function listRepos(){const _0x3f63d3=a15_0x2226;return githubRequest(_0x3f63d3(0xd6));}export async function getRepo(_0x13a9d8,_0x280e1b){return githubRequest('/repos/'+_0x13a9d8+'/'+_0x280e1b);}export async function readFile(_0x4a5722,_0xd01f1d,_0xc99581,_0x719aba=a15_0x28091d(0xc0)){const _0x2f4792=a15_0x28091d,_0x3d78fc=await githubRequest(_0x2f4792(0xce)+_0x4a5722+'/'+_0xd01f1d+_0x2f4792(0xbd)+_0xc99581+_0x2f4792(0xd2)+_0x719aba),_0x1931ac=Buffer[_0x2f4792(0xc8)](_0x3d78fc[_0x2f4792(0xb9)],_0x2f4792(0xc2))[_0x2f4792(0xda)]('utf-8');return _0x1931ac;}export async function createOrUpdateFile(_0x28120f,_0x455a2a,_0x18b074,_0x3ae261,_0x1b336c,_0x20739f=a15_0x28091d(0xc0),_0x47feec){const _0x305d7a=a15_0x28091d,_0x21343f=Buffer['from'](_0x3ae261)[_0x305d7a(0xda)](_0x305d7a(0xc2));return githubRequest(_0x305d7a(0xce)+_0x28120f+'/'+_0x455a2a+_0x305d7a(0xbd)+_0x18b074,{'method':'PUT','body':JSON[_0x305d7a(0xdb)]({'message':_0x1b336c,'content':_0x21343f,'branch':_0x20739f,..._0x47feec&&{'sha':_0x47feec}})});}export async function createPullRequest(_0x485fc7,_0x2b4f96,_0x17e312,_0x59ca0f,_0x4665c9=a15_0x28091d(0xc0),_0x343735){const _0x238494=a15_0x28091d;return githubRequest(_0x238494(0xce)+_0x485fc7+'/'+_0x2b4f96+_0x238494(0xc4),{'method':_0x238494(0xbf),'body':JSON[_0x238494(0xdb)]({'title':_0x17e312,'head':_0x59ca0f,'base':_0x4665c9,'body':_0x343735||''})});}export async function listPullRequests(_0x585a79,_0x2aef12,_0x2b46c0=a15_0x28091d(0xde)){const _0x340ec0=a15_0x28091d;return githubRequest(_0x340ec0(0xce)+_0x585a79+'/'+_0x2aef12+_0x340ec0(0xbc)+_0x2b46c0+_0x340ec0(0xd7));}export async function commentOnPR(_0x1a40e2,_0x583f11,_0x24e010,_0x6d4750){const _0x4ef9f6=a15_0x28091d;return githubRequest(_0x4ef9f6(0xce)+_0x1a40e2+'/'+_0x583f11+_0x4ef9f6(0xca)+_0x24e010+_0x4ef9f6(0xdd),{'method':_0x4ef9f6(0xbf),'body':JSON[_0x4ef9f6(0xdb)]({'body':_0x6d4750})});}export async function createBranch(_0x2206ca,_0x43ad08,_0x1c6e44,_0x45d770=a15_0x28091d(0xc0)){const _0x17dbfd=a15_0x28091d,_0xc9ef42=await githubRequest(_0x17dbfd(0xce)+_0x2206ca+'/'+_0x43ad08+'/git/ref/heads/'+_0x45d770);return githubRequest(_0x17dbfd(0xce)+_0x2206ca+'/'+_0x43ad08+'/git/refs',{'method':_0x17dbfd(0xbf),'body':JSON[_0x17dbfd(0xdb)]({'ref':_0x17dbfd(0xcd)+_0x1c6e44,'sha':_0xc9ef42['object'][_0x17dbfd(0xd0)]})});}export async function getAppStatus(){const _0x1fde24=a15_0x28091d;try{const _0x322f67=await githubRequest(_0x1fde24(0xc1)),_0x2c76aa=_0x322f67[_0x1fde24(0xdc)];let _0x39b0da=_0x1fde24(0xc5);return _0x322f67[_0x1fde24(0xd3)]&&_0x322f67['repositories'][_0x1fde24(0xd1)]>0x0&&(_0x39b0da=_0x322f67[_0x1fde24(0xd3)][0x0][_0x1fde24(0xd5)][_0x1fde24(0xcf)]),{'valid':!![],'repoCount':_0x2c76aa,'accountName':_0x39b0da};}catch(_0x2d0ac0){throw _0x2d0ac0;}}
1
+ const a15_0x1ad802=a15_0x531c;(function(_0x126372,_0x3a63ea){const _0x42d8b7=a15_0x531c,_0x576238=_0x126372();while(!![]){try{const _0x404ac2=-parseInt(_0x42d8b7(0x196))/0x1*(parseInt(_0x42d8b7(0x17e))/0x2)+parseInt(_0x42d8b7(0x178))/0x3*(-parseInt(_0x42d8b7(0x18e))/0x4)+parseInt(_0x42d8b7(0x199))/0x5*(-parseInt(_0x42d8b7(0x17a))/0x6)+parseInt(_0x42d8b7(0x16e))/0x7*(parseInt(_0x42d8b7(0x16f))/0x8)+parseInt(_0x42d8b7(0x170))/0x9*(parseInt(_0x42d8b7(0x188))/0xa)+-parseInt(_0x42d8b7(0x189))/0xb*(parseInt(_0x42d8b7(0x16a))/0xc)+parseInt(_0x42d8b7(0x195))/0xd*(parseInt(_0x42d8b7(0x174))/0xe);if(_0x404ac2===_0x3a63ea)break;else _0x576238['push'](_0x576238['shift']());}catch(_0x3286fa){_0x576238['push'](_0x576238['shift']());}}}(a15_0x518d,0xbc123));import{getGitHubToken}from'./auth.js';function a15_0x518d(){const _0x4e1173=['total_count','/installation/repositories?per_page=1','344202hyIhnZ','/contents/','6nqmvkL','json','\x20-\x20','repositories','1522NHWIEu','utf-8','base64','from','sha','text','main','https://api.github.com','/git/refs','/user/repos?per_page=100&sort=updated','116530XbGFGs','1122FAKQEj','stringify','GitHub\x20API\x20error:\x20','/repos/','GitHub\x20App','28kOygxy','2022-11-28','/pulls','refs/heads/','Bearer\x20','PUT','?ref=','91JFijgz','1507xayXou','length','login','6832190buyGlb','66576IsUPfa','/git/ref/heads/','/pulls?state=','content','4445574qtsFwp','8zvraeY','1053slAzDs','POST','/issues/','headers','5308310IbHZqL','&per_page=50'];a15_0x518d=function(){return _0x4e1173;};return a15_0x518d();}async function githubRequest(_0x36100a,_0x35856b={}){const _0xe5ebf4=a15_0x531c,_0x4b5855=await getGitHubToken();if(!_0x4b5855)throw new Error('Not\x20authenticated\x20with\x20GitHub.\x20Run\x20\x27/github\x20login\x27\x20first.');const _0x3f4212=await fetch(_0xe5ebf4(0x185)+_0x36100a,{..._0x35856b,'headers':{'Authorization':_0xe5ebf4(0x192)+_0x4b5855,'Accept':'application/vnd.github+json','X-GitHub-Api-Version':_0xe5ebf4(0x18f),..._0x35856b[_0xe5ebf4(0x173)]}});if(!_0x3f4212['ok']){const _0x300a0d=await _0x3f4212[_0xe5ebf4(0x183)]();throw new Error(_0xe5ebf4(0x18b)+_0x3f4212['status']+_0xe5ebf4(0x17c)+_0x300a0d);}return _0x3f4212[_0xe5ebf4(0x17b)]();}export async function listRepos(){const _0x4aaae0=a15_0x531c;return githubRequest(_0x4aaae0(0x187));}function a15_0x531c(_0x2135d2,_0x5e14de){_0x2135d2=_0x2135d2-0x16a;const _0x518d21=a15_0x518d();let _0x531cf8=_0x518d21[_0x2135d2];return _0x531cf8;}export async function getRepo(_0x14c7c2,_0x33bc9c){const _0x4d235d=a15_0x531c;return githubRequest(_0x4d235d(0x18c)+_0x14c7c2+'/'+_0x33bc9c);}export async function readFile(_0x3ff58d,_0x3e4d8f,_0x24abf3,_0x3e3d6d=a15_0x1ad802(0x184)){const _0x232257=a15_0x1ad802,_0x4b2d2c=await githubRequest('/repos/'+_0x3ff58d+'/'+_0x3e4d8f+_0x232257(0x179)+_0x24abf3+_0x232257(0x194)+_0x3e3d6d),_0x5ce8ff=Buffer[_0x232257(0x181)](_0x4b2d2c[_0x232257(0x16d)],_0x232257(0x180))['toString'](_0x232257(0x17f));return _0x5ce8ff;}export async function createOrUpdateFile(_0x5d177c,_0x486cc9,_0x2f193e,_0x319378,_0x5ac144,_0x5404e2='main',_0x392e71){const _0x2bcd08=a15_0x1ad802,_0x4275c8=Buffer['from'](_0x319378)['toString'](_0x2bcd08(0x180));return githubRequest(_0x2bcd08(0x18c)+_0x5d177c+'/'+_0x486cc9+_0x2bcd08(0x179)+_0x2f193e,{'method':_0x2bcd08(0x193),'body':JSON[_0x2bcd08(0x18a)]({'message':_0x5ac144,'content':_0x4275c8,'branch':_0x5404e2,..._0x392e71&&{'sha':_0x392e71}})});}export async function createPullRequest(_0x5a86ab,_0x14b6a7,_0x2ff80e,_0x402a7f,_0x5ea36f=a15_0x1ad802(0x184),_0x19676f){const _0x403fff=a15_0x1ad802;return githubRequest(_0x403fff(0x18c)+_0x5a86ab+'/'+_0x14b6a7+_0x403fff(0x190),{'method':'POST','body':JSON[_0x403fff(0x18a)]({'title':_0x2ff80e,'head':_0x402a7f,'base':_0x5ea36f,'body':_0x19676f||''})});}export async function listPullRequests(_0x9baa39,_0x3fe320,_0x2eb303='open'){const _0x1871aa=a15_0x1ad802;return githubRequest(_0x1871aa(0x18c)+_0x9baa39+'/'+_0x3fe320+_0x1871aa(0x16c)+_0x2eb303+_0x1871aa(0x175));}export async function commentOnPR(_0xa67ade,_0x3129f6,_0x33b38f,_0x4aafb0){const _0x54819e=a15_0x1ad802;return githubRequest(_0x54819e(0x18c)+_0xa67ade+'/'+_0x3129f6+_0x54819e(0x172)+_0x33b38f+'/comments',{'method':_0x54819e(0x171),'body':JSON[_0x54819e(0x18a)]({'body':_0x4aafb0})});}export async function createBranch(_0x437281,_0x3acd42,_0x4f0df9,_0x36cdfc='main'){const _0x17eb20=a15_0x1ad802,_0x55633f=await githubRequest(_0x17eb20(0x18c)+_0x437281+'/'+_0x3acd42+_0x17eb20(0x16b)+_0x36cdfc);return githubRequest(_0x17eb20(0x18c)+_0x437281+'/'+_0x3acd42+_0x17eb20(0x186),{'method':'POST','body':JSON['stringify']({'ref':_0x17eb20(0x191)+_0x4f0df9,'sha':_0x55633f['object'][_0x17eb20(0x182)]})});}export async function getAppStatus(){const _0x445e22=a15_0x1ad802;try{const _0x40f978=await githubRequest(_0x445e22(0x177)),_0x23e4fe=_0x40f978[_0x445e22(0x176)];let _0xa3408=_0x445e22(0x18d);return _0x40f978[_0x445e22(0x17d)]&&_0x40f978[_0x445e22(0x17d)][_0x445e22(0x197)]>0x0&&(_0xa3408=_0x40f978[_0x445e22(0x17d)][0x0]['owner'][_0x445e22(0x198)]),{'valid':!![],'repoCount':_0x23e4fe,'accountName':_0xa3408};}catch(_0x47653c){throw _0x47653c;}}
@@ -1 +1 @@
1
- const a16_0xa4fc44=a16_0x14b3;(function(_0x1517f4,_0x2341fa){const _0x53ab9e=a16_0x14b3,_0x416662=_0x1517f4();while(!![]){try{const _0x2a964e=parseInt(_0x53ab9e(0x124))/0x1+-parseInt(_0x53ab9e(0x131))/0x2+-parseInt(_0x53ab9e(0x128))/0x3*(-parseInt(_0x53ab9e(0x11b))/0x4)+parseInt(_0x53ab9e(0x11f))/0x5*(-parseInt(_0x53ab9e(0x12d))/0x6)+parseInt(_0x53ab9e(0x117))/0x7+-parseInt(_0x53ab9e(0x122))/0x8*(parseInt(_0x53ab9e(0x12e))/0x9)+parseInt(_0x53ab9e(0x123))/0xa;if(_0x2a964e===_0x2341fa)break;else _0x416662['push'](_0x416662['shift']());}catch(_0x36abd6){_0x416662['push'](_0x416662['shift']());}}}(a16_0x52d5,0x38db8));import{promises as a16_0x48dbc3}from'fs';function a16_0x14b3(_0x4a07e6,_0x5dcbc2){_0x4a07e6=_0x4a07e6-0x116;const _0x52d5bc=a16_0x52d5();let _0x14b3cc=_0x52d5bc[_0x4a07e6];return _0x14b3cc;}import{join}from'path';import{createAppAuth}from'@octokit/auth-app';import{homedir}from'os';const GLOBAL_CONFIG_DIR=join(homedir(),a16_0xa4fc44(0x12f)),CONFIG_FILE=join(GLOBAL_CONFIG_DIR,'github-app-config.json'),KEY_FILE=join(GLOBAL_CONFIG_DIR,a16_0xa4fc44(0x12c));let appAuth=null,installationToken=null;function a16_0x52d5(){const _0x9d8d0f=['then','550478ntmNTO','expiresAt','error','unlink','installationId','GitHub\x20App\x20not\x20configured.\x20Run\x20/github\x20setup','795424mghKMs','token','You\x20can\x20now\x20access\x20private\x20repositories','✓\x20GitHub\x20App\x20authenticated!','244tdvDxU','log','Error\x20clearing\x20session:','access','611215hppLRa','privateKey','utf8','24XhzYqf','4434780DBCBHb','156651ExBKto','installation','Run\x20/github\x20setup\x20to\x20configure\x20automatically','appId','846cPoWzW','readFile','Try\x20running\x20/github\x20setup\x20again','catch','github-app.pem','6WeDfdS','301779AoROUu','.woozlit'];a16_0x52d5=function(){return _0x9d8d0f;};return a16_0x52d5();}async function getGitHubAppConfig(){const _0x182443=a16_0xa4fc44;try{const _0x2f4c1d=await a16_0x48dbc3[_0x182443(0x11e)](CONFIG_FILE)[_0x182443(0x130)](()=>!![])[_0x182443(0x12b)](()=>![]),_0x2543c2=await a16_0x48dbc3[_0x182443(0x11e)](KEY_FILE)[_0x182443(0x130)](()=>!![])[_0x182443(0x12b)](()=>![]);if(!_0x2f4c1d||!_0x2543c2)return null;const _0x48cf5a=await a16_0x48dbc3[_0x182443(0x129)](CONFIG_FILE,'utf8'),{appId:_0x4e0210,installationId:_0x4955a5}=JSON['parse'](_0x48cf5a),_0x4e499f=await a16_0x48dbc3[_0x182443(0x129)](KEY_FILE,_0x182443(0x121));if(!_0x4e0210||!_0x4955a5||!_0x4e499f)return null;return{'appId':_0x4e0210,'privateKey':_0x4e499f,'installationId':_0x4955a5};}catch(_0x191c7b){return null;}}async function initAppAuth(){const _0x2c9a5b=a16_0xa4fc44;if(appAuth)return;const _0x260ddb=await getGitHubAppConfig();if(!_0x260ddb)throw new Error(_0x2c9a5b(0x116));appAuth=createAppAuth({'appId':_0x260ddb[_0x2c9a5b(0x127)],'privateKey':_0x260ddb[_0x2c9a5b(0x120)],'installationId':_0x260ddb[_0x2c9a5b(0x135)]});}async function getInstallationToken(){const _0x8c90f6=a16_0xa4fc44;await initAppAuth();if(installationToken&&installationToken[_0x8c90f6(0x132)]>new Date())return installationToken[_0x8c90f6(0x118)];const {token:_0x1c6511,expiresAt:_0x438f0c}=await appAuth({'type':_0x8c90f6(0x125)});return installationToken={'token':_0x1c6511,'expiresAt':new Date(_0x438f0c)},_0x1c6511;}export async function getGitHubToken(){const _0x457e2a=a16_0xa4fc44;try{return await getInstallationToken();}catch(_0x593c7b){return console[_0x457e2a(0x133)]('GitHub\x20App\x20auth\x20failed:',_0x593c7b),null;}}export async function isGitHubAuthenticated(){const _0x277265=await getGitHubAppConfig();return _0x277265!==null;}export async function loginGitHub(){const _0x1b50d6=a16_0xa4fc44,_0x3df2f6=await getGitHubAppConfig();if(!_0x3df2f6){console['log']('\x0a❌\x20GitHub\x20App\x20not\x20configured'),console['log'](_0x1b50d6(0x126));return;}try{const _0x1c6282=await getInstallationToken();console[_0x1b50d6(0x11c)](_0x1b50d6(0x11a)),console[_0x1b50d6(0x11c)](_0x1b50d6(0x119));}catch(_0x5a1e8c){console[_0x1b50d6(0x133)]('❌\x20Authentication\x20failed:',_0x5a1e8c),console[_0x1b50d6(0x11c)](_0x1b50d6(0x12a));}}export async function logoutGitHub(){const _0x1b856f=a16_0xa4fc44;try{await a16_0x48dbc3[_0x1b856f(0x134)](CONFIG_FILE)['catch'](()=>{}),await a16_0x48dbc3[_0x1b856f(0x134)](KEY_FILE)[_0x1b856f(0x12b)](()=>{}),installationToken=null,appAuth=null,console[_0x1b856f(0x11c)]('✓\x20GitHub\x20session\x20cleared');}catch(_0x54cbd1){console[_0x1b856f(0x133)](_0x1b856f(0x11d),_0x54cbd1);}}
1
+ const a16_0x8933a2=a16_0x286f;(function(_0x20355e,_0x5427d0){const _0x4120e7=a16_0x286f,_0x54d4b0=_0x20355e();while(!![]){try{const _0x32c865=-parseInt(_0x4120e7(0x1f5))/0x1+parseInt(_0x4120e7(0x20d))/0x2*(parseInt(_0x4120e7(0x1ed))/0x3)+parseInt(_0x4120e7(0x1f9))/0x4+-parseInt(_0x4120e7(0x1f4))/0x5*(parseInt(_0x4120e7(0x1f2))/0x6)+-parseInt(_0x4120e7(0x1f0))/0x7*(-parseInt(_0x4120e7(0x1ff))/0x8)+-parseInt(_0x4120e7(0x204))/0x9+parseInt(_0x4120e7(0x209))/0xa*(-parseInt(_0x4120e7(0x1f8))/0xb);if(_0x32c865===_0x5427d0)break;else _0x54d4b0['push'](_0x54d4b0['shift']());}catch(_0x3c7fa2){_0x54d4b0['push'](_0x54d4b0['shift']());}}}(a16_0x4f99,0x20d31));import{promises as a16_0xf571d}from'fs';import{join}from'path';import{createAppAuth}from'@octokit/auth-app';import{homedir}from'os';const GLOBAL_CONFIG_DIR=join(homedir(),'.woozlit'),CONFIG_FILE=join(GLOBAL_CONFIG_DIR,a16_0x8933a2(0x202)),KEY_FILE=join(GLOBAL_CONFIG_DIR,a16_0x8933a2(0x1f7));let appAuth=null,installationToken=null;async function getGitHubAppConfig(){const _0x43408c=a16_0x8933a2;try{const _0x15f408=await a16_0xf571d[_0x43408c(0x208)](CONFIG_FILE)[_0x43408c(0x1fd)](()=>!![])['catch'](()=>![]),_0xa84fb4=await a16_0xf571d['access'](KEY_FILE)[_0x43408c(0x1fd)](()=>!![])['catch'](()=>![]);if(!_0x15f408||!_0xa84fb4)return null;const _0x39d2d8=await a16_0xf571d[_0x43408c(0x1f1)](CONFIG_FILE,_0x43408c(0x207)),{appId:_0x3a5d9b,installationId:_0x3c0e0c}=JSON[_0x43408c(0x200)](_0x39d2d8),_0xe06f38=await a16_0xf571d[_0x43408c(0x1f1)](KEY_FILE,_0x43408c(0x207));if(!_0x3a5d9b||!_0x3c0e0c||!_0xe06f38)return null;return{'appId':_0x3a5d9b,'privateKey':_0xe06f38,'installationId':_0x3c0e0c};}catch(_0x3bea9c){return null;}}function a16_0x4f99(){const _0x348aa0=['756728iILDdO','readFile','474YAfCrw','❌\x20Authentication\x20failed:','11065Pzywoe','71934AOVAJq','Error\x20clearing\x20session:','github-app.pem','2981dueKrJ','766708ievZhE','Try\x20running\x20/github\x20setup\x20again','appId','GitHub\x20App\x20not\x20configured.\x20Run\x20/github\x20setup','then','expiresAt','8HCFTVV','parse','Run\x20/github\x20setup\x20to\x20configure\x20automatically','github-app-config.json','GitHub\x20App\x20auth\x20failed:','226485kUvszG','✓\x20GitHub\x20session\x20cleared','log','utf8','access','3270ErKapo','✓\x20GitHub\x20App\x20authenticated!','catch','\x0a❌\x20GitHub\x20App\x20not\x20configured','22966RWczkN','unlink','51GasJSZ','You\x20can\x20now\x20access\x20private\x20repositories','error'];a16_0x4f99=function(){return _0x348aa0;};return a16_0x4f99();}async function initAppAuth(){const _0x136786=a16_0x8933a2;if(appAuth)return;const _0x2596b5=await getGitHubAppConfig();if(!_0x2596b5)throw new Error(_0x136786(0x1fc));appAuth=createAppAuth({'appId':_0x2596b5[_0x136786(0x1fb)],'privateKey':_0x2596b5['privateKey'],'installationId':_0x2596b5['installationId']});}async function getInstallationToken(){const _0x352edb=a16_0x8933a2;await initAppAuth();if(installationToken&&installationToken[_0x352edb(0x1fe)]>new Date())return installationToken['token'];const {token:_0x3c4e47,expiresAt:_0x242f0f}=await appAuth({'type':'installation'});return installationToken={'token':_0x3c4e47,'expiresAt':new Date(_0x242f0f)},_0x3c4e47;}export async function getGitHubToken(){const _0x16ea3d=a16_0x8933a2;try{return await getInstallationToken();}catch(_0x54d850){return console[_0x16ea3d(0x1ef)](_0x16ea3d(0x203),_0x54d850),null;}}function a16_0x286f(_0x2fb994,_0xf5751a){_0x2fb994=_0x2fb994-0x1ed;const _0x4f99e7=a16_0x4f99();let _0x286fe6=_0x4f99e7[_0x2fb994];return _0x286fe6;}export async function isGitHubAuthenticated(){const _0x653034=await getGitHubAppConfig();return _0x653034!==null;}export async function loginGitHub(){const _0x36d5f6=a16_0x8933a2,_0x330096=await getGitHubAppConfig();if(!_0x330096){console[_0x36d5f6(0x206)](_0x36d5f6(0x20c)),console[_0x36d5f6(0x206)](_0x36d5f6(0x201));return;}try{const _0x33583a=await getInstallationToken();console[_0x36d5f6(0x206)](_0x36d5f6(0x20a)),console[_0x36d5f6(0x206)](_0x36d5f6(0x1ee));}catch(_0x596674){console[_0x36d5f6(0x1ef)](_0x36d5f6(0x1f3),_0x596674),console[_0x36d5f6(0x206)](_0x36d5f6(0x1fa));}}export async function logoutGitHub(){const _0x489e1e=a16_0x8933a2;try{await a16_0xf571d[_0x489e1e(0x20e)](CONFIG_FILE)[_0x489e1e(0x20b)](()=>{}),await a16_0xf571d['unlink'](KEY_FILE)[_0x489e1e(0x20b)](()=>{}),installationToken=null,appAuth=null,console[_0x489e1e(0x206)](_0x489e1e(0x205));}catch(_0x11e9b1){console[_0x489e1e(0x1ef)](_0x489e1e(0x1f6),_0x11e9b1);}}
@@ -1 +1 @@
1
- (function(_0x3f0466,_0x68d940){const _0x4df46d=a17_0x32b9,_0x4f271f=_0x3f0466();while(!![]){try{const _0x5bf383=-parseInt(_0x4df46d(0x172))/0x1*(parseInt(_0x4df46d(0x163))/0x2)+parseInt(_0x4df46d(0x190))/0x3+-parseInt(_0x4df46d(0x16d))/0x4+-parseInt(_0x4df46d(0x16f))/0x5*(-parseInt(_0x4df46d(0x177))/0x6)+-parseInt(_0x4df46d(0x17b))/0x7+-parseInt(_0x4df46d(0x17a))/0x8*(parseInt(_0x4df46d(0x174))/0x9)+-parseInt(_0x4df46d(0x180))/0xa*(-parseInt(_0x4df46d(0x153))/0xb);if(_0x5bf383===_0x68d940)break;else _0x4f271f['push'](_0x4f271f['shift']());}catch(_0x5b5f47){_0x4f271f['push'](_0x4f271f['shift']());}}}(a17_0x2078,0x5a499));import{promises as a17_0x418a72}from'fs';import{join}from'path';import*as a17_0x19a96f from'../ui/output.js';import{createServer}from'http';import a17_0x28a93e from'open';import{homedir}from'os';import{createAppAuth}from'@octokit/auth-app';import{input}from'@inquirer/prompts';async function createGitHubAppManifestFlow(){return new Promise(async(_0x3c059e,_0x50bb8e)=>{const _0xf38d=a17_0x32b9;let _0x4b2698=![];const _0x35933b=createServer(async(_0x54b6c6,_0x53c5bf)=>{const _0x42909d=a17_0x32b9;if(_0x54b6c6[_0x42909d(0x159)]===_0x42909d(0x173)){_0x53c5bf[_0x42909d(0x165)](0x194),_0x53c5bf[_0x42909d(0x17f)]();return;}a17_0x19a96f[_0x42909d(0x175)](_0x42909d(0x188)+_0x54b6c6[_0x42909d(0x18f)]+'\x20'+_0x54b6c6[_0x42909d(0x159)]);const _0x137414=new URL(_0x54b6c6[_0x42909d(0x159)]||'/',_0x42909d(0x182)),_0x49ae3e=_0x137414[_0x42909d(0x193)][_0x42909d(0x15f)]('code');_0x49ae3e?(_0x53c5bf[_0x42909d(0x165)](0xc8,{'Content-Type':_0x42909d(0x152)}),_0x53c5bf['end'](_0x42909d(0x145)),_0x53c5bf['destroy'](),!_0x4b2698&&(_0x4b2698=!![],_0x35933b[_0x42909d(0x192)](),_0x29017e(_0x49ae3e))):(_0x53c5bf[_0x42909d(0x165)](0x190),_0x53c5bf[_0x42909d(0x17f)](_0x42909d(0x15a)));}),_0x29017e=async _0xe1fbe0=>{const _0x5ecda2=a17_0x32b9;try{a17_0x19a96f[_0x5ecda2(0x18b)]('\x0aStep\x202:\x20Registering\x20GitHub\x20App...');const _0xc09043=await fetch(_0x5ecda2(0x14c)+_0xe1fbe0+_0x5ecda2(0x17d),{'method':_0x5ecda2(0x154),'headers':{'Accept':_0x5ecda2(0x18a)}});if(!_0xc09043['ok'])throw new Error(_0x5ecda2(0x156)+await _0xc09043[_0x5ecda2(0x15e)]());const _0x514445=await _0xc09043['json']();_0x3c059e(_0x514445);}catch(_0x5cfce4){_0x50bb8e(_0x5cfce4);}};_0x35933b[_0xf38d(0x155)](0xbb8,_0xf38d(0x148),async()=>{const _0x2464e1=_0xf38d,_0x434d03={'name':_0x2464e1(0x15d)+Date[_0x2464e1(0x158)](),'url':_0x2464e1(0x182),'hook_attributes':{'url':_0x2464e1(0x170)},'redirect_url':_0x2464e1(0x149),'public':![],'default_permissions':{'contents':'write','pull_requests':_0x2464e1(0x179),'metadata':_0x2464e1(0x14a)},'default_events':[]},_0x2579bb=new URLSearchParams({'manifest':JSON['stringify'](_0x434d03)}),_0x10a9f1=_0x2464e1(0x18e)+_0x2579bb['toString']();a17_0x19a96f['info'](_0x2464e1(0x18c)),a17_0x19a96f[_0x2464e1(0x175)](_0x2464e1(0x16e)+_0x10a9f1);try{await a17_0x28a93e(_0x10a9f1),a17_0x19a96f[_0x2464e1(0x14b)](_0x2464e1(0x162)),a17_0x19a96f[_0x2464e1(0x18b)]('\x0awaiting\x20for\x20browser\x20callback...'),a17_0x19a96f[_0x2464e1(0x175)](_0x2464e1(0x150));try{const _0x331dbf=await input({'message':_0x2464e1(0x151),'transformer':_0x3b1bc2=>_0x3b1bc2[_0x2464e1(0x16b)]()});_0x331dbf&&!_0x4b2698&&(_0x4b2698=!![],_0x35933b[_0x2464e1(0x192)](),_0x29017e(_0x331dbf));}catch(_0x4c8316){}}catch(_0x34f22b){a17_0x19a96f[_0x2464e1(0x14d)]('Failed\x20to\x20open\x20browser\x20automatically.'),a17_0x19a96f[_0x2464e1(0x18b)](_0x2464e1(0x15c)+_0x10a9f1);}}),_0x35933b['on'](_0xf38d(0x14d),_0x3f606a=>{const _0x552822=_0xf38d;a17_0x19a96f[_0x552822(0x14d)](_0x552822(0x176)+_0x3f606a),_0x50bb8e(_0x3f606a);});});}async function saveConfig(_0x7a8938,_0x51af01,_0x30eecd){const _0x5c5f28=a17_0x32b9,_0x27bdde=join(homedir(),_0x5c5f28(0x16a));try{await a17_0x418a72['access'](_0x27bdde);}catch{await a17_0x418a72[_0x5c5f28(0x181)](_0x27bdde,{'recursive':!![]});}const _0x48a8fe=join(_0x27bdde,_0x5c5f28(0x178)),_0x369f06=join(_0x27bdde,'github-app.pem');await a17_0x418a72[_0x5c5f28(0x166)](_0x369f06,_0x51af01,_0x5c5f28(0x15b)),await a17_0x418a72[_0x5c5f28(0x166)](_0x48a8fe,JSON[_0x5c5f28(0x189)]({'appId':_0x7a8938,'installationId':_0x30eecd},null,0x2),'utf8');}function a17_0x32b9(_0x5ef34f,_0x48387c){_0x5ef34f=_0x5ef34f-0x145;const _0x20789f=a17_0x2078();let _0x32b917=_0x20789f[_0x5ef34f];return _0x32b917;}async function installAppIfNeeded(_0x2bb48f){const _0xa6ea99=a17_0x32b9;a17_0x19a96f[_0xa6ea99(0x18b)](_0xa6ea99(0x185));const _0x1ce95d=createAppAuth({'appId':_0x2bb48f['id'],'privateKey':_0x2bb48f[_0xa6ea99(0x183)]});try{const {data:_0x2377f1}=await _0x1ce95d[_0xa6ea99(0x184)]((_0x3caef1,_0x3f4bec)=>_0x3caef1(_0x3f4bec),{'method':_0xa6ea99(0x191),'url':_0xa6ea99(0x161)});if(_0x2377f1&&_0x2377f1['length']>0x0)return _0x2377f1[0x0]['id'];}catch(_0x269814){}a17_0x19a96f[_0xa6ea99(0x18b)](_0xa6ea99(0x14f)),a17_0x19a96f[_0xa6ea99(0x18b)]('Please\x20install\x20the\x20app\x20on\x20your\x20account/repositories.');const _0x915759=_0x2bb48f[_0xa6ea99(0x186)]+_0xa6ea99(0x187);await a17_0x28a93e(_0x915759),a17_0x19a96f[_0xa6ea99(0x18b)](_0xa6ea99(0x147)+_0x915759),a17_0x19a96f[_0xa6ea99(0x18b)]('Press\x20Enter\x20after\x20you\x20have\x20installed\x20the\x20app...'),await new Promise(_0x25c4dd=>process['stdin'][_0xa6ea99(0x146)]('data',_0x25c4dd));const _0x8ca725=createAppAuth({'appId':_0x2bb48f['id'],'privateKey':_0x2bb48f['pem']}),{data:_0x3f5442}=await _0x8ca725[_0xa6ea99(0x184)]((_0x1e878f,_0x3c183f)=>_0x1e878f(_0x3c183f),{'method':'GET','url':'/app/installations'});if(_0x3f5442&&_0x3f5442[_0xa6ea99(0x14e)]>0x0)return _0x3f5442[0x0]['id'];throw new Error('Could\x20not\x20find\x20installation.\x20Please\x20try\x20again.');}function a17_0x2078(){const _0x532fdc=['App\x20Name:\x20','https://github.com/settings/apps/new?','method','1224213CEycRp','GET','close','searchParams','<h1>Setup\x20Complete!</h1><p>You\x20can\x20close\x20this\x20tab\x20and\x20return\x20to\x20the\x20terminal.</p>','once','Opened:\x20','127.0.0.1','http://127.0.0.1:3000/callback','read','success','https://api.github.com/app-manifests/','error','length','App\x20created\x20but\x20not\x20installed\x20yet.','(If\x20nothing\x20happens,\x20copy\x20the\x20\x22code\x22\x20parameter\x20from\x20the\x20browser\x20URL\x20address\x20bar\x20and\x20paste\x20it\x20below,\x20or\x20simply\x20press\x20Enter\x20to\x20start\x20manual\x20entry)','Paste\x20code\x20(or\x20wait\x20for\x20automatic\x20redirect):','text/html','3055580ziTBjQ','POST','listen','Failed\x20to\x20exchange\x20code:\x20','name','now','url','No\x20code\x20found','utf8','Please\x20visit\x20this\x20URL\x20manually:\x0a','Woozlit\x20CLI\x20','text','get','\x0a✓\x20GitHub\x20App\x20created!','/app/installations','Browser\x20opened!\x20Please\x20click\x20\x22Create\x20GitHub\x20App\x22\x20on\x20the\x20page.','79444EFVyPB','\x0a✓\x20GitHub\x20App\x20setup\x20complete!','writeHead','writeFile','header','✓\x20App\x20installed!','\x0aYou\x20can\x20try\x20manual\x20setup\x20with:\x20/github\x20manual','.woozlit','trim','exit','53256ZWgkDC','Url:\x20','534850gzMVjI','http://127.0.0.1:3000/webhook','\x0aStep\x204:\x20Saving\x20configuration...','6BDkbZj','/favicon.ico','738dAOfka','dim','Server\x20error:\x20','6cKYXsz','github-app-config.json','write','51488JGKyvy','1394162CRDCME','App\x20ID:\x20','/conversions','GitHub\x20App\x20Auto-Setup','end','30FuoRAO','mkdir','http://127.0.0.1:3000','pem','hook','\x0aStep\x203:\x20Checking\x20installation...','html_url','/installations/new','Received\x20request:\x20','stringify','application/vnd.github+json','info','Step\x201:\x20Opening\x20GitHub\x20to\x20create\x20App...'];a17_0x2078=function(){return _0x532fdc;};return a17_0x2078();}export async function autoSetupGitHub(){const _0x354ca7=a17_0x32b9;a17_0x19a96f[_0x354ca7(0x167)](_0x354ca7(0x17e)),a17_0x19a96f[_0x354ca7(0x175)]('This\x20will\x20create\x20a\x20GitHub\x20App\x20automatically\x20via\x20Manifest\x20Flow\x0a');try{const _0x46d7fc=await createGitHubAppManifestFlow();a17_0x19a96f[_0x354ca7(0x14b)](_0x354ca7(0x160));const _0x96cfd0=await installAppIfNeeded(_0x46d7fc);a17_0x19a96f[_0x354ca7(0x14b)](_0x354ca7(0x168)),a17_0x19a96f['info'](_0x354ca7(0x171)),await saveConfig(_0x46d7fc['id'],_0x46d7fc[_0x354ca7(0x183)],_0x96cfd0),a17_0x19a96f['success'](_0x354ca7(0x164)),a17_0x19a96f[_0x354ca7(0x175)](_0x354ca7(0x17c)+_0x46d7fc['id']),a17_0x19a96f[_0x354ca7(0x175)](_0x354ca7(0x18d)+_0x46d7fc[_0x354ca7(0x157)]),a17_0x19a96f['dim']('Configuration\x20saved\x20globally\x20to\x20~/.woozlit/'),a17_0x19a96f[_0x354ca7(0x14b)]('You\x20can\x20now\x20access\x20private\x20repositories!');}catch(_0x30e8d9){a17_0x19a96f[_0x354ca7(0x14d)]('\x0aSetup\x20failed:\x20'+_0x30e8d9),a17_0x19a96f[_0x354ca7(0x175)](_0x354ca7(0x169)),process[_0x354ca7(0x16c)](0x1);}}
1
+ (function(_0x37599a,_0x2d339a){const _0x470682=a17_0x2ef3,_0x27b6fc=_0x37599a();while(!![]){try{const _0x4b2731=-parseInt(_0x470682(0x1f5))/0x1*(-parseInt(_0x470682(0x211))/0x2)+-parseInt(_0x470682(0x20e))/0x3+-parseInt(_0x470682(0x1fb))/0x4*(parseInt(_0x470682(0x1e0))/0x5)+-parseInt(_0x470682(0x215))/0x6*(-parseInt(_0x470682(0x21a))/0x7)+parseInt(_0x470682(0x1d2))/0x8+parseInt(_0x470682(0x205))/0x9*(parseInt(_0x470682(0x213))/0xa)+-parseInt(_0x470682(0x1e3))/0xb;if(_0x4b2731===_0x2d339a)break;else _0x27b6fc['push'](_0x27b6fc['shift']());}catch(_0x311cde){_0x27b6fc['push'](_0x27b6fc['shift']());}}}(a17_0xe029,0x923d2));import{promises as a17_0xc26098}from'fs';import{join}from'path';import*as a17_0x3324e5 from'../ui/output.js';import{createServer}from'http';import a17_0x3d5199 from'open';import{homedir}from'os';import{createAppAuth}from'@octokit/auth-app';import{input}from'@inquirer/prompts';function a17_0x2ef3(_0x4eeac5,_0x3a2831){_0x4eeac5=_0x4eeac5-0x1d1;const _0xe0295a=a17_0xe029();let _0x2ef370=_0xe0295a[_0x4eeac5];return _0x2ef370;}async function createGitHubAppManifestFlow(){return new Promise(async(_0x260ae7,_0x3680ae)=>{const _0x159641=a17_0x2ef3;let _0x1e0376=![];const _0x44d572=createServer(async(_0x145c97,_0x6dcc27)=>{const _0x56d9ee=a17_0x2ef3;if(_0x145c97['url']===_0x56d9ee(0x1de)){_0x6dcc27[_0x56d9ee(0x203)](0x194),_0x6dcc27['end']();return;}a17_0x3324e5[_0x56d9ee(0x1e2)]('Received\x20request:\x20'+_0x145c97[_0x56d9ee(0x216)]+'\x20'+_0x145c97[_0x56d9ee(0x202)]);const _0x31c54e=new URL(_0x145c97[_0x56d9ee(0x202)]||'/',_0x56d9ee(0x1d4)),_0x1378b8=_0x31c54e['searchParams'][_0x56d9ee(0x20f)](_0x56d9ee(0x212));_0x1378b8?(_0x6dcc27['writeHead'](0xc8,{'Content-Type':_0x56d9ee(0x21c)}),_0x6dcc27[_0x56d9ee(0x1fa)](_0x56d9ee(0x1da)),_0x6dcc27[_0x56d9ee(0x1eb)](),!_0x1e0376&&(_0x1e0376=!![],_0x44d572[_0x56d9ee(0x207)](),_0x220a96(_0x1378b8))):(_0x6dcc27[_0x56d9ee(0x203)](0x190),_0x6dcc27[_0x56d9ee(0x1fa)](_0x56d9ee(0x219)));}),_0x220a96=async _0x3ea8d4=>{const _0x51ecab=a17_0x2ef3;try{a17_0x3324e5['info'](_0x51ecab(0x1f9));const _0x126a4a=await fetch(_0x51ecab(0x1d9)+_0x3ea8d4+'/conversions',{'method':'POST','headers':{'Accept':_0x51ecab(0x20a)}});if(!_0x126a4a['ok'])throw new Error('Failed\x20to\x20exchange\x20code:\x20'+await _0x126a4a['text']());const _0x28097c=await _0x126a4a['json']();_0x260ae7(_0x28097c);}catch(_0x572855){_0x3680ae(_0x572855);}};_0x44d572[_0x159641(0x20b)](0xbb8,_0x159641(0x210),async()=>{const _0xe3e72b=_0x159641,_0x249215={'name':'Woozlit\x20CLI\x20'+Date[_0xe3e72b(0x1ec)](),'url':_0xe3e72b(0x1d4),'hook_attributes':{'url':_0xe3e72b(0x1f6)},'redirect_url':'http://127.0.0.1:3000/callback','public':![],'default_permissions':{'contents':_0xe3e72b(0x218),'pull_requests':'write','metadata':_0xe3e72b(0x1d1)},'default_events':[]},_0x101cbd=new URLSearchParams({'manifest':JSON[_0xe3e72b(0x1f3)](_0x249215)}),_0x3473d7=_0xe3e72b(0x1e8)+_0x101cbd[_0xe3e72b(0x1d8)]();a17_0x3324e5['info'](_0xe3e72b(0x1e5)),a17_0x3324e5['dim'](_0xe3e72b(0x1dd)+_0x3473d7);try{await a17_0x3d5199(_0x3473d7),a17_0x3324e5[_0xe3e72b(0x201)](_0xe3e72b(0x1db)),a17_0x3324e5[_0xe3e72b(0x209)](_0xe3e72b(0x20c)),a17_0x3324e5[_0xe3e72b(0x1e2)](_0xe3e72b(0x1df));try{const _0x2c75d7=await input({'message':_0xe3e72b(0x21b),'transformer':_0x364332=>_0x364332[_0xe3e72b(0x1dc)]()});_0x2c75d7&&!_0x1e0376&&(_0x1e0376=!![],_0x44d572[_0xe3e72b(0x207)](),_0x220a96(_0x2c75d7));}catch(_0x11dd76){}}catch(_0x239931){a17_0x3324e5[_0xe3e72b(0x1ee)](_0xe3e72b(0x214)),a17_0x3324e5[_0xe3e72b(0x209)]('Please\x20visit\x20this\x20URL\x20manually:\x0a'+_0x3473d7);}}),_0x44d572['on'](_0x159641(0x1ee),_0x5de005=>{const _0x125207=_0x159641;a17_0x3324e5[_0x125207(0x1ee)]('Server\x20error:\x20'+_0x5de005),_0x3680ae(_0x5de005);});});}async function saveConfig(_0x4d6046,_0x2c471a,_0x3b51c0){const _0x5e347c=a17_0x2ef3,_0x4abce8=join(homedir(),_0x5e347c(0x1ef));try{await a17_0xc26098[_0x5e347c(0x1d6)](_0x4abce8);}catch{await a17_0xc26098[_0x5e347c(0x1e7)](_0x4abce8,{'recursive':!![]});}const _0x237ae5=join(_0x4abce8,_0x5e347c(0x1d7)),_0x37bd05=join(_0x4abce8,_0x5e347c(0x1e1));await a17_0xc26098[_0x5e347c(0x1e6)](_0x37bd05,_0x2c471a,_0x5e347c(0x1e9)),await a17_0xc26098[_0x5e347c(0x1e6)](_0x237ae5,JSON['stringify']({'appId':_0x4d6046,'installationId':_0x3b51c0},null,0x2),_0x5e347c(0x1e9));}async function installAppIfNeeded(_0x36c505){const _0x4b350f=a17_0x2ef3;a17_0x3324e5[_0x4b350f(0x209)](_0x4b350f(0x1f1));const _0x30af05=createAppAuth({'appId':_0x36c505['id'],'privateKey':_0x36c505[_0x4b350f(0x1fd)]});try{const {data:_0x5344d4}=await _0x30af05[_0x4b350f(0x204)]((_0xc6fd27,_0x27c580)=>_0xc6fd27(_0x27c580),{'method':_0x4b350f(0x1f0),'url':_0x4b350f(0x200)});if(_0x5344d4&&_0x5344d4[_0x4b350f(0x217)]>0x0)return _0x5344d4[0x0]['id'];}catch(_0x356698){}a17_0x3324e5[_0x4b350f(0x209)](_0x4b350f(0x1fc)),a17_0x3324e5[_0x4b350f(0x209)](_0x4b350f(0x1ff));const _0x1caa8f=_0x36c505['html_url']+_0x4b350f(0x1f7);await a17_0x3d5199(_0x1caa8f),a17_0x3324e5[_0x4b350f(0x209)](_0x4b350f(0x1f8)+_0x1caa8f),a17_0x3324e5[_0x4b350f(0x209)](_0x4b350f(0x208)),await new Promise(_0x364eb7=>process[_0x4b350f(0x20d)][_0x4b350f(0x1e4)]('data',_0x364eb7));const _0xb70066=createAppAuth({'appId':_0x36c505['id'],'privateKey':_0x36c505[_0x4b350f(0x1fd)]}),{data:_0x349e05}=await _0xb70066[_0x4b350f(0x204)]((_0x4f4326,_0x3b2416)=>_0x4f4326(_0x3b2416),{'method':'GET','url':_0x4b350f(0x200)});if(_0x349e05&&_0x349e05[_0x4b350f(0x217)]>0x0)return _0x349e05[0x0]['id'];throw new Error('Could\x20not\x20find\x20installation.\x20Please\x20try\x20again.');}function a17_0xe029(){const _0x2e7477=['2391904nBIeNI','\x0aYou\x20can\x20try\x20manual\x20setup\x20with:\x20/github\x20manual','http://127.0.0.1:3000','GitHub\x20App\x20Auto-Setup','access','github-app-config.json','toString','https://api.github.com/app-manifests/','<h1>Setup\x20Complete!</h1><p>You\x20can\x20close\x20this\x20tab\x20and\x20return\x20to\x20the\x20terminal.</p>','Browser\x20opened!\x20Please\x20click\x20\x22Create\x20GitHub\x20App\x22\x20on\x20the\x20page.','trim','Url:\x20','/favicon.ico','(If\x20nothing\x20happens,\x20copy\x20the\x20\x22code\x22\x20parameter\x20from\x20the\x20browser\x20URL\x20address\x20bar\x20and\x20paste\x20it\x20below,\x20or\x20simply\x20press\x20Enter\x20to\x20start\x20manual\x20entry)','45EwicJp','github-app.pem','dim','3171663AxapRt','once','Step\x201:\x20Opening\x20GitHub\x20to\x20create\x20App...','writeFile','mkdir','https://github.com/settings/apps/new?','utf8','\x0aSetup\x20failed:\x20','destroy','now','This\x20will\x20create\x20a\x20GitHub\x20App\x20automatically\x20via\x20Manifest\x20Flow\x0a','error','.woozlit','GET','\x0aStep\x203:\x20Checking\x20installation...','header','stringify','App\x20ID:\x20','13vKrxaK','http://127.0.0.1:3000/webhook','/installations/new','Opened:\x20','\x0aStep\x202:\x20Registering\x20GitHub\x20App...','end','62940QuIKtV','App\x20created\x20but\x20not\x20installed\x20yet.','pem','App\x20Name:\x20','Please\x20install\x20the\x20app\x20on\x20your\x20account/repositories.','/app/installations','success','url','writeHead','hook','18AgfWWV','name','close','Press\x20Enter\x20after\x20you\x20have\x20installed\x20the\x20app...','info','application/vnd.github+json','listen','\x0awaiting\x20for\x20browser\x20callback...','stdin','3147387dwGIwX','get','127.0.0.1','4762IxLvaX','code','3405190eifhZq','Failed\x20to\x20open\x20browser\x20automatically.','156ztdgmx','method','length','write','No\x20code\x20found','287294iOpLbP','Paste\x20code\x20(or\x20wait\x20for\x20automatic\x20redirect):','text/html','\x0a✓\x20GitHub\x20App\x20setup\x20complete!','✓\x20App\x20installed!','read'];a17_0xe029=function(){return _0x2e7477;};return a17_0xe029();}export async function autoSetupGitHub(){const _0x1cb317=a17_0x2ef3;a17_0x3324e5[_0x1cb317(0x1f2)](_0x1cb317(0x1d5)),a17_0x3324e5[_0x1cb317(0x1e2)](_0x1cb317(0x1ed));try{const _0x22fe5c=await createGitHubAppManifestFlow();a17_0x3324e5[_0x1cb317(0x201)]('\x0a✓\x20GitHub\x20App\x20created!');const _0x11093d=await installAppIfNeeded(_0x22fe5c);a17_0x3324e5[_0x1cb317(0x201)](_0x1cb317(0x21e)),a17_0x3324e5[_0x1cb317(0x209)]('\x0aStep\x204:\x20Saving\x20configuration...'),await saveConfig(_0x22fe5c['id'],_0x22fe5c['pem'],_0x11093d),a17_0x3324e5['success'](_0x1cb317(0x21d)),a17_0x3324e5[_0x1cb317(0x1e2)](_0x1cb317(0x1f4)+_0x22fe5c['id']),a17_0x3324e5['dim'](_0x1cb317(0x1fe)+_0x22fe5c[_0x1cb317(0x206)]),a17_0x3324e5[_0x1cb317(0x1e2)]('Configuration\x20saved\x20globally\x20to\x20~/.woozlit/'),a17_0x3324e5[_0x1cb317(0x201)]('You\x20can\x20now\x20access\x20private\x20repositories!');}catch(_0x35dec1){a17_0x3324e5['error'](_0x1cb317(0x1ea)+_0x35dec1),a17_0x3324e5['dim'](_0x1cb317(0x1d3)),process['exit'](0x1);}}
@@ -1 +1 @@
1
- (function(_0x26efd1,_0x5d05e2){const _0x70d3bf=a18_0x4389,_0x3736a8=_0x26efd1();while(!![]){try{const _0x1813d3=-parseInt(_0x70d3bf(0x143))/0x1+parseInt(_0x70d3bf(0x114))/0x2+parseInt(_0x70d3bf(0x135))/0x3*(parseInt(_0x70d3bf(0x13e))/0x4)+parseInt(_0x70d3bf(0x122))/0x5*(-parseInt(_0x70d3bf(0x117))/0x6)+-parseInt(_0x70d3bf(0x11c))/0x7+-parseInt(_0x70d3bf(0x144))/0x8*(-parseInt(_0x70d3bf(0x13f))/0x9)+-parseInt(_0x70d3bf(0x134))/0xa;if(_0x1813d3===_0x5d05e2)break;else _0x3736a8['push'](_0x3736a8['shift']());}catch(_0x54b964){_0x3736a8['push'](_0x3736a8['shift']());}}}(a18_0x48da,0x7b42b));function a18_0x48da(){const _0x3c2bbd=['length','Installed\x20on\x20account:\x20','slice','1172hQCxYa','608445RQfzue','login','GitHub\x20Commands','\x20more','250009ZvcySy','104tgmyFw','1791476DoJNBa','(public)','repoCount','720342XhppeQ','accountName','status','(private)','info','4543980aGSVDw','Your\x20GitHub\x20Repositories','✓\x20Authenticated\x20as\x20GitHub\x20App','Fetching\x20repos...','\x20\x20/github\x20login\x20\x20\x20-\x20Test\x20GitHub\x20App\x20authentication','\x20\x20/github\x20logout\x20\x20-\x20Clear\x20GitHub\x20App\x20credentials','20dibeSm','private','\x20\x20/github\x20repos\x20\x20\x20-\x20List\x20your\x20repositories\x20(including\x20private)','header','full_name','createSpinner','error','\x20\x20/github\x20setup\x20\x20\x20-\x20Auto-create\x20GitHub\x20App\x20(recommended)','Not\x20logged\x20in.\x20Run\x20\x27/github\x20setup\x27\x20first','stop','\x20\x20...\x20and\x20','forEach','Access\x20to\x20','repos','dim','Token\x20may\x20be\x20invalid\x20or\x20app\x20has\x20no\x20repo\x20access:\x20','logout','config','7426880HgGAOm','8727BdFVaS','setup','warn','\x20repositories','start','manual'];a18_0x48da=function(){return _0x3c2bbd;};return a18_0x48da();}import*as a18_0x31391f from'../ui/output.js';import{loginGitHub,logoutGitHub,isGitHubAuthenticated}from'./auth.js';import{listRepos}from'./api.js';function a18_0x4389(_0x50d24a,_0x147c55){_0x50d24a=_0x50d24a-0x114;const _0x48dac1=a18_0x48da();let _0x4389a9=_0x48dac1[_0x50d24a];return _0x4389a9;}import{autoSetupGitHub}from'./auto-setup.js';import{manualSetupGitHub}from'./manual-setup.js';export async function handleGitHubCommand(_0x534532){const _0x1b6f29=a18_0x4389;if(_0x534532===_0x1b6f29(0x136)){await autoSetupGitHub();return;}if(_0x534532===_0x1b6f29(0x13a)||_0x534532===_0x1b6f29(0x133)){await manualSetupGitHub();return;}if(_0x534532===_0x1b6f29(0x140)){await loginGitHub();return;}if(_0x534532===_0x1b6f29(0x132)){await logoutGitHub();return;}if(_0x534532===_0x1b6f29(0x119)){const _0x5c3a2c=await isGitHubAuthenticated();if(_0x5c3a2c)try{const {getAppStatus:_0x332809}=await import('./api.js'),_0x544cdc=await _0x332809();a18_0x31391f['success'](_0x1b6f29(0x11e)),_0x544cdc[_0x1b6f29(0x118)]&&a18_0x31391f[_0x1b6f29(0x11b)](_0x1b6f29(0x13c)+_0x544cdc[_0x1b6f29(0x118)]),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x12e)+_0x544cdc[_0x1b6f29(0x116)]+_0x1b6f29(0x138));}catch(_0x28a331){a18_0x31391f[_0x1b6f29(0x137)](_0x1b6f29(0x131)+_0x28a331);}else a18_0x31391f['dim']('Not\x20logged\x20in\x20to\x20GitHub\x20App');return;}if(_0x534532===_0x1b6f29(0x12f)){const _0x30cede=await isGitHubAuthenticated();if(!_0x30cede){a18_0x31391f[_0x1b6f29(0x128)](_0x1b6f29(0x12a));return;}a18_0x31391f['header'](_0x1b6f29(0x11d));const _0x5a0d99=a18_0x31391f[_0x1b6f29(0x127)](_0x1b6f29(0x11f));_0x5a0d99[_0x1b6f29(0x139)]();try{const _0x29c9bf=await listRepos();_0x5a0d99['stop'](),_0x29c9bf[_0x1b6f29(0x13d)](0x0,0xa)[_0x1b6f29(0x12d)](_0x20f474=>{const _0x3bc22e=_0x1b6f29,_0x2a984c=_0x20f474[_0x3bc22e(0x123)]?_0x3bc22e(0x11a):_0x3bc22e(0x115);a18_0x31391f[_0x3bc22e(0x130)]('\x20\x20'+_0x20f474[_0x3bc22e(0x126)]+'\x20'+_0x2a984c);}),_0x29c9bf['length']>0xa&&a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x12c)+(_0x29c9bf[_0x1b6f29(0x13b)]-0xa)+_0x1b6f29(0x142));}catch(_0x319916){_0x5a0d99[_0x1b6f29(0x12b)](),a18_0x31391f['error']('Failed\x20to\x20fetch\x20repos:\x20'+_0x319916);}return;}a18_0x31391f[_0x1b6f29(0x125)](_0x1b6f29(0x141)),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x129)),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x120)),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x121)),a18_0x31391f[_0x1b6f29(0x130)]('\x20\x20/github\x20status\x20\x20-\x20Check\x20authentication\x20status'),a18_0x31391f[_0x1b6f29(0x130)](_0x1b6f29(0x124));}
1
+ function a18_0x470f(_0x1bd596,_0x5c247a){_0x1bd596=_0x1bd596-0x1a4;const _0x285e90=a18_0x285e();let _0x470fa8=_0x285e90[_0x1bd596];return _0x470fa8;}(function(_0x1a9b77,_0x2cc469){const _0x185563=a18_0x470f,_0x2fb2a9=_0x1a9b77();while(!![]){try{const _0x106813=parseInt(_0x185563(0x1be))/0x1*(parseInt(_0x185563(0x1ae))/0x2)+-parseInt(_0x185563(0x1bc))/0x3*(-parseInt(_0x185563(0x1a9))/0x4)+parseInt(_0x185563(0x1ba))/0x5*(parseInt(_0x185563(0x1c3))/0x6)+-parseInt(_0x185563(0x1b7))/0x7*(-parseInt(_0x185563(0x1d0))/0x8)+-parseInt(_0x185563(0x1ce))/0x9+-parseInt(_0x185563(0x1b8))/0xa*(-parseInt(_0x185563(0x1b5))/0xb)+-parseInt(_0x185563(0x1b3))/0xc*(parseInt(_0x185563(0x1b9))/0xd);if(_0x106813===_0x2cc469)break;else _0x2fb2a9['push'](_0x2fb2a9['shift']());}catch(_0x8028c7){_0x2fb2a9['push'](_0x2fb2a9['shift']());}}}(a18_0x285e,0x5ef6c));import*as a18_0x346838 from'../ui/output.js';import{loginGitHub,logoutGitHub,isGitHubAuthenticated}from'./auth.js';import{listRepos}from'./api.js';import{autoSetupGitHub}from'./auto-setup.js';import{manualSetupGitHub}from'./manual-setup.js';export async function handleGitHubCommand(_0x3079d7){const _0x327700=a18_0x470f;if(_0x3079d7===_0x327700(0x1d2)){await autoSetupGitHub();return;}if(_0x3079d7==='manual'||_0x3079d7===_0x327700(0x1af)){await manualSetupGitHub();return;}if(_0x3079d7===_0x327700(0x1cf)){await loginGitHub();return;}if(_0x3079d7===_0x327700(0x1b6)){await logoutGitHub();return;}if(_0x3079d7===_0x327700(0x1ad)){const _0x4a62d4=await isGitHubAuthenticated();if(_0x4a62d4)try{const {getAppStatus:_0x368641}=await import('./api.js'),_0x59b9d2=await _0x368641();a18_0x346838['success'](_0x327700(0x1a4)),_0x59b9d2[_0x327700(0x1c8)]&&a18_0x346838[_0x327700(0x1d1)](_0x327700(0x1bb)+_0x59b9d2[_0x327700(0x1c8)]),a18_0x346838[_0x327700(0x1ab)](_0x327700(0x1bf)+_0x59b9d2[_0x327700(0x1b4)]+_0x327700(0x1c6));}catch(_0x45a649){a18_0x346838['warn'](_0x327700(0x1c1)+_0x45a649);}else a18_0x346838[_0x327700(0x1ab)]('Not\x20logged\x20in\x20to\x20GitHub\x20App');return;}if(_0x3079d7===_0x327700(0x1c4)){const _0x2adea3=await isGitHubAuthenticated();if(!_0x2adea3){a18_0x346838[_0x327700(0x1c5)](_0x327700(0x1c9));return;}a18_0x346838[_0x327700(0x1c7)](_0x327700(0x1ca));const _0x585464=a18_0x346838[_0x327700(0x1a6)](_0x327700(0x1a8));_0x585464[_0x327700(0x1d3)]();try{const _0x2503fe=await listRepos();_0x585464[_0x327700(0x1b2)](),_0x2503fe[_0x327700(0x1b0)](0x0,0xa)['forEach'](_0x485166=>{const _0x49bc1b=_0x327700,_0x2771ad=_0x485166[_0x49bc1b(0x1cc)]?_0x49bc1b(0x1bd):_0x49bc1b(0x1d4);a18_0x346838[_0x49bc1b(0x1ab)]('\x20\x20'+_0x485166[_0x49bc1b(0x1c0)]+'\x20'+_0x2771ad);}),_0x2503fe[_0x327700(0x1c2)]>0xa&&a18_0x346838[_0x327700(0x1ab)](_0x327700(0x1b1)+(_0x2503fe['length']-0xa)+_0x327700(0x1ac));}catch(_0x3edd81){_0x585464[_0x327700(0x1b2)](),a18_0x346838[_0x327700(0x1c5)](_0x327700(0x1d5)+_0x3edd81);}return;}a18_0x346838[_0x327700(0x1c7)](_0x327700(0x1a7)),a18_0x346838[_0x327700(0x1ab)](_0x327700(0x1a5)),a18_0x346838[_0x327700(0x1ab)](_0x327700(0x1cb)),a18_0x346838[_0x327700(0x1ab)](_0x327700(0x1cd)),a18_0x346838[_0x327700(0x1ab)](_0x327700(0x1aa)),a18_0x346838[_0x327700(0x1ab)]('\x20\x20/github\x20repos\x20\x20\x20-\x20List\x20your\x20repositories\x20(including\x20private)');}function a18_0x285e(){const _0x4f5dee=['(public)','Failed\x20to\x20fetch\x20repos:\x20','✓\x20Authenticated\x20as\x20GitHub\x20App','\x20\x20/github\x20setup\x20\x20\x20-\x20Auto-create\x20GitHub\x20App\x20(recommended)','createSpinner','GitHub\x20Commands','Fetching\x20repos...','4EGzGOZ','\x20\x20/github\x20status\x20\x20-\x20Check\x20authentication\x20status','dim','\x20more','status','1519870KDhEnw','config','slice','\x20\x20...\x20and\x20','stop','1918164AqMNdU','repoCount','755381wnpZOw','logout','689997bnmjhu','50AcGcgJ','65Roflgl','130HnbKsn','Installed\x20on\x20account:\x20','1206747ibiymO','(private)','1lgjXxP','Access\x20to\x20','full_name','Token\x20may\x20be\x20invalid\x20or\x20app\x20has\x20no\x20repo\x20access:\x20','length','378MAOKvg','repos','error','\x20repositories','header','accountName','Not\x20logged\x20in.\x20Run\x20\x27/github\x20setup\x27\x20first','Your\x20GitHub\x20Repositories','\x20\x20/github\x20login\x20\x20\x20-\x20Test\x20GitHub\x20App\x20authentication','private','\x20\x20/github\x20logout\x20\x20-\x20Clear\x20GitHub\x20App\x20credentials','5532147fjRQdH','login','24TUZjyi','info','setup','start'];a18_0x285e=function(){return _0x4f5dee;};return a18_0x285e();}
@@ -1 +1 @@
1
- (function(_0x5903b6,_0x467947){const _0xaf3a71=a19_0x3715,_0x1b6b8f=_0x5903b6();while(!![]){try{const _0x5bb0a3=parseInt(_0xaf3a71(0x169))/0x1*(parseInt(_0xaf3a71(0x163))/0x2)+parseInt(_0xaf3a71(0x17a))/0x3+-parseInt(_0xaf3a71(0x16b))/0x4+-parseInt(_0xaf3a71(0x15e))/0x5*(parseInt(_0xaf3a71(0x16e))/0x6)+parseInt(_0xaf3a71(0x15b))/0x7+-parseInt(_0xaf3a71(0x15d))/0x8*(parseInt(_0xaf3a71(0x173))/0x9)+parseInt(_0xaf3a71(0x16d))/0xa;if(_0x5bb0a3===_0x467947)break;else _0x1b6b8f['push'](_0x1b6b8f['shift']());}catch(_0x373fa9){_0x1b6b8f['push'](_0x1b6b8f['shift']());}}}(a19_0x5ab1,0xc8270));function a19_0x5ab1(){const _0x676a3b=['mkdir','github-app-config.json','github-app.pem','length','writeFile','Private\x20Key\x20(PEM\x20format):','2056167UWNeFt','info','dim','success','.woozlit','210266istWfK','error','28144NmSOJs','4998055VYaGUP','\x0aFor\x20the\x20Private\x20Key,\x20your\x20default\x20editor\x20will\x20open.','stringify','BEGIN\x20PRIVATE\x20KEY','\x0aSetup\x20cancelled.','88318eKJZRa','includes','App\x20ID:','warn','utf8','To\x20verify,\x20run:\x20/github\x20status','23lsaRSF','Enter\x20your\x20existing\x20GitHub\x20App\x20credentials\x20manually.\x0a','6032008vVwTLO','access','29754090XXRFFa','6VLnGDf','App\x20ID\x20is\x20required','\x0aSaving\x20configuration...','Paste\x20the\x20entire\x20content\x20of\x20your\x20.pem\x20file,\x20save,\x20and\x20close.','force\x20closed','3528oYQZWB'];a19_0x5ab1=function(){return _0x676a3b;};return a19_0x5ab1();}function a19_0x3715(_0xc89b90,_0x41ae5b){_0xc89b90=_0xc89b90-0x158;const _0x5ab122=a19_0x5ab1();let _0x371514=_0x5ab122[_0xc89b90];return _0x371514;}import{promises as a19_0x402b96}from'fs';import{join}from'path';import*as a19_0x2d1e75 from'../ui/output.js';import{homedir}from'os';import{input,editor}from'@inquirer/prompts';async function saveConfig(_0x5b3779,_0x3cf235,_0x3d09d2){const _0x38b82f=a19_0x3715,_0x3fddd8=join(homedir(),_0x38b82f(0x15a));try{await a19_0x402b96[_0x38b82f(0x16c)](_0x3fddd8);}catch{await a19_0x402b96[_0x38b82f(0x174)](_0x3fddd8,{'recursive':!![]});}const _0x31b9da=join(_0x3fddd8,_0x38b82f(0x175)),_0x27f44e=join(_0x3fddd8,_0x38b82f(0x176));await a19_0x402b96[_0x38b82f(0x178)](_0x27f44e,_0x3cf235,_0x38b82f(0x167)),await a19_0x402b96[_0x38b82f(0x178)](_0x31b9da,JSON[_0x38b82f(0x160)]({'appId':_0x5b3779,'installationId':_0x3d09d2},null,0x2),_0x38b82f(0x167));}export async function manualSetupGitHub(){const _0x283de7=a19_0x3715;a19_0x2d1e75['header']('GitHub\x20App\x20Manual\x20Configuration'),a19_0x2d1e75['dim'](_0x283de7(0x16a));try{const _0x466c45=await input({'message':_0x283de7(0x165),'validate':_0x4a7e1a=>_0x4a7e1a[_0x283de7(0x177)]>0x0?!![]:_0x283de7(0x16f)});a19_0x2d1e75['info'](_0x283de7(0x15f)),a19_0x2d1e75[_0x283de7(0x17b)](_0x283de7(0x171)),await new Promise(_0x1eba67=>setTimeout(_0x1eba67,0x7d0));const _0x1eaa97=await editor({'message':_0x283de7(0x179),'validate':_0x2b1560=>_0x2b1560[_0x283de7(0x164)]('BEGIN\x20RSA\x20PRIVATE\x20KEY')||_0x2b1560[_0x283de7(0x164)](_0x283de7(0x161))?!![]:'Invalid\x20PEM\x20format'}),_0x3aba15=await input({'message':'Installation\x20ID:','validate':_0x1d2e5e=>_0x1d2e5e[_0x283de7(0x177)]>0x0?!![]:'Installation\x20ID\x20is\x20required'});a19_0x2d1e75[_0x283de7(0x17b)](_0x283de7(0x170)),await saveConfig(_0x466c45,_0x1eaa97,_0x3aba15),a19_0x2d1e75[_0x283de7(0x159)]('\x0a✓\x20Configuration\x20saved!'),a19_0x2d1e75[_0x283de7(0x158)](_0x283de7(0x168));}catch(_0x31cde8){if(_0x31cde8 instanceof Error&&_0x31cde8['message']['includes'](_0x283de7(0x172))){a19_0x2d1e75[_0x283de7(0x166)](_0x283de7(0x162));return;}a19_0x2d1e75[_0x283de7(0x15c)]('\x0aSetup\x20failed:\x20'+_0x31cde8);}}
1
+ (function(_0x5bc20d,_0x5203ef){const _0x3597b1=a19_0x19ae,_0x9ff27a=_0x5bc20d();while(!![]){try{const _0x163aa7=-parseInt(_0x3597b1(0xb1))/0x1+-parseInt(_0x3597b1(0xb5))/0x2+-parseInt(_0x3597b1(0xa8))/0x3*(parseInt(_0x3597b1(0xb7))/0x4)+-parseInt(_0x3597b1(0xad))/0x5*(-parseInt(_0x3597b1(0xba))/0x6)+parseInt(_0x3597b1(0xa2))/0x7*(parseInt(_0x3597b1(0xa9))/0x8)+-parseInt(_0x3597b1(0x9f))/0x9+-parseInt(_0x3597b1(0xb2))/0xa*(-parseInt(_0x3597b1(0xab))/0xb);if(_0x163aa7===_0x5203ef)break;else _0x9ff27a['push'](_0x9ff27a['shift']());}catch(_0x433c3e){_0x9ff27a['push'](_0x9ff27a['shift']());}}}(a19_0x69b3,0xc3a83));import{promises as a19_0x196880}from'fs';import{join}from'path';import*as a19_0x2c603e from'../ui/output.js';import{homedir}from'os';function a19_0x19ae(_0x4aebd9,_0x1459b9){_0x4aebd9=_0x4aebd9-0x98;const _0x69b331=a19_0x69b3();let _0x19ae7e=_0x69b331[_0x4aebd9];return _0x19ae7e;}import{input,editor}from'@inquirer/prompts';async function saveConfig(_0x4b7e89,_0x52a57e,_0xc5cff8){const _0x11476e=a19_0x19ae,_0x2d4315=join(homedir(),'.woozlit');try{await a19_0x196880[_0x11476e(0xb9)](_0x2d4315);}catch{await a19_0x196880[_0x11476e(0x9a)](_0x2d4315,{'recursive':!![]});}const _0x4f76de=join(_0x2d4315,_0x11476e(0xa4)),_0xc851fc=join(_0x2d4315,_0x11476e(0x9c));await a19_0x196880['writeFile'](_0xc851fc,_0x52a57e,'utf8'),await a19_0x196880[_0x11476e(0xae)](_0x4f76de,JSON['stringify']({'appId':_0x4b7e89,'installationId':_0xc5cff8},null,0x2),_0x11476e(0xb8));}function a19_0x69b3(){const _0x1c2f0a=['Paste\x20the\x20entire\x20content\x20of\x20your\x20.pem\x20file,\x20save,\x20and\x20close.','404243uRJYAF','\x0aSetup\x20failed:\x20','github-app-config.json','success','\x0aSaving\x20configuration...','length','3IByXDO','136Skhuss','info','1219339mQkKaX','Invalid\x20PEM\x20format','56590QntekJ','writeFile','To\x20verify,\x20run:\x20/github\x20status','Enter\x20your\x20existing\x20GitHub\x20App\x20credentials\x20manually.\x0a','611016kqFWDK','110YTupRc','\x0a✓\x20Configuration\x20saved!','BEGIN\x20PRIVATE\x20KEY','410286SBchzA','\x0aSetup\x20cancelled.','2414092HdboIo','utf8','access','666ENOjYZ','App\x20ID\x20is\x20required','GitHub\x20App\x20Manual\x20Configuration','header','Installation\x20ID\x20is\x20required','mkdir','includes','github-app.pem','App\x20ID:','force\x20closed','11126493isGoRo','dim'];a19_0x69b3=function(){return _0x1c2f0a;};return a19_0x69b3();}export async function manualSetupGitHub(){const _0x75f8ac=a19_0x19ae;a19_0x2c603e[_0x75f8ac(0x98)](_0x75f8ac(0xbc)),a19_0x2c603e[_0x75f8ac(0xa0)](_0x75f8ac(0xb0));try{const _0xd0808=await input({'message':_0x75f8ac(0x9d),'validate':_0x509a36=>_0x509a36[_0x75f8ac(0xa7)]>0x0?!![]:_0x75f8ac(0xbb)});a19_0x2c603e[_0x75f8ac(0xaa)]('\x0aFor\x20the\x20Private\x20Key,\x20your\x20default\x20editor\x20will\x20open.'),a19_0x2c603e[_0x75f8ac(0xaa)](_0x75f8ac(0xa1)),await new Promise(_0x43222a=>setTimeout(_0x43222a,0x7d0));const _0x458e29=await editor({'message':'Private\x20Key\x20(PEM\x20format):','validate':_0x52f025=>_0x52f025[_0x75f8ac(0x9b)]('BEGIN\x20RSA\x20PRIVATE\x20KEY')||_0x52f025[_0x75f8ac(0x9b)](_0x75f8ac(0xb4))?!![]:_0x75f8ac(0xac)}),_0x2e24e3=await input({'message':'Installation\x20ID:','validate':_0x5c3151=>_0x5c3151[_0x75f8ac(0xa7)]>0x0?!![]:_0x75f8ac(0x99)});a19_0x2c603e[_0x75f8ac(0xaa)](_0x75f8ac(0xa6)),await saveConfig(_0xd0808,_0x458e29,_0x2e24e3),a19_0x2c603e[_0x75f8ac(0xa5)](_0x75f8ac(0xb3)),a19_0x2c603e[_0x75f8ac(0xa0)](_0x75f8ac(0xaf));}catch(_0x6524b1){if(_0x6524b1 instanceof Error&&_0x6524b1['message'][_0x75f8ac(0x9b)](_0x75f8ac(0x9e))){a19_0x2c603e['warn'](_0x75f8ac(0xb6));return;}a19_0x2c603e['error'](_0x75f8ac(0xa3)+_0x6524b1);}}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a20_0x206a81=a20_0x4654;(function(_0x712bb0,_0x455d56){const _0x3a15a2=a20_0x4654,_0x1c75a2=_0x712bb0();while(!![]){try{const _0x5ad497=parseInt(_0x3a15a2(0x95))/0x1+-parseInt(_0x3a15a2(0xc0))/0x2*(parseInt(_0x3a15a2(0xe9))/0x3)+parseInt(_0x3a15a2(0xae))/0x4+-parseInt(_0x3a15a2(0x8e))/0x5*(-parseInt(_0x3a15a2(0x9b))/0x6)+-parseInt(_0x3a15a2(0xf5))/0x7*(parseInt(_0x3a15a2(0xb2))/0x8)+parseInt(_0x3a15a2(0xfa))/0x9*(parseInt(_0x3a15a2(0x8a))/0xa)+parseInt(_0x3a15a2(0xc7))/0xb*(parseInt(_0x3a15a2(0x98))/0xc);if(_0x5ad497===_0x455d56)break;else _0x1c75a2['push'](_0x1c75a2['shift']());}catch(_0x270d7d){_0x1c75a2['push'](_0x1c75a2['shift']());}}}(a20_0x24a7,0xa4976));import{Command}from'commander';import a20_0x285d48 from'chalk';function a20_0x4654(_0x36c6a3,_0x59f890){_0x36c6a3=_0x36c6a3-0x7a;const _0x24a7a2=a20_0x24a7();let _0x465442=_0x24a7a2[_0x36c6a3];return _0x465442;}import{login,logout,isLoggedIn}from'./auth/login.js';import{startChat}from'./chat/agent.js';import{selectModel,getSelectedModel}from'./ui/select.js';import{listRules,addRule,clearRules}from'./tools/rules.js';import{listKnowledge,addKnowledge,clearKnowledge}from'./tools/knowledge.js';import{getUser}from'./utils/storage.js';function a20_0x24a7(){const _0x42f516=['\x27\x20not\x20found','running','remove\x20<name>','Current\x20User','delete-all','aliases','Added\x20stdio\x20MCP\x20server:\x20','Woozlit\x20already\x20initialized\x20in\x20this\x20directory','startAllConfigured','Show\x20current\x20user\x20info','createSpinner','bold','Are\x20you\x20sure\x20you\x20want\x20to\x20completely\x20WIPE\x20all\x20CLI\x20data,\x20rules,\x20and\x20configs?','stdout','version','action','discord','Model:\x20','Select\x20UI\x20theme\x20(alias\x20for\x20config\x20theme)','Show\x20status\x20of\x20background\x20services/bots','No\x20services\x20registered.','refresh','All\x20MCP\x20servers\x20removed','theme','name','Login\x20with\x20your\x20Woozlit\x20account','./utils/updater.js','Added\x20HTTP\x20MCP\x20server:\x20','email','22330OxeiFp','command','List\x20all\x20rules','info','75fjfjXw','description','Initialize\x20Woozlit\x20in\x20current\x20directory','Login\x20failed\x20or\x20timed\x20out','Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.','logout','N/A','224191lRaSBE','All\x20data,\x20configs,\x20and\x20MCP\x20servers\x20have\x20been\x20wiped.','join','12qjMoba','Manage\x20Telegram\x20integration','type','171438dzcjBG','keys','./services/bot-manager.js','./discord/index.js','forEach','Running','Manage\x20MCP\x20servers','Manage\x20AI\x20knowledge\x20presets','Already\x20logged\x20in\x20as\x20','List\x20all\x20MCP\x20servers','update','Remove\x20an\x20MCP\x20server','remove-all','length',':\x20[stdio]\x20','green','clean','configured','You\x20can\x20also\x20add\x20servers\x20via\x20mcp.json\x20in\x20your\x20project\x20directory','2831916xXXdvF','./github/index.js','All\x20rules\x20cleared','Rules','8jiLwRl','init','\x0aConfig\x20file:\x20','Knowledge\x20Presets','env','.woozlit/rules.md','Select\x20AI\x20model','showLogo','wipe','URL:\x20','list','some','displayName','Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md','2bVWPkr','Default\x20servers\x20will\x20be\x20restored\x20on\x20next\x20restart\x20unless\x20you\x20remove\x20them\x20again.','Initialized\x20Woozlit\x20in\x20current\x20directory','header','Update\x20Woozlit\x20CLI\x20to\x20the\x20latest\x20version','dim','Stopped','132121VvAzKZ','getStatus','No\x20knowledge\x20presets\x20defined','Please\x20restart\x20the\x20CLI.','parse','Add\x20a\x20stdio\x20MCP\x20server','Added\x20knowledge\x20preset:\x20','Name:\x20','Waiting\x20for\x20authentication...','knowledge','Add\x20a\x20new\x20knowledge\x20preset','Opening\x20browser\x20for\x20login...','Add\x20a\x20new\x20rule','Logout\x20from\x20your\x20Woozlit\x20account','clear','You\x20can\x20also\x20update\x20manually\x20from\x20https://cli.woozlit.com','List\x20all\x20knowledge\x20presets','catch','No\x20MCP\x20servers\x20configured','Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant','MCP\x20server\x20\x27','Configure\x20email\x20credentials','./utils/storage.js','start','telegram','delete','stop','args','write','chat\x20[message]','Not\x20Configured','Remove\x20all\x20MCP\x20servers','services','ask\x20<message>','2225766RJaJfS','add\x20<rule>','.woozlit','Added\x20rule:\x20','success','github\x20[subcmd]','No\x20rules\x20defined','add\x20<name>\x20<command>\x20[args...]','Theme\x20set\x20to:\x20','rules','error','Email:\x20','8965999oasNag','./ui/themes.js','woozlit','Refresh\x20cancelled.','Manage\x20Email\x20integration','5337hNNlUM','Manage\x20AI\x20behavior\x20rules','Operation\x20cancelled','Config\x20file:\x20','setup','./email/index.js','add-http\x20<name>\x20<url>','Logged\x20in\x20as\x20','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','Logged\x20out\x20successfully','warn'];a20_0x24a7=function(){return _0x42f516;};return a20_0x24a7();}import{addMcpServer,addMcpHttpServer,removeMcpServer,clearMcpServers,getMcpServers,ensureDefaultServers,getConfigFilePath}from'./config/mcp.js';import{createFile,listDirectory}from'./tools/file.js';import*as a20_0x5e5bb0 from'./ui/output.js';const VERSION='2.2.0',program=new Command();process[a20_0x206a81(0xb6)]['NODE_TLS_REJECT_UNAUTHORIZED']='0',program[a20_0x206a81(0x85)](a20_0x206a81(0xf7))[a20_0x206a81(0x8f)](a20_0x206a81(0xda))[a20_0x206a81(0x7b)](VERSION)[a20_0x206a81(0x7c)](async()=>{const _0x37176e=a20_0x206a81;ensureDefaultServers();const {botManager:_0x3c84a7}=await import('./services/bot-manager.js');await _0x3c84a7[_0x37176e(0x10d)]();const {checkForUpdates:_0xedebd5}=await import(_0x37176e(0x87));_0xedebd5(VERSION)[_0x37176e(0xd8)](()=>{}),a20_0x5e5bb0[_0x37176e(0xb9)](VERSION);if(!isLoggedIn()){a20_0x5e5bb0[_0x37176e(0x104)](_0x37176e(0x102)),a20_0x5e5bb0[_0x37176e(0xc5)](''),a20_0x5e5bb0['info'](_0x37176e(0xd2));const _0x5d6564=a20_0x5e5bb0[_0x37176e(0x10f)](_0x37176e(0xcf));_0x5d6564['start']();const _0x5609d3=await login();_0x5d6564[_0x37176e(0xe1)]();if(!_0x5609d3){a20_0x5e5bb0['error'](_0x37176e(0x91));return;}const _0x5f5db4=getUser();a20_0x5e5bb0[_0x37176e(0xed)]('Logged\x20in\x20as\x20'+(_0x5f5db4[_0x37176e(0xbe)]||_0x5f5db4[_0x37176e(0x89)]));}await startChat();}),program[a20_0x206a81(0x8b)]('login')[a20_0x206a81(0x8f)](a20_0x206a81(0x86))[a20_0x206a81(0x7c)](async()=>{const _0x1aff73=a20_0x206a81;if(isLoggedIn()){const _0xd2902c=getUser();a20_0x5e5bb0[_0x1aff73(0x8d)](_0x1aff73(0xa3)+_0xd2902c[_0x1aff73(0x89)]);return;}a20_0x5e5bb0[_0x1aff73(0x8d)](_0x1aff73(0xd2));const _0x1e75e5=a20_0x5e5bb0[_0x1aff73(0x10f)](_0x1aff73(0xcf));_0x1e75e5[_0x1aff73(0xde)]();const _0x131202=await login();_0x1e75e5[_0x1aff73(0xe1)]();if(_0x131202){const _0x12042e=getUser();a20_0x5e5bb0['success']('Logged\x20in\x20as\x20'+(_0x12042e[_0x1aff73(0xbe)]||_0x12042e[_0x1aff73(0x89)]));}else a20_0x5e5bb0['error'](_0x1aff73(0x91));}),program[a20_0x206a81(0x8b)](a20_0x206a81(0x93))[a20_0x206a81(0x8f)](a20_0x206a81(0xd4))['action'](()=>{const _0x25570c=a20_0x206a81;logout(),a20_0x5e5bb0[_0x25570c(0xed)](_0x25570c(0x103));}),program[a20_0x206a81(0x8b)]('whoami')['description'](a20_0x206a81(0x10e))['action'](()=>{const _0x1997b2=a20_0x206a81;if(!isLoggedIn()){a20_0x5e5bb0[_0x1997b2(0x104)](_0x1997b2(0x92));return;}const _0x42d635=getUser();a20_0x5e5bb0[_0x1997b2(0xc3)](_0x1997b2(0x108)),a20_0x5e5bb0[_0x1997b2(0x8d)](_0x1997b2(0xce)+(_0x42d635[_0x1997b2(0xbe)]||'N/A')),a20_0x5e5bb0[_0x1997b2(0x8d)](_0x1997b2(0xf4)+(_0x42d635[_0x1997b2(0x89)]||_0x1997b2(0x94))),a20_0x5e5bb0[_0x1997b2(0x8d)](_0x1997b2(0x7e)+getSelectedModel());}),program[a20_0x206a81(0x8b)](a20_0x206a81(0xe4))[a20_0x206a81(0x8f)]('Start\x20an\x20AI\x20chat\x20session')[a20_0x206a81(0x7c)](async _0x55bdcc=>{const _0x401ee4=a20_0x206a81;a20_0x5e5bb0[_0x401ee4(0xb9)](VERSION);if(!isLoggedIn()){a20_0x5e5bb0[_0x401ee4(0x104)](_0x401ee4(0x102)),a20_0x5e5bb0[_0x401ee4(0xc5)](''),a20_0x5e5bb0[_0x401ee4(0x8d)](_0x401ee4(0xd2));const _0x282f96=a20_0x5e5bb0[_0x401ee4(0x10f)]('Waiting\x20for\x20authentication...');_0x282f96[_0x401ee4(0xde)]();const _0x4f0eed=await login();_0x282f96[_0x401ee4(0xe1)]();if(!_0x4f0eed){a20_0x5e5bb0[_0x401ee4(0xf3)](_0x401ee4(0x91));return;}const _0x5d90dc=getUser();a20_0x5e5bb0[_0x401ee4(0xed)]('Logged\x20in\x20as\x20'+(_0x5d90dc[_0x401ee4(0xbe)]||_0x5d90dc[_0x401ee4(0x89)]));}await startChat(_0x55bdcc);}),program[a20_0x206a81(0x8b)](a20_0x206a81(0xe8))[a20_0x206a81(0x8f)]('Ask\x20a\x20single\x20question')[a20_0x206a81(0x7c)](async _0x2a3496=>{const _0x5204ee=a20_0x206a81;a20_0x5e5bb0['showLogo'](VERSION);if(!isLoggedIn()){a20_0x5e5bb0['warn'](_0x5204ee(0x102)),a20_0x5e5bb0[_0x5204ee(0xc5)](''),a20_0x5e5bb0['info'](_0x5204ee(0xd2));const _0x33abf7=a20_0x5e5bb0[_0x5204ee(0x10f)](_0x5204ee(0xcf));_0x33abf7[_0x5204ee(0xde)]();const _0xb0b640=await login();_0x33abf7[_0x5204ee(0xe1)]();if(!_0xb0b640){a20_0x5e5bb0['error'](_0x5204ee(0x91));return;}const _0x30ebe4=getUser();a20_0x5e5bb0[_0x5204ee(0xed)](_0x5204ee(0x101)+(_0x30ebe4[_0x5204ee(0xbe)]||_0x30ebe4[_0x5204ee(0x89)]));}await startChat(_0x2a3496);});const configCmd=program[a20_0x206a81(0x8b)]('config')[a20_0x206a81(0x8f)]('Configure\x20CLI\x20settings');configCmd[a20_0x206a81(0x8b)]('model')[a20_0x206a81(0x8f)](a20_0x206a81(0xb8))['action'](async()=>{const _0x32eaab=a20_0x206a81,_0x2559d0=await selectModel();a20_0x5e5bb0[_0x32eaab(0xed)]('Model\x20set\x20to:\x20'+_0x2559d0);}),configCmd['command'](a20_0x206a81(0x84))[a20_0x206a81(0x8f)]('Select\x20UI\x20theme')[a20_0x206a81(0x7c)](async()=>{const _0x5cb413=a20_0x206a81,{selectTheme:_0x3c85fe}=await import(_0x5cb413(0xf6)),_0x539d28=await _0x3c85fe();a20_0x5e5bb0['success'](_0x5cb413(0xf1)+_0x539d28);}),program[a20_0x206a81(0x8b)](a20_0x206a81(0x84))[a20_0x206a81(0x8f)](a20_0x206a81(0x7f))[a20_0x206a81(0x7c)](async()=>{const _0x56ab68=a20_0x206a81,{selectTheme:_0x5ea87e}=await import(_0x56ab68(0xf6)),_0x553596=await _0x5ea87e();a20_0x5e5bb0[_0x56ab68(0xed)](_0x56ab68(0xf1)+_0x553596);});const rulesCmd=program[a20_0x206a81(0x8b)](a20_0x206a81(0xf2))['description'](a20_0x206a81(0xfb));rulesCmd['command'](a20_0x206a81(0xbc))['description'](a20_0x206a81(0x8c))[a20_0x206a81(0x7c)](()=>{const _0x2b9049=a20_0x206a81,_0x324a3e=listRules();if(_0x324a3e[_0x2b9049(0xa8)]===0x0){a20_0x5e5bb0['info'](_0x2b9049(0xef));return;}a20_0x5e5bb0[_0x2b9049(0xc3)](_0x2b9049(0xb1)),_0x324a3e[_0x2b9049(0x9f)]((_0x3eb18c,_0x5900dd)=>{const _0x1257cf=_0x2b9049;process[_0x1257cf(0x7a)][_0x1257cf(0xe3)](_0x5900dd+0x1+'.\x20'+_0x3eb18c+'\x0a');});}),rulesCmd[a20_0x206a81(0x8b)](a20_0x206a81(0xea))[a20_0x206a81(0x8f)](a20_0x206a81(0xd3))['action'](_0x29a159=>{const _0x3cfea0=a20_0x206a81;addRule(_0x29a159),a20_0x5e5bb0[_0x3cfea0(0xed)](_0x3cfea0(0xec)+_0x29a159);})[a20_0x206a81(0x7c)](()=>{const _0x25a880=a20_0x206a81;clearRules(),a20_0x5e5bb0[_0x25a880(0xed)](_0x25a880(0xb0));});const knowledgeCmd=program[a20_0x206a81(0x8b)](a20_0x206a81(0xd0))[a20_0x206a81(0x8f)](a20_0x206a81(0xa2));knowledgeCmd['command'](a20_0x206a81(0xbc))['description'](a20_0x206a81(0xd7))[a20_0x206a81(0x7c)](()=>{const _0xe8b8f=a20_0x206a81,_0xebf3fd=listKnowledge();if(_0xebf3fd[_0xe8b8f(0xa8)]===0x0){a20_0x5e5bb0[_0xe8b8f(0x8d)](_0xe8b8f(0xc9));return;}a20_0x5e5bb0[_0xe8b8f(0xc3)](_0xe8b8f(0xb5)),_0xebf3fd['forEach']((_0x3377ae,_0x5069b7)=>{const _0x967e5e=_0xe8b8f;process[_0x967e5e(0x7a)]['write'](_0x5069b7+0x1+'.\x20'+_0x3377ae+'\x0a');});}),knowledgeCmd[a20_0x206a81(0x8b)]('add\x20<preset>')[a20_0x206a81(0x8f)](a20_0x206a81(0xd1))[a20_0x206a81(0x7c)](_0x1a91e4=>{const _0x2baf81=a20_0x206a81;addKnowledge(_0x1a91e4),a20_0x5e5bb0[_0x2baf81(0xed)](_0x2baf81(0xcd)+_0x1a91e4);}),knowledgeCmd['command'](a20_0x206a81(0xd5))[a20_0x206a81(0x8f)]('Clear\x20all\x20knowledge\x20presets')['action'](()=>{const _0x5e7d89=a20_0x206a81;clearKnowledge(),a20_0x5e5bb0[_0x5e7d89(0xed)]('All\x20knowledge\x20presets\x20cleared');});const mcpCmd=program['command']('mcp')[a20_0x206a81(0x8f)](a20_0x206a81(0xa1));mcpCmd[a20_0x206a81(0x8b)](a20_0x206a81(0xbc))[a20_0x206a81(0x8f)](a20_0x206a81(0xa4))[a20_0x206a81(0x7c)](()=>{const _0x48d45b=a20_0x206a81,_0x22abcf=getMcpServers(),_0x26a3ba=Object[_0x48d45b(0x9c)](_0x22abcf);if(_0x26a3ba['length']===0x0){a20_0x5e5bb0['info'](_0x48d45b(0xd9)),a20_0x5e5bb0[_0x48d45b(0xc5)](_0x48d45b(0xfd)+getConfigFilePath());return;}a20_0x5e5bb0[_0x48d45b(0xc3)]('MCP\x20Servers'),_0x26a3ba[_0x48d45b(0x9f)](_0x3592b3=>{const _0x224087=_0x48d45b,_0x36bd8a=_0x22abcf[_0x3592b3];_0x36bd8a[_0x224087(0x9a)]==='streamable-http'?a20_0x5e5bb0[_0x224087(0x8d)]('-\x20'+_0x3592b3+':\x20[HTTP]\x20'+_0x36bd8a['url']):a20_0x5e5bb0[_0x224087(0x8d)]('-\x20'+_0x3592b3+_0x224087(0xa9)+_0x36bd8a[_0x224087(0x8b)]+'\x20'+(_0x36bd8a[_0x224087(0xe2)]?.[_0x224087(0x97)]('\x20')||''));}),a20_0x5e5bb0[_0x48d45b(0xc5)](_0x48d45b(0xb4)+getConfigFilePath()),a20_0x5e5bb0[_0x48d45b(0xc5)](_0x48d45b(0xad));}),mcpCmd[a20_0x206a81(0x8b)](a20_0x206a81(0xf0))['description'](a20_0x206a81(0xcc))[a20_0x206a81(0x7c)]((_0x3e9ba7,_0x44cd0f,_0x7ae946)=>{const _0x5202ad=a20_0x206a81;addMcpServer(_0x3e9ba7,_0x44cd0f,_0x7ae946),a20_0x5e5bb0[_0x5202ad(0xed)](_0x5202ad(0x10b)+_0x3e9ba7);}),mcpCmd[a20_0x206a81(0x8b)](a20_0x206a81(0x100))[a20_0x206a81(0x8f)]('Add\x20an\x20HTTP\x20MCP\x20server\x20(streamable-http)')[a20_0x206a81(0x7c)]((_0x10739f,_0x42bb68)=>{const _0x58abd0=a20_0x206a81;addMcpHttpServer(_0x10739f,_0x42bb68),a20_0x5e5bb0['success'](_0x58abd0(0x88)+_0x10739f),a20_0x5e5bb0[_0x58abd0(0xc5)](_0x58abd0(0xbb)+_0x42bb68);}),mcpCmd['command'](a20_0x206a81(0x107))[a20_0x206a81(0x10a)]([a20_0x206a81(0xe0),'rm'])['description'](a20_0x206a81(0xa6))[a20_0x206a81(0x7c)](_0x28a142=>{const _0x50e41c=a20_0x206a81;removeMcpServer(_0x28a142)?a20_0x5e5bb0[_0x50e41c(0xed)]('Removed\x20MCP\x20server:\x20'+_0x28a142):a20_0x5e5bb0['error'](_0x50e41c(0xdb)+_0x28a142+_0x50e41c(0x105));}),mcpCmd['command'](a20_0x206a81(0xa7))['aliases']([a20_0x206a81(0x109),a20_0x206a81(0xd5)])[a20_0x206a81(0x8f)](a20_0x206a81(0xe6))['action'](async()=>{const _0x3be57d=a20_0x206a81,{confirm:_0x5e3829}=await import('@inquirer/prompts'),{getTheme:_0x1ceee3}=await import(_0x3be57d(0xdd)),{getInquirerTheme:_0x410b6a}=await import(_0x3be57d(0xf6)),_0x240a8d=await _0x5e3829({'message':'Are\x20you\x20sure\x20you\x20want\x20to\x20remove\x20ALL\x20MCP\x20servers?','default':![],'theme':_0x410b6a(_0x1ceee3())});_0x240a8d?(clearMcpServers(),a20_0x5e5bb0[_0x3be57d(0xed)](_0x3be57d(0x83)),a20_0x5e5bb0[_0x3be57d(0xc5)](_0x3be57d(0xc1))):a20_0x5e5bb0[_0x3be57d(0x8d)](_0x3be57d(0xfc));}),program[a20_0x206a81(0x8b)](a20_0x206a81(0x82))[a20_0x206a81(0x10a)](['reset',a20_0x206a81(0xba),a20_0x206a81(0xab)])[a20_0x206a81(0x8f)]('Wipe\x20all\x20data,\x20rules,\x20settings,\x20and\x20MCP\x20configs')[a20_0x206a81(0x7c)](async()=>{const _0x1c7766=a20_0x206a81,{confirm:_0x2fa8fb}=await import('@inquirer/prompts'),{getTheme:_0x53e42b}=await import('./utils/storage.js'),{getInquirerTheme:_0x47355c}=await import(_0x1c7766(0xf6)),_0x82ef4a=_0x53e42b(),_0x173765=_0x47355c(_0x82ef4a),_0x1d1906=await _0x2fa8fb({'message':a20_0x285d48[_0x1c7766(0x110)](_0x1c7766(0x111)),'default':![],'theme':_0x173765});if(_0x1d1906){const {wipeAll:_0x52de7e}=await import(_0x1c7766(0xdd));_0x52de7e();try{const {clearMcpServers:_0x312422}=await import('./config/mcp.js');_0x312422();}catch(_0x19a618){}a20_0x5e5bb0[_0x1c7766(0xed)](_0x1c7766(0x96)),a20_0x5e5bb0[_0x1c7766(0xc5)](_0x1c7766(0xca));}else a20_0x5e5bb0[_0x1c7766(0x8d)](_0x1c7766(0xf8));}),program[a20_0x206a81(0x8b)](a20_0x206a81(0xb3))['description'](a20_0x206a81(0x90))['action'](()=>{const _0x2a9de8=a20_0x206a81,_0x394fd5=listDirectory('.'),_0x2d4880=_0x394fd5['entries']?.[_0x2a9de8(0xbd)](_0xe9194e=>_0xe9194e[_0x2a9de8(0x85)]===_0x2a9de8(0xeb));if(_0x2d4880){a20_0x5e5bb0[_0x2a9de8(0x104)](_0x2a9de8(0x10c));return;}createFile(_0x2a9de8(0xb7),'#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a'),createFile('.woozlit/context.md','#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a'),a20_0x5e5bb0[_0x2a9de8(0xed)](_0x2a9de8(0xc2)),a20_0x5e5bb0[_0x2a9de8(0xc5)](_0x2a9de8(0xbf));}),program[a20_0x206a81(0x8b)](a20_0x206a81(0xe7))['description'](a20_0x206a81(0x80))[a20_0x206a81(0x7c)](async()=>{const _0x4df6f6=a20_0x206a81,{botManager:_0x482654}=await import(_0x4df6f6(0x9d)),_0x313493=_0x482654[_0x4df6f6(0xc8)]();a20_0x5e5bb0[_0x4df6f6(0xc3)]('Background\x20Services');if(_0x313493[_0x4df6f6(0xa8)]===0x0){a20_0x5e5bb0[_0x4df6f6(0x8d)](_0x4df6f6(0x81));return;}_0x313493[_0x4df6f6(0x9f)](_0x2985e5=>{const _0x440ea1=_0x4df6f6,_0x10b7a5=_0x2985e5[_0x440ea1(0x106)]?a20_0x285d48[_0x440ea1(0xaa)](_0x440ea1(0xa0)):_0x2985e5[_0x440ea1(0xac)]?a20_0x285d48['yellow'](_0x440ea1(0xc6)):a20_0x285d48['gray'](_0x440ea1(0xe5));a20_0x5e5bb0['info']('-\x20'+_0x2985e5[_0x440ea1(0x85)]+':\x20'+_0x10b7a5);}),a20_0x5e5bb0['dim']('\x0aUse\x20\x27woozlit\x20<service>\x20setup\x27\x20to\x20configure\x20services.');});const discordCmd=program['command'](a20_0x206a81(0x7d))['description']('Manage\x20Discord\x20integration');discordCmd[a20_0x206a81(0x8b)](a20_0x206a81(0xfe))[a20_0x206a81(0x8f)]('Configure\x20Discord\x20Bot\x20Token')[a20_0x206a81(0x7c)](async()=>{const _0x1f87e7=a20_0x206a81,{setupDiscord:_0x23cdd7}=await import(_0x1f87e7(0x9e));await _0x23cdd7();});const githubCmd=program[a20_0x206a81(0x8b)](a20_0x206a81(0xee))['description']('Manage\x20GitHub\x20tool\x20integration')[a20_0x206a81(0x7c)](async _0x24f187=>{const _0x2d3e38=a20_0x206a81,{handleGitHubCommand:_0x657ff9}=await import(_0x2d3e38(0xaf));await _0x657ff9(_0x24f187||'');}),telegramCmd=program['command'](a20_0x206a81(0xdf))['description'](a20_0x206a81(0x99));telegramCmd['command'](a20_0x206a81(0xfe))['description']('Configure\x20Telegram\x20Bot\x20Token')[a20_0x206a81(0x7c)](async()=>{const {setupTelegram:_0x243352}=await import('./telegram/index.js');await _0x243352();});const emailCmd=program['command'](a20_0x206a81(0x89))[a20_0x206a81(0x8f)](a20_0x206a81(0xf9));emailCmd[a20_0x206a81(0x8b)](a20_0x206a81(0xfe))[a20_0x206a81(0x8f)](a20_0x206a81(0xdc))[a20_0x206a81(0x7c)](async()=>{const _0x320500=a20_0x206a81,{setupEmail:_0x4093c8}=await import(_0x320500(0xff));await _0x4093c8();}),program[a20_0x206a81(0x8b)](a20_0x206a81(0xa5))['description'](a20_0x206a81(0xc4))[a20_0x206a81(0x7c)](async()=>{const _0x43b333=a20_0x206a81,{performUpdate:_0x4eb21d}=await import(_0x43b333(0x87)),_0xa8e51e=await _0x4eb21d();!_0xa8e51e&&a20_0x5e5bb0[_0x43b333(0xc5)](_0x43b333(0xd6));}),program[a20_0x206a81(0xcb)]();
2
+ const a20_0x220fd2=a20_0x432c;(function(_0x3bfa64,_0x5ba147){const _0x1441f4=a20_0x432c,_0xc7d27d=_0x3bfa64();while(!![]){try{const _0x320daa=parseInt(_0x1441f4(0x1e0))/0x1*(-parseInt(_0x1441f4(0x180))/0x2)+-parseInt(_0x1441f4(0x1e5))/0x3*(-parseInt(_0x1441f4(0x1e7))/0x4)+-parseInt(_0x1441f4(0x187))/0x5*(parseInt(_0x1441f4(0x1a7))/0x6)+parseInt(_0x1441f4(0x198))/0x7+-parseInt(_0x1441f4(0x18d))/0x8+-parseInt(_0x1441f4(0x1d2))/0x9*(parseInt(_0x1441f4(0x1cf))/0xa)+parseInt(_0x1441f4(0x1fb))/0xb;if(_0x320daa===_0x5ba147)break;else _0xc7d27d['push'](_0xc7d27d['shift']());}catch(_0x55565b){_0xc7d27d['push'](_0xc7d27d['shift']());}}}(a20_0x3ca0,0x43659));import{Command}from'commander';import a20_0x2c18e1 from'chalk';import{login,logout,isLoggedIn}from'./auth/login.js';import{startChat}from'./chat/agent.js';import{selectModel,getSelectedModel}from'./ui/select.js';import{listRules,addRule,clearRules}from'./tools/rules.js';import{listKnowledge,addKnowledge,clearKnowledge}from'./tools/knowledge.js';import{getUser}from'./utils/storage.js';import{addMcpServer,addMcpHttpServer,removeMcpServer,clearMcpServers,getMcpServers,ensureDefaultServers,getConfigFilePath}from'./config/mcp.js';import{createFile,listDirectory}from'./tools/file.js';import*as a20_0x28bdd6 from'./ui/output.js';const VERSION=a20_0x220fd2(0x1a2),program=new Command();process[a20_0x220fd2(0x16f)][a20_0x220fd2(0x19c)]='0',program['name'](a20_0x220fd2(0x1c0))[a20_0x220fd2(0x1db)]('Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant')[a20_0x220fd2(0x1ef)](VERSION)[a20_0x220fd2(0x1b7)](async()=>{const _0x23563e=a20_0x220fd2;ensureDefaultServers();const {botManager:_0x4c0d77}=await import(_0x23563e(0x16e));await _0x4c0d77[_0x23563e(0x1a8)]();const {checkForUpdates:_0x51d08e}=await import(_0x23563e(0x175));_0x51d08e(VERSION)[_0x23563e(0x17b)](()=>{}),a20_0x28bdd6['showLogo'](VERSION);if(!isLoggedIn()){a20_0x28bdd6['warn'](_0x23563e(0x1c3)),a20_0x28bdd6[_0x23563e(0x16d)](''),a20_0x28bdd6['info'](_0x23563e(0x1a0));const _0x3938c0=a20_0x28bdd6[_0x23563e(0x1d5)]('Waiting\x20for\x20authentication...');_0x3938c0[_0x23563e(0x1c7)]();const _0x1f479e=await login();_0x3938c0[_0x23563e(0x1e9)]();if(!_0x1f479e){a20_0x28bdd6[_0x23563e(0x1ba)](_0x23563e(0x1d4));return;}const _0x5a0e6c=getUser();a20_0x28bdd6['success'](_0x23563e(0x1bb)+(_0x5a0e6c[_0x23563e(0x1bd)]||_0x5a0e6c[_0x23563e(0x1f2)]));}await startChat();}),program[a20_0x220fd2(0x196)](a20_0x220fd2(0x18e))['description'](a20_0x220fd2(0x1d3))[a20_0x220fd2(0x1b7)](async()=>{const _0x4d7b6c=a20_0x220fd2;if(isLoggedIn()){const _0x9c3180=getUser();a20_0x28bdd6[_0x4d7b6c(0x177)](_0x4d7b6c(0x1a1)+_0x9c3180[_0x4d7b6c(0x1f2)]);return;}a20_0x28bdd6[_0x4d7b6c(0x177)]('Opening\x20browser\x20for\x20login...');const _0xbd803b=a20_0x28bdd6['createSpinner'](_0x4d7b6c(0x1a9));_0xbd803b[_0x4d7b6c(0x1c7)]();const _0xebfa8c=await login();_0xbd803b[_0x4d7b6c(0x1e9)]();if(_0xebfa8c){const _0x2ebe82=getUser();a20_0x28bdd6[_0x4d7b6c(0x173)](_0x4d7b6c(0x1bb)+(_0x2ebe82[_0x4d7b6c(0x1bd)]||_0x2ebe82[_0x4d7b6c(0x1f2)]));}else a20_0x28bdd6['error']('Login\x20failed\x20or\x20timed\x20out');}),program[a20_0x220fd2(0x196)](a20_0x220fd2(0x1c4))['description']('Logout\x20from\x20your\x20Woozlit\x20account')['action'](()=>{const _0x3d32c0=a20_0x220fd2;logout(),a20_0x28bdd6[_0x3d32c0(0x173)]('Logged\x20out\x20successfully');}),program[a20_0x220fd2(0x196)]('whoami')[a20_0x220fd2(0x1db)](a20_0x220fd2(0x192))['action'](()=>{const _0x2a6988=a20_0x220fd2;if(!isLoggedIn()){a20_0x28bdd6['warn'](_0x2a6988(0x1c2));return;}const _0x2e1a4a=getUser();a20_0x28bdd6[_0x2a6988(0x199)](_0x2a6988(0x1cb)),a20_0x28bdd6[_0x2a6988(0x177)](_0x2a6988(0x170)+(_0x2e1a4a['displayName']||_0x2a6988(0x194))),a20_0x28bdd6['info'](_0x2a6988(0x1d9)+(_0x2e1a4a[_0x2a6988(0x1f2)]||_0x2a6988(0x194))),a20_0x28bdd6[_0x2a6988(0x177)](_0x2a6988(0x1ca)+getSelectedModel());}),program['command']('chat\x20[message]')[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1c5))['action'](async _0x2ade88=>{const _0x36e2e1=a20_0x220fd2;a20_0x28bdd6[_0x36e2e1(0x19e)](VERSION);if(!isLoggedIn()){a20_0x28bdd6[_0x36e2e1(0x17e)](_0x36e2e1(0x1c3)),a20_0x28bdd6[_0x36e2e1(0x16d)](''),a20_0x28bdd6[_0x36e2e1(0x177)](_0x36e2e1(0x1a0));const _0x462a8f=a20_0x28bdd6[_0x36e2e1(0x1d5)]('Waiting\x20for\x20authentication...');_0x462a8f[_0x36e2e1(0x1c7)]();const _0x4e05fc=await login();_0x462a8f['stop']();if(!_0x4e05fc){a20_0x28bdd6['error'](_0x36e2e1(0x1d4));return;}const _0x1f1285=getUser();a20_0x28bdd6[_0x36e2e1(0x173)](_0x36e2e1(0x1bb)+(_0x1f1285['displayName']||_0x1f1285[_0x36e2e1(0x1f2)]));}await startChat(_0x2ade88);}),program[a20_0x220fd2(0x196)](a20_0x220fd2(0x1e3))['description'](a20_0x220fd2(0x182))['action'](async _0x306635=>{const _0x54e804=a20_0x220fd2;a20_0x28bdd6['showLogo'](VERSION);if(!isLoggedIn()){a20_0x28bdd6[_0x54e804(0x17e)](_0x54e804(0x1c3)),a20_0x28bdd6[_0x54e804(0x16d)](''),a20_0x28bdd6[_0x54e804(0x177)]('Opening\x20browser\x20for\x20login...');const _0x2b095f=a20_0x28bdd6['createSpinner'](_0x54e804(0x1a9));_0x2b095f['start']();const _0x11214a=await login();_0x2b095f[_0x54e804(0x1e9)]();if(!_0x11214a){a20_0x28bdd6[_0x54e804(0x1ba)](_0x54e804(0x1d4));return;}const _0x3c82f5=getUser();a20_0x28bdd6[_0x54e804(0x173)](_0x54e804(0x1bb)+(_0x3c82f5[_0x54e804(0x1bd)]||_0x3c82f5['email']));}await startChat(_0x306635);});function a20_0x3ca0(){const _0x267196=['./services/bot-manager.js','env','Name:\x20','streamable-http','getStatus','success','No\x20services\x20registered.','./utils/updater.js','\x0aUse\x20\x27woozlit\x20<service>\x20setup\x27\x20to\x20configure\x20services.','info','Added\x20knowledge\x20preset:\x20','theme',':\x20[HTTP]\x20','catch','./config/mcp.js','setup','warn','discord','943198uoKgth','services','Ask\x20a\x20single\x20question','reset','Operation\x20cancelled','Remove\x20all\x20MCP\x20servers','Manage\x20Email\x20integration','3135IUvPzg','configured','List\x20all\x20MCP\x20servers','stdout','Woozlit\x20already\x20initialized\x20in\x20this\x20directory','./email/index.js','4217568JJijJH','login','Background\x20Services','Manage\x20MCP\x20servers','write','Show\x20current\x20user\x20info','Select\x20UI\x20theme','N/A','update','command','MCP\x20server\x20\x27','1204280UGfqBH','header','./telegram/index.js','.woozlit/context.md','NODE_TLS_REJECT_UNAUTHORIZED','Added\x20HTTP\x20MCP\x20server:\x20','showLogo','parse','Opening\x20browser\x20for\x20login...','Already\x20logged\x20in\x20as\x20','2.2.0','Select\x20UI\x20theme\x20(alias\x20for\x20config\x20theme)','Knowledge\x20Presets','github\x20[subcmd]','Add\x20a\x20new\x20rule','1686KBmOeB','startAllConfigured','Waiting\x20for\x20authentication...','name','some','All\x20MCP\x20servers\x20removed','Stopped','Manage\x20Discord\x20integration','running','\x27\x20not\x20found','Configure\x20Discord\x20Bot\x20Token','Refresh\x20cancelled.','./ui/themes.js','Removed\x20MCP\x20server:\x20','add\x20<preset>','aliases','action','Configure\x20Telegram\x20Bot\x20Token','Manage\x20AI\x20knowledge\x20presets','error','Logged\x20in\x20as\x20','All\x20knowledge\x20presets\x20cleared','displayName','Added\x20stdio\x20MCP\x20server:\x20','No\x20rules\x20defined','woozlit','Add\x20an\x20HTTP\x20MCP\x20server\x20(streamable-http)','Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','logout','Start\x20an\x20AI\x20chat\x20session','delete','start','Manage\x20GitHub\x20tool\x20integration','url','Model:\x20','Current\x20User','Update\x20Woozlit\x20CLI\x20to\x20the\x20latest\x20version','add\x20<rule>','forEach','2420TciuUR','./discord/index.js','Select\x20AI\x20model','17451MKeVLU','Login\x20with\x20your\x20Woozlit\x20account','Login\x20failed\x20or\x20timed\x20out','createSpinner','You\x20can\x20also\x20add\x20servers\x20via\x20mcp.json\x20in\x20your\x20project\x20directory','add-http\x20<name>\x20<url>','Are\x20you\x20sure\x20you\x20want\x20to\x20completely\x20WIPE\x20all\x20CLI\x20data,\x20rules,\x20and\x20configs?','Email:\x20','Remove\x20an\x20MCP\x20server','description',':\x20[stdio]\x20','List\x20all\x20rules','URL:\x20','./github/index.js','1sowzTT','#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a','All\x20data,\x20configs,\x20and\x20MCP\x20servers\x20have\x20been\x20wiped.','ask\x20<message>','wipe','3bKVdhn','./utils/storage.js','811556hXXqnf','Are\x20you\x20sure\x20you\x20want\x20to\x20remove\x20ALL\x20MCP\x20servers?','stop','remove-all','delete-all','Default\x20servers\x20will\x20be\x20restored\x20on\x20next\x20restart\x20unless\x20you\x20remove\x20them\x20again.','type','Running','version','bold','green','email','list','.woozlit/rules.md','Manage\x20Telegram\x20integration','length','args','Theme\x20set\x20to:\x20','clean','Config\x20file:\x20','16998828Rccbzq','Added\x20rule:\x20','gray','Clear\x20all\x20knowledge\x20presets','All\x20rules\x20cleared','add\x20<name>\x20<command>\x20[args...]','Initialized\x20Woozlit\x20in\x20current\x20directory','Show\x20status\x20of\x20background\x20services/bots','dim'];a20_0x3ca0=function(){return _0x267196;};return a20_0x3ca0();}const configCmd=program[a20_0x220fd2(0x196)]('config')['description']('Configure\x20CLI\x20settings');configCmd[a20_0x220fd2(0x196)]('model')[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1d1))['action'](async()=>{const _0x30c282=await selectModel();a20_0x28bdd6['success']('Model\x20set\x20to:\x20'+_0x30c282);}),configCmd[a20_0x220fd2(0x196)](a20_0x220fd2(0x179))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x193))[a20_0x220fd2(0x1b7)](async()=>{const _0x47ade5=a20_0x220fd2,{selectTheme:_0x57001a}=await import(_0x47ade5(0x1b3)),_0x47a604=await _0x57001a();a20_0x28bdd6[_0x47ade5(0x173)](_0x47ade5(0x1f8)+_0x47a604);}),program[a20_0x220fd2(0x196)](a20_0x220fd2(0x179))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1a3))[a20_0x220fd2(0x1b7)](async()=>{const _0x2638a8=a20_0x220fd2,{selectTheme:_0x21a132}=await import(_0x2638a8(0x1b3)),_0x1f4fd5=await _0x21a132();a20_0x28bdd6[_0x2638a8(0x173)](_0x2638a8(0x1f8)+_0x1f4fd5);});const rulesCmd=program['command']('rules')[a20_0x220fd2(0x1db)]('Manage\x20AI\x20behavior\x20rules');rulesCmd['command'](a20_0x220fd2(0x1f3))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1dd))['action'](()=>{const _0x4dcec8=a20_0x220fd2,_0x31dc48=listRules();if(_0x31dc48['length']===0x0){a20_0x28bdd6['info'](_0x4dcec8(0x1bf));return;}a20_0x28bdd6['header']('Rules'),_0x31dc48[_0x4dcec8(0x1ce)]((_0x4bdf0c,_0x21a64b)=>{const _0x18c58b=_0x4dcec8;process[_0x18c58b(0x18a)]['write'](_0x21a64b+0x1+'.\x20'+_0x4bdf0c+'\x0a');});}),rulesCmd['command'](a20_0x220fd2(0x1cd))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1a6))['action'](_0x388d75=>{const _0x47beee=a20_0x220fd2;addRule(_0x388d75),a20_0x28bdd6[_0x47beee(0x173)](_0x47beee(0x1fc)+_0x388d75);})[a20_0x220fd2(0x1b7)](()=>{const _0x3dab68=a20_0x220fd2;clearRules(),a20_0x28bdd6['success'](_0x3dab68(0x1ff));});const knowledgeCmd=program['command']('knowledge')[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1b9));function a20_0x432c(_0x1ffbdb,_0x469f72){_0x1ffbdb=_0x1ffbdb-0x16b;const _0x3ca01=a20_0x3ca0();let _0x432ca9=_0x3ca01[_0x1ffbdb];return _0x432ca9;}knowledgeCmd['command'](a20_0x220fd2(0x1f3))[a20_0x220fd2(0x1db)]('List\x20all\x20knowledge\x20presets')['action'](()=>{const _0xd370d3=a20_0x220fd2,_0x2801ac=listKnowledge();if(_0x2801ac[_0xd370d3(0x1f6)]===0x0){a20_0x28bdd6[_0xd370d3(0x177)]('No\x20knowledge\x20presets\x20defined');return;}a20_0x28bdd6[_0xd370d3(0x199)](_0xd370d3(0x1a4)),_0x2801ac[_0xd370d3(0x1ce)]((_0x262ba3,_0x20dbbc)=>{const _0x5b2d30=_0xd370d3;process['stdout'][_0x5b2d30(0x191)](_0x20dbbc+0x1+'.\x20'+_0x262ba3+'\x0a');});}),knowledgeCmd[a20_0x220fd2(0x196)](a20_0x220fd2(0x1b5))[a20_0x220fd2(0x1db)]('Add\x20a\x20new\x20knowledge\x20preset')[a20_0x220fd2(0x1b7)](_0x5164d8=>{const _0x294d39=a20_0x220fd2;addKnowledge(_0x5164d8),a20_0x28bdd6['success'](_0x294d39(0x178)+_0x5164d8);}),knowledgeCmd[a20_0x220fd2(0x196)]('clear')[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1fe))[a20_0x220fd2(0x1b7)](()=>{const _0x59a2a0=a20_0x220fd2;clearKnowledge(),a20_0x28bdd6[_0x59a2a0(0x173)](_0x59a2a0(0x1bc));});const mcpCmd=program[a20_0x220fd2(0x196)]('mcp')['description'](a20_0x220fd2(0x190));mcpCmd[a20_0x220fd2(0x196)](a20_0x220fd2(0x1f3))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x189))[a20_0x220fd2(0x1b7)](()=>{const _0x3cf442=a20_0x220fd2,_0xd10bf=getMcpServers(),_0x116e76=Object['keys'](_0xd10bf);if(_0x116e76[_0x3cf442(0x1f6)]===0x0){a20_0x28bdd6[_0x3cf442(0x177)]('No\x20MCP\x20servers\x20configured'),a20_0x28bdd6['dim'](_0x3cf442(0x1fa)+getConfigFilePath());return;}a20_0x28bdd6[_0x3cf442(0x199)]('MCP\x20Servers'),_0x116e76[_0x3cf442(0x1ce)](_0x2a2547=>{const _0x47bf3a=_0x3cf442,_0x5bb3c1=_0xd10bf[_0x2a2547];_0x5bb3c1[_0x47bf3a(0x1ed)]===_0x47bf3a(0x171)?a20_0x28bdd6[_0x47bf3a(0x177)]('-\x20'+_0x2a2547+_0x47bf3a(0x17a)+_0x5bb3c1[_0x47bf3a(0x1c9)]):a20_0x28bdd6[_0x47bf3a(0x177)]('-\x20'+_0x2a2547+_0x47bf3a(0x1dc)+_0x5bb3c1[_0x47bf3a(0x196)]+'\x20'+(_0x5bb3c1[_0x47bf3a(0x1f7)]?.['join']('\x20')||''));}),a20_0x28bdd6[_0x3cf442(0x16d)]('\x0aConfig\x20file:\x20'+getConfigFilePath()),a20_0x28bdd6[_0x3cf442(0x16d)](_0x3cf442(0x1d6));}),mcpCmd[a20_0x220fd2(0x196)](a20_0x220fd2(0x200))[a20_0x220fd2(0x1db)]('Add\x20a\x20stdio\x20MCP\x20server')[a20_0x220fd2(0x1b7)]((_0x505adf,_0x8c8b2f,_0x477598)=>{const _0x171669=a20_0x220fd2;addMcpServer(_0x505adf,_0x8c8b2f,_0x477598),a20_0x28bdd6['success'](_0x171669(0x1be)+_0x505adf);}),mcpCmd[a20_0x220fd2(0x196)](a20_0x220fd2(0x1d7))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1c1))[a20_0x220fd2(0x1b7)]((_0x5cb079,_0x356088)=>{const _0x1026b1=a20_0x220fd2;addMcpHttpServer(_0x5cb079,_0x356088),a20_0x28bdd6['success'](_0x1026b1(0x19d)+_0x5cb079),a20_0x28bdd6[_0x1026b1(0x16d)](_0x1026b1(0x1de)+_0x356088);}),mcpCmd[a20_0x220fd2(0x196)]('remove\x20<name>')['aliases']([a20_0x220fd2(0x1c6),'rm'])['description'](a20_0x220fd2(0x1da))['action'](_0x3dc56e=>{const _0x4fb905=a20_0x220fd2;removeMcpServer(_0x3dc56e)?a20_0x28bdd6[_0x4fb905(0x173)](_0x4fb905(0x1b4)+_0x3dc56e):a20_0x28bdd6[_0x4fb905(0x1ba)](_0x4fb905(0x197)+_0x3dc56e+_0x4fb905(0x1b0));}),mcpCmd[a20_0x220fd2(0x196)](a20_0x220fd2(0x1ea))['aliases']([a20_0x220fd2(0x1eb),'clear'])[a20_0x220fd2(0x1db)](a20_0x220fd2(0x185))['action'](async()=>{const _0x1f0d48=a20_0x220fd2,{confirm:_0x1cc5ff}=await import('@inquirer/prompts'),{getTheme:_0x572368}=await import('./utils/storage.js'),{getInquirerTheme:_0x1edd27}=await import(_0x1f0d48(0x1b3)),_0xabd7bb=await _0x1cc5ff({'message':_0x1f0d48(0x1e8),'default':![],'theme':_0x1edd27(_0x572368())});_0xabd7bb?(clearMcpServers(),a20_0x28bdd6['success'](_0x1f0d48(0x1ac)),a20_0x28bdd6[_0x1f0d48(0x16d)](_0x1f0d48(0x1ec))):a20_0x28bdd6[_0x1f0d48(0x177)](_0x1f0d48(0x184));}),program[a20_0x220fd2(0x196)]('refresh')[a20_0x220fd2(0x1b6)]([a20_0x220fd2(0x183),a20_0x220fd2(0x1e4),a20_0x220fd2(0x1f9)])[a20_0x220fd2(0x1db)]('Wipe\x20all\x20data,\x20rules,\x20settings,\x20and\x20MCP\x20configs')[a20_0x220fd2(0x1b7)](async()=>{const _0x582e1f=a20_0x220fd2,{confirm:_0x703b38}=await import('@inquirer/prompts'),{getTheme:_0x24f579}=await import(_0x582e1f(0x1e6)),{getInquirerTheme:_0x4e7e7c}=await import(_0x582e1f(0x1b3)),_0x5e23b4=_0x24f579(),_0x63c66d=_0x4e7e7c(_0x5e23b4),_0x35fe4b=await _0x703b38({'message':a20_0x2c18e1[_0x582e1f(0x1f0)](_0x582e1f(0x1d8)),'default':![],'theme':_0x63c66d});if(_0x35fe4b){const {wipeAll:_0x452995}=await import(_0x582e1f(0x1e6));_0x452995();try{const {clearMcpServers:_0x289c91}=await import(_0x582e1f(0x17c));_0x289c91();}catch(_0x171391){}a20_0x28bdd6['success'](_0x582e1f(0x1e2)),a20_0x28bdd6[_0x582e1f(0x16d)]('Please\x20restart\x20the\x20CLI.');}else a20_0x28bdd6[_0x582e1f(0x177)](_0x582e1f(0x1b2));}),program['command']('init')[a20_0x220fd2(0x1db)]('Initialize\x20Woozlit\x20in\x20current\x20directory')[a20_0x220fd2(0x1b7)](()=>{const _0x40c4ab=a20_0x220fd2,_0x19ff60=listDirectory('.'),_0x2ae51c=_0x19ff60['entries']?.[_0x40c4ab(0x1ab)](_0x5cc476=>_0x5cc476[_0x40c4ab(0x1aa)]==='.woozlit');if(_0x2ae51c){a20_0x28bdd6[_0x40c4ab(0x17e)](_0x40c4ab(0x18b));return;}createFile(_0x40c4ab(0x1f4),'#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a'),createFile(_0x40c4ab(0x19b),_0x40c4ab(0x1e1)),a20_0x28bdd6[_0x40c4ab(0x173)](_0x40c4ab(0x16b)),a20_0x28bdd6[_0x40c4ab(0x16d)]('Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md');}),program[a20_0x220fd2(0x196)](a20_0x220fd2(0x181))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x16c))[a20_0x220fd2(0x1b7)](async()=>{const _0x21d0ad=a20_0x220fd2,{botManager:_0x5b0156}=await import(_0x21d0ad(0x16e)),_0x171bed=_0x5b0156[_0x21d0ad(0x172)]();a20_0x28bdd6[_0x21d0ad(0x199)](_0x21d0ad(0x18f));if(_0x171bed[_0x21d0ad(0x1f6)]===0x0){a20_0x28bdd6[_0x21d0ad(0x177)](_0x21d0ad(0x174));return;}_0x171bed[_0x21d0ad(0x1ce)](_0x5439d8=>{const _0x35bcee=_0x21d0ad,_0x31bc69=_0x5439d8[_0x35bcee(0x1af)]?a20_0x2c18e1[_0x35bcee(0x1f1)](_0x35bcee(0x1ee)):_0x5439d8[_0x35bcee(0x188)]?a20_0x2c18e1['yellow'](_0x35bcee(0x1ad)):a20_0x2c18e1[_0x35bcee(0x1fd)]('Not\x20Configured');a20_0x28bdd6['info']('-\x20'+_0x5439d8['name']+':\x20'+_0x31bc69);}),a20_0x28bdd6[_0x21d0ad(0x16d)](_0x21d0ad(0x176));});const discordCmd=program[a20_0x220fd2(0x196)](a20_0x220fd2(0x17f))['description'](a20_0x220fd2(0x1ae));discordCmd[a20_0x220fd2(0x196)](a20_0x220fd2(0x17d))['description'](a20_0x220fd2(0x1b1))['action'](async()=>{const _0x49d7fb=a20_0x220fd2,{setupDiscord:_0x3e5092}=await import(_0x49d7fb(0x1d0));await _0x3e5092();});const githubCmd=program[a20_0x220fd2(0x196)](a20_0x220fd2(0x1a5))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1c8))['action'](async _0x4da1df=>{const _0x4f7582=a20_0x220fd2,{handleGitHubCommand:_0x58522d}=await import(_0x4f7582(0x1df));await _0x58522d(_0x4da1df||'');}),telegramCmd=program[a20_0x220fd2(0x196)]('telegram')[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1f5));telegramCmd[a20_0x220fd2(0x196)](a20_0x220fd2(0x17d))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x1b8))['action'](async()=>{const _0x3876d3=a20_0x220fd2,{setupTelegram:_0x38df23}=await import(_0x3876d3(0x19a));await _0x38df23();});const emailCmd=program[a20_0x220fd2(0x196)](a20_0x220fd2(0x1f2))[a20_0x220fd2(0x1db)](a20_0x220fd2(0x186));emailCmd[a20_0x220fd2(0x196)]('setup')[a20_0x220fd2(0x1db)]('Configure\x20email\x20credentials')[a20_0x220fd2(0x1b7)](async()=>{const _0x40d176=a20_0x220fd2,{setupEmail:_0xa014ee}=await import(_0x40d176(0x18c));await _0xa014ee();}),program[a20_0x220fd2(0x196)](a20_0x220fd2(0x195))['description'](a20_0x220fd2(0x1cc))[a20_0x220fd2(0x1b7)](async()=>{const _0x10aa71=a20_0x220fd2,{performUpdate:_0x3ac254}=await import('./utils/updater.js'),_0x317adb=await _0x3ac254();!_0x317adb&&a20_0x28bdd6[_0x10aa71(0x16d)]('You\x20can\x20also\x20update\x20manually\x20from\x20https://cli.woozlit.com');}),program[a20_0x220fd2(0x19f)]();
@@ -1 +1 @@
1
- const a21_0x3d7268=a21_0x447d;(function(_0x4a9833,_0x2f034c){const _0x293790=a21_0x447d,_0x5a7da4=_0x4a9833();while(!![]){try{const _0x43047f=parseInt(_0x293790(0xc3))/0x1+-parseInt(_0x293790(0xc6))/0x2+parseInt(_0x293790(0xa0))/0x3*(parseInt(_0x293790(0x9b))/0x4)+parseInt(_0x293790(0xd5))/0x5+parseInt(_0x293790(0xac))/0x6+parseInt(_0x293790(0x9a))/0x7+-parseInt(_0x293790(0xae))/0x8;if(_0x43047f===_0x2f034c)break;else _0x5a7da4['push'](_0x5a7da4['shift']());}catch(_0x3ab861){_0x5a7da4['push'](_0x5a7da4['shift']());}}}(a21_0x4e96,0x8e2b6));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{CallToolRequestSchema,ListToolsRequestSchema}from'@modelcontextprotocol/sdk/types.js';import{Jimp}from'jimp';import{createRequire}from'module';const require=createRequire(import.meta.url);let robot;function a21_0x4e96(){const _0x4942eb=['computer-use','computer_type','Click\x20the\x20mouse\x20button.','width','computer_screenshot','@hurdlegroup/robotjs','Y\x20coordinate','Screen\x20size:\x20','text','Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','3675480WkZtLT','object','17302272XTMHnF','number','Screenshot\x20taken.','Moved\x20mouse\x20to\x20','length','right','string','getBuffer','getScreenSize','keyTap','command','middle','Type\x20a\x20string\x20of\x20text.','computer_mouse_move','height','left','computer_screen_size','mouseClick','capture','data','X\x20coordinate','1052148tAqSfg','image','Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','169834IsAQiC','join','moveMouse','Unknown\x20tool:\x20','Error:\x20','image/jpeg','with\x20','computer_mouse_click','Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','Tapped\x20key:\x20','bitmap','Clicked\x20','alt','computer_key_tap','params','1913495rEvmXn','3418114xaphmg','31816VDsYVV','resize','boolean','connect','\x20button','111JUwGcY','\x20(double)'];a21_0x4e96=function(){return _0x4942eb;};return a21_0x4e96();}try{robot=require(a21_0x3d7268(0xa7));}catch(a21_0x36deb6){}function a21_0x447d(_0x115aee,_0x38ecb2){_0x115aee=_0x115aee-0x9a;const _0x4e964a=a21_0x4e96();let _0x447d3c=_0x4e964a[_0x115aee];return _0x447d3c;}const AUTO=-0x1,MIME_JPEG=a21_0x3d7268(0xcb),server=new Server({'name':a21_0x3d7268(0xa2),'version':'1.0.0'},{'capabilities':{'tools':{}}});server['setRequestHandler'](ListToolsRequestSchema,async()=>{const _0x53f815=a21_0x3d7268;return{'tools':[{'name':'computer_screenshot','description':_0x53f815(0xc5),'inputSchema':{'type':_0x53f815(0xad),'properties':{}}},{'name':'computer_mouse_move','description':_0x53f815(0xab),'inputSchema':{'type':_0x53f815(0xad),'properties':{'x':{'type':_0x53f815(0xaf),'description':_0x53f815(0xc2)},'y':{'type':_0x53f815(0xaf),'description':_0x53f815(0xa8)}},'required':['x','y']}},{'name':_0x53f815(0xcd),'description':_0x53f815(0xa4),'inputSchema':{'type':_0x53f815(0xad),'properties':{'button':{'type':_0x53f815(0xb4),'enum':['left',_0x53f815(0xb3),_0x53f815(0xb9)],'default':_0x53f815(0xbd)},'double':{'type':_0x53f815(0x9d),'default':![]}}}},{'name':_0x53f815(0xa3),'description':_0x53f815(0xba),'inputSchema':{'type':_0x53f815(0xad),'properties':{'text':{'type':_0x53f815(0xb4),'description':'Text\x20to\x20type'}},'required':[_0x53f815(0xaa)]}},{'name':_0x53f815(0xd3),'description':_0x53f815(0xce),'inputSchema':{'type':_0x53f815(0xad),'properties':{'key':{'type':_0x53f815(0xb4),'description':'Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)'},'modifiers':{'type':'array','items':{'type':_0x53f815(0xb4),'enum':[_0x53f815(0xd2),_0x53f815(0xb8),'control','shift']},'description':'Modifier\x20keys'}},'required':['key']}},{'name':_0x53f815(0xbe),'description':'Get\x20the\x20screen\x20resolution.','inputSchema':{'type':'object','properties':{}}}]};}),server['setRequestHandler'](CallToolRequestSchema,async _0x28043f=>{const _0x53c214=a21_0x3d7268,{name:_0x3f8efd,arguments:_0x435a6d}=_0x28043f[_0x53c214(0xd4)];try{if(_0x3f8efd===_0x53c214(0xa6)){const _0x256a9d=robot[_0x53c214(0xb6)](),_0xa3f2cb=robot['screen'][_0x53c214(0xc0)](0x0,0x0,_0x256a9d[_0x53c214(0xa5)],_0x256a9d[_0x53c214(0xbc)]),_0x28d49c=new Jimp({'width':_0xa3f2cb[_0x53c214(0xa5)],'height':_0xa3f2cb['height']});for(let _0x3c7e1e=0x0;_0x3c7e1e<_0xa3f2cb[_0x53c214(0xc4)][_0x53c214(0xb2)];_0x3c7e1e+=0x4){_0x28d49c[_0x53c214(0xd0)][_0x53c214(0xc1)][_0x3c7e1e]=_0xa3f2cb[_0x53c214(0xc4)][_0x3c7e1e+0x2],_0x28d49c['bitmap'][_0x53c214(0xc1)][_0x3c7e1e+0x1]=_0xa3f2cb[_0x53c214(0xc4)][_0x3c7e1e+0x1],_0x28d49c[_0x53c214(0xd0)][_0x53c214(0xc1)][_0x3c7e1e+0x2]=_0xa3f2cb['image'][_0x3c7e1e],_0x28d49c[_0x53c214(0xd0)][_0x53c214(0xc1)][_0x3c7e1e+0x3]=_0xa3f2cb[_0x53c214(0xc4)][_0x3c7e1e+0x3];}_0x28d49c[_0x53c214(0xd0)][_0x53c214(0xa5)]>0x400&&_0x28d49c[_0x53c214(0x9c)]({'w':0x400});const _0x73daca=await _0x28d49c[_0x53c214(0xb5)](MIME_JPEG),_0x16a4bf=_0x73daca['toString']('base64');return{'content':[{'type':'text','text':_0x53c214(0xb0)},{'type':'image','data':_0x16a4bf,'mimeType':_0x53c214(0xcb)}]};}if(_0x3f8efd===_0x53c214(0xbb)){const {x:_0x4a84c4,y:_0x537796}=_0x435a6d;return robot[_0x53c214(0xc8)](_0x4a84c4,_0x537796),{'content':[{'type':_0x53c214(0xaa),'text':_0x53c214(0xb1)+_0x4a84c4+',\x20'+_0x537796}]};}if(_0x3f8efd===_0x53c214(0xcd)){const {button:button='left',double:double=![]}=_0x435a6d;return robot[_0x53c214(0xbf)](button,double),{'content':[{'type':'text','text':_0x53c214(0xd1)+button+_0x53c214(0x9f)+(double?_0x53c214(0xa1):'')}]};}if(_0x3f8efd==='computer_type'){const {text:_0x2a5c0d}=_0x435a6d;return robot['typeString'](_0x2a5c0d),{'content':[{'type':_0x53c214(0xaa),'text':'Typed:\x20\x22'+_0x2a5c0d+'\x22'}]};}if(_0x3f8efd===_0x53c214(0xd3)){const {key:_0x314def,modifiers:_0xcd0c15}=_0x435a6d;return robot[_0x53c214(0xb7)](_0x314def,_0xcd0c15),{'content':[{'type':'text','text':_0x53c214(0xcf)+_0x314def+'\x20'+(_0xcd0c15?_0x53c214(0xcc)+_0xcd0c15[_0x53c214(0xc7)]('+'):'')}]};}if(_0x3f8efd===_0x53c214(0xbe)){const _0x1b70ee=robot[_0x53c214(0xb6)]();return{'content':[{'type':_0x53c214(0xaa),'text':_0x53c214(0xa9)+_0x1b70ee[_0x53c214(0xa5)]+'x'+_0x1b70ee[_0x53c214(0xbc)]}]};}throw new Error(_0x53c214(0xc9)+_0x3f8efd);}catch(_0x4fc3a7){return{'content':[{'type':_0x53c214(0xaa),'text':_0x53c214(0xca)+_0x4fc3a7}],'isError':!![]};}});const transport=new StdioServerTransport();await server[a21_0x3d7268(0x9e)](transport);
1
+ const a21_0x1e54a1=a21_0x5baf;(function(_0x5e4068,_0x49ebdc){const _0x36aab8=a21_0x5baf,_0x5d290a=_0x5e4068();while(!![]){try{const _0x15c0e8=parseInt(_0x36aab8(0x1d4))/0x1*(-parseInt(_0x36aab8(0x1e0))/0x2)+-parseInt(_0x36aab8(0x1b7))/0x3*(-parseInt(_0x36aab8(0x1c1))/0x4)+parseInt(_0x36aab8(0x1dd))/0x5*(-parseInt(_0x36aab8(0x1cd))/0x6)+-parseInt(_0x36aab8(0x1d0))/0x7+-parseInt(_0x36aab8(0x1cf))/0x8+-parseInt(_0x36aab8(0x1b4))/0x9+parseInt(_0x36aab8(0x1db))/0xa;if(_0x15c0e8===_0x49ebdc)break;else _0x5d290a['push'](_0x5d290a['shift']());}catch(_0x4e844e){_0x5d290a['push'](_0x5d290a['shift']());}}}(a21_0x24b6,0xe4ea3));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';function a21_0x5baf(_0x1fe098,_0x3f6ea6){_0x1fe098=_0x1fe098-0x1a5;const _0x24b695=a21_0x24b6();let _0x5baf48=_0x24b695[_0x1fe098];return _0x5baf48;}import{CallToolRequestSchema,ListToolsRequestSchema}from'@modelcontextprotocol/sdk/types.js';import{Jimp}from'jimp';function a21_0x24b6(){const _0x29fa36=['11855952ZSAKyj','@hurdlegroup/robotjs','setRequestHandler','63396HQbrFG','getScreenSize','length','Unknown\x20tool:\x20','control','getBuffer','object','height','toString','X\x20coordinate','52yVxapg','join','connect','keyTap','Get\x20the\x20screen\x20resolution.','command','image/jpeg','computer_screen_size','Error:\x20','Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','Type\x20a\x20string\x20of\x20text.','Moved\x20mouse\x20to\x20','12yMomdB','Y\x20coordinate','7452008qqDaRq','1781017fmKpoG','string','data','bitmap','1343261BZWIUt','left','Screen\x20size:\x20','screen','1.0.0','computer-use','width','49153220wEOiGy','Clicked\x20','1014705aWGwgp','Tapped\x20key:\x20','image','2dKMaHB','Modifier\x20keys','computer_mouse_click','Text\x20to\x20type','Screenshot\x20taken.','\x20button','typeString','Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','text','Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)','Typed:\x20\x22','middle','mouseClick','number','array','boolean','computer_mouse_move','shift','with\x20','key','computer_screenshot','computer_type'];a21_0x24b6=function(){return _0x29fa36;};return a21_0x24b6();}import{createRequire}from'module';const require=createRequire(import.meta.url);let robot;try{robot=require(a21_0x1e54a1(0x1b5));}catch(a21_0x4767b9){}const AUTO=-0x1,MIME_JPEG='image/jpeg',server=new Server({'name':a21_0x1e54a1(0x1d9),'version':a21_0x1e54a1(0x1d8)},{'capabilities':{'tools':{}}});server[a21_0x1e54a1(0x1b6)](ListToolsRequestSchema,async()=>{const _0xaab04f=a21_0x1e54a1;return{'tools':[{'name':_0xaab04f(0x1b2),'description':_0xaab04f(0x1a5),'inputSchema':{'type':_0xaab04f(0x1bd),'properties':{}}},{'name':_0xaab04f(0x1ae),'description':'Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','inputSchema':{'type':_0xaab04f(0x1bd),'properties':{'x':{'type':_0xaab04f(0x1ab),'description':_0xaab04f(0x1c0)},'y':{'type':_0xaab04f(0x1ab),'description':_0xaab04f(0x1ce)}},'required':['x','y']}},{'name':_0xaab04f(0x1e2),'description':'Click\x20the\x20mouse\x20button.','inputSchema':{'type':_0xaab04f(0x1bd),'properties':{'button':{'type':_0xaab04f(0x1d1),'enum':[_0xaab04f(0x1d5),'right',_0xaab04f(0x1a9)],'default':_0xaab04f(0x1d5)},'double':{'type':_0xaab04f(0x1ad),'default':![]}}}},{'name':_0xaab04f(0x1b3),'description':_0xaab04f(0x1cb),'inputSchema':{'type':_0xaab04f(0x1bd),'properties':{'text':{'type':'string','description':_0xaab04f(0x1e3)}},'required':['text']}},{'name':'computer_key_tap','description':_0xaab04f(0x1ca),'inputSchema':{'type':_0xaab04f(0x1bd),'properties':{'key':{'type':'string','description':_0xaab04f(0x1a7)},'modifiers':{'type':_0xaab04f(0x1ac),'items':{'type':_0xaab04f(0x1d1),'enum':['alt',_0xaab04f(0x1c6),_0xaab04f(0x1bb),_0xaab04f(0x1af)]},'description':_0xaab04f(0x1e1)}},'required':[_0xaab04f(0x1b1)]}},{'name':_0xaab04f(0x1c8),'description':_0xaab04f(0x1c5),'inputSchema':{'type':_0xaab04f(0x1bd),'properties':{}}}]};}),server['setRequestHandler'](CallToolRequestSchema,async _0x6a3c92=>{const _0x5e8143=a21_0x1e54a1,{name:_0x438e25,arguments:_0x123ca6}=_0x6a3c92['params'];try{if(_0x438e25===_0x5e8143(0x1b2)){const _0xf0219f=robot[_0x5e8143(0x1b8)](),_0x33e850=robot[_0x5e8143(0x1d7)]['capture'](0x0,0x0,_0xf0219f[_0x5e8143(0x1da)],_0xf0219f[_0x5e8143(0x1be)]),_0x4ce74c=new Jimp({'width':_0x33e850[_0x5e8143(0x1da)],'height':_0x33e850[_0x5e8143(0x1be)]});for(let _0x15ec99=0x0;_0x15ec99<_0x33e850[_0x5e8143(0x1df)][_0x5e8143(0x1b9)];_0x15ec99+=0x4){_0x4ce74c[_0x5e8143(0x1d3)][_0x5e8143(0x1d2)][_0x15ec99]=_0x33e850[_0x5e8143(0x1df)][_0x15ec99+0x2],_0x4ce74c[_0x5e8143(0x1d3)][_0x5e8143(0x1d2)][_0x15ec99+0x1]=_0x33e850['image'][_0x15ec99+0x1],_0x4ce74c[_0x5e8143(0x1d3)][_0x5e8143(0x1d2)][_0x15ec99+0x2]=_0x33e850[_0x5e8143(0x1df)][_0x15ec99],_0x4ce74c[_0x5e8143(0x1d3)][_0x5e8143(0x1d2)][_0x15ec99+0x3]=_0x33e850[_0x5e8143(0x1df)][_0x15ec99+0x3];}_0x4ce74c[_0x5e8143(0x1d3)][_0x5e8143(0x1da)]>0x400&&_0x4ce74c['resize']({'w':0x400});const _0x50355d=await _0x4ce74c[_0x5e8143(0x1bc)](MIME_JPEG),_0x34960e=_0x50355d[_0x5e8143(0x1bf)]('base64');return{'content':[{'type':_0x5e8143(0x1a6),'text':_0x5e8143(0x1e4)},{'type':_0x5e8143(0x1df),'data':_0x34960e,'mimeType':_0x5e8143(0x1c7)}]};}if(_0x438e25===_0x5e8143(0x1ae)){const {x:_0x2544f2,y:_0x51c89e}=_0x123ca6;return robot['moveMouse'](_0x2544f2,_0x51c89e),{'content':[{'type':_0x5e8143(0x1a6),'text':_0x5e8143(0x1cc)+_0x2544f2+',\x20'+_0x51c89e}]};}if(_0x438e25===_0x5e8143(0x1e2)){const {button:button='left',double:double=![]}=_0x123ca6;return robot[_0x5e8143(0x1aa)](button,double),{'content':[{'type':_0x5e8143(0x1a6),'text':_0x5e8143(0x1dc)+button+_0x5e8143(0x1e5)+(double?'\x20(double)':'')}]};}if(_0x438e25===_0x5e8143(0x1b3)){const {text:_0x4d2443}=_0x123ca6;return robot[_0x5e8143(0x1e6)](_0x4d2443),{'content':[{'type':'text','text':_0x5e8143(0x1a8)+_0x4d2443+'\x22'}]};}if(_0x438e25==='computer_key_tap'){const {key:_0xe1221,modifiers:_0x1b63b2}=_0x123ca6;return robot[_0x5e8143(0x1c4)](_0xe1221,_0x1b63b2),{'content':[{'type':_0x5e8143(0x1a6),'text':_0x5e8143(0x1de)+_0xe1221+'\x20'+(_0x1b63b2?_0x5e8143(0x1b0)+_0x1b63b2[_0x5e8143(0x1c2)]('+'):'')}]};}if(_0x438e25==='computer_screen_size'){const _0x4ae433=robot[_0x5e8143(0x1b8)]();return{'content':[{'type':'text','text':_0x5e8143(0x1d6)+_0x4ae433['width']+'x'+_0x4ae433['height']}]};}throw new Error(_0x5e8143(0x1ba)+_0x438e25);}catch(_0x55455c){return{'content':[{'type':'text','text':_0x5e8143(0x1c9)+_0x55455c}],'isError':!![]};}});const transport=new StdioServerTransport();await server[a21_0x1e54a1(0x1c3)](transport);