SkillCatalog
public final class SkillCatalog
源码Source
io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:30–75技能目录,让智能体以受控方式调用外部能力。位于 io.agentscope.harness.agent.skill.runtime 包。核心成员包括 empty、of、get、all、ids、isEmpty。
Immutable snapshot of the skills visible to a single onSystemPrompt pass.
Keyed by skillId (the AgentSkill's name + "_" + source), insertion-order
preserved so the prompt renders skills in compose order.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static SkillCatalog empty()static | 返回 `empty` 结果。 Returns the empty. |
public static SkillCatalog of(List<HarnessSkillEntry> orderedEntries)static | 创建并返回实例。 Creates and returns an instance. |
public HarnessSkillEntry get(String skillId) | 按条件读取数据。 Lookup by `skillId` (name_source). |
public Collection<HarnessSkillEntry> all() | 返回所有。 All entries in compose order (low-to-high priority). |
public List<String> ids() | 返回 `ids` 结果。 All skillIds, in compose order. |
public boolean isEmpty() | 判断是否 `isEmpty`。 Returns whether the empty. |
public int size() | 返回大小。 Returns the size. |
方法详情Method Detail
empty
public static SkillCatalog empty()
static
返回 empty 结果。
Returns the empty.
SkillCatalog返回SkillCatalog。Returns skill catalog.
源码Source
io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:38–40of
public static SkillCatalog of(List<HarnessSkillEntry> orderedEntries)
static
创建并返回实例。
Creates and returns an instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
orderedEntries | List<HarnessSkillEntry> | ordered 条目(类型 `List`)。The ordered entries. |
SkillCatalog返回SkillCatalog。Returns skill catalog.
源码Source
io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:42–51get
public HarnessSkillEntry get(String skillId)
按条件读取数据。
Lookup by skillId (name_source).
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skillId | String | 技能标识(类型 `String`)。The skill id. |
HarnessSkillEntry返回HarnessSkillEntry。Returns harness skill entry.
源码Source
io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:54–56all
public Collection<HarnessSkillEntry> all()
返回所有。
All entries in compose order (low-to-high priority).
Collection<HarnessSkillEntry>返回集合。Returns collection.
源码Source
io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:59–61ids
public List<String> ids()
返回 ids 结果。
All skillIds, in compose order.
List<String>返回列出。Returns list.
源码Source
io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:64–66isEmpty
public boolean isEmpty()
判断是否 isEmpty。
Returns whether the empty.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:68–70size
public int size()
返回大小。
Returns the size.
int返回数值结果。Returns a numeric result.
源码Source
io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:72–74