Documentation
¶
Index ¶
- type Catalog
- type NewSessionParams
- type ProviderResolver
- type Session
- func (s *Session) ActivateKeys(ctx context.Context, keys []provider.ProviderSkillKey, mode spec.LoadMode) ([]spec.SkillHandle, error)
- func (s *Session) ActiveKeys(ctx context.Context) ([]provider.ProviderSkillKey, error)
- func (s *Session) AllowsKey(key provider.ProviderSkillKey) bool
- 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) (provider.ProviderSkillKey, bool)
HandleForKey(key provider.ProviderSkillKey) (spec.SkillHandle, bool)
EnsureBody(ctx context.Context, key provider.ProviderSkillKey) (string, error)
GetIndex(key provider.ProviderSkillKey) (provider.ProviderSkillIndexRecord, bool)
}
type NewSessionParams ¶
type NewSessionParams struct {
// If >0 overrides store default for this session.
MaxActivePerSession int
// Optional initial active skill keys (activated with LoadModeReplace).
ActiveKeys []provider.ProviderSkillKey
// Nil means unrestricted. A non-nil empty map means no skill is allowed.
AllowedKeys map[provider.ProviderSkillKey]struct{}
}
type ProviderResolver ¶
type ProviderResolver interface {
Provider(skillType string) (provider.SkillProvider, bool)
}
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) ActivateKeys ¶
func (s *Session) ActivateKeys( ctx context.Context, keys []provider.ProviderSkillKey, mode spec.LoadMode, ) ([]spec.SkillHandle, error)
func (*Session) ActiveKeys ¶
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) AllowsKey ¶
func (s *Session) AllowsKey(key provider.ProviderSkillKey) bool
AllowsKey reports whether this session may use key. It is exported only to sibling runtime packages through the module's internal boundary.
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
// Nil means unrestricted. A non-nil empty map means no skill is allowed.
AllowedKeys map[provider.ProviderSkillKey]struct{}
SupportsRunScript bool
}
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 provider.ProviderSkillKey)
PruneSkill removes the given key from all sessions' active lists.
type StoreConfig ¶
Click to show internal directories.
Click to hide internal directories.