Skip to main content

pub.layers.defs

Shared definitions for the Layers lexicons. Provides abstract anchoring primitives, W3C Web Annotation-compatible selectors (for at.margin/Semble interoperability), alignment links, and universal metadata types.

Types

uuid

Type: Object

A universally unique identifier for cross-referencing annotation objects.

FieldTypeDescription
valuestringThe UUID string value.

span

Type: Object

A contiguous span of text defined by UTF-8 byte offsets into a source text.

FieldTypeDescription
byteStartintegerInclusive start byte offset (0-indexed).
byteEndintegerExclusive end byte offset.
charStartintegerOptional inclusive start character offset (0-indexed).
charEndintegerOptional exclusive end character offset.

tokenRef

Type: Object

A reference to a specific token within a tokenization, by index.

FieldTypeDescription
tokenizationIdrefUUID of the tokenization containing the referenced token. Ref: #uuid
tokenIndexinteger0-based index of the token within its tokenization.

tokenRefSequence

Type: Object

A sequence of token references, possibly non-contiguous, within a single tokenization.

FieldTypeDescription
tokenizationIdrefUUID of the tokenization containing the referenced tokens. Ref: #uuid
tokenIndexesarray0-based indices of the tokens.
anchorTokenIndexintegerOptional head/anchor token index within the sequence.

temporalSpan

Type: Object

A temporal span within a media source, defined by start and end times. Times are signed and session-relative: they may be negative when a stream began before the session clock origin (per BIDS StartTime). start and ending remain required; the nanosecond fields, when present, are authoritative over the millisecond fields.

FieldTypeDescription
startintegerStart time in milliseconds, signed and session-relative (may be negative when it precedes the clock origin).
endingintegerEnd time in milliseconds, signed and session-relative.
startNanosintegerExact signed start in nanoseconds, session-relative; authoritative over start where both are present.
endingNanosintegerExact signed end in nanoseconds, session-relative; authoritative over ending where both are present.
scoperefWhich medium, session clock, stream, and track this span is measured against. Absent means the single medium reachable from the annotated expression. Ref: #mediaScope

boundingBox

Type: Object

A spatial bounding box for image or video frame annotation.

FieldTypeDescription
xintegerX coordinate of top-left corner in pixels.
yintegerY coordinate of top-left corner in pixels.
widthintegerWidth in pixels.
heightintegerHeight in pixels.
unitUriat-uriAT-URI of the coordinate unit definition node (a unit typeDef under layers-core.ontology.layers.pub). Community-expandable via knowledge graph.
unitstringCoordinate unit slug (fallback when unitUri unavailable). Absent means pixel. Known values: pixel, per-mille-normalized
scoperefWhich medium, session clock, stream, and track this box is measured against. Absent means the single medium reachable from the annotated expression. Ref: #mediaScope
pageinteger0-indexed page this box lies on, for paged media.
frameIndexinteger0-indexed frame this box lies on, for framed media.
timeNanosintegerSigned time in nanoseconds, session-relative, at which this box applies.

spatioTemporalAnchor

Type: Object

Combined spatial and temporal anchor for video annotation with keyframe-based tracking.

FieldTypeDescription
temporalSpanrefRef: #temporalSpan
keyframesarrayKeyframes defining spatial positions at specific times. Array of ref: #keyframe
interpolationUriat-uriAT-URI of the interpolation mode definition node. Community-expandable via knowledge graph.
interpolationstringInterpolation mode slug (fallback when interpolationUri unavailable). Known values: linear, step, cubic

keyframe

Type: Object

A spatial annotation at a specific time point.

FieldTypeDescription
timeMsintegerTime in milliseconds.
bboxrefRef: #boundingBox
featuresrefPer-keyframe features (e.g., visibility, occlusion percentage, confidence, pose data). Ref: #featureMap

temporalEntity

Type: Object

A normalized temporal value representing a point, interval, duration, or uncertain range in calendar/clock time. Subsumes OWL-Time TemporalEntity (Instant, Interval, Duration) and TimeML TIMEX3 value. Consumers dispatch on which fields are populated: instant only (point), intervalStart+intervalEnd (bounded interval), duration only (pure duration), earliest+latest (uncertain bounds), recurrence (repeating pattern).

