feat: enable persistent shell by default for SSH, add config option
SSH persistent shell now defaults to true — non-local backends benefit most from state persistence across execute() calls. Local backend remains opt-in via TERMINAL_LOCAL_PERSISTENT env var. New config.yaml option: terminal.persistent_shell (default: true) Controls the default for non-local backends. Users can disable with: hermes config set terminal.persistent_shell false Precedence: per-backend env var > TERMINAL_PERSISTENT_SHELL > default. Wired through cli.py, gateway/run.py, and hermes_cli/config.py so the config.yaml value reaches terminal_tool via env var bridge.
This commit is contained in:
@@ -118,6 +118,11 @@ DEFAULT_CONFIG = {
|
||||
# Each entry is "host_path:container_path" (standard Docker -v syntax).
|
||||
# Example: ["/home/user/projects:/workspace/projects", "/data:/data"]
|
||||
"docker_volumes": [],
|
||||
# Persistent shell — keep a long-lived bash shell across execute() calls
|
||||
# so cwd/env vars/shell variables survive between commands.
|
||||
# Enabled by default for non-local backends (SSH); local is always opt-in
|
||||
# via TERMINAL_LOCAL_PERSISTENT env var.
|
||||
"persistent_shell": True,
|
||||
},
|
||||
|
||||
"browser": {
|
||||
@@ -1391,6 +1396,7 @@ def set_config_value(key: str, value: str):
|
||||
"terminal.cwd": "TERMINAL_CWD",
|
||||
"terminal.timeout": "TERMINAL_TIMEOUT",
|
||||
"terminal.sandbox_dir": "TERMINAL_SANDBOX_DIR",
|
||||
"terminal.persistent_shell": "TERMINAL_PERSISTENT_SHELL",
|
||||
}
|
||||
if key in _config_to_env_sync:
|
||||
save_env_value(_config_to_env_sync[key], str(value))
|
||||
|
||||
Reference in New Issue
Block a user