dev3000 0.0.94 → 0.0.95

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 (28) hide show
  1. package/dist/dev-environment.d.ts.map +1 -1
  2. package/dist/dev-environment.js +14 -10
  3. package/dist/dev-environment.js.map +1 -1
  4. package/mcp-server/.next/BUILD_ID +1 -1
  5. package/mcp-server/.next/build-manifest.json +2 -2
  6. package/mcp-server/.next/fallback-build-manifest.json +2 -2
  7. package/mcp-server/.next/next-server.js.nft.json +1 -1
  8. package/mcp-server/.next/prerender-manifest.json +3 -3
  9. package/mcp-server/.next/server/app/_global-error.html +2 -2
  10. package/mcp-server/.next/server/app/_global-error.rsc +1 -1
  11. package/mcp-server/.next/server/app/_not-found.html +1 -1
  12. package/mcp-server/.next/server/app/_not-found.rsc +1 -1
  13. package/mcp-server/.next/server/app/index.html +1 -1
  14. package/mcp-server/.next/server/app/index.rsc +1 -1
  15. package/mcp-server/.next/server/chunks/[root-of-the-server]__94037b23._.js +1 -1
  16. package/mcp-server/.next/server/chunks/[root-of-the-server]__94037b23._.js.map +1 -1
  17. package/mcp-server/.next/server/chunks/[root-of-the-server]__cc74dbef._.js +1 -1
  18. package/mcp-server/.next/server/chunks/[root-of-the-server]__cc74dbef._.js.map +1 -1
  19. package/mcp-server/.next/server/chunks/[root-of-the-server]__dc0b0022._.js +1 -1
  20. package/mcp-server/.next/server/chunks/[root-of-the-server]__dc0b0022._.js.map +1 -1
  21. package/mcp-server/.next/server/server-reference-manifest.js +1 -1
  22. package/mcp-server/.next/server/server-reference-manifest.json +1 -1
  23. package/mcp-server/app/mcp/client-manager.ts +4 -3
  24. package/mcp-server/app/mcp/route.ts +52 -14
  25. package/package.json +1 -1
  26. /package/mcp-server/.next/static/{ZeZ7S325drnA0SH-odcGY → -TtqAPrTs-tn08AeRdCVu}/_buildManifest.js +0 -0
  27. /package/mcp-server/.next/static/{ZeZ7S325drnA0SH-odcGY → -TtqAPrTs-tn08AeRdCVu}/_clientMiddlewareManifest.json +0 -0
  28. /package/mcp-server/.next/static/{ZeZ7S325drnA0SH-odcGY → -TtqAPrTs-tn08AeRdCVu}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"Az3Ay/ZpgjzPNsVoQzRDLlh6S8/dSjBuLozeWfes2Dc=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"yJ8Wir2qY9hISgS2SlJOpE2LSkkJnCciW3Mi+u/baTU=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "Az3Ay/ZpgjzPNsVoQzRDLlh6S8/dSjBuLozeWfes2Dc="
4
+ "encryptionKey": "yJ8Wir2qY9hISgS2SlJOpE2LSkkJnCciW3Mi+u/baTU="
5
5
  }
