feat: improve Claude agent model normalization and tool mapping

This commit is contained in:
Mohamed Boudra
2026-02-13 00:00:57 +07:00
parent 6d4d74fa3a
commit 837d0fb387
10 changed files with 601 additions and 33 deletions
@@ -244,6 +244,24 @@ describe("claude tool-call mapper", () => {
});
});
it("normalizes namespaced voice MCP speak tools", () => {
const item = expectMapped(
mapClaudeCompletedToolCall({
callId: "claude-speak-2",
name: "mcp__paseo_voice__speak",
input: { text: "Hey! I can hear you." },
output: { ok: true },
})
);
expect(item.name).toBe("speak");
expect(item.detail).toEqual({
type: "unknown",
input: "Hey! I can hear you.",
output: null,
});
});
it("drops tool calls when callId is missing", () => {
const item = mapClaudeCompletedToolCall({
callId: null,