Skip to content

feat(desktop): UTA-supervising Electron app + per-platform installer pipeline#360

Merged
luokerenx4 merged 5 commits into
masterfrom
feat/guardian-ui-port
Jun 18, 2026
Merged

feat(desktop): UTA-supervising Electron app + per-platform installer pipeline#360
luokerenx4 merged 5 commits into
masterfrom
feat/guardian-ui-port

Conversation

@luokerenx4

Copy link
Copy Markdown
Contributor

Summary

  • Desktop shell now runs end to end. The Electron main only spawned Alice, which hard-requires OPENALICE_UTA_URL and throws without it — so the packaged app never booted. Ported the prod.mjs supervision into apps/desktop: spawn UTA → poll /__uta/health → spawn Alice with the URL injected → watch restart-uta.flag → cascade tree-kill (Windows taskkill /T /F). Also fixed OPENALICE_APP_HOME (must be app.getAppPath(), not its parent) so templates/UI/defaults resolve.
  • L1 update check (update-check.ts): polls the GitHub releases list (prereleases included — we ship -beta.N with no formal release soon), surfaces a non-blocking "download" dialog when a newer version exists. No auto-download, no signing.
  • Dropped dead @anthropic-ai/claude-agent-sdk — 0 source imports (the in-process AI loop it served was deleted in 0.40); it bundled a full Claude CLI + ripgrep binaries = 54M of dead weight. @anthropic-ai/sdk / openai / ai stay (all live).
  • electron-builder + CI: include services/uta/dist + templates + dist/*.js (tsup code-splits into hashed chunks), asar:false, mac dmg + win nsis (arch follows the runner). New build-desktop matrix (macos-14 arm64 / macos-13 x64 / windows-latest) gated on needs.release.outputs.created, attaches installers to the release the release job creates (release.yml stays the tag owner). Unsigned (no certs yet).
  • Bumps to 0.51.0-beta.2 to exercise the pipeline for the first time.

Verified locally on mac arm64: packaged .app boots UTA + Alice end to end (8 broker accounts connected, 72 tools, MCP + webui live), OpenAlice-0.51.0-arm64.dmg ≈ 148M. Windows + mac-x64 builds are unvalidated — they only run on this release's CI (can't build them on a Mac).

Test plan

  • npx tsc --noEmit clean
  • pnpm test — 2001 passing
  • packaged mac arm64 .app boots UTA+Alice, trades on demo accounts
  • CI build-desktop produces mac-x64 + windows installers (first run is this release)

Boundary touch

Touches packaging + the desktop supervisor only. UTA is supervised, not modified — no changes to trading / auth / broker-credential / migration logic.

🤖 Generated with Claude Code

Ame and others added 5 commits June 18, 2026 19:52
…date check

The packaged Electron shell only spawned Alice, which hard-requires
OPENALICE_UTA_URL at boot and threw without it — so the desktop app never
ran end to end. Port the prod.mjs supervision into apps/desktop: spawn UTA,
poll /__uta/health, spawn Alice with OPENALICE_UTA_URL injected, watch
restart-uta.flag to respawn UTA, and cascade-shutdown both children.

- Cross-platform tree-kill (taskkill /T /F on win32) so the two children and
  their PTY/CLI grandchildren don't leak on quit / UTA restart.
- Fix OPENALICE_APP_HOME: it must be app.getAppPath() (the dir that contains
  default/, ui/dist, src/workspaces, services/uta/dist), not dirname() — the
  old value pointed one level above the shipped files, breaking templates/UI.
- L1 update check: poll the GitHub releases list (prereleases included, since
  we ship -beta.N with no formal release soon), surface a non-blocking
  download dialog when a newer version exists. No auto-download, no signing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Zero source imports — the in-process AI loop that used it was deleted in the
0.40 World B collapse; the model loop runs in native workspace CLIs now. The
package bundles a full copy of the Claude Code CLI (cli.js ~11M) + per-platform
ripgrep binaries (vendor/ ~40M) = 54M of dead weight in the desktop package.
@anthropic-ai/sdk (the key-probe), openai, and ai (the tool() primitive)
stay — those are live.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
electron-builder config: include services/uta/dist + workspace templates,
dist/*.js (tsup code-splits into hashed chunks — dist/main.js alone misses
them), asar:false, mac dmg + win nsis (arch follows the runner). Unsigned —
no Developer ID / Windows cert yet.

release.yml: new build-desktop matrix (macos-14 arm64 / macos-13 x64 /
windows-latest) gated on needs.release.outputs.created so a full Electron
build (mac runners bill 10x) only fires when a new version is actually cut.
Each runner builds its own platform/arch (pnpm installs only the os/cpu
prebuilt — longbridge, node-pty), then softprops appends the artifact to the
release the release job already created (release.yml stays the tag owner).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
First version to exercise the desktop build/publish pipeline — cutting this
release triggers build-desktop (mac arm64 + mac x64 + windows) to attach
installers to the GitHub Release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openalice-demo Ready Ready Preview, Comment Jun 18, 2026 11:58am

Request Review

@luokerenx4 luokerenx4 merged commit e901c90 into master Jun 18, 2026
5 checks passed
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