← Về thư mục
openai4s/skills_loader/loader.py
- _canonical_skill_name · function · L49-L59 — def _canonical_skill_name(value: str) -> str
- _StoreCapabilityRepository · class · L62-L106 — class _StoreCapabilityRepository
- init · method · L74-L75 — def init(self, db_path: Path) -> None
- _call · method · L77-L82 — def _call(self, method: str, args, *kwargs): # Lazy import avoids a Store -> skills -> Store initialization cycle.
- set_enabled · method · L84-L85 — def set_enabled(self, args, *kwargs)
- resolve · method · L87-L88 — def resolve(self, args, *kwargs)
- snapshot · method · L90-L91 — def snapshot(self, args, *kwargs)
- explicit_states · method · L93-L94 — def explicit_states(self, args, *kwargs)
- append_event · method · L96-L97 — def append_event(self, args, *kwargs)
- list_events · method · L99-L100 — def list_events(self, args, *kwargs)
- record_manifest · method · L102-L103 — def record_manifest(self, args, *kwargs)
- latest_manifest · method · L105-L106 — def latest_manifest(self, args, *kwargs)
- _strip_scalar · function · L109-L117 — def _strip_scalar(v: str) -> str
- _parse_frontmatter · function · L120-L177 — def _parse_frontmatter(text: str) -> tuple[dict, str]
- _first_paragraph · function · L180-L194 — def _first_paragraph(body: str) -> str
- _has_gpu · function · L206-L211 — def _has_gpu() -> bool
- skill_readiness · function · L224-L246 — def skill_readiness(requirements: "Sequence[str]") -> dict[str, object]
- _requirements · function · L249-L269 — def _requirements(value: object) -> tuple[str, ...]
- _tokenize · function · L272-L276 — def _tokenize(*texts: str) -> set[str]
- _query_tokens · function · L284-L295 — def _query_tokens(query: str) -> set[str]
- Skill · class · L299-L402 — class Skill
- read_only · method · L329-L330 — def read_only(self) -> bool
- import_hint · method · L333-L352 — def import_hint(self) -> str | None
- summary_line · method · L354-L355 — def summary_line(self) -> str
- sidecar_gate · method · L357-L374 — def sidecar_gate(self) -> dict
- manifest_entry · method · L376-L402 — def manifest_entry(self, state: dict) -> dict
- SkillCollection · class · L410-L437 — class SkillCollection
- summary_line · method · L430-L437 — def summary_line(self, count: int) -> str
- _read_collection · function · L440-L461 — def _read_collection(root: Path) -> SkillCollection | None
- _bootstrap_runtime_code · function · L464-L935 — def _bootstrap_runtime_code( manifest: dict, denied: frozenset[str] = frozenset(), collection_prefixes: frozenset[str] = frozenset(), skill_paths: dict[str, str] | None = None, collection_paths: dict[str, str] | None = None, collection_members: dict[str, frozenset[str]] | None = None, catalog_namespace: str = "skills", catalog_path: str | None = None, direct_skill_dirs: frozenset[str] = frozenset(), ) -> str
- _SearchIndex · class · L939-L978 — class _SearchIndex
- build · method · L955-L966 — def build(cls, corpus: dict[str, Skill]) -> "_SearchIndex"
- weight · method · L968-L978 — def weight(self, token: str) -> float
- SkillLoader · class · L981-L1738 — class SkillLoader
- init · method · L982-L1009 — def init( self, skills_dir: Path | None = None, cfg: Config | None = None, *, capabilities: CapabilityStateService | None = None, project_id: str | None = None, session_id: str | None = None, )
- scoped · method · L1011-L1026 — def scoped( self, *, project_id: str | None = None, session_id: str | None = None, ) -> "SkillLoader"
- user_skills_dir · method · L1028-L1031 — def user_skills_dir(self) -> Path
- project_skills_dir · method · L1033-L1038 — def project_skills_dir(self) -> Path | None
- collections · method · L1040-L1066 — def collections(self) -> dict[str, SkillCollection]
- bundled_roots · method · L1068-L1074 — def bundled_roots(self) -> tuple[tuple[Path, str | None], ...]
- bundled_directory_collision · method · L1076-L1102 — def bundled_directory_collision(self, directory: str) -> Path | None
- parse_document · method · L1105-L1108 — def parse_document(content: str) -> tuple[dict, str]
- discover · method · L1110-L1291 — def discover(self) -> dict[str, Skill]: # Build into a fresh local map and publish it with a single atomic # reference swap at the end. A concurrent reader (search()/get()/ # catalog(), or another discover() from a parallel skill-read tool) # then observes either the complete old map or the complete new one — # never a dict being cleared and repopulated in place, which raised # "dictionary changed size during iteration".
- bundled_name_collision · method · L1293-L1302 — def bundled_name_collision(self, name: str) -> Skill | None
- is_enabled · method · L1304-L1305 — def is_enabled(self, name: str) -> bool
- set_enabled · method · L1307-L1329 — def set_enabled( self, name: str, enabled: bool, *, scope: str = "global", scope_id: str | None = None, ) -> dict
- skills · method · L1331-L1340 — def skills(self, *, include_disabled: bool = False) -> dict[str, Skill]
- get · method · L1342-L1350 — def get(self, name: str, *, include_disabled: bool = False) -> Skill | None
- resolve · method · L1352-L1406 — def resolve( self, name: str, *, permits: "Callable[[str], bool] | None" = None, ) -> Skill | None
- read · method · L1408-L1418 — def read(self, name: str, path: str = "SKILL.md") -> str
- bootstrap_manifest · method · L1420-L1450 — def bootstrap_manifest(self, *, persist: bool = True) -> dict
- bootstrap_code · method · L1452-L1507 — def bootstrap_code(self, *, allowed: frozenset[str] | None = None) -> str
- record_sidecar_loaded · method · L1509-L1536 — def record_sidecar_loaded( self, name: str, *, module: str | None = None, manifest_id: str | None = None, ) -> dict
- search · method · L1538-L1627 — def search( self, query: str, *, limit: int = 5, permits: "Callable[[str], bool] | None" = None, ) -> list[dict]
- catalog · method · L1629-L1659 — def catalog(self, *, include_disabled: bool = False) -> list[dict]
- system_context · method · L1661-L1738 — def system_context(self, *, only: frozenset[str] | None = None) -> str
- discover_skills · function · L1741-L1744 — def discover_skills( skills_dir: Path | None = None, cfg: Config | None = None ) -> dict[str, Skill]