Documentation
¶
Overview ¶
Package skill loads, parses, and indexes user and project skills.
Index ¶
- Variables
- type Definition
- type Match
- type Registry
- func (r *Registry) Catalog(workspaceRoot string) (map[string]Definition, error)
- func (r *Registry) Get(workspaceRoot, id string) (Definition, error)
- func (r *Registry) GetMany(workspaceRoot string, ids []string) ([]Definition, error)
- func (r *Registry) Search(workspaceRoot, query string, limit int) ([]Match, error)
- type RegistryConfig
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Definition ¶
type Definition struct {
ID string
Description string
Prompt string
Path string
Source prompt.Source
}
func (Definition) PromptFragment ¶
func (d Definition) PromptFragment() prompt.Fragment
func (Definition) Validate ¶
func (d Definition) Validate() error
type Match ¶
type Match struct {
Definition Definition
Score int
Reasons []string
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry(config RegistryConfig) (*Registry, error)
func (*Registry) Catalog ¶
func (r *Registry) Catalog(workspaceRoot string) (map[string]Definition, error)
type RegistryConfig ¶
type RegistryConfig struct {
GlobalDir string
}
Click to show internal directories.
Click to hide internal directories.