MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / get_manager

Function get_manager

server/services/process_manager.py:532–545  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

530
531
532def 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
548async def cleanup_all_managers() -> None:

Callers 4

project_websocketFunction · 0.85
_start_agentMethod · 0.85
_stop_agentMethod · 0.85
get_project_managerFunction · 0.85

Calls 1

AgentProcessManagerClass · 0.85

Tested by

no test coverage detected