typegraph-mcp 0.9.36 → 0.9.37

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.
package/cli.ts CHANGED
@@ -74,6 +74,7 @@ Practical rule:
74
74
  `.trimStart();
75
75
 
76
76
  const SNIPPET_MARKER = "## TypeScript Navigation (typegraph-mcp)";
77
+ const CLAUDE_NODE_PLACEHOLDER = "__TYPEGRAPH_NODE__";
77
78
 
78
79
  const PLUGIN_DIR_NAME = "plugins/typegraph-mcp";
79
80
 
@@ -151,6 +152,14 @@ const SKILL_FILES = [
151
152
  "skills/deep-survey/SKILL.md",
152
153
  ];
153
154
 
155
+ const CLAUDE_TEMPLATE_FILES = new Set([
156
+ "commands/check.md",
157
+ "commands/test.md",
158
+ "commands/bench.md",
159
+ "commands/deep-survey.md",
160
+ "skills/deep-survey/SKILL.md",
161
+ ]);
162
+
154
163
 
155
164
  const SKILL_NAMES = [
156
165
  "tool-selection",
@@ -810,7 +819,14 @@ async function setup(yes: boolean): Promise<void> {
810
819
  const src = path.join(sourceDir, file);
811
820
  const dest = path.join(targetDir, file);
812
821
  if (fs.existsSync(src)) {
813
- copyFile(src, dest);
822
+ if (selectedAgents.includes("claude-code") && CLAUDE_TEMPLATE_FILES.has(file)) {
823
+ const content = fs.readFileSync(src, "utf-8")
824
+ .replaceAll(CLAUDE_NODE_PLACEHOLDER, process.execPath);
825
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
826
+ fs.writeFileSync(dest, content);
827
+ } else {
828
+ copyFile(src, dest);
829
+ }
814
830
  copied++;
815
831
  } else {
816
832
  p.log.warn(`Source file not found: ${file}`);
@@ -822,8 +838,8 @@ async function setup(yes: boolean): Promise<void> {
822
838
  const mcpConfig = {
823
839
  mcpServers: {
824
840
  typegraph: {
825
- command: "npx",
826
- args: ["tsx", "${CLAUDE_PLUGIN_ROOT}/server.ts"],
841
+ command: process.execPath,
842
+ args: ["${CLAUDE_PLUGIN_ROOT}/node_modules/tsx/dist/cli.mjs", "${CLAUDE_PLUGIN_ROOT}/server.ts"],
827
843
  env: {
828
844
  TYPEGRAPH_PROJECT_ROOT: ".",
829
845
  TYPEGRAPH_TSCONFIG: "./tsconfig.json",
package/commands/bench.md CHANGED
@@ -12,7 +12,7 @@ Run benchmarks to measure typegraph-mcp performance on this project.
12
12
  1. Run the benchmark command:
13
13
 
14
14
  ```bash
15
- npx tsx ${CLAUDE_PLUGIN_ROOT}/cli.ts bench
15
+ "__TYPEGRAPH_NODE__" "${CLAUDE_PLUGIN_ROOT}/node_modules/tsx/dist/cli.mjs" "${CLAUDE_PLUGIN_ROOT}/cli.ts" bench
16
16
  ```
17
17
 
18
18
  2. Parse the output and report results:
package/commands/check.md CHANGED
@@ -12,7 +12,7 @@ Run health checks to verify typegraph-mcp is correctly set up for this project.
12
12
  1. Run the health check command:
13
13
 
14
14
  ```bash
15
- npx tsx ${CLAUDE_PLUGIN_ROOT}/cli.ts check
15
+ "__TYPEGRAPH_NODE__" "${CLAUDE_PLUGIN_ROOT}/node_modules/tsx/dist/cli.mjs" "${CLAUDE_PLUGIN_ROOT}/cli.ts" check
16
16
  ```
17
17
 
18
18
  2. Parse the output and report results:
@@ -23,7 +23,7 @@ Follow the phases below in order. Each phase produces findings.
23
23
 
24
24
  Run the health check first:
25
25
  ```bash
26
- npx tsx ${CLAUDE_PLUGIN_ROOT}/cli.ts check
26
+ "__TYPEGRAPH_NODE__" "${CLAUDE_PLUGIN_ROOT}/node_modules/tsx/dist/cli.mjs" "${CLAUDE_PLUGIN_ROOT}/cli.ts" check
27
27
  ```
28
28
 
29
29
  Record three numbers from the output:
package/commands/test.md CHANGED
@@ -12,7 +12,7 @@ Run smoke tests that exercise all 14 tools against the current project.
12
12
  1. Run the smoke test command:
13
13
 
14
14
  ```bash
