Add provenance schema contract for v0.3.0
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://thinkloom.app/schemas/provenance/1.0/release-manifest.schema.json",
|
||||
"title": "Release manifest",
|
||||
"description": "Non-self-referential binding of a frozen source to verified release files.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": "1.0"
|
||||
},
|
||||
"application_version": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
||||
},
|
||||
"release_id": {
|
||||
"type": "string",
|
||||
"pattern": "^release_[0-9A-HJKMNP-TV-Z]{26}$"
|
||||
},
|
||||
"project_id": {
|
||||
"type": "string",
|
||||
"pattern": "^project_[0-9A-HJKMNP-TV-Z]{26}$"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
||||
},
|
||||
"source_commit": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{40,64}$"
|
||||
},
|
||||
"source_chain_head": {
|
||||
"type": "string",
|
||||
"pattern": "^sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"source_manuscript": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001f]+$"
|
||||
},
|
||||
"sha256": {
|
||||
"type": "string",
|
||||
"pattern": "^sha256:[a-f0-9]{64}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path",
|
||||
"sha256"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"sanitized": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"files": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001f]+$"
|
||||
},
|
||||
"sha256": {
|
||||
"type": "string",
|
||||
"pattern": "^sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"size": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"path",
|
||||
"sha256",
|
||||
"size"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
"release_files_merkle_root": {
|
||||
"type": "string",
|
||||
"pattern": "^sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"merkle_algorithm": {
|
||||
"const": "thinkloom-release-merkle-v1"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schema_version",
|
||||
"application_version",
|
||||
"release_id",
|
||||
"project_id",
|
||||
"version",
|
||||
"created_at",
|
||||
"source_commit",
|
||||
"source_chain_head",
|
||||
"source_manuscript",
|
||||
"sanitized",
|
||||
"files",
|
||||
"release_files_merkle_root",
|
||||
"merkle_algorithm"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"examples": [
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"application_version": "0.3.0",
|
||||
"release_id": "release_01J0000000000000000000000E",
|
||||
"project_id": "project_01J00000000000000000000001",
|
||||
"version": "1.0.0",
|
||||
"created_at": "2026-07-17T18:43:11.456Z",
|
||||
"source_commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"source_chain_head": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
|
||||
"source_manuscript": {
|
||||
"path": "manuscript/final-manuscript.md",
|
||||
"sha256": "sha256:4444444444444444444444444444444444444444444444444444444444444444"
|
||||
},
|
||||
"sanitized": false,
|
||||
"files": [
|
||||
{
|
||||
"path": "manuscript/final-manuscript.md",
|
||||
"sha256": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
|
||||
"size": 1024
|
||||
},
|
||||
{
|
||||
"path": "evidence/creative-process-report.md",
|
||||
"sha256": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
|
||||
"size": 512
|
||||
}
|
||||
],
|
||||
"release_files_merkle_root": "sha256:b773ac929d720839a617ec0f9d6e39ad5401fa7795e21f799302658de8db9cda",
|
||||
"merkle_algorithm": "thinkloom-release-merkle-v1"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user