Skip to content

Commit 934ca49

Browse files
VladUZHclaude
andcommitted
fix: make credential_config, metadata, next_review_date optional in agent creation
These fields are not in the dashboard's Register Agent form but were required by the Zod schema. Now they default to null/empty array, matching the Prisma schema where they're already nullable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bfe15f9 commit 934ca49

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/shared/src/schemas/agent.schema.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ export const AgentCreateSchema = AgentSchema.omit({
4949
created_at: true,
5050
updated_at: true,
5151
lifecycle_state: true,
52+
}).extend({
53+
authorized_integrations: z.array(AuthorizedIntegrationSchema).default([]),
54+
credential_config: z.record(z.string(), z.unknown()).nullable().default(null),
55+
metadata: z.record(z.string(), z.unknown()).nullable().default(null),
56+
next_review_date: z.string().datetime().nullable().default(null),
5257
});
5358

5459
export type AgentCreateInput = z.infer<typeof AgentCreateSchema>;

0 commit comments

Comments
 (0)