From 0b5892bc31fb576099421ecddfbdc7a7b243d02d Mon Sep 17 00:00:00 2001 From: t Date: Sat, 5 Dec 2026 10:01:32 -0700 Subject: Allow Antigravity requests from any Panto context --- tests/fake-agy.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tests/fake-agy.lua') diff --git a/tests/fake-agy.lua b/tests/fake-agy.lua index 1774dec..e5e8e1f 100644 --- a/tests/fake-agy.lua +++ b/tests/fake-agy.lua @@ -1,6 +1,10 @@ -- Offline agy fixture. check.lua installs this with Panto's embedded Lua shebang. local uv, json = require('luv'), require('panto').ext.json local profile = assert(os.getenv('HOME')) .. '/.local/share/panto-antigravity/google' +local function fixture_mode() + local f=io.open(os.getenv('HOME')..'/fixture-mode','r'); if not f then return end + local mode=f:read('a'); f:close(); return mode +end if arg[1] == '--version' then error('unexpected version check') end if arg[1] ~= 'acp' then assert(json.encode({table.unpack(arg)}) == json.encode({ @@ -149,10 +153,16 @@ if not resumed then reply(q,{sessionId='test-session',configOptions=split('gemini-other','high',{'high','xhigh'})}) q=request('session/set_config_option'); assert(q.params.configId=='model' and q.params.value=='gemini-test') reply(q,{configOptions=split('gemini-test','high',{'low','high'})}) - set_level('low') + if fixture_mode()~='diagnostic' then set_level('low') end end -if not servers[1] then finish(prompt('no-tools'),'no-tools-ok') +if fixture_mode()=='diagnostic' then + -- Unsupported xhigh fails after model selection, before a prompt is sent. + assert(not io.read('l'), 'diagnostic unexpectedly sent an ACP request') +elseif fixture_mode() then + local text=fixture_mode() + finish(prompt(text),'headless-'..text..'-ok') +elseif not servers[1] then finish(prompt('no-tools'),'no-tools-ok') elseif resumed then local resumed_prompt=prompt('resume'); check_relay(); finish(resumed_prompt, 'resumed-ok') elseif uv.fs_stat(profile..'/usage-failure') then assert(not resumed) -- Oversized history: the older part rides the system prompt append; the -- cgit v1.3