dev3000 0.0.114 → 0.0.116

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 (146) hide show
  1. package/dist/cdp-monitor.d.ts.map +1 -1
  2. package/dist/cdp-monitor.js +20 -28
  3. package/dist/cdp-monitor.js.map +1 -1
  4. package/dist/cli.js +74 -22
  5. package/dist/cli.js.map +1 -1
  6. package/dist/dev-environment.d.ts.map +1 -1
  7. package/dist/dev-environment.js +43 -11
  8. package/dist/dev-environment.js.map +1 -1
  9. package/dist/src/tui-interface-impl.tsx +175 -127
  10. package/dist/tui-interface-impl.d.ts.map +1 -1
  11. package/dist/tui-interface-impl.js +113 -74
  12. package/dist/tui-interface-impl.js.map +1 -1
  13. package/mcp-server/.next/BUILD_ID +1 -1
  14. package/mcp-server/.next/build-manifest.json +2 -2
  15. package/mcp-server/.next/fallback-build-manifest.json +2 -2
  16. package/mcp-server/.next/prerender-manifest.json +3 -3
  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/_global-error.segments/__PAGE__.segment.rsc +1 -1
  20. package/mcp-server/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  21. package/mcp-server/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  22. package/mcp-server/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  23. package/mcp-server/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  24. package/mcp-server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  25. package/mcp-server/.next/server/app/_not-found.html +1 -1
  26. package/mcp-server/.next/server/app/_not-found.rsc +2 -2
  27. package/mcp-server/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  28. package/mcp-server/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  29. package/mcp-server/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  30. package/mcp-server/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  31. package/mcp-server/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  32. package/mcp-server/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  33. package/mcp-server/.next/server/app/api/cloud/start-fix/route.js +2 -2
  34. package/mcp-server/.next/server/app/api/cloud/start-fix/route.js.nft.json +1 -1
  35. package/mcp-server/.next/server/app/auth/error/page_client-reference-manifest.js +1 -1
  36. package/mcp-server/.next/server/app/auth/error.html +1 -1
  37. package/mcp-server/.next/server/app/auth/error.rsc +2 -2
  38. package/mcp-server/.next/server/app/auth/error.segments/_full.segment.rsc +2 -2
  39. package/mcp-server/.next/server/app/auth/error.segments/_head.segment.rsc +1 -1
  40. package/mcp-server/.next/server/app/auth/error.segments/_index.segment.rsc +2 -2
  41. package/mcp-server/.next/server/app/auth/error.segments/_tree.segment.rsc +2 -2
  42. package/mcp-server/.next/server/app/auth/error.segments/auth/error/__PAGE__.segment.rsc +1 -1
  43. package/mcp-server/.next/server/app/auth/error.segments/auth/error.segment.rsc +1 -1
  44. package/mcp-server/.next/server/app/auth/error.segments/auth.segment.rsc +1 -1
  45. package/mcp-server/.next/server/app/index.html +1 -1
  46. package/mcp-server/.next/server/app/index.rsc +3 -3
  47. package/mcp-server/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  48. package/mcp-server/.next/server/app/index.segments/_full.segment.rsc +3 -3
  49. package/mcp-server/.next/server/app/index.segments/_head.segment.rsc +1 -1
  50. package/mcp-server/.next/server/app/index.segments/_index.segment.rsc +2 -2
  51. package/mcp-server/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  52. package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
  53. package/mcp-server/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  54. package/mcp-server/.next/server/app/mcp/route.js +2 -2
  55. package/mcp-server/.next/server/app/page.js.nft.json +1 -1
  56. package/mcp-server/.next/server/app/page_client-reference-manifest.js +1 -1
  57. package/mcp-server/.next/server/app/signin/page_client-reference-manifest.js +1 -1
  58. package/mcp-server/.next/server/app/video/[session]/page_client-reference-manifest.js +1 -1
  59. package/mcp-server/.next/server/app/workflows/[id]/report/page_client-reference-manifest.js +1 -1
  60. package/mcp-server/.next/server/app/workflows/new/page.js.nft.json +1 -1
  61. package/mcp-server/.next/server/app/workflows/new/page_client-reference-manifest.js +1 -1
  62. package/mcp-server/.next/server/app/workflows/page.js.nft.json +1 -1
  63. package/mcp-server/.next/server/app/workflows/page_client-reference-manifest.js +1 -1
  64. package/mcp-server/.next/server/chunks/[root-of-the-server]__157de66b._.js +284 -37
  65. package/mcp-server/.next/server/chunks/[root-of-the-server]__157de66b._.js.map +1 -1
  66. package/mcp-server/.next/server/chunks/[root-of-the-server]__730a8fd0._.js +1 -1
  67. package/mcp-server/.next/server/chunks/[root-of-the-server]__730a8fd0._.js.map +1 -1
  68. package/mcp-server/.next/server/chunks/[root-of-the-server]__748f411f._.js +1 -1
  69. package/mcp-server/.next/server/chunks/[root-of-the-server]__748f411f._.js.map +1 -1
  70. package/mcp-server/.next/server/chunks/[root-of-the-server]__8a84f9f4._.js +20 -20
  71. package/mcp-server/.next/server/chunks/[root-of-the-server]__8a84f9f4._.js.map +1 -1
  72. package/mcp-server/.next/server/chunks/[root-of-the-server]__c1681338._.js +3 -0
  73. package/mcp-server/.next/server/chunks/[root-of-the-server]__c1681338._.js.map +1 -0
  74. package/mcp-server/.next/server/chunks/[root-of-the-server]__ec6a1335._.js.map +1 -1
  75. package/mcp-server/.next/server/chunks/bee4f_next_dist_esm_build_templates_app-route_1ece9366.js +5 -5
  76. package/mcp-server/.next/server/chunks/bee4f_next_dist_esm_build_templates_app-route_1ece9366.js.map +1 -1
  77. package/mcp-server/.next/server/chunks/mcp-server_app_api_cloud_fix-workflow_steps_ts_b65f3271._.js +121 -27
  78. package/mcp-server/.next/server/chunks/mcp-server_app_api_cloud_fix-workflow_steps_ts_b65f3271._.js.map +1 -1
  79. package/mcp-server/.next/server/chunks/node_modules__pnpm_85ddbe9c._.js +1 -1
  80. package/mcp-server/.next/server/chunks/node_modules__pnpm_85ddbe9c._.js.map +1 -1
  81. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__2e44f0db._.js +3 -0
  82. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__2e44f0db._.js.map +1 -0
  83. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__3585c949._.js +3 -0
  84. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__3585c949._.js.map +1 -0
  85. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__477c3bbb._.js +3 -0
  86. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__477c3bbb._.js.map +1 -0
  87. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__570677dc._.js → [root-of-the-server]__880839a0._.js} +2 -2
  88. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__880839a0._.js.map +1 -0
  89. package/mcp-server/.next/server/chunks/ssr/_41b8f993._.js +3 -0
  90. package/mcp-server/.next/server/chunks/ssr/_41b8f993._.js.map +1 -0
  91. package/mcp-server/.next/server/chunks/ssr/_9ba0ef29._.js +3 -0
  92. package/mcp-server/.next/server/chunks/ssr/_9ba0ef29._.js.map +1 -0
  93. package/mcp-server/.next/server/chunks/ssr/_cd4dc25e._.js.map +1 -1
  94. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_workflows_new_new-workflow-client_tsx_1312c046._.js +2 -2
  95. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_workflows_new_new-workflow-client_tsx_1312c046._.js.map +1 -1
  96. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_workflows_workflows-client_tsx_268cfd4a._.js +7 -0
  97. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_workflows_workflows-client_tsx_268cfd4a._.js.map +1 -0
  98. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_961f21c4._.js +3 -0
  99. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_961f21c4._.js.map +1 -0
  100. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_a82244bf._.js +3 -0
  101. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_a82244bf._.js.map +1 -0
  102. package/mcp-server/.next/server/chunks/ssr/{node_modules__pnpm_07527699._.js → node_modules__pnpm_eb98e511._.js} +2 -2
  103. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_eb98e511._.js.map +1 -0
  104. package/mcp-server/.next/server/server-reference-manifest.js +1 -1
  105. package/mcp-server/.next/server/server-reference-manifest.json +1 -1
  106. package/mcp-server/.next/static/chunks/000849a6a897f531.css +1 -0
  107. package/mcp-server/.next/static/chunks/048cee2510ddb1a0.js +1 -0
  108. package/mcp-server/.next/static/chunks/0622bd0e093adee7.js +3 -0
  109. package/mcp-server/.next/static/chunks/{46f60efee5f19794.js → 16359f64918a93f3.js} +1 -1
  110. package/mcp-server/.next/static/chunks/1851a3e70d7efc10.js +1 -0
  111. package/mcp-server/.next/static/chunks/{cc6addc4bb10fa11.js → 2ad16eeb719786f1.js} +1 -1
  112. package/mcp-server/.next/static/chunks/57feca7a4e06545e.js +7 -0
  113. package/mcp-server/.next/static/chunks/93db5737a327ab0c.js +6 -0
  114. package/mcp-server/.next/static/chunks/9fd3c715ecfb4d05.js +1 -0
  115. package/mcp-server/.next/static/chunks/b4b1ec6435790587.js +1 -0
  116. package/mcp-server/.next/static/chunks/cfe150cb2048b7e8.js +1 -0
  117. package/mcp-server/app/api/cloud/fix-workflow/steps.ts +359 -28
  118. package/mcp-server/app/api/cloud/fix-workflow/workflow.ts +16 -8
  119. package/mcp-server/app/api/cloud/start-fix/route.ts +2 -2
  120. package/mcp-server/app/api/tools/route.ts +11 -12
  121. package/mcp-server/app/api/workflows/route.ts +45 -1
  122. package/mcp-server/app/mcp/tools.ts +58 -98
  123. package/mcp-server/app/workflows/workflows-client.tsx +259 -100
  124. package/package.json +1 -1
  125. package/src/tui-interface-impl.tsx +175 -127
  126. package/mcp-server/.next/server/chunks/[root-of-the-server]__75d68567._.js +0 -3
  127. package/mcp-server/.next/server/chunks/[root-of-the-server]__75d68567._.js.map +0 -1
  128. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__0ff05d72._.js +0 -3
  129. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__0ff05d72._.js.map +0 -1
  130. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__27cc5956._.js +0 -3
  131. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__27cc5956._.js.map +0 -1
  132. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__570677dc._.js.map +0 -1
  133. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__ef510343._.js +0 -3
  134. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__ef510343._.js.map +0 -1
  135. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_07527699._.js.map +0 -1
  136. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_7cc36047._.js +0 -3
  137. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_7cc36047._.js.map +0 -1
  138. package/mcp-server/.next/static/chunks/07848f6bd2a7e5f6.js +0 -3
  139. package/mcp-server/.next/static/chunks/637a66565f27572f.js +0 -6
  140. package/mcp-server/.next/static/chunks/aed4fb5252a4bc95.js +0 -3
  141. package/mcp-server/.next/static/chunks/e8d521464b0c96ca.css +0 -1
  142. package/mcp-server/.next/static/chunks/ff53279afa939907.js +0 -1
  143. package/mcp-server/.next/static/chunks/ffa2ecb6845be49c.js +0 -1
  144. /package/mcp-server/.next/static/{ZvLsxTWoDyQzaSsr_VeX6 → G5taiQ-Jp0B_MdvkQuoIT}/_buildManifest.js +0 -0
  145. /package/mcp-server/.next/static/{ZvLsxTWoDyQzaSsr_VeX6 → G5taiQ-Jp0B_MdvkQuoIT}/_clientMiddlewareManifest.json +0 -0
  146. /package/mcp-server/.next/static/{ZvLsxTWoDyQzaSsr_VeX6 → G5taiQ-Jp0B_MdvkQuoIT}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- import { listWorkflowRuns } from "@/lib/workflow-storage"
