{
  "comment": "Machine-readable export of PolicyKit's managed-preference schema (Sources/PolicyKit/PolicyKit.swift header table) plus Sparkle's update keys. Consumed by web/creator.html; PolicyKitTests.testSchemaJSONMatchesPolicyKit fails when this drifts from the code.",
  "domain": "app.screenproof",
  "payloadType": "com.apple.ManagedClient.preferences",
  "policyKeys": {
    "BlockedBundleIDs": {
      "type": "array of string",
      "default": [],
      "union": true,
      "effect": "Bundle IDs whose windows are blocked from capture. Managed list is UNIONED with the user list — users can add, never remove managed entries."
    },
    "BlockedAppBehavior": {
      "type": "string",
      "enum": ["omit", "placeholder", "cancelCapture"],
      "default": "placeholder",
      "effect": "What happens where a blocked app's window would appear: omit it, show a placeholder plate, or cancel the whole capture."
    },
    "PIIPatterns": {
      "type": "array of dict",
      "default": [],
      "union": true,
      "builtins": ["email", "phone", "ssn", "card", "iban", "ipv4"],
      "entryKeys": {
        "Name": "string — builtin name (action override only) or a custom pattern name",
        "Action": "string — blurMandatory | blurSuggested",
        "Regex": "string (ICU) — required for custom patterns, IGNORED for builtins"
      },
      "effect": "PII detection rules. Builtins always run (default blur-suggested); entries override their action by Name. Custom entries add regex detectors. Managed wins per Name; user entries only ever ADD detection."
    },
    "MandatoryReview": {
      "type": "bool",
      "default": true,
      "effect": "Require the review window before export."
    },
    "Watermark": {
      "type": "dict",
      "default": { "Enabled": false },
      "entryKeys": {
        "Enabled": "bool — default false",
        "IncludeUser": "bool — default true",
        "IncludeDevice": "bool — default true",
        "IncludeTimestamp": "bool — default true"
      },
      "effect": "Watermark baked into the working copy at capture and re-stamped on export. Dict replaces per-source (no merge)."
    },
    "AllowedExportDestinations": {
      "type": "array of string",
      "enum": ["clipboard", "folder", "uploadEndpoint"],
      "default": ["clipboard", "folder"],
      "effect": "Where exports may go. Unknown values dropped with a diagnostic."
    },
    "AuditWebhookURL": {
      "type": "string (URL)",
      "default": null,
      "effect": "SIEM / Splunk HEC endpoint for audit events."
    },
    "SidecarMode": {
      "type": "string",
      "enum": ["off", "file", "embedded"],
      "default": "embedded",
      "effect": "Where editable annotations persist for the WORKING COPY (never the export)."
    },
    "AllowSidecars": {
      "type": "bool",
      "default": null,
      "legacy": true,
      "effect": "Legacy: false maps to SidecarMode off; true leaves the default. Prefer SidecarMode — the creator does not emit this key."
    },
    "LockAgent": {
      "type": "bool",
      "default": false,
      "effect": "Hide Quit; the agent is not user-terminable (managed installs)."
    },
    "LicenseFilePath": {
      "type": "string (path)",
      "default": null,
      "effect": "Path to the Ed25519-signed license file."
    },
    "LicenseKey": {
      "type": "string",
      "default": null,
      "effect": "The license itself (base64 one-liner from the purchase email or raw signed JSON). Wins over LicenseFilePath — one-profile licensing, no file drop."
    }
  },
  "sparkleKeys": {
    "SUEnableAutomaticChecks": {
      "type": "bool",
      "effect": "Check the update feed automatically without asking permission."
    },
    "SUAutomaticallyUpdate": {
      "type": "bool",
      "effect": "Silent updates: download and install without prompting the user."
    },
    "SUScheduledCheckInterval": {
      "type": "integer (seconds)",
      "minimum": 3600,
      "suggested": 86400,
      "effect": "Seconds between automatic checks. Sparkle enforces a 3600 floor; 86400 = daily."
    }
  }
}
