fix(signal): add groups schema to Zod validation

The TypeScript type was added but the Zod runtime schema was missing,
causing config validation to reject the groups key.
This commit is contained in:
Derek Ross committed 2026-01-29 21:59:56 -05:00
1 parent c9359b8486
commit dd705e3da1
1 file changed
+12
+12
View File
@@ -58,6 +58,17 @@ export const TelegramGroupSchema = z
})
.strict();
export const SignalGroupSchema = z
.object({
requireMention: z.boolean().optional(),
tools: ToolPolicySchema,
toolsBySender: ToolPolicyBySenderSchema,
enabled: z.boolean().optional(),
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
systemPrompt: z.string().optional(),
})
.strict();
const TelegramCustomCommandSchema = z
.object({
command: z.string().transform(normalizeTelegramCommandName),
@@ -534,6 +545,7 @@ export const SignalAccountSchemaBase = z
.optional(),
reactionLevel: z.enum(["off", "ack", "minimal", "extensive"]).optional(),
heartbeat: ChannelHeartbeatVisibilitySchema,
groups: z.record(z.string(), SignalGroupSchema.optional()).optional(),
})
.strict();