File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
examples/01_standalone_sdk/43_mixed_marketplace_skills
openhands-sdk/openhands/sdk/skills Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,10 @@ def main():
101101
102102 print ("\n Skills:" )
103103 for entry in marketplace .skills :
104- source_type = "remote" if entry .source .startswith ("http" ) else "local"
104+ resolved_source , ref , _ = marketplace .resolve_skill_source (entry )
105+ source_type = (
106+ "remote" if ref is not None or "://" in resolved_source else "local"
107+ )
105108 print (f" - { entry .name } ({ source_type } )" )
106109 print (f" Source: { entry .source } " )
107110 if entry .description :
Original file line number Diff line number Diff line change 1717from openhands .sdk .context .skills .skill import Skill , load_skills_from_dir
1818from openhands .sdk .context .skills .utils import find_skill_md , validate_skill_name
1919from openhands .sdk .logger import get_logger
20- from openhands .sdk .skills .fetch import fetch_skill_with_resolution
20+ from openhands .sdk .skills .fetch import SkillFetchError , fetch_skill_with_resolution
2121
2222
2323logger = get_logger (__name__ )
@@ -533,10 +533,19 @@ def install_skills_from_marketplace(
533533
534534 # 1. Standalone skills from marketplace.skills
535535 for entry in marketplace .skills :
536- resolved = resolve_source_path (
537- entry .source , base_path = marketplace_path , update = True
538- )
539- if resolved and resolved .exists ():
536+ try :
537+ source , ref , repo_path = marketplace .resolve_skill_source (entry )
538+ resolved , _ = fetch_skill_with_resolution (
539+ source = source ,
540+ ref = ref ,
541+ repo_path = repo_path ,
542+ update = True ,
543+ )
544+ except (SkillFetchError , ValueError ) as exc :
545+ logger .warning (f"Failed to resolve skill '{ entry .name } ': { exc } " )
546+ continue
547+
548+ if resolved .exists ():
540549 skill_dirs .append ((entry .name , resolved ))
541550 else :
542551 logger .warning (f"Failed to resolve skill '{ entry .name } '" )
You can’t perform that action at this time.
0 commit comments