@buoy-gg/mcp 7.0.49 → 7.0.50
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/camera-YKUHGME2.mjs +1 -0
- package/dist/chunk-EKM5ZZKU.mjs +139 -0
- package/dist/chunk-QIYTG2A5.mjs +367 -0
- package/dist/chunk-RYFN5J56.mjs +5 -0
- package/dist/cli.js +212 -135
- package/dist/cli.mjs +8 -8
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +203 -126
- package/dist/index.mjs +1 -1
- package/dist/webBench-K5MAFWO3.mjs +1 -0
- package/package.json +3 -3
- package/skill/buoy-optimize/SKILL.md +35 -5
- package/dist/chunk-2PTJT2QF.mjs +0 -64
- package/dist/chunk-MLEZPZP3.mjs +0 -369
- package/dist/webBench-LKAOZXHK.mjs +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{SyncClient as
|
|
3
|
-
`);setTimeout(()=>process.exit(0),2e3).unref();void(async()=>{await s.stop().catch(()=>{});await
|
|
4
|
-
`);s.start().then(
|
|
5
|
-
`)).catch(
|
|
6
|
-
`))}if(process.argv[2]==="web-bench"){void(async()=>{try{const e=process.argv.slice(3);const s=e.find(
|
|
7
|
-
`));
|
|
8
|
-
|
|
9
|
-
`);process.exit(1)}}else{
|
|
2
|
+
import{SyncClient as u,createMcpServer as d,runInit as w}from"./chunk-QIYTG2A5.mjs";import"./chunk-RYFN5J56.mjs";import"./chunk-EKM5ZZKU.mjs";import{StdioServerTransport as f}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 m(){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 o=d(s);const r=new f;let n=false;const c=t=>{if(n)return;n=true;process.stderr.write(`[buoy-mcp] shutting down (${t})
|
|
3
|
+
`);setTimeout(()=>process.exit(0),2e3).unref();void(async()=>{await s.stop().catch(()=>{});await o.close().catch(()=>{});process.exit(0)})()};process.stdin.once("end",()=>c("stdin closed"));process.stdin.once("close",()=>c("stdin closed"));o.server.onclose=()=>c("transport closed");process.on("SIGINT",()=>c("SIGINT"));process.on("SIGTERM",()=>c("SIGTERM"));process.on("SIGHUP",()=>c("SIGHUP"));await o.connect(r);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 b(){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 o=await Promise.race([s.start().then(()=>true,()=>false),new Promise(r=>setTimeout(()=>r(false),4e3))]);if(!o)return false;for(let r=0;r<10;r++){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(o=>setTimeout(o,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:o}=await import("fs");const{runWebBench:r,formatWebBenchMarkdown:n}=await import("./webBench-K5MAFWO3.mjs");const{readEntitlement:c}=await import("./camera-YKUHGME2.mjs");if(!c().isPro&&!await b()){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(o(s,"utf8"));const i=await r({...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]==="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 o=e.indexOf("--registry");const r=o!==-1?e[o+1]:void 0;w({mode:s,registry:r});process.exit(0)}catch(e){process.stderr.write(`[buoy-mcp] init failed: ${e?.message??e}
|
|
9
|
+
`);process.exit(1)}}else{m().catch(e=>{process.stderr.write(`[buoy-mcp] fatal: ${e?.message??e}
|
|
10
10
|
`);process.exit(1)})}
|
package/dist/index.d.mts
CHANGED
|
@@ -478,6 +478,9 @@ interface AutomationConfig {
|
|
|
478
478
|
interface WebRunSummary {
|
|
479
479
|
durationMs: number;
|
|
480
480
|
frames: number;
|
|
481
|
+
fps?: number;
|
|
482
|
+
frameGapCount?: number;
|
|
483
|
+
edgeSilenceMs?: number;
|
|
481
484
|
refreshHz: number;
|
|
482
485
|
frameGapP95Ms: number | null;
|
|
483
486
|
frameGapMaxMs: number | null;
|
|
@@ -505,6 +508,7 @@ interface WebRunSummary {
|
|
|
505
508
|
ms: number;
|
|
506
509
|
count: number;
|
|
507
510
|
}[];
|
|
511
|
+
cutOff?: number;
|
|
508
512
|
} | null;
|
|
509
513
|
interactions?: {
|
|
510
514
|
count: number;
|
|
@@ -517,8 +521,12 @@ interface WebRunSummary {
|
|
|
517
521
|
layoutShift?: number | null;
|
|
518
522
|
domNodesStart?: number | null;
|
|
519
523
|
domNodesEnd?: number | null;
|
|
524
|
+
refreshCalibrated?: boolean | null;
|
|
520
525
|
pageLoad?: {
|
|
521
526
|
pageAgeMs: number;
|
|
527
|
+
navigationId?: number;
|
|
528
|
+
loadPath?: string | null;
|
|
529
|
+
loadSearch?: string | null;
|
|
522
530
|
ttfbMs: number | null;
|
|
523
531
|
fcpMs: number | null;
|
|
524
532
|
lcpMs: number | null;
|
|
@@ -549,6 +557,8 @@ interface IndexEntry {
|
|
|
549
557
|
caseId?: string;
|
|
550
558
|
runIndex?: number;
|
|
551
559
|
isMedianRun?: boolean;
|
|
560
|
+
/** A warmup run the median skipped; leave it out of ranges and counts. */
|
|
561
|
+
discardedWarmup?: boolean;
|
|
552
562
|
/** Set on every run of the batch's baseline case. batchIndex is the shuffled slot, so it can't say which case is the baseline. */
|
|
553
563
|
isBaseline?: boolean;
|
|
554
564
|
/** Browser runs only: what the per-run probe saw. Mirrors perf-monitor's WebRunSummary. */
|
|
@@ -666,6 +676,8 @@ interface RankRow {
|
|
|
666
676
|
deviceMaxRefreshRate: number | null;
|
|
667
677
|
/** True for the caller's baseline case (its first case, wherever it ran). */
|
|
668
678
|
isBaseline?: boolean;
|
|
679
|
+
/** Route the case ran on (from the saved run). */
|
|
680
|
+
route?: string;
|
|
669
681
|
/**
|
|
670
682
|
* "web" when the run came from a browser. Browser rows read differently:
|
|
671
683
|
* one main-thread FPS (in `jsFps`; `uiFps` is null), no CPU (long-task time
|
|
@@ -678,10 +690,14 @@ interface RankRow {
|
|
|
678
690
|
frameGapP95Ms?: number | null;
|
|
679
691
|
/** Browser rows: the longest gap between frames, ms. */
|
|
680
692
|
frameGapMaxMs?: number | null;
|
|
693
|
+
/** Browser rows: silence before the first or after the last frame, ms. */
|
|
694
|
+
edgeSilenceMs?: number | null;
|
|
681
695
|
/** Browser rows: gaps long enough to miss at least one frame. */
|
|
682
696
|
longFrames?: number | null;
|
|
683
697
|
/** Browser rows: metrics this browser can't measure (they show as —, never 0). */
|
|
684
698
|
missingMetrics?: string[];
|
|
699
|
+
/** Browser rows: false when the batch couldn't calibrate the refresh rate on an idle screen. */
|
|
700
|
+
refreshCalibrated?: boolean | null;
|
|
685
701
|
/** Browser rows (LoAF): input-blocking time in long animation frames, ms. */
|
|
686
702
|
loafBlockingMs?: number | null;
|
|
687
703
|
/** Browser rows (LoAF): style + layout time at the end of slow frames, ms. */
|
|
@@ -711,7 +727,7 @@ interface RankRow {
|
|
|
711
727
|
fpsMax?: number | null;
|
|
712
728
|
/** Runs that saved without a failure. */
|
|
713
729
|
validRuns?: number;
|
|
714
|
-
/** Browser rows: how the page loaded (page-lifetime; see
|
|
730
|
+
/** Browser rows: how the page loaded (page-lifetime; see pageLoadLines). */
|
|
715
731
|
pageLoad?: NonNullable<WebRunSummary["pageLoad"]> | null;
|
|
716
732
|
/** Delta vs the baseline case — positive = better/more fps. */
|
|
717
733
|
deltaUiFps: number | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -478,6 +478,9 @@ interface AutomationConfig {
|
|
|
478
478
|
interface WebRunSummary {
|
|
479
479
|
durationMs: number;
|
|
480
480
|
frames: number;
|
|
481
|
+
fps?: number;
|
|
482
|
+
frameGapCount?: number;
|
|
483
|
+
edgeSilenceMs?: number;
|
|
481
484
|
refreshHz: number;
|
|
482
485
|
frameGapP95Ms: number | null;
|
|
483
486
|
frameGapMaxMs: number | null;
|
|
@@ -505,6 +508,7 @@ interface WebRunSummary {
|
|
|
505
508
|
ms: number;
|
|
506
509
|
count: number;
|
|
507
510
|
}[];
|
|
511
|
+
cutOff?: number;
|
|
508
512
|
} | null;
|
|
509
513
|
interactions?: {
|
|
510
514
|
count: number;
|
|
@@ -517,8 +521,12 @@ interface WebRunSummary {
|
|
|
517
521
|
layoutShift?: number | null;
|
|
518
522
|
domNodesStart?: number | null;
|
|
519
523
|
domNodesEnd?: number | null;
|
|
524
|
+
refreshCalibrated?: boolean | null;
|
|
520
525
|
pageLoad?: {
|
|
521
526
|
pageAgeMs: number;
|
|
527
|
+
navigationId?: number;
|
|
528
|
+
loadPath?: string | null;
|
|
529
|
+
loadSearch?: string | null;
|
|
522
530
|
ttfbMs: number | null;
|
|
523
531
|
fcpMs: number | null;
|
|
524
532
|
lcpMs: number | null;
|
|
@@ -549,6 +557,8 @@ interface IndexEntry {
|
|
|
549
557
|
caseId?: string;
|
|
550
558
|
runIndex?: number;
|
|
551
559
|
isMedianRun?: boolean;
|
|
560
|
+
/** A warmup run the median skipped; leave it out of ranges and counts. */
|
|
561
|
+
discardedWarmup?: boolean;
|
|
552
562
|
/** Set on every run of the batch's baseline case. batchIndex is the shuffled slot, so it can't say which case is the baseline. */
|
|
553
563
|
isBaseline?: boolean;
|
|
554
564
|
/** Browser runs only: what the per-run probe saw. Mirrors perf-monitor's WebRunSummary. */
|
|
@@ -666,6 +676,8 @@ interface RankRow {
|
|
|
666
676
|
deviceMaxRefreshRate: number | null;
|
|
667
677
|
/** True for the caller's baseline case (its first case, wherever it ran). */
|
|
668
678
|
isBaseline?: boolean;
|
|
679
|
+
/** Route the case ran on (from the saved run). */
|
|
680
|
+
route?: string;
|
|
669
681
|
/**
|
|
670
682
|
* "web" when the run came from a browser. Browser rows read differently:
|
|
671
683
|
* one main-thread FPS (in `jsFps`; `uiFps` is null), no CPU (long-task time
|
|
@@ -678,10 +690,14 @@ interface RankRow {
|
|
|
678
690
|
frameGapP95Ms?: number | null;
|
|
679
691
|
/** Browser rows: the longest gap between frames, ms. */
|
|
680
692
|
frameGapMaxMs?: number | null;
|
|
693
|
+
/** Browser rows: silence before the first or after the last frame, ms. */
|
|
694
|
+
edgeSilenceMs?: number | null;
|
|
681
695
|
/** Browser rows: gaps long enough to miss at least one frame. */
|
|
682
696
|
longFrames?: number | null;
|
|
683
697
|
/** Browser rows: metrics this browser can't measure (they show as —, never 0). */
|
|
684
698
|
missingMetrics?: string[];
|
|
699
|
+
/** Browser rows: false when the batch couldn't calibrate the refresh rate on an idle screen. */
|
|
700
|
+
refreshCalibrated?: boolean | null;
|
|
685
701
|
/** Browser rows (LoAF): input-blocking time in long animation frames, ms. */
|
|
686
702
|
loafBlockingMs?: number | null;
|
|
687
703
|
/** Browser rows (LoAF): style + layout time at the end of slow frames, ms. */
|
|
@@ -711,7 +727,7 @@ interface RankRow {
|
|
|
711
727
|
fpsMax?: number | null;
|
|
712
728
|
/** Runs that saved without a failure. */
|
|
713
729
|
validRuns?: number;
|
|
714
|
-
/** Browser rows: how the page loaded (page-lifetime; see
|
|
730
|
+
/** Browser rows: how the page loaded (page-lifetime; see pageLoadLines). */
|
|
715
731
|
pageLoad?: NonNullable<WebRunSummary["pageLoad"]> | null;
|
|
716
732
|
/** Delta vs the baseline case — positive = better/more fps. */
|
|
717
733
|
deltaUiFps: number | null;
|