@yawlabs/mcp 0.74.2 → 0.75.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to `@yawlabs/mcp` (formerly `@yawlabs/mcph`) are documented here. This project uses [semantic versioning](https://semver.org) and a script-gated release flow: `./release.sh <version>` runs lint + typecheck + tests + build, bumps, tags, publishes to npm, and publishes `server.json` to the MCP registry.
4
4
 
5
+ ## 0.74.3 -- an absent oam says how to install it, and bundled browsers turn out to be hostable
6
+
7
+ **Added -- the two surfaces that reported an absent oam now say what to do about it**
8
+
9
+ `doctor`'s OAM RUNTIME section ended at `binary: not installed` -- the one line a reader opens doctor to act on, and the only branch with no command under it, while its below-min and unusable siblings each print a `fix:`. It now prints `install:` underneath. The label is deliberate: node is a full fallback, so nothing is broken and this is not a repair instruction. `yaw-mcp install` had the matching hole -- its runtime reason-chain explained relative-path, not-durably-installed, below-min and unusable, then fell off the end for plain absence, so the common case on a fresh machine got an npx entry with no line saying an alternative existed.
10
+
11
+ Both name the installer for the platform the report is **about**, not the one it runs on, so `--os windows` hands back the PowerShell one-liner rather than a curl command that machine cannot run. Under `install --all` the note prints once for the run instead of once per client: absence is a machine-level fact and the common case, unlike the rare misconfigurations above it, which still print per client where they belong.
12
+
13
+ **Changed -- bundled browsers are oam-hostable, and the source said they were not**
14
+
15
+ The compat note in `oam-spawn.ts` called servers with bundled browsers "not oam-hostable yet" and framed oam as an opt-in tier it stopped being two releases ago. Measured against oam 0.9.0: `@modelcontextprotocol/server-puppeteer` and `@playwright/mcp` each launch a real Chromium and navigate hosted on oam, identical in outcome to the node control. oam 0.9.0 is what changed it -- before that release `child_process` ignored `stdio` entirely, which is exactly the npm bin-shim shape every sidecar launches through, so they booted and then sat mute forever. `MIN_OAM_VERSION` gates that fix in. Native addons (ssh2) are marked unverified rather than promoted to either claim.
16
+
5
17
  ## 0.74.2 -- the oam floor moves to 0.9.0, and a full-pass sweep of the runtime
6
18
 
7
19
  **Changed -- the oam floor moves to 0.9.0**
@@ -112,6 +112,11 @@ function npxSpec(args) {
112
112
  return spec.startsWith("-") ? null : spec;
113
113
  }
114
114
  var MIN_OAM_VERSION = "0.9.0";
115
+ var OAM_INSTALL_SH = "curl -fsSL https://oamjs.org/install.sh | sh";
116
+ var OAM_INSTALL_PS1 = "irm https://oamjs.org/install.ps1 | iex";
117
+ function oamInstallCommand(os) {
118
+ return os === "windows" ? OAM_INSTALL_PS1 : OAM_INSTALL_SH;
119
+ }
115
120
  var warnedOamUnavailable = false;
116
121
  function oamFailureLabel(failure) {
117
122
  if (failure === "timeout") return "`oam --version` did not answer in time";
@@ -670,8 +675,12 @@ async function resolveOamSpawn(command, args, optedIn = true) {
670
675
  });
671
676
  } else {
672
677
  log("warn", "a server opted in to oam but oam is not installed; running it on node instead", {
673
- install: "curl -fsSL https://oamjs.org/install.sh | sh",
674
- installWindows: "irm https://oamjs.org/install.ps1 | iex",
678
+ // Both, not oamInstallCommand(CURRENT_OS): this is a structured log
679
+ // line read off a server's stderr, which is routinely a different
680
+ // machine from the one reading it. The rendered REPORTS (doctor,
681
+ // install) are the surfaces that know which platform they are about.
682
+ install: OAM_INSTALL_SH,
683
+ installWindows: OAM_INSTALL_PS1,
675
684
  overrideWith: "OAM_BIN"
676
685
  });
677
686
  }