FieldTypeDescription
instantstringPoint in time as ISO 8601 datetime (e.g., 2024-03-15, 2024-03-15T14:30:00Z). Maps to OWL-Time Instant.
intervalStartstringInterval start as ISO 8601 datetime. Maps to OWL-Time hasBeginning.
intervalEndstringInterval end as ISO 8601 datetime. Maps to OWL-Time hasEnd.
durationstringISO 8601 duration (e.g., P3Y, PT2H30M, P1DT12H). Maps to OWL-Time hasTemporalDuration.
earlieststringLower bound for uncertain or vague times, as ISO 8601 datetime.
lateststringUpper bound for uncertain or vague times, as ISO 8601 datetime.
granularityUriat-uriAT-URI of the granularity definition node. Community-expandable.
granularitystringTemporal granularity. Maps to OWL-Time unitType. Known values: millennium, century, decade, year, quarter, month, week, day, hour, minute, second, millisecond, custom
calendarUriat-uriAT-URI of the calendar system definition node. Community-expandable.
calendarstringCalendar system. Maps to OWL-Time TRS. Known values: gregorian, julian, hijri, hebrew, iso-week, unix, japanese-imperial, buddhist, coptic, custom
recurrencestringISO 8601 repeating interval (e.g., R/P1W for weekly, R5/P1D for 5 daily repetitions).
featuresrefRef: #featureMap

temporalModifier

Type: Object

Qualitative modification of a temporal value. Subsumes TimeML TIMEX3 mod attribute.

FieldTypeDescription
modUriat-uriAT-URI of the temporal modifier definition node. Community-expandable.
modstringTemporal modifier. Maps to TimeML TIMEX3 mod. Known values: approximate, early, mid, late, start, end, before, after, on-or-before, on-or-after, less-than, more-than, custom
featuresrefRef: #featureMap

temporalExpression

Type: Object

A complete temporal annotation packaging the expression type, normalized value, modifier, anchoring, and document function. Subsumes the full TimeML TIMEX3 tag and OWL-Time GeneralDateTimeDescription. Attach to annotation objects via the temporal field.

FieldTypeDescription
typeUriat-uriAT-URI of the temporal expression type definition node. Community-expandable.
typestringTemporal expression type. Maps to TimeML TIMEX3 type. Known values: date, time, duration, set, interval, relative, custom
valuerefThe normalized temporal value. Ref: #temporalEntity
modifierrefQualitative modifier (approximate, early, late, etc.). Ref: #temporalModifier
anchorRefrefWhat this expression is relative to (document creation time, another temporal expression, a situation). Maps to TimeML anchorTimeID. Ref: #objectRef
functionUriat-uriAT-URI of the document function definition node. Community-expandable.
functionstringDocument function. Maps to TimeML functionInDocument. Known values: creation-time, publication-time, expiration-time, modification-time, release-time, reception-time, none, custom
featuresrefRef: #featureMap

spatialEntity

Type: Object

A normalized spatial value representing a point, region, line, or complex geometry. Parallel to temporalEntity. Subsumes GeoJSON geometry types, WKT primitives, and ISO 19107 spatial schema. Consumers dispatch on which fields are populated: bbox only (pixel bounding box), geometry+type (parsed geometry string), geometry+geometryFormat (format-specific parsing).

