fix cross-process scenario switching and stale flights on scenario change
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
2026-04-16 01:42:10 -03:00
parent 22c924d3b0
commit e03ac3982a
5 changed files with 13 additions and 9 deletions

View File

@@ -12,8 +12,9 @@ from fastmcp import Client
def _env() -> dict:
"""Forward LLM-related env vars to MCP server subprocesses."""
"""Forward LLM-related env vars and active scenario to MCP server subprocesses."""
import os
from mcp_servers.data.scenarios.manager import scenario_manager
env = {}
for key in (
@@ -27,6 +28,7 @@ def _env() -> dict:
val = os.getenv(key)
if val:
env[key] = val
env["ACTIVE_SCENARIO"] = scenario_manager.active_id
return env