Commit Graph
21310 Commits
Author SHA1 Message Date
Neil d5ea304eaf Merge pull request #262 from nwparker/cloud/w6-spec-ui
feat(cloud): agent-accounts W6 UI: panel Cloud sections 2–3, S2 build-sheet Secrets, S4-b secret request card
2026-11-10 06:38:12 -08:00
Neil bccca5434f Merge pull request #266 from nwparker/cloud/np4-trial-e2e
fix(billing): e2e customer lookup after the trial path (#248)
2026-11-10 06:31:53 -08:00
Neil 48efa11c33 chore(i18n): drop unreferenced secretRequest.help 2026-11-10 06:30:39 -08:00
Neil 264ac40bcb fix(billing): e2e keeps each org's Stripe email (customer lookup), trial check uses it 2026-11-10 06:30:39 -08:00
Neil 4023b34ff3 Merge pull request #265 from nwparker/np4/setup-trial-port
NP-4: setup sessions grant the one-time trial (TrialPort → trial.ts)
2026-11-10 06:30:22 -08:00
Neil 5a877a01d7 feat(billing): setup sessions use the one-time trial (N11) through the TrialPort
A team that setup creates or picks gets the trial when it binds, with the email,
GitHub user and ip abuse keys. Teams that can't get one go through T3 and
Checkout.
2026-11-10 06:27:45 -08:00
Neil 7c5c00331f Merge pull request #263 from nwparker/fix/billing-usage-alert-refresh
fix(billing): timely usage alerts — re-read on cloud create/wake and every 30 min while running
2026-11-10 06:26:22 -08:00
Neil e9ea1cf04f Merge pull request #261 from nwparker/np4/github-row-fixture
NP-4: GitHub setup row component + D1–D3 fixtures
2026-11-10 06:24:49 -08:00
Neil 3ce99fa03b fix(cloud): design-squad sign-off fixes: no section numbers, pre-save helper copy 2026-11-10 06:23:27 -08:00
Neil 23d4f566a7 Merge pull request #248 from nwparker/cloud/np4-trial
feat(billing): one-time Orca Cloud trial (N11) + trial surfaces (T1)
2026-11-10 06:22:38 -08:00
Neil 3d111a3908 test(billing): pass the locale to accountMenuUsageLines (usage-alerts signature) 2026-11-10 06:20:22 -08:00
Neil 51ace4d05f feat(billing): one-time Orca Cloud trial (N11) and its desktop surfaces (T1)
Billing Worker:
- trials + trial_claims (migration 0005): 2 sandbox hours per new team, no card, no Stripe.
- POST /v1/billing/trial grants it (idempotent, any member); grantTrial/trialOffer exported for
  the setup session. offers.trial on GET entitlements only when this caller could still claim it.
- Abuse limits: once per team, Orca user, normalized verified email, GitHub user (token claim)
  and GitHub owner (POST /v1/internal/trial/github from the binding; a reused identity revokes),
  disposable-domain blocklist, 3 grants per IP per day. Keys stored as SHA-256 hashes.
- Entitlement trial {includedSeconds, usedSeconds, remainingSeconds, exhausted}; metered from
  usage_events, concurrency 1, never overage; trial_used_up (suspendRunning) / trial_unavailable.
- Any subscription ends the trial; unused trial hours lapse.
- e2e: trial path (grant, no Stripe customer, concurrency, metering to used up, once per user,
  plan ends it) with cleanup of the run's abuse keys.

Desktop: trial_used_up / trial_unavailable classify as 'plan'; copy in billing, phone and CLI;
"Trial" badge, TrialPlanSummary in Plan & billing and the plans page strip, account menu row
"Trial · {{count}} sandbox hours left" (Choose plan for owners/admins); billingClaimTrial IPC
and claimOrcaCloudTrial() for the composer.
2026-11-10 06:20:22 -08:00
Neil 5521a3cf5a fix(cloud): GitHub setup row uses the panel's stacked row layout (design-squad) 2026-11-10 06:20:18 -08:00
Neil a5814d3596 feat(cloud): GitHub setup row component + D1-D3 fixtures (NP-4) 2026-11-10 06:19:21 -08:00
Neil 1512050634 Merge pull request #259 from nwparker/np4/github-idp-bind
NP-4 N5: bind GitHub installs by the Orca sign-in's GitHub identity (skip Authorize)
2026-11-10 06:17:09 -08:00
Neil 1b2cfb9c7d fix(billing): re-read usage on cloud create/wake and every 30 min while one runs
Usage alerts only fired on a billing read, so a team crossing 75/90/100% mid-session
wasn't alerted until a restart, a team switch or opening a billing view. Main now owns one
app-wide schedule: the hosted recipe's onReady (create and resume success) asks the main
window for a forced billing re-read, and the session registry's sync (already run on every
lifecycle change and on the existing 30 s beat) reports whether any cloud workspace is
running, which drives a 30-minute poll with no timer of its own. Requests go only to the
trusted main window so extra windows never stack reads; the per-level ledger still dedupes.
2026-11-10 06:15:39 -08:00
Neil ea1f1a43cf fix(cloud): plain chips instead of restyled Badge (shadcn no-restyle) 2026-11-10 06:14:58 -08:00
Neil 91e82b870d feat(sandbox-control): bind a GitHub install by the Orca sign-in's GitHub identity (N5/O3)
Billing's setup chain now passes the GitHub identity that Orca Cloud auth
verified from a GitHub sign-in (githubUserId, githubLogin). The install URL's
signed state carries it, and the setup URL checks it against the installation
with the App's own credentials: the user's own account, or an active org admin
(members:read installation token). A match binds with method 'idp' and skips
GitHub's separate Authorize page. Anything else falls back to the OAuth step
(A4b) as before.
2026-11-10 06:14:02 -08:00
Neil 9b1754a6d7 Merge remote-tracking branch 'private/cloud/integration' into cloud/w6-spec-ui
# Conflicts:
#	src/renderer/src/i18n/locales/en.json
2026-11-10 06:12:10 -08:00
Neil dcf27604c8 Merge pull request #255 from nwparker/np4/setup-session
NP-4: cloud setup session (N1), team-first Checkout (N4/O1), desktop one-tab setup
2026-11-10 06:10:25 -08:00
Neil d90bb54f7f feat(cloud-setup): poll at once on the orca://cloud/setup/return link (np4-shell N9) 2026-11-10 06:07:36 -08:00
Neil d2c04a28a5 test(cloud-setup): no type assertions in setup tests 2026-11-10 06:07:36 -08:00
Neil 4a20c765b0 fix(cloud-setup): narrow the sign-in failure result 2026-11-10 06:07:36 -08:00
Neil 33950fa436 feat(cloud-setup): desktop side of the one-tab setup session (N1), team-first plans (O1)
- Signed out, Set up and start opens one tab. The authorize page shows the
  setup account step (A2). Once the code is exchanged, the loopback holds the tab,
  creates the billing setup session and 302s the same tab into the setup pages.
