@yawlabs/mcp 0.74.0 → 0.74.2

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,178 @@
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.2 -- the oam floor moves to 0.9.0, and a full-pass sweep of the runtime
6
+
7
+ **Changed -- the oam floor moves to 0.9.0**
8
+
9
+ `MIN_OAM_VERSION` tracks the latest oam release as policy, and v0.9.0 is now current. A machine running an older oam falls back to node/npx with one warning naming both versions and the command that fixes it (`oam self-update`), and `doctor` reports `installed (v0.8.3) -- below min 0.9.0; IGNORED, servers run on node`. That is the documented trade: an aggressive floor costs a fallback, a lax one silently hosts production sidecars on a runtime nobody else is running.
10
+
11
+ **Fixed -- `--help` described the opposite of the shipped default**
12
+
13
+ The `YAW_MCP_DEFAULT_RUNTIME` entry still read `Unset = node (today's default)`. Unset has meant oam-when-installed since 0.74.1; `doctor`, the README and this changelog all already said so, leaving the CLI's own help as the only surface contradicting the feature it documents.
14
+
15
+ **Fixed -- an oam-hosted npx server could receive different arguments than the npx fallback**
16
+
17
+ The `-y`/`--yes` filter ran over the whole argument list rather than only the flags npx itself consumes, so a `--yes` belonging to the SERVER was dropped when the launch was rewritten for oam and kept when it was not. Same configuration, different child argv depending on whether oam happened to be installed -- which the rewrite exists specifically never to do.
18
+
19
+ **Fixed -- a broken `bundles.json` could invert an explicit `defaultRuntime: "node"`**
20
+
21
+ A file that exists but cannot be parsed produced no value, and that empty answer was cached for the life of the process. Since unset now means oam-when-installed, the cached blank silently flipped a machine that had explicitly opted OUT back onto oam. Only that degraded-and-empty combination is now left uncached; every healthy shape, including "no bundles.json at all", still resolves once and stays cached, so the connect path does not re-read per spawn.
22
+
23
+ **Fixed -- the version-pinning notice was silent or misleading depending on where the sidecar came from**
24
+
25
+ Hosting on oam runs a copy from disk, so `@latest` stops re-resolving and the version pins itself. The notice that says so only fired for npx-cache copies -- never for a durable install, and never for the managed tree that `sidecars install` exists to create. It now covers all three, carries the directory the entry was resolved out of, and names the command that actually refreshes THAT copy. The broker's own `node_modules` is correctly treated as a cache when it sits under `_npx`, which is where `npx -y @yawlabs/mcp` puts it; the managed tree logs at debug, since re-running `sidecars install` is a decision the user already made.
26
+
27
+ **Fixed -- `sidecars install --json` reported no error on a failed install**
28
+
29
+ When npm exited 0 but no requested package resolved, the command exited 1 while the JSON document still carried `error: null`, so a caller branching on `error` -- the field that document exists to provide -- read a failed install as a clean one.
30
+
31
+ **Added -- `doctor --json` reports the managed install**
32
+
33
+ The `oamRuntime` block now carries `managed`, mirroring the text report: the managed directory and the installed version of each configured package. That version is what an oam-hosted sidecar actually runs and nothing else reports it, since `bundles.json` only ever says `@latest`.
34
+
35
+ **Fixed -- usage output could be truncated when piped**
36
+
37
+ Thirteen subcommands wrote their usage to stdout and then called `process.exit()`, which force-flushes the event loop and can cut a buffered body short on a slow consumer (`yaw-mcp install --help | less`). They now set the exit code and let Node drain the write, matching what `--help` and the dispatch tail already did.
38
+
39
+ **Fixed -- a server that had just loaded could dead-end on "no longer available"**
40
+
41
+ Four paths activated an upstream without rebuilding the routing tables or telling the client its lists had moved: discover's auto-warm, the auto-loaded recurring pack, the lazy activation behind a deferred tool, and prewarm's reconciliation. The namespace was connected, but `toolRoutes` still held the placeholder built from the persisted tool cache -- so the very next call took the deferred branch, found the server already up, and returned `no longer available after loading X`. No retry clears that, for a server that loaded fine seconds earlier, and the session stays wedged until the client restarts. The deferred path made it worse by rebuilding only when activation reported a change, which is exactly false when the namespace was already warm. Every activation and deactivation site now goes through one helper that does both halves, because doing one of them is the bug that kept recurring.
42
+
43
+ **Fixed -- `mcp_connect_read_tool` ran servers the project profile and the compliance floor had refused**
44
+
45
+ The tool spawns a server transiently to read one schema, and it consulted neither gate before doing it. A namespace excluded by the project's allow/deny profile, or graded below `YAW_MCP_MIN_COMPLIANCE`, still had its configured command executed with its vault-resolved env -- secrets included. Disconnecting afterwards does not make that acceptable; every other surface narrows by the profile before it reaches a server. Both gates now run here, in the same order and with the same wording activation uses. The floor itself also went from two copies to one: the duplicate in `activate` produced identical text for the common case but reordered precedence for a server failing two gates, so a below-grade server that was also disabled reported one reason to `activate` and a different one to `dispatch`.
46
+
47
+ **Fixed -- a busy upstream could be closed in the middle of your call**
48
+
49
+ The idle reaper runs on other calls' completions, and a namespace's idle counter is only reset once its own call returns. A slow call to B could therefore be tipped over the threshold by a burst of short calls to A: B's transport closed, your pending call rejected, and the rejection booked as B's own zero-reward failure -- dragging the ranking of a healthy server down for a fault yaw-mcp caused. Namespaces with a call in flight are now skipped and re-evaluated on the next completion. Shutdown had the mirror-image problem: it snapshotted the connection map while prewarm activations were still mid-handshake, leaving live child processes nothing would ever disconnect (the parent exiting is what masked it). It now refuses new activations first, drains what was already past the gate, and clears any credentials elicited during the session, as that field's contract promised. That drain is bounded at two seconds: an unbounded one outlived the ten-second force-exit timer, so a SIGTERM arriving mid-handshake turned a clean shutdown into `exited with code 1`. Because a late activation can re-arm the state-save debounce the pre-drain flush already cleared, shutdown re-flushes if that happened -- the bound must not buy promptness with a lost write. The in-flight skip also had to be re-checked immediately before each disconnect rather than once while listing candidates: the list is consumed in an awaiting loop, so by the second entry the snapshot it was built from is stale. The idle baseline is also re-read per call instead of latched at import, and `YAW_MCP_IDLE_THRESHOLD` now works at all -- only the pre-rename `MCP_CONNECT_IDLE_THRESHOLD` was ever read.
50
+
51
+ **Fixed -- prompts could route to the wrong upstream, and one blip could empty a server's inventory**
52
+
53
+ Prompt namespacing carried the cross-namespace collision that was fixed for tools in 0.74.0. Namespace `gh` with a `review_pr` prompt and namespace `gh_review` with a `pr` prompt both flatten to `gh_review_pr`; `prompts/list` advertised the first upstream's prompt while `prompts/get` executed the last writer's, so the model saw one server's description and got another server's prompt, and a later-activated server could capture an earlier one's traffic. Both surfaces now agree on the first writer. In the same area, the resources and prompts refreshers returned an empty list on any error, so a single transport blip or list timeout on a `list_changed` notification replaced a healthy server's entire inventory with nothing -- until some future notification that may never arrive. A failed refresh now leaves the previous inventory standing, which is what the tools refresher already got for free.
54
+
55
+ **Fixed -- `install` destroyed comments in client configs and loosened their permissions**
56
+
57
+ `install` read the client config with a JSONC parser and wrote it back through `JSON.stringify`, deleting every `//` and `/* */` in the file. `.vscode/mcp.json` is documented JSONC and its `inputs` array is routinely commented; Claude Code's `settings.json` is hand-maintained and carries hooks and model settings around the one key being patched. Both are now spliced in place, the way `yaw-mcp try` already wrote them -- only the `mcp` entry and the `permissions.allow` node move, and the rest of the file keeps its comments, key order and indentation byte for byte.
58
+
59
+ The atomic write underneath was a second bug. `rename` publishes a new inode, so the surviving file took the umask default rather than the mode it had -- widening a config `yaw-mcp try` had deliberately written 0600 because it holds an inline secret. An existing target's mode is now carried forward whenever the caller passes none, and every write gets a unique temp path so two concurrent writers to the same file cannot truncate each other's.
60
+
61
+ `install` also stopped stripping a legacy `permissions.allow` wildcard while leaving the legacy server entry that wildcard grants -- it only warns about that entry, so removing the pattern in the same run revoked a live grant and made Claude Code re-prompt on every one of that server's tool calls. Alongside those: `--all` says "every client available on this OS" instead of promising detection it never did, `--dry-run` says "Would overwrite" rather than announcing a write that has not happened, `--scope project` honours the documented `cwd` override instead of writing `.vscode/mcp.json` into whatever directory the process started in, and each fallback to node when oam cannot host the broker now names its reason -- below the floor, unusable, or resolvable only as a bare name a GUI-launched client would never find.
62
+
63
+ **Fixed -- `remove` skipped its confirmation on exactly the files most likely to hold a secret**
64
+
65
+ The destructive-confirmation gate parsed `bundles.json` with `JSON.parse` while the write path used the loader's JSONC parser. One `// prod token lives in 1Password` line, or one trailing comma, made the file look malformed to the gate and perfectly fine to the delete -- so the preview, the off-TTY refusal and the `[y/N]` prompt were all skipped on hand-edited files, which are precisely the ones carrying stored env values `add` cannot bring back. Both now read the file the same way.
66
+
67
+ **Fixed -- re-running `add` threw away what was already on the entry**
68
+
69
+ `yaw-mcp add <slug>` rebuilds its entry from the catalog every time, and replaced the stored one wholesale. Re-adding a server to pick up a new launch command silently dropped a persisted `--env` value, an explicit `"isActive": false`, a per-server `"runtime"` override, a hand-tuned `connectTimeoutMs`, and any field outside the writer's vocabulary -- all of it under an `Updated ...` success line. An upsert is a partial update now: a field the incoming entry leaves undefined keeps its on-disk value, `env` merges per key so an empty incoming value never blanks a stored one, and an incoming `isActive: true` will not re-enable something you deliberately turned off (an explicit `false` still disables). `--json` and the ambient-env note report the entry as written rather than the pre-merge input, so they describe a file that exists -- with env reduced to `envKeys`, key names only. Reporting the on-disk entry verbatim meant a value persisted by an earlier run was printed on stdout by a later `add` that never passed it, so the field that made the report honest was also the one that leaked it.
70
+
71
+ **Fixed -- `sidecars install` could not actually move a `@latest` sidecar forward**
72
+
73
+ npm cannot re-resolve a dist-tag against an existing tree: with a lockfile present, a package locked at 0.3.6 under a `latest` range reports "up to date" and stays there. The command whose entire purpose is refreshing the pin was therefore a no-op after the first run, and "Re-run this command to move them forward" was false. It now runs `npm update` after the install, which does honour the manifest's ranges -- an exact-pinned spec still cannot drift -- and reports a failed refresh separately from a failed install, since the tree is still usable either way.
74
+
75
+ It also stopped over-promising in the other direction. When nothing on the machine would read the managed tree -- no oam, or every server resolving to node -- it names the closed gate instead of announcing that versions are now fixed. It names the config the server list came from, and warns when that is a project `bundles.json`, because the managed tree is keyed on home alone: installing from project A writes A's dependency set into the one directory every project shares, and the broker in B then resolves out of it on A's versions with nothing in B to say why. Loader warnings go to stderr instead of being swallowed, and a `bundles.json` that exists but cannot be parsed is now reported as `unreadable-config` with a non-null `error` and exit 1, rather than as "no servers configured yet".
76
+
77
+ **Fixed -- `doctor` reported the runtime policy rather than the spawn**
78
+
79
+ The oam rewrite has six deterministic refusals -- a `node` launch naming no entry file or opening with a flag, an `npx` launch with no spec, a flag where the spec belongs, a git or path target, or a version range. Each holds on every machine, oam installed or not, and `doctor` reported all of them as "oam". Each is now its own runtime code with its own reason, derived through the rewrite's own predicates rather than re-implemented, and `sidecars` no longer hands `doctor` a partial server object that made every refused server look hosted.
80
+
81
+ Two more reporting failures went with it. An oam that is installed but wedged -- `oam --version` hanging, exiting non-zero, or not executable -- was reported as "not installed", sending someone who has oam installed off to install it again while the real cause never surfaced; it now reads `installed but UNUSABLE` with the underlying error and a command to reproduce it. And a `bundles.json` that had stopped parsing -- every server gone -- still printed "All good. yaw-mcp should start cleanly." and exited 0, because the loader's warnings were never folded into the report.
82
+
83
+ `doctor` now also checks that a client's yaw-mcp entry can start at all: an absolute launch command that no longer exists, a bare `oam` that a GUI-launched client cannot resolve against its own PATH (older installs wrote exactly that, and nothing rewrites them), or a stale `oam run <entry>` path. oam cannot fetch a missing entry on demand, so each of those is a hard launch failure with no fallback, and `doctor` is the only thing that can surface them.
84
+
85
+ **Fixed -- an oam boot failure pinned a server to node on no evidence**
86
+
87
+ When an oam-hosted server failed to boot, yaw-mcp respawned it on node and remembered the downgrade for the rest of the process. It recorded that memo *before* the respawn, so a server failing for a reason that has nothing to do with the runtime -- a missing `GITHUB_TOKEN`, which fails identically on both -- was pinned to node anyway. The in-process credential retry then supplied the token and reconnected on node, and every later reconnect stayed there, while `doctor` still reported oam. Nothing clears the memo short of a restart, so the memo is now written only when the node attempt actually behaves differently: booting cleanly, or failing in a different category. One wasted oam boot is cheaper than silently disabling oam hosting for the life of the process on evidence that never implicated it.
88
+
89
+ **Fixed -- a version-pinned sidecar could be hosted from a copy that does not match the pin**
90
+
91
+ `oam run <entry>` runs whatever sits at the path it is handed, so hosting a spec that constrains its version means proving the copy on disk satisfies it. `npx -y pkg@1.2.3` was resolved by package name alone, so the pin was honoured on npx and quietly ignored on oam. An exact pin now moves to oam only when the resolved copy declares that same version; a range or partial (`^1.2.3`, `~1.2`, `1.x`) always stays on npx, since honouring one means a semver range evaluator this package does not carry. The version parser also stopped truncating prereleases -- `oam 0.8.3-rc.1` read as `0.8.3`, which compared equal to the floor and was hosted, while every line printing the oam version named a release the machine does not have. Comparison now follows semver's prerelease precedence rules rather than a numeric triple.
92
+
93
+ Relatedly, node and npx launches are matched on the command's basename with any Windows executable extension stripped, so `/usr/bin/node app.js`, `node.exe`, and nvm or volta shims are now hosted on oam like a bare `node` -- they previously fell through to node with no explanation. `doctor` uses the same predicate, so the report and the spawn cannot disagree about it.
94
+
95
+ **Fixed -- the zsh completion ran most of its own subcommand list as shell commands**
96
+
97
+ The generator joined 19 subcommand specs with a bare newline, so only the first reached `_values` and the other 18 were emitted as standalone commands: the first TAB after `yaw-mcp ` offered `install` and nothing else, followed by 18 `command not found` errors. The specs also used `name:description`, which is `_describe` syntax -- `_values` reads the text after the colon as an argument spec, so every subcommand that did render came out with no description. bash, fish and PowerShell were unaffected. `install --help` is offered now too; it was always accepted and never completed.
98
+
99
+ **Fixed -- a two-character namespace was invisible to discover and dispatch**
100
+
101
+ The BM25 index dropped tokens shorter than three characters everywhere, including in identifiers. A server namespaced `pg`, `gh`, or `db` therefore had a permanently empty namespace field -- the second-heaviest weight in the ranking -- and an intent naming only that namespace ("use pg") ranked nothing at all; `s3` and `ec2` fragments inside tool names went the same way. Descriptions keep the three-character floor, where noise words actually live. Namespaces, server names and tool names index down to one character, because an identifier is chosen rather than written: a two-letter namespace is a deliberate name, not a stopword.
102
+
103
+ The query side needed one more rule than that, and it is the reason to read this entry twice. A preposition is a routine whole segment of a snake_case tool name (`export_to_csv`), and being rare among identifiers its IDF is HIGH -- so once the query tokenized down to one character too, `to` scored. The intent "convert the spreadsheet to a chart" matched Postgres and dispatch loaded it, reporting `loaded top 1 of 1 matching servers` where it had correctly reported no match before. Closed-class function words are now subtracted from the query in the one-to-two character band only. Short identifiers -- `go`, `do`, `pr`, `id`, `db`, `pg`, `s3` -- are deliberately exempt, because matching those is why the floor was widened in the first place.
104
+
105
+ **Fixed -- three commands that misreported their own failure**
106
+
107
+ `yaw-mcp compliance <target> --min-grade A` printed "Grade F is below threshold A" on stderr and exited 0. The wrapper discarded the child's exit status, so `--strict` and `--min-grade` were silent no-ops through yaw-mcp and no CI gate built on them ever fired. A malformed report from the compliance child -- spawned unpinned, so everyone runs whatever npm calls latest -- could also print `undefined/undefined passed` and exit 0; every field the summary formats is now validated before rendering, and anything that fails routes into the existing "unexpected JSON" path.
108
+
109
+ `yaw-mcp audit` threw a raw errno out of the dispatcher when `grades.json` could not be written -- a read-only home in a container or a locked-down CI image is the common shape. The grade the suite had just spent minutes computing was never printed, and the process exited 1, the code documented as "no server with that namespace", so anything branching on exit codes read a cache-write failure as a typo. The grade prints either way now, with a dedicated exit 3 and a `cacheError` field in `--json`.
110
+
111
+ And a damaged vault verification marker reported `wrong passphrase for this vault` -- for a passphrase that was correct, about a vault whose secrets were all still readable. A key that opens an entry but not the marker now names the marker as the damaged part.
112
+
113
+ **Fixed -- `bundles match` offered activations the broker would refuse**
114
+
115
+ The partition counted every enabled server in `bundles.json`, while the broker also narrows by the `config.json` allow/deny profile. A denied namespace made a bundle read as "Ready to activate" alongside an `mcp_connect_activate` snippet the server then hard-refused -- the one thing that command exists to get right. The profile is applied now, and what it excluded is named rather than silently missing from the count, so a bundle that "should" be ready reads as the deny-list working instead of as a broken matcher.
116
+
117
+ **Fixed -- the long tail**
118
+
119
+ The rest is the kind of thing you only notice when it bites. A per-server `connectTimeoutMs` in `bundles.json` was dropped by the loader's field whitelist, so nothing in the process could ever set the value the connect path reads; one that is present but invalid (quoted, zero, negative) is now named in the loader's warnings instead of vanishing. `secrets audit <name>` ignored the argument instead of pointing at `--secret`/`--server`, and `--stdin`/`--value` were accepted on actions that have no use for them; `--value`'s help now says the value is visible to every local user via `ps` for the whole run, key derivation included. `reset-learning` now says that a running `yaw-mcp serve` holds the same learning in memory and re-saves it over the deleted file within a second of the next tool call. A trust store written by a newer yaw-mcp is refused with an upgrade instruction instead of being treated as corrupt and offered for deletion, and `trust` no longer asks you to "read all the commands above" for a file that defines none. `doctor` reads the tail of each shell history rather than the whole file -- a multi-hundred-MB history threw and took the shadowed-CLI section with it, silently. A trial marker is validated before `try-cleanup` acts on it, and the trial help no longer claims a timer sweeps expired entries; `doctor` is what removes them. `prune` stops round-tripping numbers it cannot reproduce exactly, so a large identifier in a tool result survives truncation intact. npm's `cache=` setting is parsed with npmrc's own quoting, escape and inline-comment rules, and `~/` is expanded. A stale `lastIndex` on a shared regex could make the secrets report skip leading references, which reads as "this server needs no secrets". Learning counters clamp `succeeded` to `dispatched` rather than the reverse, so a corrupted state file inflates nothing. discover's three-second memo is dropped when an activation fails or the learning counters move, so a re-discover no longer replays pre-failure text and sends the model back at a server it just watched die. A tool filter installed for an activation that then failed is rolled back instead of narrowing a later, successful load nobody filtered. And the meta-tool name set that keeps meta-tools out of an `exec` pipeline is derived from the definitions rather than hand-listed, so an eleventh meta-tool cannot become exec-callable by omission.
120
+
121
+ A last pass over the diff itself caught six more. `install` aborted with jsonc-parser's internal wording when a container key held a non-object -- a hand-edited `"mcpServers": null` that the previous release installed into fine; reparable shapes are repaired and named now, and a non-empty array refuses rather than silently dropping the server definitions it holds. `doctor` read the oam entry path straight off argv, so a `cmd /d /s /c` wrapper made it pick `/s`, decide the entry file was missing, and report a working install as broken; it unwraps the shell payload and anchors on the `run` subcommand. A present-but-unusable oam -- timed out, non-executable, exiting non-zero -- still told the spawn path's warning to go install oam, software the user already had; that surface now names the failure, as `doctor` and the runtime resolver already did. `install`'s `Runtime: will run on oam` line re-derived its own condition instead of reading the entry it had just built, so it could claim oam over an npx entry, and a resolvable-but-relative binary path now gets its own explanation rather than the wrong one. `sidecars install --json` carried no field for the "nothing reads these copies yet" verdict, so the one caller that only ever runs `--json` could not see it. And the unlock prompt's short-passphrase warning described whatever you typed as this vault's passphrase and told you to re-key -- on input it had not verified yet.
122
+
123
+ The balance is dead code, predicates that had been copied and started to drift, comments describing behaviour that changed releases ago, and error paths nothing exercised. The suite grows from 2,138 to 2,412 tests, all of it regression coverage written alongside the fixes.
124
+
125
+ ## 0.74.1 -- oam becomes the default sidecar runtime
126
+
127
+ **Changed -- oam hosts the sidecars by default**
128
+
129
+ When oam is installed and meets the minimum version, yaw-mcp now hosts the MCP servers it spawns on it without any configuration. Previously this required `runtime: "oam"` on each server or a top-level `defaultRuntime` in `bundles.json`.
130
+
131
+ Nothing is required and nothing changes for a machine without oam: those servers run on node/npx exactly as before, and no warning is printed, because nothing was asked for. The escape hatches are unchanged and still win -- `runtime: "node"` on a server, `"defaultRuntime": "node"` for the whole machine, or `YAW_MCP_DEFAULT_RUNTIME=node` for one process. Only Node-based launches are rewritten; `docker`, `uvx`, and native commands are untouched.
132
+
133
+ **Fixed -- the oam runtime never actually reached the sidecars on a global install**
134
+
135
+ An opted-in sidecar silently ran on npx instead of oam whenever yaw-mcp itself was installed globally. Resolving an `npx -y <pkg>` server to an on-disk entry requires finding npm's `_npx` cache, and that lookup was derived from the broker's own module path -- so it only found anything when the broker had *itself* been launched through npx. A global install has no `_npx` segment in its path and therefore found nothing.
136
+
137
+ The result was the feature quietly doing nothing on the most common shape, made worse by `install` recommending `npm i -g @yawlabs/mcp` in order to host on oam. `doctor` reported those servers as "oam" the whole time, because it reports the policy decision rather than the spawn. The cache is now located from npm's own configuration, independent of how the broker was started, so all three shapes -- global, project, npx -- resolve. The only trace of this was a `debug`-level log line.
138
+
139
+ **Added -- `yaw-mcp sidecars install`**
140
+
141
+ Installs the npx-launched servers from `bundles.json` into `~/.yaw-mcp/sidecars`, and resolution prefers that tree over npm's npx cache. One copy per package at a version that is written down, and re-running the command is how it moves forward.
142
+
143
+ This is the answer to the pinning note below. The npx cache is keyed by content hash, so it accumulates every version ever fetched and names none of them current; a managed install replaces that with a single deliberate answer. `yaw-mcp doctor` prints the installed version of each configured package.
144
+
145
+ Deliberately not automatic: acquiring packages means network and minutes, and the connect path is what an MCP client blocks on while waiting for its tools. Nothing requires it -- without it, resolution falls back to the npx cache exactly as before.
146
+
147
+ npm does the installing, not `oam install`: that is frozen-lockfile only, so it cannot acquire `@latest` into an empty directory; its `--precompile` has nothing to do for packages that ship compiled JavaScript, which every MCP server does; and running it over an npm-installed tree skips lifecycle scripts unless the package is trusted, which would quietly cost puppeteer its browser download.
148
+
149
+ Only npx servers naming a registry package are installed. An npx launch pointing at a git or path target -- `npx -y github:owner/repo`, `npx -y ./local-server` -- is skipped and named in the output, and keeps using npx. Those specs carry no `@version` separator to cut at, so they would otherwise have become dependency *keys* (`{"github:owner/repo": "latest"}`), which npm rejects -- failing the install for every other package too. Resolving them properly would mean fetching the target just to learn the name it declares, which is more than this command should do.
150
+
151
+ Two servers pinning one package at different versions is reported rather than silently resolved: a flat `node_modules` holds a single version, so the command names the one it installed instead of letting the loser start on something it did not ask for.
152
+
153
+ `--json` emits the same keys on every path -- `root`, `installed`, `reason`, `error`, `conflicts`, `skipped` -- so a caller can read the result without first determining which path it took. `reason` distinguishes the empty states: `no-config` (nothing configured yet), `no-npx-servers` (a docker/uvx-only config), and `only-non-registry-specs`.
154
+
155
+ **Changed -- an oam-hosted sidecar no longer self-updates, and now says so**
156
+
157
+ `npx -y <pkg>@latest` re-resolves the tag on every spawn; `oam run <entry>` cannot, because oam has no fetch-on-demand. Once oam is the default, npx stops running for those servers, so the on-disk copy that supplied the entry also stops being refreshed and the version pins itself indefinitely.
158
+
159
+ This was already true for servers that opted in explicitly; making oam the default makes it apply broadly, so it is now logged. yaw-mcp reports the resolved version once per package at startup rather than leaving it to be discovered. Refresh a pinned sidecar by running it through npx once, or set `runtime: "node"` on that server to keep npx's self-updating behavior.
160
+
161
+ **Fixed -- an arbitrary cached version could be run instead of the newest**
162
+
163
+ The npx cache is keyed by content hash, so a machine that has run a server for months holds every version it ever fetched. Resolution took the first directory-listing hit, which is hash order, so a server configured as `@latest` could be started from a months-old build with nothing logged. The highest version present now wins, and a durable `npm i` install still takes precedence over any cached copy.
164
+
165
+ **Changed -- minimum oam version is 0.8.2, and now tracks the latest oam release**
166
+
167
+ Raised from 0.6.0. The floor is no longer set by whichever release happened to fix something yaw-mcp noticed; it tracks the current oam release and moves with every one. oam is pre-1.0 and moves fast, and oamjs.org only ever installs the current release, so hosting sidecars on anything older means running a build nobody else is.
168
+
169
+ A below-minimum oam is refused rather than silently used -- the servers run on node instead, which is where they were before oam existed, with one warning naming both versions. `install` now says so when oam is missing.
170
+
171
+ **Changed -- `LICENSE` renamed to `LICENSE.md`**
172
+
173
+ The license file is renamed from `LICENSE` to `LICENSE.md` and `package.json` now declares `SEE LICENSE IN LICENSE.md` rather than the doubled-up `SEE LICENSE IN LICENSE`. `SEE LICENSE IN <filename>` is npm's own syntax for a license with no SPDX identifier, so the repetition was just the filename having no extension.
174
+
175
+ Cosmetic only. The license text, its terms, and the licensor are unchanged.
176
+
5
177
  ## 0.74.0 -- local-only: the hosted control plane is retired (BREAKING)
