Commit Graph
632 Commits
Author SHA1 Message Date
Neil c856b945f1 feat(cloud): ENTITLEMENTS-B2 metadata.orca_plan on Stripe prices is the catalog join key
Neil's Q1 answer: a plan id on the Stripe Price/Product maps to the repo catalog's entitlements.
seatPriceMatch reads price.metadata.orca_plan (after env ids and price history, before lookup key
and product); the catalog sync logs a lookup-key/tag mismatch; stripe-test-setup tags every price.
2026-11-12 01:44:10 -08:00
Neil fe2db1b352 Merge pull request #507 from nwparker/cloud/entitlements-b
feat(cloud): ENTITLEMENTS-B Stripe lifecycle for grants, reconciliation, GET /v1/plans and GET /v1/entitlements (fixes the planForPrice orphaning bug)
2026-11-12 01:44:05 -08:00
Neil c2f5b1fbb7 Merge remote-tracking branch 'private/cloud/integration' into cloud/n02-reland
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-12 01:25:37 -08:00
Neil 4b7456cada Merge pull request #520 from nwparker/cloud/w6-bind-identity
fix(cloud): binding the GitHub App through OAuth also connects the binder's GitHub identity (commits as you)
2026-11-12 01:25:14 -08:00
Neil ec96b185d8 test(cloud): install redirect with an OAuth code (request-auth-on-install) stores the identity 2026-11-12 01:03:41 -08:00
Neil 380b6056ea Merge pull request #506 from nwparker/cloud/reland-485
fix(cloud): re-land #485 zsh history hook (REG-11 was a test artifact)
2026-11-12 01:03:39 -08:00
Neil cdb5f57625 fix(cloud): binding the GitHub App through OAuth also connects the binder's GitHub identity (commits as you) 2026-11-12 00:59:44 -08:00
Neil ec99d02d1c Merge pull request #504 from nwparker/cloud/entitlements
feat(cloud): ENTITLEMENTS-A plans catalog, entitlement grants and resolver (billing, shadow on dev)
2026-11-12 00:50:48 -08:00
Neil f8beff3dc5 Merge remote-tracking branch 'private/cloud/integration' into cloud/reland-485
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-12 00:31:18 -08:00
Neil 8fd67bbd3d Merge remote-tracking branch 'private/cloud/integration' into cloud/n02-reland
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-12 00:31:11 -08:00
Neil 3dbb36aa21 feat(cloud): ENTITLEMENTS-B Stripe lifecycle for grants, reconciliation, GET /v1/plans and GET /v1/entitlements
- planForPrice fix: seat prices map through the configured ids, the price history (plan_prices),
  the plan's lookup key, or the plan's Stripe product; a known subscriber on an unmappable price
  still gets status/period/cancel applied, so a price change can never leave a canceled
  subscriber with access (test: lifecycle.test.ts, all modes)
- catalog prices synced from Stripe by lookup key (cron + price.*/product.* webhooks); every seat
  price a subscription is on is kept as history; Checkout sells the lookup-key holder when on and
  refuses (409 plan_unavailable) rather than guess a price
- webhook: one processStripeEvent for webhooks and replay; customer.deleted revokes; the mirror
  upsert ignores older Stripe reads
- reconcile.ts (cron): Stripe event replay from a cursor, rolling re-sync of stale subscriptions
  (404 = canceled), catalog price refresh; grant backfill after it
- GET /v1/plans (public, ETag/304, prices only from Stripe, entitlements, features, policy) and
  GET /v1/entitlements (effective values, access, grants); legacy offers built from the catalog
  when on (identical for the launch catalog, plus warnAtPercent)
