Commit Graph
7 Commits
Author SHA1 Message Date
Neil 0559156ce2 chore(cloud): read snapshot lint/quality gates (no casts, async key store, split parser, l10n) 2026-11-10 00:49:53 -08:00
Neil 691e428269 fix(cloud): rollback pin, reader-key revoke on sign-out, no re-register on not_sealed_for_key; read view polish 2026-11-10 00:27:19 -08:00
Neil cedec8398b fix(cloud): read snapshot security review follow-ups (trust wording, timing-only stats, live phone keys, races) 2026-11-10 00:17:45 -08:00
Neil 86aafd99c6 feat(cloud): read a sleeping workspace from an E2EE snapshot (desktop + phone clients) 2026-11-10 00:05:33 -08:00
Neil 119ffb907e feat(cloud): label teammates from the token name claim (member_names, migration 0034)
Each member's own /v1/team request records the sanitized name claim for their account;
workspace views return memberNames for owner, creator, last active and presence ids. Home
falls back to these when the org roster has no entry (dev orgs, members who left). Labels
only; access never reads them. Write failures never fail the request.
2026-11-09 15:03:14 -08:00
Neil fc50ad9466 feat(cloud): per-device sender attestation (orcad orchestration.turnSender, orca sender), root-only member identities + sudo helper, sender-aware git in VMs (default on); terminal-agent sender envelope; follow teammates into chats and chat links; name claim
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
#	src/renderer/src/components/cloud-workspaces/CloudMemberAvatars.tsx
2026-11-09 07:30: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