Skip to main content

Lexicons reference

Chive uses the pub.chive.* namespace for all AT Protocol lexicons. These lexicons define 17 record types, 81 queries, and 32 procedures across 20 namespaces. All records are stored in user-controlled PDSes and indexed by the Chive AppView via the ATProto firehose.

For the ATProto lexicon specification, see the Lexicon Guide.

Namespace overview

NamespacePurpose
pub.chive.activity.*Activity feed and correlation metrics
pub.chive.actor.*User profiles and autocomplete
pub.chive.alpha.*Alpha program enrollment
pub.chive.annotation.*Inline text annotations and entity links
pub.chive.author.*Author profiles and search
pub.chive.backlink.*Cross-reference backlinks
pub.chive.claiming.*Eprint ownership claiming and coauthorship
pub.chive.defsShared enum definitions
pub.chive.discovery.*Recommendations and citation networks
pub.chive.endorsement.*Endorsement aggregation queries
pub.chive.eprint.*Eprint submissions, versions, and changelogs
pub.chive.governance.*Community governance and editor management
pub.chive.graph.*Knowledge graph nodes, edges, and proposals
pub.chive.import.*External eprint import
pub.chive.metrics.*View counts, downloads, and trending
pub.chive.notification.*Review and endorsement notifications
pub.chive.review.*Document-level reviews and entity links
pub.chive.richtext.*Shared rich text definitions and facets
pub.chive.sync.*PDS synchronization and staleness checking
pub.chive.tag.*User-generated tags and tag search

Shared definitions (pub.chive.defs)

Reusable enum types referenced by multiple lexicons. All use knownValues (open enums) for forward compatibility.

documentFormat

Document format slug for uploaded manuscripts.

type DocumentFormat =
| 'pdf'
| 'docx'
| 'html'
| 'markdown'
| 'latex'
| 'jupyter'
| 'odt'
| 'rtf'
| 'epub'
| 'txt'
| (string & {});

publicationStatus

Publication lifecycle stage.

type PublicationStatus =
| 'eprint'
| 'preprint'
| 'under_review'
| 'revision_requested'
| 'accepted'
| 'in_press'
| 'published'
| 'retracted'
| 'withdrawn'
| (string & {});

supplementaryCategory

Category for supplementary materials.

type SupplementaryCategory =
| 'appendix'
| 'figure'
| 'table'
| 'dataset'
| 'code'
| 'notebook'
| 'video'
| 'audio'
| 'presentation'
| 'protocol'
| 'questionnaire'
| 'other'
| (string & {});

Rich text system

Chive uses a unified rich text system for titles, abstracts, review comments, and annotation bodies. Rich text is represented as arrays of typed items, enabling structured content with formatting, entity references, and embedded elements.

Design principles

  1. Typed items: Each element in a rich text array has a type field discriminator
  2. Faceted formatting: Within textItem, ATProto-style facets mark byte ranges for bold, italic, code, and LaTeX
  3. Entity references: Inline references to knowledge graph nodes, Wikidata entities, eprints, and authors
  4. Plain text fallback: All rich text fields have a companion plain text field for search indexing

pub.chive.richtext.defs

Shared definitions for the unified rich text system. These types are referenced by pub.chive.eprint.submission, pub.chive.review.comment, and pub.chive.annotation.comment.

richText

The top-level rich text structure with both a plain text representation and an array of typed items.

interface RichText {
text: string; // Plain text for search/accessibility, max 100000 chars
items: RichTextItem[]; // Array of typed items for rendering, max 10000
html?: string; // Optional pre-rendered HTML, max 200000 chars
}

pub.chive.richtext.facets

Facet feature types for byte-range formatting within textItem content. Facets use byte positions (not character positions) for correct Unicode handling.

Bold, Italic, Strikethrough, Code

Marker-only facets with no additional properties.

interface BoldFacet {
$type: 'pub.chive.richtext.facets#bold';
}

interface ItalicFacet {
$type: 'pub.chive.richtext.facets#italic';
}

interface StrikethroughFacet {
$type: 'pub.chive.richtext.facets#strikethrough';
}

interface CodeFacet {
$type: 'pub.chive.richtext.facets#code';
}

Latex facet

interface LatexFacet {
$type: 'pub.chive.richtext.facets#latex';
displayMode: boolean; // true for display mode ($$...$$), false for inline ($...$)
}

Heading facet

interface HeadingFacet {
$type: 'pub.chive.richtext.facets#heading';
level: number; // 1 to 6
}

Blockquote facet

interface BlockquoteFacet {
$type: 'pub.chive.richtext.facets#blockquote';
}

CodeBlock facet

interface CodeBlockFacet {
$type: 'pub.chive.richtext.facets#codeBlock';
language?: string; // programming language for syntax highlighting
}

ListItem facet

interface ListItemFacet {
$type: 'pub.chive.richtext.facets#listItem';
listType: 'bullet' | 'ordered' | (string & {});
depth?: number; // nesting depth, 0-indexed
ordinal?: number; // item number for ordered lists
}

Reuses the Bluesky link facet type.

interface LinkFacet {
$type: 'app.bsky.richtext.facet#link';
uri: string;
}

Rich text item types

All rich text items share a common structure: a type discriminator field and type-specific properties.

textItem

