Commit 9f13bbf
refactor(mcp): improve bridge mode initialization and test organization
- Improve error handling in base-tools.ts for bridge mode initialization
- Add specific detection for bridge mode URL requirement errors
- Provide friendly logging messages instead of generic failure messages
- Clarify that deferred initialization is expected behavior
- Improve comments in web-tools.ts
- Remove misleading "deferred until first tool use" comment
- Add clear explanations for bridge vs puppeteer mode behavior
- Clarify that bridge mode requires URL while puppeteer can auto-start
- Move tests from @midscene/mcp to @midscene/web-mcp
- Relocate utils and puppeteer tests to correct package location
- Update mcp package.json to remove obsolete test scripts
- All 22 tests passing in new location
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 42bf666 commit 9f13bbf
File tree
6 files changed
+17
-6
lines changed- packages
- mcp
- web-mcp
- src
- tests
6 files changed
+17
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | | - | |
| 39 | + | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | 63 | | |
| 64 | + | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
File renamed without changes.
0 commit comments