fix(scripts): add gstack infra symlinks to install, update, and doctor

The gstack/bin/ and gstack/browse/dist/ symlinks (added in link.sh) were
missing from install-plugins.sh and update-all.sh, meaning fresh installs
and updates wouldn't create them. Also adds doctor.sh health checks.

- install-plugins.sh: create symlinks after gstack ./setup
- update-all.sh: refresh symlinks after gstack submodule update
- doctor.sh: verify both symlinks exist in consistency section

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastien Chanot 2026-05-26 07:25:03 +02:00
parent 0380f218c1
commit 23449dfc82
3 changed files with 39 additions and 0 deletions

View File

@ -309,6 +309,18 @@ echo ""
# ────────────────────────────────────────────────────────────
echo "── Consistency ──"
# Check gstack shared infrastructure symlinks
if [ -L "$HOME/.claude/skills/gstack/bin" ]; then
pass "gstack/bin/ symlink OK"
else
warn "gstack/bin/ symlink missing — run: bash link.sh"
fi
if [ -L "$HOME/.claude/skills/gstack/browse/dist" ]; then
pass "gstack/browse/dist/ symlink OK"
else
warn "gstack/browse/dist/ symlink missing — run: bash link.sh"
fi
# Check owned skills have disable-model-invocation (skip external/symlinked skills)
MISSING_DMI=()
for f in "$HOME/.claude/skills/"*/SKILL.md; do

View File

@ -269,6 +269,21 @@ if [ -d "$GSTACK_DIR" ]; then
else
ok "GStack ready (submodule initialized, symlinks staged)"
fi
# GStack shared infrastructure: bin/ (CLI tools) and browse/dist/ (compiled binary).
# Per-skill SKILL.md symlinks don't expose these, but multiple skills hardcode
# ~/.claude/skills/gstack/bin/ and gstack/browse/dist/.
GSTACK_DST="$HOME/.claude/skills/gstack"
if [ -d "$GSTACK_DIR/bin" ]; then
mkdir -p "$GSTACK_DST"
[ -L "$GSTACK_DST/bin" ] || ln -sf "$GSTACK_DIR/bin" "$GSTACK_DST/bin"
ok "gstack/bin/ symlink OK"
fi
if [ -d "$GSTACK_DIR/browse/dist" ]; then
mkdir -p "$GSTACK_DST/browse"
[ -L "$GSTACK_DST/browse/dist" ] || ln -sf "$GSTACK_DIR/browse/dist" "$GSTACK_DST/browse/dist"
ok "gstack/browse/dist/ symlink OK"
fi
else
warn "GStack submodule directory not found after init — check .gitmodules"
fi

View File

@ -85,6 +85,18 @@ if [[ "$_gstack_confirm" =~ ^[Yy]$ ]]; then
warn "GStack submodule update failed — run: git submodule update --init"
fi
# Refresh gstack shared infrastructure symlinks (bin/ + browse/dist/)
GSTACK_DIR="$REPO/skills-external/gstack"
GSTACK_DST="$HOME/.claude/skills/gstack"
if [ -d "$GSTACK_DIR/bin" ]; then
mkdir -p "$GSTACK_DST"
ln -sf "$GSTACK_DIR/bin" "$GSTACK_DST/bin"
fi
if [ -d "$GSTACK_DIR/browse/dist" ]; then
mkdir -p "$GSTACK_DST/browse"
ln -sf "$GSTACK_DIR/browse/dist" "$GSTACK_DST/browse/dist"
fi
# Restore prior enabled/disabled state
if [ "$_gstack_state" = "disabled" ] && [ -x "$REPO/lib/toggle-external.sh" ]; then
bash "$REPO/lib/toggle-external.sh" disable gstack >/dev/null