15
- npx tsx ${CLAUDE_PLUGIN_ROOT}/cli.ts test
15
+ "__TYPEGRAPH_NODE__" "${CLAUDE_PLUGIN_ROOT}/node_modules/tsx/dist/cli.mjs" "${CLAUDE_PLUGIN_ROOT}/cli.ts" test
16
16
  ```
17
17
 
18
18
  2. Parse the output and report results:
package/dist/cli.js CHANGED
@@ -2941,6 +2941,7 @@ Practical rule:
2941
2941
  - combine both when a task spans TypeScript code and surrounding docs/config
2942
2942
  `.trimStart();
2943
2943
  var SNIPPET_MARKER = "## TypeScript Navigation (typegraph-mcp)";
2944
+ var CLAUDE_NODE_PLACEHOLDER = "__TYPEGRAPH_NODE__";
2944
2945
  var PLUGIN_DIR_NAME = "plugins/typegraph-mcp";
2945
2946
  var AGENT_IDS = ["claude-code", "cursor", "codex", "gemini", "copilot"];
2946
2947
  var AGENTS = {
@@ -3007,6 +3008,13 @@ var SKILL_FILES = [
3007
3008
  "skills/code-exploration/SKILL.md",
3008
3009
  "skills/deep-survey/SKILL.md"
3009
3010
  ];
3011
+ var CLAUDE_TEMPLATE_FILES = /* @__PURE__ */ new Set([
3012
+ "commands/check.md",
3013
+ "commands/test.md",
3014
+ "commands/bench.md",
3015
+ "commands/deep-survey.md",
3016
+ "skills/deep-survey/SKILL.md"
3017
+ ]);
3010
3018
  var SKILL_NAMES = [
3011
3019
  "tool-selection",
3012
3020
  "impact-analysis",
@@ -3494,7 +3502,13 @@ async function setup(yes2) {
3494
3502
  const src = path9.join(sourceDir, file);
3495
3503
  const dest = path9.join(targetDir, file);
3496
3504
  if (fs8.existsSync(src)) {
3497
- copyFile(src, dest);
3505
+ if (selectedAgents.includes("claude-code") && CLAUDE_TEMPLATE_FILES.has(file)) {
3506
+ const content = fs8.readFileSync(src, "utf-8").replaceAll(CLAUDE_NODE_PLACEHOLDER, process.execPath);
3507
+ fs8.mkdirSync(path9.dirname(dest), { recursive: true });
3508
+ fs8.writeFileSync(dest, content);
3509
+ } else {
3510
+ copyFile(src, dest);
3511
+ }
3498
3512
  copied++;
3499
3513
  } else {
3500
3514
  p.log.warn(`Source file not found: ${file}`);
@@ -3504,8 +3518,8 @@ async function setup(yes2) {
3504
3518
  const mcpConfig = {
3505
3519
  mcpServers: {
3506
3520
  typegraph: {
3507
- command: "npx",
3508
- args: ["tsx", "${CLAUDE_PLUGIN_ROOT}/server.ts"],
3521
+ command: process.execPath,
3522
+ args: ["${CLAUDE_PLUGIN_ROOT}/node_modules/tsx/dist/cli.mjs", "${CLAUDE_PLUGIN_ROOT}/server.ts"],
3509
3523
  env: {
3510
3524
  TYPEGRAPH_PROJECT_ROOT: ".",
3511
3525
  TYPEGRAPH_TSCONFIG: "./tsconfig.json"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typegraph-mcp",
3
- "version": "0.9.36",
3
+ "version": "0.9.37",
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",
@@ -31,7 +31,7 @@ Follow the phases below in order. Each phase produces findings.
31
31
 
32
32
  Run the health check first:
33
33
  ```bash
34
- npx tsx ${CLAUDE_PLUGIN_ROOT}/cli.ts check
34
+ "__TYPEGRAPH_NODE__" "${CLAUDE_PLUGIN_ROOT}/node_modules/tsx/dist/cli.mjs" "${CLAUDE_PLUGIN_ROOT}/cli.ts" check
35
35
  ```
36
36
 
37
37
  Record three numbers from the output: