Documentation
¶
Index ¶
- func ActiveSkillsPrompt(items []ActiveSkillItem) string
- func AvailableSkillsPrompt(items []AvailableSkillItem) string
- type ActiveSkillItem
- type AvailableSkillItem
- type Catalog
- func (c *Catalog) Add(ctx context.Context, def provider.SkillDef) (spec.SkillRecord, error)
- func (c *Catalog) EnsureBody(ctx context.Context, key provider.ProviderSkillKey) (string, error)
- func (c *Catalog) GetIndex(key provider.ProviderSkillKey) (provider.ProviderSkillIndexRecord, bool)
- func (c *Catalog) HandleForKey(key provider.ProviderSkillKey) (spec.SkillHandle, bool)
- func (c *Catalog) ListPromptIndexRecords(f PromptFilter) []provider.ProviderSkillIndexRecord
- func (c *Catalog) ListUserEntries(f UserFilter) []UserEntry
- func (c *Catalog) Remove(def provider.SkillDef) (spec.SkillRecord, provider.ProviderSkillKey, bool)
- func (c *Catalog) ResolveDef(def provider.SkillDef) (provider.ProviderSkillKey, bool)
- func (c *Catalog) ResolveHandle(h spec.SkillHandle) (provider.ProviderSkillKey, bool)
- type PromptFilter
- type ProviderResolver
- type UserEntry
- type UserFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActiveSkillsPrompt ¶
func ActiveSkillsPrompt(items []ActiveSkillItem) string
func AvailableSkillsPrompt ¶
func AvailableSkillsPrompt(items []AvailableSkillItem) string
Types ¶
type ActiveSkillItem ¶
type ActiveSkillItem struct {
Name string
Body string
Resources provider.SkillResourceInfo
}
type AvailableSkillItem ¶
type AvailableSkillItem struct {
Name string
Description string
Location string
Resources provider.SkillResourceInfo
}
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func NewCatalog ¶
func NewCatalog(providers ProviderResolver) *Catalog
func (*Catalog) Add ¶
Add registers a skill by its host/lifecycle definition (user input). It stores provider-canonicalized identity internally, but returns only the original def to callers.
func (*Catalog) EnsureBody ¶
func (*Catalog) GetIndex ¶
func (c *Catalog) GetIndex(key provider.ProviderSkillKey) (provider.ProviderSkillIndexRecord, bool)
func (*Catalog) HandleForKey ¶
func (c *Catalog) HandleForKey(key provider.ProviderSkillKey) (spec.SkillHandle, bool)
func (*Catalog) ListPromptIndexRecords ¶
func (c *Catalog) ListPromptIndexRecords(f PromptFilter) []provider.ProviderSkillIndexRecord
ListPromptIndexRecords lists INTERNAL records for prompt assembly (returns canonical keys).
func (*Catalog) ListUserEntries ¶
func (c *Catalog) ListUserEntries(f UserFilter) []UserEntry
ListUserEntries lists host-facing records, while preserving the canonical key for internal consumers.
func (*Catalog) Remove ¶
func (c *Catalog) Remove(def provider.SkillDef) (spec.SkillRecord, provider.ProviderSkillKey, bool)
Remove removes a skill by its EXACT host/lifecycle definition. Returns the host-facing record, the canonical internal key, and ok=false if not found.
func (*Catalog) ResolveDef ¶
ResolveDef resolves an EXACT user-provided skill def (as originally added) to the internal canonical key.
func (*Catalog) ResolveHandle ¶
func (c *Catalog) ResolveHandle(h spec.SkillHandle) (provider.ProviderSkillKey, bool)
type PromptFilter ¶
type PromptFilter struct {
Types []string
LLMNamePrefix string
LocationPrefix string
Inserts []document.SkillInsert
// AllowDefs restricts to an explicit allowlist of host/lifecycle definitions. Empty means "all".
AllowDefs []provider.SkillDef
}
PromptFilter is used for LLM prompt listing.
type ProviderResolver ¶
type ProviderResolver interface {
Provider(skillType string) (provider.SkillProvider, bool)
}
type UserEntry ¶
type UserEntry struct {
Key provider.ProviderSkillKey // canonical/internal key
Record spec.SkillRecord // host-facing record (user def)
}
type UserFilter ¶
type UserFilter struct {
Types []string
NamePrefix string
LocationPrefix string
AllowDefs []provider.SkillDef
Inserts []document.SkillInsert
}
UserFilter is used for host/lifecycle listing.