From 834ce12e8fc1f63507bf36bb29df6a3b2dec05b2 Mon Sep 17 00:00:00 2001 From: Niels Geens Date: Wed, 13 Nov 2024 17:48:39 +0100 Subject: [PATCH] Added timeout and limit to script entries --- action_schema.xsd | 10 +++++ sia/background_entry.py | 9 ++++- sia/parse_error_entry.py | 12 ++++-- sia/read_entry.py | 9 ++++- sia/reasoning_entry.py | 9 ++++- sia/repeat_entry.py | 69 ++++++++++++++++++++++++++-------- sia/response_parser.py | 50 ++++++++++++++---------- sia/single_entry.py | 59 +++++++++++++++++++++-------- sia/write_entry.py | 13 +++++-- system_prompt.md | 4 ++ test/background_entry_test.py | 14 +++---- test/base_agent_test.py | 11 +++--- test/delete_command_test.py | 6 +-- test/parse_error_entry_test.py | 26 +++++++------ test/read_entry_test.py | 20 +++++----- test/reasoning_entry_test.py | 14 +++---- test/repeat_entry_test.py | 14 +++---- test/single_entry_test.py | 16 ++++---- test/stop_command_test.py | 2 +- test/working_memory_test.py | 18 ++++----- test/write_entry_test.py | 18 ++++----- 21 files changed, 262 insertions(+), 141 deletions(-) diff --git a/action_schema.xsd b/action_schema.xsd index 8f22353..43e4446 100644 --- a/action_schema.xsd +++ b/action_schema.xsd @@ -33,6 +33,8 @@ Single script that runs once and completes. Output is stored in context until explicitly deleted. Used for one-time operations like file manipulation. + Single scripts are limited to 1024 characters and 1 second timeout by default. + These limits can be changed with attributes. Example: ls / @@ -43,6 +45,8 @@ + + @@ -51,6 +55,8 @@ After a command is issued, all repeat scripts in context are run again. Useful for monitoring changing files or viewing results immediately after changing a file. Repeat scripts should execute quickly to avoid blocking the agent. + Repeat scripts are limited to 1024 characters and 1 second timeout by default. + These limits can be changed with attributes. Example: ls / @@ -61,6 +67,8 @@ + + @@ -83,6 +91,7 @@ @@ -93,6 +102,7 @@