1
+ import { deleteWorkflowRuns, listWorkflowRuns } from "@/lib/workflow-storage"
2
2
 
3
3
  /**
4
4
  * GET /api/workflows
@@ -37,3 +37,47 @@ export async function GET(request: Request) {
37
37
  )
38
38
  }
39
39
  }
40
+
41
+ /**
42
+ * DELETE /api/workflows
43
+ * Deletes workflow runs and their associated blobs
44
+ *
45
+ * Body:
46
+ * - userId: Required. The user ID
47
+ * - runIds: Required. Array of run IDs to delete
48
+ */
49
+ export async function DELETE(request: Request) {
50
+ try {
51
+ const body = await request.json()
52
+ const { userId, runIds } = body
53
+
54
+ if (!userId) {
55
+ return Response.json({ error: "userId is required" }, { status: 400 })
56
+ }
57
+
58
+ if (!runIds || !Array.isArray(runIds) || runIds.length === 0) {
59
+ return Response.json({ error: "runIds array is required" }, { status: 400 })
60
+ }
61
+
62
+ console.log(`[Workflows API] Deleting ${runIds.length} runs for user: ${userId}`)
63
+
64
+ const result = await deleteWorkflowRuns(userId, runIds)
65
+
66
+ console.log(`[Workflows API] Deleted ${result.deleted} runs, ${result.errors.length} errors`)
67
+
68
+ return Response.json({
69
+ success: true,
70
+ deleted: result.deleted,
71
+ errors: result.errors
72
+ })
73
+ } catch (error) {
74
+ console.error("[Workflows API] Error deleting workflow runs:", error)
75
+ return Response.json(
76
+ {
77
+ success: false,
78
+ error: error instanceof Error ? error.message : String(error)
79
+ },
80
+ { status: 500 }
81
+ )
82
+ }
83
+ }
@@ -12,22 +12,22 @@ const execAsync = promisify(exec)
12
12
  // Tool descriptions
