feat: add git-consistent memory gateway architecture

This commit is contained in:
lingyuzeng
2026-03-07 22:33:41 +08:00
commit d4cd81f498
40 changed files with 2114 additions and 0 deletions

27
scripts/warmup.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT_DIR}"
BASE_URL="${GATEWAY_BASE_URL:-http://127.0.0.1:8787}"
wait_health() {
local attempts=60
for _ in $(seq 1 "${attempts}"); do
if curl -fsS "${BASE_URL}/health" >/dev/null 2>&1; then
return 0
fi
sleep 2
done
echo "ERROR: gateway did not become healthy at ${BASE_URL}/health" >&2
return 1
}
wait_health
curl -fsS -X POST "${BASE_URL}/query" \
-H 'content-type: application/json' \
-d '{"branch":"main","query_type":"search","query":"router","require_latest":true,"debug":true}' >/dev/null
echo "Warmup completed."