Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/scripts/resolve-dario-proxy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Discover the host-local Dario proxy (Claude Max OAuth) for self-hosted runners.
set -euo pipefail

GW=""
if command -v ip >/dev/null 2>&1; then
GW="$(ip route 2>/dev/null | awk '/default/{print $3; exit}')"
fi
for H in host.containers.internal "$GW" 172.18.0.1 172.17.0.1 127.0.0.1; do
[ -z "$H" ] && continue
if curl -fsS --max-time 8 \
-X POST "http://$H:3456/v1/chat/completions" \
-H 'content-type: application/json' \
-H 'authorization: Bearer dario' \
-d '{"model":"claude-haiku-4-5","messages":[{"role":"user","content":"ok"}],"max_tokens":4,"stream":false}' \
>/dev/null 2>&1; then
{
echo "base_url=http://$H:3456"
echo "api_key=dario"
} >> "${GITHUB_OUTPUT}"
echo "Dario proxy reachable at $H:3456" >&2
exit 0
fi
done

echo "::error::Dario proxy (:3456) unreachable from the runner" >&2
exit 1
19 changes: 19 additions & 0 deletions .github/scripts/resolve-hermes-proxy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Discover the host-local Hermes llm-proxy (Grok) for self-hosted runners.
set -euo pipefail

GW=""
if command -v ip >/dev/null 2>&1; then
GW="$(ip route 2>/dev/null | awk '/default/{print $3; exit}')"
fi
for H in host.containers.internal "$GW" 172.18.0.1 172.17.0.1 127.0.0.1; do
[ -z "$H" ] && continue
if curl -fsS --max-time 6 "http://$H:38765/status" >/dev/null 2>&1; then
echo "url=http://$H:38765/api/v1/messages" >> "${GITHUB_OUTPUT}"
echo "Hermes proxy reachable at $H:38765" >&2
exit 0
fi
done

echo "::error::Hermes proxy (:38765) unreachable from the runner" >&2
exit 1
10 changes: 8 additions & 2 deletions .github/workflows/claude-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,22 @@ jobs:
review:
name: Claude review
if: vars.CLAUDE_REVIEW_ENABLED == 'true' && vars.CLAUDE_REVIEW_CONFIGURED == 'true'
runs-on: [self-hosted, linux, x64, spot-tech-ci]
runs-on: [self-hosted, logan-gl502vs]
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

Comment on lines 18 to 21
- name: Resolve Dario proxy
id: dario
run: bash .github/scripts/resolve-dario-proxy.sh

- uses: anthropics/claude-code-action@v1
env:
ANTHROPIC_BASE_URL: ${{ steps.dario.outputs.base_url }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
anthropic_api_key: dario
claude_args: "--max-turns 25"
prompt: |
Review this pull request for Agent Office and post concise inline review comments. Approve only if it is clean. Focus on, in priority order:
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/grok-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,15 @@ jobs:
review:
name: Grok review (Hermes)
if: vars.GROK_REVIEW_ENABLED == 'true'
runs-on: [self-hosted, linux, x64, spot-tech-ci]
runs-on: [self-hosted, logan-gl502vs]
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

Comment on lines 21 to 24
- name: Resolve Hermes proxy
id: proxy
run: |
GW="$(ip route 2>/dev/null | awk '/default/{print $3; exit}')"
for H in host.containers.internal "$GW" 172.18.0.1 172.17.0.1 127.0.0.1; do
[ -z "$H" ] && continue
if curl -fsS --max-time 6 "http://$H:38765/status" >/dev/null 2>&1; then
echo "url=http://$H:38765/api/v1/messages" >> "$GITHUB_OUTPUT"
echo "Hermes reachable at $H"
exit 0
fi
done
echo "::error::Hermes proxy (:38765) unreachable from the runner" >&2
exit 1
run: bash .github/scripts/resolve-hermes-proxy.sh

- name: Grok review
env:
Expand Down
Loading