@@ -720,6 +729,9 @@ export {
720
729
  npxSpecIndex,
721
730
  npxSpec,
722
731
  MIN_OAM_VERSION,
732
+ OAM_INSTALL_SH,
733
+ OAM_INSTALL_PS1,
734
+ oamInstallCommand,
723
735
  oamFailureLabel,
724
736
  parseOamVersion,
725
737
  compareVersions,
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  npxSpec,
15
15
  npxSpecIndex,
16
16
  oamFailureLabel,
17
+ oamInstallCommand,
17
18
  packageName,
18
19
  probeOam,
19
20
  resolveOamSpawn,
@@ -22,7 +23,7 @@ import {
22
23
  sidecarsRoot,
23
24
  specConstraint,
24
25
  userConfigDir
25
- } from "./chunk-DVKQKFZQ.js";
26
+ } from "./chunk-VHPGG3GN.js";
26
27
 
27
28
  // src/audit-cmd.ts
28
29
  import { homedir as homedir4 } from "os";
@@ -3219,6 +3220,12 @@ import { homedir as homedir8 } from "os";
3219
3220
  import { resolve as resolve5 } from "path";
3220
3221
  import { createInterface } from "readline/promises";
3221
3222
  import { Writable } from "stream";
3223
+ function oamAbsentNote(os) {
3224
+ return `Runtime: node (oam is not installed, which is fine -- node is the supported default. To host yaw-mcp on oam instead: \`${oamInstallCommand(os)}\`, then re-run install.)`;
3225
+ }
3226
+ function oamIsAbsent(probe) {
3227
+ return probe.bin === null && probe.binPath === null && !probe.belowMin && probe.failure === null;
3228
+ }
3222
3229
  var USAGE = "Usage: yaw-mcp install <claude-code|claude-desktop|cursor|vscode> [--scope user|project|local]\n [--project-dir <path>] [--os macos|linux|windows]\n [--force | --skip] [--dry-run]\n yaw-mcp install --list (detect clients; no writes)\n yaw-mcp install --all (install into every client available on this OS)\n\n Deprecated (accepted, ignored, warns): --token <mcp_pat_\u2026>, --no-yaw-mcp-config.\n yaw-mcp is local-only -- it stores no token and never writes ~/.yaw-mcp/config.json.\n Configure servers in ~/.yaw-mcp/bundles.json (see `yaw-mcp add <slug>`).";
3223
3230
  var TOKEN_FLAG_DEPRECATION = "yaw-mcp install: --token is deprecated and ignored -- yaw-mcp is local-only and no longer stores a token. Drop the flag, and revoke that PAT at its source -- dropping it here does not deactivate it.";
3224
3231
  var NO_CONFIG_FLAG_DEPRECATION = "yaw-mcp install: --no-yaw-mcp-config is deprecated and ignored -- install no longer writes ~/.yaw-mcp/config.json at all, so there is nothing to suppress.";
@@ -3322,6 +3329,8 @@ ${USAGE}`);
3322
3329
  log2(
3323
3330
  `Runtime: node (oam is installed but unusable: ${oamFailureLabel(oamProbeResult.failure)}${oamProbeResult.failureDetail ? ` -- ${oamProbeResult.failureDetail}` : ""}. Fix or reinstall oam and re-run install to host yaw-mcp on it.)`
3324
3331
  );
3332
+ } else if (!opts.suppressOamAbsentNote) {
3333
+ log2(oamAbsentNote(os));
3325
3334
  }
3326
3335
  const containerPath = resolved.containerPath;
3327
3336
  let existing = {};
@@ -3845,6 +3854,8 @@ async function runInstallAll(opts, log2, err, messages) {
3845
3854
  // Without this the user gets one notice per client.
3846
3855
  token: void 0,
3847
3856
  skipYawMcpConfig: void 0,
3857
+ // Same consolidation, one line down: printed once after the loop.
3858
+ suppressOamAbsentNote: true,
3848
3859
  clientId: plan.clientId,
3849
3860
  scope: plan.scope,
3850
3861
  io: { ...baseIo, stderr: subStderr }
@@ -3857,6 +3868,7 @@ async function runInstallAll(opts, log2, err, messages) {
3857
3868
  else failed += 1;
3858
3869
  log2("");
3859
3870
  }
3871
+ if (oamIsAbsent(await (opts.oamProbe ?? probeOam)())) log2(oamAbsentNote(os));
3860
3872
  if (collisionClients.length > 0) {
3861
3873
  err(
3862
3874
  `yaw-mcp install --all: ${collisionClients.length} client${collisionClients.length === 1 ? "" : "s"} already have a "${ENTRY_NAME}" entry (${collisionClients.join(", ")}) and stdin is not a TTY.
