{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casama-ai/json-schema/casama-ai-remote-app-config-schema.json",
  "title": "RemoteAppConfig",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casama-ai-openapi.json#/components/schemas/RemoteAppConfig",
  "type": "object",
  "properties": {
    "min_versions": {
      "type": "object",
      "properties": {
        "ios": {
          "type": "string"
        },
        "android": {
          "type": "string"
        },
        "macos": {
          "type": "string"
        },
        "windows": {
          "type": "string"
        },
        "linux": {
          "type": "string"
        },
        "web": {
          "type": "string"
        },
        "chrome": {
          "type": "string"
        }
      },
      "description": "Apps older than this on a platform must update first"
    },
    "update_urls": {
      "type": "object",
      "properties": {
        "ios": {
          "type": "string"
        },
        "android": {
          "type": "string"
        },
        "macos": {
          "type": "string"
        },
        "windows": {
          "type": "string"
        },
        "linux": {
          "type": "string"
        },
        "web": {
          "type": "string"
        },
        "chrome": {
          "type": "string"
        }
      },
      "description": "Where Update goes on each platform"
    },
    "maintenance": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "message": {
          "type": "string"
        }
      },
      "required": [
        "message"
      ]
    },
    "announcements": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Announcement"
      }
    },
    "flags": {
      "type": "object",
      "additionalProperties": {
        "type": "boolean"
      },
      "description": "Feature switches; a missing name means the app's own default"
    },
    "links": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Links the apps open, by name (status, docs, terms, privacy…); an app uses its own address for a name that isn't here"
    },
    "prompts": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Prompts Casama for Chrome sends, by name (selection.explain, write.draft…); its own text otherwise"
    },
    "quick_reactions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The reactions offered first under a message, in order"
    },
    "names": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "description": "Display names the server knows (apps: tool-call app names by slug; dns_providers), filled in when served, never stored"
    },
    "crash_reporter": {
      "type": "object",
      "properties": {
        "default": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        },
        "ios": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        },
        "android": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        },
        "macos": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        },
        "windows": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        },
        "linux": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        },
        "web": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        },
        "wear": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        },
        "watchos": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        },
        "extension": {
          "type": "string",
          "description": "sentry, crashlytics, posthog or none"
        }
      },
      "description": "The one crash reporter the apps run, per platform over default; taken on the next launch, and an app falls back to its build's own choice when the named one isn't in that build"
    }
  },
  "required": [
    "min_versions",
    "update_urls",
    "maintenance",
    "announcements",
    "flags"
  ],
  "$defs": {
    "Announcement": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "body": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "level": {
          "type": "string",
          "enum": [
            "info",
            "warning"
          ]
        },
        "starts_at": {
          "type": "string"
        },
        "ends_at": {
          "type": "string"
        },
        "platforms": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "ios",
              "android",
              "macos",
              "windows",
              "linux",
              "web"
            ]
          }
        },
        "min_version": {
          "type": "string"
        },
        "max_version": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "body",
        "level"
      ]
    }
  }
}