@opensoftware/contracts 1.6.0 → 1.8.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/README.md +5 -2
- package/dist/formats.js +2 -0
- package/dist/formats.js.map +1 -1
- package/dist/generated/types.d.ts +568 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js.map +1 -1
- package/events/asyncapi.yaml +42 -0
- package/events/issue-labeled/issue-labeled.schema.json +128 -0
- package/events/run-started/run-started.schema.json +139 -0
- package/factory-definition/factory-definition.schema.json +9 -0
- package/openapi/openapi.json +974 -132
- package/package.json +2 -2
- package/typespec/events.tsp +47 -0
- package/typespec/factory-definition.tsp +10 -0
- package/typespec/foreman-api.tsp +45 -0
- package/typespec/foreman.tsp +110 -0
- package/typespec/intake-api.tsp +40 -0
- package/typespec/intake.tsp +52 -0
- package/typespec/main.tsp +4 -0
package/openapi/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Open Software Factory contracts",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.8.0",
|
|
6
6
|
"description": "The shared formats as named models, and the HTTP APIs of the modules. Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "Apache-2.0",
|
|
@@ -116,6 +116,355 @@
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
+
},
|
|
120
|
+
"/v1/runs": {
|
|
121
|
+
"post": {
|
|
122
|
+
"operationId": "ForemanApi_startRun",
|
|
123
|
+
"description": "Start a run of the factory's workflow for a work item. The same work item again answers the run it started.",
|
|
124
|
+
"parameters": [],
|
|
125
|
+
"responses": {
|
|
126
|
+
"200": {
|
|
127
|
+
"description": "The request has succeeded.",
|
|
128
|
+
"content": {
|
|
129
|
+
"application/json": {
|
|
130
|
+
"schema": {
|
|
131
|
+
"$ref": "#/components/schemas/RunView"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"201": {
|
|
137
|
+
"description": "The request has succeeded and a new resource has been created as a result.",
|
|
138
|
+
"content": {
|
|
139
|
+
"application/json": {
|
|
140
|
+
"schema": {
|
|
141
|
+
"$ref": "#/components/schemas/RunView"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"400": {
|
|
147
|
+
"description": "The server could not understand the request due to invalid syntax.",
|
|
148
|
+
"content": {
|
|
149
|
+
"application/problem+json": {
|
|
150
|
+
"schema": {
|
|
151
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"401": {
|
|
157
|
+
"description": "Access is unauthorized.",
|
|
158
|
+
"content": {
|
|
159
|
+
"application/problem+json": {
|
|
160
|
+
"schema": {
|
|
161
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"requestBody": {
|
|
168
|
+
"required": true,
|
|
169
|
+
"content": {
|
|
170
|
+
"application/json": {
|
|
171
|
+
"schema": {
|
|
172
|
+
"$ref": "#/components/schemas/WorkItem"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"/v1/runs/{runId}": {
|
|
180
|
+
"get": {
|
|
181
|
+
"operationId": "ForemanApi_getRun",
|
|
182
|
+
"description": "A run: its state and the state of each stage.",
|
|
183
|
+
"parameters": [
|
|
184
|
+
{
|
|
185
|
+
"name": "runId",
|
|
186
|
+
"in": "path",
|
|
187
|
+
"required": true,
|
|
188
|
+
"schema": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"responses": {
|
|
194
|
+
"200": {
|
|
195
|
+
"description": "The request has succeeded.",
|
|
196
|
+
"content": {
|
|
197
|
+
"application/json": {
|
|
198
|
+
"schema": {
|
|
199
|
+
"$ref": "#/components/schemas/RunView"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"401": {
|
|
205
|
+
"description": "Access is unauthorized.",
|
|
206
|
+
"content": {
|
|
207
|
+
"application/problem+json": {
|
|
208
|
+
"schema": {
|
|
209
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"404": {
|
|
215
|
+
"description": "The server cannot find the requested resource.",
|
|
216
|
+
"content": {
|
|
217
|
+
"application/problem+json": {
|
|
218
|
+
"schema": {
|
|
219
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"/v1/runs/{runId}/signals": {
|
|
228
|
+
"post": {
|
|
229
|
+
"operationId": "ForemanApi_signalRun",
|
|
230
|
+
"description": "Steer the running stage's agent, or cancel the run.",
|
|
231
|
+
"parameters": [
|
|
232
|
+
{
|
|
233
|
+
"name": "runId",
|
|
234
|
+
"in": "path",
|
|
235
|
+
"required": true,
|
|
236
|
+
"schema": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"responses": {
|
|
242
|
+
"202": {
|
|
243
|
+
"description": "The request has been accepted for processing, but processing has not yet completed.",
|
|
244
|
+
"content": {
|
|
245
|
+
"application/json": {
|
|
246
|
+
"schema": {
|
|
247
|
+
"$ref": "#/components/schemas/RunView"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"400": {
|
|
253
|
+
"description": "The server could not understand the request due to invalid syntax.",
|
|
254
|
+
"content": {
|
|
255
|
+
"application/problem+json": {
|
|
256
|
+
"schema": {
|
|
257
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"401": {
|
|
263
|
+
"description": "Access is unauthorized.",
|
|
264
|
+
"content": {
|
|
265
|
+
"application/problem+json": {
|
|
266
|
+
"schema": {
|
|
267
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"404": {
|
|
273
|
+
"description": "The server cannot find the requested resource.",
|
|
274
|
+
"content": {
|
|
275
|
+
"application/problem+json": {
|
|
276
|
+
"schema": {
|
|
277
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"409": {
|
|
283
|
+
"description": "The request conflicts with the current state of the server.",
|
|
284
|
+
"content": {
|
|
285
|
+
"application/problem+json": {
|
|
286
|
+
"schema": {
|
|
287
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"requestBody": {
|
|
294
|
+
"required": true,
|
|
295
|
+
"content": {
|
|
296
|
+
"application/json": {
|
|
297
|
+
"schema": {
|
|
298
|
+
"$ref": "#/components/schemas/RunSignal"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"/v1/work-items": {
|
|
306
|
+
"post": {
|
|
307
|
+
"operationId": "IntakeApi_submitWork",
|
|
308
|
+
"description": "Put work into the inbox. A submission with the dedupe key of a work item answers that work item.",
|
|
309
|
+
"parameters": [],
|
|
310
|
+
"responses": {
|
|
311
|
+
"200": {
|
|
312
|
+
"description": "The request has succeeded.",
|
|
313
|
+
"content": {
|
|
314
|
+
"application/json": {
|
|
315
|
+
"schema": {
|
|
316
|
+
"$ref": "#/components/schemas/WorkItemView"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"201": {
|
|
322
|
+
"description": "The request has succeeded and a new resource has been created as a result.",
|
|
323
|
+
"content": {
|
|
324
|
+
"application/json": {
|
|
325
|
+
"schema": {
|
|
326
|
+
"$ref": "#/components/schemas/WorkItemView"
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"400": {
|
|
332
|
+
"description": "The server could not understand the request due to invalid syntax.",
|
|
333
|
+
"content": {
|
|
334
|
+
"application/problem+json": {
|
|
335
|
+
"schema": {
|
|
336
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"401": {
|
|
342
|
+
"description": "Access is unauthorized.",
|
|
343
|
+
"content": {
|
|
344
|
+
"application/problem+json": {
|
|
345
|
+
"schema": {
|
|
346
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"requestBody": {
|
|
353
|
+
"required": true,
|
|
354
|
+
"content": {
|
|
355
|
+
"application/json": {
|
|
356
|
+
"schema": {
|
|
357
|
+
"$ref": "#/components/schemas/WorkSubmission"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"get": {
|
|
364
|
+
"operationId": "IntakeApi_findWorkItem",
|
|
365
|
+
"description": "The work item with this dedupe key, such as an issue's link (ADR 0065).",
|
|
366
|
+
"parameters": [
|
|
367
|
+
{
|
|
368
|
+
"name": "dedupeKey",
|
|
369
|
+
"in": "query",
|
|
370
|
+
"required": true,
|
|
371
|
+
"schema": {
|
|
372
|
+
"type": "string"
|
|
373
|
+
},
|
|
374
|
+
"explode": false
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"responses": {
|
|
378
|
+
"200": {
|
|
379
|
+
"description": "The request has succeeded.",
|
|
380
|
+
"content": {
|
|
381
|
+
"application/json": {
|
|
382
|
+
"schema": {
|
|
383
|
+
"$ref": "#/components/schemas/WorkItemView"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"400": {
|
|
389
|
+
"description": "The server could not understand the request due to invalid syntax.",
|
|
390
|
+
"content": {
|
|
391
|
+
"application/problem+json": {
|
|
392
|
+
"schema": {
|
|
393
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"401": {
|
|
399
|
+
"description": "Access is unauthorized.",
|
|
400
|
+
"content": {
|
|
401
|
+
"application/problem+json": {
|
|
402
|
+
"schema": {
|
|
403
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"404": {
|
|
409
|
+
"description": "The server cannot find the requested resource.",
|
|
410
|
+
"content": {
|
|
411
|
+
"application/problem+json": {
|
|
412
|
+
"schema": {
|
|
413
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"/v1/work-items/{workItemId}": {
|
|
422
|
+
"get": {
|
|
423
|
+
"operationId": "IntakeApi_getWorkItem",
|
|
424
|
+
"description": "A work item, its status and every request that asked for it.",
|
|
425
|
+
"parameters": [
|
|
426
|
+
{
|
|
427
|
+
"name": "workItemId",
|
|
428
|
+
"in": "path",
|
|
429
|
+
"required": true,
|
|
430
|
+
"schema": {
|
|
431
|
+
"type": "string"
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
],
|
|
435
|
+
"responses": {
|
|
436
|
+
"200": {
|
|
437
|
+
"description": "The request has succeeded.",
|
|
438
|
+
"content": {
|
|
439
|
+
"application/json": {
|
|
440
|
+
"schema": {
|
|
441
|
+
"$ref": "#/components/schemas/WorkItemView"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"401": {
|
|
447
|
+
"description": "Access is unauthorized.",
|
|
448
|
+
"content": {
|
|
449
|
+
"application/problem+json": {
|
|
450
|
+
"schema": {
|
|
451
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"404": {
|
|
457
|
+
"description": "The server cannot find the requested resource.",
|
|
458
|
+
"content": {
|
|
459
|
+
"application/problem+json": {
|
|
460
|
+
"schema": {
|
|
461
|
+
"$ref": "#/components/schemas/ApiProblem"
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
119
468
|
}
|
|
120
469
|
},
|
|
121
470
|
"security": [
|
|
@@ -347,6 +696,37 @@
|
|
|
347
696
|
"pattern": "^(?!/)(?!.*(^|/)\\.\\.(/|$))[^\\\\]+$",
|
|
348
697
|
"description": "A path inside the bundle: relative, forward slashes, no \"..\"."
|
|
349
698
|
},
|
|
699
|
+
"CheckName": {
|
|
700
|
+
"type": "string",
|
|
701
|
+
"minLength": 1,
|
|
702
|
+
"description": "The name of a check on the forge: a commit status context."
|
|
703
|
+
},
|
|
704
|
+
"CheckState": {
|
|
705
|
+
"type": "string",
|
|
706
|
+
"enum": [
|
|
707
|
+
"pending",
|
|
708
|
+
"success",
|
|
709
|
+
"failure",
|
|
710
|
+
"error"
|
|
711
|
+
],
|
|
712
|
+
"description": "foreman: the state of a check on the forge (forge port)."
|
|
713
|
+
},
|
|
714
|
+
"CheckView": {
|
|
715
|
+
"type": "object",
|
|
716
|
+
"properties": {
|
|
717
|
+
"name": {
|
|
718
|
+
"$ref": "#/components/schemas/CheckName"
|
|
719
|
+
},
|
|
720
|
+
"state": {
|
|
721
|
+
"$ref": "#/components/schemas/CheckState"
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
"required": [
|
|
725
|
+
"name",
|
|
726
|
+
"state"
|
|
727
|
+
],
|
|
728
|
+
"description": "foreman: a check that a stage waits for, as the foreman last read it on the run's pull request (ADR 0069)."
|
|
729
|
+
},
|
|
350
730
|
"CommitHash": {
|
|
351
731
|
"type": "string",
|
|
352
732
|
"pattern": "^[0-9a-f]{7,40}$",
|
|
@@ -894,63 +1274,165 @@
|
|
|
894
1274
|
},
|
|
895
1275
|
"description": "The groups whose members may decide. Empty when the policy approved without a person."
|
|
896
1276
|
},
|
|
897
|
-
"escalateTo": {
|
|
898
|
-
"type": "array",
|
|
899
|
-
"items": {
|
|
900
|
-
"$ref": "#/components/schemas/Name"
|
|
901
|
-
},
|
|
902
|
-
"description": "The groups asked after the escalation time."
|
|
1277
|
+
"escalateTo": {
|
|
1278
|
+
"type": "array",
|
|
1279
|
+
"items": {
|
|
1280
|
+
"$ref": "#/components/schemas/Name"
|
|
1281
|
+
},
|
|
1282
|
+
"description": "The groups asked after the escalation time."
|
|
1283
|
+
},
|
|
1284
|
+
"channel": {
|
|
1285
|
+
"type": "string",
|
|
1286
|
+
"description": "Where people decide, for example \"slack:C0GATES\"."
|
|
1287
|
+
},
|
|
1288
|
+
"state": {
|
|
1289
|
+
"$ref": "#/components/schemas/GateState"
|
|
1290
|
+
},
|
|
1291
|
+
"waitingFor": {
|
|
1292
|
+
"type": "array",
|
|
1293
|
+
"items": {
|
|
1294
|
+
"$ref": "#/components/schemas/Name"
|
|
1295
|
+
},
|
|
1296
|
+
"description": "The groups that may decide now. Only while the gate is pending."
|
|
1297
|
+
},
|
|
1298
|
+
"requestedAt": {
|
|
1299
|
+
"type": "string",
|
|
1300
|
+
"format": "date-time"
|
|
1301
|
+
},
|
|
1302
|
+
"expiresAt": {
|
|
1303
|
+
"type": "string",
|
|
1304
|
+
"format": "date-time",
|
|
1305
|
+
"description": "When the gate expires without a decision."
|
|
1306
|
+
},
|
|
1307
|
+
"record": {
|
|
1308
|
+
"$ref": "#/components/schemas/GateRecord",
|
|
1309
|
+
"description": "The record, once the gate is decided."
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
"required": [
|
|
1313
|
+
"id",
|
|
1314
|
+
"workItem",
|
|
1315
|
+
"stage",
|
|
1316
|
+
"summary",
|
|
1317
|
+
"approvers",
|
|
1318
|
+
"channel",
|
|
1319
|
+
"state",
|
|
1320
|
+
"requestedAt"
|
|
1321
|
+
],
|
|
1322
|
+
"description": "gatekeeper: a gate as the HTTP API shows it (ADR 0048)."
|
|
1323
|
+
},
|
|
1324
|
+
"Hostname": {
|
|
1325
|
+
"type": "string",
|
|
1326
|
+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)*$",
|
|
1327
|
+
"description": "A hostname without scheme or port, for example \"api.linear.app\"."
|
|
1328
|
+
},
|
|
1329
|
+
"Identifier": {
|
|
1330
|
+
"type": "string",
|
|
1331
|
+
"minLength": 1,
|
|
1332
|
+
"maxLength": 128,
|
|
1333
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
1334
|
+
},
|
|
1335
|
+
"IssueLabeled": {
|
|
1336
|
+
"type": "object",
|
|
1337
|
+
"properties": {
|
|
1338
|
+
"specversion": {
|
|
1339
|
+
"type": "string",
|
|
1340
|
+
"const": "1.0"
|
|
1341
|
+
},
|
|
1342
|
+
"id": {
|
|
1343
|
+
"$ref": "#/components/schemas/Identifier",
|
|
1344
|
+
"description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
|
|
1345
|
+
},
|
|
1346
|
+
"source": {
|
|
1347
|
+
"type": "string",
|
|
1348
|
+
"minLength": 1,
|
|
1349
|
+
"description": "The producing module, for example \"/osf/intake\"."
|
|
1350
|
+
},
|
|
1351
|
+
"type": {
|
|
1352
|
+
"type": "string",
|
|
1353
|
+
"const": "issue.labeled@v1"
|
|
1354
|
+
},
|
|
1355
|
+
"time": {
|
|
1356
|
+
"type": "string",
|
|
1357
|
+
"format": "date-time"
|
|
1358
|
+
},
|
|
1359
|
+
"subject": {
|
|
1360
|
+
"type": "string",
|
|
1361
|
+
"description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
|
|
1362
|
+
},
|
|
1363
|
+
"datacontenttype": {
|
|
1364
|
+
"type": "string",
|
|
1365
|
+
"const": "application/json"
|
|
1366
|
+
},
|
|
1367
|
+
"dataschema": {
|
|
1368
|
+
"type": "string",
|
|
1369
|
+
"format": "uri"
|
|
1370
|
+
},
|
|
1371
|
+
"traceparent": {
|
|
1372
|
+
"type": "string",
|
|
1373
|
+
"description": "W3C trace context (CloudEvents distributed tracing extension)."
|
|
1374
|
+
},
|
|
1375
|
+
"data": {
|
|
1376
|
+
"$ref": "#/components/schemas/IssueLabeledData"
|
|
1377
|
+
}
|
|
1378
|
+
},
|
|
1379
|
+
"required": [
|
|
1380
|
+
"specversion",
|
|
1381
|
+
"id",
|
|
1382
|
+
"source",
|
|
1383
|
+
"type",
|
|
1384
|
+
"time",
|
|
1385
|
+
"data"
|
|
1386
|
+
],
|
|
1387
|
+
"description": "forge adapters: a label was added to an issue."
|
|
1388
|
+
},
|
|
1389
|
+
"IssueLabeledData": {
|
|
1390
|
+
"type": "object",
|
|
1391
|
+
"properties": {
|
|
1392
|
+
"url": {
|
|
1393
|
+
"type": "string",
|
|
1394
|
+
"format": "uri",
|
|
1395
|
+
"description": "The issue."
|
|
1396
|
+
},
|
|
1397
|
+
"repository": {
|
|
1398
|
+
"type": "string",
|
|
1399
|
+
"format": "uri"
|
|
1400
|
+
},
|
|
1401
|
+
"number": {
|
|
1402
|
+
"type": "integer",
|
|
1403
|
+
"minimum": 1
|
|
903
1404
|
},
|
|
904
|
-
"
|
|
1405
|
+
"title": {
|
|
905
1406
|
"type": "string",
|
|
906
|
-
"
|
|
1407
|
+
"minLength": 1
|
|
907
1408
|
},
|
|
908
|
-
"
|
|
909
|
-
"
|
|
1409
|
+
"body": {
|
|
1410
|
+
"type": "string"
|
|
910
1411
|
},
|
|
911
|
-
"
|
|
1412
|
+
"author": {
|
|
1413
|
+
"$ref": "#/components/schemas/Actor",
|
|
1414
|
+
"description": "The person who opened the issue."
|
|
1415
|
+
},
|
|
1416
|
+
"labels": {
|
|
912
1417
|
"type": "array",
|
|
913
1418
|
"items": {
|
|
914
|
-
"
|
|
1419
|
+
"type": "string"
|
|
915
1420
|
},
|
|
916
|
-
"description": "
|
|
1421
|
+
"description": "Every label of the issue after the change."
|
|
917
1422
|
},
|
|
918
|
-
"
|
|
919
|
-
"type": "string",
|
|
920
|
-
"format": "date-time"
|
|
921
|
-
},
|
|
922
|
-
"expiresAt": {
|
|
1423
|
+
"label": {
|
|
923
1424
|
"type": "string",
|
|
924
|
-
"
|
|
925
|
-
"description": "When the gate expires without a decision."
|
|
926
|
-
},
|
|
927
|
-
"record": {
|
|
928
|
-
"$ref": "#/components/schemas/GateRecord",
|
|
929
|
-
"description": "The record, once the gate is decided."
|
|
1425
|
+
"description": "The label that was added, when the forge names it."
|
|
930
1426
|
}
|
|
931
1427
|
},
|
|
932
1428
|
"required": [
|
|
933
|
-
"
|
|
934
|
-
"
|
|
935
|
-
"
|
|
936
|
-
"
|
|
937
|
-
"
|
|
938
|
-
"
|
|
939
|
-
|
|
940
|
-
"requestedAt"
|
|
941
|
-
],
|
|
942
|
-
"description": "gatekeeper: a gate as the HTTP API shows it (ADR 0048)."
|
|
943
|
-
},
|
|
944
|
-
"Hostname": {
|
|
945
|
-
"type": "string",
|
|
946
|
-
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)*$",
|
|
947
|
-
"description": "A hostname without scheme or port, for example \"api.linear.app\"."
|
|
948
|
-
},
|
|
949
|
-
"Identifier": {
|
|
950
|
-
"type": "string",
|
|
951
|
-
"minLength": 1,
|
|
952
|
-
"maxLength": 128,
|
|
953
|
-
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
1429
|
+
"url",
|
|
1430
|
+
"repository",
|
|
1431
|
+
"number",
|
|
1432
|
+
"title",
|
|
1433
|
+
"author",
|
|
1434
|
+
"labels"
|
|
1435
|
+
]
|
|
954
1436
|
},
|
|
955
1437
|
"Link": {
|
|
956
1438
|
"type": "object",
|
|
@@ -1548,119 +2030,308 @@
|
|
|
1548
2030
|
"$ref": "#/components/schemas/Name",
|
|
1549
2031
|
"description": "Where the run was started from, for example \"slack\", \"github\", \"cli\"."
|
|
1550
2032
|
},
|
|
1551
|
-
"osf.origin.url": {
|
|
2033
|
+
"osf.origin.url": {
|
|
2034
|
+
"type": "string",
|
|
2035
|
+
"format": "uri"
|
|
2036
|
+
},
|
|
2037
|
+
"osf.harness.name": {
|
|
2038
|
+
"$ref": "#/components/schemas/Name",
|
|
2039
|
+
"description": "Harness adapter, for example \"claude-code\"."
|
|
2040
|
+
},
|
|
2041
|
+
"osf.harness.version": {
|
|
2042
|
+
"type": "string"
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
"required": [
|
|
2046
|
+
"service.name",
|
|
2047
|
+
"osf.run.id",
|
|
2048
|
+
"osf.work_item.id",
|
|
2049
|
+
"osf.factory.version",
|
|
2050
|
+
"osf.requester.kind",
|
|
2051
|
+
"osf.requester.id",
|
|
2052
|
+
"osf.source",
|
|
2053
|
+
"osf.harness.name"
|
|
2054
|
+
],
|
|
2055
|
+
"description": "Set at launch through OTEL_RESOURCE_ATTRIBUTES, so it is on every span of the run."
|
|
2056
|
+
},
|
|
2057
|
+
"RunSignal": {
|
|
2058
|
+
"type": "object",
|
|
2059
|
+
"properties": {
|
|
2060
|
+
"type": {
|
|
2061
|
+
"$ref": "#/components/schemas/RunSignalType"
|
|
2062
|
+
},
|
|
2063
|
+
"message": {
|
|
2064
|
+
"type": "string",
|
|
2065
|
+
"minLength": 1,
|
|
2066
|
+
"description": "The steering message. Required with \"steer\"."
|
|
2067
|
+
}
|
|
2068
|
+
},
|
|
2069
|
+
"required": [
|
|
2070
|
+
"type"
|
|
2071
|
+
],
|
|
2072
|
+
"description": "foreman: a signal to a run: \"steer\" with a message for the running stage's agent, or \"cancel\"."
|
|
2073
|
+
},
|
|
2074
|
+
"RunSignalType": {
|
|
2075
|
+
"type": "string",
|
|
2076
|
+
"enum": [
|
|
2077
|
+
"steer",
|
|
2078
|
+
"cancel"
|
|
2079
|
+
],
|
|
2080
|
+
"description": "foreman: what a person tells a run."
|
|
2081
|
+
},
|
|
2082
|
+
"RunSpan": {
|
|
2083
|
+
"type": "object",
|
|
2084
|
+
"properties": {
|
|
2085
|
+
"gen_ai.operation.name": {
|
|
2086
|
+
"type": "string",
|
|
2087
|
+
"const": "invoke_agent"
|
|
2088
|
+
},
|
|
2089
|
+
"gen_ai.provider.name": {
|
|
2090
|
+
"type": "string"
|
|
2091
|
+
},
|
|
2092
|
+
"gen_ai.agent.name": {
|
|
2093
|
+
"type": "string"
|
|
2094
|
+
},
|
|
2095
|
+
"gen_ai.conversation.id": {
|
|
2096
|
+
"type": "string",
|
|
2097
|
+
"description": "The harness session ID."
|
|
2098
|
+
},
|
|
2099
|
+
"gen_ai.request.model": {
|
|
2100
|
+
"type": "string"
|
|
2101
|
+
},
|
|
2102
|
+
"gen_ai.response.model": {
|
|
2103
|
+
"type": "string"
|
|
2104
|
+
},
|
|
2105
|
+
"gen_ai.usage.input_tokens": {
|
|
2106
|
+
"type": "integer",
|
|
2107
|
+
"minimum": 0
|
|
2108
|
+
},
|
|
2109
|
+
"gen_ai.usage.output_tokens": {
|
|
2110
|
+
"type": "integer",
|
|
2111
|
+
"minimum": 0
|
|
2112
|
+
},
|
|
2113
|
+
"gen_ai.usage.cache_read.input_tokens": {
|
|
2114
|
+
"type": "integer",
|
|
2115
|
+
"minimum": 0
|
|
2116
|
+
},
|
|
2117
|
+
"gen_ai.usage.cache_write.input_tokens": {
|
|
2118
|
+
"type": "integer",
|
|
2119
|
+
"minimum": 0
|
|
2120
|
+
},
|
|
2121
|
+
"osf.outcome": {
|
|
2122
|
+
"$ref": "#/components/schemas/RunOutcome"
|
|
2123
|
+
},
|
|
2124
|
+
"osf.cost.usd": {
|
|
2125
|
+
"type": "number",
|
|
2126
|
+
"minimum": 0,
|
|
2127
|
+
"description": "Cost of all model calls of the run, from the inference gateway."
|
|
2128
|
+
},
|
|
2129
|
+
"osf.transcript.uri": {
|
|
2130
|
+
"type": "string",
|
|
2131
|
+
"format": "uri",
|
|
2132
|
+
"description": "Full transcript, stored when the run ends."
|
|
2133
|
+
},
|
|
2134
|
+
"osf.artifact.uris": {
|
|
2135
|
+
"type": "array",
|
|
2136
|
+
"items": {
|
|
2137
|
+
"type": "string",
|
|
2138
|
+
"format": "uri"
|
|
2139
|
+
},
|
|
2140
|
+
"description": "Artifacts of the run: reports, screenshots, videos."
|
|
2141
|
+
},
|
|
2142
|
+
"osf.pull_request.urls": {
|
|
2143
|
+
"type": "array",
|
|
2144
|
+
"items": {
|
|
2145
|
+
"type": "string",
|
|
2146
|
+
"format": "uri"
|
|
2147
|
+
}
|
|
2148
|
+
},
|
|
2149
|
+
"osf.issue.urls": {
|
|
2150
|
+
"type": "array",
|
|
2151
|
+
"items": {
|
|
2152
|
+
"type": "string",
|
|
2153
|
+
"format": "uri"
|
|
2154
|
+
}
|
|
2155
|
+
},
|
|
2156
|
+
"osf.evidence_bundle.uri": {
|
|
2157
|
+
"type": "string",
|
|
2158
|
+
"format": "uri"
|
|
2159
|
+
},
|
|
2160
|
+
"osf.agent_trace.uri": {
|
|
2161
|
+
"type": "string",
|
|
2162
|
+
"format": "uri",
|
|
2163
|
+
"description": "Agent Trace record with line attribution of the run's changes."
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
"required": [
|
|
2167
|
+
"gen_ai.operation.name",
|
|
2168
|
+
"osf.outcome"
|
|
2169
|
+
],
|
|
2170
|
+
"description": "Attributes of the root span of the run. GenAI names where a convention exists."
|
|
2171
|
+
},
|
|
2172
|
+
"RunStarted": {
|
|
2173
|
+
"type": "object",
|
|
2174
|
+
"properties": {
|
|
2175
|
+
"specversion": {
|
|
2176
|
+
"type": "string",
|
|
2177
|
+
"const": "1.0"
|
|
2178
|
+
},
|
|
2179
|
+
"id": {
|
|
2180
|
+
"$ref": "#/components/schemas/Identifier",
|
|
2181
|
+
"description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
|
|
2182
|
+
},
|
|
2183
|
+
"source": {
|
|
2184
|
+
"type": "string",
|
|
2185
|
+
"minLength": 1,
|
|
2186
|
+
"description": "The producing module, for example \"/osf/intake\"."
|
|
2187
|
+
},
|
|
2188
|
+
"type": {
|
|
2189
|
+
"type": "string",
|
|
2190
|
+
"const": "run.started@v1"
|
|
2191
|
+
},
|
|
2192
|
+
"time": {
|
|
2193
|
+
"type": "string",
|
|
2194
|
+
"format": "date-time"
|
|
2195
|
+
},
|
|
2196
|
+
"subject": {
|
|
2197
|
+
"type": "string",
|
|
2198
|
+
"description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
|
|
2199
|
+
},
|
|
2200
|
+
"datacontenttype": {
|
|
2201
|
+
"type": "string",
|
|
2202
|
+
"const": "application/json"
|
|
2203
|
+
},
|
|
2204
|
+
"dataschema": {
|
|
2205
|
+
"type": "string",
|
|
2206
|
+
"format": "uri"
|
|
2207
|
+
},
|
|
2208
|
+
"traceparent": {
|
|
2209
|
+
"type": "string",
|
|
2210
|
+
"description": "W3C trace context (CloudEvents distributed tracing extension)."
|
|
2211
|
+
},
|
|
2212
|
+
"data": {
|
|
2213
|
+
"$ref": "#/components/schemas/RunStartedData"
|
|
2214
|
+
}
|
|
2215
|
+
},
|
|
2216
|
+
"required": [
|
|
2217
|
+
"specversion",
|
|
2218
|
+
"id",
|
|
2219
|
+
"source",
|
|
2220
|
+
"type",
|
|
2221
|
+
"time",
|
|
2222
|
+
"data"
|
|
2223
|
+
],
|
|
2224
|
+
"description": "foreman: a run started (ADR 0067)."
|
|
2225
|
+
},
|
|
2226
|
+
"RunStartedData": {
|
|
2227
|
+
"type": "object",
|
|
2228
|
+
"properties": {
|
|
2229
|
+
"runId": {
|
|
2230
|
+
"$ref": "#/components/schemas/Identifier"
|
|
2231
|
+
},
|
|
2232
|
+
"workItemId": {
|
|
2233
|
+
"$ref": "#/components/schemas/Identifier"
|
|
2234
|
+
},
|
|
2235
|
+
"factory": {
|
|
2236
|
+
"$ref": "#/components/schemas/Name",
|
|
2237
|
+
"description": "The name of the factory."
|
|
2238
|
+
},
|
|
2239
|
+
"factoryVersion": {
|
|
2240
|
+
"$ref": "#/components/schemas/CommitHash"
|
|
2241
|
+
},
|
|
2242
|
+
"stages": {
|
|
2243
|
+
"type": "array",
|
|
2244
|
+
"items": {
|
|
2245
|
+
"$ref": "#/components/schemas/Name"
|
|
2246
|
+
},
|
|
2247
|
+
"description": "The stages of the run's workflow, in order."
|
|
2248
|
+
},
|
|
2249
|
+
"startedAt": {
|
|
1552
2250
|
"type": "string",
|
|
1553
|
-
"format": "
|
|
2251
|
+
"format": "date-time"
|
|
1554
2252
|
},
|
|
1555
|
-
"
|
|
1556
|
-
"$ref": "#/components/schemas/
|
|
1557
|
-
"description": "Harness adapter, for example \"claude-code\"."
|
|
2253
|
+
"requester": {
|
|
2254
|
+
"$ref": "#/components/schemas/Actor"
|
|
1558
2255
|
},
|
|
1559
|
-
"
|
|
1560
|
-
"
|
|
2256
|
+
"source": {
|
|
2257
|
+
"$ref": "#/components/schemas/Name"
|
|
1561
2258
|
}
|
|
1562
2259
|
},
|
|
1563
2260
|
"required": [
|
|
1564
|
-
"
|
|
1565
|
-
"
|
|
1566
|
-
"
|
|
1567
|
-
"
|
|
1568
|
-
"
|
|
1569
|
-
"
|
|
1570
|
-
"
|
|
1571
|
-
"
|
|
2261
|
+
"runId",
|
|
2262
|
+
"workItemId",
|
|
2263
|
+
"factory",
|
|
2264
|
+
"factoryVersion",
|
|
2265
|
+
"stages",
|
|
2266
|
+
"startedAt",
|
|
2267
|
+
"requester",
|
|
2268
|
+
"source"
|
|
2269
|
+
]
|
|
2270
|
+
},
|
|
2271
|
+
"RunState": {
|
|
2272
|
+
"type": "string",
|
|
2273
|
+
"enum": [
|
|
2274
|
+
"running",
|
|
2275
|
+
"blocked",
|
|
2276
|
+
"complete",
|
|
2277
|
+
"failed",
|
|
2278
|
+
"cancelled"
|
|
1572
2279
|
],
|
|
1573
|
-
"description": "
|
|
2280
|
+
"description": "foreman: where a run stands (vision scenario ORCH-008)."
|
|
1574
2281
|
},
|
|
1575
|
-
"
|
|
2282
|
+
"RunView": {
|
|
1576
2283
|
"type": "object",
|
|
1577
2284
|
"properties": {
|
|
1578
|
-
"
|
|
1579
|
-
"type": "string",
|
|
1580
|
-
"const": "invoke_agent"
|
|
1581
|
-
},
|
|
1582
|
-
"gen_ai.provider.name": {
|
|
1583
|
-
"type": "string"
|
|
1584
|
-
},
|
|
1585
|
-
"gen_ai.agent.name": {
|
|
1586
|
-
"type": "string"
|
|
1587
|
-
},
|
|
1588
|
-
"gen_ai.conversation.id": {
|
|
2285
|
+
"runId": {
|
|
1589
2286
|
"type": "string",
|
|
1590
|
-
"
|
|
1591
|
-
|
|
1592
|
-
"gen_ai.request.model": {
|
|
1593
|
-
"type": "string"
|
|
1594
|
-
},
|
|
1595
|
-
"gen_ai.response.model": {
|
|
1596
|
-
"type": "string"
|
|
1597
|
-
},
|
|
1598
|
-
"gen_ai.usage.input_tokens": {
|
|
1599
|
-
"type": "integer",
|
|
1600
|
-
"minimum": 0
|
|
1601
|
-
},
|
|
1602
|
-
"gen_ai.usage.output_tokens": {
|
|
1603
|
-
"type": "integer",
|
|
1604
|
-
"minimum": 0
|
|
2287
|
+
"pattern": "^run_[0-9a-f]{20}$",
|
|
2288
|
+
"description": "\"run_\" and 20 hex digits of the SHA-256 of the work item's ID."
|
|
1605
2289
|
},
|
|
1606
|
-
"
|
|
1607
|
-
"
|
|
1608
|
-
"minimum": 0
|
|
2290
|
+
"workItem": {
|
|
2291
|
+
"$ref": "#/components/schemas/WorkItem"
|
|
1609
2292
|
},
|
|
1610
|
-
"
|
|
1611
|
-
"
|
|
1612
|
-
"
|
|
2293
|
+
"factory": {
|
|
2294
|
+
"$ref": "#/components/schemas/Name",
|
|
2295
|
+
"description": "The name of the factory."
|
|
1613
2296
|
},
|
|
1614
|
-
"
|
|
1615
|
-
"$ref": "#/components/schemas/
|
|
2297
|
+
"factoryVersion": {
|
|
2298
|
+
"$ref": "#/components/schemas/CommitHash",
|
|
2299
|
+
"description": "The commit of the factory definition the run started with."
|
|
1616
2300
|
},
|
|
1617
|
-
"
|
|
1618
|
-
"
|
|
1619
|
-
"minimum": 0,
|
|
1620
|
-
"description": "Cost of all model calls of the run, from the inference gateway."
|
|
2301
|
+
"state": {
|
|
2302
|
+
"$ref": "#/components/schemas/RunState"
|
|
1621
2303
|
},
|
|
1622
|
-
"
|
|
2304
|
+
"pullRequest": {
|
|
1623
2305
|
"type": "string",
|
|
1624
2306
|
"format": "uri",
|
|
1625
|
-
"description": "
|
|
2307
|
+
"description": "The last pull request link that an agent of the run wrote (ADR 0069)."
|
|
1626
2308
|
},
|
|
1627
|
-
"
|
|
1628
|
-
"type": "
|
|
1629
|
-
"
|
|
1630
|
-
"type": "string",
|
|
1631
|
-
"format": "uri"
|
|
1632
|
-
},
|
|
1633
|
-
"description": "Artifacts of the run: reports, screenshots, videos."
|
|
2309
|
+
"startedAt": {
|
|
2310
|
+
"type": "string",
|
|
2311
|
+
"format": "date-time"
|
|
1634
2312
|
},
|
|
1635
|
-
"
|
|
1636
|
-
"type": "
|
|
1637
|
-
"
|
|
1638
|
-
"type": "string",
|
|
1639
|
-
"format": "uri"
|
|
1640
|
-
}
|
|
2313
|
+
"endedAt": {
|
|
2314
|
+
"type": "string",
|
|
2315
|
+
"format": "date-time"
|
|
1641
2316
|
},
|
|
1642
|
-
"
|
|
2317
|
+
"stages": {
|
|
1643
2318
|
"type": "array",
|
|
1644
2319
|
"items": {
|
|
1645
|
-
"
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
},
|
|
1649
|
-
"osf.evidence_bundle.uri": {
|
|
1650
|
-
"type": "string",
|
|
1651
|
-
"format": "uri"
|
|
1652
|
-
},
|
|
1653
|
-
"osf.agent_trace.uri": {
|
|
1654
|
-
"type": "string",
|
|
1655
|
-
"format": "uri",
|
|
1656
|
-
"description": "Agent Trace record with line attribution of the run's changes."
|
|
2320
|
+
"$ref": "#/components/schemas/StageView"
|
|
2321
|
+
},
|
|
2322
|
+
"description": "The stages of the workflow, in order."
|
|
1657
2323
|
}
|
|
1658
2324
|
},
|
|
1659
2325
|
"required": [
|
|
1660
|
-
"
|
|
1661
|
-
"
|
|
2326
|
+
"runId",
|
|
2327
|
+
"workItem",
|
|
2328
|
+
"factory",
|
|
2329
|
+
"factoryVersion",
|
|
2330
|
+
"state",
|
|
2331
|
+
"startedAt",
|
|
2332
|
+
"stages"
|
|
1662
2333
|
],
|
|
1663
|
-
"description": "
|
|
2334
|
+
"description": "foreman: a run of the factory's workflow for one work item, as the HTTP API shows it (ADR 0067)."
|
|
1664
2335
|
},
|
|
1665
2336
|
"Sandbox": {
|
|
1666
2337
|
"type": "object",
|
|
@@ -2021,6 +2692,13 @@
|
|
|
2021
2692
|
"$ref": "#/components/schemas/Gate",
|
|
2022
2693
|
"description": "The stage waits for a decision before it starts."
|
|
2023
2694
|
},
|
|
2695
|
+
"checks": {
|
|
2696
|
+
"type": "array",
|
|
2697
|
+
"items": {
|
|
2698
|
+
"$ref": "#/components/schemas/CheckName"
|
|
2699
|
+
},
|
|
2700
|
+
"description": "Checks that must succeed on the run's pull request before the stage starts, by their names on the forge, for\nexample \"verify\" (ADR 0069)."
|
|
2701
|
+
},
|
|
2024
2702
|
"evidence": {
|
|
2025
2703
|
"$ref": "#/components/schemas/EvidenceRequirement",
|
|
2026
2704
|
"description": "Whether the stage must produce an evidence bundle."
|
|
@@ -2031,6 +2709,69 @@
|
|
|
2031
2709
|
],
|
|
2032
2710
|
"additionalProperties": false
|
|
2033
2711
|
},
|
|
2712
|
+
"StageState": {
|
|
2713
|
+
"type": "string",
|
|
2714
|
+
"enum": [
|
|
2715
|
+
"pending",
|
|
2716
|
+
"blocked",
|
|
2717
|
+
"running",
|
|
2718
|
+
"succeeded",
|
|
2719
|
+
"failed",
|
|
2720
|
+
"rejected",
|
|
2721
|
+
"cancelled"
|
|
2722
|
+
],
|
|
2723
|
+
"description": "foreman: where a stage of a run stands."
|
|
2724
|
+
},
|
|
2725
|
+
"StageView": {
|
|
2726
|
+
"type": "object",
|
|
2727
|
+
"properties": {
|
|
2728
|
+
"stage": {
|
|
2729
|
+
"$ref": "#/components/schemas/Name"
|
|
2730
|
+
},
|
|
2731
|
+
"agent": {
|
|
2732
|
+
"$ref": "#/components/schemas/Name",
|
|
2733
|
+
"description": "The agent that runs the stage."
|
|
2734
|
+
},
|
|
2735
|
+
"state": {
|
|
2736
|
+
"$ref": "#/components/schemas/StageState"
|
|
2737
|
+
},
|
|
2738
|
+
"sessionId": {
|
|
2739
|
+
"type": "string",
|
|
2740
|
+
"description": "The harness session of the stage's agent, once it started."
|
|
2741
|
+
},
|
|
2742
|
+
"gateId": {
|
|
2743
|
+
"type": "string",
|
|
2744
|
+
"pattern": "^g[0-9a-f]{16}$",
|
|
2745
|
+
"description": "The gate that decides whether the stage starts, once it was requested."
|
|
2746
|
+
},
|
|
2747
|
+
"checks": {
|
|
2748
|
+
"type": "array",
|
|
2749
|
+
"items": {
|
|
2750
|
+
"$ref": "#/components/schemas/CheckView"
|
|
2751
|
+
},
|
|
2752
|
+
"description": "The checks the stage waits for, once the foreman read them (ADR 0069)."
|
|
2753
|
+
},
|
|
2754
|
+
"reason": {
|
|
2755
|
+
"type": "string",
|
|
2756
|
+
"minLength": 1,
|
|
2757
|
+
"description": "Why the stage ended without success, when the foreman knows."
|
|
2758
|
+
},
|
|
2759
|
+
"startedAt": {
|
|
2760
|
+
"type": "string",
|
|
2761
|
+
"format": "date-time"
|
|
2762
|
+
},
|
|
2763
|
+
"endedAt": {
|
|
2764
|
+
"type": "string",
|
|
2765
|
+
"format": "date-time"
|
|
2766
|
+
}
|
|
2767
|
+
},
|
|
2768
|
+
"required": [
|
|
2769
|
+
"stage",
|
|
2770
|
+
"agent",
|
|
2771
|
+
"state"
|
|
2772
|
+
],
|
|
2773
|
+
"description": "foreman: one stage of a run (ADR 0067)."
|
|
2774
|
+
},
|
|
2034
2775
|
"TraceId": {
|
|
2035
2776
|
"type": "string",
|
|
2036
2777
|
"pattern": "^[0-9a-f]{32}$",
|
|
@@ -2104,6 +2845,13 @@
|
|
|
2104
2845
|
],
|
|
2105
2846
|
"description": "One unit of requested work: the `data` of a `work.received@v1` CloudEvent."
|
|
2106
2847
|
},
|
|
2848
|
+
"WorkItemStatus": {
|
|
2849
|
+
"type": "string",
|
|
2850
|
+
"enum": [
|
|
2851
|
+
"received"
|
|
2852
|
+
],
|
|
2853
|
+
"description": "Where a work item stands."
|
|
2854
|
+
},
|
|
2107
2855
|
"WorkItemType": {
|
|
2108
2856
|
"type": "string",
|
|
2109
2857
|
"enum": [
|
|
@@ -2113,6 +2861,36 @@
|
|
|
2113
2861
|
"automation"
|
|
2114
2862
|
]
|
|
2115
2863
|
},
|
|
2864
|
+
"WorkItemView": {
|
|
2865
|
+
"type": "object",
|
|
2866
|
+
"properties": {
|
|
2867
|
+
"workItem": {
|
|
2868
|
+
"$ref": "#/components/schemas/WorkItem",
|
|
2869
|
+
"description": "Its ID is \"wi_\" and 20 hex digits of the SHA-256 of its dedupe key."
|
|
2870
|
+
},
|
|
2871
|
+
"status": {
|
|
2872
|
+
"$ref": "#/components/schemas/WorkItemStatus"
|
|
2873
|
+
},
|
|
2874
|
+
"receivedAt": {
|
|
2875
|
+
"type": "string",
|
|
2876
|
+
"format": "date-time"
|
|
2877
|
+
},
|
|
2878
|
+
"requests": {
|
|
2879
|
+
"type": "array",
|
|
2880
|
+
"items": {
|
|
2881
|
+
"$ref": "#/components/schemas/WorkRequest"
|
|
2882
|
+
},
|
|
2883
|
+
"description": "Every submission that asked for the work item, oldest first; one per origin."
|
|
2884
|
+
}
|
|
2885
|
+
},
|
|
2886
|
+
"required": [
|
|
2887
|
+
"workItem",
|
|
2888
|
+
"status",
|
|
2889
|
+
"receivedAt",
|
|
2890
|
+
"requests"
|
|
2891
|
+
],
|
|
2892
|
+
"description": "intake: a work item as the HTTP API shows it (ADR 0063)."
|
|
2893
|
+
},
|
|
2116
2894
|
"WorkReceived": {
|
|
2117
2895
|
"type": "object",
|
|
2118
2896
|
"properties": {
|
|
@@ -2166,6 +2944,70 @@
|
|
|
2166
2944
|
"data"
|
|
2167
2945
|
],
|
|
2168
2946
|
"description": "intake: a work item was accepted."
|
|
2947
|
+
},
|
|
2948
|
+
"WorkRequest": {
|
|
2949
|
+
"type": "object",
|
|
2950
|
+
"properties": {
|
|
2951
|
+
"requester": {
|
|
2952
|
+
"$ref": "#/components/schemas/Actor"
|
|
2953
|
+
},
|
|
2954
|
+
"origin": {
|
|
2955
|
+
"$ref": "#/components/schemas/Origin"
|
|
2956
|
+
},
|
|
2957
|
+
"receivedAt": {
|
|
2958
|
+
"type": "string",
|
|
2959
|
+
"format": "date-time"
|
|
2960
|
+
}
|
|
2961
|
+
},
|
|
2962
|
+
"required": [
|
|
2963
|
+
"requester",
|
|
2964
|
+
"origin",
|
|
2965
|
+
"receivedAt"
|
|
2966
|
+
],
|
|
2967
|
+
"description": "intake: one submission that asked for a work item."
|
|
2968
|
+
},
|
|
2969
|
+
"WorkSubmission": {
|
|
2970
|
+
"type": "object",
|
|
2971
|
+
"properties": {
|
|
2972
|
+
"type": {
|
|
2973
|
+
"$ref": "#/components/schemas/WorkItemType",
|
|
2974
|
+
"description": "Default: task."
|
|
2975
|
+
},
|
|
2976
|
+
"title": {
|
|
2977
|
+
"type": "string",
|
|
2978
|
+
"minLength": 1,
|
|
2979
|
+
"maxLength": 300
|
|
2980
|
+
},
|
|
2981
|
+
"description": {
|
|
2982
|
+
"type": "string"
|
|
2983
|
+
},
|
|
2984
|
+
"requester": {
|
|
2985
|
+
"$ref": "#/components/schemas/Actor"
|
|
2986
|
+
},
|
|
2987
|
+
"origin": {
|
|
2988
|
+
"$ref": "#/components/schemas/Origin"
|
|
2989
|
+
},
|
|
2990
|
+
"dedupeKey": {
|
|
2991
|
+
"type": "string",
|
|
2992
|
+
"minLength": 1,
|
|
2993
|
+
"description": "Requests with the same key become one work item. Default: the origin's url, else \"<source>:<externalId>\"."
|
|
2994
|
+
},
|
|
2995
|
+
"surface": {
|
|
2996
|
+
"type": "string"
|
|
2997
|
+
},
|
|
2998
|
+
"links": {
|
|
2999
|
+
"type": "array",
|
|
3000
|
+
"items": {
|
|
3001
|
+
"$ref": "#/components/schemas/Link"
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
},
|
|
3005
|
+
"required": [
|
|
3006
|
+
"title",
|
|
3007
|
+
"requester",
|
|
3008
|
+
"origin"
|
|
3009
|
+
],
|
|
3010
|
+
"description": "intake: work to put into the inbox, a work item without its ID (ADR 0063)."
|
|
2169
3011
|
}
|
|
2170
3012
|
},
|
|
2171
3013
|
"securitySchemes": {
|