feat: version-aware find-browse with META signal protocol

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>
This commit is contained in:
Garry Tan
2026-03-13 09:49:55 -07:00
co-authored by Claude Opus 4.6
parent 9b103871b9
commit c0153f1fe9
8 changed files with 362 additions and 6 deletions
+7 -1
View File
@@ -1,5 +1,11 @@
#!/bin/bash
# Find the gstack browse binary. Echoes path and exits 0, or exits 1 if not found.
# 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"