Validate a contract

Run these commands in a clone of abbaseya/agent-acceptance-contract, at tag v0.1.0:

git clone --branch v0.1.0 https://github.com/abbaseya/agent-acceptance-contract.git
cd agent-acceptance-contract
yarn install
yarn test                                   # the validator's own tests
yarn validate                               # every example in examples/
node scripts/validate-examples.js my.json   # one contract
node scripts/validate-examples.js --chain rounds/   # contract revisions and the AGC rounds judged against them

The validator checks the JSON Schema and the rules a schema cannot express. Those rules are marked [V] in the spec:

validateContract(contract) returns errors and warnings. validateAgainst(contract, agcResponse) classifies each finding as against a criterion or an extension and enforces the probe rule. validateChain(contracts, responses) checks revisions, fingerprints and the extension budget. The AGC response itself is validated by AGC’s validator; this one reads only the fields AAC links to.