fix(workspaces): Windows .cmd twins for alice CLI shims (closes #364)#369
Merged
Conversation
#364 P2) The workspace CLI shims (alice / alice-workspace / alice-uta / traderhub) are extensionless Node scripts — they rely on a Unix shebang. Windows has no shebang concept: it resolves executables on PATH by extension (PATHEXT), and an extensionless file has no association, so every invocation popped a "How do you want to open this file?" dialog inside the workspace PTY. Add a `.cmd` twin per export. cliBinPath() prepends the whole bin dir to PATH and build.files already ships `src/workspaces/cli/**`, so the twins are picked up by PATHEXT with no deploy change. Each `.cmd` invokes its OWN sibling shim (`@node "%~dp0<name>"`), because the shim self-detects its export from argv[1] — pointing at the wrong shim would route to the wrong gateway export. Shims stay byte-identical (the existing drift test still guards that); the .cmd content lives outside them. macOS/Linux ignore .cmd entirely. issue #364's other half (bootstrap.sh exit 127 on Windows) was already resolved by #363, which eliminated bash for built-in templates (bootstrap.mjs on bundled Node + dugite git) rather than fixing the Git-Bash path handling. Reported-by: @lvysssss Closes #364 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks
pull Bot
pushed a commit
to dubbypanda/OpenAlice
that referenced
this pull request
Jun 22, 2026
… fixes Filed issue TraderAlice#364 with a detailed, verified repro of both Windows blockers — the bootstrap path/bash failures and the extensionless CLI-shim file-association dialog. Both are now resolved (TraderAlice#363 + TraderAlice#369). Credited per the CONTRIBUTORS policy (recognition, not a co-authorship claim). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pull Bot
pushed a commit
to dubbypanda/OpenAlice
that referenced
this pull request
Jun 22, 2026
Since beta.4: - fix(workspaces): Windows .cmd twins for the alice CLI shims — no more file-association dialog on every shim call (TraderAlice#369, closes TraderAlice#364) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The workspace CLI shims (
alice/alice-workspace/alice-uta/traderhub) are extensionless Node scripts that rely on a Unix shebang. Windows resolves executables on PATH by extension (PATHEXT) and has no shebang concept, so an extensionless shim has no association → every invocation popped a "How do you want to open this file?" dialog inside the workspace PTY (community issue #364, Problem 2)..cmdtwin per export.cliBinPath()prepends the whole bin dir to PATH andbuild.filesalready shipssrc/workspaces/cli/**, so PATHEXT finds the twins with no deploy change..cmdruns its own sibling shim (@node "%~dp0<name>" %*) — the shim self-detects its export fromargv[1], so a.cmdpointing at the wrong shim would route to the wrong gateway export..cmdcontent lives outside them. macOS/Linux ignore.cmd.Issue #364, Problem 1 (
bootstrap.shexit 127 on Windows) was already resolved by #363 — it eliminated bash for built-in templates (bootstrap.mjson bundled Node +dugitegit) instead of patching Git-Bash path handling — so this PR closes the remaining half.Test plan
npx tsc --noEmitcleanpnpm test— 2027 passing (newshim.spec.tscase: every export ships a.cmdtwin that runs its own shim + forwards args)alice/traderhubrun with no file-association dialogCredit
Reported by @lvysssss in #364 (detailed, verified repro). Per CONTRIBUTORS policy this is credited via a
Reported-by:trailer, not a co-authorship trailer.🤖 Generated with Claude Code