@kumwe/studio-testkit 0.1.0-alpha.4 → 0.1.0-alpha.6

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 (30) hide show
  1. package/dist/http-host-adapter.d.ts +74 -0
  2. package/dist/http-host-adapter.d.ts.map +1 -0
  3. package/dist/http-host-adapter.js +241 -0
  4. package/dist/http-host-adapter.js.map +1 -0
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -0
  8. package/dist/index.js.map +1 -1
  9. package/fixtures/design-vocabulary.example.json +85 -0
  10. package/fixtures/migration.example.json +22 -0
  11. package/invalid/blueprint.revoking-slot-marker.json +57 -0
  12. package/invalid/design-vocabulary.unknown-control-kind.json +38 -0
  13. package/invalid/migration.empty-artifact-kinds.json +22 -0
  14. package/package.json +3 -3
  15. package/vectors/command/mode.blueprint.set-field-value.error.json +76 -0
  16. package/vectors/command/mode.blueprint.set-property.json +131 -0
  17. package/vectors/command/mode.content.insert-node.error.json +88 -0
  18. package/vectors/command/mode.hybrid.batch-atomic.error.json +158 -0
  19. package/vectors/command/mode.hybrid.insert-allowed.json +263 -0
  20. package/vectors/command/mode.hybrid.insert-designer-slot.error.json +145 -0
  21. package/vectors/command/mode.hybrid.insert-disallowed-type.error.json +145 -0
  22. package/vectors/command/mode.hybrid.insert-roots.error.json +143 -0
  23. package/vectors/command/mode.hybrid.remove-locked.error.json +130 -0
  24. package/vectors/command/mode.hybrid.reorder-with-locked.json +239 -0
  25. package/vectors/command/mode.hybrid.set-property.error.json +132 -0
  26. package/vectors/command/mode.hybrid.slot-marker-disallowed.error.json +125 -0
  27. package/vectors/command/mode.hybrid.slot-marker-insert.json +223 -0
  28. package/vectors/command/mode.hybrid.slot-marker-other-slot.error.json +125 -0
  29. package/vectors/command/mode.model.remove-node.error.json +75 -0
  30. package/vectors/command/mode.read-only.set-property.error.json +77 -0