FieldTypeDescription
bboxrefStructured pixel bounding box (axis-aligned rectangle). The most common case for image/video annotation. Ref: #boundingBox
geometrystringGeometry as a string in the format specified by geometryFormat. WKT examples: POINT(37.7749 -122.4194), POLYGON((0 0, 100 0, 100 100, 0 100, 0 0)). Default format is WKT.
typeUriat-uriAT-URI of the geometry type definition node. Community-expandable.
typestringGeometry type slug for dispatch without parsing. Known values: point, box, polygon, multi-polygon, line-string, multi-line-string, circle, ellipse, multi-point, geometry-collection, custom
geometryFormatUriat-uriAT-URI of the geometry format definition node. Community-expandable.
geometryFormatstringFormat of the geometry string. Default is WKT. Known values: wkt, geojson, svg-path, coco-polygon, coco-rle, page-xml-coords, alto-polygon, custom
crsUriat-uriAT-URI of the coordinate reference system definition node. Community-expandable.
crsstringCoordinate reference system. Determines how coordinates in geometry/bbox are read. Known values: pixel, percentage, wgs84, web-mercator, per-mille-normalized, mni152-nlin-2009c, mni305, talairach, acpc, scanner-ras, fsaverage, individual-t1, voxel-index, world-metric, custom
dimensionsintegerNumber of coordinate dimensions (2 for planar, 3 for volumetric/elevation).
uncertaintystringSpatial precision or uncertainty radius as string with units (e.g., 50m, 10px, 0.001deg).
scoperefWhich medium, session clock, stream, and track this region is measured against. Absent means the single medium reachable from the annotated expression. Ref: #mediaScope
pageinteger0-indexed page this region lies on, for paged media.
frameIndexinteger0-indexed frame this region lies on, for framed media.
timeNanosintegerSigned time in nanoseconds, session-relative, at which this region applies.
readingOrderinteger0-indexed reading order of this region among sibling regions on the same page or surface.
roleUriat-uriAT-URI of the spatial-region role definition node (a role typeDef under layers-annotation.ontology.layers.pub). Community-expandable.
rolestringSpatial-region role slug (fallback when roleUri unavailable), naming what layout or anatomical part this region is. Known values: text-region, text-line, baseline, word, glyph, column, margin-note, figure, table, instance-mask, interest-area, articulator-contour, region-of-interest, custom
articulatorUriat-uriAT-URI of the articulator definition node (an articulator typeDef under layers-annotation.ontology.layers.pub). Community-expandable.
articulatorstringArticulator slug (fallback when articulatorUri unavailable), naming the body part this region tracks. Known values: dominant-hand, non-dominant-hand, both-hands, head, torso, face, eyebrows, mouth, eye-gaze, tongue, lips, jaw, velum, custom
maskMediaRefat-uriAT-URI of a pub.layers.media.media record carrying a pixel or voxel mask for this region.
parcelRefrefReference to an atlas parcel grounding this region (e.g., an Uberon or atlas node). Ref: #knowledgeRef
sensorsarraySensors whose positions define this region; each objectRef has recordRef the media record and objectId a sensorSpec uuid. Array of ref: #objectRef
featuresrefRef: #featureMap

This same type doubles as an anchor when it appears under anchor.spatialRegion: the alias keeps anchor-use distinct from the annotation.spatial content-use of the type. The stereotaxic crs values (mni152-nlin-2009c, talairach, scanner-ras, voxel-index, and the rest) and the articulator vocabulary are what let a single spatial type carry a brain parcel, a manuscript text-line, and a signing hand without a bespoke shape for each.

spatialModifier

Type: Object

Qualitative modification of a spatial value. Parallel to temporalModifier. Indicates precision, derivation method, or processing applied to a spatial entity.

FieldTypeDescription
modUriat-uriAT-URI of the spatial modifier definition node. Community-expandable.
modstringSpatial modifier. Known values: approximate, projected, interpolated, estimated, buffered, simplified, generalized, custom
featuresrefRef: #featureMap

spatialExpression

Type: Object

A complete spatial annotation packaging the expression type, normalized value, modifier, anchoring, and document function. Parallel to temporalExpression. Subsumes ISO-Space place annotations (ISO 24617-7), SpatialML PLACE elements, and general spatial semantic annotation. Attach to annotation objects via the spatial field.

FieldTypeDescription
typeUriat-uriAT-URI of the spatial expression type definition node. Community-expandable.
typestringSpatial expression type. Maps to ISO-Space spatial entity types. Known values: location, region, path, direction, distance, relative, custom
valuerefThe normalized spatial value. Ref: #spatialEntity
modifierrefQualitative modifier (approximate, projected, interpolated, etc.). Ref: #spatialModifier
anchorRefrefWhat this expression is relative to (a landmark, reference location, trajector). For relative spatial expressions. Ref: #objectRef
functionUriat-uriAT-URI of the document function definition node. Community-expandable.
functionstringDocument function. What role this place plays in the document. Known values: document-location, publication-location, situation-location, origin, destination, waypoint, none, custom
featuresrefRef: #featureMap

pageAnchor

Type: Object

Anchor to a specific page and region in a paged document (PDF, etc.). Compatible with page-level annotation models used by publication platforms.

FieldTypeDescription
pageinteger0-indexed page number.
boundingBoxrefRef: #boundingBox
textSpanrefCharacter offsets within the page text. Ref: #span