Plain text content with optional ATProto-style facets for inline formatting.

interface TextItem {
type: 'text';
content: string; // Text content, max 100000 chars / 50000 graphemes
format?: TextFormat; // Optional formatting flags
}

interface TextFormat {
bold?: boolean;
italic?: boolean;
strikethrough?: boolean;
code?: boolean; // Inline code
}

mentionItem

ATProto mention (@handle) for referencing users.

interface MentionItem {
type: 'mention';
did: string; // User DID (required)
handle?: string; // Handle for display
displayName?: string; // Display name, max 256 chars / 64 graphemes
}

linkItem

URL hyperlink with optional display label.

interface LinkItem {
type: 'link';
url: string; // URL (required)
label?: string; // Display text, max 1000 chars / 500 graphemes
}

tagItem

Hashtag reference.

interface TagItem {
type: 'tag';
tag: string; // Tag value without # prefix, max 256 chars / 64 graphemes
}

nodeRefItem

Reference to a knowledge graph node. Used for linking to fields, institutions, concepts, or other graph entities.

interface NodeRefItem {
type: 'nodeRef';
uri: string; // AT-URI of the node (required)
label: string; // Display label (required), max 256 chars / 64 graphemes
subkind?: string; // Node subkind for styling (field, institution, person, etc.)
}

wikidataRefItem

Reference to a Wikidata entity for linking to external knowledge bases.

interface WikidataRefItem {
type: 'wikidataRef';
qid: string; // Wikidata QID, e.g., "Q123456" (required)
label: string; // Display label (required), max 256 chars / 64 graphemes
url?: string; // Optional direct URL override
}

fieldRefItem

Reference to an academic field node. Specialized form of nodeRefItem for field classification.

interface FieldRefItem {
type: 'fieldRef';
uri: string; // AT-URI of field node (required)
label: string; // Display label (required), max 256 chars / 64 graphemes
}

facetRefItem

Reference to a facet classification node (PMEST framework dimensions).

interface FacetRefItem {
type: 'facetRef';
dimension: string; // Facet dimension (e.g., "time", "space"), max 64 chars
value: string; // Facet value, max 256 chars / 64 graphemes
}

eprintRefItem

Reference to another eprint for cross-referencing related work.

interface EprintRefItem {
type: 'eprintRef';
uri: string; // AT-URI of the eprint (required)
title: string; // Eprint title (required), max 1000 chars / 300 graphemes
}

annotationRefItem

Reference to an annotation or review comment.

interface AnnotationRefItem {
type: 'annotationRef';
uri: string; // AT-URI of the annotation (required)
excerpt: string; // Text excerpt for preview (required), max 500 chars / 200 graphemes
}

authorRefItem

Reference to an author by their DID.

interface AuthorRefItem {
type: 'authorRef';
did: string; // Author DID (required)
displayName?: string; // Display name, max 256 chars / 64 graphemes
handle?: string; // Author handle
}

latexItem

LaTeX math expression for inline or display math.

interface LatexItem {
type: 'latex';
content: string; // LaTeX source (required), max 10000 chars
displayMode: boolean; // true for display/block ($$...$$), false for inline ($...$)
}

codeItem

Code content, either inline or as a block. Defined in pub.chive.richtext.defs.

interface CodeItem {
type: 'code';
content: string; // Code content (required), max 50000 chars
language?: string; // Programming language for syntax highlighting, max 50 chars
block?: boolean; // true for code block, false for inline code
}

Block-level items

These item types create block-level structure within abstracts, reviews, and annotations.

headingItem

Section heading for structured documents.

interface HeadingItem {
type: 'heading';
content: string; // Heading text (required), max 500 chars
level: number; // Heading level 1-6 (required)
}

listItem

List item for bullet or ordered lists.

interface ListItem {
type: 'listItem';
content: string; // Item text (required), max 2000 chars
listType: string; // "bullet" or "ordered" (required)
depth?: number; // Nesting depth 0-5
ordinal?: number; // Number for ordered lists (1+)
}

blockquoteItem

Block quotation.

interface BlockquoteItem {
type: 'blockquote';
content: string; // Quoted text (required), max 5000 chars
}

codeBlockItem

Fenced code block with optional language hint. Used in review and annotation bodies (distinct from codeItem in richtext.defs).

interface CodeBlockItem {
type: 'codeBlock';
content: string; // Code content (required), max 50000 chars
language?: string; // Language for syntax highlighting, max 50 chars
}

Facet system

Within textItem, ATProto-style facets apply formatting to byte ranges. Facets use byte positions (not character positions) for correct Unicode handling.

byteSlice

Byte range for facet positioning.

interface ByteSlice {
byteStart: number; // Start byte position, inclusive (0+)
byteEnd: number; // End byte position, exclusive (0+)
}

Facet structure

Each facet contains an index (byte range) and an array of features to apply.

interface Facet {
index: ByteSlice;
features: FacetFeature[];
}

Supported facet features: bold, italic, strikethrough, code, latex, link, heading, blockquote, codeBlock, listItem.

Rich text usage by lexicon

