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
+3 -3
View File
@@ -198,7 +198,7 @@ export type BUN_SQLITE_COBBLE_BOTS = {
user_id?: number | "";
name?: string;
/**
* Legacy: marks the one coordinator, which only the super admin sees and reaches. What a bot can do comes from `bot_types`
* Worker or the one coordinator (which only the super admin sees and reaches). `bot_types` add to it
*/
kind?: "worker" | "coordinator" | "";
/**
@@ -1036,9 +1036,9 @@ export type BUN_SQLITE_COBBLE_BOT_TYPES = {
*/
updated_at?: number | "";
bot_id?: number | "";
bot_type?: "coordinator" | "admin" | "worker" | "";
bot_type?: "workspace_admin" | "";
/**
* The workspace the type holds in; null for install-wide
* The workspace the type holds in
*/
workspace_id?: number | "";
/**