Documentation
¶
Index ¶
- Constants
- func SelfCompactRubric() string
- type Catalog
- type Entry
- type MetaToolSpec
- type MutableSnapshot
- func (m *MutableSnapshot) Load(names []string) ([]Entry, error)
- func (m *MutableSnapshot) Replace(version string, ttl time.Duration, entries []Entry)
- func (m *MutableSnapshot) Search(query string, limit int) []SearchResult
- func (m *MutableSnapshot) TTL() time.Duration
- func (m *MutableSnapshot) Version() string
- type SearchResult
- type Snapshot
Constants ¶
const ( // ToolSearchTools is the built-in meta-tool for keyword catalog search. ToolSearchTools = "search_tools" // ToolLoadSchemas is the built-in meta-tool for loading deferred schemas. ToolLoadSchemas = "load_tool_schemas" // ToolCompactContext signals the end of a sub-task so the runtime can // compact masked tool observations before the next LLM turn. ToolCompactContext = "compact_context" )
Variables ¶
This section is empty.
Functions ¶
func SelfCompactRubric ¶
func SelfCompactRubric() string
SelfCompactRubric returns a short instruction hosts can append to agent system prompts when compact_context is available.
Types ¶
type Catalog ¶
type Catalog interface {
Search(query string, limit int) []SearchResult
Load(names []string) ([]Entry, error)
Version() string
TTL() time.Duration
}
Catalog exposes keyword search and schema loading for deferred tools.
type Entry ¶
type Entry struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Server string `json:"server,omitempty"`
RemoteName string `json:"remote_name,omitempty"`
InputSchema json.RawMessage `json:"input_schema,omitempty"`
SideEffect core.SideEffectLevel `json:"side_effect,omitempty"`
Approval core.ApprovalPolicy `json:"approval,omitempty"`
Tags []string `json:"tags,omitempty"`
// Pin marks a tool as always injected alongside catalog meta-tools.
Pin bool `json:"pin,omitempty"`
}
Entry describes one tool available through a deferred catalog.
type MetaToolSpec ¶
type MetaToolSpec struct {
Name string
Description string
Schema json.RawMessage
}
MetaToolSpec is a lightweight spec helper for catalog meta-tools.
func MetaToolSpecs ¶
func MetaToolSpecs() []MetaToolSpec
MetaToolSpecs returns LLM tool specs for catalog meta-tools.
func SelfCompactMetaToolSpec ¶
func SelfCompactMetaToolSpec() MetaToolSpec
SelfCompactMetaToolSpec returns the compact_context meta-tool spec.
type MutableSnapshot ¶
type MutableSnapshot struct {
// contains filtered or unexported fields
}
MutableSnapshot wraps a catalog snapshot that can be refreshed atomically.
func NewMutableSnapshot ¶
func NewMutableSnapshot(version string, ttl time.Duration, entries []Entry) *MutableSnapshot
func (*MutableSnapshot) Replace ¶
func (m *MutableSnapshot) Replace(version string, ttl time.Duration, entries []Entry)
func (*MutableSnapshot) Search ¶
func (m *MutableSnapshot) Search(query string, limit int) []SearchResult
func (*MutableSnapshot) TTL ¶
func (m *MutableSnapshot) TTL() time.Duration
func (*MutableSnapshot) Version ¶
func (m *MutableSnapshot) Version() string
type SearchResult ¶
type SearchResult struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Server string `json:"server,omitempty"`
Tags []string `json:"tags,omitempty"`
}
SearchResult is a lightweight catalog hit returned by Search.
type Snapshot ¶
type Snapshot struct {
VersionTag string
CacheTTL time.Duration
// contains filtered or unexported fields
}
Snapshot is an in-memory catalog with version and TTL metadata.
func NewSnapshot ¶
NewSnapshot builds a catalog snapshot from entries. Duplicate names keep the last entry.