-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap_megaagent.sh
More file actions
executable file
·60 lines (55 loc) · 2.77 KB
/
bootstrap_megaagent.sh
File metadata and controls
executable file
·60 lines (55 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env bash
# MIT / SPDX-License-Identifier: MIT
set -euo pipefail
IFS=$'\n\t'
# ----- options -----
TARGET="MegaAgent"; FORCE=false
while [[ $# -gt 0 ]]; do
case $1 in
-d|--dir) TARGET="$2"; shift 2 ;;
-f|--force) FORCE=true; shift ;;
-h|--help) echo "usage: $0 [-d DIR] [-f]"; exit 0 ;;
*) shift ;;
esac
done
# ----- lists -----
DIRS=(scripts src src/config src/models src/agents src/templates src/services src/utils
tests tests/test_agents tests/test_models tests/test_services tests/test_templates tests/test_utils
docs monitoring monitoring/grafana monitoring/alerts plugins
plugins/ai_agents plugins/scrapers plugins/revenue_sources plugins/language_models)
FILES=(scripts/init_db.py scripts/run_agent.py scripts/deploy.sh scripts/setup_local.sh
src/__init__.py src/config/__init__.py src/config/settings.py src/config/database.py
src/models/__init__.py src/models/business.py src/models/product.py src/models/revenue.py
src/agents/__init__.py src/agents/economic_brain.py src/agents/builder.py
src/agents/monetizer.py src/agents/distributor.py src/agents/revenue_tracker.py
src/agents/reflector.py src/agents/orchestrator.py src/agents/agent_generator.py
src/agents/vertical_agent.py src/templates/__init__.py
src/templates/agent_template_registry.py src/services/__init__.py
src/services/api_client.py src/services/deployment.py src/services/monitoring.py
src/services/notifications.py src/utils/__init__.py src/utils/helpers.py
src/utils/logging.py src/utils/validators.py tests/__init__.py
tests/test_agents/test_economic_brain.py tests/test_agents/test_builder.py
tests/test_agents/test_monetizer.py tests/test_agents/test_distributor.py
tests/test_agents/test_reflector.py tests/test_agents/test_orchestrator.py
docs/EXECUTION_GUIDE.md docs/ARCHITECTURE.md docs/API_REFERENCE.md
docs/AGENT_TEMPLATES.md docs/STRATEGY_PLAYBOOK.md monitoring/prometheus.yml
monitoring/grafana/dashboards.json monitoring/alerts/rules.yml)
# ----- helpers -----
py_stub(){ printf "# SPDX-License-Identifier: MIT\n\"\"\"%s\n\nAuto-generated stub.\"\"\"\n" "$1"; }
txt_stub(){ printf "# %s\n\n_TODO_\n" "$1"; }
write() {
local f=$1 ext=${f##*.} path="$TARGET/$f"
[[ -e $path && $FORCE == false ]] && { echo "skip $f"; return; }
case $ext in
py) py_stub "$f" >"$path" ;;
sh) echo -e "#!/usr/bin/env bash\n# $f\nset -euo pipefail\necho TODO" >"$path"; chmod +x "$path" ;;
yml|yaml|json|md) txt_stub "$f" >"$path" ;;
*) touch "$path" ;;
esac
echo "write $f"
}
# ----- create tree -----
echo "📁 Scaffolding into: $TARGET"
for d in "${DIRS[@]}"; do mkdir -p "$TARGET/$d"; done
for f in "${FILES[@]}"; do write "$f"; done
echo "✅ Bootstrap complete."