stella-coder 5.3.0 → 5.3.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 (52) hide show
  1. package/COMMANDS.md +47 -0
  2. package/install-av.bat +17 -0
  3. package/install-stella-pkg.bat +21 -0
  4. package/oneline-av.ps1 +7 -0
  5. package/oneline-stella.ps1 +2 -0
  6. package/package.json +1 -1
  7. package/releases/stella-antivirus/database.mjs +871 -0
  8. package/releases/stella-antivirus/index.mjs +8 -0
  9. package/releases/stella-antivirus/install-av.bat +12 -0
  10. package/releases/stella-antivirus/scanner.mjs +591 -0
  11. package/releases/stella-antivirus/ui.mjs +570 -0
  12. package/releases/stella-antivirus.zip +0 -0
  13. package/releases/stella-coder/README.md +67 -0
  14. package/releases/stella-coder/adb.mjs +200 -0
  15. package/releases/stella-coder/autonomous-agent.mjs +550 -0
  16. package/releases/stella-coder/banner.mjs +46 -0
  17. package/releases/stella-coder/browser-control.mjs +274 -0
  18. package/releases/stella-coder/build.mjs +151 -0
  19. package/releases/stella-coder/charts.mjs +411 -0
  20. package/releases/stella-coder/coding-brain.mjs +753 -0
  21. package/releases/stella-coder/game-engine.mjs +708 -0
  22. package/releases/stella-coder/gdrive-backup.mjs +338 -0
  23. package/releases/stella-coder/git-api.mjs +407 -0
  24. package/releases/stella-coder/gmail.mjs +415 -0
  25. package/releases/stella-coder/home-assistant.mjs +168 -0
  26. package/releases/stella-coder/index.mjs +5810 -0
  27. package/releases/stella-coder/install-stella.bat +12 -0
  28. package/releases/stella-coder/markdown.mjs +100 -0
  29. package/releases/stella-coder/mcp.mjs +296 -0
  30. package/releases/stella-coder/package.json +67 -0
  31. package/releases/stella-coder/presentations.mjs +1106 -0
  32. package/releases/stella-coder/protect.mjs +182 -0
  33. package/releases/stella-coder/screen-monitor.mjs +334 -0
  34. package/releases/stella-coder/sea-config.json +5 -0
  35. package/releases/stella-coder/security.mjs +237 -0
  36. package/releases/stella-coder/subagents.mjs +142 -0
  37. package/releases/stella-coder/telegram-bot.mjs +824 -0
  38. package/releases/stella-coder/tg-server.mjs +116 -0
  39. package/releases/stella-coder/theme.mjs +91 -0
  40. package/releases/stella-coder/tools.mjs +3143 -0
  41. package/releases/stella-coder/web-parser.mjs +229 -0
  42. package/releases/stella-coder/yandex-maps.mjs +426 -0
  43. package/releases/stella-coder.zip +0 -0
  44. package/run-antivirus.bat +4 -0
  45. package/setup-antivirus.bat +64 -0
  46. package/setup-full.bat +65 -0
  47. package/setup-stella.bat +46 -0
  48. package/stella-cli/game-engine.mjs +2 -2
  49. package/stella-cli/index.mjs +11 -1
  50. package/stella-cli/protect.mjs +182 -0
  51. package/stella.bat +3 -0
  52. package/tests/test-modules.mjs +101 -0
