fix: restore Anthropic OAuth tool dispatch

This commit is contained in:
Peter Steinberger
2026-01-10 04:01:00 +01:00
parent 8e63cd9a76
commit 8466e53b5d
11 changed files with 190 additions and 144 deletions

View File

@@ -44,7 +44,7 @@ const DEFAULT_PATH =
// because Claude API on Vertex AI rejects nested anyOf schemas as invalid JSON Schema.
// Type.Union of literals compiles to { anyOf: [{enum:["a"]}, {enum:["b"]}, ...] }
// which is valid but not accepted. A flat enum { type: "string", enum: [...] } works.
const stringEnum = <T extends readonly string[]>(
const _stringEnum = <T extends readonly string[]>(
values: T,
options?: { description?: string },
) =>
@@ -453,12 +453,7 @@ export function createBashTool(
export const bashTool = createBashTool();
const processSchema = Type.Object({
action: stringEnum(
["list", "poll", "log", "write", "kill", "clear", "remove"] as const,
{
description: "Process action",
},
),
action: Type.String({ description: "Process action" }),
sessionId: Type.Optional(
Type.String({ description: "Session id for actions other than list" }),
),