magicrew-auth 0.3.38 → 0.3.39

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/CHANGELOG.md CHANGED
@@ -1,7 +1,18 @@
1
1
  # 更新记录
2
2
 
3
+ ## 0.3.39 — 2026-10-29
4
+
5
+ **点开「邀请上级」时提示文本刷新到当时态**
6
+
7
+ 0.3.38 靠 `ask()` 动态生成提示;部分宿主/调用路径直接读 `prompts` 时仍是插件
8
+ 加载时那一份。现在 `prompts` 改成 **getter**:每次 magpie 点开登录方式时按当时
9
+ 的 `magicrew-invite-<site>.json`(0 的滚动码)和账号清单重新生成;`ask()` 保留。
10
+
11
+ 验证:`tests/invite-policy.mjs` 22 条(新增 getter 动态刷新)。
12
+
3
13
  ## 0.3.38 — 2026-10-29
4
14
 
15
+
5
16
  **邀请上级:0 改为「当前滚动码」并按需隐藏重复账号(0.3.36 / 0.3.37 补丁)**
6
17
 
7
18
  0.3.36 把 0 做成了固定作者码;用户指出 0 应该是**老的滚动规则最新那个**:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magicrew-auth",
3
- "version": "0.3.38",
3
+ "version": "0.3.39",
4
4
  "description": "超级麦吉 / MagiCrew for magpie and OpenCode — one package, two providers: letsmagic.cn (国内) and magicrew.ai (international). Password or web-JWT sign-in, the account's own live model list, points balance, newcomer rewards, invite codes.",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",
@@ -671,7 +671,11 @@ export function makeMethods(c) {
671
671
  type: "api",
672
672
  keyless: true,
673
673
  label: `${c.SHORT} 邀请上级`,
674
- prompts: [{ type: "text", key: "invite", message: inviteMessage(c), placeholder: "0" }],
674
+ // getter:每次 magpie 取 prompts(点开登录方式时)都按当时滚动码/账号清单重新生成,
675
+ // 不是插件加载时那一份
676
+ get prompts() {
677
+ return [{ type: "text", key: "invite", message: inviteMessage(c), placeholder: "0" }]
678
+ },
675
679
  async ask(inputs) {
676
680
  if (inputs && Object.prototype.hasOwnProperty.call(inputs, "invite")) return null
677
681
  return { type: "text", key: "invite", message: inviteMessage(c), placeholder: "0" }