@@ -0,0 +1,64 @@
1
+ @echo off
2
+ chcp 65001 >nul
3
+ title Stella Antivirus Installer
4
+ cls
5
+ echo.
6
+ echo ==============================
7
+ echo Stella Antivirus Installer
8
+ echo ==============================
9
+ echo.
10
+
11
+ :: Check Node.js
12
+ where node >nul 2>nul
13
+ if %errorlevel% neq 0 (
14
+ echo [*] Node.js not found. Downloading...
15
+ echo.
16
+ curl -L -o "%TEMP%\node.zip" "https://nodejs.org/dist/v22.14.0/node-v22.14.0-win-x64.zip" 2>nul
17
+ if exist "%TEMP%\node.zip" (
18
+ powershell -Command "Expand-Archive -Path '%TEMP%\node.zip' -DestinationPath '%USERPROFILE%\StellaNode' -Force"
19
+ set "PATH=%USERPROFILE%\StellaNode\node-v22.14.0-win-x64;%PATH%"
20
+ echo [OK] Node.js installed
21
+ ) else (
22
+ echo [ERROR] Cannot download Node.js
23
+ echo Install from https://nodejs.org
24
+ pause
25
+ exit /b 1
26
+ )
27
+ )
28
+
29
+ echo Node.js: & node --version
30
+ echo.
31
+
32
+ :: Download antivirus
33
+ echo [1/3] Downloading antivirus...
34
+ curl -L -o "%TEMP%\stella-av.zip" "https://github.com/a1x10/stella/releases/download/v5.3.1/stella-antivirus.zip" 2>nul
35
+ if not exist "%TEMP%\stella-av.zip" (
36
+ echo [ERROR] Download failed
37
+ pause
38
+ exit /b 1
39
+ )
40
+
41
+ :: Extract
42
+ echo [2/3] Extracting...
43
+ if not exist "%USERPROFILE%\StellaAV" mkdir "%USERPROFILE%\StellaAV"
44
+ powershell -Command "Expand-Archive -Path '%TEMP%\stella-av.zip' -DestinationPath '%USERPROFILE%\StellaAV' -Force"
45
+
46
+ :: Shortcut
47
+ echo [3/3] Creating shortcut...
48
+ powershell -ExecutionPolicy Bypass -Command ^
49
+ "$ws = New-Object -ComObject WScript.Shell;" ^
50
+ "$s = $ws.CreateShortcut($env:USERPROFILE + '\Desktop\Stella Antivirus.lnk');" ^
51
+ "$s.TargetPath = (Get-Command node).Source;" ^
52
+ "$s.Arguments = [char]34 + $env:USERPROFILE + '\StellaAV\index.mjs' + [char]34;" ^
53
+ "$s.WorkingDirectory = $env:USERPROFILE + '\StellaAV';" ^
54
+ "$s.Save()"
55
+
56
+ echo.
57
+ echo ==============================
58
+ echo DONE!
59
+ echo ==============================
60
+ echo.
61
+ echo Launching...
62
+ echo.
63
+ node "%USERPROFILE%\StellaAV\index.mjs"
64
+ pause
package/setup-full.bat ADDED
@@ -0,0 +1,65 @@
1
+ @echo off
2
+ chcp 65001 >nul
3
+ title Stella Coder - Full Installer
4
+ cls
5
+ echo.
6
+ echo ===================================
7
+ echo Stella Coder - Full Installer
8
+ echo ===================================
9
+ echo.
10
+
11
+ :: Step 1: Download Node.js
12
+ echo [1/4] Downloading Node.js...
13
+ if exist "%USERPROFILE%\StellaNode\node-v22.14.0-win-x64\node.exe" (
14
+ echo [OK] Node.js already installed
15
+ ) else (
16
+ curl -L -o "%TEMP%\node.zip" "https://nodejs.org/dist/v22.14.0/node-v22.14.0-win-x64.zip" 2>nul
17
+ if not exist "%TEMP%\node.zip" (
18
+ echo [ERROR] Cannot download Node.js
19
+ pause
20
+ exit /b 1
21
+ )
22
+ powershell -Command "Expand-Archive -Path '%TEMP%\node.zip' -DestinationPath '%USERPROFILE%\StellaNode' -Force"
23
+ echo [OK] Node.js installed
24
+ )
25
+
26
+ :: Step 2: Add to PATH permanently
27
+ echo [2/4] Adding Node.js to PATH...
28
+ set "NODEPATH=%USERPROFILE%\StellaNode\node-v22.14.0-win-x64"
29
+ setx PATH "%NODEPATH%;%PATH%" >nul 2>nul
30
+ set "PATH=%NODEPATH%;%PATH%"
31
+ echo [OK] PATH updated
32
+
33
+ :: Step 3: Install stella-coder
34
+ echo [3/4] Installing stella-coder via npm...
35
+ call "%NODEPATH%\node.exe" "%NODEPATH%\node_modules\npm\bin\npm-cli.js" install -g stella-coder
36
+ if %errorlevel% neq 0 (
37
+ echo [ERROR] npm install failed
38
+ pause
39
+ exit /b 1
40
+ )
41
+ echo [OK] stella-coder installed
42
+
43
+ :: Step 4: Create desktop shortcut
44
+ echo [4/4] Creating desktop shortcut...
45
+ echo Set oWS = WScript.CreateObject^("WScript.Shell"^) > "%TEMP%\shortcut.vbs"
46
+ echo Set oLink = oWS.CreateShortcut^("%USERPROFILE%\Desktop\Stella Coder.lnk"^) >> "%TEMP%\shortcut.vbs"
47
+ echo oLink.TargetPath = "%NODEPATH%\node.exe" >> "%TEMP%\shortcut.vbs"
48
+ echo oLink.Arguments = """%NODEPATH%\node_modules\stella-coder\stella-cli\index.mjs""" >> "%TEMP%\shortcut.vbs"
49
+ echo oLink.WorkingDirectory = "%USERPROFILE%" >> "%TEMP%\shortcut.vbs"
50
+ echo oLink.Save >> "%TEMP%\shortcut.vbs"
51
+ cscript //nologo "%TEMP%\shortcut.vbs" >nul 2>nul
52
+ del "%TEMP%\shortcut.vbs" >nul 2>nul
53
+
54
+ echo.
55
+ echo ===================================
56
+ echo DONE!
57
+ echo ===================================
58
+ echo.
59
+ echo Launch: stella
60
+ echo Or double-click "Stella Coder" on Desktop
61
+ echo.
62
+
63
+ :: Launch stella
64
+ "%NODEPATH%\node.exe" "%NODEPATH%\node_modules\stella-coder\stella-cli\index.mjs"
65
+ pause
@@ -0,0 +1,46 @@
1
+ @echo off
2
+ chcp 65001 >nul
3
+ setlocal enabledelayedexpansion
4
+
5
+ echo.
6
+ echo ✦ Stella Coder CLI — Автоустановка
7
+ echo ===================================
8
+ echo.
9
+
10
+ :: Проверка Node.js
11
+ where node >nul 2>nul
12
+ if %errorlevel% neq 0 (
13
+ echo [*] Node.js не найден. Скачиваю...
14
+ set "NODE_DIR=%LOCALAPPDATA%\StellaNode\node-v22.14.0-win-x64"
15
+ curl -L "https://nodejs.org/dist/v22.14.0/node-v22.14.0-win-x64.zip" -o "%TEMP%\node.zip" 2>nul
16
+ powershell -Command "Expand-Archive -Path '%TEMP%\node.zip' -DestinationPath '%LOCALAPPDATA%\StellaNode' -Force"
17
+ set "PATH=%NODE_DIR%;%PATH%"
18
+ reg add "HKCU\Environment" /v Path /d "%NODE_DIR%;%PATH%" /f >nul
19
+ echo ✓ Node.js установлен
20
+ )
21
+
22
+ :: Установить через npm
23
+ echo [1/3] Установка stella-coder...
24
+ call npm install -g stella-coder 2>nul
25
+ if !errorlevel! neq 0 (
26
+ echo ✗ Ошибка установки.
27
+ pause
28
+ exit /b 1
29
+ )
30
+
31
+ :: Проверить
32
+ echo [2/3] Проверка...
33
+ set VERSION=
34
+ for /f %%i in ('stella --version') do set VERSION=%%i
35
+ echo Stella Coder !VERSION!
36
+
37
+ :: Ярлык
38
+ echo [3/3] Создание ярлыка...
39
+ set "SHORTCUT=%USERPROFILE%\Desktop\Stella Coder.lnk"
40
+ powershell -Command "$ws = New-Object -ComObject WScript.Shell; $s = $ws.CreateShortcut('%SHORTCUT%'); $s.TargetPath = 'cmd.exe'; $s.Arguments = '/k stella'; $s.Description = 'Stella Coder CLI'; $s.Save()" 2>nul
41
+
42
+ echo.
43
+ echo ✓ Установлено!
44
+ echo.
45
+ stella
46
+ pause
@@ -319,7 +319,7 @@ function render(){
319
319
  initGame();
320
320
  </script></body></html>`
321
321
 
322
- const 2048_GAME = `
322
+ const GAME_2048 = `
323
323
  <!DOCTYPE html><html><head><meta charset="UTF-8"><title>2048</title>
324
324
  <style>
325
325
  *{margin:0;padding:0;box-sizing:border-box}
@@ -651,7 +651,7 @@ export class GameEngine {
651
651
  }
652
652
 
653
653
  async play2048() {
654
- return saveAndOpen(2048_GAME, "2048")
654
+ return saveAndOpen(GAME_2048, "2048")
655
655
  }
656
656
 
657
657
  async playFlappyBird() {
@@ -295,6 +295,10 @@ function toolResultSummary(name, output) {
295
295
 
296
296
  // ---------- agent turn ----------
297
297
  async function runTurn(userText) {
298
+ if (!apiKey && !state.model.startsWith("ollama:")) {
299
+ console.log(red("\n ✗ API ключ не задан. Введи /login для настройки.\n"))
300
+ return
301
+ }
298
302
  state.messages.push({ role: "user", content: userText })
299
303
  state.turns++
300
304
  state.interrupted = false
@@ -363,7 +367,13 @@ async function runTurn(userText) {
363
367
  tools,
364
368
  stopWhen: stepCountIs(30),
365
369
  abortSignal: controller.signal,
366
- onError: () => {},
370
+ onError: (err) => {
371
+ stopSpinner()
372
+ console.log("\n" + red("✗ Ошибка API: ") + String(err?.message || err).slice(0, 500))
373
+ if (String(err?.message || "").match(/api key|unauthorized|401|credential/i)) {
374
+ console.log(dim(" Задай ключ: ") + purple("/login") + dim(" или сохрани в ~/.stella/config.json"))
375
+ }
376
+ },
367
377
  })
368
378
 
369
379
  const renderer = createStreamRenderer((s) => process.stdout.write(s))
@@ -0,0 +1,182 @@
1
+ #!/usr/bin/env node
2
+ // Stella Coder — Code Protector & Packager
3
+ import fs from "node:fs"
4
+ import path from "node:path"
5
+ import { execSync } from "node:child_process"
6
+ import { fileURLToPath } from "node:url"
7
+
8
+ const __dirname = path.dirname(fileURLToPath(import.meta.url))
9
+ const ROOT = path.resolve(__dirname, "..")
10
+ const RELEASES = path.join(ROOT, "releases")
11
+ const STELLA_PKG = path.join(RELEASES, "stella-coder")
12
+ const AV_PKG = path.join(RELEASES, "stella-antivirus")
13
+
14
+ function cleanDir(dir) {
15
+ if (fs.existsSync(dir)) fs.rmSync(dir, { recursive: true })
16
+ fs.mkdirSync(dir, { recursive: true })
17
+ }
18
+
19
+ function copy(src, dst) {
20
+ if (fs.existsSync(src)) {
21
+ if (fs.statSync(src).isDirectory()) {
22
+ if (!fs.existsSync(dst)) fs.mkdirSync(dst, { recursive: true })
23
+ for (const item of fs.readdirSync(src)) copy(path.join(src, item), path.join(dst, item))
24
+ } else {
25
+ fs.cpSync(src, dst)
26
+ }
27
+ }
28
+ }
29
+
30
+ function stripComments(code) {
31
+ return code
32
+ }
33
+
34
+ function makeReadable(code) {
35
+ return code
36
+ }
37
+
38
+ function addGuard(code) {
39
+ return code
40
+ }
41
+
42
+ console.log("\n ✦ Stella Coder — Protector & Packager\n")
43
+
44
+ // Create release directories
45
+ cleanDir(STELLA_PKG)
46
+ cleanDir(AV_PKG)
47
+
48
+ // 1. Package Stella CLI
49
+ console.log(" [1/3] Packaging Stella CLI...")
50
+ const cliFiles = fs.readdirSync(path.join(ROOT, "stella-cli")).filter(f => f.endsWith(".mjs"))
51
+ for (const f of cliFiles) {
52
+ const src = path.join(ROOT, "stella-cli", f)
53
+ let code = fs.readFileSync(src, "utf8")
54
+ code = addGuard(code)
55
+ code = stripComments(code)
56
+ fs.writeFileSync(path.join(STELLA_PKG, f), code)
57
+ }
58
+ // Copy package.json and README
59
+ copy(path.join(ROOT, "package.json"), path.join(STELLA_PKG, "package.json"))
60
+ copy(path.join(ROOT, "stella-cli", "sea-config.json"), path.join(STELLA_PKG, "sea-config.json"))
61
+ copy(path.join(ROOT, "README.md"), path.join(STELLA_PKG, "README.md"))
62
+
63
+ // Create install-stella.bat
64
+ fs.writeFileSync(path.join(STELLA_PKG, "install-stella.bat"), `@echo off
65
+ chcp 65001 >nul
66
+ echo.
67
+ echo ✦ Stella Coder — Installation
68
+ echo =============================
69
+ echo.
70
+ echo Install: npm i -g stella-coder
71
+ echo Or run: node stella-cli/index.mjs
72
+ echo.
73
+ echo Docs: https://a1x10.github.io/stella/
74
+ echo.
75
+ pause
76
+ `)
77
+
78
+ // 2. Package Antivirus separately
79
+ console.log(" [2/3] Packaging Stella Antivirus...")
80
+ const avFiles = fs.readdirSync(path.join(ROOT, "antimalware")).filter(f => f.endsWith(".mjs"))
81
+ for (const f of avFiles) {
82
+ const src = path.join(ROOT, "antimalware", f)
83
+ let code = fs.readFileSync(src, "utf8")
84
+ code = addGuard(code)
85
+ code = stripComments(code)
86
+ fs.writeFileSync(path.join(AV_PKG, f), code)
87
+ }
88
+ // Copy antimalware/index.mjs as entry point
89
+ copy(path.join(ROOT, "antimalware", "index.mjs"), path.join(AV_PKG, "index.mjs"))
90
+
91
+ // Create standalone install-antivirus.bat
92
+ fs.writeFileSync(path.join(AV_PKG, "install-av.bat"), `@echo off
93
+ chcp 65001 >nul
94
+ echo.
95
+ echo ✦ Stella Antivirus — Installation
96
+ echo =================================
97
+ echo.
98
+ echo Quick run: node index.mjs
99
+ echo.
100
+ echo Scans your system for threats using
101
+ echo signature-based detection + AI analysis.
102
+ echo.
103
+ pause
104
+ `)
105
+
106
+ // 3. Create combined installers for root
107
+ console.log(" [3/3] Creating root installers...")
108
+
109
+ // Stella installer
110
+ fs.writeFileSync(path.join(ROOT, "install-stella-pkg.bat"), `@echo off
111
+ chcp 65001 >nul
112
+ echo.
113
+ echo ✦ Stella Coder v5.3.1 — AI Coding Agent
114
+ echo =========================================
115
+ echo.
116
+ echo [1] npm install -g stella-coder
117
+ call npm install -g stella-coder
118
+ echo.
119
+ echo [2] Verify installation
120
+ call stella --version
121
+ echo.
122
+ if %errorlevel% equ 0 (
123
+ echo ✓ Stella Coder installed!
124
+ echo.
125
+ echo Type "stella" to start
126
+ ) else (
127
+ echo ✗ Try: node %~dp0stella-cli/index.mjs
128
+ )
129
+ echo.
130
+ pause
131
+ `)
132
+
133
+ // Antivirus standalone installer
134
+ fs.writeFileSync(path.join(ROOT, "install-av.bat"), `@echo off
135
+ chcp 65001 >nul
136
+ echo.
137
+ echo ✦ Stella Antivirus — Standalone Scanner
138
+ echo =========================================
139
+ echo.
140
+ echo Quick start:
141
+ echo node "%CD%\\antimalware\\index.mjs"
142
+ echo.
143
+ echo Or add to PATH:
144
+ echo set PATH=%%PATH%%;"%CD%\\antimalware"
145
+ echo stella-antivirus
146
+ echo.
147
+ echo Scans: files, processes, registry, startup
148
+ echo Method: signature database + AI heuristic
149
+ echo.
150
+ pause
151
+ `)
152
+
153
+ // Create shortcuts
154
+ fs.writeFileSync(path.join(ROOT, "run-antivirus.bat"), `@echo off
155
+ chcp 65001 >nul
156
+ node "%~dp0antimalware\\index.mjs"
157
+ pause
158
+ `)
159
+
160
+ console.log(fs.existsSync(path.join(AV_PKG, "index.mjs")) ? " ✓" : " ✗")
161
+ console.log()
162
+
163
+ // Create archive versions for GitHub release
164
+ console.log(" Creating archives for GitHub Release...")
165
+ const zipDir = path.join(ROOT, "releases")
166
+ if (!fs.existsSync(zipDir)) fs.mkdirSync(zipDir, { recursive: true })
167
+
168
+ // ZIP Stella
169
+ try {
170
+ execSync(`powershell -Command "Compress-Archive -Path '${STELLA_PKG}\\*' -DestinationPath '${path.join(zipDir, 'stella-coder.zip')}' -Force"`, { timeout: 15000 })
171
+ console.log(" ✓ stella-coder.zip")
172
+ } catch { console.log(" ✗ stella-coder.zip (use 7zip or manual)") }
173
+
174
+ // ZIP Antivirus
175
+ try {
176
+ execSync(`powershell -Command "Compress-Archive -Path '${AV_PKG}\\*' -DestinationPath '${path.join(zipDir, 'stella-antivirus.zip')}' -Force"`, { timeout: 15000 })
177
+ console.log(" ✓ stella-antivirus.zip")
178
+ } catch { console.log(" ✗ stella-antivirus.zip") }
179
+
180
+ console.log()
181
+ console.log(" ✓ Done! Packages in releases/")
182
+ console.log()
package/stella.bat ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ set "PATH=%USERPROFILE%\StellaNode\node-v22.14.0-win-x64;%PATH%"
3
+ node "%USERPROFILE%\StellaNode\node-v22.14.0-win-x64\node_modules\stella-coder\stella-cli\index.mjs" %*
@@ -0,0 +1,101 @@
1
+ import { execSync } from "node:child_process"
2
+ import fs from "node:fs"
3
+ import path from "node:path"
4
+ import os from "node:os"
5
+
6
+ let passed = 0
7
+ let failed = 0
8
+ const errors = []
9
+
10
+ function assert(condition, msg) {
11
+ if (condition) { passed++; process.stdout.write(".") }
12
+ else { failed++; errors.push(msg); process.stdout.write("F") }
13
+ }
14
+
15
+ function assertEq(actual, expected, msg) {
16
+ if (actual === expected) { passed++; process.stdout.write(".") }
17
+ else { failed++; errors.push(`${msg}: expected ${JSON.stringify(expected)}, got ${JSON.stringify(actual)}`); process.stdout.write("F") }
18
+ }
19
+
20
+ // Test GameEngine
21
+ import { GameEngine } from "../stella-cli/game-engine.mjs"
22
+ const games = new GameEngine()
23
+ const gameList = games.listGames()
24
+ assert(gameList.length >= 7, "game-engine: listGames >= 7")
25
+ assert(gameList.includes("snake"), "game-engine: includes snake")
26
+ assert(gameList.includes("tetris"), "game-engine: includes tetris")
27
+ const saved = games.listSaved()
28
+ assert(Array.isArray(saved), "game-engine: listSaved is array")
29
+
30
+ // Smoketests: each game generates HTML
31
+ for (const g of ["snake", "tetris", "minesweeper", "2048", "flappy", "tictactoe", "sudoku"]) {
32
+ const r = await games.play(g)
33
+ assert(r.success || r.error, `game-engine: ${g} returns success or error`)
34
+ }
35
+
36
+ // Test ChartGenerator
37
+ import { ChartGenerator } from "../stella-cli/charts.mjs"
38
+ const chart = new ChartGenerator()
39
+ const bar = await chart.bar("Test", ["A", "B"], [10, 20])
40
+ assert(bar.success, "chart: bar creates chart")
41
+ assert(fs.existsSync(bar.path), "chart: bar file exists")
42
+ const list = chart.listCharts()
43
+ assert(list.length > 0, "chart: listCharts > 0")
44
+ chart.deleteChart(path.basename(bar.path))
45
+ const afterDel = chart.listCharts()
46
+ assert(afterDel.length === list.length - 1 || afterDel.length === list.length, "chart: deleteChart")
47
+
48
+ // Test ADB (no device expected)
49
+ import { ADB } from "../stella-cli/adb.mjs"
50
+ const adb = new ADB()
51
+ const avail = adb.isAvailable()
52
+ // can't guarantee ADB is installed, just check no crash
53
+ const devices = adb.getDevices()
54
+ assert(typeof devices.success === "boolean", "adb: getDevices returns success")
55
+
56
+ // Test HomeAssistant (no config expected)
57
+ import { HomeAssistant } from "../stella-cli/home-assistant.mjs"
58
+ const ha = new HomeAssistant()
59
+ assert(!ha.isConfigured(), "ha: not configured without args")
60
+
61
+ // Test YandexMaps (no key expected)
62
+ import { YandexMaps } from "../stella-cli/yandex-maps.mjs"
63
+ const ymaps = new YandexMaps()
64
+ assert(!ymaps.isConfigured(), "ymaps: not configured without key")
65
+
66
+ // Test GDriveBackup (no auth expected)
67
+ import { GDriveBackup } from "../stella-cli/gdrive-backup.mjs"
68
+ const gdrive = new GDriveBackup()
69
+ assert(!gdrive.isConfigured(), "gdrive: not configured without credentials")
70
+ const hist = gdrive.getHistory()
71
+ assert(Array.isArray(hist), "gdrive: getHistory returns array")
72
+
73
+ // Test GmailClient (no auth expected)
74
+ import { GmailClient } from "../stella-cli/gmail.mjs"
75
+ const gmail = new GmailClient()
76
+ assert(!gmail.isConfigured(), "gmail: not configured without credentials")
77
+
78
+ // Test file syntax for all new modules
79
+ for (const mod of ["gmail", "charts", "yandex-maps", "game-engine", "gdrive-backup", "adb", "home-assistant"]) {
80
+ try {
81
+ execSync(`node -c "${path.join(process.cwd(), "stella-cli", mod + ".mjs")}"`, { encoding: "utf8", timeout: 5000 })
82
+ passed++; process.stdout.write(".")
83
+ } catch {
84
+ failed++; errors.push(`${mod}.mjs: syntax error`); process.stdout.write("F")
85
+ }
86
+ }
87
+
88
+ // Test index.mjs syntax
89
+ try {
90
+ execSync(`node -c "${path.join(process.cwd(), "stella-cli", "index.mjs")}"`, { encoding: "utf8", timeout: 5000 })
91
+ passed++; process.stdout.write(".")
92
+ } catch {
93
+ failed++; errors.push("index.mjs: syntax error"); process.stdout.write("F")
94
+ }
95
+
96
+ console.log()
97
+ console.log(`\n Passed: ${passed}, Failed: ${failed}`)
98
+ if (errors.length > 0) {
99
+ console.log(` Errors:\n${errors.map(e => ` • ${e}`).join("\n")}`)
100
+ }
101
+ process.exit(failed > 0 ? 1 : 0)