chore(agent): adicionar verificacao diaria do bun com bun upgrade --stable

This commit is contained in:
Luiz Silva 2026-10-30 11:22:59 -03:00
parent 2e6db7dda6
commit 219cca8b06
12 changed files with 129 additions and 46 deletions

View file

@ -75,6 +75,24 @@ if [ -n "$HOST_MODULO_ID" ] && [ -d "$ROOT_DIR/.agent/rules" ]; then
fi
fi
# Verificar runtime Bun e atualização diária (bun upgrade --stable)
export PATH="$HOME/.bun/bin:$PATH"
if command -v bun >/dev/null 2>&1; then
BUN_STAMP_FILE="/tmp/.antigravity_bun_upgrade_date"
TODAY=$(date +%Y-%m-%d)
LAST_BUN_CHECK=$(cat "$BUN_STAMP_FILE" 2>/dev/null || true)
if [ "$LAST_BUN_CHECK" != "$TODAY" ]; then
if bun upgrade --stable >/dev/null 2>&1; then
echo "$TODAY" > "$BUN_STAMP_FILE" 2>/dev/null || true
fi
fi
BUN_VER=$(bun --version 2>/dev/null || true)
echo -e " ${VERDE}✓${RESET} Runtime Bun verificado (${NEGRITO}v${BUN_VER}${RESET} — check diário: ${NEGRITO}bun upgrade --stable${RESET})."
else
echo -e " ${AMARELO}⚠${RESET} Runtime Bun não encontrado no PATH."
TOTAL_AVISOS=$((TOTAL_AVISOS + 1))
fi
# 1. Validar memorias-ia/modulo.yml (Pilar 6 - Identidade)
MODULO_YML="$ROOT_DIR/memorias-ia/modulo.yml"
echo -e "\n${NEGRITO}[1/6] Identidade do Módulo (memorias-ia/modulo.yml)${RESET}"