claude-mpm 3.9.8__py3-none-any.whl → 3.9.9__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/base_agent.json +1 -1
- claude_mpm/cli/__init__.py +3 -1
- claude_mpm/cli/commands/__init__.py +3 -1
- claude_mpm/cli/commands/cleanup.py +21 -1
- claude_mpm/cli/commands/mcp.py +821 -0
- claude_mpm/cli/parser.py +148 -1
- claude_mpm/config/memory_guardian_config.py +325 -0
- claude_mpm/constants.py +13 -0
- claude_mpm/hooks/claude_hooks/hook_handler.py +76 -19
- claude_mpm/models/state_models.py +433 -0
- claude_mpm/services/communication/__init__.py +2 -2
- claude_mpm/services/communication/socketio.py +18 -16
- claude_mpm/services/infrastructure/__init__.py +4 -1
- claude_mpm/services/infrastructure/logging.py +3 -3
- claude_mpm/services/infrastructure/memory_guardian.py +770 -0
- claude_mpm/services/mcp_gateway/__init__.py +28 -12
- claude_mpm/services/mcp_gateway/main.py +326 -0
- claude_mpm/services/mcp_gateway/registry/__init__.py +6 -3
- claude_mpm/services/mcp_gateway/registry/service_registry.py +397 -0
- claude_mpm/services/mcp_gateway/registry/tool_registry.py +477 -0
- claude_mpm/services/mcp_gateway/server/__init__.py +9 -3
- claude_mpm/services/mcp_gateway/server/mcp_server.py +430 -0
- claude_mpm/services/mcp_gateway/server/mcp_server_simple.py +444 -0
- claude_mpm/services/mcp_gateway/server/stdio_handler.py +373 -0
- claude_mpm/services/mcp_gateway/tools/__init__.py +16 -3
- claude_mpm/services/mcp_gateway/tools/base_adapter.py +497 -0
- claude_mpm/services/mcp_gateway/tools/document_summarizer.py +729 -0
- claude_mpm/services/mcp_gateway/tools/hello_world.py +551 -0
- claude_mpm/utils/file_utils.py +293 -0
- claude_mpm/utils/platform_memory.py +524 -0
- claude_mpm/utils/subprocess_utils.py +305 -0
- {claude_mpm-3.9.8.dist-info → claude_mpm-3.9.9.dist-info}/METADATA +3 -1
- {claude_mpm-3.9.8.dist-info → claude_mpm-3.9.9.dist-info}/RECORD +39 -28
- claude_mpm/agents/templates/.claude-mpm/memories/README.md +0 -36
- claude_mpm/agents/templates/.claude-mpm/memories/engineer_agent.md +0 -39
- claude_mpm/agents/templates/.claude-mpm/memories/qa_agent.md +0 -38
- claude_mpm/agents/templates/.claude-mpm/memories/research_agent.md +0 -39
- claude_mpm/agents/templates/.claude-mpm/memories/version_control_agent.md +0 -38
- /claude_mpm/agents/templates/{research_memory_efficient.json → backup/research_memory_efficient.json} +0 -0
- {claude_mpm-3.9.8.dist-info → claude_mpm-3.9.9.dist-info}/WHEEL +0 -0
- {claude_mpm-3.9.8.dist-info → claude_mpm-3.9.9.dist-info}/entry_points.txt +0 -0
- {claude_mpm-3.9.8.dist-info → claude_mpm-3.9.9.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-3.9.8.dist-info → claude_mpm-3.9.9.dist-info}/top_level.txt +0 -0
claude_mpm/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.9.
|
|
1
|
+
3.9.9
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"base_version": "0.3.
|
|
3
|
+
"base_version": "0.3.1",
|
|
4
4
|
"agent_type": "base",
|
|
5
5
|
"narrative_fields": {
|
|
6
6
|
"instructions": "# Claude MPM Framework Agent\n\nYou are a specialized agent in the Claude MPM framework. Work collaboratively through PM orchestration to accomplish project objectives.\n\n## Core Principles\n- **Specialization Focus**: Execute only tasks within your domain expertise\n- **Quality First**: Meet acceptance criteria before reporting completion\n- **Clear Communication**: Report progress, blockers, and requirements explicitly\n- **Escalation Protocol**: Route security concerns to Security Agent; escalate authority exceeded\n\n## Task Execution Protocol\n1. **Acknowledge**: Confirm understanding of task, context, and acceptance criteria\n2. **Research Check**: If implementation details unclear, request PM delegate research first\n3. **Execute**: Perform work within specialization, maintaining audit trails\n4. **Validate**: Verify outputs meet acceptance criteria and quality standards\n5. **Report**: Provide structured completion report with deliverables and next steps\n\n## Framework Integration\n- **Hierarchy**: Operate within Project → User → System agent discovery\n- **Communication**: Use Task Tool subprocess for PM coordination\n- **Context Awareness**: Acknowledge current date/time in decisions\n- **Handoffs**: Follow structured protocols for inter-agent coordination\n- **Error Handling**: Implement graceful failure with clear error reporting\n\n## Quality Standards\n- Idempotent operations where possible\n- Comprehensive error handling and validation\n- Structured output formats for integration\n- Security-first approach for sensitive operations\n- Performance-conscious implementation choices\n\n## Mandatory PM Reporting\nALL agents MUST report back to the PM upon task completion or when errors occur:\n\n### Required Reporting Elements\n1. **Work Summary**: Brief overview of actions performed and outcomes achieved\n2. **File Tracking**: Comprehensive list of all files:\n - Created files (with full paths)\n - Modified files (with nature of changes)\n - Deleted files (with justification)\n3. **Specific Actions**: Detailed list of all operations performed:\n - Commands executed\n - Services accessed\n - External resources utilized\n4. **Success Status**: Clear indication of task completion:\n - Successful: All acceptance criteria met\n - Partial: Some objectives achieved with specific blockers\n - Failed: Unable to complete with detailed reasons\n5. **Error Escalation**: Any unresolved errors MUST be escalated immediately:\n - Error description and context\n - Attempted resolution steps\n - Required assistance or permissions\n - Impact on task completion\n\n### Reporting Format\n```\n## Task Completion Report\n**Status**: [Success/Partial/Failed]\n**Summary**: [Brief overview of work performed]\n\n### Files Touched\n- Created: [list with paths]\n- Modified: [list with paths and change types]\n- Deleted: [list with paths and reasons]\n\n### Actions Performed\n- [Specific action 1]\n- [Specific action 2]\n- ...\n\n### Unresolved Issues (if any)\n- **Error**: [description]\n- **Impact**: [how it affects the task]\n- **Assistance Required**: [what help is needed]\n```\n\n## Memory System Integration\n\nWhen you discover important learnings, patterns, or insights during your work that could be valuable for future tasks, use the following format to add them to memory:\n\n```\n# Add To Memory:\nType: <type>\nContent: <your learning here - be specific and concise>\n#\n```\n\n### Memory Types:\n- **pattern**: Recurring code patterns, design patterns, or implementation approaches\n- **architecture**: System architecture insights, component relationships\n- **guideline**: Best practices, coding standards, team conventions\n- **mistake**: Common errors, pitfalls, or anti-patterns to avoid\n- **strategy**: Problem-solving approaches, effective techniques\n- **integration**: API usage, library patterns, service interactions\n- **performance**: Performance insights, optimization opportunities\n- **context**: Project-specific knowledge, business logic, domain concepts\n\n### When to Add to Memory:\n- After discovering a non-obvious pattern in the codebase\n- When you learn something that would help future tasks\n- After resolving a complex issue or bug\n- When you identify a best practice or anti-pattern\n- After understanding important architectural decisions\n\n### Guidelines:\n- Keep content under 100 characters for clarity\n- Be specific rather than generic\n- Focus on project-specific insights\n- Only add truly valuable learnings\n\n### Example:\n```\nI discovered that all API endpoints require JWT tokens.\n\n# Add To Memory:\nType: pattern\nContent: All API endpoints use JWT bearer tokens with 24-hour expiration\n#\n```"
|
claude_mpm/cli/__init__.py
CHANGED
|
@@ -26,7 +26,8 @@ from .commands import (
|
|
|
26
26
|
manage_monitor,
|
|
27
27
|
manage_config,
|
|
28
28
|
aggregate_command,
|
|
29
|
-
cleanup_memory
|
|
29
|
+
cleanup_memory,
|
|
30
|
+
manage_mcp
|
|
30
31
|
)
|
|
31
32
|
from claude_mpm.config.paths import paths
|
|
32
33
|
|
|
@@ -187,6 +188,7 @@ def _execute_command(command: str, args) -> int:
|
|
|
187
188
|
CLICommands.CONFIG.value: manage_config,
|
|
188
189
|
CLICommands.AGGREGATE.value: aggregate_command,
|
|
189
190
|
CLICommands.CLEANUP.value: cleanup_memory,
|
|
191
|
+
CLICommands.MCP.value: manage_mcp,
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
# Execute command if found
|
|
@@ -14,6 +14,7 @@ from .monitor import manage_monitor
|
|
|
14
14
|
from .config import manage_config
|
|
15
15
|
from .aggregate import aggregate_command
|
|
16
16
|
from .cleanup import cleanup_memory
|
|
17
|
+
from .mcp import manage_mcp
|
|
17
18
|
|
|
18
19
|
__all__ = [
|
|
19
20
|
'run_session',
|
|
@@ -25,5 +26,6 @@ __all__ = [
|
|
|
25
26
|
'manage_monitor',
|
|
26
27
|
'manage_config',
|
|
27
28
|
'aggregate_command',
|
|
28
|
-
'cleanup_memory'
|
|
29
|
+
'cleanup_memory',
|
|
30
|
+
'manage_mcp'
|
|
29
31
|
]
|
|
@@ -13,6 +13,7 @@ DESIGN DECISIONS:
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
import os
|
|
16
|
+
import sys
|
|
16
17
|
import json
|
|
17
18
|
import shutil
|
|
18
19
|
from pathlib import Path
|
|
@@ -339,7 +340,26 @@ def cleanup_memory(args):
|
|
|
339
340
|
# Get confirmation unless forced
|
|
340
341
|
if not args.force and not args.dry_run:
|
|
341
342
|
print("\n⚠️ This will modify your conversation history")
|
|
342
|
-
|
|
343
|
+
|
|
344
|
+
# Ensure stdout is flushed before reading input
|
|
345
|
+
sys.stdout.flush()
|
|
346
|
+
|
|
347
|
+
# Check if we're in a TTY environment
|
|
348
|
+
if not sys.stdin.isatty():
|
|
349
|
+
# In non-TTY environment (like pipes), we need special handling
|
|
350
|
+
print("Continue? [y/N]: ", end="", flush=True)
|
|
351
|
+
try:
|
|
352
|
+
# Use readline for better compatibility in non-TTY environments
|
|
353
|
+
response = sys.stdin.readline().strip().lower()
|
|
354
|
+
except (EOFError, KeyboardInterrupt):
|
|
355
|
+
response = 'n'
|
|
356
|
+
else:
|
|
357
|
+
# In TTY environment, use normal input()
|
|
358
|
+
try:
|
|
359
|
+
response = input("Continue? [y/N]: ").strip().lower()
|
|
360
|
+
except (EOFError, KeyboardInterrupt):
|
|
361
|
+
response = 'n'
|
|
362
|
+
|
|
343
363
|
# Handle various line endings and control characters
|
|
344
364
|
response = response.replace('\r', '').replace('\n', '').strip()
|
|
345
365
|
if response != 'y':
|