claude-mpm 3.7.4__py3-none-any.whl → 3.8.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.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/BASE_PM.md +0 -106
- claude_mpm/agents/INSTRUCTIONS.md +0 -78
- claude_mpm/agents/MEMORY.md +88 -0
- claude_mpm/agents/WORKFLOW.md +86 -0
- claude_mpm/agents/schema/agent_schema.json +1 -1
- claude_mpm/agents/templates/code_analyzer.json +26 -11
- claude_mpm/agents/templates/data_engineer.json +4 -7
- claude_mpm/agents/templates/documentation.json +2 -2
- claude_mpm/agents/templates/engineer.json +2 -2
- claude_mpm/agents/templates/ops.json +3 -8
- claude_mpm/agents/templates/qa.json +2 -3
- claude_mpm/agents/templates/research.json +2 -3
- claude_mpm/agents/templates/security.json +3 -6
- claude_mpm/agents/templates/ticketing.json +4 -9
- claude_mpm/agents/templates/version_control.json +3 -3
- claude_mpm/agents/templates/web_qa.json +4 -4
- claude_mpm/agents/templates/web_ui.json +4 -4
- claude_mpm/cli/__init__.py +2 -2
- claude_mpm/cli/commands/__init__.py +2 -1
- claude_mpm/cli/commands/agents.py +118 -1
- claude_mpm/cli/commands/tickets.py +596 -19
- claude_mpm/cli/parser.py +228 -5
- claude_mpm/config/__init__.py +30 -39
- claude_mpm/config/socketio_config.py +8 -5
- claude_mpm/constants.py +13 -0
- claude_mpm/core/__init__.py +8 -18
- claude_mpm/core/cache.py +596 -0
- claude_mpm/core/claude_runner.py +166 -622
- claude_mpm/core/config.py +5 -1
- claude_mpm/core/constants.py +339 -0
- claude_mpm/core/container.py +461 -22
- claude_mpm/core/exceptions.py +392 -0
- claude_mpm/core/framework_loader.py +208 -93
- claude_mpm/core/interactive_session.py +432 -0
- claude_mpm/core/interfaces.py +424 -0
- claude_mpm/core/lazy.py +467 -0
- claude_mpm/core/logging_config.py +444 -0
- claude_mpm/core/oneshot_session.py +465 -0
- claude_mpm/core/optimized_agent_loader.py +485 -0
- claude_mpm/core/optimized_startup.py +490 -0
- claude_mpm/core/service_registry.py +52 -26
- claude_mpm/core/socketio_pool.py +162 -5
- claude_mpm/core/types.py +292 -0
- claude_mpm/core/typing_utils.py +477 -0
- claude_mpm/dashboard/static/js/components/file-tool-tracker.js +46 -2
- claude_mpm/dashboard/templates/index.html +5 -5
- claude_mpm/hooks/claude_hooks/hook_handler.py +213 -99
- claude_mpm/init.py +2 -1
- claude_mpm/services/__init__.py +78 -14
- claude_mpm/services/agent/__init__.py +24 -0
- claude_mpm/services/agent/deployment.py +2548 -0
- claude_mpm/services/agent/management.py +598 -0
- claude_mpm/services/agent/registry.py +813 -0
- claude_mpm/services/agents/deployment/agent_deployment.py +592 -269
- claude_mpm/services/agents/deployment/async_agent_deployment.py +5 -1
- claude_mpm/services/agents/management/agent_capabilities_generator.py +21 -11
- claude_mpm/services/agents/memory/agent_memory_manager.py +156 -1
- claude_mpm/services/async_session_logger.py +8 -3
- claude_mpm/services/communication/__init__.py +21 -0
- claude_mpm/services/communication/socketio.py +1933 -0
- claude_mpm/services/communication/websocket.py +479 -0
- claude_mpm/services/core/__init__.py +123 -0
- claude_mpm/services/core/base.py +247 -0
- claude_mpm/services/core/interfaces.py +951 -0
- claude_mpm/services/framework_claude_md_generator/section_generators/todo_task_tools.py +23 -23
- claude_mpm/services/framework_claude_md_generator.py +3 -2
- claude_mpm/services/health_monitor.py +4 -3
- claude_mpm/services/hook_service.py +64 -4
- claude_mpm/services/infrastructure/__init__.py +21 -0
- claude_mpm/services/infrastructure/logging.py +202 -0
- claude_mpm/services/infrastructure/monitoring.py +893 -0
- claude_mpm/services/memory/indexed_memory.py +648 -0
- claude_mpm/services/project/__init__.py +21 -0
- claude_mpm/services/project/analyzer.py +864 -0
- claude_mpm/services/project/registry.py +608 -0
- claude_mpm/services/project_analyzer.py +95 -2
- claude_mpm/services/recovery_manager.py +15 -9
- claude_mpm/services/socketio/__init__.py +25 -0
- claude_mpm/services/socketio/handlers/__init__.py +25 -0
- claude_mpm/services/socketio/handlers/base.py +121 -0
- claude_mpm/services/socketio/handlers/connection.py +198 -0
- claude_mpm/services/socketio/handlers/file.py +213 -0
- claude_mpm/services/socketio/handlers/git.py +723 -0
- claude_mpm/services/socketio/handlers/memory.py +27 -0
- claude_mpm/services/socketio/handlers/project.py +25 -0
- claude_mpm/services/socketio/handlers/registry.py +145 -0
- claude_mpm/services/socketio_client_manager.py +12 -7
- claude_mpm/services/socketio_server.py +156 -30
- claude_mpm/services/ticket_manager.py +377 -51
- claude_mpm/utils/agent_dependency_loader.py +66 -15
- claude_mpm/utils/error_handler.py +1 -1
- claude_mpm/utils/robust_installer.py +587 -0
- claude_mpm/validation/agent_validator.py +27 -14
- claude_mpm/validation/frontmatter_validator.py +231 -0
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/METADATA +74 -41
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/RECORD +101 -76
- claude_mpm/.claude-mpm/logs/hooks_20250728.log +0 -10
- claude_mpm/agents/agent-template.yaml +0 -83
- claude_mpm/cli/README.md +0 -108
- claude_mpm/cli_module/refactoring_guide.md +0 -253
- claude_mpm/config/async_logging_config.yaml +0 -145
- claude_mpm/core/.claude-mpm/logs/hooks_20250730.log +0 -34
- claude_mpm/dashboard/.claude-mpm/memories/README.md +0 -36
- claude_mpm/dashboard/README.md +0 -121
- claude_mpm/dashboard/static/js/dashboard.js.backup +0 -1973
- claude_mpm/dashboard/templates/.claude-mpm/memories/README.md +0 -36
- claude_mpm/dashboard/templates/.claude-mpm/memories/engineer_agent.md +0 -39
- claude_mpm/dashboard/templates/.claude-mpm/memories/version_control_agent.md +0 -38
- claude_mpm/hooks/README.md +0 -96
- claude_mpm/schemas/agent_schema.json +0 -435
- claude_mpm/services/framework_claude_md_generator/README.md +0 -92
- claude_mpm/services/version_control/VERSION +0 -1
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/WHEEL +0 -0
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/entry_points.txt +0 -0
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/top_level.txt +0 -0
    
        claude_mpm/core/interfaces.py
    CHANGED
    
    | @@ -2,6 +2,14 @@ | |
