@kumwe/studio-protocol 0.1.0-alpha.6 → 0.1.0-beta.2

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 (56) hide show
  1. package/README.md +67 -7
  2. package/THIRD_PARTY_NOTICES.md +9 -0
  3. package/dist/generated/schema-models.d.ts +2750 -0
  4. package/dist/generated/schema-models.d.ts.map +1 -0
  5. package/dist/generated/schema-models.js +1 -0
  6. package/dist/guards.d.ts.map +1 -1
  7. package/dist/guards.js +1 -374
  8. package/dist/host-failure.d.ts +16 -0
  9. package/dist/host-failure.d.ts.map +1 -0
  10. package/dist/host-failure.js +1 -0
  11. package/dist/index.d.ts +6 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -4
  14. package/dist/release.d.ts +8 -0
  15. package/dist/release.d.ts.map +1 -0
  16. package/dist/release.js +1 -0
  17. package/dist/schemas.d.ts +22 -0
  18. package/dist/schemas.d.ts.map +1 -1
  19. package/dist/schemas.js +1 -102
  20. package/dist/types.d.ts +435 -2
  21. package/dist/types.d.ts.map +1 -1
  22. package/dist/types.js +1 -3
  23. package/package.json +7 -3
  24. package/schemas/authoring-http-vector.schema.json +195 -0
  25. package/schemas/authoring-http.schema.json +505 -0
  26. package/schemas/authoring-message-catalog.schema.json +45 -0
  27. package/schemas/authoring-save.schema.json +188 -0
  28. package/schemas/authoring-session.schema.json +151 -0
  29. package/schemas/authoring-target.schema.json +160 -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 +10 -1
  33. package/schemas/common.schema.json +45 -0
  34. package/schemas/host-error.schema.json +22 -1
  35. package/schemas/host-operations.schema.json +16 -0
  36. package/schemas/host-vector.schema.json +2 -0
  37. package/schemas/manifest.json +103 -9
  38. package/schemas/plugin-manifest.schema.json +1 -0
  39. package/schemas/renderer-web-vector.schema.json +273 -0
  40. package/schemas/reusable-content-type.schema.json +99 -0
  41. package/schemas/rich-text-projection.schema.json +12 -3
  42. package/schemas/rich-text.schema.json +156 -7
  43. package/schemas/studio-browser-assets.schema.json +376 -0
  44. package/schemas/studio-chart.schema.json +35 -0
  45. package/schemas/studio-config.schema.json +1 -33
  46. package/schemas/studio-deployment.schema.json +347 -0
  47. package/schemas/studio-drawing.schema.json +44 -0
  48. package/schemas/studio-money.schema.json +16 -0
  49. package/schemas/studio-presentation.schema.json +31 -0
  50. package/schemas/studio-release.schema.json +125 -0
  51. package/schemas/studio-table.schema.json +27 -0
  52. package/studio-release.json +35 -0
  53. package/dist/guards.js.map +0 -1
  54. package/dist/index.js.map +0 -1
  55. package/dist/schemas.js.map +0 -1
  56. package/dist/types.js.map +0 -1
