@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,97 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cloudhal.dev/schemas/v1/project.schema.json",
4
- "title": "Project",
5
- "description": "Top-level ownership boundary. A project belongs to one owner (human or organisation) and groups one or more sites. In Cloud it maps to a tenant.",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": [
9
- "schemaVersion",
10
- "id",
11
- "name",
12
- "slug",
13
- "ownerId",
14
- "siteIds",
15
- "rev",
16
- "createdAt",
17
- "updatedAt"
18
- ],
19
- "properties": {
20
- "schemaVersion": {
21
- "$ref": "#/$defs/SchemaVersion"
22
- },
23
- "id": {
24
- "$ref": "#/$defs/Id"
25
- },
26
- "name": {
27
- "type": "string",
28
- "minLength": 1,
29
- "maxLength": 200
30
- },
31
- "slug": {
32
- "$ref": "#/$defs/Slug"
33
- },
34
- "ownerId": {
35
- "$ref": "#/$defs/Id"
36
- },
37
- "siteIds": {
38
- "type": "array",
39
- "items": {
40
- "$ref": "#/$defs/Id"
41
- },
42
- "uniqueItems": true
43
- },
44
- "rev": {
45
- "$ref": "#/$defs/Revision"
46
- },
47
- "createdAt": {
48
- "$ref": "#/$defs/Timestamp"
49
- },
50
- "updatedAt": {
51
- "$ref": "#/$defs/Timestamp"
52
- },
53
- "metadata": {
54
- "$ref": "#/$defs/Metadata"
55
- }
56
- },
57
- "$defs": {
58
- "Id": {
59
- "type": "string",
60
- "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.",
61
- "pattern": "^[a-z]+_[A-Za-z0-9]{6,32}$",
62
- "minLength": 8,
63
- "maxLength": 48
64
- },
65
- "Metadata": {
66
- "type": "object",
67
- "description": "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).",
68
- "additionalProperties": {
69
- "type": "string"
70
- }
71
- },
72
- "Revision": {
73
- "type": "integer",
74
- "description": "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).",
75
- "minimum": 0
76
- },
77
- "SchemaVersion": {
78
- "type": "integer",
79
- "description": "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.",
80
- "enum": [
81
- 1
82
- ]
83
- },
84
- "Slug": {
85
- "type": "string",
86
- "description": "Lower-case URL segment.",
87
- "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
88
- "minLength": 1,
89
- "maxLength": 128
90
- },
91
- "Timestamp": {
92
- "type": "string",
93
- "description": "RFC 3339 / ISO 8601 instant in UTC.",
94
- "format": "date-time"
95
- }
96
- }
97
- }
@@ -1,152 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cloudhal.dev/schemas/v1/redirect.schema.json",
4
- "title": "Redirect",
5
- "description": "An HTTP redirect from a path the site no longer serves. Created automatically when a published entry or a term changes slug, when terms are merged or retired, and by people. Snapshotted and published like every other node (RFC-0002).",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": [
9
- "schemaVersion",
10
- "id",
11
- "siteId",
12
- "from",
13
- "to",
14
- "status",
15
- "match",
16
- "reason",
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
- "from": {
32
- "type": "string",
33
- "description": "Request path to redirect: starts with '/', no query, fragment, backslash or trailing slash (root excepted). Unique per site and locale; never a path the site currently serves.",
34
- "pattern": "^/(?:[^\\s?#/\\\\]+(?:/[^\\s?#/\\\\]+)*)?$",
35
- "maxLength": 1024
36
- },
37
- "locale": {
38
- "$ref": "#/$defs/Locale",
39
- "description": "The locale whose URLs `from` belongs to (RFC-0033); absent means the site's default locale. `from` is the path inside that locale, without its prefix or domain. Unique per site and locale."
40
- },
41
- "to": {
42
- "type": "string",
43
- "description": "Target: a site path (may carry a query or fragment) or an absolute https URL. Protocol-relative ('//host') and backslash forms are rejected.",
44
- "pattern": "^(?:/(?![/\\\\])[^\\s\\\\]*|https://[^\\s\\\\/?#]+(?:[/?#][^\\s\\\\]*)?)$",
45
- "maxLength": 2048
46
- },
47
- "status": {
48
- "type": "integer",
49
- "description": "301 (permanent) for slug changes, merges and retirements; 302 (temporary) only for manual redirects.",
50
- "enum": [
51
- 301,
52
- 302
53
- ]
54
- },
55
- "match": {
56
- "type": "string",
57
- "description": "exact: only `from` itself. prefix: `from` and every path below it; the rest of the path is appended to `to` (archives: /tag/old/page/2 → /tag/new/page/2).",
58
- "enum": [
59
- "exact",
60
- "prefix"
61
- ]
62
- },
63
- "reason": {
64
- "type": "string",
65
- "enum": [
66
- "slug-change",
67
- "merge",
68
- "retire",
69
- "manual"
70
- ]
71
- },
72
- "source": {
73
- "$ref": "#/$defs/RedirectSource"
74
- },
75
- "note": {
76
- "type": "string",
77
- "maxLength": 500
78
- },
79
- "rev": {
80
- "$ref": "#/$defs/Revision"
81
- },
82
- "createdAt": {
83
- "$ref": "#/$defs/Timestamp"
84
- },
85
- "updatedAt": {
86
- "$ref": "#/$defs/Timestamp"
87
- },
88
- "metadata": {
89
- "$ref": "#/$defs/Metadata"
90
- }
91
- },
92
- "$defs": {
93
- "Id": {
94
- "type": "string",
95
- "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.",
96
- "pattern": "^[a-z]+_[A-Za-z0-9]{6,32}$",
97
- "minLength": 8,
98
- "maxLength": 48
99
- },
100
- "Locale": {
101
- "type": "string",
102
- "description": "BCP 47 language tag, e.g. en, tr, en-US.",
103
- "pattern": "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
104
- },
105
- "Metadata": {
106
- "type": "object",
107
- "description": "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).",
108
- "additionalProperties": {
109
- "type": "string"
110
- }
111
- },
112
- "RedirectSource": {
113
- "type": "object",
114
- "description": "The node whose earlier URL this redirect preserves (automatic redirects). Used to collapse chains on later renames and to list a node's old URLs.",
115
- "additionalProperties": false,
116
- "required": [
117
- "kind",
118
- "id"
119
- ],
120
- "properties": {
121
- "kind": {
122
- "type": "string",
123
- "enum": [
124
- "page",
125
- "contentEntry",
126
- "term"
127
- ]
128
- },
129
- "id": {
130
- "$ref": "#/$defs/Id"
131
- }
132
- }
133
- },
134
- "Revision": {
135
- "type": "integer",
136
- "description": "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).",
137
- "minimum": 0
138
- },
139
- "SchemaVersion": {
140
- "type": "integer",
141
- "description": "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.",
142
- "enum": [
143
- 1
144
- ]
145
- },
146
- "Timestamp": {
147
- "type": "string",
148
- "description": "RFC 3339 / ISO 8601 instant in UTC.",
149
- "format": "date-time"
150
- }
151
- }
152
- }