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: exec should run any shebang, and resolve file scripts the same way local or remote · Issue #1919 · developing-today/code Closed Labels enhancementNew feature or requestepic/mcpx-platformReprioritization program epic (2026-11-12)kind/enhancementsource/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item Milestone DescriptionRelocated from dezren39/darwin-nix#106 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 SummaryTwo limits on what Original notes
Current stateNothing runs but TypeScript
The nearest existing thing is Related but different:
|
| rank | condition | result |
|---|---|---|
| 1 | source or file starts with #! |
run under that interpreter, verbatim |
| 2 | script.interpreter is set (or --shell, --interpreter) |
that command line |
| 3 | script.language (see the Python sibling issue) or the file extension |
that language's runtime |
| 4 | otherwise | the configured TypeScript runtime — today's behaviour, unchanged |
Unset defaults mean nothing changes for anyone. A shebang is self-describing,
travels with the script text, and therefore works identically for a local run, a
remote exec and a named script — which is the property that makes it the right
primary rule rather than a flag.
2. The harness is opt-in per interpreter, and its absence is stated. A
non-JS interpreter gets, at minimum: MCPX_ENDPOINT, MCPX_SESSION,
MCPX_SOCKET, MCPX_RUNTIME and the script's args in the environment, so a
bash script can curl the daemon; and stdout/stderr/exit code handled by
the same execsvc machinery, so frames, logs, artifacts-by-reference and
timeouts work unchanged. What it does not get is the generated client, and mcpx
should say so once rather than let the author discover it. This is the same
posture runner.Permissions takes about bun and node having no sandbox, and
preflight.TypeCheck takes about type checking — state the limitation, do not
pretend.
A shell script that can reach $MCPX_ENDPOINT with curl is genuinely useful
and costs almost nothing to enable, because the daemon already binds a
loopback HTTP endpoint for exactly this reason (a unix socket is not portable
across runtimes — docs/dependencies.md).
3. Working directory becomes a named policy, not an accident. The user's
<user_config>||<config>||pwd is asking for a rule. Propose script.cwd with
values caller | script | config | workdir:
caller (default) — today's behaviour and runner.Run's stated intent: "ascript — the directory the script file lives in, which is what a named.config/mcpx/scripts usually wants.config — the nearest mcpx config directory, the user's <config>.workdir — the content-addressed exec workdir, i.e. isolated.This matters more once shebangs exist, because a shell script's relative paths
are far more load-bearing than a TypeScript one's, and ExecOptions.cwd already
crosses the wire so the remote case has somewhere to put the answer.
4. One resolution rule, both sides. Move resolveScript out of
internal/cli into a package internal/execsvc can call, and have the daemon
resolve file the same way — search path, null splice, extension list, and
the same error that names every directory it looked in. Then:
POST /v1/exec {"file": "report"} finds report.ts on the daemon's searchd956689 to 880be56 #53 closed Bump rustls-webpki from 0.100.1 to 0.100.2 in /sources/pavex/examples/realworld #44 the plugin reaches the daemon over its socket--remote, because mcpx run ./report.ts --remote means the file in--remote-file/file: form asks the daemon to resolve--export becomes possible on a remote run when the daemon resolved the filedocs/exec.md lists under "Not done".On ./mcpx -exec: the most useful reading is mcpx as a shebang interpreter —
#!/usr/bin/env -S mcpx run at the top of a .ts file, making a script
directly executable while still getting the client, the launcher and the tool
namespaces. It should be listed as done-when.
Corrected 2026-09-30 (this paragraph said mcpx exec and called it a two-line
change):
mcpx run, not mcpx exec. The kernel appends theexec takes source text, so mcpx exec ./x.ts would run the./x.ts as TypeScript.run it probably works already. A file script is imported unchanged byrunner.go:292-310), and all three runtimes skip a line-1#!/usr/bin/env -S mcpx run, imported by#! does fail under exec. The prelude is prependedrunner.go:282), and a hashbang is only legal on line 1 (a #! on line 2 isscript.runtime silently, or warn when both aremcpx exec '#!/bin/bash\necho hi' must be written to+x bit, or is the interpreter parsed out andnoexec)?script.permissions is meaningless for a shell script. Warn, ignore, orpaths.scripts) with its own scope, or a distinct paths.daemonScripts? Ainternal/diagnose's static tool-call scan simply not run for non-JS--typecheck? Under Approach C'sscript.check, onUnsupported already has the vocabulary for this.Ease M (dispatch and cwd policy) / L (shared script resolution across CLI and
daemon) · Impact high — it turns exec from "run TypeScript" into "run a
script", and it closes a real CLI-vs-/v1 divergence of the kind #76 tracks.
Depends on / related: #76 (CLI ↔ /v1 parity), #48 (harness-free plugin
core; a plugin with no binary is the caller that needs daemon-side
resolution), #44 (closed, fixed in #53 — the plugin no longer needs the
binary), #75 (merged: exec honours its flags locally; the remote path is still
open, above), #5 (paths.config, the config-directory chain script.cwd=config
would follow), #40 (closed, fixed in #57 — ExecOptions), #7 (launcher, which a
non-JS interpreter bypasses), and siblings #100 (runtime selection;
script.checkOnUnsupported), #105 (Python parity; dispatch rank 3) and #107
(flake execution environments; exec.env composes on the interpreter seam).
Security/auth deferred; see tracker.
History carried over from dezren39/darwin-nix#106 (verbatim, oldest first):
@dezren39 · 2026-09-30T07:21:44Z
Integration pass. Placed in the DAG rooted at #181.
d956689 to 9afedba #100 Bump build/buck/preludes/buck2-prelude from 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 checkmarx/ast-github-action from 2.0.19 to 2.0.22 #107@dezren39 · 2026-09-30T12:06:57Z
Issues pass (2026-09-30, at 05c78b2).
./mcpx -exec paragraph. The shebang interpreter has to be mcpx run: the kernel appends a path, and exec takes source text. With run it probably works already. A file script is imported unchanged by the launcher, and deno 2.9.6, bun 1.3.11 and node 24.20.0 all skip a line-1 hashbang in an imported module (verified here; not yet end to end through mcpx). The done-when is a test, not a "two-line change". A #! snippet under exec does fail, because the prelude is prepended (internal/runner/runner.go:282).runScript hands off (internal/cli/commands.go:556-559) before --launcher, --no-launcher, the phases, --typecheck, --env, --no-capture-console and --allow-repeat are read. execsvc.Options has no field for most of them, so they are accepted and dropped (and --export on an inline snippet too; only the file case is refused, exec.go:453-458). Part 4 should carry or refuse them. Reported to the architect for feat(nix): Android SDK + JDK 21 in the system and dev shells, and the OpenChamber release signing key #177/Update Rust crate clap to 4.5.4 - autoclosed #76.filepath.Abs to internal/runner/runner.go:293 (execsvc only passes the field through at :327). Bump rustls-webpki from 0.100.1 to 0.100.2 in /sources/pavex/examples/realworld #44 → "closed, fixed in chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 880be56 #53", 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. Added Parent: #175.@dezren39 · 2026-10-28T21:48:42Z
Triage verdict (task 2136, repo-health-nix-pilot): RELOCATED — confirmed unimplemented feature; its code surface moved to developing-today/code. No fix packet in this repo.
Verified against current main at 224c7b738e88c7a8e5d406987a7d88257e229db2:
enhancement, design — no hard-stop labels. Parent tracker fix(id): make Nix E2E check reproducible #175 is OPEN.mcpx exec/run accept TypeScript only — no shebang scripts (shell, Python one-liners), and file scripts do not resolve identically local vs remote. That behaviour lives in mcpx's runner/CLI script-resolution code.pkgs/mcpx at HEAD (404); this repo's mcpx-nixbuild.yml states the source "lives only in developing-today/code now" (migration commit a03494f3090b there). Checking the new home for prior implementation: in developing-today/code, shebang under pkgs/mcpx appears only in docs/ideas.md — an ideas page, not runner code — so this is not already implemented there either.Route: no small_fix packet in dezren39/nix — there is no exec/runner code here to change. The feature routes with the source in developing-today/code, referencing #106 and parent #175; per the cross-repo rule, do not re-file it there. #106 stays open on the nix side until implemented there or transferred.
🤖 Agent note · picked up
🤖 Agent note · done
pkgs/mcpx main, follow-up routing.Dedupe (no duplicate): searched open and closed issues for "shebang", "exec interpreter", "daemon script search path", and "shebang exec". This issue is the only holder of both halves. Siblings are distinct subjects, not duplicates: #1917 (Python as a first-class language — dispatch rank 3, referenced by this issue), #1921 (flake refs as programs/environments), #1889 (runtimes/languages tracker).
Scope confirmed against current pkgs/mcpx on main (GitHub API, 2026-10-29) — both halves are still live:
internal/runner/runner.go Detect still returns only the three JS runtimes; a search for "shebang" across the package's Go code finds none (only ci/*.sh scripts and docs); no script.interpreter setting exists.file means two different things: resolveScript still lives only in internal/cli/scripts.go (plus its CLI tests); internal/execsvc passes req.File straight into runner.Options.File with no search path, no name resolution, and no searched-directories error — exactly the divergence filed.Split (queue dedupe keys are per-issue, so the two slices got their own issues):
script.interpreter, harness posture for non-JS interpreters, script.cwd policy. Follow-up: queue task 3201 (small_fix, repo-health:v1:fix:developing-today/code:issue:2167).--remote-file, flag carry/refuse parity. Follow-up: queue task 3202 (small_fix, repo-health:v1:fix:developing-today/code:issue:2168).This issue stays open as the parent: it holds the full analysis and the open questions, which the two split issues point back to. Its queue/* labels are removed because its work now lives on #2167/#2168, each carrying queue/queued. No implementation was done in this triage task, per its scope.
🤖 Agent note · picked up
direct — this lane works the triage itself. Fresh check: issue mcpx: exec should run any shebang, and resolve file scripts the same way local or remote #1919 is OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit).🤖 Agent note · done
triaged; issue mcpx: exec should run any shebang, and resolve file scripts the same way local or remote #1919 stays OPEN pending its already-owned remainder.Verified fresh this shift via gh:
queue/claimed + queue/parked + work/assigned: it is held by queue task 3202, whose PR mcpx: one script-resolution rule for CLI and daemon — /v1/exec resolves names (#2168) #2586 ("mcpx: one script-resolution rule for CLI and daemon — /v1/exec resolves names (mcpx: one script-resolution rule for CLI and daemon — /v1/exec resolves names (split of #1919) #2168)", branch queue/3202-2168-script-resolution) is OPEN, not draft, and carries no labels — in particular no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit).Disposition: task 11998 completes as triaged. NO new fix packet is enqueued — converting this remainder again would duplicate task 3202 / PR #2586. Issue #1919 stays OPEN with status/triaged and no queue labels of its own; when PR #2586 merges and issue #2168 closes, issue #1919's acceptance is fully covered and the parent can close.
Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).
Queue task(s) [2814, 7789, 8725] were marked done, and some work did land:
No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11604.
Freshly revalidated 2026-11-17 UTC against GitHub and the current repository checkout:
91b7d984a98b146f7855fda4e55dbb8717a5a799). Current pkgs/mcpx contains internal/scriptresolve, the daemon /v1/exec resolver, CLI --remote-file, and the corresponding docs/exec.md documentation.Disposition: the full scope of #1919 is implemented and covered by the two closed child issues. No follow-on packet is warranted. Closing #1919 and marking it status:done.
🤖 Agent note · done
already_done.status:done. Both halves landed: PR mcpx: shebang-first interpreter dispatch + script.interpreter + script.cwd (#2167) #2611 (shebang-first interpreter dispatch; child issue mcpx: shebang-first interpreter dispatch + script.interpreter + script.cwd (split of #1919) #2167 closed) and PR mcpx: one script-resolution rule for CLI and daemon — /v1/exec resolves names (#2168) #8019 (shared script resolution, internal/scriptresolve + daemon resolver + --remote-file; child issue mcpx: one script-resolution rule for CLI and daemon — /v1/exec resolves names (split of #1919) #2168 closed) — PR mcpx: one script-resolution rule for CLI and daemon — /v1/exec resolves names (#2168) #8019 independently verified MERGED this pass (2026-11-09, merge commit 91b7d98), matching triage task 18171's closing record (note 6935807872). PR mcpx: one script-resolution rule for CLI and daemon — /v1/exec resolves names (#2168) #2586 was closed unmerged as the duplicate. Nothing remains for this packet.