@cloudhal/core-contracts 0.3.4 → 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,51 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cloudhal.dev/schemas/v1/skill-manifest.schema.json",
4
- "title": "SkillManifest",
5
- "description": "YAML frontmatter of a SKILL.md, exactly the six fields of the Agent Skills specification (agentskills.io). Cloudhal-specific data goes under `metadata` as flat string keys prefixed `cloudhal.` (schemaVersion, requiresCapabilities, scopes, approval); nested vendor blocks are rejected by hosted skill uploaders.",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": [
9
- "name",
10
- "description"
11
- ],
12
- "properties": {
13
- "name": {
14
- "type": "string",
15
- "description": "Lower-case kebab-case; must equal the skill directory name.",
16
- "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
17
- "minLength": 1,
18
- "maxLength": 64
19
- },
20
- "description": {
21
- "type": "string",
22
- "minLength": 1,
23
- "maxLength": 1024
24
- },
25
- "license": {
26
- "type": "string",
27
- "maxLength": 200
28
- },
29
- "compatibility": {
30
- "type": "string",
31
- "maxLength": 500
32
- },
33
- "metadata": {
34
- "$ref": "#/$defs/Metadata"
35
- },
36
- "allowed-tools": {
37
- "type": "string",
38
- "description": "Space-separated tool names the skill may call (experimental in the spec).",
39
- "maxLength": 2000
40
- }
41
- },
42
- "$defs": {
43
- "Metadata": {
44
- "type": "object",
45
- "description": "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).",
46
- "additionalProperties": {
47
- "type": "string"
48
- }
49
- }
50
- }
51
- }
@@ -1,192 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cloudhal.dev/schemas/v1/snapshot.schema.json",
4
- "title": "Snapshot",
5
- "description": "Immutable record of a site's node set at one instant: which nodes existed, at which revision, with which content hash. Every mutation by an agent produces one; publish and rollback point the site at one. Node bodies are stored by hash in the blob store, not here.",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": [
9
- "schemaVersion",
10
- "id",
11
- "siteId",
12
- "siteRev",
13
- "reason",
14
- "actor",
15
- "nodes",
16
- "summary",
17
- "createdAt"
18
- ],
19
- "properties": {
20
- "schemaVersion": {
21
- "$ref": "#/$defs/SchemaVersion"
22
- },
23
- "id": {
24
- "$ref": "#/$defs/Id"
25
- },
26
- "siteId": {
27
- "$ref": "#/$defs/Id"
28
- },
29
- "parentId": {
30
- "$ref": "#/$defs/Id",
31
- "description": "Previous snapshot in this site's history; absent for the first one."
32
- },
33
- "siteRev": {
34
- "$ref": "#/$defs/Revision"
35
- },
36
- "reason": {
37
- "type": "string",
38
- "enum": [
39
- "manual",
40
- "agentMutation",
41
- "publish",
42
- "rollback",
43
- "scheduled",
44
- "import"
45
- ]
46
- },
47
- "label": {
48
- "type": "string",
49
- "maxLength": 200
50
- },
51
- "actor": {
52
- "$ref": "#/$defs/Actor"
53
- },
54
- "nodes": {
55
- "type": "array",
56
- "items": {
57
- "$ref": "#/$defs/NodeRef"
58
- }
59
- },
60
- "summary": {
61
- "$ref": "#/$defs/ChangeSummary"
62
- },
63
- "createdAt": {
64
- "$ref": "#/$defs/Timestamp"
65
- },
66
- "metadata": {
67
- "$ref": "#/$defs/Metadata"
68
- }
69
- },
70
- "$defs": {
71
- "Actor": {
72
- "type": "object",
73
- "additionalProperties": false,
74
- "required": [
75
- "kind",
76
- "id"
77
- ],
78
- "properties": {
79
- "kind": {
80
- "$ref": "#/$defs/ActorKind"
81
- },
82
- "id": {
83
- "$ref": "#/$defs/Id"
84
- },
85
- "name": {
86
- "type": "string",
87
- "maxLength": 200
88
- }
89
- }
90
- },
91
- "ActorKind": {
92
- "type": "string",
93
- "description": "Who performed an action. Humans and agents share one actor model so the policy engine treats them uniformly.",
94
- "enum": [
95
- "human",
96
- "agent",
97
- "system"
98
- ]
99
- },
100
- "ChangeSummary": {
101
- "type": "object",
102
- "additionalProperties": false,
103
- "required": [
104
- "added",
105
- "changed",
106
- "removed"
107
- ],
108
- "properties": {
109
- "added": {
110
- "type": "integer",
111
- "minimum": 0
112
- },
113
- "changed": {
114
- "type": "integer",
115
- "minimum": 0
116
- },
117
- "removed": {
118
- "type": "integer",
119
- "minimum": 0
120
- }
121
- }
122
- },
123
- "Id": {
124
- "type": "string",
125
- "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.",
126
- "pattern": "^[a-z]+_[A-Za-z0-9]{6,32}$",
127
- "minLength": 8,
128
- "maxLength": 48
129
- },
130
- "Metadata": {
131
- "type": "object",
132
- "description": "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).",
133
- "additionalProperties": {
134
- "type": "string"
135
- }
136
- },
137
- "NodeRef": {
138
- "type": "object",
139
- "additionalProperties": false,
140
- "required": [
141
- "id",
142
- "kind",
143
- "rev",
144
- "hash"
145
- ],
146
- "properties": {
147
- "id": {
148
- "$ref": "#/$defs/Id"
149
- },
150
- "kind": {
151
- "type": "string",
152
- "enum": [
153
- "site",
154
- "page",
155
- "contentEntry",
156
- "taxonomy",
157
- "term",
158
- "redirect",
159
- "menu",
160
- "asset",
161
- "glossary"
162
- ]
163
- },
164
- "rev": {
165
- "$ref": "#/$defs/Revision"
166
- },
167
- "hash": {
168
- "type": "string",
169
- "description": "Lower-case hex SHA-256 of the node's canonical JSON.",
170
- "pattern": "^[0-9a-f]{64}$"
171
- }
172
- }
173
- },
174
- "Revision": {
175
- "type": "integer",
176
- "description": "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).",
177
- "minimum": 0
178
- },
179
- "SchemaVersion": {
180
- "type": "integer",
181
- "description": "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.",
182
- "enum": [
183
- 1
184
- ]
185
- },
186
- "Timestamp": {
187
- "type": "string",
188
- "description": "RFC 3339 / ISO 8601 instant in UTC.",
189
- "format": "date-time"
190
- }
191
- }
192
- }
@@ -1,200 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cloudhal.dev/schemas/v1/taxonomy.schema.json",
4
- "title": "Taxonomy",
5
- "description": "A classification scheme of a site (e.g. 'category', 'tag', 'series') and its rules: hierarchy, who may create terms, how many terms an entry takes, and how its archives are published. Terms are separate nodes (term.schema.json) that point here by id (RFC-0002).",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": [
9
- "schemaVersion",
10
- "id",
11
- "siteId",
12
- "key",
13
- "labels",
14
- "hierarchical",
15
- "allowNewTerms",
16
- "required",
17
- "archive",
18
- "feed",
19
- "minEntriesToIndex",
20
- "rev",
21
- "createdAt",
22
- "updatedAt"
23
- ],
24
- "properties": {
25
- "schemaVersion": {
26
- "$ref": "#/$defs/SchemaVersion"
27
- },
28
- "id": {
29
- "$ref": "#/$defs/Id"
30
- },
31
- "siteId": {
32
- "$ref": "#/$defs/Id"
33
- },
34
- "key": {
35
- "$ref": "#/$defs/Slug",
36
- "description": "Stable name of the taxonomy, unique per site and immutable once created. ContentEntry.terms and filter expressions use it (e.g. 'category:news')."
37
- },
38
- "labels": {
39
- "type": "object",
40
- "description": "Display names per locale. Must contain the site's default locale.",
41
- "propertyNames": {
42
- "$ref": "#/$defs/Locale"
43
- },
44
- "minProperties": 1,
45
- "additionalProperties": {
46
- "$ref": "#/$defs/TaxonomyLabel"
47
- }
48
- },
49
- "hierarchical": {
50
- "type": "boolean",
51
- "description": "Terms may have a parent term (categories). Flat when false (tags)."
52
- },
53
- "allowNewTerms": {
54
- "type": "string",
55
- "description": "Who may add terms. none: people only. propose: agents may create terms with status 'proposed' that wait for a person. free: agents may create active terms.",
56
- "enum": [
57
- "none",
58
- "propose",
59
- "free"
60
- ]
61
- },
62
- "required": {
63
- "type": "boolean",
64
- "description": "An entry in review or published status must have at least one term of this taxonomy and an explicit primary term."
65
- },
66
- "maxPerEntry": {
67
- "type": "integer",
68
- "description": "Most terms of this taxonomy one entry may carry. Absent: the contract limit of 50.",
69
- "minimum": 1,
70
- "maximum": 50
71
- },
72
- "collections": {
73
- "type": "array",
74
- "description": "Collections this taxonomy applies to. Absent: every collection.",
75
- "items": {
76
- "$ref": "#/$defs/Slug"
77
- },
78
- "minItems": 1,
79
- "maxItems": 50,
80
- "uniqueItems": true
81
- },
82
- "archive": {
83
- "$ref": "#/$defs/TaxonomyArchive"
84
- },
85
- "feed": {
86
- "type": "boolean",
87
- "description": "Publish an RSS feed per term at <archive.basePath>/<slug>/rss.xml. Requires archive.enabled."
88
- },
89
- "minEntriesToIndex": {
90
- "type": "integer",
91
- "description": "Archives listing fewer published entries than this are served with robots 'noindex, follow' and left out of the sitemap.",
92
- "minimum": 0,
93
- "maximum": 1000
94
- },
95
- "rev": {
96
- "$ref": "#/$defs/Revision"
97
- },
98
- "createdAt": {
99
- "$ref": "#/$defs/Timestamp"
100
- },
101
- "updatedAt": {
102
- "$ref": "#/$defs/Timestamp"
103
- },
104
- "metadata": {
105
- "$ref": "#/$defs/Metadata"
106
- }
107
- },
108
- "$defs": {
109
- "Id": {
110
- "type": "string",
111
- "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.",
112
- "pattern": "^[a-z]+_[A-Za-z0-9]{6,32}$",
113
- "minLength": 8,
114
- "maxLength": 48
115
- },
116
- "Locale": {
117
- "type": "string",
118
- "description": "BCP 47 language tag, e.g. en, tr, en-US.",
119
- "pattern": "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
120
- },
121
- "Metadata": {
122
- "type": "object",
123
- "description": "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).",
124
- "additionalProperties": {
125
- "type": "string"
126
- }
127
- },
128
- "Path": {
129
- "type": "string",
130
- "description": "Absolute URL path of a route the site owns: starts with '/', lower-case slug segments, no trailing slash except root.",
131
- "pattern": "^/(?:[a-z0-9]+(?:-[a-z0-9]+)*(?:/[a-z0-9]+(?:-[a-z0-9]+)*)*)?$",
132
- "maxLength": 1024
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
- "Slug": {
147
- "type": "string",
148
- "description": "Lower-case URL segment.",
149
- "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
150
- "minLength": 1,
151
- "maxLength": 128
152
- },
153
- "TaxonomyArchive": {
154
- "type": "object",
155
- "description": "Public archive pages: <basePath>/<term-slug> and <basePath>/<term-slug>/page/<n>.",
156
- "additionalProperties": false,
157
- "required": [
158
- "enabled",
159
- "basePath"
160
- ],
161
- "properties": {
162
- "enabled": {
163
- "type": "boolean"
164
- },
165
- "basePath": {
166
- "$ref": "#/$defs/Path"
167
- }
168
- }
169
- },
170
- "TaxonomyLabel": {
171
- "type": "object",
172
- "additionalProperties": false,
173
- "required": [
174
- "singular",
175
- "plural"
176
- ],
177
- "properties": {
178
- "singular": {
179
- "type": "string",
180
- "minLength": 1,
181
- "maxLength": 100
182
- },
183
- "plural": {
184
- "type": "string",
185
- "minLength": 1,
186
- "maxLength": 100
187
- },
188
- "description": {
189
- "type": "string",
190
- "maxLength": 1000
191
- }
192
- }
193
- },
194
- "Timestamp": {
195
- "type": "string",
196
- "description": "RFC 3339 / ISO 8601 instant in UTC.",
197
- "format": "date-time"
198
- }
199
- }
200
- }