mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-16 13:25:51 +00:00
Merge remote-tracking branch 'origin/feature/computer-use/mac-support'
This commit is contained in:
@@ -46,9 +46,16 @@ export function getComputerUseHostAdapter(): ComputerUseHostAdapter {
|
||||
}),
|
||||
ensureOsPermissions: async () => {
|
||||
if (process.platform !== 'darwin') return { granted: true }
|
||||
const cu = requireComputerUseSwift()
|
||||
const accessibility = (cu as any).tcc.checkAccessibility()
|
||||
const screenRecording = (cu as any).tcc.checkScreenRecording()
|
||||
const cu = requireComputerUseSwift() as any
|
||||
// Native .node module exposes tcc; cross-platform JS backend does not.
|
||||
// When tcc is absent (JS backend on macOS), we cannot programmatically
|
||||
// check TCC status — returning granted:false would create a deadlock
|
||||
// (recheck also fails, user can never pass). The JS backend uses
|
||||
// osascript/screencapture which trigger OS-level permission prompts
|
||||
// themselves, so the OS provides the safety net instead.
|
||||
if (!cu.tcc) return { granted: true }
|
||||
const accessibility = cu.tcc.checkAccessibility()
|
||||
const screenRecording = cu.tcc.checkScreenRecording()
|
||||
return accessibility && screenRecording
|
||||
? { granted: true }
|
||||
: { granted: false, accessibility, screenRecording }
|
||||
|
||||
Reference in New Issue
Block a user