binky-control/scripts/railiance-rhythm/run-mail.sh
tegwick 6e6da53c5d
All checks were successful
Work Records / validate (push) Successful in 13s
BINKY-WP-0006: wire mail-triage path and mark T01–T04 done
Document live llm-connect smoke + host port-forward; ensure git identity
and LLM_CONNECT_URL defaults for railiance timers.
2026-07-22 00:07:46 +02:00

30 lines
1.1 KiB
Bash
Executable file

#!/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
ensure_git_identity
require_llm_connect
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
# Triage must use llm-connect (OpenRouter), not a host coding agent.
# Until agent-harness mail-triage exists (BINKY-WP-0006), scan-only is OK.
if agent-harness mail-triage --help >/dev/null 2>&1; then
log "START mail-triage (llm-connect)"
agent-harness mail-triage \
--target-repo "${BINKY_REPO}" \
2>&1 | tee -a "${LOG_DIR}/mail.log" || log "WARN: mail-triage failed"
else
log "SKIP mail-triage: command not available yet (BINKY-WP-0006); scan-only"
fi
log "END mail-intake"