From 89b9f1a4c747da0172858be7ed77d6601b0b6702 Mon Sep 17 00:00:00 2001 From: jenkins Date: Sat, 15 Aug 2026 17:58:47 -0300 Subject: [PATCH] hermes: isolate runtime access and expose activity --- .../applications/hermes/kustomization.yaml | 4 + .../Dockerfile.hermes-agent.dockerignore | 6 + dockerfiles/hermes-session-activity-panel.tsx | 15 +- knowledge/catalog/atlas-summary.json | 2 +- knowledge/catalog/atlas.json | 25 +- knowledge/catalog/atlas.yaml | 21 +- knowledge/catalog/runbooks.json | 2 +- knowledge/runbooks/hermes-triage-demo.md | 11 +- scripts/ops/styx_prep.sh | 18 +- scripts/ops/styx_prep_nvme_luks.sh | 10 +- .../knowledge/catalog/atlas-summary.json | 2 +- services/comms/knowledge/catalog/atlas.json | 25 +- services/comms/knowledge/catalog/atlas.yaml | 21 +- .../comms/knowledge/catalog/runbooks.json | 2 +- .../knowledge/runbooks/hermes-triage-demo.md | 11 +- .../scripts/gitea_atlas_identity_ensure.sh | 56 +++- services/hermes/agent-configmap.yaml | 18 +- services/hermes/agent-deployment.yaml | 265 +++++++++++------ services/hermes/chat-router.yaml | 2 +- services/hermes/chat-statefulset.yaml | 105 ++++--- services/hermes/deployment.yaml | 153 +++++----- services/hermes/kustomization.yaml | 7 +- .../plugins/image-gen-broker/__init__.py | 18 +- services/hermes/pvc.yaml | 15 - services/hermes/scripts/claude | 2 +- .../hermes/scripts/claude_oauth_broker.py | 12 +- services/hermes/scripts/codex_broker.py | 19 +- services/hermes/scripts/gitea_askpass.sh | 15 +- services/hermes/scripts/hermes_coordinator.py | 44 ++- .../hermes/scripts/hermes_model_routing.py | 34 +-- services/hermes/scripts/image_broker.py | 19 +- .../scripts/patch_api_server_sessions.py | 183 +++++++++++- .../scripts/patch_process_output_redaction.py | 39 +++ .../patch_subprocess_secret_boundary.py | 45 +++ .../scripts/patch_web_session_activity.py | 96 ++++++ .../hermes/scripts/stage_runtime_access.py | 162 ++++++++++ .../scripts/sync_runtime_credentials.py | 141 +++++++++ .../hermes/scripts/telegram_media_server.py | 18 +- services/hermes/switchyard-deployment.yaml | 2 +- .../maintenance/apps/ariadne-deployment.yaml | 18 +- .../vault/scripts/vault_k8s_auth_configure.sh | 6 +- testing/tests/test_hermes_chat_quality.py | 97 ++++-- testing/tests/test_hermes_cli_lanes.py | 30 +- testing/tests/test_hermes_coordinator.py | 25 +- testing/tests/test_hermes_runtime_access.py | 276 ++++++++++++++++++ 45 files changed, 1717 insertions(+), 380 deletions(-) create mode 100644 dockerfiles/Dockerfile.hermes-agent.dockerignore create mode 100644 services/hermes/scripts/patch_process_output_redaction.py create mode 100644 services/hermes/scripts/patch_subprocess_secret_boundary.py create mode 100644 services/hermes/scripts/patch_web_session_activity.py create mode 100644 services/hermes/scripts/stage_runtime_access.py create mode 100644 services/hermes/scripts/sync_runtime_credentials.py create mode 100644 testing/tests/test_hermes_runtime_access.py diff --git a/clusters/atlas/flux-system/applications/hermes/kustomization.yaml b/clusters/atlas/flux-system/applications/hermes/kustomization.yaml index 57fed46e..3949282b 100644 --- a/clusters/atlas/flux-system/applications/hermes/kustomization.yaml +++ b/clusters/atlas/flux-system/applications/hermes/kustomization.yaml @@ -30,6 +30,10 @@ spec: kind: Deployment name: hermes-agent namespace: hermes + - apiVersion: apps/v1 + kind: DaemonSet + name: hermes-node-ssh-access + namespace: hermes - apiVersion: apps/v1 kind: Deployment name: hermes diff --git a/dockerfiles/Dockerfile.hermes-agent.dockerignore b/dockerfiles/Dockerfile.hermes-agent.dockerignore new file mode 100644 index 00000000..d5e5ddcc --- /dev/null +++ b/dockerfiles/Dockerfile.hermes-agent.dockerignore @@ -0,0 +1,6 @@ +** +!dockerfiles/hermes-python-sandbox-tool.py +!dockerfiles/hermes-public-extract/ +!dockerfiles/hermes-public-extract/** +!dockerfiles/hermes-session-activity-panel.tsx +!dockerfiles/hermes-session-migrate.py diff --git a/dockerfiles/hermes-session-activity-panel.tsx b/dockerfiles/hermes-session-activity-panel.tsx index 130c8ac9..f2be9ddc 100644 --- a/dockerfiles/hermes-session-activity-panel.tsx +++ b/dockerfiles/hermes-session-activity-panel.tsx @@ -104,8 +104,9 @@ function ActivityMessage({ /** * Show every persisted message and tool event without relying on xterm's - * canvas. API workers default to this view; the normal terminal remains one - * click away and continues running underneath it. + * canvas. Resumed sessions default to this view so an unknown or delayed + * backend source classification cannot hide activity; the normal terminal + * remains one click away and continues running underneath it. */ export function SessionActivityPanel({ sessionId, @@ -129,7 +130,7 @@ export function SessionActivityPanel({ api.getSessionMessages(sessionId, profile ?? ""), ]); setDetail(nextDetail); - setMessages(response.messages); + setMessages(Array.isArray(response.messages) ? response.messages : []); setError(null); setPollTime(Date.now()); if (stickToBottom.current) { @@ -169,9 +170,6 @@ export function SessionActivityPanel({ ? "Working" : "Run finished"; - // Ordinary interactive TUI sessions keep their established terminal UI. - if (detail && detail.source !== "api_server") return null; - if (!expanded) { return (