woozlit 1.0.6 → 1.0.8
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/README.md +23 -32
- 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.d.ts +14 -0
- package/dist/tools/file.js +1 -1
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/mcp.js +1 -1
- package/dist/tools/rollback.d.ts +21 -0
- package/dist/tools/rollback.js +1 -0
- package/dist/tools/rules.js +1 -1
- package/dist/ui/output.d.ts +3 -0
- package/dist/ui/output.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/utils/api.js +1 -1
- package/dist/utils/history.d.ts +3 -0
- package/dist/utils/history.js +1 -0
- package/dist/utils/platform.d.ts +7 -0
- package/dist/utils/platform.js +1 -0
- package/dist/utils/storage.js +1 -1
- package/package.json +50 -50
package/README.md
CHANGED
|
@@ -5,19 +5,18 @@ Command-line interface for Woozlit AI - an agentic coding assistant.
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
9
|
-
pnpm install
|
|
10
|
-
pnpm build
|
|
11
|
-
pnpm link --global
|
|
8
|
+
npm install -g woozlit
|
|
12
9
|
```
|
|
13
10
|
|
|
14
11
|
## Features
|
|
15
12
|
|
|
16
|
-
- **Agentic AI**: Executes complex tasks (coding, testing, deployment) autonomously
|
|
17
|
-
- **MCP Support**: Use external tools (Computer Use, Filesystem, etc.) via Model Context Protocol
|
|
18
|
-
- **System Control**: Full access to shell commands, file system, and background processes
|
|
19
|
-
- **Auto-Correction**: Automatically detects and attempts to fix errors during execution
|
|
20
|
-
- **
|
|
13
|
+
- **Agentic AI**: Executes complex tasks (coding, testing, deployment) autonomously
|
|
14
|
+
- **MCP Support**: Use external tools (Computer Use, Filesystem, etc.) via Model Context Protocol
|
|
15
|
+
- **System Control**: Full access to shell commands, file system, and background processes
|
|
16
|
+
- **Auto-Correction**: Automatically detects and attempts to fix errors during execution
|
|
17
|
+
- **Rollback**: Undo AI file changes with `/rollback` command
|
|
18
|
+
- **History**: Local conversation history with 1-week retention
|
|
19
|
+
- **Cross-Platform**: Windows, macOS, and Linux support with platform-aware commands
|
|
21
20
|
|
|
22
21
|
## Usage
|
|
23
22
|
|
|
@@ -81,21 +80,23 @@ Creates `.woozlit/` folder with `rules.md` and `context.md`.
|
|
|
81
80
|
|
|
82
81
|
Inside chat session:
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
| Command | Description |
|
|
84
|
+
|---------|-------------|
|
|
85
|
+
| `/exit` | Exit chat |
|
|
86
|
+
| `/clear` | Clear conversation |
|
|
87
|
+
| `/model` | Switch AI model |
|
|
88
|
+
| `/mcp` | List connected tools |
|
|
89
|
+
| `/usage` | Check token usage |
|
|
90
|
+
| `/rollback` | Undo last AI file change |
|
|
91
|
+
| `/help` | Show help |
|
|
89
92
|
|
|
90
93
|
## Available Models
|
|
91
94
|
|
|
92
95
|
All models are provided via OpenRouter:
|
|
93
96
|
|
|
94
97
|
- MiMo V2 (default)
|
|
95
|
-
- Qwen3 235B
|
|
96
|
-
-
|
|
97
|
-
- Llama 3.3 70B
|
|
98
|
-
- Llama 4 Maverick
|
|
98
|
+
- Qwen3 235B / Coder
|
|
99
|
+
- Llama 3.3 70B / 4 Maverick
|
|
99
100
|
- Devstral Small
|
|
100
101
|
- Mistral Small 3.2
|
|
101
102
|
- Nemotron Nano 12B
|
|
@@ -103,30 +104,20 @@ All models are provided via OpenRouter:
|
|
|
103
104
|
- GLM 4.5 Air
|
|
104
105
|
- Kat Coder Pro
|
|
105
106
|
- DeepSeek R1T Chimera
|
|
107
|
+
- more soon
|
|
106
108
|
|
|
107
|
-
##
|
|
108
|
-
|
|
109
|
-
- Requires Google authentication
|
|
110
|
-
- Uses Firebase auth tokens
|
|
111
|
-
- No secrets stored in CLI code
|
|
112
|
-
- All requests verified server-side
|
|
113
|
-
|
|
114
|
-
## MCP Support (New in v1.2.0)
|
|
109
|
+
## MCP Support
|
|
115
110
|
|
|
116
111
|
Woozlit CLI supports the **Model Context Protocol (MCP)**, allowing the AI to use external tools.
|
|
117
112
|
|
|
118
113
|
**Manage MCP Servers:**
|
|
119
114
|
```bash
|
|
120
|
-
# Add an MCP server
|
|
121
115
|
woozlit mcp add sqlite uvx mcp-server-sqlite --db test.db
|
|
122
|
-
|
|
123
|
-
# List connected servers
|
|
124
116
|
woozlit mcp list
|
|
125
|
-
|
|
126
|
-
# Remove a server
|
|
127
117
|
woozlit mcp remove sqlite
|
|
128
118
|
```
|
|
129
119
|
|
|
130
|
-
Once added, the AI can automatically discover and use tools provided by these servers
|
|
120
|
+
Once added, the AI can automatically discover and use tools provided by these servers.
|
|
131
121
|
|
|
132
122
|
Use `/mcp` in the chat to see currently active tools.
|
|
123
|
+
|
package/dist/auth/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c7e17,_0x162e46){const _0xa2c1ba=a0_0x5ac9,_0x4a77f3=_0x4c7e17();while(!![]){try{const _0x381a3a=-parseInt(_0xa2c1ba(0x1c9))/0x1*(parseInt(_0xa2c1ba(0x1c1))/0x2)+-parseInt(_0xa2c1ba(0x1b3))/0x3+parseInt(_0xa2c1ba(0x1c8))/0x4*(-parseInt(_0xa2c1ba(0x1bb))/0x5)+parseInt(_0xa2c1ba(0x1b6))/0x6*(parseInt(_0xa2c1ba(0x1c5))/0x7)+parseInt(_0xa2c1ba(0x1ca))/0x8*(parseInt(_0xa2c1ba(0x1ba))/0x9)+parseInt(_0xa2c1ba(0x1c4))/0xa*(parseInt(_0xa2c1ba(0x1bf))/0xb)+parseInt(_0xa2c1ba(0x1c2))/0xc*(parseInt(_0xa2c1ba(0x1b5))/0xd);if(_0x381a3a===_0x162e46)break;else _0x4a77f3['push'](_0x4a77f3['shift']());}catch(_0x5ceda7){_0x4a77f3['push'](_0x4a77f3['shift']());}}}(a0_0x4cfa,0x89ec8));import a0_0x5ec23d from'open';function a0_0x4cfa(){const _0x5a5c8b=['end','searchParams','68YinUjT','51101FCmbyH','5081128FZWBto','get','close','userId','1654065vRepdM','text/html','1781ozCTpN','597762HXRnEb','email','token','http://localhost:','9jwyddI','135415GWfcam','displayName','\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','pathname','88JJuYzk','writeHead','18FBhmkP','22524BGyLed','/callback','1056800EoTkzL','21mcbOnv'];a0_0x4cfa=function(){return _0x5a5c8b;};return a0_0x4cfa();}function a0_0x5ac9(_0xd3d8a5,_0x53bc50){_0xd3d8a5=_0xd3d8a5-0x1b3;const _0x4cfae2=a0_0x4cfa();let _0x5ac9fc=_0x4cfae2[_0xd3d8a5];return _0x5ac9fc;}import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x12fdc5}from'../utils/storage.js';export async function login(){const _0x3e81a0=getApiUrl(),_0x5492c4=0x2694;return new Promise(_0x51a33d=>{const _0x140a6a=createServer(async(_0x3fd326,_0x4ad31b)=>{const _0x59355c=a0_0x5ac9,_0x1925d9=new URL(_0x3fd326['url']||'',_0x59355c(0x1b9)+_0x5492c4);if(_0x1925d9[_0x59355c(0x1be)]===_0x59355c(0x1c3)){const _0x4b1377=_0x1925d9[_0x59355c(0x1c7)][_0x59355c(0x1cb)](_0x59355c(0x1b8)),_0x35dd03=_0x1925d9['searchParams'][_0x59355c(0x1cb)](_0x59355c(0x1cd)),_0x474c32=_0x1925d9['searchParams']['get'](_0x59355c(0x1b7)),_0x5c691e=_0x1925d9[_0x59355c(0x1c7)][_0x59355c(0x1cb)](_0x59355c(0x1bc));_0x4b1377&&_0x35dd03?(setToken(_0x4b1377),setUser(_0x35dd03,_0x474c32||'',_0x5c691e||''),_0x4ad31b[_0x59355c(0x1c0)](0xc8,{'Content-Type':_0x59355c(0x1b4)}),_0x4ad31b[_0x59355c(0x1c6)](_0x59355c(0x1bd)),_0x140a6a['close'](),_0x51a33d(!![])):(_0x4ad31b[_0x59355c(0x1c0)](0x190,{'Content-Type':'text/html'}),_0x4ad31b['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><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'),_0x140a6a[_0x59355c(0x1cc)](),_0x51a33d(![]));}});_0x140a6a['listen'](_0x5492c4,()=>{const _0x1e7154=_0x3e81a0+'/auth/cli?callback=http://localhost:'+_0x5492c4+'/callback';a0_0x5ec23d(_0x1e7154);}),setTimeout(()=>{const _0x59e2cd=a0_0x5ac9;_0x140a6a[_0x59e2cd(0x1cc)](),_0x51a33d(![]);},0x1d4c0);});}export function logout(){a0_0x12fdc5();}export{isLoggedIn};
|
package/dist/chat/agent.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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};}}
|
|
1
|
+
(function(_0x3983c7,_0x700ff7){const _0x169f7f=a1_0x4a64,_0x392432=_0x3983c7();while(!![]){try{const _0x16d374=-parseInt(_0x169f7f(0xe9))/0x1+parseInt(_0x169f7f(0xa7))/0x2+parseInt(_0x169f7f(0x9c))/0x3*(-parseInt(_0x169f7f(0xa9))/0x4)+-parseInt(_0x169f7f(0xe6))/0x5*(-parseInt(_0x169f7f(0xe7))/0x6)+parseInt(_0x169f7f(0xb5))/0x7+-parseInt(_0x169f7f(0x108))/0x8*(-parseInt(_0x169f7f(0xd7))/0x9)+-parseInt(_0x169f7f(0xd0))/0xa*(-parseInt(_0x169f7f(0xf1))/0xb);if(_0x16d374===_0x700ff7)break;else _0x392432['push'](_0x392432['shift']());}catch(_0x216808){_0x392432['push'](_0x392432['shift']());}}}(a1_0x4e76,0xd42e7));import{input}from'@inquirer/prompts';import{sendChatMessage,getUserUsage}from'../utils/api.js';function a1_0x4a64(_0x8d87eb,_0x2c8b7b){_0x8d87eb=_0x8d87eb-0x96;const _0x4e767a=a1_0x4e76();let _0x4a6492=_0x4e767a[_0x8d87eb];return _0x4a6492;}function a1_0x4e76(){const _0x46359e=['/stats','success','edit','1715632EwBxYI','\x20\x20/clear\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','Reached\x20maximum\x20iterations','serverName','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','stop','pattern','.\x20Use\x20','edit_file','run_command','6PzGONv','Tool\x20error:\x20','dim','push','keys','commandOutput','/usage','Unknown','Current\x20model:\x20','now','.\x20Use\x20PowerShell\x20commands.','2955788iaODEc','/mcp','3354328cPdnfj','parse','Failed\x20to\x20fetch\x20usage\x20data.','Editing...','search','email','mcpConnected','args','path','search_directory','start','):\x20','3015047DdaUiN','Failed\x20JSON\x20content:','forEach','trim','aiMessageEnd','#60a5fa','Conversation\x20cleared','Commands','list','actionSpinner','join','MCP\x20Tool\x20error:\x20','includes','No\x20changes\x20to\x20rollback','```tool','map','error','description','content','Unknown\x20tool:\x20','statusBar','Searching...','user','No\x20MCP\x20tools\x20connected.','loggedInBox','properties','size','230RdqRBB','inputSchema','Creating...','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','isSpinning','create','\x20\x20/mcp\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','27MhadZe','find','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','stdout','write','read_file','Unknown\x20tool','```','tokensUsed','\x20\x20/rollback\x20-\x20Undo\x20last\x20AI\x20file\x20change','Goodbye!','Unexpected\x20error:\x20','info','API\x20error:\x20','stringify','103830OyWlTK','132mqNWMX','\x20\x20/model\x20\x20\x20\x20-\x20Switch\x20AI\x20model','1693622McEsNh','../tools/rollback.js','exit','startsWith','\x0aYou\x20are\x20running\x20on\x20','../tools/file.js','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','Tool\x20result\x20for\x20','588764WxeHas','toolActivity','Thinking...','/quit','create_file','gradientText','\x20\x20/help\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','aiMessage','length','/model','Model\x20changed\x20to:\x20','force\x20closed','createSpinner','message','Reading...','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','name','displayName','replace','monthlyLimit'];a1_0x4e76=function(){return _0x46359e;};return a1_0x4e76();}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_0x5626db from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';const SYSTEM_PROMPT='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-\x20find_files(path,\x20pattern):\x20Find\x20files\x20by\x20name\x20pattern\x20in\x20a\x20directory\x20(recursive)\x0a-\x20search_directory(path,\x20pattern):\x20Search\x20for\x20text/code\x20in\x20all\x20files\x20in\x20a\x20directory\x20(like\x20grep)\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\x0aFor\x20all\x20other\x20responses,\x20just\x20write\x20plain\x20text.\x20Do\x20NOT\x20wrap\x20your\x20response\x20in\x20JSON.\x20Do\x20NOT\x20output\x20{\x22message\x22:\x20\x22...\x22}.\x20Just\x20write\x20the\x20message\x20directly.\x0a';export async function startChat(_0xbdb48){const _0x93828a=a1_0x4a64,_0x2ca093=getSelectedModel();await connectToMcpServers();const _0xd193d0=await getMcpTools(),_0x2caf7b=new Set(_0xd193d0[_0x93828a(0xc4)](_0x364570=>_0x364570['serverName']));_0x2caf7b[_0x93828a(0xcf)]>0x0&&a1_0x5626db[_0x93828a(0xaf)](_0x2caf7b['size'],_0xd193d0[_0x93828a(0xf9)]);process['on'](_0x93828a(0xeb),()=>closeMcpClients());const _0x328183=formatRulesForSystem(),_0x5ac0eb=getPlatformInfo(),_0x41649a=getShellPrefix(),_0x15227c=_0xd193d0['length']>0x0?_0x93828a(0xd9)+_0xd193d0[_0x93828a(0xc4)](_0x4e56b5=>{const _0x54195b=_0x93828a,_0x327666=Object[_0x54195b(0xa0)](_0x4e56b5[_0x54195b(0xd1)]?.[_0x54195b(0xce)]||{})['join'](',\x20');return'-\x20'+_0x4e56b5[_0x54195b(0x101)]+'('+_0x327666+_0x54195b(0xb4)+_0x4e56b5['description'];})[_0x93828a(0xbf)]('\x0a'):'',_0x57d7b2=isWindows()?_0x93828a(0xed)+_0x5ac0eb+_0x93828a(0xa6):_0x93828a(0xed)+_0x5ac0eb+_0x93828a(0x99)+_0x41649a+_0x93828a(0xef),_0x2d43d4=SYSTEM_PROMPT+_0x15227c+_0x57d7b2+'\x0a'+_0x328183,_0x50fb58=getUser(),_0x26a992=[{'role':'system','content':_0x2d43d4}];(_0x50fb58[_0x93828a(0x102)]||_0x50fb58[_0x93828a(0xae)])&&a1_0x5626db[_0x93828a(0xcd)](_0x50fb58['displayName']||_0x50fb58['email']||_0x93828a(0xa3));a1_0x5626db['currentDir'](process['cwd']()),a1_0x5626db['dim'](_0x93828a(0x100)),a1_0x5626db[_0x93828a(0xc9)](_0x2ca093,0x64);const _0x3161c8=async _0x3527d9=>{const _0x5ea056=_0x93828a;if(!_0x3527d9||_0x3527d9[_0x5ea056(0xb8)]()==='')return!![];const _0x181f29=_0x3527d9[_0x5ea056(0xb8)]();if(_0x181f29==='/exit'||_0x181f29===_0x5ea056(0xf4))return a1_0x5626db[_0x5ea056(0xe3)](_0x5ea056(0xe1)),![];if(_0x181f29==='/clear')return _0x26a992[_0x5ea056(0xf9)]=0x1,a1_0x5626db[_0x5ea056(0xe3)](_0x5ea056(0xbb)),!![];if(_0x181f29===_0x5ea056(0xa8)){const _0x444c88=await getMcpTools();return _0x444c88[_0x5ea056(0xf9)]===0x0?a1_0x5626db[_0x5ea056(0xe3)](_0x5ea056(0xcc)):(a1_0x5626db[_0x5ea056(0xe3)]('Connected\x20MCP\x20Tools:'),_0x444c88[_0x5ea056(0xb7)](_0x2d2c8b=>a1_0x5626db[_0x5ea056(0x9e)]('-\x20'+_0x2d2c8b[_0x5ea056(0x101)]+'\x20('+_0x2d2c8b[_0x5ea056(0x10b)]+_0x5ea056(0xb4)+(_0x2d2c8b[_0x5ea056(0xc6)]?.['slice'](0x0,0x32)||'')))),a1_0x5626db[_0x5ea056(0x9e)](_0x5ea056(0x96)),!![];}if(_0x181f29==='/help')return a1_0x5626db['header'](_0x5ea056(0xbc)),a1_0x5626db['dim']('\x20\x20/exit\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat'),a1_0x5626db[_0x5ea056(0x9e)](_0x5ea056(0x109)),a1_0x5626db[_0x5ea056(0x9e)](_0x5ea056(0xe8)),a1_0x5626db[_0x5ea056(0x9e)](_0x5ea056(0xd6)),a1_0x5626db[_0x5ea056(0x9e)]('\x20\x20/usage\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats'),a1_0x5626db[_0x5ea056(0x9e)](_0x5ea056(0xe0)),a1_0x5626db['dim'](_0x5ea056(0xf7)),!![];if(_0x181f29==='/rollback'){const {rollbackLast:_0x397f2d,getChanges:_0x461f60}=await import(_0x5ea056(0xea)),_0x1d788b=_0x461f60();if(_0x1d788b[_0x5ea056(0xf9)]===0x0)a1_0x5626db[_0x5ea056(0xe3)](_0x5ea056(0xc2));else{const _0x19a00a=_0x397f2d();_0x19a00a[_0x5ea056(0x106)]?a1_0x5626db[_0x5ea056(0x106)](_0x19a00a[_0x5ea056(0xfe)]):a1_0x5626db[_0x5ea056(0xc5)](_0x19a00a[_0x5ea056(0xfe)]);}return!![];}if(_0x181f29===_0x5ea056(0xfa)){const _0x559e5f=await selectModel();return _0x559e5f!==_0x2ca093?(a1_0x5626db[_0x5ea056(0xe3)](_0x5ea056(0xfb)+_0x559e5f),a1_0x5626db[_0x5ea056(0xe3)](_0x5ea056(0xd3))):a1_0x5626db[_0x5ea056(0xe3)](_0x5ea056(0xa4)+_0x2ca093),!![];}if(_0x181f29===_0x5ea056(0xa2)||_0x181f29===_0x5ea056(0x105)){const _0x58fdb4=a1_0x5626db[_0x5ea056(0xfd)]('Fetching\x20usage...');_0x58fdb4[_0x5ea056(0xb3)]();const _0x59f2e8=await getUserUsage();return _0x58fdb4[_0x5ea056(0x97)](),_0x59f2e8?a1_0x5626db['usageBox'](_0x59f2e8[_0x5ea056(0xdf)],_0x59f2e8[_0x5ea056(0x104)],_0x59f2e8['isOverLimit']):a1_0x5626db[_0x5ea056(0xc5)](_0x5ea056(0xab)),!![];}return _0x26a992[_0x5ea056(0x9f)]({'role':_0x5ea056(0xcb),'content':_0x181f29}),await processAgentLoop(_0x26a992,_0x2ca093),!![];};if(_0xbdb48){const _0x1d75c3=await _0x3161c8(_0xbdb48);if(!_0x1d75c3)return;}while(!![]){try{const _0x34dff3=a1_0x5626db[_0x93828a(0xf6)]('\x20>\x20',_0x93828a(0xba),'#2563eb'),_0x170909=await input({'message':_0x34dff3,'theme':{'prefix':''}}),_0x215462=await _0x3161c8(_0x170909);if(!_0x215462)break;}catch(_0x3313c2){if(_0x3313c2 instanceof Error&&_0x3313c2[_0x93828a(0xfe)][_0x93828a(0xc1)](_0x93828a(0xfc)))break;a1_0x5626db[_0x93828a(0xc5)](_0x93828a(0xe2)+_0x3313c2);}}}async function processAgentLoop(_0x38d655,_0xa3468f){const _0x5e912f=a1_0x4a64;let _0x41b606=0x0;const _0x3ebc75=0x3e8;while(_0x41b606<_0x3ebc75){_0x41b606++;const _0x5b263e=a1_0x5626db[_0x5e912f(0xfd)](_0x5e912f(0xf3));_0x5b263e['start']();let _0x137d95='',_0x51ab4a=![],_0x45dc83='';try{const _0x8d408b=await sendChatMessage(_0xa3468f,_0x38d655,_0x3feb6c=>{const _0x1e1478=_0x5e912f;_0x5b263e['isSpinning']&&(_0x5b263e['stop'](),a1_0x5626db[_0x1e1478(0xf8)](''));_0x137d95+=_0x3feb6c;for(const _0x298827 of _0x3feb6c){_0x45dc83+=_0x298827;if(_0x298827==='\x0a'){if(!_0x51ab4a){if(_0x45dc83[_0x1e1478(0xec)](_0x1e1478(0xc3)))_0x51ab4a=!![];else _0x45dc83['startsWith'](_0x1e1478(0xde))?process[_0x1e1478(0xda)][_0x1e1478(0xdb)](_0x45dc83):process[_0x1e1478(0xda)]['write'](_0x45dc83);}else _0x45dc83['startsWith'](_0x1e1478(0xde))&&!_0x45dc83[_0x1e1478(0xec)](_0x1e1478(0xc3))&&(_0x51ab4a=![]);_0x45dc83='';}}});_0x45dc83&&!_0x51ab4a&&!_0x45dc83[_0x5e912f(0xec)](_0x5e912f(0xc3))&&process[_0x5e912f(0xda)][_0x5e912f(0xdb)](_0x45dc83),_0x137d95=_0x8d408b[_0x5e912f(0xc7)];}catch(_0x294f65){_0x5b263e[_0x5e912f(0x97)](),a1_0x5626db['error'](_0x5e912f(0xe4)+_0x294f65);return;}_0x5b263e[_0x5e912f(0xd4)]&&_0x5b263e[_0x5e912f(0x97)]();a1_0x5626db[_0x5e912f(0xb9)](),_0x38d655[_0x5e912f(0x9f)]({'role':'assistant','content':_0x137d95});const _0x166655=_0x137d95['match'](/```tool\n([\s\S]*?)\n```/);if(!_0x166655)break;try{const _0x1aea40=_0x166655[0x1]['trim'](),_0x5bd40b=JSON[_0x5e912f(0xaa)](_0x1aea40);a1_0x5626db[_0x5e912f(0xf2)](_0x5bd40b[_0x5e912f(0x101)],_0x5bd40b[_0x5e912f(0xb0)]);let _0x468228='Executing...';if(_0x5bd40b[_0x5e912f(0x101)][_0x5e912f(0xec)]('read'))_0x468228=_0x5e912f(0xff);if(_0x5bd40b[_0x5e912f(0x101)]['startsWith'](_0x5e912f(0xd5)))_0x468228=_0x5e912f(0xd2);if(_0x5bd40b[_0x5e912f(0x101)][_0x5e912f(0xec)](_0x5e912f(0x107)))_0x468228=_0x5e912f(0xac);if(_0x5bd40b[_0x5e912f(0x101)][_0x5e912f(0xec)](_0x5e912f(0xbd)))_0x468228='Listing...';if(_0x5bd40b[_0x5e912f(0x101)][_0x5e912f(0xec)]('search'))_0x468228=_0x5e912f(0xca);if(_0x5bd40b[_0x5e912f(0x101)]==='run_command')_0x468228='Running...';const _0xb0f23a=a1_0x5626db[_0x5e912f(0xbe)](_0x468228);_0xb0f23a[_0x5e912f(0xb3)]();const _0x3b24af=performance[_0x5e912f(0xa5)]();let _0x4ab768;try{_0x4ab768=await executeToolCall(_0x5bd40b[_0x5e912f(0x101)],_0x5bd40b[_0x5e912f(0xb0)]);}catch(_0x64b179){if(_0x64b179[_0x5e912f(0xfe)]&&_0x64b179['message']['includes'](_0x5e912f(0xdd))){const _0x58918a=await getMcpTools(),_0x3b3ddd=_0x58918a[_0x5e912f(0xd8)](_0x225e82=>_0x225e82[_0x5e912f(0x101)]===_0x5bd40b[_0x5e912f(0x101)]);if(_0x3b3ddd)try{_0x4ab768=await executeMcpTool(_0x3b3ddd[_0x5e912f(0x10b)],_0x3b3ddd[_0x5e912f(0x101)],_0x5bd40b[_0x5e912f(0xb0)]);}catch(_0x489485){throw new Error(_0x5e912f(0xc0)+_0x489485);}else throw _0x64b179;}else throw _0x64b179;}_0xb0f23a[_0x5e912f(0x97)](),_0x38d655['push']({'role':'user','content':_0x5e912f(0xf0)+_0x5bd40b['name']+':\x0a'+JSON[_0x5e912f(0xe5)](_0x4ab768,null,0x2)}),await new Promise(_0xdbe1d1=>setTimeout(_0xdbe1d1,0x3e8));}catch(_0xe8ddb8){a1_0x5626db[_0x5e912f(0xc5)](_0x5e912f(0x9d)+_0xe8ddb8);_0x166655&&_0x166655[0x1]&&(a1_0x5626db[_0x5e912f(0x9e)](_0x5e912f(0xb6)),a1_0x5626db[_0x5e912f(0x9e)](_0x166655[0x1]));break;}}_0x41b606>=_0x3ebc75&&a1_0x5626db['warn'](_0x5e912f(0x10a));}async function executeToolCall(_0xbecd1a,_0x3fc286){const _0x59de54=a1_0x4a64;switch(_0xbecd1a){case _0x59de54(0xf5):return createFile(_0x3fc286[_0x59de54(0xb1)],_0x3fc286['content']);case _0x59de54(0xdc):return readFile(_0x3fc286[_0x59de54(0xb1)]);case'list_directory':return listDirectory(_0x3fc286[_0x59de54(0xb1)]||'.');case _0x59de54(0x9a):return editFile(_0x3fc286[_0x59de54(0xb1)],_0x3fc286[_0x59de54(0xad)],_0x3fc286[_0x59de54(0x103)]);case'search_file':return searchFile(_0x3fc286[_0x59de54(0xb1)],_0x3fc286[_0x59de54(0x98)]);case _0x59de54(0x9b):const {command:_0x1baf3e,background:_0x2c3844,wait:_0x3773a5}=_0x3fc286,_0x536d1c=await runCommand(_0x1baf3e,_0x3d03f1=>{const _0x3092c6=_0x59de54;a1_0x5626db[_0x3092c6(0xa1)](_0x3d03f1);},_0x2c3844,_0x3773a5);return _0x536d1c;case'find_files':{const {findFiles:_0x24df74}=await import('../tools/file.js');return _0x24df74(_0x3fc286[_0x59de54(0xb1)]||'.',_0x3fc286[_0x59de54(0x98)]);}case _0x59de54(0xb2):{const {searchDirectory:_0x2a8ea7}=await import(_0x59de54(0xee));return _0x2a8ea7(_0x3fc286['path']||'.',_0x3fc286[_0x59de54(0x98)]);}default:return{'error':_0x59de54(0xc8)+_0xbecd1a};}}
|
package/dist/config/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x39367b=a2_0x13bb;(function(_0x5c4ff7,_0x1bc9d8){const _0x40582c=a2_0x13bb,_0x729b54=_0x5c4ff7();while(!![]){try{const _0x362e3a=-parseInt(_0x40582c(0x18d))/0x1*(parseInt(_0x40582c(0x185))/0x2)+-parseInt(_0x40582c(0x192))/0x3+parseInt(_0x40582c(0x180))/0x4+parseInt(_0x40582c(0x196))/0x5*(parseInt(_0x40582c(0x18b))/0x6)+-parseInt(_0x40582c(0x188))/0x7*(parseInt(_0x40582c(0x18e))/0x8)+parseInt(_0x40582c(0x18f))/0x9+parseInt(_0x40582c(0x197))/0xa*(-parseInt(_0x40582c(0x193))/0xb);if(_0x362e3a===_0x1bc9d8)break;else _0x729b54['push'](_0x729b54['shift']());}catch(_0x4a9a5a){_0x729b54['push'](_0x729b54['shift']());}}}(a2_0x40ec,0x38a87));import a2_0x3a4469 from'conf';const config=new a2_0x3a4469({'projectName':a2_0x39367b(0x184),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x1884db=a2_0x39367b;return config[_0x1884db(0x17c)](_0x1884db(0x18a));}function a2_0x13bb(_0x56adab,_0x4ff711){_0x56adab=_0x56adab-0x17c;const _0x40ecef=a2_0x40ec();let _0x13bb55=_0x40ecef[_0x56adab];return _0x13bb55;}function a2_0x40ec(){const _0x4623e0=['2486zlYvrY','command','uvx','10sqRkLw','19640KEedZd','tsx','get','windows-mcp','@modelcontextprotocol/server-filesystem','join','1566288ABGoxR','.js','src','set','woozlit-cli','398380LFccDU','node','C:\x5cUsers','7deHVzy','npx','mcpServers','1313682fhEgYf','computer-use.js','1srooad','1510472AlafZn','3129165psxhbL','computer-use.ts','mcp-servers','339651tsbXAr'];a2_0x40ec=function(){return _0x4623e0;};return a2_0x40ec();}export function addMcpServer(_0x3a5965,_0x4119c2,_0x5fd902=[],_0x3dba84){const _0x3f941e=a2_0x39367b,_0x4df58e=getMcpServers();_0x4df58e[_0x3a5965]={'command':_0x4119c2,'args':_0x5fd902,'env':_0x3dba84},config[_0x3f941e(0x183)]('mcpServers',_0x4df58e);}export function removeMcpServer(_0x2af1af){const _0x5b0cf6=a2_0x39367b,_0x2b6a3e=getMcpServers();if(_0x2b6a3e[_0x2af1af])return delete _0x2b6a3e[_0x2af1af],config['set'](_0x5b0cf6(0x18a),_0x2b6a3e),!![];return![];}export function getMcpServer(_0x14af85){return getMcpServers()[_0x14af85];}import a2_0x26edb7 from'path';import{fileURLToPath}from'url';export function ensureDefaultServers(){const _0x5078f0=a2_0x39367b,_0x5ae9fe=getMcpServers(),_0x2ffef8=fileURLToPath(import.meta.url),_0x371e69=a2_0x26edb7['dirname'](_0x2ffef8),_0x53248e=_0x371e69['includes']('dist')||_0x2ffef8['endsWith'](_0x5078f0(0x181)),_0x5c8d9a=_0x53248e?a2_0x26edb7[_0x5078f0(0x17f)](_0x371e69,'..',_0x5078f0(0x191),_0x5078f0(0x18c)):a2_0x26edb7[_0x5078f0(0x17f)](_0x371e69,'..','..',_0x5078f0(0x182),'mcp-servers',_0x5078f0(0x190)),_0x14c281=_0x53248e?_0x5078f0(0x186):_0x5078f0(0x198);_0x5ae9fe['computer-use']={'command':_0x14c281,'args':[_0x5c8d9a],'env':{}},(!_0x5ae9fe[_0x5078f0(0x17d)]||_0x5ae9fe[_0x5078f0(0x17d)][_0x5078f0(0x194)]===_0x5078f0(0x195))&&(_0x5ae9fe[_0x5078f0(0x17d)]={'command':_0x5078f0(0x189),'args':['-y',_0x5078f0(0x17e),_0x5078f0(0x187)],'env':{}}),config[_0x5078f0(0x183)](_0x5078f0(0x18a),_0x5ae9fe);}
|
package/dist/config/settings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x1b1bc8=a3_0x4108;(function(_0x269fec,_0x2cef1b){const _0x84945f=a3_0x4108,_0x552651=_0x269fec();while(!![]){try{const _0x2b8742=parseInt(_0x84945f(0x177))/0x1+-parseInt(_0x84945f(0x169))/0x2*(-parseInt(_0x84945f(0x17b))/0x3)+-parseInt(_0x84945f(0x178))/0x4*(-parseInt(_0x84945f(0x16f))/0x5)+parseInt(_0x84945f(0x167))/0x6+parseInt(_0x84945f(0x15f))/0x7+parseInt(_0x84945f(0x168))/0x8*(-parseInt(_0x84945f(0x17c))/0x9)+-parseInt(_0x84945f(0x15d))/0xa;if(_0x2b8742===_0x2cef1b)break;else _0x552651['push'](_0x552651['shift']());}catch(_0x5bd6c0){_0x552651['push'](_0x552651['shift']());}}}(a3_0x45a5,0x7ee39));const API_URL=process[a3_0x1b1bc8(0x176)][a3_0x1b1bc8(0x161)]||'https://woozlit.com',PROD_URL=a3_0x1b1bc8(0x172);export function getApiUrl(){return API_URL;}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}function a3_0x4108(_0x2c4f29,_0x535951){_0x2c4f29=_0x2c4f29-0x15a;const _0x45a560=a3_0x45a5();let _0x410820=_0x45a560[_0x2c4f29];return _0x410820;}export const MODELS=[{'id':a3_0x1b1bc8(0x164),'name':'MiMo\x20V2','description':a3_0x1b1bc8(0x15b)},{'id':a3_0x1b1bc8(0x16a),'name':'Qwen3\x20235B','description':a3_0x1b1bc8(0x173)},{'id':a3_0x1b1bc8(0x15e),'name':a3_0x1b1bc8(0x160),'description':a3_0x1b1bc8(0x171)},{'id':'meta-llama/llama-3.3-70b-instruct:free','name':'Llama\x203.3\x2070B','description':a3_0x1b1bc8(0x17a)},{'id':a3_0x1b1bc8(0x16e),'name':a3_0x1b1bc8(0x16b),'description':'Meta\x27s\x20latest'},{'id':a3_0x1b1bc8(0x15a),'name':a3_0x1b1bc8(0x179),'description':a3_0x1b1bc8(0x166)},{'id':'mistralai/mistral-small-3.2-24b-instruct','name':a3_0x1b1bc8(0x162),'description':a3_0x1b1bc8(0x16c)},{'id':a3_0x1b1bc8(0x174),'name':a3_0x1b1bc8(0x16d),'description':'NVIDIA\x20vision'},{'id':a3_0x1b1bc8(0x15c),'name':a3_0x1b1bc8(0x163),'description':a3_0x1b1bc8(0x170)},{'id':'z-ai/glm-4.5-air:free','name':a3_0x1b1bc8(0x165),'description':a3_0x1b1bc8(0x17f)},{'id':'kwaipilot/kat-coder-pro:free','name':'Kat\x20Coder\x20Pro','description':a3_0x1b1bc8(0x17d)},{'id':a3_0x1b1bc8(0x175),'name':a3_0x1b1bc8(0x17e),'description':'Reasoning\x20model'}];function a3_0x45a5(){const _0x205eef=['mistralai/devstral-small','Xiaomi\x27s\x20fast\x20AI\x20model','moonshotai/kimi-k2','5582290YELaDI','qwen/qwen3-coder:free','1060542Fcmoqv','Qwen3\x20Coder','WOOZLIT_API_URL','Mistral\x20Small\x203.2','Kimi\x20K2','xiaomi/mimo-v2-flash:free','GLM\x204.5\x20Air','Developer-focused','1423314ZQZqWf','8boHBqo','228odHNgh','qwen/qwen3-235b-a22b:free','Llama\x204\x20Maverick','Latest\x20Mistral','Nemotron\x20Nano\x2012B','meta-llama/llama-4-maverick','86035MihWfa','Reasoning\x20model','Coding\x20specialist','https://woozlit.com','Alibaba\x27s\x20largest','nvidia/nemotron-nano-12b-v2-vl:free','tngtech/deepseek-r1t-chimera:free','env','172414VnSVKq','132cNWKrq','Devstral\x20Small','Meta\x27s\x20powerful\x20model','8895iWMAjm','3501126xPWWtT','Advanced\x20coding','DeepSeek\x20R1T\x20Chimera','Zhipu\x20AI\x20model'];a3_0x45a5=function(){return _0x205eef;};return a3_0x45a5();}export const DEFAULT_MODEL='xiaomi/mimo-v2-flash:free';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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)]();
|
|
2
|
+
const a4_0x6ef9e=a4_0x5281;(function(_0x5a4a55,_0x13b707){const _0x51bf19=a4_0x5281,_0x355619=_0x5a4a55();while(!![]){try{const _0x2078c8=parseInt(_0x51bf19(0x1d6))/0x1*(parseInt(_0x51bf19(0x1e8))/0x2)+-parseInt(_0x51bf19(0x1f9))/0x3+-parseInt(_0x51bf19(0x1fb))/0x4*(parseInt(_0x51bf19(0x1f6))/0x5)+parseInt(_0x51bf19(0x1d5))/0x6*(parseInt(_0x51bf19(0x1e5))/0x7)+-parseInt(_0x51bf19(0x219))/0x8+-parseInt(_0x51bf19(0x210))/0x9+-parseInt(_0x51bf19(0x1d4))/0xa*(-parseInt(_0x51bf19(0x1f3))/0xb);if(_0x2078c8===_0x13b707)break;else _0x355619['push'](_0x355619['shift']());}catch(_0x451a80){_0x355619['push'](_0x355619['shift']());}}}(a4_0x6199,0xad263));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';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_0x4e3fbc from'./ui/output.js';const program=new Command();program[a4_0x6ef9e(0x1cb)](a4_0x6ef9e(0x214))['description']('Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant')[a4_0x6ef9e(0x20c)](a4_0x6ef9e(0x1ff))[a4_0x6ef9e(0x218)](async()=>{const _0x5714a3=a4_0x6ef9e;ensureDefaultServers(),a4_0x4e3fbc[_0x5714a3(0x20a)]();if(!isLoggedIn()){a4_0x4e3fbc[_0x5714a3(0x211)](_0x5714a3(0x1eb)),a4_0x4e3fbc[_0x5714a3(0x1d9)](''),a4_0x4e3fbc[_0x5714a3(0x1ea)](_0x5714a3(0x1f4));const _0x434f67=a4_0x4e3fbc[_0x5714a3(0x1f5)](_0x5714a3(0x21b));_0x434f67[_0x5714a3(0x1d1)]();const _0x133b99=await login();_0x434f67[_0x5714a3(0x21c)]();if(!_0x133b99){a4_0x4e3fbc[_0x5714a3(0x206)](_0x5714a3(0x208));return;}const _0x2f80c9=getUser();a4_0x4e3fbc[_0x5714a3(0x203)](_0x5714a3(0x1e2)+(_0x2f80c9[_0x5714a3(0x20d)]||_0x2f80c9[_0x5714a3(0x202)]));}await startChat();}),program[a4_0x6ef9e(0x1e7)](a4_0x6ef9e(0x1cc))[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x1ee))[a4_0x6ef9e(0x218)](async()=>{const _0x5b9762=a4_0x6ef9e;if(isLoggedIn()){const _0x54c082=getUser();a4_0x4e3fbc[_0x5b9762(0x1ea)](_0x5b9762(0x1f1)+_0x54c082['email']);return;}a4_0x4e3fbc[_0x5b9762(0x1ea)]('Opening\x20browser\x20for\x20login...');const _0x2d488f=a4_0x4e3fbc['createSpinner']('Waiting\x20for\x20authentication...');_0x2d488f['start']();const _0x1b137f=await login();_0x2d488f[_0x5b9762(0x21c)]();if(_0x1b137f){const _0x3c6274=getUser();a4_0x4e3fbc[_0x5b9762(0x203)]('Logged\x20in\x20as\x20'+(_0x3c6274[_0x5b9762(0x20d)]||_0x3c6274[_0x5b9762(0x202)]));}else a4_0x4e3fbc[_0x5b9762(0x206)](_0x5b9762(0x208));}),program[a4_0x6ef9e(0x1e7)](a4_0x6ef9e(0x1f0))['description'](a4_0x6ef9e(0x1f8))[a4_0x6ef9e(0x218)](()=>{logout(),a4_0x4e3fbc['success']('Logged\x20out\x20successfully');}),program[a4_0x6ef9e(0x1e7)](a4_0x6ef9e(0x1ce))['description'](a4_0x6ef9e(0x200))[a4_0x6ef9e(0x218)](()=>{const _0x54874d=a4_0x6ef9e;if(!isLoggedIn()){a4_0x4e3fbc[_0x54874d(0x211)](_0x54874d(0x1de));return;}const _0xc20bc=getUser();a4_0x4e3fbc['header'](_0x54874d(0x1e6)),a4_0x4e3fbc[_0x54874d(0x1ea)]('Name:\x20'+(_0xc20bc[_0x54874d(0x20d)]||_0x54874d(0x217))),a4_0x4e3fbc[_0x54874d(0x1ea)](_0x54874d(0x1fd)+(_0xc20bc['email']||'N/A')),a4_0x4e3fbc[_0x54874d(0x1ea)](_0x54874d(0x1d7)+getSelectedModel());}),program[a4_0x6ef9e(0x1e7)](a4_0x6ef9e(0x1fe))[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x1fa))[a4_0x6ef9e(0x218)](async _0x194083=>{const _0x433c70=a4_0x6ef9e;a4_0x4e3fbc['showLogo']();if(!isLoggedIn()){a4_0x4e3fbc[_0x433c70(0x211)]('You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.'),a4_0x4e3fbc['dim'](''),a4_0x4e3fbc[_0x433c70(0x1ea)](_0x433c70(0x1f4));const _0x1699c4=a4_0x4e3fbc[_0x433c70(0x1f5)]('Waiting\x20for\x20authentication...');_0x1699c4[_0x433c70(0x1d1)]();const _0x340a0e=await login();_0x1699c4[_0x433c70(0x21c)]();if(!_0x340a0e){a4_0x4e3fbc['error'](_0x433c70(0x208));return;}const _0x2446a1=getUser();a4_0x4e3fbc[_0x433c70(0x203)](_0x433c70(0x1e2)+(_0x2446a1[_0x433c70(0x20d)]||_0x2446a1[_0x433c70(0x202)]));}await startChat(_0x194083);}),program[a4_0x6ef9e(0x1e7)]('ask\x20<message>')[a4_0x6ef9e(0x1ef)]('Ask\x20a\x20single\x20question')[a4_0x6ef9e(0x218)](async _0x3cf9aa=>{const _0x5cfe44=a4_0x6ef9e;a4_0x4e3fbc[_0x5cfe44(0x20a)]();if(!isLoggedIn()){a4_0x4e3fbc[_0x5cfe44(0x211)](_0x5cfe44(0x1eb)),a4_0x4e3fbc[_0x5cfe44(0x1d9)](''),a4_0x4e3fbc['info']('Opening\x20browser\x20for\x20login...');const _0x2de006=a4_0x4e3fbc['createSpinner'](_0x5cfe44(0x21b));_0x2de006[_0x5cfe44(0x1d1)]();const _0x5120e0=await login();_0x2de006[_0x5cfe44(0x21c)]();if(!_0x5120e0){a4_0x4e3fbc[_0x5cfe44(0x206)](_0x5cfe44(0x208));return;}const _0x53464d=getUser();a4_0x4e3fbc[_0x5cfe44(0x203)]('Logged\x20in\x20as\x20'+(_0x53464d['displayName']||_0x53464d['email']));}await startChat(_0x3cf9aa);});const configCmd=program[a4_0x6ef9e(0x1e7)](a4_0x6ef9e(0x205))[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x1ec));function a4_0x6199(){const _0x1ea823=['Rules','info','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','Configure\x20CLI\x20settings','#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a','Login\x20with\x20your\x20Woozlit\x20account','description','logout','Already\x20logged\x20in\x20as\x20','Add\x20a\x20new\x20rule','5973363zdtVRj','Opening\x20browser\x20for\x20login...','createSpinner','90tqfKuY','Initialized\x20Woozlit\x20in\x20current\x20directory','Logout\x20from\x20your\x20Woozlit\x20account','2689938qmFWaQ','Start\x20an\x20AI\x20chat\x20session','120692MvjPel','add\x20<name>\x20<command>\x20[args...]','Email:\x20','chat\x20[message]','1.0.8','Show\x20current\x20user\x20info','parse','email','success','No\x20rules\x20defined','config','error','Added\x20MCP\x20server:\x20','Login\x20failed\x20or\x20timed\x20out','Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md','showLogo','some','version','displayName','List\x20all\x20MCP\x20servers','Add\x20a\x20new\x20MCP\x20server','5591061KHMLGy','warn','join','entries','woozlit','.woozlit','Manage\x20AI\x20behavior\x20rules','N/A','action','3470528vwReOk','add\x20<rule>','Waiting\x20for\x20authentication...','stop','#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a','init','MCP\x20server\x20\x27','name','login','Model\x20set\x20to:\x20','whoami','\x27\x20not\x20found','model','start','Select\x20AI\x20model','List\x20all\x20rules','20YFratS','642ZvDciP','664470wbcBlG','Model:\x20','.woozlit/context.md','dim','header','write','Remove\x20an\x20MCP\x20server','keys','Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.','forEach','Added\x20rule:\x20','Manage\x20MCP\x20servers','Logged\x20in\x20as\x20','length','rules','51618mteBhs','Current\x20User','command','4UXJEAf'];a4_0x6199=function(){return _0x1ea823;};return a4_0x6199();}function a4_0x5281(_0x2d9f1e,_0x22d3a2){_0x2d9f1e=_0x2d9f1e-0x1ca;const _0x6199e6=a4_0x6199();let _0x52812f=_0x6199e6[_0x2d9f1e];return _0x52812f;}configCmd[a4_0x6ef9e(0x1e7)](a4_0x6ef9e(0x1d0))[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x1d2))[a4_0x6ef9e(0x218)](async()=>{const _0x226a4b=a4_0x6ef9e,_0x4f583f=await selectModel();a4_0x4e3fbc[_0x226a4b(0x203)](_0x226a4b(0x1cd)+_0x4f583f);});const rulesCmd=program['command'](a4_0x6ef9e(0x1e4))[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x216));rulesCmd[a4_0x6ef9e(0x1e7)]('list')[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x1d3))[a4_0x6ef9e(0x218)](()=>{const _0x4319e8=a4_0x6ef9e,_0xae22cb=listRules();if(_0xae22cb['length']===0x0){a4_0x4e3fbc[_0x4319e8(0x1ea)](_0x4319e8(0x204));return;}a4_0x4e3fbc[_0x4319e8(0x1da)](_0x4319e8(0x1e9)),_0xae22cb['forEach']((_0x3c035f,_0x1e2bea)=>{const _0x247ee7=_0x4319e8;process['stdout'][_0x247ee7(0x1db)](_0x1e2bea+0x1+'.\x20'+_0x3c035f+'\x0a');});}),rulesCmd[a4_0x6ef9e(0x1e7)](a4_0x6ef9e(0x21a))[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x1f2))[a4_0x6ef9e(0x218)](_0x65a150=>{const _0x2f8506=a4_0x6ef9e;addRule(_0x65a150),a4_0x4e3fbc[_0x2f8506(0x203)](_0x2f8506(0x1e0)+_0x65a150);})[a4_0x6ef9e(0x218)](()=>{const _0x613470=a4_0x6ef9e;clearRules(),a4_0x4e3fbc[_0x613470(0x203)]('All\x20rules\x20cleared');});const mcpCmd=program[a4_0x6ef9e(0x1e7)]('mcp')[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x1e1));mcpCmd['command']('list')[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x20e))[a4_0x6ef9e(0x218)](()=>{const _0x5d42ac=a4_0x6ef9e,_0x2a5094=getMcpServers(),_0xc5f248=Object[_0x5d42ac(0x1dd)](_0x2a5094);if(_0xc5f248[_0x5d42ac(0x1e3)]===0x0){a4_0x4e3fbc[_0x5d42ac(0x1ea)]('No\x20MCP\x20servers\x20configured');return;}a4_0x4e3fbc['header']('MCP\x20Servers'),_0xc5f248[_0x5d42ac(0x1df)](_0x1841b0=>{const _0xba77ac=_0x5d42ac,_0x5c8248=_0x2a5094[_0x1841b0];a4_0x4e3fbc[_0xba77ac(0x1ea)]('-\x20'+_0x1841b0+':\x20'+_0x5c8248['command']+'\x20'+_0x5c8248['args'][_0xba77ac(0x212)]('\x20'));});}),mcpCmd['command'](a4_0x6ef9e(0x1fc))[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x20f))[a4_0x6ef9e(0x218)]((_0x32cbf5,_0x1833ec,_0x1dd497)=>{const _0x198951=a4_0x6ef9e;addMcpServer(_0x32cbf5,_0x1833ec,_0x1dd497),a4_0x4e3fbc['success'](_0x198951(0x207)+_0x32cbf5);}),mcpCmd[a4_0x6ef9e(0x1e7)]('remove\x20<name>')[a4_0x6ef9e(0x1ef)](a4_0x6ef9e(0x1dc))[a4_0x6ef9e(0x218)](_0x119c41=>{const _0x2d074b=a4_0x6ef9e;removeMcpServer(_0x119c41)?a4_0x4e3fbc[_0x2d074b(0x203)]('Removed\x20MCP\x20server:\x20'+_0x119c41):a4_0x4e3fbc['error'](_0x2d074b(0x1ca)+_0x119c41+_0x2d074b(0x1cf));}),program['command'](a4_0x6ef9e(0x21e))[a4_0x6ef9e(0x1ef)]('Initialize\x20Woozlit\x20in\x20current\x20directory')[a4_0x6ef9e(0x218)](()=>{const _0x363a94=a4_0x6ef9e,{createFile:_0x39cac1,listDirectory:_0xb9834b}=require('./tools/file.js'),_0xd664ec=_0xb9834b('.'),_0x2d0326=_0xd664ec[_0x363a94(0x213)]?.[_0x363a94(0x20b)](_0x51c6b5=>_0x51c6b5[_0x363a94(0x1cb)]===_0x363a94(0x215));if(_0x2d0326){a4_0x4e3fbc[_0x363a94(0x211)]('Woozlit\x20already\x20initialized\x20in\x20this\x20directory');return;}_0x39cac1('.woozlit/rules.md',_0x363a94(0x21d)),_0x39cac1(_0x363a94(0x1d8),_0x363a94(0x1ed)),a4_0x4e3fbc['success'](_0x363a94(0x1f7)),a4_0x4e3fbc[_0x363a94(0x1d9)](_0x363a94(0x209));}),program[a4_0x6ef9e(0x201)]();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0xe19ce=a5_0x5357;function a5_0x51dc(){const _0xcf01a=['height','resize','robotjs','computer_screenshot','alt','string','read','823523IaKIrd','Screenshot\x20taken.','middle','computer_type','3780FrKrNX','6UdvPaW','width','connect','base64','\x20button','key','mouseClick','Clicked\x20','Unknown\x20tool:\x20','typeString','12rHjTob','bitmap','1.0.0','582sVMDIq','computer_mouse_click','computer_key_tap','X\x20coordinate','387QkErIm','computer_screen_size','1781870GtaofV','object','number','text','toString','Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)','computer_mouse_move','Screen\x20size:\x20','shift','Type\x20a\x20string\x20of\x20text.','setRequestHandler','left','22367873rsWIIG','8CujnIl','Modifier\x20keys','with\x20','Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','6436992mqwGDv','45UAszyu','Get\x20the\x20screen\x20resolution.','join','computer-use','Tapped\x20key:\x20','Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','right','moveMouse','2200130UUnHec','getScreenSize','image/jpeg'];a5_0x51dc=function(){return _0xcf01a;};return a5_0x51dc();}(function(_0x5a9206,_0x3772cb){const _0x3a1528=a5_0x5357,_0x3cbec4=_0x5a9206();while(!![]){try{const _0x2960e7=-parseInt(_0x3a1528(0x1e0))/0x1+-parseInt(_0x3a1528(0x1f2))/0x2*(-parseInt(_0x3a1528(0x1f6))/0x3)+parseInt(_0x3a1528(0x205))/0x4*(-parseInt(_0x3a1528(0x212))/0x5)+-parseInt(_0x3a1528(0x1e5))/0x6*(-parseInt(_0x3a1528(0x1e4))/0x7)+-parseInt(_0x3a1528(0x209))/0x8+parseInt(_0x3a1528(0x20a))/0x9*(parseInt(_0x3a1528(0x1f8))/0xa)+-parseInt(_0x3a1528(0x204))/0xb*(-parseInt(_0x3a1528(0x1ef))/0xc);if(_0x2960e7===_0x3772cb)break;else _0x3cbec4['push'](_0x3cbec4['shift']());}catch(_0x40d82f){_0x3cbec4['push'](_0x3cbec4['shift']());}}}(a5_0x51dc,0x6ee72));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{CallToolRequestSchema,ListToolsRequestSchema}from'@modelcontextprotocol/sdk/types.js';import{Jimp}from'jimp';import{createRequire}from'module';const require=createRequire(import.meta.url);let robot,screenshot;try{robot=require(a5_0xe19ce(0x217));}catch(a5_0x5e4c31){}try{screenshot=require('screenshot-desktop');}catch(a5_0x409ac1){}const AUTO=-0x1,MIME_JPEG=a5_0xe19ce(0x214),server=new Server({'name':a5_0xe19ce(0x20d),'version':a5_0xe19ce(0x1f1)},{'capabilities':{'tools':{}}});server[a5_0xe19ce(0x202)](ListToolsRequestSchema,async()=>{const _0x4cb429=a5_0xe19ce;return{'tools':[{'name':'computer_screenshot','description':_0x4cb429(0x20f),'inputSchema':{'type':_0x4cb429(0x1f9),'properties':{}}},{'name':_0x4cb429(0x1fe),'description':'Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','inputSchema':{'type':_0x4cb429(0x1f9),'properties':{'x':{'type':_0x4cb429(0x1fa),'description':_0x4cb429(0x1f5)},'y':{'type':_0x4cb429(0x1fa),'description':'Y\x20coordinate'}},'required':['x','y']}},{'name':_0x4cb429(0x1f3),'description':'Click\x20the\x20mouse\x20button.','inputSchema':{'type':'object','properties':{'button':{'type':'string','enum':[_0x4cb429(0x203),_0x4cb429(0x210),_0x4cb429(0x1e2)],'default':_0x4cb429(0x203)},'double':{'type':'boolean','default':![]}}}},{'name':_0x4cb429(0x1e3),'description':_0x4cb429(0x201),'inputSchema':{'type':_0x4cb429(0x1f9),'properties':{'text':{'type':_0x4cb429(0x1de),'description':'Text\x20to\x20type'}},'required':['text']}},{'name':_0x4cb429(0x1f4),'description':_0x4cb429(0x208),'inputSchema':{'type':_0x4cb429(0x1f9),'properties':{'key':{'type':_0x4cb429(0x1de),'description':_0x4cb429(0x1fd)},'modifiers':{'type':'array','items':{'type':_0x4cb429(0x1de),'enum':[_0x4cb429(0x1dd),'command','control',_0x4cb429(0x200)]},'description':_0x4cb429(0x206)}},'required':[_0x4cb429(0x1ea)]}},{'name':_0x4cb429(0x1f7),'description':_0x4cb429(0x20b),'inputSchema':{'type':_0x4cb429(0x1f9),'properties':{}}}]};}),server[a5_0xe19ce(0x202)](CallToolRequestSchema,async _0x84a871=>{const _0xb21cc9=a5_0xe19ce,{name:_0x12f23a,arguments:_0x34e501}=_0x84a871['params'];try{if(_0x12f23a===_0xb21cc9(0x218)){const _0x39e832=await screenshot(),_0x29e87=await Jimp[_0xb21cc9(0x1df)](_0x39e832);_0x29e87[_0xb21cc9(0x1f0)][_0xb21cc9(0x1e6)]>0x400&&_0x29e87[_0xb21cc9(0x216)]({'w':0x400});const _0x10343e=await _0x29e87['getBuffer'](MIME_JPEG),_0x2bfcd3=_0x10343e[_0xb21cc9(0x1fc)](_0xb21cc9(0x1e8));return{'content':[{'type':_0xb21cc9(0x1fb),'text':_0xb21cc9(0x1e1)},{'type':'image','data':_0x2bfcd3,'mimeType':'image/jpeg'}]};}if(_0x12f23a===_0xb21cc9(0x1fe)){const {x:_0x235e7b,y:_0x5e885a}=_0x34e501;return robot[_0xb21cc9(0x211)](_0x235e7b,_0x5e885a),{'content':[{'type':_0xb21cc9(0x1fb),'text':'Moved\x20mouse\x20to\x20'+_0x235e7b+',\x20'+_0x5e885a}]};}if(_0x12f23a==='computer_mouse_click'){const {button:button=_0xb21cc9(0x203),double:double=![]}=_0x34e501;return robot[_0xb21cc9(0x1eb)](button,double),{'content':[{'type':_0xb21cc9(0x1fb),'text':_0xb21cc9(0x1ec)+button+_0xb21cc9(0x1e9)+(double?'\x20(double)':'')}]};}if(_0x12f23a===_0xb21cc9(0x1e3)){const {text:_0x4a7c02}=_0x34e501;return robot[_0xb21cc9(0x1ee)](_0x4a7c02),{'content':[{'type':_0xb21cc9(0x1fb),'text':'Typed:\x20\x22'+_0x4a7c02+'\x22'}]};}if(_0x12f23a==='computer_key_tap'){const {key:_0xb4e648,modifiers:_0x102ea0}=_0x34e501;return robot['keyTap'](_0xb4e648,_0x102ea0),{'content':[{'type':_0xb21cc9(0x1fb),'text':_0xb21cc9(0x20e)+_0xb4e648+'\x20'+(_0x102ea0?_0xb21cc9(0x207)+_0x102ea0[_0xb21cc9(0x20c)]('+'):'')}]};}if(_0x12f23a==='computer_screen_size'){const _0x3a668f=robot[_0xb21cc9(0x213)]();return{'content':[{'type':_0xb21cc9(0x1fb),'text':_0xb21cc9(0x1ff)+_0x3a668f['width']+'x'+_0x3a668f[_0xb21cc9(0x215)]}]};}throw new Error(_0xb21cc9(0x1ed)+_0x12f23a);}catch(_0x5dae53){return{'content':[{'type':_0xb21cc9(0x1fb),'text':'Error:\x20'+_0x5dae53}],'isError':!![]};}});function a5_0x5357(_0x4f3fff,_0x39fad5){_0x4f3fff=_0x4f3fff-0x1dd;const _0x51dcf8=a5_0x51dc();let _0x535725=_0x51dcf8[_0x4f3fff];return _0x535725;}const transport=new StdioServerTransport();await server[a5_0xe19ce(0x1e7)](transport);
|
package/dist/tools/command.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a6_0x7cd7(_0xe07467,_0x58961e){_0xe07467=_0xe07467-0x185;const _0x458b63=a6_0x458b();let _0x7cd721=_0x458b63[_0xe07467];return _0x7cd721;}function a6_0x458b(){const _0x259409=['33572tpApzF','platform','9RouoaN','toString','stderr','env','ms...]','win32','6062322QPfqnY','stdout','close','cwd','error','removeAllListeners','330589QjoTKa','1374fQcBnj','data','cmd.exe','750462jmDTTr','10002392lxwtvo','pipe','/bin/sh','2819668HdBvVx','unref','16625JazQRc'];a6_0x458b=function(){return _0x259409;};return a6_0x458b();}(function(_0x3d8ff9,_0x5c1e6d){const _0x14536f=a6_0x7cd7,_0x86b79c=_0x3d8ff9();while(!![]){try{const _0x2031b8=-parseInt(_0x14536f(0x188))/0x1+parseInt(_0x14536f(0x193))/0x2+-parseInt(_0x14536f(0x18c))/0x3+parseInt(_0x14536f(0x190))/0x4+parseInt(_0x14536f(0x192))/0x5*(parseInt(_0x14536f(0x189))/0x6)+parseInt(_0x14536f(0x19b))/0x7+parseInt(_0x14536f(0x18d))/0x8*(-parseInt(_0x14536f(0x195))/0x9);if(_0x2031b8===_0x5c1e6d)break;else _0x86b79c['push'](_0x86b79c['shift']());}catch(_0x3ef47e){_0x86b79c['push'](_0x86b79c['shift']());}}}(a6_0x458b,0x7e7f4));import{spawn}from'child_process';export async function runCommand(_0x5c7d2b,_0xa26642,_0x3e3ccc=![],_0x4fc9d0=0xbb8){return new Promise(_0x11906c=>{const _0x459c1c=a6_0x7cd7,_0x4a4495=process[_0x459c1c(0x194)]===_0x459c1c(0x19a),_0xcb54d8=_0x4a4495?_0x459c1c(0x18b):_0x459c1c(0x18f),_0x15bda9=_0x4a4495?'/c':'-c',_0x134ed7=spawn(_0xcb54d8,[_0x15bda9,_0x5c7d2b],{'cwd':process[_0x459c1c(0x185)](),'env':process[_0x459c1c(0x198)],'detached':_0x3e3ccc,'stdio':_0x459c1c(0x18e)});let _0x59523f='',_0x5406bb='',_0x198048=![];_0x3e3ccc&&setTimeout(()=>{const _0x1ff17d=_0x459c1c;if(!_0x198048){_0x198048=!![];if(_0x134ed7[_0x1ff17d(0x191)])_0x134ed7[_0x1ff17d(0x191)]();_0x134ed7[_0x1ff17d(0x19c)]?.[_0x1ff17d(0x187)](_0x1ff17d(0x18a)),_0x134ed7['stderr']?.[_0x1ff17d(0x187)](_0x1ff17d(0x18a)),_0x11906c({'success':!![],'stdout':_0x59523f+('\x0a[Woozlit:\x20Command\x20continuing\x20in\x20background\x20after\x20'+_0x4fc9d0+_0x1ff17d(0x199)),'stderr':_0x5406bb,'exitCode':0x0});}},_0x4fc9d0),_0x134ed7[_0x459c1c(0x19c)]?.['on']('data',_0x4a5838=>{const _0x987019=_0x459c1c;if(_0x198048)return;const _0x482da3=_0x4a5838[_0x987019(0x196)]();_0x59523f+=_0x482da3;if(_0xa26642)_0xa26642(_0x482da3);}),_0x134ed7[_0x459c1c(0x197)]?.['on'](_0x459c1c(0x18a),_0x4615e5=>{if(_0x198048)return;const _0x3f85f8=_0x4615e5['toString']();_0x5406bb+=_0x3f85f8;if(_0xa26642)_0xa26642(_0x3f85f8);}),_0x134ed7['on'](_0x459c1c(0x19d),_0x3277c0=>{!_0x198048&&(_0x198048=!![],_0x11906c({'success':_0x3277c0===0x0,'stdout':_0x59523f,'stderr':_0x5406bb,'exitCode':_0x3277c0||0x0}));}),_0x134ed7['on'](_0x459c1c(0x186),_0x3bf42f=>{!_0x198048&&(_0x198048=!![],_0x11906c({'success':![],'stdout':_0x59523f,'stderr':_0x3bf42f['message'],'exitCode':0x1}));});});}
|
package/dist/tools/file.d.ts
CHANGED
|
@@ -26,4 +26,18 @@ export declare function searchFile(filePath: string, pattern: string): {
|
|
|
26
26
|
matches?: string[];
|
|
27
27
|
message: string;
|
|
28
28
|
};
|
|
29
|
+
export declare function findFiles(dirPath: string, pattern: string): {
|
|
30
|
+
success: boolean;
|
|
31
|
+
files?: string[];
|
|
32
|
+
message: string;
|
|
33
|
+
};
|
|
34
|
+
export declare function searchDirectory(dirPath: string, pattern: string): {
|
|
35
|
+
success: boolean;
|
|
36
|
+
results?: {
|
|
37
|
+
file: string;
|
|
38
|
+
line: number;
|
|
39
|
+
content: string;
|
|
40
|
+
}[];
|
|
41
|
+
message: string;
|
|
42
|
+
};
|
|
29
43
|
export {};
|
package/dist/tools/file.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5454fb,_0x582f8a){const _0x244f63=a7_0x4642,_0x1657ff=_0x5454fb();while(!![]){try{const _0xbc4a1=parseInt(_0x244f63(0x20b))/0x1*(-parseInt(_0x244f63(0x211))/0x2)+-parseInt(_0x244f63(0x1f1))/0x3*(parseInt(_0x244f63(0x1f6))/0x4)+-parseInt(_0x244f63(0x204))/0x5*(-parseInt(_0x244f63(0x1ea))/0x6)+parseInt(_0x244f63(0x212))/0x7*(parseInt(_0x244f63(0x20d))/0x8)+parseInt(_0x244f63(0x1e4))/0x9+parseInt(_0x244f63(0x201))/0xa*(parseInt(_0x244f63(0x1f7))/0xb)+-parseInt(_0x244f63(0x21a))/0xc;if(_0xbc4a1===_0x582f8a)break;else _0x1657ff['push'](_0x1657ff['shift']());}catch(_0x21c00f){_0x1657ff['push'](_0x1657ff['shift']());}}}(a7_0x574b,0x7da26));function a7_0x4642(_0x238c0f,_0x377a5a){_0x238c0f=_0x238c0f-0x1e4;const _0x574bfe=a7_0x574b();let _0x464202=_0x574bfe[_0x238c0f];return _0x464202;}import{readFileSync,writeFileSync,existsSync,readdirSync,statSync,mkdirSync}from'fs';import{dirname,resolve,relative}from'path';import{trackFileCreate,trackFileModify}from'./rollback.js';export function createFile(_0x3c95b1,_0x777af5){const _0x1b045f=a7_0x4642;try{const _0x1b5564=resolve(process[_0x1b045f(0x1f3)](),_0x3c95b1),_0x57e39a=dirname(_0x1b5564);return!existsSync(_0x57e39a)&&mkdirSync(_0x57e39a,{'recursive':!![]}),writeFileSync(_0x1b5564,_0x777af5,'utf-8'),trackFileCreate(_0x1b5564),{'success':!![],'message':'Created\x20'+_0x3c95b1};}catch(_0x11f960){return{'success':![],'message':_0x1b045f(0x209)+_0x3c95b1+':\x20'+_0x11f960};}}export function readFile(_0x18920b){const _0x472e3f=a7_0x4642;try{const _0x5738b8=resolve(process[_0x472e3f(0x1f3)](),_0x18920b);if(!existsSync(_0x5738b8))return{'success':![],'message':_0x472e3f(0x219)+_0x18920b};const _0x1dc6d1=[_0x472e3f(0x1ee),_0x472e3f(0x1fe),_0x472e3f(0x21c),'.gif','.exe','.dll',_0x472e3f(0x1f5)],_0x48b815=_0x5738b8['split']('.')[_0x472e3f(0x1fb)]()?.[_0x472e3f(0x1ec)]();if(_0x48b815&&_0x1dc6d1['includes']('.'+_0x48b815))return{'success':![],'message':'[Binary\x20file\x20detected\x20(.'+_0x48b815+_0x472e3f(0x217)};const _0x26e640=readFileSync(_0x5738b8,_0x472e3f(0x200));return{'success':!![],'content':_0x26e640,'message':_0x472e3f(0x1eb)+_0x18920b};}catch(_0x25984b){return{'success':![],'message':_0x472e3f(0x20e)+_0x18920b+':\x20'+_0x25984b};}}export function listDirectory(_0xdcffdd='.'){const _0x277890=a7_0x4642;try{const _0x578beb=resolve(process[_0x277890(0x1f3)](),_0xdcffdd);if(!existsSync(_0x578beb))return{'success':![],'message':'Directory\x20not\x20found:\x20'+_0xdcffdd};const _0xccca9=readdirSync(_0x578beb),_0x1531f0=_0xccca9['map'](_0x5b4c9c=>{const _0x5783b3=_0x277890,_0x480ea6=resolve(_0x578beb,_0x5b4c9c),_0x333aee=statSync(_0x480ea6);return{'name':_0x5b4c9c,'type':_0x333aee[_0x5783b3(0x213)]()?_0x5783b3(0x1ff):_0x5783b3(0x205),'size':_0x333aee['isFile']()?_0x333aee['size']:undefined};});return{'success':!![],'entries':_0x1531f0,'message':_0x277890(0x208)+_0x1531f0[_0x277890(0x21f)]+'\x20items\x20in\x20'+_0xdcffdd};}catch(_0xdceac){return{'success':![],'message':_0x277890(0x1f4)+_0xdcffdd+':\x20'+_0xdceac};}}export function editFile(_0x2437c4,_0x188749,_0x2ca55c){const _0x200695=a7_0x4642;try{const _0x1e3aef=resolve(process[_0x200695(0x1f3)](),_0x2437c4);if(!existsSync(_0x1e3aef))return{'success':![],'message':_0x200695(0x219)+_0x2437c4};const _0x370bf6=readFileSync(_0x1e3aef,_0x200695(0x200));if(!_0x370bf6[_0x200695(0x20f)](_0x188749))return{'success':![],'message':'Search\x20string\x20not\x20found\x20in\x20'+_0x2437c4};trackFileModify(_0x1e3aef,_0x370bf6);const _0xfe1a=_0x370bf6[_0x200695(0x1ef)](_0x188749,_0x2ca55c);return writeFileSync(_0x1e3aef,_0xfe1a,_0x200695(0x200)),{'success':!![],'message':_0x200695(0x207)+_0x2437c4};}catch(_0xae8624){return{'success':![],'message':'Failed\x20to\x20edit\x20'+_0x2437c4+':\x20'+_0xae8624};}}export function searchFile(_0x2122f1,_0x3de722){const _0x5a501f=a7_0x4642;try{const _0x5ce16b=resolve(process[_0x5a501f(0x1f3)](),_0x2122f1);if(!existsSync(_0x5ce16b))return{'success':![],'message':_0x5a501f(0x219)+_0x2122f1};const _0x3b809d=readFileSync(_0x5ce16b,_0x5a501f(0x200)),_0x1a7375=new RegExp(_0x3de722,'g'),_0x1f3bfb=_0x3b809d[_0x5a501f(0x1e5)](_0x1a7375)||[],_0xbfc623=_0x3b809d[_0x5a501f(0x216)]('\x0a'),_0x2b6f44=_0xbfc623[_0x5a501f(0x1fa)]((_0x3c04e9,_0x565b19)=>new RegExp(_0x3de722)[_0x5a501f(0x21e)](_0x3c04e9));return{'success':!![],'matches':_0x2b6f44,'message':_0x5a501f(0x202)+_0x2b6f44[_0x5a501f(0x21f)]+'\x20output\x20matches\x20in\x20'+_0x2122f1};}catch(_0x1296c9){return{'success':![],'message':'Failed\x20to\x20search\x20'+_0x2122f1+':\x20'+_0x1296c9};}}export function findFiles(_0x1fa870,_0x384f7e){const _0x54008a=a7_0x4642;try{const _0x250d4e=resolve(process[_0x54008a(0x1f3)](),_0x1fa870);if(!existsSync(_0x250d4e))return{'success':![],'message':_0x54008a(0x20a)+_0x1fa870};const _0x171523=[],_0x2a8ab0=new RegExp(_0x384f7e,'i');function _0x4962c5(_0x3746d5){const _0x237503=_0x54008a,_0x1bd1bf=readdirSync(_0x3746d5);for(const _0xd5acf0 of _0x1bd1bf){if(_0xd5acf0[_0x237503(0x1f2)]('.')||_0xd5acf0===_0x237503(0x218))continue;const _0x8fa92d=resolve(_0x3746d5,_0xd5acf0),_0x411c78=statSync(_0x8fa92d);if(_0x411c78[_0x237503(0x213)]())_0x4962c5(_0x8fa92d);else _0x2a8ab0[_0x237503(0x21e)](_0xd5acf0)&&_0x171523[_0x237503(0x214)](relative(_0x250d4e,_0x8fa92d));}}return _0x4962c5(_0x250d4e),{'success':!![],'files':_0x171523[_0x54008a(0x21d)](0x0,0x32),'message':_0x54008a(0x202)+_0x171523[_0x54008a(0x21f)]+_0x54008a(0x1f9)+_0x384f7e+'\x22'};}catch(_0x15399e){return{'success':![],'message':_0x54008a(0x210)+_0x15399e};}}function a7_0x574b(){const _0x2da6f2=['.jsx','905xLnGnD','file','trim','Edited\x20','Listed\x20','Failed\x20to\x20create\x20','Directory\x20not\x20found:\x20','1FMNrQi','\x20matches\x20for\x20\x22','56bPQzTe','Failed\x20to\x20read\x20','includes','Failed\x20to\x20find\x20files:\x20','1530246AxOSbQ','372722MdWBUj','isDirectory','push','.json','split',').\x20Use\x20\x27computer_screenshot\x27\x20or\x20specific\x20tools\x20to\x20handle\x20this\x20file\x20type.\x20Direct\x20reading\x20is\x20not\x20supported.]','node_modules','File\x20not\x20found:\x20','1400976WiabMs','.ts','.jpeg','slice','test','length','7177230XrlNoZ','match','.js','Failed\x20to\x20search\x20directory:\x20','substring','.html','18534GLYrsI','Read\x20','toLowerCase','.txt','.png','replace','.css','3UFdtgK','startsWith','cwd','Failed\x20to\x20list\x20','.bin','2232668DaXVGJ','45067UgHukZ','.py','\x20files\x20matching\x20\x22','filter','pop','.tsx','.go','.jpg','directory','utf-8','550fndqnT','Found\x20'];a7_0x574b=function(){return _0x2da6f2;};return a7_0x574b();}export function searchDirectory(_0x386fcc,_0x3cd37e){const _0x32584f=a7_0x4642;try{const _0x217e6f=resolve(process[_0x32584f(0x1f3)](),_0x386fcc);if(!existsSync(_0x217e6f))return{'success':![],'message':_0x32584f(0x20a)+_0x386fcc};const _0x5c2fff=[],_0x567d2c=new RegExp(_0x3cd37e,'i'),_0x259c9d=[_0x32584f(0x21b),_0x32584f(0x1e6),_0x32584f(0x1fc),_0x32584f(0x203),_0x32584f(0x215),'.md',_0x32584f(0x1ed),_0x32584f(0x1f0),_0x32584f(0x1e9),_0x32584f(0x1f8),_0x32584f(0x1fd),'.rs'];function _0x3809a3(_0x251b52){const _0x4c2a69=_0x32584f,_0x2c8233=readdirSync(_0x251b52);for(const _0xa86e of _0x2c8233){if(_0xa86e['startsWith']('.')||_0xa86e==='node_modules')continue;const _0x32b255=resolve(_0x251b52,_0xa86e),_0x5c4747=statSync(_0x32b255);if(_0x5c4747['isDirectory']())_0x3809a3(_0x32b255);else{const _0x121a9e='.'+_0xa86e[_0x4c2a69(0x216)]('.')[_0x4c2a69(0x1fb)]()?.[_0x4c2a69(0x1ec)]();if(_0x259c9d[_0x4c2a69(0x20f)](_0x121a9e))try{const _0x2788b9=readFileSync(_0x32b255,_0x4c2a69(0x200)),_0x4d48ea=_0x2788b9[_0x4c2a69(0x216)]('\x0a');_0x4d48ea['forEach']((_0xdea4de,_0x6fe499)=>{const _0x1715f9=_0x4c2a69;_0x567d2c[_0x1715f9(0x21e)](_0xdea4de)&&_0x5c2fff[_0x1715f9(0x214)]({'file':relative(_0x217e6f,_0x32b255),'line':_0x6fe499+0x1,'content':_0xdea4de[_0x1715f9(0x206)]()[_0x1715f9(0x1e8)](0x0,0x64)});});}catch{}}}}return _0x3809a3(_0x217e6f),{'success':!![],'results':_0x5c2fff['slice'](0x0,0x1e),'message':'Found\x20'+_0x5c2fff[_0x32584f(0x21f)]+_0x32584f(0x20c)+_0x3cd37e+'\x22'};}catch(_0x3b4e65){return{'success':![],'message':_0x32584f(0x1e7)+_0x3b4e65};}}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { createFile, readFile, listDirectory, editFile, searchFile } from "./file.js";
|
|
1
|
+
export { createFile, readFile, listDirectory, editFile, searchFile, findFiles, searchDirectory } from "./file.js";
|
|
2
2
|
export { runCommand } from "./command.js";
|
|
3
3
|
export { listRules, addRule, clearRules, formatRulesForSystem } from "./rules.js";
|
|
4
4
|
export { connectToMcpServers, getMcpTools, executeMcpTool, closeMcpClients, type McpTool } from "./mcp.js";
|
|
5
|
+
export { trackFileCreate, trackFileModify, rollbackLast, rollbackAll, getChanges, clearChanges } from "./rollback.js";
|
package/dist/tools/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1361e5,_0x509b39){var _0x1f4da3=a8_0x5cbf,_0x25c63e=_0x1361e5();while(!![]){try{var _0xf0995c=-parseInt(_0x1f4da3(0x120))/0x1*(parseInt(_0x1f4da3(0x126))/0x2)+parseInt(_0x1f4da3(0x121))/0x3+parseInt(_0x1f4da3(0x123))/0x4*(-parseInt(_0x1f4da3(0x124))/0x5)+parseInt(_0x1f4da3(0x127))/0x6+parseInt(_0x1f4da3(0x128))/0x7+-parseInt(_0x1f4da3(0x122))/0x8+parseInt(_0x1f4da3(0x125))/0x9;if(_0xf0995c===_0x509b39)break;else _0x25c63e['push'](_0x25c63e['shift']());}catch(_0x4caee8){_0x25c63e['push'](_0x25c63e['shift']());}}}(a8_0x3e4d,0x2aaf5));export{createFile,readFile,listDirectory,editFile,searchFile,findFiles,searchDirectory}from'./file.js';export{runCommand}from'./command.js';function a8_0x5cbf(_0x451981,_0x33dffe){_0x451981=_0x451981-0x120;var _0x3e4d52=a8_0x3e4d();var _0x5cbf2a=_0x3e4d52[_0x451981];return _0x5cbf2a;}export{listRules,addRule,clearRules,formatRulesForSystem}from'./rules.js';export{connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'./mcp.js';export{trackFileCreate,trackFileModify,rollbackLast,rollbackAll,getChanges,clearChanges}from'./rollback.js';function a8_0x3e4d(){var _0x272aa0=['114XHBtdg','74460rbvpxE','1305878rGvrdV','4973CdKDTC','65499EDDIEd','1567136bCGCTt','12qDxwkn','508635xcFfrm','6647166vdoYNt'];a8_0x3e4d=function(){return _0x272aa0;};return a8_0x3e4d();}
|
package/dist/tools/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53ef69,_0x5d8b27){const _0x5132c6=a9_0x2fc8,_0x2e67f1=_0x53ef69();while(!![]){try{const _0x29a3bd=-parseInt(_0x5132c6(0x178))/0x1*(-parseInt(_0x5132c6(0x17b))/0x2)+parseInt(_0x5132c6(0x177))/0x3+parseInt(_0x5132c6(0x16a))/0x4+-parseInt(_0x5132c6(0x167))/0x5*(parseInt(_0x5132c6(0x163))/0x6)+parseInt(_0x5132c6(0x16c))/0x7*(parseInt(_0x5132c6(0x168))/0x8)+-parseInt(_0x5132c6(0x171))/0x9+parseInt(_0x5132c6(0x165))/0xa;if(_0x29a3bd===_0x5d8b27)break;else _0x2e67f1['push'](_0x2e67f1['shift']());}catch(_0x22f38f){_0x2e67f1['push'](_0x2e67f1['shift']());}}}(a9_0x5a9f,0x945dd));import{Client}from'@modelcontextprotocol/sdk/client/index.js';import{StdioClientTransport}from'@modelcontextprotocol/sdk/client/stdio.js';import{getMcpServers}from'../config/mcp.js';import*as a9_0x488697 from'../ui/output.js';function a9_0x2fc8(_0x206d26,_0x4ab9f3){_0x206d26=_0x206d26-0x162;const _0x5a9fce=a9_0x5a9f();let _0x2fc8df=_0x5a9fce[_0x206d26];return _0x2fc8df;}const clients=new Map();export async function connectToMcpServers(){const _0x1df926=a9_0x2fc8,_0x237afd=getMcpServers(),_0x1ab50f=Object['keys'](_0x237afd);if(_0x1ab50f['length']===0x0)return;a9_0x488697['info'](_0x1df926(0x16e));for(const _0x2e827a of _0x1ab50f){if(clients[_0x1df926(0x17d)](_0x2e827a))continue;const _0x4cde1f=_0x237afd[_0x2e827a];try{const _0x194a35={...process['env'],..._0x4cde1f[_0x1df926(0x183)]};Object[_0x1df926(0x182)](_0x194a35)[_0x1df926(0x169)](_0x24c6ce=>_0x194a35[_0x24c6ce]===undefined&&delete _0x194a35[_0x24c6ce]);const _0x90539b=new StdioClientTransport({'command':_0x4cde1f[_0x1df926(0x180)],'args':_0x4cde1f[_0x1df926(0x162)],'env':_0x194a35,'stderr':_0x1df926(0x179)}),_0x336ae1=new Client({'name':'woozlit-cli','version':_0x1df926(0x16d)},{'capabilities':{}});await _0x336ae1[_0x1df926(0x173)](_0x90539b),clients[_0x1df926(0x176)](_0x2e827a,_0x336ae1);}catch(_0x1aac80){a9_0x488697[_0x1df926(0x17f)]('Failed\x20to\x20connect\x20to\x20MCP\x20server\x20\x27'+_0x2e827a+_0x1df926(0x172)+_0x1aac80);}}}export async function getMcpTools(){const _0x2a0e5b=a9_0x2fc8,_0x2e938c=[];for(const [_0x5d272b,_0x533538]of clients[_0x2a0e5b(0x16b)]()){try{const _0x309a21=await _0x533538['listTools'](),_0x284039=_0x309a21[_0x2a0e5b(0x166)][_0x2a0e5b(0x170)](_0x2ec452=>({'name':_0x2ec452[_0x2a0e5b(0x181)],'description':_0x2ec452[_0x2a0e5b(0x17c)],'inputSchema':_0x2ec452[_0x2a0e5b(0x164)],'serverName':_0x5d272b}));_0x2e938c['push'](..._0x284039);}catch(_0x169434){a9_0x488697[_0x2a0e5b(0x17f)](_0x2a0e5b(0x175)+_0x5d272b+_0x2a0e5b(0x172)+_0x169434);}}return _0x2e938c;}export async function executeMcpTool(_0x58a711,_0x4c78cb,_0x18ecb7){const _0x5dadfd=a9_0x2fc8,_0x498e9d=clients['get'](_0x58a711);if(!_0x498e9d)throw new Error('MCP\x20server\x20\x27'+_0x58a711+'\x27\x20not\x20connected');try{const _0xc93678=await _0x498e9d[_0x5dadfd(0x174)]({'name':_0x4c78cb,'arguments':_0x18ecb7});return _0xc93678;}catch(_0x1e7b72){throw new Error(_0x5dadfd(0x17e)+_0x1e7b72);}}function a9_0x5a9f(){const _0x422b78=['1488644UbMkDT','entries','42aBaixh','1.0.0','Connecting\x20to\x20MCP\x20servers...','clear','map','7111656LdYXIb','\x27:\x20','connect','callTool','Failed\x20to\x20list\x20tools\x20for\x20\x27','set','1970328mCbzZG','11821UMjtmT','pipe','close','30HVMfad','description','has','MCP\x20tool\x20execution\x20failed:\x20','error','command','name','keys','env','args','3689850NGvMXI','inputSchema','6051540cFZqEo','tools','5DydNkQ','268616FzPywQ','forEach'];a9_0x5a9f=function(){return _0x422b78;};return a9_0x5a9f();}export function closeMcpClients(){const _0x77dd25=a9_0x2fc8;for(const _0x44876e of clients['values']()){try{_0x44876e[_0x77dd25(0x17a)]();}catch(_0x4d6456){}}clients[_0x77dd25(0x16f)]();}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface FileChange {
|
|
2
|
+
path: string;
|
|
3
|
+
type: "create" | "modify" | "delete";
|
|
4
|
+
previousContent: string | null;
|
|
5
|
+
timestamp: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function trackFileCreate(filePath: string): void;
|
|
8
|
+
export declare function trackFileModify(filePath: string, previousContent: string): void;
|
|
9
|
+
export declare function trackFileDelete(filePath: string, previousContent: string): void;
|
|
10
|
+
export declare function getChanges(): FileChange[];
|
|
11
|
+
export declare function rollbackLast(): {
|
|
12
|
+
success: boolean;
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function rollbackAll(): {
|
|
16
|
+
success: boolean;
|
|
17
|
+
count: number;
|
|
18
|
+
messages: string[];
|
|
19
|
+
};
|
|
20
|
+
export declare function clearChanges(): void;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x173cc2,_0x20aca3){const _0x15c28d=a10_0x22ce,_0x2def40=_0x173cc2();while(!![]){try{const _0x3fdcc4=-parseInt(_0x15c28d(0x17a))/0x1+-parseInt(_0x15c28d(0x18a))/0x2+parseInt(_0x15c28d(0x181))/0x3+-parseInt(_0x15c28d(0x18d))/0x4*(-parseInt(_0x15c28d(0x186))/0x5)+-parseInt(_0x15c28d(0x191))/0x6+-parseInt(_0x15c28d(0x184))/0x7*(parseInt(_0x15c28d(0x182))/0x8)+parseInt(_0x15c28d(0x189))/0x9;if(_0x3fdcc4===_0x20aca3)break;else _0x2def40['push'](_0x2def40['shift']());}catch(_0x1114ff){_0x2def40['push'](_0x2def40['shift']());}}}(a10_0x27af,0xed5b5));import*as a10_0x44b59b from'fs';import*as a10_0x37cb12 from'path';const changes=[];function a10_0x27af(){const _0x566e5f=['8149915QAuZtB','writeFileSync','resolve','14140089txTgDU','2189236nxBSlH','delete','unlinkSync','4UpEvgK','path','create','pop','6383340FRLOiu','push','No\x20changes\x20to\x20rollback','Deleted:\x20','Unknown\x20change\x20type','type','745438YcwLBs','Restored:\x20','now','previousContent','message','Rollback\x20failed:\x20','existsSync','5150772esyJHo','8KspZrP','modify','7293083hFhBxZ','length'];a10_0x27af=function(){return _0x566e5f;};return a10_0x27af();}export function trackFileCreate(_0x7157b6){const _0x3f7364=a10_0x22ce;changes[_0x3f7364(0x192)]({'path':a10_0x37cb12[_0x3f7364(0x188)](_0x7157b6),'type':_0x3f7364(0x18f),'previousContent':null,'timestamp':Date['now']()});}export function trackFileModify(_0x528d36,_0x46ac7c){const _0x1bd958=a10_0x22ce;changes[_0x1bd958(0x192)]({'path':a10_0x37cb12[_0x1bd958(0x188)](_0x528d36),'type':_0x1bd958(0x183),'previousContent':_0x46ac7c,'timestamp':Date[_0x1bd958(0x17c)]()});}export function trackFileDelete(_0x18f156,_0x587895){const _0x48e16a=a10_0x22ce;changes[_0x48e16a(0x192)]({'path':a10_0x37cb12[_0x48e16a(0x188)](_0x18f156),'type':_0x48e16a(0x18b),'previousContent':_0x587895,'timestamp':Date[_0x48e16a(0x17c)]()});}function a10_0x22ce(_0x322c72,_0x5004d9){_0x322c72=_0x322c72-0x179;const _0x27af1e=a10_0x27af();let _0x22ce9f=_0x27af1e[_0x322c72];return _0x22ce9f;}export function getChanges(){return[...changes];}export function rollbackLast(){const _0xb64e00=a10_0x22ce;if(changes[_0xb64e00(0x185)]===0x0)return{'success':![],'message':_0xb64e00(0x193)};const _0x3f1550=changes[_0xb64e00(0x190)]();try{switch(_0x3f1550[_0xb64e00(0x179)]){case _0xb64e00(0x18f):a10_0x44b59b[_0xb64e00(0x180)](_0x3f1550[_0xb64e00(0x18e)])&&a10_0x44b59b[_0xb64e00(0x18c)](_0x3f1550[_0xb64e00(0x18e)]);return{'success':!![],'message':_0xb64e00(0x194)+_0x3f1550[_0xb64e00(0x18e)]};case'modify':_0x3f1550[_0xb64e00(0x17d)]!==null&&a10_0x44b59b['writeFileSync'](_0x3f1550['path'],_0x3f1550[_0xb64e00(0x17d)]);return{'success':!![],'message':_0xb64e00(0x17b)+_0x3f1550['path']};case _0xb64e00(0x18b):_0x3f1550[_0xb64e00(0x17d)]!==null&&a10_0x44b59b[_0xb64e00(0x187)](_0x3f1550[_0xb64e00(0x18e)],_0x3f1550[_0xb64e00(0x17d)]);return{'success':!![],'message':'Restored:\x20'+_0x3f1550[_0xb64e00(0x18e)]};default:return{'success':![],'message':_0xb64e00(0x195)};}}catch(_0x27107d){return{'success':![],'message':_0xb64e00(0x17f)+_0x27107d};}}export function rollbackAll(){const _0x3f4733=a10_0x22ce,_0x5d5faf=[];let _0x4993cd=0x0;while(changes[_0x3f4733(0x185)]>0x0){const _0xbef50d=rollbackLast();_0xbef50d['success']&&(_0x4993cd++,_0x5d5faf[_0x3f4733(0x192)](_0xbef50d[_0x3f4733(0x17e)]));}return{'success':_0x4993cd>0x0,'count':_0x4993cd,'messages':_0x5d5faf};}export function clearChanges(){const _0x5e633c=a10_0x22ce;changes[_0x5e633c(0x185)]=0x0;}
|
package/dist/tools/rules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5acb76,_0x374226){const _0x5d5ac4=a11_0x3ae6,_0x109566=_0x5acb76();while(!![]){try{const _0x489503=-parseInt(_0x5d5ac4(0x1f0))/0x1*(-parseInt(_0x5d5ac4(0x1f1))/0x2)+-parseInt(_0x5d5ac4(0x1ec))/0x3+-parseInt(_0x5d5ac4(0x1ed))/0x4+parseInt(_0x5d5ac4(0x1f7))/0x5+parseInt(_0x5d5ac4(0x1ef))/0x6*(-parseInt(_0x5d5ac4(0x1ee))/0x7)+-parseInt(_0x5d5ac4(0x1f5))/0x8+parseInt(_0x5d5ac4(0x1f6))/0x9;if(_0x489503===_0x374226)break;else _0x109566['push'](_0x109566['shift']());}catch(_0x3c0c33){_0x109566['push'](_0x109566['shift']());}}}(a11_0x1e31,0xf4029));function a11_0x1e31(){const _0xc1e31b=['map','join','9998880agnBEy','14095431QxlUoo','6320260zBuREx','103383XmYBEy','4919452LcHDtf','382207sTGZik','18vdjWqi','1dxerAf','1694482jTLEEk','\x0a\x0aUser-defined\x20rules:\x0a'];a11_0x1e31=function(){return _0xc1e31b;};return a11_0x1e31();}function a11_0x3ae6(_0x546812,_0x3c6506){_0x546812=_0x546812-0x1ec;const _0x1e31db=a11_0x1e31();let _0x3ae6cf=_0x1e31db[_0x546812];return _0x3ae6cf;}import{getRules,addRule as a11_0x53c9f9,clearRules as a11_0x1a52bd}from'../utils/storage.js';export function listRules(){return getRules();}export function addRule(_0x2d6244){a11_0x53c9f9(_0x2d6244);}export function clearRules(){a11_0x1a52bd();}export function formatRulesForSystem(){const _0x1f5fc3=a11_0x3ae6,_0x15e948=getRules();if(_0x15e948['length']===0x0)return'';return _0x1f5fc3(0x1f2)+_0x15e948[_0x1f5fc3(0x1f3)]((_0x43d351,_0x36f0fa)=>_0x36f0fa+0x1+'.\x20'+_0x43d351)[_0x1f5fc3(0x1f4)]('\x0a');}
|
package/dist/ui/output.d.ts
CHANGED
|
@@ -21,3 +21,6 @@ export declare function actionSpinner(text: string): Ora;
|
|
|
21
21
|
export declare function toolActivity(name: string, args: Record<string, unknown>): void;
|
|
22
22
|
export declare function commandOutput(output: string): void;
|
|
23
23
|
export declare function usageBox(used: number, limit: number, isOverLimit: boolean): void;
|
|
24
|
+
export declare function mcpConnected(serverCount: number, toolCount: number): void;
|
|
25
|
+
export declare function elapsedTime(seconds: number): void;
|
|
26
|
+
export declare function currentDir(dir: string): void;
|
package/dist/ui/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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();}
|
|
1
|
+
const a12_0x264bd1=a12_0x112f;(function(_0x11d06b,_0x35d062){const _0x1c791f=a12_0x112f,_0x4e1571=_0x11d06b();while(!![]){try{const _0x4611ce=parseInt(_0x1c791f(0x1fa))/0x1*(parseInt(_0x1c791f(0x215))/0x2)+parseInt(_0x1c791f(0x21c))/0x3+parseInt(_0x1c791f(0x1ff))/0x4+-parseInt(_0x1c791f(0x21e))/0x5*(parseInt(_0x1c791f(0x1f5))/0x6)+parseInt(_0x1c791f(0x206))/0x7+parseInt(_0x1c791f(0x209))/0x8*(parseInt(_0x1c791f(0x1fc))/0x9)+parseInt(_0x1c791f(0x229))/0xa*(-parseInt(_0x1c791f(0x212))/0xb);if(_0x4611ce===_0x35d062)break;else _0x4e1571['push'](_0x4e1571['shift']());}catch(_0x1c2061){_0x4e1571['push'](_0x4e1571['shift']());}}}(a12_0xf66b,0x94a99));import a12_0x499ee0 from'chalk';import a12_0xf61f82 from'ora';const LOGO='\x0a'+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x222))('██╗\x20\x20\x20\x20██╗')+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x22d))('\x20██████╗\x20\x20██████╗\x20')+a12_0x499ee0[a12_0x264bd1(0x1ea)]('#3b82f6')('███████╗██╗\x20\x20\x20\x20\x20')+a12_0x499ee0['hex']('#2563eb')('██╗████████╗')+'\x0a'+a12_0x499ee0['hex'](a12_0x264bd1(0x222))('██║\x20\x20\x20\x20██║')+a12_0x499ee0['hex']('#60a5fa')('██╔═══██╗██╔═══██╗')+a12_0x499ee0['hex'](a12_0x264bd1(0x1f0))(a12_0x264bd1(0x213))+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x228))(a12_0x264bd1(0x234))+'\x0a'+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x222))(a12_0x264bd1(0x217))+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x22d))(a12_0x264bd1(0x200))+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x1f0))('\x20\x20███╔╝\x20██║\x20\x20\x20\x20\x20')+a12_0x499ee0[a12_0x264bd1(0x1ea)]('#2563eb')(a12_0x264bd1(0x232))+'\x0a'+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x222))(a12_0x264bd1(0x20e))+a12_0x499ee0[a12_0x264bd1(0x1ea)]('#60a5fa')('██║\x20\x20\x20██║██║\x20\x20\x20██║')+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x1f0))(a12_0x264bd1(0x1e6))+a12_0x499ee0['hex']('#2563eb')(a12_0x264bd1(0x232))+'\x0a'+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x222))(a12_0x264bd1(0x207))+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x22d))(a12_0x264bd1(0x1ec))+a12_0x499ee0['hex']('#3b82f6')(a12_0x264bd1(0x20f))+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x228))(a12_0x264bd1(0x232))+'\x0a'+a12_0x499ee0['hex'](a12_0x264bd1(0x222))(a12_0x264bd1(0x1e7))+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x22d))('\x20╚═════╝\x20\x20╚═════╝\x20')+a12_0x499ee0[a12_0x264bd1(0x1ea)]('#3b82f6')(a12_0x264bd1(0x22a))+a12_0x499ee0[a12_0x264bd1(0x1ea)](a12_0x264bd1(0x228))('╚═╝\x20\x20\x20╚═╝\x20\x20\x20')+'\x0a';export function showLogo(){process['stdout']['write'](LOGO+'\x0a');}export function createSpinner(_0x4757dd){const _0xd82462=a12_0x264bd1;return a12_0xf61f82({'text':_0x4757dd,'color':_0xd82462(0x1eb),'spinner':_0xd82462(0x223)});}export function success(_0x3066c1){const _0x1b3fe0=a12_0x264bd1;process[_0x1b3fe0(0x22f)]['write'](a12_0x499ee0[_0x1b3fe0(0x1ea)](_0x1b3fe0(0x1f0))('\x20\x20')+_0x3066c1+'\x0a');}export function error(_0x2591cb){const _0x1c9bdb=a12_0x264bd1;process['stdout'][_0x1c9bdb(0x231)](a12_0x499ee0[_0x1c9bdb(0x1e5)]('\x20\x20')+_0x2591cb+'\x0a');}export function info(_0x58f7ec){const _0x3d1739=a12_0x264bd1;process['stdout'][_0x3d1739(0x231)](a12_0x499ee0[_0x3d1739(0x1ea)](_0x3d1739(0x22d))('\x20\x20')+_0x58f7ec+'\x0a');}export function warn(_0x4dd417){const _0x6f82dd=a12_0x264bd1;process[_0x6f82dd(0x22f)][_0x6f82dd(0x231)](a12_0x499ee0['yellow']('\x20\x20')+_0x4dd417+'\x0a');}export function dim(_0x3e2b5f){const _0x1f6d31=a12_0x264bd1;process['stdout'][_0x1f6d31(0x231)](a12_0x499ee0['dim']('\x20\x20'+_0x3e2b5f)+'\x0a');}export function header(_0xa48d2b){const _0x11e9db=a12_0x264bd1;process[_0x11e9db(0x22f)][_0x11e9db(0x231)]('\x0a'+a12_0x499ee0[_0x11e9db(0x201)][_0x11e9db(0x1ea)](_0x11e9db(0x1f0))(_0xa48d2b)+'\x0a');}export function divider(){const _0x4b466a=a12_0x264bd1;process[_0x4b466a(0x22f)][_0x4b466a(0x231)](a12_0x499ee0[_0x4b466a(0x21b)]('\x20\x20'+'-'[_0x4b466a(0x221)](0x32))+'\x0a');}export function tip(_0x2970ed,_0x42a628){const _0x173186=a12_0x264bd1;process[_0x173186(0x22f)][_0x173186(0x231)](a12_0x499ee0[_0x173186(0x21b)]('\x20\x20')+a12_0x499ee0[_0x173186(0x203)](_0x2970ed)+a12_0x499ee0[_0x173186(0x21b)]('\x20'+_0x42a628)+'\x0a');}export function userMessage(_0x2e0c94){const _0x3ea0bd=a12_0x264bd1;process[_0x3ea0bd(0x22f)][_0x3ea0bd(0x231)](a12_0x499ee0[_0x3ea0bd(0x201)][_0x3ea0bd(0x1ea)](_0x3ea0bd(0x22d))(_0x3ea0bd(0x224))+_0x2e0c94+'\x0a');}export function aiMessage(_0x3f04ff){const _0x4875eb=a12_0x264bd1;process[_0x4875eb(0x22f)][_0x4875eb(0x231)]('\x0a\x20\x20'+_0x3f04ff);}function a12_0x112f(_0x174ae1,_0x2b5ce5){_0x174ae1=_0x174ae1-0x1e5;const _0xf66b6c=a12_0xf66b();let _0x112f2f=_0xf66b6c[_0x174ae1];return _0x112f2f;}export function aiMessageEnd(){const _0x33f671=a12_0x264bd1;process[_0x33f671(0x22f)][_0x33f671(0x231)]('\x0a');}export function toolCall(_0x40fb62,_0x44b3d8){const _0x5d9019=a12_0x264bd1;process[_0x5d9019(0x22f)]['write'](a12_0x499ee0['dim'](_0x5d9019(0x21d))+a12_0x499ee0[_0x5d9019(0x1ea)](_0x5d9019(0x22d))(_0x40fb62)+a12_0x499ee0[_0x5d9019(0x21b)](':\x20'+_0x44b3d8)+'\x0a');}export function statusBar(_0x2f33f7,_0x555adf){const _0x3495ff=a12_0x264bd1,_0xcd0215=_0x2f33f7[_0x3495ff(0x1f6)]('/')[_0x3495ff(0x1f1)]()?.[_0x3495ff(0x1f7)](_0x3495ff(0x1f2),'')||_0x2f33f7,_0x2e81b0=a12_0x499ee0['hex'](_0x3495ff(0x1f0))(_0xcd0215),_0x26d378=a12_0x499ee0[_0x3495ff(0x21b)](_0x555adf+'%\x20context\x20left');process[_0x3495ff(0x22f)]['write']('\x20\x20'+_0x2e81b0+'\x20\x20'+a12_0x499ee0[_0x3495ff(0x21b)]('|')+'\x20\x20'+_0x26d378+'\x0a');}function a12_0xf66b(){const _0x2b748f=['floor','forEach','join','\x20\x20Limit\x20Reached\x0a','██║███╗██║','███████╗███████╗','Listing','servers','1611247uBHoJK','╚══███╔╝██║\x20\x20\x20\x20\x20','Unlimited','10UQxLUQ','\x20tools)\x0a','██║\x20█╗\x20██║','│\x20\x20','toString','command','dim','323847NuKAiL','\x20\x20\x20\x20->\x20','5fWsvrK','\x20\x20>\x20','trim','repeat','#93c5fd','dots','\x0a\x20\x20You:\x20','\x20/\x20','Finding','Editing','#2563eb','70xPlrwQ','╚══════╝╚══════╝','pattern','yellow','#60a5fa','length','stdout','green','write','██║\x20\x20\x20██║\x20\x20\x20','\x20\x20Working\x20in:\x20','██║╚══██╔══╝','red','\x20███╔╝\x20\x20██║\x20\x20\x20\x20\x20','\x20╚══╝╚══╝\x20','Creating','toFixed','hex','blue','╚██████╔╝╚██████╔╝','map','\x20tokens','max','#3b82f6','pop',':free','Searching','run_command','4001532DVRGyA','split','replace','\x20\x20\x20','substring','31604vkkPcg','\x20\x20Token\x20Usage\x0a','4167BVBIMC','round','\x20MCP\x20','1733364xtGbsQ','██║\x20\x20\x20██║██║\x20\x20\x20██║','bold','Logged\x20in\x20as:\x20','white','path','toLocaleString','4076422WuSppz','╚███╔███╔╝','Running','17616skagPP'];a12_0xf66b=function(){return _0x2b748f;};return a12_0xf66b();}export function prompt(){const _0x2183d7=a12_0x264bd1;process[_0x2183d7(0x22f)][_0x2183d7(0x231)](a12_0x499ee0[_0x2183d7(0x1ea)](_0x2183d7(0x1f0))(_0x2183d7(0x21f)));}function lerpColor(_0x68fc49,_0x4ff454,_0x374dcc){const _0x3eb3fd=a12_0x264bd1,_0x23838f=parseInt(_0x68fc49['replace']('#',''),0x10),_0x4d8ebb=parseInt(_0x4ff454[_0x3eb3fd(0x1f7)]('#',''),0x10),_0x23bb06=_0x23838f>>0x10&0xff,_0x10c900=_0x23838f>>0x8&0xff,_0x54c365=_0x23838f&0xff,_0x42fdf9=_0x4d8ebb>>0x10&0xff,_0x496293=_0x4d8ebb>>0x8&0xff,_0x21d54a=_0x4d8ebb&0xff,_0x379ed4=Math['round'](_0x23bb06+(_0x42fdf9-_0x23bb06)*_0x374dcc),_0x19e0ab=Math['round'](_0x10c900+(_0x496293-_0x10c900)*_0x374dcc),_0x4bef05=Math[_0x3eb3fd(0x1fd)](_0x54c365+(_0x21d54a-_0x54c365)*_0x374dcc);return'#'+((0x1<<0x18)+(_0x379ed4<<0x10)+(_0x19e0ab<<0x8)+_0x4bef05)['toString'](0x10)['slice'](0x1);}export function gradientText(_0x2449c0,_0x410576,_0x5841d0){const _0x13d893=a12_0x264bd1,_0x3c236b=_0x2449c0['split']('');return _0x3c236b[_0x13d893(0x1ed)]((_0x388179,_0x47e6c9)=>{const _0x2de0dc=_0x13d893,_0x13205d=_0x47e6c9/Math[_0x2de0dc(0x1ef)](_0x3c236b['length']-0x1,0x1);return a12_0x499ee0[_0x2de0dc(0x1ea)](lerpColor(_0x410576,_0x5841d0,_0x13205d))(_0x388179);})[_0x13d893(0x20c)]('');}export function loggedInBox(_0x177c2f){const _0x5e7ab8=a12_0x264bd1,_0xcf023=_0x5e7ab8(0x202),_0x38b0e6=_0x177c2f[_0x5e7ab8(0x220)](),_0x122eea=_0xcf023[_0x5e7ab8(0x22e)]+_0x38b0e6[_0x5e7ab8(0x22e)]+0x4,_0x28c559=a12_0x499ee0[_0x5e7ab8(0x1ea)](_0x5e7ab8(0x1f0))('─'[_0x5e7ab8(0x221)](_0x122eea)),_0x3022a6=a12_0x499ee0[_0x5e7ab8(0x1ea)](_0x5e7ab8(0x1f0))('╭'+_0x28c559+'╮'),_0x5ab201=a12_0x499ee0[_0x5e7ab8(0x1ea)](_0x5e7ab8(0x1f0))('╰'+_0x28c559+'╯'),_0x55ec45=gradientText(_0x38b0e6,_0x5e7ab8(0x22d),_0x5e7ab8(0x228));process['stdout'][_0x5e7ab8(0x231)]('\x0a\x20\x20'+_0x3022a6+'\x0a'),process[_0x5e7ab8(0x22f)][_0x5e7ab8(0x231)]('\x20\x20'+a12_0x499ee0[_0x5e7ab8(0x1ea)](_0x5e7ab8(0x1f0))(_0x5e7ab8(0x218))+a12_0x499ee0['dim'](_0xcf023)+_0x55ec45+a12_0x499ee0[_0x5e7ab8(0x1ea)]('#3b82f6')('\x20\x20│')+'\x0a'),process['stdout'][_0x5e7ab8(0x231)]('\x20\x20'+_0x5ab201+'\x0a');}export function actionSpinner(_0x2f822a){const _0x3e59da=a12_0x264bd1;return a12_0xf61f82({'text':a12_0x499ee0['hex'](_0x3e59da(0x22d))(_0x2f822a),'color':'blue','spinner':'dots'});}export function toolActivity(_0x2d531f,_0x10eb79){const _0x37fcbd=a12_0x264bd1,_0x55234b={'create_file':_0x37fcbd(0x1e8),'read_file':'Reading','edit_file':_0x37fcbd(0x227),'list_directory':_0x37fcbd(0x210),'search_file':_0x37fcbd(0x1f3),'find_files':_0x37fcbd(0x226),'search_directory':_0x37fcbd(0x1f3),'run_command':_0x37fcbd(0x208)},_0x341694=_0x55234b[_0x2d531f]||_0x2d531f;let _0x520ae9='';if(_0x2d531f===_0x37fcbd(0x1f4)&&_0x10eb79[_0x37fcbd(0x21a)])_0x520ae9=_0x10eb79[_0x37fcbd(0x21a)][_0x37fcbd(0x1f9)](0x0,0x32);else{if(_0x10eb79[_0x37fcbd(0x204)])_0x520ae9=_0x10eb79[_0x37fcbd(0x204)];else _0x10eb79[_0x37fcbd(0x22b)]&&(_0x520ae9='\x22'+_0x10eb79['pattern']+'\x22');}process['stdout'][_0x37fcbd(0x231)](a12_0x499ee0[_0x37fcbd(0x21b)]('\x20\x20'+_0x341694+'\x20'+_0x520ae9+'\x0a'));}export function commandOutput(_0x273d5f){const _0x48752d=a12_0x264bd1,_0x40afa2=_0x273d5f['split']('\x0a');_0x40afa2[_0x48752d(0x20b)](_0x4d1f3e=>{const _0xc2b10d=_0x48752d;_0x4d1f3e[_0xc2b10d(0x220)]()&&process[_0xc2b10d(0x22f)][_0xc2b10d(0x231)](a12_0x499ee0['dim'](_0xc2b10d(0x1f8))+a12_0x499ee0[_0xc2b10d(0x21b)](_0x4d1f3e)+'\x0a');});}export function usageBox(_0x77b238,_0x380cdc,_0x3ffdca){const _0x476a0a=a12_0x264bd1,_0x3ba2a0=_0x380cdc>0x0?Math['min'](Math[_0x476a0a(0x1fd)](_0x77b238/_0x380cdc*0x64),0x64):0x0,_0x13d18e=0x1e,_0x4b4bc6=Math[_0x476a0a(0x1fd)](_0x3ba2a0/0x64*_0x13d18e),_0x5b3962=_0x13d18e-_0x4b4bc6,_0x3e1d3d=_0x3ffdca?a12_0x499ee0['red']:_0x3ba2a0>0x50?a12_0x499ee0[_0x476a0a(0x22c)]:a12_0x499ee0[_0x476a0a(0x230)],_0xedaec9=_0x3e1d3d('█'['repeat'](_0x4b4bc6))+a12_0x499ee0[_0x476a0a(0x21b)]('░'[_0x476a0a(0x221)](_0x5b3962)),_0x3b20df=_0x380cdc>=0x3b9ac9ff?_0x476a0a(0x214):_0x380cdc[_0x476a0a(0x205)](),_0x1648e3=_0x77b238['toLocaleString']()+_0x476a0a(0x225)+_0x3b20df+_0x476a0a(0x1ee);process[_0x476a0a(0x22f)]['write']('\x0a'),process[_0x476a0a(0x22f)][_0x476a0a(0x231)](a12_0x499ee0['bold'][_0x476a0a(0x1ea)]('#60a5fa')(_0x476a0a(0x1fb))),process[_0x476a0a(0x22f)][_0x476a0a(0x231)]('\x20\x20'+_0xedaec9+'\x20'+a12_0x499ee0['dim'](_0x3ba2a0+'%')+'\x0a'),process[_0x476a0a(0x22f)][_0x476a0a(0x231)](a12_0x499ee0[_0x476a0a(0x21b)]('\x20\x20'+_0x1648e3+'\x0a')),_0x3ffdca&&process[_0x476a0a(0x22f)]['write'](a12_0x499ee0[_0x476a0a(0x1e5)](_0x476a0a(0x20d))),process[_0x476a0a(0x22f)]['write']('\x0a');}export function mcpConnected(_0x422579,_0x2d8003){const _0x110e2f=a12_0x264bd1,_0x53e6ce=_0x422579===0x1?'server':_0x110e2f(0x211);process[_0x110e2f(0x22f)][_0x110e2f(0x231)](a12_0x499ee0[_0x110e2f(0x21b)]('\x20\x20'+a12_0x499ee0[_0x110e2f(0x1ea)](_0x110e2f(0x1f0))(_0x422579[_0x110e2f(0x219)]())+_0x110e2f(0x1fe)+_0x53e6ce+'\x20connected\x20('+_0x2d8003+_0x110e2f(0x216)));}export function elapsedTime(_0xdda026){const _0x563dfe=a12_0x264bd1,_0x52fe0c=_0xdda026<0x3c?_0xdda026[_0x563dfe(0x1e9)](0x1)+'s':Math[_0x563dfe(0x20a)](_0xdda026/0x3c)+'m\x20'+(_0xdda026%0x3c)[_0x563dfe(0x1e9)](0x0)+'s';process['stdout'][_0x563dfe(0x231)](a12_0x499ee0[_0x563dfe(0x21b)]('\x20\x20Done\x20in\x20'+_0x52fe0c+'\x0a'));}export function currentDir(_0x4d6c50){const _0x4da1fb=a12_0x264bd1;process[_0x4da1fb(0x22f)][_0x4da1fb(0x231)](a12_0x499ee0[_0x4da1fb(0x21b)](_0x4da1fb(0x233))+a12_0x499ee0['hex'](_0x4da1fb(0x22d))(_0x4d6c50)+'\x0a');}
|
package/dist/ui/select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a8df2,_0x2ecc64){const _0x743d86=a13_0x2a8d,_0x578c5a=_0x2a8df2();while(!![]){try{const _0x428911=parseInt(_0x743d86(0x186))/0x1+-parseInt(_0x743d86(0x187))/0x2*(parseInt(_0x743d86(0x181))/0x3)+-parseInt(_0x743d86(0x188))/0x4*(parseInt(_0x743d86(0x184))/0x5)+-parseInt(_0x743d86(0x17f))/0x6*(-parseInt(_0x743d86(0x183))/0x7)+-parseInt(_0x743d86(0x185))/0x8*(-parseInt(_0x743d86(0x17a))/0x9)+-parseInt(_0x743d86(0x17e))/0xa+-parseInt(_0x743d86(0x17d))/0xb*(-parseInt(_0x743d86(0x17b))/0xc);if(_0x428911===_0x2ecc64)break;else _0x578c5a['push'](_0x578c5a['shift']());}catch(_0xa8609e){_0x578c5a['push'](_0x578c5a['shift']());}}}(a13_0x492d,0x691bd));function a13_0x492d(){const _0x4ae121=['114iYPpCq','\x20(current)','3dMOUBi','description','157745WsGqSf','42610DXQIgN','2655144nAUUkB','795720NypTlG','953388REqJBY','392gtrOVs','map','18sdYrTN','536532WGvMVA','Select\x20AI\x20Model','22wCYkZX','2347180WLemgx'];a13_0x492d=function(){return _0x4ae121;};return a13_0x492d();}import{select}from'@inquirer/prompts';import{MODELS}from'../config/settings.js';function a13_0x2a8d(_0x3feafd,_0x16153b){_0x3feafd=_0x3feafd-0x179;const _0x492dcd=a13_0x492d();let _0x2a8d79=_0x492dcd[_0x3feafd];return _0x2a8d79;}import{getSelectedModel,setSelectedModel}from'../utils/storage.js';export async function selectModel(){const _0xaddfbe=a13_0x2a8d,_0xceed91=getSelectedModel(),_0x28ecdf=MODELS[_0xaddfbe(0x179)](_0x43a69f=>({'name':''+_0x43a69f['name']+(_0x43a69f['id']===_0xceed91?_0xaddfbe(0x180):''),'value':_0x43a69f['id'],'description':_0x43a69f[_0xaddfbe(0x182)]})),_0x5525e9=await select({'message':_0xaddfbe(0x17c),'choices':_0x28ecdf,'default':_0xceed91});return setSelectedModel(_0x5525e9),_0x5525e9;}export{getSelectedModel,setSelectedModel};
|
package/dist/utils/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x184611,_0x9e3c13){const _0x3cb82d=a14_0x593c,_0x1e06ce=_0x184611();while(!![]){try{const _0x1fe5d3=-parseInt(_0x3cb82d(0x183))/0x1*(-parseInt(_0x3cb82d(0x195))/0x2)+parseInt(_0x3cb82d(0x188))/0x3+parseInt(_0x3cb82d(0x18f))/0x4*(-parseInt(_0x3cb82d(0x176))/0x5)+-parseInt(_0x3cb82d(0x178))/0x6*(-parseInt(_0x3cb82d(0x175))/0x7)+-parseInt(_0x3cb82d(0x190))/0x8*(parseInt(_0x3cb82d(0x189))/0x9)+-parseInt(_0x3cb82d(0x193))/0xa+parseInt(_0x3cb82d(0x18b))/0xb*(-parseInt(_0x3cb82d(0x17c))/0xc);if(_0x1fe5d3===_0x9e3c13)break;else _0x1e06ce['push'](_0x1e06ce['shift']());}catch(_0xa47a62){_0x1e06ce['push'](_0x1e06ce['shift']());}}}(a14_0x54aa,0xcea48));function a14_0x593c(_0x448d02,_0x26a2d3){_0x448d02=_0x448d02-0x174;const _0x54aaed=a14_0x54aa();let _0x593cd9=_0x54aaed[_0x448d02];return _0x593cd9;}import{getApiUrl}from'../config/settings.js';import{getToken,getUser}from'./storage.js';export async function sendChatMessage(_0x4fc4f8,_0x144b12,_0x2fc218){const _0x1bcc47=a14_0x593c,_0x38fb81=getToken(),_0x3fa162=getApiUrl(),{userId:_0x274726}=getUser();if(!_0x38fb81||!_0x274726)throw new Error(_0x1bcc47(0x17e));const _0x20f41c=_0x1bcc47(0x174)+Date['now']()+'-'+Math[_0x1bcc47(0x18c)]()[_0x1bcc47(0x18a)](0x24)[_0x1bcc47(0x182)](0x2,0x9),_0x6dc13b=process[_0x1bcc47(0x19d)]+'-'+process[_0x1bcc47(0x186)]+'-'+process[_0x1bcc47(0x17f)],_0x17f722=await fetch(_0x3fa162+'/api/chat',{'method':_0x1bcc47(0x19a),'headers':{'Content-Type':_0x1bcc47(0x198),'X-Woozlit-CLI':_0x1bcc47(0x191),'X-Woozlit-CLI-Version':_0x1bcc47(0x184),'X-Request-ID':_0x20f41c,'X-Device-Fingerprint':_0x6dc13b,'Authorization':_0x1bcc47(0x19c)+_0x38fb81,'X-Woozlit-Token':'Bearer\x20'+_0x38fb81},'body':JSON[_0x1bcc47(0x17a)]({'model':_0x4fc4f8,'messages':_0x144b12,'stream':!![],'userId':_0x274726})});if(!_0x17f722['ok']){const _0x2c8e2f=await _0x17f722[_0x1bcc47(0x194)]();throw new Error(_0x1bcc47(0x197)+_0x17f722['status']+_0x1bcc47(0x17b)+_0x2c8e2f);}if(!_0x17f722[_0x1bcc47(0x17d)])throw new Error('No\x20response\x20body');const _0x1a1e36=_0x17f722['body'][_0x1bcc47(0x180)](),_0x3ede75=new TextDecoder();let _0x347e91='';const _0x4aafcd=[];while(!![]){const {done:_0x739f70,value:_0x3c2d34}=await _0x1a1e36[_0x1bcc47(0x19b)]();if(_0x739f70)break;const _0xe7a079=_0x3ede75[_0x1bcc47(0x18d)](_0x3c2d34,{'stream':!![]});if(_0xe7a079[_0x1bcc47(0x192)]('0:')){const _0x57afaf=_0xe7a079[_0x1bcc47(0x177)]('\x0a');for(const _0x1502b4 of _0x57afaf){if(_0x1502b4[_0x1bcc47(0x199)]('0:')){const _0x2a346c=_0x1502b4[_0x1bcc47(0x187)](0x2)[_0x1bcc47(0x179)]();if(_0x2a346c[_0x1bcc47(0x199)]('\x22')&&_0x2a346c[_0x1bcc47(0x181)]('\x22'))try{const _0xa90ce8=JSON[_0x1bcc47(0x196)](_0x2a346c);_0x347e91+=_0xa90ce8;if(_0x2fc218)_0x2fc218(_0xa90ce8);}catch{}}}}else{_0x347e91+=_0xe7a079;if(_0x2fc218)_0x2fc218(_0xe7a079);}}return{'content':_0x347e91,'toolCalls':_0x4aafcd};}function a14_0x54aa(){const _0x11991f=['decode','/api/user/usage','844852iGatQU','349256oFHZCs','true','includes','1897360BMjfGs','text','20zFAkLG','parse','API\x20error:\x20','application/json','startsWith','POST','read','Bearer\x20','platform','cli-','367031TfGzPA','5Hvhfiu','split','102LhqyDu','trim','stringify','\x20-\x20','204adkBzd','body','Not\x20authenticated.\x20Please\x20run\x20\x27woozlit\x20login\x27\x20first.','version','getReader','endsWith','substring','115391wQZLYr','1.1.0','json','arch','slice','4794030mzDKCS','261woLYBD','toString','731093uMUrcA','random'];a14_0x54aa=function(){return _0x11991f;};return a14_0x54aa();}export async function checkAuth(){const _0x308084=a14_0x593c,_0x43f91e=getToken();if(!_0x43f91e)return![];try{const _0x4517d0=getApiUrl(),_0x49d2c9=await fetch(_0x4517d0+'/api/auth/verify',{'headers':{'Authorization':_0x308084(0x19c)+_0x43f91e}});return _0x49d2c9['ok'];}catch{return![];}}export async function getUserUsage(){const _0x5b0db9=a14_0x593c,_0x267760=getToken();if(!_0x267760)return null;try{const _0x84d8ca=getApiUrl(),_0x4fe336=await fetch(_0x84d8ca+_0x5b0db9(0x18e),{'headers':{'Authorization':'Bearer\x20'+_0x267760}});if(!_0x4fe336['ok'])return null;return await _0x4fe336[_0x5b0db9(0x185)]();}catch(_0x1c1f80){return null;}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a15_0x46a8c6=a15_0x2790;(function(_0x3b2252,_0x51227e){const _0x3e40c8=a15_0x2790,_0x2018f3=_0x3b2252();while(!![]){try{const _0x3b70ae=-parseInt(_0x3e40c8(0x1c3))/0x1+parseInt(_0x3e40c8(0x1b4))/0x2*(-parseInt(_0x3e40c8(0x1bc))/0x3)+-parseInt(_0x3e40c8(0x1c9))/0x4+-parseInt(_0x3e40c8(0x1be))/0x5*(parseInt(_0x3e40c8(0x1c7))/0x6)+parseInt(_0x3e40c8(0x1c8))/0x7*(parseInt(_0x3e40c8(0x1b7))/0x8)+-parseInt(_0x3e40c8(0x1ba))/0x9+parseInt(_0x3e40c8(0x1bb))/0xa*(parseInt(_0x3e40c8(0x1ca))/0xb);if(_0x3b70ae===_0x51227e)break;else _0x2018f3['push'](_0x2018f3['shift']());}catch(_0x194f86){_0x2018f3['push'](_0x2018f3['shift']());}}}(a15_0x1bda,0x6aee1));import a15_0x304056 from'conf';const WEEK_MS=0x7*0x18*0x3c*0x3c*0x3e8,config=new a15_0x304056({'projectName':a15_0x46a8c6(0x1b9),'defaults':{'entries':[],'lastCleanup':Date['now']()}});function cleanup(){const _0x365b45=a15_0x46a8c6,_0x365788=Date[_0x365b45(0x1bf)](),_0x51f06e=config[_0x365b45(0x1c5)](_0x365b45(0x1c6));if(_0x365788-_0x51f06e<0x18*0x3c*0x3c*0x3e8)return;const _0x3a5e26=config['get'](_0x365b45(0x1bd)),_0x55a668=_0x3a5e26[_0x365b45(0x1b6)](_0x5d004b=>_0x365788-_0x5d004b[_0x365b45(0x1c4)]<WEEK_MS);config[_0x365b45(0x1c2)]('entries',_0x55a668),config['set'](_0x365b45(0x1c6),_0x365788);}export function addToHistory(_0x482661){const _0x21ab60=a15_0x46a8c6;cleanup();const _0x11f916=config[_0x21ab60(0x1c5)]('entries');_0x11f916[_0x21ab60(0x1c1)]({'message':_0x482661,'timestamp':Date['now']()});if(_0x11f916['length']>0x64)_0x11f916[_0x21ab60(0x1b5)]();config[_0x21ab60(0x1c2)](_0x21ab60(0x1bd),_0x11f916);}function a15_0x2790(_0x5b38fb,_0x544447){_0x5b38fb=_0x5b38fb-0x1b4;const _0x1bdab0=a15_0x1bda();let _0x27900c=_0x1bdab0[_0x5b38fb];return _0x27900c;}function a15_0x1bda(){const _0x27a95c=['95jXDOws','now','message','push','set','682484gECPcG','timestamp','get','lastCleanup','194418alnDgJ','359023SxkJFc','2690184ANOSlu','38578034Eztbgk','12056Dsfulm','shift','filter','72DUCHyG','map','woozlit-cli-history','6607683csQWiI','10EtANCM','411Usziio','entries'];a15_0x1bda=function(){return _0x27a95c;};return a15_0x1bda();}export function getHistory(){const _0x4bff15=a15_0x46a8c6;return cleanup(),config[_0x4bff15(0x1c5)]('entries')[_0x4bff15(0x1b8)](_0x4f8398=>_0x4f8398[_0x4bff15(0x1c0)]);}export function clearHistory(){const _0x11cab2=a15_0x46a8c6;config[_0x11cab2(0x1c2)]('entries',[]);}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function getPlatform(): "windows" | "macos" | "linux";
|
|
2
|
+
export declare function getArch(): string;
|
|
3
|
+
export declare function isWindows(): boolean;
|
|
4
|
+
export declare function isMac(): boolean;
|
|
5
|
+
export declare function isLinux(): boolean;
|
|
6
|
+
export declare function getShellPrefix(): string;
|
|
7
|
+
export declare function getPlatformInfo(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a16_0x34792f=a16_0x4016;(function(_0x2b3675,_0xf4f6e7){const _0x553d3d=a16_0x4016,_0x4e759b=_0x2b3675();while(!![]){try{const _0x1e1137=parseInt(_0x553d3d(0x144))/0x1+-parseInt(_0x553d3d(0x137))/0x2*(-parseInt(_0x553d3d(0x143))/0x3)+-parseInt(_0x553d3d(0x13e))/0x4*(parseInt(_0x553d3d(0x141))/0x5)+-parseInt(_0x553d3d(0x13f))/0x6+-parseInt(_0x553d3d(0x146))/0x7+parseInt(_0x553d3d(0x135))/0x8+parseInt(_0x553d3d(0x145))/0x9*(parseInt(_0x553d3d(0x138))/0xa);if(_0x1e1137===_0xf4f6e7)break;else _0x4e759b['push'](_0x4e759b['shift']());}catch(_0x3ab1e6){_0x4e759b['push'](_0x4e759b['shift']());}}}(a16_0x1e9f,0x6f5a9));function a16_0x1e9f(){const _0x25ae68=['platform','win32','1477356JHCeNK','3258192eImRHt','sudo\x20','10rPYpBT','Linux','919437KacdcY','637527IhLhYz','36AIlEKy','6062672zipRiU','linux','Windows','1783144NYcegR','darwin','2qtVfMC','3592530oiipnV','arch','macos','windows'];a16_0x1e9f=function(){return _0x25ae68;};return a16_0x1e9f();}const platform=process[a16_0x34792f(0x13c)],arch=process[a16_0x34792f(0x139)];export function getPlatform(){const _0x124cbe=a16_0x34792f;if(platform===_0x124cbe(0x13d))return _0x124cbe(0x13b);if(platform===_0x124cbe(0x136))return _0x124cbe(0x13a);return _0x124cbe(0x147);}export function getArch(){return arch;}function a16_0x4016(_0x33eec2,_0x5eba31){_0x33eec2=_0x33eec2-0x135;const _0x1e9fca=a16_0x1e9f();let _0x401676=_0x1e9fca[_0x33eec2];return _0x401676;}export function isWindows(){const _0xc567bc=a16_0x34792f;return platform===_0xc567bc(0x13d);}export function isMac(){const _0x3a119c=a16_0x34792f;return platform===_0x3a119c(0x136);}export function isLinux(){const _0x3ca0b7=a16_0x34792f;return platform===_0x3ca0b7(0x147);}export function getShellPrefix(){const _0x58f67b=a16_0x34792f;return isWindows()?'':_0x58f67b(0x140);}export function getPlatformInfo(){const _0x323f57=a16_0x34792f,_0x2024d6=getPlatform(),_0x55c771=_0x2024d6===_0x323f57(0x13b)?_0x323f57(0x148):_0x2024d6==='macos'?'macOS':_0x323f57(0x142);return _0x55c771+'\x20('+arch+')';}
|
package/dist/utils/storage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x126de3,_0x3b912b){const _0x1e37c9=a17_0x3f99,_0x28b03d=_0x126de3();while(!![]){try{const _0x341664=parseInt(_0x1e37c9(0x9a))/0x1*(-parseInt(_0x1e37c9(0x95))/0x2)+-parseInt(_0x1e37c9(0xa6))/0x3*(-parseInt(_0x1e37c9(0x97))/0x4)+-parseInt(_0x1e37c9(0x9d))/0x5*(parseInt(_0x1e37c9(0x90))/0x6)+-parseInt(_0x1e37c9(0x99))/0x7*(-parseInt(_0x1e37c9(0x98))/0x8)+-parseInt(_0x1e37c9(0x92))/0x9+parseInt(_0x1e37c9(0xa0))/0xa+parseInt(_0x1e37c9(0x9b))/0xb*(parseInt(_0x1e37c9(0xa5))/0xc);if(_0x341664===_0x3b912b)break;else _0x28b03d['push'](_0x28b03d['shift']());}catch(_0x36fb59){_0x28b03d['push'](_0x28b03d['shift']());}}}(a17_0x39cb,0xe1d3a));import a17_0x22cb63 from'conf';const config=new a17_0x22cb63({'projectName':'woozlit-cli'});export function getToken(){const _0x4bf2fd=a17_0x3f99;return config['get'](_0x4bf2fd(0x96));}export function setToken(_0x1738bc){const _0x49ea4c=a17_0x3f99;config[_0x49ea4c(0x93)](_0x49ea4c(0x96),_0x1738bc);}export function clearToken(){const _0x3e72fc=a17_0x3f99;config['delete'](_0x3e72fc(0x96));}export function getUser(){const _0x26453b=a17_0x3f99;return{'userId':config[_0x26453b(0x9e)](_0x26453b(0xa1)),'email':config[_0x26453b(0x9e)](_0x26453b(0x91)),'displayName':config['get']('displayName')};}export function setUser(_0x2e7469,_0x135727,_0x1f1214){const _0x132f96=a17_0x3f99;config[_0x132f96(0x93)](_0x132f96(0xa1),_0x2e7469),config[_0x132f96(0x93)](_0x132f96(0x91),_0x135727),config[_0x132f96(0x93)]('displayName',_0x1f1214);}export function clearUser(){const _0x51f677=a17_0x3f99;config[_0x51f677(0xa4)](_0x51f677(0xa1)),config['delete'](_0x51f677(0x91)),config[_0x51f677(0xa4)](_0x51f677(0xa3));}export function getSelectedModel(){const _0x18463b=a17_0x3f99;return config['get'](_0x18463b(0xa2))||_0x18463b(0x9c);}export function setSelectedModel(_0x1a1c0c){const _0x532af5=a17_0x3f99;config[_0x532af5(0x93)]('selectedModel',_0x1a1c0c);}export function getRules(){const _0x4984a7=a17_0x3f99;return config[_0x4984a7(0x9e)](_0x4984a7(0x9f))||[];}export function addRule(_0x2e8b9b){const _0x3f4565=a17_0x3f99,_0x192703=getRules();_0x192703[_0x3f4565(0x94)](_0x2e8b9b),config[_0x3f4565(0x93)](_0x3f4565(0x9f),_0x192703);}function a17_0x3f99(_0xdbde8e,_0x331e25){_0xdbde8e=_0xdbde8e-0x90;const _0x39cb0c=a17_0x39cb();let _0x3f9927=_0x39cb0c[_0xdbde8e];return _0x3f9927;}export function clearRules(){const _0x5e93c5=a17_0x3f99;config[_0x5e93c5(0x93)](_0x5e93c5(0x9f),[]);}export function isLoggedIn(){const _0x4be8bc=a17_0x3f99;return!!config[_0x4be8bc(0x9e)](_0x4be8bc(0x96))&&!!config[_0x4be8bc(0x9e)](_0x4be8bc(0xa1));}function a17_0x39cb(){const _0x3c2f07=['push','452336xkzkoC','token','360WnQFty','59304ETfQrc','161YbNsWq','7eiiclq','4631sHQsPM','xiaomi/mimo-v2-flash:free','5ciuLjE','get','rules','9055130CDDAaL','userId','selectedModel','displayName','delete','32304UaTfPF','23181btitQZ','915234rtnmQR','email','2196657XWsQkY','set'];a17_0x39cb=function(){return _0x3c2f07;};return a17_0x39cb();}export function logout(){clearToken(),clearUser();}
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "woozlit",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Woozlit AI - Agentic Coding Assistant",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"bin": {
|
|
10
|
-
"woozlit": "./dist/index.js"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsc && javascript-obfuscator ./dist --output ./dist --target node",
|
|
14
|
-
"dev": "tsx src/index.ts",
|
|
15
|
-
"start": "node dist/index.js"
|
|
16
|
-
},
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
19
|
-
"chalk": "^5.4.1",
|
|
20
|
-
"commander": "^13.1.0",
|
|
21
|
-
"conf": "^13.1.0",
|
|
22
|
-
"inquirer": "^12.3.2",
|
|
23
|
-
"jimp": "^1.6.0",
|
|
24
|
-
"marked": "^15.0.7",
|
|
25
|
-
"marked-terminal": "^7.3.0",
|
|
26
|
-
"open": "^10.1.0",
|
|
27
|
-
"ora": "^8.1.1"
|
|
28
|
-
},
|
|
29
|
-
"optionalDependencies": {
|
|
30
|
-
"robotjs": "^0.6.0",
|
|
31
|
-
"screenshot-desktop": "^1.15.3"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/node": "^22.10.5",
|
|
35
|
-
"javascript-obfuscator": "^5.1.0",
|
|
36
|
-
"tsx": "^4.19.2",
|
|
37
|
-
"typescript": "^5.7.3"
|
|
38
|
-
},
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": ">=18"
|
|
41
|
-
},
|
|
42
|
-
"keywords": [
|
|
43
|
-
"ai",
|
|
44
|
-
"cli",
|
|
45
|
-
"coding",
|
|
46
|
-
"assistant",
|
|
47
|
-
"woozlit"
|
|
48
|
-
],
|
|
49
|
-
"author": "Woozlit",
|
|
50
|
-
"license": "MIT"
|
|
1
|
+
{
|
|
2
|
+
"name": "woozlit",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "Woozlit AI - Agentic Coding Assistant",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"bin": {
|
|
10
|
+
"woozlit": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc && javascript-obfuscator ./dist --output ./dist --target node",
|
|
14
|
+
"dev": "tsx src/index.ts",
|
|
15
|
+
"start": "node dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
19
|
+
"chalk": "^5.4.1",
|
|
20
|
+
"commander": "^13.1.0",
|
|
21
|
+
"conf": "^13.1.0",
|
|
22
|
+
"inquirer": "^12.3.2",
|
|
23
|
+
"jimp": "^1.6.0",
|
|
24
|
+
"marked": "^15.0.7",
|
|
25
|
+
"marked-terminal": "^7.3.0",
|
|
26
|
+
"open": "^10.1.0",
|
|
27
|
+
"ora": "^8.1.1"
|
|
28
|
+
},
|
|
29
|
+
"optionalDependencies": {
|
|
30
|
+
"robotjs": "^0.6.0",
|
|
31
|
+
"screenshot-desktop": "^1.15.3"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^22.10.5",
|
|
35
|
+
"javascript-obfuscator": "^5.1.0",
|
|
36
|
+
"tsx": "^4.19.2",
|
|
37
|
+
"typescript": "^5.7.3"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"ai",
|
|
44
|
+
"cli",
|
|
45
|
+
"coding",
|
|
46
|
+
"assistant",
|
|
47
|
+
"woozlit"
|
|
48
|
+
],
|
|
49
|
+
"author": "Woozlit",
|
|
50
|
+
"license": "MIT"
|
|
51
51
|
}
|