- Signed in, the session is created and its start URL is opened.
- IPC: orcaProfiles.cloudSetupStart / cloudSetupGet / cloudSetupLink (Copy setup
  link mints a fresh one-time link).
- Renderer: cloud-setup-session.ts polls the session (2 s for 3 min, then 10 s),
  keeps a snapshot for the composer and tracker, and switches the profile to the
  team setup chose.
- Plans dialog: Checkout joins the open setup session. A personal account
  (409 team_required) goes through setup instead, which makes or picks a team
  first.
- Billing: POST /v1/cloud-setup/sessions/:id/link.
2026-11-10 06:07:35 -08:00
Neil c14d5856f2 feat(billing): cloud setup sessions (N1) and team-first Checkout (N4/O1)
Setup session API on the billing Worker: the desktop creates a session after
sign-in and polls its steps (account, team, plan/trial, github); the setup pages
on Orca Cloud auth redeem a one-time browser ticket, bind the team (granting the
trial through a port np4-trial's module plugs into), open Checkout that returns
to the setup pages, and ask the control plane for the GitHub install URL. The
control plane flips the GitHub step via POST /v1/internal/cloud-setup/github.

Checkout now refuses personal accounts with 409 team_required: a user: plan
could never move to a team later.
2026-11-10 06:07:27 -08:00
Neil a5859bdfdc fix(cloud): W6 UI review round 2: replay pruning on ready, Dismiss focus, F6 scope, split-group visibility, lint 2026-11-10 06:07:25 -08:00
Neil 41d8bbf98d Merge pull request #243 from nwparker/cloud/usage-alerts
feat(billing): usage alerts for owners and admins at 75/90/100%
2026-11-10 06:05:30 -08:00
Neil 055428b381 feat(billing): dedicated 100% usage alert copy by overage state (design-squad) 2026-11-10 06:03:44 -08:00
Neil 6273ed88fe fix(billing): async ledger I/O behind a queue; no casts in usage alerts 2026-11-10 06:03:44 -08:00
Neil 6a8f8b2b0f test(billing): type the usage-alert show mock 2026-11-10 06:03:44 -08:00
Neil 7f5e6a9af3 feat(billing): alert owners and admins at 75/90/100% of sandbox hours
- Desktop notification (title "Orca Cloud", body reuses the in-app usage sentence) when a
  billing read crosses 75, 90 or 100%, once per level per account and billing period. Main
  owns the ledger (userData/orca-billing-usage-alerts.json), so reloads, re-renders and
  second windows never repeat it; a new period starts over. Members are never notified.
- Click opens Settings > Orca account (Plan & billing) via ui:openSettings with a target.
- The in-app usage notice (account menu, billing panel, plans page) is now owners/admins only.
- Billing panel: muted note under the Overage description that owners and admins are alerted
  at 75%, 90% and 100%.
- Fixtures: account menu at 90% (admin and member), billing panel member at 90%.
2026-11-10 06:03:44 -08:00
Neil 95bb1dd372 Merge pull request #249 from nwparker/cloud/w6-a9-recipe
A9 sign-out before delete + recipe env-forwarding warning (P-4)
2026-11-10 06:03:08 -08:00
Neil cd9f2b55ee Merge pull request #257 from nwparker/np4-shell-tracker
feat(cloud-start): setup return link, setup telemetry, X1 error model, B2 team-plans lookup (NP-4)
2026-11-10 05:59:37 -08:00
Neil 99c52ba889 Merge remote-tracking branch 'private/cloud/integration' into cloud/w6-a9-recipe
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-10 05:53:41 -08:00
Neil aac87b9446 fix(cloud-start): parse setup errors without type assertions 2026-11-10 05:50:29 -08:00
Neil 21ac87b972 feat(cloud-start): setup return link, setup telemetry, X1 error model, B2 team-plans lookup (NP-4)
- N9: orca://cloud/setup/return?session=cs_… is routed (open-url + second
  instance), validated, focuses Orca and fans out to renderer listeners
  (onCloudSetupReturn) so the setup session re-reads at once.
