at.tensei.pipeline
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"fieldExpression": {
"description": "A downstream expression (§4.3, §7.2): field {field}, constant {value} or operation {op, inputs, args?}. It reads output fields only, never a source path or the key table. Not stated by the lexicon, as for at.tensei.mapping#mappingExpression: which properties each kind requires, `value` and `args`, in which a number that is not an integer is an at.tensei.mapping#fixedPoint, the input count and a nesting depth of at most 64 levels.",
"properties": {
"field": {
"minLength": 1,
"type": "string"
},
"inputs": {
"items": {
"ref": "#fieldExpression",
"type": "ref"
},
"type": "array"
},
"kind": {
"enum": [
"field",
"constant",
"operation"
],
"type": "string"
},
"op": {
"ref": "at.tensei.mapping#operationName",
"type": "ref"
}
},
"required": [
"kind"
],
"type": "object"
},
"main": {
"description": "Nodes and wires (§6). `wires` is required and is not declared: an array of [from, to] pairs of node ids, and the lexicon language has no array of arrays. Also not stated by the lexicon, and enforced by the validator (§6.1): node ids are unique; the graph is acyclic, has exactly one output reachable from every source, a source has no inbound wire and every other node exactly one, except a union, which has two or more; an output has no outbound wire; every source's mapping declares exactly the initial `slots`; every field a node names is in the shape of its incoming wire; and `presentation` names fields of the output's shape.",
"key": "tid",
"record": {
"properties": {
"createdAt": {
"description": "When the pipeline was created: a datetime as §3.1 reads one, which accepts forms atproto's `datetime` format does not, so the format is not declared.",
"type": "string"
},
"name": {
"description": "What the pipeline is called (§6.1): at most 640 bytes as UTF-8, and not only whitespace, which the lexicon language cannot state.",
"maxLength": 640,
"minLength": 1,
"type": "string"
},
"nodes": {
"items": {
"ref": "#node",
"type": "ref"
},
"minLength": 1,
"type": "array"
},
"origin": {
"description": "Present on an adopted copy: the exact version copied (§1.3).",
"ref": "at.tensei.mapping#origin",
"type": "ref"
},
"presentation": {
"description": "The authoritative presentation of the output (§3.8).",
"ref": "at.tensei.mapping#presentation",
"type": "ref"
},
"slots": {
"description": "The initial shared source-output shape (§3.8, §6.1): an object keyed by field names the user chooses, each value an at.tensei.mapping#fieldDefinition. The lexicon language has no map type, so the names and values are stated here rather than declared.",
"type": "unknown"
},
"version": {
"const": 1,
"description": "The document version. A document without one is the Phase-2 form, which is migrated explicitly to version 1 (§8.3) and never published as it is.",
"type": "integer"
},
"viewType": {
"description": "The built-in preset this pipeline started from, as attribution only; it constrains no shape (§3.8).",
"enum": [
"review",
"bookmark"
],
"type": "string"
}
},
"required": [
"version",
"slots",
"presentation",
"nodes"
],
"type": "object"
},
"type": "record"
},
"node": {
"description": "One node of §7's closed catalogue. Not stated by the lexicon: the properties each kind requires — source {collection, mapping}, filter {predicate}, transform {operations}, unique {by, keep}, sort {by, dir}, limit {count}; and that `keepBy` names a datetime field and is required by keep newest or oldest and refused with most_complete (§7.1).",
"properties": {
"by": {
"description": "The field a unique node groups by or a sort node orders by.",
"minLength": 1,
"type": "string"
},
"collection": {
"description": "A source's collection NSID; its mapping's `source` must equal it.",
"format": "nsid",
"type": "string"
},
"count": {
"minimum": 0,
"type": "integer"
},
"dir": {
"enum": [
"asc",
"desc"
],
"type": "string"
},
"id": {
"minLength": 1,
"type": "string"
},
"keep": {
"enum": [
"newest",
"oldest",
"most_complete"
],
"type": "string"
},
"keepBy": {
"minLength": 1,
"type": "string"
},
"kind": {
"enum": [
"source",
"filter",
"union",
"transform",
"unique",
"sort",
"limit",
"output"
],
"type": "string"
},
"mapping": {
"description": "A source's mapping: at://<authority>/at.tensei.mapping/<rkey>, or owned:<id> for an appview-owned draft, which publication replaces with the published mapping's at-uri (§6.1). An inline mapping is accepted for unsaved preview only and is never a record.",
"minLength": 1,
"type": "string"
},
"operations": {
"items": {
"ref": "#operation",
"type": "ref"
},
"type": "array"
},
"predicate": {
"ref": "#predicate",
"type": "ref"
},
"scope": {
"ref": "#scope",
"type": "ref"
}
},
"required": [
"id",
"kind"
],
"type": "object"
},
"operation": {
"description": "One structural operation of a transform node, applied in order (§7.2): set {destination, definition, expr, collision, removeInputs?}, rename {from, to, collision} or remove {field}. Not stated by the lexicon: which properties each kind requires, and that every name is checked against the shape at that exact operation.",
"properties": {
"collision": {
"enum": [
"reject",
"replace"
],
"type": "string"
},
"definition": {
"ref": "at.tensei.mapping#fieldDefinition",
"type": "ref"
},
"destination": {
"minLength": 1,
"type": "string"
},
"expr": {
"ref": "#fieldExpression",
"type": "ref"
},
"field": {
"minLength": 1,
"type": "string"
},
"from": {
"minLength": 1,
"type": "string"
},
"kind": {
"enum": [
"set",
"rename",
"remove"
],
"type": "string"
},
"removeInputs": {
"items": {
"minLength": 1,
"type": "string"
},
"type": "array"
},
"to": {
"minLength": 1,
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"predicate": {
"description": "§5: a leaf {field, op, value?} over output field names, or exactly one of all, any or not. `value` is a scalar (a string, an integer, an at.tensei.mapping#fixedPoint for any other number, or a boolean; never null or an object), or for in/notIn an array of scalars, and is absent for exists/notExists; the lexicon language has no type for a scalar of any kind, so it is not declared. Which form a predicate takes is not stated by the lexicon.",
"properties": {
"all": {
"items": {
"ref": "#predicate",
"type": "ref"
},
"type": "array"
},
"any": {
"items": {
"ref": "#predicate",
"type": "ref"
},
"type": "array"
},
"field": {
"minLength": 1,
"type": "string"
},
"not": {
"ref": "#predicate",
"type": "ref"
},
"op": {
"ref": "at.tensei.mapping#predicateOp",
"type": "ref"
}
},
"type": "object"
},
"scope": {
"description": "§6.2. `dids` is required when `kind` is actors.",
"properties": {
"dids": {
"items": {
"format": "did",
"type": "string"
},
"maxLength": 1000,
"type": "array"
},
"kind": {
"enum": [
"network",
"actors",
"self"
],
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
}
},
"description": "A Tensei pipeline, version 1 (spec §6, §7): source nodes reading through mappings, downstream nodes over the fields the user authored, and one output. Shapes on wires are derived from the graph, never stored. The atproto data model has integers only, so a number in the record is an integer written as it is, or any other number as an at.tensei.mapping#fixedPoint, the value times 10⁶ (spec §1.5). Where the lexicon language cannot state a rule the version-1 validator enforces, the property is left permissive here and the rule is named in its description.",
"id": "at.tensei.pipeline",
"lexicon": 1
}
Metadata
- DID
-
did:plc:7fk7ea7vlnlpzgy225x66vro - CID
-
bafyreiaddqmg4nqcgybt2r5pqe7x45x7r5c3m6xnr5pztsbzazxvocba7m - Indexed At
- 2026-10-16 13:31 UTC
- AT-URI
-
at://did:plc:7fk7ea7vlnlpzgy225x66vro/com.atproto.lexicon.schema/at.tensei.pipeline
Version History (2 versions)
- 2026-10-16 13:31 UTC (current)
- 2026-10-16 08:32 UTC diff
Referenced Schemas (5)
Similar Lexicons
Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.
-
at.tensei.mapping record
A Tensei mapping, version 1 (spec §4): records of one source collection mapped into output fields the user authors. Built-in presets are starting points, never a contract: any field name is allowed, and a field is mand…