add interactive setup wizard for Echo Core onboarding
10-step bash wizard (setup.sh) that guides through: prerequisites check, venv setup, bot identity, Discord/Telegram/WhatsApp bridge configuration, config.json merge, systemd service installation, and health checks. Idempotent — safe to re-run, preserves existing config and secrets. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
36
HANDOFF.md
36
HANDOFF.md
@@ -1,12 +1,12 @@
|
||||
# Echo Core — Session Handoff
|
||||
|
||||
**Data:** 2026-02-13
|
||||
**Data:** 2026-02-14
|
||||
**Proiect:** ~/echo-core/ (inlocuire completa OpenClaw)
|
||||
**Plan complet:** ~/.claude/plans/enumerated-noodling-floyd.md
|
||||
|
||||
---
|
||||
|
||||
## Status curent: Stage 13 — COMPLET. Toate stages finalizate.
|
||||
## Status curent: Stage 13 + Setup Wizard — COMPLET. Toate stages finalizate.
|
||||
|
||||
### Stages completate (toate committed):
|
||||
- **Stage 1** (f2973aa): Project Bootstrap — structura, git, venv, copiere fisiere din clawd
|
||||
@@ -24,6 +24,7 @@
|
||||
- **Stage 12** (2d8e56d): Telegram Bot — python-telegram-bot, commands, inline keyboards, concurrent with Discord
|
||||
- **Stage 13** (80502b7 + 624eb09): WhatsApp Bridge — Baileys Node.js bridge + Python adapter, polling, group chat, CLI commands
|
||||
- **Systemd** (6454f0f): Echo Core + WhatsApp bridge as systemd user services, CLI uses systemctl
|
||||
- **Setup Wizard** (setup.sh): Interactive onboarding — 10-step wizard, idempotent, bridges Discord/Telegram/WhatsApp
|
||||
|
||||
### Total teste: 440 PASS (zero failures)
|
||||
|
||||
@@ -90,6 +91,36 @@ echo restart
|
||||
|
||||
---
|
||||
|
||||
## Setup Wizard (`setup.sh`):
|
||||
|
||||
Script interactiv de onboarding pentru instalari noi sau reconfigurare. 10 pasi:
|
||||
|
||||
| Step | Ce face |
|
||||
|------|---------|
|
||||
| 0. Welcome | ASCII art, detecteaza setup anterior (`.setup-meta.json`) |
|
||||
| 1. Prerequisites | Python 3.12+ (hard), pip (hard), Claude CLI (hard), Node 22+ / curl / systemctl (warn) |
|
||||
| 2. Venv | Creeaza `.venv/`, instaleaza `requirements.txt` cu spinner |
|
||||
| 3. Identity | Bot name, owner Discord ID, admin IDs — citeste defaults din config existent |
|
||||
| 4. Discord | Token input (masked), valideaza via `/users/@me`, stocheaza in keyring |
|
||||
| 5. Telegram | Token via BotFather, valideaza via `/getMe`, stocheaza in keyring |
|
||||
| 6. WhatsApp | Auto-skip daca lipseste Node.js, `npm install`, telefon owner, instructiuni QR |
|
||||
| 7. Config | Merge inteligent in `config.json` via Python, backup automat cu timestamp |
|
||||
| 8. Systemd | Genereaza + enable `echo-core.service` + `echo-whatsapp-bridge.service` |
|
||||
| 9. Health | Valideaza JSON, secrets keyring, dirs writable, Claude CLI, service status |
|
||||
| 10. Summary | Tabel cu checkmarks, scrie `.setup-meta.json`, next steps |
|
||||
|
||||
**Idempotent:** re-run safe, intreaba "Replace?" (default N) pentru tot ce exista. Backup automat config.json.
|
||||
|
||||
```bash
|
||||
# Fresh install
|
||||
cd ~/echo-core && bash setup.sh
|
||||
|
||||
# Re-run (preserva config + secrets existente)
|
||||
bash setup.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Fisiere cheie:
|
||||
|
||||
| Fisier | Descriere |
|
||||
@@ -107,6 +138,7 @@ echo restart
|
||||
| `src/adapters/whatsapp.py` | WhatsApp adapter — polls Node.js bridge |
|
||||
| `bridge/whatsapp/index.js` | Node.js WhatsApp bridge — Baileys + Express |
|
||||
| `cli.py` | CLI: echo status/doctor/restart/logs/secrets/cron/heartbeat/memory/whatsapp |
|
||||
| `setup.sh` | Interactive setup wizard — 10-step onboarding, idempotent |
|
||||
| `config.json` | Runtime config (channels, telegram_channels, whatsapp, admins, models) |
|
||||
|
||||
## Decizii arhitecturale:
|
||||
|
||||
Reference in New Issue
Block a user