{
  "schema": "agentic_datacenter.action-authorization-vectors/1",
  "rule": "docs/reference/action-authorizations.md",
  "signers": [
    {
      "name": "shift-lead",
      "alg": "Ed25519",
      "key_id": "sha256:4bb648c4c642383615e368df963873a709fde877bc18b125124337cc83737717",
      "public_key": "UjCl3dNhdTI4pNNmZW5k52Q6XC0R+bCFEQfF+sFQEeA="
    },
    {
      "name": "duty-engineer",
      "alg": "Ed25519",
      "key_id": "sha256:2e56a7618134fdc2a8470c73f2a6662dd3c6a19faee5bb40249f939b83965937",
      "public_key": "jPAu+shNP5vjy+5cX0FGDmlTAnPedQS5YQeeOgW56ls="
    }
  ],
  "authorizations": [
    {
      "schema": "agentic_datacenter.action_authorization/1",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.0
      },
      "signer": "shift-lead",
      "issued_at_ms": 1000,
      "expires_at_ms": 10000,
      "reason": "WO-601",
      "id": "sha256:baeefcae4bf7dabb3cc647520ddacc01de99c6faaf33c87e951af8a666caf3da",
      "signature": {
        "alg": "Ed25519",
        "key_id": "sha256:4bb648c4c642383615e368df963873a709fde877bc18b125124337cc83737717",
        "value": "OxFdrCbRaSR3YGM7q5YxwTT4P3iYjVpB/D3UCEvyTvrpmSDpUNv6Fi/DNHgl23vSg5PwgrwOw8ZzhFn8d9UbDA=="
      }
    },
    {
      "schema": "agentic_datacenter.action_authorization/1",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "14",
        "setpoint_c": 21.0
      },
      "signer": "contractor-7",
      "issued_at_ms": 1000,
      "expires_at_ms": 10000,
      "reason": "WO-603",
      "id": "sha256:dee197cdfe3daefce0caef5a92dafa563a004c170a7318a45f9a14a090d15c0e",
      "signature": {
        "alg": "Ed25519",
        "key_id": "sha256:8340f7b1d8b326801a1ce3ebd53b62bbe1e3adfd6810e9a2328f9047abb82818",
        "value": "JTorSa+Oy51AoRjfnxlQp9ztNa9VWj+Dl9WZz2d9ah8K5bTPpyR0ecW7j6+SKLhPSuo7nlcYB0PMwZ4gSTwyBQ=="
      }
    },
    {
      "schema": "agentic_datacenter.action_authorization/1",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "13",
        "setpoint_c": 22.0
      },
      "signer": "shift-lead",
      "issued_at_ms": 1000,
      "expires_at_ms": 10000,
      "reason": "WO-604",
      "id": "sha256:ddae243d4f1575ed260e922f7d70611bc7ee4ffd1b758a6ea66b353c5e597e45",
      "signature": {
        "alg": "Ed25519",
        "key_id": "sha256:4bb648c4c642383615e368df963873a709fde877bc18b125124337cc83737717",
        "value": "PivFaWn/m9chyNIjd7OpeGOXEsS9UQMwumumaW+vkNa178eE8zd1bgo2Y9O7xOIj2KfbMFdDKqaEWdOdrP0FAA=="
      }
    },
    {
      "schema": "agentic_datacenter.action_authorization/1",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "12",
        "setpoint_c": 21.0
      },
      "signer": "shift-lead",
      "issued_at_ms": 1000,
      "expires_at_ms": 10000,
      "reason": "WO-606",
      "id": "sha256:4ed835303044c72e835fc6ee9052ab047deab43888a5c299a8b8f58b36705208",
      "signature": {
        "alg": "Ed25519",
        "key_id": "sha256:4bb648c4c642383615e368df963873a709fde877bc18b125124337cc83737717",
        "value": "34btsVmsBUGqZIVuspnVAr4YMNG/8rT78+n9j2rUSTeR4vCzRpNIKlOx7BdbGBkRFxxNKXZtHSF08WIyzbRTBw=="
      }
    },
    {
      "schema": "agentic_datacenter.action_authorization/1",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "16",
        "setpoint_c": 21.0
      },
      "signer": "duty-engineer",
      "issued_at_ms": 5000,
      "expires_at_ms": 6000,
      "reason": "WO-602",
      "id": "sha256:e26500983a1abcc3bd9aa22c1651342f873cee023288e77e6122ed6834bac95c",
      "signature": {
        "alg": "Ed25519",
        "key_id": "sha256:2e56a7618134fdc2a8470c73f2a6662dd3c6a19faee5bb40249f939b83965937",
        "value": "b4mYguApjZ9zg8ua+QJe53gC448vhQkCW6gB7JZtD6efYCUSh6UWl/V3PXgAv+7R2LZon72VmFTrlXu1YuYdDw=="
      }
    }
  ],
  "queries": [
    {
      "title": "signed for, in time, not used",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.0
      },
      "now_ms": 2000,
      "used": [],
      "expected": {
        "holds": "sha256:baeefcae4bf7dabb3cc647520ddacc01de99c6faaf33c87e951af8a666caf3da",
        "why": ""
      }
    },
    {
      "title": "the same step, once its authorization was used",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.0
      },
      "now_ms": 2000,
      "used": [
        "sha256:baeefcae4bf7dabb3cc647520ddacc01de99c6faaf33c87e951af8a666caf3da"
      ],
      "expected": {
        "holds": null,
        "why": "used"
      }
    },
    {
      "title": "other values than were signed for",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.5
      },
      "now_ms": 2000,
      "used": [],
      "expected": {
        "holds": null,
        "why": "other_action"
      }
    },
    {
      "title": "an argument more than was signed for",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.0,
        "fan": "A"
      },
      "now_ms": 2000,
      "used": [],
      "expected": {
        "holds": null,
        "why": "other_action"
      }
    },
    {
      "title": "before it was issued",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.0
      },
      "now_ms": 500,
      "used": [],
      "expected": {
        "holds": null,
        "why": "not_yet"
      }
    },
    {
      "title": "at the instant it expires",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.0
      },
      "now_ms": 10000,
      "used": [],
      "expected": {
        "holds": null,
        "why": "expired"
      }
    },
    {
      "title": "another agent asks for the same step",
      "principal": "agent-2",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.0
      },
      "now_ms": 2000,
      "used": [],
      "expected": {
        "holds": null,
        "why": "other_action"
      }
    },
    {
      "title": "signed by someone the site does not list",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "14",
        "setpoint_c": 21.0
      },
      "now_ms": 2000,
      "used": [],
      "expected": {
        "holds": null,
        "why": "no_standing"
      }
    },
    {
      "title": "changed after it was signed, asked for as it now reads",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "13",
        "setpoint_c": 22.0
      },
      "now_ms": 2000,
      "used": [],
      "expected": {
        "holds": null,
        "why": "not_signed"
      }
    },
    {
      "title": "signed in the signer's name with another key",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "12",
        "setpoint_c": 21.0
      },
      "now_ms": 2000,
      "used": [],
      "expected": {
        "holds": null,
        "why": "not_signed"
      }
    },
    {
      "title": "a second signer the site lists, in time",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "16",
        "setpoint_c": 21.0
      },
      "now_ms": 5500,
      "used": [],
      "expected": {
        "holds": "sha256:e26500983a1abcc3bd9aa22c1651342f873cee023288e77e6122ed6834bac95c",
        "why": ""
      }
    },
    {
      "title": "the same, one millisecond before it expires",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "16",
        "setpoint_c": 21.0
      },
      "now_ms": 5999,
      "used": [],
      "expected": {
        "holds": "sha256:e26500983a1abcc3bd9aa22c1651342f873cee023288e77e6122ed6834bac95c",
        "why": ""
      }
    },
    {
      "title": "nothing presented",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.0
      },
      "now_ms": 2000,
      "used": [],
      "presented": [],
      "expected": {
        "holds": null,
        "why": "none_presented"
      }
    },
    {
      "title": "only authorizations of other steps presented",
      "principal": "agent-1",
      "contract_id": "pod.set_supply_air_setpoint.v1",
      "arguments": {
        "pod": "15",
        "setpoint_c": 21.0
      },
      "now_ms": 2000,
      "used": [],
      "presented": [
        "sha256:dee197cdfe3daefce0caef5a92dafa563a004c170a7318a45f9a14a090d15c0e",
        "sha256:e26500983a1abcc3bd9aa22c1651342f873cee023288e77e6122ed6834bac95c"
      ],
      "expected": {
        "holds": null,
        "why": "other_action"
      }
    }
  ]
}
