From e505a9d0f61bc0087530c2fdaf4bef85e916826e Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 02:24:56 +0000 Subject: [PATCH 1/6] Add devcontainer configuration and post-create script for Hermes-Coding Agent setup --- .devcontainer/devcontainer.json | 10 ++++++++++ .devcontainer/post-create-cmd.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/post-create-cmd.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..38c3da5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,10 @@ +{ + "name": "Hermes-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 diff --git a/.devcontainer/post-create-cmd.sh b/.devcontainer/post-create-cmd.sh new file mode 100644 index 0000000..0f76129 --- /dev/null +++ b/.devcontainer/post-create-cmd.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# 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 npm cache clean --force + +echo "[post-create-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-create-cmd.sh] modelrelay not found, skipping start" +fi + +# Install hermes-agent +curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -s -- --skip-setup +npm cache clean --force +sudo rm -rf /var/lib/apt/lists/* + +# Configure hermes defaults if first run +if command -v hermes &>/dev/null && [ -d "$HOME/.hermes/sessions" ] && [ -z "$(ls -A "$HOME/.hermes/sessions")" ]; then + echo "[post-create-cmd.sh] No sessions found, setting up default configuration for custom provider" + hermes config set model.provider custom + hermes config set model.base_url http://localhost:7352/v1 + hermes config set model.default auto-fastest +fi \ No newline at end of file From 57cb404b74a63392fca9426bc997c6dc44eb5a27 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 03:10:03 +0000 Subject: [PATCH 2/6] upgrade: SonarQube server to 26.4.0.121862-community and scanner CLI to 12.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Server: 25.5.0.107428-community → 26.4.0.121862-community - CLI: 11.3 → 12.1 - Both images verified, manual scan test passed --- makefile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefile.sh b/makefile.sh index d13f654..1e7754c 100755 --- a/makefile.sh +++ b/makefile.sh @@ -9,8 +9,8 @@ export SONAR_SOURCE_PATH=${SONAR_SOURCE_PATH:-"."} export SONAR_METRICS_PATH=${SONAR_METRICS_PATH:-"./sonar-metrics.json"} export SONAR_EXTENSION_DIR="${HOME}/.sonarless/extensions" -export DOCKER_SONAR_CLI=${DOCKER_SONAR_CLI:-"sonarsource/sonar-scanner-cli:11.3"} -export DOCKER_SONAR_SERVER=${DOCKER_SONAR_SERVER:-"sonarqube:25.5.0.107428-community"} +export DOCKER_SONAR_CLI=${DOCKER_SONAR_CLI:-"sonarsource/sonar-scanner-cli:12.1"} +export DOCKER_SONAR_SERVER=${DOCKER_SONAR_SERVER:-"sonarqube:26.4.0.121862-community"} export CLI_NAME="sonarless" From 6d3a7cd236326553399a0e9a368dfcca83be297d Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 03:20:20 +0000 Subject: [PATCH 3/6] docs: bump version references from v1.3 to v1.4 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 696e2f0..82ed9d2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![GitHub Release](https://img.shields.io/github/v/release/gitricko/sonarless) ![GitHub commits since latest release](https://img.shields.io/github/commits-since/gitricko/sonarless/latest) -# Sonarless v1.3 +# Sonarless v1.4 This developer-friendly CLI and GitHub Action enable SonarQube scanning for your repository without the need for a dedicated hosted SonarQube server. It starts a SonarQube Docker instance, allowing developers to scan code, check results, and generate a JSON metrics file for automation. This ensures you can easily assess and maintain the quality of your code. @@ -62,7 +62,7 @@ This CLI works perfectly with Github CodeSpace ```yaml -- uses: gitricko/sonarless@v1.3 +- uses: gitricko/sonarless@v1.4 with: # Folder path to scan from git-root # Default: . From 62ae5472e5d388bf860c555ca7e8e483cfb4cd39 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 03:25:34 +0000 Subject: [PATCH 4/6] fix: correct postStartCommand syntax to use bash -c --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 38c3da5..09bf874 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,5 +6,5 @@ } }, "postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh", - "postStartCommand": "bash echo '[post-start-cmd.sh] Container started' >> /tmp/post-start-cmd.log" + "postStartCommand": "bash -c \"echo '[post-start-cmd.sh] Container started' >> /tmp/post-start-cmd.log\"" } \ No newline at end of file From 90811d4fa5f63d509df43b155b68390ffff7b4a7 Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 03:26:55 +0000 Subject: [PATCH 5/6] fix: use ln -sf for idempotent symlink creation Copilot: ln -s fails on rebuild if symlink already exists. Using -f (force) ensures idempotent behavior. --- .devcontainer/post-create-cmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/post-create-cmd.sh b/.devcontainer/post-create-cmd.sh index 0f76129..d468985 100644 --- 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..." From 76adb47fbc4d433b7d481811146334667fb6ba1c Mon Sep 17 00:00:00 2001 From: gitricko Date: Mon, 11 May 2026 03:29:45 +0000 Subject: [PATCH 6/6] fix: pin hermes-agent install to v2026.5.7 tag instead of main Copilot: piping remote script from mutable main branch is a supply-chain risk. Pinning to a release tag ensures reproducibility. --- .devcontainer/post-create-cmd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/post-create-cmd.sh b/.devcontainer/post-create-cmd.sh index d468985..be15d89 100644 --- a/.devcontainer/post-create-cmd.sh +++ b/.devcontainer/post-create-cmd.sh @@ -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/*