@wp-playground/remote 3.1.62 → 3.1.63

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.
@@ -59,7 +59,7 @@ export interface WebClientMixin extends ProgressReceiver {
59
59
  * once with the current list when it subscribes. A navigation to a page
60
60
  * that registers no tools reports an empty list.
61
61
  */
62
- onWebMCPToolsChanged(fn: (tools: WebMCPToolDescriptor[]) => void): Promise<void>;
62
+ onWebMCPToolsChanged(fn: (tools: WebMCPToolDescriptor[]) => void): Promise<() => void>;
63
63
  /**
64
64
  * Runs one of those tools inside the WordPress document and returns its
65
65
  * JSON-serializable result.
@@ -18,7 +18,8 @@ export interface WebMCPToolDescriptor {
18
18
  };
19
19
  }
20
20
  export interface WebMCPFrameBridge {
21
- subscribe(listener: (tools: WebMCPToolDescriptor[]) => void): void;
21
+ subscribe(listener: (tools: WebMCPToolDescriptor[]) => void): () => void;
22
+ dispose(): void;
22
23
  /** Use a fresh call ID for each invocation; pending duplicates are rejected. */
23
24
  callTool(name: string, args: Record<string, unknown>, callId?: string): Promise<unknown>;
24
25
  cancelTool(callId: string): void;
@@ -32,4 +33,7 @@ export interface WebMCPFrameBridge {
32
33
  * full tool list and replaces the previous one, so a navigation that registers
33
34
  * no tools clears the list.
34
35
  */
35
- export declare function createWebMCPFrameBridge(wpFrame: HTMLIFrameElement): WebMCPFrameBridge;
36
+ export declare function createWebMCPFrameBridge(wpFrame: HTMLIFrameElement, options?: {
37
+ origin?: string;
38
+ relayMessages?: boolean;
39
+ }): WebMCPFrameBridge;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/remote",
3
- "version": "3.1.62",
3
+ "version": "3.1.63",
4
4
  "description": "WordPress Playground remote host",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,5 +25,5 @@
25
25
  "access": "public",
26
26
  "directory": "../../../dist/packages/playground/remote"
27
27
  },
28
- "gitHead": "8c52f103f3ce30668994c0e75c2c530b82097a5e"
28
+ "gitHead": "d9392e2c6a2eb8c5cd5c4d357c725572fac56c12"
29
29
  }