-
Notifications
You must be signed in to change notification settings - Fork 9
[Feat]: Support proper version specifiers in Skill requirements validation #14
Description
Feature Description
Currently, the SkillLoader strips version specifiers from a skill's manifest.yaml dependencies and only checks if the base package string exists using a primitive req.split(">")[0] method.
We need to implement robust, standard version validation. If a skill requires pandas>=2.0.0 and the host agent environment only has 1.5.3 installed, the loader should actively raise an ImportError detailing the version mismatch prior to executing any of the skill's code.
Rationale
Many AI-adjacent libraries (like pydantic, langchain, or google-generativeai) have major breaking API changes across minor versions. Hard-executing a skill with the wrong dependency version will cause confusing runtime crashes inside an Agent loop, which degrades the "plug and play" modularity of Skillware.
Implementation Idea
- Replace the crude string splitting in
skillware/core/loader.pywith robust parsing. - Utilize standard built-in libraries like
importlib.metadatato retrieve the currently installed version of a required package. - Compare the installed version against the specifier string. If it fails, throw a highly descriptive
ImportError.