{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Nuwe activity provider manifest",
  "type": "object",
  "required": ["schema_version", "provider", "runtime", "activities", "permissions", "capabilities"],
  "properties": {
    "schema_version": { "type": "string" },
    "provider": {
      "type": "object",
      "required": ["id", "name", "version"],
      "properties": {
        "id": { "type": "string" },
        "name": { "type": "string" },
        "version": { "type": "string" }
      }
    },
    "runtime": {
      "type": "object",
      "required": ["entrypoint", "sdk_version"],
      "properties": {
        "entrypoint": { "type": "string" },
        "sdk_version": { "type": "string" }
      }
    },
    "presentation": {
      "type": "object",
      "properties": {
        "thumbnail": { "type": "string" }
      },
      "additionalProperties": false
    },
    "activities": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["id", "name"],
        "properties": {
          "id": { "type": "string" },
          "name": { "type": "string" },
          "category": { "type": "string" },
          "duration_minutes": { "type": "integer" },
          "thumbnail": { "type": "string" },
          "surfaces": {
            "type": "array",
            "items": { "type": "string" }
          }
        }
      }
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "profile.basic",
          "context.current_state",
          "context.goals",
          "context.health_summary",
          "context.constraints",
          "context.session",
          "activity.complete",
          "host.haptics",
          "host.timer"
        ]
      }
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "activity.start",
          "activity.complete",
          "activity.cancel",
          "activity.outcome",
          "context.getCurrent",
          "context.getGoals",
          "context.getSession",
          "context.getSignals",
          "context.getConstraints",
          "profile.getBasic",
          "host.haptic",
          "host.timer.start",
          "host.timer.cancel"
        ]
      }
    }
  }
}
