PATH-wiring (~/.claude/bin, home of the `kei` entry-point) was gated on `[ -t 0 ] && [ -t 1 ]`; curl|bash tees stdout so -t 1 is false → pathway skipped → `kei: command not found`. Same tee/-t1 trap as onboarding (this one in the top-level install.sh). Eradicated across tree: install.sh, lib-menu.sh, lib-wizard.sh all gate on [ -t 0 ]. Verified piped-under-pty. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 lines
836 B
Bash
20 lines
836 B
Bash
# shellcheck shell=bash
|
|
# lib-wizard.sh — v0.11 sleep-layer setup helper invocation.
|
|
#
|
|
# The helper has its own TTY prompts + validation. We only kick it off
|
|
# when stdin+stdout are TTY; otherwise print the reminder so the user can
|
|
# finish later via /sleep-setup inside a Claude Code session.
|
|
#
|
|
# Requires: say / warn from lib-log.sh.
|
|
# Reads globals: $AGENTS_DIR.
|
|
|
|
run_sleep_wizard() {
|
|
local sleep_helper="$AGENTS_DIR/_primitives/kei-sleep-setup.sh"
|
|
if [[ -x "$sleep_helper" ]] && [ -t 0 ]; then # stdin only; not -t 1 (curl|bash tees stdout)
|
|
say "running sleep-sync setup helper"
|
|
"$sleep_helper" || warn "sleep-sync setup did not complete — re-run via /sleep-setup"
|
|
else
|
|
say "sleep-sync setup deferred (non-TTY or helper missing)"
|
|
say " run /sleep-setup inside Claude Code to finish configuration"
|
|
fi
|
|
}
|