Documentation
¶
Index ¶
- type Catalog
- type NewSessionParams
- type ProviderResolver
- type Session
- func (s *Session) ActivateKeys(ctx context.Context, keys []spec.ProviderSkillKey, mode spec.LoadMode) ([]spec.SkillHandle, error)
- func (s *Session) ActiveKeys(ctx context.Context) ([]spec.ProviderSkillKey, error)
- func (s *Session) ID() string
- func (s *Session) NewRegistry(opts ...llmtools.RegistryOption) (*llmtools.Registry, error)
- type SessionConfig
- type Store
- type StoreConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog interface {
ResolveHandle(h spec.SkillHandle) (spec.ProviderSkillKey, bool)
HandleForKey(key spec.ProviderSkillKey) (spec.SkillHandle, bool)
EnsureBody(ctx context.Context, key spec.ProviderSkillKey) (string, error)
GetIndex(key spec.ProviderSkillKey) (spec.ProviderSkillIndexRecord, bool)
}
type NewSessionParams ¶ added in v0.6.0
type NewSessionParams struct {
// If >0 overrides store default for this session.
MaxActivePerSession int
// Optional initial active skill keys (activated with LoadModeReplace).
ActiveKeys []spec.ProviderSkillKey
}
type ProviderResolver ¶
type ProviderResolver interface {
Provider(skillType string) (spec.SkillProvider, bool)
}
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) ActivateKeys ¶
func (s *Session) ActivateKeys( ctx context.Context, keys []spec.ProviderSkillKey, mode spec.LoadMode, ) ([]spec.SkillHandle, error)
func (*Session) ActiveKeys ¶ added in v0.6.0
ActiveKeys returns the session's active skill keys in activation order.
It also prunes keys that no longer exist in the catalog so callers don't need to handle removed-skills drift.
func (*Session) NewRegistry ¶
type SessionConfig ¶
type SessionConfig struct {
ID string
Catalog Catalog
Providers ProviderResolver
MaxActivePerSession int
Touch func() // store-provided "touch" to keep TTL/LRU alive
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStore ¶
func NewStore(cfg StoreConfig) *Store
func (*Store) NewSession ¶
func (st *Store) NewSession(ctx context.Context, p NewSessionParams) (string, []spec.SkillHandle, error)
func (*Store) PruneSkill ¶
func (st *Store) PruneSkill(key spec.ProviderSkillKey)
PruneSkill removes the given key from all sessions' active lists.
type StoreConfig ¶
Click to show internal directories.
Click to hide internal directories.