Repository navigation
[JET] Add Alibaba and Xiaomi MiMo Token Plan quota readers - #554
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
|
Automatic approval held Kody's assessment:
|
jaywedgeworth22
marked this pull request as ready for review
November 25, 2026 05:50
Contributor
| Autofix run https://github.com/Simple-With-Us/CodeCaps/actions/runs/45556595708 started for `sentry[bot]`'s tagged request. Owner/sentry request: exempt from the per-bot cap (owner rule 2026-10-20). |
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
jaywedgeworth22
enabled auto-merge (squash)
November 25, 2026 06:13
This was referenced Nov 25, 2026
jaywedgeworth22
added a commit
that referenced
this pull request
Nov 26, 2026
…efs OPS-1122) (#556) * Add OpenCode Go reader, declarative endpoint plugins, and UI/perf review fixes (Refs OPS-1122) - OpenCode Go: documented usage endpoint via the CLI's local auth file - Endpoint plugins: validated JSON descriptors in the Plugins folder, generic bounded reader, SSRF gate, Settings toggles without recompiling - Alibaba/MiMo/Qwen verified against #554/#555 (already on main), docs updated - UI: sentenceGap, accent-ink shortcut, logo fallback from reader list, PiP keyboard/VoiceOver access, larger tertiary labels, keyboard splitter, popup no longer auto-expires for VoiceOver/Reduce Motion, right-click hint - Perf: snapshot-write chain predecessor deadline surfaces a stuck write instead of stalling silently; v2 publisher retries transient 502/503/504 * Avoid reloading plugin descriptors per logo-style row (Refs OPS-1122) * Declare OpenCode Go reader conformance (Refs OPS-1122) * Fix banner string syntax (Refs OPS-1122) * Address Kody findings on endpoint plugins (Refs OPS-1122) - Restrict bearerEnv to CODECAPS_PLUGIN_-prefixed variables and name the missing variable in the plugin issue - Refuse non-canonical IP literals (hex/octal/bare-integer/leading-zero) and scope the loopback port exception to loopback hosts only - Reject descriptors with both percent paths; dedicated badDisplayName error - Reject out-of-range percentages instead of clamping them - Cache plugin loads for Settings rows and reader toggles * Fix trailing-dot, cache-stamp and absolute-fallback findings (Refs OPS-1122) * Scan plugins off the cache lock (Refs OPS-1122) * Single-flight the plugin cache scan (Refs OPS-1122)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Alibaba Token Plan and Xiaomi MiMo Token Plan as optional local quota readers. Both are opt-in and appear in Settings → Sources & Fleet.
Alibaba reads quota by running the signed-in Bailian CLI (
bl usage token-plan --output json) and parses only reportedper*Percentagewindows with reset times. Missing quota or malformed windows are treated as unavailable, not full. No browser profile is read.Xiaomi MiMo reads quota from the matching regional credits endpoint using an individual Token Plan key (
tp-format) and region (China / Singapore / Europe) saved in the Mac Keychain via newMiMoQuotaSettings. Saving a new key flushes the prior reading before re-enabling the reader. The parser preserves the reported credit balance and billing-cycle period rather than assuming monthly.Also wires both readers into
LocalQuotaReaderRegistryandMonitorModel, defaults new Token Plan readers to disabled while leaving existing reader defaults unchanged, addsdocs/TOKEN-PLAN-SOURCES.md, and renames a local variable inSettingsInfisicalPage.Tests added in
TokenPlanQuotaReaderTestscover Alibaba window parsing and invalid-data handling, MiMo credit and period parsing including exhausted and expired cases, fixed regional hosts, and opt-in defaults. No test run results, deployment, or live account and region verification are reported in the changes, so live behavior remains unverified.Unresolved risk: automated review reports MainActor state mutated from a non-isolated
TaskinMiMoQuotaSettings.save()(`MiMoQuotaSettings.swift:63).