File size: 898 Bytes
52ba303 b40979f 52ba303 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #!/bin/bash
# Runs once, as root, before the agent starts: Harbor's [environment.healthcheck] unpacks this folder into
# /var/lib/mimo and runs it. Generated by mimo_harbor; see its README for how each step maps to Xiaomi's harness.
M=/var/lib/mimo
[ -f "$M/ready" ] && exit 0
chmod 700 "$M"
fail() { echo "setup: $*" >&2; exit 1; }
# the answer-leak blocklist (mimoagent), applied to /etc/hosts by the agent right after it installs
write_blocklist() { cp "$M/files/blocklist" "$M/blocklist"; }
# Terminal-Bench rows (in the General domain): the Harbor convention itself. Scrub test leftovers from the image and
# remember what was in the workspace, so harness residue can be told apart from the agent's work at grading time.
rm -rf /tests
find /logs/verifier -mindepth 1 -delete 2>/dev/null || true
ls -A /app 2>/dev/null > "$M/before" || true
write_blocklist
touch "$M/ready"
echo "setup done"
|