LexiconFieldAllowed item types
pub.chive.eprint.submissiontitleRichtextItem, nodeRefItem, wikidataRefItem, fieldRefItem, latexItem, mentionItem, linkItem
pub.chive.eprint.submissionabstractAll item types including block-level (headingItem, listItem, blockquoteItem, codeBlockItem)
pub.chive.review.commentbodyAll 16 item types including block-level
pub.chive.annotation.commentbodyAll 16 item types including block-level

Eprint lexicons

pub.chive.eprint.submission

Core eprint record with rich text support for titles and abstracts.

{
"$type": "pub.chive.eprint.submission",
"title": string, // Required, plain text title, max 500 chars
"titleRich": TitleRichItem[], // Optional, rich title with LaTeX/refs, max 50 items
"abstract": AbstractItem[], // Required, rich abstract, max 500 items
"abstractPlainText": string, // Auto-generated for search indexing, max 10000 chars
"document": BlobRef, // Required, manuscript (PDF, DOCX, LaTeX, etc.)
"documentFormatSlug": string, // Detected format (pdf, docx, latex, etc.)
"authors": AuthorContribution[], // Required, 1-100 authors
"submittedBy": string, // Required, DID of submitter
"paperDid": string, // Optional, DID of paper account (paper-centric model)
"licenseSlug": string, // Required, SPDX identifier
"keywords": string[], // Optional, max 20 keywords
"fieldUris": string[], // Optional, AT-URIs to field nodes, max 10
"topicUris": string[], // Optional, AT-URIs to topic nodes, max 20
"facetUris": string[], // Optional, AT-URIs to facet nodes, max 30
"supplementaryMaterials": SupplementaryItem[], // Optional, max 50
"version": SemanticVersion, // Semantic version object
"previousVersion": string, // AT-URI to previous version
"createdAt": string // Required, ISO 8601
}

Title rich text types:

The titleRich field accepts a subset of rich text items suitable for titles:

  • textItem: Plain text with facets
  • nodeRefItem: Knowledge graph node reference
  • wikidataRefItem: Wikidata entity reference
  • fieldRefItem: Academic field reference
  • latexItem: Math expressions (common in scientific titles)
  • mentionItem: User mention
  • linkItem: URL hyperlink

Abstract rich text types:

The abstract field accepts all rich text item types:

  • All title types plus:
  • facetRefItem: Facet classification reference
  • eprintRefItem: Cross-reference to another eprint
  • annotationRefItem: Reference to an annotation
  • authorRefItem: Author reference
  • tagItem: Hashtag
  • codeBlockItem: Fenced code blocks
  • headingItem: Section headings
  • listItem: Bullet/ordered list items
  • blockquoteItem: Block quotations

SemanticVersion type:

interface SemanticVersion {
major: number; // Major version (1+), fundamental revisions
minor: number; // Minor version (0+), new content/additions
patch: number; // Patch version (0+), corrections/fixes
prerelease?: string; // Optional prerelease tag (e.g., "draft", "rc1")
}

See lexicons/pub/chive/eprint/submission.json for the complete schema.

pub.chive.eprint.changelog

Structured changelog entry for eprint version updates.

{
"$type": "pub.chive.eprint.changelog",
"eprintUri": string, // Required, AT-URI of the eprint
"version": SemanticVersion, // Required, version this changelog describes
"previousVersion": SemanticVersion, // Optional, previous version
"summary": string, // Optional, one-line summary, max 500 chars
"sections": ChangelogSection[], // Required, structured changes, max 20
"reviewerResponse": string, // Optional, response to peer review, max 10000 chars
"createdAt": string // Required, ISO 8601
}

ChangelogSection type:

interface ChangelogSection {
category: string; // Category (kebab-case)
items: ChangeItem[]; // Change items, max 50
}

interface ChangeItem {
description: string; // Required, max 2000 chars
changeType?: string; // "added" | "changed" | "removed" | "fixed" | "deprecated"
location?: string; // Document location, max 100 chars
reviewReference?: string; // Reviewer comment reference, max 200 chars
}

Changelog categories:

CategoryDescription
methodologyChanges to research methods
resultsNew or updated results
analysisData analysis changes
discussionDiscussion section updates
conclusionsConclusion changes
dataData updates or corrections
figuresFigure changes
tablesTable changes
referencesBibliography updates
supplementary-materialsSupplementary file updates
correctionsError corrections
formattingLayout/formatting changes
language-editingGrammar/style improvements
acknowledgmentsAcknowledgment updates
authorshipAuthor list changes
otherOther changes

pub.chive.eprint.version

Version metadata record linking an eprint to its version history.

{
"$type": "pub.chive.eprint.version",
"eprintUri": string, // Required, AT-URI of the eprint
"versionNumber": number, // Required, integer >= 1
"previousVersionUri": string, // Optional, AT-URI of previous version record
"changes": string, // Required, description of changes, max 2000 chars
"createdAt": string // Required, ISO 8601
}

pub.chive.eprint.userTag

User-contributed tag on an eprint.

{
"$type": "pub.chive.eprint.userTag",
"subject": StrongRef, // Reference to eprint
"tag": string, // Tag text, max 50 chars
"createdAt": string
}

Eprint queries and procedures

