fix(runner): run Python venv binaries directly, not via node
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-08 15:34:29 +01:00
parent 45505a1635
commit e645455b22

View File

@@ -117,11 +117,17 @@ async function initMcp(svc) {
// --- Spawn --- // --- Spawn ---
function spawnService(svc) { function spawnService(svc) {
// npx packages have a pre-resolved binary // npx/uvx packages have a pre-resolved binary
let cmd, args; let cmd, args;
if (svc._npxBin) { if (svc._npxBin) {
cmd = "node"; // Python venv binaries are scripts with shebangs — run directly
args = [svc._npxBin]; if (svc.runtime === "python") {
cmd = svc._npxBin;
args = [];
} else {
cmd = "node";
args = [svc._npxBin];
}
} else { } else {
({ cmd, args } = detectEntry(svc.sourcePath, svc.runtime)); ({ cmd, args } = detectEntry(svc.sourcePath, svc.runtime));
} }