claude-mpm 3.1.0__py3-none-any.whl → 3.1.1__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.
@@ -194,6 +194,18 @@ class SimpleClaudeRunner:
194
194
  for var in claude_vars_to_remove:
195
195
  clean_env.pop(var, None)
196
196
 
197
+ # Set the correct working directory for Claude Code
198
+ # If CLAUDE_MPM_USER_PWD is set, use that as the working directory
199
+ if 'CLAUDE_MPM_USER_PWD' in clean_env:
200
+ user_pwd = clean_env['CLAUDE_MPM_USER_PWD']
201
+ clean_env['CLAUDE_WORKSPACE'] = user_pwd
202
+ # Also change to that directory before launching Claude
203
+ try:
204
+ os.chdir(user_pwd)
205
+ self.logger.info(f"Changed working directory to: {user_pwd}")
206
+ except Exception as e:
207
+ self.logger.warning(f"Could not change to user directory {user_pwd}: {e}")
208
+
197
209
  print("Launching Claude...")
198
210
 
199
211
  if self.project_logger:
@@ -225,7 +237,8 @@ class SimpleClaudeRunner:
225
237
  })
226
238
  # Fallback to subprocess
227
239
  try:
228
- subprocess.run(cmd, stdin=None, stdout=None, stderr=None)
240
+ # Use the same clean_env we prepared earlier
241
+ subprocess.run(cmd, stdin=None, stdout=None, stderr=None, env=clean_env)
229
242
  if self.project_logger:
230
243
  self.project_logger.log_system(
231
244
  "Interactive session completed (subprocess fallback)",
@@ -296,6 +309,24 @@ class SimpleClaudeRunner:
296
309
  cmd.insert(-2, system_prompt)
297
310
 
298
311
  try:
312
+ # Set up environment with correct working directory
313
+ env = os.environ.copy()
314
+
315
+ # Set the correct working directory for Claude Code
316
+ if 'CLAUDE_MPM_USER_PWD' in env:
317
+ user_pwd = env['CLAUDE_MPM_USER_PWD']
318
+ env['CLAUDE_WORKSPACE'] = user_pwd
319
+ # Change to that directory before running Claude
320
+ try:
321
+ original_cwd = os.getcwd()
322
+ os.chdir(user_pwd)
323
+ self.logger.info(f"Changed working directory to: {user_pwd}")
324
+ except Exception as e:
325
+ self.logger.warning(f"Could not change to user directory {user_pwd}: {e}")
326
+ original_cwd = None
327
+ else:
328
+ original_cwd = None
329
+
299
330
  # Run Claude
300
331
  if self.project_logger:
301
332
  self.project_logger.log_system(
@@ -304,7 +335,14 @@ class SimpleClaudeRunner:
304
335
  component="session"
305
336
  )
306
337
 
307
- result = subprocess.run(cmd, capture_output=True, text=True)
338
+ result = subprocess.run(cmd, capture_output=True, text=True, env=env)
339
+
340
+ # Restore original directory if we changed it
341
+ if original_cwd:
342
+ try:
343
+ os.chdir(original_cwd)
344
+ except Exception:
345
+ pass
308
346
  execution_time = time.time() - start_time
309
347
 
310
348
  if result.returncode == 0:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-mpm
3
- Version: 3.1.0
3
+ Version: 3.1.1
4
4
  Summary: Claude Multi-agent Project Manager - Clean orchestration with ticket management
5
5
  Home-page: https://github.com/bobmatnyc/claude-mpm
6
6
  Author: Claude MPM Team
@@ -59,7 +59,7 @@ claude_mpm/core/minimal_framework_loader.py,sha256=liYS4IyuW_aFK7yhRDZwTwT-3q09f
59
59
  claude_mpm/core/mixins.py,sha256=rTEH-7FDpNiLB8oo6mSb0CLarJklv4fDJw1xM-gr5wI,5599
60
60
  claude_mpm/core/service_registry.py,sha256=wKJUO1g4UFA4dUpE3RkIYz1Ek8kIh4XfvU1kFeLCl2Q,10529
61
61
  claude_mpm/core/session_manager.py,sha256=3rO4KGZp8Qd_cUw6OWv4jyxGCUaL_MNPgCCpnwQt12A,6581
62
- claude_mpm/core/simple_runner.py,sha256=DRChSTgPt6g0zQUZe9cEpH9ky2aZyLnlH0bhOI63vfc,24645
62
+ claude_mpm/core/simple_runner.py,sha256=TVyzyzYHmvf7o_jpCKYGuLfuYReLcTc5Fkl1tZ_4tJw,26447
63
63
  claude_mpm/core/tool_access_control.py,sha256=htZbDhC8s7D7BVqfmk0BwRrYJnlnUAk8_NeJKOaeNlg,6632
64
64
  claude_mpm/generators/__init__.py,sha256=l53aBn6kBQSDz3b6bZkMCJBcEmYnV9hHEZq8LKzXgH8,152
65
65
  claude_mpm/generators/agent_profile_generator.py,sha256=2HjOscogSyvrtQj8KwdgNPS6Ym_QvgX1BMeauQZewZA,5751
@@ -171,9 +171,9 @@ claude_mpm/utils/path_operations.py,sha256=6pLMnAWBVzHkgp6JyQHmHbGD-dWn-nX21yV4E
171
171
  claude_mpm/utils/paths.py,sha256=Xv0SZWdZRkRjN9e6clBcA165ya00GNQxt7SwMz51tfA,10153
172
172
  claude_mpm/validation/__init__.py,sha256=bJ19g9lnk7yIjtxzN8XPegp87HTFBzCrGQOpFgRTf3g,155
173
173
  claude_mpm/validation/agent_validator.py,sha256=GCA2b2rKhKDeaNyUqWxTiWIs3sDdWjD9cgOFRp9K6ic,18227
174
- claude_mpm-3.1.0.dist-info/licenses/LICENSE,sha256=cSdDfXjoTVhstrERrqme4zgxAu4GubU22zVEHsiXGxs,1071
175
- claude_mpm-3.1.0.dist-info/METADATA,sha256=jtA8pwlqe3dPFBhH4xQwzsULplyAeqBY8RLsUia0zUg,14139
176
- claude_mpm-3.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
177
- claude_mpm-3.1.0.dist-info/entry_points.txt,sha256=PknO31um7d8bt6GjOiVeYpdJpjND0_C1z-LQfY6UfiU,142
178
- claude_mpm-3.1.0.dist-info/top_level.txt,sha256=1nUg3FEaBySgm8t-s54jK5zoPnu3_eY6EP6IOlekyHA,11
179
- claude_mpm-3.1.0.dist-info/RECORD,,
174
+ claude_mpm-3.1.1.dist-info/licenses/LICENSE,sha256=cSdDfXjoTVhstrERrqme4zgxAu4GubU22zVEHsiXGxs,1071
175
+ claude_mpm-3.1.1.dist-info/METADATA,sha256=oQnytf26RtggLVb5S5WJGz41zJshlxeJmwKneQHLwDw,14139
176
+ claude_mpm-3.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
177
+ claude_mpm-3.1.1.dist-info/entry_points.txt,sha256=PknO31um7d8bt6GjOiVeYpdJpjND0_C1z-LQfY6UfiU,142
178
+ claude_mpm-3.1.1.dist-info/top_level.txt,sha256=1nUg3FEaBySgm8t-s54jK5zoPnu3_eY6EP6IOlekyHA,11
179
+ claude_mpm-3.1.1.dist-info/RECORD,,