woozlit 2.0.4 → 2.1.2

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 (52) 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/chat-history.d.ts +15 -0
  45. package/dist/utils/chat-history.js +1 -0
  46. package/dist/utils/history.js +1 -1
  47. package/dist/utils/mcp-installer.js +1 -1
  48. package/dist/utils/platform.js +1 -1
  49. package/dist/utils/storage.js +1 -1
  50. package/dist/utils/update-check.js +1 -1
  51. package/dist/verify_repro.js +1 -1
  52. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x2bc03f,_0x2c7b94){const _0x4f5d85=a14_0x5693,_0x309da6=_0x2bc03f();while(!![]){try{const _0x1a56c2=-parseInt(_0x4f5d85(0xba))/0x1*(-parseInt(_0x4f5d85(0xb7))/0x2)+-parseInt(_0x4f5d85(0xc6))/0x3*(-parseInt(_0x4f5d85(0xcb))/0x4)+parseInt(_0x4f5d85(0xc4))/0x5+-parseInt(_0x4f5d85(0xd0))/0x6*(parseInt(_0x4f5d85(0xd2))/0x7)+parseInt(_0x4f5d85(0xc8))/0x8*(parseInt(_0x4f5d85(0xc0))/0x9)+parseInt(_0x4f5d85(0xc1))/0xa*(parseInt(_0x4f5d85(0xc5))/0xb)+-parseInt(_0x4f5d85(0xbd))/0xc;if(_0x1a56c2===_0x2c7b94)break;else _0x309da6['push'](_0x309da6['shift']());}catch(_0x355901){_0x309da6['push'](_0x309da6['shift']());}}}(a14_0x43ee,0x24ffa));function a14_0x43ee(){const _0x8a7d85=['warn','993','toLowerCase','12uAhIXY','Configure\x20advanced\x20server\x20settings?','587','48385OthpsZ','SMTP\x20Port:','success','11330376naTkrt','Email\x20Provider\x20(gmail/outlook/other):','smtp.gmail.com','1345581LWkVhA','60ufxHOc','IMAP\x20Port:','addAllowedSender','1379910NPCDSe','550759DbLGvN','871152RyIVUk','This\x20setup\x20will\x20configure\x20Woozlit\x20to\x20check\x20your\x20email\x20and\x20reply.','8ACKooT','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Email\x20Agent.','gmail','4DfGNyT','info','setEnabled','Password\x20(or\x20App\x20Password):','Use\x20an\x20App\x20Password\x20if\x20you\x20are\x20using\x20Gmail\x20(2FA\x20enabled).','84342GYHxPK','imap.gmail.com','105VvUQvh','SMTP\x20Host:'];a14_0x43ee=function(){return _0x8a7d85;};return a14_0x43ee();}function a14_0x5693(_0x32e2cb,_0x5bb375){_0x32e2cb=_0x32e2cb-0xb6;const _0x43ee57=a14_0x43ee();let _0x5693da=_0x43ee57[_0x32e2cb];return _0x5693da;}import{password,input,confirm}from'@inquirer/prompts';import*as a14_0x2a4562 from'./config.js';import*as a14_0x41f3e9 from'../ui/output.js';export async function setupEmail(){const _0x5f263e=a14_0x5693;a14_0x41f3e9['info'](_0x5f263e(0xc7)),a14_0x41f3e9[_0x5f263e(0xd4)](_0x5f263e(0xcf));const _0x59e6d0=await input({'message':_0x5f263e(0xbe),'default':_0x5f263e(0xca)}),_0x588ac8=await input({'message':'Email\x20Address:'}),_0x476aa4=await password({'message':_0x5f263e(0xce)});let _0x5a8b86=_0x5f263e(0xd1),_0x3867e5=0x3e1,_0x5113e4=_0x5f263e(0xbf),_0xc2d325=0x24b;if(_0x59e6d0[_0x5f263e(0xb6)]()!==_0x5f263e(0xca)){const _0x332d14=await confirm({'message':_0x5f263e(0xb8),'default':![]});if(_0x332d14){_0x5a8b86=await input({'message':'IMAP\x20Host:','default':_0x5a8b86});const _0x9dae0e=await input({'message':_0x5f263e(0xc2),'default':_0x5f263e(0xd5)});_0x3867e5=parseInt(_0x9dae0e),_0x5113e4=await input({'message':_0x5f263e(0xd3),'default':_0x5113e4});const _0x471163=await input({'message':_0x5f263e(0xbb),'default':_0x5f263e(0xb9)});_0xc2d325=parseInt(_0x471163);}}a14_0x2a4562['setCredentials'](_0x588ac8,_0x476aa4,_0x5a8b86,_0x3867e5),a14_0x2a4562[_0x5f263e(0xcd)](!![]);const _0x245b7a=await confirm({'message':'Only\x20allow\x20emails\x20from\x20yourself\x20(recommended)?','default':!![]});if(_0x245b7a){a14_0x2a4562[_0x5f263e(0xc3)](_0x588ac8);const _0x4db129=await input({'message':'Your\x20personal\x20email\x20(that\x20you\x20will\x20send\x20FROM):'});if(_0x4db129)a14_0x2a4562[_0x5f263e(0xc3)](_0x4db129);}a14_0x41f3e9[_0x5f263e(0xbc)]('Email\x20configuration\x20saved!'),a14_0x41f3e9[_0x5f263e(0xcc)](_0x5f263e(0xc9));}