LexiconTypeDescription
pub.chive.eprint.getSubmissionQueryGet a single eprint by URI
pub.chive.eprint.searchSubmissionsQueryFull-text search across eprints
pub.chive.eprint.listByAuthorQueryList eprints by a specific author DID
pub.chive.eprint.getChangelogQueryGet a single changelog entry
pub.chive.eprint.listChangelogsQueryList changelogs for an eprint
pub.chive.eprint.updateSubmissionProcedureAuthorize and prepare an eprint update
pub.chive.eprint.deleteSubmissionProcedureAuthorize an eprint deletion

See XRPC endpoints for parameter and response details.

Annotation lexicons

Annotations target specific text spans within eprint documents. They implement W3C Web Annotation selectors for text targeting with ATProto-native storage.

pub.chive.annotation.comment

Inline annotation on a specific text span in an eprint. For document-level comments, use pub.chive.review.comment instead.

{
"$type": "pub.chive.annotation.comment",
"eprintUri": string, // Required, AT-URI of annotated eprint
"body": BodyItem[], // Required, rich text body, max 500 items
"target": TextSpanTarget, // Required, targeted text span
"motivationUri": string, // Optional, AT-URI of motivation type node
"motivationFallback": string, // Optional, fallback motivation
"parentAnnotation": string, // Optional, AT-URI for threading
"createdAt": string // Required, ISO 8601
}

Body item types (16 union refs):

textItem, nodeRefItem, wikidataRefItem, fieldRefItem, facetRefItem, eprintRefItem, annotationRefItem, authorRefItem, mentionItem, linkItem, tagItem, latexItem, codeBlockItem, headingItem, listItem, blockquoteItem.

Motivation values (knownValues, open enum):

ValueDescription
commentingGeneral comment
questioningRaising a question
highlightingHighlighting important text
replyingReply to another annotation

TextSpanTarget type

Implements W3C Web Annotation selectors for targeting text spans.

interface TextSpanTarget {
versionUri?: string; // AT-URI of specific eprint version
selector: TextQuoteSelector | TextPositionSelector | FragmentSelector;
refinedBy?: PositionRefinement;
}

Selector types:

interface TextQuoteSelector {
type: 'TextQuoteSelector';
exact: string; // Exact text to match, max 1000 chars
prefix?: string; // Context before, max 100 chars
suffix?: string; // Context after, max 100 chars
}

interface TextPositionSelector {
type: 'TextPositionSelector';
start: number; // Start character position (0+)
end: number; // End character position (0+)
}

interface FragmentSelector {
type: 'FragmentSelector';
value: string; // Fragment identifier (page, section), max 200 chars
conformsTo?: string; // Fragment syntax spec URI
}

PositionRefinement type:

Provides precise visual rendering coordinates for PDF annotations.

interface PositionRefinement {
type: 'TextPositionSelector';
pageNumber?: number; // 0-indexed page number
start?: number; // Approximate character start offset
end?: number; // Approximate character end offset
boundingRect?: BoundingRect;
}

interface BoundingRect {
x1: string; // Left edge (string for float precision)
y1: string; // Top edge
x2: string; // Right edge
y2: string; // Bottom edge
width: string; // Page width reference
height: string; // Page height reference
pageNumber: number; // 1-indexed page number
}

All BoundingRect coordinate values are stored as strings because ATProto only supports integer types; string encoding preserves floating-point precision.

Link from a text span to a knowledge graph entity. Connects mentions of entities in eprint text to structured knowledge representations.

{
"$type": "pub.chive.annotation.entityLink",
"eprintUri": string, // Required, AT-URI of the eprint
"target": TextSpanTarget, // Required, targeted text span with source
"linkedEntity": LinkedEntity, // Required, union of entity link types
"confidence": number, // Optional, 0 to 1000 (scaled 0.0 to 1.0)
"createdAt": string // Required, ISO 8601
}

TextSpanTarget for entityLink:

The entityLink target structure differs from annotation.comment. It includes a source field and uses only TextQuoteSelector with an optional TextPositionSelector refinement.

interface TextSpanTarget {
source: string; // AT-URI of the source document
selector: TextQuoteSelector; // TextQuoteSelector only
refinedBy?: TextPositionSelector; // Optional position refinement with pageNumber
}

interface TextPositionSelector {
type: 'TextPositionSelector';
start: number; // Start character offset
end: number; // End character offset
pageNumber: number; // 0-indexed page number in the document
boundingRect?: BoundingRect; // Visual positioning coordinates
}

LinkedEntity union types:

// link to a knowledge graph node
interface GraphNodeLink {
type: 'graphNode';
uri: string; // AT-URI of the graph node (required)
label: string; // Display label (required)
kind: 'type' | 'object' | (string & {}); // Node classification (required)
id?: string; // Node UUID
slug?: string; // Human-readable slug (e.g., "computer-science")
subkind?: string; // Subkind slug (e.g., "field", "facet", "institution")
subkindUri?: string; // AT-URI of the subkind type node
}

// link to an external identifier system
interface ExternalIdLink {
type: 'externalId';
system: ExternalIdSystem; // Identifier system (required)
identifier: string; // Identifier value, e.g., "Q42" for Wikidata (required)
label: string; // Display label (required)
uri?: string; // Full URI for the external entity
}

// link to an ATProto author
interface AuthorLink {
type: 'author';
did: string; // Author DID (required)
displayName: string; // Display name (required)
handle?: string; // Author handle
orcid?: string; // ORCID iD
}

