lixiaowww
CSP: allow huggingface.co frame-ancestors
249c849
Raw
History Blame Contribute Delete
859 Bytes
#!/usr/bin/env bash
# P0 OpenHands × TCG PoC: adapt fixture trace → optional live optimize.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$ROOT"
TRACE="${1:-scripts/fixtures/openhands-sample-trace.jsonl}"
ADAPTED="${2:-artifacts/openhands-adapted-logs.json}"
echo "==> Adapt trace: $TRACE"
npx tsx scripts/openhands/tcg-adapter-cli.ts "$TRACE" "$ADAPTED"
if [[ -z "${BENCH_API_KEY:-}" ]]; then
echo "==> Skip live optimize (set BENCH_API_KEY + BENCH_BASE_URL to run bench:openhands)"
exit 0
fi
echo "==> Run bench:openhands on fixtures"
OPENHANDS_TRACE_DIR="$(dirname "$TRACE")" \
BENCH_OUTPUT_FILE="${BENCH_OUTPUT_FILE:-artifacts/openhands-bench-report.json}" \
npm run bench:openhands
if [[ "${RUN_GATE:-false}" == "true" ]]; then
BENCH_GATE_MAX_P95_MS="${BENCH_GATE_MAX_P95_MS:-2000}" npm run bench:openhands:gate
fi