agy-cli 0.1.58: Claude Code's identity line goes as "You're …" (#1151)
KevinXC5 bisected Claude Code 2.1.325's system prompt on a real
Antigravity account: "You are Claude Code, Anthropic's official CLI for
Claude." alone brings the bare 429 back, 3 of 3, while "You're Claude
Code, …" and "This agent is …" pass. It is now in TURNED_AWAY and
reworded with the same "You're" rule as the other agents' lines; the
prefix match covers the Agent SDK variant (", running within the Claude
Agent SDK.") too.
Left out: "You are an interactive agent that helps users with software
engineering tasks." It isn't in the Claude Code binary here (2.1.316) or,
by Kevin's reading, in 2.1.325, so it isn't the line Antigravity matches.
Run: bun test in packages/agy-cli on mica, 24 pass; bun
scripts/check.mjs agy-cli ok. Broken by hand: with the TURNED_AWAY line
removed, the new test fails (23 pass, 1 fail).
Not tried: a real Antigravity request. The local agy account answers 403
(disabled), so this rests on the reporter's bisect.
This commit is contained in:
@@ -35,8 +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-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,
|
||||
// KevinXC5, 3 of 3 through agy on gemini-4-hydrogen with Claude Code
|
||||
// 2.1.325); "You're …" and "This agent is …" each went through 3 of 3.
|
||||
// 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,
|
||||
// the rest of 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.
|
||||
export const TURNED_AWAY = [
|
||||
"x-anthropic-billing-header:",
|
||||
@@ -50,6 +55,7 @@ export const TURNED_AWAY = [
|
||||
"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",
|
||||
"you are claude code, anthropic's official cli for claude",
|
||||
]
|
||||
|
||||
// INVISIBLE are the characters Google's check reads past: since 11-14 a
|
||||
@@ -105,7 +111,8 @@ export function turnsAway(system) {
|
||||
// as "You're …" (5 of 5 each), and Hermes' earlier "created by Nous
|
||||
// Research" as "built by" (3 of 3 together).
|
||||
// - pi's line goes "running within pi" (5 of 5 on both models).
|
||||
// - DeepSeek Harness's line goes as "You're …" (#1171).
|
||||
// - DeepSeek Harness's line goes as "You're …" (#1171), and so does
|
||||
// Claude Code's identity line (#1151).
|
||||
// - 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")
|
||||
@@ -121,6 +128,7 @@ const SAID_AS = {
|
||||
"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,
|
||||
"you are claude code, anthropic's official cli for claude": youre,
|
||||
}
|
||||
|
||||
// USER_TURNED_AWAY are the lines Antigravity also turns away in a user's
|
||||
|
||||
@@ -25,6 +25,8 @@ const samples = [
|
||||
"You are a coding agent running in the Codex CLI, a terminal-based coding assistant. Codex CLI is an open source project led by OpenAI. You are expected to be precise, safe, and helpful.",
|
||||
"You are a coding assistant running inside pi, a coding agent harness. Help users inspect files, run commands, and modify code.",
|
||||
"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.",
|
||||
"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.",
|
||||
@@ -89,3 +91,11 @@ test("DeepSeek Harness's first line goes as \"You're …\", and the variants tha
|
||||
expect(hint("You are an AI agent powered by DeepSeek Harness.")).toContain("DeepSeek Harness's system prompt")
|
||||
for (const s of ["You are an AI agent powered by DeepSeek.", "You are an agent powered by DeepSeek Harness.", "You're an AI agent powered by DeepSeek Harness."]) expect(cloak(s)).toBe(s)
|
||||
})
|
||||
|
||||
test("Claude Code's identity line goes as \"You're …\", its CLI's and its SDK's (#1151)", () => {
|
||||
expect(cloak("You are Claude Code, Anthropic's official CLI for Claude.\n\nBe brief.")).toBe("You're Claude Code, Anthropic's official CLI for Claude.\n\nBe brief.")
|
||||
expect(cloak("You are Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK.")).toBe("You're Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK.")
|
||||
expect(hint("You are Claude Code, Anthropic's official CLI for Claude.")).toContain("Claude Code")
|
||||
const s = "You're Claude Code, Anthropic's official CLI for Claude."
|
||||
expect(cloak(s)).toBe(s)
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@magpie-community/opencode-agy-cli-auth",
|
||||
"version": "0.1.57",
|
||||
"version": "0.1.58",
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user