LearnNewsExamplesServices
Frontmatter
id13033
titleElectron build root: boot the Agent OS + harness windows in one shell
stateClosed
labels
enhancementaiarchitecture
assigneesneo-opus-ada, neo-opus-vega
createdAtJun 13, 2026, 12:54 AM
updatedAt3:14 AM
githubUrlhttps://github.com/neomjs/neo/issues/13033
authorneo-fable
commentsCount3
parentIssue13377
subIssues
14962 Electron shell skeleton + multi-window join — the #13033 slices 1–2 PR vehicle
14967 Harness slice 3 — the Arm A/B Agent-OS hosting spike: the Brain boots inside the Electron main
subIssuesCompleted2
subIssuesTotal2
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAt3:14 AM
milestoneHarness M1: Login

Electron build root: boot the Agent OS + harness windows in one shell

Closed Backlog/active-chunk-2 enhancementaiarchitecture
neo-fable
neo-fable commented on Jun 13, 2026, 12:54 AM

Context

The head of the PoC critical path for Epic #13012 (per the recorded gut-estimate: the ONE item with genuine discovery risk; everything else parallelizes in dev-server mode). Shell decision already made at the parent (operator, 2026-06-12): Electron — always Chromium + always Node.js; Tauri retired. This leaf creates the build root.

The Problem

The harness needs a packaged shell that boots the whole organism: the Electron main process hosting (or supervising) the Agent OS — orchestrator + MCP servers — while windows serve the harness Neo app on one SharedWorker heap. No such packaging root exists; the repo ships dev-server + daemon topologies only.

The Architectural Reality

  • Topology decision carried from planning (the risk item): target = Agent OS in-process in the Electron main (Brain + Body, one install). Untested: MCP server lifecycle, port management, and restart semantics inside Electron main (restart affordances incl. settle-or-reject promise semantics are a #13015 lifecycle requirement). Sanctioned fallback (caps the risk): the main process supervises the Agent OS as a child process (today's daemon topology) — the PoC criterion survives either way; in-process becomes an MVP refinement if the spike fights back.
  • Source-tree discipline (parent decision): the build root wraps built Body + Brain WITHOUT mixing source trees — own package.json, main-process entry, window management; placement via structural-pre-flight at implementation (a packaging root is the sanctioned exception shape discussed at the parent: source stays in apps/ + ai/).
  • Multi-window: Chromium popups on one SharedWorker heap (the shipping shared-apps pattern); the shell adds BrowserWindow management + the Electron enhancement points consumed later by #13025/#13028/#13030 (exact spawn-at-position, move events, OS chrome control).
  • Web mode stays the development convenience + goodie — the shell never becomes a dev-loop dependency.

Contract Ledger (new surfaces — this leaf INTRODUCES them)

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Electron build root (package.json, main entry) this leaf (new) boots Agent OS (in-process target / child-process fallback) + first harness window dev-server mode untouched README in the packaging root parent topology decision
Main-process ↔ Agent OS lifecycle this leaf (new) start/stop/restart hooks consumable by the #13015 lifecycle service; restarts settle-or-reject pending promises child-process supervision = the fallback arm JSDoc + root README #13015 guardrail
Window-management bridge this leaf (new) BrowserWindow creation/positioning for popups on the shared heap window.open path keeps working (web mode) JSDoc shipping shared-apps pattern

Rows altitude-honest; shapes reconcile in the implementing PR.

Acceptance Criteria

  • A packaged Electron app boots: main process brings up the Agent OS (in-process OR documented child-process fallback — the spike outcome is recorded either way), one window serves the harness app.
  • Chromium popup windows join the same SharedWorker heap (multi-window proof inside the shell).
  • The topology spike outcome (in-process vs fallback, with the friction found) is documented in the PR + reconciled into this Ledger.
  • Dev-server/browser mode remains fully functional (no shell dependency leaks into the dev loop).

Out of Scope

  • Settings pane content (#13015 leaves), themes (#13022), store/auto-update distribution (follow-up leaf once the root exists).
  • The agentos-PoC replacement app itself (own leaf; this root LOADS whatever app exists).

Related

  • Parent: Epic #13012. Milestone: M1 (the shell is the login vehicle). Board: Project 13.
  • Consumers: #13015 (lifecycle), #13025/#13028/#13030 (Electron enhancement points), #13022 (themes render inside it).
  • Closed Electron priors swept: #12958 (worker reply-loss, Electron-deterministic — its fix ships in v13), #12419 (macOS-Electron parent-chain-walk) — both inform, neither overlaps.

Origin Session ID: c4caff26-d818-486b-8663-19b85ac3cc11 Retrieval Hint: "electron build root main process agent os in-process child-process fallback packaging shell harness"

tobiu referenced in commit dfbf8d9 - "chore(repo): remove top-level spikes/ directory — repo-root bloat (#15043) (#15044) on Jul 11, 2026, 11:46 PM