@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,38 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.artifact.publish.stale",
5
+ "description": "Publishing against a superseded revision conflicts and carries the safe current revision.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "artifact",
8
+ "operation": "publish",
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
+ "expectedRevision": "vector.blueprint-r0"
27
+ },
28
+ "argument": {
29
+ "id": "vector.blueprint",
30
+ "version": "1.0.0"
31
+ },
32
+ "expect": {
33
+ "outcome": "error",
34
+ "category": "conflict",
35
+ "retryable": false,
36
+ "revision": "vector.blueprint-r1"
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.artifact.save.accepted",
5
+ "description": "A save whose expected revision matches the stored revision is accepted and advances the revision.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "artifact",
8
+ "operation": "save",
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
+ "expectedRevision": "vector.blueprint-r1",
27
+ "idempotencyKey": "idempotency/save-1"
28
+ },
29
+ "argument": {
30
+ "id": "vector.blueprint",
31
+ "kind": "blueprint"
32
+ },
33
+ "expect": {
34
+ "outcome": "result",
35
+ "revisionAdvances": true,
36
+ "value": "null"
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.artifact.save.forbidden",
5
+ "description": "A save the acting identity is not authorized for is refused before the artifact is touched, and the refusal does not disclose whether it exists.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "artifact",
8
+ "operation": "save",
9
+ "given": {
10
+ "artifacts": [
11
+ {
12
+ "id": "vector.blueprint",
13
+ "kind": "blueprint",
14
+ "revision": "vector.blueprint-r1"
15
+ }
16
+ ],
17
+ "permissions": ["studio.permission/publish"],
18
+ "sessionGeneration": "session-r1"
19
+ },
20
+ "context": {
21
+ "operationId": "studio.operation/artifact.save",
22
+ "protocolVersion": "0.1.0-draft.1",
23
+ "requestId": "requests/vector-1",
24
+ "resourceContextKey": "contexts/vector",
25
+ "sessionGeneration": "session-r1",
26
+ "expectedRevision": "vector.blueprint-r1"
27
+ },
28
+ "argument": {
29
+ "id": "vector.blueprint",
30
+ "kind": "blueprint"
31
+ },
32
+ "expect": {
33
+ "outcome": "error",
34
+ "category": "forbidden",
35
+ "retryable": false,
36
+ "messageMustNotContain": ["vector.blueprint"]
37
+ }
38
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.artifact.save.stale",
5
+ "description": "A save against a superseded revision conflicts and returns the safe current revision so the client resolves without a second read.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "artifact",
8
+ "operation": "save",
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
+ "expectedRevision": "vector.blueprint-r0",
27
+ "idempotencyKey": "idempotency/save-2"
28
+ },
29
+ "argument": {
30
+ "id": "vector.blueprint",
31
+ "kind": "blueprint"
32
+ },
33
+ "expect": {
34
+ "outcome": "error",
35
+ "category": "conflict",
36
+ "retryable": false,
37
+ "revision": "vector.blueprint-r1"
38
+ }
39
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.artifact.unpublish.stale",
5
+ "description": "Unpublishing is revision-checked exactly like every other mutation.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "artifact",
8
+ "operation": "unpublish",
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
+ "expectedRevision": "vector.blueprint-r0"
27
+ },
28
+ "argument": {
29
+ "id": "vector.blueprint",
30
+ "version": "1.0.0"
31
+ },
32
+ "expect": {
33
+ "outcome": "error",
34
+ "category": "conflict",
35
+ "retryable": false,
36
+ "revision": "vector.blueprint-r1"
37
+ }
38
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.envelope.malformed-context",
5
+ "description": "A structurally invalid request envelope is refused as invalid-request rather than partially honoured.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "artifact",
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": "",
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": "error",
33
+ "category": "invalid-request",
34
+ "retryable": false
35
+ }
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.envelope.protocol-version",
5
+ "description": "A request naming a wire version the host does not support is refused as incompatible before any work.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "artifact",
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": "9.9.9",
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": "error",
33
+ "category": "incompatible",
34
+ "retryable": false
35
+ }
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.envelope.stale-generation",
5
+ "description": "A request carrying a superseded session generation is refused; a permission or context change mints a new generation.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "artifact",
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-r0"
26
+ },
27
+ "argument": {
28
+ "id": "vector.blueprint",
29
+ "version": "1.0.0"
30
+ },
31
+ "expect": {
32
+ "outcome": "error",
33
+ "category": "invalid-request",
34
+ "retryable": false
35
+ }
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.localization.messages.unknown-locale",
5
+ "description": "A locale the host does not carry is refused as not-found rather than answered with an empty bundle.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "localization",
8
+ "operation": "messages",
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
+ "locale": "zz",
29
+ "namespaces": ["studio.shell"]
30
+ },
31
+ "expect": {
32
+ "outcome": "error",
33
+ "category": "not-found",
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.abort-upload.unknown",
5
+ "description": "Aborting an unknown grant is refused rather than reported as a silent success.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "media",
8
+ "operation": "abort-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.abort-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
+ }
35
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.media.authorize-upload.granted",
5
+ "description": "An upload within policy is authorized before any byte moves, returning a bounded, expiring grant.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "media",
8
+ "operation": "authorize-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.authorize-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
+ "byteSize": 1048576,
29
+ "filename": "photo.jpg",
30
+ "mediaType": "image/jpeg",
31
+ "purpose": "studio.media/content"
32
+ },
33
+ "expect": {
34
+ "outcome": "result",
35
+ "value": "upload-grant"
36
+ }
37
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.media.authorize-upload.path-filename",
5
+ "description": "A declared filename carrying a path separator is refused: a filename is display metadata, never a storage path.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "media",
8
+ "operation": "authorize-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.authorize-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
+ "byteSize": 1024,
29
+ "filename": "../../etc/passwd",
30
+ "mediaType": "image/jpeg",
31
+ "purpose": "studio.media/content"
32
+ },
33
+ "expect": {
34
+ "outcome": "error",
35
+ "category": "validation-failed",
36
+ "retryable": false,
37
+ "messageMustNotContain": ["../../etc/passwd"]
38
+ }
39
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "contractVersion": "0.1-draft",
3
+ "kind": "host-vector",
4
+ "id": "vector.host-vector.media.authorize-upload.too-large",
5
+ "description": "An upload larger than the host bound is refused at authorization, so no transfer is ever started.",
6
+ "profile": "studio.profile/host-baseline",
7
+ "port": "media",
8
+ "operation": "authorize-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.authorize-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
+ "byteSize": 1073741824,
29
+ "filename": "huge.bin",
30
+ "mediaType": "image/jpeg",
31
+ "purpose": "studio.media/content"
32
+ },
33
+ "expect": {
34
+ "outcome": "error",
35
+ "category": "limit-exceeded",
36
+ "retryable": false
37
+ }
38
+ }
@@ -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
+ }