From 4aff680b171931676e486e8e7f6241fd781e0f4e Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Sun, 1 Jun 2025 13:48:36 -0600 Subject: [PATCH] Fixed Agent Macro Deployment Issues --- Borealis.ps1 | 1 + Data/Agent/borealis-agent.py | 18 ++++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Borealis.ps1 b/Borealis.ps1 index 4133ad9..ddd24e9 100644 --- a/Borealis.ps1 +++ b/Borealis.ps1 @@ -376,6 +376,7 @@ switch ($choice) { Remove-Item $agentDestinationFolder -Recurse -Force -ErrorAction SilentlyContinue New-Item -Path $agentDestinationFolder -ItemType Directory -Force | Out-Null Copy-Item $agentSourcePath $agentDestinationFile -Force + Copy-Item "Data\Agent\Python_API_Endpoints" $agentDestinationFolder -Recurse } . "$venvFolder\Scripts\Activate" } diff --git a/Data/Agent/borealis-agent.py b/Data/Agent/borealis-agent.py index 3229de5..5cd7d48 100644 --- a/Data/Agent/borealis-agent.py +++ b/Data/Agent/borealis-agent.py @@ -158,7 +158,6 @@ async def disconnect(): # ////////////////////////////////////////////////////////////////////////// # CORE SECTION: AGENT CONFIG MANAGEMENT / WINDOW MANAGEMENT # ////////////////////////////////////////////////////////////////////////// - @sio.on('agent_config') async def on_agent_config(cfg): print("[DEBUG] agent_config event received.") @@ -168,15 +167,6 @@ async def on_agent_config(cfg): await stop_all_roles() return -@sio.on('list_agent_windows') -async def handle_list_agent_windows(data): - # Called from the server/webui to fetch current open windows for dropdown - windows = macro_engines.list_windows() - await sio.emit('agent_window_list', { - 'agent_id': AGENT_ID, - 'windows': windows - }) - print(f"[CONFIG] Received New Agent Config with {len(roles)} Role(s).") new_ids = {r.get('node_id') for r in roles if r.get('node_id')} @@ -211,6 +201,14 @@ async def handle_list_agent_windows(data): task = asyncio.create_task(macro_task(role_cfg)) role_tasks[nid] = task +@sio.on('list_agent_windows') +async def handle_list_agent_windows(data): + windows = macro_engines.list_windows() + await sio.emit('agent_window_list', { + 'agent_id': AGENT_ID, + 'windows': windows + }) + # ---------------- Overlay Widget ---------------- overlay_green_thickness = 4 overlay_gray_thickness = 2