lazy-gravity 0.10.0 β 0.12.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/README.md +7 -0
- package/dist/bin/commands/doctor.js +45 -7
- package/dist/bot/index.js +526 -24
- package/dist/commands/chatCommandHandler.js +11 -41
- package/dist/commands/registerSlashCommands.js +62 -0
- package/dist/database/scheduleRepository.js +50 -6
- package/dist/events/interactionCreateHandler.js +163 -28
- package/dist/events/messageCreateHandler.js +24 -28
- package/dist/handlers/fileChangeButtonAction.js +12 -24
- package/dist/handlers/genericActionButtonAction.js +16 -18
- package/dist/handlers/planningButtonAction.js +105 -17
- package/dist/handlers/planningModalSubmitAction.js +38 -0
- package/dist/handlers/questionSelectAction.js +8 -7
- package/dist/handlers/questionSkipAction.js +7 -6
- package/dist/platform/discord/wrappers.js +76 -0
- package/dist/services/approvalDetector.js +43 -14
- package/dist/services/artifactService.js +61 -21
- package/dist/services/assistantDomExtractor.js +23 -3
- package/dist/services/cdpBridgeManager.js +35 -2
- package/dist/services/cdpConnectionPool.js +7 -2
- package/dist/services/cdpService.js +113 -8
- package/dist/services/chatSessionService.js +15 -8
- package/dist/services/heartbeatService.js +261 -0
- package/dist/services/notificationSender.js +12 -2
- package/dist/services/planningDetector.js +1 -1
- package/dist/services/promptDispatcher.js +21 -1
- package/dist/services/questionDetector.js +128 -76
- package/dist/services/responseMonitor.js +17 -1
- package/dist/services/scheduleService.js +101 -4
- package/dist/utils/configLoader.js +8 -0
- package/dist/utils/fileOpenCache.js +2 -6
- package/dist/utils/questionActionUtils.js +22 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -90,12 +90,19 @@ Just type in any bound channel:
|
|
|
90
90
|
- `π /template list` β Display registered templates with execute buttons
|
|
91
91
|
- `π /template add <name> <prompt>` β Register a new prompt template
|
|
92
92
|
- `π /template delete <name>` β Delete a template
|
|
93
|
+
- `π
/schedule list` β Show all scheduled tasks with next localized run times
|
|
94
|
+
- `π
/schedule add <cron> <prompt>` β Register a recurring task for the current channel's bound project
|
|
95
|
+
- `π
/schedule remove <id>` β Delete a scheduled task by ID
|
|
96
|
+
- `π
/schedule clear` β Remove all scheduled tasks and reset the task ID counter
|
|
97
|
+
- `π
/schedule backup` β Export all scheduled tasks as a JSON file attachment
|
|
98
|
+
- `π
/schedule restore <file>` β Restore scheduled tasks from a JSON file attachment
|
|
93
99
|
- `π /join` β Join an existing Antigravity session (shows up to 20 recent sessions)
|
|
94
100
|
- `π /mirror` β Toggle PCβDiscord message mirroring for the current session
|
|
95
101
|
- `π /stop` β Force-stop a running Antigravity task
|
|
96
102
|
- `π /shutdown` β Shut down the IDE while keeping the active CDP project connections and session bindings
|
|
97
103
|
- `πΈ /screenshot` β Capture and send Antigravity's current screen
|
|
98
104
|
- `π§ /status` β Show bot connection status, current mode, and active project
|
|
105
|
+
- `π /heartbeat [on|off|status]` β Configure periodic bot heartbeat notifications
|
|
99
106
|
- `β
/autoaccept [on|off|status]` β Toggle auto-approval of file edit dialogs
|
|
100
107
|
- `π /output [embed|plain]` β Toggle output format between Embed and Plain Text (plain text is easier to copy on mobile)
|
|
101
108
|
- `π /logs [lines] [level]` β View recent bot logs (ephemeral)
|
|
@@ -41,6 +41,7 @@ const cdpPorts_1 = require("../../utils/cdpPorts");
|
|
|
41
41
|
const configLoader_1 = require("../../utils/configLoader");
|
|
42
42
|
const pathUtils_1 = require("../../utils/pathUtils");
|
|
43
43
|
const logger_1 = require("../../utils/logger");
|
|
44
|
+
const artifactService_1 = require("../../services/artifactService");
|
|
44
45
|
const ok = (msg) => console.log(` ${logger_1.COLORS.green}[OK]${logger_1.COLORS.reset} ${msg}`);
|
|
45
46
|
const warn = (msg) => console.log(` ${logger_1.COLORS.yellow}[--]${logger_1.COLORS.reset} ${msg}`);
|
|
46
47
|
const fail = (msg) => console.log(` ${logger_1.COLORS.red}[!!]${logger_1.COLORS.reset} ${msg}`);
|
|
@@ -53,17 +54,22 @@ function checkPort(port) {
|
|
|
53
54
|
res.on('end', () => {
|
|
54
55
|
try {
|
|
55
56
|
const parsed = JSON.parse(data);
|
|
56
|
-
|
|
57
|
+
if (Array.isArray(parsed)) {
|
|
58
|
+
resolve({ alive: true, targets: parsed });
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
resolve({ alive: false });
|
|
62
|
+
}
|
|
57
63
|
}
|
|
58
64
|
catch {
|
|
59
|
-
resolve(false);
|
|
65
|
+
resolve({ alive: false });
|
|
60
66
|
}
|
|
61
67
|
});
|
|
62
68
|
});
|
|
63
|
-
req.on('error', () => resolve(false));
|
|
69
|
+
req.on('error', () => resolve({ alive: false }));
|
|
64
70
|
req.setTimeout(2000, () => {
|
|
65
71
|
req.destroy();
|
|
66
|
-
resolve(false);
|
|
72
|
+
resolve({ alive: false });
|
|
67
73
|
});
|
|
68
74
|
});
|
|
69
75
|
}
|
|
@@ -145,11 +151,15 @@ async function doctorAction() {
|
|
|
145
151
|
// 5. CDP port check
|
|
146
152
|
console.log(`\n ${logger_1.COLORS.dim}Checking CDP ports...${logger_1.COLORS.reset}`);
|
|
147
153
|
let cdpOk = false;
|
|
154
|
+
const portResults = new Map();
|
|
148
155
|
for (const port of cdpPorts_1.CDP_PORTS) {
|
|
149
|
-
const
|
|
150
|
-
if (alive) {
|
|
156
|
+
const result = await checkPort(port);
|
|
157
|
+
if (result.alive) {
|
|
151
158
|
ok(`CDP port ${port} is responding`);
|
|
152
159
|
cdpOk = true;
|
|
160
|
+
if (result.targets) {
|
|
161
|
+
portResults.set(port, result.targets);
|
|
162
|
+
}
|
|
153
163
|
}
|
|
154
164
|
}
|
|
155
165
|
if (!cdpOk) {
|
|
@@ -157,7 +167,35 @@ async function doctorAction() {
|
|
|
157
167
|
hint(`Run: ${(0, pathUtils_1.getAntigravityCdpHint)(9222)}`);
|
|
158
168
|
allOk = false;
|
|
159
169
|
}
|
|
160
|
-
// 6.
|
|
170
|
+
// 6. Path alignment check
|
|
171
|
+
console.log(`\n ${logger_1.COLORS.dim}Checking brain path alignment...${logger_1.COLORS.reset}`);
|
|
172
|
+
const artifactService = new artifactService_1.ArtifactService();
|
|
173
|
+
const resolvedPath = artifactService.getBrainBasePath();
|
|
174
|
+
ok(`Resolved brainBasePath: ${resolvedPath}`);
|
|
175
|
+
for (const port of cdpPorts_1.CDP_PORTS) {
|
|
176
|
+
const targets = portResults.get(port);
|
|
177
|
+
if (targets && Array.isArray(targets)) {
|
|
178
|
+
for (const t of targets) {
|
|
179
|
+
if (t.url?.includes('workbench')) {
|
|
180
|
+
const pathLower = t.url.toLowerCase();
|
|
181
|
+
const isIDE = pathLower.includes('antigravity%20ide') || pathLower.includes('antigravity-ide');
|
|
182
|
+
const resolvedLower = resolvedPath.toLowerCase();
|
|
183
|
+
if (isIDE && !resolvedLower.includes('antigravity-ide')) {
|
|
184
|
+
fail(`Path mismatch: Active IDE target is "Antigravity IDE" but brain basePath is resolved to: ${resolvedPath}`);
|
|
185
|
+
hint('Make sure to use .gemini/antigravity-ide/brain path.');
|
|
186
|
+
allOk = false;
|
|
187
|
+
}
|
|
188
|
+
else if (!isIDE && resolvedLower.includes('antigravity-ide')) {
|
|
189
|
+
warn(`Active IDE target does not appear to be "Antigravity IDE" but brain basePath is: ${resolvedPath}`);
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
ok(`Target "${t.title}" aligns correctly with brain basePath`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// 7. Node.js version check
|
|
161
199
|
const nodeVersion = process.versions.node;
|
|
162
200
|
const major = parseInt(nodeVersion.split('.')[0], 10);
|
|
163
201
|
if (major >= 18) {
|