From 18ca9fd9e80851b4c3b535f6020423b7249578ca Mon Sep 17 00:00:00 2001 From: Remix Partners Date: Sun, 25 Jan 2026 21:10:11 -0600 Subject: [PATCH] fix: add GoogleChatConfigSchema to zod validation The TypeScript types support googlechat configuration, but the zod schema was missing the corresponding definition. This caused googlechat config to be silently stripped during parsing, making the feature non-functional. Adds GoogleChatAccountSchema and GoogleChatConfigSchema to match the existing TypeScript types, enabling Google Chat webhook configuration. Co-Authored-By: Claude Opus 4.5 --- src/config/zod-schema.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/config/zod-schema.ts b/src/config/zod-schema.ts index c30dba4bd..4009091f9 100644 --- a/src/config/zod-schema.ts +++ b/src/config/zod-schema.ts @@ -640,6 +640,26 @@ const MSTeamsConfigSchema = z }); }); +const GoogleChatAccountSchema = z.object({ + name: z.string().optional(), + enabled: z.boolean().optional(), + projectId: z.string().optional(), + subscriptionName: z.string().optional(), + credentialsPath: z.string().optional(), + dmPolicy: DmPolicySchema.optional().default("pairing"), + allowFrom: z.array(z.string()).optional(), + spacePolicy: GroupPolicySchema.optional().default("disabled"), + allowSpaces: z.array(z.string()).optional(), + historyLimit: z.number().int().min(0).optional(), + dmHistoryLimit: z.number().int().min(0).optional(), + textChunkLimit: z.number().int().positive().optional(), + messagePrefix: z.string().optional(), +}); + +const GoogleChatConfigSchema = GoogleChatAccountSchema.extend({ + accounts: z.record(z.string(), GoogleChatAccountSchema.optional()).optional(), +}); + const SessionSchema = z .object({ scope: z.union([z.literal("per-sender"), z.literal("global")]).optional(), @@ -1475,6 +1495,7 @@ export const ClawdbotSchema = z signal: SignalConfigSchema.optional(), imessage: IMessageConfigSchema.optional(), msteams: MSTeamsConfigSchema.optional(), + googlechat: GoogleChatConfigSchema.optional(), bridge: z .object({ enabled: z.boolean().optional(),