@karmaniverous/jeeves-watcher 0.18.6 → 0.18.8
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/dist/cli/jeeves-watcher/{index-CS1wrtes.js → index-BjghvUnc.js} +291 -232
- package/dist/cli/jeeves-watcher/index.js +1 -1
- package/dist/index.d.ts +37 -28
- package/dist/index.js +290 -231
- package/package.json +1 -1
|
@@ -224,7 +224,7 @@ async function startFromConfig(configPath, descriptor) {
|
|
|
224
224
|
const config = await loadConfig(resolvedPath);
|
|
225
225
|
// Dynamic import breaks the circular dependency between this module
|
|
226
226
|
// and app/index.ts (which defines JeevesWatcher and re-exports startFromConfig).
|
|
227
|
-
const { JeevesWatcher } = await import('./index-
|
|
227
|
+
const { JeevesWatcher } = await import('./index-BjghvUnc.js');
|
|
228
228
|
const app = new JeevesWatcher(config, resolvedPath, descriptor);
|
|
229
229
|
installShutdownHandlers(() => app.stop());
|
|
230
230
|
await app.start();
|
package/dist/index.d.ts
CHANGED
|
@@ -1252,10 +1252,9 @@ declare class CommitMessageGenerator {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
1254
|
/**
|
|
1255
|
-
* @module vcs/
|
|
1256
|
-
*
|
|
1255
|
+
* @module vcs/types
|
|
1256
|
+
* Shared types for the VCS subsystem.
|
|
1257
1257
|
*/
|
|
1258
|
-
|
|
1259
1258
|
/** Metadata for a pending reversion to include in the commit message. */
|
|
1260
1259
|
interface PendingReversion {
|
|
1261
1260
|
glob: string;
|
|
@@ -1267,6 +1266,12 @@ interface PushError {
|
|
|
1267
1266
|
timestamp: string;
|
|
1268
1267
|
message: string;
|
|
1269
1268
|
}
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* @module vcs/VcsManager
|
|
1272
|
+
* Per-root VCS manager for git-backed content versioning.
|
|
1273
|
+
*/
|
|
1274
|
+
|
|
1270
1275
|
/**
|
|
1271
1276
|
* Per-root VCS manager for git-backed content versioning.
|
|
1272
1277
|
*
|
|
@@ -1283,7 +1288,7 @@ declare class VcsManager {
|
|
|
1283
1288
|
readonly remoteUrl: string | undefined;
|
|
1284
1289
|
private readonly accessToken;
|
|
1285
1290
|
private readonly logger;
|
|
1286
|
-
private readonly
|
|
1291
|
+
private readonly commitMessageBuilder;
|
|
1287
1292
|
private readonly pending;
|
|
1288
1293
|
private readonly pendingReversions;
|
|
1289
1294
|
private readonly _pushErrors;
|
|
@@ -1297,15 +1302,18 @@ declare class VcsManager {
|
|
|
1297
1302
|
get lastPushTime(): string | null;
|
|
1298
1303
|
get pushErrors(): readonly PushError[];
|
|
1299
1304
|
/**
|
|
1300
|
-
* Begin accepting file changes. Sets
|
|
1301
|
-
*
|
|
1305
|
+
* Begin accepting file changes. Sets the manager to started state and
|
|
1306
|
+
* starts the squash manager if configured.
|
|
1307
|
+
*
|
|
1308
|
+
* Baseline mode (commit prefix `"baseline:"`) remains active until
|
|
1309
|
+
* {@link endBaseline} is called by the coordinator after the initial scan.
|
|
1302
1310
|
*/
|
|
1303
|
-
start():
|
|
1311
|
+
start(): void;
|
|
1304
1312
|
/**
|
|
1305
|
-
*
|
|
1306
|
-
*
|
|
1313
|
+
* Signal that the initial filesystem scan is complete.
|
|
1314
|
+
* Clears the baseline flag so subsequent commits use normal "watcher: batch" messages.
|
|
1307
1315
|
*/
|
|
1308
|
-
|
|
1316
|
+
endBaseline(): void;
|
|
1309
1317
|
/**
|
|
1310
1318
|
* Add a file to the pending set and reset the debounce timer.
|
|
1311
1319
|
* If the pending set exceeds maxBatchSize, flush immediately.
|
|
@@ -1346,27 +1354,10 @@ declare class VcsManager {
|
|
|
1346
1354
|
* Reset the debounce timer to fire flush() after commitDebounceMs.
|
|
1347
1355
|
*/
|
|
1348
1356
|
private resetDebounce;
|
|
1349
|
-
/**
|
|
1350
|
-
* Get the cached diff for staged files, for AI context.
|
|
1351
|
-
*/
|
|
1352
|
-
private getStagedDiff;
|
|
1353
|
-
/**
|
|
1354
|
-
* Build the template commit message (no AI).
|
|
1355
|
-
*/
|
|
1356
|
-
private buildTemplateMessage;
|
|
1357
|
-
/**
|
|
1358
|
-
* Build the commit message, using AI when available with template fallback.
|
|
1359
|
-
*/
|
|
1360
|
-
private buildCommitMessage;
|
|
1361
1357
|
/**
|
|
1362
1358
|
* Commit a batch of files to the git repo with index.lock retry.
|
|
1363
1359
|
*/
|
|
1364
1360
|
private commitBatch;
|
|
1365
|
-
/**
|
|
1366
|
-
* Push to the configured remote if remoteUrl is set.
|
|
1367
|
-
* On failure: logs the error and records it in pushErrors; never throws.
|
|
1368
|
-
*/
|
|
1369
|
-
private pushIfConfigured;
|
|
1370
1361
|
}
|
|
1371
1362
|
|
|
1372
1363
|
/**
|
|
@@ -1386,7 +1377,7 @@ declare class VcsCoordinator {
|
|
|
1386
1377
|
/**
|
|
1387
1378
|
* Start all VcsManager instances.
|
|
1388
1379
|
*/
|
|
1389
|
-
start():
|
|
1380
|
+
start(): void;
|
|
1390
1381
|
/**
|
|
1391
1382
|
* Route a file event to the correct root's VcsManager.
|
|
1392
1383
|
*
|
|
@@ -1394,6 +1385,15 @@ declare class VcsCoordinator {
|
|
|
1394
1385
|
* @param event - The event type: add, change, or unlink.
|
|
1395
1386
|
*/
|
|
1396
1387
|
onFileChange(filePath: string, event: 'add' | 'change' | 'unlink'): void;
|
|
1388
|
+
/**
|
|
1389
|
+
* Signal that the initial filesystem scan is complete.
|
|
1390
|
+
*
|
|
1391
|
+
* Flushes each manager's debounce buffer before ending baseline mode, ensuring
|
|
1392
|
+
* any files still pending in the VCS debounce are committed with a
|
|
1393
|
+
* `"baseline:"` prefix rather than `"watcher:"`. AI generation is not enabled
|
|
1394
|
+
* until all managers have completed their flush.
|
|
1395
|
+
*/
|
|
1396
|
+
onInitialScanComplete(): Promise<void>;
|
|
1397
1397
|
/**
|
|
1398
1398
|
* Flush all managers and clean up.
|
|
1399
1399
|
*/
|
|
@@ -1539,6 +1539,8 @@ interface FileSystemWatcherOptions {
|
|
|
1539
1539
|
contentHashCache?: ContentHashCache;
|
|
1540
1540
|
/** Optional callback for VCS file change notifications. */
|
|
1541
1541
|
onVcsFileChange?: (filePath: string, event: 'add' | 'change' | 'unlink') => void;
|
|
1542
|
+
/** Optional callback invoked when the initial filesystem scan completes. */
|
|
1543
|
+
onInitialScanComplete?: () => void | Promise<void>;
|
|
1542
1544
|
}
|
|
1543
1545
|
/**
|
|
1544
1546
|
* Filesystem watcher that maps chokidar events to the processing queue.
|
|
@@ -1553,6 +1555,7 @@ declare class FileSystemWatcher {
|
|
|
1553
1555
|
private readonly initialScanTracker?;
|
|
1554
1556
|
private readonly contentHashCache?;
|
|
1555
1557
|
private readonly onVcsFileChange?;
|
|
1558
|
+
private readonly onInitialScanComplete?;
|
|
1556
1559
|
private moveCorrelator?;
|
|
1557
1560
|
private globMatches;
|
|
1558
1561
|
private watcher;
|
|
@@ -1808,6 +1811,12 @@ declare class JeevesWatcher {
|
|
|
1808
1811
|
* Start the watcher, API server, and all components.
|
|
1809
1812
|
*/
|
|
1810
1813
|
start(): Promise<void>;
|
|
1814
|
+
/** Set up logger, VCS, embedding provider, and vector store. */
|
|
1815
|
+
private initInfrastructure;
|
|
1816
|
+
/** Build the processing pipeline: rules, templates, processor, queue, VCS. */
|
|
1817
|
+
private initPipeline;
|
|
1818
|
+
/** Wire up watcher and VCS coordinator, then start all services. */
|
|
1819
|
+
private startServicesAndWatcher;
|
|
1811
1820
|
/**
|
|
1812
1821
|
* Gracefully stop all components.
|
|
1813
1822
|
*/
|