Get or create a process manager for a project (thread-safe). Args: project_name: Name of the project project_dir: Absolute path to the project directory root_dir: Root directory of the autonomous-coding-ui project
(project_name: str, project_dir: Path, root_dir: Path)
| 530 | |
| 531 | |
| 532 | def get_manager(project_name: str, project_dir: Path, root_dir: Path) -> AgentProcessManager: |
| 533 | """Get or create a process manager for a project (thread-safe). |
| 534 | |
| 535 | Args: |
| 536 | project_name: Name of the project |
| 537 | project_dir: Absolute path to the project directory |
| 538 | root_dir: Root directory of the autonomous-coding-ui project |
| 539 | """ |
| 540 | with _managers_lock: |
| 541 | # Use composite key to prevent cross-project UI contamination (#71) |
| 542 | key = (project_name, str(project_dir.resolve())) |
| 543 | if key not in _managers: |
| 544 | _managers[key] = AgentProcessManager(project_name, project_dir, root_dir) |
| 545 | return _managers[key] |
| 546 | |
| 547 | |
| 548 | async def cleanup_all_managers() -> None: |
no test coverage detected