Worker MCP launch
Resolves the installed maia command from the Node's absolute PATH, outside
the coding Session's writable directories. It follows links one hop at a time
and checks every directory on the way. Missing, unsearchable and looping
entries and dangling links count as absent unless the worker or another user
could create them, and an entry another user could redirect is skipped (a
warning names it, except the macOS /System/ entries every stock PATH
carries); relative, world-writable and worker-redirectable entries, and a world-writable
or replaceable maia or node, refuse the launch with an error that names
the entry and the fix. Codex and Claude launch it as the
reserved maia_worker server, in a neutral cwd, with PATH pinned to the
checked directories, mcp --worker and the Session environment. The role table owns tool exposure; this scope grants no
authority and never serializes a credential into configuration or argv.
Tests use temporary files, links and permissions and check credential requirements, trusted command resolution, PATH refusals and skips, and argv. A Node-level test starts a coding Session over the fake Codex app-server on a PATH with missing entries. Vendor launch tests and the application Session request integration tests cover admission and real SQLite/loopback authentication.
Imported from Maia OS docs at a2175bb