agy-cli 0.1.88, antigravity 0.2.2: DeepSeek Harness's browser sentence goes "gives"

LayFz (#1105, @baoshijie8848 on X) ran a controlled A/B on one Antigravity
Ultra account, same model and endpoint, only the system prompt changed:
"You are an AI agent powered by DeepSeek Harness." and, in the middle of
DSH's Web GUI paragraph (@deepseek-ai/dsh-harness-dev-context), "The
browser provides no implicit DOM, route, or screenshot context." each got
429 RESOURCE_EXHAUSTED; each paraphrased got 200.

- agy-cli's cloak.mjs already had the first line (#1171, 0.1.57). It now
  has the browser sentence too, sent as "The browser gives no implicit
  DOM, route, or screenshot context.", and the DSH hint names both.
- The antigravity plugin (0.2.1, serving existing users) had neither:
  both lines are added there, with a DSH hint.

The rewording keeps every word but the verb. sub2api's PR 8878 drops
"route", which changes what DSH tells the model, so it was not copied.

Real account, 11-17, through the antigravity plugin, sandbox HOME, the
owner's existing plugin sign-in (no credentials entered), 3 runs each:
- 0.2.1 (old): opener 429 3/3 on gemini-4-hydrogen-sonar (gemini-3.8-flash
  gave three 502 cert errors upstream that round, 429 3/3 in the earlier
  round); the literal Web GUI paragraph 429 on both models; opener +
  paragraph 429 3/3 on both.
- agy-cli 0.1.88's outgoing() text for opener + paragraph, sent through
  0.2.1 (which leaves it as is): 200 3/3 on both models.
- 0.2.2 (new): opener, paragraph, opener + paragraph raw from the client:
  200 on both models (one upstream 502 cert error on flash).
- Bisect (gemini-3.8-flash): the sentence lower-cased or wrapped over a
  newline 429; without its period, without the comma before "or",
  without "implicit", or "gives" for "provides" 200. So those variants
  stay as written and the tests check it.

Tests use the paragraph word for word.

Run (mote, HOME=$(mktemp -d)) at this tree: bun test packages/agy-cli
packages/antigravity 173 pass, 0 fail; bun scripts/check.mjs ok.
Broken by hand: 0.1.87's cloak.mjs and 0.2.1's index.mjs with the new
tests: both new tests fail (2 of 40 in cloak.test.mjs + shape.test.mjs).
Not changed: magpie's codeassist.go list and the antigravity-cloak
middleware act only on the retired built-in Antigravity (Account.Agent
"antigravity"), which serves no requests.
This commit is contained in:
yetone
2026-11-17 15:44:38 +08:00
parent 1c9ade6c81
commit 8c3397d3ff
9 changed files with 93 additions and 6 deletions
+5 -1
View File
@@ -304,7 +304,11 @@ back, it is reported as a 400 about the prompt, not as a quota.
DeepSeek Harness's paragraph on `@` paths ("Tokens prefixed with @ are
paths…") goes reworded with the same meaning, as the Antigravity provider
sends it: word for word, it got most `gemini-4-argon` answers fast, without
thinking and shallow (#1028).
thinking and shallow (#1028). DeepSeek Harness's first line, "You are an AI
agent powered by DeepSeek Harness." (#1171), and "The browser provides no
implicit DOM, route, or screenshot context." in its Web GUI paragraph
(#1105) get the 429 as written too, so they go as "You're …" and "The
browser gives …".
Set to `1`, the temporary agent carries `excludeDefaultComponents: true`. The
request that goes upstream then has none of agy's own system prompt, only
+3
View File
@@ -219,6 +219,9 @@ agy 发出之前去掉计费那一行,其余几行换成同义的说法("bui
DeepSeek Harness 的 `@` 路径说明段("Tokens prefixed with @ are paths…")也和 Antigravity 提供商一样
换成同义的说法再发:原文照发时 `gemini-4-argon` 大多很快答完、不思考、只走一步(#1028)。
DeepSeek Harness 的第一句 "You are an AI agent powered by DeepSeek Harness."(#1171)和它 Web GUI 段里的
"The browser provides no implicit DOM, route, or screenshot context."(#1105)原样发出也会被回 429,
分别改成 "You're …" 和 "The browser gives …" 再发。
设为 `1` 后,临时 agent 带上 `excludeDefaultComponents: true`:发往上游的请求里不再有
agy 自己的系统提示词,只剩插件的一行工具说明和客户端的系统提示词(同样以上面两种方式之一
+13 -2
View File
@@ -35,6 +35,13 @@
// by DeepSeek Harness.", is turned away too (#1171, huangzhenhao90, on a
// real account through agy on gemini-4-hydrogen): "powered by DeepSeek."
// alone, "an agent" for "an AI agent" and "You're …" each went through.
// Since 11-17 so is a sentence in the middle of DeepSeek Harness's Web GUI
// paragraph (@deepseek-ai/dsh-harness-dev-context), "The browser provides
// no implicit DOM, route, or screenshot context." (#1105, LayFz, on an Ultra
// account on gemini-4-hydrogen-medium and -xhigh; 3 of 3 on gemini-3.8-flash
// and gemini-4-hydrogen-sonar on 11-17, lower-cased or wrapped too, and the
// whole paragraph with it). Without its period, without the comma before
// "or", without "implicit" or with "gives" for "provides" it went through.
// Since 11-15 Claude Code's identity line, "You are Claude Code,
// Anthropic's official CLI for Claude." (its CLI's, and with ", running
// within the Claude Agent SDK" its SDK's), is turned away too (#1151,
@@ -56,6 +63,7 @@ export const TURNED_AWAY = [
"a coding assistant running inside pi",
"you are an ai agent powered by deepseek harness",
"you are claude code, anthropic's official cli for claude",
"the browser provides no implicit dom, route, or screenshot context.",
]
// INVISIBLE are the characters Google's check reads past: since 11-14 a
@@ -113,6 +121,8 @@ export function turnsAway(system) {
// - pi's line goes "running within pi" (5 of 5 on both models).
// - DeepSeek Harness's line goes as "You're …" (#1171), and so does
// Claude Code's identity line (#1151).
// - DeepSeek Harness's browser sentence goes "gives no implicit DOM, …"
// for "provides" (3 of 3 alone and in its paragraph on 11-17, #1105).
// - omp's RFC 2119 line goes as "key words", the RFC's own term (10 of 10
// on 11-14, eric_li8983 on X).
const youre = (line) => line.replace(/^(you)\s+are/i, "$1're")
@@ -129,6 +139,7 @@ const SAID_AS = {
"a coding assistant running inside pi": (line) => line.replace(/inside/i, "within"),
"you are an ai agent powered by deepseek harness": youre,
"you are claude code, anthropic's official cli for claude": youre,
"the browser provides no implicit dom, route, or screenshot context.": (line) => line.replace(/provides/i, "gives"),
}
// USER_TURNED_AWAY are the lines Antigravity also turns away in a user's
@@ -203,7 +214,7 @@ const CODEX_CLI_HINT =
"Antigravity answers this 429 to Codex's prompt for a model it has none of its own for (\"You are a coding agent running in the Codex CLI\") whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"You're …\", which goes through, so use another provider for these chats, or put one after Antigravity in a routing group"
const DSH_HINT =
"Antigravity answers this 429 to DeepSeek Harness's system prompt (\"You are an AI agent powered by DeepSeek Harness.\") whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"You're …\", which goes through, so use another provider for these chats, or put one after Antigravity in a routing group"
"Antigravity answers this 429 to DeepSeek Harness's system prompt (\"You are an AI agent powered by DeepSeek Harness.\", or \"The browser provides no implicit DOM, route, or screenshot context.\" in its Web GUI's) whatever quota is left, so it is not a quota and waiting won't help; magpie sends those lines as \"You're …\" and \"The browser gives …\", which go through, so use another provider for these chats, or put one after Antigravity in a routing group"
const RFC_HINT =
"Antigravity answers this 429 to the line \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" that starts oh-my-pi (omp)'s system prompt, and to any prompt that has it, whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"RFC 2119 key words: …\", which goes through, so this one came from a copy of it that was worded another way"
@@ -216,6 +227,6 @@ export function hint(system) {
if (said(system, "you are hermes agent") || said(system, "an intelligent ai assistant created by nous research")) return HERMES_HINT
if (said(system, "you are opencode")) return OPENCODE_HINT
if (said(system, "a coding assistant running inside pi")) return PI_HINT
if (said(system, "you are an ai agent powered by deepseek harness")) return DSH_HINT
if (said(system, "you are an ai agent powered by deepseek harness") || said(system, "the browser provides no implicit dom, route, or screenshot context.")) return DSH_HINT
return HINT
}
+22
View File
@@ -27,6 +27,7 @@ const samples = [
"You are an AI agent powered by DeepSeek Harness.\n\nYou can read files.",
"You are Claude Code, Anthropic's official CLI for Claude.\n\nYou are an interactive agent.",
"You are Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK.",
"They mean this GUI. The browser provides no implicit DOM, route, or screenshot context. The client-plugin HMR receiver is active.",
"Codex's GPT-6 prompt goes as written: You are Codex, an agent based on GPT-6.",
"You're Hermes Agent, an intelligent AI assistant created by Nous Research.",
"Nothing to see here; Claude Agent SDK alone is fine.",
@@ -99,3 +100,24 @@ test("Claude Code's identity line goes as \"You're …\", its CLI's and its SDK'
const s = "You're Claude Code, Anthropic's official CLI for Claude."
expect(cloak(s)).toBe(s)
})
// WEB_GUI is DeepSeek Harness's Web GUI paragraph as
// @deepseek-ai/dsh-harness-dev-context writes it, word for word
const WEB_GUI = "You are interacting with the user through the DeepSeek Harness Web GUI whose URL the runtime context names. When the user refers to \"this page\", \"this GUI\", or \"this app\" without naming another target, they mean this GUI. The browser provides no implicit DOM, route, or screenshot context. The client-plugin HMR receiver is active, but client-plugin changes reload without a refresh only while `pnpm run dev:web` is also running from this same checkout to rebuild their bundles; verify that watcher before promising automatic updates. Every other change — the apps/web shell and plain packages — requires rebuilding the affected Web artifacts and verifying this existing URL after a page refresh. Starting another server does not update this GUI. The apps/web Vite entry builds the shell but is not a standalone application because only dsh web injects window.__DSH_BOOT__. Do not start a replacement server unless the user asks; if one is needed, use a managed background job and verify its exact URL."
test("DeepSeek Harness's browser sentence goes \"gives\" for \"provides\", the rest of its paragraph as written (#1105)", () => {
const sys = "You are an AI agent powered by DeepSeek Harness.\n\n" + WEB_GUI
expect(turnsAway(WEB_GUI)).toBe(true)
const out = outgoing(sys)
expect(out).toBe("You're an AI agent powered by DeepSeek Harness.\n\n" + WEB_GUI.replace("The browser provides no implicit", "The browser gives no implicit"))
expect(turnsAway(out)).toBe(false)
expect(cloak("the browser provides no implicit\nDOM, route, or screenshot context.")).toBe("the browser gives no implicit\nDOM, route, or screenshot context.")
expect(hint(WEB_GUI)).toContain("The browser provides no implicit DOM")
// each went through as written on a real account (11-17)
for (const s of [
"The browser provides no implicit DOM, route, or screenshot context",
"The browser provides no implicit DOM, route or screenshot context.",
"The browser provides no DOM, route, or screenshot context.",
"The browser gives no implicit DOM, route, or screenshot context.",
]) expect(cloak(s)).toBe(s)
})
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@magpie-community/opencode-agy-cli-auth",
"version": "0.1.87",
"version": "0.1.88",
"description": "Magpie/OpenCode model provider that connects your local agy CLI through the Agent Client Protocol (agy acp), so Antigravity subscription models run through the real CLI",
"type": "module",
"main": "./opencode.mjs",
+5 -1
View File
@@ -118,7 +118,11 @@ The plugin also changes the request itself, as the built-in did:
someone broke up with invisible characters is reworded the same way.
DeepSeek Harness's paragraph on `@` paths ("Tokens prefixed with @ are
paths…") goes reworded with the same meaning: word for word, it got most
`gemini-4-argon` answers fast, without thinking and shallow (#1028).
`gemini-4-argon` answers fast, without thinking and shallow (#1028). Its
first line, "You are an AI agent powered by DeepSeek Harness.", and "The
browser provides no implicit DOM, route, or screenshot context." in its
Web GUI paragraph get the 429 as written, so they go as "You're …" and
"The browser gives …" (#1105).
- **Tool calls:**
- Tool call ids are reduced to `[A-Za-z0-9_-]`.
- A tool's `{output}` or `{error}` response becomes `{result}`.
+19
View File
@@ -940,6 +940,14 @@ function plainSchema(root) {
// - "a coding assistant running inside pi", pi 1.5.0's default prompt
// ("You are a coding assistant running inside pi, a coding agent
// harness."), as "agent" for "assistant" and "that runs inside pi" are.
// Two lines of DeepSeek Harness's system prompt are turned away too, as
// agy-cli's cloak.mjs has them: its first line, "You are an AI agent powered
// by DeepSeek Harness." (since 11-15, #1171), and "The browser provides no
// implicit DOM, route, or screenshot context." in its Web GUI paragraph
// (#1105, LayFz, on an Ultra account). Each 3 of 3 on gemini-3.8-flash and
// gemini-4-hydrogen-sonar on 11-17, the paragraph whole as well; without
// its period, without the comma before "or" or without "implicit" the
// browser sentence went through.
// Codex's prompt for GPT-6 ("You are Codex, an agent based on GPT-6."),
// Claude Code's, Gemini CLI's, Qwen Code's, Cline's, Kilo's, goose's, Amp's,
// Droid's, Kimi CLI's, Aider's and Cursor's went through as written.
@@ -954,6 +962,8 @@ const TURNED_AWAY = [
"you are opencode",
"you are a coding agent running in the codex cli",
"a coding assistant running inside pi",
"you are an ai agent powered by deepseek harness",
"the browser provides no implicit dom, route, or screenshot context.",
]
// INVISIBLE are the characters Google's check reads past: since 11-14 a
@@ -1008,6 +1018,9 @@ const turnsAway = (system) => TURNED_AWAY_RE.some((re) => has(system, re))
// - pi's line goes "running within pi" (5 of 5 on both models).
// - omp's RFC 2119 line goes as "key words", the RFC's own term (10 of 10
// on 11-14, eric_li8983 on X).
// - DeepSeek Harness's first line goes as "You're …", and its browser
// sentence "gives no implicit DOM, …" for "provides" (3 of 3 each on
// 11-17).
const youre = (line) => line.replace(/^(you)\s+are/i, "$1're")
const SAID_AS = {
"x-anthropic-billing-header:": () => "",
@@ -1020,6 +1033,8 @@ const SAID_AS = {
"you are opencode": youre,
"you are a coding agent running in the codex cli": youre,
"a coding assistant running inside pi": (line) => line.replace(/inside/i, "within"),
"you are an ai agent powered by deepseek harness": youre,
"the browser provides no implicit dom, route, or screenshot context.": (line) => line.replace(/provides/i, "gives"),
}
// USER_TURNED_AWAY are the lines Antigravity also turns away in a user's
@@ -1063,6 +1078,9 @@ const OPENCODE_HINT =
const CODEX_CLI_HINT =
"Antigravity answers this 429 to Codex's prompt for a model it has none of its own for (\"You are a coding agent running in the Codex CLI\") whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"You're …\", which goes through, so use another provider for these chats, or put one after Antigravity in a routing group"
const DSH_HINT =
"Antigravity answers this 429 to DeepSeek Harness's system prompt (\"You are an AI agent powered by DeepSeek Harness.\", or \"The browser provides no implicit DOM, route, or screenshot context.\" in its Web GUI's) whatever quota is left, so it is not a quota and waiting won't help; magpie sends those lines as \"You're …\" and \"The browser gives …\", which go through, so use another provider for these chats, or put one after Antigravity in a routing group"
const RFC_HINT =
"Antigravity answers this 429 to the line \"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL.\" that starts oh-my-pi (omp)'s system prompt, and to any prompt that has it, whatever quota is left, so it is not a quota and waiting won't help; magpie sends that line as \"RFC 2119 key words: …\", which goes through, so this one came from a copy of it that was worded another way"
@@ -1073,6 +1091,7 @@ function hint(system) {
if (said(system, "you are hermes agent") || said(system, "an intelligent ai assistant created by nous research")) return HERMES_HINT
if (said(system, "you are opencode")) return OPENCODE_HINT
if (said(system, "a coding assistant running inside pi")) return PI_HINT
if (said(system, "you are an ai agent powered by deepseek harness") || said(system, "the browser provides no implicit dom, route, or screenshot context.")) return DSH_HINT
return HINT
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@magpie-community/opencode-antigravity-auth",
"version": "0.2.1",
"version": "0.2.2",
"description": "Sign in to Antigravity with a Google account from OpenCode or magpie: Gemini, and the Claude and GPT-OSS models Google hosts for it",
"type": "module",
"main": "./opencode.mjs",
+24
View File
@@ -319,6 +319,30 @@ test("DeepSeek Harness's @-path paragraph goes reworded, the rest as written (#1
expect(both).toContain("When the user writes @ followed by a path")
})
// DeepSeek Harness's Web GUI paragraph as @deepseek-ai/dsh-harness-dev-context
// writes it, word for word
const WEB_GUI = "You are interacting with the user through the DeepSeek Harness Web GUI whose URL the runtime context names. When the user refers to \"this page\", \"this GUI\", or \"this app\" without naming another target, they mean this GUI. The browser provides no implicit DOM, route, or screenshot context. The client-plugin HMR receiver is active, but client-plugin changes reload without a refresh only while `pnpm run dev:web` is also running from this same checkout to rebuild their bundles; verify that watcher before promising automatic updates. Every other change — the apps/web shell and plain packages — requires rebuilding the affected Web artifacts and verifying this existing URL after a page refresh. Starting another server does not update this GUI. The apps/web Vite entry builds the shell but is not a standalone application because only dsh web injects window.__DSH_BOOT__. Do not start a replacement server unless the user asks; if one is needed, use a managed background job and verify its exact URL."
test("DeepSeek Harness's first line and browser sentence go reworded, the rest as written (#1171, #1105)", () => {
const { turnsAway, hint } = _internal
const sys = "You are an AI agent powered by DeepSeek Harness.\n\n" + WEB_GUI
expect(turnsAway(sys)).toBe(true)
const text = shape({ systemInstruction: { parts: [{ text: sys }] }, contents: [] }, "gemini-3.8-flash", "", "").systemInstruction.parts[0].text
expect(text).toBe("You're an AI agent powered by DeepSeek Harness.\n\n" + WEB_GUI.replace("The browser provides no implicit", "The browser gives no implicit"))
expect(turnsAway(text)).toBe(false)
// lower-cased or wrapped it was turned away too (11-17)
expect(cloak("the browser provides no implicit\nDOM, route, or screenshot context.")).toBe("the browser gives no implicit\nDOM, route, or screenshot context.")
expect(hint(sys)).toContain("DeepSeek Harness")
expect(hint(WEB_GUI)).toContain("The browser gives")
// each went through as written on a real account (11-17)
for (const s of [
"The browser provides no implicit DOM, route, or screenshot context",
"The browser provides no implicit DOM, route or screenshot context.",
"The browser provides no DOM, route, or screenshot context.",
"You are DeepSeek Harness.",
]) expect(cloak(s)).toBe(s)
})
// since 11-14 Codex's GPT-5 line in a user's turn is turned away too (3 of
// 3 on a real account): it goes reworded there, and the model's turns and
// tool results, which went through with it, as written