woozlit 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/woozlit +179 -0
- package/package.json +24 -78
- package/postinstall.mjs +102 -0
- package/README.md +0 -108
- package/dist/auth/login.d.ts +0 -4
- package/dist/auth/login.js +0 -1
- package/dist/browser/index.d.ts +0 -78
- package/dist/browser/index.js +0 -1
- package/dist/browser/server.d.ts +0 -13
- package/dist/browser/server.js +0 -1
- package/dist/browser/tools.d.ts +0 -13
- package/dist/browser/tools.js +0 -1
- package/dist/chat/agent.d.ts +0 -1
- package/dist/chat/agent.js +0 -1
- package/dist/config/mcp.d.ts +0 -21
- package/dist/config/mcp.js +0 -1
- package/dist/config/settings.d.ts +0 -10
- package/dist/config/settings.js +0 -1
- package/dist/discord/client.d.ts +0 -3
- package/dist/discord/client.js +0 -1
- package/dist/discord/config.d.ts +0 -5
- package/dist/discord/config.js +0 -1
- package/dist/discord/index.d.ts +0 -3
- package/dist/discord/index.js +0 -1
- package/dist/discord/setup.d.ts +0 -1
- package/dist/discord/setup.js +0 -1
- package/dist/email/config.d.ts +0 -31
- package/dist/email/config.js +0 -1
- package/dist/email/index.d.ts +0 -3
- package/dist/email/index.js +0 -1
- package/dist/email/service.d.ts +0 -4
- package/dist/email/service.js +0 -1
- package/dist/email/setup.d.ts +0 -1
- package/dist/email/setup.js +0 -1
- package/dist/github/api.d.ts +0 -25
- package/dist/github/api.js +0 -1
- package/dist/github/auth.d.ts +0 -4
- package/dist/github/auth.js +0 -1
- package/dist/github/auto-setup.d.ts +0 -1
- package/dist/github/auto-setup.js +0 -1
- package/dist/github/index.d.ts +0 -1
- package/dist/github/index.js +0 -1
- package/dist/github/manual-setup.d.ts +0 -1
- package/dist/github/manual-setup.js +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/mcp-servers/computer-use.d.ts +0 -1
- package/dist/mcp-servers/computer-use.js +0 -1
- package/dist/services/bot-manager.d.ts +0 -13
- package/dist/services/bot-manager.js +0 -1
- package/dist/services/notifications.d.ts +0 -4
- package/dist/services/notifications.js +0 -1
- package/dist/services/voice-agent.d.ts +0 -6
- package/dist/services/voice-agent.js +0 -1
- package/dist/telegram/bot.d.ts +0 -3
- package/dist/telegram/bot.js +0 -1
- package/dist/telegram/config.d.ts +0 -12
- package/dist/telegram/config.js +0 -1
- package/dist/telegram/index.d.ts +0 -3
- package/dist/telegram/index.js +0 -1
- package/dist/telegram/reminders.d.ts +0 -11
- package/dist/telegram/reminders.js +0 -1
- package/dist/telegram/setup.d.ts +0 -1
- package/dist/telegram/setup.js +0 -1
- package/dist/tools/command.d.ts +0 -23
- package/dist/tools/command.js +0 -1
- package/dist/tools/file.d.ts +0 -79
- package/dist/tools/file.js +0 -1
- package/dist/tools/git.d.ts +0 -30
- package/dist/tools/git.js +0 -1
- package/dist/tools/index.d.ts +0 -10
- package/dist/tools/index.js +0 -1
- package/dist/tools/knowledge.d.ts +0 -4
- package/dist/tools/knowledge.js +0 -1
- package/dist/tools/mcp.d.ts +0 -10
- package/dist/tools/mcp.js +0 -1
- package/dist/tools/network.d.ts +0 -10
- package/dist/tools/network.js +0 -1
- package/dist/tools/project.d.ts +0 -54
- package/dist/tools/project.js +0 -1
- package/dist/tools/rollback.d.ts +0 -21
- package/dist/tools/rollback.js +0 -1
- package/dist/tools/rules.d.ts +0 -4
- package/dist/tools/rules.js +0 -1
- package/dist/tools/system.d.ts +0 -33
- package/dist/tools/system.js +0 -1
- package/dist/twilio/config.d.ts +0 -11
- package/dist/twilio/config.js +0 -1
- package/dist/twilio/index.d.ts +0 -3
- package/dist/twilio/index.js +0 -1
- package/dist/twilio/server.d.ts +0 -5
- package/dist/twilio/server.js +0 -1
- package/dist/twilio/setup.d.ts +0 -1
- package/dist/twilio/setup.js +0 -1
- package/dist/ui/output.d.ts +0 -28
- package/dist/ui/output.js +0 -1
- package/dist/ui/select.d.ts +0 -3
- package/dist/ui/select.js +0 -1
- package/dist/ui/themes.d.ts +0 -25
- package/dist/ui/themes.js +0 -1
- package/dist/utils/api.d.ts +0 -22
- package/dist/utils/api.js +0 -1
- package/dist/utils/chat-history.d.ts +0 -15
- package/dist/utils/chat-history.js +0 -1
- package/dist/utils/history.d.ts +0 -3
- package/dist/utils/history.js +0 -1
- package/dist/utils/mcp-installer.d.ts +0 -1
- package/dist/utils/mcp-installer.js +0 -1
- package/dist/utils/platform.d.ts +0 -7
- package/dist/utils/platform.js +0 -1
- package/dist/utils/storage.d.ts +0 -23
- package/dist/utils/storage.js +0 -1
- package/dist/utils/update-check.d.ts +0 -5
- package/dist/utils/update-check.js +0 -1
- package/dist/utils/updater.d.ts +0 -2
- package/dist/utils/updater.js +0 -1
- package/dist/verify_repro.d.ts +0 -4
- package/dist/verify_repro.js +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Woozlit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/bin/woozlit
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const childProcess = require("child_process")
|
|
4
|
+
const fs = require("fs")
|
|
5
|
+
const path = require("path")
|
|
6
|
+
const os = require("os")
|
|
7
|
+
|
|
8
|
+
function run(target) {
|
|
9
|
+
const result = childProcess.spawnSync(target, process.argv.slice(2), {
|
|
10
|
+
stdio: "inherit",
|
|
11
|
+
})
|
|
12
|
+
if (result.error) {
|
|
13
|
+
console.error(result.error.message)
|
|
14
|
+
process.exit(1)
|
|
15
|
+
}
|
|
16
|
+
const code = typeof result.status === "number" ? result.status : 0
|
|
17
|
+
process.exit(code)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const envPath = process.env.WOOZLIT_BIN_PATH || process.env.MIMOCODE_BIN_PATH
|
|
21
|
+
if (envPath) {
|
|
22
|
+
run(envPath)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const scriptPath = fs.realpathSync(__filename)
|
|
26
|
+
const scriptDir = path.dirname(scriptPath)
|
|
27
|
+
|
|
28
|
+
//
|
|
29
|
+
const cached = path.join(scriptDir, ".woozlitcode")
|
|
30
|
+
if (fs.existsSync(cached)) {
|
|
31
|
+
run(cached)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const platformMap = {
|
|
35
|
+
darwin: "darwin",
|
|
36
|
+
linux: "linux",
|
|
37
|
+
win32: "windows",
|
|
38
|
+
}
|
|
39
|
+
const archMap = {
|
|
40
|
+
x64: "x64",
|
|
41
|
+
arm64: "arm64",
|
|
42
|
+
arm: "arm",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let platform = platformMap[os.platform()]
|
|
46
|
+
if (!platform) {
|
|
47
|
+
platform = os.platform()
|
|
48
|
+
}
|
|
49
|
+
let arch = archMap[os.arch()]
|
|
50
|
+
if (!arch) {
|
|
51
|
+
arch = os.arch()
|
|
52
|
+
}
|
|
53
|
+
const base = "woozlit-" + platform + "-" + arch
|
|
54
|
+
const binary = platform === "windows" ? "woozlit.exe" : "woozlit"
|
|
55
|
+
|
|
56
|
+
function supportsAvx2() {
|
|
57
|
+
if (arch !== "x64") return false
|
|
58
|
+
|
|
59
|
+
if (platform === "linux") {
|
|
60
|
+
try {
|
|
61
|
+
return /(^|\s)avx2(\s|$)/i.test(fs.readFileSync("/proc/cpuinfo", "utf8"))
|
|
62
|
+
} catch {
|
|
63
|
+
return false
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (platform === "darwin") {
|
|
68
|
+
try {
|
|
69
|
+
const result = childProcess.spawnSync("sysctl", ["-n", "hw.optional.avx2_0"], {
|
|
70
|
+
encoding: "utf8",
|
|
71
|
+
timeout: 1500,
|
|
72
|
+
})
|
|
73
|
+
if (result.status !== 0) return false
|
|
74
|
+
return (result.stdout || "").trim() === "1"
|
|
75
|
+
} catch {
|
|
76
|
+
return false
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (platform === "windows") {
|
|
81
|
+
const cmd =
|
|
82
|
+
'(Add-Type -MemberDefinition "[DllImport(""kernel32.dll"")] public static extern bool IsProcessorFeaturePresent(int ProcessorFeature);" -Name Kernel32 -Namespace Win32 -PassThru)::IsProcessorFeaturePresent(40)'
|
|
83
|
+
|
|
84
|
+
for (const exe of ["powershell.exe", "pwsh.exe", "pwsh", "powershell"]) {
|
|
85
|
+
try {
|
|
86
|
+
const result = childProcess.spawnSync(exe, ["-NoProfile", "-NonInteractive", "-Command", cmd], {
|
|
87
|
+
encoding: "utf8",
|
|
88
|
+
timeout: 3000,
|
|
89
|
+
windowsHide: true,
|
|
90
|
+
})
|
|
91
|
+
if (result.status !== 0) continue
|
|
92
|
+
const out = (result.stdout || "").trim().toLowerCase()
|
|
93
|
+
if (out === "true" || out === "1") return true
|
|
94
|
+
if (out === "false" || out === "0") return false
|
|
95
|
+
} catch {
|
|
96
|
+
continue
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return false
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return false
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const names = (() => {
|
|
107
|
+
const avx2 = supportsAvx2()
|
|
108
|
+
const baseline = arch === "x64" && !avx2
|
|
109
|
+
|
|
110
|
+
if (platform === "linux") {
|
|
111
|
+
const musl = (() => {
|
|
112
|
+
try {
|
|
113
|
+
if (fs.existsSync("/etc/alpine-release")) return true
|
|
114
|
+
} catch {
|
|
115
|
+
// ignore
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
try {
|
|
119
|
+
const result = childProcess.spawnSync("ldd", ["--version"], { encoding: "utf8" })
|
|
120
|
+
const text = ((result.stdout || "") + (result.stderr || "")).toLowerCase()
|
|
121
|
+
if (text.includes("musl")) return true
|
|
122
|
+
} catch {
|
|
123
|
+
// ignore
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return false
|
|
127
|
+
})()
|
|
128
|
+
|
|
129
|
+
if (musl) {
|
|
130
|
+
if (arch === "x64") {
|
|
131
|
+
if (baseline) return [`${base}-baseline-musl`, `${base}-musl`, `${base}-baseline`, base]
|
|
132
|
+
return [`${base}-musl`, `${base}-baseline-musl`, base, `${base}-baseline`]
|
|
133
|
+
}
|
|
134
|
+
return [`${base}-musl`, base]
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (arch === "x64") {
|
|
138
|
+
if (baseline) return [`${base}-baseline`, base, `${base}-baseline-musl`, `${base}-musl`]
|
|
139
|
+
return [base, `${base}-baseline`, `${base}-musl`, `${base}-baseline-musl`]
|
|
140
|
+
}
|
|
141
|
+
return [base, `${base}-musl`]
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (arch === "x64") {
|
|
145
|
+
if (baseline) return [`${base}-baseline`, base]
|
|
146
|
+
return [base, `${base}-baseline`]
|
|
147
|
+
}
|
|
148
|
+
return [base]
|
|
149
|
+
})()
|
|
150
|
+
|
|
151
|
+
function findBinary(startDir) {
|
|
152
|
+
let current = startDir
|
|
153
|
+
for (;;) {
|
|
154
|
+
const modules = path.join(current, "node_modules")
|
|
155
|
+
if (fs.existsSync(modules)) {
|
|
156
|
+
for (const name of names) {
|
|
157
|
+
const candidate = path.join(modules, name, "bin", binary)
|
|
158
|
+
if (fs.existsSync(candidate)) return candidate
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const parent = path.dirname(current)
|
|
162
|
+
if (parent === current) {
|
|
163
|
+
return
|
|
164
|
+
}
|
|
165
|
+
current = parent
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const resolved = findBinary(scriptDir)
|
|
170
|
+
if (!resolved) {
|
|
171
|
+
console.error(
|
|
172
|
+
"It seems that your package manager failed to install the right version of the woozlitcode CLI for your platform. You can try manually installing " +
|
|
173
|
+
names.map((n) => `\"${n}\"`).join(" or ") +
|
|
174
|
+
" package",
|
|
175
|
+
)
|
|
176
|
+
process.exit(1)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
run(resolved)
|
package/package.json
CHANGED
|
@@ -1,80 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"node18-win-x64"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@google/generative-ai": "^0.24.1",
|
|
31
|
-
"@hurdlegroup/robotjs": "^0.12.3",
|
|
32
|
-
"@inquirer/prompts": "^8.2.0",
|
|
33
|
-
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
34
|
-
"@ngrok/ngrok": "^1.7.0",
|
|
35
|
-
"@octokit/auth-app": "^8.1.2",
|
|
36
|
-
"chalk": "^5.4.1",
|
|
37
|
-
"commander": "^13.1.0",
|
|
38
|
-
"conf": "^13.1.0",
|
|
39
|
-
"discord.js": "^14.25.1",
|
|
40
|
-
"fluent-ffmpeg": "npm:fluent-ffmpeg-7@^2.1.5",
|
|
41
|
-
"grammy": "^1.40.0",
|
|
42
|
-
"imap-simple": "^5.1.0",
|
|
43
|
-
"inquirer": "^12.3.2",
|
|
44
|
-
"jimp": "^1.6.0",
|
|
45
|
-
"marked": "^15.0.12",
|
|
46
|
-
"marked-terminal": "^7.3.0",
|
|
47
|
-
"ngrok": "4.3.3",
|
|
48
|
-
"nodemailer": "^7.0.13",
|
|
49
|
-
"open": "^10.1.0",
|
|
50
|
-
"ora": "^8.1.1",
|
|
51
|
-
"ws": "^8.18.0"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@aws-sdk/client-s3": "^3.997.0",
|
|
55
|
-
"@types/node": "^22.10.5",
|
|
56
|
-
"@types/nodemailer": "^7.0.9",
|
|
57
|
-
"@types/ws": "^8.5.13",
|
|
58
|
-
"javascript-obfuscator": "^5.1.0",
|
|
59
|
-
"pkg": "^5.8.1",
|
|
60
|
-
"tsx": "^4.19.2",
|
|
61
|
-
"typescript": "^5.7.3"
|
|
62
|
-
},
|
|
63
|
-
"engines": {
|
|
64
|
-
"node": ">=18"
|
|
65
|
-
},
|
|
66
|
-
"keywords": [
|
|
67
|
-
"ai",
|
|
68
|
-
"cli",
|
|
69
|
-
"coding",
|
|
70
|
-
"assistant",
|
|
71
|
-
"woozlit"
|
|
72
|
-
],
|
|
73
|
-
"author": "Woozlit",
|
|
74
|
-
"license": "MIT",
|
|
75
|
-
"overrides": {
|
|
76
|
-
"glob": "^11.0.0",
|
|
77
|
-
"scmp": "npm:timing-safe-equal@^1.0.0",
|
|
78
|
-
"node-domexception": "npm:domexception@^4.0.0"
|
|
79
|
-
}
|
|
2
|
+
"name": "woozlit",
|
|
3
|
+
"bin": {
|
|
4
|
+
"woozlit": "./bin/woozlit"
|
|
5
|
+
},
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
8
|
+
},
|
|
9
|
+
"version": "2.2.2",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"optionalDependencies": {
|
|
12
|
+
"woozlit-windows-x64-baseline": "2.2.2",
|
|
13
|
+
"woozlit-windows-x64": "2.2.2",
|
|
14
|
+
"woozlit-windows-arm64": "2.2.2",
|
|
15
|
+
"woozlit-linux-x64-musl": "2.2.2",
|
|
16
|
+
"woozlit-linux-x64-baseline-musl": "2.2.2",
|
|
17
|
+
"woozlit-linux-x64-baseline": "2.2.2",
|
|
18
|
+
"woozlit-linux-x64": "2.2.2",
|
|
19
|
+
"woozlit-linux-arm64-musl": "2.2.2",
|
|
20
|
+
"woozlit-linux-arm64": "2.2.2",
|
|
21
|
+
"woozlit-darwin-x64-baseline": "2.2.2",
|
|
22
|
+
"woozlit-darwin-x64": "2.2.2",
|
|
23
|
+
"woozlit-darwin-arm64": "2.2.2",
|
|
24
|
+
"woozlit": "2.2.2"
|
|
25
|
+
}
|
|
80
26
|
}
|
package/postinstall.mjs
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "fs"
|
|
4
|
+
import path from "path"
|
|
5
|
+
import os from "os"
|
|
6
|
+
import { fileURLToPath } from "url"
|
|
7
|
+
import { createRequire } from "module"
|
|
8
|
+
|
|
9
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
10
|
+
const require = createRequire(import.meta.url)
|
|
11
|
+
|
|
12
|
+
function detectPlatformAndArch() {
|
|
13
|
+
// Map platform names
|
|
14
|
+
let platform
|
|
15
|
+
switch (os.platform()) {
|
|
16
|
+
case "darwin":
|
|
17
|
+
platform = "darwin"
|
|
18
|
+
break
|
|
19
|
+
case "linux":
|
|
20
|
+
platform = "linux"
|
|
21
|
+
break
|
|
22
|
+
case "win32":
|
|
23
|
+
platform = "windows"
|
|
24
|
+
break
|
|
25
|
+
default:
|
|
26
|
+
platform = os.platform()
|
|
27
|
+
break
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Map architecture names
|
|
31
|
+
let arch
|
|
32
|
+
switch (os.arch()) {
|
|
33
|
+
case "x64":
|
|
34
|
+
arch = "x64"
|
|
35
|
+
break
|
|
36
|
+
case "arm64":
|
|
37
|
+
arch = "arm64"
|
|
38
|
+
break
|
|
39
|
+
case "arm":
|
|
40
|
+
arch = "arm"
|
|
41
|
+
break
|
|
42
|
+
default:
|
|
43
|
+
arch = os.arch()
|
|
44
|
+
break
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return { platform, arch }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function findBinary() {
|
|
51
|
+
const { platform, arch } = detectPlatformAndArch()
|
|
52
|
+
const packageName = `woozlit-${platform}-${arch}`
|
|
53
|
+
const binaryName = platform === "windows" ? "woozlit.exe" : "woozlit"
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
// Use require.resolve to find the package
|
|
57
|
+
const packageJsonPath = require.resolve(`${packageName}/package.json`)
|
|
58
|
+
const packageDir = path.dirname(packageJsonPath)
|
|
59
|
+
const binaryPath = path.join(packageDir, "bin", binaryName)
|
|
60
|
+
|
|
61
|
+
if (!fs.existsSync(binaryPath)) {
|
|
62
|
+
throw new Error(`Binary not found at ${binaryPath}`)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return { binaryPath, binaryName }
|
|
66
|
+
} catch (error) {
|
|
67
|
+
throw new Error(`Could not find package ${packageName}: ${error.message}`, { cause: error })
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function main() {
|
|
72
|
+
try {
|
|
73
|
+
if (os.platform() === "win32") {
|
|
74
|
+
// On Windows, the .exe is already included in the package and bin field points to it
|
|
75
|
+
// No postinstall setup needed
|
|
76
|
+
console.log("Windows detected: binary setup not needed (using packaged .exe)")
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// On non-Windows platforms, just verify the binary package exists
|
|
81
|
+
// Don't replace the wrapper script - it handles binary execution
|
|
82
|
+
const { binaryPath } = findBinary()
|
|
83
|
+
const target = path.join(__dirname, "bin", ".woozlitcode")
|
|
84
|
+
if (fs.existsSync(target)) fs.unlinkSync(target)
|
|
85
|
+
try {
|
|
86
|
+
fs.linkSync(binaryPath, target)
|
|
87
|
+
} catch {
|
|
88
|
+
fs.copyFileSync(binaryPath, target)
|
|
89
|
+
}
|
|
90
|
+
fs.chmodSync(target, 0o755)
|
|
91
|
+
} catch (error) {
|
|
92
|
+
console.error("Failed to setup woozlit binary:", error.message)
|
|
93
|
+
process.exit(1)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
try {
|
|
98
|
+
void main()
|
|
99
|
+
} catch (error) {
|
|
100
|
+
console.error("Postinstall script error:", error.message)
|
|
101
|
+
process.exit(0)
|
|
102
|
+
}
|
package/README.md
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# Woozlit CLI v2.0.1
|
|
2
|
-
|
|
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
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Standalone binaries are available, or install via npm
|
|
9
|
-
npm install -g woozlit
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Core Features
|
|
13
|
-
|
|
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
|
-
- **Knowledge Presets**: Easily define custom instructions or framework stacks (e.g., Next.js conventions) that the AI automatically injects into its system prompt.
|
|
18
|
-
- **Vision & Image Pasting**: Direct support for analyzing local images. Just paste an absolute file path into the chat prompt.
|
|
19
|
-
- **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.
|
|
20
|
-
- **Context & Process Safety**: Includes an automatic contextual summarizer for extremely long conversations to prevent token overflow, and an anti-spam monitor to stop duplicate dev servers.
|
|
21
|
-
- **Telegram Remote**: Start the CLI on your desktop, leave it running, and text it complex coding tasks from your phone via Telegram.
|
|
22
|
-
- **MCP Protocol**: Deep integration with Model Context Protocol to hook into external servers.
|
|
23
|
-
- **Auto-Correction**: Automatically detects, reads `stderr`, and attempts to fix errors during execution loops.
|
|
24
|
-
|
|
25
|
-
## Usage
|
|
26
|
-
|
|
27
|
-
### Start Chat
|
|
28
|
-
```bash
|
|
29
|
-
woozlit
|
|
30
|
-
# or
|
|
31
|
-
woozlit chat
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Global Themes
|
|
35
|
-
```bash
|
|
36
|
-
woozlit theme
|
|
37
|
-
```
|
|
38
|
-
Brings up an interactive prompt to switch color themes.
|
|
39
|
-
|
|
40
|
-
### Knowledge Presets
|
|
41
|
-
Inject project-specific rules or context into the agent's system prompt (e.g. enforce architectural styles or point to specific docs).
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# List current knowledge presets
|
|
45
|
-
woozlit knowledge list
|
|
46
|
-
|
|
47
|
-
# Add a new piece of knowledge (Here is the built-in default Next.js preset)
|
|
48
|
-
woozlit knowledge add "You are an expert Next.js 15, React 19, and Tailwind CSS developer."
|
|
49
|
-
woozlit knowledge add "Use the App Router (app/ directory) exclusively. Avoid the pages/ directory."
|
|
50
|
-
woozlit knowledge add "Default to Server Components. Only add 'use client' when hooks (useState, useEffect) or DOM event listeners are strictly necessary."
|
|
51
|
-
woozlit knowledge add "Use Server Actions for data mutations and fetching. Avoid traditional API routes unless building external standard REST endpoints."
|
|
52
|
-
woozlit knowledge add "Follow mobile-first responsive design patterns. Build clean, minimal UI components using Tailwind CSS."
|
|
53
|
-
|
|
54
|
-
# Clear all presets
|
|
55
|
-
woozlit knowledge clear
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Vision & Images
|
|
59
|
-
You can ask the AI about local images directly in the chat interface by simply pasting their absolute paths alongside your prompt:
|
|
60
|
-
|
|
61
|
-
```text
|
|
62
|
-
> C:\Users\docs\mockup.png Make this exact UI using React and Tailwind.
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Chat Commands
|
|
66
|
-
|
|
67
|
-
Inside a chat session, you can use:
|
|
68
|
-
|
|
69
|
-
| Command | Description |
|
|
70
|
-
|---------|-------------|
|
|
71
|
-
| `/exit` | Exit chat |
|
|
72
|
-
| `/clear` | Clear conversation |
|
|
73
|
-
| `/model` | Switch AI model (default is Woozie/Gemini-2.5-Flash) |
|
|
74
|
-
| `/theme` | Switch UI color theme dynamically |
|
|
75
|
-
| `/mcp` | List connected external tools |
|
|
76
|
-
| `/telegram` | Control the remote Telegram bot |
|
|
77
|
-
| `/usage` | Check token usage |
|
|
78
|
-
| `/rollback` | Undo last AI file change |
|
|
79
|
-
| `/help` | Show help |
|
|
80
|
-
|
|
81
|
-
## Available Models
|
|
82
|
-
|
|
83
|
-
- **Woozie (Gemini 2.5 Flash)** - Default & Recommended for speed/autonomy
|
|
84
|
-
- Llama 3.3 70B / 4 Maverick
|
|
85
|
-
- Qwen3 235B / Coder
|
|
86
|
-
- Mistral Small 3.2
|
|
87
|
-
- DeepSeek V3 / R1
|
|
88
|
-
- Kimi K2
|
|
89
|
-
- *and more via OpenRouter...*
|
|
90
|
-
|
|
91
|
-
## MCP Support (Model Context Protocol)
|
|
92
|
-
|
|
93
|
-
**Manage MCP Servers:**
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
# Install specific tools (e.g. Browser Control)
|
|
97
|
-
woozlit mcp install browsermcp
|
|
98
|
-
|
|
99
|
-
# Install Chrome Bridge specifically
|
|
100
|
-
woozlit mcp install mcp-chrome-bridge
|
|
101
|
-
|
|
102
|
-
# Add standard MCP server (stdio)
|
|
103
|
-
woozlit mcp add sqlite uvx mcp-server-sqlite --db test.db
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Once added, the AI can automatically discover and use tools provided by these servers natively in its autonomous loop.
|
|
107
|
-
|
|
108
|
-
|
package/dist/auth/login.d.ts
DELETED
package/dist/auth/login.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x3ec91c,_0x59a5bb){const _0x4f3f21=a0_0x5792,_0x35ce39=_0x3ec91c();while(!![]){try{const _0x4a2ebe=-parseInt(_0x4f3f21(0x1aa))/0x1*(parseInt(_0x4f3f21(0x1a9))/0x2)+parseInt(_0x4f3f21(0x193))/0x3+-parseInt(_0x4f3f21(0x1a0))/0x4*(parseInt(_0x4f3f21(0x1a2))/0x5)+parseInt(_0x4f3f21(0x19e))/0x6*(-parseInt(_0x4f3f21(0x1a5))/0x7)+-parseInt(_0x4f3f21(0x19f))/0x8+parseInt(_0x4f3f21(0x1ac))/0x9+-parseInt(_0x4f3f21(0x19a))/0xa*(-parseInt(_0x4f3f21(0x19d))/0xb);if(_0x4a2ebe===_0x59a5bb)break;else _0x35ce39['push'](_0x35ce39['shift']());}catch(_0x4ba5a6){_0x35ce39['push'](_0x35ce39['shift']());}}}(a0_0x51ec,0x984b7));import a0_0x55b0cf from'open';function a0_0x51ec(){const _0x1fb045=['1063989LawyVL','\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','url','searchParams','token','displayName','close','5742730ygbcpz','get','end','22AYAMJP','6ZKHzNt','742112XprSyb','2431040lvyDRM','http://localhost:','5ylJoXz','email','text/html','3534559XLumRW','/callback','writeHead','/auth/cli?callback=http://localhost:','462PFdauJ','1635LlmBFb','listen','6333624BvzXNu'];a0_0x51ec=function(){return _0x1fb045;};return a0_0x51ec();}function a0_0x5792(_0x790c33,_0x4d9c1d){_0x790c33=_0x790c33-0x193;const _0x51ec91=a0_0x51ec();let _0x579223=_0x51ec91[_0x790c33];return _0x579223;}import{createServer}from'http';import{getApiUrl}from'../config/settings.js';import{setToken,setUser,isLoggedIn,logout as a0_0x5a82fb}from'../utils/storage.js';export async function login(){const _0x19b4c4=getApiUrl(),_0xe5c781=0x2694;return new Promise(_0x58fce3=>{const _0x408ea0=a0_0x5792,_0xb24a92=createServer(async(_0xead8b7,_0x890337)=>{const _0x2c6eae=a0_0x5792,_0xdab88f=new URL(_0xead8b7[_0x2c6eae(0x195)]||'',_0x2c6eae(0x1a1)+_0xe5c781);if(_0xdab88f['pathname']===_0x2c6eae(0x1a6)){const _0x173aca=_0xdab88f[_0x2c6eae(0x196)][_0x2c6eae(0x19b)](_0x2c6eae(0x197)),_0xe14fb1=_0xdab88f['searchParams'][_0x2c6eae(0x19b)]('userId'),_0x374f64=_0xdab88f['searchParams'][_0x2c6eae(0x19b)](_0x2c6eae(0x1a3)),_0x3c508e=_0xdab88f['searchParams']['get'](_0x2c6eae(0x198));_0x173aca&&_0xe14fb1?(setToken(_0x173aca),setUser(_0xe14fb1,_0x374f64||'',_0x3c508e||''),_0x890337[_0x2c6eae(0x1a7)](0xc8,{'Content-Type':'text/html'}),_0x890337[_0x2c6eae(0x19c)](_0x2c6eae(0x194)),_0xb24a92[_0x2c6eae(0x199)](),_0x58fce3(!![])):(_0x890337[_0x2c6eae(0x1a7)](0x190,{'Content-Type':_0x2c6eae(0x1a4)}),_0x890337[_0x2c6eae(0x19c)]('\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'),_0xb24a92[_0x2c6eae(0x199)](),_0x58fce3(![]));}});_0xb24a92[_0x408ea0(0x1ab)](_0xe5c781,()=>{const _0x482a81=_0x408ea0,_0x3c8755=_0x19b4c4+_0x482a81(0x1a8)+_0xe5c781+_0x482a81(0x1a6);a0_0x55b0cf(_0x3c8755);}),setTimeout(()=>{const _0x2cb5ab=_0x408ea0;_0xb24a92[_0x2cb5ab(0x199)](),_0x58fce3(![]);},0x1d4c0);});}export function logout(){a0_0x5a82fb();}export{isLoggedIn};
|
package/dist/browser/index.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
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
|
-
})[];
|
package/dist/browser/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a1_0x110567=a1_0x1b2b;function a1_0x301a(){const _0x2f5510=['query','12RmaSBT','text','1241065zQdrWb','Fill\x20a\x20form\x20field\x20or\x20input\x20element','Direction\x20to\x20scroll','number','down','9nNwdjG','140633RRaAgx','1500246dKUvDv','browser_click','top','CSS\x20selector\x20for\x20the\x20element','87512oHVecp','Text\x20to\x20fill','44420KWtTxi','Tab\x20ID\x20from\x20browser_open\x20or\x20browser_snapshot','1430LzeGjd','tabId','489725WfdYtP','32079GJgTmg','Tab\x20ID','Optional:\x20pixels\x20to\x20scroll\x20(default:\x20one\x20page)','object','direction','string','28XnIDRQ','browser_scroll'];a1_0x301a=function(){return _0x2f5510;};return a1_0x301a();}(function(_0x30430b,_0x1ba820){const _0x16a68d=a1_0x1b2b,_0x24b91b=_0x30430b();while(!![]){try{const _0x267ec5=-parseInt(_0x16a68d(0x103))/0x1+parseInt(_0x16a68d(0xf8))/0x2*(-parseInt(_0x16a68d(0xf2))/0x3)+-parseInt(_0x16a68d(0xfb))/0x4*(-parseInt(_0x16a68d(0xf1))/0x5)+-parseInt(_0x16a68d(0x104))/0x6+-parseInt(_0x16a68d(0xfd))/0x7+-parseInt(_0x16a68d(0x108))/0x8*(-parseInt(_0x16a68d(0x102))/0x9)+-parseInt(_0x16a68d(0xed))/0xa*(-parseInt(_0x16a68d(0xef))/0xb);if(_0x267ec5===_0x1ba820)break;else _0x24b91b['push'](_0x24b91b['shift']());}catch(_0x2afa82){_0x24b91b['push'](_0x24b91b['shift']());}}}(a1_0x301a,0x282d3));export*from'./server.js';export*from'./tools.js';export*from'./server.js';export*from'./tools.js';function a1_0x1b2b(_0x187c5d,_0x1f03b9){_0x187c5d=_0x187c5d-0xed;const _0x301a4b=a1_0x301a();let _0x1b2b60=_0x301a4b[_0x187c5d];return _0x1b2b60;}export const tools=[{'name':'browser_fill','description':a1_0x110567(0xfe),'input_schema':{'type':'object','properties':{'tabId':{'type':'number','description':'Tab\x20ID\x20from\x20browser_open\x20\x20or\x20browser_snapshot'},'query':{'type':a1_0x110567(0xf7),'description':'CSS\x20selector\x20for\x20the\x20element'},'text':{'type':a1_0x110567(0xf7),'description':a1_0x110567(0x109)}},'required':['tabId',a1_0x110567(0xfa),a1_0x110567(0xfc)]}},{'name':a1_0x110567(0x105),'description':'Click\x20an\x20element\x20on\x20the\x20page','input_schema':{'type':'object','properties':{'tabId':{'type':a1_0x110567(0x100),'description':a1_0x110567(0xee)},'query':{'type':a1_0x110567(0xf7),'description':a1_0x110567(0x107)},'index':{'type':a1_0x110567(0x100),'description':'Optional:\x20if\x20multiple\x20elements\x20match,\x20click\x20the\x20Nth\x20one\x20(0-indexed)'}},'required':[a1_0x110567(0xf0),a1_0x110567(0xfa)]}},{'name':a1_0x110567(0xf9),'description':'Scroll\x20the\x20page\x20up\x20or\x20down','input_schema':{'type':a1_0x110567(0xf5),'properties':{'tabId':{'type':a1_0x110567(0x100),'description':a1_0x110567(0xf3)},'direction':{'type':'string','enum':['up',a1_0x110567(0x101),a1_0x110567(0x106),'bottom'],'description':a1_0x110567(0xff)},'amount':{'type':a1_0x110567(0x100),'description':a1_0x110567(0xf4)}},'required':['tabId',a1_0x110567(0xf6)]}}];
|
package/dist/browser/server.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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 {};
|
package/dist/browser/server.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x239c31,_0x47f8ec){const _0xf7d7f5=a2_0x5b63,_0x293fef=_0x239c31();while(!![]){try{const _0x1567cf=-parseInt(_0xf7d7f5(0xb5))/0x1*(parseInt(_0xf7d7f5(0xb8))/0x2)+-parseInt(_0xf7d7f5(0x94))/0x3+parseInt(_0xf7d7f5(0xa0))/0x4*(-parseInt(_0xf7d7f5(0xb7))/0x5)+parseInt(_0xf7d7f5(0x90))/0x6+parseInt(_0xf7d7f5(0x8e))/0x7*(parseInt(_0xf7d7f5(0x8d))/0x8)+-parseInt(_0xf7d7f5(0x92))/0x9+-parseInt(_0xf7d7f5(0xb1))/0xa*(-parseInt(_0xf7d7f5(0x91))/0xb);if(_0x1567cf===_0x47f8ec)break;else _0x293fef['push'](_0x293fef['shift']());}catch(_0x227e68){_0x293fef['push'](_0x293fef['shift']());}}}(a2_0x9eca,0xd5c9f));import{WebSocketServer}from'ws';function a2_0x5b63(_0xdccda7,_0x2fbcdb){_0xdccda7=_0xdccda7-0x85;const _0x9ecabe=a2_0x9eca();let _0x5b63f3=_0x9ecabe[_0xdccda7];return _0x5b63f3;}import*as a2_0x2fe297 from'../ui/output.js';function a2_0x9eca(){const _0x52d333=['EADDRINUSE','Server\x20stopped','310094eEKLNN','Waiting\x20for\x20Woozlit\x20Browser\x20extension\x20to\x20connect...','5EIGtqH','2dIyOpQ','response','Command\x20failed','auth','Browser\x20server\x20already\x20running','stringify','type','Failed\x20to\x20start\x20browser\x20server:\x20','forEach','now','connection','listening','Command\x20timeout\x20after\x20','dim','360744dCRmxT','98liTeCG','reject','4760154eMYcpx','121hHrdYr','4214106IiWNGr','requestId','1420044MSoIHf','error','data','user','Browser\x20server\x20not\x20running','send','userId','info','Browser\x20server\x20started\x20on\x20ws://localhost:','code','set','substr','3885892JKNXCB','unknown','Browser\x20server\x20stopped','timeout','resolve','Error\x20processing\x20message:','parse','uid','success','result','close','clear','message','email','warn','get','toString','1521970hJiRrn','auth_success'];a2_0x9eca=function(){return _0x52d333;};return a2_0x9eca();}const sessions=new Map();let server=null,isRunning=![];const pendingRequests=new Map();export function startBrowserServer(_0x45108f=0x2408){return new Promise(_0x22bb8b=>{const _0x30f90=a2_0x5b63;if(isRunning&&server){a2_0x2fe297[_0x30f90(0xae)](_0x30f90(0xbc)),_0x22bb8b(!![]);return;}try{server=new WebSocketServer({'port':_0x45108f}),server['on'](_0x30f90(0x8a),()=>{const _0x4c9088=_0x30f90;isRunning=!![],a2_0x2fe297[_0x4c9088(0xa8)](_0x4c9088(0x9c)+_0x45108f),a2_0x2fe297[_0x4c9088(0x8c)](_0x4c9088(0xb6)),_0x22bb8b(!![]);}),server['on'](_0x30f90(0x89),async _0x2abbc1=>{const _0x3e55de=_0x30f90;let _0x2d5ab5=null;_0x2abbc1['on']('message',async _0x439200=>{const _0x2aa633=a2_0x5b63;try{const _0x504636=JSON[_0x2aa633(0xa6)](_0x439200[_0x2aa633(0xb0)]());if(_0x504636[_0x2aa633(0x85)]===_0x2aa633(0xbb))_0x2d5ab5={'ws':_0x2abbc1,'userId':_0x504636[_0x2aa633(0x97)]?.[_0x2aa633(0xa7)]||_0x2aa633(0xa1),'userEmail':_0x504636[_0x2aa633(0x97)]?.[_0x2aa633(0xad)]||'unknown','connectedAt':Date[_0x2aa633(0x88)]()},sessions['set'](_0x2d5ab5[_0x2aa633(0x9a)],_0x2d5ab5),_0x2abbc1['send'](JSON[_0x2aa633(0xbd)]({'type':_0x2aa633(0xb2),'userId':_0x2d5ab5[_0x2aa633(0x9a)]}));else{if(_0x504636[_0x2aa633(0x85)]===_0x2aa633(0xb9)){const _0x1ccbd1=pendingRequests[_0x2aa633(0xaf)](_0x504636[_0x2aa633(0x93)]);_0x1ccbd1&&(clearTimeout(_0x1ccbd1[_0x2aa633(0xa3)]),pendingRequests['delete'](_0x504636[_0x2aa633(0x93)]),_0x504636[_0x2aa633(0xa9)][_0x2aa633(0xa8)]?_0x1ccbd1[_0x2aa633(0xa4)](_0x504636[_0x2aa633(0xa9)][_0x2aa633(0x96)]):_0x1ccbd1[_0x2aa633(0x8f)](new Error(_0x504636[_0x2aa633(0xa9)][_0x2aa633(0x95)]||_0x2aa633(0xba))));}}}catch(_0x28a922){console['error'](_0x2aa633(0xa5),_0x28a922);}}),_0x2abbc1['on'](_0x3e55de(0xaa),()=>{const _0x4e6b55=_0x3e55de;_0x2d5ab5&&sessions['delete'](_0x2d5ab5[_0x4e6b55(0x9a)]);}),_0x2abbc1['on'](_0x3e55de(0x95),_0x200763=>{console['error']('WebSocket\x20error:',_0x200763);});}),server['on']('error',_0x7aaa93=>{const _0xb68357=_0x30f90;_0x7aaa93['code']!==_0xb68357(0xb3)&&a2_0x2fe297[_0xb68357(0x95)]('Browser\x20server\x20error:\x20'+_0x7aaa93[_0xb68357(0xac)]),_0x22bb8b(![]);});}catch(_0x285822){_0x285822[_0x30f90(0x9d)]!==_0x30f90(0xb3)&&a2_0x2fe297[_0x30f90(0x95)](_0x30f90(0x86)+_0x285822[_0x30f90(0xac)]),_0x22bb8b(![]);}});}export function stopBrowserServer(){const _0x4152d4=a2_0x5b63;server&&(sessions['clear'](),pendingRequests[_0x4152d4(0x87)](({timeout:_0x3a2838,reject:_0x1acd4f})=>{const _0x537c20=_0x4152d4;clearTimeout(_0x3a2838),_0x1acd4f(new Error(_0x537c20(0xb4)));}),pendingRequests[_0x4152d4(0xab)](),server[_0x4152d4(0xaa)](),server=null,isRunning=![],a2_0x2fe297[_0x4152d4(0x9b)](_0x4152d4(0xa2)));}export function isBrowserServerRunning(){return isRunning;}export async function sendBrowserCommand(_0x2f63dc,_0x54664f={},_0x46e05f=0x7530){const _0x4e7c7c=a2_0x5b63;if(!isRunning)throw new Error(_0x4e7c7c(0x98));const _0x48259e=Array['from'](sessions['values']())[0x0];if(!_0x48259e)throw new Error('No\x20browser\x20extension\x20connected');const _0x2338d5=generateRequestId();return new Promise((_0x5e82ed,_0x7c1bd)=>{const _0x52df54=_0x4e7c7c,_0x3e3776=setTimeout(()=>{const _0x171cb8=a2_0x5b63;pendingRequests['delete'](_0x2338d5),_0x7c1bd(new Error(_0x171cb8(0x8b)+_0x46e05f+'ms'));},_0x46e05f);pendingRequests[_0x52df54(0x9e)](_0x2338d5,{'resolve':_0x5e82ed,'reject':_0x7c1bd,'timeout':_0x3e3776});const _0x45b73c={'requestId':_0x2338d5,'command':_0x2f63dc,'args':_0x54664f};_0x48259e['ws'][_0x52df54(0x99)](JSON[_0x52df54(0xbd)](_0x45b73c));});}function generateRequestId(){const _0x402503=a2_0x5b63;return'req_'+Date[_0x402503(0x88)]()+'_'+Math['random']()[_0x402503(0xb0)](0x24)[_0x402503(0x9f)](0x2,0x9);}export function getConnectedSessions(){return Array['from'](sessions['values']());}
|
package/dist/browser/tools.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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>;
|