From abfd45f7f1153fa2333283621d5c5297a49d7f11 Mon Sep 17 00:00:00 2001 From: fred777 Date: Wed, 27 May 2026 10:28:34 +0200 Subject: [PATCH] Introduce _bot_globals for persistent data storage between bot executions --- app/fanout/bot_exec.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/fanout/bot_exec.py b/app/fanout/bot_exec.py index 253cfed..cc6957b 100644 --- a/app/fanout/bot_exec.py +++ b/app/fanout/bot_exec.py @@ -39,6 +39,8 @@ BOT_MESSAGE_SPACING = 2.0 _bot_send_lock = asyncio.Lock() _last_bot_send_time: float = 0.0 +# global container for persistent data storage between bot executions, will be added to execution namespace +_bot_globals: dict[str,Any] = {} @dataclass(frozen=True) class BotCallPlan: @@ -185,6 +187,7 @@ def execute_bot_code( # Build execution namespace with allowed imports namespace: dict[str, Any] = { "__builtins__": __builtins__, + "_bot_globals": _bot_globals, } try: