polish: honest headless screenshot error, PLAN status header, binary rebuild

This commit is contained in:
Hermes
2026-10-01 00:40:50 +00:00
parent 82fb92efb5
commit ab088c2315
3 changed files with 9 additions and 1 deletions

View File

@@ -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