magpie-plugin-loomy-auth 0.1.21 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -65,6 +65,7 @@ curl -s "https://usemagpie.ai/api/latest?channel=stable" | grep -o '"version":"[
65
65
  | 14 | npm 上装到了别人的包 | 本仓库 **npm 包名 ≠ 仓库名**:npm 是 `magpie-plugin-loomy-auth`,仓库是 `magpie-loomy-auth`。加 `-plugin-` 段就是为了避开撞名 | internals 从本地 tgz 安装 |
66
66
  | 15 | 卡片标题 / 源码按钮不对 | `registry-entry.json` 的 `package` 必须与 **npm 包名**(`publish-npm.mjs` 的 `PUBLISH_AS`)一字不差;`name` 才是市场显示名(`<中文> <English>`);插件不写 magpie 的市场缓存 | internals 从本地 tgz 安装 |
67
67
  | 16 | 长对话里某个号回 `400 内容太长了,请精简输入或开启新对话`,**整轮会话直接失败**,组里其它号一次没被问 | magpie 的 `tooLongRe`(`internal/gateway/gateway.go:7484`)中文只认 `上下文(长度)?(超\|过长)` 与 `超(过\|出)(了)?(模型)?(的)?(最大)?上下文` —— 这条文案一个「上下文」都没有 ⇒ `overflowed()` 为假 ⇒ 不换号、不 rest,把 400 摔给客户端。本插件在 `chatFetch` 里改写成 `上下文超出长度限制`(只换文案,状态码与其余字段原样)。**根因在别处**:`yetone/magpie#3654` —— 同一个模型在组内/组外报的 `contextWindow` 不同,agent 看见数字变了就把整个历史重新组装一次,一次请求带两份历史(实测 msgs 558→1175、字符 6.4×)。判据:`node tests/too-long.test.mjs` | CHANGELOG 0.1.19 · `src/chat.mjs` · magpie#3654 |
68
+ | 17 | **上游偶发或固定回 403 `TM.00000001`(文案是「网络繁忙,请稍后重试」),重试和换账号都没用**;或者某个 provider 换到新网络 / 新账号后就不通 | 每个打上游的 `fetch` 都**显式**带 `User-Agent`,值是**该服务官方客户端**的 UA —— 绝不写 `<包名>/<版本号>`,也绝不让宿主的 `magpie/<version>` 透传(插件不设 UA 时它就这么上去)。官方是网页就用完整 Chrome UA;有 App / CLI 客户端就用那个客户端的 UA。判据:`node scripts/check-ua.mjs` 退出 0(模板坑表第 38 条) | README「3. User-Agent 常常是硬校验」· `scripts/check-ua.mjs` |
68
69
 
69
70
  ---
70
71
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
3
3
  > 每个版本一节,**一条一行**,说用户能感知的变化。
