@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,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.complete-upload.unknown",
|
|
5
|
+
"description": "Completing an upload the host never granted is refused without disclosing whether the identifier exists.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "complete-upload",
|
|
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.operation/media.complete-upload",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"uploadId": "uploads/never-granted"
|
|
29
|
+
},
|
|
30
|
+
"expect": {
|
|
31
|
+
"outcome": "error",
|
|
32
|
+
"category": "not-found",
|
|
33
|
+
"retryable": false,
|
|
34
|
+
"messageMustNotContain": ["uploads/never-granted"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.get.unknown",
|
|
5
|
+
"description": "An unknown media asset resolves to an empty result rather than an error, so absence is not an exception path.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "get",
|
|
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
|
+
"assetId": "assets/absent"
|
|
29
|
+
},
|
|
30
|
+
"expect": {
|
|
31
|
+
"outcome": "result",
|
|
32
|
+
"value": "null"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.import-external.private-host",
|
|
5
|
+
"description": "An external candidate resolving to a private address is refused by the lexical URL policy, and the message names the stable reason rather than the candidate.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "import-external",
|
|
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.operation/media.import-external",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"url": "http://169.254.169.254/latest/meta-data"
|
|
29
|
+
},
|
|
30
|
+
"expect": {
|
|
31
|
+
"outcome": "error",
|
|
32
|
+
"category": "validation-failed",
|
|
33
|
+
"retryable": false,
|
|
34
|
+
"messageMustNotContain": ["http://169.254.169.254/latest/meta-data"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.list.cursor",
|
|
5
|
+
"description": "An opaque cursor the host did not mint is refused rather than treated as an offset.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "list",
|
|
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
|
+
"cursor": "not-a-cursor",
|
|
29
|
+
"limit": 10
|
|
30
|
+
},
|
|
31
|
+
"expect": {
|
|
32
|
+
"outcome": "error",
|
|
33
|
+
"category": "invalid-request",
|
|
34
|
+
"retryable": false
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.list.limit",
|
|
5
|
+
"description": "A page size outside the declared bound is refused rather than silently clamped.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "list",
|
|
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
|
+
"limit": 500
|
|
29
|
+
},
|
|
30
|
+
"expect": {
|
|
31
|
+
"outcome": "error",
|
|
32
|
+
"category": "invalid-request",
|
|
33
|
+
"retryable": false
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.media.upload-status.unknown",
|
|
5
|
+
"description": "Polling an asset the host never accepted is refused without disclosing existence.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "media",
|
|
8
|
+
"operation": "upload-status",
|
|
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.operation/media.upload-status",
|
|
22
|
+
"protocolVersion": "0.1.0-draft.1",
|
|
23
|
+
"requestId": "requests/vector-1",
|
|
24
|
+
"resourceContextKey": "contexts/vector",
|
|
25
|
+
"sessionGeneration": "session-r1"
|
|
26
|
+
},
|
|
27
|
+
"argument": {
|
|
28
|
+
"assetId": "assets/absent"
|
|
29
|
+
},
|
|
30
|
+
"expect": {
|
|
31
|
+
"outcome": "error",
|
|
32
|
+
"category": "not-found",
|
|
33
|
+
"retryable": false
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.permission.explain.withheld",
|
|
5
|
+
"description": "An operation the acting identity does not hold is explained as disallowed with a safe reason, never by silently succeeding.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "permission",
|
|
8
|
+
"operation": "explain",
|
|
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
|
+
"operation": "studio.permission/publish"
|
|
29
|
+
},
|
|
30
|
+
"expect": {
|
|
31
|
+
"outcome": "result",
|
|
32
|
+
"value": "permission-explanation"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.permission.refresh.snapshot",
|
|
5
|
+
"description": "Refreshing authority answers with the held permissions and the live session generation.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "permission",
|
|
8
|
+
"operation": "refresh",
|
|
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
|
+
"expect": {
|
|
28
|
+
"outcome": "result",
|
|
29
|
+
"value": "permission-snapshot"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.recovery.load.absent",
|
|
5
|
+
"description": "A recovery envelope that was never stored resolves empty for the requesting context.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "recovery",
|
|
8
|
+
"operation": "load",
|
|
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
|
+
"expect": {
|
|
28
|
+
"outcome": "result",
|
|
29
|
+
"value": "null"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.telemetry.emit.accepted",
|
|
5
|
+
"description": "A telemetry event carrying only primitive attributes is accepted.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "telemetry",
|
|
8
|
+
"operation": "emit",
|
|
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
|
+
"attributes": {
|
|
29
|
+
"surface": "canvas"
|
|
30
|
+
},
|
|
31
|
+
"name": "studio.telemetry/vector"
|
|
32
|
+
},
|
|
33
|
+
"expect": {
|
|
34
|
+
"outcome": "result",
|
|
35
|
+
"value": "null"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractVersion": "0.1-draft",
|
|
3
|
+
"kind": "host-vector",
|
|
4
|
+
"id": "vector.host-vector.telemetry.emit.non-primitive",
|
|
5
|
+
"description": "A telemetry attribute that is not a JSON primitive is refused, keeping the cardinality discipline enforceable.",
|
|
6
|
+
"profile": "studio.profile/host-baseline",
|
|
7
|
+
"port": "telemetry",
|
|
8
|
+
"operation": "emit",
|
|
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
|
+
"attributes": {
|
|
29
|
+
"surface": {
|
|
30
|
+
"nested": true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"name": "studio.telemetry/vector"
|
|
34
|
+
},
|
|
35
|
+
"expect": {
|
|
36
|
+
"outcome": "error",
|
|
37
|
+
"category": "invalid-request",
|
|
38
|
+
"retryable": false
|
|
39
|
+
}
|
|
40
|
+
}
|