woozlit 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/auth/login.js +1 -1
  2. package/dist/browser/index.js +1 -1
  3. package/dist/browser/server.js +1 -1
  4. package/dist/browser/tools.js +1 -1
  5. package/dist/chat/agent.js +1 -1
  6. package/dist/config/mcp.js +1 -1
  7. package/dist/config/settings.js +1 -1
  8. package/dist/discord/client.js +1 -1
  9. package/dist/discord/config.js +1 -1
  10. package/dist/discord/index.js +1 -1
  11. package/dist/discord/setup.js +1 -1
  12. package/dist/email/config.js +1 -1
  13. package/dist/email/index.js +1 -1
  14. package/dist/email/service.js +1 -1
  15. package/dist/email/setup.js +1 -1
  16. package/dist/github/api.js +1 -1
  17. package/dist/github/auth.js +1 -1
  18. package/dist/github/auto-setup.js +1 -1
  19. package/dist/github/index.js +1 -1
  20. package/dist/github/manual-setup.js +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/mcp-servers/computer-use.js +1 -1
  23. package/dist/services/bot-manager.js +1 -1
  24. package/dist/services/voice-agent.js +1 -1
  25. package/dist/telegram/bot.js +1 -1
  26. package/dist/telegram/config.js +1 -1
  27. package/dist/telegram/index.js +1 -1
  28. package/dist/telegram/reminders.js +1 -1
  29. package/dist/telegram/setup.js +1 -1
  30. package/dist/tools/command.js +1 -1
  31. package/dist/tools/file.js +1 -1
  32. package/dist/tools/index.js +1 -1
  33. package/dist/tools/mcp.js +1 -1
  34. package/dist/tools/rollback.js +1 -1
  35. package/dist/tools/rules.js +1 -1
  36. package/dist/twilio/config.js +1 -1
  37. package/dist/twilio/index.js +1 -1
  38. package/dist/twilio/server.js +1 -1
  39. package/dist/twilio/setup.js +1 -1
  40. package/dist/ui/output.js +1 -1
  41. package/dist/ui/select.js +1 -1
  42. package/dist/ui/themes.js +1 -1
  43. package/dist/utils/api.js +1 -1
  44. package/dist/utils/history.js +1 -1
  45. package/dist/utils/mcp-installer.js +1 -1
  46. package/dist/utils/platform.js +1 -1
  47. package/dist/utils/storage.js +1 -1
  48. package/dist/utils/update-check.js +1 -1
  49. package/dist/verify_repro.js +1 -1
  50. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x26e903,_0x524b17){const _0x4c672b=a14_0x4360,_0x2d59e5=_0x26e903();while(!![]){try{const _0x1b4b47=-parseInt(_0x4c672b(0x152))/0x1+parseInt(_0x4c672b(0x144))/0x2+parseInt(_0x4c672b(0x148))/0x3+-parseInt(_0x4c672b(0x142))/0x4*(parseInt(_0x4c672b(0x155))/0x5)+-parseInt(_0x4c672b(0x143))/0x6+-parseInt(_0x4c672b(0x149))/0x7+parseInt(_0x4c672b(0x145))/0x8*(parseInt(_0x4c672b(0x14b))/0x9);if(_0x1b4b47===_0x524b17)break;else _0x2d59e5['push'](_0x2d59e5['shift']());}catch(_0x1bf8c5){_0x2d59e5['push'](_0x2d59e5['shift']());}}}(a14_0x5010,0x27361));import{password,input,confirm}from'@inquirer/prompts';function a14_0x4360(_0x3ebd6f,_0x34e044){_0x3ebd6f=_0x3ebd6f-0x13c;const _0x5010c3=a14_0x5010();let _0x436052=_0x5010c3[_0x3ebd6f];return _0x436052;}import*as a14_0x334e12 from'./config.js';import*as a14_0x179815 from'../ui/output.js';export async function setupEmail(){const _0x1ab2f8=a14_0x4360;a14_0x179815['info']('This\x20setup\x20will\x20configure\x20Woozlit\x20to\x20check\x20your\x20email\x20and\x20reply.'),a14_0x179815[_0x1ab2f8(0x13c)](_0x1ab2f8(0x151));const _0x52d2b2=await input({'message':'Email\x20Provider\x20(gmail/outlook/other):','default':'gmail'}),_0x5e0b54=await input({'message':_0x1ab2f8(0x146)}),_0x2cdaf0=await password({'message':_0x1ab2f8(0x13d)});let _0x464f31=_0x1ab2f8(0x13f),_0x3afc13=0x3e1,_0x4d63e7='smtp.gmail.com',_0x2cdaa0=0x24b;if(_0x52d2b2['toLowerCase']()!==_0x1ab2f8(0x14c)){const _0x384417=await confirm({'message':_0x1ab2f8(0x147),'default':![]});if(_0x384417){_0x464f31=await input({'message':_0x1ab2f8(0x153),'default':_0x464f31});const _0x1a69b0=await input({'message':'IMAP\x20Port:','default':_0x1ab2f8(0x140)});_0x3afc13=parseInt(_0x1a69b0),_0x4d63e7=await input({'message':_0x1ab2f8(0x141),'default':_0x4d63e7});const _0x214672=await input({'message':_0x1ab2f8(0x154),'default':'587'});_0x2cdaa0=parseInt(_0x214672);}}a14_0x334e12[_0x1ab2f8(0x14a)](_0x5e0b54,_0x2cdaf0,_0x464f31,_0x3afc13),a14_0x334e12[_0x1ab2f8(0x14d)](!![]);const _0x13dc72=await confirm({'message':_0x1ab2f8(0x14e),'default':!![]});if(_0x13dc72){a14_0x334e12['addAllowedSender'](_0x5e0b54);const _0x4d431c=await input({'message':_0x1ab2f8(0x150)});if(_0x4d431c)a14_0x334e12[_0x1ab2f8(0x156)](_0x4d431c);}a14_0x179815['success'](_0x1ab2f8(0x14f)),a14_0x179815['info'](_0x1ab2f8(0x13e));}function a14_0x5010(){const _0x3b4657=['248208qgzYqn','Email\x20Address:','Configure\x20advanced\x20server\x20settings?','788388RMuVii','1067395CwEmvD','setCredentials','90afoFXr','gmail','setEnabled','Only\x20allow\x20emails\x20from\x20yourself\x20(recommended)?','Email\x20configuration\x20saved!','Your\x20personal\x20email\x20(that\x20you\x20will\x20send\x20FROM):','Use\x20an\x20App\x20Password\x20if\x20you\x20are\x20using\x20Gmail\x20(2FA\x20enabled).','64428ZlLpxM','IMAP\x20Host:','SMTP\x20Port:','5ZYtDsG','addAllowedSender','warn','Password\x20(or\x20App\x20Password):','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Email\x20Agent.','imap.gmail.com','993','SMTP\x20Host:','1133012rUmvcH','807420CZfikw','444578pcqnBL'];a14_0x5010=function(){return _0x3b4657;};return a14_0x5010();}
