sync: auto-sync from GURU-KALI at 2026-05-31 09:36:59

Author: Mike Swanson
Machine: GURU-KALI
Timestamp: 2026-05-31 09:36:59
This commit is contained in:
2026-05-31 09:37:00 -07:00
parent 80af6eb496
commit 973e9dbe8f
4 changed files with 49 additions and 13 deletions

View File

@@ -3,10 +3,24 @@
# Strip .local suffix if present (macOS convention)
HOSTNAME_RAW="$(hostname)"
SESSION="${HOSTNAME_RAW%.local}/claude-main"
API="http://172.16.3.30:8001"
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
MODE_FILE="${SCRIPT_DIR}/current-mode"
# Coord API endpoint — per-machine override in identity.json (same lookup as sync.sh).
# Falls back to the on-LAN default so existing machines keep working unchanged.
IDENTITY_PATH=""
for candidate in "$HOME/.claude/identity.json" "${SCRIPT_DIR}/identity.json"; do
if [ -f "$candidate" ]; then
IDENTITY_PATH="$candidate"
break
fi
done
API=""
if [ -n "$IDENTITY_PATH" ] && command -v jq >/dev/null 2>&1; then
API=$(jq -r '.coord_api // empty' "$IDENTITY_PATH" 2>/dev/null)
fi
[ -z "$API" ] && API="http://172.16.3.30:8001" # default when identity.json doesn't define coord_api
# --- Initialize mode file if missing -----------------------------------------
# The mode file is machine-local (gitignored) and required by this hook.
# If missing, create it with "general" as the default mode.