remoat 0.2.0
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/README.md +297 -0
- package/dist/bin/cli.d.ts +2 -0
- package/dist/bin/cli.js +80 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/bin/commands/doctor.d.ts +1 -0
- package/dist/bin/commands/doctor.js +211 -0
- package/dist/bin/commands/doctor.js.map +1 -0
- package/dist/bin/commands/open.d.ts +1 -0
- package/dist/bin/commands/open.js +187 -0
- package/dist/bin/commands/open.js.map +1 -0
- package/dist/bin/commands/setup.d.ts +1 -0
- package/dist/bin/commands/setup.js +267 -0
- package/dist/bin/commands/setup.js.map +1 -0
- package/dist/bin/commands/start.d.ts +2 -0
- package/dist/bin/commands/start.js +39 -0
- package/dist/bin/commands/start.js.map +1 -0
- package/dist/bot/index.d.ts +2 -0
- package/dist/bot/index.js +1393 -0
- package/dist/bot/index.js.map +1 -0
- package/dist/commands/chatCommandHandler.d.ts +20 -0
- package/dist/commands/chatCommandHandler.js +30 -0
- package/dist/commands/chatCommandHandler.js.map +1 -0
- package/dist/commands/cleanupCommandHandler.d.ts +21 -0
- package/dist/commands/cleanupCommandHandler.js +40 -0
- package/dist/commands/cleanupCommandHandler.js.map +1 -0
- package/dist/commands/joinCommandHandler.d.ts +19 -0
- package/dist/commands/joinCommandHandler.js +27 -0
- package/dist/commands/joinCommandHandler.js.map +1 -0
- package/dist/commands/messageParser.d.ts +7 -0
- package/dist/commands/messageParser.js +29 -0
- package/dist/commands/messageParser.js.map +1 -0
- package/dist/commands/slashCommandHandler.d.ts +21 -0
- package/dist/commands/slashCommandHandler.js +105 -0
- package/dist/commands/slashCommandHandler.js.map +1 -0
- package/dist/commands/workspaceCommandHandler.d.ts +16 -0
- package/dist/commands/workspaceCommandHandler.js +29 -0
- package/dist/commands/workspaceCommandHandler.js.map +1 -0
- package/dist/database/chatSessionRepository.d.ts +59 -0
- package/dist/database/chatSessionRepository.js +110 -0
- package/dist/database/chatSessionRepository.js.map +1 -0
- package/dist/database/scheduleRepository.d.ts +60 -0
- package/dist/database/scheduleRepository.js +106 -0
- package/dist/database/scheduleRepository.js.map +1 -0
- package/dist/database/templateRepository.d.ts +51 -0
- package/dist/database/templateRepository.js +90 -0
- package/dist/database/templateRepository.js.map +1 -0
- package/dist/database/workspaceBindingRepository.d.ts +48 -0
- package/dist/database/workspaceBindingRepository.js +92 -0
- package/dist/database/workspaceBindingRepository.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/auth.d.ts +5 -0
- package/dist/middleware/auth.js +14 -0
- package/dist/middleware/auth.js.map +1 -0
- package/dist/middleware/sanitize.d.ts +1 -0
- package/dist/middleware/sanitize.js +18 -0
- package/dist/middleware/sanitize.js.map +1 -0
- package/dist/services/antigravityLauncher.d.ts +7 -0
- package/dist/services/antigravityLauncher.js +94 -0
- package/dist/services/antigravityLauncher.js.map +1 -0
- package/dist/services/approvalDetector.d.ts +97 -0
- package/dist/services/approvalDetector.js +394 -0
- package/dist/services/approvalDetector.js.map +1 -0
- package/dist/services/assistantDomExtractor.d.ts +49 -0
- package/dist/services/assistantDomExtractor.js +340 -0
- package/dist/services/assistantDomExtractor.js.map +1 -0
- package/dist/services/autoAcceptService.d.ts +14 -0
- package/dist/services/autoAcceptService.js +81 -0
- package/dist/services/autoAcceptService.js.map +1 -0
- package/dist/services/cdpBridgeManager.d.ts +50 -0
- package/dist/services/cdpBridgeManager.js +355 -0
- package/dist/services/cdpBridgeManager.js.map +1 -0
- package/dist/services/cdpConnectionPool.d.ts +88 -0
- package/dist/services/cdpConnectionPool.js +235 -0
- package/dist/services/cdpConnectionPool.js.map +1 -0
- package/dist/services/cdpService.d.ts +214 -0
- package/dist/services/cdpService.js +1423 -0
- package/dist/services/cdpService.js.map +1 -0
- package/dist/services/chatSessionService.d.ts +89 -0
- package/dist/services/chatSessionService.js +738 -0
- package/dist/services/chatSessionService.js.map +1 -0
- package/dist/services/errorPopupDetector.d.ts +89 -0
- package/dist/services/errorPopupDetector.js +274 -0
- package/dist/services/errorPopupDetector.js.map +1 -0
- package/dist/services/modeService.d.ts +44 -0
- package/dist/services/modeService.js +74 -0
- package/dist/services/modeService.js.map +1 -0
- package/dist/services/modelService.d.ts +36 -0
- package/dist/services/modelService.js +64 -0
- package/dist/services/modelService.js.map +1 -0
- package/dist/services/planningDetector.d.ts +87 -0
- package/dist/services/planningDetector.js +321 -0
- package/dist/services/planningDetector.js.map +1 -0
- package/dist/services/processManager.d.ts +18 -0
- package/dist/services/processManager.js +62 -0
- package/dist/services/processManager.js.map +1 -0
- package/dist/services/progressSender.d.ts +20 -0
- package/dist/services/progressSender.js +65 -0
- package/dist/services/progressSender.js.map +1 -0
- package/dist/services/promptDispatcher.d.ts +38 -0
- package/dist/services/promptDispatcher.js +42 -0
- package/dist/services/promptDispatcher.js.map +1 -0
- package/dist/services/quotaService.d.ts +21 -0
- package/dist/services/quotaService.js +191 -0
- package/dist/services/quotaService.js.map +1 -0
- package/dist/services/responseMonitor.d.ts +129 -0
- package/dist/services/responseMonitor.js +996 -0
- package/dist/services/responseMonitor.js.map +1 -0
- package/dist/services/scheduleService.d.ts +58 -0
- package/dist/services/scheduleService.js +135 -0
- package/dist/services/scheduleService.js.map +1 -0
- package/dist/services/screenshotService.d.ts +55 -0
- package/dist/services/screenshotService.js +86 -0
- package/dist/services/screenshotService.js.map +1 -0
- package/dist/services/telegramTopicManager.d.ts +40 -0
- package/dist/services/telegramTopicManager.js +103 -0
- package/dist/services/telegramTopicManager.js.map +1 -0
- package/dist/services/titleGeneratorService.d.ts +32 -0
- package/dist/services/titleGeneratorService.js +114 -0
- package/dist/services/titleGeneratorService.js.map +1 -0
- package/dist/services/updateCheckService.d.ts +16 -0
- package/dist/services/updateCheckService.js +148 -0
- package/dist/services/updateCheckService.js.map +1 -0
- package/dist/services/userMessageDetector.d.ts +57 -0
- package/dist/services/userMessageDetector.js +222 -0
- package/dist/services/userMessageDetector.js.map +1 -0
- package/dist/services/workspaceService.d.ts +33 -0
- package/dist/services/workspaceService.js +65 -0
- package/dist/services/workspaceService.js.map +1 -0
- package/dist/ui/autoAcceptUi.d.ts +6 -0
- package/dist/ui/autoAcceptUi.js +22 -0
- package/dist/ui/autoAcceptUi.js.map +1 -0
- package/dist/ui/modeUi.d.ts +12 -0
- package/dist/ui/modeUi.js +40 -0
- package/dist/ui/modeUi.js.map +1 -0
- package/dist/ui/modelsUi.d.ts +12 -0
- package/dist/ui/modelsUi.js +101 -0
- package/dist/ui/modelsUi.js.map +1 -0
- package/dist/ui/projectListUi.d.ts +11 -0
- package/dist/ui/projectListUi.js +59 -0
- package/dist/ui/projectListUi.js.map +1 -0
- package/dist/ui/screenshotUi.d.ts +6 -0
- package/dist/ui/screenshotUi.js +28 -0
- package/dist/ui/screenshotUi.js.map +1 -0
- package/dist/ui/sessionPickerUi.d.ts +8 -0
- package/dist/ui/sessionPickerUi.js +32 -0
- package/dist/ui/sessionPickerUi.js.map +1 -0
- package/dist/ui/templateUi.d.ts +5 -0
- package/dist/ui/templateUi.js +44 -0
- package/dist/ui/templateUi.js.map +1 -0
- package/dist/utils/cdpPorts.d.ts +2 -0
- package/dist/utils/cdpPorts.js +6 -0
- package/dist/utils/cdpPorts.js.map +1 -0
- package/dist/utils/config.d.ts +14 -0
- package/dist/utils/config.js +12 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/configLoader.d.ts +23 -0
- package/dist/utils/configLoader.js +153 -0
- package/dist/utils/configLoader.js.map +1 -0
- package/dist/utils/htmlToTelegramMarkdown.d.ts +6 -0
- package/dist/utils/htmlToTelegramMarkdown.js +189 -0
- package/dist/utils/htmlToTelegramMarkdown.js.map +1 -0
- package/dist/utils/i18n.d.ts +3 -0
- package/dist/utils/i18n.js +78 -0
- package/dist/utils/i18n.js.map +1 -0
- package/dist/utils/imageHandler.d.ts +35 -0
- package/dist/utils/imageHandler.js +155 -0
- package/dist/utils/imageHandler.js.map +1 -0
- package/dist/utils/lockfile.d.ts +7 -0
- package/dist/utils/lockfile.js +117 -0
- package/dist/utils/lockfile.js.map +1 -0
- package/dist/utils/logger.d.ts +23 -0
- package/dist/utils/logger.js +85 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/logo.d.ts +1 -0
- package/dist/utils/logo.js +14 -0
- package/dist/utils/logo.js.map +1 -0
- package/dist/utils/metadataExtractor.d.ts +5 -0
- package/dist/utils/metadataExtractor.js +16 -0
- package/dist/utils/metadataExtractor.js.map +1 -0
- package/dist/utils/pathUtils.d.ts +23 -0
- package/dist/utils/pathUtils.js +58 -0
- package/dist/utils/pathUtils.js.map +1 -0
- package/dist/utils/processLogBuffer.d.ts +17 -0
- package/dist/utils/processLogBuffer.js +108 -0
- package/dist/utils/processLogBuffer.js.map +1 -0
- package/dist/utils/streamMessageFormatter.d.ts +18 -0
- package/dist/utils/streamMessageFormatter.js +91 -0
- package/dist/utils/streamMessageFormatter.js.map +1 -0
- package/dist/utils/telegramFormatter.d.ts +37 -0
- package/dist/utils/telegramFormatter.js +445 -0
- package/dist/utils/telegramFormatter.js.map +1 -0
- package/dist/utils/voiceHandler.d.ts +23 -0
- package/dist/utils/voiceHandler.js +169 -0
- package/dist/utils/voiceHandler.js.map +1 -0
- package/locales/en.json +85 -0
- package/locales/ja.json +109 -0
- package/package.json +84 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 optimistengineer
|
|
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/README.md
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
<h1 align="center">Remoat</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>Control your AI coding assistant from anywhere — right from Telegram.</strong>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://github.com/optimistengineer/Remoat/blob/main/LICENSE"><img src="https://img.shields.io/github/license/optimistengineer/Remoat?style=flat-square" alt="License" /></a>
|
|
9
|
+
<img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen?style=flat-square&logo=node.js" alt="Node.js" />
|
|
10
|
+
<img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey?style=flat-square" alt="Platform" />
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Remoat is a **local Telegram bot** that lets you remotely operate [Antigravity](https://antigravity.dev) IDE on your PC — from your phone, tablet, or any device with Telegram.
|
|
16
|
+
|
|
17
|
+
Type a natural-language instruction, attach a screenshot, or send a voice note. Remoat dispatches it to Antigravity via Chrome DevTools Protocol, monitors progress in real time, and streams results back to Telegram. Everything runs on your machine.
|
|
18
|
+
|
|
19
|
+
## Table of Contents
|
|
20
|
+
|
|
21
|
+
- [Quick Start](#quick-start)
|
|
22
|
+
- [Features](#features)
|
|
23
|
+
- [Advanced Setup](#advanced-setup)
|
|
24
|
+
- [Commands](#commands)
|
|
25
|
+
- [Troubleshooting](#troubleshooting)
|
|
26
|
+
- [How It Works](#how-it-works)
|
|
27
|
+
- [Project Structure](#project-structure)
|
|
28
|
+
- [Contributing](#contributing)
|
|
29
|
+
- [License](#license)
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### Prerequisites
|
|
34
|
+
|
|
35
|
+
- [Node.js](https://nodejs.org/) 18 or higher
|
|
36
|
+
- [Antigravity](https://antigravity.dev) installed on your machine
|
|
37
|
+
- A [Telegram](https://telegram.org/) account
|
|
38
|
+
|
|
39
|
+
<details>
|
|
40
|
+
<summary>macOS: you'll also need Xcode Command Line Tools</summary>
|
|
41
|
+
|
|
42
|
+
Remoat uses `better-sqlite3`, a native C++ module that requires a compiler. If you don't have Xcode CLI tools installed, run:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
xcode-select --install
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
You can verify they're installed with `xcode-select -p`.
|
|
49
|
+
|
|
50
|
+
</details>
|
|
51
|
+
|
|
52
|
+
### 1. Install Remoat
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install -g remoat
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 2. Run the setup wizard
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
remoat setup
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The wizard walks you through:
|
|
65
|
+
|
|
66
|
+
- **Telegram Bot Token** — Create a bot via [@BotFather](https://t.me/BotFather) on Telegram (`/newbot`), then copy the token it gives you
|
|
67
|
+
- **Allowed User IDs** — Only these Telegram users can control the bot. Message [@userinfobot](https://t.me/userinfobot) to get your ID
|
|
68
|
+
- **Workspace Directory** — The parent directory where your coding projects live (e.g. `~/Code`)
|
|
69
|
+
|
|
70
|
+
### 3. Launch Antigravity with CDP enabled
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
remoat open
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
> [!NOTE]
|
|
77
|
+
> If Antigravity is already running, quit it first and relaunch with `remoat open` — it needs the CDP debug port to be enabled.
|
|
78
|
+
|
|
79
|
+
### 4. Start the Telegram bot (in a new terminal)
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
remoat start
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
That's it. Open Telegram, find your bot, and start sending instructions.
|
|
86
|
+
|
|
87
|
+
<details>
|
|
88
|
+
<summary>Voice messages (optional): install the Whisper model</summary>
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx nodejs-whisper download
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This pulls `base.en` (~140 MB). Requires `cmake` (`brew install cmake` on macOS, `apt install cmake` on Linux).
|
|
95
|
+
|
|
96
|
+
</details>
|
|
97
|
+
|
|
98
|
+
> Having issues? Run `remoat doctor` to diagnose your setup.
|
|
99
|
+
|
|
100
|
+
## Features
|
|
101
|
+
|
|
102
|
+
**Remote control from anywhere** — Send natural-language prompts, images, or voice notes from your phone. Antigravity executes them on your PC with full local resources.
|
|
103
|
+
|
|
104
|
+
**Project isolation via Telegram Topics** — Each project maps to a Telegram Forum Topic. All messages within a topic automatically use the correct project directory and session history — no manual context switching needed.
|
|
105
|
+
|
|
106
|
+
**Real-time progress streaming** — Long-running tasks report progress in phases (sending, thinking, complete) with a live process log and elapsed timer, streamed as Telegram messages.
|
|
107
|
+
|
|
108
|
+
**Voice input** — Hold the mic button and speak. Remoat transcribes locally via [whisper.cpp](https://github.com/ggerganov/whisper.cpp) — no cloud APIs, no Telegram Premium required.
|
|
109
|
+
|
|
110
|
+
**Approval routing** — When Antigravity asks for confirmation (file edits, plan decisions), the dialog surfaces in Telegram with inline action buttons. Or toggle `/autoaccept` to approve automatically.
|
|
111
|
+
|
|
112
|
+
**Security by design** — Whitelist-based access control. Path traversal prevention. Credentials stored locally. No webhooks, no port exposure.
|
|
113
|
+
|
|
114
|
+
## Advanced Setup
|
|
115
|
+
|
|
116
|
+
### From source
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
git clone https://github.com/optimistengineer/Remoat.git
|
|
120
|
+
cd Remoat
|
|
121
|
+
npm install
|
|
122
|
+
cp .env.example .env
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Edit `.env` with your values:
|
|
126
|
+
|
|
127
|
+
```env
|
|
128
|
+
TELEGRAM_BOT_TOKEN=your_bot_token_here
|
|
129
|
+
ALLOWED_USER_IDS=123456789
|
|
130
|
+
WORKSPACE_BASE_DIR=~/Code
|
|
131
|
+
USE_TOPICS=true
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
> [!TIP]
|
|
135
|
+
> Alternatively, run `npm start -- setup` to use the interactive wizard instead of editing `.env` manually.
|
|
136
|
+
|
|
137
|
+
Then start the bot:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
npm run dev # development mode with auto-reload
|
|
141
|
+
# or
|
|
142
|
+
npm start # run from source
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Launching Antigravity with CDP
|
|
146
|
+
|
|
147
|
+
Remoat connects to Antigravity via Chrome DevTools Protocol. Launch Antigravity with a debug port enabled:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
remoat open # auto-selects an available port (9222, 9223, 9333, 9444, 9555, or 9666)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
From source, you can also use the bundled launcher scripts:
|
|
154
|
+
|
|
155
|
+
| Platform | Method |
|
|
156
|
+
|----------|--------|
|
|
157
|
+
| macOS | Double-click `start_antigravity_mac.command` (run `chmod +x` first time) |
|
|
158
|
+
| Windows | Double-click `start_antigravity_win.bat` |
|
|
159
|
+
| Linux | Set `ANTIGRAVITY_PATH=/path/to/antigravity` in `.env`, then `remoat open` |
|
|
160
|
+
|
|
161
|
+
> Launch Antigravity first, then start the bot. It connects automatically.
|
|
162
|
+
|
|
163
|
+
### Forum Topics (optional)
|
|
164
|
+
|
|
165
|
+
For multi-project workflows, Remoat supports Telegram Forum Topics — each project gets its own topic thread.
|
|
166
|
+
|
|
167
|
+
1. Create a Telegram supergroup and enable **Topics** in group settings
|
|
168
|
+
2. Add your bot to the group with admin permissions
|
|
169
|
+
3. Set `USE_TOPICS=true` in `.env` (this is the default)
|
|
170
|
+
|
|
171
|
+
For simpler setups, set `USE_TOPICS=false` and use the bot in a regular chat.
|
|
172
|
+
|
|
173
|
+
## Commands
|
|
174
|
+
|
|
175
|
+
### CLI
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
remoat auto-detect: runs setup if unconfigured, otherwise starts the bot
|
|
179
|
+
remoat setup interactive setup wizard
|
|
180
|
+
remoat open launch Antigravity with CDP port enabled
|
|
181
|
+
remoat start start the Telegram bot
|
|
182
|
+
remoat doctor diagnose configuration and connectivity issues
|
|
183
|
+
remoat --verbose show debug-level logs (CDP traffic, detector events)
|
|
184
|
+
remoat --quiet errors only
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Telegram
|
|
188
|
+
|
|
189
|
+
| Command | Description |
|
|
190
|
+
|---------|-------------|
|
|
191
|
+
| `/project` | Browse and select a project (inline keyboard) |
|
|
192
|
+
| `/new` | Start a new chat session in the current project |
|
|
193
|
+
| `/chat` | Show current session info and list all sessions |
|
|
194
|
+
| | |
|
|
195
|
+
| `/model [name]` | Switch the LLM model (e.g. `gemini-2.5-pro`, `claude-opus-4-6`) |
|
|
196
|
+
| `/mode` | Switch execution mode (`fast`, `plan`) |
|
|
197
|
+
| `/stop` | Force-stop a running Antigravity task |
|
|
198
|
+
| | |
|
|
199
|
+
| `/template` | List registered prompt templates with execute buttons |
|
|
200
|
+
| `/template_add <name> <prompt>` | Register a new prompt template |
|
|
201
|
+
| `/template_delete <name>` | Delete a template |
|
|
202
|
+
| | |
|
|
203
|
+
| `/screenshot` | Capture and send Antigravity's current screen |
|
|
204
|
+
| `/status` | Show connection status, active project, and current mode |
|
|
205
|
+
| `/autoaccept` | Toggle auto-approval of file edit dialogs |
|
|
206
|
+
| `/cleanup [days]` | Clean up inactive session topics (default: 7 days) |
|
|
207
|
+
| `/help` | Show available commands |
|
|
208
|
+
|
|
209
|
+
### Natural Language
|
|
210
|
+
|
|
211
|
+
Just type in any bound topic or direct chat:
|
|
212
|
+
|
|
213
|
+
> _refactor the auth components — see the attached screenshot for the target layout_
|
|
214
|
+
|
|
215
|
+
Or hold the mic button and speak — the voice note gets transcribed locally and sent as a prompt.
|
|
216
|
+
|
|
217
|
+
## Troubleshooting
|
|
218
|
+
|
|
219
|
+
Run diagnostics first:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
remoat doctor
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
This checks your config, Node.js version, Xcode tools (macOS), Antigravity installation, and CDP port connectivity.
|
|
226
|
+
|
|
227
|
+
**`npm install` fails with `gyp ERR!` on macOS** — Install Xcode Command Line Tools: `xcode-select --install`
|
|
228
|
+
|
|
229
|
+
**`remoat open` can't find Antigravity** — The app must be in `/Applications`. If you installed it elsewhere, set `ANTIGRAVITY_PATH` in your `.env` file or environment:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
export ANTIGRAVITY_PATH=/path/to/Antigravity
|
|
233
|
+
remoat open
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Bot not responding to messages** — Make sure Antigravity is running with CDP enabled (`remoat open`) before starting the bot. The bot will warn you on startup if no CDP ports are responding, but it continues running and auto-connects once Antigravity is available.
|
|
237
|
+
|
|
238
|
+
**CDP connection lost** — If you restart Antigravity, the bot auto-reconnects. Sending any message also triggers reconnection.
|
|
239
|
+
|
|
240
|
+
**Verbose logging:**
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
remoat --verbose # see CDP traffic, detector events, and internal state
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## How It Works
|
|
247
|
+
|
|
248
|
+
<p align="center">
|
|
249
|
+
<a href="https://excalidraw.com/#json=a54sSDUatTXGCtJORO7GJ,muz3R_zi4nbj9RKuRAfbEA">
|
|
250
|
+
<img src="docs/images/architecture.svg" alt="Remoat architecture diagram" width="700" />
|
|
251
|
+
</a>
|
|
252
|
+
</p>
|
|
253
|
+
|
|
254
|
+
1. You send a message in Telegram
|
|
255
|
+
2. Remoat authenticates it against your whitelist, resolves the project context, and injects the prompt into Antigravity via CDP
|
|
256
|
+
3. A response monitor polls Antigravity's DOM at 2-second intervals, detecting progress phases, approval dialogs, errors, and completion
|
|
257
|
+
4. Results stream back to Telegram as formatted messages
|
|
258
|
+
|
|
259
|
+
The bot never exposes a port, never forwards traffic externally, and never stores your code anywhere but your local disk.
|
|
260
|
+
|
|
261
|
+
> For a deeper dive, see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md). Click the diagram above for an [interactive version](https://excalidraw.com/#json=a54sSDUatTXGCtJORO7GJ,muz3R_zi4nbj9RKuRAfbEA).
|
|
262
|
+
|
|
263
|
+
## Project Structure
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
src/
|
|
267
|
+
bin/ CLI entry point (Commander subcommands)
|
|
268
|
+
bot/ grammy bot — event handling, command routing, callback queries
|
|
269
|
+
commands/ Telegram slash command handlers and message parser
|
|
270
|
+
services/ core business logic (CDP, response monitoring, detectors, sessions)
|
|
271
|
+
database/ SQLite repositories (sessions, workspace bindings, templates, schedules)
|
|
272
|
+
middleware/ auth (user ID whitelist) and input sanitization
|
|
273
|
+
ui/ Telegram InlineKeyboard builders
|
|
274
|
+
utils/ config, logging, formatting, i18n, path security, voice/image handling
|
|
275
|
+
tests/ test files mirroring src/ structure
|
|
276
|
+
docs/ architecture docs, DOM selector reference, diagrams
|
|
277
|
+
locales/ i18n translations (en, ja)
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Contributing
|
|
281
|
+
|
|
282
|
+
Contributions are welcome — whether it's a bug fix, a new feature, documentation improvements, or test coverage.
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
git clone https://github.com/optimistengineer/Remoat.git
|
|
286
|
+
cd Remoat
|
|
287
|
+
npm install
|
|
288
|
+
cp .env.example .env # fill in your values
|
|
289
|
+
npm run dev # start with auto-reload
|
|
290
|
+
npm test # run the test suite
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide — code style, commit conventions, PR process, and project architecture.
|
|
294
|
+
|
|
295
|
+
## License
|
|
296
|
+
|
|
297
|
+
[MIT](LICENSE)
|
package/dist/bin/cli.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const commander_1 = require("commander");
|
|
40
|
+
const package_json_1 = require("../../package.json");
|
|
41
|
+
const start_1 = require("./commands/start");
|
|
42
|
+
const doctor_1 = require("./commands/doctor");
|
|
43
|
+
const setup_1 = require("./commands/setup");
|
|
44
|
+
const open_1 = require("./commands/open");
|
|
45
|
+
const configLoader_1 = require("../utils/configLoader");
|
|
46
|
+
const program = new commander_1.Command()
|
|
47
|
+
.name('remoat')
|
|
48
|
+
.description('Control your AI coding assistant from Telegram')
|
|
49
|
+
.version(package_json_1.version)
|
|
50
|
+
.option('--verbose', 'Show debug-level logs')
|
|
51
|
+
.option('--quiet', 'Only show errors');
|
|
52
|
+
// Default action: no subcommand → start or setup
|
|
53
|
+
program.action(async () => {
|
|
54
|
+
const hasConfig = configLoader_1.ConfigLoader.configExists();
|
|
55
|
+
const hasEnv = fs.existsSync(path.resolve(process.cwd(), '.env'));
|
|
56
|
+
if (!hasConfig && !hasEnv) {
|
|
57
|
+
return (0, setup_1.setupAction)();
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
return (0, start_1.startAction)(program.opts(), program);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
program
|
|
64
|
+
.command('start')
|
|
65
|
+
.description('Start the Telegram bot')
|
|
66
|
+
.action((_opts, cmd) => (0, start_1.startAction)(cmd.parent.opts(), cmd.parent));
|
|
67
|
+
program
|
|
68
|
+
.command('doctor')
|
|
69
|
+
.description('Check environment and dependencies')
|
|
70
|
+
.action(doctor_1.doctorAction);
|
|
71
|
+
program
|
|
72
|
+
.command('setup')
|
|
73
|
+
.description('Interactive setup wizard')
|
|
74
|
+
.action(setup_1.setupAction);
|
|
75
|
+
program
|
|
76
|
+
.command('open')
|
|
77
|
+
.description('Open Antigravity with CDP enabled (auto-selects available port)')
|
|
78
|
+
.action(open_1.openAction);
|
|
79
|
+
program.parse();
|
|
80
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/bin/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAAyB;AACzB,2CAA6B;AAC7B,yCAAoC;AACpC,qDAA6C;AAC7C,4CAA+C;AAC/C,8CAAiD;AACjD,4CAA+C;AAC/C,0CAA6C;AAC7C,wDAAqD;AAErD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE;KACxB,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,gDAAgD,CAAC;KAC7D,OAAO,CAAC,sBAAO,CAAC;KAChB,MAAM,CAAC,WAAW,EAAE,uBAAuB,CAAC;KAC5C,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;AAE3C,iDAAiD;AACjD,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;IACtB,MAAM,SAAS,GAAG,2BAAY,CAAC,YAAY,EAAE,CAAC;IAC9C,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;IAElE,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,IAAA,mBAAW,GAAE,CAAC;IACzB,CAAC;SAAM,CAAC;QACJ,OAAO,IAAA,mBAAW,EAAC,OAAO,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,OAAO;KACF,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,IAAA,mBAAW,EAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAExE,OAAO;KACF,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,oCAAoC,CAAC;KACjD,MAAM,CAAC,qBAAY,CAAC,CAAC;AAE1B,OAAO;KACF,OAAO,CAAC,OAAO,CAAC;KAChB,WAAW,CAAC,0BAA0B,CAAC;KACvC,MAAM,CAAC,mBAAW,CAAC,CAAC;AAEzB,OAAO;KACF,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,iEAAiE,CAAC;KAC9E,MAAM,CAAC,iBAAU,CAAC,CAAC;AAExB,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function doctorAction(): Promise<void>;
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.doctorAction = doctorAction;
|
|
37
|
+
const http = __importStar(require("http"));
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const os = __importStar(require("os"));
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
const child_process_1 = require("child_process");
|
|
42
|
+
const cdpPorts_1 = require("../../utils/cdpPorts");
|
|
43
|
+
const configLoader_1 = require("../../utils/configLoader");
|
|
44
|
+
const pathUtils_1 = require("../../utils/pathUtils");
|
|
45
|
+
const logger_1 = require("../../utils/logger");
|
|
46
|
+
const ok = (msg) => console.log(` ${logger_1.COLORS.green}[OK]${logger_1.COLORS.reset} ${msg}`);
|
|
47
|
+
const warn = (msg) => console.log(` ${logger_1.COLORS.yellow}[--]${logger_1.COLORS.reset} ${msg}`);
|
|
48
|
+
const fail = (msg) => console.log(` ${logger_1.COLORS.red}[!!]${logger_1.COLORS.reset} ${msg}`);
|
|
49
|
+
const hint = (msg) => console.log(` ${logger_1.COLORS.dim}${msg}${logger_1.COLORS.reset}`);
|
|
50
|
+
function checkPort(port) {
|
|
51
|
+
return new Promise((resolve) => {
|
|
52
|
+
const req = http.get(`http://127.0.0.1:${port}/json/list`, (res) => {
|
|
53
|
+
let data = '';
|
|
54
|
+
res.on('data', (chunk) => (data += chunk));
|
|
55
|
+
res.on('end', () => {
|
|
56
|
+
try {
|
|
57
|
+
const parsed = JSON.parse(data);
|
|
58
|
+
resolve(Array.isArray(parsed));
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
resolve(false);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
req.on('error', () => resolve(false));
|
|
66
|
+
req.setTimeout(2000, () => {
|
|
67
|
+
req.destroy();
|
|
68
|
+
resolve(false);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function checkEnvFile() {
|
|
73
|
+
const envPath = path.resolve(process.cwd(), '.env');
|
|
74
|
+
return { exists: fs.existsSync(envPath), path: envPath };
|
|
75
|
+
}
|
|
76
|
+
function checkRequiredEnvVars() {
|
|
77
|
+
const required = ['TELEGRAM_BOT_TOKEN', 'ALLOWED_USER_IDS'];
|
|
78
|
+
// Also check config.json values
|
|
79
|
+
let persisted = {};
|
|
80
|
+
try {
|
|
81
|
+
const configPath = configLoader_1.ConfigLoader.getConfigFilePath();
|
|
82
|
+
if (fs.existsSync(configPath)) {
|
|
83
|
+
persisted = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch { /* ignore parse errors here */ }
|
|
87
|
+
const configKeyMap = {
|
|
88
|
+
TELEGRAM_BOT_TOKEN: 'telegramBotToken',
|
|
89
|
+
ALLOWED_USER_IDS: 'allowedUserIds',
|
|
90
|
+
};
|
|
91
|
+
return required.map((name) => ({
|
|
92
|
+
name,
|
|
93
|
+
set: Boolean(process.env[name]) || Boolean(persisted[configKeyMap[name]]),
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
async function doctorAction() {
|
|
97
|
+
console.log(`\n${logger_1.COLORS.cyan}remoat doctor${logger_1.COLORS.reset}\n`);
|
|
98
|
+
let allOk = true;
|
|
99
|
+
// 1. Config directory check
|
|
100
|
+
const configDir = configLoader_1.ConfigLoader.getConfigDir();
|
|
101
|
+
if (fs.existsSync(configDir)) {
|
|
102
|
+
ok(`Config directory exists: ${configDir}`);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
warn(`Config directory not found: ${configDir}`);
|
|
106
|
+
hint('Run: remoat setup (optional if using .env)');
|
|
107
|
+
}
|
|
108
|
+
// 2. Config file check
|
|
109
|
+
const configFilePath = configLoader_1.ConfigLoader.getConfigFilePath();
|
|
110
|
+
if (configLoader_1.ConfigLoader.configExists()) {
|
|
111
|
+
ok(`Config file found: ${configFilePath}`);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
warn(`Config file not found: ${configFilePath} (optional — .env fallback used)`);
|
|
115
|
+
}
|
|
116
|
+
// 3. .env file check
|
|
117
|
+
const env = checkEnvFile();
|
|
118
|
+
if (env.exists) {
|
|
119
|
+
// Load .env so subsequent checks can see the variables
|
|
120
|
+
require('dotenv').config({ path: env.path });
|
|
121
|
+
ok(`.env file found: ${env.path}`);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
if (!configLoader_1.ConfigLoader.configExists()) {
|
|
125
|
+
fail(`.env file not found: ${env.path}`);
|
|
126
|
+
allOk = false;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
warn(`.env file not found: ${env.path} (not needed — config.json used)`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// 4. Required environment variables (checks both .env and config.json)
|
|
133
|
+
const vars = checkRequiredEnvVars();
|
|
134
|
+
for (const v of vars) {
|
|
135
|
+
if (v.set) {
|
|
136
|
+
ok(`${v.name} is set`);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
fail(`${v.name} is NOT set`);
|
|
140
|
+
allOk = false;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// 5. Node.js version check
|
|
144
|
+
const nodeVersion = process.versions.node;
|
|
145
|
+
const major = parseInt(nodeVersion.split('.')[0], 10);
|
|
146
|
+
if (major >= 18) {
|
|
147
|
+
ok(`Node.js ${nodeVersion}`);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
fail(`Node.js ${nodeVersion} (>= 18.0.0 required)`);
|
|
151
|
+
allOk = false;
|
|
152
|
+
}
|
|
153
|
+
// 6. Platform-specific checks
|
|
154
|
+
const platform = os.platform();
|
|
155
|
+
if (platform === 'darwin') {
|
|
156
|
+
// Check Xcode Command Line Tools (needed for native module compilation)
|
|
157
|
+
try {
|
|
158
|
+
(0, child_process_1.execFileSync)('xcode-select', ['-p'], { stdio: 'pipe' });
|
|
159
|
+
ok('Xcode Command Line Tools installed');
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
warn('Xcode Command Line Tools not found');
|
|
163
|
+
hint('Install with: xcode-select --install');
|
|
164
|
+
hint('Required for native dependencies (better-sqlite3)');
|
|
165
|
+
}
|
|
166
|
+
// Check if Antigravity.app exists
|
|
167
|
+
const antigravityPath = process.env.ANTIGRAVITY_PATH;
|
|
168
|
+
if (antigravityPath) {
|
|
169
|
+
if (fs.existsSync(antigravityPath)) {
|
|
170
|
+
ok(`Antigravity found: ${antigravityPath}`);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
fail(`ANTIGRAVITY_PATH set but not found: ${antigravityPath}`);
|
|
174
|
+
allOk = false;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else if (fs.existsSync('/Applications/Antigravity.app')) {
|
|
178
|
+
ok('Antigravity.app found in /Applications');
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
warn('Antigravity.app not found in /Applications');
|
|
182
|
+
hint('Install Antigravity, or set ANTIGRAVITY_PATH in .env');
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// 7. CDP port check
|
|
186
|
+
console.log(`\n ${logger_1.COLORS.dim}Checking CDP ports...${logger_1.COLORS.reset}`);
|
|
187
|
+
let cdpOk = false;
|
|
188
|
+
for (const port of cdpPorts_1.CDP_PORTS) {
|
|
189
|
+
const alive = await checkPort(port);
|
|
190
|
+
if (alive) {
|
|
191
|
+
ok(`CDP port ${port} is responding`);
|
|
192
|
+
cdpOk = true;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (!cdpOk) {
|
|
196
|
+
fail('No CDP ports responding');
|
|
197
|
+
hint(`Run: remoat open`);
|
|
198
|
+
hint(`Or manually: ${(0, pathUtils_1.getAntigravityCdpHint)(9222)}`);
|
|
199
|
+
allOk = false;
|
|
200
|
+
}
|
|
201
|
+
// Summary
|
|
202
|
+
console.log('');
|
|
203
|
+
if (allOk) {
|
|
204
|
+
console.log(` ${logger_1.COLORS.green}All checks passed!${logger_1.COLORS.reset}`);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
console.log(` ${logger_1.COLORS.red}Some checks failed. Please fix the issues above.${logger_1.COLORS.reset}`);
|
|
208
|
+
process.exitCode = 1;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/bin/commands/doctor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,oCAgHC;AAjLD,2CAA6B;AAC7B,uC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