File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -521,6 +521,41 @@ run_doctor() {
521521 echo -e " ${SUCCESS} ✓${NC} Migration complete"
522522}
523523
524+ resolve_workspace_dir () {
525+ local profile=" ${CLAWDBOT_PROFILE:- default} "
526+ if [[ " ${profile} " != " default" ]]; then
527+ echo " ${HOME} /clawd-${profile} "
528+ else
529+ echo " ${HOME} /clawd"
530+ fi
531+ }
532+
533+ run_bootstrap_onboarding_if_needed () {
534+ if [[ " ${NO_ONBOARD} " == " 1" ]]; then
535+ return
536+ fi
537+
538+ local workspace
539+ workspace=" $( resolve_workspace_dir) "
540+ local bootstrap=" ${workspace} /BOOTSTRAP.md"
541+
542+ if [[ ! -f " ${bootstrap} " ]]; then
543+ return
544+ fi
545+
546+ if [[ ! -r /dev/tty || ! -w /dev/tty ]]; then
547+ echo -e " ${WARN} →${NC} BOOTSTRAP.md found at ${INFO}${bootstrap}${NC} ; no TTY, skipping onboarding."
548+ echo -e " Run ${INFO} clawdbot onboard${NC} later to finish setup."
549+ return
550+ fi
551+
552+ echo -e " ${WARN} →${NC} BOOTSTRAP.md found at ${INFO}${bootstrap}${NC} ; starting onboarding..."
553+ clawdbot onboard || {
554+ echo -e " ${ERROR} Onboarding failed; BOOTSTRAP.md still present. Re-run ${INFO} clawdbot onboard${ERROR} .${NC} "
555+ return
556+ }
557+ }
558+
524559resolve_clawdbot_version () {
525560 local version=" "
526561 if command -v clawdbot & > /dev/null; then
630665 run_doctor
631666 fi
632667
668+ # Step 7: If BOOTSTRAP.md is still present in the workspace, resume onboarding
669+ run_bootstrap_onboarding_if_needed
670+
633671 local installed_version
634672 installed_version=$( resolve_clawdbot_version)
635673
You can’t perform that action at this time.
0 commit comments