GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — mcpx: how the JavaScript runtime is chosen, what each does with TypeScript, and an automatic validate/compile step · Issue #1911 · developing-today/code Open Labels enhancementNew feature or requestepic/mcpx-platformReprioritization program epic (2026-11-12)kind/enhancementqueue/parkedQueue task is parked (waiting on CI, time, or an event)source/creatorFiled by the new-issue-creator jobstatus/parkedDeliberately paused with a recorded resume conditiontask/small-fixQueue packet kind: bounded fix with reproduction and targeted testswork/assignedQueue worker lifecycle state Milestone DescriptionRelocated from dezren39/darwin-nix#100 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering). Parent: #175 Owns #181 collision 1 ( SummaryThree questions in one: how a user picks the JavaScript runtime, what each of The short answer to the first, which should also be the first line of the docs: Values: Original notes
Current state
What each runtime does with
|
| input | deno | bun | node (as mcpx invokes it) | node --experimental-transform-types |
|---|---|---|---|---|
| plain type annotations | runs | runs | runs | runs |
enum E { A } |
runs | runs | fails | runs |
namespace N { export const v = 1 } |
runs | runs | fails | runs |
| legacy decorators | runs | runs | fails | fails |
import {a} from "./lib" (no extension) |
fails (wants .ts or --sloppy-imports) |
runs | fails | fails |
import {a} from "./lib.ts" |
runs | runs | runs | runs |
| type checking | deno check |
none | none | none |
Two facts worth pulling out of that table:
node plain.ts--experimental-strip-types is now a no-op default (--no-strip-types--experimental-transform-types,Detect and is thed956689 to cb5dc60 #108 (in flight) carries it..ts-less and ESM-extensionless ones; bun accepts./mcpx-client.tsSo: "would a user run JavaScript on node?" — yes, and .js/.mjs scripts
already resolve. "Would TypeScript fall over?" — only on non-erasable syntax
(enum, value namespace, parameter properties, legacy decorators), and
mostly not after passing --experimental-transform-types. Decorators remain
node's hard edge.
Yes, three ways, none currently wired up:
| tool | command | notes |
|---|---|---|
| deno | deno bundle -o out.js entry.ts (present in 2.9, --platform browser|deno, --packages bundle|external) |
no extra dependency; mcpx already requires deno for typecheck |
| bun | bun build --target=node --outfile out.js |
fast, needs bun present |
| tsc | tsc --declaration --allowJs --checkJs |
the only one that also emits .d.ts; not installed here (which tsc → not found) so it would be an npx/bunx dependency |
deno compile additionally produces a self-contained binary from a script,
which is a plausible later answer to "baked into binary" (see the dependency
issue).
.d.ts for .js scriptsThe user wrote ".dt"; the thing meant is .d.ts, and it already works without
any new machinery:
mcpx-globals.d.ts beside the client and the built-in/// <reference path="./mcpx-globals.d.ts" />runner.GlobalsFileName, writeLauncher). That is exactly the mechanism.js script gets checked today by adding // @ts-check and JSDoc types.deno check c.js on a // @ts-check file with/** @param {number} n */ … n.toUpperCase() reports the type error and exits// @ts-checkcompilerOptions.checkJs in a deno.json..ts. For a .js script to be checked against it,mcpx-client.js + mcpx-client.d.ts alongside, or./mcpx-client.ts from JS (deno and bun do;.js file under plain strip-types).The design choice is the last sub-bullet: what mcpx does automatically before
running a script, and how it is configured. The runtime-selection answer above
is documentation, not a choice, and the --experimental-transform-types fix is
a bug fix rather than a design.
mcpx runs a bundler (deno bundle / bun build) over the launcher and hands
plain JavaScript to whichever runtime is selected, so all three behave
identically and node's syntax gaps vanish.
Why not: it destroys the thing the current design is built around. runner.go's
header comment is explicit that a local file on disk exists so the runtime's
own module cache does the work and a run costs tens of milliseconds instead of
~10s. A bundle step is a cache mcpx now owns, invalidates and gets wrong; it
breaks stack traces and source positions in the error messages agents read; it
forces a decision on npm:/jsr:/https: specifiers that the runtimes resolve
for free; and it makes the bundler a hard dependency of running any script at
all. It also cannot fix decorators without a full TypeScript compiler.
Keep script.typecheck as the single knob but give it more values and make it
runtime-aware: off | on | strict | auto, where auto means "check if the
selected runtime can" and stays silent otherwise. Add an error policy —
script.onTypeError = fail | warn | run — so "run-but-keep-going-on-error" is
expressible, which today it is not: preflight.TypeCheck returns and runner.Run
aborts on rep.Err().
This covers most of the ask with a small diff and no new subsystem. What it
does not cover: it cannot check anything under bun or node (Deno-only, stated
in code), so the policy silently degrades on two of the three runtimes; and it
says nothing about .js+.d.ts, or about compiling.
Worth pairing with #79's proposal to default script.typecheck to on for
run — that measurement work (≈80 ms repeat, ≈400 ms new program) is the
evidence that a default-on check is affordable.
Name the stages that can run before a script does, make each one independently
configurable, and let each one declare what it does when the selected runtime
cannot perform it. This is what the last sub-bullet asks for, and it is the
shape mcpx already uses elsewhere (internal/preflight returns a Report with
problems and warnings; the launcher already has five named phases because "a
launcher that is half-configurable invites forking it" — same argument).
Proposed settings, all in the one registry so they arrive on CLI, env, config,
/v1/settings and MCP at once:
| setting | values | default | meaning |
|---|---|---|---|
script.check |
off|syntax|types|strict |
syntax |
how hard to look before running |
script.checkOnError |
fail|warn|run |
fail |
the "keep going on error" knob |
script.checkOnUnsupported |
skip|warn|switch |
warn |
what to do when the runtime cannot check — switch borrows deno purely as a checker while still running on the configured runtime |
script.compile |
off|auto|always |
off |
emit JS before running; auto only when the selected runtime would choke (node + non-erasable syntax) |
script.checkJs |
bool | true |
pass checkJs so .js scripts with // @ts-check and .d.ts neighbours are validated |
Naming (changed in the 2026-09-30 pass): these were script.check.onError and
script.check.onUnsupported. A nested config file cannot hold script.check
as both a value and an object ({"script":{"check":"types"}} vs
{"script":{"check":{"onError":"warn"}}}); no declared setting path is both a
leaf and a branch today, and settings.ApplyFile flattens nested
objects (internal/settings/file.go:18-24). script.onError also already
exists as a launcher phase (registry.go:230), so a second onError under
script. invites confusion. Flat camelCase (script.captureConsole,
plumbing.allowTsJsOverlap) is the house style.
Three properties that make this better than B:
onUnsupported: switch is the real fix for bun/node validation. deno is--typecheck isdeno check as a checker for a script that--sloppy-imports (orcompile: auto is narrow enough to be safe. It fires only in the case--experimental-transform-types has failed to be enough. Everywhere else thesyntax as the default is nearly free and catches the real failure. Theinternal/diagnose already parses a script statically to find toolenum/decorator that the selected runtime--runtime deno. That is a better error than node's stack trace andAlso in this issue, cheap and independent:
--experimental-transform-types in Detect for node (one line, removesd956689 to cb5dc60 #108 (in flight under feat(nix): Android SDK + JDK 21 in the system and dev shells, and the OpenChamber release signing key #177);--experimental-strip-types, or keep it with a commentd956689 to cb5dc60 #108).Detect falls back through auto, say which runtime was chosen. Theruntimeinternal/cli/commands.go:956); text output and the structured log sayMCPX_RUNTIME is visible only to the script.script.typecheck → script.check rename (collision 1)Owns #181 collision 1: alias-vs-replace is decided here, once, and #79's
default change lands on top of it as a change to script.check's default,
not beside it. Facts that constrain it, at 05c78b2:
internal/settings/file.go:32-58). An unread MCPX_* variable is simply--typecheck is a hand-written flag (internal/cli/commands.go:465),FlagAliases and EnvAliases (internal/settings/schema.go:146-154)Default per settingschema.go:133-137), so no per-command default either.A — replace. Delete script.typecheck, add script.check. Least code, and
the worst outcome: {"script":{"typecheck":"on"}} becomes an unknown-key
warning and checking silently stops, MCPX_SCRIPT_TYPECHECK is silently
ignored, and --typecheck either breaks scripts that pass it or stays and
does nothing — #74's bug class (closed, fixed in #75). If #79 flips a default in
the same release, anyone who set the old key is broken twice.
B — keep both. Add script.check beside script.typecheck with a
precedence rule. Nothing breaks, but two settings mean one thing, can disagree
(typecheck: on, check: syntax), and both appear on every surface the
registry generates, permanently.
C — recommended: script.check is the setting; script.typecheck is a
declared alias with a value map. off→off, on→types, strict→strict, in
all three spellings: the config key, MCPX_SCRIPT_TYPECHECK, and --typecheck.
A use of the old spelling is reported once, the way unknown keys already are;
giving both at the same layer is the existing same-layer conflict
(internal/settings/value.go Apply). This needs one registry addition —
PathAliases with an optional value map — which is a registry capability, not
a special case, and daemon.inline (#79 point 2) is the next setting that will
want it. The new setting is an ExecOptions field from the start, closing the
remote-drop above. #79 then changes script.check's default (and only that),
in the same release as the alias, with one note in docs/configuration.md.
auto resolution (collision 11)Owns #181 collision 11. The collision as first recorded is partly outdated:
the e2e suite already runs its runtime tests under each runtime explicitly
(internal/e2e/runtime_test.go:14,46, internal/e2e/e2e_test.go:2478), and CI
installs deno, bun and node (.github/workflows/mcpx.yml:55-61), so node is
exercised. What remains:
auto itself. On a nix install the wrapper's PATH suffix makes it deno everyDetect are never taken by a packaged install and are asserted byrunner.Detect("auto", nil) with aPATH holding only a stub deno, only bun, only node, and none — fourd956689 to cb5dc60 #108 (in flight).PATH at all goes through Update Rust crate rand to v0.9.3 [SECURITY] #134's matrix, not here.No real choice for the test; the open question below about "first on PATH" vs
"first that can run this script" is the only design decision in auto.
auto stay "first on PATH" or become "first on PATH that can run thisscript.check replace script.typecheck or alias it? Answered above.js + .d.ts: emit mcpx-client.js/.d.ts beside the .ts client, or.js scripts to import the .ts one (fine on deno/bun, not on node)?tsc ever acceptable as a dependency, given docs/dependencies.md'sdeno bundle avoids it for compiling but not for.d.ts.WorkRoot, one directory per catalogue hash) or in its own cache keyed byEase M (S for the node flag fix and the docs; M for the check pipeline; L if
compile lands too) · Impact high — it is the first question a user asks and
the answer is currently only in source comments.
Depends on / related: #79 (typecheck default and measured costs; lands on
this issue's collision-1 decision), #108 (the node flag, in flight), #134 (the
CI leg without deno), #187 (cache mechanism, if compile caches), #74 (closed,
fixed in #75 — flags accepted and ignored), #66 (merged: --typecheck works),
#40 (closed, fixed in #57 — ExecOptions, where runtime crosses the wire), and
siblings #101 (comparison doc), #103 (dependency configuration), #104
(automatic imports), #105 (Python parity), #106 (shebang dispatch), #107 (flake
execution environments).
Security/auth deferred; see tracker.
History carried over from dezren39/darwin-nix#100 (verbatim, oldest first):
@dezren39 · 2026-09-30T07:21:37Z
Integration pass. Placed in the DAG rooted at #181.
d956689 to 8740ce0 #101 Bump build/buck/preludes/buck2-prelude from d956689 to 062245a #103 Bump tracing from 0.1.38 to 0.1.40 in /sources/pavex/examples/skeleton #104 Bump h2 from 0.3.18 to 0.3.24 in /sources/pavex/examples/skeleton #105 Bump h2 from 0.3.19 to 0.3.24 in /sources/pavex/examples/realworld #106 Bump checkmarx/ast-github-action from 2.0.19 to 2.0.22 #107@dezren39 · 2026-09-30T07:27:45Z
Integration pass -- cross-theme collision. Surfaced only when the themes were put side by side; the authors of these issues could not see each other's work. Recorded at the root in #181.
#100 renames script.typecheck -> script.check; #79 flips its default off -> on. It is documented in docs/configuration.md and still Default: "off" at internal/settings/registry.go:244 on 8001f23. Decide alias-vs-replace once, in #100, before #79 lands. Users who set it otherwise get broken twice, or whoever lands second silently reverts the first.
Also on: #79. Nobody currently owns this.
@dezren39 · 2026-09-30T07:28:17Z
Integration pass -- cross-theme collision. Surfaced only when the themes were put side by side; the authors of these issues could not see each other's work. Recorded at the root in #181.
auto hides all Node breakage from this repositorypackage.nix suffixes deno, bun and node onto PATH in postInstall, so on any Nix install script.runtime: auto always resolves to Deno. Nobody testing through the flake will ever see what #100 and #108 describe -- the bugs stay invisible until a user without Deno installs it. This needs a pinned-runtime CI matrix (#49).
Also on: #108 #49. Nobody currently owns this.
@dezren39 · 2026-09-30T11:05:57Z
Collision ownership (issues pass, 2026-09-30, at 05c78b2). #181 listed these cross-theme collisions with no owner. Each now has one:
| #181 row | Collision | Owner | What the owner decides |
|---|---|---|---|
| 1 | script.typecheck: rename (#100) and default flip (#79) in one cycle |
#100 | Decide alias-vs-replace once, in #100, and land #79's default change on top of that decision, not beside it. |
| 11 | auto hides Node breakage from anyone testing through the flake |
#100 | Partly outdated: the e2e suite already runs its runtime tests under each runtime explicitly (internal/e2e/runtime_test.go:14,46, e2e_test.go:2478) and CI installs all three. What remains is auto itself -- on a nix install the wrapper's PATH suffix makes it resolve to Deno every time -- and non-erasable TypeScript under Node. #100 owns the test that auto picks each runtime when it is the only one on PATH; the CI leg without Deno goes through #134's matrix. |
Where this issue is the owner, the decision is made here; where it is not, it adopts the owner's decision rather than making its own.
@dezren39 · 2026-09-30T11:57:03Z
Issues pass (2026-09-30, at 05c78b2).
Parent: #175 and the two collision-ownership lines. New section "Owned decisions": collision 1 (script.typecheck → script.check) now has an A/B/C (replace / keep both / alias with a value map, recommended), built on facts checked at 05c78b2: an unknown config key only warns (internal/settings/file.go:32-58), the registry has flag and env aliases but no config-path alias, value map or per-command default (internal/settings/schema.go:133-154), and --typecheck is a hand-written flag (internal/cli/commands.go:465). Update dependency @playwright/test to v1.64.1 #79's default change lands on this decision.internal/e2e/runtime_test.go:14,46, e2e_test.go:2478) and CI installs all three (mcpx.yml:55-61). This issue now owns the missing test (Detect("auto") with only one runtime on PATH, four cases). Added that the container pins bun (Containerfile:73-80).script.typecheck is not an ExecOptions field, so mcpx run --remote --typecheck on drops the flag (commands.go:556-559 returns before :748 reads it; the daemon uses its own value, execsvc.go:336). The replacement setting has to travel on the wire.script.check.onError/.onUnsupported to script.checkOnError/script.checkOnUnsupported: a nested config cannot hold script.check as both a value and an object, and script.onError already exists as a launcher phase (registry.go:230).runtime (commands.go:956). The node flag fix is marked as Bump build/buck/preludes/buck2-prelude from d956689 to cb5dc60 #108's (in flight). Update Rust crate petgraph to 0.6.4 - autoclosed #74 → "closed, fixed in Update Rust crate proc-macro2 to 1.0.81 - autoclosed #75", Bump openssl from 0.10.54 to 0.10.55 in /sources/pavex/examples/realworld #40 → "closed, fixed in chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 677e9eb #57". Siblings are now listed by number, and Phase 4: joiner with missing pre-join control messages stalls silently #187 is named for any compile cache.@dezren39 · 2026-10-28T21:39:44Z
Triage verdict (task 2114, repo-health-nix-pilot): RELOCATED — analysis/design is complete in this issue; the implementation surface moved to developing-today/code. No fix packet in this repo.
Verified against current main at 224c7b738e88c7a8e5d406987a7d88257e229db2:
d956689 to 9afedba #100 is OPEN with labels enhancement, design — no hard-stop labels. Parent tracker fix(id): make Nix E2E check reproducible #175 is OPEN; the cheap independent fix it names, Bump build/buck/preludes/buck2-prelude from d956689 to cb5dc60 #108 (pass --experimental-transform-types for node in Detect), is still OPEN..d.ts mechanism. The open design choice is decided: Approach C — a declared preflight pipeline (script.check, script.checkOnError, script.checkOnUnsupported, script.compile, script.checkJs) — plus the owned Phase 3: sync, blob gate, and relays #181 collision 1 (script.typecheck → script.check rename) and collision 11 (auto resolution) decisions.internal/runner/runner.go, internal/settings/registry.go, internal/preflight/, internal/execsvc/) is mcpx source that no longer lives here: code search for path:internal/runner in dezren39/nix returns 0; mcpx-nixbuild.yml states the source "lives only in developing-today/code now" and this repo only builds the pinned mcpx-src input.Route: no small_fix packet in dezren39/nix — there is no code here to change. Implementation of Approach C (and #108) routes with the source in developing-today/code, referencing this issue for the design and its owned decisions; per the cross-repo rule, do not re-file the design there. #100 stays open on the nix side until that implementation lands or the issue itself is transferred.
🤖 Agent note · picked up
🤖 Agent note · done
Dedupe: no duplicate. #1911 uniquely owns the script.check design and the two #181 decisions (collision 1: the script.typecheck rename; collision 11: auto resolution). #1868 (was nix#79) point 4 explicitly defers to this issue for collision 1 — it is a dependent, not a duplicate. #1889 is the parent tracker. Closed #263 covered only the node flag (below).
Scope vs current main (8124cc0): the cheap items are done; the core design is untouched, and runtime selection has moved since the snapshot.
Already done here:
internal/runner/runtimes.go:425-430 now passes --experimental-transform-types with an explanatory comment — the fix the issue assigned to nix#108 landed in this repo as mcpx: --runtime node rejects TypeScript that Node runs, because of one flag (strip-types) #263 (closed). Both "cheap and independent" flag items are closed out.script.runtime (internal/settings/registry.go:226) is now a string that also accepts declared runtimes and binary paths, with new script.runtimes (:235) and script.runtimeOrder (:244, default deno,bun,node) settings; the runner code moved from runner.go to runtimes.go. The issue's "first on PATH" description of auto now reads as "first in script.runtimeOrder that is present" — the follow-up's Detect test must assert the current semantics.Still open, exactly as the issue frames them:
script.typecheck still stands alone (registry.go:323, default off); there is no script.check and the settings registry has no PathAliases capability — so mcpx: faster CLI and exec -- no self-socket, lazy schemas, a typecheck default #1868's default change remains blocked on this issue, as designed.ExecOptions (internal/execsvc/execsvc.go) carries Runtime but no check/typecheck field, so /v1/exec still cannot receive a caller's check setting.Detect(auto) stub-PATH test, and the chosen runtime is still not surfaced in text output or the structured log.Follow-up: queue task 3170 enqueued carrying Approach C (script.check pipeline + the alias-with-value-map decision), the collision-11 test, and chosen-runtime surfacing, with an explicit note to record on #1868 when the rename lands.
Labels updated to mirror the queued follow-up.
Agent note — task 12900 completed: already_done (PR #6111 merged)
repo-worker-code, lane code-y (shift 2026-11-09 02:04 CST)13eb408fe5c9a3539721115e33900082bae5474a; Codex review present on the PR with fleet comments following it. The merge the task called for has already happened, so task 12900 was completed with outcome already_done (issue mcpx: how the JavaScript runtime is chosen, what each does with TypeScript, and an automatic validate/compile step #1911 remains OPEN for its other remainder work).🤖 Agent note · partial delivery verified; remainder still open
13eb408fe5c9a3539721115e33900082bae5474a. The mcpx: how the JavaScript runtime is chosen, what each does with TypeScript, and an automatic validate/compile step #1911-linked PR search found test(mcpx/runner): Resolve(auto) stub-PATH cases — #1911 collision 11 (subset) #2570, feat(mcpx): make script.check canonical with legacy aliases #5660 and feat(mcpx): add script check failure policies #6111 as merged slices; no open PR for the remainder.script.check syntax mode; script.compile; script.checkJs; local/remote text output for the selected runtime; and a one-time notice for legacy spellings. Coordinate any script.check default change with mcpx: faster CLI and exec -- no self-socket, lazy schemas, a typecheck default #1868. Keep mcpx: how the JavaScript runtime is chosen, what each does with TypeScript, and an automatic validate/compile step #1911 open; do not re-open completed slices or duplicate mcpx docs: runtimes.md -- compare the execution options and their features, with the capability-probe suite #2129/mcpx: faster CLI and exec -- no self-socket, lazy schemas, a typecheck default #1868 work.agent-note:v1
state: triaged
task 19759 (repo-health-code-pilot, lane any-q)
Pickup + triage revalidation, 2026-11-17.
Fresh state checked this run: issue #1911 is OPEN, labels enhancement / task/small-fix / status/parked / queue/parked / work/assigned / kind/enhancement / epic/mcpx-platform / source/creator. No held, user/owned, do-not-merge, or do-not-auto-edit label. No open PR references issue #1911 (checked this run).
Verdict: the triage of record stands - task 18168 (2026-11-17, lane code-g): partial delivery verified (PR #6111 merged 13eb408, a bounded first slice; PR #4963 and PR #5660 slices also merged), and the remainder - script.check syntax mode, script.compile, script.checkJs, local/remote text output for the selected runtime, one-time legacy-spelling notice - is a multi-part pipeline that must be split into scoped implementation packets before implementation, coordinated with tracker #1868 and without duplicating #2129. Nothing about that state has changed this run.
No follow-on packet is routed from task 19759: the record's own next step is a split/routing pass, not another identical triage follow-on (task 19759 itself arrived as one). Task 19759 completes as triaged naming the triage of record.
Second-pass verify (oc-code-08, 2026-11-24): #1911 is still open. No code changes from this lane. Parking 2h for a fresh read.
Second pass #1911 — mcpx JS runtime / TypeScript / auto-validate (2026-11-24, worker repo-worker-code, task 21772).
Fresh check:
Verdict: #1911 is LIVE and IMPLEMENTATION-READY (detailed current-state analysis present). Next step: implementation packet(s) for the concrete gaps (ExecOptions.typecheck wire, node --experimental-strip-types flag per #108, per-runtime validation auto-run config). No small_fix here — this is a multi-facet implementation. Recommend fan-out to implementation packets after design settlement, or close if superseded by a newer design issue.
Triage revalidation (xaltha lane, task 24919, 2026-11-26): triage of record stands — PRs #5660/#6111/#4963 merged as bounded slices; remainder (script.check syntax mode, script.compile, script.checkJs, selected-runtime text output, one-time legacy-spelling notice) is a multi-part pipeline needing a split into scoped packets, coordinated with #1868, without duplicating #2129. No code change this run; this lane instead completed the queued #15766 implementation slice (PR #15814).
Merge pull request #15913 from developing-today/agent-next-25-local/1…
Triage follow-through (Fleet task 24919): the bounded selected-runtime text-output slice landed in merged PR #15913. Fleet run 45937595847 tested the PR head 944a9df669f51f73893e0c9117c37e5d24f12e3f; both the focused test and five race/shuffle repetitions passed. This does not complete #1911: the remaining validation/compile pipeline stays open and is actively owned by follow-up task 26090 (script.checkJs slice). No closure of #1911 is intended.
Slice 2 delivered in PR #15941: script.checkJs (bool, default true). With check on, a // @ts-check JS entry reports its type errors with adjacent .d.ts declarations resolving through the JSDoc imports that name them; with MCPX_SCRIPT_CHECK_JS=false (or config/flag) the JS entry skips the check while TypeScript checking and the script.checkOnUnsupported policy are unchanged. Verified via the new e2e effect probe plus preflight unit guard; neighboring check-policy probes still pass. PR references this issue and leaves it open for the remaining pipeline slices (compile, defaults, runtime selection).