claude-mpm 3.4.0__py3-none-any.whl → 3.4.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,7 @@ while preserving essential information.
23
23
  """
24
24
 
25
25
  import re
26
+ import os
26
27
  from pathlib import Path
27
28
  from typing import Dict, List, Optional, Any, Tuple
28
29
  from datetime import datetime
@@ -109,8 +110,9 @@ class MemoryBuilder(LoggerMixin):
109
110
  super().__init__()
110
111
  self.config = config or Config()
111
112
  self.project_root = PathResolver.get_project_root()
112
- self.working_directory = working_directory or self.project_root
113
- self.memories_dir = self.project_root / ".claude-mpm" / "memories"
113
+ # Use current working directory by default, not project root
114
+ self.working_directory = working_directory or Path(os.getcwd())
115
+ self.memories_dir = self.working_directory / ".claude-mpm" / "memories"
114
116
  self.router = MemoryRouter(config)
115
117
  self.project_analyzer = ProjectAnalyzer(config, self.working_directory)
116
118
 
@@ -23,6 +23,7 @@ information than lose important insights.
23
23
  """
24
24
 
25
25
  import re
26
+ import os
26
27
  from pathlib import Path
27
28
  from typing import Dict, List, Optional, Any, Set, Tuple
28
29
  from datetime import datetime
@@ -57,16 +58,19 @@ class MemoryOptimizer(LoggerMixin):
57
58
  'low': ['note', 'tip', 'hint', 'example', 'reference']
58
59
  }
59
60
 
60
- def __init__(self, config: Optional[Config] = None):
61
+ def __init__(self, config: Optional[Config] = None, working_directory: Optional[Path] = None):
61
62
  """Initialize the memory optimizer.
62
63
 
63
64
  Args:
64
65
  config: Optional Config object
66
+ working_directory: Optional working directory. If not provided, uses current working directory.
65
67
  """
66
68
  super().__init__()
67
69
  self.config = config or Config()
68
70
  self.project_root = PathResolver.get_project_root()
69
- self.memories_dir = self.project_root / ".claude-mpm" / "memories"
71
+ # Use current working directory by default, not project root
72
+ self.working_directory = working_directory or Path(os.getcwd())
73
+ self.memories_dir = self.working_directory / ".claude-mpm" / "memories"
70
74
 
71
75
  def optimize_agent_memory(self, agent_id: str) -> Dict[str, Any]:
72
76
  """Optimize memory for a specific agent.