woozlit 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +30 -111
  2. package/dist/auth/login.js +1 -1
  3. package/dist/browser/index.d.ts +78 -0
  4. package/dist/browser/index.js +1 -0
  5. package/dist/browser/server.d.ts +13 -0
  6. package/dist/browser/server.js +1 -0
  7. package/dist/browser/tools.d.ts +13 -0
  8. package/dist/browser/tools.js +1 -0
  9. package/dist/chat/agent.js +1 -1
  10. package/dist/config/mcp.js +1 -1
  11. package/dist/config/settings.js +1 -1
  12. package/dist/discord/client.d.ts +3 -0
  13. package/dist/discord/client.js +1 -0
  14. package/dist/discord/config.d.ts +5 -0
  15. package/dist/discord/config.js +1 -0
  16. package/dist/discord/index.d.ts +3 -0
  17. package/dist/discord/index.js +1 -0
  18. package/dist/discord/setup.d.ts +1 -0
  19. package/dist/discord/setup.js +1 -0
  20. package/dist/email/config.d.ts +31 -0
  21. package/dist/email/config.js +1 -0
  22. package/dist/email/index.d.ts +3 -0
  23. package/dist/email/index.js +1 -0
  24. package/dist/email/service.d.ts +4 -0
  25. package/dist/email/service.js +1 -0
  26. package/dist/email/setup.d.ts +1 -0
  27. package/dist/email/setup.js +1 -0
  28. package/dist/github/api.d.ts +25 -0
  29. package/dist/github/api.js +1 -0
  30. package/dist/github/auth.d.ts +4 -0
  31. package/dist/github/auth.js +1 -0
  32. package/dist/github/auto-setup.d.ts +1 -0
  33. package/dist/github/auto-setup.js +1 -0
  34. package/dist/github/index.d.ts +1 -0
  35. package/dist/github/index.js +1 -0
  36. package/dist/github/manual-setup.d.ts +1 -0
  37. package/dist/github/manual-setup.js +1 -0
  38. package/dist/index.js +1 -1
  39. package/dist/mcp-servers/computer-use.js +1 -1
  40. package/dist/services/bot-manager.d.ts +13 -0
  41. package/dist/services/bot-manager.js +1 -0
  42. package/dist/services/voice-agent.d.ts +6 -0
  43. package/dist/services/voice-agent.js +1 -0
  44. package/dist/telegram/bot.js +1 -1
  45. package/dist/telegram/config.js +1 -1
  46. package/dist/telegram/index.d.ts +1 -0
  47. package/dist/telegram/index.js +1 -1
  48. package/dist/telegram/reminders.d.ts +11 -0
  49. package/dist/telegram/reminders.js +1 -0
  50. package/dist/telegram/setup.d.ts +1 -0
  51. package/dist/telegram/setup.js +1 -0
  52. package/dist/tools/command.js +1 -1
  53. package/dist/tools/file.js +1 -1
  54. package/dist/tools/index.d.ts +1 -0
  55. package/dist/tools/index.js +1 -1
  56. package/dist/tools/mcp.js +1 -1
  57. package/dist/tools/rollback.js +1 -1
  58. package/dist/tools/rules.js +1 -1
  59. package/dist/twilio/config.d.ts +11 -0
  60. package/dist/twilio/config.js +1 -0
  61. package/dist/twilio/index.d.ts +3 -0
  62. package/dist/twilio/index.js +1 -0
  63. package/dist/twilio/server.d.ts +5 -0
  64. package/dist/twilio/server.js +1 -0
  65. package/dist/twilio/setup.d.ts +1 -0
  66. package/dist/twilio/setup.js +1 -0
  67. package/dist/ui/output.d.ts +2 -2
  68. package/dist/ui/output.js +1 -1
  69. package/dist/ui/select.js +1 -1
  70. package/dist/ui/themes.d.ts +12 -0
  71. package/dist/ui/themes.js +1 -0
  72. package/dist/utils/api.js +1 -1
  73. package/dist/utils/history.js +1 -1
  74. package/dist/utils/mcp-installer.js +1 -1
  75. package/dist/utils/platform.js +1 -1
  76. package/dist/utils/storage.d.ts +3 -0
  77. package/dist/utils/storage.js +1 -1
  78. package/dist/utils/update-check.js +1 -1
  79. package/dist/verify_repro.d.ts +4 -0
  80. package/dist/verify_repro.js +1 -0
  81. package/package.json +21 -10
package/README.md CHANGED
@@ -1,161 +1,80 @@
1
- # Woozlit CLI
1
+ # Woozlit CLI v2.0.1
2
2
 
3
- Command-line interface for Woozlit AI - an agentic coding assistant.
3
+ The elite command-line interface for **Woozlit AI** - an autonomous, agentic coding assistant featuring a beautiful, modern terminal UI (Claude-Code style), global theming, browser automation natively, and remote Telegram control.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
+ # Standalone binaries are available, or install via npm
8
9
  npm install -g woozlit
9
10
  ```
10
11
 
11
- ## Features
12
+ ## Core Features
12
13
 
13
- - **Agentic AI**: Executes complex tasks (coding, testing, deployment) autonomously
14
- - **MCP Support**: Use external tools (Computer Use, Filesystem, etc.) via Model Context Protocol
15
- - **System Control**: Full access to shell commands, file system, and background processes
16
- - **Auto-Correction**: Automatically detects and attempts to fix errors during execution
17
- - **Rollback**: Undo AI file changes with `/rollback` command
18
- - **History**: Local conversation history with 1-week retention
19
- - **Cross-Platform**: Windows, macOS, and Linux support with platform-aware commands
14
+ - **Agentic AI**: Executes complex tasks (coding, testing, deployment) autonomously without stopping to ask permission.
15
+ - **Modern Minimalist UI**: Sleek, Claude-Code inspired terminal aesthetics with spinner branches and concise one-line action summaries (`└ Read 58 lines`).
16
+ - **Global Theming**: Switch the entire CLI's color palette on the fly (`/theme`). Supports: Woozlit Blue, Classic Purple, Hacker Green, Sunset Orange, Dracula Pink, and Monochrome Silver.
17
+ - **Browser Automation**: The CLI can automatically spin up a headless/headed browser session to read documentation, debug web apps, and take screenshots using `browser_*` tools.
18
+ - **Telegram Remote**: Start the CLI on your desktop, leave it running, and text it complex coding tasks from your phone via Telegram.
19
+ - **MCP Protocol**: Deep integration with Model Context Protocol to hook into external servers.
20
+ - **Auto-Correction**: Automatically detects, reads `stderr`, and attempts to fix errors during execution loops.
20
21
 
21
22
  ## Usage
22
23
 
23
24
  ### Start Chat
24
-
25
25
  ```bash
26
26
  woozlit
27
27
  # or
28
28
  woozlit chat
29
29
  ```
30
30
 
31
- ### Login
32
-
33
- ```bash
34
- woozlit login
35
- ```
36
-
37
- Opens browser for authentication. Required before using chat.
38
-
39
- ### Logout
40
-
41
- ```bash
42
- woozlit logout
43
- ```
44
-
45
- ### Check Current User
46
-
31
+ ### Global Themes
47
32
  ```bash
48
- woozlit whoami
33
+ woozlit theme
49
34
  ```
35
+ Brings up an interactive prompt to switch color themes.
50
36
 
51
- ### Single Question
37
+ ### Chat Commands
52
38
 
53
- ```bash
54
- woozlit ask "create a hello world file"
55
- ```
56
-
57
- ### Select Model
58
-
59
- ```bash
60
- woozlit config model
61
- ```
62
-
63
- ### Manage Rules
64
-
65
- ```bash
66
- woozlit rules list
67
- woozlit rules add "always use typescript"
68
- woozlit rules clear
69
- ```
70
-
71
- ### Initialize Project
72
-
73
- ```bash
74
- woozlit init
75
- ```
76
-
77
- Creates `.woozlit/` folder with `rules.md` and `context.md`.
78
-
79
- ## Chat Commands
80
-
81
- Inside chat session:
39
+ Inside a chat session, you can use:
82
40
 
83
41
  | Command | Description |
84
42
  |---------|-------------|
85
43
  | `/exit` | Exit chat |
86
44
  | `/clear` | Clear conversation |
87
- | `/model` | Switch AI model |
88
- | `/mcp` | List connected tools |
45
+ | `/model` | Switch AI model (default is Woozie/Gemini-2.5-Flash) |
46
+ | `/theme` | Switch UI color theme dynamically |
47
+ | `/mcp` | List connected external tools |
48
+ | `/telegram` | Control the remote Telegram bot |
89
49
  | `/usage` | Check token usage |
90
50
  | `/rollback` | Undo last AI file change |
91
51
  | `/help` | Show help |
92
52
 
93
53
  ## Available Models
94
54
 
95
- All models are provided via OpenRouter:
96
-
97
- - MiMo V2 (default)
98
- - Qwen3 235B / Coder
55
+ - **Woozie (Gemini 2.5 Flash)** - Default & Recommended for speed/autonomy
99
56
  - Llama 3.3 70B / 4 Maverick
100
- - Devstral Small
57
+ - Qwen3 235B / Coder
101
58
  - Mistral Small 3.2
102
- - Nemotron Nano 12B
59
+ - DeepSeek V3 / R1
103
60
  - Kimi K2
104
- - GLM 4.5 Air
105
- - Kat Coder Pro
106
- - DeepSeek R1T Chimera
107
- - more soon
61
+ - *and more via OpenRouter...*
108
62
 
109
- ## MCP Support
110
-
111
- Woozlit CLI supports the **Model Context Protocol (MCP)**, allowing the AI to use external tools.
63
+ ## MCP Support (Model Context Protocol)
112
64
 
113
65
  **Manage MCP Servers:**
114
66
 
115
- ### 1. Easy Install (Recommended)
116
- Install servers from GitHub or built-in presets:
117
-
118
67
  ```bash
119
- # Install specific tools (e.g. Chrome Control)
120
- woozlit mcp install mcp-chrome-bridge
121
- # Follow the on-screen instructions to finish setup
122
-
123
- # Install any MCP server from GitHub
124
- woozlit mcp install https://github.com/owner/repo.git
125
- ```
68
+ # Install specific tools (e.g. Browser Control)
69
+ woozlit mcp install browsermcp
126
70
 
127
- ### 2. Manual Configuration
128
- You can also manually add servers via CLI or config file.
71
+ # Install Chrome Bridge specifically
72
+ woozlit mcp install mcp-chrome-bridge
129
73
 
130
- **CLI:**
131
- ```bash
132
74
  # Add standard MCP server (stdio)
133
75
  woozlit mcp add sqlite uvx mcp-server-sqlite --db test.db