@@ -0,0 +1,236 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/authoring-web-vector.schema.json",
4
+ "title": "Studio portable web-authoring conformance vector",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "contractVersion",
9
+ "kind",
10
+ "id",
11
+ "description",
12
+ "requirements",
13
+ "given",
14
+ "lanes",
15
+ "expect"
16
+ ],
17
+ "properties": {
18
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
19
+ "kind": { "const": "authoring-web-vector" },
20
+ "id": { "$ref": "common.schema.json#/$defs/qualifiedName" },
21
+ "description": { "type": "string", "minLength": 1, "maxLength": 1000 },
22
+ "requirements": {
23
+ "type": "array",
24
+ "minItems": 1,
25
+ "maxItems": 100,
26
+ "uniqueItems": true,
27
+ "items": { "type": "string", "pattern": "^SR-[0-9]{3}$" }
28
+ },
29
+ "given": { "$ref": "#/$defs/given" },
30
+ "lanes": {
31
+ "type": "array",
32
+ "minItems": 1,
33
+ "maxItems": 20,
34
+ "items": { "$ref": "#/$defs/lane" }
35
+ },
36
+ "expect": { "$ref": "#/$defs/observation" }
37
+ },
38
+ "$defs": {
39
+ "region": {
40
+ "enum": [
41
+ "canvas",
42
+ "command-palette",
43
+ "inspector",
44
+ "outline",
45
+ "palette",
46
+ "preview",
47
+ "viewport"
48
+ ]
49
+ },
50
+ "given": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "document",
55
+ "direction",
56
+ "locale",
57
+ "readOnly",
58
+ "reducedMotion",
59
+ "selection",
60
+ "viewport"
61
+ ],
62
+ "properties": {
63
+ "document": { "$ref": "blueprint.schema.json" },
64
+ "direction": { "enum": ["ltr", "rtl"] },
65
+ "locale": { "$ref": "common.schema.json#/$defs/locale" },
66
+ "readOnly": { "type": "boolean" },
67
+ "reducedMotion": { "type": "boolean" },
68
+ "selection": {
69
+ "oneOf": [{ "$ref": "common.schema.json#/$defs/stableId" }, { "type": "null" }]
70
+ },
71
+ "viewport": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["height", "width", "zoomPercent"],
75
+ "properties": {
76
+ "height": { "type": "integer", "minimum": 256, "maximum": 10000 },
77
+ "width": { "type": "integer", "minimum": 320, "maximum": 10000 },
78
+ "zoomPercent": { "type": "integer", "minimum": 100, "maximum": 400 }
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "lane": {
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": ["name", "surface", "steps"],
87
+ "properties": {
88
+ "name": { "$ref": "common.schema.json#/$defs/localName" },
89
+ "surface": { "enum": ["keyboard", "pointer", "structural-control"] },
90
+ "steps": {
91
+ "type": "array",
92
+ "minItems": 1,
93
+ "maxItems": 100,
94
+ "items": { "$ref": "#/$defs/action" }
95
+ }
96
+ }
97
+ },
98
+ "action": {
99
+ "oneOf": [
100
+ { "$ref": "#/$defs/focusNode" },
101
+ { "$ref": "#/$defs/keyAction" },
102
+ { "$ref": "#/$defs/dragNode" },
103
+ { "$ref": "#/$defs/activateCommand" },
104
+ { "$ref": "#/$defs/editProperty" }
105
+ ]
106
+ },
107
+ "focusNode": {
108
+ "type": "object",
109
+ "additionalProperties": false,
110
+ "required": ["kind", "nodeId", "region"],
111
+ "properties": {
112
+ "kind": { "const": "focus-node" },
113
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
114
+ "region": { "$ref": "#/$defs/region" }
115
+ }
116
+ },
117
+ "keyAction": {
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": ["kind", "key", "modifiers", "region"],
121
+ "properties": {
122
+ "kind": { "const": "key" },
123
+ "key": {
124
+ "enum": [
125
+ "ArrowDown",
126
+ "ArrowLeft",
127
+ "ArrowRight",
128
+ "ArrowUp",
129
+ "Delete",
130
+ "End",
131
+ "Enter",
132
+ "Escape",
133
+ "Home",
134
+ "Tab",
135
+ "d",
136
+ "y",
137
+ "z"
138
+ ]
139
+ },
140
+ "modifiers": {
141
+ "type": "array",
142
+ "maxItems": 4,
143
+ "uniqueItems": true,
144
+ "items": { "enum": ["Alt", "Control", "Meta", "Shift"] }
145
+ },
146
+ "region": { "$ref": "#/$defs/region" }
147
+ }
148
+ },
149
+ "dragNode": {
150
+ "type": "object",
151
+ "additionalProperties": false,
152
+ "required": ["kind", "nodeId", "destination"],
153
+ "properties": {
154
+ "kind": { "const": "drag-node" },
155
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
156
+ "destination": { "$ref": "command.schema.json#/$defs/destination" }
157
+ }
158
+ },
159
+ "activateCommand": {
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": ["kind", "region", "type", "payload"],
163
+ "properties": {
164
+ "kind": { "const": "activate-command" },
165
+ "region": { "$ref": "#/$defs/region" },
166
+ "type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
167
+ "payload": { "$ref": "#/$defs/jsonObject" }
168
+ }
169
+ },
170
+ "editProperty": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": ["kind", "nodeId", "property", "value"],
174
+ "properties": {
175
+ "kind": { "const": "edit-property" },
176
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
177
+ "property": { "$ref": "common.schema.json#/$defs/localName" },
178
+ "viewport": { "$ref": "common.schema.json#/$defs/localName" },
179
+ "value": { "$ref": "common.schema.json#/$defs/jsonValue" }
180
+ }
181
+ },
182
+ "jsonObject": {
183
+ "type": "object",
184
+ "maxProperties": 1000,
185
+ "propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
186
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
187
+ },
188
+ "observation": {
189
+ "type": "object",
190
+ "additionalProperties": false,
191
+ "required": ["announcements", "commands", "dirty", "document", "focus", "selection"],
192
+ "properties": {
193
+ "announcements": {
194
+ "type": "array",
195
+ "maxItems": 100,
196
+ "items": {
197
+ "type": "object",
198
+ "additionalProperties": false,
199
+ "required": ["key", "politeness"],
200
+ "properties": {
201
+ "key": { "$ref": "common.schema.json#/$defs/qualifiedName" },
202
+ "politeness": { "enum": ["assertive", "polite"] }
203
+ }
204
+ }
205
+ },
206
+ "commands": {
207
+ "type": "array",
208
+ "maxItems": 100,
209
+ "items": {
210
+ "type": "object",
211
+ "additionalProperties": false,
212
+ "required": ["type", "payload"],
213
+ "properties": {
214
+ "type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
215
+ "payload": { "$ref": "#/$defs/jsonObject" }
216
+ }
217
+ }
218
+ },
219
+ "dirty": { "type": "boolean" },
220
+ "document": { "$ref": "blueprint.schema.json" },
221
+ "focus": {
222
+ "type": "object",
223
+ "additionalProperties": false,
224
+ "required": ["region"],
225
+ "properties": {
226
+ "region": { "$ref": "#/$defs/region" },
227
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" }
228
+ }
229
+ },
230
+ "selection": {
231
+ "oneOf": [{ "$ref": "common.schema.json#/$defs/stableId" }, { "type": "null" }]
232
+ }
233
+ }
234
+ }
235
+ }
236
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/binding-projection-vector.schema.json",
4
+ "title": "Studio field-binding projection conformance vector",
5
+ "description": "One complete Blueprint, exact host-projected content model, locked block definitions, and the normalized field-binding affordances and diagnostics every implementation must reproduce.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "contractVersion",
10
+ "kind",
11
+ "id",
12
+ "description",
13
+ "profile",
14
+ "blueprint",
15
+ "model",
16
+ "blockDefinitions",
17
+ "expect"
18
+ ],
19
+ "properties": {
20
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
21
+ "kind": { "const": "binding-projection-vector" },
22
+ "id": { "$ref": "common.schema.json#/$defs/stableId" },
23
+ "description": { "type": "string", "minLength": 1, "maxLength": 1000 },
24
+ "profile": { "const": "studio.profile/binding-projection-v1" },
25
+ "blueprint": { "$ref": "blueprint.schema.json" },
26
+ "model": { "$ref": "content-model.schema.json" },
27
+ "blockDefinitions": {
28
+ "type": "array",
29
+ "minItems": 1,
30
+ "maxItems": 1000,
31
+ "items": { "$ref": "block-definition.schema.json" }
32
+ },
33
+ "expect": { "$ref": "#/$defs/projection" }
34
+ },
35
+ "$defs": {
36
+ "fieldPath": {
37
+ "type": "array",
38
+ "minItems": 1,
39
+ "maxItems": 32,
40
+ "items": { "$ref": "common.schema.json#/$defs/localName" }
41
+ },
42
+ "candidate": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["fieldPath", "kind", "cardinality"],
46
+ "properties": {
47
+ "fieldPath": { "$ref": "#/$defs/fieldPath" },
48
+ "kind": {
49
+ "$ref": "content-model.schema.json#/$defs/field/properties/kind"
50
+ },
51
+ "itemKind": {
52
+ "$ref": "content-model.schema.json#/$defs/field/properties/itemKind"
53
+ },
54
+ "cardinality": { "enum": ["one", "many"] },
55
+ "control": { "$ref": "common.schema.json#/$defs/qualifiedName" }
56
+ }
57
+ },
58
+ "port": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": ["port", "status", "candidates"],
62
+ "properties": {
63
+ "port": { "$ref": "common.schema.json#/$defs/localName" },
64
+ "status": { "enum": ["invalid", "non-field-source", "resolved", "unbound"] },
65
+ "bindingSourceKind": {
66
+ "enum": [
67
+ "context-value",
68
+ "entry-field",
69
+ "query-reference",
70
+ "resource-reference",
71
+ "static-value"
72
+ ]
73
+ },
74
+ "boundFieldPath": { "$ref": "#/$defs/fieldPath" },
75
+ "candidates": {
76
+ "type": "array",
77
+ "maxItems": 1000,
78
+ "items": { "$ref": "#/$defs/candidate" }
79
+ },
80
+ "multiple": { "type": "boolean" },
81
+ "required": { "type": "boolean" },
82
+ "valueType": { "type": "string", "minLength": 1, "maxLength": 200 }
83
+ }
84
+ },
85
+ "node": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": ["nodeId", "ports"],
89
+ "properties": {
90
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
91
+ "ports": {
92
+ "type": "array",
93
+ "maxItems": 100,
94
+ "items": { "$ref": "#/$defs/port" }
95
+ }
96
+ }
97
+ },
98
+ "diagnostic": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["code", "severity"],
102
+ "properties": {
103
+ "code": { "$ref": "common.schema.json#/$defs/qualifiedName" },
104
+ "severity": { "enum": ["information", "warning", "error", "blocking"] },
105
+ "location": { "$ref": "common.schema.json#/$defs/diagnosticLocation" }
106
+ }
107
+ },
108
+ "projection": {
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": ["model", "nodes", "diagnostics"],
112
+ "properties": {
113
+ "model": { "$ref": "common.schema.json#/$defs/lockedArtifactReference" },
114
+ "nodes": {
115
+ "type": "array",
116
+ "maxItems": 100000,
117
+ "items": { "$ref": "#/$defs/node" }
118
+ },
119
+ "diagnostics": {
120
+ "type": "array",
121
+ "maxItems": 100000,
122
+ "items": { "$ref": "#/$defs/diagnostic" }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
@@ -140,7 +140,16 @@
140
140
  ]
141
141
  },
142
142
  "required": { "type": "boolean" },
143
- "multiple": { "type": "boolean" }
143
+ "multiple": { "type": "boolean" },
144
+ "authoring": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "properties": {
148
+ "control": { "$ref": "common.schema.json#/$defs/qualifiedName" },
149
+ "profile": { "$ref": "common.schema.json#/$defs/qualifiedName" },
150
+ "readOnly": { "type": "boolean" }
151
+ }
152
+ }
144
153
  }
