claude-mpm 4.1.26__py3-none-any.whl → 5.0.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.
Potentially problematic release.
This version of claude-mpm might be problematic. Click here for more details.
- claude_mpm/BUILD_NUMBER +1 -1
- claude_mpm/VERSION +1 -1
- claude_mpm/__init__.py +20 -5
- claude_mpm/agents/BASE_AGENT_TEMPLATE.md +118 -0
- claude_mpm/agents/BASE_DOCUMENTATION.md +53 -0
- claude_mpm/agents/BASE_ENGINEER.md +658 -0
- claude_mpm/agents/BASE_OPS.md +219 -0
- claude_mpm/agents/BASE_PM.md +432 -158
- claude_mpm/agents/BASE_PROMPT_ENGINEER.md +787 -0
- claude_mpm/agents/BASE_QA.md +167 -0
- claude_mpm/agents/BASE_RESEARCH.md +53 -0
- claude_mpm/agents/OUTPUT_STYLE.md +254 -29
- claude_mpm/agents/PM_INSTRUCTIONS.md +969 -0
- claude_mpm/agents/PM_INSTRUCTIONS_TEACH.md +1322 -0
- claude_mpm/agents/WORKFLOW.md +355 -191
- claude_mpm/agents/__init__.py +6 -0
- claude_mpm/agents/agent_loader.py +41 -14
- claude_mpm/agents/agent_loader_integration.py +3 -2
- claude_mpm/agents/async_agent_loader.py +3 -3
- claude_mpm/agents/base_agent.json +6 -3
- claude_mpm/agents/base_agent_loader.py +21 -44
- claude_mpm/agents/frontmatter_validator.py +292 -252
- claude_mpm/agents/system_agent_config.py +3 -2
- claude_mpm/agents/templates/README.md +465 -0
- claude_mpm/agents/templates/circuit-breakers.md +1005 -0
- claude_mpm/agents/templates/context-management-examples.md +544 -0
- claude_mpm/agents/templates/git-file-tracking.md +584 -0
- claude_mpm/agents/templates/pm-examples.md +474 -0
- claude_mpm/agents/templates/pm-red-flags.md +310 -0
- claude_mpm/agents/templates/pr-workflow-examples.md +427 -0
- claude_mpm/agents/templates/research-gate-examples.md +669 -0
- claude_mpm/agents/templates/response-format.md +583 -0
- claude_mpm/agents/templates/structured-questions-examples.md +615 -0
- claude_mpm/agents/templates/ticket-completeness-examples.md +139 -0
- claude_mpm/agents/templates/ticketing-examples.md +277 -0
- claude_mpm/agents/templates/validation-templates.md +312 -0
- claude_mpm/cli/__init__.py +72 -376
- claude_mpm/cli/commands/__init__.py +4 -0
- claude_mpm/cli/commands/agent_manager.py +675 -20
- claude_mpm/cli/commands/agent_source.py +774 -0
- claude_mpm/cli/commands/agent_state_manager.py +344 -0
- claude_mpm/cli/commands/agents.py +1673 -178
- claude_mpm/cli/commands/agents_cleanup.py +210 -0
- claude_mpm/cli/commands/agents_detect.py +380 -0
- claude_mpm/cli/commands/agents_discover.py +338 -0
- claude_mpm/cli/commands/agents_recommend.py +309 -0
- claude_mpm/cli/commands/aggregate.py +11 -7
- claude_mpm/cli/commands/analyze.py +18 -13
- claude_mpm/cli/commands/analyze_code.py +8 -4
- claude_mpm/cli/commands/auto_configure.py +566 -0
- claude_mpm/cli/commands/cleanup.py +12 -12
- claude_mpm/cli/commands/config.py +54 -17
- claude_mpm/cli/commands/configure.py +1184 -1055
- claude_mpm/cli/commands/configure_agent_display.py +261 -0
- claude_mpm/cli/commands/configure_behavior_manager.py +204 -0
- claude_mpm/cli/commands/configure_hook_manager.py +225 -0
- claude_mpm/cli/commands/configure_models.py +18 -0
- claude_mpm/cli/commands/configure_navigation.py +184 -0
- claude_mpm/cli/commands/configure_paths.py +104 -0
- claude_mpm/cli/commands/configure_persistence.py +254 -0
- claude_mpm/cli/commands/configure_startup_manager.py +646 -0
- claude_mpm/cli/commands/configure_template_editor.py +497 -0
- claude_mpm/cli/commands/configure_validators.py +73 -0
- claude_mpm/cli/commands/dashboard.py +50 -52
- claude_mpm/cli/commands/debug.py +19 -19
- claude_mpm/cli/commands/doctor.py +51 -7
- claude_mpm/cli/commands/hook_errors.py +277 -0
- claude_mpm/cli/commands/info.py +3 -4
- claude_mpm/cli/commands/local_deploy.py +534 -0
- claude_mpm/cli/commands/mcp.py +17 -10
- claude_mpm/cli/commands/mcp_command_router.py +11 -0
- claude_mpm/cli/commands/mcp_config.py +154 -0
- claude_mpm/cli/commands/mcp_external_commands.py +249 -0
- claude_mpm/cli/commands/mcp_install_commands.py +101 -32
- claude_mpm/cli/commands/mcp_pipx_config.py +2 -2
- claude_mpm/cli/commands/mcp_setup_external.py +868 -0
- claude_mpm/cli/commands/memory.py +55 -21
- claude_mpm/cli/commands/monitor.py +160 -70
- claude_mpm/cli/commands/mpm_init/__init__.py +73 -0
- claude_mpm/cli/commands/mpm_init/core.py +573 -0
- claude_mpm/cli/commands/mpm_init/display.py +341 -0
- claude_mpm/cli/commands/mpm_init/git_activity.py +427 -0
- claude_mpm/cli/commands/mpm_init/modes.py +397 -0
- claude_mpm/cli/commands/mpm_init/prompts.py +442 -0
- claude_mpm/cli/commands/mpm_init_cli.py +396 -0
- claude_mpm/cli/commands/mpm_init_handler.py +114 -4
- claude_mpm/cli/commands/postmortem.py +401 -0
- claude_mpm/cli/commands/run.py +252 -167
- claude_mpm/cli/commands/search.py +458 -0
- claude_mpm/cli/commands/skill_source.py +694 -0
- claude_mpm/cli/commands/skills.py +1225 -0
- claude_mpm/cli/commands/uninstall.py +176 -0
- claude_mpm/cli/commands/upgrade.py +152 -0
- claude_mpm/cli/commands/verify.py +119 -0
- claude_mpm/cli/executor.py +279 -0
- claude_mpm/cli/helpers.py +105 -0
- claude_mpm/cli/interactive/__init__.py +21 -0
- claude_mpm/cli/interactive/agent_wizard.py +1872 -0
- claude_mpm/cli/interactive/skills_wizard.py +491 -0
- claude_mpm/cli/parser.py +79 -2
- claude_mpm/cli/parsers/__init__.py +7 -1
- claude_mpm/cli/parsers/agent_manager_parser.py +161 -1
- claude_mpm/cli/parsers/agent_source_parser.py +171 -0
- claude_mpm/cli/parsers/agents_parser.py +369 -1
- claude_mpm/cli/parsers/auto_configure_parser.py +245 -0
- claude_mpm/cli/parsers/base_parser.py +196 -3
- claude_mpm/cli/parsers/config_parser.py +96 -43
- claude_mpm/cli/parsers/configure_parser.py +11 -15
- claude_mpm/cli/parsers/local_deploy_parser.py +227 -0
- claude_mpm/cli/parsers/mcp_parser.py +15 -0
- claude_mpm/cli/parsers/monitor_parser.py +12 -2
- claude_mpm/cli/parsers/mpm_init_parser.py +179 -9
- claude_mpm/cli/parsers/run_parser.py +5 -0
- claude_mpm/cli/parsers/search_parser.py +245 -0
- claude_mpm/cli/parsers/skill_source_parser.py +169 -0
- claude_mpm/cli/parsers/skills_parser.py +282 -0
- claude_mpm/cli/parsers/source_parser.py +138 -0
- claude_mpm/cli/shared/argument_patterns.py +20 -13
- claude_mpm/cli/shared/base_command.py +2 -2
- claude_mpm/cli/shared/output_formatters.py +28 -19
- claude_mpm/cli/startup.py +994 -0
- claude_mpm/cli/startup_display.py +480 -0
- claude_mpm/cli/startup_logging.py +179 -13
- claude_mpm/cli/utils.py +54 -3
- claude_mpm/cli_module/commands.py +1 -1
- claude_mpm/commands/mpm-agents-auto-configure.md +278 -0
- claude_mpm/commands/mpm-agents-detect.md +177 -0
- claude_mpm/commands/mpm-agents-list.md +131 -0
- claude_mpm/commands/mpm-agents-recommend.md +223 -0
- claude_mpm/commands/mpm-config-view.md +150 -0
- claude_mpm/commands/mpm-doctor.md +9 -0
- claude_mpm/commands/mpm-help.md +297 -5
- claude_mpm/commands/mpm-init.md +401 -17
- claude_mpm/commands/mpm-monitor.md +418 -0
- claude_mpm/commands/mpm-postmortem.md +123 -0
- claude_mpm/commands/mpm-session-resume.md +381 -0
- claude_mpm/commands/mpm-status.md +79 -8
- claude_mpm/commands/mpm-ticket-organize.md +304 -0
- claude_mpm/commands/mpm-ticket-view.md +552 -0
- claude_mpm/commands/mpm-version.md +122 -0
- claude_mpm/commands/mpm.md +12 -0
- claude_mpm/config/agent_config.py +4 -4
- claude_mpm/config/agent_presets.py +488 -0
- claude_mpm/config/agent_sources.py +325 -0
- claude_mpm/config/experimental_features.py +7 -7
- claude_mpm/config/model_config.py +428 -0
- claude_mpm/config/paths.py +3 -2
- claude_mpm/config/skill_presets.py +392 -0
- claude_mpm/config/skill_sources.py +590 -0
- claude_mpm/config/socketio_config.py +3 -3
- claude_mpm/constants.py +28 -1
- claude_mpm/core/__init__.py +53 -17
- claude_mpm/core/agent_name_normalizer.py +3 -2
- claude_mpm/core/agent_registry.py +2 -2
- claude_mpm/core/agent_session_manager.py +10 -10
- claude_mpm/core/api_validator.py +330 -0
- claude_mpm/core/base_service.py +33 -23
- claude_mpm/core/cache.py +9 -9
- claude_mpm/core/claude_runner.py +24 -42
- claude_mpm/core/config.py +101 -8
- claude_mpm/core/config_aliases.py +7 -6
- claude_mpm/core/constants.py +66 -1
- claude_mpm/core/container.py +11 -5
- claude_mpm/core/enums.py +452 -0
- claude_mpm/core/error_handler.py +623 -0
- claude_mpm/core/factories.py +1 -1
- claude_mpm/core/file_utils.py +764 -0
- claude_mpm/core/framework/__init__.py +25 -0
- claude_mpm/core/framework/formatters/__init__.py +11 -0
- claude_mpm/core/framework/formatters/capability_generator.py +367 -0
- claude_mpm/core/framework/formatters/content_formatter.py +288 -0
- claude_mpm/core/framework/formatters/context_generator.py +185 -0
- claude_mpm/core/framework/loaders/__init__.py +13 -0
- claude_mpm/core/framework/loaders/agent_loader.py +210 -0
- claude_mpm/core/framework/loaders/file_loader.py +176 -0
- claude_mpm/core/framework/loaders/instruction_loader.py +181 -0
- claude_mpm/core/framework/loaders/packaged_loader.py +232 -0
- claude_mpm/core/framework/processors/__init__.py +11 -0
- claude_mpm/core/framework/processors/memory_processor.py +230 -0
- claude_mpm/core/framework/processors/metadata_processor.py +146 -0
- claude_mpm/core/framework/processors/template_processor.py +244 -0
- claude_mpm/core/framework_loader.py +321 -1631
- claude_mpm/core/hook_error_memory.py +381 -0
- claude_mpm/core/hook_manager.py +49 -8
- claude_mpm/core/injectable_service.py +11 -8
- claude_mpm/core/instruction_reinforcement_hook.py +4 -3
- claude_mpm/core/interactive_session.py +146 -18
- claude_mpm/core/interfaces.py +56 -1
- claude_mpm/core/lazy.py +3 -3
- claude_mpm/core/log_manager.py +92 -23
- claude_mpm/core/logger.py +22 -15
- claude_mpm/core/logging_config.py +6 -2
- claude_mpm/core/logging_utils.py +520 -0
- claude_mpm/core/oneshot_session.py +122 -15
- claude_mpm/core/optimized_agent_loader.py +9 -9
- claude_mpm/core/optimized_startup.py +1 -1
- claude_mpm/core/output_style_manager.py +12 -192
- claude_mpm/core/pm_hook_interceptor.py +18 -12
- claude_mpm/core/protocols/__init__.py +23 -0
- claude_mpm/core/protocols/runner_protocol.py +103 -0
- claude_mpm/core/protocols/session_protocol.py +131 -0
- claude_mpm/core/service_registry.py +7 -3
- claude_mpm/core/session_manager.py +14 -12
- claude_mpm/core/shared/config_loader.py +1 -1
- claude_mpm/core/shared/singleton_manager.py +11 -4
- claude_mpm/core/socketio_pool.py +15 -15
- claude_mpm/core/system_context.py +38 -0
- claude_mpm/core/tool_access_control.py +3 -2
- claude_mpm/core/types.py +4 -11
- claude_mpm/core/typing_utils.py +7 -6
- claude_mpm/core/unified_agent_registry.py +115 -11
- claude_mpm/core/unified_config.py +6 -6
- claude_mpm/core/unified_paths.py +23 -20
- claude_mpm/dashboard/analysis_runner.py +4 -4
- claude_mpm/dashboard/api/simple_directory.py +261 -0
- claude_mpm/dashboard/static/css/activity.css +69 -69
- claude_mpm/dashboard/static/css/connection-status.css +10 -10
- claude_mpm/dashboard/static/css/dashboard.css +600 -18
- claude_mpm/dashboard/static/js/components/activity-tree.js +181 -195
- claude_mpm/dashboard/static/js/components/agent-hierarchy.js +105 -102
- claude_mpm/dashboard/static/js/components/agent-inference.js +34 -31
- claude_mpm/dashboard/static/js/components/build-tracker.js +67 -59
- claude_mpm/dashboard/static/js/components/code-simple.js +857 -0
- claude_mpm/dashboard/static/js/components/connection-debug.js +101 -101
- claude_mpm/dashboard/static/js/components/diff-viewer.js +891 -0
- claude_mpm/dashboard/static/js/components/event-processor.js +3 -0
- claude_mpm/dashboard/static/js/components/event-viewer.js +50 -13
- claude_mpm/dashboard/static/js/components/export-manager.js +3 -0
- claude_mpm/dashboard/static/js/components/file-change-tracker.js +443 -0
- claude_mpm/dashboard/static/js/components/file-change-viewer.js +690 -0
- claude_mpm/dashboard/static/js/components/file-tool-tracker.js +36 -16
- claude_mpm/dashboard/static/js/components/file-viewer.js +580 -0
- claude_mpm/dashboard/static/js/components/module-viewer.js +49 -23
- claude_mpm/dashboard/static/js/components/session-manager.js +19 -19
- claude_mpm/dashboard/static/js/components/socket-manager.js +5 -1
- claude_mpm/dashboard/static/js/components/ui-state-manager.js +356 -41
- claude_mpm/dashboard/static/js/components/unified-data-viewer.js +520 -88
- claude_mpm/dashboard/static/js/components/working-directory.js +46 -11
- claude_mpm/dashboard/static/js/connection-manager.js +76 -76
- claude_mpm/dashboard/static/js/dashboard.js +309 -178
- claude_mpm/dashboard/static/js/extension-error-handler.js +22 -22
- claude_mpm/dashboard/static/js/socket-client.js +183 -139
- claude_mpm/dashboard/static/js/tab-isolation-fix.js +185 -0
- claude_mpm/dashboard/static/socket.io.min.js +7 -0
- claude_mpm/dashboard/static/socket.io.v4.8.1.backup.js +7 -0
- claude_mpm/dashboard/templates/code_simple.html +153 -0
- claude_mpm/dashboard/templates/index.html +125 -122
- claude_mpm/experimental/cli_enhancements.py +5 -7
- claude_mpm/generators/agent_profile_generator.py +5 -3
- claude_mpm/hooks/__init__.py +37 -1
- claude_mpm/hooks/base_hook.py +5 -4
- claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/connection_pool.py +4 -4
- claude_mpm/hooks/claude_hooks/event_handlers.py +24 -19
- claude_mpm/hooks/claude_hooks/hook_handler.py +29 -22
- claude_mpm/hooks/claude_hooks/installer.py +67 -22
- claude_mpm/hooks/claude_hooks/memory_integration.py +3 -3
- claude_mpm/hooks/claude_hooks/response_tracking.py +57 -17
- claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-313.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/connection_manager.py +62 -64
- claude_mpm/hooks/claude_hooks/services/connection_manager_http.py +140 -76
- claude_mpm/hooks/claude_hooks/services/state_manager.py +11 -9
- claude_mpm/hooks/claude_hooks/services/subagent_processor.py +3 -3
- claude_mpm/hooks/failure_learning/__init__.py +54 -0
- claude_mpm/hooks/failure_learning/failure_detection_hook.py +230 -0
- claude_mpm/hooks/failure_learning/fix_detection_hook.py +212 -0
- claude_mpm/hooks/failure_learning/learning_extraction_hook.py +281 -0
- claude_mpm/hooks/instruction_reinforcement.py +301 -0
- claude_mpm/hooks/kuzu_enrichment_hook.py +263 -0
- claude_mpm/hooks/kuzu_memory_hook.py +386 -0
- claude_mpm/hooks/kuzu_response_hook.py +179 -0
- claude_mpm/hooks/memory_integration_hook.py +1 -1
- claude_mpm/hooks/session_resume_hook.py +121 -0
- claude_mpm/hooks/templates/pre_tool_use_simple.py +78 -0
- claude_mpm/hooks/templates/pre_tool_use_template.py +323 -0
- claude_mpm/hooks/tool_call_interceptor.py +8 -5
- claude_mpm/hooks/validation_hooks.py +3 -3
- claude_mpm/init.py +23 -4
- claude_mpm/models/agent_session.py +8 -6
- claude_mpm/models/git_repository.py +198 -0
- claude_mpm/models/resume_log.py +340 -0
- claude_mpm/scripts/claude-hook-handler.sh +35 -9
- claude_mpm/scripts/launch_monitor.py +85 -0
- claude_mpm/scripts/mcp_server.py +3 -5
- claude_mpm/scripts/mpm_doctor.py +3 -2
- claude_mpm/scripts/socketio_daemon.py +159 -512
- claude_mpm/scripts/start_activity_logging.py +3 -1
- claude_mpm/services/__init__.py +144 -160
- claude_mpm/services/agents/__init__.py +18 -5
- claude_mpm/services/agents/agent_builder.py +56 -18
- claude_mpm/services/agents/agent_preset_service.py +238 -0
- claude_mpm/services/agents/agent_selection_service.py +484 -0
- claude_mpm/services/agents/auto_config_manager.py +796 -0
- claude_mpm/services/agents/auto_deploy_index_parser.py +569 -0
- claude_mpm/services/agents/cache_git_manager.py +621 -0
- claude_mpm/services/agents/deployment/agent_configuration_manager.py +1 -1
- claude_mpm/services/agents/deployment/agent_deployment.py +164 -17
- claude_mpm/services/agents/deployment/agent_discovery_service.py +191 -41
- claude_mpm/services/agents/deployment/agent_filesystem_manager.py +5 -5
- claude_mpm/services/agents/deployment/agent_format_converter.py +56 -12
- claude_mpm/services/agents/deployment/agent_lifecycle_manager.py +5 -7
- claude_mpm/services/agents/deployment/agent_metrics_collector.py +3 -3
- claude_mpm/services/agents/deployment/agent_operation_service.py +2 -2
- claude_mpm/services/agents/deployment/agent_record_service.py +4 -4
- claude_mpm/services/agents/deployment/agent_restore_handler.py +1 -4
- claude_mpm/services/agents/deployment/agent_state_service.py +2 -2
- claude_mpm/services/agents/deployment/agent_template_builder.py +939 -50
- claude_mpm/services/agents/deployment/agent_validator.py +31 -7
- claude_mpm/services/agents/deployment/agent_version_manager.py +8 -5
- claude_mpm/services/agents/deployment/agent_versioning.py +1 -1
- claude_mpm/services/agents/deployment/agents_directory_resolver.py +101 -15
- claude_mpm/services/agents/deployment/async_agent_deployment.py +3 -2
- claude_mpm/services/agents/deployment/deployment_config_loader.py +131 -7
- claude_mpm/services/agents/deployment/deployment_type_detector.py +10 -14
- claude_mpm/services/agents/deployment/deployment_wrapper.py +58 -0
- claude_mpm/services/agents/deployment/facade/deployment_facade.py +3 -3
- claude_mpm/services/agents/deployment/interface_adapter.py +3 -2
- claude_mpm/services/agents/deployment/local_template_deployment.py +360 -0
- claude_mpm/services/agents/deployment/multi_source_deployment_service.py +249 -53
- claude_mpm/services/agents/deployment/pipeline/pipeline_executor.py +2 -2
- claude_mpm/services/agents/deployment/pipeline/steps/agent_processing_step.py +8 -7
- claude_mpm/services/agents/deployment/pipeline/steps/base_step.py +7 -16
- claude_mpm/services/agents/deployment/pipeline/steps/configuration_step.py +4 -3
- claude_mpm/services/agents/deployment/pipeline/steps/target_directory_step.py +7 -5
- claude_mpm/services/agents/deployment/pipeline/steps/validation_step.py +6 -5
- claude_mpm/services/agents/deployment/refactored_agent_deployment_service.py +10 -10
- claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +363 -0
- claude_mpm/services/agents/deployment/single_agent_deployer.py +2 -2
- claude_mpm/services/agents/deployment/system_instructions_deployer.py +168 -43
- claude_mpm/services/agents/deployment/validation/__init__.py +3 -1
- claude_mpm/services/agents/deployment/validation/deployment_validator.py +2 -2
- claude_mpm/services/agents/deployment/validation/template_validator.py +64 -44
- claude_mpm/services/agents/deployment/validation/validation_result.py +1 -9
- claude_mpm/services/agents/git_source_manager.py +629 -0
- claude_mpm/services/agents/loading/agent_profile_loader.py +10 -9
- claude_mpm/services/agents/loading/base_agent_manager.py +16 -6
- claude_mpm/services/agents/loading/framework_agent_loader.py +11 -14
- claude_mpm/services/agents/local_template_manager.py +784 -0
- claude_mpm/services/agents/management/agent_capabilities_generator.py +3 -2
- claude_mpm/services/agents/management/agent_management_service.py +5 -5
- claude_mpm/services/agents/memory/agent_memory_manager.py +32 -29
- claude_mpm/services/agents/memory/content_manager.py +17 -9
- claude_mpm/services/agents/memory/memory_categorization_service.py +4 -2
- claude_mpm/services/agents/memory/memory_file_service.py +32 -6
- claude_mpm/services/agents/memory/memory_format_service.py +6 -4
- claude_mpm/services/agents/memory/memory_limits_service.py +4 -2
- claude_mpm/services/agents/memory/template_generator.py +3 -3
- claude_mpm/services/agents/observers.py +547 -0
- claude_mpm/services/agents/recommender.py +615 -0
- claude_mpm/services/agents/registry/deployed_agent_discovery.py +3 -3
- claude_mpm/services/agents/registry/modification_tracker.py +30 -19
- claude_mpm/services/agents/single_tier_deployment_service.py +696 -0
- claude_mpm/services/agents/sources/__init__.py +13 -0
- claude_mpm/services/agents/sources/agent_sync_state.py +516 -0
- claude_mpm/services/agents/sources/git_source_sync_service.py +1087 -0
- claude_mpm/services/agents/startup_sync.py +239 -0
- claude_mpm/services/agents/toolchain_detector.py +474 -0
- claude_mpm/services/analysis/__init__.py +25 -0
- claude_mpm/services/analysis/postmortem_reporter.py +474 -0
- claude_mpm/services/analysis/postmortem_service.py +765 -0
- claude_mpm/services/async_session_logger.py +141 -98
- claude_mpm/services/claude_session_logger.py +82 -74
- claude_mpm/services/cli/agent_cleanup_service.py +5 -0
- claude_mpm/services/cli/agent_listing_service.py +5 -5
- claude_mpm/services/cli/agent_validation_service.py +3 -1
- claude_mpm/services/cli/memory_crud_service.py +12 -7
- claude_mpm/services/cli/memory_output_formatter.py +2 -2
- claude_mpm/services/cli/resume_service.py +617 -0
- claude_mpm/services/cli/session_manager.py +104 -13
- claude_mpm/services/cli/session_pause_manager.py +504 -0
- claude_mpm/services/cli/session_resume_helper.py +372 -0
- claude_mpm/services/cli/startup_checker.py +13 -10
- claude_mpm/services/cli/unified_dashboard_manager.py +439 -0
- claude_mpm/services/command_deployment_service.py +209 -13
- claude_mpm/services/command_handler_service.py +11 -5
- claude_mpm/services/core/__init__.py +33 -1
- claude_mpm/services/core/base.py +31 -11
- claude_mpm/services/core/interfaces/__init__.py +88 -3
- claude_mpm/services/core/interfaces/agent.py +184 -0
- claude_mpm/services/core/interfaces/health.py +169 -0
- claude_mpm/services/core/interfaces/model.py +281 -0
- claude_mpm/services/core/interfaces/process.py +372 -0
- claude_mpm/services/core/interfaces/project.py +121 -0
- claude_mpm/services/core/interfaces/restart.py +307 -0
- claude_mpm/services/core/interfaces/stability.py +260 -0
- claude_mpm/services/core/interfaces.py +56 -1
- claude_mpm/services/core/memory_manager.py +92 -47
- claude_mpm/services/core/models/__init__.py +70 -0
- claude_mpm/services/core/models/agent_config.py +384 -0
- claude_mpm/services/core/models/health.py +162 -0
- claude_mpm/services/core/models/process.py +239 -0
- claude_mpm/services/core/models/restart.py +302 -0
- claude_mpm/services/core/models/stability.py +264 -0
- claude_mpm/services/core/models/toolchain.py +306 -0
- claude_mpm/services/core/path_resolver.py +36 -14
- claude_mpm/services/diagnostics/__init__.py +2 -2
- claude_mpm/services/diagnostics/checks/__init__.py +8 -2
- claude_mpm/services/diagnostics/checks/agent_check.py +30 -34
- claude_mpm/services/diagnostics/checks/agent_sources_check.py +577 -0
- claude_mpm/services/diagnostics/checks/claude_code_check.py +270 -0
- claude_mpm/services/diagnostics/checks/common_issues_check.py +28 -27
- claude_mpm/services/diagnostics/checks/configuration_check.py +26 -25
- claude_mpm/services/diagnostics/checks/filesystem_check.py +18 -17
- claude_mpm/services/diagnostics/checks/installation_check.py +165 -60
- claude_mpm/services/diagnostics/checks/instructions_check.py +21 -21
- claude_mpm/services/diagnostics/checks/mcp_check.py +57 -44
- claude_mpm/services/diagnostics/checks/mcp_services_check.py +1058 -0
- claude_mpm/services/diagnostics/checks/monitor_check.py +24 -24
- claude_mpm/services/diagnostics/checks/skill_sources_check.py +587 -0
- claude_mpm/services/diagnostics/checks/startup_log_check.py +14 -11
- claude_mpm/services/diagnostics/diagnostic_runner.py +31 -13
- claude_mpm/services/diagnostics/doctor_reporter.py +305 -47
- claude_mpm/services/diagnostics/models.py +37 -21
- claude_mpm/services/event_aggregator.py +5 -3
- claude_mpm/services/event_bus/direct_relay.py +11 -7
- claude_mpm/services/event_bus/event_bus.py +51 -9
- claude_mpm/services/event_bus/relay.py +33 -14
- claude_mpm/services/events/consumers/dead_letter.py +7 -5
- claude_mpm/services/events/consumers/logging.py +1 -2
- claude_mpm/services/events/core.py +5 -6
- claude_mpm/services/events/producers/hook.py +6 -6
- claude_mpm/services/events/producers/system.py +8 -8
- claude_mpm/services/exceptions.py +5 -5
- claude_mpm/services/framework_claude_md_generator/__init__.py +1 -1
- claude_mpm/services/framework_claude_md_generator/content_assembler.py +5 -5
- claude_mpm/services/framework_claude_md_generator/content_validator.py +2 -2
- claude_mpm/services/framework_claude_md_generator/deployment_manager.py +3 -3
- claude_mpm/services/framework_claude_md_generator/section_generators/__init__.py +2 -2
- claude_mpm/services/framework_claude_md_generator/version_manager.py +1 -1
- claude_mpm/services/git/__init__.py +21 -0
- claude_mpm/services/git/git_operations_service.py +494 -0
- claude_mpm/services/github/__init__.py +21 -0
- claude_mpm/services/github/github_cli_service.py +397 -0
- claude_mpm/services/hook_installer_service.py +506 -0
- claude_mpm/services/hook_service.py +5 -6
- claude_mpm/services/infrastructure/context_preservation.py +13 -11
- claude_mpm/services/infrastructure/daemon_manager.py +9 -9
- claude_mpm/services/infrastructure/logging.py +2 -2
- claude_mpm/services/infrastructure/monitoring/__init__.py +2 -6
- claude_mpm/services/infrastructure/monitoring/aggregator.py +13 -18
- claude_mpm/services/infrastructure/monitoring/base.py +5 -13
- claude_mpm/services/infrastructure/monitoring/network.py +7 -6
- claude_mpm/services/infrastructure/monitoring/process.py +13 -12
- claude_mpm/services/infrastructure/monitoring/resources.py +8 -7
- claude_mpm/services/infrastructure/monitoring/service.py +16 -15
- claude_mpm/services/infrastructure/resume_log_generator.py +439 -0
- claude_mpm/services/instructions/__init__.py +9 -0
- claude_mpm/services/instructions/instruction_cache_service.py +374 -0
- claude_mpm/services/local_ops/__init__.py +155 -0
- claude_mpm/services/local_ops/crash_detector.py +257 -0
- claude_mpm/services/local_ops/health_checks/__init__.py +26 -0
- claude_mpm/services/local_ops/health_checks/http_check.py +224 -0
- claude_mpm/services/local_ops/health_checks/process_check.py +236 -0
- claude_mpm/services/local_ops/health_checks/resource_check.py +255 -0
- claude_mpm/services/local_ops/health_manager.py +427 -0
- claude_mpm/services/local_ops/log_monitor.py +396 -0
- claude_mpm/services/local_ops/memory_leak_detector.py +294 -0
- claude_mpm/services/local_ops/process_manager.py +595 -0
- claude_mpm/services/local_ops/resource_monitor.py +331 -0
- claude_mpm/services/local_ops/restart_manager.py +401 -0
- claude_mpm/services/local_ops/restart_policy.py +387 -0
- claude_mpm/services/local_ops/state_manager.py +372 -0
- claude_mpm/services/local_ops/unified_manager.py +600 -0
- claude_mpm/services/mcp_config_manager.py +1542 -0
- claude_mpm/services/mcp_gateway/__init__.py +97 -93
- claude_mpm/services/mcp_gateway/auto_configure.py +43 -38
- claude_mpm/services/mcp_gateway/config/config_loader.py +3 -3
- claude_mpm/services/mcp_gateway/config/configuration.py +24 -5
- claude_mpm/services/mcp_gateway/core/__init__.py +1 -2
- claude_mpm/services/mcp_gateway/core/base.py +20 -33
- claude_mpm/services/mcp_gateway/core/process_pool.py +591 -31
- claude_mpm/services/mcp_gateway/core/singleton_manager.py +2 -2
- claude_mpm/services/mcp_gateway/core/startup_verification.py +3 -3
- claude_mpm/services/mcp_gateway/main.py +90 -15
- claude_mpm/services/mcp_gateway/registry/service_registry.py +4 -2
- claude_mpm/services/mcp_gateway/registry/tool_registry.py +12 -9
- claude_mpm/services/mcp_gateway/server/mcp_gateway.py +5 -10
- claude_mpm/services/mcp_gateway/server/stdio_server.py +9 -17
- claude_mpm/services/mcp_gateway/tools/__init__.py +14 -2
- claude_mpm/services/mcp_gateway/tools/base_adapter.py +15 -15
- claude_mpm/services/mcp_gateway/tools/document_summarizer.py +10 -9
- claude_mpm/services/mcp_gateway/tools/external_mcp_services.py +654 -0
- claude_mpm/services/mcp_gateway/tools/health_check_tool.py +36 -34
- claude_mpm/services/mcp_gateway/tools/hello_world.py +8 -8
- claude_mpm/services/mcp_gateway/tools/kuzu_memory_service.py +555 -0
- claude_mpm/services/mcp_gateway/utils/__init__.py +14 -0
- claude_mpm/services/mcp_gateway/utils/package_version_checker.py +160 -0
- claude_mpm/services/mcp_gateway/utils/update_preferences.py +170 -0
- claude_mpm/services/mcp_service_verifier.py +732 -0
- claude_mpm/services/memory/builder.py +9 -8
- claude_mpm/services/memory/cache/shared_prompt_cache.py +2 -1
- claude_mpm/services/memory/cache/simple_cache.py +2 -2
- claude_mpm/services/memory/failure_tracker.py +578 -0
- claude_mpm/services/memory/indexed_memory.py +8 -8
- claude_mpm/services/memory/optimizer.py +8 -9
- claude_mpm/services/memory/router.py +3 -3
- claude_mpm/services/memory_hook_service.py +165 -4
- claude_mpm/services/model/__init__.py +147 -0
- claude_mpm/services/model/base_provider.py +365 -0
- claude_mpm/services/model/claude_provider.py +412 -0
- claude_mpm/services/model/model_router.py +452 -0
- claude_mpm/services/model/ollama_provider.py +415 -0
- claude_mpm/services/monitor/__init__.py +20 -0
- claude_mpm/services/monitor/daemon.py +691 -0
- claude_mpm/services/monitor/daemon_manager.py +1040 -0
- claude_mpm/services/monitor/event_emitter.py +350 -0
- claude_mpm/services/monitor/handlers/__init__.py +21 -0
- claude_mpm/services/monitor/handlers/code_analysis.py +332 -0
- claude_mpm/services/monitor/handlers/dashboard.py +299 -0
- claude_mpm/services/monitor/handlers/file.py +264 -0
- claude_mpm/services/monitor/handlers/hooks.py +512 -0
- claude_mpm/services/monitor/management/__init__.py +18 -0
- claude_mpm/services/monitor/management/health.py +124 -0
- claude_mpm/services/monitor/management/lifecycle.py +724 -0
- claude_mpm/services/monitor/server.py +817 -0
- claude_mpm/services/monitor_build_service.py +2 -2
- claude_mpm/services/native_agent_converter.py +356 -0
- claude_mpm/services/orphan_detection.py +786 -0
- claude_mpm/services/port_manager.py +3 -3
- claude_mpm/services/pr/__init__.py +14 -0
- claude_mpm/services/pr/pr_template_service.py +329 -0
- claude_mpm/services/project/__init__.py +23 -0
- claude_mpm/services/project/analyzer.py +3 -3
- claude_mpm/services/project/architecture_analyzer.py +5 -5
- claude_mpm/services/project/archive_manager.py +1045 -0
- claude_mpm/services/project/dependency_analyzer.py +4 -4
- claude_mpm/services/project/detection_strategies.py +719 -0
- claude_mpm/services/project/documentation_manager.py +554 -0
- claude_mpm/services/project/enhanced_analyzer.py +572 -0
- claude_mpm/services/project/metrics_collector.py +4 -4
- claude_mpm/services/project/project_organizer.py +1005 -0
- claude_mpm/services/project/registry.py +13 -7
- claude_mpm/services/project/toolchain_analyzer.py +583 -0
- claude_mpm/services/project_port_allocator.py +596 -0
- claude_mpm/services/response_tracker.py +21 -10
- claude_mpm/services/runner_configuration_service.py +17 -3
- claude_mpm/services/self_upgrade_service.py +500 -0
- claude_mpm/services/session_management_service.py +23 -9
- claude_mpm/services/session_manager.py +380 -0
- claude_mpm/services/shared/__init__.py +2 -1
- claude_mpm/services/shared/async_service_base.py +16 -27
- claude_mpm/services/shared/config_service_base.py +17 -14
- claude_mpm/services/shared/lifecycle_service_base.py +1 -14
- claude_mpm/services/shared/service_factory.py +8 -5
- claude_mpm/services/skills/__init__.py +18 -0
- claude_mpm/services/skills/git_skill_source_manager.py +1169 -0
- claude_mpm/services/skills/skill_discovery_service.py +568 -0
- claude_mpm/services/skills_config.py +547 -0
- claude_mpm/services/skills_deployer.py +955 -0
- claude_mpm/services/socketio/client_proxy.py +60 -5
- claude_mpm/services/socketio/dashboard_server.py +361 -0
- claude_mpm/services/socketio/event_normalizer.py +10 -6
- claude_mpm/services/socketio/handlers/__init__.py +5 -2
- claude_mpm/services/socketio/handlers/base.py +2 -2
- claude_mpm/services/socketio/handlers/code_analysis.py +90 -27
- claude_mpm/services/socketio/handlers/connection.py +22 -41
- claude_mpm/services/socketio/handlers/connection_handler.py +13 -10
- claude_mpm/services/socketio/handlers/file.py +46 -10
- claude_mpm/services/socketio/handlers/git.py +9 -9
- claude_mpm/services/socketio/handlers/hook.py +29 -17
- claude_mpm/services/socketio/handlers/registry.py +4 -2
- claude_mpm/services/socketio/monitor_client.py +364 -0
- claude_mpm/services/socketio/server/broadcaster.py +9 -7
- claude_mpm/services/socketio/server/connection_manager.py +2 -2
- claude_mpm/services/socketio/server/core.py +142 -8
- claude_mpm/services/socketio/server/eventbus_integration.py +20 -14
- claude_mpm/services/socketio/server/main.py +24 -24
- claude_mpm/services/socketio_client_manager.py +4 -4
- claude_mpm/services/subprocess_launcher_service.py +19 -15
- claude_mpm/services/system_instructions_service.py +3 -5
- claude_mpm/services/ticket_services/formatter_service.py +1 -1
- claude_mpm/services/ticket_services/validation_service.py +5 -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 +518 -0
- claude_mpm/services/unified/analyzer_strategies/dependency_analyzer.py +680 -0
- claude_mpm/services/unified/analyzer_strategies/performance_analyzer.py +900 -0
- claude_mpm/services/unified/analyzer_strategies/security_analyzer.py +745 -0
- claude_mpm/services/unified/analyzer_strategies/structure_analyzer.py +733 -0
- claude_mpm/services/unified/config_strategies/__init__.py +175 -0
- claude_mpm/services/unified/config_strategies/config_schema.py +731 -0
- claude_mpm/services/unified/config_strategies/context_strategy.py +747 -0
- claude_mpm/services/unified/config_strategies/error_handling_strategy.py +1005 -0
- claude_mpm/services/unified/config_strategies/file_loader_strategy.py +881 -0
- claude_mpm/services/unified/config_strategies/unified_config_service.py +823 -0
- claude_mpm/services/unified/config_strategies/validation_strategy.py +1148 -0
- claude_mpm/services/unified/deployment_strategies/__init__.py +97 -0
- claude_mpm/services/unified/deployment_strategies/base.py +553 -0
- claude_mpm/services/unified/deployment_strategies/cloud_strategies.py +573 -0
- claude_mpm/services/unified/deployment_strategies/local.py +607 -0
- claude_mpm/services/unified/deployment_strategies/utils.py +667 -0
- claude_mpm/services/unified/deployment_strategies/vercel.py +471 -0
- claude_mpm/services/unified/interfaces.py +475 -0
- claude_mpm/services/unified/migration.py +509 -0
- claude_mpm/services/unified/strategies.py +534 -0
- claude_mpm/services/unified/unified_analyzer.py +542 -0
- claude_mpm/services/unified/unified_config.py +691 -0
- claude_mpm/services/unified/unified_deployment.py +466 -0
- claude_mpm/services/utility_service.py +6 -3
- claude_mpm/services/version_control/branch_strategy.py +2 -2
- claude_mpm/services/version_control/conflict_resolution.py +14 -8
- claude_mpm/services/version_control/git_operations.py +26 -24
- claude_mpm/services/version_control/semantic_versioning.py +14 -14
- claude_mpm/services/version_control/version_parser.py +14 -11
- claude_mpm/services/version_service.py +104 -1
- claude_mpm/services/visualization/__init__.py +1 -5
- claude_mpm/services/visualization/mermaid_generator.py +2 -3
- claude_mpm/skills/__init__.py +42 -0
- claude_mpm/skills/agent_skills_injector.py +324 -0
- claude_mpm/skills/bundled/LICENSE_ATTRIBUTIONS.md +79 -0
- claude_mpm/skills/bundled/__init__.py +6 -0
- claude_mpm/skills/bundled/api-documentation.md +393 -0
- claude_mpm/skills/bundled/async-testing.md +571 -0
- claude_mpm/skills/bundled/code-review.md +143 -0
- claude_mpm/skills/bundled/database-migration.md +199 -0
- claude_mpm/skills/bundled/docker-containerization.md +194 -0
- claude_mpm/skills/bundled/express-local-dev.md +1429 -0
- claude_mpm/skills/bundled/fastapi-local-dev.md +1199 -0
- claude_mpm/skills/bundled/git-workflow.md +414 -0
- claude_mpm/skills/bundled/imagemagick.md +204 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/scripts/validate_env.py +576 -0
- claude_mpm/skills/bundled/json-data-handling.md +223 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/connections.py +157 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/evaluation.py +425 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/init_skill.py +303 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/package_skill.py +113 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/quick_validate.py +72 -0
- claude_mpm/skills/bundled/nextjs-local-dev.md +807 -0
- claude_mpm/skills/bundled/pdf.md +141 -0
- claude_mpm/skills/bundled/performance-profiling.md +573 -0
- claude_mpm/skills/bundled/refactoring-patterns.md +180 -0
- claude_mpm/skills/bundled/security-scanning.md +327 -0
- claude_mpm/skills/bundled/systematic-debugging.md +473 -0
- claude_mpm/skills/bundled/test-driven-development.md +378 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/console_logging.py +35 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/element_discovery.py +44 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/static_html_automation.py +34 -0
- claude_mpm/skills/bundled/testing/webapp-testing/scripts/with_server.py +129 -0
- claude_mpm/skills/bundled/vite-local-dev.md +1061 -0
- claude_mpm/skills/bundled/web-performance-optimization.md +2305 -0
- claude_mpm/skills/bundled/xlsx.md +157 -0
- claude_mpm/skills/registry.py +286 -0
- claude_mpm/skills/skill_manager.py +310 -0
- claude_mpm/skills/skills_registry.py +347 -0
- claude_mpm/skills/skills_service.py +739 -0
- claude_mpm/storage/state_storage.py +31 -31
- claude_mpm/templates/questions/__init__.py +38 -0
- claude_mpm/templates/questions/base.py +193 -0
- claude_mpm/templates/questions/pr_strategy.py +311 -0
- claude_mpm/templates/questions/project_init.py +385 -0
- claude_mpm/templates/questions/ticket_mgmt.py +394 -0
- claude_mpm/tools/__main__.py +9 -9
- claude_mpm/tools/code_tree_analyzer/__init__.py +45 -0
- claude_mpm/tools/code_tree_analyzer/analysis.py +299 -0
- claude_mpm/tools/code_tree_analyzer/cache.py +131 -0
- claude_mpm/tools/code_tree_analyzer/core.py +380 -0
- claude_mpm/tools/code_tree_analyzer/discovery.py +403 -0
- claude_mpm/tools/code_tree_analyzer/events.py +168 -0
- claude_mpm/tools/code_tree_analyzer/gitignore.py +308 -0
- claude_mpm/tools/code_tree_analyzer/models.py +39 -0
- claude_mpm/tools/code_tree_analyzer/multilang_analyzer.py +224 -0
- claude_mpm/tools/code_tree_analyzer/python_analyzer.py +284 -0
- claude_mpm/tools/code_tree_builder.py +6 -6
- claude_mpm/tools/code_tree_events.py +14 -10
- claude_mpm/tools/socketio_debug.py +11 -11
- claude_mpm/utils/agent_dependency_loader.py +184 -36
- claude_mpm/utils/agent_filters.py +288 -0
- claude_mpm/utils/common.py +544 -0
- claude_mpm/utils/config_manager.py +12 -6
- claude_mpm/utils/database_connector.py +298 -0
- claude_mpm/utils/dependency_cache.py +5 -3
- claude_mpm/utils/dependency_strategies.py +15 -10
- claude_mpm/utils/display_helper.py +260 -0
- claude_mpm/utils/environment_context.py +4 -3
- claude_mpm/utils/error_handler.py +5 -3
- claude_mpm/utils/file_utils.py +13 -14
- claude_mpm/utils/git_analyzer.py +407 -0
- claude_mpm/utils/gitignore.py +241 -0
- claude_mpm/utils/log_cleanup.py +627 -0
- claude_mpm/utils/migration.py +372 -0
- claude_mpm/utils/path_operations.py +7 -4
- claude_mpm/utils/progress.py +387 -0
- claude_mpm/utils/robust_installer.py +131 -24
- claude_mpm/utils/session_logging.py +2 -2
- claude_mpm/utils/structured_questions.py +619 -0
- claude_mpm/utils/subprocess_utils.py +9 -8
- claude_mpm/validation/agent_validator.py +6 -6
- claude_mpm/validation/frontmatter_validator.py +6 -6
- claude_mpm-5.0.9.dist-info/METADATA +1028 -0
- claude_mpm-5.0.9.dist-info/RECORD +864 -0
- {claude_mpm-4.1.26.dist-info → claude_mpm-5.0.9.dist-info}/entry_points.txt +1 -0
- claude_mpm/agents/INSTRUCTIONS.md +0 -261
- claude_mpm/agents/templates/.claude-mpm/memories/README.md +0 -17
- claude_mpm/agents/templates/.claude-mpm/memories/engineer_memories.md +0 -3
- claude_mpm/agents/templates/agent-manager.json +0 -270
- claude_mpm/agents/templates/agent-manager.md +0 -619
- claude_mpm/agents/templates/agentic_coder_optimizer.json +0 -222
- claude_mpm/agents/templates/api_qa.json +0 -171
- claude_mpm/agents/templates/code_analyzer.json +0 -95
- claude_mpm/agents/templates/data_engineer.json +0 -152
- claude_mpm/agents/templates/documentation.json +0 -175
- claude_mpm/agents/templates/engineer.json +0 -176
- claude_mpm/agents/templates/imagemagick.json +0 -261
- claude_mpm/agents/templates/logs/prompts/agent_engineer_20250826_014258_728.md +0 -39
- claude_mpm/agents/templates/memory_manager.json +0 -155
- claude_mpm/agents/templates/ops.json +0 -175
- claude_mpm/agents/templates/project_organizer.json +0 -130
- claude_mpm/agents/templates/qa.json +0 -223
- claude_mpm/agents/templates/refactoring_engineer.json +0 -266
- claude_mpm/agents/templates/research.json +0 -163
- claude_mpm/agents/templates/security.json +0 -153
- claude_mpm/agents/templates/ticketing.json +0 -169
- claude_mpm/agents/templates/vercel_ops_agent.json +0 -281
- claude_mpm/agents/templates/version_control.json +0 -147
- claude_mpm/agents/templates/web_qa.json +0 -254
- claude_mpm/agents/templates/web_ui.json +0 -176
- claude_mpm/cli/commands/configure_tui.py +0 -1927
- claude_mpm/cli/commands/mpm_init.py +0 -594
- claude_mpm/cli/commands/socketio_monitor.py +0 -233
- claude_mpm/commands/mpm-agents.md +0 -12
- claude_mpm/commands/mpm-config.md +0 -18
- claude_mpm/commands/mpm-tickets.md +0 -102
- claude_mpm/dashboard/.claude-mpm/socketio-instances.json +0 -1
- claude_mpm/dashboard/static/built/components/activity-tree.js +0 -2
- claude_mpm/dashboard/static/built/components/agent-inference.js +0 -2
- claude_mpm/dashboard/static/built/components/code-tree.js +0 -2
- claude_mpm/dashboard/static/built/components/code-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/event-processor.js +0 -2
- claude_mpm/dashboard/static/built/components/event-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/export-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/file-tool-tracker.js +0 -2
- claude_mpm/dashboard/static/built/components/hud-library-loader.js +0 -2
- claude_mpm/dashboard/static/built/components/hud-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/hud-visualizer.js +0 -2
- claude_mpm/dashboard/static/built/components/module-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/session-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/socket-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/ui-state-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/unified-data-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/working-directory.js +0 -2
- claude_mpm/dashboard/static/built/dashboard.js +0 -2
- claude_mpm/dashboard/static/built/socket-client.js +0 -2
- claude_mpm/dashboard/static/css/code-tree.css +0 -1408
- claude_mpm/dashboard/static/dist/components/activity-tree.js +0 -2
- claude_mpm/dashboard/static/dist/components/agent-inference.js +0 -2
- claude_mpm/dashboard/static/dist/components/code-tree.js +0 -2
- claude_mpm/dashboard/static/dist/components/code-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/event-processor.js +0 -2
- claude_mpm/dashboard/static/dist/components/event-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/export-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/file-tool-tracker.js +0 -2
- claude_mpm/dashboard/static/dist/components/hud-library-loader.js +0 -2
- claude_mpm/dashboard/static/dist/components/hud-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/hud-visualizer.js +0 -2
- claude_mpm/dashboard/static/dist/components/module-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/session-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/socket-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/ui-state-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/unified-data-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/working-directory.js +0 -2
- claude_mpm/dashboard/static/dist/dashboard.js +0 -2
- claude_mpm/dashboard/static/dist/socket-client.js +0 -2
- claude_mpm/dashboard/static/js/components/code-tree.js +0 -3220
- claude_mpm/dashboard/static/js/components/code-viewer.js +0 -480
- claude_mpm/hooks/claude_hooks/hook_handler_eventbus.py +0 -425
- claude_mpm/hooks/claude_hooks/hook_handler_original.py +0 -1040
- claude_mpm/hooks/claude_hooks/hook_handler_refactored.py +0 -347
- claude_mpm/scripts/socketio_daemon_hardened.py +0 -937
- claude_mpm/scripts/socketio_daemon_wrapper.py +0 -78
- claude_mpm/scripts/socketio_server_manager.py +0 -349
- claude_mpm/services/agents/deployment/agent_lifecycle_manager_refactored.py +0 -575
- claude_mpm/services/cli/dashboard_launcher.py +0 -423
- claude_mpm/services/cli/socketio_manager.py +0 -537
- claude_mpm/services/diagnostics/checks/claude_desktop_check.py +0 -286
- 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/services/project/analyzer_refactored.py +0 -450
- claude_mpm/tools/code_tree_analyzer.py +0 -1693
- claude_mpm-4.1.26.dist-info/METADATA +0 -332
- claude_mpm-4.1.26.dist-info/RECORD +0 -606
- {claude_mpm-4.1.26.dist-info → claude_mpm-5.0.9.dist-info}/WHEEL +0 -0
- {claude_mpm-4.1.26.dist-info → claude_mpm-5.0.9.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.1.26.dist-info → claude_mpm-5.0.9.dist-info}/top_level.txt +0 -0
|
@@ -13,27 +13,31 @@
|
|
|
13
13
|
* compatibility for existing code that depends on the dashboard interface.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
// ES6
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
16
|
+
// NOTE: Components are loaded as ES6 modules via index.html
|
|
17
|
+
// They expose their classes globally for backward compatibility
|
|
18
|
+
// Commenting out ES6 imports to avoid module resolution errors
|
|
19
|
+
|
|
20
|
+
// import { SocketManager } from './components/socket-manager.js';
|
|
21
|
+
// import { EventViewer } from './components/event-viewer.js';
|
|
22
|
+
// import { ModuleViewer } from './components/module-viewer.js';
|
|
23
|
+
// import { SessionManager } from './components/session-manager.js';
|
|
24
|
+
// import { AgentInference } from './components/agent-inference.js';
|
|
25
|
+
// import { AgentHierarchy } from './components/agent-hierarchy.js';
|
|
26
|
+
// import { UIStateManager } from './components/ui-state-manager.js';
|
|
27
|
+
// import { EventProcessor } from './components/event-processor.js';
|
|
28
|
+
// import { ExportManager } from './components/export-manager.js';
|
|
29
|
+
// import { WorkingDirectoryManager } from './components/working-directory.js';
|
|
30
|
+
// import { FileToolTracker } from './components/file-tool-tracker.js';
|
|
31
|
+
// import { BuildTracker } from './components/build-tracker.js';
|
|
32
|
+
// import { UnifiedDataViewer } from './components/unified-data-viewer.js';
|
|
33
|
+
|
|
30
34
|
class Dashboard {
|
|
31
35
|
constructor() {
|
|
32
36
|
// Core components (existing)
|
|
33
37
|
this.eventViewer = null;
|
|
34
38
|
this.moduleViewer = null;
|
|
35
39
|
this.sessionManager = null;
|
|
36
|
-
|
|
40
|
+
|
|
37
41
|
// Retry prevention
|
|
38
42
|
this.activityTreeRetryCount = 0;
|
|
39
43
|
this.maxRetryAttempts = 10;
|
|
@@ -60,6 +64,9 @@ class Dashboard {
|
|
|
60
64
|
console.log('Initializing refactored Claude MPM Dashboard...');
|
|
61
65
|
|
|
62
66
|
try {
|
|
67
|
+
// Fetch server configuration first
|
|
68
|
+
this.fetchServerConfig();
|
|
69
|
+
|
|
63
70
|
// Initialize modules in dependency order
|
|
64
71
|
this.initializeSocketManager();
|
|
65
72
|
this.initializeCoreComponents();
|
|
@@ -78,6 +85,11 @@ class Dashboard {
|
|
|
78
85
|
// Initialize from URL parameters
|
|
79
86
|
this.initializeFromURL();
|
|
80
87
|
|
|
88
|
+
// FIX: Render current tab after initialization to display any existing data
|
|
89
|
+
// WHY: If events were loaded before dashboard init completed, they won't be visible
|
|
90
|
+
console.log('[Dashboard] Initial render after dashboard initialization');
|
|
91
|
+
this.renderCurrentTab();
|
|
92
|
+
|
|
81
93
|
console.log('Claude MPM Dashboard initialized successfully');
|
|
82
94
|
} catch (error) {
|
|
83
95
|
console.error('Error during dashboard initialization:', error);
|
|
@@ -85,7 +97,40 @@ class Dashboard {
|
|
|
85
97
|
throw error;
|
|
86
98
|
}
|
|
87
99
|
}
|
|
88
|
-
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Fetch server configuration for dashboard initialization
|
|
103
|
+
*/
|
|
104
|
+
fetchServerConfig() {
|
|
105
|
+
fetch('/api/config')
|
|
106
|
+
.then(response => response.json())
|
|
107
|
+
.then(config => {
|
|
108
|
+
// Store config globally for other components
|
|
109
|
+
window.dashboardConfig = config;
|
|
110
|
+
|
|
111
|
+
// Update initial UI elements if they exist
|
|
112
|
+
const workingDirEl = document.getElementById('working-dir-path');
|
|
113
|
+
if (workingDirEl && config.workingDirectory) {
|
|
114
|
+
workingDirEl.textContent = config.workingDirectory;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const gitBranchEl = document.getElementById('footer-git-branch');
|
|
118
|
+
if (gitBranchEl && config.gitBranch) {
|
|
119
|
+
gitBranchEl.textContent = config.gitBranch;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
console.log('Dashboard configuration loaded:', config);
|
|
123
|
+
})
|
|
124
|
+
.catch(error => {
|
|
125
|
+
console.warn('Failed to fetch server config:', error);
|
|
126
|
+
// Set default config as fallback
|
|
127
|
+
window.dashboardConfig = {
|
|
128
|
+
workingDirectory: '.',
|
|
129
|
+
gitBranch: 'Unknown'
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
89
134
|
/**
|
|
90
135
|
* Validate that all critical components are initialized
|
|
91
136
|
* WHY: Ensures dashboard is in a valid state after initialization
|
|
@@ -96,12 +141,10 @@ class Dashboard {
|
|
|
96
141
|
{ name: 'eventViewer', component: this.eventViewer },
|
|
97
142
|
{ name: 'agentHierarchy', component: this.agentHierarchy }
|
|
98
143
|
];
|
|
99
|
-
|
|
144
|
+
|
|
100
145
|
const missing = criticalComponents.filter(c => !c.component);
|
|
101
146
|
if (missing.length > 0) {
|
|
102
147
|
console.warn('Missing critical components:', missing.map(c => c.name));
|
|
103
|
-
} else {
|
|
104
|
-
console.log('All critical components initialized');
|
|
105
148
|
}
|
|
106
149
|
}
|
|
107
150
|
|
|
@@ -110,7 +153,7 @@ class Dashboard {
|
|
|
110
153
|
* WHY: Some components need to reference window.dashboard but it's not available
|
|
111
154
|
* during constructor execution. This method is called after the Dashboard instance
|
|
112
155
|
* is assigned to window.dashboard, ensuring proper initialization order.
|
|
113
|
-
*
|
|
156
|
+
*
|
|
114
157
|
* DESIGN DECISION: Separate post-init phase prevents "cannot read property of undefined"
|
|
115
158
|
* errors when components try to access window.dashboard during construction.
|
|
116
159
|
*/
|
|
@@ -119,9 +162,8 @@ class Dashboard {
|
|
|
119
162
|
// Set global reference for agent hierarchy after dashboard is available
|
|
120
163
|
if (this.agentHierarchy) {
|
|
121
164
|
window.dashboard.agentHierarchy = this.agentHierarchy;
|
|
122
|
-
console.log('Agent hierarchy global reference set');
|
|
123
165
|
}
|
|
124
|
-
|
|
166
|
+
|
|
125
167
|
// Initialize any other components that need window.dashboard
|
|
126
168
|
this.validateInitialization();
|
|
127
169
|
} catch (error) {
|
|
@@ -164,10 +206,10 @@ class Dashboard {
|
|
|
164
206
|
*/
|
|
165
207
|
initializeBuildTracker() {
|
|
166
208
|
this.buildTracker = new BuildTracker();
|
|
167
|
-
|
|
209
|
+
|
|
168
210
|
// Set the socket client for receiving updates
|
|
169
211
|
this.buildTracker.setSocketClient(this.socketClient);
|
|
170
|
-
|
|
212
|
+
|
|
171
213
|
// Mount to header with retry logic for DOM readiness
|
|
172
214
|
const mountBuildTracker = () => {
|
|
173
215
|
const headerTitle = document.querySelector('.header-title');
|
|
@@ -181,10 +223,10 @@ class Dashboard {
|
|
|
181
223
|
setTimeout(mountBuildTracker, 100);
|
|
182
224
|
}
|
|
183
225
|
};
|
|
184
|
-
|
|
226
|
+
|
|
185
227
|
// Try to mount immediately, with retry logic if needed
|
|
186
228
|
mountBuildTracker();
|
|
187
|
-
|
|
229
|
+
|
|
188
230
|
// Make available globally for debugging
|
|
189
231
|
window.buildTracker = this.buildTracker;
|
|
190
232
|
}
|
|
@@ -196,7 +238,7 @@ class Dashboard {
|
|
|
196
238
|
this.agentInference = new AgentInference(this.eventViewer);
|
|
197
239
|
this.agentInference.initialize();
|
|
198
240
|
}
|
|
199
|
-
|
|
241
|
+
|
|
200
242
|
/**
|
|
201
243
|
* Initialize agent hierarchy component
|
|
202
244
|
* WHY: Creates the agent hierarchy visualization component but defers global
|
|
@@ -206,7 +248,6 @@ class Dashboard {
|
|
|
206
248
|
try {
|
|
207
249
|
this.agentHierarchy = new AgentHierarchy(this.agentInference, this.eventViewer);
|
|
208
250
|
// Global reference will be set in postInit() after window.dashboard exists
|
|
209
|
-
console.log('Agent hierarchy component created');
|
|
210
251
|
} catch (error) {
|
|
211
252
|
console.error('Failed to initialize agent hierarchy:', error);
|
|
212
253
|
// Create a stub to prevent further errors
|
|
@@ -262,12 +303,29 @@ class Dashboard {
|
|
|
262
303
|
setupModuleInteractions() {
|
|
263
304
|
// Socket events to update file operations and tool calls
|
|
264
305
|
this.socketManager.onEventUpdate((events) => {
|
|
306
|
+
console.log('[Dashboard] Processing event update with', events.length, 'events');
|
|
307
|
+
|
|
308
|
+
// Debug: Log some sample events to see their structure
|
|
309
|
+
if (events.length > 0) {
|
|
310
|
+
console.log('[Dashboard] Sample event structure:', {
|
|
311
|
+
first_event: events[0],
|
|
312
|
+
has_tool_events: events.some(e => e.tool_name || (e.data && e.data.tool_name)),
|
|
313
|
+
hook_events: events.filter(e => e.type === 'hook').length,
|
|
314
|
+
tool_subtypes: events.filter(e => e.subtype === 'pre_tool' || e.subtype === 'post_tool').length
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
265
318
|
this.fileToolTracker.updateFileOperations(events);
|
|
266
319
|
this.fileToolTracker.updateToolCalls(events);
|
|
267
320
|
|
|
321
|
+
// Debug: Check what was tracked
|
|
322
|
+
const fileOps = this.fileToolTracker.getFileOperations();
|
|
323
|
+
const toolCalls = this.fileToolTracker.getToolCalls();
|
|
324
|
+
console.log('[Dashboard] After update - File operations:', fileOps.size, 'Tool calls:', toolCalls.size);
|
|
325
|
+
|
|
268
326
|
// Process agent inference for new events
|
|
269
327
|
this.agentInference.processAgentInference();
|
|
270
|
-
|
|
328
|
+
|
|
271
329
|
// Update agent hierarchy with new events
|
|
272
330
|
this.agentHierarchy.updateWithNewEvents(events);
|
|
273
331
|
|
|
@@ -287,6 +345,11 @@ class Dashboard {
|
|
|
287
345
|
this.workingDirectoryManager.updateGitBranch(
|
|
288
346
|
this.workingDirectoryManager.getCurrentWorkingDir()
|
|
289
347
|
);
|
|
348
|
+
|
|
349
|
+
// FIX: Force render current tab to display initial/historical event data
|
|
350
|
+
// WHY: Events are loaded on connection but panes aren't rendered with this data
|
|
351
|
+
console.log('[Dashboard] Connection established - rendering current tab with initial data');
|
|
352
|
+
this.renderCurrentTab();
|
|
290
353
|
}
|
|
291
354
|
});
|
|
292
355
|
|
|
@@ -309,7 +372,14 @@ class Dashboard {
|
|
|
309
372
|
|
|
310
373
|
// Session changes
|
|
311
374
|
document.addEventListener('sessionFilterChanged', (e) => {
|
|
312
|
-
|
|
375
|
+
this.renderCurrentTab();
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
// FIX: Listen for history loaded event to render initial data
|
|
379
|
+
// WHY: When historical events are loaded from server, panes need to be rendered
|
|
380
|
+
document.addEventListener('historyLoaded', (e) => {
|
|
381
|
+
console.log('[Dashboard] History loaded event received:', e.detail);
|
|
382
|
+
console.log('[Dashboard] Rendering current tab with historical data');
|
|
313
383
|
this.renderCurrentTab();
|
|
314
384
|
});
|
|
315
385
|
}
|
|
@@ -391,28 +461,24 @@ class Dashboard {
|
|
|
391
461
|
if (window.ActivityTree && typeof window.ActivityTree === 'function') {
|
|
392
462
|
// Reset retry count on successful load
|
|
393
463
|
this.activityTreeRetryCount = 0;
|
|
394
|
-
|
|
464
|
+
|
|
395
465
|
// Create or get instance
|
|
396
466
|
if (!window.activityTreeInstance) {
|
|
397
|
-
console.log('Creating new ActivityTree instance...');
|
|
398
467
|
window.activityTreeInstance = new window.ActivityTree();
|
|
399
468
|
}
|
|
400
|
-
|
|
469
|
+
|
|
401
470
|
// Initialize if needed and render
|
|
402
471
|
if (window.activityTreeInstance) {
|
|
403
472
|
if (!window.activityTreeInstance.initialized) {
|
|
404
|
-
console.log('Initializing ActivityTree...');
|
|
405
473
|
window.activityTreeInstance.initialize();
|
|
406
474
|
}
|
|
407
|
-
|
|
475
|
+
|
|
408
476
|
if (typeof window.activityTreeInstance.renderWhenVisible === 'function') {
|
|
409
|
-
console.log('Dashboard triggering activity tree render...');
|
|
410
477
|
window.activityTreeInstance.renderWhenVisible();
|
|
411
478
|
}
|
|
412
|
-
|
|
479
|
+
|
|
413
480
|
// Force show to ensure the tree is visible
|
|
414
481
|
if (typeof window.activityTreeInstance.forceShow === 'function') {
|
|
415
|
-
console.log('Dashboard forcing activity tree to show...');
|
|
416
482
|
window.activityTreeInstance.forceShow();
|
|
417
483
|
}
|
|
418
484
|
}
|
|
@@ -421,11 +487,9 @@ class Dashboard {
|
|
|
421
487
|
const activityTreeInstance = window.activityTree();
|
|
422
488
|
if (activityTreeInstance) {
|
|
423
489
|
if (typeof activityTreeInstance.renderWhenVisible === 'function') {
|
|
424
|
-
console.log('Dashboard triggering activity tree render (legacy)...');
|
|
425
490
|
activityTreeInstance.renderWhenVisible();
|
|
426
491
|
}
|
|
427
492
|
if (typeof activityTreeInstance.forceShow === 'function') {
|
|
428
|
-
console.log('Dashboard forcing activity tree to show (legacy)...');
|
|
429
493
|
activityTreeInstance.forceShow();
|
|
430
494
|
}
|
|
431
495
|
}
|
|
@@ -475,23 +539,23 @@ class Dashboard {
|
|
|
475
539
|
renderAgents() {
|
|
476
540
|
const agentsList = document.getElementById('agents-list');
|
|
477
541
|
if (!agentsList) return;
|
|
478
|
-
|
|
542
|
+
|
|
479
543
|
// Get filter values
|
|
480
544
|
const searchText = document.getElementById('agents-search-input')?.value || '';
|
|
481
545
|
const agentType = document.getElementById('agents-type-filter')?.value || '';
|
|
482
|
-
|
|
546
|
+
|
|
483
547
|
// Generate flat HTML
|
|
484
548
|
const flatHTML = this.renderAgentsFlat(searchText, agentType);
|
|
485
549
|
agentsList.innerHTML = flatHTML;
|
|
486
|
-
|
|
550
|
+
|
|
487
551
|
// Remove hierarchy controls if they exist
|
|
488
552
|
this.removeHierarchyControls();
|
|
489
|
-
|
|
553
|
+
|
|
490
554
|
// Update filter dropdowns with available agent types
|
|
491
555
|
const uniqueInstances = this.agentInference.getUniqueAgentInstances();
|
|
492
556
|
this.updateAgentsFilterDropdowns(uniqueInstances);
|
|
493
557
|
}
|
|
494
|
-
|
|
558
|
+
|
|
495
559
|
/**
|
|
496
560
|
* Remove hierarchy control buttons (flat view doesn't need them)
|
|
497
561
|
*/
|
|
@@ -501,11 +565,11 @@ class Dashboard {
|
|
|
501
565
|
existingControls.remove();
|
|
502
566
|
}
|
|
503
567
|
}
|
|
504
|
-
|
|
568
|
+
|
|
505
569
|
/**
|
|
506
570
|
* Render agents as a flat chronological list
|
|
507
571
|
* @param {string} searchText - Search filter
|
|
508
|
-
* @param {string} agentType - Agent type filter
|
|
572
|
+
* @param {string} agentType - Agent type filter
|
|
509
573
|
* @returns {string} HTML for flat agent list
|
|
510
574
|
*/
|
|
511
575
|
renderAgentsFlat(searchText, agentType) {
|
|
@@ -513,11 +577,11 @@ class Dashboard {
|
|
|
513
577
|
if (!events || events.length === 0) {
|
|
514
578
|
return '<div class="no-events">No agent events found...</div>';
|
|
515
579
|
}
|
|
516
|
-
|
|
580
|
+
|
|
517
581
|
// Process agent inference to get agent mappings
|
|
518
582
|
this.agentInference.processAgentInference();
|
|
519
583
|
const eventAgentMap = this.agentInference.getEventAgentMap();
|
|
520
|
-
|
|
584
|
+
|
|
521
585
|
// Collect all agent events with metadata
|
|
522
586
|
const agentEvents = [];
|
|
523
587
|
events.forEach((event, index) => {
|
|
@@ -525,7 +589,7 @@ class Dashboard {
|
|
|
525
589
|
if (inference && (inference.type === 'subagent' || inference.type === 'main_agent')) {
|
|
526
590
|
// Apply filters
|
|
527
591
|
let includeEvent = true;
|
|
528
|
-
|
|
592
|
+
|
|
529
593
|
if (searchText) {
|
|
530
594
|
const searchLower = searchText.toLowerCase();
|
|
531
595
|
includeEvent = includeEvent && (
|
|
@@ -534,11 +598,11 @@ class Dashboard {
|
|
|
534
598
|
(event.data && JSON.stringify(event.data).toLowerCase().includes(searchLower))
|
|
535
599
|
);
|
|
536
600
|
}
|
|
537
|
-
|
|
601
|
+
|
|
538
602
|
if (agentType) {
|
|
539
603
|
includeEvent = includeEvent && inference.agentName.includes(agentType);
|
|
540
604
|
}
|
|
541
|
-
|
|
605
|
+
|
|
542
606
|
if (includeEvent) {
|
|
543
607
|
agentEvents.push({
|
|
544
608
|
event,
|
|
@@ -549,20 +613,20 @@ class Dashboard {
|
|
|
549
613
|
}
|
|
550
614
|
}
|
|
551
615
|
});
|
|
552
|
-
|
|
616
|
+
|
|
553
617
|
if (agentEvents.length === 0) {
|
|
554
618
|
return '<div class="no-events">No agent events match the current filters...</div>';
|
|
555
619
|
}
|
|
556
|
-
|
|
620
|
+
|
|
557
621
|
// Generate HTML for each event
|
|
558
622
|
const html = agentEvents.map((item, listIndex) => {
|
|
559
623
|
const { event, inference, index, timestamp } = item;
|
|
560
|
-
|
|
624
|
+
|
|
561
625
|
// Determine action/tool
|
|
562
626
|
let action = 'Activity';
|
|
563
627
|
let actionIcon = '📋';
|
|
564
628
|
let details = '';
|
|
565
|
-
|
|
629
|
+
|
|
566
630
|
if (event.event_type === 'SubagentStart') {
|
|
567
631
|
action = 'Started';
|
|
568
632
|
actionIcon = '🟢';
|
|
@@ -574,7 +638,7 @@ class Dashboard {
|
|
|
574
638
|
} else if (event.tool_name) {
|
|
575
639
|
action = `Tool: ${event.tool_name}`;
|
|
576
640
|
actionIcon = this.getToolIcon(event.tool_name);
|
|
577
|
-
|
|
641
|
+
|
|
578
642
|
// Add tool parameters as details
|
|
579
643
|
if (event.data && event.data.tool_parameters) {
|
|
580
644
|
const params = event.data.tool_parameters;
|
|
@@ -589,7 +653,7 @@ class Dashboard {
|
|
|
589
653
|
}
|
|
590
654
|
}
|
|
591
655
|
}
|
|
592
|
-
|
|
656
|
+
|
|
593
657
|
// Status based on event type
|
|
594
658
|
let status = 'completed';
|
|
595
659
|
if (event.event_type === 'SubagentStart') {
|
|
@@ -597,7 +661,7 @@ class Dashboard {
|
|
|
597
661
|
} else if (event.data && event.data.error) {
|
|
598
662
|
status = 'error';
|
|
599
663
|
}
|
|
600
|
-
|
|
664
|
+
|
|
601
665
|
return `
|
|
602
666
|
<div class="agent-event-item" data-index="${listIndex}" onclick="window.dashboard.showCardDetails('agents', ${index})">
|
|
603
667
|
<div class="agent-event-header">
|
|
@@ -616,10 +680,10 @@ class Dashboard {
|
|
|
616
680
|
</div>
|
|
617
681
|
`;
|
|
618
682
|
}).join('');
|
|
619
|
-
|
|
683
|
+
|
|
620
684
|
return `<div class="agent-events-flat">${html}</div>`;
|
|
621
685
|
}
|
|
622
|
-
|
|
686
|
+
|
|
623
687
|
/**
|
|
624
688
|
* Get icon for agent type
|
|
625
689
|
*/
|
|
@@ -627,7 +691,7 @@ class Dashboard {
|
|
|
627
691
|
const agentIcons = {
|
|
628
692
|
'PM': '🎯',
|
|
629
693
|
'Engineer Agent': '🔧',
|
|
630
|
-
'Research Agent': '🔍',
|
|
694
|
+
'Research Agent': '🔍',
|
|
631
695
|
'QA Agent': '✅',
|
|
632
696
|
'Documentation Agent': '📝',
|
|
633
697
|
'Security Agent': '🔒',
|
|
@@ -638,7 +702,7 @@ class Dashboard {
|
|
|
638
702
|
};
|
|
639
703
|
return agentIcons[agentName] || '🤖';
|
|
640
704
|
}
|
|
641
|
-
|
|
705
|
+
|
|
642
706
|
/**
|
|
643
707
|
* Get icon for tool
|
|
644
708
|
*/
|
|
@@ -655,7 +719,7 @@ class Dashboard {
|
|
|
655
719
|
};
|
|
656
720
|
return toolIcons[toolName] || '🔧';
|
|
657
721
|
}
|
|
658
|
-
|
|
722
|
+
|
|
659
723
|
/**
|
|
660
724
|
* Get icon for status
|
|
661
725
|
*/
|
|
@@ -668,19 +732,19 @@ class Dashboard {
|
|
|
668
732
|
};
|
|
669
733
|
return statusIcons[status] || '❓';
|
|
670
734
|
}
|
|
671
|
-
|
|
735
|
+
|
|
672
736
|
/**
|
|
673
737
|
* Format timestamp for display
|
|
674
738
|
*/
|
|
675
739
|
formatTimestamp(timestamp) {
|
|
676
740
|
return timestamp.toLocaleTimeString('en-US', {
|
|
677
741
|
hour: '2-digit',
|
|
678
|
-
minute: '2-digit',
|
|
742
|
+
minute: '2-digit',
|
|
679
743
|
second: '2-digit',
|
|
680
744
|
hour12: false
|
|
681
745
|
});
|
|
682
746
|
}
|
|
683
|
-
|
|
747
|
+
|
|
684
748
|
/**
|
|
685
749
|
* Escape HTML for safe display
|
|
686
750
|
*/
|
|
@@ -719,10 +783,19 @@ class Dashboard {
|
|
|
719
783
|
|
|
720
784
|
const fileOperations = this.fileToolTracker.getFileOperations();
|
|
721
785
|
const filesArray = Array.from(fileOperations.entries());
|
|
786
|
+
|
|
787
|
+
console.log('[renderFiles] File operations map size:', fileOperations.size);
|
|
788
|
+
console.log('[renderFiles] Files array:', filesArray);
|
|
789
|
+
|
|
722
790
|
const uniqueFileInstances = this.eventProcessor.getUniqueFileInstances(filesArray);
|
|
723
791
|
const fileHTML = this.eventProcessor.generateFileHTML(uniqueFileInstances);
|
|
724
792
|
|
|
725
|
-
|
|
793
|
+
if (filesArray.length === 0) {
|
|
794
|
+
filesList.innerHTML = '<div class="empty-state">No file operations tracked yet. File operations will appear here when tools like Read, Write, Edit, or Grep are used.</div>';
|
|
795
|
+
} else {
|
|
796
|
+
filesList.innerHTML = fileHTML;
|
|
797
|
+
}
|
|
798
|
+
|
|
726
799
|
this.exportManager.scrollListToBottom('files-list');
|
|
727
800
|
|
|
728
801
|
// Update filter dropdowns
|
|
@@ -745,12 +818,7 @@ class Dashboard {
|
|
|
745
818
|
const sortedTypes = Array.from(agentTypes).filter(type => type && type.trim() !== '');
|
|
746
819
|
this.populateFilterDropdown('agents-type-filter', sortedTypes, 'All Agent Types');
|
|
747
820
|
|
|
748
|
-
//
|
|
749
|
-
if (sortedTypes.length > 0) {
|
|
750
|
-
console.log('Agent types found for filter:', sortedTypes);
|
|
751
|
-
} else {
|
|
752
|
-
console.log('No agent types found for filter. Instances:', uniqueInstances.length);
|
|
753
|
-
}
|
|
821
|
+
// Agent filter types populated
|
|
754
822
|
}
|
|
755
823
|
|
|
756
824
|
/**
|
|
@@ -1073,35 +1141,7 @@ window.switchTab = function(tabName) {
|
|
|
1073
1141
|
}
|
|
1074
1142
|
};
|
|
1075
1143
|
|
|
1076
|
-
// File Viewer Modal Functions -
|
|
1077
|
-
window.showFileViewerModal = function(filePath, workingDir) {
|
|
1078
|
-
// Use the dashboard's current working directory if not provided
|
|
1079
|
-
if (!workingDir && window.dashboard && window.dashboard.currentWorkingDir) {
|
|
1080
|
-
workingDir = window.dashboard.currentWorkingDir;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
// Create modal if it doesn't exist
|
|
1084
|
-
let modal = document.getElementById('file-viewer-modal');
|
|
1085
|
-
if (!modal) {
|
|
1086
|
-
modal = createFileViewerModal();
|
|
1087
|
-
document.body.appendChild(modal);
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
// Update modal content
|
|
1091
|
-
updateFileViewerModal(modal, filePath, workingDir);
|
|
1092
|
-
|
|
1093
|
-
// Show the modal as flex container
|
|
1094
|
-
modal.style.display = 'flex';
|
|
1095
|
-
document.body.style.overflow = 'hidden'; // Prevent background scrolling
|
|
1096
|
-
};
|
|
1097
|
-
|
|
1098
|
-
window.hideFileViewerModal = function() {
|
|
1099
|
-
const modal = document.getElementById('file-viewer-modal');
|
|
1100
|
-
if (modal) {
|
|
1101
|
-
modal.style.display = 'none';
|
|
1102
|
-
document.body.style.overflow = ''; // Restore background scrolling
|
|
1103
|
-
}
|
|
1104
|
-
};
|
|
1144
|
+
// File Viewer Modal Functions - Removed broken duplicate (using the one at line 1505)
|
|
1105
1145
|
|
|
1106
1146
|
window.copyFileContent = function() {
|
|
1107
1147
|
const modal = document.getElementById('file-viewer-modal');
|
|
@@ -1116,11 +1156,13 @@ window.copyFileContent = function() {
|
|
|
1116
1156
|
navigator.clipboard.writeText(text).then(() => {
|
|
1117
1157
|
// Show brief feedback
|
|
1118
1158
|
const button = modal.querySelector('.file-content-copy');
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1159
|
+
if (button) {
|
|
1160
|
+
const originalText = button.textContent;
|
|
1161
|
+
button.textContent = '✅ Copied!';
|
|
1162
|
+
setTimeout(() => {
|
|
1163
|
+
button.textContent = originalText;
|
|
1164
|
+
}, 2000);
|
|
1165
|
+
}
|
|
1124
1166
|
}).catch(err => {
|
|
1125
1167
|
console.error('Failed to copy text:', err);
|
|
1126
1168
|
});
|
|
@@ -1134,11 +1176,13 @@ window.copyFileContent = function() {
|
|
|
1134
1176
|
document.body.removeChild(textarea);
|
|
1135
1177
|
|
|
1136
1178
|
const button = modal.querySelector('.file-content-copy');
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1179
|
+
if (button) {
|
|
1180
|
+
const originalText = button.textContent;
|
|
1181
|
+
button.textContent = '✅ Copied!';
|
|
1182
|
+
setTimeout(() => {
|
|
1183
|
+
button.textContent = originalText;
|
|
1184
|
+
}, 2000);
|
|
1185
|
+
}
|
|
1142
1186
|
}
|
|
1143
1187
|
};
|
|
1144
1188
|
|
|
@@ -1214,48 +1258,85 @@ async function updateFileViewerModal(modal, filePath, workingDir) {
|
|
|
1214
1258
|
const filePathElement = modal.querySelector('.file-viewer-file-path');
|
|
1215
1259
|
const fileSizeElement = modal.querySelector('.file-viewer-file-size');
|
|
1216
1260
|
|
|
1217
|
-
filePathElement
|
|
1218
|
-
|
|
1261
|
+
if (filePathElement) {
|
|
1262
|
+
filePathElement.textContent = filePath;
|
|
1263
|
+
}
|
|
1264
|
+
if (fileSizeElement) {
|
|
1265
|
+
fileSizeElement.textContent = '';
|
|
1266
|
+
}
|
|
1219
1267
|
|
|
1220
1268
|
// Show loading state
|
|
1221
|
-
modal.querySelector('.file-viewer-loading')
|
|
1222
|
-
modal.querySelector('.file-viewer-error')
|
|
1223
|
-
modal.querySelector('.file-viewer-content-area')
|
|
1269
|
+
const loadingElement = modal.querySelector('.file-viewer-loading');
|
|
1270
|
+
const errorElement = modal.querySelector('.file-viewer-error');
|
|
1271
|
+
const contentArea = modal.querySelector('.file-viewer-content-area');
|
|
1272
|
+
|
|
1273
|
+
if (loadingElement) {
|
|
1274
|
+
loadingElement.style.display = 'flex';
|
|
1275
|
+
}
|
|
1276
|
+
if (errorElement) {
|
|
1277
|
+
errorElement.style.display = 'none';
|
|
1278
|
+
}
|
|
1279
|
+
if (contentArea) {
|
|
1280
|
+
contentArea.style.display = 'none';
|
|
1281
|
+
}
|
|
1224
1282
|
|
|
1225
1283
|
try {
|
|
1226
1284
|
// Get the Socket.IO client
|
|
1227
|
-
const socket = window.socket || window.dashboard?.socketClient?.socket;
|
|
1285
|
+
const socket = window.socket || window.dashboard?.socketClient?.socket || window.socketClient?.socket;
|
|
1286
|
+
|
|
1287
|
+
console.log('[FileViewer] Socket search results:', {
|
|
1288
|
+
'window.socket': !!window.socket,
|
|
1289
|
+
'window.socket.connected': window.socket?.connected,
|
|
1290
|
+
'dashboard.socketClient.socket': !!window.dashboard?.socketClient?.socket,
|
|
1291
|
+
'dashboard.socketClient.socket.connected': window.dashboard?.socketClient?.socket?.connected,
|
|
1292
|
+
'window.socketClient.socket': !!window.socketClient?.socket,
|
|
1293
|
+
'window.socketClient.socket.connected': window.socketClient?.socket?.connected
|
|
1294
|
+
});
|
|
1295
|
+
|
|
1228
1296
|
if (!socket) {
|
|
1229
|
-
throw new Error('No socket connection available');
|
|
1297
|
+
throw new Error('No socket connection available. Please ensure the dashboard is connected.');
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
if (!socket.connected) {
|
|
1301
|
+
console.warn('[FileViewer] Socket found but not connected, attempting to use anyway...');
|
|
1230
1302
|
}
|
|
1231
1303
|
|
|
1304
|
+
console.log('[FileViewer] Socket found, setting up listener for file_content_response');
|
|
1305
|
+
|
|
1232
1306
|
// Set up one-time listener for file content response
|
|
1233
1307
|
const responsePromise = new Promise((resolve, reject) => {
|
|
1234
1308
|
const responseHandler = (data) => {
|
|
1309
|
+
console.log('[FileViewer] Received file_content_response:', data);
|
|
1235
1310
|
if (data.file_path === filePath) {
|
|
1236
1311
|
socket.off('file_content_response', responseHandler);
|
|
1237
1312
|
if (data.success) {
|
|
1313
|
+
console.log('[FileViewer] File content loaded successfully');
|
|
1238
1314
|
resolve(data);
|
|
1239
1315
|
} else {
|
|
1316
|
+
console.error('[FileViewer] File read failed:', data.error);
|
|
1240
1317
|
reject(new Error(data.error || 'Failed to read file'));
|
|
1241
1318
|
}
|
|
1242
1319
|
}
|
|
1243
1320
|
};
|
|
1244
1321
|
|
|
1245
1322
|
socket.on('file_content_response', responseHandler);
|
|
1323
|
+
console.log('[FileViewer] Listener registered for file_content_response');
|
|
1246
1324
|
|
|
1247
1325
|
// Timeout after 10 seconds
|
|
1248
1326
|
setTimeout(() => {
|
|
1249
1327
|
socket.off('file_content_response', responseHandler);
|
|
1250
|
-
|
|
1328
|
+
console.error('[FileViewer] Request timeout after 10 seconds');
|
|
1329
|
+
reject(new Error('Request timeout - server did not respond'));
|
|
1251
1330
|
}, 10000);
|
|
1252
1331
|
});
|
|
1253
1332
|
|
|
1254
1333
|
// Send file read request
|
|
1255
|
-
|
|
1334
|
+
const requestData = {
|
|
1256
1335
|
file_path: filePath,
|
|
1257
1336
|
working_dir: workingDir
|
|
1258
|
-
}
|
|
1337
|
+
};
|
|
1338
|
+
console.log('[FileViewer] Emitting read_file event with data:', requestData);
|
|
1339
|
+
socket.emit('read_file', requestData);
|
|
1259
1340
|
|
|
1260
1341
|
// File viewer request sent
|
|
1261
1342
|
|
|
@@ -1264,7 +1345,10 @@ async function updateFileViewerModal(modal, filePath, workingDir) {
|
|
|
1264
1345
|
// File content received successfully
|
|
1265
1346
|
|
|
1266
1347
|
// Hide loading
|
|
1267
|
-
modal.querySelector('.file-viewer-loading')
|
|
1348
|
+
const loadingEl = modal.querySelector('.file-viewer-loading');
|
|
1349
|
+
if (loadingEl) {
|
|
1350
|
+
loadingEl.style.display = 'none';
|
|
1351
|
+
}
|
|
1268
1352
|
|
|
1269
1353
|
// Show successful content
|
|
1270
1354
|
displayFileContent(modal, result);
|
|
@@ -1272,7 +1356,10 @@ async function updateFileViewerModal(modal, filePath, workingDir) {
|
|
|
1272
1356
|
} catch (error) {
|
|
1273
1357
|
console.error('❌ Failed to fetch file content:', error);
|
|
1274
1358
|
|
|
1275
|
-
modal.querySelector('.file-viewer-loading')
|
|
1359
|
+
const loadingEl2 = modal.querySelector('.file-viewer-loading');
|
|
1360
|
+
if (loadingEl2) {
|
|
1361
|
+
loadingEl2.style.display = 'none';
|
|
1362
|
+
}
|
|
1276
1363
|
|
|
1277
1364
|
// Create detailed error message
|
|
1278
1365
|
let errorMessage = error.message || 'Unknown error occurred';
|
|
@@ -1373,21 +1460,25 @@ function displayFileError(modal, result) {
|
|
|
1373
1460
|
|
|
1374
1461
|
let errorMessage = result.error || 'Unknown error occurred';
|
|
1375
1462
|
|
|
1376
|
-
messageElement
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
if (result.suggestions && result.suggestions.length > 0) {
|
|
1383
|
-
suggestionsElement.innerHTML = `
|
|
1384
|
-
<h4>Suggestions:</h4>
|
|
1385
|
-
<ul>
|
|
1386
|
-
${result.suggestions.map(s => `<li>${s}</li>`).join('')}
|
|
1387
|
-
</ul>
|
|
1463
|
+
if (messageElement) {
|
|
1464
|
+
messageElement.innerHTML = `
|
|
1465
|
+
<div class="error-main">${errorMessage}</div>
|
|
1466
|
+
${result.file_path ? `<div class="error-file">File: ${result.file_path}</div>` : ''}
|
|
1467
|
+
${result.working_dir ? `<div class="error-dir">Working directory: ${result.working_dir}</div>` : ''}
|
|
1388
1468
|
`;
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
if (suggestionsElement) {
|
|
1472
|
+
if (result.suggestions && result.suggestions.length > 0) {
|
|
1473
|
+
suggestionsElement.innerHTML = `
|
|
1474
|
+
<h4>Suggestions:</h4>
|
|
1475
|
+
<ul>
|
|
1476
|
+
${result.suggestions.map(s => `<li>${s}</li>`).join('')}
|
|
1477
|
+
</ul>
|
|
1478
|
+
`;
|
|
1479
|
+
} else {
|
|
1480
|
+
suggestionsElement.innerHTML = '';
|
|
1481
|
+
}
|
|
1391
1482
|
}
|
|
1392
1483
|
|
|
1393
1484
|
console.log('📋 Displaying file viewer error:', {
|
|
@@ -1396,7 +1487,9 @@ function displayFileError(modal, result) {
|
|
|
1396
1487
|
suggestions: result.suggestions
|
|
1397
1488
|
});
|
|
1398
1489
|
|
|
1399
|
-
errorArea
|
|
1490
|
+
if (errorArea) {
|
|
1491
|
+
errorArea.style.display = 'block';
|
|
1492
|
+
}
|
|
1400
1493
|
}
|
|
1401
1494
|
|
|
1402
1495
|
function highlightCode(code, extension) {
|
|
@@ -1502,26 +1595,37 @@ function formatFileSize(bytes) {
|
|
|
1502
1595
|
}
|
|
1503
1596
|
|
|
1504
1597
|
// File Viewer Modal Functions
|
|
1505
|
-
window.showFileViewerModal = function(filePath) {
|
|
1598
|
+
window.showFileViewerModal = async function(filePath) {
|
|
1599
|
+
console.log('[FileViewer] Opening file:', filePath);
|
|
1600
|
+
|
|
1506
1601
|
// Use the dashboard's current working directory
|
|
1507
1602
|
let workingDir = '';
|
|
1508
1603
|
if (window.dashboard && window.dashboard.currentWorkingDir) {
|
|
1509
1604
|
workingDir = window.dashboard.currentWorkingDir;
|
|
1605
|
+
console.log('[FileViewer] Using working directory:', workingDir);
|
|
1510
1606
|
}
|
|
1511
1607
|
|
|
1512
1608
|
// Create modal if it doesn't exist
|
|
1513
1609
|
let modal = document.getElementById('file-viewer-modal');
|
|
1514
1610
|
if (!modal) {
|
|
1611
|
+
console.log('[FileViewer] Creating new modal');
|
|
1515
1612
|
modal = createFileViewerModal();
|
|
1516
1613
|
document.body.appendChild(modal);
|
|
1517
|
-
}
|
|
1518
1614
|
|
|
1519
|
-
|
|
1520
|
-
|
|
1615
|
+
// Small delay to ensure DOM is fully updated
|
|
1616
|
+
await new Promise(resolve => setTimeout(resolve, 10));
|
|
1617
|
+
}
|
|
1521
1618
|
|
|
1522
|
-
// Show the modal as flex container
|
|
1619
|
+
// Show the modal as flex container first (ensures proper rendering)
|
|
1523
1620
|
modal.style.display = 'flex';
|
|
1524
1621
|
document.body.style.overflow = 'hidden'; // Prevent background scrolling
|
|
1622
|
+
|
|
1623
|
+
// Update modal content
|
|
1624
|
+
updateFileViewerModal(modal, filePath, workingDir).catch(error => {
|
|
1625
|
+
console.error('Error updating file viewer modal:', error);
|
|
1626
|
+
// Show error in the modal
|
|
1627
|
+
displayFileContentError(modal, { error: error.message });
|
|
1628
|
+
});
|
|
1525
1629
|
};
|
|
1526
1630
|
|
|
1527
1631
|
window.hideFileViewerModal = function() {
|
|
@@ -1545,11 +1649,13 @@ window.copyFileContent = function() {
|
|
|
1545
1649
|
navigator.clipboard.writeText(text).then(() => {
|
|
1546
1650
|
// Show brief feedback
|
|
1547
1651
|
const button = modal.querySelector('.file-content-copy');
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1652
|
+
if (button) {
|
|
1653
|
+
const originalText = button.textContent;
|
|
1654
|
+
button.textContent = '✅ Copied!';
|
|
1655
|
+
setTimeout(() => {
|
|
1656
|
+
button.textContent = originalText;
|
|
1657
|
+
}, 2000);
|
|
1658
|
+
}
|
|
1553
1659
|
}).catch(err => {
|
|
1554
1660
|
console.error('Failed to copy text:', err);
|
|
1555
1661
|
});
|
|
@@ -1563,11 +1669,13 @@ window.copyFileContent = function() {
|
|
|
1563
1669
|
document.body.removeChild(textarea);
|
|
1564
1670
|
|
|
1565
1671
|
const button = modal.querySelector('.file-content-copy');
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1672
|
+
if (button) {
|
|
1673
|
+
const originalText = button.textContent;
|
|
1674
|
+
button.textContent = '✅ Copied!';
|
|
1675
|
+
setTimeout(() => {
|
|
1676
|
+
button.textContent = originalText;
|
|
1677
|
+
}, 2000);
|
|
1678
|
+
}
|
|
1571
1679
|
}
|
|
1572
1680
|
};
|
|
1573
1681
|
|
|
@@ -1578,6 +1686,19 @@ function displayFileContentError(modal, result) {
|
|
|
1578
1686
|
const errorArea = modal.querySelector('.file-viewer-error');
|
|
1579
1687
|
const messageElement = modal.querySelector('.error-message');
|
|
1580
1688
|
const suggestionsElement = modal.querySelector('.error-suggestions');
|
|
1689
|
+
const loadingElement = modal.querySelector('.file-viewer-loading');
|
|
1690
|
+
const contentArea = modal.querySelector('.file-viewer-content-area');
|
|
1691
|
+
|
|
1692
|
+
// Hide loading and content areas, show error
|
|
1693
|
+
if (loadingElement) {
|
|
1694
|
+
loadingElement.style.display = 'none';
|
|
1695
|
+
}
|
|
1696
|
+
if (contentArea) {
|
|
1697
|
+
contentArea.style.display = 'none';
|
|
1698
|
+
}
|
|
1699
|
+
if (errorArea) {
|
|
1700
|
+
errorArea.style.display = 'flex';
|
|
1701
|
+
}
|
|
1581
1702
|
|
|
1582
1703
|
// Create user-friendly error messages
|
|
1583
1704
|
let errorMessage = result.error || 'Unknown error occurred';
|
|
@@ -1588,29 +1709,37 @@ function displayFileContentError(modal, result) {
|
|
|
1588
1709
|
errorMessage = '🔒 Permission denied accessing this file';
|
|
1589
1710
|
} else if (errorMessage.includes('too large')) {
|
|
1590
1711
|
errorMessage = '📏 File is too large to display';
|
|
1712
|
+
} else if (errorMessage.includes('socket connection')) {
|
|
1713
|
+
errorMessage = '🔌 Not connected to the server. Please check your connection.';
|
|
1714
|
+
} else if (errorMessage.includes('timeout')) {
|
|
1715
|
+
errorMessage = '⏱️ Request timed out. The server may be busy or unresponsive.';
|
|
1591
1716
|
} else if (!errorMessage.includes('📁') && !errorMessage.includes('🔒') && !errorMessage.includes('📏')) {
|
|
1592
1717
|
errorMessage = `⚠️ ${errorMessage}`;
|
|
1593
1718
|
}
|
|
1594
1719
|
|
|
1595
|
-
messageElement
|
|
1720
|
+
if (messageElement) {
|
|
1721
|
+
messageElement.textContent = errorMessage;
|
|
1722
|
+
}
|
|
1596
1723
|
|
|
1597
1724
|
// Add suggestions if available
|
|
1598
|
-
if (
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
<
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1725
|
+
if (suggestionsElement) {
|
|
1726
|
+
if (result.suggestions && result.suggestions.length > 0) {
|
|
1727
|
+
suggestionsElement.innerHTML = `
|
|
1728
|
+
<h4>Suggestions:</h4>
|
|
1729
|
+
<ul>
|
|
1730
|
+
${result.suggestions.map(suggestion => `<li>${suggestion}</li>`).join('')}
|
|
1731
|
+
</ul>
|
|
1732
|
+
`;
|
|
1733
|
+
} else {
|
|
1734
|
+
suggestionsElement.innerHTML = `
|
|
1735
|
+
<h4>Try:</h4>
|
|
1736
|
+
<ul>
|
|
1737
|
+
<li>Check if the file exists and is readable</li>
|
|
1738
|
+
<li>Verify file permissions</li>
|
|
1739
|
+
<li>Ensure the monitoring server has access to this file</li>
|
|
1740
|
+
</ul>
|
|
1741
|
+
`;
|
|
1742
|
+
}
|
|
1614
1743
|
}
|
|
1615
1744
|
|
|
1616
1745
|
console.log('📋 Displaying file content error:', {
|
|
@@ -1619,7 +1748,9 @@ function displayFileContentError(modal, result) {
|
|
|
1619
1748
|
suggestions: result.suggestions
|
|
1620
1749
|
});
|
|
1621
1750
|
|
|
1622
|
-
errorArea
|
|
1751
|
+
if (errorArea) {
|
|
1752
|
+
errorArea.style.display = 'block';
|
|
1753
|
+
}
|
|
1623
1754
|
}
|
|
1624
1755
|
|
|
1625
1756
|
// Search Viewer Modal Functions
|
|
@@ -1705,7 +1836,7 @@ function updateSearchViewerModal(modal, searchParams, searchResults) {
|
|
|
1705
1836
|
// Display search results
|
|
1706
1837
|
if (resultsDisplay && searchResults) {
|
|
1707
1838
|
let resultsHTML = '';
|
|
1708
|
-
|
|
1839
|
+
|
|
1709
1840
|
if (typeof searchResults === 'string') {
|
|
1710
1841
|
// If results are a string, display as preformatted text
|
|
1711
1842
|
resultsHTML = `<pre class="search-results-text">${escapeHtml(searchResults)}</pre>`;
|
|
@@ -1727,7 +1858,7 @@ function updateSearchViewerModal(modal, searchParams, searchResults) {
|
|
|
1727
1858
|
// Fallback: display as text
|
|
1728
1859
|
resultsHTML = `<div class="search-results-text">${escapeHtml(String(searchResults))}</div>`;
|
|
1729
1860
|
}
|
|
1730
|
-
|
|
1861
|
+
|
|
1731
1862
|
resultsDisplay.innerHTML = resultsHTML;
|
|
1732
1863
|
}
|
|
1733
1864
|
}
|
|
@@ -1752,15 +1883,15 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
1752
1883
|
try {
|
|
1753
1884
|
// Create dashboard instance
|
|
1754
1885
|
window.dashboard = new Dashboard();
|
|
1755
|
-
|
|
1886
|
+
|
|
1756
1887
|
// Call post-initialization setup that requires window.dashboard
|
|
1757
1888
|
// This must happen after window.dashboard is set
|
|
1758
1889
|
if (window.dashboard && typeof window.dashboard.postInit === 'function') {
|
|
1759
1890
|
window.dashboard.postInit();
|
|
1760
1891
|
}
|
|
1761
|
-
|
|
1892
|
+
|
|
1762
1893
|
console.log('Dashboard loaded and initialized successfully');
|
|
1763
|
-
|
|
1894
|
+
|
|
1764
1895
|
// Dispatch custom event to signal dashboard ready
|
|
1765
1896
|
document.dispatchEvent(new CustomEvent('dashboardReady', {
|
|
1766
1897
|
detail: { dashboard: window.dashboard }
|