fix(antigravity): fix agent tools, sandbox permissions, and relocate global msd-core
Some checks failed
Tests / PR mergeability (push) Successful in 30s
Tests / Detect test scope (push) Successful in 21s
Tests / lint-tests (push) Failing after 3m39s
Tests / plugin-validate (push) Successful in 2m22s
Tests / test (inert CI) (push) Has been skipped
Tests / conformance test (macos-latest, 24) (push) Blocked by required conditions
Tests / conformance test (windows-latest, 24, shard 1/3) (push) Blocked by required conditions
Tests / conformance test (windows-latest, 24, shard 2/3) (push) Blocked by required conditions
Tests / Required tests (push) Blocked by required conditions
Tests / conformance test (windows-latest, 24, shard 3/3) (push) Blocked by required conditions
Tests / Base branch health (push) Successful in 12s
Tests / test (ubuntu-latest, 24, shard 1/3) (push) Failing after 20s
Tests / test (ubuntu-latest, 24, shard 2/3) (push) Failing after 19s
Tests / test (ubuntu-latest, 24, shard 3/3) (push) Failing after 19s
Tests / test (ubuntu-latest, 24) (push) Failing after 17s
Tests / QA loop walk (smell ratchet) (push) Failing after 20s
Tests / Coverage gate (merged shards) (push) Has been skipped
Tests / Publish emitted-baseline artifact (push) Has been skipped
Dismiss Unauthorized PR Approvals / dismiss-unauthorized-approval (push) Successful in 21s

- Map Glob, WebSearch, WebFetch to Antigravity-native tool names (find_by_name, search_web, read_url_content) and drop unmapped tools instead of lowercasing
- Emit absolute, glob-free trailing-slash read_file() allow rules in settings.json and strip legacy globbed/tilde rules that crash the Antigravity terminal sandbox
- Relocate global Antigravity msd-core/ and sibling scripts/ outside ~/.gemini/ to ~/.msd/antigravity/ (avoiding AGY CLI's hardcoded ~/.gemini/** protection boundary)
- Update content rewriters, msd-run-resolver.md, update-context, and update.md to resolve ~/.msd/antigravity/msd-core/ and .agents/msd-core/
- Replace Discord invite link in installer banner with Golem15 Wavepath join URL
This commit is contained in:
Jakub Zych
2026-11-30 23:55:04 +01:00
parent e7ed5b4c9f
commit cc0c0ad460
12 changed files with 652 additions and 152 deletions

View File

@@ -300,7 +300,7 @@ tools: Read, Write, Bash, Skill, WebFetch, SlashCommand
const toolsItems = result.split('\n').filter(l => l.startsWith('- ')).map(l => l.slice(2));
assert.ok(toolsItems.includes('view_file'), 'maps Read -> view_file (#4705 native name)');
assert.ok(toolsItems.includes('web_fetch'), 'maps WebFetch -> web_fetch');
assert.ok(toolsItems.includes('read_url_content'), 'maps WebFetch -> read_url_content');
assert.ok(!toolsItems.some(t => /\bskill\b/.test(t)), 'no invalid skill tool in Antigravity frontmatter');
assert.ok(!toolsItems.some(t => /\bslashcommand\b/.test(t)), 'no invalid slashcommand tool in Antigravity frontmatter');
});
@@ -2455,10 +2455,42 @@ Inspect source files.`;
assert.ok(!/- replace\b/.test(result), 'the Gemini CLI name replace must not survive');
});
test('unmapped tools keep their lowercase grant (no silent restriction drop) (#4705)', () => {
// Antigravity CLI resolves every `tools:` entry against a strict registry and
// refuses to start the agent on the first unknown name ("unknown component:
// tool \"glob\" not found in registry"). glob / google_web_search / web_fetch
// were Gemini CLI names that registry does not carry.
const toolItems = (result) => result.split('\n').filter((l) => l.startsWith('- ')).map((l) => l.slice(2));
test('Glob, WebSearch and WebFetch map to names the Antigravity registry resolves', () => {
const result = convertClaudeAgentToAntigravityAgent(
`---\nname: e\ndescription: d\ntools: Glob, WebFetch\n---\n\nbody`);
assert.match(result, /- glob/, 'undocumented tools keep their mapped/lowercase grant');
assert.match(result, /- web_fetch/, 'WebFetch stays granted');
`---\nname: e\ndescription: d\ntools: Glob, WebSearch, WebFetch\n---\n\nbody`);
assert.deepStrictEqual(toolItems(result), ['find_by_name', 'search_web', 'read_url_content']);
});
test('a tool with no registered Antigravity equivalent is dropped, not lowercased', () => {
const result = convertClaudeAgentToAntigravityAgent(
`---\nname: e\ndescription: d\ntools: Read, TodoWrite, NotebookEdit\n---\n\nbody`);
assert.deepStrictEqual(toolItems(result), ['view_file'],
'an unknown name in tools: stops the whole agent from starting, so unmapped tools must not be emitted');
});
test('every shipped MSD agent converts to registered Antigravity tool names only', () => {
const fs = require('node:fs');
const path = require('node:path');
const agentsDir = path.join(__dirname, '..', 'agents');
// Names confirmed against the Antigravity CLI tool registry.
const registered = new Set([
'view_file', 'write_file', 'replace_file_content', 'run_command',
'grep_search', 'find_by_name', 'search_web', 'read_url_content',
]);
const offenders = [];
for (const file of fs.readdirSync(agentsDir).filter((f) => f.endsWith('.md'))) {
const converted = convertClaudeAgentToAntigravityAgent(fs.readFileSync(path.join(agentsDir, file), 'utf8'), true);
const frontmatter = converted.slice(0, converted.indexOf('\n---', 4));
for (const tool of toolItems(frontmatter)) {
if (!registered.has(tool)) offenders.push(`${file}: ${tool}`);
}
}
assert.deepStrictEqual(offenders, []);
});
});