Files
plugins/packages/zcode/package.json
T
yetone 1dbbc1fb48 zcode 0.1.65: a -Trial pick with no gift names the weekend plan ZCode holds unclaimed (heduian, bg5eau on X)
heduian and bg5eau on X (11-14, a Saturday): magpie no longer uses
ZCode's weekend gift. GLM-5.3-Flash-Trial is not in the list, a
manually added one answers "ZCode has no active limited quota", and
free first spends the weekday gift but not the weekend's.

Diffed against the official ZCode 3.18.2 (zai-org/ZCode fec975905,
11-13) and 3.17.2 (a9fe401ee):

- The weekend plan (ZCODE WEEKEND BUILD, testdata/touch-1030-wk.json)
  is a gift ZCode holds until it is claimed from the app's banner. The
  claim (MarketingTouchProvider -> prepareRequestVerificationClaim ->
  claimManualPlan) carries the app's Aliyun captcha proof in 3.18.2 as
  in 3.17.2, and client/configs still says captcha.enabled true. The
  plugin has posted no claim since 0.1.55 (11-07), and claims without
  the proof were refused 3007 since 10-06. Until the plan is claimed
  in the ZCode app it has no balance bucket, so the plugin lists no
  -Trial entry for it and free first has nothing to spend. That is the
  report. The captcha is not got past.
- The Start Plan request: 3.18.2's headers (buildCliZCodeSourceHeaders,
  zcode-source-headers.ts) are the plugin's startHeaders but for the
  version (3.17.2) in User-Agent and X-ZCode-App-Version;
  @ai-sdk/anthropic is 3.0.81 in both. Start's credential in 3.18 is
  the shared ZCode JWT, as the plugin sends. No header picks a plan or
  bucket: the server chooses which bucket a model spends.
- The balance read (zaiStartPlanBilling.ts) is unchanged in 3.18, and
  on the owner's account the balance, the feed and client/configs
  answer the same for app_version 3.17.2 and 3.18.2. APP_VERSION stays.

So the change is the refusal: a -Trial pick that finds no gift now
reads the claim feed (toClaim; kept ten minutes per session, a failed
read names none and is not kept) and, when ZCode holds a plan there,
says "ZCode holds ZCODE WEEKEND BUILD for this account unclaimed:
claim it in the ZCode app (its claim needs the app's security check),
and GLM-5.3-Flash-Trial spends it". Nothing is claimed and no model is
asked. The card's "Gift plans to claim in the ZCode app" line was
already there. README says what happens until the claim.

Run (mote, sandbox HOME): bun test in packages/zcode, 265 pass 0
fail; bun scripts/check.mjs zcode ok. Real account (owner's, sandbox
HOME): unclaimed() read the live feed, [] (no weekend delivery on that
account today).
Broken by hand, each red, then restored: the refusal without the feed
(2 fail), the ten-minute keep removed (1 fail).
Not tried: a real account holding a weekend plan (the owner's has no
delivery or balance plan today), and a claim in the ZCode app followed
by a request; Windows and Linux.
2026-11-14 18:17:21 +08:00

21 lines
783 B
JSON

{
"name": "@magpie-community/opencode-zcode-auth",
"version": "0.1.65",
"description": "OpenCode provider plugin: signs in to Z.ai's or BigModel's (智谱) GLM Coding Plan as ZCode does, including team seats and ZCode's Start Plan, and claims its gift plans daily",
"type": "module",
"main": "./opencode.mjs",
"exports": { ".": "./opencode2.mjs" },
"files": ["index.mjs", "opencode.mjs", "opencode2.mjs", "prompt.mjs", "README.md"],
"keywords": ["opencode", "opencode-plugin", "magpie", "zcode", "z.ai", "bigmodel", "glm", "coding-plan"],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/zcode"
},
"magpie": {
"maxConcurrency": 3,
"maxAccounts": 2
}
}