From 974a61a3b72fec400479da8dc43aa1590aaff2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Doruk=20=C3=96zer?= Date: Fri, 30 Jan 2026 20:22:36 +0300 Subject: [PATCH] fix(core): zod schema usage for form elicitInput - requestedSchema type definitions for form elicitInput was not accepting zod schemas converted into json schemas - Not updated zod schema definition because its used for runtime validation - Casted a type to get rid of TypeScript errors for converted zod schemas - Autocompletions still work as discriminated union definiton for json schemas Ref #1362 --- packages/core/src/types/types.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/core/src/types/types.ts b/packages/core/src/types/types.ts index d3e404c58..580a21819 100644 --- a/packages/core/src/types/types.ts +++ b/packages/core/src/types/types.ts @@ -2000,7 +2000,14 @@ export const ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.ex type: z.literal('object'), properties: z.record(z.string(), PrimitiveSchemaDefinitionSchema), required: z.array(z.string()).optional() - }) + }) as z.ZodType< + | { + type?: 'object' | (string & {}); + properties?: Record; + required?: string[]; + } + | { [key: string]: unknown } + > }); /**