| 2 2 | 
             
            Core Service Interfaces for Claude PM Framework
         | 
| 3 3 | 
             
            ==============================================
         | 
| 4 4 |  | 
| 5 | 
            +
            DEPRECATED: This file has been moved to services/core/interfaces.py
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            This file is maintained for backward compatibility only.
         | 
| 8 | 
            +
            All new code should import from claude_mpm.services.core.interfaces
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            Part of TSK-0046: Service Layer Architecture Reorganization
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            Original description:
         | 
| 5 13 | 
             
            This module defines the core service interfaces that establish contracts for 
         | 
| 6 14 | 
             
            dependency injection, service discovery, and framework orchestration.
         | 
| 7 15 |  | 
| @@ -17,6 +25,10 @@ Phase 1 Refactoring: Interface extraction and dependency injection foundation | |
| 17 25 | 
             
            These interfaces reduce cyclomatic complexity and establish clean separation of concerns.
         | 
| 18 26 | 
             
            """
         | 
| 19 27 |  | 
| 28 | 
            +
            # Re-export everything from the new location for backward compatibility
         | 
| 29 | 
            +
            from claude_mpm.services.core.interfaces import *
         | 
| 30 | 
            +
             | 
| 31 | 
            +
            # Keep original imports to prevent any parsing issues
         | 
| 20 32 | 
             
            from abc import ABC, abstractmethod
         | 
| 21 33 | 
             
            from typing import Any, Dict, List, Optional, Set, Tuple, Union, TypeVar, Generic
         | 
| 22 34 | 
             
            from dataclasses import dataclass
         | 
| @@ -505,6 +517,412 @@ class IEventBus(ABC): | |
| 505 517 | 
             
                    pass
         | 
| 506 518 |  | 
| 507 519 |  | 
| 520 | 
            +
            # Agent deployment interface
         | 
| 521 | 
            +
            class AgentDeploymentInterface(ABC):
         | 
| 522 | 
            +
                """Interface for agent deployment operations.
         | 
