Repository navigation
Add 蹬王之王 / Expiry Sentinel: spend whichever credit expires first - #1
Closed
Hylouis233 wants to merge 2 commits into
Closed
Hylouis233 wants to merge 2 commits into
Hylouis233 wants to merge 2 commits into
Conversation
A Mini App that tracks MiniMax Code credit and reset card expiry, then automatically spends whichever lapses first so nothing expires unused. - Dashboard shows expiry alerts, 5-hour quota, credit balance, next expiry - Decision rule compares the earliest-expiring credit against the earliest-expiring reset card; a parity test keeps the Node service and the Rust daemon from drifting apart - Optional Rust daemon keeps checking via launchd after the page is closed - README in English and Simplified Chinese, with screenshots from a live run
Owner
Author
|
这个 PR 是本插件的第一版(目录名还是 之后的演进都在
|
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.
中文说明
这个 Mini App 做什么
MiniMax Code 的积分和重置卡都会到期。放着不管,最快到期的那笔会悄悄作废,而你一直在用最耐放的那笔。
蹬王之王把每笔余额和到期日摊开给你看,然后「先过期先用」——不浪费,也不过期。
决策规则
5 小时或周限额耗尽时,请求开始扣积分——这就是该动手的时刻。应用会比两个日期:
Node 服务和后台守护进程实现同一套规则,并有逐字比对的一致性校验,防止两边漂移。
三种使用方式
三条路径共用同一套决策规则,服务端按幂等键去重——即使同时开着,卡也不会被扣两次。
截图
来自应用的实际运行:一张是看板全景,一张是重置卡列表与已用统计。
Review 说明
daemon/下,以 Rust 源码形式提供,不提交构建产物;用cargo build --release构建。它暴露一个--selftest模式,喂给它与 Node 服务相同的一组用例,一致性检查比对的就是这两者。~/.minimax/run/mcode-auth-lease-v1.sock—— 这是内部路径,已在## Data & access中说明。www.minimaxi.com与agent.minimaxi.com。无遥测、无外部服务。npm run check对本包报告OK,无警告。