forked from molecule-ai/molecule-core
Unconditional list.extend() on repeated plugin install caused every hook handler to be appended on each reinstall, leading to 3-4x duplicate firings per event (PreToolUse, PostToolUse, Stop, etc.). Fix: before appending each incoming handler, compute a fingerprint of (matcher, frozenset-of-commands). Skip append if the fingerprint is already present in the merged list. First-time installs are unaffected — new handlers still land correctly. Adds 7 unit tests covering: first install, double install, triple install, different-matcher co-existence, different-command co-existence, existing user hook preservation, and top-level key merge semantics. Closes #566 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| adapters | ||
| builtin_tools | ||
| plugins_registry | ||
| policies | ||
| scripts | ||
| skill_loader | ||
| tests | ||
| a2a_cli.py | ||
| a2a_client.py | ||
| a2a_executor.py | ||
| a2a_mcp_server.py | ||
| a2a_tools.py | ||
| adapter_base.py | ||
| agent.py | ||
| build-all.sh | ||
| claude_sdk_executor.py | ||
| cli_executor.py | ||
| config.py | ||
| consolidation.py | ||
| coordinator.py | ||
| Dockerfile | ||
| entrypoint.sh | ||
| events.py | ||
| executor_helpers.py | ||
| heartbeat.py | ||
| hermes_executor.py | ||
| initial_prompt.py | ||
| main.py | ||
| molecule_ai_status.py | ||
| platform_auth.py | ||
| plugins.py | ||
| preflight.py | ||
| prompt.py | ||
| pytest.ini | ||
| requirements.txt | ||
| shared_runtime.py | ||
| transcript_auth.py | ||
| watcher.py | ||