| 523 | 
            +
                
         | 
| 524 | 
            +
                WHY: Agent deployment needs to be decoupled from concrete implementations
         | 
| 525 | 
            +
                to enable different deployment strategies (local, remote, containerized).
         | 
| 526 | 
            +
                This interface ensures consistency across different deployment backends.
         | 
| 527 | 
            +
                
         | 
| 528 | 
            +
                DESIGN DECISION: Methods return deployment status/results to enable
         | 
| 529 | 
            +
                proper error handling and rollback operations when deployments fail.
         | 
| 530 | 
            +
                """
         | 
| 531 | 
            +
                
         | 
| 532 | 
            +
                @abstractmethod
         | 
| 533 | 
            +
                def deploy_agents(self, force: bool = False, include_all: bool = False) -> Dict[str, Any]:
         | 
| 534 | 
            +
                    """Deploy agents to target environment.
         | 
| 535 | 
            +
                    
         | 
| 536 | 
            +
                    Args:
         | 
| 537 | 
            +
                        force: Force deployment even if agents already exist
         | 
| 538 | 
            +
                        include_all: Include all agents, ignoring exclusion lists
         | 
| 539 | 
            +
                        
         | 
| 540 | 
            +
                    Returns:
         | 
| 541 | 
            +
                        Dictionary with deployment results and status
         | 
| 542 | 
            +
                    """
         | 
| 543 | 
            +
                    pass
         | 
| 544 | 
            +
                
         | 
| 545 | 
            +
                @abstractmethod
         | 
| 546 | 
            +
                def validate_agent(self, agent_path: Path) -> Tuple[bool, List[str]]:
         | 
| 547 | 
            +
                    """Validate agent configuration and structure.
         | 
| 548 | 
            +
                    
         | 
| 549 | 
            +
                    Args:
         | 
| 550 | 
            +
                        agent_path: Path to agent configuration file
         | 
| 551 | 
            +
                        
         | 
| 552 | 
            +
                    Returns:
         | 
| 553 | 
            +
                        Tuple of (is_valid, list_of_errors)
         | 
| 554 | 
            +
                    """
         | 
| 555 | 
            +
                    pass
         | 
| 556 | 
            +
                
         | 
| 557 | 
            +
                @abstractmethod
         | 
| 558 | 
            +
                def clean_deployment(self, preserve_user_agents: bool = True) -> bool:
         | 
| 559 | 
            +
                    """Clean up deployed agents.
         | 
| 560 | 
            +
                    
         | 
| 561 | 
            +
                    Args:
         | 
| 562 | 
            +
                        preserve_user_agents: Whether to keep user-created agents
         | 
| 563 | 
            +
                        
         | 
| 564 | 
            +
                    Returns:
         | 
| 565 | 
            +
                        True if cleanup successful
         | 
| 566 | 
            +
                    """
         | 
| 567 | 
            +
                    pass
         | 
| 568 | 
            +
                
         | 
| 569 | 
            +
                @abstractmethod
         | 
| 570 | 
            +
                def get_deployment_status(self) -> Dict[str, Any]:
         | 
| 571 | 
            +
                    """Get current deployment status and metrics.
         | 
| 572 | 
            +
                    
         | 
| 573 | 
            +
                    Returns:
         | 
| 574 | 
            +
                        Dictionary with deployment status information
         | 
| 575 | 
            +
                    """
         | 
| 576 | 
            +
                    pass
         | 
| 577 | 
            +
             | 
| 578 | 
            +
             | 
| 579 | 
            +
            # Memory service interface
         | 
| 580 | 
            +
            class MemoryServiceInterface(ABC):
         | 
| 581 | 
            +
                """Interface for memory management operations.
         | 
