binky-control/scripts/railiance-rhythm/run-common.sh
tegwick c3ea150971
Some checks failed
Work Records / validate (push) Has been cancelled
BINKY-WP-0004 finished: retire workstation cron, Railiance rhythm timers
Complete T06 cutover: remove binky rhythm bridge crontab, install
scripts/railiance-rhythm systemd user timers on railiance01 (Europe/Berlin),
document residual continuous-intake gaps as BINKY-WP-0006. Three completion
event types verified (daily_brief, mail_intake on Railiance, weekly_review).
DEC-2026-003 marked resolved/executed.
2026-07-21 23:51:43 +02:00

37 lines
1.5 KiB
Bash
Executable file

#!/usr/bin/env bash
# Shared env for Railiance host-side Binky rhythm (BINKY-WP-0004-T06 interim).
# activity-core schedules remain the source of cadence truth; this host timer
# is the *executor* until a continuous harness poller consumes emissions
# (ISSUE_SINK_TYPE=state-hub currently writes progress only — not claimable issues).
set -euo pipefail
: "${HOME:=/home/tegwick}"
export PATH="${HOME}/.local/agent-harness/venv/bin:${HOME}/.local/bin:${PATH}"
# shellcheck disable=SC1091
source "${HOME}/.local/agent-harness/env"
export STATE_HUB_URL="${STATE_HUB_URL:-http://127.0.0.1:18000}"
export PYTHONPATH="${HOME}/agent-harness:${HOME}/llm-connect${PYTHONPATH:+:$PYTHONPATH}"
export BINKY_REPO="${BINKY_REPO:-${HOME}/binky-control}"
export LOG_DIR="${LOG_DIR:-${HOME}/.cache/binky-control/rhythm}"
mkdir -p "${LOG_DIR}"
log() { echo "$(date -Iseconds) $*" | tee -a "${LOG_DIR}/railiance-rhythm.log"; }
require_repo() {
if [[ ! -d "${BINKY_REPO}/.git" ]]; then
log "ERROR: binky-control missing at ${BINKY_REPO}; clone via forgejo-agent-harness deploy key"
exit 1
fi
git -C "${BINKY_REPO}" fetch --quiet origin main || true
git -C "${BINKY_REPO}" checkout --quiet main
git -C "${BINKY_REPO}" pull --ff-only --quiet origin main || log "WARN: pull failed (continuing on local)"
}
require_claude() {
if ! command -v claude >/dev/null 2>&1; then
log "ERROR: claude CLI not on PATH — agentic rhythm cannot run on this host"
log " residual: install Claude Code (or swap in a hosted agentic adapter) on railiance01"
exit 2
fi
}