@yawlabs/mcp 1.0.10 → 1.0.11
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 +148 -17
- package/README.md +14 -10
- package/dist/{auto-upgrade-U5CXWGIO.js → auto-upgrade-7I36MDXV.js} +1 -1
- package/dist/{chunk-UTRRLFLD.js → chunk-FIEXTOHT.js} +41 -13
- package/dist/index.js +799 -334
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,120 @@
|
|
|
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
|
-
##
|
|
5
|
+
## 1.0.11 -- the oam floor moves to 0.16.4, the vault passphrase is never typed into a visible field, and one slow `oam --version` no longer parks every sidecar on node
|
|
6
|
+
|
|
7
|
+
Published 2026-09-21, the day after 1.0.10, alongside oam 0.16.4. Eleven entries below: the floor moves to 0.16.4 -- the first move made by `npm run verify:oam-floor`, which now is the one thing that raises it, in place of `release.sh` mirroring whatever oam last published; the startup heal gains its off switch and reads every client config `doctor` does (the npx-cache pre-warm it replaced never ran and is removed); the in-session vault prompt moves onto a masked page served on 127.0.0.1 and the CLI refuses to prompt where echo cannot be turned off; a timed-out oam probe is retried once, the heap-cap hint stops naming a default it cannot know, and the below-floor advice says to restart a running broker. This file and the README also catch up with 1.0.3 through 1.0.10, whose headings were written here, late.
|
|
8
|
+
|
|
9
|
+
**Removed -- the startup npx-cache pre-warm, which never ran**
|
|
10
|
+
|
|
11
|
+
1.0.7 added a fire-and-forget pass on `serve` start that was to run `npx -y <pkg>@latest --version` once per configured npx server, so the first activation of a session did not pay the cold-cache tax, and documented it here and in the README with `YAW_MCP_AUTO_PREWARM`, `YAW_MCP_MAX_AUTO_PREWARM` and `YAW_MCP_AUTO_PREWARM_TIMEOUT`. The call passed no server list, so the pass saw zero npx packages and returned on every start: it has not primed a cache on any machine, and the README's "once-per-startup pre-warm" was an outbound call that did not happen. Wiring it as written would have spawned up to twenty parallel `npx` children -- a registry hit and a package boot each -- on EVERY broker start, and Yaw Terminal starts one broker per pane; and its stated goal was unreachable from that point anyway, because `server.connect` had already completed before the pass fired. The module, its three variables and the claims are gone. Setting any of the three variables now does nothing, which is exactly what it did before. A once-a-day warm, if one is wanted, belongs in an explicit verb the app runs at launch, not on the serve hot path.
|
|
12
|
+
|
|
13
|
+
**Fixed -- `YAW_MCP_AUTO_HEAL=false` turns the startup heal off, and `=0` does so from `cmd.exe`**
|
|
14
|
+
|
|
15
|
+
The five `YAW_MCP_*` opt-outs that ship on by default -- `AUTO_UPGRADE`, `SIDECAR_REFRESH`, `AUTO_HEAL`, `PREWARM` and `CONFIG_RELOAD` -- each parsed their variable with their own copy of the check, and each copy carried a comment promising to match the others. They did not. `YAW_MCP_AUTO_HEAL` accepted only a bare `0`, so `=false` left the heal running; and `AUTO_HEAL`, `AUTO_UPGRADE`, `SIDECAR_REFRESH` and `CONFIG_RELOAD` compared the value untrimmed, so the `0 ` (trailing space) that `cmd.exe`'s `set VAR=0 && yaw-mcp serve` delivers was not an opt-out for any of them -- silently, since the variable reads as set everywhere the user can look. All five now go through one parser: `0` or `false`, any case, surrounding whitespace ignored, turns the feature off; anything else -- unset, empty, `1`, `true`, `no`, `off`, `00`, `0abc` -- leaves it on. Nothing that turned a feature off before stops doing so.
|
|
16
|
+
|
|
17
|
+
**Fixed -- the startup heal inspects the same client configs `doctor` does: env redirects, and every Cline copy**
|
|
18
|
+
|
|
19
|
+
The stale-entry sweep that runs on every `serve` start (and behind `yaw-mcp heal`) built its list of client config files from its own options alone, and neither caller supplied any -- so under `CLAUDE_CONFIG_DIR` (every Yaw Terminal pane), `CODEX_HOME`, a redirected `%APPDATA%`, `CLINE_MCP_SETTINGS_PATH` / `CLINE_DATA_DIR` / `CLINE_DIR` or `CONTINUE_GLOBAL_DIR`, it inspected the DEFAULT path, printed `No stale yaw-mcp entries found`, and `doctor` went on flagging the dead entry in the redirected file. It now reads every client redirect through the one reader `doctor` and `install` use, and chooses `%APPDATA%` the way they do. It also walks every file a client declares rather than the first: Cline is one (client, scope) fanned out to a shared file plus one copy per editor its extension has run in, and `install` writes all of them, so a dead entry in an editor copy was never repaired. `heal --json` can therefore now list more than one `cline` entry in `healed`, one per file.
|
|
20
|
+
|
|
21
|
+
**Changed -- the oam floor is the last VERIFIED oam release, and `release.sh` no longer moves it**
|
|
22
|
+
|
|
23
|
+
`MIN_OAM_VERSION` moved 0.16.1 -> 0.16.2 -> 0.16.3 in five days (1.0.6, 1.0.9, 1.0.10) because `release.sh` read GitHub's latest oam release before every release and moved the floor to it in a commit of its own, running nothing -- each of those blocks says so. Every move cost every machine that had not run `oam self-update`: its node/npx sidecars fell back to node with a warning, and `install` and `heal` wrote npx entries for the broker instead of oam ones -- the slow spawn shape oam hosting exists to avoid -- for oam releases that changed nothing the hosting mechanism depends on. typed users paid the same fallback, since typed's preload launches the same broker binary.
|
|
24
|
+
|
|
25
|
+
The floor is now the last oam release the hosting mechanism was verified on, and `npm run verify:oam-floor` (`scripts/verify-oam-floor.mjs`) is the only thing that raises it. It hosts a real stdio `@modelcontextprotocol/sdk` server (`scripts/oam-floor-probe-server.mjs`) on this machine's oam through `oam run` and completes initialize + tools/list + tools/call. With no flag it passes when the installed oam is at or above the floor, and fails -- naming the fix -- when oam is absent (the installer; the script installs nothing itself), when `OAM_BIN` names a path that does not exist, when oam cannot host the server, or when it is below the floor (`oam self-update`). With `--raise` it also moves `MIN_OAM_VERSION`, the ratchet literal in `oam-spawn.test.ts` and a CHANGELOG block to the installed version -- all three validated before any is written, a prerelease refused, nothing committed. `release.sh` runs the check (never the raise) in step 1 beside lint, typecheck and tests, reads nothing from GitHub, and commits nothing ahead of the version bump; `SKIP_OAM_FLOOR_VERIFY=1` is its documented last resort for a release machine without a working oam, and `ALLOW_STALE_OAM_FLOOR` is gone with the GitHub read it excused. `OAM_BIN` picks the binary the check runs, as it does for the broker.
|
|
26
|
+
|
|
27
|
+
The floor itself does not move in this release: 0.16.3 passed the check on 2026-09-21. What changes for a user is that the next oam release no longer moves it on its own.
|
|
28
|
+
|
|
29
|
+
**Fixed -- this file and the README catch up with 1.0.3 through 1.0.10**
|
|
30
|
+
|
|
31
|
+
The newest heading here read `## Unreleased` from 1.0.3 through 1.0.10, so eight releases shared one section with no version boundaries, and 1.0.9's `heal` work -- three commits, a new verb and a new environment variable -- was in neither this file nor the README. The sections below are cut at the dates `git tag` records; 1.0.4 and 1.0.9 are written late, and say so. The 1.0.8 entry said the broker never reads `YAW_MCP_READONLY_DIAGNOSTICS`; that stopped being true in 1.0.9, and the entry now says what reads it. The README gains `yaw-mcp heal` in the CLI section and `YAW_MCP_AUTO_HEAL` in the environment table, and its `YAW_MCP_READONLY_DIAGNOSTICS` row names the heal pass among what the variable turns off.
|
|
32
|
+
|
|
33
|
+
**Fixed -- one slow `oam --version` no longer hosts every sidecar on node until the broker restarts**
|
|
34
|
+
|
|
35
|
+
The oam probe (`oam --version`, 3 s) runs once per process and its answer is kept for the life of that process. On a saturated machine a probe can lapse while oam sits on disk working -- under one such load `node --version` overran the same 3 s -- and that one lapse hosted every node/npx sidecar on node until the broker restarted, with one warn to say so. A timed-out probe is now retried once before the answer is decided, the way the uv PATH probe already is. Only a timeout is retried: an absent oam (ENOENT), a non-zero exit and a binary that cannot be executed are real answers and are cached on the first attempt, so a machine without oam pays nothing. The retry runs inside the one in-flight probe that concurrent connects share, and before the connect timer is armed, so it is not charged against `MCP_CONNECT_TIMEOUT` or a server's `connectTimeoutMs`.
|
|
36
|
+
|
|
37
|
+
What changes on a machine whose oam really is wedged: the first probe of a process -- the first connect of a session, or a `yaw-mcp doctor`, `install` or `sidecars install` run -- waits two 3 s windows instead of one before falling back to node, and leaves two detached probe children instead of one. The warn now reads ``oam did not respond to --version twice; falling back to node for this process``; a first timeout that the retry answers logs at debug only, since nothing fell back. There is no switch for the retry on its own: `"runtime": "node"` on a server, or `YAW_MCP_DEFAULT_RUNTIME=node` / `defaultRuntime` in `bundles.json` for every server that has not opted into oam, skips the probe for those servers, and both windows with it, exactly as before.
|
|
38
|
+
|
|
39
|
+
**Fixed -- the heap-cap hint stops naming a 4 GiB default that a memory-limited container does not have**
|
|
40
|
+
|
|
41
|
+
When an oam-hosted server dies with `error[OAM-RT-OOM]`, the message named the fix and said `(oam defaults to 4 GiB)`. That is oam's default only outside a Linux cgroup memory limit: inside one, oam caps the heap at 75% of the limit whenever that figure lands between 128 MiB and 4 GiB, so in such a container the number was wrong. The hint now reads ``The oam-hosted child hit its V8 heap cap. Raise it with OAM_MAX_HEAP_MB=<mb> in this server's env, or set "runtime": "node" for this server in bundles.json.`` and names no default at all: oam's own banner is the last thing on the stderr tail the same message carries, and it states the cap that applied and where it came from (the env, the container limit, or the default). The `OAM_MAX_HEAP_MB` row in `yaw-mcp --help` and in the README says `4 GiB by default; can be lower inside a memory-limited Linux container` instead of dating the default to oam 0.9.2, which no oam at or above the floor predates.
|
|
42
|
+
|
|
43
|
+
**Fixed -- the below-floor advice says a running broker has to be restarted after `oam self-update`**
|
|
44
|
+
|
|
45
|
+
The oam probe's answer is kept for the life of the broker process, so a broker that saw an oam below the floor keeps hosting every sidecar on node after `oam self-update`, while a fresh `yaw-mcp doctor` probes again and reports green. The only surface that said so was the broker's own stderr warn, which MCP clients hide. `doctor`'s OAM RUNTIME section now prints `then: restart yaw-mcp -- a running broker keeps its oam probe for its lifetime` under `fix: oam self-update`, `upgrade`'s floor note says the same after its `oam self-update` line, and `install`'s below-floor Runtime line names `oam self-update` instead of the generic "upgrade oam".
|
|
46
|
+
|
|
47
|
+
**Fixed -- the in-session vault passphrase prompt stops showing the passphrase in plain text while it is typed**
|
|
48
|
+
|
|
49
|
+
When a server's env references `${secret:NAME}` and the vault is locked, the broker asks for the passphrase in-session. It asked with a form-mode MCP elicitation carrying a string field, and a client renders that as an ordinary visible text input: the passphrase sat on screen, in plain text, while it was typed. The MCP specification (2025-11-25) says servers must not use form mode for passwords or tokens.
|
|
50
|
+
|
|
51
|
+
The passphrase is now typed into a masked field (`<input type="password">`) on a one-shot page the broker serves on `127.0.0.1`, and no client dialog carries a field for it:
|
|
52
|
+
|
|
53
|
+
- A client that declares URL-mode elicitation gets a URL-mode prompt for the page, and opens it itself. When the page takes a passphrase or expires, the broker sends `notifications/elicitation/complete`.
|
|
54
|
+
- A client with form mode only -- Claude Code 2.1.278 declares `elicitation: {}` -- gets a form with no fields, as a yes/no consent. On yes, the broker opens the page in the default browser: `%SystemRoot%\System32\rundll32.exe url.dll,FileProtocolHandler` on Windows, `/usr/bin/open` on macOS, `xdg-open` elsewhere when `DISPLAY` or `WAYLAND_DISPLAY` is set. When no browser can be opened, the activation fails with a message naming `YAW_MCP_VAULT_PASSPHRASE`, and the session does not ask again.
|
|
55
|
+
|
|
56
|
+
The page listens on a random port with a 256-bit random token as its path. It refuses a Host header other than `127.0.0.1:<port>` (DNS rebinding) and a cross-origin POST, reads the value from a form POST body only -- never from a query string -- takes one submission, and closes after 3 minutes if nobody submits. It sends no CORS headers, `Cache-Control: no-store`, and a CSP that allows no script and no framing. Neither the request body nor the token is logged, and nothing is written to stdout. Shutdown closes a page that is still waiting, opens no browser for it, and refuses the activation with the usual `yaw-mcp is shutting down` message rather than reporting a locked vault.
|
|
57
|
+
|
|
58
|
+
Unchanged: the passphrase is verified before it is stored, held in memory for the session only, and never reaches the server being started; a session asks at most twice (a rejected typo gets the second ask); a decline ends the asking; concurrent activations share one prompt. An expired page says so and leaves the second ask. A page that cannot start, or a browser that cannot be opened, ends the asking for the session. While the page waits, the activation reports progress every 5 seconds (``Still waiting for the masked entry page -- 10s so far, 170s before it expires``; the time left counts from when the page was opened, before the consent dialog), the same heartbeat a slow spawn gets, so a client that keeps a tool call alive on progress does not give up on the activation while the passphrase is being typed. An activation parked on another one's prompt gets the same ticks (``Still waiting on the vault passphrase prompt already in flight -- 10s so far``).
|
|
59
|
+
|
|
60
|
+
The prompt for a child server's own missing credential (`GITHUB_TOKEN is required` and the like) still asks in a visible form field. Moving it onto the same page is a follow-up.
|
|
61
|
+
|
|
62
|
+
**Fixed -- `yaw-mcp secrets` refuses to prompt when the terminal will not turn echo off**
|
|
63
|
+
|
|
64
|
+
The CLI's passphrase and secret-value prompts turn echo off by putting the terminal in raw mode. When that failed, the reader fell through to a line-buffered read, and the terminal echoed the passphrase in plain text. A no-echo prompt now refuses before writing the prompt or reading a byte: ``Passphrase required. Refusing to prompt: this terminal would not turn echo off, so what you type would be shown on screen. Set YAW_MCP_VAULT_PASSPHRASE instead.`` It exits 1, and under `--json` writes one `{"ok":false,...}` envelope. The value prompt points at `--stdin` instead, and `rotate`'s new-passphrase prompt at `YAW_MCP_VAULT_PASSPHRASE_NEW`. The y/N confirmations, which echo on purpose, are unchanged.
|
|
65
|
+
|
|
66
|
+
**Changed -- the oam floor moves to 0.16.4**
|
|
67
|
+
|
|
68
|
+
`npm run verify:oam-floor` hosted a stdio `@modelcontextprotocol/sdk` server on oam v0.16.4 through `oam run` on 2026-09-21 -- initialize, tools/list and tools/call all completed -- and raised `MIN_OAM_VERSION` to it; the floor was 0.16.3. A machine whose oam is older hosts its node/npx sidecars on node instead, and logs a warning naming both versions, `oam self-update` as the fix, and that yaw-mcp needs a restart afterwards.
|
|
69
|
+
|
|
70
|
+
## 1.0.10 -- the oam floor moves to 0.16.3
|
|
71
|
+
|
|
72
|
+
Published 2026-09-20, two hours after 1.0.9, carrying the floor move below and the version bump: no other change. The move is what `release.sh` did on its own before every release until 1.0.11; the first block under Unreleased says what replaced it.
|
|
73
|
+
|
|
74
|
+
**Changed -- the oam floor moves to 0.16.3**
|
|
75
|
+
|
|
76
|
+
`MIN_OAM_VERSION` tracks the latest oam release as policy, and v0.16.3 is now current (published 2026-09-20); the floor was 0.16.2. A machine whose oam is older hosts its node/npx sidecars on node instead, and logs a warning naming both versions, `oam self-update` as the fix, and that yaw-mcp needs a restart afterwards. `release.sh` moved the floor and wrote this block; it did not re-run the oam hosting check that `src/oam-spawn.ts` describes.
|
|
77
|
+
|
|
78
|
+
## 1.0.9 -- stale broker entries heal themselves, `install` writes a path that survives an app upgrade, and doctor sees through fish and PowerShell wrappers
|
|
79
|
+
|
|
80
|
+
Published 2026-09-20. This section is written late, in 1.0.11: the release shipped with only the floor block below in this file, and nothing in the README, for the three changes above it.
|
|
81
|
+
|
|
82
|
+
**Fixed -- `install` writes a broker entry path that survives an app upgrade**
|
|
83
|
+
|
|
84
|
+
When it can host the broker on oam, `install` persists an absolute path to the broker's own entry file. It derived that path from `import.meta.url`, which Node has already realpathed: a broker launched through `...\scoop\apps\yaw\current\...` reported `...\scoop\apps\yaw\2.1.5\...`, and the version directory is exactly what the app's updater deletes as it installs the next release. So every entry written from inside Yaw Terminal named a file that stopped existing on the next upgrade -- and `oam run` cannot refetch a missing entry file the way `npx` can, so the client could not start the broker at all. It is also why `~/.claude.json` kept working while `~/.codex/config.toml` did not: the app spawns the sidecar by the junction path, so `process.argv[1]` carries it, and the app writes the Claude Code entry from that.
|
|
85
|
+
|
|
86
|
+
The path `install` persists now goes through `stable-entry.ts`, which recovers a spelling of the same file that the updater maintains rather than deletes. Two strategies, cheapest first, both gated on realpath identity so a wrong guess can only ever be a no-op: prefer the `process.argv[1]` spelling when it names the same file (exact, no directory scanning, and it covers the bundled-app case outright); otherwise substitute a sibling symlink for a version-shaped ancestor -- scoop's `current`, an fnm or volta `default`, any `/opt/<app>/current` layout -- with no per-installer table. The walk is deepest-first and substitutes only for a version-shaped segment, because a shallowest-first walk that accepted identity alone rewrote `C:/Users/...` to `C:\Documents and Settings/...`, a hidden compatibility junction whose ACL denies traversal to most processes. A per-launch mount -- an AppImage under `.mount_*` or, without FUSE, `appimage_extracted_*`; a translocated macOS app -- is refused outright, since no spelling of it is durable and no later repair could converge; those installs stay on the npx entry, which re-resolves per spawn.
|
|
87
|
+
|
|
88
|
+
**Added -- `yaw-mcp heal`, and a startup pass that re-points stale broker entries (`YAW_MCP_AUTO_HEAL=0` turns the pass off)**
|
|
89
|
+
|
|
90
|
+
The fix above stops new entries rotting. It does nothing for the ones already on disk, and nothing in the product rewrote a client config on upgrade or at startup -- `doctor` said so in its own words. This is that missing rewrite, on the discipline Yaw Terminal already proved for Claude Code: an absolute path is safe to persist only because the writer can recognise its own previous output and refresh it. Four gates must all pass before a byte is written: the entry is an `oam run` launch whose entry file sits inside a `node_modules/@yawlabs/mcp/` tree (a hand-written entry, a pinned `--package` form, a bare `oam`, or an oam entry for somebody else's server is invisible to the sweep); the entry path is not a regular file (a working entry is never touched, however unusual it looks); `YAW_MCP_READONLY_DIAGNOSTICS` is not set (see below); and the entry was not written for another OS (a WSL session reading a Windows profile passes the shape check and then fails the file check for the wrong reason, because `statSync("C:\...")` from Linux throws -- so `doctor`'s foreign-launch rule is a gate too, checked before the file check, in both directions). The second gate is what makes the pass converge: it is a no-op the instant the entry resolves, so it cannot fight another writer or rewrite in a loop.
|
|
91
|
+
|
|
92
|
+
Two triggers, because neither reaches everyone alone. `serve` runs the sweep fire-and-forget at startup, cross-client by design: the client with the dead entry cannot start the broker, so the repair rides in on a client whose entry still works -- on a Yaw box the app keeps the Claude Code entry live, so a pane spawn is what heals Codex. `yaw-mcp heal [--json] [--dry-run] [--quiet]` is the explicit verb for the case that cannot reach: a user whose only configured client is the broken one, and the command Yaw Terminal runs at app startup for exactly that reason. `YAW_MCP_AUTO_HEAL=0` turns the startup pass off (the same shape as `YAW_MCP_AUTO_PREWARM`), and does not apply to the verb, which the user asked for by name. `YAW_MCP_READONLY_DIAGNOSTICS` applies to both: the flag exists so a diagnostics poll nobody asked for writes nothing, and the heal pass reads it on every `serve` start and writes nothing while it is set -- which is what makes the 1.0.8 sentence "the broker never reads the variable" false from this release on; that entry is corrected below.
|
|
93
|
+
|
|
94
|
+
The rebuilt entry goes through the same `buildLaunchEntry` `install` uses, so it is byte-identical to what `install` would write today, and carries the stored entry's `env` and client-owned fields forward -- Codex's `startup_timeout_sec` survives the repair. When no durable path resolves it falls back to the npx entry, which never dangles; on linux-arm64, where oam publishes no binary, that is always the answer. oam is probed lazily, only when a rewrite is about to happen, so the steady state of "nothing is stale" costs no process spawn on startup. `heal` prints `No stale yaw-mcp entries found.`, or each re-pointed entry with its old and new path and `Restart the affected client(s) to pick this up.`; a config the sweep could not read into -- an unspliceable TOML inline table, a blocked container, an unreadable file -- is listed separately as `could not be checked`, because "nothing to repair" and "I could not check" are different answers and only one of them means the user is fine. Exit 0 for both a clean sweep and a repair; only an unexpected failure exits 1, reported on stderr, so the app can tell a real failure from an older broker that does not know the verb. `--json` returns `{ healed, unhealable, count, dryRun }`. On the `serve` path stdout is untouched: there it is the JSON-RPC transport, and everything reports through the stderr log. `YAW_MCP_AUTO_HEAL` joins `--help`'s Environment block and `doctor`'s ENVIRONMENT section. A cross-platform pass pinned one layout per shape we ship or a supported host produces -- AppImage (FUSE, relocated `TMPDIR`, extract-and-run), macOS (`/Applications`, Homebrew cask, translocated), Linux (deb/rpm, `/usr/lib`), Windows (scoop, Program Files) -- plus decoys that must not match, and stopped `norm()` case-folding paths anywhere but Windows, where folding `/opt/Yaw` into `/opt/yaw` had let the dedupe key collapse two real entries into one and the convergence guard mistake a different path for the old one.
|
|
95
|
+
|
|
96
|
+
**Added -- `doctor` and the heal pass recognise fish and PowerShell wrappers around an oam launch**
|
|
97
|
+
|
|
98
|
+
`install` never writes a wrapped entry -- the `cmd /c` wrap exists for npx's `.cmd` shim, and oam is a real executable -- but a hand-edited config reasonably might, and a broken entry wrapped in `fish -c` or `pwsh -Command` was invisible to both `doctor` and the sweep: it stayed broken and nothing said why. Both recognisers now see through them. fish joins the POSIX branch, since its `-c` takes a single command string exactly like the Bourne family and neither recogniser parses the payload beyond its first whitespace token. PowerShell needed more than a name in a regex: `-Command` takes the rest of the line, not one argument, so the tail is rejoined before tokenising (`pwsh -Command oam run --no-check <path>` works, not only the single-quoted form); any unambiguous prefix names it, so `-c`, `-co` and `-comm` are accepted and `-Confirm` and `-ComputerName` are pinned as not; `-File`, `-EncodedCommand` and a bare script return nothing rather than a guess. The two recognisers still differ on purpose: `isOamLaunch` (the runtime label) strips surrounding quotes and accepts, while `oamArgvTokens` (the entry path `doctor` and the heal pass check) bails on any quote, because half a path fails the exists check and reads as a broken entry, and broken entries are what the heal pass rewrites. The shared predicates now live in one place, so the next shell is a one-place change.
|
|
99
|
+
|
|
100
|
+
**A behaviour change worth naming**: a broken entry wrapped in fish or pwsh is now repaired, and the repair writes the shape `install` writes, so the hand-rolled wrapper does not survive it. Before, such an entry was left alone and stayed broken. Only a non-starting entry is ever touched; a working pwsh-wrapped entry is pinned as untouched. `YAW_MCP_AUTO_HEAL=0` is the way to keep the startup pass off such an entry entirely.
|
|
101
|
+
|
|
102
|
+
**Changed -- the oam floor moves to 0.16.2**
|
|
103
|
+
|
|
104
|
+
`MIN_OAM_VERSION` tracks the latest oam release as policy, and v0.16.2 is now current (published 2026-09-18); the floor was 0.16.1. A machine whose oam is older hosts its node/npx sidecars on node instead, and logs a warning naming both versions, `oam self-update` as the fix, and that yaw-mcp needs a restart afterwards. `release.sh` moved the floor and wrote this block; it did not re-run the oam hosting check that `src/oam-spawn.ts` describes.
|
|
105
|
+
|
|
106
|
+
## 1.0.8 -- `doctor` and `bundles` can run without writing anything
|
|
107
|
+
|
|
108
|
+
Published 2026-09-17.
|
|
109
|
+
|
|
110
|
+
**Changed -- the routing advice moves out of the meta-tool descriptions and into the server's MCP `instructions`**
|
|
111
|
+
|
|
112
|
+
The eleven `mcp_connect_*` meta-tools were 17,929 chars of `tools/list` wire JSON (about 5.1k tokens), 10,849 of them description text, and three of them -- discover, dispatch and exec -- each repeated the same routing advice: prefer dispatch for a concrete task, discover only to browse, read the guide first, load only what the task needs. That text was paid on every `tools/list`, and on a client with no deferred tool loading it was inlined into every request. The broker now sends it once, as the `instructions` string in the MCP `initialize` result (Claude Code puts it in the system prompt as a "MCP Server Instructions" block), and each description says only what its tool does. Measured after: 11,590 wire chars, 5,456 of description; `mcp_connect_exec` went from 3,897 to 2,806 (its description from 2,162 to 1,493). Both totals are pinned in `meta-tools.test.ts` with a ceiling so a description cannot silently regrow. No tool name, schema property, annotation or refusal shape changed; the constants the descriptions quote (`MAX_EXEC_STEPS`, the reliability floor, `YAW_MCP_IDLE_THRESHOLD`) are still interpolated, not retyped.
|
|
113
|
+
|
|
114
|
+
**Added -- a `lite` tool exposure, picked by default for typed-cli**
|
|
115
|
+
|
|
116
|
+
`YAW_MCP_TOOL_EXPOSURE=lite` advertises only `mcp_connect_exec`, `mcp_connect_find_tool` and `mcp_connect_read_tool` (plus the servers loaded this session, gated exactly as under `gateway`). Between them those three reach any installed tool without the client's tool list changing -- find_tool names it, read_tool describes it, exec calls it and loads its server on first use -- which is the set typed-cli's own gateway logic already keeps when it has to cap. The other eight meta-tools are not listed but stay callable by name: lite narrows what `tools/list` advertises, not what `tools/call` accepts.
|
|
117
|
+
|
|
118
|
+
With `YAW_MCP_TOOL_EXPOSURE` unset the broker now reads the client's `clientInfo.name` from the `initialize` request and picks `lite` when it is `typed-cli`, `gateway` for everything else. typed-cli inlines every advertised tool into every request and has no deferred loading, so all eleven meta-tools rode every turn on its hosted tiers; and in the usual Yaw Terminal setup its yaw-mcp entry comes from `~/.claude.json`, which typed cannot add an env var to, so the broker is the only place that could decide this. A set `YAW_MCP_TOOL_EXPOSURE` always wins over the client default -- `gateway` pins a typed-cli session to the full meta-tool set, `lite` opts any other client in -- and an unrecognised value now falls back to that client's default (the warning names which) rather than always to `gateway`. `yaw-mcp --help`, `doctor`'s ENVIRONMENT hint and the README env table describe all three values.
|
|
6
119
|
|
|
7
120
|
**Added -- `YAW_MCP_READONLY_DIAGNOSTICS=1` runs `doctor` and `bundles` without writing anything**
|
|
8
121
|
|
|
@@ -16,7 +129,11 @@ With the variable set (`1` or `true` in any case, surrounding whitespace ignored
|
|
|
16
129
|
|
|
17
130
|
**`doctor --json` gains fields only on a run with the variable set**: a top-level `"readOnly": true`, and `trials.unswept` (`{ slug, clientName, clientPath, markerPath, msSinceExpiry }` per expired trial left in place, possibly empty) with `trials.sweepHint` (one display sentence naming both commands, or `null`). Without the variable, `doctor` (text and `--json`), `bundles` and `status` behave and print exactly as before: the trial sweep and the migration still run, and none of the new fields, lines or warnings appear. The variable is not listed in doctor's ENVIRONMENT section, because its 28-character name would re-pad every line of that section on every ordinary run. A run with it set prints `mode: read-only (YAW_MCP_READONLY_DIAGNOSTICS is set) -- no trial sweep, no config migration` under the header instead.
|
|
18
131
|
|
|
19
|
-
The broker
|
|
132
|
+
The broker's startup config load does not read the variable: it still migrates legacy files even when the variable has leaked into a client's environment, because it is the process that folds them in. (This paragraph used to open with "The broker never reads the variable", which was true of 1.0.8 and stopped being true one release later: since 1.0.9 the broker's startup heal pass reads it on every `serve` start -- gate 3 of that pass, see 1.0.9 -- and writes no client config while it is set. `yaw-mcp heal` honours it the same way. Corrected in 1.0.11.)
|
|
133
|
+
|
|
134
|
+
## 1.0.7 -- a startup pre-warm of `npx -y <pkg>@latest` servers
|
|
135
|
+
|
|
136
|
+
Published 2026-09-16. Besides the block below, the README's intro was edited (1af6a19, a one-line change with no entry of its own).
|
|
20
137
|
|
|
21
138
|
**Added -- a startup pre-warm of `npx -y <pkg>@latest` servers so the first `initialize` of a session does not pay the cold-cache tax**
|
|
22
139
|
|
|
@@ -30,17 +147,17 @@ The spawn mirrors `maybeAutoUpgrade`'s env hygiene (`stripInternalSecretsFromEnv
|
|
|
30
147
|
|
|
31
148
|
**The "first activation" caveat remains for the rare user who skips a pre-warm**: a user on a metered link who sets `YAW_MCP_AUTO_PREWARM=0` and then activates a never-touched-before npx server on a cold `_npx` cache still gets the >30s first-spawn tax. There is no on-demand warm without paying the same tax once, and the only way to remove that case would be a one-time payment on the user's first `activate` of the session -- which IS the cold-cache race, just hidden behind a different layer.
|
|
32
149
|
|
|
33
|
-
|
|
150
|
+
## 1.0.6 -- the oam floor moves to 0.16.1
|
|
34
151
|
|
|
35
|
-
|
|
152
|
+
Published 2026-09-15, carrying the floor move below and the version bump: no other change.
|
|
36
153
|
|
|
37
|
-
|
|
154
|
+
**Changed -- the oam floor moves to 0.16.1**
|
|
38
155
|
|
|
39
|
-
|
|
156
|
+
`MIN_OAM_VERSION` tracks the latest oam release as policy, and v0.16.1 is now current (published 2026-09-15); the floor was 0.15.2. A machine whose oam is older hosts its node/npx sidecars on node instead, and logs a warning naming both versions, `oam self-update` as the fix, and that yaw-mcp needs a restart afterwards. `release.sh` moved the floor and wrote this block; it did not re-run the oam hosting check that `src/oam-spawn.ts` describes.
|
|
40
157
|
|
|
41
|
-
|
|
158
|
+
## 1.0.5 -- `doctor` and `install --list` read a Codex CLI config.toml as TOML
|
|
42
159
|
|
|
43
|
-
|
|
160
|
+
Published 2026-09-14.
|
|
44
161
|
|
|
45
162
|
**Fixed -- doctor and `install --list` read a Codex CLI config.toml as TOML, not as broken JSON**
|
|
46
163
|
|
|
@@ -52,17 +169,31 @@ A `config.toml` that really does not parse is reported in TOML words by `doctor`
|
|
|
52
169
|
|
|
53
170
|
`add`'s "no client is wired" nudge stops for a user whose only wired client is Codex CLI. `try` without `--client` still does not pick a `config.toml`: a trial marker cannot yet clean one up, so auto-detect keeps to JSON-family files. `doctor --json`'s `clients[]` slots gain three additive fields: `syntax` (`"JSON"` or `"TOML"`), `entryUnspliceable` (`{ reason, fix }` for an `mcp` entry install will not edit, or `null`) and `containerUnspliceable` (the same shape for a container that cannot take the entry, or `null`). Every JSON-family slot carries `"JSON"` and two `null`s, so a reader that ignores unknown keys sees no other change; the text CLIENTS lines and the `install --list` rows for JSON and JSONC clients are byte-identical to 1.0.4's.
|
|
54
171
|
|
|
55
|
-
|
|
172
|
+
## 1.0.4 -- review follow-ups to the Windows lock retry
|
|
56
173
|
|
|
57
|
-
|
|
174
|
+
Published 2026-09-13, three hours after 1.0.3, and written late, in 1.0.11: the release corrected two figures in the 1.0.3 entry below and added nothing of its own here.
|
|
58
175
|
|
|
59
|
-
**
|
|
176
|
+
**Fixed -- the Windows lock retry covers the self-upgrade lock's restore, and its figures are measured rather than quoted**
|
|
60
177
|
|
|
61
|
-
|
|
178
|
+
An adversarial review of the 1.0.3 lock change found no bug in the retry itself, and six things that were false or weaker than claimed. The retry on the self-upgrade lock's steal path -- the create that puts a live holder's lock back -- had no test at all: reverting it to a bare `openSync` left all 99 auto-upgrade tests green, while the 1.0.3 commit said every part of the fix had been mutated. A test now injects `EPERM` on that restore and asserts the holder's lock comes back. The grade cache's budget-restart test removed the lock with a real `rmSync` from the test body, so under load an open already in flight could re-create it after the unlink and the second `EPERM` was never thrown -- the mutant that drops the budget reset survived 4 of 80 loaded runs -- and it hard-coded a 1300 ms wait against a private 1 s budget, so raising the constant would have switched the test off. The budget is now a test hook the test passes in, the wait is a `setTimeout`, and the release and the `EPERM` are one scripted step inside the mocked open; the mutant is killed in 15 of 15 runs under load.
|
|
62
179
|
|
|
63
|
-
|
|
180
|
+
Three comments and the 1.0.3 entry carried numbers that did not survive measurement. "225 times in 2000 races" came from one high run and counted failed opens, not races: over 20 runs the count ranged from 20 to 225, most between 40 and 110, and the failure also reproduces across processes. "26 ms in all, paid only when every attempt fails" was wrong on both counts: the three waits measured 31-74 ms idle on Windows and up to about 300 ms under load, they are paid whenever the first three attempts fail, and one acquire can pay them twice. The grade cache's retry-branch comment said the create had failed; it also runs when the create succeeded and the token write or close after it failed. The 1.0.3 entry below carries the corrected figures.
|
|
64
181
|
|
|
65
|
-
|
|
182
|
+
## 1.0.3 -- a fresh Yaw Mode pane names the local-scope entry it will lose, and an audit stops failing on the lock the one before it was releasing
|
|
183
|
+
|
|
184
|
+
Published 2026-09-13, two hours after 1.0.2.
|
|
185
|
+
|
|
186
|
+
**Fixed -- a fresh Yaw Mode pane warns about a local-scope Claude Code entry, and the augment Keeping line stops promising the entry goes home**
|
|
187
|
+
|
|
188
|
+
In a fresh Yaw Mode pane, `install claude-code --scope local` wrote the entry into the overlay's `.claude.json` -- `projects[<dir>]` lives in `<CLAUDE_CONFIG_DIR>/.claude.json`, and a fresh pane keeps nothing of its overlay -- and said nothing about it. It now prints: ``Note: a fresh Yaw Mode pane does not keep its config dir, so the Claude Code entry in <overlay>/.claude.json goes when this pane closes. Run `yaw-mcp install claude-code --scope local --project-dir <dir>` from a normal shell to keep it.``
|
|
189
|
+
|
|
190
|
+
In an augment pane, the line `uninstall` prints when it keeps the `~/.claude/settings.json` grant for a Claude Code entry in the pane's own `.claude.json` said Yaw carries that entry home when the pane closes. It now says Yaw may: ``Keeping mcp__mcp__* in ~/.claude/settings.json: Claude Code (user) still launches yaw-mcp from <overlay>/.claude.json, which Yaw may carry home when the pane closes.`` Yaw skips that copy when its `yawModeSyncClaudeJson` setting is off, and when `~/.claude.json` changed while the pane was open it merges instead, which brings no overlay `mcpServers` entry into a home file that already has `mcpServers`. The grant is still kept, for the case where the entry does arrive.
|
|
191
|
+
|
|
192
|
+
**Fixed -- on Windows, an audit stops failing on the lock the audit before it was releasing**
|
|
193
|
+
|
|
194
|
+
A release run died in its test gate: `grades-cache.test.ts`'s concurrent-writes case threw `EPERM: operation not permitted, open '...\.yaw-mcp\grades.json.lock'`. It was not the test. On Windows, creating a file with `O_EXCL` while another thread or process is deleting the same path fails `EPERM` instead of succeeding or answering "already exists". On the machine that failed (Windows 11, Node 22.22.2), a probe racing three creates against one delete 2000 times hit it in every one of 20 runs. The grade cache's lock take treated every errno other than "already exists" as fatal, so a `yaw-mcp audit` whose wait happened to land inside the previous holder's release failed with exit 3, grade computed but not cached. The Yaw Terminal MCP panel grading two servers at once is exactly that shape. The take now retries `EPERM`, `EBUSY` and `EACCES` on Windows -- the codes `atomicWriteFile` already retries its rename on -- for up to a second, then reports the real errno rather than a lock-timeout message. POSIX is unchanged.
|
|
195
|
+
|
|
196
|
+
The same take backs the `bundles.json` write lock, the sidecars install lock and the self-upgrade lock, and there the misread was quieter: a lock it could not create was treated as "no lock possible here, proceed", so the same `EPERM` ran the write or the install unlocked beside whichever process took the lock next. It now retries those codes three times before falling back to that best-effort answer. The backoffs add up to 26 ms on paper and measured 31-74 ms on an idle Windows machine, since short waits there overshoot.
|
|
66
197
|
|
|
67
198
|
## 1.0.2 -- `install --force` stops keeping the env it promised to overwrite, editing a client config stops rewriting the entry next to ours, and the install surfaces stop stating things that are not so
|
|
68
199
|
|
|
@@ -146,10 +277,10 @@ A Yaw Mode pane sets `YAW_MODE` to `augment` or `fresh` and points `CLAUDE_CONFI
|
|
|
146
277
|
|
|
147
278
|
With `YAW_MODE` set to one of those two values and `CLAUDE_CONFIG_DIR` naming a Yaw overlay -- a directory whose name starts with `yaw-mode-`, the name every overlay Yaw builds carries and the test Yaw itself applies -- a user-scope install or uninstall of either client now:
|
|
148
279
|
|
|
149
|
-
- **augment** -- writes the grant to `~/.claude/settings.json` as well as the overlay's, and the `Wrote` line for `~/.claude/settings.json` ends ` -- a Yaw Mode pane's own settings.json does not outlive the pane`. `uninstall` removes it from both, and keeps each file's grant while another client that reads that file still has its entry. For `~/.claude/settings.json` that includes a Claude Code entry in the pane's own `.claude.json`, which Yaw normally carries home, and the line kept for it says so: ``Keeping mcp__mcp__* in ~/.claude/settings.json: Claude Code (user) still launches yaw-mcp from <overlay>/.claude.json, which Yaw carries home when the pane closes.`` That line overstates it -- Yaw does not always copy the entry home;
|
|
280
|
+
- **augment** -- writes the grant to `~/.claude/settings.json` as well as the overlay's, and the `Wrote` line for `~/.claude/settings.json` ends ` -- a Yaw Mode pane's own settings.json does not outlive the pane`. `uninstall` removes it from both, and keeps each file's grant while another client that reads that file still has its entry. For `~/.claude/settings.json` that includes a Claude Code entry in the pane's own `.claude.json`, which Yaw normally carries home, and the line kept for it says so: ``Keeping mcp__mcp__* in ~/.claude/settings.json: Claude Code (user) still launches yaw-mcp from <overlay>/.claude.json, which Yaw carries home when the pane closes.`` That line overstates it -- Yaw does not always copy the entry home; 1.0.3 above corrects it. An entry in any other file under the overlay -- typed's `<overlay>/.mcp.json`, say -- keeps only the overlay's grant, since that file goes with the pane.
|
|
150
281
|
- **fresh** -- writes the overlay only, since a fresh pane reads nothing from home, and prints one note naming what goes when the pane closes, because a fresh pane keeps nothing of its overlay. For `install typed`, whose entry is outside the overlay, that is the grant: ``Note: a fresh Yaw Mode pane does not keep its settings.json, so the mcp__mcp__* grant in <overlay>/settings.json goes when this pane closes. Run `yaw-mcp install typed` from a normal shell to keep it.`` For `install claude-code`, whose entry lands in the overlay's `.claude.json`, it is both: ``Note: a fresh Yaw Mode pane does not keep its config dir, so the Claude Code entry in <overlay>/.claude.json and the mcp__mcp__* grant in <overlay>/settings.json go when this pane closes. Run `yaw-mcp install claude-code` from a normal shell to keep them.`` -- printed whenever install writes either file there. `uninstall` removes from the overlay only, without a note.
|
|
151
282
|
|
|
152
|
-
Project scope is unchanged; the grant files of project and local scope are project-relative, so neither scope gets a second patch or a grant in the overlay. Claude Code's local-scope entry is the exception: it lives in `<CLAUDE_CONFIG_DIR>/.claude.json` under `projects[<dir>]`, so it is in the overlay too, and in a fresh pane it goes when the pane closes -- in this release without a note;
|
|
283
|
+
Project scope is unchanged; the grant files of project and local scope are project-relative, so neither scope gets a second patch or a grant in the overlay. Claude Code's local-scope entry is the exception: it lives in `<CLAUDE_CONFIG_DIR>/.claude.json` under `projects[<dir>]`, so it is in the overlay too, and in a fresh pane it goes when the pane closes -- in this release without a note; 1.0.3 above adds one. Every run outside a Yaw Mode pane is unchanged as well. That includes a `CLAUDE_CONFIG_DIR` of your own set at a pane's prompt: Yaw exports `YAW_MODE` to the pane's shell too, but a directory not named `yaw-mode-*` is not an overlay, and install treats it exactly as it would outside Yaw. In a pane, the lines above replace the `install typed` note about a grant scoped to `CLAUDE_CONFIG_DIR`. `YAW_MODE` joins the `--help` Environment block.
|
|
153
284
|
|
|
154
285
|
**Added -- `install` reaches Zed, Cline, Continue and Codex CLI, and takes `mcp` as another name for Claude Code's project scope**
|
|
155
286
|
|
|
@@ -160,7 +291,7 @@ Four clients are new install targets, landed after 1.0.1. `install`, `uninstall`
|
|
|
160
291
|
- **Continue** (`install continue`, user and project scope): a file of yaw-mcp's own, `mcpServers/yaw-mcp.json`, under `~/.continue` (or `CONTINUE_GLOBAL_DIR`) or `<project>/.continue`. The Done line says to reload the IDE window. On Windows the entry is bare `npx`, because Continue adds the `cmd.exe` wrapper itself.
|
|
161
292
|
- **Codex CLI** (`install codex-cli`, user and project scope): an `[mcp_servers.mcp]` table in `config.toml` under `CODEX_HOME` (default `~/.codex`), or `<project>/.codex/config.toml`, with `startup_timeout_sec` set to 60 seconds against Codex's own default of 10. On Windows the entry is bare `npx`, which needs Codex 0.59.0 or newer. A re-run without `--force` keeps `env_vars` and `enabled`; the Done line says to restart Codex.
|
|
162
293
|
|
|
163
|
-
Two gaps ship with them. `install --list` and `doctor` still read every client file as JSON, so a Codex CLI `config.toml` -- the one `install codex-cli` just wrote included -- shows as `malformed` in `install --list`, and `doctor` warns about it and exits 2 --
|
|
294
|
+
Two gaps ship with them. `install --list` and `doctor` still read every client file as JSON, so a Codex CLI `config.toml` -- the one `install codex-cli` just wrote included -- shows as `malformed` in `install --list`, and `doctor` warns about it and exits 2 -- 1.0.5 above closes that one. And both report Cline by its shared file alone, not by the editor copies.
|
|
164
295
|
|
|
165
296
|
**`mcp`** is Claude Code's project scope under a second name: `install mcp`, `uninstall mcp` and `import mcp` act on the project-root `.mcp.json` exactly as `claude-code --scope project` does, and an explicit `--scope` beside it still wins. It is an alias rather than a row, so `install --list` and `doctor` do not show that file twice, and `try` does not take it.
|
|
166
297
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Yaw MCP (the `yaw-mcp` CLI) is an MCP server that fronts every other MCP server you use. Point each AI client (Claude Code, Claude Desktop, Cursor, VS Code) at it once, and your servers load lazily from a single connection instead of a hand-edited `mcpServers` block per client.
|
|
6
6
|
|
|
7
|
-
It runs entirely on your machine. No account, no sign-in, no telemetry -- your servers live in a local `bundles.json` and your credentials in a local encrypted vault. Running as an MCP server, its only outbound calls are
|
|
7
|
+
It runs entirely on your machine. No account, no sign-in, no telemetry -- your servers live in a local `bundles.json` and your credentials in a local encrypted vault. Running as an MCP server, its only outbound calls are two background npm checks: one for its own updates (`YAW_MCP_AUTO_UPGRADE=0` to disable) and, if you have run `yaw-mcp sidecars install`, a once-a-day check that the managed sidecar packages are current (`YAW_MCP_SIDECAR_REFRESH=0` to disable). `yaw-mcp add` fetches the public server catalog on demand. Nothing else leaves your machine.
|
|
8
8
|
|
|
9
9
|
It earns its keep when you hit any of these:
|
|
10
10
|
|
|
@@ -41,6 +41,8 @@ Your MCP client (Claude Code, Cursor, ...)
|
|
|
41
41
|
| `mcp_connect_secrets` | Show which local-vault secrets each server's `${secret:NAME}` refs resolve to -- by name only, never a value. |
|
|
42
42
|
| `mcp_connect_health` | Call counts, error rates, and latency per loaded server. |
|
|
43
43
|
|
|
44
|
+
**What `tools/list` carries.** By default (`gateway`) it is the meta-tools above plus the tools of the servers loaded *this session* -- never the whole catalog, which on a large install ran to ~27,000 tokens before the first prompt. The routing advice (dispatch for a concrete task, discover to browse, exec for a known chain, loading is per session) is sent once as the server's MCP `instructions`, which Claude Code puts in the system prompt, so the per-tool descriptions stay short. A client that cannot defer tool descriptions and inlines every listed tool into every request gets `lite` instead: only `mcp_connect_exec`, `mcp_connect_find_tool` and `mcp_connect_read_tool` are listed, which between them find, describe and call any installed tool (exec loads a cached server on first use). yaw-mcp picks `lite` on its own when the client identifies itself as `typed-cli` in the MCP `initialize` handshake; the unlisted meta-tools stay callable by name. `YAW_MCP_TOOL_EXPOSURE` overrides either default.
|
|
45
|
+
|
|
44
46
|
**Ranking.** dispatch/discover rank with BM25, computed locally. On top of the ranker, three signals adjust scores:
|
|
45
47
|
|
|
46
48
|
- **Health-aware** -- servers that recently failed or error often get down-ranked (never boosted above raw).
|
|
@@ -100,7 +102,7 @@ yaw-mcp can host itself on [oam](https://oamjs.org), a Rust+V8 JavaScript runtim
|
|
|
100
102
|
|
|
101
103
|
`yaw-mcp install` writes the oam entry for you when two things are true:
|
|
102
104
|
|
|
103
|
-
- **oam is installed** — `curl -fsSL https://oamjs.org/install.sh | sh`, or `irm https://oamjs.org/install.ps1 | iex` on Windows. Those install the current release, which always satisfies the minimum. An older build is refused rather than silently used:
|
|
105
|
+
- **oam is installed** — `curl -fsSL https://oamjs.org/install.sh | sh`, or `irm https://oamjs.org/install.ps1 | iex` on Windows. Those install the current release, which always satisfies the minimum. An older build is refused rather than silently used: the minimum is the last oam release yaw-mcp's own check (`npm run verify:oam-floor` in the repo) hosted a real MCP server on -- not the latest release, so a new oam release does not by itself raise it -- and nothing older than that is supported. `yaw-mcp doctor` prints the exact minimum under OAM RUNTIME, and `oam self-update` is the fix when yours is below it.
|
|
104
106
|
- **yaw-mcp is durably installed** — `npm i -g @yawlabs/mcp`, or a project `node_modules`. A path in the npx cache is deliberately not used: that directory is evictable, and an entry pointing into it breaks the moment npm cleans it.
|
|
105
107
|
|
|
106
108
|
Neither is required, and nothing breaks without them — the npx entry is written as before, and install tells you which one you got. Afterwards `yaw-mcp doctor` marks a client whose entry launches the broker on oam with `(runs on oam)`, and its OAM RUNTIME section reports the binary, version, and minimum.
|
|
@@ -115,7 +117,7 @@ The entry it writes:
|
|
|
115
117
|
}
|
|
116
118
|
```
|
|
117
119
|
|
|
118
|
-
Two consequences worth knowing. It pins a path, so it does not re-resolve `@latest` on every spawn the way the npx entry does — `npm update -g` still picks up new versions, because it rewrites that path in place
|
|
120
|
+
Two consequences worth knowing. It pins a path, so it does not re-resolve `@latest` on every spawn the way the npx entry does — `npm update -g` still picks up new versions, because it rewrites that path in place, and an app upgrade that deletes the directory the path named (a scoop `current` junction is used instead, where one exists) is repaired by the broker's startup sweep or by `yaw-mcp heal`. And this setting is about the **broker itself**; which runtime the *sidecars* get is decided separately, below.
|
|
119
121
|
|
|
120
122
|
### Which runtime the sidecars get
|
|
121
123
|
|
|
@@ -224,6 +226,7 @@ It gets the same policy a proxied call gets, and gets it *before* the server is
|
|
|
224
226
|
```bash
|
|
225
227
|
yaw-mcp bundles [list|match] [--json] # browse curated bundles; match partitions against your enabled servers
|
|
226
228
|
yaw-mcp upgrade [--run] [--json] # show (or run) the command that bumps @yawlabs/mcp
|
|
229
|
+
yaw-mcp heal [--dry-run] [--json] # re-point yaw-mcp client entries whose launch file an app upgrade deleted (runs at startup too)
|
|
227
230
|
yaw-mcp reset-learning # clear cross-session learning (~/.yaw-mcp/state.json)
|
|
228
231
|
yaw-mcp completion <bash|zsh|fish|powershell> # print a shell-completion script
|
|
229
232
|
```
|
|
@@ -235,6 +238,8 @@ yaw-mcp compliance <target> # run the 88-test compliance suite against a serve
|
|
|
235
238
|
yaw-mcp audit <namespace> # audit a stdio server from bundles.json, cache its A-F grade in grades.json
|
|
236
239
|
```
|
|
237
240
|
|
|
241
|
+
`heal` exists for the entry that pins a path (see [Running yaw-mcp on oam](#running-yaw-mcp-on-oam)): an app upgrade that deletes the directory the path named leaves the client unable to start the broker, and the client cannot report that because it cannot start the thing that would. The broker runs the same sweep at every startup, cross-client, so a client whose entry still works repairs the ones that do not; `heal` is for the machine whose only configured client is the broken one. It touches only an entry yaw-mcp wrote that is currently broken -- a working entry is never rewritten, however unusual it looks -- and prints each old and new path. `--dry-run` reports without writing; `--quiet` keeps the exit code and `--json` and drops the transcript. `YAW_MCP_AUTO_HEAL=0` turns the startup sweep off; `YAW_MCP_READONLY_DIAGNOSTICS=1` turns both off.
|
|
242
|
+
|
|
238
243
|
To install completion, redirect to your shell's completions dir, e.g. `yaw-mcp completion zsh > "${fpath[1]}/_yaw-mcp"`, or `yaw-mcp completion powershell >> $PROFILE`.
|
|
239
244
|
|
|
240
245
|
## Configuration -- `.yaw-mcp/`
|
|
@@ -351,8 +356,8 @@ Headers are resolved through the same fail-closed path: a missing or malformed r
|
|
|
351
356
|
**Where the passphrase comes from.** Three ways, in the order you'll meet them:
|
|
352
357
|
|
|
353
358
|
1. **`YAW_MCP_VAULT_PASSPHRASE` in yaw-mcp's own env** -- the `env` block of the *yaw-mcp* entry in your MCP client config, not the upstream server's (yaw-mcp strips its own secrets from the env of every child it starts: every server it spawns, the npm runs behind its self-upgrade and the daily sidecar refresh, and the compliance suite). This is the only option for a spawn, which happens over stdio with no terminal to prompt on.
|
|
354
|
-
2. **An in-session prompt.** If your client supports MCP [elicitation](https://modelcontextprotocol.io/specification/server/elicitation), a locked vault asks for the passphrase
|
|
355
|
-
3. **The CLI prompt**, for `yaw-mcp secrets` runs: no-echo on a real TTY. Note that Git Bash/MSYS can't offer one (Node sees pipes, not a TTY) -- use PowerShell, `winpty`, or the env var there.
|
|
359
|
+
2. **An in-session prompt.** If your client supports MCP [elicitation](https://modelcontextprotocol.io/specification/server/elicitation), a locked vault asks for the passphrase and retries the server. The passphrase is never typed into your client's dialog: it goes into a masked field on a one-shot page yaw-mcp serves on `127.0.0.1`. A client with URL-mode elicitation opens that page from its own prompt. A client with form mode only (Claude Code, for one) asks whether to open it, and on yes yaw-mcp opens it in your default browser; with no browser to open (no graphical session), the call fails and names the env var instead. The page takes one submission and expires after 3 minutes. A mistyped passphrase gets one more try per session; a decline stops the asking. It's held in memory for that session only -- never written to disk, and never handed to the server being started.
|
|
360
|
+
3. **The CLI prompt**, for `yaw-mcp secrets` runs: no-echo on a real TTY. If the terminal will not switch echo off, the prompt refuses rather than show what you type. Note that Git Bash/MSYS can't offer one (Node sees pipes, not a TTY) -- use PowerShell, `winpty`, or the env var there.
|
|
356
361
|
|
|
357
362
|
`yaw-mcp doctor` has a **SECRET VAULT** section showing what's stored, which servers reference it, and whether a passphrase is available -- start there when a server won't load. It reports names and a yes/no, never a value.
|
|
358
363
|
|
|
@@ -405,23 +410,22 @@ Common ones (run `yaw-mcp --help` for the full list):
|
|
|
405
410
|
| `YAW_MCP_TRUST_PROJECT` | `1` skips the consent check on a project-local `.yaw-mcp/bundles.json` and loads it unconditionally. CI/automation only -- it lets any repo you run yaw-mcp inside spawn commands as you. Default: the file must be approved with `yaw-mcp trust`. |
|
|
406
411
|
| `YAW_MCP_AUTO_ACTIVATE` | `0` disables discover auto-loading a clearly-winning server. Default on. |
|
|
407
412
|
| `YAW_MCP_AUTO_UPGRADE` | `0` disables the background self-upgrade check at startup. Default on. |
|
|
413
|
+
| `YAW_MCP_AUTO_HEAL` | `0` disables the startup pass that re-points client entries whose launch file no longer exists -- what an app upgrade leaves behind when it deletes the directory the entry named. The pass only rewrites an entry yaw-mcp wrote that is currently broken; `yaw-mcp heal` is the same sweep on demand and ignores this variable. Default on. |
|
|
408
414
|
| `YAW_MCP_SIDECAR_REFRESH` | `0` disables the daily background check that keeps managed sidecars current. Only ever runs if you have run `yaw-mcp sidecars install`; explicit pins and semver ranges are never moved. Default on. |
|
|
409
415
|
| `YAW_MCP_PREWARM` | `0` stops yaw-mcp spawning a server at startup just to learn its tool list. Learning is rare -- the list persists and is only re-learned once it ages out -- but the session that does it starts the upstream twice, once to read the list and once for the activate that follows, which matters if the server startup is not idempotent. Off, a server whose tools are not already known shows none of them until you activate it; `discover` still lists it. Default on. |
|
|
410
|
-
| `YAW_MCP_AUTO_PREWARM` | `0` disables the once-per-startup `npx -y <pkg>@latest` cache pre-warm that primes `~/.npm/_npx/<hash>/node_modules/<pkg>` for every active npx server. The pre-warm runs `npx ... --version` once per unique package in parallel, in a 30s budget per package, and resolves before the user's first `initialize` for that server lands. Without it, a fresh `_npx` cache makes a single spawn do a registry round-trip + a tar download + the child's own initialize -- reliably >30s, which exceeds the MCP client's `initialize` deadline and surfaces as "MCP request initialize to server mcp timed out after 30000ms". Default on. |
|
|
411
|
-
| `YAW_MCP_MAX_AUTO_PREWARM` | Upper bound on the number of npx packages the pre-warm will touch in a single startup. Default `20`. Real curated bundles use 6-10; the cap bounds worst-case download volume on a metered connection. |
|
|
412
|
-
| `YAW_MCP_AUTO_PREWARM_TIMEOUT` | Per-package timeout in milliseconds. Default `30000`. The whole pass runs in parallel, so the global wall-clock upper bound is the same. Lower this on a tight network; raise it for a slow registry. |
|
|
413
416
|
| `OAM_BIN` | Path to the `oam` binary to use instead of the one on `PATH`. A path that does not exist is reported by `doctor` as an unusable oam (fix the variable), not as oam being absent. |
|
|
414
|
-
| `OAM_MAX_HEAP_MB` | Raises the V8 heap cap oam applies to a hosted server (4 GiB by default
|
|
417
|
+
| `OAM_MAX_HEAP_MB` | Raises the V8 heap cap oam applies to a hosted server (4 GiB by default; can be lower inside a memory-limited Linux container). Set it in that server's `env` when a hosted sidecar dies with a heap out-of-memory error, or give that server `"runtime": "node"`. |
|
|
415
418
|
| `YAW_MCP_AUTO_LOAD` | `1` pre-activates the top recurring pack at startup (needs persistence). Default off. |
|
|
416
419
|
| `YAW_MCP_PRUNE_RESPONSES` | `0` disables response pruning. Default on. |
|
|
417
420
|
| `YAW_MCP_MAX_RESULT_BYTES` | Ceiling on a single proxied tool result. Over it, the reply is cut and carries a marker saying so, with the byte total and what was dropped -- a silently truncated result reads to the model as a complete one. Default `100000` (~25k tokens); `0` disables. `structuredContent` is passed through verbatim and is never cut. |
|
|
418
421
|
| `YAW_MCP_TOOL_TOKEN_CAP` | Ceiling on the estimated tokens of the whole loaded tool surface, checked alongside `YAW_MCP_SERVER_CAP` when a server is activated. The server cap counts servers, which says nothing about their size: six 3-tool servers and six 60-tool servers both sit at a cap of `6`. Default off. |
|
|
422
|
+
| `YAW_MCP_TOOL_EXPOSURE` | How much of the catalog `tools/list` advertises. `gateway`: the meta-tools plus the servers loaded this session. `lite`: only `mcp_connect_exec` / `find_tool` / `read_tool` plus the loaded servers, for a client that inlines every listed tool into every request; the other meta-tools stay callable by name. `full`: the pre-gateway surface, with a placeholder for every cached-but-unloaded tool. Unset, yaw-mcp picks `lite` when the client's MCP `clientInfo.name` is `typed-cli` and `gateway` otherwise; a set value always wins over that. Re-read on every `tools/list`, so a change lands without a restart. An unrecognised value logs a warning once and falls back to the client default. |
|
|
419
423
|
| `MCP_CONNECT_TIMEOUT` | Milliseconds to wait for a server's MCP handshake. Default `15000`; a server's own `connectTimeoutMs` in `bundles.json` always wins. Whole milliseconds in `1..2147483647` -- anything else falls back to the default with one warn. |
|
|
420
424
|
| `MCP_LIST_TIMEOUT` | Milliseconds to wait for a server's tool/resource/prompt inventory calls after the handshake. Default `15000`; same `1..2147483647` whole-millisecond parse, invalid values fall back with one warn. |
|
|
421
425
|
| `MCP_CALL_TIMEOUT` | Milliseconds to wait for a single proxied `tools/call`. Default `60000` (the SDK's own bound); raise it for legitimately slow servers. Same `1..2147483647` whole-millisecond parse, invalid values fall back with one warn. |
|
|
422
426
|
| `YAW_MCP_IDLE_THRESHOLD` | Non-matching tool calls a loaded server tolerates before it is unloaded. Default `10`; bursty servers earn more patience automatically. The older name `MCP_CONNECT_IDLE_THRESHOLD` still works as a fallback. |
|
|
423
427
|
| `YAW_MCP_DISABLE_PERSISTENCE` | `1` keeps learning + pack history process-scoped (CI, containers). Default off. |
|
|
424
|
-
| `YAW_MCP_READONLY_DIAGNOSTICS` | `1` makes `doctor` (text and `--json`)
|
|
428
|
+
| `YAW_MCP_READONLY_DIAGNOSTICS` | `1` makes `doctor` (text and `--json`), `bundles`, `yaw-mcp heal` and the broker's startup heal pass write nothing, for a caller that runs them in the background on a timer. `doctor` still scans `yaw-mcp try` trials but does not sweep expired ones out of your client configs: each is reported as a warning (so the run exits 2) and listed in `--json`'s `trials.unswept`, with `trials.sweepHint` naming the fix -- a plain `yaw-mcp doctor` with the variable unset, or `yaw-mcp try-cleanup <slug>`. A pre-0.12 `~/.yaw-mcp.json` or project `.yaw-mcp.json` / `.yaw-mcp.local.json` is not moved into `.yaw-mcp/`; each is reported as a warning instead (its settings are not loaded for that run). `--json` carries `"readOnly": true` on such a run. `status` never writes, so it is unaffected. Default off. |
|
|
425
429
|
| `LOG_LEVEL` | `debug` \| `info` \| `warn` \| `error`. Default `info`. |
|
|
426
430
|
|
|
427
431
|
## Requirements
|
|
@@ -209,6 +209,15 @@ function createStreamWriter(stream) {
|
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
// src/opt-out-env.ts
|
|
213
|
+
function isFeatureDisabled(name, env = process.env) {
|
|
214
|
+
const raw = env[name];
|
|
215
|
+
if (raw === void 0) return false;
|
|
216
|
+
const trimmed = raw.trim();
|
|
217
|
+
if (trimmed === "") return false;
|
|
218
|
+
return trimmed === "0" || trimmed.toLowerCase() === "false";
|
|
219
|
+
}
|
|
220
|
+
|
|
212
221
|
// src/upgrade-cmd.ts
|
|
213
222
|
import { spawn as spawn2 } from "child_process";
|
|
214
223
|
import { readFileSync as readFileSync2, realpathSync as realpathSync2 } from "fs";
|
|
@@ -3585,7 +3594,7 @@ function npxSpec(args) {
|
|
|
3585
3594
|
const spec = args[idx];
|
|
3586
3595
|
return spec.startsWith("-") ? null : spec;
|
|
3587
3596
|
}
|
|
3588
|
-
var MIN_OAM_VERSION = "0.16.
|
|
3597
|
+
var MIN_OAM_VERSION = "0.16.4";
|
|
3589
3598
|
var OAM_INSTALL_SH = "curl -fsSL https://oamjs.org/install.sh | sh";
|
|
3590
3599
|
var OAM_INSTALL_PS1 = "irm https://oamjs.org/install.ps1 | iex";
|
|
3591
3600
|
function oamInstallCommand(os) {
|
|
@@ -3608,7 +3617,7 @@ function oamInstallAdvice(os) {
|
|
|
3608
3617
|
}
|
|
3609
3618
|
function oamHeapOomHint(stderr) {
|
|
3610
3619
|
if (!stderr.includes("OAM-RT-OOM")) return null;
|
|
3611
|
-
return `The oam-hosted child hit its V8 heap cap
|
|
3620
|
+
return `The oam-hosted child hit its V8 heap cap. Raise it with OAM_MAX_HEAP_MB=<mb> in this server's env, or set "runtime": "node" for this server in bundles.json.`;
|
|
3612
3621
|
}
|
|
3613
3622
|
var warnedOamUnavailable = false;
|
|
3614
3623
|
function oamFailureLabel(failure) {
|
|
@@ -3814,8 +3823,20 @@ async function probeOamUncached(run, generation) {
|
|
|
3814
3823
|
if (generation === oamProbeGeneration) oamProbeCache = probe;
|
|
3815
3824
|
return probe;
|
|
3816
3825
|
};
|
|
3826
|
+
const runRetryingTimeout = async () => {
|
|
3827
|
+
try {
|
|
3828
|
+
return await run(bin);
|
|
3829
|
+
} catch (err) {
|
|
3830
|
+
if (err?.code !== "ETIMEDOUT") throw err;
|
|
3831
|
+
log("debug", "oam --version timed out; retrying once before falling back to node", {
|
|
3832
|
+
timeoutMs: OAM_PROBE_TIMEOUT_MS,
|
|
3833
|
+
bin
|
|
3834
|
+
});
|
|
3835
|
+
return await run(bin);
|
|
3836
|
+
}
|
|
3837
|
+
};
|
|
3817
3838
|
try {
|
|
3818
|
-
const version = parseOamVersion(await
|
|
3839
|
+
const version = parseOamVersion(await runRetryingTimeout());
|
|
3819
3840
|
if (version !== null && compareVersions(version, MIN_OAM_VERSION) < 0) {
|
|
3820
3841
|
log("warn", "oam is installed but below the minimum supported version; falling back to node", {
|
|
3821
3842
|
// The full token, prerelease suffix included: a build reporting
|
|
@@ -3824,8 +3845,9 @@ async function probeOamUncached(run, generation) {
|
|
|
3824
3845
|
// make this line look like a comparator bug.
|
|
3825
3846
|
oamVersion: version,
|
|
3826
3847
|
minVersion: MIN_OAM_VERSION,
|
|
3827
|
-
// The floor
|
|
3828
|
-
// of date, and oam updates itself
|
|
3848
|
+
// The floor is a released oam (the last one verify:oam-floor passed
|
|
3849
|
+
// on), so below-min always means out of date, and oam updates itself
|
|
3850
|
+
// in place.
|
|
3829
3851
|
updateWith: "oam self-update",
|
|
3830
3852
|
// ...but updating alone changes nothing here. oamProbeCache is written
|
|
3831
3853
|
// once per process and only ever cleared by a test hook, so every
|
|
@@ -3858,7 +3880,7 @@ async function probeOamUncached(run, generation) {
|
|
|
3858
3880
|
const code = err?.code;
|
|
3859
3881
|
const absent = code === "ENOENT" && !explicit;
|
|
3860
3882
|
if (code === "ETIMEDOUT") {
|
|
3861
|
-
log("warn", "oam did not respond to --version
|
|
3883
|
+
log("warn", "oam did not respond to --version twice; falling back to node for this process", {
|
|
3862
3884
|
timeoutMs: OAM_PROBE_TIMEOUT_MS,
|
|
3863
3885
|
bin
|
|
3864
3886
|
});
|
|
@@ -4521,7 +4543,13 @@ async function oamFloorLines(probe) {
|
|
|
4521
4543
|
`oam: v${oam.version ?? "unknown"} is installed but below the v${MIN_OAM_VERSION} floor yaw-mcp`,
|
|
4522
4544
|
" requires, so MCP sidecars run on node instead of oam. Update it:",
|
|
4523
4545
|
"",
|
|
4524
|
-
" oam self-update"
|
|
4546
|
+
" oam self-update",
|
|
4547
|
+
"",
|
|
4548
|
+
// A broker already running keeps the probe's cached answer for its
|
|
4549
|
+
// lifetime (probeOam), so without a restart it stays on node after the
|
|
4550
|
+
// update; the broker's own warn says so, but MCP clients hide stderr.
|
|
4551
|
+
" then restart yaw-mcp: a running broker keeps its oam probe for its",
|
|
4552
|
+
" lifetime, so it stays on node until it does."
|
|
4525
4553
|
];
|
|
4526
4554
|
} catch {
|
|
4527
4555
|
return [];
|
|
@@ -4529,7 +4557,7 @@ async function oamFloorLines(probe) {
|
|
|
4529
4557
|
}
|
|
4530
4558
|
async function defaultRunningPrefix(argvPath) {
|
|
4531
4559
|
if (process.env.VITEST) return null;
|
|
4532
|
-
const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-
|
|
4560
|
+
const { detectRunningInstallPrefix: detectRunningInstallPrefix2 } = await import("./auto-upgrade-7I36MDXV.js");
|
|
4533
4561
|
return detectRunningInstallPrefix2(argvPath);
|
|
4534
4562
|
}
|
|
4535
4563
|
async function defaultSpawn(cmd, args, cwd) {
|
|
@@ -4590,7 +4618,7 @@ async function runUpgrade(opts = {}) {
|
|
|
4590
4618
|
if (method === "global-npm") {
|
|
4591
4619
|
const rawPrefix = await (opts.runningPrefix ?? defaultRunningPrefix)(argvPath);
|
|
4592
4620
|
if (rawPrefix !== null) {
|
|
4593
|
-
const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-
|
|
4621
|
+
const { quoteArgForDisplay: quoteArgForDisplay2, quoteShellArgIfNeeded: quoteShellArgIfNeeded2 } = await import("./auto-upgrade-7I36MDXV.js");
|
|
4594
4622
|
const spawnForm = quoteShellArgIfNeeded2(rawPrefix, opts.platform);
|
|
4595
4623
|
const displayForm = quoteArgForDisplay2(rawPrefix, opts.platform);
|
|
4596
4624
|
if (spawnForm !== null && displayForm !== null) {
|
|
@@ -4707,7 +4735,7 @@ async function runUpgrade(opts = {}) {
|
|
|
4707
4735
|
return { exitCode: 3, lines };
|
|
4708
4736
|
}
|
|
4709
4737
|
function readCurrentVersion() {
|
|
4710
|
-
return true ? "1.0.
|
|
4738
|
+
return true ? "1.0.11" : "dev";
|
|
4711
4739
|
}
|
|
4712
4740
|
|
|
4713
4741
|
// src/auto-upgrade.ts
|
|
@@ -4987,9 +5015,8 @@ function defaultSpawn2(cmd, args, onDone = () => {
|
|
|
4987
5015
|
});
|
|
4988
5016
|
}
|
|
4989
5017
|
async function maybeAutoUpgrade(deps = {}) {
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
const current = deps.currentVersion ?? (true ? "1.0.10" : "dev");
|
|
5018
|
+
if (isFeatureDisabled("YAW_MCP_AUTO_UPGRADE")) return;
|
|
5019
|
+
const current = deps.currentVersion ?? (true ? "1.0.11" : "dev");
|
|
4993
5020
|
if (current === "dev") return;
|
|
4994
5021
|
const argvPath = deps.argvPath ?? process.argv[1];
|
|
4995
5022
|
const method = (deps.isSeaImpl ? await deps.isSeaImpl() : await detectSea()) ? "binary" : detectInstallMethod(argvPath, realpathSync3, ["unknown", "local-node-modules"]);
|
|
@@ -5118,6 +5145,7 @@ export {
|
|
|
5118
5145
|
ALLOW_UNOWNED_ENV,
|
|
5119
5146
|
findProjectConfigDir,
|
|
5120
5147
|
guidePath,
|
|
5148
|
+
isFeatureDisabled,
|
|
5121
5149
|
readStrictJson,
|
|
5122
5150
|
CURRENT_OS,
|
|
5123
5151
|
ENTRY_NAME,
|