XcodeFish (trae-cn/glm-5.3-flash under Codex) saw eight texts of their own beside real calls: ]</tool_call>, </tool_call>, }</tool_call>, ]}]}}"}}}}</tool_call>, }}</tool_call>, "></tool_call>. And an exec_command's heredoc reached Codex cut wrong. - After a call's JSON, braces, brackets, quotes, a > and blanks up to the close are taken with the close (held while only those have come). - A close with no call open is dropped with that leftover before it: when nothing but blanks came since the start or the last call (the tail of a call Trae's service read itself), or when the leftover is right before it. A close a sentence names in passing, or one in backticks, stays. - A call's object that ends early, with other text after it before the close, is a quote inside a string left unescaped: the block is read up to the close (quoteFix reads the heredoc whole), and when it can't be, the turn fails as unreadable, so the gateway can try again, instead of a cut command plus the rest as text. Not reproduced: the issue's cmd that swallowed ","yield_time_ms":180000}. No mutation of quotes and backslashes in a JSON or string-encoded call (624 tried) gives it through this parser; it may have come from Trae's own tool_calls. Asked the reporter for the raw stream. Run: tailjunk.test.mjs (6 tests, the issue's tails at piece sizes 0/1/3/7, a native call with its tail split across events, the heredoc) fails 5 of 6 on the old index.mjs; HOME=<tmpdir home> bun test for the repo, 1184 pass 0 fail; bun scripts/check.mjs green.
13 lines
592 B
JSON
13 lines
592 B
JSON
{
|
|
"name": "@magpie-community/opencode-trae-auth",
|
|
"version": "0.2.11",
|
|
"description": "OpenCode provider plugins for Trae: Trae CN (trae.cn) and Trae Global (trae.ai), free tier included, with Trae's own browser sign-in",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"exports": "./index.mjs",
|
|
"files": ["index.mjs", "README.md"],
|
|
"keywords": ["opencode", "opencode-plugin", "magpie", "trae", "trae-cn", "trae-global", "bytedance"],
|
|
"license": "MIT",
|
|
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/trae" }
|
|
}
|