1
+ function a14_0x46aa(_0x258c6e,_0x29644c){_0x258c6e=_0x258c6e-0x12f;const _0x1c05ac=a14_0x1c05();let _0x46aa2b=_0x1c05ac[_0x258c6e];return _0x46aa2b;}(function(_0xb8c5e5,_0x3b2c3d){const _0x3c5495=a14_0x46aa,_0x4a15ab=_0xb8c5e5();while(!![]){try{const _0x596bab=parseInt(_0x3c5495(0x135))/0x1*(-parseInt(_0x3c5495(0x13d))/0x2)+-parseInt(_0x3c5495(0x149))/0x3*(parseInt(_0x3c5495(0x137))/0x4)+parseInt(_0x3c5495(0x14a))/0x5*(parseInt(_0x3c5495(0x140))/0x6)+parseInt(_0x3c5495(0x145))/0x7*(-parseInt(_0x3c5495(0x141))/0x8)+parseInt(_0x3c5495(0x146))/0x9+parseInt(_0x3c5495(0x139))/0xa+-parseInt(_0x3c5495(0x14c))/0xb*(-parseInt(_0x3c5495(0x13a))/0xc);if(_0x596bab===_0x3b2c3d)break;else _0x4a15ab['push'](_0x4a15ab['shift']());}catch(_0x3fec2b){_0x4a15ab['push'](_0x4a15ab['shift']());}}}(a14_0x1c05,0xf08eb));function a14_0x1c05(){const _0x3dec61=['Use\x20an\x20App\x20Password\x20if\x20you\x20are\x20using\x20Gmail\x20(2FA\x20enabled).','4372JMcChe','imap.gmail.com','17075820ekUkzN','123528rESWhm','success','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Email\x20Agent.','10fZykHk','info','setEnabled','6RxGFEL','1382104TSxbLD','gmail','Configure\x20advanced\x20server\x20settings?','toLowerCase','56LxcauV','7192917MRFCLS','Email\x20Provider\x20(gmail/outlook/other):','587','3450ZNdJzT','4479520NoVCRy','SMTP\x20Host:','572EJJcxz','Email\x20Address:','This\x20setup\x20will\x20configure\x20Woozlit\x20to\x20check\x20your\x20email\x20and\x20reply.','Password\x20(or\x20App\x20Password):','Your\x20personal\x20email\x20(that\x20you\x20will\x20send\x20FROM):','warn','addAllowedSender','Email\x20configuration\x20saved!','62722mtnbZW'];a14_0x1c05=function(){return _0x3dec61;};return a14_0x1c05();}import{password,input,confirm}from'@inquirer/prompts';import*as a14_0x345446 from'./config.js';import*as a14_0x3e7c74 from'../ui/output.js';export async function setupEmail(){const _0x319f0a=a14_0x46aa;a14_0x3e7c74[_0x319f0a(0x13e)](_0x319f0a(0x12f)),a14_0x3e7c74[_0x319f0a(0x132)](_0x319f0a(0x136));const _0x43315c=await input({'message':_0x319f0a(0x147),'default':_0x319f0a(0x142)}),_0x39276c=await input({'message':_0x319f0a(0x14d)}),_0x51071d=await password({'message':_0x319f0a(0x130)});let _0x4f82c2=_0x319f0a(0x138),_0x17c0af=0x3e1,_0x16ea1a='smtp.gmail.com',_0x3afbe8=0x24b;if(_0x43315c[_0x319f0a(0x144)]()!==_0x319f0a(0x142)){const _0x2563a3=await confirm({'message':_0x319f0a(0x143),'default':![]});if(_0x2563a3){_0x4f82c2=await input({'message':'IMAP\x20Host:','default':_0x4f82c2});const _0x5100fa=await input({'message':'IMAP\x20Port:','default':'993'});_0x17c0af=parseInt(_0x5100fa),_0x16ea1a=await input({'message':_0x319f0a(0x14b),'default':_0x16ea1a});const _0x42f970=await input({'message':'SMTP\x20Port:','default':_0x319f0a(0x148)});_0x3afbe8=parseInt(_0x42f970);}}a14_0x345446['setCredentials'](_0x39276c,_0x51071d,_0x4f82c2,_0x17c0af),a14_0x345446[_0x319f0a(0x13f)](!![]);const _0x16bd01=await confirm({'message':'Only\x20allow\x20emails\x20from\x20yourself\x20(recommended)?','default':!![]});if(_0x16bd01){a14_0x345446['addAllowedSender'](_0x39276c);const _0x554266=await input({'message':_0x319f0a(0x131)});if(_0x554266)a14_0x345446[_0x319f0a(0x133)](_0x554266);}a14_0x3e7c74[_0x319f0a(0x13b)](_0x319f0a(0x134)),a14_0x3e7c74[_0x319f0a(0x13e)](_0x319f0a(0x13c));}
@@ -1 +1 @@
1
- const a15_0x47cd14=a15_0x14d8;function a15_0x14d8(_0x1ef5dd,_0x3b3505){_0x1ef5dd=_0x1ef5dd-0x152;const _0x3a133a=a15_0x3a13();let _0x14d88c=_0x3a133a[_0x1ef5dd];return _0x14d88c;}function a15_0x3a13(){const _0xf81a48=['GitHub\x20API\x20error:\x20','content','headers','631428pQUiDO','372552HDzMCd','Not\x20authenticated\x20with\x20GitHub.\x20Run\x20\x27/github\x20login\x27\x20first.','application/vnd.github+json','24uNXBrr','PUT','from','total_count','15sWHbfp','/pulls?state=','/installation/repositories?per_page=1','11DgUDEk','length','stringify','refs/heads/','base64','repositories','3051130zxKduB','72999HyyGjS','open','154156qpRyUL','/pulls','toString','/contents/','sha','/comments','2022-11-28','451386hAhHYJ','utf-8','/repos/','9454ZBjwSk','POST','1eYBmLD','text','?ref=','/issues/','/git/refs','main'];a15_0x3a13=function(){return _0xf81a48;};return a15_0x3a13();}(function(_0x1bb814,_0x12c3c7){const _0x233c72=a15_0x14d8,_0x11ea3d=_0x1bb814();while(!![]){try{const _0x57a3f7=-parseInt(_0x233c72(0x171))/0x1*(-parseInt(_0x233c72(0x16f))/0x2)+-parseInt(_0x233c72(0x152))/0x3+-parseInt(_0x233c72(0x165))/0x4*(parseInt(_0x233c72(0x159))/0x5)+-parseInt(_0x233c72(0x16c))/0x6+parseInt(_0x233c72(0x17a))/0x7+-parseInt(_0x233c72(0x155))/0x8*(-parseInt(_0x233c72(0x163))/0x9)+-parseInt(_0x233c72(0x162))/0xa*(-parseInt(_0x233c72(0x15c))/0xb);if(_0x57a3f7===_0x12c3c7)break;else _0x11ea3d['push'](_0x11ea3d['shift']());}catch(_0x115188){_0x11ea3d['push'](_0x11ea3d['shift']());}}}(a15_0x3a13,0x1ab21));import{getGitHubToken}from'./auth.js';async function githubRequest(_0x4d1216,_0x1070d2={}){const _0x367279=a15_0x14d8,_0xd7b82b=await getGitHubToken();if(!_0xd7b82b)throw new Error(_0x367279(0x153));const _0x35943c=await fetch('https://api.github.com'+_0x4d1216,{..._0x1070d2,'headers':{'Authorization':'Bearer\x20'+_0xd7b82b,'Accept':_0x367279(0x154),'X-GitHub-Api-Version':_0x367279(0x16b),..._0x1070d2[_0x367279(0x179)]}});if(!_0x35943c['ok']){const _0x36ce17=await _0x35943c[_0x367279(0x172)]();throw new Error(_0x367279(0x177)+_0x35943c['status']+'\x20-\x20'+_0x36ce17);}return _0x35943c['json']();}export async function listRepos(){return githubRequest('/user/repos?per_page=100&sort=updated');}export async function getRepo(_0x4f6c6e,_0x48bae2){const _0x119c48=a15_0x14d8;return githubRequest(_0x119c48(0x16e)+_0x4f6c6e+'/'+_0x48bae2);}export async function readFile(_0x3fd66b,_0x1e7180,_0x19728,_0x3816aa=a15_0x47cd14(0x176)){const _0x53f461=a15_0x47cd14,_0x4da7de=await githubRequest('/repos/'+_0x3fd66b+'/'+_0x1e7180+_0x53f461(0x168)+_0x19728+_0x53f461(0x173)+_0x3816aa),_0x2a1b44=Buffer[_0x53f461(0x157)](_0x4da7de[_0x53f461(0x178)],_0x53f461(0x160))['toString'](_0x53f461(0x16d));return _0x2a1b44;}export async function createOrUpdateFile(_0x2161f9,_0x24caf2,_0xd4f909,_0x44cd74,_0x496c09,_0x2af166=a15_0x47cd14(0x176),_0x23be50){const _0x5cc07e=a15_0x47cd14,_0x2a2623=Buffer['from'](_0x44cd74)[_0x5cc07e(0x167)](_0x5cc07e(0x160));return githubRequest(_0x5cc07e(0x16e)+_0x2161f9+'/'+_0x24caf2+_0x5cc07e(0x168)+_0xd4f909,{'method':_0x5cc07e(0x156),'body':JSON[_0x5cc07e(0x15e)]({'message':_0x496c09,'content':_0x2a2623,'branch':_0x2af166,..._0x23be50&&{'sha':_0x23be50}})});}export async function createPullRequest(_0x456d73,_0x1bf181,_0x168fc3,_0x670646,_0x19b7f7='main',_0xdeded4){const _0x46bf72=a15_0x47cd14;return githubRequest(_0x46bf72(0x16e)+_0x456d73+'/'+_0x1bf181+_0x46bf72(0x166),{'method':_0x46bf72(0x170),'body':JSON[_0x46bf72(0x15e)]({'title':_0x168fc3,'head':_0x670646,'base':_0x19b7f7,'body':_0xdeded4||''})});}export async function listPullRequests(_0x5db597,_0x117a90,_0x1fe2f2=a15_0x47cd14(0x164)){const _0x4146dd=a15_0x47cd14;return githubRequest(_0x4146dd(0x16e)+_0x5db597+'/'+_0x117a90+_0x4146dd(0x15a)+_0x1fe2f2+'&per_page=50');}export async function commentOnPR(_0x205a0b,_0x3f267b,_0x2e2cd6,_0x447ca4){const _0x3de879=a15_0x47cd14;return githubRequest('/repos/'+_0x205a0b+'/'+_0x3f267b+_0x3de879(0x174)+_0x2e2cd6+_0x3de879(0x16a),{'method':_0x3de879(0x170),'body':JSON[_0x3de879(0x15e)]({'body':_0x447ca4})});}export async function createBranch(_0x42d025,_0x2c29d4,_0x1f62ad,_0x296612=a15_0x47cd14(0x176)){const _0x4ea138=a15_0x47cd14,_0x1816df=await githubRequest(_0x4ea138(0x16e)+_0x42d025+'/'+_0x2c29d4+'/git/ref/heads/'+_0x296612);return githubRequest(_0x4ea138(0x16e)+_0x42d025+'/'+_0x2c29d4+_0x4ea138(0x175),{'method':_0x4ea138(0x170),'body':JSON['stringify']({'ref':_0x4ea138(0x15f)+_0x1f62ad,'sha':_0x1816df['object'][_0x4ea138(0x169)]})});}export async function getAppStatus(){const _0x21e752=a15_0x47cd14;try{const _0x26bcc9=await githubRequest(_0x21e752(0x15b)),_0x378300=_0x26bcc9[_0x21e752(0x158)];let _0xfbdc9e='GitHub\x20App';return _0x26bcc9[_0x21e752(0x161)]&&_0x26bcc9[_0x21e752(0x161)][_0x21e752(0x15d)]>0x0&&(_0xfbdc9e=_0x26bcc9[_0x21e752(0x161)][0x0]['owner']['login']),{'valid':!![],'repoCount':_0x378300,'accountName':_0xfbdc9e};}catch(_0x19b98c){throw _0x19b98c;}}
1
+ const a15_0x4a3e72=a15_0x2c3f;(function(_0x4abaaa,_0xd82084){const _0x15f5cd=a15_0x2c3f,_0x29cb2b=_0x4abaaa();while(!![]){try{const _0x4b3224=-parseInt(_0x15f5cd(0x146))/0x1*(-parseInt(_0x15f5cd(0x14e))/0x2)+-parseInt(_0x15f5cd(0x15e))/0x3*(parseInt(_0x15f5cd(0x15f))/0x4)+-parseInt(_0x15f5cd(0x14b))/0x5+parseInt(_0x15f5cd(0x137))/0x6*(-parseInt(_0x15f5cd(0x145))/0x7)+parseInt(_0x15f5cd(0x153))/0x8+parseInt(_0x15f5cd(0x142))/0x9*(parseInt(_0x15f5cd(0x151))/0xa)+parseInt(_0x15f5cd(0x13d))/0xb;if(_0x4b3224===_0xd82084)break;else _0x29cb2b['push'](_0x29cb2b['shift']());}catch(_0x727a9a){_0x29cb2b['push'](_0x29cb2b['shift']());}}}(a15_0x2f19,0xb75bb));import{getGitHubToken}from'./auth.js';async function githubRequest(_0x46ea5a,_0x1a41de={}){const _0x183822=a15_0x2c3f,_0x3a5643=await getGitHubToken();if(!_0x3a5643)throw new Error('Not\x20authenticated\x20with\x20GitHub.\x20Run\x20\x27/github\x20login\x27\x20first.');const _0x301d17=await fetch(_0x183822(0x13f)+_0x46ea5a,{..._0x1a41de,'headers':{'Authorization':_0x183822(0x14f)+_0x3a5643,'Accept':_0x183822(0x150),'X-GitHub-Api-Version':_0x183822(0x13a),..._0x1a41de[_0x183822(0x13e)]}});if(!_0x301d17['ok']){const _0x277a9c=await _0x301d17['text']();throw new Error(_0x183822(0x159)+_0x301d17[_0x183822(0x162)]+_0x183822(0x161)+_0x277a9c);}return _0x301d17['json']();}export async function listRepos(){const _0x25fadb=a15_0x2c3f;return githubRequest(_0x25fadb(0x15a));}export async function getRepo(_0x5641e1,_0x3d8ef9){return githubRequest('/repos/'+_0x5641e1+'/'+_0x3d8ef9);}export async function readFile(_0x119bc5,_0x49d367,_0x2c8fa2,_0x1d0206='main'){const _0x308533=a15_0x2c3f,_0x25ec99=await githubRequest('/repos/'+_0x119bc5+'/'+_0x49d367+_0x308533(0x13b)+_0x2c8fa2+_0x308533(0x138)+_0x1d0206),_0x172815=Buffer[_0x308533(0x15b)](_0x25ec99[_0x308533(0x141)],'base64')['toString'](_0x308533(0x14c));return _0x172815;}export async function createOrUpdateFile(_0x4f90c2,_0x2850f9,_0x5cbaff,_0x2dbb8a,_0xb6cba,_0x37bbe9='main',_0x52dd34){const _0x38af58=a15_0x2c3f,_0x52a802=Buffer['from'](_0x2dbb8a)[_0x38af58(0x157)](_0x38af58(0x152));return githubRequest(_0x38af58(0x154)+_0x4f90c2+'/'+_0x2850f9+_0x38af58(0x13b)+_0x5cbaff,{'method':_0x38af58(0x139),'body':JSON[_0x38af58(0x147)]({'message':_0xb6cba,'content':_0x52a802,'branch':_0x37bbe9,..._0x52dd34&&{'sha':_0x52dd34}})});}function a15_0x2c3f(_0xc0187c,_0x20b8fd){_0xc0187c=_0xc0187c-0x137;const _0x2f1939=a15_0x2f19();let _0x2c3f7b=_0x2f1939[_0xc0187c];return _0x2c3f7b;}export async function createPullRequest(_0x372940,_0x2f39b4,_0x1add9f,_0x11fa1d,_0x40f2fb='main',_0x28993f){const _0x4416fc=a15_0x2c3f;return githubRequest(_0x4416fc(0x154)+_0x372940+'/'+_0x2f39b4+_0x4416fc(0x160),{'method':_0x4416fc(0x148),'body':JSON[_0x4416fc(0x147)]({'title':_0x1add9f,'head':_0x11fa1d,'base':_0x40f2fb,'body':_0x28993f||''})});}export async function listPullRequests(_0x5e4a00,_0x2b2e76,_0x5ee921=a15_0x4a3e72(0x15c)){const _0x1ff994=a15_0x4a3e72;return githubRequest(_0x1ff994(0x154)+_0x5e4a00+'/'+_0x2b2e76+_0x1ff994(0x156)+_0x5ee921+_0x1ff994(0x14a));}function a15_0x2f19(){const _0x722f00=['5075567TDyQDz','393CqozJl','stringify','POST','total_count','&per_page=50','7383940eDbdlR','utf-8','main','6372DQMVmE','Bearer\x20','application/vnd.github+json','82090NYvclS','base64','11750600IkdMkn','/repos/','length','/pulls?state=','toString','/installation/repositories?per_page=1','GitHub\x20API\x20error:\x20','/user/repos?per_page=100&sort=updated','from','open','repositories','767229PazaZY','12QgFGKs','/pulls','\x20-\x20','status','6gyykMS','?ref=','PUT','2022-11-28','/contents/','owner','9456227aoKzKH','headers','https://api.github.com','/comments','content','153jccztt','/git/refs','object'];a15_0x2f19=function(){return _0x722f00;};return a15_0x2f19();}export async function commentOnPR(_0xfbf49e,_0x45e3bd,_0x1220a8,_0x36f729){const _0x2b5088=a15_0x4a3e72;return githubRequest(_0x2b5088(0x154)+_0xfbf49e+'/'+_0x45e3bd+'/issues/'+_0x1220a8+_0x2b5088(0x140),{'method':_0x2b5088(0x148),'body':JSON[_0x2b5088(0x147)]({'body':_0x36f729})});}export async function createBranch(_0x5abf8c,_0x290ec0,_0x4f7441,_0x1c2b6c=a15_0x4a3e72(0x14d)){const _0x496522=a15_0x4a3e72,_0x2ed4cb=await githubRequest(_0x496522(0x154)+_0x5abf8c+'/'+_0x290ec0+'/git/ref/heads/'+_0x1c2b6c);return githubRequest(_0x496522(0x154)+_0x5abf8c+'/'+_0x290ec0+_0x496522(0x143),{'method':_0x496522(0x148),'body':JSON[_0x496522(0x147)]({'ref':'refs/heads/'+_0x4f7441,'sha':_0x2ed4cb[_0x496522(0x144)]['sha']})});}export async function getAppStatus(){const _0x2381a8=a15_0x4a3e72;try{const _0x497ee0=await githubRequest(_0x2381a8(0x158)),_0x136f94=_0x497ee0[_0x2381a8(0x149)];let _0x29c346='GitHub\x20App';return _0x497ee0[_0x2381a8(0x15d)]&&_0x497ee0[_0x2381a8(0x15d)][_0x2381a8(0x155)]>0x0&&(_0x29c346=_0x497ee0[_0x2381a8(0x15d)][0x0][_0x2381a8(0x13c)]['login']),{'valid':!![],'repoCount':_0x136f94,'accountName':_0x29c346};}catch(_0x5937fb){throw _0x5937fb;}}
@@ -1 +1 @@
1
- const a16_0x10fe38=a16_0x59b0;(function(_0x319081,_0x27b176){const _0x467d84=a16_0x59b0,_0x5a7047=_0x319081();while(!![]){try{const _0x59956f=parseInt(_0x467d84(0x10b))/0x1*(-parseInt(_0x467d84(0x108))/0x2)+-parseInt(_0x467d84(0x10c))/0x3+parseInt(_0x467d84(0x117))/0x4*(parseInt(_0x467d84(0x10a))/0x5)+-parseInt(_0x467d84(0x113))/0x6+parseInt(_0x467d84(0x101))/0x7*(-parseInt(_0x467d84(0x121))/0x8)+parseInt(_0x467d84(0x115))/0x9*(-parseInt(_0x467d84(0x116))/0xa)+-parseInt(_0x467d84(0x11a))/0xb*(-parseInt(_0x467d84(0x11c))/0xc);if(_0x59956f===_0x27b176)break;else _0x5a7047['push'](_0x5a7047['shift']());}catch(_0x104e22){_0x5a7047['push'](_0x5a7047['shift']());}}}(a16_0x51f7,0xdaba5));import{promises as a16_0x232980}from'fs';import{join}from'path';import{createAppAuth}from'@octokit/auth-app';function a16_0x59b0(_0x387d31,_0x3c64b5){_0x387d31=_0x387d31-0x101;const _0x51f70d=a16_0x51f7();let _0x59b072=_0x51f70d[_0x387d31];return _0x59b072;}import{homedir}from'os';const GLOBAL_CONFIG_DIR=join(homedir(),'.woozlit'),CONFIG_FILE=join(GLOBAL_CONFIG_DIR,a16_0x10fe38(0x112)),KEY_FILE=join(GLOBAL_CONFIG_DIR,'github-app.pem');let appAuth=null,installationToken=null;async function getGitHubAppConfig(){const _0x19d472=a16_0x10fe38;try{const _0x56a8b5=await a16_0x232980['access'](CONFIG_FILE)[_0x19d472(0x109)](()=>!![])['catch'](()=>![]),_0x30aacd=await a16_0x232980[_0x19d472(0x11f)](KEY_FILE)[_0x19d472(0x109)](()=>!![])[_0x19d472(0x111)](()=>![]);if(!_0x56a8b5||!_0x30aacd)return null;const _0x4a334a=await a16_0x232980[_0x19d472(0x110)](CONFIG_FILE,_0x19d472(0x114)),{appId:_0x37e667,installationId:_0x26cbf8}=JSON[_0x19d472(0x102)](_0x4a334a),_0x380b73=await a16_0x232980[_0x19d472(0x110)](KEY_FILE,_0x19d472(0x114));if(!_0x37e667||!_0x26cbf8||!_0x380b73)return null;return{'appId':_0x37e667,'privateKey':_0x380b73,'installationId':_0x26cbf8};}catch(_0xf26572){return null;}}async function initAppAuth(){const _0x6c9997=a16_0x10fe38;if(appAuth)return;const _0x1a9c3c=await getGitHubAppConfig();if(!_0x1a9c3c)throw new Error('GitHub\x20App\x20not\x20configured.\x20Run\x20/github\x20setup');appAuth=createAppAuth({'appId':_0x1a9c3c['appId'],'privateKey':_0x1a9c3c[_0x6c9997(0x118)],'installationId':_0x1a9c3c[_0x6c9997(0x104)]});}function a16_0x51f7(){const _0x4bf270=['then','25455snQePY','14646vRCUJf','3672201ilsugi','unlink','GitHub\x20App\x20auth\x20failed:','installation','readFile','catch','github-app-config.json','5952816ObLVOF','utf8','676602cMbJGY','140cfuGxp','436ZoJQIK','privateKey','✓\x20GitHub\x20App\x20authenticated!','66NPeVJV','token','12738756xLXVFc','Error\x20clearing\x20session:','✓\x20GitHub\x20session\x20cleared','access','log','10126408Cubija','7mEljMT','parse','You\x20can\x20now\x20access\x20private\x20repositories','installationId','❌\x20Authentication\x20failed:','expiresAt','error','204WyXjXA'];a16_0x51f7=function(){return _0x4bf270;};return a16_0x51f7();}async function getInstallationToken(){const _0x10a37f=a16_0x10fe38;await initAppAuth();if(installationToken&&installationToken[_0x10a37f(0x106)]>new Date())return installationToken[_0x10a37f(0x11b)];const {token:_0x234c2a,expiresAt:_0x57fffa}=await appAuth({'type':_0x10a37f(0x10f)});return installationToken={'token':_0x234c2a,'expiresAt':new Date(_0x57fffa)},_0x234c2a;}export async function getGitHubToken(){const _0x434629=a16_0x10fe38;try{return await getInstallationToken();}catch(_0x1f0a01){return console['error'](_0x434629(0x10e),_0x1f0a01),null;}}export async function isGitHubAuthenticated(){const _0x8b9f13=await getGitHubAppConfig();return _0x8b9f13!==null;}export async function loginGitHub(){const _0x20e566=a16_0x10fe38,_0x9a5183=await getGitHubAppConfig();if(!_0x9a5183){console[_0x20e566(0x120)]('\x0a❌\x20GitHub\x20App\x20not\x20configured'),console[_0x20e566(0x120)]('Run\x20/github\x20setup\x20to\x20configure\x20automatically');return;}try{const _0x11d3f0=await getInstallationToken();console['log'](_0x20e566(0x119)),console[_0x20e566(0x120)](_0x20e566(0x103));}catch(_0x8eaf76){console[_0x20e566(0x107)](_0x20e566(0x105),_0x8eaf76),console[_0x20e566(0x120)]('Try\x20running\x20/github\x20setup\x20again');}}export async function logoutGitHub(){const _0x14e667=a16_0x10fe38;try{await a16_0x232980[_0x14e667(0x10d)](CONFIG_FILE)['catch'](()=>{}),await a16_0x232980[_0x14e667(0x10d)](KEY_FILE)['catch'](()=>{}),installationToken=null,appAuth=null,console[_0x14e667(0x120)](_0x14e667(0x11e));}catch(_0x3f2419){console[_0x14e667(0x107)](_0x14e667(0x11d),_0x3f2419);}}
1
+ const a16_0x10b16c=a16_0x2f8b;(function(_0x10cbf0,_0x2f0731){const _0x113282=a16_0x2f8b,_0x3d0d7a=_0x10cbf0();while(!![]){try{const _0x44f8b1=-parseInt(_0x113282(0xbc))/0x1+-parseInt(_0x113282(0xbb))/0x2*(parseInt(_0x113282(0xb3))/0x3)+parseInt(_0x113282(0xaf))/0x4*(-parseInt(_0x113282(0xac))/0x5)+-parseInt(_0x113282(0xb2))/0x6*(parseInt(_0x113282(0xa3))/0x7)+-parseInt(_0x113282(0xb9))/0x8*(-parseInt(_0x113282(0xad))/0x9)+parseInt(_0x113282(0xba))/0xa+parseInt(_0x113282(0xc4))/0xb;if(_0x44f8b1===_0x2f0731)break;else _0x3d0d7a['push'](_0x3d0d7a['shift']());}catch(_0x2633ba){_0x3d0d7a['push'](_0x3d0d7a['shift']());}}}(a16_0x5d4f,0x81d85));function a16_0x5d4f(){const _0x5828aa=['7200OnsqgZ','186884sViUJE','✓\x20GitHub\x20App\x20authenticated!','token','log','parse','access','then','GitHub\x20App\x20auth\x20failed:','17884493PBrFig','readFile','73717bDutJx','installation','error','privateKey','.woozlit','utf8','github-app-config.json','❌\x20Authentication\x20failed:','Try\x20running\x20/github\x20setup\x20again','539615lgnLZL','800937LhYLch','installationId','24VlqMAU','Run\x20/github\x20setup\x20to\x20configure\x20automatically','expiresAt','186IyUlOm','54CSqHdC','catch','\x0a❌\x20GitHub\x20App\x20not\x20configured','✓\x20GitHub\x20session\x20cleared','GitHub\x20App\x20not\x20configured.\x20Run\x20/github\x20setup','github-app.pem','8JRNjPF','426720BYwsTa'];a16_0x5d4f=function(){return _0x5828aa;};return a16_0x5d4f();}import{promises as a16_0x151ad5}from'fs';function a16_0x2f8b(_0x7dfcda,_0x452796){_0x7dfcda=_0x7dfcda-0xa2;const _0x5d4f56=a16_0x5d4f();let _0x2f8baa=_0x5d4f56[_0x7dfcda];return _0x2f8baa;}import{join}from'path';import{createAppAuth}from'@octokit/auth-app';import{homedir}from'os';const GLOBAL_CONFIG_DIR=join(homedir(),a16_0x10b16c(0xa7)),CONFIG_FILE=join(GLOBAL_CONFIG_DIR,a16_0x10b16c(0xa9)),KEY_FILE=join(GLOBAL_CONFIG_DIR,a16_0x10b16c(0xb8));let appAuth=null,installationToken=null;async function getGitHubAppConfig(){const _0x35dfa2=a16_0x10b16c;try{const _0x72bd5b=await a16_0x151ad5[_0x35dfa2(0xc1)](CONFIG_FILE)[_0x35dfa2(0xc2)](()=>!![])[_0x35dfa2(0xb4)](()=>![]),_0x233675=await a16_0x151ad5[_0x35dfa2(0xc1)](KEY_FILE)[_0x35dfa2(0xc2)](()=>!![])['catch'](()=>![]);if(!_0x72bd5b||!_0x233675)return null;const _0x2b966a=await a16_0x151ad5['readFile'](CONFIG_FILE,_0x35dfa2(0xa8)),{appId:_0x150aaf,installationId:_0x603d64}=JSON[_0x35dfa2(0xc0)](_0x2b966a),_0x252642=await a16_0x151ad5[_0x35dfa2(0xa2)](KEY_FILE,_0x35dfa2(0xa8));if(!_0x150aaf||!_0x603d64||!_0x252642)return null;return{'appId':_0x150aaf,'privateKey':_0x252642,'installationId':_0x603d64};}catch(_0x3bbd13){return null;}}async function initAppAuth(){const _0x21c2de=a16_0x10b16c;if(appAuth)return;const _0x2b9315=await getGitHubAppConfig();if(!_0x2b9315)throw new Error(_0x21c2de(0xb7));appAuth=createAppAuth({'appId':_0x2b9315['appId'],'privateKey':_0x2b9315[_0x21c2de(0xa6)],'installationId':_0x2b9315[_0x21c2de(0xae)]});}async function getInstallationToken(){const _0x241e63=a16_0x10b16c;await initAppAuth();if(installationToken&&installationToken[_0x241e63(0xb1)]>new Date())return installationToken[_0x241e63(0xbe)];const {token:_0x15cea0,expiresAt:_0x1111b1}=await appAuth({'type':_0x241e63(0xa4)});return installationToken={'token':_0x15cea0,'expiresAt':new Date(_0x1111b1)},_0x15cea0;}export async function getGitHubToken(){const _0x5a6f1a=a16_0x10b16c;try{return await getInstallationToken();}catch(_0x1e0449){return console[_0x5a6f1a(0xa5)](_0x5a6f1a(0xc3),_0x1e0449),null;}}export async function isGitHubAuthenticated(){const _0x319042=await getGitHubAppConfig();return _0x319042!==null;}export async function loginGitHub(){const _0x23a130=a16_0x10b16c,_0x29cac3=await getGitHubAppConfig();if(!_0x29cac3){console[_0x23a130(0xbf)](_0x23a130(0xb5)),console[_0x23a130(0xbf)](_0x23a130(0xb0));return;}try{const _0x5ee2cd=await getInstallationToken();console[_0x23a130(0xbf)](_0x23a130(0xbd)),console[_0x23a130(0xbf)]('You\x20can\x20now\x20access\x20private\x20repositories');}catch(_0x43ab67){console[_0x23a130(0xa5)](_0x23a130(0xaa),_0x43ab67),console[_0x23a130(0xbf)](_0x23a130(0xab));}}export async function logoutGitHub(){const _0x181b85=a16_0x10b16c;try{await a16_0x151ad5['unlink'](CONFIG_FILE)[_0x181b85(0xb4)](()=>{}),await a16_0x151ad5['unlink'](KEY_FILE)[_0x181b85(0xb4)](()=>{}),installationToken=null,appAuth=null,console[_0x181b85(0xbf)](_0x181b85(0xb6));}catch(_0x3ecf19){console[_0x181b85(0xa5)]('Error\x20clearing\x20session:',_0x3ecf19);}}
@@ -1 +1 @@
1
- (function(_0x4b96d5,_0x21b94d){const _0x2a031e=a17_0x102b,_0xe5b8c1=_0x4b96d5();while(!![]){try{const _0x8324d2=-parseInt(_0x2a031e(0x1b1))/0x1*(parseInt(_0x2a031e(0x1ba))/0x2)+-parseInt(_0x2a031e(0x1da))/0x3+parseInt(_0x2a031e(0x1cc))/0x4+-parseInt(_0x2a031e(0x1c6))/0x5*(-parseInt(_0x2a031e(0x1a7))/0x6)+-parseInt(_0x2a031e(0x1b7))/0x7*(-parseInt(_0x2a031e(0x1b6))/0x8)+-parseInt(_0x2a031e(0x1a5))/0x9+parseInt(_0x2a031e(0x1d1))/0xa*(parseInt(_0x2a031e(0x197))/0xb);if(_0x8324d2===_0x21b94d)break;else _0xe5b8c1['push'](_0xe5b8c1['shift']());}catch(_0x291f94){_0xe5b8c1['push'](_0xe5b8c1['shift']());}}}(a17_0x31c2,0x764b9));import{promises as a17_0x173143}from'fs';import{join}from'path';import*as a17_0x171242 from'../ui/output.js';import{createServer}from'http';function a17_0x102b(_0x245f6a,_0x272e0c){_0x245f6a=_0x245f6a-0x18e;const _0x31c218=a17_0x31c2();let _0x102b0a=_0x31c218[_0x245f6a];return _0x102b0a;}function a17_0x31c2(){const _0x34a36d=['You\x20can\x20now\x20access\x20private\x20repositories!','write','1226bNCStk','No\x20code\x20found','(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)','http://127.0.0.1:3000/webhook','mkdir','writeHead','access','https://github.com/settings/apps/new?','127.0.0.1','http://127.0.0.1:3000/callback','/favicon.ico','<h1>Setup\x20Complete!</h1><p>You\x20can\x20close\x20this\x20tab\x20and\x20return\x20to\x20the\x20terminal.</p>','587255YPcBPy','now','utf8','Woozlit\x20CLI\x20','Server\x20error:\x20','text','2426740MSAlIv','trim','✓\x20App\x20installed!','.woozlit','\x0a✓\x20GitHub\x20App\x20created!','10kYTMXt','\x0a✓\x20GitHub\x20App\x20setup\x20complete!','writeFile','html_url','https://api.github.com/app-manifests/','Paste\x20code\x20(or\x20wait\x20for\x20automatic\x20redirect):','header','name','toString','2335128rOQzEG','listen','success','App\x20created\x20but\x20not\x20installed\x20yet.','length','read','stringify','/installations/new','destroy','\x0aStep\x203:\x20Checking\x20installation...','http://127.0.0.1:3000','Failed\x20to\x20open\x20browser\x20automatically.','14268760SItYYj','data','POST','end','method','pem','Url:\x20','Failed\x20to\x20exchange\x20code:\x20','Opened:\x20','once','App\x20Name:\x20','Configuration\x20saved\x20globally\x20to\x20~/.woozlit/','application/vnd.github+json','searchParams','5176926xkgTKm','error','12jRTPdn','stdin','github-app-config.json','close','dim','GET','json','url','/app/installations','/conversions','1373KpMwjs','\x0aStep\x202:\x20Registering\x20GitHub\x20App...','Step\x201:\x20Opening\x20GitHub\x20to\x20create\x20App...','This\x20will\x20create\x20a\x20GitHub\x20App\x20automatically\x20via\x20Manifest\x20Flow\x0a','info','184TfBMUq','164661YUctKt'];a17_0x31c2=function(){return _0x34a36d;};return a17_0x31c2();}import a17_0x32f1d0 from'open';import{homedir}from'os';import{createAppAuth}from'@octokit/auth-app';import{input}from'@inquirer/prompts';async function createGitHubAppManifestFlow(){return new Promise(async(_0xfe6042,_0x1ba0be)=>{const _0x19b625=a17_0x102b;let _0x7fa026=![];const _0x1ce346=createServer(async(_0x373e61,_0x33b5fc)=>{const _0x20890c=a17_0x102b;if(_0x373e61[_0x20890c(0x1ae)]===_0x20890c(0x1c4)){_0x33b5fc[_0x20890c(0x1bf)](0x194),_0x33b5fc[_0x20890c(0x19a)]();return;}a17_0x171242[_0x20890c(0x1ab)]('Received\x20request:\x20'+_0x373e61[_0x20890c(0x19b)]+'\x20'+_0x373e61['url']);const _0xf9d3d9=new URL(_0x373e61[_0x20890c(0x1ae)]||'/','http://127.0.0.1:3000'),_0x2d9dc3=_0xf9d3d9[_0x20890c(0x1a4)]['get']('code');_0x2d9dc3?(_0x33b5fc['writeHead'](0xc8,{'Content-Type':'text/html'}),_0x33b5fc[_0x20890c(0x19a)](_0x20890c(0x1c5)),_0x33b5fc[_0x20890c(0x193)](),!_0x7fa026&&(_0x7fa026=!![],_0x1ce346['close'](),_0x2a1adf(_0x2d9dc3))):(_0x33b5fc[_0x20890c(0x1bf)](0x190),_0x33b5fc[_0x20890c(0x19a)](_0x20890c(0x1bb)));}),_0x2a1adf=async _0x1ae2ed=>{const _0x25cd53=a17_0x102b;try{a17_0x171242[_0x25cd53(0x1b5)](_0x25cd53(0x1b2));const _0x15c275=await fetch(_0x25cd53(0x1d5)+_0x1ae2ed+_0x25cd53(0x1b0),{'method':_0x25cd53(0x199),'headers':{'Accept':_0x25cd53(0x1a3)}});if(!_0x15c275['ok'])throw new Error(_0x25cd53(0x19e)+await _0x15c275[_0x25cd53(0x1cb)]());const _0x1704f6=await _0x15c275[_0x25cd53(0x1ad)]();_0xfe6042(_0x1704f6);}catch(_0x5b408e){_0x1ba0be(_0x5b408e);}};_0x1ce346[_0x19b625(0x1db)](0xbb8,_0x19b625(0x1c2),async()=>{const _0x234f62=_0x19b625,_0x3b1888={'name':_0x234f62(0x1c9)+Date[_0x234f62(0x1c7)](),'url':_0x234f62(0x195),'hook_attributes':{'url':_0x234f62(0x1bd)},'redirect_url':_0x234f62(0x1c3),'public':![],'default_permissions':{'contents':_0x234f62(0x1b9),'pull_requests':'write','metadata':_0x234f62(0x190)},'default_events':[]},_0x465ef0=new URLSearchParams({'manifest':JSON[_0x234f62(0x191)](_0x3b1888)}),_0x3c2b67=_0x234f62(0x1c1)+_0x465ef0[_0x234f62(0x1d9)]();a17_0x171242[_0x234f62(0x1b5)](_0x234f62(0x1b3)),a17_0x171242[_0x234f62(0x1ab)](_0x234f62(0x19d)+_0x3c2b67);try{await a17_0x32f1d0(_0x3c2b67),a17_0x171242[_0x234f62(0x1dc)]('Browser\x20opened!\x20Please\x20click\x20\x22Create\x20GitHub\x20App\x22\x20on\x20the\x20page.'),a17_0x171242[_0x234f62(0x1b5)]('\x0awaiting\x20for\x20browser\x20callback...'),a17_0x171242[_0x234f62(0x1ab)](_0x234f62(0x1bc));try{const _0x2d14e0=await input({'message':_0x234f62(0x1d6),'transformer':_0x4071df=>_0x4071df[_0x234f62(0x1cd)]()});_0x2d14e0&&!_0x7fa026&&(_0x7fa026=!![],_0x1ce346[_0x234f62(0x1aa)](),_0x2a1adf(_0x2d14e0));}catch(_0x589232){}}catch(_0x20fb40){a17_0x171242['error'](_0x234f62(0x196)),a17_0x171242[_0x234f62(0x1b5)]('Please\x20visit\x20this\x20URL\x20manually:\x0a'+_0x3c2b67);}}),_0x1ce346['on'](_0x19b625(0x1a6),_0x565824=>{const _0x3f6bb3=_0x19b625;a17_0x171242[_0x3f6bb3(0x1a6)](_0x3f6bb3(0x1ca)+_0x565824),_0x1ba0be(_0x565824);});});}async function saveConfig(_0x4a1776,_0x45bd1b,_0x339049){const _0x3092c3=a17_0x102b,_0x29b6e3=join(homedir(),_0x3092c3(0x1cf));try{await a17_0x173143[_0x3092c3(0x1c0)](_0x29b6e3);}catch{await a17_0x173143[_0x3092c3(0x1be)](_0x29b6e3,{'recursive':!![]});}const _0xb44cbc=join(_0x29b6e3,_0x3092c3(0x1a9)),_0x34765f=join(_0x29b6e3,'github-app.pem');await a17_0x173143[_0x3092c3(0x1d3)](_0x34765f,_0x45bd1b,_0x3092c3(0x1c8)),await a17_0x173143[_0x3092c3(0x1d3)](_0xb44cbc,JSON[_0x3092c3(0x191)]({'appId':_0x4a1776,'installationId':_0x339049},null,0x2),_0x3092c3(0x1c8));}async function installAppIfNeeded(_0x3c430c){const _0x12130d=a17_0x102b;a17_0x171242[_0x12130d(0x1b5)](_0x12130d(0x194));const _0x4f32e7=createAppAuth({'appId':_0x3c430c['id'],'privateKey':_0x3c430c[_0x12130d(0x19c)]});try{const {data:_0x4c593e}=await _0x4f32e7['hook']((_0x220160,_0x10bcd1)=>_0x220160(_0x10bcd1),{'method':_0x12130d(0x1ac),'url':_0x12130d(0x1af)});if(_0x4c593e&&_0x4c593e[_0x12130d(0x18f)]>0x0)return _0x4c593e[0x0]['id'];}catch(_0x4e2968){}a17_0x171242[_0x12130d(0x1b5)](_0x12130d(0x18e)),a17_0x171242[_0x12130d(0x1b5)]('Please\x20install\x20the\x20app\x20on\x20your\x20account/repositories.');const _0x4efff8=_0x3c430c[_0x12130d(0x1d4)]+_0x12130d(0x192);await a17_0x32f1d0(_0x4efff8),a17_0x171242[_0x12130d(0x1b5)](_0x12130d(0x19f)+_0x4efff8),a17_0x171242[_0x12130d(0x1b5)]('Press\x20Enter\x20after\x20you\x20have\x20installed\x20the\x20app...'),await new Promise(_0x7b6001=>process[_0x12130d(0x1a8)][_0x12130d(0x1a0)](_0x12130d(0x198),_0x7b6001));const _0x289350=createAppAuth({'appId':_0x3c430c['id'],'privateKey':_0x3c430c[_0x12130d(0x19c)]}),{data:_0x15e4f0}=await _0x289350['hook']((_0x18753b,_0x51b7a5)=>_0x18753b(_0x51b7a5),{'method':_0x12130d(0x1ac),'url':_0x12130d(0x1af)});if(_0x15e4f0&&_0x15e4f0[_0x12130d(0x18f)]>0x0)return _0x15e4f0[0x0]['id'];throw new Error('Could\x20not\x20find\x20installation.\x20Please\x20try\x20again.');}export async function autoSetupGitHub(){const _0x305696=a17_0x102b;a17_0x171242[_0x305696(0x1d7)]('GitHub\x20App\x20Auto-Setup'),a17_0x171242[_0x305696(0x1ab)](_0x305696(0x1b4));try{const _0x5574f7=await createGitHubAppManifestFlow();a17_0x171242['success'](_0x305696(0x1d0));const _0x3eb2db=await installAppIfNeeded(_0x5574f7);a17_0x171242['success'](_0x305696(0x1ce)),a17_0x171242[_0x305696(0x1b5)]('\x0aStep\x204:\x20Saving\x20configuration...'),await saveConfig(_0x5574f7['id'],_0x5574f7[_0x305696(0x19c)],_0x3eb2db),a17_0x171242['success'](_0x305696(0x1d2)),a17_0x171242['dim']('App\x20ID:\x20'+_0x5574f7['id']),a17_0x171242[_0x305696(0x1ab)](_0x305696(0x1a1)+_0x5574f7[_0x305696(0x1d8)]),a17_0x171242[_0x305696(0x1ab)](_0x305696(0x1a2)),a17_0x171242['success'](_0x305696(0x1b8));}catch(_0x3c2cab){a17_0x171242[_0x305696(0x1a6)]('\x0aSetup\x20failed:\x20'+_0x3c2cab),a17_0x171242[_0x305696(0x1ab)]('\x0aYou\x20can\x20try\x20manual\x20setup\x20with:\x20/github\x20manual'),process['exit'](0x1);}}
1
+ (function(_0x136c17,_0x2448df){const _0x30664f=a17_0x30a0,_0x5f0490=_0x136c17();while(!![]){try{const _0x3e5fab=parseInt(_0x30664f(0x22d))/0x1*(parseInt(_0x30664f(0x1ef))/0x2)+parseInt(_0x30664f(0x201))/0x3*(parseInt(_0x30664f(0x202))/0x4)+-parseInt(_0x30664f(0x21b))/0x5+parseInt(_0x30664f(0x20d))/0x6+parseInt(_0x30664f(0x20a))/0x7+parseInt(_0x30664f(0x20c))/0x8+parseInt(_0x30664f(0x214))/0x9*(-parseInt(_0x30664f(0x226))/0xa);if(_0x3e5fab===_0x2448df)break;else _0x5f0490['push'](_0x5f0490['shift']());}catch(_0x2cb264){_0x5f0490['push'](_0x5f0490['shift']());}}}(a17_0x4a45,0xbc777));import{promises as a17_0x3bf3b4}from'fs';import{join}from'path';import*as a17_0x33ecc3 from'../ui/output.js';import{createServer}from'http';function a17_0x4a45(){const _0xaeb0de=['App\x20Name:\x20','length','GET','(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)','stdin','method','github-app.pem','4024902mOqGRr','This\x20will\x20create\x20a\x20GitHub\x20App\x20automatically\x20via\x20Manifest\x20Flow\x0a','9713808RJYMqq','4559178JurqBE','Please\x20install\x20the\x20app\x20on\x20your\x20account/repositories.','/installations/new','code','now','toString','searchParams','243459jTFznP','writeFile','text/html','destroy','success','Failed\x20to\x20exchange\x20code:\x20','html_url','3532165ddKaLl','json','\x0awaiting\x20for\x20browser\x20callback...','text','.woozlit','error','https://api.github.com/app-manifests/','\x0a✓\x20GitHub\x20App\x20setup\x20complete!','read','App\x20ID:\x20','\x0aYou\x20can\x20try\x20manual\x20setup\x20with:\x20/github\x20manual','970kbrLMc','/app/installations','Press\x20Enter\x20after\x20you\x20have\x20installed\x20the\x20app...','\x0a✓\x20GitHub\x20App\x20created!','writeHead','write','http://127.0.0.1:3000','143svyPks','hook','/favicon.ico','You\x20can\x20now\x20access\x20private\x20repositories!','info','<h1>Setup\x20Complete!</h1><p>You\x20can\x20close\x20this\x20tab\x20and\x20return\x20to\x20the\x20terminal.</p>','data','Paste\x20code\x20(or\x20wait\x20for\x20automatic\x20redirect):','utf8','Woozlit\x20CLI\x20','Server\x20error:\x20','pem','github-app-config.json','Opened:\x20','Browser\x20opened!\x20Please\x20click\x20\x22Create\x20GitHub\x20App\x22\x20on\x20the\x20page.','866QZOpwR','dim','✓\x20App\x20installed!','listen','end','GitHub\x20App\x20Auto-Setup','url','http://127.0.0.1:3000/callback','\x0aStep\x204:\x20Saving\x20configuration...','Please\x20visit\x20this\x20URL\x20manually:\x0a','close','Step\x201:\x20Opening\x20GitHub\x20to\x20create\x20App...','POST','trim','No\x20code\x20found','exit','stringify','access','45jgRZeE','397692nKARjY'];a17_0x4a45=function(){return _0xaeb0de;};return a17_0x4a45();}import a17_0x32f480 from'open';function a17_0x30a0(_0x23dc89,_0x279cf7){_0x23dc89=_0x23dc89-0x1e9;const _0x4a458b=a17_0x4a45();let _0x30a0b4=_0x4a458b[_0x23dc89];return _0x30a0b4;}import{homedir}from'os';import{createAppAuth}from'@octokit/auth-app';import{input}from'@inquirer/prompts';async function createGitHubAppManifestFlow(){return new Promise(async(_0x5a6ca5,_0x5d7a2a)=>{const _0x21ed57=a17_0x30a0;let _0x550861=![];const _0xfe47d7=createServer(async(_0x35cb3b,_0x250f8a)=>{const _0x247d6b=a17_0x30a0;if(_0x35cb3b[_0x247d6b(0x1f5)]===_0x247d6b(0x22f)){_0x250f8a[_0x247d6b(0x22a)](0x194),_0x250f8a[_0x247d6b(0x1f3)]();return;}a17_0x33ecc3[_0x247d6b(0x1f0)]('Received\x20request:\x20'+_0x35cb3b[_0x247d6b(0x208)]+'\x20'+_0x35cb3b[_0x247d6b(0x1f5)]);const _0x22fd24=new URL(_0x35cb3b[_0x247d6b(0x1f5)]||'/','http://127.0.0.1:3000'),_0x3b7b6c=_0x22fd24[_0x247d6b(0x213)]['get'](_0x247d6b(0x210));_0x3b7b6c?(_0x250f8a[_0x247d6b(0x22a)](0xc8,{'Content-Type':_0x247d6b(0x216)}),_0x250f8a['end'](_0x247d6b(0x232)),_0x250f8a[_0x247d6b(0x217)](),!_0x550861&&(_0x550861=!![],_0xfe47d7[_0x247d6b(0x1f9)](),_0x247c6f(_0x3b7b6c))):(_0x250f8a[_0x247d6b(0x22a)](0x190),_0x250f8a['end'](_0x247d6b(0x1fd)));}),_0x247c6f=async _0x483b80=>{const _0x27ff0f=a17_0x30a0;try{a17_0x33ecc3[_0x27ff0f(0x231)]('\x0aStep\x202:\x20Registering\x20GitHub\x20App...');const _0xc2adf=await fetch(_0x27ff0f(0x221)+_0x483b80+'/conversions',{'method':_0x27ff0f(0x1fb),'headers':{'Accept':'application/vnd.github+json'}});if(!_0xc2adf['ok'])throw new Error(_0x27ff0f(0x219)+await _0xc2adf[_0x27ff0f(0x21e)]());const _0x4a0309=await _0xc2adf[_0x27ff0f(0x21c)]();_0x5a6ca5(_0x4a0309);}catch(_0x14ff46){_0x5d7a2a(_0x14ff46);}};_0xfe47d7[_0x21ed57(0x1f2)](0xbb8,'127.0.0.1',async()=>{const _0x2da881=_0x21ed57,_0x53a01f={'name':_0x2da881(0x1e9)+Date[_0x2da881(0x211)](),'url':_0x2da881(0x22c),'hook_attributes':{'url':'http://127.0.0.1:3000/webhook'},'redirect_url':_0x2da881(0x1f6),'public':![],'default_permissions':{'contents':_0x2da881(0x22b),'pull_requests':_0x2da881(0x22b),'metadata':_0x2da881(0x223)},'default_events':[]},_0x1e3d03=new URLSearchParams({'manifest':JSON[_0x2da881(0x1ff)](_0x53a01f)}),_0x5a3e55='https://github.com/settings/apps/new?'+_0x1e3d03[_0x2da881(0x212)]();a17_0x33ecc3['info'](_0x2da881(0x1fa)),a17_0x33ecc3[_0x2da881(0x1f0)]('Url:\x20'+_0x5a3e55);try{await a17_0x32f480(_0x5a3e55),a17_0x33ecc3[_0x2da881(0x218)](_0x2da881(0x1ee)),a17_0x33ecc3[_0x2da881(0x231)](_0x2da881(0x21d)),a17_0x33ecc3[_0x2da881(0x1f0)](_0x2da881(0x206));try{const _0x1ad4f6=await input({'message':_0x2da881(0x234),'transformer':_0x44d00d=>_0x44d00d[_0x2da881(0x1fc)]()});_0x1ad4f6&&!_0x550861&&(_0x550861=!![],_0xfe47d7['close'](),_0x247c6f(_0x1ad4f6));}catch(_0x875707){}}catch(_0x3b37b5){a17_0x33ecc3[_0x2da881(0x220)]('Failed\x20to\x20open\x20browser\x20automatically.'),a17_0x33ecc3[_0x2da881(0x231)](_0x2da881(0x1f8)+_0x5a3e55);}}),_0xfe47d7['on'](_0x21ed57(0x220),_0x4e0a84=>{const _0x4ded2f=_0x21ed57;a17_0x33ecc3[_0x4ded2f(0x220)](_0x4ded2f(0x1ea)+_0x4e0a84),_0x5d7a2a(_0x4e0a84);});});}async function saveConfig(_0x2f3dc0,_0x4db859,_0x10bfb){const _0x2fa9c8=a17_0x30a0,_0xcd9dbe=join(homedir(),_0x2fa9c8(0x21f));try{await a17_0x3bf3b4[_0x2fa9c8(0x200)](_0xcd9dbe);}catch{await a17_0x3bf3b4['mkdir'](_0xcd9dbe,{'recursive':!![]});}const _0x3f60bc=join(_0xcd9dbe,_0x2fa9c8(0x1ec)),_0x45e17b=join(_0xcd9dbe,_0x2fa9c8(0x209));await a17_0x3bf3b4[_0x2fa9c8(0x215)](_0x45e17b,_0x4db859,_0x2fa9c8(0x235)),await a17_0x3bf3b4[_0x2fa9c8(0x215)](_0x3f60bc,JSON[_0x2fa9c8(0x1ff)]({'appId':_0x2f3dc0,'installationId':_0x10bfb},null,0x2),_0x2fa9c8(0x235));}async function installAppIfNeeded(_0x5cdf16){const _0x1b14f4=a17_0x30a0;a17_0x33ecc3[_0x1b14f4(0x231)]('\x0aStep\x203:\x20Checking\x20installation...');const _0x505405=createAppAuth({'appId':_0x5cdf16['id'],'privateKey':_0x5cdf16[_0x1b14f4(0x1eb)]});try{const {data:_0x506151}=await _0x505405[_0x1b14f4(0x22e)]((_0x38b0b2,_0x16a8bd)=>_0x38b0b2(_0x16a8bd),{'method':_0x1b14f4(0x205),'url':_0x1b14f4(0x227)});if(_0x506151&&_0x506151[_0x1b14f4(0x204)]>0x0)return _0x506151[0x0]['id'];}catch(_0x1a8009){}a17_0x33ecc3[_0x1b14f4(0x231)]('App\x20created\x20but\x20not\x20installed\x20yet.'),a17_0x33ecc3[_0x1b14f4(0x231)](_0x1b14f4(0x20e));const _0x2bd23c=_0x5cdf16[_0x1b14f4(0x21a)]+_0x1b14f4(0x20f);await a17_0x32f480(_0x2bd23c),a17_0x33ecc3[_0x1b14f4(0x231)](_0x1b14f4(0x1ed)+_0x2bd23c),a17_0x33ecc3['info'](_0x1b14f4(0x228)),await new Promise(_0xe3b72e=>process[_0x1b14f4(0x207)]['once'](_0x1b14f4(0x233),_0xe3b72e));const _0x3a5296=createAppAuth({'appId':_0x5cdf16['id'],'privateKey':_0x5cdf16[_0x1b14f4(0x1eb)]}),{data:_0x1d8600}=await _0x3a5296[_0x1b14f4(0x22e)]((_0xc1e482,_0x45c3f4)=>_0xc1e482(_0x45c3f4),{'method':_0x1b14f4(0x205),'url':_0x1b14f4(0x227)});if(_0x1d8600&&_0x1d8600[_0x1b14f4(0x204)]>0x0)return _0x1d8600[0x0]['id'];throw new Error('Could\x20not\x20find\x20installation.\x20Please\x20try\x20again.');}export async function autoSetupGitHub(){const _0x26932e=a17_0x30a0;a17_0x33ecc3['header'](_0x26932e(0x1f4)),a17_0x33ecc3[_0x26932e(0x1f0)](_0x26932e(0x20b));try{const _0xfc0f78=await createGitHubAppManifestFlow();a17_0x33ecc3[_0x26932e(0x218)](_0x26932e(0x229));const _0x5c4f3e=await installAppIfNeeded(_0xfc0f78);a17_0x33ecc3[_0x26932e(0x218)](_0x26932e(0x1f1)),a17_0x33ecc3[_0x26932e(0x231)](_0x26932e(0x1f7)),await saveConfig(_0xfc0f78['id'],_0xfc0f78[_0x26932e(0x1eb)],_0x5c4f3e),a17_0x33ecc3['success'](_0x26932e(0x222)),a17_0x33ecc3['dim'](_0x26932e(0x224)+_0xfc0f78['id']),a17_0x33ecc3['dim'](_0x26932e(0x203)+_0xfc0f78['name']),a17_0x33ecc3[_0x26932e(0x1f0)]('Configuration\x20saved\x20globally\x20to\x20~/.woozlit/'),a17_0x33ecc3[_0x26932e(0x218)](_0x26932e(0x230));}catch(_0x2104f0){a17_0x33ecc3[_0x26932e(0x220)]('\x0aSetup\x20failed:\x20'+_0x2104f0),a17_0x33ecc3[_0x26932e(0x1f0)](_0x26932e(0x225)),process[_0x26932e(0x1fe)](0x1);}}
@@ -1 +1 @@
1
- (function(_0x3ecbc5,_0x5521a2){const _0x34e51a=a18_0x4fe0,_0x40909b=_0x3ecbc5();while(!![]){try{const _0x6aa917=parseInt(_0x34e51a(0xde))/0x1+parseInt(_0x34e51a(0xd7))/0x2*(parseInt(_0x34e51a(0xed))/0x3)+-parseInt(_0x34e51a(0xcd))/0x4+parseInt(_0x34e51a(0xf0))/0x5*(-parseInt(_0x34e51a(0xe3))/0x6)+-parseInt(_0x34e51a(0xe9))/0x7+parseInt(_0x34e51a(0xe8))/0x8+parseInt(_0x34e51a(0xd1))/0x9;if(_0x6aa917===_0x5521a2)break;else _0x40909b['push'](_0x40909b['shift']());}catch(_0xda178c){_0x40909b['push'](_0x40909b['shift']());}}}(a18_0xd00d,0xd537a));import*as a18_0x1b2ecb from'../ui/output.js';import{loginGitHub,logoutGitHub,isGitHubAuthenticated}from'./auth.js';import{listRepos}from'./api.js';function a18_0xd00d(){const _0x8039b0=['Failed\x20to\x20fetch\x20repos:\x20','login','private','29853SGuYct','Installed\x20on\x20account:\x20','(private)','repoCount','GitHub\x20Commands','863358aNITuX','\x20\x20/github\x20setup\x20\x20\x20-\x20Auto-create\x20GitHub\x20App\x20(recommended)','config','header','repos','2042016ccoNJV','7933835UmihOR','\x20\x20/github\x20status\x20\x20-\x20Check\x20authentication\x20status','\x20more','length','57jcDiMP','Your\x20GitHub\x20Repositories','error','10xUOhZK','dim','\x20\x20/github\x20login\x20\x20\x20-\x20Test\x20GitHub\x20App\x20authentication','Not\x20logged\x20in.\x20Run\x20\x27/github\x20setup\x27\x20first','\x20repositories','6693864ETsDch','Not\x20logged\x20in\x20to\x20GitHub\x20App','forEach','./api.js','26142192qQSYiE','accountName','setup','\x20\x20/github\x20logout\x20\x20-\x20Clear\x20GitHub\x20App\x20credentials','success','\x20\x20...\x20and\x20','81916mRKCyX','stop','warn','(public)'];a18_0xd00d=function(){return _0x8039b0;};return a18_0xd00d();}import{autoSetupGitHub}from'./auto-setup.js';import{manualSetupGitHub}from'./manual-setup.js';function a18_0x4fe0(_0x229bae,_0xe14267){_0x229bae=_0x229bae-0xca;const _0xd00d1b=a18_0xd00d();let _0x4fe084=_0xd00d1b[_0x229bae];return _0x4fe084;}export async function handleGitHubCommand(_0x684155){const _0x127ab4=a18_0x4fe0;if(_0x684155===_0x127ab4(0xd3)){await autoSetupGitHub();return;}if(_0x684155==='manual'||_0x684155===_0x127ab4(0xe5)){await manualSetupGitHub();return;}if(_0x684155===_0x127ab4(0xdc)){await loginGitHub();return;}if(_0x684155==='logout'){await logoutGitHub();return;}if(_0x684155==='status'){const _0x2ac549=await isGitHubAuthenticated();if(_0x2ac549)try{const {getAppStatus:_0x36f094}=await import(_0x127ab4(0xd0)),_0x12e49e=await _0x36f094();a18_0x1b2ecb[_0x127ab4(0xd5)]('✓\x20Authenticated\x20as\x20GitHub\x20App'),_0x12e49e[_0x127ab4(0xd2)]&&a18_0x1b2ecb['info'](_0x127ab4(0xdf)+_0x12e49e[_0x127ab4(0xd2)]),a18_0x1b2ecb[_0x127ab4(0xf1)]('Access\x20to\x20'+_0x12e49e[_0x127ab4(0xe1)]+_0x127ab4(0xcc));}catch(_0x3a9dd7){a18_0x1b2ecb[_0x127ab4(0xd9)]('Token\x20may\x20be\x20invalid\x20or\x20app\x20has\x20no\x20repo\x20access:\x20'+_0x3a9dd7);}else a18_0x1b2ecb[_0x127ab4(0xf1)](_0x127ab4(0xce));return;}if(_0x684155===_0x127ab4(0xe7)){const _0x5e2e78=await isGitHubAuthenticated();if(!_0x5e2e78){a18_0x1b2ecb['error'](_0x127ab4(0xcb));return;}a18_0x1b2ecb['header'](_0x127ab4(0xee));const _0x584399=a18_0x1b2ecb['createSpinner']('Fetching\x20repos...');_0x584399['start']();try{const _0x173c30=await listRepos();_0x584399[_0x127ab4(0xd8)](),_0x173c30['slice'](0x0,0xa)[_0x127ab4(0xcf)](_0x4db954=>{const _0x47dd82=_0x127ab4,_0x4feceb=_0x4db954[_0x47dd82(0xdd)]?_0x47dd82(0xe0):_0x47dd82(0xda);a18_0x1b2ecb[_0x47dd82(0xf1)]('\x20\x20'+_0x4db954['full_name']+'\x20'+_0x4feceb);}),_0x173c30[_0x127ab4(0xec)]>0xa&&a18_0x1b2ecb[_0x127ab4(0xf1)](_0x127ab4(0xd6)+(_0x173c30[_0x127ab4(0xec)]-0xa)+_0x127ab4(0xeb));}catch(_0x12a576){_0x584399['stop'](),a18_0x1b2ecb[_0x127ab4(0xef)](_0x127ab4(0xdb)+_0x12a576);}return;}a18_0x1b2ecb[_0x127ab4(0xe6)](_0x127ab4(0xe2)),a18_0x1b2ecb[_0x127ab4(0xf1)](_0x127ab4(0xe4)),a18_0x1b2ecb[_0x127ab4(0xf1)](_0x127ab4(0xca)),a18_0x1b2ecb[_0x127ab4(0xf1)](_0x127ab4(0xd4)),a18_0x1b2ecb[_0x127ab4(0xf1)](_0x127ab4(0xea)),a18_0x1b2ecb[_0x127ab4(0xf1)]('\x20\x20/github\x20repos\x20\x20\x20-\x20List\x20your\x20repositories\x20(including\x20private)');}
1
+ (function(_0x47c58c,_0x1e39c7){const _0x2a933f=a18_0x2573,_0xff0816=_0x47c58c();while(!![]){try{const _0x1ce4af=parseInt(_0x2a933f(0x13a))/0x1+parseInt(_0x2a933f(0x129))/0x2*(parseInt(_0x2a933f(0x11d))/0x3)+-parseInt(_0x2a933f(0x12b))/0x4+parseInt(_0x2a933f(0x134))/0x5+parseInt(_0x2a933f(0x12c))/0x6+-parseInt(_0x2a933f(0x11b))/0x7*(-parseInt(_0x2a933f(0x119))/0x8)+parseInt(_0x2a933f(0x13b))/0x9*(-parseInt(_0x2a933f(0x122))/0xa);if(_0x1ce4af===_0x1e39c7)break;else _0xff0816['push'](_0xff0816['shift']());}catch(_0x5eb112){_0xff0816['push'](_0xff0816['shift']());}}}(a18_0x1f24,0xa996f));import*as a18_0x1877c6 from'../ui/output.js';import{loginGitHub,logoutGitHub,isGitHubAuthenticated}from'./auth.js';function a18_0x2573(_0x19b837,_0x2683f2){_0x19b837=_0x19b837-0x115;const _0x1f24be=a18_0x1f24();let _0x25732e=_0x1f24be[_0x19b837];return _0x25732e;}import{listRepos}from'./api.js';function a18_0x1f24(){const _0x127cfd=['23242oQsQmp','manual','726164iqoVcO','8061702NFMdXJ','setup','repoCount','Installed\x20on\x20account:\x20','length','./api.js','Not\x20logged\x20in.\x20Run\x20\x27/github\x20setup\x27\x20first','login','665620gEbihI','success','start','Your\x20GitHub\x20Repositories','error','dim','648516HdIeZp','279QQshar','(public)','\x20\x20/github\x20repos\x20\x20\x20-\x20List\x20your\x20repositories\x20(including\x20private)','GitHub\x20Commands','Failed\x20to\x20fetch\x20repos:\x20','Access\x20to\x20','✓\x20Authenticated\x20as\x20GitHub\x20App','accountName','8qalGbC','\x20repositories','9441215iUjgOR','header','156ewWvWF','stop','forEach','config','status','1032940RtnCXt','repos','Fetching\x20repos...','warn','createSpinner','\x20\x20/github\x20login\x20\x20\x20-\x20Test\x20GitHub\x20App\x20authentication','\x20more'];a18_0x1f24=function(){return _0x127cfd;};return a18_0x1f24();}import{autoSetupGitHub}from'./auto-setup.js';import{manualSetupGitHub}from'./manual-setup.js';export async function handleGitHubCommand(_0x1a1f78){const _0xae5501=a18_0x2573;if(_0x1a1f78===_0xae5501(0x12d)){await autoSetupGitHub();return;}if(_0x1a1f78===_0xae5501(0x12a)||_0x1a1f78===_0xae5501(0x120)){await manualSetupGitHub();return;}if(_0x1a1f78===_0xae5501(0x133)){await loginGitHub();return;}if(_0x1a1f78==='logout'){await logoutGitHub();return;}if(_0x1a1f78===_0xae5501(0x121)){const _0x324132=await isGitHubAuthenticated();if(_0x324132)try{const {getAppStatus:_0x39f037}=await import(_0xae5501(0x131)),_0x9080da=await _0x39f037();a18_0x1877c6[_0xae5501(0x135)](_0xae5501(0x117)),_0x9080da[_0xae5501(0x118)]&&a18_0x1877c6['info'](_0xae5501(0x12f)+_0x9080da[_0xae5501(0x118)]),a18_0x1877c6[_0xae5501(0x139)](_0xae5501(0x116)+_0x9080da[_0xae5501(0x12e)]+_0xae5501(0x11a));}catch(_0x18d0c1){a18_0x1877c6[_0xae5501(0x125)]('Token\x20may\x20be\x20invalid\x20or\x20app\x20has\x20no\x20repo\x20access:\x20'+_0x18d0c1);}else a18_0x1877c6[_0xae5501(0x139)]('Not\x20logged\x20in\x20to\x20GitHub\x20App');return;}if(_0x1a1f78===_0xae5501(0x123)){const _0x5054c8=await isGitHubAuthenticated();if(!_0x5054c8){a18_0x1877c6['error'](_0xae5501(0x132));return;}a18_0x1877c6[_0xae5501(0x11c)](_0xae5501(0x137));const _0x5267ef=a18_0x1877c6[_0xae5501(0x126)](_0xae5501(0x124));_0x5267ef[_0xae5501(0x136)]();try{const _0x2d4ead=await listRepos();_0x5267ef[_0xae5501(0x11e)](),_0x2d4ead['slice'](0x0,0xa)[_0xae5501(0x11f)](_0x5f4a4f=>{const _0x5f28b8=_0xae5501,_0x5a6dc9=_0x5f4a4f['private']?'(private)':_0x5f28b8(0x13c);a18_0x1877c6[_0x5f28b8(0x139)]('\x20\x20'+_0x5f4a4f['full_name']+'\x20'+_0x5a6dc9);}),_0x2d4ead[_0xae5501(0x130)]>0xa&&a18_0x1877c6[_0xae5501(0x139)]('\x20\x20...\x20and\x20'+(_0x2d4ead[_0xae5501(0x130)]-0xa)+_0xae5501(0x128));}catch(_0x47b0b8){_0x5267ef[_0xae5501(0x11e)](),a18_0x1877c6[_0xae5501(0x138)](_0xae5501(0x115)+_0x47b0b8);}return;}a18_0x1877c6[_0xae5501(0x11c)](_0xae5501(0x13e)),a18_0x1877c6[_0xae5501(0x139)]('\x20\x20/github\x20setup\x20\x20\x20-\x20Auto-create\x20GitHub\x20App\x20(recommended)'),a18_0x1877c6[_0xae5501(0x139)](_0xae5501(0x127)),a18_0x1877c6[_0xae5501(0x139)]('\x20\x20/github\x20logout\x20\x20-\x20Clear\x20GitHub\x20App\x20credentials'),a18_0x1877c6[_0xae5501(0x139)]('\x20\x20/github\x20status\x20\x20-\x20Check\x20authentication\x20status'),a18_0x1877c6['dim'](_0xae5501(0x13d));}
@@ -1 +1 @@
1
- (function(_0x18017e,_0x2f153c){const _0x59de95=a19_0x32e9,_0x553504=_0x18017e();while(!![]){try{const _0x5bbebf=parseInt(_0x59de95(0x13a))/0x1*(-parseInt(_0x59de95(0x149))/0x2)+-parseInt(_0x59de95(0x145))/0x3*(parseInt(_0x59de95(0x133))/0x4)+-parseInt(_0x59de95(0x12d))/0x5*(-parseInt(_0x59de95(0x14e))/0x6)+-parseInt(_0x59de95(0x137))/0x7*(parseInt(_0x59de95(0x14b))/0x8)+parseInt(_0x59de95(0x135))/0x9*(-parseInt(_0x59de95(0x134))/0xa)+parseInt(_0x59de95(0x14f))/0xb*(parseInt(_0x59de95(0x13c))/0xc)+parseInt(_0x59de95(0x146))/0xd;if(_0x5bbebf===_0x2f153c)break;else _0x553504['push'](_0x553504['shift']());}catch(_0x33ae3e){_0x553504['push'](_0x553504['shift']());}}}(a19_0x417c,0x3f463));import{promises as a19_0x38e313}from'fs';import{join}from'path';import*as a19_0x480694 from'../ui/output.js';function a19_0x32e9(_0x538c8b,_0x40b11d){_0x538c8b=_0x538c8b-0x12a;const _0x417cb2=a19_0x417c();let _0x32e9c9=_0x417cb2[_0x538c8b];return _0x32e9c9;}import{homedir}from'os';import{input,editor}from'@inquirer/prompts';async function saveConfig(_0x235d01,_0x18149e,_0x42ef17){const _0x313271=a19_0x32e9,_0xfa3546=join(homedir(),_0x313271(0x147));try{await a19_0x38e313[_0x313271(0x12a)](_0xfa3546);}catch{await a19_0x38e313[_0x313271(0x14a)](_0xfa3546,{'recursive':!![]});}const _0x475b8b=join(_0xfa3546,_0x313271(0x12c)),_0x4030d7=join(_0xfa3546,_0x313271(0x144));await a19_0x38e313['writeFile'](_0x4030d7,_0x18149e,'utf8'),await a19_0x38e313[_0x313271(0x13b)](_0x475b8b,JSON[_0x313271(0x150)]({'appId':_0x235d01,'installationId':_0x42ef17},null,0x2),_0x313271(0x12e));}function a19_0x417c(){const _0x2ca27b=['force\x20closed','66XLpKej','295339XyDVJS','stringify','message','includes','\x0aSaving\x20configuration...','\x0aSetup\x20failed:\x20','dim','access','\x0aSetup\x20cancelled.','github-app-config.json','31250dzpHok','utf8','App\x20ID\x20is\x20required','Installation\x20ID:','Invalid\x20PEM\x20format','success','4cJNndp','2673530IFBXsE','9tHQQOd','\x0a✓\x20Configuration\x20saved!','7DIDUjk','Private\x20Key\x20(PEM\x20format):','info','382759fPyxmC','writeFile','60aNvfTb','BEGIN\x20PRIVATE\x20KEY','error','BEGIN\x20RSA\x20PRIVATE\x20KEY','App\x20ID:','length','To\x20verify,\x20run:\x20/github\x20status','header','github-app.pem','1408119JznllK','16637192CmKtuk','.woozlit','GitHub\x20App\x20Manual\x20Configuration','2VLSzWM','mkdir','832984ZQotEz','Paste\x20the\x20entire\x20content\x20of\x20your\x20.pem\x20file,\x20save,\x20and\x20close.'];a19_0x417c=function(){return _0x2ca27b;};return a19_0x417c();}export async function manualSetupGitHub(){const _0x59556a=a19_0x32e9;a19_0x480694[_0x59556a(0x143)](_0x59556a(0x148)),a19_0x480694[_0x59556a(0x155)]('Enter\x20your\x20existing\x20GitHub\x20App\x20credentials\x20manually.\x0a');try{const _0x46897f=await input({'message':_0x59556a(0x140),'validate':_0x3b0a47=>_0x3b0a47[_0x59556a(0x141)]>0x0?!![]:_0x59556a(0x12f)});a19_0x480694['info']('\x0aFor\x20the\x20Private\x20Key,\x20your\x20default\x20editor\x20will\x20open.'),a19_0x480694[_0x59556a(0x139)](_0x59556a(0x14c)),await new Promise(_0x1ff49a=>setTimeout(_0x1ff49a,0x7d0));const _0x4482aa=await editor({'message':_0x59556a(0x138),'validate':_0x714079=>_0x714079[_0x59556a(0x152)](_0x59556a(0x13f))||_0x714079['includes'](_0x59556a(0x13d))?!![]:_0x59556a(0x131)}),_0x4f0662=await input({'message':_0x59556a(0x130),'validate':_0x24cd7d=>_0x24cd7d[_0x59556a(0x141)]>0x0?!![]:'Installation\x20ID\x20is\x20required'});a19_0x480694[_0x59556a(0x139)](_0x59556a(0x153)),await saveConfig(_0x46897f,_0x4482aa,_0x4f0662),a19_0x480694[_0x59556a(0x132)](_0x59556a(0x136)),a19_0x480694['dim'](_0x59556a(0x142));}catch(_0x50396f){if(_0x50396f instanceof Error&&_0x50396f[_0x59556a(0x151)][_0x59556a(0x152)](_0x59556a(0x14d))){a19_0x480694['warn'](_0x59556a(0x12b));return;}a19_0x480694[_0x59556a(0x13e)](_0x59556a(0x154)+_0x50396f);}}
1
+ (function(_0x2acf6f,_0x467dc2){const _0x3d5125=a19_0x3c2f,_0x472b44=_0x2acf6f();while(!![]){try{const _0x146c7f=parseInt(_0x3d5125(0x140))/0x1+parseInt(_0x3d5125(0x145))/0x2+parseInt(_0x3d5125(0x15d))/0x3*(-parseInt(_0x3d5125(0x13d))/0x4)+-parseInt(_0x3d5125(0x147))/0x5*(-parseInt(_0x3d5125(0x15c))/0x6)+-parseInt(_0x3d5125(0x15b))/0x7*(parseInt(_0x3d5125(0x149))/0x8)+-parseInt(_0x3d5125(0x15f))/0x9+-parseInt(_0x3d5125(0x14c))/0xa;if(_0x146c7f===_0x467dc2)break;else _0x472b44['push'](_0x472b44['shift']());}catch(_0x2b73c4){_0x472b44['push'](_0x472b44['shift']());}}}(a19_0x98a1,0x71b9a));function a19_0x3c2f(_0x3723da,_0x32466){_0x3723da=_0x3723da-0x138;const _0x98a1c3=a19_0x98a1();let _0x3c2fa7=_0x98a1c3[_0x3723da];return _0x3c2fa7;}import{promises as a19_0x55782f}from'fs';import{join}from'path';import*as a19_0x143dce from'../ui/output.js';function a19_0x98a1(){const _0x180690=['5096000uLjWxu','mkdir','length','\x0aSetup\x20failed:\x20','BEGIN\x20RSA\x20PRIVATE\x20KEY','github-app.pem','success','writeFile','includes','Enter\x20your\x20existing\x20GitHub\x20App\x20credentials\x20manually.\x0a','To\x20verify,\x20run:\x20/github\x20status','info','dim','warn','error','2330153hESvaG','2022TomGrF','909ELpqIb','utf8','597483MDVoRR','Private\x20Key\x20(PEM\x20format):','Installation\x20ID\x20is\x20required','GitHub\x20App\x20Manual\x20Configuration','\x0aSaving\x20configuration...','BEGIN\x20PRIVATE\x20KEY','3956IANKJE','message','App\x20ID:','497044wyMzDu','access','.woozlit','Paste\x20the\x20entire\x20content\x20of\x20your\x20.pem\x20file,\x20save,\x20and\x20close.','\x0aFor\x20the\x20Private\x20Key,\x20your\x20default\x20editor\x20will\x20open.','576602rHAqSv','App\x20ID\x20is\x20required','13190KDGVoJ','header','8gPBaxv','stringify','Invalid\x20PEM\x20format'];a19_0x98a1=function(){return _0x180690;};return a19_0x98a1();}import{homedir}from'os';import{input,editor}from'@inquirer/prompts';async function saveConfig(_0x1d540d,_0x252c7a,_0x5edb4d){const _0x40d5d2=a19_0x3c2f,_0x1ec90a=join(homedir(),_0x40d5d2(0x142));try{await a19_0x55782f[_0x40d5d2(0x141)](_0x1ec90a);}catch{await a19_0x55782f[_0x40d5d2(0x14d)](_0x1ec90a,{'recursive':!![]});}const _0x137b87=join(_0x1ec90a,'github-app-config.json'),_0x45bc31=join(_0x1ec90a,_0x40d5d2(0x151));await a19_0x55782f[_0x40d5d2(0x153)](_0x45bc31,_0x252c7a,'utf8'),await a19_0x55782f[_0x40d5d2(0x153)](_0x137b87,JSON[_0x40d5d2(0x14a)]({'appId':_0x1d540d,'installationId':_0x5edb4d},null,0x2),_0x40d5d2(0x15e));}export async function manualSetupGitHub(){const _0x18f79a=a19_0x3c2f;a19_0x143dce[_0x18f79a(0x148)](_0x18f79a(0x13a)),a19_0x143dce[_0x18f79a(0x158)](_0x18f79a(0x155));try{const _0x2182da=await input({'message':_0x18f79a(0x13f),'validate':_0x3b462c=>_0x3b462c['length']>0x0?!![]:_0x18f79a(0x146)});a19_0x143dce[_0x18f79a(0x157)](_0x18f79a(0x144)),a19_0x143dce[_0x18f79a(0x157)](_0x18f79a(0x143)),await new Promise(_0x5ed76a=>setTimeout(_0x5ed76a,0x7d0));const _0x378e04=await editor({'message':_0x18f79a(0x138),'validate':_0x336602=>_0x336602['includes'](_0x18f79a(0x150))||_0x336602['includes'](_0x18f79a(0x13c))?!![]:_0x18f79a(0x14b)}),_0x4919c1=await input({'message':'Installation\x20ID:','validate':_0x41ce8b=>_0x41ce8b[_0x18f79a(0x14e)]>0x0?!![]:_0x18f79a(0x139)});a19_0x143dce[_0x18f79a(0x157)](_0x18f79a(0x13b)),await saveConfig(_0x2182da,_0x378e04,_0x4919c1),a19_0x143dce[_0x18f79a(0x152)]('\x0a✓\x20Configuration\x20saved!'),a19_0x143dce[_0x18f79a(0x158)](_0x18f79a(0x156));}catch(_0x9cc93c){if(_0x9cc93c instanceof Error&&_0x9cc93c[_0x18f79a(0x13e)][_0x18f79a(0x154)]('force\x20closed')){a19_0x143dce[_0x18f79a(0x159)]('\x0aSetup\x20cancelled.');return;}a19_0x143dce[_0x18f79a(0x15a)](_0x18f79a(0x14f)+_0x9cc93c);}}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function a20_0x19fe(){const _0x28eb09=['1485114VshqXX','delete','keys','success','.woozlit','Configure\x20CLI\x20settings','Logout\x20from\x20your\x20Woozlit\x20account','Default\x20servers\x20will\x20be\x20restored\x20on\x20next\x20restart\x20unless\x20you\x20remove\x20them\x20again.','aliases','Add\x20an\x20HTTP\x20MCP\x20server\x20(streamable-http)','services','config','wipe','13304VGWYFA','Theme\x20set\x20to:\x20','Add\x20a\x20stdio\x20MCP\x20server','Background\x20Services','running','4023019ODwmih','8809174wqRRpJ','Opening\x20browser\x20for\x20login...','error','yellow','./config/mcp.js','Manage\x20MCP\x20servers','Login\x20with\x20your\x20Woozlit\x20account','@inquirer/prompts','version','16dWAdBA','stdout','Added\x20HTTP\x20MCP\x20server:\x20','email','Manage\x20Email\x20integration','env','Running','.woozlit/context.md','init','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','command','Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.','gray','Added\x20rule:\x20','Configure\x20Discord\x20Bot\x20Token','add\x20<name>\x20<command>\x20[args...]','Rules','reset','Manage\x20GitHub\x20tool\x20integration','List\x20all\x20rules','Are\x20you\x20sure\x20you\x20want\x20to\x20remove\x20ALL\x20MCP\x20servers?','Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant','./discord/index.js','#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a','Model:\x20','Manage\x20Telegram\x20integration','\x0aConfig\x20file:\x20','some','./github/index.js','Current\x20User','Ask\x20a\x20single\x20question','Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md','remove-all','No\x20MCP\x20servers\x20configured','bold','Show\x20status\x20of\x20background\x20services/bots','showLogo','name','rules','Initialized\x20Woozlit\x20in\x20current\x20directory','Wipe\x20all\x20data,\x20rules,\x20settings,\x20and\x20MCP\x20configs','N/A','Email:\x20','Select\x20UI\x20theme','url','12qNxdhr','Manage\x20AI\x20behavior\x20rules','Login\x20failed\x20or\x20timed\x20out','add-http\x20<name>\x20<url>','Remove\x20an\x20MCP\x20server','Add\x20a\x20new\x20rule','Logged\x20out\x20successfully','discord','theme','Waiting\x20for\x20authentication...','Are\x20you\x20sure\x20you\x20want\x20to\x20completely\x20WIPE\x20all\x20CLI\x20data,\x20rules,\x20and\x20configs?','clear','green','NODE_TLS_REJECT_UNAUTHORIZED','mcp','length','forEach','117ZodxSO','Please\x20restart\x20the\x20CLI.','header','./services/bot-manager.js','action','You\x20can\x20also\x20add\x20servers\x20via\x20mcp.json\x20in\x20your\x20project\x20directory','createSpinner','refresh','4463rDdAfp','displayName','write','start','Stopped','./telegram/index.js','Config\x20file:\x20','ask\x20<message>','\x27\x20not\x20found','dim','entries','36500GLefLP','6238320WukMzb',':\x20[stdio]\x20','Logged\x20in\x20as\x20','stop','#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a','#3b82f6','Select\x20AI\x20model','info','./utils/storage.js','177kVIpXB','description','startAllConfigured','MCP\x20Servers','Configure\x20Telegram\x20Bot\x20Token','login','logout','Not\x20Configured','./email/index.js','list','Configure\x20email\x20credentials','parse','getStatus','URL:\x20','hex','model','2.0.4','No\x20services\x20registered.','chat\x20[message]','setup','15bQXvZA','warn','\x0aUse\x20\x27woozlit\x20<service>\x20setup\x27\x20to\x20configure\x20services.','Show\x20current\x20user\x20info','args'];a20_0x19fe=function(){return _0x28eb09;};return a20_0x19fe();}const a20_0x3e898b=a20_0x25ca;(function(_0x49724c,_0x2acd7e){const _0x2fc2ba=a20_0x25ca,_0x3d7f97=_0x49724c();while(!![]){try{const _0x39f6b6=parseInt(_0x2fc2ba(0x110))/0x1*(-parseInt(_0x2fc2ba(0x15a))/0x2)+parseInt(_0x2fc2ba(0x125))/0x3*(parseInt(_0x2fc2ba(0x11b))/0x4)+parseInt(_0x2fc2ba(0x139))/0x5*(parseInt(_0x2fc2ba(0x13e))/0x6)+parseInt(_0x2fc2ba(0x150))/0x7+-parseInt(_0x2fc2ba(0x14b))/0x8*(parseInt(_0x2fc2ba(0x108))/0x9)+-parseInt(_0x2fc2ba(0x11c))/0xa+parseInt(_0x2fc2ba(0x151))/0xb*(-parseInt(_0x2fc2ba(0xf7))/0xc);if(_0x39f6b6===_0x2acd7e)break;else _0x3d7f97['push'](_0x3d7f97['shift']());}catch(_0x56ec33){_0x3d7f97['push'](_0x3d7f97['shift']());}}}(a20_0x19fe,0x5b39c));import{Command}from'commander';import a20_0x1576db 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_0x207264 from'./ui/output.js';const VERSION=a20_0x3e898b(0x135),program=new Command();process[a20_0x3e898b(0x15f)][a20_0x3e898b(0x104)]='0',program[a20_0x3e898b(0xef)]('woozlit')[a20_0x3e898b(0x126)](a20_0x3e898b(0xdf))[a20_0x3e898b(0x159)](VERSION)[a20_0x3e898b(0x10c)](async()=>{const _0x4e80f8=a20_0x3e898b;ensureDefaultServers();const {botManager:_0x37b418}=await import(_0x4e80f8(0x10b));await _0x37b418[_0x4e80f8(0x127)](),a20_0x207264['showLogo'](VERSION);if(!isLoggedIn()){a20_0x207264[_0x4e80f8(0x13a)](_0x4e80f8(0x163)),a20_0x207264[_0x4e80f8(0x119)](''),a20_0x207264[_0x4e80f8(0x123)]('Opening\x20browser\x20for\x20login...');const _0x569ceb=a20_0x207264['createSpinner'](_0x4e80f8(0x100));_0x569ceb[_0x4e80f8(0x113)]();const _0x2e5eaf=await login();_0x569ceb[_0x4e80f8(0x11f)]();if(!_0x2e5eaf){a20_0x207264['error'](_0x4e80f8(0xf9));return;}const _0x379249=getUser();a20_0x207264[_0x4e80f8(0x141)](_0x4e80f8(0x11e)+(_0x379249[_0x4e80f8(0x111)]||_0x379249[_0x4e80f8(0x15d)]));}await startChat();}),program[a20_0x3e898b(0x164)](a20_0x3e898b(0x12a))['description'](a20_0x3e898b(0x157))[a20_0x3e898b(0x10c)](async()=>{const _0x1f9384=a20_0x3e898b;if(isLoggedIn()){const _0x329637=getUser();a20_0x207264[_0x1f9384(0x123)]('Already\x20logged\x20in\x20as\x20'+_0x329637[_0x1f9384(0x15d)]);return;}a20_0x207264[_0x1f9384(0x123)](_0x1f9384(0x152));const _0x26ff82=a20_0x207264[_0x1f9384(0x10e)]('Waiting\x20for\x20authentication...');_0x26ff82['start']();const _0x465bed=await login();_0x26ff82[_0x1f9384(0x11f)]();if(_0x465bed){const _0x1ff75f=getUser();a20_0x207264[_0x1f9384(0x141)]('Logged\x20in\x20as\x20'+(_0x1ff75f[_0x1f9384(0x111)]||_0x1ff75f['email']));}else a20_0x207264[_0x1f9384(0x153)]('Login\x20failed\x20or\x20timed\x20out');}),program[a20_0x3e898b(0x164)](a20_0x3e898b(0x12b))[a20_0x3e898b(0x126)](a20_0x3e898b(0x144))['action'](()=>{const _0x574bf4=a20_0x3e898b;logout(),a20_0x207264[_0x574bf4(0x141)](_0x574bf4(0xfd));}),program[a20_0x3e898b(0x164)]('whoami')['description'](a20_0x3e898b(0x13c))[a20_0x3e898b(0x10c)](()=>{const _0x5ae24d=a20_0x3e898b;if(!isLoggedIn()){a20_0x207264[_0x5ae24d(0x13a)](_0x5ae24d(0x165));return;}const _0x5dd9bf=getUser();a20_0x207264['header'](_0x5ae24d(0xe7)),a20_0x207264[_0x5ae24d(0x123)]('Name:\x20'+(_0x5dd9bf[_0x5ae24d(0x111)]||_0x5ae24d(0xf3))),a20_0x207264[_0x5ae24d(0x123)](_0x5ae24d(0xf4)+(_0x5dd9bf[_0x5ae24d(0x15d)]||'N/A')),a20_0x207264[_0x5ae24d(0x123)](_0x5ae24d(0xe2)+getSelectedModel());}),program[a20_0x3e898b(0x164)](a20_0x3e898b(0x137))[a20_0x3e898b(0x126)]('Start\x20an\x20AI\x20chat\x20session')[a20_0x3e898b(0x10c)](async _0x373347=>{const _0x24d95=a20_0x3e898b;a20_0x207264['showLogo'](VERSION);if(!isLoggedIn()){a20_0x207264[_0x24d95(0x13a)](_0x24d95(0x163)),a20_0x207264['dim'](''),a20_0x207264[_0x24d95(0x123)]('Opening\x20browser\x20for\x20login...');const _0x44ecc3=a20_0x207264[_0x24d95(0x10e)](_0x24d95(0x100));_0x44ecc3[_0x24d95(0x113)]();const _0xf059ea=await login();_0x44ecc3[_0x24d95(0x11f)]();if(!_0xf059ea){a20_0x207264[_0x24d95(0x153)]('Login\x20failed\x20or\x20timed\x20out');return;}const _0x20c01e=getUser();a20_0x207264[_0x24d95(0x141)](_0x24d95(0x11e)+(_0x20c01e['displayName']||_0x20c01e[_0x24d95(0x15d)]));}await startChat(_0x373347);}),program[a20_0x3e898b(0x164)](a20_0x3e898b(0x117))[a20_0x3e898b(0x126)](a20_0x3e898b(0xe8))[a20_0x3e898b(0x10c)](async _0x4dd49e=>{const _0x294585=a20_0x3e898b;a20_0x207264[_0x294585(0xee)](VERSION);if(!isLoggedIn()){a20_0x207264['warn'](_0x294585(0x163)),a20_0x207264[_0x294585(0x119)](''),a20_0x207264[_0x294585(0x123)]('Opening\x20browser\x20for\x20login...');const _0x58f117=a20_0x207264['createSpinner']('Waiting\x20for\x20authentication...');_0x58f117['start']();const _0x30f923=await login();_0x58f117['stop']();if(!_0x30f923){a20_0x207264[_0x294585(0x153)](_0x294585(0xf9));return;}const _0x1ff8d0=getUser();a20_0x207264['success'](_0x294585(0x11e)+(_0x1ff8d0[_0x294585(0x111)]||_0x1ff8d0[_0x294585(0x15d)]));}await startChat(_0x4dd49e);});function a20_0x25ca(_0x1f035f,_0x28c4de){_0x1f035f=_0x1f035f-0xd8;const _0x19fe9a=a20_0x19fe();let _0x25ca17=_0x19fe9a[_0x1f035f];return _0x25ca17;}const configCmd=program[a20_0x3e898b(0x164)](a20_0x3e898b(0x149))[a20_0x3e898b(0x126)](a20_0x3e898b(0x143));configCmd[a20_0x3e898b(0x164)](a20_0x3e898b(0x134))['description'](a20_0x3e898b(0x122))[a20_0x3e898b(0x10c)](async()=>{const _0x4330e2=a20_0x3e898b,_0x252ec9=await selectModel();a20_0x207264[_0x4330e2(0x141)]('Model\x20set\x20to:\x20'+_0x252ec9);}),configCmd[a20_0x3e898b(0x164)](a20_0x3e898b(0xff))[a20_0x3e898b(0x126)](a20_0x3e898b(0xf5))[a20_0x3e898b(0x10c)](async()=>{const _0x5c8a5a=a20_0x3e898b,{selectTheme:_0x52b257}=await import('./ui/themes.js'),_0xb84f51=await _0x52b257();a20_0x207264[_0x5c8a5a(0x141)](_0x5c8a5a(0x14c)+_0xb84f51);}),program[a20_0x3e898b(0x164)](a20_0x3e898b(0xff))[a20_0x3e898b(0x126)]('Select\x20UI\x20theme\x20(alias\x20for\x20config\x20theme)')[a20_0x3e898b(0x10c)](async()=>{const _0x3a6922=a20_0x3e898b,{selectTheme:_0x4a30cf}=await import('./ui/themes.js'),_0x116c32=await _0x4a30cf();a20_0x207264[_0x3a6922(0x141)](_0x3a6922(0x14c)+_0x116c32);});const rulesCmd=program[a20_0x3e898b(0x164)](a20_0x3e898b(0xf0))['description'](a20_0x3e898b(0xf8));rulesCmd[a20_0x3e898b(0x164)](a20_0x3e898b(0x12e))[a20_0x3e898b(0x126)](a20_0x3e898b(0xdd))[a20_0x3e898b(0x10c)](()=>{const _0x41cb42=a20_0x3e898b,_0x57c3bc=listRules();if(_0x57c3bc[_0x41cb42(0x106)]===0x0){a20_0x207264['info']('No\x20rules\x20defined');return;}a20_0x207264[_0x41cb42(0x10a)](_0x41cb42(0xda)),_0x57c3bc['forEach']((_0x785e0,_0xdda18d)=>{const _0x1d46d7=_0x41cb42;process[_0x1d46d7(0x15b)][_0x1d46d7(0x112)](_0xdda18d+0x1+'.\x20'+_0x785e0+'\x0a');});}),rulesCmd['command']('add\x20<rule>')['description'](a20_0x3e898b(0xfc))['action'](_0x23522f=>{const _0xce1ccc=a20_0x3e898b;addRule(_0x23522f),a20_0x207264[_0xce1ccc(0x141)](_0xce1ccc(0x167)+_0x23522f);})['action'](()=>{const _0x49ffd1=a20_0x3e898b;clearRules(),a20_0x207264[_0x49ffd1(0x141)]('All\x20rules\x20cleared');});const mcpCmd=program['command'](a20_0x3e898b(0x105))[a20_0x3e898b(0x126)](a20_0x3e898b(0x156));mcpCmd['command'](a20_0x3e898b(0x12e))['description']('List\x20all\x20MCP\x20servers')[a20_0x3e898b(0x10c)](()=>{const _0x55e26c=a20_0x3e898b,_0xde7427=getMcpServers(),_0x16de40=Object[_0x55e26c(0x140)](_0xde7427);if(_0x16de40[_0x55e26c(0x106)]===0x0){a20_0x207264[_0x55e26c(0x123)](_0x55e26c(0xeb)),a20_0x207264['dim'](_0x55e26c(0x116)+getConfigFilePath());return;}a20_0x207264[_0x55e26c(0x10a)](_0x55e26c(0x128)),_0x16de40[_0x55e26c(0x107)](_0x4f8e01=>{const _0x315637=_0x55e26c,_0x54ba3b=_0xde7427[_0x4f8e01];_0x54ba3b['type']==='streamable-http'?a20_0x207264[_0x315637(0x123)]('-\x20'+_0x4f8e01+':\x20[HTTP]\x20'+_0x54ba3b[_0x315637(0xf6)]):a20_0x207264[_0x315637(0x123)]('-\x20'+_0x4f8e01+_0x315637(0x11d)+_0x54ba3b[_0x315637(0x164)]+'\x20'+(_0x54ba3b[_0x315637(0x13d)]?.['join']('\x20')||''));}),a20_0x207264['dim'](_0x55e26c(0xe4)+getConfigFilePath()),a20_0x207264[_0x55e26c(0x119)](_0x55e26c(0x10d));}),mcpCmd['command'](a20_0x3e898b(0xd9))['description'](a20_0x3e898b(0x14d))[a20_0x3e898b(0x10c)]((_0x341bb3,_0x3d5296,_0x167c20)=>{const _0x289383=a20_0x3e898b;addMcpServer(_0x341bb3,_0x3d5296,_0x167c20),a20_0x207264[_0x289383(0x141)]('Added\x20stdio\x20MCP\x20server:\x20'+_0x341bb3);}),mcpCmd[a20_0x3e898b(0x164)](a20_0x3e898b(0xfa))[a20_0x3e898b(0x126)](a20_0x3e898b(0x147))[a20_0x3e898b(0x10c)]((_0x345014,_0x581d9e)=>{const _0x464dd1=a20_0x3e898b;addMcpHttpServer(_0x345014,_0x581d9e),a20_0x207264[_0x464dd1(0x141)](_0x464dd1(0x15c)+_0x345014),a20_0x207264[_0x464dd1(0x119)](_0x464dd1(0x132)+_0x581d9e);}),mcpCmd[a20_0x3e898b(0x164)]('remove\x20<name>')[a20_0x3e898b(0x146)]([a20_0x3e898b(0x13f),'rm'])[a20_0x3e898b(0x126)](a20_0x3e898b(0xfb))[a20_0x3e898b(0x10c)](_0x260970=>{const _0x1a94ad=a20_0x3e898b;removeMcpServer(_0x260970)?a20_0x207264[_0x1a94ad(0x141)]('Removed\x20MCP\x20server:\x20'+_0x260970):a20_0x207264['error']('MCP\x20server\x20\x27'+_0x260970+_0x1a94ad(0x118));}),mcpCmd['command'](a20_0x3e898b(0xea))[a20_0x3e898b(0x146)](['delete-all',a20_0x3e898b(0x102)])[a20_0x3e898b(0x126)]('Remove\x20all\x20MCP\x20servers')['action'](async()=>{const _0x1e349f=a20_0x3e898b,{confirm:_0x3abeef}=await import(_0x1e349f(0x158)),_0x1e0594=await _0x3abeef({'message':_0x1e349f(0xde),'default':![]});_0x1e0594?(clearMcpServers(),a20_0x207264['success']('All\x20MCP\x20servers\x20removed'),a20_0x207264[_0x1e349f(0x119)](_0x1e349f(0x145))):a20_0x207264['info']('Operation\x20cancelled');}),program[a20_0x3e898b(0x164)](a20_0x3e898b(0x10f))[a20_0x3e898b(0x146)]([a20_0x3e898b(0xdb),a20_0x3e898b(0x14a),'clean'])[a20_0x3e898b(0x126)](a20_0x3e898b(0xf2))[a20_0x3e898b(0x10c)](async()=>{const _0x3a6b86=a20_0x3e898b,{confirm:_0x403583}=await import('@inquirer/prompts'),_0x41ad2d=await _0x403583({'message':a20_0x1576db[_0x3a6b86(0xec)][_0x3a6b86(0x133)](_0x3a6b86(0x121))(_0x3a6b86(0x101)),'default':![],'theme':{'prefix':{'idle':a20_0x1576db[_0x3a6b86(0xec)][_0x3a6b86(0x133)](_0x3a6b86(0x121))('>'),'done':a20_0x1576db[_0x3a6b86(0x133)](_0x3a6b86(0x121))('●')}}});if(_0x41ad2d){const {wipeAll:_0x18c338}=await import(_0x3a6b86(0x124));_0x18c338();try{const {clearMcpServers:_0x5cb71}=await import(_0x3a6b86(0x155));_0x5cb71();}catch(_0x2d457b){}a20_0x207264[_0x3a6b86(0x141)]('All\x20data,\x20configs,\x20and\x20MCP\x20servers\x20have\x20been\x20wiped.'),a20_0x207264[_0x3a6b86(0x119)](_0x3a6b86(0x109));}else a20_0x207264['info']('Refresh\x20cancelled.');}),program[a20_0x3e898b(0x164)](a20_0x3e898b(0x162))[a20_0x3e898b(0x126)]('Initialize\x20Woozlit\x20in\x20current\x20directory')['action'](()=>{const _0x8b5055=a20_0x3e898b,_0x8123c1=listDirectory('.'),_0x311e24=_0x8123c1[_0x8b5055(0x11a)]?.[_0x8b5055(0xe5)](_0x34b431=>_0x34b431[_0x8b5055(0xef)]===_0x8b5055(0x142));if(_0x311e24){a20_0x207264[_0x8b5055(0x13a)]('Woozlit\x20already\x20initialized\x20in\x20this\x20directory');return;}createFile('.woozlit/rules.md',_0x8b5055(0xe1)),createFile(_0x8b5055(0x161),_0x8b5055(0x120)),a20_0x207264[_0x8b5055(0x141)](_0x8b5055(0xf1)),a20_0x207264[_0x8b5055(0x119)](_0x8b5055(0xe9));}),program[a20_0x3e898b(0x164)](a20_0x3e898b(0x148))[a20_0x3e898b(0x126)](a20_0x3e898b(0xed))[a20_0x3e898b(0x10c)](async()=>{const _0x27790c=a20_0x3e898b,{botManager:_0x113268}=await import(_0x27790c(0x10b)),_0x234b7d=_0x113268[_0x27790c(0x131)]();a20_0x207264[_0x27790c(0x10a)](_0x27790c(0x14e));if(_0x234b7d[_0x27790c(0x106)]===0x0){a20_0x207264['info'](_0x27790c(0x136));return;}_0x234b7d[_0x27790c(0x107)](_0x3d9750=>{const _0x5bfb07=_0x27790c,_0x38a6da=_0x3d9750[_0x5bfb07(0x14f)]?a20_0x1576db[_0x5bfb07(0x103)](_0x5bfb07(0x160)):_0x3d9750['configured']?a20_0x1576db[_0x5bfb07(0x154)](_0x5bfb07(0x114)):a20_0x1576db[_0x5bfb07(0x166)](_0x5bfb07(0x12c));a20_0x207264[_0x5bfb07(0x123)]('-\x20'+_0x3d9750[_0x5bfb07(0xef)]+':\x20'+_0x38a6da);}),a20_0x207264[_0x27790c(0x119)](_0x27790c(0x13b));});const discordCmd=program[a20_0x3e898b(0x164)](a20_0x3e898b(0xfe))['description']('Manage\x20Discord\x20integration');discordCmd[a20_0x3e898b(0x164)](a20_0x3e898b(0x138))[a20_0x3e898b(0x126)](a20_0x3e898b(0xd8))['action'](async()=>{const _0x24c0c1=a20_0x3e898b,{setupDiscord:_0x27a72e}=await import(_0x24c0c1(0xe0));await _0x27a72e();});const githubCmd=program[a20_0x3e898b(0x164)]('github\x20[subcmd]')[a20_0x3e898b(0x126)](a20_0x3e898b(0xdc))['action'](async _0x4c4c2c=>{const _0x27cd74=a20_0x3e898b,{handleGitHubCommand:_0x3c24fc}=await import(_0x27cd74(0xe6));await _0x3c24fc(_0x4c4c2c||'');}),telegramCmd=program[a20_0x3e898b(0x164)]('telegram')['description'](a20_0x3e898b(0xe3));telegramCmd[a20_0x3e898b(0x164)](a20_0x3e898b(0x138))['description'](a20_0x3e898b(0x129))[a20_0x3e898b(0x10c)](async()=>{const _0x352725=a20_0x3e898b,{setupTelegram:_0x32729d}=await import(_0x352725(0x115));await _0x32729d();});const emailCmd=program[a20_0x3e898b(0x164)](a20_0x3e898b(0x15d))[a20_0x3e898b(0x126)](a20_0x3e898b(0x15e));emailCmd['command'](a20_0x3e898b(0x138))['description'](a20_0x3e898b(0x12f))[a20_0x3e898b(0x10c)](async()=>{const _0x16f485=a20_0x3e898b,{setupEmail:_0x4687c4}=await import(_0x16f485(0x12d));await _0x4687c4();}),program[a20_0x3e898b(0x130)]();
2
+ const a20_0x3dbaac=a20_0x1960;(function(_0x1b1efe,_0x306bec){const _0x505759=a20_0x1960,_0x4c08a3=_0x1b1efe();while(!![]){try{const _0x52fc40=-parseInt(_0x505759(0x1ca))/0x1*(-parseInt(_0x505759(0x1a2))/0x2)+parseInt(_0x505759(0x1aa))/0x3+-parseInt(_0x505759(0x210))/0x4*(-parseInt(_0x505759(0x208))/0x5)+-parseInt(_0x505759(0x1f8))/0x6+parseInt(_0x505759(0x21b))/0x7+-parseInt(_0x505759(0x1d2))/0x8+-parseInt(_0x505759(0x1cb))/0x9;if(_0x52fc40===_0x306bec)break;else _0x4c08a3['push'](_0x4c08a3['shift']());}catch(_0x411a22){_0x4c08a3['push'](_0x4c08a3['shift']());}}}(a20_0x10bd,0x63418));import{Command}from'commander';import a20_0x19060e 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_0x25187c from'./ui/output.js';const VERSION=a20_0x3dbaac(0x213),program=new Command();process[a20_0x3dbaac(0x1e9)][a20_0x3dbaac(0x1cf)]='0',program[a20_0x3dbaac(0x209)](a20_0x3dbaac(0x20c))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1a6))[a20_0x3dbaac(0x1a7)](VERSION)['action'](async()=>{const _0x3efdaf=a20_0x3dbaac;ensureDefaultServers();const {botManager:_0xfac8fc}=await import(_0x3efdaf(0x214));await _0xfac8fc[_0x3efdaf(0x21e)](),a20_0x25187c[_0x3efdaf(0x1e0)](VERSION);if(!isLoggedIn()){a20_0x25187c[_0x3efdaf(0x1b0)](_0x3efdaf(0x207)),a20_0x25187c[_0x3efdaf(0x1bd)](''),a20_0x25187c[_0x3efdaf(0x1be)](_0x3efdaf(0x1f9));const _0x5714d2=a20_0x25187c[_0x3efdaf(0x1d5)]('Waiting\x20for\x20authentication...');_0x5714d2[_0x3efdaf(0x1c5)]();const _0x4e3809=await login();_0x5714d2['stop']();if(!_0x4e3809){a20_0x25187c[_0x3efdaf(0x21a)](_0x3efdaf(0x1f4));return;}const _0x570749=getUser();a20_0x25187c[_0x3efdaf(0x1f6)]('Logged\x20in\x20as\x20'+(_0x570749['displayName']||_0x570749[_0x3efdaf(0x1b2)]));}await startChat();}),program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x220))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x199))[a20_0x3dbaac(0x19d)](async()=>{const _0x27fbef=a20_0x3dbaac;if(isLoggedIn()){const _0x4257d5=getUser();a20_0x25187c[_0x27fbef(0x1be)](_0x27fbef(0x1b9)+_0x4257d5[_0x27fbef(0x1b2)]);return;}a20_0x25187c[_0x27fbef(0x1be)](_0x27fbef(0x1f9));const _0x14560f=a20_0x25187c['createSpinner'](_0x27fbef(0x1ee));_0x14560f[_0x27fbef(0x1c5)]();const _0x4e232b=await login();_0x14560f[_0x27fbef(0x1f5)]();if(_0x4e232b){const _0x35458d=getUser();a20_0x25187c[_0x27fbef(0x1f6)](_0x27fbef(0x1a8)+(_0x35458d[_0x27fbef(0x1e7)]||_0x35458d['email']));}else a20_0x25187c[_0x27fbef(0x21a)](_0x27fbef(0x1f4));}),program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x1d6))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x197))[a20_0x3dbaac(0x19d)](()=>{const _0x44335a=a20_0x3dbaac;logout(),a20_0x25187c[_0x44335a(0x1f6)](_0x44335a(0x1c9));}),program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x192))['description'](a20_0x3dbaac(0x205))[a20_0x3dbaac(0x19d)](()=>{const _0x361371=a20_0x3dbaac;if(!isLoggedIn()){a20_0x25187c[_0x361371(0x1b0)](_0x361371(0x1c6));return;}const _0x383b69=getUser();a20_0x25187c[_0x361371(0x1f2)](_0x361371(0x1db)),a20_0x25187c[_0x361371(0x1be)](_0x361371(0x1de)+(_0x383b69[_0x361371(0x1e7)]||_0x361371(0x204))),a20_0x25187c['info'](_0x361371(0x1fe)+(_0x383b69['email']||_0x361371(0x204))),a20_0x25187c[_0x361371(0x1be)](_0x361371(0x1b6)+getSelectedModel());}),program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x1eb))[a20_0x3dbaac(0x1df)]('Start\x20an\x20AI\x20chat\x20session')[a20_0x3dbaac(0x19d)](async _0x3ccea0=>{const _0x29ff53=a20_0x3dbaac;a20_0x25187c[_0x29ff53(0x1e0)](VERSION);if(!isLoggedIn()){a20_0x25187c[_0x29ff53(0x1b0)](_0x29ff53(0x207)),a20_0x25187c[_0x29ff53(0x1bd)](''),a20_0x25187c[_0x29ff53(0x1be)](_0x29ff53(0x1f9));const _0x32c434=a20_0x25187c['createSpinner'](_0x29ff53(0x1ee));_0x32c434[_0x29ff53(0x1c5)]();const _0x1d027c=await login();_0x32c434['stop']();if(!_0x1d027c){a20_0x25187c[_0x29ff53(0x21a)]('Login\x20failed\x20or\x20timed\x20out');return;}const _0x598ab4=getUser();a20_0x25187c[_0x29ff53(0x1f6)](_0x29ff53(0x1a8)+(_0x598ab4[_0x29ff53(0x1e7)]||_0x598ab4[_0x29ff53(0x1b2)]));}await startChat(_0x3ccea0);}),program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x1f3))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x194))[a20_0x3dbaac(0x19d)](async _0x4bf947=>{const _0x5f0d0c=a20_0x3dbaac;a20_0x25187c[_0x5f0d0c(0x1e0)](VERSION);if(!isLoggedIn()){a20_0x25187c['warn'](_0x5f0d0c(0x207)),a20_0x25187c[_0x5f0d0c(0x1bd)](''),a20_0x25187c[_0x5f0d0c(0x1be)]('Opening\x20browser\x20for\x20login...');const _0x5f502d=a20_0x25187c[_0x5f0d0c(0x1d5)](_0x5f0d0c(0x1ee));_0x5f502d[_0x5f0d0c(0x1c5)]();const _0x206394=await login();_0x5f502d[_0x5f0d0c(0x1f5)]();if(!_0x206394){a20_0x25187c['error'](_0x5f0d0c(0x1f4));return;}const _0x535678=getUser();a20_0x25187c['success']('Logged\x20in\x20as\x20'+(_0x535678[_0x5f0d0c(0x1e7)]||_0x535678['email']));}await startChat(_0x4bf947);});function a20_0x10bd(){const _0x3acc6c=['green','./config/mcp.js','./ui/themes.js','Configure\x20CLI\x20settings','Add\x20a\x20new\x20rule','error','5004559PYBiOQ','list','forEach','startAllConfigured','Manage\x20MCP\x20servers','login','theme','args','whoami','Running','Ask\x20a\x20single\x20question','Manage\x20Discord\x20integration','You\x20can\x20also\x20add\x20servers\x20via\x20mcp.json\x20in\x20your\x20project\x20directory','Logout\x20from\x20your\x20Woozlit\x20account','./telegram/index.js','Login\x20with\x20your\x20Woozlit\x20account','bold','entries','config','action','\x0aUse\x20\x27woozlit\x20<service>\x20setup\x27\x20to\x20configure\x20services.','./email/index.js','Show\x20status\x20of\x20background\x20services/bots','getStatus','2438dqXDpE','Are\x20you\x20sure\x20you\x20want\x20to\x20remove\x20ALL\x20MCP\x20servers?','#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a','Are\x20you\x20sure\x20you\x20want\x20to\x20completely\x20WIPE\x20all\x20CLI\x20data,\x20rules,\x20and\x20configs?','Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant','version','Logged\x20in\x20as\x20','.woozlit/rules.md','1235832oNtxns','Configure\x20Discord\x20Bot\x20Token','All\x20MCP\x20servers\x20removed','Theme\x20set\x20to:\x20','Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md','length','warn','parse','email',':\x20[HTTP]\x20','#3b82f6','services','Model:\x20','Configure\x20Telegram\x20Bot\x20Token','Select\x20UI\x20theme','Already\x20logged\x20in\x20as\x20','Select\x20UI\x20theme\x20(alias\x20for\x20config\x20theme)','Remove\x20all\x20MCP\x20servers','Manage\x20GitHub\x20tool\x20integration','dim','info','delete-all','Default\x20servers\x20will\x20be\x20restored\x20on\x20next\x20restart\x20unless\x20you\x20remove\x20them\x20again.','telegram','./utils/storage.js','List\x20all\x20MCP\x20servers','yellow','start','Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.','No\x20MCP\x20servers\x20configured','@inquirer/prompts','Logged\x20out\x20successfully','47DecFsR','4821705zqdcPQ','MCP\x20server\x20\x27','stdout','\x27\x20not\x20found','NODE_TLS_REJECT_UNAUTHORIZED','Wipe\x20all\x20data,\x20rules,\x20settings,\x20and\x20MCP\x20configs','Woozlit\x20already\x20initialized\x20in\x20this\x20directory','1391792nfWjJX','type','Stopped','createSpinner','logout','All\x20rules\x20cleared','Operation\x20cancelled','Manage\x20Telegram\x20integration','remove\x20<name>','Current\x20User','configured','Added\x20HTTP\x20MCP\x20server:\x20','Name:\x20','description','showLogo','Manage\x20AI\x20behavior\x20rules','add\x20<rule>','Remove\x20an\x20MCP\x20server','running',':\x20[stdio]\x20','.woozlit','displayName','Select\x20AI\x20model','env','mcp','chat\x20[message]','Initialized\x20Woozlit\x20in\x20current\x20directory','./discord/index.js','Waiting\x20for\x20authentication...','reset','aliases','gray','header','ask\x20<message>','Login\x20failed\x20or\x20timed\x20out','stop','success','Please\x20restart\x20the\x20CLI.','2132478sFiSgT','Opening\x20browser\x20for\x20login...','Removed\x20MCP\x20server:\x20','init','delete','Added\x20stdio\x20MCP\x20server:\x20','Email:\x20','Rules','Model\x20set\x20to:\x20','clear','github\x20[subcmd]','remove-all','N/A','Show\x20current\x20user\x20info','wipe','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','50EOdgbV','name','url','command','woozlit','Config\x20file:\x20','Add\x20an\x20HTTP\x20MCP\x20server\x20(streamable-http)','hex','115004kXEdmM','setup','No\x20services\x20registered.','2.1.1','./services/bot-manager.js'];a20_0x10bd=function(){return _0x3acc6c;};return a20_0x10bd();}const configCmd=program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x19c))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x218));configCmd[a20_0x3dbaac(0x20b)]('model')[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1e8))['action'](async()=>{const _0x17365c=a20_0x3dbaac,_0x5d531d=await selectModel();a20_0x25187c[_0x17365c(0x1f6)](_0x17365c(0x200)+_0x5d531d);}),configCmd[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x221))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1b8))[a20_0x3dbaac(0x19d)](async()=>{const _0x200cf8=a20_0x3dbaac,{selectTheme:_0x3cf69c}=await import(_0x200cf8(0x217)),_0x3287b7=await _0x3cf69c();a20_0x25187c[_0x200cf8(0x1f6)]('Theme\x20set\x20to:\x20'+_0x3287b7);}),program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x221))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1ba))[a20_0x3dbaac(0x19d)](async()=>{const _0x5c2a7b=a20_0x3dbaac,{selectTheme:_0x458fb8}=await import(_0x5c2a7b(0x217)),_0x5a4c1e=await _0x458fb8();a20_0x25187c['success'](_0x5c2a7b(0x1ad)+_0x5a4c1e);});const rulesCmd=program[a20_0x3dbaac(0x20b)]('rules')[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1e1));rulesCmd[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x21c))[a20_0x3dbaac(0x1df)]('List\x20all\x20rules')[a20_0x3dbaac(0x19d)](()=>{const _0x3ac6b2=a20_0x3dbaac,_0xbd8517=listRules();if(_0xbd8517['length']===0x0){a20_0x25187c['info']('No\x20rules\x20defined');return;}a20_0x25187c[_0x3ac6b2(0x1f2)](_0x3ac6b2(0x1ff)),_0xbd8517[_0x3ac6b2(0x21d)]((_0x184d7d,_0xf93953)=>{const _0xc6f645=_0x3ac6b2;process[_0xc6f645(0x1cd)]['write'](_0xf93953+0x1+'.\x20'+_0x184d7d+'\x0a');});}),rulesCmd[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x1e2))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x219))[a20_0x3dbaac(0x19d)](_0x28c69f=>{const _0x164b34=a20_0x3dbaac;addRule(_0x28c69f),a20_0x25187c[_0x164b34(0x1f6)]('Added\x20rule:\x20'+_0x28c69f);})[a20_0x3dbaac(0x19d)](()=>{const _0x45fb94=a20_0x3dbaac;clearRules(),a20_0x25187c['success'](_0x45fb94(0x1d7));});const mcpCmd=program['command'](a20_0x3dbaac(0x1ea))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x21f));mcpCmd[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x21c))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1c3))[a20_0x3dbaac(0x19d)](()=>{const _0x49d00b=a20_0x3dbaac,_0x527d6b=getMcpServers(),_0x30edd3=Object['keys'](_0x527d6b);if(_0x30edd3[_0x49d00b(0x1af)]===0x0){a20_0x25187c[_0x49d00b(0x1be)](_0x49d00b(0x1c7)),a20_0x25187c[_0x49d00b(0x1bd)](_0x49d00b(0x20d)+getConfigFilePath());return;}a20_0x25187c[_0x49d00b(0x1f2)]('MCP\x20Servers'),_0x30edd3[_0x49d00b(0x21d)](_0xd7a6e3=>{const _0x2e526=_0x49d00b,_0x14c5db=_0x527d6b[_0xd7a6e3];_0x14c5db[_0x2e526(0x1d3)]==='streamable-http'?a20_0x25187c['info']('-\x20'+_0xd7a6e3+_0x2e526(0x1b3)+_0x14c5db[_0x2e526(0x20a)]):a20_0x25187c[_0x2e526(0x1be)]('-\x20'+_0xd7a6e3+_0x2e526(0x1e5)+_0x14c5db['command']+'\x20'+(_0x14c5db[_0x2e526(0x222)]?.['join']('\x20')||''));}),a20_0x25187c[_0x49d00b(0x1bd)]('\x0aConfig\x20file:\x20'+getConfigFilePath()),a20_0x25187c['dim'](_0x49d00b(0x196));}),mcpCmd[a20_0x3dbaac(0x20b)]('add\x20<name>\x20<command>\x20[args...]')[a20_0x3dbaac(0x1df)]('Add\x20a\x20stdio\x20MCP\x20server')['action']((_0x151296,_0x5e0c9b,_0x4fd9a6)=>{const _0x1686de=a20_0x3dbaac;addMcpServer(_0x151296,_0x5e0c9b,_0x4fd9a6),a20_0x25187c[_0x1686de(0x1f6)](_0x1686de(0x1fd)+_0x151296);}),mcpCmd[a20_0x3dbaac(0x20b)]('add-http\x20<name>\x20<url>')[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x20e))[a20_0x3dbaac(0x19d)]((_0x14120c,_0xe8aef1)=>{const _0x1c6aeb=a20_0x3dbaac;addMcpHttpServer(_0x14120c,_0xe8aef1),a20_0x25187c[_0x1c6aeb(0x1f6)](_0x1c6aeb(0x1dd)+_0x14120c),a20_0x25187c['dim']('URL:\x20'+_0xe8aef1);}),mcpCmd[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x1da))[a20_0x3dbaac(0x1f0)]([a20_0x3dbaac(0x1fc),'rm'])['description'](a20_0x3dbaac(0x1e3))['action'](_0x771c75=>{const _0x39b33c=a20_0x3dbaac;removeMcpServer(_0x771c75)?a20_0x25187c[_0x39b33c(0x1f6)](_0x39b33c(0x1fa)+_0x771c75):a20_0x25187c['error'](_0x39b33c(0x1cc)+_0x771c75+_0x39b33c(0x1ce));}),mcpCmd[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x203))[a20_0x3dbaac(0x1f0)]([a20_0x3dbaac(0x1bf),a20_0x3dbaac(0x201)])[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1bb))['action'](async()=>{const _0x1a8dfd=a20_0x3dbaac,{confirm:_0x4fb735}=await import(_0x1a8dfd(0x1c8)),_0x575cf0=await _0x4fb735({'message':_0x1a8dfd(0x1a3),'default':![]});_0x575cf0?(clearMcpServers(),a20_0x25187c[_0x1a8dfd(0x1f6)](_0x1a8dfd(0x1ac)),a20_0x25187c[_0x1a8dfd(0x1bd)](_0x1a8dfd(0x1c0))):a20_0x25187c[_0x1a8dfd(0x1be)](_0x1a8dfd(0x1d8));}),program[a20_0x3dbaac(0x20b)]('refresh')[a20_0x3dbaac(0x1f0)]([a20_0x3dbaac(0x1ef),a20_0x3dbaac(0x206),'clean'])['description'](a20_0x3dbaac(0x1d0))[a20_0x3dbaac(0x19d)](async()=>{const _0x30368d=a20_0x3dbaac,{confirm:_0x1032e7}=await import(_0x30368d(0x1c8)),_0x9636a2=await _0x1032e7({'message':a20_0x19060e[_0x30368d(0x19a)]['hex'](_0x30368d(0x1b4))(_0x30368d(0x1a5)),'default':![],'theme':{'prefix':{'idle':a20_0x19060e[_0x30368d(0x19a)][_0x30368d(0x20f)]('#3b82f6')('>'),'done':a20_0x19060e[_0x30368d(0x20f)](_0x30368d(0x1b4))('●')}}});if(_0x9636a2){const {wipeAll:_0x280b78}=await import(_0x30368d(0x1c2));_0x280b78();try{const {clearMcpServers:_0x439a13}=await import(_0x30368d(0x216));_0x439a13();}catch(_0x117d49){}a20_0x25187c[_0x30368d(0x1f6)]('All\x20data,\x20configs,\x20and\x20MCP\x20servers\x20have\x20been\x20wiped.'),a20_0x25187c[_0x30368d(0x1bd)](_0x30368d(0x1f7));}else a20_0x25187c[_0x30368d(0x1be)]('Refresh\x20cancelled.');}),program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x1fb))['description']('Initialize\x20Woozlit\x20in\x20current\x20directory')[a20_0x3dbaac(0x19d)](()=>{const _0x137525=a20_0x3dbaac,_0x456746=listDirectory('.'),_0x164c26=_0x456746[_0x137525(0x19b)]?.['some'](_0x5ca504=>_0x5ca504[_0x137525(0x209)]===_0x137525(0x1e6));if(_0x164c26){a20_0x25187c['warn'](_0x137525(0x1d1));return;}createFile(_0x137525(0x1a9),_0x137525(0x1a4)),createFile('.woozlit/context.md','#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a'),a20_0x25187c[_0x137525(0x1f6)](_0x137525(0x1ec)),a20_0x25187c['dim'](_0x137525(0x1ae));}),program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x1b5))['description'](a20_0x3dbaac(0x1a0))[a20_0x3dbaac(0x19d)](async()=>{const _0x6fb5f8=a20_0x3dbaac,{botManager:_0x5a2278}=await import(_0x6fb5f8(0x214)),_0x115a8c=_0x5a2278[_0x6fb5f8(0x1a1)]();a20_0x25187c[_0x6fb5f8(0x1f2)]('Background\x20Services');if(_0x115a8c['length']===0x0){a20_0x25187c[_0x6fb5f8(0x1be)](_0x6fb5f8(0x212));return;}_0x115a8c['forEach'](_0x18cbe5=>{const _0x1d9013=_0x6fb5f8,_0x50c0ed=_0x18cbe5[_0x1d9013(0x1e4)]?a20_0x19060e[_0x1d9013(0x215)](_0x1d9013(0x193)):_0x18cbe5[_0x1d9013(0x1dc)]?a20_0x19060e[_0x1d9013(0x1c4)](_0x1d9013(0x1d4)):a20_0x19060e[_0x1d9013(0x1f1)]('Not\x20Configured');a20_0x25187c[_0x1d9013(0x1be)]('-\x20'+_0x18cbe5[_0x1d9013(0x209)]+':\x20'+_0x50c0ed);}),a20_0x25187c[_0x6fb5f8(0x1bd)](_0x6fb5f8(0x19e));});const discordCmd=program[a20_0x3dbaac(0x20b)]('discord')[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x195));discordCmd[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x211))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1ab))[a20_0x3dbaac(0x19d)](async()=>{const _0x3527f5=a20_0x3dbaac,{setupDiscord:_0x471c13}=await import(_0x3527f5(0x1ed));await _0x471c13();});function a20_0x1960(_0x3a0b05,_0x351ba7){_0x3a0b05=_0x3a0b05-0x192;const _0x10bd06=a20_0x10bd();let _0x196016=_0x10bd06[_0x3a0b05];return _0x196016;}const githubCmd=program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x202))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1bc))[a20_0x3dbaac(0x19d)](async _0x4c5a7d=>{const {handleGitHubCommand:_0x4f31de}=await import('./github/index.js');await _0x4f31de(_0x4c5a7d||'');}),telegramCmd=program[a20_0x3dbaac(0x20b)](a20_0x3dbaac(0x1c1))[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1d9));telegramCmd[a20_0x3dbaac(0x20b)]('setup')[a20_0x3dbaac(0x1df)](a20_0x3dbaac(0x1b7))[a20_0x3dbaac(0x19d)](async()=>{const _0x1c6832=a20_0x3dbaac,{setupTelegram:_0x3dc172}=await import(_0x1c6832(0x198));await _0x3dc172();});const emailCmd=program['command'](a20_0x3dbaac(0x1b2))[a20_0x3dbaac(0x1df)]('Manage\x20Email\x20integration');emailCmd['command'](a20_0x3dbaac(0x211))[a20_0x3dbaac(0x1df)]('Configure\x20email\x20credentials')[a20_0x3dbaac(0x19d)](async()=>{const _0x10573d=a20_0x3dbaac,{setupEmail:_0x5099b3}=await import(_0x10573d(0x19f));await _0x5099b3();}),program[a20_0x3dbaac(0x1b1)]();
@@ -1 +1 @@
1
- const a21_0x5c2b74=a21_0x19cd;(function(_0x252f5c,_0x47a176){const _0x11fc81=a21_0x19cd,_0x3ac998=_0x252f5c();while(!![]){try{const _0x578ead=-parseInt(_0x11fc81(0x1df))/0x1*(-parseInt(_0x11fc81(0x1ab))/0x2)+-parseInt(_0x11fc81(0x1ae))/0x3*(parseInt(_0x11fc81(0x1d4))/0x4)+-parseInt(_0x11fc81(0x1b3))/0x5+parseInt(_0x11fc81(0x1db))/0x6*(-parseInt(_0x11fc81(0x1d6))/0x7)+-parseInt(_0x11fc81(0x1e7))/0x8+-parseInt(_0x11fc81(0x1d8))/0x9*(parseInt(_0x11fc81(0x1c9))/0xa)+parseInt(_0x11fc81(0x1c3))/0xb*(parseInt(_0x11fc81(0x1a7))/0xc);if(_0x578ead===_0x47a176)break;else _0x3ac998['push'](_0x3ac998['shift']());}catch(_0x48ad8e){_0x3ac998['push'](_0x3ac998['shift']());}}}(a21_0x38e7,0x956ad));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{CallToolRequestSchema,ListToolsRequestSchema}from'@modelcontextprotocol/sdk/types.js';import{Jimp}from'jimp';import{createRequire}from'module';const require=createRequire(import.meta.url);let robot;function a21_0x19cd(_0x5a926b,_0x261a9a){_0x5a926b=_0x5a926b-0x1a3;const _0x38e7ac=a21_0x38e7();let _0x19cd09=_0x38e7ac[_0x5a926b];return _0x19cd09;}try{robot=require(a21_0x5c2b74(0x1c6));}catch(a21_0x257aa4){}function a21_0x38e7(){const _0x8a6891=['computer_key_tap','capture','join','image','width','Error:\x20','computer_type','alt','height','Tapped\x20key:\x20','11BIWkuq','computer_mouse_click','Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)','@hurdlegroup/robotjs','object','number','20gwzgXU','text','toString','params','array','Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','shift','bitmap','Type\x20a\x20string\x20of\x20text.','Screenshot\x20taken.','computer_screen_size','2777596oqOCLV','left','49jhkdMM','command','1148967nFWvGj','connect','Modifier\x20keys','834060obBEkB','getScreenSize','getBuffer','typeString','523987pdNiXA','Typed:\x20\x22','boolean','X\x20coordinate','middle','data','screen','Y\x20coordinate','4667472UZkRcr','Clicked\x20','1.0.0','computer_mouse_move','Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','with\x20','43978092uffkEJ','image/jpeg','mouseClick','key','2bBbHYA','\x20button','Get\x20the\x20screen\x20resolution.','3GqpCyZ','resize','setRequestHandler','keyTap','computer_screenshot','5352930wdHwji','computer-use','string','length','moveMouse','control'];a21_0x38e7=function(){return _0x8a6891;};return a21_0x38e7();}const AUTO=-0x1,MIME_JPEG=a21_0x5c2b74(0x1a8),server=new Server({'name':a21_0x5c2b74(0x1b4),'version':a21_0x5c2b74(0x1a3)},{'capabilities':{'tools':{}}});server[a21_0x5c2b74(0x1b0)](ListToolsRequestSchema,async()=>{const _0x5abcae=a21_0x5c2b74;return{'tools':[{'name':'computer_screenshot','description':'Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','inputSchema':{'type':_0x5abcae(0x1c7),'properties':{}}},{'name':_0x5abcae(0x1a4),'description':_0x5abcae(0x1a5),'inputSchema':{'type':_0x5abcae(0x1c7),'properties':{'x':{'type':'number','description':_0x5abcae(0x1e2)},'y':{'type':_0x5abcae(0x1c8),'description':_0x5abcae(0x1e6)}},'required':['x','y']}},{'name':_0x5abcae(0x1c4),'description':'Click\x20the\x20mouse\x20button.','inputSchema':{'type':_0x5abcae(0x1c7),'properties':{'button':{'type':_0x5abcae(0x1b5),'enum':['left','right',_0x5abcae(0x1e3)],'default':_0x5abcae(0x1d5)},'double':{'type':_0x5abcae(0x1e1),'default':![]}}}},{'name':_0x5abcae(0x1bf),'description':_0x5abcae(0x1d1),'inputSchema':{'type':_0x5abcae(0x1c7),'properties':{'text':{'type':'string','description':'Text\x20to\x20type'}},'required':[_0x5abcae(0x1ca)]}},{'name':_0x5abcae(0x1b9),'description':_0x5abcae(0x1ce),'inputSchema':{'type':_0x5abcae(0x1c7),'properties':{'key':{'type':_0x5abcae(0x1b5),'description':_0x5abcae(0x1c5)},'modifiers':{'type':_0x5abcae(0x1cd),'items':{'type':_0x5abcae(0x1b5),'enum':[_0x5abcae(0x1c0),_0x5abcae(0x1d7),_0x5abcae(0x1b8),_0x5abcae(0x1cf)]},'description':_0x5abcae(0x1da)}},'required':[_0x5abcae(0x1aa)]}},{'name':_0x5abcae(0x1d3),'description':_0x5abcae(0x1ad),'inputSchema':{'type':_0x5abcae(0x1c7),'properties':{}}}]};}),server[a21_0x5c2b74(0x1b0)](CallToolRequestSchema,async _0x26c071=>{const _0x27fc01=a21_0x5c2b74,{name:_0x578677,arguments:_0x41611b}=_0x26c071[_0x27fc01(0x1cc)];try{if(_0x578677===_0x27fc01(0x1b2)){const _0x422080=robot['getScreenSize'](),_0x164644=robot[_0x27fc01(0x1e5)][_0x27fc01(0x1ba)](0x0,0x0,_0x422080[_0x27fc01(0x1bd)],_0x422080[_0x27fc01(0x1c1)]),_0x48fa87=new Jimp({'width':_0x164644[_0x27fc01(0x1bd)],'height':_0x164644['height']});for(let _0x163a32=0x0;_0x163a32<_0x164644[_0x27fc01(0x1bc)][_0x27fc01(0x1b6)];_0x163a32+=0x4){_0x48fa87[_0x27fc01(0x1d0)]['data'][_0x163a32]=_0x164644[_0x27fc01(0x1bc)][_0x163a32+0x2],_0x48fa87[_0x27fc01(0x1d0)][_0x27fc01(0x1e4)][_0x163a32+0x1]=_0x164644[_0x27fc01(0x1bc)][_0x163a32+0x1],_0x48fa87[_0x27fc01(0x1d0)][_0x27fc01(0x1e4)][_0x163a32+0x2]=_0x164644['image'][_0x163a32],_0x48fa87[_0x27fc01(0x1d0)][_0x27fc01(0x1e4)][_0x163a32+0x3]=_0x164644[_0x27fc01(0x1bc)][_0x163a32+0x3];}_0x48fa87[_0x27fc01(0x1d0)][_0x27fc01(0x1bd)]>0x400&&_0x48fa87[_0x27fc01(0x1af)]({'w':0x400});const _0x250b9a=await _0x48fa87[_0x27fc01(0x1dd)](MIME_JPEG),_0x5a24da=_0x250b9a[_0x27fc01(0x1cb)]('base64');return{'content':[{'type':_0x27fc01(0x1ca),'text':_0x27fc01(0x1d2)},{'type':'image','data':_0x5a24da,'mimeType':_0x27fc01(0x1a8)}]};}if(_0x578677===_0x27fc01(0x1a4)){const {x:_0x75e814,y:_0x31137f}=_0x41611b;return robot[_0x27fc01(0x1b7)](_0x75e814,_0x31137f),{'content':[{'type':_0x27fc01(0x1ca),'text':'Moved\x20mouse\x20to\x20'+_0x75e814+',\x20'+_0x31137f}]};}if(_0x578677===_0x27fc01(0x1c4)){const {button:button='left',double:double=![]}=_0x41611b;return robot[_0x27fc01(0x1a9)](button,double),{'content':[{'type':_0x27fc01(0x1ca),'text':_0x27fc01(0x1e8)+button+_0x27fc01(0x1ac)+(double?'\x20(double)':'')}]};}if(_0x578677===_0x27fc01(0x1bf)){const {text:_0x12908b}=_0x41611b;return robot[_0x27fc01(0x1de)](_0x12908b),{'content':[{'type':_0x27fc01(0x1ca),'text':_0x27fc01(0x1e0)+_0x12908b+'\x22'}]};}if(_0x578677===_0x27fc01(0x1b9)){const {key:_0x49b745,modifiers:_0x28b8d2}=_0x41611b;return robot[_0x27fc01(0x1b1)](_0x49b745,_0x28b8d2),{'content':[{'type':_0x27fc01(0x1ca),'text':_0x27fc01(0x1c2)+_0x49b745+'\x20'+(_0x28b8d2?_0x27fc01(0x1a6)+_0x28b8d2[_0x27fc01(0x1bb)]('+'):'')}]};}if(_0x578677===_0x27fc01(0x1d3)){const _0x1caf8c=robot[_0x27fc01(0x1dc)]();return{'content':[{'type':_0x27fc01(0x1ca),'text':'Screen\x20size:\x20'+_0x1caf8c[_0x27fc01(0x1bd)]+'x'+_0x1caf8c[_0x27fc01(0x1c1)]}]};}throw new Error('Unknown\x20tool:\x20'+_0x578677);}catch(_0x14442c){return{'content':[{'type':_0x27fc01(0x1ca),'text':_0x27fc01(0x1be)+_0x14442c}],'isError':!![]};}});const transport=new StdioServerTransport();await server[a21_0x5c2b74(0x1d9)](transport);
1
+ const a21_0x3039f1=a21_0x3492;(function(_0x24451f,_0x591db7){const _0x56dd9b=a21_0x3492,_0x318d04=_0x24451f();while(!![]){try{const _0x3d9678=parseInt(_0x56dd9b(0x20b))/0x1*(-parseInt(_0x56dd9b(0x221))/0x2)+parseInt(_0x56dd9b(0x200))/0x3*(parseInt(_0x56dd9b(0x1f5))/0x4)+parseInt(_0x56dd9b(0x213))/0x5+-parseInt(_0x56dd9b(0x1fa))/0x6+-parseInt(_0x56dd9b(0x206))/0x7+parseInt(_0x56dd9b(0x21a))/0x8+parseInt(_0x56dd9b(0x215))/0x9;if(_0x3d9678===_0x591db7)break;else _0x318d04['push'](_0x318d04['shift']());}catch(_0x29a0b6){_0x318d04['push'](_0x318d04['shift']());}}}(a21_0x26fb,0x45e39));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';function a21_0x26fb(){const _0x1e69e6=['join','60Vifllf','key','with\x20','number','computer_screen_size','typeString','Screenshot\x20taken.','bitmap','1.0.0','control','Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','array','middle','width','length','screen','left','command','589660sUeDUY','Type\x20a\x20string\x20of\x20text.','computer_screenshot','image/jpeg','object','3349746jKHUdC','boolean','\x20(double)','image','Moved\x20mouse\x20to\x20','string','6ERXpsT','setRequestHandler','Click\x20the\x20mouse\x20button.','connect','getScreenSize','keyTap','3009020QqjpAF','Typed:\x20\x22','@hurdlegroup/robotjs','computer_type','alt','2685yVIWfm','Get\x20the\x20screen\x20resolution.','shift','Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)','computer_key_tap','Y\x20coordinate','Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','computer_mouse_click','2790530oktktu','data','2708352rnnAAD','height','Unknown\x20tool:\x20','capture','Clicked\x20','1608816DhjsQm','Screen\x20size:\x20','text','computer_mouse_move','toString','getBuffer'];a21_0x26fb=function(){return _0x1e69e6;};return a21_0x26fb();}import{CallToolRequestSchema,ListToolsRequestSchema}from'@modelcontextprotocol/sdk/types.js';import{Jimp}from'jimp';import{createRequire}from'module';const require=createRequire(import.meta.url);let robot;try{robot=require(a21_0x3039f1(0x208));}catch(a21_0x426390){}const AUTO=-0x1,MIME_JPEG='image/jpeg',server=new Server({'name':'computer-use','version':a21_0x3039f1(0x229)},{'capabilities':{'tools':{}}});function a21_0x3492(_0x9d94c1,_0x59a5fe){_0x9d94c1=_0x9d94c1-0x1f1;const _0x26fba5=a21_0x26fb();let _0x349267=_0x26fba5[_0x9d94c1];return _0x349267;}server['setRequestHandler'](ListToolsRequestSchema,async()=>{const _0x390972=a21_0x3039f1;return{'tools':[{'name':'computer_screenshot','description':'Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','inputSchema':{'type':_0x390972(0x1f9),'properties':{}}},{'name':'computer_mouse_move','description':_0x390972(0x211),'inputSchema':{'type':_0x390972(0x1f9),'properties':{'x':{'type':'number','description':'X\x20coordinate'},'y':{'type':_0x390972(0x224),'description':_0x390972(0x210)}},'required':['x','y']}},{'name':_0x390972(0x212),'description':_0x390972(0x202),'inputSchema':{'type':_0x390972(0x1f9),'properties':{'button':{'type':_0x390972(0x1ff),'enum':[_0x390972(0x1f3),'right',_0x390972(0x22d)],'default':_0x390972(0x1f3)},'double':{'type':_0x390972(0x1fb),'default':![]}}}},{'name':'computer_type','description':_0x390972(0x1f6),'inputSchema':{'type':'object','properties':{'text':{'type':_0x390972(0x1ff),'description':'Text\x20to\x20type'}},'required':[_0x390972(0x21c)]}},{'name':_0x390972(0x20f),'description':_0x390972(0x22b),'inputSchema':{'type':_0x390972(0x1f9),'properties':{'key':{'type':_0x390972(0x1ff),'description':_0x390972(0x20e)},'modifiers':{'type':_0x390972(0x22c),'items':{'type':_0x390972(0x1ff),'enum':[_0x390972(0x20a),_0x390972(0x1f4),_0x390972(0x22a),_0x390972(0x20d)]},'description':'Modifier\x20keys'}},'required':[_0x390972(0x222)]}},{'name':_0x390972(0x225),'description':_0x390972(0x20c),'inputSchema':{'type':_0x390972(0x1f9),'properties':{}}}]};}),server[a21_0x3039f1(0x201)](CallToolRequestSchema,async _0x57c487=>{const _0x47a76c=a21_0x3039f1,{name:_0x237bff,arguments:_0x154128}=_0x57c487['params'];try{if(_0x237bff===_0x47a76c(0x1f7)){const _0x3381b1=robot[_0x47a76c(0x204)](),_0x3213c7=robot[_0x47a76c(0x1f2)][_0x47a76c(0x218)](0x0,0x0,_0x3381b1[_0x47a76c(0x22e)],_0x3381b1[_0x47a76c(0x216)]),_0x1710e9=new Jimp({'width':_0x3213c7[_0x47a76c(0x22e)],'height':_0x3213c7[_0x47a76c(0x216)]});for(let _0x27f326=0x0;_0x27f326<_0x3213c7['image'][_0x47a76c(0x1f1)];_0x27f326+=0x4){_0x1710e9[_0x47a76c(0x228)][_0x47a76c(0x214)][_0x27f326]=_0x3213c7[_0x47a76c(0x1fd)][_0x27f326+0x2],_0x1710e9['bitmap'][_0x47a76c(0x214)][_0x27f326+0x1]=_0x3213c7[_0x47a76c(0x1fd)][_0x27f326+0x1],_0x1710e9[_0x47a76c(0x228)][_0x47a76c(0x214)][_0x27f326+0x2]=_0x3213c7[_0x47a76c(0x1fd)][_0x27f326],_0x1710e9[_0x47a76c(0x228)]['data'][_0x27f326+0x3]=_0x3213c7[_0x47a76c(0x1fd)][_0x27f326+0x3];}_0x1710e9[_0x47a76c(0x228)][_0x47a76c(0x22e)]>0x400&&_0x1710e9['resize']({'w':0x400});const _0xaa06ad=await _0x1710e9[_0x47a76c(0x21f)](MIME_JPEG),_0x2ce40e=_0xaa06ad[_0x47a76c(0x21e)]('base64');return{'content':[{'type':'text','text':_0x47a76c(0x227)},{'type':_0x47a76c(0x1fd),'data':_0x2ce40e,'mimeType':_0x47a76c(0x1f8)}]};}if(_0x237bff===_0x47a76c(0x21d)){const {x:_0x2c27a6,y:_0x46d04d}=_0x154128;return robot['moveMouse'](_0x2c27a6,_0x46d04d),{'content':[{'type':_0x47a76c(0x21c),'text':_0x47a76c(0x1fe)+_0x2c27a6+',\x20'+_0x46d04d}]};}if(_0x237bff===_0x47a76c(0x212)){const {button:button=_0x47a76c(0x1f3),double:double=![]}=_0x154128;return robot['mouseClick'](button,double),{'content':[{'type':_0x47a76c(0x21c),'text':_0x47a76c(0x219)+button+'\x20button'+(double?_0x47a76c(0x1fc):'')}]};}if(_0x237bff===_0x47a76c(0x209)){const {text:_0x188467}=_0x154128;return robot[_0x47a76c(0x226)](_0x188467),{'content':[{'type':'text','text':_0x47a76c(0x207)+_0x188467+'\x22'}]};}if(_0x237bff===_0x47a76c(0x20f)){const {key:_0x4f600a,modifiers:_0x32ed87}=_0x154128;return robot[_0x47a76c(0x205)](_0x4f600a,_0x32ed87),{'content':[{'type':_0x47a76c(0x21c),'text':'Tapped\x20key:\x20'+_0x4f600a+'\x20'+(_0x32ed87?_0x47a76c(0x223)+_0x32ed87[_0x47a76c(0x220)]('+'):'')}]};}if(_0x237bff===_0x47a76c(0x225)){const _0x796ab2=robot['getScreenSize']();return{'content':[{'type':'text','text':_0x47a76c(0x21b)+_0x796ab2['width']+'x'+_0x796ab2[_0x47a76c(0x216)]}]};}throw new Error(_0x47a76c(0x217)+_0x237bff);}catch(_0x13d495){return{'content':[{'type':_0x47a76c(0x21c),'text':'Error:\x20'+_0x13d495}],'isError':!![]};}});const transport=new StdioServerTransport();await server[a21_0x3039f1(0x203)](transport);
@@ -1 +1 @@
1
- const a22_0x4fd87d=a22_0x1038;(function(_0xd5e0d8,_0x1feb94){const _0x460596=a22_0x1038,_0x47cfb0=_0xd5e0d8();while(!![]){try{const _0x2050f8=-parseInt(_0x460596(0x1c5))/0x1+-parseInt(_0x460596(0x1cb))/0x2+-parseInt(_0x460596(0x1b7))/0x3*(parseInt(_0x460596(0x1ab))/0x4)+-parseInt(_0x460596(0x1bd))/0x5+-parseInt(_0x460596(0x1c0))/0x6+-parseInt(_0x460596(0x1aa))/0x7*(-parseInt(_0x460596(0x1ae))/0x8)+-parseInt(_0x460596(0x1c4))/0x9*(-parseInt(_0x460596(0x1b3))/0xa);if(_0x2050f8===_0x1feb94)break;else _0x47cfb0['push'](_0x47cfb0['shift']());}catch(_0x23162e){_0x47cfb0['push'](_0x47cfb0['shift']());}}}(a22_0x9044,0xcf200));import*as a22_0x345eb3 from'../telegram/index.js';import*as a22_0x79b880 from'../discord/index.js';import*as a22_0x285bfa from'../email/index.js';import*as a22_0x32ebe5 from'../ui/output.js';class BotManager{[a22_0x4fd87d(0x1b1)]=[];constructor(){const _0x522fa6=a22_0x4fd87d;this[_0x522fa6(0x1b1)][_0x522fa6(0x1c8)]({'name':'Telegram','start':a22_0x345eb3['startBot'],'stop':a22_0x345eb3[_0x522fa6(0x1b0)],'isRunning':a22_0x345eb3[_0x522fa6(0x1c2)],'isConfigured':a22_0x345eb3[_0x522fa6(0x1c1)]}),this[_0x522fa6(0x1b1)][_0x522fa6(0x1c8)]({'name':_0x522fa6(0x1bc),'start':a22_0x79b880[_0x522fa6(0x1b2)],'stop':a22_0x79b880[_0x522fa6(0x1b0)],'isRunning':a22_0x79b880['isBotRunning'],'isConfigured':a22_0x79b880['isConfigured']}),this['services'][_0x522fa6(0x1c8)]({'name':_0x522fa6(0x1b9),'start':a22_0x285bfa[_0x522fa6(0x1b2)],'stop':a22_0x285bfa['stopBot'],'isRunning':a22_0x285bfa[_0x522fa6(0x1c2)],'isConfigured':a22_0x285bfa[_0x522fa6(0x1c1)]});}async[a22_0x4fd87d(0x1c6)](){const _0x1b0c74=a22_0x4fd87d,_0x306778=this[_0x1b0c74(0x1b1)][_0x1b0c74(0x1b5)](_0x42cc1f=>_0x42cc1f['isConfigured']());if(_0x306778[_0x1b0c74(0x1ca)]===0x0)return;a22_0x32ebe5['dim'](_0x1b0c74(0x1b4));const _0x586f7a=await Promise['all'](_0x306778[_0x1b0c74(0x1bf)](async _0x3ef6ef=>{const _0x591a9c=_0x1b0c74;try{if(_0x3ef6ef['isRunning']())return!![];const _0x1bfb01=await _0x3ef6ef['start']();return _0x1bfb01;}catch(_0x30f5b0){return a22_0x32ebe5[_0x591a9c(0x1ad)](_0x591a9c(0x1ba)+_0x3ef6ef[_0x591a9c(0x1c3)]+':\x20'+_0x30f5b0),![];}})),_0x283c2a=_0x586f7a[_0x1b0c74(0x1b5)](_0x469ca0=>_0x469ca0)[_0x1b0c74(0x1ca)];_0x283c2a>0x0&&a22_0x32ebe5[_0x1b0c74(0x1c9)](_0x1b0c74(0x1c7)+_0x283c2a+'/'+_0x306778[_0x1b0c74(0x1ca)]+_0x1b0c74(0x1b6));}[a22_0x4fd87d(0x1af)](){const _0x11d310=a22_0x4fd87d;this['services'][_0x11d310(0x1ac)](_0x2f7c11=>{const _0x18aa33=_0x11d310;_0x2f7c11[_0x18aa33(0x1be)]()&&_0x2f7c11[_0x18aa33(0x1bb)]();});}[a22_0x4fd87d(0x1b8)](){const _0x3d3e4a=a22_0x4fd87d;return this[_0x3d3e4a(0x1b1)]['map'](_0x51b470=>({'name':_0x51b470['name'],'running':_0x51b470[_0x3d3e4a(0x1be)](),'configured':_0x51b470[_0x3d3e4a(0x1c1)]()}));}}export const botManager=new BotManager();function a22_0x1038(_0x2cc534,_0x34e596){_0x2cc534=_0x2cc534-0x1aa;const _0x9044bd=a22_0x9044();let _0x10382e=_0x9044bd[_0x2cc534];return _0x10382e;}function a22_0x9044(){const _0x19c063=['isRunning','map','9255186BoQzee','isConfigured','isBotRunning','name','234kHUSUM','1386751lVnWMx','startAllConfigured','[Bot\x20Manager]\x20','push','success','length','3257284iEKEHj','5866XWKEgz','3448NVQvyv','forEach','error','3336MZHhAC','stopAll','stopBot','services','startBot','2506830EAQIWz','\x0a[Bot\x20Manager]\x20Starting\x20background\x20services...','filter','\x20services\x20active\x20in\x20background','3594YopaDj','getStatus','Email','Failed\x20to\x20start\x20','stop','Discord','2141100LGHOHz'];a22_0x9044=function(){return _0x19c063;};return a22_0x9044();}
1
+ const a22_0x26e339=a22_0x5000;(function(_0xcc24a3,_0x113e0c){const _0x3ec6d6=a22_0x5000,_0x4ac810=_0xcc24a3();while(!![]){try{const _0x13a380=-parseInt(_0x3ec6d6(0x105))/0x1*(parseInt(_0x3ec6d6(0xf0))/0x2)+-parseInt(_0x3ec6d6(0xec))/0x3*(-parseInt(_0x3ec6d6(0xf9))/0x4)+-parseInt(_0x3ec6d6(0xe7))/0x5+parseInt(_0x3ec6d6(0xed))/0x6+parseInt(_0x3ec6d6(0xef))/0x7*(-parseInt(_0x3ec6d6(0x104))/0x8)+parseInt(_0x3ec6d6(0xfc))/0x9*(-parseInt(_0x3ec6d6(0xfa))/0xa)+parseInt(_0x3ec6d6(0x102))/0xb;if(_0x13a380===_0x113e0c)break;else _0x4ac810['push'](_0x4ac810['shift']());}catch(_0x43075e){_0x4ac810['push'](_0x4ac810['shift']());}}}(a22_0x31d8,0x8064c));import*as a22_0x59034b from'../telegram/index.js';function a22_0x5000(_0x26fa71,_0x51b234){_0x26fa71=_0x26fa71-0xe5;const _0x31d8a7=a22_0x31d8();let _0x50005f=_0x31d8a7[_0x26fa71];return _0x50005f;}import*as a22_0x1c4f37 from'../discord/index.js';import*as a22_0x8f40b8 from'../email/index.js';import*as a22_0x428494 from'../ui/output.js';class BotManager{[a22_0x26e339(0xfe)]=[];constructor(){const _0x399431=a22_0x26e339;this[_0x399431(0xfe)][_0x399431(0xfd)]({'name':_0x399431(0xf2),'start':a22_0x59034b['startBot'],'stop':a22_0x59034b[_0x399431(0xe6)],'isRunning':a22_0x59034b[_0x399431(0xee)],'isConfigured':a22_0x59034b[_0x399431(0xf6)]}),this['services'][_0x399431(0xfd)]({'name':_0x399431(0xeb),'start':a22_0x1c4f37[_0x399431(0xf5)],'stop':a22_0x1c4f37['stopBot'],'isRunning':a22_0x1c4f37[_0x399431(0xee)],'isConfigured':a22_0x1c4f37[_0x399431(0xf6)]}),this[_0x399431(0xfe)][_0x399431(0xfd)]({'name':_0x399431(0x106),'start':a22_0x8f40b8[_0x399431(0xf5)],'stop':a22_0x8f40b8[_0x399431(0xe6)],'isRunning':a22_0x8f40b8[_0x399431(0xee)],'isConfigured':a22_0x8f40b8[_0x399431(0xf6)]});}async['startAllConfigured'](){const _0x3b59ee=a22_0x26e339,_0x2c9bc7=this[_0x3b59ee(0xfe)]['filter'](_0x759fbd=>_0x759fbd['isConfigured']());if(_0x2c9bc7[_0x3b59ee(0xe8)]===0x0)return;a22_0x428494[_0x3b59ee(0x100)]('\x0a[Bot\x20Manager]\x20Starting\x20background\x20services...');const _0x50199e=await Promise[_0x3b59ee(0xe5)](_0x2c9bc7[_0x3b59ee(0xea)](async _0x54247f=>{const _0x1b3f6e=_0x3b59ee;try{if(_0x54247f[_0x1b3f6e(0xf4)]())return!![];const _0x5635d3=await _0x54247f['start']();return _0x5635d3;}catch(_0x2dc6bc){return a22_0x428494[_0x1b3f6e(0x103)](_0x1b3f6e(0xf8)+_0x54247f[_0x1b3f6e(0xff)]+':\x20'+_0x2dc6bc),![];}})),_0x283784=_0x50199e[_0x3b59ee(0x101)](_0x3edad9=>_0x3edad9)['length'];_0x283784>0x0&&a22_0x428494[_0x3b59ee(0xe9)](_0x3b59ee(0xf1)+_0x283784+'/'+_0x2c9bc7[_0x3b59ee(0xe8)]+'\x20services\x20active\x20in\x20background');}[a22_0x26e339(0xfb)](){const _0x1d8930=a22_0x26e339;this['services'][_0x1d8930(0xf3)](_0x2f31dd=>{const _0x15615e=_0x1d8930;_0x2f31dd[_0x15615e(0xf4)]()&&_0x2f31dd['stop']();});}[a22_0x26e339(0xf7)](){const _0x23748c=a22_0x26e339;return this['services'][_0x23748c(0xea)](_0x447ce2=>({'name':_0x447ce2['name'],'running':_0x447ce2[_0x23748c(0xf4)](),'configured':_0x447ce2['isConfigured']()}));}}export const botManager=new BotManager();function a22_0x31d8(){const _0x76b20b=['14042116ZBuPVK','error','9832DcGgTw','155GjUWds','Email','all','stopBot','371945ckMHHJ','length','success','map','Discord','173067tcYZEx','5465388wNpbmc','isBotRunning','2065PvOvrK','8974MxCyIS','[Bot\x20Manager]\x20','Telegram','forEach','isRunning','startBot','isConfigured','getStatus','Failed\x20to\x20start\x20','8QQDths','10uCgrFF','stopAll','5800527djsGuI','push','services','name','dim','filter'];a22_0x31d8=function(){return _0x76b20b;};return a22_0x31d8();}
@@ -1 +1 @@
1
- (function(_0x289cd7,_0x3f6251){const _0x4057b5=a23_0x6a4b,_0x214192=_0x289cd7();while(!![]){try{const _0x4cd75c=parseInt(_0x4057b5(0xae))/0x1+parseInt(_0x4057b5(0x9b))/0x2*(parseInt(_0x4057b5(0xa8))/0x3)+parseInt(_0x4057b5(0xad))/0x4*(parseInt(_0x4057b5(0xa2))/0x5)+-parseInt(_0x4057b5(0xa6))/0x6+-parseInt(_0x4057b5(0x9e))/0x7+parseInt(_0x4057b5(0xb0))/0x8*(parseInt(_0x4057b5(0x9f))/0x9)+parseInt(_0x4057b5(0x9c))/0xa*(-parseInt(_0x4057b5(0xac))/0xb);if(_0x4cd75c===_0x3f6251)break;else _0x214192['push'](_0x214192['shift']());}catch(_0x4864eb){_0x214192['push'](_0x214192['shift']());}}}(a23_0x15cb,0xc3496));import{GoogleGenerativeAI}from'@google/generative-ai';import{promises as a23_0xae75a6}from'fs';import*as a23_0x49f4d1 from'../ui/output.js';import a23_0x48092c from'conf';const config=new a23_0x48092c({'projectName':'woozlit-cli-voice'});function a23_0x15cb(){const _0x508d0d=['11129944yhRtlv','4014qYtLMs','response','toString','329985gpSSTd','readFile','get','text','7314750zXxGRy','message','3xoLkLM','generateContent','set','error','2300089BFxTKt','72NXDAtC','1162877LoBbwO','geminiKey','7696EbigCK','getGenerativeModel','base64','2912866IjhhBi','30OoEzCq','audio/ogg'];a23_0x15cb=function(){return _0x508d0d;};return a23_0x15cb();}function a23_0x6a4b(_0x3c446f,_0x333798){_0x3c446f=_0x3c446f-0x99;const _0x15cbab=a23_0x15cb();let _0x6a4bc4=_0x15cbab[_0x3c446f];return _0x6a4bc4;}export function setGeminiKey(_0xabf3db){const _0x3dad79=a23_0x6a4b;config[_0x3dad79(0xaa)]('geminiKey',_0xabf3db);}export function getGeminiKey(){const _0x10821e=a23_0x6a4b;return config[_0x10821e(0xa4)](_0x10821e(0xaf))||'';}export async function processVoiceMessage(_0x249c43){const _0x5d9d6a=a23_0x6a4b,_0x275a83=getGeminiKey();if(!_0x275a83)throw new Error('Gemini\x20API\x20Key\x20not\x20configured.\x20Run\x20\x27/voice\x20setup\x27\x20first.');const _0x2c1784=new GoogleGenerativeAI(_0x275a83),_0x306647=_0x2c1784[_0x5d9d6a(0x99)]({'model':'gemini-2.0-flash-exp'});try{const _0x3dcaad=await a23_0xae75a6[_0x5d9d6a(0xa3)](_0x249c43),_0x1645e4=_0x3dcaad[_0x5d9d6a(0xa1)](_0x5d9d6a(0x9a)),_0xc8c974=_0x5d9d6a(0x9d),_0xa07e67=await _0x306647[_0x5d9d6a(0xa9)](['Listen\x20to\x20this\x20audio\x20and\x20respond\x20helpfully.\x20If\x20it\x27s\x20a\x20command,\x20execute\x20it\x20or\x20say\x20you\x20can\x27t.',{'inlineData':{'mimeType':_0xc8c974,'data':_0x1645e4}}]),_0x3b8dc9=_0xa07e67[_0x5d9d6a(0xa0)][_0x5d9d6a(0xa5)]();return{'text':_0x3b8dc9};}catch(_0x1224e8){a23_0x49f4d1[_0x5d9d6a(0xab)]('Voice\x20processing\x20failed:\x20'+_0x1224e8[_0x5d9d6a(0xa7)]);throw _0x1224e8;}}
1
+ const a23_0x633a9d=a23_0x4ed4;(function(_0x4288da,_0x247b37){const _0x49269c=a23_0x4ed4,_0x4dceb4=_0x4288da();while(!![]){try{const _0x16b7a3=parseInt(_0x49269c(0x175))/0x1*(-parseInt(_0x49269c(0x167))/0x2)+-parseInt(_0x49269c(0x15f))/0x3+parseInt(_0x49269c(0x15e))/0x4+parseInt(_0x49269c(0x161))/0x5*(parseInt(_0x49269c(0x169))/0x6)+parseInt(_0x49269c(0x173))/0x7*(parseInt(_0x49269c(0x160))/0x8)+parseInt(_0x49269c(0x166))/0x9+-parseInt(_0x49269c(0x15d))/0xa;if(_0x16b7a3===_0x247b37)break;else _0x4dceb4['push'](_0x4dceb4['shift']());}catch(_0x3ebe35){_0x4dceb4['push'](_0x4dceb4['shift']());}}}(a23_0x4fd3,0x5c82d));import{GoogleGenerativeAI}from'@google/generative-ai';import{promises as a23_0xf34ca0}from'fs';import*as a23_0x871d2f from'../ui/output.js';function a23_0x4fd3(){const _0x57c413=['1662EIjlfL','getGenerativeModel','response','gemini-2.0-flash-exp','Listen\x20to\x20this\x20audio\x20and\x20respond\x20helpfully.\x20If\x20it\x27s\x20a\x20command,\x20execute\x20it\x20or\x20say\x20you\x20can\x27t.','Gemini\x20API\x20Key\x20not\x20configured.\x20Run\x20\x27/voice\x20setup\x27\x20first.','audio/ogg','text','readFile','get','103691MtQvZy','base64','10XqHOeX','6004640NwAfne','2088344yBmfVh','637005MkveNJ','128bsLdNM','4820fUghnX','set','woozlit-cli-voice','Voice\x20processing\x20failed:\x20','toString','3645288EKGLFz','47886XUHjqS','geminiKey'];a23_0x4fd3=function(){return _0x57c413;};return a23_0x4fd3();}function a23_0x4ed4(_0x4d1f82,_0x829b96){_0x4d1f82=_0x4d1f82-0x15d;const _0x4fd33c=a23_0x4fd3();let _0x4ed454=_0x4fd33c[_0x4d1f82];return _0x4ed454;}import a23_0x1ec1c9 from'conf';const config=new a23_0x1ec1c9({'projectName':a23_0x633a9d(0x163)});export function setGeminiKey(_0x526645){const _0x31ec3b=a23_0x633a9d;config[_0x31ec3b(0x162)](_0x31ec3b(0x168),_0x526645);}export function getGeminiKey(){const _0x5e58b1=a23_0x633a9d;return config[_0x5e58b1(0x172)]('geminiKey')||'';}export async function processVoiceMessage(_0x2edc7d){const _0x4c5c87=a23_0x633a9d,_0xe7ebe1=getGeminiKey();if(!_0xe7ebe1)throw new Error(_0x4c5c87(0x16e));const _0x4d8c33=new GoogleGenerativeAI(_0xe7ebe1),_0x486f34=_0x4d8c33[_0x4c5c87(0x16a)]({'model':_0x4c5c87(0x16c)});try{const _0x17027a=await a23_0xf34ca0[_0x4c5c87(0x171)](_0x2edc7d),_0x1a446e=_0x17027a[_0x4c5c87(0x165)](_0x4c5c87(0x174)),_0x16a4b0=_0x4c5c87(0x16f),_0xd7a10b=await _0x486f34['generateContent']([_0x4c5c87(0x16d),{'inlineData':{'mimeType':_0x16a4b0,'data':_0x1a446e}}]),_0xe9bec1=_0xd7a10b[_0x4c5c87(0x16b)][_0x4c5c87(0x170)]();return{'text':_0xe9bec1};}catch(_0x240e8a){a23_0x871d2f['error'](_0x4c5c87(0x164)+_0x240e8a['message']);throw _0x240e8a;}}