145
154
  }
146
155
  },
@@ -145,6 +145,51 @@
145
145
  "integrity": { "$ref": "#/$defs/integrity" }
146
146
  }
147
147
  },
148
+ "resourceIdentity": {
149
+ "type": "object",
150
+ "additionalProperties": false,
151
+ "required": ["type", "id"],
152
+ "properties": {
153
+ "type": { "$ref": "#/$defs/qualifiedName" },
154
+ "id": { "$ref": "#/$defs/stableId" }
155
+ }
156
+ },
157
+ "resourceScope": {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": ["kind", "id"],
161
+ "properties": {
162
+ "kind": { "$ref": "#/$defs/qualifiedName" },
163
+ "id": { "$ref": "#/$defs/stableId" }
164
+ }
165
+ },
166
+ "resourceContext": {
167
+ "type": "object",
168
+ "additionalProperties": false,
169
+ "required": ["key", "surface", "scopes"],
170
+ "properties": {
171
+ "key": { "$ref": "#/$defs/stableId" },
172
+ "surface": { "$ref": "#/$defs/qualifiedName" },
173
+ "revision": { "$ref": "#/$defs/revision" },
174
+ "scopes": {
175
+ "type": "array",
176
+ "maxItems": 20,
177
+ "uniqueItems": true,
178
+ "items": { "$ref": "#/$defs/resourceScope" }
179
+ },
180
+ "resource": { "$ref": "#/$defs/resourceIdentity" }
181
+ }
182
+ },
183
+ "returnContext": {
184
+ "description": "A non-secret host-minted pointer for deterministic return navigation. It is not a URL, credential, or permission.",
185
+ "type": "object",
186
+ "additionalProperties": false,
187
+ "required": ["key"],
188
+ "properties": {
189
+ "key": { "$ref": "#/$defs/stableId" },
190
+ "label": { "$ref": "#/$defs/messageReference" }
191
+ }
192
+ },
148
193
  "jsonValue": {
149
194
  "oneOf": [
150
195
  { "type": "null" },
@@ -38,5 +38,26 @@
38
38
  "maxItems": 1000,
39
39
  "items": { "$ref": "common.schema.json#/$defs/diagnostic" }
40
40
  }
41
- }
41
+ },
42
+ "allOf": [
43
+ {
44
+ "if": {
45
+ "properties": { "revision": {} },
46
+ "required": ["revision"]
47
+ },
48
+ "then": { "properties": { "category": { "const": "conflict" } } }
49
+ },
50
+ {
51
+ "if": {
52
+ "properties": { "retryAfterMilliseconds": {} },
53
+ "required": ["retryAfterMilliseconds"]
54
+ },
55
+ "then": {
56
+ "properties": {
57
+ "category": { "enum": ["rate-limited", "unavailable"] },
58
+ "retryable": { "const": true }
59
+ }
60
+ }
61
+ }
62
+ ]
42
63
  }
