Documentation
¶
Overview ¶
Package core coordinates the user-visible indexing and search workflows.
The package deliberately keeps orchestration separate from storage, embedding, and file discovery. That split keeps the important product rules visible here: a full project index may prune any missing indexed file, but a path-specific index may only prune files inside the requested path scope.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyIndex = errors.New("index is empty; run `mdidx index` first")
ErrEmptyIndex lets the CLI return the same configuration-style exit code for a project that has a config file but has not built a usable index yet.
Functions ¶
Types ¶
type IndexSummary ¶
type IndexSummary struct {
Scanned int `json:"scanned"`
Changed int `json:"changed"`
Deleted int `json:"deleted"`
Chunks int `json:"chunks"`
}
IndexSummary is part of the CLI JSON contract; keep field names stable for agents and scripts that consume `mdidx index --json`.
type Options ¶
type Options struct {
APIKey string
Progress ProgressFunc
}
type ProgressEvent ¶
type ProgressEvent struct {
Stage string `json:"stage"`
Message string `json:"message"`
ScannedFiles int `json:"scanned_files,omitempty"`
ChangedFiles int `json:"changed_files,omitempty"`
DeletedFiles int `json:"deleted_files,omitempty"`
File string `json:"file,omitempty"`
Batch int `json:"batch,omitempty"`
TotalBatches int `json:"total_batches,omitempty"`
EmbeddedChunks int `json:"embedded_chunks,omitempty"`
TotalChunks int `json:"total_chunks,omitempty"`
}
ProgressEvent is deliberately coarse-grained. It lets the CLI report useful long-run status without coupling terminal output to storage or embedding internals, and without changing the stable IndexSummary JSON shape.
type ProgressFunc ¶
type ProgressFunc func(ProgressEvent)