| 582 | 
            +
                
         | 
| 583 | 
            +
                WHY: Memory management is crucial for agent learning and context retention.
         | 
| 584 | 
            +
                This interface abstracts memory storage, retrieval, and optimization to
         | 
| 585 | 
            +
                enable different backends (file-based, database, distributed cache).
         | 
| 586 | 
            +
                
         | 
| 587 | 
            +
                DESIGN DECISION: Memory operations return success/failure status to enable
         | 
| 588 | 
            +
                proper error handling and fallback strategies when memory is unavailable.
         | 
| 589 | 
            +
                """
         | 
| 590 | 
            +
                
         | 
| 591 | 
            +
                @abstractmethod
         | 
| 592 | 
            +
                def load_memory(self, agent_id: str) -> Optional[str]:
         | 
| 593 | 
            +
                    """Load memory for a specific agent.
         | 
| 594 | 
            +
                    
         | 
| 595 | 
            +
                    Args:
         | 
| 596 | 
            +
                        agent_id: Identifier of the agent
         | 
| 597 | 
            +
                        
         | 
| 598 | 
            +
                    Returns:
         | 
| 599 | 
            +
                        Memory content as string or None if not found
         | 
| 600 | 
            +
                    """
         | 
| 601 | 
            +
                    pass
         | 
| 602 | 
            +
                
         | 
| 603 | 
            +
                @abstractmethod
         | 
| 604 | 
            +
                def save_memory(self, agent_id: str, content: str) -> bool:
         | 
| 605 | 
            +
                    """Save memory for a specific agent.
         | 
| 606 | 
            +
                    
         | 
| 607 | 
            +
                    Args:
         | 
| 608 | 
            +
                        agent_id: Identifier of the agent
         | 
| 609 | 
            +
                        content: Memory content to save
         | 
| 610 | 
            +
                        
         | 
| 611 | 
            +
                    Returns:
         | 
| 612 | 
            +
                        True if save successful
         | 
| 613 | 
            +
                    """
         | 
| 614 | 
            +
                    pass
         | 
| 615 | 
            +
                
         | 
| 616 | 
            +
                @abstractmethod
         | 
| 617 | 
            +
                def validate_memory_size(self, content: str) -> Tuple[bool, Optional[str]]:
         | 
| 618 | 
            +
                    """Validate memory content size and structure.
         | 
| 619 | 
            +
                    
         | 
| 620 | 
            +
                    Args:
         | 
| 621 | 
            +
                        content: Memory content to validate
         | 
| 622 | 
            +
                        
         | 
| 623 | 
            +
                    Returns:
         | 
| 624 | 
            +
                        Tuple of (is_valid, error_message)
         | 
| 625 | 
            +
                    """
         | 
| 626 | 
            +
                    pass
         | 
| 627 | 
            +
                
         | 
| 628 | 
            +
                @abstractmethod
         | 
| 629 | 
            +
                def optimize_memory(self, agent_id: str) -> bool:
         | 
| 630 | 
            +
                    """Optimize memory by removing duplicates and consolidating entries.
         | 
| 631 | 
            +
                    
         | 
| 632 | 
            +
                    Args:
         | 
| 633 | 
            +
                        agent_id: Identifier of the agent
         | 
| 634 | 
            +
                        
         | 
| 635 | 
            +
                    Returns:
         | 
| 636 | 
            +
                        True if optimization successful
         | 
| 637 | 
            +
                    """
         | 
| 638 | 
            +
                    pass
         | 
| 639 | 
            +
                
         | 
| 640 | 
            +
                @abstractmethod
         | 
| 641 | 
            +
                def get_memory_metrics(self, agent_id: Optional[str] = None) -> Dict[str, Any]:
         | 
| 642 | 
            +
                    """Get memory usage metrics.
         | 
| 643 | 
            +
                    
         | 
| 644 | 
            +
                    Args:
         | 
| 645 | 
            +
                        agent_id: Optional specific agent ID, or None for all
         | 
| 646 | 
            +
                        
         | 
| 647 | 
            +
                    Returns:
         | 
| 648 | 
            +
                        Dictionary with memory metrics
         | 
| 649 | 
            +
                    """
         | 
| 650 | 
            +
                    pass
         | 
| 651 | 
            +
             | 
| 652 | 
            +
             | 
| 653 | 
            +
            # Hook service interface
         | 
| 654 | 
            +
            class HookServiceInterface(ABC):
         | 
| 655 | 
            +
                """Interface for hook execution operations.
         | 
