Files
plugins/packages/trae/package.json
T
yetone 07ba4eb88d trae 0.2.35: a bare {"tool_calls":[…]} reply is its calls (#1114)
The sibling of qoder's #1113: a model can write OpenAI's own wire shape
as text, {"tool_calls":[{"name","arguments"}]} on a line of its own,
and trae passed it through as the answer. TextTools now reads a whole,
readable object as its calls ({"name","arguments"} entries and OpenAI's
{"type":"function","function":{…}} both), drops the line's indent with
it, and ends the turn with the cut-short failure when the stream ends
inside one, as a <tool_call> block does. While streaming, a last line
that may still grow into {"tool_calls":[{ is held until it settles.

The shape in prose, in a code fence, {"tool_calls":[]}, an entry with
no name and other JSON lines stay text.

Siblings: doubao-work 0.1.12 (4ea39f01) and orcaterm 0.1.8 (2db9b0ad).
zen-free reads no calls out of text (its upstream sends tool_calls
itself), so it has nothing to change.

Run (WSL magpie-desktop, HOME=$(mktemp -d)):
- packages/trae bun test: 265 pass, 0 fail. jsoncall.test.mjs uses
  #1113's bytes, whole and in 1-, 5- and 4096-character pieces.
- On the old code jsoncall.test.mjs is 2 of 3 red; with jsonHoldAt
  returning -1 by hand, the streamed cases go red again.
- bun scripts/check.mjs trae: ok.
Not tried: a real Trae account producing this reply.
2026-11-14 10:05:13 +08:00

32 lines
713 B
JSON

{
"name": "@magpie-community/opencode-trae-auth",
"version": "0.2.35",
"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": "./opencode.mjs",
"exports": {
".": "./opencode2.mjs"
},
"files": [
"index.mjs",
"opencode.mjs",
"opencode2.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"
}
}