typegraph-mcp 0.9.2 → 0.9.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typegraph",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "Type-aware TypeScript navigation — 14 MCP tools for go-to-definition, find-references, dependency graphs, cycle detection, and impact analysis",
5
5
  "author": {
6
6
  "name": "Owen Jones"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typegraph",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "Type-aware TypeScript navigation — 14 MCP tools for go-to-definition, find-references, dependency graphs, cycle detection, and impact analysis",
5
5
  "author": {
6
6
  "name": "Owen Jones"
package/README.md CHANGED
@@ -48,7 +48,7 @@ Agent: ts_trace_chain({ file: "src/handlers.ts", symbol: "createUser" })
48
48
  ```bash
49
49
  # Clone and install
50
50
  git clone https://github.com/guyowen/typegraph-mcp.git ~/typegraph-mcp
51
- cd ~/typegraph-mcp && pnpm install
51
+ cd ~/typegraph-mcp && npm install
52
52
 
53
53
  # Load the plugin
54
54
  claude --plugin-dir ~/typegraph-mcp
@@ -65,7 +65,7 @@ The plugin auto-configures everything:
65
65
  ```bash
66
66
  # Clone and install
67
67
  git clone https://github.com/guyowen/typegraph-mcp.git ~/typegraph-mcp
68
- cd ~/typegraph-mcp && pnpm install
68
+ cd ~/typegraph-mcp && npm install
69
69
 
70
70
  # Run setup from your project root
71
71
  cd /path/to/your-ts-project
@@ -115,7 +115,7 @@ First query takes ~2s (tsserver warmup). Subsequent queries: 1–60ms.
115
115
 
116
116
  - **Node.js** >= 18
117
117
  - **TypeScript** >= 5.0 in the target project (`node_modules`)
118
- - **pnpm** (or npm) for installing typegraph-mcp dependencies
118
+ - **npm** for installing typegraph-mcp dependencies
119
119
 
120
120
  ## CLI
121
121
 
@@ -435,7 +435,7 @@ npx tsx ~/typegraph-mcp/cli.ts check
435
435
 
436
436
  | Symptom | Likely cause | Fix |
437
437
  |---|---|---|
438
- | Server won't start | Dependencies missing | `cd /path/to/typegraph-mcp && pnpm install` |
438
+ | Server won't start | Dependencies missing | `cd /path/to/typegraph-mcp && npm install` |
439
439
  | "TypeScript not found" | Target project missing TS | Add `typescript` to devDependencies |
440
440
  | Tools return empty results | tsconfig misconfigured | Check `TYPEGRAPH_TSCONFIG` points to the right file |
441
441
  | MCP registration not found | Wrong path in config | Verify the `args` path to `server.ts` is absolute |
package/check.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * npx tsx plugins/typegraph-mcp/check.ts
7
7
  *
8
8
  * Or from plugins/typegraph-mcp/:
9
- * pnpm check
9
+ * npm run check
10
10
  */
11
11
 
12
12
  import * as fs from "node:fs";
@@ -170,7 +170,7 @@ export async function main(configOverride?: TypegraphConfig): Promise<CheckResul
170
170
  } catch {
171
171
  fail(
172
172
  "TypeScript not found in project",
173
- "Add `typescript` to devDependencies and run `pnpm install`"
173
+ "Add `typescript` to devDependencies and run `npm install`"
174
174
  );
175
175
  }
176
176
 
@@ -251,10 +251,10 @@ export async function main(configOverride?: TypegraphConfig): Promise<CheckResul
251
251
  if (missing.length === 0) {
252
252
  pass(`Dependencies installed (${requiredPkgs.length} packages)`);
253
253
  } else {
254
- fail(`Missing packages: ${missing.join(", ")}`, `Run \`cd ${toolRelPath} && pnpm install\``);
254
+ fail(`Missing packages: ${missing.join(", ")}`, `Run \`cd ${toolRelPath} && npm install\``);
255
255
  }
256
256
  } else {
257
- fail("typegraph-mcp dependencies not installed", `Run \`cd ${toolRelPath} && pnpm install\``);
257
+ fail("typegraph-mcp dependencies not installed", `Run \`cd ${toolRelPath} && npm install\``);
258
258
  }
259
259
 
260
260
  // 7. oxc-parser smoke test
@@ -267,13 +267,13 @@ export async function main(configOverride?: TypegraphConfig): Promise<CheckResul
267
267
  } else {
268
268
  fail(
269
269
  "oxc-parser parseSync returned unexpected result",
270
- `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && pnpm install\``
270
+ `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && npm install\``
271
271
  );
272
272
  }
273
273
  } catch (err) {
274
274
  fail(
275
275
  `oxc-parser failed: ${err instanceof Error ? err.message : String(err)}`,
276
- `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && pnpm install\``
276
+ `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && npm install\``
277
277
  );
278
278
  }
279
279
 
