feat(host): add declarative hosts configuration for Antigravity (Agy)

This commit is contained in:
Mattias Petersson 2026-07-12 16:46:44 +02:00
parent 7c9df1c568
commit a146936a1f
3 changed files with 66 additions and 4 deletions

59
hosts/agy.ts Normal file
View File

@ -0,0 +1,59 @@
import type { HostConfig } from '../scripts/host-config';
const agy: HostConfig = {
name: 'agy',
displayName: 'Antigravity',
cliCommand: 'agy',
cliAliases: [],
globalRoot: '.gemini/config/plugins/gstack/skills',
localSkillRoot: '.gemini/config/plugins/gstack/skills',
hostSubdir: '.gemini/config/plugins/gstack',
usesEnvVars: true,
frontmatter: {
mode: 'allowlist',
keepFields: [
'name',
'preamble-tier',
'version',
'description',
'allowed-tools',
'triggers',
'hooks',
'gbrain',
],
descriptionLimit: null,
},
generation: {
generateMetadata: false,
skipSkills: ['codex'],
},
pathRewrites: [
{ from: '~/.claude/skills/gstack', to: '$GSTACK_ROOT' },
{ from: '.claude/skills/gstack', to: '.gemini/config/plugins/gstack/skills' },
{ from: '.claude/skills', to: '.gemini/config/plugins/gstack' },
],
toolRewrites: {},
suppressedResolvers: ['GBRAIN_CONTEXT_LOAD', 'GBRAIN_SAVE_RESULTS'],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'gstack-upgrade', 'ETHOS.md'],
globalFiles: {
'review': ['checklist.md', 'TODOS-format.md'],
},
},
install: {
prefixable: false,
linkingStrategy: 'symlink-generated',
},
learningsMode: 'basic',
};
export default agy;

View File

@ -16,9 +16,10 @@ import cursor from './cursor';
import openclaw from './openclaw';
import hermes from './hermes';
import gbrain from './gbrain';
import agy from './agy';
/** All registered host configs. Add new hosts here. */
export const ALL_HOST_CONFIGS: HostConfig[] = [claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain];
export const ALL_HOST_CONFIGS: HostConfig[] = [claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain, agy];
/** Map from host name to config. */
export const HOST_CONFIG_MAP: Record<string, HostConfig> = Object.fromEntries(
@ -65,4 +66,4 @@ export function getExternalHosts(): HostConfig[] {
}
// Re-export individual configs for direct import
export { claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain };
export { claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain, agy };

View File

@ -22,6 +22,7 @@ import {
slate,
cursor,
openclaw,
agy,
} from '../hosts/index';
import { HOST_PATHS } from '../scripts/resolvers/types';
@ -30,8 +31,8 @@ const ROOT = path.resolve(import.meta.dir, '..');
// ─── hosts/index.ts ─────────────────────────────────────────
describe('hosts/index.ts', () => {
test('ALL_HOST_CONFIGS has 10 hosts', () => {
expect(ALL_HOST_CONFIGS.length).toBe(10);
test('ALL_HOST_CONFIGS has 11 hosts', () => {
expect(ALL_HOST_CONFIGS.length).toBe(11);
});
test('ALL_HOST_NAMES matches config names', () => {
@ -53,6 +54,7 @@ describe('hosts/index.ts', () => {
expect(slate.name).toBe('slate');
expect(cursor.name).toBe('cursor');
expect(openclaw.name).toBe('openclaw');
expect(agy.name).toBe('agy');
});
test('getHostConfig returns correct config', () => {