@ixo/topic-protocol 1.0.0-rc.3 → 1.0.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/profiles/releases/1.0.0-rc.3.json +8442 -0
- package/dist/schemas/project-projection.schema.json +178 -12
- package/dist/schemas/topic-operation.schema.json +155 -13
- package/dist/schemas/topic-shape.schema.json +1 -1
- package/dist/schemas/v2/capsule.schema.json +29 -0
- package/dist/schemas/v2/common.schema.json +68 -0
- package/dist/schemas/v2/operation.schema.json +308 -0
- package/dist/schemas/v2/projection.schema.json +205 -0
- package/dist/schemas/v2/record.schema.json +56 -0
- package/dist/schemas/v2/topic.schema.json +84 -0
- package/dist/src/contracts/schemas.d.ts +8 -0
- package/dist/src/contracts/validator.js +34 -3
- package/dist/src/contracts/validator.js.map +1 -1
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.js +7 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/projector/payload.d.ts +6 -2
- package/dist/src/projector/payload.js +8 -2
- package/dist/src/projector/payload.js.map +1 -1
- package/dist/src/projector/state.js +11 -3
- package/dist/src/projector/state.js.map +1 -1
- package/dist/src/projector/types.d.ts +1 -1
- package/dist/src/projector/types.js.map +1 -1
- package/dist/src/projects/project.js +55 -19
- package/dist/src/projects/project.js.map +1 -1
- package/dist/src/projects/types.d.ts +1 -0
- package/dist/src/shapes/availability.d.ts +2 -0
- package/dist/src/shapes/availability.js +19 -0
- package/dist/src/shapes/availability.js.map +1 -0
- package/dist/src/shapes/canonical.js +3 -2
- package/dist/src/shapes/canonical.js.map +1 -1
- package/dist/src/shapes/commands.d.ts +3 -0
- package/dist/src/shapes/commands.js +10 -0
- package/dist/src/shapes/commands.js.map +1 -0
- package/dist/src/shapes/fields.d.ts +9 -0
- package/dist/src/shapes/fields.js +41 -0
- package/dist/src/shapes/fields.js.map +1 -0
- package/dist/src/shapes/now.js +4 -1
- package/dist/src/shapes/now.js.map +1 -1
- package/dist/src/shapes/progress.d.ts +3 -1
- package/dist/src/shapes/progress.js +74 -27
- package/dist/src/shapes/progress.js.map +1 -1
- package/dist/src/shapes/reachability.d.ts +3 -0
- package/dist/src/shapes/reachability.js +29 -0
- package/dist/src/shapes/reachability.js.map +1 -0
- package/dist/src/shapes/recipes.js +42 -18
- package/dist/src/shapes/recipes.js.map +1 -1
- package/dist/src/shapes/releases.d.ts +9 -0
- package/dist/src/shapes/releases.js +12 -0
- package/dist/src/shapes/releases.js.map +1 -0
- package/dist/src/shapes/resolver.d.ts +3 -0
- package/dist/src/shapes/resolver.js +56 -16
- package/dist/src/shapes/resolver.js.map +1 -1
- package/dist/src/shapes/types.d.ts +12 -0
- package/dist/src/v2/canonical.d.ts +3 -0
- package/dist/src/v2/canonical.js +25 -0
- package/dist/src/v2/canonical.js.map +1 -0
- package/dist/src/v2/capsule.d.ts +10 -0
- package/dist/src/v2/capsule.js +46 -0
- package/dist/src/v2/capsule.js.map +1 -0
- package/dist/src/v2/compat.d.ts +14 -0
- package/dist/src/v2/compat.js +96 -0
- package/dist/src/v2/compat.js.map +1 -0
- package/dist/src/v2/ids.d.ts +3 -0
- package/dist/src/v2/ids.js +11 -0
- package/dist/src/v2/ids.js.map +1 -0
- package/dist/src/v2/index.d.ts +9 -0
- package/dist/src/v2/index.js +9 -0
- package/dist/src/v2/index.js.map +1 -0
- package/dist/src/v2/matrix.d.ts +46 -0
- package/dist/src/v2/matrix.js +151 -0
- package/dist/src/v2/matrix.js.map +1 -0
- package/dist/src/v2/project.d.ts +14 -0
- package/dist/src/v2/project.js +268 -0
- package/dist/src/v2/project.js.map +1 -0
- package/dist/src/v2/types.d.ts +195 -0
- package/dist/src/v2/types.js +19 -0
- package/dist/src/v2/types.js.map +1 -0
- package/dist/src/v2/validate.d.ts +650 -0
- package/dist/src/v2/validate.js +45 -0
- package/dist/src/v2/validate.js.map +1 -0
- package/package.json +7 -1
- package/profiles/releases/1.0.0-rc.3.json +8442 -0
- package/recipes/agent-delivery.json +54 -4
- package/recipes/blueprint-design.json +4 -3
- package/recipes/registry.json +12 -12
- package/recipes/research-brief.json +53 -2
- package/recipes/software-build.json +2 -2
- package/recipes/verified-work-payment.json +56 -5
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://topic-protocol.ixo.world/schemas/v2/operation.schema.json",
|
|
4
|
+
"title": "Topic operation (Protocol 2.0)",
|
|
5
|
+
"description": "An append-only change to a Topic. Operations carry no revision pointer; the projector orders them by createdAt then id and applies last-writer-wins per field.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"version",
|
|
9
|
+
"id",
|
|
10
|
+
"topicId",
|
|
11
|
+
"type",
|
|
12
|
+
"actor",
|
|
13
|
+
"createdAt"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"version": {
|
|
17
|
+
"const": 2
|
|
18
|
+
},
|
|
19
|
+
"id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^ixo:topic-op:[A-Za-z0-9._-]{8,128}$",
|
|
22
|
+
"description": "Writers SHOULD use a UUIDv7 suffix."
|
|
23
|
+
},
|
|
24
|
+
"topicId": {
|
|
25
|
+
"$ref": "common.schema.json#/$defs/topicId"
|
|
26
|
+
},
|
|
27
|
+
"type": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"update",
|
|
31
|
+
"set-status",
|
|
32
|
+
"block",
|
|
33
|
+
"unblock",
|
|
34
|
+
"link",
|
|
35
|
+
"unlink",
|
|
36
|
+
"attach",
|
|
37
|
+
"detach",
|
|
38
|
+
"relate",
|
|
39
|
+
"unrelate",
|
|
40
|
+
"bind-flow",
|
|
41
|
+
"unbind-flow"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"actor": {
|
|
45
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
46
|
+
},
|
|
47
|
+
"createdAt": {
|
|
48
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
49
|
+
},
|
|
50
|
+
"fields": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"minProperties": 1,
|
|
53
|
+
"properties": {
|
|
54
|
+
"title": {
|
|
55
|
+
"$ref": "common.schema.json#/$defs/title"
|
|
56
|
+
},
|
|
57
|
+
"owner": {
|
|
58
|
+
"oneOf": [
|
|
59
|
+
{
|
|
60
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "null"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"due": {
|
|
68
|
+
"oneOf": [
|
|
69
|
+
{
|
|
70
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "null"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"intent": {
|
|
78
|
+
"oneOf": [
|
|
79
|
+
{
|
|
80
|
+
"$ref": "common.schema.json#/$defs/text"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "null"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"outcome": {
|
|
88
|
+
"oneOf": [
|
|
89
|
+
{
|
|
90
|
+
"$ref": "common.schema.json#/$defs/text"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "null"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
},
|
|
100
|
+
"status": {
|
|
101
|
+
"$ref": "common.schema.json#/$defs/status"
|
|
102
|
+
},
|
|
103
|
+
"reason": {
|
|
104
|
+
"$ref": "common.schema.json#/$defs/text"
|
|
105
|
+
},
|
|
106
|
+
"on": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"minLength": 1
|
|
109
|
+
},
|
|
110
|
+
"ref": {
|
|
111
|
+
"$ref": "common.schema.json#/$defs/ref"
|
|
112
|
+
},
|
|
113
|
+
"file": {
|
|
114
|
+
"$ref": "common.schema.json#/$defs/file"
|
|
115
|
+
},
|
|
116
|
+
"resource": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"minLength": 1
|
|
119
|
+
},
|
|
120
|
+
"fileId": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"minLength": 1
|
|
123
|
+
},
|
|
124
|
+
"relation": {
|
|
125
|
+
"$ref": "common.schema.json#/$defs/relation"
|
|
126
|
+
},
|
|
127
|
+
"targetTopicId": {
|
|
128
|
+
"$ref": "common.schema.json#/$defs/topicId"
|
|
129
|
+
},
|
|
130
|
+
"flowUri": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"minLength": 1
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"allOf": [
|
|
136
|
+
{
|
|
137
|
+
"if": {
|
|
138
|
+
"properties": {
|
|
139
|
+
"type": {
|
|
140
|
+
"const": "update"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"type"
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"then": {
|
|
148
|
+
"properties": {
|
|
149
|
+
"fields": true
|
|
150
|
+
},
|
|
151
|
+
"required": [
|
|
152
|
+
"fields"
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"if": {
|
|
158
|
+
"properties": {
|
|
159
|
+
"type": {
|
|
160
|
+
"const": "set-status"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"required": [
|
|
164
|
+
"type"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"then": {
|
|
168
|
+
"properties": {
|
|
169
|
+
"status": true
|
|
170
|
+
},
|
|
171
|
+
"required": [
|
|
172
|
+
"status"
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"if": {
|
|
178
|
+
"properties": {
|
|
179
|
+
"type": {
|
|
180
|
+
"const": "block"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": [
|
|
184
|
+
"type"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
"then": {
|
|
188
|
+
"properties": {
|
|
189
|
+
"reason": true
|
|
190
|
+
},
|
|
191
|
+
"required": [
|
|
192
|
+
"reason"
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"if": {
|
|
198
|
+
"properties": {
|
|
199
|
+
"type": {
|
|
200
|
+
"enum": [
|
|
201
|
+
"link",
|
|
202
|
+
"unlink"
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"required": [
|
|
207
|
+
"type"
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"then": {
|
|
211
|
+
"properties": {
|
|
212
|
+
"ref": true
|
|
213
|
+
},
|
|
214
|
+
"required": [
|
|
215
|
+
"ref"
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"if": {
|
|
221
|
+
"properties": {
|
|
222
|
+
"type": {
|
|
223
|
+
"const": "attach"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"required": [
|
|
227
|
+
"type"
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
"then": {
|
|
231
|
+
"properties": {
|
|
232
|
+
"file": true
|
|
233
|
+
},
|
|
234
|
+
"required": [
|
|
235
|
+
"file"
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"if": {
|
|
241
|
+
"properties": {
|
|
242
|
+
"type": {
|
|
243
|
+
"const": "detach"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"required": [
|
|
247
|
+
"type"
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"then": {
|
|
251
|
+
"properties": {
|
|
252
|
+
"resource": true,
|
|
253
|
+
"fileId": true
|
|
254
|
+
},
|
|
255
|
+
"required": [
|
|
256
|
+
"resource",
|
|
257
|
+
"fileId"
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"if": {
|
|
263
|
+
"properties": {
|
|
264
|
+
"type": {
|
|
265
|
+
"enum": [
|
|
266
|
+
"relate",
|
|
267
|
+
"unrelate"
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"required": [
|
|
272
|
+
"type"
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
"then": {
|
|
276
|
+
"properties": {
|
|
277
|
+
"relation": true,
|
|
278
|
+
"targetTopicId": true
|
|
279
|
+
},
|
|
280
|
+
"required": [
|
|
281
|
+
"relation",
|
|
282
|
+
"targetTopicId"
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"if": {
|
|
288
|
+
"properties": {
|
|
289
|
+
"type": {
|
|
290
|
+
"const": "bind-flow"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"required": [
|
|
294
|
+
"type"
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
"then": {
|
|
298
|
+
"properties": {
|
|
299
|
+
"flowUri": true
|
|
300
|
+
},
|
|
301
|
+
"required": [
|
|
302
|
+
"flowUri"
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"additionalProperties": false
|
|
308
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://topic-protocol.ixo.world/schemas/v2/projection.schema.json",
|
|
4
|
+
"title": "Topic projection (Protocol 2.0)",
|
|
5
|
+
"description": "The deterministic fold of a manifest, its operations, and its records. Derived data; never authoritative on its own.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"version",
|
|
9
|
+
"id",
|
|
10
|
+
"anchor",
|
|
11
|
+
"title",
|
|
12
|
+
"kind",
|
|
13
|
+
"baseKind",
|
|
14
|
+
"status",
|
|
15
|
+
"createdBy",
|
|
16
|
+
"createdAt",
|
|
17
|
+
"updatedBy",
|
|
18
|
+
"updatedAt",
|
|
19
|
+
"links",
|
|
20
|
+
"files",
|
|
21
|
+
"relations",
|
|
22
|
+
"records",
|
|
23
|
+
"etag",
|
|
24
|
+
"rejected"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"version": {
|
|
28
|
+
"const": 2
|
|
29
|
+
},
|
|
30
|
+
"id": {
|
|
31
|
+
"$ref": "common.schema.json#/$defs/topicId"
|
|
32
|
+
},
|
|
33
|
+
"anchor": {
|
|
34
|
+
"$ref": "common.schema.json#/$defs/anchor"
|
|
35
|
+
},
|
|
36
|
+
"title": {
|
|
37
|
+
"$ref": "common.schema.json#/$defs/title"
|
|
38
|
+
},
|
|
39
|
+
"kind": {
|
|
40
|
+
"$ref": "common.schema.json#/$defs/kind"
|
|
41
|
+
},
|
|
42
|
+
"baseKind": {
|
|
43
|
+
"$ref": "common.schema.json#/$defs/baseKind"
|
|
44
|
+
},
|
|
45
|
+
"status": {
|
|
46
|
+
"$ref": "common.schema.json#/$defs/status"
|
|
47
|
+
},
|
|
48
|
+
"owner": {
|
|
49
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
50
|
+
},
|
|
51
|
+
"due": {
|
|
52
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
53
|
+
},
|
|
54
|
+
"intent": {
|
|
55
|
+
"$ref": "common.schema.json#/$defs/text"
|
|
56
|
+
},
|
|
57
|
+
"outcome": {
|
|
58
|
+
"$ref": "common.schema.json#/$defs/text"
|
|
59
|
+
},
|
|
60
|
+
"blocked": {
|
|
61
|
+
"$ref": "common.schema.json#/$defs/block"
|
|
62
|
+
},
|
|
63
|
+
"createdBy": {
|
|
64
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
65
|
+
},
|
|
66
|
+
"createdAt": {
|
|
67
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
68
|
+
},
|
|
69
|
+
"updatedBy": {
|
|
70
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
71
|
+
},
|
|
72
|
+
"updatedAt": {
|
|
73
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
74
|
+
},
|
|
75
|
+
"links": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"$ref": "common.schema.json#/$defs/ref"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"files": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"$ref": "common.schema.json#/$defs/file"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"relations": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"required": [
|
|
92
|
+
"relation",
|
|
93
|
+
"topicId",
|
|
94
|
+
"by",
|
|
95
|
+
"at"
|
|
96
|
+
],
|
|
97
|
+
"properties": {
|
|
98
|
+
"relation": {
|
|
99
|
+
"$ref": "common.schema.json#/$defs/relation"
|
|
100
|
+
},
|
|
101
|
+
"topicId": {
|
|
102
|
+
"$ref": "common.schema.json#/$defs/topicId"
|
|
103
|
+
},
|
|
104
|
+
"by": {
|
|
105
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
106
|
+
},
|
|
107
|
+
"at": {
|
|
108
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"flow": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"required": [
|
|
117
|
+
"flowUri",
|
|
118
|
+
"by",
|
|
119
|
+
"at"
|
|
120
|
+
],
|
|
121
|
+
"properties": {
|
|
122
|
+
"flowUri": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"minLength": 1
|
|
125
|
+
},
|
|
126
|
+
"by": {
|
|
127
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
128
|
+
},
|
|
129
|
+
"at": {
|
|
130
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"additionalProperties": false
|
|
134
|
+
},
|
|
135
|
+
"records": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"required": [
|
|
138
|
+
"decisions",
|
|
139
|
+
"outcomes",
|
|
140
|
+
"artifacts",
|
|
141
|
+
"receipts"
|
|
142
|
+
],
|
|
143
|
+
"properties": {
|
|
144
|
+
"decisions": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"items": {
|
|
147
|
+
"$ref": "record.schema.json"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"outcomes": {
|
|
151
|
+
"type": "array",
|
|
152
|
+
"items": {
|
|
153
|
+
"$ref": "record.schema.json"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"artifacts": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": {
|
|
159
|
+
"$ref": "record.schema.json"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"receipts": {
|
|
163
|
+
"type": "array",
|
|
164
|
+
"items": {
|
|
165
|
+
"$ref": "record.schema.json"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"additionalProperties": false
|
|
170
|
+
},
|
|
171
|
+
"etag": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
174
|
+
"description": "SHA-256 of the canonical projected state, excluding etag and rejected."
|
|
175
|
+
},
|
|
176
|
+
"rejected": {
|
|
177
|
+
"type": "array",
|
|
178
|
+
"items": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"required": [
|
|
181
|
+
"id",
|
|
182
|
+
"reason"
|
|
183
|
+
],
|
|
184
|
+
"properties": {
|
|
185
|
+
"id": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"minLength": 1
|
|
188
|
+
},
|
|
189
|
+
"reason": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"enum": [
|
|
192
|
+
"conflict",
|
|
193
|
+
"duplicate",
|
|
194
|
+
"topic-mismatch",
|
|
195
|
+
"unauthorized",
|
|
196
|
+
"unknown-supersedes"
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"additionalProperties": false
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"additionalProperties": false
|
|
205
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://topic-protocol.ixo.world/schemas/v2/record.schema.json",
|
|
4
|
+
"title": "Topic record (Protocol 2.0)",
|
|
5
|
+
"description": "An accepted fact posted into a Topic thread: a decision, an outcome, an artifact reference, or an execution receipt. A record may supersede an earlier record of the same type.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"version",
|
|
9
|
+
"id",
|
|
10
|
+
"topicId",
|
|
11
|
+
"type",
|
|
12
|
+
"text",
|
|
13
|
+
"author",
|
|
14
|
+
"createdAt"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"version": {
|
|
18
|
+
"const": 2
|
|
19
|
+
},
|
|
20
|
+
"id": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^ixo:topic-record:[A-Za-z0-9._-]{8,128}$",
|
|
23
|
+
"description": "Writers SHOULD use a UUIDv7 suffix."
|
|
24
|
+
},
|
|
25
|
+
"topicId": {
|
|
26
|
+
"$ref": "common.schema.json#/$defs/topicId"
|
|
27
|
+
},
|
|
28
|
+
"type": {
|
|
29
|
+
"$ref": "common.schema.json#/$defs/recordType"
|
|
30
|
+
},
|
|
31
|
+
"text": {
|
|
32
|
+
"$ref": "common.schema.json#/$defs/text"
|
|
33
|
+
},
|
|
34
|
+
"author": {
|
|
35
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
36
|
+
},
|
|
37
|
+
"createdAt": {
|
|
38
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
39
|
+
},
|
|
40
|
+
"refs": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"$ref": "common.schema.json#/$defs/ref"
|
|
44
|
+
},
|
|
45
|
+
"maxItems": 20
|
|
46
|
+
},
|
|
47
|
+
"data": {
|
|
48
|
+
"type": "object"
|
|
49
|
+
},
|
|
50
|
+
"supersedes": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^ixo:topic-record:[A-Za-z0-9._-]{8,128}$"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"additionalProperties": false
|
|
56
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://topic-protocol.ixo.world/schemas/v2/topic.schema.json",
|
|
4
|
+
"title": "Topic manifest (Protocol 2.0)",
|
|
5
|
+
"description": "The immutable content of a Topic root event. Status is not stored here: a new Topic is open, and status changes are operations.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"version",
|
|
9
|
+
"id",
|
|
10
|
+
"title",
|
|
11
|
+
"kind",
|
|
12
|
+
"createdBy",
|
|
13
|
+
"createdAt"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"version": {
|
|
17
|
+
"const": 2
|
|
18
|
+
},
|
|
19
|
+
"id": {
|
|
20
|
+
"$ref": "common.schema.json#/$defs/topicId"
|
|
21
|
+
},
|
|
22
|
+
"title": {
|
|
23
|
+
"$ref": "common.schema.json#/$defs/title"
|
|
24
|
+
},
|
|
25
|
+
"kind": {
|
|
26
|
+
"$ref": "common.schema.json#/$defs/kind"
|
|
27
|
+
},
|
|
28
|
+
"baseKind": {
|
|
29
|
+
"$ref": "common.schema.json#/$defs/baseKind"
|
|
30
|
+
},
|
|
31
|
+
"createdBy": {
|
|
32
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
33
|
+
},
|
|
34
|
+
"createdAt": {
|
|
35
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
36
|
+
},
|
|
37
|
+
"owner": {
|
|
38
|
+
"$ref": "common.schema.json#/$defs/actor"
|
|
39
|
+
},
|
|
40
|
+
"due": {
|
|
41
|
+
"$ref": "common.schema.json#/$defs/dateTime"
|
|
42
|
+
},
|
|
43
|
+
"intent": {
|
|
44
|
+
"$ref": "common.schema.json#/$defs/text"
|
|
45
|
+
},
|
|
46
|
+
"outcome": {
|
|
47
|
+
"$ref": "common.schema.json#/$defs/text"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"if": {
|
|
51
|
+
"properties": {
|
|
52
|
+
"kind": {
|
|
53
|
+
"enum": [
|
|
54
|
+
"discussion",
|
|
55
|
+
"question",
|
|
56
|
+
"task",
|
|
57
|
+
"project"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": [
|
|
62
|
+
"kind"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"then": {
|
|
66
|
+
"not": {
|
|
67
|
+
"properties": {
|
|
68
|
+
"baseKind": true
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"baseKind"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"else": {
|
|
76
|
+
"properties": {
|
|
77
|
+
"baseKind": true
|
|
78
|
+
},
|
|
79
|
+
"required": [
|
|
80
|
+
"baseKind"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
}
|
|
@@ -4933,6 +4933,10 @@ export declare const SCHEMA_REGISTRY: Readonly<{
|
|
|
4933
4933
|
lastOperationId: {
|
|
4934
4934
|
type: string;
|
|
4935
4935
|
};
|
|
4936
|
+
waiverReason: {
|
|
4937
|
+
type: string;
|
|
4938
|
+
minLength: number;
|
|
4939
|
+
};
|
|
4936
4940
|
};
|
|
4937
4941
|
additionalProperties: boolean;
|
|
4938
4942
|
};
|
|
@@ -7433,6 +7437,10 @@ export declare const SCHEMA_REGISTRY: Readonly<{
|
|
|
7433
7437
|
finality: {
|
|
7434
7438
|
enum: string[];
|
|
7435
7439
|
};
|
|
7440
|
+
status: {
|
|
7441
|
+
type: string;
|
|
7442
|
+
minLength: number;
|
|
7443
|
+
};
|
|
7436
7444
|
};
|
|
7437
7445
|
additionalProperties: boolean;
|
|
7438
7446
|
};
|