Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
# it correctly - which is why the Linux/macOS jobs already pass.
#
# The version/appVersion/cliVersion/buildDate metadata mirrors upstream's
# scripts/package.js, but with Arduino Agent's version: it is the version
# scripts/package.js, but with Open Duino's version: it is the version
# in the window title and About dialog, and buildDate is what makes the
# app load its bundled VS Code plugins (arduino-ide-electron-main.js).
# The name gives the app its own userData folder (and single-instance
Expand All @@ -172,7 +172,7 @@ jobs:
cli_version=$(node -p "require('../arduino-ide-extension/package.json').arduino['arduino-cli'].version")
node ../node_modules/electron-builder/cli.js --dir --publish never \
-c.electronVersion=30.1.2 \
-c.extraMetadata.name=arduino-agent \
-c.extraMetadata.name=open-duino \
-c.extraMetadata.main=./arduino-ide-electron-main.js \
-c.extraMetadata.version="$version" \
-c.extraMetadata.theia.frontend.config.appVersion="$version" \
Expand All @@ -185,9 +185,7 @@ jobs:
run: |
$src = Get-ChildItem -Directory electron-app/dist |
Where-Object { $_.Name -like '*-unpacked' } | Select-Object -First 1
Compress-Archive -Path "$($src.FullName)/*" -DestinationPath "arduino-agent-${{ matrix.platform }}.zip"
# Pre-0.7.0 asset name, kept so existing download links keep working.
Copy-Item "arduino-agent-${{ matrix.platform }}.zip" "arduino-ide-mcp-${{ matrix.platform }}.zip"
Compress-Archive -Path "$($src.FullName)/*" -DestinationPath "open-duino-${{ matrix.platform }}.zip"

