skilluse

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package skilluse provides the runtime tool for loading Leros skill documents.

Index

Constants

View Source
const (
	// ToolNameSkillUse is the runtime tool used to discover and load skill documents.
	ToolNameSkillUse = "skill_use"
)

Variables

This section is empty.

Functions

func Register

func Register(registry *tools.Registry) error

Register registers all skill catalog tools into the provided registry. Tools dynamically scan the skills directory on each invocation — no cached state.

Types

type ErrSkillNotFound added in v0.1.1

type ErrSkillNotFound struct {
	Name             string
	AvailableSkills  []string
	ManifestMismatch string
}

ErrSkillNotFound is a structured error returned when a skill cannot be found. AvailableSkills is always populated so callers can surface available options.

func (*ErrSkillNotFound) Error added in v0.1.1

func (e *ErrSkillNotFound) Error() string

type SkillUseTool

type SkillUseTool struct {
	tools.BaseTool
}

SkillUseTool lets an agent query and load skills from the runtime skill catalog. It dynamically scans the filesystem on every call — no cached state.

func NewSkillUseTool

func NewSkillUseTool() *SkillUseTool

NewSkillUseTool creates a skill use tool that dynamically scans the skills directory.

func (*SkillUseTool) Execute

func (t *SkillUseTool) Execute(ctx context.Context, raw json.RawMessage) (string, error)

Execute performs the requested skill catalog action.

func (*SkillUseTool) Validate

func (t *SkillUseTool) Validate(raw json.RawMessage) error

Validate checks skill use tool input.

Jump to

Keyboard shortcuts

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