Documentation
¶
Index ¶
Constants ¶
const ( LangPython = "python" LangNode = "node" LangBash = "bash" )
Supported language runtimes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resources ¶
type Resources struct {
CPU string `json:"cpu,omitempty" yaml:"cpu,omitempty"`
Memory string `json:"memory,omitempty" yaml:"memory,omitempty"`
}
Resources describes the CPU and memory constraints for a skill execution.
type Skill ¶
type Skill struct {
Name string
Version string
Description string
Lang string // python | node | bash
Image string // Docker image; empty means use DefaultImage()
Timeout time.Duration
Resources Resources
Instructions string // body text after the frontmatter
}
Skill is the fully parsed and validated representation of a SKILL.md file.
func ParseSkillMD ¶
ParseSkillMD extracts the YAML frontmatter (between two "---" lines) and the body from a SKILL.md file. It returns the parsed Skill with Validate() already called on it, or an error.
func (*Skill) DefaultImage ¶
DefaultImage returns the canonical Docker image for the skill's language. If a custom Image is already set on the Skill it is returned as-is.
type SkillMetadata ¶
type SkillMetadata struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Lang string `json:"lang"`
Image string `json:"image,omitempty"`
Instructions string `json:"instructions,omitempty"`
Timeout string `json:"timeout,omitempty"`
Resources Resources `json:"resources,omitempty"`
}
SkillMetadata is the subset of Skill returned in list/get API responses.
type SkillSummary ¶
type SkillSummary struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Lang string `json:"lang"`
}
SkillSummary is the compact representation returned by list endpoints. It includes description so agents can decide which skill to use.