From c4210a81e3f3dacba46f2d805ce55b64c37ab05b Mon Sep 17 00:00:00 2001 From: Echolonius <273862755+Echolonius@users.noreply.github.com> Date: Thu, 14 May 2026 13:26:20 -0500 Subject: [PATCH] fix(goal-executor): replace z.record() with z.object().passthrough() in Anthropic schemas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit z.record(z.string(), z.string()) emits a JSON Schema with the `propertyNames` keyword. Anthropic's structured-output validator rejects that keyword with HTTP 400 — OpenAI and Google accept it without complaint, so the failure only surfaced on the Anthropic call path. Replaces `permissions` and `arguments` in `launchAppGrounderSchema` with z.object({}).passthrough(): an open-ended object schema with no keyword constraints. Runtime behaviour is unchanged. Fixes #100 --- packages/goal-executor/src/ai/schemas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/goal-executor/src/ai/schemas.ts b/packages/goal-executor/src/ai/schemas.ts index b0435bb..2b3067c 100644 --- a/packages/goal-executor/src/ai/schemas.ts +++ b/packages/goal-executor/src/ai/schemas.ts @@ -167,8 +167,8 @@ const launchAppGrounderSchema = z.union([ allowAllPermissions: z.boolean().optional(), stopAppBeforeLaunch: z.boolean().optional(), shouldUninstallBeforeLaunch: z.boolean().optional(), - permissions: z.record(z.string(), z.string()).optional(), - arguments: z.record(z.string(), z.string()).optional(), + permissions: z.object({}).passthrough().optional(), + arguments: z.object({}).passthrough().optional(), }) .passthrough(), ]);