mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-07 05:56:41 +02:00
c0153f1fe9
Agents in other workspaces found stale browse binaries that were missing newer flags. find-browse now compares the local binary's git SHA against origin/main via git ls-remote (4hr cache), and emits META:UPDATE_AVAILABLE when behind. SKILL.md setup checks parse META signals and prompt the user to update. - New compiled binary: browse/dist/find-browse (TypeScript, testable) - Bash shim at browse/bin/find-browse delegates to compiled binary - .version file written at build time with git commit SHA - Build script compiles both browse and find-browse binaries - Graceful degradation: offline, missing .version, corrupt cache all skip check Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
731 B
Bash
Executable File
18 lines
731 B
Bash
Executable File
#!/bin/bash
|
|
# Shim: delegates to compiled find-browse binary, falls back to basic discovery.
|
|
# The compiled binary adds version checking and META signal support.
|
|
DIR="$(cd "$(dirname "$0")/.." && pwd)/dist"
|
|
if test -x "$DIR/find-browse"; then
|
|
exec "$DIR/find-browse" "$@"
|
|
fi
|
|
# Fallback: basic discovery (no version check)
|
|
ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
if [ -n "$ROOT" ] && test -x "$ROOT/.claude/skills/gstack/browse/dist/browse"; then
|
|
echo "$ROOT/.claude/skills/gstack/browse/dist/browse"
|
|
elif test -x "$HOME/.claude/skills/gstack/browse/dist/browse"; then
|
|
echo "$HOME/.claude/skills/gstack/browse/dist/browse"
|
|
else
|
|
echo "ERROR: browse binary not found. Run: cd <skill-dir> && ./setup" >&2
|
|
exit 1
|
|
fi
|