@kumwe/studio-protocol 0.1.0-alpha.10

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.
Files changed (77) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +77 -0
  3. package/THIRD_PARTY_NOTICES.md +9 -0
  4. package/dist/generated/schema-models.d.ts +1968 -0
  5. package/dist/generated/schema-models.d.ts.map +1 -0
  6. package/dist/generated/schema-models.js +76 -0
  7. package/dist/generated/schema-models.js.map +1 -0
  8. package/dist/guards.d.ts +7 -0
  9. package/dist/guards.d.ts.map +1 -0
  10. package/dist/guards.js +374 -0
  11. package/dist/guards.js.map +1 -0
  12. package/dist/host-failure.d.ts +16 -0
  13. package/dist/host-failure.d.ts.map +1 -0
  14. package/dist/host-failure.js +27 -0
  15. package/dist/host-failure.js.map +1 -0
  16. package/dist/index.d.ts +7 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +6 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/schemas.d.ts +50 -0
  21. package/dist/schemas.d.ts.map +1 -0
  22. package/dist/schemas.js +144 -0
  23. package/dist/schemas.js.map +1 -0
  24. package/dist/types.d.ts +1256 -0
  25. package/dist/types.d.ts.map +1 -0
  26. package/dist/types.js +8 -0
  27. package/dist/types.js.map +1 -0
  28. package/package.json +42 -0
  29. package/schemas/authoring-message-catalog.schema.json +45 -0
  30. package/schemas/authoring-web-vector.schema.json +236 -0
  31. package/schemas/binding-projection-vector.schema.json +127 -0
  32. package/schemas/block-definition.schema.json +227 -0
  33. package/schemas/blueprint.schema.json +273 -0
  34. package/schemas/canonical-vector.schema.json +65 -0
  35. package/schemas/command-vector.schema.json +68 -0
  36. package/schemas/command.schema.json +410 -0
  37. package/schemas/common.schema.json +222 -0
  38. package/schemas/content-model.schema.json +216 -0
  39. package/schemas/corpus-manifest.schema.json +48 -0
  40. package/schemas/design-vocabulary.schema.json +91 -0
  41. package/schemas/entry.schema.json +32 -0
  42. package/schemas/field-adapter.schema.json +51 -0
  43. package/schemas/host-capabilities.schema.json +65 -0
  44. package/schemas/host-error.schema.json +42 -0
  45. package/schemas/host-operations.schema.json +162 -0
  46. package/schemas/host-request.schema.json +71 -0
  47. package/schemas/host-result.schema.json +19 -0
  48. package/schemas/host-sequence-vector.schema.json +342 -0
  49. package/schemas/host-vector.schema.json +199 -0
  50. package/schemas/inspector.schema.json +44 -0
  51. package/schemas/manifest.json +246 -0
  52. package/schemas/media-asset.schema.json +83 -0
  53. package/schemas/media-reference.schema.json +112 -0
  54. package/schemas/media-upload-grant.schema.json +48 -0
  55. package/schemas/media-upload-session.schema.json +109 -0
  56. package/schemas/media-vector.schema.json +123 -0
  57. package/schemas/migration.schema.json +41 -0
  58. package/schemas/pattern.schema.json +50 -0
  59. package/schemas/plugin-manifest.schema.json +126 -0
  60. package/schemas/preview-message.schema.json +583 -0
  61. package/schemas/preview-vector.schema.json +52 -0
  62. package/schemas/provenance.schema.json +57 -0
  63. package/schemas/renderer-web-vector.schema.json +160 -0
  64. package/schemas/rich-text-projection.schema.json +79 -0
  65. package/schemas/rich-text.schema.json +323 -0
  66. package/schemas/schema-profile-vector.schema.json +133 -0
  67. package/schemas/schema-profile.schema.json +201 -0
  68. package/schemas/studio-chart.schema.json +35 -0
  69. package/schemas/studio-config.schema.json +244 -0
  70. package/schemas/studio-drawing.schema.json +44 -0
  71. package/schemas/studio-money.schema.json +16 -0
  72. package/schemas/studio-presentation.schema.json +31 -0
  73. package/schemas/studio-release.schema.json +81 -0
  74. package/schemas/studio-table.schema.json +27 -0
  75. package/schemas/theme.schema.json +164 -0
  76. package/schemas/unresolved-contribution.schema.json +50 -0
  77. package/studio-release.json +18 -0
