@buoy-gg/mcp 7.0.10 → 7.0.11

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.
@@ -215,14 +215,19 @@ var SyncClient = class {
215
215
  async getSnapshot(toolId, deviceId, opts = {}) {
216
216
  const target = this.resolveDevice(deviceId);
217
217
  const key = snapKey(target, toolId);
218
+ const wasWatching = this.watching.has(key);
218
219
  this.ensureWatching(toolId, target);
219
- const next = this.waitForSnapshot(key, opts.timeoutMs ?? DEFAULT_SNAPSHOT_TIMEOUT_MS);
220
- this.socket?.emit("request-devtool-state", { toolId, targetDeviceId: target });
221
- const payload = await next;
222
- if (payload !== void 0) return { deviceId: target, payload };
223
- const cached = this.snapshots.get(key);
224
- if (cached !== void 0) return { deviceId: target, payload: cached };
225
- throw new Error(`Timed out waiting for "${toolId}" state from ${target} (is the tool active?)`);
220
+ try {
221
+ const next = this.waitForSnapshot(key, opts.timeoutMs ?? DEFAULT_SNAPSHOT_TIMEOUT_MS);
222
+ this.socket?.emit("request-devtool-state", { toolId, targetDeviceId: target });
223
+ const payload = await next;
224
+ if (payload !== void 0) return { deviceId: target, payload };
225
+ const cached = this.snapshots.get(key);
226
+ if (cached !== void 0) return { deviceId: target, payload: cached };
227
+ throw new Error(`Timed out waiting for "${toolId}" state from ${target} (is the tool active?)`);
228
+ } finally {
229
+ if (!wasWatching) this.unwatch(toolId, target);
230
+ }
226
231
  }
227
232
  waitForSnapshot(key, timeoutMs) {
228
233
  return new Promise((resolve) => {
@@ -296,7 +301,7 @@ async function waitForBroker(url, attempts = 20) {
296
301
  var delay = (ms) => new Promise((r) => setTimeout(r, ms));
297
302
 
298
303
  // src/version.ts
299
- var VERSION = "7.0.10" ? "7.0.10" : "0.0.0-dev";
304
+ var VERSION = "7.0.11" ? "7.0.11" : "0.0.0-dev";
300
305
  var PACKAGE_NAME = "@buoy-gg/mcp";
301
306
 
302
307
  // src/update/checkForUpdate.ts
package/dist/cli.js CHANGED
@@ -243,14 +243,19 @@ var SyncClient = class {
243
243
  async getSnapshot(toolId, deviceId, opts = {}) {
244
244
  const target = this.resolveDevice(deviceId);
245
245
  const key = snapKey(target, toolId);
246
+ const wasWatching = this.watching.has(key);
246
247
  this.ensureWatching(toolId, target);
247
- const next = this.waitForSnapshot(key, opts.timeoutMs ?? DEFAULT_SNAPSHOT_TIMEOUT_MS);
248
- this.socket?.emit("request-devtool-state", { toolId, targetDeviceId: target });
249
- const payload = await next;
250
- if (payload !== void 0) return { deviceId: target, payload };
251
- const cached = this.snapshots.get(key);
252
- if (cached !== void 0) return { deviceId: target, payload: cached };
253
- throw new Error(`Timed out waiting for "${toolId}" state from ${target} (is the tool active?)`);
248
+ try {
249
+ const next = this.waitForSnapshot(key, opts.timeoutMs ?? DEFAULT_SNAPSHOT_TIMEOUT_MS);
250
+ this.socket?.emit("request-devtool-state", { toolId, targetDeviceId: target });
251
+ const payload = await next;
252
+ if (payload !== void 0) return { deviceId: target, payload };
253
+ const cached = this.snapshots.get(key);
254
+ if (cached !== void 0) return { deviceId: target, payload: cached };
255
+ throw new Error(`Timed out waiting for "${toolId}" state from ${target} (is the tool active?)`);
256
+ } finally {
257
+ if (!wasWatching) this.unwatch(toolId, target);
258
+ }
254
259
  }
255
260
  waitForSnapshot(key, timeoutMs) {
256
261
  return new Promise((resolve) => {
@@ -336,7 +341,7 @@ var import_node_os = __toESM(require("os"));
336
341
  var import_node_path = __toESM(require("path"));
337
342
 
338
343
  // src/version.ts
339
- var VERSION = "7.0.10" ? "7.0.10" : "0.0.0-dev";
344
+ var VERSION = "7.0.11" ? "7.0.11" : "0.0.0-dev";
340
345
  var PACKAGE_NAME = "@buoy-gg/mcp";
341
346
 
342
347
  // src/update/checkForUpdate.ts
package/dist/cli.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  SyncClient,
4
4
  createMcpServer,
5
5
  runInit
6
- } from "./chunk-XUAAPB25.mjs";
6
+ } from "./chunk-UWIDPLFB.mjs";
7
7
 
8
8
  // src/cli.ts
9
9
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/dist/index.js CHANGED
@@ -278,14 +278,19 @@ var SyncClient = class {
278
278
  async getSnapshot(toolId, deviceId, opts = {}) {
279
279
  const target = this.resolveDevice(deviceId);
280
280
  const key = snapKey(target, toolId);
281
+ const wasWatching = this.watching.has(key);
281
282
  this.ensureWatching(toolId, target);
282
- const next = this.waitForSnapshot(key, opts.timeoutMs ?? DEFAULT_SNAPSHOT_TIMEOUT_MS);
283
- this.socket?.emit("request-devtool-state", { toolId, targetDeviceId: target });
284
- const payload = await next;
285
- if (payload !== void 0) return { deviceId: target, payload };
286
- const cached = this.snapshots.get(key);
287
- if (cached !== void 0) return { deviceId: target, payload: cached };
288
- throw new Error(`Timed out waiting for "${toolId}" state from ${target} (is the tool active?)`);
283
+ try {
284
+ const next = this.waitForSnapshot(key, opts.timeoutMs ?? DEFAULT_SNAPSHOT_TIMEOUT_MS);
285
+ this.socket?.emit("request-devtool-state", { toolId, targetDeviceId: target });
286
+ const payload = await next;
287
+ if (payload !== void 0) return { deviceId: target, payload };
288
+ const cached = this.snapshots.get(key);
289
+ if (cached !== void 0) return { deviceId: target, payload: cached };
290
+ throw new Error(`Timed out waiting for "${toolId}" state from ${target} (is the tool active?)`);
291
+ } finally {
292
+ if (!wasWatching) this.unwatch(toolId, target);
293
+ }
289
294
  }
290
295
  waitForSnapshot(key, timeoutMs) {
291
296
  return new Promise((resolve) => {
@@ -371,7 +376,7 @@ var import_node_os = __toESM(require("os"));
371
376
  var import_node_path = __toESM(require("path"));
372
377
 
373
378
  // src/version.ts
374
- var VERSION = "7.0.10" ? "7.0.10" : "0.0.0-dev";
379
+ var VERSION = "7.0.11" ? "7.0.11" : "0.0.0-dev";
375
380
  var PACKAGE_NAME = "@buoy-gg/mcp";
376
381
 
377
382
  // src/update/checkForUpdate.ts
package/dist/index.mjs CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  registerStorageTools,
28
28
  registerZustandTools,
29
29
  runInit
30
- } from "./chunk-XUAAPB25.mjs";
30
+ } from "./chunk-UWIDPLFB.mjs";
31
31
  export {
32
32
  ALL_DEVICES,
33
33
  BROKER_PORT,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@buoy-gg/mcp",
3
3
  "mcpName": "io.github.buoy-gg/mcp",
4
- "version": "7.0.10",
4
+ "version": "7.0.11",
5
5
  "description": "MCP server for Buoy devtools — lets any LLM copilot drive Buoy tools (perf-monitor benchmarks, etc.) over the devtool sync protocol",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
@@ -31,7 +31,7 @@
31
31
  "@modelcontextprotocol/sdk": "^1.29.0",
32
32
  "socket.io-client": "^4.8.1",
33
33
  "zod": "^3.25.0",
34
- "@buoy-gg/sync-broker": "^7.0.10"
34
+ "@buoy-gg/sync-broker": "^7.0.11"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^22.0.0",