dev3000 0.0.73 → 0.0.74

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 (35) hide show
  1. package/dist/dev-environment.d.ts +1 -0
  2. package/dist/dev-environment.d.ts.map +1 -1
  3. package/dist/dev-environment.js +121 -31
  4. package/dist/dev-environment.js.map +1 -1
  5. package/mcp-server/.next/BUILD_ID +1 -1
  6. package/mcp-server/.next/build-manifest.json +2 -2
  7. package/mcp-server/.next/fallback-build-manifest.json +2 -2
  8. package/mcp-server/.next/next-minimal-server.js.nft.json +1 -1
  9. package/mcp-server/.next/next-server.js.nft.json +1 -1
  10. package/mcp-server/.next/prerender-manifest.json +3 -3
  11. package/mcp-server/.next/server/app/_global-error/page.js.nft.json +1 -1
  12. package/mcp-server/.next/server/app/_global-error.html +2 -2
  13. package/mcp-server/.next/server/app/_global-error.rsc +1 -1
  14. package/mcp-server/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/mcp-server/.next/server/app/_not-found.html +1 -1
  16. package/mcp-server/.next/server/app/_not-found.rsc +1 -1
  17. package/mcp-server/.next/server/app/api/logs/append/route.js.nft.json +1 -1
  18. package/mcp-server/.next/server/app/api/logs/head/route.js.nft.json +1 -1
  19. package/mcp-server/.next/server/app/api/logs/list/route.js.nft.json +1 -1
  20. package/mcp-server/.next/server/app/api/logs/rotate/route.js.nft.json +1 -1
  21. package/mcp-server/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
  22. package/mcp-server/.next/server/app/api/logs/tail/route.js.nft.json +1 -1
  23. package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js.nft.json +1 -1
  24. package/mcp-server/.next/server/app/api/tools/route.js.nft.json +1 -1
  25. package/mcp-server/.next/server/app/index.html +1 -1
  26. package/mcp-server/.next/server/app/index.rsc +1 -1
  27. package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
  28. package/mcp-server/.next/server/app/mcp/route.js.nft.json +1 -1
  29. package/mcp-server/.next/server/app/page.js.nft.json +1 -1
  30. package/mcp-server/.next/server/server-reference-manifest.js +1 -1
  31. package/mcp-server/.next/server/server-reference-manifest.json +1 -1
  32. package/package.json +1 -1
  33. /package/mcp-server/.next/static/{mgu8K8xaf4jXbhRidu310 → e3oE33k8Pj7aB0H8XMR1s}/_buildManifest.js +0 -0
  34. /package/mcp-server/.next/static/{mgu8K8xaf4jXbhRidu310 → e3oE33k8Pj7aB0H8XMR1s}/_clientMiddlewareManifest.json +0 -0
  35. /package/mcp-server/.next/static/{mgu8K8xaf4jXbhRidu310 → e3oE33k8Pj7aB0H8XMR1s}/_ssgManifest.js +0 -0
