devharness 0.8.0

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 (627) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +185 -0
  3. package/build/atomic-write.d.ts +28 -0
  4. package/build/atomic-write.d.ts.map +1 -0
  5. package/build/atomic-write.js +126 -0
  6. package/build/atomic-write.js.map +1 -0
  7. package/build/cdp-manager.d.ts +524 -0
  8. package/build/cdp-manager.d.ts.map +1 -0
  9. package/build/cdp-manager.js +1828 -0
  10. package/build/cdp-manager.js.map +1 -0
  11. package/build/cdp-manager.test.d.ts +6 -0
  12. package/build/cdp-manager.test.d.ts.map +1 -0
  13. package/build/cdp-manager.test.js +546 -0
  14. package/build/cdp-manager.test.js.map +1 -0
  15. package/build/chrome-launcher.d.ts +400 -0
  16. package/build/chrome-launcher.d.ts.map +1 -0
  17. package/build/chrome-launcher.js +1071 -0
  18. package/build/chrome-launcher.js.map +1 -0
  19. package/build/chrome-launcher.test.d.ts +11 -0
  20. package/build/chrome-launcher.test.d.ts.map +1 -0
  21. package/build/chrome-launcher.test.js +204 -0
  22. package/build/chrome-launcher.test.js.map +1 -0
  23. package/build/clickable-cache.d.ts +73 -0
  24. package/build/clickable-cache.d.ts.map +1 -0
  25. package/build/clickable-cache.js +90 -0
  26. package/build/clickable-cache.js.map +1 -0
  27. package/build/command-recorder.d.ts +401 -0
  28. package/build/command-recorder.d.ts.map +1 -0
  29. package/build/command-recorder.js +701 -0
  30. package/build/command-recorder.js.map +1 -0
  31. package/build/config.d.ts +390 -0
  32. package/build/config.d.ts.map +1 -0
  33. package/build/config.js +826 -0
  34. package/build/config.js.map +1 -0
  35. package/build/config.test.d.ts +2 -0
  36. package/build/config.test.d.ts.map +1 -0
  37. package/build/config.test.js +112 -0
  38. package/build/config.test.js.map +1 -0
  39. package/build/connection-manager.d.ts +159 -0
  40. package/build/connection-manager.d.ts.map +1 -0
  41. package/build/connection-manager.js +432 -0
  42. package/build/connection-manager.js.map +1 -0
  43. package/build/connection-manager.test.d.ts +11 -0
  44. package/build/connection-manager.test.d.ts.map +1 -0
  45. package/build/connection-manager.test.js +114 -0
  46. package/build/connection-manager.test.js.map +1 -0
  47. package/build/console-monitor.d.ts +150 -0
  48. package/build/console-monitor.d.ts.map +1 -0
  49. package/build/console-monitor.js +454 -0
  50. package/build/console-monitor.js.map +1 -0
  51. package/build/dashboard/bundle.js +1 -0
  52. package/build/dashboard/dashboard-client.d.ts +42 -0
  53. package/build/dashboard/dashboard-client.d.ts.map +1 -0
  54. package/build/dashboard/dashboard-client.js +184 -0
  55. package/build/dashboard/dashboard-client.js.map +1 -0
  56. package/build/dashboard/dashboard-hub.d.ts +50 -0
  57. package/build/dashboard/dashboard-hub.d.ts.map +1 -0
  58. package/build/dashboard/dashboard-hub.js +654 -0
  59. package/build/dashboard/dashboard-hub.js.map +1 -0
  60. package/build/dashboard/hub-lock.d.ts +16 -0
  61. package/build/dashboard/hub-lock.d.ts.map +1 -0
  62. package/build/dashboard/hub-lock.js +77 -0
  63. package/build/dashboard/hub-lock.js.map +1 -0
  64. package/build/dashboard/index.d.ts +25 -0
  65. package/build/dashboard/index.d.ts.map +1 -0
  66. package/build/dashboard/index.js +77 -0
  67. package/build/dashboard/index.js.map +1 -0
  68. package/build/dashboard/types.d.ts +83 -0
  69. package/build/dashboard/types.d.ts.map +1 -0
  70. package/build/dashboard/types.js +6 -0
  71. package/build/dashboard/types.js.map +1 -0
  72. package/build/debug-logger.d.ts +85 -0
  73. package/build/debug-logger.d.ts.map +1 -0
  74. package/build/debug-logger.js +195 -0
  75. package/build/debug-logger.js.map +1 -0
  76. package/build/debugger-aware-wrapper.d.ts +37 -0
  77. package/build/debugger-aware-wrapper.d.ts.map +1 -0
  78. package/build/debugger-aware-wrapper.js +128 -0
  79. package/build/debugger-aware-wrapper.js.map +1 -0
  80. package/build/dom-change-monitor.d.ts +92 -0
  81. package/build/dom-change-monitor.d.ts.map +1 -0
  82. package/build/dom-change-monitor.js +437 -0
  83. package/build/dom-change-monitor.js.map +1 -0
  84. package/build/element-collector.d.ts +16 -0
  85. package/build/element-collector.d.ts.map +1 -0
  86. package/build/element-collector.js +207 -0
  87. package/build/element-collector.js.map +1 -0
  88. package/build/error-helpers.d.ts +43 -0
  89. package/build/error-helpers.d.ts.map +1 -0
  90. package/build/error-helpers.js +143 -0
  91. package/build/error-helpers.js.map +1 -0
  92. package/build/formatters/console-formatter.d.ts +160 -0
  93. package/build/formatters/console-formatter.d.ts.map +1 -0
  94. package/build/formatters/console-formatter.js +338 -0
  95. package/build/formatters/console-formatter.js.map +1 -0
  96. package/build/helpers/parser-plugins.d.ts +44 -0
  97. package/build/helpers/parser-plugins.d.ts.map +1 -0
  98. package/build/helpers/parser-plugins.js +102 -0
  99. package/build/helpers/parser-plugins.js.map +1 -0
  100. package/build/helpers/paths.d.ts +79 -0
  101. package/build/helpers/paths.d.ts.map +1 -0
  102. package/build/helpers/paths.js +168 -0
  103. package/build/helpers/paths.js.map +1 -0
  104. package/build/helpers/process-liveness.d.ts +24 -0
  105. package/build/helpers/process-liveness.d.ts.map +1 -0
  106. package/build/helpers/process-liveness.js +36 -0
  107. package/build/helpers/process-liveness.js.map +1 -0
  108. package/build/helpers/process-liveness.test.d.ts +2 -0
  109. package/build/helpers/process-liveness.test.d.ts.map +1 -0
  110. package/build/helpers/process-liveness.test.js +40 -0
  111. package/build/helpers/process-liveness.test.js.map +1 -0
  112. package/build/helpers/sequence-tree.d.ts +27 -0
  113. package/build/helpers/sequence-tree.d.ts.map +1 -0
  114. package/build/helpers/sequence-tree.js +80 -0
  115. package/build/helpers/sequence-tree.js.map +1 -0
  116. package/build/helpers/sequence-tree.test.d.ts +2 -0
  117. package/build/helpers/sequence-tree.test.d.ts.map +1 -0
  118. package/build/helpers/sequence-tree.test.js +122 -0
  119. package/build/helpers/sequence-tree.test.js.map +1 -0
  120. package/build/index.d.ts +3 -0
  121. package/build/index.d.ts.map +1 -0
  122. package/build/index.js +2007 -0
  123. package/build/index.js.map +1 -0
  124. package/build/interaction-recorder.d.ts +214 -0
  125. package/build/interaction-recorder.d.ts.map +1 -0
  126. package/build/interaction-recorder.js +2007 -0
  127. package/build/interaction-recorder.js.map +1 -0
  128. package/build/issue-tracker.d.ts +107 -0
  129. package/build/issue-tracker.d.ts.map +1 -0
  130. package/build/issue-tracker.js +582 -0
  131. package/build/issue-tracker.js.map +1 -0
  132. package/build/issue-tracker.test.d.ts +2 -0
  133. package/build/issue-tracker.test.d.ts.map +1 -0
  134. package/build/issue-tracker.test.js +88 -0
  135. package/build/issue-tracker.test.js.map +1 -0
  136. package/build/launch-chrome-port.test.d.ts +14 -0
  137. package/build/launch-chrome-port.test.d.ts.map +1 -0
  138. package/build/launch-chrome-port.test.js +97 -0
  139. package/build/launch-chrome-port.test.js.map +1 -0
  140. package/build/log-processor/orchestrator.d.ts +32 -0
  141. package/build/log-processor/orchestrator.d.ts.map +1 -0
  142. package/build/log-processor/orchestrator.js +27 -0
  143. package/build/log-processor/orchestrator.js.map +1 -0
  144. package/build/logpoint-execution-tracker.d.ts +57 -0
  145. package/build/logpoint-execution-tracker.d.ts.map +1 -0
  146. package/build/logpoint-execution-tracker.js +112 -0
  147. package/build/logpoint-execution-tracker.js.map +1 -0
  148. package/build/mcp-supervisor.d.ts +3 -0
  149. package/build/mcp-supervisor.d.ts.map +1 -0
  150. package/build/mcp-supervisor.js +211 -0
  151. package/build/mcp-supervisor.js.map +1 -0
  152. package/build/messages.d.ts +165 -0
  153. package/build/messages.d.ts.map +1 -0
  154. package/build/messages.js +574 -0
  155. package/build/messages.js.map +1 -0
  156. package/build/network-monitor.d.ts +172 -0
  157. package/build/network-monitor.d.ts.map +1 -0
  158. package/build/network-monitor.js +350 -0
  159. package/build/network-monitor.js.map +1 -0
  160. package/build/overlays.d.ts +49 -0
  161. package/build/overlays.d.ts.map +1 -0
  162. package/build/overlays.js +409 -0
  163. package/build/overlays.js.map +1 -0
  164. package/build/persistent-profiles.test.d.ts +15 -0
  165. package/build/persistent-profiles.test.d.ts.map +1 -0
  166. package/build/persistent-profiles.test.js +470 -0
  167. package/build/persistent-profiles.test.js.map +1 -0
  168. package/build/port-reserver.d.ts +32 -0
  169. package/build/port-reserver.d.ts.map +1 -0
  170. package/build/port-reserver.js +118 -0
  171. package/build/port-reserver.js.map +1 -0
  172. package/build/puppeteer-manager.d.ts +47 -0
  173. package/build/puppeteer-manager.d.ts.map +1 -0
  174. package/build/puppeteer-manager.js +116 -0
  175. package/build/puppeteer-manager.js.map +1 -0
  176. package/build/recording-coverage.test.d.ts +12 -0
  177. package/build/recording-coverage.test.d.ts.map +1 -0
  178. package/build/recording-coverage.test.js +72 -0
  179. package/build/recording-coverage.test.js.map +1 -0
  180. package/build/reference-validator.d.ts +47 -0
  181. package/build/reference-validator.d.ts.map +1 -0
  182. package/build/reference-validator.js +86 -0
  183. package/build/reference-validator.js.map +1 -0
  184. package/build/reference-validator.test.d.ts +5 -0
  185. package/build/reference-validator.test.d.ts.map +1 -0
  186. package/build/reference-validator.test.js +243 -0
  187. package/build/reference-validator.test.js.map +1 -0
  188. package/build/replay-cursor.d.ts +27 -0
  189. package/build/replay-cursor.d.ts.map +1 -0
  190. package/build/replay-cursor.js +240 -0
  191. package/build/replay-cursor.js.map +1 -0
  192. package/build/runners/docker-compose-runner.d.ts +69 -0
  193. package/build/runners/docker-compose-runner.d.ts.map +1 -0
  194. package/build/runners/docker-compose-runner.js +438 -0
  195. package/build/runners/docker-compose-runner.js.map +1 -0
  196. package/build/runners/docker-runner.d.ts +65 -0
  197. package/build/runners/docker-runner.d.ts.map +1 -0
  198. package/build/runners/docker-runner.js +414 -0
  199. package/build/runners/docker-runner.js.map +1 -0
  200. package/build/runners/index.d.ts +19 -0
  201. package/build/runners/index.d.ts.map +1 -0
  202. package/build/runners/index.js +35 -0
  203. package/build/runners/index.js.map +1 -0
  204. package/build/runners/native-runner.d.ts +95 -0
  205. package/build/runners/native-runner.d.ts.map +1 -0
  206. package/build/runners/native-runner.js +370 -0
  207. package/build/runners/native-runner.js.map +1 -0
  208. package/build/runners/types.d.ts +147 -0
  209. package/build/runners/types.d.ts.map +1 -0
  210. package/build/runners/types.js +25 -0
  211. package/build/runners/types.js.map +1 -0
  212. package/build/self-restart.d.ts +12 -0
  213. package/build/self-restart.d.ts.map +1 -0
  214. package/build/self-restart.js +41 -0
  215. package/build/self-restart.js.map +1 -0
  216. package/build/self-restart.test.d.ts +2 -0
  217. package/build/self-restart.test.d.ts.map +1 -0
  218. package/build/self-restart.test.js +34 -0
  219. package/build/self-restart.test.js.map +1 -0
  220. package/build/server-claims.d.ts +161 -0
  221. package/build/server-claims.d.ts.map +1 -0
  222. package/build/server-claims.js +382 -0
  223. package/build/server-claims.js.map +1 -0
  224. package/build/server-claims.test.d.ts +2 -0
  225. package/build/server-claims.test.d.ts.map +1 -0
  226. package/build/server-claims.test.js +197 -0
  227. package/build/server-claims.test.js.map +1 -0
  228. package/build/server-manager.d.ts +438 -0
  229. package/build/server-manager.d.ts.map +1 -0
  230. package/build/server-manager.js +1674 -0
  231. package/build/server-manager.js.map +1 -0
  232. package/build/server-manager.test.d.ts +17 -0
  233. package/build/server-manager.test.d.ts.map +1 -0
  234. package/build/server-manager.test.js +122 -0
  235. package/build/server-manager.test.js.map +1 -0
  236. package/build/server-ownership.test.d.ts +2 -0
  237. package/build/server-ownership.test.d.ts.map +1 -0
  238. package/build/server-ownership.test.js +238 -0
  239. package/build/server-ownership.test.js.map +1 -0
  240. package/build/server-watcher.d.ts +21 -0
  241. package/build/server-watcher.d.ts.map +1 -0
  242. package/build/server-watcher.js +105 -0
  243. package/build/server-watcher.js.map +1 -0
  244. package/build/session-detector.d.ts +47 -0
  245. package/build/session-detector.d.ts.map +1 -0
  246. package/build/session-detector.js +229 -0
  247. package/build/session-detector.js.map +1 -0
  248. package/build/session-detector.test.d.ts +9 -0
  249. package/build/session-detector.test.d.ts.map +1 -0
  250. package/build/session-detector.test.js +45 -0
  251. package/build/session-detector.test.js.map +1 -0
  252. package/build/sourcemap-handler.d.ts +114 -0
  253. package/build/sourcemap-handler.d.ts.map +1 -0
  254. package/build/sourcemap-handler.js +479 -0
  255. package/build/sourcemap-handler.js.map +1 -0
  256. package/build/supervisor/child-manager.d.ts +43 -0
  257. package/build/supervisor/child-manager.d.ts.map +1 -0
  258. package/build/supervisor/child-manager.js +148 -0
  259. package/build/supervisor/child-manager.js.map +1 -0
  260. package/build/supervisor/child-manager.test.d.ts +2 -0
  261. package/build/supervisor/child-manager.test.d.ts.map +1 -0
  262. package/build/supervisor/child-manager.test.js +107 -0
  263. package/build/supervisor/child-manager.test.js.map +1 -0
  264. package/build/supervisor/client-watcher.d.ts +48 -0
  265. package/build/supervisor/client-watcher.d.ts.map +1 -0
  266. package/build/supervisor/client-watcher.js +186 -0
  267. package/build/supervisor/client-watcher.js.map +1 -0
  268. package/build/supervisor/client-watcher.test.d.ts +2 -0
  269. package/build/supervisor/client-watcher.test.d.ts.map +1 -0
  270. package/build/supervisor/client-watcher.test.js +121 -0
  271. package/build/supervisor/client-watcher.test.js.map +1 -0
  272. package/build/supervisor/idle-config.d.ts +30 -0
  273. package/build/supervisor/idle-config.d.ts.map +1 -0
  274. package/build/supervisor/idle-config.js +76 -0
  275. package/build/supervisor/idle-config.js.map +1 -0
  276. package/build/supervisor/idle-config.test.d.ts +2 -0
  277. package/build/supervisor/idle-config.test.d.ts.map +1 -0
  278. package/build/supervisor/idle-config.test.js +119 -0
  279. package/build/supervisor/idle-config.test.js.map +1 -0
  280. package/build/supervisor/ndjson-reader.d.ts +47 -0
  281. package/build/supervisor/ndjson-reader.d.ts.map +1 -0
  282. package/build/supervisor/ndjson-reader.js +75 -0
  283. package/build/supervisor/ndjson-reader.js.map +1 -0
  284. package/build/supervisor/ndjson-reader.test.d.ts +2 -0
  285. package/build/supervisor/ndjson-reader.test.d.ts.map +1 -0
  286. package/build/supervisor/ndjson-reader.test.js +92 -0
  287. package/build/supervisor/ndjson-reader.test.js.map +1 -0
  288. package/build/supervisor/pidfile.d.ts +11 -0
  289. package/build/supervisor/pidfile.d.ts.map +1 -0
  290. package/build/supervisor/pidfile.js +29 -0
  291. package/build/supervisor/pidfile.js.map +1 -0
  292. package/build/supervisor/pidfile.test.d.ts +8 -0
  293. package/build/supervisor/pidfile.test.d.ts.map +1 -0
  294. package/build/supervisor/pidfile.test.js +46 -0
  295. package/build/supervisor/pidfile.test.js.map +1 -0
  296. package/build/supervisor/restart-coordinator.d.ts +73 -0
  297. package/build/supervisor/restart-coordinator.d.ts.map +1 -0
  298. package/build/supervisor/restart-coordinator.js +300 -0
  299. package/build/supervisor/restart-coordinator.js.map +1 -0
  300. package/build/supervisor/restart-coordinator.test.d.ts +2 -0
  301. package/build/supervisor/restart-coordinator.test.d.ts.map +1 -0
  302. package/build/supervisor/restart-coordinator.test.js +434 -0
  303. package/build/supervisor/restart-coordinator.test.js.map +1 -0
  304. package/build/test-support/fake-execute-tool-call.d.ts +11 -0
  305. package/build/test-support/fake-execute-tool-call.d.ts.map +1 -0
  306. package/build/test-support/fake-execute-tool-call.js +19 -0
  307. package/build/test-support/fake-execute-tool-call.js.map +1 -0
  308. package/build/tool-error.d.ts +14 -0
  309. package/build/tool-error.d.ts.map +1 -0
  310. package/build/tool-error.js +18 -0
  311. package/build/tool-error.js.map +1 -0
  312. package/build/tool-response.d.ts +293 -0
  313. package/build/tool-response.d.ts.map +1 -0
  314. package/build/tool-response.js +365 -0
  315. package/build/tool-response.js.map +1 -0
  316. package/build/tools/assert-tools.d.ts +62 -0
  317. package/build/tools/assert-tools.d.ts.map +1 -0
  318. package/build/tools/assert-tools.js +330 -0
  319. package/build/tools/assert-tools.js.map +1 -0
  320. package/build/tools/breakpoint-await-abort.test.d.ts +2 -0
  321. package/build/tools/breakpoint-await-abort.test.d.ts.map +1 -0
  322. package/build/tools/breakpoint-await-abort.test.js +124 -0
  323. package/build/tools/breakpoint-await-abort.test.js.map +1 -0
  324. package/build/tools/breakpoint-tools.d.ts +99 -0
  325. package/build/tools/breakpoint-tools.d.ts.map +1 -0
  326. package/build/tools/breakpoint-tools.js +1197 -0
  327. package/build/tools/breakpoint-tools.js.map +1 -0
  328. package/build/tools/config-tools.d.ts +58 -0
  329. package/build/tools/config-tools.d.ts.map +1 -0
  330. package/build/tools/config-tools.js +180 -0
  331. package/build/tools/config-tools.js.map +1 -0
  332. package/build/tools/connection-routing.test.d.ts +12 -0
  333. package/build/tools/connection-routing.test.d.ts.map +1 -0
  334. package/build/tools/connection-routing.test.js +206 -0
  335. package/build/tools/connection-routing.test.js.map +1 -0
  336. package/build/tools/console-tools.d.ts +84 -0
  337. package/build/tools/console-tools.d.ts.map +1 -0
  338. package/build/tools/console-tools.js +241 -0
  339. package/build/tools/console-tools.js.map +1 -0
  340. package/build/tools/content-tools.d.ts +74 -0
  341. package/build/tools/content-tools.d.ts.map +1 -0
  342. package/build/tools/content-tools.js +582 -0
  343. package/build/tools/content-tools.js.map +1 -0
  344. package/build/tools/dashboard-tools.d.ts +38 -0
  345. package/build/tools/dashboard-tools.d.ts.map +1 -0
  346. package/build/tools/dashboard-tools.js +123 -0
  347. package/build/tools/dashboard-tools.js.map +1 -0
  348. package/build/tools/dom-tools.d.ts +41 -0
  349. package/build/tools/dom-tools.d.ts.map +1 -0
  350. package/build/tools/dom-tools.js +277 -0
  351. package/build/tools/dom-tools.js.map +1 -0
  352. package/build/tools/download-tools.d.ts +55 -0
  353. package/build/tools/download-tools.d.ts.map +1 -0
  354. package/build/tools/download-tools.js +280 -0
  355. package/build/tools/download-tools.js.map +1 -0
  356. package/build/tools/execution-tools.d.ts +40 -0
  357. package/build/tools/execution-tools.d.ts.map +1 -0
  358. package/build/tools/execution-tools.js +121 -0
  359. package/build/tools/execution-tools.js.map +1 -0
  360. package/build/tools/input-abort.test.d.ts +2 -0
  361. package/build/tools/input-abort.test.d.ts.map +1 -0
  362. package/build/tools/input-abort.test.js +227 -0
  363. package/build/tools/input-abort.test.js.map +1 -0
  364. package/build/tools/input-ambiguous-selector.test.d.ts +2 -0
  365. package/build/tools/input-ambiguous-selector.test.d.ts.map +1 -0
  366. package/build/tools/input-ambiguous-selector.test.js +34 -0
  367. package/build/tools/input-ambiguous-selector.test.js.map +1 -0
  368. package/build/tools/input-tools.d.ts +168 -0
  369. package/build/tools/input-tools.d.ts.map +1 -0
  370. package/build/tools/input-tools.js +1397 -0
  371. package/build/tools/input-tools.js.map +1 -0
  372. package/build/tools/inspection-tools.d.ts +112 -0
  373. package/build/tools/inspection-tools.d.ts.map +1 -0
  374. package/build/tools/inspection-tools.js +637 -0
  375. package/build/tools/inspection-tools.js.map +1 -0
  376. package/build/tools/interpolation.d.ts +30 -0
  377. package/build/tools/interpolation.d.ts.map +1 -0
  378. package/build/tools/interpolation.js +143 -0
  379. package/build/tools/interpolation.js.map +1 -0
  380. package/build/tools/issues-abort-hygiene.test.d.ts +2 -0
  381. package/build/tools/issues-abort-hygiene.test.d.ts.map +1 -0
  382. package/build/tools/issues-abort-hygiene.test.js +79 -0
  383. package/build/tools/issues-abort-hygiene.test.js.map +1 -0
  384. package/build/tools/issues-tools.d.ts +98 -0
  385. package/build/tools/issues-tools.d.ts.map +1 -0
  386. package/build/tools/issues-tools.js +821 -0
  387. package/build/tools/issues-tools.js.map +1 -0
  388. package/build/tools/issues-tools.test.d.ts +8 -0
  389. package/build/tools/issues-tools.test.d.ts.map +1 -0
  390. package/build/tools/issues-tools.test.js +184 -0
  391. package/build/tools/issues-tools.test.js.map +1 -0
  392. package/build/tools/modal-tools.d.ts +73 -0
  393. package/build/tools/modal-tools.d.ts.map +1 -0
  394. package/build/tools/modal-tools.js +161 -0
  395. package/build/tools/modal-tools.js.map +1 -0
  396. package/build/tools/network-tools.d.ts +72 -0
  397. package/build/tools/network-tools.d.ts.map +1 -0
  398. package/build/tools/network-tools.js +432 -0
  399. package/build/tools/network-tools.js.map +1 -0
  400. package/build/tools/page-tools.d.ts +78 -0
  401. package/build/tools/page-tools.d.ts.map +1 -0
  402. package/build/tools/page-tools.js +255 -0
  403. package/build/tools/page-tools.js.map +1 -0
  404. package/build/tools/plugin-tools.d.ts +16 -0
  405. package/build/tools/plugin-tools.d.ts.map +1 -0
  406. package/build/tools/plugin-tools.js +17 -0
  407. package/build/tools/plugin-tools.js.map +1 -0
  408. package/build/tools/replay-abort.test.d.ts +2 -0
  409. package/build/tools/replay-abort.test.d.ts.map +1 -0
  410. package/build/tools/replay-abort.test.js +259 -0
  411. package/build/tools/replay-abort.test.js.map +1 -0
  412. package/build/tools/replay-add-conditional.test.d.ts +2 -0
  413. package/build/tools/replay-add-conditional.test.d.ts.map +1 -0
  414. package/build/tools/replay-add-conditional.test.js +205 -0
  415. package/build/tools/replay-add-conditional.test.js.map +1 -0
  416. package/build/tools/replay-background-run.test.d.ts +2 -0
  417. package/build/tools/replay-background-run.test.d.ts.map +1 -0
  418. package/build/tools/replay-background-run.test.js +176 -0
  419. package/build/tools/replay-background-run.test.js.map +1 -0
  420. package/build/tools/replay-capture-variables.test.d.ts +2 -0
  421. package/build/tools/replay-capture-variables.test.d.ts.map +1 -0
  422. package/build/tools/replay-capture-variables.test.js +331 -0
  423. package/build/tools/replay-capture-variables.test.js.map +1 -0
  424. package/build/tools/replay-conditional-idb-and-launch.test.d.ts +11 -0
  425. package/build/tools/replay-conditional-idb-and-launch.test.d.ts.map +1 -0
  426. package/build/tools/replay-conditional-idb-and-launch.test.js +429 -0
  427. package/build/tools/replay-conditional-idb-and-launch.test.js.map +1 -0
  428. package/build/tools/replay-conditional-timeout.test.d.ts +14 -0
  429. package/build/tools/replay-conditional-timeout.test.d.ts.map +1 -0
  430. package/build/tools/replay-conditional-timeout.test.js +126 -0
  431. package/build/tools/replay-conditional-timeout.test.js.map +1 -0
  432. package/build/tools/replay-declare.test.d.ts +2 -0
  433. package/build/tools/replay-declare.test.d.ts.map +1 -0
  434. package/build/tools/replay-declare.test.js +106 -0
  435. package/build/tools/replay-declare.test.js.map +1 -0
  436. package/build/tools/replay-declared-browser-cleanup.test.d.ts +2 -0
  437. package/build/tools/replay-declared-browser-cleanup.test.d.ts.map +1 -0
  438. package/build/tools/replay-declared-browser-cleanup.test.js +103 -0
  439. package/build/tools/replay-declared-browser-cleanup.test.js.map +1 -0
  440. package/build/tools/replay-declared-profile.test.d.ts +2 -0
  441. package/build/tools/replay-declared-profile.test.d.ts.map +1 -0
  442. package/build/tools/replay-declared-profile.test.js +116 -0
  443. package/build/tools/replay-declared-profile.test.js.map +1 -0
  444. package/build/tools/replay-executor.d.ts +556 -0
  445. package/build/tools/replay-executor.d.ts.map +1 -0
  446. package/build/tools/replay-executor.js +2347 -0
  447. package/build/tools/replay-executor.js.map +1 -0
  448. package/build/tools/replay-folder-save.test.d.ts +2 -0
  449. package/build/tools/replay-folder-save.test.d.ts.map +1 -0
  450. package/build/tools/replay-folder-save.test.js +63 -0
  451. package/build/tools/replay-folder-save.test.js.map +1 -0
  452. package/build/tools/replay-formatters.d.ts +148 -0
  453. package/build/tools/replay-formatters.d.ts.map +1 -0
  454. package/build/tools/replay-formatters.js +856 -0
  455. package/build/tools/replay-formatters.js.map +1 -0
  456. package/build/tools/replay-kill-chrome-on-finish.test.d.ts +2 -0
  457. package/build/tools/replay-kill-chrome-on-finish.test.d.ts.map +1 -0
  458. package/build/tools/replay-kill-chrome-on-finish.test.js +175 -0
  459. package/build/tools/replay-kill-chrome-on-finish.test.js.map +1 -0
  460. package/build/tools/replay-multi-connection.test.d.ts +2 -0
  461. package/build/tools/replay-multi-connection.test.d.ts.map +1 -0
  462. package/build/tools/replay-multi-connection.test.js +547 -0
  463. package/build/tools/replay-multi-connection.test.js.map +1 -0
  464. package/build/tools/replay-output-and-record-options.test.d.ts +2 -0
  465. package/build/tools/replay-output-and-record-options.test.d.ts.map +1 -0
  466. package/build/tools/replay-output-and-record-options.test.js +240 -0
  467. package/build/tools/replay-output-and-record-options.test.js.map +1 -0
  468. package/build/tools/replay-production-error-shape.test.d.ts +7 -0
  469. package/build/tools/replay-production-error-shape.test.d.ts.map +1 -0
  470. package/build/tools/replay-production-error-shape.test.js +93 -0
  471. package/build/tools/replay-production-error-shape.test.js.map +1 -0
  472. package/build/tools/replay-rebase.test.d.ts +2 -0
  473. package/build/tools/replay-rebase.test.d.ts.map +1 -0
  474. package/build/tools/replay-rebase.test.js +58 -0
  475. package/build/tools/replay-rebase.test.js.map +1 -0
  476. package/build/tools/replay-retry-classification.test.d.ts +9 -0
  477. package/build/tools/replay-retry-classification.test.d.ts.map +1 -0
  478. package/build/tools/replay-retry-classification.test.js +57 -0
  479. package/build/tools/replay-retry-classification.test.js.map +1 -0
  480. package/build/tools/replay-run-registry.d.ts +55 -0
  481. package/build/tools/replay-run-registry.d.ts.map +1 -0
  482. package/build/tools/replay-run-registry.js +65 -0
  483. package/build/tools/replay-run-registry.js.map +1 -0
  484. package/build/tools/replay-sequence-reload.test.d.ts +2 -0
  485. package/build/tools/replay-sequence-reload.test.d.ts.map +1 -0
  486. package/build/tools/replay-sequence-reload.test.js +82 -0
  487. package/build/tools/replay-sequence-reload.test.js.map +1 -0
  488. package/build/tools/replay-socket-scope.test.d.ts +2 -0
  489. package/build/tools/replay-socket-scope.test.d.ts.map +1 -0
  490. package/build/tools/replay-socket-scope.test.js +75 -0
  491. package/build/tools/replay-socket-scope.test.js.map +1 -0
  492. package/build/tools/replay-step-connection.test.d.ts +2 -0
  493. package/build/tools/replay-step-connection.test.d.ts.map +1 -0
  494. package/build/tools/replay-step-connection.test.js +292 -0
  495. package/build/tools/replay-step-connection.test.js.map +1 -0
  496. package/build/tools/replay-step-timeout.test.d.ts +2 -0
  497. package/build/tools/replay-step-timeout.test.d.ts.map +1 -0
  498. package/build/tools/replay-step-timeout.test.js +204 -0
  499. package/build/tools/replay-step-timeout.test.js.map +1 -0
  500. package/build/tools/replay-tags.test.d.ts +2 -0
  501. package/build/tools/replay-tags.test.d.ts.map +1 -0
  502. package/build/tools/replay-tags.test.js +99 -0
  503. package/build/tools/replay-tags.test.js.map +1 -0
  504. package/build/tools/replay-teardown-and-foreach.test.d.ts +13 -0
  505. package/build/tools/replay-teardown-and-foreach.test.d.ts.map +1 -0
  506. package/build/tools/replay-teardown-and-foreach.test.js +318 -0
  507. package/build/tools/replay-teardown-and-foreach.test.js.map +1 -0
  508. package/build/tools/replay-tool-name-validation.test.d.ts +2 -0
  509. package/build/tools/replay-tool-name-validation.test.d.ts.map +1 -0
  510. package/build/tools/replay-tool-name-validation.test.js +280 -0
  511. package/build/tools/replay-tool-name-validation.test.js.map +1 -0
  512. package/build/tools/replay-tools.d.ts +288 -0
  513. package/build/tools/replay-tools.d.ts.map +1 -0
  514. package/build/tools/replay-tools.js +2994 -0
  515. package/build/tools/replay-tools.js.map +1 -0
  516. package/build/tools/request-abort.test.d.ts +2 -0
  517. package/build/tools/request-abort.test.d.ts.map +1 -0
  518. package/build/tools/request-abort.test.js +130 -0
  519. package/build/tools/request-abort.test.js.map +1 -0
  520. package/build/tools/request-tools.d.ts +56 -0
  521. package/build/tools/request-tools.d.ts.map +1 -0
  522. package/build/tools/request-tools.js +174 -0
  523. package/build/tools/request-tools.js.map +1 -0
  524. package/build/tools/screenshot-tools.d.ts +135 -0
  525. package/build/tools/screenshot-tools.d.ts.map +1 -0
  526. package/build/tools/screenshot-tools.js +636 -0
  527. package/build/tools/screenshot-tools.js.map +1 -0
  528. package/build/tools/server-tools.d.ts +88 -0
  529. package/build/tools/server-tools.d.ts.map +1 -0
  530. package/build/tools/server-tools.js +485 -0
  531. package/build/tools/server-tools.js.map +1 -0
  532. package/build/tools/source-tools.d.ts +46 -0
  533. package/build/tools/source-tools.d.ts.map +1 -0
  534. package/build/tools/source-tools.js +47 -0
  535. package/build/tools/source-tools.js.map +1 -0
  536. package/build/tools/storage-tools.d.ts +141 -0
  537. package/build/tools/storage-tools.d.ts.map +1 -0
  538. package/build/tools/storage-tools.js +894 -0
  539. package/build/tools/storage-tools.js.map +1 -0
  540. package/build/tools/storage-tools.test.d.ts +13 -0
  541. package/build/tools/storage-tools.test.d.ts.map +1 -0
  542. package/build/tools/storage-tools.test.js +707 -0
  543. package/build/tools/storage-tools.test.js.map +1 -0
  544. package/build/tools/tab-tools.d.ts +42 -0
  545. package/build/tools/tab-tools.d.ts.map +1 -0
  546. package/build/tools/tab-tools.js +296 -0
  547. package/build/tools/tab-tools.js.map +1 -0
  548. package/build/tools/wait-tools.d.ts +85 -0
  549. package/build/tools/wait-tools.d.ts.map +1 -0
  550. package/build/tools/wait-tools.js +236 -0
  551. package/build/tools/wait-tools.js.map +1 -0
  552. package/build/tools/wait-tools.test.d.ts +9 -0
  553. package/build/tools/wait-tools.test.d.ts.map +1 -0
  554. package/build/tools/wait-tools.test.js +193 -0
  555. package/build/tools/wait-tools.test.js.map +1 -0
  556. package/build/types.d.ts +133 -0
  557. package/build/types.d.ts.map +1 -0
  558. package/build/types.js +5 -0
  559. package/build/types.js.map +1 -0
  560. package/build/ui-verifier.d.ts +88 -0
  561. package/build/ui-verifier.d.ts.map +1 -0
  562. package/build/ui-verifier.js +540 -0
  563. package/build/ui-verifier.js.map +1 -0
  564. package/build/utils/abort.d.ts +68 -0
  565. package/build/utils/abort.d.ts.map +1 -0
  566. package/build/utils/abort.js +159 -0
  567. package/build/utils/abort.js.map +1 -0
  568. package/build/utils/abort.test.d.ts +2 -0
  569. package/build/utils/abort.test.d.ts.map +1 -0
  570. package/build/utils/abort.test.js +174 -0
  571. package/build/utils/abort.test.js.map +1 -0
  572. package/build/utils/modal-detection-core.d.ts +150 -0
  573. package/build/utils/modal-detection-core.d.ts.map +1 -0
  574. package/build/utils/modal-detection-core.js +332 -0
  575. package/build/utils/modal-detection-core.js.map +1 -0
  576. package/build/utils/modal-detection-core.test.d.ts +5 -0
  577. package/build/utils/modal-detection-core.test.d.ts.map +1 -0
  578. package/build/utils/modal-detection-core.test.js +492 -0
  579. package/build/utils/modal-detection-core.test.js.map +1 -0
  580. package/build/utils/modal-detector.d.ts +29 -0
  581. package/build/utils/modal-detector.d.ts.map +1 -0
  582. package/build/utils/modal-detector.js +281 -0
  583. package/build/utils/modal-detector.js.map +1 -0
  584. package/build/utils/modal-dismissal.d.ts +32 -0
  585. package/build/utils/modal-dismissal.d.ts.map +1 -0
  586. package/build/utils/modal-dismissal.js +190 -0
  587. package/build/utils/modal-dismissal.js.map +1 -0
  588. package/build/utils/port-check.d.ts +31 -0
  589. package/build/utils/port-check.d.ts.map +1 -0
  590. package/build/utils/port-check.js +87 -0
  591. package/build/utils/port-check.js.map +1 -0
  592. package/build/utils/port-check.test.d.ts +2 -0
  593. package/build/utils/port-check.test.d.ts.map +1 -0
  594. package/build/utils/port-check.test.js +66 -0
  595. package/build/utils/port-check.test.js.map +1 -0
  596. package/build/utils/selector-resolver.d.ts +66 -0
  597. package/build/utils/selector-resolver.d.ts.map +1 -0
  598. package/build/utils/selector-resolver.js +200 -0
  599. package/build/utils/selector-resolver.js.map +1 -0
  600. package/build/validation-helpers.d.ts +41 -0
  601. package/build/validation-helpers.d.ts.map +1 -0
  602. package/build/validation-helpers.js +236 -0
  603. package/build/validation-helpers.js.map +1 -0
  604. package/build/window-sizing.d.ts +26 -0
  605. package/build/window-sizing.d.ts.map +1 -0
  606. package/build/window-sizing.js +87 -0
  607. package/build/window-sizing.js.map +1 -0
  608. package/build/window-sizing.test.d.ts +8 -0
  609. package/build/window-sizing.test.d.ts.map +1 -0
  610. package/build/window-sizing.test.js +113 -0
  611. package/build/window-sizing.test.js.map +1 -0
  612. package/docs/README.md +74 -0
  613. package/docs/automation.md +562 -0
  614. package/docs/debugging.md +229 -0
  615. package/docs/installation.md +133 -0
  616. package/docs/instructions.md +227 -0
  617. package/docs/mcp-instructions.md +15 -0
  618. package/docs/message-system.md +327 -0
  619. package/docs/messages.md +3480 -0
  620. package/docs/parser-plugins.md +132 -0
  621. package/docs/replay.md +1411 -0
  622. package/docs/troubleshooting.md +272 -0
  623. package/docs/working_with_llm_notes.md +5 -0
  624. package/package.json +87 -0
  625. package/skills/devharness/SKILL.md +195 -0
  626. package/skills/devharness/references/sequences.md +613 -0
  627. package/skills/devharness/references/tool-categories.md +99 -0
