Commit graph

10 commits

Author SHA1 Message Date
3bc351ec03 fix(bootstrap): v0.48 — reattach stdin to /dev/tty so curl|bash prompts fire
INCIDENT: user installed via curl|bash and reported "kei did not auto-launch".
Root cause: under curl|bash, stdin is the pipe from curl. Every interactive
gate `[ -t 0 ]` returned FALSE, silently skipping FIVE places:

  install/lib-i18n.sh         language picker
  install/lib-preflight.sh    preflight checks
  install/lib-hooks.sh        hook activation prompt
  install/lib-wizard.sh       sleep wizard
  install.sh:270              PATH wiring
  bootstrap.sh kei-onboard    primary CLI picker
  bootstrap.sh launch prompt  "запустить kei сейчас?"

Per rules/tty-interactivity-gate.md the rule is "gate on stdin, never stdout"
— and we did. But under curl|bash BOTH are non-tty. /dev/tty is the only
reliable signal that the user is interactive.

FIX: in bootstrap.sh, ONCE, before invoking install.sh:

    if [ -r /dev/tty ] && [ -w /dev/tty ]; then
        exec </dev/tty
    fi

This redirects bootstrap.sh's OWN stdin to /dev/tty. Every child process
inherits it via fork — install.sh, lib-*.sh, kei-onboard.sh, kei-pick.sh,
kei-mcp-wire.sh — and their `[ -t 0 ]` gates now correctly report true.
Headless / CI / nohup (no /dev/tty) → skipped, gates stay false, no prompts.

Simplified the v0.47 onboarding + launch-prompt blocks: they no longer
need have_tty() or explicit </dev/tty redirects on read — the global
reattach handles it cascadally.

Smoke-tested 2 of 3 paths (curl|bash via `echo "" | bash script.sh` ✓;
plain bash needs real TTY which Claude Code sandbox doesn't provide;
headless needs setsid which is Linux-only). Logic verified.

Version bump v0.47 → v0.48 because behaviour materially changes for every
curl|bash user (5 prompts now fire that were silently skipped).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 15:08:09 +08:00
82c4542090 docs: Windows native port is demand-driven, not "never"
User feedback: "if there's a lot of requests, we'll make a native Windows
version". Soften the "not on the roadmap" framing in both README Platforms
section and bootstrap.sh's bare-Windows guidance.

- README: rephrase to "demand-driven. WSL gives 100% coverage today with
  0 code duplication. If you want a native .ps1 port, open / 👍 an issue.
  Once demand is real, we'll build it."
- bootstrap.sh: same softening — point users to the issues tracker so
  Windows-native demand becomes visible. WSL still recommended as the
  no-wait path that works today.

No version bump (docs-only, behaviour unchanged for all OS paths).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 14:46:33 +08:00
887e209abc feat(installer): friendly Windows + WSL2 detection — no more silent death
Two related changes to make Windows users hit a useful message instead of
"unsupported OS: MINGW64_NT-10.0...; exit 1":

1. bootstrap.sh — WSL2 detection + Git Bash guidance:
   - If uname=Linux + /proc/version contains "Microsoft" or "WSL" → mark
     as WSL2, log it, continue as Linux. Full substrate works.
   - If uname matches MINGW*/MSYS*/CYGWIN* (Git Bash on bare Windows) →
     print step-by-step WSL2 setup guide:
       * PowerShell admin: wsl --install -d Ubuntu
       * Reboot, launch Ubuntu, re-run bootstrap.sh inside it
     + MCP-only fallback mention (kei-mcp-server-windows-x64.exe in releases).
     + Best-effort: copy "wsl --install -d Ubuntu" to Windows clipboard
       via clip.exe (Git Bash has it), so user can paste into PowerShell.
   - Anything else → friendly "supported: Darwin / Linux / WSL2" message.

2. install.sh — same 3-way OS guard added at top, before any lib-*.sh
   sourcing. Catches users who skip bootstrap.sh and run ./install.sh
   directly on Git Bash; gives them the same WSL guidance.

Smoke-tested all 5 OS branches (Darwin / Linux / WSL2 / MINGW64 / Haiku):
each takes the right path. Zero behavioural change on macOS / Linux.

