{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://law.arxo.io/schema/external-snapshot.schema.json",
  "title": "Arxo external snapshot 0.1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "id", "capability", "calls", "contentHash"],
  "properties": {
    "schemaVersion": {"const": "law.core.external-snapshot/0.1"},
    "id": {"type": "string", "minLength": 1},
    "capability": {"type": "string", "minLength": 1},
    "snapshotBinding": {"type": "string"},
    "contextValue": {},
    "programHash": {"type": "string"},
    "contentHash": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
    "calls": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["symbol", "args", "result"],
        "properties": {
          "symbol": {"type": "string"},
          "args": {"type": "array"},
          "result": {}
        }
      }
    }
  }
}
