driftยถ
Per-app comparison of versions reported by participating sources (currently Installomator and Homebrew Cask). Surfaces apps where sources disagree on what โlatestโ means, the case where one source has silently fallen behind. Powers the /apps/drift endpoint and the list_drift MCP tool.
- extract_versions(detail: AppSourceDetail | None) dict[str, str][source]ยถ
Pull the per-source version string out of an appโs source detail.
Returns a dict keyed by source name (
installomator,homebrew_cask). Sources with no extractable version (missing payload, missing version field, shell-expression value) are omitted so callers can rely onlen(...)for โhow many versioned sources does this app have.โ
- detect_drift(app_row: App, detail: AppSourceDetail | None) DriftEntry | None[source]ยถ
Compute drift for a single app.
Returns
Nonewhen fewer than two sources expose a version or when all versions are equivalent (PEP-440 equal for parseable values, case-insensitive string equality otherwise). Returns aDriftEntrywhen sources disagree.- Parameters:
app_row (App) โ The
appstable row.detail (AppSourceDetail | None) โ The matching
app_source_detailsrow, orNone.
- Returns:
A drift entry, or
Noneif no drift.- Return type:
DriftEntry | None