Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
A newly connected app is on for your bots (#5315)
Milind Sonid48997f07d66
diff --git a/src/App.tsx b/src/App.tsxindex 1858271a81..68159078b0 100644--- a/src/App.tsx+++ b/src/App.tsx@@ -29,6 +29,7 @@ import { NotificationRail, NotificationsPanel } from "@/components/Notificationsimport { useNotificationFeed } from "@/lib/notification-preferences";import { UpdateBanner } from "@/components/UpdateBanner";import { AppNotices } from "@/components/AppNotices";+import { AppGrantNotice } from "@/components/AppGrantPrompt";import { BotLimitPopup } from "@/components/BotLimitPopup";import { CloudAsleepStrip } from "@/components/CloudAsleepStrip";import { LiveConnectionStrip } from "@/components/LiveConnectionStrip";@@ -443,6 +444,7 @@ function Shell({ viewer }: { viewer: WelcomeViewer | null }) {<CloudSetup viewer={viewer} welcomeShown={welcomeOnScreen} /><WelcomeKeeper viewer={viewer} />{state.pluginsOpen && <PluginsPanel />}+ <AppGrantNotice />{state.shortcutsOpen && (<KeyboardShortcutsModalopen={state.shortcutsOpen}diff --git a/src/components/AppGrantPrompt.tsx b/src/components/AppGrantPrompt.tsxnew file mode 100644index 0000000000..20403fe7c4--- /dev/null+++ b/src/components/AppGrantPrompt.tsx@@ -0,0 +1,218 @@+import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from "react";+import { X } from "lucide-react";++import { appSwitchPatch, botAppScope } from "@/lib/bot-app-access";+import type { ConnectorStatus } from "@/lib/connector-status";+import { t } from "@/lib/i18n";+import { useOwnerOrAdmin } from "@/lib/use-owner-or-admin";+import { useStore, type Action, type Bot, type InstanceInfo } from "@/state/store";+import { EMAIL_SLUG } from "../../shared/email";+import { BotAvatar } from "./Avatar";+import { UndoToast } from "./bot-access/ShareBotButton";+import { BotSwitch } from "./bot-panel/rows";++let connectingFromBot: string | null = null;+let notice: { slug: string; text: string } | null = null;+let changeRequested: string | null = null;+const watchers = new Set<() => void>();++function tell() {+ for (const watch of Array.from(watchers)) watch();+}+function subscribe(watch: () => void) {+ watchers.add(watch);+ return () => {+ watchers.delete(watch);+ };+}++/** The Apps pop-up, opened from inside a bot: an app connected there goes to that bot even if its apps were off. */+export function connectAppFromBot(dispatch: (action: Action) => void, botId: string) {+ connectingFromBot = botId;+ dispatch({ type: "toggleSettings", open: false });+ dispatch({ type: "togglePlugins", open: true, surface: "apps" });+}++function takeConnectingBot(): string | null {+ const botId = connectingFromBot;+ connectingFromBot = null;+ return botId;+}++export function showAppGrantNotice(next: { slug: string; text: string } | null) {+ notice = next;+ tell();+}++/** "Your bots can now use Apollo · Change", for a few seconds. It outlives the Apps pop-up, which Change opens again. */+export function AppGrantNotice() {+ const { dispatch } = useStore();+ const shown = useSyncExternalStore(subscribe, () => notice, () => null);+ const done = useCallback(() => showAppGrantNotice(null), []);+ if (!shown) return null;+ return (+ <UndoToast+ key={shown.text}+ text={shown.text}+ actionLabel={t("apps.usedByChange")}+ onUndo={async () => {+ changeRequested = shown.slug;+ dispatch({ type: "togglePlugins", open: true, surface: "apps" });+ tell();+ }}+ onDone={done}+ />+ );+}++/** The bots whose access an app can be given from here: a Team Cloud member's own helper is theirs alone. */+export function botsForApps(bots: Bot[], instances: InstanceInfo[]): Bot[] {+ return bots.filter((bot) =>+ !bot.hidden &&+ !bot.defaultBot?.person &&+ instances.find((instance) => instance.instanceId === bot.modelSelection.instanceId)?.capabilities?.composioMcp === true);+}++function connectedAppSlugs(status: Record<string, ConnectorStatus>, emailConnected: boolean | null): string[] {+ const slugs = Object.entries(status).filter(([, service]) => service.connected).map(([slug]) => slug);+ return emailConnected && !slugs.includes(EMAIL_SLUG) ? [...slugs, EMAIL_SLUG] : slugs;+}++/** Security: only an owner or admin's connection gives an app to bots, and only they can change which bots use it. A bot+ * whose apps are off stays off, unless the connection was started from that bot. */+export function useAppGrants({ status, emailConnected, inventoryReady }: { status: Record<string, ConnectorStatus>; emailConnected: boolean | null; inventoryReady: boolean }) {+ const { state, dispatch } = useStore();+ const admin = useOwnerOrAdmin();+ const [startingBot] = useState(takeConnectingBot);+ const [changing, setChanging] = useState<string | null>(null);+ const requested = useSyncExternalStore(subscribe, () => changeRequested, () => null);+ const bots = botsForApps(state.bots, state.instances);+ const canChange = admin === true && inventoryReady && bots.length > 0;+ const allowed = state.config?.managedPolicy?.apps;++ useEffect(() => {+ if (!requested) return;+ changeRequested = null;+ setChanging(requested);+ tell();+ }, [requested]);++ const write = (bot: Bot, slug: string, on: boolean) => {+ const patch = appSwitchPatch(bot, connectedAppSlugs(status, emailConnected), slug, on);+ if (Object.keys(patch).length > 0) dispatch({ type: "updateBot", botId: bot.id, patch });+ };+ const latest = useRef({ admin, bots, allowed, startingBot, write });+ latest.current = { admin, bots, allowed, startingBot, write };++ const appConnected = useCallback((slug: string, app: string) => {+ const now = latest.current;+ if (now.admin !== true || !now.bots.length) return;+ if (now.allowed && !now.allowed.allowAll && !now.allowed.allowlist.includes(slug)) return;+ let using = 0;+ for (const bot of now.bots) {+ if (botAppScope(bot, slug) !== null) using += 1;+ else if (bot.composio !== false || bot.id === now.startingBot) {+ now.write(bot, slug, true);+ using += 1;+ }+ }+ showAppGrantNotice({ slug, text: t(using ? "apps.botsCanUse" : "apps.noBotsUse", { app }) });+ }, []);+ const dismiss = useCallback(() => setChanging(null), []);++ const done = (on: ReadonlySet<string>) => {+ if (changing) {+ for (const bot of bots) if (on.has(bot.id) !== (botAppScope(bot, changing) !== null)) write(bot, changing, on.has(bot.id));+ }+ setChanging(null);+ };++ return { canChange, appConnected, change: setChanging, dismiss, done, changing: canChange ? changing : null, bots };+}++export function AppGrantPrompt({ app, slug, bots, onDone, onDismiss }: {+ app: string;+ slug: string;+ bots: Bot[];+ onDone: (on: ReadonlySet<string>) => void;+ onDismiss: () => void;+}) {+ const cardRef = useRef<HTMLDivElement>(null);+ const [on, setOn] = useState<ReadonlySet<string>>(() => new Set(+ bots.filter((bot) => botAppScope(bot, slug) !== null).map((bot) => bot.id),+ ));++ useEffect(() => {+ const opener = document.activeElement instanceof HTMLElement ? document.activeElement : null;+ cardRef.current?.focus();+ // In the capture phase, so the Apps pop-up behind this neither closes on Escape nor pulls Tab back to itself.+ const onKey = (event: KeyboardEvent) => {+ if (event.key === "Escape") {+ event.preventDefault();+ event.stopPropagation();+ onDismiss();+ } else if (event.key === "Tab") {+ event.stopPropagation();+ const controls = cardRef.current?.querySelectorAll<HTMLElement>("button:not([disabled])");+ const first = controls?.[0], last = controls?.[controls.length - 1];+ if (!first || !last) return;+ if (event.shiftKey && (document.activeElement === first || document.activeElement === cardRef.current)) {+ event.preventDefault();+ last.focus();+ } else if (!event.shiftKey && document.activeElement === last) {+ event.preventDefault();+ first.focus();+ }+ }+ };+ window.addEventListener("keydown", onKey, true);+ return () => {+ window.removeEventListener("keydown", onKey, true);+ opener?.focus();+ };+ }, [onDismiss]);++ const toggle = (botId: string) => setOn((current) => {+ const next = new Set(current);+ if (!next.delete(botId)) next.add(botId);+ return next;+ });++ return (+ <div+ data-app-grant-prompt={slug}+ className="absolute inset-0 z-10 flex items-center justify-center bg-black/55 p-6"+ onMouseDown={(event) => event.target === event.currentTarget && onDismiss()}+ >+ <div+ ref={cardRef}+ role="dialog"+ aria-modal="true"+ aria-labelledby="app-grant-title"+ tabIndex={-1}+ className="flex max-h-full w-full max-w-[360px] flex-col rounded-2xl border border-hairline/50 bg-panel p-5 shadow-2xl"+ >+ <div className="flex items-start justify-between gap-3">+ <h3 id="app-grant-title" className="min-w-0 text-[15px] font-semibold text-ink">{t("apps.whichBots", { app })}</h3>+ <button type="button" aria-label={t("common.close")} onClick={onDismiss} className="-mt-1 -me-1 flex size-7 shrink-0 items-center justify-center rounded-full text-ink-secondary hover:bg-raised hover:text-ink">+ <X size={16} />+ </button>+ </div>+ <div className="mt-3 min-h-0 flex-1 overflow-y-auto">+ {bots.map((bot) => (+ <div key={bot.id} className="flex min-h-11 items-center gap-2.5">+ <BotAvatar bot={bot} size={24} animated={false} />+ <span className="min-w-0 flex-1 truncate text-[14px] font-medium text-ink">{bot.name}</span>+ <BotSwitch color={bot.color} checked={on.has(bot.id)} aria-label={t("botSettings.simple.appToggle", { name: bot.name, app })} onClick={() => toggle(bot.id)} />+ </div>+ ))}+ </div>+ <div className="mt-4 flex justify-end">+ <button type="button" onClick={() => onDone(on)} className="rounded-xl bg-accent px-4 py-2 text-[13px] font-medium text-white hover:brightness-110">+ {t("common.done")}+ </button>+ </div>+ </div>+ </div>+ );+}diff --git a/src/components/PluginsPanel.grants.test.ts b/src/components/PluginsPanel.grants.test.tsnew file mode 100644index 0000000000..df5a709d75--- /dev/null+++ b/src/components/PluginsPanel.grants.test.ts@@ -0,0 +1,348 @@+// @vitest-environment happy-dom+import { act, createElement, Fragment, useEffect } from "react";+import { createRoot, type Root } from "react-dom/client";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++import type { Bot, InstanceInfo } from "@/state/store";++const fixture = vi.hoisted(() => ({+ state: { pluginsSurface: "apps", bots: [] as unknown[], instances: [] as unknown[], config: null as unknown },+ dispatch: vi.fn(),+ admin: true as boolean | null,+ services: {} as Record<string, unknown>,+ after: undefined as unknown,+ email: null as boolean | null,+}));++vi.mock("@/state/store", () => ({+ api: vi.fn(async (path: string, init?: RequestInit) => {+ if (path === "/api/connectors/catalog") return { cards: [{ slug: "apollo", label: "Apollo", blurb: "leads", logo: null, domain: null }], source: "api", configured: true, mode: "self-hosted" };+ if (path.endsWith("/authorize")) return { url: "https://auth.example.com/connect" };+ if (path.startsWith("/api/connectors?services=")) return { services: { apollo: fixture.after } };+ if (init?.method === "DELETE") return {};+ throw new Error(`unexpected ${path}`);+ }),+ useStore: () => ({ state: fixture.state, dispatch: fixture.dispatch }),+}));+vi.mock("@/lib/use-owner-or-admin", () => ({ useOwnerOrAdmin: () => fixture.admin }));+vi.mock("@/lib/connected-apps", () => ({+ preloadConnectedApps: vi.fn(async () => ({ services: fixture.services, authoritative: true })),+ connectorStatusMemory: () => null,+ rememberConnectorStatus: () => {},+}));+vi.mock("@/lib/connected-apps-cache", () => ({ readCachedInventory: () => null, writeCachedInventory: () => {} }));+vi.mock("@/lib/connector-oauth", () => ({+ reserveConnectionPage: () => ({ open: async () => true, cancel: () => {} }),+ reusableConnectionUrl: (page?: { url: string } | null) => page?.url ?? null,+}));+vi.mock("@/lib/product-events", () => ({ connectorConnect: vi.fn() }));+vi.mock("./McpServersPanel", () => ({ McpServersPanel: () => null }));+vi.mock("./XCard", () => ({ X_CARD_SEARCH: "x", XCard: () => null }));+vi.mock("./PostizCard", () => ({ PostizCard: () => null }));+vi.mock("./EmailCard", () => ({+ EmailCard: ({ onConnection }: { onConnection: (connected: boolean | null) => void }) => {+ useEffect(() => onConnection(fixture.email), [onConnection]);+ return null;+ },+}));+vi.mock("./Avatar", () => ({ BotAvatar: () => null }));++import { AppGrantNotice, connectAppFromBot, showAppGrantNotice } from "./AppGrantPrompt";+const { PluginsPanel } = await import("./PluginsPanel");++(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;++const claude = { instanceId: "claude", capabilities: { composioMcp: true } } as unknown as InstanceInfo;+const bot = (id: string, extra: Partial<Bot> = {}) => ({ id, name: id[0]!.toUpperCase() + id.slice(1), color: "blue", modelSelection: { instanceId: "claude", model: "m" }, ...extra }) as unknown as Bot;+const active = { connected: true, accounts: [{ id: "ca_new", status: "ACTIVE" }] };++let host: HTMLDivElement;+let root: Root;+const flush = () => act(async () => { await new Promise((resolve) => setTimeout(resolve, 0)); });+const open = async () => {+ await act(async () => root.render(createElement(Fragment, null, createElement(PluginsPanel), createElement(AppGrantNotice))));+ await flush();+};+const toast = () => document.body.querySelector<HTMLElement>("[data-access-toast]");+const tile = () => host.querySelector<HTMLElement>('[data-app-tile="apollo"]')!;+const button = (scope: ParentNode, label: string) => Array.from(scope.querySelectorAll("button")).find((candidate) => candidate.textContent === label || candidate.getAttribute("aria-label") === label)!;+const prompt = () => host.querySelector<HTMLElement>("[data-app-grant-prompt]");+const switchOf = (name: string) => prompt()!.querySelector<HTMLElement>(`[aria-label="${name} can use Apollo"]`)!;+const click = (element: HTMLElement) => act(async () => { element.click(); });+const type = async (input: HTMLInputElement, value: string) => {+ await act(async () => {+ Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")!.set!.call(input, value);+ input.dispatchEvent(new Event("input", { bubbles: true }));+ });+};+/** Presses Connect, names the account, and lets one poll read the answer. */+const connectApollo = async () => {+ await click(tile().querySelector("button")!);+ await type(tile().querySelector("form input") as HTMLInputElement, "work");+ await act(async () => { tile().querySelector("form")!.dispatchEvent(new Event("submit", { bubbles: true, cancelable: true })); });+ await flush();+ await settlePoll();+};+const settlePoll = async () => {+ await act(async () => { vi.advanceTimersByTime(5_000); });+ await flush();+};+const writes = () => fixture.dispatch.mock.calls.map(([action]) => action).filter((action) => action.type === "updateBot");++beforeEach(() => {+ vi.useFakeTimers({ toFake: ["setInterval", "clearInterval"] });+ host = document.createElement("div");+ document.body.append(host);+ root = createRoot(host);+ fixture.state = { pluginsSurface: "apps", bots: [], instances: [claude], config: null };+ fixture.dispatch.mockReset();+ fixture.admin = true;+ fixture.services = {};+ fixture.after = active;+ fixture.email = null;+ showAppGrantNotice(null);+});+afterEach(async () => {+ await act(async () => root.unmount());+ host.remove();+ vi.useRealTimers();+});++describe("after connecting an app", () => {+ it("is already on for untouched bots, so it writes nothing and says so without asking", async () => {+ fixture.state.bots = [bot("scout"), bot("ada")];+ await open();+ await connectApollo();+ expect(prompt()).toBeNull();+ expect(writes()).toEqual([]);+ expect(toast()?.textContent).toBe("Your bots can now use Apollo.Change");+ });++ it("adds it to a bot with its own app list or tool list, by the same write as the bot's switch", async () => {+ fixture.state.bots = [+ bot("scout", { connectorScopes: { apps: { slack: "read" } } }),+ bot("ada", { connectorTools: { slack: { tools: "*" } } }),+ bot("free"),+ ];+ await open();+ await connectApollo();+ expect(writes()).toEqual([+ { type: "updateBot", botId: "scout", patch: { connectorScopes: { apps: { slack: "read", apollo: "write" } } } },+ { type: "updateBot", botId: "ada", patch: { connectorTools: { slack: { tools: "*" }, apollo: { tools: "*" } } } },+ ]);+ expect(toast()?.textContent).toContain("Your bots can now use Apollo.");+ });++ it("leaves a bot whose apps are off alone, except the bot it was started from", async () => {+ fixture.state.bots = [bot("scout", { composio: false }), bot("ada", { composio: false }), bot("free")];+ connectAppFromBot(fixture.dispatch, "ada");+ fixture.dispatch.mockClear();+ await open();+ await connectApollo();+ expect(writes()).toEqual([{ type: "updateBot", botId: "ada", patch: { composio: true, connectorScopes: { apps: { apollo: "write" } } } }]);+ expect(toast()?.textContent).toContain("Your bots can now use Apollo.");+ });++ it("says plainly when every bot's apps are off, and Change opens the switches", async () => {+ fixture.state.bots = [bot("scout", { composio: false }), bot("ada", { composio: false })];+ await open();+ await connectApollo();+ expect(writes()).toEqual([]);+ expect(toast()?.textContent).toBe("No bot uses Apollo yet.Change");+ await click(toast()!.querySelector("button")!);+ await flush();+ expect(fixture.dispatch).toHaveBeenCalledWith({ type: "togglePlugins", open: true, surface: "apps" });+ expect(toast()).toBeNull();+ expect(prompt()?.textContent).toContain("Which bots can use Apollo?");+ expect(switchOf("Scout").getAttribute("aria-checked")).toBe("false");+ await click(switchOf("Scout"));+ await click(button(prompt()!, "Done"));+ expect(writes()).toEqual([{ type: "updateBot", botId: "scout", patch: { composio: true, connectorScopes: { apps: { apollo: "write" } } } }]);+ });++ it("skips hidden bots and bots whose model can't use apps, and says nothing when no bot is left", async () => {+ fixture.state.bots = [+ bot("ghost", { hidden: true, connectorScopes: { apps: {} } }),+ bot("grok", { connectorScopes: { apps: {} }, modelSelection: { instanceId: "grok", model: "m" } as Bot["modelSelection"] }),+ ];+ await open();+ await connectApollo();+ expect(writes()).toEqual([]);+ expect(toast()).toBeNull();+ });++ it("writes nothing for an app the organization's rules refuse", async () => {+ fixture.state.config = { managedPolicy: { organizationName: "Acme", apps: { allowAll: false, allowlist: ["slack"] } } };+ fixture.state.bots = [bot("scout", { connectorScopes: { apps: {} } })];+ await open();+ expect((tile().querySelector("button") as HTMLButtonElement).disabled).toBe(true);+ const { useAppGrants } = await import("./AppGrantPrompt");+ let grants!: ReturnType<typeof useAppGrants>;+ const Probe = () => { grants = useAppGrants({ status: {}, emailConnected: null, inventoryReady: true }); return null; };+ await act(async () => root.render(createElement(Fragment, null, createElement(Probe), createElement(AppGrantNotice))));+ await act(async () => grants.appConnected("apollo", "Apollo"));+ expect(writes()).toEqual([]);+ expect(toast()).toBeNull();+ await act(async () => grants.appConnected("slack", "Slack"));+ expect(writes()).toEqual([{ type: "updateBot", botId: "scout", patch: { connectorScopes: { apps: { slack: "write" } } } }]);+ });++ it("keeps the notice when the Apps pop-up closes at the same moment, and it goes away on its own", async () => {+ vi.useFakeTimers({ toFake: ["setInterval", "clearInterval", "setTimeout", "clearTimeout"] });+ fixture.state.bots = [bot("scout")];+ const mounted = async () => { await act(async () => { await vi.advanceTimersByTimeAsync(0); }); };+ await act(async () => root.render(createElement(Fragment, null, createElement(PluginsPanel), createElement(AppGrantNotice))));+ await mounted();+ await click(tile().querySelector("button")!);+ await type(tile().querySelector("form input") as HTMLInputElement, "work");+ await act(async () => { tile().querySelector("form")!.dispatchEvent(new Event("submit", { bubbles: true, cancelable: true })); });+ await mounted();+ await act(async () => {+ await vi.advanceTimersByTimeAsync(5_000);+ root.render(createElement(Fragment, null, createElement(AppGrantNotice)));+ });+ await mounted();+ expect(host.querySelector("[data-app-tile]")).toBeNull();+ expect(toast()?.textContent).toContain("Your bots can now use Apollo.");+ await act(async () => { await vi.advanceTimersByTimeAsync(6_000); });+ expect(toast()).toBeNull();+ });++ it("does nothing when the connection failed or was left unfinished", async () => {+ fixture.state.bots = [bot("scout", { connectorScopes: { apps: {} } }), bot("ada")];+ await open();+ fixture.after = { connected: false, accounts: [{ id: "ca_new", status: "FAILED" }] };+ await connectApollo();+ expect(writes()).toEqual([]);+ expect(toast()).toBeNull();+ });++ it("writes nothing and says nothing on a reconnect", async () => {+ fixture.state.bots = [bot("scout", { connectorScopes: { apps: {} } }), bot("ada")];+ fixture.services = { apollo: { connected: false, accounts: [{ id: "ca_old", status: "EXPIRED", alias: "work" }] } };+ await open();+ await click(button(tile(), "Reconnect"));+ await flush();+ await settlePoll();+ expect(writes()).toEqual([]);+ expect(toast()).toBeNull();+ });++ it("writes nothing and says nothing when a second account of a connected app is added", async () => {+ fixture.state.bots = [bot("scout", { connectorScopes: { apps: {} } }), bot("ada")];+ fixture.services = { apollo: { connected: true, accounts: [{ id: "ca_old", status: "ACTIVE" }] } };+ fixture.after = { connected: true, accounts: [{ id: "ca_old", status: "ACTIVE" }, { id: "ca_new", status: "ACTIVE" }] };+ await open();+ await click(button(tile(), "Add account"));+ await type(tile().querySelector("form input") as HTMLInputElement, "second");+ await act(async () => { tile().querySelector("form")!.dispatchEvent(new Event("submit", { bubbles: true, cancelable: true })); });+ await flush();+ await settlePoll();+ expect(writes()).toEqual([]);+ expect(toast()).toBeNull();+ });+});++describe("changing which bots use an app", () => {+ it.each(["Close", "Escape", "the backdrop"])("changes nothing when dismissed by %s", async (how) => {+ fixture.state.bots = [bot("scout", { connectorScopes: { apps: {} } }), bot("ada", { connectorScopes: { apps: {} } })];+ fixture.services = { apollo: { connected: true, accounts: [{ id: "ca_old", status: "ACTIVE" }] } };+ await open();+ await click(button(tile(), "Which bots can use Apollo?"));+ await click(switchOf("Scout"));+ if (how === "Close") await click(button(prompt()!, "Close"));+ else if (how === "Escape") await act(async () => { window.dispatchEvent(new KeyboardEvent("keydown", { key: "Escape", bubbles: true, cancelable: true })); });+ else await act(async () => { prompt()!.dispatchEvent(new MouseEvent("mousedown", { bubbles: true })); });+ expect(prompt()).toBeNull();+ expect(writes()).toEqual([]);+ expect(fixture.dispatch).not.toHaveBeenCalledWith({ type: "togglePlugins", open: false });+ });+});++describe("the bots using a connected app", () => {+ it("reflects each bot's scopes and changes them there, with the bot's own switch patch", async () => {+ fixture.state.bots = [bot("scout", { connectorScopes: { apps: { apollo: "write", slack: "write" } } }), bot("ada", { connectorScopes: { apps: { slack: "write" } } }), bot("off", { composio: false })];+ fixture.services = { apollo: { connected: true, accounts: [{ id: "ca_old", status: "ACTIVE" }] }, slack: { connected: true, accounts: [{ id: "ca_s", status: "ACTIVE" }] } };+ await open();+ expect(tile().textContent).toContain("Used by Scout");+ expect(tile().textContent).not.toContain("Ada");+ await click(button(tile(), "Which bots can use Apollo?"));+ expect(switchOf("Scout").getAttribute("aria-checked")).toBe("true");+ await click(switchOf("Scout"));+ await click(switchOf("Ada"));+ await click(button(prompt()!, "Done"));+ expect(writes()).toEqual([+ { type: "updateBot", botId: "scout", patch: { connectorScopes: { apps: { slack: "write" } } } },+ { type: "updateBot", botId: "ada", patch: { connectorScopes: { apps: { slack: "write", apollo: "write" } } } },+ ]);+ });++ it("says none yet, and turning off an unscoped bot keeps its other apps, email included", async () => {+ fixture.email = true;+ fixture.state.bots = [bot("off", { composio: false }), bot("all")];+ fixture.services = { apollo: { connected: true, accounts: [{ id: "ca_old", status: "ACTIVE" }] }, slack: { connected: true, accounts: [{ id: "ca_s", status: "ACTIVE" }] } };+ await open();+ expect(tile().textContent).toContain("Used by All");+ await click(button(tile(), "Which bots can use Apollo?"));+ await click(switchOf("All"));+ await click(button(prompt()!, "Done"));+ expect(writes()).toEqual([{ type: "updateBot", botId: "all", patch: { connectorScopes: { apps: { slack: "write", email: "write" } } } }]);+ fixture.state.bots = [bot("off", { composio: false })];+ fixture.dispatch.mockClear();+ await act(async () => root.render(createElement(PluginsPanel)));+ await flush();+ expect(tile().textContent).toContain("No bots yet");+ });++ it("offers no change while the inventory can't be trusted", async () => {+ const { preloadConnectedApps } = await import("@/lib/connected-apps");+ vi.mocked(preloadConnectedApps).mockImplementationOnce(async () => ({ services: fixture.services as never, authoritative: false }));+ fixture.state.bots = [bot("scout")];+ fixture.services = { apollo: { connected: true, accounts: [{ id: "ca_old", status: "ACTIVE" }] } };+ await open();+ expect(tile().textContent).toContain("Used by Scout");+ expect(button(tile(), "Which bots can use Apollo?")).toBeUndefined();+ });+});++describe("on a Team Cloud", () => {+ beforeEach(() => { fixture.state.config = { team: { name: "Acme" } }; });++ it("a member can see which bots use an app but not change it, and is never asked", async () => {+ fixture.admin = false;+ fixture.state.bots = [bot("scout", { composio: false, yourAccess: "edit" }), bot("ada", { composio: false, yourAccess: "chat" })];+ fixture.services = { apollo: { connected: true, accounts: [{ id: "ca_old", status: "ACTIVE" }] } };+ await open();+ expect(tile().textContent).toContain("No bots yet");+ expect(button(tile(), "Which bots can use Apollo?")).toBeUndefined();+ expect(prompt()).toBeNull();+ });++ it("writes nothing and says nothing for a member's own connection, even with one bot", async () => {+ fixture.admin = false;+ fixture.state.bots = [bot("scout", { connectorScopes: { apps: {} } })];+ await open();+ await connectApollo();+ expect(prompt()).toBeNull();+ expect(writes()).toEqual([]);+ expect(toast()).toBeNull();+ });++ it("gives an admin's team app to the team's bots without asking, never to a person's own helper", async () => {+ fixture.state.bots = [bot("scout", { connectorScopes: { apps: {} } }), bot("maus", { connectorScopes: { apps: {} }, defaultBot: { person: "[email protected]" } } as Partial<Bot>)];+ await open();+ await connectApollo();+ expect(prompt()).toBeNull();+ expect(writes()).toEqual([{ type: "updateBot", botId: "scout", patch: { connectorScopes: { apps: { apollo: "write" } } } }]);+ expect(toast()?.textContent).toContain("Your bots can now use Apollo.");+ });++ it("leaves each person's own helper out of the choice", async () => {+ fixture.state.bots = [bot("scout"), bot("maus", { defaultBot: { person: "[email protected]" } } as Partial<Bot>)];+ fixture.services = { apollo: { connected: true, accounts: [{ id: "ca_old", status: "ACTIVE" }] } };+ await open();+ await click(button(tile(), "Which bots can use Apollo?"));+ expect(switchOf("Maus")).toBeNull();+ expect(switchOf("Scout")).not.toBeNull();+ });+});diff --git a/src/components/PluginsPanel.navigation.test.ts b/src/components/PluginsPanel.navigation.test.tsindex c3566b34e4..8539fbd9a4 100644--- a/src/components/PluginsPanel.navigation.test.ts+++ b/src/components/PluginsPanel.navigation.test.ts@@ -588,7 +588,7 @@ describe("Apps pop-up", () => {expect(html).toContain(`Show all ${APPS_PREVIEW_COUNT + 5} apps`);});- it("keeps the per-bot banner, stale notice and self-host key link reachable", () => {+ it("keeps the stale notice reachable and no longer sends people to a settings page for per-bot access", () => {fixture.instances = [claude];fixture.bots = [bot("scout", { composio: false })];fixture.overrides.set(7, true);@@ -596,8 +596,7 @@ describe("Apps pop-up", () => {expect(html).toContain("Showing what was connected last time");fixture.overrides.set(7, false);({ html } = render());- expect(html).toContain("Not every bot can use these apps.");- expect(html).toContain("Allow scout");+ expect(html).not.toContain("Settings → Access");});it("names the bots that use a connected app", () => {diff --git a/src/components/PluginsPanel.test.ts b/src/components/PluginsPanel.test.tsindex a15e6ed201..cb97bffaba 100644--- a/src/components/PluginsPanel.test.ts+++ b/src/components/PluginsPanel.test.ts@@ -1,9 +1,7 @@import { describe, expect, it } from "vitest";import {- botsMissingConnectedApps,botsWithLimitedServiceTools,- hasUsableConnectedApps,connectorSetupNotice,disconnectAccountConfirmation,} from "./PluginsPanel";@@ -63,43 +61,6 @@ describe("bots whose connected-app tools are limited by grants", () => {});});-describe("connected apps a bot cannot see", () => {- const instances = [engine("claude", true), engine("grok", false)];-- it("only offers grants after catalog and inventory confirm a usable account", () => {- const active = { calendar: { connected: true, pending: false, status: "ACTIVE" } };- expect(hasUsableConnectedApps(true, "ready", false, active)).toBe(true);- expect(hasUsableConnectedApps(false, "ready", false, active)).toBe(false);- expect(hasUsableConnectedApps(true, "loading", false, active)).toBe(false);- expect(hasUsableConnectedApps(true, "error", false, active)).toBe(false);- expect(hasUsableConnectedApps(true, "ready", true, active)).toBe(false);- expect(hasUsableConnectedApps(true, "ready", false, { calendar: { connected: false, pending: false, status: "EXPIRED" } })).toBe(false);- });-- it("names the bots whose own grant is off, and only those", () => {- const bots = [- bot("allowed"),- bot("off", { composio: false }),- bot("also-off", { composio: false }),- ];- expect(botsMissingConnectedApps(bots, instances).map((b) => b.id)).toEqual(["off", "also-off"]);- });-- it("treats an absent grant as allowed, the way every turn does", () => {- expect(botsMissingConnectedApps([bot("fresh"), bot("explicit", { composio: true })], instances)).toEqual([]);- });-- it("leaves out a bot whose engine could never mount the tools", () => {- const bots = [bot("grok-bot", { composio: false, modelSelection: { instanceId: "grok" } as Bot["modelSelection"] })];- expect(botsMissingConnectedApps(bots, instances)).toEqual([]);- expect(botsMissingConnectedApps([bot("orphan", { composio: false, modelSelection: { instanceId: "gone" } as Bot["modelSelection"] })], instances)).toEqual([]);- });-- it("leaves out hidden bots, which the person cannot act on from here", () => {- expect(botsMissingConnectedApps([bot("ghost", { composio: false, hidden: true })], instances)).toEqual([]);- });-});-describe("connected-app status races", () => {it("offers status recovery for a pending authorization whose URL was lost on remount", () => {for (const hasAccounts of [false, true]) {diff --git a/src/components/PluginsPanel.tsx b/src/components/PluginsPanel.tsxindex 024750e271..787e928df6 100644--- a/src/components/PluginsPanel.tsx+++ b/src/components/PluginsPanel.tsx@@ -12,7 +12,7 @@ import { mcpSignInLink } from "@/lib/mcp-sign-in";import { pollConnector } from "@/lib/connector-poll";import { connectorConnect } from "@/lib/product-events";import { managedConnectorUnavailableReason } from "../../shared/connector-availability";-import { connectorServiceAccess, isConnectorToolGrantShape } from "@/lib/connector-grants";+import { isConnectorToolGrantShape } from "@/lib/connector-grants";import {accountAliasTaken,accountToReconnect,@@ -39,6 +39,8 @@ import { openBotSettings } from "./bot-panel/panel-link";import { openKeySettings } from "./keys/key-focus";import { lacksAdminScope } from "@/lib/admin-scope";import { SavedKeysReset } from "./SavedKeysReset";+import { botAppScope } from "@/lib/bot-app-access";+import { AppGrantPrompt, botsForApps, useAppGrants } from "./AppGrantPrompt";import { ServiceIcon, type ToolkitCard } from "./ServiceIcon"; import { AppsSection } from "./AppsSection";export { ServiceIcon, type ToolkitCard } from "./ServiceIcon";@@ -52,14 +54,6 @@ export function disconnectAccountConfirmation(return t("connectors.disconnectConfirm", { identity, service });}-export function botsMissingConnectedApps(bots: Bot[], instances: InstanceInfo[]): Bot[] {- return bots.filter((bot) =>- !bot.hidden &&- bot.composio === false &&- instances.find((instance) => instance.instanceId === bot.modelSelection.instanceId)- ?.capabilities?.composioMcp === true);-}-export function botsWithLimitedServiceTools(bots: Bot[], instances: InstanceInfo[], slug: string): Bot[] {return bots.filter((bot) => {if (bot.hidden || bot.composio === false) return false;@@ -73,10 +67,6 @@ export function botsWithLimitedServiceTools(bots: Bot[], instances: InstanceInfo});}-export function hasUsableConnectedApps(configured: boolean, phase: ConnectorInventoryPhase, stale: boolean, status: Record<string, ConnectorStatus>): boolean {- return configured && phase === "ready" && !stale && Object.values(status).some((service) => service.connected);-}-/** Whether a hosted app's card shows: it matches the search, and the filter is All, or Connected and it isn't known to be* disconnected (unknown while its servers load). */export function hostedShown(app: HostedApp, search: string, filter: AppsFilter, connected: HostedConnections | null): boolean {@@ -113,12 +103,7 @@ export const APPS_PREVIEW_COUNT = 48;export const USED_BY_AVATAR_SIZE = 16;export function botsUsingService(bots: Bot[], instances: InstanceInfo[], slug: string): Bot[] {- return bots.filter((bot) =>- !bot.hidden &&- bot.composio !== false &&- instances.find((instance) => instance.instanceId === bot.modelSelection.instanceId)- ?.capabilities?.composioMcp === true &&- connectorServiceAccess(bot.connectorTools, slug).level !== "none");+ return botsForApps(bots, instances).filter((bot) => botAppScope(bot, slug) !== null);}export function PluginsPanel() {@@ -162,6 +147,7 @@ export function PluginsPanel() {const statusGenerations = useRef(new Map<string, number>());const latestStatusRequests = useRef(new Map<string, number>());const opening = useRef<ReturnType<typeof reserveConnectionPage> | null>(null);+ const reconnecting = useRef(new Set<string>());/** A connection that finished or failed since a request no newer than this one no longer needs its sign-in page. */const forgetSettledUrls = (services: Record<string, ConnectorStatus>, requestGenerations: ReadonlyMap<string, number>) => {@@ -240,6 +226,7 @@ export function PluginsPanel() {for (const stop of polls.current.values()) stop();polls.current.clear();}, []);+ const appGrants = useAppGrants({ status, emailConnected, inventoryReady: inventoryPhase === "ready" && !stale });useEffect(() => {if (inventoryPhase !== "ready") return;@@ -329,11 +316,12 @@ export function PluginsPanel() {}};- const startPolling = (slug: string, before: ConnectorStatus | undefined) => {+ const startPolling = (slug: string, before: ConnectorStatus | undefined, firstConnection: boolean) => {polls.current.get(slug)?.();const stop = pollConnector(before, () => refreshStatus([slug]).then((services) => services[slug]), (result) => {if (polls.current.get(slug) === stop) polls.current.delete(slug);connectorConnect(slug, result);+ if (result === "connected" && firstConnection) appGrants.appConnected(slug, cards?.find((card) => card.slug === slug)?.label ?? slug);});polls.current.set(slug, stop);};@@ -345,6 +333,8 @@ export function PluginsPanel() {statusGenerations.current.set(slug, (statusGenerations.current.get(slug) ?? 0) + 1);setBusySlug(slug);setError(null);+ if (replacing) reconnecting.current.add(slug);+ const firstConnection = !reconnecting.current.has(slug) && !hasActiveConnection(status[slug]);try {const createdAt = Date.now();if (replacing) await api(`/api/connectors/${slug}/accounts/${encodeURIComponent(replacing.id)}`, { method: "DELETE" });@@ -366,7 +356,7 @@ export function PluginsPanel() {}));setAliasSlug(null);setAliasDraft("");- startPolling(slug, status[slug]);+ startPolling(slug, status[slug], firstConnection);if (!await launch.open(url) && opening.current === launch) {setError({ key: "connectors.popupBlockedContinue" });}@@ -415,9 +405,6 @@ export function PluginsPanel() {const connectedEmptyCopy = connectedInventoryCopy(inventoryPhase);const close = () => dispatch({ type: "togglePlugins", open: false });const setupNotice = connectorSetupNotice({ configured, stale, setup, remoteClient });- const botsWithoutApps = hasUsableConnectedApps(configured, inventoryPhase, stale, status)- ? botsMissingConnectedApps(state.bots, state.instances)- : [];const chooseFilter = (next: AppsFilter) => {setCategory(null);if (next === "mcp") {@@ -617,24 +604,6 @@ export function PluginsPanel() {</button></div>)}- {botsWithoutApps.length > 0 && (- <div className="mb-3 rounded-xl bg-control/50 px-4 py-3 text-[13px] leading-relaxed text-ink-secondary">- <span className="font-medium text-ink">{t("connectors.perBot.title")}</span>{" "}- {t("connectors.perBot.body")}- <div className="mt-2 flex flex-wrap gap-2">- {botsWithoutApps.map((candidate) => (- <button- key={candidate.id}- type="button"- onClick={() => dispatch({ type: "updateBot", botId: candidate.id, patch: { composio: true } })}- className={cn(pill, "bg-control text-ink hover:bg-raised-hover")}- >- {t("connectors.perBot.allow", { name: candidate.name })}- </button>- ))}- </div>- </div>- )}{configured && !remoteClient && source === "curated" && mode === "self-hosted" && filter !== "mcp" && (<div className="mb-3 text-[12px] text-ink-secondary">{t("connectors.featuredBefore")}{" "}@@ -745,6 +714,16 @@ export function PluginsPanel() {</div>)}</div>+ {appGrants.changing && (+ <AppGrantPrompt+ key={appGrants.changing}+ app={cards?.find((card) => card.slug === appGrants.changing)?.label ?? appGrants.changing}+ slug={appGrants.changing}+ bots={appGrants.bots}+ onDone={appGrants.done}+ onDismiss={appGrants.dismiss}+ />+ )}</div></div>);@@ -765,6 +744,7 @@ export function PluginsPanel() {const policy = state.config?.managedPolicy, unavailableReason = policy?.apps && !policy.apps.allowAll && !policy.apps.allowlist.includes(card.slug) ? t("policy.managedBy", { organization: policy.organizationName }): managedConnectorUnavailableReason(mode, card.slug) ? t("connectors.selfHostOnlyReason") : null;const usedBy = connected || included ? botsUsingService(state.bots, state.instances, card.slug) : [];+ const usedByLabel = t("apps.usedBy", { names: usedBy.map((candidate) => candidate.name).join(", ") });const description = unavailableReason ?? (pending? authorizationUrl@@ -793,8 +773,8 @@ export function PluginsPanel() {{usedBy.length > 0 && (<spanclassName="ms-1 flex shrink-0 -space-x-1.5 rtl:space-x-reverse"- title={t("apps.usedBy", { names: usedBy.map((candidate) => candidate.name).join(", ") })}- aria-label={t("apps.usedBy", { names: usedBy.map((candidate) => candidate.name).join(", ") })}+ title={usedByLabel}+ aria-label={usedByLabel}role="img">{usedBy.slice(0, 3).map((candidate) => (@@ -863,6 +843,23 @@ export function PluginsPanel() {{t("connectors.openAuthorizationPage")}</a>)}+ {connected && !pending && (+ <div data-app-bots={card.slug} className="mt-1.5 flex min-w-0 items-center gap-2 text-[12px] leading-5 text-ink-secondary">+ <span className="min-w-0 truncate" title={usedBy.length ? usedByLabel : undefined}>+ {usedBy.length ? usedByLabel : t("apps.usedByNone")}+ </span>+ {appGrants.canChange && (+ <button+ type="button"+ onClick={() => appGrants.change(card.slug)}+ aria-label={t("apps.whichBots", { app: card.label })}+ className="ms-auto shrink-0 rounded-full px-2 text-[12px] font-medium leading-5 text-accent-text transition-colors hover:bg-raised-hover"+ >+ {t("apps.usedByChange")}+ </button>+ )}+ </div>+ )}{accounts.length > 0 && (<div className="mt-1.5 space-y-0.5">{accounts.map((account) => {diff --git a/src/components/bot-access/ShareBotButton.tsx b/src/components/bot-access/ShareBotButton.tsxindex d1daf705ba..d2b6de561e 100644--- a/src/components/bot-access/ShareBotButton.tsx+++ b/src/components/bot-access/ShareBotButton.tsx@@ -37,7 +37,7 @@ export function ShareBotButton({ bot, className, headerMenu, iconSize = 16 }: {}/** "Bob can now chat · Undo", for a few seconds; Undo puts the sharing back as it was. */-export function UndoToast({ text, onUndo, onDone }: { text: string; onUndo: () => Promise<unknown>; onDone: () => void }) {+export function UndoToast({ text, onUndo, onDone, actionLabel = t("common.undo") }: { text: string; onUndo: () => Promise<unknown>; onDone: () => void; actionLabel?: string }) {const [failed, setFailed] = useState(false);useEffect(() => {const timer = window.setTimeout(onDone, TOAST_MS);@@ -48,7 +48,7 @@ export function UndoToast({ text, onUndo, onDone }: { text: string; onUndo: () =<span className="min-w-0 flex-1">{failed ? t("botAccess.undoFailed") : text}</span>{!failed && (<button type="button" onClick={() => void onUndo().then(onDone, () => setFailed(true))} className="shrink-0 rounded-md px-1.5 py-0.5 font-medium text-accent hover:bg-raised">- {t("common.undo")}+ {actionLabel}</button>)}</div>,diff --git a/src/components/bot-panel/pages.tsx b/src/components/bot-panel/pages.tsxindex e94bbd5039..a6549b5052 100644--- a/src/components/bot-panel/pages.tsx+++ b/src/components/bot-panel/pages.tsx@@ -14,6 +14,7 @@ import { shortPath } from "@/lib/short-path";import { skillImportLines } from "@/lib/skill-import";import { useStore, type Bot } from "@/state/store";import { useDesktopCapabilities } from "../DesktopCapabilities";+import { connectAppFromBot } from "../AppGrantPrompt";import { ServiceIcon } from "../ServiceIcon";import { RoutineEditor } from "../RoutinesPage";import { useWorkingFolder } from "../bot-settings/AccessSection";@@ -121,10 +122,7 @@ export function AppsPage({ bot, derived }: PageContext) {<LinkRowdata-panel-link="add-app"icon={Plus}- onClick={() => {- dispatch({ type: "toggleSettings", open: false });- dispatch({ type: "togglePlugins", open: true, surface: "apps" });- }}+ onClick={() => connectAppFromBot(dispatch, bot.id)}>{t("botPanel.apps.connectAnother")}</LinkRow>diff --git a/src/locales/en.json b/src/locales/en.jsonindex 7a30e60407..676994cb67 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -5728,9 +5728,6 @@"connectors.setupNeeded": "Connected apps are not set up yet. To connect Gmail, Slack and more, add a project key in Settings → API keys, under Self-host connected apps.","connectors.setupNeededRemote": "Connected apps are not set up on the host yet. Add a project key under Self-host connected apps in the host's settings.","connectors.openSettings": "Open settings",- "connectors.perBot.title": "Not every bot can use these apps.",- "connectors.perBot.body": "Connecting an app here does not hand it to a bot. Each bot has its own Connected apps switch under Settings → Access, and until it is on the bot does not know the app exists.",- "connectors.perBot.allow": "Allow {name}","connectors.featuredBefore": "Showing featured apps.","connectors.updateKey": "Update your connected apps key","connectors.featuredAfter": "for the full catalog.",@@ -6715,6 +6712,11 @@"apps.filter.mcp": "MCP servers","apps.connected": "Connected","apps.usedBy": "Used by {names}",+ "apps.usedByNone": "No bots yet",+ "apps.usedByChange": "Change",+ "apps.whichBots": "Which bots can use {app}?",+ "apps.botsCanUse": "Your bots can now use {app}.",+ "apps.noBotsUse": "No bot uses {app} yet.","apps.showAll": "Show all {count} apps","apps.mcp.add": "Add MCP server","apps.connectedCount": "{count} connected",diff --git a/src/locales/es.json b/src/locales/es.jsonindex 8853034711..691b2b8732 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -4438,9 +4438,6 @@"connectors.setupNeeded": "Las apps conectadas aún no están configuradas. Para conectar Gmail, Slack y más, añade una clave de proyecto en Ajustes → Claves de API, en «Autoalojar las apps conectadas».","connectors.setupNeededRemote": "Las apps conectadas aún no están configuradas en el host. Añade una clave de proyecto en «Autoalojar las apps conectadas», en los ajustes del host.","connectors.openSettings": "Abrir ajustes",- "connectors.perBot.title": "No todos los bots pueden usar estas apps.",- "connectors.perBot.body": "Conectar una app aquí no se la da a ningún bot. Cada bot tiene su propio interruptor «Apps conectadas» en Ajustes → Access, y mientras no esté activado, el bot no sabe que la app existe.",- "connectors.perBot.allow": "Permitir a {name}","connectors.featuredBefore": "Mostrando apps destacadas.","connectors.updateKey": "Actualiza tu clave de apps conectadas","connectors.featuredAfter": "para ver el catálogo completo.",diff --git a/src/locales/it.json b/src/locales/it.jsonindex 30cb582a40..6611e1be97 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -4694,9 +4694,6 @@"connectors.setupNeeded": "Le app connesse non sono ancora configurate. Per collegare Gmail, Slack e altro, aggiungi una chiave di progetto in Impostazioni → Chiavi API, sotto App connesse auto-ospitate.","connectors.setupNeededRemote": "Le app connesse non sono ancora configurate sull'host. Aggiungi una chiave di progetto sotto App connesse auto-ospitate, nelle impostazioni dell'host.","connectors.openSettings": "Apri impostazioni",- "connectors.perBot.title": "Non tutti i bot possono usare queste app.",- "connectors.perBot.body": "Collegare un'app qui non la assegna a un bot. Ogni bot ha il proprio interruttore App connesse in Impostazioni → Accesso e, finché non è attivo, il bot non sa che l'app esiste.",- "connectors.perBot.allow": "Consenti {name}","connectors.featuredBefore": "Mostro le app in evidenza.","connectors.updateKey": "Aggiorna la chiave delle app connesse","connectors.featuredAfter": "per il catalogo completo.",diff --git a/src/locales/ja.json b/src/locales/ja.jsonindex a01a176ba0..871d0ca599 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -5422,9 +5422,6 @@"connectors.setupNeeded": "接続済みアプリはまだセットアップされていません。Gmail や Slack などを接続するには、設定 → API キーの「接続済みアプリをセルフホスト」にプロジェクトキーを追加してください。","connectors.setupNeededRemote": "ホストで接続済みアプリがまだセットアップされていません。ホストの設定の「接続済みアプリをセルフホスト」にプロジェクトキーを追加してください。","connectors.openSettings": "設定を開く",- "connectors.perBot.title": "すべてのボットがこれらのアプリを使えるわけではありません。",- "connectors.perBot.body": "ここでアプリを接続しても、ボットには渡されません。各ボットの 設定 → アクセス に「接続済みアプリ」のスイッチがあり、オンにするまでボットはアプリの存在を知りません。",- "connectors.perBot.allow": "{name} に許可","connectors.featuredBefore": "おすすめのアプリを表示しています。","connectors.updateKey": "接続済みアプリのキーを更新","connectors.featuredAfter": "すると全カタログを表示できます。",diff --git a/src/locales/ko.json b/src/locales/ko.jsonindex 889a959c25..10d8649790 100644--- a/src/locales/ko.json+++ b/src/locales/ko.json@@ -5211,9 +5211,6 @@"connectors.setupNeeded": "연결된 앱이 아직 설정되지 않았어요. Gmail, Slack 등을 연결하려면 설정 → API 키의 연결된 앱 직접 호스팅에서 프로젝트 키를 추가하세요.","connectors.setupNeededRemote": "호스트에 연결된 앱이 아직 설정되지 않았어요. 호스트 설정의 연결된 앱 직접 호스팅에서 프로젝트 키를 추가하세요.","connectors.openSettings": "설정 열기",- "connectors.perBot.title": "모든 봇이 이 앱들을 쓸 수 있는 것은 아니에요.",- "connectors.perBot.body": "여기서 앱을 연결해도 봇에게 넘겨지지 않아요. 봇마다 설정 → 접근에 연결된 앱 스위치가 따로 있고, 그것을 켜기 전에는 봇이 앱이 있다는 것도 몰라요.",- "connectors.perBot.allow": "{name} 허용","connectors.featuredBefore": "추천 앱만 표시 중이에요.","connectors.updateKey": "연결된 앱 키 업데이트","connectors.featuredAfter": "를 하면 전체 목록이 보여요.",diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex 801926c145..cf5d567c19 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -4791,9 +4791,6 @@"connectors.setupNeeded": "Połączone aplikacje nie są jeszcze skonfigurowane. Aby połączyć Gmail, Slack i inne, dodaj klucz projektu w Ustawieniach → Klucze API, w sekcji Połączone aplikacje hostowane samodzielnie.","connectors.setupNeededRemote": "Połączone aplikacje nie są jeszcze skonfigurowane na hoście. Dodaj klucz projektu w sekcji Połączone aplikacje hostowane samodzielnie w ustawieniach hosta.","connectors.openSettings": "Otwórz ustawienia",- "connectors.perBot.title": "Nie każdy bot może używać tych aplikacji.",- "connectors.perBot.body": "Połączenie aplikacji tutaj nie przekazuje jej botowi. Każdy bot ma własny przełącznik Połączone aplikacje w Ustawieniach → Dostęp, a dopóki jest wyłączony, bot nie wie o istnieniu aplikacji.",- "connectors.perBot.allow": "Zezwól: {name}","connectors.featuredBefore": "Wyświetlane są wyróżnione aplikacje.","connectors.updateKey": "Zaktualizuj klucz połączonych aplikacji","connectors.featuredAfter": "aby zobaczyć pełny katalog.",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 94fc501eed..6ccccd5d3e 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -5454,9 +5454,6 @@"connectors.setupNeeded": "Os apps conectados ainda não estão configurados. Para conectar Gmail, Slack e outros, adicione uma chave de projeto em Configurações → Chaves de API, em “Hospedar os apps conectados por conta própria”.","connectors.setupNeededRemote": "Os apps conectados ainda não estão configurados no computador anfitrião. Adicione uma chave de projeto em “Hospedar os apps conectados por conta própria”, nas configurações do computador anfitrião.","connectors.openSettings": "Abrir configurações",- "connectors.perBot.title": "Nem todo bot pode usar estes apps.",- "connectors.perBot.body": "Conectar um app aqui não permite que os bots o usem automaticamente. Cada bot tem a própria opção “Apps conectados” em Configurações → Acesso e, enquanto ela não estiver ligada, o bot nem sabe que o app existe.",- "connectors.perBot.allow": "Permitir acesso a {name}","connectors.featuredBefore": "Mostrando apps em destaque.","connectors.updateKey": "Atualizar sua chave dos apps conectados","connectors.featuredAfter": "para ver o catálogo completo.",@@ -6441,6 +6438,11 @@"apps.filter.mcp": "Servidores MCP","apps.connected": "Conectado","apps.usedBy": "Usado por {names}",+ "apps.usedByNone": "Nenhum bot ainda",+ "apps.usedByChange": "Alterar",+ "apps.whichBots": "Quais bots podem usar {app}?",+ "apps.botsCanUse": "Seus bots já podem usar {app}.",+ "apps.noBotsUse": "Nenhum bot usa {app} ainda.","apps.showAll": "Mostrar todos os {count} apps","apps.mcp.add": "Adicionar servidor MCP","apps.connectedCount": "Conectados: {count}",diff --git a/src/locales/ru.json b/src/locales/ru.jsonindex 24cdf5551b..20626427b5 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -4847,9 +4847,6 @@"connectors.setupNeeded": "Подключённые приложения пока не настроены. Чтобы подключить Gmail, Slack и другие, добавьте ключ проекта в «Настройки → API-ключи», в разделе «Самостоятельный хостинг подключённых приложений».","connectors.setupNeededRemote": "Подключённые приложения пока не настроены на хосте. Добавьте ключ проекта в разделе «Самостоятельный хостинг подключённых приложений» в настройках хоста.","connectors.openSettings": "Открыть настройки",- "connectors.perBot.title": "Далеко не каждый бот может пользоваться этими приложениями.",- "connectors.perBot.body": "Подключение приложения здесь не передаёт его боту. У каждого бота есть собственный переключатель «Подключённые приложения» в «Настройки → Доступ», и пока он не включён, бот не знает о существовании этого приложения.",- "connectors.perBot.allow": "Разрешить {name}","connectors.featuredBefore": "Показаны рекомендуемые приложения.","connectors.updateKey": "Обновите свой ключ подключённых приложений","connectors.featuredAfter": "чтобы увидеть весь каталог.",diff --git a/src/locales/tr.json b/src/locales/tr.jsonindex 56bcab98f7..5006466f21 100644--- a/src/locales/tr.json+++ b/src/locales/tr.json@@ -3870,9 +3870,6 @@"connectors.setupNeeded": "Bağlı uygulamalar henüz kurulmadı. Gmail, Slack ve daha fazlasını bağlamak için Ayarlar → API anahtarları bölümündeki Kendi barındırdığınız bağlı uygulamalar altında bir proje anahtarı ekleyin.","connectors.setupNeededRemote": "Bağlı uygulamalar ana bilgisayarda henüz kurulmadı. Ana bilgisayarın ayarlarında Kendi barındırdığınız bağlı uygulamalar altına bir proje anahtarı ekleyin.","connectors.openSettings": "Ayarları aç",- "connectors.perBot.title": "Her bot bu uygulamaları kullanamaz.",- "connectors.perBot.body": "Burada bir uygulamayı bağlamak onu bir bota devretmez. Her botun Ayarlar → Erişim altında kendi Bağlı uygulamalar anahtarı vardır ve bu anahtar açık olana kadar bot uygulamanın varlığından haberdar olmaz.",- "connectors.perBot.allow": "{name} için izin ver","connectors.featuredBefore": "Öne çıkan uygulamalar gösteriliyor.","connectors.updateKey": "Bağlı uygulamalar anahtarınızı güncelleyin","connectors.featuredAfter": "(tüm katalog için).",diff --git a/src/locales/uk.json b/src/locales/uk.jsonindex d8235c4f41..a9cdee052f 100644--- a/src/locales/uk.json+++ b/src/locales/uk.json@@ -2383,9 +2383,6 @@"connectors.setupNeeded": "Підключені застосунки ще не налаштовано. Щоб підключити Gmail, Slack та інші, додайте ключ проєкту в Налаштування → API-ключі, у розділі «Самохостні підключені застосунки».","connectors.setupNeededRemote": "Підключені застосунки ще не налаштовано на хості. Додайте ключ проєкту в розділі «Самохостні підключені застосунки» в налаштуваннях хоста.","connectors.openSettings": "Відкрити налаштування",- "connectors.perBot.title": "Не кожен бот може користуватися цими застосунками.",- "connectors.perBot.body": "Підключення застосунку тут не передає його боту. У кожного бота є власний перемикач «Підключені застосунки» у Налаштування → Access, і доки він вимкнений, бот не знає про існування застосунку.",- "connectors.perBot.allow": "Дозволити {name}","connectors.featuredBefore": "Показано рекомендовані застосунки.","connectors.updateKey": "Оновіть ключ підключених застосунків","connectors.featuredAfter": "для повного каталогу.",diff --git a/src/locales/vi.json b/src/locales/vi.jsonindex 7268fcd0e7..12b090c7e4 100644--- a/src/locales/vi.json+++ b/src/locales/vi.json@@ -3870,9 +3870,6 @@"connectors.setupNeeded": "Các ứng dụng đã kết nối vẫn chưa được thiết lập. Để kết nối Gmail, Slack và nhiều dịch vụ khác, hãy thêm khóa dự án trong Cài đặt → Khóa API, bên dưới Tự lưu trữ ứng dụng đã kết nối.","connectors.setupNeededRemote": "Các ứng dụng đã kết nối vẫn chưa được thiết lập trên host. Hãy thêm khóa dự án trong mục Tự lưu trữ ứng dụng đã kết nối ở phần cài đặt của host.","connectors.openSettings": "Mở cài đặt",- "connectors.perBot.title": "Không phải bot nào cũng có thể sử dụng các ứng dụng này.",- "connectors.perBot.body": "Việc kết nối ứng dụng ở đây không tự động cấp ứng dụng đó cho bot. Mỗi bot có công tắc Ứng dụng đã kết nối riêng trong Cài đặt → Truy cập, và chừng nào công tắc chưa bật thì bot sẽ không biết ứng dụng đó tồn tại.",- "connectors.perBot.allow": "Cho phép {name}","connectors.featuredBefore": "Đang hiển thị các ứng dụng nổi bật.","connectors.updateKey": "Cập nhật khóa ứng dụng đã kết nối","connectors.featuredAfter": "để xem toàn bộ danh mục.",diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex eceb74ec18..3b2e0a96ac 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -5607,9 +5607,6 @@"connectors.setupNeeded": "尚未設定已連線的應用程式。若要連線 Gmail、Slack 等應用程式,請在「設定 → API 金鑰」的「自行架設已連線的應用程式」下新增專案金鑰。","connectors.setupNeededRemote": "主機上尚未設定已連線的應用程式。請在主機設定的「自行架設已連線的應用程式」下新增專案金鑰。","connectors.openSettings": "開啟設定",- "connectors.perBot.title": "並非每個機器人都能使用這些應用程式。",- "connectors.perBot.body": "在此連線應用程式不代表已授權機器人使用。每個機器人都有自己的「設定 → 存取權 → 已連線的應用程式」開關;開啟前,機器人不會知道此應用程式存在。",- "connectors.perBot.allow": "允許 {name}","connectors.featuredBefore": "目前顯示精選應用程式。","connectors.updateKey": "更新你的已連線應用程式金鑰","connectors.featuredAfter": "即可檢視完整目錄。",diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex bace5e00f8..abe00b036d 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -5404,9 +5404,6 @@"connectors.setupNeeded": "尚未设置已连接的应用。如需连接 Gmail、Slack 等应用,请在「设置 → API 密钥」的「自托管已连接的应用」下添加项目密钥。","connectors.setupNeededRemote": "主机上尚未设置已连接的应用。请在主机设置的「自托管已连接的应用」下添加项目密钥。","connectors.openSettings": "打开设置",- "connectors.perBot.title": "并非每个机器人都能使用这些应用。",- "connectors.perBot.body": "在此连接应用不代表已授权机器人使用。每个机器人都有自己的「设置 → 访问权 → 已连接的应用」开关;打开前,机器人不会知道此应用存在。",- "connectors.perBot.allow": "允许 {name}","connectors.featuredBefore": "正在显示精选应用。","connectors.updateKey": "更新你的已连接应用密钥","connectors.featuredAfter": "以查看完整目录。",