context_manager.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. """
  2. -----------------------------------------------------------------------------------------
  3. INTERSEL - 4 cité d'Hauteville - 75010 PARIS
  4. RCS PARIS 488 379 660 - NAF 721Z
  5. File : core/context/context_manager.py
  6. Object : Context manager for the MCP server
  7. -----------------------------------------------------------------------------------------
  8. Modifications :
  9. - 2026/01/16 - Damien Lugagne-Delpon - V1.0.0- Creation
  10. -----------------------------------------------------------------------------------------
  11. @copyright : Intersel 2026
  12. @author : Damien Lugagne-Delpon - damien.lugagne-delpon@livinweb.fr
  13. @version : 1.0.0 (to be updated to the current_version of the developed software if file is touched)
  14. -----------------------------------------------------------------------------------------
  15. """
  16. from .context_schema import DEFAULT_CONTEXT
  17. class ContextManager:
  18. """Context manager for the MCP server."""
  19. def __init__(self):
  20. """Initialize the context manager."""
  21. self.context = DEFAULT_CONTEXT.copy()
  22. def add_context(self, key: str, value):
  23. """"""
  24. pass
  25. def remove_context(self, key: str):
  26. """Supprimer du contexte."""
  27. pass
  28. def get_context(self):
  29. """Obtenir le contexte complet."""
  30. return self.context