- seats and overage read the price history and plan policy (seat bounds, true-down window)
2026-11-12 00:30:39 -08:00
Neil 2d0a817de8 fix(cloud): ENTITLEMENTS-A billing vitest projects inherit the collected include (test-file-runners check) 2026-11-12 00:30:35 -08:00
Neil cfbcf5409a fix(acceptance): read the Vercel token only from tok.json (token, then bearerToken); drop the personal Vercel CLI auth.json fallback 2026-11-12 00:07:17 -08:00
Neil 347444e0e9 Merge pull request #511 from nwparker/cloud/w6-resume-stuck
fix(cloud): RESUME-STUCK a resume whose client quits mid-wake no longer leaves the workspace stuck resuming
2026-11-11 23:08:07 -08:00
Neil 60c0565147 fix(cloud): RESUME-STUCK a resume whose client quits mid-wake no longer leaves the workspace stuck resuming 2026-11-11 22:42:54 -08:00
Neil a44f0c39fd Merge remote-tracking branch 'private/cloud/integration' into cloud/w6-terminal-identity
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-11 22:21:55 -08:00
Neil e28c042de2 Revert "Merge pull request #502 from nwparker/cloud/revert-485"
This reverts commit 0d53168422, reversing
changes made to e81a96e7ad.
2026-11-11 22:18:34 -08:00
Neil 4ec3b71798 fix(cloud): ENTITLEMENTS-A seat bounds stay plan policy (drop the duplicate max_seats entitlement) 2026-11-11 22:14:49 -08:00
Neil ec8cfe5dac feat(cloud): ENTITLEMENTS-A plans catalog, entitlement grants and resolver in billing D1 (shadow on dev)
- migration 0008: plans, immutable plan_versions, plan_prices (Stripe mirror), entitlement_grants,
  entitlement_audit, entitlement_shadow_diffs, stripe_sync_state; subscriptions.seat_price_id
- catalog/catalog.json (catalog-as-code: Team, Enterprise, Trial; no prices) + scripts/catalog-apply.ts
- typed entitlement registry (entitlement-keys.ts) with sum/max/union/or aggregation
- grants.ts: idempotent projection of each subscription (Stripe mirror) and trial into grants,
  hold/release/revoke, out-of-order guard, terminal revocation, audit; manual/promo grants
- entitlements.ts: one builder fed by legacy terms or grant terms; ENTITLEMENTS_MODE off|shadow|on;
  shadow records every disagreement; lazy re-projection; cron backfill
