@opensoftware/contracts 2.3.0 → 2.4.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 +8 -5
- package/dist/formats.js +4 -0
- package/dist/formats.js.map +1 -1
- package/dist/generated/types.d.ts +489 -8
- package/dist/index.d.ts +9 -0
- package/dist/index.js.map +1 -1
- package/events/asyncapi.yaml +63 -0
- package/events/doctor-ping/doctor-ping.schema.json +62 -0
- package/events/run-blocked/run-blocked.schema.json +138 -0
- package/events/run-completed/run-completed.schema.json +10 -0
- package/events/run-started/run-started.schema.json +6 -0
- package/events/work-retry-requested/work-retry-requested.schema.json +106 -0
- package/factory-definition/factory-definition.schema.json +5 -1
- package/factory-lock/factory-lock.schema.json +111 -0
- package/openapi/openapi.json +844 -12
- package/package.json +2 -2
- package/typespec/events.tsp +58 -0
- package/typespec/factory-definition.tsp +7 -1
- package/typespec/factory-lock.tsp +56 -0
- package/typespec/foreman-api.tsp +32 -3
- package/typespec/foreman.tsp +99 -3
- package/typespec/gatekeeper-api.tsp +14 -0
- package/typespec/gatekeeper.tsp +15 -0
- package/typespec/intake-api.tsp +9 -2
- package/typespec/intake.tsp +4 -0
- package/typespec/main.tsp +1 -0
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
export type paths = {
|
|
2
|
+
"/v1/doctor/pings/{id}": {
|
|
3
|
+
parameters: {
|
|
4
|
+
query?: never;
|
|
5
|
+
header?: never;
|
|
6
|
+
path?: never;
|
|
7
|
+
cookie?: never;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @description The `doctor.ping@v1` event with this ID, when the foreman's consumer received it since the server started (ADR
|
|
11
|
+
* 0120). `console doctor --deep` asks for it after it published the event.
|
|
12
|
+
*/
|
|
13
|
+
get: operations["ForemanApi_getDoctorPing"];
|
|
14
|
+
put?: never;
|
|
15
|
+
post?: never;
|
|
16
|
+
delete?: never;
|
|
17
|
+
options?: never;
|
|
18
|
+
head?: never;
|
|
19
|
+
patch?: never;
|
|
20
|
+
trace?: never;
|
|
21
|
+
};
|
|
2
22
|
"/v1/gates": {
|
|
3
23
|
parameters: {
|
|
4
24
|
query?: never;
|
|
@@ -33,6 +53,26 @@ export type paths = {
|
|
|
33
53
|
patch?: never;
|
|
34
54
|
trace?: never;
|
|
35
55
|
};
|
|
56
|
+
"/v1/gates/{gateId}/decisions": {
|
|
57
|
+
parameters: {
|
|
58
|
+
query?: never;
|
|
59
|
+
header?: never;
|
|
60
|
+
path?: never;
|
|
61
|
+
cookie?: never;
|
|
62
|
+
};
|
|
63
|
+
get?: never;
|
|
64
|
+
put?: never;
|
|
65
|
+
/**
|
|
66
|
+
* @description A person decides a pending gate (ADR 0118): 403 when they are in no group the gate waits for, 409 when the gate
|
|
67
|
+
* is no longer pending.
|
|
68
|
+
*/
|
|
69
|
+
post: operations["GatekeeperApi_decideGate"];
|
|
70
|
+
delete?: never;
|
|
71
|
+
options?: never;
|
|
72
|
+
head?: never;
|
|
73
|
+
patch?: never;
|
|
74
|
+
trace?: never;
|
|
75
|
+
};
|
|
36
76
|
"/v1/health": {
|
|
37
77
|
parameters: {
|
|
38
78
|
query?: never;
|
|
@@ -57,7 +97,10 @@ export type paths = {
|
|
|
57
97
|
path?: never;
|
|
58
98
|
cookie?: never;
|
|
59
99
|
};
|
|
60
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* @description A page of the latest work items, the one received last first; with `status`, only the work items in that status.
|
|
102
|
+
* `limit` work items at most, 50 by default; `cursor` is the `next` of the page before (ADR 0115).
|
|
103
|
+
*/
|
|
61
104
|
get: operations["IntakeApi_listWorkItems"];
|
|
62
105
|
put?: never;
|
|
63
106
|
post?: never;
|
|
@@ -74,10 +117,14 @@ export type paths = {
|
|
|
74
117
|
path?: never;
|
|
75
118
|
cookie?: never;
|
|
76
119
|
};
|
|
77
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* @description A page of the runs of the server, running runs first, then the runs that ended, the one that ended last first; with
|
|
122
|
+
* `state`, only the runs in that state (ADR 0071). `limit` runs at most, 50 by default; `cursor` is the `next` of the
|
|
123
|
+
* page before (ADR 0115). With `state`, a page may hold fewer runs than `limit` and still have a `next`.
|
|
124
|
+
*/
|
|
78
125
|
get: operations["ForemanApi_listRuns"];
|
|
79
126
|
put?: never;
|
|
80
|
-
/** @description Start a run of the factory's workflow for a work item. The same work item again answers
|
|
127
|
+
/** @description Start a run of the factory's workflow for a work item. The same work item again answers its newest run. */
|
|
81
128
|
post: operations["ForemanApi_startRun"];
|
|
82
129
|
delete?: never;
|
|
83
130
|
options?: never;
|
|
@@ -102,6 +149,23 @@ export type paths = {
|
|
|
102
149
|
patch?: never;
|
|
103
150
|
trace?: never;
|
|
104
151
|
};
|
|
152
|
+
"/v1/runs/{runId}/retry": {
|
|
153
|
+
parameters: {
|
|
154
|
+
query?: never;
|
|
155
|
+
header?: never;
|
|
156
|
+
path?: never;
|
|
157
|
+
cookie?: never;
|
|
158
|
+
};
|
|
159
|
+
get?: never;
|
|
160
|
+
put?: never;
|
|
161
|
+
/** @description Run a run that failed or was cancelled again, as a new run that names it (ADR 0105). */
|
|
162
|
+
post: operations["ForemanApi_retryRun"];
|
|
163
|
+
delete?: never;
|
|
164
|
+
options?: never;
|
|
165
|
+
head?: never;
|
|
166
|
+
patch?: never;
|
|
167
|
+
trace?: never;
|
|
168
|
+
};
|
|
105
169
|
"/v1/runs/{runId}/signals": {
|
|
106
170
|
parameters: {
|
|
107
171
|
query?: never;
|
|
@@ -171,6 +235,18 @@ export type components = {
|
|
|
171
235
|
* @enum {string}
|
|
172
236
|
*/
|
|
173
237
|
ActorKind: "person" | "trigger";
|
|
238
|
+
/** @description foreman: a run of the factory's workflow for one work item, as the HTTP API shows it (ADR 0067).An adapter of the factory's `providers` and the version a run of it asks for (ADR 0110). */
|
|
239
|
+
AdapterVersion: {
|
|
240
|
+
/** @description The port under `providers`: harness, sandbox, forge or inference. */
|
|
241
|
+
port: "harness" | "sandbox" | "forge" | "inference";
|
|
242
|
+
name: string;
|
|
243
|
+
/** @description The exact version that factory.lock pins for the range under `providers.<port>.<name>`, else that range (ADR 0125). */
|
|
244
|
+
version?: string;
|
|
245
|
+
/** @description The command line the foreman builds when no map names the adapter: npx at the version. */
|
|
246
|
+
command?: string[];
|
|
247
|
+
/** @description The variable whose map gives the adapter's command line instead, for example "FOREMAN_HARNESSES". */
|
|
248
|
+
configured?: string;
|
|
249
|
+
};
|
|
174
250
|
Agent: {
|
|
175
251
|
description?: string;
|
|
176
252
|
/** @description Harness adapter, declared under `providers.harness`, for example "claude-code". */
|
|
@@ -231,6 +307,11 @@ export type components = {
|
|
|
231
307
|
/** @description Five-field cron expression in UTC. Without it the suite runs on request. */
|
|
232
308
|
schedule?: string;
|
|
233
309
|
};
|
|
310
|
+
/**
|
|
311
|
+
* @description What a blocked stage waits for: the checks of the run's pull request. A gate has its own `gate.requested@v1`.
|
|
312
|
+
* @enum {string}
|
|
313
|
+
*/
|
|
314
|
+
BlockedOn: "checks";
|
|
234
315
|
/** @description A path inside the bundle: relative, forward slashes, no "..". */
|
|
235
316
|
BundlePath: string;
|
|
236
317
|
/** @description The name of a check on the forge: a commit status context. */
|
|
@@ -247,6 +328,43 @@ export type components = {
|
|
|
247
328
|
};
|
|
248
329
|
/** @description A Git commit hash, abbreviated (7+) or full. The factory version is the commit of the factory definition. */
|
|
249
330
|
CommitHash: string;
|
|
331
|
+
/**
|
|
332
|
+
* @description console: `console doctor --deep` checks that an event reaches the foreman (ADR 0120). The ID is fresh and random;
|
|
333
|
+
* the foreman shows it on `GET /v1/doctor/pings/{id}` and acts on nothing else.
|
|
334
|
+
*/
|
|
335
|
+
DoctorPing: {
|
|
336
|
+
/** @constant */
|
|
337
|
+
specversion: "1.0";
|
|
338
|
+
/** @description Unique per source. A consumer that sees the same source and id twice handles the event once. */
|
|
339
|
+
id: components["schemas"]["Identifier"];
|
|
340
|
+
/** @description The producing module, for example "/osf/intake". */
|
|
341
|
+
source: string;
|
|
342
|
+
/** @constant */
|
|
343
|
+
type: "doctor.ping@v1";
|
|
344
|
+
/** Format: date-time */
|
|
345
|
+
time: string;
|
|
346
|
+
/** @description The ID of the thing the event is about: work item, gate, run, score or pull request. */
|
|
347
|
+
subject?: string;
|
|
348
|
+
/** @constant */
|
|
349
|
+
datacontenttype?: "application/json";
|
|
350
|
+
/** Format: uri */
|
|
351
|
+
dataschema?: string;
|
|
352
|
+
/** @description W3C trace context (CloudEvents distributed tracing extension). */
|
|
353
|
+
traceparent?: string;
|
|
354
|
+
data: components["schemas"]["DoctorPingData"];
|
|
355
|
+
};
|
|
356
|
+
/** @description A ping carries nothing but its ID. */
|
|
357
|
+
DoctorPingData: Record<string, never>;
|
|
358
|
+
/** @description foreman: a `doctor.ping@v1` event that its consumer received (ADR 0120). */
|
|
359
|
+
DoctorPingSeen: {
|
|
360
|
+
/** @description The event's ID. */
|
|
361
|
+
id: components["schemas"]["Identifier"];
|
|
362
|
+
/**
|
|
363
|
+
* Format: date-time
|
|
364
|
+
* @description When the foreman received it.
|
|
365
|
+
*/
|
|
366
|
+
receivedAt: string;
|
|
367
|
+
};
|
|
250
368
|
/**
|
|
251
369
|
* @description The effort level of an agent's model, from the least to the most thinking (ADR 0078).
|
|
252
370
|
* @enum {string}
|
|
@@ -303,7 +421,7 @@ export type components = {
|
|
|
303
421
|
agents: {
|
|
304
422
|
[key: string]: components["schemas"]["Agent"];
|
|
305
423
|
};
|
|
306
|
-
/** @description Stages in order. Each stage runs one agent
|
|
424
|
+
/** @description Stages in order. Each stage runs one agent, which defaults to the stage name, or only waits (ADR 0107). */
|
|
307
425
|
workflow?: components["schemas"]["Stage"][];
|
|
308
426
|
/** @description What starts work without a person asking. */
|
|
309
427
|
automations?: components["schemas"]["Automation"][];
|
|
@@ -316,6 +434,52 @@ export type components = {
|
|
|
316
434
|
[key: string]: components["schemas"]["Benchmark"];
|
|
317
435
|
};
|
|
318
436
|
};
|
|
437
|
+
/**
|
|
438
|
+
* @description factory.lock next to factory.yaml (ADR 0020, ADR 0125): the exact versions that `factory plan` pinned. factory-spec
|
|
439
|
+
* writes it; the foreman reads the pins of its adapters.
|
|
440
|
+
*/
|
|
441
|
+
FactoryLock: {
|
|
442
|
+
/**
|
|
443
|
+
* @description The version of the lock's format.
|
|
444
|
+
* @constant
|
|
445
|
+
*/
|
|
446
|
+
version: 1;
|
|
447
|
+
/** @description The registry MCP servers, by their reference in factory.yaml, for example `registry:io.github.acme/tracker@1.4`. */
|
|
448
|
+
mcp: {
|
|
449
|
+
[key: string]: components["schemas"]["FactoryLockMcpPin"];
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* @description The adapters under `providers` that `factory plan --adapters` pinned, per port and adapter name (ADR 0125). A pin
|
|
453
|
+
* counts only while its `range` is the range factory.yaml declares.
|
|
454
|
+
*/
|
|
455
|
+
adapters?: {
|
|
456
|
+
[key: string]: {
|
|
457
|
+
[key: string]: components["schemas"]["FactoryLockAdapterPin"];
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
/** @description One adapter's npm package `@opensoftware/<port>-<name>` at the newest version inside its range. */
|
|
462
|
+
FactoryLockAdapterPin: {
|
|
463
|
+
/** @description The range under `providers` that the pin was resolved from, for example "^2". */
|
|
464
|
+
range: string;
|
|
465
|
+
/** @description The exact version, for example "2.3.1". */
|
|
466
|
+
version: string;
|
|
467
|
+
};
|
|
468
|
+
/** @description One registry MCP server at its exact version, with the npm package or the remote it starts. */
|
|
469
|
+
FactoryLockMcpPin: {
|
|
470
|
+
name: string;
|
|
471
|
+
version: string;
|
|
472
|
+
package?: {
|
|
473
|
+
/** @constant */
|
|
474
|
+
registryType: "npm";
|
|
475
|
+
identifier: string;
|
|
476
|
+
version: string;
|
|
477
|
+
};
|
|
478
|
+
remote?: {
|
|
479
|
+
type: string;
|
|
480
|
+
url: string;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
319
483
|
/**
|
|
320
484
|
* @description The version of a format inside its documents. Only 1 exists; a new major version of a format adds the next.
|
|
321
485
|
* @constant
|
|
@@ -361,6 +525,17 @@ export type components = {
|
|
|
361
525
|
};
|
|
362
526
|
/** @enum {string} */
|
|
363
527
|
GateDecision: "approved" | "rejected" | "expired";
|
|
528
|
+
/**
|
|
529
|
+
* @description gatekeeper: a person's decision of a pending gate through the API, as a member of a group the gate waits for
|
|
530
|
+
* (ADR 0118). It decides like a reply "approve" or "reject <reason>" in the gate's channel.
|
|
531
|
+
*/
|
|
532
|
+
GateDecisionRequest: {
|
|
533
|
+
decision: "approved" | "rejected";
|
|
534
|
+
/** @description The person who decides; their `id` must be a member of a group in `waitingFor`. */
|
|
535
|
+
by: components["schemas"]["Actor"];
|
|
536
|
+
/** @description The reason of a rejection. */
|
|
537
|
+
reason?: string;
|
|
538
|
+
};
|
|
364
539
|
/** @description gatekeeper: who decided what and when, signed with Ed25519 (ADR 0047). */
|
|
365
540
|
GateRecord: {
|
|
366
541
|
gate: string;
|
|
@@ -702,6 +877,57 @@ export type components = {
|
|
|
702
877
|
};
|
|
703
878
|
/** @enum {string} */
|
|
704
879
|
ReviewState: "approved" | "changes_requested" | "commented";
|
|
880
|
+
/** @description foreman: a signal a person sent a run, as the run records it (ADR 0118). */
|
|
881
|
+
RunAction: {
|
|
882
|
+
type: components["schemas"]["RunSignalType"];
|
|
883
|
+
/** @description The person who sent it. */
|
|
884
|
+
by: components["schemas"]["Actor"];
|
|
885
|
+
/**
|
|
886
|
+
* Format: date-time
|
|
887
|
+
* @description When the foreman took it.
|
|
888
|
+
*/
|
|
889
|
+
at: string;
|
|
890
|
+
/** @description The steering message of "steer". */
|
|
891
|
+
message?: string;
|
|
892
|
+
};
|
|
893
|
+
/** @description foreman: a stage of a run waits for the checks of its pull request (ADR 0127). The ID is `<run ID>.blocked.<stage>`. */
|
|
894
|
+
RunBlocked: {
|
|
895
|
+
/** @constant */
|
|
896
|
+
specversion: "1.0";
|
|
897
|
+
/** @description Unique per source. A consumer that sees the same source and id twice handles the event once. */
|
|
898
|
+
id: components["schemas"]["Identifier"];
|
|
899
|
+
/** @description The producing module, for example "/osf/intake". */
|
|
900
|
+
source: string;
|
|
901
|
+
/** @constant */
|
|
902
|
+
type: "run.blocked@v1";
|
|
903
|
+
/** Format: date-time */
|
|
904
|
+
time: string;
|
|
905
|
+
/** @description The ID of the thing the event is about: work item, gate, run, score or pull request. */
|
|
906
|
+
subject?: string;
|
|
907
|
+
/** @constant */
|
|
908
|
+
datacontenttype?: "application/json";
|
|
909
|
+
/** Format: uri */
|
|
910
|
+
dataschema?: string;
|
|
911
|
+
/** @description W3C trace context (CloudEvents distributed tracing extension). */
|
|
912
|
+
traceparent?: string;
|
|
913
|
+
data: components["schemas"]["RunBlockedData"];
|
|
914
|
+
};
|
|
915
|
+
RunBlockedData: {
|
|
916
|
+
runId: components["schemas"]["Identifier"];
|
|
917
|
+
workItemId: components["schemas"]["Identifier"];
|
|
918
|
+
/** @description The stage that waits. */
|
|
919
|
+
stage: components["schemas"]["Name"];
|
|
920
|
+
waitsFor: components["schemas"]["BlockedOn"];
|
|
921
|
+
/**
|
|
922
|
+
* Format: uri
|
|
923
|
+
* @description The pull request whose checks the stage waits for.
|
|
924
|
+
*/
|
|
925
|
+
pullRequest?: string;
|
|
926
|
+
/** @description The names of the checks the stage waits for. */
|
|
927
|
+
checks?: string[];
|
|
928
|
+
requester: components["schemas"]["Actor"];
|
|
929
|
+
source: components["schemas"]["Name"];
|
|
930
|
+
};
|
|
705
931
|
/** @description foreman: a run ended. */
|
|
706
932
|
RunCompleted: {
|
|
707
933
|
/** @constant */
|
|
@@ -741,10 +967,16 @@ export type components = {
|
|
|
741
967
|
pullRequests?: string[];
|
|
742
968
|
/** Format: uri */
|
|
743
969
|
evidenceBundle?: string;
|
|
970
|
+
/** @description The run before, when this run runs a work item again (ADR 0105). */
|
|
971
|
+
retryOf?: components["schemas"]["Identifier"];
|
|
972
|
+
/** @description Why the stage the run ended at failed, when the foreman knows it (ADR 0127). */
|
|
973
|
+
reason?: string;
|
|
744
974
|
};
|
|
745
975
|
/** @description foreman: the runs of the server, running runs first, then the runs that ended, the one that ended last first, as `GET /v1/runs` answers them (ADR 0071). */
|
|
746
976
|
RunList: {
|
|
747
977
|
runs: components["schemas"]["RunView"][];
|
|
978
|
+
/** @description The cursor of the next page, while more runs follow (ADR 0115). */
|
|
979
|
+
next?: string;
|
|
748
980
|
};
|
|
749
981
|
/**
|
|
750
982
|
* @description How a run ended.
|
|
@@ -778,6 +1010,15 @@ export type components = {
|
|
|
778
1010
|
"osf.harness.name": components["schemas"]["Name"];
|
|
779
1011
|
"osf.harness.version"?: string;
|
|
780
1012
|
};
|
|
1013
|
+
/**
|
|
1014
|
+
* @description foreman: run a run that failed or was cancelled again, as a new run (ADR 0105). The new run starts at the first stage
|
|
1015
|
+
* that did not succeed, or at `from`, a stage at or before it.
|
|
1016
|
+
*/
|
|
1017
|
+
RunRetry: {
|
|
1018
|
+
/** @description The person who asks. */
|
|
1019
|
+
by: components["schemas"]["Actor"];
|
|
1020
|
+
from?: components["schemas"]["Name"];
|
|
1021
|
+
};
|
|
781
1022
|
/**
|
|
782
1023
|
* @description foreman: a signal to a run: "steer" with a message for the running stage's agent, "cancel", "take-over" of the running
|
|
783
1024
|
* stage by a person, or "hand-back" of that stage (ADR 0070).
|
|
@@ -786,6 +1027,8 @@ export type components = {
|
|
|
786
1027
|
type: components["schemas"]["RunSignalType"];
|
|
787
1028
|
/** @description The steering message. Required with "steer". */
|
|
788
1029
|
message?: string;
|
|
1030
|
+
/** @description The person who sends the signal; the run then records it in `actions` (ADR 0118). */
|
|
1031
|
+
by?: components["schemas"]["Actor"];
|
|
789
1032
|
};
|
|
790
1033
|
/**
|
|
791
1034
|
* @description foreman: what a person tells a run.
|
|
@@ -860,25 +1103,34 @@ export type components = {
|
|
|
860
1103
|
startedAt: string;
|
|
861
1104
|
requester: components["schemas"]["Actor"];
|
|
862
1105
|
source: components["schemas"]["Name"];
|
|
1106
|
+
/** @description The run before, when this run runs a work item again (ADR 0105). */
|
|
1107
|
+
retryOf?: components["schemas"]["Identifier"];
|
|
863
1108
|
};
|
|
864
1109
|
/**
|
|
865
1110
|
* @description foreman: where a run stands (vision scenario ORCH-008).
|
|
866
1111
|
* @enum {string}
|
|
867
1112
|
*/
|
|
868
1113
|
RunState: "running" | "blocked" | "complete" | "failed" | "cancelled";
|
|
869
|
-
/** @description foreman: a run of the factory's workflow for one work item, as the HTTP API shows it (ADR 0067). */
|
|
870
1114
|
RunView: {
|
|
871
|
-
/** @description "run_" and 20 hex digits of the SHA-256 of the work item's ID. */
|
|
1115
|
+
/** @description "run_" and 20 hex digits of the SHA-256 of the work item's ID; for the n-th run of the work item, n ≥ 2, of "<work item ID>#<n>" (ADR 0105). */
|
|
872
1116
|
runId: string;
|
|
1117
|
+
/** @description Which run of the work item this is: 1 when absent (ADR 0105). */
|
|
1118
|
+
attempt?: number;
|
|
1119
|
+
/** @description The run before this one, which a person ran again (ADR 0105). */
|
|
1120
|
+
retryOf?: string;
|
|
1121
|
+
/** @description The person who ran the run before again (ADR 0105). */
|
|
1122
|
+
retriedBy?: components["schemas"]["Actor"];
|
|
873
1123
|
workItem: components["schemas"]["WorkItem"];
|
|
874
1124
|
/** @description The name of the factory. */
|
|
875
1125
|
factory: components["schemas"]["Name"];
|
|
876
1126
|
/** @description The commit of the factory definition the run started with. */
|
|
877
1127
|
factoryVersion: components["schemas"]["CommitHash"];
|
|
1128
|
+
/** @description The adapters of the factory's `providers` and the versions the run asks for (ADR 0110). */
|
|
1129
|
+
adapters?: components["schemas"]["AdapterVersion"][];
|
|
878
1130
|
state: components["schemas"]["RunState"];
|
|
879
1131
|
/**
|
|
880
1132
|
* Format: uri
|
|
881
|
-
* @description The
|
|
1133
|
+
* @description The run's pull request: the forge's of the run's branch, the one an agent stated, or else the last link an agent wrote (ADR 0069, ADR 0109).
|
|
882
1134
|
*/
|
|
883
1135
|
pullRequest?: string;
|
|
884
1136
|
/** @description The run's folder on the foreman's machine, where a person who took over a stage goes on (ADR 0070). */
|
|
@@ -891,6 +1143,8 @@ export type components = {
|
|
|
891
1143
|
traceId?: components["schemas"]["TraceId"];
|
|
892
1144
|
/** @description The stages of the workflow, in order. */
|
|
893
1145
|
stages: components["schemas"]["StageView"][];
|
|
1146
|
+
/** @description The signals that named their person, oldest first (ADR 0118). */
|
|
1147
|
+
actions?: components["schemas"]["RunAction"][];
|
|
894
1148
|
};
|
|
895
1149
|
Sandbox: {
|
|
896
1150
|
/** @description Sandbox template name, for example "node-24". */
|
|
@@ -1033,6 +1287,11 @@ export type components = {
|
|
|
1033
1287
|
checks?: components["schemas"]["CheckName"][];
|
|
1034
1288
|
/** @description Whether the stage must produce an evidence bundle. */
|
|
1035
1289
|
evidence?: components["schemas"]["EvidenceRequirement"];
|
|
1290
|
+
/**
|
|
1291
|
+
* @description The stage runs no agent: it only waits for its checks, its evidence and its gate, then succeeds (ADR 0107). It
|
|
1292
|
+
* names no agent and at least one of checks, evidence "required" or gate.
|
|
1293
|
+
*/
|
|
1294
|
+
wait?: boolean;
|
|
1036
1295
|
};
|
|
1037
1296
|
/**
|
|
1038
1297
|
* @description foreman: where a stage of a run stands.
|
|
@@ -1042,15 +1301,27 @@ export type components = {
|
|
|
1042
1301
|
/** @description foreman: one stage of a run (ADR 0067). */
|
|
1043
1302
|
StageView: {
|
|
1044
1303
|
stage: components["schemas"]["Name"];
|
|
1045
|
-
/** @description The agent that runs the stage. */
|
|
1304
|
+
/** @description The agent that runs the stage; the stage's name for a stage that only waits (ADR 0107). */
|
|
1046
1305
|
agent: components["schemas"]["Name"];
|
|
1306
|
+
/** @description True for a stage that only waits: it runs no agent and starts no session (ADR 0107). */
|
|
1307
|
+
wait?: boolean;
|
|
1047
1308
|
state: components["schemas"]["StageState"];
|
|
1048
1309
|
/** @description The harness session of the stage's agent, once it started. */
|
|
1049
1310
|
sessionId?: string;
|
|
1311
|
+
/**
|
|
1312
|
+
* @description The span of the stage in the run's trace, once it started: the first 16 hex digits of the SHA-256 of
|
|
1313
|
+
* `<runId>:<stage index>` (ADR 0087, ADR 0121).
|
|
1314
|
+
*/
|
|
1315
|
+
spanId?: string;
|
|
1050
1316
|
/** @description The gate that decides whether the stage starts, once it was requested. */
|
|
1051
1317
|
gateId?: string;
|
|
1052
1318
|
/** @description The checks the stage waits for, once the foreman read them (ADR 0069). */
|
|
1053
1319
|
checks?: components["schemas"]["CheckView"][];
|
|
1320
|
+
/**
|
|
1321
|
+
* Format: date-time
|
|
1322
|
+
* @description Since when the stage waits for its checks, its gate or a person, while it is blocked (ADR 0106).
|
|
1323
|
+
*/
|
|
1324
|
+
waitingSince?: string;
|
|
1054
1325
|
/**
|
|
1055
1326
|
* Format: date-time
|
|
1056
1327
|
* @description When a person took the stage over from its agent (ADR 0070).
|
|
@@ -1058,6 +1329,8 @@ export type components = {
|
|
|
1058
1329
|
takenOverAt?: string;
|
|
1059
1330
|
/** @description Why the stage ended without success, when the foreman knows. */
|
|
1060
1331
|
reason?: string;
|
|
1332
|
+
/** @description Why the stage gave the run no pull request: a refused link, a branch the forge has none of, or the forge adapter's error (ADR 0109). */
|
|
1333
|
+
note?: string;
|
|
1061
1334
|
/** Format: date-time */
|
|
1062
1335
|
startedAt?: string;
|
|
1063
1336
|
/** Format: date-time */
|
|
@@ -1091,6 +1364,8 @@ export type components = {
|
|
|
1091
1364
|
/** @description intake: the latest work items, as `GET /v1/inbox` answers them, the one received last first. */
|
|
1092
1365
|
WorkItemList: {
|
|
1093
1366
|
workItems: components["schemas"]["WorkItemView"][];
|
|
1367
|
+
/** @description The cursor of the next page, while more work items follow (ADR 0115). */
|
|
1368
|
+
next?: string;
|
|
1094
1369
|
};
|
|
1095
1370
|
/**
|
|
1096
1371
|
* @description Where a work item stands: received, then as its run in the foreman goes (ADR 0071).
|
|
@@ -1140,6 +1415,35 @@ export type components = {
|
|
|
1140
1415
|
/** Format: date-time */
|
|
1141
1416
|
receivedAt: string;
|
|
1142
1417
|
};
|
|
1418
|
+
/** @description intake: a person asked to run a work item's run again (ADR 0105). The ID is `<run ID>.retry`. */
|
|
1419
|
+
WorkRetryRequested: {
|
|
1420
|
+
/** @constant */
|
|
1421
|
+
specversion: "1.0";
|
|
1422
|
+
/** @description Unique per source. A consumer that sees the same source and id twice handles the event once. */
|
|
1423
|
+
id: components["schemas"]["Identifier"];
|
|
1424
|
+
/** @description The producing module, for example "/osf/intake". */
|
|
1425
|
+
source: string;
|
|
1426
|
+
/** @constant */
|
|
1427
|
+
type: "work.retry-requested@v1";
|
|
1428
|
+
/** Format: date-time */
|
|
1429
|
+
time: string;
|
|
1430
|
+
/** @description The ID of the thing the event is about: work item, gate, run, score or pull request. */
|
|
1431
|
+
subject?: string;
|
|
1432
|
+
/** @constant */
|
|
1433
|
+
datacontenttype?: "application/json";
|
|
1434
|
+
/** Format: uri */
|
|
1435
|
+
dataschema?: string;
|
|
1436
|
+
/** @description W3C trace context (CloudEvents distributed tracing extension). */
|
|
1437
|
+
traceparent?: string;
|
|
1438
|
+
data: components["schemas"]["WorkRetryRequestedData"];
|
|
1439
|
+
};
|
|
1440
|
+
WorkRetryRequestedData: {
|
|
1441
|
+
workItemId: components["schemas"]["Identifier"];
|
|
1442
|
+
/** @description The run to run again: the run the work item follows. */
|
|
1443
|
+
runId: components["schemas"]["Identifier"];
|
|
1444
|
+
/** @description The person who asked. */
|
|
1445
|
+
requester: components["schemas"]["Actor"];
|
|
1446
|
+
};
|
|
1143
1447
|
/** @description intake: work to put into the inbox, a work item without its ID (ADR 0063). */
|
|
1144
1448
|
WorkSubmission: {
|
|
1145
1449
|
/** @description Default: task. */
|
|
@@ -1162,6 +1466,46 @@ export type components = {
|
|
|
1162
1466
|
};
|
|
1163
1467
|
export type $defs = Record<string, never>;
|
|
1164
1468
|
export interface operations {
|
|
1469
|
+
ForemanApi_getDoctorPing: {
|
|
1470
|
+
parameters: {
|
|
1471
|
+
query?: never;
|
|
1472
|
+
header?: never;
|
|
1473
|
+
path: {
|
|
1474
|
+
id: string;
|
|
1475
|
+
};
|
|
1476
|
+
cookie?: never;
|
|
1477
|
+
};
|
|
1478
|
+
requestBody?: never;
|
|
1479
|
+
responses: {
|
|
1480
|
+
/** @description The request has succeeded. */
|
|
1481
|
+
200: {
|
|
1482
|
+
headers: {
|
|
1483
|
+
[name: string]: unknown;
|
|
1484
|
+
};
|
|
1485
|
+
content: {
|
|
1486
|
+
"application/json": components["schemas"]["DoctorPingSeen"];
|
|
1487
|
+
};
|
|
1488
|
+
};
|
|
1489
|
+
/** @description Access is unauthorized. */
|
|
1490
|
+
401: {
|
|
1491
|
+
headers: {
|
|
1492
|
+
[name: string]: unknown;
|
|
1493
|
+
};
|
|
1494
|
+
content: {
|
|
1495
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1496
|
+
};
|
|
1497
|
+
};
|
|
1498
|
+
/** @description The server cannot find the requested resource. */
|
|
1499
|
+
404: {
|
|
1500
|
+
headers: {
|
|
1501
|
+
[name: string]: unknown;
|
|
1502
|
+
};
|
|
1503
|
+
content: {
|
|
1504
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1505
|
+
};
|
|
1506
|
+
};
|
|
1507
|
+
};
|
|
1508
|
+
};
|
|
1165
1509
|
GatekeeperApi_requestGate: {
|
|
1166
1510
|
parameters: {
|
|
1167
1511
|
query?: never;
|
|
@@ -1253,6 +1597,77 @@ export interface operations {
|
|
|
1253
1597
|
};
|
|
1254
1598
|
};
|
|
1255
1599
|
};
|
|
1600
|
+
GatekeeperApi_decideGate: {
|
|
1601
|
+
parameters: {
|
|
1602
|
+
query?: never;
|
|
1603
|
+
header?: never;
|
|
1604
|
+
path: {
|
|
1605
|
+
gateId: string;
|
|
1606
|
+
};
|
|
1607
|
+
cookie?: never;
|
|
1608
|
+
};
|
|
1609
|
+
requestBody: {
|
|
1610
|
+
content: {
|
|
1611
|
+
"application/json": components["schemas"]["GateDecisionRequest"];
|
|
1612
|
+
};
|
|
1613
|
+
};
|
|
1614
|
+
responses: {
|
|
1615
|
+
/** @description The request has succeeded. */
|
|
1616
|
+
200: {
|
|
1617
|
+
headers: {
|
|
1618
|
+
[name: string]: unknown;
|
|
1619
|
+
};
|
|
1620
|
+
content: {
|
|
1621
|
+
"application/json": components["schemas"]["GateView"];
|
|
1622
|
+
};
|
|
1623
|
+
};
|
|
1624
|
+
/** @description The server could not understand the request due to invalid syntax. */
|
|
1625
|
+
400: {
|
|
1626
|
+
headers: {
|
|
1627
|
+
[name: string]: unknown;
|
|
1628
|
+
};
|
|
1629
|
+
content: {
|
|
1630
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1631
|
+
};
|
|
1632
|
+
};
|
|
1633
|
+
/** @description Access is unauthorized. */
|
|
1634
|
+
401: {
|
|
1635
|
+
headers: {
|
|
1636
|
+
[name: string]: unknown;
|
|
1637
|
+
};
|
|
1638
|
+
content: {
|
|
1639
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1640
|
+
};
|
|
1641
|
+
};
|
|
1642
|
+
/** @description Access is forbidden. */
|
|
1643
|
+
403: {
|
|
1644
|
+
headers: {
|
|
1645
|
+
[name: string]: unknown;
|
|
1646
|
+
};
|
|
1647
|
+
content: {
|
|
1648
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1649
|
+
};
|
|
1650
|
+
};
|
|
1651
|
+
/** @description The server cannot find the requested resource. */
|
|
1652
|
+
404: {
|
|
1653
|
+
headers: {
|
|
1654
|
+
[name: string]: unknown;
|
|
1655
|
+
};
|
|
1656
|
+
content: {
|
|
1657
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1658
|
+
};
|
|
1659
|
+
};
|
|
1660
|
+
/** @description The request conflicts with the current state of the server. */
|
|
1661
|
+
409: {
|
|
1662
|
+
headers: {
|
|
1663
|
+
[name: string]: unknown;
|
|
1664
|
+
};
|
|
1665
|
+
content: {
|
|
1666
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1667
|
+
};
|
|
1668
|
+
};
|
|
1669
|
+
};
|
|
1670
|
+
};
|
|
1256
1671
|
HealthApi_getHealth: {
|
|
1257
1672
|
parameters: {
|
|
1258
1673
|
query?: never;
|
|
@@ -1286,6 +1701,8 @@ export interface operations {
|
|
|
1286
1701
|
parameters: {
|
|
1287
1702
|
query?: {
|
|
1288
1703
|
status?: components["schemas"]["WorkItemStatus"];
|
|
1704
|
+
limit?: number;
|
|
1705
|
+
cursor?: string;
|
|
1289
1706
|
};
|
|
1290
1707
|
header?: never;
|
|
1291
1708
|
path?: never;
|
|
@@ -1326,6 +1743,8 @@ export interface operations {
|
|
|
1326
1743
|
parameters: {
|
|
1327
1744
|
query?: {
|
|
1328
1745
|
state?: components["schemas"]["RunState"];
|
|
1746
|
+
limit?: number;
|
|
1747
|
+
cursor?: string;
|
|
1329
1748
|
};
|
|
1330
1749
|
header?: never;
|
|
1331
1750
|
path?: never;
|
|
@@ -1453,6 +1872,68 @@ export interface operations {
|
|
|
1453
1872
|
};
|
|
1454
1873
|
};
|
|
1455
1874
|
};
|
|
1875
|
+
ForemanApi_retryRun: {
|
|
1876
|
+
parameters: {
|
|
1877
|
+
query?: never;
|
|
1878
|
+
header?: never;
|
|
1879
|
+
path: {
|
|
1880
|
+
runId: string;
|
|
1881
|
+
};
|
|
1882
|
+
cookie?: never;
|
|
1883
|
+
};
|
|
1884
|
+
requestBody: {
|
|
1885
|
+
content: {
|
|
1886
|
+
"application/json": components["schemas"]["RunRetry"];
|
|
1887
|
+
};
|
|
1888
|
+
};
|
|
1889
|
+
responses: {
|
|
1890
|
+
/** @description The request has succeeded and a new resource has been created as a result. */
|
|
1891
|
+
201: {
|
|
1892
|
+
headers: {
|
|
1893
|
+
[name: string]: unknown;
|
|
1894
|
+
};
|
|
1895
|
+
content: {
|
|
1896
|
+
"application/json": components["schemas"]["RunView"];
|
|
1897
|
+
};
|
|
1898
|
+
};
|
|
1899
|
+
/** @description The server could not understand the request due to invalid syntax. */
|
|
1900
|
+
400: {
|
|
1901
|
+
headers: {
|
|
1902
|
+
[name: string]: unknown;
|
|
1903
|
+
};
|
|
1904
|
+
content: {
|
|
1905
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1906
|
+
};
|
|
1907
|
+
};
|
|
1908
|
+
/** @description Access is unauthorized. */
|
|
1909
|
+
401: {
|
|
1910
|
+
headers: {
|
|
1911
|
+
[name: string]: unknown;
|
|
1912
|
+
};
|
|
1913
|
+
content: {
|
|
1914
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1915
|
+
};
|
|
1916
|
+
};
|
|
1917
|
+
/** @description The server cannot find the requested resource. */
|
|
1918
|
+
404: {
|
|
1919
|
+
headers: {
|
|
1920
|
+
[name: string]: unknown;
|
|
1921
|
+
};
|
|
1922
|
+
content: {
|
|
1923
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1924
|
+
};
|
|
1925
|
+
};
|
|
1926
|
+
/** @description The request conflicts with the current state of the server. */
|
|
1927
|
+
409: {
|
|
1928
|
+
headers: {
|
|
1929
|
+
[name: string]: unknown;
|
|
1930
|
+
};
|
|
1931
|
+
content: {
|
|
1932
|
+
"application/problem+json": components["schemas"]["ApiProblem"];
|
|
1933
|
+
};
|
|
1934
|
+
};
|
|
1935
|
+
};
|
|
1936
|
+
};
|
|
1456
1937
|
ForemanApi_signalRun: {
|
|
1457
1938
|
parameters: {
|
|
1458
1939
|
query?: never;
|