four PRs merge into pi after v1.7.0: MCP learns the 2026-07-28 stateless revision, WSL detection falls back to /proc/version, and HTML export keeps its dollar signs
Four pull requests merged into pi after v1.7.0 published at 17:01:43 UTC on November 27 — three on the 27th and one on the 28th: one feature (#12652), two fixes (#12634, #12609), and one docs change (#12628). The running tally closes at 217: 156 merges since v1.5.0 through November 20’s entry, 34 more between November 21 and v1.6.1’s cut, the sixteen listed in November 26’s entry, the seven release-riding merges the v1.7.0 entry reconciled, and these four — #12628 was already named there as main-only and is listed here so the window reconciles. The merged-pulls search behind the source link is the count’s source.
#12652 adds MCP 2026-07-28, the stateless protocol revision, to pi-mcp and pi’s MCP extension, reworked from #12479 by dmmulroy (refs #10416). Every connection still starts with initialize, so servers of earlier revisions see exactly the requests they see today; only a server that rejects initialize — a JSON-RPC error, or HTTP 400 — gets server/discover and is then spoken to with 2026-07-28. A stdio server that exits after rejecting initialize, or refuses server/discover on that process, is started once more on the stateless revision, which is how rmcp 3.12 and Python SDK 2.x servers behave. "protocol": "2026-07-28" in mcp.json uses the new revision with servers that speak both. On stateless connections pi keeps, from #12479: per-request _meta, multi round-trip requests answered with roots/list, the Mcp-Method / Mcp-Name / Mcp-Param-* headers with x-mcp-header validation, sessionless HTTP, logLevel, and tool list changes followed through subscriptions/listen — plus one addition: after a header-mismatch error, pi lists the tools again and retries once.
The PR body records why the probe-first design died: #12479 sent server/discover before initialize, and real servers broke — Python mcp 1.8 through 1.9.3 over stateless HTTP crashed on the probe and answered 500 to every client until restarted; mcp before 1.9.4 over stdio ignored the probe at about sixty seconds per connect, plus a second process; HTTP servers that answer unknown requests with 5xx, 202, HTML or an empty body failed to connect; rmcp 0.8 exited on the probe and was started twice. Sending server/discover after a successful initialize breaks the same servers, so the rework only speaks 2026-07-28 to servers that reject initialize — and lands at about 750 lines of source change instead of #12479’s roughly 1,870.
#12634 unifies WSL detection across call sites that disagreed: keybindings, the footer and p2 keyed on the WSL_DISTRO_NAME / WSL_INTEROP variables, while the clipboard code keyed on WSL_DISTRO_NAME / WSLENV with a /proc/version fallback — and the variables exist only in shells started through wsl.exe, so a shell started by a systemd user service inside WSL (seen with the Rex terminal) got plain-Linux keybindings whose image paste sits only on ctrl+v, a key the Windows-side terminal handles as its own paste, so pasting an image did nothing and the alt+v / ctrl+q Windows defaults never applied. The footer watched .git/HEAD for repos under /mnt/<drive> — file watching does not work across the Windows mount — and could show a stale branch. The new single isWSL(platform, env) in utils/wsl.ts checks the three variables, then /proc/version for microsoft|wsl; p2, which cannot import coding-agent internals, keeps its copy in hosts/tui-wsl.ts.
#12609 closes #12608: generateHtml inserted the viewer script, the vendor scripts and the CSS through String.prototype.replace with string replacements, which expand $$ to $ and $& to the matched text. The viewer writes the cost as $${totalCost.toFixed(3)}, so the exported header showed Cost: 0.300, and the exported highlight.min.js carried a literal {{HIGHLIGHT_JS}} in its R operator regex while the Swift variable rule lost a $; all ten replacements now pass functions, which insert as-is. #12628, merged two seconds after the release page published, adds a Reference artifacts section to the p3 docs README, linking the org-visible Radius artifacts shared on Discord on November 27 — a how-to-work deck, the product definition, concepts, component specs — on a request from badlogic. All four bodies were read for this entry; every merge in the window landed after v1.7.0’s cut, so all four are main-only as of this entry, riding no release yet.