2026-07-21 23:51:43 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# Monday 09:37 Europe/Berlin — deterministic mail-scan then optional triage session.
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
# shellcheck disable=SC1091
|
|
|
|
|
source "$(dirname "$0")/run-common.sh"
|
|
|
|
|
require_repo
|
2026-07-22 00:07:46 +02:00
|
|
|
ensure_git_identity
|
|
|
|
|
require_llm_connect
|
2026-07-21 23:51:43 +02:00
|
|
|
log "START mail-scan"
|
|
|
|
|
# Deterministic pre-step (no Claude) — uses AppRole + OpenBao mail lane.
|
|
|
|
|
agent-harness mail-scan \
|
|
|
|
|
--target-repo "${BINKY_REPO}" \
|
|
|
|
|
--config "${BINKY_REPO}/integrations/mailbox-binky-company.yml" \
|
|
|
|
|
2>&1 | tee -a "${LOG_DIR}/mail.log"
|
|
|
|
|
scan_rc=${PIPESTATUS[0]}
|
|
|
|
|
log "mail-scan rc=${scan_rc}"
|
|
|
|
|
if [[ "${scan_rc}" -ne 0 ]]; then
|
|
|
|
|
exit "${scan_rc}"
|
|
|
|
|
fi
|
2026-07-22 10:28:11 +02:00
|
|
|
# Triage uses llm-connect (OpenRouter), never a host coding agent.
|
|
|
|
|
log "START mail-triage (llm-connect)"
|
|
|
|
|
agent-harness mail-triage \
|
|
|
|
|
--target-repo "${BINKY_REPO}" \
|
|
|
|
|
2>&1 | tee -a "${LOG_DIR}/mail.log"
|
|
|
|
|
triage_rc=${PIPESTATUS[0]}
|
|
|
|
|
log "mail-triage rc=${triage_rc}"
|
|
|
|
|
if [[ "${triage_rc}" -ne 0 ]]; then
|
|
|
|
|
exit "${triage_rc}"
|
2026-07-21 23:51:43 +02:00
|
|
|
fi
|
|
|
|
|
log "END mail-intake"
|