@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,251 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: Gauntlet Adapter API
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
|
|
6
|
+
paths:
|
|
7
|
+
/_gauntlet/v1/health:
|
|
8
|
+
get:
|
|
9
|
+
operationId: getAdapterHealth
|
|
10
|
+
responses:
|
|
11
|
+
"200":
|
|
12
|
+
description: Adapter health and negotiated protocol version.
|
|
13
|
+
content:
|
|
14
|
+
application/json:
|
|
15
|
+
schema:
|
|
16
|
+
$ref: ../schemas/v1/health.schema.json
|
|
17
|
+
default:
|
|
18
|
+
$ref: "#/components/responses/Problem"
|
|
19
|
+
/_gauntlet/v1/manifest:
|
|
20
|
+
get:
|
|
21
|
+
operationId: getAdapterManifest
|
|
22
|
+
responses:
|
|
23
|
+
"200":
|
|
24
|
+
description: Canonical adapter manifest.
|
|
25
|
+
headers:
|
|
26
|
+
ETag:
|
|
27
|
+
description: Quoted manifest revision for conditional requests.
|
|
28
|
+
schema:
|
|
29
|
+
type: string
|
|
30
|
+
content:
|
|
31
|
+
application/json:
|
|
32
|
+
schema:
|
|
33
|
+
$ref: ../schemas/v1/manifest.schema.json
|
|
34
|
+
"304":
|
|
35
|
+
description: Not modified; the cached manifest identified by the request validator remains current.
|
|
36
|
+
default:
|
|
37
|
+
$ref: "#/components/responses/Problem"
|
|
38
|
+
/_gauntlet/v1/operations/{operationId}:
|
|
39
|
+
parameters:
|
|
40
|
+
- $ref: "#/components/parameters/OperationId"
|
|
41
|
+
get:
|
|
42
|
+
operationId: getOperationDefinition
|
|
43
|
+
responses:
|
|
44
|
+
"200":
|
|
45
|
+
description: Canonical operation definition.
|
|
46
|
+
headers:
|
|
47
|
+
ETag:
|
|
48
|
+
description: Quoted operation revision for conditional requests.
|
|
49
|
+
schema:
|
|
50
|
+
type: string
|
|
51
|
+
content:
|
|
52
|
+
application/json:
|
|
53
|
+
schema:
|
|
54
|
+
$ref: ../schemas/v1/operation-definition.schema.json
|
|
55
|
+
"304":
|
|
56
|
+
description: Not modified; the cached operation definition identified by the request validator remains current.
|
|
57
|
+
default:
|
|
58
|
+
$ref: "#/components/responses/Problem"
|
|
59
|
+
/_gauntlet/v1/operations/{operationId}/runs:
|
|
60
|
+
parameters:
|
|
61
|
+
- $ref: "#/components/parameters/OperationId"
|
|
62
|
+
post:
|
|
63
|
+
operationId: createRun
|
|
64
|
+
requestBody:
|
|
65
|
+
required: true
|
|
66
|
+
content:
|
|
67
|
+
application/json:
|
|
68
|
+
schema:
|
|
69
|
+
$ref: ../schemas/v1/create-run-request.schema.json
|
|
70
|
+
responses:
|
|
71
|
+
"201":
|
|
72
|
+
description: Synchronously completed terminal adapter-owned run snapshot.
|
|
73
|
+
content:
|
|
74
|
+
application/json:
|
|
75
|
+
schema:
|
|
76
|
+
$ref: ../schemas/v1/run.schema.json
|
|
77
|
+
"202":
|
|
78
|
+
description: Accepted non-terminal adapter-owned run snapshot.
|
|
79
|
+
content:
|
|
80
|
+
application/json:
|
|
81
|
+
schema:
|
|
82
|
+
$ref: ../schemas/v1/run.schema.json
|
|
83
|
+
default:
|
|
84
|
+
$ref: "#/components/responses/Problem"
|
|
85
|
+
/_gauntlet/v1/runs/{runId}:
|
|
86
|
+
parameters:
|
|
87
|
+
- $ref: "#/components/parameters/RunId"
|
|
88
|
+
get:
|
|
89
|
+
operationId: getRun
|
|
90
|
+
responses:
|
|
91
|
+
"200":
|
|
92
|
+
description: Latest immutable run snapshot.
|
|
93
|
+
content:
|
|
94
|
+
application/json:
|
|
95
|
+
schema:
|
|
96
|
+
$ref: ../schemas/v1/run.schema.json
|
|
97
|
+
default:
|
|
98
|
+
$ref: "#/components/responses/Problem"
|
|
99
|
+
/_gauntlet/v1/runs/{runId}/cancel:
|
|
100
|
+
parameters:
|
|
101
|
+
- $ref: "#/components/parameters/RunId"
|
|
102
|
+
post:
|
|
103
|
+
operationId: cancelRun
|
|
104
|
+
responses:
|
|
105
|
+
"202":
|
|
106
|
+
description: Latest run snapshot after accepting cancellation.
|
|
107
|
+
content:
|
|
108
|
+
application/json:
|
|
109
|
+
schema:
|
|
110
|
+
$ref: ../schemas/v1/run.schema.json
|
|
111
|
+
default:
|
|
112
|
+
$ref: "#/components/responses/Problem"
|
|
113
|
+
/_gauntlet/v1/runs/{runId}/events:
|
|
114
|
+
parameters:
|
|
115
|
+
- $ref: "#/components/parameters/RunId"
|
|
116
|
+
- name: Last-Event-ID
|
|
117
|
+
in: header
|
|
118
|
+
required: false
|
|
119
|
+
schema:
|
|
120
|
+
type: string
|
|
121
|
+
get:
|
|
122
|
+
operationId: streamRunEvents
|
|
123
|
+
responses:
|
|
124
|
+
"200":
|
|
125
|
+
description: Server-sent events whose data field contains a complete RunEvent snapshot.
|
|
126
|
+
content:
|
|
127
|
+
text/event-stream:
|
|
128
|
+
schema:
|
|
129
|
+
type: string
|
|
130
|
+
contentMediaType: application/json
|
|
131
|
+
contentSchema:
|
|
132
|
+
$ref: ../schemas/v1/run-event.schema.json
|
|
133
|
+
default:
|
|
134
|
+
$ref: "#/components/responses/Problem"
|
|
135
|
+
/_gauntlet/v1/data-sources/{dataSourceId}/query:
|
|
136
|
+
parameters:
|
|
137
|
+
- $ref: "#/components/parameters/DataSourceId"
|
|
138
|
+
post:
|
|
139
|
+
operationId: queryDataSource
|
|
140
|
+
requestBody:
|
|
141
|
+
required: true
|
|
142
|
+
content:
|
|
143
|
+
application/json:
|
|
144
|
+
schema:
|
|
145
|
+
$ref: ../schemas/v1/data-source-query.schema.json
|
|
146
|
+
responses:
|
|
147
|
+
"200":
|
|
148
|
+
description: Cursor-paginated data-source items.
|
|
149
|
+
content:
|
|
150
|
+
application/json:
|
|
151
|
+
schema:
|
|
152
|
+
$ref: ../schemas/v1/data-source-page.schema.json
|
|
153
|
+
default:
|
|
154
|
+
$ref: "#/components/responses/Problem"
|
|
155
|
+
/_gauntlet/v1/data-sources/{dataSourceId}/resolve:
|
|
156
|
+
parameters:
|
|
157
|
+
- $ref: "#/components/parameters/DataSourceId"
|
|
158
|
+
post:
|
|
159
|
+
operationId: resolveDataSourceValues
|
|
160
|
+
requestBody:
|
|
161
|
+
required: true
|
|
162
|
+
content:
|
|
163
|
+
application/json:
|
|
164
|
+
schema:
|
|
165
|
+
$ref: ../schemas/v1/data-source-resolve-request.schema.json
|
|
166
|
+
responses:
|
|
167
|
+
"200":
|
|
168
|
+
description: Ordered value resolution results.
|
|
169
|
+
content:
|
|
170
|
+
application/json:
|
|
171
|
+
schema:
|
|
172
|
+
$ref: ../schemas/v1/data-source-resolve-response.schema.json
|
|
173
|
+
default:
|
|
174
|
+
$ref: "#/components/responses/Problem"
|
|
175
|
+
/_gauntlet/v1/uploads:
|
|
176
|
+
post:
|
|
177
|
+
operationId: uploadFile
|
|
178
|
+
requestBody:
|
|
179
|
+
required: true
|
|
180
|
+
content:
|
|
181
|
+
multipart/form-data:
|
|
182
|
+
schema:
|
|
183
|
+
type: object
|
|
184
|
+
required:
|
|
185
|
+
- file
|
|
186
|
+
properties:
|
|
187
|
+
file:
|
|
188
|
+
type: string
|
|
189
|
+
format: binary
|
|
190
|
+
additionalProperties: false
|
|
191
|
+
responses:
|
|
192
|
+
"201":
|
|
193
|
+
description: Opaque expiring file reference.
|
|
194
|
+
content:
|
|
195
|
+
application/json:
|
|
196
|
+
schema:
|
|
197
|
+
$ref: ../schemas/v1/upload.schema.json
|
|
198
|
+
default:
|
|
199
|
+
$ref: "#/components/responses/Problem"
|
|
200
|
+
/_gauntlet/v1/runs/{runId}/artifacts/{artifactId}/launch:
|
|
201
|
+
parameters:
|
|
202
|
+
- $ref: "#/components/parameters/RunId"
|
|
203
|
+
- $ref: "#/components/parameters/ArtifactId"
|
|
204
|
+
post:
|
|
205
|
+
operationId: launchBrowserSession
|
|
206
|
+
responses:
|
|
207
|
+
"201":
|
|
208
|
+
description: Newly minted single-use browser URL.
|
|
209
|
+
content:
|
|
210
|
+
application/json:
|
|
211
|
+
schema:
|
|
212
|
+
$ref: ../schemas/v1/session-launch.schema.json
|
|
213
|
+
default:
|
|
214
|
+
$ref: "#/components/responses/Problem"
|
|
215
|
+
components:
|
|
216
|
+
parameters:
|
|
217
|
+
OperationId:
|
|
218
|
+
name: operationId
|
|
219
|
+
in: path
|
|
220
|
+
required: true
|
|
221
|
+
schema:
|
|
222
|
+
type: string
|
|
223
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
224
|
+
RunId:
|
|
225
|
+
name: runId
|
|
226
|
+
in: path
|
|
227
|
+
required: true
|
|
228
|
+
schema:
|
|
229
|
+
type: string
|
|
230
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
231
|
+
DataSourceId:
|
|
232
|
+
name: dataSourceId
|
|
233
|
+
in: path
|
|
234
|
+
required: true
|
|
235
|
+
schema:
|
|
236
|
+
type: string
|
|
237
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
238
|
+
ArtifactId:
|
|
239
|
+
name: artifactId
|
|
240
|
+
in: path
|
|
241
|
+
required: true
|
|
242
|
+
schema:
|
|
243
|
+
type: string
|
|
244
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
245
|
+
responses:
|
|
246
|
+
Problem:
|
|
247
|
+
description: Typed protocol problem.
|
|
248
|
+
content:
|
|
249
|
+
application/problem+json:
|
|
250
|
+
schema:
|
|
251
|
+
$ref: ../schemas/v1/problem.schema.json
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@8lines/gauntlet-protocol",
|
|
3
|
+
"description": "Language-neutral Adapter v1 contracts, JSON Schemas, OpenAPI definitions, semantic validators, and conformance fixtures for Gauntlet.",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=24 <27"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/8lines/gauntlet.git",
|
|
13
|
+
"directory": "packages/protocol"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"registry": "https://registry.npmjs.org/"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./schemas/v1/*": "./schemas/v1/*",
|
|
25
|
+
"./fixtures/v1/*": "./fixtures/v1/*",
|
|
26
|
+
"./openapi/*": "./openapi/*"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"schemas",
|
|
31
|
+
"openapi",
|
|
32
|
+
"fixtures",
|
|
33
|
+
"README.md",
|
|
34
|
+
"LICENSE"
|
|
35
|
+
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"ajv": "8.20.0",
|
|
38
|
+
"ajv-formats": "3.0.1",
|
|
39
|
+
"canonicalize": "4.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|