Skip to content

feat(release): ship the stdio bridge inside the packaged app - #38

Merged
mixelpixx merged 1 commit into
mainfrom
bridge-in-release
Oct 1, 2026
Merged

mixelpixx merged 1 commit into
mainfrom
bridge-in-release

Conversation

@mixelpixx

Copy link
Copy Markdown
Owner

Summary

The stdio bridge from #36 was only usable from a source checkout. Release zips didn't contain it, even though the skill and the bridge's header comment said it could run from an install. This PR ships it inside the packaged app.

  • Packaging: electron-app/package.json gets two extraResources entries. They copy bridge/arduino-agent-bridge.js and the four compiled modules it loads (mcp-instructions, mcp-prompts, mcp-tool-router, mcp-tools) into resources/mcp-bridge/. The bridge/ + lib/common/ layout is preserved, so the bridge's existing ../lib/common require resolves without code changes. release.yml already compiles arduino-mcp-extension/lib before packaging.
  • Installed paths:
    • Windows/Linux: <unzipped folder>/resources/mcp-bridge/bridge/arduino-agent-bridge.js
    • macOS: Arduino IDE.app/Contents/Resources/mcp-bridge/bridge/arduino-agent-bridge.js
  • Drift guard: a new test in test/bridge derives every module the bridge loads, plus their relative requires, from the source. It fails if extraResources doesn't copy one of them, or if the layout breaks the relative require.
  • Docs: the README, the bridge README and the skill now give the installed path for each OS, and note that v0.6.1 and earlier zips don't include the bridge.

Test plan

  • Local package build on Windows, using the same electron-builder command as release.yml. resources/mcp-bridge/ contains exactly the 5 files, each byte-identical to its source. app/plugins is still packaged.
  • Packaged bridge, offline (IDE unreachable): the instructions, tools/list, search_tools and get_category_tools all match the repo checkout's bridge exactly.
  • Control: the bridge copied without lib/common returns an empty tool list and "not running" for discovery. This proves the packaged copy really loads its bundled modules.
  • Packaged bridge, online against a running v0.6.1 IDE: execute_tool arduino_context returns mcp_version: 0.6.1.
  • yarn test:bridge: 12/12 pass, including the new packaging guard.
  • CI: Check MCP Extension.
  • macOS/Linux layout gets confirmed by the next tag's release build (the same extraResources mechanism already ships plugins/ on all three platforms).

🤖 Generated with Claude Code

The bridge was only usable from a source checkout: release zips did not
contain it, although the skill and the bridge header said it could run
from an install.

electron-builder now copies the bridge and the four compiled modules it
loads (mcp-instructions, mcp-prompts, mcp-tool-router, mcp-tools) into
resources/mcp-bridge/, keeping the bridge/ + lib/common/ layout so its
existing ../lib/common require resolves unchanged. No bridge code changes.

A new bridge test guards against drift: it derives every module the
bridge loads (and their relative requires) and fails if extraResources
does not copy one. README, bridge README and skill now give the installed
path per OS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mixelpixx
mixelpixx merged commit 146bd94 into main Oct 1, 2026
1 check passed
@mixelpixx
mixelpixx deleted the bridge-in-release branch October 1, 2026 12:24
@mixelpixx mixelpixx mentioned this pull request Oct 1, 2026
2 of 3 tasks
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