@kumwe/studio-protocol 0.1.0-alpha.10
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/LICENSE +21 -0
- package/README.md +77 -0
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/generated/schema-models.d.ts +1968 -0
- package/dist/generated/schema-models.d.ts.map +1 -0
- package/dist/generated/schema-models.js +76 -0
- package/dist/generated/schema-models.js.map +1 -0
- package/dist/guards.d.ts +7 -0
- package/dist/guards.d.ts.map +1 -0
- package/dist/guards.js +374 -0
- package/dist/guards.js.map +1 -0
- package/dist/host-failure.d.ts +16 -0
- package/dist/host-failure.d.ts.map +1 -0
- package/dist/host-failure.js +27 -0
- package/dist/host-failure.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas.d.ts +50 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +144 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.d.ts +1256 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +42 -0
- package/schemas/authoring-message-catalog.schema.json +45 -0
- package/schemas/authoring-web-vector.schema.json +236 -0
- package/schemas/binding-projection-vector.schema.json +127 -0
- package/schemas/block-definition.schema.json +227 -0
- package/schemas/blueprint.schema.json +273 -0
- package/schemas/canonical-vector.schema.json +65 -0
- package/schemas/command-vector.schema.json +68 -0
- package/schemas/command.schema.json +410 -0
- package/schemas/common.schema.json +222 -0
- package/schemas/content-model.schema.json +216 -0
- package/schemas/corpus-manifest.schema.json +48 -0
- package/schemas/design-vocabulary.schema.json +91 -0
- package/schemas/entry.schema.json +32 -0
- package/schemas/field-adapter.schema.json +51 -0
- package/schemas/host-capabilities.schema.json +65 -0
- package/schemas/host-error.schema.json +42 -0
- package/schemas/host-operations.schema.json +162 -0
- package/schemas/host-request.schema.json +71 -0
- package/schemas/host-result.schema.json +19 -0
- package/schemas/host-sequence-vector.schema.json +342 -0
- package/schemas/host-vector.schema.json +199 -0
- package/schemas/inspector.schema.json +44 -0
- package/schemas/manifest.json +246 -0
- package/schemas/media-asset.schema.json +83 -0
- package/schemas/media-reference.schema.json +112 -0
- package/schemas/media-upload-grant.schema.json +48 -0
- package/schemas/media-upload-session.schema.json +109 -0
- package/schemas/media-vector.schema.json +123 -0
- package/schemas/migration.schema.json +41 -0
- package/schemas/pattern.schema.json +50 -0
- package/schemas/plugin-manifest.schema.json +126 -0
- package/schemas/preview-message.schema.json +583 -0
- package/schemas/preview-vector.schema.json +52 -0
- package/schemas/provenance.schema.json +57 -0
- package/schemas/renderer-web-vector.schema.json +160 -0
- package/schemas/rich-text-projection.schema.json +79 -0
- package/schemas/rich-text.schema.json +323 -0
- package/schemas/schema-profile-vector.schema.json +133 -0
- package/schemas/schema-profile.schema.json +201 -0
- package/schemas/studio-chart.schema.json +35 -0
- package/schemas/studio-config.schema.json +244 -0
- package/schemas/studio-drawing.schema.json +44 -0
- package/schemas/studio-money.schema.json +16 -0
- package/schemas/studio-presentation.schema.json +31 -0
- package/schemas/studio-release.schema.json +81 -0
- package/schemas/studio-table.schema.json +27 -0
- package/schemas/theme.schema.json +164 -0
- package/schemas/unresolved-contribution.schema.json +50 -0
- package/studio-release.json +18 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/host-operations.schema.json",
|
|
4
|
+
"title": "Studio host port operation registry",
|
|
5
|
+
"description": "The closed registry binding every host port operation to its names: the wire operation a transport addresses, the typed method a client calls, and the capability identifier a host advertises. A host cannot publish a truthful capability document without it, because the vocabularies must map one to one. Adding an operation is an additive protocol change; renaming or removing one is breaking.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contractVersion", "kind", "operations"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contractVersion": {
|
|
11
|
+
"$ref": "common.schema.json#/$defs/contractVersion"
|
|
12
|
+
},
|
|
13
|
+
"kind": {
|
|
14
|
+
"const": "host-operations"
|
|
15
|
+
},
|
|
16
|
+
"operations": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"minItems": 1,
|
|
19
|
+
"maxItems": 200,
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": [
|
|
24
|
+
"capability",
|
|
25
|
+
"expectsRevision",
|
|
26
|
+
"method",
|
|
27
|
+
"mutating",
|
|
28
|
+
"operation",
|
|
29
|
+
"port",
|
|
30
|
+
"portCapability",
|
|
31
|
+
"required",
|
|
32
|
+
"route"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"capability": {
|
|
36
|
+
"$ref": "#/$defs/operationCapability"
|
|
37
|
+
},
|
|
38
|
+
"expectsRevision": {
|
|
39
|
+
"description": "The operation is concurrency-protected: the request envelope carries expectedRevision and a mismatch conflicts.",
|
|
40
|
+
"type": "boolean"
|
|
41
|
+
},
|
|
42
|
+
"method": {
|
|
43
|
+
"description": "The typed method name a client port interface exposes, which differs from the wire name where the wire spelling is not a valid identifier.",
|
|
44
|
+
"type": "string",
|
|
45
|
+
"pattern": "^[a-z][A-Za-z0-9]*(?![\\s\\S])",
|
|
46
|
+
"maxLength": 100
|
|
47
|
+
},
|
|
48
|
+
"mutating": {
|
|
49
|
+
"description": "The operation changes host state, so it is authorized, audited and idempotent when retried.",
|
|
50
|
+
"type": "boolean"
|
|
51
|
+
},
|
|
52
|
+
"operation": {
|
|
53
|
+
"$ref": "common.schema.json#/$defs/localName"
|
|
54
|
+
},
|
|
55
|
+
"port": {
|
|
56
|
+
"$ref": "#/$defs/portName"
|
|
57
|
+
},
|
|
58
|
+
"portCapability": {
|
|
59
|
+
"$ref": "#/$defs/portCapability"
|
|
60
|
+
},
|
|
61
|
+
"required": {
|
|
62
|
+
"description": "The port must be present for an editable session; an absent optional port degrades with diagnostics.",
|
|
63
|
+
"type": "boolean"
|
|
64
|
+
},
|
|
65
|
+
"route": {
|
|
66
|
+
"$ref": "#/$defs/operationRoute"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"extensions": {
|
|
72
|
+
"$ref": "common.schema.json#/$defs/extensions"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"$defs": {
|
|
76
|
+
"operationCapability": {
|
|
77
|
+
"description": "The capability identifier a host advertises for one port operation.",
|
|
78
|
+
"enum": [
|
|
79
|
+
"studio.operation/artifact.dependencies",
|
|
80
|
+
"studio.operation/artifact.load",
|
|
81
|
+
"studio.operation/artifact.publish",
|
|
82
|
+
"studio.operation/artifact.save",
|
|
83
|
+
"studio.operation/artifact.unpublish",
|
|
84
|
+
"studio.operation/localization.messages",
|
|
85
|
+
"studio.operation/media.abort-upload",
|
|
86
|
+
"studio.operation/media.authorize-upload",
|
|
87
|
+
"studio.operation/media.complete-upload",
|
|
88
|
+
"studio.operation/media.get",
|
|
89
|
+
"studio.operation/media.import-external",
|
|
90
|
+
"studio.operation/media.list",
|
|
91
|
+
"studio.operation/media.upload-status",
|
|
92
|
+
"studio.operation/model.get",
|
|
93
|
+
"studio.operation/model.list",
|
|
94
|
+
"studio.operation/permission.explain",
|
|
95
|
+
"studio.operation/permission.refresh",
|
|
96
|
+
"studio.operation/preview.cancel",
|
|
97
|
+
"studio.operation/preview.render",
|
|
98
|
+
"studio.operation/recovery.discard",
|
|
99
|
+
"studio.operation/recovery.load",
|
|
100
|
+
"studio.operation/recovery.store",
|
|
101
|
+
"studio.operation/resource.search",
|
|
102
|
+
"studio.operation/telemetry.emit"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"operationRoute": {
|
|
106
|
+
"description": "The transport route segment addressing one port operation.",
|
|
107
|
+
"enum": [
|
|
108
|
+
"artifact/dependencies",
|
|
109
|
+
"artifact/load",
|
|
110
|
+
"artifact/publish",
|
|
111
|
+
"artifact/save",
|
|
112
|
+
"artifact/unpublish",
|
|
113
|
+
"localization/messages",
|
|
114
|
+
"media/abort-upload",
|
|
115
|
+
"media/authorize-upload",
|
|
116
|
+
"media/complete-upload",
|
|
117
|
+
"media/get",
|
|
118
|
+
"media/import-external",
|
|
119
|
+
"media/list",
|
|
120
|
+
"media/upload-status",
|
|
121
|
+
"model/get",
|
|
122
|
+
"model/list",
|
|
123
|
+
"permission/explain",
|
|
124
|
+
"permission/refresh",
|
|
125
|
+
"preview/cancel",
|
|
126
|
+
"preview/render",
|
|
127
|
+
"recovery/discard",
|
|
128
|
+
"recovery/load",
|
|
129
|
+
"recovery/store",
|
|
130
|
+
"resource/search",
|
|
131
|
+
"telemetry/emit"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"portCapability": {
|
|
135
|
+
"description": "The capability identifier a host advertises for a whole port.",
|
|
136
|
+
"enum": [
|
|
137
|
+
"studio.port/artifact",
|
|
138
|
+
"studio.port/localization",
|
|
139
|
+
"studio.port/media",
|
|
140
|
+
"studio.port/model",
|
|
141
|
+
"studio.port/permission",
|
|
142
|
+
"studio.port/preview",
|
|
143
|
+
"studio.port/recovery",
|
|
144
|
+
"studio.port/resource",
|
|
145
|
+
"studio.port/telemetry"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"portName": {
|
|
149
|
+
"enum": [
|
|
150
|
+
"artifact",
|
|
151
|
+
"localization",
|
|
152
|
+
"media",
|
|
153
|
+
"model",
|
|
154
|
+
"permission",
|
|
155
|
+
"preview",
|
|
156
|
+
"recovery",
|
|
157
|
+
"resource",
|
|
158
|
+
"telemetry"
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/host-request.schema.json",
|
|
4
|
+
"title": "Studio host port request",
|
|
5
|
+
"description": "The body of one host port operation call: the argument the operation takes and the envelope every operation carries. A host validates this shape before dispatching, so a malformed envelope is refused as invalid-request rather than partially honoured.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["context"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"arguments": {
|
|
11
|
+
"description": "The operation argument. Absent for operations that take only the envelope.",
|
|
12
|
+
"$ref": "common.schema.json#/$defs/jsonValue"
|
|
13
|
+
},
|
|
14
|
+
"context": { "$ref": "#/$defs/requestContext" }
|
|
15
|
+
},
|
|
16
|
+
"$defs": {
|
|
17
|
+
"requestContext": {
|
|
18
|
+
"description": "The request envelope. Actor identity and authorization evidence are attached by the trusted transport and never appear here: a Studio-supplied actor value is display context, never authentication.",
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": [
|
|
22
|
+
"operationId",
|
|
23
|
+
"protocolVersion",
|
|
24
|
+
"requestId",
|
|
25
|
+
"resourceContextKey",
|
|
26
|
+
"sessionGeneration"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"expectedRevision": {
|
|
30
|
+
"description": "The revision the caller believes is current. Required by every operation the registry marks expectsRevision; a mismatch conflicts and the host returns the safe current revision.",
|
|
31
|
+
"$ref": "common.schema.json#/$defs/revision"
|
|
32
|
+
},
|
|
33
|
+
"idempotencyKey": {
|
|
34
|
+
"description": "Present when a mutation may be retried. A host that has already accepted this key for this operation returns the original outcome rather than applying the mutation twice.",
|
|
35
|
+
"$ref": "common.schema.json#/$defs/stableId"
|
|
36
|
+
},
|
|
37
|
+
"locale": {
|
|
38
|
+
"description": "The locale for localized diagnostics. Absent means the session locale.",
|
|
39
|
+
"$ref": "common.schema.json#/$defs/locale"
|
|
40
|
+
},
|
|
41
|
+
"operationId": {
|
|
42
|
+
"description": "The capability identifier of the operation being invoked, closed by the operation registry.",
|
|
43
|
+
"$ref": "host-operations.schema.json#/$defs/operationCapability"
|
|
44
|
+
},
|
|
45
|
+
"protocolVersion": {
|
|
46
|
+
"description": "The negotiated wire version. A version the host does not support is refused as incompatible before any work.",
|
|
47
|
+
"$ref": "common.schema.json#/$defs/semanticVersion"
|
|
48
|
+
},
|
|
49
|
+
"requestId": {
|
|
50
|
+
"description": "Unique per call, used for correlation. It never identifies the actor.",
|
|
51
|
+
"$ref": "common.schema.json#/$defs/stableId"
|
|
52
|
+
},
|
|
53
|
+
"resourceContextKey": {
|
|
54
|
+
"description": "The opaque, non-secret, non-bearer context key. The host resolves and verifies the canonical context from this key rather than trusting client-supplied scope values; a stale, altered or cross-session key is rejected without disclosing private resource existence.",
|
|
55
|
+
"$ref": "common.schema.json#/$defs/stableId"
|
|
56
|
+
},
|
|
57
|
+
"sessionGeneration": {
|
|
58
|
+
"description": "The generation the session was opened at. A superseded generation is refused, because a permission or context change mints a new one.",
|
|
59
|
+
"$ref": "common.schema.json#/$defs/revision"
|
|
60
|
+
},
|
|
61
|
+
"traceContext": {
|
|
62
|
+
"description": "Trace correlation permitted by privacy policy. It carries no actor identity, credential or private resource value.",
|
|
63
|
+
"type": "object",
|
|
64
|
+
"maxProperties": 10,
|
|
65
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
|
|
66
|
+
"additionalProperties": { "type": "string", "maxLength": 200 }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/host-result.schema.json",
|
|
4
|
+
"title": "Studio host port result",
|
|
5
|
+
"description": "The body a host returns when a port operation succeeds. A failure is never expressed here: it carries the canonical host error document instead, so a client distinguishes outcomes by shape rather than by guessing from a status code.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["value"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"revision": {
|
|
11
|
+
"description": "The accepted resource revision. Every operation the registry marks expectsRevision returns the revision it advanced to, so a client never re-reads to learn what it just wrote.",
|
|
12
|
+
"$ref": "common.schema.json#/$defs/revision"
|
|
13
|
+
},
|
|
14
|
+
"value": {
|
|
15
|
+
"description": "The normalized operation result. Operations that answer with nothing return null rather than omitting the member, so absence is explicit.",
|
|
16
|
+
"$ref": "common.schema.json#/$defs/jsonValue"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/host-sequence-vector.schema.json",
|
|
4
|
+
"title": "Studio canonical host sequence conformance vector",
|
|
5
|
+
"description": "A deterministic sequence of host-port invocations, settlements, logical-clock advances and renderer completions. Every stateful precondition is bounded JSON so another runtime can reproduce retries, rate-limit windows and in-flight cancellation without wall-clock sleeps or executable fixture callbacks.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"contractVersion",
|
|
10
|
+
"kind",
|
|
11
|
+
"id",
|
|
12
|
+
"description",
|
|
13
|
+
"profile",
|
|
14
|
+
"assertions",
|
|
15
|
+
"idempotencyPolicy",
|
|
16
|
+
"given",
|
|
17
|
+
"steps",
|
|
18
|
+
"expectFinal"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
22
|
+
"kind": { "const": "host-sequence-vector" },
|
|
23
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
24
|
+
"description": { "type": "string", "minLength": 1, "maxLength": 500 },
|
|
25
|
+
"profile": { "const": "studio.profile/host-baseline-v2" },
|
|
26
|
+
"assertions": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"minItems": 1,
|
|
29
|
+
"maxItems": 12,
|
|
30
|
+
"uniqueItems": true,
|
|
31
|
+
"items": { "$ref": "#/$defs/assertion" }
|
|
32
|
+
},
|
|
33
|
+
"idempotencyPolicy": { "$ref": "#/$defs/idempotencyPolicy" },
|
|
34
|
+
"given": { "$ref": "#/$defs/given" },
|
|
35
|
+
"steps": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"minItems": 2,
|
|
38
|
+
"maxItems": 24,
|
|
39
|
+
"items": {
|
|
40
|
+
"oneOf": [
|
|
41
|
+
{ "$ref": "#/$defs/invokeStep" },
|
|
42
|
+
{ "$ref": "#/$defs/settleStep" },
|
|
43
|
+
{ "$ref": "#/$defs/advanceClockStep" },
|
|
44
|
+
{ "$ref": "#/$defs/releasePreviewRenderStep" }
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"expectFinal": { "$ref": "#/$defs/finalState" }
|
|
49
|
+
},
|
|
50
|
+
"$defs": {
|
|
51
|
+
"assertion": {
|
|
52
|
+
"enum": [
|
|
53
|
+
"operation-id-mismatch-refusal",
|
|
54
|
+
"idempotent-in-flight-coalescing",
|
|
55
|
+
"idempotent-completed-replay",
|
|
56
|
+
"idempotency-changed-argument-refusal",
|
|
57
|
+
"idempotency-changed-context-refusal",
|
|
58
|
+
"idempotency-resource-scope-separation",
|
|
59
|
+
"canonical-number-equivalence",
|
|
60
|
+
"failed-attempt-retry",
|
|
61
|
+
"fixed-window-rate-limit",
|
|
62
|
+
"fixed-window-reset",
|
|
63
|
+
"in-flight-preview-cancellation",
|
|
64
|
+
"cross-context-cancellation-isolation",
|
|
65
|
+
"late-preview-result-discard"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"idempotencyPolicy": {
|
|
69
|
+
"description": "The exact map key and canonical intent preimage used by this profile. Scope fields select an accepted record; the argument and listed semantic context fields form its canonical JSON fingerprint. Optional semantic fields that are absent are omitted, not serialized as null. Canonical JSON applies its number grammar, including normalization of negative zero to zero. Per-attempt request and trace correlation never affect intent.",
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": [
|
|
73
|
+
"scopeFields",
|
|
74
|
+
"argumentCanonicalization",
|
|
75
|
+
"intentContextFields",
|
|
76
|
+
"absentOptionalFields",
|
|
77
|
+
"numberNormalization",
|
|
78
|
+
"excludedContextFields"
|
|
79
|
+
],
|
|
80
|
+
"properties": {
|
|
81
|
+
"scopeFields": {
|
|
82
|
+
"const": ["idempotencyKey", "operationId", "resourceContextKey", "sessionGeneration"]
|
|
83
|
+
},
|
|
84
|
+
"argumentCanonicalization": { "const": "canonical-json" },
|
|
85
|
+
"intentContextFields": {
|
|
86
|
+
"const": ["expectedRevision", "locale", "protocolVersion"]
|
|
87
|
+
},
|
|
88
|
+
"absentOptionalFields": { "const": "omit" },
|
|
89
|
+
"numberNormalization": { "const": "canonical-json" },
|
|
90
|
+
"excludedContextFields": { "const": ["requestId", "traceContext"] }
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"port": {
|
|
94
|
+
"enum": [
|
|
95
|
+
"artifact",
|
|
96
|
+
"localization",
|
|
97
|
+
"media",
|
|
98
|
+
"model",
|
|
99
|
+
"permission",
|
|
100
|
+
"preview",
|
|
101
|
+
"recovery",
|
|
102
|
+
"resource",
|
|
103
|
+
"telemetry"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"artifactSeed": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["id", "kind", "revision", "status"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
112
|
+
"kind": { "enum": ["blueprint", "content-model", "entry"] },
|
|
113
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
114
|
+
"status": { "enum": ["archived", "draft", "in-review", "published", "retired"] }
|
|
115
|
+
},
|
|
116
|
+
"allOf": [
|
|
117
|
+
{
|
|
118
|
+
"if": { "properties": { "kind": { "const": "entry" } }, "required": ["kind"] },
|
|
119
|
+
"then": {
|
|
120
|
+
"properties": {
|
|
121
|
+
"status": { "enum": ["archived", "draft", "in-review", "published"] }
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"else": {
|
|
125
|
+
"properties": { "status": { "enum": ["draft", "published", "retired"] } }
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"rateLimit": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"required": [
|
|
134
|
+
"operationId",
|
|
135
|
+
"maximumRequests",
|
|
136
|
+
"windowMilliseconds",
|
|
137
|
+
"retryAfterMilliseconds"
|
|
138
|
+
],
|
|
139
|
+
"properties": {
|
|
140
|
+
"operationId": { "$ref": "host-operations.schema.json#/$defs/operationCapability" },
|
|
141
|
+
"maximumRequests": { "type": "integer", "minimum": 1, "maximum": 1000 },
|
|
142
|
+
"windowMilliseconds": { "type": "integer", "minimum": 1, "maximum": 86400000 },
|
|
143
|
+
"retryAfterMilliseconds": {
|
|
144
|
+
"description": "The retry delay at logical time zero after the fixed-window bound is reached. It equals the initial window duration.",
|
|
145
|
+
"type": "integer",
|
|
146
|
+
"minimum": 1,
|
|
147
|
+
"maximum": 86400000
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"given": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"additionalProperties": false,
|
|
154
|
+
"required": ["artifacts", "permissions", "sessionGeneration"],
|
|
155
|
+
"properties": {
|
|
156
|
+
"artifacts": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"maxItems": 20,
|
|
159
|
+
"items": { "$ref": "#/$defs/artifactSeed" }
|
|
160
|
+
},
|
|
161
|
+
"permissions": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"maxItems": 50,
|
|
164
|
+
"uniqueItems": true,
|
|
165
|
+
"items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
166
|
+
},
|
|
167
|
+
"rateLimits": {
|
|
168
|
+
"type": "array",
|
|
169
|
+
"maxItems": 20,
|
|
170
|
+
"items": { "$ref": "#/$defs/rateLimit" }
|
|
171
|
+
},
|
|
172
|
+
"sessionGeneration": { "$ref": "common.schema.json#/$defs/revision" }
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"requestContext": {
|
|
176
|
+
"description": "The canonical host request envelope. Malformed single exchanges remain in the original host corpus; an intentional registered-capability mismatch is an executable invalid-request assertion here.",
|
|
177
|
+
"$ref": "host-request.schema.json#/$defs/requestContext"
|
|
178
|
+
},
|
|
179
|
+
"resultExpectation": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"additionalProperties": false,
|
|
182
|
+
"required": ["outcome"],
|
|
183
|
+
"properties": {
|
|
184
|
+
"outcome": { "const": "result" },
|
|
185
|
+
"revisionAdvancesFrom": { "$ref": "common.schema.json#/$defs/revision" },
|
|
186
|
+
"sameAs": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
187
|
+
"value": { "enum": ["null", "rendered"] }
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"errorExpectation": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": ["outcome", "category", "retryable"],
|
|
194
|
+
"properties": {
|
|
195
|
+
"outcome": { "const": "error" },
|
|
196
|
+
"category": {
|
|
197
|
+
"enum": [
|
|
198
|
+
"cancelled",
|
|
199
|
+
"conflict",
|
|
200
|
+
"forbidden",
|
|
201
|
+
"incompatible",
|
|
202
|
+
"internal",
|
|
203
|
+
"invalid-request",
|
|
204
|
+
"limit-exceeded",
|
|
205
|
+
"not-found",
|
|
206
|
+
"rate-limited",
|
|
207
|
+
"unauthenticated",
|
|
208
|
+
"unavailable",
|
|
209
|
+
"validation-failed"
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"retryable": { "type": "boolean" },
|
|
213
|
+
"retryAfterMilliseconds": {
|
|
214
|
+
"type": "integer",
|
|
215
|
+
"minimum": 0,
|
|
216
|
+
"maximum": 86400000
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"expectation": {
|
|
221
|
+
"oneOf": [{ "$ref": "#/$defs/resultExpectation" }, { "$ref": "#/$defs/errorExpectation" }]
|
|
222
|
+
},
|
|
223
|
+
"invokeStep": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"additionalProperties": false,
|
|
226
|
+
"required": ["action", "id", "port", "operation", "context", "completion"],
|
|
227
|
+
"properties": {
|
|
228
|
+
"action": { "const": "invoke" },
|
|
229
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
230
|
+
"port": { "$ref": "#/$defs/port" },
|
|
231
|
+
"operation": { "$ref": "common.schema.json#/$defs/localName" },
|
|
232
|
+
"context": { "$ref": "#/$defs/requestContext" },
|
|
233
|
+
"argument": { "$ref": "common.schema.json#/$defs/jsonValue" },
|
|
234
|
+
"completion": { "enum": ["pending", "settled"] },
|
|
235
|
+
"expect": { "$ref": "#/$defs/expectation" }
|
|
236
|
+
},
|
|
237
|
+
"allOf": [
|
|
238
|
+
{
|
|
239
|
+
"if": {
|
|
240
|
+
"properties": { "completion": { "const": "settled" } },
|
|
241
|
+
"required": ["completion"]
|
|
242
|
+
},
|
|
243
|
+
"then": {
|
|
244
|
+
"properties": { "expect": { "$ref": "#/$defs/expectation" } },
|
|
245
|
+
"required": ["expect"]
|
|
246
|
+
},
|
|
247
|
+
"else": { "not": { "required": ["expect"] } }
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"if": {
|
|
251
|
+
"properties": {
|
|
252
|
+
"port": { "const": "preview" },
|
|
253
|
+
"operation": { "const": "render" }
|
|
254
|
+
},
|
|
255
|
+
"required": ["port", "operation"]
|
|
256
|
+
},
|
|
257
|
+
"then": {
|
|
258
|
+
"properties": {
|
|
259
|
+
"argument": { "$ref": "preview-message.schema.json#/$defs/render" }
|
|
260
|
+
},
|
|
261
|
+
"required": ["argument"]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
"settleStep": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"additionalProperties": false,
|
|
269
|
+
"required": ["action", "id", "invocation", "expect"],
|
|
270
|
+
"properties": {
|
|
271
|
+
"action": { "const": "settle" },
|
|
272
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
273
|
+
"invocation": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
274
|
+
"expect": { "$ref": "#/$defs/expectation" }
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"advanceClockStep": {
|
|
278
|
+
"type": "object",
|
|
279
|
+
"additionalProperties": false,
|
|
280
|
+
"required": ["action", "id", "milliseconds"],
|
|
281
|
+
"properties": {
|
|
282
|
+
"action": { "const": "advance-clock" },
|
|
283
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
284
|
+
"milliseconds": { "type": "integer", "minimum": 1, "maximum": 86400000 }
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"releasePreviewRenderStep": {
|
|
288
|
+
"description": "A deterministic renderer completion injected after a prior preview.render invocation. It is a harness precondition, not a host port or transport operation.",
|
|
289
|
+
"type": "object",
|
|
290
|
+
"additionalProperties": false,
|
|
291
|
+
"required": ["action", "id", "invocation", "value"],
|
|
292
|
+
"properties": {
|
|
293
|
+
"action": { "const": "release-preview-render" },
|
|
294
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
295
|
+
"invocation": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
296
|
+
"value": { "$ref": "preview-message.schema.json#/$defs/rendered" }
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"artifactFinalState": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"additionalProperties": false,
|
|
302
|
+
"required": ["id", "status", "revisionFrom"],
|
|
303
|
+
"properties": {
|
|
304
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
305
|
+
"status": { "enum": ["archived", "draft", "in-review", "published", "retired"] },
|
|
306
|
+
"revisionFrom": { "$ref": "common.schema.json#/$defs/stableId" }
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"recoveryFinalState": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"additionalProperties": false,
|
|
312
|
+
"required": ["resourceContextKey", "value"],
|
|
313
|
+
"properties": {
|
|
314
|
+
"resourceContextKey": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
315
|
+
"value": { "$ref": "common.schema.json#/$defs/jsonValue" }
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"finalState": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"additionalProperties": false,
|
|
321
|
+
"required": ["pendingPreviewRenders", "previewDeliveries"],
|
|
322
|
+
"properties": {
|
|
323
|
+
"artifacts": {
|
|
324
|
+
"type": "array",
|
|
325
|
+
"maxItems": 20,
|
|
326
|
+
"items": { "$ref": "#/$defs/artifactFinalState" }
|
|
327
|
+
},
|
|
328
|
+
"recovery": {
|
|
329
|
+
"type": "array",
|
|
330
|
+
"maxItems": 20,
|
|
331
|
+
"items": { "$ref": "#/$defs/recoveryFinalState" }
|
|
332
|
+
},
|
|
333
|
+
"pendingPreviewRenders": { "const": 0 },
|
|
334
|
+
"previewDeliveries": {
|
|
335
|
+
"type": "array",
|
|
336
|
+
"maxItems": 20,
|
|
337
|
+
"items": { "type": "string", "pattern": "^[a-f0-9]{64}(?![\\s\\S])" }
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|