@buoy-gg/mcp 7.0.66 → 7.0.67
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/chunk-2MSKDRYW.mjs +2 -0
- package/dist/{chunk-OCWGZASK.mjs → chunk-7XCEVM3W.mjs} +1 -1
- package/dist/chunk-AMU2EOGE.mjs +6 -0
- package/dist/{chunk-EPYLVJ7F.mjs → chunk-LDULNQCZ.mjs} +105 -101
- package/dist/cli.js +167 -163
- package/dist/cli.mjs +3 -3
- package/dist/{flowRun-OP4UJXKS.mjs → flowRun-WBOCHITQ.mjs} +1 -1
- package/dist/index.d.mts +88 -88
- package/dist/index.d.ts +88 -88
- package/dist/index.js +103 -99
- package/dist/index.mjs +1 -1
- package/dist/simFarm-OFT42BGC.mjs +1 -0
- package/dist/src-DPWEFWQY.mjs +1 -0
- package/package.json +4 -4
- package/skill/buoy-optimize/MEASURING.md +19 -0
- package/skill/buoy-optimize/SKILL.md +1 -1
- package/dist/chunk-MHL43LJN.mjs +0 -2
- package/dist/chunk-Y7SNXKA2.mjs +0 -6
- package/dist/simFarm-EY4R3A4O.mjs +0 -1
- package/dist/src-XCBUDSR7.mjs +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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-
|
|
2
|
+
import{createRequire as d}from"module";const R=d(import.meta.url);import{runInit as m}from"./chunk-7XCEVM3W.mjs";import{SyncClient as u,createMcpServer as w,stopAllHidStreamsNow as f,stopAllRecordingsNow as g}from"./chunk-LDULNQCZ.mjs";import"./chunk-2MSKDRYW.mjs";import"./chunk-VKWX4XAY.mjs";import"./chunk-AMU2EOGE.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
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
4
|
`);s.start().then(t=>process.stderr.write(`[buoy-mcp] broker ${t}
|
|
5
5
|
`)).catch(t=>process.stderr.write(`[buoy-mcp] broker connection failed: ${t?.message??t} \u2014 tools will report no devices until it recovers
|
|
6
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
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-
|
|
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-WBOCHITQ.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
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-
|
|
10
|
+
`,()=>process.exit(1));setTimeout(()=>process.exit(1),5e3).unref()}})()}else if(process.argv[2]==="farmd"){void import("./simFarm-OFT42BGC.mjs").then(e=>e.runFarmd()).catch(e=>{process.stderr.write(`[buoy-mcp] farmd failed: ${e?.message??e}
|
|
11
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
12
|
`);process.exit(1)}}else{v().catch(e=>{process.stderr.write(`[buoy-mcp] fatal: ${e?.message??e}
|
|
13
13
|
`);process.exit(1)})}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as v}from"module";const E=v(import.meta.url);import{SyncClient as y,createMcpServer as R}from"./chunk-
|
|
1
|
+
import{createRequire as v}from"module";const E=v(import.meta.url);import{SyncClient as y,createMcpServer as R}from"./chunk-LDULNQCZ.mjs";import"./chunk-2MSKDRYW.mjs";import"./chunk-VKWX4XAY.mjs";import"./chunk-AMU2EOGE.mjs";import"./chunk-OPHPYPJD.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
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 u=[];for(const r of n){const m=Date.now();o(`\u25B6 ${r}`);const l=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=(l.content??[]).filter(c=>c.type==="text").map(c=>c.text).join("\n");const p=l.isError!==true;u.push({name:r,passed:p,ms:Date.now()-m,report:h});o(`${p?"\u2713":"\u2717"} ${r} (${((Date.now()-m)/1e3).toFixed(1)}s)`)}return u}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};
|
package/dist/index.d.mts
CHANGED
|
@@ -444,94 +444,6 @@ declare function runInit(opts?: InitOptions): void;
|
|
|
444
444
|
*/
|
|
445
445
|
declare function registerGenericTools(server: McpServer, sync: SyncClient): void;
|
|
446
446
|
|
|
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
447
|
/** One row in an automation batch (MCP-friendly input; `id` added internally). */
|
|
536
448
|
interface PerfCaseInput {
|
|
537
449
|
/** Display name; becomes the saved report's metadata.name. */
|
|
@@ -727,6 +639,94 @@ interface RenderCapture {
|
|
|
727
639
|
}[];
|
|
728
640
|
}
|
|
729
641
|
|
|
642
|
+
/**
|
|
643
|
+
* The perf-monitor tool pack: ergonomic, workflow-level tools that wrap the
|
|
644
|
+
* generic call_action/get_snapshot for benchmarking. Headlined by
|
|
645
|
+
* run_benchmark_batch — feed a case matrix, get back a ranked winner.
|
|
646
|
+
*/
|
|
647
|
+
declare function registerPerfMonitorTools(server: McpServer, sync: SyncClient): void;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* The events tool pack: a compact, token-bounded view of the app's captured
|
|
651
|
+
* events. Drives the device's existing "Copy Settings" formatter (the heavy raw
|
|
652
|
+
* payloads stay on the device unless asked for), so the model gets a compact
|
|
653
|
+
* log by default and opts into detail when needed.
|
|
654
|
+
*/
|
|
655
|
+
declare function registerEventsTools(server: McpServer, sync: SyncClient): void;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* The react-query pack: a compact current-CACHE reader (the activity log is
|
|
659
|
+
* already covered by get_events) plus the cache-mutating actions, which reuse
|
|
660
|
+
* the adapter's existing handlers verbatim.
|
|
661
|
+
*/
|
|
662
|
+
declare function registerReactQueryTools(server: McpServer, sync: SyncClient): void;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* The zustand pack: a compact current-STATE reader (the change log is already
|
|
666
|
+
* covered by get_events sources:['zustand']) plus a setState action that reuses
|
|
667
|
+
* the adapter's existing handler.
|
|
668
|
+
*/
|
|
669
|
+
declare function registerZustandTools(server: McpServer, sync: SyncClient): void;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* The jotai pack: a compact current-VALUE reader (the change log is already
|
|
673
|
+
* covered by get_events sources:['jotai']) plus a setAtom action for writable
|
|
674
|
+
* atoms.
|
|
675
|
+
*/
|
|
676
|
+
declare function registerJotaiTools(server: McpServer, sync: SyncClient): void;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* The redux pack: a compact current-STATE reader (redux is action-based, so the
|
|
680
|
+
* current state isn't in the action-log snapshot — get_events sources:['redux']
|
|
681
|
+
* covers the action history) plus a dispatch action, both driving the live
|
|
682
|
+
* instrumented store.
|
|
683
|
+
*/
|
|
684
|
+
declare function registerReduxTools(server: McpServer, sync: SyncClient): void;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* The storage pack: a friendly, compact reader + writer over the app's
|
|
688
|
+
* storage backends — AsyncStorage, MMKV (all registered instances), and Expo
|
|
689
|
+
* SecureStore (registered keys). Reuses the storage adapter's async.*, mmkv.*
|
|
690
|
+
* and secure.* actions; the device already strips Buoy's own devtool keys at
|
|
691
|
+
* the source, so only real app keys are returned.
|
|
692
|
+
*/
|
|
693
|
+
declare function registerStorageTools(server: McpServer, sync: SyncClient): void;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* The routes pack: current route + navigation stack (compact) with an optional
|
|
697
|
+
* sitemap, plus a navigate action — all reusing the route-events adapter's
|
|
698
|
+
* existing snapshot and `navigate` action.
|
|
699
|
+
*/
|
|
700
|
+
declare function registerRoutesTools(server: McpServer, sync: SyncClient): void;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* The console pack: a compact, token-bounded tail of the app's captured
|
|
704
|
+
* console.* logs, reusing the console adapter's snapshot (each entry carries a
|
|
705
|
+
* pre-rendered single-line `message`, so no heavy args cross into context).
|
|
706
|
+
*/
|
|
707
|
+
declare function registerConsoleTools(server: McpServer, sync: SyncClient): void;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* The screenshot pack: capture a tight, focused PNG of a single RN component,
|
|
711
|
+
* reusing the same flow the desktop app's Screenshot tool uses — the device's
|
|
712
|
+
* highlight-updates `locateComponent` action resolves a testID/name to a live
|
|
713
|
+
* on-screen rect (scrolling it into view first), and the MCP server itself
|
|
714
|
+
* captures + crops the iOS Simulator's framebuffer via `xcrun simctl` + `sips`
|
|
715
|
+
* (no desktop app required, as long as the MCP server runs on the same Mac as
|
|
716
|
+
* the booted Simulator).
|
|
717
|
+
*/
|
|
718
|
+
declare function registerScreenshotTools(server: McpServer, sync: SyncClient): void;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* A one-line update notice if a newer version is published, else null. Safe to
|
|
722
|
+
* await inline — bounded by the fetch timeout and short-circuited by the cache.
|
|
723
|
+
*/
|
|
724
|
+
declare function getUpdateNotice(now?: number): Promise<string | null>;
|
|
725
|
+
|
|
726
|
+
declare const VERSION: string;
|
|
727
|
+
/** The published npm package name — used by init + the update check. */
|
|
728
|
+
declare const PACKAGE_NAME = "@buoy-gg/mcp";
|
|
729
|
+
|
|
730
730
|
interface BuildConfigInput {
|
|
731
731
|
targetRoute: string;
|
|
732
732
|
bounceRoute?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -444,94 +444,6 @@ declare function runInit(opts?: InitOptions): void;
|
|
|
444
444
|
*/
|
|
445
445
|
declare function registerGenericTools(server: McpServer, sync: SyncClient): void;
|
|
446
446
|
|
|
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
447
|
/** One row in an automation batch (MCP-friendly input; `id` added internally). */
|
|
536
448
|
interface PerfCaseInput {
|
|
537
449
|
/** Display name; becomes the saved report's metadata.name. */
|
|
@@ -727,6 +639,94 @@ interface RenderCapture {
|
|
|
727
639
|
}[];
|
|
728
640
|
}
|
|
729
641
|
|
|
642
|
+
/**
|
|
643
|
+
* The perf-monitor tool pack: ergonomic, workflow-level tools that wrap the
|
|
644
|
+
* generic call_action/get_snapshot for benchmarking. Headlined by
|
|
645
|
+
* run_benchmark_batch — feed a case matrix, get back a ranked winner.
|
|
646
|
+
*/
|
|
647
|
+
declare function registerPerfMonitorTools(server: McpServer, sync: SyncClient): void;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* The events tool pack: a compact, token-bounded view of the app's captured
|
|
651
|
+
* events. Drives the device's existing "Copy Settings" formatter (the heavy raw
|
|
652
|
+
* payloads stay on the device unless asked for), so the model gets a compact
|
|
653
|
+
* log by default and opts into detail when needed.
|
|
654
|
+
*/
|
|
655
|
+
declare function registerEventsTools(server: McpServer, sync: SyncClient): void;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* The react-query pack: a compact current-CACHE reader (the activity log is
|
|
659
|
+
* already covered by get_events) plus the cache-mutating actions, which reuse
|
|
660
|
+
* the adapter's existing handlers verbatim.
|
|
661
|
+
*/
|
|
662
|
+
declare function registerReactQueryTools(server: McpServer, sync: SyncClient): void;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* The zustand pack: a compact current-STATE reader (the change log is already
|
|
666
|
+
* covered by get_events sources:['zustand']) plus a setState action that reuses
|
|
667
|
+
* the adapter's existing handler.
|
|
668
|
+
*/
|
|
669
|
+
declare function registerZustandTools(server: McpServer, sync: SyncClient): void;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* The jotai pack: a compact current-VALUE reader (the change log is already
|
|
673
|
+
* covered by get_events sources:['jotai']) plus a setAtom action for writable
|
|
674
|
+
* atoms.
|
|
675
|
+
*/
|
|
676
|
+
declare function registerJotaiTools(server: McpServer, sync: SyncClient): void;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* The redux pack: a compact current-STATE reader (redux is action-based, so the
|
|
680
|
+
* current state isn't in the action-log snapshot — get_events sources:['redux']
|
|
681
|
+
* covers the action history) plus a dispatch action, both driving the live
|
|
682
|
+
* instrumented store.
|
|
683
|
+
*/
|
|
684
|
+
declare function registerReduxTools(server: McpServer, sync: SyncClient): void;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* The storage pack: a friendly, compact reader + writer over the app's
|
|
688
|
+
* storage backends — AsyncStorage, MMKV (all registered instances), and Expo
|
|
689
|
+
* SecureStore (registered keys). Reuses the storage adapter's async.*, mmkv.*
|
|
690
|
+
* and secure.* actions; the device already strips Buoy's own devtool keys at
|
|
691
|
+
* the source, so only real app keys are returned.
|
|
692
|
+
*/
|
|
693
|
+
declare function registerStorageTools(server: McpServer, sync: SyncClient): void;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* The routes pack: current route + navigation stack (compact) with an optional
|
|
697
|
+
* sitemap, plus a navigate action — all reusing the route-events adapter's
|
|
698
|
+
* existing snapshot and `navigate` action.
|
|
699
|
+
*/
|
|
700
|
+
declare function registerRoutesTools(server: McpServer, sync: SyncClient): void;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* The console pack: a compact, token-bounded tail of the app's captured
|
|
704
|
+
* console.* logs, reusing the console adapter's snapshot (each entry carries a
|
|
705
|
+
* pre-rendered single-line `message`, so no heavy args cross into context).
|
|
706
|
+
*/
|
|
707
|
+
declare function registerConsoleTools(server: McpServer, sync: SyncClient): void;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* The screenshot pack: capture a tight, focused PNG of a single RN component,
|
|
711
|
+
* reusing the same flow the desktop app's Screenshot tool uses — the device's
|
|
712
|
+
* highlight-updates `locateComponent` action resolves a testID/name to a live
|
|
713
|
+
* on-screen rect (scrolling it into view first), and the MCP server itself
|
|
714
|
+
* captures + crops the iOS Simulator's framebuffer via `xcrun simctl` + `sips`
|
|
715
|
+
* (no desktop app required, as long as the MCP server runs on the same Mac as
|
|
716
|
+
* the booted Simulator).
|
|
717
|
+
*/
|
|
718
|
+
declare function registerScreenshotTools(server: McpServer, sync: SyncClient): void;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* A one-line update notice if a newer version is published, else null. Safe to
|
|
722
|
+
* await inline — bounded by the fetch timeout and short-circuited by the cache.
|
|
723
|
+
*/
|
|
724
|
+
declare function getUpdateNotice(now?: number): Promise<string | null>;
|
|
725
|
+
|
|
726
|
+
declare const VERSION: string;
|
|
727
|
+
/** The published npm package name — used by init + the update check. */
|
|
728
|
+
declare const PACKAGE_NAME = "@buoy-gg/mcp";
|
|
729
|
+
|
|
730
730
|
interface BuildConfigInput {
|
|
731
731
|
targetRoute: string;
|
|
732
732
|
bounceRoute?: string;
|