diff --git a/Brewfile b/Brewfile index d5e48b7..ae97e82 100644 --- a/Brewfile +++ b/Brewfile @@ -11,6 +11,7 @@ brew "jq" brew "ripgrep" brew "fd" brew "coreutils" # gtimeout, gdate — для хуков с таймаутами +brew "shellcheck" # линт bootstrap.sh + smoke/*.sh (команда из CLAUDE.md) # Опционально (под проекты) brew "yt-dlp" # Мнемозина: kb-yt-watch diff --git a/CLAUDE.md b/CLAUDE.md index 1526aa3..333d89c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,7 +15,7 @@ Athena — переносимая агентная ОС: разворот все ## Команды - Линт: `shellcheck bootstrap.sh smoke/*.sh` - Сухой прогон: `./bootstrap.sh --dry-run` -- Slice: `./bootstrap.sh --only=<0..6>` +- Slice: `./bootstrap.sh --only=<0|0b|1..6>` (`0`=база, `0b`=инструменты ~/tools — раздельно) - Smoke: `smoke/smoke.sh` - Dry-validate шаблонов (без chezmoi): `smoke/dry-validate.sh` (merge → рендер → plist/json/bash-n + лов неизвестных `{{ }}`) diff --git a/bootstrap.sh b/bootstrap.sh index 5e9048f..aa54611 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -54,7 +54,7 @@ layer0_base() { # ───────── Слой 0b: инструменты (~/tools — боты и т.п., ДО Сознания) ───────── # Клонится ДО Слоя 1: chezmoi run_once_ генерит .env бота при apply, если бот уже на месте. layer_tools() { - phase 0 || return 0; say "Слой 0b — инструменты (~/tools)" + phase 0b || return 0; say "Слой 0b — инструменты (~/tools)" ensure_private [ -f "$ATHENA_TOOLS_MANIFEST" ] || { warn "нет tools.manifest — пропуск"; return 0; } mkdir -p "$HOME/tools" diff --git a/launchd/com.athena.launchd-guard.plist b/launchd/com.athena.launchd-guard.plist index 076805b..3ffd605 100644 --- a/launchd/com.athena.launchd-guard.plist +++ b/launchd/com.athena.launchd-guard.plist @@ -1,7 +1,8 @@ + Сам guard зависит от системных бинарей (PlistBuddy/plutil по абс. пути), но включает + $HOME/.local/bin для само-консистентности (guard сверяет PATH всех агентов, в т.ч. свой). --> Labelcom.athena.launchd-guard @@ -12,7 +13,7 @@ EnvironmentVariables - PATH/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin + PATH$HOME/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin StartCalendarInterval Hour9Minute30 diff --git a/smoke/smoke.sh b/smoke/smoke.sh index 79bbf6d..d56977b 100755 --- a/smoke/smoke.sh +++ b/smoke/smoke.sh @@ -48,6 +48,8 @@ chk ".env → блок (exit 2)" '[ "$(ge /proj/.env)" = 2 ]' chk ".env.example → пропуск (exit 0)" '[ "$(ge /proj/.env.example)" = 0 ]' chk "~/.secrets/* → блок" '[ "$(ge /Users/u/.secrets/db)" = 2 ]' chk "secret-shaped имя (db.key) → блок" '[ "$(ge /proj/db.key)" = 2 ]' +chk ".env.production → блок" '[ "$(ge /proj/.env.production)" = 2 ]' +chk "secrets/db.key (в подпапке) → блок" '[ "$(ge /proj/secrets/db.key)" = 2 ]' chk "id_ed25519 → блок" '[ "$(ge /Users/u/.ssh/id_ed25519)" = 2 ]' chk "обычный .md → пропуск" '[ "$(ge /proj/readme.md)" = 0 ]' chk "кириллический путь .env → блок (unicode-safe)" '[ "$(ge /Пользователь/проект/.env)" = 2 ]'