Files
wehub-resource-sync a06f331eb8
CI / benchmark (push) Has been skipped
install-script / posix-syntax (push) Successful in 6m1s
CI / build-onnx (push) Failing after 6m43s
init-smoke / dry-run (push) Failing after 15m57s
security / govulncheck (push) Has been cancelled
security / trivy-fs (push) Has been cancelled
CI / test (1.26, ubuntu-latest) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
CI / test (1.26, macos-latest) (push) Has been cancelled
CI / build-windows (push) Has been cancelled
CI / lint (push) Has been cancelled
install-script / powershell-syntax (push) Has been cancelled
install-script / install (macos-14) (push) Has been cancelled
install-script / install (ubuntu-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:33:42 +08:00

48 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
# gortex-overview — graph statistics and health via eval-server
# Usage: gortex-overview
set -euo pipefail
GORTEX_EVAL_PORT="${GORTEX_EVAL_PORT:-4747}"
GORTEX_EVAL_URL="http://127.0.0.1:${GORTEX_EVAL_PORT}"
# Try eval-server (fast path)
response=$(curl -sf -X POST "${GORTEX_EVAL_URL}/tool/graph_stats" \
-H "Content-Type: application/json" \
-d '{}' 2>/dev/null) && server_ok=true || server_ok=false
if [ "$server_ok" = true ] && [ -n "$response" ]; then
if command -v jq &>/dev/null; then
echo "=== Codebase Overview ==="
echo ""
echo "$response" | jq -r '
if .content then
.content[] | select(.type == "text") | .text
elif type == "object" and .error then
"Error: \(.error)"
else
tostring
end
' 2>/dev/null || echo "$response"
else
echo "=== Codebase Overview ==="
echo ""
echo "$response" | sed 's/[{}\[\]"]//g; s/,/\n/g' | grep -v '^\s*$'
fi
else
# Fallback: gortex CLI
echo "Error: Gortex eval-server not running on port $GORTEX_EVAL_PORT. Start it with: gortex eval-server --index /testbed" >&2
if false; then
gortex stats 2>&1
else
echo "Error: Gortex tools temporarily unavailable (no eval-server, no CLI)." >&2
exit 1
fi
fi
echo ""
echo "--- Next steps ---"
echo " gortex-search \"<query>\" — search for symbols related to your task"
echo " gortex-context \"<task>\" — get full context for a specific task"
echo " gortex-impact \"<symbol_id>\" — analyze blast radius of a planned change"