is_restricted_tier_name (src/tier.rs)

grok-build · crates/codegen/xai-grok-shell/src/tier.rs · rust · Apache-2.0
auth

Determines if a subscription tier name is restricted (free or X Basic) for gating logic.

// Source: https://github.com/xai-org/grok-build | License: Apache-2.0 | Copyright 2023-2026 SpaceXAI
// Provided via justclaw.it.com; keep this notice with the code.
//! Subscription-tier classification shared across the shell and the pager.
//!
//! The subscription tier reaches the client as a free-form **display-name string**.
//! It comes from CCP `/settings` `subscription_tier_display`, or from the numeric JWT `tier` claim.
//! [`crate::agent::mvp_agent::jwt_tier_claim`] maps the numeric claim to a display-style string.
//! There is no shared enum, so gating decisions classify the string here in ONE place.
//! That keeps the pager's cosmetic slash-command gate and the shell's capability (toolset) gate from drifting apart.
//!
//! "Restricted" tiers are the personal free tier and X Bas

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key