@@ -40,7 +40,7 @@ export class MCPClientManager {
40
40
  */
41
41
  async initialize(config: {
42
42
  chromeDevtools?: { command: string; args: string[]; enabled: boolean }
43
- nextjsDev?: { url: string; enabled: boolean }
43
+ nextjsDev?: { command: string; args: string[]; enabled: boolean }
44
44
  }): Promise<void> {
45
45
  const configs: MCPClientConfig[] = []
46
46
 
@@ -57,8 +57,9 @@ export class MCPClientManager {
57
57
  if (config.nextjsDev?.enabled) {
58
58
  configs.push({
59
59
  name: "nextjs-dev",
60
- type: "http",
61
- url: config.nextjsDev.url,
60
+ type: "stdio",
61
+ command: config.nextjsDev.command,
62
+ args: config.nextjsDev.args,
62
63
  enabled: true
63
64
  })
64
65
  }
@@ -7,12 +7,20 @@ import { z } from "zod"
7
7
  import { getMCPClientManager } from "./client-manager"
8
8
  import { executeBrowserAction, findComponentSource, fixMyApp, restartDevServer, TOOL_DESCRIPTIONS } from "./tools"
9
9
 
10
- // Detect available package runner (npx, pnpm dlx, or fail)
10
+ // Detect available package runner (bunx, npx, pnpm dlx, or fail)
11
11
  const getPackageRunner = (): { command: string; args: string[] } | null => {
12
12
  try {
13
13
  const { execSync } = require("node:child_process")
14
14
 
15
- // Try npx first (most common)
15
+ // Try bunx first (fastest)
16
+ try {
17
+ execSync("bunx --version", { stdio: "ignore" })
18
+ return { command: "bunx", args: [] }
19
+ } catch {
20
+ // bunx not available
21
+ }
22
+
23
+ // Try npx (most common)
16
24
  try {
17
25
  execSync("npx --version", { stdio: "ignore" })
18
26
  return { command: "npx", args: ["-y"] }
@@ -28,7 +36,7 @@ const getPackageRunner = (): { command: string; args: string[] } | null => {
28
36
  // pnpm not available
29
37
  }
30
38
 
31
- console.error("[MCP Orchestrator] Neither npx nor pnpm found - cannot spawn chrome-devtools MCP")
39
+ console.error("[MCP Orchestrator] No package runner found (bunx, npx, or pnpm) - cannot spawn MCP servers")
32
40
  return null
33
41
  } catch (error) {
34
42
  console.error("[MCP Orchestrator] Failed to detect package runner:", error)
@@ -37,7 +45,7 @@ const getPackageRunner = (): { command: string; args: string[] } | null => {
37
45
  }
38
46
 
39
47
  // Initialize MCP client manager for orchestration
40
- // This will connect to chrome-devtools and nextjs-dev MCPs when available
48
+ // This will spawn and connect to chrome-devtools and next-devtools-mcp as stdio processes
41
49
  const initializeOrchestration = async () => {
42
50
  const clientManager = getMCPClientManager()
43
51
 
@@ -75,16 +83,8 @@ const initializeOrchestration = async () => {
75
83
  }
76
84
  }
77
85
 
78
- // Configure nextjs-dev MCP if app port is available
79
- if (sessionData.appPort && !config.nextjsDev) {
80
- config.nextjsDev = {
81
- url: `http://localhost:${sessionData.appPort}/_next/mcp`,
82
- enabled: true
83
- }
84
- }
85
-
86
- // Break if we have both MCPs
87
- if (config.chromeDevtools && config.nextjsDev) break
86
+ // Break early if we have chrome-devtools - only need one session for CDP URL
87
+ if (config.chromeDevtools) break
88
88
  } catch {
89
89
  // Skip invalid session files
90
90
  }
@@ -93,6 +93,21 @@ const initializeOrchestration = async () => {
93
93
  console.warn("[MCP Orchestrator] Failed to read session files:", error)
94
94
  }
95
95
 
96
+ // Configure next-devtools-mcp - always spawn as standalone stdio process
97
+ if (!config.nextjsDev) {
98
+ const runner = getPackageRunner()
99
+
100
+ if (runner) {
101
+ config.nextjsDev = {
102
+ command: runner.command,
103
+ args: [...runner.args, "next-devtools-mcp@latest"],
104
+ enabled: true
105
+ }
106
+ } else {
107
+ console.warn("[MCP Orchestrator] Cannot configure next-devtools-mcp: no package runner available")
108
+ }
109
+ }
110
+
96
111
  return config
97
112
  }
98
113
 
@@ -176,6 +191,29 @@ const orchestrationReady = initializeOrchestration().catch((error) => {
176
191
  console.error("[MCP Orchestrator] Failed to initialize downstream MCPs:", error)
177
192
  })
178
193
 
194
+ // Cleanup on shutdown
195
+ process.on("SIGTERM", async () => {
196
+ console.log("[MCP Orchestrator] Received SIGTERM, cleaning up...")
197
+ try {
198
+ await getMCPClientManager().disconnect()
199
+ console.log("[MCP Orchestrator] Cleanup complete")
200
+ } catch (error) {
201
+ console.error("[MCP Orchestrator] Error during cleanup:", error)
202
+ }
203
+ process.exit(0)
204
+ })
205
+
206
+ process.on("SIGINT", async () => {
207
+ console.log("[MCP Orchestrator] Received SIGINT, cleaning up...")
208
+ try {
209
+ await getMCPClientManager().disconnect()
210
+ console.log("[MCP Orchestrator] Cleanup complete")
211
+ } catch (error) {
212
+ console.error("[MCP Orchestrator] Error during cleanup:", error)
213
+ }
214
+ process.exit(0)
215
+ })
216
+
179
217
  const handler = createMcpHandler(
180
218
  async (server) => {
181
219
  const clientManager = getMCPClientManager()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev3000",
3
- "version": "0.0.94",
3
+ "version": "0.0.95",
4
4
  "description": "AI-powered development tools with browser monitoring and MCP server integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",