@@ -307,7 +307,7 @@ export async function main(configOverride?: TypegraphConfig): Promise<CheckResul
307
307
  } catch (err) {
308
308
  fail(
309
309
  `oxc-resolver failed: ${err instanceof Error ? err.message : String(err)}`,
310
- `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && pnpm install\``
310
+ `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && npm install\``
311
311
  );
312
312
  }
313
313
 
package/cli.ts CHANGED
@@ -111,7 +111,7 @@ const CORE_FILES = [
111
111
  "smoke-test.ts",
112
112
  "cli.ts",
113
113
  "package.json",
114
- "pnpm-lock.yaml",
114
+ "package-lock.json",
115
115
  ];
116
116
 
117
117
  /** Skill files inside plugin dir (Claude Code + Cursor discover from skills/) */
@@ -709,17 +709,29 @@ async function remove(yes: boolean): Promise<void> {
709
709
 
710
710
  // ─── Check Command ───────────────────────────────────────────────────────────
711
711
 
712
+ function resolvePluginDir(): string {
713
+ // Prefer the installed plugin in the user's project over the npx cache
714
+ const installed = path.resolve(process.cwd(), PLUGIN_DIR_NAME);
715
+ if (fs.existsSync(installed)) return installed;
716
+ // Fall back to the source directory (running from the repo itself)
717
+ return path.basename(import.meta.dirname) === "dist"
718
+ ? path.resolve(import.meta.dirname, "..")
719
+ : import.meta.dirname;
720
+ }
721
+
712
722
  async function check(): Promise<void> {
723
+ const config = resolveConfig(resolvePluginDir());
713
724
  const { main: checkMain } = await import("./check.js");
714
- const result = await checkMain();
725
+ const result = await checkMain(config);
715
726
  process.exit(result.failed > 0 ? 1 : 0);
716
727
  }
717
728
 
718
729
  // ─── Test Command ────────────────────────────────────────────────────────────
719
730
 
720
731
  async function test(): Promise<void> {
732
+ const config = resolveConfig(resolvePluginDir());
721
733
  const { main: testMain } = await import("./smoke-test.js");
722
- const result = await testMain();
734
+ const result = await testMain(config);
723
735
  process.exit(result.failed > 0 ? 1 : 0);
724
736
  }
725
737
 
package/dist/check.js CHANGED
@@ -132,7 +132,7 @@ async function main(configOverride) {
132
132
  } catch {
133
133
  fail(
134
134
  "TypeScript not found in project",
135
- "Add `typescript` to devDependencies and run `pnpm install`"
135
+ "Add `typescript` to devDependencies and run `npm install`"
136
136
  );
137
137
  }
138
138
  const tsconfigAbs = path2.resolve(projectRoot, tsconfigPath);
@@ -204,10 +204,10 @@ async function main(configOverride) {
204
204
  if (missing.length === 0) {
205
205
  pass(`Dependencies installed (${requiredPkgs.length} packages)`);
206
206
  } else {
207
- fail(`Missing packages: ${missing.join(", ")}`, `Run \`cd ${toolRelPath} && pnpm install\``);
207
+ fail(`Missing packages: ${missing.join(", ")}`, `Run \`cd ${toolRelPath} && npm install\``);
208
208
  }
209
209
  } else {
210
- fail("typegraph-mcp dependencies not installed", `Run \`cd ${toolRelPath} && pnpm install\``);
210
+ fail("typegraph-mcp dependencies not installed", `Run \`cd ${toolRelPath} && npm install\``);
211
211
  }
212
212
  try {
213
213
  const oxcParserReq = createRequire(path2.join(toolDir, "package.json"));
@@ -218,13 +218,13 @@ async function main(configOverride) {
218
218
  } else {
219
219
  fail(
220
220
  "oxc-parser parseSync returned unexpected result",
221
- `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && pnpm install\``
221
+ `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && npm install\``
222
222
  );
223
223
  }
224
224
  } catch (err) {
225
225
  fail(
226
226
  `oxc-parser failed: ${err instanceof Error ? err.message : String(err)}`,
227
- `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && pnpm install\``
227
+ `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && npm install\``
228
228
  );
229
229
  }
230
230
  try {
@@ -254,7 +254,7 @@ async function main(configOverride) {
254
254
  } catch (err) {
255
255
  fail(
256
256
  `oxc-resolver failed: ${err instanceof Error ? err.message : String(err)}`,
257
- `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && pnpm install\``
257
+ `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && npm install\``
258
258
  );
259
259
  }
260
260
  if (tsVersion) {
package/dist/cli.js CHANGED
@@ -148,7 +148,7 @@ async function main(configOverride) {
148
148
  } catch {
149
149
  fail(
150
150
  "TypeScript not found in project",
151
- "Add `typescript` to devDependencies and run `pnpm install`"
151
+ "Add `typescript` to devDependencies and run `npm install`"
152
152
  );
153
153
  }
154
154
  const tsconfigAbs = path2.resolve(projectRoot2, tsconfigPath2);
@@ -220,10 +220,10 @@ async function main(configOverride) {
220
220
  if (missing.length === 0) {
221
221
  pass(`Dependencies installed (${requiredPkgs.length} packages)`);
222
222
  } else {
223
- fail(`Missing packages: ${missing.join(", ")}`, `Run \`cd ${toolRelPath} && pnpm install\``);
223
+ fail(`Missing packages: ${missing.join(", ")}`, `Run \`cd ${toolRelPath} && npm install\``);
224
224
  }
225
225
  } else {
226
- fail("typegraph-mcp dependencies not installed", `Run \`cd ${toolRelPath} && pnpm install\``);
226
+ fail("typegraph-mcp dependencies not installed", `Run \`cd ${toolRelPath} && npm install\``);
227
227
  }
228
228
  try {
229
229
  const oxcParserReq = createRequire(path2.join(toolDir, "package.json"));
@@ -234,13 +234,13 @@ async function main(configOverride) {
234
234
  } else {
235
235
  fail(
236
236
  "oxc-parser parseSync returned unexpected result",
237
- `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && pnpm install\``
237
+ `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && npm install\``
238
238
  );
239
239
  }
240
240
  } catch (err) {
241
241
  fail(
242
242
  `oxc-parser failed: ${err instanceof Error ? err.message : String(err)}`,
243
- `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && pnpm install\``
243
+ `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && npm install\``
244
244
  );
245
245
  }
246
246
  try {
@@ -270,7 +270,7 @@ async function main(configOverride) {
270
270
  } catch (err) {
271
271
  fail(
272
272
  `oxc-resolver failed: ${err instanceof Error ? err.message : String(err)}`,
273
- `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && pnpm install\``
273
+ `Reinstall: \`cd ${toolRelPath} && rm -rf node_modules && npm install\``
274
274
  );
275
275
  }
276
276
  if (tsVersion) {
@@ -2338,7 +2338,7 @@ var CORE_FILES = [
2338
2338
  "smoke-test.ts",
2339
2339
  "cli.ts",
2340
2340
  "package.json",
2341
- "pnpm-lock.yaml"
2341
+ "package-lock.json"
2342
2342
  ];
2343
2343
  var SKILL_FILES = [
2344
2344
  "skills/tool-selection/SKILL.md",
@@ -2782,14 +2782,21 @@ async function remove(yes2) {
2782
2782
  }
2783
2783
  await removePlugin(projectRoot2, pluginDir);
2784
2784
  }
2785
+ function resolvePluginDir() {
2786
+ const installed = path8.resolve(process.cwd(), PLUGIN_DIR_NAME);
2787
+ if (fs7.existsSync(installed)) return installed;
2788
+ return path8.basename(import.meta.dirname) === "dist" ? path8.resolve(import.meta.dirname, "..") : import.meta.dirname;
2789
+ }
2785
2790
  async function check() {
2791
+ const config = resolveConfig(resolvePluginDir());
2786
2792
  const { main: checkMain } = await Promise.resolve().then(() => (init_check(), check_exports));
2787
- const result = await checkMain();
2793
+ const result = await checkMain(config);
2788
2794
  process.exit(result.failed > 0 ? 1 : 0);
2789
2795
  }
2790
2796
  async function test() {
2797
+ const config = resolveConfig(resolvePluginDir());
2791
2798
  const { main: testMain } = await Promise.resolve().then(() => (init_smoke_test(), smoke_test_exports));
2792
- const result = await testMain();
2799
+ const result = await testMain(config);
2793
2800
  process.exit(result.failed > 0 ? 1 : 0);
2794
2801
  }
2795
2802
  async function start() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typegraph-mcp",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "Type-aware codebase navigation for AI coding agents — 14 MCP tools powered by tsserver + oxc",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,7 +17,7 @@
17
17
  "*.json",
18
18
  "README.md",
19
19
  "LICENSE",
20
- "pnpm-lock.yaml",
20
+ "package-lock.json",
21
21
  "skills/",
22
22
  "commands/",
23
23
  "hooks/",
@@ -44,10 +44,5 @@
44
44
  "@types/node": "^25.3.0",
45
45
  "tsup": "^8.5.0",
46
46
  "typescript": "^5.8.0"
47
- },
48
- "pnpm": {
49
- "onlyBuiltDependencies": [
50
- "esbuild"
51
- ]
52
47
  }
53
48
  }
@@ -20,13 +20,10 @@ fi
20
20
  echo "Installing typegraph-mcp dependencies..."
21
21
  cd "$PLUGIN_DIR"
22
22
 
23
- # Prefer pnpm, fall back to npm
24
- if command -v pnpm &> /dev/null; then
25
- pnpm install --frozen-lockfile 2>/dev/null || pnpm install
26
- elif command -v npm &> /dev/null; then
23
+ if command -v npm &> /dev/null; then
27
24
  npm install
28
25
  else
29
- echo "Warning: Neither pnpm nor npm found. Run 'npm install' in $PLUGIN_DIR manually."
26
+ echo "Warning: npm not found. Run 'npm install' in $PLUGIN_DIR manually."
30
27
  exit 1
31
28
  fi
32
29