devharness 0.9.9 → 0.9.11

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 (69) hide show
  1. package/README.md +1 -1
  2. package/build/chrome-launcher.d.ts +53 -0
  3. package/build/chrome-launcher.d.ts.map +1 -1
  4. package/build/chrome-launcher.js +116 -7
  5. package/build/chrome-launcher.js.map +1 -1
  6. package/build/chrome-launcher.test.js +70 -1
  7. package/build/chrome-launcher.test.js.map +1 -1
  8. package/build/config.d.ts +1 -1
  9. package/build/config.js +1 -1
  10. package/build/config.test.js +2 -2
  11. package/build/config.test.js.map +1 -1
  12. package/build/dashboard/dashboard-hub.js +2 -2
  13. package/build/index.js +49 -4
  14. package/build/index.js.map +1 -1
  15. package/build/interaction-recorder.js +2 -2
  16. package/build/interaction-recorder.js.map +1 -1
  17. package/build/issue-tracker.test.js +1 -1
  18. package/build/issue-tracker.test.js.map +1 -1
  19. package/build/persistent-profiles.test.js +2 -2
  20. package/build/persistent-profiles.test.js.map +1 -1
  21. package/build/runners/docker-compose-runner.js +1 -1
  22. package/build/runners/docker-compose-runner.js.map +1 -1
  23. package/build/runners/docker-runner.js +1 -1
  24. package/build/runners/docker-runner.js.map +1 -1
  25. package/build/runners/types.d.ts +1 -1
  26. package/build/runners/types.d.ts.map +1 -1
  27. package/build/server-manager.d.ts +1 -1
  28. package/build/server-manager.js +3 -3
  29. package/build/server-manager.js.map +1 -1
  30. package/build/server-manager.test.d.ts +1 -1
  31. package/build/server-manager.test.js +1 -1
  32. package/build/server-ownership.test.js +2 -2
  33. package/build/server-ownership.test.js.map +1 -1
  34. package/build/supervisor/pidfile.test.js +1 -1
  35. package/build/supervisor/pidfile.test.js.map +1 -1
  36. package/build/tool-response.d.ts +8 -0
  37. package/build/tool-response.d.ts.map +1 -1
  38. package/build/tool-response.js.map +1 -1
  39. package/build/tools/config-tools.d.ts +1 -1
  40. package/build/tools/config-tools.js +4 -4
  41. package/build/tools/config-tools.js.map +1 -1
  42. package/build/tools/dashboard-tools.d.ts +1 -1
  43. package/build/tools/dashboard-tools.js +2 -2
  44. package/build/tools/dashboard-tools.js.map +1 -1
  45. package/build/tools/execution-tools.d.ts +3 -3
  46. package/build/tools/issues-abort-hygiene.test.js +1 -1
  47. package/build/tools/issues-abort-hygiene.test.js.map +1 -1
  48. package/build/tools/issues-tools.test.js +1 -1
  49. package/build/tools/issues-tools.test.js.map +1 -1
  50. package/build/tools/message-tools.d.ts.map +1 -1
  51. package/build/tools/message-tools.js +2 -1
  52. package/build/tools/message-tools.js.map +1 -1
  53. package/build/tools/replay-production-error-shape.test.js +9 -1
  54. package/build/tools/replay-production-error-shape.test.js.map +1 -1
  55. package/build/tools/replay-tools.js +3 -3
  56. package/build/tools/replay-tools.js.map +1 -1
  57. package/docs/README.md +2 -2
  58. package/docs/automation.md +1 -1
  59. package/docs/installation.md +4 -4
  60. package/docs/instructions.md +4 -4
  61. package/docs/message-system.md +1 -1
  62. package/docs/messages.md +51 -11
  63. package/docs/parser-plugins.md +1 -1
  64. package/docs/replay.md +1 -1
  65. package/docs/troubleshooting.md +3 -3
  66. package/package.json +1 -1
  67. package/plugin/skills/devharness/SKILL.md +1 -1
  68. package/plugin/skills/devharness/references/sequences.md +2 -2
  69. package/plugin/skills/devharness/references/tool-categories.md +3 -3
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- The cdp-tools debugger uses a centralized message system to provide consistent, markdown-formatted responses to all tool calls. This guide explains how to use the system and when to use different patterns.
5
+ The devharness debugger uses a centralized message system to provide consistent, markdown-formatted responses to all tool calls. This guide explains how to use the system and when to use different patterns.
6
6
 
