pi-graphnav 0.3.0 → 0.3.2

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.
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The names match the CodeGraph MCP server's tools, so calls pass straight through.
5
5
  */
6
- import { Type } from "@earendil-works/pi-ai";
6
+ import { Type } from "typebox";
7
7
 
8
8
  const projectPath = Type.Optional(
9
9
  Type.String({ description: "Absolute path of another indexed project. Defaults to the current project." }),
@@ -139,6 +139,8 @@ export interface Deps {
139
139
  run?: Runner;
140
140
  spawn?: Spawner;
141
141
  breaker?: { threshold: number; resetMs: number };
142
+ /** How long the gate waits for its index probe before failing open (default 2000 ms). */
143
+ probeTimeoutMs?: number;
142
144
  }
143
145
 
144
146
  const withTimeout = <T>(p: Promise<T>, ms: number): Promise<T> =>
@@ -329,7 +331,7 @@ export function createExtension(deps: Deps = {}) {
329
331
  await Promise.all(
330
332
  unknown.map(async (sym) => {
331
333
  try {
332
- const res = await withTimeout(server(root).call("codegraph_search", { query: leafOf(sym), limit: 25, projectPath: root }), 2000);
334
+ const res = await withTimeout(server(root).call("codegraph_search", { query: leafOf(sym), limit: 25, projectPath: root }), deps.probeTimeoutMs ?? 2000);
333
335
  if (res.isError) return;
334
336
  const at = definitionsIn(resultText(res), sym);
335
337
  if (at.length === 0) mem.unindexed.add(leafOf(sym));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-graphnav",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "CodeGraph-first code navigation for pi: persistent index, auto init/sync, and a gate that steers structural searches to codegraph_* tools.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -42,12 +42,13 @@
42
42
  "minimatch": "11.0.3"
43
43
  },
44
44
  "devDependencies": {
45
- "@earendil-works/pi-coding-agent": "^1.4.0",
45
+ "@earendil-works/pi-ai": "^1.5.2",
46
+ "@earendil-works/pi-coding-agent": "^1.5.2",
46
47
  "@types/bun": "^1.4.4",
47
- "typescript": "^7.0.2",
48
- "@earendil-works/pi-ai": "^1.4.0"
48
+ "typebox": "^1.4.6",
49
+ "typescript": "^7.0.2"
49
50
  },
50
51
  "dependencies": {
51
- "arrow-resilience-kit": "^0.10.2"
52
+ "arrow-resilience-kit": "^0.10.6"
52
53
  }
53
54
  }