feat(commands): unify chat commands (#275)

* Chat commands: registry, access groups, Carbon

* Chat commands: clear native commands on disable

* fix(commands): align command surface typing

* docs(changelog): note commands registry (PR #275)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
Shadow
2026-01-06 14:17:56 -06:00
committed by GitHub
parent 1bf44bf30c
commit 9b22e1f6e9
40 changed files with 2357 additions and 1459 deletions

View File

@@ -165,6 +165,14 @@ const MessagesSchema = z
})
.optional();
const CommandsSchema = z
.object({
native: z.boolean().optional(),
text: z.boolean().optional(),
useAccessGroups: z.boolean().optional(),
})
.optional();
const HeartbeatSchema = z
.object({
every: z.string().optional(),
@@ -632,6 +640,7 @@ export const ClawdbotSchema = z.object({
.optional(),
routing: RoutingSchema,
messages: MessagesSchema,
commands: CommandsSchema,
session: SessionSchema,
cron: z
.object({
@@ -786,14 +795,6 @@ export const ClawdbotSchema = z.object({
token: z.string().optional(),
groupPolicy: GroupPolicySchema.optional().default("open"),
textChunkLimit: z.number().int().positive().optional(),
slashCommand: z
.object({
enabled: z.boolean().optional(),
name: z.string().optional(),
sessionPrefix: z.string().optional(),
ephemeral: z.boolean().optional(),
})
.optional(),
mediaMaxMb: z.number().positive().optional(),
historyLimit: z.number().int().min(0).optional(),
actions: z