4
4
  > 格式与发布流程见 [magpie-plugin-scaffold](https://github.com/MYCF711/magpie-plugin-scaffold) 的 [UPDATING.md](https://github.com/MYCF711/magpie-plugin-scaffold/blob/main/UPDATING.md)。
5
5
 
6
+ ## 0.1.22 — 2026-11-04
7
+
8
+ **出站 UA 全部换成官方客户端 UA(同步脚手架 0.3.10 的坑表第 38 条)**
9
+
10
+ - 上游网关按 `<product>/<version>` 形态识别「第三方客户端」,命中即回
11
+ `403 {"error_code":"TM.00000001","error_msg":"网络繁忙,请稍后重试"}`;而 magpie 给插件宿主
12
+ 的 UA 固定是 `magpie/<version>`,插件不显式覆盖就原样透传,同样命中
13
+ - 本仓库所有打上游的出站点改为显式带**官方客户端** UA;不再出现 `<包名>/<版本号>`、
14
+ `node`、`Bun/…` 或截断的 Mozilla
15
+ - 新增 `scripts/check-ua.mjs`(`npm run check:ua`,0 = 合规)、`AGENTS.md` 坑表第 17 条、
16
+ `CHECKLIST.md` 的 UA 勾选项
17
+
18
+ **错误出口对齐 ERROR-CODES.md(CI「供应商插件规定」判的两条 R2 / R8)**
19
+
20
+ - 本地额度闸那记 429 的 `code` 从自造的 `insufficient_points` 改成词表里的
21
+ `rate_limited`(429 · 可退避 · 换号有救),错误体补 `status: 429`。词表外的码宿主不认识,
22
+ 等于既不退避也不换号
23
+ - 请求**没拿到响应**时不再一律 502:20 秒超时 → `504 upstream_timeout`,断连/拒连/DNS →
24
+ `503 upstream_unavailable`。502 表示「上游给了明确的错误体(业务错误)」,落在这里
25
+ 宿主会既不退避也不换号,把一个「重试就好」的错误直接摔给用户
26
+ - 词表收敛到 `src/constants.mjs` 的 `ERROR_CODES`,新增 `tests/error-codes.test.mjs`
27
+ 锁住 R2 / R8 / R9(76 条测试全过)
28
+
6
29
  ## 0.1.21 — 2026-10-31
7
30
 
8
31
  - **显示名迁移到 `magpie.name`**:`package.json` 的 `name` 改回 ASCII slug `magpie-plugin-loomy-auth`(bun 依赖键,避免 `plugin update` 报 `unrecognised dependency format`);卡片标题由 `magpie.name: "讯飞 Loomy"` 提供(magpie 0.1.2404 的 `magpie.name` 修复)
package/CHECKLIST.md CHANGED
@@ -58,6 +58,14 @@
58
58
  判据:usage 与 outcome 的语义锁没被破坏
59
59
 
60
60
  □ 13. node ../magpie-plugin-scaffold/scripts/check.mjs . 退出码 = 0
61
+
62
+ □ 14. 出站 User-Agent 是官方客户端 UA,不是我们自己的产品名
63
+ 判据:node scripts/check-ua.mjs . 退出码 = 0;
64
+ 插件里搜不到 `magpie/…` / `magpie-xxx/<ver>` / `"node"` / `Bun/…` /
65
+ 截断的 Mozilla(缺 `(KHTML, like Gecko) Chrome/… Safari/537.36`);
66
+ 官方是网页的是完整 Chrome UA,有 App / CLI 客户端的是那个客户端的 UA;
67
+ loader 的 `fetch` 包装里 `"user-agent"` 在跳过名单内、由插件补官方值
68
+ 出处:模板坑表第 38 条 · scripts/check-ua.mjs
61
69
  ```
62
70
 
63
71
  ---
package/README.md CHANGED
@@ -86,7 +86,7 @@ cd ~/.config/magpie/plugins && ~/.cache/magpie/bun/1.4.4/magpie-bun.exe install
86
86
  ```bash
87
87
  magpie plugin list
88
88
  # magpie-plugin-loomy-auth on
89
- # loomy (讯飞 Loomy, 10 models) signed in as 189****8051
89
+ # loomy (讯飞 Loomy, 10 models) signed in as 138****8000
90
90
  ```
91
91
 
92
92
  ⚠ 改了代码要 **bump `version` 再打包** —— 同一版本号重打,bun 会命中缓存(输出 `no changes`)。
package/docs/internals.md CHANGED
@@ -11,7 +11,7 @@ Loomy(讯飞)做成 magpie 供应商插件:**桌面端登录态导入 /
11
11
 
12
12
  ```
13
13
  magpie-plugin-loomy-auth on
14
- loomy (讯飞 Loomy, 10 models) signed in as 189****8051
14
+ loomy (讯飞 Loomy, 10 models) signed in as 138****8000
15
15
  ```
16
16
 
17
17
  ---
@@ -136,7 +136,7 @@ Loomy 还有第三笔额度 —— **新手任务奖励**,总计 10,000 分,
136
136
  - **单独缓存 10 分钟**:`onboarding/tasks` 是另一个端点,而 `usage` 会被频繁
137
137
  刷新 —— 不能每次都打。
138
138
 
139
- > 实况:`181****0632` 余额 0,但还有 10,000 分新手任务可领。卡片会如实显示,
139
+ > 实况:`138****8000` 余额 0,但还有 10,000 分新手任务可领。卡片会如实显示,
140
140
  > 不会因为「余额 0」就把这个人判死刑。
141
141
 
142
142
  ### 邀请码:签到时自动兑换(不在注册时)
@@ -144,10 +144,10 @@ Loomy 还有第三笔额度 —— **新手任务奖励**,总计 10,000 分,
144
144
  **实测结论(2026-10-26,真号跑的)**:邀请双方**各得 5000**,不是 2000。
145
145
 
146
146
  ```
147
- 操作:181****0632 兑换 189****8051 的码 E4DPT6(走 bindInviteCode → POST /points/activation)
147
+ 操作:138****8000 兑换 138****8000 的码 E4DPT6(走 bindInviteCode → POST /points/activation)
148
148
 
149
- 189****8051 永久积分 14860 → 19860 (+5000) 流水:+5000 邀请好友奖励
150
- 181****0632 永久积分 10000 → 15000 (+5000) 流水:+5000 填写邀请码奖励
149
+ 138****8000 永久积分 14860 → 19860 (+5000) 流水:+5000 邀请好友奖励
150
+ 138****8000 永久积分 10000 → 15000 (+5000) 流水:+5000 填写邀请码奖励
151
151
  E4DPT6 usedCount 0 → 1 181 activation false → true
152
152
  ```
153
153
 
@@ -244,10 +244,10 @@ node tests/live.mjs # 真实账号 + 真实上游(只读 + 幂等签到
244
244
  `tests/live.mjs` 在真账号上的当前输出(2026-10-26):
245
245
 
246
246
  ```
247
- === loomy 18970098051
247
+ === loomy <PHONE>
248
248
  balance=8979 积分 used=30.42% limit=5000 永久池 aside
249
249
  checkin → {"outcome":"done","message":"今日额度已刷新(3479/5000 积分)"}
250
- === loomy#0zloqw 18170800632
250
+ === loomy#0zloqw <PHONE>
251
251
  balance=0 积分 used=100 ← 参与路由,会让这个号沉底
252
252
  checkin → {"outcome":"done",...}
253
253
  ✅ 全部通过
@@ -328,8 +328,8 @@ magpie 的「有新版本」检查按**包名**去 npm 查,与仓库属主无
328
328
 
329
329
  ```
330
330
  credit(25,000) − debit(consumeSource=permanent) = balance
331
- 189****8051: 25,000 − 140 = 24,860 ✅ 与接口 balance 一致
332
- 181****0632: 25,000 − 5,000 = 20,000 ✅ 与接口 balance 一致
331
+ 138****8000: 25,000 − 140 = 24,860 ✅ 与接口 balance 一致
332
+ 138****8000: 25,000 − 5,000 = 20,000 ✅ 与接口 balance 一致
333
333
  ```
334
334
 
335
335
  ⚠ **每日池的消耗不算在内**(`consumeSource: "daily"`)—— 那部分不动永久积分。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magpie-plugin-loomy-auth",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "讯飞 Loomy (iFlytek) for magpie: desktop-session import / SMS / session sign-in, live model catalog with reasoning efforts, chat with tools and images, and the two credit pools reported as the host routes them — the daily pool counts, the permanent one is shown aside.",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",
@@ -40,7 +40,8 @@
40
40
  },
