Support Enterprise automation account plans (#36228)

## What changed

- Recognize `enterprise_cbp_automation` as an Enterprise workspace plan in authentication, backend responses, and app-server account and rate-limit APIs.
- Expose the plan in generated protocol schemas and display it as `Enterprise (Automation)` in account status.
- Apply existing workspace eligibility and Business usage-limit behavior to the new plan.

## Testing

- Cover JWT parsing, plan conversion and serialization, app-server responses, workspace eligibility, usage-limit formatting, and TUI status rendering.

GitOrigin-RevId: d84ae2be3dd60fe398f226e6dc434efe27a387a5
This commit is contained in:
sashank-oai authored and copyberry committed 2026-07-30 21:49:53 +00:00
1 parent a01a2d9146
commit 3016671bb0
22 files changed
+106 -14

No files matched your search

+11
View File
@@ -77,6 +77,7 @@ impl PlanType {
}
"business" => Self::Known(KnownPlan::Business),
"ent26" => Self::Known(KnownPlan::Ent26),
"enterprise_cbp_automation" => Self::Known(KnownPlan::EnterpriseCbpAutomation),
"enterprise_cbp_usage_based" => Self::Known(KnownPlan::EnterpriseCbpUsageBased),
"enterprise" | "hc" => Self::Known(KnownPlan::Enterprise),
"education" | "edu" => Self::Known(KnownPlan::Edu),
@@ -100,6 +101,8 @@ pub enum KnownPlan {
SelfServeBusinessUsageBased,
Business,
Ent26,
#[serde(rename = "enterprise_cbp_automation")]
EnterpriseCbpAutomation,
#[serde(rename = "enterprise_cbp_usage_based")]
EnterpriseCbpUsageBased,
#[serde(alias = "hc")]
@@ -121,6 +124,7 @@ impl KnownPlan {
Self::SelfServeBusinessUsageBased => "Self Serve Business Usage Based",
Self::Business => "Business",
Self::Ent26 => "Enterprise",
Self::EnterpriseCbpAutomation => "Enterprise (Automation)",
Self::EnterpriseCbpUsageBased => "Enterprise CBP Usage Based",
Self::Enterprise => "Enterprise",
Self::Edu => "Edu",
@@ -139,6 +143,7 @@ impl KnownPlan {
Self::SelfServeBusinessUsageBased => "self_serve_business_usage_based",
Self::Business => "business",
Self::Ent26 => "ent26",
Self::EnterpriseCbpAutomation => "enterprise_cbp_automation",
Self::EnterpriseCbpUsageBased => "enterprise_cbp_usage_based",
Self::Enterprise => "enterprise",
Self::Edu => "edu",
@@ -153,6 +158,7 @@ impl KnownPlan {
| Self::SelfServeBusinessUsageBased
| Self::Business
| Self::Ent26
| Self::EnterpriseCbpAutomation
| Self::EnterpriseCbpUsageBased
| Self::Enterprise
| Self::Edu
@@ -201,5 +207,10 @@ mod tests {
.expect("education should deserialize"),
PlanType::Known(KnownPlan::Edu)
);
assert_eq!(
serde_json::from_str::<PlanType>("\"enterprise_cbp_automation\"")
.expect("enterprise cbp automation should deserialize"),
PlanType::Known(KnownPlan::EnterpriseCbpAutomation)
);
}
}