Files
claude-code-haha/src/vendor/computer-use-mcp/nativeAppPolicy.ts
T
程序员阿江(Relakkes) 56c6a9aa8e feat(computer-use): align native app automation with Codex
Add a persistent isolated JavaScript worker for native app actions and batch
known operations without a model round trip between each input. Preserve
per-cell context, native errors, screenshot coordinates, and image types.

Align macOS gesture, key, inventory, capture, scroll, and clipboard behavior;
include a signed native receiver fixture and compiled sidecar regression tests.
Keep the Windows pixel route and fix cancellation with session-owned mouse
cleanup, lock revalidation, and portable signing-fixture tests.
2026-09-10 03:34:39 +08:00

37 lines
1.2 KiB
TypeScript

import { isIntrinsicAppDenied } from './deniedApps.js'
// Official macOS SkyComputerUseService 26.831.1000926:
// isForbiddenComputerUseTarget checks these four sets with exact equality.
// Legacy cross-platform tiers and display-name matches do not apply here.
export const NATIVE_FORBIDDEN_BUNDLE_IDS: ReadonlySet<string> = new Set([
'com.apple.Terminal',
'com.googlecode.iterm2',
'org.alacritty',
'dev.warp.Warp-Stable',
'net.kovidgoyal.kitty',
'co.zeit.hyper',
'com.github.wez.wezterm',
'org.tabby',
'com.mitchellh.ghostty',
'com.raphaelamorim.rio',
'dev.commandline.waveterm',
'com.openai.codex',
'com.openai.codex.alpha',
'com.openai.codex.beta',
'com.openai.codex.dev',
'com.openai.codex.nightly',
'com.openai.chat',
'com.openai.chat.alpha',
'com.openai.chat.beta',
'com.openai.chat.nightly',
'com.openai.chat.mac-debug',
'com.apple.UserNotificationCenter',
'com.apple.LocalAuthenticationRemoteService',
'com.apple.SecurityAgent',
])
export function isNativeAppDenied(bundleId: string | undefined, hostBundleId?: string): boolean {
return isIntrinsicAppDenied(bundleId, hostBundleId) ||
(bundleId !== undefined && NATIVE_FORBIDDEN_BUNDLE_IDS.has(bundleId))
}