manager
manager
¶
SkillManager — coordinates skill discovery, catalog, tool wrapping, and execution.
Classes¶
SkillManager
¶
SkillManager(bus: EventBus, *, capability_policy: Optional[Any] = None, overlay_dir: Optional[Path] = None)
Coordinate skill discovery, resolution, catalog generation, and execution.
| PARAMETER | DESCRIPTION |
|---|---|
bus
|
Event bus for publishing lifecycle events.
TYPE:
|
capability_policy
|
Optional capability policy passed through to tool executors.
TYPE:
|
Source code in src/openjarvis/skills/manager.py
Functions¶
discover
¶
Scan directories in order and register skills.
First-seen name wins (workspace path listed first = highest precedence).
After loading, the full dependency graph is validated and any
sidecar overlays in overlay_dir are applied to discovered skills.
| PARAMETER | DESCRIPTION |
|---|---|
paths
|
Directories to scan. If None or empty, no skills are loaded
from disk — but
TYPE:
|
Source code in src/openjarvis/skills/manager.py
resolve
¶
resolve(name: str) -> SkillManifest
Return the manifest for a skill by name.
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If name is not registered. |
Source code in src/openjarvis/skills/manager.py
skill_names
¶
get_skill_tools
¶
get_skill_tools(*, tool_executor: Optional[ToolExecutor] = None) -> List[BaseTool]
Wrap each registered skill as a :class:SkillTool (a :class:BaseTool).
| PARAMETER | DESCRIPTION |
|---|---|
tool_executor
|
Tool executor to use when running skill pipelines. Falls back to
the one set via :meth:
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[BaseTool]
|
One :class: |
Source code in src/openjarvis/skills/manager.py
get_catalog_xml
¶
Generate an <available_skills> XML catalog.
Skills with disable_model_invocation=True are excluded so that
internal or automation-only skills are not surfaced to the model.
Source code in src/openjarvis/skills/manager.py
get_few_shot_examples
¶
Return formatted few-shot example strings ready for system prompt.
Pulls from manifest.metadata.openjarvis.few_shot for every
registered skill. Returns one formatted string per example.
Source code in src/openjarvis/skills/manager.py
discover_from_traces
¶
discover_from_traces(trace_store: Any, *, min_frequency: int = 3, min_outcome: float = 0.5, output_dir: Optional[Path] = None) -> List[Dict[str, Any]]
Mine the trace store for recurring tool sequences.
For each recurring sequence found by :class:SkillDiscovery, write
a TOML skill manifest into output_dir (default
~/.openjarvis/skills/discovered/). Returns a list of dicts with
name and path for each manifest written.
Names are normalized to spec-compliant kebab-case (lowercase with hyphens, no underscores) so the resulting manifests load cleanly through the discovery walker.
Source code in src/openjarvis/skills/manager.py
execute
¶
Resolve and execute a skill by name.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Skill name to execute.
TYPE:
|
context
|
Initial context dict passed to the executor.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
SkillResult
|
|
Source code in src/openjarvis/skills/manager.py
set_tool_executor
¶
set_tool_executor(tool_executor: ToolExecutor) -> None
Attach a :class:ToolExecutor for running tool steps in skill pipelines.
find_installed_paths
¶
Return on-disk skill directories matching name.
A directory matches when it contains skill.toml or SKILL.md
and either the directory name equals name or its parsed
manifest's name field equals name.
Source code in src/openjarvis/skills/manager.py
remove
¶
Remove an installed skill by name.
Returns the list of directories that were removed. Raises
:class:FileNotFoundError when no matching skill exists on disk.