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 <noreply@anthropic.com>
This commit is contained in:
Remix Partners 2026-01-25 21:10:11 -06:00
parent 0e19ea86ba
commit 18ca9fd9e8

View File

@ -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(),