feat(skills): add disabled_skills config to exclude skills from loading
Introduce a disabled_skills option in the config schema that allows users to specify a list of skill names to be excluded. The setting is threaded from config through Nanobot -> AgentLoop -> ContextBuilder -> SkillsLoader. Disabled skills are filtered out from list_skills, get_always_skills, and build_skills_summary. Four new test cases cover the filtering behavior.
This commit is contained in:
1 parent
3361ac9dd1
commit
e9c4fe6824
7 files changed
+74
-4
No files matched your search
@@ -147,6 +147,7 @@ class AgentLoop:
|
||||
timezone: str | None = None,
|
||||
hooks: list[AgentHook] | None = None,
|
||||
unified_session: bool = False,
|
||||
disabled_skills: list[str] | None = None,
|
||||
):
|
||||
from nanobot.config.schema import ExecToolConfig, WebToolsConfig
|
||||
|
||||
@@ -179,7 +180,7 @@ class AgentLoop:
|
||||
self._last_usage: dict[str, int] = {}
|
||||
self._extra_hooks: list[AgentHook] = hooks or []
|
||||
|
||||
self.context = ContextBuilder(workspace, timezone=timezone)
|
||||
self.context = ContextBuilder(workspace, timezone=timezone, disabled_skills=disabled_skills)
|
||||
self.sessions = session_manager or SessionManager(workspace)
|
||||
self.tools = ToolRegistry()
|
||||
self.runner = AgentRunner(provider)
|
||||
|
||||
Reference in new issue
Block a user