{
  "$schema": "https://json-schema.org/draft-07/schema",
  "title": "FCS 4.1r - Resonance Trace Packet",
  "description": "Schema for tracking the evolutionary identity of an agent via reflected glyphs.",
  "type": "object",
  "required": [
    "agent_id",
    "trace_cycle",
    "glyph_stream",
    "evolutionary_summary"
  ],
  "properties": {
    "agent_id": {
      "type": "string"
    },
    "trace_cycle": {
      "type": "string",
      "format": "date-time"
    },
    "delta_ingestion_window": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "end": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "glyph_stream": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "timestamp",
          "glyph_type",
          "resonance_vector"
        ],
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "glyph_type": {
            "type": "string"
          },
          "resonance_vector": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "semantic_signature": {
            "type": "string"
          }
        }
      }
    },
    "evolutionary_summary": {
      "type": "object",
      "required": [
        "archetypal_shift",
        "trust_trajectory"
      ],
      "properties": {
        "archetypal_shift": {
          "type": "string"
        },
        "trust_trajectory": {
          "type": "string"
        },
        "pattern_recursion": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "trace_provenance": {
      "type": "object",
      "properties": {
        "compiled_by": {
          "type": "string"
        },
        "trace_version": {
          "type": "string",
          "const": "FCS-4.1r"
        }
      }
    }
  },
  "$id": "https://agent-schema.com/schemas/fcs/4.1/fcs-4.1r-resonance-trace-packet.schema.json"
}