@buoy-gg/mcp 7.0.75 → 7.0.77
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 +10 -0
- package/dist/{camera-V7J5ZQUM.mjs → camera-6HTJDU4Y.mjs} +1 -1
- package/dist/{chunk-VGSD42IS.mjs → chunk-3O76SJJM.mjs} +1 -1
- package/dist/{chunk-FRGTROJC.mjs → chunk-5NOZVPWB.mjs} +1 -1
- package/dist/{chunk-PAOWVPJM.mjs → chunk-D5K6WO6B.mjs} +1 -1
- package/dist/{chunk-435L4GYW.mjs → chunk-LF3VF3PO.mjs} +3 -3
- package/dist/{chunk-TKNYLZJ4.mjs → chunk-ODGXMS2O.mjs} +19 -19
- package/dist/{chunk-ZFK7W5AA.mjs → chunk-OG34S7G6.mjs} +108 -107
- package/dist/{chunk-RVUAVOJU.mjs → chunk-XA74T4JN.mjs} +2 -2
- package/dist/{chunk-XTON7CD6.mjs → chunk-ZMFF6TOQ.mjs} +1 -1
- package/dist/cli.js +13 -12
- package/dist/cli.mjs +7 -7
- package/dist/{flowRun-ZZ6LCXZR.mjs → flowRun-XKE2FG3B.mjs} +1 -1
- package/dist/index.js +52 -51
- package/dist/index.mjs +1 -1
- package/dist/{init-XBPEM2R6.mjs → init-VRHZTW2F.mjs} +1 -1
- package/dist/{main-J2KZQAL4.mjs → main-NJB22OCH.mjs} +2 -2
- package/dist/{policy-72DKIGU2.mjs → policy-UNODNYFR.mjs} +1 -1
- package/dist/{simFarm-4UNZBEMG.mjs → simFarm-R4P6QXRK.mjs} +1 -1
- package/dist/{src-IQBNAXE4.mjs → src-R7ICMP6Q.mjs} +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -14,6 +14,16 @@ Connect an MCP client to supported Buoy tools in a running app. Read captured st
|
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
17
|
+
Sign in first. Run this in your app's folder:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx --package=@buoy-gg/core buoy login
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Your browser opens buoy.gg. Click Allow. This signs in your computer. The MCP uses that sign-in, so it needs no key. As a backup, it reads a key from the env files in the folder it runs in.
|
|
24
|
+
|
|
25
|
+
Then set up the MCP:
|
|
26
|
+
|
|
17
27
|
```bash
|
|
18
28
|
npx -y @buoy-gg/mcp@latest init
|
|
19
29
|
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as e}from"module";const c=e(import.meta.url);import{cliPath as r,describeDevices as t,describeDiagnosis as i,describeInputs as o,entitlementHasPro as s,proRequired as m,readEntitlement as n,run as a,setEntitlementFileForTests as p}from"./chunk-
|
|
1
|
+
import{createRequire as e}from"module";const c=e(import.meta.url);import{cliPath as r,describeDevices as t,describeDiagnosis as i,describeInputs as o,entitlementHasPro as s,proRequired as m,readEntitlement as n,run as a,setEntitlementFileForTests as p}from"./chunk-5NOZVPWB.mjs";import"./chunk-D5K6WO6B.mjs";import"./chunk-MTTWR4T7.mjs";export{r as cliPath,t as describeDevices,i as describeDiagnosis,o as describeInputs,s as entitlementHasPro,m as proRequired,n as readEntitlement,a as run,p as setEntitlementFileForTests};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as e}from"module";const a=e(import.meta.url);var r="7.0.
|
|
1
|
+
import{createRequire as e}from"module";const a=e(import.meta.url);var r="7.0.77"?"7.0.77":"0.0.0-dev";var o="@buoy-gg/mcp";export{r as VERSION,o as PACKAGE_NAME};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as p}from"module";const D=p(import.meta.url);import{weekendNow as h}from"./chunk-
|
|
1
|
+
import{createRequire as p}from"module";const D=p(import.meta.url);import{weekendNow as h}from"./chunk-D5K6WO6B.mjs";import{execFile as f}from"child_process";import{promisify as y}from"util";import{existsSync as c,readFileSync as g}from"fs";import u from"os";import a from"path";var b=y(f);function k(){const n=process.env.BUOY_SIMCAM_DIR;const t=[...n?[a.join(n,"buoycam")]:[],"/Applications/Buoy.app/Contents/Resources/simcam/buoycam",a.join(u.homedir(),"Applications/Buoy.app/Contents/Resources/simcam/buoycam")];let e=__dirname;for(let o=0;o<8;o++){t.push(a.join(e,"apps/desktop/resources/simcam/buoycam"));const i=a.dirname(e);if(i===e)break;e=i}return t}var s=null;function m(){if(s)return s;s=k().find(n=>c(n))??null;return s}async function _(n){const t=m();if(!t){return{ok:false,error:"The simulator camera components were not found. They ship with the Buoy desktop app \u2014 install it, or set BUOY_SIMCAM_DIR to the directory holding `buoycam`."}}try{const{stdout:e}=await b(t,[...n,"--json"],{timeout:3e4});return{ok:true,data:JSON.parse(e)}}catch(e){const o=e.stdout??"";try{return{ok:false,data:JSON.parse(o)}}catch{return{ok:false,error:e.message||"the simulator camera CLI failed"}}}}function $(n){const t=n.filter(r=>r.level==="fail");const e=n.filter(r=>r.level==="warn");if(t.length===0&&e.length===0){return"The simulator camera is healthy \u2014 every check passed."}const o=[];for(const r of[...t,...e]){o.push(`- **${r.name}** (${r.level}): ${r.detail}`);if(r.fix)o.push(` ${r.fix}`)}const i=t.length>0?`${t.length} problem${t.length===1?"":"s"} found.`:`No hard failures, but ${e.length} thing${e.length===1?"":"s"} worth knowing.`;return[i,"",...o].join("\n")}function S(n,t){if(n.length===0){return"No booted simulators.\n\n_Boot one first \u2014 `xcrun simctl boot <udid>`, or open Simulator.app. The camera attaches to a simulator, so nothing else here works until one is running._"}const e=[n.length===1?"1 booted simulator:":`${n.length} booted simulators:`,...n.map(o=>`- **${o.name}** (${o.runtime}) \u2014 \`${o.udid}\``)];if(n.length>1&&t===null){e.push("","_More than one is booted, so pass `udid` to list a specific one's apps \u2014 and to every other camera tool that takes one._");return e.join("\n")}if(t===null){e.push("","_Could not read the installed apps._");return e.join("\n")}if(t.length===0){e.push("","No apps installed on it.");return e.join("\n")}e.push("",`${t.length} installed app${t.length===1?"":"s"}:`,...t.map(o=>`- ${o.name} \u2014 \`${o.bundleId}\``),"","_Pass one of these bundle ids to `camera_launch` to relaunch it with the camera attached._");return e.join("\n")}function w(n,t){const e=[];e.push(n.length?'**Mac cameras** (for `kind: "camera"`):':"**Mac cameras**: none found.");if(n.length){e.push(...n.map(o=>`- ${o.name} \u2014 \`${o.uniqueId}\``))}else{e.push("_If this Mac has a webcam, Buoy has not been granted Camera permission (System Settings \u2192 Privacy & Security \u2192 Camera)._")}e.push("");e.push(t.length?'**Capturable windows** (for `kind: "screen"`, `value: "window:<id>"`):':"**Capturable windows**: none found.");if(t.length){e.push(...t.map(o=>`- ${o.app}${o.title?` \u2014 ${o.title}`:""} \u2014 \`window:${o.id}\``))}else{e.push("_Screen Recording permission is almost certainly missing (System Settings \u2192 Privacy & Security \u2192 Screen & System Audio Recording)._")}return e.join("\n")}var l=null;function v(n){l=n}function j(){if(l)return[l];return[a.join(u.homedir(),"Library/Application Support/Buoy/entitlement.json"),a.join(u.homedir(),"Library/Application Support/buoy-desktop/entitlement.json")]}function d(){for(const n of j()){try{if(!c(n))continue;const t=JSON.parse(g(n,"utf8"));const e=t.tier==="pro"||t.tier==="free"?t.tier:"locked";const o=t.hasDesktopAccess===true&&typeof t.validUntil==="number"&&Number.isFinite(t.validUntil)&&Date.now()<t.validUntil;const i=o&&t.isPro===true&&typeof t.proValidUntil==="number"&&Number.isFinite(t.proValidUntil)&&Date.now()<t.proValidUntil;return{tier:e,isPro:i,admitted:i||o&&e!=="locked"}}catch{}}return{tier:"locked",isPro:false,admitted:false}}function P(n=d()){return n.isPro||n.admitted===true&&h()}function C(n){return`\`${n}\` is a Buoy Pro feature.
|
|
2
2
|
|
|
3
3
|
The simulator camera itself is free \u2014 the Mac camera, image, video, test-pattern and QR sources all work in the Buoy desktop panel with a Free account. Pro adds the screen region, the non-QR symbologies (PDF417, Aztec, DataMatrix, Code 128), and driving any of it from an agent.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as m}from"module";const
|
|
1
|
+
import{createRequire as m}from"module";const O=m(import.meta.url);import{AsyncLocalStorage as h}from"async_hooks";var r={list_devices:null,list_tool_actions:null,camera_diagnose:null,describe_screen:e=>e.includeBuoy?"includeBuoy":null,tap_element:e=>e.includeBuoy?"includeBuoy":null,native_tap:e=>e.allowBuoy?"allowBuoy":null,native_type:null,native_swipe:e=>e.allowBuoy?"allowBuoy":null,native_pinch:e=>e.allowBuoy?"allowBuoy":null,native_inspect:null,run_flow:null,screenshot_component:null,screen_recording:null,device_control:null,reload_app:null,navigate:null,get_routes:null,get_console:null,get_network_requests:e=>e.includeBodies?"includeBodies":null,get_triage:null,run_benchmark_batch:null,wait_for_automation:null,get_automation_status:null,get_batch_report:null,compare_reports:null,get_benchmark_settings:null,set_benchmark_settings:null,get_js_thread_top:null,run_web_benchmark:e=>e.traceDir?"traceDir":null,find_web_ceiling:null,screenshot_web_variants:null,start_optimize_session:null,sim_farm_status:null,sim_farm_setup:null,sim_farm_acquire:null,sim_farm_release:null,sim_farm_action:null,sim_farm_lock:null,sim_farm_report:null,sim_farm_extend:null,sim_farm_finish:null,chrome_farm_status:null,chrome_farm_up:null,chrome_farm_down:null,chrome_farm_reset:null,chrome_farm_quiet:null,chrome_farm_pause:null,chrome_farm_screenshot:null};var u={"highlight-updates":["describeScreen","tapElement","hitTest","readMaps","setSilentTracking"],"route-events":["@snapshot","getCurrentRoute","navigate"],app:["@snapshot","ping","reloadApp"],console:["@snapshot"],network:["@snapshot"],storage:["async.getAllKeys","secure.keys"],"perf-monitor":["@snapshot","getAutomationConfig","setAutomationConfig","acknowledgeAutomation","setEnabled","refreshIndex","startAutomation","loadReport"],"js-top":["sample"]};function f(e,t){return Object.prototype.hasOwnProperty.call(u,e)&&u[e].includes(t)}var i=()=>new Date;function g(e){i=e??(()=>new Date)}function l(e=i()){const t=e.getDay();return t===0||t===6}function d(e,t){const n=l();if(!Object.prototype.hasOwnProperty.call(r,e))return{tool:e,level:"pro",weekend:n};const s=r[e];const a=s?s(t&&typeof t==="object"?t:{}):null;return a?{tool:e,level:"pro",proOption:a,weekend:n}:{tool:e,level:"free",weekend:n}}function c(){return o.getStore()?.weekend??l()}function _(e){if(!e)return false;if(e.isPro===true)return true;return e.tier==="free"&&c()}function y(e){return Object.prototype.hasOwnProperty.call(r,e)}function w(){return Object.keys(r).sort()}var o=new h;function b(e,t){return o.run(Object.freeze({...e}),t)}function k(e){return o.exit(e)}function v(){return o.getStore()??{tool:"",level:"pro"}}function A(e,t){if(!e)return false;if(_(e))return true;return t==="free"&&e.tier==="free"}var p="Free covers reading the screen, taps, swipes and typing, run_flow, screenshots, screen recording, device_control, reload_app, navigate, get_routes, get_console, the request list and get_triage. It also covers Buoy Optimize and the Sim Farm: benchmark batches, reports, web benchmarks and JS thread totals, without the render names, script names and JS origins that say why. Every Saturday and Sunday a free account gets everything Pro does.";function B(e,t){const n=e.proOption?`\`${e.tool}\` with \`${e.proOption}\` needs Buoy Pro.`:e.tool?`\`${e.tool}\` needs Buoy Pro.`:"This needs Buoy Pro.";return`${n}${t} ${p} Tell the user Pro unlocks the rest (https://buoy.gg/pricing). After upgrading, the user runs \`npx --package=@buoy-gg/core buoy login\` again, or signs in again in the app. An app with no on-device UI can take a Pro key through \`licenseKey\`. No setting, argument or other tool turns Pro on, so don't try to work around it.`}export{f as isFreeAppCall,g as setClockForTests,l as isWeekendPass,d as accessFor,c as weekendNow,_ as hasProAccess,y as isFreeTool,w as freeToolNames,b as runWithAccess,k as outsideCalls,v as currentAccess,A as meetsAccess,p as FREE_SUMMARY,B as proRequiredMessage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as A}from"module";const G=A(import.meta.url);import{PACKAGE_NAME as l,VERSION as
|
|
1
|
+
import{createRequire as A}from"module";const G=A(import.meta.url);import{PACKAGE_NAME as l,VERSION as v}from"./chunk-3O76SJJM.mjs";import{spawnSync as m}from"child_process";import s from"fs";import E from"os";import c from"path";function g(){return{BUOY_VERIFY:"auto"}}var w="https://registry.npmjs.org";var f=3e3;function R(e={}){const t=e.cwd??process.cwd();const r=e.skillSrcDir??c.resolve(__dirname,"../skill");const n=e.log??(a=>process.stdout.write(a+"\n"));const o=k(e,n);const i=[];d(c.join(t,".mcp.json"),"mcpServers",o,t,i);s.mkdirSync(c.join(t,".cursor"),{recursive:true});d(c.join(t,".cursor","mcp.json"),"mcpServers",o,t,i);if(s.existsSync(c.join(t,".vscode"))){d(c.join(t,".vscode","mcp.json"),"servers",o,t,i)}D(r,t,i);x(c.join(t,"CLAUDE.md"),t,i);x(c.join(t,"AGENTS.md"),t,i);n("Buoy MCP configuration written:");for(const a of i)n(" \u2022 "+a);n("");n("Next steps:");n(" 1. Restart your editor (or reconnect the MCP server) to load `buoy`.");n(" 2. Sign in: run `npx --package=@buoy-gg/core buoy login` in your app's folder. Then open an app with the required Buoy tools and sync integration.");n(" 3. Confirm the device and tools are available. Free accounts get the basic MCP tools; Pro adds the rest.");n("");n(`Want your AI to use the web too? Run \`npx -y ${l}@latest init --web\` for Buoy Web (free, no account).`);if(o.command==="npx"){n("");n(`The editor launches the server with \`npx -y ${l}@latest\`, so it stays`);n(`Registry access may be needed. Re-run \`npx -y ${l}@latest init\` to refresh configuration.`)}else if(!e.cliPath){n("");n(`This uses a pinned local install (no network on startup). To update it later,`);n(`To update the local package, run: npx -y ${o.args[0]?.replace(/dist[/\\]cli\.js$/,"")??""}@latest init --local`)}}function k(e,t){if(e.cliPath){return{type:"stdio",command:"node",args:[e.cliPath],env:g()}}const r=e.mode??"auto";if(r==="npx"){return y()}if(r==="local"){return $(e,t)}const n=I();if(n.reachable){return y()}t(`\u26A0 npm registry ${n.registry?`(${n.registry}) `:""}looks unreachable \u2014 \`npx @latest\` would hang your editor at startup. Falling back to a pinned local install.`);return $(e,t)}function y(){return{type:"stdio",command:"npx",args:["-y",`${l}@latest`],env:g()}}function $(e,t){const r=e.installDir??process.env.BUOY_MCP_HOME??c.join(E.homedir(),".buoy-mcp");const n=e.registry??w;const o=C(r,n,t);if(o){return{type:"stdio",command:"node",args:[o],env:g()}}t("\u26A0 local install failed \u2014 writing the npx entry instead (see the error above).");return y()}function C(e,t,r){const n=`${l}@${v==="0.0.0-dev"?"latest":v}`;s.mkdirSync(e,{recursive:true});const o=process.platform==="win32"?"npm.cmd":"npm";r(`Installing ${n} into ${e} from ${t} \u2026`);const i=m(o,["install",n,"--prefix",e,"--registry",t,`--@buoy-gg:registry=${t}`,"--no-audit","--no-fund","--loglevel=error"],{stdio:["ignore","ignore","inherit"],encoding:"utf8"});if(i.status!==0){r(`\u26A0 npm install exited with code ${i.status??"?"}${i.error?` (${i.error.message})`:""}.`);return null}const a=c.join(e,"node_modules",l,"dist","cli.js");if(!s.existsSync(a)){r(`\u26A0 install finished but ${a} is missing.`);return null}return a}function I(){const e=P();if(!e)return{reachable:false,registry:null};if(/^https?:\/\/registry\.npmjs\.org\/?$/i.test(e)){return{reachable:true,registry:e}}return{reachable:T(e),registry:e}}function P(){const e=S("@buoy-gg:registry");if(e)return e;const t=S("registry");return t??w}function S(e){const t=process.platform==="win32"?"npm.cmd":"npm";const r=m(t,["config","get",e],{encoding:"utf8",timeout:f});if(r.status!==0||typeof r.stdout!=="string")return null;const n=r.stdout.trim();if(!n||n==="undefined"||n==="null")return null;return n}function T(e){const t=m(process.execPath,["-e",F,e,String(f)],{encoding:"utf8",timeout:f+2e3});return t.status===0}var F=`
|
|
2
2
|
const url = process.argv[1];
|
|
3
3
|
const ms = Number(process.argv[2]) || 3000;
|
|
4
4
|
const c = new AbortController();
|
|
@@ -11,7 +11,7 @@ fetch(url, { method: 'HEAD', signal: c.signal })
|
|
|
11
11
|
clearTimeout(t);
|
|
12
12
|
process.exit(1);
|
|
13
13
|
});
|
|
14
|
-
`;function d(e,t,r,n,o,i="buoy"){let a={};if(s.existsSync(e)){try{a=JSON.parse(s.readFileSync(e,"utf8"))}catch{const
|
|
14
|
+
`;function d(e,t,r,n,o,i="buoy"){let a={};if(s.existsSync(e)){try{a=JSON.parse(s.readFileSync(e,"utf8"))}catch{const b=s.existsSync(e+".bak")?`${e}.${Date.now()}.bak`:`${e}.bak`;s.copyFileSync(e,b);o.push(`existing ${u(e,n)} was invalid JSON \u2014 backed up to ${u(b,n)}`);a={}}}else{s.mkdirSync(c.dirname(e),{recursive:true})}const h=a[t]&&typeof a[t]==="object"?a[t]:{};const j=i in h;h[i]=r;a[t]=h;s.writeFileSync(e,JSON.stringify(a,null,2)+"\n");o.push(`${j?"updated":"added"} \`${i}\` in ${u(e,n)}`)}var p="# Debugging with Buoy";var B=`${p}
|
|
15
15
|
|
|
16
16
|
Use Buoy to inspect a connected app when runtime evidence helps the task.
|
|
17
17
|
Complete account, tool integration and connection setup first. A free app gets
|
|
@@ -45,4 +45,4 @@ only source review or a build was performed.
|
|
|
45
45
|
reminders, \`always\` repeats until checked, and \`never\` disables them.
|
|
46
46
|
A reminder is not a test result. Choose checks appropriate to the change;
|
|
47
47
|
prose-only edits do not require running device actions.
|
|
48
|
-
`;function x(e,t,r){let n="";if(s.existsSync(e)){try{n=s.readFileSync(e,"utf8")}catch{r.push(`\u26A0 could not read ${u(e,t)} \u2014 skipped the debugging guide`);return}if(n.includes(p)){r.push(`${u(e,t)} already has the "${p}" block; preserved existing text. Review it against the current bundled guidance before relying on older instructions.`);return}}const o=n===""?"":n.endsWith("\n")?"\n":"\n\n";try{s.writeFileSync(e,n+o+B);r.push(`${n?"appended":"created"} "${p}" block in ${u(e,t)}`)}catch{r.push(`\u26A0 could not write ${u(e,t)} \u2014 skipped the debugging guide`)}}function D(e,t,r){if(!s.existsSync(e)){r.push("\u26A0 no bundled skills found \u2014 skipped");return}const n=s.readdirSync(e,{withFileTypes:true}).filter(o=>o.isDirectory()&&s.existsSync(c.join(e,o.name,"SKILL.md")));if(n.length===0){r.push("\u26A0 no skills with a SKILL.md found \u2014 skipped");return}for(const o of n){const i=c.join(e,o.name);const a=c.join(t,".claude","skills",o.name);_(i,a);r.push(`installed the ${o.name} skill \u2192 ${u(c.join(a,"SKILL.md"),t)}`)}}function _(e,t){s.mkdirSync(t,{recursive:true});for(const r of s.readdirSync(e,{withFileTypes:true})){const n=c.join(e,r.name);const o=c.join(t,r.name);if(r.isDirectory())_(n,o);else s.copyFileSync(n,o)}}function u(e,t){const r=c.relative(t,e);return r&&!r.startsWith("..")?r:e}export{
|
|
48
|
+
`;function x(e,t,r){let n="";if(s.existsSync(e)){try{n=s.readFileSync(e,"utf8")}catch{r.push(`\u26A0 could not read ${u(e,t)} \u2014 skipped the debugging guide`);return}if(n.includes(p)){r.push(`${u(e,t)} already has the "${p}" block; preserved existing text. Review it against the current bundled guidance before relying on older instructions.`);return}}const o=n===""?"":n.endsWith("\n")?"\n":"\n\n";try{s.writeFileSync(e,n+o+B);r.push(`${n?"appended":"created"} "${p}" block in ${u(e,t)}`)}catch{r.push(`\u26A0 could not write ${u(e,t)} \u2014 skipped the debugging guide`)}}function D(e,t,r){if(!s.existsSync(e)){r.push("\u26A0 no bundled skills found \u2014 skipped");return}const n=s.readdirSync(e,{withFileTypes:true}).filter(o=>o.isDirectory()&&s.existsSync(c.join(e,o.name,"SKILL.md")));if(n.length===0){r.push("\u26A0 no skills with a SKILL.md found \u2014 skipped");return}for(const o of n){const i=c.join(e,o.name);const a=c.join(t,".claude","skills",o.name);_(i,a);r.push(`installed the ${o.name} skill \u2192 ${u(c.join(a,"SKILL.md"),t)}`)}}function _(e,t){s.mkdirSync(t,{recursive:true});for(const r of s.readdirSync(e,{withFileTypes:true})){const n=c.join(e,r.name);const o=c.join(t,r.name);if(r.isDirectory())_(n,o);else s.copyFileSync(n,o)}}function u(e,t){const r=c.relative(t,e);return r&&!r.startsWith("..")?r:e}export{R as runInit,k as resolveEntry,d as upsertMcpConfig};
|