- name: Zip artifact (Linux/macOS)
if: runner.os != 'Windows'
Expand All @@ -197,9 +195,7 @@ jobs:
src=$(ls -d electron-app/dist/*-unpacked 2>/dev/null | head -1 || true)
if [ -z "$src" ]; then src=$(ls -d electron-app/dist/mac* 2>/dev/null | head -1); fi
if [ -z "$src" ]; then echo "No build output found under electron-app/dist"; ls -la electron-app/dist; exit 1; fi
( cd "$src" && zip -ry "$GITHUB_WORKSPACE/arduino-agent-${{ matrix.platform }}.zip" . )
# Pre-0.7.0 asset name, kept so existing download links keep working.
cp "arduino-agent-${{ matrix.platform }}.zip" "arduino-ide-mcp-${{ matrix.platform }}.zip"
( cd "$src" && zip -ry "$GITHUB_WORKSPACE/open-duino-${{ matrix.platform }}.zip" . )

- name: Upload to draft release
uses: softprops/action-gh-release@v2
Expand All @@ -209,16 +205,15 @@ jobs:
draft: true # publish manually after verifying the artifacts
fail_on_unmatched_files: true
body: |
Unsigned build of Arduino Agent: the Arduino IDE with an embedded MCP server.
Unsigned build of Open Duino: the Arduino IDE with an embedded MCP server.
Not affiliated with or endorsed by Arduino SA.

Each archive contains the unpacked application for its platform - unzip and run
`Arduino Agent` (`Arduino Agent.exe` on Windows). The MCP server starts on
`http://127.0.0.1:3847`; the connection config (with the auth token) is printed
to the IDE console on launch.
`Open Duino` (`Open Duino.exe` on Windows). The MCP server starts on
`http://127.0.0.1:3847`; use **Help > Connect an AI Agent** to configure OpenCode
or another MCP client.

Artifacts are unsigned; on macOS you may need to allow the app in
System Settings > Privacy & Security.
files: |
arduino-agent-${{ matrix.platform }}.zip
arduino-ide-mcp-${{ matrix.platform }}.zip
open-duino-${{ matrix.platform }}.zip
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ electron-app/dist

# Yarn local install state (machine-specific cache)
.yarn/install-state.gz
# Local Electron and Theia cache used by the development launcher.
.dev-cache/
# Local caches and generated development packages are not source artifacts.
.cache/
electron-app/dist-open-duino/
__pycache__/
*.py[cod]
54 changes: 18 additions & 36 deletions .yarn/patches/node-pty-npm-0.11.0-beta24-bb53864dbd.patch
Original file line number Diff line number Diff line change
@@ -1,38 +1,20 @@
diff --git a/binding.gyp b/binding.gyp
index 66411ec3f7caa6880ad0f6284682fce5b0067416..bba36bf3be2a5d947a205e42658b50a18d368115 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -6,7 +6,8 @@
'VCCLCompilerTool': {
'AdditionalOptions': [
'/Qspectre',
- '/guard:cf'
+ '/guard:cf',
+ '-permissive'
]
},
'VCLinkerTool': {
diff --git a/src/win/conpty.cc b/src/win/conpty.cc
index 25793a5e1c97aa63b59117eeb1aea6bc3a9ca3bf..58000c01c42e91e413ae86d6b762908007e46cb1 100644
--- a/src/win/conpty.cc
+++ b/src/win/conpty.cc
@@ -32,12 +32,17 @@ extern "C" void init(v8::Local<v8::Object>);
ProcThreadAttributeValue(22, FALSE, TRUE, FALSE)
diff --git a/src/win/winpty.cc b/src/win/winpty.cc
index b054dee2194226a823f5c98befdecf06cda2e5dd..d92e4f4001e4708955e29a1db03c5ed6f92c340f 100644
--- a/src/win/winpty.cc
+++ b/src/win/winpty.cc
@@ -165,6 +165,7 @@ static NAN_METHOD(PtyStartProcess) {
goto cleanup;
}

+ {
int cols = info[4]->Int32Value(Nan::GetCurrentContext()).FromJust();
int rows = info[5]->Int32Value(Nan::GetCurrentContext()).FromJust();
bool debug = Nan::To<bool>(info[6]).FromJust();
@@ -234,6 +235,7 @@ static NAN_METHOD(PtyStartProcess) {
info.GetReturnValue().Set(marshal);

typedef VOID* HPCON;
+
+#endif
+
+// These typedefs must exist regardless of the SDK version. Newer Windows SDKs
+// (>= 10.0.26100) define PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, which previously
+// skipped these declarations and broke the build with "PFNCREATEPSEUDOCONSOLE
+// undeclared identifier". Fixed upstream in later node-pty releases.
typedef HRESULT (__stdcall *PFNCREATEPSEUDOCONSOLE)(COORD c, HANDLE hIn, HANDLE hOut, DWORD dwFlags, HPCON* phpcon);
typedef HRESULT (__stdcall *PFNRESIZEPSEUDOCONSOLE)(HPCON hpc, COORD newSize);
typedef void (__stdcall *PFNCLOSEPSEUDOCONSOLE)(HPCON hpc);
goto cleanup;
+ }

-#endif
-
struct pty_baton {
int id;
HANDLE hIn;
cleanup:
delete filename;
19 changes: 19 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Open Duino repository guide

Read `CLAUDE.md` for the detailed workspace map, build commands, vendored-code
rules, MCP architecture, and hardware notes. Those engineering instructions
also apply when working with OpenCode.

## Fork conventions

- The application is branded **Open Duino**. Keep upstream Arduino IDE notices
and trademark language intact; do not imply Arduino SA endorses this fork.
- `arduino-ide-extension/` is vendored Arduino IDE code. Put fork-specific
features in `arduino-mcp-extension/` unless an upstream change is necessary.
- MCP file changes already notify the frontend and refresh the open editor.
Preserve that path when adding OpenCode workflows.
- OpenCode connects through the bundled stdio bridge. Generate its setup in
`MCPServiceImpl.getConnectionGuide()` so paths and executable details match
each installed build.
- Keep dark and light themes available. Theme IDs remain compatible with saved
user settings even when their display names or palettes change.
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Arduino Agent — repo guide for AI agents
# Open Duino — repo guide for AI agents

Fork of Arduino IDE 2.x (Theia/Electron) with an embedded MCP server.
`arduino-ide-extension/` is **vendored upstream code** (synced from
Expand Down Expand Up @@ -42,7 +42,7 @@ release folder) without full packaging:
file — piping through tail/grep has repeatedly swallowed the real error).
If it dies with ENOTEMPTY on `lib/backend/native-webpack-plugin`, delete
that directory and rerun (transient Windows file-lock race).
3. Kill "Arduino Agent" processes ("Arduino IDE" before 0.7.0), copy
3. Kill "Open Duino" processes (or "Arduino Agent" for a legacy build), copy
`electron-app/lib/backend/main.js` over
`<install>\resources\app\lib\backend\main.js`, relaunch.
4. Confirm the copy landed by grepping the installed main.js for a distinctive
Expand Down
Loading