技能来源(Source)

interface SkillSource

Core interface for accessing skill components.

Implementations are expected to be safe for concurrent use by multiple coroutines.

All methods return a Result whose failure case is a SkillSourceException with a detailed error message intended to be surfaced to the LLM. Implementations should only wrap SkillSourceException in Result.failure.

Inheritors

类型

Link copied to clipboard
object Companion

函数

Link copied to clipboard
abstract suspend fun listFrontmatters(): Result<List<Frontmatter>>

返回所有可用技能的前置内容(即技能介绍或相关说明)。

Link copied to clipboard
abstract suspend fun listResources(skillName: String, resourceDirectoryPath: String): Result<List<String>>

返回指定技能所在目录内的一系列资源路径。

Link copied to clipboard
abstract suspend fun loadFrontmatter(skillName: String): Result<Frontmatter>

根据名称加载某个特定技能的前置内容(即该技能的简介或介绍信息)。

Link copied to clipboard
abstract suspend fun loadInstructions(skillName: String): Result<String>

根据名称加载特定技能的指令内容。

Link copied to clipboard
abstract suspend fun loadResource(skillName: String, resourcePath: String): Result<ByteArray>

为指定的技能加载特定的资源文件。