| 656 | 
            +
                
         | 
| 657 | 
            +
                WHY: Hooks provide extensibility points for the framework, allowing plugins
         | 
| 658 | 
            +
                and extensions to modify behavior. This interface ensures consistent hook
         | 
| 659 | 
            +
                registration, priority handling, and execution across different hook systems.
         | 
| 660 | 
            +
                
         | 
| 661 | 
            +
                DESIGN DECISION: Separate pre/post delegation methods for clarity and
         | 
| 662 | 
            +
                performance - no runtime type checking needed during execution.
         | 
| 663 | 
            +
                """
         | 
| 664 | 
            +
                
         | 
| 665 | 
            +
                @abstractmethod
         | 
| 666 | 
            +
                def register_hook(self, hook: Any) -> bool:
         | 
| 667 | 
            +
                    """Register a hook with the service.
         | 
| 668 | 
            +
                    
         | 
| 669 | 
            +
                    Args:
         | 
| 670 | 
            +
                        hook: Hook instance to register
         | 
| 671 | 
            +
                        
         | 
| 672 | 
            +
                    Returns:
         | 
| 673 | 
            +
                        True if registration successful
         | 
| 674 | 
            +
                    """
         | 
| 675 | 
            +
                    pass
         | 
| 676 | 
            +
                
         | 
| 677 | 
            +
                @abstractmethod
         | 
| 678 | 
            +
                def execute_pre_delegation_hooks(self, context: Any) -> Any:
         | 
| 679 | 
            +
                    """Execute all pre-delegation hooks.
         | 
| 680 | 
            +
                    
         | 
| 681 | 
            +
                    Args:
         | 
| 682 | 
            +
                        context: Hook execution context
         | 
| 683 | 
            +
                        
         | 
| 684 | 
            +
                    Returns:
         | 
| 685 | 
            +
                        Hook execution result
         | 
| 686 | 
            +
                    """
         | 
| 687 | 
            +
                    pass
         | 
| 688 | 
            +
                
         | 
| 689 | 
            +
                @abstractmethod
         | 
| 690 | 
            +
                def execute_post_delegation_hooks(self, context: Any) -> Any:
         | 
| 691 | 
            +
                    """Execute all post-delegation hooks.
         | 
| 692 | 
            +
                    
         | 
| 693 | 
            +
                    Args:
         | 
| 694 | 
            +
                        context: Hook execution context
         | 
| 695 | 
            +
                        
         | 
| 696 | 
            +
                    Returns:
         | 
| 697 | 
            +
                        Hook execution result
         | 
| 698 | 
            +
                    """
         | 
| 699 | 
            +
                    pass
         | 
| 700 | 
            +
                
         | 
| 701 | 
            +
                @abstractmethod
         | 
| 702 | 
            +
                def get_registered_hooks(self) -> Dict[str, List[Any]]:
         | 
| 703 | 
            +
                    """Get all registered hooks by type.
         | 
| 704 | 
            +
                    
         | 
| 705 | 
            +
                    Returns:
         | 
| 706 | 
            +
                        Dictionary mapping hook types to lists of hooks
         | 
| 707 | 
            +
                    """
         | 
| 708 | 
            +
                    pass
         | 
| 709 | 
            +
                
         | 
| 710 | 
            +
                @abstractmethod
         | 
| 711 | 
            +
                def clear_hooks(self, hook_type: Optional[str] = None) -> None:
         | 
| 712 | 
            +
                    """Clear registered hooks.
         | 
| 713 | 
            +
                    
         | 
| 714 | 
            +
                    Args:
         | 
| 715 | 
            +
                        hook_type: Optional specific hook type to clear, or None for all
         | 
| 716 | 
            +
                    """
         | 
| 717 | 
            +
                    pass
         | 
| 718 | 
            +
             | 
| 719 | 
            +
             | 
| 720 | 
            +
            # WebSocket/SocketIO service interface
         | 
| 721 | 
            +
            class SocketIOServiceInterface(ABC):
         | 
| 722 | 
            +
                """Interface for WebSocket communication.
         | 
| 723 | 
            +
                
         | 
| 724 | 
            +
                WHY: Real-time communication is essential for monitoring and interactive
         | 
