Antigravity answers a system prompt that reads as Claude Code's or the
Claude Agent SDK's with a 429 "Resource has been exhausted", whatever
quota is left (xzplzpl on X). Tried with a real account, it matches
"x-anthropic-billing-header:" and "You are a Claude agent, built on
Anthropic's Claude Agent SDK", and lets the same prompt through with a
U+200B inside each. This middleware puts one after the first letter of
both words, in system text only (Anthropic system, Chat/Responses system
and developer messages, Responses instructions, Gemini
systemInstruction), and only in what an Antigravity account is sent: it
uses magpie's new onProvider hook (v0.1.1283), so a Claude subscription
or any other provider in the same routing group gets the prompt as the
agent wrote it. Options: extraWords, accounts, off. The README says the
ban risk and what happens if Google changes its match. After hexiaolv's
magpie-antigravity-cloak (MIT), which changes every request.
scripts/middleware.mjs: a case's "provider" runs the request on through
onProvider with ctx.provider, and expect_request is that try's body.
Run:
- HOME=$(mktemp -d) bun test: 1783 pass, 0 fail (the package's 12 cases
among them). bun scripts/check.mjs: every package ok.
- Real use: magpie built from e44b9aef3 in a sandbox HOME, a real
Antigravity account, this package added from its folder. Claude Code
2.1.302 `claude -p` on antigravity/gemini-3-flash answered; with
{"off": true} the same run got the 400. /v1/messages with the billing
line, the SDK line and Claude Code's three system blocks: 200 each on,
400 each off.
check.mjs now checks a plugin whose only hook is `tool`: each tool's name
is one an MCP client takes, and it has a description, args and execute.
It skips packages with magpie.gateway (routing strategies) and page-only
packages (magpie.page with no main), whose own tests check them.
middleware.mjs gains order() and checkStrategies(): a gateway plugin's
strategy is asked for an order the way magpie's gateway asks it
(internal/routes.Apply), falling back to the listed order on a throw or
an answer that isn't a permutation, and strategies.json cases are run
against it.
Run: HOME=$(mktemp -d) bun test (1554 pass, 0 fail) and
bun scripts/check.mjs (every package ok) at this tree with the three
packages that follow.
Run through Claude Code's ! (no terminal), every npm step printed the 2FA
link and failed with EOTP at once: npm waits for the browser only when it
can ask on a terminal. npm now reads from /dev/tty, so piping the script
to sh still works, and a run with no terminal says so before any npm step.
Run: with no terminal, --dry-run lists the four packages and the real run
stops with the message, exit 1, nothing asked of npm. Not run on a terminal
(that takes the owner's 2FA).
Finds from the registry, for origin/main, each package npm doesn't have
(first publish, then publish.yml as its Trusted Publisher with
--allow-publish) and each whose version npm lacks (its trust revoked and
made again with --allow-publish, then publish.yml dispatched). Runs npm 11
through npx, since npm trust needs 11.5.
Run: sh -n; --dry-run against the real registry lists opendesign 0.1.4 and
type4me 0.1.0 as new, zed 0.1.7 and zen-free 0.1.8 as behind, and leaves
no worktree behind. The trust-id parser was tried on sample JSON. The
publish and trust steps themselves need an owner's 2FA and weren't run.
A new package's first npm version can't go through trusted publishing
(a Trusted Publisher is set on a package that exists, with an owner's
2FA), so reviewed plugin PRs (#84 and others) sat unmerged until an owner
published by hand. Now publish.yml's dist job packs every package's
version (scripts/dist.mjs, npm pack --ignore-scripts) onto the dist
branch: tgz/<file> and index.json with each tarball's sha512. magpie
installs a @magpie-community package from there when npm doesn't have
the version. A new package without NPM_TOKEN is a notice, not a failed
run; a version npm refuses still fails it, now naming the stage-only
default of trusts made since 2026-09-03 and --allow-publish.
Run: node scripts/dist.mjs into an empty folder packed all 22 packages
(index.json 164K); the zed tarball's sha512 equals npm pack's integrity;
a second run packs nothing. The workflow itself is tried on main after
this push (workflow_dispatch).
Every publish run on main since 13:27 UTC 10-14 is red: opencode-zed-auth
0.1.7 and opencode-zen-free-auth 0.1.6 answer 404 because their Trusted
Publisher isn't set, and a new package (opendesign-auth, AstraFlow) can't be
created by OIDC at all. Each of those needed an org owner's OTP by hand.
npm tries OIDC first and falls back to the token in .npmrc, so publish.yml
now hands setup-node's NODE_AUTH_TOKEN the repository's NPM_TOKEN secret.
publish.sh publishes a new package when the token is there instead of
passing it by, and its errors say which of the two is missing or that the
token expired. The PR check now notes a new package instead of failing,
since the merge publishes it. README gains a Publishing section with the
one-time token setup.
Run: sh -n on both scripts; scripts/new-to-npm.sh against npm (every
package is on npm); scripts/publish.sh with GITHUB_ACTIONS=true and a fake
npm on PATH (zed-auth "new"): token -> published with the token, exit 0; no
token -> ::error naming it, exit 1; token refused -> ::error saying replace
the token, exit 1.
Not tried: a real publish with a token, since the secret doesn't exist yet.
magpie (cb406c84) lets a plugin add an agent it has no setup of its own
for. This one writes Aider's ~/.aider.conf.yml: the model under litellm's
openai/ prefix, magpie's /v1 and Aider's own key. check.mjs skips agent
packages as it does middleware; README gains an Agents section.
Run: bun test packages/aider (2 pass); bun scripts/check.mjs; the module
loaded through magpie's agentplug.Compile and its connect returned the
three keys. The same module, in a sandbox magpie, wired a real aider
0.86.2 that answered from a real DeepSeek account, and Disconnect put
the file back byte for byte.
Trusted publishing can't create a package, so #39's block-patterns,
merged before its first version was on npm, left every publish run on
main red after it (8 runs, the last 37781353941), and a real refused
publish would have hidden behind it. pr.yml runs bun test and check.mjs
on each pull request, and scripts/new-to-npm.sh names any package npm
doesn't know, so its first version is published by hand and its Trusted
Publisher set before the merge. The README's market section says so.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
try.sh runs magpie with env -i and a HOME pointing into the sandbox, so
the real magpie, its agents and its sign-ins are never touched. On
Windows that is no sandbox: magpie's home comes from USERPROFILE
(appdir.homeVar) and HOME is not read, so env -i leaves USERPROFILE
unset and magpie found no home at all — it stopped before doing anything
with "USERPROFILE is not set: magpie needs the home folder to find its
own files and the agents'", and scripts/try.sh was unusable on Windows.
The sandbox is given USERPROFILE="$sb" beside HOME, which is a no-op
elsewhere. A portable magpie.exe ignores both and can't be sandboxed
this way, which predates this.
.github/workflows/publish.yml runs the tests (in a throwaway HOME) and
scripts/publish.sh on each package.json change pushed to main, or by hand;
npm's OIDC exchange stands in for a token and an OTP. Every package now
names magpie-community/plugins' publish.yml as its trusted publisher on
npmjs.com, and gets the repository field npm checks it against.