017f05cbb9bc097b7ca7b05ab80983e41c05aae3
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
74be6323e3 |
qoder 0.2.32: a check-in offered nothing with this device's own identity says so, and that Qoder desktop can claim it (#304)
ReneXiong (#304): on Linux ARM64 with Qoder CLI 1.1.78 signed in, the plugin read the CLI's runtime-info and sent its identity, and the campaigns list had no CLAIM_BENEFIT, while the same account and device token with the macOS desktop's identity listed a claimable 100. The check-in answered a bare { outcome: "inactive" }, with nothing saying why. Now that branch (identity read and sent, list has no CLAIM_BENEFIT) is inactive with a message: "<site> check-in: <site> offered this device's identity, read from this machine's own <site> runtime-info, no daily credits campaign right now. <site> decides per device whether to offer it; if <site> desktop shows today's credits, claim them there". It names only what the plugin knows: the identity came from this machine's runtime-info and the list offered nothing. It does not say whether the runtime was the CLI's or the desktop's, nor why Qoder offered none. Outcome is unchanged (still inactive), so magpie's day logic is the same. "no campaigns page for this account" and the ineligible/failed paths are unchanged. Run: TMPDIR=<scratch> HOME=<scratch>/h bun test packages/qoder: 202 pass, 0 fail (native-checkin.test.mjs: one test rewritten, one CN test new). Repo root, same sandbox: 2381 pass, 0 fail. bun scripts/check.mjs qoder ok. Broken by hand: with origin/main's index.mjs both tests are red (message undefined). Not tried: a real Qoder account; the wording is from the code path, not a live answer. |
||
|
|
929a8b3adf |
qoder 0.2.30: Qoder CN's check-in sends Qoder CN's own device identity, as its desktop and CLI do (yetone/magpie#2911, #304)
witt-bit (yetone/magpie#2911, 10-22): after Qoder CN's update moved its
daily 100 Credits into the desktop's 权益中心, magpie's Qoder CN check-in
stopped working; Andrew0767 (#304) sees the same with Qoder desktop
installed. The plugin sent Qoder CN's campaigns pages no device identity
at all ("Qoder CN does not need this local helper").
What Qoder CN's clients do, read from their own packages:
- Qoder CN desktop 0.4.9 (the .deb's out/main): its requests carry
Cosy-ClientType 10 and, through createAuthorizedHeaders, the identity
from <resources>/umid/runtime-info run with environment
`regionCode === "global" ? 3 : 0`, i.e. 0 for Qoder CN, the uid on
stdin (--account-stdin) on macOS and Windows. Campaigns are found
through GET /sash/api/v1/me/notifications (hasClaimableCampaign,
campaignPopupUrl). When the identity can't be read it sends the
request without it (resolveMachineIdentity's catch returns null).
- qoderclicn (@qodercn-ai/qoderclicn 1.1.64, 1.1.70, 1.1.73):
campaigns.list is GET /sash/api/v1/me/campaigns, needing the UMID from
1.1.64 and requireMachineIdentity() from 1.1.70, UMID environment
ONLINE = 0; its config dir is QODERCN_CONFIG_DIR, else QODERCN_CLI_HOME
(or home) + QODERCN_CONFIG_DIR_NAME (or .qoder-cn), and it caches the
helper in <config>/.bin/runtime-info-<platform>-<arch>-<hash>.
- Install places: Qoder CN.app/Contents/Resources/umid/runtime-info
(seen inside Qoder-CN-Installer-mac-arm64.zip's payload, 0.4.9),
/opt/Qoder-CN/resources/umid/runtime-info (the .deb), and on Windows
umid/runtime-info.exe among Qoder-CN-win-x64-user.exe's owned files,
with "Uninstall Qoder CN.exe" (electron-builder's
%LOCALAPPDATA%\Programs\<productName>; the folder itself not seen).
The plugin now keeps a runtime per site (RUNTIMES): Qoder CN reads its own
helper (those paths, its CLI's folders, QODERCN_RUNTIME_INFO, never the
international Qoder's) with environment 0, and sends Cosy-MachineToken and
Cosy-MachineType on the list, the claim and the campaigns proxy. As the
desktop does, a Qoder CN request without a readable identity still goes
out, so an account that was claiming without Qoder CN installed (0.2.21's
live PAT claim) keeps doing so. When such a list offers no daily claim,
the check-in is ineligible for the day, saying to install Qoder CN desktop
or sign in to its CLI (no helper), or failed and asked again (a helper that
didn't answer), instead of "inactive". International Qoder is unchanged.
Run: in packages/qoder, TMPDIR=$H HOME=$H/home bun test: 195 pass, 0 fail.
On the old index.mjs the new tests are 9 red (checkin.test.mjs 5 lookup
tests and the env-0 proxy test, native-checkin.test.mjs the env-0 claim,
the ineligible and the failed cases). Repo root at this commit
(rebased on
|
||
|
|
6219a7115a |
qoder 0.2.27: no Qoder on the machine is an ineligible check-in that says what to do once (#304)
On a machine that never had Qoder desktop or Qoder CLI, the international
daily check-in failed with "device identity runtime not found" and magpie
showed "签到失败,magpie 稍后重试", asking again every 30 minutes all day.
It can't succeed: Qoder lists the daily CLAIM_BENEFIT only on a request
carrying Cosy-MachineToken/Cosy-MachineType, and those come from Qoder's
own signed runtime-info helper (#49 showed the list without them has no
claim). The plugin never computes or invents that identity, so without
the helper there is nothing to send.
What changed:
- campaignRuntime throws RuntimeMissing when no helper is found anywhere;
auth.checkin answers it with outcome "ineligible" (settled for the
Beijing day by magpie, asked again the next day) and a message that says
to install Qoder desktop, or install Qoder CLI and sign in once, or set
QODER_RUNTIME_INFO. "ineligible" is the plugin hook word Trae's 9074
already uses for "check in in the vendor's app"; own-app is not a hook
outcome (magpie's provider-plugins.md).
- A helper that exists but fails or gives an invalid identity is still
"failed" and retried. The fetch path (campaign) keeps its 502, now with
the clearer message. Qoder CN is unchanged (it needs no helper).
- README: the daily check-in section says the above.
What was run (at
|
||
|
|
bb688ea81a |
qoder: test that auth.checkin claims on a PAT account's job token (#262)
#262's check-in tests went through the loader's campaigns fetch; the daily
check-in magpie presses is auth.checkin, whose PAT change nothing covered.
One test claims on qoder and qoder-cn with a PAT account (job token, no
deviceToken refresh); one checks a 403 is "failed", not rotated.
Run on
|
||
|
|
5d7fb87f84 |
qoder 0.2.17: native daily check-in through auth.checkin (#179)
Adds auth.checkin to Qoder and Qoder CN. It lists the account's campaigns and claims a CLAIMABLE CLAIM_BENEFIT campaign, and the list and the claim go through the plugin's own campaigns path: device token, one rotation on 401/403, VPC host and native machine identity. The outcomes match magpie's built-in qoder_checkin.go: - a CLAIMED campaign is done only while its startAt/endAt window is open; - a daily campaign that is neither claimable nor active-claimed is failed, so it is asked again later; - no daily campaign at all is inactive; - a list or claim reply that can't be read is failed, never inactive or claimed. The credit is the claim's own benefit.amount, else the campaign's. Bumps the package to 0.2.17. Reviewed head 128ed2a. Ran at that head: - bun test in packages/qoder, sandbox HOME/TMPDIR: 127 pass, 0 fail - git merge-tree onto origin/main: clean - PR CI: test and on-npm pass - read every line of the checkin hook against magpie's internal/provider/qoder_checkin.go. The campaign shape and its seconds-based startAt/endAt match the real campaign JSON in qoder_checkin_test.go. |