| 725 | 
            +
                features. This interface abstracts WebSocket/SocketIO implementation to
         | 
| 726 | 
            +
                enable different transport mechanisms and fallback strategies.
         | 
| 727 | 
            +
                
         | 
| 728 | 
            +
                DESIGN DECISION: Async methods for non-blocking I/O operations, with
         | 
| 729 | 
            +
                support for both broadcast and targeted messaging.
         | 
| 730 | 
            +
                """
         | 
| 731 | 
            +
                
         | 
| 732 | 
            +
                @abstractmethod
         | 
| 733 | 
            +
                async def start(self, host: str = "localhost", port: int = 8765) -> None:
         | 
| 734 | 
            +
                    """Start the WebSocket server.
         | 
| 735 | 
            +
                    
         | 
| 736 | 
            +
                    Args:
         | 
| 737 | 
            +
                        host: Host to bind to
         | 
| 738 | 
            +
                        port: Port to listen on
         | 
| 739 | 
            +
                    """
         | 
| 740 | 
            +
                    pass
         | 
| 741 | 
            +
                
         | 
| 742 | 
            +
                @abstractmethod
         | 
| 743 | 
            +
                async def stop(self) -> None:
         | 
| 744 | 
            +
                    """Stop the WebSocket server."""
         | 
| 745 | 
            +
                    pass
         | 
| 746 | 
            +
                
         | 
| 747 | 
            +
                @abstractmethod
         | 
| 748 | 
            +
                async def emit(self, event: str, data: Any, room: Optional[str] = None) -> None:
         | 
| 749 | 
            +
                    """Emit an event to connected clients.
         | 
| 750 | 
            +
                    
         | 
| 751 | 
            +
                    Args:
         | 
| 752 | 
            +
                        event: Event name
         | 
| 753 | 
            +
                        data: Event data
         | 
| 754 | 
            +
                        room: Optional room to target
         | 
| 755 | 
            +
                    """
         | 
| 756 | 
            +
                    pass
         | 
| 757 | 
            +
                
         | 
| 758 | 
            +
                @abstractmethod
         | 
| 759 | 
            +
                async def broadcast(self, event: str, data: Any) -> None:
         | 
| 760 | 
            +
                    """Broadcast event to all connected clients.
         | 
| 761 | 
            +
                    
         | 
| 762 | 
            +
                    Args:
         | 
| 763 | 
            +
                        event: Event name
         | 
| 764 | 
            +
                        data: Event data
         | 
| 765 | 
            +
                    """
         | 
| 766 | 
            +
                    pass
         | 
| 767 | 
            +
                
         | 
| 768 | 
            +
                @abstractmethod
         | 
| 769 | 
            +
                def get_connection_count(self) -> int:
         | 
| 770 | 
            +
                    """Get number of connected clients.
         | 
| 771 | 
            +
                    
         | 
| 772 | 
            +
                    Returns:
         | 
| 773 | 
            +
                        Number of active connections
         | 
| 774 | 
            +
                    """
         | 
| 775 | 
            +
                    pass
         | 
| 776 | 
            +
                
         | 
| 777 | 
            +
                @abstractmethod
         | 
| 778 | 
            +
                def is_running(self) -> bool:
         | 
| 779 | 
            +
                    """Check if server is running.
         | 
| 780 | 
            +
                    
         | 
| 781 | 
            +
                    Returns:
         | 
| 782 | 
            +
                        True if server is active
         | 
| 783 | 
            +
                    """
         | 
| 784 | 
            +
                    pass
         | 
| 785 | 
            +
             | 
| 786 | 
            +
             | 
| 787 | 
            +
            # Project analyzer interface
         | 
| 788 | 
            +
            class ProjectAnalyzerInterface(ABC):
         | 
| 789 | 
            +
                """Interface for project analysis operations.
         | 
| 790 | 
            +
                
         | 
| 791 | 
            +
                WHY: Understanding project structure and characteristics is essential for
         | 
| 792 | 
            +
                context-aware agent behavior. This interface abstracts project analysis
         | 
| 793 | 
            +
                to support different project types and structures.
         | 
| 794 | 
            +
                
         | 
| 795 | 
            +
                DESIGN DECISION: Returns structured data classes for type safety and
         | 
| 796 | 
            +
                clear contracts between analysis and consumption components.
         | 
