@opensoftware/contracts 1.6.0 → 1.7.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 CHANGED
@@ -44,13 +44,16 @@ Each format has one schema, generated from `typespec/`, and fixtures that CONTRA
44
44
  | score | `score/score.schema.json` | `Score` | Subset of Langfuse's create-score request; factory fields in `metadata`. |
45
45
  | gate record | `gate-record/gate-record.schema.json` | `GateRecord` | gatekeeper's signed approval record (ADR 0047). |
46
46
  | sandbox spec | `sandbox-spec/sandbox-spec.schema.json` | `SandboxSpec` | The input of a sandbox adapter's `create` (ADR 0054). Closed objects: an unknown field is an error. |
47
- | events | `events/<event>/<event>.schema.json`, `events/asyncapi.yaml` | `WorkReceived` … `PrClosed` | CloudEvents 1.0, structured JSON. |
47
+ | events | `events/<event>/<event>.schema.json`, `events/asyncapi.yaml` | `WorkReceived`, `RunStarted` … `IssueLabeled` | CloudEvents 1.0, structured JSON. |
48
48
 
49
49
  ## HTTP APIs
50
50
 
51
51
  `openapi/openapi.json` also holds the paths of the module APIs, from the operations in `typespec/` (ADR 0048). The
52
52
  first is gatekeeper's: `POST /v1/gates` and `GET /v1/gates/{gateId}` with the models `GateRequest`, `GateView` and
53
- `ApiProblem` (RFC 9457). `pnpm build` compiles the operations with the TypeSpec OpenAPI 3 emitter and copies their
53
+ `ApiProblem` (RFC 9457). The second is intake's (ADR 0063): `POST /v1/work-items` and
54
+ `GET /v1/work-items/{workItemId}` with the models `WorkSubmission`, `WorkItemView` and `WorkRequest`. The third is the
55
+ foreman's (ADR 0067): `POST /v1/runs`, `GET /v1/runs/{runId}` and `POST /v1/runs/{runId}/signals` with the models
56
+ `RunView`, `StageView` and `RunSignal`. `pnpm build` compiles the operations with the TypeSpec OpenAPI 3 emitter and copies their
54
57
  paths next to the named models; an operation that uses a type that is no model fails the build. The package exports
55
58
  the type `paths`, which types a client such as openapi-fetch.
56
59
 
