Skip to content

Spawn bundled CLI via Node, not the missing .bin shim#20

Merged
azizbecha merged 1 commit into
mainfrom
fix/cli-bundled-spawn
May 8, 2026
Merged

Spawn bundled CLI via Node, not the missing .bin shim#20
azizbecha merged 1 commit into
mainfrom
fix/cli-bundled-spawn

Conversation

@azizbecha

Copy link
Copy Markdown
Owner

Summary

  • The packaged .vsix never contained npm's node_modules/.bin/agent-device shim, so installed extensions hit ENOENT on the first run step.
  • Resolves the bundled CLI as process.execPath plus the actual .mjs entrypoint (node_modules/agent-device/bin/agent-device.mjs), with ELECTRON_RUN_AS_NODE=1 so the host's Electron binary runs the script as Node.
  • Works in VS Code, Cursor, VSCodium, and other Electron forks. User-supplied agentDevice.cliPath overrides still spawn directly.
  • Bumps to 0.1.2.

Test plan

  • Install the packaged .vsix in VS Code and verify run steps execute without ENOENT
  • Verify agentDevice.cliPath override still works when set
  • Test in Cursor or another Electron-based fork

The packaged .vsix never contained npm's `node_modules/.bin/agent-device`
shim, so installed extensions hit `ENOENT` on the first run step.

Resolve the bundled CLI as `process.execPath` plus the actual `.mjs`
entrypoint (`node_modules/agent-device/bin/agent-device.mjs`), with
`ELECTRON_RUN_AS_NODE=1` set so the host's Electron binary runs the
script as Node. Same pattern works in VS Code and every Electron fork
(Cursor, VSCodium, etc.). User-supplied `agentDevice.cliPath` overrides
still spawn directly.

Bumps to 0.1.2.
@azizbecha azizbecha merged commit 411db67 into main May 8, 2026
2 checks passed
@azizbecha azizbecha deleted the fix/cli-bundled-spawn branch May 8, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant