Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Merge gh/main into train/nov30-r2; rebuild the app host
milind-soni5b0a3786dd1a
diff --cc apps/docs/content/docs/features/voice-and-memory.mdxindex b4bb968a7f,872e96651c..49474d41e5--- a/apps/docs/content/docs/features/voice-and-memory.mdx+++ b/apps/docs/content/docs/features/voice-and-memory.mdx@@@ -21,10 -21,18 +21,20 @@@ The harness rewrites code-heavy Markdow2. In an agent profile, choose **Fish Audio**, paste the key, and save it.3. Pick one of the voices returned by your Fish Audio account, then use **Try** before enabling spoken replies.+Choose **Drama 3** in the Fish Audio model picker if your plan covers it.+Fish Audio and ElevenLabs keys are stored separately, so switching engines does not replace the other provider's credential. The picker combines popular public voices with voices owned by your Fish Audio account. Only use a voice when you have permission to do so.+ ### Cartesia++ 1. Create a key in [Cartesia API Keys](https://play.cartesia.ai/keys).+ 2. In an agent profile's **Voice** settings, choose **Cartesia**, paste the key, and save it.+ 3. Search for a stock voice or a clone available to your account, then use **Try** to hear it.++ Cartesia generates spoken replies, voice notes, and the bot's audio in **Take turns** calls. **Live** calls and microphone recognition use their own settings. Text selected for speech is sent to Cartesia and uses your Cartesia account's credits.++ For a self-hosted workspace, `tts.cartesiaModel` in `config.json` overrides the default `sonic-3.6` model. Set `tts.cartesiaLanguage` to a supported language code, such as `nl` for Dutch, to specify the language of the text sent for speech.+### Chatterbox (local)MausBot speaks through any OpenAI-compatible server that runs [Chatterbox](https://github.com/resemble-ai/chatterbox) behind `POST /v1/audio/speech` — for example LocalAI with a Chatterbox model installed, or a small wrapper service around `pip install chatterbox-tts`.diff --cc packages/phone-protocol/src/live-call-wire.tsindex eb63876eb9,c87b5187bc..72b0ac45f0--- a/packages/phone-protocol/src/live-call-wire.ts+++ b/packages/phone-protocol/src/live-call-wire.ts@@@ -59,11 -65,8 +65,11 @@@ export interface LiveCallRecord* the Gemini Live API on the person's Gemini key, which the client reaches with a single-use token the harness creates, or an* ElevenLabs agent the harness sets up on the person's ElevenLabs account, which the client reaches with a signed URL, or* "custom": an OpenAI-compatible server the person names (a gateway that serves the GPT-Live API), reached like OpenAI. */- export type LiveProvider = "openai" | "azure" | "fish" | "gemini" | "elevenlabs" | "custom";+ export type LiveProvider = "openai" | "azure" | "fish" | "gemini" | "elevenlabs" | "custom" | "codex";+/** A bot can choose GPT-Live or Fish Live 3 while sharing the workspace's provider credentials. */+export type BotLiveOverride = { provider: "openai" } | { provider: "fish"; fishAgentId?: string };+/** `live`: the key saved for Live calls only; `openai`: the OpenAI API key from Settings → API keys, used when there is no `live` key;* `fishAudio`: the Fish Audio key from Settings → API keys, the only key a Fish Audio call uses;* `gemini`: the Gemini key from Settings → API keys, the only key a Gemini call uses;diff --cc packages/phone-protocol/src/live-call.tsindex 47199fb7d6,becbae8022..ec0abbb5cf--- a/packages/phone-protocol/src/live-call.ts+++ b/packages/phone-protocol/src/live-call.ts@@@ -234,78 -226,3 +234,79 @@@ export function formatCallDuration(secoexport function liveCallRowText(botName: string, seconds: number): string {return `Call with ${botName} · ${formatCallDuration(seconds)}`;}++export interface LiveHistoryCaps {+ maxMessages: number;+ maxMessageChars: number;+ maxTotalChars: number;+}++export const DEFAULT_LIVE_HISTORY_LIMITS: LiveHistoryLimits = {+ historyMessages: 8,+ historyMessageChars: 600,+ historyTotalChars: 6_000,+};++export const LIVE_HISTORY_MIN: LiveHistoryLimits = {+ historyMessages: 0,+ historyMessageChars: 100,+ historyTotalChars: 500,+};++/** GPT-Live caps a session's startup history at 128 messages and 8,192 tokens. 6,000 characters stays inside the token+ * cap even for text that takes about one token a character, so GPT-Live calls can carry more messages, never more text. */+const GPT_LIVE_HISTORY_CAPS: LiveHistoryCaps = { maxMessages: 128, maxMessageChars: 6_000, maxTotalChars: 6_000 };++export const LIVE_HISTORY_PROVIDER_CAPS: Record<LiveProvider, LiveHistoryCaps> = {+ openai: GPT_LIVE_HISTORY_CAPS,+ azure: GPT_LIVE_HISTORY_CAPS,+ custom: GPT_LIVE_HISTORY_CAPS,++ codex: GPT_LIVE_HISTORY_CAPS,+ fish: { maxMessages: 100, maxMessageChars: 4_000, maxTotalChars: 20_000 },+ elevenlabs: { maxMessages: 100, maxMessageChars: 4_000, maxTotalChars: 20_000 },+ gemini: { maxMessages: 200, maxMessageChars: 12_000, maxTotalChars: 60_000 },+};++/** Maximum history limits supported by `provider` (defaults to OpenAI's ceilings). */+export function liveHistoryCaps(provider?: LiveProvider): LiveHistoryCaps {+ return provider ? LIVE_HISTORY_PROVIDER_CAPS[provider] : LIVE_HISTORY_PROVIDER_CAPS.openai;+}++function clampHistoryLimit(value: unknown, fallback: number, min: number, max: number): number {+ if (typeof value !== "number" || !Number.isFinite(value)) return fallback;+ return Math.min(max, Math.max(min, Math.trunc(value)));+}++/** Clamps partial history limits into valid bounds for `provider`, filling missing or non-finite values with defaults. */+export function resolveLiveHistoryLimits(+ limits?: Partial<LiveHistoryLimits>,+ provider?: LiveProvider,+): LiveHistoryLimits {+ const caps = liveHistoryCaps(provider);+ return {+ historyMessages: clampHistoryLimit(limits?.historyMessages, DEFAULT_LIVE_HISTORY_LIMITS.historyMessages, LIVE_HISTORY_MIN.historyMessages, caps.maxMessages),+ historyMessageChars: clampHistoryLimit(limits?.historyMessageChars, DEFAULT_LIVE_HISTORY_LIMITS.historyMessageChars, LIVE_HISTORY_MIN.historyMessageChars, caps.maxMessageChars),+ historyTotalChars: clampHistoryLimit(limits?.historyTotalChars, DEFAULT_LIVE_HISTORY_LIMITS.historyTotalChars, LIVE_HISTORY_MIN.historyTotalChars, caps.maxTotalChars),+ };+}++/** Validates user-supplied history limits against `provider`'s ceiling, returning a descriptive error or null. */+export function liveHistoryLimitError(+ limits: Partial<LiveHistoryLimits>,+ provider?: LiveProvider,+): string | null {+ const caps = liveHistoryCaps(provider);+ const checks: Array<[keyof LiveHistoryLimits, number, number, string]> = [+ ["historyMessages", LIVE_HISTORY_MIN.historyMessages, caps.maxMessages, "messages"],+ ["historyMessageChars", LIVE_HISTORY_MIN.historyMessageChars, caps.maxMessageChars, "chars per message"],+ ["historyTotalChars", LIVE_HISTORY_MIN.historyTotalChars, caps.maxTotalChars, "total chars"],+ ];+ for (const [key, min, max, label] of checks) {+ const value = limits[key];+ if (value === undefined) continue;+ if (typeof value !== "number" || !Number.isInteger(value) || value < min || value > max) {+ return `Chat history ${label} must be between ${min} and ${max} for this voice provider.`;+ }+ }+ return null;+}diff --cc packages/phone-protocol/src/wire.tsindex dba045f9c5,d8e4c93f4e..b2b6930b12--- a/packages/phone-protocol/src/wire.ts+++ b/packages/phone-protocol/src/wire.ts@@@ -33,13 -33,13 +33,13 @@@ import type { Routine, RoutineRun } froimport type { WebhookAttempt, WebhookTrigger } from "./webhooks.ts";import type { PublishedPageCard } from "./published-page.ts";import type { InboxItem, InboxTask } from "./inbox.ts";- import type { BotLiveOverride, LiveCallRecord, LiveCallState } from "./live-call-wire.ts";-import type { LiveCallRecord, LiveCallState, LiveCodexProgressFrame } from "./live-call-wire.ts";++import type { BotLiveOverride, LiveCallRecord, LiveCallState, LiveCodexProgressFrame } from "./live-call-wire.ts";import type { ForkOrigin, TaskClosedBy, TaskOpenedBy } from "./task-provenance.ts"; import type { RoomThreadCloser } from "./room-threads.ts";import type { CompanionEndpointsSnapshot } from "./responses.ts";/** What a team bot's main chat is called, beside each person's own chats. */export const SHARED_CHAT_TITLE = "Shared chat";- export type { LiveCallRecord, LiveCallState, LiveCallStatus, LiveClient, LiveElevenLabsSession, LiveElevenLabsTransport, LiveEndReason, LiveFishRelayCommand, LiveFishRelayEvent, LiveFishSessionToken, LiveFishTransport, LiveGeminiSession, LiveGeminiTransport, LiveHistoryLimits, LiveKeySource, LiveProvider, LiveSettings, LiveSpokenLine } from "./live-call-wire.ts";-export type { LiveCallRecord, LiveCallState, LiveCallStatus, LiveClient, LiveCodexProgressFrame, LiveElevenLabsSession, LiveElevenLabsTransport, LiveEndReason, LiveFishRelayCommand, LiveFishRelayEvent, LiveFishSessionToken, LiveFishTransport, LiveGeminiSession, LiveGeminiTransport, LiveKeySource, LiveProvider, LiveSettings, LiveSpokenLine } from "./live-call-wire.ts";++export type { LiveCallRecord, LiveCallState, LiveCallStatus, LiveClient, LiveCodexProgressFrame, LiveElevenLabsSession, LiveElevenLabsTransport, LiveEndReason, LiveFishRelayCommand, LiveFishRelayEvent, LiveFishSessionToken, LiveFishTransport, LiveGeminiSession, LiveGeminiTransport, LiveHistoryLimits, LiveKeySource, LiveProvider, LiveSettings, LiveSpokenLine } from "./live-call-wire.ts";export type { ForkOrigin, TaskClosedBy, TaskOpenedBy } from "./task-provenance.ts";export type { AuthPairResponse, AuthSessionResponse, BotCreateResponse, BotsResponse, BotUpdateResponse, CompanionE2EDescriptor, CompanionEndpointsSnapshot, InstancesResponse, LoopbackSessionResponse, PairedDevice, PairedSession, PairRequest, PairResponse, RoomCreateResponse, RoomTaskCreateResponse, RoomTaskUpdateResponse, RoomUpdateResponse, SearchHit, SearchResponse, SignedInSessionResponse, TaskResponse, WireComputerControl, WireInstance, WireMessagePage, WireModelOption } from "./responses.ts";diff --cc server/index.tsindex 626073d24c,eeb0a7ff1e..4919de301f--- a/server/index.ts+++ b/server/index.ts@@@ -12277,7 -12277,7 +12277,7 @@@ function liveCallTitle(botId: string, tconst gate = threadTitleGate(bot);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, historyLimits: () => cfg.live });-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 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, historyLimits: () => cfg.live });const liveCalls = new LiveCallController({store,send: async ({ auth, botId, threadId, text, callId }) => {@@@ -12309,7 -12308,8 +12308,8 @@@return task.activity === "waiting-on-you" ? "waiting" : "working";},broadcast: (frame) => broadcast(frame, { adminOnly: true }),+ codexProgress: (frame) => deliverLiveCodexProgress(sseClients, frame),- settings: () => liveCallSettings(cfg), botVoice: (botId) => store.bot(botId)?.liveVoice,+ settings: (botId) => liveCallSettings(cfg, botId ? store.bot(botId)?.liveOverride : undefined), botVoice: (botId) => store.bot(botId)?.liveVoice,azureRefusal: (auth) => azureLiveCallRefusal(auth, { othersOnLoopback: adminActivityRecording() }),...liveWiring.calls,speakable: (text) => toUtterances(text),diff --cc server/live-call-controller.tsindex df33d1db3d,c6e2531802..3daea6c09c--- a/server/live-call-controller.ts+++ b/server/live-call-controller.ts@@@ -71,8 -71,9 +71,9 @@@ export interface LiveCallDepspersonKey?(auth: RequestAuth): string | undefined;activity(botId: string, threadId: string): LiveActivity;broadcast(frame: { kind: "live.call"; botId: string; threadId: string; call: LiveCallState | null }): void;+ codexProgress?(frame: LiveCodexProgressFrame): void;/** `endpoint` null, or a `setupProblem`, refuses the call with that message (409). */- settings(): { key: string; endpoint: LiveEndpoint | null; setupProblem?: string | null; provider?: LiveProvider; voice: string; geminiVoice?: string; readTypedReplies: boolean; idleMinutes: number };+ settings(botId?: string): { key: string; endpoint: LiveEndpoint | null; setupProblem?: string | null; provider?: LiveProvider; voice: string; geminiVoice?: string; readTypedReplies: boolean; idleMinutes: number; standby?: boolean; standbyIdleSeconds?: number };/** The called bot's own Live call voice, used over the app's when it is the call provider's. */botVoice?(botId: string): string | undefined;/** Why this caller may not hold a call through Azure OpenAI; null when they may. Required, so no wiring can leave it out. */@@@ -186,8 -188,16 +188,16 @@@ export class LiveCallControllerreturn this.call && this.call.state.status !== "ended" ? { ...this.call.state } : null;}+ codexRefusal(auth: RequestAuth, client: LiveClient = "desktop"): string | null {+ return this.deps.codexRefusal ? this.deps.codexRefusal(auth, client) : LIVE_CODEX_REFUSAL;+ }+async start(input: { auth: RequestAuth; device?: string; botId: string; botName: string; threadId: string; client: LiveClient; sdp?: string; relays?: readonly LiveRelayClient[] }): Promise<LiveCallStarted> {- const settings = this.deps.settings();+ const settings = this.deps.settings(input.botId);+ if (settings.provider === "codex" || settings.endpoint?.provider === "codex") {+ const refusal = this.codexRefusal(input.auth, input.client);+ if (refusal) throw new LiveSessionError(refusal, 403);+ }// First: someone refused here is not told about a running call, or sent to set Azure or a relayed service up.// The chosen relayed service comes before a key's endpoint, so its refusal and its mismatch check apply.const relayedChoice = relayedProvider(settings.provider);diff --cc server/live-config.tsindex 2dd305437f,27a59609d5..748cd05486--- a/server/live-config.ts+++ b/server/live-config.ts@@@ -1,6 -1,6 +1,7 @@@// Live calls' settings in config.json: schema, type and environment overrides, kept out of server/config.ts.import { z } from "zod";+import { liveHistoryLimitError, parseGeminiLiveModel } from "../shared/live-call.ts";+ import type { LiveProvider } from "../shared/wire.ts";export const LIVE_KEY_NEEDS_ENDPOINT = "Save the Azure endpoint first: a Live key works only with the endpoint it was saved for.";export const LIVE_KEY_NEEDS_CUSTOM_ENDPOINT = "Save the custom endpoint first: a Live key works only with the endpoint it was saved for.";@@@ -49,16 -44,14 +53,20 @@@ export interface LiveConfigelevenlabsAgentFor?: string;voice?: string;geminiVoice?: string;+ geminiModel?: string;readTypedReplies?: boolean;idleMinutes?: number;+ standby?: boolean;+ standbyIdleSeconds?: number;+ historyMessages?: number;+ historyMessageChars?: number;+ historyTotalChars?: number;}+ export function liveProvider(live: LiveConfig | undefined): LiveProvider | undefined {+ return live?.useCodex ? "codex" : live?.provider;+ }+/** Where a key saved now may go: "openai", "azure:<host>" or "custom:<host>"; null while Azure or a custom endpoint is chosen* with no endpoint to tie it to. Fish Audio, Gemini and ElevenLabs calls never use this key, so with any of them chosen it stays OpenAI's. */export function liveKeyTarget(live: LiveConfig | undefined): string | null {diff --cc server/live-session-wiring.tsindex 0ac417281a,e0ab377229..f7af63eddd--- a/server/live-session-wiring.ts+++ b/server/live-session-wiring.ts@@@ -1,4 -1,4 +1,5 @@@+import type { LiveHistoryLimits } from "../shared/wire.ts";+ import { createCodexLiveSession, type LiveCodexCli } from "./live-codex.ts";import { productName } from "./brand.ts";import type { LiveCallDeps } from "./live-call-controller.ts";import { openLiveSocket, relayedProvider } from "./live-call-controller.ts";@@@ -104,10 -104,14 +107,15 @@@ export function liveSessionWiring(inputfishRefusal: (auth) => fishLiveCallRefusal(auth, { othersOnLoopback: input.othersOnLoopback() }),geminiRefusal: (auth) => geminiLiveCallRefusal(auth, { othersOnLoopback: input.othersOnLoopback() }),elevenlabsRefusal: (auth) => elevenLabsLiveCallRefusal(auth, { othersOnLoopback: input.othersOnLoopback() }),- createSession: async ({ key, endpoint, sdp, botId, threadId, voice }) => {+ createSession: async ({ key, endpoint, sdp, botId, threadId, voice, standby, standbyIdleSeconds }) => {+ const historyLimits = input.historyLimits?.();+ if (endpoint.provider === "codex") {+ const config = input.codex?.();+ if (!config) throw new LiveSessionError("Set up the local Codex CLI in Settings → AI.", 503);+ return createCodexLiveSession({ ...config, sdp, voice });+ }if (endpoint.provider === "gemini") {- const session = await createGeminiLiveSession({ key, endpoint, voice, bot: input.bot(botId), history: input.history(threadId), cloudHome: input.cloudHome, fetchImpl });+ const session = await createGeminiLiveSession({ key, endpoint, voice, bot: input.bot(botId), history: input.history(threadId), cloudHome: input.cloudHome, historyLimits, fetchImpl });// Gemini has nothing to end: the session ends when the client closes it, and the token is single use.const { token } = relays.open(session.session_id, async () => undefined);return { sessionId: session.session_id, gemini: { type: "gemini", session, relayToken: token } };diff --cc server/live-settings.test.tsindex 9ca5c23093,d2f46d3ea6..8d15a05a72--- a/server/live-settings.test.ts+++ b/server/live-settings.test.ts@@@ -25,13 -18,19 +25,23 @@@ describe("live settings", () =>expect(JSON.stringify(settings)).not.toContain("sk-test");});+ it("uses Codex without forwarding the saved key and keeps the prior service readable", () => {+ const legacy = { provider: "azure" as const, azureEndpoint: "https://example.openai.azure.com", key: "synthetic-azure-key", keyFor: "azure:example.openai.azure.com" };+ const stored = { ...legacy, useCodex: true };+ expect(liveConfigSchema.omit({ useCodex: true }).parse(stored)).toEqual(legacy);+ expect(liveCallKey({ live: stored })).toBeNull();+ expect(liveSettingsFor({ live: stored })).toMatchObject({ provider: "codex", configured: true });+ expect(liveSettingsFor({ live: stored })).not.toHaveProperty("keySource");+ expect(liveCallKey({ live: liveConfigWithEnv(stored, { OMB_LIVE_PROVIDER: "azure" }) })).toEqual({ key: legacy.key, source: "live" });+ });+- it("reports a saved Gemini voice beside the GPT-Live one, and nothing when it is cleared", () => {- expect(liveSettingsFor({ live: { voice: "cedar", geminiVoice: "Kore" } } as AppConfig)).toMatchObject({ voice: "cedar", geminiVoice: "Kore" });- expect(liveSettingsFor({ live: { geminiVoice: "" } } as AppConfig)).not.toHaveProperty("geminiVoice");+ it("reports a saved Gemini voice and model beside the GPT-Live one, and nothing when cleared", () => {+ expect(liveSettingsFor({ live: { voice: "cedar", geminiVoice: "Kore", geminiModel: "gemini-3.1-flash-live-preview" } } as AppConfig))+ .toMatchObject({ voice: "cedar", geminiVoice: "Kore", geminiModel: "gemini-3.1-flash-live-preview" });+ expect(liveSettingsFor({ live: { geminiVoice: "", geminiModel: "" } } as AppConfig)).not.toHaveProperty("geminiVoice");+ expect(liveSettingsFor({ live: { geminiModel: "" } } as AppConfig)).not.toHaveProperty("geminiModel");+ expect(liveCallEndpoint({ live: { provider: "gemini", geminiModel: "gemini-3.1-flash-live-preview" } } as AppConfig, {})?.model)+ .toBe("gemini-3.1-flash-live-preview");});});diff --cc server/live-settings.tsindex 805be85207,c297dac587..27ca28961e--- a/server/live-settings.ts+++ b/server/live-settings.ts@@@ -1,8 -1,7 +1,8 @@@-import type { LiveKeySource, LiveProvider, LiveSettings } from "../shared/wire.ts";+import type { LiveHistoryLimits, LiveKeySource, LiveProvider, LiveSettings, WireBot } from "../shared/wire.ts";import { saveConfig, syncCredentialEnv, type AppConfig } from "./config.ts";import { azureLiveEndpoint, customLiveEndpoint, LIVE_NEEDS_AZURE, LIVE_NEEDS_CUSTOM, LIVE_NEEDS_ELEVENLABS, LIVE_NEEDS_FISH, LIVE_NEEDS_GEMINI, LIVE_NEEDS_KEY, openAiLiveEndpoint, type LiveEndpoint } from "./live-call.ts";- import { LIVE_STANDBY_IDLE_SECONDS_MAX, LIVE_STANDBY_IDLE_SECONDS_MIN, liveSavePatch, usableLiveKey, type LiveConfig as LiveConfigSection } from "./live-config.ts";-import { liveProvider, liveSavePatch, usableLiveKey, type LiveConfig as LiveConfigSection } from "./live-config.ts";++import { LIVE_STANDBY_IDLE_SECONDS_MAX, LIVE_STANDBY_IDLE_SECONDS_MIN, liveProvider, liveSavePatch, usableLiveKey, type LiveConfig as LiveConfigSection } from "./live-config.ts";+import { LIVE_STANDBY_IDLE_SECONDS_DEFAULT, resolveLiveHistoryLimits } from "../shared/live-call.ts";import { fishLiveEndpoint, usableFishAgent } from "./live-fish.ts";import { voiceCredential } from "./included-services.ts";import { elevenLabsLiveEndpoint, usableElevenLabsAgent } from "./live-elevenlabs.ts";@@@ -63,12 -66,8 +67,12 @@@ export function saveLiveSettings(cfg: P}/** What a call start reads, once: its key, endpoint and provider all come from this one reading. */-export function liveCallSettings(cfg: AppConfig) {- return { key: liveCallKey(cfg)?.key ?? "", endpoint: liveCallEndpoint(cfg), setupProblem: liveSetupProblem(cfg), ...liveSettingsFor(cfg) };+export function liveCallSettings(cfg: AppConfig, override?: WireBot["liveOverride"]) {- const effective = override ? { ...cfg, live: { ...cfg.live, provider: override.provider } } : cfg;++ const effective = override ? { ...cfg, live: { ...cfg.live, provider: override.provider, useCodex: false } } : cfg;+ const agentId = override?.provider === "fish" ? override.fishAgentId : undefined;+ const endpoint = agentId ? { ...fishLiveEndpoint(agentId), fixedAgent: true as const } : liveCallEndpoint(effective);+ const setupProblem = agentId && !endpoint?.model ? "The bot's Fish Audio agent ID is invalid." : liveSetupProblem(effective);+ return { key: liveCallKey(effective)?.key ?? "", endpoint, setupProblem, ...liveSettingsFor(effective) };}/** A caller without the admin scope learns which service calls use, not which Azure resource or custom endpoint. */diff --cc server/routes/live.tsindex f38acc6744,a4b9c1d9d5..73d39a3bec--- a/server/routes/live.ts+++ b/server/routes/live.ts@@@ -2,10 -2,10 +2,11 @@@import type { IncomingMessage } from "node:http";import { z } from "zod";import type { LiveFishRelayCommand, LiveFishRelayEvent, LiveProvider, LiveSettings } from "../../shared/wire.ts";-import { GEMINI_LIVE_VOICE_OPTIONS } from "../../shared/live-call.ts";+import { GEMINI_LIVE_VOICE_OPTIONS, liveHistoryLimitError, parseGeminiLiveModel } from "../../shared/live-call.ts";import { azureLiveDeployment, azureOpenAiRoot, customLiveApiBase, customLiveModel, LiveSessionError, MAX_SDP_BYTES } from "../live-call.ts";+import { LIVE_STANDBY_IDLE_SECONDS_MAX, LIVE_STANDBY_IDLE_SECONDS_MIN } from "../live-config.ts";import { LiveCallBusyError, type LiveCallController } from "../live-call-controller.ts";+ import { LIVE_CODEX_REFUSAL } from "../live-access.ts";import { RELAY_POLL_MS } from "../live-fish.ts";import { PASS, type RouteContext, type RouteHandler } from "./table.ts";@@@ -146,9 -139,11 +147,13 @@@ export function createLiveRoutes(deps:if (field === "customModel") return json(res, 400, { error: "The model may use letters, digits, '-', '_', '.', ':' and '/', up to 64 characters." });return json(res, 400, { error: "Those Live settings are not valid." });}+ if (parsed.data.provider === "codex") {+ const refusal = deps.calls.codexRefusal ? deps.calls.codexRefusal(auth) : LIVE_CODEX_REFUSAL;+ if (refusal) return json(res, 403, { error: refusal });+ }if (!Object.keys(parsed.data).length) return json(res, 400, { error: "nothing to save" });+ const historyError = liveHistoryLimitError(parsed.data, parsed.data.provider ?? deps.settings().provider);+ if (historyError) return json(res, 400, { error: historyError });return json(res, 200, { live: await deps.saveSettings(parsed.data) });}diff --cc server/tts/config.tsindex 0000000000,fb2c7c54a1..bc96f586aemode 000000,100644..100644--- a/server/tts/config.ts+++ b/server/tts/config.ts@@@ -1,0 -1,28 +1,31 @@@+ import { z } from "zod";+ import { hearingConfigShape } from "./hearing-config.ts";++import { FISH_TTS_MODELS, fishSynthesisSchema } from "../../shared/fish-voice.ts";++import { VOICE_PLAYBACK_RATES, type VoicePlaybackRate } from "../../shared/voice-playback.ts";+-export const FISH_TTS_MODELS = ["s2.1-pro", "s2.1-pro-free"] as const;-export type FishTtsModel = (typeof FISH_TTS_MODELS)[number];++export { FISH_TTS_MODELS, type FishTtsModel } from "../../shared/fish-voice.ts";++ export const voiceProviders = ["elevenlabs", "fish", "system", "chatterbox", "xai", "gemini", "openai", "deepseek", "cartesia"] as const;+ export type VoiceProvider = (typeof voiceProviders)[number];+ const key = z.string().trim().optional();++ export const ttsConfigSchema = z.object({+ key,+ fishKey: key,+ geminiKey: key,+ cartesiaKey: key,+ cartesiaModel: z.string().trim().max(100).optional(),+ cartesiaLanguage: z.string().trim().regex(/^(?:[a-z]{2,3}(?:-[A-Z]{2})?)?$/, "Use a Cartesia language code such as nl or en-GB").optional(),+ voice: z.string().optional(),+ provider: z.enum(voiceProviders).optional(),+ baseUrl: z.string().trim().max(2048)+ .refine((value) => !value || /^https?:\/\//i.test(value), "the Chatterbox server address must start with http:// or https://").optional(),+ model: z.string().optional(),+ ...hearingConfigShape,+ fishModel: z.enum(FISH_TTS_MODELS).optional(),++ fishSynthesis: fishSynthesisSchema.optional(),+ everyReply: z.boolean().optional(),++ playbackRate: z.number().refine((value): value is VoicePlaybackRate => VOICE_PLAYBACK_RATES.includes(value as VoicePlaybackRate), "playbackRate must be a supported voice speed").optional(),+ });++ export type TtsConfig = z.output<typeof ttsConfigSchema>;diff --cc shared/app-frame/app-host.htmlindex 4863df20c9,4863df20c9..441e07ce82--- a/shared/app-frame/app-host.html+++ b/shared/app-frame/app-host.html@@@ -1,10 -1,10 +1,10 @@@--<!-- mausbot app-host v1 sha256:5a7eda35e9359dca4a7a4556663a65439a861c8c7e976cbfef77ec34274f25ac -->++<!-- mausbot app-host v1 sha256:24cc00f4da963d9e1e19375d3668c6425a685ec2757b5740cab0fcc9bf2cc944 --><!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"><meta name="color-scheme" content="light dark"><title>App</title><style>html,body{margin:0;padding:0;background:transparent;overflow:hidden}iframe{display:block;width:100%;border:0;background:transparent}</style></head><body>--<script id="mausbot-app-host">(()=>{var U="2026-01-26";var T={htmlBytes:256*1024,title:80,fallback:1500,fallbackExcerpt:600,heightMin:80,heightMax:720,messageText:4e3,contextText:4e3,doneText:300,mcpHtmlBytes:2*1024*1024,rpcArgumentsBytes:64*1024,rpcResourceBytes:8*1024*1024,messagesPerHour:20,rpcPerMinute:60,pageQueryRows:5e3,pageQueryBytes:1e6,pageQuerySqlChars:2e4,pageQueryMs:1e4,pageStateKeyChars:200,pageStateValueBytes:64*1024,pageStateBytes:256*1024,pageStateKeys:200,pageConnectors:8,pageConnectorTools:24,pageConnectorArgsBytes:64*1024,pageConnectorResultBytes:512*1024,pageConnectorMs:6e4,pageConnectorErrorChars:1e3,pageConnectorCallsPerMinute:30,connectorCallsPerMinute:60};var E="In a room, pages, apps and widgets are view-only: they cannot send messages or tell a bot what anyone sees.";function N(e){let t=0;for(let r=0;r<e.length;r+=1){let a=e.charCodeAt(r);if(a<128)t+=1;else if(a<2048)t+=2;else if(a>=55296&&a<=56319&&r+1<e.length){let l=e.charCodeAt(r+1);l>=56320&&l<=57343?(t+=4,r+=1):t+=3}else t+=3}return t}var $=["tools/call","tools/list","resources/read","resources/list"],W=["mausbot/data/query","mausbot/state/get","mausbot/state/set","mausbot/state/keys","mausbot/connectors/call","mausbot/connectors/list"];function j(e){return e==="mausbot/data/query"?"data":e.startsWith("mausbot/connectors/")?"connectors":"state"}var L=-32601,M=-32602,f=-32e3;var m={messageBytes:1e6,minHeight:48,defaultHeight:160,maxHeight:720,linkChars:2048,teardownMs:1e3,engagedTouchMs:1e4,contextCoalesceMs:1e3,logsPerMinute:50,rates:{message:[[3e3,1],[6e5,10]],openLink:[[2e3,1]],rpc:[[1e4,10],[6e5,120]]}};function se(e){let t=J(e);return{...e.can.openLinks?{openLinks:{}}:{},logging:{},...e.can.modelContext?{updateModelContext:{text:{},structuredContent:{}}}:{},...e.can.message?{message:{text:{}}}:{},...t&&e.can.serverTools?{serverTools:{}}:{},...t&&e.can.serverResources?{serverResources:{}}:{},sandbox:{permissions:{},csp:{connectDomains:[...e.network.connect],resourceDomains:[...e.network.resources]}}}}function J(e){return!!e.tool}function v(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function z(e){return typeof e=="string"&&e.length<=200||typeof e=="number"&&Number.isFinite(e)}function G(e){let t;try{t=JSON.stringify(e)}catch{return null}return t===void 0?null:t.length*3<=m.messageBytes?t.length:N(t)}function ie(e){if(!v(e)||e.jsonrpc!=="2.0")return null;let t=G(e);return t===null||t>m.messageBytes||e.params!==void 0&&!v(e.params)?null:typeof e.method=="string"?!e.method||e.method.length>200||"id"in e&&!z(e.id)?null:e:e.method!==void 0||!z(e.id)?null:"result"in e||v(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"?e:null}function H(e,t){let r=[],a=Math.max(...e.map(([l])=>l));return{take(){let l=t();for(;r.length&&l-r[0]>=a;)r.shift();for(let[g,d]of e)if(r.filter(R=>l-R<g).length>=d)return!1;return r.push(l),!0}}}function B(e){return v(e)&&typeof e.code=="number"&&Number.isInteger(e.code)?{code:e.code,message:typeof e.message=="string"&&e.message?e.message:"The host refused this."}:{code:f,message:e instanceof Error&&e.message?e.message:"The host could not do that."}}function ae(e){if(typeof e!="string"||!e||e.length>m.linkChars)return null;let t;try{t=new URL(e)}catch{return null}return t.protocol!=="http:"&&t.protocol!=="https:"||t.username||t.password?null:t.href.length<=m.linkChars?t.href:null}function le(e,t){return e==="connectors"?t?"In a room, a page cannot call connected apps.":'This page declared no connector tools: show it with uses naming each tool, e.g. ["gmail:GMAIL_FETCH_EMAILS"].':t?"In a room, a page cannot read its bot's data or keep state.":`This page did not declare "${e}": show it with uses: ["${e}"] to ${e==="data"?"read its bot's data":"keep state"}.`}function V(e,t){let r=e.tool,a=e.name??e.connector??e.server;if(typeof r!="string"||!r||r.length>128||typeof a!="string"||!a||a.length>68)return null;let l=a.trim().toLowerCase();return typeof e.server=="string"||l.startsWith("mcp:")?{server:l.replace(/^mcp:/,""),tool:r}:typeof e.connector=="string"?{connector:l,tool:r}:!t.some(d=>"connector"in d&&d.connector===l)&&t.some(d=>"server"in d&&d.server===l)?{server:l,tool:r}:{connector:l,tool:r}}function pe(e,t){return e.find(r=>("server"in t?"server"in r&&r.server===t.server:"connector"in r&&r.connector===t.connector)&&r.tools.includes(t.tool))??null}function ue(e){let t="server"in e?`mcp:${e.server}:${e.tool}`:`${e.connector}:${e.tool}`;return`This page did not declare ${e.tool}: list "${t}" in show_html uses to call it.`}function de(e,t){let r=a=>typeof a=="string"&&a.length>0&&a.length<=T.pageStateKeyChars;switch(e){case"mausbot/data/query":return typeof t.sql!="string"||!t.sql.trim()||t.sql.length>T.pageQuerySqlChars?`mausbot.data.query needs one SELECT of at most ${T.pageQuerySqlChars} characters.`:t.params===void 0||Array.isArray(t.params)||v(t.params)?null:"mausbot.data.query params: a list for ? or $1, or an object for $name.";case"mausbot/state/get":case"mausbot/state/set":return r(t.key)?null:`A state key is text of 1 to ${T.pageStateKeyChars} characters.`;case"mausbot/state/keys":case"mausbot/connectors/list":return null;case"mausbot/connectors/call":{if(!V(t,[]))return"mausbot.connectors.call needs (connector or server, tool name, arguments object).";if(t.arguments!==void 0&&!v(t.arguments))return"mausbot.connectors.call arguments: one object.";let a=G(t.arguments??{});return a===null||a>T.pageConnectorArgsBytes?`mausbot.connectors.call arguments: at most ${T.pageConnectorArgsBytes} bytes of JSON.`:null}}}function ce(e,t,r,a){return e==="mausbot/connectors/list"?{}:r?{...r,arguments:v(t.arguments)?t.arguments:{},engaged:a()}:t}function ge(e){if(!e||e.role!=="user"||!Array.isArray(e.content)||e.content.length===0)return null;let t=[];for(let a of e.content){if(!v(a)||a.type!=="text"||typeof a.text!="string")return null;t.push(a.text)}let r=t.join(`--`).trim();return r&&r.length<=T.messageText?r:null}function K(e){let{doc:t,adapter:r}=e,a=J(t),l=e.timers??{set:(n,p)=>setTimeout(n,p),clear:n=>clearTimeout(n)},g=()=>r.now(),d={...e.hostContext,...a&&t.tool?{toolInfo:{tool:t.tool}}:{}},R=null,S=!1,y=!1,k=!1,I=!1,O=0,w=new Map,b={message:H(m.rates.message,g),openLink:H(m.rates.openLink,g),rpc:H(m.rates.rpc,g),log:H([[6e4,m.logsPerMinute]],g)},A=null,o=null,u=-1/0,h=n=>{if(!k)try{r.post(n)}catch{}},C=(n,p)=>h({jsonrpc:"2.0",id:n,result:p}),i=(n,p,s)=>h({jsonrpc:"2.0",id:n,error:{code:p,message:s}}),q=()=>{let n=e.limits?.maxHeight,p=d.containerDimensions?.maxHeight,s=typeof n=="number"&&n>0?n:typeof p=="number"&&p>0?p:m.maxHeight;return Math.max(m.minHeight,s)},F=()=>{if(o=null,k||!A)return;let n=A;A=null,u=g(),Promise.resolve().then(()=>r.setContext(n)).catch(()=>{})},Y=async()=>{if(o===null||!A)return;l.clear(o),o=null;let n=A;A=null,u=g();try{await r.setContext(n)}catch{}},X=()=>{if(a&&!I&&(I=!0,h({jsonrpc:"2.0",method:"ui/notifications/tool-input",params:{arguments:t.toolInput??{}}}),h({jsonrpc:"2.0",method:"ui/notifications/tool-result",params:t.toolResult??{content:[]}})),R){let n=R;R=null,h({jsonrpc:"2.0",method:"ui/notifications/host-context-changed",params:n})}},ee=async(n,p,s)=>{if(!a)return i(n,L,"Method not found");if(!(p.startsWith("tools/")?t.can.serverTools:t.can.serverResources))return i(n,f,t.room?E:t.blocked?.text??"This app cannot reach its server right now.");if(p==="tools/call"&&(typeof s.name!="string"||!s.name||s.arguments!==void 0&&!v(s.arguments)))return i(n,M,"tools/call needs {name, arguments?}.");if(p==="resources/read"&&typeof s.uri!="string")return i(n,M,"resources/read needs {uri}.");if(!b.rpc.take())return i(n,f,"Too many calls from this app. Wait a moment.");try{let x=await r.callRpc(p,s);C(n,x??{})}catch(x){let P=B(x);i(n,P.code,P.message)}},te=async(n,p,s)=>{if(a)return i(n,L,"Method not found");let c=j(p),x=c==="connectors"?t.can.connectors??[]:[];if(c==="connectors"?!x.length:!t.can[c])return i(n,f,le(c,!!t.room));let P=de(p,s);if(P)return i(n,M,P);let _=p==="mausbot/connectors/call"?V(s,x):null;if(_&&!pe(x,_))return i(n,f,ue(_));if(!b.rpc.take())return i(n,f,"Too many calls from this page. Wait a moment.");try{C(n,await r.callRpc(p,ce(p,s,_,()=>r.engaged()))??{})}catch(oe){let D=B(oe);i(n,D.code,D.message)}},ne=async(n,p,s)=>{if(p==="ui/initialize")return S=!0,C(n,{protocolVersion:U,hostInfo:{name:"mausbot",version:e.hostVersion},hostCapabilities:se(t),hostContext:d});if(y)switch(p){case"ping":return C(n,{});case"ui/request-display-mode":return C(n,{mode:"inline"});case"ui/open-link":{if(!t.can.openLinks)return i(n,f,"This app cannot open links here.");if(!r.engaged())return i(n,f,"Links open only after the person clicks in the app.");let c=ae(s?.url);if(!c)return i(n,M,"Only http and https links of at most 2,048 characters, without a user name or password, can be opened.");if(!b.openLink.take())return i(n,f,"Too many links from this app. Wait a moment.");try{return await r.openLink(c),C(n,{})}catch(x){return i(n,f,B(x).message)}}case"ui/message":{if(!t.can.message)return i(n,f,t.room?E:"This app cannot send messages here.");if(!r.engaged())return i(n,f,"Messages are sent only after the person clicks in the app.");let c=ge(s);if(c===null)return i(n,M,`Only text messages of 1 to ${T.messageText} characters can be sent.`);if(!b.message.take())return i(n,f,"Too many messages from this app. Wait a moment.");try{return await Y(),await r.sendMessage(c),C(n,{})}catch(x){return i(n,f,B(x).message)}}case"ui/update-model-context":{if(!t.can.modelContext)return i(n,f,t.room?E:"This app cannot update the model's context here.");if(s?.content!==void 0&&!Array.isArray(s.content)||s?.structuredContent!==void 0&&!v(s.structuredContent))return i(n,M,"ui/update-model-context takes {content?, structuredContent?}.");if(A={...Array.isArray(s?.content)?{content:s.content}:{},...v(s?.structuredContent)?{structuredContent:s.structuredContent}:{}},o===null){let c=u+m.contextCoalesceMs-g();c<=0?F():o=l.set(F,c)}return C(n,{})}default:return $.includes(p)?ee(n,p,s??{}):W.includes(p)?te(n,p,s??{}):i(n,L,"Method not found")}},re=(n,p)=>{if(n==="ui/notifications/initialized"){if(!S||y)return;y=!0,X();return}if(y)switch(n){case"ui/notifications/size-changed":{let s=p?.height;if(typeof s!="number"||!Number.isFinite(s))return;r.resize(Math.round(Math.min(q(),Math.max(m.minHeight,s))));return}case"notifications/message":e.log&&b.log.take()&&e.log(p);return;case"ui/notifications/request-teardown":r.teardownRequested();return;default:}};return{get initialized(){return y},handleMessage(n){if(k)return;let p=e.source();if(p==null||n.source!==p)return;let s=ie(n.data);if(!s)return;if("method"in s){"id"in s?ne(s.id,s.method,s.params):re(s.method,s.params);return}let c=w.get(s.id);c&&(w.delete(s.id),c(s))},contextChanged(n){k||(d={...d,...n},y?h({jsonrpc:"2.0",method:"ui/notifications/host-context-changed",params:n}):S&&(R={...R,...n}))},teardown(){return k||!y?Promise.resolve():new Promise(n=>{let p=`host:${++O}`,s=!1,c=()=>{s||(s=!0,w.delete(p),l.clear(x),n())},x=l.set(c,m.teardownMs);w.set(p,c),h({jsonrpc:"2.0",id:p,method:"ui/resource-teardown",params:{}})})},dispose(){k=!0,o!==null&&l.clear(o),o=null;for(let n of w.values())n({jsonrpc:"2.0",id:"",result:{}});w.clear()}}}var Q=1;function me(e){let r=e.webkit?.messageHandlers?.appHost;if(r&&typeof r.postMessage=="function")return{send:l=>r.postMessage(l)};let a=e.appHost;return a&&typeof a.postMessage=="function"?{send:l=>a.postMessage(JSON.stringify(l)),listen:l=>{a.onmessage=g=>{if(typeof g.data!="string")return;let d;try{d=JSON.parse(g.data)}catch{return}d&&typeof d=="object"&&d.v===Q&&l(d)}}}:null}function fe(e,t){let r=t??me(e);if(!r)return null;let a=e.document,l=null,g=null,d=0,R=!1,S=0,y=new Map,k=o=>{try{r.send(o)}catch{}},I=(o,u)=>new Promise((h,C)=>{let i=`c${++S}`;y.set(i,{resolve:h,reject:C}),k({v:1,type:"call",callId:i,op:o,params:u})}),O=()=>{for(let o of y.values())o.reject({code:-32e3,message:"This app was closed."});y.clear()};e.addEventListener("message",o=>{l&&(l.handleMessage({source:o.source,data:o.data}),!R&&l.initialized&&(R=!0,k({v:1,type:"initialized"})))});let w=()=>{l?.dispose(),l=null,g?.remove(),g=null,R=!1,O()},b={load(o){if(!o||o.v!==Q||!o.doc||typeof o.doc.srcdoc!="string")return;w(),typeof o.engagedAt=="number"&&(d=o.engagedAt);let u=a.createElement("iframe");u.setAttribute("sandbox","allow-scripts allow-forms"),u.setAttribute("referrerpolicy","no-referrer"),u.setAttribute("title","App");let h=Math.max(m.minHeight,Math.round(o.limits?.height??m.defaultHeight));u.style.height=`${h}px`,l=K({doc:o.doc,hostContext:o.hostContext??{},hostVersion:o.hostVersion??"phone",...o.limits?.maxHeight?{limits:{maxHeight:o.limits.maxHeight}}:{},source:()=>u.contentWindow,adapter:{post:i=>u.contentWindow?.postMessage(i,"*"),callRpc:(i,q)=>I("rpc",{method:i,params:q}),sendMessage:async i=>{await I("message",{text:i})},openLink:async i=>{await I("open-link",{url:i})},setContext:async i=>{await I("context",{...i})},resize:i=>{u.style.height=`${i}px`,k({v:1,type:"size",height:i})},engaged:()=>Date.now()-d<=m.engagedTouchMs,teardownRequested:()=>k({v:1,type:"teardown-request"}),now:()=>Date.now()}}),g=u,u.srcdoc=o.doc.srcdoc,a.body.appendChild(u)},contextChanged(o){l?.contextChanged(o??{})},engaged(o){typeof o=="number"&&Number.isFinite(o)&&(d=Math.max(d,o))},async teardown(){l&&await l.teardown(),w(),k({v:1,type:"torn-down"})},reply(o,u){let h=y.get(o);h&&(y.delete(o),u&&"error"in u&&u.error?h.reject(u.error):h.resolve(u&&"result"in u?u.result:void 0))}};r.listen?.(o=>{switch(o.call){case"load":return b.load(o.args[0]);case"contextChanged":return b.contextChanged(o.args[0]);case"engaged":return b.engaged(o.args[0]);case"teardown":return void b.teardown();case"reply":return b.reply(o.args[0],o.args[1])}});let A=e;return A.appHost&&typeof A.appHost.postMessage=="function"||(A.appHost=b),A.mausbotAppHost=b,k({v:1,type:"ready"}),b}function Z(){typeof window<"u"&&fe(window)}Z();})();</script>++<script id="mausbot-app-host">(()=>{var U="2026-01-26";var T={htmlBytes:256*1024,title:80,fallback:1500,fallbackExcerpt:600,heightMin:80,heightMax:720,messageText:4e3,contextText:4e3,doneText:300,mcpHtmlBytes:2*1024*1024,rpcArgumentsBytes:64*1024,rpcResourceBytes:8*1024*1024,messagesPerHour:20,rpcPerMinute:60,pageQueryRows:5e3,pageQueryBytes:1e6,pageQuerySqlChars:2e4,pageQueryMs:1e4,pageStateKeyChars:200,pageStateValueBytes:64*1024,pageStateBytes:256*1024,pageStateKeys:200,pageConnectors:8,pageConnectorTools:24,pageConnectorArgsBytes:64*1024,pageConnectorResultBytes:512*1024,pageConnectorMs:6e4,pageConnectorErrorChars:1e3,pageConnectorCallsPerMinute:30,connectorCallsPerMinute:60};var E="In a room, pages, apps and widgets are view-only: they cannot send messages or tell a bot what anyone sees.";function N(e){let t=0;for(let r=0;r<e.length;r+=1){let a=e.charCodeAt(r);if(a<128)t+=1;else if(a<2048)t+=2;else if(a>=55296&&a<=56319&&r+1<e.length){let l=e.charCodeAt(r+1);l>=56320&&l<=57343?(t+=4,r+=1):t+=3}else t+=3}return t}var $=["tools/call","tools/list","resources/read","resources/list"],W=["mausbot/data/query","mausbot/state/get","mausbot/state/set","mausbot/state/keys","mausbot/connectors/call","mausbot/connectors/list"];function j(e){return e==="mausbot/data/query"?"data":e.startsWith("mausbot/connectors/")?"connectors":"state"}var L=-32601,M=-32602,f=-32e3;var m={messageBytes:1e6,minHeight:48,defaultHeight:160,maxHeight:720,linkChars:2048,teardownMs:1e3,engagedTouchMs:1e4,contextCoalesceMs:1e3,logsPerMinute:50,rates:{message:[[3e3,1],[6e5,10]],openLink:[[2e3,1]],rpc:[[1e4,10],[6e5,120]]}};function se(e){let t=J(e);return{...e.can.openLinks?{openLinks:{}}:{},logging:{},...e.can.modelContext?{updateModelContext:{text:{},structuredContent:{}}}:{},...e.can.message?{message:{text:{}}}:{},...t&&e.can.serverTools?{serverTools:{}}:{},...t&&e.can.serverResources?{serverResources:{}}:{},sandbox:{permissions:{},csp:{connectDomains:[...e.network.connect],resourceDomains:[...e.network.resources]}}}}function J(e){return!!e.tool}function C(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function z(e){return typeof e=="string"&&e.length<=200||typeof e=="number"&&Number.isFinite(e)}function G(e){let t;try{t=JSON.stringify(e)}catch{return null}return t===void 0?null:t.length*3<=m.messageBytes?t.length:N(t)}function ie(e){if(!C(e)||e.jsonrpc!=="2.0")return null;let t=G(e);return t===null||t>m.messageBytes||e.params!==void 0&&!C(e.params)?null:typeof e.method=="string"?!e.method||e.method.length>200||"id"in e&&!z(e.id)?null:e:e.method!==void 0||!z(e.id)?null:"result"in e||C(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"?e:null}function B(e,t){let r=[],a=Math.max(...e.map(([l])=>l));return{take(){let l=t();for(;r.length&&l-r[0]>=a;)r.shift();for(let[g,d]of e)if(r.filter(R=>l-R<g).length>=d)return!1;return r.push(l),!0}}}function H(e){return C(e)&&typeof e.code=="number"&&Number.isInteger(e.code)?{code:e.code,message:typeof e.message=="string"&&e.message?e.message:"The host refused this."}:{code:f,message:e instanceof Error&&e.message?e.message:"The host could not do that."}}function ae(e){if(typeof e!="string"||!e||e.length>m.linkChars)return null;let t;try{t=new URL(e)}catch{return null}return t.protocol!=="http:"&&t.protocol!=="https:"||t.username||t.password?null:t.href.length<=m.linkChars?t.href:null}function le(e,t){return e==="connectors"?t?"In a room, a page cannot call connected apps.":'This page declared no connector tools: show it with uses naming each tool, e.g. ["gmail:GMAIL_FETCH_EMAILS"].':t?"In a room, a page cannot read its bot's data or keep state.":`This page did not declare "${e}": show it with uses: ["${e}"] to ${e==="data"?"read its bot's data":"keep state"}.`}function V(e,t){let r=e.tool,a=e.name??e.connector??e.server;if(typeof r!="string"||!r||r.length>128||typeof a!="string"||!a||a.length>68)return null;let l=a.trim().toLowerCase();return typeof e.server=="string"||l.startsWith("mcp:")?{server:l.replace(/^mcp:/,""),tool:r}:typeof e.connector=="string"?{connector:l,tool:r}:!t.some(d=>"connector"in d&&d.connector===l)&&t.some(d=>"server"in d&&d.server===l)?{server:l,tool:r}:{connector:l,tool:r}}function pe(e,t){return e.find(r=>("server"in t?"server"in r&&r.server===t.server:"connector"in r&&r.connector===t.connector)&&r.tools.includes(t.tool))??null}function ue(e){let t="server"in e?`mcp:${e.server}:${e.tool}`:`${e.connector}:${e.tool}`;return`This page did not declare ${e.tool}: list "${t}" in show_html uses to call it.`}function de(e,t){let r=a=>typeof a=="string"&&a.length>0&&a.length<=T.pageStateKeyChars;switch(e){case"mausbot/data/query":return typeof t.sql!="string"||!t.sql.trim()||t.sql.length>T.pageQuerySqlChars?`mausbot.data.query needs one SELECT of at most ${T.pageQuerySqlChars} characters.`:t.params===void 0||Array.isArray(t.params)||C(t.params)?null:"mausbot.data.query params: a list for ? or $1, or an object for $name.";case"mausbot/state/get":case"mausbot/state/set":return r(t.key)?null:`A state key is text of 1 to ${T.pageStateKeyChars} characters.`;case"mausbot/state/keys":case"mausbot/connectors/list":return null;case"mausbot/connectors/call":{if(!V(t,[]))return"mausbot.connectors.call needs (connector or server, tool name, arguments object).";if(t.arguments!==void 0&&!C(t.arguments))return"mausbot.connectors.call arguments: one object.";let a=G(t.arguments??{});return a===null||a>T.pageConnectorArgsBytes?`mausbot.connectors.call arguments: at most ${T.pageConnectorArgsBytes} bytes of JSON.`:null}}}function ce(e,t,r,a){return e==="mausbot/connectors/list"?{}:r?{...r,arguments:C(t.arguments)?t.arguments:{},engaged:a()}:t}function ge(e){if(!e||e.role!=="user"||!Array.isArray(e.content)||e.content.length===0)return null;let t=[];for(let a of e.content){if(!C(a)||a.type!=="text"||typeof a.text!="string")return null;t.push(a.text)}let r=t.join(`++`).trim();return r&&r.length<=T.messageText?r:null}function K(e){let{doc:t,adapter:r}=e,a=J(t),l=e.timers??{set:(n,p)=>setTimeout(n,p),clear:n=>clearTimeout(n)},g=()=>r.now(),d={...e.hostContext,...a&&t.tool?{toolInfo:{tool:t.tool}}:{}},R=null,S=!1,y=!1,k=!1,I=!1,O=0,w=new Map,b={message:B(m.rates.message,g),openLink:B(m.rates.openLink,g),rpc:B(m.rates.rpc,g),log:B([[6e4,m.logsPerMinute]],g)},A=null,o=null,u=-1/0,h=n=>{if(!k)try{r.post(n)}catch{}},v=(n,p)=>h({jsonrpc:"2.0",id:n,result:p}),i=(n,p,s)=>h({jsonrpc:"2.0",id:n,error:{code:p,message:s}}),q=()=>{let n=e.limits?.maxHeight,p=d.containerDimensions?.maxHeight,s=typeof n=="number"&&n>0?n:typeof p=="number"&&p>0?p:m.maxHeight;return Math.max(m.minHeight,s)},F=()=>{if(o=null,k||!A)return;let n=A;A=null,u=g(),Promise.resolve().then(()=>r.setContext(n)).catch(()=>{})},Y=async()=>{if(o===null||!A)return;l.clear(o),o=null;let n=A;A=null,u=g();try{await r.setContext(n)}catch{}},X=()=>{if(a&&!I&&(I=!0,h({jsonrpc:"2.0",method:"ui/notifications/tool-input",params:{arguments:t.toolInput??{}}}),h({jsonrpc:"2.0",method:"ui/notifications/tool-result",params:t.toolResult??{content:[]}})),R){let n=R;R=null,h({jsonrpc:"2.0",method:"ui/notifications/host-context-changed",params:n})}},ee=async(n,p,s)=>{if(!a)return i(n,L,"Method not found");if(!(p.startsWith("tools/")?t.can.serverTools:t.can.serverResources))return i(n,f,t.room?E:t.blocked?.text??"This app cannot reach its server right now.");if(p==="tools/call"&&(typeof s.name!="string"||!s.name||s.arguments!==void 0&&!C(s.arguments)))return i(n,M,"tools/call needs {name, arguments?}.");if(p==="resources/read"&&typeof s.uri!="string")return i(n,M,"resources/read needs {uri}.");if(!b.rpc.take())return i(n,f,"Too many calls from this app. Wait a moment.");try{let x=await r.callRpc(p,s);v(n,x??{})}catch(x){let P=H(x);i(n,P.code,P.message)}},te=async(n,p,s)=>{if(a)return i(n,L,"Method not found");let c=j(p),x=c==="connectors"?t.can.connectors??[]:[];if(c==="connectors"?!x.length:!t.can[c])return i(n,f,le(c,!!t.room));let P=de(p,s);if(P)return i(n,M,P);let _=p==="mausbot/connectors/call"?V(s,x):null;if(_&&!pe(x,_))return i(n,f,ue(_));if(!b.rpc.take())return i(n,f,"Too many calls from this page. Wait a moment.");try{v(n,await r.callRpc(p,ce(p,s,_,()=>r.engaged()))??{})}catch(oe){let D=H(oe);i(n,D.code,D.message)}},ne=async(n,p,s)=>{if(p==="ui/initialize")return S=!0,v(n,{protocolVersion:U,hostInfo:{name:"mausbot",version:e.hostVersion},hostCapabilities:se(t),hostContext:d});if(y)switch(p){case"ping":return v(n,{});case"ui/request-display-mode":return v(n,{mode:"inline"});case"ui/open-link":{if(!t.can.openLinks)return i(n,f,"This app cannot open links here.");if(!r.engaged())return i(n,f,"Links open only after the person clicks in the app.");let c=ae(s?.url);if(!c)return i(n,M,"Only http and https links of at most 2,048 characters, without a user name or password, can be opened.");if(!b.openLink.take())return i(n,f,"Too many links from this app. Wait a moment.");try{return await r.openLink(c),v(n,{})}catch(x){return i(n,f,H(x).message)}}case"ui/message":{if(!t.can.message)return i(n,f,t.room?E:"This app cannot send messages here.");if(!r.engaged())return i(n,f,"Messages are sent only after the person clicks in the app.");let c=ge(s);if(c===null)return i(n,M,`Only text messages of 1 to ${T.messageText} characters can be sent.`);if(!b.message.take())return i(n,f,"Too many messages from this app. Wait a moment.");try{return await Y(),await r.sendMessage(c),v(n,{})}catch(x){return i(n,f,H(x).message)}}case"ui/update-model-context":{if(!t.can.modelContext)return i(n,f,t.room?E:"This app cannot update the model's context here.");if(s?.content!==void 0&&!Array.isArray(s.content)||s?.structuredContent!==void 0&&!C(s.structuredContent))return i(n,M,"ui/update-model-context takes {content?, structuredContent?}.");if(A={...Array.isArray(s?.content)?{content:s.content}:{},...C(s?.structuredContent)?{structuredContent:s.structuredContent}:{}},o===null){let c=u+m.contextCoalesceMs-g();c<=0?F():o=l.set(F,c)}return v(n,{})}default:return $.includes(p)?ee(n,p,s??{}):W.includes(p)?te(n,p,s??{}):i(n,L,"Method not found")}},re=(n,p)=>{if(n==="ui/notifications/initialized"){if(!S||y)return;y=!0,X();return}if(y)switch(n){case"ui/notifications/size-changed":{let s=p?.height;if(typeof s!="number"||!Number.isFinite(s))return;r.resize(Math.round(Math.min(q(),Math.max(m.minHeight,s))));return}case"notifications/message":e.log&&b.log.take()&&e.log(p);return;case"ui/notifications/request-teardown":r.teardownRequested();return;default:}};return{get initialized(){return y},handleMessage(n){if(k)return;let p=e.source();if(p==null||n.source!==p)return;let s=ie(n.data);if(!s)return;if("method"in s){"id"in s?ne(s.id,s.method,s.params):re(s.method,s.params);return}let c=w.get(s.id);c&&(w.delete(s.id),c(s))},contextChanged(n){k||(d={...d,...n},y?h({jsonrpc:"2.0",method:"ui/notifications/host-context-changed",params:n}):S&&(R={...R,...n}))},teardown(){return k||!y?Promise.resolve():new Promise(n=>{let p=`host:${++O}`,s=!1,c=()=>{s||(s=!0,w.delete(p),l.clear(x),n())},x=l.set(c,m.teardownMs);w.set(p,c),h({jsonrpc:"2.0",id:p,method:"ui/resource-teardown",params:{}})})},dispose(){k=!0,o!==null&&l.clear(o),o=null;for(let n of w.values())n({jsonrpc:"2.0",id:"",result:{}});w.clear()}}}var Q=1;function me(e){let r=e.webkit?.messageHandlers?.appHost;if(r&&typeof r.postMessage=="function")return{send:l=>r.postMessage(l)};let a=e.appHost;return a&&typeof a.postMessage=="function"?{send:l=>a.postMessage(JSON.stringify(l)),listen:l=>{a.onmessage=g=>{if(typeof g.data!="string")return;let d;try{d=JSON.parse(g.data)}catch{return}d&&typeof d=="object"&&d.v===Q&&l(d)}}}:null}function fe(e,t){let r=t??me(e);if(!r)return null;let a=e.document,l=null,g=null,d=0,R=!1,S=0,y=new Map,k=o=>{try{r.send(o)}catch{}},I=(o,u)=>new Promise((h,v)=>{let i=`c${++S}`;y.set(i,{resolve:h,reject:v}),k({v:1,type:"call",callId:i,op:o,params:u})}),O=()=>{for(let o of y.values())o.reject({code:-32e3,message:"This app was closed."});y.clear()};e.addEventListener("message",o=>{l&&(l.handleMessage({source:o.source,data:o.data}),!R&&l.initialized&&(R=!0,k({v:1,type:"initialized"})))});let w=()=>{l?.dispose(),l=null,g?.remove(),g=null,R=!1,O()},b={load(o){if(!o||o.v!==Q||!o.doc||typeof o.doc.srcdoc!="string")return;w(),typeof o.engagedAt=="number"&&(d=o.engagedAt);let u=a.createElement("iframe");u.setAttribute("sandbox","allow-scripts allow-forms"),u.setAttribute("referrerpolicy","no-referrer"),u.setAttribute("title","App");let h=Math.max(m.minHeight,Math.round(o.limits?.height??m.defaultHeight));u.style.height=`${h}px`,l=K({doc:o.doc,hostContext:o.hostContext??{},hostVersion:o.hostVersion??"phone",...o.limits?.maxHeight?{limits:{maxHeight:o.limits.maxHeight}}:{},source:()=>u.contentWindow,adapter:{post:i=>u.contentWindow?.postMessage(i,"*"),callRpc:(i,q)=>I("rpc",{method:i,params:q}),sendMessage:async i=>{await I("message",{text:i})},openLink:async i=>{await I("open-link",{url:i})},setContext:async i=>{await I("context",{...i})},resize:i=>{u.style.height=`${i}px`,k({v:1,type:"size",height:i})},engaged:()=>Date.now()-d<=m.engagedTouchMs,teardownRequested:()=>k({v:1,type:"teardown-request"}),now:()=>Date.now()}}),g=u,u.srcdoc=o.doc.srcdoc,a.body.appendChild(u)},contextChanged(o){l?.contextChanged(o??{})},engaged(o){typeof o=="number"&&Number.isFinite(o)&&(d=Math.max(d,o))},async teardown(){l&&await l.teardown(),w(),k({v:1,type:"torn-down"})},reply(o,u){let h=y.get(o);h&&(y.delete(o),u&&"error"in u&&u.error?h.reject(u.error):h.resolve(u&&"result"in u?u.result:void 0))}};r.listen?.(o=>{switch(o.call){case"load":return b.load(o.args[0]);case"contextChanged":return b.contextChanged(o.args[0]);case"engaged":return b.engaged(o.args[0]);case"teardown":return void b.teardown();case"reply":return b.reply(o.args[0],o.args[1])}});let A=e;return A.appHost&&typeof A.appHost.postMessage=="function"||(A.appHost=b),A.mausbotAppHost=b,k({v:1,type:"ready"}),b}function Z(){typeof window<"u"&&fe(window)}Z();})();</script></body></html>diff --cc src/components/LiveCallSettings.tsxindex da35ed7587,fe7521eeef..da00f3f883--- a/src/components/LiveCallSettings.tsx+++ b/src/components/LiveCallSettings.tsx@@@ -126,10 -83,10 +127,10 @@@ export function LiveCallSettings({ bot><LiveProviderSettings locked={keySaving} onSaving={setProviderSaving} />{/* Fish Audio and ElevenLabs calls speak in their agent's own voice. */}- {bot && botProvider !== "fish" && botProvider !== "elevenlabs" && (- {!codex && !fish && !elevenlabs && <>- {bot && (- <BotLiveVoiceSelect bot={bot} gemini={gemini} onChange={(liveVoice) => dispatch({ type: "updateBot", botId: bot.id, patch: { liveVoice } })} />++ {!codex && bot && botProvider !== "fish" && botProvider !== "elevenlabs" && (+ <BotLiveVoiceSelect bot={bot} gemini={botProvider === "gemini"} onChange={(liveVoice) => dispatch({ type: "updateBot", botId: bot.id, patch: { liveVoice } })} />)}- {!fish && !elevenlabs && <>++ {!codex && !fish && !elevenlabs && <><label className="flex items-center justify-between gap-2"><span className="text-ink-secondary">{t(bot ? "call.live.defaultVoice" : "call.live.voice")}</span><Select@@@ -168,31 -125,7 +169,32 @@@))}</Select></label>- {advanced && <>++ {!codex && advanced && <>+ {historyRows.map((row) => (+ <label key={row.key} className="flex items-center justify-between gap-2">+ <span className="text-ink-secondary">{t(row.label)}</span>+ <Select+ size="sm"+ value={row.value}+ disabled={saving}+ aria-describedby={historyHintId}+ onChange={(event) => void save({ [row.key]: Number(event.target.value) })}+ >+ {row.options.map((count) => (+ <option key={count} value={count}>{count.toLocaleString(intlLocale())}</option>+ ))}+ </Select>+ </label>+ ))}+ <div id={historyHintId} className="-mt-2 text-[12px] text-ink-tertiary">+ {t("call.live.historyHint", {+ messages: historyCaps.maxMessages.toLocaleString(intlLocale()),+ messageChars: historyCaps.maxMessageChars.toLocaleString(intlLocale()),+ totalChars: historyCaps.maxTotalChars.toLocaleString(intlLocale()),+ })}+ </div>+ </>}+ {!codex && <><div className="flex items-center justify-between gap-2 border-t border-hairline/60 pt-2"><span className="text-ink-secondary">{t(copy.key)}</span><span className="flex gap-2">diff --cc src/components/LiveKeyNeeded.tsxindex 5e52ccf546,a371afbed4..76555e72b0--- a/src/components/LiveKeyNeeded.tsx+++ b/src/components/LiveKeyNeeded.tsx@@@ -9,17 -9,11 +9,18 @@@ import { openKeySettings } from "./keysimport { LiveKeySetup } from "./LiveKeySetup";import { LiveProviderSettings } from "./LiveProviderSettings";-export function LiveKeyNeeded() {+export function LiveKeyNeeded({ override }: { override?: "openai" | "fish" } = {}) {const { state, dispatch } = useStore();const titleId = useId();+ if (override) {+ const copy = liveKeyCopy(override);+ return <section aria-labelledby={titleId} className="flex flex-col gap-2.5 rounded-xl border border-hairline bg-panel p-4 text-left text-[13px]">+ <h2 id={titleId} className="font-medium text-ink">{t(copy.needs)}</h2>+ <button type="button" className="ui-button ui-button-primary self-start" onClick={() => { dismissLiveNotice(); dispatch(openKeySettings(override === "fish" ? "fishAudio" : "openai")); }}>{t("call.live.openApiKeys")}</button>+ </section>;+ }const live = state.config?.live;+ const codex = live?.provider === "codex";const azure = live?.provider === "azure";const custom = live?.provider === "custom";const fish = live?.provider === "fish";diff --cc src/components/VoiceSettings.test.tsindex abce733966,080e9c0f97..b0c0e883aa--- a/src/components/VoiceSettings.test.ts+++ b/src/components/VoiceSettings.test.ts@@@ -90,20 -83,7 +90,20 @@@ describe("VoiceSettings", () =>expect(onPatch).not.toHaveBeenCalled();});+ it("lets a bot override and then follow the workspace playback speed", async () => {+ fixture.api.mockResolvedValue({ voices: [] });+ const onPatch = vi.fn();+ await render({ ...bot("pepper"), voicePlaybackRate: 1.5 }, onPatch);+ const select = host.querySelector<HTMLSelectElement>("[data-bot-voice-playback-rate] select")!;+ expect(select.value).toBe("1.5");+ await act(async () => {+ select.value = "";+ select.dispatchEvent(new Event("change", { bubbles: true }));+ });+ expect(onPatch).toHaveBeenCalledExactlyOnceWith({ voicePlaybackRate: null });+ });+- it("lays the eight voice services out four to a row, OpenAI beside the other online services", async () => {+ it("offers Cartesia beside the other voice providers", async () => {fixture.api.mockResolvedValue({ voices: [] });await render(bot("pepper"), vi.fn());const radios = [...host.querySelectorAll<HTMLElement>('[role="radiogroup"] [role="radio"]')];@@@ -115,29 -95,31 +115,54 @@@});+it("offers Drama 3 in the Fish Audio model picker, with no synthesis knobs", async () => {+ fixture.config = { tts: { configured: true, provider: "fish", voice: "fish-1" } };+ fixture.api.mockResolvedValue({ voices: [] });+ await render(bot("pepper"), vi.fn());+ const model = host.querySelector<HTMLSelectElement>('select[aria-label="Fish Audio model"]')!;+ expect([...model.options].find((option) => option.value === "drama-3")?.textContent).toBe("Drama 3");+ model.value = "drama-3";+ await act(async () => model.dispatchEvent(new Event("change", { bubbles: true })));+ expect(fixture.api).toHaveBeenCalledWith("/api/config", { method: "PUT", body: JSON.stringify({ tts: { fishModel: "drama-3" } }) });+ expect(host.querySelector('input[name="topP"]')).toBeNull();+});+++it("keeps a new per-bot speed in Advanced mode, showing Simple mode one already set", async () => {+ fixture.advanced = false;+ fixture.api.mockResolvedValue({ voices: [] });+ await render(bot("pepper"), vi.fn());+ expect(host.querySelector("[data-bot-voice-playback-rate]")).toBeNull();+ await render({ ...bot("pepper"), voicePlaybackRate: 1.5 }, vi.fn());+ expect(host.querySelector<HTMLSelectElement>("[data-bot-voice-playback-rate] select")?.value).toBe("1.5");+});+++ describe("Cartesia voice settings", () => {+ it("saves Cartesia's key in its own field and picks an owned voice", async () => {+ fixture.config = { tts: { provider: "cartesia", configured: false, voice: "" } };+ fixture.api.mockResolvedValue({ tts: { provider: "cartesia", configured: true } });+ const onPatch = vi.fn();+ await render(bot("pepper"), onPatch);+ const input = host.querySelector<HTMLInputElement>('input[aria-label="Cartesia key"]')!;+ await act(async () => {+ Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")!.set!.call(input, "fixture-cartesia-key");+ input.dispatchEvent(new Event("input", { bubbles: true }));+ });+ await act(async () => host.querySelector<HTMLButtonElement>('input[aria-label="Cartesia key"] + button')!.click());+ expect(fixture.api).toHaveBeenCalledWith("/api/config", { method: "PUT", body: JSON.stringify({ tts: { cartesiaKey: "fixture-cartesia-key" } }) });+ expect(input.value).toBe("");+ fixture.config = { tts: { provider: "cartesia", configured: true, voice: "" } };+ fixture.api.mockResolvedValue({ voices: [{ id: "cartesia-voice", label: "My Cartesia clone" }] });+ await render(bot("pepper"), onPatch);+ await act(async () => trigger().click());+ const clone = [...document.body.querySelectorAll<HTMLElement>('[role="option"]')].find((option) => option.textContent?.includes("My Cartesia clone"))!;+ await act(async () => clone.click());+ expect(onPatch).toHaveBeenCalledExactlyOnceWith({ voice: "cartesia-voice" });+ expect(fixture.api).not.toHaveBeenCalledWith("/api/tts/voices/add", expect.anything());+ });+ });+describe("OpenAI voice settings", () => {const openaiRadio = () => [...host.querySelectorAll<HTMLButtonElement>('[role="radio"]')].find((radio) => radio.textContent === "OpenAI")!;it("selects marin only after the person chooses OpenAI, without enabling readout", async () => {diff --cc src/locales/pt-br.jsonindex c17c6b331d,677909b278..864d273758--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@@ -1,9 -1,8 +1,12 @@@{+ "voice.playbackRate": "Velocidade de reprodução",+ "voice.playbackRate.help": "Vale para Ler em voz alta, mensagens de voz e Um de cada vez.",+ "voice.playbackRate.botHelp": "Define a velocidade de reprodução do áudio deste bot.",+ "voice.playbackRate.default": "Usar velocidade padrão","voice.gemini.keyPlaceholder": "Cole sua chave de API do Google AI Studio",+ "voice.cartesia.keyPlaceholder": "Cole sua chave de API da Cartesia",+ "keys.label.cartesiaTts": "Chave de API da Cartesia",+ "keys.purpose.cartesiaTts": "Vozes da Cartesia para respostas faladas, notas de voz e chamadas em turnos","voice.gemini.model": "Modelo de voz do Gemini","keys.label.geminiTts": "Chave de API de voz do Gemini","keys.purpose.geminiTts": "Vozes do Gemini para respostas faladas, mensagens de voz e chamadas",