textQuoteSelector

Type: Object

W3C TextQuoteSelector: select text by quoting it with surrounding context. Compatible with at.margin.annotation and the W3C Web Annotation Data Model.

FieldTypeDescription
exactstringThe exact text to match.
prefixstringText immediately before the selection.
suffixstringText immediately after the selection.

textPositionSelector

Type: Object

W3C TextPositionSelector: select by UTF-8 byte offsets. Semantically equivalent to pub.layers.defs#span but named for W3C compatibility with at.margin.

FieldTypeDescription
byteStartintegerStarting byte position (0-indexed, inclusive).
byteEndintegerEnding byte position (exclusive).
charStartintegerOptional starting character position (0-indexed, inclusive).
charEndintegerOptional ending character position (exclusive).

fragmentSelector

Type: Object

W3C FragmentSelector: select by URI fragment identifier.

FieldTypeDescription
valuestringFragment identifier value.
conformsTouriSpecification the fragment conforms to.

externalTarget

Type: Object

Target for annotating external resources (web pages, documents, etc.). Compatible with at.margin's target model and the W3C Web Annotation Data Model.

FieldTypeDescription
sourceuriThe URI of the external resource being annotated.
sourceHashstringSHA256 hash of normalized URI for indexing.
titlestringTitle of the resource at annotation time.
selectorunionW3C selector for identifying the specific segment within the resource. Union of refs: #textQuoteSelector, #textPositionSelector, #fragmentSelector

anchor

Type: Object

Abstract anchor: how an annotation attaches to its source data. This is a polymorphic type; at least one anchoring field should be present. Consumers dispatch on which field(s) are populated. The union carries ten members: textSpan, tokenRef, tokenRefSequence, temporalSpan, spatioTemporalAnchor, pageAnchor, externalTarget, boundingBox, spatialRegion, and signalSpan.

FieldTypeDescription
textSpanrefCharacter-offset span in the expression text. Ref: #span
tokenRefrefSingle token reference. Ref: #tokenRef
tokenRefSequencerefSequence of token references (possibly non-contiguous). Ref: #tokenRefSequence
temporalSpanrefTemporal span in audio/video. Ref: #temporalSpan
spatioTemporalAnchorrefSpatio-temporal region in video. Ref: #spatioTemporalAnchor
pageAnchorrefPage and region in a paged document. Ref: #pageAnchor
externalTargetrefExternal resource target (web page, document, etc.). Ref: #externalTarget
boundingBoxrefStatic spatial region in an image or single frame. Imposes no temporal span; for a region that tracks over time use spatioTemporalAnchor. Ref: #boundingBox
spatialRegionrefNormalized spatial region used as an anchor (aliased so anchor-use is distinct from the annotation.spatial content-use of the same type). Ref: #spatialEntity
signalSpanrefSample-indexed or time-indexed span over one or more channels of a continuous signal (EEG, MEG, audio waveform, sensor stream, etc.). Ref: #signalSpan

The boundingBox, spatialRegion, and signalSpan members are additive to a writer (the union has no required array) but a silent drop to a reader that has not learned them. Any consumer that dispatches by hand over the anchor union must handle cases for boundingBox, spatialRegion, and signalSpan; the two hand-written dispatch sites in the reference stack are lairs/media/anchors.py and web/components/annotations/registry.tsx.

mediaScope

Type: Object

Which medium, session clock, stream, and track a temporal, spatial, or signal anchor is measured against. Absent scope on any anchor means the single medium reachable from the annotated expression, which is the single-stream reading of a record with no scope. Present scope is what makes an anchor address one stream of a synchronized, multi-stream acquisition session.