| 797 | 
            +
                """
         | 
| 798 | 
            +
                
         | 
| 799 | 
            +
                @abstractmethod
         | 
| 800 | 
            +
                def analyze_project(self, project_path: Optional[Path] = None) -> Any:
         | 
| 801 | 
            +
                    """Analyze project characteristics.
         | 
| 802 | 
            +
                    
         | 
| 803 | 
            +
                    Args:
         | 
| 804 | 
            +
                        project_path: Optional path to project, defaults to current
         | 
| 805 | 
            +
                        
         | 
| 806 | 
            +
                    Returns:
         | 
| 807 | 
            +
                        ProjectCharacteristics or similar structured data
         | 
| 808 | 
            +
                    """
         | 
| 809 | 
            +
                    pass
         | 
| 810 | 
            +
                
         | 
| 811 | 
            +
                @abstractmethod
         | 
| 812 | 
            +
                def detect_technology_stack(self) -> List[str]:
         | 
| 813 | 
            +
                    """Detect technologies used in the project.
         | 
| 814 | 
            +
                    
         | 
| 815 | 
            +
                    Returns:
         | 
| 816 | 
            +
                        List of detected technologies
         | 
| 817 | 
            +
                    """
         | 
| 818 | 
            +
                    pass
         | 
| 819 | 
            +
                
         | 
| 820 | 
            +
                @abstractmethod
         | 
| 821 | 
            +
                def analyze_code_patterns(self) -> Dict[str, Any]:
         | 
| 822 | 
            +
                    """Analyze code patterns and conventions.
         | 
| 823 | 
            +
                    
         | 
| 824 | 
            +
                    Returns:
         | 
| 825 | 
            +
                        Dictionary of pattern analysis results
         | 
| 826 | 
            +
                    """
         | 
| 827 | 
            +
                    pass
         | 
| 828 | 
            +
                
         | 
| 829 | 
            +
                @abstractmethod
         | 
| 830 | 
            +
                def get_project_structure(self) -> Dict[str, Any]:
         | 
| 831 | 
            +
                    """Get project directory structure analysis.
         | 
| 832 | 
            +
                    
         | 
| 833 | 
            +
                    Returns:
         | 
| 834 | 
            +
                        Dictionary representing project structure
         | 
| 835 | 
            +
                    """
         | 
| 836 | 
            +
                    pass
         | 
| 837 | 
            +
                
         | 
| 838 | 
            +
                @abstractmethod
         | 
| 839 | 
            +
                def identify_entry_points(self) -> List[Path]:
         | 
| 840 | 
            +
                    """Identify project entry points.
         | 
| 841 | 
            +
                    
         | 
| 842 | 
            +
                    Returns:
         | 
| 843 | 
            +
                        List of entry point paths
         | 
| 844 | 
            +
                    """
         | 
| 845 | 
            +
                    pass
         | 
| 846 | 
            +
             | 
| 847 | 
            +
             | 
| 848 | 
            +
            # Ticket manager interface
         | 
| 849 | 
            +
            class TicketManagerInterface(ABC):
         | 
| 850 | 
            +
                """Interface for ticket management operations.
         | 
| 851 | 
            +
                
         | 
| 852 | 
            +
                WHY: Ticket management provides work tracking and organization. This
         | 
| 853 | 
            +
                interface abstracts ticket operations to support different backend
         | 
| 854 | 
            +
                systems (file-based, API-based, database).
         | 
| 855 | 
            +
                
         | 
| 856 | 
            +
                DESIGN DECISION: Uses string IDs for flexibility across different
         | 
| 857 | 
            +
                ticketing systems, with structured data returns for consistency.
         | 
| 858 | 
            +
                """
         | 
| 859 | 
            +
                
         | 
| 860 | 
            +
                @abstractmethod
         | 
| 861 | 
            +
                def create_task(self, title: str, description: str, **kwargs) -> Optional[str]:
         | 
| 862 | 
            +
                    """Create a new task ticket.
         | 
| 863 | 
            +
                    
         | 
| 864 | 
            +
                    Args:
         | 
| 865 | 
            +
                        title: Task title
         | 
| 866 | 
            +
                        description: Task description
         | 
| 867 | 
            +
                        **kwargs: Additional task properties
         | 
| 868 | 
            +
                        
         | 
| 869 | 
            +
                    Returns:
         | 
| 870 | 
            +
                        Task ID if created successfully, None otherwise
         | 
