@cloudhal/core-contracts 0.3.3 → 0.3.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.
@@ -1,315 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cloudhal.dev/schemas/v1/term.schema.json",
4
- "title": "Term",
5
- "description": "One concept in a taxonomy (a category, a tag, a series). Content refers to terms by id, independent of locale; names, synonyms, archive intro and SEO are per locale. Renames, merges and retirements keep the id and leave redirects behind; `proposedBy` records the actor that proposed it (RFC-0002).",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": [
9
- "schemaVersion",
10
- "id",
11
- "siteId",
12
- "taxonomyId",
13
- "slug",
14
- "status",
15
- "visibility",
16
- "labels",
17
- "rev",
18
- "createdAt",
19
- "updatedAt"
20
- ],
21
- "properties": {
22
- "schemaVersion": {
23
- "$ref": "#/$defs/SchemaVersion"
24
- },
25
- "id": {
26
- "$ref": "#/$defs/Id"
27
- },
28
- "siteId": {
29
- "$ref": "#/$defs/Id"
30
- },
31
- "taxonomyId": {
32
- "$ref": "#/$defs/Id"
33
- },
34
- "slug": {
35
- "$ref": "#/$defs/Slug",
36
- "description": "URL segment of the term's archive; unique within its taxonomy, together with every slug in any term's slugHistory."
37
- },
38
- "status": {
39
- "type": "string",
40
- "description": "active: usable and public (subject to visibility). proposed: created by an agent, waiting for a person; assignable but never public. retired: no new assignments, no archive.",
41
- "enum": [
42
- "active",
43
- "proposed",
44
- "retired"
45
- ]
46
- },
47
- "visibility": {
48
- "type": "string",
49
- "description": "internal terms have no archive, feed or sitemap entry and are not shown on entries; themes and filters may still use them.",
50
- "enum": [
51
- "public",
52
- "internal"
53
- ]
54
- },
55
- "labels": {
56
- "type": "object",
57
- "description": "Names per locale. Must contain the site's default locale.",
58
- "propertyNames": {
59
- "$ref": "#/$defs/Locale"
60
- },
61
- "minProperties": 1,
62
- "additionalProperties": {
63
- "$ref": "#/$defs/TermLabel"
64
- }
65
- },
66
- "parentId": {
67
- "$ref": "#/$defs/Id",
68
- "description": "Parent term in the same taxonomy; only in hierarchical taxonomies. No cycles."
69
- },
70
- "position": {
71
- "type": "integer",
72
- "description": "Order among sibling terms (same taxonomy and parent), lowest first, for menus and sidebars. Terms without a position follow, by name.",
73
- "minimum": 0,
74
- "maximum": 100000
75
- },
76
- "image": {
77
- "$ref": "#/$defs/ImageRef"
78
- },
79
- "links": {
80
- "type": "array",
81
- "description": "Profile links shown with the term and given to search engines as sameAs, such as an author's pages elsewhere (RFC-0019 §1).",
82
- "maxItems": 10,
83
- "items": {
84
- "$ref": "#/$defs/Link"
85
- }
86
- },
87
- "slugHistory": {
88
- "type": "array",
89
- "description": "Earlier slugs, oldest first. Old slugs stay reserved in the taxonomy and still resolve when an agent assigns by slug.",
90
- "items": {
91
- "$ref": "#/$defs/Slug"
92
- },
93
- "minItems": 1,
94
- "maxItems": 50,
95
- "uniqueItems": true
96
- },
97
- "mergedInto": {
98
- "$ref": "#/$defs/Id",
99
- "description": "Set when this term was merged into another active term of the same taxonomy; status is then 'retired'."
100
- },
101
- "proposedBy": {
102
- "$ref": "#/$defs/Actor"
103
- },
104
- "rev": {
105
- "$ref": "#/$defs/Revision"
106
- },
107
- "createdAt": {
108
- "$ref": "#/$defs/Timestamp"
109
- },
110
- "updatedAt": {
111
- "$ref": "#/$defs/Timestamp"
112
- },
113
- "metadata": {
114
- "$ref": "#/$defs/Metadata"
115
- }
116
- },
117
- "$defs": {
118
- "Actor": {
119
- "type": "object",
120
- "additionalProperties": false,
121
- "required": [
122
- "kind",
123
- "id"
124
- ],
125
- "properties": {
126
- "kind": {
127
- "$ref": "#/$defs/ActorKind"
128
- },
129
- "id": {
130
- "$ref": "#/$defs/Id"
131
- },
132
- "name": {
133
- "type": "string",
134
- "maxLength": 200
135
- }
136
- }
137
- },
138
- "ActorKind": {
139
- "type": "string",
140
- "description": "Who performed an action. Humans and agents share one actor model so the policy engine treats them uniformly.",
141
- "enum": [
142
- "human",
143
- "agent",
144
- "system"
145
- ]
146
- },
147
- "Id": {
148
- "type": "string",
149
- "description": "Prefixed, URL-safe identifier, e.g. site_01HZX8K3Q9. The prefix names the entity kind; agents and the MCP server pass these as opaque handles.",
150
- "pattern": "^[a-z]+_[A-Za-z0-9]{6,32}$",
151
- "minLength": 8,
152
- "maxLength": 48
153
- },
154
- "ImageRef": {
155
- "type": "object",
156
- "description": "Reference to an image. With `assetId` the image is an Asset node (RFC-0004): the store writes its media URL into `src`, and its size into `width` and `height`, as a fallback for readers that do not resolve assets. Without it, `src` is a relative path or an absolute URL, as before.",
157
- "additionalProperties": false,
158
- "required": [
159
- "src",
160
- "alt"
161
- ],
162
- "properties": {
163
- "assetId": {
164
- "$ref": "#/$defs/Id",
165
- "description": "The Asset node shown (RFC-0004). Renderers that know assets resolve it and ignore `src`."
166
- },
167
- "src": {
168
- "type": "string",
169
- "minLength": 1,
170
- "maxLength": 2048
171
- },
172
- "alt": {
173
- "type": "string",
174
- "maxLength": 500
175
- },
176
- "width": {
177
- "type": "integer",
178
- "minimum": 1
179
- },
180
- "height": {
181
- "type": "integer",
182
- "minimum": 1
183
- }
184
- }
185
- },
186
- "Link": {
187
- "type": "object",
188
- "additionalProperties": false,
189
- "required": [
190
- "label",
191
- "href"
192
- ],
193
- "properties": {
194
- "label": {
195
- "type": "string",
196
- "minLength": 1,
197
- "maxLength": 200
198
- },
199
- "href": {
200
- "type": "string",
201
- "minLength": 1,
202
- "maxLength": 2048
203
- },
204
- "external": {
205
- "type": "boolean"
206
- }
207
- }
208
- },
209
- "Locale": {
210
- "type": "string",
211
- "description": "BCP 47 language tag, e.g. en, tr, en-US.",
212
- "pattern": "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
213
- },
214
- "Metadata": {
215
- "type": "object",
216
- "description": "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).",
217
- "additionalProperties": {
218
- "type": "string"
219
- }
220
- },
221
- "Revision": {
222
- "type": "integer",
223
- "description": "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).",
224
- "minimum": 0
225
- },
226
- "SchemaVersion": {
227
- "type": "integer",
228
- "description": "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.",
229
- "enum": [
230
- 1
231
- ]
232
- },
233
- "Seo": {
234
- "type": "object",
235
- "description": "Search and social metadata of a routable node (page, term archive).",
236
- "additionalProperties": false,
237
- "properties": {
238
- "title": {
239
- "type": "string",
240
- "maxLength": 300
241
- },
242
- "description": {
243
- "type": "string",
244
- "maxLength": 500
245
- },
246
- "noindex": {
247
- "type": "boolean"
248
- },
249
- "canonical": {
250
- "type": "string",
251
- "maxLength": 2048
252
- },
253
- "ogImage": {
254
- "$ref": "#/$defs/ImageRef"
255
- }
256
- }
257
- },
258
- "Slug": {
259
- "type": "string",
260
- "description": "Lower-case URL segment.",
261
- "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
262
- "minLength": 1,
263
- "maxLength": 128
264
- },
265
- "TermLabel": {
266
- "type": "object",
267
- "additionalProperties": false,
268
- "required": [
269
- "name"
270
- ],
271
- "properties": {
272
- "name": {
273
- "type": "string",
274
- "minLength": 1,
275
- "maxLength": 200
276
- },
277
- "slug": {
278
- "$ref": "#/$defs/Slug",
279
- "description": "This locale's archive slug (RFC-0033); absent uses the term's slug. Never set for the site's default locale, whose slug is the term's own; unique per taxonomy and locale."
280
- },
281
- "altNames": {
282
- "type": "array",
283
- "description": "Synonyms (SKOS altLabel). Matched when an agent or editor assigns by name; never shown as separate terms.",
284
- "items": {
285
- "type": "string",
286
- "minLength": 1,
287
- "maxLength": 200
288
- },
289
- "minItems": 1,
290
- "maxItems": 50,
291
- "uniqueItems": true
292
- },
293
- "description": {
294
- "type": "string",
295
- "description": "Markdown introduction shown at the top of the archive.",
296
- "maxLength": 20000
297
- },
298
- "role": {
299
- "type": "string",
300
- "description": "A short role or title shown with the term, such as an author's \"Senior reporter\" (RFC-0019 §1).",
301
- "minLength": 1,
302
- "maxLength": 120
303
- },
304
- "seo": {
305
- "$ref": "#/$defs/Seo"
306
- }
307
- }
308
- },
309
- "Timestamp": {
310
- "type": "string",
311
- "description": "RFC 3339 / ISO 8601 instant in UTC.",
312
- "format": "date-time"
313
- }
314
- }
315
- }