grepmax 0.26.76 → 0.26.77

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.76",
13
+ "version": "0.26.77",
14
14
  "author": {
15
15
  "name": "Robert Owens",
16
16
  "email": "robowens@me.com"
package/README.md CHANGED
@@ -532,7 +532,7 @@ Production recovery currently requires macOS, a persistent `autostart-disabled`
532
532
 
533
533
  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.
534
534
 
535
- If a short-lived client child exits or a process identity changes during memory sampling, a normal-pressure sample may measure the complete process set once more within the original deadline. It never accepts a partial total. Continued changes, unavailable measurements, and observed warning or critical pressure still refuse admission.
535
+ If a short-lived client child exits during memory sampling, confirmed dead processes can leave the sample while all surviving processes retain measured footprints. An uncertain exit, new process or changed identity requires a complete fresh measurement; a normal-pressure sample may do that once within the original deadline. It never accepts an unmeasured live process. Continued changes, unavailable measurements, and observed warning or critical pressure still refuse admission.
536
536
 
537
537
  For an operator-coordinated recovery window:
538
538
 
@@ -153,7 +153,17 @@ function sampleHostResources(extraPids = [], overrides = {}, extraGroups = []) {
153
153
  function sampleHostResourcesOnce(extraPids, overrides, extraGroups) {
154
154
  var _a;
155
155
  var _b, _c;
156
- const deps = Object.assign({ platform: process.platform, pid: process.pid, uid: (_b = (_a = process.getuid) === null || _a === void 0 ? void 0 : _a.call(process)) !== null && _b !== void 0 ? _b : -1, now: Date.now, monotonic: () => performance.now(), freeBytes: os.freemem, sampleTimeoutMs: exports.HOST_SAMPLE_TIMEOUT_MS, kernelProbeTimeoutMs: 500, run: (command, args, timeoutMs) => (0, node_child_process_1.execFileSync)(command, args, {
156
+ const deps = Object.assign({ platform: process.platform, pid: process.pid, uid: (_b = (_a = process.getuid) === null || _a === void 0 ? void 0 : _a.call(process)) !== null && _b !== void 0 ? _b : -1, now: Date.now, monotonic: () => performance.now(), freeBytes: os.freemem, processAlive: (pid) => {
157
+ try {
158
+ process.kill(pid, 0);
159
+ return true;
160
+ }
161
+ catch (error) {
162
+ if (error.code === "ESRCH")
163
+ return false;
164
+ throw new Error("process liveness unavailable");
165
+ }
166
+ }, sampleTimeoutMs: exports.HOST_SAMPLE_TIMEOUT_MS, kernelProbeTimeoutMs: 500, run: (command, args, timeoutMs) => (0, node_child_process_1.execFileSync)(command, args, {
157
167
  encoding: "utf8",
158
168
  timeout: timeoutMs,
159
169
  maxBuffer: 512 * 1024,
@@ -224,8 +234,19 @@ function sampleHostResourcesOnce(extraPids, overrides, extraGroups) {
224
234
  p.role,
225
235
  ];
226
236
  if (JSON.stringify(after.map(identity)) !==
227
- JSON.stringify(snapshot.processes.map(identity)))
228
- throw new Error("process inventory changed during sample");
237
+ JSON.stringify(snapshot.processes.map(identity))) {
238
+ // A verified exit releases memory. It need not invalidate measured
239
+ // survivors, even when the exiting child's footprint is unavailable.
240
+ // Additions, reuse, reparenting and uncertain liveness still require a
241
+ // complete fresh measurement; never treat them as zero-memory exits.
242
+ const previous = new Map(snapshot.processes.map((p) => [p.pid, p]));
243
+ if (after.some((p) => !previous.has(p.pid) ||
244
+ JSON.stringify(identity(p)) !==
245
+ JSON.stringify(identity(previous.get(p.pid)))) ||
246
+ snapshot.processes.some((p) => !after.some((q) => q.pid === p.pid) && deps.processAlive(p.pid)))
247
+ throw new Error("process inventory changed during sample");
248
+ snapshot.processes = after.map((p) => { var _a; return (Object.assign(Object.assign({}, p), { footprintMb: (_a = footprints.get(p.pid)) !== null && _a !== void 0 ? _a : null })); });
249
+ }
229
250
  if (snapshot.processes.some((p) => p.footprintMb === null))
230
251
  throw new Error("process footprint unavailable");
231
252
  snapshot.aggregateFootprintMb = snapshot.processes.reduce((sum, p) => sum + p.footprintMb, 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.26.76",
3
+ "version": "0.26.77",
4
4
  "author": "Robert Owens <78518764+reowens@users.noreply.github.com>",
5
5
  "homepage": "https://github.com/reowens/grepmax",
6
6
  "bugs": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.26.76",
3
+ "version": "0.26.77",
4
4
  "description": "Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.",
5
5
  "author": {
6
6
  "name": "Robert Owens",