grepmax 0.26.42 → 0.26.44
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/NOTICE +6 -0
- package/README.md +7 -1
- package/dist/bin.js +4 -0
- package/dist/commands/doctor.js +23 -33
- package/dist/commands/mcp.js +144 -67
- package/dist/commands/project.js +0 -1
- package/dist/commands/similar.js +0 -1
- package/dist/commands/skeleton.js +0 -1
- package/dist/commands/status.js +35 -19
- package/dist/commands/surprises.js +0 -1
- package/dist/commands/symbols.js +0 -1
- package/dist/commands/watch.js +2 -1
- package/dist/eval-like-limit-probe.js +60 -41
- package/dist/lib/analysis/surprising-connections.js +4 -3
- package/dist/lib/daemon/daemon.js +36 -9
- package/dist/lib/daemon/graph-handler.js +33 -33
- package/dist/lib/daemon/ipc-handler.js +11 -10
- package/dist/lib/daemon/rows-handler.js +13 -51
- package/dist/lib/daemon/vector-handler.js +18 -17
- package/dist/lib/graph/graph-builder.js +33 -16
- package/dist/lib/graph/impact.js +9 -8
- package/dist/lib/index/index-config.js +2 -2
- package/dist/lib/llm/config.js +9 -3
- package/dist/lib/llm/tools.js +5 -4
- package/dist/lib/search/pagerank.js +2 -1
- package/dist/lib/search/searcher.js +5 -4
- package/dist/lib/skeleton/retriever.js +2 -1
- package/dist/lib/store/compaction-result.js +35 -0
- package/dist/lib/store/lance-sdk.js +46 -0
- package/dist/lib/store/vector-db.js +118 -31
- package/dist/lib/utils/cross-project.js +2 -2
- package/dist/lib/utils/doctor-optimize.js +81 -0
- package/dist/lib/utils/project-registry.js +8 -8
- package/dist/lib/utils/query-timeout.js +53 -13
- package/dist/lib/utils/store-access.js +6 -5
- package/dist/lib/utils/store-context.js +102 -0
- package/dist/lib/utils/stores.js +1 -1
- package/dist/vendor/lancedb/LICENSE +202 -0
- package/dist/vendor/lancedb/NODEJS_THIRD_PARTY_LICENSES.md +668 -0
- package/dist/vendor/lancedb/RUST_THIRD_PARTY_LICENSES.html +14607 -0
- package/dist/vendor/lancedb/arrow.d.ts +296 -0
- package/dist/vendor/lancedb/arrow.js +1145 -0
- package/dist/vendor/lancedb/arrow_type.d.ts +9 -0
- package/dist/vendor/lancedb/arrow_type.js +29 -0
- package/dist/vendor/lancedb/connection.d.ts +508 -0
- package/dist/vendor/lancedb/connection.js +298 -0
- package/dist/vendor/lancedb/embedding/embedding_function.d.ts +103 -0
- package/dist/vendor/lancedb/embedding/embedding_function.js +192 -0
- package/dist/vendor/lancedb/embedding/index.d.ts +37 -0
- package/dist/vendor/lancedb/embedding/index.js +108 -0
- package/dist/vendor/lancedb/embedding/openai.d.ts +16 -0
- package/dist/vendor/lancedb/embedding/openai.js +81 -0
- package/dist/vendor/lancedb/embedding/registry.d.ts +94 -0
- package/dist/vendor/lancedb/embedding/registry.js +221 -0
- package/dist/vendor/lancedb/embedding/transformers.d.ts +36 -0
- package/dist/vendor/lancedb/embedding/transformers.js +110 -0
- package/dist/vendor/lancedb/header.d.ts +162 -0
- package/dist/vendor/lancedb/header.js +217 -0
- package/dist/vendor/lancedb/index.d.ts +246 -0
- package/dist/vendor/lancedb/index.js +176 -0
- package/dist/vendor/lancedb/indices.d.ts +721 -0
- package/dist/vendor/lancedb/indices.js +166 -0
- package/dist/vendor/lancedb/license_header.txt +2 -0
- package/dist/vendor/lancedb/materialized_view.d.ts +69 -0
- package/dist/vendor/lancedb/materialized_view.js +112 -0
- package/dist/vendor/lancedb/merge.d.ts +104 -0
- package/dist/vendor/lancedb/merge.js +120 -0
- package/dist/vendor/lancedb/native.d.ts +1193 -0
- package/dist/vendor/lancedb/native.js +688 -0
- package/dist/vendor/lancedb/oauth.d.ts +66 -0
- package/dist/vendor/lancedb/oauth.js +15 -0
- package/dist/vendor/lancedb/otel.d.ts +26 -0
- package/dist/vendor/lancedb/otel.js +114 -0
- package/dist/vendor/lancedb/permutation.d.ts +143 -0
- package/dist/vendor/lancedb/permutation.js +184 -0
- package/dist/vendor/lancedb/provenance.json +6 -0
- package/dist/vendor/lancedb/query.d.ts +663 -0
- package/dist/vendor/lancedb/query.js +966 -0
- package/dist/vendor/lancedb/rerankers/index.d.ts +5 -0
- package/dist/vendor/lancedb/rerankers/index.js +19 -0
- package/dist/vendor/lancedb/rerankers/rrf.d.ts +14 -0
- package/dist/vendor/lancedb/rerankers/rrf.js +28 -0
- package/dist/vendor/lancedb/sanitize.d.ts +32 -0
- package/dist/vendor/lancedb/sanitize.js +544 -0
- package/dist/vendor/lancedb/scannable.d.ts +92 -0
- package/dist/vendor/lancedb/scannable.js +200 -0
- package/dist/vendor/lancedb/schema.d.ts +16 -0
- package/dist/vendor/lancedb/schema.js +387 -0
- package/dist/vendor/lancedb/table.d.ts +1069 -0
- package/dist/vendor/lancedb/table.js +498 -0
- package/dist/vendor/lancedb/util.d.ts +14 -0
- package/dist/vendor/lancedb/util.js +77 -0
- package/package.json +19 -7
- 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.26.
|
|
13
|
+
"version": "0.26.44",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Robert Owens",
|
|
16
16
|
"email": "robowens@me.com"
|
package/NOTICE
CHANGED
|
@@ -31,3 +31,9 @@ THIRD-PARTY DEPENDENCIES
|
|
|
31
31
|
|
|
32
32
|
This software depends on various open-source libraries. See package.json for
|
|
33
33
|
a complete list of dependencies and their respective licenses.
|
|
34
|
+
|
|
35
|
+
The distribution includes the unmodified JavaScript runtime from
|
|
36
|
+
@lancedb/lancedb 0.38.0 (https://github.com/lancedb/lancedb), licensed under
|
|
37
|
+
Apache-2.0. Its license and build provenance are included in dist/vendor/lancedb/.
|
|
38
|
+
Its optional provider dependency manifest is not distributed. Platform native
|
|
39
|
+
binaries are installed as separately pinned @lancedb packages.
|
package/README.md
CHANGED
|
@@ -126,7 +126,9 @@ Plugins auto-update when you run `npm install -g grepmax@latest` — no need to
|
|
|
126
126
|
|
|
127
127
|
### MCP Server
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
MCP is local-only: the client spawns it and communicates through stdin/stdout pipes. It has no HTTP, SSE, or TCP listener and cannot be reached over the network. The daemon socket is restricted to your user account.
|
|
130
|
+
|
|
131
|
+
`gmax mcp` starts a stdio-based MCP server for clients that support MCP but can't run shell commands (Cursor, Windsurf, custom agents). Search-backed tools use the singleton daemon when available, avoiding a separate embedding worker per MCP session, and use an in-process worker for supported offline/secondary-store access. An unsupported daemon command requires `gmax watch restart`.
|
|
130
132
|
|
|
131
133
|
| Tool | Description |
|
|
132
134
|
| --- | --- |
|
|
@@ -452,6 +454,10 @@ gmax watch restart # Restart daemon
|
|
|
452
454
|
|
|
453
455
|
Compaction pauses index writes, waits for pending writes to commit, and opens a fresh table snapshot for each attempt. Each optimize call makes at most two attempts. Before each attempt it checks current free space against twice the table's logical size plus the critical-space reserve (5 GB by default). If there is insufficient headroom, it skips the rewrite and logs the required space; search remains available. A successful prune can reclaim fragment copies left by failed attempts.
|
|
454
456
|
|
|
457
|
+
`~/.gmax/logs/daemon.log` records compaction attempts and outcomes, including duration, logical size, disk size before/after, free space, and bytes reclaimed. `gmax status --json` exposes the last outcome under `daemon.compaction`; its `at` timestamp identifies when it was recorded. Five-minute resource snapshots track footprint, RSS, heap, external/ArrayBuffer memory, Lance cache, workers and pending work for memory investigations. Reading status uses retained snapshots and does not scan the index directory. Logs rotate to `daemon.log.prev`.
|
|
458
|
+
|
|
459
|
+
`gmax doctor --fix` reports completed, skipped, failed, or unverified optimization. It exits nonzero when a requested optimization did not complete or an older daemon could not verify its outcome. A busy or failed daemon is never retried as a second writer in the CLI process.
|
|
460
|
+
|
|
455
461
|
### Known issues
|
|
456
462
|
|
|
457
463
|
Some log output looks alarming but is expected and self-healing. Before filing a bug, check
|
package/dist/bin.js
CHANGED
|
@@ -75,6 +75,10 @@ function selectHome() {
|
|
|
75
75
|
if (process.env.GMAX_HOME)
|
|
76
76
|
return;
|
|
77
77
|
const argv = process.argv.slice(2);
|
|
78
|
+
// These enumerate/route stores per request rather than pinning the process
|
|
79
|
+
// to its launch cwd's store. In particular an MCP session can serve both.
|
|
80
|
+
if (argv[0] === "mcp" || argv[0] === "status")
|
|
81
|
+
return;
|
|
78
82
|
const match = (0, stores_1.matchStore)(commandTarget(argv, process.cwd()));
|
|
79
83
|
if (match.kind === "primary")
|
|
80
84
|
return;
|
package/dist/commands/doctor.js
CHANGED
|
@@ -51,12 +51,14 @@ const commander_1 = require("commander");
|
|
|
51
51
|
const config_1 = require("../config");
|
|
52
52
|
const embedding_status_1 = require("../lib/index/embedding-status");
|
|
53
53
|
const index_config_1 = require("../lib/index/index-config");
|
|
54
|
+
const doctor_optimize_1 = require("../lib/utils/doctor-optimize");
|
|
54
55
|
const doctor_status_1 = require("../lib/utils/doctor-status");
|
|
55
56
|
const exit_1 = require("../lib/utils/exit");
|
|
56
57
|
const lock_1 = require("../lib/utils/lock");
|
|
57
58
|
const mlx_hf_cache_1 = require("../lib/utils/mlx-hf-cache");
|
|
58
59
|
const project_registry_1 = require("../lib/utils/project-registry");
|
|
59
60
|
const project_root_1 = require("../lib/utils/project-root");
|
|
61
|
+
const query_timeout_1 = require("../lib/utils/query-timeout");
|
|
60
62
|
const root_availability_1 = require("../lib/utils/root-availability");
|
|
61
63
|
const store_access_1 = require("../lib/utils/store-access");
|
|
62
64
|
function formatSize(bytes) {
|
|
@@ -343,7 +345,7 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
343
345
|
.option("--agent", "Compact output for AI agents", false)
|
|
344
346
|
.action((opts) => __awaiter(void 0, void 0, void 0, function* () {
|
|
345
347
|
var _a, _b;
|
|
346
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
348
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
347
349
|
if (!opts.agent)
|
|
348
350
|
console.log("gmax Doctor\n");
|
|
349
351
|
const root = config_1.PATHS.globalRoot;
|
|
@@ -488,7 +490,7 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
488
490
|
.query()
|
|
489
491
|
.where("length(summary) > 5")
|
|
490
492
|
.select(["id"])
|
|
491
|
-
.toArray()).length;
|
|
493
|
+
.toArray(query_timeout_1.QUERY_EXECUTION_OPTIONS)).length;
|
|
492
494
|
const coverage = (0, doctor_status_1.summaryCoverageStatus)(withSummary, totalChunks);
|
|
493
495
|
console.log(`${coverage.symbol} ${coverage.message}`);
|
|
494
496
|
}
|
|
@@ -572,7 +574,7 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
572
574
|
? "LOW"
|
|
573
575
|
: "ok";
|
|
574
576
|
}
|
|
575
|
-
catch (
|
|
577
|
+
catch (_p) { }
|
|
576
578
|
const staleChunkerProjects = projects.filter((p) => { var _a; return p.status === "indexed" &&
|
|
577
579
|
((_a = p.chunkerVersion) !== null && _a !== void 0 ? _a : 1) < config_1.CONFIG.CHUNKER_VERSION; });
|
|
578
580
|
const staleEmbeddingProjects = projects.filter((p) => p.status === "indexed" &&
|
|
@@ -787,7 +789,7 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
787
789
|
yield mc.close();
|
|
788
790
|
}
|
|
789
791
|
}
|
|
790
|
-
catch (
|
|
792
|
+
catch (_q) { }
|
|
791
793
|
}
|
|
792
794
|
}
|
|
793
795
|
// --fix auto-remediation
|
|
@@ -820,34 +822,22 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
820
822
|
// daemon up it owns compaction; without one we are the sole process
|
|
821
823
|
// and can do it in-process safely.
|
|
822
824
|
const { sendDaemonCommand } = yield Promise.resolve().then(() => __importStar(require("../lib/utils/daemon-client")));
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
const reason = String((_l = resp.error) !== null && _l !== void 0 ? _l : "");
|
|
830
|
-
// Fall back ONLY when nothing is listening. A daemon that is merely
|
|
831
|
-
// too old ("unknown command") or busy ("timeout") is still a live
|
|
832
|
-
// writer on the store, so optimizing here would recreate the
|
|
833
|
-
// two-writer case this routing exists to prevent.
|
|
834
|
-
const daemonAbsent = reason.includes("ECONNREFUSED") || reason.includes("ENOENT");
|
|
835
|
-
if (daemonAbsent) {
|
|
836
|
-
yield db.optimize(3, 0);
|
|
837
|
-
via = "in-process (no daemon)";
|
|
838
|
-
}
|
|
839
|
-
else if (reason.includes("unknown command")) {
|
|
840
|
-
via = "";
|
|
841
|
-
console.log("WARN Optimize skipped: the running daemon predates the optimize command. Restart it (gmax watch --daemon -b) and re-run.");
|
|
825
|
+
// Release the diagnostic reader before the daemon prunes old files.
|
|
826
|
+
yield db.close();
|
|
827
|
+
const report = yield (0, doctor_optimize_1.runDoctorOptimize)(() => sendDaemonCommand({ cmd: "optimize" }, { timeoutMs: 10 * 60 * 1000 }), () => __awaiter(void 0, void 0, void 0, function* () {
|
|
828
|
+
const repairDb = new VectorDB(config_1.PATHS.lancedbDir);
|
|
829
|
+
try {
|
|
830
|
+
return yield repairDb.optimize();
|
|
842
831
|
}
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
console.log(`WARN Optimize failed via daemon: ${reason}`);
|
|
832
|
+
finally {
|
|
833
|
+
yield repairDb.close();
|
|
846
834
|
}
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
835
|
+
}));
|
|
836
|
+
console.log((0, doctor_optimize_1.formatDoctorOptimize)(report, opts.agent));
|
|
837
|
+
if (report.status === "completed")
|
|
838
|
+
fixed++;
|
|
839
|
+
else
|
|
840
|
+
process.exitCode = 1;
|
|
851
841
|
}
|
|
852
842
|
// Only roots whose volume is mounted and whose directory is still gone
|
|
853
843
|
// reach this list — projects on an unplugged drive are classified
|
|
@@ -877,7 +867,7 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
877
867
|
const done = yield sendStreamingCommand({ cmd: "index", root: p.root, reset: true }, () => { }).catch((e) => ({ ok: false, error: String(e) }));
|
|
878
868
|
if (done.ok &&
|
|
879
869
|
(!("degraded" in done) || done.degraded !== true)) {
|
|
880
|
-
const chunks = (
|
|
870
|
+
const chunks = (_l = done.indexed) !== null && _l !== void 0 ? _l : 0;
|
|
881
871
|
if (opts.agent) {
|
|
882
872
|
console.log(`stale_chunker_reindexed\tname=${name}\tchunks=${chunks}`);
|
|
883
873
|
}
|
|
@@ -889,14 +879,14 @@ exports.doctor = new commander_1.Command("doctor")
|
|
|
889
879
|
else if (!opts.agent) {
|
|
890
880
|
const degraded = "degraded" in done && done.degraded === true;
|
|
891
881
|
const reason = degraded
|
|
892
|
-
? `${(
|
|
882
|
+
? `${(_m = ("scanErrors" in done ? done.scanErrors : 0)) !== null && _m !== void 0 ? _m : 0} scan errors, ${(_o = ("failedFiles" in done ? done.failedFiles : 0)) !== null && _o !== void 0 ? _o : 0} file failures`
|
|
893
883
|
: done.error;
|
|
894
884
|
console.log(`FAIL ${name}: reindex failed (${reason})`);
|
|
895
885
|
}
|
|
896
886
|
}
|
|
897
887
|
}
|
|
898
888
|
}
|
|
899
|
-
if (fixed === 0) {
|
|
889
|
+
if (fixed === 0 && !needsOptimize) {
|
|
900
890
|
if (!opts.agent)
|
|
901
891
|
console.log("ok Nothing to fix");
|
|
902
892
|
}
|