devharness 0.9.5 → 0.9.6

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 (51) hide show
  1. package/build/command-recorder.d.ts +22 -0
  2. package/build/command-recorder.d.ts.map +1 -1
  3. package/build/command-recorder.js +51 -8
  4. package/build/command-recorder.js.map +1 -1
  5. package/build/github/issue-actions.js +5 -5
  6. package/build/github/issue-actions.js.map +1 -1
  7. package/build/index.js +3 -0
  8. package/build/index.js.map +1 -1
  9. package/build/tool-response.d.ts +8 -0
  10. package/build/tool-response.d.ts.map +1 -1
  11. package/build/tool-response.js.map +1 -1
  12. package/build/tools/assert-tools.d.ts +6 -6
  13. package/build/tools/breakpoint-tools.d.ts +3 -3
  14. package/build/tools/click-validation-console-noise.test.d.ts +2 -0
  15. package/build/tools/click-validation-console-noise.test.d.ts.map +1 -0
  16. package/build/tools/click-validation-console-noise.test.js +103 -0
  17. package/build/tools/click-validation-console-noise.test.js.map +1 -0
  18. package/build/tools/console-tools.d.ts +6 -6
  19. package/build/tools/console-tools.d.ts.map +1 -1
  20. package/build/tools/console-tools.js +1 -0
  21. package/build/tools/console-tools.js.map +1 -1
  22. package/build/tools/execution-tools.d.ts +3 -3
  23. package/build/tools/input-tools.d.ts +3 -3
  24. package/build/tools/inspection-tools.d.ts +15 -15
  25. package/build/tools/interpolation-reverse.d.ts +26 -0
  26. package/build/tools/interpolation-reverse.d.ts.map +1 -0
  27. package/build/tools/interpolation-reverse.js +130 -0
  28. package/build/tools/interpolation-reverse.js.map +1 -0
  29. package/build/tools/interpolation-reverse.test.d.ts +2 -0
  30. package/build/tools/interpolation-reverse.test.d.ts.map +1 -0
  31. package/build/tools/interpolation-reverse.test.js +76 -0
  32. package/build/tools/interpolation-reverse.test.js.map +1 -0
  33. package/build/tools/network-tools.d.ts +9 -9
  34. package/build/tools/replay-create-templatize.test.d.ts +2 -0
  35. package/build/tools/replay-create-templatize.test.d.ts.map +1 -0
  36. package/build/tools/replay-create-templatize.test.js +103 -0
  37. package/build/tools/replay-create-templatize.test.js.map +1 -0
  38. package/build/tools/replay-executor.d.ts +4 -0
  39. package/build/tools/replay-executor.d.ts.map +1 -1
  40. package/build/tools/replay-executor.js +39 -10
  41. package/build/tools/replay-executor.js.map +1 -1
  42. package/build/tools/replay-tools.d.ts +18 -18
  43. package/build/tools/replay-tools.d.ts.map +1 -1
  44. package/build/tools/replay-tools.js +6 -5
  45. package/build/tools/replay-tools.js.map +1 -1
  46. package/build/tools/request-tools.d.ts +1 -1
  47. package/build/tools/storage-tools.d.ts +6 -6
  48. package/docs/messages.md +188 -1
  49. package/package.json +1 -1
  50. package/plugin/skills/devharness/SKILL.md +1 -1
  51. package/plugin/skills/devharness/references/sequences.md +6 -1
package/docs/messages.md CHANGED
@@ -31,6 +31,33 @@ These templates should not be removed - they represent potential error condition
31
31
 
32
32
  ## Connection Messages
33
33
 
