hermes-agent/hermes_cli
Ben Barclay 04d620d91f
fix(docker): run config migrations during container boot (salvage #35508) (#36627)
Salvage of #35508 (@dchenk), rebased onto current main. Resolved the
tests/tools/test_stage2_hook_puid_pgid.py conflict (kept both the
envdir-creation regression test on main and the new config-migration
tests).

Docker image upgrades replace code under $INSTALL_DIR but preserve
$HERMES_HOME on the mounted volume, so the persisted config.yaml never
received the schema migrations that non-Docker `hermes update` runs
(#35406). This adds scripts/docker_config_migrate.py, invoked from
stage2-hook after first-boot seeding and before gateway services start:
it backs up config.yaml + .env, runs migrate_config(interactive=False),
and honors HERMES_SKIP_CONFIG_MIGRATION=1 for manual control.

Also fixes a latent bug in check_config_version(): it called load_config()
which deep-merges DEFAULT_CONFIG, so a legacy config with no raw
_config_version falsely reported as already-current. It now reads the raw
on-disk file so legacy configs are correctly detected for migration.

Differs from #35508 as submitted (Option B cleanup): dropped the
`_config_version` line added to cli-config.yaml.example and removed the
accompanying test_cli_config_example_declares_latest_version change-detector
test. The example is a copy-template and has no business asserting a schema
version; check_config_version() reads the user's real config.yaml, not the
example. This removes a second sync point that drifts on every version bump.

Closes #35508. Fixes #35406.

Co-authored-by: Dmitriy Cherchenko <17372886+dchenk@users.noreply.github.com>
2026-06-04 11:11:27 +10:00
..
dashboard_auth test(dashboard): direct unit coverage for internal WS credential + docstring fix 2026-06-02 23:43:27 -07:00
proxy chore: remove dead code — 28 unused functions/classes across 16 files 2026-05-29 04:22:27 -07:00
__init__.py chore: release v0.15.1 (2026.5.29) (#34222) 2026-05-28 18:11:49 -07:00
_parser.py feat(cli): configurable default interface (cli vs tui) 2026-06-02 20:49:44 -05:00
_subprocess_compat.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
auth.py fix(auth): align Codex OAuth persistence paths (#37517) 2026-06-02 12:19:44 -05:00
auth_commands.py fix(auth): align Codex OAuth persistence paths (#37517) 2026-06-02 12:19:44 -05:00
azure_detect.py
backup.py fix(cron): restore jobs.json emptied by config migration on update 2026-05-29 13:22:54 -07:00
banner.py fix(mcp): banner shows 'disabled' not 'failed' for enabled:false servers (#38204) 2026-06-03 05:41:13 -07:00
browser_connect.py
build_info.py fix(docker): bake build-time git SHA into the image 2026-05-28 15:14:05 +10:00
bundles.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
callbacks.py fix(cli): show masked feedback for secret prompts 2026-05-25 01:20:33 -07:00
checkpoints.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
claw.py fix: batch of small robustness/correctness fixes from @kyssta-exe 2026-06-01 19:51:03 -07:00
cli_output.py fix(cli): show masked feedback for secret prompts 2026-05-25 01:20:33 -07:00
clipboard.py
codex_models.py fix(codex): drop dead model slugs that HTTP 400 on ChatGPT Pro (#33424) 2026-05-27 12:16:15 -07:00
codex_runtime_plugin_migration.py
codex_runtime_switch.py
colors.py
commands.py feat(tui): single /model command + unified Sessions overlay (#37112) 2026-06-01 22:28:36 -04:00
completion.py fix: batch of small robustness/correctness fixes from @kyssta-exe 2026-06-01 19:51:03 -07:00
config.py fix(docker): run config migrations during container boot (salvage #35508) (#36627) 2026-06-04 11:11:27 +10:00
container_boot.py fix(docker): seed s6 gateway state for legacy run cmd (#34829) 2026-06-01 11:28:56 +10:00
copilot_auth.py
cron.py fix(gateway,cron): reuse existing _HERMES_GATEWAY marker; tighten cron regex 2026-05-30 23:05:56 -07:00
curator.py
curses_ui.py feat(cli): ranked fuzzy search in the curses model picker 2026-06-01 16:58:58 -07:00
debug.py feat(debug): include desktop.log in hermes debug share / /debug / hermes logs (#38203) 2026-06-03 05:41:35 -07:00
default_soul.py
dep_ensure.py
dingtalk_auth.py
doctor.py fix(doctor): detect + repair stale HERMES_MAX_ITERATIONS .env ghost shadowing config.yaml (#38222) 2026-06-03 06:38:40 -07:00
dump.py fix(docker): bake build-time git SHA into the image 2026-05-28 15:14:05 +10:00
env_loader.py fix(secrets): only apply external secrets once per HERMES_HOME per process (#32271) 2026-05-25 15:18:55 -07:00
fallback_cmd.py fix(fallback): merge fallback_providers with legacy fallback_model configurations 2026-05-23 05:24:57 -07:00
fallback_config.py fix(fallback): merge fallback_providers with legacy fallback_model configurations 2026-05-23 05:24:57 -07:00
gateway.py fix: batch of small robustness/correctness fixes from @kyssta-exe 2026-06-01 19:51:03 -07:00
gateway_windows.py fix(gateway): decode schtasks output with locale encoding on Windows 2026-06-03 09:29:19 -07:00
goals.py feat(kanban): goal_mode cards run workers in a /goal loop (#35710) 2026-05-31 01:16:33 -07:00
hooks.py
inventory.py feat(desktop): inline model picker in the status bar 2026-06-02 19:09:41 -05:00
kanban.py feat(kanban): goal_mode cards run workers in a /goal loop (#35710) 2026-05-31 01:16:33 -07:00
kanban_db.py fix(kanban): don't permanently block tasks that hit a provider rate limit (#38223) 2026-06-03 06:19:32 -07:00
kanban_decompose.py fix(kanban): close kanban.db FD after every connect() in long-lived processes 2026-05-27 22:07:49 -07:00
kanban_diagnostics.py chore: remove dead code — 28 unused functions/classes across 16 files 2026-05-29 04:22:27 -07:00
kanban_specify.py fix(kanban): close kanban.db FD after every connect() in long-lived processes 2026-05-27 22:07:49 -07:00
kanban_swarm.py fix(kanban): CLI dispatch honors max_in_progress/max_spawn from config; swap missing 'avoid-ai-writing' skill for bundled humanizer (#33488, #29415) (#34337) 2026-05-28 21:00:46 -07:00
logs.py feat(debug): include desktop.log in hermes debug share / /debug / hermes logs (#38203) 2026-06-03 05:41:35 -07:00
main.py fix(tui): cgroup-aware V8 heap cap so memory-limited containers stop dying silently (#38541) 2026-06-03 16:40:28 -07:00
managed_uv.py refactor(uv): single managed-uv path, delete fts5 installer escalation 2026-06-02 20:29:54 -04:00
mcp_catalog.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
mcp_config.py fix(mcp): resolve ${ENV} in discovery probe so header auth works (#38571) 2026-06-03 17:49:39 -07:00
mcp_picker.py feat(mcp): Nous-approved MCP catalog with interactive picker (#30870) 2026-05-26 12:48:14 -07:00
mcp_startup.py perf(cli): stop eager MCP discovery from blocking agent-capable startup 2026-05-30 07:45:26 -07:00
memory_setup.py fix(honcho): harden self-hosted setup paths 2026-05-29 22:29:48 -07:00
migrate.py
model_catalog.py feat(models): refresh model catalog hourly instead of daily (#35756) 2026-05-31 00:29:40 -07:00
model_normalize.py remove Vercel AI Gateway and Vercel Sandbox (#33067) 2026-05-27 00:43:32 -07:00
model_switch.py fix(model-picker): stop routing OpenAI selection to OpenRouter (#37175) 2026-06-01 20:27:41 -07:00
models.py feat(desktop): inline model picker in the status bar 2026-06-02 19:09:41 -05:00
nous_account.py feat(tools): surface the free tool pool in entitlement + setup (#36153) 2026-06-01 06:32:48 +05:30
nous_subscription.py feat(tools): surface the free tool pool in entitlement + setup (#36153) 2026-06-01 06:32:48 +05:30
oneshot.py fix(cli): surface oneshot agent exceptions to stderr with rc=1 2026-05-30 07:31:48 -07:00
pairing.py
partial_compress.py Inspired by Claude Code: /compress here [N] — boundary-aware 'summarize up to here' (#35048) 2026-05-29 17:49:15 -07:00
platforms.py
plugins.py feat(observability): observer-grade telemetry hooks + NeMo-Relay plugin 2026-06-03 06:36:46 -07:00
plugins_cmd.py Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
portal_cli.py feat(cli): make hermes portal run the full quick-setup Nous flow (model picker) 2026-06-04 02:20:31 +05:30
profile_describer.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
profile_distribution.py fix(profile): reject symlinks in distributions (#25292) 2026-05-25 05:07:58 -07:00
profiles.py fix(honcho): harden self-hosted setup paths 2026-05-29 22:29:48 -07:00
prompt_size.py feat(cli): add hermes prompt-size diagnostic (#35276) 2026-05-30 02:53:42 -07:00
providers.py fix(model-picker): OpenAI shows curated models; OpenRouter no longer phantom-shows (#37404) 2026-06-02 06:31:37 -07:00
psutil_android.py fix(android): reject unsafe tar members in psutil compatibility installer 2026-05-28 02:36:09 -07:00
pt_input_extras.py fix(cli): ignore terminal focus reports (salvage of #16780) 2026-05-29 00:31:44 -07:00
pty_bridge.py fix(dashboard): clamp PTY resize dimensions for WSL2 winsize garbage (#38200) 2026-06-03 09:00:16 -07:00
relaunch.py
runtime_provider.py refactor(auth): remove vestigial Nous min_key_ttl/inference_auth_mode params 2026-05-29 02:24:48 -07:00
secret_prompt.py fix(cli): show masked feedback for secret prompts 2026-05-25 01:20:33 -07:00
secrets_cli.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
security_advisories.py fix(stt,tts): restore mistralai — 2.4.8 is clean, ban lifted (#34841) 2026-05-29 13:24:12 -07:00
security_audit.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
send_cmd.py
service_manager.py Remove prviliges drop when you never ran as root (#34837) 2026-06-01 13:54:18 +10:00
session_recap.py
setup.py fix(cli): harden hermes portal SystemExit handling + finish model-pick doc sweep 2026-06-04 02:33:33 +05:30
skills_config.py
skills_hub.py feat(skills): fix browse cap, add source links + copy buttons + category cleanup (#37143) 2026-06-01 19:52:28 -07:00
skin_engine.py
slack_cli.py
status.py feat(cli): make hermes portal the human-readable Portal onboarding alias 2026-06-04 01:19:28 +05:30
stdio.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
timeouts.py
tips.py fix(gateway): stop system tips from auto-uploading local files 2026-05-30 18:58:46 -07:00
tools_config.py fix(setup): default browser/TTS picker to free local backend, not paid Nous (#37800) 2026-06-02 19:49:10 -07:00
uninstall.py fix(cli): remove Hermes-managed node/npm/npx symlinks on uninstall 2026-05-29 17:24:38 -07:00
voice.py
web_server.py feat(web): wire local/custom endpoints into model assignment 2026-06-03 17:48:55 -07:00
webhook.py fix(state): restrict sensitive store file permissions 2026-05-24 04:55:18 -07:00
xai_retirement.py