151 lines
3.9 KiB
JSON
151 lines
3.9 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://thinkloom.app/schemas/provenance/1.0/backup-manifest.schema.json",
|
|
"title": "Project backup manifest",
|
|
"description": "Complete staged-backup inventory including a verified online SQLite snapshot.",
|
|
"type": "object",
|
|
"properties": {
|
|
"schema_version": {
|
|
"const": "1.0"
|
|
},
|
|
"application_version": {
|
|
"type": "string",
|
|
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
},
|
|
"project_id": {
|
|
"type": "string",
|
|
"pattern": "^project_[0-9A-HJKMNP-TV-Z]{26}$"
|
|
},
|
|
"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_chain_head": {
|
|
"type": "string",
|
|
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
},
|
|
"sqlite_snapshot": {
|
|
"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": 1
|
|
},
|
|
"sqlite_version": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"database_schema_version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"completed_at": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"sha256",
|
|
"size",
|
|
"sqlite_version",
|
|
"database_schema_version",
|
|
"completed_at"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"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
|
|
},
|
|
"protected": {
|
|
"type": "boolean"
|
|
},
|
|
"recovery_key_envelope_path": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001f]+$"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"schema_version",
|
|
"application_version",
|
|
"project_id",
|
|
"created_at",
|
|
"source_chain_head",
|
|
"sqlite_snapshot",
|
|
"files",
|
|
"protected",
|
|
"recovery_key_envelope_path"
|
|
],
|
|
"additionalProperties": false,
|
|
"examples": [
|
|
{
|
|
"schema_version": "1.0",
|
|
"application_version": "0.3.0",
|
|
"project_id": "project_01J00000000000000000000001",
|
|
"created_at": "2026-07-17T18:42:10.123Z",
|
|
"source_chain_head": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
|
|
"sqlite_snapshot": {
|
|
"path": "database-snapshot/state.sqlite",
|
|
"sha256": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
"size": 4096,
|
|
"sqlite_version": "3.46.0",
|
|
"database_schema_version": 1,
|
|
"completed_at": "2026-07-17T18:42:10.123Z"
|
|
},
|
|
"files": [
|
|
{
|
|
"path": "project.json",
|
|
"sha256": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
|
|
"size": 256
|
|
}
|
|
],
|
|
"protected": false,
|
|
"recovery_key_envelope_path": null
|
|
}
|
|
]
|
|
}
|