at.tensei.pipeline

tensei.at

Documentation

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.

main record

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.

Record Key tid Timestamp-based ID

Properties

createdAt string Optional

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.

name string Optional

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 bytesminLength: 1 bytes
nodes array of ref #node Required

No description available.

minLength: 1 items
slots unknown Required

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.

version integer Required

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.

viewType string Optional

The built-in preset this pipeline started from, as attribution only; it constrains no shape (§3.8).

Allowed: review, bookmark
View raw schema
{
  "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"
}
fieldExpression object

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 string Optional

No description available.

minLength: 1 bytes
kind string Required

No description available.

View raw schema
{
  "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"
}
node object

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 string Optional

The field a unique node groups by or a sort node orders by.

minLength: 1 bytes
collection string nsid Optional

A source's collection NSID; its mapping's `source` must equal it.

count integer Optional

No description available.

minimum: 0
dir string Optional

No description available.

id string Required

No description available.

minLength: 1 bytes
keep string Optional

No description available.

keepBy string Optional

No description available.

minLength: 1 bytes
kind string Required

No description available.

mapping string Optional

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 bytes
operations array of ref#operation Optional

No description available.

predicate ref #predicate Optional

No description available.

scope ref #scope Optional

No description available.

View raw schema
{
  "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 object

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 string Optional

No description available.

destination string Optional

No description available.

minLength: 1 bytes
field string Optional

No description available.

minLength: 1 bytes
from string Optional

No description available.

minLength: 1 bytes
kind string Required

No description available.

removeInputs array of string Optional

No description available.

to string Optional

No description available.

minLength: 1 bytes
View raw schema
{
  "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 object

§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 array of ref#predicate Optional

No description available.

any array of ref#predicate Optional

No description available.

field string Optional

No description available.

minLength: 1 bytes
not ref #predicate Optional

No description available.

View raw schema
{
  "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 object

§6.2. `dids` is required when `kind` is actors.

Properties

dids array of stringdid Optional

No description available.

maxLength: 1000 items
kind string Required

No description available.

View raw schema
{
  "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"
}

Lexicon Garden

@