dev3000 0.0.73 → 0.0.75

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 (46) 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 +131 -50
  4. package/dist/dev-environment.js.map +1 -1
  5. package/dist/src/tui-interface-impl.tsx +3 -24
  6. package/dist/tui-interface-impl.d.ts.map +1 -1
  7. package/dist/tui-interface-impl.js +3 -24
  8. package/dist/tui-interface-impl.js.map +1 -1
  9. package/mcp-server/.next/BUILD_ID +1 -1
  10. package/mcp-server/.next/build-manifest.json +2 -2
  11. package/mcp-server/.next/fallback-build-manifest.json +2 -2
  12. package/mcp-server/.next/next-minimal-server.js.nft.json +1 -1
  13. package/mcp-server/.next/next-server.js.nft.json +1 -1
  14. package/mcp-server/.next/prerender-manifest.json +3 -3
  15. package/mcp-server/.next/required-server-files.json +2 -2
  16. package/mcp-server/.next/server/app/_global-error/page.js.nft.json +1 -1
  17. package/mcp-server/.next/server/app/_global-error.html +2 -2
  18. package/mcp-server/.next/server/app/_global-error.rsc +1 -1
  19. package/mcp-server/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/mcp-server/.next/server/app/_not-found.html +1 -1
  21. package/mcp-server/.next/server/app/_not-found.rsc +1 -1
  22. package/mcp-server/.next/server/app/api/logs/append/route.js.nft.json +1 -1
  23. package/mcp-server/.next/server/app/api/logs/head/route.js.nft.json +1 -1
  24. package/mcp-server/.next/server/app/api/logs/list/route.js.nft.json +1 -1
  25. package/mcp-server/.next/server/app/api/logs/rotate/route.js.nft.json +1 -1
  26. package/mcp-server/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
  27. package/mcp-server/.next/server/app/api/logs/tail/route.js.nft.json +1 -1
  28. package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js.nft.json +1 -1
  29. package/mcp-server/.next/server/app/api/tools/route.js.nft.json +1 -1
  30. package/mcp-server/.next/server/app/index.html +1 -1
  31. package/mcp-server/.next/server/app/index.rsc +1 -1
  32. package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
  33. package/mcp-server/.next/server/app/mcp/route.js.nft.json +1 -1
  34. package/mcp-server/.next/server/app/page.js.nft.json +1 -1
  35. package/mcp-server/.next/server/chunks/[root-of-the-server]__270b33b7._.js +4 -18
  36. package/mcp-server/.next/server/chunks/[root-of-the-server]__270b33b7._.js.map +1 -1
  37. package/mcp-server/.next/server/server-reference-manifest.js +1 -1
  38. package/mcp-server/.next/server/server-reference-manifest.json +1 -1
  39. package/mcp-server/app/mcp/tools.ts +92 -23
  40. package/mcp-server/{next.config.ts → next.config.mjs} +4 -2
  41. package/mcp-server/{start-production.js → start-production.mjs} +6 -3
  42. package/package.json +3 -3
  43. package/src/tui-interface-impl.tsx +3 -24
  44. /package/mcp-server/.next/static/{mgu8K8xaf4jXbhRidu310 → Uhi1zQoeqTo0Q0A7NvQ69}/_buildManifest.js +0 -0
  45. /package/mcp-server/.next/static/{mgu8K8xaf4jXbhRidu310 → Uhi1zQoeqTo0Q0A7NvQ69}/_clientMiddlewareManifest.json +0 -0
  46. /package/mcp-server/.next/static/{mgu8K8xaf4jXbhRidu310 → Uhi1zQoeqTo0Q0A7NvQ69}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"HsPwJZRlfBq4q0AZESCb8L8DuIbdvE7q8Sb59koPAtU=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"s5TVfL5OBasOeybfToxrjdnFVIMP/U7kKUWxCUt9sq4=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "HsPwJZRlfBq4q0AZESCb8L8DuIbdvE7q8Sb59koPAtU="
4
+ "encryptionKey": "s5TVfL5OBasOeybfToxrjdnFVIMP/U7kKUWxCUt9sq4="
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,23 +882,49 @@ 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
  */