package/dist/formats.js CHANGED
@@ -9,6 +9,7 @@ export const FORMATS = [
9
9
  format("gate-record", "GateRecord"),
10
10
  format("sandbox-spec", "SandboxSpec"),
11
11
  format("events/work-received", "WorkReceived"),
12
+ format("events/run-started", "RunStarted"),
12
13
  format("events/run-completed", "RunCompleted"),
13
14
  format("events/gate-requested", "GateRequested"),
14
15
  format("events/gate-decided", "GateDecided"),
@@ -16,6 +17,7 @@ export const FORMATS = [
16
17
  format("events/pr-opened", "PrOpened"),
17
18
  format("events/pr-reviewed", "PrReviewed"),
18
19
  format("events/pr-closed", "PrClosed"),
20
+ format("events/issue-labeled", "IssueLabeled"),
19
21
  ];
20
22
  export function formatNamed(name) {
21
23
  return FORMATS.find((candidate) => candidate.name === name);
@@ -1 +1 @@
1
- {"version":3,"file":"formats.js","sourceRoot":"","sources":["../src/formats.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAW3G,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAY,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAEjH,MAAM,CAAC,MAAM,OAAO,GAAsB;IACxC,MAAM,CAAC,oBAAoB,EAAE,mBAAmB,CAAC;IACjD,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC;IAC/B,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC;IACjC,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;IAC7C,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC;IACnC,MAAM,CAAC,cAAc,EAAE,aAAa,CAAC;IACrC,MAAM,CAAC,sBAAsB,EAAE,cAAc,CAAC;IAC9C,MAAM,CAAC,sBAAsB,EAAE,cAAc,CAAC;IAC9C,MAAM,CAAC,uBAAuB,EAAE,eAAe,CAAC;IAChD,MAAM,CAAC,qBAAqB,EAAE,aAAa,CAA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CAAC;IAChD,MAAM,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACtC,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAAC;IAC1C,MAAM,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACtC,MAAM,CAAC,sBAAsB,EAAE,cAAc,CAAC;CAC/C,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC9D,CAAC"}
@@ -33,6 +33,92 @@ export type paths = {
33
33
  patch?: never;
34
34
  trace?: never;
35
35
  };
36
+ "/v1/runs": {
37
+ parameters: {
38
+ query?: never;
39
+ header?: never;
40
+ path?: never;
41
+ cookie?: never;
42
+ };
43
+ get?: never;
44
+ put?: never;
45
+ /** @description Start a run of the factory's workflow for a work item. The same work item again answers the run it started. */
46
+ post: operations["ForemanApi_startRun"];
47
+ delete?: never;
48
+ options?: never;
49
+ head?: never;
50
+ patch?: never;
51
+ trace?: never;
52
+ };
53
+ "/v1/runs/{runId}": {
54
+ parameters: {
55
+ query?: never;
56
+ header?: never;
57
+ path?: never;
58
+ cookie?: never;
59
+ };
60
+ /** @description A run: its state and the state of each stage. */
61
+ get: operations["ForemanApi_getRun"];
62
+ put?: never;
63
+ post?: never;
64
+ delete?: never;
65
+ options?: never;
66
+ head?: never;
67
+ patch?: never;
68
+ trace?: never;
69
+ };
70
+ "/v1/runs/{runId}/signals": {
71
+ parameters: {
72
+ query?: never;
73
+ header?: never;
74
+ path?: never;
75
+ cookie?: never;
76
+ };
77
+ get?: never;
78
+ put?: never;
79
+ /** @description Steer the running stage's agent, or cancel the run. */
80
+ post: operations["ForemanApi_signalRun"];
81
+ delete?: never;
82
+ options?: never;
83
+ head?: never;
84
+ patch?: never;
85
+ trace?: never;
86
+ };
87
+ "/v1/work-items": {
88
+ parameters: {
89
+ query?: never;
90
+ header?: never;
91
+ path?: never;
92
+ cookie?: never;
93
+ };
94
+ /** @description The work item with this dedupe key, such as an issue's link (ADR 0065). */
95
+ get: operations["IntakeApi_findWorkItem"];
96
+ put?: never;
97
+ /** @description Put work into the inbox. A submission with the dedupe key of a work item answers that work item. */
98
+ post: operations["IntakeApi_submitWork"];
99
+ delete?: never;
100
+ options?: never;
101
+ head?: never;
102
+ patch?: never;
103
+ trace?: never;
104
+ };
105
+ "/v1/work-items/{workItemId}": {
106
+ parameters: {
107
+ query?: never;
108
+ header?: never;
109
+ path?: never;
110
+ cookie?: never;
111
+ };
112
+ /** @description A work item, its status and every request that asked for it. */
113
+ get: operations["IntakeApi_getWorkItem"];
114
+ put?: never;
115
+ post?: never;
116
+ delete?: never;
117
+ options?: never;
118
+ head?: never;
119
+ patch?: never;
120
+ trace?: never;
121
+ };
36
122
  };
37
123
  export type webhooks = Record<string, never>;
38
124
  export type components = {
@@ -332,6 +418,46 @@ export type components = {
332
418
  Hostname: string;
333
419
  /** @description An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque. */
334
420
  Identifier: string;
421
+ /** @description forge adapters: a label was added to an issue. */
422
+ IssueLabeled: {
423
+ /** @constant */
424
+ specversion: "1.0";
425
+ /** @description Unique per source. A consumer that sees the same source and id twice handles the event once. */
426
+ id: components["schemas"]["Identifier"];
427
+ /** @description The producing module, for example "/osf/intake". */
428
+ source: string;
429
+ /** @constant */
430
+ type: "issue.labeled@v1";
431
+ /** Format: date-time */
432
+ time: string;
433
+ /** @description The ID of the thing the event is about: work item, gate, run, score or pull request. */
434
+ subject?: string;
435
+ /** @constant */
436
+ datacontenttype?: "application/json";
437
+ /** Format: uri */
438
+ dataschema?: string;
439
+ /** @description W3C trace context (CloudEvents distributed tracing extension). */
440
+ traceparent?: string;
441
+ data: components["schemas"]["IssueLabeledData"];
442
+ };
443
+ IssueLabeledData: {
444
+ /**
445
+ * Format: uri
446
+ * @description The issue.
447
+ */
448
+ url: string;
449
+ /** Format: uri */
450
+ repository: string;
451
+ number: number;
452
+ title: string;
453
+ body?: string;
454
+ /** @description The person who opened the issue. */
455
+ author: components["schemas"]["Actor"];
456
+ /** @description Every label of the issue after the change. */
457
+ labels: string[];
458
+ /** @description The label that was added, when the forge names it. */
459
+ label?: string;
460
+ };
335
461
  Link: {
336
462
  /** Format: uri */
337
463
  url: string;
@@ -569,6 +695,17 @@ export type components = {
569
695
  "osf.harness.name": components["schemas"]["Name"];
570
696
  "osf.harness.version"?: string;
571
697
  };
698
+ /** @description foreman: a signal to a run: "steer" with a message for the running stage's agent, or "cancel". */
699
+ RunSignal: {
700
+ type: components["schemas"]["RunSignalType"];
701
+ /** @description The steering message. Required with "steer". */
702
+ message?: string;
703
+ };
704
+ /**
705
+ * @description foreman: what a person tells a run.
706
+ * @enum {string}
707
+ */
708
+ RunSignalType: "steer" | "cancel";
572
709
  /** @description Attributes of the root span of the run. GenAI names where a convention exists. */
573
710
  RunSpan: {
574
711
  /** @constant */
@@ -603,6 +740,63 @@ export type components = {
603
740
  */
604
741
  "osf.agent_trace.uri"?: string;
605
742
  };
743
+ /** @description foreman: a run started (ADR 0067). */
744
+ RunStarted: {
745
+ /** @constant */
746
+ specversion: "1.0";
747
+ /** @description Unique per source. A consumer that sees the same source and id twice handles the event once. */
748
+ id: components["schemas"]["Identifier"];
749
+ /** @description The producing module, for example "/osf/intake". */
750
+ source: string;
751
+ /** @constant */
752
+ type: "run.started@v1";
753
+ /** Format: date-time */
754
+ time: string;
755
+ /** @description The ID of the thing the event is about: work item, gate, run, score or pull request. */
756
+ subject?: string;
757
+ /** @constant */
758
+ datacontenttype?: "application/json";
759
+ /** Format: uri */
760
+ dataschema?: string;
761
+ /** @description W3C trace context (CloudEvents distributed tracing extension). */
762
+ traceparent?: string;
763
+ data: components["schemas"]["RunStartedData"];
764
+ };
765
+ RunStartedData: {
766
+ runId: components["schemas"]["Identifier"];
767
+ workItemId: components["schemas"]["Identifier"];
768
+ /** @description The name of the factory. */
769
+ factory: components["schemas"]["Name"];
770
+ factoryVersion: components["schemas"]["CommitHash"];
771
+ /** @description The stages of the run's workflow, in order. */
772
+ stages: components["schemas"]["Name"][];
773
+ /** Format: date-time */
774
+ startedAt: string;
775
+ requester: components["schemas"]["Actor"];
776
+ source: components["schemas"]["Name"];
777
+ };
778
+ /**
779
+ * @description foreman: where a run stands (vision scenario ORCH-008).
780
+ * @enum {string}
781
+ */
782
+ RunState: "running" | "blocked" | "complete" | "failed" | "cancelled";
783
+ /** @description foreman: a run of the factory's workflow for one work item, as the HTTP API shows it (ADR 0067). */
784
+ RunView: {
785
+ /** @description "run_" and 20 hex digits of the SHA-256 of the work item's ID. */
786
+ runId: string;
787
+ workItem: components["schemas"]["WorkItem"];
788
+ /** @description The name of the factory. */
789
+ factory: components["schemas"]["Name"];
790
+ /** @description The commit of the factory definition the run started with. */
791
+ factoryVersion: components["schemas"]["CommitHash"];
792
+ state: components["schemas"]["RunState"];
793
+ /** Format: date-time */
794
+ startedAt: string;
795
+ /** Format: date-time */
796
+ endedAt?: string;
797
+ /** @description The stages of the workflow, in order. */
798
+ stages: components["schemas"]["StageView"][];
799
+ };
606
800
  Sandbox: {
607
801
  /** @description Sandbox template name, for example "node-24". */
608
802
  template: string;
@@ -740,6 +934,26 @@ export type components = {
740
934
  /** @description Whether the stage must produce an evidence bundle. */
741
935
  evidence?: components["schemas"]["EvidenceRequirement"];
742
936
  };
937
+ /**
938
+ * @description foreman: where a stage of a run stands.
939
+ * @enum {string}
940
+ */
941
+ StageState: "pending" | "blocked" | "running" | "succeeded" | "failed" | "rejected" | "cancelled";
942
+ /** @description foreman: one stage of a run (ADR 0067). */
943
+ StageView: {
944
+ stage: components["schemas"]["Name"];
945
+ /** @description The agent that runs the stage. */
946
+ agent: components["schemas"]["Name"];
947
+ state: components["schemas"]["StageState"];
948
+ /** @description The harness session of the stage's agent, once it started. */
949
+ sessionId?: string;
950
+ /** @description The gate that decides whether the stage starts, once it was requested. */
951
+ gateId?: string;
952
+ /** Format: date-time */
953
+ startedAt?: string;
954
+ /** Format: date-time */
955
+ endedAt?: string;
956
+ };
743
957
  /** @description An OpenTelemetry trace ID: 32 lowercase hex characters. */
744
958
  TraceId: string;
745
959
  /** @enum {string} */
@@ -765,8 +979,23 @@ export type components = {
765
979
  /** @description Related material: an error report, a change, a document. */
766
980
  links?: components["schemas"]["Link"][];
767
981
  };
982
+ /**
983
+ * @description Where a work item stands.
984
+ * @enum {string}
985
+ */
986
+ WorkItemStatus: "received";
768
987
  /** @enum {string} */
769
988
  WorkItemType: "idea" | "bug" | "task" | "automation";
989
+ /** @description intake: a work item as the HTTP API shows it (ADR 0063). */
990
+ WorkItemView: {
991
+ /** @description Its ID is "wi_" and 20 hex digits of the SHA-256 of its dedupe key. */
992
+ workItem: components["schemas"]["WorkItem"];
993
+ status: components["schemas"]["WorkItemStatus"];
994
+ /** Format: date-time */
995
+ receivedAt: string;
996
+ /** @description Every submission that asked for the work item, oldest first; one per origin. */
997
+ requests: components["schemas"]["WorkRequest"][];
998
+ };
770
999
  /** @description intake: a work item was accepted. */
771
1000
  WorkReceived: {
772
1001
  /** @constant */
@@ -789,6 +1018,26 @@ export type components = {
789
1018
  traceparent?: string;
790
1019
  data: components["schemas"]["WorkItem"];
791
1020
  };
1021
+ /** @description intake: one submission that asked for a work item. */
1022
+ WorkRequest: {
1023
+ requester: components["schemas"]["Actor"];
1024
+ origin: components["schemas"]["Origin"];
1025
+ /** Format: date-time */
1026
+ receivedAt: string;
1027
+ };
1028
+ /** @description intake: work to put into the inbox, a work item without its ID (ADR 0063). */
1029
+ WorkSubmission: {
1030
+ /** @description Default: task. */
1031
+ type?: components["schemas"]["WorkItemType"];
1032
+ title: string;
1033
+ description?: string;
1034
+ requester: components["schemas"]["Actor"];
1035
+ origin: components["schemas"]["Origin"];
1036
+ /** @description Requests with the same key become one work item. Default: the origin's url, else "<source>:<externalId>". */
1037
+ dedupeKey?: string;
1038
+ surface?: string;
1039
+ links?: components["schemas"]["Link"][];
1040
+ };
792
1041
  };
793
1042
  responses: never;
794
1043
  parameters: never;
@@ -889,4 +1138,297 @@ export interface operations {
889
1138
  };
890
1139
  };
891
1140
  };
1141
+ ForemanApi_startRun: {
1142
+ parameters: {
1143
+ query?: never;
1144
+ header?: never;
1145
+ path?: never;
1146
+ cookie?: never;
1147
+ };
1148
+ requestBody: {
1149
+ content: {
1150
+ "application/json": components["schemas"]["WorkItem"];
1151
+ };
1152
+ };
1153
+ responses: {
1154
+ /** @description The request has succeeded. */
1155
+ 200: {
1156
+ headers: {
1157
+ [name: string]: unknown;
1158
+ };
1159
+ content: {
1160
+ "application/json": components["schemas"]["RunView"];
1161
+ };
1162
+ };
1163
+ /** @description The request has succeeded and a new resource has been created as a result. */
1164
+ 201: {
1165
+ headers: {
1166
+ [name: string]: unknown;
1167
+ };
1168
+ content: {
1169
+ "application/json": components["schemas"]["RunView"];
1170
+ };
1171
+ };
1172
+ /** @description The server could not understand the request due to invalid syntax. */
1173
+ 400: {
1174
+ headers: {
1175
+ [name: string]: unknown;
1176
+ };
1177
+ content: {
1178
+ "application/problem+json": components["schemas"]["ApiProblem"];
1179
+ };
1180
+ };
1181
+ /** @description Access is unauthorized. */
1182
+ 401: {
1183
+ headers: {
1184
+ [name: string]: unknown;
1185
+ };
1186
+ content: {
1187
+ "application/problem+json": components["schemas"]["ApiProblem"];
1188
+ };
1189
+ };
1190
+ };
1191
+ };
1192
+ ForemanApi_getRun: {
1193
+ parameters: {
1194
+ query?: never;
1195
+ header?: never;
1196
+ path: {
1197
+ runId: string;
1198
+ };
1199
+ cookie?: never;
1200
+ };
1201
+ requestBody?: never;
1202
+ responses: {
1203
+ /** @description The request has succeeded. */
1204
+ 200: {
1205
+ headers: {
1206
+ [name: string]: unknown;
1207
+ };
1208
+ content: {
1209
+ "application/json": components["schemas"]["RunView"];
1210
+ };
1211
+ };
1212
+ /** @description Access is unauthorized. */
1213
+ 401: {
1214
+ headers: {
1215
+ [name: string]: unknown;
1216
+ };
1217
+ content: {
1218
+ "application/problem+json": components["schemas"]["ApiProblem"];
1219
+ };
1220
+ };
1221
+ /** @description The server cannot find the requested resource. */
1222
+ 404: {
1223
+ headers: {
1224
+ [name: string]: unknown;
1225
+ };
1226
+ content: {
1227
+ "application/problem+json": components["schemas"]["ApiProblem"];
1228
+ };
1229
+ };
1230
+ };
1231
+ };
1232
+ ForemanApi_signalRun: {
1233
+ parameters: {
1234
+ query?: never;
1235
+ header?: never;
1236
+ path: {
1237
+ runId: string;
1238
+ };
1239
+ cookie?: never;
1240
+ };
1241
+ requestBody: {
1242
+ content: {
1243
+ "application/json": components["schemas"]["RunSignal"];
1244
+ };
1245
+ };
1246
+ responses: {
1247
+ /** @description The request has been accepted for processing, but processing has not yet completed. */
1248
+ 202: {
1249
+ headers: {
1250
+ [name: string]: unknown;
1251
+ };
1252
+ content: {
1253
+ "application/json": components["schemas"]["RunView"];
1254
+ };
1255
+ };
1256
+ /** @description The server could not understand the request due to invalid syntax. */
1257
+ 400: {
1258
+ headers: {
1259
+ [name: string]: unknown;
1260
+ };
1261
+ content: {
1262
+ "application/problem+json": components["schemas"]["ApiProblem"];
1263
+ };
1264
+ };
1265
+ /** @description Access is unauthorized. */
1266
+ 401: {
1267
+ headers: {
1268
+ [name: string]: unknown;
1269
+ };
1270
+ content: {
1271
+ "application/problem+json": components["schemas"]["ApiProblem"];
1272
+ };
1273
+ };
1274
+ /** @description The server cannot find the requested resource. */
1275
+ 404: {
1276
+ headers: {
1277
+ [name: string]: unknown;
1278
+ };
1279
+ content: {
1280
+ "application/problem+json": components["schemas"]["ApiProblem"];
1281
+ };
1282
+ };
1283
+ /** @description The request conflicts with the current state of the server. */
1284
+ 409: {
1285
+ headers: {
1286
+ [name: string]: unknown;
1287
+ };
1288
+ content: {
1289
+ "application/problem+json": components["schemas"]["ApiProblem"];
1290
+ };
1291
+ };
1292
+ };
1293
+ };
1294
+ IntakeApi_findWorkItem: {
1295
+ parameters: {
1296
+ query: {
1297
+ dedupeKey: string;
1298
+ };
1299
+ header?: never;
1300
+ path?: never;
1301
+ cookie?: never;
1302
+ };
1303
+ requestBody?: never;
1304
+ responses: {
1305
+ /** @description The request has succeeded. */
1306
+ 200: {
1307
+ headers: {
1308
+ [name: string]: unknown;
1309
+ };
1310
+ content: {
1311
+ "application/json": components["schemas"]["WorkItemView"];
1312
+ };
1313
+ };
1314
+ /** @description The server could not understand the request due to invalid syntax. */
1315
+ 400: {
1316
+ headers: {
1317
+ [name: string]: unknown;
1318
+ };
1319
+ content: {
1320
+ "application/problem+json": components["schemas"]["ApiProblem"];
1321
+ };
1322
+ };
1323
+ /** @description Access is unauthorized. */
1324
+ 401: {
1325
+ headers: {
1326
+ [name: string]: unknown;
1327
+ };
1328
+ content: {
1329
+ "application/problem+json": components["schemas"]["ApiProblem"];
1330
+ };
1331
+ };
1332
+ /** @description The server cannot find the requested resource. */
1333
+ 404: {
1334
+ headers: {
1335
+ [name: string]: unknown;
1336
+ };
1337
+ content: {
1338
+ "application/problem+json": components["schemas"]["ApiProblem"];
1339
+ };
1340
+ };
1341
+ };
1342
+ };
1343
+ IntakeApi_submitWork: {
1344
+ parameters: {
1345
+ query?: never;
1346
+ header?: never;
1347
+ path?: never;
1348
+ cookie?: never;
1349
+ };
1350
+ requestBody: {
1351
+ content: {
1352
+ "application/json": components["schemas"]["WorkSubmission"];
1353
+ };
1354
+ };
1355
+ responses: {
1356
+ /** @description The request has succeeded. */
1357
+ 200: {
1358
+ headers: {
1359
+ [name: string]: unknown;
1360
+ };
1361
+ content: {
1362
+ "application/json": components["schemas"]["WorkItemView"];
1363
+ };
1364
+ };
1365
+ /** @description The request has succeeded and a new resource has been created as a result. */
1366
+ 201: {
1367
+ headers: {
1368
+ [name: string]: unknown;
1369
+ };
1370
+ content: {
1371
+ "application/json": components["schemas"]["WorkItemView"];
1372
+ };
1373
+ };
1374
+ /** @description The server could not understand the request due to invalid syntax. */
1375
+ 400: {
1376
+ headers: {
1377
+ [name: string]: unknown;
1378
+ };
1379
+ content: {
1380
+ "application/problem+json": components["schemas"]["ApiProblem"];
1381
+ };
1382
+ };
1383
+ /** @description Access is unauthorized. */
1384
+ 401: {
1385
+ headers: {
1386
+ [name: string]: unknown;
1387
+ };
1388
+ content: {
1389
+ "application/problem+json": components["schemas"]["ApiProblem"];
1390
+ };
1391
+ };
1392
+ };
1393
+ };
1394
+ IntakeApi_getWorkItem: {
1395
+ parameters: {
1396
+ query?: never;
1397
+ header?: never;
1398
+ path: {
1399
+ workItemId: string;
1400
+ };
1401
+ cookie?: never;
1402
+ };
1403
+ requestBody?: never;
1404
+ responses: {
1405
+ /** @description The request has succeeded. */
1406
+ 200: {
1407
+ headers: {
1408
+ [name: string]: unknown;
1409
+ };
1410
+ content: {
1411
+ "application/json": components["schemas"]["WorkItemView"];
1412
+ };
1413
+ };
1414
+ /** @description Access is unauthorized. */
1415
+ 401: {
1416
+ headers: {
1417
+ [name: string]: unknown;
1418
+ };
1419
+ content: {
1420
+ "application/problem+json": components["schemas"]["ApiProblem"];
1421
+ };
1422
+ };
1423
+ /** @description The server cannot find the requested resource. */
1424
+ 404: {
1425
+ headers: {
1426
+ [name: string]: unknown;
1427
+ };
1428
+ content: {
1429
+ "application/problem+json": components["schemas"]["ApiProblem"];
1430
+ };
1431
+ };
1432
+ };
1433
+ };
892
1434
  }
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export type RunRecord = Schemas["RunRecord"];
11
11
  export type EvidenceManifest = Schemas["EvidenceManifest"];
12
12
  export type Score = Schemas["Score"];
13
13
  export type WorkReceived = Schemas["WorkReceived"];
14
+ export type RunStarted = Schemas["RunStarted"];
14
15
  export type RunCompleted = Schemas["RunCompleted"];
15
16
  export type GateRequested = Schemas["GateRequested"];
16
17
  export type GateDecided = Schemas["GateDecided"];
@@ -18,10 +19,17 @@ export type ScoreRecorded = Schemas["ScoreRecorded"];
18
19
  export type PrOpened = Schemas["PrOpened"];
19
20
  export type PrReviewed = Schemas["PrReviewed"];
20
21
  export type PrClosed = Schemas["PrClosed"];
22
+ export type IssueLabeled = Schemas["IssueLabeled"];
21
23
  export type GateRecord = Schemas["GateRecord"];
22
24
  export type GateRequest = Schemas["GateRequest"];
23
25
  export type GateView = Schemas["GateView"];
24
26
  export type ApiProblem = Schemas["ApiProblem"];
27
+ export type WorkSubmission = Schemas["WorkSubmission"];
28
+ export type WorkItemView = Schemas["WorkItemView"];
29
+ export type WorkRequest = Schemas["WorkRequest"];
30
+ export type RunView = Schemas["RunView"];
31
+ export type StageView = Schemas["StageView"];
32
+ export type RunSignal = Schemas["RunSignal"];
25
33
  export type SandboxSpec = Schemas["SandboxSpec"];
26
34
  /** One reason a document does not match its format. `path` is a JSON Pointer into the document. */
27
35
  export interface Problem {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,OAAO,EAAE,EAA2C,MAAM,kBAAkB,CAAC;AACpF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAe,WAAW,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,IAAI,IAAI,eAAe,EAAe,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,OAAO,EAAe,WAAW,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAqC,QAAQ,EAAuB,MAAM,iBAAiB,CAAC;AA4BnG,gGAAgG;AAChG,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AACjE,MAAM,UAAU,GAAG,IAAI,GAAG,EAA4B,CAAC;AAEvD,gFAAgF;AAChF,MAAM,UAAU,QA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