- N10: cloud_setup_step_{started,done,failed}, cloud_setup_first_sandbox and
  cloud_setup_plan_chosen, enum-only, derived from the setup rows.
- X1: setup error kinds (timed_out, checkout_canceled, bank_step,
  trial_unavailable, team_create_failed, wrong_account) and their actions.
- B2: billing POST /v1/billing/team-plans returns other teams' plan state with
  the caller's own token; auth confirms membership from that token (no new
  credential). Desktop IPC billingTeamPlans + useSwitchToPlannedTeam. The team
  switch logic moves out of SidebarTeamSubmenu so the composer can reuse it.
2026-11-10 05:50:29 -08:00
Neil 0606c25105 Merge pull request #250 from nwparker/cloud/w6-codex-broker
feat(sandbox-control): Codex account broker (contract D11, flag S2)
2026-11-10 05:49:20 -08:00
Neil 5b8bc2d479 Merge pull request #244 from nwparker/cloud/agents-a6-design
fix(cloud): A6/DS-02 design follow-ups (Save to your Orca account rows, catalog names, cloud build-sheet fixture, DS-33 hint)
2026-11-10 05:47:28 -08:00
Neil 732c04ddd7 Merge remote-tracking branch 'private/cloud/integration' into cloud/w6-a9-recipe
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-10 05:43:06 -08:00
Neil 7fa51b6a0b Merge pull request #246 from nwparker/np4/github-repo-access
NP-4: GitHub repo access, preselected install URLs, install requests, webhook auto-start, repository list (N2/N3/N12, D2/D3)
2026-11-10 05:42:57 -08:00
Neil 86c1726454 fix(w8): DS-27 polish: share-link sign-in uses the centred state layout (Cloud, title, sentence, Sign in button); asleep host uses Cloud + hollow asleep dot instead of Moon (DS-38 parity) (#258) 2026-11-10 05:41:34 -08:00
Neil e897152ec4 fix(cloud): W6 UI review round 1: S4-b focus/F6, collapse, Details hook, routing, replay, shared copy 2026-11-10 05:38:20 -08:00
Neil 4c1ee40ffe Merge remote-tracking branch 'private/cloud/integration' into cloud/w6-codex-broker
# Conflicts:
#	cloud/apps/sandbox-control/image/vm-scripts.generated.ts
2026-11-10 05:32:29 -08:00
Neil 4620815e04 fix(cloud): DS-02 sign-off fixes: saved row drops 'only on this computer', a failed row's only action is Try again, the variable sits on its own line; Agent API keys scope note
Per design-squad on #244. The Agent API keys editor gets one muted line under the host scope choice,
'Not used in Orca Cloud. Save a key to your Orca account to use it in cloud workspaces.', instead of
changing #40303's own label.
2026-11-10 05:32:00 -08:00
Neil d6e36a9c38 merge integration 2026-11-10 05:31:24 -08:00
Neil 825bb88484 Merge pull request #256 from nwparker/cloud/agents-opencode-nocreds
fix(cloud): OpenCode with no credentials shows 'Connect a provider' instead of failing
2026-11-10 05:30:33 -08:00
Neil 4114eea5d0 fix(cloud): show the delete sign-out line only when the running sandbox holds a CLI login (D14) 2026-11-10 05:28:37 -08:00
Neil fed130d30a feat(cloud): orcad reports its build; desktop flags out-of-range version skew with a cloud workspace (#254)
* feat(cloud): orcad reports its build commit; desktop flags out-of-range version skew with a cloud workspace

* review: shared compat verdict, status role, retries, tests, version-skew runbook section

* fix: lint gates (async commit read, no casts, retry outside effect, surface split)

* test(cloud): status panel error action is Try again (DS-13 copy)
2026-11-10 05:27:55 -08:00
Neil 849a12773b fix(cloud): find agent CLIs in /opt/orca/tools/bin; delete note only for running sandboxes; test retry skip
Verified on a dev sandbox (Claude Code 2.1.319, codex-cli 0.166.0): runCommand runs as ubuntu with
HOME=/vercel (same user as orcad); `claude auth logout` and `codex logout` exist and exit 0; the
script reported {loggedOut:2,left:0}, removed both credential files and kept other ~/.claude.json keys.
2026-11-10 05:27:41 -08:00
Neil 5b9d2735e0 fix(cloud): OpenCode with no credentials shows 'Connect a provider' instead of failing on Copilot or Zen
With nothing configured, OpenCode picked its GitHub Copilot provider (GITHUB_TOKEN is the workspace
GitHub App stand-in: 'Authorization header is badly formatted') or OpenCode Zen (opencode.ai is not
on the egress allowlist). The VM seeding keeps both in OpenCode's disabled_providers unless the user
connected them in OpenCode (auth.json); the user's own list is kept (ledger of what Orca added).
Checked on a dev VM: the composer opens on 'Connect a provider'.
2026-11-10 05:23:31 -08:00