Documentation
¶
Index ¶
- type Engine
- func (e *Engine) ClearCache() error
- func (e *Engine) GetAllAgents() []*parser.AgentSpec
- func (e *Engine) GetCacheStats() map[string]interface{}
- func (e *Engine) GetStats() map[string]interface{}
- func (e *Engine) Query(query string, opts QueryOptions) ([]*parser.AgentSpec, error)
- func (e *Engine) QueryByField(field, value string) ([]*parser.AgentSpec, error)
- func (e *Engine) QueryWithFuzzy(query string, opts QueryOptions) ([]*parser.AgentSpec, error)
- func (e *Engine) RebuildIndex(dir string) error
- func (e *Engine) RebuildWithAgents(agents []*parser.AgentSpec) error
- func (e *Engine) SaveCache() error
- func (e *Engine) SetFuzzyThreshold(threshold float64)
- func (e *Engine) ShowAgent(filename string) (*parser.AgentSpec, error)
- func (e *Engine) ShowCacheStats() error
- func (e *Engine) UpdateIndex(dir string) error
- type QueryOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine handles agent queries with caching and advanced search capabilities
func (*Engine) GetAllAgents ¶
GetAllAgents returns all agents in the index
func (*Engine) GetCacheStats ¶
GetCacheStats returns cache performance statistics
func (*Engine) QueryByField ¶
QueryByField searches specific fields with the provided value
func (*Engine) QueryWithFuzzy ¶
QueryWithFuzzy searches for agents using enhanced multi-field fuzzy matching
func (*Engine) RebuildIndex ¶
RebuildIndex rebuilds the search index from the specified directory
func (*Engine) RebuildWithAgents ¶
RebuildWithAgents rebuilds the index with a provided list of agents
func (*Engine) SetFuzzyThreshold ¶
SetFuzzyThreshold adjusts the fuzzy matching threshold
func (*Engine) ShowCacheStats ¶
ShowCacheStats displays cache statistics
func (*Engine) UpdateIndex ¶
UpdateIndex updates the index with new or modified agents
type QueryOptions ¶
type QueryOptions struct {
Limit int // Maximum number of results to return
NoTools bool // Find agents with inherited tools only
CustomTools bool // Find agents with explicit tools only
Regex bool // Use regex pattern matching
Source string // Filter by installation source
After time.Time // Filter agents installed after this time
Context context.Context // For cancellation and timeouts
}
QueryOptions provides filtering and configuration options for queries