34
+ ## CHROME_NOT_RUNNING
35
+
36
+ **Type:** error
37
+ **Code:** CHROME_NOT_RUNNING
38
+
39
+ {{#message}}{{message}}{{/message}}{{^message}}Chrome is not running on port {{port}}. Use `launchChrome` to start a browser.{{/message}}
40
+
41
+ ---
42
+
43
+ ## CHROME_LAUNCH_TIMEOUT
44
+
45
+ **Type:** error
46
+ **Code:** CHROME_LAUNCH_TIMEOUT
47
+
48
+ Chrome did not become ready on port {{port}} within {{timeout}}s.
49
+
50
+ ---
51
+
52
+ ## CHROME_KILL_FAILED
53
+
54
+ **Type:** error
55
+ **Code:** CHROME_KILL_FAILED
56
+
57
+ Failed to kill Chrome: {{error}}
58
+
59
+ ---
60
+
34
61
  ## CHROME_ALREADY_RUNNING
35
62
 
36
63
  **Type:** error
@@ -1734,6 +1761,71 @@ Error: {{error}}
1734
1761
 
1735
1762
  ## Replay Messages
1736
1763
 
1764
+ ## CREATE_FAILED
1765
+
1766
+ **Type:** error
1767
+ **Code:** CREATE_FAILED
1768
+
1769
+ {{#message}}{{message}}{{/message}}{{^message}}Failed to create sequence.{{/message}}
1770
+
1771
+ ---
1772
+
1773
+ ## DELETE_FAILED
1774
+
1775
+ **Type:** error
1776
+ **Code:** DELETE_FAILED
1777
+
1778
+ {{#message}}{{message}}{{/message}}{{^message}}Failed to delete "{{filename}}".{{/message}}
1779
+
1780
+ ---
1781
+
1782
+ ## INVALID_LINES
1783
+
1784
+ **Type:** error
1785
+ **Code:** INVALID_LINES
1786
+
1787
+ {{#message}}{{message}}{{/message}}{{^message}}One or more requested lines could not be read from {{file}}.{{/message}}
1788
+
1789
+ ---
1790
+
1791
+ ## INVALID_START_FROM
1792
+
1793
+ **Type:** error
1794
+ **Code:** INVALID_START_FROM
1795
+
1796
+ {{#message}}{{message}}{{/message}}{{^message}}Invalid startFrom.{{/message}}
1797
+
1798
+ ---
1799
+
1800
+ ## LAUNCH_FAILED
1801
+
1802
+ **Type:** error
1803
+ **Code:** LAUNCH_FAILED
1804
+
1805
+ {{#message}}{{message}}{{/message}}{{^message}}Failed to launch a connection for this sequence.{{/message}}
1806
+
1807
+ {{#suggestion}}**Suggestion:** {{suggestion}}{{/suggestion}}
1808
+
1809
+ ---
1810
+
1811
+ ## NOT_SUPPORTED
1812
+
1813
+ **Type:** error
1814
+ **Code:** NOT_SUPPORTED
1815
+
1816
+ {{#message}}{{message}}{{/message}}{{^message}}This action is not supported in this context.{{/message}}
1817
+
1818
+ ---
1819
+
1820
+ ## RECORDING_FAILED
1821
+
1822
+ **Type:** error
1823
+ **Code:** RECORDING_FAILED
1824
+
1825
+ {{#message}}{{message}}{{/message}}{{^message}}Recording failed.{{/message}}
1826
+
1827
+ ---
1828
+
1737
1829
  ## INVALID_INDICES
1738
1830
 
1739
1831
  **Type:** error
@@ -2095,6 +2187,15 @@ No commands were recorded in this session.
2095
2187
 
2096
2188
  ---
2097
2189
 
2190
+ ## NO_ACTIVE_SEQUENCE
2191
+
2192
+ **Type:** error
2193
+ **Code:** NO_ACTIVE_SEQUENCE
2194
+
2195
+ {{#message}}{{message}}{{/message}}{{^message}}No active sequence. Use `replay({ action: 'run', stepTo: N })` first to pause one.{{/message}}
2196
+
2197
+ ---
2198
+
2098
2199
  ## SEQUENCE_NOT_FOUND
2099
2200
 
2100
2201
  **Type:** error
@@ -2266,6 +2367,15 @@ Use `issues({ action: 'acknowledge' })` to acknowledge.
2266
2367
 
2267
2368
  ## Issues Messages
2268
2369
 
2370
+ ## ISSUES_INVALID_START_URL
2371
+
2372
+ **Type:** error
2373
+ **Code:** ISSUES_INVALID_START_URL
2374
+
2375
+ {{#message}}{{message}}{{/message}}{{^message}}Invalid startUrl.{{/message}}
2376
+
2377
+ ---
2378
+
2269
2379
  ## ISSUES_LIST
2270
2380
 
2271
2381
  **Type:** success
@@ -2863,7 +2973,7 @@ Set `github.enabled` to `true` in the devharness config to use `publish`, `sync`
2863
2973
  Missing required parameter: {{missing}}
2864
2974
 
2865
2975
  **Action:** {{action}}
2866
- **Message:** {{message}}
2976
+ {{#message}}**Message:** {{message}}{{/message}}
2867
2977
 
2868
2978
  ---
2869
2979
 
@@ -3325,6 +3435,15 @@ If the server died, use `server({ action: 'restart', serverId: '{{serverId}}' })
3325
3435
 
3326
3436
  ## Config Messages
3327
3437
 
3438
+ ## UNKNOWN_ACTION
3439
+
3440
+ **Type:** error
3441
+ **Code:** UNKNOWN_ACTION
3442
+
3443
+ Unknown action: "{{action}}".
3444
+
3445
+ ---
3446
+
3328
3447
  ## CONFIG_PROFILE_LIST
3329
3448
 
3330
3449
  **Type:** list
@@ -3573,6 +3692,24 @@ Navigation failed: {{message}}
3573
3692
 
3574
3693
  ## Dashboard Messages
3575
3694
 
3695
+ ## DASHBOARD_INITIALIZING
3696
+
3697
+ **Type:** success
3698
+ **Code:** DASHBOARD_INITIALIZING
3699
+
3700
+ Dashboard is still starting up (pid {{pid}}, session {{shortId}}). Try again shortly.
3701
+
3702
+ ---
3703
+
3704
+ ## DASHBOARD_UNKNOWN_ACTION
3705
+
3706
+ **Type:** error
3707
+ **Code:** DASHBOARD_UNKNOWN_ACTION
3708
+
3709
+ Unknown dashboard action: "{{action}}".
3710
+
3711
+ ---
3712
+
3576
3713
  ## DASHBOARD_OPEN
3577
3714
 
3578
3715
  **Type:** success
@@ -3742,3 +3879,53 @@ Failed to switch to local config: {{error}}
3742
3879
 
3743
3880
  ---
3744
3881
 
3882
+ ## Common Tool Errors
3883
+
3884
+ Shared across multiple tools rather than owned by one - reused wherever the
3885
+ message fits as-is instead of each tool defining its own copy.
3886
+
3887
+ ## INVALID_PARAMS
3888
+
3889
+ **Type:** error
3890
+ **Code:** INVALID_PARAMS
3891
+
3892
+ {{#message}}{{message}}{{/message}}{{^message}}Invalid parameters.{{/message}}
3893
+
3894
+ ---
3895
+
3896
+ ## NOT_FOUND
3897
+
3898
+ **Type:** error
3899
+ **Code:** NOT_FOUND
3900
+
3901
+ {{#message}}{{message}}{{/message}}{{^message}}Not found.{{/message}}
3902
+
3903
+ ---
3904
+
3905
+ ## INVALID_PATTERN
3906
+
3907
+ **Type:** error
3908
+ **Code:** INVALID_PATTERN
3909
+
3910
+ {{#message}}{{message}}{{/message}}{{^message}}Invalid regex pattern.{{/message}}
3911
+
3912
+ ---
3913
+
3914
+ ## EXTRACTION_FAILED
3915
+
3916
+ **Type:** error
3917
+ **Code:** EXTRACTION_FAILED
3918
+
3919
+ Content extraction failed - no result was produced.
3920
+
3921
+ ---
3922
+
3923
+ ## SECTION_NOT_FOUND
3924
+
3925
+ **Type:** error
3926
+ **Code:** SECTION_NOT_FOUND
3927
+
3928
+ Section "{{section}}" was not found in the page content.
3929
+
3930
+ ---
3931
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devharness",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
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). Previously published as cdp-tools-mcp.
5
- version: 0.9.5
5
+ version: 0.9.6
6
6
  ---
7
7
 
8
8
  # devharness
@@ -55,7 +55,12 @@ slash command. They are here, once, rather than restated by each of those.
55
55
  Hand-edited JSON skips the validation the tools apply and does not port.
56
56
  The things that cannot be recorded have their own actions rather than being
57
57
  an exception to this: `addConditional` for a guarded branch, `declare` for
58
- the browsers and sockets a sequence needs.
58
+ the browsers and sockets a sequence needs. This covers a value you just
59
+ minted or looked up (a created link's URL, a row's id) too: `create` and
60
+ `insert` compare each step's literal against every earlier included step's
61
+ `saveAs` capture and rewrite an exact match to `{{var:name.path}}`
62
+ automatically - `saveAs` a step whose result you'll reuse and the later
63
+ literal gets templatized for you, no manual edit needed.
59
64
  - **Do the work with the tools; don't describe it.** Every call you make is
60
65
  recorded, and the sequence is assembled from that history afterwards.
61
66
  - **Pass `connectionReason` on every browser call** - including the connection