- Orchestrator.Analyze: tier1 → confidence check → tier2 escalation if < threshold - CatalogStatus mapped from confidence: >= threshold → StatusIndexed, else StatusNeedsResearch - Both tiers fail gracefully: returns zero-value IntakeResult + StatusNeedsResearch, err nil - ResearchClient interface + NoOpResearchClient stub for Phase 7 SearXNG - 5 TestOrchestrator* tests all passing (TDD green)
24 lines
639 B
Go
24 lines
639 B
Go
package ai
|
|
|
|
import "context"
|
|
|
|
// SearchResult is a single result from a SearXNG research query.
|
|
type SearchResult struct {
|
|
Title string
|
|
URL string
|
|
Snippet string
|
|
}
|
|
|
|
// ResearchClient abstracts the SearXNG search backend.
|
|
// Phase 7 will provide a real implementation.
|
|
type ResearchClient interface {
|
|
Search(ctx context.Context, query string) ([]SearchResult, error)
|
|
}
|
|
|
|
// NoOpResearchClient is a Phase 2 stub that returns empty results.
|
|
// Replace with SearXNG HTTP client in Phase 7.
|
|
type NoOpResearchClient struct{}
|
|
|
|
func (n *NoOpResearchClient) Search(_ context.Context, _ string) ([]SearchResult, error) {
|
|
return nil, nil
|
|
}
|