woozlit 1.0.5 → 1.0.7
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 +34 -22
- 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
|
@@ -13,11 +13,13 @@ pnpm link --global
|
|
|
13
13
|
|
|
14
14
|
## Features
|
|
15
15
|
|
|
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
|
-
- **
|
|
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
|
+
- **Rollback**: Undo AI file changes with `/rollback` command
|
|
21
|
+
- **History**: Local conversation history with 1-week retention
|
|
22
|
+
- **Cross-Platform**: Windows, macOS, and Linux support with platform-aware commands
|
|
21
23
|
|
|
22
24
|
## Usage
|
|
23
25
|
|
|
@@ -81,21 +83,23 @@ Creates `.woozlit/` folder with `rules.md` and `context.md`.
|
|
|
81
83
|
|
|
82
84
|
Inside chat session:
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
| Command | Description |
|
|
87
|
+
|---------|-------------|
|
|
88
|
+
| `/exit` | Exit chat |
|
|
89
|
+
| `/clear` | Clear conversation |
|
|
90
|
+
| `/model` | Switch AI model |
|
|
91
|
+
| `/mcp` | List connected tools |
|
|
92
|
+
| `/usage` | Check token usage |
|
|
93
|
+
| `/rollback` | Undo last AI file change |
|
|
94
|
+
| `/help` | Show help |
|
|
89
95
|
|
|
90
96
|
## Available Models
|
|
91
97
|
|
|
92
98
|
All models are provided via OpenRouter:
|
|
93
99
|
|
|
94
100
|
- MiMo V2 (default)
|
|
95
|
-
- Qwen3 235B
|
|
96
|
-
-
|
|
97
|
-
- Llama 3.3 70B
|
|
98
|
-
- Llama 4 Maverick
|
|
101
|
+
- Qwen3 235B / Coder
|
|
102
|
+
- Llama 3.3 70B / 4 Maverick
|
|
99
103
|
- Devstral Small
|
|
100
104
|
- Mistral Small 3.2
|
|
101
105
|
- Nemotron Nano 12B
|
|
@@ -107,26 +111,34 @@ All models are provided via OpenRouter:
|
|
|
107
111
|
## Security
|
|
108
112
|
|
|
109
113
|
- Requires Google authentication
|
|
110
|
-
- Uses Firebase auth tokens
|
|
114
|
+
- Uses Firebase auth tokens with request signing
|
|
115
|
+
- CLI version and device fingerprinting for request verification
|
|
116
|
+
- Request ID tracking for audit trails
|
|
111
117
|
- No secrets stored in CLI code
|
|
112
118
|
- All requests verified server-side
|
|
113
119
|
|
|
114
|
-
## MCP Support
|
|
120
|
+
## MCP Support
|
|
115
121
|
|
|
116
122
|
Woozlit CLI supports the **Model Context Protocol (MCP)**, allowing the AI to use external tools.
|
|
117
123
|
|
|
118
124
|
**Manage MCP Servers:**
|
|
119
125
|
```bash
|
|
120
|
-
# Add an MCP server
|
|
121
126
|
woozlit mcp add sqlite uvx mcp-server-sqlite --db test.db
|
|
122
|
-
|
|
123
|
-
# List connected servers
|
|
124
127
|
woozlit mcp list
|
|
125
|
-
|
|
126
|
-
# Remove a server
|
|
127
128
|
woozlit mcp remove sqlite
|
|
128
129
|
```
|
|
129
130
|
|
|
130
|
-
Once added, the AI can automatically discover and use tools provided by these servers
|
|
131
|
+
Once added, the AI can automatically discover and use tools provided by these servers.
|
|
131
132
|
|
|
132
133
|
Use `/mcp` in the chat to see currently active tools.
|
|
134
|
+
|
|
135
|
+
## Changelog
|
|
136
|
+
|
|
137
|
+
### v1.1.0
|
|
138
|
+
- Added `/rollback` command to undo AI file changes
|
|
139
|
+
- Added local conversation history (1-week retention)
|
|
140
|
+
- Improved MCP display (shows server count instead of tool list)
|
|
141
|
+
- Added platform detection for Windows/macOS/Linux
|
|
142
|
+
- Enhanced security headers (CLI version, request ID, device fingerprint)
|
|
143
|
+
- Added elapsed time display after task completion
|
|
144
|
+
|
package/dist/auth/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5675e3,_0x23fa81){const _0x2095c2=a0_0xa99a,_0x1f35a9=_0x5675e3();while(!![]){try{const _0xb8f3ef=parseInt(_0x2095c2(0xa9))/0x1*(parseInt(_0x2095c2(0x98))/0x2)+-parseInt(_0x2095c2(0xa4))/0x3*(-parseInt(_0x2095c2(0x9c))/0x4)+-parseInt(_0x2095c2(0xa6))/0x5*(parseInt(_0x2095c2(0xa3))/0x6)+parseInt(_0x2095c2(0xa8))/0x7*(parseInt(_0x2095c2(0x9e))/0x8)+parseInt(_0x2095c2(0x8f))/0x9*(-parseInt(_0x2095c2(0x9b))/0xa)+-parseInt(_0x2095c2(0x91))/0xb*(-parseInt(_0x2095c2(0x9d))/0xc)+-parseInt(_0x2095c2(0x8d))/0xd*(parseInt(_0x2095c2(0xaa))/0xe);if(_0xb8f3ef===_0x23fa81)break;else _0x1f35a9['push'](_0x1f35a9['shift']());}catch(_0x3dced9){_0x1f35a9['push'](_0x1f35a9['shift']());}}}(a0_0x5898,0x5e080));function a0_0xa99a(_0x59ae2e,_0x515d77){_0x59ae2e=_0x59ae2e-0x8d;const _0x589861=a0_0x5898();let _0xa99a0=_0x589861[_0x59ae2e];return _0xa99a0;}function a0_0x5898(){const _0x5159e6=['/callback','writeHead','close','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!DOCTYPE\x20html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<head><title>Woozlit\x20CLI</title></head>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<body\x20style=\x22font-family:\x20sans-serif;\x20text-align:\x20center;\x20padding:\x202rem;\x20background:\x20#0a0a0a;\x20color:\x20#fff;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h1\x20style=\x22color:\x20#ef4444;\x22>Login\x20Failed</h1>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Missing\x20authentication\x20data.\x20Please\x20try\x20again.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</html>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2KBiLWd','pathname','text/html','7515460qNmHBp','4PppzGu','5532AwhLCf','416168KZWFLY','get','listen','displayName','url','6aBIHBd','764415UEaTtb','end','2448455lyLKfa','http://localhost:','63WeIVFt','644261hzFcLz','56kHdAwV','814879tQXBHC','userId','9zeFhSR','\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','12166dOPkaD','/auth/cli?callback=http://localhost:','searchParams'];a0_0x5898=function(){return _0x5159e6;};return a0_0x5898();}import a0_0xd69254 from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x47336a}from'../utils/storage.js';export async function login(){const _0x543087=getApiUrl(),_0x49f139=0x2694;return new Promise(_0x254067=>{const _0x2df692=a0_0xa99a,_0x1f8c57=createServer(async(_0x225726,_0x34032f)=>{const _0x2a464d=a0_0xa99a,_0x147c6a=new URL(_0x225726[_0x2a464d(0xa2)]||'',_0x2a464d(0xa7)+_0x49f139);if(_0x147c6a[_0x2a464d(0x99)]===_0x2a464d(0x94)){const _0x3c7d57=_0x147c6a['searchParams'][_0x2a464d(0x9f)]('token'),_0x1fb85f=_0x147c6a[_0x2a464d(0x93)]['get'](_0x2a464d(0x8e)),_0x1dd9cc=_0x147c6a['searchParams']['get']('email'),_0x105d07=_0x147c6a[_0x2a464d(0x93)][_0x2a464d(0x9f)](_0x2a464d(0xa1));_0x3c7d57&&_0x1fb85f?(setToken(_0x3c7d57),setUser(_0x1fb85f,_0x1dd9cc||'',_0x105d07||''),_0x34032f[_0x2a464d(0x95)](0xc8,{'Content-Type':'text/html'}),_0x34032f[_0x2a464d(0xa5)](_0x2a464d(0x90)),_0x1f8c57['close'](),_0x254067(!![])):(_0x34032f[_0x2a464d(0x95)](0x190,{'Content-Type':_0x2a464d(0x9a)}),_0x34032f[_0x2a464d(0xa5)](_0x2a464d(0x97)),_0x1f8c57[_0x2a464d(0x96)](),_0x254067(![]));}});_0x1f8c57[_0x2df692(0xa0)](_0x49f139,()=>{const _0x198f10=_0x2df692,_0x49d61c=_0x543087+_0x198f10(0x92)+_0x49f139+'/callback';a0_0xd69254(_0x49d61c);}),setTimeout(()=>{const _0x15560c=_0x2df692;_0x1f8c57[_0x15560c(0x96)](),_0x254067(![]);},0x1d4c0);});}export function logout(){a0_0x47336a();}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
|
+
const a1_0x367b6e=a1_0x5546;(function(_0xf2899f,_0x389f41){const _0x1dd9c5=a1_0x5546,_0x18ff6d=_0xf2899f();while(!![]){try{const _0x333e30=parseInt(_0x1dd9c5(0x1ad))/0x1+parseInt(_0x1dd9c5(0x1f1))/0x2+-parseInt(_0x1dd9c5(0x1a0))/0x3*(-parseInt(_0x1dd9c5(0x1af))/0x4)+parseInt(_0x1dd9c5(0x1ce))/0x5+parseInt(_0x1dd9c5(0x18a))/0x6*(parseInt(_0x1dd9c5(0x1e9))/0x7)+-parseInt(_0x1dd9c5(0x1b2))/0x8*(parseInt(_0x1dd9c5(0x1a1))/0x9)+-parseInt(_0x1dd9c5(0x1be))/0xa;if(_0x333e30===_0x389f41)break;else _0x18ff6d['push'](_0x18ff6d['shift']());}catch(_0xdb2e7d){_0x18ff6d['push'](_0x18ff6d['shift']());}}}(a1_0x56d7,0x580be));import{input}from'@inquirer/prompts';import{sendChatMessage,getUserUsage}from'../utils/api.js';function a1_0x56d7(){const _0x703120=['createSpinner','184284bHhyks','214866kDCFiQ','stdout','now','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','slice','Unknown','isOverLimit','actionSpinner','size','Connected\x20MCP\x20Tools:','system','dim','407894PfkGWE','trim','44eWnojc','Unknown\x20tool:\x20','isSpinning','112cgINys','.\x20Use\x20','\x20\x20/help\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','Executing...','Searching...','):\x20','API\x20error:\x20','monthlyLimit','Tool\x20error:\x20','run_command','/help','14301950ULKmsj','email','Commands','#2563eb','assistant','list','Running...','pattern','Listing...','#60a5fa','gradientText','../tools/file.js','list_directory','stringify','content','Current\x20model:\x20','852165RbOcaz','edit','Reading...','read_file','No\x20MCP\x20tools\x20connected.','force\x20closed','push','message','\x20\x20/exit\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat','displayName','Tool\x20result\x20for\x20','args','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','../tools/rollback.js','keys','write','error','edit_file','\x0aYou\x20are\x20running\x20on\x20','```','success','No\x20changes\x20to\x20rollback','read','name','warn','stop','map','546707EjpvAJ','/exit','parse','```tool','/usage','forEach','/stats','properties','1273462kVgWSg','description','\x20>\x20','loggedInBox','info','toolActivity','create','\x20\x20/usage\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','mcpConnected','Conversation\x20cleared','replace','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','startsWith','cwd','find_files','start','usageBox','Goodbye!','Unknown\x20tool','user','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','\x20\x20/model\x20\x20\x20\x20-\x20Switch\x20AI\x20model','18hqLfuQ','Model\x20changed\x20to:\x20','serverName','currentDir','Editing...','search_directory','find','/quit','Thinking...','Unexpected\x20error:\x20','path','MCP\x20Tool\x20error:\x20','commandOutput','Failed\x20JSON\x20content:','length','Creating...','/clear','create_file','includes','join','search'];a1_0x56d7=function(){return _0x703120;};return a1_0x56d7();}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_0x26fa08 from'../ui/output.js';import{selectModel}from'../ui/select.js';function a1_0x5546(_0x45cec3,_0xf9cee7){_0x45cec3=_0x45cec3-0x18a;const _0x56d7f8=a1_0x56d7();let _0x5546b3=_0x56d7f8[_0x45cec3];return _0x5546b3;}import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';const SYSTEM_PROMPT=a1_0x367b6e(0x1a4);export async function startChat(_0x4a22d6){const _0x5b2af3=a1_0x367b6e,_0x5aa869=getSelectedModel();await connectToMcpServers();const _0x4b0811=await getMcpTools(),_0x491f25=new Set(_0x4b0811['map'](_0x554484=>_0x554484['serverName']));_0x491f25[_0x5b2af3(0x1a9)]>0x0&&a1_0x26fa08[_0x5b2af3(0x1f9)](_0x491f25[_0x5b2af3(0x1a9)],_0x4b0811[_0x5b2af3(0x198)]);process['on']('exit',()=>closeMcpClients());const _0x326cc3=formatRulesForSystem(),_0x191106=getPlatformInfo(),_0x2b5768=getShellPrefix(),_0x17a52a=_0x4b0811[_0x5b2af3(0x198)]>0x0?_0x5b2af3(0x1b5)+_0x4b0811[_0x5b2af3(0x1e8)](_0x287fdf=>{const _0x3135c5=_0x5b2af3,_0x3f82d0=Object[_0x3135c5(0x1dc)](_0x287fdf['inputSchema']?.[_0x3135c5(0x1f0)]||{})[_0x3135c5(0x19d)](',\x20');return'-\x20'+_0x287fdf[_0x3135c5(0x1e5)]+'('+_0x3f82d0+_0x3135c5(0x1b8)+_0x287fdf[_0x3135c5(0x1f2)];})[_0x5b2af3(0x19d)]('\x0a'):'',_0x48a0c3=isWindows()?_0x5b2af3(0x1e0)+_0x191106+'.\x20Use\x20PowerShell\x20commands.':_0x5b2af3(0x1e0)+_0x191106+_0x5b2af3(0x1b3)+_0x2b5768+_0x5b2af3(0x1da),_0x87707a=SYSTEM_PROMPT+_0x17a52a+_0x48a0c3+'\x0a'+_0x326cc3,_0x1f2538=getUser(),_0x1e9732=[{'role':_0x5b2af3(0x1ab),'content':_0x87707a}];(_0x1f2538[_0x5b2af3(0x1d7)]||_0x1f2538['email'])&&a1_0x26fa08[_0x5b2af3(0x1f4)](_0x1f2538[_0x5b2af3(0x1d7)]||_0x1f2538[_0x5b2af3(0x1bf)]||_0x5b2af3(0x1a6));a1_0x26fa08[_0x5b2af3(0x18d)](process[_0x5b2af3(0x1fe)]()),a1_0x26fa08[_0x5b2af3(0x1ac)](_0x5b2af3(0x205)),a1_0x26fa08['statusBar'](_0x5aa869,0x64);const _0x216e0e=async _0x5f13e5=>{const _0x28965d=_0x5b2af3;if(!_0x5f13e5||_0x5f13e5[_0x28965d(0x1ae)]()==='')return!![];const _0x383a4e=_0x5f13e5['trim']();if(_0x383a4e===_0x28965d(0x1ea)||_0x383a4e===_0x28965d(0x191))return a1_0x26fa08['info'](_0x28965d(0x202)),![];if(_0x383a4e===_0x28965d(0x19a))return _0x1e9732[_0x28965d(0x198)]=0x1,a1_0x26fa08[_0x28965d(0x1f5)](_0x28965d(0x1fa)),!![];if(_0x383a4e==='/mcp'){const _0xcb7f88=await getMcpTools();return _0xcb7f88[_0x28965d(0x198)]===0x0?a1_0x26fa08[_0x28965d(0x1f5)](_0x28965d(0x1d2)):(a1_0x26fa08[_0x28965d(0x1f5)](_0x28965d(0x1aa)),_0xcb7f88[_0x28965d(0x1ee)](_0x333ebe=>a1_0x26fa08[_0x28965d(0x1ac)]('-\x20'+_0x333ebe[_0x28965d(0x1e5)]+'\x20('+_0x333ebe[_0x28965d(0x18c)]+_0x28965d(0x1b8)+(_0x333ebe[_0x28965d(0x1f2)]?.[_0x28965d(0x1a5)](0x0,0x32)||'')))),a1_0x26fa08[_0x28965d(0x1ac)](_0x28965d(0x1fc)),!![];}if(_0x383a4e===_0x28965d(0x1bd))return a1_0x26fa08['header'](_0x28965d(0x1c0)),a1_0x26fa08[_0x28965d(0x1ac)](_0x28965d(0x1d6)),a1_0x26fa08['dim']('\x20\x20/clear\x20\x20\x20\x20-\x20Clear\x20conversation\x20history'),a1_0x26fa08[_0x28965d(0x1ac)](_0x28965d(0x206)),a1_0x26fa08['dim']('\x20\x20/mcp\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools'),a1_0x26fa08[_0x28965d(0x1ac)](_0x28965d(0x1f8)),a1_0x26fa08[_0x28965d(0x1ac)]('\x20\x20/rollback\x20-\x20Undo\x20last\x20AI\x20file\x20change'),a1_0x26fa08[_0x28965d(0x1ac)](_0x28965d(0x1b4)),!![];if(_0x383a4e==='/rollback'){const {rollbackLast:_0x22557c,getChanges:_0x146a84}=await import(_0x28965d(0x1db)),_0x2406ec=_0x146a84();if(_0x2406ec['length']===0x0)a1_0x26fa08[_0x28965d(0x1f5)](_0x28965d(0x1e3));else{const _0x1b9c94=_0x22557c();_0x1b9c94[_0x28965d(0x1e2)]?a1_0x26fa08['success'](_0x1b9c94[_0x28965d(0x1d5)]):a1_0x26fa08[_0x28965d(0x1de)](_0x1b9c94[_0x28965d(0x1d5)]);}return!![];}if(_0x383a4e==='/model'){const _0x410e79=await selectModel();return _0x410e79!==_0x5aa869?(a1_0x26fa08['info'](_0x28965d(0x18b)+_0x410e79),a1_0x26fa08[_0x28965d(0x1f5)]('Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.')):a1_0x26fa08[_0x28965d(0x1f5)](_0x28965d(0x1cd)+_0x5aa869),!![];}if(_0x383a4e===_0x28965d(0x1ed)||_0x383a4e===_0x28965d(0x1ef)){const _0x34a652=a1_0x26fa08['createSpinner']('Fetching\x20usage...');_0x34a652[_0x28965d(0x200)]();const _0x262c1c=await getUserUsage();return _0x34a652[_0x28965d(0x1e7)](),_0x262c1c?a1_0x26fa08[_0x28965d(0x201)](_0x262c1c['tokensUsed'],_0x262c1c[_0x28965d(0x1ba)],_0x262c1c[_0x28965d(0x1a7)]):a1_0x26fa08['error']('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}return _0x1e9732[_0x28965d(0x1d4)]({'role':'user','content':_0x383a4e}),await processAgentLoop(_0x1e9732,_0x5aa869),!![];};if(_0x4a22d6){const _0x159acd=await _0x216e0e(_0x4a22d6);if(!_0x159acd)return;}while(!![]){try{const _0x1694f8=a1_0x26fa08[_0x5b2af3(0x1c8)](_0x5b2af3(0x1f3),_0x5b2af3(0x1c7),_0x5b2af3(0x1c1)),_0x546b62=await input({'message':_0x1694f8,'theme':{'prefix':''}}),_0x508de7=await _0x216e0e(_0x546b62);if(!_0x508de7)break;}catch(_0x3e4a01){if(_0x3e4a01 instanceof Error&&_0x3e4a01[_0x5b2af3(0x1d5)][_0x5b2af3(0x19c)](_0x5b2af3(0x1d3)))break;a1_0x26fa08[_0x5b2af3(0x1de)](_0x5b2af3(0x193)+_0x3e4a01);}}}async function processAgentLoop(_0x5a5c56,_0x1ea61e){const _0x378865=a1_0x367b6e;let _0x1a1a63=0x0;const _0x47742c=0x3e8;while(_0x1a1a63<_0x47742c){_0x1a1a63++;const _0x1a80c1=a1_0x26fa08[_0x378865(0x19f)](_0x378865(0x192));_0x1a80c1[_0x378865(0x200)]();let _0x49ea2b='',_0x168d1b=![],_0xe0c789='';try{const _0x5f160e=await sendChatMessage(_0x1ea61e,_0x5a5c56,_0x3cb874=>{const _0x26227b=_0x378865;_0x1a80c1[_0x26227b(0x1b1)]&&(_0x1a80c1[_0x26227b(0x1e7)](),a1_0x26fa08['aiMessage'](''));_0x49ea2b+=_0x3cb874;for(const _0x3f00fc of _0x3cb874){_0xe0c789+=_0x3f00fc;if(_0x3f00fc==='\x0a'){if(!_0x168d1b){if(_0xe0c789[_0x26227b(0x1fd)](_0x26227b(0x1ec)))_0x168d1b=!![];else _0xe0c789['startsWith'](_0x26227b(0x1e1))?process['stdout'][_0x26227b(0x1dd)](_0xe0c789):process[_0x26227b(0x1a2)][_0x26227b(0x1dd)](_0xe0c789);}else _0xe0c789[_0x26227b(0x1fd)](_0x26227b(0x1e1))&&!_0xe0c789['startsWith'](_0x26227b(0x1ec))&&(_0x168d1b=![]);_0xe0c789='';}}});_0xe0c789&&!_0x168d1b&&!_0xe0c789[_0x378865(0x1fd)](_0x378865(0x1ec))&&process[_0x378865(0x1a2)][_0x378865(0x1dd)](_0xe0c789),_0x49ea2b=_0x5f160e[_0x378865(0x1cc)];}catch(_0x5600c){_0x1a80c1['stop'](),a1_0x26fa08['error'](_0x378865(0x1b9)+_0x5600c);return;}_0x1a80c1[_0x378865(0x1b1)]&&_0x1a80c1['stop']();a1_0x26fa08['aiMessageEnd'](),_0x5a5c56[_0x378865(0x1d4)]({'role':_0x378865(0x1c2),'content':_0x49ea2b});const _0x67706d=_0x49ea2b['match'](/```tool\n([\s\S]*?)\n```/);if(!_0x67706d)break;try{const _0x2b8a0a=_0x67706d[0x1][_0x378865(0x1ae)](),_0x2a7806=JSON[_0x378865(0x1eb)](_0x2b8a0a);a1_0x26fa08[_0x378865(0x1f6)](_0x2a7806[_0x378865(0x1e5)],_0x2a7806['args']);let _0x5b2ef8=_0x378865(0x1b6);if(_0x2a7806[_0x378865(0x1e5)][_0x378865(0x1fd)](_0x378865(0x1e4)))_0x5b2ef8=_0x378865(0x1d0);if(_0x2a7806[_0x378865(0x1e5)][_0x378865(0x1fd)](_0x378865(0x1f7)))_0x5b2ef8=_0x378865(0x199);if(_0x2a7806[_0x378865(0x1e5)][_0x378865(0x1fd)](_0x378865(0x1cf)))_0x5b2ef8=_0x378865(0x18e);if(_0x2a7806['name'][_0x378865(0x1fd)](_0x378865(0x1c3)))_0x5b2ef8=_0x378865(0x1c6);if(_0x2a7806[_0x378865(0x1e5)][_0x378865(0x1fd)](_0x378865(0x19e)))_0x5b2ef8=_0x378865(0x1b7);if(_0x2a7806[_0x378865(0x1e5)]==='run_command')_0x5b2ef8=_0x378865(0x1c4);const _0x3fdca4=a1_0x26fa08[_0x378865(0x1a8)](_0x5b2ef8);_0x3fdca4[_0x378865(0x200)]();const _0x3b1db2=performance[_0x378865(0x1a3)]();let _0x84a9e8;try{_0x84a9e8=await executeToolCall(_0x2a7806['name'],_0x2a7806[_0x378865(0x1d9)]);}catch(_0x25d1b6){if(_0x25d1b6[_0x378865(0x1d5)]&&_0x25d1b6[_0x378865(0x1d5)][_0x378865(0x19c)](_0x378865(0x203))){const _0x415d53=await getMcpTools(),_0x59e975=_0x415d53[_0x378865(0x190)](_0x405d97=>_0x405d97[_0x378865(0x1e5)]===_0x2a7806['name']);if(_0x59e975)try{_0x84a9e8=await executeMcpTool(_0x59e975[_0x378865(0x18c)],_0x59e975['name'],_0x2a7806[_0x378865(0x1d9)]);}catch(_0x73237c){throw new Error(_0x378865(0x195)+_0x73237c);}else throw _0x25d1b6;}else throw _0x25d1b6;}_0x3fdca4[_0x378865(0x1e7)](),_0x5a5c56[_0x378865(0x1d4)]({'role':_0x378865(0x204),'content':_0x378865(0x1d8)+_0x2a7806[_0x378865(0x1e5)]+':\x0a'+JSON[_0x378865(0x1cb)](_0x84a9e8,null,0x2)}),await new Promise(_0x166ec2=>setTimeout(_0x166ec2,0x3e8));}catch(_0x20b66e){a1_0x26fa08['error'](_0x378865(0x1bb)+_0x20b66e);_0x67706d&&_0x67706d[0x1]&&(a1_0x26fa08[_0x378865(0x1ac)](_0x378865(0x197)),a1_0x26fa08[_0x378865(0x1ac)](_0x67706d[0x1]));break;}}_0x1a1a63>=_0x47742c&&a1_0x26fa08[_0x378865(0x1e6)]('Reached\x20maximum\x20iterations');}async function executeToolCall(_0x381418,_0x34bbb7){const _0x683612=a1_0x367b6e;switch(_0x381418){case _0x683612(0x19b):return createFile(_0x34bbb7['path'],_0x34bbb7[_0x683612(0x1cc)]);case _0x683612(0x1d1):return readFile(_0x34bbb7[_0x683612(0x194)]);case _0x683612(0x1ca):return listDirectory(_0x34bbb7[_0x683612(0x194)]||'.');case _0x683612(0x1df):return editFile(_0x34bbb7[_0x683612(0x194)],_0x34bbb7[_0x683612(0x19e)],_0x34bbb7[_0x683612(0x1fb)]);case'search_file':return searchFile(_0x34bbb7[_0x683612(0x194)],_0x34bbb7[_0x683612(0x1c5)]);case _0x683612(0x1bc):const {command:_0x124994,background:_0x187ab8,wait:_0xaaaefa}=_0x34bbb7,_0x34fc2e=await runCommand(_0x124994,_0x274ec6=>{const _0x5b0a82=_0x683612;a1_0x26fa08[_0x5b0a82(0x196)](_0x274ec6);},_0x187ab8,_0xaaaefa);return _0x34fc2e;case _0x683612(0x1ff):{const {findFiles:_0x6dd868}=await import(_0x683612(0x1c9));return _0x6dd868(_0x34bbb7[_0x683612(0x194)]||'.',_0x34bbb7['pattern']);}case _0x683612(0x18f):{const {searchDirectory:_0x320a52}=await import(_0x683612(0x1c9));return _0x320a52(_0x34bbb7[_0x683612(0x194)]||'.',_0x34bbb7[_0x683612(0x1c5)]);}default:return{'error':_0x683612(0x1b0)+_0x381418};}}
|
package/dist/config/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x26a036=a2_0x31ce;(function(_0x45ab80,_0x597394){const _0x5893f5=a2_0x31ce,_0x1a1313=_0x45ab80();while(!![]){try{const _0x25fcb4=parseInt(_0x5893f5(0x1f2))/0x1+-parseInt(_0x5893f5(0x1dd))/0x2+parseInt(_0x5893f5(0x1f1))/0x3+parseInt(_0x5893f5(0x1f0))/0x4*(parseInt(_0x5893f5(0x1e8))/0x5)+parseInt(_0x5893f5(0x1e6))/0x6*(parseInt(_0x5893f5(0x1f6))/0x7)+parseInt(_0x5893f5(0x1e3))/0x8+parseInt(_0x5893f5(0x1e7))/0x9*(-parseInt(_0x5893f5(0x1dc))/0xa);if(_0x25fcb4===_0x597394)break;else _0x1a1313['push'](_0x1a1313['shift']());}catch(_0x7183bb){_0x1a1313['push'](_0x1a1313['shift']());}}}(a2_0x2a46,0x83287));import a2_0x180dde from'conf';function a2_0x2a46(){const _0x288aa7=['computer-use.ts','41690sYBLGE','1140564phkKAd','.js','mcpServers','join','node','npx','6887080YfwKGd','dirname','@modelcontextprotocol/server-filesystem','78ZAkrCj','5013hLpkEY','352975WAFxuq','computer-use.js','get','C:\x5cUsers','mcp-servers','computer-use','set','uvx','52TRfsDI','1873137ZAWuSf','368072EwiIcw','windows-mcp','woozlit-cli','command','354613AEitQM','dist'];a2_0x2a46=function(){return _0x288aa7;};return a2_0x2a46();}function a2_0x31ce(_0x249d82,_0x50a63e){_0x249d82=_0x249d82-0x1dc;const _0x2a46cf=a2_0x2a46();let _0x31ceea=_0x2a46cf[_0x249d82];return _0x31ceea;}const config=new a2_0x180dde({'projectName':a2_0x26a036(0x1f4),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x3642b6=a2_0x26a036;return config[_0x3642b6(0x1ea)](_0x3642b6(0x1df));}export function addMcpServer(_0x2d7685,_0x6219cf,_0x12cf1f=[],_0x4da526){const _0x4b3754=a2_0x26a036,_0x26eaf4=getMcpServers();_0x26eaf4[_0x2d7685]={'command':_0x6219cf,'args':_0x12cf1f,'env':_0x4da526},config[_0x4b3754(0x1ee)](_0x4b3754(0x1df),_0x26eaf4);}export function removeMcpServer(_0x2e93b0){const _0xe7f87c=a2_0x26a036,_0x44de23=getMcpServers();if(_0x44de23[_0x2e93b0])return delete _0x44de23[_0x2e93b0],config[_0xe7f87c(0x1ee)](_0xe7f87c(0x1df),_0x44de23),!![];return![];}export function getMcpServer(_0x1e5543){return getMcpServers()[_0x1e5543];}import a2_0x25084e from'path';import{fileURLToPath}from'url';export function ensureDefaultServers(){const _0x4a1403=a2_0x26a036,_0x3125b2=getMcpServers(),_0x35b086=fileURLToPath(import.meta.url),_0x3f222b=a2_0x25084e[_0x4a1403(0x1e4)](_0x35b086),_0x51bbbd=_0x3f222b['includes'](_0x4a1403(0x1f7))||_0x35b086['endsWith'](_0x4a1403(0x1de)),_0x21402b=_0x51bbbd?a2_0x25084e[_0x4a1403(0x1e0)](_0x3f222b,'..',_0x4a1403(0x1ec),_0x4a1403(0x1e9)):a2_0x25084e['join'](_0x3f222b,'..','..','src',_0x4a1403(0x1ec),_0x4a1403(0x1f8)),_0x542c6e=_0x51bbbd?_0x4a1403(0x1e1):'tsx';_0x3125b2[_0x4a1403(0x1ed)]={'command':_0x542c6e,'args':[_0x21402b],'env':{}},(!_0x3125b2[_0x4a1403(0x1f3)]||_0x3125b2[_0x4a1403(0x1f3)][_0x4a1403(0x1f5)]===_0x4a1403(0x1ef))&&(_0x3125b2['windows-mcp']={'command':_0x4a1403(0x1e2),'args':['-y',_0x4a1403(0x1e5),_0x4a1403(0x1eb)],'env':{}}),config['set']('mcpServers',_0x3125b2);}
|
package/dist/config/settings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x186ff7=a3_0x3ea3;function a3_0x4008(){const _0x5d39c6=['Kimi\x20K2','xiaomi/mimo-v2-flash:free','meta-llama/llama-4-maverick','Latest\x20Mistral','3xYhIQt','Reasoning\x20model','Alibaba\x27s\x20largest','Qwen3\x20235B','2907936iMjTXE','Developer-focused','58150qtIdaW','Devstral\x20Small','Meta\x27s\x20latest','mistralai/mistral-small-3.2-24b-instruct','tngtech/deepseek-r1t-chimera:free','mistralai/devstral-small','qwen/qwen3-235b-a22b:free','Mistral\x20Small\x203.2','Advanced\x20coding','Xiaomi\x27s\x20fast\x20AI\x20model','10UJpxXN','338520ECaCyN','Zhipu\x20AI\x20model','NVIDIA\x20vision','27XQTQIx','1755660qImZvA','1430358aOCilS','nvidia/nemotron-nano-12b-v2-vl:free','meta-llama/llama-3.3-70b-instruct:free','env','969460CTunid','https://woozlit.com','Llama\x203.3\x2070B','GLM\x204.5\x20Air','qwen/qwen3-coder:free','Nemotron\x20Nano\x2012B','Coding\x20specialist','moonshotai/kimi-k2','5212200qtSlRV','Kat\x20Coder\x20Pro'];a3_0x4008=function(){return _0x5d39c6;};return a3_0x4008();}function a3_0x3ea3(_0x5385ed,_0x881f71){_0x5385ed=_0x5385ed-0x18b;const _0x40080e=a3_0x4008();let _0x3ea3bc=_0x40080e[_0x5385ed];return _0x3ea3bc;}(function(_0x218bdb,_0x15c2b1){const _0x236fc1=a3_0x3ea3,_0x265f15=_0x218bdb();while(!![]){try{const _0x544b6e=parseInt(_0x236fc1(0x1b2))/0x1*(-parseInt(_0x236fc1(0x190))/0x2)+parseInt(_0x236fc1(0x19f))/0x3+parseInt(_0x236fc1(0x18e))/0x4+parseInt(_0x236fc1(0x19a))/0x5*(-parseInt(_0x236fc1(0x1a0))/0x6)+parseInt(_0x236fc1(0x19b))/0x7+-parseInt(_0x236fc1(0x1ac))/0x8+-parseInt(_0x236fc1(0x19e))/0x9*(-parseInt(_0x236fc1(0x1a4))/0xa);if(_0x544b6e===_0x15c2b1)break;else _0x265f15['push'](_0x265f15['shift']());}catch(_0x2a1dd3){_0x265f15['push'](_0x265f15['shift']());}}}(a3_0x4008,0x6a69a));const API_URL=process[a3_0x186ff7(0x1a3)]['WOOZLIT_API_URL']||a3_0x186ff7(0x1a5),PROD_URL=a3_0x186ff7(0x1a5);export function getApiUrl(){return API_URL;}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':a3_0x186ff7(0x1af),'name':'MiMo\x20V2','description':a3_0x186ff7(0x199)},{'id':a3_0x186ff7(0x196),'name':a3_0x186ff7(0x18d),'description':a3_0x186ff7(0x18c)},{'id':a3_0x186ff7(0x1a8),'name':'Qwen3\x20Coder','description':a3_0x186ff7(0x1aa)},{'id':a3_0x186ff7(0x1a2),'name':a3_0x186ff7(0x1a6),'description':'Meta\x27s\x20powerful\x20model'},{'id':a3_0x186ff7(0x1b0),'name':'Llama\x204\x20Maverick','description':a3_0x186ff7(0x192)},{'id':a3_0x186ff7(0x195),'name':a3_0x186ff7(0x191),'description':a3_0x186ff7(0x18f)},{'id':a3_0x186ff7(0x193),'name':a3_0x186ff7(0x197),'description':a3_0x186ff7(0x1b1)},{'id':a3_0x186ff7(0x1a1),'name':a3_0x186ff7(0x1a9),'description':a3_0x186ff7(0x19d)},{'id':a3_0x186ff7(0x1ab),'name':a3_0x186ff7(0x1ae),'description':a3_0x186ff7(0x18b)},{'id':'z-ai/glm-4.5-air:free','name':a3_0x186ff7(0x1a7),'description':a3_0x186ff7(0x19c)},{'id':'kwaipilot/kat-coder-pro:free','name':a3_0x186ff7(0x1ad),'description':a3_0x186ff7(0x198)},{'id':a3_0x186ff7(0x194),'name':'DeepSeek\x20R1T\x20Chimera','description':'Reasoning\x20model'}];export const DEFAULT_MODEL=a3_0x186ff7(0x1af);
|
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
|
+
function a4_0x583f(_0x5976ed,_0x48dc15){_0x5976ed=_0x5976ed-0x1ab;const _0x1ea97f=a4_0x1ea9();let _0x583f00=_0x1ea97f[_0x5976ed];return _0x583f00;}const a4_0x5434aa=a4_0x583f;(function(_0x20fbfa,_0x256308){const _0x5190ce=a4_0x583f,_0x30e026=_0x20fbfa();while(!![]){try{const _0x265c06=-parseInt(_0x5190ce(0x1ba))/0x1*(-parseInt(_0x5190ce(0x1d5))/0x2)+parseInt(_0x5190ce(0x1df))/0x3+parseInt(_0x5190ce(0x1e9))/0x4*(parseInt(_0x5190ce(0x1bd))/0x5)+parseInt(_0x5190ce(0x1ec))/0x6+-parseInt(_0x5190ce(0x1c2))/0x7*(parseInt(_0x5190ce(0x1d1))/0x8)+-parseInt(_0x5190ce(0x1f5))/0x9+-parseInt(_0x5190ce(0x1b1))/0xa;if(_0x265c06===_0x256308)break;else _0x30e026['push'](_0x30e026['shift']());}catch(_0x34e293){_0x30e026['push'](_0x30e026['shift']());}}}(a4_0x1ea9,0xd7973));import{Command}from'commander';import{login,logout,isLoggedIn}from'./auth/login.js';import{startChat}from'./chat/agent.js';function a4_0x1ea9(){const _0x18f207=['success','Login\x20failed\x20or\x20timed\x20out','some','Added\x20MCP\x20server:\x20','parse','woozlit','rules','No\x20rules\x20defined','Removed\x20MCP\x20server:\x20','.woozlit/context.md','262832ApAlzr','start','ask\x20<message>','List\x20all\x20MCP\x20servers','245648ugLfVL','Woozlit\x20already\x20initialized\x20in\x20this\x20directory','Show\x20current\x20user\x20info','init','info','List\x20all\x20rules','add\x20<name>\x20<command>\x20[args...]','stdout','args','Manage\x20MCP\x20servers','4738611JKNUfG','Opening\x20browser\x20for\x20login...','command','Name:\x20','All\x20rules\x20cleared','You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.','#\x20Project\x20Rules\x0a\x0aAdd\x20your\x20project-specific\x20rules\x20here.\x0a','model','displayName','whoami','9892FMjnpY','N/A','Email:\x20','1747836dcCHJp','MCP\x20server\x20\x27','Initialized\x20Woozlit\x20in\x20current\x20directory','Logged\x20out\x20successfully','.woozlit','.woozlit/rules.md','Added\x20rule:\x20','Logout\x20from\x20your\x20Woozlit\x20account','Logged\x20in\x20as\x20','14681763JDGyyH','error','\x27\x20not\x20found','name','length','forEach','./tools/file.js','email','Add\x20a\x20new\x20rule','join','1186530eCwPoM','warn','Add\x20a\x20new\x20MCP\x20server','action','Already\x20logged\x20in\x20as\x20','dim','Rules','Created\x20.woozlit/rules.md\x20and\x20.woozlit/context.md','header','11DdlJIc','createSpinner','Select\x20AI\x20model','470zzMKcS','showLogo','description','Waiting\x20for\x20authentication...','stop','175MxMndp','MCP\x20Servers','remove\x20<name>','list','Current\x20User'];a4_0x1ea9=function(){return _0x18f207;};return a4_0x1ea9();}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_0x36840b from'./ui/output.js';const program=new Command();program[a4_0x5434aa(0x1f8)](a4_0x5434aa(0x1cc))[a4_0x5434aa(0x1bf)]('Woozlit\x20AI\x20-\x20Agentic\x20Coding\x20Assistant')['version']('1.0.7')[a4_0x5434aa(0x1b4)](async()=>{const _0x25eb22=a4_0x5434aa;ensureDefaultServers(),a4_0x36840b[_0x25eb22(0x1be)]();if(!isLoggedIn()){a4_0x36840b[_0x25eb22(0x1b2)](_0x25eb22(0x1e4)),a4_0x36840b[_0x25eb22(0x1b6)](''),a4_0x36840b[_0x25eb22(0x1d9)]('Opening\x20browser\x20for\x20login...');const _0x184f45=a4_0x36840b[_0x25eb22(0x1bb)](_0x25eb22(0x1c0));_0x184f45[_0x25eb22(0x1d2)]();const _0x1663aa=await login();_0x184f45['stop']();if(!_0x1663aa){a4_0x36840b['error'](_0x25eb22(0x1c8));return;}const _0xe390d2=getUser();a4_0x36840b[_0x25eb22(0x1c7)](_0x25eb22(0x1f4)+(_0xe390d2['displayName']||_0xe390d2['email']));}await startChat();}),program[a4_0x5434aa(0x1e1)]('login')[a4_0x5434aa(0x1bf)]('Login\x20with\x20your\x20Woozlit\x20account')[a4_0x5434aa(0x1b4)](async()=>{const _0x4e132c=a4_0x5434aa;if(isLoggedIn()){const _0x411c79=getUser();a4_0x36840b['info'](_0x4e132c(0x1b5)+_0x411c79['email']);return;}a4_0x36840b[_0x4e132c(0x1d9)]('Opening\x20browser\x20for\x20login...');const _0x52746a=a4_0x36840b[_0x4e132c(0x1bb)](_0x4e132c(0x1c0));_0x52746a[_0x4e132c(0x1d2)]();const _0x455bf6=await login();_0x52746a[_0x4e132c(0x1c1)]();if(_0x455bf6){const _0x3ffd32=getUser();a4_0x36840b['success'](_0x4e132c(0x1f4)+(_0x3ffd32['displayName']||_0x3ffd32[_0x4e132c(0x1ae)]));}else a4_0x36840b[_0x4e132c(0x1f6)]('Login\x20failed\x20or\x20timed\x20out');}),program[a4_0x5434aa(0x1e1)]('logout')['description'](a4_0x5434aa(0x1f3))[a4_0x5434aa(0x1b4)](()=>{const _0x3f8240=a4_0x5434aa;logout(),a4_0x36840b[_0x3f8240(0x1c7)](_0x3f8240(0x1ef));}),program['command'](a4_0x5434aa(0x1e8))[a4_0x5434aa(0x1bf)](a4_0x5434aa(0x1d7))[a4_0x5434aa(0x1b4)](()=>{const _0x36a882=a4_0x5434aa;if(!isLoggedIn()){a4_0x36840b['warn']('Not\x20logged\x20in.\x20Use\x20\x27woozlit\x20login\x27\x20to\x20authenticate.');return;}const _0x550bf5=getUser();a4_0x36840b[_0x36a882(0x1b9)](_0x36a882(0x1c6)),a4_0x36840b[_0x36a882(0x1d9)](_0x36a882(0x1e2)+(_0x550bf5['displayName']||_0x36a882(0x1ea))),a4_0x36840b[_0x36a882(0x1d9)](_0x36a882(0x1eb)+(_0x550bf5[_0x36a882(0x1ae)]||_0x36a882(0x1ea))),a4_0x36840b[_0x36a882(0x1d9)]('Model:\x20'+getSelectedModel());}),program[a4_0x5434aa(0x1e1)]('chat\x20[message]')[a4_0x5434aa(0x1bf)]('Start\x20an\x20AI\x20chat\x20session')[a4_0x5434aa(0x1b4)](async _0xb6a3c8=>{const _0x28d2d4=a4_0x5434aa;a4_0x36840b['showLogo']();if(!isLoggedIn()){a4_0x36840b[_0x28d2d4(0x1b2)](_0x28d2d4(0x1e4)),a4_0x36840b['dim'](''),a4_0x36840b['info'](_0x28d2d4(0x1e0));const _0x451bbc=a4_0x36840b[_0x28d2d4(0x1bb)]('Waiting\x20for\x20authentication...');_0x451bbc[_0x28d2d4(0x1d2)]();const _0x159281=await login();_0x451bbc[_0x28d2d4(0x1c1)]();if(!_0x159281){a4_0x36840b[_0x28d2d4(0x1f6)](_0x28d2d4(0x1c8));return;}const _0xf4f9dc=getUser();a4_0x36840b[_0x28d2d4(0x1c7)](_0x28d2d4(0x1f4)+(_0xf4f9dc[_0x28d2d4(0x1e7)]||_0xf4f9dc[_0x28d2d4(0x1ae)]));}await startChat(_0xb6a3c8);}),program[a4_0x5434aa(0x1e1)](a4_0x5434aa(0x1d3))['description']('Ask\x20a\x20single\x20question')[a4_0x5434aa(0x1b4)](async _0x57c7fe=>{const _0x1a2750=a4_0x5434aa;a4_0x36840b['showLogo']();if(!isLoggedIn()){a4_0x36840b[_0x1a2750(0x1b2)]('You\x20must\x20be\x20logged\x20in\x20to\x20use\x20chat.'),a4_0x36840b[_0x1a2750(0x1b6)](''),a4_0x36840b[_0x1a2750(0x1d9)]('Opening\x20browser\x20for\x20login...');const _0x4ccbd2=a4_0x36840b['createSpinner'](_0x1a2750(0x1c0));_0x4ccbd2[_0x1a2750(0x1d2)]();const _0x57e6e8=await login();_0x4ccbd2[_0x1a2750(0x1c1)]();if(!_0x57e6e8){a4_0x36840b[_0x1a2750(0x1f6)](_0x1a2750(0x1c8));return;}const _0x4241f6=getUser();a4_0x36840b[_0x1a2750(0x1c7)](_0x1a2750(0x1f4)+(_0x4241f6[_0x1a2750(0x1e7)]||_0x4241f6[_0x1a2750(0x1ae)]));}await startChat(_0x57c7fe);});const configCmd=program[a4_0x5434aa(0x1e1)]('config')[a4_0x5434aa(0x1bf)]('Configure\x20CLI\x20settings');configCmd['command'](a4_0x5434aa(0x1e6))[a4_0x5434aa(0x1bf)](a4_0x5434aa(0x1bc))[a4_0x5434aa(0x1b4)](async()=>{const _0x4d22c0=a4_0x5434aa,_0x4d6d4d=await selectModel();a4_0x36840b[_0x4d22c0(0x1c7)]('Model\x20set\x20to:\x20'+_0x4d6d4d);});const rulesCmd=program[a4_0x5434aa(0x1e1)](a4_0x5434aa(0x1cd))[a4_0x5434aa(0x1bf)]('Manage\x20AI\x20behavior\x20rules');rulesCmd['command']('list')[a4_0x5434aa(0x1bf)](a4_0x5434aa(0x1da))['action'](()=>{const _0x26e8cb=a4_0x5434aa,_0x4c320d=listRules();if(_0x4c320d[_0x26e8cb(0x1ab)]===0x0){a4_0x36840b[_0x26e8cb(0x1d9)](_0x26e8cb(0x1ce));return;}a4_0x36840b[_0x26e8cb(0x1b9)](_0x26e8cb(0x1b7)),_0x4c320d[_0x26e8cb(0x1ac)]((_0x11647c,_0x53a79b)=>{const _0x24f2ef=_0x26e8cb;process[_0x24f2ef(0x1dc)]['write'](_0x53a79b+0x1+'.\x20'+_0x11647c+'\x0a');});}),rulesCmd[a4_0x5434aa(0x1e1)]('add\x20<rule>')[a4_0x5434aa(0x1bf)](a4_0x5434aa(0x1af))[a4_0x5434aa(0x1b4)](_0x41efa5=>{const _0xa03da5=a4_0x5434aa;addRule(_0x41efa5),a4_0x36840b[_0xa03da5(0x1c7)](_0xa03da5(0x1f2)+_0x41efa5);})['action'](()=>{const _0x1db4e5=a4_0x5434aa;clearRules(),a4_0x36840b[_0x1db4e5(0x1c7)](_0x1db4e5(0x1e3));});const mcpCmd=program[a4_0x5434aa(0x1e1)]('mcp')['description'](a4_0x5434aa(0x1de));mcpCmd['command'](a4_0x5434aa(0x1c5))[a4_0x5434aa(0x1bf)](a4_0x5434aa(0x1d4))['action'](()=>{const _0x1381f6=a4_0x5434aa,_0x29a33a=getMcpServers(),_0x41f347=Object['keys'](_0x29a33a);if(_0x41f347[_0x1381f6(0x1ab)]===0x0){a4_0x36840b[_0x1381f6(0x1d9)]('No\x20MCP\x20servers\x20configured');return;}a4_0x36840b[_0x1381f6(0x1b9)](_0x1381f6(0x1c3)),_0x41f347[_0x1381f6(0x1ac)](_0x22f907=>{const _0x3d7c81=_0x1381f6,_0x519a40=_0x29a33a[_0x22f907];a4_0x36840b[_0x3d7c81(0x1d9)]('-\x20'+_0x22f907+':\x20'+_0x519a40[_0x3d7c81(0x1e1)]+'\x20'+_0x519a40[_0x3d7c81(0x1dd)][_0x3d7c81(0x1b0)]('\x20'));});}),mcpCmd[a4_0x5434aa(0x1e1)](a4_0x5434aa(0x1db))[a4_0x5434aa(0x1bf)](a4_0x5434aa(0x1b3))['action']((_0x405ad7,_0x350ec1,_0x13c108)=>{const _0x1d3aac=a4_0x5434aa;addMcpServer(_0x405ad7,_0x350ec1,_0x13c108),a4_0x36840b[_0x1d3aac(0x1c7)](_0x1d3aac(0x1ca)+_0x405ad7);}),mcpCmd[a4_0x5434aa(0x1e1)](a4_0x5434aa(0x1c4))['description']('Remove\x20an\x20MCP\x20server')[a4_0x5434aa(0x1b4)](_0x55144d=>{const _0x5cefdf=a4_0x5434aa;removeMcpServer(_0x55144d)?a4_0x36840b[_0x5cefdf(0x1c7)](_0x5cefdf(0x1cf)+_0x55144d):a4_0x36840b[_0x5cefdf(0x1f6)](_0x5cefdf(0x1ed)+_0x55144d+_0x5cefdf(0x1f7));}),program['command'](a4_0x5434aa(0x1d8))[a4_0x5434aa(0x1bf)]('Initialize\x20Woozlit\x20in\x20current\x20directory')[a4_0x5434aa(0x1b4)](()=>{const _0x84f45a=a4_0x5434aa,{createFile:_0x1b0be3,listDirectory:_0x54c13f}=require(_0x84f45a(0x1ad)),_0x275979=_0x54c13f('.'),_0x3245a2=_0x275979['entries']?.[_0x84f45a(0x1c9)](_0x54db53=>_0x54db53[_0x84f45a(0x1f8)]===_0x84f45a(0x1f0));if(_0x3245a2){a4_0x36840b[_0x84f45a(0x1b2)](_0x84f45a(0x1d6));return;}_0x1b0be3(_0x84f45a(0x1f1),_0x84f45a(0x1e5)),_0x1b0be3(_0x84f45a(0x1d0),'#\x20Project\x20Context\x0a\x0aDescribe\x20your\x20project\x20here.\x0a'),a4_0x36840b[_0x84f45a(0x1c7)](_0x84f45a(0x1ee)),a4_0x36840b[_0x84f45a(0x1b6)](_0x84f45a(0x1b8));}),program[a4_0x5434aa(0x1cb)]();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x26be44=a5_0x1627;(function(_0xeaaeb9,_0x4a3897){const _0x3cfe11=a5_0x1627,_0x4ab51f=_0xeaaeb9();while(!![]){try{const _0x411ba6=parseInt(_0x3cfe11(0x130))/0x1+parseInt(_0x3cfe11(0x13e))/0x2+-parseInt(_0x3cfe11(0x13d))/0x3*(parseInt(_0x3cfe11(0x151))/0x4)+parseInt(_0x3cfe11(0x149))/0x5*(parseInt(_0x3cfe11(0x12a))/0x6)+parseInt(_0x3cfe11(0x141))/0x7*(-parseInt(_0x3cfe11(0x12e))/0x8)+parseInt(_0x3cfe11(0x137))/0x9+-parseInt(_0x3cfe11(0x163))/0xa;if(_0x411ba6===_0x4a3897)break;else _0x4ab51f['push'](_0x4ab51f['shift']());}catch(_0x36b24c){_0x4ab51f['push'](_0x4ab51f['shift']());}}}(a5_0x5e7c,0x6fb85));import{Server}from'@modelcontextprotocol/sdk/server/index.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';function a5_0x5e7c(){const _0x2f57e0=['Clicked\x20','toString','8058537QCcGGA','getBuffer','number','middle','width','left','808521fpkCvO','1533730VPLYwK','computer_key_tap','keyTap','7rktQXS','computer_type','Screenshot\x20taken.','Tapped\x20key:\x20','Take\x20a\x20screenshot\x20of\x20the\x20primary\x20display.\x20Returns\x20base64\x20encoded\x20image.','command','getScreenSize','image/jpeg','5VcDHTD','\x20button','X\x20coordinate','\x20(double)','Moved\x20mouse\x20to\x20','Error:\x20','shift','Click\x20the\x20mouse\x20button.','12rNHlfC','Unknown\x20tool:\x20','Modifier\x20keys','text','control','computer_screen_size','Typed:\x20\x22','resize','boolean','robotjs','string','computer_mouse_move','screenshot-desktop','image','Y\x20coordinate','Move\x20the\x20mouse\x20cursor\x20to\x20specific\x20coordinates.','bitmap','computer_screenshot','8426250nxrmWe','Get\x20the\x20screen\x20resolution.','computer_mouse_click','Tap\x20a\x20single\x20key\x20with\x20optional\x20modifiers.','Screen\x20size:\x20','554550isjVZH','right','Text\x20to\x20type','alt','2994440oMeNRT','object','728373ejMtgr','params','array','Type\x20a\x20string\x20of\x20text.','with\x20'];a5_0x5e7c=function(){return _0x2f57e0;};return a5_0x5e7c();}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_0x26be44(0x15a));}catch(a5_0x235fc1){}try{screenshot=require(a5_0x26be44(0x15d));}catch(a5_0x4821d2){}const AUTO=-0x1,MIME_JPEG=a5_0x26be44(0x148),server=new Server({'name':'computer-use','version':'1.0.0'},{'capabilities':{'tools':{}}});server['setRequestHandler'](ListToolsRequestSchema,async()=>{const _0x187209=a5_0x26be44;return{'tools':[{'name':_0x187209(0x162),'description':_0x187209(0x145),'inputSchema':{'type':_0x187209(0x12f),'properties':{}}},{'name':_0x187209(0x15c),'description':_0x187209(0x160),'inputSchema':{'type':_0x187209(0x12f),'properties':{'x':{'type':_0x187209(0x139),'description':_0x187209(0x14b)},'y':{'type':_0x187209(0x139),'description':_0x187209(0x15f)}},'required':['x','y']}},{'name':_0x187209(0x165),'description':_0x187209(0x150),'inputSchema':{'type':'object','properties':{'button':{'type':_0x187209(0x15b),'enum':[_0x187209(0x13c),_0x187209(0x12b),_0x187209(0x13a)],'default':_0x187209(0x13c)},'double':{'type':_0x187209(0x159),'default':![]}}}},{'name':_0x187209(0x142),'description':_0x187209(0x133),'inputSchema':{'type':'object','properties':{'text':{'type':'string','description':_0x187209(0x12c)}},'required':['text']}},{'name':_0x187209(0x13f),'description':_0x187209(0x166),'inputSchema':{'type':'object','properties':{'key':{'type':_0x187209(0x15b),'description':'Key\x20to\x20tap\x20(e.g.\x20\x27enter\x27,\x20\x27a\x27,\x20\x27backspace\x27)'},'modifiers':{'type':_0x187209(0x132),'items':{'type':_0x187209(0x15b),'enum':[_0x187209(0x12d),_0x187209(0x146),_0x187209(0x155),_0x187209(0x14f)]},'description':_0x187209(0x153)}},'required':['key']}},{'name':_0x187209(0x156),'description':_0x187209(0x164),'inputSchema':{'type':_0x187209(0x12f),'properties':{}}}]};}),server['setRequestHandler'](CallToolRequestSchema,async _0x25c6d8=>{const _0x4a79e4=a5_0x26be44,{name:_0x58b252,arguments:_0x36653b}=_0x25c6d8[_0x4a79e4(0x131)];try{if(_0x58b252===_0x4a79e4(0x162)){const _0x26bbf8=await screenshot(),_0x350821=await Jimp['read'](_0x26bbf8);_0x350821[_0x4a79e4(0x161)][_0x4a79e4(0x13b)]>0x400&&_0x350821[_0x4a79e4(0x158)]({'w':0x400});const _0x262fdb=await _0x350821[_0x4a79e4(0x138)](MIME_JPEG),_0x352eca=_0x262fdb[_0x4a79e4(0x136)]('base64');return{'content':[{'type':'text','text':_0x4a79e4(0x143)},{'type':_0x4a79e4(0x15e),'data':_0x352eca,'mimeType':'image/jpeg'}]};}if(_0x58b252===_0x4a79e4(0x15c)){const {x:_0x14f737,y:_0x4ec6c1}=_0x36653b;return robot['moveMouse'](_0x14f737,_0x4ec6c1),{'content':[{'type':'text','text':_0x4a79e4(0x14d)+_0x14f737+',\x20'+_0x4ec6c1}]};}if(_0x58b252===_0x4a79e4(0x165)){const {button:button=_0x4a79e4(0x13c),double:double=![]}=_0x36653b;return robot['mouseClick'](button,double),{'content':[{'type':_0x4a79e4(0x154),'text':_0x4a79e4(0x135)+button+_0x4a79e4(0x14a)+(double?_0x4a79e4(0x14c):'')}]};}if(_0x58b252==='computer_type'){const {text:_0x5ba07f}=_0x36653b;return robot['typeString'](_0x5ba07f),{'content':[{'type':'text','text':_0x4a79e4(0x157)+_0x5ba07f+'\x22'}]};}if(_0x58b252==='computer_key_tap'){const {key:_0x44fe0c,modifiers:_0x1653dc}=_0x36653b;return robot[_0x4a79e4(0x140)](_0x44fe0c,_0x1653dc),{'content':[{'type':'text','text':_0x4a79e4(0x144)+_0x44fe0c+'\x20'+(_0x1653dc?_0x4a79e4(0x134)+_0x1653dc['join']('+'):'')}]};}if(_0x58b252===_0x4a79e4(0x156)){const _0x481bd7=robot[_0x4a79e4(0x147)]();return{'content':[{'type':_0x4a79e4(0x154),'text':_0x4a79e4(0x167)+_0x481bd7[_0x4a79e4(0x13b)]+'x'+_0x481bd7['height']}]};}throw new Error(_0x4a79e4(0x152)+_0x58b252);}catch(_0x15815f){return{'content':[{'type':_0x4a79e4(0x154),'text':_0x4a79e4(0x14e)+_0x15815f}],'isError':!![]};}});function a5_0x1627(_0x5b4f2c,_0x4e5787){_0x5b4f2c=_0x5b4f2c-0x12a;const _0x5e7ce3=a5_0x5e7c();let _0x162760=_0x5e7ce3[_0x5b4f2c];return _0x162760;}const transport=new StdioServerTransport();await server['connect'](transport);
|
package/dist/tools/command.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x29f602,_0x3b20dd){const _0x5b4c17=a6_0x170e,_0x20c1e4=_0x29f602();while(!![]){try{const _0x2125eb=parseInt(_0x5b4c17(0x20a))/0x1*(-parseInt(_0x5b4c17(0x203))/0x2)+-parseInt(_0x5b4c17(0x1fd))/0x3+parseInt(_0x5b4c17(0x207))/0x4+parseInt(_0x5b4c17(0x1f6))/0x5+parseInt(_0x5b4c17(0x206))/0x6+parseInt(_0x5b4c17(0x1ff))/0x7*(-parseInt(_0x5b4c17(0x205))/0x8)+-parseInt(_0x5b4c17(0x201))/0x9*(parseInt(_0x5b4c17(0x1f9))/0xa);if(_0x2125eb===_0x3b20dd)break;else _0x20c1e4['push'](_0x20c1e4['shift']());}catch(_0x36a6bf){_0x20c1e4['push'](_0x20c1e4['shift']());}}}(a6_0x2e44,0xabcd2));function a6_0x2e44(){const _0x6db499=['removeAllListeners','close','30kPMiCI','toString','/bin/sh','ms...]','1591512wsxKoB','error','440951inArVr','win32','1005624DEInAS','unref','6oZaWSh','stdout','88HUDUiu','3654138qbUbgx','3070948qCPHmY','message','stderr','142840HQFKdV','cwd','cmd.exe','\x0a[Woozlit:\x20Command\x20continuing\x20in\x20background\x20after\x20','env','data','6570465QSBhme'];a6_0x2e44=function(){return _0x6db499;};return a6_0x2e44();}function a6_0x170e(_0x2f1162,_0x2faacc){_0x2f1162=_0x2f1162-0x1f4;const _0x2e447b=a6_0x2e44();let _0x170e02=_0x2e447b[_0x2f1162];return _0x170e02;}import{spawn}from'child_process';export async function runCommand(_0x34a8b4,_0x1d2942,_0x21f3bf=![],_0x18d478=0xbb8){return new Promise(_0x6a9d22=>{const _0x9306ae=a6_0x170e,_0x591cdc=process['platform']===_0x9306ae(0x200),_0x47a5c6=_0x591cdc?_0x9306ae(0x20c):_0x9306ae(0x1fb),_0x1ee93d=_0x591cdc?'/c':'-c',_0x46123a=spawn(_0x47a5c6,[_0x1ee93d,_0x34a8b4],{'cwd':process[_0x9306ae(0x20b)](),'env':process[_0x9306ae(0x1f4)],'detached':_0x21f3bf,'stdio':'pipe'});let _0x15ce84='',_0x5e9b30='',_0x1872b3=![];_0x21f3bf&&setTimeout(()=>{const _0x537c43=_0x9306ae;if(!_0x1872b3){_0x1872b3=!![];if(_0x46123a[_0x537c43(0x202)])_0x46123a[_0x537c43(0x202)]();_0x46123a[_0x537c43(0x204)]?.[_0x537c43(0x1f7)](_0x537c43(0x1f5)),_0x46123a[_0x537c43(0x209)]?.[_0x537c43(0x1f7)]('data'),_0x6a9d22({'success':!![],'stdout':_0x15ce84+(_0x537c43(0x20d)+_0x18d478+_0x537c43(0x1fc)),'stderr':_0x5e9b30,'exitCode':0x0});}},_0x18d478),_0x46123a[_0x9306ae(0x204)]?.['on'](_0x9306ae(0x1f5),_0x47a0fa=>{const _0x3f5da9=_0x9306ae;if(_0x1872b3)return;const _0x36d8c8=_0x47a0fa[_0x3f5da9(0x1fa)]();_0x15ce84+=_0x36d8c8;if(_0x1d2942)_0x1d2942(_0x36d8c8);}),_0x46123a[_0x9306ae(0x209)]?.['on'](_0x9306ae(0x1f5),_0x446336=>{const _0xff0876=_0x9306ae;if(_0x1872b3)return;const _0x27760a=_0x446336[_0xff0876(0x1fa)]();_0x5e9b30+=_0x27760a;if(_0x1d2942)_0x1d2942(_0x27760a);}),_0x46123a['on'](_0x9306ae(0x1f8),_0x48a330=>{!_0x1872b3&&(_0x1872b3=!![],_0x6a9d22({'success':_0x48a330===0x0,'stdout':_0x15ce84,'stderr':_0x5e9b30,'exitCode':_0x48a330||0x0}));}),_0x46123a['on'](_0x9306ae(0x1fe),_0xbd2caf=>{const _0x5272e9=_0x9306ae;!_0x1872b3&&(_0x1872b3=!![],_0x6a9d22({'success':![],'stdout':_0x15ce84,'stderr':_0xbd2caf[_0x5272e9(0x208)],'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(_0x55c863,_0x5943c0){const _0x46412c=a7_0x48a1,_0x58001a=_0x55c863();while(!![]){try{const _0x17616d=parseInt(_0x46412c(0xd3))/0x1*(parseInt(_0x46412c(0xb4))/0x2)+parseInt(_0x46412c(0xa6))/0x3*(-parseInt(_0x46412c(0xd9))/0x4)+-parseInt(_0x46412c(0xdd))/0x5*(-parseInt(_0x46412c(0xcb))/0x6)+parseInt(_0x46412c(0xb2))/0x7+parseInt(_0x46412c(0xa8))/0x8*(-parseInt(_0x46412c(0xd6))/0x9)+parseInt(_0x46412c(0xc4))/0xa+-parseInt(_0x46412c(0xa2))/0xb*(parseInt(_0x46412c(0xb9))/0xc);if(_0x17616d===_0x5943c0)break;else _0x58001a['push'](_0x58001a['shift']());}catch(_0x1f10a9){_0x58001a['push'](_0x58001a['shift']());}}}(a7_0x1b06,0x694d2));function a7_0x1b06(){const _0x13b2c8=['map','Directory\x20not\x20found:\x20','file','.exe','substring','Failed\x20to\x20find\x20files:\x20','File\x20not\x20found:\x20','Found\x20','3169236YADBCP','.html','29498ZYprIA','.rs','\x20output\x20matches\x20in\x20','startsWith','\x20matches\x20for\x20\x22','36JnUnFF','.md','Failed\x20to\x20create\x20','.go','push','includes','.tsx','filter','.json','node_modules','.bin','8571560sYSqQJ','slice','Read\x20','test','Failed\x20to\x20edit\x20','Search\x20string\x20not\x20found\x20in\x20','replace','6dRYnpT','Listed\x20','\x20files\x20matching\x20\x22','isDirectory','.jpg','.js','pop','[Binary\x20file\x20detected\x20(.','48ubVtdy','cwd','.py','9dKKdKd','.ts','.dll','4xGXggf','utf-8','.css','split','525815rUgOGd','directory','trim','\x20items\x20in\x20','Edited\x20','toLowerCase','4708451tsnQEo','Created\x20','Failed\x20to\x20list\x20','isFile','538605SBSFJr','Failed\x20to\x20search\x20','1824376KQtqtW','length'];a7_0x1b06=function(){return _0x13b2c8;};return a7_0x1b06();}function a7_0x48a1(_0x1f6e40,_0x4247ec){_0x1f6e40=_0x1f6e40-0x9f;const _0x1b0649=a7_0x1b06();let _0x48a1df=_0x1b0649[_0x1f6e40];return _0x48a1df;}import{readFileSync,writeFileSync,existsSync,readdirSync,statSync,mkdirSync}from'fs';import{dirname,resolve,relative}from'path';import{trackFileCreate,trackFileModify}from'./rollback.js';export function createFile(_0x5be72e,_0x113d0c){const _0x35f5f5=a7_0x48a1;try{const _0x270e2a=resolve(process[_0x35f5f5(0xd4)](),_0x5be72e),_0x482552=dirname(_0x270e2a);return!existsSync(_0x482552)&&mkdirSync(_0x482552,{'recursive':!![]}),writeFileSync(_0x270e2a,_0x113d0c,_0x35f5f5(0xda)),trackFileCreate(_0x270e2a),{'success':!![],'message':_0x35f5f5(0xa3)+_0x5be72e};}catch(_0x3df9cb){return{'success':![],'message':_0x35f5f5(0xbb)+_0x5be72e+':\x20'+_0x3df9cb};}}export function readFile(_0x210d10){const _0x5e7bbe=a7_0x48a1;try{const _0x3f31fe=resolve(process[_0x5e7bbe(0xd4)](),_0x210d10);if(!existsSync(_0x3f31fe))return{'success':![],'message':'File\x20not\x20found:\x20'+_0x210d10};const _0x14db66=['.png',_0x5e7bbe(0xcf),'.jpeg','.gif',_0x5e7bbe(0xad),_0x5e7bbe(0xd8),_0x5e7bbe(0xc3)],_0x31d2bd=_0x3f31fe[_0x5e7bbe(0xdc)]('.')['pop']()?.[_0x5e7bbe(0xa1)]();if(_0x31d2bd&&_0x14db66[_0x5e7bbe(0xbe)]('.'+_0x31d2bd))return{'success':![],'message':_0x5e7bbe(0xd2)+_0x31d2bd+').\x20Use\x20\x27computer_screenshot\x27\x20or\x20specific\x20tools\x20to\x20handle\x20this\x20file\x20type.\x20Direct\x20reading\x20is\x20not\x20supported.]'};const _0xf1a07a=readFileSync(_0x3f31fe,_0x5e7bbe(0xda));return{'success':!![],'content':_0xf1a07a,'message':_0x5e7bbe(0xc6)+_0x210d10};}catch(_0x3d1e84){return{'success':![],'message':'Failed\x20to\x20read\x20'+_0x210d10+':\x20'+_0x3d1e84};}}export function listDirectory(_0x37c6ca='.'){const _0x2187de=a7_0x48a1;try{const _0x573867=resolve(process['cwd'](),_0x37c6ca);if(!existsSync(_0x573867))return{'success':![],'message':_0x2187de(0xab)+_0x37c6ca};const _0x341cc9=readdirSync(_0x573867),_0x2c647b=_0x341cc9[_0x2187de(0xaa)](_0x1ae525=>{const _0x5ca546=_0x2187de,_0x4e1a41=resolve(_0x573867,_0x1ae525),_0x5db3f9=statSync(_0x4e1a41);return{'name':_0x1ae525,'type':_0x5db3f9['isDirectory']()?_0x5ca546(0xde):_0x5ca546(0xac),'size':_0x5db3f9[_0x5ca546(0xa5)]()?_0x5db3f9['size']:undefined};});return{'success':!![],'entries':_0x2c647b,'message':_0x2187de(0xcc)+_0x2c647b['length']+_0x2187de(0x9f)+_0x37c6ca};}catch(_0x51da54){return{'success':![],'message':_0x2187de(0xa4)+_0x37c6ca+':\x20'+_0x51da54};}}export function editFile(_0x405704,_0x4343cd,_0x44bc0a){const _0x2011c0=a7_0x48a1;try{const _0x2242c0=resolve(process[_0x2011c0(0xd4)](),_0x405704);if(!existsSync(_0x2242c0))return{'success':![],'message':_0x2011c0(0xb0)+_0x405704};const _0x1b9877=readFileSync(_0x2242c0,_0x2011c0(0xda));if(!_0x1b9877['includes'](_0x4343cd))return{'success':![],'message':_0x2011c0(0xc9)+_0x405704};trackFileModify(_0x2242c0,_0x1b9877);const _0x1df36e=_0x1b9877[_0x2011c0(0xca)](_0x4343cd,_0x44bc0a);return writeFileSync(_0x2242c0,_0x1df36e,'utf-8'),{'success':!![],'message':_0x2011c0(0xa0)+_0x405704};}catch(_0x18ff07){return{'success':![],'message':_0x2011c0(0xc8)+_0x405704+':\x20'+_0x18ff07};}}export function searchFile(_0x1b5639,_0x458f26){const _0x492758=a7_0x48a1;try{const _0x413a69=resolve(process[_0x492758(0xd4)](),_0x1b5639);if(!existsSync(_0x413a69))return{'success':![],'message':_0x492758(0xb0)+_0x1b5639};const _0x302fd7=readFileSync(_0x413a69,_0x492758(0xda)),_0x10cd8c=new RegExp(_0x458f26,'g'),_0x4091d6=_0x302fd7['match'](_0x10cd8c)||[],_0xf25bda=_0x302fd7[_0x492758(0xdc)]('\x0a'),_0x210ad2=_0xf25bda[_0x492758(0xc0)]((_0x2d9c97,_0x101790)=>new RegExp(_0x458f26)[_0x492758(0xc7)](_0x2d9c97));return{'success':!![],'matches':_0x210ad2,'message':_0x492758(0xb1)+_0x210ad2[_0x492758(0xa9)]+_0x492758(0xb6)+_0x1b5639};}catch(_0x2b76bd){return{'success':![],'message':_0x492758(0xa7)+_0x1b5639+':\x20'+_0x2b76bd};}}export function findFiles(_0x5f4a84,_0x3928cc){const _0x2d0e46=a7_0x48a1;try{const _0x246d73=resolve(process[_0x2d0e46(0xd4)](),_0x5f4a84);if(!existsSync(_0x246d73))return{'success':![],'message':_0x2d0e46(0xab)+_0x5f4a84};const _0x3f57b7=[],_0x2a8eb2=new RegExp(_0x3928cc,'i');function _0xc4b059(_0x34b9f2){const _0x13ecd4=_0x2d0e46,_0x48f71c=readdirSync(_0x34b9f2);for(const _0x55cbb8 of _0x48f71c){if(_0x55cbb8[_0x13ecd4(0xb7)]('.')||_0x55cbb8===_0x13ecd4(0xc2))continue;const _0x3e98fd=resolve(_0x34b9f2,_0x55cbb8),_0x571a21=statSync(_0x3e98fd);if(_0x571a21['isDirectory']())_0xc4b059(_0x3e98fd);else _0x2a8eb2[_0x13ecd4(0xc7)](_0x55cbb8)&&_0x3f57b7[_0x13ecd4(0xbd)](relative(_0x246d73,_0x3e98fd));}}return _0xc4b059(_0x246d73),{'success':!![],'files':_0x3f57b7['slice'](0x0,0x32),'message':_0x2d0e46(0xb1)+_0x3f57b7[_0x2d0e46(0xa9)]+_0x2d0e46(0xcd)+_0x3928cc+'\x22'};}catch(_0xe73748){return{'success':![],'message':_0x2d0e46(0xaf)+_0xe73748};}}export function searchDirectory(_0x33b010,_0x1d6306){const _0x41bce3=a7_0x48a1;try{const _0x71a2d1=resolve(process[_0x41bce3(0xd4)](),_0x33b010);if(!existsSync(_0x71a2d1))return{'success':![],'message':_0x41bce3(0xab)+_0x33b010};const _0x560612=[],_0x1e93be=new RegExp(_0x1d6306,'i'),_0x4d601f=[_0x41bce3(0xd7),_0x41bce3(0xd0),_0x41bce3(0xbf),'.jsx',_0x41bce3(0xc1),_0x41bce3(0xba),'.txt',_0x41bce3(0xdb),_0x41bce3(0xb3),_0x41bce3(0xd5),_0x41bce3(0xbc),_0x41bce3(0xb5)];function _0x15ba75(_0x3c6be){const _0xd5bb90=_0x41bce3,_0x1173fe=readdirSync(_0x3c6be);for(const _0x108082 of _0x1173fe){if(_0x108082[_0xd5bb90(0xb7)]('.')||_0x108082===_0xd5bb90(0xc2))continue;const _0x1b0b56=resolve(_0x3c6be,_0x108082),_0x555fa2=statSync(_0x1b0b56);if(_0x555fa2[_0xd5bb90(0xce)]())_0x15ba75(_0x1b0b56);else{const _0x1801c1='.'+_0x108082[_0xd5bb90(0xdc)]('.')[_0xd5bb90(0xd1)]()?.[_0xd5bb90(0xa1)]();if(_0x4d601f[_0xd5bb90(0xbe)](_0x1801c1))try{const _0x1f5818=readFileSync(_0x1b0b56,_0xd5bb90(0xda)),_0x5be3a4=_0x1f5818[_0xd5bb90(0xdc)]('\x0a');_0x5be3a4['forEach']((_0x49475d,_0x5decb6)=>{const _0x285ab9=_0xd5bb90;_0x1e93be[_0x285ab9(0xc7)](_0x49475d)&&_0x560612['push']({'file':relative(_0x71a2d1,_0x1b0b56),'line':_0x5decb6+0x1,'content':_0x49475d[_0x285ab9(0xdf)]()[_0x285ab9(0xae)](0x0,0x64)});});}catch{}}}}return _0x15ba75(_0x71a2d1),{'success':!![],'results':_0x560612[_0x41bce3(0xc5)](0x0,0x1e),'message':_0x41bce3(0xb1)+_0x560612['length']+_0x41bce3(0xb8)+_0x1d6306+'\x22'};}catch(_0x5b96c2){return{'success':![],'message':'Failed\x20to\x20search\x20directory:\x20'+_0x5b96c2};}}
|
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 a8_0xfac0(){var _0xcb09e7=['7NUlfMI','774200XGatPY','7715HCOJFt','51242HyBQVv','1NCmGsS','445089lZTciX','1977687kCHfmD','92888pysCyo','635608xwwFxh','372RtsoqA'];a8_0xfac0=function(){return _0xcb09e7;};return a8_0xfac0();}(function(_0x33d912,_0x40e867){var _0x1671f6=a8_0x1c72,_0xcba9a4=_0x33d912();while(!![]){try{var _0x4e7a25=parseInt(_0x1671f6(0x10c))/0x1*(-parseInt(_0x1671f6(0x10b))/0x2)+-parseInt(_0x1671f6(0x103))/0x3+-parseInt(_0x1671f6(0x105))/0x4+-parseInt(_0x1671f6(0x10a))/0x5*(-parseInt(_0x1671f6(0x107))/0x6)+parseInt(_0x1671f6(0x108))/0x7*(-parseInt(_0x1671f6(0x106))/0x8)+parseInt(_0x1671f6(0x104))/0x9+parseInt(_0x1671f6(0x109))/0xa;if(_0x4e7a25===_0x40e867)break;else _0xcba9a4['push'](_0xcba9a4['shift']());}catch(_0x4ad94b){_0xcba9a4['push'](_0xcba9a4['shift']());}}}(a8_0xfac0,0x1c5cc));export{createFile,readFile,listDirectory,editFile,searchFile,findFiles,searchDirectory}from'./file.js';function a8_0x1c72(_0x22ffe9,_0x249b54){_0x22ffe9=_0x22ffe9-0x103;var _0xfac04f=a8_0xfac0();var _0x1c72dd=_0xfac04f[_0x22ffe9];return _0x1c72dd;}export{runCommand}from'./command.js';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';
|
package/dist/tools/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20b30d,_0x494c99){const _0x282386=a9_0x3f56,_0x4b7310=_0x20b30d();while(!![]){try{const _0x4e1d8f=parseInt(_0x282386(0xe6))/0x1*(parseInt(_0x282386(0xf0))/0x2)+parseInt(_0x282386(0xec))/0x3*(parseInt(_0x282386(0xee))/0x4)+-parseInt(_0x282386(0xde))/0x5+parseInt(_0x282386(0xdf))/0x6*(parseInt(_0x282386(0xeb))/0x7)+-parseInt(_0x282386(0xf7))/0x8+parseInt(_0x282386(0xe0))/0x9+-parseInt(_0x282386(0xf8))/0xa;if(_0x4e1d8f===_0x494c99)break;else _0x4b7310['push'](_0x4b7310['shift']());}catch(_0x17db7e){_0x4b7310['push'](_0x4b7310['shift']());}}}(a9_0x1879,0x9d5f5));import{Client}from'@modelcontextprotocol/sdk/client/index.js';import{StdioClientTransport}from'@modelcontextprotocol/sdk/client/stdio.js';function a9_0x3f56(_0xdc951a,_0xc15e8c){_0xdc951a=_0xdc951a-0xd3;const _0x1879a5=a9_0x1879();let _0x3f560f=_0x1879a5[_0xdc951a];return _0x3f560f;}import{getMcpServers}from'../config/mcp.js';function a9_0x1879(){const _0x7a6ca8=['forEach','env','748304Kbtbsh','inputSchema','length','clear','description','7pofEri','1142964uvFaub','pipe','8JtvVrF','args','2bDIPOO','set','close','1.0.0','callTool','get','command','993424sHnUvS','21818840IDQyBo','tools','error','\x27\x20not\x20connected','woozlit-cli','Failed\x20to\x20connect\x20to\x20MCP\x20server\x20\x27','info','map','Connecting\x20to\x20MCP\x20servers...','\x27:\x20','push','has','entries','497590EMpUIg','5320002rsQind','5879070XumzjY','values','keys','name'];a9_0x1879=function(){return _0x7a6ca8;};return a9_0x1879();}import*as a9_0x429507 from'../ui/output.js';const clients=new Map();export async function connectToMcpServers(){const _0xf6916a=a9_0x3f56,_0x168b8e=getMcpServers(),_0x3842db=Object[_0xf6916a(0xe2)](_0x168b8e);if(_0x3842db[_0xf6916a(0xe8)]===0x0)return;a9_0x429507[_0xf6916a(0xd7)](_0xf6916a(0xd9));for(const _0x3c8187 of _0x3842db){if(clients[_0xf6916a(0xdc)](_0x3c8187))continue;const _0x4d7ef8=_0x168b8e[_0x3c8187];try{const _0x2c24db={...process[_0xf6916a(0xe5)],..._0x4d7ef8[_0xf6916a(0xe5)]};Object[_0xf6916a(0xe2)](_0x2c24db)[_0xf6916a(0xe4)](_0x391d96=>_0x2c24db[_0x391d96]===undefined&&delete _0x2c24db[_0x391d96]);const _0x3c9adc=new StdioClientTransport({'command':_0x4d7ef8[_0xf6916a(0xf6)],'args':_0x4d7ef8[_0xf6916a(0xef)],'env':_0x2c24db,'stderr':_0xf6916a(0xed)}),_0x4a4d49=new Client({'name':_0xf6916a(0xd5),'version':_0xf6916a(0xf3)},{'capabilities':{}});await _0x4a4d49['connect'](_0x3c9adc),clients[_0xf6916a(0xf1)](_0x3c8187,_0x4a4d49);}catch(_0x4c5a9c){a9_0x429507[_0xf6916a(0xd3)](_0xf6916a(0xd6)+_0x3c8187+_0xf6916a(0xda)+_0x4c5a9c);}}}export async function getMcpTools(){const _0xc0c0aa=a9_0x3f56,_0x4b325b=[];for(const [_0x349fe7,_0x54c2f9]of clients[_0xc0c0aa(0xdd)]()){try{const _0x4200ce=await _0x54c2f9['listTools'](),_0x28da2c=_0x4200ce[_0xc0c0aa(0xf9)][_0xc0c0aa(0xd8)](_0x3a952c=>({'name':_0x3a952c[_0xc0c0aa(0xe3)],'description':_0x3a952c[_0xc0c0aa(0xea)],'inputSchema':_0x3a952c[_0xc0c0aa(0xe7)],'serverName':_0x349fe7}));_0x4b325b[_0xc0c0aa(0xdb)](..._0x28da2c);}catch(_0x24226e){a9_0x429507[_0xc0c0aa(0xd3)]('Failed\x20to\x20list\x20tools\x20for\x20\x27'+_0x349fe7+_0xc0c0aa(0xda)+_0x24226e);}}return _0x4b325b;}export async function executeMcpTool(_0x57000d,_0xff9f1,_0x35390a){const _0x283f49=a9_0x3f56,_0x47aa0a=clients[_0x283f49(0xf5)](_0x57000d);if(!_0x47aa0a)throw new Error('MCP\x20server\x20\x27'+_0x57000d+_0x283f49(0xd4));try{const _0x4bfdc4=await _0x47aa0a[_0x283f49(0xf4)]({'name':_0xff9f1,'arguments':_0x35390a});return _0x4bfdc4;}catch(_0x2c6090){throw new Error('MCP\x20tool\x20execution\x20failed:\x20'+_0x2c6090);}}export function closeMcpClients(){const _0xcf40b5=a9_0x3f56;for(const _0x2dba2d of clients[_0xcf40b5(0xe1)]()){try{_0x2dba2d[_0xcf40b5(0xf2)]();}catch(_0x365195){}}clients[_0xcf40b5(0xe9)]();}
|
|
@@ -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(_0x3fd4ba,_0x4f8e56){const _0xca80df=a10_0x20a2,_0x32143d=_0x3fd4ba();while(!![]){try{const _0x4cc0c9=-parseInt(_0xca80df(0x1d2))/0x1+parseInt(_0xca80df(0x1c5))/0x2*(-parseInt(_0xca80df(0x1d1))/0x3)+parseInt(_0xca80df(0x1d8))/0x4+-parseInt(_0xca80df(0x1c2))/0x5*(-parseInt(_0xca80df(0x1d3))/0x6)+parseInt(_0xca80df(0x1ca))/0x7+parseInt(_0xca80df(0x1cc))/0x8+parseInt(_0xca80df(0x1d4))/0x9*(-parseInt(_0xca80df(0x1cf))/0xa);if(_0x4cc0c9===_0x4f8e56)break;else _0x32143d['push'](_0x32143d['shift']());}catch(_0xee7088){_0x32143d['push'](_0x32143d['shift']());}}}(a10_0x5909,0x38fec));import*as a10_0x2f4786 from'fs';function a10_0x5909(){const _0x321e54=['390768oxcOpj','81NGSufb','length','success','pop','998748EioqgQ','path','previousContent','modify','create','Deleted:\x20','existsSync','Rollback\x20failed:\x20','10JfBNUK','Unknown\x20change\x20type','Restored:\x20','380740WyjaNQ','delete','type','unlinkSync','message','2191994oQJLUx','push','2499944psQPbg','now','resolve','451120ycDHvh','writeFileSync','3WWwdgq','175748jodEyc'];a10_0x5909=function(){return _0x321e54;};return a10_0x5909();}import*as a10_0x4215f8 from'path';const changes=[];export function trackFileCreate(_0x4d8618){const _0x122af2=a10_0x20a2;changes[_0x122af2(0x1cb)]({'path':a10_0x4215f8[_0x122af2(0x1ce)](_0x4d8618),'type':_0x122af2(0x1dc),'previousContent':null,'timestamp':Date[_0x122af2(0x1cd)]()});}export function trackFileModify(_0x10aa2a,_0x35d84b){const _0x3e8eb6=a10_0x20a2;changes[_0x3e8eb6(0x1cb)]({'path':a10_0x4215f8[_0x3e8eb6(0x1ce)](_0x10aa2a),'type':_0x3e8eb6(0x1db),'previousContent':_0x35d84b,'timestamp':Date[_0x3e8eb6(0x1cd)]()});}export function trackFileDelete(_0x3aa589,_0x2cd86a){const _0x4da6ca=a10_0x20a2;changes[_0x4da6ca(0x1cb)]({'path':a10_0x4215f8['resolve'](_0x3aa589),'type':_0x4da6ca(0x1c6),'previousContent':_0x2cd86a,'timestamp':Date[_0x4da6ca(0x1cd)]()});}export function getChanges(){return[...changes];}export function rollbackLast(){const _0x48be8e=a10_0x20a2;if(changes['length']===0x0)return{'success':![],'message':'No\x20changes\x20to\x20rollback'};const _0x3b9059=changes[_0x48be8e(0x1d7)]();try{switch(_0x3b9059[_0x48be8e(0x1c7)]){case _0x48be8e(0x1dc):a10_0x2f4786[_0x48be8e(0x1de)](_0x3b9059['path'])&&a10_0x2f4786[_0x48be8e(0x1c8)](_0x3b9059['path']);return{'success':!![],'message':_0x48be8e(0x1dd)+_0x3b9059[_0x48be8e(0x1d9)]};case _0x48be8e(0x1db):_0x3b9059[_0x48be8e(0x1da)]!==null&&a10_0x2f4786[_0x48be8e(0x1d0)](_0x3b9059[_0x48be8e(0x1d9)],_0x3b9059[_0x48be8e(0x1da)]);return{'success':!![],'message':_0x48be8e(0x1c4)+_0x3b9059[_0x48be8e(0x1d9)]};case _0x48be8e(0x1c6):_0x3b9059[_0x48be8e(0x1da)]!==null&&a10_0x2f4786[_0x48be8e(0x1d0)](_0x3b9059[_0x48be8e(0x1d9)],_0x3b9059[_0x48be8e(0x1da)]);return{'success':!![],'message':_0x48be8e(0x1c4)+_0x3b9059[_0x48be8e(0x1d9)]};default:return{'success':![],'message':_0x48be8e(0x1c3)};}}catch(_0x139e4d){return{'success':![],'message':_0x48be8e(0x1c1)+_0x139e4d};}}export function rollbackAll(){const _0xe838f9=a10_0x20a2,_0xdc5f0f=[];let _0x3f05e1=0x0;while(changes[_0xe838f9(0x1d5)]>0x0){const _0x52e1aa=rollbackLast();_0x52e1aa[_0xe838f9(0x1d6)]&&(_0x3f05e1++,_0xdc5f0f[_0xe838f9(0x1cb)](_0x52e1aa[_0xe838f9(0x1c9)]));}return{'success':_0x3f05e1>0x0,'count':_0x3f05e1,'messages':_0xdc5f0f};}function a10_0x20a2(_0x5c9e4b,_0x1c2730){_0x5c9e4b=_0x5c9e4b-0x1c1;const _0x59090d=a10_0x5909();let _0x20a2df=_0x59090d[_0x5c9e4b];return _0x20a2df;}export function clearChanges(){const _0x39eefb=a10_0x20a2;changes[_0x39eefb(0x1d5)]=0x0;}
|
package/dist/tools/rules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3f31b6,_0x2b3e03){const _0x1976d1=a11_0x5c52,_0x3e6626=_0x3f31b6();while(!![]){try{const _0x300496=parseInt(_0x1976d1(0x130))/0x1+parseInt(_0x1976d1(0x132))/0x2*(parseInt(_0x1976d1(0x134))/0x3)+-parseInt(_0x1976d1(0x12c))/0x4+parseInt(_0x1976d1(0x12a))/0x5+parseInt(_0x1976d1(0x131))/0x6*(parseInt(_0x1976d1(0x12b))/0x7)+parseInt(_0x1976d1(0x136))/0x8*(-parseInt(_0x1976d1(0x12e))/0x9)+-parseInt(_0x1976d1(0x12d))/0xa;if(_0x300496===_0x2b3e03)break;else _0x3e6626['push'](_0x3e6626['shift']());}catch(_0x2c5da7){_0x3e6626['push'](_0x3e6626['shift']());}}}(a11_0x3c3c,0x752c4));import{getRules,addRule as a11_0x533bbd,clearRules as a11_0xfe6217}from'../utils/storage.js';function a11_0x5c52(_0x5d1010,_0x17eafe){_0x5d1010=_0x5d1010-0x12a;const _0x3c3cc2=a11_0x3c3c();let _0x5c5252=_0x3c3cc2[_0x5d1010];return _0x5c5252;}export function listRules(){return getRules();}function a11_0x3c3c(){const _0x25e400=['2219908SOMjlU','1810170huYhyU','9gQiKzc','length','828936wCYutq','1831920QucGdU','6WDBAok','join','477633NHOnIp','map','4921744xyNQch','1096315aFowon','7nZWwqP'];a11_0x3c3c=function(){return _0x25e400;};return a11_0x3c3c();}export function addRule(_0x30e5bb){a11_0x533bbd(_0x30e5bb);}export function clearRules(){a11_0xfe6217();}export function formatRulesForSystem(){const _0x38caf4=a11_0x5c52,_0x2b8219=getRules();if(_0x2b8219[_0x38caf4(0x12f)]===0x0)return'';return'\x0a\x0aUser-defined\x20rules:\x0a'+_0x2b8219[_0x38caf4(0x135)]((_0x29105d,_0x21fe88)=>_0x21fe88+0x1+'.\x20'+_0x29105d)[_0x38caf4(0x133)]('\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_0x11f9fc=a12_0xf22c;(function(_0x2d9007,_0x33296a){const _0xde3753=a12_0xf22c,_0x1f991f=_0x2d9007();while(!![]){try{const _0x5184a0=parseInt(_0xde3753(0x1bb))/0x1*(-parseInt(_0xde3753(0x1c2))/0x2)+parseInt(_0xde3753(0x1bc))/0x3+-parseInt(_0xde3753(0x1f2))/0x4*(-parseInt(_0xde3753(0x1d6))/0x5)+parseInt(_0xde3753(0x1d8))/0x6+parseInt(_0xde3753(0x1b2))/0x7*(parseInt(_0xde3753(0x1dc))/0x8)+-parseInt(_0xde3753(0x1b5))/0x9+-parseInt(_0xde3753(0x1eb))/0xa;if(_0x5184a0===_0x33296a)break;else _0x1f991f['push'](_0x1f991f['shift']());}catch(_0x4d9c26){_0x1f991f['push'](_0x1f991f['shift']());}}}(a12_0x1a1a,0x48272));import a12_0xb78ebb from'chalk';import a12_0x1bf2e3 from'ora';const LOGO='\x0a'+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1d2))('██╗\x20\x20\x20\x20██╗')+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1c4))(a12_0x11f9fc(0x1e7))+a12_0xb78ebb['hex'](a12_0x11f9fc(0x1cb))(a12_0x11f9fc(0x1f3))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x202))(a12_0x11f9fc(0x1bd))+'\x0a'+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1d2))(a12_0x11f9fc(0x1dd))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1c4))(a12_0x11f9fc(0x1e4))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1cb))(a12_0x11f9fc(0x1da))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)]('#2563eb')(a12_0x11f9fc(0x1b6))+'\x0a'+a12_0xb78ebb['hex'](a12_0x11f9fc(0x1d2))(a12_0x11f9fc(0x1e6))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1c4))(a12_0x11f9fc(0x1c1))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1cb))(a12_0x11f9fc(0x1e1))+a12_0xb78ebb['hex'](a12_0x11f9fc(0x202))(a12_0x11f9fc(0x1c7))+'\x0a'+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1d2))(a12_0x11f9fc(0x1f6))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1c4))(a12_0x11f9fc(0x1c1))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1cb))('\x20███╔╝\x20\x20██║\x20\x20\x20\x20\x20')+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x202))(a12_0x11f9fc(0x1c7))+'\x0a'+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1d2))(a12_0x11f9fc(0x1e9))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1c4))(a12_0x11f9fc(0x1e8))+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1cb))('███████╗███████╗')+a12_0xb78ebb['hex'](a12_0x11f9fc(0x202))('██║\x20\x20\x20██║\x20\x20\x20')+'\x0a'+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1d2))('\x20╚══╝╚══╝\x20')+a12_0xb78ebb[a12_0x11f9fc(0x1d5)](a12_0x11f9fc(0x1c4))(a12_0x11f9fc(0x1d4))+a12_0xb78ebb['hex']('#3b82f6')(a12_0x11f9fc(0x1ea))+a12_0xb78ebb['hex'](a12_0x11f9fc(0x202))(a12_0x11f9fc(0x1e2))+'\x0a';export function showLogo(){const _0x4d4ca4=a12_0x11f9fc;process['stdout'][_0x4d4ca4(0x1b8)](LOGO+'\x0a');}export function createSpinner(_0x497d6a){const _0xe38039=a12_0x11f9fc;return a12_0x1bf2e3({'text':_0x497d6a,'color':_0xe38039(0x1fc),'spinner':_0xe38039(0x1d7)});}export function success(_0x2ff1aa){const _0x71056c=a12_0x11f9fc;process[_0x71056c(0x1cc)][_0x71056c(0x1b8)](a12_0xb78ebb['hex'](_0x71056c(0x1cb))('\x20\x20')+_0x2ff1aa+'\x0a');}export function error(_0x5b9c13){const _0x286fb6=a12_0x11f9fc;process[_0x286fb6(0x1cc)][_0x286fb6(0x1b8)](a12_0xb78ebb[_0x286fb6(0x1e5)]('\x20\x20')+_0x5b9c13+'\x0a');}export function info(_0x444f15){const _0x1a42a3=a12_0x11f9fc;process['stdout'][_0x1a42a3(0x1b8)](a12_0xb78ebb[_0x1a42a3(0x1d5)]('#60a5fa')('\x20\x20')+_0x444f15+'\x0a');}export function warn(_0x4096ad){const _0x4ca39a=a12_0x11f9fc;process[_0x4ca39a(0x1cc)][_0x4ca39a(0x1b8)](a12_0xb78ebb[_0x4ca39a(0x1fd)]('\x20\x20')+_0x4096ad+'\x0a');}export function dim(_0x37afcf){const _0x109ee7=a12_0x11f9fc;process[_0x109ee7(0x1cc)][_0x109ee7(0x1b8)](a12_0xb78ebb['dim']('\x20\x20'+_0x37afcf)+'\x0a');}function a12_0xf22c(_0x5ec3c5,_0x5e3112){_0x5ec3c5=_0x5ec3c5-0x1ae;const _0x1a1a66=a12_0x1a1a();let _0xf22c54=_0x1a1a66[_0x5ec3c5];return _0xf22c54;}export function header(_0x123c1a){const _0x52801a=a12_0x11f9fc;process['stdout']['write']('\x0a'+a12_0xb78ebb[_0x52801a(0x1d3)]['hex'](_0x52801a(0x1cb))(_0x123c1a)+'\x0a');}export function divider(){const _0x5bca94=a12_0x11f9fc;process[_0x5bca94(0x1cc)][_0x5bca94(0x1b8)](a12_0xb78ebb[_0x5bca94(0x1c3)]('\x20\x20'+'-'[_0x5bca94(0x1cd)](0x32))+'\x0a');}export function tip(_0x23a550,_0xaa9560){const _0x2fa8fc=a12_0x11f9fc;process[_0x2fa8fc(0x1cc)][_0x2fa8fc(0x1b8)](a12_0xb78ebb[_0x2fa8fc(0x1c3)]('\x20\x20')+a12_0xb78ebb['white'](_0x23a550)+a12_0xb78ebb[_0x2fa8fc(0x1c3)]('\x20'+_0xaa9560)+'\x0a');}export function userMessage(_0x2f3f36){const _0x2d35d2=a12_0x11f9fc;process[_0x2d35d2(0x1cc)]['write'](a12_0xb78ebb[_0x2d35d2(0x1d3)]['hex']('#60a5fa')(_0x2d35d2(0x1f9))+_0x2f3f36+'\x0a');}export function aiMessage(_0x5c42ee){const _0xc3d707=a12_0x11f9fc;process[_0xc3d707(0x1cc)][_0xc3d707(0x1b8)](_0xc3d707(0x1ca)+_0x5c42ee);}export function aiMessageEnd(){const _0x4978e9=a12_0x11f9fc;process[_0x4978e9(0x1cc)][_0x4978e9(0x1b8)]('\x0a');}export function toolCall(_0x28bc04,_0x146b15){const _0x539592=a12_0x11f9fc;process[_0x539592(0x1cc)][_0x539592(0x1b8)](a12_0xb78ebb['dim'](_0x539592(0x1e0))+a12_0xb78ebb[_0x539592(0x1d5)]('#60a5fa')(_0x28bc04)+a12_0xb78ebb['dim'](':\x20'+_0x146b15)+'\x0a');}export function statusBar(_0x201024,_0x945f1d){const _0x4dbc1d=a12_0x11f9fc,_0x4439b9=_0x201024[_0x4dbc1d(0x1db)]('/')[_0x4dbc1d(0x1ef)]()?.['replace'](':free','')||_0x201024,_0x157049=a12_0xb78ebb[_0x4dbc1d(0x1d5)]('#3b82f6')(_0x4439b9),_0x120bfa=a12_0xb78ebb[_0x4dbc1d(0x1c3)](_0x945f1d+_0x4dbc1d(0x1c5));process['stdout'][_0x4dbc1d(0x1b8)]('\x20\x20'+_0x157049+'\x20\x20'+a12_0xb78ebb[_0x4dbc1d(0x1c3)]('|')+'\x20\x20'+_0x120bfa+'\x0a');}export function prompt(){const _0x479c1e=a12_0x11f9fc;process['stdout'][_0x479c1e(0x1b8)](a12_0xb78ebb[_0x479c1e(0x1d5)](_0x479c1e(0x1cb))(_0x479c1e(0x1cf)));}function lerpColor(_0x4d0954,_0x4330fa,_0xf0220c){const _0xc8f053=a12_0x11f9fc,_0x38e991=parseInt(_0x4d0954['replace']('#',''),0x10),_0x190444=parseInt(_0x4330fa[_0xc8f053(0x1be)]('#',''),0x10),_0x3fb4e5=_0x38e991>>0x10&0xff,_0x4fb54f=_0x38e991>>0x8&0xff,_0x35f59e=_0x38e991&0xff,_0x2fbd1c=_0x190444>>0x10&0xff,_0x3d4eda=_0x190444>>0x8&0xff,_0x30beb8=_0x190444&0xff,_0x41030f=Math[_0xc8f053(0x1b3)](_0x3fb4e5+(_0x2fbd1c-_0x3fb4e5)*_0xf0220c),_0x2a5390=Math['round'](_0x4fb54f+(_0x3d4eda-_0x4fb54f)*_0xf0220c),_0x390d59=Math[_0xc8f053(0x1b3)](_0x35f59e+(_0x30beb8-_0x35f59e)*_0xf0220c);return'#'+((0x1<<0x18)+(_0x41030f<<0x10)+(_0x2a5390<<0x8)+_0x390d59)[_0xc8f053(0x1c0)](0x10)[_0xc8f053(0x1f7)](0x1);}export function gradientText(_0xb9acdf,_0x542783,_0x4a2f28){const _0x46cab5=a12_0x11f9fc,_0x4461c2=_0xb9acdf[_0x46cab5(0x1db)]('');return _0x4461c2['map']((_0x591a93,_0x20f24e)=>{const _0x55fd22=_0x46cab5,_0x95dd1a=_0x20f24e/Math[_0x55fd22(0x1bf)](_0x4461c2[_0x55fd22(0x1d0)]-0x1,0x1);return a12_0xb78ebb['hex'](lerpColor(_0x542783,_0x4a2f28,_0x95dd1a))(_0x591a93);})[_0x46cab5(0x1d9)]('');}export function loggedInBox(_0x19814d){const _0xdd19aa=a12_0x11f9fc,_0x3d4848=_0xdd19aa(0x1af),_0x38def0=_0x19814d[_0xdd19aa(0x1fe)](),_0x54973b=_0x3d4848[_0xdd19aa(0x1d0)]+_0x38def0[_0xdd19aa(0x1d0)]+0x4,_0x5ae847=a12_0xb78ebb[_0xdd19aa(0x1d5)](_0xdd19aa(0x1cb))('─'[_0xdd19aa(0x1cd)](_0x54973b)),_0x3d29b1=a12_0xb78ebb[_0xdd19aa(0x1d5)](_0xdd19aa(0x1cb))('╭'+_0x5ae847+'╮'),_0x4bf9c2=a12_0xb78ebb['hex']('#3b82f6')('╰'+_0x5ae847+'╯'),_0x2efb2b=gradientText(_0x38def0,_0xdd19aa(0x1c4),_0xdd19aa(0x202));process[_0xdd19aa(0x1cc)][_0xdd19aa(0x1b8)](_0xdd19aa(0x1ca)+_0x3d29b1+'\x0a'),process[_0xdd19aa(0x1cc)][_0xdd19aa(0x1b8)]('\x20\x20'+a12_0xb78ebb[_0xdd19aa(0x1d5)](_0xdd19aa(0x1cb))('│\x20\x20')+a12_0xb78ebb[_0xdd19aa(0x1c3)](_0x3d4848)+_0x2efb2b+a12_0xb78ebb[_0xdd19aa(0x1d5)](_0xdd19aa(0x1cb))(_0xdd19aa(0x1b9))+'\x0a'),process['stdout'][_0xdd19aa(0x1b8)]('\x20\x20'+_0x4bf9c2+'\x0a');}export function actionSpinner(_0x518b8a){const _0x10975e=a12_0x11f9fc;return a12_0x1bf2e3({'text':a12_0xb78ebb[_0x10975e(0x1d5)]('#60a5fa')(_0x518b8a),'color':_0x10975e(0x1fc),'spinner':_0x10975e(0x1d7)});}export function toolActivity(_0xba820e,_0x4769f3){const _0x3acfc6=a12_0x11f9fc,_0x530f66={'create_file':_0x3acfc6(0x1ce),'read_file':_0x3acfc6(0x1ed),'edit_file':_0x3acfc6(0x1ec),'list_directory':'Listing','search_file':_0x3acfc6(0x1ee),'find_files':'Finding','search_directory':'Searching','run_command':_0x3acfc6(0x201)},_0x2c4531=_0x530f66[_0xba820e]||_0xba820e;let _0x484dbc='';if(_0xba820e===_0x3acfc6(0x1fb)&&_0x4769f3[_0x3acfc6(0x1c8)])_0x484dbc=_0x4769f3['command'][_0x3acfc6(0x1f8)](0x0,0x32);else{if(_0x4769f3[_0x3acfc6(0x1f5)])_0x484dbc=_0x4769f3[_0x3acfc6(0x1f5)];else _0x4769f3[_0x3acfc6(0x1ba)]&&(_0x484dbc='\x22'+_0x4769f3['pattern']+'\x22');}process[_0x3acfc6(0x1cc)][_0x3acfc6(0x1b8)](a12_0xb78ebb[_0x3acfc6(0x1c3)]('\x20\x20'+_0x2c4531+'\x20'+_0x484dbc+'\x0a'));}export function commandOutput(_0x489068){const _0x55333e=a12_0x11f9fc,_0x1cce7d=_0x489068[_0x55333e(0x1db)]('\x0a');_0x1cce7d[_0x55333e(0x1f1)](_0x18b67c=>{const _0x4e2bb4=_0x55333e;_0x18b67c[_0x4e2bb4(0x1fe)]()&&process['stdout'][_0x4e2bb4(0x1b8)](a12_0xb78ebb[_0x4e2bb4(0x1c3)](_0x4e2bb4(0x1b0))+a12_0xb78ebb[_0x4e2bb4(0x1c3)](_0x18b67c)+'\x0a');});}export function usageBox(_0xa1d978,_0x35d72d,_0x4348e8){const _0x54c2ba=a12_0x11f9fc,_0x4f6c10=_0x35d72d>0x0?Math[_0x54c2ba(0x1c6)](Math[_0x54c2ba(0x1b3)](_0xa1d978/_0x35d72d*0x64),0x64):0x0,_0x2cdec0=0x1e,_0x1574a8=Math[_0x54c2ba(0x1b3)](_0x4f6c10/0x64*_0x2cdec0),_0x1a7734=_0x2cdec0-_0x1574a8,_0x2aa29d=_0x4348e8?a12_0xb78ebb['red']:_0x4f6c10>0x50?a12_0xb78ebb[_0x54c2ba(0x1fd)]:a12_0xb78ebb[_0x54c2ba(0x1df)],_0x5e2c06=_0x2aa29d('█'[_0x54c2ba(0x1cd)](_0x1574a8))+a12_0xb78ebb[_0x54c2ba(0x1c3)]('░'[_0x54c2ba(0x1cd)](_0x1a7734)),_0x57e8ed=_0x35d72d>=0x3b9ac9ff?'Unlimited':_0x35d72d['toLocaleString'](),_0x2faba0=_0xa1d978[_0x54c2ba(0x1b4)]()+_0x54c2ba(0x1d1)+_0x57e8ed+_0x54c2ba(0x200);process[_0x54c2ba(0x1cc)][_0x54c2ba(0x1b8)]('\x0a'),process[_0x54c2ba(0x1cc)]['write'](a12_0xb78ebb[_0x54c2ba(0x1d3)][_0x54c2ba(0x1d5)](_0x54c2ba(0x1c4))(_0x54c2ba(0x1e3))),process[_0x54c2ba(0x1cc)]['write']('\x20\x20'+_0x5e2c06+'\x20'+a12_0xb78ebb['dim'](_0x4f6c10+'%')+'\x0a'),process[_0x54c2ba(0x1cc)][_0x54c2ba(0x1b8)](a12_0xb78ebb[_0x54c2ba(0x1c3)]('\x20\x20'+_0x2faba0+'\x0a')),_0x4348e8&&process[_0x54c2ba(0x1cc)][_0x54c2ba(0x1b8)](a12_0xb78ebb[_0x54c2ba(0x1e5)](_0x54c2ba(0x1ae))),process[_0x54c2ba(0x1cc)][_0x54c2ba(0x1b8)]('\x0a');}function a12_0x1a1a(){const _0x288cb6=['\x20/\x20','#93c5fd','bold','\x20╚═════╝\x20\x20╚═════╝\x20','hex','15805UalWRy','dots','1695090HUrpHm','join','╚══███╔╝██║\x20\x20\x20\x20\x20','split','110672wUHxfR','██║\x20\x20\x20\x20██║','\x20tools)\x0a','green','\x20\x20\x20\x20->\x20','\x20\x20███╔╝\x20██║\x20\x20\x20\x20\x20','╚═╝\x20\x20\x20╚═╝\x20\x20\x20','\x20\x20Token\x20Usage\x0a','██╔═══██╗██╔═══██╗','red','██║\x20█╗\x20██║','\x20██████╗\x20\x20██████╗\x20','╚██████╔╝╚██████╔╝','╚███╔███╔╝','╚══════╝╚══════╝','3278250ZcmAaQ','Editing','Reading','Searching','pop','toFixed','forEach','268GDDFaK','███████╗██╗\x20\x20\x20\x20\x20','\x20MCP\x20','path','██║███╗██║','slice','substring','\x0a\x20\x20You:\x20','\x20\x20Working\x20in:\x20','run_command','blue','yellow','trim','server','\x20tokens','Running','#2563eb','\x20\x20Limit\x20Reached\x0a','Logged\x20in\x20as:\x20','\x20\x20\x20','\x20\x20Done\x20in\x20','217nbMijh','round','toLocaleString','1818936ecwlMf','██║╚══██╔══╝','\x20connected\x20(','write','\x20\x20│','pattern','546619XdlrUl','1346790sdUqah','██╗████████╗','replace','max','toString','██║\x20\x20\x20██║██║\x20\x20\x20██║','2AWNIRU','dim','#60a5fa','%\x20context\x20left','min','██║\x20\x20\x20██║\x20\x20\x20','command','servers','\x0a\x20\x20','#3b82f6','stdout','repeat','Creating','\x20\x20>\x20','length'];a12_0x1a1a=function(){return _0x288cb6;};return a12_0x1a1a();}export function mcpConnected(_0x414909,_0x8a5272){const _0x4bd9d6=a12_0x11f9fc,_0x269c8c=_0x414909===0x1?_0x4bd9d6(0x1ff):_0x4bd9d6(0x1c9);process[_0x4bd9d6(0x1cc)][_0x4bd9d6(0x1b8)](a12_0xb78ebb[_0x4bd9d6(0x1c3)]('\x20\x20'+a12_0xb78ebb[_0x4bd9d6(0x1d5)](_0x4bd9d6(0x1cb))(_0x414909[_0x4bd9d6(0x1c0)]())+_0x4bd9d6(0x1f4)+_0x269c8c+_0x4bd9d6(0x1b7)+_0x8a5272+_0x4bd9d6(0x1de)));}export function elapsedTime(_0x43f372){const _0x16a9d6=a12_0x11f9fc,_0x305f07=_0x43f372<0x3c?_0x43f372[_0x16a9d6(0x1f0)](0x1)+'s':Math['floor'](_0x43f372/0x3c)+'m\x20'+(_0x43f372%0x3c)[_0x16a9d6(0x1f0)](0x0)+'s';process['stdout'][_0x16a9d6(0x1b8)](a12_0xb78ebb[_0x16a9d6(0x1c3)](_0x16a9d6(0x1b1)+_0x305f07+'\x0a'));}export function currentDir(_0x554fcd){const _0x40a2ee=a12_0x11f9fc;process[_0x40a2ee(0x1cc)][_0x40a2ee(0x1b8)](a12_0xb78ebb[_0x40a2ee(0x1c3)](_0x40a2ee(0x1fa))+a12_0xb78ebb[_0x40a2ee(0x1d5)]('#60a5fa')(_0x554fcd)+'\x0a');}
|
package/dist/ui/select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x4704(){const _0x2724ef=['85806LNHbDy','316aZfYax','map','7844640PkQnsy','33756RdiHzf','Select\x20AI\x20Model','570668pDgaGq','19893MLZOLV','497QDmPHY','\x20(current)','1THwueL','5091955qURici','name','description','112gQyyhx','22276122CfIuxm'];a13_0x4704=function(){return _0x2724ef;};return a13_0x4704();}(function(_0x1b7049,_0x20f16f){const _0x520d57=a13_0x564c,_0x54de25=_0x1b7049();while(!![]){try{const _0x4f1fae=parseInt(_0x520d57(0x14e))/0x1*(parseInt(_0x520d57(0x14a))/0x2)+-parseInt(_0x520d57(0x14b))/0x3*(parseInt(_0x520d57(0x155))/0x4)+-parseInt(_0x520d57(0x14f))/0x5+-parseInt(_0x520d57(0x148))/0x6*(-parseInt(_0x520d57(0x14c))/0x7)+-parseInt(_0x520d57(0x152))/0x8*(-parseInt(_0x520d57(0x154))/0x9)+-parseInt(_0x520d57(0x147))/0xa+parseInt(_0x520d57(0x153))/0xb;if(_0x4f1fae===_0x20f16f)break;else _0x54de25['push'](_0x54de25['shift']());}catch(_0x2f3d6f){_0x54de25['push'](_0x54de25['shift']());}}}(a13_0x4704,0x7e22e));import{select}from'@inquirer/prompts';import{MODELS}from'../config/settings.js';function a13_0x564c(_0x2f2bb7,_0x14a729){_0x2f2bb7=_0x2f2bb7-0x146;const _0x47042a=a13_0x4704();let _0x564c34=_0x47042a[_0x2f2bb7];return _0x564c34;}import{getSelectedModel,setSelectedModel}from'../utils/storage.js';export async function selectModel(){const _0x73b5=a13_0x564c,_0x40c13b=getSelectedModel(),_0x56018a=MODELS[_0x73b5(0x146)](_0x1d6584=>({'name':''+_0x1d6584[_0x73b5(0x150)]+(_0x1d6584['id']===_0x40c13b?_0x73b5(0x14d):''),'value':_0x1d6584['id'],'description':_0x1d6584[_0x73b5(0x151)]})),_0x4505c8=await select({'message':_0x73b5(0x149),'choices':_0x56018a,'default':_0x40c13b});return setSelectedModel(_0x4505c8),_0x4505c8;}export{getSelectedModel,setSelectedModel};
|
package/dist/utils/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x21b4f0,_0x18615c){const _0x4a2ac=a14_0x3168,_0xe362d1=_0x21b4f0();while(!![]){try{const _0x45aba3=parseInt(_0x4a2ac(0x1fe))/0x1+parseInt(_0x4a2ac(0x1ec))/0x2*(-parseInt(_0x4a2ac(0x1ee))/0x3)+parseInt(_0x4a2ac(0x1e6))/0x4+-parseInt(_0x4a2ac(0x1fd))/0x5*(parseInt(_0x4a2ac(0x1e3))/0x6)+-parseInt(_0x4a2ac(0x1e9))/0x7+-parseInt(_0x4a2ac(0x1ed))/0x8+parseInt(_0x4a2ac(0x1ef))/0x9;if(_0x45aba3===_0x18615c)break;else _0xe362d1['push'](_0xe362d1['shift']());}catch(_0x178407){_0xe362d1['push'](_0xe362d1['shift']());}}}(a14_0x5d92,0x1e33f));import{getApiUrl}from'../config/settings.js';import{getToken,getUser}from'./storage.js';export async function sendChatMessage(_0x3680d1,_0x50d66c,_0x702e6c){const _0x441b12=a14_0x3168,_0x64ac9c=getToken(),_0x32bdc7=getApiUrl(),{userId:_0x17d162}=getUser();if(!_0x64ac9c||!_0x17d162)throw new Error(_0x441b12(0x201));const _0x40a9b3=_0x441b12(0x200)+Date[_0x441b12(0x1e4)]()+'-'+Math[_0x441b12(0x1f2)]()['toString'](0x24)[_0x441b12(0x1ff)](0x2,0x9),_0x367bea=process[_0x441b12(0x1e8)]+'-'+process[_0x441b12(0x1e5)]+'-'+process[_0x441b12(0x1f7)],_0x3ed90a=await fetch(_0x32bdc7+_0x441b12(0x1fa),{'method':_0x441b12(0x1f4),'headers':{'Content-Type':_0x441b12(0x1e0),'X-Woozlit-CLI':_0x441b12(0x1f3),'X-Woozlit-CLI-Version':_0x441b12(0x203),'X-Request-ID':_0x40a9b3,'X-Device-Fingerprint':_0x367bea,'Authorization':_0x441b12(0x1e2)+_0x64ac9c,'X-Woozlit-Token':_0x441b12(0x1e2)+_0x64ac9c},'body':JSON['stringify']({'model':_0x3680d1,'messages':_0x50d66c,'stream':!![],'userId':_0x17d162})});if(!_0x3ed90a['ok']){const _0x57e6c6=await _0x3ed90a['text']();throw new Error(_0x441b12(0x1fc)+_0x3ed90a[_0x441b12(0x202)]+_0x441b12(0x1e1)+_0x57e6c6);}if(!_0x3ed90a['body'])throw new Error(_0x441b12(0x1ea));const _0x27ebd8=_0x3ed90a[_0x441b12(0x1f9)]['getReader'](),_0x5f1d13=new TextDecoder();let _0x1e815a='';const _0x26944c=[];while(!![]){const {done:_0xb6b220,value:_0x5308e6}=await _0x27ebd8[_0x441b12(0x1f6)]();if(_0xb6b220)break;const _0x21416d=_0x5f1d13[_0x441b12(0x1fb)](_0x5308e6,{'stream':!![]});if(_0x21416d[_0x441b12(0x1f8)]('0:')){const _0x3ccb76=_0x21416d[_0x441b12(0x1df)]('\x0a');for(const _0x154d8e of _0x3ccb76){if(_0x154d8e['startsWith']('0:')){const _0x5805d5=_0x154d8e[_0x441b12(0x1f5)](0x2)['trim']();if(_0x5805d5[_0x441b12(0x1f0)]('\x22')&&_0x5805d5['endsWith']('\x22'))try{const _0x24ff93=JSON[_0x441b12(0x1eb)](_0x5805d5);_0x1e815a+=_0x24ff93;if(_0x702e6c)_0x702e6c(_0x24ff93);}catch{}}}}else{_0x1e815a+=_0x21416d;if(_0x702e6c)_0x702e6c(_0x21416d);}}return{'content':_0x1e815a,'toolCalls':_0x26944c};}export async function checkAuth(){const _0x4d99f1=a14_0x3168,_0x51c7b0=getToken();if(!_0x51c7b0)return![];try{const _0x23bf42=getApiUrl(),_0x5f4221=await fetch(_0x23bf42+'/api/auth/verify',{'headers':{'Authorization':_0x4d99f1(0x1e2)+_0x51c7b0}});return _0x5f4221['ok'];}catch{return![];}}function a14_0x3168(_0xb03f47,_0x43f114){_0xb03f47=_0xb03f47-0x1df;const _0x5d925d=a14_0x5d92();let _0x31686a=_0x5d925d[_0xb03f47];return _0x31686a;}export async function getUserUsage(){const _0x2c1df3=a14_0x3168,_0xffebe=getToken();if(!_0xffebe)return null;try{const _0x5879fb=getApiUrl(),_0x557ce9=await fetch(_0x5879fb+_0x2c1df3(0x1e7),{'headers':{'Authorization':'Bearer\x20'+_0xffebe}});if(!_0x557ce9['ok'])return null;return await _0x557ce9[_0x2c1df3(0x1f1)]();}catch(_0x2d23fc){return null;}}function a14_0x5d92(){const _0x9db7d4=['API\x20error:\x20','990065uLSFon','245334YUBsdZ','substring','cli-','Not\x20authenticated.\x20Please\x20run\x20\x27woozlit\x20login\x27\x20first.','status','1.1.0','split','application/json','\x20-\x20','Bearer\x20','6cfijbL','now','arch','312696XKYjjr','/api/user/usage','platform','1234058oEgwnR','No\x20response\x20body','parse','916NtRSNf','1455456fMobEt','153urhwMO','3418200ygGRMw','startsWith','json','random','true','POST','slice','read','version','includes','body','/api/chat','decode'];a14_0x5d92=function(){return _0x9db7d4;};return a14_0x5d92();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a15_0x1af9(_0xfb62ac,_0x433e5b){_0xfb62ac=_0xfb62ac-0x128;const _0x561981=a15_0x5619();let _0x1af980=_0x561981[_0xfb62ac];return _0x1af980;}const a15_0x189040=a15_0x1af9;(function(_0x159455,_0x4703fb){const _0x187083=a15_0x1af9,_0x58b36f=_0x159455();while(!![]){try{const _0x4db353=-parseInt(_0x187083(0x135))/0x1*(-parseInt(_0x187083(0x128))/0x2)+parseInt(_0x187083(0x12f))/0x3*(parseInt(_0x187083(0x13c))/0x4)+parseInt(_0x187083(0x131))/0x5*(parseInt(_0x187083(0x12b))/0x6)+-parseInt(_0x187083(0x132))/0x7+-parseInt(_0x187083(0x13a))/0x8*(parseInt(_0x187083(0x129))/0x9)+-parseInt(_0x187083(0x134))/0xa+parseInt(_0x187083(0x139))/0xb*(parseInt(_0x187083(0x133))/0xc);if(_0x4db353===_0x4703fb)break;else _0x58b36f['push'](_0x58b36f['shift']());}catch(_0x31f5c4){_0x58b36f['push'](_0x58b36f['shift']());}}}(a15_0x5619,0x79c00));import a15_0x2ce685 from'conf';const WEEK_MS=0x7*0x18*0x3c*0x3c*0x3e8,config=new a15_0x2ce685({'projectName':a15_0x189040(0x13b),'defaults':{'entries':[],'lastCleanup':Date['now']()}});function cleanup(){const _0x28f03a=a15_0x189040,_0x28e84d=Date['now'](),_0x3d3aba=config[_0x28f03a(0x130)](_0x28f03a(0x12d));if(_0x28e84d-_0x3d3aba<0x18*0x3c*0x3c*0x3e8)return;const _0x1b16d3=config['get'](_0x28f03a(0x138)),_0x4e938d=_0x1b16d3['filter'](_0xdd93e6=>_0x28e84d-_0xdd93e6[_0x28f03a(0x136)]<WEEK_MS);config[_0x28f03a(0x13d)](_0x28f03a(0x138),_0x4e938d),config['set'](_0x28f03a(0x12d),_0x28e84d);}function a15_0x5619(){const _0x3d226e=['20403ThlQQd','message','3606jTzGge','now','lastCleanup','shift','440877foQRiG','get','5765yehTuJ','2861327EQIohn','359556ULtJCc','7585520yInYVZ','5tNbNUN','timestamp','push','entries','451gwhoaO','3128FkjqNU','woozlit-cli-history','12HyhhwQ','set','76034AyJouE'];a15_0x5619=function(){return _0x3d226e;};return a15_0x5619();}export function addToHistory(_0x4e9cc0){const _0x2379bd=a15_0x189040;cleanup();const _0x11cbaa=config[_0x2379bd(0x130)]('entries');_0x11cbaa[_0x2379bd(0x137)]({'message':_0x4e9cc0,'timestamp':Date[_0x2379bd(0x12c)]()});if(_0x11cbaa['length']>0x64)_0x11cbaa[_0x2379bd(0x12e)]();config['set']('entries',_0x11cbaa);}export function getHistory(){const _0x5b4566=a15_0x189040;return cleanup(),config[_0x5b4566(0x130)](_0x5b4566(0x138))['map'](_0xb969be=>_0xb969be[_0x5b4566(0x12a)]);}export function clearHistory(){const _0x1566d6=a15_0x189040;config[_0x1566d6(0x13d)](_0x1566d6(0x138),[]);}
|
|
@@ -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_0x1b7a92=a16_0x2d1e;(function(_0x471535,_0x103cfb){const _0x1f226c=a16_0x2d1e,_0x4ae3ea=_0x471535();while(!![]){try{const _0x3ffc41=-parseInt(_0x1f226c(0x1ec))/0x1*(-parseInt(_0x1f226c(0x1eb))/0x2)+-parseInt(_0x1f226c(0x1f4))/0x3*(-parseInt(_0x1f226c(0x1f1))/0x4)+parseInt(_0x1f226c(0x1f7))/0x5+-parseInt(_0x1f226c(0x1e9))/0x6+-parseInt(_0x1f226c(0x1fa))/0x7+parseInt(_0x1f226c(0x1e8))/0x8*(-parseInt(_0x1f226c(0x1e6))/0x9)+-parseInt(_0x1f226c(0x1f5))/0xa*(parseInt(_0x1f226c(0x1f8))/0xb);if(_0x3ffc41===_0x103cfb)break;else _0x4ae3ea['push'](_0x4ae3ea['shift']());}catch(_0x380f52){_0x4ae3ea['push'](_0x4ae3ea['shift']());}}}(a16_0x3aeb,0x6db61));const platform=process[a16_0x1b7a92(0x1ea)],arch=process[a16_0x1b7a92(0x1f3)];export function getPlatform(){const _0x26aa75=a16_0x1b7a92;if(platform==='win32')return _0x26aa75(0x1f0);if(platform===_0x26aa75(0x1f6))return _0x26aa75(0x1ed);return _0x26aa75(0x1ef);}export function getArch(){return arch;}export function isWindows(){const _0x7dc5c9=a16_0x1b7a92;return platform===_0x7dc5c9(0x1f9);}export function isMac(){return platform==='darwin';}function a16_0x2d1e(_0x18a7e8,_0xf39ac9){_0x18a7e8=_0x18a7e8-0x1e6;const _0x3aebbe=a16_0x3aeb();let _0x2d1e51=_0x3aebbe[_0x18a7e8];return _0x2d1e51;}function a16_0x3aeb(){const _0xeac4c9=['25524xvNiJe','Windows','arch','219hHUJoq','4020810pZqmPk','darwin','3253595abyUKK','11nFeuIV','win32','4123147qVNuRF','sudo\x20','943551ACeezG','macOS','8YzQKAr','1495062gyQvFL','platform','11206ezcOoT','121AajZTK','macos','Linux','linux','windows'];a16_0x3aeb=function(){return _0xeac4c9;};return a16_0x3aeb();}export function isLinux(){const _0x30a66b=a16_0x1b7a92;return platform===_0x30a66b(0x1ef);}export function getShellPrefix(){const _0x5f457d=a16_0x1b7a92;return isWindows()?'':_0x5f457d(0x1fb);}export function getPlatformInfo(){const _0x124245=a16_0x1b7a92,_0x16c207=getPlatform(),_0x2f9636=_0x16c207===_0x124245(0x1f0)?_0x124245(0x1f2):_0x16c207===_0x124245(0x1ed)?_0x124245(0x1e7):_0x124245(0x1ee);return _0x2f9636+'\x20('+arch+')';}
|
package/dist/utils/storage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x398128,_0x560271){const _0x5af1ba=a17_0x39cd,_0xe315f=_0x398128();while(!![]){try{const _0x42c297=-parseInt(_0x5af1ba(0x203))/0x1*(parseInt(_0x5af1ba(0x206))/0x2)+-parseInt(_0x5af1ba(0x1f5))/0x3*(parseInt(_0x5af1ba(0x1fc))/0x4)+-parseInt(_0x5af1ba(0x1f4))/0x5+-parseInt(_0x5af1ba(0x1fd))/0x6*(-parseInt(_0x5af1ba(0x1ff))/0x7)+parseInt(_0x5af1ba(0x1f7))/0x8*(-parseInt(_0x5af1ba(0x1fb))/0x9)+parseInt(_0x5af1ba(0x1f6))/0xa*(-parseInt(_0x5af1ba(0x205))/0xb)+-parseInt(_0x5af1ba(0x1f1))/0xc*(-parseInt(_0x5af1ba(0x1f9))/0xd);if(_0x42c297===_0x560271)break;else _0xe315f['push'](_0xe315f['shift']());}catch(_0x228182){_0xe315f['push'](_0xe315f['shift']());}}}(a17_0x10db,0xae173));import a17_0x410644 from'conf';const config=new a17_0x410644({'projectName':'woozlit-cli'});export function getToken(){const _0xc117f6=a17_0x39cd;return config['get'](_0xc117f6(0x1fa));}export function setToken(_0x42ecaa){const _0x3a1719=a17_0x39cd;config['set'](_0x3a1719(0x1fa),_0x42ecaa);}export function clearToken(){const _0x35aa54=a17_0x39cd;config[_0x35aa54(0x204)](_0x35aa54(0x1fa));}function a17_0x39cd(_0x1d9b04,_0x2358bc){_0x1d9b04=_0x1d9b04-0x1f0;const _0x10db8f=a17_0x10db();let _0x39cd77=_0x10db8f[_0x1d9b04];return _0x39cd77;}export function getUser(){const _0x35ca92=a17_0x39cd;return{'userId':config['get'](_0x35ca92(0x200)),'email':config[_0x35ca92(0x202)](_0x35ca92(0x1f8)),'displayName':config[_0x35ca92(0x202)](_0x35ca92(0x1f0))};}function a17_0x10db(){const _0x386046=['2365jIsSGn','36196OSWlvM','rules','displayName','706908rCJqxO','push','set','4319115FxjlRN','3951pWGbBN','6790iOICWY','8cPzdjA','email','715fNDeDm','token','8934525yRBfyN','3628BUFOpa','138900NMfZxC','xiaomi/mimo-v2-flash:free','427mTgdWd','userId','selectedModel','get','41kodfZl','delete'];a17_0x10db=function(){return _0x386046;};return a17_0x10db();}export function setUser(_0x4fbd26,_0x553d9c,_0x37d004){const _0x493ff1=a17_0x39cd;config['set']('userId',_0x4fbd26),config['set'](_0x493ff1(0x1f8),_0x553d9c),config[_0x493ff1(0x1f3)](_0x493ff1(0x1f0),_0x37d004);}export function clearUser(){const _0x50c3a5=a17_0x39cd;config[_0x50c3a5(0x204)](_0x50c3a5(0x200)),config[_0x50c3a5(0x204)](_0x50c3a5(0x1f8)),config[_0x50c3a5(0x204)](_0x50c3a5(0x1f0));}export function getSelectedModel(){const _0x1e7439=a17_0x39cd;return config[_0x1e7439(0x202)](_0x1e7439(0x201))||_0x1e7439(0x1fe);}export function setSelectedModel(_0x1d3e9e){const _0x17ba74=a17_0x39cd;config['set'](_0x17ba74(0x201),_0x1d3e9e);}export function getRules(){const _0x12e11c=a17_0x39cd;return config[_0x12e11c(0x202)](_0x12e11c(0x207))||[];}export function addRule(_0x3ecf2f){const _0x19af21=a17_0x39cd,_0x500576=getRules();_0x500576[_0x19af21(0x1f2)](_0x3ecf2f),config[_0x19af21(0x1f3)](_0x19af21(0x207),_0x500576);}export function clearRules(){const _0x2b1659=a17_0x39cd;config['set'](_0x2b1659(0x207),[]);}export function isLoggedIn(){const _0x47c88b=a17_0x39cd;return!!config[_0x47c88b(0x202)](_0x47c88b(0x1fa))&&!!config[_0x47c88b(0x202)](_0x47c88b(0x200));}export function logout(){clearToken(),clearUser();}
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "woozlit",
|
|
3
|
+
"version": "1.0.7",
|
|
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
|
}
|