Documentation
¶
Index ¶
- Variables
- func DefineSkillTool(skills []Skill, opts ToolOptions) (tools.Tool, error)
- func ParseMetadata(text string) (map[string]string, error)
- func ValidateName(name string) error
- type Catalog
- type Diagnostic
- type PromptOptions
- type Scope
- type Skill
- type SkillLoad
- type Source
- type SourceInfo
- type SourceKind
- type ToolOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSkill = errors.New("invalid skill") ErrSkillNotFound = errors.New("skill not found") )
Functions ¶
func DefineSkillTool ¶
func DefineSkillTool(skills []Skill, opts ToolOptions) (tools.Tool, error)
func ValidateName ¶
Types ¶
type Catalog ¶
type Catalog struct {
Skills []Skill
Diagnostics []Diagnostic
}
type Diagnostic ¶
type Diagnostic struct {
Kind string
SkillName string
Path string
SourceKind SourceKind
Message string
}
func BuildPrompt ¶
func BuildPrompt(skills []Skill, opts PromptOptions) (string, []Diagnostic)
type PromptOptions ¶
type PromptOptions struct {
MaxBytes int
}
type SkillLoad ¶
type SkillLoad struct {
Name string
Path string
SourceKind SourceKind
ContentHash string
Bytes int
}
type Source ¶
type Source struct {
Root string
Kind SourceKind
Scope Scope
DisplayLabel string
Enabled bool
}
type SourceInfo ¶
type SourceInfo struct {
Kind SourceKind
Root string
RelativePath string
DisplayLabel string
}
type SourceKind ¶
type SourceKind string
const ( SourceRepo SourceKind = "repo" SourceUser SourceKind = "user" SourceAdmin SourceKind = "admin" SourceConfig SourceKind = "config" )
type ToolOptions ¶
type ToolOptions struct {
OutputPolicy tools.OutputPolicy
OnLoad func(SkillLoad)
}
Click to show internal directories.
Click to hide internal directories.