mcp-page-bridge-protocol 0.1.6 → 0.1.7

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.
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * browser-side client (extension). Keep this dependency-free so it can be
4
4
  * bundled into a service worker / content script as well as Node.
5
5
  */
6
- export declare const MCP_PAGE_BRIDGE_VERSION = "0.1.6";
6
+ export declare const MCP_PAGE_BRIDGE_VERSION = "0.1.7";
7
7
  /** WebSocket subprotocol negotiated between the browser client and the bridge. */
8
8
  export declare const WS_SUBPROTOCOL = "mcp";
9
9
  /** Default port the bridge listens on for browser WebSocket connections. */
@@ -47,7 +47,7 @@ export declare const SERVICE_ID: "mcp-page-bridge";
47
47
  * Must stay in sync with the tools registered in
48
48
  * packages/extension/src/builtins.ts.
49
49
  */
50
- export declare const BUILTIN_TOOL_NAMES: readonly ["eval", "dom_query", "get_page_info", "click", "set_value", "scroll", "wait_for", "get_html", "get_selected_element", "get_selected_elements", "get_computed_style", "highlight_element", "show_selected_marker", "hide_selected_marker", "clear_selected_elements", "remove_selected_element", "update_selected_element", "apply_css", "list_css_patches", "remove_css_patch", "clear_css_patches", "export_css_patches", "export_design_changes", "accessibility_audit", "responsive_summary", "debug_summary", "console_logs", "capture_design_baseline", "compare_design_baseline", "clear_design_baseline", "screenshot", "navigate", "reload"];
50
+ export declare const BUILTIN_TOOL_NAMES: readonly ["eval", "dom_query", "get_page_info", "click", "set_value", "scroll", "wait_for", "get_html", "get_selected_element", "get_selected_elements", "get_computed_style", "highlight_element", "show_selected_marker", "hide_selected_marker", "clear_selected_elements", "remove_selected_element", "update_selected_element", "apply_css", "list_css_patches", "remove_css_patch", "clear_css_patches", "export_css_patches", "export_design_changes", "accessibility_audit", "responsive_summary", "debug_summary", "console_logs", "capture_design_baseline", "compare_design_baseline", "clear_design_baseline", "screenshot", "navigate", "reload", "find_by_text", "find_by_role", "find_by_label", "find_by_test_id", "locator_snapshot", "locator_count", "smart_click", "hover", "double_click", "type_text", "press_key", "clear_value", "select_option", "check", "uncheck", "upload_file", "drag_and_drop", "start_network_capture", "stop_network_capture", "list_network_requests", "wait_for_response", "get_response_body", "clear_network_capture", "get_storage_state", "set_local_storage", "set_session_storage", "clear_storage", "list_cookies", "set_cookie", "delete_cookie", "set_dialog_behavior", "list_dialogs", "clear_dialogs", "list_frames", "frame_dom_query", "frame_click", "frame_set_value", "resize_window", "cdp_status", "cdp_attach", "cdp_detach", "cdp_send_command", "cdp_list_events", "cdp_clear_events", "cdp_get_response_body", "cdp_emulate_viewport", "cdp_clear_emulation", "cdp_dispatch_mouse", "cdp_dispatch_key", "cdp_evaluate", "cdp_capture_screenshot", "cdp_get_performance_metrics", "cdp_set_network_conditions", "cdp_set_user_agent", "cdp_set_geolocation"];
51
51
  /** Names of the opt-in "browser" provider tools (service-worker hosted, all-tabs). */
52
52
  export declare const BROWSER_TOOL_NAMES: readonly ["list_tabs", "open_tab", "activate_tab", "navigate_tab", "close_tab"];
53
53
  /** Direction of an internal channel message relative to the bridge. */
