22 lines
681 B
Bash
Executable file
22 lines
681 B
Bash
Executable file
#!/bin/sh
|
|
# Confirm hax receives the project-scoped YAMS instructions through AGENTS.md.
|
|
set -eu
|
|
|
|
if [ "$#" -ne 2 ]; then
|
|
echo "usage: $0 HAX_BINARY HAX_SOURCE_DIR" >&2
|
|
exit 1
|
|
fi
|
|
|
|
hax=$1
|
|
hax_source=$2
|
|
root=$(CDPATH='' cd -- "$(dirname -- "$0")/.." && pwd)
|
|
transcript=$(mktemp /private/tmp/gem-hax-transcript.XXXXXX)
|
|
output=$(mktemp /private/tmp/gem-hax-output.XXXXXX)
|
|
trap 'rm -f "$transcript" "$output"' EXIT
|
|
|
|
cd "$root"
|
|
HAX_PROVIDER=mock HAX_MOCK_SCRIPT="$hax_source/scripts/mock/hello.txt" \
|
|
HAX_TRANSCRIPT="$transcript" "$hax" --no-session --print 'verify project memory' > "$output"
|
|
|
|
grep -q 'scripts/yams search' "$transcript"
|
|
grep -q 'Hello from mock' "$output"
|