First implementation (#1)
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
1 parent
34c0abb26a
commit
4fa326dc76
534 files changed
+28280
-37
No files matched your search
@@ -0,0 +1,617 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://paperspec.scient.ing/schemas/common.schema.json",
|
||||
"title": "Shared definitions",
|
||||
"description": "Definitions every scienting schema shares; spec/01-conventions.md.",
|
||||
"$defs": {
|
||||
"hash": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{64}$",
|
||||
"description": "SHA-256 or HMAC-SHA-256, 64 lowercase hex digits."
|
||||
},
|
||||
"hash6": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{6}$"
|
||||
},
|
||||
"nodeId": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6}$",
|
||||
"description": "Seven lowercase Crockford base32 characters, the first a letter."
|
||||
},
|
||||
"recordId": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
|
||||
},
|
||||
"key": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9][a-z0-9._-]*$",
|
||||
"maxLength": 128,
|
||||
"description": "A store, project or source key, or a legacy document key kept as an alias."
|
||||
},
|
||||
"workKey": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9]*-[0-9a-hjkmnp-tv-z]{4,51}$",
|
||||
"maxLength": 128,
|
||||
"description": "A Scholar-style part, a hyphen and the hash of the work's identity (spec/02 §2.4)."
|
||||
},
|
||||
"documentKey": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9]*-[0-9a-hjkmnp-tv-z]{4,51}(\\.[a-z0-9][a-z0-9-]*)*$",
|
||||
"maxLength": 128,
|
||||
"description": "A work key, with a dotted suffix for anything other than the version of record."
|
||||
},
|
||||
"alias": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9][a-z0-9._-]*[._-][a-z0-9._-]*$",
|
||||
"maxLength": 128,
|
||||
"description": "A legacy ID; it always contains a separator, so it never looks like a node ID."
|
||||
},
|
||||
"nodeRef": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/nodeId"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/alias"
|
||||
}
|
||||
]
|
||||
},
|
||||
"qualifiedKey": {
|
||||
"type": "string",
|
||||
"pattern": "^([a-z0-9][a-z0-9._-]*/)?[a-z][a-z0-9]*-[0-9a-hjkmnp-tv-z]{4,51}(\\.[a-z0-9][a-z0-9-]*)*$",
|
||||
"maxLength": 257,
|
||||
"description": "A document key, optionally qualified by its store."
|
||||
},
|
||||
"datasetId": {
|
||||
"type": "string",
|
||||
"pattern": "^ds-[a-z0-9][a-z0-9._-]*$",
|
||||
"maxLength": 128
|
||||
},
|
||||
"address": {
|
||||
"type": "string",
|
||||
"pattern": "^([a-z0-9][a-z0-9._-]*/)?[a-z][a-z0-9]*-[0-9a-hjkmnp-tv-z]{4,51}(\\.[a-z0-9][a-z0-9-]*)*#[a-z0-9][a-z0-9._-]*(@[0-9a-f]{6})?(\\[(0|[1-9][0-9]*):(0|[1-9][0-9]*)\\])?$"
|
||||
},
|
||||
"time": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-6][0-9]Z$"
|
||||
},
|
||||
"date": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]{4}(-[0-1][0-9](-[0-3][0-9])?)?$"
|
||||
},
|
||||
"decimal": {
|
||||
"type": "string",
|
||||
"pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$",
|
||||
"description": "A decimal that carries meaning, as a string."
|
||||
},
|
||||
"level": {
|
||||
"enum": [
|
||||
"F0",
|
||||
"F1",
|
||||
"F2",
|
||||
"F3"
|
||||
]
|
||||
},
|
||||
"receiptLevel": {
|
||||
"enum": [
|
||||
"F1",
|
||||
"F2",
|
||||
"F3"
|
||||
]
|
||||
},
|
||||
"nodeKind": {
|
||||
"enum": [
|
||||
"document",
|
||||
"front",
|
||||
"title",
|
||||
"authors",
|
||||
"abstract",
|
||||
"keywords",
|
||||
"notes",
|
||||
"section",
|
||||
"heading",
|
||||
"paragraph",
|
||||
"sentence",
|
||||
"equation",
|
||||
"equation-line",
|
||||
"figure",
|
||||
"panel",
|
||||
"caption",
|
||||
"figure-note",
|
||||
"table",
|
||||
"table-head",
|
||||
"table-body",
|
||||
"table-note",
|
||||
"row",
|
||||
"cell",
|
||||
"list",
|
||||
"item",
|
||||
"quote",
|
||||
"code",
|
||||
"algorithm",
|
||||
"theorem",
|
||||
"footnote",
|
||||
"back",
|
||||
"acknowledgments",
|
||||
"references",
|
||||
"reference",
|
||||
"appendix"
|
||||
]
|
||||
},
|
||||
"box": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"minItems": 4,
|
||||
"maxItems": 4,
|
||||
"description": "[x0, y0, x1, y1] in PDF points, origin top left after rotation."
|
||||
},
|
||||
"size": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"exclusiveMinimum": 0
|
||||
},
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9+.-]*:[^ ]+$"
|
||||
},
|
||||
"language": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$"
|
||||
},
|
||||
"spdx": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9.+-]+( (AND|OR|WITH) [A-Za-z0-9.+-]+)*$"
|
||||
},
|
||||
"license": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"spdx": {
|
||||
"$ref": "#/$defs/spdx"
|
||||
},
|
||||
"text": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"url": {
|
||||
"$ref": "#/$defs/url"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"minProperties": 1
|
||||
},
|
||||
"tri": {
|
||||
"enum": [
|
||||
true,
|
||||
false,
|
||||
"unknown"
|
||||
]
|
||||
},
|
||||
"base64": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9+/]+={0,2}$"
|
||||
},
|
||||
"processor": {
|
||||
"enum": [
|
||||
"local",
|
||||
"tenancy",
|
||||
"outside-no-retention",
|
||||
"outside"
|
||||
]
|
||||
},
|
||||
"basis": {
|
||||
"enum": [
|
||||
"open-license",
|
||||
"publisher-tdm",
|
||||
"collective-license",
|
||||
"subscription",
|
||||
"own-work",
|
||||
"permission",
|
||||
"unknown"
|
||||
]
|
||||
},
|
||||
"signature": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"enum": [
|
||||
"ed25519",
|
||||
"ssh",
|
||||
"gpg",
|
||||
"sigstore",
|
||||
"cose",
|
||||
"ml-dsa-65"
|
||||
]
|
||||
},
|
||||
"key": {
|
||||
"$ref": "#/$defs/key"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scheme",
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"evidence": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"crop",
|
||||
"witness",
|
||||
"source-file",
|
||||
"person"
|
||||
]
|
||||
},
|
||||
"sha256": {
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
"node": {
|
||||
"$ref": "#/$defs/nodeId"
|
||||
},
|
||||
"page_fp": {
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
"box": {
|
||||
"$ref": "#/$defs/box"
|
||||
},
|
||||
"by": {
|
||||
"$ref": "#/$defs/key"
|
||||
},
|
||||
"note": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "person"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"by"
|
||||
]
|
||||
},
|
||||
"else": {
|
||||
"required": [
|
||||
"sha256"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"$ref": "#/$defs/key"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
"$ref": "#/$defs/model"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"model",
|
||||
"run"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"hashAlgorithm": {
|
||||
"enum": [
|
||||
"sha-256"
|
||||
],
|
||||
"description": "The hash function every value of a package uses; the only value so far (spec/01 §1.3)."
|
||||
},
|
||||
"hashing": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"const": "plain"
|
||||
},
|
||||
"algorithm": {
|
||||
"$ref": "#/$defs/hashAlgorithm"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scheme"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"const": "hmac-team"
|
||||
},
|
||||
"algorithm": {
|
||||
"$ref": "#/$defs/hashAlgorithm"
|
||||
},
|
||||
"key_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{16}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scheme",
|
||||
"key_id"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"const": "hkdf-pages"
|
||||
},
|
||||
"algorithm": {
|
||||
"$ref": "#/$defs/hashAlgorithm"
|
||||
},
|
||||
"context": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"pages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
"minItems": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scheme",
|
||||
"context",
|
||||
"pages"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"model": {
|
||||
"type": "object",
|
||||
"description": "A model that proposed something: enough to name the weights and the instructions it ran with (spec/11 §11.2).",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"provider": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"weights": {
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
"prompt": {
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
"parameters": {
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
"processor": {
|
||||
"$ref": "#/$defs/processor"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"quote": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"exact": {
|
||||
"type": "string",
|
||||
"maxLength": 200
|
||||
},
|
||||
"exact_hash": {
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
"length": {
|
||||
"type": "integer",
|
||||
"minimum": 201
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 32
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 32
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
"additionalProperties": false,
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"exact"
|
||||
],
|
||||
"not": {
|
||||
"anyOf": [
|
||||
{
|
||||
"required": [
|
||||
"exact_hash"
|
||||
]
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"length"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"exact_hash",
|
||||
"length"
|
||||
],
|
||||
"not": {
|
||||
"required": [
|
||||
"exact"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"keyedQuote": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mac": {
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
"length": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"prefix_mac": {
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
"suffix_mac": {
|
||||
"$ref": "#/$defs/hash"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mac",
|
||||
"length"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"cellContext": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"table_label": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"row_path": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"column_path": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"table_label",
|
||||
"row_path",
|
||||
"column_path"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"keyedContext": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"table_label_mac": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/$defs/hash"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"row_path_mac": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/hash"
|
||||
}
|
||||
},
|
||||
"column_path_mac": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/hash"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"table_label_mac",
|
||||
"row_path_mac",
|
||||
"column_path_mac"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"agent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^tag:scient\\.ing,2026:(key|person|software):[^ ]+$"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"Person",
|
||||
"Software"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"type"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user