Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ MCP server. The control port listens on loopback only, with a token per process.
newer, because the ACP server has to advertise image support. An image a tool
returns (a screenshot from `read`) goes to agy as a prompt image too: over MCP,
agy would save it to a file the model can't open.
- **Video and audio input** (Gemini models): inline base64. agy's ACP prompt
carries neither, so each is written to `attachments/<sha256>.<ext>` in the
session's folder and the model is asked to read it with agy's own
`view_file`, which hands Gemini the frames and the sound. Only a
conversation that carries one gets `view_file`; agy's tools stay off
otherwise. A video or audio URL, or one sent to a model other than Gemini,
gets HTTP 400. `count_tokens` counts a video or audio clip as one image, so
a long clip is undercounted.
- **Tool calls**: parallel and consecutive calls both work. A tool that runs past
150 seconds first gets a "still running" placeholder; once the real result
arrives, the same turn continues, and the client executes each call exactly once.
Expand Down Expand Up @@ -413,7 +421,11 @@ since 11-14 Google's check reads past them. Reworded in the first user turn
(the default), Claude Code's prompt is answered; in agy's session
instructions (`AGY_BRIDGE_SYSTEM_APPEND=1`) it is still turned away. So a
bare 429 there is reported as a 400 about the prompt, and in the user turn
as a rate limit the client can retry or another account can take.
as a rate limit the client can retry or another account can take. Either
way it ends the turn on the first try that got it: since agy 1.5.13 retries
it silently for minutes (eight tries over about two and a half), writing it
only to its log, so the plugin reads that log while the prompt runs instead
of waiting for agy to give up.

DeepSeek Harness's paragraph on `@` paths ("Tokens prefixed with @ are
paths…") goes reworded with the same meaning, as the Antigravity provider
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ agy 连接 `--ide-mcp-port` 时会运行 `nc 127.0.0.1 <端口>`。插件在 agy
- **图片输入**:支持内联 base64 的 PNG、JPEG、GIF、WebP。需要 agy 1.5.0 或更新版本,
因为图片能力要由 ACP 服务端声明。工具返回的图片(如 `read` 读到的截图)也作为提示里的
图片交给 agy:走 MCP 的话,agy 会把它存成文件,模型看不到。
- **视频与音频输入**(Gemini 型号):支持内联 base64。agy 的 ACP 提示带不了这两种,所以
每个都写到会话目录的 `attachments/<sha256>.<扩展名>`,再请模型用 agy 自己的 `view_file`
读取,Gemini 由此拿到画面和声音。只有带着视频或音频的对话才有 `view_file`,其余时候
agy 的工具都关着。视频或音频给的是 URL,或发给 Gemini 以外的模型时,返回 HTTP 400。
`count_tokens` 把一段视频或音频按一张图片计数,长片段会少算。
- **工具调用**:支持并行和连续调用。运行超过 150 秒的工具会先收到 "still running" 的
占位响应,真正的结果送达后继续同一轮对话,每个调用只在客户端执行一次。
- **会话续接**:每轮结束后记录会话,工具循环进行中的每一步也记录。重启 Magpie 或插件后,
Expand Down Expand Up @@ -287,7 +292,8 @@ Antigravity 对几行系统提示词(Claude Code 的计费行、Claude Agent S
和 pi 的身份句、oh-my-pi 的 RFC 2119 行)不论余量多少都回 429 "Resource has been exhausted"。插件在
agy 发出之前去掉计费那一行,其余几行换成同义的说法("built on the Claude Agent SDK by Anthropic"、"built on GPT-5"、"RFC 2119 key words: …"、"You're Hermes Agent / OpenCode / a coding agent running in the Codex CLI"、"running within pi"),和 Antigravity 提供商的做法一样(`cloak.mjs`)。Codex 的两句 GPT-5 行("You are Codex, a coding agent based on GPT-5"、"You are Codex, an agent based on GPT-5")出现在用户的轮次里(AGENTS.md、`<system-reminder>`)也会被拒,所以用户轮次里也换成 "built on GPT-5"。零宽空格已经没用:11-14 起 Google 的检查会忽略它们。改写后放在第一条用户消息里(默认做法),Claude Code
的提示词能正常回答;放在 agy 的会话指令里(`AGY_BRIDGE_SYSTEM_APPEND=1`)仍然被拒。所以后者回的 429 报成针对
提示词的 400,前者报成限流,客户端可以重试,或交给别的账号。
提示词的 400,前者报成限流,客户端可以重试,或交给别的账号。两种情况都在第一次被拒时就结束本轮:agy 1.5.13
起会静默重试几分钟(约两分半内 8 次),只写在它的日志里,所以插件在提示词运行期间读这份日志,不再等 agy 放弃。

DeepSeek Harness 的 `@` 路径说明段("Tokens prefixed with @ are paths…")也和 Antigravity 提供商一样
换成同义的说法再发:原文照发时 `gemini-4-argon` 大多很快答完、不思考、只走一步(#1028)。
Expand Down
2 changes: 2 additions & 0 deletions agy-cli.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ for (const [name, mocks] of [
["usage-settlement.mjs", false],
["steer-in-session.mjs", false],
["dropped-call.mjs", false],
["dropped-step.mjs", false],
["repeat-batch.mjs", false],
["unmatched-results.mjs", false],
["conversation-key.mjs", false],
Expand All @@ -55,6 +56,7 @@ for (const [name, mocks] of [
["park-reread.mjs", false],
["same-opening.mjs", false],
["claude-code-sessions.mjs", false],
["media-input.mjs", false],
]) {
test(`test/${name}`, () => {
// bun's 5s default per test is a fixed wait these process-spawning tests
Expand Down
Loading