woozlit 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/login.js +1 -1
- package/dist/chat/agent.js +1 -1
- package/dist/config/mcp.js +1 -1
- package/dist/config/settings.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp-servers/computer-use.js +1 -1
- package/dist/tools/command.js +1 -1
- package/dist/tools/file.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/mcp.js +1 -1
- package/dist/tools/rules.js +1 -1
- package/dist/ui/output.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/utils/api.js +1 -1
- package/dist/utils/storage.js +1 -1
- package/package.json +1 -1
package/dist/auth/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe19739,_0x4627b5){const _0xfd1786=a0_0x3f7a,_0x1327d6=_0xe19739();while(!![]){try{const _0x422cf0=parseInt(_0xfd1786(0x1fd))/0x1+parseInt(_0xfd1786(0x1f7))/0x2*(-parseInt(_0xfd1786(0x206))/0x3)+-parseInt(_0xfd1786(0x208))/0x4+parseInt(_0xfd1786(0x209))/0x5+-parseInt(_0xfd1786(0x1f4))/0x6*(-parseInt(_0xfd1786(0x1fb))/0x7)+-parseInt(_0xfd1786(0x204))/0x8+parseInt(_0xfd1786(0x205))/0x9*(parseInt(_0xfd1786(0x1f8))/0xa);if(_0x422cf0===_0x4627b5)break;else _0x1327d6['push'](_0x1327d6['shift']());}catch(_0x574a5e){_0x1327d6['push'](_0x1327d6['shift']());}}}(a0_0x1922,0x5c0f7));import a0_0x17cf40 from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x53f364}from'../utils/storage.js';function a0_0x3f7a(_0x1025e1,_0x1f1a35){_0x1025e1=_0x1025e1-0x1f2;const _0x192210=a0_0x1922();let _0x3f7a37=_0x192210[_0x1025e1];return _0x3f7a37;}export async function login(){const _0x5c1a9=getApiUrl(),_0x32a0a4=0x2694;return new Promise(_0x34a33d=>{const _0x8396e1=a0_0x3f7a,_0x42bfa1=createServer(async(_0x401290,_0x1fb0dd)=>{const _0x3812d3=a0_0x3f7a,_0x200eeb=new URL(_0x401290[_0x3812d3(0x200)]||'',_0x3812d3(0x203)+_0x32a0a4);if(_0x200eeb[_0x3812d3(0x20a)]===_0x3812d3(0x1fc)){const _0x3dd338=_0x200eeb[_0x3812d3(0x20b)][_0x3812d3(0x201)](_0x3812d3(0x1ff)),_0x110c1b=_0x200eeb[_0x3812d3(0x20b)]['get'](_0x3812d3(0x1f3)),_0x507687=_0x200eeb[_0x3812d3(0x20b)]['get']('email'),_0x344dd7=_0x200eeb[_0x3812d3(0x20b)][_0x3812d3(0x201)](_0x3812d3(0x1fe));_0x3dd338&&_0x110c1b?(setToken(_0x3dd338),setUser(_0x110c1b,_0x507687||'',_0x344dd7||''),_0x1fb0dd[_0x3812d3(0x207)](0xc8,{'Content-Type':_0x3812d3(0x1f6)}),_0x1fb0dd['end']('\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<title>Woozlit\x20CLI</title>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20body\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20font-family:\x20system-ui,\x20-apple-system,\x20sans-serif;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20height:\x20100vh;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#0a0a0a;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#fff;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.container\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20padding:\x202rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20h1\x20{\x20color:\x20#10b981;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20p\x20{\x20color:\x20#9ca3af;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22container\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1>Login\x20Successful</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>You\x20can\x20close\x20this\x20window\x20and\x20return\x20to\x20the\x20terminal.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'),_0x42bfa1[_0x3812d3(0x1f9)](),_0x34a33d(!![])):(_0x1fb0dd[_0x3812d3(0x207)](0x190,{'Content-Type':_0x3812d3(0x1f6)}),_0x1fb0dd[_0x3812d3(0x1f5)](_0x3812d3(0x1fa)),_0x42bfa1[_0x3812d3(0x1f9)](),_0x34a33d(![]));}});_0x42bfa1[_0x8396e1(0x202)](_0x32a0a4,()=>{const _0x195b47=_0x8396e1,_0x17537b=_0x5c1a9+_0x195b47(0x1f2)+_0x32a0a4+_0x195b47(0x1fc);a0_0x17cf40(_0x17537b);}),setTimeout(()=>{const _0x5f1d48=_0x8396e1;_0x42bfa1[_0x5f1d48(0x1f9)](),_0x34a33d(![]);},0x1d4c0);});}export function logout(){a0_0x53f364();}function a0_0x1922(){const _0xd7984d=['userId','891102mMGPqx','end','text/html','4PmlHfL','10KVcRBM','close','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head><title>Woozlit\x20CLI</title></head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body\x20style=\x22font-family:\x20sans-serif;\x20text-align:\x20center;\x20padding:\x202rem;\x20background:\x20#0a0a0a;\x20color:\x20#fff;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1\x20style=\x22color:\x20#ef4444;\x22>Login\x20Failed</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Missing\x20authentication\x20data.\x20Please\x20try\x20again.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','21ILELeQ','/callback','361969PTaAXy','displayName','token','url','get','listen','http://localhost:','5140440zhXBaW','5024790UqgoKB','761268pnsSAi','writeHead','760872YwaiCS','1757670GeErLP','pathname','searchParams','/auth/cli?callback=http://localhost:'];a0_0x1922=function(){return _0xd7984d;};return a0_0x1922();}export{isLoggedIn};
|
package/dist/chat/agent.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a1_0x334ecd=a1_0x4a59;(function(_0x24f53f,_0x21212e){const _0x3fcce8=a1_0x4a59,_0x109bd9=_0x24f53f();while(!![]){try{const _0x5cec41=parseInt(_0x3fcce8(0xd8))/0x1*(parseInt(_0x3fcce8(0xf4))/0x2)+parseInt(_0x3fcce8(0xd5))/0x3+-parseInt(_0x3fcce8(0xe7))/0x4+-parseInt(_0x3fcce8(0xe5))/0x5*(-parseInt(_0x3fcce8(0xdb))/0x6)+-parseInt(_0x3fcce8(0xc8))/0x7+parseInt(_0x3fcce8(0x94))/0x8*(-parseInt(_0x3fcce8(0xf9))/0x9)+-parseInt(_0x3fcce8(0xe6))/0xa*(parseInt(_0x3fcce8(0xbe))/0xb);if(_0x5cec41===_0x21212e)break;else _0x109bd9['push'](_0x109bd9['shift']());}catch(_0x1f1b36){_0x109bd9['push'](_0x109bd9['shift']());}}}(a1_0x5816,0x76b33));function a1_0x4a59(_0x316383,_0x584263){_0x316383=_0x316383-0x92;const _0x581637=a1_0x5816();let _0x4a59f5=_0x581637[_0x316383];return _0x4a59f5;}import{input}from'@inquirer/prompts';import{sendChatMessage,getUserUsage}from'../utils/api.js';import{getSelectedModel,getUser}from'../utils/storage.js';function a1_0x5816(){const _0x392146=['170511rbxdfi','Fetching\x20usage...','Tips\x20for\x20getting\x20started:','write','isOverLimit','Creating...','Reading...','trim','createSpinner','monthlyLimit','743988ZhFerb','You\x20are\x20Woozlit\x20AI,\x20a\x20powerful\x20agentic\x20coding\x20assistant.\x20You\x20help\x20users\x20with\x20coding\x20tasks\x20by\x20executing\x20actions\x20until\x20the\x20task\x20is\x20complete.\x0a\x0aYou\x20have\x20access\x20to\x20the\x20following\x20tools:\x0a-\x20create_file(path,\x20content):\x20Create\x20a\x20new\x20file\x20with\x20the\x20given\x20content\x0a-\x20read_file(path):\x20Read\x20the\x20contents\x20of\x20a\x20file\x0a-\x20list_directory(path):\x20List\x20files\x20and\x20directories\x0a-\x20edit_file(path,\x20search,\x20replace):\x20Edit\x20a\x20file\x20by\x20replacing\x20text\x0a-\x20search_file(path,\x20pattern):\x20Search\x20for\x20a\x20regex\x20pattern\x20in\x20a\x20file\x0a-\x20run_command(command,\x20background?,\x20wait?):\x20Execute\x20a\x20shell\x20command.\x20Set\x20background=true\x20to\x20run\x20detached.\x20wait=time_in_ms\x20(default\x203000)\x20for\x20background\x20check.\x0a\x0aYou\x20have\x20full\x20access\x20to\x20the\x20system.\x20You\x20can\x20install\x20packages,\x20run\x20servers,\x20and\x20modify\x20files.\x0aIf\x20you\x20encounter\x20an\x20error\x20(e.g.,\x20missing\x20package,\x20syntax\x20error),\x20you\x20MUST\x20attempt\x20to\x20fix\x20it\x20yourself\x20immediately.\x0aDo\x20not\x20ask\x20for\x20permission\x20to\x20fix\x20errors.\x20Just\x20fix\x20them\x20and\x20continue.\x0aYou\x20can\x20run\x20any\x20command\x20necessary\x20to\x20complete\x20the\x20task.\x0a\x0aWhen\x20the\x20user\x20gives\x20you\x20a\x20task:\x0a1.\x20Analyze\x20what\x20needs\x20to\x20be\x20done.\x0a2.\x20If\x20the\x20task\x20is\x20complex\x20or\x20long-running,\x20create\x20a\x20file\x20named\x20\x22info.woozlit\x22\x20to\x20store\x20your\x20plan\x20and\x20track\x20your\x20progress.\x0a3.\x20Execute\x20the\x20necessary\x20actions\x20step\x20by\x20step.\x0a4.\x20Continue\x20until\x20the\x20task\x20is\x20complete.\x0a5.\x20Report\x20what\x20you\x20accomplished.\x0a\x0aTo\x20use\x20a\x20tool,\x20respond\x20with\x20a\x20JSON\x20block\x20like\x20this:\x0a```tool\x0a{\x22name\x22:\x20\x22create_file\x22,\x20\x22args\x22:\x20{\x22path\x22:\x20\x22hello.txt\x22,\x20\x22content\x22:\x20\x22Hello\x20World\x22}}\x0a```\x0a','usageBox','/quit','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','isSpinning','run_command','\x0aYou\x20are\x20running\x20on\x20','/model','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','\x20>\x20','#2563eb','force\x20closed','2231517dnzjnA','Loaded\x20','No\x20MCP\x20tools\x20loaded.','43330uscYLe','startsWith','MCP\x20Tool\x20error:\x20','6TtaZxN','Model\x20changed\x20to:\x20','```','replace','edit_file','No\x20MCP\x20tools\x20connected.','win32','includes','Listing...','slice','3284185gCDlOG','30aovbuH','2262236FhBFog','Unknown','args','Conversation\x20cleared','start','\x20\x20/usage\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','dim','name','stop','Failed\x20JSON\x20content:','\x20\x20/model\x20\x20\x20-\x20Switch\x20AI\x20model','edit','search','28ULsKlY','map','toolActivity','tokensUsed','Goodbye!','45vyilsW','email','/help','description','Unix/Mac','match','Done\x20in\x20','read','length','info','Running...','join','3.\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/help\x20for\x20more.','/exit','Thinking...','1284408nCxuaf','```tool','API\x20error:\x20','forEach','push','/stats','Commands','stdout','list','warn','actionSpinner','Unexpected\x20error:\x20','user','pattern','now','\x20\x20/help\x20\x20\x20\x20-\x20Show\x20this\x20help','platform','create_file','parse','header','Editing...','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','path','serverName','error','Tool\x20result\x20for\x20','aiMessage','assistant','message','commandOutput','read_file','toFixed','Unknown\x20tool','\x20MCP\x20tools:\x20','statusBar','Reached\x20maximum\x20iterations','content','\x20\x20/clear\x20\x20\x20-\x20Clear\x20conversation\x20history','Unknown\x20tool:\x20','displayName','keys','\x20\x20/exit\x20\x20\x20\x20-\x20Exit\x20the\x20chat'];a1_0x5816=function(){return _0x392146;};return a1_0x5816();}import{formatRulesForSystem}from'../tools/rules.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import*as a1_0x49d101 from'../ui/output.js';import{selectModel}from'../ui/select.js';const SYSTEM_PROMPT=a1_0x334ecd(0xc9);export async function startChat(_0x3bd63c){const _0x210bca=a1_0x334ecd,_0x2b805e=getSelectedModel();await connectToMcpServers();const _0x120ec7=await getMcpTools();_0x120ec7[_0x210bca(0x101)]>0x0?a1_0x49d101[_0x210bca(0xed)](_0x210bca(0xd6)+_0x120ec7[_0x210bca(0x101)]+_0x210bca(0xb5)+_0x120ec7[_0x210bca(0xf5)](_0x4876eb=>_0x4876eb[_0x210bca(0xee)])['join'](',\x20')):a1_0x49d101[_0x210bca(0xed)](_0x210bca(0xd7));process['on']('exit',()=>closeMcpClients());const _0x568d8d=formatRulesForSystem(),_0x2037d9=process[_0x210bca(0xa4)]===_0x210bca(0xe1)?'Windows':_0x210bca(0xfd),_0x187a02=_0x120ec7[_0x210bca(0x101)]>0x0?_0x210bca(0xa9)+_0x120ec7[_0x210bca(0xf5)](_0x5dd250=>{const _0x211b3a=_0x210bca,_0x316715=Object[_0x211b3a(0xbc)](_0x5dd250['inputSchema']?.['properties']||{})[_0x211b3a(0x104)](',\x20');return'-\x20'+_0x5dd250[_0x211b3a(0xee)]+'('+_0x316715+'):\x20'+_0x5dd250[_0x211b3a(0xfc)];})[_0x210bca(0x104)]('\x0a'):'',_0x398903=SYSTEM_PROMPT+_0x187a02+(_0x210bca(0xcf)+_0x2037d9+'.\x0a')+_0x568d8d,_0x2b0375=getUser(),_0x1ab203=[{'role':'system','content':_0x398903}];a1_0x49d101['dim']('');(_0x2b0375[_0x210bca(0xbb)]||_0x2b0375[_0x210bca(0xfa)])&&a1_0x49d101['loggedInBox'](_0x2b0375[_0x210bca(0xbb)]||_0x2b0375[_0x210bca(0xfa)]||_0x210bca(0xe8));a1_0x49d101[_0x210bca(0xed)](_0x210bca(0xc0)),a1_0x49d101[_0x210bca(0xed)]('1.\x20Ask\x20questions,\x20edit\x20files,\x20or\x20run\x20commands.'),a1_0x49d101[_0x210bca(0xed)]('2.\x20Be\x20specific\x20for\x20the\x20best\x20results.'),a1_0x49d101['dim'](_0x210bca(0x105)),a1_0x49d101[_0x210bca(0xb6)](_0x2b805e,0x64);const _0xfa2f40=async _0x19e5d3=>{const _0x145b9c=_0x210bca;if(!_0x19e5d3||_0x19e5d3['trim']()==='')return!![];const _0x2bb501=_0x19e5d3[_0x145b9c(0xc5)]();if(_0x2bb501===_0x145b9c(0x92)||_0x2bb501===_0x145b9c(0xcb))return a1_0x49d101[_0x145b9c(0x102)](_0x145b9c(0xf8)),![];if(_0x2bb501==='/clear')return _0x1ab203['length']=0x1,a1_0x49d101[_0x145b9c(0x102)](_0x145b9c(0xea)),!![];if(_0x2bb501==='/mcp'){const _0x539307=await getMcpTools();return _0x539307[_0x145b9c(0x101)]===0x0?a1_0x49d101[_0x145b9c(0x102)](_0x145b9c(0xe0)):(a1_0x49d101['info']('Connected\x20MCP\x20Tools:'),_0x539307[_0x145b9c(0x97)](_0x32847d=>a1_0x49d101[_0x145b9c(0xed)]('-\x20'+_0x32847d[_0x145b9c(0xee)]+'\x20('+_0x32847d[_0x145b9c(0xab)]+'):\x20'+(_0x32847d['description']?.[_0x145b9c(0xe4)](0x0,0x32)||'')))),a1_0x49d101[_0x145b9c(0xed)](_0x145b9c(0xcc)),!![];}if(_0x2bb501===_0x145b9c(0xfb))return a1_0x49d101[_0x145b9c(0xa7)](_0x145b9c(0x9a)),a1_0x49d101[_0x145b9c(0xed)](_0x145b9c(0xbd)),a1_0x49d101[_0x145b9c(0xed)](_0x145b9c(0xb9)),a1_0x49d101['dim'](_0x145b9c(0xf1)),a1_0x49d101['dim']('\x20\x20/mcp\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools'),a1_0x49d101['dim'](_0x145b9c(0xec)),a1_0x49d101[_0x145b9c(0xed)](_0x145b9c(0xa3)),!![];if(_0x2bb501===_0x145b9c(0xd0)){const _0xe6b63d=await selectModel();return _0xe6b63d!==_0x2b805e?(a1_0x49d101[_0x145b9c(0x102)](_0x145b9c(0xdc)+_0xe6b63d),a1_0x49d101['info'](_0x145b9c(0xd1))):a1_0x49d101[_0x145b9c(0x102)]('Current\x20model:\x20'+_0x2b805e),!![];}if(_0x2bb501==='/usage'||_0x2bb501===_0x145b9c(0x99)){const _0x49a9d2=a1_0x49d101[_0x145b9c(0xc6)](_0x145b9c(0xbf));_0x49a9d2[_0x145b9c(0xeb)]();const _0x202c32=await getUserUsage();return _0x49a9d2[_0x145b9c(0xef)](),_0x202c32?a1_0x49d101[_0x145b9c(0xca)](_0x202c32[_0x145b9c(0xf7)],_0x202c32[_0x145b9c(0xc7)],_0x202c32[_0x145b9c(0xc2)]):a1_0x49d101[_0x145b9c(0xac)]('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}return _0x1ab203[_0x145b9c(0x98)]({'role':_0x145b9c(0xa0),'content':_0x2bb501}),await processAgentLoop(_0x1ab203,_0x2b805e),!![];};if(_0x3bd63c){const _0x4fdb3c=await _0xfa2f40(_0x3bd63c);if(!_0x4fdb3c)return;}while(!![]){try{const _0x56011d=a1_0x49d101['gradientText'](_0x210bca(0xd2),'#60a5fa',_0x210bca(0xd3)),_0x92cc8d=await input({'message':_0x56011d,'theme':{'prefix':''}}),_0x5d7410=await _0xfa2f40(_0x92cc8d);if(!_0x5d7410)break;}catch(_0x2474c4){if(_0x2474c4 instanceof Error&&_0x2474c4[_0x210bca(0xb0)]['includes'](_0x210bca(0xd4)))break;a1_0x49d101['error'](_0x210bca(0x9f)+_0x2474c4);}}}async function processAgentLoop(_0x84d4a,_0x1a869f){const _0x55cedc=a1_0x334ecd;let _0x94dff4=0x0;const _0x1b5a62=0x3e8;while(_0x94dff4<_0x1b5a62){_0x94dff4++;const _0x751956=a1_0x49d101['createSpinner'](_0x55cedc(0x93));_0x751956['start']();let _0x373e37='',_0x1128db=![],_0x5a7e36='';try{const _0x47ca39=await sendChatMessage(_0x1a869f,_0x84d4a,_0x22c07a=>{const _0x2e43f1=_0x55cedc;_0x751956['isSpinning']&&(_0x751956[_0x2e43f1(0xef)](),a1_0x49d101[_0x2e43f1(0xae)](''));_0x373e37+=_0x22c07a;for(const _0x4f6fd3 of _0x22c07a){_0x5a7e36+=_0x4f6fd3;if(_0x4f6fd3==='\x0a'){if(!_0x1128db){if(_0x5a7e36[_0x2e43f1(0xd9)](_0x2e43f1(0x95)))_0x1128db=!![];else _0x5a7e36['startsWith'](_0x2e43f1(0xdd))?process[_0x2e43f1(0x9b)][_0x2e43f1(0xc1)](_0x5a7e36):process[_0x2e43f1(0x9b)]['write'](_0x5a7e36);}else _0x5a7e36['startsWith'](_0x2e43f1(0xdd))&&!_0x5a7e36[_0x2e43f1(0xd9)](_0x2e43f1(0x95))&&(_0x1128db=![]);_0x5a7e36='';}}});_0x5a7e36&&!_0x1128db&&!_0x5a7e36[_0x55cedc(0xd9)](_0x55cedc(0x95))&&process['stdout'][_0x55cedc(0xc1)](_0x5a7e36),_0x373e37=_0x47ca39[_0x55cedc(0xb8)];}catch(_0x466cef){_0x751956[_0x55cedc(0xef)](),a1_0x49d101['error'](_0x55cedc(0x96)+_0x466cef);return;}_0x751956[_0x55cedc(0xcd)]&&_0x751956[_0x55cedc(0xef)]();a1_0x49d101['aiMessageEnd'](),_0x84d4a[_0x55cedc(0x98)]({'role':_0x55cedc(0xaf),'content':_0x373e37});const _0x491dbc=_0x373e37[_0x55cedc(0xfe)](/```tool\n([\s\S]*?)\n```/);if(!_0x491dbc)break;try{const _0x3ee50c=_0x491dbc[0x1]['trim'](),_0x5526db=JSON[_0x55cedc(0xa6)](_0x3ee50c);a1_0x49d101[_0x55cedc(0xf6)](_0x5526db['name'],_0x5526db['args']);let _0x3ebeaf='Executing...';if(_0x5526db[_0x55cedc(0xee)][_0x55cedc(0xd9)](_0x55cedc(0x100)))_0x3ebeaf=_0x55cedc(0xc4);if(_0x5526db[_0x55cedc(0xee)][_0x55cedc(0xd9)]('create'))_0x3ebeaf=_0x55cedc(0xc3);if(_0x5526db[_0x55cedc(0xee)]['startsWith'](_0x55cedc(0xf2)))_0x3ebeaf=_0x55cedc(0xa8);if(_0x5526db['name'][_0x55cedc(0xd9)](_0x55cedc(0x9c)))_0x3ebeaf=_0x55cedc(0xe3);if(_0x5526db['name'][_0x55cedc(0xd9)](_0x55cedc(0xf3)))_0x3ebeaf='Searching...';if(_0x5526db[_0x55cedc(0xee)]===_0x55cedc(0xce))_0x3ebeaf=_0x55cedc(0x103);const _0x1a0682=a1_0x49d101[_0x55cedc(0x9e)](_0x3ebeaf);_0x1a0682[_0x55cedc(0xeb)]();const _0x4ac638=performance[_0x55cedc(0xa2)]();let _0x499e1c;try{_0x499e1c=await executeToolCall(_0x5526db[_0x55cedc(0xee)],_0x5526db['args']);}catch(_0x347042){if(_0x347042[_0x55cedc(0xb0)]&&_0x347042[_0x55cedc(0xb0)][_0x55cedc(0xe2)](_0x55cedc(0xb4))){const _0x1c6901=await getMcpTools(),_0x59b908=_0x1c6901['find'](_0x2c497e=>_0x2c497e[_0x55cedc(0xee)]===_0x5526db[_0x55cedc(0xee)]);if(_0x59b908)try{_0x499e1c=await executeMcpTool(_0x59b908['serverName'],_0x59b908['name'],_0x5526db[_0x55cedc(0xe9)]);}catch(_0x240dc6){throw new Error(_0x55cedc(0xda)+_0x240dc6);}else throw _0x347042;}else throw _0x347042;}_0x1a0682[_0x55cedc(0xef)]();const _0x572114=((performance[_0x55cedc(0xa2)]()-_0x4ac638)/0x3e8)[_0x55cedc(0xb3)](0x1);a1_0x49d101[_0x55cedc(0xed)](_0x55cedc(0xff)+_0x572114+'s'),_0x84d4a[_0x55cedc(0x98)]({'role':_0x55cedc(0xa0),'content':_0x55cedc(0xad)+_0x5526db[_0x55cedc(0xee)]+':\x0a'+JSON['stringify'](_0x499e1c,null,0x2)}),await new Promise(_0x2abb64=>setTimeout(_0x2abb64,0x3e8));}catch(_0x23c2f9){a1_0x49d101[_0x55cedc(0xac)]('Tool\x20error:\x20'+_0x23c2f9);_0x491dbc&&_0x491dbc[0x1]&&(a1_0x49d101['dim'](_0x55cedc(0xf0)),a1_0x49d101['dim'](_0x491dbc[0x1]));break;}}_0x94dff4>=_0x1b5a62&&a1_0x49d101[_0x55cedc(0x9d)](_0x55cedc(0xb7));}async function executeToolCall(_0x2fc9bf,_0xc76b72){const _0x42ae47=a1_0x334ecd;switch(_0x2fc9bf){case _0x42ae47(0xa5):return createFile(_0xc76b72['path'],_0xc76b72[_0x42ae47(0xb8)]);case _0x42ae47(0xb2):return readFile(_0xc76b72[_0x42ae47(0xaa)]);case'list_directory':return listDirectory(_0xc76b72[_0x42ae47(0xaa)]||'.');case _0x42ae47(0xdf):return editFile(_0xc76b72[_0x42ae47(0xaa)],_0xc76b72['search'],_0xc76b72[_0x42ae47(0xde)]);case'search_file':return searchFile(_0xc76b72[_0x42ae47(0xaa)],_0xc76b72[_0x42ae47(0xa1)]);case'run_command':const {command:_0x4dfec1,background:_0x29254b,wait:_0x7592a7}=_0xc76b72,_0x330b1e=await runCommand(_0x4dfec1,_0x3fa150=>{const _0xa4e472=_0x42ae47;a1_0x49d101[_0xa4e472(0xb1)](_0x3fa150);},_0x29254b,_0x7592a7);return _0x330b1e;default:return{'error':_0x42ae47(0xba)+_0x2fc9bf};}}
|
|
1
|
+
const a1_0x8f491c=a1_0x48ec;(function(_0x5abd80,_0x335a33){const _0x3a9c0a=a1_0x48ec,_0x561df1=_0x5abd80();while(!![]){try{const _0x45439c=parseInt(_0x3a9c0a(0x9e))/0x1+-parseInt(_0x3a9c0a(0xce))/0x2+-parseInt(_0x3a9c0a(0xf9))/0x3*(-parseInt(_0x3a9c0a(0xdc))/0x4)+parseInt(_0x3a9c0a(0x106))/0x5+parseInt(_0x3a9c0a(0xb3))/0x6*(parseInt(_0x3a9c0a(0x107))/0x7)+-parseInt(_0x3a9c0a(0xef))/0x8*(-parseInt(_0x3a9c0a(0xba))/0x9)+-parseInt(_0x3a9c0a(0xaa))/0xa*(parseInt(_0x3a9c0a(0xa9))/0xb);if(_0x45439c===_0x335a33)break;else _0x561df1['push'](_0x561df1['shift']());}catch(_0x3acb5b){_0x561df1['push'](_0x561df1['shift']());}}}(a1_0x4389,0xc0044));import{input}from'@inquirer/prompts';import{sendChatMessage,getUserUsage}from'../utils/api.js';import{getSelectedModel,getUser}from'../utils/storage.js';import{formatRulesForSystem}from'../tools/rules.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import*as a1_0x3772d4 from'../ui/output.js';import{selectModel}from'../ui/select.js';function a1_0x48ec(_0xd6ce69,_0x30f62b){_0xd6ce69=_0xd6ce69-0x9e;const _0x438980=a1_0x4389();let _0x48ec21=_0x438980[_0xd6ce69];return _0x48ec21;}const SYSTEM_PROMPT=a1_0x8f491c(0xa0);function a1_0x4389(){const _0x54c6bb=['createSpinner','Creating...','Conversation\x20cleared','\x20\x20/model\x20\x20\x20-\x20Switch\x20AI\x20model','\x20\x20/help\x20\x20\x20\x20-\x20Show\x20this\x20help','join','slice','/quit','run_command','pattern','Done\x20in\x20','3100736faDWWb','read','exit','Connected\x20MCP\x20Tools:','commandOutput','content','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','/stats','Listing...','statusBar','create','list','keys','2.\x20Be\x20specific\x20for\x20the\x20best\x20results.','328lJnIgz','Thinking...','toFixed','Tips\x20for\x20getting\x20started:','\x0aYou\x20are\x20running\x20on\x20','email','\x20>\x20','Unix/Mac','#2563eb','name','Reading...','includes','toolActivity','Model\x20changed\x20to:\x20','message','path','length','usageBox','args','12506024XJAHlc','#60a5fa','```','Goodbye!','Tool\x20result\x20for\x20','monthlyLimit','Searching...','1.\x20Ask\x20questions,\x20edit\x20files,\x20or\x20run\x20commands.','dim','API\x20error:\x20','11106LGxDAo','Executing...','aiMessage','header','actionSpinner','inputSchema','system','Editing...','No\x20MCP\x20tools\x20loaded.','Loaded\x20','serverName','/model','user','1526305WMjOqx','1755726PouWCZ','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','Windows','replace','startsWith','find','Unknown\x20tool','Running...','Fetching\x20usage...','Unknown','match','parse','1043721fjMKlU','MCP\x20Tool\x20error:\x20','You\x20are\x20Woozlit\x20AI,\x20a\x20powerful\x20agentic\x20coding\x20assistant.\x20You\x20help\x20users\x20with\x20coding\x20tasks\x20by\x20executing\x20actions\x20until\x20the\x20task\x20is\x20complete.\x0a\x0aYou\x20have\x20access\x20to\x20the\x20following\x20tools:\x0a-\x20create_file(path,\x20content):\x20Create\x20a\x20new\x20file\x20with\x20the\x20given\x20content\x0a-\x20read_file(path):\x20Read\x20the\x20contents\x20of\x20a\x20file\x0a-\x20list_directory(path):\x20List\x20files\x20and\x20directories\x0a-\x20edit_file(path,\x20search,\x20replace):\x20Edit\x20a\x20file\x20by\x20replacing\x20text\x0a-\x20search_file(path,\x20pattern):\x20Search\x20for\x20a\x20regex\x20pattern\x20in\x20a\x20file\x0a-\x20run_command(command,\x20background?,\x20wait?):\x20Execute\x20a\x20shell\x20command.\x20Set\x20background=true\x20to\x20run\x20detached.\x20wait=time_in_ms\x20(default\x203000)\x20for\x20background\x20check.\x0a\x0aYou\x20have\x20full\x20access\x20to\x20the\x20system.\x20You\x20can\x20install\x20packages,\x20run\x20servers,\x20and\x20modify\x20files.\x0aIf\x20you\x20encounter\x20an\x20error\x20(e.g.,\x20missing\x20package,\x20syntax\x20error),\x20you\x20MUST\x20attempt\x20to\x20fix\x20it\x20yourself\x20immediately.\x0aDo\x20not\x20ask\x20for\x20permission\x20to\x20fix\x20errors.\x20Just\x20fix\x20them\x20and\x20continue.\x0aYou\x20can\x20run\x20any\x20command\x20necessary\x20to\x20complete\x20the\x20task.\x0a\x0aWhen\x20the\x20user\x20gives\x20you\x20a\x20task:\x0a1.\x20Analyze\x20what\x20needs\x20to\x20be\x20done.\x0a2.\x20If\x20the\x20task\x20is\x20complex\x20or\x20long-running,\x20create\x20a\x20file\x20named\x20\x22info.woozlit\x22\x20to\x20store\x20your\x20plan\x20and\x20track\x20your\x20progress.\x0a3.\x20Execute\x20the\x20necessary\x20actions\x20step\x20by\x20step.\x0a4.\x20Continue\x20until\x20the\x20task\x20is\x20complete.\x0a5.\x20Report\x20what\x20you\x20accomplished.\x0a\x0aTo\x20use\x20a\x20tool,\x20respond\x20with\x20a\x20JSON\x20block\x20like\x20this:\x0a```tool\x0a{\x22name\x22:\x20\x22create_file\x22,\x20\x22args\x22:\x20{\x22path\x22:\x20\x22hello.txt\x22,\x20\x22content\x22:\x20\x22Hello\x20World\x22}}\x0a```\x0a','push','\x20\x20/mcp\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','win32','description','stop','search_file','loggedInBox','list_directory','11rkqCEk','13805670pSZHaE','info','properties','edit_file','error','now','trim','search','/help','12tNFMUp','```tool','isSpinning','read_file','Failed\x20JSON\x20content:','map','stdout','9EmjXIb','/exit','):\x20','Unknown\x20tool:\x20','force\x20closed','\x20\x20/clear\x20\x20\x20-\x20Clear\x20conversation\x20history','No\x20MCP\x20tools\x20connected.','start','warn'];a1_0x4389=function(){return _0x54c6bb;};return a1_0x4389();}export async function startChat(_0x3055fe){const _0x484f01=a1_0x8f491c,_0x111db6=getSelectedModel();await connectToMcpServers();const _0x1592e6=await getMcpTools();_0x1592e6[_0x484f01(0xec)]>0x0?a1_0x3772d4[_0x484f01(0xf7)](_0x484f01(0x102)+_0x1592e6[_0x484f01(0xec)]+'\x20MCP\x20tools:\x20'+_0x1592e6[_0x484f01(0xb8)](_0x14bb75=>_0x14bb75[_0x484f01(0xe5)])[_0x484f01(0xc8)](',\x20')):a1_0x3772d4[_0x484f01(0xf7)](_0x484f01(0x101));process['on'](_0x484f01(0xd0),()=>closeMcpClients());const _0x22c9ca=formatRulesForSystem(),_0x111fb4=process['platform']===_0x484f01(0xa3)?_0x484f01(0x109):_0x484f01(0xe3),_0x26deed=_0x1592e6[_0x484f01(0xec)]>0x0?'\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a'+_0x1592e6[_0x484f01(0xb8)](_0x3e642e=>{const _0x32eb3c=_0x484f01,_0x2dbcd8=Object[_0x32eb3c(0xda)](_0x3e642e[_0x32eb3c(0xfe)]?.[_0x32eb3c(0xac)]||{})[_0x32eb3c(0xc8)](',\x20');return'-\x20'+_0x3e642e[_0x32eb3c(0xe5)]+'('+_0x2dbcd8+_0x32eb3c(0xbc)+_0x3e642e[_0x32eb3c(0xa4)];})['join']('\x0a'):'',_0x1f5950=SYSTEM_PROMPT+_0x26deed+(_0x484f01(0xe0)+_0x111fb4+'.\x0a')+_0x22c9ca,_0x25891c=getUser(),_0xd35d25=[{'role':_0x484f01(0xff),'content':_0x1f5950}];a1_0x3772d4[_0x484f01(0xf7)]('');(_0x25891c['displayName']||_0x25891c[_0x484f01(0xe1)])&&a1_0x3772d4[_0x484f01(0xa7)](_0x25891c['displayName']||_0x25891c[_0x484f01(0xe1)]||_0x484f01(0x110));a1_0x3772d4['dim'](_0x484f01(0xdf)),a1_0x3772d4['dim'](_0x484f01(0xf6)),a1_0x3772d4[_0x484f01(0xf7)](_0x484f01(0xdb)),a1_0x3772d4[_0x484f01(0xf7)]('3.\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/help\x20for\x20more.'),a1_0x3772d4[_0x484f01(0xd7)](_0x111db6,0x64);const _0x15dec9=async _0x3414f3=>{const _0x5dc20d=_0x484f01;if(!_0x3414f3||_0x3414f3[_0x5dc20d(0xb0)]()==='')return!![];const _0x325a6f=_0x3414f3[_0x5dc20d(0xb0)]();if(_0x325a6f===_0x5dc20d(0xbb)||_0x325a6f===_0x5dc20d(0xca))return a1_0x3772d4[_0x5dc20d(0xab)](_0x5dc20d(0xf2)),![];if(_0x325a6f==='/clear')return _0xd35d25[_0x5dc20d(0xec)]=0x1,a1_0x3772d4[_0x5dc20d(0xab)](_0x5dc20d(0xc5)),!![];if(_0x325a6f==='/mcp'){const _0x4001bf=await getMcpTools();return _0x4001bf[_0x5dc20d(0xec)]===0x0?a1_0x3772d4[_0x5dc20d(0xab)](_0x5dc20d(0xc0)):(a1_0x3772d4['info'](_0x5dc20d(0xd1)),_0x4001bf['forEach'](_0x5098c5=>a1_0x3772d4[_0x5dc20d(0xf7)]('-\x20'+_0x5098c5[_0x5dc20d(0xe5)]+'\x20('+_0x5098c5[_0x5dc20d(0x103)]+'):\x20'+(_0x5098c5['description']?.[_0x5dc20d(0xc9)](0x0,0x32)||'')))),a1_0x3772d4[_0x5dc20d(0xf7)](_0x5dc20d(0x108)),!![];}if(_0x325a6f===_0x5dc20d(0xb2))return a1_0x3772d4[_0x5dc20d(0xfc)]('Commands'),a1_0x3772d4[_0x5dc20d(0xf7)]('\x20\x20/exit\x20\x20\x20\x20-\x20Exit\x20the\x20chat'),a1_0x3772d4[_0x5dc20d(0xf7)](_0x5dc20d(0xbf)),a1_0x3772d4['dim'](_0x5dc20d(0xc6)),a1_0x3772d4[_0x5dc20d(0xf7)](_0x5dc20d(0xa2)),a1_0x3772d4[_0x5dc20d(0xf7)]('\x20\x20/usage\x20\x20\x20-\x20Show\x20token\x20usage\x20stats'),a1_0x3772d4[_0x5dc20d(0xf7)](_0x5dc20d(0xc7)),!![];if(_0x325a6f===_0x5dc20d(0x104)){const _0x1cd1be=await selectModel();return _0x1cd1be!==_0x111db6?(a1_0x3772d4[_0x5dc20d(0xab)](_0x5dc20d(0xe9)+_0x1cd1be),a1_0x3772d4['info'](_0x5dc20d(0xd4))):a1_0x3772d4[_0x5dc20d(0xab)]('Current\x20model:\x20'+_0x111db6),!![];}if(_0x325a6f==='/usage'||_0x325a6f===_0x5dc20d(0xd5)){const _0x13a9ab=a1_0x3772d4[_0x5dc20d(0xc3)](_0x5dc20d(0x10f));_0x13a9ab[_0x5dc20d(0xc1)]();const _0x34ba41=await getUserUsage();return _0x13a9ab[_0x5dc20d(0xa5)](),_0x34ba41?a1_0x3772d4[_0x5dc20d(0xed)](_0x34ba41['tokensUsed'],_0x34ba41[_0x5dc20d(0xf4)],_0x34ba41['isOverLimit']):a1_0x3772d4['error']('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}return _0xd35d25[_0x5dc20d(0xa1)]({'role':_0x5dc20d(0x105),'content':_0x325a6f}),await processAgentLoop(_0xd35d25,_0x111db6),!![];};if(_0x3055fe){const _0x1d0664=await _0x15dec9(_0x3055fe);if(!_0x1d0664)return;}while(!![]){try{const _0x2a4acc=a1_0x3772d4['gradientText'](_0x484f01(0xe2),_0x484f01(0xf0),_0x484f01(0xe4)),_0x4eeaf3=await input({'message':_0x2a4acc,'theme':{'prefix':''}}),_0x53c331=await _0x15dec9(_0x4eeaf3);if(!_0x53c331)break;}catch(_0x59de8f){if(_0x59de8f instanceof Error&&_0x59de8f['message'][_0x484f01(0xe7)](_0x484f01(0xbe)))break;a1_0x3772d4['error']('Unexpected\x20error:\x20'+_0x59de8f);}}}async function processAgentLoop(_0x135495,_0x95f8c5){const _0x59c69e=a1_0x8f491c;let _0x854703=0x0;const _0x305615=0x3e8;while(_0x854703<_0x305615){_0x854703++;const _0x28d913=a1_0x3772d4[_0x59c69e(0xc3)](_0x59c69e(0xdd));_0x28d913[_0x59c69e(0xc1)]();let _0x1cab4a='',_0x14e151=![],_0x6d1ef6='';try{const _0x2f855c=await sendChatMessage(_0x95f8c5,_0x135495,_0x5735e6=>{const _0x154e3f=_0x59c69e;_0x28d913[_0x154e3f(0xb5)]&&(_0x28d913['stop'](),a1_0x3772d4[_0x154e3f(0xfb)](''));_0x1cab4a+=_0x5735e6;for(const _0x24606f of _0x5735e6){_0x6d1ef6+=_0x24606f;if(_0x24606f==='\x0a'){if(!_0x14e151){if(_0x6d1ef6[_0x154e3f(0x10b)](_0x154e3f(0xb4)))_0x14e151=!![];else _0x6d1ef6[_0x154e3f(0x10b)](_0x154e3f(0xf1))?process[_0x154e3f(0xb9)]['write'](_0x6d1ef6):process[_0x154e3f(0xb9)]['write'](_0x6d1ef6);}else _0x6d1ef6[_0x154e3f(0x10b)](_0x154e3f(0xf1))&&!_0x6d1ef6[_0x154e3f(0x10b)](_0x154e3f(0xb4))&&(_0x14e151=![]);_0x6d1ef6='';}}});_0x6d1ef6&&!_0x14e151&&!_0x6d1ef6[_0x59c69e(0x10b)](_0x59c69e(0xb4))&&process[_0x59c69e(0xb9)]['write'](_0x6d1ef6),_0x1cab4a=_0x2f855c[_0x59c69e(0xd3)];}catch(_0x41ad0a){_0x28d913[_0x59c69e(0xa5)](),a1_0x3772d4[_0x59c69e(0xae)](_0x59c69e(0xf8)+_0x41ad0a);return;}_0x28d913['isSpinning']&&_0x28d913[_0x59c69e(0xa5)]();a1_0x3772d4['aiMessageEnd'](),_0x135495[_0x59c69e(0xa1)]({'role':'assistant','content':_0x1cab4a});const _0xada34b=_0x1cab4a[_0x59c69e(0x111)](/```tool\n([\s\S]*?)\n```/);if(!_0xada34b)break;try{const _0x77a233=_0xada34b[0x1][_0x59c69e(0xb0)](),_0x81d1fb=JSON[_0x59c69e(0x112)](_0x77a233);a1_0x3772d4[_0x59c69e(0xe8)](_0x81d1fb[_0x59c69e(0xe5)],_0x81d1fb[_0x59c69e(0xee)]);let _0x15f0e2=_0x59c69e(0xfa);if(_0x81d1fb[_0x59c69e(0xe5)]['startsWith'](_0x59c69e(0xcf)))_0x15f0e2=_0x59c69e(0xe6);if(_0x81d1fb['name'][_0x59c69e(0x10b)](_0x59c69e(0xd8)))_0x15f0e2=_0x59c69e(0xc4);if(_0x81d1fb['name'][_0x59c69e(0x10b)]('edit'))_0x15f0e2=_0x59c69e(0x100);if(_0x81d1fb[_0x59c69e(0xe5)][_0x59c69e(0x10b)](_0x59c69e(0xd9)))_0x15f0e2=_0x59c69e(0xd6);if(_0x81d1fb['name']['startsWith']('search'))_0x15f0e2=_0x59c69e(0xf5);if(_0x81d1fb[_0x59c69e(0xe5)]===_0x59c69e(0xcb))_0x15f0e2=_0x59c69e(0x10e);const _0x58dd64=a1_0x3772d4[_0x59c69e(0xfd)](_0x15f0e2);_0x58dd64[_0x59c69e(0xc1)]();const _0x103cec=performance[_0x59c69e(0xaf)]();let _0x55d6b6;try{_0x55d6b6=await executeToolCall(_0x81d1fb[_0x59c69e(0xe5)],_0x81d1fb[_0x59c69e(0xee)]);}catch(_0x3e8020){if(_0x3e8020[_0x59c69e(0xea)]&&_0x3e8020[_0x59c69e(0xea)][_0x59c69e(0xe7)](_0x59c69e(0x10d))){const _0x4a0589=await getMcpTools(),_0x6988bc=_0x4a0589[_0x59c69e(0x10c)](_0xabef0e=>_0xabef0e[_0x59c69e(0xe5)]===_0x81d1fb[_0x59c69e(0xe5)]);if(_0x6988bc)try{_0x55d6b6=await executeMcpTool(_0x6988bc[_0x59c69e(0x103)],_0x6988bc['name'],_0x81d1fb[_0x59c69e(0xee)]);}catch(_0x273ab7){throw new Error(_0x59c69e(0x9f)+_0x273ab7);}else throw _0x3e8020;}else throw _0x3e8020;}_0x58dd64[_0x59c69e(0xa5)]();const _0x5863f9=((performance[_0x59c69e(0xaf)]()-_0x103cec)/0x3e8)[_0x59c69e(0xde)](0x1);a1_0x3772d4[_0x59c69e(0xf7)](_0x59c69e(0xcd)+_0x5863f9+'s'),_0x135495[_0x59c69e(0xa1)]({'role':_0x59c69e(0x105),'content':_0x59c69e(0xf3)+_0x81d1fb[_0x59c69e(0xe5)]+':\x0a'+JSON['stringify'](_0x55d6b6,null,0x2)}),await new Promise(_0x1985ca=>setTimeout(_0x1985ca,0x3e8));}catch(_0x1632aa){a1_0x3772d4[_0x59c69e(0xae)]('Tool\x20error:\x20'+_0x1632aa);_0xada34b&&_0xada34b[0x1]&&(a1_0x3772d4['dim'](_0x59c69e(0xb7)),a1_0x3772d4[_0x59c69e(0xf7)](_0xada34b[0x1]));break;}}_0x854703>=_0x305615&&a1_0x3772d4[_0x59c69e(0xc2)]('Reached\x20maximum\x20iterations');}async function executeToolCall(_0x21f5a3,_0x237c63){const _0x2c9ff6=a1_0x8f491c;switch(_0x21f5a3){case'create_file':return createFile(_0x237c63[_0x2c9ff6(0xeb)],_0x237c63['content']);case _0x2c9ff6(0xb6):return readFile(_0x237c63[_0x2c9ff6(0xeb)]);case _0x2c9ff6(0xa8):return listDirectory(_0x237c63[_0x2c9ff6(0xeb)]||'.');case _0x2c9ff6(0xad):return editFile(_0x237c63[_0x2c9ff6(0xeb)],_0x237c63[_0x2c9ff6(0xb1)],_0x237c63[_0x2c9ff6(0x10a)]);case _0x2c9ff6(0xa6):return searchFile(_0x237c63[_0x2c9ff6(0xeb)],_0x237c63[_0x2c9ff6(0xcc)]);case _0x2c9ff6(0xcb):const {command:_0x5da55b,background:_0x593987,wait:_0x28fdff}=_0x237c63,_0x32aa91=await runCommand(_0x5da55b,_0x2ea2a0=>{const _0x3fa384=_0x2c9ff6;a1_0x3772d4[_0x3fa384(0xd2)](_0x2ea2a0);},_0x593987,_0x28fdff);return _0x32aa91;default:return{'error':_0x2c9ff6(0xbd)+_0x21f5a3};}}
|
package/dist/config/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x1a8b96=a2_0x1868;(function(_0x4e22cb,_0x565e88){const _0xd1b997=a2_0x1868,_0x29a584=_0x4e22cb();while(!![]){try{const _0xd16de6=-parseInt(_0xd1b997(0xe3))/0x1+-parseInt(_0xd1b997(0xe9))/0x2*(parseInt(_0xd1b997(0xee))/0x3)+-parseInt(_0xd1b997(0xf0))/0x4+-parseInt(_0xd1b997(0xde))/0x5+parseInt(_0xd1b997(0xf1))/0x6*(parseInt(_0xd1b997(0xe6))/0x7)+-parseInt(_0xd1b997(0xe0))/0x8+parseInt(_0xd1b997(0xdc))/0x9;if(_0xd16de6===_0x565e88)break;else _0x29a584['push'](_0x29a584['shift']());}catch(_0x5cb85a){_0x29a584['push'](_0x29a584['shift']());}}}(a2_0x56ae,0x3eebf));import a2_0x37a52b from'conf';const config=new a2_0x37a52b({'projectName':a2_0x1a8b96(0xdf),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x50d5ef=a2_0x1a8b96;return config[_0x50d5ef(0xed)](_0x50d5ef(0xf2));}export function addMcpServer(_0x4dfb47,_0xdffd30,_0x24442f=[],_0x2863cd){const _0xd6535c=a2_0x1a8b96,_0x553d19=getMcpServers();_0x553d19[_0x4dfb47]={'command':_0xdffd30,'args':_0x24442f,'env':_0x2863cd},config[_0xd6535c(0xdd)]('mcpServers',_0x553d19);}export function removeMcpServer(_0x15bd6c){const _0x6db1f2=a2_0x1a8b96,_0x246aba=getMcpServers();if(_0x246aba[_0x15bd6c])return delete _0x246aba[_0x15bd6c],config[_0x6db1f2(0xdd)](_0x6db1f2(0xf2),_0x246aba),!![];return![];}export function getMcpServer(_0x2128ad){return getMcpServers()[_0x2128ad];}function a2_0x1868(_0x112996,_0x409790){_0x112996=_0x112996-0xd9;const _0x56ae0b=a2_0x56ae();let _0x186891=_0x56ae0b[_0x112996];return _0x186891;}function a2_0x56ae(){const _0x5e7a06=['.js','508813CdQKGx','mcp-servers','windows-mcp','7ItNeet','dist','computer-use','626702HKpxeA','includes','join','C:\x5cUsers','get','3wwrjdc','endsWith','431580IwqrvJ','693102csQCVc','mcpServers','tsx','command','dirname','12640437RtXOze','set','800400xTaWgW','woozlit-cli','1377152AdafAz','npx'];a2_0x56ae=function(){return _0x5e7a06;};return a2_0x56ae();}import a2_0x4cfb7c from'path';import{fileURLToPath}from'url';export function ensureDefaultServers(){const _0x1820d3=a2_0x1a8b96,_0x4284d2=getMcpServers(),_0x49f529=fileURLToPath(import.meta.url),_0x1aa8df=a2_0x4cfb7c[_0x1820d3(0xdb)](_0x49f529),_0xf68c1a=_0x1aa8df[_0x1820d3(0xea)](_0x1820d3(0xe7))||_0x49f529[_0x1820d3(0xef)](_0x1820d3(0xe2)),_0x35a934=_0xf68c1a?a2_0x4cfb7c['join'](_0x1aa8df,'..',_0x1820d3(0xe4),'computer-use.js'):a2_0x4cfb7c[_0x1820d3(0xeb)](_0x1aa8df,'..','..','src',_0x1820d3(0xe4),'computer-use.ts'),_0x42c6e9=_0xf68c1a?'node':_0x1820d3(0xd9);_0x4284d2[_0x1820d3(0xe8)]={'command':_0x42c6e9,'args':[_0x35a934],'env':{}},(!_0x4284d2[_0x1820d3(0xe5)]||_0x4284d2[_0x1820d3(0xe5)][_0x1820d3(0xda)]==='uvx')&&(_0x4284d2['windows-mcp']={'command':_0x1820d3(0xe1),'args':['-y','@modelcontextprotocol/server-filesystem',_0x1820d3(0xec)],'env':{}}),config[_0x1820d3(0xdd)]('mcpServers',_0x4284d2);}
|
package/dist/config/settings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a3_0xf0e216=a3_0x457c;(function(_0x27e12e,_0x50cdfc){const _0x290f44=a3_0x457c,_0x33efa5=_0x27e12e();while(!![]){try{const _0x17be80=parseInt(_0x290f44(0x152))/0x1+-parseInt(_0x290f44(0x142))/0x2+-parseInt(_0x290f44(0x127))/0x3*(parseInt(_0x290f44(0x14a))/0x4)+-parseInt(_0x290f44(0x140))/0x5*(parseInt(_0x290f44(0x14b))/0x6)+parseInt(_0x290f44(0x147))/0x7*(parseInt(_0x290f44(0x14f))/0x8)+parseInt(_0x290f44(0x13a))/0x9*(parseInt(_0x290f44(0x126))/0xa)+-parseInt(_0x290f44(0x14e))/0xb*(-parseInt(_0x290f44(0x13c))/0xc);if(_0x17be80===_0x50cdfc)break;else _0x33efa5['push'](_0x33efa5['shift']());}catch(_0x500b68){_0x33efa5['push'](_0x33efa5['shift']());}}}(a3_0x3d5a,0x63a63));const API_URL=process['env'][a3_0xf0e216(0x13f)]||'https://woozlit.com',PROD_URL=a3_0xf0e216(0x132);function a3_0x457c(_0x49a9d7,_0x357359){_0x49a9d7=_0x49a9d7-0x126;const _0x3d5a16=a3_0x3d5a();let _0x457ca2=_0x3d5a16[_0x49a9d7];return _0x457ca2;}export function getApiUrl(){return API_URL;}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':a3_0xf0e216(0x134),'name':a3_0xf0e216(0x146),'description':a3_0xf0e216(0x13b)},{'id':'qwen/qwen3-235b-a22b:free','name':a3_0xf0e216(0x149),'description':a3_0xf0e216(0x138)},{'id':a3_0xf0e216(0x130),'name':a3_0xf0e216(0x13d),'description':a3_0xf0e216(0x12e)},{'id':a3_0xf0e216(0x139),'name':a3_0xf0e216(0x12b),'description':a3_0xf0e216(0x12a)},{'id':a3_0xf0e216(0x150),'name':a3_0xf0e216(0x129),'description':a3_0xf0e216(0x143)},{'id':a3_0xf0e216(0x151),'name':a3_0xf0e216(0x14d),'description':a3_0xf0e216(0x12d)},{'id':a3_0xf0e216(0x13e),'name':a3_0xf0e216(0x12f),'description':a3_0xf0e216(0x136)},{'id':a3_0xf0e216(0x141),'name':a3_0xf0e216(0x133),'description':a3_0xf0e216(0x137)},{'id':a3_0xf0e216(0x148),'name':'Kimi\x20K2','description':a3_0xf0e216(0x145)},{'id':a3_0xf0e216(0x131),'name':a3_0xf0e216(0x12c),'description':a3_0xf0e216(0x14c)},{'id':'kwaipilot/kat-coder-pro:free','name':a3_0xf0e216(0x144),'description':a3_0xf0e216(0x135)},{'id':'tngtech/deepseek-r1t-chimera:free','name':a3_0xf0e216(0x128),'description':'Reasoning\x20model'}];export const DEFAULT_MODEL='xiaomi/mimo-v2-flash:free';function a3_0x3d5a(){const _0x18e3f8=['Qwen3\x20235B','8xqUpFe','280218TGXuIJ','Zhipu\x20AI\x20model','Devstral\x20Small','1082499WNjkLW','1816nxCEqj','meta-llama/llama-4-maverick','mistralai/devstral-small','753206eQjDOY','16090IvtRnL','238956CWSyWs','DeepSeek\x20R1T\x20Chimera','Llama\x204\x20Maverick','Meta\x27s\x20powerful\x20model','Llama\x203.3\x2070B','GLM\x204.5\x20Air','Developer-focused','Coding\x20specialist','Mistral\x20Small\x203.2','qwen/qwen3-coder:free','z-ai/glm-4.5-air:free','https://woozlit.com','Nemotron\x20Nano\x2012B','xiaomi/mimo-v2-flash:free','Advanced\x20coding','Latest\x20Mistral','NVIDIA\x20vision','Alibaba\x27s\x20largest','meta-llama/llama-3.3-70b-instruct:free','63aVRLtG','Xiaomi\x27s\x20fast\x20AI\x20model','24DPgrZB','Qwen3\x20Coder','mistralai/mistral-small-3.2-24b-instruct','WOOZLIT_API_URL','5OdJrvX','nvidia/nemotron-nano-12b-v2-vl:free','874472DDXITN','Meta\x27s\x20latest','Kat\x20Coder\x20Pro','Reasoning\x20model','MiMo\x20V2','2779OsUKdC','moonshotai/kimi-k2'];a3_0x3d5a=function(){return _0x18e3f8;};return a3_0x3d5a();}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const a4_0x4b1a14=a4_0x2414;(function(_0xeaf09e,_0x1b6035){const _0x530d2b=a4_0x2414,_0x12df6b=_0xeaf09e();while(!![]){try{const _0x225afc=parseInt(_0x530d2b(0x188))/0x1+-parseInt(_0x530d2b(0x1d8))/0x2*(parseInt(_0x530d2b(0x1c3))/0x3)+parseInt(_0x530d2b(0x19c))/0x4+-parseInt(_0x530d2b(0x1be))/0x5+parseInt(_0x530d2b(0x1a1))/0x6*(-parseInt(_0x530d2b(0x1a3))/0x7)+-parseInt(_0x530d2b(0x1c6))/0x8*(parseInt(_0x530d2b(0x1cf))/0x9)+parseInt(_0x530d2b(0x18c))/0xa*(parseInt(_0x530d2b(0x1d4))/0xb);if(_0x225afc===_0x1b6035)break;else _0x12df6b['push'](_0x12df6b['shift']());}catch(_0x38d61a){_0x12df6b['push'](_0x12df6b['shift']());}}}(a4_0x47a4,0x639a7));import{Command}from'commander';import{login,logout,isLoggedIn}from'./auth/login.js';import{startChat}from'./chat/agent.js';import{selectModel,getSelectedModel}from'./ui/select.js';function a4_0x2414(_0x55a138,_0x3b7849){_0x55a138=_0x55a138-0x187;const _0x47a4f1=a4_0x47a4();let _0x241473=_0x47a4f1[_0x55a138];return _0x241473;}import{listRules,addRule,clearRules}from'./tools/rules.js';import{getUser}from'./utils/storage.js';import{addMcpServer,removeMcpServer,getMcpServers,ensureDefaultServers}from'./config/mcp.js';import*as a4_0x38bc7a from'./ui/output.js';function a4_0x47a4(){const _0x27bfd4=['length','join','whoami','Ask\x20a\x20single\x20question','1230130tzutPh','Woozlit\x20already\x20initialized\x20in\x20this\x20directory','.woozlit','Login\x20failed\x20or\x20timed\x20out','remove\x20<name>','15RQLjeu','woozlit','Model:\x20','17824RMiSDO','displayName','stdout','Name:\x20','Logged\x20out\x20successfully','createSpinner','N/A','All\x20rules\x20cleared','forEach','2763akesUT','Manage\x20AI\x20behavior\x20rules','Waiting\x20for\x20authentication...','warn','dim','8978761wRWyUO','version','List\x20all\x20rules','Model\x20set\x20to:\x20','253444vZCwGZ','start','.woozlit/context.md','success','Login\x20with\x20your\x20Woozlit\x20account','Show\x20current\x20user\x20info','error','Add\x20a\x20new\x20MCP\x20server','chat\x20[message]','581087aezcSz','#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a','Current\x20User','No\x20MCP\x20servers\x20configured','20UnAIbl','List\x20all\x20MCP\x20servers','Add\x20a\x20new\x20rule','list','Rules','args','Added\x20rule:\x20','logout','action','Select\x20AI\x20model','Start\x20an\x20AI\x20chat\x20session','model','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','showLogo','Manage\x20MCP\x20servers','email','765676TbBDXg','Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.','rules','No\x20rules\x20defined','Removed\x20MCP\x20server:\x20','1314EwZdLe','.woozlit/rules.md','13853aUpZsO','Initialize\x20Woozlit\x20in\x20current\x20directory','Opening\x20browser\x20for\x20login...','add\x20<rule>','stop','description','parse','some','keys','info','1.0.4','Configure\x20CLI\x20settings','\x27\x20not\x20found','entries','Logged\x20in\x20as\x20','Email:\x20','name','./tools/file.js','#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a','header','init','Remove\x20an\x20MCP\x20server','command'];a4_0x47a4=function(){return _0x27bfd4;};return a4_0x47a4();}const program=new Command();program[a4_0x4b1a14(0x1b3)](a4_0x4b1a14(0x1c4))[a4_0x4b1a14(0x1a8)]('Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant')[a4_0x4b1a14(0x1d5)](a4_0x4b1a14(0x1ad))['action'](async()=>{const _0x4791c2=a4_0x4b1a14;ensureDefaultServers(),a4_0x38bc7a[_0x4791c2(0x199)]();if(!isLoggedIn()){a4_0x38bc7a['warn'](_0x4791c2(0x198)),a4_0x38bc7a['dim'](''),a4_0x38bc7a[_0x4791c2(0x1ac)]('Opening\x20browser\x20for\x20login...');const _0x196bc1=a4_0x38bc7a['createSpinner']('Waiting\x20for\x20authentication...');_0x196bc1['start']();const _0x1bd369=await login();_0x196bc1[_0x4791c2(0x1a7)]();if(!_0x1bd369){a4_0x38bc7a[_0x4791c2(0x1de)](_0x4791c2(0x1c1));return;}const _0x74c786=getUser();a4_0x38bc7a[_0x4791c2(0x1db)]('Logged\x20in\x20as\x20'+(_0x74c786[_0x4791c2(0x1c7)]||_0x74c786[_0x4791c2(0x19b)]));}await startChat();}),program[a4_0x4b1a14(0x1b9)]('login')[a4_0x4b1a14(0x1a8)](a4_0x4b1a14(0x1dc))['action'](async()=>{const _0x37da1e=a4_0x4b1a14;if(isLoggedIn()){const _0x4a1fa1=getUser();a4_0x38bc7a['info']('Already\x20logged\x20in\x20as\x20'+_0x4a1fa1[_0x37da1e(0x19b)]);return;}a4_0x38bc7a['info'](_0x37da1e(0x1a5));const _0x25803d=a4_0x38bc7a[_0x37da1e(0x1cb)](_0x37da1e(0x1d1));_0x25803d[_0x37da1e(0x1d9)]();const _0x1f742d=await login();_0x25803d['stop']();if(_0x1f742d){const _0xc3e6a5=getUser();a4_0x38bc7a['success']('Logged\x20in\x20as\x20'+(_0xc3e6a5[_0x37da1e(0x1c7)]||_0xc3e6a5[_0x37da1e(0x19b)]));}else a4_0x38bc7a['error'](_0x37da1e(0x1c1));}),program[a4_0x4b1a14(0x1b9)](a4_0x4b1a14(0x193))[a4_0x4b1a14(0x1a8)]('Logout\x20from\x20your\x20Woozlit\x20account')[a4_0x4b1a14(0x194)](()=>{const _0x39255e=a4_0x4b1a14;logout(),a4_0x38bc7a[_0x39255e(0x1db)](_0x39255e(0x1ca));}),program[a4_0x4b1a14(0x1b9)](a4_0x4b1a14(0x1bc))['description'](a4_0x4b1a14(0x1dd))[a4_0x4b1a14(0x194)](()=>{const _0x3977de=a4_0x4b1a14;if(!isLoggedIn()){a4_0x38bc7a[_0x3977de(0x1d2)](_0x3977de(0x19d));return;}const _0x3a8c28=getUser();a4_0x38bc7a['header'](_0x3977de(0x18a)),a4_0x38bc7a[_0x3977de(0x1ac)](_0x3977de(0x1c9)+(_0x3a8c28[_0x3977de(0x1c7)]||_0x3977de(0x1cc))),a4_0x38bc7a[_0x3977de(0x1ac)](_0x3977de(0x1b2)+(_0x3a8c28[_0x3977de(0x19b)]||_0x3977de(0x1cc))),a4_0x38bc7a['info'](_0x3977de(0x1c5)+getSelectedModel());}),program[a4_0x4b1a14(0x1b9)](a4_0x4b1a14(0x187))['description'](a4_0x4b1a14(0x196))[a4_0x4b1a14(0x194)](async _0x3428e4=>{const _0x1e40b7=a4_0x4b1a14;a4_0x38bc7a[_0x1e40b7(0x199)]();if(!isLoggedIn()){a4_0x38bc7a[_0x1e40b7(0x1d2)](_0x1e40b7(0x198)),a4_0x38bc7a[_0x1e40b7(0x1d3)](''),a4_0x38bc7a[_0x1e40b7(0x1ac)](_0x1e40b7(0x1a5));const _0x120ba7=a4_0x38bc7a[_0x1e40b7(0x1cb)](_0x1e40b7(0x1d1));_0x120ba7[_0x1e40b7(0x1d9)]();const _0x3a4238=await login();_0x120ba7[_0x1e40b7(0x1a7)]();if(!_0x3a4238){a4_0x38bc7a['error'](_0x1e40b7(0x1c1));return;}const _0x2318e4=getUser();a4_0x38bc7a['success']('Logged\x20in\x20as\x20'+(_0x2318e4[_0x1e40b7(0x1c7)]||_0x2318e4[_0x1e40b7(0x19b)]));}await startChat(_0x3428e4);}),program['command']('ask\x20<message>')['description'](a4_0x4b1a14(0x1bd))[a4_0x4b1a14(0x194)](async _0x1f24a5=>{const _0x3a042a=a4_0x4b1a14;a4_0x38bc7a[_0x3a042a(0x199)]();if(!isLoggedIn()){a4_0x38bc7a[_0x3a042a(0x1d2)](_0x3a042a(0x198)),a4_0x38bc7a['dim'](''),a4_0x38bc7a[_0x3a042a(0x1ac)](_0x3a042a(0x1a5));const _0x384eb3=a4_0x38bc7a['createSpinner'](_0x3a042a(0x1d1));_0x384eb3[_0x3a042a(0x1d9)]();const _0x6034c5=await login();_0x384eb3[_0x3a042a(0x1a7)]();if(!_0x6034c5){a4_0x38bc7a[_0x3a042a(0x1de)](_0x3a042a(0x1c1));return;}const _0x24fb88=getUser();a4_0x38bc7a[_0x3a042a(0x1db)](_0x3a042a(0x1b1)+(_0x24fb88[_0x3a042a(0x1c7)]||_0x24fb88[_0x3a042a(0x19b)]));}await startChat(_0x1f24a5);});const configCmd=program[a4_0x4b1a14(0x1b9)]('config')[a4_0x4b1a14(0x1a8)](a4_0x4b1a14(0x1ae));configCmd[a4_0x4b1a14(0x1b9)](a4_0x4b1a14(0x197))['description'](a4_0x4b1a14(0x195))['action'](async()=>{const _0xb38a8a=a4_0x4b1a14,_0xff9305=await selectModel();a4_0x38bc7a['success'](_0xb38a8a(0x1d7)+_0xff9305);});const rulesCmd=program[a4_0x4b1a14(0x1b9)](a4_0x4b1a14(0x19e))['description'](a4_0x4b1a14(0x1d0));rulesCmd[a4_0x4b1a14(0x1b9)](a4_0x4b1a14(0x18f))['description'](a4_0x4b1a14(0x1d6))[a4_0x4b1a14(0x194)](()=>{const _0x4f4d7a=a4_0x4b1a14,_0x5f2f19=listRules();if(_0x5f2f19[_0x4f4d7a(0x1ba)]===0x0){a4_0x38bc7a[_0x4f4d7a(0x1ac)](_0x4f4d7a(0x19f));return;}a4_0x38bc7a[_0x4f4d7a(0x1b6)](_0x4f4d7a(0x190)),_0x5f2f19[_0x4f4d7a(0x1ce)]((_0x3f69bb,_0xb01562)=>{const _0x54613c=_0x4f4d7a;process[_0x54613c(0x1c8)]['write'](_0xb01562+0x1+'.\x20'+_0x3f69bb+'\x0a');});}),rulesCmd[a4_0x4b1a14(0x1b9)](a4_0x4b1a14(0x1a6))['description'](a4_0x4b1a14(0x18e))['action'](_0x51ea4e=>{const _0x1f218b=a4_0x4b1a14;addRule(_0x51ea4e),a4_0x38bc7a['success'](_0x1f218b(0x192)+_0x51ea4e);})[a4_0x4b1a14(0x194)](()=>{const _0x15a083=a4_0x4b1a14;clearRules(),a4_0x38bc7a[_0x15a083(0x1db)](_0x15a083(0x1cd));});const mcpCmd=program['command']('mcp')[a4_0x4b1a14(0x1a8)](a4_0x4b1a14(0x19a));mcpCmd[a4_0x4b1a14(0x1b9)](a4_0x4b1a14(0x18f))[a4_0x4b1a14(0x1a8)](a4_0x4b1a14(0x18d))[a4_0x4b1a14(0x194)](()=>{const _0x4f7d8c=a4_0x4b1a14,_0x2f3921=getMcpServers(),_0x3fe0aa=Object[_0x4f7d8c(0x1ab)](_0x2f3921);if(_0x3fe0aa[_0x4f7d8c(0x1ba)]===0x0){a4_0x38bc7a['info'](_0x4f7d8c(0x18b));return;}a4_0x38bc7a[_0x4f7d8c(0x1b6)]('MCP\x20Servers'),_0x3fe0aa[_0x4f7d8c(0x1ce)](_0x326147=>{const _0x433635=_0x4f7d8c,_0x43c4c7=_0x2f3921[_0x326147];a4_0x38bc7a[_0x433635(0x1ac)]('-\x20'+_0x326147+':\x20'+_0x43c4c7['command']+'\x20'+_0x43c4c7[_0x433635(0x191)][_0x433635(0x1bb)]('\x20'));});}),mcpCmd[a4_0x4b1a14(0x1b9)]('add\x20<name>\x20<command>\x20[args...]')[a4_0x4b1a14(0x1a8)](a4_0x4b1a14(0x1df))['action']((_0x50a5f4,_0x1a143f,_0x2452d3)=>{const _0x26cb46=a4_0x4b1a14;addMcpServer(_0x50a5f4,_0x1a143f,_0x2452d3),a4_0x38bc7a[_0x26cb46(0x1db)]('Added\x20MCP\x20server:\x20'+_0x50a5f4);}),mcpCmd[a4_0x4b1a14(0x1b9)](a4_0x4b1a14(0x1c2))[a4_0x4b1a14(0x1a8)](a4_0x4b1a14(0x1b8))[a4_0x4b1a14(0x194)](_0x4221d8=>{const _0x70a4ab=a4_0x4b1a14;removeMcpServer(_0x4221d8)?a4_0x38bc7a[_0x70a4ab(0x1db)](_0x70a4ab(0x1a0)+_0x4221d8):a4_0x38bc7a[_0x70a4ab(0x1de)]('MCP\x20server\x20\x27'+_0x4221d8+_0x70a4ab(0x1af));}),program['command'](a4_0x4b1a14(0x1b7))[a4_0x4b1a14(0x1a8)](a4_0x4b1a14(0x1a4))[a4_0x4b1a14(0x194)](()=>{const _0xb7cf7a=a4_0x4b1a14,{createFile:_0x59af7c,listDirectory:_0x37a584}=require(_0xb7cf7a(0x1b4)),_0xa851d9=_0x37a584('.'),_0x4c169d=_0xa851d9[_0xb7cf7a(0x1b0)]?.[_0xb7cf7a(0x1aa)](_0x4199f4=>_0x4199f4[_0xb7cf7a(0x1b3)]===_0xb7cf7a(0x1c0));if(_0x4c169d){a4_0x38bc7a[_0xb7cf7a(0x1d2)](_0xb7cf7a(0x1bf));return;}_0x59af7c(_0xb7cf7a(0x1a2),_0xb7cf7a(0x1b5)),_0x59af7c(_0xb7cf7a(0x1da),_0xb7cf7a(0x189)),a4_0x38bc7a['success']('Initialized\x20Woozlit\x20in\x20current\x20directory'),a4_0x38bc7a[_0xb7cf7a(0x1d3)]('Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md');}),program[a4_0x4b1a14(0x1a9)]();
|
|
2
|
+
const a4_0x3d1b0a=a4_0x4ca0;(function(_0xce9fa9,_0x484ea3){const _0xc557e8=a4_0x4ca0,_0x542e8d=_0xce9fa9();while(!![]){try{const _0x1ad978=-parseInt(_0xc557e8(0x115))/0x1*(parseInt(_0xc557e8(0x101))/0x2)+parseInt(_0xc557e8(0xd1))/0x3*(parseInt(_0xc557e8(0x113))/0x4)+-parseInt(_0xc557e8(0xfb))/0x5+-parseInt(_0xc557e8(0x121))/0x6*(parseInt(_0xc557e8(0xf0))/0x7)+parseInt(_0xc557e8(0xf2))/0x8+-parseInt(_0xc557e8(0xd3))/0x9+-parseInt(_0xc557e8(0x119))/0xa*(-parseInt(_0xc557e8(0x11f))/0xb);if(_0x1ad978===_0x484ea3)break;else _0x542e8d['push'](_0x542e8d['shift']());}catch(_0x24ab10){_0x542e8d['push'](_0x542e8d['shift']());}}}(a4_0x15b8,0x630d9));import{Command}from'commander';import{login,logout,isLoggedIn}from'./auth/login.js';import{startChat}from'./chat/agent.js';function a4_0x15b8(){const _0x13e162=['14263930qmQrUf','Logged\x20in\x20as\x20','whoami','Added\x20MCP\x20server:\x20','warn','Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.','11fErvIE','logout','156786bvAnvg','Rules','Removed\x20MCP\x20server:\x20','dim','list','Add\x20a\x20new\x20MCP\x20server','config','All\x20rules\x20cleared','List\x20all\x20rules','\x27\x20not\x20found','Select\x20AI\x20model','3fBjupV','join','5545197uQZcQG','start','List\x20all\x20MCP\x20servers','No\x20rules\x20defined','length','Login\x20failed\x20or\x20timed\x20out','Already\x20logged\x20in\x20as\x20','Woozlit\x20already\x20initialized\x20in\x20this\x20directory','success','write','login','Ask\x20a\x20single\x20question','init','Initialize\x20Woozlit\x20in\x20current\x20directory','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','Waiting\x20for\x20authentication...','Current\x20User','remove\x20<name>','description','stop','displayName','args','.woozlit','Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant','Show\x20current\x20user\x20info','Add\x20a\x20new\x20rule','showLogo','./tools/file.js','some','14ByFrQx','No\x20MCP\x20servers\x20configured','2160320VsxdeP','N/A','add\x20<name>\x20<command>\x20[args...]','entries','action','rules','createSpinner','1.0.4','Remove\x20an\x20MCP\x20server','1142135ZkhzNp','Logout\x20from\x20your\x20Woozlit\x20account','MCP\x20Servers','.woozlit/rules.md','Name:\x20','Email:\x20','874862LJjdLZ','header','error','chat\x20[message]','info','ask\x20<message>','command','version','add\x20<rule>','mcp','email','stdout','forEach','Added\x20rule:\x20','#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a','name','Initialized\x20Woozlit\x20in\x20current\x20directory','parse','174164LrdZIG','Logged\x20out\x20successfully','1ifqHWv','Configure\x20CLI\x20settings','Opening\x20browser\x20for\x20login...','Start\x20an\x20AI\x20chat\x20session'];a4_0x15b8=function(){return _0x13e162;};return a4_0x15b8();}import{selectModel,getSelectedModel}from'./ui/select.js';import{listRules,addRule,clearRules}from'./tools/rules.js';import{getUser}from'./utils/storage.js';import{addMcpServer,removeMcpServer,getMcpServers,ensureDefaultServers}from'./config/mcp.js';import*as a4_0x4aed01 from'./ui/output.js';const program=new Command();program[a4_0x3d1b0a(0x110)]('woozlit')[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0xea))[a4_0x3d1b0a(0x108)](a4_0x3d1b0a(0xf9))[a4_0x3d1b0a(0xf6)](async()=>{const _0x1b3263=a4_0x3d1b0a;ensureDefaultServers(),a4_0x4aed01[_0x1b3263(0xed)]();if(!isLoggedIn()){a4_0x4aed01['warn'](_0x1b3263(0xe1)),a4_0x4aed01[_0x1b3263(0x124)](''),a4_0x4aed01[_0x1b3263(0x105)](_0x1b3263(0x117));const _0x55f102=a4_0x4aed01['createSpinner'](_0x1b3263(0xe2));_0x55f102[_0x1b3263(0xd4)]();const _0x159e93=await login();_0x55f102[_0x1b3263(0xe6)]();if(!_0x159e93){a4_0x4aed01[_0x1b3263(0x103)](_0x1b3263(0xd8));return;}const _0x3491b5=getUser();a4_0x4aed01[_0x1b3263(0xdb)](_0x1b3263(0x11a)+(_0x3491b5[_0x1b3263(0xe7)]||_0x3491b5[_0x1b3263(0x10b)]));}await startChat();}),program['command'](a4_0x3d1b0a(0xdd))[a4_0x3d1b0a(0xe5)]('Login\x20with\x20your\x20Woozlit\x20account')['action'](async()=>{const _0x141010=a4_0x3d1b0a;if(isLoggedIn()){const _0x5cecdd=getUser();a4_0x4aed01[_0x141010(0x105)](_0x141010(0xd9)+_0x5cecdd[_0x141010(0x10b)]);return;}a4_0x4aed01[_0x141010(0x105)](_0x141010(0x117));const _0x8a3603=a4_0x4aed01['createSpinner'](_0x141010(0xe2));_0x8a3603[_0x141010(0xd4)]();const _0x2ccb12=await login();_0x8a3603[_0x141010(0xe6)]();if(_0x2ccb12){const _0x47f29b=getUser();a4_0x4aed01[_0x141010(0xdb)]('Logged\x20in\x20as\x20'+(_0x47f29b[_0x141010(0xe7)]||_0x47f29b[_0x141010(0x10b)]));}else a4_0x4aed01[_0x141010(0x103)]('Login\x20failed\x20or\x20timed\x20out');}),program[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0x120))[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0xfc))[a4_0x3d1b0a(0xf6)](()=>{const _0xa6e060=a4_0x3d1b0a;logout(),a4_0x4aed01[_0xa6e060(0xdb)](_0xa6e060(0x114));}),program[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0x11b))[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0xeb))[a4_0x3d1b0a(0xf6)](()=>{const _0x4be236=a4_0x3d1b0a;if(!isLoggedIn()){a4_0x4aed01[_0x4be236(0x11d)](_0x4be236(0x11e));return;}const _0x15a30b=getUser();a4_0x4aed01[_0x4be236(0x102)](_0x4be236(0xe3)),a4_0x4aed01[_0x4be236(0x105)](_0x4be236(0xff)+(_0x15a30b[_0x4be236(0xe7)]||_0x4be236(0xf3))),a4_0x4aed01['info'](_0x4be236(0x100)+(_0x15a30b[_0x4be236(0x10b)]||_0x4be236(0xf3))),a4_0x4aed01[_0x4be236(0x105)]('Model:\x20'+getSelectedModel());}),program[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0x104))[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0x118))['action'](async _0x430da3=>{const _0x7042a3=a4_0x3d1b0a;a4_0x4aed01[_0x7042a3(0xed)]();if(!isLoggedIn()){a4_0x4aed01[_0x7042a3(0x11d)](_0x7042a3(0xe1)),a4_0x4aed01[_0x7042a3(0x124)](''),a4_0x4aed01[_0x7042a3(0x105)](_0x7042a3(0x117));const _0x5412af=a4_0x4aed01[_0x7042a3(0xf8)](_0x7042a3(0xe2));_0x5412af[_0x7042a3(0xd4)]();const _0x344ec2=await login();_0x5412af[_0x7042a3(0xe6)]();if(!_0x344ec2){a4_0x4aed01[_0x7042a3(0x103)](_0x7042a3(0xd8));return;}const _0x26cd4e=getUser();a4_0x4aed01[_0x7042a3(0xdb)](_0x7042a3(0x11a)+(_0x26cd4e[_0x7042a3(0xe7)]||_0x26cd4e[_0x7042a3(0x10b)]));}await startChat(_0x430da3);}),program[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0x106))[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0xde))[a4_0x3d1b0a(0xf6)](async _0x1f9c17=>{const _0x5e3f1a=a4_0x3d1b0a;a4_0x4aed01['showLogo']();if(!isLoggedIn()){a4_0x4aed01[_0x5e3f1a(0x11d)](_0x5e3f1a(0xe1)),a4_0x4aed01[_0x5e3f1a(0x124)](''),a4_0x4aed01[_0x5e3f1a(0x105)]('Opening\x20browser\x20for\x20login...');const _0x2384b7=a4_0x4aed01['createSpinner'](_0x5e3f1a(0xe2));_0x2384b7[_0x5e3f1a(0xd4)]();const _0x4c7286=await login();_0x2384b7['stop']();if(!_0x4c7286){a4_0x4aed01['error'](_0x5e3f1a(0xd8));return;}const _0x5e7df3=getUser();a4_0x4aed01[_0x5e3f1a(0xdb)]('Logged\x20in\x20as\x20'+(_0x5e7df3[_0x5e3f1a(0xe7)]||_0x5e7df3['email']));}await startChat(_0x1f9c17);});const configCmd=program[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0x127))['description'](a4_0x3d1b0a(0x116));configCmd[a4_0x3d1b0a(0x107)]('model')[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0x12b))[a4_0x3d1b0a(0xf6)](async()=>{const _0x30917e=a4_0x3d1b0a,_0x3119c7=await selectModel();a4_0x4aed01[_0x30917e(0xdb)]('Model\x20set\x20to:\x20'+_0x3119c7);});const rulesCmd=program['command'](a4_0x3d1b0a(0xf7))['description']('Manage\x20AI\x20behavior\x20rules');rulesCmd[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0x125))[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0x129))[a4_0x3d1b0a(0xf6)](()=>{const _0x49fbec=a4_0x3d1b0a,_0x404e87=listRules();if(_0x404e87[_0x49fbec(0xd7)]===0x0){a4_0x4aed01[_0x49fbec(0x105)](_0x49fbec(0xd6));return;}a4_0x4aed01[_0x49fbec(0x102)](_0x49fbec(0x122)),_0x404e87[_0x49fbec(0x10d)]((_0x488014,_0x890ed0)=>{const _0x1b6c97=_0x49fbec;process[_0x1b6c97(0x10c)][_0x1b6c97(0xdc)](_0x890ed0+0x1+'.\x20'+_0x488014+'\x0a');});}),rulesCmd[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0x109))['description'](a4_0x3d1b0a(0xec))[a4_0x3d1b0a(0xf6)](_0x3515a4=>{const _0x263703=a4_0x3d1b0a;addRule(_0x3515a4),a4_0x4aed01['success'](_0x263703(0x10e)+_0x3515a4);})[a4_0x3d1b0a(0xf6)](()=>{const _0x1eb045=a4_0x3d1b0a;clearRules(),a4_0x4aed01['success'](_0x1eb045(0x128));});function a4_0x4ca0(_0x5ad653,_0x1f06b3){_0x5ad653=_0x5ad653-0xd1;const _0x15b8c5=a4_0x15b8();let _0x4ca0a7=_0x15b8c5[_0x5ad653];return _0x4ca0a7;}const mcpCmd=program[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0x10a))[a4_0x3d1b0a(0xe5)]('Manage\x20MCP\x20servers');mcpCmd[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0x125))[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0xd5))[a4_0x3d1b0a(0xf6)](()=>{const _0x23b017=a4_0x3d1b0a,_0x5952f0=getMcpServers(),_0x5208eb=Object['keys'](_0x5952f0);if(_0x5208eb['length']===0x0){a4_0x4aed01[_0x23b017(0x105)](_0x23b017(0xf1));return;}a4_0x4aed01[_0x23b017(0x102)](_0x23b017(0xfd)),_0x5208eb[_0x23b017(0x10d)](_0x24ae2e=>{const _0x3d388a=_0x23b017,_0x34ed5f=_0x5952f0[_0x24ae2e];a4_0x4aed01[_0x3d388a(0x105)]('-\x20'+_0x24ae2e+':\x20'+_0x34ed5f['command']+'\x20'+_0x34ed5f[_0x3d388a(0xe8)][_0x3d388a(0xd2)]('\x20'));});}),mcpCmd[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0xf4))['description'](a4_0x3d1b0a(0x126))['action']((_0x30f5c6,_0x2ced05,_0xa86f19)=>{const _0x2457dc=a4_0x3d1b0a;addMcpServer(_0x30f5c6,_0x2ced05,_0xa86f19),a4_0x4aed01['success'](_0x2457dc(0x11c)+_0x30f5c6);}),mcpCmd[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0xe4))[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0xfa))[a4_0x3d1b0a(0xf6)](_0x59c525=>{const _0x4e5f66=a4_0x3d1b0a;removeMcpServer(_0x59c525)?a4_0x4aed01['success'](_0x4e5f66(0x123)+_0x59c525):a4_0x4aed01[_0x4e5f66(0x103)]('MCP\x20server\x20\x27'+_0x59c525+_0x4e5f66(0x12a));}),program[a4_0x3d1b0a(0x107)](a4_0x3d1b0a(0xdf))[a4_0x3d1b0a(0xe5)](a4_0x3d1b0a(0xe0))[a4_0x3d1b0a(0xf6)](()=>{const _0x343954=a4_0x3d1b0a,{createFile:_0x46e4f6,listDirectory:_0x33544c}=require(_0x343954(0xee)),_0x386d0e=_0x33544c('.'),_0x10ad0b=_0x386d0e[_0x343954(0xf5)]?.[_0x343954(0xef)](_0x4dbb0e=>_0x4dbb0e[_0x343954(0x110)]===_0x343954(0xe9));if(_0x10ad0b){a4_0x4aed01[_0x343954(0x11d)](_0x343954(0xda));return;}_0x46e4f6(_0x343954(0xfe),'#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a'),_0x46e4f6('.woozlit/context.md',_0x343954(0x10f)),a4_0x4aed01[_0x343954(0xdb)](_0x343954(0x111)),a4_0x4aed01[_0x343954(0x124)]('Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md');}),program[a4_0x3d1b0a(0x112)]();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x4836b7=a5_0x5220;(function(_0x469e9b,_0x408fc){const _0x4f8c09=a5_0x5220,_0x5718d4=_0x469e9b();while(!![]){try{const _0x4762ce=parseInt(_0x4f8c09(0x1d7))/0x1*(-parseInt(_0x4f8c09(0x1dd))/0x2)+parseInt(_0x4f8c09(0x1de))/0x3+parseInt(_0x4f8c09(0x1bd))/0x4*(-parseInt(_0x4f8c09(0x1dc))/0x5)+parseInt(_0x4f8c09(0x1ca))/0x6+-parseInt(_0x4f8c09(0x1d0))/0x7+-parseInt(_0x4f8c09(0x1ea))/0x8*(-parseInt(_0x4f8c09(0x1f6))/0x9)+-parseInt(_0x4f8c09(0x1c3))/0xa;if(_0x4762ce===_0x408fc)break;else _0x5718d4['push'](_0x5718d4['shift']());}catch(_0x4930e1){_0x5718d4['push'](_0x5718d4['shift']());}}}(a5_0x59a2,0xa5273));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{CallToolRequestSchema,ListToolsRequestSchema}from'@modelcontextprotocol/sdk/types.js';function a5_0x5220(_0x45779f,_0xcbf913){_0x45779f=_0x45779f-0x1bd;const _0x59a2f6=a5_0x59a2();let _0x5220f1=_0x59a2f6[_0x45779f];return _0x5220f1;}import{Jimp}from'jimp';import{createRequire}from'module';const require=createRequire(import.meta.url);let robot,screenshot;try{robot=require('robotjs');}catch(a5_0x7c1ee6){}try{screenshot=require(a5_0x4836b7(0x1cf));}catch(a5_0x161a72){}function a5_0x59a2(){const _0x13289a=['1011009AvceCb','join','height','computer-use','number','toString','image','bitmap','mouseClick','computer_key_tap','Get\x20the\x20screen\x20resolution.','key','8DTHcip','Typed:\x20\x22','computer_mouse_move','Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','control','width','computer_mouse_click','Screenshot\x20taken.','boolean','command','base64','connect','9899451diHtEJ','read','36172geuZLD','Screen\x20size:\x20','Click\x20the\x20mouse\x20button.','object','getBuffer','1.0.0','5992190pYtzkj','Error:\x20','X\x20coordinate','computer_type','moveMouse','computer_screenshot','typeString','2864886kYjFOq','Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','shift','computer_screen_size','setRequestHandler','screenshot-desktop','455693LcZoQt','right','with\x20','params','image/jpeg','left','Unknown\x20tool:\x20','3929CMVcQp','string','text','getScreenSize','Clicked\x20','315qQYCou','2UqYXMf'];a5_0x59a2=function(){return _0x13289a;};return a5_0x59a2();}const AUTO=-0x1,MIME_JPEG=a5_0x4836b7(0x1d4),server=new Server({'name':a5_0x4836b7(0x1e1),'version':a5_0x4836b7(0x1c2)},{'capabilities':{'tools':{}}});server['setRequestHandler'](ListToolsRequestSchema,async()=>{const _0x212e47=a5_0x4836b7;return{'tools':[{'name':_0x212e47(0x1c8),'description':_0x212e47(0x1cb),'inputSchema':{'type':_0x212e47(0x1c0),'properties':{}}},{'name':_0x212e47(0x1ec),'description':_0x212e47(0x1ed),'inputSchema':{'type':_0x212e47(0x1c0),'properties':{'x':{'type':_0x212e47(0x1e2),'description':_0x212e47(0x1c5)},'y':{'type':_0x212e47(0x1e2),'description':'Y\x20coordinate'}},'required':['x','y']}},{'name':_0x212e47(0x1f0),'description':_0x212e47(0x1bf),'inputSchema':{'type':_0x212e47(0x1c0),'properties':{'button':{'type':'string','enum':[_0x212e47(0x1d5),_0x212e47(0x1d1),'middle'],'default':'left'},'double':{'type':_0x212e47(0x1f2),'default':![]}}}},{'name':_0x212e47(0x1c6),'description':'Type\x20a\x20string\x20of\x20text.','inputSchema':{'type':'object','properties':{'text':{'type':_0x212e47(0x1d8),'description':'Text\x20to\x20type'}},'required':['text']}},{'name':'computer_key_tap','description':'Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','inputSchema':{'type':_0x212e47(0x1c0),'properties':{'key':{'type':_0x212e47(0x1d8),'description':'Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)'},'modifiers':{'type':'array','items':{'type':_0x212e47(0x1d8),'enum':['alt',_0x212e47(0x1f3),_0x212e47(0x1ee),_0x212e47(0x1cc)]},'description':'Modifier\x20keys'}},'required':[_0x212e47(0x1e9)]}},{'name':_0x212e47(0x1cd),'description':_0x212e47(0x1e8),'inputSchema':{'type':_0x212e47(0x1c0),'properties':{}}}]};}),server[a5_0x4836b7(0x1ce)](CallToolRequestSchema,async _0x4ef7af=>{const _0x3d781e=a5_0x4836b7,{name:_0x7d1fe7,arguments:_0x588fd1}=_0x4ef7af[_0x3d781e(0x1d3)];try{if(_0x7d1fe7==='computer_screenshot'){const _0x314547=await screenshot(),_0x146565=await Jimp[_0x3d781e(0x1f7)](_0x314547);_0x146565[_0x3d781e(0x1e5)][_0x3d781e(0x1ef)]>0x400&&_0x146565['resize']({'w':0x400});const _0x199334=await _0x146565[_0x3d781e(0x1c1)](MIME_JPEG),_0x4c7949=_0x199334[_0x3d781e(0x1e3)](_0x3d781e(0x1f4));return{'content':[{'type':'text','text':_0x3d781e(0x1f1)},{'type':_0x3d781e(0x1e4),'data':_0x4c7949,'mimeType':_0x3d781e(0x1d4)}]};}if(_0x7d1fe7===_0x3d781e(0x1ec)){const {x:_0x3befc1,y:_0x1e7156}=_0x588fd1;return robot[_0x3d781e(0x1c7)](_0x3befc1,_0x1e7156),{'content':[{'type':_0x3d781e(0x1d9),'text':'Moved\x20mouse\x20to\x20'+_0x3befc1+',\x20'+_0x1e7156}]};}if(_0x7d1fe7==='computer_mouse_click'){const {button:button=_0x3d781e(0x1d5),double:double=![]}=_0x588fd1;return robot[_0x3d781e(0x1e6)](button,double),{'content':[{'type':'text','text':_0x3d781e(0x1db)+button+'\x20button'+(double?'\x20(double)':'')}]};}if(_0x7d1fe7==='computer_type'){const {text:_0x18dcf5}=_0x588fd1;return robot[_0x3d781e(0x1c9)](_0x18dcf5),{'content':[{'type':_0x3d781e(0x1d9),'text':_0x3d781e(0x1eb)+_0x18dcf5+'\x22'}]};}if(_0x7d1fe7===_0x3d781e(0x1e7)){const {key:_0x185931,modifiers:_0x237ad3}=_0x588fd1;return robot['keyTap'](_0x185931,_0x237ad3),{'content':[{'type':_0x3d781e(0x1d9),'text':'Tapped\x20key:\x20'+_0x185931+'\x20'+(_0x237ad3?_0x3d781e(0x1d2)+_0x237ad3[_0x3d781e(0x1df)]('+'):'')}]};}if(_0x7d1fe7===_0x3d781e(0x1cd)){const _0x40951f=robot[_0x3d781e(0x1da)]();return{'content':[{'type':_0x3d781e(0x1d9),'text':_0x3d781e(0x1be)+_0x40951f['width']+'x'+_0x40951f[_0x3d781e(0x1e0)]}]};}throw new Error(_0x3d781e(0x1d6)+_0x7d1fe7);}catch(_0x119107){return{'content':[{'type':_0x3d781e(0x1d9),'text':_0x3d781e(0x1c4)+_0x119107}],'isError':!![]};}});const transport=new StdioServerTransport();await server[a5_0x4836b7(0x1f5)](transport);
|
package/dist/tools/command.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a6_0x5e64(){const _0x3717b0=['data','stdout','toString','win32','451344lLsmoY','308MorJBS','7971220kRGJRK','853114UutPkY','190986cJinAP','5956887YRGbMv','25AAZNDs','cmd.exe','close','error','\x0a[Woozlit:\x20Command\x20continuing\x20in\x20background\x20after\x20','stderr','46765212MBjmTB','removeAllListeners','9QPjdaO','4VYrBnM','4OwixLX','unref','16lmXQSV','message','4166267iwSQzK'];a6_0x5e64=function(){return _0x3717b0;};return a6_0x5e64();}(function(_0x83fd4c,_0xb51538){const _0x248bb1=a6_0x150c,_0x561bae=_0x83fd4c();while(!![]){try{const _0x538893=-parseInt(_0x248bb1(0xd1))/0x1*(parseInt(_0x248bb1(0xc5))/0x2)+-parseInt(_0x248bb1(0xd3))/0x3*(parseInt(_0x248bb1(0xc4))/0x4)+-parseInt(_0x248bb1(0xbb))/0x5*(-parseInt(_0x248bb1(0xd2))/0x6)+-parseInt(_0x248bb1(0xc9))/0x7*(-parseInt(_0x248bb1(0xc7))/0x8)+parseInt(_0x248bb1(0xc3))/0x9*(parseInt(_0x248bb1(0xd0))/0xa)+-parseInt(_0x248bb1(0xcf))/0xb*(parseInt(_0x248bb1(0xce))/0xc)+parseInt(_0x248bb1(0xc1))/0xd;if(_0x538893===_0xb51538)break;else _0x561bae['push'](_0x561bae['shift']());}catch(_0x2926c6){_0x561bae['push'](_0x561bae['shift']());}}}(a6_0x5e64,0xf3e3a));function a6_0x150c(_0x29ce44,_0xcb8de7){_0x29ce44=_0x29ce44-0xbb;const _0x5e64e1=a6_0x5e64();let _0x150c25=_0x5e64e1[_0x29ce44];return _0x150c25;}import{spawn}from'child_process';export async function runCommand(_0x3a58ea,_0x543436,_0x3dbbfc=![],_0x17b89a=0xbb8){return new Promise(_0x3b08ce=>{const _0x213dec=a6_0x150c,_0x17441c=process['platform']===_0x213dec(0xcd),_0x551bb0=_0x17441c?_0x213dec(0xbc):'/bin/sh',_0x544bf0=_0x17441c?'/c':'-c',_0x64821c=spawn(_0x551bb0,[_0x544bf0,_0x3a58ea],{'cwd':process['cwd'](),'env':process['env'],'detached':_0x3dbbfc,'stdio':'pipe'});let _0x51ffab='',_0xca1f1e='',_0x330dd4=![];_0x3dbbfc&&setTimeout(()=>{const _0x1fcc6f=_0x213dec;if(!_0x330dd4){_0x330dd4=!![];if(_0x64821c[_0x1fcc6f(0xc6)])_0x64821c[_0x1fcc6f(0xc6)]();_0x64821c[_0x1fcc6f(0xcb)]?.['removeAllListeners'](_0x1fcc6f(0xca)),_0x64821c[_0x1fcc6f(0xc0)]?.[_0x1fcc6f(0xc2)](_0x1fcc6f(0xca)),_0x3b08ce({'success':!![],'stdout':_0x51ffab+(_0x1fcc6f(0xbf)+_0x17b89a+'ms...]'),'stderr':_0xca1f1e,'exitCode':0x0});}},_0x17b89a),_0x64821c[_0x213dec(0xcb)]?.['on'](_0x213dec(0xca),_0x5eed01=>{const _0x16e12b=_0x213dec;if(_0x330dd4)return;const _0x218265=_0x5eed01[_0x16e12b(0xcc)]();_0x51ffab+=_0x218265;if(_0x543436)_0x543436(_0x218265);}),_0x64821c['stderr']?.['on'](_0x213dec(0xca),_0x1d59dc=>{const _0x3f92b8=_0x213dec;if(_0x330dd4)return;const _0x4afc7d=_0x1d59dc[_0x3f92b8(0xcc)]();_0xca1f1e+=_0x4afc7d;if(_0x543436)_0x543436(_0x4afc7d);}),_0x64821c['on'](_0x213dec(0xbd),_0x2f1a88=>{!_0x330dd4&&(_0x330dd4=!![],_0x3b08ce({'success':_0x2f1a88===0x0,'stdout':_0x51ffab,'stderr':_0xca1f1e,'exitCode':_0x2f1a88||0x0}));}),_0x64821c['on'](_0x213dec(0xbe),_0x469045=>{const _0x29a11c=_0x213dec;!_0x330dd4&&(_0x330dd4=!![],_0x3b08ce({'success':![],'stdout':_0x51ffab,'stderr':_0x469045[_0x29a11c(0xc8)],'exitCode':0x1}));});});}
|
package/dist/tools/file.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51fb54,_0x3ec917){const _0x350336=a7_0x12f2,_0x45971c=_0x51fb54();while(!![]){try{const _0x5cc344=-parseInt(_0x350336(0x19c))/0x1*(-parseInt(_0x350336(0x191))/0x2)+-parseInt(_0x350336(0x1a0))/0x3+parseInt(_0x350336(0x1a2))/0x4+parseInt(_0x350336(0x192))/0x5*(-parseInt(_0x350336(0x199))/0x6)+parseInt(_0x350336(0x189))/0x7+parseInt(_0x350336(0x1a7))/0x8+parseInt(_0x350336(0x186))/0x9*(-parseInt(_0x350336(0x198))/0xa);if(_0x5cc344===_0x3ec917)break;else _0x45971c['push'](_0x45971c['shift']());}catch(_0x348609){_0x45971c['push'](_0x45971c['shift']());}}}(a7_0x2316,0x258c8));import{readFileSync,writeFileSync,existsSync,readdirSync,statSync,mkdirSync}from'fs';import{dirname,resolve}from'path';function a7_0x12f2(_0x300f90,_0x59d1d0){_0x300f90=_0x300f90-0x184;const _0x23161e=a7_0x2316();let _0x12f24d=_0x23161e[_0x300f90];return _0x12f24d;}function a7_0x2316(){const _0x38c21f=['isFile','Created\x20','341787TRuogt','isDirectory','431292AorxNd','directory','\x20output\x20matches\x20in\x20','Listed\x20','.jpeg','508816TjyAMy','size','replace','.png','Failed\x20to\x20list\x20','.jpg','File\x20not\x20found:\x20','match','20997lNHixC','Read\x20','includes','2039002aKtZUl','Edited\x20','map','Directory\x20not\x20found:\x20','Failed\x20to\x20edit\x20','Failed\x20to\x20read\x20','Failed\x20to\x20create\x20','length','8FXBdhB','10RncomV','split','pop','cwd','toLowerCase','.gif','800Uyezdf','237582ADdXvH','Found\x20','utf-8','17713PDyDGD',').\x20Use\x20\x27computer_screenshot\x27\x20or\x20specific\x20tools\x20to\x20handle\x20this\x20file\x20type.\x20Direct\x20reading\x20is\x20not\x20supported.]'];a7_0x2316=function(){return _0x38c21f;};return a7_0x2316();}export function createFile(_0x5cf155,_0x1363ca){const _0x10f870=a7_0x12f2;try{const _0x3cb737=resolve(process[_0x10f870(0x195)](),_0x5cf155),_0x565ad8=dirname(_0x3cb737);return!existsSync(_0x565ad8)&&mkdirSync(_0x565ad8,{'recursive':!![]}),writeFileSync(_0x3cb737,_0x1363ca,'utf-8'),{'success':!![],'message':_0x10f870(0x19f)+_0x5cf155};}catch(_0x53b11d){return{'success':![],'message':_0x10f870(0x18f)+_0x5cf155+':\x20'+_0x53b11d};}}export function readFile(_0x261033){const _0x1dc656=a7_0x12f2;try{const _0x2a0810=resolve(process[_0x1dc656(0x195)](),_0x261033);if(!existsSync(_0x2a0810))return{'success':![],'message':_0x1dc656(0x184)+_0x261033};const _0xe33331=[_0x1dc656(0x1aa),_0x1dc656(0x1ac),_0x1dc656(0x1a6),_0x1dc656(0x197),'.exe','.dll','.bin'],_0x478d61=_0x2a0810[_0x1dc656(0x193)]('.')[_0x1dc656(0x194)]()?.[_0x1dc656(0x196)]();if(_0x478d61&&_0xe33331[_0x1dc656(0x188)]('.'+_0x478d61))return{'success':![],'message':'[Binary\x20file\x20detected\x20(.'+_0x478d61+_0x1dc656(0x19d)};const _0x2f6e99=readFileSync(_0x2a0810,_0x1dc656(0x19b));return{'success':!![],'content':_0x2f6e99,'message':_0x1dc656(0x187)+_0x261033};}catch(_0x4296f3){return{'success':![],'message':_0x1dc656(0x18e)+_0x261033+':\x20'+_0x4296f3};}}export function listDirectory(_0x576cce='.'){const _0x2171da=a7_0x12f2;try{const _0xa3647f=resolve(process[_0x2171da(0x195)](),_0x576cce);if(!existsSync(_0xa3647f))return{'success':![],'message':_0x2171da(0x18c)+_0x576cce};const _0x39e9f2=readdirSync(_0xa3647f),_0x6d047a=_0x39e9f2[_0x2171da(0x18b)](_0x5a4d45=>{const _0x3aa09c=_0x2171da,_0x3aac38=resolve(_0xa3647f,_0x5a4d45),_0x2f3e71=statSync(_0x3aac38);return{'name':_0x5a4d45,'type':_0x2f3e71[_0x3aa09c(0x1a1)]()?_0x3aa09c(0x1a3):'file','size':_0x2f3e71[_0x3aa09c(0x19e)]()?_0x2f3e71[_0x3aa09c(0x1a8)]:undefined};});return{'success':!![],'entries':_0x6d047a,'message':_0x2171da(0x1a5)+_0x6d047a[_0x2171da(0x190)]+'\x20items\x20in\x20'+_0x576cce};}catch(_0x411e66){return{'success':![],'message':_0x2171da(0x1ab)+_0x576cce+':\x20'+_0x411e66};}}export function editFile(_0x4694c0,_0x541e80,_0x134051){const _0x25704d=a7_0x12f2;try{const _0x4216be=resolve(process[_0x25704d(0x195)](),_0x4694c0);if(!existsSync(_0x4216be))return{'success':![],'message':_0x25704d(0x184)+_0x4694c0};const _0x56c40e=readFileSync(_0x4216be,_0x25704d(0x19b));if(!_0x56c40e[_0x25704d(0x188)](_0x541e80))return{'success':![],'message':'Search\x20string\x20not\x20found\x20in\x20'+_0x4694c0};const _0x1fa008=_0x56c40e[_0x25704d(0x1a9)](_0x541e80,_0x134051);return writeFileSync(_0x4216be,_0x1fa008,_0x25704d(0x19b)),{'success':!![],'message':_0x25704d(0x18a)+_0x4694c0};}catch(_0x5f1721){return{'success':![],'message':_0x25704d(0x18d)+_0x4694c0+':\x20'+_0x5f1721};}}export function searchFile(_0x55120e,_0x288200){const _0x5dc543=a7_0x12f2;try{const _0x5d46ff=resolve(process[_0x5dc543(0x195)](),_0x55120e);if(!existsSync(_0x5d46ff))return{'success':![],'message':_0x5dc543(0x184)+_0x55120e};const _0x28c564=readFileSync(_0x5d46ff,_0x5dc543(0x19b)),_0x5b9646=new RegExp(_0x288200,'g'),_0x2e88d8=_0x28c564[_0x5dc543(0x185)](_0x5b9646)||[],_0x4c9e11=_0x28c564[_0x5dc543(0x193)]('\x0a'),_0x19564a=_0x4c9e11['filter']((_0x4c2347,_0x1ab89c)=>new RegExp(_0x288200)['test'](_0x4c2347));return{'success':!![],'matches':_0x19564a,'message':_0x5dc543(0x19a)+_0x19564a['length']+_0x5dc543(0x1a4)+_0x55120e};}catch(_0x3bd27e){return{'success':![],'message':'Failed\x20to\x20search\x20'+_0x55120e+':\x20'+_0x3bd27e};}}
|
package/dist/tools/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36d165,_0x5c59a8){var _0xc46e83=a8_0x32b1,_0x45ac03=_0x36d165();while(!![]){try{var _0x1ba649=parseInt(_0xc46e83(0xfe))/0x1*(-parseInt(_0xc46e83(0xfa))/0x2)+-parseInt(_0xc46e83(0x102))/0x3*(-parseInt(_0xc46e83(0xfb))/0x4)+-parseInt(_0xc46e83(0x101))/0x5*(parseInt(_0xc46e83(0x100))/0x6)+-parseInt(_0xc46e83(0x103))/0x7*(-parseInt(_0xc46e83(0xfd))/0x8)+parseInt(_0xc46e83(0xf9))/0x9+-parseInt(_0xc46e83(0xfc))/0xa+parseInt(_0xc46e83(0xff))/0xb*(parseInt(_0xc46e83(0xf8))/0xc);if(_0x1ba649===_0x5c59a8)break;else _0x45ac03['push'](_0x45ac03['shift']());}catch(_0x1a718a){_0x45ac03['push'](_0x45ac03['shift']());}}}(a8_0x3a42,0x76d72));export{createFile,readFile,listDirectory,editFile,searchFile}from'./file.js';function a8_0x32b1(_0x55e06a,_0x11fbd6){_0x55e06a=_0x55e06a-0xf8;var _0x3a425a=a8_0x3a42();var _0x32b12a=_0x3a425a[_0x55e06a];return _0x32b12a;}export{runCommand}from'./command.js';export{listRules,addRule,clearRules,formatRulesForSystem}from'./rules.js';function a8_0x3a42(){var _0x9fa009=['148692DfkZhN','115FyPQbS','78249DbZDIK','1028615OwwKqY','12Zlxydn','2597895KgtBuI','7086NrGfSP','24kfaKSp','7364650sJIUXB','8bHCAqO','93ONXVfb','16836842mDMNyt'];a8_0x3a42=function(){return _0x9fa009;};return a8_0x3a42();}export{connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'./mcp.js';
|
package/dist/tools/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ac469,_0x515476){const _0x43c9e1=a9_0x5638,_0x273ad6=_0x5ac469();while(!![]){try{const _0x5d5c74=-parseInt(_0x43c9e1(0x1ac))/0x1*(parseInt(_0x43c9e1(0x1c9))/0x2)+parseInt(_0x43c9e1(0x1c0))/0x3*(parseInt(_0x43c9e1(0x1cc))/0x4)+parseInt(_0x43c9e1(0x1cd))/0x5*(parseInt(_0x43c9e1(0x1ba))/0x6)+parseInt(_0x43c9e1(0x1b8))/0x7+parseInt(_0x43c9e1(0x1c5))/0x8+parseInt(_0x43c9e1(0x1cb))/0x9+-parseInt(_0x43c9e1(0x1c6))/0xa*(parseInt(_0x43c9e1(0x1c3))/0xb);if(_0x5d5c74===_0x515476)break;else _0x273ad6['push'](_0x273ad6['shift']());}catch(_0x98e84e){_0x273ad6['push'](_0x273ad6['shift']());}}}(a9_0x2676,0xcbc4b));import{Client}from'@modelcontextprotocol/sdk/client/index.js';function a9_0x5638(_0xca851c,_0x531fa5){_0xca851c=_0xca851c-0x1a9;const _0x2676b0=a9_0x2676();let _0x563842=_0x2676b0[_0xca851c];return _0x563842;}import{StdioClientTransport}from'@modelcontextprotocol/sdk/client/stdio.js';import{getMcpServers}from'../config/mcp.js';import*as a9_0x31a67a from'../ui/output.js';const clients=new Map();export async function connectToMcpServers(){const _0x1a28f0=a9_0x5638,_0x246102=getMcpServers(),_0xe838e8=Object[_0x1a28f0(0x1be)](_0x246102);if(_0xe838e8[_0x1a28f0(0x1bb)]===0x0)return;a9_0x31a67a[_0x1a28f0(0x1b0)](_0x1a28f0(0x1ae));for(const _0x2b03c3 of _0xe838e8){if(clients[_0x1a28f0(0x1c1)](_0x2b03c3))continue;const _0x547ac1=_0x246102[_0x2b03c3];try{const _0x49c150={...process[_0x1a28f0(0x1bc)],..._0x547ac1[_0x1a28f0(0x1bc)]};Object[_0x1a28f0(0x1be)](_0x49c150)['forEach'](_0x4adafb=>_0x49c150[_0x4adafb]===undefined&&delete _0x49c150[_0x4adafb]);const _0xc9de88=new StdioClientTransport({'command':_0x547ac1[_0x1a28f0(0x1ad)],'args':_0x547ac1[_0x1a28f0(0x1ab)],'env':_0x49c150}),_0x57139b=new Client({'name':'woozlit-cli','version':_0x1a28f0(0x1c8)},{'capabilities':{}});await _0x57139b[_0x1a28f0(0x1b5)](_0xc9de88),clients[_0x1a28f0(0x1bd)](_0x2b03c3,_0x57139b);}catch(_0x19c163){a9_0x31a67a['error']('Failed\x20to\x20connect\x20to\x20MCP\x20server\x20\x27'+_0x2b03c3+_0x1a28f0(0x1c7)+_0x19c163);}}}export async function getMcpTools(){const _0x38795d=a9_0x5638,_0x280c2b=[];for(const [_0x5a9b5a,_0x256500]of clients[_0x38795d(0x1bf)]()){try{const _0x2ac75b=await _0x256500[_0x38795d(0x1c4)](),_0x1ba02d=_0x2ac75b[_0x38795d(0x1b9)][_0x38795d(0x1c2)](_0x371761=>({'name':_0x371761[_0x38795d(0x1af)],'description':_0x371761['description'],'inputSchema':_0x371761[_0x38795d(0x1aa)],'serverName':_0x5a9b5a}));_0x280c2b[_0x38795d(0x1b3)](..._0x1ba02d);}catch(_0x15b106){a9_0x31a67a[_0x38795d(0x1b4)](_0x38795d(0x1b7)+_0x5a9b5a+_0x38795d(0x1c7)+_0x15b106);}}return _0x280c2b;}export async function executeMcpTool(_0x54a458,_0x50c614,_0x46b5ce){const _0x4cabbe=a9_0x5638,_0x47681f=clients[_0x4cabbe(0x1b1)](_0x54a458);if(!_0x47681f)throw new Error('MCP\x20server\x20\x27'+_0x54a458+_0x4cabbe(0x1b6));try{const _0x3acd21=await _0x47681f['callTool']({'name':_0x50c614,'arguments':_0x46b5ce});return _0x3acd21;}catch(_0x33903a){throw new Error(_0x4cabbe(0x1ca)+_0x33903a);}}export function closeMcpClients(){const _0x404993=a9_0x5638;for(const _0x1568f1 of clients[_0x404993(0x1b2)]()){try{_0x1568f1['close']();}catch(_0x19db9c){}}clients[_0x404993(0x1a9)]();}function a9_0x2676(){const _0xe71996=['clear','inputSchema','args','208347xeJJTP','command','Connecting\x20to\x20MCP\x20servers...','name','info','get','values','push','error','connect','\x27\x20not\x20connected','Failed\x20to\x20list\x20tools\x20for\x20\x27','276626WQGXXN','tools','342348fxyxul','length','env','set','keys','entries','3IzUzvO','has','map','6166941OEWbqf','listTools','7248168pvDFdy','20GqSAqr','\x27:\x20','1.0.0','8hMlLMI','MCP\x20tool\x20execution\x20failed:\x20','216126gGdXkW','6594232VXTurj','15caNMPy'];a9_0x2676=function(){return _0xe71996;};return a9_0x2676();}
|
package/dist/tools/rules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fa0a5,_0x53c96b){const _0x3d59d4=a10_0x33d8,_0x418914=_0x2fa0a5();while(!![]){try{const _0x67b7e6=parseInt(_0x3d59d4(0xfc))/0x1*(-parseInt(_0x3d59d4(0xf6))/0x2)+parseInt(_0x3d59d4(0xf8))/0x3+parseInt(_0x3d59d4(0xf1))/0x4+parseInt(_0x3d59d4(0xfa))/0x5*(-parseInt(_0x3d59d4(0xfd))/0x6)+-parseInt(_0x3d59d4(0xf4))/0x7+-parseInt(_0x3d59d4(0xf7))/0x8*(-parseInt(_0x3d59d4(0xf3))/0x9)+parseInt(_0x3d59d4(0xfb))/0xa*(-parseInt(_0x3d59d4(0xf5))/0xb);if(_0x67b7e6===_0x53c96b)break;else _0x418914['push'](_0x418914['shift']());}catch(_0x4b79aa){_0x418914['push'](_0x418914['shift']());}}}(a10_0x4364,0x6be20));import{getRules,addRule as a10_0x110803,clearRules as a10_0x318de4}from'../utils/storage.js';export function listRules(){return getRules();}export function addRule(_0x3b1295){a10_0x110803(_0x3b1295);}export function clearRules(){a10_0x318de4();}function a10_0x33d8(_0x3c19bf,_0x56fd64){_0x3c19bf=_0x3c19bf-0xf1;const _0x43641e=a10_0x4364();let _0x33d831=_0x43641e[_0x3c19bf];return _0x33d831;}function a10_0x4364(){const _0x519107=['140224JUrfKj','370458sttasb','4tiSPwl','551392gAIhFT','2297370bkUeuI','join','373270RyOGrK','140cTrByt','326153mkQRxf','12GGOwIp','map','844288MDxZqH','length','99PmgxKA'];a10_0x4364=function(){return _0x519107;};return a10_0x4364();}export function formatRulesForSystem(){const _0x1ab5cb=a10_0x33d8,_0x41e073=getRules();if(_0x41e073[_0x1ab5cb(0xf2)]===0x0)return'';return'\x0a\x0aUser-defined\x20rules:\x0a'+_0x41e073[_0x1ab5cb(0xfe)]((_0x38914a,_0x2d1c90)=>_0x2d1c90+0x1+'.\x20'+_0x38914a)[_0x1ab5cb(0xf9)]('\x0a');}
|
package/dist/ui/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a11_0x59dc(_0x15e96d,_0x384246){_0x15e96d=_0x15e96d-0x1b5;const _0x31105f=a11_0x3110();let _0x59dc71=_0x31105f[_0x15e96d];return _0x59dc71;}const a11_0x3e058b=a11_0x59dc;(function(_0x2dec52,_0x35521f){const _0x385c53=a11_0x59dc,_0x3b3834=_0x2dec52();while(!![]){try{const _0x54ab53=-parseInt(_0x385c53(0x1e8))/0x1*(-parseInt(_0x385c53(0x1d6))/0x2)+parseInt(_0x385c53(0x1ca))/0x3+parseInt(_0x385c53(0x1ea))/0x4+-parseInt(_0x385c53(0x1fc))/0x5+parseInt(_0x385c53(0x1be))/0x6+parseInt(_0x385c53(0x1d9))/0x7*(parseInt(_0x385c53(0x1cc))/0x8)+-parseInt(_0x385c53(0x1e4))/0x9;if(_0x54ab53===_0x35521f)break;else _0x3b3834['push'](_0x3b3834['shift']());}catch(_0x23aa60){_0x3b3834['push'](_0x3b3834['shift']());}}}(a11_0x3110,0x8179f));import a11_0x56df00 from'chalk';import a11_0x11df42 from'ora';const LOGO='\x0a'+a11_0x56df00['hex'](a11_0x3e058b(0x1ed))(a11_0x3e058b(0x1ce))+a11_0x56df00['hex'](a11_0x3e058b(0x1f9))('\x20██████╗\x20\x20██████╗\x20')+a11_0x56df00['hex']('#3b82f6')(a11_0x3e058b(0x1db))+a11_0x56df00[a11_0x3e058b(0x1bf)](a11_0x3e058b(0x1dd))(a11_0x3e058b(0x1e6))+'\x0a'+a11_0x56df00['hex']('#93c5fd')(a11_0x3e058b(0x1bc))+a11_0x56df00[a11_0x3e058b(0x1bf)](a11_0x3e058b(0x1f9))(a11_0x3e058b(0x1ec))+a11_0x56df00['hex'](a11_0x3e058b(0x1ee))(a11_0x3e058b(0x1c4))+a11_0x56df00[a11_0x3e058b(0x1bf)]('#2563eb')(a11_0x3e058b(0x1b5))+'\x0a'+a11_0x56df00[a11_0x3e058b(0x1bf)](a11_0x3e058b(0x1ed))(a11_0x3e058b(0x1fa))+a11_0x56df00[a11_0x3e058b(0x1bf)]('#60a5fa')(a11_0x3e058b(0x1ba))+a11_0x56df00[a11_0x3e058b(0x1bf)](a11_0x3e058b(0x1ee))('\x20\x20███╔╝\x20██║\x20\x20\x20\x20\x20')+a11_0x56df00[a11_0x3e058b(0x1bf)](a11_0x3e058b(0x1dd))(a11_0x3e058b(0x1e2))+'\x0a'+a11_0x56df00['hex']('#93c5fd')(a11_0x3e058b(0x1c0))+a11_0x56df00[a11_0x3e058b(0x1bf)]('#60a5fa')('██║\x20\x20\x20██║██║\x20\x20\x20██║')+a11_0x56df00['hex'](a11_0x3e058b(0x1ee))(a11_0x3e058b(0x1d2))+a11_0x56df00[a11_0x3e058b(0x1bf)]('#2563eb')('██║\x20\x20\x20██║\x20\x20\x20')+'\x0a'+a11_0x56df00['hex'](a11_0x3e058b(0x1ed))(a11_0x3e058b(0x1bd))+a11_0x56df00[a11_0x3e058b(0x1bf)](a11_0x3e058b(0x1f9))('╚██████╔╝╚██████╔╝')+a11_0x56df00['hex'](a11_0x3e058b(0x1ee))('███████╗███████╗')+a11_0x56df00['hex'](a11_0x3e058b(0x1dd))(a11_0x3e058b(0x1e2))+'\x0a'+a11_0x56df00[a11_0x3e058b(0x1bf)](a11_0x3e058b(0x1ed))(a11_0x3e058b(0x1de))+a11_0x56df00[a11_0x3e058b(0x1bf)](a11_0x3e058b(0x1f9))(a11_0x3e058b(0x1c8))+a11_0x56df00[a11_0x3e058b(0x1bf)](a11_0x3e058b(0x1ee))(a11_0x3e058b(0x1cb))+a11_0x56df00[a11_0x3e058b(0x1bf)]('#2563eb')(a11_0x3e058b(0x1eb))+'\x0a';function a11_0x3110(){const _0x5ccb10=['...','│\x20\x20','slice','forEach','command','toLocaleString','#60a5fa','██║\x20█╗\x20██║','\x20\x20\x20','109725qqeLTK','██║╚══██╔══╝','dim','run_command','\x20\x20│','yellow','██║\x20\x20\x20██║██║\x20\x20\x20██║','\x20\x20Token\x20Usage\x0a','██║\x20\x20\x20\x20██║','╚███╔███╔╝','332202VLFJmb','hex','██║███╗██║','\x20\x20Limit\x20Reached\x0a','repeat','stdout','╚══███╔╝██║\x20\x20\x20\x20\x20','\x0a\x20\x20You:\x20','bold','File:\x20','\x20╚═════╝\x20\x20╚═════╝\x20','red','2199426xNtPzM','╚══════╝╚══════╝','1932224jHhzzh','\x20\x20>','██╗\x20\x20\x20\x20██╗','white','\x0a\x20\x20','toString','\x20███╔╝\x20\x20██║\x20\x20\x20\x20\x20','write','path','split','202018jqufkE','round','dots','14kXdmdP','join','███████╗██╗\x20\x20\x20\x20\x20','\x20\x20\x20\x20->\x20','#2563eb','\x20╚══╝╚══╝\x20','max','length','values','██║\x20\x20\x20██║\x20\x20\x20','\x20/\x20','13328370uAhNwd','\x0a\x20\x20>\x20','██╗████████╗','%\x20context\x20left','1ClxdtJ','trim','2642544GGSRfM','╚═╝\x20\x20\x20╚═╝\x20\x20\x20','██╔═══██╗██╔═══██╗','#93c5fd','#3b82f6','\x20tokens',':free','Unlimited','replace'];a11_0x3110=function(){return _0x5ccb10;};return a11_0x3110();}export function showLogo(){const _0x3b1f70=a11_0x3e058b;process['stdout'][_0x3b1f70(0x1d3)](LOGO+'\x0a');}export function createSpinner(_0x134ad8){const _0x25f98a=a11_0x3e058b;return a11_0x11df42({'text':_0x134ad8,'color':'blue','spinner':_0x25f98a(0x1d8)});}export function success(_0x467fe1){const _0x2cb7fc=a11_0x3e058b;process[_0x2cb7fc(0x1c3)][_0x2cb7fc(0x1d3)](a11_0x56df00[_0x2cb7fc(0x1bf)](_0x2cb7fc(0x1ee))('\x20\x20')+_0x467fe1+'\x0a');}export function error(_0x4cc25f){const _0xdbda0a=a11_0x3e058b;process[_0xdbda0a(0x1c3)][_0xdbda0a(0x1d3)](a11_0x56df00[_0xdbda0a(0x1c9)]('\x20\x20')+_0x4cc25f+'\x0a');}export function info(_0x5b9c16){const _0x19e8df=a11_0x3e058b;process['stdout']['write'](a11_0x56df00[_0x19e8df(0x1bf)](_0x19e8df(0x1f9))('\x20\x20')+_0x5b9c16+'\x0a');}export function warn(_0x15dc4f){const _0x13d352=a11_0x3e058b;process[_0x13d352(0x1c3)]['write'](a11_0x56df00[_0x13d352(0x1b9)]('\x20\x20')+_0x15dc4f+'\x0a');}export function dim(_0x2d8ac9){const _0x4d9826=a11_0x3e058b;process['stdout'][_0x4d9826(0x1d3)](a11_0x56df00[_0x4d9826(0x1b6)]('\x20\x20'+_0x2d8ac9)+'\x0a');}export function header(_0xfe0588){const _0x1c0e1a=a11_0x3e058b;process[_0x1c0e1a(0x1c3)][_0x1c0e1a(0x1d3)]('\x0a'+a11_0x56df00[_0x1c0e1a(0x1c6)][_0x1c0e1a(0x1bf)](_0x1c0e1a(0x1ee))(_0xfe0588)+'\x0a');}export function divider(){const _0x8bdc86=a11_0x3e058b;process[_0x8bdc86(0x1c3)][_0x8bdc86(0x1d3)](a11_0x56df00['dim']('\x20\x20'+'-'['repeat'](0x32))+'\x0a');}export function tip(_0x242fba,_0x1d3172){const _0x46cff5=a11_0x3e058b;process[_0x46cff5(0x1c3)][_0x46cff5(0x1d3)](a11_0x56df00['dim']('\x20\x20')+a11_0x56df00[_0x46cff5(0x1cf)](_0x242fba)+a11_0x56df00[_0x46cff5(0x1b6)]('\x20'+_0x1d3172)+'\x0a');}export function userMessage(_0x36add1){const _0x5e2462=a11_0x3e058b;process[_0x5e2462(0x1c3)][_0x5e2462(0x1d3)](a11_0x56df00[_0x5e2462(0x1c6)][_0x5e2462(0x1bf)]('#60a5fa')(_0x5e2462(0x1c5))+_0x36add1+'\x0a');}export function aiMessage(_0x28254c){const _0x401079=a11_0x3e058b;process[_0x401079(0x1c3)][_0x401079(0x1d3)](a11_0x56df00[_0x401079(0x1c6)][_0x401079(0x1bf)](_0x401079(0x1ee))('\x0a\x20\x20Woozlit:\x20')+_0x28254c);}export function aiMessageEnd(){const _0x334bc1=a11_0x3e058b;process['stdout'][_0x334bc1(0x1d3)]('\x0a');}export function toolCall(_0x5c8839,_0x594b3a){const _0x16659b=a11_0x3e058b;process[_0x16659b(0x1c3)][_0x16659b(0x1d3)](a11_0x56df00[_0x16659b(0x1b6)](_0x16659b(0x1dc))+a11_0x56df00[_0x16659b(0x1bf)](_0x16659b(0x1f9))(_0x5c8839)+a11_0x56df00['dim'](':\x20'+_0x594b3a)+'\x0a');}export function statusBar(_0x1bb924,_0x1c9213){const _0x582be8=a11_0x3e058b,_0x534220=_0x1bb924[_0x582be8(0x1d5)]('/')['pop']()?.[_0x582be8(0x1f2)](_0x582be8(0x1f0),'')||_0x1bb924,_0xe9c8cd=a11_0x56df00['hex']('#3b82f6')(_0x534220),_0x3d8d85=a11_0x56df00[_0x582be8(0x1b6)](_0x1c9213+_0x582be8(0x1e7));process['stdout']['write']('\x0a\x20\x20'+_0xe9c8cd+'\x20\x20'+a11_0x56df00[_0x582be8(0x1b6)]('|')+'\x20\x20'+_0x3d8d85+'\x0a');}export function prompt(){const _0x5dbfb=a11_0x3e058b;process[_0x5dbfb(0x1c3)][_0x5dbfb(0x1d3)](a11_0x56df00[_0x5dbfb(0x1bf)](_0x5dbfb(0x1ee))(_0x5dbfb(0x1e5)));}function lerpColor(_0x67d72b,_0x52ea5f,_0x43787c){const _0x101b99=a11_0x3e058b,_0x250a80=parseInt(_0x67d72b[_0x101b99(0x1f2)]('#',''),0x10),_0x38e118=parseInt(_0x52ea5f[_0x101b99(0x1f2)]('#',''),0x10),_0x5eaa89=_0x250a80>>0x10&0xff,_0x5ae678=_0x250a80>>0x8&0xff,_0x3732eb=_0x250a80&0xff,_0x2f738f=_0x38e118>>0x10&0xff,_0x6d3276=_0x38e118>>0x8&0xff,_0x287863=_0x38e118&0xff,_0x1e4b02=Math[_0x101b99(0x1d7)](_0x5eaa89+(_0x2f738f-_0x5eaa89)*_0x43787c),_0x233502=Math[_0x101b99(0x1d7)](_0x5ae678+(_0x6d3276-_0x5ae678)*_0x43787c),_0x4ec8c6=Math[_0x101b99(0x1d7)](_0x3732eb+(_0x287863-_0x3732eb)*_0x43787c);return'#'+((0x1<<0x18)+(_0x1e4b02<<0x10)+(_0x233502<<0x8)+_0x4ec8c6)[_0x101b99(0x1d1)](0x10)[_0x101b99(0x1f5)](0x1);}export function gradientText(_0x2d1799,_0x2265e1,_0xca8ea1){const _0x15503d=a11_0x3e058b,_0x4e52c6=_0x2d1799[_0x15503d(0x1d5)]('');return _0x4e52c6['map']((_0x2724f2,_0x1a9c7f)=>{const _0x3c9c26=_0x15503d,_0x1f8877=_0x1a9c7f/Math[_0x3c9c26(0x1df)](_0x4e52c6[_0x3c9c26(0x1e0)]-0x1,0x1);return a11_0x56df00[_0x3c9c26(0x1bf)](lerpColor(_0x2265e1,_0xca8ea1,_0x1f8877))(_0x2724f2);})[_0x15503d(0x1da)]('');}export function loggedInBox(_0xc1195c){const _0x25e2e1=a11_0x3e058b,_0xb4b8ae='Logged\x20in\x20as:\x20',_0x40b314=_0xc1195c[_0x25e2e1(0x1e9)](),_0x3aa2b4=_0xb4b8ae[_0x25e2e1(0x1e0)]+_0x40b314[_0x25e2e1(0x1e0)]+0x4,_0x19c1d7=a11_0x56df00['hex'](_0x25e2e1(0x1ee))('─'[_0x25e2e1(0x1c2)](_0x3aa2b4)),_0x2e3f37=a11_0x56df00['hex']('#3b82f6')('╭'+_0x19c1d7+'╮'),_0x427e0b=a11_0x56df00['hex'](_0x25e2e1(0x1ee))('╰'+_0x19c1d7+'╯'),_0x494142=gradientText(_0x40b314,_0x25e2e1(0x1f9),_0x25e2e1(0x1dd));process[_0x25e2e1(0x1c3)][_0x25e2e1(0x1d3)](_0x25e2e1(0x1d0)+_0x2e3f37+'\x0a'),process[_0x25e2e1(0x1c3)][_0x25e2e1(0x1d3)]('\x20\x20'+a11_0x56df00[_0x25e2e1(0x1bf)](_0x25e2e1(0x1ee))(_0x25e2e1(0x1f4))+a11_0x56df00[_0x25e2e1(0x1b6)](_0xb4b8ae)+_0x494142+a11_0x56df00[_0x25e2e1(0x1bf)]('#3b82f6')(_0x25e2e1(0x1b8))+'\x0a'),process['stdout'][_0x25e2e1(0x1d3)]('\x20\x20'+_0x427e0b+'\x0a');}export function actionSpinner(_0x502572){const _0x2f65d3=a11_0x3e058b;return a11_0x11df42({'text':a11_0x56df00['hex'](_0x2f65d3(0x1f9))(_0x502572),'color':'blue','spinner':_0x2f65d3(0x1d8)});}export function toolActivity(_0x4af72b,_0x588971){const _0x474482=a11_0x3e058b;let _0x27bf3e='';if(_0x4af72b===_0x474482(0x1b7)&&_0x588971[_0x474482(0x1f7)])_0x27bf3e=_0x588971[_0x474482(0x1f7)];else{if(_0x588971[_0x474482(0x1d4)]){const _0x38b100=_0x588971[_0x474482(0x1d4)];_0x27bf3e=_0x474482(0x1c7)+_0x38b100;}else _0x27bf3e=Object[_0x474482(0x1e1)](_0x588971)[_0x474482(0x1da)](',\x20');}_0x27bf3e[_0x474482(0x1e0)]>0x50&&(_0x27bf3e=_0x27bf3e['substring'](0x0,0x4d)+_0x474482(0x1f3));const _0x5d076e=gradientText(_0x474482(0x1cd),'#60a5fa',_0x474482(0x1dd));process['stdout'][_0x474482(0x1d3)]('\x0a'+_0x5d076e+'\x20'+a11_0x56df00[_0x474482(0x1c6)][_0x474482(0x1bf)](_0x474482(0x1f9))(_0x4af72b)+'\x20'+a11_0x56df00[_0x474482(0x1b6)](_0x27bf3e)+'\x0a');}export function commandOutput(_0x184b0d){const _0x498d0b=a11_0x3e058b,_0x44affa=_0x184b0d[_0x498d0b(0x1d5)]('\x0a');_0x44affa[_0x498d0b(0x1f6)](_0x429d89=>{const _0x190fd2=_0x498d0b;_0x429d89[_0x190fd2(0x1e9)]()&&process[_0x190fd2(0x1c3)][_0x190fd2(0x1d3)](a11_0x56df00[_0x190fd2(0x1b6)](_0x190fd2(0x1fb))+a11_0x56df00[_0x190fd2(0x1b6)](_0x429d89)+'\x0a');});}export function usageBox(_0x1f5c34,_0x51c9e1,_0x308fa7){const _0x48c79e=a11_0x3e058b,_0x3b7dd8=_0x51c9e1>0x0?Math['min'](Math[_0x48c79e(0x1d7)](_0x1f5c34/_0x51c9e1*0x64),0x64):0x0,_0x3520e7=0x1e,_0x38af2f=Math[_0x48c79e(0x1d7)](_0x3b7dd8/0x64*_0x3520e7),_0x312415=_0x3520e7-_0x38af2f,_0x181f11=_0x308fa7?a11_0x56df00[_0x48c79e(0x1c9)]:_0x3b7dd8>0x50?a11_0x56df00[_0x48c79e(0x1b9)]:a11_0x56df00['green'],_0x2d0e0=_0x181f11('█'[_0x48c79e(0x1c2)](_0x38af2f))+a11_0x56df00['dim']('░'[_0x48c79e(0x1c2)](_0x312415)),_0x5a48f5=_0x51c9e1>=0x3b9ac9ff?_0x48c79e(0x1f1):_0x51c9e1['toLocaleString'](),_0x2a7cd1=_0x1f5c34[_0x48c79e(0x1f8)]()+_0x48c79e(0x1e3)+_0x5a48f5+_0x48c79e(0x1ef);process[_0x48c79e(0x1c3)]['write']('\x0a'),process[_0x48c79e(0x1c3)][_0x48c79e(0x1d3)](a11_0x56df00[_0x48c79e(0x1c6)][_0x48c79e(0x1bf)]('#60a5fa')(_0x48c79e(0x1bb))),process[_0x48c79e(0x1c3)][_0x48c79e(0x1d3)]('\x20\x20'+_0x2d0e0+'\x20'+a11_0x56df00[_0x48c79e(0x1b6)](_0x3b7dd8+'%')+'\x0a'),process[_0x48c79e(0x1c3)][_0x48c79e(0x1d3)](a11_0x56df00[_0x48c79e(0x1b6)]('\x20\x20'+_0x2a7cd1+'\x0a')),_0x308fa7&&process[_0x48c79e(0x1c3)][_0x48c79e(0x1d3)](a11_0x56df00[_0x48c79e(0x1c9)](_0x48c79e(0x1c1))),process[_0x48c79e(0x1c3)][_0x48c79e(0x1d3)]('\x0a');}
|
|
1
|
+
const a11_0x3f471b=a11_0x387d;(function(_0x460d9d,_0x190af8){const _0x3ac91a=a11_0x387d,_0x26c924=_0x460d9d();while(!![]){try{const _0x270b00=-parseInt(_0x3ac91a(0x15c))/0x1*(-parseInt(_0x3ac91a(0x179))/0x2)+-parseInt(_0x3ac91a(0x14e))/0x3*(-parseInt(_0x3ac91a(0x144))/0x4)+-parseInt(_0x3ac91a(0x153))/0x5*(-parseInt(_0x3ac91a(0x162))/0x6)+parseInt(_0x3ac91a(0x17b))/0x7+parseInt(_0x3ac91a(0x15d))/0x8*(-parseInt(_0x3ac91a(0x159))/0x9)+parseInt(_0x3ac91a(0x16e))/0xa+parseInt(_0x3ac91a(0x174))/0xb*(-parseInt(_0x3ac91a(0x157))/0xc);if(_0x270b00===_0x190af8)break;else _0x26c924['push'](_0x26c924['shift']());}catch(_0x30623d){_0x26c924['push'](_0x26c924['shift']());}}}(a11_0x4490,0xe7ebe));import a11_0x5e95e3 from'chalk';import a11_0xa389d1 from'ora';const LOGO='\x0a'+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x186))(a11_0x3f471b(0x170))+a11_0x5e95e3['hex'](a11_0x3f471b(0x180))(a11_0x3f471b(0x163))+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x17d))(a11_0x3f471b(0x17a))+a11_0x5e95e3[a11_0x3f471b(0x18e)]('#2563eb')('██╗████████╗')+'\x0a'+a11_0x5e95e3[a11_0x3f471b(0x18e)]('#93c5fd')(a11_0x3f471b(0x171))+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x180))(a11_0x3f471b(0x14a))+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x17d))('╚══███╔╝██║\x20\x20\x20\x20\x20')+a11_0x5e95e3['hex'](a11_0x3f471b(0x154))(a11_0x3f471b(0x173))+'\x0a'+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x186))(a11_0x3f471b(0x18f))+a11_0x5e95e3['hex'](a11_0x3f471b(0x180))('██║\x20\x20\x20██║██║\x20\x20\x20██║')+a11_0x5e95e3['hex'](a11_0x3f471b(0x17d))(a11_0x3f471b(0x166))+a11_0x5e95e3[a11_0x3f471b(0x18e)]('#2563eb')(a11_0x3f471b(0x17f))+'\x0a'+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x186))(a11_0x3f471b(0x15f))+a11_0x5e95e3['hex'](a11_0x3f471b(0x180))('██║\x20\x20\x20██║██║\x20\x20\x20██║')+a11_0x5e95e3[a11_0x3f471b(0x18e)]('#3b82f6')(a11_0x3f471b(0x16d))+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x154))(a11_0x3f471b(0x17f))+'\x0a'+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x186))(a11_0x3f471b(0x18c))+a11_0x5e95e3['hex']('#60a5fa')(a11_0x3f471b(0x168))+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x17d))('███████╗███████╗')+a11_0x5e95e3['hex'](a11_0x3f471b(0x154))(a11_0x3f471b(0x17f))+'\x0a'+a11_0x5e95e3[a11_0x3f471b(0x18e)](a11_0x3f471b(0x186))('\x20╚══╝╚══╝\x20')+a11_0x5e95e3['hex'](a11_0x3f471b(0x180))(a11_0x3f471b(0x172))+a11_0x5e95e3[a11_0x3f471b(0x18e)]('#3b82f6')(a11_0x3f471b(0x17e))+a11_0x5e95e3['hex'](a11_0x3f471b(0x154))(a11_0x3f471b(0x183))+'\x0a';export function showLogo(){const _0x4c1c82=a11_0x3f471b;process['stdout'][_0x4c1c82(0x16f)](LOGO+'\x0a');}export function createSpinner(_0x349b6){const _0x1955b7=a11_0x3f471b;return a11_0xa389d1({'text':_0x349b6,'color':_0x1955b7(0x16c),'spinner':_0x1955b7(0x15b)});}export function success(_0x2c0a7b){const _0x207e1b=a11_0x3f471b;process[_0x207e1b(0x155)]['write'](a11_0x5e95e3['hex']('#3b82f6')('\x20\x20')+_0x2c0a7b+'\x0a');}export function error(_0x62f7cf){const _0x465daa=a11_0x3f471b;process['stdout']['write'](a11_0x5e95e3[_0x465daa(0x188)]('\x20\x20')+_0x62f7cf+'\x0a');}export function info(_0x407a4c){const _0x1e3e99=a11_0x3f471b;process[_0x1e3e99(0x155)][_0x1e3e99(0x16f)](a11_0x5e95e3[_0x1e3e99(0x18e)](_0x1e3e99(0x180))('\x20\x20')+_0x407a4c+'\x0a');}export function warn(_0x327f58){const _0xeda32e=a11_0x3f471b;process['stdout']['write'](a11_0x5e95e3[_0xeda32e(0x18b)]('\x20\x20')+_0x327f58+'\x0a');}export function dim(_0x43d661){const _0x173815=a11_0x3f471b;process[_0x173815(0x155)][_0x173815(0x16f)](a11_0x5e95e3[_0x173815(0x145)]('\x20\x20'+_0x43d661)+'\x0a');}export function header(_0x2b67ac){const _0x86da41=a11_0x3f471b;process[_0x86da41(0x155)][_0x86da41(0x16f)]('\x0a'+a11_0x5e95e3[_0x86da41(0x175)][_0x86da41(0x18e)](_0x86da41(0x17d))(_0x2b67ac)+'\x0a');}export function divider(){const _0xed3d5f=a11_0x3f471b;process[_0xed3d5f(0x155)]['write'](a11_0x5e95e3['dim']('\x20\x20'+'-'[_0xed3d5f(0x18d)](0x32))+'\x0a');}export function tip(_0x4d5611,_0x39e132){const _0x1c1af9=a11_0x3f471b;process[_0x1c1af9(0x155)][_0x1c1af9(0x16f)](a11_0x5e95e3[_0x1c1af9(0x145)]('\x20\x20')+a11_0x5e95e3['white'](_0x4d5611)+a11_0x5e95e3[_0x1c1af9(0x145)]('\x20'+_0x39e132)+'\x0a');}export function userMessage(_0xb0ea06){const _0x23be09=a11_0x3f471b;process[_0x23be09(0x155)]['write'](a11_0x5e95e3[_0x23be09(0x175)][_0x23be09(0x18e)](_0x23be09(0x180))(_0x23be09(0x17c))+_0xb0ea06+'\x0a');}export function aiMessage(_0x4d9c9c){const _0x5250e2=a11_0x3f471b;process[_0x5250e2(0x155)][_0x5250e2(0x16f)](a11_0x5e95e3[_0x5250e2(0x175)][_0x5250e2(0x18e)](_0x5250e2(0x17d))(_0x5250e2(0x190))+_0x4d9c9c);}export function aiMessageEnd(){const _0x4fbf98=a11_0x3f471b;process[_0x4fbf98(0x155)][_0x4fbf98(0x16f)]('\x0a');}export function toolCall(_0xbbd915,_0x4591c0){const _0x58bc59=a11_0x3f471b;process['stdout']['write'](a11_0x5e95e3['dim'](_0x58bc59(0x16a))+a11_0x5e95e3[_0x58bc59(0x18e)]('#60a5fa')(_0xbbd915)+a11_0x5e95e3[_0x58bc59(0x145)](':\x20'+_0x4591c0)+'\x0a');}function a11_0x387d(_0x72fb89,_0x1b3de6){_0x72fb89=_0x72fb89-0x143;const _0x4490a3=a11_0x4490();let _0x387dc0=_0x4490a3[_0x72fb89];return _0x387dc0;}export function statusBar(_0x1ec3bb,_0x22dcba){const _0x9d30f4=a11_0x3f471b,_0x1fa0dc=_0x1ec3bb['split']('/')[_0x9d30f4(0x147)]()?.['replace'](_0x9d30f4(0x146),'')||_0x1ec3bb,_0x2419da=a11_0x5e95e3[_0x9d30f4(0x18e)]('#3b82f6')(_0x1fa0dc),_0x1fe0cb=a11_0x5e95e3[_0x9d30f4(0x145)](_0x22dcba+_0x9d30f4(0x177));process[_0x9d30f4(0x155)]['write'](_0x9d30f4(0x15e)+_0x2419da+'\x20\x20'+a11_0x5e95e3[_0x9d30f4(0x145)]('|')+'\x20\x20'+_0x1fe0cb+'\x0a');}export function prompt(){const _0x55b51a=a11_0x3f471b;process[_0x55b51a(0x155)][_0x55b51a(0x16f)](a11_0x5e95e3['hex']('#3b82f6')('\x0a\x20\x20>\x20'));}function lerpColor(_0x23bf54,_0x241d43,_0x337fc9){const _0x2955a9=a11_0x3f471b,_0x3cb05a=parseInt(_0x23bf54['replace']('#',''),0x10),_0x5a0e0b=parseInt(_0x241d43[_0x2955a9(0x184)]('#',''),0x10),_0x5271cf=_0x3cb05a>>0x10&0xff,_0x39e234=_0x3cb05a>>0x8&0xff,_0x47b36b=_0x3cb05a&0xff,_0x4c3b84=_0x5a0e0b>>0x10&0xff,_0x1d18ae=_0x5a0e0b>>0x8&0xff,_0x2f627d=_0x5a0e0b&0xff,_0x3ca0c7=Math[_0x2955a9(0x14b)](_0x5271cf+(_0x4c3b84-_0x5271cf)*_0x337fc9),_0x1d9b57=Math['round'](_0x39e234+(_0x1d18ae-_0x39e234)*_0x337fc9),_0x293378=Math[_0x2955a9(0x14b)](_0x47b36b+(_0x2f627d-_0x47b36b)*_0x337fc9);return'#'+((0x1<<0x18)+(_0x3ca0c7<<0x10)+(_0x1d9b57<<0x8)+_0x293378)[_0x2955a9(0x18a)](0x10)[_0x2955a9(0x156)](0x1);}export function gradientText(_0x41ee1a,_0x20c0e5,_0x575746){const _0x3e1c17=a11_0x3f471b,_0x39bc9e=_0x41ee1a[_0x3e1c17(0x165)]('');return _0x39bc9e[_0x3e1c17(0x158)]((_0x407873,_0x2cc8ed)=>{const _0xdc7e89=_0x3e1c17,_0x4cb530=_0x2cc8ed/Math['max'](_0x39bc9e[_0xdc7e89(0x14d)]-0x1,0x1);return a11_0x5e95e3[_0xdc7e89(0x18e)](lerpColor(_0x20c0e5,_0x575746,_0x4cb530))(_0x407873);})[_0x3e1c17(0x164)]('');}export function loggedInBox(_0x458656){const _0xdf63b2=a11_0x3f471b,_0x11b5de=_0xdf63b2(0x185),_0x35e5cc=_0x458656['trim'](),_0x112e50=_0x11b5de[_0xdf63b2(0x14d)]+_0x35e5cc[_0xdf63b2(0x14d)]+0x4,_0x3a4f83=a11_0x5e95e3['hex'](_0xdf63b2(0x17d))('─'[_0xdf63b2(0x18d)](_0x112e50)),_0x2c576e=a11_0x5e95e3['hex']('#3b82f6')('╭'+_0x3a4f83+'╮'),_0x32addd=a11_0x5e95e3['hex'](_0xdf63b2(0x17d))('╰'+_0x3a4f83+'╯'),_0x4f9855=gradientText(_0x35e5cc,_0xdf63b2(0x180),'#2563eb');process[_0xdf63b2(0x155)]['write'](_0xdf63b2(0x15e)+_0x2c576e+'\x0a'),process[_0xdf63b2(0x155)]['write']('\x20\x20'+a11_0x5e95e3['hex'](_0xdf63b2(0x17d))(_0xdf63b2(0x14f))+a11_0x5e95e3[_0xdf63b2(0x145)](_0x11b5de)+_0x4f9855+a11_0x5e95e3[_0xdf63b2(0x18e)](_0xdf63b2(0x17d))(_0xdf63b2(0x150))+'\x0a'),process[_0xdf63b2(0x155)][_0xdf63b2(0x16f)]('\x20\x20'+_0x32addd+'\x0a');}export function actionSpinner(_0xa1bc71){const _0x3e4405=a11_0x3f471b;return a11_0xa389d1({'text':a11_0x5e95e3[_0x3e4405(0x18e)]('#60a5fa')(_0xa1bc71),'color':'blue','spinner':_0x3e4405(0x15b)});}export function toolActivity(_0x4abc0c,_0x23a09b){const _0x515e6e=a11_0x3f471b;let _0x124a68='';if(_0x4abc0c===_0x515e6e(0x189)&&_0x23a09b[_0x515e6e(0x14c)])_0x124a68=_0x23a09b['command'];else{if(_0x23a09b[_0x515e6e(0x152)]){const _0xd9cb7f=_0x23a09b['path'];_0x124a68='File:\x20'+_0xd9cb7f;}else _0x124a68=Object[_0x515e6e(0x169)](_0x23a09b)[_0x515e6e(0x164)](',\x20');}_0x124a68[_0x515e6e(0x14d)]>0x50&&(_0x124a68=_0x124a68[_0x515e6e(0x148)](0x0,0x4d)+_0x515e6e(0x167));const _0x1fb6a9=gradientText(_0x515e6e(0x161),'#60a5fa',_0x515e6e(0x154));process[_0x515e6e(0x155)]['write']('\x0a'+_0x1fb6a9+'\x20'+a11_0x5e95e3[_0x515e6e(0x175)][_0x515e6e(0x18e)](_0x515e6e(0x180))(_0x4abc0c)+'\x20'+a11_0x5e95e3[_0x515e6e(0x145)](_0x124a68)+'\x0a');}export function commandOutput(_0x454f53){const _0x3fbb81=a11_0x3f471b,_0x596b3e=_0x454f53[_0x3fbb81(0x165)]('\x0a');_0x596b3e[_0x3fbb81(0x149)](_0x46c8b2=>{const _0xc8596b=_0x3fbb81;_0x46c8b2[_0xc8596b(0x160)]()&&process['stdout']['write'](a11_0x5e95e3[_0xc8596b(0x145)](_0xc8596b(0x15a))+a11_0x5e95e3[_0xc8596b(0x145)](_0x46c8b2)+'\x0a');});}export function usageBox(_0x381d55,_0x392773,_0x268d69){const _0x10039d=a11_0x3f471b,_0x5efc73=_0x392773>0x0?Math[_0x10039d(0x181)](Math[_0x10039d(0x14b)](_0x381d55/_0x392773*0x64),0x64):0x0,_0x1ec8f7=0x1e,_0x5d9363=Math[_0x10039d(0x14b)](_0x5efc73/0x64*_0x1ec8f7),_0x568739=_0x1ec8f7-_0x5d9363,_0x458aa4=_0x268d69?a11_0x5e95e3[_0x10039d(0x188)]:_0x5efc73>0x50?a11_0x5e95e3['yellow']:a11_0x5e95e3[_0x10039d(0x187)],_0x421ccf=_0x458aa4('█'[_0x10039d(0x18d)](_0x5d9363))+a11_0x5e95e3[_0x10039d(0x145)]('░'[_0x10039d(0x18d)](_0x568739)),_0x42c55b=_0x392773>=0x3b9ac9ff?_0x10039d(0x176):_0x392773[_0x10039d(0x182)](),_0x2cafbb=_0x381d55[_0x10039d(0x182)]()+_0x10039d(0x151)+_0x42c55b+_0x10039d(0x178);process['stdout'][_0x10039d(0x16f)]('\x0a'),process[_0x10039d(0x155)][_0x10039d(0x16f)](a11_0x5e95e3[_0x10039d(0x175)][_0x10039d(0x18e)](_0x10039d(0x180))(_0x10039d(0x16b))),process[_0x10039d(0x155)][_0x10039d(0x16f)]('\x20\x20'+_0x421ccf+'\x20'+a11_0x5e95e3[_0x10039d(0x145)](_0x5efc73+'%')+'\x0a'),process['stdout'][_0x10039d(0x16f)](a11_0x5e95e3[_0x10039d(0x145)]('\x20\x20'+_0x2cafbb+'\x0a')),_0x268d69&&process[_0x10039d(0x155)][_0x10039d(0x16f)](a11_0x5e95e3[_0x10039d(0x188)](_0x10039d(0x143))),process[_0x10039d(0x155)]['write']('\x0a');}function a11_0x4490(){const _0x271600=['green','red','run_command','toString','yellow','╚███╔███╔╝','repeat','hex','██║\x20█╗\x20██║','\x0a\x20\x20Woozlit:\x20','\x20\x20Limit\x20Reached\x0a','6160AKLdJG','dim',':free','pop','substring','forEach','██╔═══██╗██╔═══██╗','round','command','length','84Qkxvbi','│\x20\x20','\x20\x20│','\x20/\x20','path','10TOJomI','#2563eb','stdout','slice','1674852EpnbjQ','map','6471FyqMbd','\x20\x20\x20','dots','72hSdGjt','6736laNMhq','\x0a\x20\x20','██║███╗██║','trim','\x20\x20>','2087730Yzjhyv','\x20██████╗\x20\x20██████╗\x20','join','split','\x20\x20███╔╝\x20██║\x20\x20\x20\x20\x20','...','╚██████╔╝╚██████╔╝','values','\x20\x20\x20\x20->\x20','\x20\x20Token\x20Usage\x0a','blue','\x20███╔╝\x20\x20██║\x20\x20\x20\x20\x20','11430860dfvMQq','write','██╗\x20\x20\x20\x20██╗','██║\x20\x20\x20\x20██║','\x20╚═════╝\x20\x20╚═════╝\x20','██║╚══██╔══╝','132haBExb','bold','Unlimited','%\x20context\x20left','\x20tokens','9154rovfjv','███████╗██╗\x20\x20\x20\x20\x20','7129780zAUHoc','\x0a\x20\x20You:\x20','#3b82f6','╚══════╝╚══════╝','██║\x20\x20\x20██║\x20\x20\x20','#60a5fa','min','toLocaleString','╚═╝\x20\x20\x20╚═╝\x20\x20\x20','replace','Logged\x20in\x20as:\x20','#93c5fd'];a11_0x4490=function(){return _0x271600;};return a11_0x4490();}
|
package/dist/ui/select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21e090,_0x516a9e){const _0x27bd39=a12_0x27f2,_0x1da7ed=_0x21e090();while(!![]){try{const _0x1974e7=parseInt(_0x27bd39(0x122))/0x1+-parseInt(_0x27bd39(0x126))/0x2+-parseInt(_0x27bd39(0x129))/0x3*(-parseInt(_0x27bd39(0x11f))/0x4)+-parseInt(_0x27bd39(0x12a))/0x5*(-parseInt(_0x27bd39(0x11d))/0x6)+parseInt(_0x27bd39(0x128))/0x7*(parseInt(_0x27bd39(0x11e))/0x8)+-parseInt(_0x27bd39(0x120))/0x9+-parseInt(_0x27bd39(0x12b))/0xa;if(_0x1974e7===_0x516a9e)break;else _0x1da7ed['push'](_0x1da7ed['shift']());}catch(_0x2860f7){_0x1da7ed['push'](_0x1da7ed['shift']());}}}(a12_0x204e,0x62881));function a12_0x204e(){const _0x4c6bd5=['\x20(current)','map','694498yzuJRD','name','1372721MojJJT','6jPCcpj','605YEqTUG','2602760xIvRdb','17142EjoMVP','8lpPdUx','1286484TtKLir','4706055tTKTmN','Select\x20AI\x20Model','348963FFFNFH','description'];a12_0x204e=function(){return _0x4c6bd5;};return a12_0x204e();}import{select}from'@inquirer/prompts';import{MODELS}from'../config/settings.js';function a12_0x27f2(_0x6e3134,_0x2abc14){_0x6e3134=_0x6e3134-0x11d;const _0x204e36=a12_0x204e();let _0x27f23b=_0x204e36[_0x6e3134];return _0x27f23b;}import{getSelectedModel,setSelectedModel}from'../utils/storage.js';export async function selectModel(){const _0x29389a=a12_0x27f2,_0x5ef612=getSelectedModel(),_0x3a38fb=MODELS[_0x29389a(0x125)](_0x58cf41=>({'name':''+_0x58cf41[_0x29389a(0x127)]+(_0x58cf41['id']===_0x5ef612?_0x29389a(0x124):''),'value':_0x58cf41['id'],'description':_0x58cf41[_0x29389a(0x123)]})),_0x56f19f=await select({'message':_0x29389a(0x121),'choices':_0x3a38fb,'default':_0x5ef612});return setSelectedModel(_0x56f19f),_0x56f19f;}export{getSelectedModel,setSelectedModel};
|
package/dist/utils/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b7b1d,_0x1f37e0){const _0x15ba1e=a13_0x5ad9,_0x5d8a0d=_0x2b7b1d();while(!![]){try{const _0x568026=parseInt(_0x15ba1e(0x138))/0x1+parseInt(_0x15ba1e(0x14c))/0x2*(parseInt(_0x15ba1e(0x132))/0x3)+parseInt(_0x15ba1e(0x133))/0x4*(parseInt(_0x15ba1e(0x142))/0x5)+parseInt(_0x15ba1e(0x14b))/0x6*(-parseInt(_0x15ba1e(0x13e))/0x7)+parseInt(_0x15ba1e(0x146))/0x8*(-parseInt(_0x15ba1e(0x13d))/0x9)+-parseInt(_0x15ba1e(0x148))/0xa+-parseInt(_0x15ba1e(0x140))/0xb*(-parseInt(_0x15ba1e(0x137))/0xc);if(_0x568026===_0x1f37e0)break;else _0x5d8a0d['push'](_0x5d8a0d['shift']());}catch(_0x322803){_0x5d8a0d['push'](_0x5d8a0d['shift']());}}}(a13_0x4371,0x29592));import{getApiUrl}from'../config/settings.js';import{getToken,getUser}from'./storage.js';function a13_0x4371(){const _0x130a04=['/api/user/usage','5cLgJAk','decode','/api/auth/verify','stringify','1512jbolJs','text','1983820SAObgB','json','parse','198NsuKql','2260ilGSiG','Not\x20authenticated.\x20Please\x20run\x20\x27woozlit\x20login\x27\x20first.','Bearer\x20','API\x20error:\x20','body','application/json','723PmsXrc','273688KrBlXv','true','/api/chat','slice','326532nkKtRi','235241oehwHj','getReader','split','status','POST','10107VzEPem','10696lOoujh','startsWith','22bhmxzM'];a13_0x4371=function(){return _0x130a04;};return a13_0x4371();}function a13_0x5ad9(_0x3b0a0d,_0x1b2339){_0x3b0a0d=_0x3b0a0d-0x130;const _0x437118=a13_0x4371();let _0x5ad959=_0x437118[_0x3b0a0d];return _0x5ad959;}export async function sendChatMessage(_0x45507e,_0x197da7,_0x5ddd94){const _0x52718d=a13_0x5ad9,_0x9492bc=getToken(),_0x39e4ad=getApiUrl(),{userId:_0x89b090}=getUser();if(!_0x9492bc||!_0x89b090)throw new Error(_0x52718d(0x14d));const _0x125af4=await fetch(_0x39e4ad+_0x52718d(0x135),{'method':_0x52718d(0x13c),'headers':{'Content-Type':_0x52718d(0x131),'X-Woozlit-CLI':_0x52718d(0x134),'Authorization':_0x52718d(0x14e)+_0x9492bc,'X-Woozlit-Token':_0x52718d(0x14e)+_0x9492bc},'body':JSON[_0x52718d(0x145)]({'model':_0x45507e,'messages':_0x197da7,'stream':!![],'userId':_0x89b090})});if(!_0x125af4['ok']){const _0x427d4a=await _0x125af4[_0x52718d(0x147)]();throw new Error(_0x52718d(0x14f)+_0x125af4[_0x52718d(0x13b)]+'\x20-\x20'+_0x427d4a);}if(!_0x125af4['body'])throw new Error('No\x20response\x20body');const _0x46b654=_0x125af4[_0x52718d(0x130)][_0x52718d(0x139)](),_0x2e9ce6=new TextDecoder();let _0x3dbb24='';const _0x2a3851=[];while(!![]){const {done:_0x35b305,value:_0x17f12a}=await _0x46b654['read']();if(_0x35b305)break;const _0x35ea0f=_0x2e9ce6[_0x52718d(0x143)](_0x17f12a,{'stream':!![]});if(_0x35ea0f['includes']('0:')){const _0x3d6aa1=_0x35ea0f[_0x52718d(0x13a)]('\x0a');for(const _0x371bc5 of _0x3d6aa1){if(_0x371bc5[_0x52718d(0x13f)]('0:')){const _0x20ebcc=_0x371bc5[_0x52718d(0x136)](0x2)['trim']();if(_0x20ebcc[_0x52718d(0x13f)]('\x22')&&_0x20ebcc['endsWith']('\x22'))try{const _0x17986f=JSON[_0x52718d(0x14a)](_0x20ebcc);_0x3dbb24+=_0x17986f;if(_0x5ddd94)_0x5ddd94(_0x17986f);}catch{}}}}else{_0x3dbb24+=_0x35ea0f;if(_0x5ddd94)_0x5ddd94(_0x35ea0f);}}return{'content':_0x3dbb24,'toolCalls':_0x2a3851};}export async function checkAuth(){const _0x411635=a13_0x5ad9,_0xc907a1=getToken();if(!_0xc907a1)return![];try{const _0x346700=getApiUrl(),_0x530b21=await fetch(_0x346700+_0x411635(0x144),{'headers':{'Authorization':'Bearer\x20'+_0xc907a1}});return _0x530b21['ok'];}catch{return![];}}export async function getUserUsage(){const _0xe8fb34=a13_0x5ad9,_0x5bba0c=getToken();if(!_0x5bba0c)return null;try{const _0x1cf358=getApiUrl(),_0x569989=await fetch(_0x1cf358+_0xe8fb34(0x141),{'headers':{'Authorization':_0xe8fb34(0x14e)+_0x5bba0c}});if(!_0x569989['ok'])return null;return await _0x569989[_0xe8fb34(0x149)]();}catch(_0x5e327c){return null;}}
|
package/dist/utils/storage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x41c9bd=a14_0x5da0;(function(_0x5a3ca4,_0xfd13b7){const _0x331aa6=a14_0x5da0,_0x4b093b=_0x5a3ca4();while(!![]){try{const _0x393cdd=-parseInt(_0x331aa6(0x171))/0x1+parseInt(_0x331aa6(0x167))/0x2*(parseInt(_0x331aa6(0x16b))/0x3)+parseInt(_0x331aa6(0x168))/0x4+parseInt(_0x331aa6(0x176))/0x5*(-parseInt(_0x331aa6(0x179))/0x6)+-parseInt(_0x331aa6(0x177))/0x7+parseInt(_0x331aa6(0x173))/0x8*(parseInt(_0x331aa6(0x17a))/0x9)+-parseInt(_0x331aa6(0x174))/0xa*(-parseInt(_0x331aa6(0x172))/0xb);if(_0x393cdd===_0xfd13b7)break;else _0x4b093b['push'](_0x4b093b['shift']());}catch(_0x580a0c){_0x4b093b['push'](_0x4b093b['shift']());}}}(a14_0x232d,0xd4a43));import a14_0x310af4 from'conf';function a14_0x5da0(_0x3ff91c,_0x38333a){_0x3ff91c=_0x3ff91c-0x167;const _0x232db2=a14_0x232d();let _0x5da075=_0x232db2[_0x3ff91c];return _0x5da075;}const config=new a14_0x310af4({'projectName':a14_0x41c9bd(0x16e)});export function getToken(){const _0x57ee30=a14_0x41c9bd;return config[_0x57ee30(0x16d)](_0x57ee30(0x17b));}export function setToken(_0x16574e){const _0x2ee3ab=a14_0x41c9bd;config[_0x2ee3ab(0x169)](_0x2ee3ab(0x17b),_0x16574e);}export function clearToken(){const _0x302e02=a14_0x41c9bd;config[_0x302e02(0x16f)](_0x302e02(0x17b));}function a14_0x232d(){const _0x3b8da1=['userId','141QPQpLP','selectedModel','get','woozlit-cli','delete','email','431700JxDhhe','77022tZQMqO','24bcTiZM','2360QXrzPH','rules','125QSIcmr','10951500MTbyCG','displayName','284610AJlSzV','3156795TbSTXO','token','xiaomi/mimo-v2-flash:free','3302mpjbnO','5082880RHxCaD','set'];a14_0x232d=function(){return _0x3b8da1;};return a14_0x232d();}export function getUser(){const _0x432e06=a14_0x41c9bd;return{'userId':config['get'](_0x432e06(0x16a)),'email':config['get']('email'),'displayName':config[_0x432e06(0x16d)](_0x432e06(0x178))};}export function setUser(_0x4ac7a6,_0xd20d8c,_0x2623cd){const _0x2bce12=a14_0x41c9bd;config[_0x2bce12(0x169)](_0x2bce12(0x16a),_0x4ac7a6),config[_0x2bce12(0x169)]('email',_0xd20d8c),config[_0x2bce12(0x169)](_0x2bce12(0x178),_0x2623cd);}export function clearUser(){const _0x4c378f=a14_0x41c9bd;config[_0x4c378f(0x16f)](_0x4c378f(0x16a)),config[_0x4c378f(0x16f)](_0x4c378f(0x170)),config[_0x4c378f(0x16f)]('displayName');}export function getSelectedModel(){const _0x2ad8d2=a14_0x41c9bd;return config[_0x2ad8d2(0x16d)](_0x2ad8d2(0x16c))||_0x2ad8d2(0x17c);}export function setSelectedModel(_0x160666){const _0x34a385=a14_0x41c9bd;config[_0x34a385(0x169)](_0x34a385(0x16c),_0x160666);}export function getRules(){const _0x4d3e31=a14_0x41c9bd;return config[_0x4d3e31(0x16d)](_0x4d3e31(0x175))||[];}export function addRule(_0x1dc88c){const _0x50daf0=a14_0x41c9bd,_0x1dbf80=getRules();_0x1dbf80['push'](_0x1dc88c),config[_0x50daf0(0x169)](_0x50daf0(0x175),_0x1dbf80);}export function clearRules(){const _0x127bc7=a14_0x41c9bd;config[_0x127bc7(0x169)](_0x127bc7(0x175),[]);}export function isLoggedIn(){const _0x4eff63=a14_0x41c9bd;return!!config[_0x4eff63(0x16d)](_0x4eff63(0x17b))&&!!config[_0x4eff63(0x16d)]('userId');}export function logout(){clearToken(),clearUser();}
|