@neurcode-ai/cli 0.7.0 → 0.7.1
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.
|
@@ -30,6 +30,7 @@ export declare class CommandPoller {
|
|
|
30
30
|
private pollInterval;
|
|
31
31
|
private readonly pollIntervalMs;
|
|
32
32
|
private isRunning;
|
|
33
|
+
private blobStore;
|
|
33
34
|
constructor(projectRoot: string);
|
|
34
35
|
/**
|
|
35
36
|
* Start polling for commands
|
|
@@ -47,10 +48,18 @@ export declare class CommandPoller {
|
|
|
47
48
|
* Execute a command locally
|
|
48
49
|
*/
|
|
49
50
|
private executeCommand;
|
|
51
|
+
/**
|
|
52
|
+
* Compute the hash of the current file content
|
|
53
|
+
*/
|
|
54
|
+
private computeCurrentFileHash;
|
|
50
55
|
/**
|
|
51
56
|
* Execute a FILE_REVERT command
|
|
52
57
|
*/
|
|
53
58
|
private executeFileRevert;
|
|
59
|
+
/**
|
|
60
|
+
* Fetch blob content from cloud API and store it locally
|
|
61
|
+
*/
|
|
62
|
+
private fetchBlobFromCloud;
|
|
54
63
|
/**
|
|
55
64
|
* Update command status on the server
|
|
56
65
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPoller.d.ts","sourceRoot":"","sources":["../../../src/services/watch/CommandPoller.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"CommandPoller.d.ts","sourceRoot":"","sources":["../../../src/services/watch/CommandPoller.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAA+B;IACnD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAQ;IACvC,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,SAAS,CAAY;gBAEjB,WAAW,EAAE,MAAM;IAQ/B;;OAEG;IACH,KAAK,IAAI,IAAI;IAsBb;;OAEG;IACH,IAAI,IAAI,IAAI;IASZ;;OAEG;YACW,IAAI;IA6ClB;;OAEG;YACW,cAAc;IAe5B;;OAEG;YACW,sBAAsB;IAmBpC;;OAEG;YACW,iBAAiB;IAyC/B;;OAEG;YACW,kBAAkB;IAwChC;;OAEG;YACW,mBAAmB;IA+BjC;;OAEG;IACH,YAAY,IAAI,OAAO;IAIvB;;OAEG;IACH,YAAY,IAAI,IAAI;CAUrB"}
|
|
@@ -42,8 +42,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
42
42
|
exports.CommandPoller = void 0;
|
|
43
43
|
const config_1 = require("../../config");
|
|
44
44
|
const restore_1 = require("../../utils/restore");
|
|
45
|
+
const BlobStore_1 = require("./BlobStore");
|
|
45
46
|
const path = __importStar(require("path"));
|
|
46
47
|
const fs_1 = require("fs");
|
|
48
|
+
const crypto_1 = require("crypto");
|
|
47
49
|
/**
|
|
48
50
|
* CommandPoller - Handles polling and execution of remote commands
|
|
49
51
|
*/
|
|
@@ -54,11 +56,13 @@ class CommandPoller {
|
|
|
54
56
|
pollInterval = null;
|
|
55
57
|
pollIntervalMs = 3000; // Poll every 3 seconds
|
|
56
58
|
isRunning = false;
|
|
59
|
+
blobStore;
|
|
57
60
|
constructor(projectRoot) {
|
|
58
61
|
this.projectRoot = projectRoot;
|
|
59
62
|
const config = (0, config_1.loadConfig)();
|
|
60
63
|
this.apiUrl = config.apiUrl || config_1.DEFAULT_API_URL;
|
|
61
64
|
this.apiKey = (0, config_1.getApiKey)();
|
|
65
|
+
this.blobStore = new BlobStore_1.BlobStore(projectRoot);
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
64
68
|
* Start polling for commands
|
|
@@ -120,10 +124,14 @@ class CommandPoller {
|
|
|
120
124
|
}
|
|
121
125
|
const data = await response.json();
|
|
122
126
|
if (!data.command) {
|
|
123
|
-
// No pending commands
|
|
127
|
+
// No pending commands - log occasionally for debugging (every 20 polls = ~1 minute)
|
|
128
|
+
if (Math.random() < 0.05) {
|
|
129
|
+
console.log('🔄 Polling for commands... (no pending commands)');
|
|
130
|
+
}
|
|
124
131
|
return;
|
|
125
132
|
}
|
|
126
133
|
// Execute the command
|
|
134
|
+
console.log(`📥 Found pending command: ${data.command.type} (${data.command.id.substring(0, 8)}...)`);
|
|
127
135
|
await this.executeCommand(data.command);
|
|
128
136
|
}
|
|
129
137
|
catch (error) {
|
|
@@ -149,6 +157,25 @@ class CommandPoller {
|
|
|
149
157
|
await this.updateCommandStatus(command.id, 'FAILED', error.message);
|
|
150
158
|
}
|
|
151
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Compute the hash of the current file content
|
|
162
|
+
*/
|
|
163
|
+
async computeCurrentFileHash(filePath) {
|
|
164
|
+
const resolvedPath = path.resolve(this.projectRoot, filePath);
|
|
165
|
+
try {
|
|
166
|
+
// Check if file exists
|
|
167
|
+
await fs_1.promises.access(resolvedPath);
|
|
168
|
+
// Read file content
|
|
169
|
+
const content = await fs_1.promises.readFile(resolvedPath, 'utf-8');
|
|
170
|
+
// Compute SHA-256 hash (same as BlobStore)
|
|
171
|
+
const hash = (0, crypto_1.createHash)('sha256').update(content, 'utf8').digest('hex');
|
|
172
|
+
return hash;
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
// File doesn't exist
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
152
179
|
/**
|
|
153
180
|
* Execute a FILE_REVERT command
|
|
154
181
|
*/
|
|
@@ -158,20 +185,68 @@ class CommandPoller {
|
|
|
158
185
|
throw new Error('Missing filePath or blobHash in command payload');
|
|
159
186
|
}
|
|
160
187
|
// Check if blob exists locally
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
188
|
+
const blobExists = await this.blobStore.exists(blobHash);
|
|
189
|
+
if (!blobExists) {
|
|
190
|
+
// Blob doesn't exist locally, fetch it from cloud
|
|
191
|
+
console.log(`📥 Blob not found locally, fetching from cloud: ${blobHash.substring(0, 12)}...`);
|
|
192
|
+
await this.fetchBlobFromCloud(blobHash);
|
|
164
193
|
}
|
|
165
|
-
|
|
166
|
-
|
|
194
|
+
// CRITICAL: Compare target hash with current file hash before reverting
|
|
195
|
+
const currentHash = await this.computeCurrentFileHash(filePath);
|
|
196
|
+
if (currentHash === blobHash) {
|
|
197
|
+
console.log(`⚠️ Skipped revert: Target hash (${blobHash.substring(0, 8)}...) is identical to current file`);
|
|
198
|
+
console.log(` File ${filePath} is already at the requested version`);
|
|
199
|
+
// Mark as completed (no-op, but successful)
|
|
200
|
+
await this.updateCommandStatus(command.id, 'COMPLETED');
|
|
201
|
+
return;
|
|
167
202
|
}
|
|
168
203
|
// Restore the file using existing restoreFile utility
|
|
169
204
|
// Note: restoreFile expects hash and targetPath, and handles decompression
|
|
170
205
|
await (0, restore_1.restoreFile)(blobHash, filePath, this.projectRoot);
|
|
171
206
|
console.log(`✅ File reverted: ${filePath} (${blobHash.substring(0, 8)}...)`);
|
|
207
|
+
if (currentHash) {
|
|
208
|
+
console.log(` Previous: ${currentHash.substring(0, 8)}... → New: ${blobHash.substring(0, 8)}...`);
|
|
209
|
+
}
|
|
172
210
|
// Update command status to COMPLETED
|
|
173
211
|
await this.updateCommandStatus(command.id, 'COMPLETED');
|
|
174
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Fetch blob content from cloud API and store it locally
|
|
215
|
+
*/
|
|
216
|
+
async fetchBlobFromCloud(hash) {
|
|
217
|
+
if (!this.apiKey) {
|
|
218
|
+
throw new Error('API key not found. Please run "neurcode login" first.');
|
|
219
|
+
}
|
|
220
|
+
try {
|
|
221
|
+
const response = await fetch(`${this.apiUrl}/api/v1/blobs/${hash}`, {
|
|
222
|
+
method: 'GET',
|
|
223
|
+
headers: {
|
|
224
|
+
'Authorization': `Bearer ${this.apiKey}`,
|
|
225
|
+
'Content-Type': 'application/json',
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
if (!response.ok) {
|
|
229
|
+
if (response.status === 404) {
|
|
230
|
+
throw new Error(`Blob not found in cloud storage: ${hash.substring(0, 12)}...`);
|
|
231
|
+
}
|
|
232
|
+
if (response.status === 401 || response.status === 403) {
|
|
233
|
+
throw new Error('API key invalid. Please run "neurcode login" again.');
|
|
234
|
+
}
|
|
235
|
+
throw new Error(`Failed to fetch blob: ${response.status} ${response.statusText}`);
|
|
236
|
+
}
|
|
237
|
+
const data = await response.json();
|
|
238
|
+
// Decode base64 content to get GZIP compressed buffer
|
|
239
|
+
const compressedContent = Buffer.from(data.content, 'base64');
|
|
240
|
+
// Store the blob locally (BlobStore will handle the directory creation)
|
|
241
|
+
await this.blobStore.initialize();
|
|
242
|
+
const blobPath = this.blobStore.getBlobPath(hash);
|
|
243
|
+
await fs_1.promises.writeFile(blobPath, compressedContent);
|
|
244
|
+
console.log(`✅ Blob fetched and stored locally: ${hash.substring(0, 12)}...`);
|
|
245
|
+
}
|
|
246
|
+
catch (error) {
|
|
247
|
+
throw new Error(`Failed to fetch blob from cloud: ${error.message}`);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
175
250
|
/**
|
|
176
251
|
* Update command status on the server
|
|
177
252
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPoller.js","sourceRoot":"","sources":["../../../src/services/watch/CommandPoller.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAsE;AACtE,iDAAkD;AAClD,2CAA6B;AAC7B,2BAAoC;
|
|
1
|
+
{"version":3,"file":"CommandPoller.js","sourceRoot":"","sources":["../../../src/services/watch/CommandPoller.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAsE;AACtE,iDAAkD;AAClD,2CAAwC;AACxC,2CAA6B;AAC7B,2BAAoC;AACpC,mCAAoC;AAqBpC;;GAEG;AACH,MAAa,aAAa;IAChB,MAAM,CAAS;IACf,MAAM,CAAgB;IACtB,WAAW,CAAS;IACpB,YAAY,GAA0B,IAAI,CAAC;IAClC,cAAc,GAAG,IAAI,CAAC,CAAC,uBAAuB;IACvD,SAAS,GAAY,KAAK,CAAC;IAC3B,SAAS,CAAY;IAE7B,YAAY,WAAmB;QAC7B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,MAAM,MAAM,GAAG,IAAA,mBAAU,GAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,wBAAe,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAS,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACrD,OAAO;QACT,CAAC;QAED,iDAAiD;QACjD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;YACpE,OAAO;QACT,CAAC;QAED,IAAI,CAAC,S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