LazyResourceCapable
public interface LazyResourceCapable
io/agentscope/harness/agent/skill/LazyResourceCapable.java:36–52定义 Lazy 资源 Capable契约的接口。位于 io.agentscope.harness.agent.skill 包。核心成员包括 resourcesFor。
Optional marker for io.agentscope.core.skill.repository.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
| 方法Method | 说明Description |
|---|---|
public SkillResources resourcesFor(String skillName, RuntimeContext ctx) | 执行 `resourcesFor` 方法。 Returns a lazy resource accessor for the named skill. |
方法详情Method Detail
resourcesFor
public SkillResources resourcesFor(String skillName, RuntimeContext ctx)
执行 resourcesFor 方法。
Returns a lazy resource accessor for the named skill.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skillName | String | 技能's`name`(不`skillId`)。the skill's `name` (not `skillId`) |
ctx | RuntimeContext | 运行时上下文(类型 `RuntimeContext`)。current runtime context; never `null` (callers pass `RuntimeContext#empty()` when no context is available) |
SkillResourcesio/agentscope/harness/agent/skill/LazyResourceCapable.java:51