7
7
  ## Architecture
8
8
 
package/docs/messages.md CHANGED
@@ -1,6 +1,6 @@
1
- # cdp-tools Message Templates
1
+ # devharness Message Templates
2
2
 
3
- This file contains all user-facing messages for the cdp-tools debugger. Messages use markdown formatting and support variable interpolation using `{{variable}}` syntax.
3
+ This file contains all user-facing messages for the devharness debugger. Messages use markdown formatting and support variable interpolation using `{{variable}}` syntax.
4
4
 
5
5
  ## Template Usage Status
6
6
 
@@ -45,7 +45,53 @@ These templates should not be removed - they represent potential error condition
45
45
  **Type:** error
46
46
  **Code:** CHROME_LAUNCH_TIMEOUT
47
47
 
48
- Chrome did not become ready on port {{port}} within {{timeout}}s.
48
+ Chrome spawned from `{{chromePath}}` and port {{port}} did not answer `/json/version` in {{probeAttempts}} probes over {{elapsedMs}}ms. No exit event was observed before the launch was abandoned.
49
+
50
+ {{#probeFailures}}**Each probe's failure, in order:**
51
+
52
+ ```
53
+ {{probeFailures}}
54
+ ```
55
+ {{/probeFailures}}
56
+ {{#stderrTail}}**Chrome stderr, last bytes:**
57
+
58
+ ```
59
+ {{stderrTail}}
60
+ ```
61
+ {{/stderrTail}}
62
+ {{#profileDir}}**Profile retained at:** `{{profileDir}}`{{/profileDir}}
63
+
64
+ ---
65
+
66
+ ## CHROME_LAUNCH_PROCESS_EXITED
67
+
68
+ **Type:** error
69
+ **Code:** CHROME_LAUNCH_PROCESS_EXITED
70
+
71
+ Chrome spawned from `{{chromePath}}` and the process ended before port {{port}} answered `/json/version`. Exit code {{exitCode}}, signal {{exitSignal}}, {{elapsedMs}}ms after spawn, across {{probeAttempts}} probes.
72
+
73
+ {{#probeFailures}}**Each probe's failure, in order:**
74
+
75
+ ```
76
+ {{probeFailures}}
77
+ ```
78
+ {{/probeFailures}}
79
+ {{#stderrTail}}**Chrome stderr, last bytes:**
80
+
81
+ ```
82
+ {{stderrTail}}
83
+ ```
84
+ {{/stderrTail}}
85
+ {{#profileDir}}**Profile retained at:** `{{profileDir}}`{{/profileDir}}
86
+
87
+ ---
88
+
89
+ ## CHROME_BINARY_ABSENT
90
+
91
+ **Type:** error
92
+ **Code:** CHROME_BINARY_ABSENT
93
+
94
+ No file exists at `{{chromePath}}`, the path resolved for platform `{{platform}}`. No process was spawned.
49
95
 
50
96
  ---
51
97
 
@@ -1220,12 +1266,6 @@ Unsupported platform: {{platform}}
1220
1266
 
1221
1267
  Failed to spawn Chrome process: {{error}}
1222
1268
 
1223
- **Suggestions:**
1224
- - Verify Chrome is installed on your system
1225
- - Check that you have permission to execute Chrome
1226
- - On macOS: Chrome should be at `/Applications/Google Chrome.app`
1227
- - On Linux: Chrome/Chromium should be in your PATH
1228
-
1229
1269
  ---
1230
1270
 
1231
1271
  ## PUPPETEER_NOT_CONNECTED
@@ -3631,7 +3671,7 @@ Note: `tools.enabled`/`tools.disabled` changes still require an MCP server resta
3631
3671
  **Type:** success
3632
3672
  **Summary:** Restart requested
3633
3673
 
3634
- Sent a restart signal to the cdp-tools supervisor (PID {{pid}}). The server restarts shortly - no reconnect needed.
3674
+ Sent a restart signal to the devharness supervisor (PID {{pid}}). The server restarts shortly - no reconnect needed.
3635
3675
 
3636
3676
  Note: any Chrome instances this session launched will be killed (call `launchChrome` again). Managed dev servers (the `server` tool) survive and reattach automatically.
3637
3677
 
@@ -3890,7 +3930,7 @@ This session is `{{self}}`. Its mailbox: `{{mailboxPath}}`
3890
3930
 
3891
3931
  {{sessionList}}
3892
3932
 
3893
- **Note:** To receive a message while doing other work, arm a Monitor on this session's mailbox file - it appends one JSON line per message, so a `tail -f` style watch fires the moment one lands. Without a Monitor, messages surface only when `message({ action: 'read' })` runs.
3933
+ **Note:** An arriving message announces itself on this session's event stream, `{{eventStreamPath}}`, which is also where guard blocks land - one watch covers both. The plugin's SessionStart hook prints that path and the `Monitor` call at the start of every session. Without a watch, messages surface only when `message({ action: 'read' })` runs. Nothing watches the mailbox file; it holds the conversation and the read cursor.
3894
3934
 
3895
3935
  ---
3896
3936
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  `content({ action: 'parse' })` runs small, user-written parser plugins against
4
4
  the current page and returns their JSON output. Plugins are **not** shipped with
5
- cdp-tools — you write the ones you need.
5
+ devharness — you write the ones you need.
6
6
 
7
7
  ## Usage
8
8
 
package/docs/replay.md CHANGED
@@ -1183,7 +1183,7 @@ rendered in their own section — never merged into `results` or the
1183
1183
  successful/failed counts. A broken cleanup must not turn a passing run red, nor
1184
1184
  make a failing one look like it failed somewhere it did not.
1185
1185
 
1186
- Teardown is best-effort by construction: a killed cdp-tools process takes any
1186
+ Teardown is best-effort by construction: a killed devharness process takes any
1187
1187
  pending teardown with it. It reduces accumulation; it cannot guarantee a clean
1188
1188
  world, so assertions that depend on absence remain order-dependent regardless.
1189
1189
 
@@ -8,7 +8,7 @@
8
8
  dev server has stopped - but the MCP connection still works.
9
9
 
10
10
  **Cause:** The session was suspended. With no request from the client for
11
- `session.idleSuspendMinutes` (default 120), cdp-tools releases what it holds
11
+ `session.idleSuspendMinutes` (default 120), devharness releases what it holds
12
12
  and exits; the supervisor stays connected and started a fresh server for your
13
13
  next call.
14
14
 
@@ -24,7 +24,7 @@ released when no other live session claims it or is working in its directory.
24
24
 
25
25
  ### A dev server stopped when I opened a new session
26
26
 
27
- **Problem:** Starting cdp-tools in a project stopped a dev server that was
27
+ **Problem:** Starting devharness in a project stopped a dev server that was
28
28
  already running.
29
29
 
30
30
  **Cause:** Every session that had claimed it was gone, so it was collected as
@@ -34,7 +34,7 @@ running until you reboot.
34
34
  **Solutions:**
35
35
  - Restart it (`server({ action: 'start', serverId: '...' })`).
36
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
37
+ the `server` tool; devharness only collects servers it manages, and only ones
38
38
  it can prove nobody is left to use.
39
39
 
40
40
  ## Chrome Connection Issues
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devharness",
3
- "version": "0.9.9",
3
+ "version": "0.9.11",
4
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
5
  "type": "module",
6
6
  "main": "build/index.js",
@@ -2,7 +2,7 @@
2
2
  name: devharness
3
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
4
  compatibility: Requires the devharness MCP server to be connected (tools such as launchChrome, breakpoint, inspect, replay, server, issues). The shell commands need `devharness` on PATH (`npm i -g devharness`); without it use `npx -y devharness@<version> <command>`. Previously published as cdp-tools-mcp.
5
- version: 0.9.9
5
+ version: 0.9.11
6
6
  ---
7
7
 
8
8
  # devharness
@@ -1,6 +1,6 @@
1
1
  # Replay Sequences
2
2
 
3
- A sequence is an ordered list of tool calls you can re-run. It's how cdp-tools
3
+ A sequence is an ordered list of tool calls you can re-run. It's how devharness
4
4
  turns "I clicked around and hit the bug" into something repeatable - a
5
5
  regression test, a repro attached to an issue, or a multi-step automation.
6
6
 
@@ -590,7 +590,7 @@ A failing teardown step never changes the run's verdict; it is reported in its
590
590
  own section. Otherwise a broken cleanup would mask the failure it was cleaning up
591
591
  after.
592
592
 
593
- **Teardown is always best-effort.** A killed cdp-tools process takes any pending
593
+ **Teardown is always best-effort.** A killed devharness process takes any pending
594
594
  teardown with it, so it reduces accumulation and cannot guarantee a clean world.
595
595
  An assertion that depends on nothing being left over ("No assets yet") stays
596
596
  order-dependent whether or not teardown exists - mint your own fixture and assert
@@ -80,11 +80,11 @@ runs against (see the skill's Quick Start).
80
80
  **Messages**: `message` (actions: sessions, send, read, reply)
81
81
  - Text between two devharness sessions on this machine - a session hitting a devharness bug talking to the session working on devharness itself. `sessions` lists reachable mailboxes and this session's own mailbox path
82
82
  - `send({ to, text, waitForReplyMs })` holds the call open until something lands in this session's mailbox (max 300000ms) and returns it; without `waitForReplyMs` it returns as soon as the line is written. `reply({ replyTo, text })` routes back to the sender of that message. The wait returns on ANY arrival, not only a tagged reply, so two sessions blocking at the same moment both release
83
- - Transport is one append-only JSONL file per session under `~/.devharness/messages/`, which is what makes it work across project roots. A busy session needs a Monitor armed on its mailbox file to be interrupted; otherwise messages surface on its next `message({ action: 'read' })`
83
+ - The mailbox is one append-only JSONL file per session under `~/.devharness/messages/`, holding the conversation and the read cursor; the global directory is what makes it reach across project roots. Nothing watches it. An arrival announces itself on that session's event stream, `~/.devharness/events/<id>.jsonl`, so one watch covers messages and guard blocks alike; without one, messages surface on the next `message({ action: 'read' })`
84
84
 
85
85
  **Server**: `server` (actions: start, stop, restart, list, logs, stopAll, setAutoRun, clearLogs, remove, monitorPort, unmonitorPort, listMonitored, acknowledgePort, acknowledgeStartup, extendStartup, cancelPendingRestart)
86
86
  - Use `global: true` to access servers started from a different working directory
87
- - `start({ watch: true, watchPaths?: [...] })`: cdp-tools watches the given paths (default: cwd) and auto-restarts the server on file changes, instead of relying on `--watch`/nodemon. Pause-aware: if a breakpoint debugger is paused on that server's inspector port, the restart queues instead of firing immediately - `cancelPendingRestart` discards a queued restart to keep debugging without it firing on resume
87
+ - `start({ watch: true, watchPaths?: [...] })`: devharness watches the given paths (default: cwd) and auto-restarts the server on file changes, instead of relying on `--watch`/nodemon. Pause-aware: if a breakpoint debugger is paused on that server's inspector port, the restart queues instead of firing immediately - `cancelPendingRestart` discards a queued restart to keep debugging without it firing on resume
88
88
 
89
89
  **Replay**: `replay` (actions: history, create, list, get, delete, export, load, listSaved, deleteSaved, run, runAll, step, finish, insert, addConditional, status, cancel, repeat, runFromLog, recordInteraction)
90
90
  - `recordInteraction`: record mouse, keyboard, and navigation events with a visual overlay
@@ -108,6 +108,6 @@ runs against (see the skill's Quick Start).
108
108
  - `show`: Display current configuration
109
109
  - `listTools`: List all toggleable tools with status and dependency conflicts
110
110
  - `reload`: Re-read config.json now (also happens automatically on file edits, ~250ms debounce). Doesn't apply `tools.enabled`/`tools.disabled` - those need `restart`
111
- - `restart`: Restart cdp-tools itself via the mcp-supervisor (see "Restarting cdp-tools" above) - use when the server seems stuck/broken, or to apply `tools.enabled`/`tools.disabled` changes
111
+ - `restart`: Restart devharness itself via the mcp-supervisor (see "Restarting devharness" above) - use when the server seems stuck/broken, or to apply `tools.enabled`/`tools.disabled` changes
112
112
  - `listProfiles`: List named persistent Chrome profiles and the root they live under
113
113
  - `resetProfile`: Wipe and recreate a named profile (`config({ action: 'resetProfile', profile: 'device-a' })`). Refused while a live Chrome holds that profile - nothing is deleted in that case