Interface LazyResourceCapable
- All Known Implementing Classes:
WorkspaceSkillRepository
public interface LazyResourceCapable
Optional marker for
AgentSkillRepository
implementations that can supply a SkillResources accessor in addition to the
in-memory AgentSkill.resources map.
Detected via instanceof by the harness skill runtime: if a repository implements
this interface, the runtime will request a SkillResources per skill and consult it
as a fallback when load_skill_through_path misses the in-memory map. This is what
lets WorkspaceSkillRepository keep skills lazy on disk (or in sandbox) without
preloading every byte at registration time.
Repositories that preload all resources into AgentSkill.resources (e.g. core's
FileSystemSkillRepository, ClasspathSkillRepository, and most third-party
marketplace extensions) do not need to implement this — the in-memory map already covers
every path.
-
Method Summary
Modifier and TypeMethodDescriptionresourcesFor(String skillName, io.agentscope.core.agent.RuntimeContext ctx) Returns a lazy resource accessor for the named skill.
-
Method Details
-
resourcesFor
Returns a lazy resource accessor for the named skill.The returned accessor MUST capture or honor the given
ctxso per-user namespacing remains correct across calls.- Parameters:
skillName- the skill'sname(notskillId)ctx- current runtime context; nevernull(callers passRuntimeContext.empty()when no context is available)- Returns:
- accessor for that skill's resource tree, never
null(returnSkillResources.empty()if the skill does not belong to this repository)
-