skill

package
v0.137.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveVars

func ResolveVars(mounts []string, vars map[string]string) []string

Types

type InterpolateData

type InterpolateData struct {
	Memory   map[string]string // memory file name -> body content
	Identity map[string]string // identity frontmatter field -> value
	Thread   string            // rendered thread summary
	Task     string            // task.what value
}

type Skill

type Skill struct {
	Name        string   `yaml:"name"`
	Description string   `yaml:"description"`
	Agent       string   `yaml:"agent"`
	Isolation   string   `yaml:"isolation"`
	Mounts      []string `yaml:"mounts"`
	Timeout     string   `yaml:"timeout"`
	Memory      []string `yaml:"memory"`
	MemoryWrite bool     `yaml:"memory_write"`
	Schedule    string   `yaml:"schedule"`
	Tags        []string `yaml:"tags"`
	Thread      bool     `yaml:"thread"`
	Body        string   `yaml:"-"`
}

func Load

func Load(path string) (*Skill, error)

func Parse

func Parse(content string) (*Skill, error)

type State

type State struct {
	Disabled []string `json:"disabled"`
}

func LoadState

func LoadState(dir string) (*State, error)

func (*State) Disable

func (s *State) Disable(name string)

func (*State) Enable

func (s *State) Enable(name string)

func (*State) IsEnabled

func (s *State) IsEnabled(name string) bool

func (*State) Save

func (s *State) Save(dir string) error

type Warning

type Warning struct {
	Marker  string
	Message string
}

func Interpolate

func Interpolate(body string, data InterpolateData) (string, []Warning)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL