at.tensei.pipeline

tensei.at

Schema Diff

+3 -3

From

CID
bafyreie45zo4ahm...
Indexed At
2026-10-16 08:32 UTC
View this version

To

CID
bafyreiaddqmg4nq...
Indexed At
2026-10-16 13:31 UTC
View this version

Compatibility Analysis

Backward Compatible

No changes detected.

1 1
{
2 2
  "$type": "com.atproto.lexicon.schema",
3 3
  "defs": {
4 4
    "fieldExpression": {
5 -
      "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`, `args`, the input count and a nesting depth of at most 64 levels.",
5 +
      "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.",
6 6
      "properties": {
7 7
        "field": {
8 8
          "minLength": 1,
9 9
          "type": "string"
10 10
        },
11 11
        "inputs": {
12 12
          "items": {
13 13
            "ref": "#fieldExpression",
14 14
            "type": "ref"
15 15
          },
16 16
          "type": "array"
17 17
        },
18 18
        "kind": {
19 19
          "enum": [
20 20
            "field",
21 21
            "constant",
22 22
            "operation"
23 23
          ],
24 24
          "type": "string"
25 25
        },
26 26
        "op": {
27 27
          "ref": "at.tensei.mapping#operationName",
28 28
          "type": "ref"
29 29
        }
30 30
      },
31 31
      "required": [
32 32
        "kind"
33 33
      ],
34 34
      "type": "object"
35 35
    },
36 36
    "main": {
37 37
      "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.",
38 38
      "key": "tid",
39 39
      "record": {
40 40
        "properties": {
41 41
          "createdAt": {
42 42
            "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.",
43 43
            "type": "string"
44 44
          },
45 45
          "name": {
46 46
            "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.",
47 47
            "maxLength": 640,
48 48
            "minLength": 1,
49 49
            "type": "string"
50 50
          },
51 51
          "nodes": {
52 52
            "items": {
53 53
              "ref": "#node",
54 54
              "type": "ref"
55 55
            },
56 56
            "minLength": 1,
57 57
            "type": "array"
58 58
          },
59 59
          "origin": {
60 60
            "description": "Present on an adopted copy: the exact version copied (§1.3).",
61 61
            "ref": "at.tensei.mapping#origin",
62 62
            "type": "ref"
63 63
          },
64 64
          "presentation": {
65 65
            "description": "The authoritative presentation of the output (§3.8).",
66 66
            "ref": "at.tensei.mapping#presentation",
67 67
            "type": "ref"
68 68
          },
69 69
          "slots": {
70 70
            "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.",
71 71
            "type": "unknown"
72 72
          },
73 73
          "version": {
74 74
            "const": 1,
75 75
            "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.",
76 76
            "type": "integer"
77 77
          },
78 78
          "viewType": {
79 79
            "description": "The built-in preset this pipeline started from, as attribution only; it constrains no shape (§3.8).",
80 80
            "enum": [
81 81
              "review",
82 82
              "bookmark"
83 83
            ],
84 84
            "type": "string"
85 85
          }
86 86
        },
87 87
        "required": [
88 88
          "version",
89 89
          "slots",
90 90
          "presentation",
91 91
          "nodes"
92 92
        ],
93 93
        "type": "object"
94 94
      },
95 95
      "type": "record"
96 96
    },
97 97
    "node": {
98 98
      "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).",
99 99
      "properties": {
100 100
        "by": {
101 101
          "description": "The field a unique node groups by or a sort node orders by.",
102 102
          "minLength": 1,
103 103
          "type": "string"
104 104
        },
105 105
        "collection": {
106 106
          "description": "A source's collection NSID; its mapping's `source` must equal it.",
107 107
          "format": "nsid",
108 108
          "type": "string"
109 109
        },
110 110
        "count": {
111 111
          "minimum": 0,
112 112
          "type": "integer"
113 113
        },
114 114
        "dir": {
115 115
          "enum": [
116 116
            "asc",
117 117
            "desc"
118 118
          ],
119 119
          "type": "string"
120 120
        },
121 121
        "id": {
122 122
          "minLength": 1,
123 123
          "type": "string"
124 124
        },
125 125
        "keep": {
126 126
          "enum": [
127 127
            "newest",
128 128
            "oldest",
129 129
            "most_complete"
130 130
          ],
131 131
          "type": "string"
132 132
        },
133 133
        "keepBy": {
134 134
          "minLength": 1,
135 135
          "type": "string"
136 136
        },
137 137
        "kind": {
138 138
          "enum": [
139 139
            "source",
140 140
            "filter",
141 141
            "union",
142 142
            "transform",
143 143
            "unique",
144 144
            "sort",
145 145
            "limit",
146 146
            "output"
147 147
          ],
148 148
          "type": "string"
149 149
        },
150 150
        "mapping": {
151 151
          "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.",
152 152
          "minLength": 1,
153 153
          "type": "string"
154 154
        },
155 155
        "operations": {
156 156
          "items": {
157 157
            "ref": "#operation",
158 158
            "type": "ref"
159 159
          },
160 160
          "type": "array"
161 161
        },
162 162
        "predicate": {
163 163
          "ref": "#predicate",
164 164
          "type": "ref"
165 165
        },
166 166
        "scope": {
167 167
          "ref": "#scope",
168 168
          "type": "ref"
169 169
        }
170 170
      },
171 171
      "required": [
172 172
        "id",
173 173
        "kind"
174 174
      ],
175 175
      "type": "object"
176 176
    },
177 177
    "operation": {
178 178
      "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.",
179 179
      "properties": {
180 180
        "collision": {
181 181
          "enum": [
182 182
            "reject",
183 183
            "replace"
184 184
          ],
185 185
          "type": "string"
186 186
        },
187 187
        "definition": {
188 188
          "ref": "at.tensei.mapping#fieldDefinition",
189 189
          "type": "ref"
190 190
        },
191 191
        "destination": {
192 192
          "minLength": 1,
193 193
          "type": "string"
194 194
        },
195 195
        "expr": {
196 196
          "ref": "#fieldExpression",
197 197
          "type": "ref"
198 198
        },
199 199
        "field": {
200 200
          "minLength": 1,
201 201
          "type": "string"
202 202
        },
203 203
        "from": {
204 204
          "minLength": 1,
205 205
          "type": "string"
206 206
        },
207 207
        "kind": {
208 208
          "enum": [
209 209
            "set",
210 210
            "rename",
211 211
            "remove"
212 212
          ],
213 213
          "type": "string"
214 214
        },
215 215
        "removeInputs": {
216 216
          "items": {
217 217
            "minLength": 1,
218 218
            "type": "string"
219 219
          },
220 220
          "type": "array"
221 221
        },
222 222
        "to": {
223 223
          "minLength": 1,
224 224
          "type": "string"
225 225
        }
226 226
      },
227 227
      "required": [
228 228
        "kind"
229 229
      ],
230 230
      "type": "object"
231 231
    },
232 232
    "predicate": {
233 -
      "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, a finite 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.",
233 +
      "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.",
234 234
      "properties": {
235 235
        "all": {
236 236
          "items": {
237 237
            "ref": "#predicate",
238 238
            "type": "ref"
239 239
          },
240 240
          "type": "array"
241 241
        },
242 242
        "any": {
243 243
          "items": {
244 244
            "ref": "#predicate",
245 245
            "type": "ref"
246 246
          },
247 247
          "type": "array"
248 248
        },
249 249
        "field": {
250 250
          "minLength": 1,
251 251
          "type": "string"
252 252
        },
253 253
        "not": {
254 254
          "ref": "#predicate",
255 255
          "type": "ref"
256 256
        },
257 257
        "op": {
258 258
          "ref": "at.tensei.mapping#predicateOp",
259 259
          "type": "ref"
260 260
        }
261 261
      },
262 262
      "type": "object"
263 263
    },
264 264
    "scope": {
265 265
      "description": "§6.2. `dids` is required when `kind` is actors.",
266 266
      "properties": {
267 267
        "dids": {
268 268
          "items": {
269 269
            "format": "did",
270 270
            "type": "string"
271 271
          },
272 272
          "maxLength": 1000,
273 273
          "type": "array"
274 274
        },
275 275
        "kind": {
276 276
          "enum": [
277 277
            "network",
278 278
            "actors",
279 279
            "self"
280 280
          ],
281 281
          "type": "string"
282 282
        }
283 283
      },
284 284
      "required": [
285 285
        "kind"
286 286
      ],
287 287
      "type": "object"
288 288
    }
289 289
  },
290 -
  "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. 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.",
290 +
  "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.",
291 291
  "id": "at.tensei.pipeline",
292 292
  "lexicon": 1
293 293
}

Compare Other Versions

Lexicon Garden

@