#!/usr/bin/env bash # Regenerates every file in output/. Needs JDK 25, Maven, curl, python3. # Session ids and request ids in the wire transcripts differ on every run; everything else is stable # except the one timing line in 07, which is indicative only. set -eu cd "$(dirname "$0")/.." # 1-8: the JUnit tests write output/01..08 themselves (the assertions and the transcripts are the same code) mvn -B -q test 2>&1 | tee /tmp/mcp-advanced-test.log | grep -E 'Tests run:|BUILD|ERROR' || true # 9: the one WARN the stateless server logs while it silently drops the tools { echo "# log line from the STATELESS test run (spring.ai.mcp.server.protocol=STATELESS)" grep 'Stateless servers' /tmp/mcp-advanced-test.log | sed -E 's/^.*(McpPredicates)/\1/' } > output/09-stateless-warning.txt # 10-11: raw JSON-RPC with curl as the client mvn -B -q package -DskipTests bash scripts/wire-demo.sh