{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/service-read.schema.json",
  "title": "Service read",
  "description": "What GET /v1/services/confluence, /crashlytics and /figma return (`service-read.mjs`): one Confluence page, one Crashlytics issue or one Figma frame render, through the pipeline's own clients. Text is redacted; a frame comes back as base64 PNG.",
  "type": "object",
  "additionalProperties": false,
  "required": ["contractVersion", "service"],
  "properties": {
    "contractVersion": {
      "type": "string",
      "pattern": "^1\\.[0-9]+\\.[0-9]+$",
      "x-sensitivity": "none"
    },
    "service": {
      "enum": ["confluence", "crashlytics", "figma"]
    },
    "pageId": {
      "type": ["string", "null"]
    },
    "title": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "apiContracts": {
      "type": "integer"
    },
    "type": {
      "type": ["string", "null"]
    },
    "occurrences": {
      "type": ["number", "null"]
    },
    "impactedUsers": {
      "type": ["number", "null"]
    },
    "stackTrace": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "fileKey": {
      "type": "string"
    },
    "nodeId": {
      "type": "string"
    },
    "mime": {
      "const": "image/png"
    },
    "data": {
      "type": "string"
    }
  }
}