1
+ (function(_0xc6a9df,_0x9a460e){const _0xe9027c=a14_0x5b9e,_0x33a9f2=_0xc6a9df();while(!![]){try{const _0xb29bc5=-parseInt(_0xe9027c(0x13f))/0x1*(parseInt(_0xe9027c(0x13d))/0x2)+parseInt(_0xe9027c(0x137))/0x3+-parseInt(_0xe9027c(0x146))/0x4*(parseInt(_0xe9027c(0x148))/0x5)+parseInt(_0xe9027c(0x133))/0x6+parseInt(_0xe9027c(0x139))/0x7+parseInt(_0xe9027c(0x147))/0x8+-parseInt(_0xe9027c(0x149))/0x9;if(_0xb29bc5===_0x9a460e)break;else _0x33a9f2['push'](_0x33a9f2['shift']());}catch(_0x10cb1d){_0x33a9f2['push'](_0x33a9f2['shift']());}}}(a14_0x69d8,0x6680e));import{password,input,confirm}from'@inquirer/prompts';function a14_0x5b9e(_0x346101,_0x17fcf9){_0x346101=_0x346101-0x133;const _0x69d813=a14_0x69d8();let _0x5b9e8c=_0x69d813[_0x346101];return _0x5b9e8c;}function a14_0x69d8(){const _0x4c308d=['Email\x20Address:','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Email\x20Agent.','setEnabled','136oJTOcH','setCredentials','436eCnWkj','993','Only\x20allow\x20emails\x20from\x20yourself\x20(recommended)?','imap.gmail.com','Use\x20an\x20App\x20Password\x20if\x20you\x20are\x20using\x20Gmail\x20(2FA\x20enabled).','IMAP\x20Host:','Password\x20(or\x20App\x20Password):','2276RRtsBV','1573080MzpqCe','5990idHgNk','3726810MRLvtH','IMAP\x20Port:','SMTP\x20Host:','Configure\x20advanced\x20server\x20settings?','toLowerCase','Email\x20configuration\x20saved!','info','3070830UEDCVT','smtp.gmail.com','Email\x20Provider\x20(gmail/outlook/other):','gmail','66177JhwPrH','warn','5703285YdKDss'];a14_0x69d8=function(){return _0x4c308d;};return a14_0x69d8();}import*as a14_0x5ba5a9 from'./config.js';import*as a14_0xc98156 from'../ui/output.js';export async function setupEmail(){const _0x349fff=a14_0x5b9e;a14_0xc98156[_0x349fff(0x14f)]('This\x20setup\x20will\x20configure\x20Woozlit\x20to\x20check\x20your\x20email\x20and\x20reply.'),a14_0xc98156[_0x349fff(0x138)](_0x349fff(0x143));const _0x1f5c02=await input({'message':_0x349fff(0x135),'default':_0x349fff(0x136)}),_0x3f243e=await input({'message':_0x349fff(0x13a)}),_0x362b24=await password({'message':_0x349fff(0x145)});let _0x40894e=_0x349fff(0x142),_0x488bf7=0x3e1,_0x535e64=_0x349fff(0x134),_0x8cd541=0x24b;if(_0x1f5c02[_0x349fff(0x14d)]()!==_0x349fff(0x136)){const _0x2ce482=await confirm({'message':_0x349fff(0x14c),'default':![]});if(_0x2ce482){_0x40894e=await input({'message':_0x349fff(0x144),'default':_0x40894e});const _0x2ce7e8=await input({'message':_0x349fff(0x14a),'default':_0x349fff(0x140)});_0x488bf7=parseInt(_0x2ce7e8),_0x535e64=await input({'message':_0x349fff(0x14b),'default':_0x535e64});const _0x10b0e3=await input({'message':'SMTP\x20Port:','default':'587'});_0x8cd541=parseInt(_0x10b0e3);}}a14_0x5ba5a9[_0x349fff(0x13e)](_0x3f243e,_0x362b24,_0x40894e,_0x488bf7),a14_0x5ba5a9[_0x349fff(0x13c)](!![]);const _0xf4c67c=await confirm({'message':_0x349fff(0x141),'default':!![]});if(_0xf4c67c){a14_0x5ba5a9['addAllowedSender'](_0x3f243e);const _0x504dc2=await input({'message':'Your\x20personal\x20email\x20(that\x20you\x20will\x20send\x20FROM):'});if(_0x504dc2)a14_0x5ba5a9['addAllowedSender'](_0x504dc2);}a14_0xc98156['success'](_0x349fff(0x14e)),a14_0xc98156[_0x349fff(0x14f)](_0x349fff(0x13b));}
@@ -1 +1 @@
1
- const a15_0x3193f7=a15_0x552b;(function(_0x185b73,_0xe3bde8){const _0x2109de=a15_0x552b,_0x14e2af=_0x185b73();while(!![]){try{const _0xfb0404=-parseInt(_0x2109de(0x16b))/0x1*(-parseInt(_0x2109de(0x14e))/0x2)+-parseInt(_0x2109de(0x154))/0x3+parseInt(_0x2109de(0x175))/0x4+parseInt(_0x2109de(0x14f))/0x5+parseInt(_0x2109de(0x16c))/0x6+parseInt(_0x2109de(0x163))/0x7*(parseInt(_0x2109de(0x15f))/0x8)+-parseInt(_0x2109de(0x176))/0x9;if(_0xfb0404===_0xe3bde8)break;else _0x14e2af['push'](_0x14e2af['shift']());}catch(_0x3c4ca4){_0x14e2af['push'](_0x14e2af['shift']());}}}(a15_0x5252,0x3ef54));import{getGitHubToken}from'./auth.js';async function githubRequest(_0x1b2823,_0x5e7033={}){const _0x4e13ec=a15_0x552b,_0x3d65e1=await getGitHubToken();if(!_0x3d65e1)throw new Error(_0x4e13ec(0x16d));const _0xc14fee=await fetch(_0x4e13ec(0x152)+_0x1b2823,{..._0x5e7033,'headers':{'Authorization':'Bearer\x20'+_0x3d65e1,'Accept':_0x4e13ec(0x171),'X-GitHub-Api-Version':'2022-11-28',..._0x5e7033[_0x4e13ec(0x156)]}});if(!_0xc14fee['ok']){const _0x2055cc=await _0xc14fee[_0x4e13ec(0x151)]();throw new Error('GitHub\x20API\x20error:\x20'+_0xc14fee[_0x4e13ec(0x16a)]+'\x20-\x20'+_0x2055cc);}return _0xc14fee[_0x4e13ec(0x155)]();}export async function listRepos(){const _0x131d02=a15_0x552b;return githubRequest(_0x131d02(0x15e));}export async function getRepo(_0x28f04a,_0x5e70d8){const _0x3ea50d=a15_0x552b;return githubRequest(_0x3ea50d(0x167)+_0x28f04a+'/'+_0x5e70d8);}function a15_0x552b(_0x440e2f,_0x4c724c){_0x440e2f=_0x440e2f-0x14e;const _0x5252c4=a15_0x5252();let _0x552b14=_0x5252c4[_0x440e2f];return _0x552b14;}function a15_0x5252(){const _0x37825b=['/git/ref/heads/','from','base64','main','/user/repos?per_page=100&sort=updated','269368IhpIgm','POST','open','owner','56wNmBhQ','/contents/','login','?ref=','/repos/','content','toString','status','2cPDJmG','2863482AZvqaU','Not\x20authenticated\x20with\x20GitHub.\x20Run\x20\x27/github\x20login\x27\x20first.','/comments','/git/refs','/issues/','application/vnd.github+json','GitHub\x20App','object','PUT','19740RyCpld','3803031RWdHop','total_count','47738PwSTTz','1224915KLRiqj','repositories','text','https://api.github.com','stringify','1091508tQfyFl','json','headers','/pulls?state=','&per_page=50','/pulls'];a15_0x5252=function(){return _0x37825b;};return a15_0x5252();}export async function readFile(_0xf2451,_0x3b15d9,_0x25a688,_0x11bdf3=a15_0x3193f7(0x15d)){const _0x583b41=a15_0x3193f7,_0x46650d=await githubRequest('/repos/'+_0xf2451+'/'+_0x3b15d9+'/contents/'+_0x25a688+_0x583b41(0x166)+_0x11bdf3),_0x2a8831=Buffer[_0x583b41(0x15b)](_0x46650d[_0x583b41(0x168)],_0x583b41(0x15c))[_0x583b41(0x169)]('utf-8');return _0x2a8831;}export async function createOrUpdateFile(_0x2f225e,_0x32ceff,_0x33ae81,_0x482c47,_0x1d3da8,_0x6db9d3=a15_0x3193f7(0x15d),_0x36ed7b){const _0x27f906=a15_0x3193f7,_0x5c8fc5=Buffer[_0x27f906(0x15b)](_0x482c47)[_0x27f906(0x169)](_0x27f906(0x15c));return githubRequest(_0x27f906(0x167)+_0x2f225e+'/'+_0x32ceff+_0x27f906(0x164)+_0x33ae81,{'method':_0x27f906(0x174),'body':JSON[_0x27f906(0x153)]({'message':_0x1d3da8,'content':_0x5c8fc5,'branch':_0x6db9d3,..._0x36ed7b&&{'sha':_0x36ed7b}})});}export async function createPullRequest(_0x4c7d86,_0x2361ab,_0x2c27f8,_0xce9ca3,_0x4c3ee9='main',_0x2d1494){const _0xbe4392=a15_0x3193f7;return githubRequest('/repos/'+_0x4c7d86+'/'+_0x2361ab+_0xbe4392(0x159),{'method':_0xbe4392(0x160),'body':JSON[_0xbe4392(0x153)]({'title':_0x2c27f8,'head':_0xce9ca3,'base':_0x4c3ee9,'body':_0x2d1494||''})});}export async function listPullRequests(_0x1c4925,_0x496cd2,_0x47ef8f=a15_0x3193f7(0x161)){const _0x2cc8c2=a15_0x3193f7;return githubRequest(_0x2cc8c2(0x167)+_0x1c4925+'/'+_0x496cd2+_0x2cc8c2(0x157)+_0x47ef8f+_0x2cc8c2(0x158));}export async function commentOnPR(_0x513ec8,_0x4eb4dd,_0x4a9e08,_0x3de50d){const _0x460b41=a15_0x3193f7;return githubRequest('/repos/'+_0x513ec8+'/'+_0x4eb4dd+_0x460b41(0x170)+_0x4a9e08+_0x460b41(0x16e),{'method':'POST','body':JSON[_0x460b41(0x153)]({'body':_0x3de50d})});}export async function createBranch(_0x273c07,_0x495962,_0x1a2dd0,_0xe7b007=a15_0x3193f7(0x15d)){const _0x981bb1=a15_0x3193f7,_0x445aa5=await githubRequest(_0x981bb1(0x167)+_0x273c07+'/'+_0x495962+_0x981bb1(0x15a)+_0xe7b007);return githubRequest(_0x981bb1(0x167)+_0x273c07+'/'+_0x495962+_0x981bb1(0x16f),{'method':_0x981bb1(0x160),'body':JSON[_0x981bb1(0x153)]({'ref':'refs/heads/'+_0x1a2dd0,'sha':_0x445aa5[_0x981bb1(0x173)]['sha']})});}export async function getAppStatus(){const _0x40e522=a15_0x3193f7;try{const _0x14f9b4=await githubRequest('/installation/repositories?per_page=1'),_0x8988a6=_0x14f9b4[_0x40e522(0x177)];let _0xc2d051=_0x40e522(0x172);return _0x14f9b4[_0x40e522(0x150)]&&_0x14f9b4['repositories']['length']>0x0&&(_0xc2d051=_0x14f9b4['repositories'][0x0][_0x40e522(0x162)][_0x40e522(0x165)]),{'valid':!![],'repoCount':_0x8988a6,'accountName':_0xc2d051};}catch(_0x5ac38a){throw _0x5ac38a;}}
1
+ const a15_0x44c299=a15_0x5af0;(function(_0x4a48cc,_0x3fe660){const _0x2c8856=a15_0x5af0,_0x49ffe7=_0x4a48cc();while(!![]){try{const _0x34b110=parseInt(_0x2c8856(0x1ea))/0x1+-parseInt(_0x2c8856(0x1f6))/0x2+parseInt(_0x2c8856(0x1f9))/0x3*(-parseInt(_0x2c8856(0x1f5))/0x4)+parseInt(_0x2c8856(0x1f4))/0x5+parseInt(_0x2c8856(0x1fc))/0x6+-parseInt(_0x2c8856(0x1fb))/0x7*(parseInt(_0x2c8856(0x1f2))/0x8)+parseInt(_0x2c8856(0x1fe))/0x9;if(_0x34b110===_0x3fe660)break;else _0x49ffe7['push'](_0x49ffe7['shift']());}catch(_0x441715){_0x49ffe7['push'](_0x49ffe7['shift']());}}}(a15_0x3e03,0x33a68));function a15_0x3e03(){const _0x9ffa8f=['2304504NKYXvD','toString','repositories','Not\x20authenticated\x20with\x20GitHub.\x20Run\x20\x27/github\x20login\x27\x20first.','stringify','owner','utf-8','headers','/git/ref/heads/','from','total_count','/contents/','refs/heads/','2022-11-28','GitHub\x20API\x20error:\x20','base64','/pulls','/installation/repositories?per_page=1','/comments','GitHub\x20App','status','170729QWqhrx','/repos/','login','open','PUT','main','object','length','9664USighb','&per_page=50','923370gicrOg','22292jGELMT','380446aIlHXo','/git/refs','/user/repos?per_page=100&sort=updated','3hOGRBm','Bearer\x20','2233zFWgAj','1087494hDtnvE','text'];a15_0x3e03=function(){return _0x9ffa8f;};return a15_0x3e03();}import{getGitHubToken}from'./auth.js';async function githubRequest(_0x3b1df6,_0xc7f345={}){const _0x1830a2=a15_0x5af0,_0x105272=await getGitHubToken();if(!_0x105272)throw new Error(_0x1830a2(0x201));const _0x1a5eef=await fetch('https://api.github.com'+_0x3b1df6,{..._0xc7f345,'headers':{'Authorization':_0x1830a2(0x1fa)+_0x105272,'Accept':'application/vnd.github+json','X-GitHub-Api-Version':_0x1830a2(0x1e2),..._0xc7f345[_0x1830a2(0x205)]}});if(!_0x1a5eef['ok']){const _0x3ff777=await _0x1a5eef[_0x1830a2(0x1fd)]();throw new Error(_0x1830a2(0x1e3)+_0x1a5eef[_0x1830a2(0x1e9)]+'\x20-\x20'+_0x3ff777);}return _0x1a5eef['json']();}function a15_0x5af0(_0x269265,_0x10b0d5){_0x269265=_0x269265-0x1e1;const _0x3e03fe=a15_0x3e03();let _0x5af0a6=_0x3e03fe[_0x269265];return _0x5af0a6;}export async function listRepos(){const _0x69c1ed=a15_0x5af0;return githubRequest(_0x69c1ed(0x1f8));}export async function getRepo(_0x3e464f,_0x50c428){const _0x5b7c49=a15_0x5af0;return githubRequest(_0x5b7c49(0x1eb)+_0x3e464f+'/'+_0x50c428);}export async function readFile(_0x933552,_0x1bd21c,_0x484700,_0x524826=a15_0x44c299(0x1ef)){const _0x3bdb3e=a15_0x44c299,_0x214581=await githubRequest('/repos/'+_0x933552+'/'+_0x1bd21c+_0x3bdb3e(0x209)+_0x484700+'?ref='+_0x524826),_0x1b266e=Buffer[_0x3bdb3e(0x207)](_0x214581['content'],_0x3bdb3e(0x1e4))['toString'](_0x3bdb3e(0x204));return _0x1b266e;}export async function createOrUpdateFile(_0x784c83,_0x2fb25b,_0x538e18,_0x3596d6,_0x48207b,_0x2fd905=a15_0x44c299(0x1ef),_0x22c779){const _0x3b9ecb=a15_0x44c299,_0x3daf80=Buffer[_0x3b9ecb(0x207)](_0x3596d6)[_0x3b9ecb(0x1ff)](_0x3b9ecb(0x1e4));return githubRequest(_0x3b9ecb(0x1eb)+_0x784c83+'/'+_0x2fb25b+_0x3b9ecb(0x209)+_0x538e18,{'method':_0x3b9ecb(0x1ee),'body':JSON[_0x3b9ecb(0x202)]({'message':_0x48207b,'content':_0x3daf80,'branch':_0x2fd905,..._0x22c779&&{'sha':_0x22c779}})});}export async function createPullRequest(_0x21a7d1,_0x466d9f,_0x5f18e6,_0x2f24b9,_0x5bbe7f='main',_0xc39c3c){const _0x3f9751=a15_0x44c299;return githubRequest(_0x3f9751(0x1eb)+_0x21a7d1+'/'+_0x466d9f+_0x3f9751(0x1e5),{'method':'POST','body':JSON[_0x3f9751(0x202)]({'title':_0x5f18e6,'head':_0x2f24b9,'base':_0x5bbe7f,'body':_0xc39c3c||''})});}export async function listPullRequests(_0x1f1d57,_0x2ab59e,_0x55748b=a15_0x44c299(0x1ed)){const _0x540d46=a15_0x44c299;return githubRequest(_0x540d46(0x1eb)+_0x1f1d57+'/'+_0x2ab59e+'/pulls?state='+_0x55748b+_0x540d46(0x1f3));}export async function commentOnPR(_0x1c94e5,_0x1160a9,_0x5d8bcc,_0x12631e){const _0x3de263=a15_0x44c299;return githubRequest(_0x3de263(0x1eb)+_0x1c94e5+'/'+_0x1160a9+'/issues/'+_0x5d8bcc+_0x3de263(0x1e7),{'method':'POST','body':JSON[_0x3de263(0x202)]({'body':_0x12631e})});}export async function createBranch(_0x160e5c,_0x55dff1,_0x55a277,_0x4916c7=a15_0x44c299(0x1ef)){const _0x35eb84=a15_0x44c299,_0x1061c1=await githubRequest('/repos/'+_0x160e5c+'/'+_0x55dff1+_0x35eb84(0x206)+_0x4916c7);return githubRequest(_0x35eb84(0x1eb)+_0x160e5c+'/'+_0x55dff1+_0x35eb84(0x1f7),{'method':'POST','body':JSON[_0x35eb84(0x202)]({'ref':_0x35eb84(0x1e1)+_0x55a277,'sha':_0x1061c1[_0x35eb84(0x1f0)]['sha']})});}export async function getAppStatus(){const _0x1b605b=a15_0x44c299;try{const _0x3eb13c=await githubRequest(_0x1b605b(0x1e6)),_0x48d558=_0x3eb13c[_0x1b605b(0x208)];let _0x40c455=_0x1b605b(0x1e8);return _0x3eb13c[_0x1b605b(0x200)]&&_0x3eb13c[_0x1b605b(0x200)][_0x1b605b(0x1f1)]>0x0&&(_0x40c455=_0x3eb13c[_0x1b605b(0x200)][0x0][_0x1b605b(0x203)][_0x1b605b(0x1ec)]),{'valid':!![],'repoCount':_0x48d558,'accountName':_0x40c455};}catch(_0x5feb16){throw _0x5feb16;}}
@@ -1 +1 @@
1
- const a16_0x2b22d2=a16_0x3c7d;function a16_0x3c7d(_0xb5944a,_0x22c1f8){_0xb5944a=_0xb5944a-0x11b;const _0x38d65b=a16_0x38d6();let _0x3c7d32=_0x38d65b[_0xb5944a];return _0x3c7d32;}(function(_0x11f008,_0x455c4f){const _0x365a64=a16_0x3c7d,_0x20e582=_0x11f008();while(!![]){try{const _0xa647fe=parseInt(_0x365a64(0x12b))/0x1+-parseInt(_0x365a64(0x12d))/0x2*(-parseInt(_0x365a64(0x125))/0x3)+-parseInt(_0x365a64(0x12f))/0x4*(parseInt(_0x365a64(0x131))/0x5)+parseInt(_0x365a64(0x130))/0x6+-parseInt(_0x365a64(0x11d))/0x7+-parseInt(_0x365a64(0x135))/0x8+parseInt(_0x365a64(0x11f))/0x9;if(_0xa647fe===_0x455c4f)break;else _0x20e582['push'](_0x20e582['shift']());}catch(_0x377682){_0x20e582['push'](_0x20e582['shift']());}}}(a16_0x38d6,0xa0be6));import{promises as a16_0x47d1cf}from'fs';import{join}from'path';import{createAppAuth}from'@octokit/auth-app';import{homedir}from'os';const GLOBAL_CONFIG_DIR=join(homedir(),a16_0x2b22d2(0x122)),CONFIG_FILE=join(GLOBAL_CONFIG_DIR,a16_0x2b22d2(0x124)),KEY_FILE=join(GLOBAL_CONFIG_DIR,a16_0x2b22d2(0x137));let appAuth=null,installationToken=null;async function getGitHubAppConfig(){const _0x53e211=a16_0x2b22d2;try{const _0x46c10e=await a16_0x47d1cf['access'](CONFIG_FILE)[_0x53e211(0x12c)](()=>!![])[_0x53e211(0x12e)](()=>![]),_0x19f0c1=await a16_0x47d1cf['access'](KEY_FILE)[_0x53e211(0x12c)](()=>!![])[_0x53e211(0x12e)](()=>![]);if(!_0x46c10e||!_0x19f0c1)return null;const _0x1a3c09=await a16_0x47d1cf[_0x53e211(0x127)](CONFIG_FILE,_0x53e211(0x128)),{appId:_0x28f11a,installationId:_0x5068ef}=JSON[_0x53e211(0x123)](_0x1a3c09),_0x2f9fe1=await a16_0x47d1cf[_0x53e211(0x127)](KEY_FILE,_0x53e211(0x128));if(!_0x28f11a||!_0x5068ef||!_0x2f9fe1)return null;return{'appId':_0x28f11a,'privateKey':_0x2f9fe1,'installationId':_0x5068ef};}catch(_0x348555){return null;}}async function initAppAuth(){const _0x21c41a=a16_0x2b22d2;if(appAuth)return;const _0x328565=await getGitHubAppConfig();if(!_0x328565)throw new Error(_0x21c41a(0x132));appAuth=createAppAuth({'appId':_0x328565[_0x21c41a(0x138)],'privateKey':_0x328565[_0x21c41a(0x11c)],'installationId':_0x328565[_0x21c41a(0x134)]});}async function getInstallationToken(){const _0x2dd86f=a16_0x2b22d2;await initAppAuth();if(installationToken&&installationToken[_0x2dd86f(0x121)]>new Date())return installationToken['token'];const {token:_0x28fb55,expiresAt:_0x42f560}=await appAuth({'type':_0x2dd86f(0x13b)});return installationToken={'token':_0x28fb55,'expiresAt':new Date(_0x42f560)},_0x28fb55;}export async function getGitHubToken(){const _0x7e0447=a16_0x2b22d2;try{return await getInstallationToken();}catch(_0x52c0f0){return console[_0x7e0447(0x13a)](_0x7e0447(0x139),_0x52c0f0),null;}}function a16_0x38d6(){const _0x48cbf4=['❌\x20Authentication\x20failed:','1286851MTsfUV','then','2kxoBYO','catch','2396MdgLHg','2778744YltFun','7245dKXwtO','GitHub\x20App\x20not\x20configured.\x20Run\x20/github\x20setup','✓\x20GitHub\x20App\x20authenticated!','installationId','9114704vnLswx','Error\x20clearing\x20session:','github-app.pem','appId','GitHub\x20App\x20auth\x20failed:','error','installation','✓\x20GitHub\x20session\x20cleared','privateKey','2232734LuhDmy','unlink','9160668ReTkpx','Run\x20/github\x20setup\x20to\x20configure\x20automatically','expiresAt','.woozlit','parse','github-app-config.json','650490IbAwMb','log','readFile','utf8','You\x20can\x20now\x20access\x20private\x20repositories'];a16_0x38d6=function(){return _0x48cbf4;};return a16_0x38d6();}export async function isGitHubAuthenticated(){const _0x3caafe=await getGitHubAppConfig();return _0x3caafe!==null;}export async function loginGitHub(){const _0x50b220=a16_0x2b22d2,_0x46a419=await getGitHubAppConfig();if(!_0x46a419){console[_0x50b220(0x126)]('\x0a❌\x20GitHub\x20App\x20not\x20configured'),console[_0x50b220(0x126)](_0x50b220(0x120));return;}try{const _0x3b8764=await getInstallationToken();console[_0x50b220(0x126)](_0x50b220(0x133)),console[_0x50b220(0x126)](_0x50b220(0x129));}catch(_0x380ec8){console[_0x50b220(0x13a)](_0x50b220(0x12a),_0x380ec8),console[_0x50b220(0x126)]('Try\x20running\x20/github\x20setup\x20again');}}export async function logoutGitHub(){const _0x48dd57=a16_0x2b22d2;try{await a16_0x47d1cf[_0x48dd57(0x11e)](CONFIG_FILE)[_0x48dd57(0x12e)](()=>{}),await a16_0x47d1cf[_0x48dd57(0x11e)](KEY_FILE)['catch'](()=>{}),installationToken=null,appAuth=null,console[_0x48dd57(0x126)](_0x48dd57(0x11b));}catch(_0x309a41){console[_0x48dd57(0x13a)](_0x48dd57(0x136),_0x309a41);}}
1
+ const a16_0x4943b7=a16_0x3ea9;(function(_0x301f7c,_0xf1bacb){const _0x3096fa=a16_0x3ea9,_0x291653=_0x301f7c();while(!![]){try{const _0x3d2bb0=parseInt(_0x3096fa(0x93))/0x1*(parseInt(_0x3096fa(0x87))/0x2)+parseInt(_0x3096fa(0x8b))/0x3+parseInt(_0x3096fa(0x8c))/0x4*(-parseInt(_0x3096fa(0x95))/0x5)+-parseInt(_0x3096fa(0x8f))/0x6*(parseInt(_0x3096fa(0x88))/0x7)+-parseInt(_0x3096fa(0x94))/0x8+-parseInt(_0x3096fa(0x9a))/0x9*(-parseInt(_0x3096fa(0x91))/0xa)+parseInt(_0x3096fa(0x84))/0xb;if(_0x3d2bb0===_0xf1bacb)break;else _0x291653['push'](_0x291653['shift']());}catch(_0x3d176e){_0x291653['push'](_0x291653['shift']());}}}(a16_0x390b,0x7a9b1));import{promises as a16_0x4ce13e}from'fs';import{join}from'path';import{createAppAuth}from'@octokit/auth-app';import{homedir}from'os';const GLOBAL_CONFIG_DIR=join(homedir(),a16_0x4943b7(0x86)),CONFIG_FILE=join(GLOBAL_CONFIG_DIR,'github-app-config.json'),KEY_FILE=join(GLOBAL_CONFIG_DIR,a16_0x4943b7(0x96));let appAuth=null,installationToken=null;async function getGitHubAppConfig(){const _0x3c602b=a16_0x4943b7;try{const _0x350d10=await a16_0x4ce13e[_0x3c602b(0x9b)](CONFIG_FILE)[_0x3c602b(0x9d)](()=>!![])['catch'](()=>![]),_0x440bd3=await a16_0x4ce13e[_0x3c602b(0x9b)](KEY_FILE)[_0x3c602b(0x9d)](()=>!![])[_0x3c602b(0x8e)](()=>![]);if(!_0x350d10||!_0x440bd3)return null;const _0x4c2d4b=await a16_0x4ce13e[_0x3c602b(0x98)](CONFIG_FILE,_0x3c602b(0x85)),{appId:_0x501dd3,installationId:_0x2fae04}=JSON[_0x3c602b(0x9e)](_0x4c2d4b),_0x17a58f=await a16_0x4ce13e[_0x3c602b(0x98)](KEY_FILE,_0x3c602b(0x85));if(!_0x501dd3||!_0x2fae04||!_0x17a58f)return null;return{'appId':_0x501dd3,'privateKey':_0x17a58f,'installationId':_0x2fae04};}catch(_0xf0db22){return null;}}async function initAppAuth(){const _0x412770=a16_0x4943b7;if(appAuth)return;const _0x2a9a74=await getGitHubAppConfig();if(!_0x2a9a74)throw new Error(_0x412770(0x89));appAuth=createAppAuth({'appId':_0x2a9a74['appId'],'privateKey':_0x2a9a74[_0x412770(0x9c)],'installationId':_0x2a9a74[_0x412770(0x8a)]});}function a16_0x3ea9(_0x4da245,_0x5f5533){_0x4da245=_0x4da245-0x81;const _0x390ba1=a16_0x390b();let _0x3ea9fb=_0x390ba1[_0x4da245];return _0x3ea9fb;}async function getInstallationToken(){const _0x3e8e0d=a16_0x4943b7;await initAppAuth();if(installationToken&&installationToken['expiresAt']>new Date())return installationToken['token'];const {token:_0x4586cd,expiresAt:_0x2ca6e3}=await appAuth({'type':_0x3e8e0d(0x99)});return installationToken={'token':_0x4586cd,'expiresAt':new Date(_0x2ca6e3)},_0x4586cd;}function a16_0x390b(){const _0x5db539=['catch','3639942FqLPYj','unlink','20TeQfpQ','error','19763mmvFhU','3165320lsgdmb','2059760FmqAhl','github-app.pem','You\x20can\x20now\x20access\x20private\x20repositories','readFile','installation','1021797uQOgTN','access','privateKey','then','parse','log','\x0a❌\x20GitHub\x20App\x20not\x20configured','✓\x20GitHub\x20session\x20cleared','14430614mCtokb','utf8','.woozlit','44ZDApoB','7JKzeKt','GitHub\x20App\x20not\x20configured.\x20Run\x20/github\x20setup','installationId','1064079qPjbdf','8rRceWN','❌\x20Authentication\x20failed:'];a16_0x390b=function(){return _0x5db539;};return a16_0x390b();}export async function getGitHubToken(){const _0x3daae8=a16_0x4943b7;try{return await getInstallationToken();}catch(_0x31ecf9){return console[_0x3daae8(0x92)]('GitHub\x20App\x20auth\x20failed:',_0x31ecf9),null;}}export async function isGitHubAuthenticated(){const _0x5b96eb=await getGitHubAppConfig();return _0x5b96eb!==null;}export async function loginGitHub(){const _0x4007b9=a16_0x4943b7,_0x30382e=await getGitHubAppConfig();if(!_0x30382e){console[_0x4007b9(0x81)](_0x4007b9(0x82)),console[_0x4007b9(0x81)]('Run\x20/github\x20setup\x20to\x20configure\x20automatically');return;}try{const _0x365e06=await getInstallationToken();console[_0x4007b9(0x81)]('✓\x20GitHub\x20App\x20authenticated!'),console[_0x4007b9(0x81)](_0x4007b9(0x97));}catch(_0x18d502){console['error'](_0x4007b9(0x8d),_0x18d502),console[_0x4007b9(0x81)]('Try\x20running\x20/github\x20setup\x20again');}}export async function logoutGitHub(){const _0x3a7e94=a16_0x4943b7;try{await a16_0x4ce13e[_0x3a7e94(0x90)](CONFIG_FILE)[_0x3a7e94(0x8e)](()=>{}),await a16_0x4ce13e[_0x3a7e94(0x90)](KEY_FILE)[_0x3a7e94(0x8e)](()=>{}),installationToken=null,appAuth=null,console[_0x3a7e94(0x81)](_0x3a7e94(0x83));}catch(_0x26718c){console[_0x3a7e94(0x92)]('Error\x20clearing\x20session:',_0x26718c);}}
@@ -1 +1 @@
1
- function a17_0x3b61(_0x5640c3,_0x141878){_0x5640c3=_0x5640c3-0xf2;const _0xb90124=a17_0xb901();let _0x3b61f5=_0xb90124[_0x5640c3];return _0x3b61f5;}(function(_0x411c23,_0x146227){const _0x1616cc=a17_0x3b61,_0x56b0a7=_0x411c23();while(!![]){try{const _0x23460f=-parseInt(_0x1616cc(0x118))/0x1+parseInt(_0x1616cc(0x108))/0x2*(parseInt(_0x1616cc(0xfa))/0x3)+parseInt(_0x1616cc(0x112))/0x4+-parseInt(_0x1616cc(0x134))/0x5*(parseInt(_0x1616cc(0x120))/0x6)+-parseInt(_0x1616cc(0xf9))/0x7*(parseInt(_0x1616cc(0xfb))/0x8)+parseInt(_0x1616cc(0xf8))/0x9+parseInt(_0x1616cc(0x11c))/0xa*(parseInt(_0x1616cc(0xfe))/0xb);if(_0x23460f===_0x146227)break;else _0x56b0a7['push'](_0x56b0a7['shift']());}catch(_0x3c7fa3){_0x56b0a7['push'](_0x56b0a7['shift']());}}}(a17_0xb901,0x4b5e8));import{promises as a17_0x56cca9}from'fs';import{join}from'path';import*as a17_0x2f5360 from'../ui/output.js';import{createServer}from'http';import a17_0x1fe986 from'open';import{homedir}from'os';import{createAppAuth}from'@octokit/auth-app';import{input}from'@inquirer/prompts';async function createGitHubAppManifestFlow(){return new Promise(async(_0xccb0d4,_0x13dded)=>{const _0x372571=a17_0x3b61;let _0x45e807=![];const _0x56effb=createServer(async(_0xbf782b,_0xe12067)=>{const _0x52763a=a17_0x3b61;if(_0xbf782b[_0x52763a(0x11e)]===_0x52763a(0x10d)){_0xe12067[_0x52763a(0xff)](0x194),_0xe12067[_0x52763a(0x12a)]();return;}a17_0x2f5360[_0x52763a(0x100)](_0x52763a(0x10b)+_0xbf782b[_0x52763a(0x11b)]+'\x20'+_0xbf782b[_0x52763a(0x11e)]);const _0x1ade11=new URL(_0xbf782b[_0x52763a(0x11e)]||'/',_0x52763a(0x12e)),_0x350559=_0x1ade11[_0x52763a(0x124)][_0x52763a(0x111)](_0x52763a(0x12d));_0x350559?(_0xe12067[_0x52763a(0xff)](0xc8,{'Content-Type':_0x52763a(0x13a)}),_0xe12067[_0x52763a(0x12a)](_0x52763a(0x10a)),_0xe12067[_0x52763a(0x142)](),!_0x45e807&&(_0x45e807=!![],_0x56effb['close'](),_0x4c2a78(_0x350559))):(_0xe12067['writeHead'](0x190),_0xe12067['end'](_0x52763a(0xfc)));}),_0x4c2a78=async _0x5b7692=>{const _0x171286=a17_0x3b61;try{a17_0x2f5360[_0x171286(0x101)](_0x171286(0x104));const _0x58e75d=await fetch(_0x171286(0x11f)+_0x5b7692+_0x171286(0x140),{'method':_0x171286(0xf4),'headers':{'Accept':_0x171286(0x115)}});if(!_0x58e75d['ok'])throw new Error('Failed\x20to\x20exchange\x20code:\x20'+await _0x58e75d[_0x171286(0x135)]());const _0x2e7299=await _0x58e75d[_0x171286(0x132)]();_0xccb0d4(_0x2e7299);}catch(_0x32e36e){_0x13dded(_0x32e36e);}};_0x56effb[_0x372571(0x125)](0xbb8,_0x372571(0x123),async()=>{const _0x80e0d6=_0x372571,_0x29419e={'name':_0x80e0d6(0x136)+Date['now'](),'url':'http://127.0.0.1:3000','hook_attributes':{'url':_0x80e0d6(0x13b)},'redirect_url':_0x80e0d6(0x103),'public':![],'default_permissions':{'contents':_0x80e0d6(0xf5),'pull_requests':_0x80e0d6(0xf5),'metadata':_0x80e0d6(0x11a)},'default_events':[]},_0x525662=new URLSearchParams({'manifest':JSON[_0x80e0d6(0x130)](_0x29419e)}),_0xc9428c=_0x80e0d6(0x119)+_0x525662['toString']();a17_0x2f5360['info'](_0x80e0d6(0x12b)),a17_0x2f5360[_0x80e0d6(0x100)](_0x80e0d6(0x143)+_0xc9428c);try{await a17_0x1fe986(_0xc9428c),a17_0x2f5360['success'](_0x80e0d6(0xf3)),a17_0x2f5360[_0x80e0d6(0x101)](_0x80e0d6(0x107)),a17_0x2f5360['dim'](_0x80e0d6(0x138));try{const _0x47c8c4=await input({'message':'Paste\x20code\x20(or\x20wait\x20for\x20automatic\x20redirect):','transformer':_0x1d75ed=>_0x1d75ed[_0x80e0d6(0x13c)]()});_0x47c8c4&&!_0x45e807&&(_0x45e807=!![],_0x56effb['close'](),_0x4c2a78(_0x47c8c4));}catch(_0x355d3e){}}catch(_0x4c5d68){a17_0x2f5360['error'](_0x80e0d6(0x122)),a17_0x2f5360[_0x80e0d6(0x101)](_0x80e0d6(0x126)+_0xc9428c);}}),_0x56effb['on'](_0x372571(0x10c),_0x5aec0f=>{const _0x2ae969=_0x372571;a17_0x2f5360[_0x2ae969(0x10c)]('Server\x20error:\x20'+_0x5aec0f),_0x13dded(_0x5aec0f);});});}function a17_0xb901(){const _0x1e5cad=['127.0.0.1','searchParams','listen','Please\x20visit\x20this\x20URL\x20manually:\x0a','\x0aStep\x203:\x20Checking\x20installation...','.woozlit','Could\x20not\x20find\x20installation.\x20Please\x20try\x20again.','end','Step\x201:\x20Opening\x20GitHub\x20to\x20create\x20App...','utf8','code','http://127.0.0.1:3000','length','stringify','exit','json','GitHub\x20App\x20Auto-Setup','10NNMvdK','text','Woozlit\x20CLI\x20','pem','(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)','/app/installations','text/html','http://127.0.0.1:3000/webhook','trim','\x0aStep\x204:\x20Saving\x20configuration...','App\x20created\x20but\x20not\x20installed\x20yet.','App\x20ID:\x20','/conversions','header','destroy','Url:\x20','hook','Browser\x20opened!\x20Please\x20click\x20\x22Create\x20GitHub\x20App\x22\x20on\x20the\x20page.','POST','write','once','GET','1402470CElZiP','1104229QmrgxI','397752jUIFVs','8HotxUa','No\x20code\x20found','✓\x20App\x20installed!','22JovWXt','writeHead','dim','info','App\x20Name:\x20','http://127.0.0.1:3000/callback','\x0aStep\x202:\x20Registering\x20GitHub\x20App...','writeFile','/installations/new','\x0awaiting\x20for\x20browser\x20callback...','2wKlvTQ','Opened:\x20','<h1>Setup\x20Complete!</h1><p>You\x20can\x20close\x20this\x20tab\x20and\x20return\x20to\x20the\x20terminal.</p>','Received\x20request:\x20','error','/favicon.ico','Please\x20install\x20the\x20app\x20on\x20your\x20account/repositories.','html_url','success','get','2368064QwigfN','mkdir','access','application/vnd.github+json','data','\x0aSetup\x20failed:\x20','149169Gqqfyw','https://github.com/settings/apps/new?','read','method','571380XNXOWw','stdin','url','https://api.github.com/app-manifests/','1137234qaWvWD','github-app-config.json','Failed\x20to\x20open\x20browser\x20automatically.'];a17_0xb901=function(){return _0x1e5cad;};return a17_0xb901();}async function saveConfig(_0x1b1976,_0x140669,_0xd9616d){const _0x2d2b6c=a17_0x3b61,_0x5daa65=join(homedir(),_0x2d2b6c(0x128));try{await a17_0x56cca9[_0x2d2b6c(0x114)](_0x5daa65);}catch{await a17_0x56cca9[_0x2d2b6c(0x113)](_0x5daa65,{'recursive':!![]});}const _0x473d12=join(_0x5daa65,_0x2d2b6c(0x121)),_0x1d5876=join(_0x5daa65,'github-app.pem');await a17_0x56cca9[_0x2d2b6c(0x105)](_0x1d5876,_0x140669,_0x2d2b6c(0x12c)),await a17_0x56cca9[_0x2d2b6c(0x105)](_0x473d12,JSON[_0x2d2b6c(0x130)]({'appId':_0x1b1976,'installationId':_0xd9616d},null,0x2),_0x2d2b6c(0x12c));}async function installAppIfNeeded(_0x1cd9f5){const _0x14c5e9=a17_0x3b61;a17_0x2f5360[_0x14c5e9(0x101)](_0x14c5e9(0x127));const _0x244839=createAppAuth({'appId':_0x1cd9f5['id'],'privateKey':_0x1cd9f5[_0x14c5e9(0x137)]});try{const {data:_0x5c7a86}=await _0x244839[_0x14c5e9(0xf2)]((_0x48a809,_0xb0b114)=>_0x48a809(_0xb0b114),{'method':_0x14c5e9(0xf7),'url':'/app/installations'});if(_0x5c7a86&&_0x5c7a86[_0x14c5e9(0x12f)]>0x0)return _0x5c7a86[0x0]['id'];}catch(_0x155d0a){}a17_0x2f5360[_0x14c5e9(0x101)](_0x14c5e9(0x13e)),a17_0x2f5360['info'](_0x14c5e9(0x10e));const _0x4d3555=_0x1cd9f5[_0x14c5e9(0x10f)]+_0x14c5e9(0x106);await a17_0x1fe986(_0x4d3555),a17_0x2f5360[_0x14c5e9(0x101)](_0x14c5e9(0x109)+_0x4d3555),a17_0x2f5360[_0x14c5e9(0x101)]('Press\x20Enter\x20after\x20you\x20have\x20installed\x20the\x20app...'),await new Promise(_0x368d96=>process[_0x14c5e9(0x11d)][_0x14c5e9(0xf6)](_0x14c5e9(0x116),_0x368d96));const _0x361534=createAppAuth({'appId':_0x1cd9f5['id'],'privateKey':_0x1cd9f5['pem']}),{data:_0x2211d8}=await _0x361534[_0x14c5e9(0xf2)]((_0x21d93,_0x259150)=>_0x21d93(_0x259150),{'method':_0x14c5e9(0xf7),'url':_0x14c5e9(0x139)});if(_0x2211d8&&_0x2211d8[_0x14c5e9(0x12f)]>0x0)return _0x2211d8[0x0]['id'];throw new Error(_0x14c5e9(0x129));}export async function autoSetupGitHub(){const _0x5d462e=a17_0x3b61;a17_0x2f5360[_0x5d462e(0x141)](_0x5d462e(0x133)),a17_0x2f5360['dim']('This\x20will\x20create\x20a\x20GitHub\x20App\x20automatically\x20via\x20Manifest\x20Flow\x0a');try{const _0x2553eb=await createGitHubAppManifestFlow();a17_0x2f5360[_0x5d462e(0x110)]('\x0a✓\x20GitHub\x20App\x20created!');const _0x5f0da9=await installAppIfNeeded(_0x2553eb);a17_0x2f5360[_0x5d462e(0x110)](_0x5d462e(0xfd)),a17_0x2f5360['info'](_0x5d462e(0x13d)),await saveConfig(_0x2553eb['id'],_0x2553eb[_0x5d462e(0x137)],_0x5f0da9),a17_0x2f5360[_0x5d462e(0x110)]('\x0a✓\x20GitHub\x20App\x20setup\x20complete!'),a17_0x2f5360[_0x5d462e(0x100)](_0x5d462e(0x13f)+_0x2553eb['id']),a17_0x2f5360[_0x5d462e(0x100)](_0x5d462e(0x102)+_0x2553eb['name']),a17_0x2f5360[_0x5d462e(0x100)]('Configuration\x20saved\x20globally\x20to\x20~/.woozlit/'),a17_0x2f5360[_0x5d462e(0x110)]('You\x20can\x20now\x20access\x20private\x20repositories!');}catch(_0x346f69){a17_0x2f5360['error'](_0x5d462e(0x117)+_0x346f69),a17_0x2f5360['dim']('\x0aYou\x20can\x20try\x20manual\x20setup\x20with:\x20/github\x20manual'),process[_0x5d462e(0x131)](0x1);}}
1
+ (function(_0x136d05,_0x5332eb){const _0x1d90ae=a17_0x1b38,_0x5d9f3b=_0x136d05();while(!![]){try{const _0x31aa18=-parseInt(_0x1d90ae(0xff))/0x1*(parseInt(_0x1d90ae(0x10c))/0x2)+-parseInt(_0x1d90ae(0xfe))/0x3*(parseInt(_0x1d90ae(0x141))/0x4)+-parseInt(_0x1d90ae(0x113))/0x5*(-parseInt(_0x1d90ae(0x11a))/0x6)+parseInt(_0x1d90ae(0x134))/0x7*(parseInt(_0x1d90ae(0x13e))/0x8)+parseInt(_0x1d90ae(0x130))/0x9+parseInt(_0x1d90ae(0x128))/0xa*(parseInt(_0x1d90ae(0x108))/0xb)+parseInt(_0x1d90ae(0x12b))/0xc*(parseInt(_0x1d90ae(0x101))/0xd);if(_0x31aa18===_0x5332eb)break;else _0x5d9f3b['push'](_0x5d9f3b['shift']());}catch(_0x33aea2){_0x5d9f3b['push'](_0x5d9f3b['shift']());}}}(a17_0x2ba8,0x3b8a9));import{promises as a17_0x37a479}from'fs';import{join}from'path';import*as a17_0x34a902 from'../ui/output.js';import{createServer}from'http';function a17_0x1b38(_0x54d7d7,_0x312b98){_0x54d7d7=_0x54d7d7-0xfa;const _0x2ba8ea=a17_0x2ba8();let _0x1b3890=_0x2ba8ea[_0x54d7d7];return _0x1b3890;}import a17_0x565286 from'open';function a17_0x2ba8(){const _0x32041b=['3QHTlMy','184341lKzzFB','Opened:\x20','2067767hgJetq','\x0a✓\x20GitHub\x20App\x20created!','App\x20Name:\x20','GitHub\x20App\x20Auto-Setup','✓\x20App\x20installed!','App\x20ID:\x20','POST','15983zMUZFH','toString','listen','<h1>Setup\x20Complete!</h1><p>You\x20can\x20close\x20this\x20tab\x20and\x20return\x20to\x20the\x20terminal.</p>','2mtWaRz','url','utf8','stdin','data','Press\x20Enter\x20after\x20you\x20have\x20installed\x20the\x20app...','once','195055mioUtr','application/vnd.github+json','https://github.com/settings/apps/new?','127.0.0.1','Browser\x20opened!\x20Please\x20click\x20\x22Create\x20GitHub\x20App\x22\x20on\x20the\x20page.','json','http://127.0.0.1:3000/callback','12dpLMZp','Woozlit\x20CLI\x20','Please\x20visit\x20this\x20URL\x20manually:\x0a','now','\x0aSetup\x20failed:\x20','pem','\x0aStep\x203:\x20Checking\x20installation...','end','writeFile','http://127.0.0.1:3000/webhook','text','github-app-config.json','dim','close','20QOjXOS','.woozlit','mkdir','48acryWn','Url:\x20','Server\x20error:\x20','Step\x201:\x20Opening\x20GitHub\x20to\x20create\x20App...','get','117225OgfQGc','html_url','header','hook','8148jTatNr','/app/installations','\x0a✓\x20GitHub\x20App\x20setup\x20complete!','trim','http://127.0.0.1:3000','code','This\x20will\x20create\x20a\x20GitHub\x20App\x20automatically\x20via\x20Manifest\x20Flow\x0a','https://api.github.com/app-manifests/','Received\x20request:\x20','You\x20can\x20now\x20access\x20private\x20repositories!','656wFiiyO','/conversions','GET','1589660oVrPTv','writeHead','github-app.pem','method','\x0awaiting\x20for\x20browser\x20callback...','success','(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)','stringify','error','info','\x0aStep\x202:\x20Registering\x20GitHub\x20App...','write','name','Failed\x20to\x20exchange\x20code:\x20','Failed\x20to\x20open\x20browser\x20automatically.','length','Paste\x20code\x20(or\x20wait\x20for\x20automatic\x20redirect):'];a17_0x2ba8=function(){return _0x32041b;};return a17_0x2ba8();}import{homedir}from'os';import{createAppAuth}from'@octokit/auth-app';import{input}from'@inquirer/prompts';async function createGitHubAppManifestFlow(){return new Promise(async(_0x2f7976,_0x27f194)=>{const _0x376036=a17_0x1b38;let _0x332a11=![];const _0xdf40ef=createServer(async(_0x3cbf6d,_0xd0a362)=>{const _0x3bb79a=a17_0x1b38;if(_0x3cbf6d[_0x3bb79a(0x10d)]==='/favicon.ico'){_0xd0a362[_0x3bb79a(0x142)](0x194),_0xd0a362['end']();return;}a17_0x34a902[_0x3bb79a(0x126)](_0x3bb79a(0x13c)+_0x3cbf6d[_0x3bb79a(0x144)]+'\x20'+_0x3cbf6d[_0x3bb79a(0x10d)]);const _0x1aa30e=new URL(_0x3cbf6d[_0x3bb79a(0x10d)]||'/',_0x3bb79a(0x138)),_0x5dd3fa=_0x1aa30e['searchParams'][_0x3bb79a(0x12f)](_0x3bb79a(0x139));_0x5dd3fa?(_0xd0a362['writeHead'](0xc8,{'Content-Type':'text/html'}),_0xd0a362['end'](_0x3bb79a(0x10b)),_0xd0a362['destroy'](),!_0x332a11&&(_0x332a11=!![],_0xdf40ef[_0x3bb79a(0x127)](),_0x10f399(_0x5dd3fa))):(_0xd0a362[_0x3bb79a(0x142)](0x190),_0xd0a362[_0x3bb79a(0x121)]('No\x20code\x20found'));}),_0x10f399=async _0x1542e6=>{const _0x33c31a=a17_0x1b38;try{a17_0x34a902[_0x33c31a(0x14a)](_0x33c31a(0x14b));const _0x5d00ad=await fetch(_0x33c31a(0x13b)+_0x1542e6+_0x33c31a(0x13f),{'method':_0x33c31a(0x107),'headers':{'Accept':_0x33c31a(0x114)}});if(!_0x5d00ad['ok'])throw new Error(_0x33c31a(0xfa)+await _0x5d00ad[_0x33c31a(0x124)]());const _0x103b33=await _0x5d00ad[_0x33c31a(0x118)]();_0x2f7976(_0x103b33);}catch(_0x574a2c){_0x27f194(_0x574a2c);}};_0xdf40ef[_0x376036(0x10a)](0xbb8,_0x376036(0x116),async()=>{const _0x2c7f7b=_0x376036,_0x4434c6={'name':_0x2c7f7b(0x11b)+Date[_0x2c7f7b(0x11d)](),'url':_0x2c7f7b(0x138),'hook_attributes':{'url':_0x2c7f7b(0x123)},'redirect_url':_0x2c7f7b(0x119),'public':![],'default_permissions':{'contents':'write','pull_requests':_0x2c7f7b(0x14c),'metadata':'read'},'default_events':[]},_0x1a662a=new URLSearchParams({'manifest':JSON[_0x2c7f7b(0x148)](_0x4434c6)}),_0x4ff706=_0x2c7f7b(0x115)+_0x1a662a[_0x2c7f7b(0x109)]();a17_0x34a902[_0x2c7f7b(0x14a)](_0x2c7f7b(0x12e)),a17_0x34a902[_0x2c7f7b(0x126)](_0x2c7f7b(0x12c)+_0x4ff706);try{await a17_0x565286(_0x4ff706),a17_0x34a902[_0x2c7f7b(0x146)](_0x2c7f7b(0x117)),a17_0x34a902[_0x2c7f7b(0x14a)](_0x2c7f7b(0x145)),a17_0x34a902[_0x2c7f7b(0x126)](_0x2c7f7b(0x147));try{const _0x6997f4=await input({'message':_0x2c7f7b(0xfd),'transformer':_0xa59191=>_0xa59191[_0x2c7f7b(0x137)]()});_0x6997f4&&!_0x332a11&&(_0x332a11=!![],_0xdf40ef[_0x2c7f7b(0x127)](),_0x10f399(_0x6997f4));}catch(_0x55c009){}}catch(_0x214541){a17_0x34a902[_0x2c7f7b(0x149)](_0x2c7f7b(0xfb)),a17_0x34a902['info'](_0x2c7f7b(0x11c)+_0x4ff706);}}),_0xdf40ef['on'](_0x376036(0x149),_0x1d404e=>{const _0x4c10ac=_0x376036;a17_0x34a902[_0x4c10ac(0x149)](_0x4c10ac(0x12d)+_0x1d404e),_0x27f194(_0x1d404e);});});}async function saveConfig(_0x2a47ff,_0x1b47bd,_0x540ff5){const _0x5effe1=a17_0x1b38,_0x12223d=join(homedir(),_0x5effe1(0x129));try{await a17_0x37a479['access'](_0x12223d);}catch{await a17_0x37a479[_0x5effe1(0x12a)](_0x12223d,{'recursive':!![]});}const _0xdc0f2b=join(_0x12223d,_0x5effe1(0x125)),_0x5bef94=join(_0x12223d,_0x5effe1(0x143));await a17_0x37a479[_0x5effe1(0x122)](_0x5bef94,_0x1b47bd,_0x5effe1(0x10e)),await a17_0x37a479[_0x5effe1(0x122)](_0xdc0f2b,JSON[_0x5effe1(0x148)]({'appId':_0x2a47ff,'installationId':_0x540ff5},null,0x2),'utf8');}async function installAppIfNeeded(_0x207348){const _0x41583e=a17_0x1b38;a17_0x34a902[_0x41583e(0x14a)](_0x41583e(0x120));const _0x4c2b27=createAppAuth({'appId':_0x207348['id'],'privateKey':_0x207348[_0x41583e(0x11f)]});try{const {data:_0xedd006}=await _0x4c2b27[_0x41583e(0x133)]((_0x5d6fa4,_0x42db7a)=>_0x5d6fa4(_0x42db7a),{'method':_0x41583e(0x140),'url':'/app/installations'});if(_0xedd006&&_0xedd006[_0x41583e(0xfc)]>0x0)return _0xedd006[0x0]['id'];}catch(_0x3d3a65){}a17_0x34a902[_0x41583e(0x14a)]('App\x20created\x20but\x20not\x20installed\x20yet.'),a17_0x34a902[_0x41583e(0x14a)]('Please\x20install\x20the\x20app\x20on\x20your\x20account/repositories.');const _0x29dad0=_0x207348[_0x41583e(0x131)]+'/installations/new';await a17_0x565286(_0x29dad0),a17_0x34a902[_0x41583e(0x14a)](_0x41583e(0x100)+_0x29dad0),a17_0x34a902[_0x41583e(0x14a)](_0x41583e(0x111)),await new Promise(_0x19b889=>process[_0x41583e(0x10f)][_0x41583e(0x112)](_0x41583e(0x110),_0x19b889));const _0xa0030f=createAppAuth({'appId':_0x207348['id'],'privateKey':_0x207348['pem']}),{data:_0x451818}=await _0xa0030f['hook']((_0x508ffc,_0x55f042)=>_0x508ffc(_0x55f042),{'method':_0x41583e(0x140),'url':_0x41583e(0x135)});if(_0x451818&&_0x451818['length']>0x0)return _0x451818[0x0]['id'];throw new Error('Could\x20not\x20find\x20installation.\x20Please\x20try\x20again.');}export async function autoSetupGitHub(){const _0x5a869f=a17_0x1b38;a17_0x34a902[_0x5a869f(0x132)](_0x5a869f(0x104)),a17_0x34a902['dim'](_0x5a869f(0x13a));try{const _0x5ac64e=await createGitHubAppManifestFlow();a17_0x34a902[_0x5a869f(0x146)](_0x5a869f(0x102));const _0x4fcc90=await installAppIfNeeded(_0x5ac64e);a17_0x34a902['success'](_0x5a869f(0x105)),a17_0x34a902[_0x5a869f(0x14a)]('\x0aStep\x204:\x20Saving\x20configuration...'),await saveConfig(_0x5ac64e['id'],_0x5ac64e[_0x5a869f(0x11f)],_0x4fcc90),a17_0x34a902['success'](_0x5a869f(0x136)),a17_0x34a902[_0x5a869f(0x126)](_0x5a869f(0x106)+_0x5ac64e['id']),a17_0x34a902[_0x5a869f(0x126)](_0x5a869f(0x103)+_0x5ac64e[_0x5a869f(0x14d)]),a17_0x34a902[_0x5a869f(0x126)]('Configuration\x20saved\x20globally\x20to\x20~/.woozlit/'),a17_0x34a902[_0x5a869f(0x146)](_0x5a869f(0x13d));}catch(_0x4bd190){a17_0x34a902[_0x5a869f(0x149)](_0x5a869f(0x11e)+_0x4bd190),a17_0x34a902[_0x5a869f(0x126)]('\x0aYou\x20can\x20try\x20manual\x20setup\x20with:\x20/github\x20manual'),process['exit'](0x1);}}
@@ -1 +1 @@
1
- (function(_0x2fce8d,_0x55121d){const _0x1d52e3=a18_0x4707,_0x47d010=_0x2fce8d();while(!![]){try{const _0x3f2d3f=-parseInt(_0x1d52e3(0x1aa))/0x1+parseInt(_0x1d52e3(0x190))/0x2+parseInt(_0x1d52e3(0x18c))/0x3+parseInt(_0x1d52e3(0x18b))/0x4*(-parseInt(_0x1d52e3(0x184))/0x5)+-parseInt(_0x1d52e3(0x180))/0x6+parseInt(_0x1d52e3(0x193))/0x7*(-parseInt(_0x1d52e3(0x195))/0x8)+-parseInt(_0x1d52e3(0x18a))/0x9*(-parseInt(_0x1d52e3(0x19e))/0xa);if(_0x3f2d3f===_0x55121d)break;else _0x47d010['push'](_0x47d010['shift']());}catch(_0x286744){_0x47d010['push'](_0x47d010['shift']());}}}(a18_0x23a9,0x5db88));import*as a18_0x2e82d9 from'../ui/output.js';import{loginGitHub,logoutGitHub,isGitHubAuthenticated}from'./auth.js';import{listRepos}from'./api.js';import{autoSetupGitHub}from'./auto-setup.js';function a18_0x23a9(){const _0x9d44d0=['Failed\x20to\x20fetch\x20repos:\x20','logout','(public)','private','slice','config','Not\x20logged\x20in\x20to\x20GitHub\x20App','header','Access\x20to\x20','setup','\x20more','67907iFZyOK','success','Not\x20logged\x20in.\x20Run\x20\x27/github\x20setup\x27\x20first','2191674GcOnFg','length','createSpinner','\x20repositories','5sjqCgl','./api.js','\x20\x20/github\x20status\x20\x20-\x20Check\x20authentication\x20status','Installed\x20on\x20account:\x20','Fetching\x20repos...','\x20\x20...\x20and\x20','54qEsuvR','2878700zmIGgs','618708IbIMVV','repos','accountName','start','1190662oNamzR','\x20\x20/github\x20logout\x20\x20-\x20Clear\x20GitHub\x20App\x20credentials','Your\x20GitHub\x20Repositories','385vetzHN','dim','6240ayyPum','manual','warn','error','stop','✓\x20Authenticated\x20as\x20GitHub\x20App','\x20\x20/github\x20setup\x20\x20\x20-\x20Auto-create\x20GitHub\x20App\x20(recommended)','forEach','login','1296790bwBCwu'];a18_0x23a9=function(){return _0x9d44d0;};return a18_0x23a9();}function a18_0x4707(_0x138199,_0x3c0dd8){_0x138199=_0x138199-0x180;const _0x23a9eb=a18_0x23a9();let _0x47077c=_0x23a9eb[_0x138199];return _0x47077c;}import{manualSetupGitHub}from'./manual-setup.js';export async function handleGitHubCommand(_0x7374dc){const _0x582ebf=a18_0x4707;if(_0x7374dc===_0x582ebf(0x1a8)){await autoSetupGitHub();return;}if(_0x7374dc===_0x582ebf(0x196)||_0x7374dc===_0x582ebf(0x1a4)){await manualSetupGitHub();return;}if(_0x7374dc===_0x582ebf(0x19d)){await loginGitHub();return;}if(_0x7374dc===_0x582ebf(0x1a0)){await logoutGitHub();return;}if(_0x7374dc==='status'){const _0x16a926=await isGitHubAuthenticated();if(_0x16a926)try{const {getAppStatus:_0x5d69e0}=await import(_0x582ebf(0x185)),_0x4892a1=await _0x5d69e0();a18_0x2e82d9[_0x582ebf(0x1ab)](_0x582ebf(0x19a)),_0x4892a1[_0x582ebf(0x18e)]&&a18_0x2e82d9['info'](_0x582ebf(0x187)+_0x4892a1['accountName']),a18_0x2e82d9[_0x582ebf(0x194)](_0x582ebf(0x1a7)+_0x4892a1['repoCount']+_0x582ebf(0x183));}catch(_0x437cc3){a18_0x2e82d9[_0x582ebf(0x197)]('Token\x20may\x20be\x20invalid\x20or\x20app\x20has\x20no\x20repo\x20access:\x20'+_0x437cc3);}else a18_0x2e82d9[_0x582ebf(0x194)](_0x582ebf(0x1a5));return;}if(_0x7374dc===_0x582ebf(0x18d)){const _0x3375ea=await isGitHubAuthenticated();if(!_0x3375ea){a18_0x2e82d9[_0x582ebf(0x198)](_0x582ebf(0x1ac));return;}a18_0x2e82d9[_0x582ebf(0x1a6)](_0x582ebf(0x192));const _0x4ffc0d=a18_0x2e82d9[_0x582ebf(0x182)](_0x582ebf(0x188));_0x4ffc0d[_0x582ebf(0x18f)]();try{const _0x2b0143=await listRepos();_0x4ffc0d['stop'](),_0x2b0143[_0x582ebf(0x1a3)](0x0,0xa)[_0x582ebf(0x19c)](_0x35c7cb=>{const _0x46232d=_0x582ebf,_0x1ace25=_0x35c7cb[_0x46232d(0x1a2)]?'(private)':_0x46232d(0x1a1);a18_0x2e82d9[_0x46232d(0x194)]('\x20\x20'+_0x35c7cb['full_name']+'\x20'+_0x1ace25);}),_0x2b0143[_0x582ebf(0x181)]>0xa&&a18_0x2e82d9[_0x582ebf(0x194)](_0x582ebf(0x189)+(_0x2b0143[_0x582ebf(0x181)]-0xa)+_0x582ebf(0x1a9));}catch(_0x4bdae5){_0x4ffc0d[_0x582ebf(0x199)](),a18_0x2e82d9[_0x582ebf(0x198)](_0x582ebf(0x19f)+_0x4bdae5);}return;}a18_0x2e82d9['header']('GitHub\x20Commands'),a18_0x2e82d9['dim'](_0x582ebf(0x19b)),a18_0x2e82d9[_0x582ebf(0x194)]('\x20\x20/github\x20login\x20\x20\x20-\x20Test\x20GitHub\x20App\x20authentication'),a18_0x2e82d9[_0x582ebf(0x194)](_0x582ebf(0x191)),a18_0x2e82d9[_0x582ebf(0x194)](_0x582ebf(0x186)),a18_0x2e82d9[_0x582ebf(0x194)]('\x20\x20/github\x20repos\x20\x20\x20-\x20List\x20your\x20repositories\x20(including\x20private)');}
1
+ function a18_0x3800(_0x6f9f8a,_0x56745c){_0x6f9f8a=_0x6f9f8a-0xce;const _0x45995a=a18_0x4599();let _0x38005c=_0x45995a[_0x6f9f8a];return _0x38005c;}(function(_0x5731ec,_0x3fd227){const _0x31b81e=a18_0x3800,_0x3338d6=_0x5731ec();while(!![]){try{const _0x442bfd=-parseInt(_0x31b81e(0xf2))/0x1*(parseInt(_0x31b81e(0xd4))/0x2)+-parseInt(_0x31b81e(0xdf))/0x3+-parseInt(_0x31b81e(0xe5))/0x4+parseInt(_0x31b81e(0xef))/0x5+-parseInt(_0x31b81e(0xd9))/0x6+parseInt(_0x31b81e(0xe7))/0x7*(parseInt(_0x31b81e(0xce))/0x8)+parseInt(_0x31b81e(0xe6))/0x9*(parseInt(_0x31b81e(0xf4))/0xa);if(_0x442bfd===_0x3fd227)break;else _0x3338d6['push'](_0x3338d6['shift']());}catch(_0x4e38e8){_0x3338d6['push'](_0x3338d6['shift']());}}}(a18_0x4599,0x7483c));import*as a18_0x28c64c from'../ui/output.js';import{loginGitHub,logoutGitHub,isGitHubAuthenticated}from'./auth.js';import{listRepos}from'./api.js';import{autoSetupGitHub}from'./auto-setup.js';function a18_0x4599(){const _0x361097=['GitHub\x20Commands','\x20repositories','status','repoCount','Access\x20to\x20','3286955YqRNMB','\x20\x20/github\x20logout\x20\x20-\x20Clear\x20GitHub\x20App\x20credentials','full_name','2004lMeQVZ','length','10ptqVRQ','error','8DawwMI','repos','Token\x20may\x20be\x20invalid\x20or\x20app\x20has\x20no\x20repo\x20access:\x20','./api.js','header','(private)','298BeuptG','Failed\x20to\x20fetch\x20repos:\x20','\x20\x20...\x20and\x20','accountName','stop','2194632UWMzKg','Not\x20logged\x20in\x20to\x20GitHub\x20App','(public)','Your\x20GitHub\x20Repositories','\x20\x20/github\x20repos\x20\x20\x20-\x20List\x20your\x20repositories\x20(including\x20private)','private','1067826cIXzlr','start','config','info','\x20\x20/github\x20setup\x20\x20\x20-\x20Auto-create\x20GitHub\x20App\x20(recommended)','\x20more','34104SugIPp','4889772yToHdO','2137667lvbiNS','dim','login'];a18_0x4599=function(){return _0x361097;};return a18_0x4599();}import{manualSetupGitHub}from'./manual-setup.js';export async function handleGitHubCommand(_0x21a7c5){const _0x5425de=a18_0x3800;if(_0x21a7c5==='setup'){await autoSetupGitHub();return;}if(_0x21a7c5==='manual'||_0x21a7c5===_0x5425de(0xe1)){await manualSetupGitHub();return;}if(_0x21a7c5===_0x5425de(0xe9)){await loginGitHub();return;}if(_0x21a7c5==='logout'){await logoutGitHub();return;}if(_0x21a7c5===_0x5425de(0xec)){const _0x5094a3=await isGitHubAuthenticated();if(_0x5094a3)try{const {getAppStatus:_0x285f30}=await import(_0x5425de(0xd1)),_0x5dfb5b=await _0x285f30();a18_0x28c64c['success']('✓\x20Authenticated\x20as\x20GitHub\x20App'),_0x5dfb5b[_0x5425de(0xd7)]&&a18_0x28c64c[_0x5425de(0xe2)]('Installed\x20on\x20account:\x20'+_0x5dfb5b[_0x5425de(0xd7)]),a18_0x28c64c[_0x5425de(0xe8)](_0x5425de(0xee)+_0x5dfb5b[_0x5425de(0xed)]+_0x5425de(0xeb));}catch(_0x27b32e){a18_0x28c64c['warn'](_0x5425de(0xd0)+_0x27b32e);}else a18_0x28c64c[_0x5425de(0xe8)](_0x5425de(0xda));return;}if(_0x21a7c5===_0x5425de(0xcf)){const _0x129337=await isGitHubAuthenticated();if(!_0x129337){a18_0x28c64c[_0x5425de(0xf5)]('Not\x20logged\x20in.\x20Run\x20\x27/github\x20setup\x27\x20first');return;}a18_0x28c64c[_0x5425de(0xd2)](_0x5425de(0xdc));const _0x284025=a18_0x28c64c['createSpinner']('Fetching\x20repos...');_0x284025[_0x5425de(0xe0)]();try{const _0x423605=await listRepos();_0x284025[_0x5425de(0xd8)](),_0x423605['slice'](0x0,0xa)['forEach'](_0x53de84=>{const _0x393632=_0x5425de,_0x2d54c4=_0x53de84[_0x393632(0xde)]?_0x393632(0xd3):_0x393632(0xdb);a18_0x28c64c[_0x393632(0xe8)]('\x20\x20'+_0x53de84[_0x393632(0xf1)]+'\x20'+_0x2d54c4);}),_0x423605[_0x5425de(0xf3)]>0xa&&a18_0x28c64c[_0x5425de(0xe8)](_0x5425de(0xd6)+(_0x423605[_0x5425de(0xf3)]-0xa)+_0x5425de(0xe4));}catch(_0x205fa2){_0x284025[_0x5425de(0xd8)](),a18_0x28c64c['error'](_0x5425de(0xd5)+_0x205fa2);}return;}a18_0x28c64c[_0x5425de(0xd2)](_0x5425de(0xea)),a18_0x28c64c['dim'](_0x5425de(0xe3)),a18_0x28c64c[_0x5425de(0xe8)]('\x20\x20/github\x20login\x20\x20\x20-\x20Test\x20GitHub\x20App\x20authentication'),a18_0x28c64c['dim'](_0x5425de(0xf0)),a18_0x28c64c[_0x5425de(0xe8)]('\x20\x20/github\x20status\x20\x20-\x20Check\x20authentication\x20status'),a18_0x28c64c[_0x5425de(0xe8)](_0x5425de(0xdd));}
@@ -1 +1 @@
1
- (function(_0x443036,_0x57394b){const _0x3433a0=a19_0x5265,_0x3386b4=_0x443036();while(!![]){try{const _0xa4854b=parseInt(_0x3433a0(0x1e4))/0x1*(-parseInt(_0x3433a0(0x1ff))/0x2)+parseInt(_0x3433a0(0x207))/0x3+-parseInt(_0x3433a0(0x1e9))/0x4+-parseInt(_0x3433a0(0x20a))/0x5*(parseInt(_0x3433a0(0x1e7))/0x6)+-parseInt(_0x3433a0(0x1f4))/0x7*(parseInt(_0x3433a0(0x209))/0x8)+-parseInt(_0x3433a0(0x1ee))/0x9+-parseInt(_0x3433a0(0x1ef))/0xa*(-parseInt(_0x3433a0(0x1e6))/0xb);if(_0xa4854b===_0x57394b)break;else _0x3386b4['push'](_0x3386b4['shift']());}catch(_0x2aecba){_0x3386b4['push'](_0x3386b4['shift']());}}}(a19_0xde91,0x896a6));import{promises as a19_0x336a8c}from'fs';import{join}from'path';import*as a19_0x317f6f from'../ui/output.js';import{homedir}from'os';import{input,editor}from'@inquirer/prompts';function a19_0x5265(_0xaa8022,_0x1a39c2){_0xaa8022=_0xaa8022-0x1e2;const _0xde9104=a19_0xde91();let _0x5265eb=_0xde9104[_0xaa8022];return _0x5265eb;}async function saveConfig(_0xedf887,_0x48d19b,_0x22235a){const _0x534976=a19_0x5265,_0xb3b83c=join(homedir(),_0x534976(0x203));try{await a19_0x336a8c[_0x534976(0x1f2)](_0xb3b83c);}catch{await a19_0x336a8c[_0x534976(0x1f8)](_0xb3b83c,{'recursive':!![]});}const _0x439a7d=join(_0xb3b83c,_0x534976(0x202)),_0x56d1bb=join(_0xb3b83c,_0x534976(0x1ed));await a19_0x336a8c[_0x534976(0x1f5)](_0x56d1bb,_0x48d19b,'utf8'),await a19_0x336a8c[_0x534976(0x1f5)](_0x439a7d,JSON['stringify']({'appId':_0xedf887,'installationId':_0x22235a},null,0x2),_0x534976(0x1f9));}function a19_0xde91(){const _0x283296=['github-app.pem','3359943tnteoV','21797500JWQGpf','error','Private\x20Key\x20(PEM\x20format):','access','BEGIN\x20PRIVATE\x20KEY','672AmSTWQ','writeFile','length','dim','mkdir','utf8','success','warn','\x0aSetup\x20failed:\x20','\x0aFor\x20the\x20Private\x20Key,\x20your\x20default\x20editor\x20will\x20open.','To\x20verify,\x20run:\x20/github\x20status','38FvLoJC','\x0a✓\x20Configuration\x20saved!','Installation\x20ID\x20is\x20required','github-app-config.json','.woozlit','BEGIN\x20RSA\x20PRIVATE\x20KEY','App\x20ID\x20is\x20required','force\x20closed','2023779uySGjT','includes','7832cQQUvz','205UtuTMR','info','Installation\x20ID:','22547QHGYhs','\x0aSaving\x20configuration...','11ycDwyY','122316GznTBZ','Paste\x20the\x20entire\x20content\x20of\x20your\x20.pem\x20file,\x20save,\x20and\x20close.','2239836nZGkjk','GitHub\x20App\x20Manual\x20Configuration','Invalid\x20PEM\x20format','Enter\x20your\x20existing\x20GitHub\x20App\x20credentials\x20manually.\x0a'];a19_0xde91=function(){return _0x283296;};return a19_0xde91();}export async function manualSetupGitHub(){const _0xaa8393=a19_0x5265;a19_0x317f6f['header'](_0xaa8393(0x1ea)),a19_0x317f6f[_0xaa8393(0x1f7)](_0xaa8393(0x1ec));try{const _0x51e880=await input({'message':'App\x20ID:','validate':_0x56789f=>_0x56789f[_0xaa8393(0x1f6)]>0x0?!![]:_0xaa8393(0x205)});a19_0x317f6f[_0xaa8393(0x1e2)](_0xaa8393(0x1fd)),a19_0x317f6f[_0xaa8393(0x1e2)](_0xaa8393(0x1e8)),await new Promise(_0x5d5bf6=>setTimeout(_0x5d5bf6,0x7d0));const _0x4034da=await editor({'message':_0xaa8393(0x1f1),'validate':_0x16e8c6=>_0x16e8c6[_0xaa8393(0x208)](_0xaa8393(0x204))||_0x16e8c6[_0xaa8393(0x208)](_0xaa8393(0x1f3))?!![]:_0xaa8393(0x1eb)}),_0x18aec0=await input({'message':_0xaa8393(0x1e3),'validate':_0x441547=>_0x441547[_0xaa8393(0x1f6)]>0x0?!![]:_0xaa8393(0x201)});a19_0x317f6f[_0xaa8393(0x1e2)](_0xaa8393(0x1e5)),await saveConfig(_0x51e880,_0x4034da,_0x18aec0),a19_0x317f6f[_0xaa8393(0x1fa)](_0xaa8393(0x200)),a19_0x317f6f[_0xaa8393(0x1f7)](_0xaa8393(0x1fe));}catch(_0x1301d2){if(_0x1301d2 instanceof Error&&_0x1301d2['message']['includes'](_0xaa8393(0x206))){a19_0x317f6f[_0xaa8393(0x1fb)]('\x0aSetup\x20cancelled.');return;}a19_0x317f6f[_0xaa8393(0x1f0)](_0xaa8393(0x1fc)+_0x1301d2);}}
1
+ (function(_0x1457b2,_0x6f0ab9){const _0x1615e1=a19_0x2d9f,_0x24acb0=_0x1457b2();while(!![]){try{const _0x41969d=parseInt(_0x1615e1(0x16e))/0x1*(-parseInt(_0x1615e1(0x17a))/0x2)+-parseInt(_0x1615e1(0x169))/0x3+-parseInt(_0x1615e1(0x175))/0x4+-parseInt(_0x1615e1(0x182))/0x5*(parseInt(_0x1615e1(0x16d))/0x6)+-parseInt(_0x1615e1(0x16a))/0x7+-parseInt(_0x1615e1(0x168))/0x8*(-parseInt(_0x1615e1(0x172))/0x9)+parseInt(_0x1615e1(0x183))/0xa;if(_0x41969d===_0x6f0ab9)break;else _0x24acb0['push'](_0x24acb0['shift']());}catch(_0x119daf){_0x24acb0['push'](_0x24acb0['shift']());}}}(a19_0x1690,0x97995));import{promises as a19_0x180c1c}from'fs';import{join}from'path';import*as a19_0x12e8dd from'../ui/output.js';import{homedir}from'os';function a19_0x2d9f(_0x316621,_0xb948a9){_0x316621=_0x316621-0x164;const _0x16903d=a19_0x1690();let _0x2d9f55=_0x16903d[_0x316621];return _0x2d9f55;}import{input,editor}from'@inquirer/prompts';async function saveConfig(_0x28b401,_0x119ba3,_0x5b93ea){const _0x427058=a19_0x2d9f,_0x43248c=join(homedir(),'.woozlit');try{await a19_0x180c1c[_0x427058(0x17c)](_0x43248c);}catch{await a19_0x180c1c[_0x427058(0x166)](_0x43248c,{'recursive':!![]});}const _0x16422c=join(_0x43248c,'github-app-config.json'),_0x316e0c=join(_0x43248c,_0x427058(0x17f));await a19_0x180c1c['writeFile'](_0x316e0c,_0x119ba3,_0x427058(0x178)),await a19_0x180c1c[_0x427058(0x164)](_0x16422c,JSON['stringify']({'appId':_0x28b401,'installationId':_0x5b93ea},null,0x2),_0x427058(0x178));}function a19_0x1690(){const _0x6f788d=['\x0aSetup\x20failed:\x20','access','Invalid\x20PEM\x20format','success','github-app.pem','length','GitHub\x20App\x20Manual\x20Configuration','1185DBELTV','45646360BzxZIw','info','\x0aFor\x20the\x20Private\x20Key,\x20your\x20default\x20editor\x20will\x20open.','header','message','warn','writeFile','App\x20ID:','mkdir','\x0aSetup\x20cancelled.','1750600AGdFzZ','2823564jFtWKE','6987701ACAkAq','force\x20closed','dim','21240TRnIwo','3909YzaEGK','Enter\x20your\x20existing\x20GitHub\x20App\x20credentials\x20manually.\x0a','Installation\x20ID:','To\x20verify,\x20run:\x20/github\x20status','9QwLqmm','BEGIN\x20PRIVATE\x20KEY','\x0a✓\x20Configuration\x20saved!','2315388RGaVdC','Installation\x20ID\x20is\x20required','includes','utf8','Paste\x20the\x20entire\x20content\x20of\x20your\x20.pem\x20file,\x20save,\x20and\x20close.','412lXOflV'];a19_0x1690=function(){return _0x6f788d;};return a19_0x1690();}export async function manualSetupGitHub(){const _0x5d72b2=a19_0x2d9f;a19_0x12e8dd[_0x5d72b2(0x186)](_0x5d72b2(0x181)),a19_0x12e8dd[_0x5d72b2(0x16c)](_0x5d72b2(0x16f));try{const _0x3d1da6=await input({'message':_0x5d72b2(0x165),'validate':_0x538038=>_0x538038[_0x5d72b2(0x180)]>0x0?!![]:'App\x20ID\x20is\x20required'});a19_0x12e8dd['info'](_0x5d72b2(0x185)),a19_0x12e8dd['info'](_0x5d72b2(0x179)),await new Promise(_0x1de42c=>setTimeout(_0x1de42c,0x7d0));const _0x43912d=await editor({'message':'Private\x20Key\x20(PEM\x20format):','validate':_0x3a61d4=>_0x3a61d4[_0x5d72b2(0x177)]('BEGIN\x20RSA\x20PRIVATE\x20KEY')||_0x3a61d4[_0x5d72b2(0x177)](_0x5d72b2(0x173))?!![]:_0x5d72b2(0x17d)}),_0x2dc1ab=await input({'message':_0x5d72b2(0x170),'validate':_0x14480c=>_0x14480c[_0x5d72b2(0x180)]>0x0?!![]:_0x5d72b2(0x176)});a19_0x12e8dd[_0x5d72b2(0x184)]('\x0aSaving\x20configuration...'),await saveConfig(_0x3d1da6,_0x43912d,_0x2dc1ab),a19_0x12e8dd[_0x5d72b2(0x17e)](_0x5d72b2(0x174)),a19_0x12e8dd['dim'](_0x5d72b2(0x171));}catch(_0x1e4492){if(_0x1e4492 instanceof Error&&_0x1e4492[_0x5d72b2(0x187)][_0x5d72b2(0x177)](_0x5d72b2(0x16b))){a19_0x12e8dd[_0x5d72b2(0x188)](_0x5d72b2(0x167));return;}a19_0x12e8dd['error'](_0x5d72b2(0x17b)+_0x1e4492);}}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function a20_0x5785(_0x88f422,_0x2c0f76){_0x88f422=_0x88f422-0xbb;const _0x56684f=a20_0x5668();let _0x578566=_0x56684f[_0x88f422];return _0x578566;}const a20_0x298f7e=a20_0x5785;(function(_0x5db289,_0x588659){const _0xb4b752=a20_0x5785,_0x3aa754=_0x5db289();while(!![]){try{const _0x16a44d=parseInt(_0xb4b752(0x126))/0x1+-parseInt(_0xb4b752(0xed))/0x2+-parseInt(_0xb4b752(0x111))/0x3*(parseInt(_0xb4b752(0xcc))/0x4)+-parseInt(_0xb4b752(0xe0))/0x5*(parseInt(_0xb4b752(0xfd))/0x6)+-parseInt(_0xb4b752(0xe1))/0x7+parseInt(_0xb4b752(0x12e))/0x8*(parseInt(_0xb4b752(0xce))/0x9)+parseInt(_0xb4b752(0xec))/0xa;if(_0x16a44d===_0x588659)break;else _0x3aa754['push'](_0x3aa754['shift']());}catch(_0x2cebac){_0x3aa754['push'](_0x3aa754['shift']());}}}(a20_0x5668,0x562a9));import{Command}from'commander';import a20_0x56d84c 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{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_0x430f9e from'./ui/output.js';function a20_0x5668(){const _0xc2b6d5=['configured','Configure\x20Discord\x20Bot\x20Token','start','Theme\x20set\x20to:\x20','48XTnUOf','bold','Default\x20servers\x20will\x20be\x20restored\x20on\x20next\x20restart\x20unless\x20you\x20remove\x20them\x20again.','type','./ui/themes.js','stop','setup','Name:\x20','header','dim','Manage\x20Discord\x20integration','Login\x20with\x20your\x20Woozlit\x20account','Configure\x20CLI\x20settings','Manage\x20AI\x20behavior\x20rules','Manage\x20Telegram\x20integration','Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.','Select\x20AI\x20model','No\x20rules\x20defined','entries','Add\x20an\x20HTTP\x20MCP\x20server\x20(streamable-http)','Login\x20failed\x20or\x20timed\x20out','\x27\x20not\x20found','List\x20all\x20MCP\x20servers','info','#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a','success','Configure\x20email\x20credentials','Ask\x20a\x20single\x20question','length','./utils/storage.js','Are\x20you\x20sure\x20you\x20want\x20to\x20remove\x20ALL\x20MCP\x20servers?','delete','Model\x20set\x20to:\x20','MCP\x20Servers','hex','clean','chat\x20[message]','./email/index.js','streamable-http','join','Removed\x20MCP\x20server:\x20','remove-all','#3b82f6','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','No\x20MCP\x20servers\x20configured','MCP\x20server\x20\x27','List\x20all\x20rules','2.0.2','\x0aUse\x20\x27woozlit\x20<service>\x20setup\x27\x20to\x20configure\x20services.','refresh','245492JlEoBy','some','327834xJHIsA','command',':\x20[HTTP]\x20','forEach','theme','getStatus','Background\x20Services','Initialize\x20Woozlit\x20in\x20current\x20directory','\x0aConfig\x20file:\x20','./telegram/index.js','yellow','Show\x20current\x20user\x20info','Are\x20you\x20sure\x20you\x20want\x20to\x20completely\x20WIPE\x20all\x20CLI\x20data,\x20rules,\x20and\x20configs?','#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a','Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant','createSpinner','Rules','Added\x20HTTP\x20MCP\x20server:\x20','3380roAulx','460957vhRvJc','add-http\x20<name>\x20<url>','url','clear','Select\x20UI\x20theme\x20(alias\x20for\x20config\x20theme)','Stopped','telegram','Added\x20stdio\x20MCP\x20server:\x20','reset','Woozlit\x20already\x20initialized\x20in\x20this\x20directory','init','13141280JGvyID','1005884nvjxIL','Remove\x20an\x20MCP\x20server',':\x20[stdio]\x20','config','NODE_TLS_REJECT_UNAUTHORIZED','Logged\x20in\x20as\x20','Start\x20an\x20AI\x20chat\x20session','version','@inquirer/prompts','Running','wipe','Please\x20restart\x20the\x20CLI.','Remove\x20all\x20MCP\x20servers','list','keys','add\x20<name>\x20<command>\x20[args...]','6240RvvVqW','./discord/index.js','whoami','error','All\x20MCP\x20servers\x20removed','Refresh\x20cancelled.','Waiting\x20for\x20authentication...','showLogo','mcp','running','Opening\x20browser\x20for\x20login...','Config\x20file:\x20','stdout','woozlit','./github/index.js','Current\x20User','login','./services/bot-manager.js','name','green','12wfEibM','Already\x20logged\x20in\x20as\x20','./config/mcp.js','N/A','Show\x20status\x20of\x20background\x20services/bots','description','action','rules','Add\x20a\x20stdio\x20MCP\x20server','displayName','Select\x20UI\x20theme','delete-all','remove\x20<name>','parse','warn','Wipe\x20all\x20data,\x20rules,\x20settings,\x20and\x20MCP\x20configs','Initialized\x20Woozlit\x20in\x20current\x20directory','Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md','All\x20rules\x20cleared','services','Manage\x20MCP\x20servers','337578hfDQxH','aliases','email','write'];a20_0x5668=function(){return _0xc2b6d5;};return a20_0x5668();}const VERSION=a20_0x298f7e(0xc9),program=new Command();process['env'][a20_0x298f7e(0xf1)]='0',program['name'](a20_0x298f7e(0x10a))[a20_0x298f7e(0x116)](a20_0x298f7e(0xdc))[a20_0x298f7e(0xf4)](VERSION)['action'](async()=>{const _0x2a23e4=a20_0x298f7e;ensureDefaultServers();const {botManager:_0x1566c2}=await import(_0x2a23e4(0x10e));await _0x1566c2['startAllConfigured'](),a20_0x430f9e[_0x2a23e4(0x104)](VERSION);if(!isLoggedIn()){a20_0x430f9e[_0x2a23e4(0x11f)](_0x2a23e4(0xc5)),a20_0x430f9e[_0x2a23e4(0x137)](''),a20_0x430f9e[_0x2a23e4(0x145)]('Opening\x20browser\x20for\x20login...');const _0x256608=a20_0x430f9e[_0x2a23e4(0xdd)](_0x2a23e4(0x103));_0x256608['start']();const _0x32cd84=await login();_0x256608[_0x2a23e4(0x133)]();if(!_0x32cd84){a20_0x430f9e['error'](_0x2a23e4(0x142));return;}const _0x4d0a4d=getUser();a20_0x430f9e[_0x2a23e4(0x147)]('Logged\x20in\x20as\x20'+(_0x4d0a4d[_0x2a23e4(0x11a)]||_0x4d0a4d[_0x2a23e4(0x128)]));}await startChat();}),program['command'](a20_0x298f7e(0x10d))[a20_0x298f7e(0x116)](a20_0x298f7e(0x139))[a20_0x298f7e(0x117)](async()=>{const _0x18a4e8=a20_0x298f7e;if(isLoggedIn()){const _0x37f61c=getUser();a20_0x430f9e[_0x18a4e8(0x145)](_0x18a4e8(0x112)+_0x37f61c[_0x18a4e8(0x128)]);return;}a20_0x430f9e[_0x18a4e8(0x145)](_0x18a4e8(0x107));const _0x41a220=a20_0x430f9e[_0x18a4e8(0xdd)](_0x18a4e8(0x103));_0x41a220[_0x18a4e8(0x12c)]();const _0x25c328=await login();_0x41a220[_0x18a4e8(0x133)]();if(_0x25c328){const _0x37b58c=getUser();a20_0x430f9e[_0x18a4e8(0x147)](_0x18a4e8(0xf2)+(_0x37b58c['displayName']||_0x37b58c[_0x18a4e8(0x128)]));}else a20_0x430f9e['error'](_0x18a4e8(0x142));}),program[a20_0x298f7e(0xcf)]('logout')[a20_0x298f7e(0x116)]('Logout\x20from\x20your\x20Woozlit\x20account')['action'](()=>{const _0x283d82=a20_0x298f7e;logout(),a20_0x430f9e[_0x283d82(0x147)]('Logged\x20out\x20successfully');}),program[a20_0x298f7e(0xcf)](a20_0x298f7e(0xff))[a20_0x298f7e(0x116)](a20_0x298f7e(0xd9))['action'](()=>{const _0x38f825=a20_0x298f7e;if(!isLoggedIn()){a20_0x430f9e[_0x38f825(0x11f)](_0x38f825(0x13d));return;}const _0x16f963=getUser();a20_0x430f9e['header'](_0x38f825(0x10c)),a20_0x430f9e[_0x38f825(0x145)](_0x38f825(0x135)+(_0x16f963[_0x38f825(0x11a)]||_0x38f825(0x114))),a20_0x430f9e['info']('Email:\x20'+(_0x16f963['email']||_0x38f825(0x114))),a20_0x430f9e[_0x38f825(0x145)]('Model:\x20'+getSelectedModel());}),program[a20_0x298f7e(0xcf)](a20_0x298f7e(0xbe))['description'](a20_0x298f7e(0xf3))[a20_0x298f7e(0x117)](async _0x26cee3=>{const _0x4c98aa=a20_0x298f7e;a20_0x430f9e[_0x4c98aa(0x104)](VERSION);if(!isLoggedIn()){a20_0x430f9e[_0x4c98aa(0x11f)](_0x4c98aa(0xc5)),a20_0x430f9e[_0x4c98aa(0x137)](''),a20_0x430f9e[_0x4c98aa(0x145)]('Opening\x20browser\x20for\x20login...');const _0x188d79=a20_0x430f9e[_0x4c98aa(0xdd)]('Waiting\x20for\x20authentication...');_0x188d79[_0x4c98aa(0x12c)]();const _0x5f19ba=await login();_0x188d79['stop']();if(!_0x5f19ba){a20_0x430f9e[_0x4c98aa(0x100)](_0x4c98aa(0x142));return;}const _0x5a4a34=getUser();a20_0x430f9e['success'](_0x4c98aa(0xf2)+(_0x5a4a34['displayName']||_0x5a4a34['email']));}await startChat(_0x26cee3);}),program[a20_0x298f7e(0xcf)]('ask\x20<message>')[a20_0x298f7e(0x116)](a20_0x298f7e(0x149))[a20_0x298f7e(0x117)](async _0x4ec03=>{const _0x564c94=a20_0x298f7e;a20_0x430f9e[_0x564c94(0x104)](VERSION);if(!isLoggedIn()){a20_0x430f9e[_0x564c94(0x11f)](_0x564c94(0xc5)),a20_0x430f9e[_0x564c94(0x137)](''),a20_0x430f9e[_0x564c94(0x145)](_0x564c94(0x107));const _0x191c55=a20_0x430f9e[_0x564c94(0xdd)](_0x564c94(0x103));_0x191c55[_0x564c94(0x12c)]();const _0x25aa8e=await login();_0x191c55[_0x564c94(0x133)]();if(!_0x25aa8e){a20_0x430f9e['error']('Login\x20failed\x20or\x20timed\x20out');return;}const _0x21a785=getUser();a20_0x430f9e[_0x564c94(0x147)](_0x564c94(0xf2)+(_0x21a785['displayName']||_0x21a785['email']));}await startChat(_0x4ec03);});const configCmd=program['command'](a20_0x298f7e(0xf0))[a20_0x298f7e(0x116)](a20_0x298f7e(0x13a));configCmd['command']('model')[a20_0x298f7e(0x116)](a20_0x298f7e(0x13e))[a20_0x298f7e(0x117)](async()=>{const _0xe9ccd2=a20_0x298f7e,_0x31943e=await selectModel();a20_0x430f9e['success'](_0xe9ccd2(0x14e)+_0x31943e);}),configCmd[a20_0x298f7e(0xcf)](a20_0x298f7e(0xd2))['description'](a20_0x298f7e(0x11b))[a20_0x298f7e(0x117)](async()=>{const _0x1aa2d8=a20_0x298f7e,{selectTheme:_0x20a334}=await import(_0x1aa2d8(0x132)),_0x5f3bd0=await _0x20a334();a20_0x430f9e[_0x1aa2d8(0x147)](_0x1aa2d8(0x12d)+_0x5f3bd0);}),program['command'](a20_0x298f7e(0xd2))[a20_0x298f7e(0x116)](a20_0x298f7e(0xe5))['action'](async()=>{const _0x5017a8=a20_0x298f7e,{selectTheme:_0x1e87dd}=await import(_0x5017a8(0x132)),_0x261221=await _0x1e87dd();a20_0x430f9e[_0x5017a8(0x147)](_0x5017a8(0x12d)+_0x261221);});const rulesCmd=program[a20_0x298f7e(0xcf)](a20_0x298f7e(0x118))[a20_0x298f7e(0x116)](a20_0x298f7e(0x13b));rulesCmd[a20_0x298f7e(0xcf)](a20_0x298f7e(0xfa))[a20_0x298f7e(0x116)](a20_0x298f7e(0xc8))[a20_0x298f7e(0x117)](()=>{const _0x213746=a20_0x298f7e,_0x179fd=listRules();if(_0x179fd[_0x213746(0x14a)]===0x0){a20_0x430f9e[_0x213746(0x145)](_0x213746(0x13f));return;}a20_0x430f9e[_0x213746(0x136)](_0x213746(0xde)),_0x179fd['forEach']((_0x1366c4,_0x1f5ed9)=>{const _0x54ea9b=_0x213746;process[_0x54ea9b(0x109)][_0x54ea9b(0x129)](_0x1f5ed9+0x1+'.\x20'+_0x1366c4+'\x0a');});}),rulesCmd[a20_0x298f7e(0xcf)]('add\x20<rule>')[a20_0x298f7e(0x116)]('Add\x20a\x20new\x20rule')[a20_0x298f7e(0x117)](_0x17ba8b=>{const _0xb9000e=a20_0x298f7e;addRule(_0x17ba8b),a20_0x430f9e[_0xb9000e(0x147)]('Added\x20rule:\x20'+_0x17ba8b);})[a20_0x298f7e(0x117)](()=>{const _0x266533=a20_0x298f7e;clearRules(),a20_0x430f9e[_0x266533(0x147)](_0x266533(0x123));});const mcpCmd=program[a20_0x298f7e(0xcf)](a20_0x298f7e(0x105))[a20_0x298f7e(0x116)](a20_0x298f7e(0x125));mcpCmd[a20_0x298f7e(0xcf)]('list')[a20_0x298f7e(0x116)](a20_0x298f7e(0x144))['action'](()=>{const _0x4777b8=a20_0x298f7e,_0x1ab990=getMcpServers(),_0x4aeeb9=Object[_0x4777b8(0xfb)](_0x1ab990);if(_0x4aeeb9[_0x4777b8(0x14a)]===0x0){a20_0x430f9e[_0x4777b8(0x145)](_0x4777b8(0xc6)),a20_0x430f9e[_0x4777b8(0x137)](_0x4777b8(0x108)+getConfigFilePath());return;}a20_0x430f9e['header'](_0x4777b8(0xbb)),_0x4aeeb9[_0x4777b8(0xd1)](_0x1d9f27=>{const _0x35bcba=_0x4777b8,_0x231ec2=_0x1ab990[_0x1d9f27];_0x231ec2[_0x35bcba(0x131)]===_0x35bcba(0xc0)?a20_0x430f9e[_0x35bcba(0x145)]('-\x20'+_0x1d9f27+_0x35bcba(0xd0)+_0x231ec2[_0x35bcba(0xe3)]):a20_0x430f9e[_0x35bcba(0x145)]('-\x20'+_0x1d9f27+_0x35bcba(0xef)+_0x231ec2[_0x35bcba(0xcf)]+'\x20'+(_0x231ec2['args']?.[_0x35bcba(0xc1)]('\x20')||''));}),a20_0x430f9e['dim'](_0x4777b8(0xd6)+getConfigFilePath()),a20_0x430f9e[_0x4777b8(0x137)]('You\x20can\x20also\x20add\x20servers\x20via\x20mcp.json\x20in\x20your\x20project\x20directory');}),mcpCmd[a20_0x298f7e(0xcf)](a20_0x298f7e(0xfc))['description'](a20_0x298f7e(0x119))[a20_0x298f7e(0x117)]((_0x41b115,_0xf2ea6c,_0xf0c6c4)=>{const _0x4eabf5=a20_0x298f7e;addMcpServer(_0x41b115,_0xf2ea6c,_0xf0c6c4),a20_0x430f9e['success'](_0x4eabf5(0xe8)+_0x41b115);}),mcpCmd['command'](a20_0x298f7e(0xe2))['description'](a20_0x298f7e(0x141))[a20_0x298f7e(0x117)]((_0xb20170,_0x33e02d)=>{const _0x1157f9=a20_0x298f7e;addMcpHttpServer(_0xb20170,_0x33e02d),a20_0x430f9e['success'](_0x1157f9(0xdf)+_0xb20170),a20_0x430f9e[_0x1157f9(0x137)]('URL:\x20'+_0x33e02d);}),mcpCmd['command'](a20_0x298f7e(0x11d))['aliases']([a20_0x298f7e(0x14d),'rm'])[a20_0x298f7e(0x116)](a20_0x298f7e(0xee))[a20_0x298f7e(0x117)](_0x2b7487=>{const _0x63f606=a20_0x298f7e;removeMcpServer(_0x2b7487)?a20_0x430f9e[_0x63f606(0x147)](_0x63f606(0xc2)+_0x2b7487):a20_0x430f9e[_0x63f606(0x100)](_0x63f606(0xc7)+_0x2b7487+_0x63f606(0x143));}),mcpCmd[a20_0x298f7e(0xcf)](a20_0x298f7e(0xc3))[a20_0x298f7e(0x127)]([a20_0x298f7e(0x11c),a20_0x298f7e(0xe4)])['description'](a20_0x298f7e(0xf9))[a20_0x298f7e(0x117)](async()=>{const _0x174dde=a20_0x298f7e,{confirm:_0x4c6494}=await import(_0x174dde(0xf5)),_0xcde801=await _0x4c6494({'message':_0x174dde(0x14c),'default':![]});_0xcde801?(clearMcpServers(),a20_0x430f9e[_0x174dde(0x147)](_0x174dde(0x101)),a20_0x430f9e['dim'](_0x174dde(0x130))):a20_0x430f9e['info']('Operation\x20cancelled');}),program[a20_0x298f7e(0xcf)](a20_0x298f7e(0xcb))['aliases']([a20_0x298f7e(0xe9),a20_0x298f7e(0xf7),a20_0x298f7e(0xbd)])[a20_0x298f7e(0x116)](a20_0x298f7e(0x120))[a20_0x298f7e(0x117)](async()=>{const _0x308d7b=a20_0x298f7e,{confirm:_0x5ad36e}=await import(_0x308d7b(0xf5)),_0x22f570=await _0x5ad36e({'message':a20_0x56d84c[_0x308d7b(0x12f)]['hex'](_0x308d7b(0xc4))(_0x308d7b(0xda)),'default':![],'theme':{'prefix':{'idle':a20_0x56d84c[_0x308d7b(0x12f)]['hex'](_0x308d7b(0xc4))('>'),'done':a20_0x56d84c[_0x308d7b(0xbc)](_0x308d7b(0xc4))('●')}}});if(_0x22f570){const {wipeAll:_0x48d63e}=await import(_0x308d7b(0x14b));_0x48d63e();try{const {clearMcpServers:_0x13587a}=await import(_0x308d7b(0x113));_0x13587a();}catch(_0x226436){}a20_0x430f9e[_0x308d7b(0x147)]('All\x20data,\x20configs,\x20and\x20MCP\x20servers\x20have\x20been\x20wiped.'),a20_0x430f9e[_0x308d7b(0x137)](_0x308d7b(0xf8));}else a20_0x430f9e['info'](_0x308d7b(0x102));}),program[a20_0x298f7e(0xcf)](a20_0x298f7e(0xeb))['description'](a20_0x298f7e(0xd5))[a20_0x298f7e(0x117)](()=>{const _0x2d8fd8=a20_0x298f7e,_0x5412db=listDirectory('.'),_0x276d41=_0x5412db[_0x2d8fd8(0x140)]?.[_0x2d8fd8(0xcd)](_0x110fd4=>_0x110fd4[_0x2d8fd8(0x10f)]==='.woozlit');if(_0x276d41){a20_0x430f9e[_0x2d8fd8(0x11f)](_0x2d8fd8(0xea));return;}createFile('.woozlit/rules.md',_0x2d8fd8(0xdb)),createFile('.woozlit/context.md',_0x2d8fd8(0x146)),a20_0x430f9e[_0x2d8fd8(0x147)](_0x2d8fd8(0x121)),a20_0x430f9e['dim'](_0x2d8fd8(0x122));}),program[a20_0x298f7e(0xcf)](a20_0x298f7e(0x124))[a20_0x298f7e(0x116)](a20_0x298f7e(0x115))[a20_0x298f7e(0x117)](async()=>{const _0x1531fd=a20_0x298f7e,{botManager:_0x368a8f}=await import(_0x1531fd(0x10e)),_0x2f0c68=_0x368a8f[_0x1531fd(0xd3)]();a20_0x430f9e[_0x1531fd(0x136)](_0x1531fd(0xd4));if(_0x2f0c68[_0x1531fd(0x14a)]===0x0){a20_0x430f9e[_0x1531fd(0x145)]('No\x20services\x20registered.');return;}_0x2f0c68[_0x1531fd(0xd1)](_0x5515aa=>{const _0x3a50fe=_0x1531fd,_0x588ef3=_0x5515aa[_0x3a50fe(0x106)]?a20_0x56d84c[_0x3a50fe(0x110)](_0x3a50fe(0xf6)):_0x5515aa[_0x3a50fe(0x12a)]?a20_0x56d84c[_0x3a50fe(0xd8)](_0x3a50fe(0xe6)):a20_0x56d84c['gray']('Not\x20Configured');a20_0x430f9e[_0x3a50fe(0x145)]('-\x20'+_0x5515aa[_0x3a50fe(0x10f)]+':\x20'+_0x588ef3);}),a20_0x430f9e[_0x1531fd(0x137)](_0x1531fd(0xca));});const discordCmd=program[a20_0x298f7e(0xcf)]('discord')[a20_0x298f7e(0x116)](a20_0x298f7e(0x138));discordCmd[a20_0x298f7e(0xcf)](a20_0x298f7e(0x134))['description'](a20_0x298f7e(0x12b))[a20_0x298f7e(0x117)](async()=>{const _0x4b21cb=a20_0x298f7e,{setupDiscord:_0x3edc6d}=await import(_0x4b21cb(0xfe));await _0x3edc6d();});const githubCmd=program[a20_0x298f7e(0xcf)]('github\x20[subcmd]')[a20_0x298f7e(0x116)]('Manage\x20GitHub\x20tool\x20integration')['action'](async _0xc52d1d=>{const _0x8eb955=a20_0x298f7e,{handleGitHubCommand:_0x121fec}=await import(_0x8eb955(0x10b));await _0x121fec(_0xc52d1d||'');}),telegramCmd=program['command'](a20_0x298f7e(0xe7))[a20_0x298f7e(0x116)](a20_0x298f7e(0x13c));telegramCmd['command'](a20_0x298f7e(0x134))['description']('Configure\x20Telegram\x20Bot\x20Token')[a20_0x298f7e(0x117)](async()=>{const _0x3c5f98=a20_0x298f7e,{setupTelegram:_0x24cb5}=await import(_0x3c5f98(0xd7));await _0x24cb5();});const emailCmd=program['command'](a20_0x298f7e(0x128))[a20_0x298f7e(0x116)]('Manage\x20Email\x20integration');emailCmd['command'](a20_0x298f7e(0x134))['description'](a20_0x298f7e(0x148))[a20_0x298f7e(0x117)](async()=>{const _0x4f9a1a=a20_0x298f7e,{setupEmail:_0x4cbe70}=await import(_0x4f9a1a(0xbf));await _0x4cbe70();}),program[a20_0x298f7e(0x11e)]();
2
+ const a20_0x1c3e66=a20_0x595e;(function(_0x22ec9b,_0x21fc30){const _0x4a3ef1=a20_0x595e,_0x4f2272=_0x22ec9b();while(!![]){try{const _0x228ffc=parseInt(_0x4a3ef1(0x1af))/0x1+parseInt(_0x4a3ef1(0x198))/0x2*(-parseInt(_0x4a3ef1(0x1ad))/0x3)+-parseInt(_0x4a3ef1(0x1a3))/0x4*(parseInt(_0x4a3ef1(0x1ee))/0x5)+parseInt(_0x4a3ef1(0x1bc))/0x6*(-parseInt(_0x4a3ef1(0x1ea))/0x7)+-parseInt(_0x4a3ef1(0x1b2))/0x8*(parseInt(_0x4a3ef1(0x19d))/0x9)+parseInt(_0x4a3ef1(0x174))/0xa*(-parseInt(_0x4a3ef1(0x1ab))/0xb)+parseInt(_0x4a3ef1(0x1e0))/0xc*(parseInt(_0x4a3ef1(0x1cf))/0xd);if(_0x228ffc===_0x21fc30)break;else _0x4f2272['push'](_0x4f2272['shift']());}catch(_0x8478c7){_0x4f2272['push'](_0x4f2272['shift']());}}}(a20_0x494d,0x2e647));import{Command}from'commander';import a20_0x364bea 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{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_0x5a41fc from'./ui/output.js';const VERSION=a20_0x1c3e66(0x1ba),program=new Command();process['env'][a20_0x1c3e66(0x182)]='0',program['name'](a20_0x1c3e66(0x1d0))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x1d2))[a20_0x1c3e66(0x1b7)](VERSION)[a20_0x1c3e66(0x1f3)](async()=>{const _0x2a9340=a20_0x1c3e66;ensureDefaultServers();const {botManager:_0x1bfce3}=await import(_0x2a9340(0x1b4));await _0x1bfce3[_0x2a9340(0x177)](),a20_0x5a41fc[_0x2a9340(0x162)](VERSION);if(!isLoggedIn()){a20_0x5a41fc[_0x2a9340(0x16e)](_0x2a9340(0x1a4)),a20_0x5a41fc['dim'](''),a20_0x5a41fc[_0x2a9340(0x18c)]('Opening\x20browser\x20for\x20login...');const _0x55fd47=a20_0x5a41fc['createSpinner'](_0x2a9340(0x1ed));_0x55fd47['start']();const _0x370f21=await login();_0x55fd47[_0x2a9340(0x1ec)]();if(!_0x370f21){a20_0x5a41fc[_0x2a9340(0x18e)](_0x2a9340(0x1c1));return;}const _0x2b5547=getUser();a20_0x5a41fc[_0x2a9340(0x1dd)](_0x2a9340(0x1cc)+(_0x2b5547[_0x2a9340(0x180)]||_0x2b5547[_0x2a9340(0x19b)]));}await startChat();}),program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1a9))['description'](a20_0x1c3e66(0x189))[a20_0x1c3e66(0x1f3)](async()=>{const _0x2cf4ed=a20_0x1c3e66;if(isLoggedIn()){const _0x5cf726=getUser();a20_0x5a41fc[_0x2cf4ed(0x18c)]('Already\x20logged\x20in\x20as\x20'+_0x5cf726[_0x2cf4ed(0x19b)]);return;}a20_0x5a41fc['info'](_0x2cf4ed(0x165));const _0x53050e=a20_0x5a41fc[_0x2cf4ed(0x169)]('Waiting\x20for\x20authentication...');_0x53050e[_0x2cf4ed(0x1b5)]();const _0x51452c=await login();_0x53050e[_0x2cf4ed(0x1ec)]();if(_0x51452c){const _0x3d2b76=getUser();a20_0x5a41fc['success'](_0x2cf4ed(0x1cc)+(_0x3d2b76['displayName']||_0x3d2b76[_0x2cf4ed(0x19b)]));}else a20_0x5a41fc[_0x2cf4ed(0x18e)](_0x2cf4ed(0x1c1));}),program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x17a))['description']('Logout\x20from\x20your\x20Woozlit\x20account')[a20_0x1c3e66(0x1f3)](()=>{const _0x283551=a20_0x1c3e66;logout(),a20_0x5a41fc[_0x283551(0x1dd)](_0x283551(0x1ac));}),program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x16c))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x166))[a20_0x1c3e66(0x1f3)](()=>{const _0x1e6a14=a20_0x1c3e66;if(!isLoggedIn()){a20_0x5a41fc['warn'](_0x1e6a14(0x1ef));return;}const _0x54e61d=getUser();a20_0x5a41fc[_0x1e6a14(0x17d)](_0x1e6a14(0x1d8)),a20_0x5a41fc[_0x1e6a14(0x18c)](_0x1e6a14(0x1de)+(_0x54e61d['displayName']||_0x1e6a14(0x19f))),a20_0x5a41fc[_0x1e6a14(0x18c)](_0x1e6a14(0x1ca)+(_0x54e61d[_0x1e6a14(0x19b)]||_0x1e6a14(0x19f))),a20_0x5a41fc[_0x1e6a14(0x18c)](_0x1e6a14(0x171)+getSelectedModel());}),program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1a0))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x18b))[a20_0x1c3e66(0x1f3)](async _0x50569e=>{const _0x3b91ea=a20_0x1c3e66;a20_0x5a41fc['showLogo'](VERSION);if(!isLoggedIn()){a20_0x5a41fc[_0x3b91ea(0x16e)](_0x3b91ea(0x1a4)),a20_0x5a41fc[_0x3b91ea(0x1b9)](''),a20_0x5a41fc['info'](_0x3b91ea(0x165));const _0x1d6c85=a20_0x5a41fc[_0x3b91ea(0x169)]('Waiting\x20for\x20authentication...');_0x1d6c85[_0x3b91ea(0x1b5)]();const _0x263681=await login();_0x1d6c85[_0x3b91ea(0x1ec)]();if(!_0x263681){a20_0x5a41fc[_0x3b91ea(0x18e)](_0x3b91ea(0x1c1));return;}const _0x399ceb=getUser();a20_0x5a41fc[_0x3b91ea(0x1dd)](_0x3b91ea(0x1cc)+(_0x399ceb['displayName']||_0x399ceb[_0x3b91ea(0x19b)]));}await startChat(_0x50569e);}),program[a20_0x1c3e66(0x1b6)]('ask\x20<message>')[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x18f))[a20_0x1c3e66(0x1f3)](async _0x110ba7=>{const _0x3de61c=a20_0x1c3e66;a20_0x5a41fc[_0x3de61c(0x162)](VERSION);if(!isLoggedIn()){a20_0x5a41fc[_0x3de61c(0x16e)](_0x3de61c(0x1a4)),a20_0x5a41fc[_0x3de61c(0x1b9)](''),a20_0x5a41fc[_0x3de61c(0x18c)](_0x3de61c(0x165));const _0x3d269a=a20_0x5a41fc[_0x3de61c(0x169)](_0x3de61c(0x1ed));_0x3d269a[_0x3de61c(0x1b5)]();const _0x59b79b=await login();_0x3d269a[_0x3de61c(0x1ec)]();if(!_0x59b79b){a20_0x5a41fc[_0x3de61c(0x18e)](_0x3de61c(0x1c1));return;}const _0x4e6603=getUser();a20_0x5a41fc[_0x3de61c(0x1dd)](_0x3de61c(0x1cc)+(_0x4e6603[_0x3de61c(0x180)]||_0x4e6603[_0x3de61c(0x19b)]));}await startChat(_0x110ba7);});const configCmd=program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x185))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x196));configCmd[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x193))['description']('Select\x20AI\x20model')[a20_0x1c3e66(0x1f3)](async()=>{const _0x51ee5d=a20_0x1c3e66,_0x57ba0a=await selectModel();a20_0x5a41fc[_0x51ee5d(0x1dd)]('Model\x20set\x20to:\x20'+_0x57ba0a);}),configCmd['command'](a20_0x1c3e66(0x1d6))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x1bf))['action'](async()=>{const _0x310ac1=a20_0x1c3e66,{selectTheme:_0x38e4ff}=await import(_0x310ac1(0x168)),_0x4965cd=await _0x38e4ff();a20_0x5a41fc[_0x310ac1(0x1dd)](_0x310ac1(0x1e9)+_0x4965cd);}),program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1d6))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x1e5))[a20_0x1c3e66(0x1f3)](async()=>{const _0x475b6d=a20_0x1c3e66,{selectTheme:_0x1e4944}=await import(_0x475b6d(0x168)),_0x1b56b3=await _0x1e4944();a20_0x5a41fc[_0x475b6d(0x1dd)](_0x475b6d(0x1e9)+_0x1b56b3);});const rulesCmd=program['command'](a20_0x1c3e66(0x1f1))['description'](a20_0x1c3e66(0x181));rulesCmd[a20_0x1c3e66(0x1b6)]('list')['description'](a20_0x1c3e66(0x173))[a20_0x1c3e66(0x1f3)](()=>{const _0x3f7522=a20_0x1c3e66,_0x4360a7=listRules();if(_0x4360a7[_0x3f7522(0x19e)]===0x0){a20_0x5a41fc[_0x3f7522(0x18c)]('No\x20rules\x20defined');return;}a20_0x5a41fc['header'](_0x3f7522(0x19c)),_0x4360a7[_0x3f7522(0x1e4)]((_0x19288d,_0x530b12)=>{const _0x389ccc=_0x3f7522;process[_0x389ccc(0x1cd)][_0x389ccc(0x19a)](_0x530b12+0x1+'.\x20'+_0x19288d+'\x0a');});}),rulesCmd[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1eb))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x197))[a20_0x1c3e66(0x1f3)](_0x4c80e4=>{const _0x33fd9d=a20_0x1c3e66;addRule(_0x4c80e4),a20_0x5a41fc[_0x33fd9d(0x1dd)](_0x33fd9d(0x183)+_0x4c80e4);})[a20_0x1c3e66(0x1f3)](()=>{const _0x43523f=a20_0x1c3e66;clearRules(),a20_0x5a41fc[_0x43523f(0x1dd)](_0x43523f(0x170));});const mcpCmd=program['command'](a20_0x1c3e66(0x188))['description'](a20_0x1c3e66(0x1a1));mcpCmd['command']('list')[a20_0x1c3e66(0x179)]('List\x20all\x20MCP\x20servers')[a20_0x1c3e66(0x1f3)](()=>{const _0x2930a2=a20_0x1c3e66,_0x1cef0f=getMcpServers(),_0x406d17=Object[_0x2930a2(0x18d)](_0x1cef0f);if(_0x406d17[_0x2930a2(0x19e)]===0x0){a20_0x5a41fc[_0x2930a2(0x18c)](_0x2930a2(0x175)),a20_0x5a41fc[_0x2930a2(0x1b9)](_0x2930a2(0x17c)+getConfigFilePath());return;}a20_0x5a41fc[_0x2930a2(0x17d)]('MCP\x20Servers'),_0x406d17[_0x2930a2(0x1e4)](_0x315095=>{const _0x4993c9=_0x2930a2,_0x18445b=_0x1cef0f[_0x315095];_0x18445b[_0x4993c9(0x192)]==='streamable-http'?a20_0x5a41fc[_0x4993c9(0x18c)]('-\x20'+_0x315095+_0x4993c9(0x1c8)+_0x18445b[_0x4993c9(0x1c0)]):a20_0x5a41fc[_0x4993c9(0x18c)]('-\x20'+_0x315095+_0x4993c9(0x163)+_0x18445b[_0x4993c9(0x1b6)]+'\x20'+(_0x18445b[_0x4993c9(0x1d7)]?.[_0x4993c9(0x1c5)]('\x20')||''));}),a20_0x5a41fc['dim'](_0x2930a2(0x1c4)+getConfigFilePath()),a20_0x5a41fc[_0x2930a2(0x1b9)]('You\x20can\x20also\x20add\x20servers\x20via\x20mcp.json\x20in\x20your\x20project\x20directory');}),mcpCmd['command'](a20_0x1c3e66(0x16f))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x1d9))['action']((_0x41ca13,_0x1c512d,_0x1516dc)=>{const _0x197618=a20_0x1c3e66;addMcpServer(_0x41ca13,_0x1c512d,_0x1516dc),a20_0x5a41fc[_0x197618(0x1dd)](_0x197618(0x1e6)+_0x41ca13);}),mcpCmd[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1e3))[a20_0x1c3e66(0x179)]('Add\x20an\x20HTTP\x20MCP\x20server\x20(streamable-http)')['action']((_0x7e5948,_0x4b4b26)=>{const _0x9f64e1=a20_0x1c3e66;addMcpHttpServer(_0x7e5948,_0x4b4b26),a20_0x5a41fc[_0x9f64e1(0x1dd)]('Added\x20HTTP\x20MCP\x20server:\x20'+_0x7e5948),a20_0x5a41fc[_0x9f64e1(0x1b9)]('URL:\x20'+_0x4b4b26);}),mcpCmd[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1c7))[a20_0x1c3e66(0x1b3)]([a20_0x1c3e66(0x1db),'rm'])[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x1b8))[a20_0x1c3e66(0x1f3)](_0x4bf70d=>{const _0x40e088=a20_0x1c3e66;removeMcpServer(_0x4bf70d)?a20_0x5a41fc['success'](_0x40e088(0x1a5)+_0x4bf70d):a20_0x5a41fc[_0x40e088(0x18e)](_0x40e088(0x1a8)+_0x4bf70d+_0x40e088(0x17f));}),mcpCmd[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1d5))[a20_0x1c3e66(0x1b3)]([a20_0x1c3e66(0x1aa),a20_0x1c3e66(0x194)])['description'](a20_0x1c3e66(0x1f2))[a20_0x1c3e66(0x1f3)](async()=>{const _0x2c6ce5=a20_0x1c3e66,{confirm:_0x21ba71}=await import(_0x2c6ce5(0x17b)),_0x4e594b=await _0x21ba71({'message':_0x2c6ce5(0x176),'default':![]});_0x4e594b?(clearMcpServers(),a20_0x5a41fc['success'](_0x2c6ce5(0x16a)),a20_0x5a41fc[_0x2c6ce5(0x1b9)]('Default\x20servers\x20will\x20be\x20restored\x20on\x20next\x20restart\x20unless\x20you\x20remove\x20them\x20again.')):a20_0x5a41fc[_0x2c6ce5(0x18c)](_0x2c6ce5(0x1df));}),program[a20_0x1c3e66(0x1b6)]('refresh')[a20_0x1c3e66(0x1b3)]([a20_0x1c3e66(0x16b),a20_0x1c3e66(0x1a6),a20_0x1c3e66(0x195)])[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x1cb))['action'](async()=>{const _0x484065=a20_0x1c3e66,{confirm:_0x2cc50a}=await import(_0x484065(0x17b)),_0x2e0d17=await _0x2cc50a({'message':a20_0x364bea[_0x484065(0x1a7)][_0x484065(0x1f0)](_0x484065(0x1e1))(_0x484065(0x1c3)),'default':![],'theme':{'prefix':{'idle':a20_0x364bea['bold'][_0x484065(0x1f0)](_0x484065(0x1e1))('>'),'done':a20_0x364bea[_0x484065(0x1f0)](_0x484065(0x1e1))('●')}}});if(_0x2e0d17){const {wipeAll:_0x20e4c0}=await import('./utils/storage.js');_0x20e4c0();try{const {clearMcpServers:_0x679e23}=await import(_0x484065(0x191));_0x679e23();}catch(_0xc0ed0){}a20_0x5a41fc[_0x484065(0x1dd)]('All\x20data,\x20configs,\x20and\x20MCP\x20servers\x20have\x20been\x20wiped.'),a20_0x5a41fc[_0x484065(0x1b9)]('Please\x20restart\x20the\x20CLI.');}else a20_0x5a41fc[_0x484065(0x18c)]('Refresh\x20cancelled.');}),program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1d3))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x187))[a20_0x1c3e66(0x1f3)](()=>{const _0x101cbc=a20_0x1c3e66,_0x5e5472=listDirectory('.'),_0x1da994=_0x5e5472['entries']?.[_0x101cbc(0x1d4)](_0x3cd027=>_0x3cd027[_0x101cbc(0x1dc)]===_0x101cbc(0x178));if(_0x1da994){a20_0x5a41fc['warn'](_0x101cbc(0x15e));return;}createFile(_0x101cbc(0x1c6),_0x101cbc(0x18a)),createFile(_0x101cbc(0x1c2),_0x101cbc(0x1d1)),a20_0x5a41fc[_0x101cbc(0x1dd)](_0x101cbc(0x1bb)),a20_0x5a41fc['dim'](_0x101cbc(0x160));}),program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x164))['description'](a20_0x1c3e66(0x190))['action'](async()=>{const _0x33894f=a20_0x1c3e66,{botManager:_0x17296b}=await import(_0x33894f(0x1b4)),_0x458cc0=_0x17296b[_0x33894f(0x1be)]();a20_0x5a41fc[_0x33894f(0x17d)]('Background\x20Services');if(_0x458cc0[_0x33894f(0x19e)]===0x0){a20_0x5a41fc['info'](_0x33894f(0x1bd));return;}_0x458cc0[_0x33894f(0x1e4)](_0x344416=>{const _0x208a82=_0x33894f,_0x565afe=_0x344416[_0x208a82(0x1c9)]?a20_0x364bea[_0x208a82(0x15d)](_0x208a82(0x167)):_0x344416[_0x208a82(0x1da)]?a20_0x364bea[_0x208a82(0x1e7)]('Stopped'):a20_0x364bea['gray'](_0x208a82(0x1ce));a20_0x5a41fc[_0x208a82(0x18c)]('-\x20'+_0x344416[_0x208a82(0x1dc)]+':\x20'+_0x565afe);}),a20_0x5a41fc[_0x33894f(0x1b9)](_0x33894f(0x186));});const discordCmd=program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x199))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x1ae));discordCmd[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1b1))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x15f))[a20_0x1c3e66(0x1f3)](async()=>{const {setupDiscord:_0x134549}=await import('./discord/index.js');await _0x134549();});const githubCmd=program['command']('github\x20[subcmd]')[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x184))[a20_0x1c3e66(0x1f3)](async _0x20a40f=>{const _0x253f97=a20_0x1c3e66,{handleGitHubCommand:_0x11d9bd}=await import(_0x253f97(0x172));await _0x11d9bd(_0x20a40f||'');}),telegramCmd=program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1a2))['description'](a20_0x1c3e66(0x1e2));telegramCmd[a20_0x1c3e66(0x1b6)]('setup')[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x161))[a20_0x1c3e66(0x1f3)](async()=>{const {setupTelegram:_0x57c82e}=await import('./telegram/index.js');await _0x57c82e();});const emailCmd=program[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x19b))[a20_0x1c3e66(0x179)](a20_0x1c3e66(0x1e8));function a20_0x595e(_0x348218,_0x29a860){_0x348218=_0x348218-0x15d;const _0x494df3=a20_0x494d();let _0x595ed7=_0x494df3[_0x348218];return _0x595ed7;}emailCmd[a20_0x1c3e66(0x1b6)](a20_0x1c3e66(0x1b1))['description'](a20_0x1c3e66(0x16d))[a20_0x1c3e66(0x1f3)](async()=>{const _0x215ba0=a20_0x1c3e66,{setupEmail:_0x5964a6}=await import(_0x215ba0(0x17e));await _0x5964a6();}),program[a20_0x1c3e66(0x1b0)]();function a20_0x494d(){const _0xd62c99=['args','Current\x20User','Add\x20a\x20stdio\x20MCP\x20server','configured','delete','name','success','Name:\x20','Operation\x20cancelled','165684FRmdcd','#3b82f6','Manage\x20Telegram\x20integration','add-http\x20<name>\x20<url>','forEach','Select\x20UI\x20theme\x20(alias\x20for\x20config\x20theme)','Added\x20stdio\x20MCP\x20server:\x20','yellow','Manage\x20Email\x20integration','Theme\x20set\x20to:\x20','2056411GVJVEK','add\x20<rule>','stop','Waiting\x20for\x20authentication...','10hLMHXH','Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.','hex','rules','Remove\x20all\x20MCP\x20servers','action','green','Woozlit\x20already\x20initialized\x20in\x20this\x20directory','Configure\x20Discord\x20Bot\x20Token','Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md','Configure\x20Telegram\x20Bot\x20Token','showLogo',':\x20[stdio]\x20','services','Opening\x20browser\x20for\x20login...','Show\x20current\x20user\x20info','Running','./ui/themes.js','createSpinner','All\x20MCP\x20servers\x20removed','reset','whoami','Configure\x20email\x20credentials','warn','add\x20<name>\x20<command>\x20[args...]','All\x20rules\x20cleared','Model:\x20','./github/index.js','List\x20all\x20rules','10SRlAkl','No\x20MCP\x20servers\x20configured','Are\x20you\x20sure\x20you\x20want\x20to\x20remove\x20ALL\x20MCP\x20servers?','startAllConfigured','.woozlit','description','logout','@inquirer/prompts','Config\x20file:\x20','header','./email/index.js','\x27\x20not\x20found','displayName','Manage\x20AI\x20behavior\x20rules','NODE_TLS_REJECT_UNAUTHORIZED','Added\x20rule:\x20','Manage\x20GitHub\x20tool\x20integration','config','\x0aUse\x20\x27woozlit\x20<service>\x20setup\x27\x20to\x20configure\x20services.','Initialize\x20Woozlit\x20in\x20current\x20directory','mcp','Login\x20with\x20your\x20Woozlit\x20account','#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a','Start\x20an\x20AI\x20chat\x20session','info','keys','error','Ask\x20a\x20single\x20question','Show\x20status\x20of\x20background\x20services/bots','./config/mcp.js','type','model','clear','clean','Configure\x20CLI\x20settings','Add\x20a\x20new\x20rule','39484CvoDLp','discord','write','email','Rules','9GYWHCo','length','N/A','chat\x20[message]','Manage\x20MCP\x20servers','telegram','69044WidPbM','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','Removed\x20MCP\x20server:\x20','wipe','bold','MCP\x20server\x20\x27','login','delete-all','2675431hxLDZM','Logged\x20out\x20successfully','12ecAFFf','Manage\x20Discord\x20integration','309996OYVKaZ','parse','setup','1720536nSdtlA','aliases','./services/bot-manager.js','start','command','version','Remove\x20an\x20MCP\x20server','dim','2.0.3','Initialized\x20Woozlit\x20in\x20current\x20directory','6YLhpke','No\x20services\x20registered.','getStatus','Select\x20UI\x20theme','url','Login\x20failed\x20or\x20timed\x20out','.woozlit/context.md','Are\x20you\x20sure\x20you\x20want\x20to\x20completely\x20WIPE\x20all\x20CLI\x20data,\x20rules,\x20and\x20configs?','\x0aConfig\x20file:\x20','join','.woozlit/rules.md','remove\x20<name>',':\x20[HTTP]\x20','running','Email:\x20','Wipe\x20all\x20data,\x20rules,\x20settings,\x20and\x20MCP\x20configs','Logged\x20in\x20as\x20','stdout','Not\x20Configured','702EcRVHN','woozlit','#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a','Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant','init','some','remove-all','theme'];a20_0x494d=function(){return _0xd62c99;};return a20_0x494d();}
@@ -1 +1 @@
1
- const a21_0x3f44d5=a21_0x6129;(function(_0x384a0d,_0x4d5cbe){const _0x2ec476=a21_0x6129,_0xd1b3bd=_0x384a0d();while(!![]){try{const _0xd37041=-parseInt(_0x2ec476(0x194))/0x1*(parseInt(_0x2ec476(0x17a))/0x2)+-parseInt(_0x2ec476(0x186))/0x3*(parseInt(_0x2ec476(0x159))/0x4)+-parseInt(_0x2ec476(0x173))/0x5*(-parseInt(_0x2ec476(0x161))/0x6)+parseInt(_0x2ec476(0x151))/0x7+-parseInt(_0x2ec476(0x156))/0x8*(-parseInt(_0x2ec476(0x187))/0x9)+-parseInt(_0x2ec476(0x16e))/0xa+-parseInt(_0x2ec476(0x164))/0xb*(-parseInt(_0x2ec476(0x15f))/0xc);if(_0xd37041===_0x4d5cbe)break;else _0xd1b3bd['push'](_0xd1b3bd['shift']());}catch(_0x482805){_0xd1b3bd['push'](_0xd1b3bd['shift']());}}}(a21_0x22e8,0xe4200));function a21_0x22e8(){const _0x41d165=['join','string','capture','params','Moved\x20mouse\x20to\x20','Type\x20a\x20string\x20of\x20text.','Typed:\x20\x22','3HwoWUF','7846785MtzSsO','computer_mouse_click','boolean','object','moveMouse','computer_type','computer_screenshot','@hurdlegroup/robotjs','height','resize','Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','\x20(double)','connect','63johgKQ','7370118rNHRDl','Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)','typeString','getScreenSize','toString','8UEgRSe','image/jpeg','text','3906360qpjlxc','Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','computer_screen_size','array','mouseClick','shift','12780UNLpWM','image','366NGFiay','keyTap','Tapped\x20key:\x20','9933aBBxfB','Unknown\x20tool:\x20','setRequestHandler','control','left','1.0.0','Get\x20the\x20screen\x20resolution.','bitmap','screen','Screenshot\x20taken.','13668340mEPEph','data','getBuffer','Error:\x20','key','76145biiFiO','right','Y\x20coordinate','width','Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','alt','Text\x20to\x20type','17066SXzpmu','Modifier\x20keys','command','base64','Clicked\x20'];a21_0x22e8=function(){return _0x41d165;};return a21_0x22e8();}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';function a21_0x6129(_0x5ae5d0,_0x4399da){_0x5ae5d0=_0x5ae5d0-0x151;const _0x22e8aa=a21_0x22e8();let _0x612900=_0x22e8aa[_0x5ae5d0];return _0x612900;}const require=createRequire(import.meta.url);let robot;try{robot=require(a21_0x3f44d5(0x18e));}catch(a21_0x4df26b){}const AUTO=-0x1,MIME_JPEG=a21_0x3f44d5(0x157),server=new Server({'name':'computer-use','version':a21_0x3f44d5(0x169)},{'capabilities':{'tools':{}}});server[a21_0x3f44d5(0x166)](ListToolsRequestSchema,async()=>{const _0xefec7b=a21_0x3f44d5;return{'tools':[{'name':_0xefec7b(0x18d),'description':_0xefec7b(0x177),'inputSchema':{'type':_0xefec7b(0x18a),'properties':{}}},{'name':'computer_mouse_move','description':_0xefec7b(0x15a),'inputSchema':{'type':_0xefec7b(0x18a),'properties':{'x':{'type':'number','description':'X\x20coordinate'},'y':{'type':'number','description':_0xefec7b(0x175)}},'required':['x','y']}},{'name':_0xefec7b(0x188),'description':'Click\x20the\x20mouse\x20button.','inputSchema':{'type':'object','properties':{'button':{'type':_0xefec7b(0x180),'enum':['left',_0xefec7b(0x174),'middle'],'default':_0xefec7b(0x168)},'double':{'type':_0xefec7b(0x189),'default':![]}}}},{'name':_0xefec7b(0x18c),'description':_0xefec7b(0x184),'inputSchema':{'type':_0xefec7b(0x18a),'properties':{'text':{'type':'string','description':_0xefec7b(0x179)}},'required':[_0xefec7b(0x158)]}},{'name':'computer_key_tap','description':_0xefec7b(0x191),'inputSchema':{'type':_0xefec7b(0x18a),'properties':{'key':{'type':_0xefec7b(0x180),'description':_0xefec7b(0x152)},'modifiers':{'type':_0xefec7b(0x15c),'items':{'type':_0xefec7b(0x180),'enum':[_0xefec7b(0x178),_0xefec7b(0x17c),_0xefec7b(0x167),_0xefec7b(0x15e)]},'description':_0xefec7b(0x17b)}},'required':[_0xefec7b(0x172)]}},{'name':'computer_screen_size','description':_0xefec7b(0x16a),'inputSchema':{'type':_0xefec7b(0x18a),'properties':{}}}]};}),server[a21_0x3f44d5(0x166)](CallToolRequestSchema,async _0x450ac5=>{const _0x4eb2f8=a21_0x3f44d5,{name:_0x42dcf6,arguments:_0x20dcb3}=_0x450ac5[_0x4eb2f8(0x182)];try{if(_0x42dcf6===_0x4eb2f8(0x18d)){const _0x59f380=robot[_0x4eb2f8(0x154)](),_0x1951b8=robot[_0x4eb2f8(0x16c)][_0x4eb2f8(0x181)](0x0,0x0,_0x59f380['width'],_0x59f380[_0x4eb2f8(0x18f)]),_0x544fb4=new Jimp({'width':_0x1951b8[_0x4eb2f8(0x176)],'height':_0x1951b8['height']});for(let _0xfe37fa=0x0;_0xfe37fa<_0x1951b8['image']['length'];_0xfe37fa+=0x4){_0x544fb4[_0x4eb2f8(0x16b)][_0x4eb2f8(0x16f)][_0xfe37fa]=_0x1951b8[_0x4eb2f8(0x160)][_0xfe37fa+0x2],_0x544fb4[_0x4eb2f8(0x16b)][_0x4eb2f8(0x16f)][_0xfe37fa+0x1]=_0x1951b8[_0x4eb2f8(0x160)][_0xfe37fa+0x1],_0x544fb4[_0x4eb2f8(0x16b)][_0x4eb2f8(0x16f)][_0xfe37fa+0x2]=_0x1951b8[_0x4eb2f8(0x160)][_0xfe37fa],_0x544fb4['bitmap'][_0x4eb2f8(0x16f)][_0xfe37fa+0x3]=_0x1951b8[_0x4eb2f8(0x160)][_0xfe37fa+0x3];}_0x544fb4[_0x4eb2f8(0x16b)][_0x4eb2f8(0x176)]>0x400&&_0x544fb4[_0x4eb2f8(0x190)]({'w':0x400});const _0xd241ff=await _0x544fb4[_0x4eb2f8(0x170)](MIME_JPEG),_0x4cc570=_0xd241ff[_0x4eb2f8(0x155)](_0x4eb2f8(0x17d));return{'content':[{'type':_0x4eb2f8(0x158),'text':_0x4eb2f8(0x16d)},{'type':_0x4eb2f8(0x160),'data':_0x4cc570,'mimeType':_0x4eb2f8(0x157)}]};}if(_0x42dcf6==='computer_mouse_move'){const {x:_0x1eef16,y:_0x3bcab}=_0x20dcb3;return robot[_0x4eb2f8(0x18b)](_0x1eef16,_0x3bcab),{'content':[{'type':'text','text':_0x4eb2f8(0x183)+_0x1eef16+',\x20'+_0x3bcab}]};}if(_0x42dcf6===_0x4eb2f8(0x188)){const {button:button=_0x4eb2f8(0x168),double:double=![]}=_0x20dcb3;return robot[_0x4eb2f8(0x15d)](button,double),{'content':[{'type':_0x4eb2f8(0x158),'text':_0x4eb2f8(0x17e)+button+'\x20button'+(double?_0x4eb2f8(0x192):'')}]};}if(_0x42dcf6===_0x4eb2f8(0x18c)){const {text:_0x4172f2}=_0x20dcb3;return robot[_0x4eb2f8(0x153)](_0x4172f2),{'content':[{'type':'text','text':_0x4eb2f8(0x185)+_0x4172f2+'\x22'}]};}if(_0x42dcf6==='computer_key_tap'){const {key:_0x5e151d,modifiers:_0x5ca4ff}=_0x20dcb3;return robot[_0x4eb2f8(0x162)](_0x5e151d,_0x5ca4ff),{'content':[{'type':_0x4eb2f8(0x158),'text':_0x4eb2f8(0x163)+_0x5e151d+'\x20'+(_0x5ca4ff?'with\x20'+_0x5ca4ff[_0x4eb2f8(0x17f)]('+'):'')}]};}if(_0x42dcf6===_0x4eb2f8(0x15b)){const _0x3b6a77=robot[_0x4eb2f8(0x154)]();return{'content':[{'type':'text','text':'Screen\x20size:\x20'+_0x3b6a77[_0x4eb2f8(0x176)]+'x'+_0x3b6a77[_0x4eb2f8(0x18f)]}]};}throw new Error(_0x4eb2f8(0x165)+_0x42dcf6);}catch(_0x57ae80){return{'content':[{'type':_0x4eb2f8(0x158),'text':_0x4eb2f8(0x171)+_0x57ae80}],'isError':!![]};}});const transport=new StdioServerTransport();await server[a21_0x3f44d5(0x193)](transport);
1
+ const a21_0x31176a=a21_0x14ac;(function(_0x499b80,_0x17eccc){const _0x331f95=a21_0x14ac,_0x760cff=_0x499b80();while(!![]){try{const _0x10beaf=parseInt(_0x331f95(0x1b1))/0x1*(-parseInt(_0x331f95(0x1a1))/0x2)+-parseInt(_0x331f95(0x17f))/0x3+parseInt(_0x331f95(0x175))/0x4+-parseInt(_0x331f95(0x17d))/0x5*(-parseInt(_0x331f95(0x17c))/0x6)+parseInt(_0x331f95(0x19c))/0x7+parseInt(_0x331f95(0x1a5))/0x8*(parseInt(_0x331f95(0x1b3))/0x9)+parseInt(_0x331f95(0x1ac))/0xa*(-parseInt(_0x331f95(0x193))/0xb);if(_0x10beaf===_0x17eccc)break;else _0x760cff['push'](_0x760cff['shift']());}catch(_0x1f7000){_0x760cff['push'](_0x760cff['shift']());}}}(a21_0x43af,0xbb4b9));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{CallToolRequestSchema,ListToolsRequestSchema}from'@modelcontextprotocol/sdk/types.js';function a21_0x14ac(_0x32f403,_0x15eae6){_0x32f403=_0x32f403-0x173;const _0x43afc4=a21_0x43af();let _0x14ac38=_0x43afc4[_0x32f403];return _0x14ac38;}function a21_0x43af(){const _0x39b4f8=['length','control','20CGqgkM','getBuffer','number','Get\x20the\x20screen\x20resolution.','left','745620LzmCRU','Type\x20a\x20string\x20of\x20text.','8279541whcLbl','Screenshot\x20taken.','object','4271836SHnKiz','with\x20','image/jpeg','array','Text\x20to\x20type','text','@hurdlegroup/robotjs','1720398giOeeY','5bfpLZW','computer_screen_size','1402377UXBXHi','Clicked\x20','Error:\x20','1.0.0','image','moveMouse','Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','join','getScreenSize','X\x20coordinate','mouseClick','base64','Tapped\x20key:\x20','width','string','resize','toString','Unknown\x20tool:\x20','data','capture','4944335IXozSK','screen','computer_mouse_move','boolean','key','Modifier\x20keys','computer_key_tap','middle','Moved\x20mouse\x20to\x20','4231983OVtlxx','bitmap','computer_screenshot','Y\x20coordinate','connect','2soFWeQ','computer_mouse_click','shift','params','8lsmFSc','height','computer-use','typeString','keyTap'];a21_0x43af=function(){return _0x39b4f8;};return a21_0x43af();}import{Jimp}from'jimp';import{createRequire}from'module';const require=createRequire(import.meta.url);let robot;try{robot=require(a21_0x31176a(0x17b));}catch(a21_0x14fa47){}const AUTO=-0x1,MIME_JPEG=a21_0x31176a(0x177),server=new Server({'name':a21_0x31176a(0x1a7),'version':a21_0x31176a(0x182)},{'capabilities':{'tools':{}}});server['setRequestHandler'](ListToolsRequestSchema,async()=>{const _0x21db99=a21_0x31176a;return{'tools':[{'name':_0x21db99(0x19e),'description':_0x21db99(0x185),'inputSchema':{'type':'object','properties':{}}},{'name':_0x21db99(0x195),'description':'Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','inputSchema':{'type':_0x21db99(0x174),'properties':{'x':{'type':_0x21db99(0x1ae),'description':_0x21db99(0x188)},'y':{'type':_0x21db99(0x1ae),'description':_0x21db99(0x19f)}},'required':['x','y']}},{'name':_0x21db99(0x1a2),'description':'Click\x20the\x20mouse\x20button.','inputSchema':{'type':_0x21db99(0x174),'properties':{'button':{'type':'string','enum':[_0x21db99(0x1b0),'right',_0x21db99(0x19a)],'default':_0x21db99(0x1b0)},'double':{'type':_0x21db99(0x196),'default':![]}}}},{'name':'computer_type','description':_0x21db99(0x1b2),'inputSchema':{'type':'object','properties':{'text':{'type':_0x21db99(0x18d),'description':_0x21db99(0x179)}},'required':[_0x21db99(0x17a)]}},{'name':_0x21db99(0x199),'description':'Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','inputSchema':{'type':_0x21db99(0x174),'properties':{'key':{'type':'string','description':'Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)'},'modifiers':{'type':_0x21db99(0x178),'items':{'type':_0x21db99(0x18d),'enum':['alt','command',_0x21db99(0x1ab),_0x21db99(0x1a3)]},'description':_0x21db99(0x198)}},'required':[_0x21db99(0x197)]}},{'name':_0x21db99(0x17e),'description':_0x21db99(0x1af),'inputSchema':{'type':'object','properties':{}}}]};}),server['setRequestHandler'](CallToolRequestSchema,async _0x22bf83=>{const _0x56b564=a21_0x31176a,{name:_0x11415b,arguments:_0x11a65c}=_0x22bf83[_0x56b564(0x1a4)];try{if(_0x11415b==='computer_screenshot'){const _0xc61dd=robot[_0x56b564(0x187)](),_0x520cca=robot[_0x56b564(0x194)][_0x56b564(0x192)](0x0,0x0,_0xc61dd[_0x56b564(0x18c)],_0xc61dd[_0x56b564(0x1a6)]),_0x288304=new Jimp({'width':_0x520cca['width'],'height':_0x520cca[_0x56b564(0x1a6)]});for(let _0x4d7d16=0x0;_0x4d7d16<_0x520cca['image'][_0x56b564(0x1aa)];_0x4d7d16+=0x4){_0x288304[_0x56b564(0x19d)][_0x56b564(0x191)][_0x4d7d16]=_0x520cca[_0x56b564(0x183)][_0x4d7d16+0x2],_0x288304[_0x56b564(0x19d)][_0x56b564(0x191)][_0x4d7d16+0x1]=_0x520cca[_0x56b564(0x183)][_0x4d7d16+0x1],_0x288304[_0x56b564(0x19d)]['data'][_0x4d7d16+0x2]=_0x520cca[_0x56b564(0x183)][_0x4d7d16],_0x288304[_0x56b564(0x19d)][_0x56b564(0x191)][_0x4d7d16+0x3]=_0x520cca['image'][_0x4d7d16+0x3];}_0x288304[_0x56b564(0x19d)][_0x56b564(0x18c)]>0x400&&_0x288304[_0x56b564(0x18e)]({'w':0x400});const _0xf92e15=await _0x288304[_0x56b564(0x1ad)](MIME_JPEG),_0x578a7f=_0xf92e15[_0x56b564(0x18f)](_0x56b564(0x18a));return{'content':[{'type':'text','text':_0x56b564(0x173)},{'type':_0x56b564(0x183),'data':_0x578a7f,'mimeType':_0x56b564(0x177)}]};}if(_0x11415b===_0x56b564(0x195)){const {x:_0x2bb063,y:_0x5ba0bd}=_0x11a65c;return robot[_0x56b564(0x184)](_0x2bb063,_0x5ba0bd),{'content':[{'type':'text','text':_0x56b564(0x19b)+_0x2bb063+',\x20'+_0x5ba0bd}]};}if(_0x11415b==='computer_mouse_click'){const {button:button=_0x56b564(0x1b0),double:double=![]}=_0x11a65c;return robot[_0x56b564(0x189)](button,double),{'content':[{'type':_0x56b564(0x17a),'text':_0x56b564(0x180)+button+'\x20button'+(double?'\x20(double)':'')}]};}if(_0x11415b==='computer_type'){const {text:_0x448a04}=_0x11a65c;return robot[_0x56b564(0x1a8)](_0x448a04),{'content':[{'type':'text','text':'Typed:\x20\x22'+_0x448a04+'\x22'}]};}if(_0x11415b===_0x56b564(0x199)){const {key:_0x3766c7,modifiers:_0x11d77d}=_0x11a65c;return robot[_0x56b564(0x1a9)](_0x3766c7,_0x11d77d),{'content':[{'type':_0x56b564(0x17a),'text':_0x56b564(0x18b)+_0x3766c7+'\x20'+(_0x11d77d?_0x56b564(0x176)+_0x11d77d[_0x56b564(0x186)]('+'):'')}]};}if(_0x11415b===_0x56b564(0x17e)){const _0x44360d=robot['getScreenSize']();return{'content':[{'type':_0x56b564(0x17a),'text':'Screen\x20size:\x20'+_0x44360d['width']+'x'+_0x44360d['height']}]};}throw new Error(_0x56b564(0x190)+_0x11415b);}catch(_0x432f0d){return{'content':[{'type':_0x56b564(0x17a),'text':_0x56b564(0x181)+_0x432f0d}],'isError':!![]};}});const transport=new StdioServerTransport();await server[a21_0x31176a(0x1a0)](transport);
@@ -1 +1 @@
1
- const a22_0x582e7b=a22_0x2b44;(function(_0x401709,_0x1bfa27){const _0x2e411b=a22_0x2b44,_0x59d0dc=_0x401709();while(!![]){try{const _0x116b70=-parseInt(_0x2e411b(0xba))/0x1+-parseInt(_0x2e411b(0xc1))/0x2+parseInt(_0x2e411b(0xcc))/0x3+parseInt(_0x2e411b(0xbb))/0x4*(-parseInt(_0x2e411b(0xbc))/0x5)+parseInt(_0x2e411b(0xbe))/0x6+parseInt(_0x2e411b(0xb4))/0x7+-parseInt(_0x2e411b(0xca))/0x8*(parseInt(_0x2e411b(0xb2))/0x9);if(_0x116b70===_0x1bfa27)break;else _0x59d0dc['push'](_0x59d0dc['shift']());}catch(_0x5abe40){_0x59d0dc['push'](_0x59d0dc['shift']());}}}(a22_0x4634,0x66ae8));function a22_0x4634(){const _0x9fd5cd=['57070cRgwbf','Telegram','3211104DVUMjy','Discord','map','1226728QyQYJl','stopBot','success','Email','filter','\x20services\x20active\x20in\x20background','startBot','forEach','start','24qMpbdq','dim','1055499fWtPvu','isBotRunning','push','isConfigured','services','getStatus','[Bot\x20Manager]\x20','length','isRunning','309627OIekfW','startAllConfigured','5521684AyGfSe','Failed\x20to\x20start\x20','error','stopAll','\x0a[Bot\x20Manager]\x20Starting\x20background\x20services...','name','162010ugGnve','132osUYST'];a22_0x4634=function(){return _0x9fd5cd;};return a22_0x4634();}import*as a22_0x5e3ced from'../telegram/index.js';import*as a22_0x2f7120 from'../discord/index.js';function a22_0x2b44(_0xaf92f4,_0x193e40){_0xaf92f4=_0xaf92f4-0xb1;const _0x463440=a22_0x4634();let _0x2b44e0=_0x463440[_0xaf92f4];return _0x2b44e0;}import*as a22_0x59d770 from'../email/index.js';import*as a22_0x5262c1 from'../ui/output.js';class BotManager{[a22_0x582e7b(0xd0)]=[];constructor(){const _0x3fd1d3=a22_0x582e7b;this[_0x3fd1d3(0xd0)][_0x3fd1d3(0xce)]({'name':_0x3fd1d3(0xbd),'start':a22_0x5e3ced[_0x3fd1d3(0xc7)],'stop':a22_0x5e3ced[_0x3fd1d3(0xc2)],'isRunning':a22_0x5e3ced[_0x3fd1d3(0xcd)],'isConfigured':a22_0x5e3ced[_0x3fd1d3(0xcf)]}),this[_0x3fd1d3(0xd0)]['push']({'name':_0x3fd1d3(0xbf),'start':a22_0x2f7120['startBot'],'stop':a22_0x2f7120[_0x3fd1d3(0xc2)],'isRunning':a22_0x2f7120[_0x3fd1d3(0xcd)],'isConfigured':a22_0x2f7120[_0x3fd1d3(0xcf)]}),this[_0x3fd1d3(0xd0)][_0x3fd1d3(0xce)]({'name':_0x3fd1d3(0xc4),'start':a22_0x59d770[_0x3fd1d3(0xc7)],'stop':a22_0x59d770[_0x3fd1d3(0xc2)],'isRunning':a22_0x59d770[_0x3fd1d3(0xcd)],'isConfigured':a22_0x59d770[_0x3fd1d3(0xcf)]});}async[a22_0x582e7b(0xb3)](){const _0x2d23d8=a22_0x582e7b,_0xf87a3e=this[_0x2d23d8(0xd0)][_0x2d23d8(0xc5)](_0x238dab=>_0x238dab[_0x2d23d8(0xcf)]());if(_0xf87a3e[_0x2d23d8(0xd3)]===0x0)return;a22_0x5262c1[_0x2d23d8(0xcb)](_0x2d23d8(0xb8));const _0x5d1641=await Promise['all'](_0xf87a3e[_0x2d23d8(0xc0)](async _0x3155bd=>{const _0xb6e0fc=_0x2d23d8;try{if(_0x3155bd[_0xb6e0fc(0xb1)]())return!![];const _0x21f882=await _0x3155bd[_0xb6e0fc(0xc9)]();return _0x21f882;}catch(_0x5136b1){return a22_0x5262c1[_0xb6e0fc(0xb6)](_0xb6e0fc(0xb5)+_0x3155bd['name']+':\x20'+_0x5136b1),![];}})),_0xe9b7af=_0x5d1641[_0x2d23d8(0xc5)](_0x428db2=>_0x428db2)[_0x2d23d8(0xd3)];_0xe9b7af>0x0&&a22_0x5262c1[_0x2d23d8(0xc3)](_0x2d23d8(0xd2)+_0xe9b7af+'/'+_0xf87a3e[_0x2d23d8(0xd3)]+_0x2d23d8(0xc6));}[a22_0x582e7b(0xb7)](){const _0x5af22a=a22_0x582e7b;this['services'][_0x5af22a(0xc8)](_0x27bd7b=>{_0x27bd7b['isRunning']()&&_0x27bd7b['stop']();});}[a22_0x582e7b(0xd1)](){const _0x3a65f2=a22_0x582e7b;return this[_0x3a65f2(0xd0)][_0x3a65f2(0xc0)](_0x448343=>({'name':_0x448343[_0x3a65f2(0xb9)],'running':_0x448343[_0x3a65f2(0xb1)](),'configured':_0x448343[_0x3a65f2(0xcf)]()}));}}export const botManager=new BotManager();
1
+ const a22_0x21d0a1=a22_0x36b3;function a22_0x36b3(_0x12be44,_0x3e1407){_0x12be44=_0x12be44-0xbf;const _0x189bfa=a22_0x189b();let _0x36b344=_0x189bfa[_0x12be44];return _0x36b344;}(function(_0x41e3b2,_0x21b9c1){const _0x573451=a22_0x36b3,_0x43608d=_0x41e3b2();while(!![]){try{const _0x5823a4=parseInt(_0x573451(0xc5))/0x1+parseInt(_0x573451(0xcd))/0x2*(-parseInt(_0x573451(0xd5))/0x3)+-parseInt(_0x573451(0xd4))/0x4*(-parseInt(_0x573451(0xdb))/0x5)+parseInt(_0x573451(0xd1))/0x6*(-parseInt(_0x573451(0xd8))/0x7)+parseInt(_0x573451(0xcf))/0x8*(parseInt(_0x573451(0xda))/0x9)+parseInt(_0x573451(0xc2))/0xa+-parseInt(_0x573451(0xbf))/0xb;if(_0x5823a4===_0x21b9c1)break;else _0x43608d['push'](_0x43608d['shift']());}catch(_0x5b63e2){_0x43608d['push'](_0x43608d['shift']());}}}(a22_0x189b,0x2ef76));import*as a22_0x3b5946 from'../telegram/index.js';import*as a22_0x319c6d from'../discord/index.js';import*as a22_0x213a19 from'../email/index.js';import*as a22_0x4b2763 from'../ui/output.js';class BotManager{['services']=[];constructor(){const _0x55ac32=a22_0x36b3;this[_0x55ac32(0xc1)][_0x55ac32(0xd2)]({'name':_0x55ac32(0xde),'start':a22_0x3b5946['startBot'],'stop':a22_0x3b5946[_0x55ac32(0xc8)],'isRunning':a22_0x3b5946['isBotRunning'],'isConfigured':a22_0x3b5946[_0x55ac32(0xca)]}),this[_0x55ac32(0xc1)]['push']({'name':_0x55ac32(0xc3),'start':a22_0x319c6d[_0x55ac32(0xd7)],'stop':a22_0x319c6d[_0x55ac32(0xc8)],'isRunning':a22_0x319c6d[_0x55ac32(0xc4)],'isConfigured':a22_0x319c6d[_0x55ac32(0xca)]}),this[_0x55ac32(0xc1)][_0x55ac32(0xd2)]({'name':'Email','start':a22_0x213a19[_0x55ac32(0xd7)],'stop':a22_0x213a19['stopBot'],'isRunning':a22_0x213a19[_0x55ac32(0xc4)],'isConfigured':a22_0x213a19['isConfigured']});}async[a22_0x21d0a1(0xcb)](){const _0x49da7e=a22_0x21d0a1,_0x101760=this['services'][_0x49da7e(0xc6)](_0x18028a=>_0x18028a[_0x49da7e(0xca)]());if(_0x101760['length']===0x0)return;a22_0x4b2763[_0x49da7e(0xcc)]('\x0a[Bot\x20Manager]\x20Starting\x20background\x20services...');const _0x2de650=await Promise[_0x49da7e(0xdc)](_0x101760['map'](async _0x125b97=>{const _0x533c3e=_0x49da7e;try{if(_0x125b97[_0x533c3e(0xd9)]())return!![];const _0x110465=await _0x125b97[_0x533c3e(0xd6)]();return _0x110465;}catch(_0x233cdc){return a22_0x4b2763['error'](_0x533c3e(0xd3)+_0x125b97['name']+':\x20'+_0x233cdc),![];}})),_0xff2369=_0x2de650['filter'](_0x46439b=>_0x46439b)[_0x49da7e(0xc0)];_0xff2369>0x0&&a22_0x4b2763['success'](_0x49da7e(0xdd)+_0xff2369+'/'+_0x101760[_0x49da7e(0xc0)]+'\x20services\x20active\x20in\x20background');}[a22_0x21d0a1(0xc9)](){const _0x2625f0=a22_0x21d0a1;this[_0x2625f0(0xc1)][_0x2625f0(0xd0)](_0xa353e4=>{const _0x2976c4=_0x2625f0;_0xa353e4[_0x2976c4(0xd9)]()&&_0xa353e4['stop']();});}[a22_0x21d0a1(0xc7)](){const _0x3ffab3=a22_0x21d0a1;return this[_0x3ffab3(0xc1)][_0x3ffab3(0xce)](_0x12ef31=>({'name':_0x12ef31['name'],'running':_0x12ef31['isRunning'](),'configured':_0x12ef31[_0x3ffab3(0xca)]()}));}}function a22_0x189b(){const _0x293069=['8pUrrWS','forEach','802734woMqBK','push','Failed\x20to\x20start\x20','28oTCnWC','363JSPQJX','start','startBot','7AUCdvf','isRunning','1263771PGIEMg','247795sIxLDF','all','[Bot\x20Manager]\x20','Telegram','5149001OoRkuM','length','services','3769370xwznzQ','Discord','isBotRunning','164362waGpCb','filter','getStatus','stopBot','stopAll','isConfigured','startAllConfigured','dim','3874TVbhLs','map'];a22_0x189b=function(){return _0x293069;};return a22_0x189b();}export const botManager=new BotManager();
@@ -1 +1 @@
1
- const a23_0x10be43=a23_0x39eb;(function(_0x60954c,_0x16eb89){const _0x114560=a23_0x39eb,_0x1accc4=_0x60954c();while(!![]){try{const _0x3d62b6=-parseInt(_0x114560(0x1be))/0x1+parseInt(_0x114560(0x1ba))/0x2*(parseInt(_0x114560(0x1bd))/0x3)+-parseInt(_0x114560(0x1c5))/0x4+parseInt(_0x114560(0x1c6))/0x5+parseInt(_0x114560(0x1c3))/0x6*(parseInt(_0x114560(0x1c9))/0x7)+-parseInt(_0x114560(0x1b5))/0x8+-parseInt(_0x114560(0x1bc))/0x9;if(_0x3d62b6===_0x16eb89)break;else _0x1accc4['push'](_0x1accc4['shift']());}catch(_0x2971cb){_0x1accc4['push'](_0x1accc4['shift']());}}}(a23_0x4bdc,0x8cbc0));import{GoogleGenerativeAI}from'@google/generative-ai';import{promises as a23_0x2fa1f6}from'fs';import*as a23_0x5ea8de from'../ui/output.js';import a23_0x24c769 from'conf';const config=new a23_0x24c769({'projectName':a23_0x10be43(0x1b8)});export function setGeminiKey(_0x1e994a){const _0x92b20d=a23_0x10be43;config[_0x92b20d(0x1c0)](_0x92b20d(0x1c8),_0x1e994a);}function a23_0x39eb(_0x55b9dc,_0x1e22dc){_0x55b9dc=_0x55b9dc-0x1b3;const _0x4bdcda=a23_0x4bdc();let _0x39eb2d=_0x4bdcda[_0x55b9dc];return _0x39eb2d;}export function getGeminiKey(){const _0x3230fd=a23_0x10be43;return config[_0x3230fd(0x1bb)](_0x3230fd(0x1c8))||'';}export async function processVoiceMessage(_0x5cafbe){const _0x2d7835=a23_0x10be43,_0x413158=getGeminiKey();if(!_0x413158)throw new Error('Gemini\x20API\x20Key\x20not\x20configured.\x20Run\x20\x27/voice\x20setup\x27\x20first.');const _0x2ce6ed=new GoogleGenerativeAI(_0x413158),_0x37f6e1=_0x2ce6ed[_0x2d7835(0x1b7)]({'model':_0x2d7835(0x1b6)});try{const _0x501073=await a23_0x2fa1f6[_0x2d7835(0x1c7)](_0x5cafbe),_0x370ff4=_0x501073[_0x2d7835(0x1c2)](_0x2d7835(0x1c4)),_0x4e64e3=_0x2d7835(0x1ca),_0xce4d74=await _0x37f6e1[_0x2d7835(0x1c1)]([_0x2d7835(0x1cb),{'inlineData':{'mimeType':_0x4e64e3,'data':_0x370ff4}}]),_0x3f33c9=_0xce4d74[_0x2d7835(0x1bf)][_0x2d7835(0x1b9)]();return{'text':_0x3f33c9};}catch(_0x36ba50){a23_0x5ea8de[_0x2d7835(0x1b4)](_0x2d7835(0x1b3)+_0x36ba50['message']);throw _0x36ba50;}}function a23_0x4bdc(){const _0x148ff9=['3wquKeG','182936RIOiQN','response','set','generateContent','toString','6OiWfeh','base64','2760696pPsJpd','4041430CjqSxu','readFile','geminiKey','1425109dnhsTy','audio/ogg','Listen\x20to\x20this\x20audio\x20and\x20respond\x20helpfully.\x20If\x20it\x27s\x20a\x20command,\x20execute\x20it\x20or\x20say\x20you\x20can\x27t.','Voice\x20processing\x20failed:\x20','error','1114560KKTXIL','gemini-2.0-flash-exp','getGenerativeModel','woozlit-cli-voice','text','1334386ReeXGB','get','811692gRYgrk'];a23_0x4bdc=function(){return _0x148ff9;};return a23_0x4bdc();}
1
+ function a23_0x4d10(_0x1c9e1e,_0x40079d){_0x1c9e1e=_0x1c9e1e-0xb2;const _0x30c669=a23_0x30c6();let _0x4d10e7=_0x30c669[_0x1c9e1e];return _0x4d10e7;}const a23_0x313177=a23_0x4d10;(function(_0x49b714,_0x365602){const _0x419087=a23_0x4d10,_0x401686=_0x49b714();while(!![]){try{const _0x1fcb76=-parseInt(_0x419087(0xc2))/0x1*(parseInt(_0x419087(0xb4))/0x2)+-parseInt(_0x419087(0xbb))/0x3+-parseInt(_0x419087(0xc5))/0x4+-parseInt(_0x419087(0xc3))/0x5+-parseInt(_0x419087(0xba))/0x6+parseInt(_0x419087(0xb7))/0x7+parseInt(_0x419087(0xc4))/0x8;if(_0x1fcb76===_0x365602)break;else _0x401686['push'](_0x401686['shift']());}catch(_0x1567ba){_0x401686['push'](_0x401686['shift']());}}}(a23_0x30c6,0x19674));import{GoogleGenerativeAI}from'@google/generative-ai';import{promises as a23_0x27adda}from'fs';import*as a23_0x58afa7 from'../ui/output.js';import a23_0x47f5e9 from'conf';const config=new a23_0x47f5e9({'projectName':a23_0x313177(0xc6)});export function setGeminiKey(_0x44f7dc){const _0xd4f6a7=a23_0x313177;config[_0xd4f6a7(0xbd)](_0xd4f6a7(0xb5),_0x44f7dc);}function a23_0x30c6(){const _0x692e59=['geminiKey','Voice\x20processing\x20failed:\x20','1200031AfCeQQ','text','readFile','20784xWMVoS','399534lHQRiy','generateContent','set','response','Gemini\x20API\x20Key\x20not\x20configured.\x20Run\x20\x27/voice\x20setup\x27\x20first.','error','gemini-2.0-flash-exp','71FvwXZX','746430tERbpR','3097240VoSUvW','114100BlWlgU','woozlit-cli-voice','toString','Listen\x20to\x20this\x20audio\x20and\x20respond\x20helpfully.\x20If\x20it\x27s\x20a\x20command,\x20execute\x20it\x20or\x20say\x20you\x20can\x27t.','getGenerativeModel','3946wpjgHr'];a23_0x30c6=function(){return _0x692e59;};return a23_0x30c6();}export function getGeminiKey(){return config['get']('geminiKey')||'';}export async function processVoiceMessage(_0x4465c4){const _0x3b0a3d=a23_0x313177,_0x9cf3af=getGeminiKey();if(!_0x9cf3af)throw new Error(_0x3b0a3d(0xbf));const _0x17e40f=new GoogleGenerativeAI(_0x9cf3af),_0x40bbe9=_0x17e40f[_0x3b0a3d(0xb3)]({'model':_0x3b0a3d(0xc1)});try{const _0x596e73=await a23_0x27adda[_0x3b0a3d(0xb9)](_0x4465c4),_0x79629b=_0x596e73[_0x3b0a3d(0xc7)]('base64'),_0x4dfa04='audio/ogg',_0x17680d=await _0x40bbe9[_0x3b0a3d(0xbc)]([_0x3b0a3d(0xb2),{'inlineData':{'mimeType':_0x4dfa04,'data':_0x79629b}}]),_0x4159ed=_0x17680d[_0x3b0a3d(0xbe)][_0x3b0a3d(0xb8)]();return{'text':_0x4159ed};}catch(_0x532d49){a23_0x58afa7[_0x3b0a3d(0xc0)](_0x3b0a3d(0xb6)+_0x532d49['message']);throw _0x532d49;}}