{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://wai.transaction.science/schema/wai.lock/1", "title": "wai.lock, a WAI project's lock file, version 1", "description": "Everything whose bytes change a project's results, pinned by digest. `wai lock` writes it and `wai lock --check`, `wai check` and `wai build` read it. The file is RFC 8785 over this object, on one line, with no line ending: a reader refuses any other bytes as edited by hand, which this schema, reading values, does not see. A member with nothing to pin is absent, never null. A member not listed here is refused.", "type": "object", "additionalProperties": false, "required": [ "$schema", "wai", "toolchain", "registry" ], "properties": { "$schema": { "description": "This schema.", "const": "https://wai.transaction.science/schema/wai.lock/1" }, "wai": { "description": "The lock's version. A reader of version 1 refuses a later one.", "const": 1 }, "toolchain": { "description": "The wai that wrote it: its version, and the SHA-256 of its catalogue (`wai ops export`, wai/catalogue/ops.json).", "type": "object", "additionalProperties": false, "required": [ "version", "catalogue" ], "properties": { "version": { "type": "string", "minLength": 1 }, "catalogue": { "type": "object", "additionalProperties": false, "required": [ "sha256" ], "properties": { "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } } } }, "template": { "description": "The template the project came from: its name as wai.json states it, and the SHA-256 of its listing as that wai holds it (one line a file, sorted by path as bytes: the file's SHA-256, two spaces, its path, a line feed). A template that wai does not hold has no digest.", "type": "object", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { "type": "string", "minLength": 1 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }, "registry": { "description": "The SHA-256 of the capability registry (`wai registry export`, wai/registry/capabilities.json).", "type": "object", "additionalProperties": false, "required": [ "sha256" ], "properties": { "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }, "priors": { "description": "Each parameter set the project names, by the name wai.json gives it: its pin as SPEC 3.1 states it. A directory is a wai.prior.set, its digest that of its listing; one file has no form, its digest that of the file.", "type": "object", "minProperties": 1, "additionalProperties": { "type": "object", "additionalProperties": false, "required": [ "sha256" ], "properties": { "form": { "type": "string", "minLength": 1 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } } }, "policy": { "description": "The packaging policy: its version, and its canonical digest as `wai-pack policy` prints it (packaging 3).", "type": "object", "additionalProperties": false, "required": [ "schema", "blake3" ], "properties": { "schema": { "type": "string", "minLength": 1 }, "blake3": { "type": "string", "pattern": "^[0-9a-f]{64}$" } } }, "conformance": { "description": "Each corpus the project conforms against, by the suite wai.json names (/): its digest as conformance-results 2.1 states it, the one a conformance result names.", "type": "object", "minProperties": 1, "additionalProperties": { "type": "object", "additionalProperties": false, "required": [ "digest" ], "properties": { "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } } } } } }