@buoy-gg/mcp 7.0.66 → 7.0.68

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/cli.mjs CHANGED
@@ -1,13 +1,16 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as d}from"module";const R=d(import.meta.url);import{runInit as m}from"./chunk-OCWGZASK.mjs";import{SyncClient as u,createMcpServer as w,stopAllHidStreamsNow as f,stopAllRecordingsNow as g}from"./chunk-EPYLVJ7F.mjs";import"./chunk-MHL43LJN.mjs";import"./chunk-VKWX4XAY.mjs";import"./chunk-Y7SNXKA2.mjs";import"./chunk-OPHPYPJD.mjs";import"./chunk-MTTWR4T7.mjs";import{StdioServerTransport as b}from"@modelcontextprotocol/sdk/server/stdio.js";console.log=(...e)=>console.error(...e);console.info=(...e)=>console.error(...e);console.debug=(...e)=>console.error(...e);async function v(){const e=process.env.BUOY_BROKER_PORT;const s=new u({url:process.env.BUOY_BROKER_URL,port:e?Number(e):void 0,autoSpawnBroker:process.env.BUOY_NO_SPAWN!=="1"});const r=w(s);const o=new b;let n=false;const c=t=>{if(n)return;n=true;process.stderr.write(`[buoy-mcp] shutting down (${t})
3
- `);g();f();setTimeout(()=>process.exit(0),2e3).unref();void(async()=>{await s.stop().catch(()=>{});await r.close().catch(()=>{});process.exit(0)})()};process.stdin.once("end",()=>c("stdin closed"));process.stdin.once("close",()=>c("stdin closed"));r.server.onclose=()=>c("transport closed");process.on("SIGINT",()=>c("SIGINT"));process.on("SIGTERM",()=>c("SIGTERM"));process.on("SIGHUP",()=>c("SIGHUP"));await r.connect(o);process.stderr.write(`[buoy-mcp] serving MCP over stdio; connecting to broker\u2026
4
- `);s.start().then(t=>process.stderr.write(`[buoy-mcp] broker ${t}
5
- `)).catch(t=>process.stderr.write(`[buoy-mcp] broker connection failed: ${t?.message??t} \u2014 tools will report no devices until it recovers
6
- `))}async function y(){const e=process.env.BUOY_BROKER_PORT;const s=new u({url:process.env.BUOY_BROKER_URL,port:e?Number(e):void 0,autoSpawnBroker:false});try{const r=await Promise.race([s.start().then(()=>true,()=>false),new Promise(o=>setTimeout(()=>o(false),4e3))]);if(!r)return false;for(let o=0;o<10;o++){if(s.connectedDevices().some(n=>n.tier==="pro"))return true;await new Promise(n=>setTimeout(n,300))}return false}finally{await Promise.race([s.stop().catch(()=>{}),new Promise(r=>setTimeout(r,2e3))])}}if(process.argv[2]==="web-bench"){void(async()=>{try{const e=process.argv.slice(3);const s=e.find(a=>!a.startsWith("--"));if(!s)throw new Error("usage: buoy-mcp web-bench <config.json> [--json]");const{readFileSync:r}=await import("fs");const{runWebBench:o,formatWebBenchMarkdown:n}=await import("./webBench-QCHYXYCA.mjs");const{readEntitlement:c}=await import("./camera-F5Q7WMHF.mjs");if(!c().isPro&&!await y()){throw new Error("web-bench is a Buoy Pro feature. Sign in to Buoy Desktop with a Pro account, or open an app signed in to Pro. See https://buoy.gg/pricing.")}const t=JSON.parse(r(s,"utf8"));const i=await o({...t,durationMs:t.durationMs??t.perCaseDurationMs},a=>process.stderr.write(`[web-bench] ${a}
7
- `));const p=i.status==="failed"||i.browserLeftRunning?1:0;const l=(e.includes("--json")?JSON.stringify(i,null,2):n(i))+"\n";setTimeout(()=>process.exit(p),5e3).unref();process.stdout.write(l,()=>process.exit(p))}catch(e){process.stderr.write(`[buoy-mcp] web-bench failed: ${e?.message??e}
8
- `,()=>process.exit(1));setTimeout(()=>process.exit(1),5e3).unref()}})()}else if(process.argv[2]==="flow"&&process.argv[3]==="run"){void(async()=>{try{const{parseFlowRunArgs:e,runFlows:s,formatFlowResults:r}=await import("./flowRun-OP4UJXKS.mjs");const o=e(process.argv.slice(4));const n=await s(o);const c=o.json?JSON.stringify(n,null,2):r(n);const t=n.every(i=>i.passed)?0:1;setTimeout(()=>process.exit(t),5e3).unref();process.stdout.write(`${c}
9
- `,()=>process.exit(t))}catch(e){process.stderr.write(`[buoy-mcp] flow run failed: ${e?.message??e}
10
- `,()=>process.exit(1));setTimeout(()=>process.exit(1),5e3).unref()}})()}else if(process.argv[2]==="farmd"){void import("./simFarm-EY4R3A4O.mjs").then(e=>e.runFarmd()).catch(e=>{process.stderr.write(`[buoy-mcp] farmd failed: ${e?.message??e}
11
- `);process.exit(1)})}else if(process.argv[2]==="init"){try{const e=process.argv.slice(3);let s="auto";if(e.includes("--local"))s="local";else if(e.includes("--npx"))s="npx";const r=e.indexOf("--registry");const o=r!==-1?e[r+1]:void 0;m({mode:s,registry:o});process.exit(0)}catch(e){process.stderr.write(`[buoy-mcp] init failed: ${e?.message??e}
12
- `);process.exit(1)}}else{v().catch(e=>{process.stderr.write(`[buoy-mcp] fatal: ${e?.message??e}
2
+ import{createRequire as R}from"module";const N=R(import.meta.url);import{runInit as S}from"./chunk-PDYZSHOS.mjs";import{SyncClient as b,createMcpServer as B,stopAllHidStreamsNow as O,stopAllRecordingsNow as T}from"./chunk-KXEKQVCL.mjs";import"./chunk-SPQBWBV6.mjs";import"./chunk-D4P6PPYP.mjs";import"./chunk-OUCB2Y5J.mjs";import"./chunk-FOMLVT7K.mjs";import"./chunk-OP23W722.mjs";import"./chunk-DVRR7W22.mjs";import"./chunk-MTTWR4T7.mjs";import{StdioServerTransport as k}from"@modelcontextprotocol/sdk/server/stdio.js";var P=console.log;console.log=(...e)=>console.error(...e);console.info=(...e)=>console.error(...e);console.debug=(...e)=>console.error(...e);async function $(){const e=process.env.BUOY_BROKER_PORT;const r=new b({url:process.env.BUOY_BROKER_URL,port:e?Number(e):void 0,autoSpawnBroker:process.env.BUOY_NO_SPAWN!=="1"});const t=B(r);const c=new k;let n=false;const o=s=>{if(n)return;n=true;process.stderr.write(`[buoy-mcp] shutting down (${s})
3
+ `);T();O();setTimeout(()=>process.exit(0),2e3).unref();void(async()=>{await r.stop().catch(()=>{});await t.close().catch(()=>{});process.exit(0)})()};process.stdin.once("end",()=>o("stdin closed"));process.stdin.once("close",()=>o("stdin closed"));t.server.onclose=()=>o("transport closed");process.on("SIGINT",()=>o("SIGINT"));process.on("SIGTERM",()=>o("SIGTERM"));process.on("SIGHUP",()=>o("SIGHUP"));await t.connect(c);process.stderr.write(`[buoy-mcp] serving MCP over stdio; connecting to broker\u2026
4
+ `);r.start().then(s=>process.stderr.write(`[buoy-mcp] broker ${s}
5
+ `)).catch(s=>process.stderr.write(`[buoy-mcp] broker connection failed: ${s?.message??s} \u2014 tools will report no devices until it recovers
6
+ `))}async function E(){const e=process.env.BUOY_BROKER_PORT;const r=new b({url:process.env.BUOY_BROKER_URL,port:e?Number(e):void 0,autoSpawnBroker:false});const{hasProAccess:t}=await import("./policy-D342AXEF.mjs");try{const c=await Promise.race([r.start().then(()=>true,()=>false),new Promise(o=>setTimeout(()=>o(false),4e3))]);if(!c)return{account:false,pro:false};let n=r.isAdmitted();for(let o=0;o<10;o++){const s=r.connectedDevices();if(s.some(i=>t(i)))return{account:true,pro:true};n||=s.some(i=>i.tier==="free");await new Promise(i=>setTimeout(i,300))}return{account:n,pro:false}}finally{await Promise.race([r.stop().catch(()=>{}),new Promise(c=>setTimeout(c,2e3))])}}if(process.argv[2]==="web-bench"){void(async()=>{try{const e=process.argv.slice(3);const r=e.find(a=>!a.startsWith("--"));if(!r)throw new Error("usage: buoy-mcp web-bench <config.json> [--json]");const{readFileSync:t}=await import("fs");const{runWebBench:c,formatWebBenchMarkdown:n}=await import("./webBench-BEMJWKB3.mjs");const{readEntitlement:o,entitlementHasPro:s}=await import("./camera-KL6KTSFE.mjs");const{freeWebBench:i,lockedLines:y,nothingLocked:h}=await import("./freeView-3LHV3RBG.mjs");const l=o();const d=s(l)?{account:true,pro:true}:await E();const m=s(l)||d.pro;if(!l.admitted&&!d.account){throw new Error("web-bench needs a Buoy account. A free one works. Sign in to Buoy Desktop, or run `npx buoy login` in the project.")}const p=JSON.parse(t(r,"utf8"));if(p.traceDir&&!m)throw new Error("traceDir (Chrome traces) needs Buoy Pro. See https://buoy.gg/pricing.");let w=h();const u=await c({...p,durationMs:p.durationMs??p.perCaseDurationMs,redact:m?void 0:a=>{const v=i(a);w=v.locked;return v.result}},a=>process.stderr.write(`[web-bench] ${a}
7
+ `));const f=y(w);if(f)process.stderr.write(`${f}
8
+ `);const g=u.status==="failed"||u.browserLeftRunning?1:0;const x=(e.includes("--json")?JSON.stringify(u,null,2):n(u))+"\n";setTimeout(()=>process.exit(g),5e3).unref();process.stdout.write(x,()=>process.exit(g))}catch(e){process.stderr.write(`[buoy-mcp] web-bench failed: ${e?.message??e}
9
+ `,()=>process.exit(1));setTimeout(()=>process.exit(1),5e3).unref()}})()}else if(process.argv[2]==="flow"&&process.argv[3]==="run"){void(async()=>{try{const{parseFlowRunArgs:e,runFlows:r,formatFlowResults:t}=await import("./flowRun-F3PQIRPB.mjs");const c=e(process.argv.slice(4));const n=await r(c);const o=c.json?JSON.stringify(n,null,2):t(n);const s=n.every(i=>i.passed)?0:1;setTimeout(()=>process.exit(s),5e3).unref();process.stdout.write(`${o}
10
+ `,()=>process.exit(s))}catch(e){process.stderr.write(`[buoy-mcp] flow run failed: ${e?.message??e}
11
+ `,()=>process.exit(1));setTimeout(()=>process.exit(1),5e3).unref()}})()}else if(process.argv[2]==="farm"){console.log=P;void import("./src-N7WTCDAL.mjs").then(e=>e.runFarmCommand(process.argv.slice(3),{prog:"npx @buoy-gg/mcp farm",entry:process.argv[1]})).catch(e=>{const r=e;process.stderr.write(`${r?.message??e}${r?.next?`
12
+ ${r.next}`:""}
13
+ `);process.exit(1)})}else if(process.argv[2]==="farmd"){void import("./simFarm-V7TBSSV2.mjs").then(e=>e.runFarmd()).catch(e=>{process.stderr.write(`[buoy-mcp] farmd failed: ${e?.message??e}
14
+ `);process.exit(1)})}else if(process.argv[2]==="init"){try{const e=process.argv.slice(3);let r="auto";if(e.includes("--local"))r="local";else if(e.includes("--npx"))r="npx";const t=e.indexOf("--registry");const c=t!==-1?e[t+1]:void 0;S({mode:r,registry:c});process.exit(0)}catch(e){process.stderr.write(`[buoy-mcp] init failed: ${e?.message??e}
15
+ `);process.exit(1)}}else{$().catch(e=>{process.stderr.write(`[buoy-mcp] fatal: ${e?.message??e}
13
16
  `);process.exit(1)})}
@@ -0,0 +1,2 @@
1
+ import{createRequire as v}from"module";const E=v(import.meta.url);import{SyncClient as y,createMcpServer as R}from"./chunk-KXEKQVCL.mjs";import"./chunk-SPQBWBV6.mjs";import"./chunk-D4P6PPYP.mjs";import"./chunk-OUCB2Y5J.mjs";import"./chunk-FOMLVT7K.mjs";import"./chunk-OP23W722.mjs";import"./chunk-DVRR7W22.mjs";import"./chunk-MTTWR4T7.mjs";import{promises as S}from"fs";import $ from"path";import{Client as _}from"@modelcontextprotocol/sdk/client/index.js";import{InMemoryTransport as B}from"@modelcontextprotocol/sdk/inMemory.js";function I(e){const o={names:[]};for(let n=0;n<e.length;n++){const t=e[n];if(t==="--device")o.deviceId=e[++n];else if(t==="--update-snapshots")o.updateSnapshots=true;else if(t==="--json")o.json=true;else if(t==="--wait")o.waitMs=Number(e[++n])*1e3;else if(t==="--all")continue;else if(!t.startsWith("--"))o.names.push(t);else throw new Error(`Unknown option ${t}.`)}return o}async function P(){const e=$.join(process.cwd(),".buoy","flows");return(await S.readdir(e).catch(()=>[])).filter(o=>o.endsWith(".json")).map(o=>o.replace(/\.json$/,"")).sort()}async function g(e,o=n=>process.stderr.write(`${n}
2
+ `)){const n=e.names.length?e.names:await P();if(n.length===0)throw new Error('No saved flows. Save one with run_flow and save:"name", or pass a flow name.');const t=process.env.BUOY_BROKER_PORT;const s=new y({url:process.env.BUOY_BROKER_URL,port:t?Number(t):void 0,autoSpawnBroker:process.env.BUOY_NO_SPAWN!=="1"});const w=R(s);const[d,f]=B.createLinkedPair();const i=new _({name:"buoy-flow-run",version:"1"});try{await w.connect(f);await i.connect(d);await s.start();const a=Date.now()+(e.waitMs??6e4);while(Date.now()<a&&!s.connectedDevices().some(r=>(r.isPro||r.tier==="free")&&(!e.deviceId||r.deviceId===e.deviceId))){await new Promise(r=>setTimeout(r,500))}if(!s.connectedDevices().some(r=>r.isPro||r.tier==="free")){throw new Error("No app on a Buoy account is connected. Start the app (with Buoy) on a simulator or device, then run again.")}const m=[];for(const r of n){const u=Date.now();o(`\u25B6 ${r}`);const p=await i.callTool({name:"run_flow",arguments:{flow:r,include:"none",...e.deviceId?{deviceId:e.deviceId}:{},...e.updateSnapshots?{updateSnapshots:true}:{}}},void 0,{timeout:10*6e4});const h=(p.content??[]).filter(c=>c.type==="text").map(c=>c.text).join("\n");const l=p.isError!==true;m.push({name:r,passed:l,ms:Date.now()-u,report:h});o(`${l?"\u2713":"\u2717"} ${r} (${((Date.now()-u)/1e3).toFixed(1)}s)`)}return m}finally{await i.close().catch(()=>void 0);await Promise.race([s.stop().catch(()=>void 0),new Promise(a=>setTimeout(a,2e3))])}}function j(e){const o=e.filter(t=>!t.passed);const n=[`${e.length-o.length} of ${e.length} flows passed.`];for(const t of o){n.push("",`\u2717 ${t.name}`,t.report.trim(),` Rerun: npx @buoy-gg/mcp flow run ${t.name}`)}return n.join("\n")}export{j as formatFlowResults,I as parseFlowRunArgs,g as runFlows};
@@ -0,0 +1 @@
1
+ import{createRequire as e}from"module";const a=e(import.meta.url);import{freeComparison as r,freeJsTop as o,freeRanking as i,freeWebBench as t,lockedLines as n,nothingLocked as s,resetLockedPitchForTests as c,withLockedLines as m}from"./chunk-OP23W722.mjs";import"./chunk-MTTWR4T7.mjs";export{r as freeComparison,o as freeJsTop,i as freeRanking,t as freeWebBench,n as lockedLines,s as nothingLocked,c as resetLockedPitchForTests,m as withLockedLines};
package/dist/index.d.mts CHANGED
@@ -184,6 +184,13 @@ declare class SyncClient {
184
184
  * doesn't apply to.
185
185
  */
186
186
  private refuseBuoyPanelTap;
187
+ /**
188
+ * Whether a result for this device may carry Pro's why-data (render names,
189
+ * script names, JS origins). True for a Pro key or the Weekend Pass. A free
190
+ * tool works on a free app too; this decides how much of its result it
191
+ * gets (access/freeView.ts).
192
+ */
193
+ fullResultsFor(deviceId: string): boolean;
187
194
  /**
188
195
  * Whether this device was seen on a tier good enough for the current call,
189
196
  * connected or not. For host controls that keep working after the app
@@ -444,94 +451,6 @@ declare function runInit(opts?: InitOptions): void;
444
451
  */
445
452
  declare function registerGenericTools(server: McpServer, sync: SyncClient): void;
446
453
 
447
- /**
448
- * The perf-monitor tool pack: ergonomic, workflow-level tools that wrap the
449
- * generic call_action/get_snapshot for benchmarking. Headlined by
450
- * run_benchmark_batch — feed a case matrix, get back a ranked winner.
451
- */
452
- declare function registerPerfMonitorTools(server: McpServer, sync: SyncClient): void;
453
-
454
- /**
455
- * The events tool pack: a compact, token-bounded view of the app's captured
456
- * events. Drives the device's existing "Copy Settings" formatter (the heavy raw
457
- * payloads stay on the device unless asked for), so the model gets a compact
458
- * log by default and opts into detail when needed.
459
- */
460
- declare function registerEventsTools(server: McpServer, sync: SyncClient): void;
461
-
462
- /**
463
- * The react-query pack: a compact current-CACHE reader (the activity log is
464
- * already covered by get_events) plus the cache-mutating actions, which reuse
465
- * the adapter's existing handlers verbatim.
466
- */
467
- declare function registerReactQueryTools(server: McpServer, sync: SyncClient): void;
468
-
469
- /**
470
- * The zustand pack: a compact current-STATE reader (the change log is already
471
- * covered by get_events sources:['zustand']) plus a setState action that reuses
472
- * the adapter's existing handler.
473
- */
474
- declare function registerZustandTools(server: McpServer, sync: SyncClient): void;
475
-
476
- /**
477
- * The jotai pack: a compact current-VALUE reader (the change log is already
478
- * covered by get_events sources:['jotai']) plus a setAtom action for writable
479
- * atoms.
480
- */
481
- declare function registerJotaiTools(server: McpServer, sync: SyncClient): void;
482
-
483
- /**
484
- * The redux pack: a compact current-STATE reader (redux is action-based, so the
485
- * current state isn't in the action-log snapshot — get_events sources:['redux']
486
- * covers the action history) plus a dispatch action, both driving the live
487
- * instrumented store.
488
- */
489
- declare function registerReduxTools(server: McpServer, sync: SyncClient): void;
490
-
491
- /**
492
- * The storage pack: a friendly, compact reader + writer over the app's
493
- * storage backends — AsyncStorage, MMKV (all registered instances), and Expo
494
- * SecureStore (registered keys). Reuses the storage adapter's async.*, mmkv.*
495
- * and secure.* actions; the device already strips Buoy's own devtool keys at
496
- * the source, so only real app keys are returned.
497
- */
498
- declare function registerStorageTools(server: McpServer, sync: SyncClient): void;
499
-
500
- /**
501
- * The routes pack: current route + navigation stack (compact) with an optional
502
- * sitemap, plus a navigate action — all reusing the route-events adapter's
503
- * existing snapshot and `navigate` action.
504
- */
505
- declare function registerRoutesTools(server: McpServer, sync: SyncClient): void;
506
-
507
- /**
508
- * The console pack: a compact, token-bounded tail of the app's captured
509
- * console.* logs, reusing the console adapter's snapshot (each entry carries a
510
- * pre-rendered single-line `message`, so no heavy args cross into context).
511
- */
512
- declare function registerConsoleTools(server: McpServer, sync: SyncClient): void;
513
-
514
- /**
515
- * The screenshot pack: capture a tight, focused PNG of a single RN component,
516
- * reusing the same flow the desktop app's Screenshot tool uses — the device's
517
- * highlight-updates `locateComponent` action resolves a testID/name to a live
518
- * on-screen rect (scrolling it into view first), and the MCP server itself
519
- * captures + crops the iOS Simulator's framebuffer via `xcrun simctl` + `sips`
520
- * (no desktop app required, as long as the MCP server runs on the same Mac as
521
- * the booted Simulator).
522
- */
523
- declare function registerScreenshotTools(server: McpServer, sync: SyncClient): void;
524
-
525
- /**
526
- * A one-line update notice if a newer version is published, else null. Safe to
527
- * await inline — bounded by the fetch timeout and short-circuited by the cache.
528
- */
529
- declare function getUpdateNotice(now?: number): Promise<string | null>;
530
-
531
- declare const VERSION: string;
532
- /** The published npm package name — used by init + the update check. */
533
- declare const PACKAGE_NAME = "@buoy-gg/mcp";
534
-
535
454
  /** One row in an automation batch (MCP-friendly input; `id` added internally). */
536
455
  interface PerfCaseInput {
537
456
  /** Display name; becomes the saved report's metadata.name. */
@@ -727,6 +646,94 @@ interface RenderCapture {
727
646
  }[];
728
647
  }
729
648
 
649
+ /**
650
+ * The perf-monitor tool pack: ergonomic, workflow-level tools that wrap the
651
+ * generic call_action/get_snapshot for benchmarking. Headlined by
652
+ * run_benchmark_batch — feed a case matrix, get back a ranked winner.
653
+ */
654
+ declare function registerPerfMonitorTools(server: McpServer, sync: SyncClient): void;
655
+
656
+ /**
657
+ * The events tool pack: a compact, token-bounded view of the app's captured
658
+ * events. Drives the device's existing "Copy Settings" formatter (the heavy raw
659
+ * payloads stay on the device unless asked for), so the model gets a compact
660
+ * log by default and opts into detail when needed.
661
+ */
662
+ declare function registerEventsTools(server: McpServer, sync: SyncClient): void;
663
+
664
+ /**
665
+ * The react-query pack: a compact current-CACHE reader (the activity log is
666
+ * already covered by get_events) plus the cache-mutating actions, which reuse
667
+ * the adapter's existing handlers verbatim.
668
+ */
669
+ declare function registerReactQueryTools(server: McpServer, sync: SyncClient): void;
670
+
671
+ /**
672
+ * The zustand pack: a compact current-STATE reader (the change log is already
673
+ * covered by get_events sources:['zustand']) plus a setState action that reuses
674
+ * the adapter's existing handler.
675
+ */
676
+ declare function registerZustandTools(server: McpServer, sync: SyncClient): void;
677
+
678
+ /**
679
+ * The jotai pack: a compact current-VALUE reader (the change log is already
680
+ * covered by get_events sources:['jotai']) plus a setAtom action for writable
681
+ * atoms.
682
+ */
683
+ declare function registerJotaiTools(server: McpServer, sync: SyncClient): void;
684
+
685
+ /**
686
+ * The redux pack: a compact current-STATE reader (redux is action-based, so the
687
+ * current state isn't in the action-log snapshot — get_events sources:['redux']
688
+ * covers the action history) plus a dispatch action, both driving the live
689
+ * instrumented store.
690
+ */
691
+ declare function registerReduxTools(server: McpServer, sync: SyncClient): void;
692
+
693
+ /**
694
+ * The storage pack: a friendly, compact reader + writer over the app's
695
+ * storage backends — AsyncStorage, MMKV (all registered instances), and Expo
696
+ * SecureStore (registered keys). Reuses the storage adapter's async.*, mmkv.*
697
+ * and secure.* actions; the device already strips Buoy's own devtool keys at
698
+ * the source, so only real app keys are returned.
699
+ */
700
+ declare function registerStorageTools(server: McpServer, sync: SyncClient): void;
701
+
702
+ /**
703
+ * The routes pack: current route + navigation stack (compact) with an optional
704
+ * sitemap, plus a navigate action — all reusing the route-events adapter's
705
+ * existing snapshot and `navigate` action.
706
+ */
707
+ declare function registerRoutesTools(server: McpServer, sync: SyncClient): void;
708
+
709
+ /**
710
+ * The console pack: a compact, token-bounded tail of the app's captured
711
+ * console.* logs, reusing the console adapter's snapshot (each entry carries a
712
+ * pre-rendered single-line `message`, so no heavy args cross into context).
713
+ */
714
+ declare function registerConsoleTools(server: McpServer, sync: SyncClient): void;
715
+
716
+ /**
717
+ * The screenshot pack: capture a tight, focused PNG of a single RN component,
718
+ * reusing the same flow the desktop app's Screenshot tool uses — the device's
719
+ * highlight-updates `locateComponent` action resolves a testID/name to a live
720
+ * on-screen rect (scrolling it into view first), and the MCP server itself
721
+ * captures + crops the iOS Simulator's framebuffer via `xcrun simctl` + `sips`
722
+ * (no desktop app required, as long as the MCP server runs on the same Mac as
723
+ * the booted Simulator).
724
+ */
725
+ declare function registerScreenshotTools(server: McpServer, sync: SyncClient): void;
726
+
727
+ /**
728
+ * A one-line update notice if a newer version is published, else null. Safe to
729
+ * await inline — bounded by the fetch timeout and short-circuited by the cache.
730
+ */
731
+ declare function getUpdateNotice(now?: number): Promise<string | null>;
732
+
733
+ declare const VERSION: string;
734
+ /** The published npm package name — used by init + the update check. */
735
+ declare const PACKAGE_NAME = "@buoy-gg/mcp";
736
+
730
737
  interface BuildConfigInput {
731
738
  targetRoute: string;
732
739
  bounceRoute?: string;
package/dist/index.d.ts CHANGED
@@ -184,6 +184,13 @@ declare class SyncClient {
184
184
  * doesn't apply to.
185
185
  */
186
186
  private refuseBuoyPanelTap;
187
+ /**
188
+ * Whether a result for this device may carry Pro's why-data (render names,
189
+ * script names, JS origins). True for a Pro key or the Weekend Pass. A free
190
+ * tool works on a free app too; this decides how much of its result it
191
+ * gets (access/freeView.ts).
192
+ */
193
+ fullResultsFor(deviceId: string): boolean;
187
194
  /**
188
195
  * Whether this device was seen on a tier good enough for the current call,
189
196
  * connected or not. For host controls that keep working after the app
@@ -444,94 +451,6 @@ declare function runInit(opts?: InitOptions): void;
444
451
  */
445
452
  declare function registerGenericTools(server: McpServer, sync: SyncClient): void;
446
453
 
447
- /**
448
- * The perf-monitor tool pack: ergonomic, workflow-level tools that wrap the
449
- * generic call_action/get_snapshot for benchmarking. Headlined by
450
- * run_benchmark_batch — feed a case matrix, get back a ranked winner.
451
- */
452
- declare function registerPerfMonitorTools(server: McpServer, sync: SyncClient): void;
453
-
454
- /**
455
- * The events tool pack: a compact, token-bounded view of the app's captured
456
- * events. Drives the device's existing "Copy Settings" formatter (the heavy raw
457
- * payloads stay on the device unless asked for), so the model gets a compact
458
- * log by default and opts into detail when needed.
459
- */
460
- declare function registerEventsTools(server: McpServer, sync: SyncClient): void;
461
-
462
- /**
463
- * The react-query pack: a compact current-CACHE reader (the activity log is
464
- * already covered by get_events) plus the cache-mutating actions, which reuse
465
- * the adapter's existing handlers verbatim.
466
- */
467
- declare function registerReactQueryTools(server: McpServer, sync: SyncClient): void;
468
-
469
- /**
470
- * The zustand pack: a compact current-STATE reader (the change log is already
471
- * covered by get_events sources:['zustand']) plus a setState action that reuses
472
- * the adapter's existing handler.
473
- */
474
- declare function registerZustandTools(server: McpServer, sync: SyncClient): void;
475
-
476
- /**
477
- * The jotai pack: a compact current-VALUE reader (the change log is already
478
- * covered by get_events sources:['jotai']) plus a setAtom action for writable
479
- * atoms.
480
- */
481
- declare function registerJotaiTools(server: McpServer, sync: SyncClient): void;
482
-
483
- /**
484
- * The redux pack: a compact current-STATE reader (redux is action-based, so the
485
- * current state isn't in the action-log snapshot — get_events sources:['redux']
486
- * covers the action history) plus a dispatch action, both driving the live
487
- * instrumented store.
488
- */
489
- declare function registerReduxTools(server: McpServer, sync: SyncClient): void;
490
-
491
- /**
492
- * The storage pack: a friendly, compact reader + writer over the app's
493
- * storage backends — AsyncStorage, MMKV (all registered instances), and Expo
494
- * SecureStore (registered keys). Reuses the storage adapter's async.*, mmkv.*
495
- * and secure.* actions; the device already strips Buoy's own devtool keys at
496
- * the source, so only real app keys are returned.
497
- */
498
- declare function registerStorageTools(server: McpServer, sync: SyncClient): void;
499
-
500
- /**
501
- * The routes pack: current route + navigation stack (compact) with an optional
502
- * sitemap, plus a navigate action — all reusing the route-events adapter's
503
- * existing snapshot and `navigate` action.
504
- */
505
- declare function registerRoutesTools(server: McpServer, sync: SyncClient): void;
506
-
507
- /**
508
- * The console pack: a compact, token-bounded tail of the app's captured
509
- * console.* logs, reusing the console adapter's snapshot (each entry carries a
510
- * pre-rendered single-line `message`, so no heavy args cross into context).
511
- */
512
- declare function registerConsoleTools(server: McpServer, sync: SyncClient): void;
513
-
514
- /**
515
- * The screenshot pack: capture a tight, focused PNG of a single RN component,
516
- * reusing the same flow the desktop app's Screenshot tool uses — the device's
517
- * highlight-updates `locateComponent` action resolves a testID/name to a live
518
- * on-screen rect (scrolling it into view first), and the MCP server itself
519
- * captures + crops the iOS Simulator's framebuffer via `xcrun simctl` + `sips`
520
- * (no desktop app required, as long as the MCP server runs on the same Mac as
521
- * the booted Simulator).
522
- */
523
- declare function registerScreenshotTools(server: McpServer, sync: SyncClient): void;
524
-
525
- /**
526
- * A one-line update notice if a newer version is published, else null. Safe to
527
- * await inline — bounded by the fetch timeout and short-circuited by the cache.
528
- */
529
- declare function getUpdateNotice(now?: number): Promise<string | null>;
530
-
531
- declare const VERSION: string;
532
- /** The published npm package name — used by init + the update check. */
533
- declare const PACKAGE_NAME = "@buoy-gg/mcp";
534
-
535
454
  /** One row in an automation batch (MCP-friendly input; `id` added internally). */
536
455
  interface PerfCaseInput {
537
456
  /** Display name; becomes the saved report's metadata.name. */
@@ -727,6 +646,94 @@ interface RenderCapture {
727
646
  }[];
728
647
  }
729
648
 
649
+ /**
650
+ * The perf-monitor tool pack: ergonomic, workflow-level tools that wrap the
651
+ * generic call_action/get_snapshot for benchmarking. Headlined by
652
+ * run_benchmark_batch — feed a case matrix, get back a ranked winner.
653
+ */
654
+ declare function registerPerfMonitorTools(server: McpServer, sync: SyncClient): void;
655
+
656
+ /**
657
+ * The events tool pack: a compact, token-bounded view of the app's captured
658
+ * events. Drives the device's existing "Copy Settings" formatter (the heavy raw
659
+ * payloads stay on the device unless asked for), so the model gets a compact
660
+ * log by default and opts into detail when needed.
661
+ */
662
+ declare function registerEventsTools(server: McpServer, sync: SyncClient): void;
663
+
664
+ /**
665
+ * The react-query pack: a compact current-CACHE reader (the activity log is
666
+ * already covered by get_events) plus the cache-mutating actions, which reuse
667
+ * the adapter's existing handlers verbatim.
668
+ */
669
+ declare function registerReactQueryTools(server: McpServer, sync: SyncClient): void;
670
+
671
+ /**
672
+ * The zustand pack: a compact current-STATE reader (the change log is already
673
+ * covered by get_events sources:['zustand']) plus a setState action that reuses
674
+ * the adapter's existing handler.
675
+ */
676
+ declare function registerZustandTools(server: McpServer, sync: SyncClient): void;
677
+
678
+ /**
679
+ * The jotai pack: a compact current-VALUE reader (the change log is already
680
+ * covered by get_events sources:['jotai']) plus a setAtom action for writable
681
+ * atoms.
682
+ */
683
+ declare function registerJotaiTools(server: McpServer, sync: SyncClient): void;
684
+
685
+ /**
686
+ * The redux pack: a compact current-STATE reader (redux is action-based, so the
687
+ * current state isn't in the action-log snapshot — get_events sources:['redux']
688
+ * covers the action history) plus a dispatch action, both driving the live
689
+ * instrumented store.
690
+ */
691
+ declare function registerReduxTools(server: McpServer, sync: SyncClient): void;
692
+
693
+ /**
694
+ * The storage pack: a friendly, compact reader + writer over the app's
695
+ * storage backends — AsyncStorage, MMKV (all registered instances), and Expo
696
+ * SecureStore (registered keys). Reuses the storage adapter's async.*, mmkv.*
697
+ * and secure.* actions; the device already strips Buoy's own devtool keys at
698
+ * the source, so only real app keys are returned.
699
+ */
700
+ declare function registerStorageTools(server: McpServer, sync: SyncClient): void;
701
+
702
+ /**
703
+ * The routes pack: current route + navigation stack (compact) with an optional
704
+ * sitemap, plus a navigate action — all reusing the route-events adapter's
705
+ * existing snapshot and `navigate` action.
706
+ */
707
+ declare function registerRoutesTools(server: McpServer, sync: SyncClient): void;
708
+
709
+ /**
710
+ * The console pack: a compact, token-bounded tail of the app's captured
711
+ * console.* logs, reusing the console adapter's snapshot (each entry carries a
712
+ * pre-rendered single-line `message`, so no heavy args cross into context).
713
+ */
714
+ declare function registerConsoleTools(server: McpServer, sync: SyncClient): void;
715
+
716
+ /**
717
+ * The screenshot pack: capture a tight, focused PNG of a single RN component,
718
+ * reusing the same flow the desktop app's Screenshot tool uses — the device's
719
+ * highlight-updates `locateComponent` action resolves a testID/name to a live
720
+ * on-screen rect (scrolling it into view first), and the MCP server itself
721
+ * captures + crops the iOS Simulator's framebuffer via `xcrun simctl` + `sips`
722
+ * (no desktop app required, as long as the MCP server runs on the same Mac as
723
+ * the booted Simulator).
724
+ */
725
+ declare function registerScreenshotTools(server: McpServer, sync: SyncClient): void;
726
+
727
+ /**
728
+ * A one-line update notice if a newer version is published, else null. Safe to
729
+ * await inline — bounded by the fetch timeout and short-circuited by the cache.
730
+ */
731
+ declare function getUpdateNotice(now?: number): Promise<string | null>;
732
+
733
+ declare const VERSION: string;
734
+ /** The published npm package name — used by init + the update check. */
735
+ declare const PACKAGE_NAME = "@buoy-gg/mcp";
736
+
730
737
  interface BuildConfigInput {
731
738
  targetRoute: string;
732
739
  bounceRoute?: string;