32 lines
1.5 KiB
JSON
32 lines
1.5 KiB
JSON
{
|
|
"title": "Mechanically checked literal evidence",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"operation": {"type": "string", "enum": ["locate", "references", "extract", "summarize_supplied"]},
|
|
"input_sha256": {"type": ["string", "null"], "pattern": "^[0-9a-f]{64}$"},
|
|
"evidence": {
|
|
"type": "array",
|
|
"maxItems": 200,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"path": {"type": "string", "minLength": 1},
|
|
"sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"start_line": {"type": "integer", "minimum": 1},
|
|
"end_line": {"type": "integer", "minimum": 1},
|
|
"excerpt": {"type": "string"}
|
|
},
|
|
"required": ["path", "sha256", "start_line", "end_line", "excerpt"]
|
|
}
|
|
},
|
|
"summary_points": {"type": "array", "items": {"type": "string"}, "maxItems": 50}
|
|
},
|
|
"required": ["operation", "input_sha256", "evidence", "summary_points"],
|
|
"allOf": [
|
|
{"if": {"properties": {"operation": {"enum": ["locate", "references", "extract"]}}, "required": ["operation"]}, "then": {"properties": {"input_sha256": {"const": null}, "evidence": {"minItems": 1}, "summary_points": {"maxItems": 0}}}},
|
|
{"if": {"properties": {"operation": {"const": "summarize_supplied"}}, "required": ["operation"]}, "then": {"properties": {"input_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, "evidence": {"maxItems": 0}, "summary_points": {"minItems": 1}}}}
|
|
]
|
|
}
|