@kumwe/studio-testkit 0.1.0-alpha.6 → 0.1.0-alpha.7
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.
- package/README.md +28 -2
- package/corpus-manifest.json +760 -0
- package/dist/host-testbed.d.ts.map +1 -1
- package/dist/host-testbed.js +131 -0
- package/dist/host-testbed.js.map +1 -1
- package/dist/http-host-adapter.d.ts.map +1 -1
- package/dist/http-host-adapter.js +15 -0
- package/dist/http-host-adapter.js.map +1 -1
- package/fixtures/field-adapter.example.json +27 -0
- package/fixtures/host-capabilities.example.json +9 -3
- package/fixtures/host-operations.example.json +270 -0
- package/fixtures/inspector.example.json +17 -0
- package/fixtures/media-upload-grant.example.json +14 -0
- package/fixtures/studio-config.example.json +1 -1
- package/invalid/inspector.empty-block-types.json +20 -0
- package/invalid/media-upload-grant.insecure-url.json +14 -0
- package/invalid/preview-message.activated-unknown-interaction.json +16 -0
- package/invalid/preview-message.viewport-role-and-size.json +16 -0
- package/package.json +6 -4
- package/vectors/canonical/array-order.json +13 -0
- package/vectors/canonical/control-characters.json +13 -0
- package/vectors/canonical/depth-exceeded.json +21 -0
- package/vectors/canonical/empty-containers.json +14 -0
- package/vectors/canonical/forbidden-member.json +14 -0
- package/vectors/canonical/member-order.json +16 -0
- package/vectors/canonical/negative-zero.json +13 -0
- package/vectors/canonical/nested-order.json +19 -0
- package/vectors/canonical/non-ascii.json +13 -0
- package/vectors/canonical/numbers.json +16 -0
- package/vectors/canonical/string-escapes.json +13 -0
- package/vectors/canonical/surrogate-pair.json +13 -0
- package/vectors/host/artifact.dependencies.result.json +35 -0
- package/vectors/host/artifact.load.stored.json +36 -0
- package/vectors/host/artifact.load.unknown.error.json +37 -0
- package/vectors/host/artifact.publish.accepted.json +37 -0
- package/vectors/host/artifact.publish.forbidden.error.json +37 -0
- package/vectors/host/artifact.publish.stale.error.json +38 -0
- package/vectors/host/artifact.save.accepted.json +38 -0
- package/vectors/host/artifact.save.forbidden.error.json +38 -0
- package/vectors/host/artifact.save.stale.error.json +39 -0
- package/vectors/host/artifact.unpublish.stale.error.json +38 -0
- package/vectors/host/envelope.malformed-context.error.json +36 -0
- package/vectors/host/envelope.protocol-version.error.json +36 -0
- package/vectors/host/envelope.stale-generation.error.json +36 -0
- package/vectors/host/localization.messages.unknown-locale.error.json +36 -0
- package/vectors/host/media.abort-upload.unknown.error.json +35 -0
- package/vectors/host/media.authorize-upload.granted.json +37 -0
- package/vectors/host/media.authorize-upload.path-filename.error.json +39 -0
- package/vectors/host/media.authorize-upload.too-large.error.json +38 -0
- package/vectors/host/media.complete-upload.unknown.error.json +36 -0
- package/vectors/host/media.get.unknown.json +34 -0
- package/vectors/host/media.import-external.private-host.error.json +36 -0
- package/vectors/host/media.list.cursor.error.json +36 -0
- package/vectors/host/media.list.limit.error.json +35 -0
- package/vectors/host/media.upload-status.unknown.error.json +35 -0
- package/vectors/host/permission.explain.withheld.json +34 -0
- package/vectors/host/permission.refresh.snapshot.json +31 -0
- package/vectors/host/recovery.load.absent.json +31 -0
- package/vectors/host/telemetry.emit.accepted.json +37 -0
- package/vectors/host/telemetry.emit.non-primitive.error.json +40 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-operations",
|
|
4
|
+
"operations": [
|
|
5
|
+
{
|
|
6
|
+
"capability": "studio.operation/artifact.dependencies",
|
|
7
|
+
"expectsRevision": false,
|
|
8
|
+
"method": "dependencies",
|
|
9
|
+
"mutating": false,
|
|
10
|
+
"operation": "dependencies",
|
|
11
|
+
"port": "artifact",
|
|
12
|
+
"portCapability": "studio.port/artifact",
|
|
13
|
+
"required": true,
|
|
14
|
+
"route": "artifact/dependencies"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"capability": "studio.operation/artifact.load",
|
|
18
|
+
"expectsRevision": false,
|
|
19
|
+
"method": "load",
|
|
20
|
+
"mutating": false,
|
|
21
|
+
"operation": "load",
|
|
22
|
+
"port": "artifact",
|
|
23
|
+
"portCapability": "studio.port/artifact",
|
|
24
|
+
"required": true,
|
|
25
|
+
"route": "artifact/load"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"capability": "studio.operation/artifact.publish",
|
|
29
|
+
"expectsRevision": true,
|
|
30
|
+
"method": "publish",
|
|
31
|
+
"mutating": true,
|
|
32
|
+
"operation": "publish",
|
|
33
|
+
"port": "artifact",
|
|
34
|
+
"portCapability": "studio.port/artifact",
|
|
35
|
+
"required": true,
|
|
36
|
+
"route": "artifact/publish"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"capability": "studio.operation/artifact.save",
|
|
40
|
+
"expectsRevision": true,
|
|
41
|
+
"method": "save",
|
|
42
|
+
"mutating": true,
|
|
43
|
+
"operation": "save",
|
|
44
|
+
"port": "artifact",
|
|
45
|
+
"portCapability": "studio.port/artifact",
|
|
46
|
+
"required": true,
|
|
47
|
+
"route": "artifact/save"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"capability": "studio.operation/artifact.unpublish",
|
|
51
|
+
"expectsRevision": true,
|
|
52
|
+
"method": "unpublish",
|
|
53
|
+
"mutating": true,
|
|
54
|
+
"operation": "unpublish",
|
|
55
|
+
"port": "artifact",
|
|
56
|
+
"portCapability": "studio.port/artifact",
|
|
57
|
+
"required": true,
|
|
58
|
+
"route": "artifact/unpublish"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"capability": "studio.operation/localization.messages",
|
|
62
|
+
"expectsRevision": false,
|
|
63
|
+
"method": "messages",
|
|
64
|
+
"mutating": false,
|
|
65
|
+
"operation": "messages",
|
|
66
|
+
"port": "localization",
|
|
67
|
+
"portCapability": "studio.port/localization",
|
|
68
|
+
"required": false,
|
|
69
|
+
"route": "localization/messages"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"capability": "studio.operation/media.abort-upload",
|
|
73
|
+
"expectsRevision": false,
|
|
74
|
+
"method": "abortUpload",
|
|
75
|
+
"mutating": true,
|
|
76
|
+
"operation": "abort-upload",
|
|
77
|
+
"port": "media",
|
|
78
|
+
"portCapability": "studio.port/media",
|
|
79
|
+
"required": false,
|
|
80
|
+
"route": "media/abort-upload"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"capability": "studio.operation/media.authorize-upload",
|
|
84
|
+
"expectsRevision": false,
|
|
85
|
+
"method": "authorizeUpload",
|
|
86
|
+
"mutating": true,
|
|
87
|
+
"operation": "authorize-upload",
|
|
88
|
+
"port": "media",
|
|
89
|
+
"portCapability": "studio.port/media",
|
|
90
|
+
"required": false,
|
|
91
|
+
"route": "media/authorize-upload"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"capability": "studio.operation/media.complete-upload",
|
|
95
|
+
"expectsRevision": false,
|
|
96
|
+
"method": "completeUpload",
|
|
97
|
+
"mutating": true,
|
|
98
|
+
"operation": "complete-upload",
|
|
99
|
+
"port": "media",
|
|
100
|
+
"portCapability": "studio.port/media",
|
|
101
|
+
"required": false,
|
|
102
|
+
"route": "media/complete-upload"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"capability": "studio.operation/media.get",
|
|
106
|
+
"expectsRevision": false,
|
|
107
|
+
"method": "get",
|
|
108
|
+
"mutating": false,
|
|
109
|
+
"operation": "get",
|
|
110
|
+
"port": "media",
|
|
111
|
+
"portCapability": "studio.port/media",
|
|
112
|
+
"required": false,
|
|
113
|
+
"route": "media/get"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"capability": "studio.operation/media.import-external",
|
|
117
|
+
"expectsRevision": false,
|
|
118
|
+
"method": "importExternal",
|
|
119
|
+
"mutating": true,
|
|
120
|
+
"operation": "import-external",
|
|
121
|
+
"port": "media",
|
|
122
|
+
"portCapability": "studio.port/media",
|
|
123
|
+
"required": false,
|
|
124
|
+
"route": "media/import-external"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"capability": "studio.operation/media.list",
|
|
128
|
+
"expectsRevision": false,
|
|
129
|
+
"method": "list",
|
|
130
|
+
"mutating": false,
|
|
131
|
+
"operation": "list",
|
|
132
|
+
"port": "media",
|
|
133
|
+
"portCapability": "studio.port/media",
|
|
134
|
+
"required": false,
|
|
135
|
+
"route": "media/list"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"capability": "studio.operation/media.upload-status",
|
|
139
|
+
"expectsRevision": false,
|
|
140
|
+
"method": "uploadStatus",
|
|
141
|
+
"mutating": false,
|
|
142
|
+
"operation": "upload-status",
|
|
143
|
+
"port": "media",
|
|
144
|
+
"portCapability": "studio.port/media",
|
|
145
|
+
"required": false,
|
|
146
|
+
"route": "media/upload-status"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"capability": "studio.operation/model.get",
|
|
150
|
+
"expectsRevision": false,
|
|
151
|
+
"method": "get",
|
|
152
|
+
"mutating": false,
|
|
153
|
+
"operation": "get",
|
|
154
|
+
"port": "model",
|
|
155
|
+
"portCapability": "studio.port/model",
|
|
156
|
+
"required": false,
|
|
157
|
+
"route": "model/get"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"capability": "studio.operation/model.list",
|
|
161
|
+
"expectsRevision": false,
|
|
162
|
+
"method": "list",
|
|
163
|
+
"mutating": false,
|
|
164
|
+
"operation": "list",
|
|
165
|
+
"port": "model",
|
|
166
|
+
"portCapability": "studio.port/model",
|
|
167
|
+
"required": false,
|
|
168
|
+
"route": "model/list"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"capability": "studio.operation/permission.explain",
|
|
172
|
+
"expectsRevision": false,
|
|
173
|
+
"method": "explain",
|
|
174
|
+
"mutating": false,
|
|
175
|
+
"operation": "explain",
|
|
176
|
+
"port": "permission",
|
|
177
|
+
"portCapability": "studio.port/permission",
|
|
178
|
+
"required": false,
|
|
179
|
+
"route": "permission/explain"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"capability": "studio.operation/permission.refresh",
|
|
183
|
+
"expectsRevision": false,
|
|
184
|
+
"method": "refresh",
|
|
185
|
+
"mutating": false,
|
|
186
|
+
"operation": "refresh",
|
|
187
|
+
"port": "permission",
|
|
188
|
+
"portCapability": "studio.port/permission",
|
|
189
|
+
"required": false,
|
|
190
|
+
"route": "permission/refresh"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"capability": "studio.operation/preview.cancel",
|
|
194
|
+
"expectsRevision": false,
|
|
195
|
+
"method": "cancel",
|
|
196
|
+
"mutating": false,
|
|
197
|
+
"operation": "cancel",
|
|
198
|
+
"port": "preview",
|
|
199
|
+
"portCapability": "studio.port/preview",
|
|
200
|
+
"required": false,
|
|
201
|
+
"route": "preview/cancel"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"capability": "studio.operation/preview.render",
|
|
205
|
+
"expectsRevision": false,
|
|
206
|
+
"method": "render",
|
|
207
|
+
"mutating": false,
|
|
208
|
+
"operation": "render",
|
|
209
|
+
"port": "preview",
|
|
210
|
+
"portCapability": "studio.port/preview",
|
|
211
|
+
"required": false,
|
|
212
|
+
"route": "preview/render"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"capability": "studio.operation/recovery.discard",
|
|
216
|
+
"expectsRevision": false,
|
|
217
|
+
"method": "discard",
|
|
218
|
+
"mutating": true,
|
|
219
|
+
"operation": "discard",
|
|
220
|
+
"port": "recovery",
|
|
221
|
+
"portCapability": "studio.port/recovery",
|
|
222
|
+
"required": false,
|
|
223
|
+
"route": "recovery/discard"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"capability": "studio.operation/recovery.load",
|
|
227
|
+
"expectsRevision": false,
|
|
228
|
+
"method": "load",
|
|
229
|
+
"mutating": false,
|
|
230
|
+
"operation": "load",
|
|
231
|
+
"port": "recovery",
|
|
232
|
+
"portCapability": "studio.port/recovery",
|
|
233
|
+
"required": false,
|
|
234
|
+
"route": "recovery/load"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"capability": "studio.operation/recovery.store",
|
|
238
|
+
"expectsRevision": false,
|
|
239
|
+
"method": "store",
|
|
240
|
+
"mutating": true,
|
|
241
|
+
"operation": "store",
|
|
242
|
+
"port": "recovery",
|
|
243
|
+
"portCapability": "studio.port/recovery",
|
|
244
|
+
"required": false,
|
|
245
|
+
"route": "recovery/store"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"capability": "studio.operation/resource.search",
|
|
249
|
+
"expectsRevision": false,
|
|
250
|
+
"method": "search",
|
|
251
|
+
"mutating": false,
|
|
252
|
+
"operation": "search",
|
|
253
|
+
"port": "resource",
|
|
254
|
+
"portCapability": "studio.port/resource",
|
|
255
|
+
"required": false,
|
|
256
|
+
"route": "resource/search"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"capability": "studio.operation/telemetry.emit",
|
|
260
|
+
"expectsRevision": false,
|
|
261
|
+
"method": "emit",
|
|
262
|
+
"mutating": true,
|
|
263
|
+
"operation": "emit",
|
|
264
|
+
"port": "telemetry",
|
|
265
|
+
"portCapability": "studio.port/telemetry",
|
|
266
|
+
"required": false,
|
|
267
|
+
"route": "telemetry/emit"
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "inspector",
|
|
4
|
+
"id": "org.example.catalog/price-inspector",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"owner": {
|
|
7
|
+
"id": "org.example/catalog",
|
|
8
|
+
"version": "1.0.0"
|
|
9
|
+
},
|
|
10
|
+
"label": {
|
|
11
|
+
"key": "org.example.catalog/price-inspector",
|
|
12
|
+
"defaultMessage": "Price inspector"
|
|
13
|
+
},
|
|
14
|
+
"blockTypes": ["org.example.catalog/price"],
|
|
15
|
+
"placement": "augment",
|
|
16
|
+
"requiredCapability": "studio.capability/custom-inspectors"
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expiresAt": "2026-08-18T23:30:00Z",
|
|
3
|
+
"headers": {
|
|
4
|
+
"X-Upload-Session": "uploads-7f2c"
|
|
5
|
+
},
|
|
6
|
+
"method": "PUT",
|
|
7
|
+
"plan": {
|
|
8
|
+
"chunkBytes": 5242880,
|
|
9
|
+
"maximumBytes": 52428800,
|
|
10
|
+
"resumable": true
|
|
11
|
+
},
|
|
12
|
+
"uploadId": "uploads/7f2c",
|
|
13
|
+
"url": "https://media.example.org/uploads/7f2c"
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "inspector.schema.json",
|
|
3
|
+
"description": "An inspector declares the block types it applies to; an empty list would silently apply to none.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "inspector",
|
|
7
|
+
"id": "org.example.catalog/price-inspector",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"owner": {
|
|
10
|
+
"id": "org.example/catalog",
|
|
11
|
+
"version": "1.0.0"
|
|
12
|
+
},
|
|
13
|
+
"label": {
|
|
14
|
+
"key": "org.example.catalog/price-inspector",
|
|
15
|
+
"defaultMessage": "Price inspector"
|
|
16
|
+
},
|
|
17
|
+
"blockTypes": [],
|
|
18
|
+
"placement": "augment"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "media-upload-grant.schema.json",
|
|
3
|
+
"description": "An upload destination is always an https URL the host controls.",
|
|
4
|
+
"value": {
|
|
5
|
+
"expiresAt": "2026-08-18T23:30:00Z",
|
|
6
|
+
"method": "PUT",
|
|
7
|
+
"plan": {
|
|
8
|
+
"maximumBytes": 52428800,
|
|
9
|
+
"resumable": false
|
|
10
|
+
},
|
|
11
|
+
"uploadId": "uploads/7f2c",
|
|
12
|
+
"url": "http://media.example.org/uploads/7f2c"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "preview-message.schema.json",
|
|
3
|
+
"description": "Activation reports the closed interaction vocabulary, never an arbitrary input event.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "preview-message",
|
|
7
|
+
"channelId": "preview-channel-1",
|
|
8
|
+
"sessionGeneration": "session-r1",
|
|
9
|
+
"sequence": 3,
|
|
10
|
+
"type": "studio.preview/activated",
|
|
11
|
+
"payload": {
|
|
12
|
+
"interaction": "hover",
|
|
13
|
+
"marker": "node-1"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "preview-message.schema.json",
|
|
3
|
+
"description": "A viewport instruction carries a semantic role or explicit dimensions, never both.",
|
|
4
|
+
"value": {
|
|
5
|
+
"contractVersion": "0.1-draft",
|
|
6
|
+
"kind": "preview-message",
|
|
7
|
+
"channelId": "preview-channel-1",
|
|
8
|
+
"sessionGeneration": "session-r1",
|
|
9
|
+
"sequence": 3,
|
|
10
|
+
"type": "studio.preview/viewport",
|
|
11
|
+
"payload": {
|
|
12
|
+
"viewport": "compact",
|
|
13
|
+
"width": 1280
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kumwe/studio-testkit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/kumwe/studio.git",
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"files": [
|
|
15
15
|
"LICENSE",
|
|
16
|
+
"README.md",
|
|
16
17
|
"conformance",
|
|
18
|
+
"corpus-manifest.json",
|
|
17
19
|
"dist",
|
|
18
20
|
"fixtures",
|
|
19
21
|
"invalid",
|
|
20
|
-
"README.md",
|
|
21
22
|
"vectors"
|
|
22
23
|
],
|
|
23
24
|
"exports": {
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
"import": "./dist/index.js"
|
|
27
28
|
},
|
|
28
29
|
"./conformance/*": "./conformance/*",
|
|
30
|
+
"./corpus-manifest.json": "./corpus-manifest.json",
|
|
29
31
|
"./fixtures/*": "./fixtures/*",
|
|
30
32
|
"./invalid/*": "./invalid/*",
|
|
31
33
|
"./vectors/*": "./vectors/*"
|
|
@@ -34,8 +36,8 @@
|
|
|
34
36
|
"build": "tsc -b"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
|
-
"@kumwe/studio-core": "0.1.0-alpha.
|
|
38
|
-
"@kumwe/studio-protocol": "0.1.0-alpha.
|
|
39
|
+
"@kumwe/studio-core": "0.1.0-alpha.7",
|
|
40
|
+
"@kumwe/studio-protocol": "0.1.0-alpha.5"
|
|
39
41
|
},
|
|
40
42
|
"publishConfig": {
|
|
41
43
|
"access": "public",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.array-order",
|
|
5
|
+
"description": "Arrays keep semantic order; only object members are sorted.",
|
|
6
|
+
"value": {
|
|
7
|
+
"items": ["c", "a", "b"]
|
|
8
|
+
},
|
|
9
|
+
"expect": {
|
|
10
|
+
"canonical": "{\"items\":[\"c\",\"a\",\"b\"]}",
|
|
11
|
+
"digest": "sha256-Skzt0qRLwO/5TqmcmghEQQEADtJ5ASbjphmWAaasB7U="
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.control-characters",
|
|
5
|
+
"description": "Control characters without a short form are escaped as four hex digits.",
|
|
6
|
+
"value": {
|
|
7
|
+
"value": "bell\u0007 unit\u001f"
|
|
8
|
+
},
|
|
9
|
+
"expect": {
|
|
10
|
+
"canonical": "{\"value\":\"bell\\u0007 unit\\u001f\"}",
|
|
11
|
+
"digest": "sha256-V332co6E4LRxsTuTQ5OLD98jGjDBZAAmzZDCJOFGDNA="
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.depth-exceeded",
|
|
5
|
+
"description": "Nesting deeper than the declared bound is refused rather than truncated.",
|
|
6
|
+
"value": {
|
|
7
|
+
"a": {
|
|
8
|
+
"a": {
|
|
9
|
+
"a": {
|
|
10
|
+
"a": {
|
|
11
|
+
"a": 1
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"maximumDepth": 3,
|
|
18
|
+
"expect": {
|
|
19
|
+
"rejected": "depth-exceeded"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.empty-containers",
|
|
5
|
+
"description": "Empty objects and arrays serialize without padding.",
|
|
6
|
+
"value": {
|
|
7
|
+
"array": [],
|
|
8
|
+
"object": {}
|
|
9
|
+
},
|
|
10
|
+
"expect": {
|
|
11
|
+
"canonical": "{\"array\":[],\"object\":{}}",
|
|
12
|
+
"digest": "sha256-E7OK6rLhiixi3ilF25YAcggBtIPkGTb1oVTb2nJhvnA="
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.forbidden-member",
|
|
5
|
+
"description": "A forbidden member name is refused rather than silently dropped.",
|
|
6
|
+
"value": {
|
|
7
|
+
"__proto__": {
|
|
8
|
+
"polluted": true
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"expect": {
|
|
12
|
+
"rejected": "forbidden-member"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.member-order",
|
|
5
|
+
"description": "Object members sort by Unicode code unit, not by locale or insertion order.",
|
|
6
|
+
"value": {
|
|
7
|
+
"b": 1,
|
|
8
|
+
"A": 2,
|
|
9
|
+
"a": 3,
|
|
10
|
+
"Z": 4
|
|
11
|
+
},
|
|
12
|
+
"expect": {
|
|
13
|
+
"canonical": "{\"A\":2,\"Z\":4,\"a\":3,\"b\":1}",
|
|
14
|
+
"digest": "sha256-Vn19opLXri8fGzPIdqbQbXdepLMLLlGlhBb5yr19cyk="
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.negative-zero",
|
|
5
|
+
"description": "Negative zero canonicalizes to zero so two equal values never differ in bytes.",
|
|
6
|
+
"value": {
|
|
7
|
+
"value": -0.0
|
|
8
|
+
},
|
|
9
|
+
"expect": {
|
|
10
|
+
"canonical": "{\"value\":0}",
|
|
11
|
+
"digest": "sha256-I9eyhr1ClGC5KiocIbavw0EQRGxQNMFzY/2jY6oKfF0="
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.nested-order",
|
|
5
|
+
"description": "Sorting is recursive: every nested object is ordered the same way.",
|
|
6
|
+
"value": {
|
|
7
|
+
"outer": {
|
|
8
|
+
"z": 1,
|
|
9
|
+
"a": {
|
|
10
|
+
"y": 2,
|
|
11
|
+
"b": 3
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"expect": {
|
|
16
|
+
"canonical": "{\"outer\":{\"a\":{\"b\":3,\"y\":2},\"z\":1}}",
|
|
17
|
+
"digest": "sha256-3TQ80V/GRN0uwwkENcctjI199+5MjvAWVuMxlJcDZRw="
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.non-ascii",
|
|
5
|
+
"description": "Non-ASCII text is emitted as UTF-8, never as escape sequences.",
|
|
6
|
+
"value": {
|
|
7
|
+
"value": "héllo — 日本語"
|
|
8
|
+
},
|
|
9
|
+
"expect": {
|
|
10
|
+
"canonical": "{\"value\":\"héllo — 日本語\"}",
|
|
11
|
+
"digest": "sha256-lrSVhIWiYBcsHDXMZ3FTt4QcB2pNvqKW8TRX2F803+Y="
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.numbers",
|
|
5
|
+
"description": "Integers and decimals use the deterministic number grammar.",
|
|
6
|
+
"value": {
|
|
7
|
+
"decimal": 1.5,
|
|
8
|
+
"integer": 42,
|
|
9
|
+
"large": 9007199254740991,
|
|
10
|
+
"negative": -7
|
|
11
|
+
},
|
|
12
|
+
"expect": {
|
|
13
|
+
"canonical": "{\"decimal\":1.5,\"integer\":42,\"large\":9007199254740991,\"negative\":-7}",
|
|
14
|
+
"digest": "sha256-HI1BWhgmbgXvatESL+t+Y1QwYSfvAT4DOaYjU2fmdbQ="
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.string-escapes",
|
|
5
|
+
"description": "Only the characters ECMA-404 requires are escaped, using the short forms where they exist.",
|
|
6
|
+
"value": {
|
|
7
|
+
"value": "quote\" backslash\\ newline\n tab\t"
|
|
8
|
+
},
|
|
9
|
+
"expect": {
|
|
10
|
+
"canonical": "{\"value\":\"quote\\\" backslash\\\\ newline\\n tab\\t\"}",
|
|
11
|
+
"digest": "sha256-cci0wehH9sStfAleZcirUIOhCgpJKS8jPtKs34gE+ic="
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "canonical-vector",
|
|
4
|
+
"id": "vector.canonical-vector.surrogate-pair",
|
|
5
|
+
"description": "An astral character stays one code point in the UTF-8 bytes.",
|
|
6
|
+
"value": {
|
|
7
|
+
"value": "😀"
|
|
8
|
+
},
|
|
9
|
+
"expect": {
|
|
10
|
+
"canonical": "{\"value\":\"😀\"}",
|
|
11
|
+
"digest": "sha256-L8ufbEEor6c96MSNyg/HwfpSDn3KX29eewMH1oMoIMk="
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.artifact.dependencies",
|
|
5
|
+
"description": "Dependency inspection answers with the authorized reference list.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "artifact",
|
|
8
|
+
"operation": "dependencies",
|
|
9
|
+
"given": {
|
|
10
|
+
"artifacts": [
|
|
11
|
+
{
|
|
12
|
+
"id": "vector.blueprint",
|
|
13
|
+
"kind": "blueprint",
|
|
14
|
+
"revision": "vector.blueprint-r1"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"permissions": ["studio.permission/publish", "studio.permission/save"],
|
|
18
|
+
"sessionGeneration": "session-r1"
|
|
19
|
+
},
|
|
20
|
+
"context": {
|
|
21
|
+
"operationId": "studio.host/operation",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"id": "vector.blueprint",
|
|
29
|
+
"version": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"expect": {
|
|
32
|
+
"outcome": "result",
|
|
33
|
+
"value": "artifact-references"
|
|
34
|
+
}
|
|
35
|
+
}
|