claude-mpm 4.0.14__py3-none-any.whl → 4.0.15__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.
- claude_mpm/core/framework_loader.py +71 -2
- claude_mpm/services/agents/deployment/pipeline/steps/base_step.py +1 -0
- claude_mpm/services/agents/deployment/processors/agent_processor.py +23 -16
- claude_mpm/services/agents/deployment/strategies/project_strategy.py +1 -0
- claude_mpm/services/agents/deployment/strategies/system_strategy.py +1 -0
- claude_mpm/services/agents/deployment/strategies/user_strategy.py +1 -0
- {claude_mpm-4.0.14.dist-info → claude_mpm-4.0.15.dist-info}/METADATA +1 -1
- {claude_mpm-4.0.14.dist-info → claude_mpm-4.0.15.dist-info}/RECORD +12 -12
- {claude_mpm-4.0.14.dist-info → claude_mpm-4.0.15.dist-info}/WHEEL +0 -0
- {claude_mpm-4.0.14.dist-info → claude_mpm-4.0.15.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.0.14.dist-info → claude_mpm-4.0.15.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.0.14.dist-info → claude_mpm-4.0.15.dist-info}/top_level.txt +0 -0
|
@@ -566,7 +566,16 @@ class FrameworkLoader:
|
|
|
566
566
|
"""Load framework content from packaged installation using importlib.resources."""
|
|
567
567
|
if not files:
|
|
568
568
|
self.logger.warning("importlib.resources not available, cannot load packaged framework")
|
|
569
|
-
|
|
569
|
+
self.logger.debug(f"files variable is: {files}")
|
|
570
|
+
# Try alternative import methods
|
|
571
|
+
try:
|
|
572
|
+
from importlib import resources
|
|
573
|
+
self.logger.info("Using importlib.resources as fallback")
|
|
574
|
+
self._load_packaged_framework_content_fallback(content, resources)
|
|
575
|
+
return
|
|
576
|
+
except ImportError:
|
|
577
|
+
self.logger.error("No importlib.resources available, using minimal framework")
|
|
578
|
+
return
|
|
570
579
|
|
|
571
580
|
try:
|
|
572
581
|
# Load INSTRUCTIONS.md
|
|
@@ -601,7 +610,67 @@ class FrameworkLoader:
|
|
|
601
610
|
|
|
602
611
|
except Exception as e:
|
|
603
612
|
self.logger.error(f"Failed to load packaged framework content: {e}")
|
|
604
|
-
|
|
613
|
+
|
|
614
|
+
def _load_packaged_framework_content_fallback(self, content: Dict[str, Any], resources) -> None:
|
|
615
|
+
"""Load framework content using importlib.resources fallback."""
|
|
616
|
+
try:
|
|
617
|
+
# Load INSTRUCTIONS.md
|
|
618
|
+
instructions_content = self._load_packaged_file_fallback("INSTRUCTIONS.md", resources)
|
|
619
|
+
if instructions_content:
|
|
620
|
+
content["framework_instructions"] = instructions_content
|
|
621
|
+
content["loaded"] = True
|
|
622
|
+
# Extract and store version/timestamp metadata
|
|
623
|
+
self._extract_metadata_from_content(instructions_content, "INSTRUCTIONS.md")
|
|
624
|
+
if self.framework_version:
|
|
625
|
+
content["instructions_version"] = self.framework_version
|
|
626
|
+
content["version"] = self.framework_version
|
|
627
|
+
if self.framework_last_modified:
|
|
628
|
+
content["instructions_last_modified"] = self.framework_last_modified
|
|
629
|
+
|
|
630
|
+
# Load BASE_PM.md
|
|
631
|
+
base_pm_content = self._load_packaged_file_fallback("BASE_PM.md", resources)
|
|
632
|
+
if base_pm_content:
|
|
633
|
+
content["base_pm_instructions"] = base_pm_content
|
|
634
|
+
|
|
635
|
+
# Load WORKFLOW.md
|
|
636
|
+
workflow_content = self._load_packaged_file_fallback("WORKFLOW.md", resources)
|
|
637
|
+
if workflow_content:
|
|
638
|
+
content["workflow_instructions"] = workflow_content
|
|
639
|
+
content["project_workflow"] = "system"
|
|
640
|
+
|
|
641
|
+
# Load MEMORY.md
|
|
642
|
+
memory_content = self._load_packaged_file_fallback("MEMORY.md", resources)
|
|
643
|
+
if memory_content:
|
|
644
|
+
content["memory_instructions"] = memory_content
|
|
645
|
+
content["project_memory"] = "system"
|
|
646
|
+
|
|
647
|
+
except Exception as e:
|
|
648
|
+
self.logger.error(f"Failed to load packaged framework content with fallback: {e}")
|
|
649
|
+
|
|
650
|
+
def _load_packaged_file_fallback(self, filename: str, resources) -> Optional[str]:
|
|
651
|
+
"""Load a file from the packaged installation using importlib.resources fallback."""
|
|
652
|
+
try:
|
|
653
|
+
# Try different resource loading methods
|
|
654
|
+
try:
|
|
655
|
+
# Method 1: resources.read_text (Python 3.9+)
|
|
656
|
+
content = resources.read_text('claude_mpm.agents', filename)
|
|
657
|
+
self.logger.info(f"Loaded {filename} from package using read_text")
|
|
658
|
+
return content
|
|
659
|
+
except AttributeError:
|
|
660
|
+
# Method 2: resources.files (Python 3.9+)
|
|
661
|
+
agents_files = resources.files('claude_mpm.agents')
|
|
662
|
+
file_path = agents_files / filename
|
|
663
|
+
if file_path.is_file():
|
|
664
|
+
content = file_path.read_text()
|
|
665
|
+
self.logger.info(f"Loaded {filename} from package using files")
|
|
666
|
+
return content
|
|
667
|
+
else:
|
|
668
|
+
self.logger.warning(f"File {filename} not found in package")
|
|
669
|
+
return None
|
|
670
|
+
except Exception as e:
|
|
671
|
+
self.logger.error(f"Failed to load {filename} from package with fallback: {e}")
|
|
672
|
+
return None
|
|
673
|
+
|
|
605
674
|
def _load_packaged_file(self, filename: str) -> Optional[str]:
|
|
606
675
|
"""Load a file from the packaged installation."""
|
|
607
676
|
try:
|
|
@@ -145,22 +145,29 @@ class AgentProcessor:
|
|
|
145
145
|
else:
|
|
146
146
|
needs_update = True
|
|
147
147
|
reason = "New agent in project mode"
|
|
148
|
-
elif not needs_update
|
|
149
|
-
#
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
148
|
+
elif not needs_update:
|
|
149
|
+
# Check if target file exists
|
|
150
|
+
if not context.target_file.exists():
|
|
151
|
+
# File doesn't exist, needs to be deployed
|
|
152
|
+
needs_update = True
|
|
153
|
+
reason = "New agent deployment"
|
|
154
|
+
self.logger.debug(f"Agent {context.agent_name} doesn't exist, will deploy")
|
|
155
|
+
else:
|
|
156
|
+
# File exists, check version compatibility
|
|
157
|
+
needs_update, reason = self.version_manager.check_agent_needs_update(
|
|
158
|
+
context.target_file, context.template_file, context.base_agent_version
|
|
159
|
+
)
|
|
160
|
+
if needs_update:
|
|
161
|
+
# Check if this is a migration from old format
|
|
162
|
+
if "migration needed" in reason:
|
|
163
|
+
is_migration = True
|
|
164
|
+
self.logger.info(
|
|
165
|
+
f"Migration needed for agent {context.agent_name}: {reason}"
|
|
166
|
+
)
|
|
167
|
+
else:
|
|
168
|
+
self.logger.info(
|
|
169
|
+
f"Agent {context.agent_name} needs update: {reason}"
|
|
170
|
+
)
|
|
164
171
|
|
|
165
172
|
return needs_update, is_migration, reason
|
|
166
173
|
|
|
@@ -103,7 +103,7 @@ claude_mpm/core/constants.py,sha256=6e_IMQMOeW3oMgUsLFGvbqzM8Sf4fDYMpn3rGpfWVhM,
|
|
|
103
103
|
claude_mpm/core/container.py,sha256=SERH3YOH9BXtHbv-kWu0bViNpdcGccDXR0NXFXbw1Pc,32155
|
|
104
104
|
claude_mpm/core/exceptions.py,sha256=lNVLqVuRjygHe89NJg1rPAyevVdzpLOKgHFMQtGSxdA,19654
|
|
105
105
|
claude_mpm/core/factories.py,sha256=A7WcjYWjhkc-tzUnef0YaW0Jj8oxMP-7_g2jIj1XYa8,7265
|
|
106
|
-
claude_mpm/core/framework_loader.py,sha256=
|
|
106
|
+
claude_mpm/core/framework_loader.py,sha256=kXHTB8GdQGY0BsWPCay3N7lD6vUUFpem6sNnsqAi4bs,52625
|
|
107
107
|
claude_mpm/core/hook_manager.py,sha256=N-54QwNsyrUZSrH533HAo6hlJKPFbgMeDirg92H8en8,11014
|
|
108
108
|
claude_mpm/core/hook_performance_config.py,sha256=Cqf-89mjiLlFJ-v4PhxfzsaOVovYYQa5pa-RMm42Ki8,5748
|
|
109
109
|
claude_mpm/core/injectable_service.py,sha256=HXuviYX-h0sNxOFzgZiYjf-gLDUnQIeG-0-KuWdfCzk,7397
|
|
@@ -263,23 +263,23 @@ claude_mpm/services/agents/deployment/pipeline/pipeline_context.py,sha256=HDuKKX
|
|
|
263
263
|
claude_mpm/services/agents/deployment/pipeline/pipeline_executor.py,sha256=N8dhwvNZk875TOseekcqJ8FWjSVDPNDEpbmMyxNU02o,6040
|
|
264
264
|
claude_mpm/services/agents/deployment/pipeline/steps/__init__.py,sha256=5ERyPV2NI9Re2PkibM2idcHibwbuOTjW2I4QQ1yW5Qc,562
|
|
265
265
|
claude_mpm/services/agents/deployment/pipeline/steps/agent_processing_step.py,sha256=P2BMyc3Jv-dO-EoDjDzqBZSKP91cUNwnKJwaxerGuV4,7128
|
|
266
|
-
claude_mpm/services/agents/deployment/pipeline/steps/base_step.py,sha256=
|
|
266
|
+
claude_mpm/services/agents/deployment/pipeline/steps/base_step.py,sha256=N3A2Qfn8tSksdgI_O5pVUX2FKU4RfnZAv8zMHcjrGO4,3280
|
|
267
267
|
claude_mpm/services/agents/deployment/pipeline/steps/configuration_step.py,sha256=Lz-yASIJHlrWCw952jYU9iz7-Hb659PLiKLBZHEgllE,2568
|
|
268
268
|
claude_mpm/services/agents/deployment/pipeline/steps/target_directory_step.py,sha256=wY5FAsq9Dk_3vTgIMQ8NNfI0LME858hGi8cWnQ1uTOs,3199
|
|
269
269
|
claude_mpm/services/agents/deployment/pipeline/steps/validation_step.py,sha256=fMYtIPQDW0qwEy6D1v_LuOwd1ozqjVbpnq34M9zLkko,3330
|
|
270
270
|
claude_mpm/services/agents/deployment/processors/__init__.py,sha256=UWQPqCzPHiwBw12xo-xGeXmVVRE088xqU0_hwXi7UHo,448
|
|
271
271
|
claude_mpm/services/agents/deployment/processors/agent_deployment_context.py,sha256=9HZ30cGBgeUfhUDJ0bLolGK7mXwHnT70EfnXPPQj4OM,2893
|
|
272
272
|
claude_mpm/services/agents/deployment/processors/agent_deployment_result.py,sha256=3wcDlZcI6lbh18KM2lMPeQ1wcKRWbbTRV3Z6GuHD4ec,6476
|
|
273
|
-
claude_mpm/services/agents/deployment/processors/agent_processor.py,sha256=
|
|
273
|
+
claude_mpm/services/agents/deployment/processors/agent_processor.py,sha256=fHcLDSP_PdHG6XWtr6Scy2o9AkBbZxxLDtWAjEvTDlo,9688
|
|
274
274
|
claude_mpm/services/agents/deployment/results/__init__.py,sha256=lwNNSe33wnnfrSs0rbcOi7yXm9wLmuYtGVgvFyL_op8,351
|
|
275
275
|
claude_mpm/services/agents/deployment/results/deployment_metrics.py,sha256=Ig6pKuoxDBBUd4r-2ZJ63cgrREOSVpQky4S3EFfotQY,6492
|
|
276
276
|
claude_mpm/services/agents/deployment/results/deployment_result_builder.py,sha256=B6C_Gig8IJwhpaFvEkZ-YiWRaMH3ZfgmJXlvpLmxhIs,7633
|
|
277
277
|
claude_mpm/services/agents/deployment/strategies/__init__.py,sha256=NGBh41PXhJ2kksaDemLGT1mB5v_kO7uj6HiuQ_c60BM,986
|
|
278
278
|
claude_mpm/services/agents/deployment/strategies/base_strategy.py,sha256=cqhYAEG3QhrrrbKGYx04_oLOQdZygurDhgLfPeBX9Oo,3452
|
|
279
|
-
claude_mpm/services/agents/deployment/strategies/project_strategy.py,sha256=
|
|
279
|
+
claude_mpm/services/agents/deployment/strategies/project_strategy.py,sha256=L8pLCmO4jlYgJ2Avq-f44VSHUp8x_orDpeD1Te57z44,4813
|
|
280
280
|
claude_mpm/services/agents/deployment/strategies/strategy_selector.py,sha256=lWgDrsUOtOCGf7l3CgVLaAoUQymCm4pog9pqXaFE1mU,4065
|
|
281
|
-
claude_mpm/services/agents/deployment/strategies/system_strategy.py,sha256
|
|
282
|
-
claude_mpm/services/agents/deployment/strategies/user_strategy.py,sha256=
|
|
281
|
+
claude_mpm/services/agents/deployment/strategies/system_strategy.py,sha256=-lgT98wVd6PIjyOGf5jNMJrXGxuThTppA_fbljYpHbc,3722
|
|
282
|
+
claude_mpm/services/agents/deployment/strategies/user_strategy.py,sha256=OrfztRdpKjGeS9t-nT0Ik78crefp68ATD37Vz-rlCX8,4343
|
|
283
283
|
claude_mpm/services/agents/deployment/validation/__init__.py,sha256=Vly1JMH0wwq75BSALLLfkzN4iGQBEklcId0c-qmUYRw,562
|
|
284
284
|
claude_mpm/services/agents/deployment/validation/agent_validator.py,sha256=qzcKSRKhXVyZeJ8gbAraFGcT6dnRffbB0pCAa4pvG8w,11015
|
|
285
285
|
claude_mpm/services/agents/deployment/validation/deployment_validator.py,sha256=Fn0LALAcbEfPmRiNj89ZfNjTUILeCfRASqqI4KmT_0o,8395
|
|
@@ -411,9 +411,9 @@ claude_mpm/utils/subprocess_utils.py,sha256=e74VlIPozCljZss_0SwLO3J1ZuIKRT9FrrFi
|
|
|
411
411
|
claude_mpm/validation/__init__.py,sha256=YZhwE3mhit-lslvRLuwfX82xJ_k4haZeKmh4IWaVwtk,156
|
|
412
412
|
claude_mpm/validation/agent_validator.py,sha256=szbK9d29v_T6xE_KvW845WLKXbS_yYpXQscrSrSeldI,20937
|
|
413
413
|
claude_mpm/validation/frontmatter_validator.py,sha256=Q_aTyjigfKZQG7eSwLtwMfd0h_eyS9FQAm59ZFf5VYA,7036
|
|
414
|
-
claude_mpm-4.0.
|
|
415
|
-
claude_mpm-4.0.
|
|
416
|
-
claude_mpm-4.0.
|
|
417
|
-
claude_mpm-4.0.
|
|
418
|
-
claude_mpm-4.0.
|
|
419
|
-
claude_mpm-4.0.
|
|
414
|
+
claude_mpm-4.0.15.dist-info/licenses/LICENSE,sha256=lpaivOlPuBZW1ds05uQLJJswy8Rp_HMNieJEbFlqvLk,1072
|
|
415
|
+
claude_mpm-4.0.15.dist-info/METADATA,sha256=jaHndVS-uT8RMb5yHZE6rg7qw0D5hQjz1q4A_JvwExI,11883
|
|
416
|
+
claude_mpm-4.0.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
417
|
+
claude_mpm-4.0.15.dist-info/entry_points.txt,sha256=uafLVeHm4AXrzvdR77fXO3a2MmvvfGtmVU2iY8uIPt8,403
|
|
418
|
+
claude_mpm-4.0.15.dist-info/top_level.txt,sha256=1nUg3FEaBySgm8t-s54jK5zoPnu3_eY6EP6IOlekyHA,11
|
|
419
|
+
claude_mpm-4.0.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|