@kumwe/studio-testkit 0.1.0-alpha.5 → 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.
Files changed (81) hide show
  1. package/README.md +28 -2
  2. package/corpus-manifest.json +760 -0
  3. package/dist/host-testbed.d.ts.map +1 -1
  4. package/dist/host-testbed.js +131 -0
  5. package/dist/host-testbed.js.map +1 -1
  6. package/dist/http-host-adapter.d.ts.map +1 -1
  7. package/dist/http-host-adapter.js +15 -0
  8. package/dist/http-host-adapter.js.map +1 -1
  9. package/fixtures/design-vocabulary.example.json +85 -0
  10. package/fixtures/field-adapter.example.json +27 -0
  11. package/fixtures/host-capabilities.example.json +9 -3
  12. package/fixtures/host-operations.example.json +270 -0
  13. package/fixtures/inspector.example.json +17 -0
  14. package/fixtures/media-upload-grant.example.json +14 -0
  15. package/fixtures/migration.example.json +22 -0
  16. package/fixtures/studio-config.example.json +1 -1
  17. package/invalid/blueprint.revoking-slot-marker.json +57 -0
  18. package/invalid/design-vocabulary.unknown-control-kind.json +38 -0
  19. package/invalid/inspector.empty-block-types.json +20 -0
  20. package/invalid/media-upload-grant.insecure-url.json +14 -0
  21. package/invalid/migration.empty-artifact-kinds.json +22 -0
  22. package/invalid/preview-message.activated-unknown-interaction.json +16 -0
  23. package/invalid/preview-message.viewport-role-and-size.json +16 -0
  24. package/package.json +6 -4
  25. package/vectors/canonical/array-order.json +13 -0
  26. package/vectors/canonical/control-characters.json +13 -0
  27. package/vectors/canonical/depth-exceeded.json +21 -0
  28. package/vectors/canonical/empty-containers.json +14 -0
  29. package/vectors/canonical/forbidden-member.json +14 -0
  30. package/vectors/canonical/member-order.json +16 -0
  31. package/vectors/canonical/negative-zero.json +13 -0
  32. package/vectors/canonical/nested-order.json +19 -0
  33. package/vectors/canonical/non-ascii.json +13 -0
  34. package/vectors/canonical/numbers.json +16 -0
  35. package/vectors/canonical/string-escapes.json +13 -0
  36. package/vectors/canonical/surrogate-pair.json +13 -0
  37. package/vectors/command/mode.blueprint.set-field-value.error.json +76 -0
  38. package/vectors/command/mode.blueprint.set-property.json +131 -0
  39. package/vectors/command/mode.content.insert-node.error.json +88 -0
  40. package/vectors/command/mode.hybrid.batch-atomic.error.json +158 -0
  41. package/vectors/command/mode.hybrid.insert-allowed.json +263 -0
  42. package/vectors/command/mode.hybrid.insert-designer-slot.error.json +145 -0
  43. package/vectors/command/mode.hybrid.insert-disallowed-type.error.json +145 -0
  44. package/vectors/command/mode.hybrid.insert-roots.error.json +143 -0
  45. package/vectors/command/mode.hybrid.remove-locked.error.json +130 -0
  46. package/vectors/command/mode.hybrid.reorder-with-locked.json +239 -0
  47. package/vectors/command/mode.hybrid.set-property.error.json +132 -0
  48. package/vectors/command/mode.hybrid.slot-marker-disallowed.error.json +125 -0
  49. package/vectors/command/mode.hybrid.slot-marker-insert.json +223 -0
  50. package/vectors/command/mode.hybrid.slot-marker-other-slot.error.json +125 -0
  51. package/vectors/command/mode.model.remove-node.error.json +75 -0
  52. package/vectors/command/mode.read-only.set-property.error.json +77 -0
  53. package/vectors/host/artifact.dependencies.result.json +35 -0
  54. package/vectors/host/artifact.load.stored.json +36 -0
  55. package/vectors/host/artifact.load.unknown.error.json +37 -0
  56. package/vectors/host/artifact.publish.accepted.json +37 -0
  57. package/vectors/host/artifact.publish.forbidden.error.json +37 -0
  58. package/vectors/host/artifact.publish.stale.error.json +38 -0
  59. package/vectors/host/artifact.save.accepted.json +38 -0
  60. package/vectors/host/artifact.save.forbidden.error.json +38 -0
  61. package/vectors/host/artifact.save.stale.error.json +39 -0
  62. package/vectors/host/artifact.unpublish.stale.error.json +38 -0
  63. package/vectors/host/envelope.malformed-context.error.json +36 -0
  64. package/vectors/host/envelope.protocol-version.error.json +36 -0
  65. package/vectors/host/envelope.stale-generation.error.json +36 -0
  66. package/vectors/host/localization.messages.unknown-locale.error.json +36 -0
  67. package/vectors/host/media.abort-upload.unknown.error.json +35 -0
  68. package/vectors/host/media.authorize-upload.granted.json +37 -0
  69. package/vectors/host/media.authorize-upload.path-filename.error.json +39 -0
  70. package/vectors/host/media.authorize-upload.too-large.error.json +38 -0
  71. package/vectors/host/media.complete-upload.unknown.error.json +36 -0
  72. package/vectors/host/media.get.unknown.json +34 -0
  73. package/vectors/host/media.import-external.private-host.error.json +36 -0
  74. package/vectors/host/media.list.cursor.error.json +36 -0
  75. package/vectors/host/media.list.limit.error.json +35 -0
  76. package/vectors/host/media.upload-status.unknown.error.json +35 -0
  77. package/vectors/host/permission.explain.withheld.json +34 -0
  78. package/vectors/host/permission.refresh.snapshot.json +31 -0
  79. package/vectors/host/recovery.load.absent.json +31 -0
  80. package/vectors/host/telemetry.emit.accepted.json +37 -0
  81. 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,22 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "migration",
