fix(gemini): drop Agent dispatcher tool (#3349)

This commit is contained in:
Tom Boucher
2026-05-10 11:20:06 -04:00
committed by GitHub
parent 0afcea0723
commit 4cb5649e8a
3 changed files with 30 additions and 3 deletions

View File

@@ -264,6 +264,28 @@ Use \${PHASE} in shell examples.
assert.ok(result.includes('$PHASE'), 'escapes ${PHASE} shell variable for Gemini');
assert.ok(!result.includes('${PHASE}'), 'removes Gemini template-string pattern');
});
test('excludes Claude agent dispatcher tools from Gemini frontmatter', () => {
const input = `---
name: gsd-debug-session-manager
description: Manages debug sessions.
tools: Read, Task, Agent, AskUserQuestion
---
<role>
Coordinate debugger agents.
</role>`;
const result = convertClaudeToGeminiAgent(input);
const frontmatter = result.split('---')[1] || '';
assert.ok(frontmatter.includes(' - read_file'), 'maps Read -> read_file');
assert.ok(frontmatter.includes(' - ask_user'), 'maps AskUserQuestion -> ask_user');
assert.ok(!frontmatter.includes(' - task'), 'does not emit invalid Gemini task tool');
assert.ok(!frontmatter.includes(' - agent'), 'does not emit invalid Gemini agent tool');
assert.ok(!frontmatter.includes('Task'), 'does not preserve Claude-only Task tool');
assert.ok(!frontmatter.includes('Agent'), 'does not preserve Claude-only Agent tool');
});
});
// ─── neutralizeAgentReferences (#766) ─────────────────────────────────────────