@@ -0,0 +1,272 @@
1
+ # Troubleshooting
2
+
3
+ ## Session Issues
4
+
5
+ ### Chrome and my dev server closed while I was away
6
+
7
+ **Problem:** After a long break, connections are gone, Chrome is closed and a
8
+ dev server has stopped - but the MCP connection still works.
9
+
10
+ **Cause:** The session was suspended. With no request from the client for
11
+ `session.idleSuspendMinutes` (default 120), cdp-tools releases what it holds
12
+ and exits; the supervisor stays connected and started a fresh server for your
13
+ next call.
14
+
15
+ **Solutions:**
16
+ - Relaunch Chrome (`launchChrome`) and restart the dev server
17
+ (`server({ action: 'start', serverId: '...' })`) - its config is kept.
18
+ - Raise or disable the threshold in `.cdp-tools/config.json`:
19
+ `{"session": {"idleSuspendMinutes": 0}}`. Read at supervisor startup, so it
20
+ applies from the next reconnect.
21
+
22
+ A dev server another window is using is never stopped this way: it is only
23
+ released when no other live session claims it or is working in its directory.
24
+
25
+ ### A dev server stopped when I opened a new session
26
+
27
+ **Problem:** Starting cdp-tools in a project stopped a dev server that was
28
+ already running.
29
+
30
+ **Cause:** Every session that had claimed it was gone, so it was collected as
31
+ abandoned - otherwise a dev server from a window you closed days ago keeps
32
+ running until you reboot.
33
+
34
+ **Solutions:**
35
+ - Restart it (`server({ action: 'start', serverId: '...' })`).
36
+ - To keep a server outside this lifecycle, run it yourself rather than through
37
+ the `server` tool; cdp-tools only collects servers it manages, and only ones
38
+ it can prove nobody is left to use.
39
+
40
+ ## Chrome Connection Issues
41
+
42
+ ### "Chrome is already running on port X"
43
+
44
+ **Solutions:**
45
+ - Use `killChrome({ reason: "restart needed" })` to stop existing instance
46
+ - Launch on different port: `launchChrome({ port: 9224, reference: 'new session' })`
47
+ - Check if another process is using the port: `lsof -i :9222`
48
+
49
+ ### Chrome won't launch
50
+
51
+ **Solutions:**
52
+ - Check Chrome is installed in a standard location
53
+ - Verify no other Chrome debugging sessions are active
54
+ - Try `resetChromeLauncher({ reason: "stuck state" })` to reset launcher state
55
+
56
+ ## Breakpoint Issues
57
+
58
+ ### Breakpoint not hitting
59
+
60
+ **Problem:** Breakpoint set but never pauses
61
+
62
+ **Solutions:**
63
+ - Verify file URL matches exactly (use `searchCode` to find the right path)
64
+ - Check source maps are loading correctly
65
+ - Ensure code path is actually executed (add `console.log` to verify)
66
+ - Try setting logpoint first to confirm location is reachable
67
+
68
+ **Note:** Breakpoints survive rebuilds with cache-busting query params. If your bundler outputs `app.js?v=123` and rebuilds to `app.js?v=456`, existing breakpoints will automatically match the new script.
69
+
70
+ ### Breakpoint shows as "pending"
71
+
72
+ **Problem:** Breakpoint status shows pending, not resolved
73
+
74
+ **Solutions:**
75
+ - The script may not be loaded yet - navigate to the page first
76
+ - Use `breakpoint({ action: 'waitForScript', url: '...' })` to wait for script to load
77
+ - Reload the page with `navigate({ action: 'reload' })`
78
+
79
+ ### Wrong line number after setting breakpoint
80
+
81
+ **Problem:** CDP may map breakpoints to the nearest valid line
82
+
83
+ **Solutions:**
84
+ - Use `breakpoint({ action: 'validate', ... })` to check valid locations
85
+ - Set breakpoint on a line with executable code (not comments/whitespace)
86
+
87
+ ## Element Issues
88
+
89
+ ### Element not found
90
+
91
+ **Problem:** Selector doesn't match any elements
92
+
93
+ **Solutions:**
94
+ - Use `content({ action: 'findInteractive' })` to see available elements
95
+ - Check element is in viewport: might need to scroll first
96
+ - Wait for dynamic content: element may load asynchronously
97
+ - Try broader selector (class instead of ID)
98
+
99
+ ### Cache not working
100
+
101
+ **Problem:** `findInteractive` shows "no cache" or stale data
102
+
103
+ **Solutions:**
104
+ - Cache expires after 5 minutes - navigate again to refresh
105
+ - Cache is page-specific - each URL has separate cache
106
+ - Clear navigation: `navigate({ action: 'goto', ... })` rebuilds cache
107
+
108
+ ## Node.js Connection Issues
109
+
110
+ ### Cannot connect to Node.js debugger
111
+
112
+ **Problem:** `connectDebugger` fails
113
+
114
+ **Solutions:**
115
+ - Ensure Node started with `--inspect` flag
116
+ - Check port number matches (default 9229)
117
+ - Verify Node process is still running
118
+ - Try `--inspect=0.0.0.0:9229` if connecting remotely
119
+
120
+ ### Connection drops during debugging
121
+
122
+ **Solutions:**
123
+ - Check if Node process crashed (look at terminal output)
124
+ - Verify Node didn't restart (e.g., from nodemon)
125
+ - Reconnect with same reference: `connectDebugger({ reference: 'same ref', port: 9229 })`
126
+
127
+ ### "Reference already in use" but no connection exists
128
+
129
+ **Problem:** Chrome was killed externally or tab was closed manually, but MCP still shows reference in use
130
+
131
+ **Solutions:**
132
+ - This is now auto-handled - stale connections are automatically detected and cleaned up
133
+ - Use `tab({ action: 'list' })` which validates and cleans up dead connections
134
+ - Use `listConnections()` which also cleans up stale references
135
+ - As fallback, use `killChrome({ reason: "cleanup" })` then relaunch
136
+
137
+ ## Replay Issues
138
+
139
+ ### Replay times out
140
+
141
+ **Problem:** Replay hangs or times out
142
+
143
+ **Solutions:**
144
+ - Increase step timeout: `stepTimeout: 60000` (60 seconds)
145
+ - Increase total timeout: `totalTimeout: 600000` (10 minutes)
146
+ - Check if page is waiting for user interaction (modal blocking?)
147
+
148
+ ### Stale callFrameId error
149
+
150
+ **Problem:** `getVariables` fails with invalid call frame
151
+
152
+ **Solutions:**
153
+ - This should be auto-fixed - replay replaces stale IDs automatically
154
+ - If still failing, ensure debugger is actually paused
155
+ - Check breakpoint was hit with `inspect({ action: 'getCallStack' })`
156
+
157
+ ### Variables not substituted
158
+
159
+ **Problem:** Replay uses original values instead of substituted ones
160
+
161
+ **Solutions:**
162
+ - Variable names are generated as `var_<index>_<selector>`
163
+ - Use `replay({ action: 'get', name: '...' })` to see variable names
164
+ - Pass empty `variables: {}` to keep original values explicitly
165
+
166
+ ## Console/Network Monitoring
167
+
168
+ ### Console messages not appearing
169
+
170
+ **Solutions:**
171
+ - Console monitoring starts automatically on connection
172
+ - Check message type filter: `console({ action: 'list', type: 'log' })`
173
+ - Clear and retry: `console({ action: 'clear', reason: 'reset' })`
174
+
175
+ ### Network requests missing
176
+
177
+ **Solutions:**
178
+ - Enable monitoring first: `network({ action: 'enable' })`
179
+ - Monitoring must be enabled before requests are made
180
+ - Check resource type filter if used
181
+
182
+ ## Source Map Issues
183
+
184
+ ### Source maps not loading
185
+
186
+ **Solutions:**
187
+ - Source maps load lazily - they load when needed
188
+ - Check file size limits: inline (1MB), file (10MB)
189
+ - Manually load: `loadSourceMaps({ directory: './dist' })`
190
+
191
+ ### Wrong file shown in call stack
192
+
193
+ **Solutions:**
194
+ - Verify source map is valid (check `.map` file exists and is valid JSON)
195
+ - Check `sourcesContent` is present in source map
196
+ - Try rebuilding with fresh source maps
197
+
198
+ ## Server Management Issues
199
+
200
+ ### Server won't start
201
+
202
+ **Problem:** `server({ action: 'start' })` fails
203
+
204
+ **Solutions:**
205
+ - Check working directory exists and is correct
206
+ - Verify the command works when run manually
207
+ - Check for port conflicts: `lsof -i :<port>`
208
+ - Check server logs: `server({ action: 'logs', serverId: '...' })`
209
+
210
+ ### Docker server not detected
211
+
212
+ **Problem:** Docker container starts but port not detected
213
+
214
+ **Solutions:**
215
+ - Ensure port mapping is in the command: `-p 3000:3000`
216
+ - Runner may need explicit type: `runner: 'docker'`
217
+ - Check Docker is running: `docker ps`
218
+
219
+ ### Port monitoring blocks all tools
220
+
221
+ **Problem:** Monitoring level is `block` and port went down
222
+
223
+ **Solutions:**
224
+ - Acknowledge the failure: `server({ action: 'acknowledgePort', port: <port> })`
225
+ - Check server status: `server({ action: 'list' })`
226
+ - Restart the server: `server({ action: 'restart', serverId: '...' })`
227
+
228
+ ### Server logs not updating
229
+
230
+ **Solutions:**
231
+ - Logs are fetched incrementally (delta since last view)
232
+ - Use `lines: 100` to fetch all recent logs
233
+ - Clear logs: `server({ action: 'clearLogs', serverId: '...' })`
234
+
235
+ ## General Tips
236
+
237
+ ### Enable debug logging
238
+
239
+ ```javascript
240
+ setDebugLogging({ enabled: true })
241
+ // Check logs at: .cdp-tools/logs/debug.log
242
+ ```
243
+
244
+ ### Check connection status
245
+
246
+ ```javascript
247
+ // List all connections
248
+ listConnections()
249
+
250
+ // Check specific connection
251
+ getDebuggerStatus({ reference: 'my-session' })
252
+ ```
253
+
254
+ ### Check Chrome status
255
+
256
+ ```javascript
257
+ getChromeStatus()
258
+ // Shows running instances, ports, and recent close events
259
+ ```
260
+
261
+ ### Reset everything
262
+
263
+ ```javascript
264
+ // Kill all Chrome instances
265
+ killChrome({ reason: "full reset" })
266
+
267
+ // Reset launcher state
268
+ resetChromeLauncher({ reason: "stuck" })
269
+
270
+ // Start fresh
271
+ launchChrome({ reference: 'fresh start' })
272
+ ```
@@ -0,0 +1,5 @@
1
+ # Notes about working with LLM's.
2
+
3
+ - LLM's are optimistic about their work. I expect to be ignored when not explicit.
4
+ - MCP tools are not directly accessible, so changes are made either by the optimistic LLM, sometimes incorrectly or we need a way to edit the config
5
+ - Always provide a backdoor into the config that will override LLM's. That way we can force the desired behavior when needed.
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "devharness",
3
+ "version": "0.8.0",
4
+ "description": "MCP server that connects AI assistants to Chrome DevTools Protocol for runtime debugging - set breakpoints, inspect variables, monitor network traffic, and automate browser interactions",
5
+ "type": "module",
6
+ "main": "build/index.js",
7
+ "bin": {
8
+ "devharness": "build/mcp-supervisor.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc && npm run build:dashboard",
12
+ "postbuild": "node scripts/signal-supervisor.mjs",
13
+ "build:dashboard": "node scripts/build-dashboard.mjs",
14
+ "build:verify": "npm run build && node scripts/verify-mcp.js && node scripts/measure-startup.mjs",
15
+ "dev": "tsc --watch",
16
+ "start": "node build/index.js",
17
+ "startup:measure": "node scripts/measure-startup.mjs",
18
+ "startup:measure:verbose": "node scripts/measure-startup.mjs --verbose",
19
+ "test": "vitest",
20
+ "test:ui": "vitest --ui",
21
+ "test:run": "vitest run",
22
+ "test:coverage": "vitest run --coverage",
23
+ "stress:suspend": "node scripts/stress-suspend.mjs",
24
+ "prepublishOnly": "npm run test:run && npm run build:verify",
25
+ "version": "node scripts/sync-skill-version.mjs",
26
+ "postversion": "git push && git push --tags"
27
+ },
28
+ "keywords": [
29
+ "mcp",
30
+ "model-context-protocol",
31
+ "chrome-devtools-protocol",
32
+ "cdp",
33
+ "debugging",
34
+ "debugger",
35
+ "llm",
36
+ "ai",
37
+ "breakpoints",
38
+ "browser-automation",
39
+ "chrome",
40
+ "node-debugging",
41
+ "typescript"
42
+ ],
43
+ "author": "CDP Tools MCP Contributors",
44
+ "license": "MIT",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/InDate/devharness.git"
48
+ },
49
+ "bugs": {
50
+ "url": "https://github.com/InDate/devharness/issues"
51
+ },
52
+ "homepage": "https://github.com/InDate/devharness#readme",
53
+ "engines": {
54
+ "node": ">=18.0.0"
55
+ },
56
+ "files": [
57
+ "build/",
58
+ "docs/",
59
+ "skills/",
60
+ "README.md",
61
+ "LICENSE"
62
+ ],
63
+ "dependencies": {
64
+ "@modelcontextprotocol/sdk": "^1.0.4",
65
+ "chrome-remote-interface": "^0.33.2",
66
+ "fp-ts": "^2.16.11",
67
+ "io-ts": "^2.2.22",
68
+ "puppeteer-core": "^23.10.4",
69
+ "rxjs": "^7.8.2",
70
+ "source-map": "^0.7.4",
71
+ "ws": "^8.18.0",
72
+ "zod": "^3.23.8",
73
+ "zod-to-json-schema": "^3.23.0"
74
+ },
75
+ "devDependencies": {
76
+ "@types/chrome-remote-interface": "^0.31.14",
77
+ "@types/node": "^22.10.2",
78
+ "@types/ws": "^8.5.13",
79
+ "@vitest/coverage-v8": "^3.2.7",
80
+ "@vitest/ui": "^3.2.4",
81
+ "esbuild": "^0.24.2",
82
+ "happy-dom": "^20.0.10",
83
+ "preact": "^10.25.4",
84
+ "typescript": "^5.7.2",
85
+ "vitest": "^3.2.4"
86
+ }
87
+ }
@@ -0,0 +1,195 @@
1
+ ---
2
+ name: devharness
3
+ description: Drive and debug a running app via the devharness MCP server - launch or attach to Chrome and Node.js, set breakpoints and logpoints, inspect call stacks and variables, watch console and network, manage dev servers, replay any earlier tool call by its history index, and record reproduction sequences that verify a fix. Use whenever a task involves running or debugging a live app, reproducing or verifying a bug, re-driving setup you already did (relaunching, re-logging in, refilling a form), or the user mentions breakpoints, Chrome DevTools, CDP, replay sequences, or devharness tools (launchChrome, navigate, breakpoint, inspect, replay, server, issues, etc.).
4
+ compatibility: Requires the devharness MCP server to be connected (tools such as launchChrome, breakpoint, inspect, replay, server, issues). Previously published as cdp-tools-mcp.
5
+ version: 0.8.0
6
+ ---
7
+
8
+ # devharness
9
+
10
+ Chrome DevTools Protocol debugging for JavaScript/TypeScript in Chrome, Node.js, or CDP-compatible environments.
11
+
12
+ ## Quick Start
13
+
14
+ **Web apps (most common):**
15
+ ```
16
+ 1. launchChrome({ reference: "your-descriptive-name" }) # Auto-connects, ready immediately
17
+ 2. navigate({ action: 'goto', connectionReason: "your-descriptive-name", url: "..." })
18
+ # Navigation automatically caches interactive elements (links, buttons, inputs) for the page
19
+ 3. content({ action: 'findInteractive', connectionReason: "your-descriptive-name" })
20
+ # Shows summary of all interactive elements. Use search/types to filter
21
+ 4. content({ action: 'extractText', mode: 'outline' }) # Read page content (preferred over screenshot)
22
+ 5. Use other tools as needed with connectionReason parameter
23
+ ```
24
+
25
+ **Alternative (rename later):**
26
+ ```
27
+ 1. launchChrome() # Uses default "unnamed-connection-default"
28
+ 2. tab({ action: 'rename', reference: "unnamed-connection-default", newReference: "your-name" })
29
+ 3. Use other tools with connectionReason: "your-name"
30
+ ```
31
+
32
+ **Node.js debugging:**
33
+ ```
34
+ 1. Start app: node --inspect=9229 app.js
35
+ 2. connectDebugger({ reference: "my-app-debug", port: 9229 })
36
+ 3. breakpoint({ action: 'set', connectionReason: "my-app-debug", ... })
37
+ ```
38
+
39
+ ## Basic Workflow
40
+
41
+ 1. **Connect**:
42
+ - `launchChrome({ reference: "name" })` - Launches AND auto-connects (ready immediately, don't call connectDebugger)
43
+ - `connectDebugger({ reference: "name" })` - Only for existing Node.js/remote debuggers
44
+ 2. **Navigate & interact**: Use connectionReason in all tool calls
45
+ - `navigate({ action: 'goto', connectionReason: "name", url: "..." })`
46
+ - `input({ action: 'click', connectionReason: "name", selector: "..." })`
47
+ 3. **Debug**: `breakpoint({ action: 'set', connectionReason: "name", ... })`
48
+ 4. **Inspect when paused**: `inspect({ action: 'getCallStack', ... })` → `inspect({ action: 'getVariables', ... })`
49
+ 5. **Monitor**: `console({ action: 'list', connectionReason: "name" })`, `network({ action: 'list', connectionReason: "name" })`
50
+
51
+ ## Key Practices
52
+
53
+ **Breakpoints:**
54
+ - Use conditional: `breakpoint({ action: 'set', condition: "userId === '123'" })`
55
+ - Prefer `breakpoint({ action: 'setLogpoint' })` for loops/high-frequency code
56
+ - Clean up with `breakpoint({ action: 'remove' })` or check `breakpoint({ action: 'list' })`
57
+
58
+ **DOM/Event/XHR Breakpoints (Chrome only):**
59
+ - `breakpoint({ action: 'setDOMBreakpoint' })`: Pause when element changes
60
+ - `subtree-modified`: Children added/removed
61
+ - `attribute-modified`: Attributes changed (class, style, etc.)
62
+ - `node-removed`: Element deleted from DOM
63
+ - `breakpoint({ action: 'setEventBreakpoint' })`: Pause when events fire (click, submit, input, keydown, etc.)
64
+ - `breakpoint({ action: 'setXHRBreakpoint' })`: Pause when XHR/Fetch URL contains pattern
65
+ - Example: `breakpoint({ action: 'setDOMBreakpoint', selector: '.todo-list', domBreakpointType: 'subtree-modified' })`
66
+ - Note: DOM breakpoints use nodeIds which are invalidated on page reload
67
+
68
+ **Code search:**
69
+ - `inspect({ action: 'searchCode' })`: Find patterns
70
+ - `inspect({ action: 'searchFunctions' })`: Locate definitions
71
+ - `getSourceCode`: View context
72
+
73
+ **Modal handling:**
74
+ - Use `handleModals: true` on `input({ action: 'click' | 'type' | 'hover' })`
75
+ - Strategies: `auto` (smart), `accept`, `reject`, `close`, `remove`
76
+ - Example: `input({ action: 'click', selector: '.btn', handleModals: true, dismissStrategy: 'auto' })`
77
+ - Limitation: English-only, no Shadow DOM/iframes
78
+
79
+ **Multiple connections:**
80
+ - `listConnections` → `switchConnection`
81
+ - Each connection = separate tab/process
82
+
83
+ **Re-running work you already did:**
84
+ - Every tool response carries its own history index in the footer:
85
+ `**Repeat:** replay({ action: 'repeat', indices: [58] })`. That is not only
86
+ for failures - it is on every call, all the time. (The `replay` tool's own
87
+ responses are the exception: replay calls are not recorded into history)
88
+ - `indices` takes a **list**, so a whole stretch of work replays in one call:
89
+ `replay({ action: 'repeat', indices: [58, 59, 60, 61] })` re-runs those four
90
+ steps in order
91
+ - Reach for this whenever you are about to redo something you already did -
92
+ a browser relaunch, re-logging in, retyping a form, getting back to the
93
+ screen where a bug appears. Re-issuing the calls by hand is slower, and
94
+ retyped arguments drift from what actually ran
95
+ - `replay({ action: 'history' })` lists the indices when they have scrolled
96
+ out of view
97
+ - Each repeated call replays against the connection it was recorded with, so a
98
+ batch spanning two browsers stays on both. Pass `connectionReason` on every
99
+ call while driving multiple browsers and this holds; drive one implicitly and
100
+ those calls have no connection to replay against
101
+ - If the stretch is worth keeping, turn it into a sequence:
102
+ `replay({ action: 'create', name: '...', indices: [58, 59, 60, 61] })`
103
+
104
+ ## Common Patterns
105
+
106
+ **Bug debugging:**
107
+ 1. `launchChrome` → `navigate({ action: 'goto' })`
108
+ 2. `inspect({ action: 'searchCode' | 'searchFunctions' })`
109
+ 3. `breakpoint({ action: 'set' | 'setLogpoint' })`
110
+ 4. Trigger bug
111
+ 5. `inspect({ action: 'getCallStack' })` + `inspect({ action: 'getVariables' })`
112
+ 6. `inspect({ action: 'evaluateExpression' })`
113
+
114
+ **Performance:**
115
+ 1. `network({ action: 'enable' })`
116
+ 2. `navigate({ action: 'goto' })`
117
+ 3. `network({ action: 'search' })` (find slow)
118
+ 4. `network({ action: 'get' })` (timing)
119
+ 5. `breakpoint({ action: 'setLogpoint' })` in slow paths
120
+
121
+ **Frontend state:**
122
+ 1. `dom({ action: 'querySelector' })` + `dom({ action: 'getProperties' })`
123
+ 2. `storage({ action: 'getLocalStorage' })` + `storage({ action: 'getCookies' })`
124
+ 3. `inspect({ action: 'evaluateExpression' })`
125
+ 4. `dom({ action: 'snapshot' })`
126
+
127
+ **UI verification:**
128
+ 1. `content({ action: 'verify' })` - Run all default checks
129
+ 2. Reports: dead buttons, small touch targets, overflow clipping, dead links, viewport issues
130
+ 3. Filter checks: `checks: ['handlers', 'touch']` for specific issues
131
+ 4. Available checks: `handlers`, `viewport`, `touch`, `overflow`, `clickability`, `links`, `scroll`
132
+
133
+ ## Important Notes
134
+
135
+ - **After `launchChrome()`**: You are ALREADY connected. Do NOT call `connectDebugger()`. Use the `reference` parameter when launching, or rename later with `tab({ action: 'rename' })`
136
+ - **Interactive elements cache**: Navigation (goto, reload, back, forward) automatically caches all interactive elements. Cache expires after 5 minutes. `findInteractive` shows a summary by default; use `search` or `types` parameters to filter elements
137
+ - **Logpoint limits**: Default 20 executions. Use `breakpoint({ action: 'resetCounter' })` or adjust `maxExecutions`
138
+ - **Expression failures**: Wrapped in try-catch, shows `[Error: message]`. Search: `console({ action: 'search', pattern: "Logpoint Error" })`
139
+ - **CDP line mapping**: May map to nearest valid line. Use `breakpoint({ action: 'validate' })` first
140
+ - **Source maps**: Auto-handled. Use `loadSourceMaps` for manual
141
+ - **File paths**: Full URLs (`http://localhost:3000/app.js`) or `file://`
142
+ - **Network monitoring**: Must enable with `network({ action: 'enable' })`
143
+ - **Working an issue**: `comment` on it as you go - once when you start (what you're about to change and why) and once when you finish (what you actually changed, files touched, tests added, and anything that contradicts the issue as written). The issue is the durable record; someone reviewing later reads the timeline, not your diff
144
+ - **Closing an issue**: `issues({ action: 'resolve' })` waits on a browser overlay only a human can click - don't call it unattended, use `issues({ action: 'comment' })` to record findings instead
145
+
146
+ ## Recovering from a failed tool call
147
+
148
+ Two different mechanisms fix two different failure points - don't confuse them.
149
+
150
+ **1. Missing/invalid parameters -> `continuationToken` (fix and resubmit, cheaply)**
151
+
152
+ If a call fails validation (`code: 'MISSING_PARAMETERS'` or `'INVALID_PARAMS'`), the error includes a `continuationToken` and a `missingParameters` list (name/type/description/enum). Don't resend the whole call - retry with just:
153
+ ```
154
+ { continuationToken: '<token>', <only the missing/bad field(s)> }
155
+ ```
156
+ The server merges this with what you already sent and re-validates. Repeat (same token) until it succeeds. The token expires after 5 minutes. This only applies to calls that never passed validation in the first place - it has nothing to do with guard blocks below.
157
+
158
+ **2. A validated call gets blocked by a guard (port failure, dead server, breakpoint pause, etc.) -> `replay`**
159
+
160
+ Once a call passes validation, devharness records it (even if a guard then blocks it before the handler runs) and every response footer includes a hint like:
161
+ ```
162
+ **Repeat:** `replay({ action: 'repeat', indices: [N] })`
163
+ ```
164
+ Acknowledge whatever blocked it (e.g. `server({ action: 'acknowledgePort' })`, `server({ action: 'acknowledgeStartup' })`), then use that `replay` hint to resume the exact same call - do not reconstruct the arguments by hand, and do not try to reuse a `continuationToken` for this case (that mechanism is for fixing bad input, not for retrying a call that was already valid).
165
+
166
+ Note this is only one use of `repeat`. The footer hint is on every response, not just blocked ones, and `indices` takes a list - see "Re-running work you already did" above.
167
+
168
+ ## Restarting devharness
169
+
170
+ If devharness itself seems stuck or broken (not the target app), restart it yourself rather than asking the user to reconnect - don't wait to be told to.
171
+
172
+ - **Preferred**: `config({ action: 'restart' })`. Under the hood this reads `.cdp-tools/mcp-supervisor.pid` and sends the running mcp-supervisor process a `SIGUSR2`, the same signal `npm run build`'s postbuild hook sends automatically after a rebuild. The supervisor replays the original MCP `initialize` handshake to the freshly spawned child, so the host session never needs to reconnect.
173
+ - If that returns `CONFIG_RESTART_NOT_SUPERVISED` (this server isn't running through the supervisor - e.g. a bare `node build/index.js`), fall back to Bash: `kill -USR2 $(cat .cdp-tools/mcp-supervisor.pid)`.
174
+ - If it returns `CONFIG_RESTART_STALE_PID`, the supervisor died without cleaning up its pidfile - ask the user to run `/mcp` to reconnect.
175
+
176
+ **Expect the triggering call itself to come back as an error - that's normal, not a failure.** In practice `config({ action: 'restart' })` almost never returns its own `CONFIG_RESTART_REQUESTED` success message: the old process gets torn down before it can flush that response, so the supervisor's restart-coordinator answers with a synthesized `MCP error -32000: MCP server is restarting; this request will not receive a response from the previous process. Please retry.` instead. Just retry the next call - it'll hit the freshly restarted (and by then ready) process. Two things to expect on that next call: it runs against a new PID (visible in tool response footers), and any acknowledged monitored-port failures (`server({ action: 'acknowledgePort' })`) reset and may need re-acknowledging, since that state lived in the process that just got replaced.
177
+
178
+ `config({ action: 'status' })` says which build is answering: the version, the entry file it loaded, that file's timestamp, and the server/supervisor pids. If you have just rebuilt devharness and the behaviour still looks old, check that timestamp before believing the code - a build signals the supervisor named in its own project's pidfile, which is not always the one serving this session.
179
+
180
+ Either way, a restart kills any Chrome instances this session launched (relaunch with `launchChrome`), but managed dev servers (`server` tool) survive and reattach automatically. `config({ action: 'reload' })` is different and lighter-weight - it hot-applies most `config.json` edits without a restart; a restart is only needed for `tools.enabled`/`tools.disabled` changes (the tool list is frozen at server startup) or when the process itself is actually stuck.
181
+
182
+ ## Tool Categories
183
+
184
+ The full list of tools grouped by category (connection, tab, breakpoint, execution, inspection, source, console, network, page, DOM, content, screenshot, input, modal, storage, HTTP/assertions, issues, server, replay, dashboard, config) is not needed for most tasks. Load it only when you need to look up a specific tool name or action:
185
+
186
+ [references/tool-categories.md](references/tool-categories.md)
187
+
188
+ ## Replay Sequences
189
+
190
+ Recording or replaying a sequence - to build a repro, a regression test, or a
191
+ multi-device flow - has its own workflow: capturing values mid-run with
192
+ `saveAs`, per-step `connectionReason`, conditionals, and verifying an issue's
193
+ fix. Load it when the task involves sequences:
194
+
195
+ [references/sequences.md](references/sequences.md)