@buoy-gg/mcp 7.0.76 → 7.0.78

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.
@@ -1,4 +1,4 @@
1
- import{createRequire as A}from"module";const G=A(import.meta.url);import{PACKAGE_NAME as l,VERSION as b}from"./chunk-KJOH5NDI.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 C(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. Complete account setup, 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=R(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 R(e,t,r){const n=`${l}@${b==="0.0.0-dev"?"latest":b}`;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=`
1
+ import{createRequire as A}from"module";const G=A(import.meta.url);import{PACKAGE_NAME as l,VERSION as v}from"./chunk-3STZVJQG.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 v=s.existsSync(e+".bak")?`${e}.${Date.now()}.bak`:`${e}.bak`;s.copyFileSync(e,v);o.push(`existing ${u(e,n)} was invalid JSON \u2014 backed up to ${u(v,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}
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{C as runInit,k as resolveEntry,d as upsertMcpConfig};
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};