874
908
  async function canDelegateToChromeDevtools(action: string): Promise<boolean> {
875
- try {
876
- // First check if the action is mappable to chrome-devtools
877
- if (!CHROME_DEVTOOLS_CAPABILITY_MAP[action]) {
878
- return false
879
- }
880
-
881
- // Try to discover chrome-devtools MCP
882
- const availableMcps = await discoverAvailableMcps()
883
- return availableMcps.includes("chrome-devtools")
884
- } catch (error) {
885
- logToDevFile(`Chrome DevTools delegation check failed: ${error}`)
909
+ // First check if the action is mappable to chrome-devtools
910
+ if (!CHROME_DEVTOOLS_CAPABILITY_MAP[action]) {
886
911
  return false
887
912
  }
913
+
914
+ // dev3000 cannot reliably detect its own configured MCPs in Claude Code
915
+ // Return false to disable auto-delegation - users can manually use the MCPs
916
+ logToDevFile(`Chrome DevTools delegation disabled - cannot verify dev3000-chrome-devtools MCP configuration`)
917
+ return false
918
+ }
919
+
920
+ /**
921
+ * Check if nextjs-dev MCP is available
922
+ */
923
+ async function canDelegateToNextjs(): Promise<boolean> {
924
+ // dev3000 cannot reliably detect its own configured MCPs in Claude Code
925
+ // Return false to disable auto-delegation - users can manually use the MCPs
926
+ logToDevFile(`NextJS delegation disabled - cannot verify dev3000-nextjs-dev MCP configuration`)
927
+ return false
888
928
  }
889
929
 
890
930
  /**
@@ -900,27 +940,56 @@ async function delegateToChromeDevtools(
900
940
  }
901
941
 
902
942
  // Transform parameters if needed
903
- const chromeParams = mapping.paramMap ? mapping.paramMap(params) : {}
943
+ const chromeParams = mapping.paramMap ? mapping.paramMap(params) : params
944
+
945
+ return {
946
+ content: [
947
+ {
948
+ type: "text",
949
+ text: `🔗 **USE DEV3000-CHROME-DEVTOOLS MCP**
950
+
951
+ If you have chrome-devtools MCP configured, please use the \`dev3000-chrome-devtools\` MCP directly:
952
+
953
+ \`\`\`
954
+ dev3000-chrome-devtools:${mapping.function}(${JSON.stringify(chromeParams, null, 2)})
955
+ \`\`\`
956
+
957
+ 💡 **If the MCP is not available:**
958
+ • Make sure chrome-devtools MCP is configured in your Claude Code client
959
+ • Claude Code should auto-configure it as \`dev3000-chrome-devtools\`
960
+ • Alternatively, dev3000 will fallback to its basic browser automation
961
+
962
+ ⚡ **Note:** dev3000 detected chrome-devtools activity but cannot verify MCP configuration`
963
+ }
964
+ ]
965
+ }
966
+ }
967
+
968
+ /**
969
+ * Delegate to nextjs-dev MCP with suggested functions
970
+ */
971
+ async function delegateToNextjs(): Promise<{ content: Array<{ type: "text"; text: string }> }> {
972
+ const availableFunctions = Object.entries(NEXTJS_DEV_CAPABILITY_MAP)
973
+ .map(([_key, { function: func, reason }]) => `• \`dev3000-nextjs-dev:${func}()\` - ${reason}`)
974
+ .join("\n")
904
975
 
905
976
  return {
906
977
  content: [
907
978
  {
908
979
  type: "text",
909
- text: `🔗 **DELEGATED TO CHROME-DEVTOOLS MCP**
980
+ text: `🔗 **USE DEV3000-NEXTJS-DEV MCP**
910
981
 
911
- Action: ${action} ${mapping.function}
912
- Parameters: ${JSON.stringify(chromeParams, null, 2)}
982
+ Please use the \`dev3000-nextjs-dev\` MCP directly for Next.js-specific analysis:
913
983
 
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
984
+ **Available Functions:**
985
+ ${availableFunctions}
919
986
 
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.
987
+ 💡 **Why this approach:**
988
+ nextjs-dev is a stdio MCP server that Claude calls directly
989
+ • Provides Next.js-specific build, server, and performance insights
990
+ • Direct MCP calls give better framework-specific context
922
991
 
923
- ⚡ **Auto-delegation**: Future ${action} actions will automatically route to chrome-devtools when available.`
992
+ ⚡ **Auto-configured as:** \`dev3000-nextjs-dev\` in your MCP client`
924
993
  }
925
994
  ]
926
995
  }
@@ -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.73",
3
+ "version": "0.0.75",
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)))