mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 05:17:15 +00:00
On main each `hermes` process read HERMES_EPHEMERAL_SYSTEM_PROMPT, HERMES_PREFILL_MESSAGES_FILE and HERMES_INFERENCE_PROVIDER from its own shell. Since the one gateway runs every session, the values exported by whichever client auto-started it became daemon-wide (messaging and cron included), and every later client's exports were ignored. The classic CLI and the Ink TUI now send an allowlisted `client_env` map (plain strings) with session.create; the classic CLI takes the allowlist's extra names from the profile's effective config (managed layer included), as the gateway reads them, and a safe-mode or ignore-user-config launch reads no profile. The gateway filters the map again against the session profile's allowlist, freezes it with the session's policy (outside launch_request, so viewers never see the values) and binds it for that session's turns only: the ephemeral prompt, the prefill file and the provider request read the session's value, in-process and for a managed worker. Desktop sends nothing and keeps the gateway's environment, as does a session created before this change. The auto-started daemon no longer inherits these variables (nor HERMES_ENABLE_PROJECT_PLUGINS); a gateway the operator starts keeps its own environment. Clients send the field only when runtime.describe lists it. An exact retry of a session created before this change returns its original session; the retry and commit comparisons and the policy identity treat an absent client_env as before. A retry is judged against the committed, filtered map: every stored name must come back with its stored value, and names dropped at creation don't count, whatever the allowlist is now. Fresh creates use the current rules, and the unfiltered map is never stored. Refs #134889 (LC-8) Refs #139523