src.core.project_context_manager module#
Project Context Manager for Marcus Multi-Project Support.
Manages project switching, state isolation, and kanban client lifecycle for multiple concurrent projects.
- class src.core.project_context_manager.ProjectContext[source]#
Bases:
objectContainer for project-specific state and services.
- class src.core.project_context_manager.ProjectContextManager[source]#
Bases:
objectManages multiple project contexts with state isolation.
Handles: - Project switching - Kanban client lifecycle - State isolation per project - Resource cleanup for inactive projects
- MAX_CACHED_PROJECTS = 10#
- IDLE_TIMEOUT_MINUTES = 30#
- __init__(registry=None, global_context=None)[source]#
Initialize the project context manager.
- Parameters:
registry (
Optional[ProjectRegistry]) – Optional project registry instance.global_context (
Optional[Context]) – Optional global context instance to update with project_id changes.
- property lock: Lock#
Get context lock for the current event loop.
- async get_kanban_client()[source]#
Get the kanban client for the active project.
- Returns:
Kanban client or None if no active project.
- Return type:
- async get_active_project_state()[source]#
Get the project state for the active project.
- Return type: