89 lines
2.4 KiB
JSON
89 lines
2.4 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://docforge.local/schema/projection-receipt-v1.json",
|
|
"title": "DocForge projection renderer receipt",
|
|
"$comment": "receipt_id is the SHA-256 of canonical JSON without receipt_id and is verified by the runtime contract validator.",
|
|
"$defs": {
|
|
"sha256": {
|
|
"type": "string",
|
|
"pattern": "^[0-9a-f]{64}$"
|
|
},
|
|
"renderer": {
|
|
"type": "object",
|
|
"required": ["renderer_id", "renderer_version"],
|
|
"properties": {
|
|
"renderer_id": { "type": "string", "minLength": 1 },
|
|
"renderer_version": { "type": "string", "minLength": 1 }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"artifact": {
|
|
"type": "object",
|
|
"required": ["artifact_id", "media_type", "sha256", "bytes"],
|
|
"properties": {
|
|
"artifact_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "^[^/]+$"
|
|
},
|
|
"media_type": { "type": "string", "minLength": 1 },
|
|
"sha256": { "$ref": "#/$defs/sha256" },
|
|
"bytes": { "type": "integer", "minimum": 0 }
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"schema_version",
|
|
"contract",
|
|
"receipt_id",
|
|
"kind",
|
|
"package_id",
|
|
"plan_id",
|
|
"renderer",
|
|
"artifacts",
|
|
"diagnostics",
|
|
"timing",
|
|
"peak_memory_bytes"
|
|
],
|
|
"properties": {
|
|
"schema_version": { "const": 1 },
|
|
"contract": { "const": "docforge.projection-receipt" },
|
|
"receipt_id": { "$ref": "#/$defs/sha256" },
|
|
"kind": { "enum": ["manual", "graph"] },
|
|
"package_id": { "$ref": "#/$defs/sha256" },
|
|
"plan_id": { "$ref": "#/$defs/sha256" },
|
|
"renderer": { "$ref": "#/$defs/renderer" },
|
|
"artifacts": {
|
|
"type": "array",
|
|
"maxItems": 32,
|
|
"items": { "$ref": "#/$defs/artifact" }
|
|
},
|
|
"diagnostics": {
|
|
"type": "object",
|
|
"required": ["warnings"],
|
|
"properties": {
|
|
"warnings": {
|
|
"type": "array",
|
|
"maxItems": 10000,
|
|
"items": { "type": "string" }
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"timing": {
|
|
"type": "object",
|
|
"required": ["elapsed_ns"],
|
|
"properties": {
|
|
"elapsed_ns": { "type": "integer", "minimum": 0 }
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"peak_memory_bytes": {
|
|
"type": ["integer", "null"],
|
|
"minimum": 0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|