Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/complete-agi-core / unified/start-unified.sh |
| Date | Not specified in source |
| Repository | Janady13/complete-agi-core |
| Revision | 223c58f8857eb60c4d020e6d6feacdbfb482d71d |
| Branch | main |
| Path or archive member | unified/start-unified.sh |
| Original SHA-256 | d587e405242d3b10366d87e07a5a05e187b5a3ea415189d39506523e031bdda8 |
| Git blob SHA | 53ea0d75886ccbf5b5d6d7608bc51b8adbb0a79e |
| Reading-copy SHA-256 | d587e405242d3b10366d87e07a5a05e187b5a3ea415189d39506523e031bdda8 |
Every recorded occurrence
These 2 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/complete-agi-core / unified/start-unified.sh | main | 223c58f8857eb60c4d020e6d6feacdbfb482d71d | Open original |
| Janady13/complete-agi-core / unified/start-unified.sh | claude/improve-math-logic-ehIW1 | 33aa84f2aa61cedbe010240ada7f4efbdfe795a7 | Open original |
Recovered source transcript
Download complete source text ↓124 lines · 3.8 KB
#!/bin/bash
# =============================================================================
# UNIFIED AGI CORE - MASTER STARTUP SCRIPT
# Launches all components of the unified AGI system
# =============================================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LOG_DIR="${SCRIPT_DIR}/logs"
PID_DIR="${SCRIPT_DIR}/pids"
mkdir -p "$LOG_DIR" "$PID_DIR" "${SCRIPT_DIR}/state" "${SCRIPT_DIR}/data"
echo "=============================================="
echo " UNIFIED AGI CORE v3.0 - SYNTHESIS"
echo "=============================================="
echo "Starting all subsystems..."
echo ""
# Cleanup function
cleanup() {
echo ""
echo "[UNIFIED] Shutting down all subsystems..."
for pidfile in "${PID_DIR}"/*.pid; do
if [ -f "$pidfile" ]; then
pid=$(cat "$pidfile")
name=$(basename "$pidfile" .pid)
if kill -0 "$pid" 2>/dev/null; then
echo "[UNIFIED] Stopping $name (PID: $pid)"
kill "$pid" 2>/dev/null || true
fi
rm -f "$pidfile"
fi
done
echo "[UNIFIED] Shutdown complete."
exit 0
}
trap cleanup SIGTERM SIGINT SIGHUP
# Start a daemon
start_daemon() {
local name="$1"
local script="$2"
local log="${LOG_DIR}/${name}.log"
local pid="${PID_DIR}/${name}.pid"
if [ -f "$script" ]; then
chmod +x "$script"
echo "[UNIFIED] Starting $name..."
nohup bash "$script" daemon >> "$log" 2>&1 &
echo $! > "$pid"
echo "[UNIFIED] -> $name started (PID: $(cat $pid))"
sleep 1
else
echo "[UNIFIED] Warning: $script not found, skipping $name"
fi
}
# Start all subsystems
echo "[UNIFIED] === Phase 1: Core Orchestrator ==="
start_daemon "orchestrator" "${SCRIPT_DIR}/core/unified-orchestrator.sh"
echo ""
echo "[UNIFIED] === Phase 2: Agent Pantheon ==="
start_daemon "pantheon" "${SCRIPT_DIR}/agents/pantheon-daemon.sh"
echo ""
echo "[UNIFIED] === Phase 3: Federation Mesh ==="
start_daemon "federation" "${SCRIPT_DIR}/federation/federation-mesh.sh"
echo ""
echo "[UNIFIED] === Phase 4: Autonomous Learner ==="
start_daemon "learner" "${SCRIPT_DIR}/knowledge/autonomous-learner.sh"
echo ""
echo "=============================================="
echo " UNIFIED AGI CORE - ONLINE"
echo "=============================================="
echo ""
echo "Running subsystems:"
for pidfile in "${PID_DIR}"/*.pid; do
if [ -f "$pidfile" ]; then
name=$(basename "$pidfile" .pid)
pid=$(cat "$pidfile")
if kill -0 "$pid" 2>/dev/null; then
echo " [ACTIVE] $name (PID: $pid)"
else
echo " [FAILED] $name"
fi
fi
done
echo ""
echo "Logs: ${LOG_DIR}"
echo "State: ${SCRIPT_DIR}/state"
echo "Data: ${SCRIPT_DIR}/data"
echo ""
echo "Press Ctrl+C to shutdown all subsystems"
echo "=============================================="
# Keep running and monitor
while true; do
# Check subsystem health
for pidfile in "${PID_DIR}"/*.pid; do
if [ -f "$pidfile" ]; then
pid=$(cat "$pidfile")
name=$(basename "$pidfile" .pid)
if ! kill -0 "$pid" 2>/dev/null; then
echo "[UNIFIED] Warning: $name (PID: $pid) died, restarting..."
case "$name" in
orchestrator) start_daemon "orchestrator" "${SCRIPT_DIR}/core/unified-orchestrator.sh" ;;
pantheon) start_daemon "pantheon" "${SCRIPT_DIR}/agents/pantheon-daemon.sh" ;;
federation) start_daemon "federation" "${SCRIPT_DIR}/federation/federation-mesh.sh" ;;
learner) start_daemon "learner" "${SCRIPT_DIR}/knowledge/autonomous-learner.sh" ;;
esac
fi
fi
done
sleep 30
done