aditya
|
b25a886df8
|
feat(skill): add MCP refresh hooks
Implement SkillRegistry.refresh(name) and refresh_all() to recompute
flattened tool sets on demand. Wire MCPToolAdapter.dispatch_notification()
to MCPRefreshHook, which debounces rapid notifications/tools/list_changed
bursts into a single refresh_all() call (default 0.5 s window).
Add safeguard that skips tool-ref validation when no ToolRegistry is
configured, emitting a single WARNING with recovery steps. Introduce
immutable SkillRefreshResult (refreshed/failed/skipped counts) with
to_summary() and merge() for CLI and log output.
New files:
- src/cleveragents/skills/refresh.py (SkillRefreshResult)
- src/cleveragents/mcp/refresh_hook.py (MCPRefreshHook)
- features/skill_refresh.feature (19 Behave scenarios)
- features/steps/skill_refresh_steps.py
- robot/skill_refresh.robot (10 Robot tests)
- robot/helper_skill_refresh.py
- benchmarks/skill_refresh_bench.py (ASV benchmarks)
- docs/reference/skill_refresh.md
Modified:
- src/cleveragents/skills/registry.py (refresh, refresh_all)
- src/cleveragents/mcp/adapter.py (notification listener API)
- src/cleveragents/skills/__init__.py (export SkillRefreshResult)
- src/cleveragents/mcp/__init__.py (export MCPRefreshHook)
- CHANGELOG.md
ISSUES CLOSED #168
|
2026-02-26 12:29:49 +00:00 |
|