// link to another eprint
interface EprintLink {
type: 'eprint';
uri: string; // AT-URI of the eprint (required)
title: string; // Eprint title (required)
doi?: string; // DOI if available
}

External identifier systems (knownValues):

wikidata, ror, orcid, isni, viaf, lcsh, fast, credit, spdx, fundref, mesh, aat, gnd, anzsrc, arxiv, doi, pmid, pmcid

Annotation queries

LexiconTypeDescription
pub.chive.annotation.listForEprintQueryList annotations for an eprint with optional filtering
pub.chive.annotation.listForPageQueryList annotations for a specific PDF page
pub.chive.annotation.getThreadQueryGet annotation thread with all replies
pub.chive.annotation.listByAuthorQueryList annotations by a specific author

See XRPC endpoints for parameter and response details.

Review lexicons

Reviews are document-level comments on eprints. For inline text annotations targeting specific spans, use pub.chive.annotation.comment.

pub.chive.review.comment

Document-level review comment with rich text body supporting formatting, entity references, and structured content. The target field is optional; when omitted, the review applies to the eprint as a whole.

{
"$type": "pub.chive.review.comment",
"eprintUri": string, // Required, AT-URI of reviewed eprint
"body": BodyItem[], // Required, rich text body, max 500 items
"target": TextSpanTarget, // Optional, target span for inline reviews
"motivationUri": string, // Optional, AT-URI of motivation type node
"motivationFallback": string, // Optional, fallback motivation
"parentComment": string, // Optional, AT-URI for threading
"createdAt": string // Required, ISO 8601
}

Body item types:

The body field accepts all 16 rich text item types:

  • textItem: Plain text with optional facets
  • nodeRefItem: Knowledge graph node reference
  • wikidataRefItem: Wikidata entity reference
  • fieldRefItem: Academic field reference
  • facetRefItem: Facet classification reference
  • eprintRefItem: Cross-reference to another eprint
  • annotationRefItem: Reference to an annotation
  • authorRefItem: Author reference by DID
  • mentionItem: ATProto @mention
  • linkItem: URL hyperlink
  • tagItem: Hashtag
  • latexItem: LaTeX math expression
  • codeBlockItem: Fenced code block
  • headingItem: Section heading
  • listItem: List item
  • blockquoteItem: Block quotation

TextSpanTarget type:

Same structure as pub.chive.annotation.comment#textSpanTarget (union of three selector types with optional position refinement). See the annotation.comment TextSpanTarget for details.

Motivation values (knownValues, open enum):

ValueDescription
commentingGeneral comment
questioningRaising a question
highlightingHighlighting important text
replyingReply to another comment
linkingProviding a reference link

pub.chive.review.endorsement

Endorsement of contribution types in an eprint.

{
"$type": "pub.chive.review.endorsement",
"eprintUri": string, // Required, AT-URI of eprint being endorsed
"contributions": string[], // Required, 1-15 contribution types (no duplicates)
"comment": string, // Optional, max 5000 chars
"createdAt": string // Required, ISO 8601
}

Contribution types (based on CRediT taxonomy):

ValueDescription
methodologicalSound methodology
analyticalAnalytical rigor
theoreticalTheoretical framework
empiricalEmpirical approach
conceptualConceptualization
technicalTechnical implementation
dataData quality/curation
replicationReplication study
reproducibilityReproducible results
synthesisLiterature synthesis
interdisciplinaryCross-disciplinary work
pedagogicalEducational value
visualizationData visualization
societal-impactSocietal relevance
clinicalClinical applicability

Link from a text span to a knowledge graph entity, within the review namespace. Structurally identical to pub.chive.annotation.entityLink.

{
"$type": "pub.chive.review.entityLink",
"eprintUri": string, // Required, AT-URI of the eprint
"target": TextSpanTarget, // Required, targeted text span with source
"linkedEntity": LinkedEntity, // Required, union of entity link types
"confidence": number, // Optional, 0 to 1000 (scaled 0.0 to 1.0)
"createdAt": string // Required, ISO 8601
}

The TextSpanTarget and LinkedEntity union types use the same structure as pub.chive.annotation.entityLink. See the annotation.entityLink section for the full type definitions.

Review queries

LexiconTypeDescription
pub.chive.review.listForEprintQueryList reviews for an eprint
pub.chive.review.getThreadQueryGet a review thread with all replies
pub.chive.review.listForAuthorQueryList reviews by a specific author

See XRPC endpoints for parameter and response details.

Endorsement lexicons

Endorsement queries aggregate data from pub.chive.review.endorsement records. There are no additional record types in this namespace.

Endorsement queries

LexiconTypeDescription
pub.chive.endorsement.getSummaryQueryGet endorsement summary counts for an eprint
pub.chive.endorsement.listForEprintQueryList all endorsements for an eprint
pub.chive.endorsement.getUserEndorsementQueryGet the current user's endorsement for an eprint
pub.chive.endorsement.listForUserQueryList all endorsements by a user
pub.chive.endorsement.listForAuthorPapersQueryList endorsements across an author's papers

See XRPC endpoints for parameter and response details.

Graph lexicons

pub.chive.graph.node

Node record for the knowledge graph.

