summaryrefslogtreecommitdiff
path: root/check.lua
diff options
context:
space:
mode:
Diffstat (limited to 'check.lua')
-rw-r--r--check.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/check.lua b/check.lua
index b8abfdd..4d58e8d 100644
--- a/check.lua
+++ b/check.lua
@@ -69,7 +69,15 @@ return {name='test.signature', activate=function()
ext.register_tool{name='fixture.echo',description='Return a nested value.',
schema={type='object',properties={rows={type='array',minItems=1,items={type='object',properties={value={type='integer'}},required={'value'}}}},required={'rows'}},
handler=function(input)
- if not uv.fs_stat(os.getenv('HOME')..'/.local/share/panto-antigravity/google/usage-failure') then ext.agent:submit('boundary workflow notice') end
+ local profile=os.getenv('HOME')..'/.local/share/panto-antigravity/google'
+ if input.rows[1].value==43 then
+ local f=assert(io.open(profile..'/tool-running','w')); f:close()
+ local co=coroutine.running(); local timer=uv.new_timer()
+ timer:start(10,10,function()
+ if uv.fs_stat(profile..'/return-result') then timer:close(); assert(coroutine.resume(co)) end
+ end)
+ coroutine.yield()
+ elseif not uv.fs_stat(profile..'/usage-failure') then ext.agent:submit('boundary workflow notice') end
return tostring(input.rows[1].value)
end}
end}