diff --git a/docs/maintenance/hermes-central-athena-2026-10-26/README.md b/docs/maintenance/hermes-central-athena-2026-10-26/README.md index 384ce79..491cc5e 100644 --- a/docs/maintenance/hermes-central-athena-2026-10-26/README.md +++ b/docs/maintenance/hermes-central-athena-2026-10-26/README.md @@ -114,3 +114,5 @@ private key is not part of this repository. References: [managed scope](https://github.com/NousResearch/hermes-agent/blob/main/website/docs/user-guide/managed-scope.md), [named custom providers](https://github.com/NousResearch/hermes-agent/blob/main/website/docs/integrations/providers.md#named-custom-providers). + +Follow-up: [KIT LiteLLM endpoint and William hook consent](../hermes-hooks-kit-litellm-2026-10-26.md). diff --git a/docs/maintenance/hermes-hooks-kit-litellm-2026-10-26.md b/docs/maintenance/hermes-hooks-kit-litellm-2026-10-26.md new file mode 100644 index 0000000..7a10c38 --- /dev/null +++ b/docs/maintenance/hermes-hooks-kit-litellm-2026-10-26.md @@ -0,0 +1,88 @@ +# William hook consent and KIT LiteLLM endpoint correction + +Applied on 26 October 2026 at Michael's request, using the NAS Hermes gateway +in `Hermes-Agent-Desktop`. The Mac Desktop apps were not modified. Operator SSH +used `~/.ssh/ha_agent` for `root@192.168.1.2`. + +## William's three Home Assistant notification hooks + +The existing `/opt/data/agent-hooks/ha-notify.py` was configured for William's +`on_session_end`, `on_human_input_request`, and `subagent_stop` events, but his +profile had no `shell-hooks-allowlist.json`. The default profile's approvals +do not authorize another profile's hooks. + +The script was inspected without dumping its complete source or credential +values. Its file/HTTP operations and control flow were reviewed: it reads +Hermes configuration and desktop-selection state and posts notification data +to the configured Home Assistant service; no shell execution, dynamic code +execution, VPN paths, or file-writing operation was found. The script itself +was not changed. + +Using the installed Hermes `agent.shell_hooks.record_consent_from_config` +with a profile-home override, explicit consent was recorded for exactly those +three `(event, command)` pairs. No global `hooks_auto_accept` or +`HERMES_ACCEPT_HOOKS` setting was enabled. Newly created allowlist/lock files +use the profile configuration's owner and mode `0600`. + +Independent verification registered all three callbacks with +`accept_hooks=False, interactive=False` in an isolated process and confirmed +that the script resolves a Home Assistant credential in William's profile. +No event was fired, no test notification was sent, and actual push delivery +was not tested. The live gateway can pick up this profile consent when it next +loads/synchronizes the hooks; old warning lines remain in historical logs. + +The separate API warning about `terminal.backend: local` was not silenced or +changed to Docker. Here local execution is inside the existing, nonprivileged +Hermes container, whose only inspected bind mount is its own `/opt/data` and +which has no Docker socket. The warning is not a startup error and changing +the backend would change how the existing workspaces execute commands. + +## KIT LiteLLM: portal versus model API + +The central `providers.litellm.api` pointed to +`https://my.litellm.scc.kit.edu`. That is the MyLiteLLM account/key/budget portal. +The configured credential was present and accepted by its documented +`GET /api/v1/status` endpoint (HTTP 200). Requests to `/v1/models` and `/models` +on that host instead returned HTTP 302 to KIT's OIDC login. Redirects were not +followed with the credential. + +The full official [ZML API guide](https://www.zml.kit.edu/downloads/KI.Toolbox_API.pdf), +section "LiteLLM-API nutzen (MyLiteLLM)", distinguishes that status test from +the model base URL `https://litellm.scc.kit.edu`. For Hermes' OpenAI-compatible +client the tested central entry is now: + +```yaml +providers: + litellm: + name: KIT-LiteLLM + api: https://litellm.scc.kit.edu/v1 + key_env: LITELLM_API_KEY + transport: chat_completions + discover_models: true +``` + +Only that existing provider's `api` value was changed in +`/opt/data/managed/config.yaml`. Its credential stayed in the protected +managed dotenv file. Athena's provider and all thirteen bot default-model +selections remained unchanged. + +Verification: + +- Authenticated `GET https://litellm.scc.kit.edu/v1/models`: HTTP 200, + 43 catalog records, including `alias.medium-local`. +- The real Hermes runtime resolver selected the new URL and existing credential + in all thirteen existing profile home/secret-scope contexts. +- In the running dashboard, the default profile's model picker showed + `KIT-LiteLLM` with 42 entries after **Refresh Models**. This was a discovery + check; no **Switch** action was taken. The raw catalog and picker counts + differ because the picker filters the image-generation entry. +- No inference request, paid generation, test chat, notification send, + container restart, or VPN action was performed. Native Mac-app interaction + and an actual KIT model response were not separately tested. + +The central files remain on the persistent NAS Hermes volume as described in +[the central Athena setup](hermes-central-athena-2026-10-26/README.md). Restore +the managed directory including its protected `.env`, William's allowlist, +and the existing startup environment from the operator's protected data backup. +No credentials, private configuration copies, account budgets, or private +prompts are included in this repository.