mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-08 13:12:08 +00:00
A `hermes update` that bumps the spectrum-ts pin rewrites the Photon sidecar's package-lock.json but never reinstalls node_modules. The sidecar then spawns against the old install and the v8 postinstall patch throws "@spectrum-ts/imessage dist not found", so the gateway retries the photon platform every 300s forever without ever repairing the deps. Observed in the wild: a June pin bump to spectrum-ts 8.0.0 left node_modules at 3.1.0, and inbound/outbound iMessage stayed dead for days with the reconnect loop faithfully restarting into the identical broken state. _start_sidecar only checked that node_modules exists, not that it matches the lockfile, so restart never became repair. Detect the skew with the same signal npm ci uses: the top-level package-lock.json being newer than npm's node_modules/.package-lock.json install marker. When stale, reinstall (npm ci, falling back to npm install) before spawning. The reinstall runs via asyncio.to_thread so a cold install can't block the event loop and stall every other platform's traffic; worst case it heals on the next reconnect tick instead. First-run "deps not installed" behavior is unchanged, and a missing/unreadable marker fails safe to "not stale" so start is never blocked. Reuses the existing npm ci -> npm install fallback from `hermes photon install-sidecar`. Adds unit tests for the staleness signal (stale / fresh / missing-marker). |
||
|---|---|---|
| .. | ||
| browser | ||
| dashboard_auth | ||
| image_gen | ||
| memory | ||
| model_providers | ||
| platforms/photon | ||
| transcription | ||
| tts | ||
| video_gen | ||
| web | ||
| __init__.py | ||
| test_achievements_plugin.py | ||
| test_chronos_cron.py | ||
| test_chronos_verify.py | ||
| test_discord_runtime_failure.py | ||
| test_disk_cleanup_plugin.py | ||
| test_google_meet_audio.py | ||
| test_google_meet_node.py | ||
| test_google_meet_plugin.py | ||
| test_google_meet_realtime.py | ||
| test_hindsight_health_grace_timeout.py | ||
| test_hindsight_root_guard.py | ||
| test_kanban_attachments.py | ||
| test_kanban_dashboard_plugin.py | ||
| test_kanban_worker_runs.py | ||
| test_langfuse_plugin.py | ||
| test_nemo_relay_plugin.py | ||
| test_plugin_dashboard_auth_contract.py | ||
| test_raft_check_fn_silent.py | ||
| test_retaindb_plugin.py | ||
| test_security_guidance_plugin.py | ||
| test_teams_pipeline_plugin.py | ||