Give bots tools and MCP servers per bot and workspace, with status and tests
- Bots and workspaces get tools and MCP servers from their settings pages; bots also from chips under the chat composer, removable there - "Every bot" now gives one to every bot now and every new bot; each can still drop it (attach-every-bot-extensions.ts moves old installs over) - Status lines: MCP servers record whether they connect, tools whether their last run worked - Test connection in the MCP form and a Test panel in the tool form check the form as it is, without saving - Hide Google sign-in on the login form Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -3,6 +3,7 @@ import type { BUN_SQLITE_COBBLE_BOTS, BunSQLiteTables } from "@/db/types/db";
|
||||
import type { BotHue } from "@/src/dict/bot-dict";
|
||||
import assertPromptLength from "@/src/utils/assert-prompt-length";
|
||||
import assertCrewManager from "@/src/functions/backend/db/access/assert-crew-manager";
|
||||
import attachDefaultExtensions from "../extensions/attach-default-extensions";
|
||||
|
||||
type Params = {
|
||||
/**
|
||||
@@ -53,5 +54,7 @@ export default async function createBot({ user_id, name, role, hue, system_promp
|
||||
throw new Error(`Couldn't add the bot: ${res.msg}`);
|
||||
}
|
||||
|
||||
await attachDefaultExtensions({ bot_id });
|
||||
|
||||
return Number(bot_id);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import BunSQLite from "@moduletrace/bun-sqlite";
|
||||
import type { BUN_SQLITE_COBBLE_BOTS, BunSQLiteTables } from "@/db/types/db";
|
||||
import { CoordinatorBotName } from "@/src/dict/bot-dict";
|
||||
import { CoordinatorSystemPrompt } from "@/src/data/coordinator-system-prompt";
|
||||
import attachDefaultExtensions from "../extensions/attach-default-extensions";
|
||||
|
||||
type Params = {
|
||||
/**
|
||||
@@ -66,5 +67,7 @@ export default async function ensureCoordinatorBot({ user_id }: Params) {
|
||||
throw new Error(`Couldn't create the coordinator: ${res.msg}`);
|
||||
}
|
||||
|
||||
await attachDefaultExtensions({ bot_id });
|
||||
|
||||
return bot_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user