diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 988ce27a..9a3f0f14 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -91,7 +91,8 @@ RUN mkdir -p /usr/local/lib/hermes-agent \ && cd /tmp/hermes \ && python -m venv /usr/local/lib/hermes-agent/venv \ && /usr/local/lib/hermes-agent/venv/bin/pip install --no-cache-dir . \ - && /usr/local/lib/hermes-agent/venv/bin/pip install --no-cache-dir "agent-client-protocol>=0.9.0,<1.0" \ + && /usr/local/lib/hermes-agent/venv/bin/pip install --no-cache-dir ".[acp]" \ + && /usr/local/lib/hermes-agent/venv/bin/hermes acp --check \ && rm -rf /tmp/hermes # ── Final stage ──────────────────────────────────────────────────────── @@ -210,8 +211,12 @@ RUN ln -sf /usr/local/lib/hermes-agent/venv/bin/hermes /usr/local/bin/hermes # ── Ensure hermes venv is world-readable ─────────────────────────────── # FHS root layout places the venv at /usr/local/lib/hermes-agent/venv/. # Some sub-directories may be mode 700 (root-only). Make them traversable -# so the vscode user can exec hermes and its bundled Python. +# so the vscode user can exec hermes and its bundled Python. The venv is +# also made group/other-WRITABLE so the VS Code extension's ACP dependency +# repair flow (pip install into the venv as the vscode user) can succeed +# without sudo — this is a devcontainer, not a hardened prod image. RUN chmod -R a+rX /usr/local/lib/hermes-agent 2>/dev/null || true \ + && chmod -R a+rwX /usr/local/lib/hermes-agent/venv 2>/dev/null || true \ && chmod -R a+rX /usr/local/lib/nodejs 2>/dev/null || true # ── Make claude CLI accessible if installed to /root ─────────────────── diff --git a/.devcontainer/self-check.sh b/.devcontainer/self-check.sh index d8ceb70c..0d1d1613 100755 --- a/.devcontainer/self-check.sh +++ b/.devcontainer/self-check.sh @@ -237,6 +237,17 @@ if ! should_skip "hermes"; then _fail "Config" "no config at ${HERMES_CONFIG}" json_add "hermes:config" "fail" "hermes config file not found" "{}" fi + + # ACP adapter — the VS Code extension's chat backend. A broken adapter + # (e.g. agent-client-protocol version drift) shows up as "ACP connection + # closed" in the extension and is otherwise silent. + if hermes acp --check >/dev/null 2>&1; then + _ok "ACP Adapter" "hermes acp --check OK" + json_add "hermes:acp" "ok" "ACP adapter imports and protocol deps OK" "{}" + else + _fail "ACP Adapter" "hermes acp --check failed (VS Code extension won't connect)" + json_add "hermes:acp" "fail" "hermes acp --check failed" "{}" + fi else echo " (skipped)" fi diff --git a/.github/workflows/devcontainer-ci.yml b/.github/workflows/devcontainer-ci.yml index a4bdeec8..d4361fb7 100644 --- a/.github/workflows/devcontainer-ci.yml +++ b/.github/workflows/devcontainer-ci.yml @@ -7,7 +7,7 @@ on: - '.devcontainer/**' - '!.devcontainer/screen-shot.png' pull_request: - branches: [main] + branches: [main, dockerizeation2] paths: - '.devcontainer/**' - '!.devcontainer/screen-shot.png' @@ -111,6 +111,7 @@ jobs: check "zsh installed" "command -v zsh" check "ripgrep installed" "command -v rg" check "entrypoint.sh exists" "[ -x /usr/local/bin/entrypoint.sh ]" + check "hermes ACP adapter works" "hermes acp --check" echo "" echo "=== Results: $PASS passed, $FAIL failed ==="