Skip to content

Commit 285e181

Browse files
authored
bridge: adopt "Gateway bridge" terminology (phase 1) (#189)
1 parent a2dca5c commit 285e181

21 files changed

Lines changed: 48 additions & 48 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*.key
33
*.pem
44
node_modules/
5-
# Slack bridge
5+
# Gateway bridge
66
slack-bridge/node_modules/
77
slack-bridge/.env
88
.pi/

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Baudbot is a persistent, team-facing coding agent system. It connects to Slack,
1616
```text
1717
Slack
1818
19-
slack-bridge (broker pull-mode or legacy Socket Mode)
19+
Gateway bridge (slack-bridge dir; broker pull-mode or legacy Socket Mode)
2020
2121
control-agent (always-on, manages todo/routing/Slack threads)
2222
├── dev-agent(s) — ephemeral coding workers in isolated worktrees
@@ -34,7 +34,7 @@ There are two startup phases with distinct ownership:
3434
| Phase | Owner | Scope |
3535
|-------|-------|-------|
3636
| **OS boot** (`start.sh`) | Admin | Env validation, permissions, secrets, socket cleanup, launch `pi` |
37-
| **Agent boot** (`startup-pi.sh`) | Agent | Slack bridge, sentry-agent, dev-agents, session wiring |
37+
| **Agent boot** (`startup-pi.sh`) | Agent | Gateway bridge, sentry-agent, dev-agents, session wiring |
3838

3939
**Rule: `start.sh` must never spawn tmux sessions or background processes that need pi runtime state** (session UUIDs, socket paths, etc.). Those only exist after pi starts. All tmux sessions (bridge, sentry-agent, dev-agents) are owned and managed by the agent via `startup-pi.sh` or extensions. `start.sh` may only *kill* stale processes as pre-cleanup.
4040

@@ -47,7 +47,7 @@ There are two startup phases with distinct ownership:
4747
- `dev-agent/` — coding worker persona
4848
- `sentry-agent/` — incident triage persona
4949
- `pi/settings.json` — pi agent settings
50-
- `slack-bridge/`Slack integration bridges + security module
50+
- `slack-bridge/`Gateway bridge runtime + security module
5151
- `docs/` — architecture/operations/security documentation
5252
- `test/` — vitest wrappers for shell scripts, integration, and legacy Node tests
5353
- `hooks/` — git hooks (security-critical `pre-commit` protecting admin-managed files)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Live execution runs from release snapshots under `/opt/baudbot`.
3232
3333
┌─────────────────────────────────────────────────────────────────┐
3434
│ BOUNDARY 1: Access Control │
35-
Slack bridge: SLACK_ALLOWED_USERS allowlist
35+
Gateway bridge: SLACK_ALLOWED_USERS allowlist │
3636
│ Email: allowed senders + shared secret (BAUDBOT_SECRET) │
3737
│ Content wrapping: external messages get security boundaries │
3838
└──────────────────────────────┬──────────────────────────────────┘

bin/ci/smoke-agent-inference.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ else:
302302
log "status=$status session_alive=$session_alive heartbeat_active=$heartbeat_active"
303303
log "message: $message"
304304

305-
# In CI the Slack bridge has dummy tokens, so the agent correctly reports
305+
# In CI the Gateway bridge has dummy tokens, so the agent correctly reports
306306
# "degraded" (bridge auth failure). Both "healthy" and "degraded" are
307307
# acceptable — "unhealthy" means core inference/session is broken.
308308
if [[ "$status" == "unhealthy" ]]; then

bin/doctor.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,12 @@ fi
291291

292292
BRIDGE_DIR="$BAUDBOT_CURRENT_LINK/slack-bridge"
293293
if [ -d "$BRIDGE_DIR" ] && [ -f "$BRIDGE_DIR/bridge.mjs" ]; then
294-
pass "slack bridge deployed ($BRIDGE_DIR)"
294+
pass "gateway bridge deployed ($BRIDGE_DIR)"
295295
else
296296
if [ "$IS_ROOT" -ne 1 ] && { [ -d "$BAUDBOT_CURRENT_LINK" ] || [ -e "$BAUDBOT_CURRENT_LINK" ]; }; then
297-
warn "cannot verify slack bridge files as non-root (run: sudo baudbot doctor)"
297+
warn "cannot verify gateway bridge files as non-root (run: sudo baudbot doctor)"
298298
else
299-
fail "slack bridge not deployed (expected: $BRIDGE_DIR; run: sudo baudbot update)"
299+
fail "gateway bridge not deployed (expected: $BRIDGE_DIR; run: sudo baudbot update)"
300300
fi
301301
fi
302302

@@ -457,11 +457,11 @@ fi
457457
echo ""
458458
echo "Runtime health:"
459459

460-
# Slack bridge
460+
# Gateway bridge
461461
if curl -s -o /dev/null -w '%{http_code}' -X POST http://127.0.0.1:7890/send -H 'Content-Type: application/json' -d '{}' 2>/dev/null | grep -q "400"; then
462-
pass "slack bridge responding (port 7890)"
462+
pass "gateway bridge responding (port 7890)"
463463
else
464-
warn "slack bridge not responding on port 7890"
464+
warn "gateway bridge not responding on port 7890"
465465
fi
466466

467467
# Disk usage

bin/lib/bridge-restart-policy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Shared Slack bridge restart policy helpers.
2+
# Shared Gateway bridge restart policy helpers.
33

44
bb_bridge_policy_mode() {
55
if [ -n "${BAUDBOT_BRIDGE_RESTART_POLICY:-}" ]; then

bin/security-audit.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,13 +472,13 @@ echo "Network"
472472
bridge_bind=$(ss -tlnp 2>/dev/null | grep ':7890' | awk '{print $4}' | head -1 || true)
473473
if [ -n "$bridge_bind" ]; then
474474
if echo "$bridge_bind" | grep -q '127.0.0.1'; then
475-
ok "Slack bridge bound to 127.0.0.1:7890"
475+
ok "Gateway bridge bound to 127.0.0.1:7890"
476476
else
477-
finding "CRITICAL" "Slack bridge bound to $bridge_bind (not localhost!)" \
477+
finding "CRITICAL" "Gateway bridge bound to $bridge_bind (not localhost!)" \
478478
"Should bind to 127.0.0.1 only"
479479
fi
480480
else
481-
finding "INFO" "Slack bridge not running" ""
481+
finding "INFO" "Gateway bridge not running" ""
482482
fi
483483

484484
# Check firewall rules

bin/setup-firewall.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fw -A "$CHAIN" -o lo -p tcp --dport 27017 -j ACCEPT
8686
fw -A "$CHAIN" -o lo -p tcp --dport 54322 -j ACCEPT
8787

8888
# ── Infrastructure ───────────────────────────────────────────────────────
89-
# 7890: Slack bridge
89+
# 7890: Gateway bridge
9090
# 8000-9999: Wrangler (8787), Django/FastAPI (8000), inspector (9229+), MinIO (9000)
9191
# 11434: Ollama
9292
# 24678: Vite HMR websocket
@@ -144,7 +144,7 @@ echo ""
144144
fw -L "$CHAIN" -n -v --line-numbers
145145
echo ""
146146
echo "Localhost allowed: 3000-5999 (dev servers), 5432 (pg), 6006 (storybook),"
147-
echo " 6379 (redis), 7890 (bridge), 8000-9999 (wrangler/inspector),"
147+
echo " 6379 (redis), 7890 (gateway bridge), 8000-9999 (wrangler/inspector),"
148148
echo " 11434 (ollama), 24678 (vite hmr), 27017 (mongo),"
149149
echo " 54322 (pg docker), 53 (dns)"
150150
echo "Internet allowed: 22 (ssh), 53 (dns), 80/443 (http/s),"

bin/update-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ install_release_bridge_dependencies() {
265265
return 0
266266
fi
267267

268-
log "installing production Slack bridge dependencies in release"
268+
log "installing production Gateway bridge dependencies in release"
269269
rm -rf "$bridge_dir/node_modules"
270270

271271
# Resolve npm via the embedded Node runtime. update-release runs as root

docs/operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ npm run typecheck
103103

104104
## Common runbook actions
105105

106-
- verify Slack bridge responsiveness
106+
- verify Gateway bridge responsiveness
107107
- verify control/sentry/dev sessions are healthy
108108
- clean stale worktrees
109109
- prune old session logs if needed (`sudo -u baudbot_agent ~/runtime/bin/prune-session-logs.sh --days 14`)

0 commit comments

Comments
 (0)