diff --git a/packages/qoder/index.mjs b/packages/qoder/index.mjs index 399ec37..e3e0c8a 100644 --- a/packages/qoder/index.mjs +++ b/packages/qoder/index.mjs @@ -43,7 +43,14 @@ import { join, resolve } from "node:path" const CHAT_PATH = "/algo/api/v2/service/pro/sse/agent_chat_generation?FetchKeys=llm_model_result&AgentId=agent_common&Encode=1" const MODELS_PATH = "/algo/api/v2/model/list?Encode=1" -const COSY_VERSION = "1.1.49" +// The build the envelope claims. It has to be the one Qoder's desktop app +// talks through — the worker runtime bundled in the app — because the +// envelope also says Cosy-ClientType: 10 (desktop) and carries that app's +// machine identity; the CLI's channel publishes a different, later number +// that no desktop build runs. Taken from app 0.4.8 (build 79743374, +// 2026-10-14), whose transport config names 1.1.69. Raise it when the app +// moves, not when the CLI does. +const COSY_VERSION = "1.1.69" const SIGN_IN_TIMEOUT = 15 * 60 * 1000 const REFRESH_LEAD = 5 * 60 * 1000 // a chat token this close to its end is refreshed before a request const RENEW_LEAD = 10 * 60 * 1000 // and this close, magpie renews it ahead of time (auth.refresh)