Detect plan tier from .claude.json; seed sane caps per tier (Pro/Max 5x/Max 20x)

This commit is contained in:
megaproxy 2026-05-09 00:54:50 +01:00
parent 106ad28f9f
commit ef84257ddd
7 changed files with 236 additions and 7 deletions

View file

@ -58,3 +58,13 @@ export interface ResolvedRoots {
wsl_distro: string | null;
native_present: boolean;
}
// Mirrors PlanTier in src-tauri/src/tier.rs. The Rust enum is serde-tagged
// externally, so the wire shape is `"Max5x"` for unit variants and
// `{ MaxOther: "raw-string" }` for tuple variants — we just keep it as
// `unknown` here and rely on `label` for display.
export interface TierInfo {
tier: unknown;
label: string;
recommended_caps: Caps;
}