{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bernstein-run/json-schema/bernstein-run-a2-atask-response-schema.json",
  "title": "A2ATaskResponse",
  "description": "Serialised A2A task in responses.\n\n``receipt`` carries the lineage receipt for an inbound task (#2609): the\nexecution evidence a caller verifies offline with ``bernstein a2a verify\n--receipt``. It is ``None`` on read paths, and on write paths when the\nnode could not provision receipt key material - an absent receipt means\n\"unattested\", which a caller should treat as unverified rather than\ntrusted.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bernstein-run-a2a-api-openapi.yml#/components/schemas/A2ATaskResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "bernstein_task_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Bernstein Task Id"
    },
    "sender": {
      "type": "string",
      "title": "Sender"
    },
    "message": {
      "type": "string",
      "title": "Message"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "artifacts": {
      "items": {
        "$ref": "#/$defs/A2AArtifactResponse"
      },
      "type": "array",
      "title": "Artifacts"
    },
    "created_at": {
      "type": "number",
      "title": "Created At"
    },
    "updated_at": {
      "type": "number",
      "title": "Updated At"
    },
    "receipt": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Receipt"
    }
  },
  "type": "object",
  "required": [
    "id",
    "bernstein_task_id",
    "sender",
    "message",
    "status",
    "artifacts",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "A2AArtifactResponse": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "content_type": {
          "type": "string",
          "title": "Content Type"
        },
        "data": {
          "type": "string",
          "title": "Data"
        },
        "created_at": {
          "type": "number",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "name",
        "content_type",
        "data",
        "created_at"
      ],
      "title": "A2AArtifactResponse",
      "description": "Single artifact in responses."
    }
  }
}