Files
plugins/packages/workbuddy/package.json
T
yetone 880cd9319c workbuddy 0.1.45: only a chat completion goes gzipped; magpie's drawings go as plain JSON
iwinux on Discord (2026-10-28 ~22:30 UTC+8, magpie v0.1.1812): the Magpie
Image MCP through WorkBuddy AI failed from the minute 0.1.43 was published
(14:30Z) with
  400 Bad Request: Unmarshal create image params failed with error:
  invalid character '\x1f' looking for beginning of value (11101)
0.1.43 (f4d48ac) gzipped every body the loader's fetch sent that wasn't
Messages. magpie's drawWorkBuddy (internal/gateway/draw_workbuddy.go) sends
its JSON to <site>/v2/images/generations and /v2/images/edits through that
same fetch, and WorkBuddy's images API reads the raw bytes as JSON: '\x1f'
is gzip's first byte. magpie itself passes the JSON string through
unchanged (host.js bodyOf); the plugin set Content-Encoding: gzip and
compressed it.

Now only a chat completion (a path ending /chat/completions, or with no URL
to read, a body holding messages: isCompletion) goes gzipped, and only one
is given the model's default effort, which also ran on a drawing's body and
read /v3/config for it. Messages and everything else go as they came.
Sibling paths checked: /v3/config is a GET with no body; Messages and
count_tokens were already left alone; the plugin serves no embeddings.

Run (on mote, HOME=$(mktemp -d) bun test in packages/workbuddy): 207 pass,
0 fail. bun scripts/check.mjs: exit 0.
Broken by hand: the new images.test.mjs on origin/main's index.mjs (0.1.44):
4 of 6 red, the fake images API answering 400 with the reporter's own
"invalid character '\x1f' ... (11101)"; the 2 that pass guard that a chat
still goes gzipped on both builds.
Not tried: a real WorkBuddy drawing (no live account used here); whether
WorkBuddy's own CLI gzips its image requests (its images API doesn't take
gzip either way).
2026-10-29 00:33:30 +08:00

13 lines
566 B
JSON

{
"name": "@magpie-community/opencode-workbuddy-auth",
"version": "0.1.45",
"description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)",
"type": "module",
"main": "./index.mjs",
"exports": "./index.mjs",
"files": ["index.mjs", "README.md"],
"keywords": ["opencode", "opencode-plugin", "workbuddy", "codebuddy"],
"license": "MIT",
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/workbuddy" }
}