mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
refactor: config auto-migration support floor at v12 + deprecated shim retirement
This commit is contained in:
parent
5c07ba2f3a
commit
4b33e5663b
15 changed files with 520 additions and 166 deletions
|
|
@ -14,6 +14,10 @@ from hermes_cli.config import (
|
|||
get_env_path,
|
||||
migrate_config,
|
||||
)
|
||||
from hermes_cli.config_migrations import (
|
||||
SUPPORT_FLOOR_VERSION,
|
||||
support_floor_message,
|
||||
)
|
||||
from utils import env_var_enabled
|
||||
|
||||
|
||||
|
|
@ -59,6 +63,17 @@ def main() -> int:
|
|||
if current_ver >= latest_ver:
|
||||
return 0
|
||||
|
||||
# Below the auto-migration support floor: migrate_config() refuses (and
|
||||
# leaves the file untouched), so don't run the backup/verify dance that
|
||||
# would raise "did not advance config version" and block the boot.
|
||||
# Warn-and-continue matches the CLI's fail-safe posture.
|
||||
if current_ver < SUPPORT_FLOOR_VERSION:
|
||||
print(
|
||||
f"[config-migrate] WARNING: {support_floor_message()}",
|
||||
file=sys.stderr,
|
||||
)
|
||||
return 0
|
||||
|
||||
backups = _backup_existing((get_config_path(), get_env_path()))
|
||||
backup_text = ", ".join(str(path) for path in backups.values()) if backups else "none"
|
||||
print(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue