sentinelApps.ts 950 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * Sentinel apps — 需要特殊权限警告的应用列表
  3. *
  4. * 包含终端、文件管理器、系统设置等敏感应用。
  5. * Computer Use 操作这些应用时会显示额外警告。
  6. */
  7. type SentinelCategory = 'shell' | 'filesystem' | 'system_settings'
  8. const SENTINEL_MAP: Record<string, SentinelCategory> = {
  9. // Shell / Terminal
  10. 'com.apple.Terminal': 'shell',
  11. 'com.googlecode.iterm2': 'shell',
  12. 'dev.warp.Warp-Stable': 'shell',
  13. 'io.alacritty': 'shell',
  14. 'com.github.wez.wezterm': 'shell',
  15. 'net.kovidgoyal.kitty': 'shell',
  16. 'co.zeit.hyper': 'shell',
  17. // Filesystem
  18. 'com.apple.finder': 'filesystem',
  19. // System Settings
  20. 'com.apple.systempreferences': 'system_settings',
  21. 'com.apple.SystemPreferences': 'system_settings',
  22. }
  23. export const sentinelApps: string[] = Object.keys(SENTINEL_MAP)
  24. export function getSentinelCategory(bundleId: string): SentinelCategory | null {
  25. return SENTINEL_MAP[bundleId] ?? null
  26. }