Commit Graph
431 Commits
Author SHA1 Message Date
Neil c1cf0cb760 ## What (#49)
Control-plane half of W1, org environment builds (Conductor "Cloud Computer" parity). The desktop settings UI, CLI and disk banner follow in a second PR.

- **Org environment**: repos (GitHub, up to 50, each with a default branch), an install script, env var names, and a machine size (Standard 4/8 or Large 8/16; Large bills 2× through the existing usage path). Members can read; owners and admins edit. Edits use optimistic concurrency.
- **Versioned builds** (`#N`), with status, live log stream (ndjson), stored log, failure step, duration and snapshot.
  - Each build boots a throwaway VM from the active golden image, clones every repo, and runs the install script once with `set -euo pipefail`.
  - It records commits and lockfile blob ids, checks that orcad survived, then saves a manual snapshot.
- **Failed builds never replace the active build.** Rollback is instant (`activate`). The newest 5 builds plus the active one keep their snapshots.
- **New workspaces boot from the active build** (or a pinned `environmentBuildId`). Existing workspaces keep their build, and destroying a workspace never deletes the shared image.
  - A first-boot prelude links the prebuilt repo as the project and fast-forwards the requested branch.
  - A post-checkout hook hard-links the installed dependency folders into each new Orca worktree (about 250 ms).
- **Rebuild prompt** (`/staleness`): reports a lockfile change, a moved default branch, a config edit, or a newer base image. It uses the GitHub compare API, or anonymous smart-HTTP plus raw blob hashing when the REST API refuses Worker IPs.
- **Repos with no commits** build and open; Orca adds an empty first commit.
- **Hardening from the review**:
  - Recovers a snapshot whose finalize was cut off (adopted by box name).
  - Bounded log reads on cancel/timeout.
  - Org secret values are redacted from live and stored logs.
  - Activation is guarded in SQL.
  - Build-number races return 409.
- Migration `0008_environments.sql`: number claimed in /tmp/vdrv/migrations.claims and already applied to dev D1. It is additive.

## Evidence (real Vercel VMs)

Full write-up: `.context/cloud/reports/w1-env-builds.md`.

- vercel/ms build: 15.9 s (boot 1.8 s, clone+install 6 s, snapshot 8 s).
- Private `nwparker/orca-sandbox-push-test` plus public `vercel/ms` in one environment on the shared dev preview: build succeeded in 18 s, and a workspace created from it was ready in 6.3 s.
- Create → orcad ready:

  | Boots from | p50 | p95 |
  |---|---|---|
  | Environment build (n=10, deps installed) | 4.37 s | 8.41 s |
  | Bare golden image (n=9) | 4.79 s | 7.61 s |

- Rollback, creating from build N-1, an empty repo (`rsc/empty`), and staleness `deps_changed` → Rebuild → `up_to_date` were all verified live.

## Tests

