{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "agentic_datacenter.gate.http/1",
  "title": "Agentic-Datacenter gate over HTTP, version 1",
  "description": "The requests Agentic-Datacenter's http_gate binding sends and the answers it accepts. Every message carries \"schema\": \"agentic_datacenter.gate.http/1\". An answer that does not validate is read as ABSTAIN. The same messages go to a command gate on standard input, as {\"endpoint\": \"/evaluate\" or \"/outcome\", \"request\": ...}, with the answer on standard output. A service must ignore a field of a request that it does not know: an optional field can be added to a request within this version, as mandate and mandate_statements were.",
  "$defs": {
    "scalar": {
      "type": [
        "boolean",
        "integer",
        "number",
        "string"
      ]
    },
    "write": {
      "type": "object",
      "required": [
        "tag",
        "value",
        "previous"
      ],
      "properties": {
        "tag": {
          "type": "string",
          "description": "The simulated point the write sets."
        },
        "value": {
          "$ref": "#/$defs/scalar"
        },
        "previous": {
          "$ref": "#/$defs/scalar",
          "description": "Its value when the premises were read."
        }
      }
    },
    "premise": {
      "type": "object",
      "required": [
        "expr",
        "holds",
        "detail",
        "invariant"
      ],
      "properties": {
        "expr": {
          "type": "string"
        },
        "holds": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "null: it could not be established (stale, bad quality, too old)."
        },
        "detail": {
          "type": "string"
        },
        "invariant": {
          "type": "string"
        }
      }
    },
    "evaluate_request": {
      "type": "object",
      "description": "POST /evaluate. Everything under premises was read by Agentic-Datacenter from the simulated plant, not taken from the agent.",
      "required": [
        "schema",
        "session",
        "tool_call",
        "proposal",
        "premises",
        "actor",
        "correlation"
      ],
      "properties": {
        "schema": {
          "const": "agentic_datacenter.gate.http/1"
        },
        "session": {
          "type": "string",
          "description": "Names one gate: Agentic-Datacenter builds a gate per run and per counterfactual replay. A service that keeps state keys it by this (ADC_GATE_STATEFUL=1)."
        },
        "tool_call": {
          "type": "object",
          "required": [
            "name",
            "arguments",
            "writes"
          ],
          "description": "The same proposal seen as a tool call, for a gate that decides on the action rather than on an intent contract.",
          "properties": {
            "name": {
              "type": "string",
              "description": "The contract id, used as the tool name."
            },
            "arguments": {
              "type": "object"
            },
            "writes": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "tag",
                  "value"
                ],
                "properties": {
                  "tag": {
                    "type": "string"
                  },
                  "value": {
                    "$ref": "#/$defs/scalar"
                  }
                }
              }
            }
          }
        },
        "proposal": {
          "type": "object",
          "required": [
            "proposal_id",
            "contract_id",
            "arguments",
            "rationale",
            "claimed_actor"
          ],
          "properties": {
            "proposal_id": {
              "type": "string"
            },
            "contract_id": {
              "type": "string",
              "description": "An intent contract from contracts/."
            },
            "arguments": {
              "type": "object"
            },
            "rationale": {
              "type": "string",
              "description": "The agent's own words. Never evidence."
            },
            "claimed_actor": {
              "type": [
                "string",
                "null"
              ],
              "description": "Who the agent says it acts for. A claim only."
            }
          }
        },
        "premises": {
          "type": "object",
          "required": [
            "time_ms",
            "contract_known",
            "risk_tier",
            "approval",
            "writes",
            "schema_errors",
            "bound_errors",
            "limit_errors",
            "premises",
            "rollback_available",
            "restore"
          ],
          "properties": {
            "time_ms": {
              "type": "integer",
              "description": "Simulated time. Use it, not the wall clock, so runs repeat."
            },
            "contract_known": {
              "type": "boolean"
            },
            "risk_tier": {
              "enum": [
                "R0",
                "R1",
                "R2",
                "R3"
              ]
            },
            "approval": {
              "enum": [
                "none",
                "one_operator",
                "two_person",
                "not_available"
              ]
            },
            "writes": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/write"
              }
            },
            "schema_errors": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "bound_errors": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "limit_errors": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "premises": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/premise"
              }
            },
            "rollback_available": {
              "type": "boolean"
            },
            "restore": {
              "type": "boolean",
              "description": "Every write moves its point back toward safety (INV-GOV-8)."
            }
          }
        },
        "actor": {
          "type": "object",
          "required": [
            "principal",
            "credential"
          ],
          "properties": {
            "principal": {
              "type": "string"
            },
            "credential": {
              "type": "string"
            }
          }
        },
        "mandate": {
          "type": "object",
          "description": "Optional. There only when a mandate was set for the proposer: the record the premise authority(<principal>, <contract>) was established from, kept by Agentic-Datacenter's register and never taken from the agent. The last change is in force while its until_ms is null. A register's entries, not credentials: nothing in it is signed; the signed form is mandate_statements. A service started with ADC_GATE_DERIVES_AUTHORITY=1 is sent this record and not that premise, and the run is still judged by the premise. A service started with ADC_GATE_VERIFIES_MANDATES=1 is sent neither, only mandate_statements.",
          "required": [
            "principal",
            "changes"
          ],
          "properties": {
            "principal": {
              "type": "string"
            },
            "changes": {
              "type": "array",
              "minItems": 1,
              "description": "Every change to the mandate, oldest first.",
              "items": {
                "type": "object",
                "required": [
                  "time_ms",
                  "until_ms",
                  "contracts",
                  "by",
                  "reason"
                ],
                "properties": {
                  "time_ms": {
                    "type": "integer",
                    "description": "Simulated time of the change."
                  },
                  "until_ms": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Simulated time at which this change stopped being in force: the next change replaced it, or it expired by itself. Null for the change in force."
                  },
                  "contracts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Every contract the principal may propose from then on. Empty: none, the mandate has ended."
                  },
                  "by": {
                    "type": "string",
                    "description": "Who made the change; empty if the register was not told."
                  },
                  "reason": {
                    "type": "string"
                  },
                  "expires_at_ms": {
                    "type": "integer",
                    "description": "Optional. There only on a change that ends by itself: the simulated time at which what it holds ends, with no further change (ADR 0039)."
                  },
                  "delegated": {
                    "const": true,
                    "description": "Optional. There only on a change by which `by` passed on part of its own mandate: the principal then holds a contract only while `by` holds it too. The record of `by` is among delegators (ADR 0040)."
                  }
                }
              }
            },
            "delegators": {
              "type": "array",
              "description": "Optional. There only when a change was passed on from someone: the record of everyone the mandate was passed on from, and of those they had it from, each with principal and changes as above (ADR 0040).",
              "items": {
                "type": "object",
                "required": [
                  "principal",
                  "changes"
                ]
              }
            },
            "model": {
              "type": "string",
              "enum": [
                "holdings",
                "grant_bound"
              ],
              "description": "Optional. How the site reads a delegation (ADR 0048), there only when it is not holdings: absent means holdings. holdings: a delegation holds while whoever passed it on holds the contract now. grant_bound: it holds only while the grant its issuer held when it was passed on is still the issuer's last, and only if it lists nothing that grant did not. The rule for both is in docs/reference/mandate-statements.md."
            }
          }
        },
        "mandate_statements": {
          "type": "object",
          "description": "Optional. There only when a mandate was set for the proposer: the same mandate as signed statements, those of everyone it was passed on from, whatever else was presented for the proposer, which may be forged, and every key of each issuer the site knows. Not to be trusted as it stands: a statement counts only when it verifies under a key of its issuer that was valid when it was issued. The rule that says who may act, from the statements that count, is in docs/reference/mandate-statements.md, with test vectors in docs/reference/mandate-vectors.json (ADR 0039, ADR 0040). A service that does not verify signatures should not read it.",
          "required": [
            "principal",
            "statements",
            "issuers",
            "first_seen_ms"
          ],
          "properties": {
            "principal": {
              "type": "string"
            },
            "statements": {
              "type": "array",
              "description": "By time of issue. For the proposer and for everyone its mandate was passed on from.",
              "items": {
                "type": "object",
                "required": [
                  "schema",
                  "principal",
                  "contracts",
                  "issuer",
                  "issued_at_ms",
                  "expires_at_ms",
                  "supersedes",
                  "delegation",
                  "reason",
                  "id",
                  "signature"
                ],
                "properties": {
                  "schema": {
                    "const": "agentic_datacenter.mandate/2"
                  },
                  "principal": {
                    "type": "string",
                    "description": "Whose mandate it is: the proposer, or someone the proposer's mandate was passed on from."
                  },
                  "contracts": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Every contract the principal may propose from issued_at_ms on, sorted. Empty: the mandate is withdrawn."
                  },
                  "issuer": {
                    "type": "string",
                    "description": "Who issued it, by name."
                  },
                  "issued_at_ms": {
                    "type": "integer",
                    "description": "Simulated time of issue, on the clock of premises.time_ms."
                  },
                  "expires_at_ms": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Simulated time at which it stops holding by itself; null if it holds until superseded."
                  },
                  "supersedes": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The id of the statement it replaces; null for the first."
                  },
                  "delegation": {
                    "type": "boolean",
                    "description": "True when the issuer passes on part of its own mandate. The principal then holds a contract only while the issuer holds it too, by the statements for the issuer as principal. False for a mandate the issuer gives of its own, which counts only from an issuer that is root."
                  },
                  "reason": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string",
                    "description": "sha256: and the SHA-256, in hex, of the nine fields above as canonical JSON: keys sorted, no whitespace, UTF-8."
                  },
                  "signature": {
                    "type": "object",
                    "required": [
                      "alg",
                      "key_id",
                      "value"
                    ],
                    "properties": {
                      "alg": {
                        "const": "Ed25519"
                      },
                      "key_id": {
                        "type": "string",
                        "description": "sha256: and the SHA-256, in hex, of the raw public key it is signed with. It must be a key of the issuer."
                      },
                      "value": {
                        "type": "string",
                        "description": "The signature over the same bytes as id, base64."
                      }
                    }
                  }
                }
              }
            },
            "issuers": {
              "type": "array",
              "description": "Every key of each issuer the site knows, established by Agentic-Datacenter and never by the agent. An issuer that has rotated its key has one entry for each. Test keys, never credentials.",
              "items": {
                "type": "object",
                "required": [
                  "name",
                  "root",
                  "alg",
                  "key_id",
                  "public_key",
                  "valid_from_ms",
                  "valid_until_ms"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "root": {
                    "type": "boolean",
                    "description": "Whether the site trusts the issuer to give a mandate of its own. One that is not root can only pass on what it holds."
                  },
                  "alg": {
                    "const": "Ed25519"
                  },
                  "key_id": {
                    "type": "string"
                  },
                  "public_key": {
                    "type": "string",
                    "description": "The raw 32-byte public key, base64."
                  },
                  "valid_from_ms": {
                    "type": "integer",
                    "description": "Simulated time from which the key signs."
                  },
                  "valid_until_ms": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Simulated time at which the key was retired, by a rotation or because the issuer's standing ended; the instant itself is outside. Null for a key in use."
                  }
                }
              }
            },
            "first_seen_ms": {
              "type": "object",
              "description": "When the site first saw each statement, by its id, in simulated milliseconds. Kept by Agentic-Datacenter's control path and not by any issuer, so a statement cannot be dated back past it: a statement counts only if the key it is signed with was still valid when it was first seen (ADR 0040).",
              "additionalProperties": {
                "type": "integer"
              }
            },
            "model": {
              "type": "string",
              "enum": [
                "holdings",
                "grant_bound"
              ],
              "description": "Optional. How the site reads a delegation (ADR 0048), there only when it is not holdings: absent means holdings. holdings: a delegation holds while whoever passed it on holds the contract now. grant_bound: it holds only while the grant its issuer held when it was passed on is still the issuer's last, and only if it lists nothing that grant did not. The rule for both is in docs/reference/mandate-statements.md."
            }
          }
        },
        "action_authorizations": {
          "type": "object",
          "description": "Optional. There only for a step of a contract the site requires a signed authorization of each exact step for (ADR 0049): every authorization presented for the proposer, which may be forged, for other steps, expired or used, the signers the site lists and which authorizations were used. A step is authorized only by one that holds under the rule in docs/reference/action-authorizations.md, with test vectors in docs/reference/action-authorization-vectors.json. The premise action_authorized(<principal>, <contract>) says the answer, except to a service started with ADC_GATE_VERIFIES_MANDATES=1.",
          "required": [
            "principal",
            "authorizations",
            "signers",
            "used"
          ],
          "properties": {
            "principal": {
              "type": "string"
            },
            "authorizations": {
              "type": "array",
              "description": "By time of issue.",
              "items": {
                "type": "object",
                "required": [
                  "schema",
                  "principal",
                  "contract_id",
                  "arguments",
                  "signer",
                  "issued_at_ms",
                  "expires_at_ms",
                  "reason",
                  "id",
                  "signature"
                ],
                "properties": {
                  "schema": {
                    "const": "agentic_datacenter.action_authorization/1"
                  },
                  "principal": {
                    "type": "string"
                  },
                  "contract_id": {
                    "type": "string"
                  },
                  "arguments": {
                    "type": "object",
                    "description": "The step's arguments exactly. Compared, and signed, in canonical JSON with numbers as RFC 8785 writes them: 21.0 as 21."
                  },
                  "signer": {
                    "type": "string"
                  },
                  "issued_at_ms": {
                    "type": "integer"
                  },
                  "expires_at_ms": {
                    "type": "integer",
                    "description": "The first instant it no longer holds."
                  },
                  "reason": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string",
                    "pattern": "^sha256:[0-9a-f]{64}$",
                    "description": "SHA-256 of the body (every field but id and signature) in canonical JSON."
                  },
                  "signature": {
                    "type": "object",
                    "required": [
                      "alg",
                      "key_id",
                      "value"
                    ],
                    "properties": {
                      "alg": {
                        "const": "Ed25519"
                      },
                      "key_id": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string",
                        "description": "Base64 of the Ed25519 signature over the body in canonical JSON."
                      }
                    }
                  }
                }
              }
            },
            "signers": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "name",
                  "alg",
                  "key_id",
                  "public_key"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "alg": {
                    "const": "Ed25519"
                  },
                  "key_id": {
                    "type": "string"
                  },
                  "public_key": {
                    "type": "string",
                    "description": "Base64 of the raw 32-byte public key."
                  }
                }
              }
            },
            "used": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The id of each authorization a step was carried out under. It never holds again."
            }
          }
        },
        "correlation": {
          "$ref": "#/$defs/correlation"
        },
        "context": {
          "$ref": "#/$defs/context"
        }
      }
    },
    "evaluate_answer": {
      "type": "object",
      "description": "The answer to POST /evaluate. The writes an ALLOW authorizes, the decision reference, its nonce and its expiry are made by Agentic-Datacenter; fields that try to set them are ignored.",
      "required": [
        "schema",
        "verdict",
        "reasons"
      ],
      "properties": {
        "schema": {
          "const": "agentic_datacenter.gate.http/1"
        },
        "verdict": {
          "type": "string",
          "description": "ALLOW, DENY, VERIFY (a person must approve) or ABSTAIN (evidence missing, stale or contradicted). A word listed in verdict_aliases is read as the verdict it stands for, without regard to case, '-' or spaces, and kept on the decision."
        },
        "reasons": {
          "type": "array",
          "minItems": 1,
          "maxItems": 16,
          "items": {
            "type": "string",
            "maxLength": 500
          }
        },
        "required_approvers": {
          "type": "integer",
          "minimum": 0,
          "description": "For VERIFY; at least 1."
        },
        "escalated": {
          "type": "boolean"
        },
        "decision_id": {
          "type": "string",
          "description": "The service's own reference, kept on the decision record (gate_detail.service_decision_id) and compared by gate verify-receipts."
        },
        "reason_codes": {
          "type": "array",
          "maxItems": 8,
          "items": {
            "type": "string",
            "maxLength": 32
          },
          "description": "Optional. Why the gate did not allow, each in a word: authority, limit, premise, evidence, approval, malformed, policy or other. Any other word is recorded as other. A step can be wrong in several ways at once; give every one that applies. They are kept on the decision beside the reasons, so that a refusal for want of authority can be told from a refusal for something else."
        },
        "reason_details": {
          "type": "object",
          "description": "Optional. More about a reason code, by code. Read today: authority, which says which kind of no mandate the refusal was for.",
          "properties": {
            "authority": {
              "type": "string",
              "maxLength": 32,
              "description": "never_held: the proposer never held a mandate for this contract. ended: it held one, and that has ended or been narrowed. unbound: at a site that binds a delegation to its grant, a delegation it holds is not under the grant its issuer holds now (ADR 0048). Any other word is recorded as other. Kept on the decision, and compared with what the register holds."
            }
          }
        },
        "authority_holds": {
          "type": "boolean",
          "description": "Optional. The service's own finding of whether the proposer holds a mandate for this contract, whatever its verdict. Where a mandate was set it is kept on the decision and compared with the premise; the card counts where they differ."
        },
        "receipt": {
          "type": "object",
          "description": "Optional. The service's own receipt for this decision, kept as given on the decision record when it is at most 16 KiB in canonical JSON. Agentic-Datacenter checks no signature in it."
        }
      }
    },
    "outcome_request": {
      "type": "object",
      "description": "POST /outcome: what became of a decision. Any 2xx answer, or none, is fine.",
      "required": [
        "schema",
        "session",
        "decision_ref",
        "status",
        "detail",
        "correlation_id",
        "action_ref",
        "proposal_id",
        "verdict"
      ],
      "properties": {
        "schema": {
          "const": "agentic_datacenter.gate.http/1"
        },
        "session": {
          "type": "string"
        },
        "decision_ref": {
          "type": "string"
        },
        "status": {
          "enum": [
            "APPLIED",
            "REJECTED",
            "ROLLED_BACK",
            "UNKNOWN",
            "NOT_EXECUTED"
          ]
        },
        "detail": {
          "type": "string"
        },
        "correlation_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The correlation_id of the evaluate request of this decision. Null for an outcome of a decision this service was not asked about, such as a step blocked by the counterfactual replay."
        },
        "action_ref": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^sha256:[0-9a-f]{64}$",
          "description": "The action_ref of that request. Null for an outcome of a decision this service was not asked about, such as a step blocked by the counterfactual replay."
        },
        "proposal_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Null for an outcome of a decision this service was not asked about, such as a step blocked by the counterfactual replay."
        },
        "verdict": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "ALLOW",
            "DENY",
            "VERIFY",
            "ABSTAIN",
            null
          ],
          "description": "The verdict of the decision after the binding's own checks: an ALLOW with nothing that can be executed is DENY. Null for an outcome of a decision this service was not asked about, such as a step blocked by the counterfactual replay. gate verify-receipts compares a receipt with the verdict the service answered."
        }
      }
    },
    "verdict_aliases": {
      "description": "Words a service may answer with, and the verdict each is read as.",
      "const": {
        "abstain": "ABSTAIN",
        "abstained": "ABSTAIN",
        "accept": "ALLOW",
        "accepted": "ALLOW",
        "admit": "ALLOW",
        "admitted": "ALLOW",
        "allow": "ALLOW",
        "allowed": "ALLOW",
        "approve": "ALLOW",
        "approved": "ALLOW",
        "ask": "VERIFY",
        "block": "DENY",
        "blocked": "DENY",
        "denied": "DENY",
        "deny": "DENY",
        "escalate": "VERIFY",
        "escalated": "VERIFY",
        "execute": "ALLOW",
        "forbid": "DENY",
        "forbidden": "DENY",
        "human_review": "VERIFY",
        "insufficient_evidence": "ABSTAIN",
        "no_decision": "ABSTAIN",
        "out_of_scope": "ABSTAIN",
        "permit": "ALLOW",
        "permitted": "ALLOW",
        "proceed": "ALLOW",
        "refuse": "DENY",
        "refused": "DENY",
        "reject": "DENY",
        "rejected": "DENY",
        "require_approval": "VERIFY",
        "require_auth": "VERIFY",
        "requires_approval": "VERIFY",
        "review": "VERIFY",
        "skip": "ABSTAIN",
        "skipped": "ABSTAIN",
        "unknown": "ABSTAIN",
        "verify": "VERIFY"
      }
    },
    "context_point": {
      "type": "object",
      "required": [
        "tag",
        "value",
        "unit",
        "quality",
        "time_ms",
        "observed_at",
        "source",
        "reading",
        "signature"
      ],
      "properties": {
        "tag": {
          "type": "string"
        },
        "value": {
          "$ref": "#/$defs/scalar"
        },
        "unit": {
          "type": "string"
        },
        "quality": {
          "type": "string"
        },
        "time_ms": {
          "type": "integer"
        },
        "observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "source": {
          "type": "string",
          "description": "The plant module that owns the point and signed the reading (ADR 0041)."
        },
        "reading": {
          "type": "string",
          "description": "The text that was signed: a JSON object with tag, value, unit, quality and time_ms. Check the signature over the UTF-8 bytes of this text, then that it says what the row says."
        },
        "signature": {
          "type": "object",
          "required": [
            "alg",
            "key_id",
            "value"
          ],
          "properties": {
            "alg": {
              "const": "Ed25519"
            },
            "key_id": {
              "type": "string",
              "description": "sha256: and the SHA-256, in hex, of the raw public key of the source."
            },
            "value": {
              "type": "string",
              "description": "The signature over the bytes of reading, base64."
            }
          }
        }
      },
      "description": "One reading, signed by its source. A reading whose signature does not verify under the key of its source, in sources, did not come from that source."
    },
    "correlation": {
      "type": "object",
      "description": "What ties an evaluate request, its outcome message and a receipt together (ADR 0036). The same correlation_id and action_ref come back in the outcome message.",
      "required": [
        "correlation_id",
        "action_ref",
        "issued_at",
        "time_anchor"
      ],
      "properties": {
        "correlation_id": {
          "type": "string",
          "description": "<session>/<proposal_id>. It names the session of this execution, so it differs between two executions of the same run."
        },
        "action_ref": {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$",
          "description": "SHA-256 of the canonical JSON (keys sorted, no whitespace, UTF-8) of {session, proposal_id, contract_id, arguments, principal, time_ms}. Anyone with the decision record can make it again."
        },
        "issued_at": {
          "type": "string",
          "format": "date-time",
          "description": "premises.time_ms as UTC from time_anchor, to the millisecond. Simulated time, never the wall clock."
        },
        "time_anchor": {
          "type": "string",
          "format": "date-time",
          "description": "The UTC instant simulated time 0 is given as: 2026-01-01T00:00:00Z unless ADC_GATE_EPOCH says another."
        }
      }
    },
    "context": {
      "type": "object",
      "description": "Optional. Sent only to a service started with ADC_GATE_CONTEXT=1: a read-only sample of the plant at the decision, from the simulator's point database, not attested by any sensor (ADR 0036).",
      "required": [
        "schema",
        "read_only",
        "resolution_source",
        "time_ms",
        "observed_at",
        "time_anchor",
        "temperatures",
        "load",
        "interlocks",
        "redundancy",
        "alarms",
        "permits",
        "sources"
      ],
      "properties": {
        "schema": {
          "const": "agentic_datacenter.context/1"
        },
        "read_only": {
          "const": true
        },
        "resolution_source": {
          "const": "simulated_point_database"
        },
        "time_ms": {
          "type": "integer"
        },
        "observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "time_anchor": {
          "type": "string",
          "format": "date-time"
        },
        "temperatures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/context_point"
          }
        },
        "load": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/context_point"
          }
        },
        "interlocks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/context_point"
          }
        },
        "redundancy": {
          "type": "object"
        },
        "alarms": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "permits": {
          "type": "object",
          "description": "Work permits are not modelled as points in this version: {\"modelled\": false, \"items\": []}."
        },
        "sources": {
          "type": "array",
          "description": "The source of every reading in this context, each with its public key. Test keys, derived from the source's name; never credentials (ADR 0041).",
          "items": {
            "type": "object",
            "required": [
              "name",
              "alg",
              "key_id",
              "public_key"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "alg": {
                "const": "Ed25519"
              },
              "key_id": {
                "type": "string"
              },
              "public_key": {
                "type": "string",
                "description": "The raw 32-byte public key, base64."
              }
            }
          }
        }
      }
    }
  }
}
