Commit ae3255a
Mac Vm Updates (#324)
* feat(macos-vm): dedicated /vm tab with lifecycle, onboarding, runtime install, and credentials
Move the macOS VM workflow out of the inline lane panel into a dedicated /vm
tab. Add lifecycle/menu UI (MacVmPage, VmLifecycleMenu, FirstBootCard,
CredentialsPromptDialog, PhaseStepper), a credentials store, ADE runtime
bootstrap for guest VMs, and recovery for stale guest-created worktree dirs.
Wire 20+ macos-vm adeActions and CLI subcommands; update docs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ship: iter 1 — address Greptile, CodeRabbit, Copilot review
- runtimeBootstrap stub: mark install state failed instead of advancing to runtime_ready
- runtimeBootstrap: resolveSshpassBinary() walks Homebrew/MacPorts/PATH
- runtimeBootstrap: try/finally cleans staged install scripts
- credentialsStore: SIGTERM → SIGKILL 500ms; settle promise on timeout
- macosVmService: .part.url sidecar so partial download recovery is URL-keyed
- macosVmService: /usr/bin/rsync absolute path
- registerIpc: hasUserSelectedProject guard on project-root fallback
- registerIpc: requireMacosVmEnabledInProduction gates VM IPC in packaged builds
- registerIpc: typed MacosVmExtensionService interface (removed unknown casts)
- adeActions/registry: drop detachLane (it lives on laneService, not macosVmService)
- preload: route new VM IPC through callRemoteProjectRuntimeActionOr
- App: /vm joins serializeProjectRoute allowedRoots
- LanesPage: auth-confirm gate on status fetch + createVmRuntimeAvailable
- LanesPage: fresh submit recheck mirrors full availability predicate
- LanesPage: open-in-Work CTA navigates to /project
- ade-cli: readVmTarget consumes positional lane arg
- FirstBootCard: empty-steps guard
- MacVmPage: shellSingleQuote() for safe sudo rm -rf cleanup string
- PhaseStepper: import CSSProperties directly
- macosVmRuntimeReadiness: validate vm.currentPhase bounds
- shared/types/macosVm: confirm: true literal on wipe args
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ship: iter 2 — runtimeBootstrap defaultRunner SIGTERM → SIGKILL
Address Greptile P1: defaultRunner's per-phase timeout sent SIGTERM but
waited unconditionally for the exit event. If SSH/scp blocked in a kernel
wait, SIGTERM was ignored and the promise never settled. Mirror the
credentialsStore pattern: settle promise on timeout, schedule a SIGKILL
500ms after SIGTERM.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ship: iter 3 — fix SIGKILL regression, drop VNC password from argv, tighten action allowlist
- credentialsStore + runtimeBootstrap: prior fix cleared killTimer in finish()
unconditionally, defeating the 500 ms SIGKILL fallback. Pass clearKill=false
from the timeout path so the SIGKILL still fires if SIGTERM is ignored.
(CodeRabbit major, credentialsStore.ts:118 + runtimeBootstrap.ts:130)
- macosVmService.openExternalVncClient: vnc:// URL no longer embeds the
credential — it appeared in argv to /usr/bin/open (ps aux visible) for the
brief lifetime of the child. macOS Screen Sharing prompts when no Keychain
entry exists; matches the SIGSAFE pattern used for the SSH path with sshpass -e.
(Greptile P1 security, macosVmService.ts:1487)
- adeActions/registry macos_vm allowlist: removed setCredentials and
getDisplaySession from the generic agent-callable surface. setCredentials
mutates Keychain-backed VM credentials; getDisplaySession returns the live
VNC password. Typed CLI / IPC paths (ade macos-vm set-credentials, ade
macos-vm display-session) still work and run under CTO-level auth.
(CodeRabbit major, registry.ts:786)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ship: iter 4 — extend RUNTIME_ACTION_CHANNEL to agent-callable VM ops
Greptile P1: registry.ts allowlists macos_vm.restart/wipe/installRuntime
(plus focusWindow/click/selectPoint/typeText) for agent invocation, but the
RUNTIME_ACTION_CHANNEL map only covered provision/start/stop/delete/
captureScreenshot. Agent calls through localRuntimeCallAction /
remoteRuntimeCallAction were falling back to the 30s default — restart
sequences stop+start (up to 122 min), wipe drives deleteVm (~2 min), and
installRuntime SSHes into the guest. All three were racing-lose to 30s.
Map each agent-callable action to its IPC channel so the existing per-channel
budgets apply. Add the matching cases to the switch (restart/installRuntime
share start's 120-min budget; wipe shares delete's 2-min; UI actions share
captureScreenshot's 60s). Extend tests to cover restart / wipe /
installRuntime via the runtime channel and a UI action via the remote runtime.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ship: iter 5 — match wipe/delete IPC budget to lume; long-lived VM cache TTL
Greptile P1 (ipcTimeouts.ts:54): macosVmWipe was capped at 2 min IPC budget,
but wipe() and deleteVm() both call runLume("delete", 10 * 60_000) internally.
The IPC's Promise.race in main.ts was firing first — renderer saw "timed out"
while the underlying lume process kept running, leaving the store record
unchanged. Lift both wipe and delete IPC budgets to 10 min so the renderer
sees the real outcome. Update test to match.
Greptile P1 (laneLaunchContext.ts:207): VM_LAUNCH_CONTEXT_TTL_MS was 5_000 ms,
but the only refresh path is the placement-changed handler that fires once
when a lane attaches to a VM. agentChatService and ptyService call the sync
resolveLaneLaunchContext on every turn — after 5 s the cache returns null and
throws VmNotReadyError even when the VM is fine. The cached SSH target
(IP + username + vmName) is stable for the running VM lifetime; lifecycle
events explicitly invalidate the cache. Bump TTL to 30 min so the cache stays
warm across normal agent sessions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 999ac55 commit ae3255a
77 files changed
Lines changed: 11915 additions & 1391 deletions
File tree
- .agents/skills
- plan
- source-command-audit
- apps
- ade-cli
- src
- tuiClient
- __tests__
- components
- desktop
- resources/agent-skills/ade-macos-vm
- src
- main
- services
- adeActions
- chat
- ipc
- lanes
- macosVm
- remoteRuntime
- state
- preload
- renderer
- components
- app
- chat
- lanes
- terminals
- ui
- vm
- lib
- state
- types
- ios/ADE/Resources
- docs
- features
- ade-code
- computer-use
- lanes
- terminals-and-sessions
- perf
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
| |||
0 commit comments