mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-02 15:04:37 +01:00
* setup: explicit contributor marker; move pre-v1.91.231.0 installs to production deps (#3447) ./setup used node_modules/typescript as its contributor signal, so every install made before v1.91.231.0 (a full bun install) kept ~520 MB of test and eval packages forever. The contributor is now the clone bin/dev-setup marks with git config gstack.contributor true, or GSTACK_CONTRIBUTOR=1. An unmarked clone with the dev toolchain moves node_modules aside under a checkout lock, installs production-only, verifies every dependency, and drops the backup; any failure puts the full install back with SETUP_DEPS_MIGRATE_FAILED. CI and a clone whose git config cannot be read never migrate. Bun cache entries for the pinned Agent SDK are removed only when no other project links to them. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * hosts: add Gemini CLI as an experimental host (#1247) ./setup --host gemini (alias gemini-cli; --host auto when gemini is on PATH) installs gstack-<skill> directories into ~/.gemini/skills, which Gemini CLI 0.66.0 lists with gemini skills list, plus the ~/.gemini/skills/gstack runtime root. Renders go to .gemini-cli/ (gitignored) with name+description frontmatter whose names match their directories, CLAUDE.md rewritten to GEMINI.md, and a tool glossary for Gemini CLI's names (and Antigravity's, which can read the same folder). gstack-uninstall removes only gstack-managed entries there, so the user's own skills stay. Docs: ADDING_A_HOST.md verified facts, hosts.md, uninstall.md, README. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes (leave Bun's shared cache alone) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * changelog: Gemini CLI host and contributor marker (#1247, #3447) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: host lists name Copilot, Antigravity and Gemini CLI Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test: the plan-mode re-render guard count includes the Gemini CLI host Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: troubleshooting's runtime-root guard host list names Gemini CLI Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
60 lines
3.2 KiB
TypeScript
60 lines
3.2 KiB
TypeScript
import { defineHost, GBRAIN_RESOLVERS, preambleToolGlossary } from './define-host';
|
|
|
|
// Google Gemini CLI (#1247). Paths: user skills in ~/.gemini/skills, workspace
|
|
// skills in .gemini/skills (trusted folders only), found at <dir>/<name>/SKILL.md
|
|
// and indexed by frontmatter name (geminicli.com/docs/cli/skills). Tool names:
|
|
// Gemini CLI 0.66.0. Google's migration table lists ~/.gemini/skills as an
|
|
// Antigravity CLI global path too, so the glossary maps agy's names as well.
|
|
// Verified facts in docs/ADDING_A_HOST.md "Gemini CLI".
|
|
const GEMINI_TOOL_GLOSSARY = '**Gemini CLI tool names:** `AskUserQuestion` means your `ask_user` tool; there is no `mcp__*__AskUserQuestion` variant. The Bash tool means `run_shell_command`, the Read tool `read_file`, the Write tool `write_file`, the Edit tool `replace`, Grep `grep_search`, Glob `glob`, the Agent tool `invoke_agent`, and `ExitPlanMode` means `exit_plan_mode`. The Skill tool means `activate_skill`, or reading the skill\'s SKILL.md with `read_file`. In Antigravity CLI, which can read these skills too, use `run_command`, `view_file` and `ask_question` instead.';
|
|
|
|
const gemini = defineHost({
|
|
name: 'gemini',
|
|
displayName: 'Gemini CLI',
|
|
cliAliases: ['gemini-cli'],
|
|
defaultModel: 'gemini',
|
|
tier: 'experimental',
|
|
capabilities: { toolExecution: true, questions: 'native', planMode: true, delegation: true, browser: true, safetyHooks: 'advisory' },
|
|
|
|
globalRoot: '.gemini/skills/gstack',
|
|
localSkillRoot: '.gemini/skills/gstack',
|
|
// Render output only: .gemini is Gemini CLI's own workspace directory, so a
|
|
// render there would be listed as workspace skills in this repo.
|
|
hostSubdir: '.gemini-cli',
|
|
|
|
// Gemini CLI indexes skills by frontmatter name, so names match their
|
|
// gstack-<skill> directories. 1024 is the Agent Skills description limit.
|
|
frontmatter: {
|
|
mode: 'allowlist',
|
|
keepFields: ['name', 'description'],
|
|
descriptionLimit: 1024,
|
|
descriptionLimitBehavior: 'error',
|
|
nameMatchesDirectory: true,
|
|
},
|
|
|
|
// Literal ~/.gemini/skills paths (the agy model); .source-path (written by
|
|
// setup) lets /gstack-upgrade find the checkout behind the runtime root.
|
|
pathRewrites: [
|
|
{ from: 'if [ -d "$HOME/.claude/skills/gstack/.git" ]', to: 'if [ -d "$(cat "$HOME/.gemini/skills/gstack/.source-path" 2>/dev/null)/.git" ]' },
|
|
{ from: 'INSTALL_DIR="$HOME/.claude/skills/gstack"', to: 'INSTALL_DIR="$(cat "$HOME/.gemini/skills/gstack/.source-path")"' },
|
|
{ from: '$HOME/.claude/skills/gstack', to: '$HOME/.gemini/skills/gstack' },
|
|
{ from: '~/.claude/skills/gstack', to: '~/.gemini/skills/gstack' },
|
|
{ from: '.claude/skills/gstack', to: '.gemini/skills/gstack' },
|
|
{ from: '.claude/skills/review', to: '.gemini/skills/gstack/review' },
|
|
{ from: '.claude/skills', to: '.gemini/skills' },
|
|
{ from: 'CLAUDE.md', to: 'GEMINI.md' },
|
|
],
|
|
toolRewrites: preambleToolGlossary(GEMINI_TOOL_GLOSSARY),
|
|
|
|
suppressedResolvers: ['REVIEW_ARMY', ...GBRAIN_RESOLVERS],
|
|
|
|
runtimeRoot: {
|
|
globalSymlinks: ['bin', 'lib', 'browse/dist', 'browse/bin', 'design/dist', 'make-pdf/dist', 'freeze/bin', 'careful/bin', 'gstack-upgrade', 'ETHOS.md'],
|
|
globalFiles: {
|
|
'review': ['checklist.md', 'design-checklist.md', 'greptile-triage.md', 'TODOS-format.md'],
|
|
},
|
|
},
|
|
});
|
|
|
|
export default gemini;
|