dev3000 0.0.74 → 0.0.76

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 (40) hide show
  1. package/dist/dev-environment.d.ts.map +1 -1
  2. package/dist/dev-environment.js +20 -29
  3. package/dist/dev-environment.js.map +1 -1
  4. package/dist/src/tui-interface-impl.tsx +3 -24
  5. package/dist/tui-interface-impl.d.ts.map +1 -1
  6. package/dist/tui-interface-impl.js +3 -24
  7. package/dist/tui-interface-impl.js.map +1 -1
  8. package/mcp-server/.next/BUILD_ID +1 -1
  9. package/mcp-server/.next/build-manifest.json +2 -2
  10. package/mcp-server/.next/fallback-build-manifest.json +2 -2
  11. package/mcp-server/.next/prerender-manifest.json +3 -3
  12. package/mcp-server/.next/required-server-files.json +2 -2
  13. package/mcp-server/.next/server/app/_global-error.html +2 -2
  14. package/mcp-server/.next/server/app/_global-error.rsc +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/head/route.js.nft.json +1 -1
  18. package/mcp-server/.next/server/app/api/logs/list/route.js.nft.json +1 -1
  19. package/mcp-server/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
  20. package/mcp-server/.next/server/app/api/logs/tail/route.js.nft.json +1 -1
  21. package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js.nft.json +1 -1
  22. package/mcp-server/.next/server/app/index.html +1 -1
  23. package/mcp-server/.next/server/app/index.rsc +1 -1
  24. package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
  25. package/mcp-server/.next/server/app/mcp/route.js +2 -2
  26. package/mcp-server/.next/server/app/mcp/route.js.nft.json +1 -1
  27. package/mcp-server/.next/server/chunks/[root-of-the-server]__270b33b7._.js +26 -15
  28. package/mcp-server/.next/server/chunks/[root-of-the-server]__270b33b7._.js.map +1 -1
  29. package/mcp-server/.next/server/chunks/{[root-of-the-server]__6fa7ea53._.js → [root-of-the-server]__2942c072._.js} +2 -2
  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/mcp-server/app/mcp/tools.ts +135 -16
  33. package/mcp-server/{next.config.ts → next.config.mjs} +4 -2
  34. package/mcp-server/{start-production.js → start-production.mjs} +6 -3
  35. package/package.json +3 -3
  36. package/src/tui-interface-impl.tsx +3 -24
  37. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__6fa7ea53._.js.map → [root-of-the-server]__2942c072._.js.map} +0 -0
  38. /package/mcp-server/.next/static/{e3oE33k8Pj7aB0H8XMR1s → SDKkQ5XdHwJr8jB5PJj7F}/_buildManifest.js +0 -0
  39. /package/mcp-server/.next/static/{e3oE33k8Pj7aB0H8XMR1s → SDKkQ5XdHwJr8jB5PJj7F}/_clientMiddlewareManifest.json +0 -0
  40. /package/mcp-server/.next/static/{e3oE33k8Pj7aB0H8XMR1s → SDKkQ5XdHwJr8jB5PJj7F}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},24361,(e,r,t)=>{r.exports=e.x("util",()=>require("util"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},2603,e=>{e.v(e=>Promise.resolve().then(()=>e(56891)))}];
1
+ module.exports=[93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},24361,(e,r,t)=>{r.exports=e.x("util",()=>require("util"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},23970,e=>{e.v(e=>Promise.resolve().then(()=>e(22734)))},2603,e=>{e.v(e=>Promise.resolve().then(()=>e(56891)))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__6fa7ea53._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__2942c072._.js.map
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"lnJvSIpjisHRrCHX3FN7zkqKdXGLm8XLOtCcyvTm+nI=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"BcTR9JuxYIHF6hk1XeS0P7l1a9EX7k1RhlLLMSGM668=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "lnJvSIpjisHRrCHX3FN7zkqKdXGLm8XLOtCcyvTm+nI="
4
+ "encryptionKey": "BcTR9JuxYIHF6hk1XeS0P7l1a9EX7k1RhlLLMSGM668="
5
5
  }
@@ -175,6 +175,11 @@ export async function fixMyApp({
175
175
  integrateChromeDevtools = false,
176
176
  returnRawData = false
177
177
  }: FixMyAppParams): Promise<{ content: Array<{ type: "text"; text: string }> }> {
178
+ // 🎯 INTELLIGENT DELEGATION: Check if nextjs-dev MCP is available for Next.js-specific analysis
179
+ const canDelegateNextjs = await canDelegateToNextjs()
180
+ if (canDelegateNextjs) {
181
+ logToDevFile(`Fix My App: Recommending dev3000-nextjs-dev MCP for Next.js-specific analysis`)
182
+ }
178
183
  const logPath = getLogPath(projectName)
179
184
  if (!logPath) {
180
185
  const sessions = findActiveSessions()
@@ -829,6 +834,15 @@ const value = data?.property?.nestedProperty`,
829
834
  }
830
835
  }
831
836
 
837
+ // Add nextjs-dev delegation recommendation if available
838
+ if (canDelegateNextjs) {
839
+ results.push("")
840
+ results.push("🔗 **ENHANCED NEXT.JS ANALYSIS AVAILABLE**")
841
+ results.push("")
842
+ const delegationResponse = await delegateToNextjs()
843
+ results.push(delegationResponse.content[0].text)
844
+ }
845
+
832
846
  return {
833
847
  content: [{ type: "text", text: results.join("\n") }]
834
848
  }
@@ -868,6 +882,26 @@ const CHROME_DEVTOOLS_CAPABILITY_MAP: Record<
868
882
  // scroll and type don't have direct chrome-devtools equivalents, fall back to dev3000
869
883
  }
870
884
 
885
+ // Capability mapping for nextjs-dev MCP delegation
886
+ const NEXTJS_DEV_CAPABILITY_MAP: Record<string, { function: string; reason: string }> = {
887
+ get_build_status: {
888
+ function: "get_build_status",
889
+ reason: "Get comprehensive Next.js build information and status"
890
+ },
891
+ get_server_logs: {
892
+ function: "get_server_logs",
893
+ reason: "Access Next.js server-side logs and runtime information"
894
+ },
895
+ analyze_performance: {
896
+ function: "analyze_performance",
897
+ reason: "Get Next.js-specific performance metrics and optimization suggestions"
898
+ },
899
+ check_routes: {
900
+ function: "check_routes",
901
+ reason: "Validate Next.js routing configuration and detect issues"
902
+ }
903
+ }
904
+
871
905
  /**
872
906
  * Check if chrome-devtools MCP is available and can handle the requested action
873
907
  */
@@ -878,15 +912,33 @@ async function canDelegateToChromeDevtools(action: string): Promise<boolean> {
878
912
  return false
879
913
  }
880
914
 
881
- // Try to discover chrome-devtools MCP
915
+ // Only look for dev3000's own configured chrome-devtools MCP
882
916
  const availableMcps = await discoverAvailableMcps()
883
- return availableMcps.includes("chrome-devtools")
917
+
918
+ // Check for dev3000's own configured chrome-devtools MCP
919
+ return availableMcps.includes("dev3000-chrome-devtools")
884
920
  } catch (error) {
885
921
  logToDevFile(`Chrome DevTools delegation check failed: ${error}`)
886
922
  return false
887
923
  }
888
924
  }
889
925
 
926
+ /**
927
+ * Check if nextjs-dev MCP is available
928
+ */
929
+ async function canDelegateToNextjs(): Promise<boolean> {
930
+ try {
931
+ // Only look for dev3000's own configured nextjs-dev MCP
932
+ const availableMcps = await discoverAvailableMcps()
933
+
934
+ // Check for dev3000's own configured nextjs-dev MCP
935
+ return availableMcps.includes("dev3000-nextjs-dev")
936
+ } catch (error) {
937
+ logToDevFile(`NextJS delegation check failed: ${error}`)
938
+ return false
939
+ }
940
+ }
941
+
890
942
  /**
891
943
  * Delegate browser action to chrome-devtools MCP
892
944
  */
@@ -900,27 +952,56 @@ async function delegateToChromeDevtools(
900
952
  }
901
953
 
902
954
  // Transform parameters if needed
903
- const chromeParams = mapping.paramMap ? mapping.paramMap(params) : {}
955
+ const chromeParams = mapping.paramMap ? mapping.paramMap(params) : params
904
956
 
905
957
  return {
906
958
  content: [
907
959
  {
908
960
  type: "text",
909
- text: `🔗 **DELEGATED TO CHROME-DEVTOOLS MCP**
961
+ text: `🔗 **USE DEV3000-CHROME-DEVTOOLS MCP**
910
962
 
911
- Action: ${action} ${mapping.function}
912
- Parameters: ${JSON.stringify(chromeParams, null, 2)}
963
+ If you have chrome-devtools MCP configured, please use the \`dev3000-chrome-devtools\` MCP directly:
913
964
 
914
- 💡 **Why this is better:**
915
- • Chrome-devtools MCP has more sophisticated browser automation
916
- • Uses the same Chrome instance (no conflicts)
917
- • Better error handling and debugging features
918
- • More reliable screenshot and navigation capabilities
965
+ \`\`\`
966
+ dev3000-chrome-devtools:${mapping.function}(${JSON.stringify(chromeParams, null, 2)})
967
+ \`\`\`
919
968
 
920
- 🎯 **Next Steps:**
921
- Claude will now use the chrome-devtools MCP to execute this action. The enhanced chrome-devtools capabilities will provide better results than dev3000's basic execute_browser_action.
969
+ 💡 **If the MCP is not available:**
970
+ Make sure chrome-devtools MCP is configured in your Claude Code client
971
+ • Claude Code should auto-configure it as \`dev3000-chrome-devtools\`
972
+ • Alternatively, dev3000 will fallback to its basic browser automation
922
973
 
923
- ⚡ **Auto-delegation**: Future ${action} actions will automatically route to chrome-devtools when available.`
974
+ ⚡ **Note:** dev3000 detected chrome-devtools activity but cannot verify MCP configuration`
975
+ }
976
+ ]
977
+ }
978
+ }
979
+
980
+ /**
981
+ * Delegate to nextjs-dev MCP with suggested functions
982
+ */
983
+ async function delegateToNextjs(): Promise<{ content: Array<{ type: "text"; text: string }> }> {
984
+ const availableFunctions = Object.entries(NEXTJS_DEV_CAPABILITY_MAP)
985
+ .map(([_key, { function: func, reason }]) => `• \`dev3000-nextjs-dev:${func}()\` - ${reason}`)
986
+ .join("\n")
987
+
988
+ return {
989
+ content: [
990
+ {
991
+ type: "text",
992
+ text: `🔗 **USE DEV3000-NEXTJS-DEV MCP**
993
+
994
+ Please use the \`dev3000-nextjs-dev\` MCP directly for Next.js-specific analysis:
995
+
996
+ **Available Functions:**
997
+ ${availableFunctions}
998
+
999
+ 💡 **Why this approach:**
1000
+ • nextjs-dev is a stdio MCP server that Claude calls directly
1001
+ • Provides Next.js-specific build, server, and performance insights
1002
+ • Direct MCP calls give better framework-specific context
1003
+
1004
+ ⚡ **Auto-configured as:** \`dev3000-nextjs-dev\` in your MCP client`
924
1005
  }
925
1006
  ]
926
1007
  }
@@ -1333,9 +1414,47 @@ export async function discoverAvailableMcps(projectName?: string): Promise<strin
1333
1414
  discoveredMcps.add(mcp)
1334
1415
  }
1335
1416
 
1336
- // Method 2: Port pinging (only if process detection found nothing)
1417
+ // Method 2: Check for dev3000-configured MCPs by testing their functionality
1418
+ try {
1419
+ // Test if dev3000-chrome-devtools MCP is working by checking Claude logs
1420
+ const cacheDir = `/Users/${process.env.USER}/Library/Caches/claude-cli-nodejs`
1421
+ const { readdirSync, existsSync } = await import("fs")
1422
+
1423
+ if (existsSync(cacheDir)) {
1424
+ const cacheDirs = readdirSync(cacheDir)
1425
+ const projectDir = cacheDirs.find((dir) => dir.includes(process.cwd().replace(/\//g, "-")))
1426
+
1427
+ if (projectDir) {
1428
+ const projectCacheDir = `${cacheDir}/${projectDir}`
1429
+
1430
+ // Check for chrome-devtools MCP logs
1431
+ const chromeDevtoolsLogDir = `${projectCacheDir}/mcp-logs-dev3000-chrome-devtools`
1432
+ if (existsSync(chromeDevtoolsLogDir)) {
1433
+ const chromeDevtoolsLogs = readdirSync(chromeDevtoolsLogDir)
1434
+ if (chromeDevtoolsLogs.length > 0) {
1435
+ discoveredMcps.add("dev3000-chrome-devtools")
1436
+ logToDevFile("MCP Discovery: Found dev3000-chrome-devtools via Claude cache logs", projectName)
1437
+ }
1438
+ }
1439
+
1440
+ // Check for nextjs-dev MCP logs
1441
+ const nextjsDevLogDir = `${projectCacheDir}/mcp-logs-dev3000-nextjs-dev`
1442
+ if (existsSync(nextjsDevLogDir)) {
1443
+ const nextjsDevLogs = readdirSync(nextjsDevLogDir)
1444
+ if (nextjsDevLogs.length > 0) {
1445
+ discoveredMcps.add("dev3000-nextjs-dev")
1446
+ logToDevFile("MCP Discovery: Found dev3000-nextjs-dev via Claude cache logs", projectName)
1447
+ }
1448
+ }
1449
+ }
1450
+ }
1451
+ } catch (_error) {
1452
+ logToDevFile("MCP Discovery: Claude cache check failed, falling back to port detection", projectName)
1453
+ }
1454
+
1455
+ // Method 3: Port pinging (fallback)
1337
1456
  if (discoveredMcps.size === 0) {
1338
- logToDevFile("MCP Discovery: No MCPs found via process detection, trying port pinging", projectName)
1457
+ logToDevFile("MCP Discovery: No MCPs found via process or cache detection, trying port pinging", projectName)
1339
1458
  const portDetected = await pingMcpPorts()
1340
1459
  for (const mcp of portDetected) {
1341
1460
  discoveredMcps.add(mcp)
@@ -1,7 +1,9 @@
1
- import type { NextConfig } from "next"
2
1
  import path from "path"
2
+ import { fileURLToPath } from "url"
3
3
 
4
- const nextConfig: NextConfig = {
4
+ const __dirname = path.dirname(fileURLToPath(import.meta.url))
5
+
6
+ const nextConfig = {
5
7
  reactStrictMode: true,
6
8
  experimental: { reactCompiler: true, turbopackPersistentCaching: true },
7
9
  devIndicators: false,
@@ -1,7 +1,10 @@
1
1
  #!/usr/bin/env node
2
- const path = require("path")
3
- const { existsSync } = require("fs")
4
- const { spawn } = require("child_process")
2
+ import { spawn } from "child_process"
3
+ import { existsSync } from "fs"
4
+ import path from "path"
5
+ import { fileURLToPath } from "url"
6
+
7
+ const __dirname = path.dirname(fileURLToPath(import.meta.url))
5
8
 
6
9
  // Set up the environment
7
10
  process.env.NODE_ENV = "production"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev3000",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "description": "AI-powered development tools with browser monitoring and MCP server integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,10 +24,10 @@
24
24
  "mcp-server/public/",
25
25
  "mcp-server/package.json",
26
26
  "mcp-server/tsconfig.json",
27
- "mcp-server/next.config.ts",
27
+ "mcp-server/next.config.mjs",
28
28
  "mcp-server/next-env.d.ts",
29
29
  "mcp-server/postcss.config.mjs",
30
- "mcp-server/start-production.js",
30
+ "mcp-server/start-production.mjs",
31
31
  "README.md"
32
32
  ],
33
33
  "scripts": {
@@ -42,9 +42,7 @@ const TUIApp = ({
42
42
  const logIdCounter = useRef(0)
43
43
  const { stdout } = useStdout()
44
44
  const ctrlCMessageDefault = "^C quit"
45
- const ctrlCMessageActive = "^C again to quit"
46
- const [ctrlCMessage, setCtrlCMessage] = useState(ctrlCMessageDefault)
47
- const ctrlCResetTimeout = useRef<NodeJS.Timeout | null>(null)
45
+ const [ctrlCMessage] = useState(ctrlCMessageDefault)
48
46
 
49
47
  const [terminalSize, setTerminalSize] = useState(() => ({
50
48
  width: stdout?.columns || 80,
@@ -87,15 +85,6 @@ const TUIApp = ({
87
85
  onStatusUpdate(setInitStatus)
88
86
  }, [onStatusUpdate])
89
87
 
90
- useEffect(() => {
91
- return () => {
92
- if (ctrlCResetTimeout.current) {
93
- clearTimeout(ctrlCResetTimeout.current)
94
- ctrlCResetTimeout.current = null
95
- }
96
- }
97
- }, [])
98
-
99
88
  // Calculate available lines for logs dynamically based on terminal height and mode
100
89
  const calculateMaxVisibleLogs = () => {
101
90
  if (isVeryCompact) {
@@ -201,18 +190,8 @@ const TUIApp = ({
201
190
 
202
191
  // Handle keyboard input
203
192
  useInput((input, key) => {
204
- if (input === "q") {
205
- // For 'q', trigger graceful shutdown
206
- process.kill(process.pid, "SIGINT")
207
- } else if (key.ctrl && input === "c") {
208
- setCtrlCMessage(ctrlCMessageActive)
209
- if (ctrlCResetTimeout.current) {
210
- clearTimeout(ctrlCResetTimeout.current)
211
- }
212
- ctrlCResetTimeout.current = setTimeout(() => {
213
- setCtrlCMessage(ctrlCMessageDefault)
214
- ctrlCResetTimeout.current = null
215
- }, 3000)
193
+ if (key.ctrl && input === "c") {
194
+ // Send SIGINT to trigger main process shutdown handler
216
195
  process.kill(process.pid, "SIGINT")
217
196
  } else if (key.upArrow) {
218
197
  setScrollOffset((prev) => Math.min(prev + 1, Math.max(0, logs.length - maxVisibleLogs)))