Files
infrapuzzle/k8s/openclaw/setup-itguy-cron.sh
T
Moritz Graf dd60a095c6 feat(openclaw): upgrade fleet to DeepSeek V4.1 Flash 1017 and harden operations
- Upgrade OpenClaw primary model from deepseek-v4.1-flash to deepseek-v4.1-flash-1017 across all interactive agents, heartbeats, compaction, and cron jobs.
- Configure hardened OpenRouter provider routing for 1017 (deepinfra, inference-net, parasail, cloudflare) with strict fp8/bf16 quantization and tool_choice verification.
- Retain deepseek-v4.1-flash (0910), z-ai/glm-5.3-flash, and qwen3.8-flash in the automated fallback chain.
- Update ADR 0002 with 1017 economics (30% price reduction on prompt/cache, +60% intelligence benchmark increase) and a 7-point provider qualification playbook.
- Add operational scripts and tooling for session compaction, subagent vector deduplication, gateway preflight, and triage diagnostics in k8s/openclaw.
- Update DuckDB backend engine, git-sync logic, and test suites.
- Enhance Mila tracking UI components and add container build configuration.
- Sync Terraform infrastructure state for Authentik.
2026-10-18 10:54:59 +02:00

61 lines
2.7 KiB
Bash
Executable File

#!/usr/bin/env bash
# ==============================================================================
# setup-itguy-cron.sh
# Declaratively registers the IT Guy weekly health audit in OpenClaw.
# Schedule: Every Sunday at 03:00 Europe/Berlin (cron: 0 3 * * 0)
# ==============================================================================
set -euo pipefail
NAMESPACE="${NAMESPACE:-openclaw}"
POD_NAME="${POD_NAME:-openclaw-0}"
CONTAINER_NAME="${CONTAINER_NAME:-openclaw}"
JOB_NAME="itguy-weekly-health-audit"
CRON_SCHEDULE="0 3 * * 0"
TIMEZONE="Europe/Berlin"
TELEGRAM_GROUP="-1004326921510"
TELEGRAM_TOPIC="119"
echo "=== Registering IT Guy Weekly Health Audit in OpenClaw ($POD_NAME) ==="
# 1. Check if job already exists
EXISTING_ID=$(kubectl exec -n "$NAMESPACE" "$POD_NAME" -c "$CONTAINER_NAME" -- openclaw cron list 2>/dev/null | grep "$JOB_NAME" | awk '{print $1}' || true)
if [ -n "$EXISTING_ID" ]; then
echo "Found existing job with ID $EXISTING_ID. Removing for idempotent recreation..."
kubectl exec -n "$NAMESPACE" "$POD_NAME" -c "$CONTAINER_NAME" -- openclaw cron rm "$EXISTING_ID" || true
fi
# 2. Add the job
echo "Creating automation $JOB_NAME ($CRON_SCHEDULE @ $TIMEZONE)..."
MESSAGE=$(cat << 'EOF'
Führe den wöchentlichen OpenClaw System- und Log-Audit durch.
Vorgehen:
1. Führe den Audit-Befehl aus:
uv run /home/node/mop-skills/mop-skills/skills/openclaw-audit/scripts/audit_openclaw.py --since 7d --write-report --add-task --git-push
2. Analysiere die Ausgabe und korreliere eventuelle Fehler-Cluster mit den jüngsten Commits in infrapuzzle, mop-skills und knowledge-wiki.
3. Finale Antwort:
- Wenn NEUE Probleme gefunden oder Tasks in tasks/antigravity.md eingetragen wurden: Fasse die Ergebnisse kurz, präzise und lösungsorientiert zusammen (betroffene Tools, vermutete Ursache, Link zur Task-Queue) und gib diese Zusammenfassung als finale Antwort aus.
- Wenn das System gesund ist und KEINE neuen Tasks erzeugt wurden: Gib als finale Antwort exakt 'NO_REPLY' aus (intentional silence, kein Telegram-Spam).
EOF
)
kubectl exec -n "$NAMESPACE" "$POD_NAME" -c "$CONTAINER_NAME" -- openclaw cron add \
--name "$JOB_NAME" \
--description "Wöchentlicher Self-Audit der OpenClaw-Logs, Tool-Failures und Session-Transkripte mit Git-Commit-Korrelation" \
--cron "$CRON_SCHEDULE" \
--tz "$TIMEZONE" \
--agent "itguy" \
--model "openrouter/deepseek/deepseek-v4.1-flash-1017" \
--session "isolated" \
--channel "telegram" \
--to "$TELEGRAM_GROUP" \
--thread-id "$TELEGRAM_TOPIC" \
--announce \
--message "$MESSAGE"
echo "=== Automation successfully registered! ==="
kubectl exec -n "$NAMESPACE" "$POD_NAME" -c "$CONTAINER_NAME" -- openclaw cron list | grep "$JOB_NAME" || true