@@ -0,0 +1,76 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "command-vector",
4
+ "id": "vector.command-vector.mode.blueprint.set-field-value",
5
+ "description": "Blueprint mode owns structure only; an entry field command outside its permitted set fails closed.",
6
+ "mode": "blueprint",
7
+ "initial": {
8
+ "contractVersion": "0.1-draft",
9
+ "dependencyLock": {
10
+ "blocks": [
11
+ {
12
+ "revision": "block-r1",
13
+ "type": "studio.vector/section",
14
+ "version": "1.0.0"
15
+ },
16
+ {
17
+ "revision": "block-r1",
18
+ "type": "studio.vector/text",
19
+ "version": "1.0.0"
20
+ }
21
+ ],
22
+ "theme": {
23
+ "id": "studio.vector/theme",
24
+ "revision": "theme-r1",
25
+ "version": "1.0.0"
26
+ }
27
+ },
28
+ "id": "vector.blueprint",
29
+ "kind": "blueprint",
30
+ "label": {
31
+ "defaultMessage": "Vector Blueprint",
32
+ "key": "studio.vector/blueprint"
33
+ },
34
+ "model": {
35
+ "id": "studio.vector/model",
36
+ "revision": "model-r1",
37
+ "version": "1.0.0"
38
+ },
39
+ "owner": {
40
+ "id": "studio.vector/suite",
41
+ "version": "0.1.0-alpha.0"
42
+ },
43
+ "revision": "blueprint-r1",
44
+ "roots": [
45
+ {
46
+ "authoring": {
47
+ "mode": "designer"
48
+ },
49
+ "bindings": {},
50
+ "id": "text-a",
51
+ "properties": {},
52
+ "slots": {},
53
+ "type": "studio.vector/text",
54
+ "version": "1.0.0"
55
+ }
56
+ ],
57
+ "status": "draft",
58
+ "version": "1.0.0"
59
+ },
60
+ "command": {
61
+ "artifactId": "vector.blueprint",
62
+ "baseStateVersion": 0,
63
+ "contractVersion": "0.1-draft",
64
+ "id": "vector.command.mode.blueprint.set-field-value",
65
+ "kind": "command",
66
+ "payload": {
67
+ "fieldPath": ["title"],
68
+ "value": "Hello"
69
+ },
70
+ "sessionGeneration": "session-r1",
71
+ "type": "studio.command/set-field-value"
72
+ },
73
+ "expect": {
74
+ "errorCode": "mode-forbidden"
75
+ }
76
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "command-vector",
4
+ "id": "vector.command-vector.mode.blueprint.set-property",
5
+ "description": "A blueprint-mode session applies the full structure vocabulary; the reduction matches the reducer exactly.",
6
+ "mode": "blueprint",
7
+ "initial": {
8
+ "contractVersion": "0.1-draft",
9
+ "dependencyLock": {
10
+ "blocks": [
11
+ {
12
+ "revision": "block-r1",
13
+ "type": "studio.vector/section",
14
+ "version": "1.0.0"
15
+ },
16
+ {
17
+ "revision": "block-r1",
18
+ "type": "studio.vector/text",
19
+ "version": "1.0.0"
20
+ }
21
+ ],
22
+ "theme": {
23
+ "id": "studio.vector/theme",
24
+ "revision": "theme-r1",
25
+ "version": "1.0.0"
26
+ }
27
+ },
28
+ "id": "vector.blueprint",
29
+ "kind": "blueprint",
30
+ "label": {
31
+ "defaultMessage": "Vector Blueprint",
32
+ "key": "studio.vector/blueprint"
33
+ },
34
+ "model": {
35
+ "id": "studio.vector/model",
36
+ "revision": "model-r1",
37
+ "version": "1.0.0"
38
+ },
39
+ "owner": {
40
+ "id": "studio.vector/suite",
41
+ "version": "0.1.0-alpha.0"
42
+ },
43
+ "revision": "blueprint-r1",
44
+ "roots": [
45
+ {
46
+ "authoring": {
47
+ "mode": "designer"
48
+ },
49
+ "bindings": {},
50
+ "id": "text-a",
51
+ "properties": {},
52
+ "slots": {},
53
+ "type": "studio.vector/text",
54
+ "version": "1.0.0"
55
+ }
56
+ ],
57
+ "status": "draft",
58
+ "version": "1.0.0"
59
+ },
60
+ "command": {
61
+ "artifactId": "vector.blueprint",
62
+ "baseStateVersion": 0,
63
+ "contractVersion": "0.1-draft",
64
+ "id": "vector.command.mode.blueprint.set-property",
65
+ "kind": "command",
66
+ "payload": {
67
+ "nodeId": "text-a",
68
+ "property": "text",
69
+ "value": "Hello"
70
+ },
71
+ "sessionGeneration": "session-r1",
72
+ "type": "studio.command/set-property"
73
+ },
74
+ "expect": {
75
+ "document": {
76
+ "contractVersion": "0.1-draft",
77
+ "dependencyLock": {
78
+ "blocks": [
79
+ {
80
+ "revision": "block-r1",
81
+ "type": "studio.vector/section",
82
+ "version": "1.0.0"
83
+ },
84
+ {
85
+ "revision": "block-r1",
86
+ "type": "studio.vector/text",
87
+ "version": "1.0.0"
88
+ }
89
+ ],
90
+ "theme": {
91
+ "id": "studio.vector/theme",
92
+ "revision": "theme-r1",
93
+ "version": "1.0.0"
94
+ }
95
+ },
96
+ "id": "vector.blueprint",
97
+ "kind": "blueprint",
98
+ "label": {
99
+ "defaultMessage": "Vector Blueprint",
100
+ "key": "studio.vector/blueprint"
101
+ },
102
+ "model": {
103
+ "id": "studio.vector/model",
104
+ "revision": "model-r1",
105
+ "version": "1.0.0"
106
+ },
107
+ "owner": {
108
+ "id": "studio.vector/suite",
109
+ "version": "0.1.0-alpha.0"
110
+ },
111
+ "revision": "blueprint-r1",
112
+ "roots": [
113
+ {
114
+ "authoring": {
115
+ "mode": "designer"
116
+ },
117
+ "bindings": {},
118
+ "id": "text-a",
119
+ "properties": {
120
+ "text": "Hello"
121
+ },
122
+ "slots": {},
123
+ "type": "studio.vector/text",
124
+ "version": "1.0.0"
125
+ }
126
+ ],
127
+ "status": "draft",
128
+ "version": "1.0.0"
129
+ }
130
+ }
131
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "command-vector",
4
+ "id": "vector.command-vector.mode.content.insert-node",
5
+ "description": "A content-mode session permits only field commands; every structure command is mode-forbidden.",
6
+ "mode": "content",
7
+ "initial": {
8
+ "contractVersion": "0.1-draft",
9
+ "dependencyLock": {
10
+ "blocks": [
11
+ {
12
+ "revision": "block-r1",
13
+ "type": "studio.vector/section",
14
+ "version": "1.0.0"
15
+ },
16
+ {
17
+ "revision": "block-r1",
18
+ "type": "studio.vector/text",
19
+ "version": "1.0.0"
20
+ }
21
+ ],
22
+ "theme": {
23
+ "id": "studio.vector/theme",
24
+ "revision": "theme-r1",
25
+ "version": "1.0.0"
26
+ }
27
+ },
28
+ "id": "vector.blueprint",
29
+ "kind": "blueprint",
30
+ "label": {
31
+ "defaultMessage": "Vector Blueprint",
32
+ "key": "studio.vector/blueprint"
33
+ },
34
+ "model": {
35
+ "id": "studio.vector/model",
36
+ "revision": "model-r1",
37
+ "version": "1.0.0"
38
+ },
39
+ "owner": {
40
+ "id": "studio.vector/suite",
41
+ "version": "0.1.0-alpha.0"
42
+ },
43
+ "revision": "blueprint-r1",
44
+ "roots": [
45
+ {
46
+ "authoring": {
47
+ "mode": "designer"
48
+ },
49
+ "bindings": {},
50
+ "id": "text-a",
51
+ "properties": {},
52
+ "slots": {},
53
+ "type": "studio.vector/text",
54
+ "version": "1.0.0"
55
+ }
56
+ ],
57
+ "status": "draft",
58
+ "version": "1.0.0"
59
+ },
60
+ "command": {
61
+ "artifactId": "vector.blueprint",
62
+ "baseStateVersion": 0,
63
+ "contractVersion": "0.1-draft",
64
+ "id": "vector.command.mode.content.insert-node",
65
+ "kind": "command",
66
+ "payload": {
67
+ "destination": {
68
+ "position": 1
69
+ },
70
+ "node": {
71
+ "authoring": {
72
+ "mode": "designer"
73
+ },
74
+ "bindings": {},
75
+ "id": "text-b",
76
+ "properties": {},
77
+ "slots": {},
78
+ "type": "studio.vector/text",
79
+ "version": "1.0.0"
80
+ }
81
+ },
82
+ "sessionGeneration": "session-r1",
83
+ "type": "studio.command/insert-node"
84
+ },
85
+ "expect": {
86
+ "errorCode": "mode-forbidden"
87
+ }
88
+ }
@@ -0,0 +1,158 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "command-vector",
4
+ "id": "vector.command-vector.mode.hybrid.batch-atomic",
5
+ "description": "A hybrid batch is validated operation by operation against a trial state and rejects atomically.",
6
+ "mode": "hybrid",
7
+ "initial": {
8
+ "contractVersion": "0.1-draft",
9
+ "dependencyLock": {
10
+ "blocks": [
11
+ {
12
+ "revision": "block-r1",
13
+ "type": "studio.vector/section",
14
+ "version": "1.0.0"
15
+ },
16
+ {
17
+ "revision": "block-r1",
18
+ "type": "studio.vector/card",
19
+ "version": "1.0.0"
20
+ }
21
+ ],
22
+ "theme": {
23
+ "id": "studio.vector/theme",
24
+ "revision": "theme-r1",
25
+ "version": "1.0.0"
26
+ }
27
+ },
28
+ "id": "vector.blueprint",
29
+ "kind": "blueprint",
30
+ "label": {
31
+ "defaultMessage": "Vector Blueprint",
32
+ "key": "studio.vector/blueprint"
33
+ },
34
+ "model": {
35
+ "id": "studio.vector/model",
36
+ "revision": "model-r1",
37
+ "version": "1.0.0"
38
+ },
39
+ "owner": {
40
+ "id": "studio.vector/suite",
41
+ "version": "0.1.0-alpha.0"
42
+ },
43
+ "revision": "blueprint-r1",
44
+ "roots": [
45
+ {
46
+ "authoring": {
47
+ "mode": "designer"
48
+ },
49
+ "bindings": {},
50
+ "id": "shell",
51
+ "properties": {},
52
+ "slots": {
53
+ "main": [
54
+ {
55
+ "authoring": {
56
+ "allowedBlocks": ["studio.vector/card"],
57
+ "mode": "structural"
58
+ },
59
+ "bindings": {},
60
+ "id": "region",
61
+ "properties": {},
62
+ "slots": {
63
+ "items": [
64
+ {
65
+ "authoring": {
66
+ "mode": "content"
67
+ },
68
+ "bindings": {},
69
+ "id": "card-1",
70
+ "properties": {
71
+ "title": "First"
72
+ },
73
+ "slots": {},
74
+ "type": "studio.vector/card",
75
+ "version": "1.0.0"
76
+ },
77
+ {
78
+ "authoring": {
79
+ "mode": "locked"
80
+ },
81
+ "bindings": {},
82
+ "id": "seal",
83
+ "properties": {},
84
+ "slots": {},
85
+ "type": "studio.vector/card",
86
+ "version": "1.0.0"
87
+ }
88
+ ]
89
+ },
90
+ "type": "studio.vector/section",
91
+ "version": "1.0.0"
92
+ }
93
+ ],
94
+ "side": [
95
+ {
96
+ "authoring": {
97
+ "mode": "designer"
98
+ },
99
+ "bindings": {},
100
+ "id": "fixed",
101
+ "properties": {},
102
+ "slots": {},
103
+ "type": "studio.vector/section",
104
+ "version": "1.0.0"
105
+ }
106
+ ]
107
+ },
108
+ "type": "studio.vector/section",
109
+ "version": "1.0.0"
110
+ }
111
+ ],
112
+ "status": "draft",
113
+ "version": "1.0.0"
114
+ },
115
+ "command": {
116
+ "artifactId": "vector.blueprint",
117
+ "baseStateVersion": 0,
118
+ "contractVersion": "0.1-draft",
119
+ "id": "vector.command.mode.hybrid.batch-atomic",
120
+ "kind": "command",
121
+ "payload": {
122
+ "operations": [
123
+ {
124
+ "payload": {
125
+ "destination": {
126
+ "parentNodeId": "region",
127
+ "position": 1,
128
+ "slot": "items"
129
+ },
130
+ "node": {
131
+ "authoring": {
132
+ "mode": "content"
133
+ },
134
+ "bindings": {},
135
+ "id": "card-2",
136
+ "properties": {},
137
+ "slots": {},
138
+ "type": "studio.vector/card",
139
+ "version": "1.0.0"
140
+ }
141
+ },
142
+ "type": "studio.command/insert-node"
143
+ },
144
+ {
145
+ "payload": {
146
+ "nodeId": "fixed"
147
+ },
148
+ "type": "studio.command/remove-node"
149
+ }
150
+ ]
151
+ },
152
+ "sessionGeneration": "session-r1",
153
+ "type": "studio.command/batch"
154
+ },
155
+ "expect": {
156
+ "errorCode": "mode-forbidden"
157
+ }
158
+ }