6
178
 
7
179
  The hosted backend is gone. Every endpoint yaw-mcp called returns 404 -- `/api/connect/config`, `/heartbeat`, `/analytics`, `/servers`, `/api/compliance/ext`, `/api/try/event`, the dashboard, and `/signup`. Rather than keep code that cannot succeed, account mode is removed outright: your servers come from `~/.yaw-mcp/bundles.json` and your credentials from the local encrypted vault. Roughly 5,800 lines deleted.
package/README.md CHANGED
@@ -88,6 +88,70 @@ The JSON shape (top-level `mcpServers`, except VS Code uses `servers` in `.vscod
88
88
 
89
89
  On **Windows**, use `"command": "cmd", "args": ["/c", "npx", "-y", "@yawlabs/mcp@latest"]`.
90
90
 
91
+ ### Running yaw-mcp on oam
92
+
93
+ yaw-mcp can host itself on [oam](https://oamjs.org), a Rust+V8 JavaScript runtime built for this shape of workload — short-lived, mostly-idle MCP processes.
94
+
95
+ `yaw-mcp install` writes the oam entry for you when two things are true:
96
+
97
+ - **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: versions below the floor predate fixes this workload sits on, including one where a client disconnecting mid-upload killed the process. `yaw-mcp doctor` prints the exact minimum under OAM RUNTIME.
98
+ - **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.
99
+
100
+ 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.
101
+
102
+ The entry it writes:
103
+
104
+ ```json
105
+ {
106
+ "mcpServers": {
107
+ "mcp": { "command": "/path/to/oam", "args": ["run", "--no-check", "/path/to/@yawlabs/mcp/dist/index.js"] }
108
+ }
109
+ }
110
+ ```
111
+
112
+ 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 this setting is about the **broker itself**; which runtime the *sidecars* get is decided separately, below.
113
+
114
+ ### Which runtime the sidecars get
115
+
116
+ When oam is installed and meets the minimum, yaw-mcp hosts the MCP servers it spawns on it. Nothing needs configuring — install oam and the sidecars move over. Without oam they run on node/npx exactly as before, and no warning is printed, because nothing was asked for.
117
+
118
+ Only Node-based launches are rewritten. A server whose command is `docker`, `uvx`, or a native binary is left alone, as is an npx package that cannot be found on disk.
119
+
120
+ Two more npx shapes stay on npx, because npx re-resolves its spec against the registry while `oam run <entry>` just runs whatever sits at the path it is handed. A spec that **constrains the version** keeps npx unless the copy on disk can be shown to satisfy it — an exact pin moves to oam only when the resolved copy declares that same version, and a range or partial (`^1.2.3`, `~1.2`, `1.x`) always keeps npx, since honouring one would mean evaluating semver ranges against the tree. A spec naming a **git or path target** (`npx -y ./local-server`, `github:owner/repo`) keeps npx too: it is not a package name, so there is nothing to look it up as. A plain `@latest`, or no version at all, is the everyday case and does move over.
121
+
122
+ **One tradeoff worth knowing.** `npx -y <pkg>@latest` re-resolves that tag on every spawn, so those servers update themselves. `oam run <entry>` cannot — oam has no fetch-on-demand, so it runs the copy already on disk, and because npx then stops running for that server, the copy stops being refreshed. The version pins itself until something fetches a newer one. yaw-mcp logs the resolved version once per package at startup so this is visible rather than silent, and picks the newest copy present.
123
+
124
+ ### Installing the servers durably
125
+
126
+ ```
127
+ yaw-mcp sidecars install
128
+ ```
129
+
130
+ Installs the npx-launched servers from your `bundles.json` into `~/.yaw-mcp/sidecars`, and yaw-mcp resolves from there in preference to npm's npx cache. That gives one copy per package at a version that is written down, instead of whichever of the several copies in the cache happened to be newest — and re-running the command is how you move them forward.
131
+
132
+ It is not automatic and nothing requires it. Acquiring packages means network and minutes, and the connect path is what an MCP client blocks on while waiting for its tools; a first connect that silently turned into an npm install would be the wrong trade. Without it, resolution falls back to the npx cache exactly as before.
133
+
134
+ Only npx servers naming a **registry package** are installed. An npx launch pointing at a git or path target — `npx -y github:owner/repo`, `npx -y ./local-server` — is skipped and named in the output; those keep using npx, since resolving them would mean fetching the target just to learn the name it declares. Two servers pinning the same package at different versions is also reported: one flat `node_modules` holds a single version, so the command tells you which one it installed rather than letting the loser start on something it did not ask for.
135
+
136
+ `yaw-mcp doctor` prints the installed version of each configured package under OAM RUNTIME, so a pinned or missing one is visible. To keep npx's self-updating behavior for a particular server instead, set `runtime: "node"` on it.
137
+
138
+ `--json` emits the same keys on every run — `root`, `installed`, `reason`, `error`, `conflicts`, `skipped` — so a script can read the result without first working out which path it took.
139
+
140
+ To override, in `~/.yaw-mcp/bundles.json`:
141
+
142
+ ```json
143
+ {
144
+ "defaultRuntime": "node",
145
+ "servers": [{ "namespace": "postgres", "runtime": "oam" }]
146
+ }
147
+ ```
148
+
149
+ - `runtime` on a server wins over everything, and `"node"` is the per-server escape hatch.
150
+ - `defaultRuntime` at the top level sets the machine-wide default; `"node"` opts the whole machine out.
151
+ - `YAW_MCP_DEFAULT_RUNTIME=node|oam` overrides `defaultRuntime` for one process.
152
+
153
+ `yaw-mcp doctor` prints the resolved runtime for every configured server, with the reason — including the cases where oam was wanted but not used, so a silent fallback is visible rather than guessed at.
154
+
91
155
  ## CLI
92
156
 
93
157
  `yaw-mcp` with no subcommand runs as the MCP server, serving the servers in your `~/.yaw-mcp/bundles.json`. Most read-only subcommands accept `--json`. Run `yaw-mcp <cmd> --help` for per-command flags.
@@ -217,6 +281,7 @@ Common ones (run `yaw-mcp --help` for the full list):
217
281
  | `YAW_MCP_AUTO_UPGRADE` | `0` disables the background self-upgrade check at startup. Default on. |
218
282
  | `YAW_MCP_AUTO_LOAD` | `1` pre-activates the top recurring pack at startup (needs persistence). Default off. |
219
283
  | `YAW_MCP_PRUNE_RESPONSES` | `0` disables response pruning. Default on. |
284
+ | `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. |
220
285
  | `YAW_MCP_DISABLE_PERSISTENCE` | `1` keeps learning + pack history process-scoped (CI, containers). Default off. |
221
286
  | `LOG_LEVEL` | `debug` \| `info` \| `warn` \| `error`. Default `info`. |
222
287
 
@@ -229,7 +294,7 @@ Common ones (run `yaw-mcp --help` for the full list):
229
294
 
230
295
  Source-available, not open source. Copyright (c) 2026 Yaw Labs, all rights reserved.
231
296
 
232
- The source is published so you can read and audit it before running it -- `yaw-mcp` spawns processes on your machine and handles your credentials, and you should not have to take that on faith. You may use it freely, personally or commercially, and redistribute unmodified copies. You may not offer it to third parties as a competing product. See [LICENSE](./LICENSE) for the terms, and [CONTRIBUTING.md](./CONTRIBUTING.md) for the DCO sign-off contributors use.
297
+ The source is published so you can read and audit it before running it -- `yaw-mcp` spawns processes on your machine and handles your credentials, and you should not have to take that on faith. You may use it freely, personally or commercially, and redistribute unmodified copies. You may not offer it to third parties as a competing product. See [LICENSE.md](./LICENSE.md) for the terms, and [CONTRIBUTING.md](./CONTRIBUTING.md) for the DCO sign-off contributors use.
233
298
 
234
299
  ## Links
235
300