dev3000 0.0.59 → 0.0.62

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 (292) hide show
  1. package/README.md +4 -0
  2. package/dist/cdp-monitor.d.ts +2 -1
  3. package/dist/cdp-monitor.d.ts.map +1 -1
  4. package/dist/cdp-monitor.js +34 -17
  5. package/dist/cdp-monitor.js.map +1 -1
  6. package/dist/cli.js +105 -13
  7. package/dist/cli.js.map +1 -1
  8. package/dist/dev-environment.d.ts +8 -0
  9. package/dist/dev-environment.d.ts.map +1 -1
  10. package/dist/dev-environment.js +183 -42
  11. package/dist/dev-environment.js.map +1 -1
  12. package/dist/services/parsers/error-detectors/base.d.ts +24 -0
  13. package/dist/services/parsers/error-detectors/base.d.ts.map +1 -0
  14. package/dist/services/parsers/error-detectors/base.js +44 -0
  15. package/dist/services/parsers/error-detectors/base.js.map +1 -0
  16. package/dist/services/parsers/error-detectors/index.d.ts +6 -0
  17. package/dist/services/parsers/error-detectors/index.d.ts.map +1 -0
  18. package/dist/services/parsers/error-detectors/index.js +6 -0
  19. package/dist/services/parsers/error-detectors/index.js.map +1 -0
  20. package/dist/services/parsers/error-detectors/nextjs.d.ts +9 -0
  21. package/dist/services/parsers/error-detectors/nextjs.d.ts.map +1 -0
  22. package/dist/services/parsers/error-detectors/nextjs.js +52 -0
  23. package/dist/services/parsers/error-detectors/nextjs.js.map +1 -0
  24. package/dist/services/parsers/index.d.ts +8 -0
  25. package/dist/services/parsers/index.d.ts.map +1 -0
  26. package/dist/services/parsers/index.js +10 -0
  27. package/dist/services/parsers/index.js.map +1 -0
  28. package/dist/services/parsers/log-parsers/base.d.ts +26 -0
  29. package/dist/services/parsers/log-parsers/base.d.ts.map +1 -0
  30. package/dist/services/parsers/log-parsers/base.js +6 -0
  31. package/dist/services/parsers/log-parsers/base.js.map +1 -0
  32. package/dist/services/parsers/log-parsers/index.d.ts +6 -0
  33. package/dist/services/parsers/log-parsers/index.d.ts.map +1 -0
  34. package/dist/services/parsers/log-parsers/index.js +5 -0
  35. package/dist/services/parsers/log-parsers/index.js.map +1 -0
  36. package/dist/services/parsers/log-parsers/standard.d.ts +9 -0
  37. package/dist/services/parsers/log-parsers/standard.d.ts.map +1 -0
  38. package/dist/services/parsers/log-parsers/standard.js +17 -0
  39. package/dist/services/parsers/log-parsers/standard.js.map +1 -0
  40. package/dist/services/parsers/output-processor.d.ts +39 -0
  41. package/dist/services/parsers/output-processor.d.ts.map +1 -0
  42. package/dist/services/parsers/output-processor.js +54 -0
  43. package/dist/services/parsers/output-processor.js.map +1 -0
  44. package/mcp-server/.next/BUILD_ID +1 -1
  45. package/mcp-server/.next/app-build-manifest.json +27 -22
  46. package/mcp-server/.next/app-path-routes-manifest.json +1 -0
  47. package/mcp-server/.next/build-manifest.json +6 -5
  48. package/mcp-server/.next/cache/.previewinfo +1 -1
  49. package/mcp-server/.next/cache/.rscinfo +1 -1
  50. package/mcp-server/.next/cache/.tsbuildinfo +1 -1
  51. package/mcp-server/.next/fallback-build-manifest.json +2 -2
  52. package/mcp-server/.next/prerender-manifest.json +10 -10
  53. package/mcp-server/.next/server/app/_global-error/page/app-build-manifest.json +4 -3
  54. package/mcp-server/.next/server/app/_global-error/page/build-manifest.json +4 -3
  55. package/mcp-server/.next/server/app/_global-error/page.js.nft.json +1 -1
  56. package/mcp-server/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  57. package/mcp-server/.next/server/app/_global-error.html +2 -2
  58. package/mcp-server/.next/server/app/_global-error.rsc +1 -1
  59. package/mcp-server/.next/server/app/_not-found/page/app-build-manifest.json +5 -4
  60. package/mcp-server/.next/server/app/_not-found/page/build-manifest.json +4 -3
  61. package/mcp-server/.next/server/app/_not-found/page.js.nft.json +1 -1
  62. package/mcp-server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  63. package/mcp-server/.next/server/app/_not-found.html +1 -1
  64. package/mcp-server/.next/server/app/_not-found.rsc +2 -2
  65. package/mcp-server/.next/server/app/api/config/route/app-build-manifest.json +4 -3
  66. package/mcp-server/.next/server/app/api/config/route/build-manifest.json +4 -3
  67. package/mcp-server/.next/server/app/api/health/route/app-build-manifest.json +4 -3
  68. package/mcp-server/.next/server/app/api/health/route/build-manifest.json +4 -3
  69. package/mcp-server/.next/server/app/api/logs/append/route/app-build-manifest.json +4 -3
  70. package/mcp-server/.next/server/app/api/logs/append/route/build-manifest.json +4 -3
  71. package/mcp-server/.next/server/app/api/logs/append/route.js +1 -1
  72. package/mcp-server/.next/server/app/api/logs/append/route.js.nft.json +1 -1
  73. package/mcp-server/.next/server/app/api/logs/head/route/app-build-manifest.json +4 -3
  74. package/mcp-server/.next/server/app/api/logs/head/route/build-manifest.json +4 -3
  75. package/mcp-server/.next/server/app/api/logs/list/route/app-build-manifest.json +4 -3
  76. package/mcp-server/.next/server/app/api/logs/list/route/build-manifest.json +4 -3
  77. package/mcp-server/.next/server/app/api/logs/list/route.js +1 -1
  78. package/mcp-server/.next/server/app/api/logs/list/route.js.nft.json +1 -1
  79. package/mcp-server/.next/server/app/api/logs/rotate/route/app-build-manifest.json +4 -3
  80. package/mcp-server/.next/server/app/api/logs/rotate/route/build-manifest.json +4 -3
  81. package/mcp-server/.next/server/app/api/logs/stream/route/app-build-manifest.json +4 -3
  82. package/mcp-server/.next/server/app/api/logs/stream/route/build-manifest.json +4 -3
  83. package/mcp-server/.next/server/app/api/logs/tail/route/app-build-manifest.json +4 -3
  84. package/mcp-server/.next/server/app/api/logs/tail/route/build-manifest.json +4 -3
  85. package/mcp-server/.next/server/app/api/mcp/[transport]/route/app-build-manifest.json +4 -3
  86. package/mcp-server/.next/server/app/api/mcp/[transport]/route/build-manifest.json +4 -3
  87. package/mcp-server/.next/server/app/api/mcp/[transport]/route.js +1 -1
  88. package/mcp-server/.next/server/app/api/mcp/[transport]/route.js.nft.json +1 -1
  89. package/mcp-server/.next/server/app/api/replay/route/app-build-manifest.json +4 -3
  90. package/mcp-server/.next/server/app/api/replay/route/build-manifest.json +4 -3
  91. package/mcp-server/.next/server/app/api/tools/route/app-build-manifest.json +12 -0
  92. package/mcp-server/.next/server/app/api/tools/route/app-paths-manifest.json +3 -0
  93. package/mcp-server/.next/server/app/api/tools/route/build-manifest.json +18 -0
  94. package/mcp-server/.next/server/app/api/tools/route/server-reference-manifest.json +4 -0
  95. package/mcp-server/.next/server/app/api/tools/route.js +7 -0
  96. package/mcp-server/.next/server/app/api/tools/route.js.map +5 -0
  97. package/mcp-server/.next/server/app/api/tools/route.js.nft.json +1 -0
  98. package/mcp-server/.next/server/app/api/tools/route_client-reference-manifest.js +2 -0
  99. package/mcp-server/.next/server/app/index.html +1 -1
  100. package/mcp-server/.next/server/app/index.rsc +3 -3
  101. package/mcp-server/.next/server/app/logs/page/app-build-manifest.json +6 -5
  102. package/mcp-server/.next/server/app/logs/page/build-manifest.json +4 -3
  103. package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
  104. package/mcp-server/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  105. package/mcp-server/.next/server/app/page/app-build-manifest.json +6 -5
  106. package/mcp-server/.next/server/app/page/build-manifest.json +4 -3
  107. package/mcp-server/.next/server/app/page.js.nft.json +1 -1
  108. package/mcp-server/.next/server/app/page_client-reference-manifest.js +1 -1
  109. package/mcp-server/.next/server/app/replay/page/app-build-manifest.json +6 -5
  110. package/mcp-server/.next/server/app/replay/page/build-manifest.json +4 -3
  111. package/mcp-server/.next/server/app/replay/page.js.nft.json +1 -1
  112. package/mcp-server/.next/server/app/replay/page_client-reference-manifest.js +1 -1
  113. package/mcp-server/.next/server/app/replay.html +1 -1
  114. package/mcp-server/.next/server/app/replay.rsc +3 -3
  115. package/mcp-server/.next/server/app-paths-manifest.json +1 -0
  116. package/mcp-server/.next/server/chunks/{[root-of-the-server]__1d2effbb._.js → [root-of-the-server]__25014d3e._.js} +2 -2
  117. package/mcp-server/.next/server/chunks/[root-of-the-server]__3dc88807._.js +3 -0
  118. package/mcp-server/.next/server/chunks/[root-of-the-server]__7f1ecf7b._.js +3 -0
  119. package/mcp-server/.next/server/chunks/[root-of-the-server]__7f1ecf7b._.js.map +1 -0
  120. package/mcp-server/.next/server/chunks/[root-of-the-server]__82298dd3._.js +7 -7
  121. package/mcp-server/.next/server/chunks/[root-of-the-server]__82298dd3._.js.map +1 -1
  122. package/mcp-server/.next/{standalone/.next/server/chunks/[root-of-the-server]__a9062def._.js → server/chunks/[root-of-the-server]__901c3acf._.js} +2 -2
  123. package/mcp-server/.next/server/chunks/_next-internal_server_app_api_tools_route_actions_4a0d5a18.js +3 -0
  124. package/mcp-server/.next/server/chunks/_next-internal_server_app_api_tools_route_actions_4a0d5a18.js.map +1 -0
  125. package/mcp-server/.next/server/chunks/ssr/0916f_next_d5a56baf._.js +3 -0
  126. package/mcp-server/.next/server/chunks/ssr/0916f_next_d5a56baf._.js.map +1 -0
  127. package/mcp-server/.next/server/chunks/ssr/0916f_next_dist_102cca64._.js +6 -0
  128. package/mcp-server/.next/server/chunks/ssr/0916f_next_dist_102cca64._.js.map +1 -0
  129. package/mcp-server/.next/server/chunks/ssr/0916f_next_dist_58af49d5._.js +6 -0
  130. package/mcp-server/.next/server/chunks/ssr/0916f_next_dist_58af49d5._.js.map +1 -0
  131. package/mcp-server/.next/server/chunks/ssr/{0916f_next_dist_b838d7f3._.js → 0916f_next_dist_esm_87a80014._.js} +2 -2
  132. package/mcp-server/.next/server/chunks/ssr/0916f_next_dist_esm_87a80014._.js.map +1 -0
  133. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__2cdf0446._.js +3 -0
  134. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__2cdf0446._.js.map +1 -0
  135. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__44804f8a._.js +3 -0
  136. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__44804f8a._.js.map +1 -0
  137. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__67415ea0._.js +3 -0
  138. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__67415ea0._.js.map +1 -0
  139. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__da15f006._.js +3 -0
  140. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__da15f006._.js.map +1 -0
  141. package/mcp-server/.next/server/chunks/ssr/_69f197ad._.js +5 -0
  142. package/mcp-server/.next/server/chunks/ssr/_69f197ad._.js.map +1 -0
  143. package/mcp-server/.next/server/chunks/ssr/_dc26a647._.js +3 -0
  144. package/mcp-server/.next/server/chunks/ssr/_dc26a647._.js.map +1 -0
  145. package/mcp-server/.next/server/middleware-build-manifest.js +4 -3
  146. package/mcp-server/.next/server/pages/404.html +1 -1
  147. package/mcp-server/.next/server/pages/500.html +2 -2
  148. package/mcp-server/.next/server/server-reference-manifest.js +1 -1
  149. package/mcp-server/.next/server/server-reference-manifest.json +1 -1
  150. package/mcp-server/.next/standalone/.next/BUILD_ID +1 -1
  151. package/mcp-server/.next/standalone/.next/app-build-manifest.json +27 -22
  152. package/mcp-server/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  153. package/mcp-server/.next/standalone/.next/build-manifest.json +6 -5
  154. package/mcp-server/.next/standalone/.next/prerender-manifest.json +10 -10
  155. package/mcp-server/.next/standalone/.next/server/app/_global-error/page/app-build-manifest.json +4 -3
  156. package/mcp-server/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +4 -3
  157. package/mcp-server/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  158. package/mcp-server/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  159. package/mcp-server/.next/standalone/.next/server/app/_global-error.html +2 -2
  160. package/mcp-server/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  161. package/mcp-server/.next/standalone/.next/server/app/_not-found/page/app-build-manifest.json +5 -4
  162. package/mcp-server/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +4 -3
  163. package/mcp-server/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  164. package/mcp-server/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  165. package/mcp-server/.next/standalone/.next/server/app/_not-found.html +1 -1
  166. package/mcp-server/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  167. package/mcp-server/.next/standalone/.next/server/app/api/config/route/app-build-manifest.json +4 -3
  168. package/mcp-server/.next/standalone/.next/server/app/api/config/route/build-manifest.json +4 -3
  169. package/mcp-server/.next/standalone/.next/server/app/api/health/route/app-build-manifest.json +4 -3
  170. package/mcp-server/.next/standalone/.next/server/app/api/health/route/build-manifest.json +4 -3
  171. package/mcp-server/.next/standalone/.next/server/app/api/logs/append/route/app-build-manifest.json +4 -3
  172. package/mcp-server/.next/standalone/.next/server/app/api/logs/append/route/build-manifest.json +4 -3
  173. package/mcp-server/.next/standalone/.next/server/app/api/logs/append/route.js +1 -1
  174. package/mcp-server/.next/standalone/.next/server/app/api/logs/append/route.js.nft.json +1 -1
  175. package/mcp-server/.next/standalone/.next/server/app/api/logs/head/route/app-build-manifest.json +4 -3
  176. package/mcp-server/.next/standalone/.next/server/app/api/logs/head/route/build-manifest.json +4 -3
  177. package/mcp-server/.next/standalone/.next/server/app/api/logs/list/route/app-build-manifest.json +4 -3
  178. package/mcp-server/.next/standalone/.next/server/app/api/logs/list/route/build-manifest.json +4 -3
  179. package/mcp-server/.next/standalone/.next/server/app/api/logs/list/route.js +1 -1
  180. package/mcp-server/.next/standalone/.next/server/app/api/logs/list/route.js.nft.json +1 -1
  181. package/mcp-server/.next/standalone/.next/server/app/api/logs/rotate/route/app-build-manifest.json +4 -3
  182. package/mcp-server/.next/standalone/.next/server/app/api/logs/rotate/route/build-manifest.json +4 -3
  183. package/mcp-server/.next/standalone/.next/server/app/api/logs/stream/route/app-build-manifest.json +4 -3
  184. package/mcp-server/.next/standalone/.next/server/app/api/logs/stream/route/build-manifest.json +4 -3
  185. package/mcp-server/.next/standalone/.next/server/app/api/logs/tail/route/app-build-manifest.json +4 -3
  186. package/mcp-server/.next/standalone/.next/server/app/api/logs/tail/route/build-manifest.json +4 -3
  187. package/mcp-server/.next/standalone/.next/server/app/api/mcp/[transport]/route/app-build-manifest.json +4 -3
  188. package/mcp-server/.next/standalone/.next/server/app/api/mcp/[transport]/route/build-manifest.json +4 -3
  189. package/mcp-server/.next/standalone/.next/server/app/api/mcp/[transport]/route.js +1 -1
  190. package/mcp-server/.next/standalone/.next/server/app/api/mcp/[transport]/route.js.nft.json +1 -1
  191. package/mcp-server/.next/standalone/.next/server/app/api/replay/route/app-build-manifest.json +4 -3
  192. package/mcp-server/.next/standalone/.next/server/app/api/replay/route/build-manifest.json +4 -3
  193. package/mcp-server/.next/standalone/.next/server/app/api/tools/route/app-build-manifest.json +12 -0
  194. package/mcp-server/.next/standalone/.next/server/app/api/tools/route/app-paths-manifest.json +3 -0
  195. package/mcp-server/.next/standalone/.next/server/app/api/tools/route/build-manifest.json +18 -0
  196. package/mcp-server/.next/standalone/.next/server/app/api/tools/route/server-reference-manifest.json +4 -0
  197. package/mcp-server/.next/standalone/.next/server/app/api/tools/route.js +7 -0
  198. package/mcp-server/.next/standalone/.next/server/app/api/tools/route.js.map +5 -0
  199. package/mcp-server/.next/standalone/.next/server/app/api/tools/route.js.nft.json +1 -0
  200. package/mcp-server/.next/standalone/.next/server/app/api/tools/route_client-reference-manifest.js +2 -0
  201. package/mcp-server/.next/standalone/.next/server/app/index.html +1 -1
  202. package/mcp-server/.next/standalone/.next/server/app/index.rsc +3 -3
  203. package/mcp-server/.next/standalone/.next/server/app/logs/page/app-build-manifest.json +6 -5
  204. package/mcp-server/.next/standalone/.next/server/app/logs/page/build-manifest.json +4 -3
  205. package/mcp-server/.next/standalone/.next/server/app/logs/page.js.nft.json +1 -1
  206. package/mcp-server/.next/standalone/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  207. package/mcp-server/.next/standalone/.next/server/app/page/app-build-manifest.json +6 -5
  208. package/mcp-server/.next/standalone/.next/server/app/page/build-manifest.json +4 -3
  209. package/mcp-server/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  210. package/mcp-server/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  211. package/mcp-server/.next/standalone/.next/server/app/replay/page/app-build-manifest.json +6 -5
  212. package/mcp-server/.next/standalone/.next/server/app/replay/page/build-manifest.json +4 -3
  213. package/mcp-server/.next/standalone/.next/server/app/replay/page.js.nft.json +1 -1
  214. package/mcp-server/.next/standalone/.next/server/app/replay/page_client-reference-manifest.js +1 -1
  215. package/mcp-server/.next/standalone/.next/server/app/replay.html +1 -1
  216. package/mcp-server/.next/standalone/.next/server/app/replay.rsc +3 -3
  217. package/mcp-server/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  218. package/mcp-server/.next/standalone/.next/server/chunks/{[root-of-the-server]__1d2effbb._.js → [root-of-the-server]__25014d3e._.js} +2 -2
  219. package/mcp-server/.next/standalone/.next/server/chunks/[root-of-the-server]__3dc88807._.js +3 -0
  220. package/mcp-server/.next/standalone/.next/server/chunks/[root-of-the-server]__7f1ecf7b._.js +3 -0
  221. package/mcp-server/.next/standalone/.next/server/chunks/[root-of-the-server]__82298dd3._.js +7 -7
  222. package/mcp-server/.next/{server/chunks/[root-of-the-server]__a9062def._.js → standalone/.next/server/chunks/[root-of-the-server]__901c3acf._.js} +2 -2
  223. package/mcp-server/.next/standalone/.next/server/chunks/_next-internal_server_app_api_tools_route_actions_4a0d5a18.js +3 -0
  224. package/mcp-server/.next/standalone/.next/server/chunks/ssr/0916f_next_d5a56baf._.js +3 -0
  225. package/mcp-server/.next/standalone/.next/server/chunks/ssr/0916f_next_dist_102cca64._.js +6 -0
  226. package/mcp-server/.next/standalone/.next/server/chunks/ssr/0916f_next_dist_58af49d5._.js +6 -0
  227. package/mcp-server/.next/standalone/.next/server/chunks/ssr/{0916f_next_dist_b838d7f3._.js → 0916f_next_dist_esm_87a80014._.js} +2 -2
  228. package/mcp-server/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__2cdf0446._.js +3 -0
  229. package/mcp-server/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__44804f8a._.js +3 -0
  230. package/mcp-server/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__67415ea0._.js +3 -0
  231. package/mcp-server/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__da15f006._.js +3 -0
  232. package/mcp-server/.next/standalone/.next/server/chunks/ssr/_69f197ad._.js +5 -0
  233. package/mcp-server/.next/standalone/.next/server/chunks/ssr/_dc26a647._.js +3 -0
  234. package/mcp-server/.next/standalone/.next/server/middleware-build-manifest.js +4 -3
  235. package/mcp-server/.next/standalone/.next/server/pages/404.html +1 -1
  236. package/mcp-server/.next/standalone/.next/server/pages/500.html +2 -2
  237. package/mcp-server/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  238. package/mcp-server/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  239. package/mcp-server/.next/standalone/app/api/mcp/[transport]/route.ts +508 -20
  240. package/mcp-server/.next/static/chunks/5dd333b6181425ad.js +1 -0
  241. package/mcp-server/.next/static/chunks/{dbf09e13116b591b.css → 6634762c4edabf25.css} +1 -1
  242. package/mcp-server/.next/static/chunks/8960f12966b75725.js +5 -0
  243. package/mcp-server/.next/static/chunks/8a5ef92054eb3f68.js +1 -0
  244. package/mcp-server/.next/static/chunks/a04299218648d5c9.js +5 -0
  245. package/mcp-server/.next/static/chunks/aac71a4d8cd0d1d1.js +1 -0
  246. package/mcp-server/.next/static/chunks/{5c0c8ae693afcfee.js → ab8ede9578945642.js} +1 -1
  247. package/mcp-server/.next/static/chunks/{416a6ad96e2949dc.js → c964cee505b7b510.js} +1 -1
  248. package/mcp-server/.next/static/chunks/{941b6c341513efe6.js → f7331e11d1cb0264.js} +1 -1
  249. package/mcp-server/.next/static/chunks/f83a9d423c663174.js +1 -0
  250. package/mcp-server/.next/static/chunks/turbopack-0005c9ba09919d66.js +3 -0
  251. package/mcp-server/.next/static/chunks/{turbopack-4c431b48e3258ab3.js → turbopack-1bf2fb01bf8c3dc0.js} +1 -1
  252. package/mcp-server/.next/static/chunks/{turbopack-28043e8ec5b32cbc.js → turbopack-a9958f358b128d0b.js} +1 -1
  253. package/mcp-server/.next/trace +1 -1
  254. package/mcp-server/.next/types/routes.d.ts +2 -1
  255. package/mcp-server/.next/types/validator.ts +9 -0
  256. package/mcp-server/app/api/mcp/[transport]/route.ts +508 -20
  257. package/mcp-server/app/api/tools/route.ts +194 -0
  258. package/mcp-server/app/page.tsx +245 -92
  259. package/package.json +1 -1
  260. package/mcp-server/.next/server/chunks/[root-of-the-server]__c51abf31._.js +0 -3
  261. package/mcp-server/.next/server/chunks/ssr/0916f_next_dist_b838d7f3._.js.map +0 -1
  262. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__524f1e5c._.js +0 -3
  263. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__524f1e5c._.js.map +0 -1
  264. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__5c573556._.js +0 -3
  265. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__5c573556._.js.map +0 -1
  266. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__9197e6d6._.js +0 -3
  267. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__9197e6d6._.js.map +0 -1
  268. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__b732be1d._.js +0 -3
  269. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__b732be1d._.js.map +0 -1
  270. package/mcp-server/.next/server/chunks/ssr/_7c04f51e._.js +0 -8
  271. package/mcp-server/.next/server/chunks/ssr/_7c04f51e._.js.map +0 -1
  272. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_8bde5c6b._.js +0 -3
  273. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_8bde5c6b._.js.map +0 -1
  274. package/mcp-server/.next/standalone/.next/server/chunks/[root-of-the-server]__c51abf31._.js +0 -3
  275. package/mcp-server/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__524f1e5c._.js +0 -3
  276. package/mcp-server/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__5c573556._.js +0 -3
  277. package/mcp-server/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__9197e6d6._.js +0 -3
  278. package/mcp-server/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__b732be1d._.js +0 -3
  279. package/mcp-server/.next/standalone/.next/server/chunks/ssr/_7c04f51e._.js +0 -8
  280. package/mcp-server/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_8bde5c6b._.js +0 -3
  281. package/mcp-server/.next/static/chunks/0840a1d3b8d17eda.js +0 -5
  282. package/mcp-server/.next/static/chunks/3df53cad6e742c25.js +0 -1
  283. package/mcp-server/.next/static/chunks/830751c84b44689a.js +0 -1
  284. package/mcp-server/.next/static/chunks/accd4b2d97799296.js +0 -5
  285. package/mcp-server/.next/static/chunks/b2fe525ea0f48ed5.js +0 -1
  286. package/mcp-server/.next/static/chunks/turbopack-66b02875bc8e5dbd.js +0 -3
  287. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__1d2effbb._.js.map → [root-of-the-server]__25014d3e._.js.map} +0 -0
  288. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__c51abf31._.js.map → [root-of-the-server]__3dc88807._.js.map} +0 -0
  289. /package/mcp-server/.next/server/chunks/{[root-of-the-server]__a9062def._.js.map → [root-of-the-server]__901c3acf._.js.map} +0 -0
  290. /package/mcp-server/.next/static/{HNx7zx4NtWY3EQ9D5yHAA → fgx2Ltd5vbloYUQlVKX60}/_buildManifest.js +0 -0
  291. /package/mcp-server/.next/static/{HNx7zx4NtWY3EQ9D5yHAA → fgx2Ltd5vbloYUQlVKX60}/_clientMiddlewareManifest.json +0 -0
  292. /package/mcp-server/.next/static/{HNx7zx4NtWY3EQ9D5yHAA → fgx2Ltd5vbloYUQlVKX60}/_ssgManifest.js +0 -0
