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:
@@ -9,7 +9,22 @@ REPO_ROOT="${CLAUDETOOLS_ROOT:-/d/claudetools}"
|
|||||||
[ -d "$REPO_ROOT" ] || REPO_ROOT="$(git -C "$(dirname "$0")" rev-parse --show-toplevel 2>/dev/null)"
|
[ -d "$REPO_ROOT" ] || REPO_ROOT="$(git -C "$(dirname "$0")" rev-parse --show-toplevel 2>/dev/null)"
|
||||||
VAULT="$REPO_ROOT/.claude/scripts/vault.sh"
|
VAULT="$REPO_ROOT/.claude/scripts/vault.sh"
|
||||||
RMM="http://172.16.3.30:3001"
|
RMM="http://172.16.3.30:3001"
|
||||||
COORD="http://172.16.3.30:8001/api/coord"
|
|
||||||
|
# Coord API base — read from identity.json (per-machine override) and fall back
|
||||||
|
# to the on-LAN default for backward compat. Same lookup pattern as sync.sh.
|
||||||
|
IDENTITY_PATH=""
|
||||||
|
for candidate in "$HOME/.claude/identity.json" "$REPO_ROOT/.claude/identity.json"; do
|
||||||
|
if [ -f "$candidate" ]; then
|
||||||
|
IDENTITY_PATH="$candidate"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
COORD_BASE=""
|
||||||
|
if [ -n "$IDENTITY_PATH" ] && command -v jq >/dev/null 2>&1; then
|
||||||
|
COORD_BASE=$(jq -r '.coord_api // empty' "$IDENTITY_PATH" 2>/dev/null)
|
||||||
|
fi
|
||||||
|
[ -z "$COORD_BASE" ] && COORD_BASE="http://172.16.3.30:8001" # default when identity.json doesn't define coord_api
|
||||||
|
COORD="${COORD_BASE}/api/coord"
|
||||||
KSTEEN="ee3c6aea-e9cc-4d2f-9e79-a38dd0eb129e"
|
KSTEEN="ee3c6aea-e9cc-4d2f-9e79-a38dd0eb129e"
|
||||||
VERIFY_PS="$REPO_ROOT/.claude/scripts/ksteen-smartbadge-verify.ps1"
|
VERIFY_PS="$REPO_ROOT/.claude/scripts/ksteen-smartbadge-verify.ps1"
|
||||||
LOG="$REPO_ROOT/.claude/logs/ksteen-smartbadge.log"
|
LOG="$REPO_ROOT/.claude/logs/ksteen-smartbadge.log"
|
||||||
|
|||||||
@@ -3,10 +3,24 @@
|
|||||||
# Strip .local suffix if present (macOS convention)
|
# Strip .local suffix if present (macOS convention)
|
||||||
HOSTNAME_RAW="$(hostname)"
|
HOSTNAME_RAW="$(hostname)"
|
||||||
SESSION="${HOSTNAME_RAW%.local}/claude-main"
|
SESSION="${HOSTNAME_RAW%.local}/claude-main"
|
||||||
API="http://172.16.3.30:8001"
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
MODE_FILE="${SCRIPT_DIR}/current-mode"
|
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 -----------------------------------------
|
# --- Initialize mode file if missing -----------------------------------------
|
||||||
# The mode file is machine-local (gitignored) and required by this hook.
|
# The mode file is machine-local (gitignored) and required by this hook.
|
||||||
# If missing, create it with "general" as the default mode.
|
# If missing, create it with "general" as the default mode.
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ case "$(uname -m)" in
|
|||||||
esac
|
esac
|
||||||
echo " Architecture: $ARCH"
|
echo " Architecture: $ARCH"
|
||||||
|
|
||||||
|
# Coord API default — only used if identity.json doesn't already define one.
|
||||||
|
# The on-LAN address works for all on-network/VPN/Tailscale-routed machines today;
|
||||||
|
# off-network boxes should edit identity.json to point at a reachable endpoint.
|
||||||
|
COORD_API_DEFAULT="http://172.16.3.30:8001"
|
||||||
|
|
||||||
# Detect Ollama endpoint
|
# Detect Ollama endpoint
|
||||||
OLLAMA_ENDPOINT=""
|
OLLAMA_ENDPOINT=""
|
||||||
OLLAMA_FALLBACK="http://100.101.122.4:11434" # Beast via Tailscale
|
OLLAMA_FALLBACK="http://100.101.122.4:11434" # Beast via Tailscale
|
||||||
@@ -99,6 +104,10 @@ if 'platform' not in data:
|
|||||||
if 'architecture' not in data:
|
if 'architecture' not in data:
|
||||||
data['architecture'] = '$ARCH'
|
data['architecture'] = '$ARCH'
|
||||||
|
|
||||||
|
# Coord API endpoint — populate only if absent so existing machines keep their override.
|
||||||
|
if 'coord_api' not in data:
|
||||||
|
data['coord_api'] = '$COORD_API_DEFAULT'
|
||||||
|
|
||||||
data['last_updated'] = '$(date -u +"%Y-%m-%dT%H:%M:%SZ")'
|
data['last_updated'] = '$(date -u +"%Y-%m-%dT%H:%M:%SZ")'
|
||||||
|
|
||||||
with open('$IDENTITY_PATH_PY', 'w') as f:
|
with open('$IDENTITY_PATH_PY', 'w') as f:
|
||||||
@@ -116,5 +125,6 @@ echo " ollama.fallback: $OLLAMA_FALLBACK"
|
|||||||
echo " ollama.prose_model: $PROSE_MODEL"
|
echo " ollama.prose_model: $PROSE_MODEL"
|
||||||
echo " platform: $PLATFORM"
|
echo " platform: $PLATFORM"
|
||||||
echo " architecture: $ARCH"
|
echo " architecture: $ARCH"
|
||||||
|
echo " coord_api: (default $COORD_API_DEFAULT if not already set)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Review: cat $IDENTITY_PATH"
|
echo "Review: cat $IDENTITY_PATH"
|
||||||
|
|||||||
@@ -97,16 +97,6 @@ if [ -z "$REPO_ROOT" ]; then
|
|||||||
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || true)
|
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || true)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Last resort: hardcoded paths (legacy machines)
|
|
||||||
if [ -z "$REPO_ROOT" ]; then
|
|
||||||
for candidate in "$HOME/ClaudeTools" "/d/ClaudeTools" "D:/ClaudeTools" "/d/claudetools" "D:/claudetools" "C:/claudetools" "/c/claudetools"; do
|
|
||||||
if [ -d "$candidate/.git" ]; then
|
|
||||||
REPO_ROOT="$candidate"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$REPO_ROOT" ] || [ ! -d "$REPO_ROOT/.git" ]; then
|
if [ -z "$REPO_ROOT" ] || [ ! -d "$REPO_ROOT/.git" ]; then
|
||||||
echo -e "${RED}[ERROR]${NC} Cannot locate ClaudeTools repo. Add 'claudetools_root' to identity.json"
|
echo -e "${RED}[ERROR]${NC} Cannot locate ClaudeTools repo. Add 'claudetools_root' to identity.json"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -521,7 +511,14 @@ fi
|
|||||||
echo ""
|
echo ""
|
||||||
echo "=== Phase 7: Pending To-Dos ==="
|
echo "=== Phase 7: Pending To-Dos ==="
|
||||||
|
|
||||||
COORD_API="http://172.16.3.30:8001"
|
# Coord API endpoint — per-machine override in identity.json so off-network/VPN/
|
||||||
|
# Tailscale boxes can point elsewhere. Default to the on-LAN address for backward
|
||||||
|
# compat with existing machines that haven't been re-migrated yet.
|
||||||
|
COORD_API=""
|
||||||
|
if [ -f ".claude/identity.json" ]; then
|
||||||
|
COORD_API=$($PYTHON -c "import json; d=json.load(open('.claude/identity.json')); print(d.get('coord_api',''))" 2>/dev/null || echo "")
|
||||||
|
fi
|
||||||
|
[ -z "$COORD_API" ] && COORD_API="http://172.16.3.30:8001" # default when identity.json doesn't define coord_api
|
||||||
TODO_USER=""
|
TODO_USER=""
|
||||||
TODO_MACHINE="$MACHINE"
|
TODO_MACHINE="$MACHINE"
|
||||||
if [ -f ".claude/identity.json" ]; then
|
if [ -f ".claude/identity.json" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user