Skip to main content

Module update

Module update 

Source
Expand description

Interactive update check (advise-only). See ADR-0015 (docs/adr/0015-update-check-and-self-update.md) and the 031 plan (docs/design/plans/031-update-check/implementation-plan.md).

On prose-format + interactive-TTY runs only (unless opted out via DSP_NO_UPDATE_CHECK), dsp checks the crates.io sparse index for a newer published version and, if one exists, prints a two-line advisory to stderr recommending cargo install dsp-cli. No binary self-replace, no shell-out to cargo, no change to stdout, the JSON envelope, or the exit code — every failure path is non-fatal and swallowed.

maybe_notify is the single public entry point; main.rs calls it after handling the command result.

Modules§

cache
On-disk cache for the update check at ~/.config/dsp-cli/update_check.toml. See ADR-0015.

Functions§

fetch_latest
Fetches url (a crates.io sparse-index endpoint) and returns the highest published stable version found in the response body, if any.
maybe_notify
The single entry point: gates, then best-effort checks + notifies. Swallows all errors; never alters the process exit code.
parse_latest_stable
Parses a crates.io sparse-index response body and returns the highest published stable (non-prerelease, non-yanked) version, if any.