cicy-desktop 2.1.150 → 2.1.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/main.js +12 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.150",
3
+ "version": "2.1.151",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
package/src/main.js CHANGED
@@ -1081,13 +1081,18 @@ electronApp.whenReady().then(async () => {
1081
1081
  }
1082
1082
 
1083
1083
  // Periodic WHOLE-desktop snapshot → ~/cicy-files/desktop-snapshot/desktop.b64
1084
- // (≤600px wide JPEG). ALL PLATFORMS: the cloud (cicy-code) fetches it via the
1085
- // dedicated non-dangerous `desktop_snapshot` RPC tool, which reads this fresh
1086
- // file — so there's no per-call screen capture, hence no macOS Screen-Recording
1087
- // prompt and no consent dialog. On Windows the capture runs in a --disable-gpu
1088
- // child electron (GDI path, works over RDP; main app GPU intact); on mac/linux
1089
- // it's an in-process native-capture loop (screencapture / scrot).
1090
- if (!global.__cicyDesktopSnapStarted) {
1084
+ // so the cloud (cicy-code) can read the screen via the `desktop_snapshot` tool.
1085
+ // Windows uses a --disable-gpu child (GDI, no prompt); linux uses scrot.
1086
+ //
1087
+ // macOS: this spawns `screencapture`, which DOES trigger the Screen-Recording TCC
1088
+ // prompt and on an ad-hoc-signed build (no Apple cert) the grant never sticks, so
1089
+ // the prompt fires over and over. So it's OFF by default on macOS (most users
1090
+ // docker/team management — don't need the agent to watch their screen). Opt in with
1091
+ // CICY_DESKTOP_SNAPSHOT=1. Other platforms stay on (opt out with =0).
1092
+ const __snapOn = process.platform === "darwin"
1093
+ ? process.env.CICY_DESKTOP_SNAPSHOT === "1"
1094
+ : process.env.CICY_DESKTOP_SNAPSHOT !== "0";
1095
+ if (!global.__cicyDesktopSnapStarted && __snapOn) {
1091
1096
  global.__cicyDesktopSnapStarted = true;
1092
1097
  try {
1093
1098
  const info = require("./utils/desktop-snapshot").startDesktopSnapshots();