Registry — API¶
The skill descriptor registry — described architecturally in ADR-0004 — exposes a small set of helpers for registering, looking up, and enumerating SkillDescriptor records.
mirai_shared_skills._registry ¶
Catalog metadata registry consumed by the Skill Discovery foundational skill.
The registry is intentionally an in-process structure: every shared skill
declares a small descriptor that lists the human-readable name used by the
semantic router, the categorisation (standard for read-only or raw for
state-mutating), and the dotted import path of its implementation. The
discovery skill queries this registry instead of crawling the package, which
keeps look-ups deterministic and side-effect free.
__all__
module-attribute
¶
__all__ = [
"SkillCategory",
"SkillDescriptor",
"all_descriptors",
"bootstrap",
"find",
"get",
"register",
]
SkillDescriptor
dataclass
¶
SkillDescriptor(
name: str,
description: str,
instructions: str,
category: SkillCategory,
import_path: str,
tools: tuple[str, ...] = tuple(),
references: tuple[str, ...] = tuple(),
)
Static metadata describing a shared skill catalog entry.
references
class-attribute
instance-attribute
¶
all_descriptors ¶
bootstrap ¶
find ¶
Case-insensitive substring search over name + description.
Source code in mirai_shared_skills/_registry.py
get ¶
register ¶
Register a skill descriptor. Re-registration with the same name overwrites.