`cloud/apps/sandbox-control`: 99 vitest tests and typecheck pass. The new `test/environments.test.ts` covers RBAC, build/fail/keep-last-good, concurrent build 409, cancel, live stream, boot from active and pinned builds, rollback, prune, interrupted-snapshot recovery, and staleness.
2026-11-09 05:45:23 -08:00
Neil dcf7c01216 fix(routines): security review — creator-only edits/runs (admins disable/delete), trusted author_association for GitHub triggers, disable departed members' routines, fair + atomic start caps and queue limit, validated PR URLs, private run detail; drop pool workaround (fixed in #44) 2026-11-09 05:37:30 -08:00
Neil 9ba97b6aaa fix(routines): retry a start once when a half-released VM holds the run key (pool adopt fallback), clear retry marker on running 2026-11-09 05:37:30 -08:00
Neil 76a5d9e703 fix(routines): compact runner status parsing (pretty-printed result), trigger view key order, status parse test 2026-11-09 05:37:29 -08:00
Neil e9f52875cd feat(sandbox-control): routines — schedule/GitHub/webhook triggers, hidden run VMs as the creator, detached headless agent runner, PR/comment posting, per-minute tick with caps, dedupe and crash recovery 2026-11-09 05:37:29 -08:00
Neil f90518bb66 fix(sandbox-control): per-member workspace access on the public API and MCP (W4 rule: private unless team-visible; owner-only screens; admins metadata + sleep/archive/destroy) 2026-11-09 05:31:37 -08:00
Neil 6eec750fe2 fix(sandbox-control): a failed pool adopt no longer blocks its own fallback (sandbox_destroying conflict) (#44)
Reported by W5: when a pooled VM fails to adopt and its destroy stops short (the provider's delete
snapshot still being written), the row stays 'destroying' and keeps the workspace's live unique index,
so the fresh-VM retry hit conflict:sandbox_destroying. The abandoned row (never held user data) now
detaches from the workspace; the cron finishes destroying it. Regression test forces both failures.
2026-11-09 05:28:11 -08:00
Neil ee6c84f883 feat(cloud): per-device Orca Cloud access for phones (W8) (#42)
* feat(cloud): per-device Orca Cloud access for phones

A signed-in desktop enrolls a paired phone's Ed25519 key with the sandbox
control plane (orcaCloud.enrollDevice, phone -> paired desktop -> /v1/device-sessions).
The phone then signs its own short-lived EdDSA tokens and reaches the control
plane directly with its user's identity; no bearer secret is stored anywhere.
Sessions are revocable by the user or the phone itself (401 on the next
request), expire after 30 idle days, and cannot enroll devices, manage
secrets or connect GitHub. onDeviceSessionRevoked lets the workspace
registry cascade grant revocation.

* fix(cloud): device sessions re-vouched every 14 days, revoked keys stay revoked, unpairing a phone ends its cloud access, race-safe enroll, dev namespace

* fix(cloud): phones are 'device' API callers: no API keys or OAuth approvals
2026-11-09 05:22:51 -08:00
Neil 9426b62da0 fix(sandbox-control): pool refills on a miss too and right after a golden activation; one maintainer at a time (#43)
Live dev after a golden rotation showed 1 hit in 10 creates: stale pooled VMs only recycled on the next
cron, and refills ran only after a hit. Now every create (hit or miss) refills in the background, the
cron maintains the pool after the golden tick with fresh deps, and a lease row keeps overlapping
refills from overshooting.
2026-11-09 05:16:06 -08:00
Neil 291394f954 Merge pull request #41 from nwparker/cloud/w6-fixes
W6: node on Orca Cloud terminal PATH; correct workspace name/default branch
2026-11-09 05:06:57 -08:00
Neil 16f598ee6a Merge pull request #35 from nwparker/cloud/w2-lifecycle
feat(cloud): workspace lifecycle API (wake, restart, status, archive) + desktop service
2026-11-09 05:06:27 -08:00
Neil e180ab330f Merge pull request #39 from nwparker/cloud/w5-mcp
feat(sandbox-control): hosted MCP server with OAuth 2.1 (DCR + PKCE) over the public API
2026-11-09 05:06:07 -08:00
Neil 30d9684148 Merge remote-tracking branch 'private/cloud/integration' into cloud/w2-lifecycle
# Conflicts:
#	cloud/apps/sandbox-control/src/index.ts
#	cloud/apps/sandbox-control/src/sandbox-provider.ts
#	cloud/apps/sandbox-control/src/store.ts
#	cloud/apps/sandbox-control/src/vercel-sandbox-api.ts
#	cloud/apps/sandbox-control/test/fake-vercel.ts
#	src/main/hosted-sandbox/hosted-sandbox-driver.ts
#	src/main/hosted-sandbox/hosted-sandbox-recipe.ts
2026-11-09 05:05:53 -08:00
Neil d360b916f9 fix(mcp): grant list shows the effective end for grants minted before 0028 2026-11-09 05:05:27 -08:00
Neil 5c84d9e98a fix(sandbox-control): node on terminal PATH (npm agent CLIs like codex failed with env: node), workspace name from the repo URL and lazy default branch (first-boot clone is async) 2026-11-09 05:04:46 -08:00
Neil 00a881f14b fix(mcp): grants are visible, revocable and bounded — tie to approving key, /v1/oauth-grants, 90-day family end, replay-safe mint, member removal, purge, per-IP token limit (migration 0028) 2026-11-09 05:04:16 -08:00
Neil 24b8b9c1a4 fix(cloud): public API wake shares the W2 single-flight wake; tests use the sandbox wake route 2026-11-09 05:03:34 -08:00
Neil 557b13b108 fix(cloud): a failed adopted wake goes back to sleeping (resume_failed) instead of staying resuming 2026-11-09 05:02:59 -08:00
Neil cb340de62e fix(cloud): adopted wakes run the full boot (secrets, policy, repo token); stale-wake threshold above live boots; trim cached archive state
# Conflicts:
#	cloud/apps/sandbox-control/src/lifecycle.ts
2026-11-09 05:02:59 -08:00
Neil 0533b5cd9f fix(cloud): review fixes for wake/restart/archive races, output budget, archived compat, OOM dedupe, scheduler handoff
# Conflicts:
#	cloud/apps/sandbox-control/src/index.ts
#	cloud/apps/sandbox-control/src/lifecycle.ts

# Conflicts:
#	cloud/apps/sandbox-control/src/index.ts
2026-11-09 05:02:55 -08:00
Neil 5c1e87e093 test(cloud): desktop client drives the new lifecycle routes against the real handler 2026-11-09 05:02:28 -08:00
Neil 6f5007648e fix(cloud): archive capture skips non-repository directories 2026-11-09 05:02:27 -08:00
Neil eea640c9e7 feat(cloud): desktop Orca Cloud workspace service (status, restart, archive, wake progress, OOM notices) and preload API 2026-11-09 05:02:26 -08:00
Neil c250505f75 feat(cloud): wake (single-flight, long-poll), restart, status metrics, archive/unarchive on the sandbox control plane
# Conflicts:
#	cloud/apps/sandbox-control/src/index.ts

# Conflicts:
#	cloud/apps/sandbox-control/src/env.ts
#	cloud/apps/sandbox-control/src/index.ts
#	cloud/apps/sandbox-control/test/fake-vercel.ts
2026-11-09 05:02:20 -08:00
Neil 1ec420ea77 feat(sandbox-control): golden image on a Vercel Managed Image (64 GB disk) with orca CLI, rg, tmux, vim, git-lfs and headless Chrome (#40)
W9 F4/F5. The build starts from vercel/sandbox/node:24 (Ubuntu) instead of the deprecated node24
runtime, so sandboxes cloned from the golden get 64 GB instead of 32 GB. The bundle's orca-cli.cjs
becomes /opt/orca/bin/orca (ORCA_USER_DATA_PATH defaults to orcad's data dir); a pinned Google Chrome
.deb provides headless Chrome and orcad gets ORCA_BROWSER_EXECUTABLE. Live smoke of the built image:
64G disk, all tools on PATH, orca status reaches orcad, chrome headless renders, create 2.3 s, orcad
2.1 s, resume 2.0 s.
2026-11-09 05:02:05 -08:00
Neil 7e80fbf9d3 Merge remote-tracking branch 'private/cloud/integration' into cloud/w6-control-plane
# Conflicts:
#	cloud/apps/sandbox-control/src/lifecycle.ts
#	cloud/apps/sandbox-control/test/fake-vercel.ts
2026-11-09 04:59:28 -08:00
Neil 0aa88e6182 fix(sandbox-control): review fixes — proxy rechecks a key's host at send time, refresh claims the row before the policy and writes are generation-ordered, bounded refresh fan-out, URL/model values without control chars, exact Codex host match 2026-11-09 04:56:41 -08:00
Neil a13e17cd46 feat(mcp): read_session tool (rendered agent screen) 2026-11-09 04:53:59 -08:00
Neil a4ff3f5dcb docs(api): MCP connection guide and /v1/oauth-approvals in OpenAPI 2026-11-09 04:53:58 -08:00
Neil 56688adfe1 fix(mcp): consent checkboxes post as grant so they never shadow the original scope 2026-11-09 04:53:57 -08:00
Neil 36ef481da6 feat(sandbox-control): hosted MCP server (Streamable HTTP) over the public API, with OAuth 2.1 (DCR, PKCE S256, refresh rotation, RFC 8707/9728/8414/7009) and desktop approval codes 2026-11-09 04:53:56 -08:00
Neil d0565bb871 fix(sandbox-control): a base URL only routes a model key from the same secret scope (no org-key exfil via a member's personal base URL) 2026-11-09 04:52:04 -08:00
Neil 1b322192a2 fix(sandbox-control): review fixes — user text as --flag=value, claim-token message settle (no blind re-send), revoke workspace tokens on toggle-off and provider stops, rate limit + audit first message 2026-11-09 04:51:14 -08:00
Neil b697905497 feat(sandbox-control): revoke a departed member's API keys (operator route for auth) 2026-11-09 04:51:14 -08:00
Neil 05661537cf feat(sandbox-control): session screen endpoint; seed Claude Code's bypass-mode acknowledgement so API prompts are not swallowed 2026-11-09 04:51:13 -08:00
Neil 664badba77 feat(sandbox-control): public /v1 API — org API keys (hashed, scoped), audit log, rate limits, projects, workspaces lifecycle, agent messages, sessions, in-VM workspace tokens, OpenAPI + docs 2026-11-09 04:51:12 -08:00
Neil 9aeb73d20d wip(cloud): public API foundation (keys, audit, workspaces, messages, openapi) 2026-11-09 04:51:10 -08:00
Neil 4851f6c4e2 feat(cloud): agents just work in Orca Cloud — provider presets, host-scoped model-key egress swap, live secret refresh, managed env, redaction
Control plane (cloud/apps/sandbox-control):
- Provider presets as secrets: AI_GATEWAY_API_KEY (Vercel AI Gateway) derives Claude Code + Codex env;
  custom ANTHROPIC_BASE_URL/OPENAI_BASE_URL (https, public host only) + *_MODEL. Provider hosts are
  allowlisted per workspace from its agent connection (migration 0026 egress_allow_hosts, additive).
- Egress placeholder swap is host-scoped per credential (SECRET@host) incl. ai-gateway.vercel.sh and
  custom hosts; staged rollout SECRETS_EGRESS_PLACEHOLDERS=accounts:<ids> (or on/off).
- GET /v1/secrets/effective, POST /v1/secrets/:scope/batch, POST /v1/sandboxes/:id/env/refresh; every
  secret write refreshes running sessions of that owner (no restart, no rebuild).
- VM: orca-sandbox-env writes a tmpfs-only session env file re-read by every new shell
  (/etc/profile.d hook); Codex gets a managed provider block when OPENAI_BASE_URL is set; managed env
  ORCA_IS_CLOUD, ORCA_ROOT_PATH/WORKTREE_PATH/WORKSPACE_PATH/WORKSPACE_NAME/DEFAULT_BRANCH/PORT +
  CONDUCTOR_* aliases. image/patch-golden-image.ts re-images scripts in ~10s.
- Redaction: pairing offer read via the files API (Vercel retains command stdout), log tails strip
  injected values/token shapes, runningOrcad no longer prints the offer, no GitHub placeholder for
  non-github.com repos.
Desktop: token-pattern + injected-value redaction for logs, crash reports, daemon log, emulator probe,
relayed worker spans.

Live (Vercel, W6 worker, placeholders on): org-shared gateway key, real Claude Code 2.1.319 and Codex
0.166.0 fixed+committed code through the swap; SSE long stream 978 chunks/25s and streamed tool_use
intact; real key absent from VM disk, tmpfs and every process env; secret edit visible in a new
shell 0.6s after PUT.
2026-11-09 04:49:15 -08:00
Neil 178eaf4ec8 feat(sandbox-control): warm VM pool (SANDBOX_POOL_SIZE); idempotent resume of a running sandbox; github_not_connected before provisioning (#36)
- pool.ts: N standard VMs booted from the current golden with egress denied; create claims one atomically
  (DELETE..RETURNING), applies the caller policy + full lease in parallel, bills from the claim; cron and
  each claim refill; recycled at 20 min, on golden change, pool off or kill switch; fallback to a fresh VM.
- F1: orca-sandbox-start leaked the start-lock fd into orcad, so a second start (resume of a running
  sandbox, retried create) waited 60 s and 502'd. Children now close fd 9; the Worker also reads the
  serving orcad's ready line without the lock (fixes VMs on older images).
- F2: a github.com repo with no App token and no anonymous access fails 409 github_not_connected before
  any VM work.
2026-11-09 04:45:39 -08:00
Neil e232ea8580 fix(sandbox-control): allow github.com by default so public repos clone without a GitHub App install (#34) 2026-11-09 04:31:59 -08:00
Neil 6d3b2260f0 Merge remote-tracking branch 'private/nwparker/vercel-driver' into cloud/core-sync 2026-11-09 04:24:40 -08:00
Neil 148567dbd3 perf(cloud): parallel boot prep, policy at create, clone alongside orcad, warmed V8 compile cache; Server-Timing phases (#31)
* feat(sandbox-control): dev-only shareable GitHub connect link

* perf(cloud): parallel boot prep, policy at create, clone alongside orcad, warmed V8 compile cache; phase timings (Server-Timing)
2026-11-09 04:20:09 -08:00
Neil 04a3fd27b4 feat(sandbox-control): dev-only shareable GitHub connect link (#30) 2026-11-09 04:09:43 -08:00
Neil ba7db6d219 fix(sandbox-control): read the orgRole claim that Orca Cloud auth mints (#29)
Auth mints the live org role as orgRole on sandbox tokens (same claim as billing
tokens, stablyai/orca-cloud#695); the verifier read org_role, so admins would
never have been recognized.
2026-11-09 04:07:04 -08:00
Neil fbeeaf44c2 Merge remote-tracking branch 'private/nwparker/vercel-driver' into cloud/integration
# Conflicts:
#	cloud/apps/billing/src/entitlements.ts
#	cloud/apps/billing/src/index.ts
#	cloud/apps/billing/src/plans.ts
#	cloud/apps/billing/src/seats.ts
#	cloud/apps/billing/src/store.ts
#	cloud/apps/billing/src/stripe.ts
#	cloud/apps/billing/src/usage.ts
#	cloud/apps/billing/src/webhook.ts
#	cloud/apps/billing/test/billing-flow.test.ts
#	cloud/apps/billing/test/seats-grace.test.ts
#	cloud/docs/accounts-billing-design.md
#	config/scripts/ci/unit-selection/check-test-file-runners.mjs
#	src/main/billing/billing-client.ts
#	src/renderer/src/components/billing/plan-billing-fixtures.ts
#	src/renderer/src/components/billing/plans/TeamPlanCard.tsx
#	src/renderer/src/components/billing/team/TeamMembersSection.tsx
#	src/renderer/src/components/billing/team/TeamMembersView.fixture.tsx
#	src/renderer/src/components/billing/team/TeamMembersView.tsx
#	src/renderer/src/i18n/locales/en.json
#	src/renderer/src/main.tsx
#	src/shared/orca-billing.ts
2026-11-09 04:06:58 -08:00
Neil dc71ad438b Merge remote-tracking branch 'private/nwparker/accounts-billing' into cloud/integration 2026-11-09 04:06:35 -08:00
Neil 8dde71250d feat(cloud): self-rotating golden images (refresh before expiry, release builds, smoke-gated atomic swap); Orca Cloud gated on the sandbox capability (#28) 2026-11-09 03:28:58 -08:00
Neil a2b91b9d47 chore(cloud): dev golden image rebuilt with the secret-store start script (#27) 2026-11-09 03:03:47 -08:00
Neil 9922e32a68 feat(cloud): Orca Cloud in the desktop end to end (provider, lease scheduler, upsell, dogfood) (#26)
* feat(sidebar): replace footer Settings and Help icons with an account menu

* fix: keep account menu header on primitive spacing; move focus-read allowance

* fix(sidebar): address account menu review findings

* feat(billing): Cloudflare Worker for Stripe checkout, portal, webhooks, entitlements and usage (#7)

Test-mode-only foundation for paid Orca plans: hosted Checkout/Portal,
signed + idempotent Stripe webhooks that re-read subscriptions, a D1 ledger
for sandbox usage with overage-only Billing meter events, and entitlement
checks for the desktop and the sandbox control plane.

* feat(billing): Plan & billing in the Orca account settings and account menu (#9)

Shows the signed-in account's plan, sandbox hours used and left, and opens
hosted Stripe Checkout (Upgrade) or the Customer Portal (Manage billing) in
the browser. Main mints a short-lived billing token from Orca Cloud auth and
only opens checkout.stripe.com / billing.stripe.com URLs. Hidden until
ORCA_BILLING_API_URL is set; the account menu item is gated on the 'billing'
cloud capability and registers through a local adapter that mirrors the
upcoming account menu API.

* feat(billing): plans and prices from config, opt-in Stripe Tax, real account menu

- Worker: BILLING_PLANS JSON overrides the plan catalog (labels, display price,
  hours, limits); entitlements return the plan list so the desktop shows no
  hardcoded prices. STRIPE_AUTOMATIC_TAX=true adds automatic_tax and tax id
  collection to Checkout (default off). Setup script takes prices from env.
- Desktop: register Plan & billing through the sidebar account menu
  (merged nwparker/sidebar-account-menu) and drop the local adapter.
- Register the billing Worker's tests with the test-runner check.

* feat(billing): Team pricing, opt-in overage, Stripe test-mode e2e, dev deploy (#18)

* feat(billing): Team-only pricing, opt-in overage with spend cap, live Stripe test-mode e2e

- Catalog: Team $50/seat/mo or $480/seat/yr, 60 Standard h/seat/month pooled
  (monthly windows on annual plans), Large 2x, 3 running/seat, 15-min idle sleep;
  Enterprise is contact-only. All numbers/labels in BILLING_PLANS defaults.
- Overage is opt-in (adds the metered item), $0.75/h, monthly spend cap (default
  $25, admin-raisable) enforced in the meter outbox; 80%/100% usage warnings.
- Checkout: plan/interval/seats with adjustable quantity; portal configuration var.
- Workers reject fetch redirect 'error': use 'manual'. Log route errors.
- scripts/stripe-test-setup.ts creates the test catalog + portal configuration;
  scripts/e2e-test-mode.ts drives Checkout (headless, test card), overage, meter,
  cap, annual, test-clock renewal, payment failure and cancel.
- Desktop: Team/Enterprise cards with interval + seats, usage warnings, overage
  toggle + cap; split into copy/offers/usage modules.

* feat(billing): dev deployment config, dev operator keys, return page

- wrangler.dev.jsonc for orca-billing-dev (workers.dev, dev D1, test-mode prices).
- BILLING_DEV_JWKS (issuer orca-billing-dev-test) accepted only when BILLING_ENV
  is not prod, for e2e runs until auth mints billing tokens.
- GET /return: static 'return to Orca' page for Checkout/Portal redirects.
- Design doc: final pricing, dev URL and resources for the control plane.

* feat(billing): team seats follow membership, payment grace + suspend signal, Team UI

Worker
- Seats = org members from Orca Cloud auth (single source of truth; pending invites
  never count; min 1): auth pushes POST /v1/internal/seats, billing pulls
  /v1/internal/billing/org-members at Checkout and in a reconcile cron, fails closed
  (503) if auth is configured but unreachable. No token claim carries a count.
- Proration: adds always_invoice, removals create_prorations (Stripe default).
- Billing admin actions require a token minted in the last 6 minutes.
- Payment failure: past_due_since (migration 0003); new starts stop at once;
  after 96 h (paymentGraceHours) reason payment_grace_expired + suspendRunning on
  check/usage, and GET /v1/internal/suspensions for the control plane.
- Portal config: monthly<->annual + cancel only (seats follow membership).
- e2e: seat add/remove proration, grace expiry -> suspend -> pay -> resume.

Desktop
- Team section + account menu item: members/roles, invite, change role, remove
  with confirm, revoke invites (owners/admins, auth role rules mirrored).
- Payment issue banner with suspension date and Update payment method.

* feat(billing): in-app plans page (#22)

A pricing/plans page reachable from the account menu ("Plan & billing"), the
Settings plan section ("Choose a plan" / "Compare plans"), and any upsell via
openPlansPage(). Everything comes from the billing service's offers: Team
monthly/annual (with the computed annual saving), pooled hours, Large weight,
concurrency, idle sleep, opt-in overage with spend cap, and Enterprise contact.

- States: choose (admin), locked (member), current plan with usage, payment
  failure (status-first), checkout in progress, loading and failure with retry.
- Seats are read-only: one per team member (billing re-reads the count).
- Shared card shell keeps both cards' footers level; sliding interval toggle and
  price fade respect reduced motion; dialog opens without a pre-focused button.
- Worker offers gain per-seat cents and the Large weight for totals.
- Copy matches the marketing /cloud promises: agents keep running, wake in
  seconds, secrets never stored in the VM.

* wip(cloud): Orca Cloud built-in provider wiring

* feat(cloud): no-plan upsell opens the plans page

* feat(cloud): Orca Cloud dogfood fixes (provider persistence, picker label, any-input activity, idle override)

* fix(cloud): live dogfood fixes (snapshot already-deleted, agent egress wildcards, golden image id) + results

* fix(cloud): i18n keys, typed dev JWK, verdict typing

* feat(cloud): billing caps from billing (maxConcurrentSandboxes, per-member), userId on usage; concurrency copy

* feat(cloud): golden image can pin a released orca-server tarball (--release), source build stays the fallback

* fix(cloud): async dev key read, runtime localization catalog
2026-11-09 02:59:02 -08:00
Neil 576b4684f7 feat(billing): peak-seat billing and abuse limits (#25)
- Seats billed = the period's peak membership: adds above paid seats are charged now
  (always_invoice); removals never credit mid-period and only lower the quantity inside
  seatTrueDownHours of renewal (proration none), so remove/re-add churn can't dodge or
  double-charge. The cron applies deferred decreases from the last pushed count.
- Included hours and caps come from billed seats; per-member concurrency cap
  (member_concurrency_limit); usage attributed to the member who started it.
- Start check returns billed `seats` and the derived caps for the control plane.
- Desktop shows when paid seats drop at renewal; proration copy updated.
- Design doc: seat-fairness decision with the GitHub/Cursor/Slack/Linear comparison.
2026-11-09 02:34:43 -08:00