diff --git a/packages/workbuddy/README.md b/packages/workbuddy/README.md index 7505fc4..03fca57 100644 --- a/packages/workbuddy/README.md +++ b/packages/workbuddy/README.md @@ -126,8 +126,8 @@ Each chat carries WorkBuddy's headers: - `Authorization`, `X-User-Id`, `X-Domain`, `X-Product: SaaS`, `X-IDE-Type: WorkBuddy`; - the desktop CLI's `User-Agent`, `WorkBuddy/ / CLI/`: `WorkBuddy/5.9.3 WorkBuddy/5.9.3 CLI/2.165.0` on the China build and - `WorkBuddy/5.8.4 workbuddy-ai/5.8.4 CLI/2.161.0` on WorkBuddy AI, each - build's current app on 2026-10-28; `X-IDE-Version` is the app's version. + `WorkBuddy/5.9.3 workbuddy-ai/5.9.3 CLI/2.165.0` on WorkBuddy AI, each + build's current app on 2026-10-29; `X-IDE-Version` is the app's version. A User-Agent not starting `WorkBuddy/` is answered error 10085; - the client's, which WorkBuddy's usage list shows as the client that asked (使用端): `X-Agent-Purpose: conversation`, `X-IDE-Name: WorkBuddy`, @@ -144,7 +144,7 @@ Each chat carries WorkBuddy's headers: one, a made-up conversation of the request's own being what splits one conversation into many in the usage detail; - what the CLI adds to a model request alone: `X-Agent-Type: main` on both - builds, `X-Agent-Runtime: local-agent` on the China build (new in 5.9), + builds, `X-Agent-Runtime: local-agent` (new in 5.9), `Accept: application/json`, and the `X-Stainless-*` headers of the OpenAI SDK it sends through (openai 6.25.0 on Electron 37's Node v22.21.1, a 1200s timeout, no retries). diff --git a/packages/workbuddy/conversation.test.mjs b/packages/workbuddy/conversation.test.mjs index 257557f..30f93fa 100644 --- a/packages/workbuddy/conversation.test.mjs +++ b/packages/workbuddy/conversation.test.mjs @@ -116,13 +116,12 @@ test("WorkBuddy AI takes the ids too, with its client's headers", async () => { expect(turn(ai)).toMatch(HEX32) expect(conv(ai)).toMatch(HEX32) expect(ai.get("x-ide-name")).toBe("WorkBuddy") - expect(ai.get("user-agent")).toBe("WorkBuddy/5.8.4 workbuddy-ai/5.8.4 CLI/2.161.0") + expect(ai.get("user-agent")).toBe("WorkBuddy/5.9.3 workbuddy-ai/5.9.3 CLI/2.165.0") }) // What WorkBuddy's desktop CLI sends with a chat, read from each build's -// current app (China 5.9.3 with CLI 2.165.0, WorkBuddy AI 5.8.4 with CLI -// 2.161.0): UserAgentHttpInterceptor's User-Agent, the app's version as -// the IDE's, X-Agent-Type on both builds, 5.9's X-Agent-Runtime, and the +// current app (5.9.3 with CLI 2.165.0 on both): +// UserAgentHttpInterceptor's User-Agent, the app's version as the IDE's, X-Agent-Type on both builds, 5.9's X-Agent-Runtime, and the // OpenAI SDK's headers its fetch passes on. test("each build's chat carries its desktop client's headers", async () => { const sdk = { @@ -137,7 +136,7 @@ test("each build's chat carries its desktop client's headers", async () => { } const want = { workbuddy: [WorkBuddyAuthPlugin, { ...sdk, "user-agent": "WorkBuddy/5.9.3 WorkBuddy/5.9.3 CLI/2.165.0", "x-ide-version": "5.9.3", "x-agent-runtime": "local-agent" }], - "workbuddy-ai": [WorkBuddyAIAuthPlugin, { ...sdk, "user-agent": "WorkBuddy/5.8.4 workbuddy-ai/5.8.4 CLI/2.161.0", "x-ide-version": "5.8.4", "x-agent-runtime": null }], + "workbuddy-ai": [WorkBuddyAIAuthPlugin, { ...sdk, "user-agent": "WorkBuddy/5.9.3 workbuddy-ai/5.9.3 CLI/2.165.0", "x-ide-version": "5.9.3", "x-agent-runtime": "local-agent" }], } for (const [provider, [plugin, heads]] of Object.entries(want)) { const h = await ask(send("hi"), { provider, plugin, headers: { "x-agent-runtime": "cloud-agent" } }) diff --git a/packages/workbuddy/index.mjs b/packages/workbuddy/index.mjs index ec554d9..d094d0f 100644 --- a/packages/workbuddy/index.mjs +++ b/packages/workbuddy/index.mjs @@ -92,11 +92,15 @@ const SITES = { authID: "workbuddy-desktop-ai", platform: "workbuddy-ai", ai: true, - // WorkBuddy AI 5.8.4.41366630, its update feed's current build on - // 2026-10-28 (see the China build's) - app: "5.8.4", - cli: "2.161.0", + // WorkBuddy AI 5.9.3.42398134, its update feed's current build on + // 2026-10-29 (see the China build's): the same CLI as the China + // build's 5.9.3, byte for byte but for product.json, and the same + // Electron (37.10.3); its desktop puts agentRuntime local-agent in the + // prompt meta as the China build's does + app: "5.9.3", + cli: "2.165.0", appName: "workbuddy-ai", + runtime: "local-agent", keys: "https://www.workbuddy.ai/profile/keys", models: AI_MODELS, // models whose images WorkBuddy AI drops though its config says they @@ -1328,7 +1332,7 @@ function fitted(body) { // gzipped is a chat's body compressed, as WorkBuddy's own client sends its // model requests: its CLI's GzipRequestProcessor (WorkBuddy 5.9.3, CLI -// 2.165.0; WorkBuddy AI 5.8.4 the same) gzips each POST's body and sets +// 2.165.0, on both builds) gzips each POST's body and sets // Content-Encoding: gzip when the product's RequestBodyGzip feature is on, // which both builds' product.json turn on and /v3/config (merged over it) // doesn't turn off. Sent as plain JSON, a long agent conversation went up diff --git a/packages/workbuddy/package.json b/packages/workbuddy/package.json index f5ab59d..ee2cf2d 100644 --- a/packages/workbuddy/package.json +++ b/packages/workbuddy/package.json @@ -1,6 +1,6 @@ { "name": "@magpie-community/opencode-workbuddy-auth", - "version": "0.1.45", + "version": "0.1.46", "description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)", "type": "module", "main": "./index.mjs",