pi-goosedump 0.12.62 → 0.12.65

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.
Files changed (2) hide show
  1. package/dist/index.ts +8 -18
  2. package/package.json +2 -2
package/dist/index.ts CHANGED
@@ -11,7 +11,6 @@ import { execFile } from "node:child_process";
11
11
  import { accessSync, constants as fsConstants, existsSync, readFileSync as readFileSync2, statSync } from "node:fs";
12
12
  import { createRequire } from "node:module";
13
13
  import { dirname, isAbsolute, join } from "node:path";
14
- import { fileURLToPath } from "node:url";
15
14
 
16
15
  // src/format.ts
17
16
  import { Value } from "typebox/value";
@@ -404,18 +403,9 @@ function resolveNativePackageTable() {
404
403
  try {
405
404
  const wrapperRequire = createRequire(resolveGoosedumpBinary());
406
405
  return wrapperRequire.resolve(`./${NATIVE_PACKAGE_TABLE}`);
407
- } catch {}
408
- let dir = dirname(fileURLToPath(import.meta.url));
409
- for (let i = 0;i < 8; i++) {
410
- const candidate = join(dir, "bin", NATIVE_PACKAGE_TABLE);
411
- if (existsSync(candidate))
412
- return candidate;
413
- const parent = dirname(dir);
414
- if (parent === dir)
415
- break;
416
- dir = parent;
406
+ } catch (cause) {
407
+ throw new Error("broken pi-goosedump installation: cannot resolve the native package table from @jarkkojs/goosedump-api", { cause });
417
408
  }
418
- throw new Error("broken pi-goosedump installation: cannot resolve the native package table from @jarkkojs/goosedump-api");
419
409
  }
420
410
  function loadNativeGoosedumpPackages() {
421
411
  const table = JSON.parse(readFileSync2(resolveNativePackageTable(), "utf8"));
@@ -1164,17 +1154,17 @@ class CompactionRuntime {
1164
1154
  if (event.customInstructions?.trim()) {
1165
1155
  if (this.compactionState.phase === "running")
1166
1156
  return { cancel: true };
1167
- const operation2 = ++this.operationGeneration;
1157
+ const operation = ++this.operationGeneration;
1168
1158
  this.setCompactionState(ctx, {
1169
1159
  phase: "running",
1170
1160
  request: null,
1171
1161
  owner: "pi",
1172
- operation: operation2,
1162
+ operation,
1173
1163
  sessionGeneration: this.sessionGeneration,
1174
1164
  sessionFile: this.activeSessionFile,
1175
1165
  hookClaimed: true
1176
1166
  });
1177
- this.releasePiCompactionOnAbort(ctx, signal, operation2, this.sessionGeneration, this.activeSessionFile, null, event.reason);
1167
+ this.releasePiCompactionOnAbort(ctx, signal, operation, this.sessionGeneration, this.activeSessionFile, null, event.reason);
1178
1168
  return;
1179
1169
  }
1180
1170
  let operation;
@@ -2455,14 +2445,14 @@ async function runSearchPanel(ctx, query, executablePath) {
2455
2445
  if (error)
2456
2446
  return;
2457
2447
  if (mode === "detail") {
2458
- const maxScroll2 = Math.max(0, detailLines.length - VIEWPORT);
2448
+ const maxScroll = Math.max(0, detailLines.length - VIEWPORT);
2459
2449
  if (matchesKey(data, Key.up)) {
2460
2450
  detailScroll = Math.max(0, detailScroll - 1);
2461
2451
  tui.requestRender();
2462
2452
  return;
2463
2453
  }
2464
2454
  if (matchesKey(data, Key.down)) {
2465
- detailScroll = Math.min(maxScroll2, detailScroll + 1);
2455
+ detailScroll = Math.min(maxScroll, detailScroll + 1);
2466
2456
  tui.requestRender();
2467
2457
  return;
2468
2458
  }
@@ -2472,7 +2462,7 @@ async function runSearchPanel(ctx, query, executablePath) {
2472
2462
  return;
2473
2463
  }
2474
2464
  if (matchesKey(data, Key.pageDown)) {
2475
- detailScroll = Math.min(maxScroll2, detailScroll + VIEWPORT);
2465
+ detailScroll = Math.min(maxScroll, detailScroll + VIEWPORT);
2476
2466
  tui.requestRender();
2477
2467
  return;
2478
2468
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goosedump",
3
- "version": "0.12.62",
3
+ "version": "0.12.65",
4
4
  "description": "Pi extension for goosedump session search, durable memory, session management, and compaction",
5
5
  "keywords": [
6
6
  "compaction",
@@ -37,7 +37,7 @@
37
37
  "ci:test": "npm test"
38
38
  },
39
39
  "dependencies": {
40
- "@jarkkojs/goosedump-api": "^0.12.62"
40
+ "@jarkkojs/goosedump-api": "^0.12.65"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@earendil-works/pi-coding-agent": "^0.84.2",