134
-
135
- # Add HTTP MCP server (e.g. for bridges)
136
- woozlit mcp add-http mcp-chrome http://127.0.0.1:12306/mcp
137
- ```
138
-
139
- **Config File (`mcp.json`):**
140
- Create a `mcp.json` file in your project root or home directory (`~/.woozlit/mcp.json`):
141
-
142
- ```json
143
- {
144
- "mcpServers": {
145
- "mcp-chrome": {
146
- "type": "streamable-http",
147
- "url": "http://127.0.0.1:12306/mcp"
148
- },
149
- "my-server": {
150
- "type": "stdio",
151
- "command": "node",
152
- "args": ["./server.js"]
153
- }
154
- }
155
- }
156
76
  ```
157
77
 
158
- Once added, the AI can automatically discover and use tools provided by these servers.
78
+ Once added, the AI can automatically discover and use tools provided by these servers natively in its autonomous loop.
159
79
 
160
- Use `/mcp` in the chat to see currently active tools.
161
80
 
@@ -1 +1 @@
1
- (function(_0x28889c,_0x4ec3cd){const _0x251ccc=a0_0x5007,_0x1a18d9=_0x28889c();while(!![]){try{const _0x236811=parseInt(_0x251ccc(0xb0))/0x1+parseInt(_0x251ccc(0xaf))/0x2+parseInt(_0x251ccc(0xa0))/0x3+parseInt(_0x251ccc(0xa2))/0x4+-parseInt(_0x251ccc(0x9d))/0x5*(parseInt(_0x251ccc(0xac))/0x6)+parseInt(_0x251ccc(0xad))/0x7+parseInt(_0x251ccc(0xa8))/0x8*(-parseInt(_0x251ccc(0xb1))/0x9);if(_0x236811===_0x4ec3cd)break;else _0x1a18d9['push'](_0x1a18d9['shift']());}catch(_0x1da616){_0x1a18d9['push'](_0x1a18d9['shift']());}}}(a0_0x5062,0xb937f));import a0_0x1b6e37 from'open';import{createServer}from'http';import{getApiUrl}from'../config/settings.js';function a0_0x5062(){const _0x42da0b=['9780694Nztxon','get','427788lHgbCP','76981LvxDjp','45imdEdD','listen','3101965ioNcnr','displayName','http://localhost:','4528275OwXLZN','\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','4350944jMkxqJ','userId','writeHead','close','token','text/html','4649968Zrxtdc','pathname','end','/callback','6dCsCQT'];a0_0x5062=function(){return _0x42da0b;};return a0_0x5062();}import{setToken,setUser,isLoggedIn,logout as a0_0x37b966}from'../utils/storage.js';export async function login(){const _0x2d7bfa=getApiUrl(),_0x4ad127=0x2694;return new Promise(_0x2f5566=>{const _0x271ff3=a0_0x5007,_0x22e056=createServer(async(_0xc13905,_0x419d4c)=>{const _0x1c14b6=a0_0x5007,_0x461da0=new URL(_0xc13905['url']||'',_0x1c14b6(0x9f)+_0x4ad127);if(_0x461da0[_0x1c14b6(0xa9)]===_0x1c14b6(0xab)){const _0x2c9549=_0x461da0['searchParams'][_0x1c14b6(0xae)](_0x1c14b6(0xa6)),_0x23e8fa=_0x461da0['searchParams'][_0x1c14b6(0xae)](_0x1c14b6(0xa3)),_0x98bb63=_0x461da0['searchParams']['get']('email'),_0x154863=_0x461da0['searchParams']['get'](_0x1c14b6(0x9e));_0x2c9549&&_0x23e8fa?(setToken(_0x2c9549),setUser(_0x23e8fa,_0x98bb63||'',_0x154863||''),_0x419d4c['writeHead'](0xc8,{'Content-Type':_0x1c14b6(0xa7)}),_0x419d4c[_0x1c14b6(0xaa)](_0x1c14b6(0xa1)),_0x22e056['close'](),_0x2f5566(!![])):(_0x419d4c[_0x1c14b6(0xa4)](0x190,{'Content-Type':_0x1c14b6(0xa7)}),_0x419d4c[_0x1c14b6(0xaa)]('\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'),_0x22e056[_0x1c14b6(0xa5)](),_0x2f5566(![]));}});_0x22e056[_0x271ff3(0x9c)](_0x4ad127,()=>{const _0x230d83=_0x271ff3,_0x12ffdd=_0x2d7bfa+'/auth/cli?callback=http://localhost:'+_0x4ad127+_0x230d83(0xab);a0_0x1b6e37(_0x12ffdd);}),setTimeout(()=>{const _0x36f208=_0x271ff3;_0x22e056[_0x36f208(0xa5)](),_0x2f5566(![]);},0x1d4c0);});}function a0_0x5007(_0x544e7b,_0x2828bc){_0x544e7b=_0x544e7b-0x9c;const _0x506276=a0_0x5062();let _0x500768=_0x506276[_0x544e7b];return _0x500768;}export function logout(){a0_0x37b966();}export{isLoggedIn};
1
+ function a0_0x48c8(){const _0x477880=['url','pathname','displayName','/auth/cli?callback=http://localhost:','334792FAOnHl','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>\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','1066933IuhPHz','6naYuBJ','token','userId','383600vMteEI','http://localhost:','/callback','20977YRAraL','710555rnfIAi','4PqLRrK','4Dhkvjr','searchParams','1166418qQzRih','email','70449EtVnLk','writeHead','get','end'];a0_0x48c8=function(){return _0x477880;};return a0_0x48c8();}(function(_0xd331f2,_0x36a4aa){const _0x4e42ae=a0_0x4efd,_0x17bc80=_0xd331f2();while(!![]){try{const _0x2b21df=-parseInt(_0x4e42ae(0x1c8))/0x1*(parseInt(_0x4e42ae(0x1cb))/0x2)+-parseInt(_0x4e42ae(0x1cf))/0x3*(-parseInt(_0x4e42ae(0x1ca))/0x4)+parseInt(_0x4e42ae(0x1c9))/0x5*(parseInt(_0x4e42ae(0x1c2))/0x6)+-parseInt(_0x4e42ae(0x1c1))/0x7+parseInt(_0x4e42ae(0x1be))/0x8+parseInt(_0x4e42ae(0x1cd))/0x9+-parseInt(_0x4e42ae(0x1c5))/0xa;if(_0x2b21df===_0x36a4aa)break;else _0x17bc80['push'](_0x17bc80['shift']());}catch(_0x330e80){_0x17bc80['push'](_0x17bc80['shift']());}}}(a0_0x48c8,0x19778));import a0_0x42645a from'open';function a0_0x4efd(_0x15fbe1,_0x472726){_0x15fbe1=_0x15fbe1-0x1be;const _0x48c84e=a0_0x48c8();let _0x4efd84=_0x48c84e[_0x15fbe1];return _0x4efd84;}import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x304da3}from'../utils/storage.js';export async function login(){const _0x289d9c=getApiUrl(),_0x24f30f=0x2694;return new Promise(_0x29e27d=>{const _0x41279b=createServer(async(_0x25f800,_0x42f07e)=>{const _0x43e49b=a0_0x4efd,_0x527d04=new URL(_0x25f800[_0x43e49b(0x1d3)]||'',_0x43e49b(0x1c6)+_0x24f30f);if(_0x527d04[_0x43e49b(0x1d4)]===_0x43e49b(0x1c7)){const _0x295f99=_0x527d04['searchParams'][_0x43e49b(0x1d1)](_0x43e49b(0x1c3)),_0x167cb8=_0x527d04[_0x43e49b(0x1cc)]['get'](_0x43e49b(0x1c4)),_0x333aaf=_0x527d04[_0x43e49b(0x1cc)][_0x43e49b(0x1d1)](_0x43e49b(0x1ce)),_0x5d2132=_0x527d04[_0x43e49b(0x1cc)][_0x43e49b(0x1d1)](_0x43e49b(0x1d5));_0x295f99&&_0x167cb8?(setToken(_0x295f99),setUser(_0x167cb8,_0x333aaf||'',_0x5d2132||''),_0x42f07e[_0x43e49b(0x1d0)](0xc8,{'Content-Type':'text/html'}),_0x42f07e[_0x43e49b(0x1d2)](_0x43e49b(0x1c0)),_0x41279b[_0x43e49b(0x1bf)](),_0x29e27d(!![])):(_0x42f07e[_0x43e49b(0x1d0)](0x190,{'Content-Type':'text/html'}),_0x42f07e[_0x43e49b(0x1d2)]('\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'),_0x41279b[_0x43e49b(0x1bf)](),_0x29e27d(![]));}});_0x41279b['listen'](_0x24f30f,()=>{const _0x2e14be=a0_0x4efd,_0x54f036=_0x289d9c+_0x2e14be(0x1d6)+_0x24f30f+'/callback';a0_0x42645a(_0x54f036);}),setTimeout(()=>{const _0x397494=a0_0x4efd;_0x41279b[_0x397494(0x1bf)](),_0x29e27d(![]);},0x1d4c0);});}export function logout(){a0_0x304da3();}export{isLoggedIn};
@@ -0,0 +1,78 @@
1
+ export * from './server.js';
2
+ export * from './tools.js';
3
+ export * from './server.js';
4
+ export * from './tools.js';
5
+ export declare const tools: ({
6
+ name: string;
7
+ description: string;
8
+ input_schema: {
9
+ type: string;
10
+ properties: {
11
+ tabId: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ query: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ text: {
20
+ type: string;
21
+ description: string;
22
+ };
23
+ index?: undefined;
24
+ direction?: undefined;
25
+ amount?: undefined;
26
+ };
27
+ required: string[];
28
+ };
29
+ } | {
30
+ name: string;
31
+ description: string;
32
+ input_schema: {
33
+ type: string;
34
+ properties: {
35
+ tabId: {
36
+ type: string;
37
+ description: string;
38
+ };
39
+ query: {
40
+ type: string;
41
+ description: string;
42
+ };
43
+ index: {
44
+ type: string;
45
+ description: string;
46
+ };
47
+ text?: undefined;
48
+ direction?: undefined;
49
+ amount?: undefined;
50
+ };
51
+ required: string[];
52
+ };
53
+ } | {
54
+ name: string;
55
+ description: string;
56
+ input_schema: {
57
+ type: string;
58
+ properties: {
59
+ tabId: {
60
+ type: string;
61
+ description: string;
62
+ };
63
+ direction: {
64
+ type: string;
65
+ enum: string[];
66
+ description: string;
67
+ };
68
+ amount: {
69
+ type: string;
70
+ description: string;
71
+ };
72
+ query?: undefined;
73
+ text?: undefined;
74
+ index?: undefined;
75
+ };
76
+ required: string[];
77
+ };
78
+ })[];
@@ -0,0 +1 @@
1
+ const a1_0x48becb=a1_0x247b;(function(_0x3542f2,_0x6103f9){const _0x641de8=a1_0x247b,_0x5eea7f=_0x3542f2();while(!![]){try{const _0x2addd9=-parseInt(_0x641de8(0x1ab))/0x1*(parseInt(_0x641de8(0x1b2))/0x2)+parseInt(_0x641de8(0x19b))/0x3*(-parseInt(_0x641de8(0x1a6))/0x4)+-parseInt(_0x641de8(0x1a3))/0x5+-parseInt(_0x641de8(0x19d))/0x6*(parseInt(_0x641de8(0x1a2))/0x7)+parseInt(_0x641de8(0x1af))/0x8+parseInt(_0x641de8(0x1ac))/0x9+parseInt(_0x641de8(0x1a8))/0xa;if(_0x2addd9===_0x6103f9)break;else _0x5eea7f['push'](_0x5eea7f['shift']());}catch(_0x56e9c3){_0x5eea7f['push'](_0x5eea7f['shift']());}}}(a1_0xb157,0xf19c5));export*from'./server.js';function a1_0xb157(){const _0x52712a=['2zrSHwY','string','browser_scroll','tabId','Direction\x20to\x20scroll','number','12CprLRR','direction','350070zdjIHC','CSS\x20selector\x20for\x20the\x20element','bottom','Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)','Text\x20to\x20fill','21AxBxcU','1785055wFlvxK','down','browser_click','814696USPpyb','object','26109980FZpfhl','text','top','1260935aMihAU','4424337dSSxTJ','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','query','3957784PdUjnb','Fill\x20a\x20form\x20field\x20or\x20input\x20element','Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot'];a1_0xb157=function(){return _0x52712a;};return a1_0xb157();}export*from'./tools.js';export*from'./server.js';export*from'./tools.js';function a1_0x247b(_0x3bc39c,_0x3d81d3){_0x3bc39c=_0x3bc39c-0x197;const _0xb15718=a1_0xb157();let _0x247b51=_0xb15718[_0x3bc39c];return _0x247b51;}export const tools=[{'name':'browser_fill','description':a1_0x48becb(0x1b0),'input_schema':{'type':a1_0x48becb(0x1a7),'properties':{'tabId':{'type':a1_0x48becb(0x19a),'description':a1_0x48becb(0x1b1)},'query':{'type':a1_0x48becb(0x1b3),'description':a1_0x48becb(0x19e)},'text':{'type':'string','description':a1_0x48becb(0x1a1)}},'required':['tabId',a1_0x48becb(0x1ae),a1_0x48becb(0x1a9)]}},{'name':a1_0x48becb(0x1a5),'description':'Click\x20an\x20element\x20on\x20the\x20page','input_schema':{'type':a1_0x48becb(0x1a7),'properties':{'tabId':{'type':a1_0x48becb(0x19a),'description':a1_0x48becb(0x1ad)},'query':{'type':a1_0x48becb(0x1b3),'description':a1_0x48becb(0x19e)},'index':{'type':'number','description':a1_0x48becb(0x1a0)}},'required':[a1_0x48becb(0x198),a1_0x48becb(0x1ae)]}},{'name':a1_0x48becb(0x197),'description':'Scroll\x20the\x20page\x20up\x20or\x20down','input_schema':{'type':a1_0x48becb(0x1a7),'properties':{'tabId':{'type':a1_0x48becb(0x19a),'description':'Tab\x20ID'},'direction':{'type':a1_0x48becb(0x1b3),'enum':['up',a1_0x48becb(0x1a4),a1_0x48becb(0x1aa),a1_0x48becb(0x19f)],'description':a1_0x48becb(0x199)},'amount':{'type':a1_0x48becb(0x19a),'description':'Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)'}},'required':[a1_0x48becb(0x198),a1_0x48becb(0x19c)]}}];
@@ -0,0 +1,13 @@
1
+ import WebSocket from 'ws';
2
+ interface BrowserSession {
3
+ ws: WebSocket;
4
+ userId: string;
5
+ userEmail: string;
6
+ connectedAt: number;
7
+ }
8
+ export declare function startBrowserServer(port?: number): Promise<boolean>;
9
+ export declare function stopBrowserServer(): void;
10
+ export declare function isBrowserServerRunning(): boolean;
11
+ export declare function sendBrowserCommand(command: string, args?: Record<string, any>, timeout?: number): Promise<any>;
12
+ export declare function getConnectedSessions(): BrowserSession[];
13
+ export {};
@@ -0,0 +1 @@
1
+ function a2_0x1df9(_0x5b1111,_0x52718a){_0x5b1111=_0x5b1111-0x1a3;const _0x39cf98=a2_0x39cf();let _0x1df912=_0x39cf98[_0x5b1111];return _0x1df912;}(function(_0x48d3c6,_0x58e29d){const _0x8f246=a2_0x1df9,_0x47a474=_0x48d3c6();while(!![]){try{const _0x4493bf=-parseInt(_0x8f246(0x1ac))/0x1+-parseInt(_0x8f246(0x1bd))/0x2*(parseInt(_0x8f246(0x1a6))/0x3)+-parseInt(_0x8f246(0x1ce))/0x4+parseInt(_0x8f246(0x1bf))/0x5+parseInt(_0x8f246(0x1b5))/0x6*(parseInt(_0x8f246(0x1d5))/0x7)+-parseInt(_0x8f246(0x1ad))/0x8*(-parseInt(_0x8f246(0x1cc))/0x9)+-parseInt(_0x8f246(0x1b9))/0xa*(-parseInt(_0x8f246(0x1ca))/0xb);if(_0x4493bf===_0x58e29d)break;else _0x47a474['push'](_0x47a474['shift']());}catch(_0x3cbc23){_0x47a474['push'](_0x47a474['shift']());}}}(a2_0x39cf,0x4cd2c));import{WebSocketServer}from'ws';import*as a2_0x2a3881 from'../ui/output.js';function a2_0x39cf(){const _0x1908fe=['reject','474176OFzEVX','user','1198725FlleQq','unknown','warn','Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...','delete','message','type','toString','req_','Command\x20timeout\x20after\x20','Failed\x20to\x20start\x20browser\x20server:\x20','154OycSgq','Browser\x20server\x20started\x20on\x20ws://localhost:','27Smxyzt','Browser\x20server\x20not\x20running','866712BmoudM','requestId','listening','info','Command\x20failed','auth','send','7TSTqVp','EADDRINUSE','values','set','success','result','Browser\x20server\x20stopped','3MaQibH','No\x20browser\x20extension\x20connected','close','userId','email','WebSocket\x20error:','445125BBATWi','618200hourPp','clear','Browser\x20server\x20error:\x20','Error\x20processing\x20message:','error','code','now','substr','934098JqVWOM','data','resolve','auth_success','418790HfIMrt','response','timeout'];a2_0x39cf=function(){return _0x1908fe;};return a2_0x39cf();}const sessions=new Map();let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x3009cf=0x2408){return new Promise(_0x1214fb=>{const _0x50c0b5=a2_0x1df9;if(isRunning&&server){a2_0x2a3881[_0x50c0b5(0x1c1)]('Browser\x20server\x20already\x20running'),_0x1214fb(!![]);return;}try{server=new WebSocketServer({'port':_0x3009cf}),server['on'](_0x50c0b5(0x1d0),()=>{const _0x3ea9bf=_0x50c0b5;isRunning=!![],a2_0x2a3881['success'](_0x3ea9bf(0x1cb)+_0x3009cf),a2_0x2a3881['dim'](_0x3ea9bf(0x1c2)),_0x1214fb(!![]);}),server['on']('connection',async _0x20ab1d=>{const _0x16856e=_0x50c0b5;let _0x4ea38a=null;_0x20ab1d['on']('message',async _0x5bc736=>{const _0x176450=a2_0x1df9;try{const _0x5e589b=JSON['parse'](_0x5bc736[_0x176450(0x1c6)]());if(_0x5e589b[_0x176450(0x1c5)]===_0x176450(0x1d3))_0x4ea38a={'ws':_0x20ab1d,'userId':_0x5e589b[_0x176450(0x1be)]?.['uid']||_0x176450(0x1c0),'userEmail':_0x5e589b[_0x176450(0x1be)]?.[_0x176450(0x1aa)]||_0x176450(0x1c0),'connectedAt':Date[_0x176450(0x1b3)]()},sessions[_0x176450(0x1d8)](_0x4ea38a[_0x176450(0x1a9)],_0x4ea38a),_0x20ab1d[_0x176450(0x1d4)](JSON['stringify']({'type':_0x176450(0x1b8),'userId':_0x4ea38a[_0x176450(0x1a9)]}));else{if(_0x5e589b[_0x176450(0x1c5)]===_0x176450(0x1ba)){const _0x36f133=pendingRequests['get'](_0x5e589b[_0x176450(0x1cf)]);_0x36f133&&(clearTimeout(_0x36f133[_0x176450(0x1bb)]),pendingRequests[_0x176450(0x1c3)](_0x5e589b[_0x176450(0x1cf)]),_0x5e589b[_0x176450(0x1a4)][_0x176450(0x1a3)]?_0x36f133[_0x176450(0x1b7)](_0x5e589b['result'][_0x176450(0x1b6)]):_0x36f133[_0x176450(0x1bc)](new Error(_0x5e589b[_0x176450(0x1a4)][_0x176450(0x1b1)]||_0x176450(0x1d2))));}}}catch(_0x3b18f6){console[_0x176450(0x1b1)](_0x176450(0x1b0),_0x3b18f6);}}),_0x20ab1d['on'](_0x16856e(0x1a8),()=>{const _0x358052=_0x16856e;_0x4ea38a&&sessions[_0x358052(0x1c3)](_0x4ea38a[_0x358052(0x1a9)]);}),_0x20ab1d['on'](_0x16856e(0x1b1),_0x18529a=>{const _0x37f6f7=_0x16856e;console[_0x37f6f7(0x1b1)](_0x37f6f7(0x1ab),_0x18529a);});}),server['on'](_0x50c0b5(0x1b1),_0xc159bd=>{const _0x49d67d=_0x50c0b5;_0xc159bd[_0x49d67d(0x1b2)]!==_0x49d67d(0x1d6)&&a2_0x2a3881['error'](_0x49d67d(0x1af)+_0xc159bd['message']),_0x1214fb(![]);});}catch(_0x466a3b){_0x466a3b['code']!==_0x50c0b5(0x1d6)&&a2_0x2a3881[_0x50c0b5(0x1b1)](_0x50c0b5(0x1c9)+_0x466a3b[_0x50c0b5(0x1c4)]),_0x1214fb(![]);}});}export function stopBrowserServer(){const _0x176f5d=a2_0x1df9;server&&(sessions[_0x176f5d(0x1ae)](),pendingRequests['forEach'](({timeout:_0x15ae67,reject:_0x8c92f1})=>{clearTimeout(_0x15ae67),_0x8c92f1(new Error('Server\x20stopped'));}),pendingRequests[_0x176f5d(0x1ae)](),server[_0x176f5d(0x1a8)](),server=null,isRunning=![],a2_0x2a3881[_0x176f5d(0x1d1)](_0x176f5d(0x1a5)));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x2f78c2,_0x5c4a8f={},_0x328ce6=0x7530){const _0x5a4014=a2_0x1df9;if(!isRunning)throw new Error(_0x5a4014(0x1cd));const _0x38fff9=Array['from'](sessions['values']())[0x0];if(!_0x38fff9)throw new Error(_0x5a4014(0x1a7));const _0x23159d=generateRequestId();return new Promise((_0x2a2a88,_0x3372d6)=>{const _0x45324f=setTimeout(()=>{const _0x397134=a2_0x1df9;pendingRequests['delete'](_0x23159d),_0x3372d6(new Error(_0x397134(0x1c8)+_0x328ce6+'ms'));},_0x328ce6);pendingRequests['set'](_0x23159d,{'resolve':_0x2a2a88,'reject':_0x3372d6,'timeout':_0x45324f});const _0x15c472={'requestId':_0x23159d,'command':_0x2f78c2,'args':_0x5c4a8f};_0x38fff9['ws']['send'](JSON['stringify'](_0x15c472));});}function generateRequestId(){const _0x2e3945=a2_0x1df9;return _0x2e3945(0x1c7)+Date[_0x2e3945(0x1b3)]()+'_'+Math['random']()[_0x2e3945(0x1c6)](0x24)[_0x2e3945(0x1b4)](0x2,0x9);}export function getConnectedSessions(){const _0x3809f9=a2_0x1df9;return Array['from'](sessions[_0x3809f9(0x1d7)]());}
@@ -0,0 +1,13 @@
1
+ export declare function browserOpen(url: string): Promise<any>;
2
+ export declare function browserClick(selector: string): Promise<any>;
3
+ export declare function browserFill(selector: string, value: string): Promise<any>;
4
+ export declare function browserSnapshot(): Promise<any>;
5
+ export declare function browserScreenshot(): Promise<any>;
6
+ export declare function browserGetText(selector: string): Promise<any>;
7
+ export declare function browserGetHtml(selector: string): Promise<any>;
8
+ export declare function browserWait(selectorOrMs: string | number): Promise<any>;
9
+ export declare function browserBack(): Promise<any>;
10
+ export declare function browserForward(): Promise<any>;
11
+ export declare function browserReload(): Promise<any>;
12
+ export declare function browserScroll(direction: 'up' | 'down' | 'top' | 'bottom', amount?: number): Promise<any>;
13
+ export declare function browserClose(): Promise<any>;
@@ -0,0 +1 @@
1
+ (function(_0xde48a9,_0x5c407c){const _0x31456f=a3_0x50d5,_0xb5dbb5=_0xde48a9();while(!![]){try{const _0x3457e8=-parseInt(_0x31456f(0x1b4))/0x1*(-parseInt(_0x31456f(0x1bc))/0x2)+parseInt(_0x31456f(0x1ad))/0x3+parseInt(_0x31456f(0x1a8))/0x4*(-parseInt(_0x31456f(0x1ac))/0x5)+-parseInt(_0x31456f(0x1a9))/0x6*(parseInt(_0x31456f(0x1b9))/0x7)+parseInt(_0x31456f(0x1bd))/0x8+-parseInt(_0x31456f(0x1ba))/0x9+-parseInt(_0x31456f(0x1b5))/0xa*(-parseInt(_0x31456f(0x1b1))/0xb);if(_0x3457e8===_0x5c407c)break;else _0xb5dbb5['push'](_0xb5dbb5['shift']());}catch(_0x177283){_0xb5dbb5['push'](_0xb5dbb5['shift']());}}}(a3_0x4a86,0x7bf9b));import{sendBrowserCommand,getConnectedSessions}from'./server.js';import a3_0xf1f1da from'open';export async function browserOpen(_0x644577){const _0x3cb308=a3_0x50d5,_0x50769d=getConnectedSessions();if(_0x50769d[_0x3cb308(0x1a7)]===0x0)return await a3_0xf1f1da(_0x644577),{'success':!![],'message':'Opened\x20in\x20system\x20browser'};try{return await sendBrowserCommand(_0x3cb308(0x1b2),{'url':_0x644577});}catch(_0x18e0f2){return await a3_0xf1f1da(_0x644577),{'success':!![],'message':_0x3cb308(0x1b6)};}}function a3_0x50d5(_0x422b0e,_0x5e65f5){_0x422b0e=_0x422b0e-0x1a7;const _0x4a863f=a3_0x4a86();let _0x50d525=_0x4a863f[_0x422b0e];return _0x50d525;}export async function browserClick(_0x4f4fe9){return await sendBrowserCommand('click',{'selector':_0x4f4fe9});}export async function browserFill(_0x33ae5c,_0x3d79d6){const _0x20a10c=a3_0x50d5;return await sendBrowserCommand(_0x20a10c(0x1b8),{'selector':_0x33ae5c,'value':_0x3d79d6});}export async function browserSnapshot(){return await sendBrowserCommand('snapshot');}export async function browserScreenshot(){const _0x55ad4c=a3_0x50d5;return await sendBrowserCommand(_0x55ad4c(0x1b7));}function a3_0x4a86(){const _0x6b2178=['back','wait','scroll','11RkdbxU','open','close','6618wJFUOv','8168490loYYsz','Opened\x20in\x20system\x20browser','screenshot','fill','21GaACUS','1119249qDrFTA','reload','158euzLHd','2644168DjpvoV','length','404764sTPZGe','803694Wwflgx','get_text','forward','50emYXzH','1127187aSuuAK'];a3_0x4a86=function(){return _0x6b2178;};return a3_0x4a86();}export async function browserGetText(_0x3d0847){const _0x1485d4=a3_0x50d5;return await sendBrowserCommand(_0x1485d4(0x1aa),{'selector':_0x3d0847});}export async function browserGetHtml(_0x4bee17){return await sendBrowserCommand('get_html',{'selector':_0x4bee17});}export async function browserWait(_0x28bc71){const _0x195fe0=a3_0x50d5;return typeof _0x28bc71==='number'?await sendBrowserCommand(_0x195fe0(0x1af),{'ms':_0x28bc71}):await sendBrowserCommand(_0x195fe0(0x1af),{'selector':_0x28bc71});}export async function browserBack(){const _0x4fe744=a3_0x50d5;return await sendBrowserCommand(_0x4fe744(0x1ae));}export async function browserForward(){const _0x35ef61=a3_0x50d5;return await sendBrowserCommand(_0x35ef61(0x1ab));}export async function browserReload(){const _0x52cb13=a3_0x50d5;return await sendBrowserCommand(_0x52cb13(0x1bb));}export async function browserScroll(_0x32b7ba,_0x4d99e6){const _0x1c70a4=a3_0x50d5;return await sendBrowserCommand(_0x1c70a4(0x1b0),{'direction':_0x32b7ba,'amount':_0x4d99e6});}export async function browserClose(){const _0x443549=a3_0x50d5;return await sendBrowserCommand(_0x443549(0x1b3));}
@@ -1 +1 @@
1
- const a1_0x1eb620=a1_0x5390;(function(_0x20a635,_0x531d19){const _0x16d460=a1_0x5390,_0x5a6aff=_0x20a635();while(!![]){try{const _0x4ab5d7=parseInt(_0x16d460(0xef))/0x1+parseInt(_0x16d460(0xb3))/0x2*(parseInt(_0x16d460(0x141))/0x3)+-parseInt(_0x16d460(0x115))/0x4+parseInt(_0x16d460(0xf4))/0x5+parseInt(_0x16d460(0x125))/0x6*(-parseInt(_0x16d460(0x112))/0x7)+parseInt(_0x16d460(0x12f))/0x8+parseInt(_0x16d460(0x13f))/0x9*(-parseInt(_0x16d460(0xe4))/0xa);if(_0x4ab5d7===_0x531d19)break;else _0x5a6aff['push'](_0x5a6aff['shift']());}catch(_0x2a5d3f){_0x5a6aff['push'](_0x5a6aff['shift']());}}}(a1_0x11f4,0xbc1ca));import{input}from'@inquirer/prompts';import a1_0x1dfae9 from'chalk';import{sendChatMessage,getUserUsage}from'../utils/api.js';function a1_0x11f4(){const _0x2b965a=['toolActivity','loggedInBox','1524790UwQHyc','Failed\x20to\x20fetch\x20usage\x20data.','browser','list','AbortError','4358365EahyCm','search_directory','createSpinner','Tool\x20error:\x20','/stats','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','Yes','Failed\x20to\x20install.\x20Try:\x20npx\x20agent-browser\x20install','API\x20error:\x20','create','includes','/telegram','split','size','aborted','Let\x20me','user','Done\x20in\x20','statusBar','usageBox','Unknown\x20tool:\x20','/quit','content','Telegram\x20bot\x20is\x20running','\x20>\x20','Unknown','email','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','Connected\x20MCP\x20Tools:','monthlyLimit','2681AOuhaH','Tool\x20error\x20occurred:\x20','commandOutput','4686148lIGtFL','#60a5fa','@inquirer/prompts','```tool','stopBot','Cancel','3.\x20Copy\x20the\x20bot\x20token','cancel','write','rateLimitWarning','/usage','###','assistant','child_process','isRateLimit','):\x20','3966uKiOvX','\x22name\x22:','Now,','Install\x20Browser\x20(Chromium\x20~170MB)','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','success','Thinking...','/rollback','inputSchema','Goodbye!','8907272XNkpjg','warn','isOverLimit','map','must\x20greet','/exit','status','Running...','inherit','error','\x0aYou\x20are\x20running\x20on\x20','now','startBot','Conversation\x20cleared','name','```','12588309lDmAuf','aiMessageEnd','3YLLHaU','/model','isSpinning','find_files','Telegram\x20bot\x20is\x20not\x20running','\x20\x20/help\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','serverName','search_file','MCP\x20Tool\x20error:\x20','Editing...','search','.\x20Please\x20fix\x20this\x20and\x20continue.','read_file','dim','Optional\x20Tools','message','args','info','toFixed','---','Reached\x20maximum\x20iterations','Tool\x20result\x20for\x20','match','\x20\x20\x20\x20\x20Enables\x20web\x20scraping,\x20testing,\x20and\x20browser\x20control','Unexpected\x20error:\x20','startsWith','Security\x20PIN\x20set!','actionSpinner','pattern','#2563eb','list_directory','No\x20MCP\x20tools\x20connected.','resetIn','path','stop','.\x20Use\x20PowerShell\x20commands.','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','command','\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot','/tools','aiMessage','168070UMKcyl','You\x20are\x20Woozlit\x20AI.\x20Complete\x20tasks\x20autonomously.\x0a\x0aRULES:\x0a-\x20NO\x20thinking\x20out\x20loud.\x20NO\x20explanations.\x20Just\x20act.\x0a-\x20Keep\x20responses\x20under\x203\x20sentences\x20unless\x20code.\x0a-\x20Use\x20tools\x20via:\x20```tool\x20{\x22name\x22:\x22run_command\x22,\x22args\x22:{\x22command\x22:\x22cmd\x22}}\x20```\x0a\x0aTOOLS:\x20run_command,\x20create_file,\x20read_file,\x20edit_file,\x20list_directory\x0aBROWSER:\x20npx\x20agent-browser\x20open/snapshot/click/fill/close\x0a','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','../tools/file.js','join','1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather','removeListener','isConfigured','edit_file','find','read','length','Telegram\x20Bot\x20Setup','tokensUsed','\x22args\x22:','User\x20aborted.','\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','Fetching\x20usage...','trim','\x0aAborting...','Model\x20changed\x20to:\x20','stringify','I\x27ve','../tools/rollback.js','../telegram/index.js','cwd','Running','\x20\x20/tools\x20\x20\x20\x20\x20-\x20Install\x20optional\x20tools','setBotToken','properties','displayName','start','Searching...','registered\x20that','/clear','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','SIGINT','stdout','Install\x20tool:','create_file','Creating...','description','Reading...','exit','run_command','.\x20Use\x20','parse','isBotRunning','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','10dolhOy','Bot\x20token\x20saved!','abort','succeed','header','push','replace','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','signal'];a1_0x11f4=function(){return _0x2b965a;};return a1_0x11f4();}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_0x16cfeb from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';function a1_0x5390(_0x445323,_0x686914){_0x445323=_0x445323-0xaf;const _0x11f476=a1_0x11f4();let _0x5390c0=_0x11f476[_0x445323];return _0x5390c0;}const SYSTEM_PROMPT=a1_0x1eb620(0xb4);export async function startChat(_0x792854){const _0x13d3a9=a1_0x1eb620,_0x37b7c3=getSelectedModel();await connectToMcpServers();const _0x48bc5b=await getMcpTools(),_0x93f6b9=new Set(_0x48bc5b['map'](_0x49cc1a=>_0x49cc1a[_0x13d3a9(0x147)]));_0x93f6b9[_0x13d3a9(0x101)]>0x0&&a1_0x16cfeb['mcpConnected'](_0x93f6b9[_0x13d3a9(0x101)],_0x48bc5b[_0x13d3a9(0xbe)]);process['on'](_0x13d3a9(0xde),()=>closeMcpClients());const _0x390191=formatRulesForSystem(),_0x4d3311=getPlatformInfo(),_0x435bfe=getShellPrefix(),_0x20c838=_0x48bc5b[_0x13d3a9(0xbe)]>0x0?'\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a'+_0x48bc5b[_0x13d3a9(0x132)](_0x2021ff=>{const _0x59f184=_0x13d3a9,_0x1523e6=Object['keys'](_0x2021ff[_0x59f184(0x12d)]?.[_0x59f184(0xd0)]||{})[_0x59f184(0xb7)](',\x20');return'-\x20'+_0x2021ff['name']+'('+_0x1523e6+_0x59f184(0x124)+_0x2021ff['description'];})['join']('\x0a'):'',_0x4c7d81=isWindows()?_0x13d3a9(0x139)+_0x4d3311+_0x13d3a9(0x164):'\x0aYou\x20are\x20running\x20on\x20'+_0x4d3311+_0x13d3a9(0xe0)+_0x435bfe+_0x13d3a9(0xeb),_0x14c835=SYSTEM_PROMPT+_0x20c838+_0x4c7d81+'\x0a'+_0x390191,_0x49e142=getUser(),_0x35f9d1=[{'role':'system','content':_0x14c835}];(_0x49e142[_0x13d3a9(0xd1)]||_0x49e142[_0x13d3a9(0x10e)])&&a1_0x16cfeb[_0x13d3a9(0xee)](_0x49e142[_0x13d3a9(0xd1)]||_0x49e142[_0x13d3a9(0x10e)]||_0x13d3a9(0x10d));a1_0x16cfeb['currentDir'](process[_0x13d3a9(0xcc)]()),a1_0x16cfeb[_0x13d3a9(0x14e)]('Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more'),a1_0x16cfeb[_0x13d3a9(0x106)](_0x37b7c3,0x64);const _0x24b153=async _0x50060b=>{const _0x465211=_0x13d3a9;if(!_0x50060b||_0x50060b['trim']()==='')return!![];const _0x102b02=_0x50060b['trim']();if(_0x102b02===_0x465211(0x134)||_0x102b02===_0x465211(0x109))return a1_0x16cfeb['info'](_0x465211(0x12e)),![];if(_0x102b02===_0x465211(0xd5))return _0x35f9d1['length']=0x1,a1_0x16cfeb[_0x465211(0x152)](_0x465211(0x13c)),!![];if(_0x102b02==='/mcp'){const _0x38d10f=await getMcpTools();return _0x38d10f['length']===0x0?a1_0x16cfeb[_0x465211(0x152)](_0x465211(0x160)):(a1_0x16cfeb[_0x465211(0x152)](_0x465211(0x110)),_0x38d10f['forEach'](_0x2dd43c=>a1_0x16cfeb[_0x465211(0x14e)]('-\x20'+_0x2dd43c['name']+'\x20('+_0x2dd43c['serverName']+_0x465211(0x124)+(_0x2dd43c[_0x465211(0xdc)]?.['slice'](0x0,0x32)||'')))),a1_0x16cfeb[_0x465211(0x14e)]('\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.'),!![];}if(_0x102b02==='/help')return a1_0x16cfeb[_0x465211(0xe8)]('Commands'),a1_0x16cfeb[_0x465211(0x14e)]('\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat'),a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0xc3)),a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0xe3)),a1_0x16cfeb['dim'](_0x465211(0xb5)),a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0xce)),a1_0x16cfeb['dim']('\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram'),a1_0x16cfeb['dim'](_0x465211(0x129)),a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0x165)),a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0x146)),!![];if(_0x102b02===_0x465211(0xb1)){a1_0x16cfeb[_0x465211(0xe8)](_0x465211(0x14f)),a1_0x16cfeb[_0x465211(0x14e)]('\x20\x201.\x20Browser\x20Automation\x20(agent-browser\x20+\x20Chromium)'),a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0x158)),a1_0x16cfeb['info']('');const {select:_0x3e9b04}=await import('@inquirer/prompts'),_0x144d6e=await _0x3e9b04({'message':_0x465211(0xd9),'choices':[{'name':_0x465211(0x128),'value':_0x465211(0xf1)},{'name':_0x465211(0x11a),'value':_0x465211(0x11c)}]});if(_0x144d6e===_0x465211(0xf1)){a1_0x16cfeb[_0x465211(0x152)]('Installing\x20Chromium\x20for\x20browser\x20automation...');const {execSync:_0x1fdd95}=await import(_0x465211(0x122));try{_0x1fdd95('npx\x20agent-browser\x20install',{'stdio':_0x465211(0x137)}),a1_0x16cfeb[_0x465211(0x12a)]('Chromium\x20installed!\x20Use\x20\x27agent-browser\x20open\x20<url>\x27\x20in\x20prompts.');}catch{a1_0x16cfeb[_0x465211(0x138)](_0x465211(0xfb));}}return!![];}if(_0x102b02[_0x465211(0x15a)](_0x465211(0xff))){const _0x2550ad=await import(_0x465211(0xcb)),_0x4356fa=_0x102b02[_0x465211(0x100)]('\x20')[0x1]||'';if(_0x4356fa==='setup'){const {input:_0x17d9c1,password:_0x4fa308}=await import(_0x465211(0x117));a1_0x16cfeb['header'](_0x465211(0xbf)),a1_0x16cfeb['dim'](_0x465211(0xb8)),a1_0x16cfeb['dim']('2.\x20Send\x20/newbot\x20and\x20follow\x20instructions'),a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0x11b)),a1_0x16cfeb[_0x465211(0x152)]('');const _0x2334a1=await _0x4fa308({'message':'Bot\x20token:','mask':'*'});_0x2334a1&&(_0x2550ad[_0x465211(0xcf)](_0x2334a1),a1_0x16cfeb[_0x465211(0x12a)](_0x465211(0xe5)));const _0x228338=await _0x17d9c1({'message':_0x465211(0x10f)});return _0x228338&&(_0x2550ad['setSecurityPin'](_0x228338),a1_0x16cfeb['success'](_0x465211(0x15b))),a1_0x16cfeb[_0x465211(0x152)]('Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.'),!![];}if(_0x4356fa===_0x465211(0xd2))return await _0x2550ad[_0x465211(0x13b)](),!![];if(_0x4356fa===_0x465211(0x163))return _0x2550ad[_0x465211(0x119)](),a1_0x16cfeb[_0x465211(0x152)]('Telegram\x20bot\x20stopped.'),!![];if(_0x4356fa===_0x465211(0x135))return _0x2550ad[_0x465211(0xe2)]()?a1_0x16cfeb['success'](_0x465211(0x10b)):a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0x145)),a1_0x16cfeb[_0x465211(0x14e)]('Configured:\x20'+(_0x2550ad[_0x465211(0xba)]()?_0x465211(0xfa):'No')),!![];return a1_0x16cfeb['header']('Telegram\x20Commands'),a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0xf9)),a1_0x16cfeb[_0x465211(0x14e)]('\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot'),a1_0x16cfeb[_0x465211(0x14e)](_0x465211(0xb0)),a1_0x16cfeb[_0x465211(0x14e)]('\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status'),!![];}if(_0x102b02===_0x465211(0x12c)){const {rollbackLast:_0x117eaa,getChanges:_0x2b9a91}=await import(_0x465211(0xca)),_0x3fc314=_0x2b9a91();if(_0x3fc314[_0x465211(0xbe)]===0x0)a1_0x16cfeb['info']('No\x20changes\x20to\x20rollback');else{const _0x1c1945=_0x117eaa();_0x1c1945[_0x465211(0x12a)]?a1_0x16cfeb[_0x465211(0x12a)](_0x1c1945[_0x465211(0x150)]):a1_0x16cfeb[_0x465211(0x138)](_0x1c1945[_0x465211(0x150)]);}return!![];}if(_0x102b02===_0x465211(0x142)){const _0x37fdf1=await selectModel();return _0x37fdf1!==_0x37b7c3?(a1_0x16cfeb['info'](_0x465211(0xc7)+_0x37fdf1),a1_0x16cfeb[_0x465211(0x152)](_0x465211(0xd6))):a1_0x16cfeb[_0x465211(0x152)]('Current\x20model:\x20'+_0x37b7c3),!![];}if(_0x102b02===_0x465211(0x11f)||_0x102b02===_0x465211(0xf8)){const _0x35cb78=a1_0x16cfeb[_0x465211(0xf6)](_0x465211(0xc4));_0x35cb78[_0x465211(0xd2)]();const _0x5f0a9f=await getUserUsage();return _0x35cb78[_0x465211(0x163)](),_0x5f0a9f?a1_0x16cfeb[_0x465211(0x107)](_0x5f0a9f[_0x465211(0xc0)],_0x5f0a9f[_0x465211(0x111)],_0x5f0a9f[_0x465211(0x131)]):a1_0x16cfeb[_0x465211(0x138)](_0x465211(0xf0)),!![];}return _0x35f9d1[_0x465211(0xe9)]({'role':_0x465211(0x104),'content':_0x102b02}),await processAgentLoop(_0x35f9d1,_0x37b7c3),!![];};if(_0x792854){const _0x3b1759=await _0x24b153(_0x792854);if(!_0x3b1759)return;}while(!![]){try{const _0xf82eda=a1_0x16cfeb['gradientText'](_0x13d3a9(0x10c),_0x13d3a9(0x116),_0x13d3a9(0x15e)),_0x43c969=await input({'message':_0xf82eda,'theme':{'prefix':''}}),_0x1748e1=await _0x24b153(_0x43c969);if(!_0x1748e1)break;}catch(_0xb609c8){if(_0xb609c8 instanceof Error&&_0xb609c8[_0x13d3a9(0x150)]['includes']('force\x20closed'))break;a1_0x16cfeb['error'](_0x13d3a9(0x159)+_0xb609c8);}}}function cleanTagsFromLine(_0x4fdfe1){const _0x30edce=a1_0x1eb620,_0xc38366=_0x4fdfe1['trim']();if(!_0xc38366)return'';if(_0xc38366['startsWith']('**'))return'';if(_0xc38366[_0x30edce(0x15a)](_0x30edce(0x120)))return'';if(_0xc38366[_0x30edce(0x15a)](_0x30edce(0x154)))return'';if(_0xc38366[_0x30edce(0x15a)](_0x30edce(0x13e)))return'';if(_0xc38366[_0x30edce(0xfe)](_0x30edce(0x126))&&_0xc38366[_0x30edce(0xfe)](_0x30edce(0xc1)))return'';if(_0xc38366['startsWith'](_0x30edce(0xcd)))return'';if(_0xc38366['startsWith']('-\x20Running'))return'';if(_0xc38366[_0x30edce(0x15a)](_0x30edce(0xc9)))return'';if(_0xc38366[_0x30edce(0x15a)]('I\x20am'))return'';if(_0xc38366[_0x30edce(0x15a)](_0x30edce(0x127)))return'';if(_0xc38366['startsWith'](_0x30edce(0x103)))return'';if(_0xc38366[_0x30edce(0xfe)](_0x30edce(0x133)))return'';if(_0xc38366[_0x30edce(0xfe)](_0x30edce(0xd4)))return'';return _0x4fdfe1['replace'](/<text>/g,'')[_0x30edce(0xea)](/<\/text>/g,'')[_0x30edce(0xea)](/<reasoning>/g,'')['replace'](/<\/reasoning>/g,'')[_0x30edce(0xea)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x59b199,_0x1add53){const _0x19edf2=a1_0x1eb620;let _0x565288=0x0;const _0x58e02d=0x3e8;while(_0x565288<_0x58e02d){_0x565288++;const _0x5a3ec7=a1_0x16cfeb['createSpinner'](_0x19edf2(0x12b));_0x5a3ec7[_0x19edf2(0xd2)]();let _0x4d12b2='',_0x308579=![],_0xfc9d7a='';const _0x33c413=new AbortController(),_0x5d770c=()=>{const _0x43a4ff=_0x19edf2;_0x33c413[_0x43a4ff(0xe6)](),a1_0x16cfeb['info'](_0x43a4ff(0xc6));};process['on'](_0x19edf2(0xd7),_0x5d770c);try{const _0x20075d=await sendChatMessage(_0x1add53,_0x59b199,_0x2d0ef9=>{const _0xb9c91=_0x19edf2;_0x5a3ec7[_0xb9c91(0x143)]&&(_0x5a3ec7['stop'](),a1_0x16cfeb[_0xb9c91(0xb2)](''));_0x4d12b2+=_0x2d0ef9;for(const _0x243e82 of _0x2d0ef9){_0xfc9d7a+=_0x243e82;if(_0x243e82==='\x0a'){if(!_0x308579){if(_0xfc9d7a[_0xb9c91(0x15a)](_0xb9c91(0x118)))_0x308579=!![];else{if(_0xfc9d7a[_0xb9c91(0x15a)](_0xb9c91(0x13e))){const _0x539a9f=cleanTagsFromLine(_0xfc9d7a);if(_0x539a9f[_0xb9c91(0xc5)]())process[_0xb9c91(0xd8)][_0xb9c91(0x11d)](_0x539a9f);}else{const _0x1060e8=cleanTagsFromLine(_0xfc9d7a);if(_0x1060e8[_0xb9c91(0xc5)]())process[_0xb9c91(0xd8)][_0xb9c91(0x11d)](_0x1060e8);}}}else _0xfc9d7a[_0xb9c91(0x15a)]('```')&&!_0xfc9d7a['startsWith'](_0xb9c91(0x118))&&(_0x308579=![]);_0xfc9d7a='';}}},_0x33c413[_0x19edf2(0xec)]);if(_0xfc9d7a&&!_0x308579&&!_0xfc9d7a['startsWith']('```tool')){const _0x22a3fc=cleanTagsFromLine(_0xfc9d7a);if(_0x22a3fc[_0x19edf2(0xc5)]())process[_0x19edf2(0xd8)][_0x19edf2(0x11d)](_0x22a3fc);}_0x4d12b2=_0x20075d['content'];}catch(_0x4aa796){_0x5a3ec7['stop'](),process[_0x19edf2(0xb9)](_0x19edf2(0xd7),_0x5d770c);if(_0x4aa796['name']===_0x19edf2(0xf3)||_0x4aa796[_0x19edf2(0x150)][_0x19edf2(0xfe)](_0x19edf2(0x102))){a1_0x16cfeb[_0x19edf2(0x130)](_0x19edf2(0xc2)),_0x59b199[_0x19edf2(0xe9)]({'role':_0x19edf2(0x121),'content':_0x4d12b2+'\x20[Aborted]'}),_0x59b199[_0x19edf2(0xe9)]({'role':'user','content':'Stop.'});break;}if(_0x4aa796[_0x19edf2(0x123)]){a1_0x16cfeb[_0x19edf2(0x11e)](_0x4aa796[_0x19edf2(0x161)]||0x3c);return;}a1_0x16cfeb['error'](_0x19edf2(0xfc)+_0x4aa796);return;}finally{process['removeListener'](_0x19edf2(0xd7),_0x5d770c);}_0x5a3ec7[_0x19edf2(0x143)]&&_0x5a3ec7[_0x19edf2(0x163)]();a1_0x16cfeb[_0x19edf2(0x140)](),_0x59b199['push']({'role':_0x19edf2(0x121),'content':_0x4d12b2});const _0x429e68=_0x4d12b2[_0x19edf2(0x157)](/```tool\s*([\s\S]*?)```/);if(!_0x429e68)break;try{const _0x197f0a=_0x429e68[0x1]['trim'](),_0x5132d6=JSON[_0x19edf2(0xe1)](_0x197f0a);a1_0x16cfeb[_0x19edf2(0xed)](_0x5132d6[_0x19edf2(0x13d)],_0x5132d6[_0x19edf2(0x151)]);let _0x251941='Executing...',_0x1239ef='';_0x5132d6[_0x19edf2(0x13d)]['startsWith'](_0x19edf2(0xbd))&&(_0x251941=_0x19edf2(0xdd),_0x1239ef=_0x5132d6[_0x19edf2(0x151)][_0x19edf2(0x162)]||'');_0x5132d6[_0x19edf2(0x13d)][_0x19edf2(0x15a)](_0x19edf2(0xfd))&&(_0x251941=_0x19edf2(0xdb),_0x1239ef=_0x5132d6[_0x19edf2(0x151)]['path']||'');_0x5132d6[_0x19edf2(0x13d)][_0x19edf2(0x15a)]('edit')&&(_0x251941=_0x19edf2(0x14a),_0x1239ef=_0x5132d6['args'][_0x19edf2(0x162)]||'');_0x5132d6[_0x19edf2(0x13d)][_0x19edf2(0x15a)](_0x19edf2(0xf2))&&(_0x251941='Listing...',_0x1239ef=_0x5132d6[_0x19edf2(0x151)][_0x19edf2(0x162)]||'');_0x5132d6[_0x19edf2(0x13d)][_0x19edf2(0x15a)]('search')&&(_0x251941=_0x19edf2(0xd3),_0x1239ef=(_0x5132d6[_0x19edf2(0x151)][_0x19edf2(0x162)]?_0x5132d6[_0x19edf2(0x151)]['path']+':\x20':'')+(_0x5132d6['args']['pattern']||''));_0x5132d6['name']==='run_command'&&(_0x251941=_0x19edf2(0x136),_0x1239ef=_0x5132d6[_0x19edf2(0x151)][_0x19edf2(0xaf)]||'');const _0x34729c=a1_0x16cfeb[_0x19edf2(0x15c)]((_0x251941+'\x20'+_0x1239ef)[_0x19edf2(0xc5)]());_0x34729c[_0x19edf2(0xd2)]();const _0x7de3cb=performance[_0x19edf2(0x13a)]();let _0x55b774;try{_0x55b774=await executeToolCall(_0x5132d6[_0x19edf2(0x13d)],_0x5132d6[_0x19edf2(0x151)]);}catch(_0x1a4f08){if(_0x1a4f08['message']&&_0x1a4f08[_0x19edf2(0x150)][_0x19edf2(0xfe)]('Unknown\x20tool')){const _0x4e9925=await getMcpTools(),_0x4a505c=_0x4e9925[_0x19edf2(0xbc)](_0x2560cd=>_0x2560cd[_0x19edf2(0x13d)]===_0x5132d6[_0x19edf2(0x13d)]);if(_0x4a505c)try{_0x55b774=await executeMcpTool(_0x4a505c[_0x19edf2(0x147)],_0x4a505c[_0x19edf2(0x13d)],_0x5132d6[_0x19edf2(0x151)]);}catch(_0x5f2a9f){throw new Error(_0x19edf2(0x149)+_0x5f2a9f);}else throw _0x1a4f08;}else throw _0x1a4f08;}const _0x37c0b9=((performance[_0x19edf2(0x13a)]()-_0x7de3cb)/0x3e8)[_0x19edf2(0x153)](0x1);_0x34729c[_0x19edf2(0xe7)](a1_0x1dfae9[_0x19edf2(0x14e)](_0x19edf2(0x105)+_0x37c0b9+'s')),_0x59b199[_0x19edf2(0xe9)]({'role':_0x19edf2(0x104),'content':_0x19edf2(0x156)+_0x5132d6['name']+':\x0a'+JSON[_0x19edf2(0xc8)](_0x55b774,null,0x2)}),await new Promise(_0x353f19=>setTimeout(_0x353f19,0x1f4));}catch(_0x557b1a){a1_0x16cfeb[_0x19edf2(0x138)](_0x19edf2(0xf7)+_0x557b1a),_0x59b199[_0x19edf2(0xe9)]({'role':_0x19edf2(0x104),'content':_0x19edf2(0x113)+_0x557b1a+_0x19edf2(0x14c)});}}_0x565288>=_0x58e02d&&a1_0x16cfeb[_0x19edf2(0x130)](_0x19edf2(0x155));}async function executeToolCall(_0x439371,_0x79be89){const _0x4c2768=a1_0x1eb620;switch(_0x439371){case _0x4c2768(0xda):return createFile(_0x79be89[_0x4c2768(0x162)],_0x79be89[_0x4c2768(0x10a)]);case _0x4c2768(0x14d):return readFile(_0x79be89[_0x4c2768(0x162)]);case _0x4c2768(0x15f):return listDirectory(_0x79be89[_0x4c2768(0x162)]||'.');case _0x4c2768(0xbb):return editFile(_0x79be89[_0x4c2768(0x162)],_0x79be89[_0x4c2768(0x14b)],_0x79be89['replace']);case _0x4c2768(0x148):return searchFile(_0x79be89['path'],_0x79be89[_0x4c2768(0x15d)]);case _0x4c2768(0xdf):const {command:_0x16be93,background:_0x593b2f,wait:_0x1c1856}=_0x79be89,_0x19db84=await runCommand(_0x16be93,_0x46714f=>{const _0x1ac566=_0x4c2768;a1_0x16cfeb[_0x1ac566(0x114)](_0x46714f);},_0x593b2f,_0x1c1856);return _0x19db84;case _0x4c2768(0x144):{const {findFiles:_0x476c73}=await import(_0x4c2768(0xb6));return _0x476c73(_0x79be89[_0x4c2768(0x162)]||'.',_0x79be89['pattern']);}case _0x4c2768(0xf5):{const {searchDirectory:_0x2fe126}=await import(_0x4c2768(0xb6));return _0x2fe126(_0x79be89['path']||'.',_0x79be89[_0x4c2768(0x15d)]);}default:return{'error':_0x4c2768(0x108)+_0x439371};}}
1
+ (function(_0x148b59,_0x53c98e){const _0x96a51f=a4_0x29b9,_0x3f2aa0=_0x148b59();while(!![]){try{const _0x4499f9=-parseInt(_0x96a51f(0x1dd))/0x1*(parseInt(_0x96a51f(0x25e))/0x2)+parseInt(_0x96a51f(0x24d))/0x3*(parseInt(_0x96a51f(0x1be))/0x4)+parseInt(_0x96a51f(0x281))/0x5*(-parseInt(_0x96a51f(0x228))/0x6)+-parseInt(_0x96a51f(0x27f))/0x7*(-parseInt(_0x96a51f(0x1fa))/0x8)+parseInt(_0x96a51f(0x1ea))/0x9*(-parseInt(_0x96a51f(0x240))/0xa)+-parseInt(_0x96a51f(0x236))/0xb+parseInt(_0x96a51f(0x22a))/0xc;if(_0x4499f9===_0x53c98e)break;else _0x3f2aa0['push'](_0x3f2aa0['shift']());}catch(_0x4980a3){_0x3f2aa0['push'](_0x3f2aa0['shift']());}}}(a4_0x47dc,0x69071));import{input}from'@inquirer/prompts';import a4_0x26432e from'chalk';import{sendChatMessage,getUserUsage}from'../utils/api.js';function a4_0x29b9(_0x3782b0,_0x1b7f66){_0x3782b0=_0x3782b0-0x1ad;const _0x47dc3a=a4_0x47dc();let _0x29b948=_0x47dc3a[_0x3782b0];return _0x29b948;}import{getSelectedModel,getUser}from'../utils/storage.js';import{formatRulesForSystem}from'../tools/rules.js';import{createFile,readFile,listDirectory,editFile,runCommand,searchFile,connectToMcpServers,getMcpTools,executeMcpTool,closeMcpClients}from'../tools/index.js';import*as a4_0x3301e7 from'../ui/output.js';import{selectModel}from'../ui/select.js';import{getPlatformInfo,isWindows,getShellPrefix}from'../utils/platform.js';import*as a4_0x14980f from'../github/index.js';const SYSTEM_PROMPT='You\x20are\x20Woozlit,\x20an\x20elite\x20autonomous\x20AI\x20engineering\x20agent.\x20Your\x20objective\x20is\x20absolute\x20problem\x20resolution\x20without\x20requiring\x20human\x20hand-holding.\x0a\x0aCORE\x20DIRECTIVES:\x0a1.\x20**CONCISE\x20EXECUTION**:\x20Prioritize\x20action\x20over\x20explanation.\x20Minimize\x20conversational\x20output.\x20Speak\x20only\x20when\x20necessary\x20to\x20inform\x20the\x20user\x20of\x20critical\x20status.\x20NEVER\x20use\x20emojis.\x0a2.\x20**AUTONOMY**:\x20Act\x20independently.\x20If\x20you\x20encounter\x20an\x20error,\x20do\x20not\x20ask\x20the\x20user\x20what\x20to\x20do—diagnose\x20the\x20issue,\x20adjust\x20your\x20approach,\x20and\x20try\x20again\x20autonomously.\x0a3.\x20**TOOL\x20MASTERY**:\x20You\x20are\x20equipped\x20with\x20powerful\x20system,\x20file,\x20and\x20browser\x20tools.\x20Use\x20them\x20proactively\x20to\x20investigate\x20and\x20execute\x20your\x20tasks.\x0a4.\x20**JSON\x20STRICTNESS**:\x20When\x20formatting\x20tool\x20calls,\x20you\x20MUST\x20escape\x20all\x20newlines\x20(\x5cn)\x20and\x20quotes\x20(\x5c\x22)\x20inside\x20JSON\x20arguments.\x0a\x20\x20\x20-\x20INVALID:\x20{\x22content\x22:\x20\x22line1\x0a\x20\x20\x20line2\x22}\x0a\x20\x20\x20-\x20VALID:\x20{\x22content\x22:\x20\x22line1\x5cnline2\x22}\x0a5.\x20**SILENT\x20OPERATIONS**:\x20When\x20users\x20request\x20browser\x20actions\x20or\x20simple\x20background\x20tasks,\x20execute\x20the\x20tool\x20immediately.\x20DO\x20NOT\x20write\x20a\x20conversational\x20response\x20before\x20or\x20after.\x20Output\x20ONLY\x20the\x20raw\x20tool\x20JSON\x20block.\x0a\x0aAVAILABLE\x20TOOLS:\x0a-\x20File\x20system:\x20create_file,\x20read_file,\x20edit_file,\x20list_directory,\x20search_file,\x20find_files,\x20search_directory\x0a-\x20GitHub:\x20github_read_file,\x20github_create_pr,\x20github_create_branch\x0a-\x20Terminal:\x20run_command\x0a-\x20Browser:\x20browser_open,\x20browser_click,\x20browser_fill,\x20browser_snapshot,\x20browser_screenshot,\x20browser_get_text,\x20browser_close\x0a\x0aTOOL\x20EXECUTION\x20FORMAT:\x0aYou\x20must\x20execute\x20tools\x20by\x20outputting\x20a\x20JSON\x20block\x20wrapped\x20in\x20<execute_tool>\x20tags.\x0aExample:\x0a<execute_tool>\x0a{\x22name\x22:\x20\x22tool_name\x22,\x20\x22args\x22:\x20{\x22arg_name\x22:\x20\x22arg_value\x22}}\x0a</execute_tool>\x0a';export async function startChat(_0x10c342){const _0xe9ba89=a4_0x29b9,{startBrowserServer:_0x2eb22e}=await import('../browser/index.js');_0x2eb22e()['catch'](()=>{});const _0x23015c=getSelectedModel();await connectToMcpServers();const _0x4f8377=await getMcpTools(),_0x575898=new Set(_0x4f8377[_0xe9ba89(0x221)](_0x48a264=>_0x48a264[_0xe9ba89(0x1b3)]));_0x575898[_0xe9ba89(0x264)]>0x0&&a4_0x3301e7[_0xe9ba89(0x1c0)](_0x575898[_0xe9ba89(0x264)],_0x4f8377[_0xe9ba89(0x203)]);process['on'](_0xe9ba89(0x246),()=>closeMcpClients());const _0x5b8d2e=formatRulesForSystem(),_0x1b07e6=getPlatformInfo(),_0x13ebd9=getShellPrefix(),_0xb129a9=_0x4f8377[_0xe9ba89(0x203)]>0x0?_0xe9ba89(0x1f4)+_0x4f8377[_0xe9ba89(0x221)](_0x53152c=>{const _0x2a2265=_0xe9ba89,_0x122ca7=Object[_0x2a2265(0x1d9)](_0x53152c[_0x2a2265(0x1ec)]?.[_0x2a2265(0x1e8)]||{})[_0x2a2265(0x22c)](',\x20');return'-\x20'+_0x53152c['name']+'('+_0x122ca7+'):\x20'+_0x53152c[_0x2a2265(0x1c8)];})[_0xe9ba89(0x22c)]('\x0a'):'',_0x170d47=isWindows()?'\x0aYou\x20are\x20running\x20on\x20'+_0x1b07e6+'.\x20Use\x20PowerShell\x20commands.':_0xe9ba89(0x26d)+_0x1b07e6+_0xe9ba89(0x1fd)+_0x13ebd9+_0xe9ba89(0x286),_0x58e559=SYSTEM_PROMPT+_0xb129a9+_0x170d47+'\x0a'+_0x5b8d2e,_0x1c7787=getUser(),_0x580e4c=[{'role':_0xe9ba89(0x222),'content':_0x58e559}];(_0x1c7787[_0xe9ba89(0x21d)]||_0x1c7787['email'])&&a4_0x3301e7[_0xe9ba89(0x23f)](_0x1c7787['displayName']||_0x1c7787[_0xe9ba89(0x242)]||_0xe9ba89(0x252));a4_0x3301e7['currentDir'](process[_0xe9ba89(0x206)]()),a4_0x3301e7[_0xe9ba89(0x1c4)](_0xe9ba89(0x1c7)),a4_0x3301e7['statusBar'](_0x23015c,0x64);const _0x46ae04=async _0x2462b4=>{const _0x176b15=_0xe9ba89;if(!_0x2462b4||_0x2462b4[_0x176b15(0x22d)]()==='')return!![];const _0x58318e=_0x2462b4[_0x176b15(0x22d)]();if(_0x58318e===_0x176b15(0x23b)||_0x58318e===_0x176b15(0x1f7))return a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x1eb)),![];if(_0x58318e===_0x176b15(0x24b))return _0x580e4c[_0x176b15(0x203)]=0x1,a4_0x3301e7[_0x176b15(0x27c)]('Conversation\x20cleared'),!![];if(_0x58318e===_0x176b15(0x213)){const _0x87db2c=await getMcpTools();return _0x87db2c['length']===0x0?a4_0x3301e7['info'](_0x176b15(0x1ba)):(a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x259)),_0x87db2c[_0x176b15(0x24f)](_0x1fc3c9=>a4_0x3301e7[_0x176b15(0x1c4)]('-\x20'+_0x1fc3c9['name']+'\x20('+_0x1fc3c9['serverName']+'):\x20'+(_0x1fc3c9[_0x176b15(0x1c8)]?.[_0x176b15(0x209)](0x0,0x32)||'')))),a4_0x3301e7['dim'](_0x176b15(0x253)),!![];}if(_0x58318e===_0x176b15(0x1e7))return a4_0x3301e7[_0x176b15(0x1c2)]('Commands'),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1c3)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x200)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1b5)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x263)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1de)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1cd)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x239)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x20c)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x230)),a4_0x3301e7['dim'](_0x176b15(0x1e1)),a4_0x3301e7['dim'](_0x176b15(0x208)),!![];if(_0x58318e===_0x176b15(0x24a)){const {isBrowserServerRunning:_0x538687,getConnectedSessions:_0x45c8da}=await import(_0x176b15(0x212));if(_0x538687()){const _0x592a8f=_0x45c8da();a4_0x3301e7['success'](_0x176b15(0x249)),a4_0x3301e7['info'](_0x176b15(0x1f2)+_0x592a8f[_0x176b15(0x203)]),_0x592a8f[_0x176b15(0x24f)](_0x2e59f3=>a4_0x3301e7['dim']('\x20\x20-\x20'+_0x2e59f3[_0x176b15(0x210)]));}else a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1d5)),a4_0x3301e7['dim']('It\x20will\x20start\x20automatically\x20when\x20needed');return!![];}if(_0x58318e[_0x176b15(0x27e)]('/github')){const _0x573561=_0x58318e[_0x176b15(0x265)]('\x20')[0x1]||'';return await a4_0x14980f[_0x176b15(0x1e6)](_0x573561),!![];}if(_0x58318e['startsWith'](_0x176b15(0x25c))){const _0x3ffc9f=await import(_0x176b15(0x1cc)),_0xbccb88=_0x58318e[_0x176b15(0x265)]('\x20')[0x1]||'';if(_0xbccb88===_0x176b15(0x22f)){const {input:_0x4b7541,password:_0x549116}=await import(_0x176b15(0x1d7));a4_0x3301e7[_0x176b15(0x1c2)](_0x176b15(0x278)),a4_0x3301e7['dim']('1.\x20Open\x20Telegram\x20and\x20message\x20@BotFather'),a4_0x3301e7[_0x176b15(0x1c4)]('2.\x20Send\x20/newbot\x20and\x20follow\x20instructions'),a4_0x3301e7['dim'](_0x176b15(0x267)),a4_0x3301e7[_0x176b15(0x27c)]('');const _0x2df965=await _0x549116({'message':_0x176b15(0x216),'mask':'*'});_0x2df965&&(_0x3ffc9f[_0x176b15(0x1f1)](_0x2df965),a4_0x3301e7[_0x176b15(0x1fe)](_0x176b15(0x20a)));const _0x37a573=await _0x4b7541({'message':_0x176b15(0x257)});return _0x37a573&&(_0x3ffc9f[_0x176b15(0x1ed)](_0x37a573),a4_0x3301e7[_0x176b15(0x1fe)]('Security\x20PIN\x20set!')),a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x269)),!![];}if(_0xbccb88===_0x176b15(0x24c))return await _0x3ffc9f[_0x176b15(0x261)](),!![];if(_0xbccb88==='stop')return _0x3ffc9f[_0x176b15(0x275)](),a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x26b)),!![];if(_0xbccb88===_0x176b15(0x1bd))return _0x3ffc9f[_0x176b15(0x26c)]()?a4_0x3301e7[_0x176b15(0x1fe)](_0x176b15(0x1fb)):a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1f5)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1df)+(_0x3ffc9f[_0x176b15(0x284)]()?'Yes':'No')),!![];return a4_0x3301e7[_0x176b15(0x1c2)](_0x176b15(0x247)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x270)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x214)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x1c9)),a4_0x3301e7[_0x176b15(0x1c4)](_0x176b15(0x256)),!![];}if(_0x58318e===_0x176b15(0x1f3)){const {rollbackLast:_0x19a48b,getChanges:_0x454a0f}=await import(_0x176b15(0x227)),_0x2801b2=_0x454a0f();if(_0x2801b2[_0x176b15(0x203)]===0x0)a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x21e));else{const _0x362e2d=_0x19a48b();_0x362e2d[_0x176b15(0x1fe)]?a4_0x3301e7[_0x176b15(0x1fe)](_0x362e2d[_0x176b15(0x23c)]):a4_0x3301e7['error'](_0x362e2d[_0x176b15(0x23c)]);}return!![];}if(_0x58318e===_0x176b15(0x224)){const _0x4ae168=await selectModel();return _0x4ae168!==_0x23015c?(a4_0x3301e7['info'](_0x176b15(0x223)+_0x4ae168),a4_0x3301e7['info'](_0x176b15(0x211))):a4_0x3301e7[_0x176b15(0x27c)](_0x176b15(0x1e0)+_0x23015c),!![];}if(_0x58318e===_0x176b15(0x1e4)||_0x58318e==='/themes'){const {selectTheme:_0x2a7b6b}=await import('../ui/themes.js'),_0x45f295=await _0x2a7b6b();return a4_0x3301e7[_0x176b15(0x27c)]('Theme\x20changed\x20to:\x20'+_0x45f295),!![];}if(_0x58318e===_0x176b15(0x1e3)||_0x58318e===_0x176b15(0x21a)){const _0x425719=a4_0x3301e7[_0x176b15(0x27d)](_0x176b15(0x217));_0x425719[_0x176b15(0x24c)]();const _0x1bdeb9=await getUserUsage();return _0x425719[_0x176b15(0x1ff)](),_0x1bdeb9?a4_0x3301e7[_0x176b15(0x1f8)](_0x1bdeb9['tokensUsed'],_0x1bdeb9[_0x176b15(0x1da)],_0x1bdeb9['isOverLimit']):a4_0x3301e7[_0x176b15(0x258)]('Failed\x20to\x20fetch\x20usage\x20data.'),!![];}return _0x580e4c[_0x176b15(0x1f0)]({'role':_0x176b15(0x231),'content':_0x58318e}),await processAgentLoop(_0x580e4c,_0x23015c),!![];};if(_0x10c342){const _0x334fb=await _0x46ae04(_0x10c342);if(!_0x334fb)return;}while(!![]){try{const _0xeaa305=await import(_0xe9ba89(0x1f6))[_0xe9ba89(0x20b)](_0x4bb37d=>_0x4bb37d['getTheme']()),_0x3c6199=await import(_0xe9ba89(0x26a))[_0xe9ba89(0x20b)](_0x112276=>_0x112276[_0xe9ba89(0x1ca)](_0xeaa305)),_0x48e877=a4_0x26432e[_0xe9ba89(0x237)]['hex'](_0x3c6199['primary'])(_0xe9ba89(0x26f)),_0x4fb3d5=await input({'message':_0x48e877,'theme':{'prefix':''}}),_0x3f94a5=await _0x46ae04(_0x4fb3d5);if(!_0x3f94a5)break;}catch(_0x13524b){if(_0x13524b instanceof Error&&_0x13524b[_0xe9ba89(0x23c)]['includes'](_0xe9ba89(0x205)))break;a4_0x3301e7[_0xe9ba89(0x258)]('Unexpected\x20error:\x20'+_0x13524b);}}}function cleanTagsFromLine(_0x3a63ae){const _0x37abe9=a4_0x29b9,_0x3fc155=_0x3a63ae[_0x37abe9(0x22d)]();if(!_0x3fc155)return'';if(_0x3fc155[_0x37abe9(0x27e)]('**'))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x1d6)))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x1e9)))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x282)))return'';if(_0x3fc155[_0x37abe9(0x1d0)](_0x37abe9(0x255))&&_0x3fc155[_0x37abe9(0x1d0)]('\x22args\x22:'))return'';if(_0x3fc155[_0x37abe9(0x27e)]('Running'))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x1d1)))return'';if(_0x3fc155[_0x37abe9(0x27e)]('I\x27ve'))return'';if(_0x3fc155[_0x37abe9(0x27e)](_0x37abe9(0x20d)))return'';if(_0x3fc155['startsWith'](_0x37abe9(0x1cf)))return'';if(_0x3fc155['startsWith'](_0x37abe9(0x27b)))return'';if(_0x3fc155['includes'](_0x37abe9(0x262)))return'';if(_0x3fc155[_0x37abe9(0x1d0)](_0x37abe9(0x283)))return'';return _0x3a63ae['replace'](/<text>/g,'')[_0x37abe9(0x225)](/<\/text>/g,'')[_0x37abe9(0x225)](/<\/text>/g,'')[_0x37abe9(0x225)](/<reasoning>/g,'')[_0x37abe9(0x225)](/<\/reasoning>/g,'')[_0x37abe9(0x225)](/\*\*(.+?)\*\*/g,'$1');}async function processAgentLoop(_0x1423bd,_0x546ade){const _0x7809d6=a4_0x29b9;let _0x44983f=0x0;const _0x5e9ac8=0x3e8;while(_0x44983f<_0x5e9ac8){_0x44983f++;const _0x47cb02=a4_0x3301e7[_0x7809d6(0x27d)](_0x7809d6(0x219));_0x47cb02[_0x7809d6(0x24c)]();let _0x51938b='',_0x9bad5c=![],_0x2bde87='';const _0x500a1d=new AbortController(),_0x291b96=()=>{const _0x9da7e1=_0x7809d6;_0x500a1d[_0x9da7e1(0x25a)](),a4_0x3301e7[_0x9da7e1(0x27c)](_0x9da7e1(0x274));};process['on'](_0x7809d6(0x244),_0x291b96);try{const _0x58750b=await sendChatMessage(_0x546ade,_0x1423bd,_0x5d9e30=>{const _0x73dcc7=_0x7809d6;_0x47cb02['isSpinning']&&(_0x47cb02[_0x73dcc7(0x1ff)](),a4_0x3301e7[_0x73dcc7(0x280)](''));_0x51938b+=_0x5d9e30;for(const _0x4b0522 of _0x5d9e30){_0x2bde87+=_0x4b0522;if(_0x4b0522==='\x0a'){if(!_0x9bad5c){if(_0x2bde87[_0x73dcc7(0x1d0)]('<execute_tool>')||_0x2bde87[_0x73dcc7(0x27e)](_0x73dcc7(0x1bf))){_0x9bad5c=!![],_0x2bde87='';continue;}let _0x2314fd=_0x2bde87[_0x73dcc7(0x225)](/<text>/g,'')[_0x73dcc7(0x225)](/<\/text>/g,'')[_0x73dcc7(0x225)](/<reasoning.*?>/g,'')['replace'](/<\/reasoning>/g,'');if(_0x2314fd[_0x73dcc7(0x27e)](_0x73dcc7(0x282))&&!_0x2314fd[_0x73dcc7(0x27e)]('```tool'))process[_0x73dcc7(0x266)][_0x73dcc7(0x21c)](_0x73dcc7(0x282)+_0x2314fd['slice'](0x3));else(_0x2314fd[_0x73dcc7(0x22d)]()||_0x2bde87[_0x73dcc7(0x22d)]()==='')&&process[_0x73dcc7(0x266)][_0x73dcc7(0x21c)](_0x2314fd);}else(_0x2bde87[_0x73dcc7(0x1d0)]('</execute_tool>')||_0x2bde87[_0x73dcc7(0x22d)]()===_0x73dcc7(0x282))&&(_0x9bad5c=![]);_0x2bde87='';}}},_0x500a1d[_0x7809d6(0x204)]);if(_0x2bde87&&!_0x9bad5c&&!_0x2bde87['includes'](_0x7809d6(0x220))){let _0xfeadd9=_0x2bde87[_0x7809d6(0x225)](/<text>/g,'')['replace'](/<\/text>/g,'')[_0x7809d6(0x225)](/<reasoning.*?>/g,'')['replace'](/<\/reasoning>/g,'');if(_0xfeadd9['trim']())process['stdout'][_0x7809d6(0x21c)](_0xfeadd9);}_0x51938b=_0x58750b[_0x7809d6(0x1ef)];}catch(_0x3a7535){_0x47cb02[_0x7809d6(0x1ff)](),process[_0x7809d6(0x207)]('SIGINT',_0x291b96);if(_0x3a7535['name']===_0x7809d6(0x1c6)||_0x3a7535[_0x7809d6(0x23c)][_0x7809d6(0x1d0)]('aborted')){a4_0x3301e7['warn']('User\x20aborted.'),_0x1423bd[_0x7809d6(0x1f0)]({'role':_0x7809d6(0x232),'content':_0x51938b+'\x20[Aborted]'}),_0x1423bd['push']({'role':'user','content':_0x7809d6(0x1ae)});break;}if(_0x3a7535[_0x7809d6(0x22e)]){a4_0x3301e7['rateLimitWarning'](_0x3a7535[_0x7809d6(0x20e)]||0x3c);return;}a4_0x3301e7['error']('API\x20error:\x20'+_0x3a7535);return;}finally{process[_0x7809d6(0x207)](_0x7809d6(0x244),_0x291b96);}_0x47cb02[_0x7809d6(0x1b0)]&&_0x47cb02[_0x7809d6(0x1ff)]();a4_0x3301e7[_0x7809d6(0x235)](),_0x1423bd[_0x7809d6(0x1f0)]({'role':'assistant','content':_0x51938b});let _0x766b5f=_0x51938b[_0x7809d6(0x215)](/<execute_tool>\s*([\s\S]*?)<\/execute_tool>/);!_0x766b5f&&(_0x766b5f=_0x51938b[_0x7809d6(0x215)](/```tool\s*([\s\S]*?)```/));!_0x766b5f&&(_0x766b5f=_0x51938b[_0x7809d6(0x215)](/```json\s*(\{[\s\S]*?"name"\s*:[\s\S]*?\})\s*```/));if(!_0x766b5f)break;try{const _0x2b7754=_0x766b5f[0x1]['trim'](),_0x2974f1=JSON[_0x7809d6(0x1bb)](_0x2b7754),_0x1f2b49={'create_file':_0x7809d6(0x1e2),'read_file':_0x7809d6(0x241),'edit_file':_0x7809d6(0x238),'list_directory':'List','search_file':'Search','find_files':'Find','search_directory':_0x7809d6(0x1b2),'run_command':'Run','browser_open':_0x7809d6(0x20f),'browser_click':'Click','browser_fill':'Fill','browser_snapshot':'Snapshot','browser_screenshot':_0x7809d6(0x25f),'browser_get_text':_0x7809d6(0x229),'browser_close':_0x7809d6(0x1cb)},_0x3fba39=_0x1f2b49[_0x2974f1[_0x7809d6(0x22b)]]||_0x2974f1[_0x7809d6(0x22b)];let _0x1cc7ca='';if(_0x2974f1[_0x7809d6(0x22b)]===_0x7809d6(0x1af)&&_0x2974f1[_0x7809d6(0x21f)][_0x7809d6(0x273)])_0x1cc7ca=_0x2974f1[_0x7809d6(0x21f)][_0x7809d6(0x273)];else{if(_0x2974f1['args'][_0x7809d6(0x1d8)])_0x1cc7ca=_0x2974f1[_0x7809d6(0x21f)]['path'];else{if(_0x2974f1[_0x7809d6(0x21f)]['pattern'])_0x1cc7ca='\x22'+_0x2974f1['args']['pattern']+'\x22';else _0x2974f1[_0x7809d6(0x21f)]['url']?_0x1cc7ca=_0x2974f1[_0x7809d6(0x21f)][_0x7809d6(0x1fc)]:_0x1cc7ca=Object[_0x7809d6(0x1ee)](_0x2974f1[_0x7809d6(0x21f)])[0x0]||'';}}const _0x565777=_0x1cc7ca[_0x7809d6(0x203)]>0x32?_0x1cc7ca['slice'](0x0,0x2f)+'...':_0x1cc7ca,_0x5a0a3d=a4_0x3301e7[_0x7809d6(0x23a)](_0x3fba39+'('+_0x565777+')');_0x5a0a3d[_0x7809d6(0x24c)]();const _0x246e81=performance['now']();let _0x1b19b7;try{_0x1b19b7=await executeToolCall(_0x2974f1[_0x7809d6(0x22b)],_0x2974f1['args']);}catch(_0x23e18b){if(_0x23e18b[_0x7809d6(0x23c)]&&_0x23e18b[_0x7809d6(0x23c)]['includes'](_0x7809d6(0x26e))){const _0x1ea675=await getMcpTools(),_0x48de14=_0x1ea675['find'](_0x41f964=>_0x41f964[_0x7809d6(0x22b)]===_0x2974f1['name']);if(_0x48de14)try{_0x1b19b7=await executeMcpTool(_0x48de14[_0x7809d6(0x1b3)],_0x48de14['name'],_0x2974f1[_0x7809d6(0x21f)]);}catch(_0x4ceb7c){throw new Error(_0x7809d6(0x1dc)+_0x4ceb7c);}else throw _0x23e18b;}else throw _0x23e18b;}const _0x54e99b=((performance[_0x7809d6(0x1ad)]()-_0x246e81)/0x3e8)[_0x7809d6(0x1b4)](0x1);_0x5a0a3d[_0x7809d6(0x1ff)]();let _0x501213='Done\x20in\x20'+_0x54e99b+'s',_0x1f0261=![];if(_0x2974f1[_0x7809d6(0x22b)]===_0x7809d6(0x1af)&&_0x1b19b7&&typeof _0x1b19b7===_0x7809d6(0x245)){const _0x2eb75c=_0x1b19b7;if(_0x2eb75c[_0x7809d6(0x268)]===0x0){const _0x36fe04=_0x2eb75c['stdout']?_0x2eb75c[_0x7809d6(0x266)][_0x7809d6(0x265)]('\x0a')[_0x7809d6(0x203)]:0x0;_0x501213=_0x7809d6(0x233)+_0x36fe04+_0x7809d6(0x250)+_0x54e99b+'s)';}else _0x2eb75c[_0x7809d6(0x268)]!==undefined&&(_0x1f0261=!![],_0x501213=_0x7809d6(0x260)+_0x2eb75c[_0x7809d6(0x268)],_0x2eb75c['stderr']&&(_0x501213+=':\x20'+_0x2eb75c[_0x7809d6(0x248)][_0x7809d6(0x265)]('\x0a')[0x0][_0x7809d6(0x1d3)](0x0,0x64)));}else{if(_0x2974f1['name']==='read_file'&&_0x1b19b7&&typeof _0x1b19b7[_0x7809d6(0x1ef)]===_0x7809d6(0x254)){const _0x5a32d8=_0x1b19b7[_0x7809d6(0x1ef)]['split']('\x0a')[_0x7809d6(0x203)];_0x501213=_0x7809d6(0x25d)+_0x5a32d8+_0x7809d6(0x271)+_0x54e99b+'s)';}else{if(_0x2974f1[_0x7809d6(0x22b)]===_0x7809d6(0x1ce))_0x501213='Updated\x20successfully\x20('+_0x54e99b+'s)';else _0x1b19b7&&typeof _0x1b19b7===_0x7809d6(0x245)&&_0x7809d6(0x258)in _0x1b19b7&&(_0x1f0261=!![],_0x501213=_0x7809d6(0x1b9)+_0x1b19b7[_0x7809d6(0x258)]);}}a4_0x3301e7[_0x7809d6(0x25b)](_0x3fba39,_0x565777,_0x501213,_0x1f0261),_0x1423bd[_0x7809d6(0x1f0)]({'role':_0x7809d6(0x231),'content':_0x7809d6(0x21b)+_0x2974f1[_0x7809d6(0x22b)]+':\x0a'+JSON['stringify'](_0x1b19b7,null,0x2)}),await new Promise(_0x967efa=>setTimeout(_0x967efa,0x1f4));}catch(_0x55c5ac){a4_0x3301e7[_0x7809d6(0x25b)](_0x7809d6(0x23e),_0x7809d6(0x234),_0x55c5ac['message']||String(_0x55c5ac),!![]),_0x1423bd['push']({'role':_0x7809d6(0x231),'content':_0x7809d6(0x277)+_0x55c5ac+_0x7809d6(0x276)});}}_0x44983f>=_0x5e9ac8&&a4_0x3301e7[_0x7809d6(0x218)]('Reached\x20maximum\x20iterations');}function a4_0x47dc(){const _0x472bba=['setup','\x20\x20/help\x20\x20\x20\x20\x20\x20-\x20Show\x20this\x20help','user','assistant','Completed\x20with\x20','tool\x20execution\x20failed','aiMessageEnd','597146mZAMsO','bold','Update','\x20\x20/usage\x20\x20\x20\x20\x20-\x20Show\x20token\x20usage\x20stats','actionSpinner','/exit','message','value','Error','loggedInBox','130RmPvqW','Read','email','base','SIGINT','object','exit','Telegram\x20Commands','stderr','Browser\x20server\x20is\x20running','/browser','/clear','start','16866dZIBSh','browser_click','forEach','\x20lines\x20of\x20output\x20(','branch','Unknown','\x0aUse\x20\x27woozlit\x20mcp\x27\x20command\x20to\x20manage\x20servers.','string','\x22name\x22:','\x20\x20/telegram\x20status\x20\x20-\x20Check\x20status','Security\x20PIN\x20(optional,\x20press\x20Enter\x20to\x20skip):','error','Connected\x20MCP\x20Tools:','abort','toolSuccess','/telegram','Read\x20','62dDoAHQ','Screenshot','Exited\x20with\x20code\x20','startBot','must\x20greet','\x20\x20/theme\x20\x20\x20\x20\x20-\x20Switch\x20UI\x20color\x20theme','size','split','stdout','3.\x20Copy\x20the\x20bot\x20token','exitCode','Run\x20\x27/telegram\x20start\x27\x20to\x20connect\x20your\x20bot.','../ui/themes.js','Telegram\x20bot\x20stopped.','isBotRunning','\x0aYou\x20are\x20running\x20on\x20','Unknown\x20tool','\x0a>\x20','\x20\x20/telegram\x20setup\x20\x20\x20-\x20Configure\x20bot\x20token','\x20lines\x20(','search','command','\x0aAborting...','stopBot','.\x20Please\x20fix\x20this\x20and\x20continue.','Tool\x20error\x20occurred:\x20','Telegram\x20Bot\x20Setup','browser_snapshot','find_files','Let\x20me','info','createSpinner','startsWith','175ghYsbX','aiMessage','97590kwWsai','```','registered\x20that','isConfigured','search_directory','\x20for\x20commands\x20requiring\x20elevated\x20privileges.','now','Stop.','run_command','isSpinning','search_file','SearchDir','serverName','toFixed','\x20\x20/model\x20\x20\x20\x20\x20-\x20Switch\x20AI\x20model','repo','github_read_file','read_file','Error:\x20','No\x20MCP\x20tools\x20connected.','parse','Unknown\x20tool:\x20','status','412ucTlXS','```tool','mcpConnected','body','header','\x20\x20/exit\x20\x20\x20\x20\x20\x20-\x20Exit\x20the\x20chat','dim','../tools/file.js','AbortError','Tips:\x20/exit\x20to\x20quit,\x20/clear\x20to\x20reset,\x20/model\x20to\x20switch,\x20/help\x20for\x20more','description','\x20\x20/telegram\x20stop\x20\x20\x20\x20-\x20Stop\x20bot','getThemeById','CloseBrowser','../telegram/index.js','\x20\x20/telegram\x20\x20-\x20Remote\x20control\x20via\x20Telegram','edit_file','Now,','includes','-\x20Running','pattern','substring','branchName','Browser\x20server\x20is\x20not\x20running','###','@inquirer/prompts','path','keys','monthlyLimit','selector','MCP\x20Tool\x20error:\x20','6031dlXeZc','\x20\x20/mcp\x20\x20\x20\x20\x20\x20\x20-\x20List\x20connected\x20tools','Configured:\x20','Current\x20model:\x20','\x20\x20/github\x20\x20\x20\x20-\x20GitHub\x20integration','Create','/usage','/theme','../github/api.js','handleGitHubCommand','/help','properties','---','70470NOYFdH','Goodbye!','inputSchema','setSecurityPin','values','content','push','setBotToken','Connected\x20browsers:\x20','/rollback','\x0a\x0aYou\x20also\x20have\x20access\x20to\x20these\x20external\x20MCP\x20tools:\x0a','Telegram\x20bot\x20is\x20not\x20running','../utils/storage.js','/quit','usageBox','owner','36728VJygCZ','Telegram\x20bot\x20is\x20running','url','.\x20Use\x20','success','stop','\x20\x20/clear\x20\x20\x20\x20\x20-\x20Clear\x20conversation\x20history','browser_screenshot','browser_fill','length','signal','force\x20closed','cwd','removeListener','\x20\x20/browser\x20\x20\x20-\x20Browser\x20automation\x20status','slice','Bot\x20token\x20saved!','then','\x20\x20/rollback\x20\x20-\x20Undo\x20last\x20AI\x20file\x20change','I\x20am','resetIn','Browser','userEmail','Please\x20restart\x20the\x20chat\x20for\x20the\x20change\x20to\x20take\x20full\x20effect.','../browser/index.js','/mcp','\x20\x20/telegram\x20start\x20\x20\x20-\x20Start\x20bot','match','Bot\x20token:','Fetching\x20usage...','warn','Thinking...','/stats','Tool\x20result\x20for\x20','write','displayName','No\x20changes\x20to\x20rollback','args','<execute_tool>','map','system','Model\x20changed\x20to:\x20','/model','replace','browser_open','../tools/rollback.js','30tmRARz','GetText','2123748fsDtgb','name','join','trim','isRateLimit'];a4_0x47dc=function(){return _0x472bba;};return a4_0x47dc();}async function executeToolCall(_0x5e528d,_0x29c5a7){const _0x580534=a4_0x29b9;switch(_0x5e528d){case'create_file':return createFile(_0x29c5a7[_0x580534(0x1d8)],_0x29c5a7[_0x580534(0x1ef)]);case _0x580534(0x1b8):return readFile(_0x29c5a7[_0x580534(0x1d8)]);case'list_directory':return listDirectory(_0x29c5a7['path']||'.');case'edit_file':return editFile(_0x29c5a7[_0x580534(0x1d8)],_0x29c5a7[_0x580534(0x272)],_0x29c5a7['replace']);case _0x580534(0x1b1):return searchFile(_0x29c5a7[_0x580534(0x1d8)],_0x29c5a7['pattern']);case _0x580534(0x1af):const {command:_0x29993a,background:_0x4b62fb,wait:_0x587456}=_0x29c5a7,_0x1f2fd1=await runCommand(_0x29993a,undefined,_0x4b62fb,_0x587456);return _0x1f2fd1;case _0x580534(0x27a):{const {findFiles:_0x18d18e}=await import(_0x580534(0x1c5));return _0x18d18e(_0x29c5a7[_0x580534(0x1d8)]||'.',_0x29c5a7[_0x580534(0x1d2)]);}case _0x580534(0x285):{const {searchDirectory:_0x2d5225}=await import(_0x580534(0x1c5));return _0x2d5225(_0x29c5a7[_0x580534(0x1d8)]||'.',_0x29c5a7[_0x580534(0x1d2)]);}case _0x580534(0x1b7):{const {readFile:_0x253759}=await import(_0x580534(0x1e5));return _0x253759(_0x29c5a7[_0x580534(0x1f9)],_0x29c5a7[_0x580534(0x1b6)],_0x29c5a7[_0x580534(0x1d8)],_0x29c5a7[_0x580534(0x251)]);}case'github_create_pr':{const {createPullRequest:_0x38c5d7}=await import(_0x580534(0x1e5));return _0x38c5d7(_0x29c5a7[_0x580534(0x1f9)],_0x29c5a7[_0x580534(0x1b6)],_0x29c5a7['title'],_0x29c5a7['head'],_0x29c5a7[_0x580534(0x243)],_0x29c5a7[_0x580534(0x1c1)]);}case'github_create_branch':{const {createBranch:_0x5cfd29}=await import(_0x580534(0x1e5));return _0x5cfd29(_0x29c5a7[_0x580534(0x1f9)],_0x29c5a7[_0x580534(0x1b6)],_0x29c5a7[_0x580534(0x1d4)],_0x29c5a7['fromBranch']);}case _0x580534(0x226):{const {browserOpen:_0x2d83c7,startBrowserServer:_0x432bb9,isBrowserServerRunning:_0x222fc6}=await import(_0x580534(0x212));return!_0x222fc6()&&await _0x432bb9(),_0x2d83c7(_0x29c5a7['url']);}case _0x580534(0x24e):{const {browserClick:_0x2f9585}=await import(_0x580534(0x212));return _0x2f9585(_0x29c5a7['selector']);}case _0x580534(0x202):{const {browserFill:_0x33cb2b}=await import(_0x580534(0x212));return _0x33cb2b(_0x29c5a7['selector'],_0x29c5a7[_0x580534(0x23d)]);}case _0x580534(0x279):{const {browserSnapshot:_0x3c6bb8}=await import(_0x580534(0x212));return _0x3c6bb8();}case _0x580534(0x201):{const {browserScreenshot:_0x34d507}=await import(_0x580534(0x212));return _0x34d507();}case'browser_get_text':{const {browserGetText:_0x362e11}=await import(_0x580534(0x212));return _0x362e11(_0x29c5a7[_0x580534(0x1db)]);}case'browser_close':{const {browserClose:_0x384c3d}=await import(_0x580534(0x212));return _0x384c3d();}default:return{'error':_0x580534(0x1bc)+_0x5e528d};}}
@@ -1 +1 @@
1
- const a2_0x4b7c7a=a2_0x46cb;(function(_0x59edef,_0x3e63a9){const _0x5d0896=a2_0x46cb,_0x52c6af=_0x59edef();while(!![]){try{const _0x573be9=parseInt(_0x5d0896(0x1d1))/0x1+parseInt(_0x5d0896(0x1cc))/0x2*(-parseInt(_0x5d0896(0x1b1))/0x3)+-parseInt(_0x5d0896(0x1c4))/0x4*(-parseInt(_0x5d0896(0x1c1))/0x5)+-parseInt(_0x5d0896(0x1c7))/0x6+-parseInt(_0x5d0896(0x1d9))/0x7+parseInt(_0x5d0896(0x1b3))/0x8+parseInt(_0x5d0896(0x1cb))/0x9*(parseInt(_0x5d0896(0x1ca))/0xa);if(_0x573be9===_0x3e63a9)break;else _0x52c6af['push'](_0x52c6af['shift']());}catch(_0x54b830){_0x52c6af['push'](_0x52c6af['shift']());}}}(a2_0x4a89,0x1912c));import a2_0x1356dc from'conf';import a2_0x468bc2 from'path';import a2_0x1725dd from'fs';import{fileURLToPath}from'url';const config=new a2_0x1356dc({'projectName':a2_0x4b7c7a(0x1b2),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x3c041b=a2_0x4b7c7a,_0x1275b4=config[_0x3c041b(0x1bc)](_0x3c041b(0x1d3)),_0x5ed1e3=loadMcpConfigFile();return{..._0x1275b4,..._0x5ed1e3};}export function addMcpServer(_0x3f7b71,_0x2be665,_0x20a991=[],_0x47ffdc){const _0xa8390d=a2_0x4b7c7a,_0x70eefc=config[_0xa8390d(0x1bc)](_0xa8390d(0x1d3));_0x70eefc[_0x3f7b71]={'type':_0xa8390d(0x1d7),'command':_0x2be665,'args':_0x20a991,'env':_0x47ffdc},config[_0xa8390d(0x1d2)](_0xa8390d(0x1d3),_0x70eefc);}export function addMcpHttpServer(_0x58a7ee,_0x224055){const _0x5329a9=a2_0x4b7c7a,_0x5e30e8=config['get'](_0x5329a9(0x1d3));_0x5e30e8[_0x58a7ee]={'type':_0x5329a9(0x1c8),'url':_0x224055},config[_0x5329a9(0x1d2)](_0x5329a9(0x1d3),_0x5e30e8);}export function removeMcpServer(_0x454dd7){const _0x41ae6d=a2_0x4b7c7a,_0x5e5234=config[_0x41ae6d(0x1bc)]('mcpServers');if(_0x5e5234[_0x454dd7])return delete _0x5e5234[_0x454dd7],config['set']('mcpServers',_0x5e5234),!![];return![];}function a2_0x46cb(_0x3e31eb,_0x1232b4){_0x3e31eb=_0x3e31eb-0x1b1;const _0x4a89d5=a2_0x4a89();let _0x46cb33=_0x4a89d5[_0x3e31eb];return _0x46cb33;}export function clearMcpServers(){const _0xf1e304=a2_0x4b7c7a;config['set'](_0xf1e304(0x1d3),{});}function a2_0x4a89(){const _0x1b8050=['computer-use','endsWith','.woozlit','node','computer-use.ts','utf-8','mcp.json','command','get','C:\x5cUsers','includes','USERPROFILE','mcp-servers','80FMvHQj','HOME','.js','13508khcNBC','env','uvx','1032120tkeQfj','streamable-http','npx','2157480BQLZyH','18jBhwKF','440PyefAk','src','computer-use.js','join','windows-mcp','55669nRHAOJ','set','mcpServers','object','cwd','parse','stdio','tsx','1171912dhMNrw','1584QHcJBt','woozlit-cli','136792NtbsJs'];a2_0x4a89=function(){return _0x1b8050;};return a2_0x4a89();}export function getMcpServer(_0x41199c){return getMcpServers()[_0x41199c];}function loadMcpConfigFile(){const _0x48dd35=a2_0x4b7c7a,_0x44024c=[a2_0x468bc2[_0x48dd35(0x1cf)](process[_0x48dd35(0x1d5)](),_0x48dd35(0x1ba)),a2_0x468bc2[_0x48dd35(0x1cf)](process[_0x48dd35(0x1d5)](),_0x48dd35(0x1b6),'mcp.json'),a2_0x468bc2[_0x48dd35(0x1cf)](process['env'][_0x48dd35(0x1c2)]||process[_0x48dd35(0x1c5)][_0x48dd35(0x1bf)]||'',_0x48dd35(0x1b6),_0x48dd35(0x1ba))];for(const _0x25a7da of _0x44024c){try{if(a2_0x1725dd['existsSync'](_0x25a7da)){const _0x47c200=a2_0x1725dd['readFileSync'](_0x25a7da,_0x48dd35(0x1b9)),_0x2a2dd1=JSON[_0x48dd35(0x1d6)](_0x47c200);if(_0x2a2dd1[_0x48dd35(0x1d3)]&&typeof _0x2a2dd1[_0x48dd35(0x1d3)]===_0x48dd35(0x1d4))return _0x2a2dd1[_0x48dd35(0x1d3)];}}catch{}}return{};}export function ensureDefaultServers(){const _0x4672a7=a2_0x4b7c7a,_0x46bdd6=config[_0x4672a7(0x1bc)](_0x4672a7(0x1d3)),_0x1b45b2=fileURLToPath(import.meta.url),_0x1f7d98=a2_0x468bc2['dirname'](_0x1b45b2),_0x595859=_0x1f7d98[_0x4672a7(0x1be)]('dist')||_0x1b45b2[_0x4672a7(0x1b5)](_0x4672a7(0x1c3)),_0x53dd41=_0x595859?a2_0x468bc2[_0x4672a7(0x1cf)](_0x1f7d98,'..',_0x4672a7(0x1c0),_0x4672a7(0x1ce)):a2_0x468bc2[_0x4672a7(0x1cf)](_0x1f7d98,'..','..',_0x4672a7(0x1cd),_0x4672a7(0x1c0),_0x4672a7(0x1b8)),_0x5e6109=_0x595859?_0x4672a7(0x1b7):_0x4672a7(0x1d8);_0x46bdd6[_0x4672a7(0x1b4)]={'type':'stdio','command':_0x5e6109,'args':[_0x53dd41],'env':{}},(!_0x46bdd6['windows-mcp']||_0x46bdd6[_0x4672a7(0x1d0)][_0x4672a7(0x1bb)]===_0x4672a7(0x1c6))&&(_0x46bdd6['windows-mcp']={'type':'stdio','command':_0x4672a7(0x1c9),'args':['-y','@modelcontextprotocol/server-filesystem',_0x4672a7(0x1bd)],'env':{}}),config['set'](_0x4672a7(0x1d3),_0x46bdd6);}export function getConfigFilePath(){return config['path'];}
1
+ const a5_0x4ee64c=a5_0x58e3;function a5_0x4d9e(){const _0x56c098=['uvx','src','readFileSync','mcp.json','4319320cMsEPe','tsx','.woozlit','set','HOME','USERPROFILE','join','woozlit-cli','10CuKEwx','mcpServers','dirname','computer-use.js','2626227FbDtth','computer-use','node','cwd','6924660ObbOga','env','endsWith','object','4220KLPqdy','get','.js','13114737VQocJI','2645968VsnOJs','parse','441007NRiuSa','@modelcontextprotocol/server-filesystem','includes','581mEJhYB','18rmoTFN','mcp-servers','path','existsSync','windows-mcp','stdio'];a5_0x4d9e=function(){return _0x56c098;};return a5_0x4d9e();}(function(_0x260b0e,_0x40a5cc){const _0x276c9d=a5_0x58e3,_0x129c15=_0x260b0e();while(!![]){try{const _0x2ef302=-parseInt(_0x276c9d(0x159))/0x1*(-parseInt(_0x276c9d(0x150))/0x2)+parseInt(_0x276c9d(0x148))/0x3+-parseInt(_0x276c9d(0x154))/0x4*(parseInt(_0x276c9d(0x16c))/0x5)+-parseInt(_0x276c9d(0x15a))/0x6*(-parseInt(_0x276c9d(0x156))/0x7)+parseInt(_0x276c9d(0x164))/0x8+-parseInt(_0x276c9d(0x153))/0x9+parseInt(_0x276c9d(0x14c))/0xa;if(_0x2ef302===_0x40a5cc)break;else _0x129c15['push'](_0x129c15['shift']());}catch(_0x1bb69a){_0x129c15['push'](_0x129c15['shift']());}}}(a5_0x4d9e,0xb547e));import a5_0x1f751b from'conf';import a5_0x3a1025 from'path';import a5_0x39e090 from'fs';import{fileURLToPath}from'url';const config=new a5_0x1f751b({'projectName':a5_0x4ee64c(0x16b),'defaults':{'mcpServers':{}}});export function getMcpServers(){const _0x42d4c0=a5_0x4ee64c,_0x1dbd11=config[_0x42d4c0(0x151)](_0x42d4c0(0x16d)),_0x2d6928=loadMcpConfigFile();return{..._0x1dbd11,..._0x2d6928};}export function addMcpServer(_0x95ee06,_0x42a2f3,_0x5e8617=[],_0x506efa){const _0x2bb51f=a5_0x4ee64c,_0x19d8d3=config[_0x2bb51f(0x151)](_0x2bb51f(0x16d));_0x19d8d3[_0x95ee06]={'type':'stdio','command':_0x42a2f3,'args':_0x5e8617,'env':_0x506efa},config[_0x2bb51f(0x167)](_0x2bb51f(0x16d),_0x19d8d3);}function a5_0x58e3(_0x1de259,_0x45267f){_0x1de259=_0x1de259-0x146;const _0x4d9ef7=a5_0x4d9e();let _0x58e35e=_0x4d9ef7[_0x1de259];return _0x58e35e;}export function addMcpHttpServer(_0x595f5c,_0x41265a){const _0x53fa7f=a5_0x4ee64c,_0x53a474=config[_0x53fa7f(0x151)](_0x53fa7f(0x16d));_0x53a474[_0x595f5c]={'type':'streamable-http','url':_0x41265a},config[_0x53fa7f(0x167)](_0x53fa7f(0x16d),_0x53a474);}export function removeMcpServer(_0x55a8cd){const _0x322f43=a5_0x4ee64c,_0x4d2187=config['get'](_0x322f43(0x16d));if(_0x4d2187[_0x55a8cd])return delete _0x4d2187[_0x55a8cd],config[_0x322f43(0x167)]('mcpServers',_0x4d2187),!![];return![];}export function clearMcpServers(){const _0xf03d47=a5_0x4ee64c;config['set'](_0xf03d47(0x16d),{});}export function getMcpServer(_0x24e71e){return getMcpServers()[_0x24e71e];}function loadMcpConfigFile(){const _0x243e55=a5_0x4ee64c,_0x1e3d2e=[a5_0x3a1025[_0x243e55(0x16a)](process[_0x243e55(0x14b)](),'mcp.json'),a5_0x3a1025['join'](process[_0x243e55(0x14b)](),'.woozlit',_0x243e55(0x163)),a5_0x3a1025['join'](process['env'][_0x243e55(0x168)]||process[_0x243e55(0x14d)][_0x243e55(0x169)]||'',_0x243e55(0x166),'mcp.json')];for(const _0x55838f of _0x1e3d2e){try{if(a5_0x39e090[_0x243e55(0x15d)](_0x55838f)){const _0x2f3b4b=a5_0x39e090[_0x243e55(0x162)](_0x55838f,'utf-8'),_0x458b5c=JSON[_0x243e55(0x155)](_0x2f3b4b);if(_0x458b5c[_0x243e55(0x16d)]&&typeof _0x458b5c[_0x243e55(0x16d)]===_0x243e55(0x14f))return _0x458b5c['mcpServers'];}}catch{}}return{};}export function ensureDefaultServers(){const _0xe56c4=a5_0x4ee64c,_0x5b9c75=config[_0xe56c4(0x151)](_0xe56c4(0x16d)),_0xfaa490=fileURLToPath(import.meta.url),_0x3331cd=a5_0x3a1025[_0xe56c4(0x146)](_0xfaa490),_0x44944f=_0x3331cd[_0xe56c4(0x158)]('dist')||_0xfaa490[_0xe56c4(0x14e)](_0xe56c4(0x152)),_0xc1027b=_0x44944f?a5_0x3a1025['join'](_0x3331cd,'..',_0xe56c4(0x15b),_0xe56c4(0x147)):a5_0x3a1025[_0xe56c4(0x16a)](_0x3331cd,'..','..',_0xe56c4(0x161),_0xe56c4(0x15b),'computer-use.ts'),_0x41f00e=_0x44944f?_0xe56c4(0x14a):_0xe56c4(0x165);_0x5b9c75[_0xe56c4(0x149)]={'type':_0xe56c4(0x15f),'command':_0x41f00e,'args':[_0xc1027b],'env':{}},(!_0x5b9c75['windows-mcp']||_0x5b9c75[_0xe56c4(0x15e)]['command']===_0xe56c4(0x160))&&(_0x5b9c75[_0xe56c4(0x15e)]={'type':_0xe56c4(0x15f),'command':'npx','args':['-y',_0xe56c4(0x157),'C:\x5cUsers'],'env':{}}),config['set'](_0xe56c4(0x16d),_0x5b9c75);}export function getConfigFilePath(){const _0x8e95ad=a5_0x4ee64c;return config[_0x8e95ad(0x15c)];}
@@ -1 +1 @@
1
- function a3_0x2648(){const _0x31f6f5=['Kimi\x20K2','mistralai/mistral-small-3.2-24b-instruct','qwen/qwen3-coder:free','266qnHISC','https://woozlit.com','gemini-2.5-flash','Meta\x27s\x20latest','gemini-3-pro-preview','Coding\x20specialist','Mistral\x20Small\x203.2','Gemini\x203\x20Pro','Developer-focused','193218CdrvcA','682654SQrfeW','deepseek/deepseek-chat','deepseek/deepseek-r1','moonshotai/kimi-k2','1337456tLCFNk','3EgJUVl','Latest\x20Gemini\x203\x20model','mistralai/devstral-small','Qwen3\x20235B','Meta\x27s\x20powerful\x20model','8623220cRILtH','gemini-3-flash-preview','qwen/qwen3-235b-a22b:free','DeepSeek\x20R1','Llama\x204\x20Maverick','Qwen3\x20Coder','MiMo\x20V2','Nemotron\x20Nano\x2012B','DeepSeek\x20V3','xiaomi/mimo-v2-flash:free','Woozie','meta-llama/llama-4-maverick','153evKnbj','DeepSeek\x27s\x20latest\x20V3','486008BuIdTg','1701015jwLsgS','1217216JKDfwt','Gemini\x203\x20Flash','NVIDIA\x20vision','Latest\x20Mistral','env','Reasoning\x20model','Most\x20powerful\x20Gemini','Fast\x20and\x20capable\x20(Default)','meta-llama/llama-3.3-70b-instruct:free'];a3_0x2648=function(){return _0x31f6f5;};return a3_0x2648();}const a3_0x2265a7=a3_0x58d0;(function(_0x47b7f7,_0xe5ac17){const _0x5b4321=a3_0x58d0,_0x257ae4=_0x47b7f7();while(!![]){try{const _0x18c0a6=-parseInt(_0x5b4321(0x1ab))/0x1+-parseInt(_0x5b4321(0x1c1))/0x2+parseInt(_0x5b4321(0x1c6))/0x3*(-parseInt(_0x5b4321(0x1c5))/0x4)+-parseInt(_0x5b4321(0x1aa))/0x5+-parseInt(_0x5b4321(0x1c0))/0x6*(-parseInt(_0x5b4321(0x1b7))/0x7)+-parseInt(_0x5b4321(0x1a9))/0x8*(-parseInt(_0x5b4321(0x1d7))/0x9)+parseInt(_0x5b4321(0x1cb))/0xa;if(_0x18c0a6===_0xe5ac17)break;else _0x257ae4['push'](_0x257ae4['shift']());}catch(_0x590145){_0x257ae4['push'](_0x257ae4['shift']());}}}(a3_0x2648,0xd83bd));const API_URL=process[a3_0x2265a7(0x1af)]['WOOZLIT_API_URL']||a3_0x2265a7(0x1b8),PROD_URL=a3_0x2265a7(0x1b8);export function getApiUrl(){return API_URL;}function a3_0x58d0(_0x5738bb,_0x33882f){_0x5738bb=_0x5738bb-0x1a8;const _0x2648b6=a3_0x2648();let _0x58d0b3=_0x2648b6[_0x5738bb];return _0x58d0b3;}export function getProdUrl(){return PROD_URL;}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':a3_0x2265a7(0x1b9),'name':a3_0x2265a7(0x1d5),'description':a3_0x2265a7(0x1b2),'xp':0x1},{'id':a3_0x2265a7(0x1cc),'name':a3_0x2265a7(0x1ac),'description':a3_0x2265a7(0x1c7),'xp':0x5},{'id':a3_0x2265a7(0x1bb),'name':a3_0x2265a7(0x1be),'description':a3_0x2265a7(0x1b1),'xp':0x5},{'id':a3_0x2265a7(0x1d4),'name':a3_0x2265a7(0x1d1),'description':'Xiaomi\x27s\x20fast\x20AI\x20model','xp':0x1},{'id':a3_0x2265a7(0x1cd),'name':a3_0x2265a7(0x1c9),'description':'Alibaba\x27s\x20largest','xp':0x2},{'id':a3_0x2265a7(0x1b6),'name':a3_0x2265a7(0x1d0),'description':a3_0x2265a7(0x1bc),'xp':0x2},{'id':a3_0x2265a7(0x1b3),'name':'Llama\x203.3\x2070B','description':a3_0x2265a7(0x1ca),'xp':0x2},{'id':a3_0x2265a7(0x1d6),'name':a3_0x2265a7(0x1cf),'description':a3_0x2265a7(0x1ba),'xp':0x3},{'id':a3_0x2265a7(0x1c8),'name':'Devstral\x20Small','description':a3_0x2265a7(0x1bf),'xp':0x2},{'id':a3_0x2265a7(0x1b5),'name':a3_0x2265a7(0x1bd),'description':a3_0x2265a7(0x1ae),'xp':0x2},{'id':'nvidia/nemotron-nano-12b-v2-vl:free','name':a3_0x2265a7(0x1d2),'description':a3_0x2265a7(0x1ad),'xp':0x1},{'id':a3_0x2265a7(0x1c4),'name':a3_0x2265a7(0x1b4),'description':a3_0x2265a7(0x1b0),'xp':0x3},{'id':a3_0x2265a7(0x1c2),'name':a3_0x2265a7(0x1d3),'description':a3_0x2265a7(0x1a8),'xp':0x2},{'id':a3_0x2265a7(0x1c3),'name':a3_0x2265a7(0x1ce),'description':'Advanced\x20reasoning','xp':0x3}];export const DEFAULT_MODEL=a3_0x2265a7(0x1b9);
1
+ const a6_0x466811=a6_0x577d;(function(_0x419ccc,_0x38f065){const _0x385804=a6_0x577d,_0x1e226d=_0x419ccc();while(!![]){try{const _0x2c11af=parseInt(_0x385804(0xc2))/0x1+-parseInt(_0x385804(0xd1))/0x2+-parseInt(_0x385804(0xd4))/0x3*(-parseInt(_0x385804(0xd3))/0x4)+parseInt(_0x385804(0xd6))/0x5+parseInt(_0x385804(0xb8))/0x6*(-parseInt(_0x385804(0xc5))/0x7)+parseInt(_0x385804(0xc0))/0x8+parseInt(_0x385804(0xb6))/0x9*(parseInt(_0x385804(0xc6))/0xa);if(_0x2c11af===_0x38f065)break;else _0x1e226d['push'](_0x1e226d['shift']());}catch(_0xce3ac3){_0x1e226d['push'](_0x1e226d['shift']());}}}(a6_0x17c8,0xd0cb9));const API_URL=process[a6_0x466811(0xde)][a6_0x466811(0xbb)]||a6_0x466811(0xc1),PROD_URL='https://woozlit.com';export function getApiUrl(){return API_URL;}function a6_0x577d(_0x4fcfe8,_0x3143db){_0x4fcfe8=_0x4fcfe8-0xb6;const _0x17c8e1=a6_0x17c8();let _0x577d62=_0x17c8e1[_0x4fcfe8];return _0x577d62;}export function getProdUrl(){return PROD_URL;}function a6_0x17c8(){const _0x2741e4=['Xiaomi\x27s\x20fast\x20AI\x20model','11120641QCvnxV','970ARwbEL','Meta\x27s\x20latest','DeepSeek\x27s\x20latest\x20V3','gemini-2.5-flash','Gemini\x203\x20Pro','meta-llama/llama-3.3-70b-instruct:free','Mistral\x20Small\x203.2','gemini-3-flash-preview','MiMo\x20V2','Kimi\x20K2','moonshotai/kimi-k2','1467006FRFVdD','Latest\x20Gemini\x203\x20model','208712KgReBs','42VdOejL','DeepSeek\x20R1','1915570HOkHbS','Latest\x20Mistral','Llama\x204\x20Maverick','xiaomi/mimo-v2-flash:free','Llama\x203.3\x2070B','qwen/qwen3-235b-a22b:free','mistralai/devstral-small','Advanced\x20reasoning','env','Devstral\x20Small','deepseek/deepseek-chat','Alibaba\x27s\x20largest','41139fDAzhL','Qwen3\x20235B','6ujkVoV','Developer-focused','qwen/qwen3-coder:free','WOOZLIT_API_URL','Fast\x20and\x20capable\x20(Default)','gemini-3-pro-preview','Meta\x27s\x20powerful\x20model','NVIDIA\x20vision','11191672KqCQld','https://woozlit.com','221439OSmzoG','nvidia/nemotron-nano-12b-v2-vl:free'];a6_0x17c8=function(){return _0x2741e4;};return a6_0x17c8();}export function isProduction(){return API_URL===PROD_URL;}export const MODELS=[{'id':a6_0x466811(0xc9),'name':'Woozie','description':a6_0x466811(0xbc),'xp':0x1},{'id':a6_0x466811(0xcd),'name':'Gemini\x203\x20Flash','description':a6_0x466811(0xd2),'xp':0x5},{'id':a6_0x466811(0xbd),'name':a6_0x466811(0xca),'description':'Most\x20powerful\x20Gemini','xp':0x5},{'id':a6_0x466811(0xd9),'name':a6_0x466811(0xce),'description':a6_0x466811(0xc4),'xp':0x1},{'id':a6_0x466811(0xdb),'name':a6_0x466811(0xb7),'description':a6_0x466811(0xe1),'xp':0x2},{'id':a6_0x466811(0xba),'name':'Qwen3\x20Coder','description':'Coding\x20specialist','xp':0x2},{'id':a6_0x466811(0xcb),'name':a6_0x466811(0xda),'description':a6_0x466811(0xbe),'xp':0x2},{'id':'meta-llama/llama-4-maverick','name':a6_0x466811(0xd8),'description':a6_0x466811(0xc7),'xp':0x3},{'id':a6_0x466811(0xdc),'name':a6_0x466811(0xdf),'description':a6_0x466811(0xb9),'xp':0x2},{'id':'mistralai/mistral-small-3.2-24b-instruct','name':a6_0x466811(0xcc),'description':a6_0x466811(0xd7),'xp':0x2},{'id':a6_0x466811(0xc3),'name':'Nemotron\x20Nano\x2012B','description':a6_0x466811(0xbf),'xp':0x1},{'id':a6_0x466811(0xd0),'name':a6_0x466811(0xcf),'description':'Reasoning\x20model','xp':0x3},{'id':a6_0x466811(0xe0),'name':'DeepSeek\x20V3','description':a6_0x466811(0xc8),'xp':0x2},{'id':'deepseek/deepseek-r1','name':a6_0x466811(0xd5),'description':a6_0x466811(0xdd),'xp':0x3}];export const DEFAULT_MODEL=a6_0x466811(0xc9);
@@ -0,0 +1,3 @@
1
+ export declare function startBot(): Promise<boolean>;
2
+ export declare function stopBot(): void;
3
+ export declare function isBotRunning(): boolean;
@@ -0,0 +1 @@
1
+ (function(_0x1669a0,_0x31efcc){const _0x3f78c5=a7_0x4d36,_0x725324=_0x1669a0();while(!![]){try{const _0x2599a9=parseInt(_0x3f78c5(0x110))/0x1*(-parseInt(_0x3f78c5(0xe9))/0x2)+-parseInt(_0x3f78c5(0x101))/0x3+-parseInt(_0x3f78c5(0xec))/0x4+-parseInt(_0x3f78c5(0xfe))/0x5+parseInt(_0x3f78c5(0xee))/0x6+-parseInt(_0x3f78c5(0x10f))/0x7*(parseInt(_0x3f78c5(0x107))/0x8)+parseInt(_0x3f78c5(0xfa))/0x9;if(_0x2599a9===_0x31efcc)break;else _0x725324['push'](_0x725324['shift']());}catch(_0x394b38){_0x725324['push'](_0x725324['shift']());}}}(a7_0x4ddb,0xf12a9));import{Client,GatewayIntentBits,ChannelType,Partials}from'discord.js';import*as a7_0x4dedbb from'./config.js';import*as a7_0x47de32 from'../ui/output.js';import{getSelectedModel}from'../utils/storage.js';function a7_0x4ddb(){const _0x383b15=['reply','channelId','system','ready','sendTyping','12nihRdR','Guilds','content','6534284HbBvTu','user','8974080kIDgbH','You\x20are\x20Woozlit,\x20a\x20helpful\x20AI\x20assistant\x20connected\x20via\x20Discord.\x20Keep\x20responses\x20concise.','channel','author','[Discord]\x20Error:\x20','trim','mentions','Channel','DirectMessages','getBotToken','info','length','42620967ILiYuC','message','Sorry,\x20I\x20encountered\x20an\x20error\x20processing\x20that.','push','1920205Fvuvhd','bot','once','5855511CMtXsL','[Discord]\x20Connected\x20as\x20','has','destroy','type','success','1256PqOJfo','match','guildId','login','error','tag','set','replace','37681vEyeGy','71491ArojcT','messageCreate','GuildMessages'];a7_0x4ddb=function(){return _0x383b15;};return a7_0x4ddb();}import{sendChatMessage}from'../utils/api.js';let client=null,isRunning=![];const chatHistories=new Map();function a7_0x4d36(_0x3a8ee5,_0x56958f){_0x3a8ee5=_0x3a8ee5-0xe4;const _0x4ddbf2=a7_0x4ddb();let _0x4d369e=_0x4ddbf2[_0x3a8ee5];return _0x4d369e;}export async function startBot(){const _0xa6b23d=a7_0x4d36,_0x53f551=a7_0x4dedbb[_0xa6b23d(0xf7)]();if(!_0x53f551)return![];if(isRunning)return!![];try{return client=new Client({'intents':[GatewayIntentBits[_0xa6b23d(0xea)],GatewayIntentBits[_0xa6b23d(0x112)],GatewayIntentBits['MessageContent'],GatewayIntentBits[_0xa6b23d(0xf6)]],'partials':[Partials[_0xa6b23d(0xf5)]]}),client[_0xa6b23d(0x100)](_0xa6b23d(0xe7),()=>{const _0x27f5a7=_0xa6b23d;a7_0x47de32[_0x27f5a7(0x106)](_0x27f5a7(0x102)+client?.[_0x27f5a7(0xed)]?.[_0x27f5a7(0x10c)]),isRunning=!![];}),client['on'](_0xa6b23d(0x111),async _0x416d3e=>{const _0x29c3dd=_0xa6b23d;if(_0x416d3e[_0x29c3dd(0xf1)][_0x29c3dd(0xff)])return;const _0x4d87e1=_0x416d3e[_0x29c3dd(0xf0)][_0x29c3dd(0x105)]===ChannelType['DM'],_0x2176d7=client?.[_0x29c3dd(0xed)]&&_0x416d3e[_0x29c3dd(0xf4)][_0x29c3dd(0x103)](client['user']);if(!_0x4d87e1&&!_0x2176d7)return;await _0x416d3e[_0x29c3dd(0xf0)][_0x29c3dd(0xe8)]()['catch'](()=>{});const _0x1abc1e=_0x416d3e[_0x29c3dd(0xf1)]['id'],_0x29b3b1=(_0x416d3e[_0x29c3dd(0x109)]||'dm')+'-'+_0x416d3e[_0x29c3dd(0xe5)]+'-'+_0x1abc1e;!chatHistories[_0x29c3dd(0x103)](_0x29b3b1)&&chatHistories[_0x29c3dd(0x10d)](_0x29b3b1,[{'role':_0x29c3dd(0xe6),'content':_0x29c3dd(0xef)}]);const _0x4e38d6=chatHistories['get'](_0x29b3b1),_0x3f585a=_0x416d3e[_0x29c3dd(0xeb)][_0x29c3dd(0x10e)](/<@!?[0-9]+>/g,'')[_0x29c3dd(0xf3)]();if(!_0x3f585a)return;_0x4e38d6['push']({'role':'user','content':_0x3f585a}),a7_0x47de32[_0x29c3dd(0xf8)]('[Discord]\x20'+_0x416d3e['author']['username']+':\x20'+_0x3f585a);const _0x500038=getSelectedModel();try{let _0x53f73b='';const _0x1b8f39=await sendChatMessage(_0x500038,_0x4e38d6,_0x11f8f6=>{_0x53f73b+=_0x11f8f6;});_0x53f73b=_0x1b8f39[_0x29c3dd(0xeb)],_0x4e38d6[_0x29c3dd(0xfd)]({'role':'assistant','content':_0x53f73b});if(_0x53f73b[_0x29c3dd(0xf9)]>0x7d0){const _0x2e4d41=_0x53f73b[_0x29c3dd(0x108)](/[\s\S]{1,2000}/g)||[];for(const _0x461602 of _0x2e4d41){await _0x416d3e[_0x29c3dd(0xe4)](_0x461602);}}else await _0x416d3e[_0x29c3dd(0xe4)](_0x53f73b);}catch(_0x483638){a7_0x47de32[_0x29c3dd(0x10b)](_0x29c3dd(0xf2)+_0x483638[_0x29c3dd(0xfb)]),await _0x416d3e[_0x29c3dd(0xe4)](_0x29c3dd(0xfc));}}),await client[_0xa6b23d(0x10a)](_0x53f551),!![];}catch(_0x1509b3){return a7_0x47de32[_0xa6b23d(0x10b)]('[Discord]\x20Failed\x20to\x20start:\x20'+_0x1509b3[_0xa6b23d(0xfb)]),![];}}export function stopBot(){const _0x46de48=a7_0x4d36;client&&(client[_0x46de48(0x104)](),client=null),isRunning=![];}export function isBotRunning(){return isRunning;}
@@ -0,0 +1,5 @@
1
+ export declare function setBotToken(token: string): void;
2
+ export declare function getBotToken(): string;
3
+ export declare function isEnabled(): boolean;
4
+ export declare function isConfigured(): boolean;
5
+ export declare function clearConfig(): void;
@@ -0,0 +1 @@
1
+ const a8_0x238dcd=a8_0xd5a4;(function(_0x8b1d67,_0x590578){const _0x53a365=a8_0xd5a4,_0x30c917=_0x8b1d67();while(!![]){try{const _0x224ac1=parseInt(_0x53a365(0x13e))/0x1*(-parseInt(_0x53a365(0x13c))/0x2)+parseInt(_0x53a365(0x141))/0x3+parseInt(_0x53a365(0x13d))/0x4+parseInt(_0x53a365(0x142))/0x5+-parseInt(_0x53a365(0x152))/0x6*(parseInt(_0x53a365(0x144))/0x7)+parseInt(_0x53a365(0x14c))/0x8*(parseInt(_0x53a365(0x140))/0x9)+parseInt(_0x53a365(0x14f))/0xa*(-parseInt(_0x53a365(0x13b))/0xb);if(_0x224ac1===_0x590578)break;else _0x30c917['push'](_0x30c917['shift']());}catch(_0x851369){_0x30c917['push'](_0x30c917['shift']());}}}(a8_0x146a,0x6e446));import a8_0x401d4f from'conf';import a8_0x5a2213 from'crypto';const config=new a8_0x401d4f({'projectName':a8_0x238dcd(0x143),'defaults':{'botToken':'','commandPrefix':'!','enabled':![]}}),ENCRYPTION_KEY=a8_0x238dcd(0x149);function a8_0x146a(){const _0x47bedd=['createDecipheriv','createHash','aes-256-cbc','woozlit_discord_secure_key','from','set','862728XaDGAE','digest','createCipheriv','4874930zPMWGV','final','update','6RQBqTv','split','utf8','sha256','hex','11HxvhIC','705410kXrimb','3355368wBVGRq','1rkanjD','botToken','27arsJzq','1110705zfdqxq','1404230FUffOK','woozlit-cli-discord','3651158WjCbjM','clear'];a8_0x146a=function(){return _0x47bedd;};return a8_0x146a();}function encrypt(_0x39862f){const _0x39a299=a8_0x238dcd;if(!_0x39862f)return'';const _0x2d5d86=a8_0x5a2213['randomBytes'](0x10),_0xa34f8d=a8_0x5a2213[_0x39a299(0x147)](_0x39a299(0x139))[_0x39a299(0x151)](ENCRYPTION_KEY)[_0x39a299(0x14d)](),_0x404786=a8_0x5a2213[_0x39a299(0x14e)](_0x39a299(0x148),_0xa34f8d,_0x2d5d86);let _0x36ad4c=_0x404786[_0x39a299(0x151)](_0x39862f,_0x39a299(0x154),_0x39a299(0x13a));return _0x36ad4c+=_0x404786[_0x39a299(0x150)](_0x39a299(0x13a)),_0x2d5d86['toString']('hex')+':'+_0x36ad4c;}function decrypt(_0x49ec17){const _0x21f09b=a8_0x238dcd;if(!_0x49ec17)return'';try{const [_0x4f98c3,_0x476f98]=_0x49ec17[_0x21f09b(0x153)](':');if(!_0x4f98c3||!_0x476f98)return'';const _0xdf5b1a=Buffer[_0x21f09b(0x14a)](_0x4f98c3,_0x21f09b(0x13a)),_0x47d032=a8_0x5a2213['createHash'](_0x21f09b(0x139))[_0x21f09b(0x151)](ENCRYPTION_KEY)[_0x21f09b(0x14d)](),_0x3b3b2b=a8_0x5a2213[_0x21f09b(0x146)](_0x21f09b(0x148),_0x47d032,_0xdf5b1a);let _0x537b9d=_0x3b3b2b[_0x21f09b(0x151)](_0x476f98,_0x21f09b(0x13a),_0x21f09b(0x154));return _0x537b9d+=_0x3b3b2b[_0x21f09b(0x150)](_0x21f09b(0x154)),_0x537b9d;}catch{return'';}}export function setBotToken(_0x8f787a){const _0x1b8677=a8_0x238dcd;config[_0x1b8677(0x14b)](_0x1b8677(0x13f),encrypt(_0x8f787a));}export function getBotToken(){return decrypt(config['get']('botToken'));}function a8_0xd5a4(_0x5afb09,_0x119a8f){_0x5afb09=_0x5afb09-0x139;const _0x146a70=a8_0x146a();let _0xd5a438=_0x146a70[_0x5afb09];return _0xd5a438;}export function isEnabled(){return!!getBotToken();}export function isConfigured(){return!!getBotToken();}export function clearConfig(){const _0x40c220=a8_0x238dcd;config[_0x40c220(0x145)]();}
@@ -0,0 +1,3 @@
1
+ export * from "./config.js";
2
+ export { startBot, stopBot, isBotRunning } from "./client.js";
3
+ export { setupDiscord } from "./setup.js";