From cb158fbb0b03285dc742f29541241aacc17650d4 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 00:22:27 -0400 Subject: [PATCH 01/10] Fix symlink command and update hermes-agent installation --- .devcontainer/post-create-cmd.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/post-create-cmd.sh b/.devcontainer/post-create-cmd.sh index ea966f51..b83b5d73 100755 --- a/.devcontainer/post-create-cmd.sh +++ b/.devcontainer/post-create-cmd.sh @@ -2,7 +2,7 @@ # Install modelrelay globally sudo npm install modelrelay -g --prefix /usr/local/lib/modelrelay -sudo ln -s /usr/local/lib/modelrelay/bin/modelrelay /usr/local/bin/modelrelay +sudo ln -sf /usr/local/lib/modelrelay/bin/modelrelay /usr/local/bin/modelrelay sudo npm cache clean --force echo "[post-create-cmd.sh] Starting modelrelay in the background..." @@ -13,7 +13,8 @@ else fi # Install hermes-agent -curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -s -- --skip-setup +HERMES_VERSION="v2026.5.7" +curl -fsSL "https://raw.githubusercontent.com/NousResearch/hermes-agent/${HERMES_VERSION}/scripts/install.sh" | bash -s -- --skip-setup npm cache clean --force sudo rm -rf /var/lib/apt/lists/* @@ -24,4 +25,3 @@ if command -v hermes &>/dev/null && [ -d "$HOME/.hermes/sessions" ] && [ -z "$(l hermes config set model.base_url http://localhost:7352/v1 hermes config set model.default auto-fastest fi - From a4f19763ca0c5b5c9c1883b3b5f4bf69010865c1 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 00:23:16 -0400 Subject: [PATCH 02/10] Rename devcontainer to Hermes-Coding-Agent --- .devcontainer/devcontainer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 58c21826..ca130bde 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,10 @@ { - "name": "Hermes-CodeSpace", + "name": "Hermes-Coding-Agent", "customizations": { "vscode": { "extensions": ["saoudrizwan.claude-dev","joaompfp.hermes-ai-agent"] } }, "postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh", - "postStartCommand": "bash echo '[post-start-cmd.sh] Container started' >> /tmp/post-start-cmd.log" -} \ No newline at end of file + "postStartCommand": "bash -c \"echo '[post-start-cmd.sh] Container started' >> /tmp/post-start-cmd.log\"" +} From 794356d010c9c96c60f7ce7a326f7a336f95f976 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 09:15:08 +0000 Subject: [PATCH 03/10] Implement post-start command script for modelrelay initialization --- .devcontainer/devcontainer.json | 2 +- .devcontainer/post-start-cmd.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 .devcontainer/post-start-cmd.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ca130bde..26ab3d85 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,5 +6,5 @@ } }, "postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh", - "postStartCommand": "bash -c \"echo '[post-start-cmd.sh] Container started' >> /tmp/post-start-cmd.log\"" + "postStartCommand": "bash ./.devcontainer/post-start-cmd.sh" } diff --git a/.devcontainer/post-start-cmd.sh b/.devcontainer/post-start-cmd.sh new file mode 100755 index 00000000..ee2031e9 --- /dev/null +++ b/.devcontainer/post-start-cmd.sh @@ -0,0 +1,8 @@ + + +echo "[post-start-cmd.sh] Starting modelrelay in the background..." +if command -v modelrelay &>/dev/null; then + setsid /usr/local/bin/modelrelay >> /tmp/modelrelay.log 2>&1 & +else + echo "[post-start-cmd.sh] modelrelay not found, skipping start" +fi \ No newline at end of file From 3ef977e9866c4c1c12206ac248649b5c08b4d346 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 10:02:04 +0000 Subject: [PATCH 04/10] Enhance modelrelay startup scripts with logging and checks for existing instances --- .devcontainer/devcontainer.json | 4 ++-- .devcontainer/post-create-cmd.sh | 9 +++++++-- .devcontainer/post-start-cmd.sh | 9 +++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 26ab3d85..fcaaa102 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,6 +5,6 @@ "extensions": ["saoudrizwan.claude-dev","joaompfp.hermes-ai-agent"] } }, - "postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh", - "postStartCommand": "bash ./.devcontainer/post-start-cmd.sh" + "postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh >> /tmp/post-create-cmd.log", + "postStartCommand": "bash ./.devcontainer/post-start-cmd.sh >> /tmp/post-start-cmd.log" } diff --git a/.devcontainer/post-create-cmd.sh b/.devcontainer/post-create-cmd.sh index b83b5d73..bafdca2a 100755 --- a/.devcontainer/post-create-cmd.sh +++ b/.devcontainer/post-create-cmd.sh @@ -5,9 +5,14 @@ sudo npm install modelrelay -g --prefix /usr/local/lib/modelrelay sudo ln -sf /usr/local/lib/modelrelay/bin/modelrelay /usr/local/bin/modelrelay sudo npm cache clean --force -echo "[post-create-cmd.sh] Starting modelrelay in the background..." +echo "[post-create-cmd.sh] Checking modelrelay..." if command -v modelrelay &>/dev/null; then - setsid /usr/local/bin/modelrelay >> /tmp/modelrelay.log 2>&1 & + if pgrep -x modelrelay > /dev/null; then + echo "[post-create-cmd.sh] modelrelay is already running, skipping" + else + echo "[post-create-cmd.sh] Starting modelrelay in the background..." + setsid /usr/local/bin/modelrelay >> /tmp/modelrelay.log 2>&1 & + fi else echo "[post-create-cmd.sh] modelrelay not found, skipping start" fi diff --git a/.devcontainer/post-start-cmd.sh b/.devcontainer/post-start-cmd.sh index ee2031e9..77564a15 100755 --- a/.devcontainer/post-start-cmd.sh +++ b/.devcontainer/post-start-cmd.sh @@ -1,8 +1,13 @@ - +#!/bin/bash echo "[post-start-cmd.sh] Starting modelrelay in the background..." if command -v modelrelay &>/dev/null; then - setsid /usr/local/bin/modelrelay >> /tmp/modelrelay.log 2>&1 & + if pgrep -x modelrelay > /dev/null; then + echo "[post-start-cmd.sh] modelrelay is already running, skipping" + else + echo "[post-start-cmd.sh] Starting modelrelay in the background..." + setsid /usr/local/bin/modelrelay >> /tmp/modelrelay.log 2>&1 & + fi else echo "[post-start-cmd.sh] modelrelay not found, skipping start" fi \ No newline at end of file From 7a4aa4b6c034d77b6f4c63805f02c68113c41925 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 10:48:54 +0000 Subject: [PATCH 05/10] Remove unnecessary startup message from post-start command script --- .devcontainer/post-start-cmd.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.devcontainer/post-start-cmd.sh b/.devcontainer/post-start-cmd.sh index 77564a15..9435fff1 100755 --- a/.devcontainer/post-start-cmd.sh +++ b/.devcontainer/post-start-cmd.sh @@ -1,6 +1,5 @@ #!/bin/bash -echo "[post-start-cmd.sh] Starting modelrelay in the background..." if command -v modelrelay &>/dev/null; then if pgrep -x modelrelay > /dev/null; then echo "[post-start-cmd.sh] modelrelay is already running, skipping" From e7e82c4ec28577a16b2293e0252dc418ac5d644b Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 11:40:58 +0000 Subject: [PATCH 06/10] Refactor logging in post-create and post-start commands for clarity --- .devcontainer/devcontainer.json | 4 ++-- .devcontainer/post-start-cmd.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fcaaa102..6011ceed 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,6 +5,6 @@ "extensions": ["saoudrizwan.claude-dev","joaompfp.hermes-ai-agent"] } }, - "postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh >> /tmp/post-create-cmd.log", - "postStartCommand": "bash ./.devcontainer/post-start-cmd.sh >> /tmp/post-start-cmd.log" + "postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh > /tmp/post-create-cmd.log", + "postStartCommand": "bash ./.devcontainer/post-start-cmd.sh > /tmp/post-start-cmd.log" } diff --git a/.devcontainer/post-start-cmd.sh b/.devcontainer/post-start-cmd.sh index 9435fff1..45f87e6b 100755 --- a/.devcontainer/post-start-cmd.sh +++ b/.devcontainer/post-start-cmd.sh @@ -1,5 +1,6 @@ #!/bin/bash +echo "[post-start-cmd.sh] Checking modelrelay..." if command -v modelrelay &>/dev/null; then if pgrep -x modelrelay > /dev/null; then echo "[post-start-cmd.sh] modelrelay is already running, skipping" From d5ac83dffb08fb59d7b927a0767ca4949e0e07bb Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 12:09:26 +0000 Subject: [PATCH 07/10] Add ripgrep installation for improved search performance in hermes-agent --- .devcontainer/post-create-cmd.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.devcontainer/post-create-cmd.sh b/.devcontainer/post-create-cmd.sh index bafdca2a..a326902a 100755 --- a/.devcontainer/post-create-cmd.sh +++ b/.devcontainer/post-create-cmd.sh @@ -17,6 +17,18 @@ else echo "[post-create-cmd.sh] modelrelay not found, skipping start" fi +# Install ripgrep for better search performance in hermes-agent +if ! command -v rg &>/dev/null; then + echo "[post-create-cmd.sh] Installing ripgrep for better search performance in hermes-agent..." + if [[ "$OSTYPE" == "linux-gnu"* ]]; then + # Linux + cd /tmp + curl -LO https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep_14.1.1-1_amd64.deb + sudo dpkg -i ripgrep_14.1.1-1_amd64.deb + rm ripgrep_14.1.1-1_amd64.deb + fi +fi + # Install hermes-agent HERMES_VERSION="v2026.5.7" curl -fsSL "https://raw.githubusercontent.com/NousResearch/hermes-agent/${HERMES_VERSION}/scripts/install.sh" | bash -s -- --skip-setup From 3e511d483413a4f34202535314bd7857505ed8db Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 12:30:52 +0000 Subject: [PATCH 08/10] Refactor modelrelay check to use pgrep -f for improved process detection --- .devcontainer/post-create-cmd.sh | 2 +- .devcontainer/post-start-cmd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/post-create-cmd.sh b/.devcontainer/post-create-cmd.sh index a326902a..46d764ea 100755 --- a/.devcontainer/post-create-cmd.sh +++ b/.devcontainer/post-create-cmd.sh @@ -7,7 +7,7 @@ sudo npm cache clean --force echo "[post-create-cmd.sh] Checking modelrelay..." if command -v modelrelay &>/dev/null; then - if pgrep -x modelrelay > /dev/null; then + if pgrep -f modelrelay > /dev/null; then echo "[post-create-cmd.sh] modelrelay is already running, skipping" else echo "[post-create-cmd.sh] Starting modelrelay in the background..." diff --git a/.devcontainer/post-start-cmd.sh b/.devcontainer/post-start-cmd.sh index 45f87e6b..e16990ef 100755 --- a/.devcontainer/post-start-cmd.sh +++ b/.devcontainer/post-start-cmd.sh @@ -2,7 +2,7 @@ echo "[post-start-cmd.sh] Checking modelrelay..." if command -v modelrelay &>/dev/null; then - if pgrep -x modelrelay > /dev/null; then + if pgrep -f modelrelay > /dev/null; then echo "[post-start-cmd.sh] modelrelay is already running, skipping" else echo "[post-start-cmd.sh] Starting modelrelay in the background..." From f21477c25b52dbfd6c786848eedb93b87dded9f3 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 12:51:31 +0000 Subject: [PATCH 09/10] dev --- .devcontainer/post-start-cmd.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/post-start-cmd.sh b/.devcontainer/post-start-cmd.sh index e16990ef..f39cb5ff 100755 --- a/.devcontainer/post-start-cmd.sh +++ b/.devcontainer/post-start-cmd.sh @@ -10,4 +10,6 @@ if command -v modelrelay &>/dev/null; then fi else echo "[post-start-cmd.sh] modelrelay not found, skipping start" -fi \ No newline at end of file +fi + +sleep 3000000 \ No newline at end of file From 55a43395da56e5567423dda40b10466078dacd12 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 13:04:17 +0000 Subject: [PATCH 10/10] Update sleep duration in post-start command for proper modelrelay startup --- .devcontainer/post-start-cmd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/post-start-cmd.sh b/.devcontainer/post-start-cmd.sh index f39cb5ff..9598af78 100755 --- a/.devcontainer/post-start-cmd.sh +++ b/.devcontainer/post-start-cmd.sh @@ -12,4 +12,5 @@ else echo "[post-start-cmd.sh] modelrelay not found, skipping start" fi -sleep 3000000 \ No newline at end of file +# so that the script doesn't exit immediately before modelrelay has a chance to start properly +sleep 60 \ No newline at end of file