Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
66ef6f2
Add the cmux Max plan and gate 32 GB and 64 GB machines behind it (#1…
lawrencecchen Sep 12, 2026
1aa0f7b
feat: separate individual and business pricing sections
lawrencecchen Sep 12, 2026
9a20861
feat: add Go plan and separate pricing categories
lawrencecchen Sep 12, 2026
8901993
test: cover Go billing-period runtime accounting
lawrencecchen Sep 12, 2026
69e8a26
feat: enforce Go runtime and saved-machine limits
lawrencecchen Sep 12, 2026
5584c6d
Add individual and team pricing audience switch
lawrencecchen Sep 12, 2026
b653772
test: cover Go provider caps and size upgrade targets
lawrencecchen Sep 12, 2026
ef10636
fix: enforce provider runtime caps and preserve Cloud diagnostics
lawrencecchen Sep 12, 2026
a24924b
fix: expose cloud panel failures to lifecycle extension
lawrencecchen Sep 12, 2026
a9ecce6
test: cover pricing controls and billing review regressions
lawrencecchen Sep 12, 2026
c4d17d8
test: use complete billing fixtures and native fork capabilities
lawrencecchen Sep 12, 2026
4afb287
fix: simplify pricing controls and address billing review findings
lawrencecchen Sep 12, 2026
8a305ca
test: provide request headers in pricing renders
lawrencecchen Sep 12, 2026
a942f0f
fix: keep pricing controls aligned on mobile
lawrencecchen Sep 12, 2026
656ba27
test: model request-time pricing render boundary
lawrencecchen Sep 12, 2026
011bfc9
fix: defer billing reads until a pricing request arrives
lawrencecchen Sep 12, 2026
8a019e1
test: preserve upgraded VMs during Go pause recovery
lawrencecchen Sep 12, 2026
24fbb9e
test: model database queries with real promises
lawrencecchen Sep 12, 2026
2a377f4
fix: honor upgraded plans during pause recovery
lawrencecchen Sep 12, 2026
f1d3754
fix: refine Max copy and review test seams
lawrencecchen Sep 12, 2026
3526b27
fix: keep shared package out of cmux test target
lawrencecchen Sep 12, 2026
5818661
Gate Go plan behind rollout flag
lawrencecchen Sep 12, 2026
1c6126e
test: require monthly-only purchase offers
lawrencecchen Sep 13, 2026
fa01baf
Make new Cloud subscriptions monthly only
lawrencecchen Sep 13, 2026
93447a0
Merge main and retain plan gates in new workspace creation
lawrencecchen Sep 13, 2026
f7bc32c
Fix ungrouped Cloud workspace destination defaults
lawrencecchen Sep 13, 2026
e81a2d9
Align Bun test declaration with main
lawrencecchen Sep 13, 2026
69384ac
Merge latest main into monthly pricing branch
lawrencecchen Sep 13, 2026
be33fd0
Combine monthly billing with current VM resize limits
lawrencecchen Sep 13, 2026
c377ad8
Restore current VM resize limits after main merge
lawrencecchen Sep 13, 2026
03e6341
Fix TabID lookup in pane focus index
lawrencecchen Sep 13, 2026
516fe4c
Fix pinned Ghostty open URL enum
lawrencecchen Sep 13, 2026
98f1bad
Merge latest main before monthly launch
lawrencecchen Sep 13, 2026
df4a0e7
Fix indexed Cloud workspace reconciliation lookup
lawrencecchen Sep 13, 2026
b023a89
Restore headless Cloud terminal provider methods
lawrencecchen Sep 13, 2026
287113f
Fix Cloud environment cleanup call
lawrencecchen Sep 13, 2026
0d5e1d3
Fix billing review contract and localized Go errors
lawrencecchen Sep 13, 2026
416c7b7
Center pricing audience switcher
lawrencecchen Sep 13, 2026
81c5960
Merge remote-tracking branch 'origin/main' into feat-go-plan
lawrencecchen Sep 13, 2026
fff9cf4
Gate pricing checkout behind sign-in
lawrencecchen Sep 13, 2026
a392e58
Gate embedded pricing checkout behind sign-in
lawrencecchen Sep 13, 2026
56b1c9e
Remove duplicate Cloud provider declarations
lawrencecchen Sep 14, 2026
00d9fec
Keep legacy subscription plan field optional
lawrencecchen Sep 14, 2026
d371a39
Preserve current native localization catalog
lawrencecchen Sep 14, 2026
e8bd529
Restore pricing localization entries
lawrencecchen Sep 14, 2026
a91064a
Fix plan-specific VM upgrade guidance
lawrencecchen Sep 14, 2026
f3693f8
Avoid unavailable Go downgrades
lawrencecchen Sep 14, 2026
f4ba479
Disable creation when every VM size is locked
lawrencecchen Sep 14, 2026
95e7a23
Align Cloud provider extensions with main
lawrencecchen Sep 14, 2026
20b69bb
Merge remote-tracking branch 'origin/main' into feat-go-plan
lawrencecchen Sep 14, 2026
9f245c7
Keep Go billing states and VM upgrade maps aligned
lawrencecchen Sep 14, 2026
ab7ac8d
Respect App Store billing gate after sign-in
lawrencecchen Sep 14, 2026
d791f35
Coalesce new machine plan refreshes
lawrencecchen Sep 14, 2026
d786989
Fix Cloud provider access level for CI
lawrencecchen Sep 14, 2026
f97bb4b
Apply Go rollout flag at every billing boundary
lawrencecchen Sep 14, 2026
bf1c9a4
Require secure native checkout URLs
lawrencecchen Sep 14, 2026
af60de8
Fail closed on stale VM entitlements
lawrencecchen Sep 14, 2026
659d81f
Preserve legacy VM size compatibility
lawrencecchen Sep 14, 2026
236bcec
Fix billing portal complexity and VM paywall import
lawrencecchen Sep 14, 2026
6401f99
test: cover checkout authentication and locked machine submissions
lawrencecchen Sep 14, 2026
0ab1337
fix: finish authenticated billing flow and repair native plan refresh
lawrencecchen Sep 14, 2026
4b42919
test: separate snapshot ownership from legacy memory gating
lawrencecchen Sep 14, 2026
b1599a3
Fix native drag test window mock
lawrencecchen Sep 14, 2026
071fca1
Align optional account plan schema
lawrencecchen Sep 14, 2026
6aed54b
Keep dynamic pricing account lookup explicit
lawrencecchen Sep 14, 2026
b5739a5
Show every plan in mixed VM size guidance
lawrencecchen Sep 14, 2026
8334670
Fix native drag hover point conversion
lawrencecchen Sep 14, 2026
132ec33
Route Max upgrades through the billing portal
lawrencecchen Sep 14, 2026
db5a588
Fix Max upgrade targets and dashboard scope
lawrencecchen Sep 14, 2026
025c4ce
Use highest plan in machine size upgrade CTA
lawrencecchen Sep 14, 2026
a482fb7
Merge origin/main into feat-go-plan
lawrencecchen Sep 16, 2026
13d04e4
Preserve legacy VM shapes during plan checks
lawrencecchen Sep 16, 2026
b01009d
Merge remote-tracking branch 'origin/main' into feat-go-plan
lawrencecchen Sep 16, 2026
aa37c9f
Handle disabled Cloud machines in list errors
lawrencecchen Sep 16, 2026
9367544
Test unknown VM shapes and complete plan selection
lawrencecchen Sep 16, 2026
10bfe1c
Complete main merge for pricing entitlements
lawrencecchen Sep 16, 2026
7495cd2
Merge remote-tracking branch 'origin/main' into feat-go-plan
lawrencecchen Sep 16, 2026
d35adf3
Align drag test with latest machine actions API
lawrencecchen Sep 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions CLI/CMUXCLI+VMTransfer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ extension CMUXCLI {

static var vmRunUsage: String {
"""
Usage: cmux vm run [--sync] [--pull <remote-path>] [--machine <id>] [--new] [--size <20g>] [--timeout <seconds>] -- <command...>
Usage: cmux vm run [--sync] [--pull <remote-path>] [--machine <id>] [--new] [--size <8g>] [--timeout <seconds>] -- <command...>

Run a command on a cloud machine without naming one: reuses an idle
machine the router itself provisioned earlier (shown as "\(vmRunPoolLabel)"
Expand All @@ -999,7 +999,8 @@ extension CMUXCLI {
current directory.
--machine <id> Skip routing and use this machine.
--new Force a fresh pool machine.
--size <s> Memory preset for a machine this run creates.
--size <s> Memory preset for a machine this run creates
(4g to 24g on Pro; 32g and 64g need cmux Max).
--timeout <seconds> Command timeout (default \(vmRunDefaultTimeoutSeconds)s, max 15 minutes).
--wait, --output Accepted for symmetry with `vm agent`; `vm run` always
blocks on the command and prints its output.
Expand Down Expand Up @@ -1070,7 +1071,7 @@ extension CMUXCLI {
var memoryMb: Int?
if let sizeOption {
guard let parsed = Self.parseCloudVMSize(sizeOption) else {
throw CLIError(message: "vm run: unknown size '\(sizeOption)'. Sizes: 20g (the plan machine) or memory in MB (at least 512).")
throw CLIError(message: "vm run: unknown size '\(sizeOption)'. Sizes: 4g, 8g, 16g, 24g on Pro (32g and 64g need cmux Max), or memory in MB (at least 512).")
}
memoryMb = parsed
}
Expand Down Expand Up @@ -1502,7 +1503,7 @@ extension CMUXCLI {
extension CMUXCLI {
static var vmRouteUsage: String {
"""
Usage: cmux vm route [--cwd <dir>] [--new] [--provision] [--size <20g>] [--json]
Usage: cmux vm route [--cwd <dir>] [--new] [--provision] [--size <8g>] [--json]

Print the machine `cmux vm run` / `cmux vm agent` would use for work in a
directory, and why — without running anything. The policy is the router's
Expand All @@ -1515,7 +1516,8 @@ extension CMUXCLI {
--cwd <dir> Route for this directory (default: the current one).
--new Ignore the pool and report a fresh machine.
--provision Actually create the machine when routing would.
--size <s> Memory preset for a machine --provision creates.
--size <s> Memory preset for a machine --provision creates
(4g to 24g on Pro; 32g and 64g need cmux Max).
--json {machine, created, reason, would_provision, directory}
"""
}
Expand Down Expand Up @@ -1560,7 +1562,8 @@ extension CMUXCLI {
--timeout <s> With --wait: give up waiting after this many seconds
(exit 1, the agent is not stopped). Default: no limit.
--new Force a fresh pool machine.
--size <s> Memory preset for a machine this call creates.
--size <s> Memory preset for a machine this call creates
(4g to 24g on Pro; 32g and 64g need cmux Max).

Examples:
cmux vm agent --agent claude --sync -- "run the test suite and fix failures"
Expand Down Expand Up @@ -1663,7 +1666,7 @@ extension CMUXCLI {
var memoryMb: Int?
if let sizeOption {
guard let parsed = Self.parseCloudVMSize(sizeOption) else {
throw CLIError(message: "vm route: unknown size '\(sizeOption)'. Sizes: 20g (the plan machine) or memory in MB (at least 512).")
throw CLIError(message: "vm route: unknown size '\(sizeOption)'. Sizes: 4g, 8g, 16g, 24g on Pro (32g and 64g need cmux Max), or memory in MB (at least 512).")
}
memoryMb = parsed
}
Expand Down Expand Up @@ -1762,7 +1765,7 @@ extension CMUXCLI {
var memoryMb: Int?
if let sizeOption {
guard let parsed = Self.parseCloudVMSize(sizeOption) else {
throw CLIError(message: "vm agent: unknown size '\(sizeOption)'. Sizes: 20g (the plan machine) or memory in MB (at least 512).")
throw CLIError(message: "vm agent: unknown size '\(sizeOption)'. Sizes: 4g, 8g, 16g, 24g on Pro (32g and 64g need cmux Max), or memory in MB (at least 512).")
}
memoryMb = parsed
}
Expand Down
29 changes: 27 additions & 2 deletions CLI/cmux.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5545,6 +5545,29 @@ struct CMUXCLI {
case "vpn":
try runVPNCommand(commandArgs: commandArgs, client: client, jsonOutput: jsonOutput)

case "billing":
let (planOption, rest) = parseOption(Array(commandArgs.dropFirst()), name: "--plan")
guard let plan = planOption, commandArgs.first == "checkout", ["go", "pro", "max"].contains(plan), rest.allSatisfy({ $0 == "--no-open" }) else {
throw CLIError(message: "Usage: cmux billing checkout --plan <go|pro|max> [--no-open]")
}
let response = try client.sendV2(method: "vm.billing_checkout", params: ["plan": plan])
guard let url = response["url"] as? String else {
throw CLIError(message: "Checkout URL is missing. Open https://cmux.com/pricing.")
}
if !rest.contains("--no-open") && !jsonOutput {
let process = Process()
process.executableURL = URL(fileURLWithPath: openToolPath())
process.arguments = [url]
try process.run()
process.waitUntilExit()
}
if jsonOutput {
print(jsonString(response))
} else {
print(url)
print("Review the plan and price in your browser. After payment, retry your VM command.")
}

case "auth", "login", "logout":
let authArgs = command == "auth" ? commandArgs : [command] + commandArgs
let sub = authArgs.first?.lowercased() ?? "status"
Expand Down Expand Up @@ -5928,7 +5951,7 @@ struct CMUXCLI {
vm new: unknown size '\(sizeOpt)'.

Sizes: 4g, 8g, 16g, 24g, 32g, 64g (or memory in MB).
Plans cap the largest size; `cmux vm ls` shows your plan.
Pro starts 4g to 24g; 32g and 64g need cmux Max. `cmux vm ls` shows your plan.
""")
}
memoryMb = parsed
Expand All @@ -5944,7 +5967,7 @@ struct CMUXCLI {
vm new: unknown flag '\(unknown)'.

Known flags:
--size <4g|8g|16g|24g|32g|64g>
--size <4g|8g|16g|24g|32g|64g> 4g to 24g on Pro; 32g and 64g need cmux Max
--desktop, --base \(String(localized: "cli.vm.help.legacyKindFlags", defaultValue: "accepted for older scripts; every machine has a screen"))
--name <label> display label (the id stays the address)
--image <image-id> explicit image override (normally omit)
Expand Down Expand Up @@ -18380,6 +18403,8 @@ struct CMUXCLI {
never leave this Mac. Signed builds fail closed if the Network
Extension is absent. There is no privileged fallback.
"""
case "billing":
return "Usage: cmux billing checkout --plan <go|pro|max> [--no-open]\n\nCreate checkout for the signed-in cmux account. Max is $200/month. Payment requires browser confirmation. --no-open or --json returns the URL without opening a browser."
case "auth":
return """
Usage: cmux auth <status|login|logout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public struct CmuxAPIClient: Sendable {
userID: body.userId,
email: body.email,
planID: body.planId.rawValue,
subscriptionPlanID: body.subscriptionPlanId?.rawValue ?? body.planId.rawValue,
Comment thread
lawrencecchen marked this conversation as resolved.
Resolved
isPro: body.isPro,
billingManagement: body.billingManagement.rawValue
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,53 @@ public struct CmuxAccountPlan: Sendable, Hashable {
public var userID: String
/// Primary email, or the empty string when the Stack user has none.
public var email: String
/// Resolved plan identifier, currently `"free"` or `"pro"`.
/// Resolved plan family, `"free"` or `"pro"` (a Max subscriber is `"pro"` here).
public var planID: String
/// The exact personal plan: `"free"`, `"pro"`, or `"max"`.
public var subscriptionPlanID: String
/// Whether the account has an active Pro entitlement.
public var isPro: Bool
/// How billing is managed for this account: `"stripe"`, `"external"`, or `"none"`.
public var billingManagement: String

/// Backward-compatible initializer for callers that only know the plan family.
public init(
userID: String,
email: String,
planID: String,
isPro: Bool,
billingManagement: String
) {
self.init(
userID: userID,
email: email,
planID: planID,
subscriptionPlanID: planID,
isPro: isPro,
billingManagement: billingManagement
)
}

/// Creates an account plan snapshot.
/// - Parameters:
/// - userID: Stack user id of the signed-in account.
/// - email: Primary email, or the empty string when there is none.
/// - planID: Resolved plan identifier (`"free"` or `"pro"`).
/// - planID: Resolved plan family (`"free"` or `"pro"`).
/// - subscriptionPlanID: The exact personal plan (`"free"`, `"pro"`, or `"max"`).
/// - isPro: Whether the account has an active Pro entitlement.
/// - billingManagement: `"stripe"`, `"external"`, or `"none"`.
public init(
userID: String,
email: String,
planID: String,
subscriptionPlanID: String,
isPro: Bool,
billingManagement: String
) {
self.userID = userID
self.email = email
self.planID = planID
self.subscriptionPlanID = subscriptionPlanID
self.isPro = isPro
self.billingManagement = billingManagement
}
Expand Down
11 changes: 10 additions & 1 deletion Packages/Shared/CmuxAPIClient/Sources/CmuxAPIClient/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"get": {
"operationId": "account.me",
"summary": "Get the authenticated account and plan",
"description": "Returns the signed-in user's id, primary email, and resolved billing plan (free or pro).",
"description": "Returns the signed-in user's id, primary email, and resolved billing plan (free, pro, or max).",
Comment thread
lawrencecchen marked this conversation as resolved.
Resolved
"tags": [
"Account"
],
Expand All @@ -39,6 +39,15 @@
],
"type": "string"
},
"subscriptionPlanId": {
"enum": [
"free",
"go",
"pro",
"max"
],
"type": "string"
},
"isPro": {
"type": "boolean"
},
Expand Down
Loading
Loading