@@ -101,11 +101,17 @@ export interface ControlPayload {
101
101
  name?: string;
102
102
  group?: string;
103
103
  visible?: boolean;
104
+ /** On "activate": whether the lean core built-in tools are registered. Defaults to true. */
105
+ coreTools?: boolean;
104
106
  /**
105
107
  * On "activate": whether the opt-in design/selection built-in toolset should
106
108
  * be registered. Off by default to keep the built-in tool catalog (and the
107
109
  * agent's token cost) small.
108
110
  */
109
111
  designTools?: boolean;
112
+ /** On "activate": whether the opt-in Playwright-like automation tools are registered. */
113
+ automationTools?: boolean;
114
+ /** On "activate": whether optional Chrome DevTools Protocol tools are registered. */
115
+ cdpTools?: boolean;
110
116
  }
111
117
  export declare const MCP_PAGE_BRIDGE_MARK: "__mcpPageBridge";
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * browser-side client (extension). Keep this dependency-free so it can be
4
4
  * bundled into a service worker / content script as well as Node.
5
5
  */
6
- export const MCP_PAGE_BRIDGE_VERSION = "0.1.6";
6
+ export const MCP_PAGE_BRIDGE_VERSION = "0.1.7";
7
7
  /** WebSocket subprotocol negotiated between the browser client and the bridge. */
8
8
  export const WS_SUBPROTOCOL = "mcp";
9
9
  /** Default port the bridge listens on for browser WebSocket connections. */
@@ -91,6 +91,63 @@ export const BUILTIN_TOOL_NAMES = [
91
91
  "screenshot",
92
92
  "navigate",
93
93
  "reload",
94
+ // Automation (opt-in)
95
+ "find_by_text",
96
+ "find_by_role",
97
+ "find_by_label",
98
+ "find_by_test_id",
99
+ "locator_snapshot",
100
+ "locator_count",
101
+ "smart_click",
102
+ "hover",
103
+ "double_click",
104
+ "type_text",
105
+ "press_key",
106
+ "clear_value",
107
+ "select_option",
108
+ "check",
109
+ "uncheck",
110
+ "upload_file",
111
+ "drag_and_drop",
112
+ "start_network_capture",
113
+ "stop_network_capture",
114
+ "list_network_requests",
115
+ "wait_for_response",
116
+ "get_response_body",
117
+ "clear_network_capture",
118
+ "get_storage_state",
119
+ "set_local_storage",
120
+ "set_session_storage",
121
+ "clear_storage",
122
+ "list_cookies",
123
+ "set_cookie",
124
+ "delete_cookie",
125
+ "set_dialog_behavior",
126
+ "list_dialogs",
127
+ "clear_dialogs",
128
+ "list_frames",
129
+ "frame_dom_query",
130
+ "frame_click",
131
+ "frame_set_value",
132
+ "resize_window",
133
+ // Advanced CDP (opt-in, requires optional debugger permission)
134
+ "cdp_status",
135
+ "cdp_attach",
136
+ "cdp_detach",
137
+ "cdp_send_command",
138
+ "cdp_list_events",
139
+ "cdp_clear_events",
140
+ "cdp_get_response_body",
141
+ "cdp_emulate_viewport",
142
+ "cdp_clear_emulation",
143
+ "cdp_dispatch_mouse",
144
+ "cdp_dispatch_key",
145
+ "cdp_evaluate",
146
+ "cdp_capture_screenshot",
147
+ "cdp_get_performance_metrics",
148
+ "cdp_set_network_conditions",
149
+ "cdp_set_user_agent",
150
+ "cdp_set_geolocation",
94
151
  ];
95
152
  /** Names of the opt-in "browser" provider tools (service-worker hosted, all-tabs). */
96
153
  export const BROWSER_TOOL_NAMES = ["list_tabs", "open_tab", "activate_tab", "navigate_tab", "close_tab"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-page-bridge-protocol",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "description": "Shared constants/helpers for the mcp-page-bridge bridge and browser client",
6
6
  "license": "MIT",