Add a new MCP tool that bridges the gap between fully automatic
evolution (inside execute_task) and manual repair (fix_skill).
scan_evolution_opportunities lets host agents proactively inspect
which skills could benefit from evolution by:
1. Loading execution analyses marked as evolution candidates
2. Enriching each with SkillRecord usage statistics (completion
rate, fallback rate, effective rate)
3. Returning a structured JSON report with prioritized suggestions
This enables an "agent-in-the-loop" evolution pattern for all host
agents (Claude Code, Codex, nanobot, Cursor, etc.): periodic scan,
review report, selectively apply fixes.
Closes#24
Made-with: Cursor
- Add resolve() + is_relative_to() check in _extract_zip() to block
nested traversal entries like nested/../../escape.txt
- Sanitize server-provided skill name in import_skill() to prevent
directory escape via malicious record metadata
- Add 6 regression tests covering both attack vectors
Closes#17
Co-authored-by: LeftX <xzq-xu@users.noreply.github.com>
Fixes#29. When a skill is already registered, register_skill_dir()
returned None, which caused fix_skill() to incorrectly report a failure.
Now returns the existing SkillMeta instead of None when the skill_id
is already present in the registry, making register_skill_dir() truly
idempotent as its callers (fix_skill, _auto_register_skill_dirs) expect.
Per reviewer feedback: keep strict \byes\b / \bno\b word boundaries to
prevent false positives, but widen confirm/reject/skip to stem-style
\bconfirm\w*\b etc. so common LLM variants like "confirmed", "rejected",
"skipping" still parse correctly instead of falling through to the
default False path.