grepmax 0.26.2 → 0.26.3
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.
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"name": "grepmax",
|
|
11
11
|
"source": "./plugins/grepmax",
|
|
12
12
|
"description": "Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.",
|
|
13
|
-
"version": "0.26.
|
|
13
|
+
"version": "0.26.3",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Robert Owens",
|
|
16
16
|
"email": "robowens@me.com"
|
|
@@ -121,12 +121,14 @@ class WatcherManager {
|
|
|
121
121
|
try {
|
|
122
122
|
const filePolicy = new file_policy_1.ProjectFilePolicy(root);
|
|
123
123
|
let processor;
|
|
124
|
+
let lastReindexAt;
|
|
124
125
|
processor = new batch_processor_1.ProjectBatchProcessor(Object.assign(Object.assign({ projectRoot: root, vectorDb,
|
|
125
126
|
metaCache }, (workerPool ? { workerPool } : {})), { filePolicy, onPolicyChange: () => {
|
|
126
127
|
void this.runCatchup(root, processor).catch((err) => {
|
|
127
128
|
console.error(`[daemon:${path.basename(root)}] Policy reconciliation failed:`, err);
|
|
128
129
|
});
|
|
129
130
|
}, onReindex: (files, ms) => __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
lastReindexAt = Date.now();
|
|
130
132
|
console.log(`[daemon:${path.basename(root)}] Reindexed ${files} file${files !== 1 ? "s" : ""} (${(ms / 1000).toFixed(1)}s)`);
|
|
131
133
|
// Update project registry so gmax status shows fresh data
|
|
132
134
|
const proj = (0, project_registry_1.getProject)(root);
|
|
@@ -140,16 +142,13 @@ class WatcherManager {
|
|
|
140
142
|
}
|
|
141
143
|
(0, project_registry_1.registerProject)(Object.assign(Object.assign({}, proj), { lastIndexed: new Date().toISOString(), chunkCount }));
|
|
142
144
|
}
|
|
143
|
-
|
|
144
|
-
(0, watcher_store_1.registerWatcher)({
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
lastReindex: Date.now(),
|
|
151
|
-
});
|
|
152
|
-
}), onActivity: () => {
|
|
145
|
+
}), onBatchSettled: () => {
|
|
146
|
+
(0, watcher_store_1.registerWatcher)(Object.assign({ pid: process.pid, projectRoot: root, startTime: Date.now(), status: this.isRootDegraded(root)
|
|
147
|
+
? "degraded"
|
|
148
|
+
: processor.progress.pendingFiles > 0
|
|
149
|
+
? "syncing"
|
|
150
|
+
: "watching", lastHeartbeat: Date.now() }, (lastReindexAt ? { lastReindex: lastReindexAt } : {})));
|
|
151
|
+
}, onActivity: () => {
|
|
153
152
|
this.deps.touchActivity();
|
|
154
153
|
// Mark as syncing while processing
|
|
155
154
|
(0, watcher_store_1.registerWatcher)({
|
|
@@ -78,6 +78,7 @@ class ProjectBatchProcessor {
|
|
|
78
78
|
this.workerPool = (_a = opts.workerPool) !== null && _a !== void 0 ? _a : (0, pool_1.getWorkerPool)();
|
|
79
79
|
this.onReindex = opts.onReindex;
|
|
80
80
|
this.onActivity = opts.onActivity;
|
|
81
|
+
this.onBatchSettled = opts.onBatchSettled;
|
|
81
82
|
this.onPolicyChange = opts.onPolicyChange;
|
|
82
83
|
this.onTerminalFailure = opts.onTerminalFailure;
|
|
83
84
|
this.onPathSuccess = opts.onPathSuccess;
|
|
@@ -190,7 +191,7 @@ class ProjectBatchProcessor {
|
|
|
190
191
|
}
|
|
191
192
|
processBatch(operationSignal) {
|
|
192
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
-
var _a, _b, _c, _d, _e;
|
|
194
|
+
var _a, _b, _c, _d, _e, _f;
|
|
194
195
|
if (this.closed || this.processing || this.pending.size === 0)
|
|
195
196
|
return;
|
|
196
197
|
const diskPressure = this.vectorDb.checkDiskPressure();
|
|
@@ -574,6 +575,8 @@ class ProjectBatchProcessor {
|
|
|
574
575
|
this.schedulePendingBatch();
|
|
575
576
|
}
|
|
576
577
|
}
|
|
578
|
+
if (!this.closed)
|
|
579
|
+
(_f = this.onBatchSettled) === null || _f === void 0 ? void 0 : _f.call(this);
|
|
577
580
|
}
|
|
578
581
|
});
|
|
579
582
|
}
|
|
@@ -195,6 +195,7 @@ function startWatcher(opts) {
|
|
|
195
195
|
processor = new batch_processor_1.ProjectBatchProcessor(Object.assign(Object.assign({}, opts), { filePolicy, onPolicyChange: reconcile, onReindex: (files, durationMs) => {
|
|
196
196
|
var _a;
|
|
197
197
|
(_a = opts.onReindex) === null || _a === void 0 ? void 0 : _a.call(opts, files, durationMs);
|
|
198
|
+
}, onBatchSettled: () => {
|
|
198
199
|
reportHealthyIfSettled();
|
|
199
200
|
}, onTerminalFailure: (absPath) => {
|
|
200
201
|
var _a;
|
package/package.json
CHANGED