Adds packages/raccoon, @magpie-community/opencode-raccoon-auth, for SenseTime Raccoon (商汤小浣熊, xiaohuanxiong.com).
- Sign-in: through the browser, or reusing Raccoon desktop's live sign-in.
- Lists the models and makes chat requests.
- Reads account credits (balance and bills).
- Runs the daily check-in through auth.checkin, plus the desktop's first-login grant. The grant is marked settled only when the vendor gives a definite answer.
What was run, at the reviewed head 6078f92 merged onto origin/main 4e64f26:
- HOME=$(mktemp -d) bun test packages/raccoon: 21 pass, 0 fail.
- bun scripts/check.mjs: every package ✓, raccoon included.
- Whole repo, HOME=$(mktemp -d) bun test: 1575 pass, 1 fail.
- The failure was grok's "a login's link is still handed on", a 5s timeout. Another full suite was running on the machine at the same time.
- The test passed 5 of 5 when run alone.
- It is filed separately.
- The raccoon code is byte-identical to c068cc5. That head was reviewed line by line on the PR, and every fix was broken by hand to check that its test goes red. 6078f92 only merges main.
- The package isn't on npm yet. magpie serves it from the dist branch until an owner publishes 0.1.0 (scripts/new-to-npm.sh).
Not verified: a real Raccoon account. Only the reply bytes the author captured were used.