diff --git a/group_vars/mac/main.yml b/group_vars/mac/main.yml index 8ddfcb2..51e7e03 100644 --- a/group_vars/mac/main.yml +++ b/group_vars/mac/main.yml @@ -27,16 +27,16 @@ hermes_dashboard_username: admin # Individual Hermes settings, set with `hermes config set`. The rest of # ~/.hermes/config.yaml stays Hermes's own (its updates migrate that file). -# A value of null removes the key (back to Hermes's default). hermes_settings: updates.pre_update_backup: full # zip of ~/.hermes before every update timezone: America/Denver # cron schedules and the time in the prompt # Never borrow Claude Code's login: subscription use outside Anthropic's own # apps breaks its terms, and refreshing it can break Claude Code's login. auth.adopt_external_logins: false - # Container path the host checks and warns about (hermes-agent #140527); - # the sandbox uses its own home directory without it. - terminal.cwd: null + # Hermes's default. /workspace (a container path) made the host log a + # warning every few seconds (hermes-agent #140527); with the docker backend + # a host cwd never becomes the container's working directory anyway. + terminal.cwd: . terminal.container_memory: 3072 # MB; must fit in the Podman VM (podman_machine_memory) # Kanban is for multi-agent boards (unused here) and its 14 tools were 25 KB # of the 65 KB of tool definitions sent with every message. diff --git a/roles/mac/README.md b/roles/mac/README.md index 1391fe9..59e42f7 100644 --- a/roles/mac/README.md +++ b/roles/mac/README.md @@ -24,8 +24,7 @@ Manages cogitator-02, an Apple Silicon Mac on the tailnet (`mac.yml`, demands a login through it; if not, it turns Serve off and fails. - **Hermes settings** (tag `hermes-settings`): the individual keys in `hermes_settings` (`group_vars/mac/main.yml`), checked with - `hermes config get` and fixed with `hermes config set` (or `unset` for a - null value); any change restarts the gateway (`hermes gateway restart`) + `hermes config get` and fixed with `hermes config set`; any change restarts the gateway (`hermes gateway restart`) and the dashboard. Covers update backups, timezone, not borrowing Claude Code's login, sandbox memory, disabled toolsets, skill-write approval, deny rules, streaming and diff --git a/roles/mac/tasks/hermes-settings.yml b/roles/mac/tasks/hermes-settings.yml index 796165b..55cec80 100644 --- a/roles/mac/tasks/hermes-settings.yml +++ b/roles/mac/tasks/hermes-settings.yml @@ -1,6 +1,8 @@ -# `hermes config get` prints the value as YAML, so -# it's compared structurally; `hermes config set` takes JSON for lists and -# booleans. A null value means the key should not be set at all. +# `hermes config get` prints the value as YAML, so it's compared +# structurally; `hermes config set` takes JSON for lists and booleans. +# Settings are always set explicitly: for a key that isn't in config.yaml, +# `config get` (non-interactive) prints just the default, so "unset" can't be +# detected. - name: Read Hermes settings ansible.builtin.command: argv: ["{{ hermes_cli }}", config, get, "{{ item.key }}"] @@ -12,15 +14,11 @@ - name: Set Hermes settings ansible.builtin.command: argv: >- - {{ [hermes_cli, 'config', 'unset', item.item.key] if item.item.value is none else - [hermes_cli, 'config', 'set', item.item.key, + {{ [hermes_cli, 'config', 'set', item.item.key, item.item.value if item.item.value is string else item.item.value | to_json] }} loop: "{{ hermes_settings_current.results }}" loop_control: label: "{{ item.item.key }} = {{ item.item.value | to_json }}" - # "Config key not set" goes to stderr, with Hermes's default on stdout. - when: >- - (none if item.stderr is search('Config key not set') else item.stdout | from_yaml) - != item.item.value + when: (item.stdout | from_yaml) != item.item.value # The dashboard is a separate process with its own copy of the settings. notify: [Restart Hermes gateway, Restart Hermes dashboard]