AS AgentScopeAPI 手册 / API Reference

DefinitionStoreSkillRepository

public final class DefinitionStoreSkillRepository implements AgentSkillRepository
源码Source 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_PREFIX
staticfinal
String
技能 PREFIX字段。
The SKILLS PREFIX field.
SKILL_MD
staticfinal
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

方法Method说明Description
public String getSource()
获取来源。
Returns the source.
public AgentSkillRepositoryInfo getRepositoryInfo()
获取仓库信息。
Returns the repository info.
public List<AgentSkill> getAllSkills()
获取所有技能。
Returns the all skills.
public List<String> getAllSkillNames()
获取 `getAllSkillNames`。
Returns the all skill names.
public AgentSkill getSkill(String name)
获取技能。
Returns the skill.
public boolean skillExists(String skillName)
设置该参数。
Performs the skill exists operation.
public boolean save(List<AgentSkill> skills, boolean force)
保存数据到持久化存储。
Performs the save operation.
public boolean delete(String skillName)
删除数据。
Performs the delete operation.
public void setWriteable(boolean writeable)
设置 `setWriteable`。
Sets the writeable.
public boolean isWriteable()
判断是否 `isWriteable`。
Returns whether the writeable.
public List<String> listSkillNames()
列出 `listSkillNames`。
Skill directory names that contain a `SKILL.md`.
public Optional<AgentSkill> loadSkill(String skillName)
加载技能。
Loads the skill.
public static String skillMdPath(String skillName)
static
设置技能 Md 路径。
Performs the skill md path operation.
public static String skillFilePath(String skillName, String relativeInsideSkill)
static
执行技能文件路径相关操作。
Performs the skill file path operation.

字段详情Field Detail

SKILLS_PREFIX

public static final String SKILLS_PREFIX
staticfinal

技能 PREFIX字段。声明为 public static final String SKILLS_PREFIX。

The SKILLS PREFIX field.

源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:41

SKILL_MD

public static final String SKILL_MD
staticfinal

技能 MD字段。声明为 public static final String SKILL_MD。

The SKILL MD field.

源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:42

构造器详情Constructor Detail

DefinitionStoreSkillRepository

public DefinitionStoreSkillRepository(DefinitionStore store, String ownerId, String agentId)

初始化 DefinitionStoreSkillRepository 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
storeDefinitionStore存储实例(类型 `DefinitionStore`)。The store.
ownerIdString所有者标识(类型 `String`)。The owner id.
agentIdString智能体标识(类型 `String`)。The agent id.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:50–55

方法详情Method Detail

getSource

public String getSource()

获取来源。

Returns the source.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:57–60

getRepositoryInfo

public AgentSkillRepositoryInfo getRepositoryInfo()

获取仓库信息。

Returns the repository info.

返回Returns AgentSkillRepositoryInfo
返回AgentSkillRepositoryInfo。Returns agent skill repository info.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:62–68

getAllSkills

public List<AgentSkill> getAllSkills()

获取所有技能。

Returns the all skills.

返回Returns List<AgentSkill>
返回列出。Returns list.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:70–86

getAllSkillNames

public List<String> getAllSkillNames()

获取 getAllSkillNames。

Returns the all skill names.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:88–91

getSkill

public AgentSkill getSkill(String name)

获取技能。

Returns the skill.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
返回Returns AgentSkill
返回AgentSkill。Returns agent skill.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:93–100

skillExists

public boolean skillExists(String skillName)

设置该参数。

Performs the skill exists operation.

参数Parameters
名称Name类型Type说明Description
skillNameString技能名称(类型 `String`)。The skill name.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:102–105

save

public boolean save(List<AgentSkill> skills, boolean force)

保存数据到持久化存储。

Performs the save operation.

参数Parameters
名称Name类型Type说明Description
skillsList<AgentSkill>技能(类型 `List`)。The skills.
forcebooleanforce(类型 `boolean`)。The force.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:107–135

delete

public boolean delete(String skillName)

删除数据。

Performs the delete operation.

参数Parameters
名称Name类型Type说明Description
skillNameString技能名称(类型 `String`)。The skill name.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:137–147

setWriteable

public void setWriteable(boolean writeable)

设置 setWriteable。

Sets the writeable.

参数Parameters
名称Name类型Type说明Description
writeablebooleanwriteable(类型 `boolean`)。The writeable.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:149–152

isWriteable

public boolean isWriteable()

判断是否 isWriteable。

Returns whether the writeable.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:154–157

listSkillNames

public List<String> listSkillNames()

列出 listSkillNames。

Skill directory names that contain a SKILL.md.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:160–183

loadSkill

public Optional<AgentSkill> loadSkill(String skillName)

加载技能。

Loads the skill.

参数Parameters
名称Name类型Type说明Description
skillNameString技能名称(类型 `String`)。The skill name.
返回Returns Optional<AgentSkill>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:185–207

skillMdPath

public static String skillMdPath(String skillName)
static

设置技能 Md 路径。

Performs the skill md path operation.

参数Parameters
名称Name类型Type说明Description
skillNameString技能名称(类型 `String`)。The skill name.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:209–211

skillFilePath

public static String skillFilePath(String skillName, String relativeInsideSkill)
static

执行技能文件路径相关操作。

Performs the skill file path operation.

参数Parameters
名称Name类型Type说明Description
skillNameString技能名称(类型 `String`)。The skill name.
relativeInsideSkillStringrelative Inside 技能(类型 `String`)。The relative inside skill.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/catalog/DefinitionStoreSkillRepository.java:213–222

继承成员Inherited Members

继承自Methods inherited from AgentSkillRepository
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.