13
13
  export const TOOL_DESCRIPTIONS = {
14
14
  fix_my_app:
15
- "🔧 **THE ULTIMATE FIND→FIX→VERIFY MACHINE!** This tool doesn't just find bugs - it FIXES them! Pure dev3000 magic that identifies issues, prioritizes them, and creates focused PRs for the worst issue! 🪄\n\n🔥 **INSTANT FIXING SUPERPOWERS:**\n• Detects ALL error types: server crashes, browser errors, build failures, API issues, performance problems, React/Next.js warnings (hydration errors, Suspense warnings, SSR issues, cache warnings), TypeScript errors, runtime errors\n• **AUTO-DETECTS NEXT.JS** and integrates with nextjs-devtools-mcp for framework-specific analysis\n **PRIORITIZES errors** using smart scoring (build > server > browser > network > warnings)\n **Identifies the SINGLE WORST issue** that needs fixing right now\n• **Creates ONE focused PR** per run - no overwhelming multi-issue PRs!\n Shows EXACT user interactions that triggered each error (clicks, navigation, etc.)\n Provides EXACT fix code with file locations and line numbers\n Verifies fixes by replaying the same interactions that caused the error!\n\n🎯 **SMART PRIORITIZATION:**\n• Build errors: 1000+ priority (blocks development)\n• Server errors: 500+ priority (affects functionality)\n• Browser errors: 300+ priority (user-facing issues)\n• Network errors: 200+ priority (intermittent issues)\n• Warnings: 100+ priority (nice to fix)\n• +Modifiers: Multiple occurrences, recency, reproducibility\n\n🚀 **ONE-PR-PER-RUN WORKFLOW:**\n1️⃣ I FIND all issues and their interactions\n2️⃣ I PRIORITIZE using smart scoring algorithm\n3️⃣ I IDENTIFY the single worst issue\n4️⃣ Set createPR=true to CREATE A FOCUSED PR for just that issue\n5️⃣ Fix that ONE issue, then run again for the next worst issue\n\n📍 **INTERACTION-BASED VERIFICATION:**\nEvery error includes the user interactions that led to it\n• Use execute_browser_action to replay these exact interactions\n• Verify your fix works by confirming the error doesn't reoccur\n• Example: Error shows '[INTERACTION] Click at (450,300)' → After fix, use execute_browser_action(action='click', params={x:450, y:300}) to verify\n\n⚡ **3 ACTION MODES:**\n• FIX NOW: 'What's broken RIGHT NOW?' → Find worst issue and optionally create PR\n• FIX REGRESSION: 'What broke during testing?' → Compare before/after and fix worst issue\n• FIX CONTINUOUSLY: 'Fix issues as they appear' → Monitor and fix proactively\n\n⚛️ **NEXT.JS/REACT SUPPORT:**\nAutomatically detects and fixes Next.js-specific issues like:\n\"Accessing uncached data outside <Suspense>\" warnings\n• Hydration mismatches between server and client\n• SSR/RSC rendering errors\n• Middleware and routing issues\n• Dynamic import and code-splitting problems\n\n💡 **PERFECT FOR:** 'fix my app', 'debug my app', 'fix the Suspense warning', 'fix hydration error', 'fix the Next.js warning', 'create pr for worst issue'. This tool identifies problems, ranks them by severity, and creates focused single-issue PRs - not giant multi-fix PRs!\n\n🏷️ **ATTRIBUTION REQUIREMENT:** When creating commits or PRs based on dev3000 logs/analysis, ALWAYS include attribution to both Claude Code AND dev3000:\n```\n🤖 Generated with [Claude Code](https://claude.com/claude-code) using [d3k](https://d3k.dev)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\n```",
15
+ "Diagnoses application errors from dev3000 logs. Returns a prioritized list of issues requiring fixes.\n\n**CRITICAL: You MUST use this tool in a loop until all errors are resolved:**\n\n```\nwhile (errors exist) {\n 1. DIAGNOSE: Call fix_my_app to get current errors\n 2. FIX: Implement a fix for the highest-priority error\n 3. VERIFY: Call fix_my_app again to confirm the error is gone\n 4. REPEAT: Continue until no errors remain\n}\n```\n\n**This tool does NOT fix anything automatically.** It returns diagnostic data. You must:\n- Read the error output\n- Investigate and fix each issue\n- Call this tool again to verify your fix worked\n- Keep looping until the app is healthy\n\n**What it analyzes:**\n• Server logs, browser console, network requests\n• Categorizes: build errors, server crashes, browser errors, network issues, warnings\n• Prioritizes by severity (fix build errors first, then server, then browser, etc.)\n• Shows user interactions that triggered each error\n\n**Parameters:**\n• focusArea: 'build', 'runtime', 'network', 'ui', 'performance', or 'all' (default)\n• mode: 'snapshot' (current state), 'bisect' (before/after comparison), 'monitor' (continuous)\n• timeRangeMinutes: How far back to analyze (default: 10)\n• createPR: If true, creates a PR branch for the highest-priority issue\n\n**Framework support:** Auto-detects Next.js for framework-specific analysis.\n\n**Attribution for commits/PRs:**\n```\nGenerated with Claude Code using d3k (https://d3k.dev)\nCo-Authored-By: Claude <noreply@anthropic.com>\n```",
16
16
 
17
17
  execute_browser_action:
18
- "🌐 **INTELLIGENT BROWSER AUTOMATION** - Smart browser action routing that automatically delegates to chrome-devtools MCP when available for superior automation capabilities.\n\n🎯 **INTELLIGENT DELEGATION:**\n• Screenshots chrome-devtools MCP (better quality, no conflicts)\n• Navigation chrome-devtools MCP (more reliable page handling)\n• Clicks chrome-devtools MCP (precise coordinate-based interaction)\n• JavaScript evaluation chrome-devtools MCP (enhanced debugging)\n• Scrolling & typing → dev3000 fallback (specialized actions)\n\n**PROGRESSIVE ENHANCEMENT:**\n• Uses chrome-devtools MCP when available for best results\n• Falls back to dev3000's native implementation when chrome-devtools unavailable\n• Shares the same Chrome instance via CDP URL coordination\n• Eliminates browser conflicts between tools\n\n💡 **PERFECT FOR:** Browser automation that automatically chooses the best tool for each action, ensuring optimal results whether chrome-devtools MCP is available or not.",
18
+ "Executes browser actions (click, navigate, scroll, type, evaluate JS) in the dev3000-managed Chrome instance.\n\n**Routing behavior:**\n• Delegates to chrome-devtools MCP when available for screenshots, navigation, clicks, and JS evaluation\n• Falls back to dev3000's native CDP implementation otherwise\n• Shares the same Chrome instance - no conflicts between tools\n\n**Available actions:**\n• screenshot: Capture current page state\n• navigate: Go to a URL\n• click: Click at coordinates {x, y}\n• scroll: Scroll by {x, y} pixels\n• type: Type text into focused element\n• evaluate: Execute JavaScript (read-only operations recommended)\n\n**Use cases:**\n• Reproducing user interactions that triggered errors\n• Verifying fixes by replaying the error scenario\n• Testing specific UI workflows",
19
19
 
20
20
  analyze_visual_diff:
21
- "🔍 **VISUAL DIFF ANALYZER** - Analyzes two screenshots to identify and describe visual differences. Returns detailed instructions for Claude to load and compare the images, focusing on what changed that could cause layout shifts.\n\n🎯 **WHAT IT PROVIDES:**\n• Direct instructions to load both images via Read tool\n• Context about what to look for\n• Guidance on identifying layout shift causes\n• Structured format for easy analysis\n\n💡 **PERFECT FOR:** Understanding what visual changes occurred between before/after frames in CLS detection, identifying elements that appeared/moved/resized.",
21
+ "Compares two screenshots and returns analysis instructions for identifying visual differences.\n\n**What it provides:**\n• Instructions to load both images for comparison\n• Context about what visual changes to look for\n• Guidance on identifying layout shift causes\n\n**Use cases:**\n• Analyzing before/after frames from CLS detection\n• Identifying elements that appeared, moved, or resized\n• Debugging visual regressions",
22
22
 
23
23
  find_component_source:
24
- "🔍 **COMPONENT SOURCE FINDER** - Maps DOM elements to their source code by extracting the React component function and finding unique patterns to search for.\n\n🎯 **HOW IT WORKS:**\n• Inspects the element via Chrome DevTools Protocol\n• Extracts the React component function source using .toString()\n• Identifies unique code patterns (specific JSX, classNames, imports)\n• Returns targeted grep patterns to find the exact source file\n\n💡 **PERFECT FOR:** Finding which file contains the code for a specific element, especially useful for CLS debugging when you need to fix layout shifts in specific components.",
24
+ "Maps a DOM element to its React component source code location.\n\n**How it works:**\n1. Inspects the element via Chrome DevTools Protocol\n2. Extracts the React component function source\n3. Identifies unique code patterns (JSX, classNames, etc.)\n4. Returns grep patterns to locate the source file\n\n**Use cases:**\n• Finding which file contains a specific UI element\n• Locating components responsible for layout shifts\n• Tracing DOM elements back to source code",
25
25
 
26
26
  restart_dev_server:
27
- "🔄 **DEV SERVER RESTART** - Safely restarts the development server while preserving dev3000's monitoring, logs, and browser connection.\n\n🎯 **SMART RESTART LOGIC:**\n• First tries nextjs-dev MCP restart (if available and user has Next.js canary)\n• Falls back to dev3000's own restart mechanism:\n - Kills the old server process on the app port\n - Waits for clean shutdown\n - Spawns a new server with the same command that was originally used\n - Keeps dev3000's MCP server, browser monitoring, and screenshot capture running\n• All logging continues seamlessly - no data loss\n Browser monitoring stays connected - no need to relaunch Chrome\n\n⚡ **WHEN TO USE:**\n• After modifying next.config.js, middleware, or environment variables\n• When you need a clean restart to clear server state\n• After significant code changes that Next.js HMR can't handle\n• When debugging persistent state or memory issues\n\n⚠️ **CRITICAL - DO NOT:**\n• NEVER manually run kill commands on the dev server like `pkill -f \"next dev\"` or `lsof -ti :3000 | xargs kill`\n• NEVER manually start the dev server with `npm run dev`, `pnpm dev`, `next dev`, etc.\n• ✅ ALWAYS use this tool for dev server restarts - it preserves all dev3000 infrastructure\n\n⚠️ **IMPORTANT:**\nAVOID using this unnecessarily - Next.js HMR handles most changes automatically\n• Only restart when truly needed for config changes or state issues\n• The server will be offline for a few seconds during restart\n• Browser may show connection error briefly while server restarts\n\n💡 **PERFECT FOR:** 'restart the dev server', 'clean restart', 'reload the server' - but only when actually needed, not for regular code changes.",
27
+ "Restarts the development server while preserving dev3000's monitoring infrastructure.\n\n**Restart process:**\n1. Tries nextjs-dev MCP restart if available\n2. Falls back to killing and respawning the server process\n3. Preserves: MCP server, browser connection, log capture, screenshots\n\n**When to use:**\n• After modifying config files (next.config.js, middleware, .env)\n• To clear persistent server state\n• For changes that HMR cannot handle\n\n**Important:**\n• Do NOT manually kill the dev server with pkill/kill commands\n• Do NOT manually start the server with npm/pnpm/yarn\n• Server will be offline briefly during restart\n• Most code changes are handled by HMR - only restart when necessary",
28
28
 
29
29
  crawl_app:
30
- "🕷️ **APP CRAWLER** - Discovers all URLs in your app by crawling links starting from the homepage. Perfect for finding every page before running fixes or tests across your entire site.\n\n🎯 **SMART CRAWLING:**\n• Starts at your app's homepage (localhost)\n• Discovers all unique URLs at specified depth\n• Depth 1 = homepage links only\n• Depth 2 = homepage + links from those pages\n• Depth 'all' = exhaustive crawl until no new links found\n• Limit controls max links followed per page (default 3)\n• Only follows same-origin links (stays within your app)\n• Deduplicates URLs automatically\n\n⚙️ **PARAMETERS:**\n• depth: How many levels to crawl (1, 2, 3... or 'all')\n• limit: Max links to follow per page (default 3, prevents following 100+ links from homepage)\n• Higher limit = more thorough but slower crawl\n\n📊 **OUTPUT:**\n• List of all discovered URLs\n• Total count of unique pages\n• Depth reached\n• Ready to use with fix_my_app or other tools\n\n💡 **PERFECT FOR:**\n• 'crawl my app' or 'crawl my shit' - discover all pages\n• 'crawl my app and fix my shit' - find all pages then run fixes\n• Site-wide testing and debugging\n• Verifying all routes work before deployment\n\n⚡ **USAGE:**\n• Default: depth 1, limit 3 (just first 3 homepage links)\n• Specify depth: 'crawl at depth 2' or depth=2\n• Specify limit: 'crawl with limit 10' or limit=10\n• Full crawl: 'crawl all pages' or depth='all'"
30
+ "Discovers URLs in the application by crawling links from the homepage.\n\n**Parameters:**\n• depth: How many link levels to follow (1, 2, 3, or 'all')\n• limit: Max links per page (default: 3)\n\n**Behavior:**\n• Starts at localhost homepage\n• Follows same-origin links only\n• Deduplicates discovered URLs\n• Returns list of all found pages\n\n**Use cases:**\n• Discovering all routes before running diagnostics\n• Site-wide testing coverage\n• Verifying all pages load without errors"
31
31
  }
