AtomCode's glm5.3-flash group answers 403 "access disabled by request policy" when a request has no x-atomcode-session-id (#1186). The plugin now sends one: - chat.headers fills it with the session id of the conversation the agent is in; - the loader falls back to one random UUID per signed-in account when the hook didn't run or the session is empty. Version 0.3.1. Run at bbdbcc7a, with no atomcode changes on main since its base: - `bun test packages/atomcode` on mote: 164 pass, 0 fail. - `bun scripts/check.mjs atomcode`: ok. Broken by hand: with main's index.mjs and the PR's tests, run on mica, 3 tests fail (header and signature, per-account stability, chat.headers). The other 161 pass. Not tried: the live AtomCode gateway. The author's probes compare the same request with and without the header (200 against 403). Co-authored-by: aqiu817 <19250671+aqiu817@users.noreply.github.com>
93 lines
2.4 KiB
JSON
93 lines
2.4 KiB
JSON
{
|
|
"name": "@magpie-community/opencode-atomcode-auth",
|
|
"version": "0.3.1",
|
|
"description": "AtomCode (AtomGit CodingPlan) for Magpie and OpenCode: browser OAuth or local CLI sign-in, signed requests, persistent diagnostics, native plan claim, live models and quota windows",
|
|
"type": "module",
|
|
"main": "./opencode.mjs",
|
|
"exports": {
|
|
".": "./opencode2.mjs"
|
|
},
|
|
"files": [
|
|
"index.mjs",
|
|
"opencode.mjs",
|
|
"opencode2.mjs",
|
|
"internal.mjs",
|
|
"auth-file.mjs",
|
|
"request-body.mjs",
|
|
"sign.mjs",
|
|
"oauth.mjs",
|
|
"codingplan.mjs",
|
|
"quota.mjs",
|
|
"models.mjs",
|
|
"errors.mjs",
|
|
"state.mjs",
|
|
"diagnostics.mjs",
|
|
"page/index.html",
|
|
"page/boot.js",
|
|
"page/diagnostics.html",
|
|
"page/app.css",
|
|
"page/app.js",
|
|
"page/icon.svg",
|
|
"i18n.mjs",
|
|
"version.mjs",
|
|
"assets/",
|
|
"README.md",
|
|
"README.zh-CN.md",
|
|
"CHANGELOG.md",
|
|
"NOTICE.md",
|
|
"SECURITY.md",
|
|
"LICENSE"
|
|
],
|
|
"keywords": [
|
|
"magpie",
|
|
"magpie-plugin",
|
|
"opencode",
|
|
"opencode-plugin",
|
|
"opencode-auth",
|
|
"opencode-provider",
|
|
"atomcode",
|
|
"atomgit",
|
|
"codingplan",
|
|
"openai-compatible"
|
|
],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/magpie-community/plugins",
|
|
"directory": "packages/atomcode"
|
|
},
|
|
"homepage": "https://github.com/magpie-community/plugins/tree/main/packages/atomcode#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/magpie-community/plugins/issues"
|
|
},
|
|
"engines": {
|
|
"node": ">=20",
|
|
"magpie": ">=0.1.2629"
|
|
},
|
|
"scripts": {
|
|
"test": "bun test",
|
|
"test:coverage": "node --experimental-test-coverage --test test/*.test.mjs",
|
|
"test:coverage:enforce": "node --experimental-test-coverage --test-coverage-lines=85 --test-coverage-branches=80 --test-coverage-functions=85 --test test/*.test.mjs",
|
|
"test:live": "node scripts/live-smoke.mjs",
|
|
"pack:check": "npm pack --dry-run --json"
|
|
},
|
|
"magpie": {
|
|
"icon": "https://atomgit.com/favicon.ico",
|
|
"maxConcurrency": 8,
|
|
"options": {
|
|
"locale": "auto",
|
|
"clientVersion": "5.2.3",
|
|
"quotaTtlMs": 60000,
|
|
"maxOutputTokens": 32768,
|
|
"diagnosticsPort": 3478
|
|
},
|
|
"page": {
|
|
"title": "AtomCode diagnostics",
|
|
"titles": { "zh": "AtomCode 诊断" },
|
|
"file": "page/index.html",
|
|
"icon": "page/icon.svg",
|
|
"service": { "port": 3478, "option": "diagnosticsPort" }
|
|
}
|
|
}
|
|
}
|