030a6bc793
The previous demo harness called the backend Python API directly, which didn't match what a user typing `./cli.py start <agent>` would actually see. The recording now goes through the real CLI surface: - claude-bottle.demo.json + scripts/demo-setup.sh stage a demo manifest (one bottle, FAKE_TOKEN env, one unreachable git upstream) alongside a dummy SSH identity at ~/.cache/claude-bottle-demo/. - docs/demo.tape types `./cli.py start demo`, answers the y/N preflight, and runs four bash probes via claude's `!` prefix (curl x3 + git push), so the recording shows real preflight output and real probe results. - scripts/demo.sh wraps setup -> cli.py -> teardown for human use; scripts/demo-record.sh does the same around `vhs docs/demo.tape`. - .gitignore picks up claude-bottle.json so a user's local manifest doesn't get tracked alongside .example / .demo siblings. scripts/demo_harness.py is removed -- its behavior is fully replaced by the cli.py + `!` flow. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
40 lines
1.5 KiB
Bash
Executable File
40 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Prepare the working directory to run the recorded demo via cli.py:
|
|
# - back up any existing claude-bottle.json so the user's real config
|
|
# isn't clobbered
|
|
# - install claude-bottle.demo.json as claude-bottle.json
|
|
# - create a dummy SSH identity at the path the demo manifest expects
|
|
# - pre-warm the bottle + git-gate images quietly so the recording
|
|
# doesn't spend its first 30s in BuildKit output
|
|
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
if ! docker info >/dev/null 2>&1; then
|
|
echo "demo-setup: docker daemon not reachable" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Back up an existing local manifest (untouched if absent). Stored
|
|
# alongside the manifest with a deterministic name so teardown can
|
|
# find it without state files.
|
|
if [ -f claude-bottle.json ]; then
|
|
cp claude-bottle.json claude-bottle.json.demo-backup
|
|
fi
|
|
cp claude-bottle.demo.json claude-bottle.json
|
|
|
|
# Dummy SSH identity — the git-gate validator wants a readable file at
|
|
# the IdentityFile path. Contents don't matter for the demo: the
|
|
# unreachable upstream means the gate never actually uses the key.
|
|
fake_key_dir="$HOME/.cache/claude-bottle-demo"
|
|
mkdir -p "$fake_key_dir"
|
|
chmod 700 "$fake_key_dir"
|
|
printf 'not-a-real-key\n' > "$fake_key_dir/fake-key"
|
|
chmod 600 "$fake_key_dir/fake-key"
|
|
|
|
# Build the image graph quietly so the recorded run shows only the
|
|
# bottle launch and the four `!` probes, not BuildKit progress.
|
|
docker build -q -t claude-bottle:latest . >/dev/null 2>&1 || true
|
|
docker build -q -f Dockerfile.git-gate -t claude-bottle-git-gate:latest . >/dev/null 2>&1 || true
|