Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Merge branch 'train/nov30-r3' into train/nov30-r3b
milind-sonibffbae8bc823
diff --cc server/config.tsindex 8b4053cdbb,fb2bf1f2a0..6258cbde5a--- a/server/config.ts+++ b/server/config.ts@@@ -30,8 -30,9 +30,10 @@@ import { settledFileCache, settledFileSimport { isRemoteMcpServer, mcpServerServes, parseStoredMcpServer } from "./mcp-registry.ts"; import { postizKeyHeaders } from "./postiz/connection.ts";import { parseJson, schemaIssue, type JsonObject, type JsonValue } from "./schema.ts";import { deciderConfigSchema, type DeciderConfig } from "./decider/config.ts";+import { applyOpenAiCompatHeaderDefaults, openAiCompatConfigHeadersSchema, type OpenAICompatCustomHeadersConfig } from "./drivers/openai-compat-headers.ts";- import { fishKeyFromLiveKey, liveConfigSchema, liveConfigWithEnv, liveSettingEnv, type LiveConfig } from "./live-config.ts"; import { hearingConfigShape } from "./tts/hearing-config.ts";+ import { fishKeyFromLiveKey, liveConfigSchema, liveConfigWithEnv, liveSettingEnv, type LiveConfig } from "./live-config.ts";+ import { ttsConfigSchema, type TtsConfig } from "./tts/config.ts";+ export { FISH_TTS_MODELS, type FishTtsModel } from "./tts/config.ts";import { browserEngineConfigSchema, browserEnginePatchSchema, browserProfileSchema, isValidCdpTarget, legacyBrowserProfileSchema, type BrowserEngineConfig, type BrowserProfile } from "./browser/config.ts";export type { BrowserProfile } from "./browser/config.ts";import { roomContextSettings } from "./room-context-settings.ts"; import { usageCapsSchema, type UsageCapsConfig } from "./usage-caps-config.ts";diff --cc server/index.tsindex 9b07d135ee,a516a4f8a6..2adf50a0f1--- a/server/index.ts+++ b/server/index.ts@@@ -12270,10 -12272,10 +12270,10 @@@ function liveSignedIn(auth: RequestAuthfunction liveCallTitle(botId: string, threadId: string, excerpt: string): Promise<string | null> | null {const bot = store.projectBotForTask(botId, threadId);if (!bot) return null;- const gate = threadTitleGate(bot);+ const gate = threadTitleGate(bot, true);return gate.ok ? generateThreadTitle(gate.instance, excerpt, "call") : null;}- const liveWiring = liveSessionWiring({ bot: liveBotFor, history: liveHistoryFor, cloudHome: Boolean(CLOUD_HOME), othersOnLoopback: adminActivityRecording, saveAgent: (agent) => { saveConfig({ live: agent }); Object.assign(cfg, loadConfig()); }, language: appLanguage, fishAgentLanguage: () => cfg.live?.fishAgentLanguage });+ const liveWiring = liveSessionWiring({ codex: () => localLiveCodex(cfg, DESKTOP_MANAGED && !CLOUD_HOME && !HOSTED_WORKSPACE), bot: liveBotFor, history: liveHistoryFor, cloudHome: Boolean(CLOUD_HOME), othersOnLoopback: adminActivityRecording, saveAgent: (agent) => { saveConfig({ live: agent }); Object.assign(cfg, loadConfig()); }, language: appLanguage, fishAgentLanguage: () => cfg.live?.fishAgentLanguage });const liveCalls = new LiveCallController({store,send: async ({ auth, botId, threadId, text, callId }) => {diff --cc server/routes/instances.tsindex c075724e39,e4c682de3d..c41cdebc6f--- a/server/routes/instances.ts+++ b/server/routes/instances.ts@@@ -213,15 -213,11 +214,16 @@@ export function createInstanceRoutes(de// Checked again here, inside the busy section, so two quick adds cannot both pass the settings check.const duplicate = parsed.data.catalog ? localServerAlreadyAdded(instances, parsed.data.url) : null;if (duplicate) return json(res, 409, { error: duplicate });- const added = addEndpoint(instances, parsed.data);- if ("error" in added) return json(res, 400, { error: added.error });- await persistProviderInstance(added.instanceId, instances);- if (isGlmOrigin(parsed.data.url)) await registry.refreshModels(added.instanceId).catch(() => false);- return json(res, 201, { instanceId: added.instanceId, instances: await describeInstances() });+ try {+ const added = addEndpoint(instances, parsed.data);+ if ("error" in added) return json(res, 400, { error: added.error });+ await persistProviderInstance(added.instanceId, instances);++ if (isGlmOrigin(parsed.data.url)) await registry.refreshModels(added.instanceId).catch(() => false);+ return json(res, 201, { instanceId: added.instanceId, instances: await describeInstances() });+ } catch (error) {+ if (error instanceof CustomHeaderValidationError) return json(res, 400, { error: error.message });+ throw error;+ }} finally { providerConfigBusy.set(false); }}