hermes-agent/docker
Ben Barclay 536ffedbf4
feat(docker): re-seed a terminally-dead Nous bootstrap session on boot (#59983)
The stage2-hook auth.json seed is first-boot-only ([ ! -f auth.json ]) to avoid
clobbering rotated refresh tokens on restart. That guard means a container whose
Nous bootstrap session took a terminal invalid_grant (tokens cleared,
providers.nous.last_auth_error.relogin_required stamped) cannot recover from a
restart — it stays unauthenticated until the credential is replaced.

Add a self-heal path: an orchestrator that manages the container supplies a
freshly-issued session via HERMES_AUTH_JSON_REBOOTSTRAP (distinct from the
create-only *_BOOTSTRAP var). On boot, scripts/docker_rebootstrap_nous_session.py
swaps ONLY the providers.nous entry, and ONLY when the on-disk entry is provably
terminal (quarantine marker + no usable tokens). Healthy/rotating/absent/
unparseable auth.json is always a no-op, so the env is safe to leave set across
restarts and never clobbers a good token. Pure stdlib, runs as its own
subprocess, always exits 0 so a re-seed error never fails the boot.

Reuses the same terminal predicate as get_nous_session_validity() so we re-seed
only a session that is genuinely dead.
2026-07-07 06:57:23 +00:00
..
cont-init.d Remove prviliges drop when you never ran as root (#34837) 2026-06-01 13:54:18 +10:00
s6-rc.d fix(docker): replace dashboard --insecure with basic-auth provider 2026-06-21 19:05:27 -07:00
entrypoint.sh docs(docker): deprecation warning in entrypoint.sh shim 2026-05-24 18:05:33 -07:00
hermes-exec-shim.sh fix(docker): drop docker exec to hermes uid before invoking the CLI 2026-05-28 13:30:36 +10:00
main-wrapper.sh fix(docker): reject unsupported --user <arbitrary-uid> start with clear guidance (#38579) 2026-06-04 10:51:51 +10:00
SOUL.md fix(soul): installers seed the real default persona, upgrade legacy empty templates (#52246) 2026-06-24 18:56:26 -07:00
stage2-hook.sh feat(docker): re-seed a terminally-dead Nous bootstrap session on boot (#59983) 2026-07-07 06:57:23 +00:00