grepmax 0.26.66 → 0.26.67
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.67",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Robert Owens",
|
|
16
16
|
"email": "robowens@me.com"
|
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ gmax doctor # Health check
|
|
|
57
57
|
gmax doctor --fix # Repair checks; full-table maintenance is disabled
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
**Storage containment:** full-table compaction is disabled, including forced maintenance and doctor repair. Existing retained index copies are not reclaimed by this release. The verified prune-only recovery path is separate work; normal incremental indexing remains available when the host is healthy and not quarantined. A persistent host safety stop blocks mutation and normal daemon restart; an explicit read-only start can serve the retained index. Installing an update preserves existing quarantine. Speculative embedding warmup and maintenance timers are disabled.
|
|
60
|
+
**Storage containment:** full-table compaction is disabled, including forced maintenance and doctor repair. Existing retained index copies are not reclaimed by this release. The verified prune-only recovery path is separate work; normal incremental indexing remains available when the host is healthy and not quarantined. A persistent host safety stop blocks mutation and normal daemon restart; an explicit read-only start can serve the retained index. Installing an update preserves existing quarantine. Speculative embedding warmup and maintenance timers are disabled. Under the default `strict` host policy on macOS, startup, heavy queries, worker forks and MLX launches require known normal OS memory pressure and a healthy kernel-zone sample; warning or unavailable probes pause heavy work while the daemon serves bounded reads. The explicit `critical-only` policy keeps semantic search and indexing available under warning or unavailable probes. Known critical pressure still stops the daemon.
|
|
61
61
|
|
|
62
62
|
### Core Commands
|
|
63
63
|
|
|
@@ -495,6 +495,14 @@ Production recovery currently requires macOS, a persistent `autostart-disabled`
|
|
|
495
495
|
|
|
496
496
|
The child waits for launch and deletion admission tokens, with verified helper PID/start identity recorded as the primary exclusive owner. Existing readers retain exclusion if the parent dies while the helper is alive. Current/tagged/post-cutoff metadata is verified after pruning; recovery refuses more than 256 protected versions before deletion to bound verification. Interrupted attempts require verification and explicit acknowledgement before retry. Linux/APFS fixtures exercise native retention and interruption; supported production host admission is tested separately and still runs freshly for each operation.
|
|
497
497
|
|
|
498
|
+
For an operator-coordinated recovery window:
|
|
499
|
+
|
|
500
|
+
1. Check live host pressure and service availability first. Keep development online when recovery admission is already known to refuse. Preserve the configured normal-service policy and any pre-existing safety markers.
|
|
501
|
+
2. Once admission is plausible, create a private, durable task-owned autostart marker and gracefully close the identified daemon and its managed children. Verify shared store owners have drained. `--check` samples resource admission; it does not drain owners or acquire the exclusive prune lease.
|
|
502
|
+
3. Take a fresh bounded version/tag inventory after draining, with a shared lease and small native Session caches. Close that reader before pruning. Choose an explicit real-clock cutoff and verify the union of current, tagged and post-cutoff versions fits the 256-version verification bound. A snapshot from before resumed indexing is unsuitable; never silently move the cutoff to fit the bound.
|
|
503
|
+
4. Run one `recover --prune` with that current version and cutoff. Both `--store <value> recover` and `--store=<value> recover` preserve recovery's table-version option; the explicit `--table` selects the recovery store. Require a verified result and completed receipt before claiming recovery. Record signed table allocated-byte recovery separately from global filesystem free-space change.
|
|
504
|
+
5. Wait for the recovery child and helper to close before lifting exclusion. Clear only the unchanged marker created by this operation, then restore normal service and verify search/watcher health and unchanged configuration. If ownership or the marker changed, preserve containment and inspect it. An uncertain receipt requires retained-state inspection and explicit acknowledgement before another attempt; never automatically retry.
|
|
505
|
+
|
|
498
506
|
Explicit helper calls persist a private `.gmax-prune-state.json` receipt outside the table before deletion. Cancellation, invalid results, lost ownership and abandoned running receipts remain uncertain; a verified explicit retry records the prior uncertain attempt. Successful receipts include before/after file lengths, allocated bytes and filesystem free space. These measurements do not imply zero retained copies or a macOS physical-footprint cap. Current, tagged and post-cutoff versions are protected; unverified files are retained. Full-table rewriting remains disabled regardless of receipt state.
|
|
499
507
|
|
|
500
508
|
`~/.gmax/logs/daemon.log` records containment skips and retained historical compaction 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`.
|
|
@@ -570,7 +578,7 @@ grepmax is built upon the foundation of [mgrep](https://github.com/mixedbread-ai
|
|
|
570
578
|
|
|
571
579
|
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE).
|
|
572
580
|
|
|
573
|
-
On macOS, heavy work uses a shared resource ledger and a bounded batch footprint probe covering every gmax process and its children. Native stores, workers and model launches reserve headroom before allocating it.
|
|
581
|
+
On macOS, heavy work uses a shared resource ledger and a bounded batch footprint probe covering every gmax process and its children. Native stores, workers and model launches reserve headroom before allocating it. Under the default `strict` policy, warning or unknown measurements pause heavy work; known critical pressure persists a stop under either policy. The 6 GiB admission budget is a conservative scheduling threshold, not an OS-enforced memory cap. It may be lowered with `GMAX_RESOURCE_BUDGET_MB`. Existing safety markers remain in place after upgrades.
|
|
574
582
|
|
|
575
583
|
MCP sessions started before this resource policy must reconnect after upgrading before heavy work can resume. Keyword search through the bounded read service stays available while those sessions are running. Cached resource snapshots in `gmax status --json` distinguish aggregate physical footprint from daemon RSS.
|
|
576
584
|
|
package/dist/bin.js
CHANGED
|
@@ -39,9 +39,10 @@ exports.registeredForm = registeredForm;
|
|
|
39
39
|
// Entry point. Picks the gmax home before anything reads config.ts: a command
|
|
40
40
|
// aimed at a project under a secondary store's prefix (src/lib/utils/stores.ts)
|
|
41
41
|
// runs against that store, in-process, so the drive it lives on can always
|
|
42
|
-
// eject. Only Node built-ins and
|
|
42
|
+
// eject. Only Node built-ins and dependency-free routing helpers may load here.
|
|
43
43
|
const fs = __importStar(require("node:fs"));
|
|
44
44
|
const path = __importStar(require("node:path"));
|
|
45
|
+
const cli_command_1 = require("./lib/utils/cli-command");
|
|
45
46
|
const stores_1 = require("./lib/utils/stores");
|
|
46
47
|
const DIR_ARG_COMMANDS = new Set(["add", "remove"]);
|
|
47
48
|
function optionValue(argv, names) {
|
|
@@ -77,7 +78,9 @@ function selectHome() {
|
|
|
77
78
|
const argv = process.argv.slice(2);
|
|
78
79
|
// These enumerate/route stores per request rather than pinning the process
|
|
79
80
|
// to its launch cwd's store. In particular an MCP session can serve both.
|
|
80
|
-
if (argv[0] === "mcp" ||
|
|
81
|
+
if (argv[0] === "mcp" ||
|
|
82
|
+
argv[0] === "status" ||
|
|
83
|
+
(0, cli_command_1.explicitCommand)(argv) === "recover")
|
|
81
84
|
return;
|
|
82
85
|
const match = (0, stores_1.matchStore)(commandTarget(argv, process.cwd()));
|
|
83
86
|
if (match.kind === "primary")
|
package/dist/index.js
CHANGED
|
@@ -79,6 +79,7 @@ const symbols_1 = require("./commands/symbols");
|
|
|
79
79
|
const test_find_1 = require("./commands/test-find");
|
|
80
80
|
const trace_1 = require("./commands/trace");
|
|
81
81
|
const watch_1 = require("./commands/watch");
|
|
82
|
+
const cli_command_1 = require("./lib/utils/cli-command");
|
|
82
83
|
commander_1.program
|
|
83
84
|
.name("gmax")
|
|
84
85
|
.description("Semantic code search — finds code by meaning, not just strings")
|
|
@@ -165,6 +166,6 @@ opencode_1.uninstallOpencode._hidden = true;
|
|
|
165
166
|
commander_1.program.addCommand(opencode_1.uninstallOpencode);
|
|
166
167
|
// Recovery owns --version as a required table-version value. Keep the root
|
|
167
168
|
// package-version flag from consuming it; other commands retain global options.
|
|
168
|
-
if (process.argv
|
|
169
|
+
if ((0, cli_command_1.explicitCommand)(process.argv.slice(2)) === "recover")
|
|
169
170
|
commander_1.program.enablePositionalOptions();
|
|
170
171
|
commander_1.program.parse();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.explicitCommand = explicitCommand;
|
|
4
|
+
/** Find an explicit command after the root's --store option, without treating
|
|
5
|
+
* its value (which can itself be a command name) as the command. Root help and
|
|
6
|
+
* version flags retain their normal early-exit behavior. */
|
|
7
|
+
function explicitCommand(argv) {
|
|
8
|
+
for (let i = 0; i < argv.length; i++) {
|
|
9
|
+
const arg = argv[i];
|
|
10
|
+
if (arg === "--store") {
|
|
11
|
+
if (argv[i + 1] === undefined)
|
|
12
|
+
return undefined;
|
|
13
|
+
i++;
|
|
14
|
+
}
|
|
15
|
+
else if (arg.startsWith("--store=")) {
|
|
16
|
+
}
|
|
17
|
+
else if (arg === "--") {
|
|
18
|
+
return argv[i + 1];
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return arg.startsWith("-") ? undefined : arg;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
package/package.json
CHANGED