Google bans accounts it sees on Code Assist through Antigravity's own
client. magpie offered that route twice, the built-in and
@magpie-community/opencode-antigravity-auth, and anyone who picked
Antigravity in magpie took it by default (the owner, 11-15: 全部下线,改推
agy-cli).
- retiredBuiltins has antigravity. googleLogins lists no account of a
subscription its plugin serves, so no list, usage read, quota read or
request goes to Google with a built-in Antigravity account (the usage
loop in subscription_usage.go had no gate of its own). The mover reads
googleSavedLogins, so saved accounts still move.
- The mover's min is 0.2.0 (on the plugins dist index, b8bf5a57): that
version sends nothing, answers every request 410 ModelDeprecated
("model has been retired", which modelRetired reads, so a group asks its
next member) naming Antigravity (local agy CLI) and
`magpie plugin add @magpie-community/opencode-agy-cli-auth`, and turns
sign-in away. It left the plugins registry (003a38ff).
- Gemini CLI's route, on the same code, is unchanged.
- The built-in's code stays for now (shared with Gemini CLI); taking it
out is #6723. Its 123 tests serve it again for their run through
provider.AntigravityBuiltinForTest(), a counter BuiltinRetired reads.
- README (en, zh) and site docs subscriptions (en, zh, ja) point to
Antigravity through the user's own agy CLI. AGENTS.md and
provider-plugins.md say why and that neither route comes back.
What users lose: Antigravity with Google accounts signed in to magpie, and
rotating several of them. agy-cli serves the one account the user's agy is
signed in to, and needs agy installed.
Tests: TestRetiredAntigravityAsksGoogleNothing saves an Antigravity
account and checks googleLogins/googleAccountOf give nothing, the mover
still carries it, usage has no Antigravity card and the fake Google was
asked nothing, and Gemini's account still lists. Broken by hand (the
PluginServes gate removed from googleLogins): red,
"googleLogins(antigravity) = 1 accounts".
Run (mote/mica, at this change on origin/main 5bd41301b): gofmt -l clean;
go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet
./... and go build ./... ok; go test ./internal/gateway/ (1245s),
./internal/agent/ (419s), ./internal/provider/ (253s) ok on mica;
after rebasing on origin/main f362d3b9a: go test ./internal/provider/
(160s) and ./internal/plugin/ (184s) ok on mica.
Earlier at this change minus the test opt-ins: sessions, usage, library,
gui ok (mica). internal/cli's TestEveryRouteHasACommandOrIsNamed is red at
5bd41301b itself (/api/warm-all, #6724), not from this change.
Not run: the full ./... suite (mote and mica each had another session's
full or GUI suite); the GUI suite (no app.js change); a real move of a
built-in Antigravity account onto 0.2.0.
Plugins side: magpie-community/plugins 003a38ff (antigravity 0.2.0) and
f9155256 (agy-cli 0.1.56, comments only).
47 lines
1.8 KiB
Go
47 lines
1.8 KiB
Go
package provider
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/yetone/magpie/internal/plugin"
|
|
)
|
|
|
|
// A plugin's usage says the pool a window is of and the family a model's
|
|
// window belongs to, as Antigravity's plugin says them: the pool's own
|
|
// windows are pools (PoolWindow) holding the models put in them, and a page
|
|
// of text names them with their pool in place of the models' own, as the
|
|
// built-in's quota did.
|
|
func TestPluginWindowsKeepPoolAndFamily(t *testing.T) {
|
|
t.Cleanup(AntigravityBuiltinForTest()) // the retired built-in route
|
|
week := float64(7 * 24 * 3600)
|
|
q := quotaOfPlugin(SubscriptionQuota{Provider: "antigravity", User: "a@gmail.com"}, plugin.Usage{Windows: []plugin.UsageWindow{
|
|
{Name: "Gemini 3.8 Flash", Model: "gemini-3.8-flash", Family: "gemini", Pool: "Gemini", Used: fptr(20), Span: week},
|
|
{Name: "Claude Sonnet 4.6", Model: "claude-sonnet-4-6", Family: "claude", Used: fptr(5)},
|
|
{Name: "7 days", Pool: "Gemini", Used: fptr(20), Span: week, Aside: true},
|
|
}})
|
|
if len(q.Windows) != 3 {
|
|
t.Fatalf("windows %+v", q.Windows)
|
|
}
|
|
m, c, p := q.Windows[0], q.Windows[1], q.Windows[2]
|
|
if m.Pool != "Gemini" || m.Family != "gemini" || c.Pool != "" || c.Family != "claude" || p.Pool != "Gemini" || p.Family != "" {
|
|
t.Fatalf("pool/family %q/%q %q/%q %q/%q", m.Pool, m.Family, c.Pool, c.Family, p.Pool, p.Family)
|
|
}
|
|
if !p.PoolWindow() || m.PoolWindow() {
|
|
t.Fatalf("PoolWindow: pool %v, model %v", p.PoolWindow(), m.PoolWindow())
|
|
}
|
|
if ms := PoolMembers(q.Windows, p); len(ms) != 1 || ms[0].Model != "gemini-3.8-flash" {
|
|
t.Fatalf("members %+v", ms)
|
|
}
|
|
var names []string
|
|
for _, w := range PooledWindows(q.Windows) {
|
|
names = append(names, w.Name)
|
|
}
|
|
if len(names) != 2 || names[0] != "Claude Sonnet 4.6" || names[1] != "Gemini · 7 days" {
|
|
t.Fatalf("pooled %q", names)
|
|
}
|
|
if p.Span != 7*24*time.Hour {
|
|
t.Fatalf("span %v", p.Span)
|
|
}
|
|
}
|