From 992cff84af333b5645e62ff2da9bac757e5f83e1 Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 17 Oct 2026 18:07:22 +0800 Subject: [PATCH] trae: the README's check-in outcomes and the 9074 test name say what the code does #178's README called 9095 done and 9074 failed. The code answers both as ineligible, the same as magpie's built-in check-in, so that 9074 isn't asked again that day. The test asserting ineligible was named "is failed". Docs and a test name only, so no version bump. bun test packages/trae/native-checkin.test.mjs gives 9 pass, and check.mjs trae is ok. --- packages/trae/README.md | 8 +++++--- packages/trae/native-checkin.test.mjs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/trae/README.md b/packages/trae/README.md index 70b4dfc..95946d7 100644 --- a/packages/trae/README.md +++ b/packages/trae/README.md @@ -283,9 +283,11 @@ Trae CN gives credits for a daily check-in (每日签到); Trae Global has no such page, so this is CN only. magpie can press it once a day for each account (Settings, or the switch on the usage card), through `auth.checkin`: `claimed` when Trae grants the credits, `done` -when the status or Trae's 9095 says this device has already claimed, -`inactive` when the page is disabled, and `failed` for a turned-away -sign-in or Trae's 9074 busy answer. +when the status says today's is in already, `inactive` when the page is +disabled, `ineligible` when the claim answers 9095 (this device has +checked in today) or 9074 (to be done in Trae CN's own app; not asked +again that day), and `failed` for a turned-away sign-in or any other +answer, which is tried again later that day. It asks Trae CN's own pages through this plugin's fetch, which sends them as the account, as Trae CN's IDE (3.3.104) sends them: its Cloud-IDE-JWT (renewed first when near its diff --git a/packages/trae/native-checkin.test.mjs b/packages/trae/native-checkin.test.mjs index 90472a6..465e8cf 100644 --- a/packages/trae/native-checkin.test.mjs +++ b/packages/trae/native-checkin.test.mjs @@ -46,7 +46,7 @@ test("the device's already-checked answer is ineligible", async () => { expect(await checkin()).toEqual({ outcome: "ineligible", message: "this device has checked in today" }) }) -test("Trae's busy answer is failed without another device", async () => { +test("Trae's 9074 on the claim is the day's answer, on the account's own device", async () => { f = fakeTrae() f.route("POST " + STATUS, () => json({ code: 0, enable: true, checked_in: false })) f.route("POST " + CLAIM, () => json({ code: 9074, message: "当前参与用户太多" }))