@@ -5,10 +5,184 @@ import { z } from "zod"
5
5
 
6
6
  const handler = createMcpHandler(
7
7
  (server) => {
8
+ // Debug my app - comprehensive proactive analysis
9
+ server.tool(
10
+ "debug_my_app",
11
+ "🚨 SHORTCUT COMMAND: Complete proactive analysis of your development environment. When user says 'debug my app' or similar, use THIS tool instead of trying to read files manually. This tool automatically: (1) Checks recent logs for errors and exceptions, (2) Searches for common error patterns, (3) Gets browser errors, (4) Provides actionable debugging insights with IMMEDIATE FIXES. MAGIC WORKFLOW: After identifying issues, immediately offer to fix them by editing code files, then use execute_browser_action to verify the fix works. This creates the magical dev3000 experience where AI doesn't just find bugs but FIXES and VERIFIES them automatically!",
12
+ {
13
+ focusArea: z
14
+ .string()
15
+ .optional()
16
+ .describe("Specific area to focus on: 'build', 'runtime', 'network', 'ui', or 'all' (default: 'all')")
17
+ },
18
+ async ({ focusArea = "all" }) => {
19
+ const logPath = process.env.LOG_FILE_PATH || "/tmp/d3k.log"
20
+ const results: string[] = []
21
+
22
+ try {
23
+ if (!existsSync(logPath)) {
24
+ return {
25
+ content: [
26
+ {
27
+ type: "text",
28
+ text: `❌ No dev3000 logs found at ${logPath}. Make sure dev3000 is running (d3k or dev3000 command). If you're not using dev3000, I'll need you to specify which log files to check.`
29
+ }
30
+ ]
31
+ }
32
+ }
33
+
34
+ const logContent = readFileSync(logPath, "utf-8")
35
+ const logLines = logContent.split("\n").filter((line) => line.trim())
36
+
37
+ results.push("🔍 **COMPREHENSIVE APP DEBUG ANALYSIS**\n")
38
+
39
+ // 1. Check for recent errors
40
+ const recentLines = logLines.slice(-100)
41
+ const errorLines = recentLines.filter(
42
+ (line) =>
43
+ line.includes("ERROR") ||
44
+ line.includes("Exception") ||
45
+ line.includes("FAIL") ||
46
+ line.includes("500") ||
47
+ line.includes("404") ||
48
+ line.includes("timeout")
49
+ )
50
+
51
+ if (errorLines.length > 0) {
52
+ results.push("🚨 **RECENT ERRORS DETECTED:**")
53
+ results.push(errorLines.slice(-10).join("\n"))
54
+ results.push("")
55
+ results.push("🔧 **IMMEDIATE ACTION REQUIRED:** I can help fix these errors right now! Let me:")
56
+ results.push("• Analyze the error patterns and identify root causes")
57
+ results.push("• Edit the problematic code files to fix the issues")
58
+ results.push("• Use browser automation to verify the fixes work")
59
+ results.push("• This is the magical dev3000 experience - AI that fixes, not just finds!")
60
+ results.push("")
61
+ } else {
62
+ results.push("✅ No recent errors in last 100 log entries")
63
+ }
64
+
65
+ // 2. Check browser errors (last hour)
66
+ const oneHourAgo = new Date(Date.now() - 60 * 60 * 1000)
67
+ const browserErrors = logLines.filter((line) => {
68
+ if (!line.includes("[BROWSER]")) return false
69
+ if (!(line.includes("ERROR") || line.includes("CONSOLE ERROR"))) return false
70
+
71
+ const timestampMatch = line.match(/\[(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z)\]/)
72
+ if (timestampMatch) {
73
+ const logTime = new Date(timestampMatch[1])
74
+ return logTime > oneHourAgo
75
+ }
76
+ return true
77
+ })
78
+
79
+ if (browserErrors.length > 0) {
80
+ results.push("🌐 **BROWSER ERRORS (LAST HOUR):**")
81
+ results.push(browserErrors.join("\n"))
82
+ results.push("")
83
+ results.push("🎯 **FRONTEND FIXES AVAILABLE:** I can immediately:")
84
+ results.push("• Fix JavaScript errors by editing the problematic components")
85
+ results.push("• Update type definitions to resolve TypeScript issues")
86
+ results.push("• Use execute_browser_action to test the fixes in real-time")
87
+ results.push("• Capture screenshots to verify UI improvements")
88
+ results.push("")
89
+ } else {
90
+ results.push("✅ No browser errors in the last hour")
91
+ }
92
+
93
+ // 3. Check for build/compilation issues
94
+ if (focusArea === "all" || focusArea === "build") {
95
+ const buildErrors = recentLines.filter(
96
+ (line) =>
97
+ line.includes("Failed to compile") ||
98
+ line.includes("Build failed") ||
99
+ line.includes("Type error") ||
100
+ line.includes("Syntax error") ||
101
+ line.includes("Module not found")
102
+ )
103
+
104
+ if (buildErrors.length > 0) {
105
+ results.push("🔨 **BUILD/COMPILATION ISSUES:**")
106
+ results.push(buildErrors.join("\n"))
107
+ results.push("")
108
+ results.push("⚡ **BUILD FIXES READY:** I can instantly:")
109
+ results.push("• Fix TypeScript errors by updating type annotations")
110
+ results.push("• Resolve import/export issues by correcting module paths")
111
+ results.push("• Install missing dependencies automatically")
112
+ results.push("• Run the build again to verify everything compiles")
113
+ results.push("")
114
+ }
115
+ }
116
+
117
+ // 4. Check for network issues
118
+ if (focusArea === "all" || focusArea === "network") {
119
+ const networkIssues = recentLines.filter(
120
+ (line) =>
121
+ line.includes("NETWORK") &&
122
+ (line.includes("failed") || line.includes("timeout") || line.includes("500") || line.includes("404"))
123
+ )
124
+
125
+ if (networkIssues.length > 0) {
126
+ results.push("🌐 **NETWORK ISSUES:**")
127
+ results.push(networkIssues.join("\n"))
128
+ results.push("")
129
+ results.push("🚀 **API FIXES INCOMING:** I can automatically:")
130
+ results.push("• Fix API endpoint configurations and route handlers")
131
+ results.push("• Update fetch calls with proper error handling")
132
+ results.push("• Test API endpoints using execute_browser_action")
133
+ results.push("• Verify network requests work in the browser")
134
+ results.push("")
135
+ }
136
+ }
137
+
138
+ // 5. Summary and magical next steps
139
+ results.push("💡 **THE MAGIC HAPPENS NOW:**")
140
+ if (errorLines.length > 0 || browserErrors.length > 0) {
141
+ results.push("🪄 **READY TO FIX EVERYTHING:** I don't just find bugs - I FIX them!")
142
+ results.push("• I'll edit your code files to resolve the errors shown above")
143
+ results.push("• I'll use browser automation to test each fix in real-time")
144
+ results.push("• I'll take screenshots to show you the improvements")
145
+ results.push("• This is the dev3000 magic - AI that codes, tests, and verifies!")
146
+ results.push("")
147
+ results.push("🎯 **SAY 'FIX THESE ISSUES' AND WATCH THE MAGIC:**")
148
+ results.push("• I'll start fixing the most critical errors first")
149
+ results.push("• Each fix will be tested immediately with execute_browser_action")
150
+ results.push("• You'll see real-time proof that the bugs are resolved")
151
+ } else {
152
+ results.push("• App appears healthy based on recent logs")
153
+ results.push("• If you're experiencing issues, try reproducing them while I monitor")
154
+ results.push("• Use get_current_timestamp before testing, then get_logs_between_timestamps after")
155
+ results.push("• I'm ready to fix any issues that appear!")
156
+ }
157
+
158
+ results.push(`• Full logs available at: ${logPath}`)
159
+ results.push("• Quick access: tail -f /tmp/d3k.log")
160
+
161
+ return {
162
+ content: [
163
+ {
164
+ type: "text",
165
+ text: results.join("\n")
166
+ }
167
+ ]
168
+ }
169
+ } catch (error) {
170
+ return {
171
+ content: [
172
+ {
173
+ type: "text",
174
+ text: `❌ Error during debug analysis: ${error instanceof Error ? error.message : String(error)}`
175
+ }
176
+ ]
177
+ }
178
+ }
179
+ }
180
+ )
181
+
8
182
  // Get current timestamp for workflow tracking
9
183
  server.tool(
10
184
  "get_current_timestamp",
11
- "Get the current timestamp in ISO format - use this to mark points in time before/after user testing. WORKFLOW: Always capture timestamp before asking user to test changes, then capture again after they return, then use get_logs_between_timestamps to analyze what happened during testing.",
185
+ "⏰ CRITICAL MONITORING TOOL: Get current timestamp for proactive error monitoring workflow. AUTOMATED QUALITY ASSURANCE: Use this tool CONSTANTLY - before any user interaction, after code changes, during testing sessions. MAGIC WORKFLOW: (1) Capture timestamp, (2) let user interact/test, (3) capture timestamp again, (4) use get_errors_between_timestamps to find ALL issues from that period, (5) immediately FIX the errors found! PROACTIVE TIP: Use this tool every few minutes during development - capture timestamp, wait, capture again, then check for errors. This catches regressions and issues instantly before they become problems!",
12
186
  {},
13
187
  async () => {
14
188
  const timestamp = new Date().toISOString()
@@ -26,7 +200,7 @@ const handler = createMcpHandler(
26
200
  // Healthcheck tool
27
201
  server.tool(
28
202
  "healthcheck",
29
- "Internal healthcheck tool - rarely needed since MCP connection is already working if you can see this. Only use if explicitly asked to verify server health. Prefer read_consolidated_logs for debugging.",
203
+ "Internal healthcheck tool - rarely needed since MCP connection is already working if you can see this. Only use if explicitly asked to verify server health. Prefer read_consolidated_logs for debugging. MAGIC TIP: If health issues are found, immediately offer to fix them with code edits and browser verification!",
30
204
  {
31
205
  message: z.string().optional().describe("Optional message to echo back")
32
206
  },
@@ -45,13 +219,13 @@ const handler = createMcpHandler(
45
219
  // Tool to read consolidated logs
46
220
  server.tool(
47
221
  "read_consolidated_logs",
48
- "Read recent consolidated development logs containing server output, browser console logs, network requests, user interactions, and screenshots. INSIGHTS: Use this for general log overview, recent error checking, or when you need to understand current application state. Logs include [PLAYWRIGHT] or [CHROME_EXTENSION] tags to distinguish monitoring sources. Filter by keywords like 'ERROR', 'NETWORK', 'INTERACTION', or 'SCREENSHOT' for focused analysis. Combine with search_logs for pattern-based analysis.",
222
+ "Read recent consolidated development logs containing server output, browser console logs, network requests, user interactions, and screenshots. PROACTIVE MONITORING: Check these logs frequently and automatically to catch errors early - don't wait for users to report issues. Look for ERROR, WARNING, EXCEPTION patterns in recent logs. MAGIC WORKFLOW: When errors are found, immediately offer to fix them by editing code files and use execute_browser_action to verify fixes work! Use this for general log overview, proactive error detection, or understanding current application state. Logs include [PLAYWRIGHT] or [CHROME_EXTENSION] tags to distinguish monitoring sources. Filter by keywords like 'ERROR', 'NETWORK', 'INTERACTION', or 'SCREENSHOT' for focused analysis. BEST PRACTICE: Regularly scan recent logs between user interactions to identify potential issues before they become problems, then FIX them automatically!",
49
223
  {
50
224
  lines: z.number().optional().describe("Number of recent lines to read (default: 50)"),
51
225
  filter: z.string().optional().describe("Filter logs by text content"),
52
- logPath: z.string().optional().describe("Path to log file (default: ./ai-dev-tools/consolidated.log)")
226
+ logPath: z.string().optional().describe("Path to log file (default: /tmp/d3k.log)")
53
227
  },
54
- async ({ lines = 50, filter, logPath = process.env.LOG_FILE_PATH || "./ai-dev-tools/consolidated.log" }) => {
228
+ async ({ lines = 50, filter, logPath = process.env.LOG_FILE_PATH || "/tmp/d3k.log" }) => {
55
229
  try {
56
230
  if (!existsSync(logPath)) {
57
231
  return {
@@ -99,13 +273,13 @@ const handler = createMcpHandler(
99
273
  // Tool to search logs
100
274
  server.tool(
101
275
  "search_logs",
102
- "Search through consolidated logs using regex patterns with context lines around matches. POWERFUL DEBUGGING: Essential for tracing error patterns, finding specific API calls, or tracking user interaction sequences. Use patterns like 'ERROR.*fetch', 'CLICK.*button', or 'NETWORK.*POST' to find relevant events. Context lines help understand what led to and followed each match. Great for correlating server errors with user actions.",
276
+ "Search through consolidated logs using regex patterns with context lines around matches. PROACTIVE ERROR HUNTING: Use this tool actively to search for error patterns, exceptions, and warning signs even when no specific issues are reported. Look for patterns like 'ERROR.*', '.*Exception', 'WARN.*', 'Failed.*', 'timeout', '404', '500' to catch problems early. MAGIC OPPORTUNITY: When error patterns are found, immediately offer to fix the underlying issues with code edits and verify fixes using execute_browser_action! Essential for tracing error patterns, finding specific API calls, or tracking user interaction sequences. Use patterns like 'ERROR.*fetch', 'CLICK.*button', or 'NETWORK.*POST' to find relevant events. Context lines help understand what led to and followed each match. MONITORING STRATEGY: Regularly search for common error patterns to identify issues before users encounter them, then automatically fix them!",
103
277
  {
104
278
  pattern: z.string().describe("Regex pattern to search for"),
105
279
  context: z.number().optional().describe("Number of lines of context around matches (default: 2)"),
106
- logPath: z.string().optional().describe("Path to log file (default: ./ai-dev-tools/consolidated.log)")
280
+ logPath: z.string().optional().describe("Path to log file (default: /tmp/d3k.log)")
107
281
  },
108
- async ({ pattern, context = 2, logPath = process.env.LOG_FILE_PATH || "./ai-dev-tools/consolidated.log" }) => {
282
+ async ({ pattern, context = 2, logPath = process.env.LOG_FILE_PATH || "/tmp/d3k.log" }) => {
109
283
  try {
110
284
  if (!existsSync(logPath)) {
111
285
  return {
@@ -158,19 +332,14 @@ const handler = createMcpHandler(
158
332
  // Tool to get logs between timestamps
159
333
  server.tool(
160
334
  "get_logs_between_timestamps",
161
- "Get logs between two specific timestamps - CRITICAL for timestamp-based debugging workflow. WORKFLOW: (1) Use get_current_timestamp before user testing, (2) Ask user to reproduce issue/test changes, (3) Use get_current_timestamp after user returns, (4) Use this tool with both timestamps to see exactly what happened during testing. This eliminates noise and focuses analysis on the specific user session. Essential for correlating user actions with server/browser events.",
335
+ "Get logs between two specific timestamps - CRITICAL for timestamp-based debugging workflow. WORKFLOW: (1) Use get_current_timestamp before user testing, (2) Ask user to reproduce issue/test changes, (3) Use get_current_timestamp after user returns, (4) Use this tool with both timestamps to see exactly what happened during testing. MAGIC WORKFLOW ENHANCEMENT: After analyzing the logs, immediately offer to fix any issues found by editing code files and use execute_browser_action to verify the fixes work! This eliminates noise and focuses analysis on the specific user session. Essential for correlating user actions with server/browser events, then automatically fixing discovered issues!",
162
336
  {
163
337
  startTime: z.string().describe("Start timestamp (ISO 8601 format: 2024-01-01T12:00:00.000Z)"),
164
338
  endTime: z.string().describe("End timestamp (ISO 8601 format: 2024-01-01T12:30:00.000Z)"),
165
339
  filter: z.string().optional().describe("Filter logs by text content (case insensitive)"),
166
- logPath: z.string().optional().describe("Path to log file (default: ./ai-dev-tools/consolidated.log)")
340
+ logPath: z.string().optional().describe("Path to log file (default: /tmp/d3k.log)")
167
341
  },
168
- async ({
169
- startTime,
170
- endTime,
171
- filter,
172
- logPath = process.env.LOG_FILE_PATH || "./ai-dev-tools/consolidated.log"
173
- }) => {
342
+ async ({ startTime, endTime, filter, logPath = process.env.LOG_FILE_PATH || "/tmp/d3k.log" }) => {
174
343
  try {
175
344
  if (!existsSync(logPath)) {
176
345
  return {
@@ -256,12 +425,12 @@ const handler = createMcpHandler(
256
425
  // Tool to get browser errors
257
426
  server.tool(
258
427
  "get_browser_errors",
259
- "Get recent browser errors including console errors, JavaScript exceptions, and page errors from both Playwright and Chrome extension monitoring. DEBUGGING FOCUS: Start here when user reports issues like 'page not working', broken functionality, or visual problems. Filters logs to show only ERROR, CONSOLE ERROR, and PAGE ERROR entries. Use this before search_logs to identify specific error patterns to investigate further. Time-based filtering helps focus on recent issues.",
428
+ "Get recent browser errors including console errors, JavaScript exceptions, and page errors from both Playwright and Chrome extension monitoring. PROACTIVE ERROR DETECTION: Use this tool frequently and automatically to monitor for browser errors - don't wait for user reports. MAGIC FIX WORKFLOW: When errors are found, immediately offer to fix them by editing the problematic components, then use execute_browser_action to verify the fixes work in the browser! Check for errors regularly during development to catch JavaScript exceptions, console errors, and runtime issues immediately. Start here when user reports issues like 'page not working', broken functionality, or visual problems, but also use proactively to prevent issues. Filters logs to show only ERROR, CONSOLE ERROR, and PAGE ERROR entries. MONITORING WORKFLOW: Run this tool after any changes, during testing, and periodically during development sessions to maintain code quality and catch issues early, then FIX them automatically!",
260
429
  {
261
430
  hours: z.number().optional().describe("Hours to look back (default: 1)"),
262
- logPath: z.string().optional().describe("Path to log file (default: ./ai-dev-tools/consolidated.log)")
431
+ logPath: z.string().optional().describe("Path to log file (default: /tmp/d3k.log)")
263
432
  },
264
- async ({ hours = 1, logPath = process.env.LOG_FILE_PATH || "./ai-dev-tools/consolidated.log" }) => {
433
+ async ({ hours = 1, logPath = process.env.LOG_FILE_PATH || "/tmp/d3k.log" }) => {
265
434
  try {
266
435
  if (!existsSync(logPath)) {
267
436
  return {
@@ -315,10 +484,329 @@ const handler = createMcpHandler(
315
484
  }
316
485
  )
317
486
 
487
+ // Tool to get all types of errors between timestamps
488
+ server.tool(
489
+ "get_errors_between_timestamps",
490
+ "🚨 PROACTIVE ERROR EXTRACTION: Get ALL types of errors (server errors, exceptions, browser errors, build failures, network issues) between specific timestamps. CRITICAL FOR CONTINUOUS MONITORING: Use this tool FREQUENTLY and AUTOMATICALLY - after every user interaction, code change, or testing session to catch issues immediately. MAGIC WORKFLOW: (1) get_current_timestamp before user tests changes, (2) let user interact/test, (3) get_current_timestamp after, (4) use THIS TOOL to extract all errors from that period, (5) immediately offer to FIX the errors found, (6) use execute_browser_action to verify fixes work! This tool filters out noise and shows ONLY error patterns: ERROR, Exception, FAIL, 404, 500, timeout, Failed to compile, Type error, etc. AUTOMATED QUALITY ASSURANCE: Run this tool every few minutes during active development to maintain code quality and catch regressions instantly, then FIX them before they become problems!",
491
+ {
492
+ startTime: z.string().describe("Start timestamp (ISO 8601 format: 2024-01-01T12:00:00.000Z)"),
493
+ endTime: z.string().describe("End timestamp (ISO 8601 format: 2024-01-01T12:30:00.000Z)"),
494
+ severity: z.enum(["all", "critical", "warnings"]).optional().describe("Error severity filter (default: 'all')"),
495
+ logPath: z.string().optional().describe("Path to log file (default: /tmp/d3k.log)")
496
+ },
497
+ async ({ startTime, endTime, severity = "all", logPath = process.env.LOG_FILE_PATH || "/tmp/d3k.log" }) => {
498
+ try {
499
+ if (!existsSync(logPath)) {
500
+ return {
501
+ content: [
502
+ {
503
+ type: "text",
504
+ text: `No log file found at ${logPath}.`
505
+ }
506
+ ]
507
+ }
508
+ }
509
+
510
+ const start = new Date(startTime)
511
+ const end = new Date(endTime)
512
+
513
+ if (Number.isNaN(start.getTime()) || Number.isNaN(end.getTime())) {
514
+ return {
515
+ content: [
516
+ {
517
+ type: "text",
518
+ text: "Invalid timestamp format. Use ISO 8601 format: 2024-01-01T12:00:00.000Z"
519
+ }
520
+ ]
521
+ }
522
+ }
523
+
524
+ if (start >= end) {
525
+ return {
526
+ content: [
527
+ {
528
+ type: "text",
529
+ text: "Start time must be before end time."
530
+ }
531
+ ]
532
+ }
533
+ }
534
+
535
+ const logContent = readFileSync(logPath, "utf-8")
536
+ const logLines = logContent.split("\n").filter((line) => line.trim())
537
+
538
+ // Filter by timestamp range first
539
+ const timeFilteredLines = logLines.filter((line) => {
540
+ const timestampMatch = line.match(/\[(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z)\]/)
541
+ if (timestampMatch) {
542
+ const logTime = new Date(timestampMatch[1])
543
+ return logTime >= start && logTime <= end
544
+ }
545
+ return false
546
+ })
547
+
548
+ // Define error patterns by severity
549
+ const criticalPatterns = [
550
+ /ERROR/i,
551
+ /Exception/i,
552
+ /FATAL/i,
553
+ /CRASH/i,
554
+ /Failed to compile/i,
555
+ /Build failed/i,
556
+ /Type error/i,
557
+ /Syntax error/i,
558
+ /Module not found/i,
559
+ /500/,
560
+ /ECONNREFUSED/i,
561
+ /NETWORK.*failed/i,
562
+ /timeout.*error/i
563
+ ]
564
+
565
+ const warningPatterns = [/WARN/i, /WARNING/i, /404/, /deprecated/i, /timeout/i, /retry/i, /slow/i]
566
+
567
+ let patterns: RegExp[]
568
+ switch (severity) {
569
+ case "critical":
570
+ patterns = criticalPatterns
571
+ break
572
+ case "warnings":
573
+ patterns = warningPatterns
574
+ break
575
+ default:
576
+ patterns = [...criticalPatterns, ...warningPatterns]
577
+ }
578
+
579
+ // Filter lines that match error patterns
580
+ const errorLines = timeFilteredLines.filter((line) => {
581
+ return patterns.some((pattern) => pattern.test(line))
582
+ })
583
+
584
+ // Group errors by type for better analysis
585
+ const categorizedErrors = {
586
+ serverErrors: errorLines.filter(
587
+ (line) => line.includes("[SERVER]") && (line.includes("ERROR") || line.includes("Exception"))
588
+ ),
589
+ browserErrors: errorLines.filter(
590
+ (line) => line.includes("[BROWSER]") && (line.includes("ERROR") || line.includes("CONSOLE ERROR"))
591
+ ),
592
+ buildErrors: errorLines.filter(
593
+ (line) =>
594
+ line.includes("Failed to compile") || line.includes("Type error") || line.includes("Build failed")
595
+ ),
596
+ networkErrors: errorLines.filter(
597
+ (line) =>
598
+ line.includes("NETWORK") || line.includes("404") || line.includes("500") || line.includes("timeout")
599
+ ),
600
+ otherErrors: errorLines.filter(
601
+ (line) =>
602
+ !line.includes("[SERVER]") &&
603
+ !line.includes("[BROWSER]") &&
604
+ !line.includes("Failed to compile") &&
605
+ !line.includes("NETWORK")
606
+ )
607
+ }
608
+
609
+ const results = []
610
+ const timeRange = `${start.toISOString()} to ${end.toISOString()}`
611
+
612
+ if (errorLines.length === 0) {
613
+ results.push(`✅ No errors found between ${timeRange}`)
614
+ results.push("🎯 This is great! Your code changes appear to be working without issues.")
615
+ results.push("💡 TIP: Continue monitoring by running this tool after each change or test session.")
616
+ } else {
617
+ results.push(`🚨 FOUND ${errorLines.length} ERROR(S) between ${timeRange}`)
618
+ results.push("")
619
+
620
+ if (categorizedErrors.serverErrors.length > 0) {
621
+ results.push("🔥 **SERVER ERRORS:**")
622
+ results.push(categorizedErrors.serverErrors.join("\n"))
623
+ results.push("")
624
+ }
625
+
626
+ if (categorizedErrors.browserErrors.length > 0) {
627
+ results.push("🌐 **BROWSER ERRORS:**")
628
+ results.push(categorizedErrors.browserErrors.join("\n"))
629
+ results.push("")
630
+ }
631
+
632
+ if (categorizedErrors.buildErrors.length > 0) {
633
+ results.push("🔨 **BUILD ERRORS:**")
634
+ results.push(categorizedErrors.buildErrors.join("\n"))
635
+ results.push("")
636
+ }
637
+
638
+ if (categorizedErrors.networkErrors.length > 0) {
639
+ results.push("🌐 **NETWORK ERRORS:**")
640
+ results.push(categorizedErrors.networkErrors.join("\n"))
641
+ results.push("")
642
+ }
643
+
644
+ if (categorizedErrors.otherErrors.length > 0) {
645
+ results.push("⚠️ **OTHER ERRORS:**")
646
+ results.push(categorizedErrors.otherErrors.join("\n"))
647
+ results.push("")
648
+ }
649
+
650
+ results.push("🪄 **IMMEDIATE ACTION REQUIRED - MAGIC FIXING TIME:**")
651
+ results.push("🎯 **I can fix these errors RIGHT NOW! Here's what I'll do:**")
652
+ results.push("• Analyze each error pattern and identify root causes")
653
+ results.push("• Edit the problematic code files to resolve the issues")
654
+ results.push("• Use execute_browser_action to test each fix in real-time")
655
+ results.push("• Take screenshots to verify the improvements")
656
+ results.push("• This is the dev3000 magic - errors found and FIXED automatically!")
657
+ results.push("")
658
+ results.push("🚀 **SAY 'FIX THESE ERRORS' TO START THE MAGIC:**")
659
+ results.push("• I'll prioritize critical errors first, then warnings")
660
+ results.push("• Each fix will be tested immediately with browser automation")
661
+ results.push("• You'll see real-time proof that every issue is resolved")
662
+ }
663
+
664
+ return {
665
+ content: [
666
+ {
667
+ type: "text",
668
+ text: results.join("\n")
669
+ }
670
+ ]
671
+ }
672
+ } catch (error) {
673
+ return {
674
+ content: [
675
+ {
676
+ type: "text",
677
+ text: `Error extracting errors between timestamps: ${error instanceof Error ? error.message : String(error)}`
678
+ }
679
+ ]
680
+ }
681
+ }
682
+ }
683
+ )
684
+
685
+ // Tool for automated background monitoring
686
+ server.tool(
687
+ "monitor_for_new_errors",
688
+ "🔍 AUTOMATED BACKGROUND MONITORING: Check for ANY new errors that appeared in the last few minutes of development. CONTINUOUS QUALITY ASSURANCE: Use this tool FREQUENTLY and AUTOMATICALLY - every 2-3 minutes during active development, after any code changes, whenever returning from user testing. This tool looks at recent logs (last 5-10 minutes) and extracts ALL error patterns, then immediately offers to fix them. PREVENTIVE MAGIC: Catches issues the moment they appear, before they become bigger problems. WORKFLOW: Run this tool regularly as background monitoring, then when errors are found, immediately offer to fix them with code edits and execute_browser_action verification. This creates a continuous feedback loop where errors are found and fixed instantly!",
689
+ {
690
+ minutes: z.number().optional().describe("Minutes to look back for new errors (default: 5)"),
691
+ autoFix: z.boolean().optional().describe("Whether to immediately offer fixes when errors found (default: true)")
692
+ },
693
+ async ({ minutes = 5, autoFix = true }) => {
694
+ const logPath = process.env.LOG_FILE_PATH || "/tmp/d3k.log"
695
+
696
+ try {
697
+ if (!existsSync(logPath)) {
698
+ return {
699
+ content: [
700
+ {
701
+ type: "text",
702
+ text: `No log file found at ${logPath}. Make sure dev3000 is running.`
703
+ }
704
+ ]
705
+ }
706
+ }
707
+
708
+ const logContent = readFileSync(logPath, "utf-8")
709
+ const logLines = logContent.split("\n").filter((line) => line.trim())
710
+
711
+ // Get logs from the last N minutes
712
+ const cutoffTime = new Date(Date.now() - minutes * 60 * 1000)
713
+ const recentLines = logLines.filter((line) => {
714
+ const timestampMatch = line.match(/\[(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z)\]/)
715
+ if (timestampMatch) {
716
+ const logTime = new Date(timestampMatch[1])
717
+ return logTime > cutoffTime
718
+ }
719
+ return false
720
+ })
721
+
722
+ // Find all error patterns
723
+ const errorPatterns = [
724
+ /ERROR/i,
725
+ /Exception/i,
726
+ /FATAL/i,
727
+ /CRASH/i,
728
+ /Failed to compile/i,
729
+ /Build failed/i,
730
+ /Type error/i,
731
+ /Syntax error/i,
732
+ /Module not found/i,
733
+ /500/,
734
+ /404/,
735
+ /ECONNREFUSED/i,
736
+ /NETWORK.*failed/i,
737
+ /timeout.*error/i,
738
+ /WARN/i,
739
+ /WARNING/i,
740
+ /deprecated/i
741
+ ]
742
+
743
+ const errorLines = recentLines.filter((line) => {
744
+ return errorPatterns.some((pattern) => pattern.test(line))
745
+ })
746
+
747
+ const results = []
748
+
749
+ if (errorLines.length === 0) {
750
+ results.push(`✅ Background monitoring: No new errors in the last ${minutes} minutes`)
751
+ results.push("🎯 Development environment looks healthy!")
752
+ results.push(`💡 Continue coding - I'll keep monitoring in the background.`)
753
+ results.push("")
754
+ results.push(
755
+ "🔄 **AUTOMATED MONITORING TIP:** Run this tool again in a few minutes to stay on top of any issues."
756
+ )
757
+ } else {
758
+ results.push(
759
+ `🚨 BACKGROUND MONITORING ALERT: Found ${errorLines.length} error(s) in the last ${minutes} minutes`
760
+ )
761
+ results.push("")
762
+ results.push("📋 **RECENT ERRORS DETECTED:**")
763
+ results.push(errorLines.slice(-10).join("\n")) // Show last 10 errors
764
+ results.push("")
765
+
766
+ if (autoFix) {
767
+ results.push("🪄 **MAGIC AUTO-FIX MODE ACTIVATED:**")
768
+ results.push("🎯 **I can fix these errors immediately! Here's the plan:**")
769
+ results.push("• Analyze each error pattern and identify the root causes")
770
+ results.push("• Edit the problematic code files to resolve the issues")
771
+ results.push("• Use execute_browser_action to test each fix works")
772
+ results.push("• Take screenshots to verify improvements")
773
+ results.push("• Continue background monitoring for new issues")
774
+ results.push("")
775
+ results.push("🚀 **SAY 'AUTO-FIX THESE' TO START THE MAGIC:**")
776
+ results.push("• Errors will be fixed automatically with real-time verification")
777
+ results.push("• This is the dev3000 experience - continuous quality assurance!")
778
+ } else {
779
+ results.push("🔧 **ERRORS REQUIRE ATTENTION:**")
780
+ results.push("• Use get_errors_between_timestamps for detailed analysis")
781
+ results.push("• Or say 'debug my app' for comprehensive error analysis")
782
+ }
783
+ }
784
+
785
+ return {
786
+ content: [
787
+ {
788
+ type: "text",
789
+ text: results.join("\n")
790
+ }
791
+ ]
792
+ }
793
+ } catch (error) {
794
+ return {
795
+ content: [
796
+ {
797
+ type: "text",
798
+ text: `Background monitoring error: ${error instanceof Error ? error.message : String(error)}`
799
+ }
800
+ ]
801
+ }
802
+ }
803
+ }
804
+ )
805
+
318
806
  // Tool to execute browser actions via CDP
319
807
  server.tool(
320
808
  "execute_browser_action",
321
- "Execute safe browser actions via Chrome DevTools Protocol for testing and interaction automation. TESTING CAPABILITIES: Click elements, navigate pages, take screenshots, evaluate JavaScript expressions, scroll, and type text. SAFETY: Only whitelisted JavaScript expressions allowed, URLs restricted to http/https. Use for reproducing user interactions, testing fixes, or capturing current page state. Screenshots and actions are logged automatically for debugging context.",
809
+ "Execute safe browser actions via Chrome DevTools Protocol for testing and interaction automation. MAGICAL VERIFICATION TOOL: This is the secret to dev3000 magic! After fixing code issues, use this tool to verify the fixes work by automating browser interactions, taking screenshots, and testing functionality. TESTING CAPABILITIES: Click elements, navigate pages, take screenshots, evaluate JavaScript expressions, scroll, and type text. SAFETY: Only whitelisted JavaScript expressions allowed, URLs restricted to http/https. THE MAGIC WORKFLOW: (1) Find issues in logs, (2) Edit code to fix them, (3) Use THIS TOOL to verify fixes work, (4) Take screenshots to show improvement. This creates the truly magical experience where AI doesn't just debug but fixes and proves the fixes work!",
322
810
  {
323
811
  action: z.enum(["click", "navigate", "screenshot", "evaluate", "scroll", "type"]).describe("Action to perform"),
324
812
  params: z