Files
plugins/packages/zen-free/package.json
T
yetone 0678f8613f zen-free 0.1.21: another agent's <env> block is not taken for OpenCode's
The plugin added OpenCode's environment block unless a system message
already carried any <env> ... Working directory: ... </env>. Claude Code up
to about 2.1.100 ends its own prompt with such a block ("Here is useful
information about the environment you are running in:\n<env>\nWorking
directory: ..."), so its requests went to Zen without OpenCode's block,
while Pi's prompt, which has none, always got it. Zen gives a request
without OpenCode's block a small daily allowance on the same per-address
count, so it served Pi and answered Claude Code 429 FreeUsageLimitError
from the same machine (MrHayesLin and GuodingZ47927 on X, 2026-11-01).

Now only OpenCode's own block counts: <env>, then "  Working directory: "
two spaces in, as OpenCode 1.x and 2.x write it. Claude Code's block stays
and OpenCode's, naming the same folder, follows it. magpie's built-in Zen
path gets the same check in the same change.

Run at this tree on mote: bun test in packages/zen-free (204 pass, 0 fail),
bun scripts/check.mjs (every package ok).
Broken by hand: with the old regex the new case is red in all three
protocols (chat, responses, anthropic).
Checked by hand: Claude Code 2.0.76, 2.1.0 and 2.1.100 (npm) carry the
block; 2.1.316 (latest) has none, and its requests already got OpenCode's
block through this plugin (sandbox HOME, fake upstream).
Not tried: a request to Zen itself. Every machine here leaves from one
address whose free quota was spent today (real OpenCode 2.2.5 got the
same 429), so it can't be compared before 00:00 UTC. Why a current Claude
Code (2.1.316) is refused, if it is, is not known yet.
2026-11-01 22:07:03 +08:00

14 lines
683 B
JSON

{
"name": "@magpie-community/opencode-zen-free-auth",
"version": "0.1.21",
"description": "OpenCode Zen free models through the public credential, with native streaming protocols",
"type": "module",
"main": "./index.mjs",
"files": ["index.mjs", "provider.mjs", "models.mjs", "stream.mjs", "tool-response.mjs", "README.md", "LICENSE"],
"keywords": ["opencode", "opencode-plugin", "zen", "free", "magpie"],
"license": "MIT",
"repository": { "type": "git", "url": "https://github.com/magpie-community/plugins", "directory": "packages/zen-free" },
"scripts": { "test": "bun test" },
"magpie": { "icon": "https://opencode.ai/favicon-v3.ico", "maxConcurrency": 2 }
}