/ bin / activate-attention
activate-attention
 1  #!/bin/bash
 2  #
 3  # Activate the Sovereign OS Attention System
 4  #
 5  # This script:
 6  # 1. Installs the launchd daemon (if not already)
 7  # 2. Starts the daemon
 8  # 3. Shows current status
 9  #
10  
11  set -e
12  
13  SOVEREIGN_OS="/Users/rcerf/repos/Sovereign_OS"
14  PLIST="$SOVEREIGN_OS/config/com.sovereign.attention-daemon.plist"
15  LAUNCH_AGENTS="$HOME/Library/LaunchAgents"
16  DAEMON_NAME="com.sovereign.attention-daemon"
17  
18  echo "=== Activating Sovereign OS Attention System ==="
19  echo
20  
21  # Create LaunchAgents directory if needed
22  mkdir -p "$LAUNCH_AGENTS"
23  
24  # Check if already installed
25  if [ -f "$LAUNCH_AGENTS/$DAEMON_NAME.plist" ]; then
26      echo "[1/3] Daemon already installed"
27  else
28      echo "[1/3] Installing daemon..."
29      cp "$PLIST" "$LAUNCH_AGENTS/"
30      echo "      Copied plist to $LAUNCH_AGENTS/"
31  fi
32  
33  # Load/reload the daemon
34  echo "[2/3] Starting daemon..."
35  launchctl unload "$LAUNCH_AGENTS/$DAEMON_NAME.plist" 2>/dev/null || true
36  launchctl load "$LAUNCH_AGENTS/$DAEMON_NAME.plist"
37  echo "      Daemon loaded"
38  
39  # Show status
40  echo "[3/3] Checking status..."
41  sleep 1  # Give it a moment to start
42  
43  if launchctl list | grep -q "$DAEMON_NAME"; then
44      echo "      Daemon is running"
45  else
46      echo "      WARNING: Daemon may not be running"
47  fi
48  
49  echo
50  echo "=== Attention System Activated ==="
51  echo
52  echo "Commands:"
53  echo "  attention-daemon --status    # Check current state"
54  echo "  tail -f ~/repos/Sovereign_Estate/logs/attention-daemon.log  # Watch logs"
55  echo "  launchctl stop $DAEMON_NAME  # Stop daemon"
56  echo "  launchctl start $DAEMON_NAME # Start daemon"
57  echo
58  echo "The system is now:"
59  echo "  - Watching session streams for cross-session convergence"
60  echo "  - Detecting coherence risk between sessions"
61  echo "  - Tracking attention trajectory"
62  echo "  - Detecting aha moments"
63  echo
64  echo "\"Attention is all you need\""