Skip to content

v0.1.0

Choose a tag to compare

@MisonL MisonL released this 04 Nov 06:28
· 144 commits to main since this release
afc2c8b

First public release — published on npm as magpie-plugin-msmoli@0.1.0.

What it does

A magpie plugin that claims ModelScope's
(魔搭) daily 魔粒 credits for you — one check-in a day instead of opening
the site — and shows the balance and today's spend on the account's usage card.

  • Daily check-in. GET /api/v1/users/login/info is the claim trigger; the
    plugin reads the ledger, touches the endpoint, then reconciles against the
    ledger again, so "claimed 200" is what actually landed, not what was asked
    for. Idempotent within the day.
  • Check-in window. Defaults to 08:30–10:00 Beijing time, configurable in
    msmoli.json; the end is capped at 23:00 so a retry still lands on the same
    day.
  • Usage card. 魔粒 balance, today's earned/spent, and the countdown to when
    the day's grants expire (24 hours after they land).
  • Token sync CLI. npx magpie-plugin-msmoli copies an existing ModelScope
    key between magpie's built-in preset and this plugin's sign-in, without ever
    printing the token.
  • No models registered. Chat keeps using the built-in modelscope preset;
    this provider exists only to carry the sign-in the check-in runs as.

Install

magpie plugin add magpie-plugin-msmoli
printf 'ms-your-token\n' | magpie plugin login msmoli

Or install from GitHub (magpie plugin add github:MisonL/magpie-plugin-msmoli)
or from a clone — all three are in the README.

Notes

  • Tests: 431 at this tag, run on Node (three clock modes) and Bun in CI across
    macOS, Windows and Linux.
  • Not listed in magpie's Discover list. The registry PR
    (plugins#714) was
    declined: ModelScope has no check-in endpoint, so the plugin makes the server
    count a website sign-in, and the market does not simulate rewards that are
    meant to require real activity. ModelScope's terms prohibit plugins that
    interfere with the service and "刷分", so use of this package is a risk taken
    on your own account. The project will not submit it to the market again;
    it stays installable by name from npm. The English README's
    "Purpose, responsibility, and risk" section states this in full.