claude-mpm 5.4.22__py3-none-any.whl → 5.6.34__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/VERSION +1 -1
- claude_mpm/agents/BASE_AGENT.md +164 -0
- claude_mpm/agents/BASE_ENGINEER.md +658 -0
- claude_mpm/agents/CLAUDE_MPM_OUTPUT_STYLE.md +66 -241
- claude_mpm/agents/CLAUDE_MPM_RESEARCH_OUTPUT_STYLE.md +413 -0
- claude_mpm/agents/CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md +109 -1925
- claude_mpm/agents/MEMORY.md +1 -1
- claude_mpm/agents/PM_INSTRUCTIONS.md +374 -1257
- claude_mpm/agents/WORKFLOW.md +6 -253
- claude_mpm/agents/agent_loader.py +1 -1
- claude_mpm/agents/base_agent.json +31 -0
- claude_mpm/agents/frontmatter_validator.py +2 -2
- claude_mpm/agents/templates/circuit-breakers.md +26 -17
- claude_mpm/cli/__init__.py +5 -1
- claude_mpm/cli/commands/agent_state_manager.py +10 -10
- claude_mpm/cli/commands/agents.py +11 -13
- claude_mpm/cli/commands/agents_reconcile.py +197 -0
- claude_mpm/cli/commands/auto_configure.py +4 -4
- claude_mpm/cli/commands/autotodos.py +566 -0
- claude_mpm/cli/commands/commander.py +216 -0
- claude_mpm/cli/commands/configure.py +621 -22
- claude_mpm/cli/commands/configure_agent_display.py +12 -0
- claude_mpm/cli/commands/hook_errors.py +60 -60
- claude_mpm/cli/commands/monitor.py +2 -2
- claude_mpm/cli/commands/mpm_init/core.py +72 -0
- claude_mpm/cli/commands/postmortem.py +1 -1
- claude_mpm/cli/commands/profile.py +276 -0
- claude_mpm/cli/commands/run.py +35 -3
- claude_mpm/cli/commands/skill_source.py +51 -2
- claude_mpm/cli/commands/skills.py +182 -32
- claude_mpm/cli/executor.py +130 -16
- claude_mpm/cli/interactive/__init__.py +10 -0
- claude_mpm/cli/interactive/agent_wizard.py +32 -52
- claude_mpm/cli/interactive/questionary_styles.py +65 -0
- claude_mpm/cli/interactive/skill_selector.py +481 -0
- claude_mpm/cli/parsers/base_parser.py +83 -1
- claude_mpm/cli/parsers/commander_parser.py +116 -0
- claude_mpm/cli/parsers/profile_parser.py +147 -0
- claude_mpm/cli/parsers/run_parser.py +10 -0
- claude_mpm/cli/parsers/skill_source_parser.py +4 -0
- claude_mpm/cli/parsers/skills_parser.py +2 -3
- claude_mpm/cli/startup.py +690 -386
- claude_mpm/cli/startup_display.py +74 -6
- claude_mpm/cli/startup_logging.py +2 -2
- claude_mpm/cli/utils.py +7 -3
- claude_mpm/commander/__init__.py +78 -0
- claude_mpm/commander/adapters/__init__.py +60 -0
- claude_mpm/commander/adapters/auggie.py +260 -0
- claude_mpm/commander/adapters/base.py +288 -0
- claude_mpm/commander/adapters/claude_code.py +392 -0
- claude_mpm/commander/adapters/codex.py +237 -0
- claude_mpm/commander/adapters/communication.py +366 -0
- claude_mpm/commander/adapters/example_usage.py +310 -0
- claude_mpm/commander/adapters/mpm.py +389 -0
- claude_mpm/commander/adapters/registry.py +204 -0
- claude_mpm/commander/api/__init__.py +16 -0
- claude_mpm/commander/api/app.py +121 -0
- claude_mpm/commander/api/errors.py +133 -0
- claude_mpm/commander/api/routes/__init__.py +8 -0
- claude_mpm/commander/api/routes/events.py +184 -0
- claude_mpm/commander/api/routes/inbox.py +171 -0
- claude_mpm/commander/api/routes/messages.py +148 -0
- claude_mpm/commander/api/routes/projects.py +271 -0
- claude_mpm/commander/api/routes/sessions.py +226 -0
- claude_mpm/commander/api/routes/work.py +296 -0
- claude_mpm/commander/api/schemas.py +186 -0
- claude_mpm/commander/chat/__init__.py +7 -0
- claude_mpm/commander/chat/cli.py +146 -0
- claude_mpm/commander/chat/commands.py +96 -0
- claude_mpm/commander/chat/repl.py +310 -0
- claude_mpm/commander/config.py +51 -0
- claude_mpm/commander/config_loader.py +115 -0
- claude_mpm/commander/core/__init__.py +10 -0
- claude_mpm/commander/core/block_manager.py +325 -0
- claude_mpm/commander/core/response_manager.py +323 -0
- claude_mpm/commander/daemon.py +603 -0
- claude_mpm/commander/env_loader.py +59 -0
- claude_mpm/commander/events/__init__.py +26 -0
- claude_mpm/commander/events/manager.py +332 -0
- claude_mpm/commander/frameworks/__init__.py +12 -0
- claude_mpm/commander/frameworks/base.py +146 -0
- claude_mpm/commander/frameworks/claude_code.py +58 -0
- claude_mpm/commander/frameworks/mpm.py +62 -0
- claude_mpm/commander/inbox/__init__.py +16 -0
- claude_mpm/commander/inbox/dedup.py +128 -0
- claude_mpm/commander/inbox/inbox.py +224 -0
- claude_mpm/commander/inbox/models.py +70 -0
- claude_mpm/commander/instance_manager.py +450 -0
- claude_mpm/commander/llm/__init__.py +6 -0
- claude_mpm/commander/llm/openrouter_client.py +167 -0
- claude_mpm/commander/llm/summarizer.py +70 -0
- claude_mpm/commander/memory/__init__.py +45 -0
- claude_mpm/commander/memory/compression.py +347 -0
- claude_mpm/commander/memory/embeddings.py +230 -0
- claude_mpm/commander/memory/entities.py +310 -0
- claude_mpm/commander/memory/example_usage.py +290 -0
- claude_mpm/commander/memory/integration.py +325 -0
- claude_mpm/commander/memory/search.py +381 -0
- claude_mpm/commander/memory/store.py +657 -0
- claude_mpm/commander/models/__init__.py +18 -0
- claude_mpm/commander/models/events.py +121 -0
- claude_mpm/commander/models/project.py +162 -0
- claude_mpm/commander/models/work.py +214 -0
- claude_mpm/commander/parsing/__init__.py +20 -0
- claude_mpm/commander/parsing/extractor.py +132 -0
- claude_mpm/commander/parsing/output_parser.py +270 -0
- claude_mpm/commander/parsing/patterns.py +100 -0
- claude_mpm/commander/persistence/__init__.py +11 -0
- claude_mpm/commander/persistence/event_store.py +274 -0
- claude_mpm/commander/persistence/state_store.py +309 -0
- claude_mpm/commander/persistence/work_store.py +164 -0
- claude_mpm/commander/polling/__init__.py +13 -0
- claude_mpm/commander/polling/event_detector.py +104 -0
- claude_mpm/commander/polling/output_buffer.py +49 -0
- claude_mpm/commander/polling/output_poller.py +153 -0
- claude_mpm/commander/project_session.py +268 -0
- claude_mpm/commander/proxy/__init__.py +12 -0
- claude_mpm/commander/proxy/formatter.py +89 -0
- claude_mpm/commander/proxy/output_handler.py +191 -0
- claude_mpm/commander/proxy/relay.py +155 -0
- claude_mpm/commander/registry.py +410 -0
- claude_mpm/commander/runtime/__init__.py +10 -0
- claude_mpm/commander/runtime/executor.py +191 -0
- claude_mpm/commander/runtime/monitor.py +346 -0
- claude_mpm/commander/session/__init__.py +6 -0
- claude_mpm/commander/session/context.py +81 -0
- claude_mpm/commander/session/manager.py +59 -0
- claude_mpm/commander/tmux_orchestrator.py +361 -0
- claude_mpm/commander/web/__init__.py +1 -0
- claude_mpm/commander/work/__init__.py +30 -0
- claude_mpm/commander/work/executor.py +207 -0
- claude_mpm/commander/work/queue.py +405 -0
- claude_mpm/commander/workflow/__init__.py +27 -0
- claude_mpm/commander/workflow/event_handler.py +241 -0
- claude_mpm/commander/workflow/notifier.py +146 -0
- claude_mpm/commands/mpm-config.md +20 -249
- claude_mpm/commands/mpm-doctor.md +16 -21
- claude_mpm/commands/mpm-help.md +12 -205
- claude_mpm/commands/mpm-init.md +88 -506
- claude_mpm/commands/mpm-monitor.md +22 -401
- claude_mpm/commands/mpm-organize.md +70 -442
- claude_mpm/commands/mpm-postmortem.md +13 -107
- claude_mpm/commands/mpm-session-resume.md +20 -363
- claude_mpm/commands/mpm-status.md +13 -69
- claude_mpm/commands/mpm-ticket-view.md +60 -495
- claude_mpm/commands/mpm-version.md +13 -107
- claude_mpm/commands/mpm.md +8 -0
- claude_mpm/config/agent_presets.py +8 -7
- claude_mpm/config/skill_sources.py +16 -0
- claude_mpm/constants.py +1 -0
- claude_mpm/core/claude_runner.py +154 -2
- claude_mpm/core/config.py +37 -26
- claude_mpm/core/config_constants.py +74 -9
- claude_mpm/core/constants.py +56 -12
- claude_mpm/core/framework/loaders/agent_loader.py +1 -1
- claude_mpm/core/framework/loaders/instruction_loader.py +52 -11
- claude_mpm/core/hook_manager.py +51 -3
- claude_mpm/core/interactive_session.py +12 -11
- claude_mpm/core/logger.py +26 -9
- claude_mpm/core/logging_utils.py +39 -13
- claude_mpm/core/network_config.py +148 -0
- claude_mpm/core/oneshot_session.py +7 -6
- claude_mpm/core/optimized_startup.py +61 -0
- claude_mpm/core/output_style_manager.py +66 -18
- claude_mpm/core/shared/config_loader.py +3 -1
- claude_mpm/core/socketio_pool.py +47 -15
- claude_mpm/core/unified_agent_registry.py +1 -1
- claude_mpm/core/unified_config.py +54 -8
- claude_mpm/core/unified_paths.py +95 -90
- claude_mpm/dashboard/static/svelte-build/_app/env.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/assets/0.C33zOoyM.css +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/assets/2.CW1J-YuA.css +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/1WZnGYqX.js +24 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/67pF3qNn.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/6RxdMKe4.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/8cZrfX0h.js +60 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/9a6T2nm-.js +7 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/B443AUzu.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/B8AwtY2H.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BF15LAsF.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BQaXIfA_.js +331 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BRcwIQNr.js +4 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BSNlmTZj.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BV6nKitt.js +43 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BViJ8lZt.js +128 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BcQ-Q0FE.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Bpyvgze_.js +30 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BzTRqg-z.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/C0Fr8dve.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/C3rbW_a-.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/C8WYN38h.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/C9I8FlXH.js +61 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CIQcWgO2.js +36 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CIctN7YN.js +7 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CKrS_JZW.js +145 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CR6P9C4A.js +89 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CRRR9MD_.js +2 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CRcR2DqT.js +334 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CSXtMOf0.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CT-sbxSk.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CWm6DJsp.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CmKTTxBW.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CpqQ1Kzn.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Cu_Erd72.js +261 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/D2nGpDRe.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/D9iCMida.js +267 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/D9ykgMoY.js +10 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DL2Ldur1.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DPfltzjH.js +165 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DR8nis88.js +2 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DUliQN2b.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DVp1hx9R.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DXlhR01x.js +122 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/D_lyTybS.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DngoTTgh.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DqkmHtDC.js +220 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DsDh8EYs.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/DypDmXgd.js +139 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Gi6I4Gst.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/IPYC-LnN.js +162 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/JTLiF7dt.js +24 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/JpevfAFt.js +68 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/NqQ1dWOy.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/R8CEIRAd.js +2 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Zxy7qc-l.js +64 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/q9Hm6zAU.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/qtd3IeO4.js +15 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/ulBFON_C.js +65 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/wQVh1CoA.js +10 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/entry/app.Dr7t0z2J.js +2 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/entry/start.BGhZHUS3.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/nodes/0.RgBboRvH.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/nodes/1.DG-KkbDf.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/nodes/2.D_jnf-x6.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/version.json +1 -0
- claude_mpm/dashboard/static/svelte-build/favicon.svg +7 -0
- claude_mpm/dashboard/static/svelte-build/index.html +36 -0
- claude_mpm/dashboard-svelte/node_modules/katex/src/fonts/generate_fonts.py +58 -0
- claude_mpm/dashboard-svelte/node_modules/katex/src/metrics/extract_tfms.py +114 -0
- claude_mpm/dashboard-svelte/node_modules/katex/src/metrics/extract_ttfs.py +122 -0
- claude_mpm/dashboard-svelte/node_modules/katex/src/metrics/format_json.py +28 -0
- claude_mpm/dashboard-svelte/node_modules/katex/src/metrics/parse_tfm.py +211 -0
- claude_mpm/experimental/cli_enhancements.py +2 -1
- claude_mpm/hooks/claude_hooks/INTEGRATION_EXAMPLE.md +243 -0
- claude_mpm/hooks/claude_hooks/README_AUTO_PAUSE.md +403 -0
- claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/auto_pause_handler.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/correlation_manager.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/auto_pause_handler.py +485 -0
- claude_mpm/hooks/claude_hooks/event_handlers.py +527 -136
- claude_mpm/hooks/claude_hooks/hook_handler.py +313 -99
- claude_mpm/hooks/claude_hooks/hook_wrapper.sh +6 -11
- claude_mpm/hooks/claude_hooks/installer.py +206 -36
- claude_mpm/hooks/claude_hooks/memory_integration.py +52 -32
- claude_mpm/hooks/claude_hooks/response_tracking.py +43 -60
- claude_mpm/hooks/claude_hooks/services/__init__.py +21 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/connection_manager_http.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/container.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/protocols.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/connection_manager.py +67 -32
- claude_mpm/hooks/claude_hooks/services/connection_manager_http.py +38 -105
- claude_mpm/hooks/claude_hooks/services/container.py +310 -0
- claude_mpm/hooks/claude_hooks/services/protocols.py +328 -0
- claude_mpm/hooks/claude_hooks/services/state_manager.py +25 -38
- claude_mpm/hooks/claude_hooks/services/subagent_processor.py +75 -77
- claude_mpm/hooks/kuzu_memory_hook.py +5 -5
- claude_mpm/hooks/session_resume_hook.py +89 -1
- claude_mpm/hooks/templates/pre_tool_use_simple.py +6 -6
- claude_mpm/hooks/templates/pre_tool_use_template.py +16 -8
- claude_mpm/init.py +276 -0
- claude_mpm/models/git_repository.py +3 -3
- claude_mpm/scripts/claude-hook-handler.sh +46 -19
- claude_mpm/services/agents/agent_builder.py +3 -3
- claude_mpm/services/agents/agent_recommendation_service.py +8 -8
- claude_mpm/services/agents/agent_selection_service.py +2 -2
- claude_mpm/services/agents/cache_git_manager.py +7 -7
- claude_mpm/services/agents/deployment/agent_deployment.py +29 -7
- claude_mpm/services/agents/deployment/agent_discovery_service.py +4 -2
- claude_mpm/services/agents/deployment/agent_format_converter.py +25 -13
- claude_mpm/services/agents/deployment/agent_template_builder.py +39 -19
- claude_mpm/services/agents/deployment/agents_directory_resolver.py +2 -2
- claude_mpm/services/agents/deployment/async_agent_deployment.py +31 -27
- claude_mpm/services/agents/deployment/deployment_reconciler.py +577 -0
- claude_mpm/services/agents/deployment/local_template_deployment.py +3 -1
- claude_mpm/services/agents/deployment/multi_source_deployment_service.py +169 -26
- claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +101 -75
- claude_mpm/services/agents/deployment/startup_reconciliation.py +138 -0
- claude_mpm/services/agents/git_source_manager.py +23 -4
- claude_mpm/services/agents/loading/framework_agent_loader.py +75 -2
- claude_mpm/services/agents/recommender.py +5 -3
- claude_mpm/services/agents/single_tier_deployment_service.py +6 -6
- claude_mpm/services/agents/sources/git_source_sync_service.py +121 -10
- claude_mpm/services/agents/startup_sync.py +27 -4
- claude_mpm/services/cli/__init__.py +3 -0
- claude_mpm/services/cli/incremental_pause_manager.py +561 -0
- claude_mpm/services/cli/session_resume_helper.py +10 -2
- claude_mpm/services/command_deployment_service.py +44 -26
- claude_mpm/services/delegation_detector.py +175 -0
- claude_mpm/services/diagnostics/checks/agent_check.py +2 -2
- claude_mpm/services/diagnostics/checks/agent_sources_check.py +31 -1
- claude_mpm/services/diagnostics/checks/configuration_check.py +24 -0
- claude_mpm/services/diagnostics/checks/installation_check.py +22 -0
- claude_mpm/services/diagnostics/checks/mcp_services_check.py +23 -0
- claude_mpm/services/diagnostics/doctor_reporter.py +31 -1
- claude_mpm/services/diagnostics/models.py +14 -1
- claude_mpm/services/event_log.py +325 -0
- claude_mpm/services/git/git_operations_service.py +8 -8
- claude_mpm/services/hook_installer_service.py +77 -8
- claude_mpm/services/infrastructure/__init__.py +4 -0
- claude_mpm/services/infrastructure/context_usage_tracker.py +291 -0
- claude_mpm/services/infrastructure/resume_log_generator.py +24 -5
- claude_mpm/services/monitor/daemon_manager.py +15 -4
- claude_mpm/services/monitor/management/lifecycle.py +15 -3
- claude_mpm/services/monitor/server.py +571 -11
- claude_mpm/services/pm_skills_deployer.py +884 -0
- claude_mpm/services/profile_manager.py +337 -0
- claude_mpm/services/skills/git_skill_source_manager.py +281 -20
- claude_mpm/services/skills/selective_skill_deployer.py +211 -46
- claude_mpm/services/skills/skill_discovery_service.py +74 -4
- claude_mpm/services/skills_deployer.py +192 -70
- claude_mpm/services/socketio/dashboard_server.py +1 -0
- claude_mpm/services/socketio/event_normalizer.py +37 -6
- claude_mpm/services/socketio/handlers/hook.py +14 -7
- claude_mpm/services/socketio/server/core.py +262 -123
- claude_mpm/services/socketio/server/main.py +12 -4
- claude_mpm/skills/__init__.py +2 -1
- claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +79 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +178 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/agent-prompts.md +577 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/coordination-patterns.md +467 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/examples.md +537 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/troubleshooting.md +730 -0
- claude_mpm/skills/bundled/collaboration/git-worktrees.md +317 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +112 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/code-reviewer-template.md +146 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/review-examples.md +412 -0
- claude_mpm/skills/bundled/collaboration/stacked-prs.md +251 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +81 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/references/best-practices.md +362 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/references/plan-structure-templates.md +312 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +152 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/advanced-techniques.md +668 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/examples.md +587 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/integration.md +438 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/tracing-techniques.md +391 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +119 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +148 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +483 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +452 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +449 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +411 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +14 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +58 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +68 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +69 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +131 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +325 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/integration-and-workflows.md +490 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/red-flags-and-failures.md +425 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +499 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/INTEGRATION.md +611 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/README.md +596 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/SKILL.md +260 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/examples/nextjs-env-structure.md +315 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/frameworks.md +436 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/security.md +433 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/synchronization.md +452 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/troubleshooting.md +404 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/validation.md +420 -0
- claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +86 -0
- claude_mpm/skills/bundled/main/internal-comms/SKILL.md +43 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +47 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +65 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +30 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +16 -0
- claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +160 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/design_principles.md +412 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +602 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +915 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +916 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +752 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/workflow.md +1237 -0
- claude_mpm/skills/bundled/main/skill-creator/SKILL.md +189 -0
- claude_mpm/skills/bundled/main/skill-creator/references/best-practices.md +500 -0
- claude_mpm/skills/bundled/main/skill-creator/references/creation-workflow.md +464 -0
- claude_mpm/skills/bundled/main/skill-creator/references/examples.md +619 -0
- claude_mpm/skills/bundled/main/skill-creator/references/progressive-disclosure.md +437 -0
- claude_mpm/skills/bundled/main/skill-creator/references/skill-structure.md +231 -0
- claude_mpm/skills/bundled/php/espocrm-development/SKILL.md +170 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/architecture.md +602 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/common-tasks.md +821 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/development-workflow.md +742 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/frontend-customization.md +726 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/hooks-and-services.md +764 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/testing-debugging.md +831 -0
- claude_mpm/skills/bundled/pm/mpm/SKILL.md +38 -0
- claude_mpm/skills/bundled/pm/mpm-agent-update-workflow/SKILL.md +75 -0
- claude_mpm/skills/bundled/pm/mpm-bug-reporting/SKILL.md +248 -0
- claude_mpm/skills/bundled/pm/mpm-circuit-breaker-enforcement/SKILL.md +476 -0
- claude_mpm/skills/bundled/pm/mpm-config/SKILL.md +29 -0
- claude_mpm/skills/bundled/pm/mpm-delegation-patterns/SKILL.md +167 -0
- claude_mpm/skills/bundled/pm/mpm-doctor/SKILL.md +53 -0
- claude_mpm/skills/bundled/pm/mpm-git-file-tracking/SKILL.md +113 -0
- claude_mpm/skills/bundled/pm/mpm-help/SKILL.md +35 -0
- claude_mpm/skills/bundled/pm/mpm-init/SKILL.md +125 -0
- claude_mpm/skills/bundled/pm/mpm-monitor/SKILL.md +32 -0
- claude_mpm/skills/bundled/pm/mpm-organize/SKILL.md +121 -0
- claude_mpm/skills/bundled/pm/mpm-postmortem/SKILL.md +22 -0
- claude_mpm/skills/bundled/pm/mpm-pr-workflow/SKILL.md +124 -0
- claude_mpm/skills/bundled/pm/mpm-session-management/SKILL.md +312 -0
- claude_mpm/skills/bundled/pm/mpm-session-pause/SKILL.md +170 -0
- claude_mpm/skills/bundled/pm/mpm-session-resume/SKILL.md +31 -0
- claude_mpm/skills/bundled/pm/mpm-status/SKILL.md +37 -0
- claude_mpm/skills/bundled/pm/mpm-teaching-mode/SKILL.md +657 -0
- claude_mpm/skills/bundled/pm/mpm-ticket-view/SKILL.md +110 -0
- claude_mpm/skills/bundled/pm/mpm-ticketing-integration/SKILL.md +154 -0
- claude_mpm/skills/bundled/pm/mpm-tool-usage-guide/SKILL.md +386 -0
- claude_mpm/skills/bundled/pm/mpm-verification-protocols/SKILL.md +198 -0
- claude_mpm/skills/bundled/pm/mpm-version/SKILL.md +21 -0
- claude_mpm/skills/bundled/react/flexlayout-react.md +742 -0
- claude_mpm/skills/bundled/rust/desktop-applications/SKILL.md +226 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/architecture-patterns.md +901 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/native-gui-frameworks.md +901 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/platform-integration.md +775 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/state-management.md +937 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/tauri-framework.md +770 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/testing-deployment.md +961 -0
- claude_mpm/skills/bundled/security-scanning.md +112 -0
- claude_mpm/skills/bundled/tauri/tauri-async-patterns.md +495 -0
- claude_mpm/skills/bundled/tauri/tauri-build-deploy.md +599 -0
- claude_mpm/skills/bundled/tauri/tauri-command-patterns.md +535 -0
- claude_mpm/skills/bundled/tauri/tauri-error-handling.md +613 -0
- claude_mpm/skills/bundled/tauri/tauri-event-system.md +648 -0
- claude_mpm/skills/bundled/tauri/tauri-file-system.md +673 -0
- claude_mpm/skills/bundled/tauri/tauri-frontend-integration.md +767 -0
- claude_mpm/skills/bundled/tauri/tauri-performance.md +669 -0
- claude_mpm/skills/bundled/tauri/tauri-state-management.md +573 -0
- claude_mpm/skills/bundled/tauri/tauri-testing.md +384 -0
- claude_mpm/skills/bundled/tauri/tauri-window-management.md +628 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +119 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/references/patterns-and-implementation.md +253 -0
- claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +145 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +543 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +741 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +470 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +458 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +639 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/SKILL.md +458 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/examples/example-inspection-report.md +411 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/assertion-quality.md +317 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/inspection-checklist.md +270 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/red-flags.md +436 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +140 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/completeness-anti-patterns.md +572 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/core-anti-patterns.md +411 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/detection-guide.md +569 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/tdd-connection.md +695 -0
- claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +184 -0
- claude_mpm/skills/bundled/testing/webapp-testing/decision-tree.md +459 -0
- claude_mpm/skills/bundled/testing/webapp-testing/playwright-patterns.md +479 -0
- claude_mpm/skills/bundled/testing/webapp-testing/reconnaissance-pattern.md +687 -0
- claude_mpm/skills/bundled/testing/webapp-testing/server-management.md +758 -0
- claude_mpm/skills/bundled/testing/webapp-testing/troubleshooting.md +868 -0
- claude_mpm/skills/registry.py +295 -90
- claude_mpm/skills/skill_manager.py +98 -3
- claude_mpm/templates/.pre-commit-config.yaml +112 -0
- claude_mpm/utils/agent_dependency_loader.py +115 -4
- claude_mpm/utils/agent_filters.py +1 -1
- claude_mpm/utils/migration.py +4 -4
- claude_mpm/utils/robust_installer.py +86 -21
- claude_mpm-5.6.34.dist-info/METADATA +393 -0
- {claude_mpm-5.4.22.dist-info → claude_mpm-5.6.34.dist-info}/RECORD +486 -145
- claude_mpm-5.4.22.dist-info/METADATA +0 -996
- {claude_mpm-5.4.22.dist-info → claude_mpm-5.6.34.dist-info}/WHEEL +0 -0
- {claude_mpm-5.4.22.dist-info → claude_mpm-5.6.34.dist-info}/entry_points.txt +0 -0
- {claude_mpm-5.4.22.dist-info → claude_mpm-5.6.34.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-5.4.22.dist-info → claude_mpm-5.6.34.dist-info}/licenses/LICENSE-FAQ.md +0 -0
- {claude_mpm-5.4.22.dist-info → claude_mpm-5.6.34.dist-info}/top_level.txt +0 -0
|
@@ -26,6 +26,18 @@ from .agent_version_manager import AgentVersionManager
|
|
|
26
26
|
from .remote_agent_discovery_service import RemoteAgentDiscoveryService
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
def _normalize_agent_name(name: str) -> str:
|
|
30
|
+
"""Normalize agent name for consistent comparison.
|
|
31
|
+
|
|
32
|
+
Converts spaces, underscores to hyphens and lowercases.
|
|
33
|
+
Examples:
|
|
34
|
+
"Dart Engineer" -> "dart-engineer"
|
|
35
|
+
"dart_engineer" -> "dart-engineer"
|
|
36
|
+
"DART-ENGINEER" -> "dart-engineer"
|
|
37
|
+
"""
|
|
38
|
+
return name.lower().replace(" ", "-").replace("_", "-")
|
|
39
|
+
|
|
40
|
+
|
|
29
41
|
class MultiSourceAgentDeploymentService:
|
|
30
42
|
"""Service for deploying agents from multiple sources with version comparison.
|
|
31
43
|
|
|
@@ -179,14 +191,14 @@ class MultiSourceAgentDeploymentService:
|
|
|
179
191
|
system_templates_dir: Optional[Path] = None,
|
|
180
192
|
project_agents_dir: Optional[Path] = None,
|
|
181
193
|
user_agents_dir: Optional[Path] = None,
|
|
182
|
-
|
|
194
|
+
agents_cache_dir: Optional[Path] = None,
|
|
183
195
|
working_directory: Optional[Path] = None,
|
|
184
196
|
) -> Dict[str, List[Dict[str, Any]]]:
|
|
185
|
-
"""Discover agents from all 4 tiers (system, user,
|
|
197
|
+
"""Discover agents from all 4 tiers (system, user, cache, project).
|
|
186
198
|
|
|
187
199
|
Priority hierarchy (highest to lowest):
|
|
188
200
|
4. Project agents - Highest priority, project-specific customizations
|
|
189
|
-
3.
|
|
201
|
+
3. Cached agents - GitHub-synced agents from cache
|
|
190
202
|
2. User agents - DEPRECATED, user-level customizations
|
|
191
203
|
1. System templates - Lowest priority, built-in agents
|
|
192
204
|
|
|
@@ -194,7 +206,7 @@ class MultiSourceAgentDeploymentService:
|
|
|
194
206
|
system_templates_dir: Directory containing system agent templates
|
|
195
207
|
project_agents_dir: Directory containing project-specific agents
|
|
196
208
|
user_agents_dir: Directory containing user custom agents (DEPRECATED)
|
|
197
|
-
|
|
209
|
+
agents_cache_dir: Directory containing cached agents from Git sources
|
|
198
210
|
working_directory: Current working directory for finding project agents
|
|
199
211
|
|
|
200
212
|
Returns:
|
|
@@ -225,12 +237,12 @@ class MultiSourceAgentDeploymentService:
|
|
|
225
237
|
if not user_agents_dir.exists():
|
|
226
238
|
user_agents_dir = None
|
|
227
239
|
|
|
228
|
-
if not
|
|
229
|
-
# Check for
|
|
240
|
+
if not agents_cache_dir:
|
|
241
|
+
# Check for agents in cache directory
|
|
230
242
|
cache_dir = Path.home() / ".claude-mpm" / "cache"
|
|
231
|
-
|
|
232
|
-
if not
|
|
233
|
-
|
|
243
|
+
agents_cache_dir = cache_dir / "agents"
|
|
244
|
+
if not agents_cache_dir.exists():
|
|
245
|
+
agents_cache_dir = None
|
|
234
246
|
|
|
235
247
|
# Discover agents from each source in priority order
|
|
236
248
|
# Note: We process in reverse priority order (system first) and build up the dictionary
|
|
@@ -238,7 +250,7 @@ class MultiSourceAgentDeploymentService:
|
|
|
238
250
|
sources = [
|
|
239
251
|
("system", system_templates_dir),
|
|
240
252
|
("user", user_agents_dir),
|
|
241
|
-
("remote",
|
|
253
|
+
("remote", agents_cache_dir),
|
|
242
254
|
("project", project_agents_dir),
|
|
243
255
|
]
|
|
244
256
|
|
|
@@ -323,7 +335,7 @@ class MultiSourceAgentDeploymentService:
|
|
|
323
335
|
def get_agents_by_collection(
|
|
324
336
|
self,
|
|
325
337
|
collection_id: str,
|
|
326
|
-
|
|
338
|
+
agents_cache_dir: Optional[Path] = None,
|
|
327
339
|
) -> List[Dict[str, Any]]:
|
|
328
340
|
"""Get all agents from a specific collection.
|
|
329
341
|
|
|
@@ -331,7 +343,7 @@ class MultiSourceAgentDeploymentService:
|
|
|
331
343
|
|
|
332
344
|
Args:
|
|
333
345
|
collection_id: Collection identifier (e.g., "bobmatnyc/claude-mpm-agents")
|
|
334
|
-
|
|
346
|
+
agents_cache_dir: Directory containing agents cache
|
|
335
347
|
|
|
336
348
|
Returns:
|
|
337
349
|
List of agent dictionaries from the specified collection
|
|
@@ -342,18 +354,16 @@ class MultiSourceAgentDeploymentService:
|
|
|
342
354
|
>>> len(agents)
|
|
343
355
|
45
|
|
344
356
|
"""
|
|
345
|
-
if not
|
|
357
|
+
if not agents_cache_dir:
|
|
346
358
|
cache_dir = Path.home() / ".claude-mpm" / "cache"
|
|
347
|
-
|
|
359
|
+
agents_cache_dir = cache_dir / "agents"
|
|
348
360
|
|
|
349
|
-
if not
|
|
350
|
-
self.logger.warning(
|
|
351
|
-
f"Remote agents directory not found: {remote_agents_dir}"
|
|
352
|
-
)
|
|
361
|
+
if not agents_cache_dir.exists():
|
|
362
|
+
self.logger.warning(f"Agents cache directory not found: {agents_cache_dir}")
|
|
353
363
|
return []
|
|
354
364
|
|
|
355
365
|
# Use RemoteAgentDiscoveryService to get collection agents
|
|
356
|
-
remote_service = RemoteAgentDiscoveryService(
|
|
366
|
+
remote_service = RemoteAgentDiscoveryService(agents_cache_dir)
|
|
357
367
|
collection_agents = remote_service.get_agents_by_collection(collection_id)
|
|
358
368
|
|
|
359
369
|
self.logger.info(
|
|
@@ -470,7 +480,7 @@ class MultiSourceAgentDeploymentService:
|
|
|
470
480
|
system_templates_dir: Optional[Path] = None,
|
|
471
481
|
project_agents_dir: Optional[Path] = None,
|
|
472
482
|
user_agents_dir: Optional[Path] = None,
|
|
473
|
-
|
|
483
|
+
agents_cache_dir: Optional[Path] = None,
|
|
474
484
|
working_directory: Optional[Path] = None,
|
|
475
485
|
excluded_agents: Optional[List[str]] = None,
|
|
476
486
|
config: Optional[Config] = None,
|
|
@@ -482,7 +492,7 @@ class MultiSourceAgentDeploymentService:
|
|
|
482
492
|
system_templates_dir: Directory containing system agent templates
|
|
483
493
|
project_agents_dir: Directory containing project-specific agents
|
|
484
494
|
user_agents_dir: Directory containing user custom agents (DEPRECATED)
|
|
485
|
-
|
|
495
|
+
agents_cache_dir: Directory containing cached agents from Git sources
|
|
486
496
|
working_directory: Current working directory for finding project agents
|
|
487
497
|
excluded_agents: List of agent names to exclude from deployment
|
|
488
498
|
config: Configuration object for additional filtering
|
|
@@ -499,7 +509,7 @@ class MultiSourceAgentDeploymentService:
|
|
|
499
509
|
system_templates_dir=system_templates_dir,
|
|
500
510
|
project_agents_dir=project_agents_dir,
|
|
501
511
|
user_agents_dir=user_agents_dir,
|
|
502
|
-
|
|
512
|
+
agents_cache_dir=agents_cache_dir,
|
|
503
513
|
working_directory=working_directory,
|
|
504
514
|
)
|
|
505
515
|
|
|
@@ -533,10 +543,42 @@ class MultiSourceAgentDeploymentService:
|
|
|
533
543
|
|
|
534
544
|
# Apply exclusion filters
|
|
535
545
|
if excluded_agents:
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
546
|
+
# Find agents to remove by matching normalized names
|
|
547
|
+
# Normalization handles: "Dart Engineer", "dart_engineer", "dart-engineer"
|
|
548
|
+
agents_to_remove = []
|
|
549
|
+
excluded_set = {_normalize_agent_name(name) for name in excluded_agents}
|
|
550
|
+
|
|
551
|
+
for canonical_id, agent_info in list(selected_agents.items()):
|
|
552
|
+
# Check agent name field (normalized)
|
|
553
|
+
agent_name = _normalize_agent_name(agent_info.get("name", ""))
|
|
554
|
+
|
|
555
|
+
# Also check the agent_id portion of canonical_id (after the colon)
|
|
556
|
+
# Example: "bobmatnyc/claude-mpm-agents:pm" -> "pm"
|
|
557
|
+
raw_agent_id = (
|
|
558
|
+
canonical_id.split(":")[-1] if ":" in canonical_id else canonical_id
|
|
559
|
+
)
|
|
560
|
+
agent_id = _normalize_agent_name(raw_agent_id)
|
|
561
|
+
|
|
562
|
+
# Check file stem from path (most reliable match)
|
|
563
|
+
file_stem = ""
|
|
564
|
+
path_str = agent_info.get("path") or agent_info.get("file_path")
|
|
565
|
+
if path_str:
|
|
566
|
+
file_stem = _normalize_agent_name(Path(path_str).stem)
|
|
567
|
+
|
|
568
|
+
if (
|
|
569
|
+
agent_name in excluded_set
|
|
570
|
+
or agent_id in excluded_set
|
|
571
|
+
or file_stem in excluded_set
|
|
572
|
+
):
|
|
573
|
+
agents_to_remove.append(canonical_id)
|
|
574
|
+
self.logger.info(
|
|
575
|
+
f"Excluding agent '{agent_info.get('name', raw_agent_id)}' "
|
|
576
|
+
f"(canonical_id: {canonical_id}) from deployment"
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
# Remove matched agents
|
|
580
|
+
for canonical_id in agents_to_remove:
|
|
581
|
+
del selected_agents[canonical_id]
|
|
540
582
|
|
|
541
583
|
# Apply config-based filtering if provided
|
|
542
584
|
if config:
|
|
@@ -585,6 +627,107 @@ class MultiSourceAgentDeploymentService:
|
|
|
585
627
|
|
|
586
628
|
return agents_to_deploy, agent_sources, cleanup_results
|
|
587
629
|
|
|
630
|
+
def cleanup_excluded_agents(
|
|
631
|
+
self,
|
|
632
|
+
deployed_agents_dir: Path,
|
|
633
|
+
agents_to_deploy: Dict[str, Path],
|
|
634
|
+
) -> Dict[str, Any]:
|
|
635
|
+
"""Remove agents from deployed directory that aren't in the deployment list.
|
|
636
|
+
|
|
637
|
+
Similar to skill cleanup logic, this removes agents that were previously
|
|
638
|
+
deployed but are no longer in the enabled agents list (e.g., filtered out
|
|
639
|
+
by profile configuration).
|
|
640
|
+
|
|
641
|
+
Args:
|
|
642
|
+
deployed_agents_dir: Directory containing deployed agents (~/.claude/agents)
|
|
643
|
+
agents_to_deploy: Dictionary mapping agent file stems to template paths
|
|
644
|
+
|
|
645
|
+
Returns:
|
|
646
|
+
Dictionary with cleanup results:
|
|
647
|
+
- removed: List of removed agent names
|
|
648
|
+
- errors: List of errors during cleanup
|
|
649
|
+
"""
|
|
650
|
+
cleanup_results = {"removed": [], "errors": []}
|
|
651
|
+
|
|
652
|
+
# Safety check - only operate on deployed agents directory
|
|
653
|
+
if not deployed_agents_dir.exists():
|
|
654
|
+
self.logger.debug(
|
|
655
|
+
"Deployed agents directory does not exist, no cleanup needed"
|
|
656
|
+
)
|
|
657
|
+
return cleanup_results
|
|
658
|
+
|
|
659
|
+
# Build set of agent names that should exist (file stems without .md extension)
|
|
660
|
+
expected_agents = set(agents_to_deploy.keys())
|
|
661
|
+
|
|
662
|
+
try:
|
|
663
|
+
# Check each file in deployed_agents_dir
|
|
664
|
+
for item in deployed_agents_dir.iterdir():
|
|
665
|
+
# Only process .md files
|
|
666
|
+
if not item.is_file() or item.suffix != ".md":
|
|
667
|
+
continue
|
|
668
|
+
|
|
669
|
+
# Skip hidden files
|
|
670
|
+
if item.name.startswith("."):
|
|
671
|
+
continue
|
|
672
|
+
|
|
673
|
+
# Get agent name (file stem)
|
|
674
|
+
agent_name = item.stem
|
|
675
|
+
|
|
676
|
+
# Check if this agent should be kept
|
|
677
|
+
if agent_name not in expected_agents:
|
|
678
|
+
try:
|
|
679
|
+
# Security: Validate path is within deployed_agents_dir
|
|
680
|
+
resolved_item = item.resolve()
|
|
681
|
+
resolved_target = deployed_agents_dir.resolve()
|
|
682
|
+
|
|
683
|
+
if not str(resolved_item).startswith(str(resolved_target)):
|
|
684
|
+
self.logger.error(
|
|
685
|
+
f"Refusing to remove path outside target directory: {item}"
|
|
686
|
+
)
|
|
687
|
+
cleanup_results["errors"].append(
|
|
688
|
+
{
|
|
689
|
+
"agent": agent_name,
|
|
690
|
+
"error": "Path outside target directory",
|
|
691
|
+
}
|
|
692
|
+
)
|
|
693
|
+
continue
|
|
694
|
+
|
|
695
|
+
# Remove the agent file
|
|
696
|
+
item.unlink()
|
|
697
|
+
cleanup_results["removed"].append(agent_name)
|
|
698
|
+
self.logger.info(f"Removed excluded agent: {agent_name}")
|
|
699
|
+
|
|
700
|
+
except PermissionError as e:
|
|
701
|
+
error_msg = f"Permission denied removing {agent_name}: {e}"
|
|
702
|
+
self.logger.error(error_msg)
|
|
703
|
+
cleanup_results["errors"].append(
|
|
704
|
+
{"agent": agent_name, "error": error_msg}
|
|
705
|
+
)
|
|
706
|
+
except Exception as e:
|
|
707
|
+
error_msg = f"Error removing {agent_name}: {e}"
|
|
708
|
+
self.logger.error(error_msg)
|
|
709
|
+
cleanup_results["errors"].append(
|
|
710
|
+
{"agent": agent_name, "error": error_msg}
|
|
711
|
+
)
|
|
712
|
+
|
|
713
|
+
except Exception as e:
|
|
714
|
+
self.logger.error(f"Error during agent cleanup: {e}")
|
|
715
|
+
cleanup_results["errors"].append(
|
|
716
|
+
{"agent": "cleanup_process", "error": str(e)}
|
|
717
|
+
)
|
|
718
|
+
|
|
719
|
+
# Log cleanup summary
|
|
720
|
+
if cleanup_results["removed"]:
|
|
721
|
+
self.logger.info(
|
|
722
|
+
f"Cleanup complete: removed {len(cleanup_results['removed'])} excluded agents"
|
|
723
|
+
)
|
|
724
|
+
if cleanup_results["errors"]:
|
|
725
|
+
self.logger.warning(
|
|
726
|
+
f"Encountered {len(cleanup_results['errors'])} errors during cleanup"
|
|
727
|
+
)
|
|
728
|
+
|
|
729
|
+
return cleanup_results
|
|
730
|
+
|
|
588
731
|
def cleanup_outdated_user_agents(
|
|
589
732
|
self,
|
|
590
733
|
agents_by_name: Dict[str, List[Dict[str, Any]]],
|
|
@@ -42,7 +42,7 @@ class RemoteAgentMetadata:
|
|
|
42
42
|
class RemoteAgentDiscoveryService:
|
|
43
43
|
"""Discovers and converts remote Markdown agents to JSON format.
|
|
44
44
|
|
|
45
|
-
Remote agents are discovered from the cache directory (~/.claude-mpm/cache/
|
|
45
|
+
Remote agents are discovered from the cache directory (~/.claude-mpm/cache/agents/)
|
|
46
46
|
where they are stored as Markdown files. This service:
|
|
47
47
|
1. Discovers all *.md files in the remote agents cache
|
|
48
48
|
2. Parses Markdown frontmatter and content to extract metadata
|
|
@@ -61,20 +61,20 @@ class RemoteAgentDiscoveryService:
|
|
|
61
61
|
- Flexibility: Supports optional sections with defaults
|
|
62
62
|
"""
|
|
63
63
|
|
|
64
|
-
def __init__(self,
|
|
64
|
+
def __init__(self, agents_cache_dir: Path):
|
|
65
65
|
"""Initialize the remote agent discovery service.
|
|
66
66
|
|
|
67
67
|
Args:
|
|
68
|
-
|
|
68
|
+
agents_cache_dir: Directory containing cached agent Markdown files
|
|
69
69
|
"""
|
|
70
|
-
self.
|
|
70
|
+
self.agents_cache_dir = agents_cache_dir
|
|
71
71
|
self.logger = get_logger(__name__)
|
|
72
72
|
|
|
73
73
|
def _extract_collection_id_from_path(self, file_path: Path) -> Optional[str]:
|
|
74
74
|
"""Extract collection_id from repository path structure.
|
|
75
75
|
|
|
76
76
|
Collection ID is derived from the repository path structure:
|
|
77
|
-
~/.claude-mpm/cache/
|
|
77
|
+
~/.claude-mpm/cache/agents/{owner}/{repo}/agents/...
|
|
78
78
|
|
|
79
79
|
Args:
|
|
80
80
|
file_path: Absolute path to agent Markdown file
|
|
@@ -83,28 +83,29 @@ class RemoteAgentDiscoveryService:
|
|
|
83
83
|
Collection ID in format "owner/repo-name" or None if not found
|
|
84
84
|
|
|
85
85
|
Example:
|
|
86
|
-
Input: ~/.claude-mpm/cache/
|
|
86
|
+
Input: ~/.claude-mpm/cache/agents/bobmatnyc/claude-mpm-agents/agents/pm.md
|
|
87
87
|
Output: "bobmatnyc/claude-mpm-agents"
|
|
88
88
|
"""
|
|
89
89
|
try:
|
|
90
|
-
# Find "
|
|
90
|
+
# Find "agents" cache directory in the path (looking for .claude-mpm/cache/agents)
|
|
91
91
|
path_parts = file_path.parts
|
|
92
|
-
|
|
92
|
+
agents_cache_idx = -1
|
|
93
93
|
|
|
94
94
|
for i, part in enumerate(path_parts):
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
# Look for cache/agents pattern
|
|
96
|
+
if part == "agents" and i > 0 and path_parts[i - 1] == "cache":
|
|
97
|
+
agents_cache_idx = i
|
|
97
98
|
break
|
|
98
99
|
|
|
99
|
-
if
|
|
100
|
+
if agents_cache_idx == -1 or agents_cache_idx + 2 >= len(path_parts):
|
|
100
101
|
self.logger.debug(
|
|
101
102
|
f"Could not extract collection_id from path: {file_path}"
|
|
102
103
|
)
|
|
103
104
|
return None
|
|
104
105
|
|
|
105
|
-
# Extract owner and repo (next two parts after "
|
|
106
|
-
owner = path_parts[
|
|
107
|
-
repo = path_parts[
|
|
106
|
+
# Extract owner and repo (next two parts after "cache/agents")
|
|
107
|
+
owner = path_parts[agents_cache_idx + 1]
|
|
108
|
+
repo = path_parts[agents_cache_idx + 2]
|
|
108
109
|
|
|
109
110
|
collection_id = f"{owner}/{repo}"
|
|
110
111
|
self.logger.debug(f"Extracted collection_id: {collection_id}")
|
|
@@ -128,25 +129,26 @@ class RemoteAgentDiscoveryService:
|
|
|
128
129
|
Relative path from repo root, or None if not found
|
|
129
130
|
|
|
130
131
|
Example:
|
|
131
|
-
Input: ~/.claude-mpm/cache/
|
|
132
|
+
Input: ~/.claude-mpm/cache/agents/bobmatnyc/claude-mpm-agents/agents/pm.md
|
|
132
133
|
Output: "agents/pm.md"
|
|
133
134
|
"""
|
|
134
135
|
try:
|
|
135
|
-
# Find "
|
|
136
|
+
# Find "agents" cache directory in the path
|
|
136
137
|
path_parts = file_path.parts
|
|
137
|
-
|
|
138
|
+
agents_cache_idx = -1
|
|
138
139
|
|
|
139
140
|
for i, part in enumerate(path_parts):
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
# Look for cache/agents pattern
|
|
142
|
+
if part == "agents" and i > 0 and path_parts[i - 1] == "cache":
|
|
143
|
+
agents_cache_idx = i
|
|
142
144
|
break
|
|
143
145
|
|
|
144
|
-
if
|
|
146
|
+
if agents_cache_idx == -1 or agents_cache_idx + 3 >= len(path_parts):
|
|
145
147
|
return None
|
|
146
148
|
|
|
147
149
|
# Path after owner/repo is the source path
|
|
148
|
-
#
|
|
149
|
-
repo_root_idx =
|
|
150
|
+
# cache/agents/{owner}/{repo}/{source_path}
|
|
151
|
+
repo_root_idx = agents_cache_idx + 3
|
|
150
152
|
source_parts = path_parts[repo_root_idx:]
|
|
151
153
|
|
|
152
154
|
return "/".join(source_parts)
|
|
@@ -273,7 +275,7 @@ class RemoteAgentDiscoveryService:
|
|
|
273
275
|
|
|
274
276
|
Supports both cache structures:
|
|
275
277
|
1. Git repo: Calculate relative to /agents/ subdirectory
|
|
276
|
-
2. Flattened cache: Calculate relative to
|
|
278
|
+
2. Flattened cache: Calculate relative to agents_cache_dir directly
|
|
277
279
|
|
|
278
280
|
Example (Git repo):
|
|
279
281
|
Input: /cache/bobmatnyc/claude-mpm-agents/agents/engineer/backend/python-engineer.md
|
|
@@ -281,8 +283,8 @@ class RemoteAgentDiscoveryService:
|
|
|
281
283
|
Output: engineer/backend/python-engineer
|
|
282
284
|
|
|
283
285
|
Example (Flattened cache):
|
|
284
|
-
Input: /cache/
|
|
285
|
-
Root: /cache/
|
|
286
|
+
Input: /cache/agents/engineer/python-engineer.md
|
|
287
|
+
Root: /cache/agents
|
|
286
288
|
Output: engineer/python-engineer
|
|
287
289
|
|
|
288
290
|
Args:
|
|
@@ -293,7 +295,7 @@ class RemoteAgentDiscoveryService:
|
|
|
293
295
|
"""
|
|
294
296
|
try:
|
|
295
297
|
# Try git repo structure first: /agents/ subdirectory
|
|
296
|
-
agents_dir = self.
|
|
298
|
+
agents_dir = self.agents_cache_dir / "agents"
|
|
297
299
|
if agents_dir.exists():
|
|
298
300
|
try:
|
|
299
301
|
relative_path = file_path.relative_to(agents_dir)
|
|
@@ -301,12 +303,12 @@ class RemoteAgentDiscoveryService:
|
|
|
301
303
|
except ValueError:
|
|
302
304
|
pass # Not under agents_dir, try flattened structure
|
|
303
305
|
|
|
304
|
-
# Try flattened cache structure: calculate relative to
|
|
306
|
+
# Try flattened cache structure: calculate relative to agents_cache_dir
|
|
305
307
|
try:
|
|
306
|
-
relative_path = file_path.relative_to(self.
|
|
308
|
+
relative_path = file_path.relative_to(self.agents_cache_dir)
|
|
307
309
|
return str(relative_path.with_suffix("")).replace("\\", "/")
|
|
308
310
|
except ValueError:
|
|
309
|
-
pass # Not under
|
|
311
|
+
pass # Not under agents_cache_dir either
|
|
310
312
|
|
|
311
313
|
# Fall back to filename
|
|
312
314
|
self.logger.warning(
|
|
@@ -327,7 +329,7 @@ class RemoteAgentDiscoveryService:
|
|
|
327
329
|
|
|
328
330
|
Supports both cache structures:
|
|
329
331
|
1. Git repo: Calculate relative to /agents/ subdirectory
|
|
330
|
-
2. Flattened cache: Calculate relative to
|
|
332
|
+
2. Flattened cache: Calculate relative to agents_cache_dir directly
|
|
331
333
|
|
|
332
334
|
Example (Git repo):
|
|
333
335
|
Input: /cache/bobmatnyc/claude-mpm-agents/agents/engineer/backend/python-engineer.md
|
|
@@ -335,8 +337,8 @@ class RemoteAgentDiscoveryService:
|
|
|
335
337
|
Output: engineer/backend
|
|
336
338
|
|
|
337
339
|
Example (Flattened cache):
|
|
338
|
-
Input: /cache/
|
|
339
|
-
Root: /cache/
|
|
340
|
+
Input: /cache/agents/engineer/python-engineer.md
|
|
341
|
+
Root: /cache/agents
|
|
340
342
|
Output: engineer
|
|
341
343
|
|
|
342
344
|
Args:
|
|
@@ -347,7 +349,7 @@ class RemoteAgentDiscoveryService:
|
|
|
347
349
|
"""
|
|
348
350
|
try:
|
|
349
351
|
# Try git repo structure first: /agents/ subdirectory
|
|
350
|
-
agents_dir = self.
|
|
352
|
+
agents_dir = self.agents_cache_dir / "agents"
|
|
351
353
|
if agents_dir.exists():
|
|
352
354
|
try:
|
|
353
355
|
relative_path = file_path.relative_to(agents_dir)
|
|
@@ -356,13 +358,13 @@ class RemoteAgentDiscoveryService:
|
|
|
356
358
|
except ValueError:
|
|
357
359
|
pass # Not under agents_dir, try flattened structure
|
|
358
360
|
|
|
359
|
-
# Try flattened cache structure: calculate relative to
|
|
361
|
+
# Try flattened cache structure: calculate relative to agents_cache_dir
|
|
360
362
|
try:
|
|
361
|
-
relative_path = file_path.relative_to(self.
|
|
363
|
+
relative_path = file_path.relative_to(self.agents_cache_dir)
|
|
362
364
|
parts = relative_path.parts[:-1] # Exclude filename
|
|
363
365
|
return "/".join(parts) if parts else "universal"
|
|
364
366
|
except ValueError:
|
|
365
|
-
pass # Not under
|
|
367
|
+
pass # Not under agents_cache_dir either
|
|
366
368
|
|
|
367
369
|
return "universal"
|
|
368
370
|
except Exception:
|
|
@@ -385,7 +387,7 @@ class RemoteAgentDiscoveryService:
|
|
|
385
387
|
List of agent dictionaries in JSON template format
|
|
386
388
|
|
|
387
389
|
Example:
|
|
388
|
-
>>> service = RemoteAgentDiscoveryService(Path("~/.claude-mpm/cache/
|
|
390
|
+
>>> service = RemoteAgentDiscoveryService(Path("~/.claude-mpm/cache/agents"))
|
|
389
391
|
>>> agents = service.discover_remote_agents()
|
|
390
392
|
>>> len(agents)
|
|
391
393
|
5
|
|
@@ -394,20 +396,21 @@ class RemoteAgentDiscoveryService:
|
|
|
394
396
|
"""
|
|
395
397
|
agents = []
|
|
396
398
|
|
|
397
|
-
if not self.
|
|
399
|
+
if not self.agents_cache_dir.exists():
|
|
398
400
|
self.logger.debug(
|
|
399
|
-
f"
|
|
401
|
+
f"Agents cache directory does not exist: {self.agents_cache_dir}"
|
|
400
402
|
)
|
|
401
403
|
return agents
|
|
402
404
|
|
|
403
|
-
# Support
|
|
405
|
+
# Support four cache structures (PRIORITY ORDER):
|
|
404
406
|
# 1. Built output: {path}/dist/agents/ - PREFERRED (built with BASE-AGENT composition)
|
|
405
407
|
# 2. Git repo path: {path}/agents/ - source files (fallback)
|
|
406
|
-
# 3.
|
|
408
|
+
# 3. Owner/repo structure: {path}/{owner}/{repo}/agents/ - GitHub sync structure
|
|
409
|
+
# 4. Flattened cache: {path}/ - directly contains category directories (legacy)
|
|
407
410
|
|
|
408
411
|
# Priority 1: Check for dist/agents/ (built output with BASE-AGENT composition)
|
|
409
|
-
dist_agents_dir = self.
|
|
410
|
-
agents_dir = self.
|
|
412
|
+
dist_agents_dir = self.agents_cache_dir / "dist" / "agents"
|
|
413
|
+
agents_dir = self.agents_cache_dir / "agents"
|
|
411
414
|
|
|
412
415
|
if dist_agents_dir.exists():
|
|
413
416
|
# PREFERRED: Use built agents from dist/agents/
|
|
@@ -420,32 +423,52 @@ class RemoteAgentDiscoveryService:
|
|
|
420
423
|
self.logger.debug(f"Using source agents (no dist/ found): {agents_dir}")
|
|
421
424
|
scan_dir = agents_dir
|
|
422
425
|
else:
|
|
423
|
-
#
|
|
424
|
-
#
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
"
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
scan_dir =
|
|
426
|
+
# Priority 3: Check for {owner}/{repo}/agents/ structure (GitHub sync)
|
|
427
|
+
# e.g., ~/.claude-mpm/cache/agents/bobmatnyc/claude-mpm-agents/agents/
|
|
428
|
+
owner_repo_agents_dir = None
|
|
429
|
+
for owner_dir in self.agents_cache_dir.iterdir():
|
|
430
|
+
if owner_dir.is_dir() and not owner_dir.name.startswith("."):
|
|
431
|
+
for repo_dir in owner_dir.iterdir():
|
|
432
|
+
if repo_dir.is_dir():
|
|
433
|
+
potential_agents = repo_dir / "agents"
|
|
434
|
+
if potential_agents.exists():
|
|
435
|
+
owner_repo_agents_dir = potential_agents
|
|
436
|
+
self.logger.debug(
|
|
437
|
+
f"Using GitHub sync structure: {owner_repo_agents_dir}"
|
|
438
|
+
)
|
|
439
|
+
break
|
|
440
|
+
if owner_repo_agents_dir:
|
|
441
|
+
break
|
|
442
|
+
|
|
443
|
+
if owner_repo_agents_dir:
|
|
444
|
+
scan_dir = owner_repo_agents_dir
|
|
442
445
|
else:
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
446
|
+
# LEGACY: Flattened cache structure - scan root directly
|
|
447
|
+
# Check if this looks like the flattened cache (has category subdirectories)
|
|
448
|
+
category_dirs = [
|
|
449
|
+
"universal",
|
|
450
|
+
"engineer",
|
|
451
|
+
"ops",
|
|
452
|
+
"qa",
|
|
453
|
+
"security",
|
|
454
|
+
"documentation",
|
|
455
|
+
]
|
|
456
|
+
has_categories = any(
|
|
457
|
+
(self.agents_cache_dir / cat).exists() for cat in category_dirs
|
|
447
458
|
)
|
|
448
|
-
|
|
459
|
+
|
|
460
|
+
if has_categories:
|
|
461
|
+
self.logger.debug(
|
|
462
|
+
f"Using flattened cache structure: {self.agents_cache_dir}"
|
|
463
|
+
)
|
|
464
|
+
scan_dir = self.agents_cache_dir
|
|
465
|
+
else:
|
|
466
|
+
self.logger.warning(
|
|
467
|
+
f"No agent directories found. Checked: {dist_agents_dir}, {agents_dir}, "
|
|
468
|
+
f"owner/repo/agents/ structure, and category directories in {self.agents_cache_dir}. "
|
|
469
|
+
"Expected agents in /dist/agents/, /agents/, owner/repo/agents/, or category directories."
|
|
470
|
+
)
|
|
471
|
+
return agents
|
|
449
472
|
|
|
450
473
|
# Find all Markdown files recursively
|
|
451
474
|
md_files = list(scan_dir.rglob("*.md"))
|
|
@@ -468,6 +491,9 @@ class RemoteAgentDiscoveryService:
|
|
|
468
491
|
"SKILL.md",
|
|
469
492
|
"SKILLS.md",
|
|
470
493
|
"skill-template.md",
|
|
494
|
+
# Legacy agents superseded by newer versions
|
|
495
|
+
# TODO: Remove after bobmatnyc/claude-mpm-agents#XXX is merged
|
|
496
|
+
"memory-manager.md", # Superseded by memory-manager-agent.md (v1.2.0)
|
|
471
497
|
}
|
|
472
498
|
md_files = [f for f in md_files if f.name not in excluded_files]
|
|
473
499
|
|
|
@@ -482,16 +508,16 @@ class RemoteAgentDiscoveryService:
|
|
|
482
508
|
|
|
483
509
|
# In flattened cache mode, also exclude files from git repository subdirectories
|
|
484
510
|
# (files under directories that contain .git folder)
|
|
485
|
-
if scan_dir == self.
|
|
511
|
+
if scan_dir == self.agents_cache_dir:
|
|
486
512
|
filtered_files = []
|
|
487
513
|
for f in md_files:
|
|
488
514
|
# Check if this file is inside a git repository (has .git in path)
|
|
489
|
-
# Git repos are at {
|
|
490
|
-
path_parts = f.relative_to(self.
|
|
515
|
+
# Git repos are at {agents_cache_dir}/{owner}/{repo}/.git
|
|
516
|
+
path_parts = f.relative_to(self.agents_cache_dir).parts
|
|
491
517
|
if len(path_parts) >= 2:
|
|
492
518
|
# Check if this looks like a git repo path (owner/repo)
|
|
493
519
|
potential_repo = (
|
|
494
|
-
self.
|
|
520
|
+
self.agents_cache_dir / path_parts[0] / path_parts[1]
|
|
495
521
|
)
|
|
496
522
|
if (potential_repo / ".git").exists():
|
|
497
523
|
# This file is in a git repo, skip it (we'll handle git repos separately)
|
|
@@ -518,7 +544,7 @@ class RemoteAgentDiscoveryService:
|
|
|
518
544
|
self.logger.warning(f"Failed to parse remote agent {md_file.name}: {e}")
|
|
519
545
|
|
|
520
546
|
self.logger.info(
|
|
521
|
-
f"Discovered {len(agents)} remote agents from {self.
|
|
547
|
+
f"Discovered {len(agents)} remote agents from {self.agents_cache_dir.name}"
|
|
522
548
|
)
|
|
523
549
|
return agents
|
|
524
550
|
|
|
@@ -735,7 +761,7 @@ class RemoteAgentDiscoveryService:
|
|
|
735
761
|
RemoteAgentMetadata if found, None otherwise
|
|
736
762
|
"""
|
|
737
763
|
# Bug #4 fix: Search in /agents/ subdirectory, not root directory
|
|
738
|
-
agents_dir = self.
|
|
764
|
+
agents_dir = self.agents_cache_dir / "agents"
|
|
739
765
|
if not agents_dir.exists():
|
|
740
766
|
return None
|
|
741
767
|
|
|
@@ -767,7 +793,7 @@ class RemoteAgentDiscoveryService:
|
|
|
767
793
|
List of agent dictionaries from the specified collection
|
|
768
794
|
|
|
769
795
|
Example:
|
|
770
|
-
>>> service = RemoteAgentDiscoveryService(Path("~/.claude-mpm/cache/
|
|
796
|
+
>>> service = RemoteAgentDiscoveryService(Path("~/.claude-mpm/cache/agents"))
|
|
771
797
|
>>> agents = service.get_agents_by_collection("bobmatnyc/claude-mpm-agents")
|
|
772
798
|
>>> len(agents)
|
|
773
799
|
45
|
|
@@ -795,7 +821,7 @@ class RemoteAgentDiscoveryService:
|
|
|
795
821
|
- agents: List of agent IDs in collection
|
|
796
822
|
|
|
797
823
|
Example:
|
|
798
|
-
>>> service = RemoteAgentDiscoveryService(Path("~/.claude-mpm/cache/
|
|
824
|
+
>>> service = RemoteAgentDiscoveryService(Path("~/.claude-mpm/cache/agents"))
|
|
799
825
|
>>> collections = service.list_collections()
|
|
800
826
|
>>> collections
|
|
801
827
|
[
|