mesh: download fresh binary on every start, kill mesh when goose exits#8228
Conversation
Two critical changes to mesh-llm lifecycle: 1. Always download the latest mesh-llm binary before starting. The start-mesh handler now fetches from GitHub releases on every start (macOS only), falling back to the existing binary if download fails. The separate download-mesh IPC handler is removed since start-mesh subsumes it. 2. Mesh process is now tied to Goose's lifetime. Removed detached spawn and child.unref() so the mesh child is a regular child process of Electron. Added explicit SIGTERM cleanup in will-quit as belt and suspenders. If mesh is already running on the port, start-mesh skips both download and spawn. UI simplifications: - On macOS, not-installed state is treated as stopped since start handles the download automatically. Start button shows downloading status first, then starting. - On non-macOS, not-installed shows install guide only. - Removed dead downloadMesh function and Download icon import. Signed-off-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08ead33cb0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…goose-running notes Signed-off-by: Michael Neale <michael.neale@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d65b4c6f3e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…d of execSync Signed-off-by: Michael Neale <michael.neale@gmail.com>
alexhancock
left a comment
There was a problem hiding this comment.
Code LGTM
Big picture does this only work from the desktop app right now?
|
@alexhancock yes - by design, as needs to be persistent, daemon like (youy can run it other ways too natively). |
Summary
Two critical changes to mesh-llm lifecycle management:
1. Always download the latest binary before starting
start-meshnow fetches the latest mesh-llm release from GitHub on every start (macOS Apple Silicon only). If the download fails, it falls back to whatever binary is already installed. This ensures users always run the latest mesh-llm version.The separate
download-meshIPC handler has been removed sincestart-meshsubsumes it entirely.2. Mesh process dies with Goose
Previously, mesh-llm was spawned with
detached: trueandchild.unref(), meaning it outlived the Goose process. Now:will-quithandler as belt-and-suspendersstart-meshskips both download and spawnUI simplifications
not-installedis treated asstoppedsince start handles the download — no separate download button needednot-installedshows install guide only (download/start is macOS-only)downloadMeshfunction,download-meshpreload bridge,Downloadicon importFiles changed
ui/desktop/src/main.ts— mesh lifecycle handlersui/desktop/src/preload.ts— removed download-mesh bridgeui/desktop/src/components/settings/mesh/MeshSettings.tsx— simplified UI flow