Frontmatter

data class Frontmatter(val name: String, val description: String, val license: String? = null, val compatibility: String? = null, val allowedTools: String? = null, val metadata: Map<String, Any?> = emptyMap())

Represents the frontmatter of a skill, containing metadata about the skill.

Validation is enforced at construction time: any attempt to instantiate a Frontmatter with fields that violate the specification (e.g. invalid name characters, oversized description) will fail with IllegalArgumentException. As a result, every Frontmatter instance is guaranteed to be well-formed.

Throws

if any field violates the frontmatter specification.

构造函数(Constructors)

Link copied to clipboard
constructor(name: String, description: String, license: String? = null, compatibility: String? = null, allowedTools: String? = null, metadata: Map<String, Any?> = emptyMap())

类型

Link copied to clipboard
class Builder

Fluent Builder for Frontmatter该功能主要为 Java 语言的调用者提供支持;如果某个属性未被设置,其值将默认使用构造函数中指定的默认值。

Link copied to clipboard
object Companion

属性(Properties)

Link copied to clipboard

该技能允许使用的工具。

Link copied to clipboard

该技能的兼容性。

Link copied to clipboard

该技能的描述。

Link copied to clipboard

该技能的许可证信息。

Link copied to clipboard

关于该技能的附加元数据。

Link copied to clipboard

这项技能的名称。

函数

Link copied to clipboard

返回一个 Builder 使用该实例的属性进行初始化,主要适用于 Java 调用者。建议优先选择这种方式。 copy 来自 Java 的代码: copy 该函数会按位置获取所有属性的值;因此,每当有新属性被添加时,其函数签名(即函数的定义)就会发生变化。