polish: honest headless screenshot error, PLAN status header, binary rebuild
This commit is contained in:
@@ -477,7 +477,11 @@ def execute_structured_action(action_type, payload):
|
||||
b64 = base64.b64encode(f.read()).decode('utf-8')
|
||||
os.remove(ss_path)
|
||||
return json.dumps({"type":"file_result","filename":f"screenshot-{int(time.time())}.png","mime":"image/png","data":b64}), 0
|
||||
return "ERROR: screenshot blocked by macOS TCC — grant Screen Recording permission to python3 in System Settings > Privacy & Security > Screen Recording", 1
|
||||
import platform as _pf
|
||||
_sys = _pf.system()
|
||||
if _sys == "Darwin":
|
||||
return "ERROR: screenshot blocked by macOS TCC — grant Screen Recording permission to python3 in System Settings > Privacy & Security > Screen Recording", 1
|
||||
return "ERROR: screenshot failed — no usable display on this machine (headless?)", 1
|
||||
except Exception as e:
|
||||
return f"ERROR screenshot: {e}", 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user