woozlit 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/login.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/server.js +1 -1
- package/dist/browser/tools.js +1 -1
- package/dist/chat/agent.js +1 -1
- package/dist/config/mcp.js +1 -1
- package/dist/config/settings.js +1 -1
- package/dist/discord/client.js +1 -1
- package/dist/discord/config.js +1 -1
- package/dist/discord/index.js +1 -1
- package/dist/discord/setup.js +1 -1
- package/dist/email/config.js +1 -1
- package/dist/email/index.js +1 -1
- package/dist/email/service.js +1 -1
- package/dist/email/setup.js +1 -1
- package/dist/github/api.js +1 -1
- package/dist/github/auth.js +1 -1
- package/dist/github/auto-setup.js +1 -1
- package/dist/github/index.js +1 -1
- package/dist/github/manual-setup.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp-servers/computer-use.js +1 -1
- package/dist/services/bot-manager.js +1 -1
- package/dist/services/voice-agent.js +1 -1
- package/dist/telegram/bot.js +1 -1
- package/dist/telegram/config.js +1 -1
- package/dist/telegram/index.js +1 -1
- package/dist/telegram/reminders.js +1 -1
- package/dist/telegram/setup.js +1 -1
- package/dist/tools/command.js +1 -1
- package/dist/tools/file.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/mcp.js +1 -1
- package/dist/tools/rollback.js +1 -1
- package/dist/tools/rules.js +1 -1
- package/dist/twilio/config.js +1 -1
- package/dist/twilio/index.js +1 -1
- package/dist/twilio/server.js +1 -1
- package/dist/twilio/setup.js +1 -1
- package/dist/ui/output.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/themes.js +1 -1
- package/dist/utils/api.js +1 -1
- package/dist/utils/history.js +1 -1
- package/dist/utils/mcp-installer.js +1 -1
- package/dist/utils/platform.js +1 -1
- package/dist/utils/storage.js +1 -1
- package/dist/utils/update-check.js +1 -1
- package/dist/verify_repro.js +1 -1
- package/package.json +1 -1
package/dist/auth/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x2b1cb6,_0x584f91){const _0x597cea=a0_0x3bb3,_0x51dc4e=_0x2b1cb6();while(!![]){try{const _0x7ba335=-parseInt(_0x597cea(0x8b))/0x1*(-parseInt(_0x597cea(0x94))/0x2)+-parseInt(_0x597cea(0x99))/0x3+parseInt(_0x597cea(0x98))/0x4+-parseInt(_0x597cea(0x85))/0x5*(-parseInt(_0x597cea(0x9a))/0x6)+parseInt(_0x597cea(0x90))/0x7*(parseInt(_0x597cea(0x8a))/0x8)+parseInt(_0x597cea(0x8f))/0x9*(-parseInt(_0x597cea(0x8c))/0xa)+parseInt(_0x597cea(0x95))/0xb*(-parseInt(_0x597cea(0x93))/0xc);if(_0x7ba335===_0x584f91)break;else _0x51dc4e['push'](_0x51dc4e['shift']());}catch(_0x1543f9){_0x51dc4e['push'](_0x51dc4e['shift']());}}}(a0_0xdb9b,0x30223));import a0_0x2b3149 from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x2d1d2f}from'../utils/storage.js';function a0_0x3bb3(_0x31c505,_0x420eae){_0x31c505=_0x31c505-0x84;const _0xdb9ba9=a0_0xdb9b();let _0x3bb3ee=_0xdb9ba9[_0x31c505];return _0x3bb3ee;}export async function login(){const _0x5a4391=getApiUrl(),_0x265523=0x2694;return new Promise(_0x587bc0=>{const _0x391295=a0_0x3bb3,_0x4987e6=createServer(async(_0x558829,_0x589a54)=>{const _0xb74b77=a0_0x3bb3,_0x9380d2=new URL(_0x558829[_0xb74b77(0x9b)]||'','http://localhost:'+_0x265523);if(_0x9380d2['pathname']===_0xb74b77(0x87)){const _0xf44cea=_0x9380d2[_0xb74b77(0x96)]['get'](_0xb74b77(0x88)),_0x40731f=_0x9380d2[_0xb74b77(0x96)][_0xb74b77(0x8d)](_0xb74b77(0x97)),_0x23806c=_0x9380d2[_0xb74b77(0x96)][_0xb74b77(0x8d)](_0xb74b77(0x92)),_0x45ade8=_0x9380d2['searchParams'][_0xb74b77(0x8d)](_0xb74b77(0x8e));_0xf44cea&&_0x40731f?(setToken(_0xf44cea),setUser(_0x40731f,_0x23806c||'',_0x45ade8||''),_0x589a54[_0xb74b77(0x9c)](0xc8,{'Content-Type':_0xb74b77(0x89)}),_0x589a54['end']('\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<title>Woozlit\x20CLI</title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-family:\x20system-ui,\x20-apple-system,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#0a0a0a;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#fff;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.container\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x202rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20h1\x20{\x20color:\x20#10b981;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20p\x20{\x20color:\x20#9ca3af;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1>Login\x20Successful</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'),_0x4987e6['close'](),_0x587bc0(!![])):(_0x589a54[_0xb74b77(0x9c)](0x190,{'Content-Type':'text/html'}),_0x589a54['end'](_0xb74b77(0x86)),_0x4987e6[_0xb74b77(0x84)](),_0x587bc0(![]));}});_0x4987e6[_0x391295(0x91)](_0x265523,()=>{const _0x34d9f9=_0x5a4391+'/auth/cli?callback=http://localhost:'+_0x265523+'/callback';a0_0x2b3149(_0x34d9f9);}),setTimeout(()=>{const _0x35930a=_0x391295;_0x4987e6[_0x35930a(0x84)](),_0x587bc0(![]);},0x1d4c0);});}function a0_0xdb9b(){const _0x43c804=['4476AwIUYh','1454DDcpQX','2013lYDXod','searchParams','userId','1548400PWAoDH','969087BngLgW','54HPmnXp','url','writeHead','close','91985DpdHUC','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head><title>Woozlit\x20CLI</title></head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body\x20style=\x22font-family:\x20sans-serif;\x20text-align:\x20center;\x20padding:\x202rem;\x20background:\x20#0a0a0a;\x20color:\x20#fff;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1\x20style=\x22color:\x20#ef4444;\x22>Login\x20Failed</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Missing\x20authentication\x20data.\x20Please\x20try\x20again.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','/callback','token','text/html','262360pGKbSB','289qiapoh','3310tQsqff','get','displayName','8307KolYDq','28iVrKgR','listen','email'];a0_0xdb9b=function(){return _0x43c804;};return a0_0xdb9b();}export function logout(){a0_0x2d1d2f();}export{isLoggedIn};
|
package/dist/browser/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x442e0c=a1_0x3c18;function a1_0x5a1e(){const _0x4984bb=['23612beWguF','Tab\x20ID','486mOgnas','browser_fill','2500486nwmDqF','browser_scroll','tabId','1LOQeGd','Scroll\x20the\x20page\x20up\x20or\x20down','Direction\x20to\x20scroll','number','string','query','browser_click','87765FMkHUL','1829988SDXDzX','CSS\x20selector\x20for\x20the\x20element','object','direction','Click\x20an\x20element\x20on\x20the\x20page','bottom','384AwczWh','29164940iduqOD','7041377jMmQNe','4509888mtjXTR','Fill\x20a\x20form\x20field\x20or\x20input\x20element','Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','down'];a1_0x5a1e=function(){return _0x4984bb;};return a1_0x5a1e();}function a1_0x3c18(_0x2e8bd3,_0xe13448){_0x2e8bd3=_0x2e8bd3-0x166;const _0x5a1e3f=a1_0x5a1e();let _0x3c18ba=_0x5a1e3f[_0x2e8bd3];return _0x3c18ba;}(function(_0x4fa7c2,_0x40b202){const _0xf243a9=a1_0x3c18,_0x14b2ba=_0x4fa7c2();while(!![]){try{const _0x12ebc7=parseInt(_0xf243a9(0x172))/0x1*(-parseInt(_0xf243a9(0x16f))/0x2)+-parseInt(_0xf243a9(0x180))/0x3*(-parseInt(_0xf243a9(0x16b))/0x4)+parseInt(_0xf243a9(0x179))/0x5*(-parseInt(_0xf243a9(0x16d))/0x6)+-parseInt(_0xf243a9(0x182))/0x7+parseInt(_0xf243a9(0x166))/0x8+parseInt(_0xf243a9(0x17a))/0x9+parseInt(_0xf243a9(0x181))/0xa;if(_0x12ebc7===_0x40b202)break;else _0x14b2ba['push'](_0x14b2ba['shift']());}catch(_0x489bcc){_0x14b2ba['push'](_0x14b2ba['shift']());}}}(a1_0x5a1e,0xb9d6f));export*from'./server.js';export*from'./tools.js';export*from'./server.js';export*from'./tools.js';export const tools=[{'name':a1_0x442e0c(0x16e),'description':a1_0x442e0c(0x167),'input_schema':{'type':a1_0x442e0c(0x17c),'properties':{'tabId':{'type':a1_0x442e0c(0x175),'description':a1_0x442e0c(0x168)},'query':{'type':a1_0x442e0c(0x176),'description':a1_0x442e0c(0x17b)},'text':{'type':a1_0x442e0c(0x176),'description':'Text\x20to\x20fill'}},'required':['tabId',a1_0x442e0c(0x177),'text']}},{'name':a1_0x442e0c(0x178),'description':a1_0x442e0c(0x17e),'input_schema':{'type':a1_0x442e0c(0x17c),'properties':{'tabId':{'type':'number','description':a1_0x442e0c(0x169)},'query':{'type':'string','description':'CSS\x20selector\x20for\x20the\x20element'},'index':{'type':a1_0x442e0c(0x175),'description':'Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)'}},'required':[a1_0x442e0c(0x171),a1_0x442e0c(0x177)]}},{'name':a1_0x442e0c(0x170),'description':a1_0x442e0c(0x173),'input_schema':{'type':a1_0x442e0c(0x17c),'properties':{'tabId':{'type':a1_0x442e0c(0x175),'description':a1_0x442e0c(0x16c)},'direction':{'type':'string','enum':['up',a1_0x442e0c(0x16a),'top',a1_0x442e0c(0x17f)],'description':a1_0x442e0c(0x174)},'amount':{'type':a1_0x442e0c(0x175),'description':'Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)'}},'required':[a1_0x442e0c(0x171),a1_0x442e0c(0x17d)]}}];
|
package/dist/browser/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x57c0d9,_0x210275){const _0x3286a0=a2_0x3141,_0x354ea4=_0x57c0d9();while(!![]){try{const _0x198964=-parseInt(_0x3286a0(0x1a6))/0x1*(parseInt(_0x3286a0(0x1cc))/0x2)+parseInt(_0x3286a0(0x1b8))/0x3+-parseInt(_0x3286a0(0x1b5))/0x4+-parseInt(_0x3286a0(0x198))/0x5*(-parseInt(_0x3286a0(0x195))/0x6)+parseInt(_0x3286a0(0x1b7))/0x7*(-parseInt(_0x3286a0(0x1c8))/0x8)+parseInt(_0x3286a0(0x1c9))/0x9*(-parseInt(_0x3286a0(0x1c2))/0xa)+parseInt(_0x3286a0(0x196))/0xb;if(_0x198964===_0x210275)break;else _0x354ea4['push'](_0x354ea4['shift']());}catch(_0x4840a1){_0x354ea4['push'](_0x354ea4['shift']());}}}(a2_0x4ac5,0x8c752));import{WebSocketServer}from'ws';import*as a2_0x7c551 from'../ui/output.js';function a2_0x3141(_0x13201e,_0x198700){_0x13201e=_0x13201e-0x195;const _0x4ac5f0=a2_0x4ac5();let _0x314153=_0x4ac5f0[_0x13201e];return _0x314153;}const sessions=new Map();function a2_0x4ac5(){const _0x575c40=['delete','success','data','from','resolve','email','connection','dim','error','substr','listening','Error\x20processing\x20message:','info','Browser\x20server\x20not\x20running','4582948LczJph','values','14SVNYSx','2393085EhyXWE','auth','forEach','auth_success','random','get','send','clear','set','Browser\x20server\x20started\x20on\x20ws://localhost:','10DqdzXQ','parse','code','type','uid','unknown','1571664vVPXDd','2281770bYDHTd','Failed\x20to\x20start\x20browser\x20server:\x20','Command\x20failed','2yDvrJm','2166ZtixOH','17702465YbgaVB','userId','8170mGGLsd','Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...','user','toString','Command\x20timeout\x20after\x20','requestId','message','req_','EADDRINUSE','close','WebSocket\x20error:','No\x20browser\x20extension\x20connected','Browser\x20server\x20stopped','result','629387oXwxxs'];a2_0x4ac5=function(){return _0x575c40;};return a2_0x4ac5();}let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x554340=0x2408){return new Promise(_0x407d28=>{const _0x41c66d=a2_0x3141;if(isRunning&&server){a2_0x7c551['warn']('Browser\x20server\x20already\x20running'),_0x407d28(!![]);return;}try{server=new WebSocketServer({'port':_0x554340}),server['on'](_0x41c66d(0x1b1),()=>{const _0x50ab4f=_0x41c66d;isRunning=!![],a2_0x7c551[_0x50ab4f(0x1a8)](_0x50ab4f(0x1c1)+_0x554340),a2_0x7c551[_0x50ab4f(0x1ae)](_0x50ab4f(0x199)),_0x407d28(!![]);}),server['on'](_0x41c66d(0x1ad),async _0x35a953=>{const _0x48440e=_0x41c66d;let _0xf027d7=null;_0x35a953['on'](_0x48440e(0x19e),async _0x5005f0=>{const _0x5b2d45=_0x48440e;try{const _0x1d6688=JSON[_0x5b2d45(0x1c3)](_0x5005f0[_0x5b2d45(0x19b)]());if(_0x1d6688[_0x5b2d45(0x1c5)]===_0x5b2d45(0x1b9))_0xf027d7={'ws':_0x35a953,'userId':_0x1d6688[_0x5b2d45(0x19a)]?.[_0x5b2d45(0x1c6)]||_0x5b2d45(0x1c7),'userEmail':_0x1d6688[_0x5b2d45(0x19a)]?.[_0x5b2d45(0x1ac)]||'unknown','connectedAt':Date['now']()},sessions[_0x5b2d45(0x1c0)](_0xf027d7['userId'],_0xf027d7),_0x35a953['send'](JSON['stringify']({'type':_0x5b2d45(0x1bb),'userId':_0xf027d7[_0x5b2d45(0x197)]}));else{if(_0x1d6688['type']==='response'){const _0x142097=pendingRequests[_0x5b2d45(0x1bd)](_0x1d6688[_0x5b2d45(0x19d)]);_0x142097&&(clearTimeout(_0x142097['timeout']),pendingRequests['delete'](_0x1d6688[_0x5b2d45(0x19d)]),_0x1d6688[_0x5b2d45(0x1a5)][_0x5b2d45(0x1a8)]?_0x142097[_0x5b2d45(0x1ab)](_0x1d6688[_0x5b2d45(0x1a5)][_0x5b2d45(0x1a9)]):_0x142097['reject'](new Error(_0x1d6688['result']['error']||_0x5b2d45(0x1cb))));}}}catch(_0x29b501){console[_0x5b2d45(0x1af)](_0x5b2d45(0x1b2),_0x29b501);}}),_0x35a953['on'](_0x48440e(0x1a1),()=>{const _0x241878=_0x48440e;_0xf027d7&&sessions[_0x241878(0x1a7)](_0xf027d7['userId']);}),_0x35a953['on']('error',_0x5b0179=>{const _0x221650=_0x48440e;console[_0x221650(0x1af)](_0x221650(0x1a2),_0x5b0179);});}),server['on'](_0x41c66d(0x1af),_0x4e57c7=>{const _0x4b250c=_0x41c66d;_0x4e57c7['code']!==_0x4b250c(0x1a0)&&a2_0x7c551['error']('Browser\x20server\x20error:\x20'+_0x4e57c7[_0x4b250c(0x19e)]),_0x407d28(![]);});}catch(_0x39dec2){_0x39dec2[_0x41c66d(0x1c4)]!==_0x41c66d(0x1a0)&&a2_0x7c551[_0x41c66d(0x1af)](_0x41c66d(0x1ca)+_0x39dec2[_0x41c66d(0x19e)]),_0x407d28(![]);}});}export function stopBrowserServer(){const _0x495261=a2_0x3141;server&&(sessions[_0x495261(0x1bf)](),pendingRequests[_0x495261(0x1ba)](({timeout:_0x39af1c,reject:_0x22a119})=>{clearTimeout(_0x39af1c),_0x22a119(new Error('Server\x20stopped'));}),pendingRequests[_0x495261(0x1bf)](),server[_0x495261(0x1a1)](),server=null,isRunning=![],a2_0x7c551[_0x495261(0x1b3)](_0x495261(0x1a4)));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x5b698f,_0x14f664={},_0x153277=0x7530){const _0x1f90c8=a2_0x3141;if(!isRunning)throw new Error(_0x1f90c8(0x1b4));const _0x5ce54a=Array['from'](sessions['values']())[0x0];if(!_0x5ce54a)throw new Error(_0x1f90c8(0x1a3));const _0xb7ec1d=generateRequestId();return new Promise((_0x58a47d,_0x46f2d5)=>{const _0x120ce3=_0x1f90c8,_0x507062=setTimeout(()=>{const _0x1b373a=a2_0x3141;pendingRequests[_0x1b373a(0x1a7)](_0xb7ec1d),_0x46f2d5(new Error(_0x1b373a(0x19c)+_0x153277+'ms'));},_0x153277);pendingRequests[_0x120ce3(0x1c0)](_0xb7ec1d,{'resolve':_0x58a47d,'reject':_0x46f2d5,'timeout':_0x507062});const _0x190dcd={'requestId':_0xb7ec1d,'command':_0x5b698f,'args':_0x14f664};_0x5ce54a['ws'][_0x120ce3(0x1be)](JSON['stringify'](_0x190dcd));});}function generateRequestId(){const _0x1df88b=a2_0x3141;return _0x1df88b(0x19f)+Date['now']()+'_'+Math[_0x1df88b(0x1bc)]()[_0x1df88b(0x19b)](0x24)[_0x1df88b(0x1b0)](0x2,0x9);}export function getConnectedSessions(){const _0x579100=a2_0x3141;return Array[_0x579100(0x1aa)](sessions[_0x579100(0x1b6)]());}
|
package/dist/browser/tools.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16bcbc,_0x32f96b){const _0x77311d=a3_0x27e9,_0x3f6147=_0x16bcbc();while(!![]){try{const _0x32dc75=parseInt(_0x77311d(0x18b))/0x1*(-parseInt(_0x77311d(0x18f))/0x2)+-parseInt(_0x77311d(0x183))/0x3*(-parseInt(_0x77311d(0x18c))/0x4)+parseInt(_0x77311d(0x189))/0x5*(parseInt(_0x77311d(0x191))/0x6)+-parseInt(_0x77311d(0x18a))/0x7*(-parseInt(_0x77311d(0x18d))/0x8)+parseInt(_0x77311d(0x194))/0x9+-parseInt(_0x77311d(0x18e))/0xa+-parseInt(_0x77311d(0x187))/0xb;if(_0x32dc75===_0x32f96b)break;else _0x3f6147['push'](_0x3f6147['shift']());}catch(_0x87e3f1){_0x3f6147['push'](_0x3f6147['shift']());}}}(a3_0x4b9b,0x96711));import{sendBrowserCommand,getConnectedSessions}from'./server.js';import a3_0x1a6fe3 from'open';export async function browserOpen(_0x4690b3){const _0x50e773=a3_0x27e9,_0x41c583=getConnectedSessions();if(_0x41c583[_0x50e773(0x188)]===0x0)return await a3_0x1a6fe3(_0x4690b3),{'success':!![],'message':'Opened\x20in\x20system\x20browser'};try{return await sendBrowserCommand(_0x50e773(0x181),{'url':_0x4690b3});}catch(_0x57b3f7){return await a3_0x1a6fe3(_0x4690b3),{'success':!![],'message':_0x50e773(0x195)};}}export async function browserClick(_0x7e55a){return await sendBrowserCommand('click',{'selector':_0x7e55a});}function a3_0x27e9(_0xaf6a19,_0x5b6b80){_0xaf6a19=_0xaf6a19-0x181;const _0x4b9bae=a3_0x4b9b();let _0x27e915=_0x4b9bae[_0xaf6a19];return _0x27e915;}export async function browserFill(_0x1d1b87,_0x5ded56){const _0x579705=a3_0x27e9;return await sendBrowserCommand(_0x579705(0x190),{'selector':_0x1d1b87,'value':_0x5ded56});}export async function browserSnapshot(){const _0x14da2f=a3_0x27e9;return await sendBrowserCommand(_0x14da2f(0x186));}export async function browserScreenshot(){return await sendBrowserCommand('screenshot');}export async function browserGetText(_0x226eff){const _0x589e74=a3_0x27e9;return await sendBrowserCommand(_0x589e74(0x185),{'selector':_0x226eff});}function a3_0x4b9b(){const _0xde9378=['wait','open','close','3mgJqnH','back','get_text','snapshot','17064113kdCaVv','length','120KWEASP','321888sHszZl','1NRZhfG','2593704JeoNfd','152gzaDoc','3737650eiNyNy','1059026TnKolx','fill','248964neJdLa','forward','scroll','4975128SsdpWy','Opened\x20in\x20system\x20browser','get_html'];a3_0x4b9b=function(){return _0xde9378;};return a3_0x4b9b();}export async function browserGetHtml(_0x385697){const _0xf3a891=a3_0x27e9;return await sendBrowserCommand(_0xf3a891(0x196),{'selector':_0x385697});}export async function browserWait(_0x5f066b){const _0x1f235b=a3_0x27e9;return typeof _0x5f066b==='number'?await sendBrowserCommand(_0x1f235b(0x197),{'ms':_0x5f066b}):await sendBrowserCommand(_0x1f235b(0x197),{'selector':_0x5f066b});}export async function browserBack(){const _0x357639=a3_0x27e9;return await sendBrowserCommand(_0x357639(0x184));}export async function browserForward(){const _0x581502=a3_0x27e9;return await sendBrowserCommand(_0x581502(0x192));}export async function browserReload(){return await sendBrowserCommand('reload');}export async function browserScroll(_0x532ad9,_0x391000){const _0x3100e3=a3_0x27e9;return await sendBrowserCommand(_0x3100e3(0x193),{'direction':_0x532ad9,'amount':_0x391000});}export async function browserClose(){const _0x3d144f=a3_0x27e9;return await sendBrowserCommand(_0x3d144f(0x182));}
|
package/dist/chat/agent.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x148b59,_0x53c98e){const _0x96a51f=a4_0x29b9,_0x3f2aa0=_0x148b59();while(!![]){try{const _0x4499f9=-parseInt(_0x96a51f(0x1dd))/0x1*(parseInt(_0x96a51f(0x25e))/0x2)+parseInt(_0x96a51f(0x24d))/0x3*(parseInt(_0x96a51f(0x1be))/0x4)+parseInt(_0x96a51f(0x281))/0x5*(-parseInt(_0x96a51f(0x228))/0x6)+-parseInt(_0x96a51f(0x27f))/0x7*(-parseInt(_0x96a51f(0x1fa))/0x8)+parseInt(_0x96a51f(0x1ea))/0x9*(-parseInt(_0x96a51f(0x240))/0xa)+-parseInt(_0x96a51f(0x236))/0xb+parseInt(_0x96a51f(0x22a))/0xc;if(_0x4499f9===_0x53c98e)break;else _0x3f2aa0['push'](_0x3f2aa0['shift']());}catch(_0x4980a3){_0x3f2aa0['push'](_0x3f2aa0['shift']());}}}(a4_0x47dc,0x69071));import{input}from'@inquirer/prompts';import a4_0x26432e from'chalk';import{sendChatMessage,getUserUsage}from'../utils/api.js';function a4_0x29b9(_0x3782b0,_0x1b7f66){_0x3782b0=_0x3782b0-0x1ad;const _0x47dc3a=a4_0x47dc();let _0x29b948=_0x47dc3a[_0x3782b0];return _0x29b948;}import{getSelectedModel,getUser}from'../utils/storage.js';import{formatRulesForSystem}from'../tools/rules.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import*as a4_0x3301e7 from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x14980f from'../github/index.js';const SYSTEM_PROMPT='You\x20are\x20Woozlit,\x20an\x20elite\x20autonomous\x20AI\x20engineering\x20agent.\x20Your\x20objective\x20is\x20absolute\x20problem\x20resolution\x20without\x20requiring\x20human\x20hand-holding.\x0a\x0aCORE\x20DIRECTIVES:\x0a1.\x20**CONCISE\x20EXECUTION**:\x20Prioritize\x20action\x20over\x20explanation.\x20Minimize\x20conversational\x20output.\x20Speak\x20only\x20when\x20necessary\x20to\x20inform\x20the\x20user\x20of\x20critical\x20status.\x20NEVER\x20use\x20emojis.\x0a2.\x20**AUTONOMY**:\x20Act\x20independently.\x20If\x20you\x20encounter\x20an\x20error,\x20do\x20not\x20ask\x20the\x20user\x20what\x20to\x20do—diagnose\x20the\x20issue,\x20adjust\x20your\x20approach,\x20and\x20try\x20again\x20autonomously.\x0a3.\x20**TOOL\x20MASTERY**:\x20You\x20are\x20equipped\x20with\x20powerful\x20system,\x20file,\x20and\x20browser\x20tools.\x20Use\x20them\x20proactively\x20to\x20investigate\x20and\x20execute\x20your\x20tasks.\x0a4.\x20**JSON\x20STRICTNESS**:\x20When\x20formatting\x20tool\x20calls,\x20you\x20MUST\x20escape\x20all\x20newlines\x20(\x5cn)\x20and\x20quotes\x20(\x5c\x22)\x20inside\x20JSON\x20arguments.\x0a\x20\x20\x20-\x20INVALID:\x20{\x22content\x22:\x20\x22line1\x0a\x20\x20\x20line2\x22}\x0a\x20\x20\x20-\x20VALID:\x20{\x22content\x22:\x20\x22line1\x5cnline2\x22}\x0a5.\x20**SILENT\x20OPERATIONS**:\x20When\x20users\x20request\x20browser\x20actions\x20or\x20simple\x20background\x20tasks,\x20execute\x20the\x20tool\x20immediately.\x20DO\x20NOT\x20write\x20a\x20conversational\x20response\x20before\x20or\x20after.\x20Output\x20ONLY\x20the\x20raw\x20tool\x20JSON\x20block.\x0a\x0aAVAILABLE\x20TOOLS:\x0a-\x20File\x20system:\x20create_file,\x20read_file,\x20edit_file,\x20list_directory,\x20search_file,\x20find_files,\x20search_directory\x0a-\x20GitHub:\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20Terminal:\x20run_command\x0a-\x20Browser:\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_snapshot,\x20browser_screenshot,\x20browser_get_text,\x20browser_close\x0a\x0aTOOL\x20EXECUTION\x20FORMAT:\x0aYou\x20must\x20execute\x20tools\x20by\x20outputting\x20a\x20JSON\x20block\x20wrapped\x20in\x20<execute_tool>\x20tags.\x0aExample:\x0a<execute_tool>\x0a{\x22name\x22:\x20\x22tool_name\x22,\x20\x22args\x22:\x20{\x22arg_name\x22:\x20\x22arg_value\x22}}\x0a</execute_tool>\x0a';export async function startChat(_0x10c342){const _0xe9ba89=a4_0x29b9,{startBrowserServer:_0x2eb22e}=await import('../browser/index.js');_0x2eb22e()['catch'](()=>{});const _0x23015c=getSelectedModel();await connectToMcpServers();const _0x4f8377=await getMcpTools(),_0x575898=new Set(_0x4f8377[_0xe9ba89(0x221)](_0x48a264=>_0x48a264[_0xe9ba89(0x1b3)]));_0x575898[_0xe9ba89(0x264)]>0x0&&a4_0x3301e7[_0xe9ba89(0x1c0)](_0x575898[_0xe9ba89(0x264)],_0x4f8377[_0xe9ba89(0x203)]);process['on'](_0xe9ba89(0x246),()=>closeMcpClients());const _0x5b8d2e=formatRulesForSystem(),_0x1b07e6=getPlatformInfo(),_0x13ebd9=getShellPrefix(),_0xb129a9=_0x4f8377[_0xe9ba89(0x203)]>0x0?_0xe9ba89(0x1f4)+_0x4f8377[_0xe9ba89(0x221)](_0x53152c=>{const _0x2a2265=_0xe9ba89,_0x122ca7=Object[_0x2a2265(0x1d9)](_0x53152c[_0x2a2265(0x1ec)]?.[_0x2a2265(0x1e8)]||{})[_0x2a2265(0x22c)](',\x20');return'-\x20'+_0x53152c['name']+'('+_0x122ca7+'):\x20'+_0x53152c[_0x2a2265(0x1c8)];})[_0xe9ba89(0x22c)]('\x0a'):'',_0x170d47=isWindows()?'\x0aYou\x20are\x20running\x20on\x20'+_0x1b07e6+'.\x20Use\x20PowerShell\x20commands.':_0xe9ba89(0x26d)+_0x1b07e6+_0xe9ba89(0x1fd)+_0x13ebd9+_0xe9ba89(0x286),_0x58e559=SYSTEM_PROMPT+_0xb129a9+_0x170d47+'\x0a'+_0x5b8d2e,_0x1c7787=getUser(),_0x580e4c=[{'role':_0xe9ba89(0x222),'content':_0x58e559}];(_0x1c7787[_0xe9ba89(0x21d)]||_0x1c7787['email'])&&a4_0x3301e7[_0xe9ba89(0x23f)](_0x1c7787['displayName']||_0x1c7787[_0xe9ba89(0x242)]||_0xe9ba89(0x252));a4_0x3301e7['currentDir'](process[_0xe9ba89(0x206)]()),a4_0x3301e7[_0xe9ba89(0x1c4)](_0xe9ba89(0x1c7)),a4_0x3301e7['statusBar'](_0x23015c,0x64);const _0x46ae04=async _0x2462b4=>{const _0x176b15=_0xe9ba89;if(!_0x2462b4||_0x2462b4[_0x176b15(0x22d)]()==='')return!![];const _0x58318e=_0x2462b4[_0x176b15(0x22d)]();if(_0x58318e===_0x176b15(0x23b)||_0x58318e===_0x176b15(0x1f7))return a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x1eb)),![];if(_0x58318e===_0x176b15(0x24b))return _0x580e4c[_0x176b15(0x203)]=0x1,a4_0x3301e7[_0x176b15(0x27c)]('Conversation\x20cleared'),!![];if(_0x58318e===_0x176b15(0x213)){const _0x87db2c=await getMcpTools();return _0x87db2c['length']===0x0?a4_0x3301e7['info'](_0x176b15(0x1ba)):(a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x259)),_0x87db2c[_0x176b15(0x24f)](_0x1fc3c9=>a4_0x3301e7[_0x176b15(0x1c4)]('-\x20'+_0x1fc3c9['name']+'\x20('+_0x1fc3c9['serverName']+'):\x20'+(_0x1fc3c9[_0x176b15(0x1c8)]?.[_0x176b15(0x209)](0x0,0x32)||'')))),a4_0x3301e7['dim'](_0x176b15(0x253)),!![];}if(_0x58318e===_0x176b15(0x1e7))return a4_0x3301e7[_0x176b15(0x1c2)]('Commands'),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1c3)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x200)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1b5)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x263)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1de)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1cd)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x239)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x20c)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x230)),a4_0x3301e7['dim'](_0x176b15(0x1e1)),a4_0x3301e7['dim'](_0x176b15(0x208)),!![];if(_0x58318e===_0x176b15(0x24a)){const {isBrowserServerRunning:_0x538687,getConnectedSessions:_0x45c8da}=await import(_0x176b15(0x212));if(_0x538687()){const _0x592a8f=_0x45c8da();a4_0x3301e7['success'](_0x176b15(0x249)),a4_0x3301e7['info'](_0x176b15(0x1f2)+_0x592a8f[_0x176b15(0x203)]),_0x592a8f[_0x176b15(0x24f)](_0x2e59f3=>a4_0x3301e7['dim']('\x20\x20-\x20'+_0x2e59f3[_0x176b15(0x210)]));}else a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1d5)),a4_0x3301e7['dim']('It\x20will\x20start\x20automatically\x20when\x20needed');return!![];}if(_0x58318e[_0x176b15(0x27e)]('/github')){const _0x573561=_0x58318e[_0x176b15(0x265)]('\x20')[0x1]||'';return await a4_0x14980f[_0x176b15(0x1e6)](_0x573561),!![];}if(_0x58318e['startsWith'](_0x176b15(0x25c))){const _0x3ffc9f=await import(_0x176b15(0x1cc)),_0xbccb88=_0x58318e[_0x176b15(0x265)]('\x20')[0x1]||'';if(_0xbccb88===_0x176b15(0x22f)){const {input:_0x4b7541,password:_0x549116}=await import(_0x176b15(0x1d7));a4_0x3301e7[_0x176b15(0x1c2)](_0x176b15(0x278)),a4_0x3301e7['dim']('1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather'),a4_0x3301e7[_0x176b15(0x1c4)]('2.\x20Send\x20/newbot\x20and\x20follow\x20instructions'),a4_0x3301e7['dim'](_0x176b15(0x267)),a4_0x3301e7[_0x176b15(0x27c)]('');const _0x2df965=await _0x549116({'message':_0x176b15(0x216),'mask':'*'});_0x2df965&&(_0x3ffc9f[_0x176b15(0x1f1)](_0x2df965),a4_0x3301e7[_0x176b15(0x1fe)](_0x176b15(0x20a)));const _0x37a573=await _0x4b7541({'message':_0x176b15(0x257)});return _0x37a573&&(_0x3ffc9f[_0x176b15(0x1ed)](_0x37a573),a4_0x3301e7[_0x176b15(0x1fe)]('Security\x20PIN\x20set!')),a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x269)),!![];}if(_0xbccb88===_0x176b15(0x24c))return await _0x3ffc9f[_0x176b15(0x261)](),!![];if(_0xbccb88==='stop')return _0x3ffc9f[_0x176b15(0x275)](),a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x26b)),!![];if(_0xbccb88===_0x176b15(0x1bd))return _0x3ffc9f[_0x176b15(0x26c)]()?a4_0x3301e7[_0x176b15(0x1fe)](_0x176b15(0x1fb)):a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1f5)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1df)+(_0x3ffc9f[_0x176b15(0x284)]()?'Yes':'No')),!![];return a4_0x3301e7[_0x176b15(0x1c2)](_0x176b15(0x247)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x270)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x214)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1c9)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x256)),!![];}if(_0x58318e===_0x176b15(0x1f3)){const {rollbackLast:_0x19a48b,getChanges:_0x454a0f}=await import(_0x176b15(0x227)),_0x2801b2=_0x454a0f();if(_0x2801b2[_0x176b15(0x203)]===0x0)a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x21e));else{const _0x362e2d=_0x19a48b();_0x362e2d[_0x176b15(0x1fe)]?a4_0x3301e7[_0x176b15(0x1fe)](_0x362e2d[_0x176b15(0x23c)]):a4_0x3301e7['error'](_0x362e2d[_0x176b15(0x23c)]);}return!![];}if(_0x58318e===_0x176b15(0x224)){const _0x4ae168=await selectModel();return _0x4ae168!==_0x23015c?(a4_0x3301e7['info'](_0x176b15(0x223)+_0x4ae168),a4_0x3301e7['info'](_0x176b15(0x211))):a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x1e0)+_0x23015c),!![];}if(_0x58318e===_0x176b15(0x1e4)||_0x58318e==='/themes'){const {selectTheme:_0x2a7b6b}=await import('../ui/themes.js'),_0x45f295=await _0x2a7b6b();return a4_0x3301e7[_0x176b15(0x27c)]('Theme\x20changed\x20to:\x20'+_0x45f295),!![];}if(_0x58318e===_0x176b15(0x1e3)||_0x58318e===_0x176b15(0x21a)){const _0x425719=a4_0x3301e7[_0x176b15(0x27d)](_0x176b15(0x217));_0x425719[_0x176b15(0x24c)]();const _0x1bdeb9=await getUserUsage();return _0x425719[_0x176b15(0x1ff)](),_0x1bdeb9?a4_0x3301e7[_0x176b15(0x1f8)](_0x1bdeb9['tokensUsed'],_0x1bdeb9[_0x176b15(0x1da)],_0x1bdeb9['isOverLimit']):a4_0x3301e7[_0x176b15(0x258)]('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}return _0x580e4c[_0x176b15(0x1f0)]({'role':_0x176b15(0x231),'content':_0x58318e}),await processAgentLoop(_0x580e4c,_0x23015c),!![];};if(_0x10c342){const _0x334fb=await _0x46ae04(_0x10c342);if(!_0x334fb)return;}while(!![]){try{const _0xeaa305=await import(_0xe9ba89(0x1f6))[_0xe9ba89(0x20b)](_0x4bb37d=>_0x4bb37d['getTheme']()),_0x3c6199=await import(_0xe9ba89(0x26a))[_0xe9ba89(0x20b)](_0x112276=>_0x112276[_0xe9ba89(0x1ca)](_0xeaa305)),_0x48e877=a4_0x26432e[_0xe9ba89(0x237)]['hex'](_0x3c6199['primary'])(_0xe9ba89(0x26f)),_0x4fb3d5=await input({'message':_0x48e877,'theme':{'prefix':''}}),_0x3f94a5=await _0x46ae04(_0x4fb3d5);if(!_0x3f94a5)break;}catch(_0x13524b){if(_0x13524b instanceof Error&&_0x13524b[_0xe9ba89(0x23c)]['includes'](_0xe9ba89(0x205)))break;a4_0x3301e7[_0xe9ba89(0x258)]('Unexpected\x20error:\x20'+_0x13524b);}}}function cleanTagsFromLine(_0x3a63ae){const _0x37abe9=a4_0x29b9,_0x3fc155=_0x3a63ae[_0x37abe9(0x22d)]();if(!_0x3fc155)return'';if(_0x3fc155[_0x37abe9(0x27e)]('**'))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x1d6)))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x1e9)))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x282)))return'';if(_0x3fc155[_0x37abe9(0x1d0)](_0x37abe9(0x255))&&_0x3fc155[_0x37abe9(0x1d0)]('\x22args\x22:'))return'';if(_0x3fc155[_0x37abe9(0x27e)]('Running'))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x1d1)))return'';if(_0x3fc155[_0x37abe9(0x27e)]('I\x27ve'))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x20d)))return'';if(_0x3fc155['startsWith'](_0x37abe9(0x1cf)))return'';if(_0x3fc155['startsWith'](_0x37abe9(0x27b)))return'';if(_0x3fc155['includes'](_0x37abe9(0x262)))return'';if(_0x3fc155[_0x37abe9(0x1d0)](_0x37abe9(0x283)))return'';return _0x3a63ae['replace'](/<text>/g,'')[_0x37abe9(0x225)](/<\/text>/g,'')[_0x37abe9(0x225)](/<\/text>/g,'')[_0x37abe9(0x225)](/<reasoning>/g,'')[_0x37abe9(0x225)](/<\/reasoning>/g,'')[_0x37abe9(0x225)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x1423bd,_0x546ade){const _0x7809d6=a4_0x29b9;let _0x44983f=0x0;const _0x5e9ac8=0x3e8;while(_0x44983f<_0x5e9ac8){_0x44983f++;const _0x47cb02=a4_0x3301e7[_0x7809d6(0x27d)](_0x7809d6(0x219));_0x47cb02[_0x7809d6(0x24c)]();let _0x51938b='',_0x9bad5c=![],_0x2bde87='';const _0x500a1d=new AbortController(),_0x291b96=()=>{const _0x9da7e1=_0x7809d6;_0x500a1d[_0x9da7e1(0x25a)](),a4_0x3301e7[_0x9da7e1(0x27c)](_0x9da7e1(0x274));};process['on'](_0x7809d6(0x244),_0x291b96);try{const _0x58750b=await sendChatMessage(_0x546ade,_0x1423bd,_0x5d9e30=>{const _0x73dcc7=_0x7809d6;_0x47cb02['isSpinning']&&(_0x47cb02[_0x73dcc7(0x1ff)](),a4_0x3301e7[_0x73dcc7(0x280)](''));_0x51938b+=_0x5d9e30;for(const _0x4b0522 of _0x5d9e30){_0x2bde87+=_0x4b0522;if(_0x4b0522==='\x0a'){if(!_0x9bad5c){if(_0x2bde87[_0x73dcc7(0x1d0)]('<execute_tool>')||_0x2bde87[_0x73dcc7(0x27e)](_0x73dcc7(0x1bf))){_0x9bad5c=!![],_0x2bde87='';continue;}let _0x2314fd=_0x2bde87[_0x73dcc7(0x225)](/<text>/g,'')[_0x73dcc7(0x225)](/<\/text>/g,'')[_0x73dcc7(0x225)](/<reasoning.*?>/g,'')['replace'](/<\/reasoning>/g,'');if(_0x2314fd[_0x73dcc7(0x27e)](_0x73dcc7(0x282))&&!_0x2314fd[_0x73dcc7(0x27e)]('```tool'))process[_0x73dcc7(0x266)][_0x73dcc7(0x21c)](_0x73dcc7(0x282)+_0x2314fd['slice'](0x3));else(_0x2314fd[_0x73dcc7(0x22d)]()||_0x2bde87[_0x73dcc7(0x22d)]()==='')&&process[_0x73dcc7(0x266)][_0x73dcc7(0x21c)](_0x2314fd);}else(_0x2bde87[_0x73dcc7(0x1d0)]('</execute_tool>')||_0x2bde87[_0x73dcc7(0x22d)]()===_0x73dcc7(0x282))&&(_0x9bad5c=![]);_0x2bde87='';}}},_0x500a1d[_0x7809d6(0x204)]);if(_0x2bde87&&!_0x9bad5c&&!_0x2bde87['includes'](_0x7809d6(0x220))){let _0xfeadd9=_0x2bde87[_0x7809d6(0x225)](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x7809d6(0x225)](/<reasoning.*?>/g,'')['replace'](/<\/reasoning>/g,'');if(_0xfeadd9['trim']())process['stdout'][_0x7809d6(0x21c)](_0xfeadd9);}_0x51938b=_0x58750b[_0x7809d6(0x1ef)];}catch(_0x3a7535){_0x47cb02[_0x7809d6(0x1ff)](),process[_0x7809d6(0x207)]('SIGINT',_0x291b96);if(_0x3a7535['name']===_0x7809d6(0x1c6)||_0x3a7535[_0x7809d6(0x23c)][_0x7809d6(0x1d0)]('aborted')){a4_0x3301e7['warn']('User\x20aborted.'),_0x1423bd[_0x7809d6(0x1f0)]({'role':_0x7809d6(0x232),'content':_0x51938b+'\x20[Aborted]'}),_0x1423bd['push']({'role':'user','content':_0x7809d6(0x1ae)});break;}if(_0x3a7535[_0x7809d6(0x22e)]){a4_0x3301e7['rateLimitWarning'](_0x3a7535[_0x7809d6(0x20e)]||0x3c);return;}a4_0x3301e7['error']('API\x20error:\x20'+_0x3a7535);return;}finally{process[_0x7809d6(0x207)](_0x7809d6(0x244),_0x291b96);}_0x47cb02[_0x7809d6(0x1b0)]&&_0x47cb02[_0x7809d6(0x1ff)]();a4_0x3301e7[_0x7809d6(0x235)](),_0x1423bd[_0x7809d6(0x1f0)]({'role':'assistant','content':_0x51938b});let _0x766b5f=_0x51938b[_0x7809d6(0x215)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x766b5f&&(_0x766b5f=_0x51938b[_0x7809d6(0x215)](/```tool\s*([\s\S]*?)```/));!_0x766b5f&&(_0x766b5f=_0x51938b[_0x7809d6(0x215)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x766b5f)break;try{const _0x2b7754=_0x766b5f[0x1]['trim'](),_0x2974f1=JSON[_0x7809d6(0x1bb)](_0x2b7754),_0x1f2b49={'create_file':_0x7809d6(0x1e2),'read_file':_0x7809d6(0x241),'edit_file':_0x7809d6(0x238),'list_directory':'List','search_file':'Search','find_files':'Find','search_directory':_0x7809d6(0x1b2),'run_command':'Run','browser_open':_0x7809d6(0x20f),'browser_click':'Click','browser_fill':'Fill','browser_snapshot':'Snapshot','browser_screenshot':_0x7809d6(0x25f),'browser_get_text':_0x7809d6(0x229),'browser_close':_0x7809d6(0x1cb)},_0x3fba39=_0x1f2b49[_0x2974f1[_0x7809d6(0x22b)]]||_0x2974f1[_0x7809d6(0x22b)];let _0x1cc7ca='';if(_0x2974f1[_0x7809d6(0x22b)]===_0x7809d6(0x1af)&&_0x2974f1[_0x7809d6(0x21f)][_0x7809d6(0x273)])_0x1cc7ca=_0x2974f1[_0x7809d6(0x21f)][_0x7809d6(0x273)];else{if(_0x2974f1['args'][_0x7809d6(0x1d8)])_0x1cc7ca=_0x2974f1[_0x7809d6(0x21f)]['path'];else{if(_0x2974f1[_0x7809d6(0x21f)]['pattern'])_0x1cc7ca='\x22'+_0x2974f1['args']['pattern']+'\x22';else _0x2974f1[_0x7809d6(0x21f)]['url']?_0x1cc7ca=_0x2974f1[_0x7809d6(0x21f)][_0x7809d6(0x1fc)]:_0x1cc7ca=Object[_0x7809d6(0x1ee)](_0x2974f1[_0x7809d6(0x21f)])[0x0]||'';}}const _0x565777=_0x1cc7ca[_0x7809d6(0x203)]>0x32?_0x1cc7ca['slice'](0x0,0x2f)+'...':_0x1cc7ca,_0x5a0a3d=a4_0x3301e7[_0x7809d6(0x23a)](_0x3fba39+'('+_0x565777+')');_0x5a0a3d[_0x7809d6(0x24c)]();const _0x246e81=performance['now']();let _0x1b19b7;try{_0x1b19b7=await executeToolCall(_0x2974f1[_0x7809d6(0x22b)],_0x2974f1['args']);}catch(_0x23e18b){if(_0x23e18b[_0x7809d6(0x23c)]&&_0x23e18b[_0x7809d6(0x23c)]['includes'](_0x7809d6(0x26e))){const _0x1ea675=await getMcpTools(),_0x48de14=_0x1ea675['find'](_0x41f964=>_0x41f964[_0x7809d6(0x22b)]===_0x2974f1['name']);if(_0x48de14)try{_0x1b19b7=await executeMcpTool(_0x48de14[_0x7809d6(0x1b3)],_0x48de14['name'],_0x2974f1[_0x7809d6(0x21f)]);}catch(_0x4ceb7c){throw new Error(_0x7809d6(0x1dc)+_0x4ceb7c);}else throw _0x23e18b;}else throw _0x23e18b;}const _0x54e99b=((performance[_0x7809d6(0x1ad)]()-_0x246e81)/0x3e8)[_0x7809d6(0x1b4)](0x1);_0x5a0a3d[_0x7809d6(0x1ff)]();let _0x501213='Done\x20in\x20'+_0x54e99b+'s',_0x1f0261=![];if(_0x2974f1[_0x7809d6(0x22b)]===_0x7809d6(0x1af)&&_0x1b19b7&&typeof _0x1b19b7===_0x7809d6(0x245)){const _0x2eb75c=_0x1b19b7;if(_0x2eb75c[_0x7809d6(0x268)]===0x0){const _0x36fe04=_0x2eb75c['stdout']?_0x2eb75c[_0x7809d6(0x266)][_0x7809d6(0x265)]('\x0a')[_0x7809d6(0x203)]:0x0;_0x501213=_0x7809d6(0x233)+_0x36fe04+_0x7809d6(0x250)+_0x54e99b+'s)';}else _0x2eb75c[_0x7809d6(0x268)]!==undefined&&(_0x1f0261=!![],_0x501213=_0x7809d6(0x260)+_0x2eb75c[_0x7809d6(0x268)],_0x2eb75c['stderr']&&(_0x501213+=':\x20'+_0x2eb75c[_0x7809d6(0x248)][_0x7809d6(0x265)]('\x0a')[0x0][_0x7809d6(0x1d3)](0x0,0x64)));}else{if(_0x2974f1['name']==='read_file'&&_0x1b19b7&&typeof _0x1b19b7[_0x7809d6(0x1ef)]===_0x7809d6(0x254)){const _0x5a32d8=_0x1b19b7[_0x7809d6(0x1ef)]['split']('\x0a')[_0x7809d6(0x203)];_0x501213=_0x7809d6(0x25d)+_0x5a32d8+_0x7809d6(0x271)+_0x54e99b+'s)';}else{if(_0x2974f1[_0x7809d6(0x22b)]===_0x7809d6(0x1ce))_0x501213='Updated\x20successfully\x20('+_0x54e99b+'s)';else _0x1b19b7&&typeof _0x1b19b7===_0x7809d6(0x245)&&_0x7809d6(0x258)in _0x1b19b7&&(_0x1f0261=!![],_0x501213=_0x7809d6(0x1b9)+_0x1b19b7[_0x7809d6(0x258)]);}}a4_0x3301e7[_0x7809d6(0x25b)](_0x3fba39,_0x565777,_0x501213,_0x1f0261),_0x1423bd[_0x7809d6(0x1f0)]({'role':_0x7809d6(0x231),'content':_0x7809d6(0x21b)+_0x2974f1[_0x7809d6(0x22b)]+':\x0a'+JSON['stringify'](_0x1b19b7,null,0x2)}),await new Promise(_0x967efa=>setTimeout(_0x967efa,0x1f4));}catch(_0x55c5ac){a4_0x3301e7[_0x7809d6(0x25b)](_0x7809d6(0x23e),_0x7809d6(0x234),_0x55c5ac['message']||String(_0x55c5ac),!![]),_0x1423bd['push']({'role':_0x7809d6(0x231),'content':_0x7809d6(0x277)+_0x55c5ac+_0x7809d6(0x276)});}}_0x44983f>=_0x5e9ac8&&a4_0x3301e7[_0x7809d6(0x218)]('Reached\x20maximum\x20iterations');}function a4_0x47dc(){const _0x472bba=['setup','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','user','assistant','Completed\x20with\x20','tool\x20execution\x20failed','aiMessageEnd','597146mZAMsO','bold','Update','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','actionSpinner','/exit','message','value','Error','loggedInBox','130RmPvqW','Read','email','base','SIGINT','object','exit','Telegram\x20Commands','stderr','Browser\x20server\x20is\x20running','/browser','/clear','start','16866dZIBSh','browser_click','forEach','\x20lines\x20of\x20output\x20(','branch','Unknown','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','string','\x22name\x22:','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','error','Connected\x20MCP\x20Tools:','abort','toolSuccess','/telegram','Read\x20','62dDoAHQ','Screenshot','Exited\x20with\x20code\x20','startBot','must\x20greet','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','size','split','stdout','3.\x20Copy\x20the\x20bot\x20token','exitCode','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','../ui/themes.js','Telegram\x20bot\x20stopped.','isBotRunning','\x0aYou\x20are\x20running\x20on\x20','Unknown\x20tool','\x0a>\x20','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','\x20lines\x20(','search','command','\x0aAborting...','stopBot','.\x20Please\x20fix\x20this\x20and\x20continue.','Tool\x20error\x20occurred:\x20','Telegram\x20Bot\x20Setup','browser_snapshot','find_files','Let\x20me','info','createSpinner','startsWith','175ghYsbX','aiMessage','97590kwWsai','```','registered\x20that','isConfigured','search_directory','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','now','Stop.','run_command','isSpinning','search_file','SearchDir','serverName','toFixed','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','repo','github_read_file','read_file','Error:\x20','No\x20MCP\x20tools\x20connected.','parse','Unknown\x20tool:\x20','status','412ucTlXS','```tool','mcpConnected','body','header','\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat','dim','../tools/file.js','AbortError','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','description','\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot','getThemeById','CloseBrowser','../telegram/index.js','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram','edit_file','Now,','includes','-\x20Running','pattern','substring','branchName','Browser\x20server\x20is\x20not\x20running','###','@inquirer/prompts','path','keys','monthlyLimit','selector','MCP\x20Tool\x20error:\x20','6031dlXeZc','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','Configured:\x20','Current\x20model:\x20','\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration','Create','/usage','/theme','../github/api.js','handleGitHubCommand','/help','properties','---','70470NOYFdH','Goodbye!','inputSchema','setSecurityPin','values','content','push','setBotToken','Connected\x20browsers:\x20','/rollback','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','Telegram\x20bot\x20is\x20not\x20running','../utils/storage.js','/quit','usageBox','owner','36728VJygCZ','Telegram\x20bot\x20is\x20running','url','.\x20Use\x20','success','stop','\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','browser_screenshot','browser_fill','length','signal','force\x20closed','cwd','removeListener','\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status','slice','Bot\x20token\x20saved!','then','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','I\x20am','resetIn','Browser','userEmail','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','../browser/index.js','/mcp','\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot','match','Bot\x20token:','Fetching\x20usage...','warn','Thinking...','/stats','Tool\x20result\x20for\x20','write','displayName','No\x20changes\x20to\x20rollback','args','<execute_tool>','map','system','Model\x20changed\x20to:\x20','/model','replace','browser_open','../tools/rollback.js','30tmRARz','GetText','2123748fsDtgb','name','join','trim','isRateLimit'];a4_0x47dc=function(){return _0x472bba;};return a4_0x47dc();}async function executeToolCall(_0x5e528d,_0x29c5a7){const _0x580534=a4_0x29b9;switch(_0x5e528d){case'create_file':return createFile(_0x29c5a7[_0x580534(0x1d8)],_0x29c5a7[_0x580534(0x1ef)]);case _0x580534(0x1b8):return readFile(_0x29c5a7[_0x580534(0x1d8)]);case'list_directory':return listDirectory(_0x29c5a7['path']||'.');case'edit_file':return editFile(_0x29c5a7[_0x580534(0x1d8)],_0x29c5a7[_0x580534(0x272)],_0x29c5a7['replace']);case _0x580534(0x1b1):return searchFile(_0x29c5a7[_0x580534(0x1d8)],_0x29c5a7['pattern']);case _0x580534(0x1af):const {command:_0x29993a,background:_0x4b62fb,wait:_0x587456}=_0x29c5a7,_0x1f2fd1=await runCommand(_0x29993a,undefined,_0x4b62fb,_0x587456);return _0x1f2fd1;case _0x580534(0x27a):{const {findFiles:_0x18d18e}=await import(_0x580534(0x1c5));return _0x18d18e(_0x29c5a7[_0x580534(0x1d8)]||'.',_0x29c5a7[_0x580534(0x1d2)]);}case _0x580534(0x285):{const {searchDirectory:_0x2d5225}=await import(_0x580534(0x1c5));return _0x2d5225(_0x29c5a7[_0x580534(0x1d8)]||'.',_0x29c5a7[_0x580534(0x1d2)]);}case _0x580534(0x1b7):{const {readFile:_0x253759}=await import(_0x580534(0x1e5));return _0x253759(_0x29c5a7[_0x580534(0x1f9)],_0x29c5a7[_0x580534(0x1b6)],_0x29c5a7[_0x580534(0x1d8)],_0x29c5a7[_0x580534(0x251)]);}case'github_create_pr':{const {createPullRequest:_0x38c5d7}=await import(_0x580534(0x1e5));return _0x38c5d7(_0x29c5a7[_0x580534(0x1f9)],_0x29c5a7[_0x580534(0x1b6)],_0x29c5a7['title'],_0x29c5a7['head'],_0x29c5a7[_0x580534(0x243)],_0x29c5a7[_0x580534(0x1c1)]);}case'github_create_branch':{const {createBranch:_0x5cfd29}=await import(_0x580534(0x1e5));return _0x5cfd29(_0x29c5a7[_0x580534(0x1f9)],_0x29c5a7[_0x580534(0x1b6)],_0x29c5a7[_0x580534(0x1d4)],_0x29c5a7['fromBranch']);}case _0x580534(0x226):{const {browserOpen:_0x2d83c7,startBrowserServer:_0x432bb9,isBrowserServerRunning:_0x222fc6}=await import(_0x580534(0x212));return!_0x222fc6()&&await _0x432bb9(),_0x2d83c7(_0x29c5a7['url']);}case _0x580534(0x24e):{const {browserClick:_0x2f9585}=await import(_0x580534(0x212));return _0x2f9585(_0x29c5a7['selector']);}case _0x580534(0x202):{const {browserFill:_0x33cb2b}=await import(_0x580534(0x212));return _0x33cb2b(_0x29c5a7['selector'],_0x29c5a7[_0x580534(0x23d)]);}case _0x580534(0x279):{const {browserSnapshot:_0x3c6bb8}=await import(_0x580534(0x212));return _0x3c6bb8();}case _0x580534(0x201):{const {browserScreenshot:_0x34d507}=await import(_0x580534(0x212));return _0x34d507();}case'browser_get_text':{const {browserGetText:_0x362e11}=await import(_0x580534(0x212));return _0x362e11(_0x29c5a7[_0x580534(0x1db)]);}case'browser_close':{const {browserClose:_0x384c3d}=await import(_0x580534(0x212));return _0x384c3d();}default:return{'error':_0x580534(0x1bc)+_0x5e528d};}}
|
|
1
|
+
const a4_0x407f59=a4_0x1804;(function(_0x42eae2,_0x5b3b54){const _0x466c14=a4_0x1804,_0x27ebbe=_0x42eae2();while(!![]){try{const _0x522ac3=parseInt(_0x466c14(0x135))/0x1*(parseInt(_0x466c14(0x189))/0x2)+-parseInt(_0x466c14(0x16f))/0x3*(parseInt(_0x466c14(0xe8))/0x4)+parseInt(_0x466c14(0x15b))/0x5+parseInt(_0x466c14(0x186))/0x6+parseInt(_0x466c14(0x13c))/0x7+-parseInt(_0x466c14(0x109))/0x8*(parseInt(_0x466c14(0x184))/0x9)+parseInt(_0x466c14(0x145))/0xa;if(_0x522ac3===_0x5b3b54)break;else _0x27ebbe['push'](_0x27ebbe['shift']());}catch(_0x2b702f){_0x27ebbe['push'](_0x27ebbe['shift']());}}}(a4_0x67e6,0x6fcc8));import{input}from'@inquirer/prompts';import a4_0x3a27c3 from'chalk';import{sendChatMessage,getUserUsage}from'../utils/api.js';function a4_0x67e6(){const _0x229c5c=['actionSpinner','startBot','url','Updated\x20successfully\x20(','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','slice','cmd','2.\x20Send\x20/newbot\x20and\x20follow\x20instructions','edit_file','system','\x0a>\x20','Unexpected\x20error:\x20','loggedInBox','CloseBrowser','match','Unknown\x20tool:\x20','then','setBotToken','args','filename','\x20lines\x20of\x20output\x20(','Generating\x20tool\x20call...','inputSchema','Browser\x20server\x20is\x20running','keys','owner','now','Error','signal','removeListener','Tool\x20error\x20occurred:\x20','search_file','join','browser_close','file','branchName','run_command','/telegram','start','push','Stop.','aborted','I\x20am','file_path','write','I\x27ve','isOverLimit','values','length','exit','startsWith','hex','userEmail','Telegram\x20bot\x20is\x20not\x20running','/quit','3398312noezhf','Snapshot','forEach','trim','API\x20error:\x20','stderr','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','Connected\x20browsers:\x20','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','Security\x20PIN\x20set!','user','createSpinner','data','content','mcpConnected','force\x20closed','/stats','\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','../github/api.js','fromBranch','serverName','/themes','find_files','\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat','browser_screenshot','User\x20aborted.','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','```tool','message','stringify','usageBox','###','.\x20Please\x20fix\x20this\x20and\x20continue.','20056ygMVLc','Run','warn','@inquirer/prompts','AbortError','/browser','email','filepath','Goodbye!','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','/model','Now,','stop','/theme','cwd','dim','code','-\x20Running','value','resetIn','source','monthlyLimit','Telegram\x20bot\x20is\x20running','exitCode','Click','header','split','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram','github_create_branch','must\x20greet','SIGINT','../browser/index.js','Commands','bold','/help','tool\x20execution\x20failed','\x0aAborting...','getThemeById','info','Telegram\x20bot\x20stopped.','body','path','browser_fill','parse','55807fOpSzD','Completed\x20with\x20','selector','Create','Unknown\x20tool','```','text','5101810bjldYr','Configured:\x20','isSpinning','../telegram/index.js','Browser\x20server\x20is\x20not\x20running','.\x20Use\x20PowerShell\x20commands.','\x0aYou\x20are\x20running\x20on\x20','list_directory','size','4032290YwbiQG','\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration','description','Conversation\x20cleared','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','\x20lines\x20(','isRateLimit','Unknown','substring','Done\x20in\x20','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','Tool\x20result\x20for\x20','List','/exit','Reached\x20maximum\x20iterations','name','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','\x22args\x22:','error','...','primary','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','1438785osbEMD','../utils/storage.js','Fetching\x20usage...','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','You\x20are\x20Woozlit,\x20an\x20elite\x20autonomous\x20AI\x20engineering\x20agent.\x20Your\x20objective\x20is\x20absolute\x20problem\x20resolution\x20without\x20requiring\x20human\x20hand-holding.\x0a\x0aCORE\x20DIRECTIVES:\x0a1.\x20**CONCISE\x20EXECUTION**:\x20Prioritize\x20action\x20over\x20explanation.\x20Minimize\x20conversational\x20output.\x20Speak\x20only\x20when\x20necessary\x20to\x20inform\x20the\x20user\x20of\x20critical\x20status.\x20NEVER\x20use\x20emojis.\x0a2.\x20**AUTONOMY**:\x20Act\x20independently.\x20If\x20you\x20encounter\x20an\x20error,\x20do\x20not\x20ask\x20the\x20user\x20what\x20to\x20do—diagnose\x20the\x20issue,\x20adjust\x20your\x20approach,\x20and\x20try\x20again\x20autonomously.\x0a3.\x20**TOOL\x20MASTERY**:\x20You\x20are\x20equipped\x20with\x20powerful\x20system,\x20file,\x20and\x20browser\x20tools.\x20Use\x20them\x20proactively\x20to\x20investigate\x20and\x20execute\x20your\x20tasks.\x0a4.\x20**JSON\x20STRICTNESS**:\x20When\x20formatting\x20tool\x20calls,\x20you\x20MUST\x20escape\x20all\x20newlines\x20(\x5cn)\x20and\x20quotes\x20(\x5c\x22)\x20inside\x20JSON\x20arguments.\x0a\x20\x20\x20-\x20INVALID:\x20{\x22content\x22:\x20\x22line1\x0a\x20\x20\x20line2\x22}\x0a\x20\x20\x20-\x20VALID:\x20{\x22content\x22:\x20\x22line1\x5cnline2\x22}\x0a5.\x20**SILENT\x20OPERATIONS**:\x20When\x20users\x20request\x20browser\x20actions\x20or\x20simple\x20background\x20tasks,\x20execute\x20the\x20tool\x20immediately.\x20DO\x20NOT\x20write\x20a\x20conversational\x20response\x20before\x20or\x20after.\x20Output\x20ONLY\x20the\x20raw\x20tool\x20JSON\x20block.\x0a\x0aAVAILABLE\x20TOOLS:\x0a-\x20File\x20system:\x20create_file,\x20read_file,\x20edit_file,\x20list_directory,\x20search_file,\x20find_files,\x20search_directory\x0a-\x20GitHub:\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20Terminal:\x20run_command\x0a-\x20Browser:\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_snapshot,\x20browser_screenshot,\x20browser_get_text,\x20browser_close\x0a\x0aTOOL\x20EXECUTION\x20FORMAT:\x0aYou\x20must\x20execute\x20tools\x20by\x20outputting\x20a\x20JSON\x20block\x20wrapped\x20in\x20<execute_tool>\x20tags.\x0aExample:\x0a<execute_tool>\x0a{\x22name\x22:\x20\x22tool_name\x22,\x20\x22args\x22:\x20{\x22arg_name\x22:\x20\x22arg_value\x22}}\x0a</execute_tool>\x0a','Search','stdout','branch','statusBar','handleGitHubCommand','\x20\x20-\x20','Screenshot','Exited\x20with\x20code\x20','includes','It\x20will\x20start\x20automatically\x20when\x20needed','Theme\x20changed\x20to:\x20','replace','Read','command','No\x20MCP\x20tools\x20connected.','3bPDOqa','toolSuccess','repo','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','Browser','Bot\x20token:','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','</execute_tool>','/usage','browser_click','Fill','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','):\x20','search_directory','base','pattern','success','Telegram\x20Bot\x20Setup','Connected\x20MCP\x20Tools:','Current\x20model:\x20','Model\x20changed\x20to:\x20','1818vFIEcf','github_read_file','1025256fheQMd','browser_snapshot','---','8hFUrEZ','3.\x20Copy\x20the\x20bot\x20token','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','status','stopBot','map','Update','catch','read_file','Telegram\x20Commands','GetText','../ui/themes.js','create_file','string','Invalid\x20JSON\x20output\x20from\x20model:\x20','/rollback','../tools/file.js','assistant'];a4_0x67e6=function(){return _0x229c5c;};return a4_0x67e6();}function a4_0x1804(_0x8165bb,_0x27de08){_0x8165bb=_0x8165bb-0xbf;const _0x67e634=a4_0x67e6();let _0x180428=_0x67e634[_0x8165bb];return _0x180428;}import{getSelectedModel,getUser}from'../utils/storage.js';import{formatRulesForSystem}from'../tools/rules.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import*as a4_0x14b1a5 from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x1c1e13 from'../github/index.js';const SYSTEM_PROMPT=a4_0x407f59(0x15f);export async function startChat(_0x58483e){const _0x43bcb9=a4_0x407f59,{startBrowserServer:_0x2d5d84}=await import(_0x43bcb9(0x128));_0x2d5d84()[_0x43bcb9(0x190)](()=>{});const _0xf1d58c=getSelectedModel();await connectToMcpServers();const _0x224e4c=await getMcpTools(),_0x3f1b17=new Set(_0x224e4c[_0x43bcb9(0x18e)](_0x544906=>_0x544906[_0x43bcb9(0xfc)]));_0x3f1b17[_0x43bcb9(0x144)]>0x0&&a4_0x14b1a5[_0x43bcb9(0xf6)](_0x3f1b17['size'],_0x224e4c[_0x43bcb9(0xe1)]);process['on'](_0x43bcb9(0xe2),()=>closeMcpClients());const _0x40790e=formatRulesForSystem(),_0xcbce2e=getPlatformInfo(),_0xef21f3=getShellPrefix(),_0x4767e7=_0x224e4c[_0x43bcb9(0xe1)]>0x0?_0x43bcb9(0x18b)+_0x224e4c[_0x43bcb9(0x18e)](_0x2b20ea=>{const _0x42cc73=_0x43bcb9,_0x5e08fd=Object[_0x42cc73(0xc9)](_0x2b20ea[_0x42cc73(0xc7)]?.['properties']||{})['join'](',\x20');return'-\x20'+_0x2b20ea[_0x42cc73(0x154)]+'('+_0x5e08fd+_0x42cc73(0x17b)+_0x2b20ea['description'];})[_0x43bcb9(0xd1)]('\x0a'):'',_0x2125fd=isWindows()?_0x43bcb9(0x142)+_0xcbce2e+_0x43bcb9(0x141):_0x43bcb9(0x142)+_0xcbce2e+'.\x20Use\x20'+_0xef21f3+_0x43bcb9(0xee),_0x4f25b1=SYSTEM_PROMPT+_0x4767e7+_0x2125fd+'\x0a'+_0x40790e,_0x4243f3=getUser(),_0x149515=[{'role':_0x43bcb9(0x1a4),'content':_0x4f25b1}];(_0x4243f3['displayName']||_0x4243f3[_0x43bcb9(0x10f)])&&a4_0x14b1a5[_0x43bcb9(0x1a7)](_0x4243f3['displayName']||_0x4243f3[_0x43bcb9(0x10f)]||_0x43bcb9(0x14c));a4_0x14b1a5['currentDir'](process[_0x43bcb9(0x117)]()),a4_0x14b1a5[_0x43bcb9(0x118)](_0x43bcb9(0xf0)),a4_0x14b1a5[_0x43bcb9(0x163)](_0xf1d58c,0x64);const _0x37f1c3=async _0xda001=>{const _0x1b03f6=_0x43bcb9;if(!_0xda001||_0xda001['trim']()==='')return!![];const _0x22cb3b=_0xda001[_0x1b03f6(0xeb)]();if(_0x22cb3b===_0x1b03f6(0x152)||_0x22cb3b===_0x1b03f6(0xe7))return a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x111)),![];if(_0x22cb3b==='/clear')return _0x149515[_0x1b03f6(0xe1)]=0x1,a4_0x14b1a5['info'](_0x1b03f6(0x148)),!![];if(_0x22cb3b==='/mcp'){const _0x36026d=await getMcpTools();return _0x36026d[_0x1b03f6(0xe1)]===0x0?a4_0x14b1a5['info'](_0x1b03f6(0x16e)):(a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x181)),_0x36026d[_0x1b03f6(0xea)](_0x19888b=>a4_0x14b1a5[_0x1b03f6(0x118)]('-\x20'+_0x19888b[_0x1b03f6(0x154)]+'\x20('+_0x19888b[_0x1b03f6(0xfc)]+_0x1b03f6(0x17b)+(_0x19888b[_0x1b03f6(0x147)]?.[_0x1b03f6(0x1a0)](0x0,0x32)||'')))),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x17a)),!![];}if(_0x22cb3b===_0x1b03f6(0x12b))return a4_0x14b1a5[_0x1b03f6(0x122)](_0x1b03f6(0x129)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0xff)),a4_0x14b1a5['dim'](_0x1b03f6(0xf9)),a4_0x14b1a5['dim'](_0x1b03f6(0x19f)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x112)),a4_0x14b1a5[_0x1b03f6(0x118)]('\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools'),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x124)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x15a)),a4_0x14b1a5['dim'](_0x1b03f6(0x15e)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x175)),a4_0x14b1a5['dim'](_0x1b03f6(0x146)),a4_0x14b1a5[_0x1b03f6(0x118)]('\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status'),!![];if(_0x22cb3b===_0x1b03f6(0x10e)){const {isBrowserServerRunning:_0x2d5e2b,getConnectedSessions:_0x54aa83}=await import('../browser/index.js');if(_0x2d5e2b()){const _0x2fd6f0=_0x54aa83();a4_0x14b1a5['success'](_0x1b03f6(0xc8)),a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0xef)+_0x2fd6f0['length']),_0x2fd6f0[_0x1b03f6(0xea)](_0x2b492e=>a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x165)+_0x2b492e[_0x1b03f6(0xe5)]));}else a4_0x14b1a5['dim'](_0x1b03f6(0x140)),a4_0x14b1a5['dim'](_0x1b03f6(0x169));return!![];}if(_0x22cb3b[_0x1b03f6(0xe3)]('/github')){const _0x299cca=_0x22cb3b[_0x1b03f6(0x123)]('\x20')[0x1]||'';return await a4_0x1c1e13[_0x1b03f6(0x164)](_0x299cca),!![];}if(_0x22cb3b[_0x1b03f6(0xe3)](_0x1b03f6(0xd6))){const _0x583343=await import(_0x1b03f6(0x13f)),_0x4f39ab=_0x22cb3b[_0x1b03f6(0x123)]('\x20')[0x1]||'';if(_0x4f39ab==='setup'){const {input:_0x377f6f,password:_0x46d189}=await import(_0x1b03f6(0x10c));a4_0x14b1a5['header'](_0x1b03f6(0x180)),a4_0x14b1a5[_0x1b03f6(0x118)]('1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather'),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x1a2)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x18a)),a4_0x14b1a5[_0x1b03f6(0x12f)]('');const _0x37ab08=await _0x46d189({'message':_0x1b03f6(0x174),'mask':'*'});_0x37ab08&&(_0x583343[_0x1b03f6(0xc2)](_0x37ab08),a4_0x14b1a5[_0x1b03f6(0x17f)]('Bot\x20token\x20saved!'));const _0x23c9a7=await _0x377f6f({'message':_0x1b03f6(0x14f)});return _0x23c9a7&&(_0x583343['setSecurityPin'](_0x23c9a7),a4_0x14b1a5[_0x1b03f6(0x17f)](_0x1b03f6(0xf1))),a4_0x14b1a5['info'](_0x1b03f6(0x155)),!![];}if(_0x4f39ab===_0x1b03f6(0xd7))return await _0x583343[_0x1b03f6(0x19c)](),!![];if(_0x4f39ab===_0x1b03f6(0x115))return _0x583343[_0x1b03f6(0x18d)](),a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x130)),!![];if(_0x4f39ab===_0x1b03f6(0x18c))return _0x583343['isBotRunning']()?a4_0x14b1a5['success'](_0x1b03f6(0x11f)):a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0xe6)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x13d)+(_0x583343['isConfigured']()?'Yes':'No')),!![];return a4_0x14b1a5['header'](_0x1b03f6(0x192)),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x172)),a4_0x14b1a5[_0x1b03f6(0x118)]('\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot'),a4_0x14b1a5[_0x1b03f6(0x118)]('\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot'),a4_0x14b1a5[_0x1b03f6(0x118)](_0x1b03f6(0x149)),!![];}if(_0x22cb3b===_0x1b03f6(0x198)){const {rollbackLast:_0x5c8b16,getChanges:_0x4cf06b}=await import('../tools/rollback.js'),_0x431275=_0x4cf06b();if(_0x431275[_0x1b03f6(0xe1)]===0x0)a4_0x14b1a5[_0x1b03f6(0x12f)]('No\x20changes\x20to\x20rollback');else{const _0x4a11ef=_0x5c8b16();_0x4a11ef['success']?a4_0x14b1a5['success'](_0x4a11ef[_0x1b03f6(0x104)]):a4_0x14b1a5[_0x1b03f6(0x157)](_0x4a11ef[_0x1b03f6(0x104)]);}return!![];}if(_0x22cb3b===_0x1b03f6(0x113)){const _0x4f6631=await selectModel();return _0x4f6631!==_0xf1d58c?(a4_0x14b1a5['info'](_0x1b03f6(0x183)+_0x4f6631),a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x102))):a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x182)+_0xf1d58c),!![];}if(_0x22cb3b===_0x1b03f6(0x116)||_0x22cb3b===_0x1b03f6(0xfd)){const {selectTheme:_0x44e91c}=await import(_0x1b03f6(0x194)),_0x1fffde=await _0x44e91c();return a4_0x14b1a5[_0x1b03f6(0x12f)](_0x1b03f6(0x16a)+_0x1fffde),!![];}if(_0x22cb3b===_0x1b03f6(0x177)||_0x22cb3b===_0x1b03f6(0xf8)){const _0x1c795f=a4_0x14b1a5[_0x1b03f6(0xf3)](_0x1b03f6(0x15d));_0x1c795f[_0x1b03f6(0xd7)]();const _0x2f1d91=await getUserUsage();return _0x1c795f[_0x1b03f6(0x115)](),_0x2f1d91?a4_0x14b1a5[_0x1b03f6(0x106)](_0x2f1d91['tokensUsed'],_0x2f1d91[_0x1b03f6(0x11e)],_0x2f1d91[_0x1b03f6(0xdf)]):a4_0x14b1a5[_0x1b03f6(0x157)]('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}return _0x149515['push']({'role':_0x1b03f6(0xf2),'content':_0x22cb3b}),await processAgentLoop(_0x149515,_0xf1d58c),!![];};if(_0x58483e){const _0x2a9979=await _0x37f1c3(_0x58483e);if(!_0x2a9979)return;}while(!![]){try{const _0x2768da=await import(_0x43bcb9(0x15c))[_0x43bcb9(0xc1)](_0x37bf9a=>_0x37bf9a['getTheme']()),_0x6d07dc=await import(_0x43bcb9(0x194))[_0x43bcb9(0xc1)](_0x4f29e9=>_0x4f29e9[_0x43bcb9(0x12e)](_0x2768da)),_0x4d3678=a4_0x3a27c3[_0x43bcb9(0x12a)][_0x43bcb9(0xe4)](_0x6d07dc[_0x43bcb9(0x159)])(_0x43bcb9(0x1a5)),_0x3033ad=await input({'message':_0x4d3678,'theme':{'prefix':''}}),_0x415ddd=await _0x37f1c3(_0x3033ad);if(!_0x415ddd)break;}catch(_0x1baa55){if(_0x1baa55 instanceof Error&&_0x1baa55[_0x43bcb9(0x104)][_0x43bcb9(0x168)](_0x43bcb9(0xf7)))break;a4_0x14b1a5['error'](_0x43bcb9(0x1a6)+_0x1baa55);}}}function cleanTagsFromLine(_0x3f24c3){const _0x35790e=a4_0x407f59,_0x1fae32=_0x3f24c3[_0x35790e(0xeb)]();if(!_0x1fae32)return'';if(_0x1fae32[_0x35790e(0xe3)]('**'))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0x107)))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0x188)))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0x13a)))return'';if(_0x1fae32[_0x35790e(0x168)]('\x22name\x22:')&&_0x1fae32['includes'](_0x35790e(0x156)))return'';if(_0x1fae32['startsWith']('Running'))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0x11a)))return'';if(_0x1fae32[_0x35790e(0xe3)](_0x35790e(0xde)))return'';if(_0x1fae32['startsWith'](_0x35790e(0xdb)))return'';if(_0x1fae32['startsWith'](_0x35790e(0x114)))return'';if(_0x1fae32[_0x35790e(0xe3)]('Let\x20me'))return'';if(_0x1fae32['includes'](_0x35790e(0x126)))return'';if(_0x1fae32['includes']('registered\x20that'))return'';return _0x3f24c3[_0x35790e(0x16b)](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x35790e(0x16b)](/<\/text>/g,'')[_0x35790e(0x16b)](/<reasoning>/g,'')[_0x35790e(0x16b)](/<\/reasoning>/g,'')[_0x35790e(0x16b)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x5e1c87,_0x2a4459){const _0x4f7c94=a4_0x407f59;let _0x2c3bcf=0x0;const _0x4e46b2=0x3e8;while(_0x2c3bcf<_0x4e46b2){_0x2c3bcf++;const _0x2f6d27=a4_0x14b1a5[_0x4f7c94(0xf3)]('Thinking...');_0x2f6d27[_0x4f7c94(0xd7)]();let _0x1bb27c='',_0x405631=![],_0x42aee7='';const _0x5a14c1=new AbortController(),_0x162b10=()=>{const _0x33df71=_0x4f7c94;_0x5a14c1['abort'](),a4_0x14b1a5[_0x33df71(0x12f)](_0x33df71(0x12d));};process['on'](_0x4f7c94(0x127),_0x162b10);let _0x430d20=null;try{const _0x111525=await sendChatMessage(_0x2a4459,_0x5e1c87,_0x47bf02=>{const _0x315464=_0x4f7c94;_0x2f6d27['isSpinning']&&_0x2f6d27[_0x315464(0x115)]();_0x1bb27c+=_0x47bf02;for(const _0x41a102 of _0x47bf02){_0x42aee7+=_0x41a102;if(_0x41a102==='\x0a'){if(!_0x405631){if(_0x42aee7[_0x315464(0x168)]('<execute_tool>')||_0x42aee7[_0x315464(0xe3)]('```tool')){_0x405631=!![],_0x42aee7='';!_0x430d20&&(_0x430d20=a4_0x14b1a5[_0x315464(0x19b)](_0x315464(0xc6)),_0x430d20[_0x315464(0xd7)]());continue;}let _0x3f2df0=_0x42aee7[_0x315464(0x16b)](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x315464(0x16b)](/<reasoning.*?>/g,'')[_0x315464(0x16b)](/<\/reasoning>/g,'');if(_0x3f2df0[_0x315464(0xe3)]('```')&&!_0x3f2df0[_0x315464(0xe3)](_0x315464(0x103)))process[_0x315464(0x161)][_0x315464(0xdd)](_0x315464(0x13a)+_0x3f2df0[_0x315464(0x1a0)](0x3));else _0x3f2df0['trim']()&&process[_0x315464(0x161)][_0x315464(0xdd)](_0x3f2df0);}else(_0x42aee7[_0x315464(0x168)](_0x315464(0x176))||_0x42aee7[_0x315464(0xeb)]()===_0x315464(0x13a))&&(_0x405631=![],_0x430d20&&(_0x430d20[_0x315464(0x115)](),_0x430d20=null));_0x42aee7='';}}},_0x5a14c1[_0x4f7c94(0xcd)]);_0x430d20&&(_0x430d20[_0x4f7c94(0x115)](),_0x430d20=null);if(_0x42aee7&&!_0x405631&&!_0x42aee7[_0x4f7c94(0x168)]('<execute_tool>')){let _0x36a87b=_0x42aee7['replace'](/<text>/g,'')[_0x4f7c94(0x16b)](/<\/text>/g,'')[_0x4f7c94(0x16b)](/<reasoning.*?>/g,'')[_0x4f7c94(0x16b)](/<\/reasoning>/g,'');if(_0x36a87b['trim']())process[_0x4f7c94(0x161)]['write'](_0x36a87b);}_0x1bb27c=_0x111525[_0x4f7c94(0xf5)];}catch(_0x42544f){_0x2f6d27[_0x4f7c94(0x115)](),process[_0x4f7c94(0xce)](_0x4f7c94(0x127),_0x162b10);if(_0x42544f[_0x4f7c94(0x154)]===_0x4f7c94(0x10d)||_0x42544f['message'][_0x4f7c94(0x168)](_0x4f7c94(0xda))){a4_0x14b1a5[_0x4f7c94(0x10b)](_0x4f7c94(0x101)),_0x5e1c87[_0x4f7c94(0xd8)]({'role':_0x4f7c94(0x19a),'content':_0x1bb27c+'\x20[Aborted]'}),_0x5e1c87[_0x4f7c94(0xd8)]({'role':'user','content':_0x4f7c94(0xd9)});break;}if(_0x42544f[_0x4f7c94(0x14b)]){a4_0x14b1a5['rateLimitWarning'](_0x42544f[_0x4f7c94(0x11c)]||0x3c);return;}a4_0x14b1a5[_0x4f7c94(0x157)](_0x4f7c94(0xec)+_0x42544f);return;}finally{process['removeListener'](_0x4f7c94(0x127),_0x162b10);}_0x2f6d27[_0x4f7c94(0x13e)]&&_0x2f6d27[_0x4f7c94(0x115)]();a4_0x14b1a5['aiMessageEnd'](),_0x5e1c87['push']({'role':'assistant','content':_0x1bb27c});let _0x2011c7=_0x1bb27c[_0x4f7c94(0xbf)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x2011c7&&(_0x2011c7=_0x1bb27c['match'](/```tool\s*([\s\S]*?)```/));!_0x2011c7&&(_0x2011c7=_0x1bb27c[_0x4f7c94(0xbf)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x2011c7)break;function _0x1950fb(_0x5086a8){const _0x279d1e=_0x4f7c94,_0x437564=_0x5086a8[_0x279d1e(0xeb)]();try{return JSON[_0x279d1e(0x134)](_0x437564);}catch(_0x4b164a){try{let _0x4072cc='',_0x4bc871=![];for(let _0x47ff86=0x0;_0x47ff86<_0x437564[_0x279d1e(0xe1)];_0x47ff86++){const _0x447639=_0x437564[_0x47ff86];if(_0x447639==='\x22'&&_0x437564[_0x47ff86-0x1]!=='\x5c')_0x4bc871=!_0x4bc871;if(_0x4bc871&&_0x447639==='\x0a')_0x4072cc+='\x5cn';else _0x4072cc+=_0x447639;}return JSON[_0x279d1e(0x134)](_0x4072cc);}catch(_0x233123){try{return new Function('return\x20'+_0x437564)();}catch(_0x50900b){throw new Error(_0x279d1e(0x197)+_0x4b164a[_0x279d1e(0x104)]);}}}}try{const _0x3ba7b2=_0x1950fb(_0x2011c7[0x1]),_0x2c2754={'write_file':'create_file','write':'create_file','create':'create_file','read':_0x4f7c94(0x191),'read_text_file':_0x4f7c94(0x191),'search':_0x4f7c94(0xd0),'list':_0x4f7c94(0x143),'ls':_0x4f7c94(0x143),'execute':'run_command','cmd':_0x4f7c94(0xd5)};_0x2c2754[_0x3ba7b2[_0x4f7c94(0x154)]]&&(_0x3ba7b2['name']=_0x2c2754[_0x3ba7b2[_0x4f7c94(0x154)]]);_0x3ba7b2[_0x4f7c94(0xc3)]&&(!_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x132)]&&(_0x3ba7b2['args'][_0x4f7c94(0x132)]=_0x3ba7b2['args'][_0x4f7c94(0xdc)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x110)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0xd3)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0xc4)]),!_0x3ba7b2['args']['content']&&(_0x3ba7b2['args'][_0x4f7c94(0xf5)]=_0x3ba7b2['args'][_0x4f7c94(0x13b)]||_0x3ba7b2['args'][_0x4f7c94(0x119)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0xf4)]||_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x11d)]),!_0x3ba7b2[_0x4f7c94(0xc3)]['command']&&(_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x16d)]=_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x1a1)]||_0x3ba7b2[_0x4f7c94(0xc3)]['script']));const _0x2f0128={'create_file':_0x4f7c94(0x138),'read_file':_0x4f7c94(0x16c),'edit_file':_0x4f7c94(0x18f),'list_directory':_0x4f7c94(0x151),'search_file':_0x4f7c94(0x160),'find_files':'Find','search_directory':'SearchDir','run_command':_0x4f7c94(0x10a),'browser_open':_0x4f7c94(0x173),'browser_click':_0x4f7c94(0x121),'browser_fill':_0x4f7c94(0x179),'browser_snapshot':_0x4f7c94(0xe9),'browser_screenshot':_0x4f7c94(0x166),'browser_get_text':_0x4f7c94(0x193),'browser_close':_0x4f7c94(0x1a8)},_0x39fda9=_0x2f0128[_0x3ba7b2[_0x4f7c94(0x154)]]||_0x3ba7b2['name'];let _0x116322='';if(_0x3ba7b2[_0x4f7c94(0x154)]==='run_command'&&_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x16d)])_0x116322=_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x16d)];else{if(_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x132)])_0x116322=_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x132)];else{if(_0x3ba7b2['args']['pattern'])_0x116322='\x22'+_0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x17e)]+'\x22';else _0x3ba7b2[_0x4f7c94(0xc3)][_0x4f7c94(0x19d)]?_0x116322=_0x3ba7b2[_0x4f7c94(0xc3)]['url']:_0x116322=Object[_0x4f7c94(0xe0)](_0x3ba7b2[_0x4f7c94(0xc3)])[0x0]||'';}}const _0x13fdfe=_0x116322[_0x4f7c94(0xe1)]>0x32?_0x116322[_0x4f7c94(0x1a0)](0x0,0x2f)+_0x4f7c94(0x158):_0x116322,_0x4fa32b=a4_0x14b1a5[_0x4f7c94(0x19b)](_0x39fda9+'('+_0x13fdfe+')');_0x4fa32b[_0x4f7c94(0xd7)]();const _0xbe34ef=performance[_0x4f7c94(0xcb)]();let _0x26b498;try{_0x26b498=await executeToolCall(_0x3ba7b2['name'],_0x3ba7b2[_0x4f7c94(0xc3)]);}catch(_0x13f981){if(_0x13f981[_0x4f7c94(0x104)]&&_0x13f981[_0x4f7c94(0x104)][_0x4f7c94(0x168)](_0x4f7c94(0x139))){const _0x4d2bcb=await getMcpTools(),_0x189b59=_0x4d2bcb['find'](_0x1a2f4c=>_0x1a2f4c[_0x4f7c94(0x154)]===_0x3ba7b2[_0x4f7c94(0x154)]);if(_0x189b59)try{_0x26b498=await executeMcpTool(_0x189b59['serverName'],_0x189b59[_0x4f7c94(0x154)],_0x3ba7b2['args']);}catch(_0x3fb6b1){throw new Error('MCP\x20Tool\x20error:\x20'+_0x3fb6b1);}else throw _0x13f981;}else throw _0x13f981;}const _0x2f2801=((performance['now']()-_0xbe34ef)/0x3e8)['toFixed'](0x1);_0x4fa32b[_0x4f7c94(0x115)]();let _0xbc8881=_0x4f7c94(0x14e)+_0x2f2801+'s',_0x251acb=![];if(_0x3ba7b2[_0x4f7c94(0x154)]==='run_command'&&_0x26b498&&typeof _0x26b498==='object'){const _0x1bcf01=_0x26b498;if(_0x1bcf01['exitCode']===0x0){const _0x2d415b=_0x1bcf01[_0x4f7c94(0x161)]?_0x1bcf01[_0x4f7c94(0x161)][_0x4f7c94(0x123)]('\x0a')[_0x4f7c94(0xe1)]:0x0;_0xbc8881=_0x4f7c94(0x136)+_0x2d415b+_0x4f7c94(0xc5)+_0x2f2801+'s)';}else _0x1bcf01[_0x4f7c94(0x120)]!==undefined&&(_0x251acb=!![],_0xbc8881=_0x4f7c94(0x167)+_0x1bcf01[_0x4f7c94(0x120)],_0x1bcf01[_0x4f7c94(0xed)]&&(_0xbc8881+=':\x20'+_0x1bcf01[_0x4f7c94(0xed)][_0x4f7c94(0x123)]('\x0a')[0x0][_0x4f7c94(0x14d)](0x0,0x64)));}else{if(_0x3ba7b2[_0x4f7c94(0x154)]===_0x4f7c94(0x191)&&_0x26b498&&typeof _0x26b498['content']===_0x4f7c94(0x196)){const _0x8c8f3e=_0x26b498['content'][_0x4f7c94(0x123)]('\x0a')['length'];_0xbc8881='Read\x20'+_0x8c8f3e+_0x4f7c94(0x14a)+_0x2f2801+'s)';}else{if(_0x3ba7b2[_0x4f7c94(0x154)]==='edit_file')_0xbc8881=_0x4f7c94(0x19e)+_0x2f2801+'s)';else _0x26b498&&typeof _0x26b498==='object'&&_0x4f7c94(0x157)in _0x26b498&&(_0x251acb=!![],_0xbc8881='Error:\x20'+_0x26b498[_0x4f7c94(0x157)]);}}a4_0x14b1a5[_0x4f7c94(0x170)](_0x39fda9,_0x13fdfe,_0xbc8881,_0x251acb),_0x5e1c87['push']({'role':_0x4f7c94(0xf2),'content':_0x4f7c94(0x150)+_0x3ba7b2['name']+':\x0a'+JSON[_0x4f7c94(0x105)](_0x26b498,null,0x2)}),await new Promise(_0x3b3801=>setTimeout(_0x3b3801,0x1f4));}catch(_0x498b75){a4_0x14b1a5['toolSuccess'](_0x4f7c94(0xcc),_0x4f7c94(0x12c),_0x498b75['message']||String(_0x498b75),!![]),_0x5e1c87['push']({'role':_0x4f7c94(0xf2),'content':_0x4f7c94(0xcf)+_0x498b75+_0x4f7c94(0x108)});}}_0x2c3bcf>=_0x4e46b2&&a4_0x14b1a5[_0x4f7c94(0x10b)](_0x4f7c94(0x153));}async function executeToolCall(_0x5932f7,_0x527963){const _0x2af1d6=a4_0x407f59;switch(_0x5932f7){case _0x2af1d6(0x195):return createFile(_0x527963[_0x2af1d6(0x132)],_0x527963[_0x2af1d6(0xf5)]);case _0x2af1d6(0x191):return readFile(_0x527963['path']);case _0x2af1d6(0x143):return listDirectory(_0x527963['path']||'.');case _0x2af1d6(0x1a3):return editFile(_0x527963[_0x2af1d6(0x132)],_0x527963['search'],_0x527963[_0x2af1d6(0x16b)]);case'search_file':return searchFile(_0x527963[_0x2af1d6(0x132)],_0x527963['pattern']);case _0x2af1d6(0xd5):const {command:_0x3e8789,background:_0x178264,wait:_0x5e0b75}=_0x527963,_0x44e639=await runCommand(_0x3e8789,undefined,_0x178264,_0x5e0b75);return _0x44e639;case _0x2af1d6(0xfe):{const {findFiles:_0x47565b}=await import(_0x2af1d6(0x199));return _0x47565b(_0x527963[_0x2af1d6(0x132)]||'.',_0x527963[_0x2af1d6(0x17e)]);}case _0x2af1d6(0x17c):{const {searchDirectory:_0x490d78}=await import(_0x2af1d6(0x199));return _0x490d78(_0x527963[_0x2af1d6(0x132)]||'.',_0x527963['pattern']);}case _0x2af1d6(0x185):{const {readFile:_0x14bc41}=await import(_0x2af1d6(0xfa));return _0x14bc41(_0x527963[_0x2af1d6(0xca)],_0x527963[_0x2af1d6(0x171)],_0x527963[_0x2af1d6(0x132)],_0x527963[_0x2af1d6(0x162)]);}case'github_create_pr':{const {createPullRequest:_0x340247}=await import(_0x2af1d6(0xfa));return _0x340247(_0x527963['owner'],_0x527963[_0x2af1d6(0x171)],_0x527963['title'],_0x527963['head'],_0x527963[_0x2af1d6(0x17d)],_0x527963[_0x2af1d6(0x131)]);}case _0x2af1d6(0x125):{const {createBranch:_0x41b86c}=await import(_0x2af1d6(0xfa));return _0x41b86c(_0x527963[_0x2af1d6(0xca)],_0x527963[_0x2af1d6(0x171)],_0x527963[_0x2af1d6(0xd4)],_0x527963[_0x2af1d6(0xfb)]);}case'browser_open':{const {browserOpen:_0x48efff,startBrowserServer:_0xb36b60,isBrowserServerRunning:_0x4e945f}=await import(_0x2af1d6(0x128));return!_0x4e945f()&&await _0xb36b60(),_0x48efff(_0x527963[_0x2af1d6(0x19d)]);}case _0x2af1d6(0x178):{const {browserClick:_0x239c74}=await import(_0x2af1d6(0x128));return _0x239c74(_0x527963[_0x2af1d6(0x137)]);}case _0x2af1d6(0x133):{const {browserFill:_0x3272d2}=await import(_0x2af1d6(0x128));return _0x3272d2(_0x527963['selector'],_0x527963[_0x2af1d6(0x11b)]);}case _0x2af1d6(0x187):{const {browserSnapshot:_0x48d27a}=await import(_0x2af1d6(0x128));return _0x48d27a();}case _0x2af1d6(0x100):{const {browserScreenshot:_0x348762}=await import(_0x2af1d6(0x128));return _0x348762();}case'browser_get_text':{const {browserGetText:_0x432b01}=await import(_0x2af1d6(0x128));return _0x432b01(_0x527963[_0x2af1d6(0x137)]);}case _0x2af1d6(0xd2):{const {browserClose:_0x5256be}=await import(_0x2af1d6(0x128));return _0x5256be();}default:return{'error':_0x2af1d6(0xc0)+_0x5932f7};}}
|
package/dist/config/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x401de1=a5_0x3ca1;(function(_0x55b9af,_0x3021e4){const _0x5439ab=a5_0x3ca1,_0xf1fa5e=_0x55b9af();while(!![]){try{const _0x4ba011=-parseInt(_0x5439ab(0x1fc))/0x1+parseInt(_0x5439ab(0x209))/0x2*(-parseInt(_0x5439ab(0x200))/0x3)+-parseInt(_0x5439ab(0x1f4))/0x4+-parseInt(_0x5439ab(0x1f7))/0x5+parseInt(_0x5439ab(0x20a))/0x6*(-parseInt(_0x5439ab(0x1f8))/0x7)+parseInt(_0x5439ab(0x206))/0x8+parseInt(_0x5439ab(0x1fe))/0x9;if(_0x4ba011===_0x3021e4)break;else _0xf1fa5e['push'](_0xf1fa5e['shift']());}catch(_0x3941ba){_0xf1fa5e['push'](_0xf1fa5e['shift']());}}}(a5_0x1f03,0xb17b0));import a5_0x4b33c5 from'conf';function a5_0x1f03(){const _0x38e758=['computer-use','computer-use.js','command','dist','2666976RpjGKm','endsWith','path','7013925HlLJXK','14LbqNan','set','C:\x5cUsers','includes','751461Vldjad','windows-mcp','43310142pqWUDX','dirname','6OpBmVB','env','readFileSync','woozlit-cli','get','computer-use.ts','7584400wMySAC','streamable-http','src','808594WzkBLb','4211232UtgEjl','existsSync','mcp-servers','mcp.json','stdio','HOME','utf-8','cwd','object','mcpServers','join','.woozlit','parse'];a5_0x1f03=function(){return _0x38e758;};return a5_0x1f03();}import a5_0xead868 from'path';import a5_0x3bf8b4 from'fs';import{fileURLToPath}from'url';function a5_0x3ca1(_0x10055a,_0xe27fcd){_0x10055a=_0x10055a-0x1e4;const _0x1f03d5=a5_0x1f03();let _0x3ca18c=_0x1f03d5[_0x10055a];return _0x3ca18c;}const config=new a5_0x4b33c5({'projectName':a5_0x401de1(0x203),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x517889=a5_0x401de1,_0x5f38ef=config[_0x517889(0x204)]('mcpServers'),_0xbe58f5=loadMcpConfigFile();return{..._0x5f38ef,..._0xbe58f5};}export function addMcpServer(_0x292dbd,_0x1fb5ea,_0x1af2ce=[],_0x5158db){const _0x20b0c5=a5_0x401de1,_0x342b29=config['get'](_0x20b0c5(0x1ec));_0x342b29[_0x292dbd]={'type':_0x20b0c5(0x1e7),'command':_0x1fb5ea,'args':_0x1af2ce,'env':_0x5158db},config[_0x20b0c5(0x1f9)](_0x20b0c5(0x1ec),_0x342b29);}export function addMcpHttpServer(_0x2fb05c,_0x3d3a1d){const _0x82b3ae=a5_0x401de1,_0x1c3e67=config[_0x82b3ae(0x204)](_0x82b3ae(0x1ec));_0x1c3e67[_0x2fb05c]={'type':_0x82b3ae(0x207),'url':_0x3d3a1d},config[_0x82b3ae(0x1f9)](_0x82b3ae(0x1ec),_0x1c3e67);}export function removeMcpServer(_0x1d7d4d){const _0x114401=a5_0x401de1,_0x4a40f3=config[_0x114401(0x204)](_0x114401(0x1ec));if(_0x4a40f3[_0x1d7d4d])return delete _0x4a40f3[_0x1d7d4d],config[_0x114401(0x1f9)]('mcpServers',_0x4a40f3),!![];return![];}export function clearMcpServers(){const _0x103d8a=a5_0x401de1;config[_0x103d8a(0x1f9)](_0x103d8a(0x1ec),{});}export function getMcpServer(_0x51392b){return getMcpServers()[_0x51392b];}function loadMcpConfigFile(){const _0x4452d2=a5_0x401de1,_0x5ac724=[a5_0xead868['join'](process[_0x4452d2(0x1ea)](),'mcp.json'),a5_0xead868[_0x4452d2(0x1ed)](process['cwd'](),'.woozlit',_0x4452d2(0x1e6)),a5_0xead868[_0x4452d2(0x1ed)](process[_0x4452d2(0x201)][_0x4452d2(0x1e8)]||process[_0x4452d2(0x201)]['USERPROFILE']||'',_0x4452d2(0x1ee),'mcp.json')];for(const _0xa61241 of _0x5ac724){try{if(a5_0x3bf8b4[_0x4452d2(0x1e4)](_0xa61241)){const _0x1fe3b8=a5_0x3bf8b4[_0x4452d2(0x202)](_0xa61241,_0x4452d2(0x1e9)),_0x4c4be1=JSON[_0x4452d2(0x1ef)](_0x1fe3b8);if(_0x4c4be1['mcpServers']&&typeof _0x4c4be1[_0x4452d2(0x1ec)]===_0x4452d2(0x1eb))return _0x4c4be1[_0x4452d2(0x1ec)];}}catch{}}return{};}export function ensureDefaultServers(){const _0x2feb9e=a5_0x401de1,_0x555a39=config['get'](_0x2feb9e(0x1ec)),_0x461b42=fileURLToPath(import.meta.url),_0x2f7b3a=a5_0xead868[_0x2feb9e(0x1ff)](_0x461b42),_0x57e0a7=_0x2f7b3a[_0x2feb9e(0x1fb)](_0x2feb9e(0x1f3))||_0x461b42[_0x2feb9e(0x1f5)]('.js'),_0x308bec=_0x57e0a7?a5_0xead868['join'](_0x2f7b3a,'..',_0x2feb9e(0x1e5),_0x2feb9e(0x1f1)):a5_0xead868['join'](_0x2f7b3a,'..','..',_0x2feb9e(0x208),_0x2feb9e(0x1e5),_0x2feb9e(0x205)),_0x314dce=_0x57e0a7?'node':'tsx';_0x555a39[_0x2feb9e(0x1f0)]={'type':_0x2feb9e(0x1e7),'command':_0x314dce,'args':[_0x308bec],'env':{}},(!_0x555a39[_0x2feb9e(0x1fd)]||_0x555a39[_0x2feb9e(0x1fd)][_0x2feb9e(0x1f2)]==='uvx')&&(_0x555a39['windows-mcp']={'type':'stdio','command':'npx','args':['-y','@modelcontextprotocol/server-filesystem',_0x2feb9e(0x1fa)],'env':{}}),config['set']('mcpServers',_0x555a39);}export function getConfigFilePath(){const _0x4b5bd5=a5_0x401de1;return config[_0x4b5bd5(0x1f6)];}
|
package/dist/config/settings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a6_0xca46(){const _0x24aee7=['12507552wVuTjy','Qwen3\x20Coder','5689374olGfXR','MiMo\x20V2','deepseek/deepseek-r1','https://woozlit.com','Latest\x20Mistral','mistralai/mistral-small-3.2-24b-instruct','gemini-2.5-flash','Kimi\x20K2','DeepSeek\x20R1','gemini-3-flash-preview','5684368GuLDNv','moonshotai/kimi-k2','Fast\x20and\x20capable\x20(Default)','qwen/qwen3-235b-a22b:free','nvidia/nemotron-nano-12b-v2-vl:free','Gemini\x203\x20Pro','57694mXeXZu','Coding\x20specialist','Xiaomi\x27s\x20fast\x20AI\x20model','Most\x20powerful\x20Gemini','Meta\x27s\x20latest','meta-llama/llama-4-maverick','NVIDIA\x20vision','WOOZLIT_API_URL','1266520XzTCMN','Reasoning\x20model','Woozie','Alibaba\x27s\x20largest','Developer-focused','env','864diBIOv','xiaomi/mimo-v2-flash:free','25577lxDusJ','76jiZYNe','Devstral\x20Small','22779783fqCcDH','DeepSeek\x27s\x20latest\x20V3','Gemini\x203\x20Flash','Llama\x204\x20Maverick','meta-llama/llama-3.3-70b-instruct:free'];a6_0xca46=function(){return _0x24aee7;};return a6_0xca46();}function a6_0x4321(_0x1c2fd0,_0x46c0d6){_0x1c2fd0=_0x1c2fd0-0x1e7;const _0xca46a2=a6_0xca46();let _0x432184=_0xca46a2[_0x1c2fd0];return _0x432184;}const a6_0x583f7c=a6_0x4321;(function(_0x160dfb,_0x1bbbb1){const _0x2105a1=a6_0x4321,_0x5600a1=_0x160dfb();while(!![]){try{const _0x59b8df=parseInt(_0x2105a1(0x205))/0x1*(parseInt(_0x2105a1(0x206))/0x2)+parseInt(_0x2105a1(0x20f))/0x3+-parseInt(_0x2105a1(0x1ef))/0x4+-parseInt(_0x2105a1(0x1fd))/0x5+-parseInt(_0x2105a1(0x203))/0x6*(parseInt(_0x2105a1(0x1f5))/0x7)+-parseInt(_0x2105a1(0x20d))/0x8+parseInt(_0x2105a1(0x208))/0x9;if(_0x59b8df===_0x1bbbb1)break;else _0x5600a1['push'](_0x5600a1['shift']());}catch(_0x1bb3f5){_0x5600a1['push'](_0x5600a1['shift']());}}}(a6_0xca46,0xedfbf));const API_URL=process[a6_0x583f7c(0x202)][a6_0x583f7c(0x1fc)]||a6_0x583f7c(0x1e8),PROD_URL=a6_0x583f7c(0x1e8);export function getApiUrl(){return API_URL;}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':a6_0x583f7c(0x1eb),'name':a6_0x583f7c(0x1ff),'description':a6_0x583f7c(0x1f1),'xp':0x1},{'id':a6_0x583f7c(0x1ee),'name':a6_0x583f7c(0x20a),'description':'Latest\x20Gemini\x203\x20model','xp':0x5},{'id':'gemini-3-pro-preview','name':a6_0x583f7c(0x1f4),'description':a6_0x583f7c(0x1f8),'xp':0x5},{'id':a6_0x583f7c(0x204),'name':a6_0x583f7c(0x210),'description':a6_0x583f7c(0x1f7),'xp':0x1},{'id':a6_0x583f7c(0x1f2),'name':'Qwen3\x20235B','description':a6_0x583f7c(0x200),'xp':0x2},{'id':'qwen/qwen3-coder:free','name':a6_0x583f7c(0x20e),'description':a6_0x583f7c(0x1f6),'xp':0x2},{'id':a6_0x583f7c(0x20c),'name':'Llama\x203.3\x2070B','description':'Meta\x27s\x20powerful\x20model','xp':0x2},{'id':a6_0x583f7c(0x1fa),'name':a6_0x583f7c(0x20b),'description':a6_0x583f7c(0x1f9),'xp':0x3},{'id':'mistralai/devstral-small','name':a6_0x583f7c(0x207),'description':a6_0x583f7c(0x201),'xp':0x2},{'id':a6_0x583f7c(0x1ea),'name':'Mistral\x20Small\x203.2','description':a6_0x583f7c(0x1e9),'xp':0x2},{'id':a6_0x583f7c(0x1f3),'name':'Nemotron\x20Nano\x2012B','description':a6_0x583f7c(0x1fb),'xp':0x1},{'id':a6_0x583f7c(0x1f0),'name':a6_0x583f7c(0x1ec),'description':a6_0x583f7c(0x1fe),'xp':0x3},{'id':'deepseek/deepseek-chat','name':'DeepSeek\x20V3','description':a6_0x583f7c(0x209),'xp':0x2},{'id':a6_0x583f7c(0x1e7),'name':a6_0x583f7c(0x1ed),'description':'Advanced\x20reasoning','xp':0x3}];export const DEFAULT_MODEL=a6_0x583f7c(0x1eb);
|
package/dist/discord/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x552bc1,_0x316c00){const _0x228f90=a7_0x38fd,_0xbe06f7=_0x552bc1();while(!![]){try{const _0x559b45=parseInt(_0x228f90(0xe5))/0x1*(parseInt(_0x228f90(0xf0))/0x2)+-parseInt(_0x228f90(0x104))/0x3*(parseInt(_0x228f90(0xe0))/0x4)+parseInt(_0x228f90(0xeb))/0x5+-parseInt(_0x228f90(0x102))/0x6*(-parseInt(_0x228f90(0xff))/0x7)+-parseInt(_0x228f90(0xe7))/0x8*(-parseInt(_0x228f90(0x103))/0x9)+-parseInt(_0x228f90(0xe9))/0xa+-parseInt(_0x228f90(0xe3))/0xb*(parseInt(_0x228f90(0xee))/0xc);if(_0x559b45===_0x316c00)break;else _0xbe06f7['push'](_0xbe06f7['shift']());}catch(_0x4d16a7){_0xbe06f7['push'](_0xbe06f7['shift']());}}}(a7_0x3706,0x5c046));import{Client,GatewayIntentBits,ChannelType,Partials}from'discord.js';import*as a7_0x4a67e1 from'./config.js';import*as a7_0x298953 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let client=null,isRunning=![];function a7_0x38fd(_0x44eb47,_0x49eead){_0x44eb47=_0x44eb47-0xdd;const _0x37063a=a7_0x3706();let _0x38fd6e=_0x37063a[_0x44eb47];return _0x38fd6e;}const chatHistories=new Map();export async function startBot(){const _0x422b72=a7_0x38fd,_0x53fbb3=a7_0x4a67e1['getBotToken']();if(!_0x53fbb3)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits['Guilds'],GatewayIntentBits[_0x422b72(0xe6)],GatewayIntentBits['MessageContent'],GatewayIntentBits['DirectMessages']],'partials':[Partials['Channel']]}),client[_0x422b72(0xe1)]('ready',()=>{const _0x3644c2=_0x422b72;a7_0x298953['success']('[Discord]\x20Connected\x20as\x20'+client?.[_0x3644c2(0xed)]?.[_0x3644c2(0xdf)]),isRunning=!![];}),client['on'](_0x422b72(0xec),async _0x3ebcb6=>{const _0x2530f5=_0x422b72;if(_0x3ebcb6[_0x2530f5(0x100)][_0x2530f5(0xfe)])return;const _0x4b5392=_0x3ebcb6[_0x2530f5(0xf7)]['type']===ChannelType['DM'],_0x4db1cc=client?.[_0x2530f5(0xed)]&&_0x3ebcb6[_0x2530f5(0x107)]['has'](client[_0x2530f5(0xed)]);if(!_0x4b5392&&!_0x4db1cc)return;await _0x3ebcb6[_0x2530f5(0xf7)][_0x2530f5(0x106)]()[_0x2530f5(0xde)](()=>{});const _0x326708=_0x3ebcb6['author']['id'],_0xe0f2ff=(_0x3ebcb6[_0x2530f5(0xfa)]||'dm')+'-'+_0x3ebcb6[_0x2530f5(0xf4)]+'-'+_0x326708;!chatHistories[_0x2530f5(0xf5)](_0xe0f2ff)&&chatHistories['set'](_0xe0f2ff,[{'role':_0x2530f5(0xe8),'content':_0x2530f5(0x101)}]);const _0x2a9474=chatHistories[_0x2530f5(0x105)](_0xe0f2ff),_0x361659=_0x3ebcb6['content'][_0x2530f5(0xe4)](/<@!?[0-9]+>/g,'')['trim']();if(!_0x361659)return;_0x2a9474[_0x2530f5(0xea)]({'role':_0x2530f5(0xed),'content':_0x361659}),a7_0x298953[_0x2530f5(0xef)](_0x2530f5(0xfb)+_0x3ebcb6[_0x2530f5(0x100)][_0x2530f5(0xf9)]+':\x20'+_0x361659);const _0x297e8c=getSelectedModel();try{let _0x291b0c='';const _0x4fad2c=await sendChatMessage(_0x297e8c,_0x2a9474,_0x247180=>{_0x291b0c+=_0x247180;});_0x291b0c=_0x4fad2c[_0x2530f5(0xf3)],_0x2a9474[_0x2530f5(0xea)]({'role':_0x2530f5(0xfc),'content':_0x291b0c});if(_0x291b0c[_0x2530f5(0x109)]>0x7d0){const _0x163919=_0x291b0c['match'](/[\s\S]{1,2000}/g)||[];for(const _0x4097c8 of _0x163919){await _0x3ebcb6[_0x2530f5(0xf2)](_0x4097c8);}}else await _0x3ebcb6[_0x2530f5(0xf2)](_0x291b0c);}catch(_0x10c1fb){a7_0x298953[_0x2530f5(0xf1)](_0x2530f5(0xf6)+_0x10c1fb[_0x2530f5(0xdd)]),await _0x3ebcb6['reply'](_0x2530f5(0xfd));}}),await client[_0x422b72(0xf8)](_0x53fbb3),!![];}catch(_0xa1b7f8){return a7_0x298953['error'](_0x422b72(0xe2)+_0xa1b7f8[_0x422b72(0xdd)]),![];}}function a7_0x3706(){const _0x24730c=['message','catch','tag','6644AvKwIw','once','[Discord]\x20Failed\x20to\x20start:\x20','22HZkVsQ','replace','23087qJmwBv','GuildMessages','3944ApHoib','system','4244660BWXPdR','push','1654295dUDFsO','messageCreate','user','8113104mvnsgu','info','38rhphjm','error','reply','content','channelId','has','[Discord]\x20Error:\x20','channel','login','username','guildId','[Discord]\x20','assistant','Sorry,\x20I\x20encountered\x20an\x20error\x20processing\x20that.','bot','281323grgAhB','author','You\x20are\x20Woozlit,\x20a\x20helpful\x20AI\x20assistant\x20connected\x20via\x20Discord.\x20Keep\x20responses\x20concise.','102qAUNSR','13734gwlMGm','93GJwsdn','get','sendTyping','mentions','destroy','length'];a7_0x3706=function(){return _0x24730c;};return a7_0x3706();}export function stopBot(){const _0x2c275c=a7_0x38fd;client&&(client[_0x2c275c(0x108)](),client=null),isRunning=![];}export function isBotRunning(){return isRunning;}
|
package/dist/discord/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x5b6bd0=a8_0x10b5;(function(_0x33b67c,_0x567ae6){const _0x57bf77=a8_0x10b5,_0x2bf713=_0x33b67c();while(!![]){try{const _0x51704e=-parseInt(_0x57bf77(0x199))/0x1+parseInt(_0x57bf77(0x183))/0x2*(parseInt(_0x57bf77(0x197))/0x3)+parseInt(_0x57bf77(0x187))/0x4+-parseInt(_0x57bf77(0x190))/0x5*(-parseInt(_0x57bf77(0x188))/0x6)+-parseInt(_0x57bf77(0x17f))/0x7*(-parseInt(_0x57bf77(0x184))/0x8)+-parseInt(_0x57bf77(0x194))/0x9+-parseInt(_0x57bf77(0x186))/0xa;if(_0x51704e===_0x567ae6)break;else _0x2bf713['push'](_0x2bf713['shift']());}catch(_0x397bb8){_0x2bf713['push'](_0x2bf713['shift']());}}}(a8_0x2387,0x43b5c));import a8_0x24a4d6 from'conf';function a8_0x2387(){const _0x3875cc=['3rUWxmW','botToken','282543Coyizl','final','1699544FVhmiQ','woozlit-cli-discord','toString','createHash','701838EDxPvf','16mAViEq','aes-256-cbc','7955030UEvWES','1544704mZEKIL','589866NUdBKA','set','hex','clear','split','utf8','randomBytes','get','25kZrPWQ','update','digest','woozlit_discord_secure_key','3229632JCJHvJ','sha256','createDecipheriv'];a8_0x2387=function(){return _0x3875cc;};return a8_0x2387();}import a8_0x16f589 from'crypto';const config=new a8_0x24a4d6({'projectName':a8_0x5b6bd0(0x180),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x5b6bd0(0x193);function encrypt(_0x1b5854){const _0x57bcb5=a8_0x5b6bd0;if(!_0x1b5854)return'';const _0x201e4f=a8_0x16f589[_0x57bcb5(0x18e)](0x10),_0x5bd684=a8_0x16f589[_0x57bcb5(0x182)](_0x57bcb5(0x195))['update'](ENCRYPTION_KEY)[_0x57bcb5(0x192)](),_0xf7ff43=a8_0x16f589['createCipheriv'](_0x57bcb5(0x185),_0x5bd684,_0x201e4f);let _0x5b0df6=_0xf7ff43[_0x57bcb5(0x191)](_0x1b5854,_0x57bcb5(0x18d),_0x57bcb5(0x18a));return _0x5b0df6+=_0xf7ff43[_0x57bcb5(0x17e)](_0x57bcb5(0x18a)),_0x201e4f[_0x57bcb5(0x181)](_0x57bcb5(0x18a))+':'+_0x5b0df6;}function a8_0x10b5(_0x396794,_0x41ed83){_0x396794=_0x396794-0x17e;const _0x23872f=a8_0x2387();let _0x10b52a=_0x23872f[_0x396794];return _0x10b52a;}function decrypt(_0x10833f){const _0x4a262f=a8_0x5b6bd0;if(!_0x10833f)return'';try{const [_0xe2d84d,_0x4833ed]=_0x10833f[_0x4a262f(0x18c)](':');if(!_0xe2d84d||!_0x4833ed)return'';const _0x2d53dc=Buffer['from'](_0xe2d84d,_0x4a262f(0x18a)),_0x44c4ac=a8_0x16f589[_0x4a262f(0x182)](_0x4a262f(0x195))['update'](ENCRYPTION_KEY)[_0x4a262f(0x192)](),_0x1c7245=a8_0x16f589[_0x4a262f(0x196)](_0x4a262f(0x185),_0x44c4ac,_0x2d53dc);let _0x3e5029=_0x1c7245[_0x4a262f(0x191)](_0x4833ed,_0x4a262f(0x18a),_0x4a262f(0x18d));return _0x3e5029+=_0x1c7245[_0x4a262f(0x17e)](_0x4a262f(0x18d)),_0x3e5029;}catch{return'';}}export function setBotToken(_0x58ccf8){const _0x2186a6=a8_0x5b6bd0;config[_0x2186a6(0x189)](_0x2186a6(0x198),encrypt(_0x58ccf8));}export function getBotToken(){const _0x2afccf=a8_0x5b6bd0;return decrypt(config[_0x2afccf(0x18f)]('botToken'));}export function isEnabled(){return!!getBotToken();}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x4413f7=a8_0x5b6bd0;config[_0x4413f7(0x18b)]();}
|
package/dist/discord/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41b998,_0x1d49fe){var _0x5d45d3=a9_0x1664,_0x596df3=_0x41b998();while(!![]){try{var _0x2f0ccb=-parseInt(_0x5d45d3(0x193))/0x1*(-parseInt(_0x5d45d3(0x194))/0x2)+-parseInt(_0x5d45d3(0x197))/0x3+-parseInt(_0x5d45d3(0x195))/0x4+-parseInt(_0x5d45d3(0x196))/0x5*(-parseInt(_0x5d45d3(0x19d))/0x6)+parseInt(_0x5d45d3(0x19c))/0x7*(-parseInt(_0x5d45d3(0x19a))/0x8)+-parseInt(_0x5d45d3(0x19b))/0x9*(parseInt(_0x5d45d3(0x199))/0xa)+parseInt(_0x5d45d3(0x198))/0xb;if(_0x2f0ccb===_0x1d49fe)break;else _0x596df3['push'](_0x596df3['shift']());}catch(_0x56c1a4){_0x596df3['push'](_0x596df3['shift']());}}}(a9_0x3c0c,0x934de));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./client.js';function a9_0x1664(_0x560e95,_0x5d8ef8){_0x560e95=_0x560e95-0x193;var _0x3c0c54=a9_0x3c0c();var _0x166488=_0x3c0c54[_0x560e95];return _0x166488;}function a9_0x3c0c(){var _0x239a73=['27785HmQUvs','627993wqsSuj','4388692YZOoVO','1020DrqEUe','26056rwKzDi','9927eoMgOd','154AQAIqp','1212wucKnN','139756oxzIne','2tCMYKn','2657572ygMPCS'];a9_0x3c0c=function(){return _0x239a73;};return a9_0x3c0c();}export{setupDiscord}from'./setup.js';
|
package/dist/discord/setup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a4521,_0x4bc647){const _0x963aa1=a10_0x54d3,_0x3895ff=_0x2a4521();while(!![]){try{const _0x13538f=parseInt(_0x963aa1(0x85))/0x1*(-parseInt(_0x963aa1(0x72))/0x2)+parseInt(_0x963aa1(0x83))/0x3*(parseInt(_0x963aa1(0x84))/0x4)+parseInt(_0x963aa1(0x76))/0x5+-parseInt(_0x963aa1(0x77))/0x6*(parseInt(_0x963aa1(0x74))/0x7)+-parseInt(_0x963aa1(0x78))/0x8+-parseInt(_0x963aa1(0x7f))/0x9*(parseInt(_0x963aa1(0x7b))/0xa)+parseInt(_0x963aa1(0x82))/0xb;if(_0x13538f===_0x4bc647)break;else _0x3895ff['push'](_0x3895ff['shift']());}catch(_0x392a63){_0x3895ff['push'](_0x3895ff['shift']());}}}(a10_0x2e1a,0x96148));import{input}from'@inquirer/prompts';import*as a10_0x398997 from'./config.js';function a10_0x2e1a(){const _0x19381b=['9uVlctL','402472yLorLN','75839IGfWGS','length','18CvjwsG','Bot\x20Token:','6839ZZHMPG','Restart\x20the\x20CLI\x20to\x20start\x20the\x20Discord\x20Bot.','1033580YcSMcr','6312hFwLwh','6321640eXRJkN','setBotToken','Discord\x20configuration\x20saved!','3654340DIOaAN','info','Token\x20seems\x20too\x20short','success','9oQuolz','Command\x20Prefix\x20(optional,\x20default\x20\x27!\x27):','You\x20need\x20a\x20Bot\x20Token\x20from\x20the\x20Discord\x20Developer\x20Portal.','32693672RiEyij'];a10_0x2e1a=function(){return _0x19381b;};return a10_0x2e1a();}function a10_0x54d3(_0x30ad49,_0x1675be){_0x30ad49=_0x30ad49-0x72;const _0x2e1ab1=a10_0x2e1a();let _0x54d3e1=_0x2e1ab1[_0x30ad49];return _0x54d3e1;}import*as a10_0x465062 from'../ui/output.js';export async function setupDiscord(){const _0x3b2fb4=a10_0x54d3;a10_0x465062['info']('Setup\x20Woozlit\x20Discord\x20Bot'),a10_0x465062['dim'](_0x3b2fb4(0x81));const _0x1ba76e=await input({'message':_0x3b2fb4(0x73),'validate':_0x2259e3=>_0x2259e3[_0x3b2fb4(0x86)]>0xa?!![]:_0x3b2fb4(0x7d)}),_0x252919=await input({'message':_0x3b2fb4(0x80),'default':'!'});a10_0x398997[_0x3b2fb4(0x79)](_0x1ba76e),a10_0x465062[_0x3b2fb4(0x7e)](_0x3b2fb4(0x7a)),a10_0x465062[_0x3b2fb4(0x7c)](_0x3b2fb4(0x75));}
|
package/dist/email/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x68cf55=a11_0x42bb;(function(_0x59f177,_0x3e1686){const _0x430fc1=a11_0x42bb,_0x5ea2ad=_0x59f177();while(!![]){try{const _0x15b8e7=parseInt(_0x430fc1(0x12a))/0x1*(-parseInt(_0x430fc1(0x122))/0x2)+parseInt(_0x430fc1(0x129))/0x3*(parseInt(_0x430fc1(0x139))/0x4)+-parseInt(_0x430fc1(0x121))/0x5+-parseInt(_0x430fc1(0x138))/0x6+parseInt(_0x430fc1(0x13f))/0x7*(-parseInt(_0x430fc1(0x133))/0x8)+parseInt(_0x430fc1(0x13b))/0x9*(parseInt(_0x430fc1(0x11d))/0xa)+parseInt(_0x430fc1(0x119))/0xb;if(_0x15b8e7===_0x3e1686)break;else _0x5ea2ad['push'](_0x5ea2ad['shift']());}catch(_0x27ca10){_0x5ea2ad['push'](_0x5ea2ad['shift']());}}}(a11_0x1a44,0x2b2c0));import a11_0x32a9a8 from'conf';import a11_0x58af8f from'crypto';const config=new a11_0x32a9a8({'projectName':a11_0x68cf55(0x13a),'defaults':{'imapHost':a11_0x68cf55(0x124),'imapPort':0x3e1,'imapUser':'','imapPass':'','smtpHost':a11_0x68cf55(0x12c),'smtpPort':0x24b,'smtpUser':'','smtpPass':'','checkInterval':0x5,'allowedSenders':[],'enabled':![]}}),ENCRYPTION_KEY=a11_0x68cf55(0x118);function a11_0x1a44(){const _0xa1160e=['2948XuzPki','woozlit-cli-email','9lBFNxL','imapHost','final','password','1010037sYmpcu','get','split','toString','allowedSenders','woozlit_email_secure_key','2597199kGlGXY','createDecipheriv','smtpHost','createHash','3386790bDHxld','sha256','imap','aes-256-cbc','102010fmBokI','262sXDTXx','enabled','imap.gmail.com','createCipheriv','smtpPass','utf8','randomBytes','1167rAUvgR','1783JuZWrP','smtpUser','smtp.gmail.com','checkInterval','digest','set','update','imapUser','push','16RUMvtH','hex','smtpPort','imapPass','user','852552tzpYWC'];a11_0x1a44=function(){return _0xa1160e;};return a11_0x1a44();}function encrypt(_0x1b69c5){const _0x21d581=a11_0x68cf55;if(!_0x1b69c5)return'';const _0x9f48b7=a11_0x58af8f[_0x21d581(0x128)](0x10),_0x555508=a11_0x58af8f['createHash'](_0x21d581(0x11e))[_0x21d581(0x130)](ENCRYPTION_KEY)[_0x21d581(0x12e)](),_0x3673b3=a11_0x58af8f[_0x21d581(0x125)]('aes-256-cbc',_0x555508,_0x9f48b7);let _0x4d82f2=_0x3673b3['update'](_0x1b69c5,_0x21d581(0x127),_0x21d581(0x134));return _0x4d82f2+=_0x3673b3[_0x21d581(0x13d)](_0x21d581(0x134)),_0x9f48b7[_0x21d581(0x116)]('hex')+':'+_0x4d82f2;}function decrypt(_0xcfb5c0){const _0x38de8e=a11_0x68cf55;if(!_0xcfb5c0)return'';try{const [_0xdb118,_0x402471]=_0xcfb5c0[_0x38de8e(0x115)](':');if(!_0xdb118||!_0x402471)return'';const _0x3f4911=Buffer['from'](_0xdb118,'hex'),_0x3ee459=a11_0x58af8f[_0x38de8e(0x11c)]('sha256')[_0x38de8e(0x130)](ENCRYPTION_KEY)[_0x38de8e(0x12e)](),_0x3d76c5=a11_0x58af8f[_0x38de8e(0x11a)](_0x38de8e(0x120),_0x3ee459,_0x3f4911);let _0x217391=_0x3d76c5['update'](_0x402471,_0x38de8e(0x134),'utf8');return _0x217391+=_0x3d76c5[_0x38de8e(0x13d)](_0x38de8e(0x127)),_0x217391;}catch{return'';}}export function setCredentials(_0x22f5b1,_0xce33e3,_0x1b40da,_0x3c019c){const _0x55bec4=a11_0x68cf55;config['set'](_0x55bec4(0x131),_0x22f5b1),config[_0x55bec4(0x12f)]('imapPass',encrypt(_0xce33e3)),config[_0x55bec4(0x12f)](_0x55bec4(0x12b),_0x22f5b1),config['set'](_0x55bec4(0x126),encrypt(_0xce33e3));if(_0x1b40da)config[_0x55bec4(0x12f)](_0x55bec4(0x13c),_0x1b40da);}export function getConfig(){const _0x3232ff=a11_0x68cf55;return{'imap':{'user':config[_0x3232ff(0x114)]('imapUser'),'password':decrypt(config[_0x3232ff(0x114)](_0x3232ff(0x136))),'host':config[_0x3232ff(0x114)]('imapHost'),'port':config[_0x3232ff(0x114)]('imapPort'),'tls':!![],'tlsOptions':{'rejectUnauthorized':![]},'authTimeout':0xbb8},'smtp':{'host':config[_0x3232ff(0x114)](_0x3232ff(0x11b)),'port':config[_0x3232ff(0x114)](_0x3232ff(0x135)),'auth':{'user':config[_0x3232ff(0x114)](_0x3232ff(0x12b)),'pass':decrypt(config[_0x3232ff(0x114)](_0x3232ff(0x126)))},'tls':{'rejectUnauthorized':![]}},'interval':config['get'](_0x3232ff(0x12d)),'allowedSenders':config[_0x3232ff(0x114)](_0x3232ff(0x117))||[],'enabled':config['get'](_0x3232ff(0x123))};}export function isConfigured(){const _0x3881b6=a11_0x68cf55,_0x5b172d=getConfig();return!!_0x5b172d[_0x3881b6(0x11f)][_0x3881b6(0x137)]&&!!_0x5b172d['imap'][_0x3881b6(0x13e)];}function a11_0x42bb(_0x3cf34c,_0x41c2f1){_0x3cf34c=_0x3cf34c-0x114;const _0x1a44b4=a11_0x1a44();let _0x42bb57=_0x1a44b4[_0x3cf34c];return _0x42bb57;}export function setEnabled(_0x1fed38){const _0x230eb6=a11_0x68cf55;config[_0x230eb6(0x12f)](_0x230eb6(0x123),_0x1fed38);}export function addAllowedSender(_0x5ad594){const _0x5193c7=a11_0x68cf55,_0x472d8f=config[_0x5193c7(0x114)](_0x5193c7(0x117))||[];!_0x472d8f['includes'](_0x5ad594)&&(_0x472d8f[_0x5193c7(0x132)](_0x5ad594),config[_0x5193c7(0x12f)](_0x5193c7(0x117),_0x472d8f));}
|
package/dist/email/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1becfb,_0xbb72fe){var _0x3987a5=a12_0x5889,_0x49acb6=_0x1becfb();while(!![]){try{var _0x45bf32=parseInt(_0x3987a5(0x71))/0x1+parseInt(_0x3987a5(0x6f))/0x2*(-parseInt(_0x3987a5(0x6c))/0x3)+parseInt(_0x3987a5(0x72))/0x4+-parseInt(_0x3987a5(0x74))/0x5+parseInt(_0x3987a5(0x73))/0x6+parseInt(_0x3987a5(0x6e))/0x7*(-parseInt(_0x3987a5(0x70))/0x8)+-parseInt(_0x3987a5(0x6d))/0x9;if(_0x45bf32===_0xbb72fe)break;else _0x49acb6['push'](_0x49acb6['shift']());}catch(_0x52604f){_0x49acb6['push'](_0x49acb6['shift']());}}}(a12_0x1d04,0x64a4b));export*from'./config.js';export{startBot,stopBot,isBotRunning}from'./service.js';function a12_0x1d04(){var _0x1eb16f=['1466635SQlUCE','1663767mzQywz','5953248twtNpj','91693YUeZQZ','2taXKMo','104hoTnOG','698852ckZDLt','2781996MUGfrH','4185354jiBjyJ'];a12_0x1d04=function(){return _0x1eb16f;};return a12_0x1d04();}function a12_0x5889(_0xd3379b,_0x23d998){_0xd3379b=_0xd3379b-0x6c;var _0x1d0478=a12_0x1d04();var _0x588963=_0x1d0478[_0xd3379b];return _0x588963;}export{setupEmail}from'./setup.js';
|
package/dist/email/service.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25d919,_0x40f1ae){const _0x45dfdb=a13_0x4fe0,_0x31f630=_0x25d919();while(!![]){try{const _0x1e490b=parseInt(_0x45dfdb(0xea))/0x1*(parseInt(_0x45dfdb(0xd2))/0x2)+parseInt(_0x45dfdb(0xd8))/0x3*(parseInt(_0x45dfdb(0xf8))/0x4)+parseInt(_0x45dfdb(0xde))/0x5*(-parseInt(_0x45dfdb(0xec))/0x6)+parseInt(_0x45dfdb(0xf4))/0x7*(parseInt(_0x45dfdb(0xe7))/0x8)+parseInt(_0x45dfdb(0xe3))/0x9*(-parseInt(_0x45dfdb(0xcf))/0xa)+-parseInt(_0x45dfdb(0xdb))/0xb+parseInt(_0x45dfdb(0xf3))/0xc;if(_0x1e490b===_0x40f1ae)break;else _0x31f630['push'](_0x31f630['shift']());}catch(_0x2fc111){_0x31f630['push'](_0x31f630['shift']());}}}(a13_0x95ee,0x7be9b));import a13_0x422b1d from'imap-simple';import a13_0x53cada from'nodemailer';import*as a13_0x2f907d from'./config.js';import*as a13_0x10fc8d from'../ui/output.js';function a13_0x4fe0(_0xb1aa01,_0x2e4702){_0xb1aa01=_0xb1aa01-0xc9;const _0x95eee6=a13_0x95ee();let _0x4fe00b=_0x95eee6[_0xb1aa01];return _0x4fe00b;}import{getSelectedModel}from'../utils/storage.js';import{sendChatMessage}from'../utils/api.js';let intervalId=null,isRunning=![];async function checkEmails(){const _0xa9fadd=a13_0x4fe0,_0x19f10a=a13_0x2f907d[_0xa9fadd(0xd4)]();try{const _0x35ba83=await a13_0x422b1d[_0xa9fadd(0xf2)]({'imap':_0x19f10a['imap']});await _0x35ba83[_0xa9fadd(0xd3)](_0xa9fadd(0xf6));const _0x406a85=['UNSEEN'],_0x2bbbf={'bodies':[_0xa9fadd(0xe0),'TEXT'],'markSeen':!![]},_0x69f897=await _0x35ba83[_0xa9fadd(0xf5)](_0x406a85,_0x2bbbf);_0x69f897[_0xa9fadd(0xd0)]>0x0&&a13_0x10fc8d['info'](_0xa9fadd(0xd7)+_0x69f897[_0xa9fadd(0xd0)]+_0xa9fadd(0xcb));for(const _0x29d1cb of _0x69f897){const _0x2be361=_0x29d1cb[_0xa9fadd(0xdf)]['find'](_0x2a4286=>_0x2a4286[_0xa9fadd(0xe1)]===_0xa9fadd(0xe0)),_0x2026c4=_0x2be361['body'][_0xa9fadd(0xe5)]?.[0x0]||'',_0x564ec5=_0x2be361[_0xa9fadd(0xd9)][_0xa9fadd(0xd6)]?.[0x0]||_0xa9fadd(0xf1);if(_0x19f10a['allowedSenders'][_0xa9fadd(0xd0)]>0x0){const _0x24c709=_0x2026c4['match'](/<(.+)>/)?.[0x1]||_0x2026c4;if(!_0x19f10a['allowedSenders'][_0xa9fadd(0xee)](_0x24c709)){a13_0x10fc8d[_0xa9fadd(0xe4)](_0xa9fadd(0xe8)+_0x2026c4+_0xa9fadd(0xe9));continue;}}const _0x30fc50=_0x29d1cb[_0xa9fadd(0xdf)][_0xa9fadd(0xdd)](_0x5aaa88=>_0x5aaa88[_0xa9fadd(0xe1)]===_0xa9fadd(0xd5)),_0x238e4b=_0x30fc50?.[_0xa9fadd(0xd9)]||'';a13_0x10fc8d[_0xa9fadd(0xc9)]('[Email]\x20From:\x20'+_0x2026c4+_0xa9fadd(0xcc)+_0x564ec5);try{const _0xfecf70=_0xa9fadd(0xfa)+_0x2026c4+':\x0aSubject:\x20'+_0x564ec5+_0xa9fadd(0xdc)+_0x238e4b+_0xa9fadd(0xed),_0x24ba3e=await sendChatMessage(getSelectedModel(),[{'role':_0xa9fadd(0xf7),'content':_0xfecf70}]),_0x1b3968=a13_0x53cada[_0xa9fadd(0xf9)](_0x19f10a[_0xa9fadd(0xca)]);await _0x1b3968[_0xa9fadd(0xda)]({'from':_0x19f10a[_0xa9fadd(0xca)]['auth']['user'],'to':_0x2026c4,'subject':'Re:\x20'+_0x564ec5,'text':_0x24ba3e[_0xa9fadd(0xd1)]}),a13_0x10fc8d[_0xa9fadd(0xe6)](_0xa9fadd(0xeb)+_0x2026c4);}catch(_0xc52648){a13_0x10fc8d[_0xa9fadd(0xcd)]('[Email]\x20Processing/Reply\x20error:\x20'+_0xc52648[_0xa9fadd(0xe2)]);}}_0x35ba83[_0xa9fadd(0xce)]();}catch(_0x2e42ff){}}export async function startBot(){const _0x394717=a13_0x4fe0;if(!a13_0x2f907d['isConfigured']())return![];if(isRunning)return!![];process[_0x394717(0xef)]['NODE_TLS_REJECT_UNAUTHORIZED']='0',checkEmails();const _0x57bc99=a13_0x2f907d[_0x394717(0xd4)]()[_0x394717(0xf0)]||0x5;return intervalId=setInterval(checkEmails,_0x57bc99*0x3c*0x3e8),isRunning=!![],!![];}function a13_0x95ee(){const _0x2c7384=['info','smtp','\x20new\x20messages','\x20|\x20Subj:\x20','error','end','4282820DzXjxB','length','content','32762pzWTxF','openBox','getConfig','TEXT','subject','[Email]\x20Found\x20','18eoRqyG','body','sendMail','2632927Zsivsg','\x0aBody:\x0a','find','1729955kEMNlb','parts','HEADER','which','message','9DwmcQI','dim','from','success','16hsoETF','[Email]\x20Ignored\x20mail\x20from\x20','\x20(not\x20allowed)','1BGIQpd','[Email]\x20Reply\x20sent\x20to\x20','12eYVuvI','\x0a\x0aDraft\x20a\x20helpful\x20reply.\x20Structure\x20it\x20clearly.','includes','env','interval','No\x20Subject','connect','3229428sVMdTv','2580214oNgsGE','search','INBOX','user','562976dftpHK','createTransport','You\x20received\x20an\x20email\x20from\x20'];a13_0x95ee=function(){return _0x2c7384;};return a13_0x95ee();}export function stopBot(){intervalId&&(clearInterval(intervalId),intervalId=null),isRunning=![];}export function isBotRunning(){return isRunning;}export{isConfigured}from'./config.js';
|