4
+ "id": "org.example.catalog/price-to-money",
5
+ "version": "1.1.0",
6
+ "owner": {
7
+ "id": "org.example/catalog",
8
+ "version": "1.1.0"
9
+ },
10
+ "label": {
11
+ "key": "org.example.catalog/price-to-money",
12
+ "defaultMessage": "Price becomes typed money"
13
+ },
14
+ "description": {
15
+ "key": "org.example.catalog/price-to-money-description",
16
+ "defaultMessage": "Rewrites plain price properties into the typed money value shape."
17
+ },
18
+ "artifactKinds": ["blueprint", "entry"],
19
+ "sourceVersions": ">=1.0.0 <1.1.0",
20
+ "targetVersion": "1.1.0",
21
+ "lossClassification": "lossless"
22
+ }
@@ -98,7 +98,7 @@
98
98
  {
99
99
  "id": "studio.port/artifact",
100
100
  "version": "1.0.0",
101
- "operations": ["studio.operation/load", "studio.operation/save"]
101
+ "operations": ["studio.operation/artifact.load", "studio.operation/artifact.save"]
102
102
  }
103
103
  ],
104
104
  "capabilities": []
@@ -0,0 +1,57 @@
1
+ {
2
+ "schema": "blueprint.schema.json",
3
+ "description": "The per-slot composition marker only grants composability; a revoking marker is rejected.",
4
+ "value": {
5
+ "contractVersion": "0.1-draft",
6
+ "dependencyLock": {
7
+ "blocks": [
8
+ {
9
+ "revision": "block-r1",
10
+ "type": "studio.vector/section",
11
+ "version": "1.0.0"
12
+ }
13
+ ],
14
+ "theme": {
15
+ "id": "studio.vector/theme",
16
+ "revision": "theme-r1",
17
+ "version": "1.0.0"
18
+ }
19
+ },
20
+ "id": "vector.blueprint",
21
+ "kind": "blueprint",
22
+ "label": {
23
+ "defaultMessage": "Vector Blueprint",
24
+ "key": "studio.vector/blueprint"
25
+ },
26
+ "model": {
27
+ "id": "studio.vector/model",
28
+ "revision": "model-r1",
29
+ "version": "1.0.0"
30
+ },
31
+ "owner": {
32
+ "id": "studio.vector/suite",
33
+ "version": "0.1.0-alpha.0"
34
+ },
35
+ "revision": "blueprint-r1",
36
+ "roots": [
37
+ {
38
+ "authoring": {
39
+ "mode": "structural",
40
+ "slots": {
41
+ "main": {
42
+ "composable": false
43
+ }
44
+ }
45
+ },
46
+ "bindings": {},
47
+ "id": "section-a",
48
+ "properties": {},
49
+ "slots": {},
50
+ "type": "studio.vector/section",
51
+ "version": "1.0.0"
52
+ }
53
+ ],
54
+ "status": "draft",
55
+ "version": "1.0.0"
56
+ }
57
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "schema": "design-vocabulary.schema.json",
3
+ "description": "Design controls carry only the closed design-control kind vocabulary.",
4
+ "value": {
5
+ "contractVersion": "0.1-draft",
6
+ "kind": "design-vocabulary",
7
+ "id": "org.example.catalog/product-vocabulary",
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/product-vocabulary",
15
+ "defaultMessage": "Product design vocabulary"
16
+ },
17
+ "designControls": [
18
+ {
19
+ "id": "card-face",
20
+ "kind": "font-role",
21
+ "label": {
22
+ "key": "org.example.catalog/card-face",
23
+ "defaultMessage": "Card face"
24
+ },
25
+ "choices": [
26
+ {
27
+ "id": "serif",
28
+ "label": {
29
+ "key": "org.example.catalog/card-face-serif",
30
+ "defaultMessage": "Serif"
31
+ }
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ "recipes": []
37
+ }
38
+ }
@@ -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,22 @@
1
+ {
2
+ "schema": "migration.schema.json",
3
+ "description": "A migration declaration must cover at least one artifact kind.",
4
+ "value": {
5
+ "contractVersion": "0.1-draft",
6
+ "kind": "migration",
7
+ "id": "org.example.catalog/price-to-money",
8
+ "version": "1.1.0",
9
+ "owner": {
10
+ "id": "org.example/catalog",
11
+ "version": "1.1.0"
12
+ },
13
+ "label": {
14
+ "key": "org.example.catalog/price-to-money",
15
+ "defaultMessage": "Price becomes typed money"
16
+ },
17
+ "artifactKinds": [],
18
+ "sourceVersions": ">=1.0.0 <1.1.0",
19
+ "targetVersion": "1.1.0",
20
+ "lossClassification": "lossless"
21
+ }
22
+ }
@@ -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.5",
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.5",
38
- "@kumwe/studio-protocol": "0.1.0-alpha.3"
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
+ }