From 48b14add01cb106217832e036e3569e494f1d65c Mon Sep 17 00:00:00 2001 From: t Date: Fri, 4 Dec 2026 15:30:05 -0700 Subject: Send dropped images as native ACP prompt content blocks Panto expands a pasted image into a multi-block user message (text, [Image-N] path text, base64 media). The adapter only accepted a single text block, so any image drop failed with 'No matching Antigravity tool handoff or text prompt'. Translate text and image/* media blocks into ACP ContentBlocks for new turns, warm follow-ups, boundary steering and transcript reseeds, gated on the agent's advertised promptCapabilities.image. Image data rides outside agy's ~191 KB user-text cap, so only text bytes count toward message_bytes; reseeds prefix the leading text block and reserve room for the path context block. Non-image attachments (PDFs) are refused before launch because agy's ACP inlineMedia accepts image/* only. The offline check now drops a real PNG via bracketed paste across a warm turn, /tree reseed and cold resume, and asserts PDF rejection. --- check.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'check.lua') diff --git a/check.lua b/check.lua index d0617a5..eac0f55 100644 --- a/check.lua +++ b/check.lua @@ -61,6 +61,8 @@ protocol="antigravity-acp" write(cfg .. '/SYSTEM.md', 'Short answers.') local filler={}; for i=1,1900 do filler[i]=('filler line %04d abcdefghij'):format(i) end write(cfg .. '/history-filler.txt', table.concat(filler,'\n')) + write(home .. '/drop.png', '\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x01\x00\x00\x00\x01\x08\x04\x00\x00\x00\xb5\x1c\x0c\x02\x00\x00\x00\x0b\x49\x44\x41\x54\x78\xda\x63\xfc\xff\x1f\x00\x03\x03\x02\x00\xef\x9a\x5f\x59\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82') + write(home .. '/drop.pdf', '%PDF-1.7') local exe = home .. '/agy' assert(uv.fs_symlink(panto, home .. '/panto')) -- short, space-free shebang path write(exe, '#!' .. home .. '/panto lua\n' .. read(root .. '/tests/fake-agy.lua')) -- cgit v1.3