Files
plugins/packages/orcaterm/package.json
T
yetone 2fc8945de4 orcaterm 0.1.2: a new upstream conversation per request, and the envelope unwrapped wherever it shows (#564)
ferocknew saw a reply come out as the assistant's own envelope
({"action":"completion","ph_1":"--","taskCompletion":"…"}) and another
session's transcript end with OrcaTerm's output format.

Cause: the plugin kept one upstream conversationId per account and
session (and "default" when no session was named). OrcaTerm keeps a
conversation's turns by its id, while the plugin already sends the whole
transcript, so a reused id put upstream's copy of earlier turns (the RE_ACT
output format and raw envelopes) in front of each request; two sessions on
one id (no session id, or magpie's first-user-turn hash shared by a title
request or a same-opening chat) read each other's. Three more routes let an
envelope through: one written with bare line breaks or quotes is not JSON
and went out whole; an envelope sent only as thinking was the fallback
text as it was; and an earlier envelope the agent kept in its history went
back up as the assistant's turn, which the model then imitated.

Now every request gets a fresh cid-<uuid>-orcaterm (the user id stays per
session), a hand-written envelope is read for its answer
(looseEnvelopeAnswer), the thinking fallback and the history turns go
through the same extractor. The plugin adds nothing to other providers'
requests: its only non-auth hook is chat.headers, gated on providerID.

Run on mote: bun test in packages/orcaterm 110/110 pass; bun scripts/check.mjs
orcaterm ok; bun test scripts 3/3. leak.test.mjs at the old index.mjs: 4 of
7 red (bare line breaks, thinking-only, history turn, shared conversation
id); the reporter's literal envelope itself already unwrapped when clean.
Not tried: a real OrcaTerm account (none here), so upstream's keeping of
turns by conversationId is from the plugin's own measurements, not re-run.
2026-10-31 20:36:11 +08:00

21 lines
1.3 KiB
JSON

{
"name": "@magpie-community/opencode-orcaterm-auth",
"version": "0.1.2",
"description": "OrcaTerm (Tencent Cloud 遨驰终端) AI quota as an OpenAI-compatible provider for magpie and OpenCode",
"type": "module",
"main": "./index.mjs",
"exports": "./index.mjs",
"files": ["index.mjs", "wechat.mjs", "README.md", "LICENSE"],
"keywords": ["opencode", "opencode-plugin", "magpie", "orcaterm", "tencent"],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/orcaterm"
},
"magpie": {
"maxConcurrency": 1,
"icon": "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%231C74C7'/%3E%3Cstop offset='.55' stop-color='%238870FF'/%3E%3Cstop offset='1' stop-color='%23FEAECB'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23a)' d='M56 54c-7-12.5-26.2-13.2-35.5-22.5C14.4 25.2 14 16.4 16.7 11 19.5 5.3 25.9 1 33.1 1c2.7 0 8 1 11 3 14.1 9.4 18 22.7 19.6 28.5 1.6 5.8 1.5 14.5-7.7 21.5z'/%3E%3Cpath fill='url(%23a)' opacity='.85' d='M86.2 58C78.2 75.5 48.2 70.5 33.2 64 20.6 66.3 15.2 72 15.2 81c0 9.5 6.2 17.4 15.5 18.5 9.3 1.1 22.6-5.5 33-14 9-7.4 19.8-17.6 22.5-27.5z'/%3E%3C/svg%3E"
}
}