Skip to main content

Module dependency_resolver

Module dependency_resolver 

Source
Expand description

Dependency resolution pipeline: Lock → LLM → Whitelist.

Three-layer resolution for skill dependencies extracted from the compatibility field in SKILL.md:

① Lock file (.skilllite.lock) — fast cache hit (sync) ② LLM inference — call LLM to extract package names, verify via PyPI/npm (async) ③ Whitelist matching — tokenize compatibility string, match against known packages (sync)

After resolution, packages can optionally be validated against the whitelist (--allow-unknown-packages bypasses this check).

Ported from Python core/dependency_resolver.py.

Three-layer resolution for skill dependencies. Used by skilllite init when .skilllite.lock is missing or stale.

Structs§

ResolvedDependencies
Result of the dependency resolution pipeline.

Enums§

ResolverKind
Which resolver layer produced the result.

Functions§

resolve_from_lock
Read .skilllite.lock and return cached packages if fresh.
resolve_from_whitelist
Extract packages from compatibility string by matching against the embedded whitelist.
resolve_packages_sync
Synchronous resolution: Lock → Whitelist (no LLM).
validate_against_whitelist
Validate resolved packages against the whitelist. Returns list of unknown packages (not in whitelist).
write_lock
Write a fresh .skilllite.lock.