Versions in this module Expand all Collapse all v0 v0.1.3 Sep 1, 2026 v0.1.2 Aug 31, 2026 Changes in this version + var ErrInvalidArguments = errors.New("skill: invalid arguments") + var ErrNotFound = errors.New("skill: skill not found") + func BooleanProperty(description string) map[string]any + func IntegerProperty(description string) map[string]any + func NumberProperty(description string) map[string]any + func Schema(description string, properties map[string]any, required ...string) map[string]any + func StringProperty(description string) map[string]any + type Call struct + Arguments json.RawMessage + ID string + Name string + type Definition struct + Description string + InputSchema map[string]any + Name string + type Func struct + func NewFunc[In, Out any](manifest Manifest, fn func(context.Context, In) (Out, error)) *Func[In, Out] + func (f *Func[In, Out]) Definition() Definition + func (f *Func[In, Out]) Instructions() string + func (f *Func[In, Out]) Invoke(ctx context.Context, args json.RawMessage) (Result, error) + func (f *Func[In, Out]) Version() string + type Invoker struct + func NewInvoker(registry *Registry, opts ...InvokerOption) *Invoker + func (i *Invoker) Invoke(ctx context.Context, call Call) Result + type InvokerOption func(*Invoker) + func WithMiddlewares(ms ...Middleware) InvokerOption + type Loader struct + func NewLoader() *Loader + func (l *Loader) Load(path string) (Skill, error) + func (l *Loader) LoadDir(dir string) ([]Skill, error) + type Manifest struct + Instructions string + Version string + func ParseManifest(content string) (Manifest, error) + type Middleware func(next Next) Next + func Logging(logf func(format string, args ...any)) Middleware + func Recover() Middleware + func Timeout(d time.Duration) Middleware + type Next func(ctx context.Context, call Call) (Result, error) + type Registry struct + func NewRegistry() *Registry + func NewRegistryWith(skills ...Skill) *Registry + func (r *Registry) Get(name string) (Skill, bool) + func (r *Registry) Has(name string) bool + func (r *Registry) Instructions() []Manifest + func (r *Registry) List() []Definition + func (r *Registry) Manifests() []Manifest + func (r *Registry) Names() []string + func (r *Registry) Register(s Skill) + type Result struct + Content string + Data any + Err error + IsError bool + func Failure(err error) Result + func Success(data any) Result + type Skill interface + Definition func() Definition + Instructions func() string + Invoke func(ctx context.Context, args json.RawMessage) (Result, error) + type Static struct + func NewStatic(manifest Manifest) *Static + func (s *Static) Definition() Definition + func (s *Static) Instructions() string + func (s *Static) Invoke(_ context.Context, _ json.RawMessage) (Result, error) + func (s *Static) Version() string