DefinitionStoreSkillRepository
public final class DefinitionStoreSkillRepository implements AgentSkillRepository
io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:37–223定义存储技能仓库,负责持久化与读取数据。位于 io.agentscope.builder.web.catalog 包,实现 AgentSkillRepository。核心成员包括 getSource、getRepositoryInfo、getAllSkills、getAllSkillNames、getSkill、skillExists。
Loads workspace skills from the control-plane DefinitionStore (paths under skills/{name}/…), independent of the session Hands filesystem.
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
SKILLS_PREFIXstaticfinal | String | 技能 PREFIX字段。 The SKILLS PREFIX field. |
SKILL_MDstaticfinal | String | 技能 MD字段。 The SKILL MD field. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public DefinitionStoreSkillRepository(DefinitionStore store, String ownerId, String agentId) | 初始化 `DefinitionStoreSkillRepository` 实例。 Creates a new instance. |
方法摘要Method Summary
字段详情Field Detail
SKILLS_PREFIX
public static final String SKILLS_PREFIX
技能 PREFIX字段。声明为 public static final String SKILLS_PREFIX。
The SKILLS PREFIX field.
io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:41SKILL_MD
public static final String SKILL_MD
技能 MD字段。声明为 public static final String SKILL_MD。
The SKILL MD field.
io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:42构造器详情Constructor Detail
DefinitionStoreSkillRepository
public DefinitionStoreSkillRepository(DefinitionStore store, String ownerId, String agentId)
初始化 DefinitionStoreSkillRepository 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
store | DefinitionStore | 存储实例(类型 `DefinitionStore`)。The store. |
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:50–55方法详情Method Detail
getSource
public String getSource()
获取来源。
Returns the source.
Stringio/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:57–60getRepositoryInfo
public AgentSkillRepositoryInfo getRepositoryInfo()
获取仓库信息。
Returns the repository info.
AgentSkillRepositoryInfoio/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:62–68getAllSkills
public List<AgentSkill> getAllSkills()
获取所有技能。
Returns the all skills.
List<AgentSkill>io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:70–86getAllSkillNames
public List<String> getAllSkillNames()
获取 getAllSkillNames。
Returns the all skill names.
List<String>io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:88–91getSkill
public AgentSkill getSkill(String name)
获取技能。
Returns the skill.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
AgentSkillio/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:93–100skillExists
public boolean skillExists(String skillName)
设置该参数。
Performs the skill exists operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skillName | String | 技能名称(类型 `String`)。The skill name. |
booleanio/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:102–105save
public boolean save(List<AgentSkill> skills, boolean force)
保存数据到持久化存储。
Performs the save operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skills | List<AgentSkill> | 技能(类型 `List`)。The skills. |
force | boolean | force(类型 `boolean`)。The force. |
booleanio/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:107–135delete
public boolean delete(String skillName)
删除数据。
Performs the delete operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skillName | String | 技能名称(类型 `String`)。The skill name. |
booleanio/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:137–147setWriteable
public void setWriteable(boolean writeable)
设置 setWriteable。
Sets the writeable.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
writeable | boolean | writeable(类型 `boolean`)。The writeable. |
io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:149–152isWriteable
public boolean isWriteable()
判断是否 isWriteable。
Returns whether the writeable.
booleanio/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:154–157listSkillNames
public List<String> listSkillNames()
列出 listSkillNames。
Skill directory names that contain a SKILL.md.
List<String>io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:160–183loadSkill
public Optional<AgentSkill> loadSkill(String skillName)
加载技能。
Loads the skill.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skillName | String | 技能名称(类型 `String`)。The skill name. |
Optional<AgentSkill>io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:185–207skillMdPath
public static String skillMdPath(String skillName)
设置技能 Md 路径。
Performs the skill md path operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skillName | String | 技能名称(类型 `String`)。The skill name. |
Stringio/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:209–211skillFilePath
public static String skillFilePath(String skillName, String relativeInsideSkill)
执行技能文件路径相关操作。
Performs the skill file path operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skillName | String | 技能名称(类型 `String`)。The skill name. |
relativeInsideSkill | String | relative Inside 技能(类型 `String`)。The relative inside skill. |
Stringio/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:213–222