{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-native-debug-artifact-session-manifest-schema.json",
  "title": "NativeDebugArtifactSessionManifest",
  "description": "Resumable native debug artifact manifest accepted by\n`POST /api/native-debug-artifact-uploads`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-debug-files-api-openapi.yml#/components/schemas/NativeDebugArtifactSessionManifest",
  "additionalProperties": false,
  "properties": {
    "artifactType": {
      "$ref": "#/$defs/NativeDebugArtifactManifestType",
      "description": "Manifest type produced by native release tooling."
    },
    "artifacts": {
      "description": "Native debug objects included in this upload.",
      "items": {
        "$ref": "#/$defs/NativeDebugArtifactSessionEntry"
      },
      "type": "array"
    },
    "environment": {
      "description": "Deployment environment used by runtime telemetry.",
      "type": "string"
    },
    "projectId": {
      "description": "Project that owns the debug artifact.",
      "format": "uuid",
      "type": "string"
    },
    "release": {
      "description": "Release identifier used by runtime telemetry.",
      "type": "string"
    },
    "service": {
      "description": "Logical service name used by runtime telemetry.",
      "type": "string"
    },
    "validation": {
      "$ref": "#/$defs/NativeDebugArtifactManifestValidation",
      "description": "Tooling-side validation summary."
    }
  },
  "required": [
    "projectId",
    "release",
    "environment",
    "service",
    "artifactType",
    "validation",
    "artifacts"
  ],
  "type": "object",
  "$defs": {
    "NativeArchitecture": {
      "description": "Architectures supported by native frame capture.",
      "oneOf": [
        {
          "const": "arm",
          "description": "32-bit ARM.",
          "type": "string"
        },
        {
          "const": "arm64",
          "description": "64-bit ARM.",
          "type": "string"
        },
        {
          "const": "arm64e",
          "description": "Apple arm64e.",
          "type": "string"
        },
        {
          "const": "x86_64",
          "description": "64-bit x86.",
          "type": "string"
        },
        {
          "const": "x86",
          "description": "32-bit x86.",
          "type": "string"
        }
      ]
    },
    "NativeDebugArtifactChunkDescriptor": {
      "additionalProperties": false,
      "description": "One content-addressed native debug artifact chunk.",
      "properties": {
        "byteSize": {
          "description": "Positive chunk size, bounded by the server-advertised chunk size.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "sha256": {
          "description": "Lowercase SHA-256 of the exact chunk bytes.",
          "type": "string"
        }
      },
      "required": [
        "sha256",
        "byteSize"
      ],
      "type": "object"
    },
    "NativeDebugArtifactManifestType": {
      "description": "Native debug artifact manifest type.",
      "oneOf": [
        {
          "const": "apple_dsym_manifest",
          "description": "Apple dSYM Mach-O debug objects.",
          "type": "string"
        },
        {
          "const": "android_elf_manifest",
          "description": "Android ELF debug objects with GNU build IDs.",
          "type": "string"
        }
      ]
    },
    "NativeDebugArtifactManifestValidation": {
      "additionalProperties": false,
      "description": "Tooling-side validation summary.",
      "properties": {
        "status": {
          "$ref": "#/$defs/NativeDebugArtifactManifestValidationStatus",
          "description": "Validation status."
        }
      },
      "required": [
        "status"
      ],
      "type": "object"
    },
    "NativeDebugArtifactManifestValidationStatus": {
      "description": "Native debug artifact manifest validation status.",
      "oneOf": [
        {
          "const": "ready",
          "description": "Manifest is ready for hosted validation.",
          "type": "string"
        }
      ]
    },
    "NativeDebugArtifactSessionEntry": {
      "additionalProperties": false,
      "description": "One native debug object split into canonical resumable chunks.",
      "properties": {
        "architecture": {
          "$ref": "#/$defs/NativeArchitecture",
          "description": "Exact CPU architecture for the image slice."
        },
        "chunks": {
          "description": "Ordered fixed-size chunks that reconstruct the debug object.",
          "items": {
            "$ref": "#/$defs/NativeDebugArtifactChunkDescriptor"
          },
          "type": "array"
        },
        "debugFile": {
          "$ref": "#/$defs/NativeDebugFileDescriptor",
          "description": "Complete assembled debug object descriptor."
        },
        "imageUuid": {
          "description": "Mach-O UUID or canonicalized GNU build ID emitted by the runtime image.",
          "format": "uuid",
          "type": "string"
        }
      },
      "required": [
        "imageUuid",
        "architecture",
        "debugFile",
        "chunks"
      ],
      "type": "object"
    },
    "NativeDebugFileDescriptor": {
      "additionalProperties": false,
      "description": "One uploaded native debug object descriptor.",
      "properties": {
        "artifactSha256": {
          "description": "SHA-256 hex digest of the uploaded file.",
          "type": "string"
        },
        "byteSize": {
          "description": "Byte size of the uploaded file.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "artifactSha256",
        "byteSize"
      ],
      "type": "object"
    }
  }
}