{
"$type": "pub.chive.graph.node",
"id": string, // Unique identifier
"kind": "type" | "object", // Node classification
"subkind": string, // "field", "facet", "institution", "person", "concept"
"label": string, // Display name
"alternateLabels": string[], // Synonyms (max 20)
"description": string, // Scope note (max 2000 chars)
"externalIds": ExternalId[], // Links to Wikidata, LCSH, etc.
"status": NodeStatus,
"createdAt": string,
"updatedAt": string
}

type NodeStatus = "proposed" | "provisional" | "established" | "deprecated";

interface ExternalId {
source: string; // "wikidata", "lcsh", "viaf", "fast", "orcid", "ror"
value: string; // The external identifier
}

pub.chive.graph.edge

Relationship between two nodes in the knowledge graph.

{
"$type": "pub.chive.graph.edge",
"sourceUri": string, // AT-URI of source node
"targetUri": string, // AT-URI of target node
"relationSlug": EdgeRelation, // Relationship type
"weight": number, // Relationship strength (0.0-1.0)
"status": EdgeStatus,
"createdAt": string
}

type EdgeRelation = "broader" | "narrower" | "related" | "sameAs" | "partOf" | "hasPart";
type EdgeStatus = "proposed" | "established" | "deprecated";

pub.chive.graph.nodeProposal

Proposal to create, update, merge, or deprecate a node.

{
"$type": "pub.chive.graph.nodeProposal",
"proposalType": ProposalType,
"kind": "type" | "object",
"subkind": string,
"proposedNode": ProposedNodeData,
"rationale": string, // Max 2000 chars
"evidence": Evidence[], // Supporting materials
"createdAt": string
}

type ProposalType = "create" | "update" | "merge" | "deprecate";

interface ProposedNodeData {
id?: string; // Required for update/merge/deprecate
label?: string;
alternateLabels?: string[];
description?: string;
externalIds?: ExternalId[];
mergeIntoUri?: string; // For merge proposals
deprecationReason?: string; // For deprecate proposals
}

interface Evidence {
type: string; // "publication_count", "conference", "expert_endorsement"
source?: string;
value?: string | number;
url?: string;
}

pub.chive.graph.edgeProposal

Proposal to create, update, or deprecate an edge between nodes.

{
"$type": "pub.chive.graph.edgeProposal",
"proposalType": "create" | "update" | "deprecate",
"proposedEdge": ProposedEdgeData,
"rationale": string, // Max 2000 chars
"createdAt": string
}

interface ProposedEdgeData {
sourceUri: string;
targetUri: string;
relationSlug: EdgeRelation;
weight?: number;
}

pub.chive.graph.vote

Vote on a proposal.

{
"$type": "pub.chive.graph.vote",
"proposal": StrongRef, // Reference to proposal
"vote": "approve" | "reject" | "abstain",
"comment": string, // Optional, max 500 chars
"createdAt": string
}

pub.chive.graph.reconciliation

Entity reconciliation record linking local knowledge graph entities to external authority systems.

{
"$type": "pub.chive.graph.reconciliation",
"sourceUri": string, // Required, AT-URI of local entity being reconciled
"targetSystem": string, // Required, external authority system
"targetId": string, // Required, identifier in the external system
"confidence": number, // Required, 0 to 1000 (scaled 0.0 to 1.0)
"matchType": string, // Optional, SKOS mapping type
"status": string, // Required, reconciliation status
"verifiedBy": string, // Optional, DID of user who verified the match
"notes": string, // Optional, max 1000 chars
"createdAt": string, // Required, ISO 8601
"updatedAt": string // Optional, ISO 8601
}

Target systems (knownValues):

wikidata, lcsh, fast, ror, orcid, viaf, gnd, mesh, aat, getty

Match types (knownValues, SKOS mapping vocabulary):

ValueDescription
exactExact equivalence (skos:exactMatch)
closeClose match, near-equivalence (skos:closeMatch)
broadLocal entity is narrower than target (skos:broadMatch)
narrowLocal entity is broader than target (skos:narrowMatch)
relatedAssociative relationship (skos:relatedMatch)

Status values (knownValues):

ValueDescription
proposedAwaiting verification
verifiedConfirmed by a trusted editor
rejectedRejected as incorrect

Graph queries

LexiconTypeDescription
pub.chive.graph.getNodeQueryGet a single node by URI
pub.chive.graph.listNodesQueryList nodes with optional filtering
pub.chive.graph.searchNodesQueryFull-text search across nodes
pub.chive.graph.getEdgeQueryGet a single edge by URI
pub.chive.graph.listEdgesQueryList edges for a node
pub.chive.graph.getHierarchyQueryGet the hierarchy tree for a node
pub.chive.graph.getRelationsQueryGet related nodes
pub.chive.graph.getCommunitiesQueryGet community clusters in the graph
pub.chive.graph.getSubkindsQueryList available subkind type nodes
pub.chive.graph.browseFacetedQueryBrowse nodes using faceted classification

See XRPC endpoints for parameter and response details.

Actor lexicons

pub.chive.actor.profile

Extended user profile.

{
"$type": "pub.chive.actor.profile",
"bio": string, // Max 1000 chars
"orcid": string, // ORCID iD
"affiliation": string,
"website": string,
"researchInterests": string[],
"fields": string[], // Followed fields
"publicEmail": string
}

pub.chive.discovery.settings

Discovery preferences for personalized recommendations.

