fix cross-process scenario switching and stale flights on scenario change
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user