@@ -38,6 +38,7 @@ export declare class DevEnvironment {
38
38
  private portChangeMessage;
39
39
  private firstSigintTime;
40
40
  private configuredAiCliTools;
41
+ private enableNextjsMcp;
41
42
  constructor(options: DevEnvironmentOptions);
42
43
  private checkPortsAvailable;
43
44
  private killMcpServer;
@@ -1 +1 @@
1
- {"version":3,"file":"dev-environment.d.ts","sourceRoot":"","sources":["../src/dev-environment.ts"],"names":[],"mappings":"AA0BA,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,cAAc,CAAC,EAAE,OAAO,GAAG,K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AO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,gBAAgB,CAA8B;IACtD,OAAO,CAAC,GAAG,CAAsB;IACjC,OAAO,CAAC,iBAAiB,CAAsB;IAC/C,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,oBAAoB,CAAkB;IAC9C,OAAO,CAAC,eAAe,CAAiB;gBAE5B,OAAO,EAAE,qBAAqB;YA+D5B,mBAAmB;YAoEnB,aAAa;YAuCb,kBAAkB;IAgChC,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,eAAe;IAQjB,KAAK;YAsMG,WAAW;IA0GzB,OAAO,CAAC,QAAQ;IA8BhB,OAAO,CAAC,cAAc;YA2BR,cAAc;YAqPd,aAAa;IAiD3B,OAAO,CAAC,yBAAyB;YAOnB,oBAAoB;YAmJpB,gBAAgB;YAgChB,4BAA4B;YAmF5B,6BAA6B;IA+F3C,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,MAAM;IAqBd,OAAO,CAAC,6BAA6B;IAgDrC,OAAO,CAAC,uBAAuB;YAuBjB,sBAAsB;YAgBtB,kBAAkB;YAgElB,gBAAgB;IA4E9B,OAAO,CAAC,oBAAoB;YA6Ed,cAAc;CA2J7B;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,iBAGvE"}
@@ -10,6 +10,12 @@ import { NextJsErrorDetector, OutputProcessor, StandardLogParser } from "./servi
10
10
  import { DevTUI } from "./tui-interface.js";
11
11
  import { getProjectDisplayName, getProjectName } from "./utils/project-name.js";
12
12
  import { formatTimestamp } from "./utils/timestamp.js";
13
+ // MCP names
14
+ const MCP_NAMES = {
15
+ DEV3000: "dev3000",
16
+ CHROME_DEVTOOLS: "dev3000-chrome-devtools",
17
+ NEXTJS_DEV: "dev3000-nextjs-dev"
18
+ };
13
19
  class Logger {
14
20
  logFile;
15
21
  tail;
@@ -75,33 +81,62 @@ const AI_CLI_TOOLS = [
75
81
  {
76
82
  binary: "claude",
77
83
  name: "Claude Code",
78
- addMcpCommand: (name, config) => ["claude", "mcp", "add-json", name, JSON.stringify(config)],
84
+ addMcpCommand: (name, command, ...args) => ["claude", "mcp", "add", name, command, ...args],
79
85
  addHttpMcpCommand: (name, url) => ["claude", "mcp", "add", "-t", "http", name, url],
80
86
  removeMcpCommand: (name) => ["claude", "mcp", "remove", name]
87
+ },
88
+ {
89
+ binary: "gemini",
90
+ name: "Gemini CLI",
91
+ addMcpCommand: (name, command, ...args) => ["gemini", "mcp", "add", name, command, ...args],
92
+ addHttpMcpCommand: (name, url) => ["gemini", "mcp", "add", "-t", "http", name, url],
93
+ removeMcpCommand: (name) => ["gemini", "mcp", "remove", name]
81
94
  }
82
95
  // TODO: Research and add other AI CLI tools once we verify their MCP capabilities
83
96
  // {
84
97
  // binary: "cursor-agent",
85
98
  // name: "Cursor Agent",
86
- // addMcpCommand: (name, config) => ["cursor-agent", "mcp", "add-json", name, JSON.stringify(config)],
99
+ // addMcpCommand: (name, command, ...args) => ["cursor-agent", "mcp", "add", name, command, ...args],
87
100
  // addHttpMcpCommand: (name, url) => ["cursor-agent", "mcp", "add", "-t", "http", name, url],
88
101
  // removeMcpCommand: (name) => ["cursor-agent", "mcp", "remove", name]
89
102
  // },
90
103
  // {
91
104
  // binary: "codex",
92
105
  // name: "Codex CLI",
93
- // addMcpCommand: (name, config) => ["codex", "mcp", "add-json", name, JSON.stringify(config)],
106
+ // addMcpCommand: (name, command, ...args) => ["codex", "mcp", "add", name, command, ...args],
94
107
  // addHttpMcpCommand: (name, url) => ["codex", "mcp", "add", "-t", "http", name, url],
95
108
  // removeMcpCommand: (name) => ["codex", "mcp", "remove", name]
96
- // },
97
- // {
98
- // binary: "gemini",
99
- // name: "Gemini CLI",
100
- // addMcpCommand: (name, config) => ["gemini", "mcp", "add-json", name, JSON.stringify(config)],
101
- // addHttpMcpCommand: (name, url) => ["gemini", "mcp", "add", "-t", "http", name, url],
102
- // removeMcpCommand: (name) => ["gemini", "mcp", "remove", name]
103
109
  // }
104
110
  ];
111
+ /**
112
+ * Check if Next.js MCP server is enabled in the project configuration
113
+ */
114
+ async function isNextjsMcpEnabled() {
115
+ try {
116
+ const configFiles = ["next.config.js", "next.config.ts", "next.config.mjs", "next.config.cjs"];
117
+ for (const configFile of configFiles) {
118
+ if (existsSync(configFile)) {
119
+ try {
120
+ // Read the config file content
121
+ const configContent = readFileSync(configFile, "utf8");
122
+ // Look for experimental.mcpServer: true or experimental.mcpServer = true
123
+ // This is a simple string-based check that should work for most cases
124
+ const hasMcpServerConfig = /experimental\s*:\s*{[^}]*mcpServer\s*:\s*true|experimental\.mcpServer\s*[=:]\s*true/s.test(configContent);
125
+ if (hasMcpServerConfig) {
126
+ return true;
127
+ }
128
+ }
129
+ catch {
130
+ // If we can't read the file, continue checking other config files
131
+ }
132
+ }
133
+ }
134
+ return false;
135
+ }
136
+ catch {
137
+ return false;
138
+ }
139
+ }
105
140
  /**
106
141
  * Check if Chrome version supports chrome-devtools MCP (>= 140.0.7339.214)
107
142
  */
@@ -205,14 +240,15 @@ async function detectAvailableAiCliTools() {
205
240
  /**
206
241
  * Configure MCPs for a specific AI CLI tool
207
242
  */
208
- async function configureMcpsForCliTool(tool, mcpPort, enableChromeDevtools, chromeDevtoolsSupported) {
243
+ async function configureMcpsForCliTool(tool, mcpPort, appPort, enableChromeDevtools, chromeDevtoolsSupported, enableNextjsMcp) {
209
244
  const results = {
210
245
  dev3000: false,
211
- chromeDevtools: false
246
+ chromeDevtools: false,
247
+ nextjsDev: false
212
248
  };
213
249
  // Configure main dev3000 MCP
214
250
  try {
215
- const dev3000Command = tool.addHttpMcpCommand("dev3000", `http://localhost:${mcpPort}/mcp`);
251
+ const dev3000Command = tool.addHttpMcpCommand(MCP_NAMES.DEV3000, `http://localhost:${mcpPort}/mcp`);
216
252
  await new Promise((resolve, reject) => {
217
253
  const configProcess = spawn(dev3000Command[0], dev3000Command.slice(1), {
218
254
  stdio: ["inherit", "pipe", "pipe"]
@@ -239,10 +275,7 @@ async function configureMcpsForCliTool(tool, mcpPort, enableChromeDevtools, chro
239
275
  // Configure chrome-devtools MCP if enabled and Chrome version is supported
240
276
  if (enableChromeDevtools && chromeDevtoolsSupported) {
241
277
  try {
242
- const chromeDevtoolsCommand = tool.addMcpCommand("dev3000-chrome-devtools", {
243
- command: "npx",
244
- args: ["chrome-devtools-mcp@latest", "--browserUrl", "http://127.0.0.1:9222"]
245
- });
278
+ const chromeDevtoolsCommand = tool.addMcpCommand(MCP_NAMES.CHROME_DEVTOOLS, "npx", "chrome-devtools-mcp@latest", "--browserUrl", "http://127.0.0.1:9222");
246
279
  await new Promise((resolve, reject) => {
247
280
  const configProcess = spawn(chromeDevtoolsCommand[0], chromeDevtoolsCommand.slice(1), {
248
281
  stdio: ["inherit", "pipe", "pipe"]
@@ -271,15 +304,43 @@ async function configureMcpsForCliTool(tool, mcpPort, enableChromeDevtools, chro
271
304
  // Chrome version doesn't support chrome-devtools MCP
272
305
  results.chromeSkipped = "Chrome < 140.0.7339.214";
273
306
  }
307
+ // Configure nextjs-dev MCP if enabled
308
+ if (enableNextjsMcp) {
309
+ try {
310
+ const nextjsDevCommand = tool.addHttpMcpCommand(MCP_NAMES.NEXTJS_DEV, `http://localhost:${appPort}/_next/mcp`);
311
+ await new Promise((resolve, reject) => {
312
+ const configProcess = spawn(nextjsDevCommand[0], nextjsDevCommand.slice(1), {
313
+ stdio: ["inherit", "pipe", "pipe"]
314
+ });
315
+ let errorOutput = "";
316
+ configProcess.stderr?.on("data", (data) => {
317
+ errorOutput += data.toString();
318
+ });
319
+ configProcess.on("close", (code) => {
320
+ if (code === 0 || errorOutput.includes("already exists")) {
321
+ results.nextjsDev = true;
322
+ resolve();
323
+ }
324
+ else {
325
+ reject(new Error(`Failed to configure nextjs-dev MCP: ${errorOutput}`));
326
+ }
327
+ });
328
+ configProcess.on("error", reject);
329
+ });
330
+ }
331
+ catch (error) {
332
+ console.log(`⚠️ Failed to configure nextjs-dev MCP for ${tool.name}:`, error);
333
+ }
334
+ }
274
335
  return results;
275
336
  }
276
337
  /**
277
338
  * Clean up MCP configurations for a specific AI CLI tool
278
339
  */
279
- async function cleanupMcpsForCliTool(tool, enableChromeDevtools) {
340
+ async function cleanupMcpsForCliTool(tool, enableChromeDevtools, enableNextjsMcp) {
280
341
  // Clean up dev3000 MCP
281
342
  try {
282
- const dev3000Command = tool.removeMcpCommand("dev3000");
343
+ const dev3000Command = tool.removeMcpCommand(MCP_NAMES.DEV3000);
283
344
  await new Promise((resolve) => {
284
345
  const cleanupProcess = spawn(dev3000Command[0], dev3000Command.slice(1), {
285
346
  stdio: ["inherit", "pipe", "pipe"]
@@ -294,7 +355,7 @@ async function cleanupMcpsForCliTool(tool, enableChromeDevtools) {
294
355
  // Clean up chrome-devtools MCP if it was enabled
295
356
  if (enableChromeDevtools) {
296
357
  try {
297
- const chromeDevtoolsCommand = tool.removeMcpCommand("dev3000-chrome-devtools");
358
+ const chromeDevtoolsCommand = tool.removeMcpCommand(MCP_NAMES.CHROME_DEVTOOLS);
298
359
  await new Promise((resolve) => {
299
360
  const cleanupProcess = spawn(chromeDevtoolsCommand[0], chromeDevtoolsCommand.slice(1), {
300
361
  stdio: ["inherit", "pipe", "pipe"]
@@ -307,11 +368,27 @@ async function cleanupMcpsForCliTool(tool, enableChromeDevtools) {
307
368
  // Ignore cleanup errors
308
369
  }
309
370
  }
371
+ // Clean up nextjs-dev MCP if it was enabled
372
+ if (enableNextjsMcp) {
373
+ try {
374
+ const nextjsDevCommand = tool.removeMcpCommand(MCP_NAMES.NEXTJS_DEV);
375
+ await new Promise((resolve) => {
376
+ const cleanupProcess = spawn(nextjsDevCommand[0], nextjsDevCommand.slice(1), {
377
+ stdio: ["inherit", "pipe", "pipe"]
378
+ });
379
+ cleanupProcess.on("close", () => resolve());
380
+ cleanupProcess.on("error", () => resolve()); // Don't fail on cleanup errors
381
+ });
382
+ }
383
+ catch {
384
+ // Ignore cleanup errors
385
+ }
386
+ }
310
387
  }
311
388
  /**
312
389
  * Configure MCPs for all detected AI CLI tools
313
390
  */
314
- async function configureAiCliIntegrations(mcpPort, enableChromeDevtools, silent = false) {
391
+ async function configureAiCliIntegrations(mcpPort, appPort, enableChromeDevtools, silent = false) {
315
392
  if (!silent)
316
393
  console.log("🔍 Detecting available AI CLI tools...");
317
394
  const availableTools = await detectAvailableAiCliTools();
@@ -330,22 +407,30 @@ async function configureAiCliIntegrations(mcpPort, enableChromeDevtools, silent
330
407
  console.log("⚠️ Chrome version < 140.0.7339.214 detected - chrome-devtools MCP will be skipped");
331
408
  }
332
409
  }
410
+ // Check if NextJS MCP is enabled in project configuration
411
+ const enableNextjsMcp = await isNextjsMcpEnabled();
412
+ if (enableNextjsMcp && !silent) {
413
+ console.log("🔍 Next.js MCP server detected in project configuration");
414
+ }
333
415
  if (!silent)
334
416
  console.log(`🔧 Configuring MCPs for ${availableTools.length} detected AI CLI tools...`);
335
417
  for (const tool of availableTools) {
336
418
  if (!silent)
337
419
  console.log(` Configuring ${tool.name}...`);
338
- const results = await configureMcpsForCliTool(tool, mcpPort, enableChromeDevtools, chromeDevtoolsSupported);
420
+ const results = await configureMcpsForCliTool(tool, mcpPort, appPort, enableChromeDevtools, chromeDevtoolsSupported, enableNextjsMcp);
339
421
  let status = "";
340
422
  if (results.dev3000)
341
423
  status += "✅ dev3000";
342
424
  if (results.chromeDevtools)
343
425
  status += results.dev3000 ? " + chrome-devtools" : "✅ chrome-devtools";
426
+ if (results.nextjsDev)
427
+ status += results.dev3000 || results.chromeDevtools ? " + nextjs-dev" : "✅ nextjs-dev";
344
428
  if (results.chromeSkipped)
345
- status += results.dev3000
346
- ? ` (chrome-devtools skipped: ${results.chromeSkipped})`
347
- : `⚠️ chrome-devtools skipped: ${results.chromeSkipped}`;
348
- if (!results.dev3000 && !results.chromeDevtools && !results.chromeSkipped)
429
+ status +=
430
+ results.dev3000 || results.nextjsDev
431
+ ? ` (chrome-devtools skipped: ${results.chromeSkipped})`
432
+ : `⚠️ chrome-devtools skipped: ${results.chromeSkipped}`;
433
+ if (!results.dev3000 && !results.chromeDevtools && !results.nextjsDev && !results.chromeSkipped)
349
434
  status = "❌ failed";
350
435
  if (!silent)
351
436
  console.log(` ${tool.name}: ${status}`);
@@ -355,13 +440,13 @@ async function configureAiCliIntegrations(mcpPort, enableChromeDevtools, silent
355
440
  /**
356
441
  * Clean up MCP configurations for all detected AI CLI tools
357
442
  */
358
- async function cleanupAiCliIntegrations(availableTools, enableChromeDevtools, silent = false) {
443
+ async function cleanupAiCliIntegrations(availableTools, enableChromeDevtools, enableNextjsMcp, silent = false) {
359
444
  if (availableTools.length === 0)
360
445
  return;
361
446
  if (!silent)
362
447
  console.log("🧹 Cleaning up AI CLI MCP configurations...");
363
448
  for (const tool of availableTools) {
364
- await cleanupMcpsForCliTool(tool, enableChromeDevtools);
449
+ await cleanupMcpsForCliTool(tool, enableChromeDevtools, enableNextjsMcp);
365
450
  }
366
451
  }
367
452
  export function createPersistentLogFile() {
@@ -487,6 +572,7 @@ export class DevEnvironment {
487
572
  portChangeMessage = null;
488
573
  firstSigintTime = null;
489
574
  configuredAiCliTools = [];
575
+ enableNextjsMcp = false;
490
576
  constructor(options) {
491
577
  // Handle portMcp vs mcpPort naming
492
578
  this.options = {
@@ -739,7 +825,9 @@ export class DevEnvironment {
739
825
  // Configure AI CLI integrations (both dev3000 and chrome-devtools MCPs)
740
826
  if (!this.options.serversOnly) {
741
827
  await this.tui.updateStatus("Configuring AI CLI integrations...");
742
- this.configuredAiCliTools = await configureAiCliIntegrations(this.options.mcpPort || "3684", this.options.chromeDevtoolsMcp !== false, // Default to true unless explicitly disabled
828
+ // Check if NextJS MCP is enabled and store the result
829
+ this.enableNextjsMcp = await isNextjsMcpEnabled();
830
+ this.configuredAiCliTools = await configureAiCliIntegrations(this.options.mcpPort || "3684", this.options.port, this.options.chromeDevtoolsMcp !== false, // Default to true unless explicitly disabled
743
831
  true // Silent mode when TUI is active
744
832
  );
745
833
  if (this.configuredAiCliTools.length > 0) {
@@ -794,7 +882,9 @@ export class DevEnvironment {
794
882
  // Configure AI CLI integrations (both dev3000 and chrome-devtools MCPs)
795
883
  if (!this.options.serversOnly) {
796
884
  this.spinner.text = "Configuring AI CLI integrations...";
797
- this.configuredAiCliTools = await configureAiCliIntegrations(this.options.mcpPort || "3684", this.options.chromeDevtoolsMcp !== false, // Default to true unless explicitly disabled
885
+ // Check if NextJS MCP is enabled and store the result
886
+ this.enableNextjsMcp = await isNextjsMcpEnabled();
887
+ this.configuredAiCliTools = await configureAiCliIntegrations(this.options.mcpPort || "3684", this.options.port, this.options.chromeDevtoolsMcp !== false, // Default to true unless explicitly disabled
798
888
  false // Show output in non-TUI mode
799
889
  );
800
890
  if (this.configuredAiCliTools.length > 0) {
@@ -1899,7 +1989,7 @@ export class DevEnvironment {
1899
1989
  }
1900
1990
  // Clean up AI CLI MCP configurations
1901
1991
  if (this.configuredAiCliTools.length > 0) {
1902
- await cleanupAiCliIntegrations(this.configuredAiCliTools, this.options.chromeDevtoolsMcp !== false, this.options.tui);
1992
+ await cleanupAiCliIntegrations(this.configuredAiCliTools, this.options.chromeDevtoolsMcp !== false, this.enableNextjsMcp, this.options.tui);
1903
1993
  }
1904
1994
  // Kill processes on both ports
1905
1995
  const killPortProcess = async (port, name) => {