@@ -4657,7 +4669,7 @@ async function fetchLatestVersion(opts = {}) {
4657
4669
  async function oamFloorLines(probe) {
4658
4670
  if (!probe && process.env.VITEST) return [];
4659
4671
  try {
4660
- const { MIN_OAM_VERSION: MIN_OAM_VERSION2, probeOam: probeOam2 } = await import("./oam-spawn-2PRQ5HCE.js");
4672
+ const { MIN_OAM_VERSION: MIN_OAM_VERSION2, probeOam: probeOam2 } = await import("./oam-spawn-Z5CASEBY.js");
4661
4673
  const oam = probe ? await probe() : await probeOam2();
4662
4674
  if (!oam.belowMin) return [];
4663
4675
  return [
@@ -4805,7 +4817,7 @@ async function runUpgrade(opts = {}) {
4805
4817
  return { exitCode: 3, lines };
4806
4818
  }
4807
4819
  function readCurrentVersion() {
4808
- return true ? "0.74.2" : "dev";
4820
+ return true ? "0.75.0" : "dev";
4809
4821
  }
4810
4822
 
4811
4823
  // src/learning.ts
@@ -5039,7 +5051,7 @@ function foldBundleWarnings(warnings, probe) {
5039
5051
  const prefix = `${probe.path}:`;
5040
5052
  return warnings.filter((w) => !w.startsWith(prefix));
5041
5053
  }
5042
- var VERSION = true ? "0.74.2" : "dev";
5054
+ var VERSION = true ? "0.75.0" : "dev";
5043
5055
  async function runDoctor(opts = {}) {
5044
5056
  if (opts.json) return runDoctorJson(opts);
5045
5057
  const lines = [];
@@ -5075,7 +5087,7 @@ async function runDoctor(opts = {}) {
5075
5087
  renderEnvSection({ env, print });
5076
5088
  const oamStatus = await collectOamRuntimeStatus({ env, cwd, home, probeFn: opts.oamProbe ?? probeOam });
5077
5089
  config.warnings = [...config.warnings, ...foldBundleWarnings(oamStatus.bundleWarnings, trustProbe)];
5078
- renderOamRuntimeSection({ status: oamStatus, print });
5090
+ renderOamRuntimeSection({ status: oamStatus, print, os });
5079
5091
  const persistenceDisabled = isPersistenceDisabled(env);
5080
5092
  const stateFilePath = join9(userConfigDir(home), STATE_FILENAME);
5081
5093
  const statePeek = persistenceDisabled ? null : await peekStateFile(stateFilePath);
@@ -5393,6 +5405,7 @@ function renderOamRuntimeSection(opts) {
5393
5405
  print(" fix: run `oam --version` by hand; OAM_BIN overrides which binary is probed");
5394
5406
  } else if (probe.bin === null) {
5395
5407
  print(" binary: not installed \u2014 node/npx spawns are used directly");
5408
+ print(` install: ${oamInstallCommand(opts.os)}`);
5396
5409
  } else if (probe.version === null) {
5397
5410
  print(` binary: ${probe.bin} (version unparseable -- min ${MIN_OAM_VERSION} NOT verified, hosting anyway)`);
5398
5411
  } else {
@@ -8558,7 +8571,7 @@ function defaultSpawn2(cmd, args) {
8558
8571
  async function maybeAutoUpgrade(deps = {}) {
8559
8572
  const optOut = process.env.YAW_MCP_AUTO_UPGRADE;
8560
8573
  if (optOut === "0" || optOut?.toLowerCase() === "false") return;
8561
- const current = deps.currentVersion ?? (true ? "0.74.2" : "dev");
8574
+ const current = deps.currentVersion ?? (true ? "0.75.0" : "dev");
8562
8575
  if (current === "dev") return;
8563
8576
  const method = (deps.isSeaImpl ? await deps.isSeaImpl() : await detectSea()) ? "binary" : detectInstallMethod(deps.argvPath ?? process.argv[1]);
8564
8577
  const latest = await (deps.fetchLatestImpl ?? fetchLatestVersion)();
@@ -9651,7 +9664,7 @@ function deferredDescription(server, cachedDesc) {
9651
9664
 
9652
9665
  ${suffix}` : suffix;
9653
9666
  }
9654
- function buildToolList(activeConnections, inactiveWithCache = [], toolFilters) {
9667
+ function buildToolList(activeConnections, inactiveWithCache = [], toolFilters, exposure = "full", exposedNamespaces) {
9655
9668
  const tools = [];
9656
9669
  const seen = /* @__PURE__ */ new Set();
9657
9670
  for (const meta of Object.values(META_TOOLS)) {
@@ -9664,6 +9677,7 @@ function buildToolList(activeConnections, inactiveWithCache = [], toolFilters) {
9664
9677
  seen.add(meta.name);
9665
9678
  }
9666
9679
  for (const conn of activeConnections.values()) {
9680
+ if (exposure === "gateway" && !exposedNamespaces?.has(conn.config.namespace)) continue;
9667
9681
  const filter = toolFilters?.get(conn.config.namespace);
9668
9682
  for (const tool of conn.tools) {
9669
9683
  if (filter && !filter.has(tool.name)) continue;
@@ -9680,6 +9694,7 @@ function buildToolList(activeConnections, inactiveWithCache = [], toolFilters) {
9680
9694
  for (const server of inactiveWithCache) {
9681
9695
  if (activeConnections.has(server.namespace)) continue;
9682
9696
  if (!server.toolCache || server.toolCache.length === 0) continue;
9697
+ if (exposure === "gateway") continue;
9683
9698
  const filter = toolFilters?.get(server.namespace);
9684
9699
  for (const cached of server.toolCache) {
9685
9700
  if (filter && !filter.has(cached.name)) continue;
@@ -10898,7 +10913,7 @@ async function connectToUpstream(config, onDisconnect, onListChanged) {
10898
10913
  }
10899
10914
  async function connectToUpstreamOnce(config, onDisconnect, onListChanged, attempt, disableOamRewrite) {
10900
10915
  const client = new Client(
10901
- { name: "yaw-mcp", version: true ? "0.74.2" : "dev" },
10916
+ { name: "yaw-mcp", version: true ? "0.75.0" : "dev" },
10902
10917
  { capabilities: {} }
10903
10918
  );
10904
10919
  let transport;
@@ -11200,6 +11215,13 @@ function isAutoLoadEnabled() {
11200
11215
  if (raw === void 0 || raw === "") return false;
11201
11216
  return raw === "1" || raw.toLowerCase() === "true";
11202
11217
  }
11218
+ function resolveToolExposure() {
11219
+ const raw = process.env.YAW_MCP_TOOL_EXPOSURE?.trim().toLowerCase();
11220
+ if (raw === "full") return "full";
11221
+ if (raw === void 0 || raw === "" || raw === "gateway") return "gateway";
11222
+ log("warn", `unrecognized YAW_MCP_TOOL_EXPOSURE "${raw}"; using "gateway"`, { raw });
11223
+ return "gateway";
11224
+ }
11203
11225
  var DEFAULT_IDLE_CALL_THRESHOLD = 10;
11204
11226
  function resolveIdleThreshold() {
11205
11227
  const current = process.env.YAW_MCP_IDLE_THRESHOLD;
@@ -11326,6 +11348,14 @@ var ConnectServer = class _ConnectServer {
11326
11348
  // still reach unlisted tools. Cleared on activate-without-tools of the
11327
11349
  // same namespace, on deactivate, and on config reconcile.
11328
11350
  toolFilters = /* @__PURE__ */ new Map();
11351
+ // Namespaces the CLIENT explicitly activated this session. In gateway mode
11352
+ // (the default) this is the entire surface tools/list advertises beyond the
11353
+ // meta-tools. Deliberately NOT the same question as "is it connected":
11354
+ // prewarmDormantServers spawns dormant servers on its own, so keying on
11355
+ // connectedness would re-advertise the whole catalog and defeat the mode.
11356
+ // Session-scoped on purpose -- it is not persisted, so a new session starts
11357
+ // at the meta-tools again and the client re-asks for what it needs.
11358
+ sessionActivated = /* @__PURE__ */ new Set();
11329
11359
  profile = null;
11330
11360
  // Shadow-driven install-nudge gate. Resolved once at start() from the
11331
11361
  // env override (YAW_MCP_INSTALL_NUDGE=1) OR config (installNudge: true);
@@ -11452,7 +11482,7 @@ var ConnectServer = class _ConnectServer {
11452
11482
  static SHUTDOWN_DRAIN_MS = 2e3;
11453
11483
  constructor() {
11454
11484
  this.server = new Server(
11455
- { name: "yaw-mcp", version: true ? "0.74.2" : "dev" },
11485
+ { name: "yaw-mcp", version: true ? "0.75.0" : "dev" },
11456
11486
  {
11457
11487
  capabilities: {
11458
11488
  tools: { listChanged: true },
@@ -11492,7 +11522,13 @@ var ConnectServer = class _ConnectServer {
11492
11522
  }
11493
11523
  setupHandlers() {
11494
11524
  this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
11495
- tools: buildToolList(this.connections, this.getDeferredServers(), this.toolFilters)
11525
+ tools: buildToolList(
11526
+ this.connections,
11527
+ this.getDeferredServers(),
11528
+ this.toolFilters,
11529
+ resolveToolExposure(),
11530
+ this.sessionActivated
11531
+ )
11496
11532
  }));
11497
11533
  this.server.setRequestHandler(CallToolRequestSchema, async (request2, extra) => {
11498
11534
  const { name, arguments: args } = request2.params;
@@ -12658,6 +12694,7 @@ ${activeCount} loaded in this session, ${totalTools} tools in context${tokenSumm
12658
12694
  const r = await this.activateOne(namespace, progress);
12659
12695
  results.push(r.message);
12660
12696
  if (r.isChanged) anyChanged = true;
12697
+ if (r.ok) this.sessionActivated.add(namespace);
12661
12698
  if (!r.ok) {
12662
12699
  if (r.capped) anyCapped = true;
12663
12700
  else anyError = true;
@@ -12841,6 +12878,7 @@ ${activeCount} loaded in this session, ${totalTools} tools in context${tokenSumm
12841
12878
  this.idleCallCounts.delete(namespace);
12842
12879
  this.adaptiveSkipLogged.delete(namespace);
12843
12880
  this.toolFilters.delete(namespace);
12881
+ this.sessionActivated.delete(namespace);
12844
12882
  anyChanged = true;
12845
12883
  results.push(`Unloaded "${namespace}". Tools removed from context.`);
12846
12884
  }
@@ -13842,7 +13880,7 @@ if (subcommand === "compliance") {
13842
13880
  `);
13843
13881
  process.exitCode = 0;
13844
13882
  } else if (subcommand === "--version" || subcommand === "-V") {
13845
- process.stdout.write(`yaw-mcp ${true ? "0.74.2" : "dev"}
13883
+ process.stdout.write(`yaw-mcp ${true ? "0.75.0" : "dev"}
13846
13884
  `);
13847
13885
  process.exitCode = 0;
13848
13886
  } else if (subcommand && !subcommand.startsWith("-")) {
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  MIN_OAM_VERSION,
4
+ OAM_INSTALL_PS1,
5
+ OAM_INSTALL_SH,
4
6
  OAM_PROBE_KILL_SIGNAL,
5
7
  OAM_PROBE_MAX_OUTPUT,
6
8
  OAM_PROBE_TIMEOUT_MS,
@@ -16,6 +18,7 @@ import {
16
18
  npxSpec,
17
19
  npxSpecIndex,
18
20
  oamFailureLabel,
21
+ oamInstallCommand,
19
22
  ownNodeModules,
20
23
  packageName,
21
24
  parseOamVersion,
@@ -30,9 +33,11 @@ import {
30
33
  rewriteForOam,
31
34
  specConstraint,
32
35
  winNormalize
33
- } from "./chunk-DVKQKFZQ.js";
36
+ } from "./chunk-VHPGG3GN.js";
34
37
  export {
35
38
  MIN_OAM_VERSION,
39
+ OAM_INSTALL_PS1,
40
+ OAM_INSTALL_SH,
36
41
  OAM_PROBE_KILL_SIGNAL,
37
42
  OAM_PROBE_MAX_OUTPUT,
38
43
  OAM_PROBE_TIMEOUT_MS,
@@ -48,6 +53,7 @@ export {
48
53
  npxSpec,
49
54
  npxSpecIndex,
50
55
  oamFailureLabel,
56
+ oamInstallCommand,
51
57
  ownNodeModules,
52
58
  packageName,
53
59
  parseOamVersion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/mcp",
3
- "version": "0.74.2",
3
+ "version": "0.75.0",
4
4
  "mcpName": "io.github.YawLabs/mcp",
5
5
  "description": "Yaw MCP -- MCP servers, managed. Free to run locally; Yaw Team adds cross-machine sync.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",