Description
Problem
mcpx's node runtime is invoked with --experimental-strip-types, whose strip-only mode rejects non-erasable TypeScript (enum, value namespaces, parameter properties) that Node itself runs fine once types are transformed. On machines without deno or bun, auto-resolution lands on node, so such scripts fail with a raw SyntaxError that looks like the author's mistake.
This is the same defect as dezren39/darwin-nix#108 (approach B), fixed there by dezren39/nix PR #387. This repo's pkgs/mcpx copy still has the old flag — internal/runner/runtimes.go differs from the fixed nix copy only in this hunk.
Evidence (verified 2026-10-18 on main 2b46689)
-
pkgs/mcpx/internal/runner/runtimes.go:425:a := []string{"--no-warnings", "--experimental-strip-types"} -
pkgs/mcpx/docs/runtimes.md:49documents the same strip-types invocation. -
Repro on Node v24.20.0 (the sandbox node):
$ cat t.ts enum Color { Red, Green } const c: Color = Color.Green; console.log("enum value:", c); namespace NS { export const x = 42; } console.log("ns:", NS.x); $ node --no-warnings --experimental-strip-types t.ts SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]: TypeScript enum is not supported in strip-only mode $ node --no-warnings --experimental-transform-types t.ts enum value: 1 ns: 42 -
Strip-types is also a no-op default on Node 24, so the flag buys nothing there.
Fix (mirrors dezren39/nix PR #387)
internal/runner/runtimes.go: swap--experimental-strip-types→--experimental-transform-types, with the explanatory comment from the nix fix.docs/runtimes.md: update the node row to match.- Add
internal/runner/runtimes_test.go(the package currently has no such test file): an argv assertion (transform present, strip absent, via the existingfakeRuntimeshelper inpermissions_test.go) and an end-to-end test that an enum script actually runs under the resolved node (skipping on nodes too old for the flag).
Out of scope: approach C from dezren39/darwin-nix#108 (runtime capability probe + actionable parse-failure diagnostics) — that remains tracked there.
Acceptance criteria
-
mcpx run/mcpx execscripts usingenumor value namespaces run successfully when node is the resolved runtime. - New regression tests fail without the flag change and pass with it (ablation).
-
go test ./internal/runner/green; docs row matches the actual argv.
Activity
Merge pull request #264 from developing-today/creator/263-node-transf…