#!/usr/bin/env bash # One-shot Stage 1 setup: boot fixture, provision the merchant-onboard key, # serve the docs corpus, materialize a pristine sandbox, then emit the agent # brief (AGENT_BRIEF.md) with the live URLs + credentials interpolated in. # # This script sets the stage; it does NOT run the agent (the orchestrator does # that with the global onboarding-tester agent, feeding it AGENT_BRIEF.md). source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/lib.sh" RUN_ID="$("$HARNESS_DIR/boot-fixture.sh")" RUN_DIR="$RUNS_DIR/$RUN_ID" STATE="$RUN_DIR/state.env" "$HARNESS_DIR/provision.sh" "$RUN_DIR" >/dev/null "$HARNESS_DIR/serve-docs.sh" "$RUN_DIR" >/dev/null "$HARNESS_DIR/make-sandbox.sh" "$RUN_DIR" >/dev/null BASE_URL="$(state_get "$STATE" BASE_URL)" DOCS_URL="$(state_get "$STATE" DOCS_URL)" MERCHANT_KEY="$(state_get "$STATE" MERCHANT_KEY)" SANDBOX="$(state_get "$STATE" SANDBOX)" mkdir -p "$RUN_DIR/reports" cat > "$RUN_DIR/AGENT_BRIEF.md" <&2 <