From b52745477360c7966af4fe4b05bf6b8002addff4 Mon Sep 17 00:00:00 2001 From: hermes Date: Sat, 12 Sep 2026 21:15:10 +0000 Subject: [PATCH 1/7] feat(hermes_squid): add hermes-proxy service for OpenAI-compatible HTTP egress Routes /v1/chat/completions to the same OAuth backend the gateway uses, via a shared hermes_gateway_data volume. Bound to 127.0.0.1 inside the container; reachable only via the hermes_proxy overlay (internal: true). Defaults to aiohttp on :8645 (hermes_cli/proxy/server.py DEFAULT_PORT). Targets rudolf-T consumers (voice-gateway, Org1/hermes-voice-gateway#3) that need an OpenAI-shaped transport to the agent without going through the gateway's messaging adapters. --- hermes_squid/stack-compose.yml | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/hermes_squid/stack-compose.yml b/hermes_squid/stack-compose.yml index f7bd2f8..324e59d 100644 --- a/hermes_squid/stack-compose.yml +++ b/hermes_squid/stack-compose.yml @@ -229,6 +229,47 @@ services: delay: 5s max_attempts: 3 + hermes-proxy: + image: nousresearch/hermes-agent:v2026.8.3 + hostname: hermes-proxy + user: "0:0" + command: proxy run --host 0.0.0.0 --port 8645 + networks: + - hermes_proxy + volumes: + - hermes_gateway_data:/opt/data + environment: + HERMES_HOME: /opt/data + HTTP_PROXY: http://squid:3128 + HTTPS_PROXY: http://squid:3128 + http_proxy: http://squid:3128 + https_proxy: http://squid:3128 + NO_PROXY: localhost,127.0.0.1,.local,squid,hermes-gateway,hermes-agent,hermes-proxy,brencher-state-proxy,docker_socket_proxy,10.0.0.0/8 + no_proxy: localhost,127.0.0.1,.local,squid,hermes-gateway,hermes-agent,hermes-proxy,brencher-state-proxy,docker_socket_proxy,10.0.0.0/8 + depends_on: + - squid + healthcheck: + test: ["CMD-SHELL", "python -c \"import urllib.request,sys; urllib.request.urlopen('http://127.0.0.1:8645/v1/models', timeout=3).read()\" || exit 1"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 20s + deploy: + placement: + constraints: + - node.hostname != xu4 + replicas: 1 + resources: + limits: + memory: 512M + pids: 256 + reservations: + memory: 256M + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + networks: hermes_proxy: driver: overlay -- 2.54.0 From 0054d9c21b6b128f4592a11c7a14f4df9b28be4c Mon Sep 17 00:00:00 2001 From: hermes Date: Sun, 13 Sep 2026 14:29:26 +0000 Subject: [PATCH 2/7] feat(hermes_squid): add hermes-proxy service and voice-gateway to hermes_infra Two changes to the hermes_infra stack: 1. New 'hermes-proxy' service: OpenAI-compatible HTTP egress on :8645, sharing the same OAuth credentials as the gateway (shared volume hermes_gateway_data). Reachable only via the hermes_proxy overlay (internal: true). Image nousresearch/hermes-agent:v2026.8.3 with command 'proxy run --host 0.0.0.0 --port 8645'. 2. New 'voice-gateway' service: Python aiohttp WS bridge between browser and hermes-proxy. Placement node.hostname==rudolf-T (x86_64 worker, 14.5 GiB RAM). Image is built externally by Gitea Actions in Org1/hermes-voice-gateway (workflow release.yml on tag push) and pulled from gitea.rudolf.keenetic.link/hermes/hermes-voice-gateway. Piper voice model (ru_RU-denis-medium.onnx + .json) is downloaded on first start via the container's entrypoint.sh from HuggingFace. No pre-baked volume needed. Image tags in registry: v0.1.1, v0.2.0. Bump via git tag + push in Org1/hermes-voice-gateway, then update compose.yaml image tag here. --- hermes_squid/stack-compose.yml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/hermes_squid/stack-compose.yml b/hermes_squid/stack-compose.yml index 324e59d..a8f7dae 100644 --- a/hermes_squid/stack-compose.yml +++ b/hermes_squid/stack-compose.yml @@ -270,6 +270,55 @@ services: delay: 5s max_attempts: 3 + voice-gateway: + image: gitea.rudolf.keenetic.link/hermes/hermes-voice-gateway:${version} + hostname: voice-gateway + user: "0:0" + networks: + - hermes_proxy + ports: + - target: 8765 + published: 8765 + protocol: tcp + mode: host + environment: + VOICE_GATEWAY_HOST: "0.0.0.0" + VOICE_GATEWAY_PORT: "8765" + HERMES_PROXY_URL: "http://hermes-proxy:8645" + HERMES_PROXY_TOKEN: "${HERMES_PROXY_TOKEN:-}" + SAMPLE_RATE_IN: "16000" + SAMPLE_RATE_OUT: "22050" + LLM_MODEL: "MiniMax-M3" + PIPER_VOICE_URL: "https://huggingface.co/rhasspy/piper-voices/resolve/main/ru/ru_RU/denis/medium/ru_RU-denis-medium.onnx" + PIPER_VOICE_CONFIG_URL: "https://huggingface.co/rhasspy/piper-voices/resolve/main/ru/ru_RU/denis/medium/ru_RU-denis-medium.onnx.json" + PIPER_VOICE_PATH: "/opt/piper-voices/ru_RU-denis-medium.onnx" + MAX_SESSION_SECONDS: "300" + MAX_SILENCE_MS: "1500" + HTTP_PROXY: "http://squid:3128" + HTTPS_PROXY: "http://squid:3128" + NO_PROXY: "localhost,127.0.0.1,.local,squid,hermes-gateway,hermes-agent,hermes-proxy,brencher-state-proxy,docker_socket_proxy,10.0.0.0/8" + healthcheck: + test: ["CMD-SHELL", "python -c \"import urllib.request,sys; urllib.request.urlopen('http://127.0.0.1:8765/healthz', timeout=3).read()\" || exit 1"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 60s + deploy: + placement: + constraints: + - node.hostname == rudolf-T + replicas: 1 + resources: + limits: + memory: 4G + pids: 1024 + reservations: + memory: 1G + restart_policy: + condition: on-failure + delay: 10s + max_attempts: 3 + networks: hermes_proxy: driver: overlay -- 2.54.0 From c55a40bb21086372853dcc1ae208fb3d346cf579 Mon Sep 17 00:00:00 2001 From: hermes Date: Sun, 13 Sep 2026 15:23:09 +0000 Subject: [PATCH 3/7] fix(hermes_squid): drop shell default syntax from HERMES_PROXY_TOKEN brencher parses ${VAR} via re.sub on the literal token name. ${HERMES_PROXY_TOKEN:-} collapses to the token 'HERMES_PROXY_TOKEN:-' which is not in the env dict, raising KeyError at deploy step. Plain ${HERMES_PROXY_TOKEN} resolves to empty string when the env is unset, which is what the shell default was protecting against. --- hermes_squid/stack-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes_squid/stack-compose.yml b/hermes_squid/stack-compose.yml index a8f7dae..04e23e4 100644 --- a/hermes_squid/stack-compose.yml +++ b/hermes_squid/stack-compose.yml @@ -285,7 +285,7 @@ services: VOICE_GATEWAY_HOST: "0.0.0.0" VOICE_GATEWAY_PORT: "8765" HERMES_PROXY_URL: "http://hermes-proxy:8645" - HERMES_PROXY_TOKEN: "${HERMES_PROXY_TOKEN:-}" + HERMES_PROXY_TOKEN: "${HERMES_PROXY_TOKEN}" SAMPLE_RATE_IN: "16000" SAMPLE_RATE_OUT: "22050" LLM_MODEL: "MiniMax-M3" -- 2.54.0 From 24ede4aea783c1c0e5082766a2dc86937f648a21 Mon Sep 17 00:00:00 2001 From: hermes Date: Sun, 13 Sep 2026 15:34:04 +0000 Subject: [PATCH 4/7] fix(hermes_squid): drop HERMES_PROXY_TOKEN env (auth skipped for MVP) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hermes-proxy listens on hermes_proxy overlay which is internal:true — no external ingress. Auth between voice-gateway and hermes-proxy is not required for MVP, and brencher was rejecting the ${HERMES_PROXY_TOKEN} substitution as missing key. Removing the line lets brencher apply the compose; the gateway already connects unauthenticated when the env is absent. --- hermes_squid/stack-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/hermes_squid/stack-compose.yml b/hermes_squid/stack-compose.yml index 04e23e4..a7295fc 100644 --- a/hermes_squid/stack-compose.yml +++ b/hermes_squid/stack-compose.yml @@ -285,7 +285,6 @@ services: VOICE_GATEWAY_HOST: "0.0.0.0" VOICE_GATEWAY_PORT: "8765" HERMES_PROXY_URL: "http://hermes-proxy:8645" - HERMES_PROXY_TOKEN: "${HERMES_PROXY_TOKEN}" SAMPLE_RATE_IN: "16000" SAMPLE_RATE_OUT: "22050" LLM_MODEL: "MiniMax-M3" -- 2.54.0 From c2f1b0684a56e5ab5eec909d5cb228a52f2cde2e Mon Sep 17 00:00:00 2001 From: hermes Date: Sun, 13 Sep 2026 16:36:55 +0000 Subject: [PATCH 5/7] fix(hermes_squid): hardcode voice-gateway image tag to v0.3.0 brencher's ${version} substitution expands to auto- at deploy time, but the image was pushed under a semver tag (v0.3.0) by Gitea Actions, so the deploy fails with 'No such image'. Hardcoding the tag in compose.yml makes the deploy deterministic and removes the brencher coupling. Bumping the voice-gateway release now requires updating this string in addition to the tag in Org1/hermes-voice-gateway. Bump sequence: 1. Push tag v0.4.0 in Org1/hermes-voice-gateway -> workflow builds image 2. Update this string to v0.4.0 3. brencher deploys --- hermes_squid/stack-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes_squid/stack-compose.yml b/hermes_squid/stack-compose.yml index a7295fc..17d8905 100644 --- a/hermes_squid/stack-compose.yml +++ b/hermes_squid/stack-compose.yml @@ -271,7 +271,7 @@ services: max_attempts: 3 voice-gateway: - image: gitea.rudolf.keenetic.link/hermes/hermes-voice-gateway:${version} + image: gitea.rudolf.keenetic.link/hermes/hermes-voice-gateway:v0.3.0 hostname: voice-gateway user: "0:0" networks: -- 2.54.0 From f9f22530a545a7e3f85732a4a72fc12e112d75cd Mon Sep 17 00:00:00 2001 From: hermes Date: Sun, 13 Sep 2026 17:01:06 +0000 Subject: [PATCH 6/7] fix(hermes_squid): correct hermes-proxy command (proxy start, not run) `hermes proxy` subcommands are start/status/providers, not run. The `proxy run` form was based on an outdated skill summary; the actual argparse rejects 'run' as an invalid choice and the container exits with code 2 before the aiohttp proxy binds to :8645. --- hermes_squid/stack-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes_squid/stack-compose.yml b/hermes_squid/stack-compose.yml index 17d8905..da03a07 100644 --- a/hermes_squid/stack-compose.yml +++ b/hermes_squid/stack-compose.yml @@ -233,7 +233,7 @@ services: image: nousresearch/hermes-agent:v2026.8.3 hostname: hermes-proxy user: "0:0" - command: proxy run --host 0.0.0.0 --port 8645 + command: proxy start --host 0.0.0.0 --port 8645 networks: - hermes_proxy volumes: -- 2.54.0 From b0723668841a3e3f392008ad0ee4691698100d1b Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 13 Sep 2026 20:31:06 +0200 Subject: [PATCH 7/7] placement to odroid --- hermes_squid/stack-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hermes_squid/stack-compose.yml b/hermes_squid/stack-compose.yml index da03a07..d4a6aeb 100644 --- a/hermes_squid/stack-compose.yml +++ b/hermes_squid/stack-compose.yml @@ -21,7 +21,7 @@ services: deploy: placement: constraints: - - node.hostname != xu4 + - node.hostname == odroid replicas: 1 resources: limits: @@ -48,7 +48,7 @@ services: deploy: placement: constraints: - - node.hostname != xu4 + - node.hostname == odroid replicas: 1 resources: limits: @@ -104,7 +104,7 @@ services: deploy: placement: constraints: - - node.hostname != xu4 + - node.hostname = odroid replicas: 1 resources: limits: @@ -133,7 +133,7 @@ services: deploy: placement: constraints: - - node.hostname != xu4 + - node.hostname == odroid replicas: 1 resources: limits: -- 2.54.0