bus-live-testlisted
Install: claude install-skill ahilles107/gravity
# Live bus / cross-session communication test
Runs a real `gravityd` on a throwaway home and exercises bot-to-bot traffic
end to end. Two modes, cheapest first:
- **Synthetic** (`runtime = "double"`): no Claude sessions; you act as the
bots by calling the MCP bus with their bearer tokens. Deterministic, free,
and the only mode where you can force every refusal on demand. Use for
verifying daemon *rules*.
- **Real** (`runtime = "pty"`): the daemon spawns actual `claude` sessions —
**billed against the user's account**. Use only with explicit user consent,
and only to observe *behavior*: do real bots obey the prompt contracts,
brief delegations well, use artifacts, stay silent after a `done`.
## Shared setup
```bash
cargo build -p gravityd
umask 077
BUS_HOME=$(mktemp -d "${TMPDIR:-/tmp}/gravity-bus.XXXXXX")
BUS_HOME=$(cd "$BUS_HOME" && pwd -P)
cat > "$BUS_HOME/gravityd.toml" <<EOF
home = "$BUS_HOME"
bind = ["127.0.0.1"]
port = 49666 # verify this test port is free first
negotiate_port = false
runtime = "double" # or "pty" for real mode
supervision_interval_ms = 1000
[scheduler]
tick_interval_ms = 2000 # fast expiry sweeps; default is 30s
EOF
./target/debug/gravityd --config "$BUS_HOME/gravityd.toml" > "$BUS_HOME/gravityd.log" 2>&1 &
BUS_DAEMON_PID=$!
```
Wait for the published `$BUS_HOME/gravityd.port`, verify it is 49666, and
check `curl --fail http://127.0.0.1:49666/health`. Confirm the recorded PID
is still running; stop on st