Skip to main content

Module legacy

Module legacy 

Source
Expand description

Compatibility with installations made before the ProofVisor rename.

Releases before the rename read AV_* environment variables and looked for agentvisor.toml and ~/.agentvisor/. Existing deployments keep those names in systemd units, compose files and Kubernetes manifests, so an upgraded binary must still honour them. The new names always win when both are present.

Constants§

ENV_PREFIX
Prefix of the environment variables now.
LEGACY_ENV_PREFIX
Prefix of the environment variables before the rename.

Functions§

adopt_legacy_env
Copy every AV_* variable to its PV_* name when that name is unset, and say so on stderr (names only, never values).
existing_or_legacy
current if it exists, else legacy if that exists, else current. For default file locations that moved with the rename: an installation that still has only the old file keeps working, and a fresh one gets the new location.
legacy_env_adoptions
The PV_* names to set from AV_* variables, as (new name, value) pairs. A legacy variable is adopted only when its new name is unset or empty, so an operator who already migrated is never overridden. Empty counts as unset because compose files render PV_X: ${PV_X:-}, and the daemon already reads an empty value as “not set”.