An account with a GLM Coding Plan of its own and a seat on a team's plan could only reach its own plan: signedIn took the own plan whenever there was one and looked for a team seat only when there wasn't. ZCode itself defaults the same way but lets the user switch its plan picker to the team's plan (a "team-coding-plan" selection with the team's organization and project, read from ZCode.app's bundle). New sign-in method "ZCode: a team's GLM Coding Plan" (asks Z.ai or BigModel, as the key method does) signs in through the same ZCode flow and takes the team seat alone: the team project's zcode-team-api-key, as the existing team-only route already does. It is saved under "<email> (team)" so magpie's host keeps it as a second account instead of replacing the own-plan account of the same email. With no seat it fails with the reason and never falls back to the own plan. Existing sign-ins are unchanged. Run: TMPDIR=<scratch> HOME=<scratch>/h1 bun test (2016 pass, 0 fail); bun scripts/check.mjs (all ok). team.test.mjs goes red (2 of 4) with the onTeam argument dropped from the callback. Not tried against a real account with both plans (none at hand).
17 lines
636 B
JSON
17 lines
636 B
JSON
{
|
|
"name": "@magpie-community/opencode-zcode-auth",
|
|
"version": "0.1.20",
|
|
"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",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"exports": "./index.mjs",
|
|
"files": ["index.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"
|
|
}
|
|
}
|