jadoonf's picture
v0.1.1: correct LIMITATIONS (agent-side artifacts still exist, expire 2027-01), add artifacts/index.json + scripts/fetch_pair.sh, README pairing section
28a2e94 verified
Raw History Blame Contribute Delete
1.02 kB
#!/usr/bin/env bash
# Fetch the agent-side half of one run (native Claude session + raw sensor archive) from the
# experiment author's public GitHub Actions artifacts. Requires `gh` with any GitHub login.
# Usage: scripts/fetch_pair.sh <run_id> [outdir]
# Artifacts expire (see artifacts/index.json). Nothing here is republished by garnet-labs.
set -euo pipefail
run_id="${1:?run_id}"; out="${2:-pairs/$run_id}"; repo=jadoont/agent-behavior-index
mkdir -p "$out"
gh api "repos/$repo/actions/runs/$run_id/artifacts" --jq '.artifacts[] | "\(.id) \(.name)"' | while read -r id name; do
case "$name" in *-agent|jibril-debug-logs-*) gh api "repos/$repo/actions/artifacts/$id/zip" > "$out/$name.zip"; echo "fetched $name";; esac
done
# The self-report is the content of the agent's `Write` tool call to tasks/<task>/self-report.md inside agent-stdio.log.
echo "profile: $(python3 -c "import json;r=[json.loads(l) for l in open('data/receipts.jsonl')];print([x['garnet_profile_url'] for x in r if x['run_id']=='$run_id'][0])")"