list(), collapsed to ONE record per repo: the canonical snapshot
(refs/main, else most recently scanned). Upstream pushes create a new
snapshots/ls, /v1/models, /library). Order follows list() (size ascending).
Resolve a fuzzy query to exactly one model (error listing candidates otherwise).
Companion artifacts (isCompanion) are never selectable on their own, so
they never count as candidates here.
Index the hub cache (default hubCacheRoot()) and the configured plain
model directories. Returns the number of records written.
dbPathis the index file, or ":memory:"; the caller owns its location.