32
32
 
33
33
  // Types
@@ -727,134 +727,115 @@ export async function fixMyApp({
727
727
  }
728
728
 
729
729
  if (totalErrors === 0 && !recentErrorsOutsideTimeRange) {
730
- results.push(`✅ **SYSTEM HEALTHY** - No errors found in last ${timeRangeMinutes} minutes`)
731
- results.push("🎯 App appears to be running smoothly!")
730
+ results.push(`No errors found in last ${timeRangeMinutes} minutes.`)
731
+ results.push("Application appears healthy.")
732
732
 
733
733
  if (includeTimestampInstructions && mode !== "monitor") {
734
734
  results.push("")
735
- results.push("💡 **PROACTIVE MONITORING TIPS:**")
736
- results.push("• Use mode='bisect' with waitForUserInteraction=true before testing new features")
737
- results.push("• Use mode='monitor' for continuous background monitoring")
738
- results.push("• Increase timeRangeMinutes to analyze longer periods")
735
+ results.push("Options:")
736
+ results.push("• Use mode='bisect' to compare before/after states during testing")
737
+ results.push("• Use mode='monitor' for continuous monitoring")
738
+ results.push("• Increase timeRangeMinutes to analyze a longer period")
739
739
  }
740
740
  } else if (totalErrors === 0 && recentErrorsOutsideTimeRange) {
741
741
  results.push(
742
- `⚠️ **NO ERRORS IN LAST ${timeRangeMinutes} MINUTES** - But found ${allLogErrors.length} errors in the full log`
742
+ `No errors in last ${timeRangeMinutes} minutes, but found ${allLogErrors.length} errors in full log.`
743
743
  )
744
744
  results.push("")
745
- results.push("📋 **RECENT ERRORS (outside time range):**")
745
+ results.push("Older errors (outside time range):")
746
746
  // Show last 5 errors from the full log with their interactions
747
747
  allLogErrors.slice(-5).forEach((error) => {
748
748
  const interactions = findInteractionsBeforeError(error, logLines)
749
749
  if (interactions.length > 0) {
750
- results.push(" 📍 Preceding interactions:")
750
+ results.push(" Preceding interactions:")
751
751
  for (const interaction of interactions) {
752
752
  results.push(` ${interaction}`)
753
753
  }
754
754
  }
755
- results.push(` ${error}`)
755
+ results.push(` - ${error}`)
756
756
  results.push("")
757
757
  })
758
- results.push("💡 **TIP:** Increase timeRangeMinutes parameter to analyze these errors")
759
- results.push("💡 **TIP:** Or use timeRangeMinutes=60 to check the last hour")
758
+ results.push("To analyze these errors, increase timeRangeMinutes (e.g., timeRangeMinutes=60)")
760
759
  } else {
761
760
  results.push(
762
- `🚨 **${totalErrors} ISSUES DETECTED** (${criticalErrors} critical, ${categorizedErrors.warnings.length} warnings)`
761
+ `**${totalErrors} ISSUES DETECTED** (${criticalErrors} critical, ${categorizedErrors.warnings.length} warnings)`
763
762
  )
764
763
  results.push("")
764
+ results.push("**ACTION REQUIRED:** Fix the highest-priority error below, then call fix_my_app again to verify.")
765
+ results.push("")
765
766
 
766
767
  // Show categorized errors with their preceding interactions
767
768
  if (categorizedErrors.serverErrors.length > 0) {
768
- results.push("🔥 **SERVER ERRORS:**")
769
+ results.push("SERVER ERRORS:")
769
770
  categorizedErrors.serverErrors.slice(-5).forEach((error) => {
770
771
  const interactions = findInteractionsBeforeError(error, logLines)
771
772
  if (interactions.length > 0) {
772
- results.push(" 📍 Preceding interactions:")
773
+ results.push(" Preceding interactions:")
773
774
  for (const interaction of interactions) {
774
775
  results.push(` ${interaction}`)
775
776
  }
776
777
  }
777
- results.push(` ${error}`)
778
+ results.push(` - ${error}`)
778
779
  results.push("")
779
780
  })
780
781
  }
781
782
 
782
783
  if (categorizedErrors.browserErrors.length > 0) {
783
- results.push("🌐 **BROWSER/CONSOLE ERRORS:**")
784
+ results.push("BROWSER/CONSOLE ERRORS:")
784
785
  categorizedErrors.browserErrors.slice(-5).forEach((error) => {
785
786
  const interactions = findInteractionsBeforeError(error, logLines)
786
787
  if (interactions.length > 0) {
787
- results.push(" 📍 Preceding interactions:")
788
+ results.push(" Preceding interactions:")
788
789
  for (const interaction of interactions) {
789
790
  results.push(` ${interaction}`)
790
791
  }
791
792
  }
792
- results.push(` ${error}`)
793
+ results.push(` - ${error}`)
793
794
  results.push("")
794
795
  })
795
796
  }
796
797
 
797
798
  if (categorizedErrors.buildErrors.length > 0) {
798
- results.push("🔨 **BUILD/COMPILATION ERRORS:**")
799
+ results.push("BUILD/COMPILATION ERRORS:")
799
800
  categorizedErrors.buildErrors.slice(-5).forEach((error) => {
800
801
  const interactions = findInteractionsBeforeError(error, logLines)
801
802
  if (interactions.length > 0) {
802
- results.push(" 📍 Preceding interactions:")
803
+ results.push(" Preceding interactions:")
803
804
  for (const interaction of interactions) {
804
805
  results.push(` ${interaction}`)
805
806
  }
806
807
  }
807
- results.push(` ${error}`)
808
+ results.push(` - ${error}`)
808
809
  results.push("")
809
810
  })
810
811
  }
811
812
 
812
813
  if (categorizedErrors.networkErrors.length > 0) {
813
- results.push("🌐 **NETWORK/API ERRORS:**")
814
+ results.push("NETWORK/API ERRORS:")
814
815
  categorizedErrors.networkErrors.slice(-5).forEach((error) => {
815
816
  const interactions = findInteractionsBeforeError(error, logLines)
816
817
  if (interactions.length > 0) {
817
- results.push(" 📍 Preceding interactions:")
818
+ results.push(" Preceding interactions:")
818
819
  for (const interaction of interactions) {
819
820
  results.push(` ${interaction}`)
820
821
  }
821
822
  }
822
- results.push(` ${error}`)
823
+ results.push(` - ${error}`)
823
824
  results.push("")
824
825
  })
825
826
  }
826
827
 
827
828
  if (categorizedErrors.warnings.length > 0 && focusArea === "all") {
828
- results.push(`⚠️ **WARNINGS** (${categorizedErrors.warnings.length} found, showing recent):`)
829
+ results.push(`WARNINGS (${categorizedErrors.warnings.length} found, showing recent):`)
829
830
  results.push(categorizedErrors.warnings.slice(-3).join("\n"))
830
831
  results.push("")
831
832
  }
832
833
 
833
- // Show the magical dev3000 fix workflow
834
- results.push("🪄 **ULTIMATE DEV3000 FIX-IT MAGIC READY:**")
835
- results.push("🎯 **I don't just find errors - I FIX them instantly!**")
836
- results.push("")
837
- results.push("📍 **INTERACTION-BASED VERIFICATION WORKFLOW:**")
838
- results.push("• Each error shows the EXACT user interactions that triggered it")
839
- results.push("• Use these interactions to reproduce the error with execute_browser_action")
840
- results.push("• After fixing, replay the SAME interactions to verify the fix works")
841
- results.push("• Example: If error shows [INTERACTION] Click at (x:450, y:300), use:")
842
- results.push(" execute_browser_action(action='click', params={x:450, y:300})")
834
+ // Show the diagnose-fix-verify loop
835
+ results.push("---")
836
+ results.push("**NEXT: Fix the highest-priority issue, then call fix_my_app again to verify.**")
843
837
  results.push("")
844
- results.push("🔧 **FIX WORKFLOW:**")
845
- results.push("1. Analyze error patterns and preceding interactions")
846
- results.push("2. Provide exact fix code with file locations")
847
- results.push("3. Guide you through implementing the fixes")
848
- results.push("4. Use execute_browser_action to replay the interactions")
849
- results.push("5. Verify the error no longer occurs!")
850
- results.push("• Dev3000 AUTO-CAPTURES screenshots during all interactions!")
851
- results.push("• No manual screenshots needed - dev3000 handles it all!")
852
- results.push("")
853
- results.push("📸 **AUTO-SCREENSHOT MAGIC:**")
854
- results.push("• Screenshots captured on EVERY page navigation")
855
- results.push("• Screenshots captured on EVERY error/exception")
856
- results.push("• Screenshots captured on manual triggers")
857
- results.push("• All screenshots timestamped and linked to events!")
838
+ results.push("Keep calling fix_my_app after each fix until no errors remain.")
858
839
 
859
840
  // Add integration-aware suggestions
860
841
  if (integrateNextjs || integrateChromeDevtools) {
@@ -868,11 +849,11 @@ export async function fixMyApp({
868
849
  )
869
850
 
870
851
  results.push("")
871
- results.push("🎼 **MCP INTEGRATION ENHANCEMENTS:**")
852
+ results.push("**Available MCP integrations:**")
872
853
 
873
854
  if (integrateNextjs) {
874
855
  results.push("")
875
- results.push("⚛️ **Next.js Integration Active:**")
856
+ results.push("Next.js MCP (nextjs-dev):")
876
857
  const nextjsSuggestions = await generateNextjsSuggestions(allErrors.join(" "))
877
858
  nextjsSuggestions.forEach((suggestion) => {
878
859
  const params = suggestion.params
@@ -880,20 +861,18 @@ export async function fixMyApp({
880
861
  .map(([k, v]) => `${k}=${JSON.stringify(v)}`)
881
862
  .join(", ")})`
882
863
  : "()"
883
- results.push(`• Use nextjs-dev.${suggestion.function}${params}`)
884
- results.push(` ${suggestion.reason}`)
864
+ results.push(` • nextjs-dev.${suggestion.function}${params}`)
865
+ results.push(` Reason: ${suggestion.reason}`)
885
866
  })
886
867
 
887
- // Next.js specific correlation tips
888
868
  if (categorizedErrors.serverErrors.length > 0) {
889
- results.push("• Correlate server errors with Next.js build/runtime logs")
890
- results.push("• Check for SSR/hydration mismatches in Next.js context")
869
+ results.push(" Check Next.js build/runtime logs for SSR/hydration issues")
891
870
  }
892
871
  }
893
872
 
894
873
  if (integrateChromeDevtools) {
895
874
  results.push("")
896
- results.push("🌐 **Chrome DevTools Integration Active:**")
875
+ results.push("Chrome DevTools MCP (chrome-devtools):")
897
876
  const chromeSuggestions = await generateChromeDevtoolsSuggestions(allErrors.join(" "))
898
877
  chromeSuggestions.forEach((suggestion) => {
899
878
  const params = suggestion.params
@@ -901,69 +880,50 @@ export async function fixMyApp({
901
880
  .map(([k, v]) => `${k}=${JSON.stringify(v)}`)
902
881
  .join(", ")})`
903
882
  : "()"
904
- results.push(`• Use chrome-devtools.${suggestion.function}${params}`)
905
- results.push(` ${suggestion.reason}`)
883
+ results.push(` • chrome-devtools.${suggestion.function}${params}`)
884
+ results.push(` Reason: ${suggestion.reason}`)
906
885
  })
907
886
 
908
- // Chrome DevTools specific correlation tips
909
887
  if (categorizedErrors.browserErrors.length > 0) {
910
- results.push("• Cross-reference browser console errors with Chrome DevTools")
911
- results.push("• Use DOM inspection for UI interaction failures")
888
+ results.push(" Use DOM inspection for UI issues")
912
889
  }
913
890
  if (categorizedErrors.networkErrors.length > 0) {
914
- results.push("• Analyze network requests timing with Chrome DevTools")
915
- results.push("• Inspect failed requests for detailed error context")
891
+ results.push(" Inspect network requests for detailed error context")
916
892
  }
917
893
  }
918
-
919
- if (integrateNextjs && integrateChromeDevtools) {
920
- results.push("")
921
- results.push("🚀 **TRIPLE-STACK DEBUGGING POWER:**")
922
- results.push("• dev3000 provides interaction replay + error correlation")
923
- results.push("• nextjs-dev provides server-side framework context")
924
- results.push("• chrome-devtools provides precise browser state inspection")
925
- results.push("• Combined = 90%+ issue resolution rate!")
926
- }
927
894
  }
928
895
 
929
- // 🎯 PRIORITIZATION & PR CREATION
930
896
  // Find the single highest priority error and optionally create a PR
931
897
  const highestPriorityError = findHighestPriorityError(categorizedErrors, actionableErrors, logLines)
932
898
 
933
899
  if (highestPriorityError) {
934
900
  results.push("")
935
- results.push("🎯 **HIGHEST PRIORITY ISSUE:**")
936
- results.push(`📊 Priority Score: ${highestPriorityError.priorityScore}`)
937
- results.push(`🏷️ Category: ${highestPriorityError.category.toUpperCase()}`)
938
- results.push(`⚠️ Severity: ${highestPriorityError.severity.toUpperCase()}`)
901
+ results.push("---")
902
+ results.push("**HIGHEST PRIORITY ISSUE (fix this first):**")
903
+ results.push(`Priority Score: ${highestPriorityError.priorityScore}`)
904
+ results.push(`Category: ${highestPriorityError.category.toUpperCase()}`)
905
+ results.push(`Severity: ${highestPriorityError.severity.toUpperCase()}`)
939
906
  results.push("")
940
- results.push("❌ **Error:**")
941
- results.push(` ${highestPriorityError.error}`)
907
+ results.push("Error:")
908
+ results.push(` ${highestPriorityError.error}`)
942
909
 
943
910
  if (highestPriorityError.interactions.length > 0) {
944
911
  results.push("")
945
- results.push("📍 **Reproduction Steps:**")
912
+ results.push("Reproduction steps:")
946
913
  highestPriorityError.interactions.forEach((interaction, idx) => {
947
- results.push(` ${idx + 1}. ${interaction}`)
914
+ results.push(` ${idx + 1}. ${interaction}`)
948
915
  })
949
916
  }
950
917
 
951
918
  // Create PR if requested
952
919
  if (createPR) {
953
920
  results.push("")
954
- results.push("🚀 **CREATING PR FOR THIS ISSUE...**")
921
+ results.push("Creating PR branch for this issue...")
955
922
  const prResult = await createPRForIssue(highestPriorityError, projectName || "")
956
923
  results.push(prResult)
957
924
  } else {
958
925
  results.push("")
959
- results.push("💡 **To create a PR for this issue:**")
960
- results.push(" Run: fix_my_app(createPR=true)")
961
- results.push("")
962
- results.push(" This will:")
963
- results.push(" • Create a new branch for the fix")
964
- results.push(" • Generate a PR with full error context")
965
- results.push(" • Include reproduction steps")
966
- results.push(" • Focus on fixing just this ONE issue")
926
+ results.push("To create a PR branch for this issue, run: fix_my_app(createPR=true)")
967
927
  }
968
928
  }
969
929
  }