Skip to content

v2.4.9 - the embedding contract

Choose a tag to compare

@FerroxLabs FerroxLabs released this 07 Sep 18:33
· 6 commits to main since this release

The second embedding failure, closed the only way it can be.

A host that spawns the tvcontrol bin with a scrubbed environment exits 127 with env: node: No such file or directory. The shebang is #!/usr/bin/env node, and node installed through nvm, fnm, volta or asdf is never on a bare PATH.

Why this is not fixed inside the package

The kernel resolves the shebang before a line of our code runs, so there is no point at which the server can look for node itself. The obvious repair, pointing the shebang at /bin/sh and self-locating, breaks Windows: cmd-shim takes the interpreter straight from the shebang, so every generated .cmd shim would invoke sh. That trades a conditional POSIX failure for a certain Windows one, on the platform the current incident is on.

The host already has a runtime it can be sure exists: its own. Spawning process.execPath with an absolute path to src/server.js removes the whole class in one line, plus ELECTRON_RUN_AS_NODE=1 on an Electron host.

So the instruction is the deliverable, and it is now treated as one.

  • docs/EMBEDDING.md, added to package.json files so it ships in the tarball. A contract that exists only in the repo is no contract with a host author, who has an installed package and no checkout. It carries the literal exit code and error string so someone searching their own logs lands on it, the Program Files section with the >= 2.4.8 floor, the stdout-is-the-protocol rule, and the environment flags.
  • examples/mcp-config.example.json gains an absolute-node variant. Every example saying node was the exact assumption that exits 127.
  • tests/embedding_contract.test.js holds both to it.

828/828, lint clean.