@player-devtools/mcp 0.14.3--canary.24.1132 → 0.14.3--canary.24.1158

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/README.md CHANGED
@@ -104,9 +104,10 @@ await server.start();
104
104
  | `autoEnablePlugin` | `false` | Automatically call `enablePlugin()` for every client that connects (see [Plugin activation](#plugin-activation) below). |
105
105
 
106
106
  The CLI (`player-devtools-mcp` / `bin/run`) reads `open`/`url` from
107
- `PLAYER_DEVTOOLS_FLIPPER_OPEN` / `PLAYER_DEVTOOLS_FLIPPER_URL`, and always
108
- installs the plugin and enables it for connected/connecting clients on
109
- startup (see below) — no manual Flipper UI interaction is required.
107
+ `PLAYER_DEVTOOLS_FLIPPER_OPEN` / `PLAYER_DEVTOOLS_FLIPPER_URL`, and sets
108
+ `autoEnablePlugin: true` so every connecting client gets the plugin installed
109
+ (if needed) and activated automatically (see below) — no manual Flipper UI
110
+ interaction is required.
110
111
 
111
112
  ### Plugin installation
112
113
 
@@ -126,6 +127,13 @@ await transport.connect();
126
127
  await transport.ensurePluginInstalled();
127
128
  ```
128
129
 
130
+ `enablePlugin()` (below) already calls this internally before every
131
+ activation — the plugin can be installed or removed on the attached
132
+ flipper-server independently of this transport (e.g. a human using the
133
+ desktop UI concurrently), so there's no "already installed" snapshot that
134
+ stays trustworthy across calls. Call `ensurePluginInstalled()` directly only
135
+ if you need the installed version without also activating a client.
136
+
129
137
  ### Plugin activation
130
138
 
131
139
  Flipper only opens a live connection for a plugin (and starts relaying its
@@ -136,8 +144,8 @@ applies to `flipper-plugin-player-ui-devtools` or to a headless MCP session,
136
144
  so `FlipperServerTransport` exposes the handshake directly:
137
145
 
138
146
  ```ts
139
- await transport.enablePlugin(); // activate for every connected client
140
- await transport.enablePlugin(id); // or just one
147
+ await transport.enablePlugin(); // activate every connected client not already active
148
+ await transport.enablePlugin(id); // or just one, regardless of its active state
141
149
  await transport.disablePlugin(id); // release it again, without disconnecting
142
150
  ```
143
151
 
package/bin/run CHANGED
@@ -1,9 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { MCPServer } = require("@player-devtools/mcp");
4
- const {
5
- FlipperServerTransport,
6
- } = require("@player-devtools/client-flipper");
4
+ const { FlipperServerTransport } = require("@player-devtools/client-flipper");
7
5
 
8
6
  // PLAYER_DEVTOOLS_FLIPPER_OPEN=true opens a browser/PWA UI once flipper-server
9
7
  // is up (off by default — an agent has no use for a browser tab).
@@ -22,21 +20,8 @@ const server = new MCPServer(transport);
22
20
 
23
21
  server
24
22
  .start()
25
- .then(async () => {
26
- try {
27
- await transport.ensurePluginInstalled();
28
- // Catch up any client that connected before this resolved — going
29
- // forward, autoEnablePlugin covers newly-connecting clients.
30
- await transport.enablePlugin();
31
- } catch (err) {
32
- console.warn(
33
- "[bin/run] Failed to install/activate the devtools plugin:",
34
- err,
35
- );
36
- }
37
- })
38
23
  .catch((err) => {
39
- console.error("Failed to start MCP server:", err);
24
+ console.error("[@player-devtools/mcp] Failed to start MCP server:", err);
40
25
  process.exit(1);
41
26
  });
42
27
 
@@ -396,7 +396,7 @@ function allowlistEventProperties(event) {
396
396
  }
397
397
 
398
398
  // ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/mcp/src/telemetry/index.ts
399
- var MCP_VERSION = true ? "0.14.3--canary.24.1132" : "unstamped";
399
+ var MCP_VERSION = true ? "0.14.3--canary.24.1158" : "unstamped";
400
400
  function createAnalytics(server, deps) {
401
401
  try {
402
402
  const config = resolveTelemetryConfig();
@@ -362,7 +362,7 @@ function allowlistEventProperties(event) {
362
362
  }
363
363
 
364
364
  // ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/mcp/src/telemetry/index.ts
365
- var MCP_VERSION = true ? "0.14.3--canary.24.1132" : "unstamped";
365
+ var MCP_VERSION = true ? "0.14.3--canary.24.1158" : "unstamped";
366
366
  function createAnalytics(server, deps) {
367
367
  try {
368
368
  const config = resolveTelemetryConfig();
package/dist/index.mjs CHANGED
@@ -362,7 +362,7 @@ function allowlistEventProperties(event) {
362
362
  }
363
363
 
364
364
  // ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/mcp/src/telemetry/index.ts
365
- var MCP_VERSION = true ? "0.14.3--canary.24.1132" : "unstamped";
365
+ var MCP_VERSION = true ? "0.14.3--canary.24.1158" : "unstamped";
366
366
  function createAnalytics(server, deps) {
367
367
  try {
368
368
  const config = resolveTelemetryConfig();
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "bin"
6
6
  ],
7
7
  "name": "@player-devtools/mcp",
8
- "version": "0.14.3--canary.24.1132",
8
+ "version": "0.14.3--canary.24.1158",
9
9
  "main": "dist/cjs/index.cjs",
10
10
  "bin": {
11
11
  "player-devtools-mcp": "bin/run"
@@ -14,10 +14,10 @@
14
14
  "node": "^20.20.0 || >=22.22.0"
15
15
  },
16
16
  "dependencies": {
17
- "@player-devtools/client": "0.14.3--canary.24.1132",
18
- "@player-devtools/client-flipper": "0.14.3--canary.24.1132",
19
- "@player-devtools/messenger": "0.14.3--canary.24.1132",
20
- "@player-devtools/types": "0.14.3--canary.24.1132",
17
+ "@player-devtools/client": "0.14.3--canary.24.1158",
18
+ "@player-devtools/client-flipper": "0.14.3--canary.24.1158",
19
+ "@player-devtools/messenger": "0.14.3--canary.24.1158",
20
+ "@player-devtools/types": "0.14.3--canary.24.1158",
21
21
  "@modelcontextprotocol/sdk": "^1.0.0",
22
22
  "@posthog/mcp": "0.10.8",
23
23
  "@types/node": "^24.0.1",