diff --git a/fish/conf.d/10-core.fish b/fish/conf.d/10-core.fish index c8c8178..c47a5bb 100644 --- a/fish/conf.d/10-core.fish +++ b/fish/conf.d/10-core.fish @@ -105,6 +105,12 @@ else alias la 'ls -lah -A' end +# gs sync installs the Gentle stack from main, so every host follows the beta +# channel for gentle-ai install/upgrade and engram downloads. +if not set -q GENTLE_AI_CHANNEL; or test -z "$GENTLE_AI_CHANNEL" + set -gx GENTLE_AI_CHANNEL beta +end + # gentle-ai's managed launchers (OpenCode background subagents) must win on PATH; # gentle-ai cannot persist PATH for fish login shells by itself. if test -d "$HOME/.gentle-ai/bin" diff --git a/fish/conf.d/99-local.fish.example b/fish/conf.d/99-local.fish.example index 15f6c5c..ae37e17 100644 --- a/fish/conf.d/99-local.fish.example +++ b/fish/conf.d/99-local.fish.example @@ -12,3 +12,5 @@ # set -gx GS_SYNC_AGENTS claude-code,opencode,pi # Binaries only, no managed-config sync: # set -gx GS_SKIP_AI_SYNC 1 +# 10-core.fish defaults GENTLE_AI_CHANNEL to beta; override only on a host that must differ: +# set -gx GENTLE_AI_CHANNEL stable diff --git a/fish/tests/w7-gentle-ai-path.fish b/fish/tests/w7-gentle-ai-path.fish index 37cba5d..5213794 100644 --- a/fish/tests/w7-gentle-ai-path.fish +++ b/fish/tests/w7-gentle-ai-path.fish @@ -24,5 +24,11 @@ test (count (string match -a -- "$ws/with/.gentle-ai/bin" (string split '|' -- " set -l without (env -i HOME="$ws/without" PATH=/usr/bin:/bin "$fish_bin" --no-config -c "$probe" "$core") string match -q '*gentle-ai*' -- "$without"; and fail "missing launcher dir added to PATH: $without" +# Every host follows the beta channel (gs sync installs from main); a host may override. +set -l channel (env -i HOME="$ws/without" PATH=/usr/bin:/bin "$fish_bin" --no-config -c 'source $argv[1]; echo $GENTLE_AI_CHANNEL' "$core") +test "$channel" = beta; or fail "GENTLE_AI_CHANNEL default (expected beta, got '$channel')" +set -l override (env -i HOME="$ws/without" PATH=/usr/bin:/bin GENTLE_AI_CHANNEL=stable "$fish_bin" --no-config -c 'source $argv[1]; echo $GENTLE_AI_CHANNEL' "$core") +test "$override" = stable; or fail "GENTLE_AI_CHANNEL override not kept (got '$override')" + rm -rf -- "$ws" printf 'gentle-ai path checks passed\n'