Plans said 15 minutes, the desktop slept at 20. The shared wire module now owns the value; the
control plane serves it at GET /v1/config (public product constants), the desktop driver's idleStopMs,
billing's Team plan idleSleepMinutes and the billing fixtures read the constant, and the idle-sleep
toast already prints the scheduler's value from the event.
Exhaustive switches instead of default arms; merged duplicate type imports; Badge 'tag' and Button
'statusAction' variants replace className restyles; SmartWorkspaceSourceTabs list back to upstream's
classes (TabsList owns spacing); dropped five locale keys no source references; installCloudSsh moves
into registerEphemeralVmRuntimeHandlers so ephemeral-vm.ts stays under 300 lines.
## W4: team collaboration on Orca Cloud workspaces
### Control plane (`cloud/apps/sandbox-control`)
- **Registry** (`0024_workspace_registry.sql`, applied on dev D1): owner (reassignable), `created_by`, branch, `visibility` (private default / team), section, last activity, token spend. Reuses 0020's `name`/`archived_at`.
- **Routes under `/v1/team/*`** (W5 owns `/v1/workspaces`): list with Mine/Team/All, By, In, Archived filters; PATCH (rename, share or make private, section, archive, reassign owner); presence heartbeats; wake and lease for teammates; links resolve; org prompts/PR instructions (compare-and-set).
- **Security fix:** `/v1/sandboxes/:id` used to be account-scoped, so any org member could resume a teammate's sandbox and receive its orcad pairing code. It is now owner-only; admins can still suspend and destroy.
- **Per-member, per-device E2EE grants:**
- The VM mints a single-device orcad offer and seals it to the requesting device's X25519 key.
- The control plane stores only the orcad device id.
- Revocation runs `orca pair --revoke`, which closes the device's live sockets, plus an on-disk registry removal.
- When the VM is asleep, the revoke is queued and applied at boot before orcad starts.
- Triggers: explicit revoke, making a workspace private, archive, reassign, member removal (internal route), and phone device-session revoke (W8).
- VMs from older images get the entry points installed on demand.
- **Git as the sender:** a member's own GitHub user-to-server token (App OAuth, envelope-encrypted) is swapped in at egress only for the workspace repo. The VM gets per-member git configs and `orca-git-as`.
- **Cost:** metered compute × billing rate, plus optional token spend.
### orcad (generic)
- New owner-only RPC `pairing.revokeDevice` and `orca pair --revoke <device-id>`: revokes a device and closes its open connections immediately.
### Desktop
- A "Cloud workspaces" section on Home: Team/Mine, By, In and Archived filters; sections; live presence; cost; last activity. Single-click Open on a teammate workspace pairs this device through an E2EE grant. Also a row menu (share/private, move to section, reassign, archive) and copy link.
- Deep links `orca://cloud/w/<id>[/c/<chat>]` (open-url, argv, second instance, sidecar handoff) and the `cloudWorkspace.copyLink` keybinding.
- Messages to agents in shared workspaces carry a sender envelope.
- Uses the W10 shared primitives.
- Two rounds of adversarial design and frontend review.
### Evidence
Real Vercel VMs; see the W4 report. Numbers:
- grant issued in 0.55 s, paired in 1.35 s
- revoke closes the live desktop socket ~30 ms after the PATCH returns
- two members' pushes land on GitHub with their own author identities (shared dev Worker, preview alias w4); a push to another repo gets 403
* feat(cloud): SSH into Orca Cloud workspaces (orca ssh, ssh-proxy, VS Code/Cursor Remote-SSH)
- VM: unprivileged key-only sshd on 127.0.0.1:2222 (orca-sshd), host key and Orca-managed
authorized_keys on the persistent disk; orca-ssh-keys entry point; provision extracts only the
server binaries (dnf or apt, +1.5-2 MB) and unlocks the sandbox user for key logins.
- Control plane: POST/DELETE /v1/sandboxes/:id/ssh-keys runs the fixed entry point and answers
the pinned host key; editor Remote-SSH server hosts on the egress allowlist.
- Desktop: per-workspace ed25519 keys in userData (0600), Orca-owned ssh_config + pinned
known_hosts, ~/.ssh/config Include only after consent; wake -> key -> runtime port forward
(openRuntimePortForward reason 'ssh'); revoke (deferred while asleep); SSH traffic keeps the
workspace awake.
- CLI: orca ssh-proxy <workspace> (ProxyCommand) and orca ssh <workspace>.
- UI: Open in -> VS Code / Cursor over Remote SSH, SSH submenu (Copy SSH Command, Revoke),
include consent dialog, progress/error toasts.
* fix(cloud-ssh): review fixes — no agent forwarding, reinstall per VM boot, wake to revoke
- ForwardAgent/ForwardX11 no in Orca's host blocks; AllowAgentForwarding no in the VM's sshd.
- Reinstall the key (idempotent; restarts sshd, re-pins the host key) once per VM boot, so a
wiped disk, rollover or dead sshd heals on the next connection.
- Revoke wakes the VM to remove its copy; only an unreachable VM falls back to the queue.
- orca-ssh-keys rejects multi-line keys; sshd log truncated per start; audit log entries for
ssh key add/remove; state parsed per entry; % escaped in ssh_config paths; ProxyCommand pinned
to this app's profile; ssh-proxy flushes stdout before exit; --print shell-quotes; editors
open via --folder-uri with a checked path; "Remove from ~/.ssh/config" + one-time backup.
* feat(build-sheet): plain-language Orca Cloud build sheet with timed steps
- Keep the VM build sheet through fetch/checkout (no collapse to "Fetching…"); the
workspace step runs during fetching/creating and folds in checkout progress.
- Classify failures from the error code (plan, hours used, payment, concurrency,
sign-in, unavailable, network, snapshot missing, create) into single-action
cards; no plan toast while the sheet is on screen.
- One vocabulary for Orca Cloud: "Starting your cloud workspace", "Start sandbox ·
Prepare environment · Open workspace"; "Couldn't create workspace" everywhere.
Cloud hides Edit recipe / Fix with agent and collapses the log behind View logs;
`[orca-cloud]` phase lines read as words.
- Step durations, "usually ~Ns" hints, 400 ms minimum running state, sr-only step
state; clock stops while checks fail; "Delete VM/sandbox" when leaving destroys it;
at most two primary actions with a More menu.
- Log: sized to content, timestamps, error highlighting, jump to first error, copy.
- Environment doctor checks carry code + params, localized with Failed/Warning badges.
- Stream the hosted provider's failure reason into the build log; collapse the empty
right sidebar while a VM build is on screen.
* fix(build-sheet): quality-gate fixes (derived hold timing, stable log keys, destructive-chip)
Skeleton gets a shape='circle' variant instead of a className restyle; InlineError's retry drops the
opacity restyle (Button owns it); SAFETY-annotate two redactValue casts.
The callback forward piped the host stream straight into the browser socket,
which never returned flow-control credit, so a reply past one window stalled;
a closing stream also destroyed the socket before its last bytes flushed. Use
the credit-aware forwarding the browser tunnel uses and end the socket cleanly.
* wip(w3): port forward tunnel
* wip(w3): port forward manager + IPC
* feat(w3): forward remote host ports to this computer over the paired runtime connection
* feat(w3): auto-forward remote dev servers, Ports panel forwarding, Settings → Ports
* fix(w3): keep Orca's own listeners out of workspace ports; drop the unreachable remote address line
* fix(w3): design + FE review round 1 for port forwarding UI
* fix(w3): retire auto forwards that stop being candidates; plan tests
* fix(w3): design review round 2 (empty state follows the setting, remap note wraps, stop is a row action); FE P2s
* feat(w3): wake a sleeping VM before opening its port forward
* chore(w3): localization catalog for port forwarding strings
* fix(w3): code-quality gates (typed listen address, no sleeps/casts in tests, compiler-safe refs, hook translate, catalog)
* feat(vm-recipes): show VM lifecycle states in the sidebar, with Suspend/Resume VM
* fix(vm-recipes): Suspend VM suspends an idle parent with active children; dedupe repeat suspends
- With active children, Suspend VM sleeps this workspace too, so its VM
suspends once their sessions stop.
- A repeat Suspend VM while one is pending is dropped in the coordinator
instead of trusting a possibly stale suspended record.
- After a direct suspend, re-probe the host so its header reads Suspended.
* perf(github): use the desktop's PR fallback rule on the phone and forward refreshes
* fix(github): keep a merged fallback PR while the phone has no head