101 lines
2.5 KiB
JSON
101 lines
2.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://thinkloom.app/schemas/provenance/1.0/content-reference.schema.json",
|
|
"title": "Content reference",
|
|
"description": "Content-addressed link to an authoritative record or revision.",
|
|
"type": "object",
|
|
"properties": {
|
|
"schema_version": {
|
|
"const": "1.0"
|
|
},
|
|
"record_id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*_[0-9A-HJKMNP-TV-Z]{26}$"
|
|
},
|
|
"record_type": {
|
|
"enum": [
|
|
"conversation_turn",
|
|
"invocation_request",
|
|
"invocation_response",
|
|
"invocation_failure",
|
|
"idea_revision",
|
|
"manuscript_revision",
|
|
"edit_transaction",
|
|
"prompt_template",
|
|
"model_configuration",
|
|
"provenance_assertion",
|
|
"assertion_evaluation",
|
|
"release_file",
|
|
"source",
|
|
"other"
|
|
]
|
|
},
|
|
"sha256": {
|
|
"type": "string",
|
|
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
},
|
|
"path": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))[^\\u0000-\\u001f]+$"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"revision_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string",
|
|
"pattern": "^revision_[0-9A-HJKMNP-TV-Z]{26}$"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"range": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "https://thinkloom.app/schemas/provenance/1.0/text-fragment-reference.schema.json"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"schema_version",
|
|
"record_id",
|
|
"record_type",
|
|
"sha256",
|
|
"path",
|
|
"revision_id",
|
|
"range"
|
|
],
|
|
"additionalProperties": false,
|
|
"examples": [
|
|
{
|
|
"schema_version": "1.0",
|
|
"record_id": "record_01J00000000000000000000005",
|
|
"record_type": "manuscript_revision",
|
|
"sha256": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
|
|
"path": "manuscript/revisions/revision.json",
|
|
"revision_id": "revision_01J0000000000000000000000A",
|
|
"range": {
|
|
"schema_version": "1.0",
|
|
"document_revision_id": "revision_01J0000000000000000000000A",
|
|
"coordinate_system": "utf8_byte",
|
|
"start": 0,
|
|
"end": 12,
|
|
"preimage_sha256": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
|
|
"text_fragment_id": "fragment_01J0000000000000000000000C"
|
|
}
|
|
}
|
|
]
|
|
}
|