A <tool_call> block whose JSON wasn't whole ({"path":}) was reprinted as
text, and one the stream ended inside was flushed as text; either way the
turn finished "stop" with a 200, the call lost and nothing to fail over on.
Mirrors trae since 0.2.5 (#38): a block on its way to being a call (its
content starts with "{" or holds "<function=") that can't be read, or is
cut short at the end, ends the turn as an error: the stream with the error
frame and no finish, a request not streamed (or one with nothing before the
block) a 502. A block whose JSON (or XML function) is whole when the stream
ends without its close is still the call. A tag in a code fence or inline
code, or one that isn't call-shaped (<tool_call>incomplete), stays text.
Siblings: only trae (already fixed) and qoder parse calls out of the text;
grep for tool_call/function=/invoke/DSML across packages/*/index.mjs finds
no other parser.
Run at this head:
- textcall.test.mjs (new, the issue's literal frames: closed with bad JSON,
stream ends inside, readable control, whole JSON without its close, XML
form, look-alike text; streamed whole and 3 chars per frame, and not
streamed): 7 of 9 red on the 0.2.15 code (the control and look-alike
tests passed there), all green after.
- packages/qoder: 118 pass, 0 fail.
- Whole repo as CI runs it: HOME/TMPDIR in a scratch dir, bun test:
1320 pass, 0 fail; bun scripts/check.mjs: ok.
Not tried against a real Qoder account; the frames are the reporter's.
13 lines
544 B
JSON
13 lines
544 B
JSON
{
|
|
"name": "@magpie-community/opencode-qoder-auth",
|
|
"version": "0.2.16",
|
|
"description": "Qoder subscriptions in OpenCode and magpie: Qoder (qoder.com) and Qoder CN (qoder.cn)",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"exports": "./index.mjs",
|
|
"files": ["index.mjs", "README.md", "LICENSE-CLIProxyAPI"],
|
|
"keywords": ["opencode", "opencode-plugin", "magpie", "qoder", "qoder-cn"],
|
|
"license": "MIT",
|
|
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/qoder" }
|
|
}
|