Files
plugins/packages/free-tokens/src/allowlist.js
T
Mingchen Yuandsljdxde 7262e70c6c free-tokens: AIHOT Token 羊毛 page (#885)
New page plugin: AIHOT's Token 羊毛 (free model allowances), sorted into "ready" / "plugin to set up" / "no plugin" against the user's own magpie plugins. Only the vendors in src/allowlist.js are shown; anything else (relays included) is dropped before it reaches the page.

AIHOT's written approval (2026-11-10) is quoted on the PR: free, no ads or sponsors, each user reads it once on their own computer, no proxy, mirror or redistribution, credited in the footer.

Run at 07da91b0 (on mote):
- bun test packages/free-tokens: 62 pass. bun scripts/check.mjs free-tokens: ok.
- The page served with magpie's page CSP in a sandbox="allow-scripts" frame, Chromium and WebKit: tiles 1/2/1 for a fixture of MiniMax (signed in, checked in today), ZCode (installed, not signed in), Zed (not installed), DeepSeek (no plugin) and an unlisted relay (dropped); install popover gives @magpie-community/opencode-zed-auth, login popover "magpie plugin login zcode"; a title holding <img onerror> is shown as text; brand icons load; no dialog.
- Every mapped package checked: 8 on npm, 5 on the dist branch, and each pid is the package's provider id.
- Broken by hand: checkin null guard removed, title unescaped, Zed's npm name unscoped; each turns a test red.

Not tried: a real magpie window with the plugin installed, and the live aihot.news route (no network in the run).

Co-authored-by: sljdxde <sljdxde@users.noreply.github.com>
2026-11-10 09:28:19 +08:00

11 lines
762 B
JavaScript

// 只展示 AIHOT 上「厂商/平台自己的官方额度」,不展示第三方中转站。
// 新增官方厂商需在此登记;不在名单里的 provider 一律不发到页面(安全默认拒绝)。
export const OFFICIAL_PROVIDERS = new Set([
"豆包", "华为云 OfficeAce", "商汤小浣熊", "腾讯 ima",
"Cloudflare", "fal", "MiniMax", "阿里云 Qoder", "字节 TRAE", "腾讯 WorkBuddy",
"WPS 灵犀", "蚂蚁百灵", "腾讯 EdgeOne", "书生·端砚", "腾讯云 ADP",
"ElevenLabs", "Zed", "百度千帆", "阿里云百炼", "超算互联网", "DeepSeek",
"腾讯云 TokenHub", "火山方舟", "华为云码道", "腾讯云开发", "智谱 AutoClaw",
"智谱 ZCode", "商汤日日新", "OpenCode", "阶跃星辰", "SoMark",
]);