Skip to main content

Module token_maxing

Module token_maxing 

Source
Expand description

Token Maxing Mode (RFC-031).

Autonomous burn of subscription-quota providers during a user-configured time window. The hard rule: only subscription providers are eligible — metered keys can never be silently drafted into a maxing run.

Architecture:

  • config — TOML schema ([token-maxing]).
  • budgetProviderBudget, the self-tracked counter. Reuses the BudgetManager window+reset pattern, re-keyed by provider.
  • quota_trackerQuotaTracker, the decision layer that merges self-tracked, recalibration, and reactive 429 signals into one Availability verdict per provider.
  • plannerWorkPlanner, three-source task synthesis (autonomous skills → projects/mounts → recurring patterns). (Phase 3.)
  • maxerTokenMaxer, the drain → rotate → wait → resume loop. (Phase 3.)
  • sessionTokenMaxingSession + persisted report. (Phase 3.)

The non-obvious invariant is the eligibility check: providers missing from [token-maxing.providers] (or any with billing_model != "subscription") are never eligible. This is the single choke point that upholds the user’s “절대 동작하면 안 된다” constraint.

Re-exports§

pub use budget::ProviderBudget;
pub use budget::ProviderSnapshot;
pub use budget::ProviderState;
pub use budget::ReserveError;
pub use config::SUBSCRIPTION_BILLING_MODEL;
pub use config::TokenMaxingConfig;
pub use config::TokenMaxingProviderConfig;
pub use maxer::TokenMaxer;
pub use planner::PlannedTask;
pub use planner::WorkPlanner;
pub use quota_tracker::Availability;
pub use quota_tracker::CooldownRecord;
pub use quota_tracker::QuotaTracker;
pub use quota_tracker::QuotaTrackerSnapshot;
pub use quota_tracker::RecalibrationOutcome;
pub use quota_tracker::RecalibrationRecord;
pub use session::MaxerStatus;
pub use session::MaxingStart;
pub use session::MaxingWindow;
pub use session::ProviderSessionRecord;
pub use session::ProviderWindowRecord;
pub use session::SessionTotals;
pub use session::StopReason;
pub use session::TaskRecord;
pub use session::TaskSource;
pub use session::TokenMaxingSession;

Modules§

budget
Self-tracked per-provider budget (RFC-031 §4, Phase 1).
config
Token Maxing configuration (RFC-031 §2).
maxer
TokenMaxer orchestrator (RFC-031 §5).
planner
WorkPlanner — three-source task synthesis (RFC-031 §7).
quota_tracker
QuotaTracker — the per-provider availability decision layer (RFC-031 §4).
session
TokenMaxingSession + report (RFC-031 §8).