{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sourcefinch-com/json-schema/sourcefinch-com-run-manifest-schema.json",
  "title": "RunManifest",
  "description": "Signed, timestamp-anchored manifest of a finished run (Evidence v2)",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sourcefinch-com-openapi.json#/components/schemas/RunManifest",
  "type": "object",
  "properties": {
    "manifest": {
      "type": "object",
      "additionalProperties": {},
      "description": "The sourcefinch/manifest@1 document"
    },
    "manifest_sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "SHA-256 of the RFC 8785 canonical manifest: the run's receipt"
    },
    "signature": {
      "description": "Base64 Ed25519 signature over the canonical manifest bytes",
      "type": [
        "string",
        "null"
      ]
    },
    "key_id": {
      "description": "RFC 7638 thumbprint of the key at /.well-known/sourcefinch-evidence-keys.json",
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)"
    },
    "anchor": {
      "description": "Null until the next anchoring batch (about a minute)",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "merkle_root": {
          "type": "string"
        },
        "proof": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tsa_url": {
          "type": "string"
        },
        "tsa_token": {
          "type": "string",
          "description": "Base64 DER RFC 3161 TimeStampResp over merkle_root"
        },
        "anchored_at": {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)"
        }
      },
      "required": [
        "merkle_root",
        "proof",
        "tsa_url",
        "tsa_token",
        "anchored_at"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "manifest",
    "manifest_sha256",
    "signature",
    "key_id",
    "created_at",
    "anchor"
  ],
  "additionalProperties": false
}