Make bot types an extension of the bot's kind

Coordinator and worker come from bots.kind; bot_types now only holds
workspace_admin (was admin), each row naming its workspace, with no scope
field. Rows from v0.2.8 and earlier are fixed at boot by migrateBotTypes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-26 06:05:18 +01:00
co-authored by Claude Opus 5.5
parent 657a76d868
commit 926bad6bea
29 changed files with 168 additions and 175 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import { z } from "zod";
export const SetBotTypeRequestSchema = z.object({
bot_id: z.coerce.number().int().positive("Pick a bot"),
workspace_id: z.coerce.number().int().positive("Pick a workspace"),
bot_type: z.enum(["admin"]).default("admin"),
bot_type: z.enum(["workspace_admin"]).default("workspace_admin"),
given: z.boolean(),
});