claude-mpm 4.3.22__py3-none-any.whl → 4.4.3__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/VERSION +1 -1
- claude_mpm/agents/WORKFLOW.md +2 -14
- claude_mpm/cli/commands/configure.py +2 -29
- claude_mpm/cli/commands/doctor.py +2 -2
- claude_mpm/cli/commands/mpm_init.py +3 -3
- claude_mpm/cli/parsers/configure_parser.py +4 -15
- claude_mpm/core/framework/__init__.py +38 -0
- claude_mpm/core/framework/formatters/__init__.py +11 -0
- claude_mpm/core/framework/formatters/capability_generator.py +356 -0
- claude_mpm/core/framework/formatters/content_formatter.py +283 -0
- claude_mpm/core/framework/formatters/context_generator.py +180 -0
- claude_mpm/core/framework/loaders/__init__.py +13 -0
- claude_mpm/core/framework/loaders/agent_loader.py +202 -0
- claude_mpm/core/framework/loaders/file_loader.py +213 -0
- claude_mpm/core/framework/loaders/instruction_loader.py +151 -0
- claude_mpm/core/framework/loaders/packaged_loader.py +208 -0
- claude_mpm/core/framework/processors/__init__.py +11 -0
- claude_mpm/core/framework/processors/memory_processor.py +222 -0
- claude_mpm/core/framework/processors/metadata_processor.py +146 -0
- claude_mpm/core/framework/processors/template_processor.py +238 -0
- claude_mpm/core/framework_loader.py +277 -1798
- claude_mpm/hooks/__init__.py +9 -1
- claude_mpm/hooks/kuzu_memory_hook.py +352 -0
- claude_mpm/hooks/memory_integration_hook.py +1 -1
- claude_mpm/services/agents/memory/content_manager.py +5 -2
- claude_mpm/services/agents/memory/memory_file_service.py +1 -0
- claude_mpm/services/agents/memory/memory_limits_service.py +1 -0
- claude_mpm/services/core/path_resolver.py +1 -0
- claude_mpm/services/diagnostics/diagnostic_runner.py +1 -0
- claude_mpm/services/mcp_config_manager.py +67 -4
- claude_mpm/services/mcp_gateway/core/process_pool.py +281 -0
- claude_mpm/services/mcp_gateway/core/startup_verification.py +2 -2
- claude_mpm/services/mcp_gateway/main.py +3 -13
- claude_mpm/services/mcp_gateway/server/stdio_server.py +4 -10
- claude_mpm/services/mcp_gateway/tools/__init__.py +13 -2
- claude_mpm/services/mcp_gateway/tools/external_mcp_services.py +36 -6
- claude_mpm/services/mcp_gateway/tools/kuzu_memory_service.py +542 -0
- claude_mpm/services/shared/__init__.py +2 -1
- claude_mpm/services/shared/service_factory.py +8 -5
- claude_mpm/services/unified/__init__.py +65 -0
- claude_mpm/services/unified/analyzer_strategies/__init__.py +44 -0
- claude_mpm/services/unified/analyzer_strategies/code_analyzer.py +473 -0
- claude_mpm/services/unified/analyzer_strategies/dependency_analyzer.py +643 -0
- claude_mpm/services/unified/analyzer_strategies/performance_analyzer.py +804 -0
- claude_mpm/services/unified/analyzer_strategies/security_analyzer.py +661 -0
- claude_mpm/services/unified/analyzer_strategies/structure_analyzer.py +696 -0
- claude_mpm/services/unified/config_strategies/__init__.py +190 -0
- claude_mpm/services/unified/config_strategies/config_schema.py +689 -0
- claude_mpm/services/unified/config_strategies/context_strategy.py +748 -0
- claude_mpm/services/unified/config_strategies/error_handling_strategy.py +999 -0
- claude_mpm/services/unified/config_strategies/file_loader_strategy.py +871 -0
- claude_mpm/services/unified/config_strategies/unified_config_service.py +802 -0
- claude_mpm/services/unified/config_strategies/validation_strategy.py +1105 -0
- claude_mpm/services/unified/deployment_strategies/__init__.py +97 -0
- claude_mpm/services/unified/deployment_strategies/base.py +557 -0
- claude_mpm/services/unified/deployment_strategies/cloud_strategies.py +486 -0
- claude_mpm/services/unified/deployment_strategies/local.py +594 -0
- claude_mpm/services/unified/deployment_strategies/utils.py +672 -0
- claude_mpm/services/unified/deployment_strategies/vercel.py +471 -0
- claude_mpm/services/unified/interfaces.py +499 -0
- claude_mpm/services/unified/migration.py +532 -0
- claude_mpm/services/unified/strategies.py +551 -0
- claude_mpm/services/unified/unified_analyzer.py +534 -0
- claude_mpm/services/unified/unified_config.py +688 -0
- claude_mpm/services/unified/unified_deployment.py +470 -0
- {claude_mpm-4.3.22.dist-info → claude_mpm-4.4.3.dist-info}/METADATA +15 -15
- {claude_mpm-4.3.22.dist-info → claude_mpm-4.4.3.dist-info}/RECORD +71 -32
- claude_mpm/cli/commands/configure_tui.py +0 -1927
- claude_mpm/services/mcp_gateway/tools/ticket_tools.py +0 -645
- claude_mpm/services/mcp_gateway/tools/unified_ticket_tool.py +0 -602
- {claude_mpm-4.3.22.dist-info → claude_mpm-4.4.3.dist-info}/WHEEL +0 -0
- {claude_mpm-4.3.22.dist-info → claude_mpm-4.4.3.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.3.22.dist-info → claude_mpm-4.4.3.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.3.22.dist-info → claude_mpm-4.4.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,190 @@
|
|
1
|
+
"""
|
2
|
+
Unified Configuration Strategies - Phase 3 Consolidation
|
3
|
+
Reduces 15,000+ lines of configuration code by 65-75%
|
4
|
+
|
5
|
+
This package consolidates:
|
6
|
+
- 15+ configuration services → 1 unified service
|
7
|
+
- 215 file loading instances → 5 strategic loaders
|
8
|
+
- 236 validation functions → 15 composable validators
|
9
|
+
- 99 error handling patterns → Unified error strategy
|
10
|
+
|
11
|
+
Target: 10,000-11,000 line reduction with 20-30% performance improvement
|
12
|
+
"""
|
13
|
+
|
14
|
+
from .unified_config_service import (
|
15
|
+
UnifiedConfigService,
|
16
|
+
ConfigFormat,
|
17
|
+
ConfigContext,
|
18
|
+
ConfigMetadata,
|
19
|
+
IConfigStrategy
|
20
|
+
)
|
21
|
+
|
22
|
+
from .file_loader_strategy import (
|
23
|
+
FileLoaderStrategy,
|
24
|
+
LoaderType,
|
25
|
+
FileLoadContext,
|
26
|
+
StructuredFileLoader,
|
27
|
+
EnvironmentFileLoader,
|
28
|
+
ProgrammaticFileLoader,
|
29
|
+
LegacyFileLoader,
|
30
|
+
CompositeFileLoader
|
31
|
+
)
|
32
|
+
|
33
|
+
from .validation_strategy import (
|
34
|
+
ValidationStrategy,
|
35
|
+
ValidationRule,
|
36
|
+
ValidationResult,
|
37
|
+
ValidationType,
|
38
|
+
TypeValidator,
|
39
|
+
RequiredValidator,
|
40
|
+
RangeValidator,
|
41
|
+
LengthValidator,
|
42
|
+
PatternValidator,
|
43
|
+
EnumValidator,
|
44
|
+
FormatValidator,
|
45
|
+
DependencyValidator,
|
46
|
+
UniqueValidator,
|
47
|
+
CustomValidator,
|
48
|
+
ConditionalValidator,
|
49
|
+
RecursiveValidator,
|
50
|
+
CrossFieldValidator,
|
51
|
+
CompositeValidator,
|
52
|
+
SchemaValidator
|
53
|
+
)
|
54
|
+
|
55
|
+
from .error_handling_strategy import (
|
56
|
+
ErrorHandlingStrategy,
|
57
|
+
ErrorContext,
|
58
|
+
ErrorHandlingResult,
|
59
|
+
ErrorCategory,
|
60
|
+
ErrorSeverity,
|
61
|
+
FileIOErrorHandler,
|
62
|
+
ParsingErrorHandler,
|
63
|
+
ValidationErrorHandler,
|
64
|
+
NetworkErrorHandler,
|
65
|
+
TypeConversionErrorHandler,
|
66
|
+
CompositeErrorHandler
|
67
|
+
)
|
68
|
+
|
69
|
+
from .context_strategy import (
|
70
|
+
ContextStrategy,
|
71
|
+
ContextScope,
|
72
|
+
ContextLifecycle,
|
73
|
+
HierarchicalContextManager,
|
74
|
+
ScopedConfigManager,
|
75
|
+
IsolatedContextManager,
|
76
|
+
ThreadLocalContextManager,
|
77
|
+
CachingContextManager
|
78
|
+
)
|
79
|
+
|
80
|
+
from .config_schema import (
|
81
|
+
ConfigSchema,
|
82
|
+
SchemaProperty,
|
83
|
+
SchemaBuilder,
|
84
|
+
SchemaValidator,
|
85
|
+
SchemaRegistry,
|
86
|
+
ConfigMigration,
|
87
|
+
TypedConfig,
|
88
|
+
SchemaType,
|
89
|
+
SchemaFormat,
|
90
|
+
create_database_schema,
|
91
|
+
create_api_schema,
|
92
|
+
create_logging_schema
|
93
|
+
)
|
94
|
+
|
95
|
+
# Create singleton instance for global use
|
96
|
+
unified_config = UnifiedConfigService()
|
97
|
+
|
98
|
+
# Backward compatibility aliases
|
99
|
+
ConfigService = UnifiedConfigService
|
100
|
+
ConfigManager = UnifiedConfigService
|
101
|
+
ConfigLoader = UnifiedConfigService
|
102
|
+
|
103
|
+
# Export all public APIs
|
104
|
+
__all__ = [
|
105
|
+
# Main service
|
106
|
+
'UnifiedConfigService',
|
107
|
+
'unified_config',
|
108
|
+
|
109
|
+
# Strategies
|
110
|
+
'FileLoaderStrategy',
|
111
|
+
'ValidationStrategy',
|
112
|
+
'ErrorHandlingStrategy',
|
113
|
+
'ContextStrategy',
|
114
|
+
|
115
|
+
# Core types
|
116
|
+
'ConfigFormat',
|
117
|
+
'ConfigContext',
|
118
|
+
'ConfigMetadata',
|
119
|
+
'IConfigStrategy',
|
120
|
+
|
121
|
+
# File loading
|
122
|
+
'LoaderType',
|
123
|
+
'FileLoadContext',
|
124
|
+
'StructuredFileLoader',
|
125
|
+
'EnvironmentFileLoader',
|
126
|
+
'ProgrammaticFileLoader',
|
127
|
+
'LegacyFileLoader',
|
128
|
+
'CompositeFileLoader',
|
129
|
+
|
130
|
+
# Validation
|
131
|
+
'ValidationRule',
|
132
|
+
'ValidationResult',
|
133
|
+
'ValidationType',
|
134
|
+
|
135
|
+
# Error handling
|
136
|
+
'ErrorContext',
|
137
|
+
'ErrorHandlingResult',
|
138
|
+
'ErrorCategory',
|
139
|
+
'ErrorSeverity',
|
140
|
+
|
141
|
+
# Context management
|
142
|
+
'ContextScope',
|
143
|
+
'ContextLifecycle',
|
144
|
+
'HierarchicalContextManager',
|
145
|
+
'ScopedConfigManager',
|
146
|
+
|
147
|
+
# Schema
|
148
|
+
'ConfigSchema',
|
149
|
+
'SchemaProperty',
|
150
|
+
'SchemaBuilder',
|
151
|
+
'SchemaValidator',
|
152
|
+
'SchemaRegistry',
|
153
|
+
'ConfigMigration',
|
154
|
+
'TypedConfig',
|
155
|
+
'SchemaType',
|
156
|
+
'SchemaFormat',
|
157
|
+
|
158
|
+
# Backward compatibility
|
159
|
+
'ConfigService',
|
160
|
+
'ConfigManager',
|
161
|
+
'ConfigLoader',
|
162
|
+
]
|
163
|
+
|
164
|
+
# Module initialization
|
165
|
+
def initialize():
|
166
|
+
"""Initialize the unified configuration system"""
|
167
|
+
# Register default strategies
|
168
|
+
unified_config.register_strategy('file', FileLoaderStrategy())
|
169
|
+
unified_config.register_strategy('validation', ValidationStrategy())
|
170
|
+
unified_config.register_strategy('error', ErrorHandlingStrategy())
|
171
|
+
unified_config.register_strategy('context', ContextStrategy())
|
172
|
+
|
173
|
+
# Set up default error handlers
|
174
|
+
error_strategy = ErrorHandlingStrategy()
|
175
|
+
|
176
|
+
# Register recovery strategies
|
177
|
+
error_strategy.register_recovery_strategy(
|
178
|
+
'default_fallback',
|
179
|
+
lambda ctx: ctx.metadata.get('default_config', {})
|
180
|
+
)
|
181
|
+
|
182
|
+
error_strategy.register_recovery_strategy(
|
183
|
+
'empty_fallback',
|
184
|
+
lambda ctx: {}
|
185
|
+
)
|
186
|
+
|
187
|
+
return unified_config
|
188
|
+
|
189
|
+
# Auto-initialize on import
|
190
|
+
_unified_instance = initialize()
|