Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
feat(spaces): "remote hours" everywhere users see it; self-hosting under Settings → Advanced (#5461)
Francesco Bonaccib9f1874ba871
diff --git a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/ThisMachineView.swift b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/ThisMachineView.swiftindex f6d58c0c1d..2c229c79fe 100644--- a/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/ThisMachineView.swift+++ b/apps/cua-spaces-macos/Sources/CuaSpacesMacKit/Views/ThisMachineView.swift@@ -354,14 +354,8 @@ struct HostFormView: View {// Wraps: the lede says what the chosen option does.Text(v.lede).foregroundStyle(.secondary).fixedSize(horizontal: false, vertical: true)ForEach(v.fields.filter { !$0.advanced }, id: \.id) { field($0) }- Button {- host.send(.toggleAdvanced)- } label: {- Label(v.advancedLabel, systemImage: v.advancedOpen ? "chevron.down" : "chevron.right")- }- .buttonStyle(.plain)- .foregroundStyle(.secondary)- .accessibilityIdentifier("host-advanced")+ // Self-hosting (Direct, your own relay) opens only from+ // Settings → Advanced: no toggle here.ForEach(v.fields.filter(\.advanced), id: \.id) { field($0) }if let failure = host.setupFailure {HostSetupFailureView(failure: failure, retrying: v.busy) {diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/DevicesTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/DevicesTests.swiftindex c85905488b..aabdfbe768 100644--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/DevicesTests.swift+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/DevicesTests.swift@@ -252,8 +252,8 @@ struct RelayUsageTests {let (m, _) = model(FixtureDevices())await m.readRelayUsage()let view = try #require(m.relayUsageView)- #expect(view.label == "Relay usage")- #expect(view.line == "Live sessions 1 of 2 \u{b7} Relay hours 6.5 of 20 this month")+ #expect(view.label == "Remote use")+ #expect(view.line == "Live sessions 1 of 2 \u{b7} Remote hours 6.5 of 20 this month")#expect(view.plan == "Free plan")#expect(m.relayNotice == nil)}@@ -264,7 +264,7 @@ struct RelayUsageTests {let (m, defaults) = model(fixture)await m.readRelayUsage()let notice = try #require(m.relayNotice)- #expect(notice.text == "You've used your free relay allowance for this month. Your Spaces keep working. Pro gives you more.")+ #expect(notice.text == "You've reached the free plan's remote limit for this month. Your Spaces keep working. Pro gives you more.")#expect(notice.upgrade == "Upgrade")#expect(notice.upgradeUrl == "https://app.cua.ai/buy/pro?from=app_meter")#expect(notice.level == "limit")@@ -292,7 +292,7 @@ struct RelayUsageTests {await m.readRelayUsage()let notice = try #require(m.relayNotice)#expect(notice.level == "warn")- #expect(notice.text == "You've used 16.5 of 20 relay hours this month. Nothing stops at the limit. Pro gives you 200 hours and 5 live sessions.")+ #expect(notice.text == "You've used 16.5 of 20 remote hours this month. Nothing stops at the limit. Pro gives you 200 hours and 5 live sessions.")#expect(notice.upgradeUrl == "https://app.cua.ai/buy/pro?from=app_meter")#expect(notice.dismissKey == "2026-10:warn")}diff --git a/apps/cua-spaces-web/src/__tests__/settings-advanced.test.tsx b/apps/cua-spaces-web/src/__tests__/settings-advanced.test.tsxnew file mode 100644index 0000000000..83a6e71ed4--- /dev/null+++ b/apps/cua-spaces-web/src/__tests__/settings-advanced.test.tsx@@ -0,0 +1,72 @@+// SPDX-License-Identifier: FSL-1.1-MIT+// Copyright (c) 2026 Cua AI, Inc.++// Remote hours and self-hosting in Settings, on the real routes and the wasm+// core: the Free plan card says what remote hours are; your own relay (or a+// direct connection) is only under Advanced, collapsed, and opens host+// setup's form for it. Setup elsewhere offers Cua's relay alone.++import { cleanup, fireEvent, waitFor } from "@testing-library/react";+import { afterEach, describe, expect, it } from "vitest";++import { demoRelayUsage } from "@/bridge/adapters/demo/relay-usage";+import { wasmBuilt } from "@/bridge/__tests__/testCore";+import { mountApp, stubBrowserApis, type TestHost } from "./app-harness";++afterEach(() => {+ cleanup();+ localStorage.clear();+});+stubBrowserApis();++const host: TestHost = {+ failsCreates: false,+ listsGhost: false,+ answer: (op, out) => (op === "relay.usage" ? { ...demoRelayUsage(), liveSessions: 0 } : op === "agents.runs" ? [] : out),+};++describe.skipIf(!wasmBuilt)("remote hours and self-hosting in Settings (real routes, wasm core)", () => {+ it("says what remote hours are where they first show", async () => {+ const { router } = await mountApp("/settings", host);+ await router.load();+ const card = await waitFor(() => {+ const el = document.querySelector("[data-plan-card]");+ expect(el).toBeTruthy();+ return el as HTMLElement;+ });+ expect(card.textContent).toContain(+ "Remote hours: time spent using your computers from somewhere else (your laptop, phone or an agent on another computer). Using a computer from itself is free.",+ );+ expect(document.querySelector("[data-relay-usage]")?.textContent).toContain("Remote use");+ expect(document.body.textContent).not.toMatch(/relay hours/i);+ });++ it("keeps your own relay under Advanced, collapsed, for self-hosting teams", async () => {+ const { router } = await mountApp("/settings", host);+ await router.load();+ const section = await waitFor(() => {+ const el = document.querySelector("[data-settings-advanced]");+ expect(el).toBeTruthy();+ return el as HTMLElement;+ });+ expect(section.getAttribute("data-settings-advanced")).toBe("closed");+ expect(document.body.textContent).not.toContain("Your own relay");+ fireEvent.click(section.querySelector("button")!);+ const row = await waitFor(() => {+ const el = section.querySelector("[data-self-hosting]");+ expect(el).toBeTruthy();+ return el as HTMLElement;+ });+ expect(row.textContent).toContain("For self-hosting teams");+ fireEvent.click(row.querySelector("button")!);+ const form = await waitFor(() => {+ const el = section.querySelector("[data-host-form]");+ expect(el).toBeTruthy();+ return el as HTMLElement;+ });+ expect(form.getAttribute("data-host-advanced")).toBe("open");+ expect(form.querySelector("[data-host-lede]")?.textContent).toMatch(/^For self-hosting teams/);+ expect(form.querySelector('[data-host-field="relay"]')).toBeTruthy();+ expect(form.querySelector('[data-host-field="direct"]')).toBeTruthy();+ });+});diff --git a/apps/cua-spaces-web/src/__tests__/upsell.test.tsx b/apps/cua-spaces-web/src/__tests__/upsell.test.tsxindex 8ee2743c33..e280c9ba2f 100644--- a/apps/cua-spaces-web/src/__tests__/upsell.test.tsx+++ b/apps/cua-spaces-web/src/__tests__/upsell.test.tsx@@ -69,7 +69,7 @@ describe.skipIf(!wasmBuilt)("in-app Pro and Teams prompts (real routes, wasm cor});expect(card.getAttribute("data-plan-card")).toBe("free");expect(card.textContent).toContain("Free plan");- expect(card.textContent).toContain("2 live sessions and 20 relay hours a month");+ expect(card.textContent).toContain("2 live sessions and 20 remote hours a month");fireEvent.click(card.querySelector("[data-plan-primary]")!);fireEvent.click(card.querySelector("[data-plan-secondary]")!);await waitFor(() => expect(opened).toEqual(["https://app.cua.ai/buy/pro?from=app_plan_card", "https://app.cua.ai/buy/teams?from=app_plan_card"]));@@ -115,7 +115,7 @@ describe.skipIf(!wasmBuilt)("in-app Pro and Teams prompts (real routes, wasm corexpect(el).toBeTruthy();return el as HTMLElement;});- expect(prompt.textContent).toContain("Two machines now. Free includes 2 live sessions and 20 relay hours a month. Pro makes it 5 and 200, for $18 a month.");+ expect(prompt.textContent).toContain("Two machines now. Free includes 2 live sessions and 20 remote hours a month. Pro makes it 5 and 200, for $18 a month.");await waitFor(() => expect(features(tracked)).toContain("upsell_machine_shown"));fireEvent.click(document.querySelector("[data-upsell=machine] [data-upsell-cta]")!);await waitFor(() => expect(opened).toEqual(["https://app.cua.ai/buy/pro?from=app_machine"]));diff --git a/apps/cua-spaces-web/src/bridge/__tests__/core.test.ts b/apps/cua-spaces-web/src/bridge/__tests__/core.test.tsindex de135c47f2..f403a6380f 100644--- a/apps/cua-spaces-web/src/bridge/__tests__/core.test.ts+++ b/apps/cua-spaces-web/src/bridge/__tests__/core.test.ts@@ -276,8 +276,6 @@ describe.skipIf(!wasmBuilt)("with the wasm core", () => {["name", false],["profile", false],["allow", false],- ["direct", true],- ["relay", true],]);expect(hostSetupGuide(noCore)).toMatchObject({ form: null, choices: guide.choices, intro: guide.intro });});diff --git a/apps/cua-spaces-web/src/bridge/__tests__/relay-usage.test.tsx b/apps/cua-spaces-web/src/bridge/__tests__/relay-usage.test.tsxindex cd555112cd..f33aab5040 100644--- a/apps/cua-spaces-web/src/bridge/__tests__/relay-usage.test.tsx+++ b/apps/cua-spaces-web/src/bridge/__tests__/relay-usage.test.tsx@@ -55,12 +55,12 @@ describe("relay.usage", () => {it.skipIf(!wasmBuilt)("the row and the notice are the core's words", async () => {const core = await testCore();const free = relayUsageView(core, demoRelayUsage())!;- expect(free).toMatchObject({ label: "Relay usage", line: "Live sessions 1 of 2 · Relay hours 6.5 of 20 this month", plan: "Free plan", notice: null });+ expect(free).toMatchObject({ label: "Remote use", line: "Live sessions 1 of 2 · Remote hours 6.5 of 20 this month", plan: "Free plan", notice: null });expect(free.planCard).toMatchObject({ plan: "free", label: "Free plan", primary: { label: "Get Pro", url: "https://app.cua.ai/buy/pro?from=app_plan_card" }, secondary: { label: "Start a team", url: "https://app.cua.ai/buy/teams?from=app_plan_card" } });const past = relayUsageView(core, { ...demoRelayUsage(), hoursUsed: 20.24, softLimitReached: true, reasons: ["hours"], team: { id: "acme", seats: 3 } })!;- expect(past.line).toBe("Live sessions 1 of 2 · Relay hours 20.2 of 20 this month · Team pool, 3 seats");+ expect(past.line).toBe("Live sessions 1 of 2 · Remote hours 20.2 of 20 this month · Team pool, 3 seats");expect(past.notice).toEqual({- text: "You've used your free relay allowance for this month. Your Spaces keep working. Pro gives you more.",+ text: "You've reached the free plan's remote limit for this month. Your Spaces keep working. Pro gives you more.",upgrade: "Upgrade",upgradeUrl: "https://app.cua.ai/buy/pro?from=app_meter",dismiss: "Dismiss",diff --git a/apps/cua-spaces-web/src/bridge/derive.ts b/apps/cua-spaces-web/src/bridge/derive.tsindex 6b536b2755..b8e290eb58 100644--- a/apps/cua-spaces-web/src/bridge/derive.ts+++ b/apps/cua-spaces-web/src/bridge/derive.ts@@ -567,15 +567,15 @@ export interface HostSetupGuide {intro: string;/** The ways to set it up (`host::setup_choices`). */choices: HostSetupChoice[];- /** The setup form with Advanced open (`host.formView`), when the core is loaded. */+ /** The setup form (`host.formView`), when the core is loaded. */form: HostFormView | null;}export function hostSetupGuide(core: CoreClient): HostSetupGuide {const panel = hostPanel(core, { configured: false, sharing: false, service: { installed: false, running: false, kind: "process" }, clients: [], permissions: [] });const initial = core.tryCall<unknown>("host.formInitial");- const state = initial === undefined ? undefined : core.tryCall<unknown>("host.formReduce", { state: initial, action: { type: "toggle-advanced" } });- const form = state === undefined ? null : (core.tryCall<HostFormView>("host.formView", { state, identity: null }) ?? null);+ // As setup shows it: Cua's relay. Self-hosting is under Settings → Advanced.+ const form = initial === undefined ? null : (core.tryCall<HostFormView>("host.formView", { state: initial, identity: null }) ?? null);return { intro: panel.intro ?? FALLBACK_INTRO, choices: panel.setupChoices?.length ? panel.setupChoices : FALLBACK_CHOICES, form };}diff --git a/apps/cua-spaces-web/src/bridge/ops/relay-usage.ts b/apps/cua-spaces-web/src/bridge/ops/relay-usage.tsindex 9cfc3113e7..8dbce101b0 100644--- a/apps/cua-spaces-web/src/bridge/ops/relay-usage.ts+++ b/apps/cua-spaces-web/src/bridge/ops/relay-usage.ts@@ -80,9 +80,9 @@ export interface PlanCard {/** `relay_usage::RelayUsageView`: Settings' row and the notice. */export interface RelayUsageView {- /** "Relay usage". */+ /** "Remote use". */label: string;- /** "Live sessions 1 of 2 · Relay hours 6.5 of 20 this month". */+ /** "Live sessions 1 of 2 · Remote hours 6.5 of 20 this month". */line: string;/** "Free plan". */plan: string;diff --git a/apps/cua-spaces-web/src/components/add-machine-dialog.tsx b/apps/cua-spaces-web/src/components/add-machine-dialog.tsxindex 28c19d4072..7a027be716 100644--- a/apps/cua-spaces-web/src/components/add-machine-dialog.tsx+++ b/apps/cua-spaces-web/src/components/add-machine-dialog.tsx@@ -310,7 +310,7 @@ function ManualSteps({ guide, open }: { guide: HostSetupGuide; open: boolean })</Step><Step n={4} title={guide.form ? `Fill in the form and press ${quote(submitLabel(guide.form.submitLabel))}` : "Set it up for access"}>- <p>It connects through the Cua relay, so you don't need to forward ports. Under Advanced you can choose a direct connection instead.</p>+ <p>It connects through the Cua relay, so you don't need to forward ports.</p>{basic.length ? (<dl className="mt-2 divide-y overflow-hidden rounded-lg border bg-card">{basic.map((f) => (diff --git a/apps/cua-spaces-web/src/components/settings/advanced-section.tsx b/apps/cua-spaces-web/src/components/settings/advanced-section.tsxnew file mode 100644index 0000000000..957d41a20f--- /dev/null+++ b/apps/cua-spaces-web/src/components/settings/advanced-section.tsx@@ -0,0 +1,62 @@+// SPDX-License-Identifier: FSL-1.1-MIT+// Copyright (c) 2026 Cua AI, Inc.++import { ChevronDownIcon, ChevronRightIcon } from "lucide-react";+import { useState } from "react";++import { useMachines, useSession, useThisMachine } from "@/bridge";+import { HostSetupForm } from "@/components/this-machine";+import { Button } from "@/components/ui/button";++/** The host form's profile for your own relay or Direct (`host::SELF_HOSTED_PROFILE`). */+const SELF_HOSTED = "self-hosted";++/**+ * Settings → Advanced, collapsed: the only place that offers your own relay+ * or a direct connection. Setup, first run and This machine offer Cua's+ * relay alone. The form is host setup's own, with Advanced open.+ */+export function AdvancedSection() {+ const [open, setOpen] = useState(false);+ const { data: session } = useSession();+ const { data: machines } = useMachines();+ const host = useThisMachine(session?.identity ?? null);+ const form = host.formView?.advancedOpen ? host.formView : null;++ return (+ <section className="mb-7" data-settings-advanced={open ? "open" : "closed"}>+ <button+ type="button"+ aria-expanded={open}+ onClick={() => setOpen(!open)}+ className="mb-2 flex cursor-default items-center gap-1 px-1 text-xs font-semibold text-muted-foreground outline-none hover:text-foreground focus-visible:text-foreground"+ >+ {open ? <ChevronDownIcon className="size-3.5" /> : <ChevronRightIcon className="size-3.5" />}+ Advanced+ </button>+ {open ? (+ form ? (+ <HostSetupForm+ view={form}+ host={host}+ failure={host.setupError}+ progress={machines?.find((m) => m.current)?.hostProgress}+ onRetry={() => void host.retrySetUp()}+ />+ ) : (+ <div className="overflow-hidden rounded-xl border bg-card shadow-xs">+ <div className="flex min-h-12 items-center justify-between gap-6 px-4 py-2.5" data-self-hosting="">+ <div className="min-w-0">+ <div className="text-[13px]">Your own relay</div>+ <p className="mt-0.5 text-xs text-muted-foreground">For self-hosting teams. Connect this computer through a relay you run, or directly.</p>+ </div>+ <Button size="sm" variant="outline" disabled={host.busy} onClick={() => host.openForm(SELF_HOSTED)}>+ Set up…+ </Button>+ </div>+ </div>+ )+ ) : null}+ </section>+ );+}diff --git a/apps/cua-spaces-web/src/components/shell/relay-allowance-notice.test.tsx b/apps/cua-spaces-web/src/components/shell/relay-allowance-notice.test.tsxindex 2d4922aec1..8e20193a29 100644--- a/apps/cua-spaces-web/src/components/shell/relay-allowance-notice.test.tsx+++ b/apps/cua-spaces-web/src/components/shell/relay-allowance-notice.test.tsx@@ -61,7 +61,7 @@ describe.skipIf(!wasmBuilt)("<RelayAllowanceNotice>", () => {const { view, opened } = host(reached);view();const notice = await screen.findByRole("status");- expect(notice.textContent).toContain("You've used your free relay allowance for this month. Your Spaces keep working.");+ expect(notice.textContent).toContain("You've reached the free plan's remote limit for this month. Your Spaces keep working.");fireEvent.click(screen.getByRole("button", { name: "Upgrade" }));await waitFor(() => expect(opened).toEqual(["https://app.cua.ai/buy/pro?from=app_meter"]));});@@ -86,7 +86,7 @@ describe.skipIf(!wasmBuilt)("<RelayAllowanceNotice>", () => {view();const notice = await screen.findByRole("status");expect(notice.getAttribute("data-relay-allowance")).toBe("warn");- expect(notice.textContent).toContain("You've used 16.5 of 20 relay hours this month. Nothing stops at the limit.");+ expect(notice.textContent).toContain("You've used 16.5 of 20 remote hours this month. Nothing stops at the limit.");fireEvent.click(screen.getByRole("button", { name: "Upgrade" }));await waitFor(() => expect(opened).toEqual(["https://app.cua.ai/buy/pro?from=app_meter"]));});diff --git a/apps/cua-spaces-web/src/components/this-machine.tsx b/apps/cua-spaces-web/src/components/this-machine.tsxindex 151ccd90c0..d851ba5a78 100644--- a/apps/cua-spaces-web/src/components/this-machine.tsx+++ b/apps/cua-spaces-web/src/components/this-machine.tsx@@ -256,6 +256,9 @@ export function HostSetupForm({return (<formdata-host-form+ // Advanced (Direct connection, your own relay) is open only when+ // Settings → Advanced opened the form; there is no toggle here.+ data-host-advanced={view.advancedOpen ? "open" : "closed"}onSubmit={(e) => {e.preventDefault();if (view.canSubmit) void host.submit();@@ -268,15 +271,6 @@ export function HostSetupForm({{basic.map((f) => (<Field key={f.id} field={f} host={host} />))}- <button- type="button"- data-host-advanced={view.advancedOpen ? "open" : "closed"}- onClick={() => host.send({ type: "toggle-advanced" })}- className="flex w-full cursor-default items-center gap-1 px-4 py-2.5 text-left text-xs text-muted-foreground outline-none hover:text-foreground focus-visible:text-foreground"- >- {view.advancedOpen ? <ChevronDownIcon className="size-3.5" /> : <ChevronRightIcon className="size-3.5" />}- {view.advancedLabel}- </button>{advanced.map((f) => (<Field key={f.id} field={f} host={host} />))}diff --git a/apps/cua-spaces-web/src/routes/settings/index.tsx b/apps/cua-spaces-web/src/routes/settings/index.tsxindex 2159404738..d1ac23f810 100644--- a/apps/cua-spaces-web/src/routes/settings/index.tsx+++ b/apps/cua-spaces-web/src/routes/settings/index.tsx@@ -21,6 +21,7 @@ import {} from "@/bridge";import { writeSavedOnboarding } from "@/bridge/onboarding";import { SettingsGroup, SettingsRow } from "@/components/settings-group";+import { AdvancedSection } from "@/components/settings/advanced-section";import { AgentsSettingsSection } from "@/components/settings/agents-section";import { CoreSettingsRow, CoreSettingsSection } from "@/components/settings/core-section";import { Button } from "@/components/ui/button";@@ -168,6 +169,8 @@ function CoreGeneralPage({ page }: { page: CorePage }) {<SettingsRow key={b.command} label={COMMAND_LABEL[b.command]} control={<Shortcut spec={b.key} />} />))}</SettingsGroup>++ <AdvancedSection /></>);}@@ -186,7 +189,7 @@ function GlobalShortcutRow({ shortcut }: { shortcut: GlobalShortcut | null | und);}-/** The plan and the relay allowance this month (the core's words), where the host reads it. */+/** The plan and remote use this month (the core's words), where the host reads it. */function RelayUsageRow() {const view = useRelayUsageView();const { openExternal } = useSession();diff --git a/docs/content/docs/cua-cli/reference/cli/index.mdx b/docs/content/docs/cua-cli/reference/cli/index.mdxindex fde8eb8a68..f603520dbd 100644--- a/docs/content/docs/cua-cli/reference/cli/index.mdx+++ b/docs/content/docs/cua-cli/reference/cli/index.mdx@@ -28,7 +28,7 @@ Your Spaces and machines, unattended access on this machine, devices, teams, you| <span id="cua-host"></span><span id="cua-host-setup"></span><span id="cua-host-pair"></span><span id="cua-host-config"></span><span id="cua-host-status"></span><span id="cua-host-stop"></span><span id="cua-host-start"></span><span id="cua-host-share"></span><span id="cua-host-unshare"></span><span id="cua-host-remove"></span>[`cua host`](/cua-cli/reference/cli/spaces-and-computers#cua-host) | Unattended access to this machine (setup, status, stop, start, remove). | [`setup`](/cua-cli/reference/cli/spaces-and-computers#cua-host-setup), [`pair`](/cua-cli/reference/cli/spaces-and-computers#cua-host-pair), [`config`](/cua-cli/reference/cli/spaces-and-computers#cua-host-config), [`status`](/cua-cli/reference/cli/spaces-and-computers#cua-host-status), [`stop`](/cua-cli/reference/cli/spaces-and-computers#cua-host-stop), [`start`](/cua-cli/reference/cli/spaces-and-computers#cua-host-start), [`share`](/cua-cli/reference/cli/spaces-and-computers#cua-host-share), [`unshare`](/cua-cli/reference/cli/spaces-and-computers#cua-host-unshare), [`remove`](/cua-cli/reference/cli/spaces-and-computers#cua-host-remove) || <span id="cua-devices"></span><span id="cua-devices-status"></span><span id="cua-devices-enroll"></span><span id="cua-devices-approve"></span><span id="cua-devices-ls"></span><span id="cua-devices-rename"></span><span id="cua-devices-revoke"></span><span id="cua-devices-audit"></span>[`cua devices`](/cua-cli/reference/cli/spaces-and-computers#cua-devices) | This device as a client of your cua.ai account on the relay: enroll (second factor), approve other devices, list, rename, revoke, and the audit log of who accessed what. | [`status`](/cua-cli/reference/cli/spaces-and-computers#cua-devices-status), [`enroll`](/cua-cli/reference/cli/spaces-and-computers#cua-devices-enroll), [`approve`](/cua-cli/reference/cli/spaces-and-computers#cua-devices-approve), [`ls`](/cua-cli/reference/cli/spaces-and-computers#cua-devices-ls), [`rename`](/cua-cli/reference/cli/spaces-and-computers#cua-devices-rename), [`revoke`](/cua-cli/reference/cli/spaces-and-computers#cua-devices-revoke), [`audit`](/cua-cli/reference/cli/spaces-and-computers#cua-devices-audit) || <span id="cua-team"></span><span id="cua-team-create"></span><span id="cua-team-ls"></span><span id="cua-team-show"></span><span id="cua-team-invite"></span><span id="cua-team-join"></span><span id="cua-team-leave"></span><span id="cua-team-remove-member"></span><span id="cua-team-set-role"></span><span id="cua-team-devices"></span><span id="cua-team-approve"></span><span id="cua-team-deny"></span><span id="cua-team-request"></span><span id="cua-team-add-machine"></span><span id="cua-team-remove-machine"></span><span id="cua-team-audit"></span><span id="cua-team-delete"></span>[`cua team`](/cua-cli/reference/cli/spaces-and-computers#cua-team) | Teams (organizations of your cua.ai account) share machines with every member and their agents. | [`create`](/cua-cli/reference/cli/spaces-and-computers#cua-team-create), [`ls`](/cua-cli/reference/cli/spaces-and-computers#cua-team-ls), [`show`](/cua-cli/reference/cli/spaces-and-computers#cua-team-show), [`invite`](/cua-cli/reference/cli/spaces-and-computers#cua-team-invite), [`join`](/cua-cli/reference/cli/spaces-and-computers#cua-team-join), [`leave`](/cua-cli/reference/cli/spaces-and-computers#cua-team-leave), [`remove-member`](/cua-cli/reference/cli/spaces-and-computers#cua-team-remove-member), [`set-role`](/cua-cli/reference/cli/spaces-and-computers#cua-team-set-role), [`devices`](/cua-cli/reference/cli/spaces-and-computers#cua-team-devices), [`approve`](/cua-cli/reference/cli/spaces-and-computers#cua-team-approve), [`deny`](/cua-cli/reference/cli/spaces-and-computers#cua-team-deny), [`request`](/cua-cli/reference/cli/spaces-and-computers#cua-team-request), [`add-machine`](/cua-cli/reference/cli/spaces-and-computers#cua-team-add-machine), [`remove-machine`](/cua-cli/reference/cli/spaces-and-computers#cua-team-remove-machine), [`audit`](/cua-cli/reference/cli/spaces-and-computers#cua-team-audit), [`delete`](/cua-cli/reference/cli/spaces-and-computers#cua-team-delete) |-| <span id="cua-usage"></span>[`cua usage`](/cua-cli/reference/cli/spaces-and-computers#cua-usage) | Your relay allowance this month: live sessions, relay hours, and your plan. | |+| <span id="cua-usage"></span>[`cua usage`](/cua-cli/reference/cli/spaces-and-computers#cua-usage) | Your remote use this month: live sessions, remote hours, and your plan. | || <span id="cua-spacesd"></span><span id="cua-spacesd-caps"></span><span id="cua-spacesd-exec"></span><span id="cua-spacesd-cp"></span><span id="cua-spacesd-shell"></span><span id="cua-spacesd-targets"></span><span id="cua-spacesd-call"></span>[`cua spacesd`](/cua-cli/reference/cli/spaces-and-computers#cua-spacesd) | Talk to a cua-spacesd directly by URL. | [`caps`](/cua-cli/reference/cli/spaces-and-computers#cua-spacesd-caps), [`exec`](/cua-cli/reference/cli/spaces-and-computers#cua-spacesd-exec), [`cp`](/cua-cli/reference/cli/spaces-and-computers#cua-spacesd-cp), [`shell`](/cua-cli/reference/cli/spaces-and-computers#cua-spacesd-shell), [`targets`](/cua-cli/reference/cli/spaces-and-computers#cua-spacesd-targets), [`call`](/cua-cli/reference/cli/spaces-and-computers#cua-spacesd-call) |### Files, teleport and keysdiff --git a/docs/content/docs/cua-cli/reference/cli/spaces-and-computers.mdx b/docs/content/docs/cua-cli/reference/cli/spaces-and-computers.mdxindex 50f77d6281..3fd12a6c44 100644--- a/docs/content/docs/cua-cli/reference/cli/spaces-and-computers.mdx+++ b/docs/content/docs/cua-cli/reference/cli/spaces-and-computers.mdx@@ -28,7 +28,7 @@ description: "Your Spaces and machines, unattended access on this machine, devic| [`cua spaces relay-register`](#cua-spaces-relay-register) | Publish a Space on the relay for your other devices (a phone off this network): its own driver dials out, as `cua host setup` does for this computer. || [`cua spaces relay-unregister`](#cua-spaces-relay-unregister) | Take a Space off the relay (every share with it ends). || [`cua host`](#cua-host) | Unattended access to this machine (setup, status, stop, start, remove). |-| [`cua host setup`](#cua-host-setup) | Set this machine up for unattended access: install cua-spacesd as a service that joins the cua.ai relay as your account (default) or serves on a direct ip:port. |+| [`cua host setup`](#cua-host-setup) | Set this machine up for unattended access: install cua-spacesd as a service that joins the cua.ai relay as your account. || [`cua host pair`](#cua-host-pair) | Make a one-time code (with a link and the install command) that adds another computer to your account: run the command it prints on that computer. || [`cua host config`](#cua-host-config) | Show or change what this machine shares: its own desktop, and whether it creates Spaces for your other devices. || [`cua host status`](#cua-host-status) | Show whether this machine is set up, the service, and who is connected. |@@ -62,7 +62,7 @@ description: "Your Spaces and machines, unattended access on this machine, devic| [`cua team remove-machine`](#cua-team-remove-machine) | Take a machine off the team. || [`cua team audit`](#cua-team-audit) | The team's audit log. || [`cua team delete`](#cua-team-delete) | Delete a team (owner; cancel its subscription first). |-| [`cua usage`](#cua-usage) | Your relay allowance this month: live sessions, relay hours, and your plan. |+| [`cua usage`](#cua-usage) | Your remote use this month: live sessions, remote hours, and your plan. || [`cua spacesd`](#cua-spacesd) | Talk to a cua-spacesd directly by URL. || [`cua spacesd caps`](#cua-spacesd-caps) | Print capabilities. || [`cua spacesd exec`](#cua-spacesd-exec) | Run a command (argv, no shell). |@@ -97,7 +97,6 @@ Alias: `cua spaces list`.| Flag | Type | Default | Description || --- | --- | --- | --- |-| <span id="cua-spaces-ls--relay"></span>`--relay` | string | | Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production). || <span id="cua-spaces-ls--no-size"></span>`--no-size` | boolean | `false` | Do not measure what each Space takes on this computer's disk (that walk can take a moment with many Spaces). |**Examples**@@ -411,7 +410,7 @@ cua host [OPTIONS] <COMMAND>### `cua host setup`-Set this machine up for unattended access: install cua-spacesd as a service that joins the cua.ai relay as your account (default) or serves on a direct ip:port.+Set this machine up for unattended access: install cua-spacesd as a service that joins the cua.ai relay as your account.```text outputcua host setup [OPTIONS]@@ -419,9 +418,7 @@ cua host setup [OPTIONS]| Flag | Type | Default | Description || --- | --- | --- | --- |-| <span id="cua-host-setup--relay"></span>`--relay` | string | | Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production). || <span id="cua-host-setup--pair"></span>`--pair` | string | | Join with a one-time pairing code (or add-machine link) made in the Cua Spaces app or with `cua host pair`, instead of signing in here. The machine joins the account (or team) that made it. |-| <span id="cua-host-setup--direct"></span>`--direct` | string | | Serve directly on ip:port with a local env token (LAN / port-forwarded) instead of joining a relay. || <span id="cua-host-setup--name"></span>`--name` | string | | Display name (default: the host name). || <span id="cua-host-setup--allow"></span>`--allow` | string | | Also allow this account (id or email). Repeatable. || <span id="cua-host-setup--driver-bin"></span>`--driver-bin` | path | | cua-spacesd binary (default $CUA_SPACESD_BIN, a bundled one, or the release download). |@@ -433,7 +430,6 @@ cua host setup [OPTIONS]| <span id="cua-host-setup--no-desktop"></span>`--no-desktop` | boolean | `false` | Do not share this machine's own desktop (screen, input, shell, files): relayed callers reach only the Spaces it provides. || <span id="cua-host-setup--provide-spaces"></span>`--provide-spaces` | boolean | `false` | Create Spaces for your enrolled devices on this machine's runtimes (Lume macOS VMs, Docker Linux containers). || <span id="cua-host-setup--no-provide-spaces"></span>`--no-provide-spaces` | boolean | `false` | Do not create Spaces for other devices. |-| <span id="cua-host-setup--allow-any-address"></span>`--allow-any-address` | boolean | `false` | With --direct and Spaces: take host calls, and connections to the Spaces this machine forwards, from any address (and allow a public --direct address). By default only loopback, Tailscale and private LAN addresses may. The direct listener is plaintext and its token is a shell on this machine: prefer Tailscale. |**Examples**@@ -445,12 +441,6 @@ cua host setupcua host setup --profile spare --name "Mac mini (spare)"cua host setup --no-desktop --provide-spaces-# Serve on the LAN instead of the relay-cua host setup --direct 0.0.0.0:3211 --name studio-mac--# A spare Mac on your tailnet that runs Spaces, without the relay (prints the command that adds it on your laptop)-cua host setup --direct 100.101.102.103:3211 --profile spare-# Add this machine with a one-time code from the Cua Spaces app (Add a machine) or `cua host pair`: no sign-in needed herecua host setup --pair K7QM-4XPB-2RHD```@@ -469,7 +459,6 @@ cua host pair [OPTIONS]| <span id="cua-host-pair--name"></span>`--name` | string | | Name the machine gets (default: its own host name). || <span id="cua-host-pair--expires"></span>`--expires` | integer | `30` | Minutes until the code expires (1 to 1440). || <span id="cua-host-pair--revoke"></span>`--revoke` | string | | Revoke an unused code by id (`pc_…`). |-| <span id="cua-host-pair--relay"></span>`--relay` | string | | Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production). || <span id="cua-host-pair--no-wait"></span>`--no-wait` | boolean | `false` | With --team: print the code and exit instead of waiting; add the machine later with `cua team add-machine <team> relay:<id>`. || <span id="cua-host-pair--list"></span>`--list` | boolean | `false` | List your codes (used, unused, revoked, expired) instead. |@@ -567,7 +556,6 @@ cua host share [OPTIONS] <WHO>...| Flag | Type | Default | Description || --- | --- | --- | --- || <span id="cua-host-share--machine"></span>`--machine` | string | | Machine id (default: this machine). |-| <span id="cua-host-share--relay"></span>`--relay` | string | | Relay URL (default: the one this machine joined, else $CUA_RELAY_URL / https://relay.cua.ai). || <span id="cua-host-share--yes"></span>`--yes` | boolean | `false` | Do not ask for confirmation. |**Examples**@@ -592,7 +580,6 @@ cua host unshare [OPTIONS] <WHO>...| Flag | Type | Default | Description || --- | --- | --- | --- || <span id="cua-host-unshare--machine"></span>`--machine` | string | | Machine id (default: this machine). |-| <span id="cua-host-unshare--relay"></span>`--relay` | string | | Relay URL. |**Examples**@@ -647,10 +634,6 @@ This device: enrolled, waiting for approval, or not enrolled.cua devices status [OPTIONS]```-| Flag | Type | Default | Description |-| --- | --- | --- | --- |-| <span id="cua-devices-status--relay"></span>`--relay` | string | | Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production). |-**Examples**```bash test="cli-shape" id="ref-cua-devices-status"@@ -668,7 +651,6 @@ cua devices enroll [OPTIONS]| Flag | Type | Default | Description || --- | --- | --- | --- || <span id="cua-devices-enroll--name"></span>`--name` | string | | Display name (default: the host name). |-| <span id="cua-devices-enroll--relay"></span>`--relay` | string | | Relay URL. || <span id="cua-devices-enroll--wait"></span>`--wait` | boolean | `false` | Wait (up to 10 minutes) until an enrolled device approves. |**Examples**@@ -693,7 +675,6 @@ cua devices approve [OPTIONS] [CODE]| Flag | Type | Default | Description || --- | --- | --- | --- || <span id="cua-devices-approve--device"></span>`--device` | string | | Or the device id (`cua devices ls`). |-| <span id="cua-devices-approve--relay"></span>`--relay` | string | | Relay URL. || <span id="cua-devices-approve--yes"></span>`--yes` | boolean | `false` | Do not ask for confirmation. |**Examples**@@ -713,10 +694,6 @@ cua devices ls [OPTIONS]Alias: `cua devices list`.-| Flag | Type | Default | Description |-| --- | --- | --- | --- |-| <span id="cua-devices-ls--relay"></span>`--relay` | string | | Relay URL. |-**Examples**```bash test="cli-shape" id="ref-cua-devices-ls"@@ -737,10 +714,6 @@ cua devices rename [OPTIONS] <ID> <NAME>| `<ID>` | string | required | Device id. || `<NAME>` | string | required | New name. |-| Flag | Type | Default | Description |-| --- | --- | --- | --- |-| <span id="cua-devices-rename--relay"></span>`--relay` | string | | Relay URL. |-**Examples**```bash test="cli-shape" id="ref-cua-devices-rename"@@ -761,7 +734,6 @@ cua devices revoke [OPTIONS] <ID>| Flag | Type | Default | Description || --- | --- | --- | --- |-| <span id="cua-devices-revoke--relay"></span>`--relay` | string | | Relay URL. || <span id="cua-devices-revoke--yes"></span>`--yes` | boolean | `false` | Do not ask for confirmation. |**Examples**@@ -781,7 +753,6 @@ cua devices audit [OPTIONS]| Flag | Type | Default | Description || --- | --- | --- | --- || <span id="cua-devices-audit--limit"></span>`--limit` | integer | `50` | Newest events to show. |-| <span id="cua-devices-audit--relay"></span>`--relay` | string | | Relay URL. |**Examples**@@ -1123,16 +1094,12 @@ cua team delete AIGIS --yes## `cua usage`-Your relay allowance this month: live sessions, relay hours, and your plan. Spaces on your own network use none of it.+Your remote use this month: live sessions, remote hours, and your plan. Remote hours are time spent using your computers from somewhere else; using a computer from itself is free.```text outputcua usage [OPTIONS]```-| Flag | Type | Default | Description |-| --- | --- | --- | --- |-| <span id="cua-usage--relay"></span>`--relay` | string | | Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production). |-**Examples**```bash test="cli-shape" id="ref-cua-usage"diff --git a/libs/cua/crates/cua-cli/src/devices_cmd.rs b/libs/cua/crates/cua-cli/src/devices_cmd.rsindex 03ed7d8110..cc764449b7 100644--- a/libs/cua/crates/cua-cli/src/devices_cmd.rs+++ b/libs/cua/crates/cua-cli/src/devices_cmd.rs@@ -21,7 +21,7 @@ pub enum DevicesCmd {cua devices status")]Status {/// Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production).- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},/// Enroll this device. Right after a fresh `cua auth login` it enrolls@@ -39,7 +39,7 @@ pub enum DevicesCmd {#[arg(long)]wait: bool,/// Relay URL.- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},/// Approve a new device (or re-verify an expired one) from this@@ -58,7 +58,7 @@ pub enum DevicesCmd {#[arg(long)]yes: bool,/// Relay URL.- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},/// Your devices and their state.@@ -70,7 +70,7 @@ pub enum DevicesCmd {)]Ls {/// Relay URL.- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},/// Rename a device.@@ -82,7 +82,7 @@ pub enum DevicesCmd {/// New name.name: String,/// Relay URL.- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},/// Revoke a device: it can no longer list or reach your machines.@@ -95,7 +95,7 @@ pub enum DevicesCmd {#[arg(long)]yes: bool,/// Relay URL.- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},/// Who accessed what, and when: enrollments, device sessions, machine@@ -108,7 +108,7 @@ pub enum DevicesCmd {#[arg(long, default_value_t = 50)]limit: usize,/// Relay URL.- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},}diff --git a/libs/cua/crates/cua-cli/src/host.rs b/libs/cua/crates/cua-cli/src/host.rsindex d370d08a39..0f8a38812a 100644--- a/libs/cua/crates/cua-cli/src/host.rs+++ b/libs/cua/crates/cua-cli/src/host.rs@@ -17,25 +17,20 @@ use std::sync::Arc;#[derive(Subcommand, Debug)]pub enum HostCmd {/// Set this machine up for unattended access: install cua-spacesd as- /// a service that joins the cua.ai relay as your account (default) or- /// serves on a direct ip:port.+ /// a service that joins the cua.ai relay as your account.#[command(after_help = "Examples:# Join the cua.ai relay as your account (shares this desktop)cua host setup# A spare machine: do not share its desktop, run Spaces for your devicescua host setup --profile spare --name \"Mac mini (spare)\"cua host setup --no-desktop --provide-spaces- # Serve on the LAN instead of the relay- cua host setup --direct 0.0.0.0:3211 --name studio-mac- # A spare Mac on your tailnet that runs Spaces, without the relay- # (prints the command that adds it on your laptop)- cua host setup --direct 100.101.102.103:3211 --profile spare# Add this machine with a one-time code from the Cua Spaces app# (Add a machine) or `cua host pair`: no sign-in needed here- cua host setup --pair K7QM-4XPB-2RHD")]+ cua host setup --pair K7QM-4XPB-2RHD+ # Self-hosting teams: cua help advanced")]Setup {/// Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production).- #[arg(long, conflicts_with = "direct")]+ #[arg(long, hide = true, conflicts_with = "direct")]relay: Option<String>,/// Join with a one-time pairing code (or add-machine link) made in/// the Cua Spaces app or with `cua host pair`, instead of signing@@ -48,7 +43,7 @@ pub enum HostCmd {remote: bool,/// Serve directly on ip:port with a local env token (LAN //// port-forwarded) instead of joining a relay.- #[arg(long)]+ #[arg(long, hide = true)]direct: Option<String>,/// Display name (default: the host name).#[arg(long)]@@ -89,7 +84,7 @@ pub enum HostCmd {/// public --direct address). By default only loopback, Tailscale/// and private LAN addresses may. The direct listener is plaintext/// and its token is a shell on this machine: prefer Tailscale.- #[arg(long, requires = "direct")]+ #[arg(long, hide = true, requires = "direct")]allow_any_address: bool,},/// Make a one-time code (with a link and the install command) that adds@@ -125,7 +120,7 @@ pub enum HostCmd {#[arg(long, value_name = "ID", conflicts_with_all = ["team", "name"])]revoke: Option<String>,/// Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production).- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},/// Show or change what this machine shares: its own desktop, and@@ -177,7 +172,7 @@ pub enum HostCmd {machine: Option<String>,/// Relay URL (default: the one this machine joined, else/// $CUA_RELAY_URL / https://relay.cua.ai).- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,/// Do not ask for confirmation.#[arg(long)]@@ -195,7 +190,7 @@ pub enum HostCmd {#[arg(long)]machine: Option<String>,/// Relay URL.- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},/// Unregister from the relay, uninstall the service and delete the host@@ -234,7 +229,7 @@ Examples:)]Ls {/// Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production).- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,/// Do not measure what each Space takes on this computer's disk/// (that walk can take a moment with many Spaces).diff --git a/libs/cua/crates/cua-cli/src/lib.rs b/libs/cua/crates/cua-cli/src/lib.rsindex 783277f4e3..08cdccdd47 100644--- a/libs/cua/crates/cua-cli/src/lib.rs+++ b/libs/cua/crates/cua-cli/src/lib.rs@@ -246,14 +246,15 @@ enum Command {cua team show AIGIS")]Team(team_cmd::TeamCmd),- /// Your relay allowance this month: live sessions, relay hours, and- /// your plan. Spaces on your own network use none of it.+ /// Your remote use this month: live sessions, remote hours, and your+ /// plan. Remote hours are time spent using your computers from+ /// somewhere else; using a computer from itself is free.#[command(after_help = "Examples:cua usagecua usage --json")]Usage {/// Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production).- #[arg(long)]+ #[arg(long, hide = true)]relay: Option<String>,},/// Move a desktop app session (tabs, profile, sign-in) into a sandbox.@@ -2382,9 +2383,45 @@ fn cli_command(teams: bool) -> clap::Command {/// The `cua` command: parses this process's arguments, runs them and exits./// The Cua Spaces build registers its [`extension`] first.+/// `cua help advanced`: the options most people never need, kept out of+/// every other `--help` (the flags still work everywhere).+pub const ADVANCED_HELP: &str = "\+Advanced options++For self-hosting teams that run their own Cua relay, or connect machines+directly without one. Most people use Cua's relay and need none of this.++ --relay <URL>+ Use your own relay instead of Cua's. Works with cua host setup,+ host pair, host share, host unshare, spaces ls, devices and usage.+ Default: $CUA_RELAY_URL, else https://relay.cua.ai.++ cua host setup --direct <IP:PORT>+ Serve on ip:port with a local access token instead of joining a+ relay (your network, a VPN or a forwarded port). Add+ --allow-any-address to accept callers from any address.++Examples:+ cua host setup --relay https://relay.example.com+ cua host setup --direct 0.0.0.0:3211 --name studio-mac+ # A spare Mac on your tailnet that runs Spaces, without a relay+ # (prints the command that adds it on your laptop)+ cua host setup --direct 100.101.102.103:3211 --profile spare+";++/// `cua help advanced`, answered before clap: it is a help topic, not a+/// command.+fn is_advanced_help(args: &[std::ffi::OsString]) -> bool {+ args.len() == 2 && args[0] == "help" && args[1] == "advanced"+}+pub fn main() {#[cfg(windows)]keep_stdio_out_of_children();+ if is_advanced_help(&std::env::args_os().skip(1).collect::<Vec<_>>()) {+ print!("{ADVANCED_HELP}");+ return;+ }promote_spacesd_env_vars();// `CUA_ENV` picks every endpoint and the cua home: a typo must not fall// back to production silently.@@ -2510,6 +2547,50 @@ pub fn main() {mod tests {use super::*;+ /// Self-hosting stays out of every `--help` but `cua help advanced`;+ /// the flags still parse.+ #[test]+ fn self_hosting_flags_are_hidden_but_work() {+ let help = |path: &[&str]| {+ let mut cmd = cli_command(false);+ let mut sub = &mut cmd;+ for p in path {+ sub = sub.find_subcommand_mut(p).expect(p);+ }+ sub.render_long_help().to_string()+ };+ for path in [+ &["host", "setup"][..],+ &["host", "pair"],+ &["usage"],+ &["spaces", "ls"],+ ] {+ let text = help(path);+ assert!(!text.contains("--relay"), "{path:?}: {text}");+ assert!(!text.contains("--direct"), "{path:?}: {text}");+ }+ assert!(!help(&[]).contains("--relay"));+ assert!(+ Cli::try_parse_from(["cua", "usage", "--relay", "https://relay.example.com"]).is_ok()+ );+ assert!(+ Cli::try_parse_from([+ "cua",+ "host",+ "setup",+ "--relay",+ "https://relay.example.com"+ ])+ .is_ok()+ );+ assert!(Cli::try_parse_from(["cua", "host", "setup", "--direct", "0.0.0.0:3211"]).is_ok());+ let args = |a: &[&str]| a.iter().map(std::ffi::OsString::from).collect::<Vec<_>>();+ assert!(is_advanced_help(&args(&["help", "advanced"])));+ assert!(!is_advanced_help(&args(&["help"])));+ assert!(ADVANCED_HELP.contains("--relay <URL>"));+ assert!(ADVANCED_HELP.contains("--direct <IP:PORT>"));+ }+/// The Spaces app's launch check (`cua auth keychain`) records no usage/// event and never shows the first-run notice; other auth commands do.#[test]diff --git a/libs/cua/crates/cua-cli/src/usage_cmd.rs b/libs/cua/crates/cua-cli/src/usage_cmd.rsindex 5801a389a2..f85afe7267 100644--- a/libs/cua/crates/cua-cli/src/usage_cmd.rs+++ b/libs/cua/crates/cua-cli/src/usage_cmd.rs@@ -1,8 +1,9 @@-//! `cua usage`: your relay allowance this month. A live session is a+//! `cua usage`: your remote use this month. A live session is a//! connection to one of your remote machines through the hosted relay-//! (viewing, a terminal, an agent); relay hours are the time with at least-//! one. Spaces reached on your own network use no allowance, and nothing-//! stops at the limit: the relay only says it was reached.+//! (viewing, a terminal, an agent); relay hours, shown as "remote hours",+//! are the time with at least one. A computer used from itself never goes+//! through the relay, and nothing stops at the limit: the relay only says+//! it was reached.use crate::util::line;use cua_host::{AccountTokens, RelayClient, RelayUsage};@@ -42,7 +43,7 @@ pub async fn run_with(}match usage {Some(u) if u.metered => print(&u, out),- _ => line(out, "No relay allowance applies to your account."),+ _ => line(out, "Your account has no limit on remote use."),}Ok(0)}@@ -77,10 +78,11 @@ fn print(u: &RelayUsage, out: &mut dyn Write) {line(out,format!(- "Relay hours: {} this month",+ "Remote hours: {} this month",of(hours(u.hours_used), u.hours_limit.map(hours))),);+ line(out, REMOTE_HOURS_MEANING);if let Some(team) = &u.team {line(out,@@ -101,11 +103,17 @@ fn print(u: &RelayUsage, out: &mut dyn Write) {.unwrap_or_default();line(out,- format!("You've reached your relay allowance. Your Spaces keep working.{upgrade}"),+ format!(+ "You've reached your plan's remote limit for this month. Your Spaces keep working.{upgrade}"+ ),);}}+/// What remote hours are (the apps' words: `relay_usage::REMOTE_HOURS_MEANING`+/// in cua-spaces-app-core).+const REMOTE_HOURS_MEANING: &str = "Remote hours: time spent using your computers from somewhere else (your laptop, phone or an agent on another computer). Using a computer from itself is free.";+/// `20` or `3.4`.fn hours(h: f64) -> String {let tenths = (h * 10.0).round() / 10.0;@@ -137,7 +145,7 @@ mod tests {relay.add_account("acct", "user-1", None);assert_eq!(text(&relay, false).await.trim(),- "No relay allowance applies to your account."+ "Your account has no limit on remote use.");assert_eq!(text(&relay, true).await.trim(), r#"{"metered":false}"#);@@ -151,7 +159,7 @@ mod tests {let t = text(&relay, false).await;assert!(t.contains("Plan: free (2026-10)"), "{t}");assert!(t.contains("Live sessions: 1 of 2"), "{t}");- assert!(t.contains("Relay hours: 6.5 of 20 this month"), "{t}");+ assert!(t.contains("Remote hours: 6.5 of 20 this month"), "{t}");assert!(!t.contains("Team pool") && !t.contains("reached"), "{t}");usage["team"] = serde_json::json!({ "id": "acme", "seats": 3 });@@ -160,13 +168,13 @@ mod tests {usage["reasons"] = serde_json::json!(["hours"]);relay.set_usage(Some(usage));let t = text(&relay, false).await;- assert!(t.contains("Relay hours: 21 of 20 this month"), "{t}");+ assert!(t.contains("Remote hours: 21 of 20 this month"), "{t}");assert!(t.contains("Team pool: acme, 3 seats (your hours: 6.5)"),"{t}");assert!(- t.contains("You've reached your relay allowance. Your Spaces keep working. Upgrade: https://cua.ai/pricing"),+ t.contains("You've reached your plan's remote limit for this month. Your Spaces keep working. Upgrade: https://cua.ai/pricing"),"{t}");let v: serde_json::Value = serde_json::from_str(&text(&relay, true).await).unwrap();diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.jsonindex 8c56634d0b..e7a4790040 100644--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/main-window.json@@ -378,9 +378,9 @@"profile: Use it to [-] = desktop","allow: Share with (optional) [Teammates’ emails] = [email protected], [email protected]","direct: Direct connection = off (advanced)",- "relay: Relay server [https://relay.cua.ai] = https://relay.cua.ai (advanced)"+ "relay: Relay server [https://relay.example.com] = https://relay.cua.ai (advanced)"],- "lede": "You and the people you share with can see and use this computer’s screen from other devices. Cua connects them for you, with no network setup. Signed in as [email protected].",+ "lede": "For self-hosting teams: joins your own relay at the address below.","request": "mode=relay relay=https://relay.cua.ai direct=- name=Studio [email protected],[email protected]","title": "Set up this computer"},@@ -398,9 +398,9 @@"profile: Use it to [-] = desktop","allow: Share with (optional) [Teammates’ emails] = [email protected], [email protected]","direct: Direct connection = off (advanced)",- "relay: Relay server [https://relay.cua.ai] = ftp://relay !invalid (advanced)"+ "relay: Relay server [https://relay.example.com] = ftp://relay !invalid (advanced)"],- "lede": "You and the people you share with can see and use this computer’s screen from other devices. Cua connects them for you, with no network setup. Signed in as [email protected].",+ "lede": "For self-hosting teams: joins your own relay at the address below.","request": null,"title": "Set up this computer"},@@ -418,9 +418,9 @@"profile: Use it to [-] = desktop","allow: Share with (optional) [Teammates’ emails] = [email protected], [email protected]","direct: Direct connection = off (advanced)",- "relay: Relay server [https://relay.cua.ai] = https://relay.example/ (advanced)"+ "relay: Relay server [https://relay.example.com] = https://relay.example/ (advanced)"],- "lede": "You and the people you share with can see and use this computer’s screen from other devices. Cua connects them for you, with no network setup. Signed in as [email protected].",+ "lede": "For self-hosting teams: joins your own relay at the address below.","request": "mode=relay relay=https://relay.example direct=- name=Studio [email protected],[email protected]","title": "Set up this computer"},@@ -528,9 +528,9 @@"profile: Use it to [-] = desktop","allow: Share with (optional) [Teammates’ emails] = [email protected], [email protected]","direct: Direct connection = off (advanced)",- "relay: Relay server [https://relay.cua.ai] = https://relay.example/ (advanced)"+ "relay: Relay server [https://relay.example.com] = https://relay.example/ (advanced)"],- "lede": "You and the people you share with can see and use this computer’s screen from other devices. Cua connects them for you, with no network setup. Signed in as [email protected].",+ "lede": "For self-hosting teams: joins your own relay at the address below.","request": "mode=relay relay=https://relay.example direct=- name=Studio [email protected],[email protected]","title": "Set up this computer"},diff --git a/libs/cua/crates/cua-spaces-app-core/src/host.rs b/libs/cua/crates/cua-spaces-app-core/src/host.rsindex f362c37669..01a3cc6644 100644--- a/libs/cua/crates/cua-spaces-app-core/src/host.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/host.rs@@ -1602,6 +1602,13 @@ pub struct HostFormView {pub request: Option<HostSetupRequest>,}+/// The form's profile for a self-hosted relay or a direct connection+/// (`set-profile`), opened only from Settings → Advanced. Setup, first run+/// and the This machine page offer Cua's relay alone, so its fields+/// (Direct connection, Relay) show only while Advanced is open, and the+/// apps draw no Advanced toggle of their own.+pub const SELF_HOSTED_PROFILE: &str = "self-hosted";+/// The first form.pub fn form_initial() -> HostFormState {HostFormState::default()@@ -1645,6 +1652,12 @@ pub fn form_reduce(s: &HostFormState, a: &HostFormAction) -> HostFormState {HostFormAction::SetDirect { on } => n.direct = *on,HostFormAction::SetListen { listen } => n.listen = listen.clone(),HostFormAction::SetRelayUrl { url } => n.relay_url = url.clone(),+ HostFormAction::SetProfile { profile } if profile == SELF_HOSTED_PROFILE => {+ // Settings → Advanced: the team's own relay (or Direct). The+ // relay field starts empty, for their address.+ n.advanced = true;+ n.relay_url = String::new();+ }HostFormAction::SetProfile { profile } => n.spare = profile == "spare",HostFormAction::Submit => {if !s.busy && form_request(s).is_ok() {@@ -1749,7 +1762,7 @@ pub fn form_view(s: &HostFormState, identity: Option<&str>) -> HostFormView {fields.push(text("relay","Relay server",- &default_relay_url(),+ "https://relay.example.com",&s.relay_url,bad,true,@@ -1765,6 +1778,16 @@ pub fn form_view(s: &HostFormState, identity: Option<&str>) -> HostFormView {"You and the people you share with can see and use this computer\u{2019}s screen from other devices. Cua connects them for you, with no network setup."};match identity.filter(|i| !i.is_empty()) {+ _ if s.advanced => {+ // Self-hosting: Cua's relay is not involved, so only the+ // spare-computer sentence carries over.+ let spare = if s.spare {+ format!(" {what}")+ } else {+ String::new()+ };+ format!("For self-hosting teams: joins your own relay at the address below.{spare}")+ }Some(id) => format!("{what} Signed in as {id}."),None => what.to_string(),}@@ -2237,6 +2260,41 @@ mod tests {assert_eq!(connected_now(&other), 0);}+ #[test]+ fn self_hosting_opens_only_from_its_profile() {+ // Setup and first run: Cua's relay, nothing about self-hosting.+ let s = form_initial();+ let v = form_view(&s, Some("[email protected]"));+ assert!(v.fields.iter().all(|f| !f.advanced), "{:?}", v.fields);+ assert!(+ v.lede.starts_with("You and the people you share with"),+ "{}",+ v.lede+ );+ // Settings → Advanced: the team's own relay, typed in.+ let s = form_reduce(+ &s,+ &HostFormAction::SetProfile {+ profile: SELF_HOSTED_PROFILE.into(),+ },+ );+ let v = form_view(&s, Some("[email protected]"));+ assert!(v.advanced_open);+ assert!(v.lede.starts_with("For self-hosting teams"), "{}", v.lede);+ let relay = v.fields.iter().find(|f| f.id == "relay").unwrap();+ assert_eq!(relay.value, "");+ assert!(!v.can_submit, "needs the relay's address");+ let s = form_reduce(+ &s,+ &HostFormAction::SetRelayUrl {+ url: "https://relay.example.com".into(),+ },+ );+ let r = form_view(&s, None).request.unwrap();+ assert_eq!(r.relay_url.as_deref(), Some("https://relay.example.com"));+ assert_eq!(r.profile.as_deref(), Some("desktop"));+ }+#[test]fn the_form_submits_only_a_valid_request() {let mut s = form_initial();diff --git a/libs/cua/crates/cua-spaces-app-core/src/relay_usage.rs b/libs/cua/crates/cua-spaces-app-core/src/relay_usage.rsindex 9d95566d02..b88228c631 100644--- a/libs/cua/crates/cua-spaces-app-core/src/relay_usage.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/relay_usage.rs@@ -2,12 +2,16 @@// Copyright (c) 2026 Cua AI, Inc.//! The account's relay allowance this month, as every app shows it: one-//! Settings row ("Relay usage") and, past the allowance, one dismissible+//! Settings row ("Remote use") and, past the allowance, one dismissible//! line above every page with Upgrade. A live session is a connection to//! one of the user's remote machines through the hosted relay; relay hours//! are the time with at least one. Nothing stops at the limit, so the apps//! only say so.//!+//! Users see relay hours as "remote hours" (the API and metric names keep+//! `relay_hours`): the time spent using a computer from somewhere else.+//! Using a computer from itself never goes through the relay, so it is free.+//!//! Plain data in (the relay's `GET /v1/usage`, as `cua_host::RelayUsage`//! reads it and `cua usage` prints it) and plain data out. Every app reads//! it through the same client (`app_relay_usage` in the Spaces app export)@@ -16,7 +20,13 @@use serde::{Deserialize, Serialize};/// The Settings row's label.-pub const ROW_LABEL: &str = "Relay usage";+pub const ROW_LABEL: &str = "Remote use";++/// What remote hours are, in plain words: where the term first shows (the+/// Free plan card, `cua usage`). The relay meters the time an account has+/// at least one live session through it; a computer used from itself never+/// goes through the relay.+pub const REMOTE_HOURS_MEANING: &str = "Remote hours: time spent using your computers from somewhere else (your laptop, phone or an agent on another computer). Using a computer from itself is free.";/// The notice's button.pub const UPGRADE: &str = "Upgrade";@@ -178,7 +188,7 @@ pub fn usage_line(u: &RelayUsage) -> String {u.live_sessions_limit.map(|l| l.to_string()),);let relay_hours = of(hours(u.hours_used), u.hours_limit.map(hours));- format!("Live sessions {sessions} \u{b7} Relay hours {relay_hours} this month")+ format!("Live sessions {sessions} \u{b7} Remote hours {relay_hours} this month")}/// "Free plan", "Pro plan"; empty when the relay names none.@@ -230,15 +240,15 @@ pub fn dismiss_key(u: &RelayUsage) -> String {pub fn notice_text(u: &RelayUsage) -> String {if warns(u) {return format!(- "You've used {} of {} relay hours this month. Nothing stops at the limit. Pro gives you {PRO_HOURS} hours and {PRO_SESSIONS} live sessions.",+ "You've used {} of {} remote hours this month. Nothing stops at the limit. Pro gives you {PRO_HOURS} hours and {PRO_SESSIONS} live sessions.",hours(u.hours_used),hours(u.hours_limit.unwrap_or_default()),);}match plan_kind(&u.plan) {- "free" => "You've used your free relay allowance for this month. Your Spaces keep working. Pro gives you more.".into(),- "pro" => "You've used your relay allowance for this month. Your Spaces keep working. Teams pools hours across seats.".into(),- _ => "You've used your relay allowance for this month. Your Spaces keep working. Add seats for more.".into(),+ "free" => "You've reached the free plan's remote limit for this month. Your Spaces keep working. Pro gives you more.".into(),+ "pro" => "You've reached your plan's remote limit for this month. Your Spaces keep working. Teams pools remote hours across seats.".into(),+ _ => "You've reached your team's remote limit for this month. Your Spaces keep working. Add seats for more.".into(),}}@@ -276,13 +286,13 @@ pub fn plan_card(u: &RelayUsage, account_app: &str) -> PlanCard {url: buy(account_app, path, "app_plan_card"),};let allowance = |s: Option<u32>, h: Option<f64>| match (s, h) {- (Some(s), Some(h)) => format!("{s} live sessions and {} relay hours a month", hours(h)),- _ => "No relay limit".into(),+ (Some(s), Some(h)) => format!("{s} live sessions and {} remote hours a month", hours(h)),+ _ => "No limit on remote use".into(),};let (detail, primary, secondary) = match kind {"free" => (format!(- "{} on the hosted relay. Spaces you reach on your own network don't count.",+ "{}. {REMOTE_HOURS_MEANING}",allowance(u.live_sessions_limit, u.hours_limit)),Some(link("Get Pro", BUY_PRO_PATH)),@@ -395,10 +405,10 @@ mod tests {#[test]fn within_the_allowance_one_row_and_no_notice() {let v = view(&free()).unwrap();- assert_eq!(v.label, "Relay usage");+ assert_eq!(v.label, "Remote use");assert_eq!(v.line,- "Live sessions 1 of 2 \u{b7} Relay hours 6.5 of 20 this month"+ "Live sessions 1 of 2 \u{b7} Remote hours 6.5 of 20 this month");assert_eq!(v.plan, "Free plan");assert_eq!(v.notice, None);@@ -419,12 +429,12 @@ mod tests {let v = view_for(&u, "https://app.cua.ai").unwrap();assert_eq!(v.line,- "Live sessions 1 of 2 \u{b7} Relay hours 20.2 of 20 this month \u{b7} Team pool, 3 seats"+ "Live sessions 1 of 2 \u{b7} Remote hours 20.2 of 20 this month \u{b7} Team pool, 3 seats");let n = v.notice.unwrap();assert_eq!(n.text,- "You've used your free relay allowance for this month. Your Spaces keep working. Pro gives you more."+ "You've reached the free plan's remote limit for this month. Your Spaces keep working. Pro gives you more.");assert_eq!(n.upgrade, "Upgrade");assert_eq!(n.level, "limit");@@ -443,7 +453,7 @@ mod tests {.unwrap().notice.unwrap();- assert!(n.text.starts_with("You've used your relay"), "{}", n.text);+ assert!(n.text.starts_with("You've reached your"), "{}", n.text);assert_eq!(n.upgrade_url.as_deref(),Some("https://app.cua.ai/buy/teams?from=app_meter")@@ -473,7 +483,7 @@ mod tests {assert_eq!(n.level, "warn");assert_eq!(n.text,- "You've used 16 of 20 relay hours this month. Nothing stops at the limit. Pro gives you 200 hours and 5 live sessions."+ "You've used 16 of 20 remote hours this month. Nothing stops at the limit. Pro gives you 200 hours and 5 live sessions.");assert_eq!(n.upgrade_url.as_deref(),@@ -520,7 +530,7 @@ mod tests {assert_eq!((f.plan.as_str(), f.label.as_str()), ("free", "Free plan"));assert_eq!(f.detail,- "2 live sessions and 20 relay hours a month on the hosted relay. Spaces you reach on your own network don't count."+ "2 live sessions and 20 remote hours a month. Remote hours: time spent using your computers from somewhere else (your laptop, phone or an agent on another computer). Using a computer from itself is free.");let p = f.primary.unwrap();assert_eq!(@@ -562,7 +572,7 @@ mod tests {assert_eq!(team.plan, "teams");assert_eq!(team.detail,- "10 live sessions and 400 relay hours a month across 2 seats, shared by the team."+ "10 live sessions and 400 remote hours a month across 2 seats, shared by the team.");assert!(team.secondary.is_none());}@@ -577,7 +587,7 @@ mod tests {..free()};let v = view(&u).unwrap();- assert_eq!(v.line, "Live sessions 1 \u{b7} Relay hours 3 this month");+ assert_eq!(v.line, "Live sessions 1 \u{b7} Remote hours 3 this month");assert_eq!(v.plan, "");assert_eq!(view(&RelayUsage {@@ -647,7 +657,7 @@ mod tests {let bare: RelayUsage = serde_json::from_str(r#"{"metered":true}"#).unwrap();assert_eq!(view(&bare).unwrap().line,- "Live sessions 0 \u{b7} Relay hours 0 this month"+ "Live sessions 0 \u{b7} Remote hours 0 this month");}}diff --git a/libs/cua/crates/cua-spaces-app-core/src/upsell.rs b/libs/cua/crates/cua-spaces-app-core/src/upsell.rsindex 28864ddb15..f39efc71a3 100644--- a/libs/cua/crates/cua-spaces-app-core/src/upsell.rs+++ b/libs/cua/crates/cua-spaces-app-core/src/upsell.rs@@ -111,7 +111,7 @@ pub fn prompt("machine" if kind == "free" => Some(UpsellPrompt {surface: "machine".into(),text: format!(- "Two machines now. Free includes {} live sessions and {} relay hours a month. Pro makes it {PRO_SESSIONS} and {PRO_HOURS}, for $18 a month.",+ "Two machines now. Free includes {} live sessions and {} remote hours a month. Pro makes it {PRO_SESSIONS} and {PRO_HOURS}, for $18 a month.",usage.live_sessions_limit.unwrap_or(2),hours(usage.hours_limit.unwrap_or(20.0)),),@@ -163,7 +163,7 @@ mod tests {let p = prompt("machine", &usage("free"), APP, &state()).unwrap();assert_eq!(p.text,- "Two machines now. Free includes 2 live sessions and 20 relay hours a month. Pro makes it 5 and 200, for $18 a month."+ "Two machines now. Free includes 2 live sessions and 20 remote hours a month. Pro makes it 5 and 200, for $18 a month.");assert_eq!(p.cta.label, "Get Pro");assert_eq!(p.cta.url, "https://app.cua.ai/buy/pro?from=app_machine");diff --git a/scripts/docs-generators/cli-specs/cua.json b/scripts/docs-generators/cli-specs/cua.jsonindex dc745bb34c..680b249e73 100644--- a/scripts/docs-generators/cli-specs/cua.json+++ b/scripts/docs-generators/cli-specs/cua.json@@ -8974,8 +8974,8 @@"subcommand_optional": false,"subcommands": [{- "abstract": "Set this machine up for unattended access: install cua-spacesd as a service that joins the cua.ai relay as your account (default) or serves on a direct ip:port",- "after_help": "Examples:\n # Join the cua.ai relay as your account (shares this desktop)\n cua host setup\n # A spare machine: do not share its desktop, run Spaces for your devices\n cua host setup --profile spare --name \"Mac mini (spare)\"\n cua host setup --no-desktop --provide-spaces\n # Serve on the LAN instead of the relay\n cua host setup --direct 0.0.0.0:3211 --name studio-mac\n # A spare Mac on your tailnet that runs Spaces, without the relay\n # (prints the command that adds it on your laptop)\n cua host setup --direct 100.101.102.103:3211 --profile spare\n # Add this machine with a one-time code from the Cua Spaces app\n # (Add a machine) or `cua host pair`: no sign-in needed here\n cua host setup --pair K7QM-4XPB-2RHD",+ "abstract": "Set this machine up for unattended access: install cua-spacesd as a service that joins the cua.ai relay as your account",+ "after_help": "Examples:\n # Join the cua.ai relay as your account (shares this desktop)\n cua host setup\n # A spare machine: do not share its desktop, run Spaces for your devices\n cua host setup --profile spare --name \"Mac mini (spare)\"\n cua host setup --no-desktop --provide-spaces\n # Add this machine with a one-time code from the Cua Spaces app\n # (Add a machine) or `cua host pair`: no sign-in needed here\n cua host setup --pair K7QM-4XPB-2RHD\n # Self-hosting teams: cua help advanced","aliases": [],"arguments": [],"flags": [@@ -9039,7 +9039,7 @@"default_value": false,"env": null,"help": "With --direct and Spaces: take host calls, and connections to the Spaces this machine forwards, from any address (and allow a public --direct address). By default only loopback, Tailscale and private LAN addresses may. The direct listener is plaintext and its token is a shell on this machine: prefer Tailscale",- "hidden": false,+ "hidden": true,"name": "allow-any-address","repeatable": false,"short_name": null,@@ -9055,7 +9055,7 @@"default_value": null,"env": null,"help": "Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production)",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -9087,7 +9087,7 @@"default_value": null,"env": null,"help": "Serve directly on ip:port with a local env token (LAN / port-forwarded) instead of joining a relay",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "direct",@@ -9304,7 +9304,7 @@"default_value": null,"env": null,"help": "Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production)",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -9501,7 +9501,7 @@"default_value": null,"env": null,"help": "Relay URL (default: the one this machine joined, else $CUA_RELAY_URL / https://relay.cua.ai)",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -9559,7 +9559,7 @@"default_value": null,"env": null,"help": "Relay URL",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -9655,7 +9655,7 @@"default_value": null,"env": null,"help": "Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production)",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -10671,7 +10671,7 @@"default_value": null,"env": null,"help": "Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production)",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -10730,7 +10730,7 @@"default_value": null,"env": null,"help": "Relay URL",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -10800,7 +10800,7 @@"default_value": null,"env": null,"help": "Relay URL",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -10833,7 +10833,7 @@"default_value": null,"env": null,"help": "Relay URL",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -10885,7 +10885,7 @@"default_value": null,"env": null,"help": "Relay URL",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -10939,7 +10939,7 @@"default_value": null,"env": null,"help": "Relay URL",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -10986,7 +10986,7 @@"default_value": null,"env": null,"help": "Relay URL",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",@@ -11556,7 +11556,7 @@"usage": "cua team [OPTIONS] <COMMAND>"},{- "abstract": "Your relay allowance this month: live sessions, relay hours, and your plan. Spaces on your own network use none of it",+ "abstract": "Your remote use this month: live sessions, remote hours, and your plan. Remote hours are time spent using your computers from somewhere else; using a computer from itself is free","after_help": "Examples:\n cua usage\n cua usage --json","aliases": [],"arguments": [],@@ -11570,7 +11570,7 @@"default_value": null,"env": null,"help": "Relay URL (default $CUA_RELAY_URL, else the CUA_ENV relay, https://relay.cua.ai in production)",- "hidden": false,+ "hidden": true,"is_optional": true,"multiple_values": false,"name": "relay",