diff --git a/bin/baudbot b/bin/baudbot index c87061a..81c11f4 100755 --- a/bin/baudbot +++ b/bin/baudbot @@ -369,6 +369,7 @@ print_broker_connection_status() { local health_summary="" local connection_state="" local components_line="" + local bridge_running=0 if ! broker_mode_configured "$agent_user"; then echo -e "${BOLD}broker connection:${RESET} not configured" @@ -376,20 +377,23 @@ print_broker_connection_status() { fi if [ "$(id -u)" -eq 0 ]; then - sudo -u "$agent_user" tmux has-session -t slack-bridge 2>/dev/null || { - echo -e "${BOLD}broker connection:${RESET} disconnected (bridge tmux session not running)" - return 0 - } + if pgrep -u "$agent_user" -f "node broker-bridge.mjs" >/dev/null 2>&1; then + bridge_running=1 + fi elif [ "$(id -un)" = "$agent_user" ]; then - tmux has-session -t slack-bridge 2>/dev/null || { - echo -e "${BOLD}broker connection:${RESET} disconnected (bridge tmux session not running)" - return 0 - } + if pgrep -u "$agent_user" -f "node broker-bridge.mjs" >/dev/null 2>&1; then + bridge_running=1 + fi else echo -e "${BOLD}broker connection:${RESET} configured (run with sudo for runtime status)" return 0 fi + if [ "$bridge_running" -ne 1 ]; then + echo -e "${BOLD}broker connection:${RESET} disconnected (broker bridge process not running)" + return 0 + fi + if [ ! -r "$health_file" ]; then echo -e "${BOLD}broker connection:${RESET} starting" echo -e "${BOLD}broker health:${RESET} unavailable (waiting for bridge health file)" diff --git a/bin/doctor.sh b/bin/doctor.sh index 6356e7b..6b15840 100755 --- a/bin/doctor.sh +++ b/bin/doctor.sh @@ -67,6 +67,9 @@ fi if command -v varlock &>/dev/null || [ -x "$BAUDBOT_HOME/.varlock/bin/varlock" ]; then pass "varlock is installed" + if [ -f "$BAUDBOT_HOME/.varlock/config.json" ] && grep -q '"anonymousId"' "$BAUDBOT_HOME/.varlock/config.json"; then + warn "$BAUDBOT_HOME/.varlock/config.json includes anonymousId (export VARLOCK_TELEMETRY_DISABLED=1 or remove this field)" + fi else fail "varlock not found" fi diff --git a/start.sh b/start.sh index 97ed3f7..c47289c 100755 --- a/start.sh +++ b/start.sh @@ -16,6 +16,10 @@ cd ~ # Set PATH export PATH="$HOME/.varlock/bin:$HOME/opt/node-v22.14.0-linux-x64/bin:$PATH" +# Work around varlock telemetry config crash by opting out at runtime. +# This avoids loading anonymousId from user config and keeps startup deterministic. +export VARLOCK_TELEMETRY_DISABLED=1 + # Validate and load secrets via varlock varlock load --path ~/.config/ || { echo "❌ Environment validation failed — check ~/.config/.env against .env.schema"