@magpie-community/opencode-qoder-auth 0.2.22 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/index.mjs +8 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -100,6 +100,9 @@ itself.
100
100
  - the account, AES-encrypted, with the key wrapped by Qoder's RSA key;
101
101
  - an MD5 signature;
102
102
  - the machine id and the client's headers.
103
+ - `Cosy-Version`: the worker runtime version that Qoder's desktop app
104
+ ships (1.1.69 in app 0.4.8, since 0.2.23, #281), because
105
+ `Cosy-ClientType` says the desktop app.
103
106
 
104
107
  **Reading the reply**
105
108
 
package/index.mjs CHANGED
@@ -43,7 +43,14 @@ import { join, resolve } from "node:path"
43
43
 
44
44
  const CHAT_PATH = "/algo/api/v2/service/pro/sse/agent_chat_generation?FetchKeys=llm_model_result&AgentId=agent_common&Encode=1"
45
45
  const MODELS_PATH = "/algo/api/v2/model/list?Encode=1"
46
- const COSY_VERSION = "1.1.49"
46
+ // The build the envelope claims. It has to be the one Qoder's desktop app
47
+ // talks through — the worker runtime bundled in the app — because the
48
+ // envelope also says Cosy-ClientType: 10 (desktop) and carries that app's
49
+ // machine identity; the CLI's channel publishes a different, later number
50
+ // that no desktop build runs. Taken from app 0.4.8 (build 79743374,
51
+ // 2026-10-14), whose transport config names 1.1.69. Raise it when the app
52
+ // moves, not when the CLI does.
53
+ const COSY_VERSION = "1.1.69"
47
54
  const SIGN_IN_TIMEOUT = 15 * 60 * 1000
48
55
  const REFRESH_LEAD = 5 * 60 * 1000 // a chat token this close to its end is refreshed before a request
49
56
  const RENEW_LEAD = 10 * 60 * 1000 // and this close, magpie renews it ahead of time (auth.refresh)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magpie-community/opencode-qoder-auth",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "description": "Qoder subscriptions in OpenCode and magpie: Qoder (qoder.com) and Qoder CN (qoder.cn)",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",