@@ -0,0 +1,216 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/content-model.schema.json",
4
+ "title": "Studio content model",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "contractVersion",
9
+ "kind",
10
+ "id",
11
+ "version",
12
+ "revision",
13
+ "owner",
14
+ "status",
15
+ "label",
16
+ "fields",
17
+ "relationships"
18
+ ],
19
+ "properties": {
20
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
21
+ "kind": { "const": "content-model" },
22
+ "id": { "$ref": "common.schema.json#/$defs/stableId" },
23
+ "version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
24
+ "revision": { "$ref": "common.schema.json#/$defs/revision" },
25
+ "owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
26
+ "status": { "enum": ["draft", "published", "retired"] },
27
+ "label": { "$ref": "common.schema.json#/$defs/messageReference" },
28
+ "description": { "$ref": "common.schema.json#/$defs/messageReference" },
29
+ "fields": {
30
+ "type": "array",
31
+ "minItems": 0,
32
+ "maxItems": 1000,
33
+ "items": { "$ref": "#/$defs/field" }
34
+ },
35
+ "relationships": {
36
+ "type": "array",
37
+ "maxItems": 1000,
38
+ "items": { "$ref": "#/$defs/relationship" }
39
+ },
40
+ "extensions": { "$ref": "common.schema.json#/$defs/extensions" }
41
+ },
42
+ "allOf": [
43
+ {
44
+ "if": {
45
+ "properties": { "status": { "const": "published" } },
46
+ "required": ["status"]
47
+ },
48
+ "then": {
49
+ "properties": {
50
+ "fields": { "type": "array", "minItems": 1 }
51
+ }
52
+ }
53
+ }
54
+ ],
55
+ "$defs": {
56
+ "field": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["id", "kind", "label", "required", "localized", "cardinality"],
60
+ "properties": {
61
+ "id": { "$ref": "common.schema.json#/$defs/localName" },
62
+ "kind": {
63
+ "oneOf": [
64
+ {
65
+ "enum": [
66
+ "string",
67
+ "rich-text",
68
+ "boolean",
69
+ "integer",
70
+ "decimal",
71
+ "money",
72
+ "date",
73
+ "date-time",
74
+ "enum",
75
+ "media",
76
+ "resource",
77
+ "object",
78
+ "collection"
79
+ ]
80
+ },
81
+ { "$ref": "common.schema.json#/$defs/qualifiedName" }
82
+ ]
83
+ },
84
+ "label": { "$ref": "common.schema.json#/$defs/messageReference" },
85
+ "description": { "$ref": "common.schema.json#/$defs/messageReference" },
86
+ "required": { "type": "boolean" },
87
+ "localized": { "type": "boolean" },
88
+ "cardinality": { "enum": ["one", "many"] },
89
+ "semanticRole": { "$ref": "common.schema.json#/$defs/qualifiedName" },
90
+ "defaultValue": { "$ref": "common.schema.json#/$defs/jsonValue" },
91
+ "authoring": { "$ref": "#/$defs/authoringMetadata" },
92
+ "constraints": {
93
+ "type": "object",
94
+ "additionalProperties": false,
95
+ "properties": {
96
+ "minimum": {
97
+ "type": "string",
98
+ "pattern": "^-?(0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
99
+ "maxLength": 200
100
+ },
101
+ "maximum": {
102
+ "type": "string",
103
+ "pattern": "^-?(0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
104
+ "maxLength": 200
105
+ },
106
+ "scale": { "type": "integer", "minimum": 0, "maximum": 100 },
107
+ "minLength": { "type": "integer", "minimum": 0, "maximum": 10000000 },
108
+ "maxLength": { "type": "integer", "minimum": 0, "maximum": 10000000 },
109
+ "validator": {
110
+ "$ref": "common.schema.json#/$defs/qualifiedName"
111
+ },
112
+ "validatorArguments": {
113
+ "type": "object",
114
+ "maxProperties": 20,
115
+ "propertyNames": {
116
+ "$ref": "common.schema.json#/$defs/safeJsonMemberName"
117
+ },
118
+ "additionalProperties": {
119
+ "$ref": "common.schema.json#/$defs/jsonValue"
120
+ }
121
+ },
122
+ "minItems": { "type": "integer", "minimum": 0, "maximum": 100000 },
123
+ "maxItems": { "type": "integer", "minimum": 0, "maximum": 100000 },
124
+ "allowedMediaKinds": {
125
+ "type": "array",
126
+ "maxItems": 50,
127
+ "uniqueItems": true,
128
+ "items": { "enum": ["image", "video", "audio", "document", "archive", "other"] }
129
+ }
130
+ }
131
+ },
132
+ "enumValues": {
133
+ "type": "array",
134
+ "minItems": 1,
135
+ "maxItems": 1000,
136
+ "items": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": ["value", "label"],
140
+ "properties": {
141
+ "value": { "$ref": "common.schema.json#/$defs/localName" },
142
+ "label": { "$ref": "common.schema.json#/$defs/messageReference" }
143
+ }
144
+ }
145
+ },
146
+ "fields": {
147
+ "type": "array",
148
+ "maxItems": 1000,
149
+ "items": { "$ref": "#/$defs/field" }
150
+ },
151
+ "itemKind": {
152
+ "oneOf": [
153
+ {
154
+ "enum": [
155
+ "string",
156
+ "rich-text",
157
+ "boolean",
158
+ "integer",
159
+ "decimal",
160
+ "money",
161
+ "date",
162
+ "date-time",
163
+ "enum",
164
+ "media",
165
+ "resource",
166
+ "object"
167
+ ]
168
+ },
169
+ { "$ref": "common.schema.json#/$defs/qualifiedName" }
170
+ ]
171
+ },
172
+ "extensions": { "$ref": "common.schema.json#/$defs/extensions" }
173
+ }
174
+ },
175
+ "authoringMetadata": {
176
+ "type": "object",
177
+ "additionalProperties": false,
178
+ "properties": {
179
+ "control": { "$ref": "common.schema.json#/$defs/qualifiedName" },
180
+ "placeholder": { "$ref": "common.schema.json#/$defs/messageReference" },
181
+ "group": { "$ref": "common.schema.json#/$defs/localName" },
182
+ "order": { "type": "integer", "minimum": 0, "maximum": 100000 },
183
+ "readOnly": { "type": "boolean" },
184
+ "hidden": { "type": "boolean" },
185
+ "width": { "enum": ["full", "half", "third", "two-thirds"] }
186
+ }
187
+ },
188
+ "relationship": {
189
+ "type": "object",
190
+ "additionalProperties": false,
191
+ "required": ["id", "kind", "label", "sourceField", "targetModel", "required", "onDelete"],
192
+ "properties": {
193
+ "id": { "$ref": "common.schema.json#/$defs/localName" },
194
+ "kind": { "enum": ["one-to-one", "many-to-one", "one-to-many", "many-to-many"] },
195
+ "label": { "$ref": "common.schema.json#/$defs/messageReference" },
196
+ "sourceField": { "$ref": "common.schema.json#/$defs/localName" },
197
+ "targetModel": { "$ref": "common.schema.json#/$defs/artifactReference" },
198
+ "targetField": { "$ref": "common.schema.json#/$defs/localName" },
199
+ "required": { "type": "boolean" },
200
+ "onDelete": { "enum": ["restrict", "nullify", "detach"] },
201
+ "authoring": {
202
+ "type": "object",
203
+ "additionalProperties": false,
204
+ "required": ["control", "allowCreate"],
205
+ "properties": {
206
+ "control": { "$ref": "common.schema.json#/$defs/qualifiedName" },
207
+ "allowCreate": { "type": "boolean" },
208
+ "displayField": { "$ref": "common.schema.json#/$defs/localName" },
209
+ "searchProvider": { "$ref": "common.schema.json#/$defs/qualifiedName" }
210
+ }
211
+ },
212
+ "extensions": { "$ref": "common.schema.json#/$defs/extensions" }
213
+ }
214
+ }
215
+ }
216
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/corpus-manifest.schema.json",
4
+ "title": "Studio corpus integrity manifest",
5
+ "description": "The digest of every file in the published conformance corpus, grouped by the directory it ships in. A host that vendors the corpus verifies its copy against this manifest, so a stale or altered fixture is detected before it silently changes what a conformance claim means. The schema manifest covers the schemas; this covers everything replayed against them.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "kind", "groups"],
9
+ "properties": {
10
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
11
+ "kind": { "const": "corpus-manifest" },
12
+ "groups": {
13
+ "type": "array",
14
+ "minItems": 1,
15
+ "maxItems": 50,
16
+ "items": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["files", "group", "path"],
20
+ "properties": {
21
+ "files": {
22
+ "type": "array",
23
+ "maxItems": 5000,
24
+ "items": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["digest", "file"],
28
+ "properties": {
29
+ "digest": { "$ref": "common.schema.json#/$defs/integrity" },
30
+ "file": { "type": "string", "minLength": 1, "maxLength": 200 }
31
+ }
32
+ }
33
+ },
34
+ "group": {
35
+ "description": "The stable name of the corpus group.",
36
+ "$ref": "common.schema.json#/$defs/localName"
37
+ },
38
+ "path": {
39
+ "description": "The package-relative directory the group ships in.",
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "maxLength": 200
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/design-vocabulary.schema.json",
4
+ "title": "Studio design vocabulary contribution",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "contractVersion",
9
+ "kind",
10
+ "id",
11
+ "version",
12
+ "owner",
13
+ "label",
14
+ "designControls",
15
+ "recipes"
16
+ ],
17
+ "properties": {
18
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
19
+ "kind": { "const": "design-vocabulary" },
20
+ "id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
21
+ "version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
22
+ "owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
23
+ "label": { "$ref": "common.schema.json#/$defs/messageReference" },
24
+ "description": { "$ref": "common.schema.json#/$defs/messageReference" },
25
+ "designControls": {
26
+ "type": "array",
27
+ "maxItems": 1000,
28
+ "items": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["id", "kind", "label", "choices"],
32
+ "properties": {
33
+ "id": { "$ref": "common.schema.json#/$defs/localName" },
34
+ "kind": {
35
+ "enum": [
36
+ "color-role",
37
+ "typography-role",
38
+ "spacing-role",
39
+ "size-role",
40
+ "radius-role",
41
+ "shadow-role",
42
+ "motion-role",
43
+ "layer-role",
44
+ "enum",
45
+ "boolean",
46
+ "integer"
47
+ ]
48
+ },
49
+ "label": { "$ref": "common.schema.json#/$defs/messageReference" },
50
+ "description": { "$ref": "common.schema.json#/$defs/messageReference" },
51
+ "choices": {
52
+ "type": "array",
53
+ "minItems": 1,
54
+ "maxItems": 500,
55
+ "items": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": ["id", "label"],
59
+ "properties": {
60
+ "id": { "$ref": "common.schema.json#/$defs/localName" },
61
+ "label": { "$ref": "common.schema.json#/$defs/messageReference" },
62
+ "deprecated": { "type": "boolean" }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "recipes": {
70
+ "type": "array",
71
+ "maxItems": 1000,
72
+ "items": {
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": ["id", "blockType", "label", "designValues"],
76
+ "properties": {
77
+ "id": { "$ref": "common.schema.json#/$defs/localName" },
78
+ "blockType": { "$ref": "common.schema.json#/$defs/qualifiedName" },
79
+ "label": { "$ref": "common.schema.json#/$defs/messageReference" },
80
+ "designValues": {
81
+ "type": "object",
82
+ "maxProperties": 100,
83
+ "propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
84
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "extensions": { "$ref": "common.schema.json#/$defs/extensions" }
90
+ }
91
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/entry.schema.json",
4
+ "title": "Studio content entry",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["contractVersion", "kind", "id", "revision", "model", "status", "values"],
8
+ "properties": {
9
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
10
+ "kind": { "const": "entry" },
11
+ "id": { "$ref": "common.schema.json#/$defs/stableId" },
12
+ "revision": { "$ref": "common.schema.json#/$defs/revision" },
13
+ "model": { "$ref": "common.schema.json#/$defs/lockedArtifactReference" },
14
+ "status": { "enum": ["draft", "in-review", "published", "archived"] },
15
+ "locale": { "$ref": "common.schema.json#/$defs/locale" },
16
+ "translationOf": { "$ref": "common.schema.json#/$defs/stableId" },
17
+ "workflowState": { "$ref": "common.schema.json#/$defs/qualifiedName" },
18
+ "values": {
19
+ "type": "object",
20
+ "maxProperties": 10000,
21
+ "propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
22
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
23
+ },
24
+ "compositionOverrides": {
25
+ "type": "object",
26
+ "maxProperties": 1000,
27
+ "propertyNames": { "$ref": "common.schema.json#/$defs/stableId" },
28
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
29
+ },
30
+ "extensions": { "$ref": "common.schema.json#/$defs/extensions" }
31
+ }
32
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/field-adapter.schema.json",
4
+ "title": "Studio field adapter contribution",
5
+ "description": "The declarative payload behind a `field-adapter` plugin contribution: a control an extension offers for editing a declared field kind. The declaration is inert data - it names the control, the field kinds it accepts, the capability its executable half requires, and the bounded option schema an author configures it through. It never carries markup, styles or code.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "contractVersion",
10
+ "kind",
11
+ "id",
12
+ "version",
13
+ "owner",
14
+ "label",
15
+ "control",
16
+ "fieldKinds"
17
+ ],
18
+ "properties": {
19
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
20
+ "kind": { "const": "field-adapter" },
21
+ "id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
22
+ "version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
23
+ "owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
24
+ "label": { "$ref": "common.schema.json#/$defs/messageReference" },
25
+ "description": { "$ref": "common.schema.json#/$defs/messageReference" },
26
+ "control": {
27
+ "description": "The control identifier a field's authoring metadata names to select this adapter.",
28
+ "$ref": "common.schema.json#/$defs/qualifiedName"
29
+ },
30
+ "fieldKinds": {
31
+ "description": "The field kinds this control accepts. A field of any other kind never resolves to it.",
32
+ "type": "array",
33
+ "minItems": 1,
34
+ "maxItems": 50,
35
+ "uniqueItems": true,
36
+ "items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
37
+ },
38
+ "optionSchema": {
39
+ "description": "The bounded schema an author's control options validate against, inside the Studio Schema Profile exactly like a contributed block's property schema.",
40
+ "type": "object",
41
+ "maxProperties": 100,
42
+ "propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
43
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
44
+ },
45
+ "requiredCapability": {
46
+ "description": "The capability the executable half requires. A declaration without one is inspectable but never executed.",
47
+ "$ref": "common.schema.json#/$defs/qualifiedName"
48
+ },
49
+ "extensions": { "$ref": "common.schema.json#/$defs/extensions" }
50
+ }
51
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/host-capabilities.schema.json",
4
+ "title": "Studio host capabilities",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["contractVersion", "kind", "host", "protocolVersions", "ports", "capabilities"],
8
+ "properties": {
9
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
10
+ "kind": { "const": "host-capabilities" },
11
+ "host": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["id", "version", "generation"],
15
+ "properties": {
16
+ "id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
17
+ "version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
18
+ "generation": { "$ref": "common.schema.json#/$defs/revision" }
19
+ }
20
+ },
21
+ "protocolVersions": {
22
+ "type": "array",
23
+ "minItems": 1,
24
+ "maxItems": 20,
25
+ "uniqueItems": true,
26
+ "items": { "$ref": "common.schema.json#/$defs/semanticVersion" }
27
+ },
28
+ "ports": {
29
+ "type": "array",
30
+ "maxItems": 100,
31
+ "items": {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["id", "version", "operations"],
35
+ "properties": {
36
+ "id": { "$ref": "host-operations.schema.json#/$defs/portCapability" },
37
+ "version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
38
+ "operations": {
39
+ "description": "The operations this host actually implements, closed by the operation registry so a capability document cannot advertise an operation that is not on the wire.",
40
+ "type": "array",
41
+ "minItems": 1,
42
+ "maxItems": 100,
43
+ "uniqueItems": true,
44
+ "items": { "$ref": "host-operations.schema.json#/$defs/operationCapability" }
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "capabilities": {
50
+ "type": "array",
51
+ "maxItems": 500,
52
+ "items": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": ["id", "version"],
56
+ "properties": {
57
+ "id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
58
+ "version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
59
+ "configuration": { "$ref": "common.schema.json#/$defs/jsonValue" }
60
+ }
61
+ }
62
+ },
63
+ "extensions": { "$ref": "common.schema.json#/$defs/extensions" }
64
+ }
65
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/host-error.schema.json",
4
+ "title": "Studio host port error",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["contractVersion", "kind", "category", "message", "retryable"],
8
+ "properties": {
9
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
10
+ "kind": { "const": "host-error" },
11
+ "category": {
12
+ "enum": [
13
+ "invalid-request",
14
+ "unauthenticated",
15
+ "forbidden",
16
+ "not-found",
17
+ "conflict",
18
+ "validation-failed",
19
+ "incompatible",
20
+ "limit-exceeded",
21
+ "rate-limited",
22
+ "unavailable",
23
+ "cancelled",
24
+ "internal"
25
+ ]
26
+ },
27
+ "correlationId": { "$ref": "common.schema.json#/$defs/stableId" },
28
+ "message": { "$ref": "common.schema.json#/$defs/messageReference" },
29
+ "retryable": { "type": "boolean" },
30
+ "retryAfterMilliseconds": {
31
+ "type": "integer",
32
+ "minimum": 0,
33
+ "maximum": 86400000
34
+ },
35
+ "revision": { "$ref": "common.schema.json#/$defs/revision" },
36
+ "diagnostics": {
37
+ "type": "array",
38
+ "maxItems": 1000,
39
+ "items": { "$ref": "common.schema.json#/$defs/diagnostic" }
40
+ }
41
+ }
42
+ }