41
41
  "scripts": {
42
42
  "test": "node --test tests/*.test.mjs",
43
- "publish:npm": "node publish-npm.mjs"
43
+ "publish:npm": "node publish-npm.mjs",
44
+ "check:ua": "node scripts/check-ua.mjs ."
44
45
  },
45
46
  "magpie": {
46
47
  "icon": "https://raw.githubusercontent.com/MYCF711/magpie-loomy-auth/main/assets/icon.png",
package/publish-npm.mjs CHANGED
@@ -1,16 +1,15 @@
1
1
  // 发布到 npm 的包装器 —— 用 `npm run publish:npm`。
2
2
  //
3
- // package.json 的 name 现在是 ASCII slug(magpie-plugin-loomy-auth),也就是 npm 包名;
4
- // 卡片标题改用 magpie.name(讯飞 Loomy)。所以发布时不需要再临时换 name。
3
+ // package.json 的 name 是 ASCII slug(= npm 包名);卡片标题在 magpie.name。
4
+ // 发布时不需要换 name;只有在 name 与 PUBLISH_AS 不一致的旧分支上才临时换,发完恢复。
5
5
  //
6
- // 保留这个包装器是为了旧分支/旧文档仍走同一条命令;它只在 name 与 PUBLISH_AS
7
- // 不一致时才临时换名,发布后无论成败都恢复。
6
+ // CI=true 时,npm 报「同版本已存在」(E409 / previously staged)按成功处理:
7
+ // 本地 release 已发过同一版,tag 触发的 workflow 不该因此变红。
8
8
 
9
9
  import fs from "node:fs"
10
10
  import { fileURLToPath } from "node:url"
11
- import { execSync } from "node:child_process"
11
+ import { spawnSync } from "node:child_process"
12
12
 
13
- /** npm 上的包名。与仓库里的 name 相同是正常的。 */
14
13
  const PUBLISH_AS = "magpie-plugin-loomy-auth"
15
14
 
16
15
  const FILE = fileURLToPath(new URL("./package.json", import.meta.url))
@@ -24,7 +23,22 @@ if (renamed) {
24
23
  }
25
24
 
26
25
  try {
27
- execSync(process.argv[2] || "npm publish --access public", { stdio: "inherit" })
26
+ const r = spawnSync(process.argv[2] || "npm publish --access public", {
27
+ shell: true,
28
+ encoding: "utf8",
29
+ })
30
+ if (r.stdout) process.stdout.write(r.stdout)
31
+ if (r.stderr) process.stderr.write(r.stderr)
32
+ if (r.status !== 0) {
33
+ const text = `${r.stdout ?? ""}${r.stderr ?? ""}`
34
+ if (process.env.CI === "true" && /E409|previously staged|EPUBLISHCONFLICT|cannot publish over/i.test(text)) {
35
+ console.warn(`\n! npm 已有 ${PUBLISH_AS}@${pkg.version},按已发布处理(CI)\n`)
36
+ process.exitCode = 0
37
+ } else {
38
+ console.error(`\n✗ npm 发布失败:${PUBLISH_AS}@${pkg.version}\n`)
39
+ process.exitCode = 1
40
+ }
41
+ }
28
42
  } finally {
29
43
  if (renamed) {
30
44
  fs.writeFileSync(FILE, orig)
package/src/api.mjs CHANGED
@@ -16,6 +16,7 @@ import {
16
16
  CLIENT_MODEL_ID,
17
17
  CLIENT_UA,
18
18
  CLIENT_VERSION,
19
+ ERROR_CODES,
19
20
  INTEGRATION_BASE,
20
21
  LEDGER_MAX_PAGES,
21
22
  LEDGER_PAGE_SIZE,
@@ -41,7 +42,9 @@ const {
41
42
 
42
43
  function integrationHeaders(session) {
43
44
  // 实测:两个头都要,只给 Authorization 上游回鉴权失败
44
- return { token: session, Authorization: `Bearer ${session}` }
45
+ // UA 恒为官方客户端 UA(CLIENT_UA 是全插件唯一常量);不写就是 fetch 的默认 `node`,
46
+ // 那是「第三方客户端」的信号头之一。
47
+ return { token: session, Authorization: `Bearer ${session}`, "user-agent": CLIENT_UA }
45
48
  }
46
49
 
47
50
  /**
@@ -65,7 +68,7 @@ export async function tokenRequest(method, pathAndQuery, session, body, what, fe
65
68
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
66
69
  })
67
70
  } catch (error) {
68
- throw httpError(502, `${what}失败:${error?.message ?? error}`)
71
+ throw networkError(what, error)
69
72
  }
70
73
 
71
74
  const json = await readJson(res)
@@ -99,8 +102,33 @@ function signInExpired(message) {
99
102
  return Object.assign(new Error(message), { signIn: "expired", status: 401 })
100
103
  }
101
104
 
102
- function httpError(status, message) {
103
- return Object.assign(new Error(message), { status })
105
+ function httpError(status, message, code) {
106
+ const error = Object.assign(new Error(message), { status })
107
+ if (code) error.code = code
108
+ return error
109
+ }
110
+
111
+ /**
112
+ * 请求**没拿到响应**时的状态码(ERROR-CODES.md §2 的判据)。
113
+ *
114
+ * ⚠ 这两种都不许落 502:502 表示「上游给了明确的错误体(业务错误)」,宿主读到它
115
+ * 就既不退避也不换号,直接把这个错误摔给用户 —— 而连接层失败是「上游那边的事,
116
+ * 重试有意义」。判据(R8):超时一律 503/504。
117
+ *
118
+ * 超时(AbortSignal.timeout / 20 秒没响应)→ 504 `upstream_timeout`:宿主退避或换号;
119
+ * 其它(断连 / 拒连 / DNS) → 503 `upstream_unavailable`:暂时不可用,同样可重试。
120
+ */
121
+ function networkError(what, error) {
122
+ const detail = String(error?.message ?? error)
123
+ const timedOut =
124
+ error?.name === "TimeoutError" || error?.name === "AbortError" || error?.code === "ABORT_ERR"
125
+ return timedOut
126
+ ? httpError(
127
+ 504,
128
+ `${what}超时:${REQUEST_TIMEOUT_MS / 1000} 秒内没有响应(${detail})`,
129
+ ERROR_CODES.upstreamTimeout,
130
+ )
131
+ : httpError(503, `${what}连不上上游(${detail})`, ERROR_CODES.upstreamUnavailable)
104
132
  }
105
133
 
106
134
  async function readJson(res) {
@@ -253,12 +281,15 @@ export async function signedPost(path, param, what, fetcher = fetch) {
253
281
  const headers = {
254
282
  ...signedHeaders("POST", path, body, secrets),
255
283
  "Content-Type": "application/json",
284
+ // 签名只覆盖 method/path/digest/content-type/date/nonce,UA 不在签名内;
285
+ // 但出站请求仍必须带官方客户端 UA(见 constants.mjs 的 CLIENT_UA)。
286
+ "user-agent": CLIENT_UA,
256
287
  }
257
288
  let res
258
289
  try {
259
290
  res = await fetcher(`${XFYUN_ACCOUNT_BASE}${path}`, { method: "POST", headers, body, signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS) })
260
291
  } catch (error) {
261
- throw httpError(502, `${what}失败:${error?.message ?? error}`)
292
+ throw networkError(what, error)
262
293
  }
263
294
  const json = await readJson(res)
264
295
  if (!res.ok) throw httpError(res.status, `${what}返回 HTTP ${res.status}`)
@@ -378,8 +409,8 @@ export async function claimAllTasks(session, tasks, fetcher = fetch) {
378
409
  //
379
410
  // 实测(2026-10-26,两个真实账号):
380
411
  // GET /api/v1/invitation-codes → {list:[{inviteCode,usedCount,maxUses,status}]}
381
- // 189****8051 → E4DPT6(上限 1000,已用 0)
382
- // 181****0632 → FDW3CU(上限 1000,已用 0)
412
+ // 138****8000 → E4DPT6(上限 1000,已用 0)
413
+ // 138****8000 → FDW3CU(上限 1000,已用 0)
383
414
  // GET /api/v1/points/activation → {activated:false}
384
415
  // POST /api/v1/points/activation → 绑定别人的邀请码(**每个账号只能一次**)
385
416
  //
package/src/chat.mjs CHANGED
@@ -17,7 +17,7 @@
17
17
  // 漏拦 = 上游回一次错误(有明确文案);错拦 = 一个好好的号发不出请求。
18
18
 
19
19
  import { _pure } from "./pure.mjs"
20
- import { CHAT_TIMEOUT_MS } from "./constants.mjs"
20
+ import { CHAT_TIMEOUT_MS, CLIENT_UA, ERROR_CODES } from "./constants.mjs"
21
21
  import { exhausted } from "./usage.mjs"
22
22
 
23
23
  const { businessCode, isAuthErrorCode, prefersTagFormat, rewriteImagesToTags } = _pure
@@ -32,13 +32,17 @@ export async function chatFetch({ input, init, credential, session, usageValue }
32
32
  bodyText = typeof rawBody === "string" ? rawBody : await new Response(rawBody).text()
33
33
  }
34
34
 
35
- // ④ 已知耗尽:不发给上游,直接回一个明确的 429
35
+ // ④ 已知耗尽:不发给上游,直接回一个明确的 429。
36
+ // `code` 只能取 ERROR-CODES.md §3 词表(R2):耗尽在宿主眼里就是「限流 / 冷却」,
37
+ // 取 `rate_limited`(429 · 可退避 · 换号有救)。自造 `insufficient_points` 属于
38
+ // 词表外的码 —— 宿主不认识就既不退避也不换号,CI 也会直接判失败。
36
39
  if (usageValue && exhausted(usageValue)) {
37
40
  return jsonResponse(429, {
38
41
  error: {
39
42
  message: "Loomy 积分已耗尽(今日额度与永久积分均为 0),请签到或更换账号",
40
43
  type: "rate_limit_error",
41
- code: "insufficient_points",
44
+ code: ERROR_CODES.rateLimited,
45
+ status: 429,
42
46
  },
43
47
  })
44
48
  }
@@ -61,9 +65,13 @@ export async function chatFetch({ input, init, credential, session, usageValue }
61
65
  }
62
66
 
63
67
  const incoming = new Headers(request ? request.headers : init?.headers)
64
- for (const key of ["authorization", "x-api-key", "token", "content-length", "host"]) incoming.delete(key)
68
+ // `user-agent` 必须进跳过名单:magpie 递给插件的是它自己的 `magpie/<version>`,
69
+ // 原样转发就是这个插件在替「第三方客户端」投标(上游网关按 `<product>/<version>` 认人,
70
+ // 命中即 403 TM.00000001)。下面统一换成官方 Loomy 客户端的 UA。
71
+ for (const key of ["authorization", "x-api-key", "token", "content-length", "host", "user-agent"]) incoming.delete(key)
65
72
  incoming.set("token", session)
66
73
  incoming.set("Authorization", `Bearer ${session}`)
74
+ incoming.set("user-agent", CLIENT_UA)
67
75
  if (bodyText) incoming.set("Content-Type", "application/json")
68
76
 
69
77
  let response
package/src/constants.mjs CHANGED
@@ -49,6 +49,24 @@ export const SUCCESS_CODE = "000000"
49
49
  /** 登录态失效的业务码(上游部分错误是 HTTP 200 + 信封 code)。 */
50
50
  export const AUTH_ERROR_CODES = ["020002", "100002"]
51
51
 
52
+ /**
53
+ * ERROR-CODES.md §3 词表里本插件真正用到的几个码。
54
+ *
55
+ * ⚠ `code` 是**机器读**的稳定标识,只能取词表内的值 —— 自造一个码等于没给:
56
+ * 宿主按词表分支,词表外就是「不认识」,既不退避也不换号。CI 的「供应商插件规定」
57
+ * 会静态判这一条(R2),历史上 `insufficient_points` 就是这么挂的。
58
+ *
59
+ * 只列用到的;加码要改 ERROR-CODES.md,不许各插件自己造词。
60
+ */
61
+ export const ERROR_CODES = Object.freeze({
62
+ /** 429 · 可退避 · 换号有救 —— 限流 / 账号冷却,本地额度闸也归这一桶 */
63
+ rateLimited: "rate_limited",
64
+ /** 503 · 可重试 —— 连不上上游(断连 / 拒连 / DNS),是上游那边出事,不是请求的问题 */
65
+ upstreamUnavailable: "upstream_unavailable",
66
+ /** 504 · 可重试 —— 等到超时 / 流被截断,宿主该退避或换号,不是「业务错误」 */
67
+ upstreamTimeout: "upstream_timeout",
68
+ })
69
+
52
70
  export const REQUEST_TIMEOUT_MS = 20_000
53
71
  export const CHAT_TIMEOUT_MS = 300_000
54
72
 
@@ -64,6 +82,13 @@ export const APP_ID = trim(process.env.LOOMY_XFYUN_APP_ID) || "GM3LOOMY"
64
82
 
65
83
  export const CLIENT_MODEL_ID = "Web"
66
84
  export const CLIENT_DEVICE_ID = "web"
85
+ /**
86
+ * 官方 Loomy 桌面客户端的 UA —— **本插件唯一的 UA 常量**。
87
+ * 三处出站都要用它:chat(loader 的 fetch)· 业务/积分网关 · 账号签名 API;
88
+ * 与签名体 `base.ua` 是同一个值。
89
+ * 禁止出现 `magpie/…` / `magpie-…/…` 形态:上游网关按 `<product>/<version>`
90
+ * 认第三方客户端,命中即 403;不显式设置时 fetch 的默认 UA(`node`)同样不合规。
91
+ */
67
92
  export const CLIENT_UA = "Loomy|Desktop|Electron|macOS"
68
93
  export const CLIENT_VERSION = "1.0.0"
69
94