Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/ai-brain-core / launch_from_subscription.sh |
| Date | Not specified in source |
| Repository | Janady13/ai-brain-core |
| Revision | f7275582f13ada80bfb3b1008089800ca26f4a23 |
| Branch | main |
| Path or archive member | launch_from_subscription.sh |
| Original SHA-256 | 5d03c306ec5d94bb9d338fff9966eefb4bec291cda10a07eaf0bac49f1ba63f7 |
| Git blob SHA | e231f3348f11f75a29e8857d2abb80a71500a6ba |
| Reading-copy SHA-256 | 5d03c306ec5d94bb9d338fff9966eefb4bec291cda10a07eaf0bac49f1ba63f7 |
Every recorded occurrence
These 3 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/ai-brain-core / launch_from_subscription.sh | main | f7275582f13ada80bfb3b1008089800ca26f4a23 | Open original |
| Janady13/ai-brain-core / launch_from_subscription.sh | claude/agi-architecture-diagram-01GJ7CohfKvLb77yiKpHqd6d | 365850e27004318edd582881225024026b118c2d | Open original |
| Janady13/ai-brain-core / launch_from_subscription.sh | healer-core | 0fe4cbbaa91912149f1a8e32205371ff67017268 | Open original |
Recovered source transcript
Download complete source text ↓62 lines · 1.8 KB
#!/bin/bash
# =========================================
# 🌐 AI Brain Core Subscription Loader + Auto-Healer
# Reads subscription.env, heals sub-brains, then launches
# =========================================
BASE_DIR="$HOME/Desktop/AI_Brain"
SUBS_FILE="$BASE_DIR/subscription.env"
LOG_DIR="$BASE_DIR/logs"
mkdir -p "$LOG_DIR"
if [ ! -f "$SUBS_FILE" ]; then
echo "❌ subscription.env not found in $BASE_DIR"
exit 1
fi
echo "🔎 Reading subscriptions from $SUBS_FILE..."
# Load subscription settings
set -a
source "$SUBS_FILE"
set +a
heal_and_launch() {
local NAME=$1
local PATH=$2
local VAR=$3
if [ "${!VAR}" = "enabled" ]; then
echo "🩹 Healing $NAME..."
if [ -x "$PATH/heal.sh" ]; then
"$PATH/heal.sh" >> "$LOG_DIR/${NAME}_heal.log" 2>&1
else
# Default healing if no heal.sh exists
find "$PATH" -type f -name "*.sh" -exec chmod +x {} \;
find "$PATH" -type f -print0 | xargs -0 dos2unix 2>/dev/null || true
python3 -m compileall -q "$PATH" 2>/dev/null || true
fi
echo "🚀 Launching $NAME..."
if [ -x "$PATH/launch.sh" ]; then
nohup "$PATH/launch.sh" > "$LOG_DIR/${NAME}.out" 2>&1 &
sleep 1
echo "✅ $NAME online (log: $LOG_DIR/${NAME}.out)"
else
echo "⚠️ $NAME launch.sh not found or not executable ($PATH)"
fi
else
echo "⏸️ $NAME is disabled by subscription"
fi
}
# === SUB-BRAINS ===
heal_and_launch "Healer Pro Pack" "$HOME/Desktop/healer-pro-pack" "HEALER_PRO_PACK"
heal_and_launch "AI Music Evolution" "$HOME/Desktop/AI_Music_Evolution" "AI_MUSIC_EVOLUTION"
heal_and_launch "Social Dashboard" "$HOME/Desktop/Social_Dashboard" "SOCIAL_DASHBOARD"
heal_and_launch "DevOps Agents" "$HOME/Desktop/devops_agents" "DEVOPS_AGENTS"
heal_and_launch "API Scouts" "$HOME/Desktop/api_scouts" "API_SCOUTS"
echo "✅ Subscription loader finished."