{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hsimc.tech/reality-registry/schemas/stateless-execution-envelope.schema.json",
  "title": "HSIMC Stateless Execution Envelope v0.1",
  "type": "object",
  "required": [
    "request_id",
    "eperson_id",
    "work_ref",
    "reality_refs",
    "role_view_ref",
    "authority_ref",
    "resolved_at",
    "expires_at",
    "decision"
  ],
  "properties": {
    "request_id": {
      "type": "string"
    },
    "eperson_id": {
      "type": "string"
    },
    "work_ref": {
      "type": "string"
    },
    "reality_refs": {
      "type": "array"
    },
    "role_view_ref": {
      "type": "string"
    },
    "authority_ref": {
      "type": "string"
    },
    "human_supervisor_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "model_binding_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "capability_refs": {
      "type": "array"
    },
    "resolved_at": {
      "type": "string"
    },
    "expires_at": {
      "type": "string"
    },
    "decision": {
      "enum": [
        "COMPUTED_ALLOWED",
        "DENIED",
        "REQUIRES_HUMAN_REVIEW"
      ]
    },
    "evidence_refs": {
      "type": "array"
    }
  },
  "description": "Every action resolves current Reality, role, Authority, lifecycle, Human Supervisor and model/capability references. Prior session state is not trusted."
}
