feat: unified first-run flow — merge wizard + gateway install (IUH-M03) (#433)
This commit was merged in pull request #433.
This commit is contained in:
@@ -423,15 +423,18 @@ if [[ "$FLAG_CHECK" == "false" ]]; then
|
||||
if [[ ! -f "$MOSAIC_HOME/SOUL.md" ]]; then
|
||||
echo ""
|
||||
if [[ "$FLAG_NO_AUTO_LAUNCH" == "false" ]] && [[ -t 0 ]] && [[ -t 1 ]]; then
|
||||
# Interactive TTY and auto-launch not suppressed: run wizard + gateway install
|
||||
info "First install detected — launching setup wizard…"
|
||||
# Interactive TTY and auto-launch not suppressed: run the unified wizard.
|
||||
# `mosaic wizard` now runs the full first-run flow end-to-end: identity
|
||||
# setup → runtimes → hooks preview → skills → finalize → gateway
|
||||
# config → admin bootstrap. No second call needed.
|
||||
info "First install detected — launching unified setup wizard…"
|
||||
echo ""
|
||||
|
||||
MOSAIC_BIN="$PREFIX/bin/mosaic"
|
||||
|
||||
if ! command -v "$MOSAIC_BIN" &>/dev/null && ! command -v mosaic &>/dev/null; then
|
||||
warn "mosaic binary not found on PATH — skipping auto-launch."
|
||||
warn "Add $PREFIX/bin to PATH and run: mosaic wizard && mosaic gateway install"
|
||||
warn "Add $PREFIX/bin to PATH and run: mosaic wizard"
|
||||
else
|
||||
# Prefer the absolute path from the prefix we just installed to
|
||||
MOSAIC_CMD="mosaic"
|
||||
@@ -439,28 +442,19 @@ if [[ "$FLAG_CHECK" == "false" ]]; then
|
||||
MOSAIC_CMD="$MOSAIC_BIN"
|
||||
fi
|
||||
|
||||
# Run wizard; if it fails we still try gateway install (best effort)
|
||||
if "$MOSAIC_CMD" wizard; then
|
||||
ok "Wizard complete."
|
||||
else
|
||||
warn "Wizard exited non-zero — continuing to gateway install."
|
||||
fi
|
||||
|
||||
echo ""
|
||||
info "Launching gateway install…"
|
||||
if "$MOSAIC_CMD" gateway install; then
|
||||
ok "Gateway install complete."
|
||||
else
|
||||
warn "Gateway install exited non-zero."
|
||||
echo " You can retry with: ${C}mosaic gateway install${RESET}"
|
||||
warn "Wizard exited non-zero."
|
||||
echo " You can retry with: ${C}mosaic wizard${RESET}"
|
||||
echo " Or run gateway install alone: ${C}mosaic gateway install${RESET}"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Non-interactive or --no-auto-launch: print guidance only
|
||||
info "First install detected. Set up your agent identity:"
|
||||
echo " ${C}mosaic init${RESET} (interactive SOUL.md / USER.md setup)"
|
||||
echo " ${C}mosaic wizard${RESET} (full guided wizard via Node.js)"
|
||||
echo " ${C}mosaic gateway install${RESET} (install and start the gateway)"
|
||||
echo " ${C}mosaic wizard${RESET} (unified first-run wizard — identity + gateway + admin)"
|
||||
echo " ${C}mosaic gateway install${RESET} (standalone gateway (re)configure)"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user