- trial hours come from the catalog's trial plan when on (granted trials keep their hours)
- the whole suite runs in legacy, shadow (zero diffs enforced) and on modes
2026-11-11 22:11:18 -08:00
Neil e7059d8a0e Revert "Merge pull request #485 from nwparker/cloud/cr-cmd-quiet-zsh"
This reverts commit da67a5ca80, reversing
changes made to 337e3e6929.
2026-11-11 21:57:11 -08:00
Neil a834170b8f feat(cloud): commits and pushes in a plain cloud terminal use the typist's GitHub identity; fallback email on orca.dev
- orcad: a delivered keystroke frame from a paired device records that device as the terminal's driver (the same registry agent prompts use), so the VM git shim's orca-git-as answers for plain terminals too. The device is the transport-attested caller, never the client id. Local windows never record.
- desktop: typing in an Orca Cloud terminal reports "I'm driving" (noteCloudSend, throttled), so the egress honors the typist's GitHub identity. Only xterm user input counts; query replies, focus and mouse reports, replay and resubscribes don't.
- Fallback author email cloud@users.noreply.onorca.dev becomes cloud@users.noreply.orca.dev; existing workspaces on the old default follow on next boot.
2026-11-11 21:45:40 -08:00
Neil 8cffa568f5 chore(links): point private-only website links at orca.dev
Help menu docs/changelog, the telemetry privacy link, the share page's
"Get Orca" link and the MCP server's website URL now use orca.dev. The site
moved there; the old onorca.dev hosts redirect. Service hosts are unchanged.
2026-11-11 20:47:55 -08:00
Neil c1963562d9 fix(cloud): CR-cmd-quiet zsh: keep Orca's staged launch line out of zsh history (VM session env hook) 2026-11-11 19:59:57 -08:00
Neil 4bcf815aa7 fix(cloud): a boot whose member identity install fails records it too (VM git-setup.failed + gitSetup), so Restart can't hide a failure
Boot-time installs were swallowed and the boot cleared gitSetup, so a restart whose install failed again dropped the desktop strip while git still lacked identities. Every boot install now goes through settleMemberGit: failure marks the VM and the row, a later success (or a boot with nobody to install) clears them. The git shim refuses on a failed mark even with nothing pending. Restart is the retry (it re-runs the install before it answers).
2026-11-11 19:29:18 -08:00
Neil 8bb65d69b0 copy(cloud): git shim hold messages per design-squad (orca: prefix, git <cmd>, sidebar > Restart, newline-terminated) 2026-11-11 19:29:18 -08:00
Neil d441463abb perf(cloud): a create answers at ready; member git identities install after it (CREATE-GIT-ASYNC)
POST /v1/sandboxes kept the response open ~2.3 s after orcad was ready while syncMemberGit ran (and again inside boot when the creator had GitHub connected). A create now records the owner device, answers, and installs member identities in ctx.waitUntil. The VM is told the setup is pending (ORCA_GIT_SETUP=pending -> ~/.orca-sandbox/git-setup.pending); its git shim holds commit/push/merge/... up to 15 s until orca-sandbox-members writes git-setup.ready, and on a failed or stalled setup stops them with what to do instead of committing as the workspace identity. Read-only git and fetches never wait: the boot already routes the workspace credential. A failed install is kept on the row (0053 git_setup_failed_at) and shown as sandbox.gitSetup 'failed' to clients sending feature git-setup; any later boot or successful sync clears it. Wake, resume, restart and grants are unchanged (synchronous).
2026-11-11 19:29:18 -08:00
Neil 901e40a62b fix(cloud): ARCHIVE-REACH archive, unarchive and delete from this desktop re-read Home's archived count at once (no cached 0 for 5 min); server test: desktop archive is in archived=only 2026-11-11 17:42:21 -08:00
Neil a79d836d04 fix(cloud): one definition of an archive snapshot (until its kept-until date, then deleted; no sandbox hours), on every Archive control; /v1/config exposes archiveTtlDays 2026-11-11 14:13:19 -08:00
Neil a7b4937fa0 fix(cloud): N-02 re-land: host keeps a local terminal's depth in the VM; overflow recovery stays at 1000 rows 2026-11-11 13:17:09 -08:00
Neil 6f904ba5c3 copy(cloud): Run on's Orca Cloud subtitle reads "Sandbox · 8 vCPU · 16 GB", not "Hosted sandbox" (JA-25, glossary) 2026-11-11 11:41:22 -08:00
Neil 134fc24436 feat(cloud): boot-time orcad refresh so environment and older-image workspaces get VM fixes (ENV-STALE)
Golden source builds publish their orcad + in-VM CLI as a commit-pinned bundle (R2, uploaded by the build VM over a signed PUT; the Worker computes the stored sha256). On every boot and wake, before orcad starts and inside the existing orcad phase, a sandbox whose /opt/orca/runtime/orcad/SOURCE_COMMIT differs from its region's active golden fetches that bundle from the control plane's own host (already on the egress allowlist) with a 10-minute signed URL, verifies the sha256 the control plane passes in, checks the commit and node runtime, and swaps orcad + orca-cli atomically. Any failure keeps the old orcad and boot continues; every outcome is logged (runtime_refresh: outcome, from, to, ms). RUNTIME_REFRESH=off is the kill switch. Dev R2 bucket orca-sandbox-runtime-dev.
2026-11-11 03:21:01 -08:00
Neil 215564db55 fix(cloud): signed-out Claude message matches the strip and glossary (design-squad) 2026-11-11 02:03:47 -08:00
Neil a206be57ef fix(cloud): a signed-out account answers like the provider, not 403 host_not_proxied (W-106)
Once an Orca account stops applying (revoked after a confirmed 401, expired, removed, turned off, shared, owner changed), requests still carrying the sandbox's account placeholder (shells and agents already running, a Vercel forward that hasn't caught up) now get Anthropic's own 401 authentication_error, saying the Orca sign-in for Claude needs renewing, instead of 403 host_not_proxied or a bare deny. Nothing is swapped on those routes.
2026-11-11 01:43:46 -08:00
Neil c1c1cb387f Merge remote-tracking branch 'private/cloud/integration' into cloud/read-snapshot-signed
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
#	cloud/apps/sandbox-control/image/vm/orca-sandbox-grant
2026-11-11 00:08:43 -08:00
Neil bfc8849b22 fix(cloud): grant sealer records the device only when the script provides the ledger path 2026-11-10 23:21:47 -08:00
Neil 766e0b23b6 Merge remote-tracking branch 'private/cloud/integration' into cloud/read-snapshot-signed
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
#	src/main/ipc/cloud-workspaces.ts
2026-11-10 23:20:55 -08:00
Neil 6a4adaa2dd Merge remote-tracking branch 'private/cloud/integration' into cloud/local-command
# Conflicts:
#	src/main/hosted-sandbox/hosted-sandbox-install.ts
#	src/renderer/src/components/cloud-workspaces/use-cloud-workspaces.ts
#	src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsLinks.tsx
#	src/renderer/src/components/settings/orca-cloud/OrcaCloudSettingsPanes.tsx
#	src/renderer/src/components/settings/orca-cloud/orca-cloud-settings-search.ts
#	src/renderer/src/hooks/settings-navigation-orca-cloud-sections.ts
#	src/renderer/src/i18n/locales/en.json
#	src/renderer/src/lib/settings-navigation-types.ts
2026-11-10 22:39:07 -08:00
Neil 3087787244 Merge pull request #346 from nwparker/punchlist/ja18-billing
JA-18: Plan & billing usage history, top workspaces/members, one spend cap field
2026-11-10 22:21:17 -08:00
Neil 0217501693 Merge remote-tracking branch 'private/cloud/integration' into cloud/multiplayer-gaps 2026-11-10 21:30:03 -08:00
Neil 39ffbdd862 feat(cloud): MEMBER_REMOVED_TOKEN, a bearer valid only for /v1/internal/org-members/removed
Auth pushes PropelAuth offboarding and Orca-side member removals here (stablyai/orca-cloud#739);
it should not need the full operator token for that. The operator token is still accepted.
2026-11-10 21:08:10 -08:00
Neil d6b3646081 Merge remote-tracking branch 'private/cloud/integration' into cloud/local-command
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
#	src/renderer/src/i18n/locales/en.json
2026-11-10 21:04:43 -08:00
Neil 612269c105 fix(billing): remove the overage item on opt-out once nothing is left to invoice
Opting out left the metered overage item on the Stripe subscription, so every later
invoice carried a '0 std hour x Orca sandbox overage' $0 line (confirmed on a
throwaway test-mode subscription). The item now comes off at once when nothing was
metered this Stripe period, or at the first sync after the period rolls over when
there is usage still to invoice. Re-opting in within 24h got the removed item's id
replayed by Stripe idempotency (also confirmed live); the add now retries under a
key naming the removed item. Nothing meters while opted out or with a $0 cap.
2026-11-10 20:51:23 -08:00
Neil 8a2603a68e Merge private/cloud/integration into cloud/multiplayer-gaps (team-presence, routines) 2026-11-10 20:37:56 -08:00
Neil 425ef9c06e Merge pull request #353 from nwparker/create-speed/ja-27
fix(cloud): VM hostname is the workspace name, not the provider's per-boot id (JA-27)
2026-11-10 20:31:26 -08:00
Neil 779e1dbc12 Merge pull request #355 from nwparker/cloud/w3-ports-external-collapsed
fix(w3): hide the sandbox's own services from External ports in cloud workspaces
2026-11-10 20:29:33 -08:00
Neil ed46c5e149 fix(cloud): VM hostname is the workspace's name, not the provider's per-boot id (JA-27, hostname half)
Terminal prompts read ubuntu@<random VM id> and changed after every wake. Each start (create and wake)
now sets the hostname to the workspace's title (else its repo's name) as a hostname label, plus an
/etc/hosts entry, inline before orcad starts: no image change. Verified on a dev VM: hostname ja-hello,
127.0.1.1 ja-hello, no sudo warnings.
2026-11-10 20:28:52 -08:00
Neil 4f9164e599 Merge pull request #343 from nwparker/cloud/routine-home-filter
cloud Home: hide routine runs by default, with a Routine runs filter (G15)
2026-11-10 20:23:56 -08:00
Neil 9dd23dcca1 Merge pull request #336 from nwparker/cloud/team-presence
feat(cloud): teammate profiles (usage heatmap) and opt-in Pokes
2026-11-10 20:15:14 -08:00
Neil 3f5f314efc fix(cloud): local commands — security review fixes
- orcad: only the owner's desktop may attach/settle; devices paired through a grant are listed
  by orca-sandbox-grant and refused (forks keep their offer's origin id)
- desktop: per-workspace limits (3 waiting, 60/hour), always-allow runs one at a time and 30/hour,
  one banner per burst, refusal floods logged once a minute
- dialog: commands over 20 lines refused; long ones must be scrolled to the end; agent name muted;
  Turn off for this workspace; read delay counts from when a prompt reaches the front
- lookalike spaces and combining marks refused; settled events only close their own workspace's prompt
- executor reports soon after the shell exits even if an escaped process holds the pipes; hard stop
- audit log keeps 3 files, long commands stored as prefix + sha256
- rules expire after 30 days and are cleared when a shared workspace is allowed
2026-11-10 20:11:56 -08:00
Neil d029218f18 fix(w3): keep pid-less user listeners visible; hide only declared platform ports
Vercel's sandbox-init listens on 23456 as root (pid invisible to the user); the
VM declares it via ORCA_HOST_MANAGED_UNOWNED_PORTS. Any other pid-less
listener (root-run postgres, Docker-published ports) stays under External.
2026-11-10 20:10:47 -08:00