This complements the v0.47 README Platforms section — UX side of the
honest answer "Windows works via WSL2; native PowerShell port not on
roadmap".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 14:34:48 +08:00
a3b6eda991 feat(splash+install): v0.47 — yellow drop-shadow + post-install launch prompt + Windows guidance
1. Splash (bin/kei) — благородная насыщенная жёлто-бронзовая drop-shadow
   on the KEISEI ASCII art:
   - New CS color: \033[1;38;5;130m (noble saturated bronze-gold).
   - Shadow block printed FIRST (6 lines, offset +2 cols right).
   - \e[7A cursor-up returns to start; blue art overwrites where they overlap.
   - Visible shadow: right-edge 2-col tail on blue rows 2-6 + full
     shadow row 6 standalone (offset down-right).
   - TTY-gated: no terminal → no shadow, no colors (existing fallback).

2. bootstrap.sh — post-install launch prompt:
   "Запустить kei сейчас? [Y/n]" at the very end, after all install +
   onboarding + next-steps text. Default Y on Enter.
   - Stdin-TTY gate only (rule: tty-interactivity-gate.md — `-t 1` would
     falsely skip under curl|bash because the bootstrap log tees stdout).
   - Reads from /dev/tty explicitly so curl|bash piped install still works.
   - KEI_NO_AUTORUN=1 env opt-out for CI / scripts.

3. README — Platforms section: honest Windows status.
   - macOS + Linux: fully supported.
   - Windows: substrate is Bash-only; WSL2 recommended path; MCP-server
     binary (.exe) ships in releases for MCP-only mode; native PowerShell
     port NOT on roadmap (WSL gives 100% coverage with 0 code duplication).

4. v0.47 version bumps: plugin.json + bin/kei splash + README counts header.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 14:30:49 +08:00
4db1e1f370 feat(v0.45): onboarding wizard + 5 prod-install bugs (mirror of keigit 4bc40e8e) 2026-05-26 23:20:24 +08:00
b4dc1f770d fix(prod): restore exec bit on 14 scripts (gh api PUT loses mode); bootstrap defensive bash 2026-05-26 22:04:37 +08:00
a299427367 fix: pre-public audit — critical install regression + 7 blockers (#41)
Mirror of keigit 3aff0029. lib-hooks.sh apostrophe-in-jq closed the bash single-quote and broke every install (fixed). cortex-ui removed from profiles+menu; forgejo/zoekt source lib-launchd; portable kei-message id (BSD date fallback); non-TTY default minimal; install stamps .kei-profile; README hook count 54; web-install warns before discarding local edits in the managed clone.
2026-05-24 10:42:16 +07:00
37d249caad fix(install): run onboarding + profile wizard in curl|bash (gate on stdin, not stdout) (#32)
web-install.sh tees stdout to a logfile, so -t 1 is false even in an interactive
curl|bash; the /dev/tty fix reattached only stdin. Wizard gates required BOTH
-t 0 and -t 1, so onboarding (language select) and bootstrap's profile wizard
were silently skipped on the primary install path. Prompts go to stderr and read
from stdin — interactive stdin is the only real requirement.

Gates: bootstrap.sh, lib-onboarding.sh (×2), lib-preflight.sh, lib-hooks.sh.
Non-interactive (CI / </dev/null) still skips — verified.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 10:25:27 +08:00
1dd4bad97a fix(install): make fresh install actually complete + ship tamagotchi (#26)
Root causes found by reproducing a clean install from keigit:

1. PROFILE_PRIMS resolved only inside check_prereqs → unbound for
   --no-execute (plan showed 0 prims for every profile) and silently
   empty for --skip-prereqs. Now resolved unconditionally in install.sh
   before any reader (SSoT).

2. Every profile (even minimal, advertised "no Rust compile") fell back
   to a 5-15 min `cargo build --workspace` because no prebuilt release
   binaries exist. Auto-set KEI_SKIP_RUST for profiles with no rust
   primitives → minimal installs in ~18s (assembler only). cargo stays a
   hard prereq because the agent assembler always compiles.

3. The assembler aborted the WHOLE install on any single bad manifest
   (set -e). generate_agents is now tolerant: bad manifests print FAIL
   but hooks/skills/settings still land. Commit-time validate stays strict.

4. Data bugs that broke the assembler:
   - duplicate [taxonomy] table in _roles/{auditor,merger}.toml
   - fal-ai-runner handoff → keimd-expert (not shipped in kit)
   - infra-implementer-cicd forbidden_domain literal `${{ secrets.NAME }}`
     collided with assembler ${{ }} placeholder detection

5. Metadata: KeiSei84 (nonexistent GitHub org) → KeiSeiLab/KeiSeiKit-1.0
   across plugin manifests, bootstrap, README, docs, Cargo/npm metadata.
   .claude-plugin/{plugin,marketplace}.json 0.16.0 → 0.38.0. SECURITY.md
   supported version 0.14.x → 0.38.x.

feat: ship KeiSei tamagotchi statusline into the kit
   - scripts/keisei-pet{,-update}.sh (portable, state under ~/.claude/pet/)
   - install copies them to ~/.claude/scripts/
   - settings-snippet adds statusLine (set-if-absent, never clobbers an
     existing one) + 4 pet-update hooks (prompt/rust_write/github_block/sleep)

Verified: clean minimal install RC=0, zero FAIL, 38 agents + 52 hooks +
68 skills, settings valid, statusLine wired, pet renders, idempotent re-run.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 01:40:50 +08:00
Parfii-bot
a4e667de10 KeiSeiKit-public — clean state
Single-commit clean baseline after security scrub of niche-tells,
project codenames, internal jargon, and contributor-email leaks.

Contents:
- 100 Rust crates (_primitives/_rust/)
- 37 agent manifests (_manifests/) + generated specs (_generated/)
- 67 user-invocable skills (skills/)
- 33 hooks (hooks/)
- Composition blocks (_blocks/)
- Documentation (docs/, README.md)
- TS adapter packages (_ts_packages/)
- Assembler (_assembler/)
- Roles (_roles/)
- Templates (_templates/)
- Forgejo CI (.forgejo/)

Author: Denis Parfionovich <info@greendragon.info>

License: see LICENSE.
2026-05-01 12:09:03 +08:00