multi agent

This commit is contained in:
2026-07-06 23:23:44 +08:00
parent 1fb62f9d45
commit a453d9e6ba
18 changed files with 1582 additions and 25 deletions
+36
View File
@@ -0,0 +1,36 @@
"""Verify that the agents/ package does not introduce accidental coupling
into the existing runtime/ modules (task 7.2)."""
from __future__ import annotations
import importlib
def test_runtime_planner_unchanged() -> None:
"""Planner should not import from agents/."""
module = importlib.import_module("runtime.planner")
source = open(module.__file__).read() # type: ignore[arg-type]
assert "agents" not in source
def test_runtime_executor_unchanged() -> None:
"""Executor should not import from agents/."""
module = importlib.import_module("runtime.executor")
source = open(module.__file__).read() # type: ignore[arg-type]
assert "agents" not in source
def test_runtime_task_unchanged() -> None:
"""TaskRunner should not import from agents/."""
module = importlib.import_module("runtime.task")
source = open(module.__file__).read() # type: ignore[arg-type]
assert "agents" not in source
def test_agents_imports_runtime() -> None:
"""agents/ should import from runtime/, not the other way around."""
collab = importlib.import_module("agents.collab_runner")
source = open(collab.__file__).read() # type: ignore[arg-type]
assert "runtime.task" in source
assert "runtime.planner" in source
assert "runtime.executor" in source