mcp-page-bridge-protocol 0.1.3 → 0.1.4
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 +8 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
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
|
+
export declare const MCP_PAGE_BRIDGE_VERSION = "0.1.4";
|
|
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. */
|
|
@@ -54,7 +54,7 @@ export interface ChannelMessage {
|
|
|
54
54
|
/**
|
|
55
55
|
* - kind "rpc": a JSON-RPC message object
|
|
56
56
|
* - kind "open": `{ url, title }` source metadata (for the popup)
|
|
57
|
-
* - kind "control": `{ action:
|
|
57
|
+
* - kind "control": `{ action: ControlAction, ... }`
|
|
58
58
|
* - kind "ext": up = `ExtCallPayload`, down = `ExtResultPayload`
|
|
59
59
|
*/
|
|
60
60
|
payload?: unknown;
|
|
@@ -71,10 +71,15 @@ export interface ExtResultPayload {
|
|
|
71
71
|
result?: unknown;
|
|
72
72
|
error?: string;
|
|
73
73
|
}
|
|
74
|
-
export type ControlAction = "hello" | "activate" | "deactivate";
|
|
74
|
+
export type ControlAction = "hello" | "activate" | "deactivate" | "startElementPicker" | "cancelElementPicker" | "clearSelectedElements" | "removeSelectedElement" | "setSelectedElementMeta" | "setSelectedMarkersVisible";
|
|
75
75
|
export interface ControlPayload {
|
|
76
76
|
action: ControlAction;
|
|
77
77
|
url?: string;
|
|
78
78
|
title?: string;
|
|
79
|
+
append?: boolean;
|
|
80
|
+
selectionId?: string;
|
|
81
|
+
name?: string;
|
|
82
|
+
group?: string;
|
|
83
|
+
visible?: boolean;
|
|
79
84
|
}
|
|
80
85
|
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
|
+
export const MCP_PAGE_BRIDGE_VERSION = "0.1.4";
|
|
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. */
|