feat(skills): add AGY — Google Gemini CLI second-opinion router
Sibling of the grok skill: routes text/verify/review (+ review-files, review-diff, raw) to the official Google Gemini CLI (gemini, npm global, v0.45.1) for an independent second model. ask-gemini.sh mirrors ask-grok.sh (identity-aware gating, binary auto-locate, cygpath hardening, prompt-file inputs, clean stdout/stderr separation, JSON .response extraction). review modes copy targets into a temp dir + --include-directories to bypass Gemini's gitignore/workspace sandbox. verify/review pinned to gemini-3.1-pro-preview (GEMINI_MODEL overridable). migrate-identity.sh auto-detects gemini and writes a per-machine identity.json gemini block. Auth: Google OAuth (no key). Fleet Gemini host: GURU-5070. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -96,6 +96,28 @@ else
|
||||
echo " Grok: not installed"
|
||||
fi
|
||||
|
||||
# Detect Google Gemini CLI — optional capability extension (independent second
|
||||
# model: verify / review / text). Sibling of Grok. Per-machine; sets identity
|
||||
# gemini.installed so the /agy skill knows whether it can run locally. Does NOT
|
||||
# set is_fleet_host (manual fleet-coordination choice, preserved if present).
|
||||
GEMINI_BIN=""
|
||||
if command -v gemini >/dev/null 2>&1; then
|
||||
GEMINI_BIN="$(command -v gemini)"
|
||||
else
|
||||
for c in "${APPDATA:-}/npm/gemini" "$HOME/AppData/Roaming/npm/gemini" \
|
||||
"/usr/local/bin/gemini" "$HOME/.npm-global/bin/gemini"; do
|
||||
if [ -n "$c" ] && [ -x "$c" ]; then GEMINI_BIN="$c"; break; fi
|
||||
done
|
||||
fi
|
||||
if [ -n "$GEMINI_BIN" ]; then
|
||||
GEMINI_BIN="$(cygpath -m "$GEMINI_BIN" 2>/dev/null || echo "$GEMINI_BIN")"
|
||||
GEMINI_INSTALLED="true"
|
||||
echo " Gemini: installed ($GEMINI_BIN)"
|
||||
else
|
||||
GEMINI_INSTALLED="false"
|
||||
echo " Gemini: not installed"
|
||||
fi
|
||||
|
||||
# Build updated identity.json
|
||||
echo ""
|
||||
echo "[INFO] Updating identity.json..."
|
||||
@@ -136,6 +158,17 @@ else:
|
||||
g['installed'] = False
|
||||
data['grok'] = g
|
||||
|
||||
# Gemini capability flag (per-machine, sibling of grok). Preserve manual is_fleet_host.
|
||||
gm = data.get('gemini') or {}
|
||||
if '$GEMINI_INSTALLED' == 'true':
|
||||
gm['installed'] = True
|
||||
gm['binary'] = r'$GEMINI_BIN'
|
||||
gm.setdefault('auth', 'oauth')
|
||||
gm.setdefault('capabilities', ['text', 'verify', 'review'])
|
||||
else:
|
||||
gm['installed'] = False
|
||||
data['gemini'] = gm
|
||||
|
||||
# Coord API endpoint — populate only if absent so existing machines keep their override.
|
||||
if 'coord_api' not in data:
|
||||
data['coord_api'] = '$COORD_API_DEFAULT'
|
||||
@@ -158,6 +191,7 @@ echo " ollama.prose_model: $PROSE_MODEL"
|
||||
echo " platform: $PLATFORM"
|
||||
echo " architecture: $ARCH"
|
||||
echo " grok.installed: $GROK_INSTALLED"
|
||||
echo " gemini.installed: $GEMINI_INSTALLED"
|
||||
echo " coord_api: (default $COORD_API_DEFAULT if not already set)"
|
||||
echo ""
|
||||
echo "Review: cat $IDENTITY_PATH"
|
||||
|
||||
Reference in New Issue
Block a user