{
"$type": "pub.chive.discovery.settings",
"enablePersonalization": boolean,
"enableForYouFeed": boolean,
"forYouSignals": {
"fields": boolean,
"citations": boolean,
"collaborators": boolean,
"trending": boolean
},
"relatedPapersSignals": {
"citations": boolean,
"topics": boolean
},
"citationNetworkDisplay": "hidden" | "preview" | "expanded",
"showRecommendationReasons": boolean
}

Actor queries

LexiconTypeDescription
pub.chive.actor.getMyProfileQueryGet the authenticated user's profile
pub.chive.actor.getDiscoverySettingsQueryGet discovery preferences
pub.chive.actor.autocompleteOrcidQueryAutocomplete ORCID iDs
pub.chive.actor.autocompleteAffiliationQueryAutocomplete institution affiliations
pub.chive.actor.autocompleteKeywordQueryAutocomplete research keywords
pub.chive.actor.autocompleteOpenReviewQueryAutocomplete OpenReview profiles
pub.chive.actor.discoverAuthorIdsQueryDiscover author identifiers from ORCID/name

See XRPC endpoints for parameter and response details.

Author lexicons

Author queries provide read-only access to author profile data aggregated from the index.

Author queries

LexiconTypeDescription
pub.chive.author.getProfileQueryGet an author profile by DID
pub.chive.author.searchAuthorsQuerySearch authors by name or ORCID

See XRPC endpoints for parameter and response details.

Tag lexicons

Tag queries provide search and discovery over user-generated tags from pub.chive.eprint.userTag records.

Tag queries

LexiconTypeDescription
pub.chive.tag.searchQuerySearch tags by prefix or keyword
pub.chive.tag.listForEprintQueryList all tags for an eprint
pub.chive.tag.listEprintsQueryList eprints with a specific tag
pub.chive.tag.getDetailQueryGet tag usage statistics
pub.chive.tag.getSuggestionsQueryGet tag suggestions for an eprint
pub.chive.tag.getTrendingQueryGet trending tags

See XRPC endpoints for parameter and response details.

Sync lexicons

Sync endpoints manage PDS synchronization and staleness detection for the AppView index.

Sync queries and procedures

LexiconTypeDescription
pub.chive.sync.checkStalenessQueryCheck if an indexed record is stale
pub.chive.sync.verifyQueryVerify record integrity against PDS
pub.chive.sync.refreshRecordProcedureRe-fetch and re-index a record from PDS
pub.chive.sync.indexRecordProcedureIndex a new record from PDS
pub.chive.sync.deleteRecordProcedureRemove an indexed record
pub.chive.sync.registerPDSProcedureRegister a PDS for firehose consumption

See XRPC endpoints for parameter and response details.

Notification lexicons

Notification queries return aggregated notifications for the authenticated user.

Notification queries

LexiconTypeDescription
pub.chive.notification.listReviewsOnMyPapersQueryList reviews on the user's papers
pub.chive.notification.listEndorsementsOnMyPapersQueryList endorsements on the user's papers

See XRPC endpoints for parameter and response details.

Activity lexicons

Activity endpoints provide feed data and correlation metrics for user activity.

Activity queries and procedures

LexiconTypeDescription
pub.chive.activity.getFeedQueryGet the user's activity feed
pub.chive.activity.getCorrelationMetricsQueryGet activity correlation metrics
pub.chive.activity.logProcedureLog a user activity event
pub.chive.activity.markFailedProcedureMark an activity log entry as failed

See XRPC endpoints for parameter and response details.

Backlinks track cross-references between eprints and external resources.

LexiconTypeDescription
pub.chive.backlink.listQueryList backlinks for a resource
pub.chive.backlink.getCountsQueryGet backlink counts for a resource
pub.chive.backlink.createProcedureCreate a backlink
pub.chive.backlink.deleteProcedureDelete a backlink

See XRPC endpoints for parameter and response details.

Claiming lexicons

Claiming endpoints handle eprint ownership claims, coauthorship requests, and external import workflows.

Claiming queries and procedures

LexiconTypeDescription
pub.chive.claiming.getClaimQueryGet a specific claim by ID
pub.chive.claiming.getUserClaimsQueryList claims for the authenticated user
pub.chive.claiming.getPendingClaimsQueryList pending claims awaiting approval
pub.chive.claiming.findClaimableQueryFind eprints that can be claimed
pub.chive.claiming.getSubmissionDataQueryGet data for pre-filling a claim form
pub.chive.claiming.getSuggestionsQueryGet claim suggestions for the user
pub.chive.claiming.autocompleteQueryAutocomplete for claim search
pub.chive.claiming.searchEprintsQuerySearch external sources for claimable eprints
pub.chive.claiming.getCoauthorRequestsQueryList coauthorship requests for an eprint
pub.chive.claiming.getMyCoauthorRequestsQueryList the user's coauthorship requests
pub.chive.claiming.startClaimProcedureStart a new eprint claim
pub.chive.claiming.startClaimFromExternalProcedureStart a claim from an external source (arXiv, DOI)
pub.chive.claiming.completeClaimProcedureComplete a pending claim
pub.chive.claiming.approveClaimProcedureApprove a pending claim
pub.chive.claiming.rejectClaimProcedureReject a pending claim
pub.chive.claiming.requestCoauthorshipProcedureRequest coauthorship on an eprint
pub.chive.claiming.approveCoauthorProcedureApprove a coauthorship request
pub.chive.claiming.rejectCoauthorProcedureReject a coauthorship request
pub.chive.claiming.fetchExternalPdfProcedureFetch a PDF from an external source

