Commit Graph
9160 Commits
Author SHA1 Message Date
Neil 5a8ca4fc88 test(cloud): links are dropped, not fatal 2026-11-09 07:20:07 -08:00
Neil 30c5b84e64 fix(cloud): FE review round 2 — PATCH matches server (no nulls, 5–120 min), webhook URL from edits, team-aware token cache, approval busy guard, polls keep loaded pages, inert aria-disabled refresh, CSS.escape, lenient link parsing, Intl list formatting 2026-11-09 07:20:07 -08:00
Neil 9db4199107 fix(cloud): W10 round 5 — sticky footer flush, Open workspace via local sandbox lookup, focus after disconnect/create, aria-disabled pending buttons, rotate blocked while dirty, friendly time zones, quieter failure reasons 2026-11-09 07:20:06 -08:00
Neil 6c7796ae5f fix(cloud): review round 1 — one-time secrets can't be lost, design tokens, minimal routine PATCH, stale-response guards, a11y 2026-11-09 07:19:58 -08:00
Neil 2cee7bc17e feat(cloud): connected MCP apps on the API keys page; split routine row 2026-11-09 07:19:58 -08:00
Neil 2e76ad5592 feat(cloud): Orca Cloud API keys + routines settings (private builds)
Main-process /v1 client (zod-validated, token never leaves main, errors mapped
to stable codes), IPC + preload bridge, Settings → API Keys (create with scope
presets, one-time secret, revoke, MCP approve-an-app code, docs/MCP links,
vmCliEnabled org toggle, admin activity log) and Settings → Routines (list,
editor for schedule/GitHub/webhook triggers, run now, history, delete), gated
on a configured Orca Cloud control plane. Component fixtures + unit tests.
2026-11-09 07:19:57 -08:00
Neil e141a74ead feat(cloud): one idle-sleep constant (ORCA_CLOUD_IDLE_SLEEP_MINUTES = 15) for control plane, desktop scheduler, billing plans and toasts; GET /v1/config serves it (#80)
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.
2026-11-09 07:15:51 -08:00
Neil 1634c61b8b Merge remote-tracking branch 'private/cloud/integration' into cloud/w2-wakefix
# Conflicts:
#	src/main/hosted-sandbox/hosted-session-registry.ts
2026-11-09 07:10:51 -08:00
Neil b0041f6de5 fix(cloud): held in-flight wake keeps the caller fence (re-pairing wake), interrupted-turn continue spent only on launch, offer snapshot timer cleared 2026-11-09 07:09:53 -08:00
Neil 32d9782649 feat(orca-cloud): session lifecycle feedback (restart now, idle sleep, cancel cleanup, sidebar state, queued first prompt) (#66) 2026-11-09 07:05:25 -08:00
Neil 5ba9166473 Merge remote-tracking branch 'private/cloud/integration' into cloud/w2-wakefix
# Conflicts:
#	src/main/hosted-sandbox/hosted-workspace-runtime.ts
#	src/main/runtime/workspaces/sleep/workspace-sleep-runtime.ts
2026-11-09 07:03:54 -08:00
Neil 165d6813fe Merge remote-tracking branch 'private/cloud/integration' into cloud/w2-transfer
# Conflicts:
#	src/main/hosted-sandbox/hosted-sandbox-install.ts
#	src/preload/api-types.ts
#	src/renderer/src/components/sidebar/workspace-actions/context-menu/WorktreeContextMenuView.tsx
2026-11-09 07:02:59 -08:00
Neil 60223bef63 fix(cloud): review fixes for wake readiness, in-flight wake hold outside call slots, drain-scoped agent auto-resume, gated interrupted-turn continue 2026-11-09 07:02:34 -08:00
Neil b0b593ed45 Merge remote-tracking branch 'private/cloud/integration' into cloud/w2-transfer
# Conflicts:
#	cloud/apps/sandbox-control/src/index.ts
#	cloud/apps/sandbox-control/src/lifecycle.ts
#	cloud/apps/sandbox-control/src/pool.ts
#	cloud/apps/sandbox-control/src/sandbox-vm-commands.ts
#	cloud/apps/sandbox-control/test/fake-vercel.ts
#	cloud/apps/sandbox-control/test/lifecycle-flow.test.ts
#	src/main/hosted-sandbox/hosted-sandbox-control-plane-client.ts
#	src/preload/api-types.ts
#	src/renderer/src/components/sidebar/workspace-actions/context-menu/WorktreeContextMenuView.tsx
#	src/shared/hosted-sandbox/hosted-sandbox-wire.ts
2026-11-09 07:01:38 -08:00
Neil cf7d27ec93 Merge pull request #74 from nwparker/cloud/w2-ui
feat(cloud): workspace lifecycle UI, asleep reading cache and wake-on-message queue
2026-11-09 06:59:40 -08:00
Neil 94d96d15e5 Merge remote-tracking branch 'private/cloud/integration' into cloud/integration 2026-11-09 06:58:30 -08:00
Neil cfe9916a32 Merge remote-tracking branch 'private/cloud/integration' into cloud/integration
# Conflicts:
#	src/renderer/src/components/right-sidebar/runtime-port-forward-status.tsx
2026-11-09 06:57:08 -08:00
Neil 2cca473b9a Merge cloud/w2-cache (queue fixes) and cloud/integration into cloud/w2-ui; final nits 2026-11-09 06:56:40 -08:00
Neil 57160280fd wip(team): tests, account menu org line, i18n sync, dev url handoff 2026-11-09 06:55:56 -08:00
Neil dde40cbdeb wip(team): W10 round-1 fixes, return page, docs 2026-11-09 06:55:55 -08:00
Neil 90adbc6601 wip(team): team page, checkout flow, dev billing token 2026-11-09 06:55:54 -08:00
Neil 5a38c64bd7 fix(cloud): transfer extraction skips .git paths, keeps exec bits, steps over dir data, byte-accurate pax; pack drops a stale result 2026-11-09 06:55:39 -08:00
Neil 408f0290df fix(cloud-integration): lint green again after #50, W3 port-forward and #55 merges
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.
2026-11-09 06:55:27 -08:00
Neil 777f078c76 feat(cloud): W4 team collaboration on cloud workspaces
## 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
2026-11-09 06:53:24 -08:00
Neil ce6a806138 Merge commit '3a4a69cb3a5' into cloud/w2-ui 2026-11-09 06:51:23 -08:00
Neil 8a657067bd fix(cloud): SSH/transfer security review: owner-only SSH setup + DELETE, managed authorized_keys block, stable bridge token via subprotocol, boot-scoped pids + required healthz, owner re-check on ssh-wake, safe tar/gzip extraction, transcript-only chats, VM cleanup in finally, transfer sweep, unique aliases, shell-safe ProxyCommand launcher (Windows/AppImage), login-user fix-up 2026-11-09 06:50:38 -08:00
Neil 3a4a69cb3a fix(cloud): import OfflineCacheLimits after the cache split 2026-11-09 06:50:22 -08:00
Neil eea4d2184e fix(cloud): wake progress reports ready only once the woken server answers terminal requests 2026-11-09 06:49:54 -08:00
Neil 2aac889a78 Merge remote-tracking branch 'private/cloud/integration' into cloud/integration
# Conflicts:
#	src/renderer/src/components/sidebar/workspace-actions/context-menu/WorktreeContextMenuView.tsx
2026-11-09 06:45:27 -08:00
Neil 21a999305e fix(cloud): queued prompt failed by Sleep/archive mid-delivery is never resurrected; sent-but-unconfirmed ends as unconfirmed; legacy plaintext files removed; Linux basic_text is no keychain 2026-11-09 06:44:27 -08:00
Neil 0d4d6a3423 refactor(cloud): split the control-plane request out of the hosted sandbox client (max-lines) (#63) 2026-11-09 06:44:15 -08:00
Neil 309245d0d4 feat(w3): remote desktop for Orca Cloud workspaces (Xvnc + noVNC over the port forward) (#61) 2026-11-09 06:43:19 -08:00
Neil 2cfddb1a41 Merge origin/main into cloud/integration
# Conflicts:
#	src/preload/api/ephemeral-vm-bridge.ts
#	src/renderer/src/components/sidebar/workspace-actions/context-menu/WorktreeContextMenuView.tsx
#	src/shared/ephemeral-vm-runtime-store.test.ts
2026-11-09 06:40:52 -08:00
Neil 9f12d71996 fix(w3): forwards never wake a VM on a stray connection, count as activity for idle sleep, and close when their host is removed (#62) 2026-11-09 06:40:25 -08:00
Neil 984f29fc37 feat(cloud): SSH into Orca Cloud workspaces (orca ssh, ssh-proxy, VS Code/Cursor Remote-SSH) (#55)
* 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.
2026-11-09 06:37:23 -08:00
Neil 793c578874 fix(w3): ports UI polish from W10 design review round 3 (#60)
* fix(w3): W10 round-3 polish for ports (one 'in use' wording, actionable errors + Reconnect, xs actions, Badge, focus ring, live region, toast durations/coalescing, range InlineError)

* chore(w3): drop obsolete port-forward localization keys
2026-11-09 06:33:18 -08:00
Neil 1737dcdfbd feat(cloud): share links for Orca Cloud workspace ports (W3) (#51)
* feat(cloud): share links for Orca Cloud workspace ports (gateway, in-VM share proxy, wake interstitial, Ports panel UI)

* fix(cloud): share-link security review (no cookie fallback, path mode dev-only, per-link cookie scoping, SW and Referer blocked, proxy key via stdin, connection deadline, link-bound viewer, wake cap, rate limit, secret rotation)

* fix(cloud): share links re-review (host-only app cookies in subdomain mode, previous-secret proxy retry, 30 min connection cap, share-domain pinning on the desktop)
2026-11-09 06:30:40 -08:00
Neil 0869752ed6 Build sheet: plain-language Orca Cloud build sheet with timed steps (M1, M2, P0-4/C4, M6–M9, M21) (#59)
* 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)
2026-11-09 06:27:44 -08:00
OrcaWinandOrcaWin b2c049a8cb test: remove browser startup and CLI prerequisite mock suites (#40371)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-11-09 06:21:19 -08:00
Neil cd884b94ea Run-on picker: Orca Cloud as a top-level target, entitlement pre-check, keyboard submenus (#50)
* feat(run-on): Orca Cloud as a top-level Run-on target with entitlement pre-check and keyboard submenus

* fix(run-on): reviewer fixes, sign-in/upsell row, glossary copy, current-row check

* fix(run-on): main reports Orca Cloud availability; reload recipes on auth change

* fix(run-on): an offline session refresh hides Orca Cloud instead of asking to sign in
2026-11-09 06:20:06 -08:00
Neil d6679e8e93 feat(cloud): move a cloud workspace to this computer, wake on SSH (sshd over a wss bridge + desktop ProxyCommand), preview wake helper 2026-11-09 06:11:42 -08:00
Neil 3ab80057e5 fix(cloud-integration): lint gate findings from merged workstreams (#37, #48)
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.
2026-11-09 06:08:11 -08:00
Neil d07e40ccda fix(remote-runtime): requests wait for an in-flight VM wake; resumed remote agents continue a turn their host cut off; restart offers tolerate host clock skew 2026-11-09 06:06:57 -08:00
Neil c534ee8f08 Merge origin/nwparker/agent-host-sign-in (moved head) into cloud/integration 2026-11-09 06:03:53 -08:00
Neil 8a7aad4e42 fix(remote): return flow-control credit when forwarding sign-in callbacks
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.
2026-11-09 06:01:30 -08:00
Neil db07983ef7 Merge remote-tracking branch 'private/cloud/integration' into cloud/w2-ui 2026-11-09 05:56:22 -08:00
Neil 74159c0f61 wip(cloud): round-2 review fixes (archive check seam, fixtures) 2026-11-09 05:56:22 -08:00
Neil f27fe00b8d feat(w3): forward paired-host ports to localhost, auto-forward + notifications, Settings → Ports (#52)
* 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)
2026-11-09 05:55:56 -08:00
Neil 6c951c0a9a feat(vm-recipes): show VM lifecycle states in the sidebar, with Suspend/Resume VM (#40046)
* 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.
2026-11-09 05:54:03 -08:00
Kelvin Amoaba a26277b275 perf(github): use the desktop's PR fallback rule on the phone and forward refreshes (#40128)
* 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
2026-11-09 13:51:12 +00:00