Expand description
Source selection: given a backend’s default sources (plus user config), pick which one to use — by pin, priority order, or fastest-probe (auto).
Probing and disk-cached results are the meat of M3; this module also exposes
active_source used by every backend to resolve a single source now.
Functions§
- active_
source - Resolve the single source to use right now for
backend. - effective_
sources - Assemble the effective source list for a backend: defaults minus disabled, plus user custom sources, honoring per-tool config.
- kind_
label - Human-readable kind label.
- probe_
all - Probe every source concurrently, returning results (failed ones included).
- ranked_
source_ candidates - Rank an already-filtered effective source set with the same pin, cache,
offline, and live-probe policy as
ranked_source_list. Backends use this when they must narrow candidates before any network probe, for example to keep private package names away from public registries. - ranked_
source_ list - The full list of candidate sources, best-first. Used for download failover: callers try each in order until one succeeds.
- refresh
- Force a refresh of the probe cache for a backend (used by
osdk source testand--refresh-sources). Returns the fresh results.