feat(providers): Add StepFun provider#815
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5a383ea14
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
6be1d46 to
8738e10
Compare
Add StepFun (阶跃星辰) as a new web-based provider that monitors Step Plan rate limits via the platform.stepfun.com API. Authentication flow: - Auto mode: username + password login via 3-step flow (INGRESSCOOKIE → RegisterDevice → SignInByPassword → Oasis-Token) - Manual mode: direct Oasis-Token paste - Token cached in CookieHeaderCache (Keychain-backed) Usage data: - Primary: 5-hour rate limit window (five_hour_usage_left_rate) - Secondary: weekly rate limit window (weekly_usage_left_rate) - Reset times from API (supports both string and int timestamp formats) Files added: - CodexBarCore/Providers/StepFun/: descriptor, fetcher, settings reader - CodexBar/Providers/StepFun/: implementation, settings store - ProviderIcon-stepfun.svg, StepFunUsageFetcherTests.swift
…napshot - Apply token-account overrides in StepFun settings snapshot so per-account usage fetching works correctly (P1) - Respect Off auth source in isAvailable — don't fetch when cookieSource is .off (P2) - Add StepFun case to CLI snapshot builder so --account/--all-accounts can pass tokens through settings (P2)
- Fetch subscription plan name from GetStepPlanStatus endpoint - Display plan name (e.g. Plus, Mini) as loginMethod in UI - Gracefully degrade: if plan status fails, usage still shows
- Add StepFun entry to Providers section in README.md - Add docs/stepfun.md with auth flow, data sources, and key files
8738e10 to
19981ba
Compare
Summary
Adds StepFun (阶跃星辰) as a new web-based provider that monitors Step Plan rate limits via the
platform.stepfun.comAPI.Authentication
StepFun uses a username + password login flow to obtain an Oasis-Token session:
Auto mode (default): Enter username/password in Settings UI → app automatically performs the 3-step login flow:
INGRESSCOOKIEfrom platform homepageRegisterDevice→ get anonymous tokenSignInByPassword→ get authenticated Oasis-TokenCookieHeaderCachefor reuseManual mode: Directly paste an Oasis-Token from a browser session
Environment variables:
STEPFUN_USERNAME+STEPFUN_PASSWORD, orSTEPFUN_TOKENUsage Data
five_hour_usage_left_rateweekly_usage_left_rateReset times are displayed from
five_hour_usage_reset_time/weekly_usage_reset_time.Files Added
Sources/CodexBarCore/Providers/StepFun/— descriptor, usage fetcher, settings readerSources/CodexBar/Providers/StepFun/— app implementation, settings storeSources/CodexBar/Resources/ProviderIcon-stepfun.svg— provider iconTests/CodexBarTests/StepFunUsageFetcherTests.swift— 22 test casesFiles Modified
Providers.swift— addedcase stepfuntoUsageProvider/IconStyleProviderDescriptor.swift— registered StepFun descriptorProviderImplementationRegistry.swift— added implementation factoryProviderTokenResolver.swift— addedstepfunResolution()ProviderSettingsSnapshot.swift— addedStepFunProviderSettingsTokenAccountSupportCatalog+Data.swift— added token account support.stepfuncasesTesting
"1777528800") and integer timestamps, and both integer (1) and float (0.99781543) rate values