claude-mpm 5.4.71__py3-none-any.whl → 5.6.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/CLAUDE_MPM_OUTPUT_STYLE.md +8 -5
- claude_mpm/agents/CLAUDE_MPM_RESEARCH_OUTPUT_STYLE.md +413 -0
- claude_mpm/agents/PM_INSTRUCTIONS.md +101 -703
- claude_mpm/agents/WORKFLOW.md +2 -0
- claude_mpm/agents/templates/circuit-breakers.md +26 -17
- claude_mpm/cli/commands/agents.py +2 -4
- claude_mpm/cli/commands/agents_reconcile.py +197 -0
- claude_mpm/cli/commands/autotodos.py +566 -0
- claude_mpm/cli/commands/commander.py +46 -0
- claude_mpm/cli/commands/configure.py +620 -21
- 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 +2 -2
- claude_mpm/cli/commands/run.py +35 -3
- claude_mpm/cli/commands/skills.py +166 -14
- claude_mpm/cli/executor.py +119 -16
- claude_mpm/cli/interactive/__init__.py +10 -0
- claude_mpm/cli/interactive/agent_wizard.py +30 -50
- 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 +71 -1
- claude_mpm/cli/parsers/commander_parser.py +83 -0
- claude_mpm/cli/parsers/run_parser.py +10 -0
- claude_mpm/cli/startup.py +183 -348
- claude_mpm/cli/startup_display.py +72 -5
- claude_mpm/cli/startup_logging.py +2 -2
- claude_mpm/cli/utils.py +7 -3
- claude_mpm/commander/__init__.py +72 -0
- claude_mpm/commander/adapters/__init__.py +31 -0
- claude_mpm/commander/adapters/base.py +191 -0
- claude_mpm/commander/adapters/claude_code.py +361 -0
- claude_mpm/commander/adapters/communication.py +366 -0
- claude_mpm/commander/api/__init__.py +16 -0
- claude_mpm/commander/api/app.py +105 -0
- claude_mpm/commander/api/errors.py +112 -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 +215 -0
- claude_mpm/commander/api/routes/work.py +260 -0
- claude_mpm/commander/api/schemas.py +182 -0
- claude_mpm/commander/chat/__init__.py +7 -0
- claude_mpm/commander/chat/cli.py +107 -0
- claude_mpm/commander/chat/commands.py +96 -0
- claude_mpm/commander/chat/repl.py +310 -0
- claude_mpm/commander/config.py +49 -0
- claude_mpm/commander/config_loader.py +115 -0
- claude_mpm/commander/daemon.py +398 -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 +143 -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 +337 -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/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 +404 -0
- claude_mpm/commander/runtime/__init__.py +10 -0
- claude_mpm/commander/runtime/executor.py +191 -0
- claude_mpm/commander/runtime/monitor.py +316 -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 +189 -0
- claude_mpm/commander/work/queue.py +405 -0
- claude_mpm/commander/workflow/__init__.py +27 -0
- claude_mpm/commander/workflow/event_handler.py +219 -0
- claude_mpm/commander/workflow/notifier.py +146 -0
- claude_mpm/commands/mpm-config.md +8 -0
- claude_mpm/commands/mpm-doctor.md +8 -0
- claude_mpm/commands/mpm-help.md +8 -0
- claude_mpm/commands/mpm-init.md +8 -0
- claude_mpm/commands/mpm-monitor.md +8 -0
- claude_mpm/commands/mpm-organize.md +8 -0
- claude_mpm/commands/mpm-postmortem.md +8 -0
- claude_mpm/commands/mpm-session-resume.md +9 -1
- claude_mpm/commands/mpm-status.md +8 -0
- claude_mpm/commands/mpm-ticket-view.md +8 -0
- claude_mpm/commands/mpm-version.md +8 -0
- claude_mpm/commands/mpm.md +8 -0
- claude_mpm/config/agent_presets.py +8 -7
- claude_mpm/constants.py +1 -0
- claude_mpm/core/claude_runner.py +2 -2
- claude_mpm/core/config.py +5 -0
- claude_mpm/core/hook_manager.py +51 -3
- claude_mpm/core/interactive_session.py +7 -7
- claude_mpm/core/logger.py +26 -9
- claude_mpm/core/logging_utils.py +35 -11
- claude_mpm/core/output_style_manager.py +27 -9
- claude_mpm/core/unified_config.py +54 -8
- claude_mpm/core/unified_paths.py +95 -90
- 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/{Cs_tUR18.js → 1WZnGYqX.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{CDuw-vjf.js → 67pF3qNn.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{bTOqqlTd.js → 6RxdMKe4.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{DwBR2MJi.js → 8cZrfX0h.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{ZGh7QtNv.js → 9a6T2nm-.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{D9lljYKQ.js → B443AUzu.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{RJiighC3.js → B8AwtY2H.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{uuIeMWc-.js → BF15LAsF.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{D3k0OPJN.js → BRcwIQNr.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{CyWMqx4W.js → BV6nKitt.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{CiIAseT4.js → BViJ8lZt.js} +5 -5
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{CBBdVcY8.js → BcQ-Q0FE.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{BovzEFCE.js → Bpyvgze_.js} +1 -1
- 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/{eNVUfhuA.js → C3rbW_a-.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{GYwsonyD.js → C8WYN38h.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{BIF9m_hv.js → C9I8FlXH.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{B0uc0UOD.js → CIQcWgO2.js} +3 -3
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{Be7GpZd6.js → CIctN7YN.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{Bh0LDWpI.js → CKrS_JZW.js} +2 -2
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{DUrLdbGD.js → CR6P9C4A.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{B7xVLGWV.js → CRRR9MD_.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/CRcR2DqT.js +334 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{Dhb8PKl3.js → CSXtMOf0.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{BPYeabCQ.js → CT-sbxSk.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{sQeU3Y1z.js → CWm6DJsp.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{CnA0NrzZ.js → CpqQ1Kzn.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{C4B-KCzX.js → D2nGpDRe.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{DGkLK5U1.js → D9iCMida.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{BofRWZRR.js → D9ykgMoY.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{DmxopI1J.js → DL2Ldur1.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{C30mlcqg.js → DPfltzjH.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{Vzk33B_K.js → DR8nis88.js} +2 -2
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{DI7hHRFL.js → DUliQN2b.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{C4JcI4KD.js → DXlhR01x.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{bT1r9zLR.js → D_lyTybS.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{DZX00Y4g.js → DngoTTgh.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{CzZX-COe.js → DqkmHtDC.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{B7RN905-.js → DsDh8EYs.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{DLVjFsZ3.js → DypDmXgd.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{iEWssX7S.js → IPYC-LnN.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/JTLiF7dt.js +24 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{DaimHw_p.js → JpevfAFt.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{DY1XQ8fi.js → R8CEIRAd.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{Dle-35c7.js → Zxy7qc-l.js} +2 -2
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/q9Hm6zAU.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{C_Usid8X.js → qtd3IeO4.js} +2 -2
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{CzeYkLYB.js → ulBFON_C.js} +2 -2
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/{Cfqx1Qun.js → wQVh1CoA.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/entry/{app.D6-I5TpK.js → app.Dr7t0z2J.js} +2 -2
- claude_mpm/dashboard/static/svelte-build/_app/immutable/entry/start.BGhZHUS3.js +1 -0
- claude_mpm/dashboard/static/svelte-build/_app/immutable/nodes/{0.m1gL8KXf.js → 0.RgBboRvH.js} +1 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/nodes/{1.CgNOuw-d.js → 1.DG-KkbDf.js} +1 -1
- 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 -1
- claude_mpm/dashboard/static/svelte-build/index.html +9 -9
- 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/auto_pause_handler.py +486 -0
- claude_mpm/hooks/claude_hooks/event_handlers.py +254 -11
- claude_mpm/hooks/claude_hooks/hook_handler.py +106 -89
- claude_mpm/hooks/claude_hooks/hook_wrapper.sh +6 -11
- claude_mpm/hooks/claude_hooks/installer.py +75 -8
- claude_mpm/hooks/claude_hooks/memory_integration.py +22 -11
- claude_mpm/hooks/claude_hooks/response_tracking.py +3 -1
- claude_mpm/hooks/claude_hooks/services/connection_manager.py +20 -0
- claude_mpm/hooks/claude_hooks/services/connection_manager_http.py +14 -77
- claude_mpm/hooks/claude_hooks/services/subagent_processor.py +30 -6
- claude_mpm/hooks/session_resume_hook.py +85 -1
- claude_mpm/init.py +1 -1
- claude_mpm/scripts/claude-hook-handler.sh +39 -12
- claude_mpm/services/agents/agent_recommendation_service.py +8 -8
- claude_mpm/services/agents/cache_git_manager.py +1 -1
- claude_mpm/services/agents/deployment/deployment_reconciler.py +577 -0
- claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +3 -0
- claude_mpm/services/agents/deployment/startup_reconciliation.py +138 -0
- claude_mpm/services/agents/loading/framework_agent_loader.py +75 -2
- 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/delegation_detector.py +175 -0
- claude_mpm/services/diagnostics/checks/agent_sources_check.py +30 -0
- 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/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 +8 -2
- claude_mpm/services/monitor/server.py +106 -16
- claude_mpm/services/pm_skills_deployer.py +259 -87
- claude_mpm/services/skills/git_skill_source_manager.py +56 -3
- claude_mpm/services/skills/selective_skill_deployer.py +114 -26
- claude_mpm/services/skills/skill_discovery_service.py +57 -3
- claude_mpm/services/socketio/handlers/hook.py +14 -7
- claude_mpm/services/socketio/server/main.py +12 -4
- 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-doctor/SKILL.md +53 -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-session-management/SKILL.md +312 -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/{pm-teaching-mode → mpm-teaching-mode}/SKILL.md +2 -2
- claude_mpm/skills/bundled/pm/mpm-ticket-view/SKILL.md +110 -0
- claude_mpm/skills/bundled/pm/mpm-tool-usage-guide/SKILL.md +386 -0
- claude_mpm/skills/bundled/pm/mpm-version/SKILL.md +21 -0
- claude_mpm/skills/skill_manager.py +4 -4
- claude_mpm/utils/agent_dependency_loader.py +4 -2
- claude_mpm/utils/robust_installer.py +10 -6
- claude_mpm-5.6.3.dist-info/METADATA +391 -0
- {claude_mpm-5.4.71.dist-info → claude_mpm-5.6.3.dist-info}/RECORD +261 -179
- claude_mpm/dashboard/static/svelte-build/_app/immutable/assets/0.DWzvg0-y.css +0 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/assets/2.ThTw9_ym.css +0 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/4TdZjIqw.js +0 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/5shd3_w0.js +0 -24
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/BKjSRqUr.js +0 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Da0KfYnO.js +0 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/chunks/Dfy6j1xT.js +0 -323
- claude_mpm/dashboard/static/svelte-build/_app/immutable/entry/start.NWzMBYRp.js +0 -1
- claude_mpm/dashboard/static/svelte-build/_app/immutable/nodes/2.C0GcWctS.js +0 -1
- claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-312.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__/event_handlers.cpython-312.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-312.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/installer.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-312.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-312.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-312.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/__init__.cpython-312.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__/connection_manager_http.cpython-312.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/duplicate_detector.cpython-312.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/state_manager.cpython-312.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-311.pyc +0 -0
- claude_mpm/hooks/claude_hooks/services/__pycache__/subagent_processor.cpython-312.pyc +0 -0
- claude_mpm-5.4.71.dist-info/METADATA +0 -1005
- /claude_mpm/skills/bundled/pm/{pm-delegation-patterns → mpm-delegation-patterns}/SKILL.md +0 -0
- /claude_mpm/skills/bundled/pm/{pm-git-file-tracking → mpm-git-file-tracking}/SKILL.md +0 -0
- /claude_mpm/skills/bundled/pm/{pm-pr-workflow → mpm-pr-workflow}/SKILL.md +0 -0
- /claude_mpm/skills/bundled/pm/{pm-ticketing-integration → mpm-ticketing-integration}/SKILL.md +0 -0
- /claude_mpm/skills/bundled/pm/{pm-verification-protocols → mpm-verification-protocols}/SKILL.md +0 -0
- {claude_mpm-5.4.71.dist-info → claude_mpm-5.6.3.dist-info}/WHEEL +0 -0
- {claude_mpm-5.4.71.dist-info → claude_mpm-5.6.3.dist-info}/entry_points.txt +0 -0
- {claude_mpm-5.4.71.dist-info → claude_mpm-5.6.3.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-5.4.71.dist-info → claude_mpm-5.6.3.dist-info}/licenses/LICENSE-FAQ.md +0 -0
- {claude_mpm-5.4.71.dist-info → claude_mpm-5.6.3.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ Claude Code hook events.
|
|
|
7
7
|
|
|
8
8
|
import os
|
|
9
9
|
import re
|
|
10
|
-
import subprocess
|
|
10
|
+
import subprocess # nosec B404 - subprocess used for safe claude CLI version checking only
|
|
11
11
|
import sys
|
|
12
12
|
import uuid
|
|
13
13
|
from datetime import datetime, timezone
|
|
@@ -115,7 +115,7 @@ class EventHandlers:
|
|
|
115
115
|
f"Stored prompt for comprehensive tracking: session {session_id[:8]}...",
|
|
116
116
|
file=sys.stderr,
|
|
117
117
|
)
|
|
118
|
-
except Exception:
|
|
118
|
+
except Exception: # nosec B110
|
|
119
119
|
# Response tracking is optional - silently continue if it fails
|
|
120
120
|
pass
|
|
121
121
|
|
|
@@ -189,8 +189,34 @@ class EventHandlers:
|
|
|
189
189
|
if tool_name == "Task" and isinstance(tool_input, dict):
|
|
190
190
|
self._handle_task_delegation(tool_input, pre_tool_data, session_id)
|
|
191
191
|
|
|
192
|
+
# Record tool call for auto-pause if active
|
|
193
|
+
auto_pause = getattr(self.hook_handler, "auto_pause_handler", None)
|
|
194
|
+
if auto_pause and auto_pause.is_pause_active():
|
|
195
|
+
try:
|
|
196
|
+
auto_pause.on_tool_call(tool_name, tool_input)
|
|
197
|
+
except Exception as e:
|
|
198
|
+
if DEBUG:
|
|
199
|
+
print(f"Auto-pause tool recording error: {e}", file=sys.stderr)
|
|
200
|
+
|
|
192
201
|
self.hook_handler._emit_socketio_event("", "pre_tool", pre_tool_data)
|
|
193
202
|
|
|
203
|
+
# Handle TodoWrite specially - emit dedicated todo_updated event
|
|
204
|
+
# WHY: Frontend expects todo_updated events for dashboard display
|
|
205
|
+
# The broadcaster.todo_updated() method exists but was never called
|
|
206
|
+
if tool_name == "TodoWrite" and tool_params.get("todos"):
|
|
207
|
+
todo_data = {
|
|
208
|
+
"todos": tool_params["todos"],
|
|
209
|
+
"total_count": len(tool_params["todos"]),
|
|
210
|
+
"session_id": session_id,
|
|
211
|
+
"timestamp": timestamp,
|
|
212
|
+
}
|
|
213
|
+
self.hook_handler._emit_socketio_event("", "todo_updated", todo_data)
|
|
214
|
+
if DEBUG:
|
|
215
|
+
print(
|
|
216
|
+
f" - Emitted todo_updated event with {len(tool_params['todos'])} todos for session {session_id[:8]}...",
|
|
217
|
+
file=sys.stderr,
|
|
218
|
+
)
|
|
219
|
+
|
|
194
220
|
def _handle_task_delegation(
|
|
195
221
|
self, tool_input: dict, pre_tool_data: dict, session_id: str
|
|
196
222
|
):
|
|
@@ -271,7 +297,7 @@ class EventHandlers:
|
|
|
271
297
|
mhm = getattr(self.hook_handler, "memory_hook_manager", None)
|
|
272
298
|
if mhm and hasattr(mhm, "trigger_pre_delegation_hook"):
|
|
273
299
|
mhm.trigger_pre_delegation_hook(agent_type, tool_input, session_id)
|
|
274
|
-
except Exception:
|
|
300
|
+
except Exception: # nosec B110
|
|
275
301
|
# Memory hooks are optional
|
|
276
302
|
pass
|
|
277
303
|
|
|
@@ -364,7 +390,7 @@ class EventHandlers:
|
|
|
364
390
|
os.chdir(working_dir)
|
|
365
391
|
|
|
366
392
|
# Run git command to get current branch
|
|
367
|
-
result = subprocess.run(
|
|
393
|
+
result = subprocess.run( # nosec B603 B607
|
|
368
394
|
["git", "branch", "--show-current"],
|
|
369
395
|
capture_output=True,
|
|
370
396
|
text=True,
|
|
@@ -474,7 +500,7 @@ class EventHandlers:
|
|
|
474
500
|
mhm = getattr(self.hook_handler, "memory_hook_manager", None)
|
|
475
501
|
if mhm and hasattr(mhm, "trigger_post_delegation_hook"):
|
|
476
502
|
mhm.trigger_post_delegation_hook(agent_type, event, session_id)
|
|
477
|
-
except Exception:
|
|
503
|
+
except Exception: # nosec B110
|
|
478
504
|
# Memory hooks are optional
|
|
479
505
|
pass
|
|
480
506
|
|
|
@@ -488,7 +514,7 @@ class EventHandlers:
|
|
|
488
514
|
rtm.track_agent_response(
|
|
489
515
|
session_id, agent_type, event, delegation_requests
|
|
490
516
|
)
|
|
491
|
-
except Exception:
|
|
517
|
+
except Exception: # nosec B110
|
|
492
518
|
# Response tracking is optional
|
|
493
519
|
pass
|
|
494
520
|
|
|
@@ -550,13 +576,53 @@ class EventHandlers:
|
|
|
550
576
|
if DEBUG:
|
|
551
577
|
self._log_stop_event_debug(event, session_id, metadata)
|
|
552
578
|
|
|
579
|
+
# Auto-pause integration (independent of response tracking)
|
|
580
|
+
# WHY HERE: Auto-pause must work even when response_tracking is disabled
|
|
581
|
+
# Extract usage data directly from event and trigger auto-pause if thresholds crossed
|
|
582
|
+
if "usage" in event:
|
|
583
|
+
auto_pause = getattr(self.hook_handler, "auto_pause_handler", None)
|
|
584
|
+
if auto_pause:
|
|
585
|
+
try:
|
|
586
|
+
usage_data = event["usage"]
|
|
587
|
+
metadata["usage"] = {
|
|
588
|
+
"input_tokens": usage_data.get("input_tokens", 0),
|
|
589
|
+
"output_tokens": usage_data.get("output_tokens", 0),
|
|
590
|
+
"cache_creation_input_tokens": usage_data.get(
|
|
591
|
+
"cache_creation_input_tokens", 0
|
|
592
|
+
),
|
|
593
|
+
"cache_read_input_tokens": usage_data.get(
|
|
594
|
+
"cache_read_input_tokens", 0
|
|
595
|
+
),
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
threshold_crossed = auto_pause.on_usage_update(metadata["usage"])
|
|
599
|
+
if threshold_crossed:
|
|
600
|
+
warning = auto_pause.emit_threshold_warning(threshold_crossed)
|
|
601
|
+
# CRITICAL: Never write to stderr unconditionally - causes hook errors
|
|
602
|
+
# Use _log() instead which only writes to file if DEBUG=true
|
|
603
|
+
from . import _log
|
|
604
|
+
|
|
605
|
+
_log(f"⚠️ Auto-pause threshold crossed: {warning}")
|
|
606
|
+
|
|
607
|
+
if DEBUG:
|
|
608
|
+
print(
|
|
609
|
+
f" - Auto-pause threshold crossed: {threshold_crossed}",
|
|
610
|
+
file=sys.stderr,
|
|
611
|
+
)
|
|
612
|
+
except Exception as e:
|
|
613
|
+
if DEBUG:
|
|
614
|
+
print(
|
|
615
|
+
f"Auto-pause error in handle_stop_fast: {e}",
|
|
616
|
+
file=sys.stderr,
|
|
617
|
+
)
|
|
618
|
+
|
|
553
619
|
# Track response if enabled
|
|
554
620
|
try:
|
|
555
621
|
rtm = getattr(self.hook_handler, "response_tracking_manager", None)
|
|
556
622
|
if rtm and hasattr(rtm, "track_stop_response"):
|
|
557
623
|
pending_prompts = getattr(self.hook_handler, "pending_prompts", {})
|
|
558
624
|
rtm.track_stop_response(event, session_id, metadata, pending_prompts)
|
|
559
|
-
except Exception:
|
|
625
|
+
except Exception: # nosec B110
|
|
560
626
|
# Response tracking is optional
|
|
561
627
|
pass
|
|
562
628
|
|
|
@@ -598,7 +664,7 @@ class EventHandlers:
|
|
|
598
664
|
f" - response_tracker exists: {tracker_exists}",
|
|
599
665
|
file=sys.stderr,
|
|
600
666
|
)
|
|
601
|
-
except Exception:
|
|
667
|
+
except Exception: # nosec B110
|
|
602
668
|
# If debug logging fails, just skip it
|
|
603
669
|
pass
|
|
604
670
|
|
|
@@ -664,7 +730,7 @@ class EventHandlers:
|
|
|
664
730
|
try:
|
|
665
731
|
# Get the original request data (with fuzzy matching fallback)
|
|
666
732
|
delegation_requests = getattr(self.hook_handler, "delegation_requests", {})
|
|
667
|
-
request_info = delegation_requests.get(session_id)
|
|
733
|
+
request_info = delegation_requests.get(session_id) # nosec B113
|
|
668
734
|
|
|
669
735
|
# If exact match fails, try partial matching
|
|
670
736
|
if not request_info and session_id:
|
|
@@ -689,7 +755,7 @@ class EventHandlers:
|
|
|
689
755
|
f" - ✅ Fuzzy match found: {stored_sid[:16]}...",
|
|
690
756
|
file=sys.stderr,
|
|
691
757
|
)
|
|
692
|
-
request_info = delegation_requests.get(stored_sid)
|
|
758
|
+
request_info = delegation_requests.get(stored_sid) # nosec B113
|
|
693
759
|
# Update the key to use the current session_id for consistency
|
|
694
760
|
if request_info:
|
|
695
761
|
delegation_requests[session_id] = request_info
|
|
@@ -789,6 +855,7 @@ class EventHandlers:
|
|
|
789
855
|
- Captures response content and metadata for analysis
|
|
790
856
|
- Enables tracking of conversation flow and response patterns
|
|
791
857
|
- Essential for comprehensive monitoring of Claude interactions
|
|
858
|
+
- Scans for delegation anti-patterns and creates autotodos
|
|
792
859
|
"""
|
|
793
860
|
# Track the response for logging
|
|
794
861
|
try:
|
|
@@ -796,10 +863,17 @@ class EventHandlers:
|
|
|
796
863
|
if rtm and hasattr(rtm, "track_assistant_response"):
|
|
797
864
|
pending_prompts = getattr(self.hook_handler, "pending_prompts", {})
|
|
798
865
|
rtm.track_assistant_response(event, pending_prompts)
|
|
799
|
-
except Exception:
|
|
866
|
+
except Exception: # nosec B110
|
|
800
867
|
# Response tracking is optional
|
|
801
868
|
pass
|
|
802
869
|
|
|
870
|
+
# Scan response for delegation anti-patterns and create autotodos
|
|
871
|
+
try:
|
|
872
|
+
self._scan_for_delegation_patterns(event)
|
|
873
|
+
except Exception as e: # nosec B110
|
|
874
|
+
if DEBUG:
|
|
875
|
+
print(f"Delegation scanning error: {e}", file=sys.stderr)
|
|
876
|
+
|
|
803
877
|
# Get working directory and git branch
|
|
804
878
|
working_dir = event.get("cwd", "")
|
|
805
879
|
git_branch = self._get_git_branch(working_dir) if working_dir else "Unknown"
|
|
@@ -852,6 +926,21 @@ class EventHandlers:
|
|
|
852
926
|
file=sys.stderr,
|
|
853
927
|
)
|
|
854
928
|
|
|
929
|
+
# Record assistant response for auto-pause if active
|
|
930
|
+
auto_pause = getattr(self.hook_handler, "auto_pause_handler", None)
|
|
931
|
+
if auto_pause and auto_pause.is_pause_active():
|
|
932
|
+
try:
|
|
933
|
+
# Summarize response to first 200 chars
|
|
934
|
+
summary = (
|
|
935
|
+
response_text[:200] + "..."
|
|
936
|
+
if len(response_text) > 200
|
|
937
|
+
else response_text
|
|
938
|
+
)
|
|
939
|
+
auto_pause.on_assistant_response(summary)
|
|
940
|
+
except Exception as e:
|
|
941
|
+
if DEBUG:
|
|
942
|
+
print(f"Auto-pause response recording error: {e}", file=sys.stderr)
|
|
943
|
+
|
|
855
944
|
# Emit normalized event
|
|
856
945
|
self.hook_handler._emit_socketio_event(
|
|
857
946
|
"", "assistant_response", assistant_response_data
|
|
@@ -864,6 +953,7 @@ class EventHandlers:
|
|
|
864
953
|
- Provides visibility into new conversation sessions
|
|
865
954
|
- Enables tracking of session lifecycle and duration
|
|
866
955
|
- Useful for monitoring concurrent sessions and resource usage
|
|
956
|
+
- Auto-inject pending autotodos if enabled in config
|
|
867
957
|
"""
|
|
868
958
|
session_id = event.get("session_id", "")
|
|
869
959
|
working_dir = event.get("cwd", "")
|
|
@@ -877,6 +967,39 @@ class EventHandlers:
|
|
|
877
967
|
"hook_event_name": "SessionStart",
|
|
878
968
|
}
|
|
879
969
|
|
|
970
|
+
# Auto-inject pending autotodos if enabled
|
|
971
|
+
try:
|
|
972
|
+
from pathlib import Path
|
|
973
|
+
|
|
974
|
+
from claude_mpm.cli.commands.autotodos import get_pending_todos
|
|
975
|
+
from claude_mpm.core.config import Config
|
|
976
|
+
|
|
977
|
+
config = Config()
|
|
978
|
+
auto_inject_enabled = config.get("autotodos.auto_inject_on_startup", True)
|
|
979
|
+
max_todos = config.get("autotodos.max_todos_per_session", 10)
|
|
980
|
+
|
|
981
|
+
if auto_inject_enabled:
|
|
982
|
+
# Pass working directory from event to avoid Path.cwd() issues
|
|
983
|
+
working_dir_param = None
|
|
984
|
+
if working_dir:
|
|
985
|
+
working_dir_param = Path(working_dir)
|
|
986
|
+
|
|
987
|
+
pending_todos = get_pending_todos(
|
|
988
|
+
max_todos=max_todos, working_dir=working_dir_param
|
|
989
|
+
)
|
|
990
|
+
if pending_todos:
|
|
991
|
+
session_start_data["pending_autotodos"] = pending_todos
|
|
992
|
+
session_start_data["autotodos_count"] = len(pending_todos)
|
|
993
|
+
if DEBUG:
|
|
994
|
+
print(
|
|
995
|
+
f" - Auto-injected {len(pending_todos)} pending autotodos",
|
|
996
|
+
file=sys.stderr,
|
|
997
|
+
)
|
|
998
|
+
except Exception as e: # nosec B110
|
|
999
|
+
# Auto-injection is optional - continue if it fails
|
|
1000
|
+
if DEBUG:
|
|
1001
|
+
print(f" - Failed to auto-inject autotodos: {e}", file=sys.stderr)
|
|
1002
|
+
|
|
880
1003
|
# Debug logging
|
|
881
1004
|
if DEBUG:
|
|
882
1005
|
print(
|
|
@@ -886,3 +1009,123 @@ class EventHandlers:
|
|
|
886
1009
|
|
|
887
1010
|
# Emit normalized event
|
|
888
1011
|
self.hook_handler._emit_socketio_event("", "session_start", session_start_data)
|
|
1012
|
+
|
|
1013
|
+
def handle_subagent_start_fast(self, event):
|
|
1014
|
+
"""Handle SubagentStart events with proper agent type extraction.
|
|
1015
|
+
|
|
1016
|
+
WHY separate from SessionStart:
|
|
1017
|
+
- SubagentStart contains agent-specific information
|
|
1018
|
+
- Frontend needs agent_type to create distinct agent nodes
|
|
1019
|
+
- Multiple engineers should show as separate nodes in hierarchy
|
|
1020
|
+
- Research agents must appear in the agent hierarchy
|
|
1021
|
+
|
|
1022
|
+
Unlike SessionStart, SubagentStart events contain agent-specific
|
|
1023
|
+
information that must be preserved and emitted to the dashboard.
|
|
1024
|
+
"""
|
|
1025
|
+
session_id = event.get("session_id", "")
|
|
1026
|
+
|
|
1027
|
+
# Extract agent type from event - Claude provides this in SubagentStart
|
|
1028
|
+
# Try multiple possible field names for compatibility
|
|
1029
|
+
agent_type = event.get("agent_type") or event.get("subagent_type") or "unknown"
|
|
1030
|
+
|
|
1031
|
+
# Generate unique agent ID combining type and session
|
|
1032
|
+
agent_id = event.get("agent_id", f"{agent_type}_{session_id[:8]}")
|
|
1033
|
+
|
|
1034
|
+
# Get working directory and git branch
|
|
1035
|
+
working_dir = event.get("cwd", "")
|
|
1036
|
+
git_branch = self._get_git_branch(working_dir) if working_dir else "Unknown"
|
|
1037
|
+
|
|
1038
|
+
# Build subagent start data with all required fields
|
|
1039
|
+
subagent_start_data = {
|
|
1040
|
+
"session_id": session_id,
|
|
1041
|
+
"agent_type": agent_type,
|
|
1042
|
+
"agent_id": agent_id,
|
|
1043
|
+
"timestamp": datetime.now(timezone.utc).isoformat(),
|
|
1044
|
+
"hook_event_name": "SubagentStart", # Preserve correct hook name
|
|
1045
|
+
"working_directory": working_dir,
|
|
1046
|
+
"git_branch": git_branch,
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
# Debug logging
|
|
1050
|
+
if DEBUG:
|
|
1051
|
+
print(
|
|
1052
|
+
f"Hook handler: SubagentStart - agent_type='{agent_type}', "
|
|
1053
|
+
f"agent_id='{agent_id}', session_id='{session_id[:16]}...'",
|
|
1054
|
+
file=sys.stderr,
|
|
1055
|
+
)
|
|
1056
|
+
|
|
1057
|
+
# Emit to /hook namespace as subagent_start (NOT session_start!)
|
|
1058
|
+
self.hook_handler._emit_socketio_event(
|
|
1059
|
+
"", "subagent_start", subagent_start_data
|
|
1060
|
+
)
|
|
1061
|
+
|
|
1062
|
+
def _scan_for_delegation_patterns(self, event):
|
|
1063
|
+
"""Scan assistant response for delegation anti-patterns.
|
|
1064
|
+
|
|
1065
|
+
WHY this is needed:
|
|
1066
|
+
- Detect when PM asks user to do something manually instead of delegating
|
|
1067
|
+
- Flag PM behavior violations for immediate correction
|
|
1068
|
+
- Enforce delegation principle in PM workflow
|
|
1069
|
+
- Help PM recognize delegation opportunities
|
|
1070
|
+
|
|
1071
|
+
This method scans the assistant's response text for patterns like:
|
|
1072
|
+
- "Make sure .env.local is in your .gitignore"
|
|
1073
|
+
- "You'll need to run npm install"
|
|
1074
|
+
- "Please run the tests manually"
|
|
1075
|
+
|
|
1076
|
+
When patterns are detected, PM violations are logged as errors/warnings
|
|
1077
|
+
that should be corrected immediately, NOT as todos to delegate.
|
|
1078
|
+
|
|
1079
|
+
DESIGN DECISION: pm.violation vs autotodo.delegation
|
|
1080
|
+
- Delegation patterns = PM doing something WRONG → pm.violation (error)
|
|
1081
|
+
- Script failures = Something BROKEN → autotodo.error (todo)
|
|
1082
|
+
"""
|
|
1083
|
+
# Only scan if delegation detector is available
|
|
1084
|
+
try:
|
|
1085
|
+
from claude_mpm.services.delegation_detector import get_delegation_detector
|
|
1086
|
+
from claude_mpm.services.event_log import get_event_log
|
|
1087
|
+
except ImportError:
|
|
1088
|
+
if DEBUG:
|
|
1089
|
+
print("Delegation detector or event log not available", file=sys.stderr)
|
|
1090
|
+
return
|
|
1091
|
+
|
|
1092
|
+
response_text = event.get("response", "")
|
|
1093
|
+
if not response_text:
|
|
1094
|
+
return
|
|
1095
|
+
|
|
1096
|
+
# Get the delegation detector
|
|
1097
|
+
detector = get_delegation_detector()
|
|
1098
|
+
|
|
1099
|
+
# Detect delegation patterns
|
|
1100
|
+
detections = detector.detect_user_delegation(response_text)
|
|
1101
|
+
|
|
1102
|
+
if not detections:
|
|
1103
|
+
return # No patterns detected
|
|
1104
|
+
|
|
1105
|
+
# Get event log for violation recording
|
|
1106
|
+
event_log = get_event_log()
|
|
1107
|
+
|
|
1108
|
+
# Create PM violation events (NOT autotodos)
|
|
1109
|
+
for detection in detections:
|
|
1110
|
+
# Create event log entry as pm.violation
|
|
1111
|
+
event_log.append_event(
|
|
1112
|
+
event_type="pm.violation",
|
|
1113
|
+
payload={
|
|
1114
|
+
"violation_type": "delegation_anti_pattern",
|
|
1115
|
+
"pattern_type": detection["pattern_type"],
|
|
1116
|
+
"original_text": detection["original_text"],
|
|
1117
|
+
"suggested_action": detection["suggested_todo"],
|
|
1118
|
+
"action": detection["action"],
|
|
1119
|
+
"session_id": event.get("session_id", ""),
|
|
1120
|
+
"timestamp": datetime.now(timezone.utc).isoformat(),
|
|
1121
|
+
"severity": "warning", # Not critical, but should be fixed
|
|
1122
|
+
"message": f"PM asked user to do something manually: {detection['original_text'][:80]}...",
|
|
1123
|
+
},
|
|
1124
|
+
status="pending",
|
|
1125
|
+
)
|
|
1126
|
+
|
|
1127
|
+
if DEBUG:
|
|
1128
|
+
print(
|
|
1129
|
+
f"⚠️ PM violation detected: {detection['original_text'][:60]}...",
|
|
1130
|
+
file=sys.stderr,
|
|
1131
|
+
)
|