See XRPC endpoints for parameter and response details.

Discovery lexicons

Discovery endpoints provide personalized recommendations, citation networks, and content enrichment.

Discovery queries and procedures

LexiconTypeDescription
pub.chive.discovery.getRecommendationsQueryGet personalized eprint recommendations
pub.chive.discovery.getForYouQueryGet the "For You" feed
pub.chive.discovery.getSimilarQueryGet similar eprints
pub.chive.discovery.getCitationsQueryGet citation network for an eprint
pub.chive.discovery.getEnrichmentQueryGet enrichment data for an eprint
pub.chive.discovery.recordInteractionProcedureRecord a user interaction for recommendations

See XRPC endpoints for parameter and response details.

Import lexicons

Import queries search external academic databases for eprints that can be claimed or imported.

Import queries

LexiconTypeDescription
pub.chive.import.searchQuerySearch external sources (arXiv, DOI, etc.)
pub.chive.import.existsQueryCheck if an external eprint is already indexed
pub.chive.import.getQueryGet metadata for an external eprint

See XRPC endpoints for parameter and response details.

Metrics lexicons

Metrics endpoints track and report usage statistics for eprints.

Metrics queries and procedures

LexiconTypeDescription
pub.chive.metrics.getMetricsQueryGet aggregate metrics for an eprint
pub.chive.metrics.getViewCountQueryGet view count for an eprint
pub.chive.metrics.getTrendingQueryGet trending eprints by metrics
pub.chive.metrics.recordViewProcedureRecord an eprint view
pub.chive.metrics.recordDownloadProcedureRecord an eprint download
pub.chive.metrics.recordDwellTimeProcedureRecord time spent reading an eprint
pub.chive.metrics.recordSearchClickProcedureRecord a click-through from search
pub.chive.metrics.recordSearchDownloadProcedureRecord a download from search results

See XRPC endpoints for parameter and response details.

Governance lexicons

Governance endpoints manage the community moderation system: proposals, votes, trusted editor roles, and delegation.

Governance queries and procedures

LexiconTypeDescription
pub.chive.governance.listProposalsQueryList governance proposals
pub.chive.governance.getProposalQueryGet a single proposal
pub.chive.governance.listVotesQueryList votes on a proposal
pub.chive.governance.getUserVoteQueryGet the user's vote on a proposal
pub.chive.governance.getPendingCountQueryGet count of pending proposals
pub.chive.governance.getEditorStatusQueryGet the user's editor role status
pub.chive.governance.listTrustedEditorsQueryList trusted editors
pub.chive.governance.listDelegationsQueryList role delegations
pub.chive.governance.listElevationRequestsQueryList pending elevation requests
pub.chive.governance.requestElevationProcedureRequest elevation to editor role
pub.chive.governance.approveElevationProcedureApprove an elevation request
pub.chive.governance.rejectElevationProcedureReject an elevation request
pub.chive.governance.grantDelegationProcedureGrant a role delegation
pub.chive.governance.revokeDelegationProcedureRevoke a role delegation
pub.chive.governance.revokeRoleProcedureRevoke an editor role

See XRPC endpoints for parameter and response details.

Alpha lexicons

Alpha endpoints manage enrollment in the Chive alpha program.

Alpha queries and procedures

LexiconTypeDescription
pub.chive.alpha.checkStatusQueryCheck the user's alpha program status
pub.chive.alpha.applyProcedureApply for the alpha program

See XRPC endpoints for parameter and response details.

Common types

StrongRef

Reference to another record.

interface StrongRef {
uri: string; // AT-URI
cid: string; // Content ID
}

BlobRef

Reference to a blob stored in a user's PDS. Chive indexes BlobRefs only; it never stores blob content.

interface BlobRef {
$type: 'blob';
ref: {
$link: string; // CID
};
mimeType: string;
size: number;
}

Validation rules

String limits

FieldMax length
Title500
Abstract plain text10000
Comment body items500
Tag50
Bio1000
LaTeX content10000
Code block content50000
Version changes2000
Reconciliation notes1000

Array limits

FieldMax items
Authors100
Keywords20
Field URIs10
Topic URIs20
Facet URIs30
Title rich items50
Abstract items500
Comment body items500
Supplementary items50
Alternate labels20
Facets per text500
Rich text items10000
Contributions15

Blob limits

TypeMax size
PDF100 MB
Supplementary50 MB each
Total per record200 MB

Versioning

Lexicons follow semantic versioning:

  • Major: Breaking changes (new required fields, removed fields)
  • Minor: Backwards-compatible additions (new optional fields)
  • Patch: Bug fixes, documentation updates

Current versions:

LexiconVersion
pub.chive.eprint.*1.0.0
pub.chive.annotation.*1.0.0
pub.chive.review.*1.0.0
pub.chive.graph.*1.0.0
pub.chive.actor.*1.0.0
pub.chive.richtext.*1.0.0
pub.chive.discovery.*1.0.0