python-smoke
The cross-language smoke (docs/design/plugin-hostapi-protocol.md §9.7 P5): a
process plugin written in Python that speaks the host protocol over its own
stdin and stdout.
plugin.jsondeclaresprocess: { command: "./bin/plugin" }and noenv.PYTHONPATHis a name the host reserves, sobin/pluginsets it itself, inside confinement, from the host-ownedPLUGIN_ROOT.bin/pluginruns the interpreter named inbin/python-pathwith-s(no user site directory) onplugin.py. The test harness writesbin/python-pathandvendor/into its temporary copy of this directory; neither is committed.plugin.pyroutesave/instance/*to its own handlers and serves the MCP half with the stockmcplibrary, pinned at 2.2.0, in memory, one message at a time. It answers-32602to any MCP request whose_metalacksio.modelcontextprotocol/protocolVersionorio.modelcontextprotocol/clientCapabilities, before the library sees it.- Beside
echoit servesescape_secretsandescape_network, Admission's escapes 1 and 2 (plugin-hostapi-protocol.md§9.8 A2) from a child that is not JavaScript: a read of the host's secrets directory and of another plugin's data directory, after a write and read-back of its own as the in-sandbox control, and a raw socket to a loopback listener. They report what the platform answered;adversarial-escapes.test.tsruns them under the real wrap and asserts the refusals. expected.jsonlis its golden transcript, recorded byhost-protocol-golden.test.ts.
The interpreter
One interpreter, Python 3.10 or newer (mcp 2.2.0's floor), resolved by
python-smoke-harness.ts: AVE_SMOKE_PYTHON when set (CI sets it from
actions/setup-python), otherwise a uv-managed Python found with
--managed-python in node_modules/.cache/ave-python-smoke/python, installed
there by the app's development uv on a miss. A Python on PATH is never used.