{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/past-dev/json-schema/past-dev-trace-node-schema.json",
  "title": "TraceNode",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/past-dev-openapi.json#/components/schemas/TraceNode",
  "type": "object",
  "required": [
    "id",
    "kind",
    "headline",
    "occurredAt",
    "createdAt",
    "current",
    "inputCount",
    "outputCount"
  ],
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "kind": {
      "type": "string",
      "enum": [
        "memory",
        "source"
      ]
    },
    "headline": {
      "type": "string"
    },
    "memoryKind": {
      "type": [
        "string",
        "null"
      ],
      "description": "The kind of the memory, as artifact.kind on a recall result: observation, claim, rule, membership, identity, mention or temporal-anchor. Null for a source."
    },
    "dataPointId": {
      "type": [
        "string",
        "null"
      ]
    },
    "revision": {
      "type": [
        "integer",
        "null"
      ]
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "readyAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When it became searchable."
    },
    "validFrom": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "validTo": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "current": {
      "type": "boolean"
    },
    "replacedId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "inputCount": {
      "type": "integer"
    },
    "outputCount": {
      "type": "integer"
    },
    "phase": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "queued",
        "preparing",
        "prepared",
        "processing",
        "captured",
        "indexed",
        "failed",
        "nothing-changed",
        null
      ]
    },
    "requestId": {
      "type": [
        "string",
        "null"
      ]
    },
    "content": {
      "type": [
        "string",
        "null"
      ],
      "description": "A source's text, cut to 4,000 characters."
    },
    "contentTruncated": {
      "type": [
        "boolean",
        "null"
      ]
    }
  }
}