Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.
Shell agent-teamsai-agentai-automationanthropicautonomous-agentawsbusiness-operationsclaudeclaude-codeclaude-code-plugindevopsecommerceinbox-zeroklaviyomarketingmcpmorning-briefingpr-automationshopifyterminal
fix(hooks): stop advising a local WhatsApp bridge restart (#963)
Aurora Capital9f8d9a57cbac
diff --git a/claude-ops/bin/ops-pretool-wacli-health b/claude-ops/bin/ops-pretool-wacli-healthindex 04ac7d83..48420d51 100755--- a/claude-ops/bin/ops-pretool-wacli-health+++ b/claude-ops/bin/ops-pretool-wacli-health@@ -15,7 +15,7 @@ HEALTH_FILE="$HOME/.wacli/.health"if [[ -f "$HEALTH_FILE" ]]; thenSTATUS=$(grep "^status=" "$HEALTH_FILE" | cut -d= -f2)if [[ "$STATUS" == "needs_auth" ]] || [[ "$STATUS" == "needs_reauth" ]]; then- echo "⚠ WhatsApp bridge may not be running. Check: launchctl list com.${USER}.whatsapp-bridge"+ echo "⚠ WhatsApp may need re-auth. It runs on ai-hub only (both numbers); this machine is a client. Never start or pair a local bridge." >&2# Don't block — just warn. The skill's own health check will handle it.fifidiff --git a/claude-ops/bin/ops-pretool-whatsapp-bridge-health b/claude-ops/bin/ops-pretool-whatsapp-bridge-healthindex 0fd56617..a522ec36 100755--- a/claude-ops/bin/ops-pretool-whatsapp-bridge-health+++ b/claude-ops/bin/ops-pretool-whatsapp-bridge-health@@ -1,6 +1,15 @@#!/usr/bin/env bash-# PreToolUse hook: fast whatsapp-bridge health check (backgrounded to avoid blocking)+# PreToolUse hook: fast WhatsApp reachability check (backgrounded to avoid blocking)# Event JSON arrives on stdin (Claude + Grok). Optional argv kept for old callers.+#+# WhatsApp runs on the always-on host (ai-hub), for both numbers. This machine is+# only ever a CLIENT: the MCP reaches the remote bridge through local reverse+# proxies. There is no local bridge and there must never be one -- starting or+# pairing a bridge here hijacks the remote session and logs it out.+#+# So this hook checks the CLIENT LEGS, never a local bridge, and never advises+# starting one. A remote read failure should fail loudly, not fall back to+# anything local. Advisory only: it always exits 0 and never blocks a tool call.set -eif [[ -n "${1:-}" ]]; thenINPUT="$1"@@ -9,14 +18,28 @@ elsefiecho "$INPUT" | grep -q "whatsapp" || exit 0-# Background the slow checks (lsof, launchctl) so this hook returns instantly.-# If bridge is down, the skill's own health check will catch it.+# Local client proxy ports, overridable for hosts wired differently.+WA_CLIENT_PORT_NL="${OPS_WA_CLIENT_PORT_NL:-8483}"+WA_CLIENT_PORT_US="${OPS_WA_CLIENT_PORT_US:-8482}"++# Background the slow checks (lsof) so this hook returns instantly.+# If a leg is down, the skill's own health check will catch it too.(sleep 0.1- if ! (lsof -i :8080 2>/dev/null | grep -q LISTEN); then+ down=""+ for entry in "NL:${WA_CLIENT_PORT_NL}" "US:${WA_CLIENT_PORT_US}"; do+ label="${entry%%:*}"+ port="${entry##*:}"+ if ! lsof -nP -iTCP:"$port" -sTCP:LISTEN >/dev/null 2>&1; then+ down="${down} ${label}(:${port})"+ fi+ done+ if [[ -n "$down" ]]; thencat <<EOF >&2-⚠ WhatsApp bridge not on :8080. Restart:- launchctl kickstart -k gui/$(id -u)/com.${USER}.whatsapp-bridge+⚠ WhatsApp client leg down:${down}+ WhatsApp runs on ai-hub only (both numbers); this machine is just a client.+ Do NOT start, pair or kickstart a local bridge -- that hijacks the hub session.+ Check the local reverse proxy and the tunnel to the hub, then retry.EOFfi) &