grepmax 0.25.0 → 0.25.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/README.md +4 -0
- package/dist/commands/config.js +7 -1
- package/dist/commands/doctor.js +10 -0
- package/dist/commands/list.js +8 -0
- package/dist/commands/status.js +6 -0
- package/dist/lib/daemon/daemon.js +8 -1
- package/dist/lib/index/embedding-status.js +14 -0
- package/package.json +1 -1
- package/plugins/grepmax/.claude-plugin/plugin.json +1 -1
|
@@ -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.25.
|
|
13
|
+
"version": "0.25.1",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Robert Owens",
|
|
16
16
|
"email": "robowens@me.com"
|
package/README.md
CHANGED
|
@@ -343,6 +343,10 @@ gmax status # reports current / legacy / stale / unbuilt
|
|
|
343
343
|
gmax repair --rebuild # guarded whole-corpus rebuild through the daemon
|
|
344
344
|
```
|
|
345
345
|
|
|
346
|
+
`legacy` means the existing index is compatible but its exact model fingerprint was inferred from
|
|
347
|
+
the previous registry shape. Run `gmax index` in that project to persist exact identity; no reset or
|
|
348
|
+
re-embedding is required when the cached files are unchanged.
|
|
349
|
+
|
|
346
350
|
A model change cannot be applied by a per-project `gmax index --reset`, even when vector widths
|
|
347
351
|
match: one query embedding cannot safely search rows from another embedding space. Stale-generation
|
|
348
352
|
search and sync fail before mutation, preserving the existing index. Run `gmax repair --rebuild` to
|
package/dist/commands/config.js
CHANGED
|
@@ -48,7 +48,13 @@ Examples:
|
|
|
48
48
|
const identity = (0, embedding_status_1.projectEmbeddingStatus)(project, globalConfig);
|
|
49
49
|
console.log(` Configured: ${identity.configured.tier} ${identity.configured.vectorDim}d [${(0, embedding_status_1.embeddingFingerprintLabel)(identity.configured.fingerprint)}]`);
|
|
50
50
|
if (identity.built) {
|
|
51
|
-
|
|
51
|
+
const builtLabel = identity.state === "legacy" ? "Built (inferred):" : "Built:";
|
|
52
|
+
console.log(` ${builtLabel.padEnd(18)} ${identity.built.tier} ${identity.built.vectorDim}d [${(0, embedding_status_1.embeddingFingerprintLabel)(identity.built.fingerprint)}] (${identity.state})`);
|
|
53
|
+
if (identity.state === "legacy") {
|
|
54
|
+
const notice = (0, embedding_status_1.formatLegacyEmbeddingNotice)(1);
|
|
55
|
+
if (notice)
|
|
56
|
+
console.log(` ${notice}`);
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
59
|
console.log(` Query log: ${globalConfig.queryLog ? "on" : "off"}`);
|
|
54
60
|
if (project === null || project === void 0 ? void 0 : project.lastIndexed) {
|
package/dist/commands/doctor.js
CHANGED
|
@@ -281,6 +281,7 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
281
281
|
});
|
|
282
282
|
const staleEmbeddingProjects = projects.filter((p) => p.status === "indexed" &&
|
|
283
283
|
(0, embedding_status_1.projectEmbeddingStatus)(p, globalConfig).state === "stale");
|
|
284
|
+
const legacyEmbeddingCount = (0, embedding_status_1.countLegacyEmbeddingProjects)(projects, globalConfig);
|
|
284
285
|
if (opts.agent) {
|
|
285
286
|
const fields = [
|
|
286
287
|
"index_health",
|
|
@@ -297,6 +298,7 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
297
298
|
`orphaned=${orphanedProjects.length}`,
|
|
298
299
|
`stale_chunker=${staleChunkerProjects.length}`,
|
|
299
300
|
`stale_embedding=${staleEmbeddingProjects.length}`,
|
|
301
|
+
`legacy_embedding=${legacyEmbeddingCount}`,
|
|
300
302
|
`schema_dim=${physicalDim !== null && physicalDim !== void 0 ? physicalDim : "none"}`,
|
|
301
303
|
`schema_dim_ok=${schemaGap ? "false" : "true"}`,
|
|
302
304
|
];
|
|
@@ -335,6 +337,11 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
335
337
|
"fix=gmax repair --rebuild",
|
|
336
338
|
].join("\t"));
|
|
337
339
|
}
|
|
340
|
+
const legacyNotice = (0, embedding_status_1.formatLegacyEmbeddingNotice)(legacyEmbeddingCount, {
|
|
341
|
+
agent: true,
|
|
342
|
+
});
|
|
343
|
+
if (legacyNotice)
|
|
344
|
+
console.log(legacyNotice);
|
|
338
345
|
}
|
|
339
346
|
else {
|
|
340
347
|
console.log("\nIndex Health\n");
|
|
@@ -411,6 +418,9 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
411
418
|
console.log(` - ${p.name || path.basename(p.root)} (${identity.built.tier} ${identity.built.vectorDim}d → ${identity.configured.tier} ${identity.configured.vectorDim}d, breaking)`);
|
|
412
419
|
});
|
|
413
420
|
}
|
|
421
|
+
const legacyNotice = (0, embedding_status_1.formatLegacyEmbeddingNotice)(legacyEmbeddingCount);
|
|
422
|
+
if (legacyNotice)
|
|
423
|
+
console.log(legacyNotice);
|
|
414
424
|
// Projects
|
|
415
425
|
if (orphanedProjects.length > 0) {
|
|
416
426
|
console.log(`WARN Orphaned projects: ${orphanedProjects.length} (directories no longer exist)`);
|
package/dist/commands/list.js
CHANGED
|
@@ -141,6 +141,11 @@ function showCurrentProject() {
|
|
|
141
141
|
if (identity.built) {
|
|
142
142
|
console.log(`${style.dim("Built embedding")}: ${identity.built.tier} (${identity.built.vectorDim}d, ${identity.state})`);
|
|
143
143
|
}
|
|
144
|
+
if (identity.state === "legacy") {
|
|
145
|
+
const notice = (0, embedding_status_1.formatLegacyEmbeddingNotice)(1);
|
|
146
|
+
if (notice)
|
|
147
|
+
console.log(style.yellow(notice));
|
|
148
|
+
}
|
|
144
149
|
console.log(`${style.dim("Mode")}: ${globalConfig.embedMode}`);
|
|
145
150
|
if (project.lastIndexed)
|
|
146
151
|
console.log(`${style.dim("Indexed")}: ${formatDate(new Date(project.lastIndexed))}`);
|
|
@@ -184,6 +189,9 @@ function showAllProjects() {
|
|
|
184
189
|
console.log(`${pad(project.name, nameWidth)} ${style.dim(pad(shortenPath(project.root), pathWidth))} ${pad(dimsStr, 4)} ${status}`);
|
|
185
190
|
}
|
|
186
191
|
console.log(`\n${style.dim("Global config")}: ${globalConfig.modelTier} (${globalConfig.vectorDim}d), ${globalConfig.embedMode}`);
|
|
192
|
+
const legacyNotice = (0, embedding_status_1.formatLegacyEmbeddingNotice)((0, embedding_status_1.countLegacyEmbeddingProjects)(projects, globalConfig));
|
|
193
|
+
if (legacyNotice)
|
|
194
|
+
console.log(style.yellow(`\n${legacyNotice}`));
|
|
187
195
|
const stale = projects.filter((project) => (0, embedding_status_1.projectEmbeddingStatus)(project, globalConfig).state === "stale");
|
|
188
196
|
if (stale.length > 0) {
|
|
189
197
|
console.log(style.yellow(`\n${stale.length} project(s) use a stale embedding generation. Existing indexes are preserved; run 'gmax repair --rebuild' to rebuild the whole corpus.`));
|
package/dist/commands/status.js
CHANGED
|
@@ -161,6 +161,9 @@ Examples:
|
|
|
161
161
|
const identity = (0, embedding_status_1.projectEmbeddingStatus)(project, globalConfig);
|
|
162
162
|
console.log(`${project.name}\t${formatChunks(count)}\t${formatAge(project.lastIndexed)}\t${st}\tembedding=${identity.state}${isCurrent ? "\tcurrent" : ""}`);
|
|
163
163
|
}
|
|
164
|
+
const legacyNotice = (0, embedding_status_1.formatLegacyEmbeddingNotice)((0, embedding_status_1.countLegacyEmbeddingProjects)(projects, globalConfig), { agent: true });
|
|
165
|
+
if (legacyNotice)
|
|
166
|
+
console.log(legacyNotice);
|
|
164
167
|
yield (0, exit_1.gracefulExit)();
|
|
165
168
|
return;
|
|
166
169
|
}
|
|
@@ -199,6 +202,9 @@ Examples:
|
|
|
199
202
|
const name = project.name.padEnd(nameWidth);
|
|
200
203
|
console.log(` ${name} ${chunks.padEnd(12)} ${age.padEnd(10)} ${statusStr} embedding:${embedding}${marker}`);
|
|
201
204
|
}
|
|
205
|
+
const legacyNotice = (0, embedding_status_1.formatLegacyEmbeddingNotice)((0, embedding_status_1.countLegacyEmbeddingProjects)(projects, globalConfig));
|
|
206
|
+
if (legacyNotice)
|
|
207
|
+
console.log(`\n${style.yellow(legacyNotice)}`);
|
|
202
208
|
if (currentRoot) {
|
|
203
209
|
console.log(`\n${style.dim("Current")}: ${shortenPath(currentRoot)}`);
|
|
204
210
|
}
|
|
@@ -468,6 +468,13 @@ class Daemon {
|
|
|
468
468
|
return this.withProjectLock(root, signal, () => this.runSharedOperation("watch", signal, () => this.watchProjectWithinOperation(root)));
|
|
469
469
|
}
|
|
470
470
|
watchProjectWithinOperation(root) {
|
|
471
|
+
const project = (0, project_registry_1.getProject)(root);
|
|
472
|
+
if ((project === null || project === void 0 ? void 0 : project.status) === "indexed" &&
|
|
473
|
+
this.activeGeneration &&
|
|
474
|
+
(0, embedding_generation_1.compareEmbeddingGeneration)(project, this.activeGeneration).state ===
|
|
475
|
+
"stale") {
|
|
476
|
+
throw new Error("project embedding generation is stale; run gmax repair --rebuild to rebuild the whole corpus");
|
|
477
|
+
}
|
|
471
478
|
return this.watcherManager.watchProject(root);
|
|
472
479
|
}
|
|
473
480
|
runSharedOperation(name, signal, fn) {
|
|
@@ -738,7 +745,7 @@ class Daemon {
|
|
|
738
745
|
.state === "stale") {
|
|
739
746
|
(0, ipc_handler_1.writeDone)(conn, {
|
|
740
747
|
ok: false,
|
|
741
|
-
error: "project embedding generation is stale; rebuild the
|
|
748
|
+
error: "project embedding generation is stale; run gmax repair --rebuild to rebuild the whole corpus",
|
|
742
749
|
});
|
|
743
750
|
return;
|
|
744
751
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.projectEmbeddingStatus = projectEmbeddingStatus;
|
|
4
4
|
exports.embeddingFingerprintLabel = embeddingFingerprintLabel;
|
|
5
|
+
exports.countLegacyEmbeddingProjects = countLegacyEmbeddingProjects;
|
|
6
|
+
exports.formatLegacyEmbeddingNotice = formatLegacyEmbeddingNotice;
|
|
5
7
|
exports.assertEmbeddingSearchCompatible = assertEmbeddingSearchCompatible;
|
|
6
8
|
const embedding_generation_1 = require("./embedding-generation");
|
|
7
9
|
function projectEmbeddingStatus(project, config) {
|
|
@@ -15,6 +17,18 @@ function projectEmbeddingStatus(project, config) {
|
|
|
15
17
|
function embeddingFingerprintLabel(fingerprint) {
|
|
16
18
|
return fingerprint.slice(0, 12);
|
|
17
19
|
}
|
|
20
|
+
function countLegacyEmbeddingProjects(projects, config) {
|
|
21
|
+
return projects.filter((project) => projectEmbeddingStatus(project, config).state === "legacy").length;
|
|
22
|
+
}
|
|
23
|
+
function formatLegacyEmbeddingNotice(count, options) {
|
|
24
|
+
if (count === 0)
|
|
25
|
+
return null;
|
|
26
|
+
if (options === null || options === void 0 ? void 0 : options.agent) {
|
|
27
|
+
return `legacy_embedding\tcount=${count}\tstate=compatible_inferred\tfix=gmax index`;
|
|
28
|
+
}
|
|
29
|
+
const projects = count === 1 ? "project" : "projects";
|
|
30
|
+
return `INFO Legacy embedding: ${count} ${projects} compatible but inferred; run 'gmax index' in each project to persist exact identity.`;
|
|
31
|
+
}
|
|
18
32
|
function assertEmbeddingSearchCompatible(projects, config) {
|
|
19
33
|
const stale = projects.filter((project) => projectEmbeddingStatus(project, config).state === "stale");
|
|
20
34
|
if (stale.length === 0)
|
package/package.json
CHANGED