Documentation
¶
Overview ¶
Package search implements unified full-text search across all cloop project artifacts. It can search tasks, KB entries, journal entries, step logs, task artifacts, changelog, retro reports, and plan snapshots.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllSources = []SourceType{ SourceTask, SourceKB, SourceJournal, SourceStepLog, SourceArtifact, SourceChangelog, SourceRetro, SourceSnapshot, SourceArchive, }
AllSources is the full set of source types.
Functions ¶
func SemanticRankPrompt ¶
SemanticRankPrompt builds the AI prompt used to re-rank results.
Types ¶
type Options ¶
type Options struct {
// Types filters which source types to search. Empty = all.
Types []SourceType
// Semantic uses the AI provider to re-rank results by relevance.
Semantic bool
// Provider and Model for semantic re-ranking.
Provider provider.Provider
Model string
// Timeout for AI calls.
Timeout time.Duration
}
Options controls the search behaviour.
type Result ¶
type Result struct {
Source SourceType `json:"source"`
ID string `json:"id,omitempty"` // task ID, KB entry ID, etc.
Title string `json:"title,omitempty"` // human-readable label
Excerpt string `json:"excerpt"` // matched text snippet (≤200 chars)
FilePath string `json:"file_path,omitempty"` // relative path to file
Timestamp time.Time `json:"timestamp,omitempty"` // when the artifact was created/updated
Score int `json:"score"` // relevance score (higher = more relevant)
}
Result is one match returned by a search.
type SourceType ¶
type SourceType string
SourceType identifies the artifact type a result came from.
const ( SourceTask SourceType = "task" SourceKB SourceType = "kb" SourceJournal SourceType = "journal" SourceStepLog SourceType = "steplog" SourceArtifact SourceType = "artifact" SourceChangelog SourceType = "changelog" SourceRetro SourceType = "retro" SourceSnapshot SourceType = "snapshot" SourceArchive SourceType = "archive" )
func ParseTypes ¶
func ParseTypes(s string) ([]SourceType, error)
ParseTypes parses a comma-separated type filter string into SourceType slice. "all" or empty returns nil (= all types).
Click to show internal directories.
Click to hide internal directories.