Skip to content

Commit 5800937

Browse files
committed
fix: Type and API compatibility issues with Zod schema validation
1 parent f4961e5 commit 5800937

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/prompts/manager.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class PromptManager {
8888
'Argument name must contain only alphanumeric characters and underscores'
8989
),
9090
description: z.string().min(1).max(MAX_DESCRIPTION_LENGTH),
91-
required: z.boolean().strict(), // Ensure strict boolean type
91+
required: z.boolean(), // Removed .strict() as it's not available in this Zod version
9292
});
9393

9494
// Schema for the entire prompt data with template sanitization
@@ -262,7 +262,11 @@ export class PromptManager {
262262
{
263263
name: promptData.name,
264264
description: promptData.description,
265-
arguments: promptData.arguments,
265+
arguments: promptData.arguments.map(arg => ({
266+
name: String(arg.name),
267+
description: String(arg.description),
268+
required: Boolean(arg.required),
269+
})),
266270
},
267271
args => ({
268272
messages: [

0 commit comments

Comments
 (0)