typegraph-mcp 0.9.3 → 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.3",
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.3",
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/cli.ts CHANGED
@@ -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/cli.js CHANGED
@@ -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.3",
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",