Initial commit
check / check (macos-latest) (push) Canceled after 0s
check / check (ubuntu-latest) (push) Canceled after 0s

This commit is contained in:
alexm committed 2026-10-11 23:45:29 -04:00
commit 62f54ed869
373 files changed
+16704

No files matched your search

+115
View File
@@ -0,0 +1,115 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/anchor.schema.json",
"title": "Anchor",
"description": "scienting-anchor/1: a pinned address with context; spec/06-anchors.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-anchor/1"
},
"store": {
"$ref": "common.schema.json#/$defs/key"
},
"doc": {
"$ref": "common.schema.json#/$defs/key"
},
"node": {
"$ref": "common.schema.json#/$defs/nodeRef"
},
"kind": {
"$ref": "common.schema.json#/$defs/nodeKind"
},
"own_hash": {
"$ref": "common.schema.json#/$defs/hash"
},
"node_hash": {
"$ref": "common.schema.json#/$defs/hash"
},
"span": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"minItems": 2,
"maxItems": 2
},
"quote": {},
"context": {},
"leaves": {
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"$ref": "common.schema.json#/$defs/hash"
}
],
"minItems": 2,
"maxItems": 2
},
"minItems": 1
},
"rev": {
"type": "integer",
"minimum": 0
},
"keyed": {
"$ref": "common.schema.json#/$defs/hashing"
}
},
"required": [
"format",
"doc",
"node",
"own_hash",
"node_hash",
"rev"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"required": [
"keyed"
]
},
"then": {
"properties": {
"quote": {
"$ref": "common.schema.json#/$defs/keyedQuote"
},
"context": {
"$ref": "common.schema.json#/$defs/keyedContext"
}
}
},
"else": {
"properties": {
"quote": {
"$ref": "common.schema.json#/$defs/quote"
},
"context": {
"$ref": "common.schema.json#/$defs/cellContext"
}
}
}
},
{
"if": {
"required": [
"span"
]
},
"then": {
"required": [
"quote"
]
}
}
]
}
+707
View File
@@ -0,0 +1,707 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/annotation.schema.json",
"title": "Annotation",
"description": "One line of annotations.jsonl in scienting-layer/1: a W3C Web Annotation; spec/18-layers.md.",
"type": "object",
"properties": {
"@context": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 2
},
"id": {
"type": "string",
"pattern": "^urn:scienting:annotation:[a-z0-9][a-z0-9._-]*/[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
},
"type": {
"const": "Annotation"
},
"layer": {
"type": "string",
"pattern": "^urn:scienting:layer:[a-z0-9][a-z0-9._-]*/[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
},
"motivation": {
"enum": [
"commenting",
"describing",
"linking",
"questioning",
"assessing",
"tagging",
"classifying",
"identifying",
"editing",
"highlighting",
"bookmarking",
"replying",
"moderating"
]
},
"creator": {
"$ref": "common.schema.json#/$defs/agent"
},
"created": {
"$ref": "common.schema.json#/$defs/time"
},
"modified": {
"$ref": "common.schema.json#/$defs/time"
},
"body": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "TextualBody"
},
"value": {
"type": "string",
"minLength": 1
},
"format": {
"enum": [
"text/plain",
"text/markdown"
]
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"kind": {
"const": "gloss"
},
"audience": {
"enum": [
"novice",
"student",
"expert"
]
}
},
"required": [
"type",
"kind",
"value",
"audience"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "SpecificResource"
},
"source": {
"type": "string",
"minLength": 1
},
"kind": {
"const": "claim-link"
},
"pin": {
"type": "string",
"minLength": 1
},
"role": {
"enum": [
"states",
"uses",
"disputes"
]
}
},
"required": [
"type",
"kind",
"source",
"role"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "SpecificResource"
},
"source": {
"type": "string",
"minLength": 1
},
"kind": {
"const": "symbol"
},
"pin": {
"type": "string",
"minLength": 1
},
"symbol": {
"type": "string",
"minLength": 1
}
},
"required": [
"type",
"kind",
"source"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "TextualBody"
},
"value": {
"type": "string",
"minLength": 1
},
"format": {
"enum": [
"text/plain",
"text/markdown"
]
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"kind": {
"const": "comment"
}
},
"required": [
"type",
"kind",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "TextualBody"
},
"value": {
"type": "string",
"minLength": 1
},
"format": {
"enum": [
"text/plain",
"text/markdown"
]
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"kind": {
"const": "caveat"
}
},
"required": [
"type",
"kind",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "TextualBody"
},
"value": {
"type": "string",
"minLength": 1
},
"format": {
"enum": [
"text/plain",
"text/markdown"
]
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"kind": {
"const": "question"
},
"for": {
"enum": [
"reader",
"group",
"authors"
]
}
},
"required": [
"type",
"kind",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "TextualBody"
},
"value": {
"type": "string",
"minLength": 1
},
"format": {
"enum": [
"text/plain",
"text/markdown"
]
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"kind": {
"const": "exercise"
},
"exercise": {
"$ref": "exercise.schema.json"
}
},
"required": [
"type",
"kind",
"value",
"exercise"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "TextualBody"
},
"value": {
"type": "string",
"minLength": 1
},
"format": {
"enum": [
"text/plain",
"text/markdown"
]
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"kind": {
"const": "citation-context"
},
"reference": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"verdict": {
"enum": [
"supports",
"partly",
"does-not",
"cannot-tell"
]
},
"reason": {
"enum": [
"method",
"value",
"background",
"contrast",
"other"
]
}
},
"required": [
"type",
"kind",
"value",
"reference"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "SpecificResource"
},
"source": {
"type": "string",
"minLength": 1
},
"kind": {
"const": "prerequisite"
}
},
"required": [
"type",
"kind",
"source"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "SpecificResource"
},
"source": {
"type": "string",
"minLength": 1
},
"kind": {
"const": "crosslink"
},
"selector": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"const": "AnchorSelector"
},
"anchor": {
"$ref": "anchor.schema.json"
}
},
"required": [
"type",
"anchor"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"type",
"kind",
"source",
"selector"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "TextualBody"
},
"value": {
"type": "string",
"minLength": 1
},
"format": {
"enum": [
"text/plain",
"text/markdown"
]
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"kind": {
"const": "translation"
}
},
"required": [
"type",
"kind",
"value",
"language"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "TextualBody"
},
"value": {
"type": "string",
"minLength": 1
},
"format": {
"enum": [
"text/plain",
"text/markdown"
]
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"kind": {
"const": "generated"
},
"generator": {
"type": "object",
"properties": {
"model": {
"type": "string",
"minLength": 1
},
"run": {
"type": "string",
"minLength": 1
}
},
"required": [
"model",
"run"
],
"additionalProperties": false
}
},
"required": [
"type",
"kind",
"value",
"generator"
],
"additionalProperties": false
}
]
},
"target": {
"oneOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "SpecificResource"
},
"source": {
"type": "string",
"pattern": "^urn:scienting:doc:[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$"
},
"selector": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "AnchorSelector"
},
"anchor": {
"$ref": "anchor.schema.json"
}
},
"required": [
"type",
"anchor"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "TextQuoteSelector"
},
"exact": {
"type": "string",
"minLength": 1
},
"prefix": {
"type": "string"
},
"suffix": {
"type": "string"
}
},
"required": [
"type",
"exact"
],
"additionalProperties": false
}
]
},
"minItems": 1
}
},
"required": [
"type",
"source",
"selector"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "SpecificResource"
},
"source": {
"type": "string",
"pattern": "^urn:scienting:annotation:[a-z0-9][a-z0-9._-]*/[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
}
},
"required": [
"type",
"source"
],
"additionalProperties": false
}
]
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "SpecificResource"
},
"source": {
"type": "string",
"pattern": "^urn:scienting:doc:[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$"
},
"selector": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "AnchorSelector"
},
"anchor": {
"$ref": "anchor.schema.json"
}
},
"required": [
"type",
"anchor"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "TextQuoteSelector"
},
"exact": {
"type": "string",
"minLength": 1
},
"prefix": {
"type": "string"
},
"suffix": {
"type": "string"
}
},
"required": [
"type",
"exact"
],
"additionalProperties": false
}
]
},
"minItems": 1
}
},
"required": [
"type",
"source",
"selector"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "SpecificResource"
},
"source": {
"type": "string",
"pattern": "^urn:scienting:annotation:[a-z0-9][a-z0-9._-]*/[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
}
},
"required": [
"type",
"source"
],
"additionalProperties": false
}
]
},
"minItems": 1
}
]
},
"status": {
"enum": [
"proposed",
"confirmed",
"rejected",
"withdrawn"
]
},
"receipt": {
"$ref": "common.schema.json#/$defs/recordId"
},
"rights_use": {
"type": "string",
"minLength": 1
}
},
"required": [
"@context",
"id",
"type",
"layer",
"motivation",
"creator",
"created",
"body",
"target",
"status"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"status": {
"const": "confirmed"
}
}
},
"then": {
"required": [
"receipt"
]
}
}
]
}
+164
View File
@@ -0,0 +1,164 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/backend.schema.json",
"title": "Backend declaration",
"description": "scienting-backend/1: a tool's code and weight licenses and their conditions; spec/14-rights.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-backend/1"
},
"name": {
"$ref": "common.schema.json#/$defs/key"
},
"version": {
"type": "string",
"minLength": 1
},
"stage": {
"enum": [
"read",
"review",
"gloss",
"embed",
"digitize",
"other"
]
},
"processor": {
"$ref": "common.schema.json#/$defs/processor"
},
"code_license": {
"$ref": "common.schema.json#/$defs/license"
},
"weights": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"license": {
"$ref": "common.schema.json#/$defs/license"
},
"url": {
"$ref": "common.schema.json#/$defs/url"
}
},
"required": [
"name",
"license"
],
"additionalProperties": false
}
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/key"
},
"kind": {
"enum": [
"revenue-cap",
"no-competition",
"purpose"
]
},
"usd": {
"type": "integer",
"minimum": 1
},
"vendor": {
"type": "string",
"minLength": 1
},
"allowed": {
"type": "array",
"items": {
"enum": [
"research",
"personal",
"education",
"startup",
"commercial"
]
},
"minItems": 1
},
"source": {
"$ref": "common.schema.json#/$defs/url"
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"kind"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "revenue-cap"
}
}
},
"then": {
"required": [
"usd"
]
}
},
{
"if": {
"properties": {
"kind": {
"const": "no-competition"
}
}
},
"then": {
"required": [
"vendor"
]
}
},
{
"if": {
"properties": {
"kind": {
"const": "purpose"
}
}
},
"then": {
"required": [
"allowed"
]
}
}
]
}
}
},
"required": [
"format",
"name",
"version",
"stage",
"processor",
"code_license",
"weights",
"conditions"
],
"additionalProperties": false
}
+553
View File
@@ -0,0 +1,553 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/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
},
"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-z0-9][a-z0-9._-]*$",
"maxLength": 257
},
"datasetId": {
"type": "string",
"pattern": "^ds-[a-z0-9][a-z0-9._-]*$",
"maxLength": 128
},
"address": {
"type": "string",
"pattern": "^([a-z0-9][a-z0-9._-]*/)?[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"
]
},
"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": {
"type": "string",
"minLength": 1
},
"run": {
"type": "string",
"minLength": 1
}
},
"required": [
"model",
"run"
],
"additionalProperties": false
}
]
},
"hashing": {
"oneOf": [
{
"type": "object",
"properties": {
"scheme": {
"const": "plain"
}
},
"required": [
"scheme"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"scheme": {
"const": "hmac-team"
},
"key_id": {
"type": "string",
"pattern": "^[0-9a-f]{16}$"
}
},
"required": [
"scheme",
"key_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"scheme": {
"const": "hkdf-pages"
},
"context": {
"type": "string",
"minLength": 1
},
"pages": {
"type": "array",
"items": {
"$ref": "#/$defs/hash"
},
"minItems": 1
}
},
"required": [
"scheme",
"context",
"pages"
],
"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": "^urn:scienting:(key|person|software):[^ ]+$"
},
"type": {
"enum": [
"Person",
"Software"
]
},
"name": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"type"
],
"additionalProperties": false
}
}
}
+376
View File
@@ -0,0 +1,376 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/correction.schema.json",
"title": "Correction",
"description": "scienting-correction/1: a line of corrections.jsonl, or a proposal; spec/11-corrections.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-correction/1"
},
"index": {
"type": "integer",
"minimum": 1
},
"id": {
"$ref": "common.schema.json#/$defs/recordId"
},
"op": {
"enum": [
"replace",
"insert",
"delete",
"split",
"merge",
"move",
"reclassify",
"relabel",
"set"
]
},
"target": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"find": {
"type": "string",
"minLength": 1
},
"replace": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "runs.schema.json"
}
]
},
"run": {
"type": "integer",
"minimum": 0
},
"offset": {
"type": "integer",
"minimum": 0
},
"text": {
"type": "string",
"minLength": 1
},
"parent": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"node": {
"type": "object",
"description": "A node subtree to insert: kind, label, attrs, content and children; equation runs name a child by position."
},
"with": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"joiner": {
"type": "string"
},
"kind": {
"$ref": "common.schema.json#/$defs/nodeKind"
},
"label": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"attr": {
"enum": [
"level",
"columns",
"column",
"rowspan",
"colspan",
"role",
"header_path",
"ordered",
"marker",
"variant"
]
},
"value": {},
"evidence": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/evidence"
},
"minItems": 1
},
"author": {
"$ref": "common.schema.json#/$defs/author"
},
"reason": {
"type": "string",
"minLength": 1
},
"at": {
"$ref": "common.schema.json#/$defs/time"
},
"before": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/hash"
},
{
"type": "null"
}
]
},
"path": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
}
},
{
"type": "null"
}
]
},
"to_path": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
}
},
"touched": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"uniqueItems": true
},
"created": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"minItems": 1
},
"retired": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"minItems": 1
},
"from": {},
"status": {
"enum": [
"proposed"
]
},
"after": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/hash"
},
{
"type": "null"
}
]
},
"place_after": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"type": "null"
}
]
}
},
"required": [
"format",
"op",
"evidence",
"author",
"reason",
"at"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"op": {
"const": "replace"
}
}
},
"then": {
"required": [
"target",
"find",
"replace"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "delete"
}
}
},
"then": {
"required": [
"target"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "split"
}
}
},
"then": {
"required": [
"target",
"offset"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "merge"
}
}
},
"then": {
"required": [
"target",
"with"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "move"
}
}
},
"then": {
"required": [
"target",
"parent"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "reclassify"
}
}
},
"then": {
"required": [
"target",
"kind"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "relabel"
}
}
},
"then": {
"required": [
"target",
"label"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "set"
}
}
},
"then": {
"required": [
"target",
"attr",
"value"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "insert"
}
}
},
"then": {
"oneOf": [
{
"required": [
"parent",
"node"
]
},
{
"required": [
"target",
"run",
"offset",
"text"
]
}
]
}
},
{
"if": {
"required": [
"index"
]
},
"then": {
"required": [
"id",
"before",
"after",
"path",
"touched"
]
},
"else": {
"required": [
"status"
]
}
}
]
}
+365
View File
@@ -0,0 +1,365 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/dataset.schema.json",
"title": "Dataset",
"description": "datapackage.json of scienting-dataset/1: a Frictionless Data Package with units, uncertainty and origin; spec/15-datasets.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-dataset/1"
},
"id": {
"$ref": "common.schema.json#/$defs/datasetId"
},
"name": {
"$ref": "common.schema.json#/$defs/key"
},
"title": {
"type": "string",
"minLength": 1
},
"licenses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"path": {
"$ref": "common.schema.json#/$defs/url"
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"resources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"$ref": "common.schema.json#/$defs/key"
},
"path": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]*\\.(csv|parquet)$"
},
"format": {
"enum": [
"csv",
"parquet"
]
},
"mediatype": {
"type": "string",
"minLength": 1
},
"encoding": {
"const": "utf-8"
},
"schema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
},
"type": {
"enum": [
"string",
"number",
"integer",
"boolean",
"date",
"datetime",
"any"
]
},
"title": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string",
"minLength": 1
},
"unit": {
"type": "string",
"minLength": 1
},
"uncertainty": {
"type": "object",
"properties": {
"field": {
"type": "string",
"minLength": 1
},
"kind": {
"enum": [
"sd",
"se",
"resolution",
"unknown"
]
}
},
"required": [
"kind"
],
"additionalProperties": false
},
"constraints": {
"type": "object"
}
},
"required": [
"name",
"type"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "number"
}
}
},
"then": {
"required": [
"unit"
]
}
}
]
},
"minItems": 1
},
"primaryKey": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
}
]
}
},
"required": [
"fields"
],
"additionalProperties": false
},
"origin": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "reported"
},
"anchors": {
"const": "anchors.jsonl"
}
},
"required": [
"kind",
"anchors"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "digitized"
},
"digitization": {
"$ref": "common.schema.json#/$defs/recordId"
},
"anchors": {
"const": "anchors.jsonl"
}
},
"required": [
"kind",
"digitization"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "computed"
},
"claim": {
"type": "string",
"minLength": 1
},
"pin": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"claim",
"pin"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "measured"
},
"provenance": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"provenance"
],
"additionalProperties": false
}
]
},
"origin_field": {
"type": "string",
"minLength": 1
},
"origins": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "reported"
},
"anchors": {
"const": "anchors.jsonl"
}
},
"required": [
"kind",
"anchors"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "digitized"
},
"digitization": {
"$ref": "common.schema.json#/$defs/recordId"
},
"anchors": {
"const": "anchors.jsonl"
}
},
"required": [
"kind",
"digitization"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "computed"
},
"claim": {
"type": "string",
"minLength": 1
},
"pin": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"claim",
"pin"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "measured"
},
"provenance": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"provenance"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"name",
"path",
"schema"
],
"additionalProperties": false,
"anyOf": [
{
"required": [
"origin"
]
},
{
"required": [
"origin_field",
"origins"
]
}
]
},
"minItems": 1
}
},
"required": [
"format",
"id",
"name",
"resources"
],
"additionalProperties": false
}
+368
View File
@@ -0,0 +1,368 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/digitization.schema.json",
"title": "Digitization",
"description": "scienting-digitization/1: how values were read off a figure panel; spec/16-digitization.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-digitization/1"
},
"id": {
"$ref": "common.schema.json#/$defs/recordId"
},
"doc": {
"$ref": "common.schema.json#/$defs/qualifiedKey"
},
"target": {
"type": "object",
"properties": {
"anchor": {
"$ref": "anchor.schema.json"
},
"page_fp": {
"$ref": "common.schema.json#/$defs/hash"
},
"region": {
"$ref": "common.schema.json#/$defs/box"
},
"witness": {
"$ref": "common.schema.json#/$defs/hash"
},
"image": {
"$ref": "common.schema.json#/$defs/hash"
}
},
"required": [
"anchor",
"region"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"page_fp",
"witness"
],
"not": {
"required": [
"image"
]
}
},
{
"required": [
"image"
],
"not": {
"required": [
"page_fp"
]
}
}
]
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"enum": [
"x",
"y",
"y2",
"x2"
]
},
"scale": {
"enum": [
"linear",
"log",
"reciprocal",
"date"
]
},
"unit": {
"type": "string",
"minLength": 1
},
"calibration": {
"type": "array",
"items": {
"type": "object",
"properties": {
"at": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"value": {
"type": "string",
"minLength": 1
}
},
"required": [
"at",
"value"
],
"additionalProperties": false
},
"minItems": 2
},
"check": {
"type": "object",
"properties": {
"at": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"value": {
"type": "string",
"minLength": 1
}
},
"required": [
"at",
"value"
],
"additionalProperties": false
},
"label": {
"type": "object",
"properties": {
"panel": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"figure_text": {
"$ref": "common.schema.json#/$defs/nodeId"
}
},
"required": [
"panel",
"figure_text"
],
"additionalProperties": false
}
},
"required": [
"id",
"scale",
"calibration"
],
"additionalProperties": false
},
"minItems": 1
},
"series": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/key"
},
"legend": {
"type": "string",
"minLength": 1
},
"mark": {
"type": "object",
"properties": {
"color": {
"type": "string",
"pattern": "^#[0-9a-f]{6}$"
},
"marker": {
"type": "string",
"minLength": 1
},
"line": {
"type": "string",
"minLength": 1
}
},
"required": [],
"additionalProperties": false
},
"kind": {
"enum": [
"points",
"line",
"bars",
"error-bars",
"region"
]
},
"values": {
"type": "array",
"items": {
"type": "object",
"properties": {
"at": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"value": {
"type": "object",
"properties": {
"x": {
"$ref": "common.schema.json#/$defs/decimal"
},
"y": {
"$ref": "common.schema.json#/$defs/decimal"
}
},
"required": [
"x",
"y"
],
"additionalProperties": false
},
"uncertainty": {
"type": "object",
"properties": {
"x": {
"$ref": "common.schema.json#/$defs/decimal"
},
"y": {
"$ref": "common.schema.json#/$defs/decimal"
},
"resolution": {
"$ref": "common.schema.json#/$defs/decimal"
},
"marker": {
"$ref": "common.schema.json#/$defs/decimal"
},
"calibration": {
"$ref": "common.schema.json#/$defs/decimal"
}
},
"required": [
"x",
"y"
],
"additionalProperties": false
}
},
"required": [
"at",
"value",
"uncertainty"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"id",
"kind",
"values"
],
"additionalProperties": false
},
"minItems": 1
},
"method": {
"type": "object",
"properties": {
"kind": {
"enum": [
"manual",
"traced",
"proposed"
]
},
"tool": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"version": {
"type": "string",
"minLength": 1
}
},
"required": [
"name",
"version"
],
"additionalProperties": false
},
"model": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"tool"
],
"additionalProperties": false
},
"verification": {
"type": "object",
"properties": {
"image": {
"$ref": "common.schema.json#/$defs/hash"
},
"residual": {
"$ref": "common.schema.json#/$defs/decimal"
},
"max_residual": {
"$ref": "common.schema.json#/$defs/decimal"
}
},
"required": [
"image",
"residual",
"max_residual"
],
"additionalProperties": false
},
"confirmation": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/recordId"
},
{
"type": "null"
}
]
},
"dataset": {
"$ref": "common.schema.json#/$defs/datasetId"
},
"rev": {
"type": "integer",
"minimum": 0
}
},
"required": [
"format",
"id",
"doc",
"target",
"axes",
"series",
"method",
"verification",
"confirmation",
"rev"
],
"additionalProperties": false
}
+228
View File
@@ -0,0 +1,228 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/document.schema.json",
"title": "Document",
"description": "document.json of a scienting-doc/1 package; spec/02-model.md and spec/12-package.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-doc/1"
},
"key": {
"$ref": "common.schema.json#/$defs/key"
},
"store": {
"$ref": "common.schema.json#/$defs/key"
},
"aliases": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/key"
},
"minItems": 1,
"uniqueItems": true
},
"kind": {
"enum": [
"article",
"supplement",
"chapter",
"book",
"thesis",
"report",
"draft",
"course-material",
"other"
]
},
"work": {
"type": "object",
"properties": {
"key": {
"$ref": "common.schema.json#/$defs/key"
},
"same_as": {
"type": "array",
"items": {
"type": "string",
"pattern": "^(doi|arxiv|isbn|pmid|pmcid|url|lode):[^ ]+$"
},
"uniqueItems": true
}
},
"required": [
"key",
"same_as"
],
"additionalProperties": false
},
"version": {
"type": "object",
"properties": {
"type": {
"enum": [
"preprint",
"submitted",
"accepted",
"version-of-record",
"erratum",
"retraction",
"supplement",
"draft",
"other"
]
},
"seq": {
"type": "integer",
"minimum": 1
},
"date": {
"$ref": "common.schema.json#/$defs/date"
}
},
"required": [
"type"
],
"additionalProperties": false
},
"relations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"enum": [
"supplement-of",
"part-of",
"version-of",
"erratum-of",
"retraction-of",
"translation-of"
]
},
"target": {
"$ref": "common.schema.json#/$defs/qualifiedKey"
}
},
"required": [
"type",
"target"
],
"additionalProperties": false
}
},
"meta": {
"type": "object",
"description": "A CSL-JSON item for the version."
},
"language": {
"$ref": "common.schema.json#/$defs/language"
},
"license": {
"$ref": "common.schema.json#/$defs/license"
},
"policy": {
"enum": [
"full",
"checks-only"
]
},
"hashing": {
"$ref": "common.schema.json#/$defs/hashing"
},
"root": {
"$ref": "common.schema.json#/$defs/hash"
},
"meta_hash": {
"$ref": "common.schema.json#/$defs/hash"
},
"rev": {
"type": "integer",
"minimum": 0
},
"counts": {
"type": "object",
"properties": {
"nodes": {
"type": "integer",
"minimum": 1
},
"leaves": {
"type": "integer",
"minimum": 0
}
},
"required": [
"nodes",
"leaves"
],
"additionalProperties": false
},
"fidelity": {
"type": "object",
"properties": {
"lowest": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/level"
},
{
"type": "null"
}
]
},
"counts": {
"type": "object",
"properties": {
"F0": {
"type": "integer",
"minimum": 0
},
"F1": {
"type": "integer",
"minimum": 0
},
"F2": {
"type": "integer",
"minimum": 0
},
"F3": {
"type": "integer",
"minimum": 0
}
},
"required": [
"F0",
"F1",
"F2",
"F3"
],
"additionalProperties": false
}
},
"required": [
"lowest",
"counts"
],
"additionalProperties": false
}
},
"required": [
"format",
"key",
"kind",
"work",
"version",
"relations",
"meta",
"language",
"policy",
"hashing",
"root",
"meta_hash",
"rev",
"counts",
"fidelity"
],
"additionalProperties": false
}
+39
View File
@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/draft-ids.schema.json",
"title": "Draft sentence IDs",
"description": "One line of a Typst project's ids.jsonl: scienting-draft-ids/1; spec/21-drafts.md.",
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"text_hash": {
"$ref": "common.schema.json#/$defs/hash"
},
"section": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"type": "null"
}
]
},
"ord": {
"type": "integer",
"minimum": 0
},
"pinned": {
"$ref": "common.schema.json#/$defs/key"
}
},
"required": [
"id",
"text_hash",
"section",
"ord"
],
"additionalProperties": false
}
+351
View File
@@ -0,0 +1,351 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/exercise.schema.json",
"title": "Exercise",
"description": "scienting-exercise/1: the body of an exercise annotation; spec/19-exercises.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-exercise/1"
},
"exercise": {
"enum": [
"anchor",
"check",
"trace",
"reproduce",
"verify"
]
},
"prompt": {
"type": "string",
"minLength": 1
},
"summary": {
"type": "string",
"minLength": 1
},
"key": {
"type": "object",
"properties": {
"elements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"anchors": {
"type": "array",
"items": {
"$ref": "anchor.schema.json"
},
"minItems": 1
},
"points": {
"$ref": "common.schema.json#/$defs/decimal"
},
"feedback": {
"type": "object",
"properties": {
"hit": {
"type": "string"
},
"miss": {
"type": "string"
}
},
"required": [],
"additionalProperties": false
}
},
"required": [
"anchors",
"points"
],
"additionalProperties": false
},
"minItems": 1
},
"verdict": {
"type": "object",
"properties": {
"value": {
"enum": [
"supports",
"partly",
"does-not",
"cannot-tell"
]
},
"points": {
"$ref": "common.schema.json#/$defs/decimal"
},
"feedback": {
"type": "object",
"properties": {
"hit": {
"type": "string"
},
"miss": {
"type": "string"
}
},
"required": [],
"additionalProperties": false
}
},
"required": [
"value",
"points"
],
"additionalProperties": false
},
"chain": {
"type": "array",
"items": {
"type": "object",
"properties": {
"anchors": {
"type": "array",
"items": {
"$ref": "anchor.schema.json"
},
"minItems": 1
},
"points": {
"$ref": "common.schema.json#/$defs/decimal"
},
"feedback": {
"type": "object",
"properties": {
"hit": {
"type": "string"
},
"miss": {
"type": "string"
}
},
"required": [],
"additionalProperties": false
}
},
"required": [
"anchors",
"points"
],
"additionalProperties": false
},
"minItems": 1
},
"value": {
"$ref": "common.schema.json#/$defs/decimal"
},
"tolerance": {
"$ref": "common.schema.json#/$defs/decimal"
},
"unit": {
"type": "string",
"minLength": 1
},
"digitization": {
"$ref": "common.schema.json#/$defs/recordId"
},
"points": {
"$ref": "common.schema.json#/$defs/decimal"
},
"feedback": {
"type": "object",
"properties": {
"hit": {
"type": "string"
},
"miss": {
"type": "string"
}
},
"required": [],
"additionalProperties": false
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"anchors": {
"type": "array",
"items": {
"$ref": "anchor.schema.json"
},
"minItems": 1
},
"verdict": {
"enum": [
"supports",
"partly",
"does-not",
"cannot-tell"
]
},
"points": {
"$ref": "common.schema.json#/$defs/decimal"
},
"feedback": {
"type": "object",
"properties": {
"hit": {
"type": "string"
},
"miss": {
"type": "string"
}
},
"required": [],
"additionalProperties": false
}
},
"required": [
"anchors",
"verdict",
"points"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [],
"additionalProperties": false
},
"rule": {
"type": "object",
"properties": {
"match": {
"enum": [
"same-node",
"overlap",
"chain"
]
},
"min_overlap": {
"$ref": "common.schema.json#/$defs/decimal"
}
},
"required": [
"match"
],
"additionalProperties": false
}
},
"required": [
"format",
"exercise",
"prompt",
"key",
"rule"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"exercise": {
"const": "anchor"
}
}
},
"then": {
"properties": {
"key": {
"required": [
"elements"
]
}
}
}
},
{
"if": {
"properties": {
"exercise": {
"const": "check"
}
}
},
"then": {
"properties": {
"key": {
"required": [
"elements",
"verdict"
]
}
}
}
},
{
"if": {
"properties": {
"exercise": {
"const": "trace"
}
}
},
"then": {
"properties": {
"key": {
"required": [
"chain"
]
},
"rule": {
"properties": {
"match": {
"const": "chain"
}
}
}
}
}
},
{
"if": {
"properties": {
"exercise": {
"const": "reproduce"
}
}
},
"then": {
"properties": {
"key": {
"required": [
"value",
"tolerance",
"points"
]
}
}
}
},
{
"if": {
"properties": {
"exercise": {
"const": "verify"
}
}
},
"then": {
"required": [
"summary"
],
"properties": {
"key": {
"required": [
"errors"
]
}
}
}
}
]
}
+63
View File
@@ -0,0 +1,63 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/grade.schema.json",
"title": "Grade",
"description": "scienting-grade/1: the grader's result for one submission; spec/19-exercises.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-grade/1"
},
"submission": {
"$ref": "common.schema.json#/$defs/recordId"
},
"exercise": {
"type": "string",
"pattern": "^urn:scienting:annotation:[a-z0-9][a-z0-9._-]*/[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
},
"score": {
"$ref": "common.schema.json#/$defs/decimal"
},
"max": {
"$ref": "common.schema.json#/$defs/decimal"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"element": {
"type": "string",
"minLength": 1
},
"points": {
"$ref": "common.schema.json#/$defs/decimal"
},
"max": {
"$ref": "common.schema.json#/$defs/decimal"
},
"feedback": {
"type": "string"
}
},
"required": [
"element",
"points",
"max",
"feedback"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"format",
"submission",
"exercise",
"score",
"max",
"items"
],
"additionalProperties": false
}
+87
View File
@@ -0,0 +1,87 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/id-entry.schema.json",
"title": "ID table entry",
"description": "One line of ids.jsonl; spec/04-identity.md.",
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeRef"
},
"kind": {
"enum": [
"retired",
"alias"
]
},
"successor": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"type": "null"
}
]
},
"node_kind": {
"$ref": "common.schema.json#/$defs/nodeKind"
},
"rev": {
"type": "integer",
"minimum": 1
}
},
"required": [
"id",
"kind",
"successor"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "retired"
}
}
},
"then": {
"required": [
"node_kind",
"rev"
],
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeId"
}
}
},
"else": {
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/alias"
},
"successor": {
"$ref": "common.schema.json#/$defs/nodeId"
}
},
"not": {
"anyOf": [
{
"required": [
"rev"
]
},
{
"required": [
"node_kind"
]
}
]
}
}
}
]
}
+89
View File
@@ -0,0 +1,89 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/layer.schema.json",
"title": "Layer",
"description": "layer.json of scienting-layer/1: a W3C AnnotationCollection; spec/18-layers.md.",
"type": "object",
"properties": {
"@context": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 2
},
"format": {
"const": "scienting-layer/1"
},
"id": {
"type": "string",
"pattern": "^urn:scienting:layer:[a-z0-9][a-z0-9._-]*/[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
},
"type": {
"const": "AnnotationCollection"
},
"label": {
"type": "string",
"minLength": 1
},
"purpose": {
"type": "string",
"minLength": 1
},
"audience": {
"enum": [
"novice",
"student",
"expert",
"mixed"
]
},
"visibility": {
"enum": [
"private",
"team",
"public"
]
},
"license": {
"$ref": "common.schema.json#/$defs/license"
},
"creator": {
"$ref": "common.schema.json#/$defs/agent"
},
"created": {
"$ref": "common.schema.json#/$defs/time"
},
"project": {
"$ref": "common.schema.json#/$defs/key"
},
"docs": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/qualifiedKey"
},
"minItems": 1,
"uniqueItems": true
},
"total": {
"type": "integer",
"minimum": 0
}
},
"required": [
"@context",
"format",
"id",
"type",
"label",
"purpose",
"visibility",
"license",
"creator",
"created",
"docs",
"total"
],
"additionalProperties": false
}
+40
View File
@@ -0,0 +1,40 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/location.schema.json",
"title": "Location",
"description": "One line of locations.jsonl; spec/07-geometry.md.",
"type": "object",
"properties": {
"node": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"page_fp": {
"$ref": "common.schema.json#/$defs/hash"
},
"page": {
"type": "integer",
"minimum": 1
},
"page_label": {
"type": "string",
"minLength": 1
},
"boxes": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/box"
},
"minItems": 1
},
"approx": {
"const": true
}
},
"required": [
"node",
"page_fp",
"page",
"boxes"
],
"additionalProperties": false
}
+59
View File
@@ -0,0 +1,59 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/manifest.schema.json",
"title": "Package manifest",
"description": "MANIFEST.json, scienting-package/1; spec/12-package.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-package/1"
},
"doc": {
"const": "scienting-doc/1"
},
"key": {
"$ref": "common.schema.json#/$defs/key"
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"sha256": {
"$ref": "common.schema.json#/$defs/hash"
},
"size": {
"type": "integer",
"minimum": 0
},
"present": {
"const": false
},
"media_type": {
"type": "string",
"minLength": 1
}
},
"required": [
"path",
"sha256",
"size"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"format",
"doc",
"key",
"files"
],
"additionalProperties": false
}
+52
View File
@@ -0,0 +1,52 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/mathml.schema.json",
"title": "Derived MathML",
"description": "One line of derived/mathml.jsonl: MathML made by a pinned tool; never authoritative; spec/12-package.md.",
"type": "object",
"properties": {
"node": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"run": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
},
"tool": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"version": {
"type": "string",
"minLength": 1
}
},
"required": [
"name",
"version"
],
"additionalProperties": false
},
"mathml": {
"type": "string",
"pattern": "^<math[ >]"
}
},
"required": [
"node",
"run",
"tool",
"mathml"
],
"additionalProperties": false
}
+675
View File
@@ -0,0 +1,675 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/node.schema.json",
"title": "Node",
"description": "One line of nodes.jsonl; spec/03-nodes.md.",
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"kind": {
"$ref": "common.schema.json#/$defs/nodeKind"
},
"parent": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"type": "null"
}
]
},
"ord": {
"type": "integer",
"minimum": 0
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"attrs": {
"type": "object",
"properties": {
"level": {
"type": "integer",
"minimum": 1
},
"columns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"header_path": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
}
}
},
"required": [
"id",
"header_path"
],
"additionalProperties": false
}
},
"column": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"type": "null"
}
]
},
"rowspan": {
"type": "integer",
"minimum": 1
},
"colspan": {
"type": "integer",
"minimum": 1
},
"role": {
"enum": [
"data",
"column-header",
"row-header",
"row-group-header"
]
},
"header_path": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
}
},
"ordered": {
"type": "boolean"
},
"marker": {
"type": "string",
"minLength": 1
},
"variant": {
"type": "string",
"minLength": 1
},
"image": {
"type": "object",
"properties": {
"sha256": {
"$ref": "common.schema.json#/$defs/hash"
},
"media_type": {
"type": "string",
"minLength": 1
},
"native": {
"type": "boolean"
},
"dpi": {
"type": "integer",
"minimum": 1
}
},
"required": [
"sha256",
"media_type",
"native"
],
"additionalProperties": false
},
"crop": {
"type": "object",
"properties": {
"sha256": {
"$ref": "common.schema.json#/$defs/hash"
},
"media_type": {
"type": "string",
"minLength": 1
},
"dpi": {
"type": "integer",
"minimum": 1
}
},
"required": [
"sha256",
"media_type",
"dpi"
],
"additionalProperties": false
},
"figure_text": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"text": {
"type": "string",
"minLength": 1
},
"role": {
"enum": [
"axis-label",
"tick-label",
"legend",
"annotation",
"other"
]
},
"page_fp": {
"$ref": "common.schema.json#/$defs/hash"
},
"boxes": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/box"
},
"minItems": 1
}
},
"required": [
"id",
"text",
"role"
],
"additionalProperties": false
}
}
},
"required": [],
"additionalProperties": false,
"minProperties": 1
},
"content": {},
"withheld": {
"const": true
},
"fidelity": {
"$ref": "common.schema.json#/$defs/level"
},
"prov": {
"type": "object",
"properties": {
"witnesses": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"minItems": 1,
"uniqueItems": true
},
"backend": {
"type": "string",
"minLength": 1
},
"reading": {
"type": "string",
"minLength": 1
},
"corroborated_by": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"uniqueItems": true
}
},
"required": [],
"additionalProperties": false
},
"text_hash": {
"$ref": "common.schema.json#/$defs/hash"
},
"match_hash": {
"$ref": "common.schema.json#/$defs/hash"
},
"align_key": {
"$ref": "common.schema.json#/$defs/hash"
},
"own_hash": {
"$ref": "common.schema.json#/$defs/hash"
},
"node_hash": {
"$ref": "common.schema.json#/$defs/hash"
}
},
"required": [
"id",
"kind",
"parent",
"ord",
"text_hash",
"match_hash",
"align_key",
"own_hash",
"node_hash"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"kind": {
"enum": [
"sentence",
"cell",
"reference",
"authors",
"keywords"
]
}
}
},
"then": {
"anyOf": [
{
"required": [
"withheld"
]
},
{
"required": [
"content"
],
"properties": {
"content": {
"$ref": "runs.schema.json"
}
}
}
]
}
},
{
"if": {
"properties": {
"kind": {
"enum": [
"equation",
"equation-line"
]
}
}
},
"then": {
"anyOf": [
{
"required": [
"withheld"
]
},
{
"required": [
"content"
],
"properties": {
"content": {
"type": "object",
"properties": {
"notation": {
"enum": [
"tex",
"typst"
]
},
"source": {
"type": "string",
"minLength": 1
}
},
"required": [
"notation",
"source"
],
"additionalProperties": false
}
}
}
]
}
},
{
"if": {
"properties": {
"kind": {
"enum": [
"code",
"algorithm"
]
}
}
},
"then": {
"anyOf": [
{
"required": [
"withheld"
]
},
{
"required": [
"content"
],
"properties": {
"content": {
"type": "object",
"properties": {
"language": {
"type": "string",
"minLength": 1
},
"text": {
"type": "string"
}
},
"required": [
"text"
],
"additionalProperties": false
}
}
}
]
}
},
{
"if": {
"properties": {
"kind": {
"not": {
"enum": [
"sentence",
"cell",
"reference",
"authors",
"keywords",
"equation",
"equation-line",
"code",
"algorithm"
]
}
}
}
},
"then": {
"not": {
"anyOf": [
{
"required": [
"content"
]
},
{
"required": [
"withheld"
]
},
{
"required": [
"fidelity"
]
}
]
}
}
},
{
"if": {
"properties": {
"kind": {
"not": {
"enum": [
"section",
"figure",
"panel",
"table",
"theorem",
"footnote",
"equation",
"equation-line",
"reference",
"code",
"algorithm"
]
}
}
}
},
"then": {
"not": {
"required": [
"label"
]
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "section"
}
}
},
"then": {
"required": [
"attrs"
],
"properties": {
"attrs": {
"required": [
"level"
]
}
}
}
},
{
"if": {
"properties": {
"kind": {
"not": {
"enum": [
"section",
"table",
"cell",
"row",
"list",
"item",
"theorem",
"panel"
]
}
}
}
},
"then": {
"not": {
"required": [
"attrs"
]
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "section"
}
}
},
"then": {
"properties": {
"attrs": {
"propertyNames": {
"enum": [
"level"
]
}
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "table"
}
}
},
"then": {
"properties": {
"attrs": {
"propertyNames": {
"enum": [
"columns"
]
}
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "cell"
}
}
},
"then": {
"properties": {
"attrs": {
"propertyNames": {
"enum": [
"column",
"rowspan",
"colspan",
"role"
]
}
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "row"
}
}
},
"then": {
"properties": {
"attrs": {
"propertyNames": {
"enum": [
"header_path"
]
}
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "list"
}
}
},
"then": {
"properties": {
"attrs": {
"propertyNames": {
"enum": [
"ordered"
]
}
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "item"
}
}
},
"then": {
"properties": {
"attrs": {
"propertyNames": {
"enum": [
"marker"
]
}
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "theorem"
}
}
},
"then": {
"properties": {
"attrs": {
"propertyNames": {
"enum": [
"variant"
]
}
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "panel"
}
}
},
"then": {
"properties": {
"attrs": {
"propertyNames": {
"enum": [
"image",
"crop",
"figure_text"
]
}
}
}
}
}
]
}
+44
View File
@@ -0,0 +1,44 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/page.schema.json",
"title": "Page",
"description": "One line of pages.jsonl; spec/07-geometry.md.",
"type": "object",
"properties": {
"witness": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"page": {
"type": "integer",
"minimum": 1
},
"page_fp": {
"$ref": "common.schema.json#/$defs/hash"
},
"size": {
"$ref": "common.schema.json#/$defs/size"
},
"page_label": {
"type": "string",
"minLength": 1
},
"text_layer": {
"type": "boolean"
},
"stamps_removed": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/key"
},
"minItems": 1
}
},
"required": [
"witness",
"page",
"page_fp",
"size",
"text_layer"
],
"additionalProperties": false
}
+143
View File
@@ -0,0 +1,143 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/policy.schema.json",
"title": "Team rights policy",
"description": "scienting-policy/1: a signed decision that resolves unknown uses; spec/14-rights.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-policy/1"
},
"id": {
"$ref": "common.schema.json#/$defs/recordId"
},
"project": {
"$ref": "common.schema.json#/$defs/key"
},
"applies_to": {
"type": "object",
"properties": {
"basis": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/basis"
},
"minItems": 1
},
"license": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/spdx"
},
"minItems": 1
},
"doi_prefixes": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
},
"witnesses": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/hash"
},
"minItems": 1
}
},
"required": [],
"additionalProperties": false,
"minProperties": 1
},
"uses": {
"type": "object",
"properties": {
"read": {
"$ref": "common.schema.json#/$defs/tri"
},
"tdm": {
"$ref": "common.schema.json#/$defs/tri"
},
"redistribute": {
"$ref": "common.schema.json#/$defs/tri"
},
"quote-public": {
"$ref": "common.schema.json#/$defs/tri"
},
"accessible-copy": {
"$ref": "common.schema.json#/$defs/tri"
},
"ai": {
"type": "object",
"properties": {
"internal/local": {
"$ref": "common.schema.json#/$defs/tri"
},
"internal/tenancy": {
"$ref": "common.schema.json#/$defs/tri"
},
"internal/outside-no-retention": {
"$ref": "common.schema.json#/$defs/tri"
},
"internal/outside": {
"$ref": "common.schema.json#/$defs/tri"
},
"external/local": {
"$ref": "common.schema.json#/$defs/tri"
},
"external/tenancy": {
"$ref": "common.schema.json#/$defs/tri"
},
"external/outside-no-retention": {
"$ref": "common.schema.json#/$defs/tri"
},
"external/outside": {
"$ref": "common.schema.json#/$defs/tri"
}
},
"required": [],
"additionalProperties": false
}
},
"required": [],
"additionalProperties": false
},
"statement": {
"type": "string",
"minLength": 1
},
"by": {
"$ref": "common.schema.json#/$defs/key"
},
"at": {
"$ref": "common.schema.json#/$defs/time"
},
"valid_until": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/time"
},
{
"type": "null"
}
]
},
"signature": {
"$ref": "common.schema.json#/$defs/signature"
}
},
"required": [
"format",
"id",
"applies_to",
"uses",
"statement",
"by",
"at",
"valid_until",
"signature"
],
"additionalProperties": false
}
+82
View File
@@ -0,0 +1,82 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/profile.schema.json",
"title": "Team profile",
"description": "scienting-profile/1: what backend conditions ask about a team; spec/14-rights.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-profile/1"
},
"team": {
"$ref": "common.schema.json#/$defs/key"
},
"purpose": {
"enum": [
"research",
"personal",
"education",
"startup",
"commercial"
]
},
"revenue_or_funding_usd": {
"anyOf": [
{
"type": "object",
"properties": {
"at_most": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
]
}
},
"required": [
"at_most"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"competes_with": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
{
"type": "null"
}
]
},
"recorded_by": {
"$ref": "common.schema.json#/$defs/key"
},
"at": {
"$ref": "common.schema.json#/$defs/time"
}
},
"required": [
"format",
"team",
"purpose",
"revenue_or_funding_usd",
"competes_with",
"recorded_by",
"at"
],
"additionalProperties": false
}
+237
View File
@@ -0,0 +1,237 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/project.schema.json",
"title": "Project",
"description": "scienting-project/1: a team's curated set of documents and people; spec/20-projects.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-project/1"
},
"key": {
"$ref": "common.schema.json#/$defs/key"
},
"store": {
"$ref": "common.schema.json#/$defs/key"
},
"name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string",
"minLength": 1
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"person": {
"type": "string",
"minLength": 1
},
"role": {
"enum": [
"owner",
"editor",
"reader",
"guest"
]
},
"keys": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/key"
},
"uniqueItems": true
}
},
"required": [
"person",
"role",
"keys"
],
"additionalProperties": false
},
"minItems": 1
},
"documents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"doc": {
"$ref": "common.schema.json#/$defs/qualifiedKey"
},
"reason": {
"type": "string",
"minLength": 1
},
"tags": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/key"
},
"uniqueItems": true
},
"status": {
"type": "object",
"additionalProperties": {
"enum": [
"unread",
"reading",
"read"
]
}
}
},
"required": [
"doc",
"reason"
],
"additionalProperties": false
}
},
"paths": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/key"
},
"title": {
"type": "string",
"minLength": 1
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"enum": [
"document",
"node",
"claim",
"layer"
]
},
"ref": {
"type": "string",
"minLength": 1
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"type",
"ref"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"id",
"title",
"steps"
],
"additionalProperties": false
}
},
"layers": {
"type": "array",
"items": {
"type": "string",
"pattern": "^urn:scienting:layer:[a-z0-9][a-z0-9._-]*/[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
}
},
"datasets": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/datasetId"
}
},
"views": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/key"
}
},
"drafts": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/qualifiedKey"
}
},
"claims": {
"type": "object",
"properties": {
"lode": {
"type": "string",
"minLength": 1
}
},
"required": [
"lode"
],
"additionalProperties": false
},
"settings": {
"type": "object",
"properties": {
"digit_rule": {
"enum": [
"all",
"anchored-sections",
"none"
]
},
"drift_threshold": {
"$ref": "common.schema.json#/$defs/decimal"
},
"spot_check": {
"type": "object",
"properties": {
"rate": {
"$ref": "common.schema.json#/$defs/decimal"
},
"minimum": {
"type": "integer",
"minimum": 1
}
},
"required": [
"rate",
"minimum"
],
"additionalProperties": false
},
"rights_unknown": {
"enum": [
"refuse",
"warn"
]
},
"stages": {
"$ref": "common.schema.json#/$defs/key"
}
},
"required": [],
"additionalProperties": false
}
},
"required": [
"format",
"key",
"name",
"members",
"documents"
],
"additionalProperties": false
}
+154
View File
@@ -0,0 +1,154 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/provenance.schema.json",
"title": "Provenance",
"description": "provenance.json of a package; spec/12-package.md.",
"type": "object",
"properties": {
"tools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"version": {
"type": "string",
"minLength": 1
}
},
"required": [
"name",
"version"
],
"additionalProperties": false
}
},
"backends": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"version": {
"type": "string",
"minLength": 1
},
"declaration": {
"$ref": "common.schema.json#/$defs/hash"
}
},
"required": [
"name",
"version"
],
"additionalProperties": false
}
},
"readings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"witness": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"backend": {
"type": "string",
"minLength": 1
},
"sha256": {
"$ref": "common.schema.json#/$defs/hash"
}
},
"required": [
"id",
"witness",
"backend",
"sha256"
],
"additionalProperties": false
}
},
"stages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"stage": {
"enum": [
"acquire",
"read",
"witness",
"assemble",
"reconcile",
"segment",
"locate",
"structure",
"figures",
"mint",
"suspects",
"review",
"gate",
"finalize",
"export",
"hand"
]
},
"tool": {
"type": "string",
"minLength": 1
},
"inputs": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/hash"
}
},
"output": {
"$ref": "common.schema.json#/$defs/hash"
},
"processor": {
"$ref": "common.schema.json#/$defs/processor"
},
"uses": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"job": {
"type": "string",
"minLength": 1
}
},
"required": [
"stage",
"processor"
],
"additionalProperties": false
}
},
"session": {
"type": "object"
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"tools"
],
"additionalProperties": false
}
+83
View File
@@ -0,0 +1,83 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/qa-report.schema.json",
"title": "QA report",
"description": "scienting-qa-report/1: reviewer error bounds for a delivery; spec/08-fidelity.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-qa-report/1"
},
"id": {
"$ref": "common.schema.json#/$defs/recordId"
},
"delivery": {
"type": "string",
"minLength": 1
},
"docs": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/qualifiedKey"
},
"minItems": 1
},
"receipts": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/recordId"
},
"minItems": 1
},
"reviewers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"$ref": "common.schema.json#/$defs/key"
},
"sampled": {
"type": "integer",
"minimum": 1
},
"errors": {
"type": "integer",
"minimum": 0
},
"confidence": {
"$ref": "common.schema.json#/$defs/decimal"
},
"method": {
"const": "clopper-pearson"
},
"bound": {
"$ref": "common.schema.json#/$defs/decimal"
}
},
"required": [
"key",
"sampled",
"errors",
"confidence",
"method",
"bound"
],
"additionalProperties": false
},
"minItems": 1
},
"at": {
"$ref": "common.schema.json#/$defs/time"
}
},
"required": [
"format",
"id",
"docs",
"receipts",
"reviewers",
"at"
],
"additionalProperties": false
}
+219
View File
@@ -0,0 +1,219 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/receipt.schema.json",
"title": "Review receipt",
"description": "scienting-receipt/1; spec/08-fidelity.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-receipt/1"
},
"id": {
"$ref": "common.schema.json#/$defs/recordId"
},
"doc": {
"$ref": "common.schema.json#/$defs/key"
},
"rev": {
"type": "integer",
"minimum": 0
},
"level": {
"$ref": "common.schema.json#/$defs/receiptLevel"
},
"scope": {
"type": "string",
"pattern": "^(all|section:[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6}|page:[1-9][0-9]*|targeted:[a-z0-9-]+|qa:[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25})$"
},
"nodes": {
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"$ref": "common.schema.json#/$defs/hash"
}
],
"minItems": 2,
"maxItems": 2
}
},
"records": {
"type": "array",
"items": {
"type": "array",
"prefixItems": [
{
"enum": [
"annotation",
"digitization",
"correction",
"layer",
"checklist"
]
},
{
"$ref": "common.schema.json#/$defs/recordId"
},
{
"$ref": "common.schema.json#/$defs/hash"
}
],
"minItems": 3,
"maxItems": 3
}
},
"root": {
"$ref": "common.schema.json#/$defs/hash"
},
"evidence": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/evidence"
}
},
"by": {
"$ref": "common.schema.json#/$defs/key"
},
"at": {
"$ref": "common.schema.json#/$defs/time"
},
"qa": {
"type": "object",
"properties": {
"of": {
"$ref": "common.schema.json#/$defs/recordId"
},
"key": {
"$ref": "common.schema.json#/$defs/key"
},
"seed": {
"$ref": "common.schema.json#/$defs/base64"
},
"rate": {
"$ref": "common.schema.json#/$defs/decimal"
},
"minimum": {
"type": "integer",
"minimum": 1
},
"sample": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"minItems": 1
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"node": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"kind": {
"enum": [
"word",
"number",
"equation",
"structure",
"other"
]
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"node"
],
"additionalProperties": false
}
}
},
"required": [
"of",
"key",
"seed",
"rate",
"minimum",
"sample",
"errors"
],
"additionalProperties": false
},
"export_of": {
"$ref": "common.schema.json#/$defs/recordId"
},
"keyed": {
"$ref": "common.schema.json#/$defs/hashing"
},
"signature": {
"$ref": "common.schema.json#/$defs/signature"
}
},
"required": [
"format",
"id",
"doc",
"rev",
"level",
"scope",
"nodes",
"root",
"evidence",
"by",
"at",
"signature"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"scope": {
"pattern": "^qa:"
}
}
},
"then": {
"required": [
"qa"
]
},
"else": {
"not": {
"required": [
"qa"
]
}
}
},
{
"anyOf": [
{
"properties": {
"nodes": {
"minItems": 1
}
}
},
{
"required": [
"records"
],
"properties": {
"records": {
"minItems": 1
}
}
}
]
}
]
}
+73
View File
@@ -0,0 +1,73 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/reference.schema.json",
"title": "Reference record",
"description": "One line of references.jsonl; spec/10-references.md.",
"type": "object",
"properties": {
"node": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"label": {
"type": "string",
"minLength": 1
},
"csl": {
"type": "object"
},
"resolution": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "doi"
},
"doi": {
"type": "string",
"pattern": "^10\\.[0-9]{4,9}/[^ ]+$"
}
},
"required": [
"type",
"doi"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "document"
},
"doc": {
"$ref": "common.schema.json#/$defs/qualifiedKey"
}
},
"required": [
"type",
"doc"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"const": "none"
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"required": [
"node",
"resolution"
],
"additionalProperties": false
}
+91
View File
@@ -0,0 +1,91 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/revocation.schema.json",
"title": "Revocation",
"description": "scienting-revocation/1; spec/08-fidelity.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-revocation/1"
},
"id": {
"$ref": "common.schema.json#/$defs/recordId"
},
"receipt": {
"$ref": "common.schema.json#/$defs/recordId"
},
"signer": {
"$ref": "common.schema.json#/$defs/key"
},
"period": {
"type": "object",
"properties": {
"from": {
"$ref": "common.schema.json#/$defs/time"
},
"to": {
"$ref": "common.schema.json#/$defs/time"
}
},
"required": [
"from",
"to"
],
"additionalProperties": false
},
"reason": {
"type": "string",
"minLength": 1
},
"by": {
"$ref": "common.schema.json#/$defs/key"
},
"at": {
"$ref": "common.schema.json#/$defs/time"
},
"signature": {
"$ref": "common.schema.json#/$defs/signature"
}
},
"required": [
"format",
"id",
"reason",
"by",
"at",
"signature"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"receipt"
],
"not": {
"anyOf": [
{
"required": [
"signer"
]
},
{
"required": [
"period"
]
}
]
}
},
{
"required": [
"signer",
"period"
],
"not": {
"required": [
"receipt"
]
}
}
]
}
+150
View File
@@ -0,0 +1,150 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/rights.schema.json",
"title": "Rights record",
"description": "scienting-rights/1: a witness's license, basis and uses; spec/14-rights.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-rights/1"
},
"license": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/license"
},
{
"type": "null"
}
]
},
"basis": {
"$ref": "common.schema.json#/$defs/basis"
},
"uses": {
"type": "object",
"properties": {
"read": {
"$ref": "common.schema.json#/$defs/tri"
},
"tdm": {
"$ref": "common.schema.json#/$defs/tri"
},
"redistribute": {
"$ref": "common.schema.json#/$defs/tri"
},
"quote-public": {
"$ref": "common.schema.json#/$defs/tri"
},
"accessible-copy": {
"$ref": "common.schema.json#/$defs/tri"
},
"ai": {
"type": "object",
"properties": {
"internal/local": {
"$ref": "common.schema.json#/$defs/tri"
},
"internal/tenancy": {
"$ref": "common.schema.json#/$defs/tri"
},
"internal/outside-no-retention": {
"$ref": "common.schema.json#/$defs/tri"
},
"internal/outside": {
"$ref": "common.schema.json#/$defs/tri"
},
"external/local": {
"$ref": "common.schema.json#/$defs/tri"
},
"external/tenancy": {
"$ref": "common.schema.json#/$defs/tri"
},
"external/outside-no-retention": {
"$ref": "common.schema.json#/$defs/tri"
},
"external/outside": {
"$ref": "common.schema.json#/$defs/tri"
}
},
"required": [],
"additionalProperties": false
}
},
"required": [],
"additionalProperties": false
},
"asserted_by": {
"type": "object",
"properties": {
"by": {
"type": "string",
"minLength": 1
},
"evidence": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"enum": [
"license-url",
"contract",
"crossref-license",
"delivery",
"statement"
]
},
"url": {
"$ref": "common.schema.json#/$defs/url"
},
"sha256": {
"$ref": "common.schema.json#/$defs/hash"
},
"doi": {
"type": "string",
"minLength": 1
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind"
],
"additionalProperties": false
}
}
},
"required": [
"by",
"evidence"
],
"additionalProperties": false
},
"at": {
"$ref": "common.schema.json#/$defs/time"
},
"valid_until": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/time"
},
{
"type": "null"
}
]
}
},
"required": [
"format",
"license",
"basis",
"uses",
"asserted_by",
"at",
"valid_until"
],
"additionalProperties": false
}
+100
View File
@@ -0,0 +1,100 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/roster.schema.json",
"title": "Roster",
"description": "scienting-roster/1: the keys that may sign; spec/08-fidelity.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-roster/1"
},
"store": {
"$ref": "common.schema.json#/$defs/key"
},
"keys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/key"
},
"person": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"orcid": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]$"
},
"email": {
"type": "string",
"minLength": 1
}
},
"required": [
"name"
],
"additionalProperties": false
},
"scheme": {
"enum": [
"ed25519",
"ssh",
"gpg",
"sigstore"
]
},
"public": {
"type": "string",
"minLength": 1
},
"purposes": {
"type": "array",
"items": {
"enum": [
"sign",
"spot-check",
"export"
]
},
"minItems": 1,
"uniqueItems": true
},
"registered_at": {
"$ref": "common.schema.json#/$defs/time"
},
"revoked_at": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/time"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"person",
"scheme",
"public",
"purposes",
"registered_at",
"revoked_at"
],
"additionalProperties": false
}
}
},
"required": [
"format",
"store",
"keys"
],
"additionalProperties": false
}
+189
View File
@@ -0,0 +1,189 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/runs.schema.json",
"title": "Inline runs",
"description": "The runs of a sentence, cell, reference, authors or keywords node; spec/03-nodes.md.",
"type": "array",
"minItems": 1,
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "text"
},
"text": {
"type": "string",
"minLength": 1
},
"style": {
"type": "array",
"items": {
"enum": [
"em",
"strong",
"sup",
"sub",
"sc",
"mono"
]
},
"minItems": 1,
"uniqueItems": true
}
},
"required": [
"kind",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "math"
},
"notation": {
"enum": [
"tex",
"typst"
]
},
"source": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"notation",
"source"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "cite"
},
"refs": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"uniqueItems": true
},
"text": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"refs",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "xref"
},
"target": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"$ref": "common.schema.json#/$defs/address"
},
{
"type": "null"
}
]
},
"text": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"target",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "fnmark"
},
"footnote": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"type": "null"
}
]
},
"text": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"footnote",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "link"
},
"url": {
"$ref": "common.schema.json#/$defs/url"
},
"text": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"url",
"text"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"const": "equation"
},
"node": {
"$ref": "common.schema.json#/$defs/nodeId"
}
},
"required": [
"kind",
"node"
],
"additionalProperties": false
}
]
}
}
+120
View File
@@ -0,0 +1,120 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/snapshot.schema.json",
"title": "Draft snapshot",
"description": "scienting-snapshot/1: the pinned claims, quotations and datasets a draft cites; spec/21-drafts.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-snapshot/1"
},
"store": {
"$ref": "common.schema.json#/$defs/key"
},
"made_at": {
"$ref": "common.schema.json#/$defs/time"
},
"quotes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"$ref": "common.schema.json#/$defs/address"
},
"anchor": {
"$ref": "anchor.schema.json"
},
"text": {
"type": "string",
"minLength": 1
},
"fidelity": {
"$ref": "common.schema.json#/$defs/level"
},
"result": {
"enum": [
"current",
"changed-below",
"moved",
"reattached"
]
}
},
"required": [
"address",
"anchor",
"text",
"fidelity",
"result"
],
"additionalProperties": false
}
},
"claims": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"minLength": 1
},
"pin": {
"type": "string",
"minLength": 1
},
"level": {
"type": "string",
"minLength": 1
},
"standing": {
"type": "string",
"minLength": 1
},
"rendering": {
"type": "string",
"minLength": 1
},
"typst": {
"type": "string",
"minLength": 1
}
},
"required": [
"ref",
"pin"
],
"additionalProperties": false
}
},
"datasets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/datasetId"
},
"hash": {
"$ref": "common.schema.json#/$defs/hash"
}
},
"required": [
"id",
"hash"
],
"additionalProperties": false
}
}
},
"required": [
"format",
"store",
"made_at",
"quotes",
"claims",
"datasets"
],
"additionalProperties": false
}
+81
View File
@@ -0,0 +1,81 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/stages.schema.json",
"title": "Stage requirements",
"description": "scienting-stages/1: the uses each stage needs; configuration, not code; spec/14-rights.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-stages/1"
},
"id": {
"$ref": "common.schema.json#/$defs/key"
},
"note": {
"type": "string",
"minLength": 1
},
"stages": {
"type": "object",
"minProperties": 1,
"propertyNames": {
"$ref": "common.schema.json#/$defs/key"
},
"additionalProperties": {
"type": "object",
"properties": {
"uses": {
"type": "array",
"items": {
"enum": [
"read",
"tdm",
"redistribute",
"quote-public",
"accessible-copy"
]
},
"uniqueItems": true
},
"ai": {
"type": "object",
"properties": {
"purpose": {
"enum": [
"internal",
"external"
]
},
"processors": {
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/processor"
},
"minItems": 1,
"uniqueItems": true
}
},
"required": [
"purpose"
],
"additionalProperties": false
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"uses"
],
"additionalProperties": false
}
}
},
"required": [
"format",
"id",
"stages"
],
"additionalProperties": false
}
+64
View File
@@ -0,0 +1,64 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/stamps.schema.json",
"title": "Stamp rules",
"description": "scienting-stamps/1: download-stamp line rules for page fingerprints; spec/07-geometry.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-stamps/1"
},
"id": {
"$ref": "common.schema.json#/$defs/key"
},
"learned": {
"type": "boolean"
},
"note": {
"type": "string",
"minLength": 1
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/key"
},
"pattern": {
"type": "string",
"minLength": 1
},
"where": {
"enum": [
"any",
"margin"
]
},
"margin": {
"type": "number",
"exclusiveMinimum": 0
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"id",
"pattern",
"where"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"format",
"id",
"rules"
],
"additionalProperties": false
}
+109
View File
@@ -0,0 +1,109 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/submission.schema.json",
"title": "Submission",
"description": "scienting-submission/1: a student's answer, under a pseudonym; spec/19-exercises.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-submission/1"
},
"id": {
"$ref": "common.schema.json#/$defs/recordId"
},
"exercise": {
"type": "string",
"pattern": "^urn:scienting:annotation:[a-z0-9][a-z0-9._-]*/[a-hjkmnp-tv-z][0-9a-hjkmnp-tv-z]{6,25}$"
},
"doc": {
"$ref": "common.schema.json#/$defs/qualifiedKey"
},
"rev": {
"type": "integer",
"minimum": 0
},
"student": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{3,63}$"
},
"answers": {
"type": "object",
"properties": {
"anchors": {
"type": "array",
"items": {
"$ref": "anchor.schema.json"
}
},
"verdict": {
"enum": [
"supports",
"partly",
"does-not",
"cannot-tell"
]
},
"chain": {
"type": "array",
"items": {
"type": "array",
"items": {
"$ref": "anchor.schema.json"
}
}
},
"value": {
"$ref": "common.schema.json#/$defs/decimal"
},
"flags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"anchor": {
"$ref": "anchor.schema.json"
},
"verdict": {
"enum": [
"supports",
"partly",
"does-not",
"cannot-tell"
]
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"anchor",
"verdict"
],
"additionalProperties": false
}
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [],
"additionalProperties": false
},
"submitted_at": {
"$ref": "common.schema.json#/$defs/time"
}
},
"required": [
"format",
"id",
"exercise",
"doc",
"rev",
"student",
"answers",
"submitted_at"
],
"additionalProperties": false
}
+77
View File
@@ -0,0 +1,77 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/suspect.schema.json",
"title": "Suspect",
"description": "scienting-suspect/1: a doubtful reading for review; spec/05-hashes.md.",
"type": "object",
"properties": {
"format": {
"const": "scienting-suspect/1"
},
"id": {
"$ref": "common.schema.json#/$defs/recordId"
},
"kind": {
"enum": [
"word",
"number",
"equation",
"structure",
"join",
"added",
"dropped",
"boundary",
"reading"
]
},
"node": {
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeId"
},
{
"type": "null"
}
]
},
"reading": {
"type": "string",
"minLength": 1
},
"a": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"b": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"crop": {
"$ref": "common.schema.json#/$defs/hash"
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"format",
"id",
"kind"
],
"additionalProperties": false
}
+53
View File
@@ -0,0 +1,53 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/value-anchor.schema.json",
"title": "Value anchor",
"description": "One line of a dataset's anchors.jsonl: where one value came from; spec/15-datasets.md.",
"type": "object",
"properties": {
"resource": {
"$ref": "common.schema.json#/$defs/key"
},
"row": {
"$ref": "common.schema.json#/$defs/key"
},
"field": {
"type": "string",
"minLength": 1
},
"anchor": {
"$ref": "anchor.schema.json"
},
"digitization": {
"$ref": "common.schema.json#/$defs/recordId"
},
"series": {
"type": "string",
"minLength": 1
},
"point": {
"type": "integer",
"minimum": 0
}
},
"required": [
"resource",
"row",
"field"
],
"additionalProperties": false,
"oneOf": [
{
"required": [
"anchor"
]
},
{
"required": [
"digitization",
"series",
"point"
]
}
]
}
+115
View File
@@ -0,0 +1,115 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/view.schema.json",
"title": "View",
"description": "A Vega-Lite specification whose usermeta.scienting pins its data: scienting-view/1; spec/17-views.md.",
"type": "object",
"required": [
"$schema",
"usermeta"
],
"properties": {
"$schema": {
"type": "string",
"pattern": "^https://vega\\.github\\.io/schema/vega-lite/v[0-9]+(\\.[0-9]+)*\\.json$"
},
"usermeta": {
"type": "object",
"required": [
"scienting"
],
"properties": {
"scienting": {
"type": "object",
"properties": {
"format": {
"const": "scienting-view/1"
},
"id": {
"$ref": "common.schema.json#/$defs/key"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"$ref": "common.schema.json#/$defs/datasetId"
},
"dataset": {
"$ref": "common.schema.json#/$defs/datasetId"
},
"hash": {
"$ref": "common.schema.json#/$defs/hash"
},
"resource": {
"$ref": "common.schema.json#/$defs/key"
}
},
"required": [
"name",
"dataset",
"hash",
"resource"
],
"additionalProperties": false
},
"minItems": 1
},
"computation": {
"type": "object",
"properties": {
"claim": {
"type": "string",
"minLength": 1
},
"pin": {
"type": "string",
"minLength": 1
},
"runtime": {
"const": "pyodide"
},
"inputs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"param": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
}
},
"required": [
"param",
"name"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"claim",
"pin",
"runtime",
"inputs"
],
"additionalProperties": false
}
},
"required": [
"format",
"id",
"data"
],
"additionalProperties": false
}
}
}
}
}
+108
View File
@@ -0,0 +1,108 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scient.ing/ns/schemas/witnesses.schema.json",
"title": "Witnesses",
"description": "witnesses.json of a package; spec/02-model.md.",
"type": "object",
"properties": {
"witnesses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"sha256": {
"$ref": "common.schema.json#/$defs/hash"
},
"size": {
"type": "integer",
"minimum": 0
},
"kind": {
"enum": [
"pdf",
"jats",
"latex",
"html",
"epub",
"typst",
"xml",
"image",
"other"
]
},
"media_type": {
"type": "string",
"minLength": 1
},
"pages": {
"type": "integer",
"minimum": 1
},
"text_layer": {
"type": "boolean"
},
"version_label": {
"type": "string",
"minLength": 1
},
"origin": {
"type": "object",
"properties": {
"source": {
"enum": [
"publisher",
"repository",
"preprint-server",
"author",
"team",
"licensed-delivery",
"library",
"other"
]
},
"url": {
"$ref": "common.schema.json#/$defs/url"
},
"doi": {
"type": "string",
"minLength": 1
},
"retrieved_at": {
"$ref": "common.schema.json#/$defs/time"
},
"note": {
"type": "string",
"minLength": 1
}
},
"required": [
"source"
],
"additionalProperties": false
},
"rights": {
"$ref": "rights.schema.json"
}
},
"required": [
"id",
"sha256",
"size",
"kind",
"media_type",
"origin",
"rights"
],
"additionalProperties": false
},
"minItems": 1
}
},
"required": [
"witnesses"
],
"additionalProperties": false
}