@8lines/gauntlet-protocol 0.1.0
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 +202 -0
- package/README.md +265 -0
- package/dist/environment.d.ts +3 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/environment.js +32 -0
- package/dist/environment.js.map +1 -0
- package/dist/identifiers.d.ts +4 -0
- package/dist/identifiers.d.ts.map +1 -0
- package/dist/identifiers.js +5 -0
- package/dist/identifiers.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/placements.d.ts +5 -0
- package/dist/placements.d.ts.map +1 -0
- package/dist/placements.js +99 -0
- package/dist/placements.js.map +1 -0
- package/dist/portable-pattern.d.ts +2 -0
- package/dist/portable-pattern.d.ts.map +1 -0
- package/dist/portable-pattern.js +450 -0
- package/dist/portable-pattern.js.map +1 -0
- package/dist/preset-secrets.d.ts +7 -0
- package/dist/preset-secrets.d.ts.map +1 -0
- package/dist/preset-secrets.js +694 -0
- package/dist/preset-secrets.js.map +1 -0
- package/dist/revision.d.ts +11 -0
- package/dist/revision.d.ts.map +1 -0
- package/dist/revision.js +135 -0
- package/dist/revision.js.map +1 -0
- package/dist/schema-profile.d.ts +5 -0
- package/dist/schema-profile.d.ts.map +1 -0
- package/dist/schema-profile.js +295 -0
- package/dist/schema-profile.js.map +1 -0
- package/dist/semantic-validation.d.ts +24 -0
- package/dist/semantic-validation.d.ts.map +1 -0
- package/dist/semantic-validation.js +321 -0
- package/dist/semantic-validation.js.map +1 -0
- package/dist/types.d.ts +437 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/fixtures/v1/adapter-semantic-vectors.json +3257 -0
- package/fixtures/v1/adapter-semantic-vectors.schema.json +519 -0
- package/fixtures/v1/create-run-request.valid.json +33 -0
- package/fixtures/v1/data-source-page.valid.json +18 -0
- package/fixtures/v1/data-source-query.valid.json +12 -0
- package/fixtures/v1/data-source-resolve-request.valid.json +10 -0
- package/fixtures/v1/data-source-resolve-response.valid.json +17 -0
- package/fixtures/v1/health.valid.json +4 -0
- package/fixtures/v1/jcs-revision-vectors.json +114 -0
- package/fixtures/v1/manifest.invalid-major-version.json +18 -0
- package/fixtures/v1/manifest.invalid-unknown-property.json +27 -0
- package/fixtures/v1/manifest.minor-forward.valid.json +142 -0
- package/fixtures/v1/manifest.valid.json +137 -0
- package/fixtures/v1/operation.invalid-remote-ref.json +28 -0
- package/fixtures/v1/operation.invalid-schema-profile.json +28 -0
- package/fixtures/v1/operation.invalid-unsafe-id.json +28 -0
- package/fixtures/v1/operation.valid.json +227 -0
- package/fixtures/v1/problem.unsupported-capability.valid.json +7 -0
- package/fixtures/v1/problem.valid.json +8 -0
- package/fixtures/v1/problem.validation.valid.json +16 -0
- package/fixtures/v1/run-event.valid.json +21 -0
- package/fixtures/v1/run.cancelled.valid.json +17 -0
- package/fixtures/v1/run.failed.valid.json +32 -0
- package/fixtures/v1/run.invalid-active-problem.json +16 -0
- package/fixtures/v1/run.invalid-cancelled-problem.json +17 -0
- package/fixtures/v1/run.invalid-terminal-without-problem.json +12 -0
- package/fixtures/v1/run.invalid-timed-out-status.json +18 -0
- package/fixtures/v1/run.queued.valid.json +15 -0
- package/fixtures/v1/run.succeeded.valid.json +68 -0
- package/fixtures/v1/run.timed-out.valid.json +18 -0
- package/fixtures/v1/session-launch.valid.json +5 -0
- package/fixtures/v1/tc-schema-core-pattern-vectors.json +450 -0
- package/fixtures/v1/upload-response.valid.json +11 -0
- package/openapi/adapter-v1.yaml +251 -0
- package/package.json +41 -0
- package/schemas/v1/common.schema.json +558 -0
- package/schemas/v1/create-run-request.schema.json +16 -0
- package/schemas/v1/data-source-page.schema.json +15 -0
- package/schemas/v1/data-source-query.schema.json +14 -0
- package/schemas/v1/data-source-resolve-request.schema.json +16 -0
- package/schemas/v1/data-source-resolve-response.schema.json +27 -0
- package/schemas/v1/health.schema.json +12 -0
- package/schemas/v1/manifest.schema.json +147 -0
- package/schemas/v1/operation-definition.schema.json +326 -0
- package/schemas/v1/problem.schema.json +5 -0
- package/schemas/v1/run-event.schema.json +15 -0
- package/schemas/v1/run.schema.json +95 -0
- package/schemas/v1/session-launch.schema.json +13 -0
- package/schemas/v1/upload.schema.json +11 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.8lines.dev/gauntlet/v1/manifest.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"protocolVersion",
|
|
7
|
+
"manifestRevision",
|
|
8
|
+
"schemaDialect",
|
|
9
|
+
"profiles",
|
|
10
|
+
"capabilities",
|
|
11
|
+
"application",
|
|
12
|
+
"features",
|
|
13
|
+
"operations",
|
|
14
|
+
"dataSources"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"protocolVersion": { "$ref": "./common.schema.json#/$defs/protocolVersion" },
|
|
18
|
+
"manifestRevision": { "$ref": "./common.schema.json#/$defs/sha256Revision" },
|
|
19
|
+
"schemaDialect": { "const": "https://json-schema.org/draft/2020-12/schema" },
|
|
20
|
+
"profiles": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": { "$ref": "./common.schema.json#/$defs/profileId" },
|
|
23
|
+
"uniqueItems": true
|
|
24
|
+
},
|
|
25
|
+
"capabilities": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": { "$ref": "./common.schema.json#/$defs/capabilityId" },
|
|
28
|
+
"uniqueItems": true
|
|
29
|
+
},
|
|
30
|
+
"application": { "$ref": "#/$defs/application" },
|
|
31
|
+
"features": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": { "$ref": "#/$defs/feature" }
|
|
34
|
+
},
|
|
35
|
+
"operations": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "$ref": "#/$defs/operationSummary" }
|
|
38
|
+
},
|
|
39
|
+
"dataSources": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": { "$ref": "#/$defs/dataSourceDefinition" }
|
|
42
|
+
},
|
|
43
|
+
"diagnostics": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "$ref": "#/$defs/diagnostic" }
|
|
46
|
+
},
|
|
47
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"$defs": {
|
|
51
|
+
"application": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["id", "label", "environment"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
56
|
+
"label": { "type": "string", "minLength": 1 },
|
|
57
|
+
"environment": { "$ref": "./common.schema.json#/$defs/environmentDescriptor" },
|
|
58
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
59
|
+
},
|
|
60
|
+
"additionalProperties": false
|
|
61
|
+
},
|
|
62
|
+
"feature": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"required": ["id", "label"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
67
|
+
"label": { "type": "string", "minLength": 1 },
|
|
68
|
+
"parentId": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
69
|
+
"order": { "$ref": "./common.schema.json#/$defs/safeInteger" },
|
|
70
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
},
|
|
74
|
+
"availability": {
|
|
75
|
+
"oneOf": [
|
|
76
|
+
{
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": ["state"],
|
|
79
|
+
"properties": { "state": { "const": "available" } },
|
|
80
|
+
"additionalProperties": false
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "object",
|
|
84
|
+
"required": ["state", "problem"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"state": { "const": "unavailable" },
|
|
87
|
+
"problem": { "$ref": "./common.schema.json#/$defs/problem" }
|
|
88
|
+
},
|
|
89
|
+
"additionalProperties": false
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"operationSummary": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"required": ["id", "revision", "label", "featureId", "availability"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
98
|
+
"revision": { "$ref": "./common.schema.json#/$defs/sha256Revision" },
|
|
99
|
+
"label": { "type": "string", "minLength": 1 },
|
|
100
|
+
"featureId": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
101
|
+
"availability": { "$ref": "#/$defs/availability" },
|
|
102
|
+
"requirements": { "$ref": "./common.schema.json#/$defs/protocolRequirements" },
|
|
103
|
+
"placements": { "$ref": "./common.schema.json#/$defs/operationPlacements" },
|
|
104
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
105
|
+
},
|
|
106
|
+
"additionalProperties": false
|
|
107
|
+
},
|
|
108
|
+
"dataSourceCapabilities": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"required": ["search", "pagination", "resolve", "defaultLimit", "maxLimit"],
|
|
111
|
+
"properties": {
|
|
112
|
+
"search": { "type": "boolean" },
|
|
113
|
+
"pagination": { "const": "cursor" },
|
|
114
|
+
"resolve": { "const": true },
|
|
115
|
+
"defaultLimit": { "$ref": "./common.schema.json#/$defs/positiveSafeInteger" },
|
|
116
|
+
"maxLimit": { "$ref": "./common.schema.json#/$defs/positiveSafeInteger" }
|
|
117
|
+
},
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
},
|
|
120
|
+
"dataSourceDefinition": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"required": ["id", "label", "capabilities"],
|
|
123
|
+
"properties": {
|
|
124
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
125
|
+
"label": { "type": "string", "minLength": 1 },
|
|
126
|
+
"description": { "type": "string" },
|
|
127
|
+
"capabilities": { "$ref": "#/$defs/dataSourceCapabilities" },
|
|
128
|
+
"dependencySchema": { "$ref": "./common.schema.json#/$defs/objectJsonSchema" },
|
|
129
|
+
"contextSchema": { "$ref": "./common.schema.json#/$defs/objectJsonSchema" },
|
|
130
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
131
|
+
},
|
|
132
|
+
"additionalProperties": false
|
|
133
|
+
},
|
|
134
|
+
"diagnostic": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"required": ["severity", "code", "message"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"severity": { "enum": ["warning", "error"] },
|
|
139
|
+
"code": { "type": "string" },
|
|
140
|
+
"message": { "type": "string" },
|
|
141
|
+
"operationId": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
142
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
143
|
+
},
|
|
144
|
+
"additionalProperties": false
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.8lines.dev/gauntlet/v1/operation-definition.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"id",
|
|
7
|
+
"revision",
|
|
8
|
+
"label",
|
|
9
|
+
"featureId",
|
|
10
|
+
"order",
|
|
11
|
+
"tags",
|
|
12
|
+
"inputSchema",
|
|
13
|
+
"dataSources",
|
|
14
|
+
"presets",
|
|
15
|
+
"execution",
|
|
16
|
+
"output"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
20
|
+
"revision": { "$ref": "./common.schema.json#/$defs/sha256Revision" },
|
|
21
|
+
"label": { "type": "string", "minLength": 1 },
|
|
22
|
+
"featureId": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
23
|
+
"description": { "type": "string" },
|
|
24
|
+
"icon": { "type": "string" },
|
|
25
|
+
"order": { "$ref": "./common.schema.json#/$defs/safeInteger" },
|
|
26
|
+
"tags": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": { "type": "string" },
|
|
29
|
+
"uniqueItems": true
|
|
30
|
+
},
|
|
31
|
+
"requirements": { "$ref": "./common.schema.json#/$defs/protocolRequirements" },
|
|
32
|
+
"placements": { "$ref": "./common.schema.json#/$defs/operationPlacements" },
|
|
33
|
+
"inputSchema": { "$ref": "./common.schema.json#/$defs/objectJsonSchema" },
|
|
34
|
+
"inputHandling": { "$ref": "#/$defs/inputHandling" },
|
|
35
|
+
"contextSchema": { "$ref": "./common.schema.json#/$defs/objectJsonSchema" },
|
|
36
|
+
"uiSchema": { "$ref": "#/$defs/operationUiSchema" },
|
|
37
|
+
"dataSources": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": { "$ref": "#/$defs/dataSourceReference" }
|
|
40
|
+
},
|
|
41
|
+
"presets": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": { "$ref": "#/$defs/operationPreset" }
|
|
44
|
+
},
|
|
45
|
+
"execution": { "$ref": "#/$defs/executionPolicy" },
|
|
46
|
+
"output": { "$ref": "#/$defs/operationOutput" },
|
|
47
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"$defs": {
|
|
51
|
+
"dataSourceReference": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["id", "inputPointer", "dependencyPointers"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
56
|
+
"inputPointer": { "$ref": "./common.schema.json#/$defs/jsonPointer" },
|
|
57
|
+
"dependencyPointers": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": { "$ref": "./common.schema.json#/$defs/jsonPointer" },
|
|
60
|
+
"uniqueItems": true
|
|
61
|
+
},
|
|
62
|
+
"contextPointers": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": { "$ref": "./common.schema.json#/$defs/jsonPointer" },
|
|
65
|
+
"uniqueItems": true
|
|
66
|
+
},
|
|
67
|
+
"required": { "type": "boolean" },
|
|
68
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
69
|
+
},
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
},
|
|
72
|
+
"uiCondition": {
|
|
73
|
+
"oneOf": [
|
|
74
|
+
{
|
|
75
|
+
"type": "object",
|
|
76
|
+
"required": ["op", "pointer"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"op": { "const": "present" },
|
|
79
|
+
"pointer": { "$ref": "./common.schema.json#/$defs/jsonPointer" }
|
|
80
|
+
},
|
|
81
|
+
"additionalProperties": false
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "object",
|
|
85
|
+
"required": ["op", "pointer", "value"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"op": { "const": "equals" },
|
|
88
|
+
"pointer": { "$ref": "./common.schema.json#/$defs/jsonPointer" },
|
|
89
|
+
"value": { "$ref": "./common.schema.json#/$defs/jsonValue" }
|
|
90
|
+
},
|
|
91
|
+
"additionalProperties": false
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "object",
|
|
95
|
+
"required": ["op", "pointer", "values"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"op": { "const": "in" },
|
|
98
|
+
"pointer": { "$ref": "./common.schema.json#/$defs/jsonPointer" },
|
|
99
|
+
"values": {
|
|
100
|
+
"type": "array",
|
|
101
|
+
"items": { "$ref": "./common.schema.json#/$defs/jsonValue" }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "object",
|
|
108
|
+
"required": ["op", "conditions"],
|
|
109
|
+
"properties": {
|
|
110
|
+
"op": { "enum": ["all", "any"] },
|
|
111
|
+
"conditions": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": { "$ref": "#/$defs/uiCondition" },
|
|
114
|
+
"minItems": 1
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"additionalProperties": false
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "object",
|
|
121
|
+
"required": ["op", "condition"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"op": { "const": "not" },
|
|
124
|
+
"condition": { "$ref": "#/$defs/uiCondition" }
|
|
125
|
+
},
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"widget": {
|
|
131
|
+
"anyOf": [
|
|
132
|
+
{
|
|
133
|
+
"enum": [
|
|
134
|
+
"text",
|
|
135
|
+
"textarea",
|
|
136
|
+
"integer",
|
|
137
|
+
"number",
|
|
138
|
+
"toggle",
|
|
139
|
+
"select",
|
|
140
|
+
"multi-select",
|
|
141
|
+
"autocomplete",
|
|
142
|
+
"date",
|
|
143
|
+
"date-time",
|
|
144
|
+
"duration",
|
|
145
|
+
"code",
|
|
146
|
+
"json",
|
|
147
|
+
"secret",
|
|
148
|
+
"file"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "string",
|
|
153
|
+
"pattern": "^urn:[A-Za-z0-9][A-Za-z0-9:._/-]*$"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"uiNode": {
|
|
158
|
+
"oneOf": [
|
|
159
|
+
{
|
|
160
|
+
"type": "object",
|
|
161
|
+
"required": ["type", "pointer"],
|
|
162
|
+
"properties": {
|
|
163
|
+
"type": { "const": "field" },
|
|
164
|
+
"pointer": { "$ref": "./common.schema.json#/$defs/jsonPointer" },
|
|
165
|
+
"widget": { "$ref": "#/$defs/widget" },
|
|
166
|
+
"dataSourceId": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
167
|
+
"label": { "type": "string" },
|
|
168
|
+
"help": { "type": "string" },
|
|
169
|
+
"options": { "$ref": "./common.schema.json#/$defs/jsonObject" },
|
|
170
|
+
"visibleWhen": { "$ref": "#/$defs/uiCondition" },
|
|
171
|
+
"enabledWhen": { "$ref": "#/$defs/uiCondition" }
|
|
172
|
+
},
|
|
173
|
+
"additionalProperties": false
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "object",
|
|
177
|
+
"required": ["type", "children"],
|
|
178
|
+
"properties": {
|
|
179
|
+
"type": { "enum": ["group", "columns"] },
|
|
180
|
+
"label": { "type": "string" },
|
|
181
|
+
"children": {
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": { "$ref": "#/$defs/uiNode" }
|
|
184
|
+
},
|
|
185
|
+
"visibleWhen": { "$ref": "#/$defs/uiCondition" }
|
|
186
|
+
},
|
|
187
|
+
"additionalProperties": false
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"type": "object",
|
|
191
|
+
"required": ["type", "tabs"],
|
|
192
|
+
"properties": {
|
|
193
|
+
"type": { "const": "tabs" },
|
|
194
|
+
"tabs": {
|
|
195
|
+
"type": "array",
|
|
196
|
+
"items": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"required": ["id", "label", "children"],
|
|
199
|
+
"properties": {
|
|
200
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
201
|
+
"label": { "type": "string" },
|
|
202
|
+
"children": {
|
|
203
|
+
"type": "array",
|
|
204
|
+
"items": { "$ref": "#/$defs/uiNode" }
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"additionalProperties": false
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"additionalProperties": false
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"operationUiSchema": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"required": ["profile", "root"],
|
|
218
|
+
"properties": {
|
|
219
|
+
"profile": { "const": "tc-rich-forms@1" },
|
|
220
|
+
"root": { "$ref": "#/$defs/uiNode" },
|
|
221
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
222
|
+
},
|
|
223
|
+
"additionalProperties": false
|
|
224
|
+
},
|
|
225
|
+
"operationPreset": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"required": ["id", "label", "input"],
|
|
228
|
+
"properties": {
|
|
229
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
230
|
+
"label": { "type": "string" },
|
|
231
|
+
"description": { "type": "string" },
|
|
232
|
+
"input": { "$ref": "./common.schema.json#/$defs/jsonObject" },
|
|
233
|
+
"lockedPointers": {
|
|
234
|
+
"type": "array",
|
|
235
|
+
"items": { "$ref": "./common.schema.json#/$defs/jsonPointer" },
|
|
236
|
+
"uniqueItems": true
|
|
237
|
+
},
|
|
238
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
239
|
+
},
|
|
240
|
+
"additionalProperties": false
|
|
241
|
+
},
|
|
242
|
+
"secretRule": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"required": ["kind", "schemaPointer", "retention"],
|
|
245
|
+
"properties": {
|
|
246
|
+
"kind": { "const": "secret" },
|
|
247
|
+
"schemaPointer": { "$ref": "./common.schema.json#/$defs/jsonPointer" },
|
|
248
|
+
"retention": { "const": "none" }
|
|
249
|
+
},
|
|
250
|
+
"additionalProperties": false
|
|
251
|
+
},
|
|
252
|
+
"fileRule": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"required": ["kind", "schemaPointer", "multiple"],
|
|
255
|
+
"properties": {
|
|
256
|
+
"kind": { "const": "file" },
|
|
257
|
+
"schemaPointer": { "$ref": "./common.schema.json#/$defs/jsonPointer" },
|
|
258
|
+
"multiple": { "type": "boolean" },
|
|
259
|
+
"mediaTypes": {
|
|
260
|
+
"type": "array",
|
|
261
|
+
"items": { "type": "string", "minLength": 1 },
|
|
262
|
+
"uniqueItems": true
|
|
263
|
+
},
|
|
264
|
+
"maxBytes": { "$ref": "./common.schema.json#/$defs/positiveSafeInteger" }
|
|
265
|
+
},
|
|
266
|
+
"additionalProperties": false
|
|
267
|
+
},
|
|
268
|
+
"inputHandling": {
|
|
269
|
+
"type": "object",
|
|
270
|
+
"required": ["rules"],
|
|
271
|
+
"properties": {
|
|
272
|
+
"rules": {
|
|
273
|
+
"type": "array",
|
|
274
|
+
"items": {
|
|
275
|
+
"oneOf": [
|
|
276
|
+
{ "$ref": "#/$defs/secretRule" },
|
|
277
|
+
{ "$ref": "#/$defs/fileRule" }
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
282
|
+
},
|
|
283
|
+
"additionalProperties": false
|
|
284
|
+
},
|
|
285
|
+
"executionPolicy": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"required": [
|
|
288
|
+
"impact",
|
|
289
|
+
"confirmationRequired",
|
|
290
|
+
"dryRunSupported",
|
|
291
|
+
"idempotency",
|
|
292
|
+
"cancellationSupported"
|
|
293
|
+
],
|
|
294
|
+
"properties": {
|
|
295
|
+
"impact": { "$ref": "./common.schema.json#/$defs/operationImpact" },
|
|
296
|
+
"confirmationRequired": { "type": "boolean" },
|
|
297
|
+
"dryRunSupported": { "type": "boolean" },
|
|
298
|
+
"idempotency": { "enum": ["none", "optional", "required"] },
|
|
299
|
+
"cancellationSupported": { "type": "boolean" },
|
|
300
|
+
"timeoutSeconds": { "$ref": "./common.schema.json#/$defs/positiveSafeInteger" },
|
|
301
|
+
"concurrency": { "enum": ["allow", "forbid", "queue"] },
|
|
302
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
303
|
+
},
|
|
304
|
+
"additionalProperties": false
|
|
305
|
+
},
|
|
306
|
+
"resultPresentation": {
|
|
307
|
+
"type": "object",
|
|
308
|
+
"required": ["profile"],
|
|
309
|
+
"properties": {
|
|
310
|
+
"profile": { "const": "tc-rich-results@1" },
|
|
311
|
+
"defaultView": { "enum": ["summary", "details", "artifacts"] }
|
|
312
|
+
},
|
|
313
|
+
"additionalProperties": false
|
|
314
|
+
},
|
|
315
|
+
"operationOutput": {
|
|
316
|
+
"type": "object",
|
|
317
|
+
"required": ["schema"],
|
|
318
|
+
"properties": {
|
|
319
|
+
"schema": { "$ref": "./common.schema.json#/$defs/jsonSchema" },
|
|
320
|
+
"presentation": { "$ref": "#/$defs/resultPresentation" },
|
|
321
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
322
|
+
},
|
|
323
|
+
"additionalProperties": false
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.8lines.dev/gauntlet/v1/run-event.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["id", "sequence", "occurredAt", "type", "run"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
8
|
+
"sequence": { "$ref": "./common.schema.json#/$defs/nonNegativeSafeInteger" },
|
|
9
|
+
"occurredAt": { "$ref": "./common.schema.json#/$defs/rfc3339Timestamp" },
|
|
10
|
+
"type": { "const": "run.updated" },
|
|
11
|
+
"run": { "$ref": "./run.schema.json" },
|
|
12
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
13
|
+
},
|
|
14
|
+
"additionalProperties": false
|
|
15
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.8lines.dev/gauntlet/v1/run.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"id",
|
|
7
|
+
"operationId",
|
|
8
|
+
"operationRevision",
|
|
9
|
+
"sequence",
|
|
10
|
+
"state",
|
|
11
|
+
"createdAt",
|
|
12
|
+
"updatedAt",
|
|
13
|
+
"artifacts",
|
|
14
|
+
"actions"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"id": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
18
|
+
"operationId": { "$ref": "./common.schema.json#/$defs/portableId" },
|
|
19
|
+
"operationRevision": { "$ref": "./common.schema.json#/$defs/sha256Revision" },
|
|
20
|
+
"sequence": { "$ref": "./common.schema.json#/$defs/nonNegativeSafeInteger" },
|
|
21
|
+
"state": {
|
|
22
|
+
"enum": ["queued", "running", "succeeded", "failed", "partial", "cancelled", "timed_out", "expired"]
|
|
23
|
+
},
|
|
24
|
+
"createdAt": { "$ref": "./common.schema.json#/$defs/rfc3339Timestamp" },
|
|
25
|
+
"updatedAt": { "$ref": "./common.schema.json#/$defs/rfc3339Timestamp" },
|
|
26
|
+
"startedAt": { "$ref": "./common.schema.json#/$defs/rfc3339Timestamp" },
|
|
27
|
+
"completedAt": { "$ref": "./common.schema.json#/$defs/rfc3339Timestamp" },
|
|
28
|
+
"progress": { "$ref": "./common.schema.json#/$defs/runProgress" },
|
|
29
|
+
"summary": { "$ref": "./common.schema.json#/$defs/runSummary" },
|
|
30
|
+
"output": { "$ref": "./common.schema.json#/$defs/jsonValue" },
|
|
31
|
+
"artifacts": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": { "$ref": "./common.schema.json#/$defs/artifact" }
|
|
34
|
+
},
|
|
35
|
+
"actions": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "$ref": "./common.schema.json#/$defs/followUpAction" }
|
|
38
|
+
},
|
|
39
|
+
"problem": { "$ref": "./common.schema.json#/$defs/problem" },
|
|
40
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
41
|
+
},
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"oneOf": [
|
|
44
|
+
{
|
|
45
|
+
"properties": {
|
|
46
|
+
"state": { "enum": ["queued", "running"] },
|
|
47
|
+
"completedAt": false,
|
|
48
|
+
"problem": false
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"required": ["completedAt"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"state": { "const": "succeeded" },
|
|
55
|
+
"problem": false
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"required": ["completedAt", "problem"],
|
|
60
|
+
"properties": {
|
|
61
|
+
"state": { "enum": ["failed", "partial", "expired"] }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"required": ["completedAt", "problem"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"state": { "const": "cancelled" },
|
|
68
|
+
"problem": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"required": ["type", "title", "status"],
|
|
71
|
+
"properties": {
|
|
72
|
+
"type": { "const": "urn:gauntlet:problem:run-cancelled" },
|
|
73
|
+
"title": { "const": "Run cancelled" },
|
|
74
|
+
"status": { "const": 409 }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"required": ["completedAt", "problem"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"state": { "const": "timed_out" },
|
|
83
|
+
"problem": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"required": ["type", "title", "status"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"type": { "const": "urn:gauntlet:problem:run-timed-out" },
|
|
88
|
+
"title": { "const": "Run timed out" },
|
|
89
|
+
"status": { "const": 504 }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.8lines.dev/gauntlet/v1/session-launch.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["url", "expiresAt", "singleUse"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"url": { "$ref": "./common.schema.json#/$defs/httpUrl" },
|
|
8
|
+
"expiresAt": { "$ref": "./common.schema.json#/$defs/rfc3339Timestamp" },
|
|
9
|
+
"singleUse": { "const": true },
|
|
10
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
11
|
+
},
|
|
12
|
+
"additionalProperties": false
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.8lines.dev/gauntlet/v1/upload.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["file"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"file": { "$ref": "./common.schema.json#/$defs/fileReference" },
|
|
8
|
+
"extensions": { "$ref": "./common.schema.json#/$defs/extensions" }
|
|
9
|
+
},
|
|
10
|
+
"additionalProperties": false
|
|
11
|
+
}
|