@@ -81,6 +81,13 @@
81
81
  "studio.operation/artifact.publish",
82
82
  "studio.operation/artifact.save",
83
83
  "studio.operation/artifact.unpublish",
84
+ "studio.operation/authoring.list-types",
85
+ "studio.operation/authoring.plan-save",
86
+ "studio.operation/authoring.resolve-target",
87
+ "studio.operation/authoring.save-as-new-type",
88
+ "studio.operation/authoring.save-item",
89
+ "studio.operation/authoring.save-new-type-version",
90
+ "studio.operation/authoring.start",
84
91
  "studio.operation/localization.messages",
85
92
  "studio.operation/media.abort-upload",
86
93
  "studio.operation/media.authorize-upload",
@@ -110,6 +117,13 @@
110
117
  "artifact/publish",
111
118
  "artifact/save",
112
119
  "artifact/unpublish",
120
+ "authoring/list-types",
121
+ "authoring/plan-save",
122
+ "authoring/resolve-target",
123
+ "authoring/save-as-new-type",
124
+ "authoring/save-item",
125
+ "authoring/save-new-type-version",
126
+ "authoring/start",
113
127
  "localization/messages",
114
128
  "media/abort-upload",
115
129
  "media/authorize-upload",
@@ -135,6 +149,7 @@
135
149
  "description": "The capability identifier a host advertises for a whole port.",
136
150
  "enum": [
137
151
  "studio.port/artifact",
152
+ "studio.port/authoring",
138
153
  "studio.port/localization",
139
154
  "studio.port/media",
140
155
  "studio.port/model",
@@ -148,6 +163,7 @@
148
163
  "portName": {
149
164
  "enum": [
150
165
  "artifact",
166
+ "authoring",
151
167
  "localization",
152
168
  "media",
153
169
  "model",
@@ -133,6 +133,8 @@
133
133
  "enum": [
134
134
  "artifact",
135
135
  "artifact-references",
136
+ "content-model",
137
+ "content-models",
136
138
  "media-asset",
137
139
  "media-page",
138
140
  "message-bundle",