style(install): KeiSei brand colors + ASCII banner in installer output
Some checks are pending
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / preflight (push) Waiting to run
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / vps-smoke (push) Waiting to run
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / rust-primitives (map[crates:frustration-matrix,kei-frustration-loop,kei-skill-importer,kei-projects-index,kei-projects-watcher,kei-gdrive-import,kei-leak-matrix,kei-skills,kei-gateway,kei-cron-scheduler,kei-export-trajectories,kei-backend-daytona,kei-d… (push) Blocked by required conditions
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / rust-primitives (map[crates:kei-compute-baremetal,kei-compute-vultr,kei-compute-linode,kei-compute-digitalocean,kei-svc-systemd,kei-llm-bridge-mlx name:hosted-sleep-compute]) (push) Blocked by required conditions
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / rust-primitives (map[crates:kei-diff,kei-scheduler,kei-watch,kei-prune,kei-discover,kei-brain-view,kei-hibernate,kei-ledger-sign,kei-fork name:wave13-15]) (push) Blocked by required conditions
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / rust-primitives (map[crates:kei-git-gitea,kei-git-forgejo,kei-git-gitlab,kei-git-bitbucket,kei-memory-sled,kei-memory-redis,kei-memory-postgres,kei-memory-sqlite,kei-auth-google,kei-auth-apple,kei-auth-magiclink,kei-auth-webauthn,kei-notify-slack,kei-n… (push) Blocked by required conditions
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / rust-primitives (map[crates:kei-ledger,kei-migrate,kei-changelog,kei-memory,kei-store,kei-conflict-scan,kei-refactor-engine,kei-graph-check,kei-shared,kei-dna-index,kei-pet name:core]) (push) Blocked by required conditions
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / rust-primitives (map[crates:kei-machine-probe,kei-llm-ollama,kei-llm-llamacpp,kei-llm-mlx,kei-llm-router,kei-model name:llm-stack]) (push) Blocked by required conditions
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / rust-primitives (map[crates:kei-router,kei-sage,kei-task,kei-chat-store,kei-crossdomain,kei-search-core,kei-content-store,kei-social-store,kei-curator,kei-auth,kei-artifact name:mcp-lbm]) (push) Blocked by required conditions
CI (Forgejo Actions — self-hosted runner on Mac, host mode) / rust-primitives (map[crates:keisei,kei-forge,kei-runtime,kei-runtime-core,kei-atom-discovery,kei-agent-runtime,kei-capability,kei-provision,kei-entity-store,kei-pipe,kei-cache,kei-spawn,kei-replay name:atom-substrate]) (push) Blocked by required conditions

- KEISEI ASCII logo (голубой) shown at install start via kei_banner().
- `[install]` prefix → тёмно-жёлтый (38;5;178); primitive names → голубой
  (38;5;39) in both the plan and the per-primitive install lines.
- Language menu: code голубой, native name тёмно-жёлтый.
- lib-log COLOR now enables under curl|bash too: detect terminal via
  `[ -t 1 ] || /dev/tty` (web-install tees stdout → -t 1 false → colors were
  silently off). This is color detection, not an interactivity gate (pairs
  with no -t 0 — does not violate tty-interactivity-gate rule).

Verified piped-under-pty: banner + gold [install] + blue/gold language menu
all render through the tee logfile.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
KeiSei84 2026-05-22 16:01:33 +08:00
parent 7a2f6568b3
commit 9866d716d7
5 changed files with 34 additions and 11 deletions

View file

@ -203,6 +203,7 @@ if ! printf '%s\n' "$CONFIRM_INPUT" | show_confirm_screen "$CONFIRM_LABEL"; then
fi
# --- execute install phases ----------------------------------------------
kei_banner
setup_target_dirs
scaffold_memory_index
install_blocks

View file

@ -1,21 +1,43 @@
# shellcheck shell=bash
# lib-log.sh — say / warn / err with optional ANSI color.
# Honors NO_COLOR (no-color.org) and TTY detection on fd 1.
# lib-log.sh — say / warn / err with optional ANSI color + KeiSei banner.
# Honors NO_COLOR (no-color.org). Color is ON when stdout is a TTY OR a
# controlling terminal is reachable via /dev/tty — the latter matters under
# `curl|bash`, where web-install.sh tees stdout (so `-t 1` is false even in an
# interactive session, but the terminal is still there via /dev/tty).
# This `-t 1`-with-/dev/tty test is COLOR detection, NOT an interactivity gate
# (see ~/.claude/rules/tty-interactivity-gate.md) — it pairs with no `-t 0`.
# Sourced by install.sh; no top-level execution.
# ANSI on iff stdout is a TTY and NO_COLOR is unset.
if [ -t 1 ] && [ "${NO_COLOR:-}" = "" ]; then
if { [ -t 1 ] || { : < /dev/tty; } 2>/dev/null; } && [ "${NO_COLOR:-}" = "" ]; then
COLOR=1
else
COLOR=0
fi
# Brand palette: тёмно-жёлтый (gold) for [install], голубой (sky-blue) for KeiSei.
if [ "$COLOR" = "1" ]; then
say() { printf '\033[1;36m[install]\033[0m %s\n' "$*"; }
KEI_GOLD=$'\033[38;5;178m' # тёмно-жёлтый — install prefix
KEI_BLUE=$'\033[38;5;39m' # голубой — logo / primitives
KEI_DIM=$'\033[2m'
KEI_RST=$'\033[0m'
say() { printf '%s[install]%s %s\n' "$KEI_GOLD" "$KEI_RST" "$*"; }
warn() { printf '\033[1;33m[warn]\033[0m %s\n' "$*"; }
err() { printf '\033[1;31m[error]\033[0m %s\n' "$*" >&2; }
else
KEI_GOLD= KEI_BLUE= KEI_DIM= KEI_RST=
say() { printf '[install] %s\n' "$*"; }
warn() { printf '[warn] %s\n' "$*"; }
err() { printf '[error] %s\n' "$*" >&2; }
fi
# KeiSei ASCII banner — голубой logo, shown once at install start.
kei_banner() {
printf '\n'
printf '%s ██╗ ██╗███████╗██╗███████╗███████╗██╗%s\n' "$KEI_BLUE" "$KEI_RST"
printf '%s ██║ ██╔╝██╔════╝██║██╔════╝██╔════╝██║%s\n' "$KEI_BLUE" "$KEI_RST"
printf '%s █████╔╝ █████╗ ██║███████╗█████╗ ██║%s\n' "$KEI_BLUE" "$KEI_RST"
printf '%s ██╔═██╗ ██╔══╝ ██║╚════██║██╔══╝ ██║%s\n' "$KEI_BLUE" "$KEI_RST"
printf '%s ██║ ██╗███████╗██║███████║███████╗██║%s\n' "$KEI_BLUE" "$KEI_RST"
printf '%s ╚═╝ ╚═╝╚══════╝╚═╝╚══════╝╚══════╝╚═╝%s\n' "$KEI_BLUE" "$KEI_RST"
printf '%s KeiSeiKit · installing%s\n\n' "$KEI_GOLD" "$KEI_RST"
}

View file

@ -57,7 +57,7 @@ onboarding_pick_language() {
while IFS=$'\t' read -r code name; do
[ -z "$code" ] && continue
codes+=("$code")
printf " %2d) %s — %s\n" "$i" "$code" "$name" >&2
printf " %2d) ${KEI_BLUE:-}%s${KEI_RST:-}${KEI_GOLD:-}%s${KEI_RST:-}\n" "$i" "$code" "$name" >&2
i=$((i+1))
done <<< "$langs"
ans="$(_onb_read_choice "${#codes[@]}" "[1-${#codes[@]}, default 1=en]: ")"

View file

@ -100,7 +100,7 @@ _print_primitive_rows() {
[ -z "$name" ] && continue
kind="$(primitive_field "$name" kind 2>/dev/null || echo '?')"
extra="$(primitive_time_secs "$name")s, $(( $(primitive_disk_kb "$name") / 1024 )) MB"
printf ' + %-22s (%s, ~%s)\n' "$name" "$kind" "$extra"
printf ' + %s%-22s%s (%s, ~%s)\n' "${KEI_BLUE:-}" "$name" "${KEI_RST:-}" "$kind" "$extra"
done
}

View file

@ -28,7 +28,7 @@ copy_shell_primitive() {
mkdir -p "$AGENTS_DIR/_primitives"
cp -f "$src" "$dst"
chmod +x "$dst"
say " + shell: $name ($file)"
say " + shell: ${KEI_BLUE:-}$name${KEI_RST:-} ($file)"
}
remove_shell_primitive() {
@ -65,7 +65,7 @@ copy_rust_primitive() {
cp -rf "$src/$sibling/"* "$dst/$sibling/" 2>/dev/null || true
fi
done
say " + rust: $name (crate $crate)"
say " + rust: ${KEI_BLUE:-}$name${KEI_RST:-} (crate $crate)"
}
remove_rust_primitive() {
@ -103,7 +103,7 @@ copy_node_primitive() {
find "$dst" -depth -name "$ex" -exec rm -rf {} + 2>/dev/null || true
done < <(_node_excludes)
fi
say " + node: $name (path $rel)"
say " + node: ${KEI_BLUE:-}$name${KEI_RST:-} (path $rel)"
}
remove_node_primitive() {
@ -171,7 +171,7 @@ install_external_primitive() {
err "external primitive $name: entry point $slug not found in $file"
return 1
fi
say " + external: $name (via $file)"
say " + external: ${KEI_BLUE:-}$name${KEI_RST:-} (via $file)"
"$slug" || warn "$name install failed — re-run after fixing prereqs"
}