Documentation
¶
Overview ¶
Package toolselection holds discovery and schema activation for one turn. Activation changes model exposure only; tool execution retains its normal guards.
Index ¶
- func WithState(ctx context.Context, candidates []llm.Tool) context.Context
- type Candidate
- type State
- func (s *State) Activate(names []string) error
- func (s *State) List(query string, offset, limit int) ([]Candidate, bool, error)
- func (s *State) ListPage(ctx context.Context, query primitive.CatalogQuery, offset int) (*primitive.CatalogPage[Candidate], error)
- func (s *State) SelectedNames() []string
- func (s *State) SetCandidates(candidates []llm.Tool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func FromContext ¶
FromContext rejects inherited state after a principal or turn change.
func (*State) ListPage ¶
func (s *State) ListPage(ctx context.Context, query primitive.CatalogQuery, offset int) (*primitive.CatalogPage[Candidate], error)
ListPage shares the skill catalog's literal OR-within/AND-between filters. Offset supports older tool clients; cursors retain the shared snapshot/query binding. The immutable index is reused until SetCandidates changes metadata.
func (*State) SelectedNames ¶
func (*State) SetCandidates ¶
SetCandidates refreshes metadata from the normal authorized binding pipeline. Removed candidates also lose activation; this method grants no execution rights.
Click to show internal directories.
Click to hide internal directories.