Files
gstack/hosts/agy.ts
T
54efba6dd5 v1.91.67.0 feat(hosts): Antigravity CLI (agy) host (#3089)
* feat(hosts): Antigravity CLI (agy) host

Adds Google's Antigravity CLI as an experimental host through defineHost():
skills in ~/.gemini/antigravity-cli/skills/gstack-*, a runtime root with
.source-path for /gstack-upgrade, names equal to their gstack-<skill>
directories, name+description frontmatter with the 1024-char limit, the
Gemini overlay, and a preamble glossary mapping Claude tool names to
Antigravity's documented tools (run_command, view_file, write_to_file,
replace_file_content, grep_search, find_by_name, invoke_subagent,
ask_question).

Setup: ./setup --host agy (alias antigravity), --host auto on the agy
binary or ~/.gemini/antigravity-cli, never a Gemini-CLI-only ~/.gemini.
Registry tier, --status known roots, uninstall and team-init cover it.
Gemini CLI's ~/.gemini/skills and settings are never touched.

Co-authored-by: Shagun Prasad <109907086+0xshae@users.noreply.github.com>
Co-authored-by: ManchalaSashank <134257068+ManchalaSashank@users.noreply.github.com>
Co-authored-by: VoIP Expert <5742479+voipexpert@users.noreply.github.com>
Co-authored-by: Mattias Petersson <93470851+KiDDarn@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(agy): golden refresh after main merge; agy is recorded as an installed render host

* v1.91.67.0: CHANGELOG, version

---------

Co-authored-by: Shagun Prasad <109907086+0xshae@users.noreply.github.com>
Co-authored-by: ManchalaSashank <134257068+ManchalaSashank@users.noreply.github.com>
Co-authored-by: VoIP Expert <5742479+voipexpert@users.noreply.github.com>
Co-authored-by: Mattias Petersson <93470851+KiDDarn@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-08 20:05:06 +00:00

64 lines
3.7 KiB
TypeScript

import { defineHost, GBRAIN_RESOLVERS, preambleToolGlossary } from './define-host';
// Google Antigravity CLI, named after its `agy` binary: the longer name pushed
// the runtime prelude past PRELUDE_BYTE_BUDGET. Rewritten on defineHost() from
// the community attempts; disposition and doc sources in docs/ADDING_A_HOST.md
// "Antigravity CLI".
// Paths: the CLI reads global skills from ~/.gemini/antigravity-cli/skills and
// workspace skills from .agents/skills (antigravity.google/docs/skills, CLI
// section). Tool names: antigravity.google/docs/hooks "Supported tools".
const ANTIGRAVITY_TOOL_GLOSSARY = '**Antigravity tool names:** `AskUserQuestion` means your `ask_question` tool (options as choices); there is no `mcp__*__AskUserQuestion` variant. The Bash tool means `run_command`, the Read tool `view_file`, the Write tool `write_to_file`, the Edit tool `replace_file_content` (`multi_replace_file_content` for several edits in one file), Grep `grep_search`, Glob `find_by_name`, and the Agent tool `invoke_subagent`. There is no Skill tool: load a skill by reading its SKILL.md with `view_file`. If a step says to call `ExitPlanMode`, tell the user the plan is ready and wait. `view_file` can return only part of a long file: when a SKILL.md or a file it tells you to read ends before its last line, read the remaining line ranges before acting on it.';
const agy = defineHost({
name: 'agy',
displayName: 'Antigravity CLI',
cliAliases: ['antigravity'],
defaultModel: 'gemini',
tier: 'experimental',
capabilities: { toolExecution: true, questions: 'native', planMode: false, delegation: true, browser: true, safetyHooks: 'advisory' },
globalRoot: '.gemini/antigravity-cli/skills/gstack',
localSkillRoot: '.agents/skills/gstack',
// Render output only. .agents is Codex's render tree, and .gemini is Gemini
// CLI's workspace directory.
hostSubdir: '.agy',
// Antigravity reads name and description only; name defaults to the
// directory, and the CLI turns each name into a slash command, so names
// match their gstack-<skill> directories instead of shadowing /plan-style
// built-ins. 1024 is the Agent Skills description limit.
frontmatter: {
mode: 'allowlist',
keepFields: ['name', 'description'],
descriptionLimit: 1024,
descriptionLimitBehavior: 'error',
nameMatchesDirectory: true,
},
// Literal ~/.gemini/antigravity-cli paths (the Copilot model) so skills
// without the preamble still resolve; .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/antigravity-cli/skills/gstack/.source-path" 2>/dev/null)/.git" ]' },
{ from: 'INSTALL_DIR="$HOME/.claude/skills/gstack"', to: 'INSTALL_DIR="$(cat "$HOME/.gemini/antigravity-cli/skills/gstack/.source-path")"' },
{ from: '$HOME/.claude/skills/gstack', to: '$HOME/.gemini/antigravity-cli/skills/gstack' },
{ from: '~/.claude/skills/gstack', to: '~/.gemini/antigravity-cli/skills/gstack' },
{ from: '.claude/skills/gstack', to: '.agents/skills/gstack' },
{ from: '.claude/skills/review', to: '.agents/skills/gstack/review' },
{ from: '.claude/skills', to: '.agents/skills' },
{ from: 'CLAUDE.md', to: 'AGENTS.md' },
],
toolRewrites: preambleToolGlossary(ANTIGRAVITY_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 agy;