| 871 | 
            +
                    """
         | 
| 872 | 
            +
                    pass
         | 
| 873 | 
            +
                
         | 
| 874 | 
            +
                @abstractmethod
         | 
| 875 | 
            +
                def update_task(self, task_id: str, **updates) -> bool:
         | 
| 876 | 
            +
                    """Update an existing task.
         | 
| 877 | 
            +
                    
         | 
| 878 | 
            +
                    Args:
         | 
| 879 | 
            +
                        task_id: ID of task to update
         | 
| 880 | 
            +
                        **updates: Fields to update
         | 
| 881 | 
            +
                        
         | 
| 882 | 
            +
                    Returns:
         | 
| 883 | 
            +
                        True if update successful
         | 
| 884 | 
            +
                    """
         | 
| 885 | 
            +
                    pass
         | 
| 886 | 
            +
                
         | 
| 887 | 
            +
                @abstractmethod
         | 
| 888 | 
            +
                def get_task(self, task_id: str) -> Optional[Dict[str, Any]]:
         | 
| 889 | 
            +
                    """Get task details.
         | 
| 890 | 
            +
                    
         | 
| 891 | 
            +
                    Args:
         | 
| 892 | 
            +
                        task_id: ID of task to retrieve
         | 
| 893 | 
            +
                        
         | 
| 894 | 
            +
                    Returns:
         | 
| 895 | 
            +
                        Task data dictionary or None if not found
         | 
| 896 | 
            +
                    """
         | 
| 897 | 
            +
                    pass
         | 
| 898 | 
            +
                
         | 
| 899 | 
            +
                @abstractmethod
         | 
| 900 | 
            +
                def list_tasks(self, status: Optional[str] = None, **filters) -> List[Dict[str, Any]]:
         | 
| 901 | 
            +
                    """List tasks with optional filtering.
         | 
| 902 | 
            +
                    
         | 
| 903 | 
            +
                    Args:
         | 
| 904 | 
            +
                        status: Optional status filter
         | 
| 905 | 
            +
                        **filters: Additional filter criteria
         | 
| 906 | 
            +
                        
         | 
| 907 | 
            +
                    Returns:
         | 
| 908 | 
            +
                        List of task dictionaries
         | 
| 909 | 
            +
                    """
         | 
| 910 | 
            +
                    pass
         | 
| 911 | 
            +
                
         | 
| 912 | 
            +
                @abstractmethod
         | 
| 913 | 
            +
                def close_task(self, task_id: str, resolution: Optional[str] = None) -> bool:
         | 
| 914 | 
            +
                    """Close a task.
         | 
| 915 | 
            +
                    
         | 
| 916 | 
            +
                    Args:
         | 
| 917 | 
            +
                        task_id: ID of task to close
         | 
| 918 | 
            +
                        resolution: Optional resolution description
         | 
| 919 | 
            +
                        
         | 
| 920 | 
            +
                    Returns:
         | 
| 921 | 
            +
                        True if close successful
         | 
| 922 | 
            +
                    """
         | 
| 923 | 
            +
                    pass
         | 
| 924 | 
            +
             | 
| 925 | 
            +
             | 
| 508 926 | 
             
            # Interface registry for dependency injection discovery
         | 
| 509 927 | 
             
            class InterfaceRegistry:
         | 
| 510 928 | 
             
                """Registry of all core interfaces for dependency injection"""
         | 
| @@ -521,6 +939,12 @@ class InterfaceRegistry: | |
| 521 939 | 
             
                    'error_handler': IErrorHandler,
         | 
| 522 940 | 
             
                    'performance_monitor': IPerformanceMonitor,
         | 
| 523 941 | 
             
                    'event_bus': IEventBus,
         | 
| 942 | 
            +
                    'agent_deployment': AgentDeploymentInterface,
         | 
| 943 | 
            +
                    'memory_service': MemoryServiceInterface,
         | 
| 944 | 
            +
                    'hook_service': HookServiceInterface,
         | 
| 945 | 
            +
                    'socketio_service': SocketIOServiceInterface,
         | 
| 946 | 
            +
                    'project_analyzer': ProjectAnalyzerInterface,
         | 
| 947 | 
            +
                    'ticket_manager': TicketManagerInterface,
         | 
| 524 948 | 
             
                }
         | 
| 525 949 |  | 
| 526 950 | 
             
                @classmethod
         |