FieldTypeDescription
mediaRefat-uriAT-URI of the pub.layers.media.media record this anchor addresses.
mediaCidcidCID pinning the exact version of the media record.
sessionRefat-uriAT-URI of the pub.layers.acquisition.session whose clock the sample and nanosecond times are on.
streamrefThe session stream this anchor is on; recordRef is the sessionRef and objectId is the stream uuid (acquisition.defs#stream). Ref: #objectRef
trackIndexinteger0-indexed track within the medium (e.g., an audio track or a subtitle track).

frequencyBand

Type: Object

A frequency band selected by a signal anchor, for time-frequency annotation of neural and physiological data.

FieldTypeDescription
bandUriat-uriAT-URI of the frequency band definition node. Community-expandable via knowledge graph.
bandstringFrequency band slug (fallback when bandUri unavailable). Known values: delta, theta, alpha, mu, beta, low-gamma, high-gamma, ripple, broadband, f0, f1, f2, f3, f4, custom
lowMilliHzintegerLower bound of the band in millihertz.
highMilliHzintegerUpper bound of the band in millihertz.

signalSpan

Type: Object

A sample-indexed or time-indexed span over one or more channels of a continuous signal: EEG, MEG, iEEG, an audio waveform, an fNIRS stream, an fMRI run, a sensor trace. An unscoped sample index is meaningless, so scope is required. startSample and endSample are signed (a span may precede the clock origin); startNanos/endingNanos carry the session-relative clock time, and startSample wins where both a sample and a nanosecond start are present. Channels and sensors are addressed by objectRef into the media record's signalChannel/sensorSpec uuids, which is why those carry a required uuid.

FieldTypeDescription
scoperefWhich medium, session clock, stream, and track the sample and nanosecond indices are measured against. Required. Ref: #mediaScope
startSampleintegerInclusive 0-indexed start sample, signed (may precede the clock origin).
endSampleintegerExclusive end sample, signed.
startNanosintegerSigned start on the stream or session clock, session-relative and never UTC-epoch. Authoritative when startSample is absent; startSample wins where both are present.
endingNanosintegerSigned end on the stream or session clock, session-relative.
channelsarrayChannels this span covers; each objectRef has recordRef the media record and objectId a signalChannel uuid. Empty or absent means all channels. Array of ref: #objectRef
channelNamesarrayAdvisory channel-name fallback; channels wins where both are present. Array of string.
sensorsarraySensors this span covers; each objectRef has recordRef the media record and objectId a sensorSpec uuid. Array of ref: #objectRef
frequencyBandrefFrequency band this span selects, for time-frequency annotation. Ref: #frequencyBand
volumeIndexStartintegerInclusive 0-indexed start volume, for volumetric time series (e.g., fMRI runs).
volumeIndexEndintegerExclusive end volume, for volumetric time series.
epochIndexinteger0-indexed epoch within an epoched signal.
regionrefSpatial region this span applies to, reusing the promoted spatial anchor (no separate voxel-region type is introduced). Ref: #spatialEntity

Type: Object

A single link in an alignment between two parallel sequences. Maps element(s) in a source sequence to element(s) in a target sequence. Supports many-to-many correspondence for interlinear glossing, parallel text alignment, cross-tokenization mapping, etc.

FieldTypeDescription
sourceIndicesarrayIndices into the source sequence. Array of integers
targetIndicesarrayIndices into the target sequence. Array of integers
confidenceintegerAlignment confidence 0-1000.
labelstringOptional label for the alignment link (e.g., alignment type).
knowledgeRefsarrayKnowledge graph references for this link. Array of ref: #knowledgeRef
featuresrefRef: #featureMap

agentRef

Type: Object

A composable reference to any agent (human annotator, ML model, crowd worker, expert panel, etc.) that produced data. Separates the identity of the producer from the interpretive framework (persona) and the software used (tool).

FieldTypeDescription
diddidATProto DID of the agent, if the agent has one.
idstringArbitrary string identifier (anonymized crowdworker ID, platform username, model version string, etc.).
namestringHuman-readable display name for the agent.
knowledgeRefrefExternal knowledge graph reference for the agent (e.g., ORCID for a human, HuggingFace model card for an ML model, Wikidata for an organization). Ref: #knowledgeRef

annotationMetadata

Type: Object

Metadata about who or what produced an annotation, when, and with what confidence. The three key provenance fields are: agent (who did it), personaRef (under what framework), and tool (with what software).

FieldTypeDescription
agentrefThe agent (human or model) that produced this annotation. Distinct from personaRef (the interpretive framework) and tool (the software). Ref: #agentRef
toolstringName or identifier of the software tool used to produce this annotation (e.g., 'spaCy 3.7', 'brat 1.3', 'ELAN 6.4'). Distinct from agent (who ran the tool). Display fallback when toolRef is unavailable. Required.
toolRefrefGrounded reference to the software tool, typically via rrid (a Research Resource Identifier). Distinct from agent (who ran the tool). Ref: #knowledgeRef
timestampdatetimeWhen the annotation was produced.
confidenceintegerConfidence score scaled 0-1000. 1000 = maximum confidence.
personaRefat-uriReference to the persona/annotation framework under which this annotation was produced.
contentDigestrefStructured content hash for integrity verification of this annotation. Ref: #contentDigest
dependenciesarrayReferences to upstream records this annotation was derived from (provenance chain). Array of ref: #objectRef

The content digest is a structured contentDigest object ({algorithmUri?, algorithm, value}), so a verifier dispatches on algorithm without string-splitting.

licenseRef

Type: Object

Detail for a single license. Follows the URI+slug pattern (spdxUri is the canonical knowledge-graph node, spdx is the human-readable fallback) and mirrors one entry of a DataCite rightsList (rightsIdentifier + rightsURI).

FieldTypeDescription
spdxUriat-uriAT-URI of the license definition node. Community-expandable via knowledge graph.
spdxstringSPDX license identifier (fallback when spdxUri unavailable). Non-SPDX terms use proprietary or custom and ground the full text via spdxUri/url. Known values: CC0-1.0, CC-BY-4.0, CC-BY-SA-4.0, CC-BY-NC-4.0, CC-BY-NC-SA-4.0, CC-BY-ND-4.0, CC-BY-NC-ND-4.0, MIT, Apache-2.0, BSD-3-Clause, GPL-3.0-only, LGPL-3.0-only, LDC-User-Agreement, ELRA-END-USER, proprietary, custom
namestringHuman-readable license name (e.g., 'Creative Commons Attribution 4.0 International').
urluriURL of the full license text (DataCite rightsURI).
attributionstringRequired attribution / credit text for downstream users.
notesstringAdditional licensing notes, restrictions, or usage terms.
appliesToUriat-uriAT-URI of the license-component definition node (a license-component typeDef under layers-core.ontology.layers.pub). Community-expandable.
appliesTostringComponent this license covers when an artifact mixes licenses by part (fallback when appliesToUri unavailable). Omit when the license covers the whole artifact. Known values: whole, annotations, underlying-text, underlying-media, code, documentation, ontology, derived-data, custom

licensing

Type: Object

Complete licensing terms for a released artifact. Represents single, dual/multi (choose-one), composite (all-apply), exception (WITH), and component-scoped licensing. The SPDX license expression encodes the boolean relationship between licenses; the licenses array carries per-license detail. Mirrors a DataCite rightsList.

FieldTypeDescription
expressionstringSPDX license expression encoding the relationship between licenses: OR for dual/multi-licensing (the licensee chooses one), AND for composite terms (all apply), WITH for exceptions. Examples: MIT OR Apache-2.0, CC-BY-4.0 AND LicenseRef-LDC-User-Agreement. Optional when a single license applies.
licensesarrayThe individual licenses named by the expression, or the single governing license. Each entry may scope itself to a component via appliesTo. Array of ref: #licenseRef

reproducibilityInfo

Type: Object

Information about how to reproduce a dataset or the data produced from an eprint. Shared by data-producing produces (corpus, annotation layers, experiments, catalog collections, acquisition sessions) and eprint data links.

FieldTypeDescription
codeUriuriURI of the code repository.
commitHashstringGit commit hash for reproducibility.
commandstringCommand to reproduce the data.
environmentstringEnvironment specification (Docker image, conda env, etc.).
randomSeedintegerRandom seed used.
namestringHuman-readable name of the pipeline, model, or procedure that produced the data.
versionstringVersion string of the pipeline, model, or procedure.
softwareRefsarrayGrounded references to the software used, typically via rrid (Research Resource Identifiers). Array of ref: #knowledgeRef
operatingSystemstringOperating system the procedure ran on.
containerobjectThe container or environment image the procedure ran in: typeUri (at-uri); type (known values docker, singularity, apptainer, podman, conda, nix, custom); tag; uri; digest (ref #contentDigest).
fundingarrayGrants or awards that funded the work producing this data. Array of ref: #fundingRef
ethicsApprovalsarrayEthics or IRB approvals covering the work producing this data. Array of ref: #ethicsApproval

knowledgeRef

Type: Object

A reference to an external knowledge base entry. Supports ATProto-native knowledge bases (e.g., chive.pub, with AT-URI nodes), non-ATProto knowledge bases (e.g., Wikidata, FrameNet), and user/persona-specific knowledge bases in user PDSes.

FieldTypeDescription
sourceUriat-uriAT-URI of the knowledge base type definition node. Community-expandable via knowledge graph.
sourcestringKnowledge base source slug (fallback when sourceUri unavailable). Known values: chive.pub, wikidata, wordnet, framenet, propbank, verbnet, unimorph, glottolog, cldr, iso639-3, orcid, ror, openalex, crossref, dblp, semantic-scholar, doi, handle, islrn, datacite, ldc, elra, lindat, openneuro, dandi, paradisec, talkbank, ncbi-taxonomy, rrid, cognitive-atlas, cogpo, hed, uberon, mesh, clinicaltrials, custom
identifierstringThe identifier within the knowledge base (e.g., Wikidata QID, chive.pub node URI, Glottolog languoid ID).
uriuriOptional full URI for the knowledge base entry.
labelstringHuman-readable label for the referenced entity.

contentDigest

Type: Object

A structured content hash for integrity verification. The algorithm and the value are separate fields, so a verifier dispatches on algorithm without string-splitting, and media.media.contentDigest can hash externally hosted bytes the record CID does not cover.

FieldTypeDescription
algorithmUriat-uriAT-URI of the digest algorithm definition node. Community-expandable via knowledge graph.
algorithmstringDigest algorithm slug (fallback when algorithmUri unavailable). Known values: sha256, sha512, blake3, md5, custom
valuestringThe digest as lowercase hexadecimal.

Required: algorithm, value.

fundingRef

Type: Object

A grant or award that funded a piece of work. A shared def (not inlined) so acquisition sessions and reproducibilityInfo reuse one shape. The funding body grounds through knowledgeRef rather than a free-text name.

FieldTypeDescription
awardIdstringGrant or award number.
titlestringTitle of the grant or award.
funderRefrefThe funding body, grounded via ror or the Crossref Funder Registry. Ref: #knowledgeRef
uriuriURI of the award record.

Required: awardId.

ethicsApproval

Type: Object

A human-subjects or animal-care approval. A shared def (not inlined) reused by acquisition.defs#consent, acquisition.session, and reproducibilityInfo. The approving board grounds through knowledgeRef.

FieldTypeDescription
protocolIdstringProtocol or approval number.
bodyRefrefThe approving board, grounded via ror; clinicaltrials for a registered trial. Ref: #knowledgeRef
bodyNamestringAdvisory name of the approving board; bodyRef wins where both are present.
approvedAtdatetimeWhen the approval was granted.
expiresAtdatetimeWhen the approval expires.
uriuriURI of the approval record.

Required: protocolId.

languageRef

Type: Object

A structured language reference: the richer companion to a bare BCP-47 tag in a languages array. Present when a tag alone cannot name the variety (a sub-language variety, a Glottolog languoid, a per-language role in a parallel or bilingual collection). The required key is tag, the canonical BCP-47 tag using the shortest ISO 639 code; importers must normalize on write. Each entry's tag should also appear in the record's languages array so consumers filtering on the cheap array are not silently excluded.

FieldTypeDescription
tagstringCanonical BCP-47 tag using the shortest ISO 639 code (en not eng, fi not fin, poma for Pomak). Importers must normalize on write.
languageUriat-uriAT-URI of the language definition node. Community-expandable via knowledge graph.
knowledgeRefrefGrounding of the language, with source glottolog, iso639-3, or cldr. Ref: #knowledgeRef
scriptCodestringISO 15924 script code.
regionCodestringISO 3166-1 or UN M.49 region code.
varietyLabelstringProse residue naming the variety after every code applies.
roleUriat-uriAT-URI of the language-role definition node (a language-role typeDef under layers-core.ontology.layers.pub). Community-expandable.
rolestringLanguage-role slug (fallback when roleUri unavailable), naming the role this language plays in the record. Known values: primary, source, target, metalanguage, gloss, translation, contact, l1, l2, heritage, simultaneous-bilingual, signed-l1, signed-l2, custom

Required: tag.

featureMap

Type: Object

An open-ended set of typed key-value features that can be attached to any annotation. Provides maximum extensibility without committing to any label set or linguistic theory.

FieldTypeDescription
entriesarrayThe feature entries. Array of ref: #feature

feature

Type: Object

A single key-value feature.

FieldTypeDescription
keystringFeature name/key.
valuestringFeature value as string. Consumers may parse typed values based on the key's semantics.

constraint

Type: Object

An abstract constraint expression. Used for type constraints on role slots, slot-level constraints in templates, cross-slot agreement constraints, and any other declarative restriction. The expression field holds a DSL string whose format is identified by expressionFormat/expressionFormatUri.

FieldTypeDescription
expressionstringThe constraint expression (e.g., 'self.pos == "VERB"', 'subject.features.number == verb.features.number').
expressionFormatUriat-uriAT-URI of the expression format definition node. Community-expandable via knowledge graph.
expressionFormatstringExpression format slug (fallback when expressionFormatUri unavailable). Known values: python-expr, json-logic, regex, sparql-filter, type-ref, custom
scopeUriat-uriAT-URI of the scope definition node. Community-expandable via knowledge graph.
scopestringConstraint scope slug (fallback when scopeUri unavailable). Known values: slot, template, cross-template, global
contextarrayNames of the slots or variables this constraint ranges over (for cross-slot and cross-template constraints). Array of strings
descriptionstringHuman-readable description of the constraint.

objectRef

Type: Object

A composable reference to any Layers object, whether local (same record, by UUID), remote (different record, by AT-URI + optional object UUID), or external (knowledge graph entry). This is the universal cross-referencing primitive; consumers dispatch on which field(s) are populated.

FieldTypeDescription
localIdrefUUID of an object within the same record. Ref: #uuid
recordRefat-uriAT-URI of a Layers record in another user's PDS or another record in the same PDS.
objectIdrefUUID of a specific object within the record referenced by recordRef. Ref: #uuid
knowledgeRefrefReference to an external knowledge graph node (Wikidata, chive.pub, FrameNet, etc.). Ref: #knowledgeRef

accessCondition

NSID: pub.layers.defs#accessCondition Type: Object

Conditions under which data may be obtained. Required: mode. Distinct from licensing (what a recipient may do) and consent (the person the data came from); all three must hold. Reused by participant.access, session.access, and media.media.access.

FieldTypeDescription
modeUri / modeat-uri / stringAccess mode. Known values: open, registration-required, agreement-required, restricted, embargoed, closed.
gatekeeperRefrefThe body that grants access, grounded via ror or wikidata. Ref: pub.layers.defs#knowledgeRef.
applicationUriuriURL of the access application or registration form.
agreementUriuriThe data use agreement or end-user licence that must be signed.
embargoedUntildatetimeWhen an embargo lifts, when mode is embargoed.
permittedUseUri / permittedUseat-uri / stringWhat the access grant permits, distinct from the licence. Known values: any, research-only, non-commercial, no-redistribution, no-model-training, custom.
notesstringFree-text access detail.

deviceInfo

NSID: pub.layers.defs#deviceInfo Type: Object

Acquisition or presentation hardware, structured rather than a free-text device string. Required: kind. Manufacturer and product ground through knowledgeRef (no vendor enum): MEGIN, Elekta, and Elekta/MEGIN are one organization and must facet as one.

FieldTypeDescription
kindUri / kindat-uri / stringDevice kind. Must resolve into the same modality node set as recordingMethod.methodUri where the two overlap. Known values include microphone, camera, scanner, eeg-amplifier, meg-scanner, mri-scanner, fnirs-system, eye-tracker, motion-capture-system, articulograph, button-box, custom.
manufacturerRefrefManufacturer, grounded via ror or wikidata. Ref: pub.layers.defs#knowledgeRef
manufacturerNamestringDisplay name when no identifier exists. Advisory; manufacturerRef wins.
productRefrefThe product, grounded via rrid where one exists. Ref: pub.layers.defs#knowledgeRef
modelstringBIDS ManufacturersModelName.
serialNumberstringBIDS DeviceSerialNumber. A de-anonymizing quasi-identifier in a single-site study; omit when identifiability is anonymous.
softwarerefAcquisition or presentation software. BIDS SoftwareVersions/GeneratedBy. Ref: pub.layers.defs#reproducibilityInfo
featuresrefOpen-ended device features. Ref: pub.layers.defs#featureMap