A desktop coding agent with free access to frontier models.
TypeScript
feat: pause Computer Use
ogsamratdf789394cd1b
diff --git a/apps/app/src/app/constants.ts b/apps/app/src/app/constants.tsindex 71ff5f4f..ba68b307 100644--- a/apps/app/src/app/constants.ts+++ b/apps/app/src/app/constants.ts@@ -11,6 +11,9 @@ import {type OmniRushExtensionPlatform,} from "./extensions";+/** Computer Use is paused for now: hidden from the Library, never reconnected, and the desktop refuses to start it. */+export const COMPUTER_USE_PAUSED = true;+export const MODEL_PREF_KEY = "omnirush.defaultModel";export const SESSION_MODEL_PREF_KEY = "omnirush.sessionModels";export const THINKING_PREF_KEY = "omnirush.showThinking";@@ -224,7 +227,8 @@ export const MCP_QUICK_CONNECT: McpDirectoryInfo[] = [// from the default catalog; "Show hidden" reveals it.defaultHidden: true,},- ...BUILT_IN_OMNIRUSH_EXTENSION_MANIFESTS.map(extensionManifestToDirectoryInfo),+ // Computer Use is paused (COMPUTER_USE_PAUSED): not offered in the Library.+ ...BUILT_IN_OMNIRUSH_EXTENSION_MANIFESTS.filter((manifest) => !(COMPUTER_USE_PAUSED && manifest.id === "computer-use")).map(extensionManifestToDirectoryInfo),];export const OMNIRUSH_EXTENSION_CATALOG = MCP_QUICK_CONNECT.filter((entry) => entry.kind === "extension");diff --git a/apps/app/src/react-app/domains/connections/store.ts b/apps/app/src/react-app/domains/connections/store.tsindex f58b888d..e92f5fd7 100644--- a/apps/app/src/react-app/domains/connections/store.ts+++ b/apps/app/src/react-app/domains/connections/store.ts@@ -8,6 +8,7 @@ import { t } from "../../../i18n";import {getMcpServerName,isBuiltInOmniRushExtension,+ COMPUTER_USE_PAUSED,MCP_QUICK_CONNECT,type McpDirectoryInfo,} from "../../../app/constants";@@ -220,7 +221,7 @@ export function createConnectionsStore(options: {entries: McpServerEntry[],observedStatuses: Record<string, unknown>,) => {- if (!isDesktopRuntime() || options.workspaceType() !== "local" || !directory) return;+ if (COMPUTER_USE_PAUSED || !isDesktopRuntime() || options.workspaceType() !== "local" || !directory) return;const entry = entries.find((candidate) => candidate.name === "computer-use" || candidate.id === "computer-use");if (!entry || entry.config.type !== "local" || entry.config.enabled === false) return;if (state.mcpConnectingName) return;diff --git a/apps/app/src/react-app/shell/control/control-provider.tsx b/apps/app/src/react-app/shell/control/control-provider.tsxindex 1051c66f..f68bb2c1 100644--- a/apps/app/src/react-app/shell/control/control-provider.tsx+++ b/apps/app/src/react-app/shell/control/control-provider.tsx@@ -834,7 +834,6 @@ export function OmniRushRouteControlActions() {{ id: "extensions", label: "Library", description: "Skills, connections, and tools your agent can use." },{ id: "files", label: "File management", description: "Read, write, and organize files in your workspace." },{ id: "code", label: "Write and run code", description: "Generate, edit, and execute code with full tool access." },- { id: "computer-use", label: "Computer use", description: "Control your computer with screenshots and mouse/keyboard actions." },{ id: "skills", label: "Skills", description: "Install specialized skill packs for specific workflows." },{ id: "automations", label: "Automations", description: "Schedule recurring tasks and background agents." },{ id: "sharing", label: "Share sessions", description: "Share workspace sessions with collaborators via omnirush.ai Cloud." },diff --git a/apps/app/tests/extension-taxonomy.test.ts b/apps/app/tests/extension-taxonomy.test.tsindex 0b5ed75f..3cd7e109 100644--- a/apps/app/tests/extension-taxonomy.test.ts+++ b/apps/app/tests/extension-taxonomy.test.ts@@ -1,6 +1,6 @@import { describe, expect, test } from "bun:test";-import { MCP_QUICK_CONNECT, type McpDirectoryInfo } from "../src/app/constants";+import { COMPUTER_USE_PAUSED, MCP_QUICK_CONNECT, type McpDirectoryInfo } from "../src/app/constants";import {matchesExtensionFilter,taxonomyForDirectoryEntry,@@ -14,11 +14,15 @@ function builtInEntry(id: string): McpDirectoryInfo {describe("extension taxonomy", () => {test("built-ins are apps because they run on this device", () => {- for (const id of ["omnirush-browser", "computer-use", "ollama"]) {+ for (const id of ["omnirush-browser", ...(COMPUTER_USE_PAUSED ? [] : ["computer-use"]), "ollama"]) {expect(taxonomyForDirectoryEntry(builtInEntry(id))).toBe("app");}});+ test("Computer Use is not offered while it is paused", () => {+ expect(MCP_QUICK_CONNECT.some((entry) => entry.id === "computer-use")).toBe(!COMPUTER_USE_PAUSED);+ });+test("Google Workspace is not a built-in app; it arrives as an org connection", () => {expect(MCP_QUICK_CONNECT.some((entry) => entry.id === "google-workspace")).toBe(false);});diff --git a/apps/app/tests/mcp-local-server-recovery.test.ts b/apps/app/tests/mcp-local-server-recovery.test.tsindex 17ad0d99..8e4e6123 100644--- a/apps/app/tests/mcp-local-server-recovery.test.ts+++ b/apps/app/tests/mcp-local-server-recovery.test.ts@@ -1,6 +1,6 @@import { afterEach, describe, expect, test } from "bun:test";-import { MCP_QUICK_CONNECT } from "../src/app/constants";+import { COMPUTER_USE_PAUSED, MCP_QUICK_CONNECT } from "../src/app/constants";import { createOmniRushServerClient } from "../src/app/lib/omnirush-server";import { createOmniRushServerStore } from "../src/react-app/domains/connections/omnirush-server-store";import type { McpDirectoryInfo } from "../src/app/constants";@@ -75,7 +75,8 @@ describe("local MCP server recovery", () => {});});-describe("bundled Computer Use setup", () => {+// The setup flow is not reachable while Computer Use is paused (no catalog entry).+describe.skipIf(COMPUTER_USE_PAUSED)("bundled Computer Use setup", () => {async function connectWithHelper(command: string[] | null) {Object.defineProperty(globalThis, "window", {configurable: true,diff --git a/apps/desktop/electron/computer-use.mjs b/apps/desktop/electron/computer-use.mjsindex c389d0bc..6c7cda78 100644--- a/apps/desktop/electron/computer-use.mjs+++ b/apps/desktop/electron/computer-use.mjs@@ -12,8 +12,14 @@ import { createComputerUseHost } from "./computer-use-host.mjs";import { createPortableComputerUseHost } from "./computer-use-portable-host.mjs";import { captureComputerWindow, createComputerPreview } from "./computer-use-preview.mjs";+// Computer Use is paused for now: no host starts, so an already configured+// Computer Use connection fails to start instead of controlling the desktop.+const COMPUTER_USE_PAUSED = true;+const COMPUTER_USE_PAUSED_MESSAGE = "Computer Use is paused for now.";+let hostPromise;async function computerUseHost() {+ if (COMPUTER_USE_PAUSED) throw new Error(COMPUTER_USE_PAUSED_MESSAGE);if (!hostPromise) {if (process.platform === "win32" || process.platform === "linux") {hostPromise = createPortableComputerUseHost({ profile: app.getPath("userData"), capture: captureComputerWindow, preview: createComputerPreview() }).catch((error) => { hostPromise = null; throw error; });@@ -47,6 +53,7 @@ function computerUseHelperAppPath() {}async function getComputerUseMcpCommand() {+ if (COMPUTER_USE_PAUSED) throw new Error(COMPUTER_USE_PAUSED_MESSAGE);if (process.platform !== "darwin") {const host = await computerUseHost();if (!host.availability.supported) throw new Error(host.availability.error);