woozlit 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/woozlit +179 -0
- package/package.json +24 -78
- package/postinstall.mjs +102 -0
- package/README.md +0 -108
- package/dist/auth/login.d.ts +0 -4
- package/dist/auth/login.js +0 -1
- package/dist/browser/index.d.ts +0 -78
- package/dist/browser/index.js +0 -1
- package/dist/browser/server.d.ts +0 -13
- package/dist/browser/server.js +0 -1
- package/dist/browser/tools.d.ts +0 -13
- package/dist/browser/tools.js +0 -1
- package/dist/chat/agent.d.ts +0 -1
- package/dist/chat/agent.js +0 -1
- package/dist/config/mcp.d.ts +0 -21
- package/dist/config/mcp.js +0 -1
- package/dist/config/settings.d.ts +0 -10
- package/dist/config/settings.js +0 -1
- package/dist/discord/client.d.ts +0 -3
- package/dist/discord/client.js +0 -1
- package/dist/discord/config.d.ts +0 -5
- package/dist/discord/config.js +0 -1
- package/dist/discord/index.d.ts +0 -3
- package/dist/discord/index.js +0 -1
- package/dist/discord/setup.d.ts +0 -1
- package/dist/discord/setup.js +0 -1
- package/dist/email/config.d.ts +0 -31
- package/dist/email/config.js +0 -1
- package/dist/email/index.d.ts +0 -3
- package/dist/email/index.js +0 -1
- package/dist/email/service.d.ts +0 -4
- package/dist/email/service.js +0 -1
- package/dist/email/setup.d.ts +0 -1
- package/dist/email/setup.js +0 -1
- package/dist/github/api.d.ts +0 -25
- package/dist/github/api.js +0 -1
- package/dist/github/auth.d.ts +0 -4
- package/dist/github/auth.js +0 -1
- package/dist/github/auto-setup.d.ts +0 -1
- package/dist/github/auto-setup.js +0 -1
- package/dist/github/index.d.ts +0 -1
- package/dist/github/index.js +0 -1
- package/dist/github/manual-setup.d.ts +0 -1
- package/dist/github/manual-setup.js +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/mcp-servers/computer-use.d.ts +0 -1
- package/dist/mcp-servers/computer-use.js +0 -1
- package/dist/services/bot-manager.d.ts +0 -13
- package/dist/services/bot-manager.js +0 -1
- package/dist/services/notifications.d.ts +0 -4
- package/dist/services/notifications.js +0 -1
- package/dist/services/voice-agent.d.ts +0 -6
- package/dist/services/voice-agent.js +0 -1
- package/dist/telegram/bot.d.ts +0 -3
- package/dist/telegram/bot.js +0 -1
- package/dist/telegram/config.d.ts +0 -12
- package/dist/telegram/config.js +0 -1
- package/dist/telegram/index.d.ts +0 -3
- package/dist/telegram/index.js +0 -1
- package/dist/telegram/reminders.d.ts +0 -11
- package/dist/telegram/reminders.js +0 -1
- package/dist/telegram/setup.d.ts +0 -1
- package/dist/telegram/setup.js +0 -1
- package/dist/tools/command.d.ts +0 -23
- package/dist/tools/command.js +0 -1
- package/dist/tools/file.d.ts +0 -79
- package/dist/tools/file.js +0 -1
- package/dist/tools/git.d.ts +0 -30
- package/dist/tools/git.js +0 -1
- package/dist/tools/index.d.ts +0 -10
- package/dist/tools/index.js +0 -1
- package/dist/tools/knowledge.d.ts +0 -4
- package/dist/tools/knowledge.js +0 -1
- package/dist/tools/mcp.d.ts +0 -10
- package/dist/tools/mcp.js +0 -1
- package/dist/tools/network.d.ts +0 -10
- package/dist/tools/network.js +0 -1
- package/dist/tools/project.d.ts +0 -54
- package/dist/tools/project.js +0 -1
- package/dist/tools/rollback.d.ts +0 -21
- package/dist/tools/rollback.js +0 -1
- package/dist/tools/rules.d.ts +0 -4
- package/dist/tools/rules.js +0 -1
- package/dist/tools/system.d.ts +0 -33
- package/dist/tools/system.js +0 -1
- package/dist/twilio/config.d.ts +0 -11
- package/dist/twilio/config.js +0 -1
- package/dist/twilio/index.d.ts +0 -3
- package/dist/twilio/index.js +0 -1
- package/dist/twilio/server.d.ts +0 -5
- package/dist/twilio/server.js +0 -1
- package/dist/twilio/setup.d.ts +0 -1
- package/dist/twilio/setup.js +0 -1
- package/dist/ui/output.d.ts +0 -28
- package/dist/ui/output.js +0 -1
- package/dist/ui/select.d.ts +0 -3
- package/dist/ui/select.js +0 -1
- package/dist/ui/themes.d.ts +0 -25
- package/dist/ui/themes.js +0 -1
- package/dist/utils/api.d.ts +0 -22
- package/dist/utils/api.js +0 -1
- package/dist/utils/chat-history.d.ts +0 -15
- package/dist/utils/chat-history.js +0 -1
- package/dist/utils/history.d.ts +0 -3
- package/dist/utils/history.js +0 -1
- package/dist/utils/mcp-installer.d.ts +0 -1
- package/dist/utils/mcp-installer.js +0 -1
- package/dist/utils/platform.d.ts +0 -7
- package/dist/utils/platform.js +0 -1
- package/dist/utils/storage.d.ts +0 -23
- package/dist/utils/storage.js +0 -1
- package/dist/utils/update-check.d.ts +0 -5
- package/dist/utils/update-check.js +0 -1
- package/dist/utils/updater.d.ts +0 -2
- package/dist/utils/updater.js +0 -1
- package/dist/verify_repro.d.ts +0 -4
- package/dist/verify_repro.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a21_0x3d7268=a21_0x447d;(function(_0x4a9833,_0x2f034c){const _0x293790=a21_0x447d,_0x5a7da4=_0x4a9833();while(!![]){try{const _0x43047f=parseInt(_0x293790(0xc3))/0x1+-parseInt(_0x293790(0xc6))/0x2+parseInt(_0x293790(0xa0))/0x3*(parseInt(_0x293790(0x9b))/0x4)+parseInt(_0x293790(0xd5))/0x5+parseInt(_0x293790(0xac))/0x6+parseInt(_0x293790(0x9a))/0x7+-parseInt(_0x293790(0xae))/0x8;if(_0x43047f===_0x2f034c)break;else _0x5a7da4['push'](_0x5a7da4['shift']());}catch(_0x3ab861){_0x5a7da4['push'](_0x5a7da4['shift']());}}}(a21_0x4e96,0x8e2b6));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{CallToolRequestSchema,ListToolsRequestSchema}from'@modelcontextprotocol/sdk/types.js';import{Jimp}from'jimp';import{createRequire}from'module';const require=createRequire(import.meta.url);let robot;function a21_0x4e96(){const _0x4942eb=['computer-use','computer_type','Click\x20the\x20mouse\x20button.','width','computer_screenshot','@hurdlegroup/robotjs','Y\x20coordinate','Screen\x20size:\x20','text','Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','3675480WkZtLT','object','17302272XTMHnF','number','Screenshot\x20taken.','Moved\x20mouse\x20to\x20','length','right','string','getBuffer','getScreenSize','keyTap','command','middle','Type\x20a\x20string\x20of\x20text.','computer_mouse_move','height','left','computer_screen_size','mouseClick','capture','data','X\x20coordinate','1052148tAqSfg','image','Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','169834IsAQiC','join','moveMouse','Unknown\x20tool:\x20','Error:\x20','image/jpeg','with\x20','computer_mouse_click','Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','Tapped\x20key:\x20','bitmap','Clicked\x20','alt','computer_key_tap','params','1913495rEvmXn','3418114xaphmg','31816VDsYVV','resize','boolean','connect','\x20button','111JUwGcY','\x20(double)'];a21_0x4e96=function(){return _0x4942eb;};return a21_0x4e96();}try{robot=require(a21_0x3d7268(0xa7));}catch(a21_0x36deb6){}function a21_0x447d(_0x115aee,_0x38ecb2){_0x115aee=_0x115aee-0x9a;const _0x4e964a=a21_0x4e96();let _0x447d3c=_0x4e964a[_0x115aee];return _0x447d3c;}const AUTO=-0x1,MIME_JPEG=a21_0x3d7268(0xcb),server=new Server({'name':a21_0x3d7268(0xa2),'version':'1.0.0'},{'capabilities':{'tools':{}}});server['setRequestHandler'](ListToolsRequestSchema,async()=>{const _0x53f815=a21_0x3d7268;return{'tools':[{'name':'computer_screenshot','description':_0x53f815(0xc5),'inputSchema':{'type':_0x53f815(0xad),'properties':{}}},{'name':'computer_mouse_move','description':_0x53f815(0xab),'inputSchema':{'type':_0x53f815(0xad),'properties':{'x':{'type':_0x53f815(0xaf),'description':_0x53f815(0xc2)},'y':{'type':_0x53f815(0xaf),'description':_0x53f815(0xa8)}},'required':['x','y']}},{'name':_0x53f815(0xcd),'description':_0x53f815(0xa4),'inputSchema':{'type':_0x53f815(0xad),'properties':{'button':{'type':_0x53f815(0xb4),'enum':['left',_0x53f815(0xb3),_0x53f815(0xb9)],'default':_0x53f815(0xbd)},'double':{'type':_0x53f815(0x9d),'default':![]}}}},{'name':_0x53f815(0xa3),'description':_0x53f815(0xba),'inputSchema':{'type':_0x53f815(0xad),'properties':{'text':{'type':_0x53f815(0xb4),'description':'Text\x20to\x20type'}},'required':[_0x53f815(0xaa)]}},{'name':_0x53f815(0xd3),'description':_0x53f815(0xce),'inputSchema':{'type':_0x53f815(0xad),'properties':{'key':{'type':_0x53f815(0xb4),'description':'Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)'},'modifiers':{'type':'array','items':{'type':_0x53f815(0xb4),'enum':[_0x53f815(0xd2),_0x53f815(0xb8),'control','shift']},'description':'Modifier\x20keys'}},'required':['key']}},{'name':_0x53f815(0xbe),'description':'Get\x20the\x20screen\x20resolution.','inputSchema':{'type':'object','properties':{}}}]};}),server['setRequestHandler'](CallToolRequestSchema,async _0x28043f=>{const _0x53c214=a21_0x3d7268,{name:_0x3f8efd,arguments:_0x435a6d}=_0x28043f[_0x53c214(0xd4)];try{if(_0x3f8efd===_0x53c214(0xa6)){const _0x256a9d=robot[_0x53c214(0xb6)](),_0xa3f2cb=robot['screen'][_0x53c214(0xc0)](0x0,0x0,_0x256a9d[_0x53c214(0xa5)],_0x256a9d[_0x53c214(0xbc)]),_0x28d49c=new Jimp({'width':_0xa3f2cb[_0x53c214(0xa5)],'height':_0xa3f2cb['height']});for(let _0x3c7e1e=0x0;_0x3c7e1e<_0xa3f2cb[_0x53c214(0xc4)][_0x53c214(0xb2)];_0x3c7e1e+=0x4){_0x28d49c[_0x53c214(0xd0)][_0x53c214(0xc1)][_0x3c7e1e]=_0xa3f2cb[_0x53c214(0xc4)][_0x3c7e1e+0x2],_0x28d49c['bitmap'][_0x53c214(0xc1)][_0x3c7e1e+0x1]=_0xa3f2cb[_0x53c214(0xc4)][_0x3c7e1e+0x1],_0x28d49c[_0x53c214(0xd0)][_0x53c214(0xc1)][_0x3c7e1e+0x2]=_0xa3f2cb['image'][_0x3c7e1e],_0x28d49c[_0x53c214(0xd0)][_0x53c214(0xc1)][_0x3c7e1e+0x3]=_0xa3f2cb[_0x53c214(0xc4)][_0x3c7e1e+0x3];}_0x28d49c[_0x53c214(0xd0)][_0x53c214(0xa5)]>0x400&&_0x28d49c[_0x53c214(0x9c)]({'w':0x400});const _0x73daca=await _0x28d49c[_0x53c214(0xb5)](MIME_JPEG),_0x16a4bf=_0x73daca['toString']('base64');return{'content':[{'type':'text','text':_0x53c214(0xb0)},{'type':'image','data':_0x16a4bf,'mimeType':_0x53c214(0xcb)}]};}if(_0x3f8efd===_0x53c214(0xbb)){const {x:_0x4a84c4,y:_0x537796}=_0x435a6d;return robot[_0x53c214(0xc8)](_0x4a84c4,_0x537796),{'content':[{'type':_0x53c214(0xaa),'text':_0x53c214(0xb1)+_0x4a84c4+',\x20'+_0x537796}]};}if(_0x3f8efd===_0x53c214(0xcd)){const {button:button='left',double:double=![]}=_0x435a6d;return robot[_0x53c214(0xbf)](button,double),{'content':[{'type':'text','text':_0x53c214(0xd1)+button+_0x53c214(0x9f)+(double?_0x53c214(0xa1):'')}]};}if(_0x3f8efd==='computer_type'){const {text:_0x2a5c0d}=_0x435a6d;return robot['typeString'](_0x2a5c0d),{'content':[{'type':_0x53c214(0xaa),'text':'Typed:\x20\x22'+_0x2a5c0d+'\x22'}]};}if(_0x3f8efd===_0x53c214(0xd3)){const {key:_0x314def,modifiers:_0xcd0c15}=_0x435a6d;return robot[_0x53c214(0xb7)](_0x314def,_0xcd0c15),{'content':[{'type':'text','text':_0x53c214(0xcf)+_0x314def+'\x20'+(_0xcd0c15?_0x53c214(0xcc)+_0xcd0c15[_0x53c214(0xc7)]('+'):'')}]};}if(_0x3f8efd===_0x53c214(0xbe)){const _0x1b70ee=robot[_0x53c214(0xb6)]();return{'content':[{'type':_0x53c214(0xaa),'text':_0x53c214(0xa9)+_0x1b70ee[_0x53c214(0xa5)]+'x'+_0x1b70ee[_0x53c214(0xbc)]}]};}throw new Error(_0x53c214(0xc9)+_0x3f8efd);}catch(_0x4fc3a7){return{'content':[{'type':_0x53c214(0xaa),'text':_0x53c214(0xca)+_0x4fc3a7}],'isError':!![]};}});const transport=new StdioServerTransport();await server[a21_0x3d7268(0x9e)](transport);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare class BotManager {
|
|
2
|
-
private services;
|
|
3
|
-
constructor();
|
|
4
|
-
startAllConfigured(): Promise<void>;
|
|
5
|
-
stopAll(): void;
|
|
6
|
-
getStatus(): {
|
|
7
|
-
name: string;
|
|
8
|
-
running: boolean;
|
|
9
|
-
configured: boolean;
|
|
10
|
-
}[];
|
|
11
|
-
}
|
|
12
|
-
export declare const botManager: BotManager;
|
|
13
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a22_0x5ee292=a22_0x4d5f;(function(_0x2adfcd,_0x26e369){const _0x51397c=a22_0x4d5f,_0x43973b=_0x2adfcd();while(!![]){try{const _0x50c35d=-parseInt(_0x51397c(0x79))/0x1*(-parseInt(_0x51397c(0x87))/0x2)+-parseInt(_0x51397c(0x8a))/0x3+parseInt(_0x51397c(0x80))/0x4*(parseInt(_0x51397c(0x81))/0x5)+-parseInt(_0x51397c(0x6d))/0x6+-parseInt(_0x51397c(0x78))/0x7*(-parseInt(_0x51397c(0x77))/0x8)+parseInt(_0x51397c(0x85))/0x9*(-parseInt(_0x51397c(0x7c))/0xa)+-parseInt(_0x51397c(0x86))/0xb*(-parseInt(_0x51397c(0x70))/0xc);if(_0x50c35d===_0x26e369)break;else _0x43973b['push'](_0x43973b['shift']());}catch(_0xf43177){_0x43973b['push'](_0x43973b['shift']());}}}(a22_0x82e6,0x19831));import*as a22_0x299005 from'../telegram/index.js';function a22_0x4d5f(_0x4fe65b,_0x56b58a){_0x4fe65b=_0x4fe65b-0x6b;const _0x82e61f=a22_0x82e6();let _0x4d5fcd=_0x82e61f[_0x4fe65b];return _0x4d5fcd;}import*as a22_0x5c7500 from'../discord/index.js';import*as a22_0x25ac97 from'../email/index.js';import*as a22_0x3b8a64 from'../ui/output.js';class BotManager{[a22_0x5ee292(0x6f)]=[];constructor(){const _0x537190=a22_0x5ee292;this[_0x537190(0x6f)]['push']({'name':_0x537190(0x7a),'start':a22_0x299005[_0x537190(0x71)],'stop':a22_0x299005[_0x537190(0x75)],'isRunning':a22_0x299005[_0x537190(0x76)],'isConfigured':a22_0x299005['isConfigured']}),this[_0x537190(0x6f)][_0x537190(0x82)]({'name':_0x537190(0x7e),'start':a22_0x5c7500['startBot'],'stop':a22_0x5c7500[_0x537190(0x75)],'isRunning':a22_0x5c7500[_0x537190(0x76)],'isConfigured':a22_0x5c7500[_0x537190(0x7f)]}),this[_0x537190(0x6f)][_0x537190(0x82)]({'name':_0x537190(0x6e),'start':a22_0x25ac97[_0x537190(0x71)],'stop':a22_0x25ac97[_0x537190(0x75)],'isRunning':a22_0x25ac97[_0x537190(0x76)],'isConfigured':a22_0x25ac97[_0x537190(0x7f)]});}async[a22_0x5ee292(0x72)](){const _0x588c5c=a22_0x5ee292,_0x364159=this['services'][_0x588c5c(0x8b)](_0x3be626=>_0x3be626['isConfigured']());if(_0x364159[_0x588c5c(0x88)]===0x0)return;a22_0x3b8a64[_0x588c5c(0x6c)](_0x588c5c(0x84));const _0x12ea75=await Promise[_0x588c5c(0x89)](_0x364159[_0x588c5c(0x73)](async _0x2f562f=>{const _0x263314=_0x588c5c;try{if(_0x2f562f['isRunning']())return!![];const _0x5c148f=await _0x2f562f['start']();return _0x5c148f;}catch(_0x349876){return a22_0x3b8a64['error'](_0x263314(0x7b)+_0x2f562f[_0x263314(0x6b)]+':\x20'+_0x349876),![];}})),_0x263c73=_0x12ea75[_0x588c5c(0x8b)](_0x5d825a=>_0x5d825a)[_0x588c5c(0x88)];_0x263c73>0x0&&a22_0x3b8a64['success']('[Bot\x20Manager]\x20'+_0x263c73+'/'+_0x364159[_0x588c5c(0x88)]+'\x20services\x20active\x20in\x20background');}['stopAll'](){const _0x372b94=a22_0x5ee292;this[_0x372b94(0x6f)][_0x372b94(0x7d)](_0x3623a1=>{_0x3623a1['isRunning']()&&_0x3623a1['stop']();});}[a22_0x5ee292(0x83)](){const _0x5dfde6=a22_0x5ee292;return this['services'][_0x5dfde6(0x73)](_0x572194=>({'name':_0x572194[_0x5dfde6(0x6b)],'running':_0x572194[_0x5dfde6(0x74)](),'configured':_0x572194[_0x5dfde6(0x7f)]()}));}}export const botManager=new BotManager();function a22_0x82e6(){const _0x382945=['443272PxFJwz','21AGHuCJ','381yXmrQu','Telegram','Failed\x20to\x20start\x20','10mihizj','forEach','Discord','isConfigured','73016BjNaiE','5HPYJkt','push','getStatus','\x0a[Bot\x20Manager]\x20Starting\x20background\x20services...','123381aQbzkT','1201321iXYxCS','176MILRmE','length','all','431892gQpxmh','filter','name','dim','390300WtlShO','Email','services','12DjgKdU','startBot','startAllConfigured','map','isRunning','stopBot','isBotRunning'];a22_0x82e6=function(){return _0x382945;};return a22_0x82e6();}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function registerTelegramBot(bot: any, chatIds: number[]): void;
|
|
2
|
-
export declare function registerDiscordClient(client: any): void;
|
|
3
|
-
export declare function notifyTaskComplete(summary: string, actions: string[]): Promise<void>;
|
|
4
|
-
export declare function notifyMessage(text: string): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x4801eb,_0x7efb2e){const _0x5729c8=a23_0x3cd9,_0x15ffec=_0x4801eb();while(!![]){try{const _0x3702e4=-parseInt(_0x5729c8(0x106))/0x1*(parseInt(_0x5729c8(0x112))/0x2)+-parseInt(_0x5729c8(0x10e))/0x3*(parseInt(_0x5729c8(0x104))/0x4)+-parseInt(_0x5729c8(0x110))/0x5*(parseInt(_0x5729c8(0x111))/0x6)+parseInt(_0x5729c8(0x10b))/0x7*(-parseInt(_0x5729c8(0x101))/0x8)+parseInt(_0x5729c8(0xfe))/0x9*(parseInt(_0x5729c8(0x10f))/0xa)+parseInt(_0x5729c8(0x109))/0xb+parseInt(_0x5729c8(0x100))/0xc;if(_0x3702e4===_0x7efb2e)break;else _0x15ffec['push'](_0x15ffec['shift']());}catch(_0x6b458e){_0x15ffec['push'](_0x15ffec['shift']());}}}(a23_0x2048,0xf4235));function a23_0x2048(){const _0x475645=['Task\x20Complete\x0a\x0a','map','5501949ZDYrTk','110qukBib','28105SrXtkj','798Txozhq','4MWtCZx','send','length','type','join','122841WwfxGR','sendMessage','49071636OVMbHF','8TSoHYy','api','\x0a\x0aActions:\x0a','4pyFSTr','cache','574691frZYaO','size','filter','13621036zBRQeb','channels','5227397DtjROh'];a23_0x2048=function(){return _0x475645;};return a23_0x2048();}const targets=[];let telegramBot=null,discordClient=null,telegramChatIds=[];export function registerTelegramBot(_0x12fc41,_0x4d4e16){telegramBot=_0x12fc41,telegramChatIds=_0x4d4e16;}export function registerDiscordClient(_0x40a014){discordClient=_0x40a014;}export async function notifyTaskComplete(_0x46b14d,_0xa5b08){const _0x303421=a23_0x3cd9,_0xd4cf49=_0x303421(0x10c)+_0x46b14d+_0x303421(0x103)+_0xa5b08[_0x303421(0x10d)](_0x375632=>'-\x20'+_0x375632)[_0x303421(0xfd)]('\x0a');if(telegramBot&&telegramChatIds[_0x303421(0xfb)]>0x0)for(const _0x4933f8 of telegramChatIds){try{await telegramBot[_0x303421(0x102)][_0x303421(0xff)](_0x4933f8,_0xd4cf49);}catch{}}if(discordClient)try{const _0x36bfb5=discordClient[_0x303421(0x10a)]?.[_0x303421(0x105)]?.[_0x303421(0x108)](_0x254ea3=>_0x254ea3[_0x303421(0xfc)]===0x1);if(_0x36bfb5?.[_0x303421(0x107)]>0x0){const _0x8f8aed=_0x36bfb5['first']();await _0x8f8aed?.[_0x303421(0xfa)](_0xd4cf49);}}catch{}}function a23_0x3cd9(_0x280866,_0x5bc19b){_0x280866=_0x280866-0xfa;const _0x2048a7=a23_0x2048();let _0x3cd931=_0x2048a7[_0x280866];return _0x3cd931;}export async function notifyMessage(_0x38d6d6){const _0xc892ea=a23_0x3cd9;if(telegramBot&&telegramChatIds['length']>0x0)for(const _0x4230ff of telegramChatIds){try{await telegramBot[_0xc892ea(0x102)][_0xc892ea(0xff)](_0x4230ff,_0x38d6d6);}catch{}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x316fb2,_0x160fa9){const _0x541b90=a24_0x5ae7,_0x5bcf6c=_0x316fb2();while(!![]){try{const _0x2765f7=parseInt(_0x541b90(0x1c6))/0x1+parseInt(_0x541b90(0x1b9))/0x2*(-parseInt(_0x541b90(0x1c8))/0x3)+parseInt(_0x541b90(0x1bd))/0x4+parseInt(_0x541b90(0x1c2))/0x5+parseInt(_0x541b90(0x1ca))/0x6*(-parseInt(_0x541b90(0x1bb))/0x7)+parseInt(_0x541b90(0x1c4))/0x8+-parseInt(_0x541b90(0x1c5))/0x9*(-parseInt(_0x541b90(0x1c3))/0xa);if(_0x2765f7===_0x160fa9)break;else _0x5bcf6c['push'](_0x5bcf6c['shift']());}catch(_0x3fc973){_0x5bcf6c['push'](_0x5bcf6c['shift']());}}}(a24_0x380f,0x2b219));import{GoogleGenerativeAI}from'@google/generative-ai';import{promises as a24_0x151484}from'fs';import*as a24_0x5149d0 from'../ui/output.js';import a24_0x2530c6 from'conf';const config=new a24_0x2530c6({'projectName':'woozlit-cli-voice'});function a24_0x5ae7(_0x669832,_0x2e236c){_0x669832=_0x669832-0x1b5;const _0x380f6c=a24_0x380f();let _0x5ae79b=_0x380f6c[_0x669832];return _0x5ae79b;}export function setGeminiKey(_0x2fa277){const _0x3ae98d=a24_0x5ae7;config[_0x3ae98d(0x1c7)](_0x3ae98d(0x1b8),_0x2fa277);}function a24_0x380f(){const _0x451b85=['get','message','response','gemini-2.0-flash-exp','error','geminiKey','768zGKQtT','readFile','14eleXBp','getGenerativeModel','389736URsGlW','audio/ogg','Gemini\x20API\x20Key\x20not\x20configured.\x20Run\x20\x27/voice\x20setup\x27\x20first.','text','Voice\x20processing\x20failed:\x20','170600dYJOoZ','2226710ASukpV','364064Rvppww','9mcZRdF','38294mqebLq','set','1920rlYRHp','Listen\x20to\x20this\x20audio\x20and\x20respond\x20helpfully.\x20If\x20it\x27s\x20a\x20command,\x20execute\x20it\x20or\x20say\x20you\x20can\x27t.','46806WkkxHx'];a24_0x380f=function(){return _0x451b85;};return a24_0x380f();}export function getGeminiKey(){const _0x10c123=a24_0x5ae7;return config[_0x10c123(0x1cb)](_0x10c123(0x1b8))||'';}export async function processVoiceMessage(_0x3cc8fe){const _0x538e86=a24_0x5ae7,_0x2e905a=getGeminiKey();if(!_0x2e905a)throw new Error(_0x538e86(0x1bf));const _0x4a9aed=new GoogleGenerativeAI(_0x2e905a),_0x55bf78=_0x4a9aed[_0x538e86(0x1bc)]({'model':_0x538e86(0x1b6)});try{const _0x1ad1c2=await a24_0x151484[_0x538e86(0x1ba)](_0x3cc8fe),_0x2ca948=_0x1ad1c2['toString']('base64'),_0x274709=_0x538e86(0x1be),_0x1c1b9d=await _0x55bf78['generateContent']([_0x538e86(0x1c9),{'inlineData':{'mimeType':_0x274709,'data':_0x2ca948}}]),_0xd91261=_0x1c1b9d[_0x538e86(0x1b5)][_0x538e86(0x1c0)]();return{'text':_0xd91261};}catch(_0x491eb2){a24_0x5149d0[_0x538e86(0x1b7)](_0x538e86(0x1c1)+_0x491eb2[_0x538e86(0x1cc)]);throw _0x491eb2;}}
|
package/dist/telegram/bot.d.ts
DELETED
package/dist/telegram/bot.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a25_0x1de38d=a25_0x449b;(function(_0x55a7b9,_0x490047){const _0x40c3e9=a25_0x449b,_0x1ca5ed=_0x55a7b9();while(!![]){try{const _0x413b42=parseInt(_0x40c3e9(0x241))/0x1*(parseInt(_0x40c3e9(0x233))/0x2)+parseInt(_0x40c3e9(0x228))/0x3*(-parseInt(_0x40c3e9(0x1d8))/0x4)+-parseInt(_0x40c3e9(0x24a))/0x5+-parseInt(_0x40c3e9(0x202))/0x6*(-parseInt(_0x40c3e9(0x264))/0x7)+-parseInt(_0x40c3e9(0x267))/0x8+parseInt(_0x40c3e9(0x192))/0x9+parseInt(_0x40c3e9(0x170))/0xa;if(_0x413b42===_0x490047)break;else _0x1ca5ed['push'](_0x1ca5ed['shift']());}catch(_0xbb7f48){_0x1ca5ed['push'](_0x1ca5ed['shift']());}}}(a25_0x26c9,0x99b03));import{Bot,InputFile}from'grammy';import{promises as a25_0x32bb31}from'fs';import{tmpdir}from'os';import{join,resolve,basename}from'path';import*as a25_0x161d0b from'./config.js';import{checkReminders,scheduleReminder}from'./reminders.js';function a25_0x26c9(){const _0xf3d3e6=['getBotToken','sendChatAction','~2-3\x20min','pid','body','env','[Telegram]\x20Starting\x20tool\x20','length','push','No\x20output','actionSummary',':\x0a\x0a','search_directory','.\x20Try\x20again\x20or\x20skip.','-\x20Request:\x20\x22','branch','Bot\x20start\x20failed:\x20','mkdir','command','sendMessage','api','../tools/file.js','send_input','entries','file_path','directory','powershell_run','toFixed','history.json','sendDocument','readFile','\x0a\x0aRECENT\x20TASK\x20HISTORY\x20(Use\x20this\x20context):\x0a','13017TZFpVw','then','npm\x20install','url','delete_file','reply','Telegram\x20bot\x20started!','clipboard_write','\x0a\x0aCommands:\x0a/newchat\x20-\x20New\x20session\x0a/clear\x20-\x20Reset\x20history\x0a/status\x20-\x20System\x20info\x0a/screen\x20-\x20Screenshot\x0a/run\x20<cmd>\x20-\x20Execute\x20command\x0a/files\x20[path]\x20-\x20Browse\x20files\x0a/project\x20-\x20Project\x20overview\x0a/cd\x20<path>\x20-\x20Change\x20directory\x0a/kill\x20-\x20Stop\x20process','git_add','download_file','292022VDLPmM','copy_file','\x20(Voice):\x20','/screenshot','resize','/project','get','HOME','Taking\x20screenshot...','Failed\x20to\x20send\x20file:\x20','Failed:\x20','editMessageText','search','package.json','2drZAKh','fetch_url','unknown','search_file','clear','deleteWebhook','fromBranch','rename_file','tree','5679655FUfpGt','document','typing','\x0aProject:\x20','Executing\x20','title','edit_file','depth','assistant','getScreenSize','/clear','run_command','content','list_directory','Browser\x20Screenshot','PIN\x20required','args','~2s','path','data','start','unlink','image','browser_fill','extensions','[Voice\x20Message]:\x20','112SqDTmP','slice','read_terminal','4839752bWuZNj','delayMinutes','[D]','selector','17953910tXArQU','voice_','../browser/index.js','output','files','upload_photo','\x0aTree:\x0a','replyWithChatAction','branchName','stringify','archive.zip','now','stderr','toLowerCase','text','upload_','/cd\x20','create_file','~1s','size','PARSED\x20TOOL:\x20','create-vite','Screenshot\x20failed:\x20','/newchat','...','owner','stop','getBuffer','[Telegram]\x20','patches','clipboard_read','~1-2\x20min','.jpeg','/kill','2372445rBGytW','toolSuccess','Editing\x20file:\x20','Desktop','\x20->\x20','Telegram\x20startup\x20error:\x20','width','Sorry,\x20I\x20couldn\x27t\x20understand\x20that\x20audio.','input','arrayBuffer','isAllowedChatId','cwd','open_in_editor','repo','write_json','version','No\x20Telegram\x20bot\x20token.\x20Run\x20/telegram\x20setup\x20first.','capture','Unknown\x20tool:\x20','\x22\x0a\x20\x20Actions:\x20','git_branch','github_read_file','dim','file_info','info','.woozlit','\x0a\x0aTask\x20Summary:\x0a','name','join','Done\x20in\x20','[F]','TOOL\x20JSON:\x20','file_id','terminate','npm\x20init','browser_close','\x20User\x20says:\x20','split','unzip_files','/run\x20','Tool\x20error:\x20','height','pattern','success','addAllowedChatId','utf-8','Invalid\x20bot\x20token.','message','replace_in_files','401','system','sendPhoto','read_file_lines','browser_screenshot','getAllowedChatIds','type','user','screenshot_','Creating\x20file:\x20','delete','startsWith','set_env','filter','stdout','browser_open','github_create_pr','Dir:\x20','has','Voice\x20processing\x20error:\x20','Exit:\x20','836aeNFvu','git\x20clone','../github/api.js','message:text','git_commit','substring','[Telegram]\x20Tool\x20error:\x20','git_log','bitmap','voice','catch','robotjs\x20not\x20available\x20to\x20capture\x20photo','pids','message\x20is\x20not\x20modified','file_name','\x20bytes)\x20saved\x20to\x20','shift','count','read_file','[Telegram]\x20File\x20received:\x20','match','schedule_reminder','create-next-app','trim','getFile','Error','add','first_name','error','set','replace','writeFile','File\x20save\x20failed:\x20','https://api.telegram.org/file/bot','Telegram\x20bot\x20already\x20running.','from','chat','replyWithPhoto','includes','parse','Tool\x20result\x20for\x20','build','347340SxEFxd','Usage:\x20/run\x20<command>','map','read_json','\x0aModel:\x20','values'];a25_0x26c9=function(){return _0xf3d3e6;};return a25_0x26c9();}import{sendChatMessage}from'../utils/api.js';import{getSelectedModel}from'../utils/storage.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,readTerminalOutput,sendTerminalInput,terminateProcess,deleteFile,renameFile,copyFile,fileInfo,readFileLines}from'../tools/index.js';import{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'../tools/git.js';import{fetchUrl,downloadFile as a25_0x4faced}from'../tools/network.js';import{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'../tools/system.js';import{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'../tools/project.js';import{registerTelegramBot}from'../services/notifications.js';import{processVoiceMessage}from'../services/voice-agent.js';import*as a25_0xbdcdf2 from'../ui/output.js';import{createRequire}from'module';import{Jimp}from'jimp';function a25_0x449b(_0x5df491,_0x1b9703){_0x5df491=_0x5df491-0x170;const _0x26c914=a25_0x26c9();let _0x449bb6=_0x26c914[_0x5df491];return _0x449bb6;}const require=createRequire(import.meta.url);let bot=null,isRunning=![];const verifiedSessions=new Set(),statusMessages=new Map(),chatHistories=new Map(),WOOZLIT_DIR=join(process[a25_0x1de38d(0x20d)]['USERPROFILE']||process['env'][a25_0x1de38d(0x23a)]||'.',a25_0x1de38d(0x1ab)),HISTORY_FILE=join(WOOZLIT_DIR,a25_0x1de38d(0x224));async function ensureWoozlitDir(){const _0x35abf1=a25_0x1de38d;try{await a25_0x32bb31[_0x35abf1(0x219)](WOOZLIT_DIR,{'recursive':!![]});}catch{}}async function getTaskHistory(){const _0x4645ff=a25_0x1de38d;try{const _0x1b8693=await a25_0x32bb31[_0x4645ff(0x226)](HISTORY_FILE,_0x4645ff(0x1bf));return JSON['parse'](_0x1b8693);}catch{return[];}}async function saveTaskHistory(_0x193081,_0xd8a256){const _0x556603=a25_0x1de38d;await ensureWoozlitDir();const _0x22987a=await getTaskHistory();_0x22987a['push']({'timestamp':Date[_0x556603(0x17b)](),'request':_0x193081,'actionSummary':_0xd8a256});if(_0x22987a[_0x556603(0x20f)]>0x14)_0x22987a[_0x556603(0x1e8)]();await a25_0x32bb31[_0x556603(0x1f7)](HISTORY_FILE,JSON['stringify'](_0x22987a,null,0x2));}function formatHistoryForPrompt(_0xf3ebed){const _0x3f5f8d=a25_0x1de38d;if(_0xf3ebed[_0x3f5f8d(0x20f)]===0x0)return'';return _0x3f5f8d(0x227)+_0xf3ebed[_0x3f5f8d(0x265)](-0x5)['map'](_0x20322=>_0x3f5f8d(0x216)+_0x20322['request']+_0x3f5f8d(0x1a5)+_0x20322[_0x3f5f8d(0x212)][_0x3f5f8d(0x1ae)](',\x20'))[_0x3f5f8d(0x1ae)]('\x0a');}function getSystemPrompt(_0x518279){return'You\x20are\x20Woozlit\x20AI.\x20Complete\x20tasks\x20autonomously.\x0a\x0aCRITICAL\x20RULES:\x0a1.\x20**EXECUTE\x20IMMEDIATELY**:\x20When\x20user\x20requests\x20an\x20action,\x20execute\x20the\x20tool\x20FIRST,\x20explain\x20NEVER.\x0a2.\x20**NO\x20EMOJIS**:\x20Never\x20use\x20emojis\x20in\x20any\x20response.\x0a3.\x20**NO\x20CONVERSATIONAL\x20ERRORS**:\x20If\x20a\x20browser\x20command\x20cannot\x20be\x20executed,\x20just\x20execute\x20it\x20anyway.\x20Never\x20explain\x20limitations.\x0a4.\x20**CONCISE**:\x20Maximum\x201-2\x20sentences\x20for\x20final\x20responses.\x20No\x20filler.\x0a5.\x20**TOOL\x20FORMAT**:\x20Use\x20THREE\x20backticks\x20(```)\x20NOT\x20asterisks\x20(***)\x20for\x20tool\x20blocks.\x0a\x0aTOOLS:\x0a-\x20run_command:\x20{command,\x20wait\x20(ms,\x20default\x2030000),\x20background\x20(bool)}\x0a-\x20read_terminal:\x20{}\x20-\x20check\x20running\x20process\x20output\x0a-\x20send_input:\x20{input}\x20-\x20answer\x20prompts\x0a-\x20terminate:\x20{}\x20-\x20kill\x20stuck\x20process\x0a-\x20create_file:\x20{path,\x20content}\x0a-\x20read_file:\x20{path}\x0a-\x20list_directory:\x20{path}\x0a-\x20edit_file:\x20{path,\x20search,\x20replace}\x0a-\x20delete_file:\x20{path}\x0a-\x20rename_file:\x20{from,\x20to}\x0a-\x20copy_file:\x20{from,\x20to}\x0a-\x20file_info:\x20{path}\x0a-\x20read_file_lines:\x20{path,\x20start,\x20end}\x0a-\x20find_files:\x20{path,\x20pattern}\x0a-\x20search_directory:\x20{path,\x20pattern}\x0a-\x20screenshot:\x20{}\x20-\x20capture\x20desktop\x0a-\x20send_file:\x20{path}\x20-\x20send\x20a\x20file\x20to\x20the\x20user\x20via\x20Telegram\x0a-\x20schedule_reminder:\x20{delayMinutes:\x20number,\x20message:\x20string}\x0a-\x20git_status:\x20{}\x0a-\x20git_diff:\x20{path?}\x0a-\x20git_log:\x20{count?}\x0a-\x20git_add:\x20{path}\x0a-\x20git_commit:\x20{message}\x0a-\x20git_branch:\x20{}\x0a-\x20fetch_url:\x20{url}\x0a-\x20download_file:\x20{url,\x20path}\x0a-\x20get_env:\x20{name}\x0a-\x20set_env:\x20{name,\x20value}\x0a-\x20get_system_info:\x20{}\x0a-\x20clipboard_read:\x20{}\x0a-\x20clipboard_write:\x20{text}\x0a-\x20tree:\x20{path?,\x20depth?}\x0a-\x20grep_recursive:\x20{path?,\x20pattern,\x20extensions?}\x0a-\x20replace_in_files:\x20{path?,\x20search,\x20replace,\x20extensions?}\x0a-\x20powershell_run:\x20{script}\x0a-\x20zip_files:\x20{files,\x20output}\x0a-\x20unzip_files:\x20{path,\x20output}\x0a-\x20write_json:\x20{path,\x20data}\x0a-\x20read_json:\x20{path}\x0a-\x20patch_file:\x20{path,\x20patches:\x20[{search,\x20replace}]}\x0a-\x20open_in_editor:\x20{path}\x0a-\x20github_read_file:\x20{owner,\x20repo,\x20path,\x20branch}\x0a-\x20github_create_branch:\x20{owner,\x20repo,\x20branchName,\x20fromBranch}\x0a-\x20github_create_pr:\x20{owner,\x20repo,\x20title,\x20head,\x20base,\x20body}\x0a-\x20browser_open:\x20{url}\x0a-\x20browser_click:\x20{selector}\x0a-\x20browser_fill:\x20{selector,\x20value}\x0a-\x20browser_screenshot:\x20{}\x0a-\x20browser_snapshot:\x20{}\x0a\x0aBROWSER\x20COMMANDS\x20-\x20EXECUTE\x20IMMEDIATELY:\x0aWhen\x20user\x20says\x20\x22open\x20[site]\x22,\x20\x22go\x20to\x20[url]\x22,\x20\x22navigate\x20to\x20[url]\x22:\x0a```tool\x0a{\x22name\x22:\x22browser_open\x22,\x22args\x22:{\x22url\x22:\x22https://example.com\x22}}\x0a```\x0a\x0aDO\x20NOT\x20respond\x20with:\x0a-\x20\x22I\x20understand\x20you\x27d\x20like\x20me\x20to...\x22\x0a-\x20\x22I\x20need\x20the\x20extension\x20to\x20be\x20connected...\x22\x0a-\x20\x22Apologies\x20for\x20the\x20inconvenience\x22\x0a-\x20Any\x20explanation\x20about\x20what\x20you\x27re\x20about\x20to\x20do\x0a\x0aJUST\x20EXECUTE\x20THE\x20TOOL.\x0a\x0aEXAMPLE:\x0aUser:\x20\x22open\x20discord\x22\x0aYou:\x0a```tool\x0a{\x22name\x22:\x22browser_open\x22,\x22args\x22:{\x22url\x22:\x22https://discord.com\x22}}\x0a```'+_0x518279;}async function getOrCreateHistory(_0x4ade5d){const _0x53d85b=a25_0x1de38d;if(!chatHistories[_0x53d85b(0x1d5)](_0x4ade5d)){const _0x22747b='';chatHistories[_0x53d85b(0x1f5)](_0x4ade5d,[{'role':_0x53d85b(0x1c4),'content':getSystemPrompt(_0x22747b)}]);}return chatHistories['get'](_0x4ade5d);}async function updateStatus(_0x3f9cd0,_0x5ca718){const _0x15c468=a25_0x1de38d;if(!bot)return;const _0x48b932=statusMessages[_0x15c468(0x239)](_0x3f9cd0);if(_0x48b932)try{await bot[_0x15c468(0x21c)][_0x15c468(0x23e)](_0x3f9cd0,_0x48b932,_0x5ca718);return;}catch(_0x93663){if(_0x93663[_0x15c468(0x1c1)]&&_0x93663[_0x15c468(0x1c1)][_0x15c468(0x1fe)](_0x15c468(0x1e5)))return;statusMessages['delete'](_0x3f9cd0);}try{const _0x60fe3=await bot[_0x15c468(0x21c)][_0x15c468(0x21b)](_0x3f9cd0,_0x5ca718);statusMessages[_0x15c468(0x1f5)](_0x3f9cd0,_0x60fe3['message_id']);}catch(_0x3890f4){}}async function takeScreenshot(){const _0x1cae4b=a25_0x1de38d,_0x4b6b39=_0x1cae4b(0x1cb)+Date[_0x1cae4b(0x17b)]()+_0x1cae4b(0x190),_0x215c15=join(tmpdir(),_0x4b6b39);let _0x24b39e;try{_0x24b39e=require('@hurdlegroup/robotjs');const _0x2facf7=_0x24b39e[_0x1cae4b(0x253)](),_0x24500a=_0x24b39e['screen'][_0x1cae4b(0x1a3)](0x0,0x0,_0x2facf7[_0x1cae4b(0x198)],_0x2facf7[_0x1cae4b(0x1bb)]),_0x583170=new Jimp({'width':_0x24500a[_0x1cae4b(0x198)],'height':_0x24500a['height']});for(let _0xe082a9=0x0;_0xe082a9<_0x24500a[_0x1cae4b(0x260)][_0x1cae4b(0x20f)];_0xe082a9+=0x4){_0x583170['bitmap'][_0x1cae4b(0x25d)][_0xe082a9]=_0x24500a[_0x1cae4b(0x260)][_0xe082a9+0x2],_0x583170[_0x1cae4b(0x1e0)][_0x1cae4b(0x25d)][_0xe082a9+0x1]=_0x24500a[_0x1cae4b(0x260)][_0xe082a9+0x1],_0x583170['bitmap']['data'][_0xe082a9+0x2]=_0x24500a['image'][_0xe082a9],_0x583170[_0x1cae4b(0x1e0)]['data'][_0xe082a9+0x3]=_0x24500a[_0x1cae4b(0x260)][_0xe082a9+0x3];}_0x583170[_0x1cae4b(0x1e0)][_0x1cae4b(0x198)]>0x500&&_0x583170[_0x1cae4b(0x237)]({'w':0x500});const _0x141e1a=await _0x583170[_0x1cae4b(0x18b)]('image/jpeg');await a25_0x32bb31[_0x1cae4b(0x1f7)](_0x215c15,_0x141e1a);}catch(_0x168e61){throw new Error(_0x1cae4b(0x1e3));}return _0x215c15;}async function executeToolCall(_0x22d366,_0x30f630,_0x193592){const _0x3bb01f=a25_0x1de38d;switch(_0x22d366){case'screenshot':try{statusMessages[_0x3bb01f(0x1cd)](_0x193592);const _0x2d6c86=await takeScreenshot();return await bot?.['api'][_0x3bb01f(0x1c5)](_0x193592,new InputFile(_0x2d6c86),{'caption':_0x3bb01f(0x195)}),await a25_0x32bb31[_0x3bb01f(0x25f)](_0x2d6c86)[_0x3bb01f(0x1e2)](()=>{}),{'success':!![],'sent':!![]};}catch(_0x28e496){return{'error':_0x3bb01f(0x186)+_0x28e496};}case'read_terminal':return readTerminalOutput(_0x30f630[_0x3bb01f(0x20b)]);case _0x3bb01f(0x21e):return sendTerminalInput(_0x30f630[_0x3bb01f(0x19a)],_0x30f630[_0x3bb01f(0x20b)]);case _0x3bb01f(0x1b3):return terminateProcess(_0x30f630[_0x3bb01f(0x20b)]);case _0x3bb01f(0x181):return createFile(_0x30f630['path'],_0x30f630[_0x3bb01f(0x256)]);case _0x3bb01f(0x1ea):return readFile(_0x30f630['path']);case _0x3bb01f(0x257):return listDirectory(_0x30f630[_0x3bb01f(0x25c)]||'.');case _0x3bb01f(0x250):return editFile(_0x30f630[_0x3bb01f(0x25c)],_0x30f630['search'],_0x30f630[_0x3bb01f(0x1f6)]);case _0x3bb01f(0x244):return searchFile(_0x30f630['path'],_0x30f630['pattern']);case _0x3bb01f(0x255):const {command:_0x569550,background:_0x4c9377,wait:_0x236c24}=_0x30f630,_0x4ac0b2=await runCommand(_0x569550,undefined,_0x4c9377||![],_0x236c24||0x7530);return _0x4ac0b2;case _0x3bb01f(0x1ed):return scheduleReminder(_0x193592,_0x30f630[_0x3bb01f(0x268)],_0x30f630[_0x3bb01f(0x1c1)]);case _0x3bb01f(0x1a7):{const {readFile:_0x3d1d48}=await import(_0x3bb01f(0x1da));return _0x3d1d48(_0x30f630[_0x3bb01f(0x189)],_0x30f630[_0x3bb01f(0x19f)],_0x30f630[_0x3bb01f(0x25c)],_0x30f630[_0x3bb01f(0x217)]);}case'github_create_branch':{const {createBranch:_0x38f81c}=await import(_0x3bb01f(0x1da));return _0x38f81c(_0x30f630['owner'],_0x30f630[_0x3bb01f(0x19f)],_0x30f630[_0x3bb01f(0x178)],_0x30f630[_0x3bb01f(0x247)]);}case _0x3bb01f(0x1d3):{const {createPullRequest:_0xf9a6a1}=await import(_0x3bb01f(0x1da));return _0xf9a6a1(_0x30f630['owner'],_0x30f630[_0x3bb01f(0x19f)],_0x30f630[_0x3bb01f(0x24f)],_0x30f630['head'],_0x30f630['base'],_0x30f630[_0x3bb01f(0x20c)]);}case _0x3bb01f(0x1d2):{const {browserOpen:_0x114683,startBrowserServer:_0x2b23e9,isBrowserServerRunning:_0x28c47b}=await import(_0x3bb01f(0x172));return!_0x28c47b()&&await _0x2b23e9(),_0x114683(_0x30f630[_0x3bb01f(0x22b)]);}case'browser_click':{const {browserClick:_0x102774}=await import(_0x3bb01f(0x172));return _0x102774(_0x30f630[_0x3bb01f(0x26a)]);}case _0x3bb01f(0x261):{const {browserFill:_0x375671}=await import('../browser/index.js');return _0x375671(_0x30f630[_0x3bb01f(0x26a)],_0x30f630['value']);}case'browser_snapshot':{const {browserSnapshot:_0x482bf9}=await import(_0x3bb01f(0x172));return _0x482bf9();}case _0x3bb01f(0x1c7):{const {browserScreenshot:_0x43b29e}=await import(_0x3bb01f(0x172)),_0x2a1a91=await _0x43b29e();if(_0x2a1a91[_0x3bb01f(0x1bd)]&&_0x2a1a91['data']){const _0x1fd212=_0x2a1a91[_0x3bb01f(0x25d)][_0x3bb01f(0x1f6)](/^data:image\/\w+;base64,/,''),_0x3c09d4=Buffer[_0x3bb01f(0x1fb)](_0x1fd212,'base64');return statusMessages[_0x3bb01f(0x1cd)](_0x193592),await bot?.[_0x3bb01f(0x21c)]['sendPhoto'](_0x193592,new InputFile(_0x3c09d4),{'caption':_0x3bb01f(0x258)}),{'success':!![],'sent':!![]};}return _0x2a1a91;}case _0x3bb01f(0x1b5):{const {browserClose:_0x42cc0d}=await import(_0x3bb01f(0x172));return _0x42cc0d();}case'send_file':{try{const _0x124d9f=resolve(process[_0x3bb01f(0x19d)](),_0x30f630[_0x3bb01f(0x25c)]);return statusMessages[_0x3bb01f(0x1cd)](_0x193592),await bot?.[_0x3bb01f(0x21c)][_0x3bb01f(0x225)](_0x193592,new InputFile(_0x124d9f),{'caption':basename(_0x124d9f)}),{'success':!![],'sent':!![]};}catch(_0xa3a9e1){return{'error':_0x3bb01f(0x23c)+_0xa3a9e1};}}case _0x3bb01f(0x22c):return deleteFile(_0x30f630[_0x3bb01f(0x25c)]);case _0x3bb01f(0x248):return renameFile(_0x30f630[_0x3bb01f(0x1fb)]||_0x30f630[_0x3bb01f(0x25c)],_0x30f630['to']);case _0x3bb01f(0x234):return copyFile(_0x30f630[_0x3bb01f(0x1fb)]||_0x30f630[_0x3bb01f(0x25c)],_0x30f630['to']);case _0x3bb01f(0x1a9):return fileInfo(_0x30f630[_0x3bb01f(0x25c)]);case _0x3bb01f(0x1c6):return readFileLines(_0x30f630[_0x3bb01f(0x25c)],_0x30f630[_0x3bb01f(0x25e)]||0x1,_0x30f630['end']||0x32);case'find_files':{const {findFiles:_0x505cbf}=await import(_0x3bb01f(0x21d));return _0x505cbf(_0x30f630[_0x3bb01f(0x25c)]||'.',_0x30f630[_0x3bb01f(0x1bc)]);}case _0x3bb01f(0x214):{const {searchDirectory:_0x23d473}=await import(_0x3bb01f(0x21d));return _0x23d473(_0x30f630[_0x3bb01f(0x25c)]||'.',_0x30f630['pattern']);}case'git_status':return gitStatus();case'git_diff':return gitDiff(_0x30f630[_0x3bb01f(0x25c)]);case _0x3bb01f(0x1df):return gitLog(_0x30f630[_0x3bb01f(0x1e9)]||0xa);case _0x3bb01f(0x231):return gitAdd(_0x30f630['path']||'.');case _0x3bb01f(0x1dc):return gitCommit(_0x30f630[_0x3bb01f(0x1c1)]);case _0x3bb01f(0x1a6):return gitBranch();case _0x3bb01f(0x242):return fetchUrl(_0x30f630[_0x3bb01f(0x22b)]);case _0x3bb01f(0x232):return a25_0x4faced(_0x30f630['url'],_0x30f630[_0x3bb01f(0x25c)]);case'get_env':return getEnv(_0x30f630[_0x3bb01f(0x1ad)]);case _0x3bb01f(0x1cf):return setEnv(_0x30f630[_0x3bb01f(0x1ad)],_0x30f630['value']);case'get_system_info':return getSystemInfo();case _0x3bb01f(0x18e):return clipboardRead();case _0x3bb01f(0x22f):return clipboardWrite(_0x30f630[_0x3bb01f(0x17e)]);case _0x3bb01f(0x249):return tree(_0x30f630[_0x3bb01f(0x25c)]||'.',_0x30f630[_0x3bb01f(0x251)]||0x3);case'grep_recursive':return grepRecursive(_0x30f630[_0x3bb01f(0x25c)]||'.',_0x30f630[_0x3bb01f(0x1bc)],_0x30f630[_0x3bb01f(0x262)]);case _0x3bb01f(0x1c2):return replaceInFiles(_0x30f630['path']||'.',_0x30f630[_0x3bb01f(0x23f)],_0x30f630[_0x3bb01f(0x1f6)],_0x30f630[_0x3bb01f(0x262)]);case _0x3bb01f(0x222):return powershellRun(_0x30f630['script']||_0x30f630[_0x3bb01f(0x21a)]);case'zip_files':return zipFiles(_0x30f630[_0x3bb01f(0x174)]||[_0x30f630[_0x3bb01f(0x25c)]],_0x30f630[_0x3bb01f(0x173)]||_0x3bb01f(0x17a));case _0x3bb01f(0x1b8):return unzipFiles(_0x30f630['path'],_0x30f630['output']||'.');case _0x3bb01f(0x1a0):return writeJson(_0x30f630[_0x3bb01f(0x25c)],_0x30f630[_0x3bb01f(0x25d)]);case _0x3bb01f(0x205):return readJson(_0x30f630[_0x3bb01f(0x25c)]);case'patch_file':return patchFile(_0x30f630[_0x3bb01f(0x25c)],_0x30f630[_0x3bb01f(0x18d)]);case _0x3bb01f(0x19e):return openInEditor(_0x30f630[_0x3bb01f(0x25c)]);default:return{'error':_0x3bb01f(0x1a4)+_0x22d366};}}function estimateTime(_0x244c84,_0x3d549f){const _0x4129ee=a25_0x1de38d;if(_0x244c84==='screenshot')return _0x4129ee(0x25b);if(_0x244c84===_0x4129ee(0x266)||_0x244c84===_0x4129ee(0x21e)||_0x244c84==='terminate')return _0x4129ee(0x182);if(_0x244c84==='run_command'){const _0x548652=(_0x3d549f['command']||'')[_0x4129ee(0x17d)]();if(_0x548652[_0x4129ee(0x1fe)](_0x4129ee(0x1ee))||_0x548652['includes'](_0x4129ee(0x185)))return _0x4129ee(0x20a);if(_0x548652[_0x4129ee(0x1fe)](_0x4129ee(0x22a))||_0x548652[_0x4129ee(0x1fe)]('pnpm\x20install'))return _0x4129ee(0x18f);if(_0x548652['includes'](_0x4129ee(0x1b4))||_0x548652['includes']('pnpm\x20init'))return'~30s';if(_0x548652[_0x4129ee(0x1fe)](_0x4129ee(0x1d9)))return'~1\x20min';if(_0x548652[_0x4129ee(0x1fe)](_0x4129ee(0x201)))return _0x4129ee(0x18f);}return _0x4129ee(0x25b);}function getActionDescription(_0xfaf6bc,_0x24882c){const _0x3c097f=a25_0x1de38d;if(_0xfaf6bc===_0x3c097f(0x255)){let _0x3b1714=_0x24882c[_0x3c097f(0x21a)]||_0x3c097f(0x21a);if(_0x3b1714[_0x3c097f(0x20f)]>0x1e)_0x3b1714=_0x3b1714[_0x3c097f(0x1dd)](0x0,0x1b)+_0x3c097f(0x188);return'Running:\x20'+_0x3b1714;}if(_0xfaf6bc===_0x3c097f(0x181))return _0x3c097f(0x1cc)+_0x24882c[_0x3c097f(0x25c)];if(_0xfaf6bc===_0x3c097f(0x250))return _0x3c097f(0x194)+_0x24882c[_0x3c097f(0x25c)];if(_0xfaf6bc==='screenshot')return _0x3c097f(0x23b);return _0x3c097f(0x24e)+_0xfaf6bc+_0x3c097f(0x188);}async function processTelegramAgentLoop(_0x3e2049,_0x41db4a,_0x228b7e,_0x14dbf4){const _0x36fe57=a25_0x1de38d;let _0x1bf96b=0x0;const _0x57205b=0x14;let _0x502fd7=![];const _0x18d4a8=[];while(_0x1bf96b<_0x57205b){_0x1bf96b++;bot&&bot['api'][_0x36fe57(0x209)](_0x3e2049,'typing')[_0x36fe57(0x1e2)](()=>{});a25_0xbdcdf2[_0x36fe57(0x1a8)]('[Telegram]\x20Iteration\x20'+_0x1bf96b+_0x36fe57(0x188));let _0x5c9588='';try{const _0x17f5a4=await sendChatMessage(_0x228b7e,_0x41db4a,_0x31ba27=>{_0x5c9588+=_0x31ba27;});_0x5c9588=_0x17f5a4[_0x36fe57(0x256)];}catch(_0x1801f3){await bot?.[_0x36fe57(0x21c)][_0x36fe57(0x21b)](_0x3e2049,_0x36fe57(0x23d)+(_0x1801f3[_0x36fe57(0x1c1)]?.[_0x36fe57(0x1dd)](0x0,0x1e)||_0x36fe57(0x1f1)));return;}_0x41db4a[_0x36fe57(0x210)]({'role':_0x36fe57(0x252),'content':_0x5c9588});let _0x9e562=_0x5c9588[_0x36fe57(0x1ec)](/```tool\s*([\s\S]*?)```/);!_0x9e562&&(_0x9e562=_0x5c9588['match'](/\*\*\*tool\s*([\s\S]*?)\*\*\*/));!_0x9e562&&(_0x9e562=_0x5c9588[_0x36fe57(0x1ec)](/\`\`\`json\s*({[\s\S]*?"name"[\s\S]*?})\s*\`\`\`/));if(!_0x9e562){let _0x46ff5a=_0x5c9588['replace'](/\<reasoning\>[\s\S]*?\<\/reasoning\>/g,'')['replace'](/\<text\>|\<\/text\>/g,'')[_0x36fe57(0x1f6)](/```tool[\s\S]*?```/g,'')[_0x36fe57(0x1f6)](/\*\*\*tool[\s\S]*?\*\*\*/g,'')[_0x36fe57(0x1f6)](/```json\s*{\s*"tool"[\s\S]*?```/g,'')[_0x36fe57(0x1f6)](/```json\s*{\s*"command"[\s\S]*?```/g,'')[_0x36fe57(0x1f6)](/\*\*(.+?)\*\*/g,'$1')[_0x36fe57(0x1f6)](/\*(.+?)\*/g,'$1')[_0x36fe57(0x1f6)](/__(.+?)__/g,'$1')['replace'](/_(.+?)_/g,'$1')[_0x36fe57(0x1f6)](/#{1,6}\s*/g,'')[_0x36fe57(0x1f6)](/^[-*+]\s+/gm,'')[_0x36fe57(0x1f6)](/^\d+\.\s+/gm,'')[_0x36fe57(0x1f6)](/`([^`]+)`/g,'$1')['replace'](/\[([^\]]+)\]\([^)]+\)/g,'$1')['trim']();const _0x2d8b79=_0x46ff5a[_0x36fe57(0x1b7)]('\x0a')[_0x36fe57(0x1d0)](_0xfc5016=>_0xfc5016[_0x36fe57(0x1ef)]()&&_0xfc5016[_0x36fe57(0x1ef)]()['length']>0x1);if(_0x46ff5a[_0x36fe57(0x1ef)]()){if(_0x18d4a8[_0x36fe57(0x20f)]>0x0){await saveTaskHistory(_0x14dbf4,_0x18d4a8);const _0x14800a=_0x36fe57(0x1ac)+_0x18d4a8['map'](_0x877f38=>'-\x20'+_0x877f38)[_0x36fe57(0x1ae)]('\x0a');await bot?.[_0x36fe57(0x21c)][_0x36fe57(0x21b)](_0x3e2049,_0x46ff5a+_0x14800a)['catch'](()=>{});}else await bot?.[_0x36fe57(0x21c)][_0x36fe57(0x21b)](_0x3e2049,_0x46ff5a)[_0x36fe57(0x1e2)](()=>{});}break;}try{const _0x32dca7=_0x9e562[0x1][_0x36fe57(0x1ef)]();a25_0xbdcdf2[_0x36fe57(0x1a8)](_0x36fe57(0x1b1)+_0x32dca7);const _0x2ca96a=JSON[_0x36fe57(0x1ff)](_0x32dca7);a25_0xbdcdf2[_0x36fe57(0x1a8)](_0x36fe57(0x184)+JSON[_0x36fe57(0x179)](_0x2ca96a));const _0x2479a9=estimateTime(_0x2ca96a[_0x36fe57(0x1ad)],_0x2ca96a[_0x36fe57(0x25a)]),_0x1b9556=getActionDescription(_0x2ca96a[_0x36fe57(0x1ad)],_0x2ca96a[_0x36fe57(0x25a)]);_0x18d4a8[_0x36fe57(0x210)](_0x1b9556[_0x36fe57(0x1f6)](/\(\~.*\)/,'')['trim']()),await updateStatus(_0x3e2049,_0x1b9556+'\x20('+_0x2479a9+')'),_0x502fd7=!![],a25_0xbdcdf2[_0x36fe57(0x1aa)](_0x36fe57(0x20e)+_0x2ca96a[_0x36fe57(0x1ad)]);const _0x1b0026=performance['now'](),_0x77882f=await executeToolCall(_0x2ca96a[_0x36fe57(0x1ad)],_0x2ca96a[_0x36fe57(0x25a)],_0x3e2049),_0x2d47b8=((performance[_0x36fe57(0x17b)]()-_0x1b0026)/0x3e8)[_0x36fe57(0x223)](0x1);a25_0xbdcdf2[_0x36fe57(0x193)](_0x2ca96a[_0x36fe57(0x1ad)],Object[_0x36fe57(0x207)](_0x2ca96a[_0x36fe57(0x25a)])[0x0]||'',_0x36fe57(0x1af)+_0x2d47b8+'s'),_0x41db4a[_0x36fe57(0x210)]({'role':_0x36fe57(0x1ca),'content':_0x36fe57(0x200)+_0x2ca96a[_0x36fe57(0x1ad)]+':\x0a'+JSON[_0x36fe57(0x179)](_0x77882f,null,0x2)}),await new Promise(_0x1c18d2=>setTimeout(_0x1c18d2,0xc8));}catch(_0x40bf3c){a25_0xbdcdf2[_0x36fe57(0x1f4)](_0x36fe57(0x1de)+_0x40bf3c),_0x41db4a['push']({'role':'user','content':_0x36fe57(0x1ba)+_0x40bf3c+_0x36fe57(0x215)});}}_0x1bf96b>=_0x57205b&&await bot?.[_0x36fe57(0x21c)][_0x36fe57(0x21b)](_0x3e2049,'Stopped\x20(max\x20steps)');}async function handleMessage(_0x13fb98){const _0x11b923=a25_0x1de38d,_0x57041f=_0x13fb98[_0x11b923(0x1c1)]?.['text']?.[_0x11b923(0x1ef)](),_0x33217a=_0x13fb98[_0x11b923(0x1fb)]?.['id'];if(!_0x57041f||!_0x33217a||!_0x13fb98[_0x11b923(0x1fc)]?.['id'])return;const _0x5d8713=_0x13fb98[_0x11b923(0x1fc)]['id'],_0x304534=_0x33217a;if(!a25_0x161d0b['isAllowedChatId'](_0x304534)){const _0x2c8605=a25_0x161d0b['getSecurityPin']();if(_0x2c8605&&!verifiedSessions[_0x11b923(0x1d5)](_0x304534)){if(_0x57041f===_0x2c8605){verifiedSessions[_0x11b923(0x1f2)](_0x304534),a25_0x161d0b[_0x11b923(0x1be)](_0x304534),await _0x13fb98[_0x11b923(0x22d)]('Verified');return;}await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x259));return;}!_0x2c8605&&a25_0x161d0b[_0x11b923(0x1be)](_0x304534);}if(_0x57041f==='/start'){await _0x13fb98[_0x11b923(0x22d)]('Woozlit\x20Remote\x20v2.2.0\x0a\x0aConnected:\x20'+process[_0x11b923(0x19d)]()+_0x11b923(0x230));return;}if(_0x57041f===_0x11b923(0x254)){chatHistories['delete'](_0x5d8713),statusMessages[_0x11b923(0x1cd)](_0x5d8713),await _0x13fb98['reply']('Cleared');return;}if(_0x57041f===_0x11b923(0x187)){chatHistories[_0x11b923(0x1cd)](_0x5d8713),statusMessages[_0x11b923(0x1cd)](_0x5d8713),await _0x13fb98[_0x11b923(0x22d)]('New\x20chat\x20session\x20started.\x20How\x20can\x20I\x20help?');return;}if(_0x57041f[_0x11b923(0x1ce)](_0x11b923(0x1b9))){const _0x578450=_0x57041f[_0x11b923(0x265)](0x5)[_0x11b923(0x1ef)]();if(!_0x578450){await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x203));return;}await _0x13fb98['replyWithChatAction'](_0x11b923(0x24c));const _0x4eb635=await runCommand(_0x578450,undefined,![],0x7530),_0x14b104=_0x4eb635[_0x11b923(0x1d1)]||_0x4eb635[_0x11b923(0x17c)]||_0x11b923(0x211),_0x2ecb4a=_0x14b104[_0x11b923(0x20f)]>0xbb8?_0x14b104[_0x11b923(0x1dd)](0x0,0xbb8)+_0x11b923(0x188):_0x14b104;await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x1d7)+_0x4eb635['exitCode']+'\x0a\x0a'+_0x2ecb4a);return;}if(_0x57041f[_0x11b923(0x1ce)]('/files')){const _0x1b0675=_0x57041f[_0x11b923(0x265)](0x6)[_0x11b923(0x1ef)]()||'.',_0x2079b7=listDirectory(_0x1b0675);if(_0x2079b7[_0x11b923(0x1bd)]&&_0x2079b7['entries']){const _0x21a7b2=_0x2079b7[_0x11b923(0x21f)]['slice'](0x0,0x28)[_0x11b923(0x204)](_0x10aeb2=>{const _0xe5e9a9=_0x11b923,_0x4b8ba0=_0x10aeb2[_0xe5e9a9(0x1c9)]===_0xe5e9a9(0x221)?_0xe5e9a9(0x269):_0xe5e9a9(0x1b0),_0x571f72=_0x10aeb2[_0xe5e9a9(0x183)]?'\x20('+_0x10aeb2[_0xe5e9a9(0x183)]+'b)':'';return _0x4b8ba0+'\x20'+_0x10aeb2[_0xe5e9a9(0x1ad)]+_0x571f72;})[_0x11b923(0x1ae)]('\x0a');await _0x13fb98[_0x11b923(0x22d)](_0x1b0675+_0x11b923(0x213)+_0x21a7b2);}else await _0x13fb98[_0x11b923(0x22d)](_0x2079b7[_0x11b923(0x1c1)]);return;}if(_0x57041f===_0x11b923(0x238)){const _0xfe0b61=gitStatus(),_0x33d274=tree('.',0x2),_0x25d86a=readJson(_0x11b923(0x240));let _0x80ce8d=_0x11b923(0x1d4)+process[_0x11b923(0x19d)]()+_0x11b923(0x206)+getSelectedModel()+'\x0a';if(_0x25d86a['success']&&_0x25d86a[_0x11b923(0x25d)]){const _0x54ce6e=_0x25d86a[_0x11b923(0x25d)];_0x80ce8d+=_0x11b923(0x24d)+(_0x54ce6e[_0x11b923(0x1ad)]||_0x11b923(0x243))+'\x20v'+(_0x54ce6e[_0x11b923(0x1a1)]||'?')+'\x0a';}_0xfe0b61['success']&&(_0x80ce8d+='\x0aGit\x20Status:\x0a'+(_0xfe0b61[_0x11b923(0x173)]||'Clean')+'\x0a');if(_0x33d274[_0x11b923(0x1bd)]&&_0x33d274[_0x11b923(0x249)]){const _0x4a0e99=_0x33d274['tree'][_0x11b923(0x1b7)]('\x0a')['slice'](0x0,0x14)['join']('\x0a');_0x80ce8d+=_0x11b923(0x176)+_0x4a0e99;}await _0x13fb98[_0x11b923(0x22d)](_0x80ce8d);return;}if(_0x57041f['startsWith'](_0x11b923(0x180))){const _0x5d0b9b=_0x57041f['slice'](0x4)[_0x11b923(0x1ef)]();try{process['chdir'](resolve(process[_0x11b923(0x19d)](),_0x5d0b9b)),await _0x13fb98[_0x11b923(0x22d)]('Changed\x20to:\x20'+process[_0x11b923(0x19d)]());}catch(_0x13a7c2){await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x23d)+_0x13a7c2);}return;}if(_0x57041f==='/screen'||_0x57041f===_0x11b923(0x236)){try{await _0x13fb98[_0x11b923(0x177)](_0x11b923(0x175));const _0x3eeca8=await takeScreenshot();await _0x13fb98[_0x11b923(0x1fd)](new InputFile(_0x3eeca8),{'caption':_0x11b923(0x195)}),await a25_0x32bb31[_0x11b923(0x25f)](_0x3eeca8)[_0x11b923(0x1e2)](()=>{});}catch(_0x176e60){await _0x13fb98['reply']('Screenshot\x20failed:\x20'+_0x176e60);}return;}if(_0x57041f==='/status'){const _0x34e447=readTerminalOutput(),_0x2f3187=_0x34e447[_0x11b923(0x1e4)]['length']>0x0?'\x0aProcesses:\x20'+_0x34e447[_0x11b923(0x1e4)][_0x11b923(0x1ae)](',\x20'):'';await _0x13fb98[_0x11b923(0x22d)](_0x11b923(0x1d4)+process[_0x11b923(0x19d)]()+_0x11b923(0x206)+getSelectedModel()+_0x2f3187);return;}if(_0x57041f===_0x11b923(0x191)){const _0x485aa1=terminateProcess();await _0x13fb98['reply'](_0x485aa1[_0x11b923(0x1c1)]);return;}const _0x467f75=await getOrCreateHistory(_0x5d8713);_0x467f75[_0x11b923(0x210)]({'role':_0x11b923(0x1ca),'content':_0x57041f}),a25_0xbdcdf2[_0x11b923(0x1aa)](_0x11b923(0x18c)+_0x13fb98[_0x11b923(0x1fb)][_0x11b923(0x1f3)]+':\x20'+_0x57041f),await processTelegramAgentLoop(_0x5d8713,_0x467f75,getSelectedModel(),_0x57041f);}export async function startBot(){const _0x599954=a25_0x1de38d,_0x3cb864=a25_0x161d0b[_0x599954(0x208)]();if(!_0x3cb864)return a25_0xbdcdf2[_0x599954(0x1f4)](_0x599954(0x1a2)),![];if(isRunning&&bot)return a25_0xbdcdf2['warn'](_0x599954(0x1fa)),!![];try{bot=new Bot(_0x3cb864),bot['on'](_0x599954(0x1db),handleMessage),bot['on']('message:voice',async _0x3e945d=>{const _0x234293=_0x599954,_0xc46f80=_0x3e945d[_0x234293(0x1fc)]['id'],_0x3d2401=_0x3e945d['from']?.['id'];if(!_0x3d2401||!a25_0x161d0b[_0x234293(0x19c)](_0x3d2401))return;try{const _0x4696cc=_0x3e945d[_0x234293(0x1c1)][_0x234293(0x1e1)]?.[_0x234293(0x1b2)];if(!_0x4696cc)return;await _0x3e945d['replyWithChatAction'](_0x234293(0x24c));const _0x2739e1=await _0x3e945d[_0x234293(0x21c)][_0x234293(0x1f0)](_0x4696cc),_0x58df5b=_0x234293(0x1f9)+_0x3cb864+'/'+_0x2739e1[_0x234293(0x220)];if(!_0x58df5b)return;const _0x3a42c5=await fetch(_0x58df5b),_0x5f038b=await _0x3a42c5[_0x234293(0x19b)](),_0x5c392f=Buffer[_0x234293(0x1fb)](_0x5f038b),_0x160cef=join(tmpdir(),_0x234293(0x171)+Date['now']()+'.ogg');await a25_0x32bb31['writeFile'](_0x160cef,_0x5c392f),await _0x3e945d[_0x234293(0x177)](_0x234293(0x24c));const _0x108562=await processVoiceMessage(_0x160cef);await a25_0x32bb31[_0x234293(0x25f)](_0x160cef)[_0x234293(0x1e2)](()=>{});if(_0x108562[_0x234293(0x17e)]){const _0x2e7ad5=await getOrCreateHistory(_0xc46f80);_0x2e7ad5[_0x234293(0x210)]({'role':_0x234293(0x1ca),'content':_0x234293(0x263)+_0x108562[_0x234293(0x17e)]}),a25_0xbdcdf2[_0x234293(0x1aa)](_0x234293(0x18c)+_0x3e945d[_0x234293(0x1fb)]?.[_0x234293(0x1f3)]+_0x234293(0x235)+_0x108562['text']),await processTelegramAgentLoop(_0xc46f80,_0x2e7ad5,getSelectedModel(),_0x108562[_0x234293(0x17e)]);}else await _0x3e945d[_0x234293(0x22d)](_0x234293(0x199));}catch(_0x5f12ee){a25_0xbdcdf2[_0x234293(0x1f4)]('Voice\x20error:\x20'+_0x5f12ee['message']),await _0x3e945d[_0x234293(0x22d)](_0x234293(0x1d6)+_0x5f12ee[_0x234293(0x1c1)]);}}),bot['on']('message:document',async _0x4197a2=>{const _0x1975c4=_0x599954,_0x1de222=_0x4197a2[_0x1975c4(0x1fc)]['id'],_0x38888c=_0x4197a2[_0x1975c4(0x1fb)]?.['id'];if(!_0x38888c||!a25_0x161d0b[_0x1975c4(0x19c)](_0x38888c))return;try{const _0x16b8e2=_0x4197a2['message'][_0x1975c4(0x24b)];if(!_0x16b8e2)return;await _0x4197a2[_0x1975c4(0x177)](_0x1975c4(0x24c));const _0xe9d553=await _0x4197a2['api'][_0x1975c4(0x1f0)](_0x16b8e2[_0x1975c4(0x1b2)]),_0x922e51='https://api.telegram.org/file/bot'+a25_0x161d0b['getBotToken']()+'/'+_0xe9d553[_0x1975c4(0x220)],_0x350b24=await fetch(_0x922e51),_0x4c3c14=Buffer[_0x1975c4(0x1fb)](await _0x350b24[_0x1975c4(0x19b)]()),_0x50042d=join(process[_0x1975c4(0x19d)](),_0x16b8e2[_0x1975c4(0x1e6)]||_0x1975c4(0x17f)+Date[_0x1975c4(0x17b)]()),{writeFileSync:_0x5844d0}=await import('fs');_0x5844d0(_0x50042d,_0x4c3c14);const _0x4473d6=_0x4197a2['message']['caption']||'',_0x273d5f=await getOrCreateHistory(_0x1de222);_0x273d5f[_0x1975c4(0x210)]({'role':'user','content':'[File\x20received:\x20'+_0x16b8e2['file_name']+'\x20('+_0x4c3c14[_0x1975c4(0x20f)]+_0x1975c4(0x1e7)+_0x50042d+']'+(_0x4473d6?_0x1975c4(0x1b6)+_0x4473d6:'')}),a25_0xbdcdf2[_0x1975c4(0x1aa)](_0x1975c4(0x1eb)+_0x16b8e2[_0x1975c4(0x1e6)]+_0x1975c4(0x196)+_0x50042d),await _0x4197a2[_0x1975c4(0x22d)]('Saved:\x20'+_0x16b8e2[_0x1975c4(0x1e6)]+'\x20('+_0x4c3c14[_0x1975c4(0x20f)]+'\x20bytes)'),_0x4473d6&&await processTelegramAgentLoop(_0x1de222,_0x273d5f,getSelectedModel(),_0x4473d6);}catch(_0x20214b){await _0x4197a2[_0x1975c4(0x22d)](_0x1975c4(0x1f8)+_0x20214b[_0x1975c4(0x1c1)]);}}),setInterval(()=>{if(bot)checkReminders(bot);},0xea60),bot[_0x599954(0x1e2)](_0x4a5679=>{const _0x4e03d7=_0x599954;_0x4a5679[_0x4e03d7(0x1c1)]?.[_0x4e03d7(0x1fe)](_0x4e03d7(0x1c3))&&(a25_0xbdcdf2[_0x4e03d7(0x1f4)](_0x4e03d7(0x1c0)),stopBot());}),bot[_0x599954(0x21c)][_0x599954(0x246)]({'drop_pending_updates':!![]})[_0x599954(0x229)](()=>{const _0x43d19c=_0x599954;bot?.[_0x43d19c(0x25e)]();})[_0x599954(0x1e2)](_0x46f1b7=>{const _0x4ae98f=_0x599954;a25_0xbdcdf2[_0x4ae98f(0x1f4)](_0x4ae98f(0x197)+_0x46f1b7);}),isRunning=!![];const _0x10b68f=a25_0x161d0b[_0x599954(0x1c8)]();return _0x10b68f['length']>0x0&®isterTelegramBot(bot,_0x10b68f),a25_0xbdcdf2[_0x599954(0x1bd)](_0x599954(0x22e)),!![];}catch(_0x46522f){return a25_0xbdcdf2[_0x599954(0x1f4)](_0x599954(0x218)+_0x46522f[_0x599954(0x1c1)]),![];}}export function stopBot(){const _0x10ee2d=a25_0x1de38d;bot&&(bot[_0x10ee2d(0x18a)](),bot=null),isRunning=![],verifiedSessions[_0x10ee2d(0x245)]();}export function isBotRunning(){return isRunning;}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare function setBotToken(token: string): void;
|
|
2
|
-
export declare function getBotToken(): string;
|
|
3
|
-
export declare function setSecurityPin(pin: string): void;
|
|
4
|
-
export declare function getSecurityPin(): string;
|
|
5
|
-
export declare function addAllowedChatId(chatId: number): void;
|
|
6
|
-
export declare function removeAllowedChatId(chatId: number): void;
|
|
7
|
-
export declare function getAllowedChatIds(): number[];
|
|
8
|
-
export declare function isAllowedChatId(chatId: number): boolean;
|
|
9
|
-
export declare function setEnabled(enabled: boolean): void;
|
|
10
|
-
export declare function isEnabled(): boolean;
|
|
11
|
-
export declare function isConfigured(): boolean;
|
|
12
|
-
export declare function clearConfig(): void;
|
package/dist/telegram/config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a26_0x4520b6=a26_0x5506;(function(_0x58fd68,_0x2a29ae){const _0x461c51=a26_0x5506,_0xda345c=_0x58fd68();while(!![]){try{const _0x5cdbf5=-parseInt(_0x461c51(0x17d))/0x1+-parseInt(_0x461c51(0x180))/0x2*(parseInt(_0x461c51(0x179))/0x3)+parseInt(_0x461c51(0x189))/0x4+parseInt(_0x461c51(0x185))/0x5*(parseInt(_0x461c51(0x190))/0x6)+parseInt(_0x461c51(0x174))/0x7*(-parseInt(_0x461c51(0x176))/0x8)+-parseInt(_0x461c51(0x173))/0x9+parseInt(_0x461c51(0x17b))/0xa;if(_0x5cdbf5===_0x2a29ae)break;else _0xda345c['push'](_0xda345c['shift']());}catch(_0x5f1555){_0xda345c['push'](_0xda345c['shift']());}}}(a26_0x1b31,0x7cad6));function a26_0x1b31(){const _0x568ed0=['get','54150dRAEdd','enabled','aes-256-cbc','push','1079732Kmtgvl','update','split','digest','woozlit-cli-telegram','createHash','randomBytes','84dGtSGU','set','6234408fPQwFG','2422gFiNpF','includes','15784hNBChg','from','createCipheriv','3375vdjqEK','length','21271040VmGehE','utf8','416234mCrLBO','botToken','hex','438jrAdWE','final','sha256','allowedChatIds'];a26_0x1b31=function(){return _0x568ed0;};return a26_0x1b31();}import a26_0x3be5db from'conf';import a26_0x63ba04 from'crypto';const config=new a26_0x3be5db({'projectName':a26_0x4520b6(0x18d),'defaults':{'botToken':'','allowedChatIds':[],'securityPin':'','enabled':![]}}),ENCRYPTION_KEY='woozlit_telegram_secure_key_2026';function encrypt(_0x5897ba){const _0x50ef9f=a26_0x4520b6,_0x3e4612=a26_0x63ba04[_0x50ef9f(0x18f)](0x10),_0x2a6b09=a26_0x63ba04[_0x50ef9f(0x18e)](_0x50ef9f(0x182))['update'](ENCRYPTION_KEY)[_0x50ef9f(0x18c)](),_0x1784f9=a26_0x63ba04[_0x50ef9f(0x178)]('aes-256-cbc',_0x2a6b09,_0x3e4612);let _0x42d116=_0x1784f9[_0x50ef9f(0x18a)](_0x5897ba,_0x50ef9f(0x17c),_0x50ef9f(0x17f));return _0x42d116+=_0x1784f9[_0x50ef9f(0x181)](_0x50ef9f(0x17f)),_0x3e4612['toString'](_0x50ef9f(0x17f))+':'+_0x42d116;}function decrypt(_0x3378cc){const _0x5a7abf=a26_0x4520b6;try{const [_0x26d94a,_0x218ad9]=_0x3378cc[_0x5a7abf(0x18b)](':');if(!_0x26d94a||!_0x218ad9)return'';const _0x53e570=Buffer[_0x5a7abf(0x177)](_0x26d94a,_0x5a7abf(0x17f)),_0x42c8bf=a26_0x63ba04['createHash'](_0x5a7abf(0x182))['update'](ENCRYPTION_KEY)['digest'](),_0x202976=a26_0x63ba04['createDecipheriv'](_0x5a7abf(0x187),_0x42c8bf,_0x53e570);let _0x2d938e=_0x202976[_0x5a7abf(0x18a)](_0x218ad9,_0x5a7abf(0x17f),_0x5a7abf(0x17c));return _0x2d938e+=_0x202976[_0x5a7abf(0x181)]('utf8'),_0x2d938e;}catch{return'';}}export function setBotToken(_0x28b45){const _0x59e462=a26_0x4520b6;config[_0x59e462(0x172)](_0x59e462(0x17e),encrypt(_0x28b45));}export function getBotToken(){const _0x47cc6a=a26_0x4520b6,_0x501828=config[_0x47cc6a(0x184)]('botToken');if(!_0x501828)return'';return decrypt(_0x501828);}export function setSecurityPin(_0x247b83){const _0x4d00b7=a26_0x4520b6;config[_0x4d00b7(0x172)]('securityPin',encrypt(_0x247b83));}export function getSecurityPin(){const _0x183915=a26_0x4520b6,_0x524a57=config[_0x183915(0x184)]('securityPin');if(!_0x524a57)return'';return decrypt(_0x524a57);}export function addAllowedChatId(_0x4be6ce){const _0x180cff=a26_0x4520b6,_0xd23a01=config['get']('allowedChatIds');!_0xd23a01['includes'](_0x4be6ce)&&(_0xd23a01[_0x180cff(0x188)](_0x4be6ce),config['set'](_0x180cff(0x183),_0xd23a01));}export function removeAllowedChatId(_0x367fd9){const _0x4de4e0=a26_0x4520b6,_0x4967e7=config[_0x4de4e0(0x184)]('allowedChatIds');config[_0x4de4e0(0x172)](_0x4de4e0(0x183),_0x4967e7['filter'](_0x592ee6=>_0x592ee6!==_0x367fd9));}export function getAllowedChatIds(){const _0x242984=a26_0x4520b6;return config[_0x242984(0x184)]('allowedChatIds');}export function isAllowedChatId(_0x385080){const _0x53cf6d=a26_0x4520b6,_0x4261a5=config[_0x53cf6d(0x184)](_0x53cf6d(0x183));return _0x4261a5[_0x53cf6d(0x17a)]===0x0||_0x4261a5[_0x53cf6d(0x175)](_0x385080);}export function setEnabled(_0x29dfcd){const _0x42bc78=a26_0x4520b6;config[_0x42bc78(0x172)](_0x42bc78(0x186),_0x29dfcd);}export function isEnabled(){const _0x21f90a=a26_0x4520b6;return config[_0x21f90a(0x184)](_0x21f90a(0x186));}export function isConfigured(){return!!getBotToken();}function a26_0x5506(_0x123dc8,_0x3338c3){_0x123dc8=_0x123dc8-0x172;const _0x1b3171=a26_0x1b31();let _0x550635=_0x1b3171[_0x123dc8];return _0x550635;}export function clearConfig(){config['clear']();}
|
package/dist/telegram/index.d.ts
DELETED
package/dist/telegram/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x1696e1,_0x42cad5){var _0x10bf72=a27_0xd70d,_0x35dc07=_0x1696e1();while(!![]){try{var _0x4bae9a=parseInt(_0x10bf72(0x1e3))/0x1*(parseInt(_0x10bf72(0x1dc))/0x2)+-parseInt(_0x10bf72(0x1e0))/0x3+-parseInt(_0x10bf72(0x1da))/0x4+parseInt(_0x10bf72(0x1df))/0x5*(parseInt(_0x10bf72(0x1e2))/0x6)+-parseInt(_0x10bf72(0x1db))/0x7+-parseInt(_0x10bf72(0x1e4))/0x8*(-parseInt(_0x10bf72(0x1dd))/0x9)+-parseInt(_0x10bf72(0x1e1))/0xa*(-parseInt(_0x10bf72(0x1de))/0xb);if(_0x4bae9a===_0x42cad5)break;else _0x35dc07['push'](_0x35dc07['shift']());}catch(_0x213479){_0x35dc07['push'](_0x35dc07['shift']());}}}(a27_0x8c65,0x705e9));export*from'./config.js';function a27_0x8c65(){var _0x5ae0c5=['20cPxKnr','1953582xlmsoc','43sgQrbt','4016naFcWR','2284452mtcQtx','1644293pUpcGv','19956DdNMLV','14436Eafitk','380875DsJtgf','10slYDjD','2065287pmwpzX'];a27_0x8c65=function(){return _0x5ae0c5;};return a27_0x8c65();}function a27_0xd70d(_0x27e281,_0x15be6e){_0x27e281=_0x27e281-0x1da;var _0x8c652a=a27_0x8c65();var _0xd70dc6=_0x8c652a[_0x27e281];return _0xd70dc6;}export{startBot,stopBot,isBotRunning}from'./bot.js';export{setupTelegram}from'./setup.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Bot } from "grammy";
|
|
2
|
-
export interface Reminder {
|
|
3
|
-
id: string;
|
|
4
|
-
chatId: number;
|
|
5
|
-
timestamp: number;
|
|
6
|
-
message: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function loadReminders(): Promise<void>;
|
|
9
|
-
export declare function saveReminders(): Promise<void>;
|
|
10
|
-
export declare function scheduleReminder(chatId: number, delayMinutes: number, message: string): Promise<string>;
|
|
11
|
-
export declare function checkReminders(bot: Bot): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a28_0x9613(_0x55ec12,_0x44b69d){_0x55ec12=_0x55ec12-0x15a;const _0x20c528=a28_0x20c5();let _0x9613cc=_0x20c528[_0x55ec12];return _0x9613cc;}const a28_0xcd85f3=a28_0x9613;(function(_0x2276df,_0x1e2557){const _0x3277bc=a28_0x9613,_0x3256c1=_0x2276df();while(!![]){try{const _0x552b53=-parseInt(_0x3277bc(0x15d))/0x1+-parseInt(_0x3277bc(0x177))/0x2*(-parseInt(_0x3277bc(0x173))/0x3)+parseInt(_0x3277bc(0x160))/0x4*(-parseInt(_0x3277bc(0x16f))/0x5)+-parseInt(_0x3277bc(0x170))/0x6+parseInt(_0x3277bc(0x175))/0x7*(-parseInt(_0x3277bc(0x16e))/0x8)+-parseInt(_0x3277bc(0x166))/0x9+parseInt(_0x3277bc(0x15e))/0xa;if(_0x552b53===_0x1e2557)break;else _0x3256c1['push'](_0x3256c1['shift']());}catch(_0xdb2fbb){_0x3256c1['push'](_0x3256c1['shift']());}}}(a28_0x20c5,0x424c1));import{promises as a28_0x3e9ff2}from'fs';import{join}from'path';const WOOZLIT_DIR=join(process['env'][a28_0xcd85f3(0x171)]||process[a28_0xcd85f3(0x172)][a28_0xcd85f3(0x174)]||'.',a28_0xcd85f3(0x163)),REMINDERS_FILE=join(WOOZLIT_DIR,'reminders.json');function a28_0x20c5(){const _0x367568=['3001068lcNChW','random','now','message','utf-8','readFile','Failed\x20to\x20send\x20reminder\x20to\x20','filter','1540600yAdLIU','141930cJPIFV','2128584vlatkx','USERPROFILE','env','3qdjsef','HOME','7GsxcvP','toLocaleTimeString','97754VYXoPq',':\x20\x22','push','parse','sendMessage','chatId','297997AsrFhi','18272540WINVcD','length','60gsUPvf','writeFile','substring','.woozlit','api','timestamp'];a28_0x20c5=function(){return _0x367568;};return a28_0x20c5();}let reminders=[];export async function loadReminders(){const _0x3da3a4=a28_0xcd85f3;try{const _0x5083bb=await a28_0x3e9ff2[_0x3da3a4(0x16b)](REMINDERS_FILE,_0x3da3a4(0x16a));reminders=JSON[_0x3da3a4(0x15a)](_0x5083bb);}catch{reminders=[];}}export async function saveReminders(){const _0x462e97=a28_0xcd85f3;try{await a28_0x3e9ff2['mkdir'](WOOZLIT_DIR,{'recursive':!![]}),await a28_0x3e9ff2[_0x462e97(0x161)](REMINDERS_FILE,JSON['stringify'](reminders,null,0x2));}catch{}}export async function scheduleReminder(_0x589a24,_0x198cb6,_0x12993f){const _0x588b28=a28_0xcd85f3,_0x272add=Date['now']()+_0x198cb6*0x3c*0x3e8,_0x5040cd={'id':Math[_0x588b28(0x167)]()['toString'](0x24)[_0x588b28(0x162)](0x7),'chatId':_0x589a24,'timestamp':_0x272add,'message':_0x12993f};if(reminders[_0x588b28(0x15f)]===0x0)await loadReminders();reminders[_0x588b28(0x179)](_0x5040cd),await saveReminders();const _0xaec851=new Date(_0x272add)[_0x588b28(0x176)]();return'Reminder\x20set\x20for\x20'+_0xaec851+_0x588b28(0x178)+_0x12993f+'\x22';}export async function checkReminders(_0x33b58a){const _0x1ee2ab=a28_0xcd85f3;if(reminders[_0x1ee2ab(0x15f)]===0x0)await loadReminders();const _0x49b62a=Date[_0x1ee2ab(0x168)](),_0x1efede=reminders['filter'](_0x303164=>_0x303164['timestamp']>_0x49b62a),_0x51d281=reminders[_0x1ee2ab(0x16d)](_0x1ccc24=>_0x1ccc24[_0x1ee2ab(0x165)]<=_0x49b62a);if(_0x51d281[_0x1ee2ab(0x15f)]>0x0){for(const _0x27697b of _0x51d281){try{await _0x33b58a[_0x1ee2ab(0x164)][_0x1ee2ab(0x15b)](_0x27697b[_0x1ee2ab(0x15c)],'⏰\x20REMINDER:\x20'+_0x27697b[_0x1ee2ab(0x169)]);}catch(_0xb44909){console['error'](_0x1ee2ab(0x16c)+_0x27697b[_0x1ee2ab(0x15c)],_0xb44909);}}reminders=_0x1efede,await saveReminders();}}
|
package/dist/telegram/setup.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function setupTelegram(): Promise<void>;
|
package/dist/telegram/setup.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x508231,_0x1fe51b){const _0x15281a=a29_0x483d,_0x47032e=_0x508231();while(!![]){try{const _0x4066db=parseInt(_0x15281a(0xc6))/0x1*(-parseInt(_0x15281a(0xbe))/0x2)+parseInt(_0x15281a(0xc5))/0x3+parseInt(_0x15281a(0xbd))/0x4*(parseInt(_0x15281a(0xba))/0x5)+parseInt(_0x15281a(0xbc))/0x6+parseInt(_0x15281a(0xc2))/0x7+parseInt(_0x15281a(0xc3))/0x8+parseInt(_0x15281a(0xc1))/0x9*(-parseInt(_0x15281a(0xb0))/0xa);if(_0x4066db===_0x1fe51b)break;else _0x47032e['push'](_0x47032e['shift']());}catch(_0x5d9e51){_0x47032e['push'](_0x47032e['shift']());}}}(a29_0x2cee,0xdc5ce));function a29_0x483d(_0x5bfa86,_0x2502da){_0x5bfa86=_0x5bfa86-0xb0;const _0x2ceeeb=a29_0x2cee();let _0x483dc9=_0x2ceeeb[_0x5bfa86];return _0x483dc9;}import{input}from'@inquirer/prompts';import*as a29_0xf9d5fd from'./config.js';import*as a29_0xe10f70 from'../ui/output.js';export async function setupTelegram(){const _0x18f20b=a29_0x483d;a29_0xe10f70['info'](_0x18f20b(0xbb)),a29_0xe10f70[_0x18f20b(0xb6)](_0x18f20b(0xb5));const _0x2f8a08=await input({'message':'Bot\x20Token:','validate':_0x12e8bf=>_0x12e8bf[_0x18f20b(0xc0)](':')?!![]:_0x18f20b(0xb2)});a29_0xf9d5fd['setBotToken'](_0x2f8a08),a29_0xe10f70['warn'](_0x18f20b(0xc4));const _0xe3912=await input({'message':_0x18f20b(0xb1)});_0xe3912?a29_0xf9d5fd[_0x18f20b(0xbf)](parseInt(_0xe3912)):a29_0xe10f70['info'](_0x18f20b(0xb4)),a29_0xe10f70[_0x18f20b(0xb7)](_0x18f20b(0xb9)),a29_0xe10f70[_0x18f20b(0xb8)](_0x18f20b(0xb3));}function a29_0x2cee(){const _0x547129=['dim','success','info','Telegram\x20configuration\x20saved!','5bekzPK','Setup\x20Telegram\x20Bot','7148190FSxnEp','5126692tyKRiQ','36402bPeFvX','addAllowedChatId','includes','2871999rmsGOb','10022824fquicF','5035120rWxVqW','You\x20also\x20need\x20to\x20allow\x20your\x20Telegram\x20User\x20ID.','1514163dQPndP','87DQGndO','80qMZWuA','Your\x20Telegram\x20Chat\x20ID\x20(numeric).\x20Leave\x20empty\x20if\x20unknown:','Invalid\x20token\x20format','Restart\x20the\x20CLI\x20to\x20start\x20the\x20bot.','You\x20can\x20add\x20your\x20Chat\x20ID\x20later\x20using\x20/telegram\x20allow\x20<id>\x20inside\x20the\x20CLI.','Get\x20your\x20token\x20from\x20@BotFather\x20on\x20Telegram.'];a29_0x2cee=function(){return _0x547129;};return a29_0x2cee();}
|
package/dist/tools/command.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface CommandResult {
|
|
2
|
-
success: boolean;
|
|
3
|
-
stdout: string;
|
|
4
|
-
stderr: string;
|
|
5
|
-
exitCode: number;
|
|
6
|
-
pid?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function runCommand(command: string, onOutput?: (data: string) => void, background?: boolean, wait?: number): Promise<CommandResult>;
|
|
9
|
-
export declare function readTerminalOutput(pid?: number): {
|
|
10
|
-
output: string;
|
|
11
|
-
running: boolean;
|
|
12
|
-
pids: number[];
|
|
13
|
-
};
|
|
14
|
-
export declare function sendTerminalInput(input: string, pid?: number): {
|
|
15
|
-
success: boolean;
|
|
16
|
-
message: string;
|
|
17
|
-
};
|
|
18
|
-
export declare function terminateProcess(pid?: number): {
|
|
19
|
-
success: boolean;
|
|
20
|
-
message: string;
|
|
21
|
-
};
|
|
22
|
-
export declare function getActiveProcesses(): number[];
|
|
23
|
-
export {};
|
package/dist/tools/command.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x1eb483,_0x27cc57){const _0x55785a=a30_0x3396,_0x2f1962=_0x1eb483();while(!![]){try{const _0x29bcd9=parseInt(_0x55785a(0xd6))/0x1*(-parseInt(_0x55785a(0xbc))/0x2)+parseInt(_0x55785a(0xc2))/0x3+parseInt(_0x55785a(0xb5))/0x4+parseInt(_0x55785a(0xd3))/0x5*(parseInt(_0x55785a(0xd8))/0x6)+parseInt(_0x55785a(0xc1))/0x7+-parseInt(_0x55785a(0xc9))/0x8*(parseInt(_0x55785a(0xba))/0x9)+-parseInt(_0x55785a(0xda))/0xa;if(_0x29bcd9===_0x27cc57)break;else _0x2f1962['push'](_0x2f1962['shift']());}catch(_0x5bbd66){_0x2f1962['push'](_0x2f1962['shift']());}}}(a30_0x49da,0xb161d));import{spawn}from'child_process';const activeProcesses=new Map();function a30_0x49da(){const _0x53bf2a=['27bzBFda','get','20OaVYIr','unref','env','error','\x0a[Process\x20running\x20in\x20background,\x20PID:\x20','9407356qSGzAb','1703088cjvmLj','No\x20active\x20processes','cwd','close','keys','pid','delete','1977272LcsPIV','[PID\x20','message','kill','slice','set','size','child','Sent\x20to\x20PID\x20','from','1210855rsUXlw','platform','output','15027FHmDjL','stdout','12ojZsOF','stdin','8168990VjwWZR','length','data','cmd.exe','win32','157028uYGpBn','write','/bin/sh','has','toString'];a30_0x49da=function(){return _0x53bf2a;};return a30_0x49da();}export async function runCommand(_0x47ee17,_0x31416c,_0x269aa2=![],_0xea30bf=0x7530){return new Promise(_0x222209=>{const _0x4241ef=a30_0x3396,_0x2ae7ba=process[_0x4241ef(0xd4)]===_0x4241ef(0xb4),_0x9a531e=_0x2ae7ba?_0x4241ef(0xb3):_0x4241ef(0xb7),_0x1d2088=_0x2ae7ba?'/c':'-c',_0x38bfec=spawn(_0x9a531e,[_0x1d2088,_0x47ee17],{'cwd':process[_0x4241ef(0xc4)](),'env':process[_0x4241ef(0xbe)],'detached':_0x269aa2,'stdio':'pipe'}),_0x52f6ed=_0x38bfec[_0x4241ef(0xc7)]||0x0;let _0x1a3eb5='',_0x320f96='',_0x1a749d=![];_0x52f6ed&&activeProcesses[_0x4241ef(0xce)](_0x52f6ed,{'child':_0x38bfec,'output':''});const _0xa8670d=setTimeout(()=>{const _0x2ad469=_0x4241ef;if(!_0x1a749d){_0x1a749d=!![];if(_0x269aa2&&_0x38bfec[_0x2ad469(0xbd)])_0x38bfec['unref']();_0x222209({'success':!![],'stdout':_0x1a3eb5+(_0x2ad469(0xc0)+_0x52f6ed+']'),'stderr':_0x320f96,'exitCode':0x0,'pid':_0x52f6ed});}},_0xea30bf);_0x38bfec[_0x4241ef(0xd7)]?.['on'](_0x4241ef(0xb2),_0x22510e=>{const _0x36e592=_0x4241ef,_0x19e796=_0x22510e['toString']();_0x1a3eb5+=_0x19e796;if(_0x52f6ed&&activeProcesses[_0x36e592(0xb8)](_0x52f6ed)){const _0x1943ef=activeProcesses[_0x36e592(0xbb)](_0x52f6ed);_0x1943ef[_0x36e592(0xd5)]+=_0x19e796;}if(!_0x1a749d&&_0x31416c)_0x31416c(_0x19e796);}),_0x38bfec['stderr']?.['on'](_0x4241ef(0xb2),_0x36def9=>{const _0x5b19dd=_0x4241ef,_0x212022=_0x36def9[_0x5b19dd(0xb9)]();_0x320f96+=_0x212022;if(_0x52f6ed&&activeProcesses[_0x5b19dd(0xb8)](_0x52f6ed)){const _0x311135=activeProcesses[_0x5b19dd(0xbb)](_0x52f6ed);_0x311135[_0x5b19dd(0xd5)]+=_0x212022;}if(!_0x1a749d&&_0x31416c)_0x31416c(_0x212022);}),_0x38bfec['on'](_0x4241ef(0xc5),_0x3f1669=>{const _0x3ad9b0=_0x4241ef;clearTimeout(_0xa8670d);if(_0x52f6ed)activeProcesses[_0x3ad9b0(0xc8)](_0x52f6ed);!_0x1a749d&&(_0x1a749d=!![],_0x222209({'success':_0x3f1669===0x0,'stdout':_0x1a3eb5,'stderr':_0x320f96,'exitCode':_0x3f1669||0x0,'pid':_0x52f6ed}));}),_0x38bfec['on'](_0x4241ef(0xbf),_0x41d532=>{const _0x334b06=_0x4241ef;clearTimeout(_0xa8670d);if(_0x52f6ed)activeProcesses[_0x334b06(0xc8)](_0x52f6ed);!_0x1a749d&&(_0x1a749d=!![],_0x222209({'success':![],'stdout':_0x1a3eb5,'stderr':_0x41d532[_0x334b06(0xcb)],'exitCode':0x1,'pid':_0x52f6ed}));});});}function a30_0x3396(_0x31d8d0,_0x493f73){_0x31d8d0=_0x31d8d0-0xb1;const _0x49da6f=a30_0x49da();let _0x3396b4=_0x49da6f[_0x31d8d0];return _0x3396b4;}export function readTerminalOutput(_0x4951ae){const _0x1e265b=a30_0x3396,_0x267197=Array[_0x1e265b(0xd2)](activeProcesses['keys']());if(_0x4951ae&&activeProcesses[_0x1e265b(0xb8)](_0x4951ae)){const _0x458ca7=activeProcesses[_0x1e265b(0xbb)](_0x4951ae);return{'output':_0x458ca7[_0x1e265b(0xd5)][_0x1e265b(0xcd)](-0x7d0),'running':!![],'pids':_0x267197};}let _0x55c3d0='';for(const [_0x51e3f1,_0x40f29d]of activeProcesses){_0x55c3d0+=_0x1e265b(0xca)+_0x51e3f1+']\x0a'+_0x40f29d[_0x1e265b(0xd5)]['slice'](-0x3e8)+'\x0a';}return{'output':_0x55c3d0||_0x1e265b(0xc3),'running':_0x267197[_0x1e265b(0xb1)]>0x0,'pids':_0x267197};}export function sendTerminalInput(_0x238fd8,_0x486a21){const _0x455179=a30_0x3396;if(_0x486a21&&activeProcesses[_0x455179(0xb8)](_0x486a21)){const _0x2d8626=activeProcesses[_0x455179(0xbb)](_0x486a21);return _0x2d8626['child']['stdin']?.[_0x455179(0xb6)](_0x238fd8+'\x0a'),{'success':!![],'message':_0x455179(0xd1)+_0x486a21};}for(const [_0x1a2752,_0x5685ba]of activeProcesses){return _0x5685ba[_0x455179(0xd0)][_0x455179(0xd9)]?.[_0x455179(0xb6)](_0x238fd8+'\x0a'),{'success':!![],'message':_0x455179(0xd1)+_0x1a2752};}return{'success':![],'message':'No\x20active\x20processes'};}export function terminateProcess(_0x3f9dbf){const _0x28455c=a30_0x3396;if(_0x3f9dbf&&activeProcesses['has'](_0x3f9dbf)){const _0x1d191c=activeProcesses[_0x28455c(0xbb)](_0x3f9dbf);return _0x1d191c[_0x28455c(0xd0)][_0x28455c(0xcc)](),activeProcesses[_0x28455c(0xc8)](_0x3f9dbf),{'success':!![],'message':'Terminated\x20PID\x20'+_0x3f9dbf};}if(activeProcesses[_0x28455c(0xcf)]>0x0)for(const [_0x1f5806,_0x353bec]of activeProcesses){return _0x353bec[_0x28455c(0xd0)]['kill'](),activeProcesses[_0x28455c(0xc8)](_0x1f5806),{'success':!![],'message':'Terminated\x20PID\x20'+_0x1f5806};}return{'success':![],'message':_0x28455c(0xc3)};}export function getActiveProcesses(){const _0x3c73aa=a30_0x3396;return Array[_0x3c73aa(0xd2)](activeProcesses[_0x3c73aa(0xc6)]());}
|
package/dist/tools/file.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export declare function createFile(filePath: string, content: string): {
|
|
2
|
-
success: boolean;
|
|
3
|
-
message: string;
|
|
4
|
-
};
|
|
5
|
-
export declare function readFile(filePath: string): {
|
|
6
|
-
success: boolean;
|
|
7
|
-
content?: string;
|
|
8
|
-
message: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function listDirectory(dirPath?: string): {
|
|
11
|
-
success: boolean;
|
|
12
|
-
entries?: DirectoryEntry[];
|
|
13
|
-
message: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function editFile(filePath: string, search: string, replace: string): {
|
|
16
|
-
success: boolean;
|
|
17
|
-
message: string;
|
|
18
|
-
};
|
|
19
|
-
export declare function updateFile(filePath: string, content: string): {
|
|
20
|
-
success: boolean;
|
|
21
|
-
message: string;
|
|
22
|
-
};
|
|
23
|
-
export declare function appendFile(filePath: string, content: string): {
|
|
24
|
-
success: boolean;
|
|
25
|
-
message: string;
|
|
26
|
-
};
|
|
27
|
-
interface DirectoryEntry {
|
|
28
|
-
name: string;
|
|
29
|
-
type: "file" | "directory";
|
|
30
|
-
size?: number;
|
|
31
|
-
}
|
|
32
|
-
export declare function searchFile(filePath: string, pattern: string): {
|
|
33
|
-
success: boolean;
|
|
34
|
-
matches?: string[];
|
|
35
|
-
message: string;
|
|
36
|
-
};
|
|
37
|
-
export declare function findFiles(dirPath: string, pattern: string): {
|
|
38
|
-
success: boolean;
|
|
39
|
-
files?: string[];
|
|
40
|
-
message: string;
|
|
41
|
-
};
|
|
42
|
-
export declare function searchDirectory(dirPath: string, pattern: string): {
|
|
43
|
-
success: boolean;
|
|
44
|
-
results?: {
|
|
45
|
-
file: string;
|
|
46
|
-
line: number;
|
|
47
|
-
content: string;
|
|
48
|
-
}[];
|
|
49
|
-
message: string;
|
|
50
|
-
};
|
|
51
|
-
export declare function deleteFile(filePath: string): {
|
|
52
|
-
success: boolean;
|
|
53
|
-
message: string;
|
|
54
|
-
};
|
|
55
|
-
export declare function renameFile(fromPath: string, toPath: string): {
|
|
56
|
-
success: boolean;
|
|
57
|
-
message: string;
|
|
58
|
-
};
|
|
59
|
-
export declare function copyFile(fromPath: string, toPath: string): {
|
|
60
|
-
success: boolean;
|
|
61
|
-
message: string;
|
|
62
|
-
};
|
|
63
|
-
export declare function fileInfo(filePath: string): {
|
|
64
|
-
success: boolean;
|
|
65
|
-
info?: {
|
|
66
|
-
size: number;
|
|
67
|
-
modified: string;
|
|
68
|
-
created: string;
|
|
69
|
-
isDirectory: boolean;
|
|
70
|
-
permissions: string;
|
|
71
|
-
};
|
|
72
|
-
message: string;
|
|
73
|
-
};
|
|
74
|
-
export declare function readFileLines(filePath: string, startLine: number, endLine: number): {
|
|
75
|
-
success: boolean;
|
|
76
|
-
content?: string;
|
|
77
|
-
message: string;
|
|
78
|
-
};
|
|
79
|
-
export {};
|
package/dist/tools/file.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0xe797dc,_0x5d0ef6){const _0x320d7e=a31_0x5bcb,_0x36100c=_0xe797dc();while(!![]){try{const _0xe6c312=parseInt(_0x320d7e(0x1df))/0x1*(parseInt(_0x320d7e(0x211))/0x2)+parseInt(_0x320d7e(0x1e0))/0x3*(parseInt(_0x320d7e(0x208))/0x4)+parseInt(_0x320d7e(0x210))/0x5+parseInt(_0x320d7e(0x21e))/0x6*(parseInt(_0x320d7e(0x1dc))/0x7)+-parseInt(_0x320d7e(0x1ed))/0x8*(parseInt(_0x320d7e(0x219))/0x9)+-parseInt(_0x320d7e(0x20c))/0xa+-parseInt(_0x320d7e(0x1f3))/0xb*(-parseInt(_0x320d7e(0x1ef))/0xc);if(_0xe6c312===_0x5d0ef6)break;else _0x36100c['push'](_0x36100c['shift']());}catch(_0x682876){_0x36100c['push'](_0x36100c['shift']());}}}(a31_0x3543,0x4e469));import{readFileSync,writeFileSync,existsSync,readdirSync,statSync,mkdirSync,unlinkSync,renameSync,copyFileSync}from'fs';import{dirname,resolve,relative}from'path';import{trackFileCreate,trackFileModify}from'./rollback.js';export function createFile(_0x43550a,_0x2d0991){const _0x485090=a31_0x5bcb;try{const _0x5464e9=resolve(process[_0x485090(0x1f9)](),_0x43550a),_0x46d085=dirname(_0x5464e9);return!existsSync(_0x46d085)&&mkdirSync(_0x46d085,{'recursive':!![]}),writeFileSync(_0x5464e9,_0x2d0991,_0x485090(0x1e5)),trackFileCreate(_0x5464e9),{'success':!![],'message':_0x485090(0x214)+_0x43550a};}catch(_0x3a791c){return{'success':![],'message':_0x485090(0x1f6)+_0x43550a+':\x20'+_0x3a791c};}}export function readFile(_0x39ae65){const _0x17ebcb=a31_0x5bcb;try{const _0x4be155=resolve(process[_0x17ebcb(0x1f9)](),_0x39ae65);if(!existsSync(_0x4be155))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x39ae65};const _0x1469f6=[_0x17ebcb(0x22d),_0x17ebcb(0x202),_0x17ebcb(0x22b),_0x17ebcb(0x22a),_0x17ebcb(0x220),_0x17ebcb(0x221),_0x17ebcb(0x1f2)],_0x4bb4e8=_0x4be155[_0x17ebcb(0x216)]('.')[_0x17ebcb(0x22e)]()?.[_0x17ebcb(0x1f7)]();if(_0x4bb4e8&&_0x1469f6[_0x17ebcb(0x1fa)]('.'+_0x4bb4e8))return{'success':![],'message':_0x17ebcb(0x215)+_0x4bb4e8+_0x17ebcb(0x1fc)};const _0x5f43fe=readFileSync(_0x4be155,_0x17ebcb(0x1e5));return{'success':!![],'content':_0x5f43fe,'message':'Read\x20'+_0x39ae65};}catch(_0x5184e8){return{'success':![],'message':_0x17ebcb(0x20f)+_0x39ae65+':\x20'+_0x5184e8};}}function a31_0x5bcb(_0x5bc962,_0x2d0ab7){_0x5bc962=_0x5bc962-0x1dc;const _0x354310=a31_0x3543();let _0x5bcbf2=_0x354310[_0x5bc962];return _0x5bcbf2;}export function listDirectory(_0x38de4c='.'){const _0xaf5ee6=a31_0x5bcb;try{const _0x240e33=resolve(process['cwd'](),_0x38de4c);if(!existsSync(_0x240e33))return{'success':![],'message':_0xaf5ee6(0x1f8)+_0x38de4c};const _0xb4328b=readdirSync(_0x240e33),_0x5e3378=_0xb4328b[_0xaf5ee6(0x1de)](_0x36cd73=>{const _0x5b0793=_0xaf5ee6,_0x7ceb4b=resolve(_0x240e33,_0x36cd73),_0x252085=statSync(_0x7ceb4b);return{'name':_0x36cd73,'type':_0x252085[_0x5b0793(0x1e4)]()?_0x5b0793(0x1f0):_0x5b0793(0x1eb),'size':_0x252085[_0x5b0793(0x223)]()?_0x252085['size']:undefined};});return{'success':!![],'entries':_0x5e3378,'message':'Listed\x20'+_0x5e3378[_0xaf5ee6(0x231)]+_0xaf5ee6(0x203)+_0x38de4c};}catch(_0x2ee046){return{'success':![],'message':'Failed\x20to\x20list\x20'+_0x38de4c+':\x20'+_0x2ee046};}}export function editFile(_0x4d0429,_0x3b9304,_0x3b7a56){const _0x354e11=a31_0x5bcb;try{const _0x53c4ff=resolve(process[_0x354e11(0x1f9)](),_0x4d0429);if(!existsSync(_0x53c4ff))return{'success':![],'message':_0x354e11(0x1fb)+_0x4d0429};const _0x35982f=readFileSync(_0x53c4ff,_0x354e11(0x1e5));let _0x4ce290=_0x3b9304;if(!_0x35982f['includes'](_0x3b9304)){const _0xb921ac=_0x35982f['replace'](/\r\n/g,'\x0a'),_0x3545d7=_0x3b9304[_0x354e11(0x230)](/\r\n/g,'\x0a');if(_0xb921ac[_0x354e11(0x1fa)](_0x3545d7))_0x4ce290=_0x3545d7;else{const _0x4cce52=_0x3545d7[_0x354e11(0x216)]('\x0a')[_0x354e11(0x1de)](_0xe38979=>_0xe38979['trim']()),_0x4aa95f=_0xb921ac[_0x354e11(0x216)]('\x0a');let _0x5ee82d=-0x1;for(let _0x2f83d4=0x0;_0x2f83d4<=_0x4aa95f[_0x354e11(0x231)]-_0x4cce52[_0x354e11(0x231)];_0x2f83d4++){let _0x51a5ce=!![];for(let _0x496a72=0x0;_0x496a72<_0x4cce52['length'];_0x496a72++){if(_0x4aa95f[_0x2f83d4+_0x496a72][_0x354e11(0x1e7)]()!==_0x4cce52[_0x496a72]){_0x51a5ce=![];break;}}if(_0x51a5ce){_0x5ee82d=_0x2f83d4;break;}}if(_0x5ee82d!==-0x1)_0x4ce290=_0x4aa95f['slice'](_0x5ee82d,_0x5ee82d+_0x4cce52[_0x354e11(0x231)])['join']('\x0a');else return{'success':![],'message':'Search\x20string\x20not\x20found\x20in\x20'+_0x4d0429+'.\x20Note:\x20The\x20search\x20string\x20must\x20be\x20an\x20EXACT\x20match\x20including\x20all\x20whitespace\x20and\x20indentation.\x20Try\x20using\x20update_file\x20to\x20completely\x20replace\x20the\x20content.'};}}trackFileModify(_0x53c4ff,_0x35982f);const _0x47ec9a=_0x35982f[_0x354e11(0x230)](_0x4ce290,_0x3b7a56);return writeFileSync(_0x53c4ff,_0x47ec9a,_0x354e11(0x1e5)),{'success':!![],'message':'Edited\x20'+_0x4d0429};}catch(_0x4de178){return{'success':![],'message':_0x354e11(0x20d)+_0x4d0429+':\x20'+_0x4de178};}}export function updateFile(_0x164f8a,_0x484049){const _0x3ecdb8=a31_0x5bcb;try{const _0x10e384=resolve(process[_0x3ecdb8(0x1f9)](),_0x164f8a);if(!existsSync(_0x10e384))return{'success':![],'message':_0x3ecdb8(0x1fb)+_0x164f8a};return trackFileModify(_0x10e384,readFileSync(_0x10e384,_0x3ecdb8(0x1e5))),writeFileSync(_0x10e384,_0x484049,_0x3ecdb8(0x1e5)),{'success':!![],'message':_0x3ecdb8(0x1fe)+_0x164f8a};}catch(_0x50bcdf){return{'success':![],'message':_0x3ecdb8(0x205)+_0x164f8a+':\x20'+_0x50bcdf};}}export function appendFile(_0x34ce89,_0xf86fdc){const _0x16c6a5=a31_0x5bcb;try{const _0x3e7916=resolve(process[_0x16c6a5(0x1f9)](),_0x34ce89);if(!existsSync(_0x3e7916))return{'success':![],'message':_0x16c6a5(0x1fb)+_0x34ce89};const _0x5930bf=readFileSync(_0x3e7916,_0x16c6a5(0x1e5));return trackFileModify(_0x3e7916,_0x5930bf),writeFileSync(_0x3e7916,_0x5930bf+(_0x5930bf['endsWith']('\x5cn')?'':'\x5cn')+_0xf86fdc,'utf-8'),{'success':!![],'message':'Appended\x20to\x20'+_0x34ce89};}catch(_0x52f483){return{'success':![],'message':_0x16c6a5(0x227)+_0x34ce89+':\x20'+_0x52f483};}}export function searchFile(_0x130d2a,_0x155d76){const _0x3291e5=a31_0x5bcb;try{const _0x4b6b17=resolve(process[_0x3291e5(0x1f9)](),_0x130d2a);if(!existsSync(_0x4b6b17))return{'success':![],'message':_0x3291e5(0x1fb)+_0x130d2a};const _0x5436c9=readFileSync(_0x4b6b17,'utf-8'),_0x3485ae=new RegExp(_0x155d76,'g'),_0x432e1d=_0x5436c9[_0x3291e5(0x20e)](_0x3485ae)||[],_0x59c000=_0x5436c9[_0x3291e5(0x216)]('\x0a'),_0x375f6b=_0x59c000[_0x3291e5(0x1e9)]((_0x686b40,_0x33c11f)=>new RegExp(_0x155d76)[_0x3291e5(0x21d)](_0x686b40));return{'success':!![],'matches':_0x375f6b,'message':_0x3291e5(0x213)+_0x375f6b['length']+_0x3291e5(0x217)+_0x130d2a};}catch(_0x3240de){return{'success':![],'message':_0x3291e5(0x207)+_0x130d2a+':\x20'+_0x3240de};}}export function findFiles(_0x2efa7c,_0x47816f){const _0x5b060f=a31_0x5bcb;try{const _0x4f7556=resolve(process[_0x5b060f(0x1f9)](),_0x2efa7c);if(!existsSync(_0x4f7556))return{'success':![],'message':'Directory\x20not\x20found:\x20'+_0x2efa7c};const _0x196284=[],_0x5b6002=new RegExp(_0x47816f,'i');function _0x1b634c(_0x32dd55){const _0x19f4cd=_0x5b060f,_0x190890=readdirSync(_0x32dd55);for(const _0x22d9b9 of _0x190890){if(_0x22d9b9[_0x19f4cd(0x21b)]('.')||_0x22d9b9==='node_modules')continue;const _0x411e69=resolve(_0x32dd55,_0x22d9b9),_0x5cbfd4=statSync(_0x411e69);if(_0x5cbfd4[_0x19f4cd(0x1e4)]())_0x1b634c(_0x411e69);else _0x5b6002[_0x19f4cd(0x21d)](_0x22d9b9)&&_0x196284[_0x19f4cd(0x1f1)](relative(_0x4f7556,_0x411e69));}}return _0x1b634c(_0x4f7556),{'success':!![],'files':_0x196284[_0x5b060f(0x22c)](0x0,0x32),'message':_0x5b060f(0x213)+_0x196284['length']+_0x5b060f(0x204)+_0x47816f+'\x22'};}catch(_0x4d69d4){return{'success':![],'message':'Failed\x20to\x20find\x20files:\x20'+_0x4d69d4};}}export function searchDirectory(_0x513bf2,_0x5b30fb){const _0x1d9ed7=a31_0x5bcb;try{const _0x3cc6ad=resolve(process[_0x1d9ed7(0x1f9)](),_0x513bf2);if(!existsSync(_0x3cc6ad))return{'success':![],'message':_0x1d9ed7(0x1f8)+_0x513bf2};const _0x3f9fd6=[],_0x5221b0=new RegExp(_0x5b30fb,'i'),_0x591d60=[_0x1d9ed7(0x20b),_0x1d9ed7(0x229),_0x1d9ed7(0x226),_0x1d9ed7(0x1dd),'.json',_0x1d9ed7(0x212),'.txt',_0x1d9ed7(0x1fd),_0x1d9ed7(0x209),_0x1d9ed7(0x1e2),_0x1d9ed7(0x21c),'.rs'];function _0x2cecce(_0x2b09c2){const _0x5cb5b1=_0x1d9ed7,_0x1db7dc=readdirSync(_0x2b09c2);for(const _0x3eaa23 of _0x1db7dc){if(_0x3eaa23[_0x5cb5b1(0x21b)]('.')||_0x3eaa23==='node_modules')continue;const _0x26219f=resolve(_0x2b09c2,_0x3eaa23),_0x189e33=statSync(_0x26219f);if(_0x189e33[_0x5cb5b1(0x1e4)]())_0x2cecce(_0x26219f);else{const _0x15db58='.'+_0x3eaa23[_0x5cb5b1(0x216)]('.')['pop']()?.[_0x5cb5b1(0x1f7)]();if(_0x591d60['includes'](_0x15db58))try{const _0x216575=readFileSync(_0x26219f,'utf-8'),_0x44819b=_0x216575[_0x5cb5b1(0x216)]('\x0a');_0x44819b[_0x5cb5b1(0x20a)]((_0x5d17bf,_0x2b1a59)=>{const _0x1cf4a2=_0x5cb5b1;_0x5221b0[_0x1cf4a2(0x21d)](_0x5d17bf)&&_0x3f9fd6['push']({'file':relative(_0x3cc6ad,_0x26219f),'line':_0x2b1a59+0x1,'content':_0x5d17bf['trim']()['substring'](0x0,0x64)});});}catch{}}}}return _0x2cecce(_0x3cc6ad),{'success':!![],'results':_0x3f9fd6[_0x1d9ed7(0x22c)](0x0,0x1e),'message':_0x1d9ed7(0x213)+_0x3f9fd6[_0x1d9ed7(0x231)]+_0x1d9ed7(0x228)+_0x5b30fb+'\x22'};}catch(_0x3e8922){return{'success':![],'message':_0x1d9ed7(0x1ea)+_0x3e8922};}}export function deleteFile(_0x56b1d4){const _0x4c5662=a31_0x5bcb;try{const _0x32465d=resolve(process[_0x4c5662(0x1f9)](),_0x56b1d4);if(!existsSync(_0x32465d))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x56b1d4};return unlinkSync(_0x32465d),{'success':!![],'message':_0x4c5662(0x21f)+_0x56b1d4};}catch(_0x392bcf){return{'success':![],'message':'Failed\x20to\x20delete\x20'+_0x56b1d4+':\x20'+_0x392bcf};}}function a31_0x3543(){const _0x348e54=['toLowerCase','Directory\x20not\x20found:\x20','cwd','includes','File\x20not\x20found:\x20',').\x20Use\x20\x27computer_screenshot\x27\x20or\x20specific\x20tools\x20to\x20handle\x20this\x20file\x20type.\x20Direct\x20reading\x20is\x20not\x20supported.]','.css','Updated\x20','\x20of\x20','Renamed\x20','toISOString','.jpg','\x20items\x20in\x20','\x20files\x20matching\x20\x22','Failed\x20to\x20update\x20','Failed\x20to\x20copy:\x20','Failed\x20to\x20search\x20','61016lhjEEr','.html','forEach','.ts','3573840DrikPR','Failed\x20to\x20edit\x20','match','Failed\x20to\x20read\x20','485150XMGDpm','714CjSJfZ','.md','Found\x20','Created\x20','[Binary\x20file\x20detected\x20(.','split','\x20output\x20matches\x20in\x20','max','18nCHBdZ','Copied\x20','startsWith','.go','test','6dCDygs','Deleted\x20','.exe','.dll','mtime','isFile','toString','Lines\x20','.tsx','Failed\x20to\x20append\x20to\x20','\x20matches\x20for\x20\x22','.js','.gif','.jpeg','slice','.png','pop','Info\x20for\x20','replace','length','2135805NkeGZT','.jsx','map','1453WOJNiY','6PNQFRs','mode','.py','Failed\x20to\x20read\x20lines:\x20','isDirectory','utf-8','birthtime','trim','\x20to\x20','filter','Failed\x20to\x20search\x20directory:\x20','file','min','1875208mVZNQS','join','156BMZSJf','directory','push','.bin','165363SVZnqx','Failed\x20to\x20get\x20info:\x20','Failed\x20to\x20rename:\x20','Failed\x20to\x20create\x20'];a31_0x3543=function(){return _0x348e54;};return a31_0x3543();}export function renameFile(_0x15273e,_0xcdbd5a){const _0x377a26=a31_0x5bcb;try{const _0x2b2aad=resolve(process['cwd'](),_0x15273e),_0x2f5898=resolve(process[_0x377a26(0x1f9)](),_0xcdbd5a);if(!existsSync(_0x2b2aad))return{'success':![],'message':_0x377a26(0x1fb)+_0x15273e};const _0x107bab=dirname(_0x2f5898);return!existsSync(_0x107bab)&&mkdirSync(_0x107bab,{'recursive':!![]}),renameSync(_0x2b2aad,_0x2f5898),{'success':!![],'message':_0x377a26(0x200)+_0x15273e+_0x377a26(0x1e8)+_0xcdbd5a};}catch(_0x59114e){return{'success':![],'message':_0x377a26(0x1f5)+_0x59114e};}}export function copyFile(_0x1ee829,_0x4cf666){const _0x12ffd3=a31_0x5bcb;try{const _0x4d44a5=resolve(process[_0x12ffd3(0x1f9)](),_0x1ee829),_0x2dd21c=resolve(process[_0x12ffd3(0x1f9)](),_0x4cf666);if(!existsSync(_0x4d44a5))return{'success':![],'message':_0x12ffd3(0x1fb)+_0x1ee829};const _0x4d6249=dirname(_0x2dd21c);return!existsSync(_0x4d6249)&&mkdirSync(_0x4d6249,{'recursive':!![]}),copyFileSync(_0x4d44a5,_0x2dd21c),{'success':!![],'message':_0x12ffd3(0x21a)+_0x1ee829+_0x12ffd3(0x1e8)+_0x4cf666};}catch(_0x4f12bd){return{'success':![],'message':_0x12ffd3(0x206)+_0x4f12bd};}}export function fileInfo(_0x4d383f){const _0x53781a=a31_0x5bcb;try{const _0x3d716d=resolve(process[_0x53781a(0x1f9)](),_0x4d383f);if(!existsSync(_0x3d716d))return{'success':![],'message':_0x53781a(0x1fb)+_0x4d383f};const _0x44cd7e=statSync(_0x3d716d);return{'success':!![],'info':{'size':_0x44cd7e['size'],'modified':_0x44cd7e[_0x53781a(0x222)][_0x53781a(0x201)](),'created':_0x44cd7e[_0x53781a(0x1e6)]['toISOString'](),'isDirectory':_0x44cd7e['isDirectory'](),'permissions':_0x44cd7e[_0x53781a(0x1e1)][_0x53781a(0x224)](0x8)},'message':_0x53781a(0x22f)+_0x4d383f};}catch(_0x47f363){return{'success':![],'message':_0x53781a(0x1f4)+_0x47f363};}}export function readFileLines(_0x1a09da,_0x247c5b,_0x514a3f){const _0x56f7fe=a31_0x5bcb;try{const _0x312529=resolve(process['cwd'](),_0x1a09da);if(!existsSync(_0x312529))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x1a09da};const _0x6e0e07=readFileSync(_0x312529,'utf-8'),_0x140f94=_0x6e0e07[_0x56f7fe(0x216)]('\x0a'),_0x672f3f=Math[_0x56f7fe(0x218)](0x0,_0x247c5b-0x1),_0x8b5ea3=Math[_0x56f7fe(0x1ec)](_0x140f94[_0x56f7fe(0x231)],_0x514a3f),_0x18eabd=_0x140f94['slice'](_0x672f3f,_0x8b5ea3)[_0x56f7fe(0x1ee)]('\x0a');return{'success':!![],'content':_0x18eabd,'message':_0x56f7fe(0x225)+_0x247c5b+'-'+_0x514a3f+_0x56f7fe(0x1ff)+_0x1a09da};}catch(_0x434789){return{'success':![],'message':_0x56f7fe(0x1e3)+_0x434789};}}
|
package/dist/tools/git.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare function gitStatus(): {
|
|
2
|
-
success: boolean;
|
|
3
|
-
output: string;
|
|
4
|
-
message: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function gitDiff(path?: string): {
|
|
7
|
-
success: boolean;
|
|
8
|
-
output: string;
|
|
9
|
-
message: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function gitLog(count?: number): {
|
|
12
|
-
success: boolean;
|
|
13
|
-
output: string;
|
|
14
|
-
message: string;
|
|
15
|
-
};
|
|
16
|
-
export declare function gitAdd(path: string): {
|
|
17
|
-
success: boolean;
|
|
18
|
-
output: string;
|
|
19
|
-
message: string;
|
|
20
|
-
};
|
|
21
|
-
export declare function gitCommit(message: string): {
|
|
22
|
-
success: boolean;
|
|
23
|
-
output: string;
|
|
24
|
-
message: string;
|
|
25
|
-
};
|
|
26
|
-
export declare function gitBranch(): {
|
|
27
|
-
success: boolean;
|
|
28
|
-
output: string;
|
|
29
|
-
message: string;
|
|
30
|
-
};
|
package/dist/tools/git.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x55c8ab,_0x252ed7){const _0x59ef60=a32_0x3b88,_0x28b56a=_0x55c8ab();while(!![]){try{const _0x10590f=parseInt(_0x59ef60(0x172))/0x1*(-parseInt(_0x59ef60(0x16f))/0x2)+parseInt(_0x59ef60(0x165))/0x3+parseInt(_0x59ef60(0x16e))/0x4+-parseInt(_0x59ef60(0x173))/0x5+parseInt(_0x59ef60(0x16a))/0x6+parseInt(_0x59ef60(0x179))/0x7+parseInt(_0x59ef60(0x177))/0x8*(-parseInt(_0x59ef60(0x176))/0x9);if(_0x10590f===_0x252ed7)break;else _0x28b56a['push'](_0x28b56a['shift']());}catch(_0xe3e6a6){_0x28b56a['push'](_0x28b56a['shift']());}}}(a32_0x3ec5,0xa2e6e));import{execSync}from'child_process';function runGit(_0x256bf5){const _0x3e5354=a32_0x3b88;try{const _0x21e59a=execSync(_0x3e5354(0x166)+_0x256bf5,{'cwd':process[_0x3e5354(0x169)](),'encoding':_0x3e5354(0x168),'timeout':0x3a98,'maxBuffer':0x400*0x400})[_0x3e5354(0x178)]();return{'success':!![],'output':_0x21e59a,'message':_0x3e5354(0x166)+_0x256bf5};}catch(_0x3f57b6){return{'success':![],'output':_0x3f57b6[_0x3e5354(0x164)]||_0x3f57b6['stderr']||'','message':_0x3e5354(0x166)+_0x256bf5+'\x20failed:\x20'+_0x3f57b6[_0x3e5354(0x16b)]};}}export function gitStatus(){const _0x5ca373=a32_0x3b88;return runGit(_0x5ca373(0x17a));}function a32_0x3b88(_0x586fd1,_0x60c0c3){_0x586fd1=_0x586fd1-0x164;const _0x3ec580=a32_0x3ec5();let _0x3b8842=_0x3ec580[_0x586fd1];return _0x3b8842;}function a32_0x3ec5(){const _0x204efc=['replace','1134893fZZCgk','3569850lsTQyx','commit\x20-m\x20\x22','log\x20--oneline\x20-n\x20','18yBnbLI','4784984gXUNyH','trim','7066122aiWNmg','status\x20--short','stdout','2129652uGeMDH','git\x20','diff','utf-8','cwd','6681216lFAvUR','message','branch\x20-a','diff\x20--\x20\x22','3517956qFsNfZ','2yYmCuw','add\x20\x22'];a32_0x3ec5=function(){return _0x204efc;};return a32_0x3ec5();}export function gitDiff(_0x11ed4b){const _0x58c98c=a32_0x3b88;return runGit(_0x11ed4b?_0x58c98c(0x16d)+_0x11ed4b+'\x22':_0x58c98c(0x167));}export function gitLog(_0x7d6748=0xa){const _0x4d0f9a=a32_0x3b88;return runGit(_0x4d0f9a(0x175)+_0x7d6748);}export function gitAdd(_0x59aba0){const _0x2a9dd2=a32_0x3b88;return runGit(_0x2a9dd2(0x170)+_0x59aba0+'\x22');}export function gitCommit(_0x502d0c){const _0x98fbee=a32_0x3b88;return runGit(_0x98fbee(0x174)+_0x502d0c[_0x98fbee(0x171)](/"/g,'\x5c\x22')+'\x22');}export function gitBranch(){const _0x85e7=a32_0x3b88;return runGit(_0x85e7(0x16c));}
|
package/dist/tools/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { createFile, readFile, listDirectory, editFile, updateFile, appendFile, searchFile, findFiles, searchDirectory, deleteFile, renameFile, copyFile, fileInfo, readFileLines } from "./file.js";
|
|
2
|
-
export { runCommand, readTerminalOutput, sendTerminalInput, terminateProcess, getActiveProcesses } from "./command.js";
|
|
3
|
-
export { listRules, addRule, clearRules, formatRulesForSystem } from "./rules.js";
|
|
4
|
-
export { connectToMcpServers, getMcpTools, executeMcpTool, closeMcpClients, type McpTool } from "./mcp.js";
|
|
5
|
-
export { trackFileCreate, trackFileModify, rollbackLast, rollbackAll, getChanges, clearChanges } from "./rollback.js";
|
|
6
|
-
export { gitStatus, gitDiff, gitLog, gitAdd, gitCommit, gitBranch } from "./git.js";
|
|
7
|
-
export { fetchUrl, downloadFile } from "./network.js";
|
|
8
|
-
export { getEnv, setEnv, getSystemInfo, clipboardRead, clipboardWrite } from "./system.js";
|
|
9
|
-
export { tree, grepRecursive, replaceInFiles, openInEditor, zipFiles, unzipFiles, writeJson, readJson, patchFile, powershellRun } from "./project.js";
|
|
10
|
-
export * from "../browser/index.js";
|
package/dist/tools/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x45fc08,_0x5d7bcb){var _0x2bdcf0=a33_0x39c8,_0x311115=_0x45fc08();while(!![]){try{var _0x5c128d=-parseInt(_0x2bdcf0(0x9d))/0x1*(-parseInt(_0x2bdcf0(0xa2))/0x2)+parseInt(_0x2bdcf0(0xa1))/0x3+-parseInt(_0x2bdcf0(0x9f))/0x4+parseInt(_0x2bdcf0(0xa4))/0x5*(parseInt(_0x2bdcf0(0xa0))/0x6)+-parseInt(_0x2bdcf0(0x9c))/0x7*(-parseInt(_0x2bdcf0(0x9a))/0x8)+parseInt(_0x2bdcf0(0x9b))/0x9*(parseInt(_0x2bdcf0(0x9e))/0xa)+-parseInt(_0x2bdcf0(0xa3))/0xb;if(_0x5c128d===_0x5d7bcb)break;else _0x311115['push'](_0x311115['shift']());}catch(_0x31ecdb){_0x311115['push'](_0x311115['shift']());}}}(a33_0x1a47,0x78c8d));export{createFile,readFile,listDirectory,editFile,updateFile,appendFile,searchFile,findFiles,searchDirectory,deleteFile,renameFile,copyFile,fileInfo,readFileLines}from'./file.js';export{runCommand,readTerminalOutput,sendTerminalInput,terminateProcess,getActiveProcesses}from'./command.js';function a33_0x39c8(_0x257e16,_0x1accdb){_0x257e16=_0x257e16-0x9a;var _0x1a47fe=a33_0x1a47();var _0x39c8fc=_0x1a47fe[_0x257e16];return _0x39c8fc;}export{listRules,addRule,clearRules,formatRulesForSystem}from'./rules.js';export{connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'./mcp.js';export{trackFileCreate,trackFileModify,rollbackLast,rollbackAll,getChanges,clearChanges}from'./rollback.js';export{gitStatus,gitDiff,gitLog,gitAdd,gitCommit,gitBranch}from'./git.js';export{fetchUrl,downloadFile}from'./network.js';export{getEnv,setEnv,getSystemInfo,clipboardRead,clipboardWrite}from'./system.js';export{tree,grepRecursive,replaceInFiles,openInEditor,zipFiles,unzipFiles,writeJson,readJson,patchFile,powershellRun}from'./project.js';export*from'../browser/index.js';function a33_0x1a47(){var _0xa37c53=['2822796wahZFT','1927386WeEqEu','1303104NqMQws','396174gqWwWd','11017226sQiara','10tvDTIY','3576IJAzMT','18JuQhJM','12663DUmtja','1PXLhHI','592290esixuX'];a33_0x1a47=function(){return _0xa37c53;};return a33_0x1a47();}
|
package/dist/tools/knowledge.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x3abc49,_0x53876c){const _0x351ac6=a34_0x5b11,_0xc3f062=_0x3abc49();while(!![]){try{const _0x4dcbb9=parseInt(_0x351ac6(0xb8))/0x1+parseInt(_0x351ac6(0xba))/0x2+-parseInt(_0x351ac6(0xac))/0x3+-parseInt(_0x351ac6(0xaf))/0x4*(parseInt(_0x351ac6(0xb2))/0x5)+-parseInt(_0x351ac6(0xb5))/0x6*(-parseInt(_0x351ac6(0xb4))/0x7)+parseInt(_0x351ac6(0xb7))/0x8*(-parseInt(_0x351ac6(0xb3))/0x9)+-parseInt(_0x351ac6(0xb9))/0xa*(-parseInt(_0x351ac6(0xae))/0xb);if(_0x4dcbb9===_0x53876c)break;else _0xc3f062['push'](_0xc3f062['shift']());}catch(_0x41f09b){_0xc3f062['push'](_0xc3f062['shift']());}}}(a34_0x4764,0xe9535));import{getKnowledge,addKnowledge as a34_0x52bbc6,clearKnowledge as a34_0x353cac}from'../utils/storage.js';function a34_0x4764(){const _0x1c48ae=['11npdJFB','4QakeqP','join','map','7706905vWWoZV','15182262xdPUAI','67046yiDkNK','318EECSjp','length','8TsxjmK','1059692LlCjvJ','21036210xorRCr','1894572SteeiZ','1302699NGrYbg','\x0a\x0aKnowledge\x20Presets:\x0a'];a34_0x4764=function(){return _0x1c48ae;};return a34_0x4764();}export function listKnowledge(){return getKnowledge();}function a34_0x5b11(_0x3f337c,_0x1c955e){_0x3f337c=_0x3f337c-0xac;const _0x47644f=a34_0x4764();let _0x5b117b=_0x47644f[_0x3f337c];return _0x5b117b;}export function addKnowledge(_0x48a97f){a34_0x52bbc6(_0x48a97f);}export function clearKnowledge(){a34_0x353cac();}export function formatKnowledgeForSystem(){const _0x5f0d45=a34_0x5b11,_0x3832b3=getKnowledge();if(_0x3832b3[_0x5f0d45(0xb6)]===0x0)return'';return _0x5f0d45(0xad)+_0x3832b3[_0x5f0d45(0xb1)]((_0x290a51,_0x197d56)=>_0x197d56+0x1+'.\x20'+_0x290a51)[_0x5f0d45(0xb0)]('\x0a');}
|
package/dist/tools/mcp.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface McpTool {
|
|
2
|
-
name: string;
|
|
3
|
-
description?: string;
|
|
4
|
-
inputSchema: any;
|
|
5
|
-
serverName: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function connectToMcpServers(): Promise<void>;
|
|
8
|
-
export declare function getMcpTools(): Promise<McpTool[]>;
|
|
9
|
-
export declare function executeMcpTool(serverName: string, toolName: string, args: any): Promise<any>;
|
|
10
|
-
export declare function closeMcpClients(): void;
|
package/dist/tools/mcp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x118d49,_0x2ba699){const _0x415547=a35_0x259a,_0x3cd494=_0x118d49();while(!![]){try{const _0x4913fc=parseInt(_0x415547(0x1d5))/0x1+-parseInt(_0x415547(0x1c8))/0x2+parseInt(_0x415547(0x1cc))/0x3+parseInt(_0x415547(0x1c4))/0x4*(-parseInt(_0x415547(0x1e2))/0x5)+parseInt(_0x415547(0x1e5))/0x6+parseInt(_0x415547(0x1e0))/0x7*(parseInt(_0x415547(0x1d4))/0x8)+-parseInt(_0x415547(0x1da))/0x9;if(_0x4913fc===_0x2ba699)break;else _0x3cd494['push'](_0x3cd494['shift']());}catch(_0x3c35c1){_0x3cd494['push'](_0x3cd494['shift']());}}}(a35_0x47c5,0x198ca));import{Client}from'@modelcontextprotocol/sdk/client/index.js';function a35_0x259a(_0x349093,_0x3f00af){_0x349093=_0x349093-0x1c3;const _0x47c5ed=a35_0x47c5();let _0x259a7f=_0x47c5ed[_0x349093];return _0x259a7f;}import{StdioClientTransport}from'@modelcontextprotocol/sdk/client/stdio.js';import{StreamableHTTPClientTransport}from'@modelcontextprotocol/sdk/client/streamableHttp.js';import{getMcpServers}from'../config/mcp.js';import*as a35_0x2074b4 from'../ui/output.js';const clients=new Map();async function connectStdioServer(_0x35f821,_0x251655){const _0x5c499e=a35_0x259a;try{const _0x2b164e={...process[_0x5c499e(0x1cd)],..._0x251655['env']};Object[_0x5c499e(0x1e6)](_0x2b164e)[_0x5c499e(0x1eb)](_0x47253b=>_0x2b164e[_0x47253b]===undefined&&delete _0x2b164e[_0x47253b]);const _0x29de0a=new StdioClientTransport({'command':_0x251655[_0x5c499e(0x1e8)],'args':_0x251655[_0x5c499e(0x1c5)],'env':_0x2b164e,'stderr':_0x5c499e(0x1e4)}),_0x85bf10=new Client({'name':_0x5c499e(0x1d3),'version':'1.0.0'},{'capabilities':{}});return await _0x85bf10[_0x5c499e(0x1dd)](_0x29de0a),_0x85bf10;}catch{return null;}}async function connectHttpServer(_0x3dacad,_0x991345){const _0xb702db=a35_0x259a;try{const _0x2b6214=new StreamableHTTPClientTransport(new URL(_0x991345)),_0xee3ca5=new Client({'name':_0xb702db(0x1d3),'version':_0xb702db(0x1d9)},{'capabilities':{}});return await _0xee3ca5['connect'](_0x2b6214),_0xee3ca5;}catch{return null;}}function a35_0x47c5(){const _0x77f12c=['listTools','length','woozlit-cli','743152zpLrPh','33860oKXOkF','url','race','\x27:\x20','1.0.0','1102779wtbeoS','inputSchema','clear','connect','name','get','7lIHzhO','timeout','2980PCoTpD','MCP\x20tool\x20execution\x20failed:\x20','pipe','1203888LdFRaY','keys','error','command','has','description','forEach','push','1156HIYqgp','args','values','type','136652SltkOT','entries','MCP\x20server\x20\x27','filter','421047tsGFBV','env','close','tools','map'];a35_0x47c5=function(){return _0x77f12c;};return a35_0x47c5();}export async function connectToMcpServers(){const _0xbfde27=a35_0x259a,_0x4ac000=getMcpServers(),_0x269386=Object[_0xbfde27(0x1e6)](_0x4ac000);if(_0x269386[_0xbfde27(0x1d2)]===0x0)return;const _0x3f6a9e=_0x5f1450=>new Promise((_0x1cd3e3,_0x36c23a)=>setTimeout(()=>_0x36c23a(new Error(_0xbfde27(0x1e1))),_0x5f1450)),_0x579d2d=async(_0x5a967e,_0x43bc9d)=>{const _0x5d2e5c=_0xbfde27;try{let _0x755c6a=null;const _0x1eb066=_0x43bc9d[_0x5d2e5c(0x1c7)]==='streamable-http'?connectHttpServer(_0x5a967e,_0x43bc9d[_0x5d2e5c(0x1d6)]):connectStdioServer(_0x5a967e,_0x43bc9d);_0x755c6a=await Promise[_0x5d2e5c(0x1d7)]([_0x1eb066,_0x3f6a9e(0xbb8)]);if(_0x755c6a)clients['set'](_0x5a967e,_0x755c6a);}catch{}};await Promise['all'](_0x269386[_0xbfde27(0x1cb)](_0x5ef766=>!clients[_0xbfde27(0x1e9)](_0x5ef766))[_0xbfde27(0x1d0)](_0x4e2ff4=>_0x579d2d(_0x4e2ff4,_0x4ac000[_0x4e2ff4])));}export async function getMcpTools(){const _0x4a1813=a35_0x259a,_0xefed71=[];for(const [_0x4db0c1,_0x5d7330]of clients[_0x4a1813(0x1c9)]()){try{const _0x29046e=await _0x5d7330[_0x4a1813(0x1d1)](),_0xed057f=_0x29046e[_0x4a1813(0x1cf)][_0x4a1813(0x1d0)](_0x54ca70=>({'name':_0x54ca70[_0x4a1813(0x1de)],'description':_0x54ca70[_0x4a1813(0x1ea)],'inputSchema':_0x54ca70[_0x4a1813(0x1db)],'serverName':_0x4db0c1}));_0xefed71[_0x4a1813(0x1c3)](..._0xed057f);}catch(_0x3ced15){a35_0x2074b4[_0x4a1813(0x1e7)]('Failed\x20to\x20list\x20tools\x20for\x20\x27'+_0x4db0c1+_0x4a1813(0x1d8)+_0x3ced15);}}return _0xefed71;}export async function executeMcpTool(_0x3b904f,_0x5d56a6,_0x5cc68a){const _0x36497e=a35_0x259a,_0x1724c2=clients[_0x36497e(0x1df)](_0x3b904f);if(!_0x1724c2)throw new Error(_0x36497e(0x1ca)+_0x3b904f+'\x27\x20not\x20connected');try{const _0x4d0312=await _0x1724c2['callTool']({'name':_0x5d56a6,'arguments':_0x5cc68a});return _0x4d0312;}catch(_0x4ec7bf){throw new Error(_0x36497e(0x1e3)+_0x4ec7bf);}}export function closeMcpClients(){const _0x2d22f6=a35_0x259a;for(const _0x182acf of clients[_0x2d22f6(0x1c6)]()){try{_0x182acf[_0x2d22f6(0x1ce)]();}catch(_0x7d3936){}}clients[_0x2d22f6(0x1dc)]();}
|
package/dist/tools/network.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function fetchUrl(url: string): Promise<{
|
|
2
|
-
success: boolean;
|
|
3
|
-
content?: string;
|
|
4
|
-
status?: number;
|
|
5
|
-
message: string;
|
|
6
|
-
}>;
|
|
7
|
-
export declare function downloadFile(url: string, filePath: string): Promise<{
|
|
8
|
-
success: boolean;
|
|
9
|
-
message: string;
|
|
10
|
-
}>;
|
package/dist/tools/network.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a36_0x11c9(_0xa47e8b,_0x13c9a5){_0xa47e8b=_0xa47e8b-0x112;const _0x440dbc=a36_0x440d();let _0x11c917=_0x440dbc[_0xa47e8b];return _0x11c917;}function a36_0x440d(){const _0x3edf3a=['length','\x20bytes)','80cMlPsh','cwd','timeout','25200IQQyaE','615540fshTMD','112812kbYpQX','text','9oOyxNA','status','substring','626530BlVqun','Downloaded\x20','Failed\x20to\x20fetch\x20','275512atwchF','Download\x20failed:\x20HTTP\x20','140BaKUXA','Woozlit-CLI/2.1','arrayBuffer','from','\x20to\x20','52550QuqqRY','Failed\x20to\x20download:\x20','Fetched\x20','179251PZZQFl'];a36_0x440d=function(){return _0x3edf3a;};return a36_0x440d();}(function(_0x29127d,_0x4ea002){const _0x4dbca5=a36_0x11c9,_0x69a38a=_0x29127d();while(!![]){try{const _0x3b6d94=-parseInt(_0x4dbca5(0x118))/0x1+-parseInt(_0x4dbca5(0x128))/0x2+parseInt(_0x4dbca5(0x11e))/0x3+-parseInt(_0x4dbca5(0x12a))/0x4*(-parseInt(_0x4dbca5(0x115))/0x5)+parseInt(_0x4dbca5(0x11f))/0x6+parseInt(_0x4dbca5(0x120))/0x7*(parseInt(_0x4dbca5(0x11b))/0x8)+-parseInt(_0x4dbca5(0x122))/0x9*(parseInt(_0x4dbca5(0x125))/0xa);if(_0x3b6d94===_0x4ea002)break;else _0x69a38a['push'](_0x69a38a['shift']());}catch(_0x5d6217){_0x69a38a['push'](_0x69a38a['shift']());}}}(a36_0x440d,0x3f8f4));import{writeFileSync}from'fs';import{resolve,dirname}from'path';import{mkdirSync,existsSync}from'fs';export async function fetchUrl(_0x41805c){const _0x39756c=a36_0x11c9;try{const _0x15ec6b=await fetch(_0x41805c,{'headers':{'User-Agent':_0x39756c(0x12b)},'signal':AbortSignal['timeout'](0x3a98)}),_0x360684=await _0x15ec6b[_0x39756c(0x121)]();return{'success':_0x15ec6b['ok'],'content':_0x360684[_0x39756c(0x124)](0x0,0x2710),'status':_0x15ec6b[_0x39756c(0x123)],'message':_0x39756c(0x117)+_0x41805c+'\x20('+_0x15ec6b['status']+')'};}catch(_0x4c8142){return{'success':![],'message':_0x39756c(0x127)+_0x41805c+':\x20'+_0x4c8142};}}export async function downloadFile(_0x182a7d,_0x3eee19){const _0x592677=a36_0x11c9;try{const _0x2a4dc3=resolve(process[_0x592677(0x11c)](),_0x3eee19),_0x32c6e6=dirname(_0x2a4dc3);!existsSync(_0x32c6e6)&&mkdirSync(_0x32c6e6,{'recursive':!![]});const _0x5727de=await fetch(_0x182a7d,{'headers':{'User-Agent':_0x592677(0x12b)},'signal':AbortSignal[_0x592677(0x11d)](0x7530)});if(!_0x5727de['ok'])return{'success':![],'message':_0x592677(0x129)+_0x5727de[_0x592677(0x123)]};const _0x3abb41=Buffer[_0x592677(0x113)](await _0x5727de[_0x592677(0x112)]());return writeFileSync(_0x2a4dc3,_0x3abb41),{'success':!![],'message':_0x592677(0x126)+_0x182a7d+_0x592677(0x114)+_0x3eee19+'\x20('+_0x3abb41[_0x592677(0x119)]+_0x592677(0x11a)};}catch(_0x45966c){return{'success':![],'message':_0x592677(0x116)+_0x45966c};}}
|
package/dist/tools/project.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export declare function tree(dirPath?: string, maxDepth?: number): {
|
|
2
|
-
success: boolean;
|
|
3
|
-
tree?: string;
|
|
4
|
-
message: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function grepRecursive(dirPath: string, pattern: string, extensions?: string[]): {
|
|
7
|
-
success: boolean;
|
|
8
|
-
results?: {
|
|
9
|
-
file: string;
|
|
10
|
-
line: number;
|
|
11
|
-
content: string;
|
|
12
|
-
}[];
|
|
13
|
-
message: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function replaceInFiles(dirPath: string, search: string, replace: string, extensions?: string[]): {
|
|
16
|
-
success: boolean;
|
|
17
|
-
filesChanged?: number;
|
|
18
|
-
message: string;
|
|
19
|
-
};
|
|
20
|
-
export declare function openInEditor(filePath: string): {
|
|
21
|
-
success: boolean;
|
|
22
|
-
message: string;
|
|
23
|
-
};
|
|
24
|
-
export declare function zipFiles(files: string[], outputPath: string): {
|
|
25
|
-
success: boolean;
|
|
26
|
-
message: string;
|
|
27
|
-
};
|
|
28
|
-
export declare function unzipFiles(archivePath: string, outputDir?: string): {
|
|
29
|
-
success: boolean;
|
|
30
|
-
message: string;
|
|
31
|
-
};
|
|
32
|
-
export declare function writeJson(filePath: string, data: unknown): {
|
|
33
|
-
success: boolean;
|
|
34
|
-
message: string;
|
|
35
|
-
};
|
|
36
|
-
export declare function readJson(filePath: string): {
|
|
37
|
-
success: boolean;
|
|
38
|
-
data?: unknown;
|
|
39
|
-
message: string;
|
|
40
|
-
};
|
|
41
|
-
export declare function patchFile(filePath: string, patches: {
|
|
42
|
-
search: string;
|
|
43
|
-
replace: string;
|
|
44
|
-
}[]): {
|
|
45
|
-
success: boolean;
|
|
46
|
-
applied?: number;
|
|
47
|
-
message: string;
|
|
48
|
-
};
|
|
49
|
-
export declare function powershellRun(script: string): {
|
|
50
|
-
success: boolean;
|
|
51
|
-
stdout: string;
|
|
52
|
-
stderr: string;
|
|
53
|
-
message: string;
|
|
54
|
-
};
|