Implement install stages S3–S5: package, policy, and skills sync.

Attach/onboard sandbox from agents/hermes, additive OpenShell policy overlays, and nemohermes skill install for scaffold skills. No doctor/connect and no push.
This commit is contained in:
Ty
2026-07-27 12:13:25 -07:00
parent e5e179e541
commit 0198ab6881
38 changed files with 1422 additions and 51 deletions
+45 -17
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
# scripts/install.sh — Lumina staged installer
#
# Runs install stages S0bS2 (S3+ not yet implemented).
# Runs install stages S0bS5.
#
# Usage:
# ./scripts/install.sh # run all implemented stages (S0bS2)
# ./scripts/install.sh # run all implemented stages (S0bS5)
# ./scripts/install.sh --stage s1 # run only S1
# ./scripts/install.sh --stage s2 # run only S2
# ./scripts/install.sh --stage s3-s5 # run S3 through S5
# ./scripts/install.sh --help
#
# All stages are idempotent. Re-running is safe.
@@ -25,23 +25,27 @@ usage() {
cat <<EOF
Usage: $(basename "$0") [OPTIONS]
Run Lumina install stages (S0bS2 implemented).
Run Lumina install stages (S0bS5 implemented).
Options:
--stage <s1|s2> Run only the specified stage
--help Show this help
--stage <s0b|s1|s2|s3|s4|s5|s3-s5> Run only the specified stage or range
--help Show this help
Stages:
S0b Docker install-if-missing (bootstrap)
S1 Repository environment (.env)
S2 Model + vision configuration + smoke test
S3 Stack alignment (compose documentation; no-op on attach)
S4 Sandbox verification or onboard (attach mode default)
S5 Policy overlays + skills sync
All stages are idempotent.
Examples:
$(basename "$0") # run S0b → S1 → S2
$(basename "$0") # run S0b → S1 → S2 → S3 → S4 → S5
$(basename "$0") --stage s1 # run only S1 (env)
$(basename "$0") --stage s2 # run only S2 (models)
$(basename "$0") --stage s5 # run only S5 (policy + skills)
$(basename "$0") --stage s3-s5 # run S3 → S4 → S5
EOF
}
@@ -54,7 +58,7 @@ while [[ $# -gt 0 ]]; do
shift
SINGLE_STAGE="${1:-}"
if [[ -z "$SINGLE_STAGE" ]]; then
log_error "--stage requires a value (s1 or s2)"
log_error "--stage requires a value"
exit 1
fi
shift
@@ -67,7 +71,7 @@ while [[ $# -gt 0 ]]; do
esac
done
# ── Run stages ─────────────────────────────────────────────────────────────
# ── Stage runners ──────────────────────────────────────────────────────────
run_s0b() {
log_section "S0b: Docker bootstrap"
bash "$SCRIPT_DIR/bootstrap.sh"
@@ -81,17 +85,37 @@ run_s2() {
bash "$SCRIPT_DIR/install/s2-models.sh"
}
log_section "Lumina installer (stages S0bS2)"
run_s3() {
log_section "S3: Stack alignment"
log_info "OpenShell manages the Hermes sandbox container."
log_info "Product compose (deploy/compose/) is optional for local MCP/webhooks."
log_info "No action needed for UAT attach path."
}
run_s4() {
bash "$SCRIPT_DIR/install/s4-sandbox.sh"
}
run_s5() {
bash "$SCRIPT_DIR/install/s5-policy-skills.sh"
}
# ── Main ───────────────────────────────────────────────────────────────────
log_section "Lumina installer (stages S0bS5)"
warn_if_root
if [[ -n "$SINGLE_STAGE" ]]; then
case "$SINGLE_STAGE" in
s0b) run_s0b ;;
s1) run_s1 ;;
s2) run_s2 ;;
s0b) run_s0b ;;
s1) run_s1 ;;
s2) run_s2 ;;
s3) run_s3 ;;
s4) run_s4 ;;
s5) run_s5 ;;
s3-s5) run_s3; run_s4; run_s5 ;;
*)
log_error "Unknown stage: $SINGLE_STAGE"
log_error "Valid stages: s0b, s1, s2"
log_error "Valid stages: s0b, s1, s2, s3, s4, s5, s3-s5"
exit 1
;;
esac
@@ -100,10 +124,14 @@ else
run_s0b
run_s1
run_s2
run_s3
run_s4
run_s5
fi
log_section "Install complete (S0bS2)"
log_section "Install complete (S0bS5)"
log_info "Next steps:"
log_info " - Review .env for correctness"
log_info " - Continue with S3+ when implemented (compose, sandbox, policy)"
log_info " - Verify policy: nemohermes $(get_sandbox_name) policy-list"
log_info " - Continue with S6 (doctor) when implemented"
log_info " - See docs/INSTALL.md for full procedure"