Files
orca/native/computer-use-macos/Sources/OrcaComputerUseMacOSCore/TrustedOrcaApplication.swift
T
221eb1ce8b fix(computer-use): trust the dev app's bundle id in the helper's peer check (#26500)
pnpm dev launches the app as com.stablyai.orca.dev, but the macOS helper's
isTrustedOrcaApplication only trusted com.stablyai.orca, com.github.Electron
and ids starting with com.stablyai.orca.dev. (with the trailing dot). Every
computer-use request from a dev build failed with "computer-use agent peer is
not authorized".

Move the bundle id rule into TrustedOrcaApplication in
OrcaComputerUseMacOSCore so it is tested, and trust com.stablyai.orca.dev
exactly as well. Look-alikes such as com.stablyai.orca.devtools stay
untrusted.

Fixes #26498

Co-authored-by: petersindex <287557875+petersindex@users.noreply.github.com>
Co-authored-by: Neil <neil@stably.ai>
2026-10-23 19:20:38 -07:00

12 lines
576 B
Swift

/// Bundle ids of the apps whose computer-use sidecar may drive this helper.
public enum TrustedOrcaApplication {
public static func isTrusted(bundleId: String) -> Bool {
// Why: `pnpm dev` launches as `com.stablyai.orca.dev` and per-worktree wrapper apps use
// `com.stablyai.orca.dev.<name>`; the sidecar peer check must authorize both (#26498).
bundleId == "com.stablyai.orca" ||
bundleId == "com.stablyai.orca.dev" ||
bundleId.hasPrefix("com.stablyai.orca.dev.") ||
bundleId == "com.github.Electron"
}
}