@opensoftware/contracts 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +105 -2
- package/dist/breaking.d.ts +27 -0
- package/dist/breaking.js +156 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +68 -0
- package/dist/formats.d.ts +10 -0
- package/dist/formats.js +18 -0
- package/dist/generated/types.d.ts +543 -0
- package/dist/generated/types.js +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +73 -0
- package/dist/roundtrip.d.ts +3 -0
- package/dist/roundtrip.js +89 -0
- package/events/asyncapi.yaml +144 -0
- package/events/gate-decided/gate-decided.schema.json +122 -0
- package/events/gate-requested/gate-requested.schema.json +135 -0
- package/events/pr-opened/pr-opened.schema.json +138 -0
- package/events/run-completed/run-completed.schema.json +163 -0
- package/events/score-recorded/score-recorded.schema.json +163 -0
- package/events/work-received/work-received.schema.json +182 -0
- package/evidence-bundle/evidence-bundle.schema.json +180 -0
- package/factory-definition/factory-definition.schema.json +371 -0
- package/openapi/openapi.json +1553 -0
- package/package.json +50 -3
- package/run-record/run-record.schema.json +179 -0
- package/score/score.schema.json +110 -0
- package/typespec/common.tsp +62 -0
- package/typespec/events.tsp +134 -0
- package/typespec/evidence-bundle.tsp +99 -0
- package/typespec/factory-definition.tsp +193 -0
- package/typespec/main.tsp +10 -0
- package/typespec/run-record.tsp +88 -0
- package/typespec/score.tsp +68 -0
- package/typespec/work-item.tsp +65 -0
- package/work-item/work-item.schema.json +129 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/events/run-completed/run-completed.schema.json",
|
|
4
|
+
"title": "RunCompleted",
|
|
5
|
+
"$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"specversion": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"const": "1.0"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 128,
|
|
16
|
+
"description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
|
|
17
|
+
},
|
|
18
|
+
"source": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "The producing module, for example \"/osf/intake\"."
|
|
22
|
+
},
|
|
23
|
+
"type": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"const": "run.completed@v1"
|
|
26
|
+
},
|
|
27
|
+
"time": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "date-time"
|
|
30
|
+
},
|
|
31
|
+
"subject": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
|
|
34
|
+
},
|
|
35
|
+
"datacontenttype": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"const": "application/json"
|
|
38
|
+
},
|
|
39
|
+
"dataschema": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": "uri"
|
|
42
|
+
},
|
|
43
|
+
"traceparent": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "W3C trace context (CloudEvents distributed tracing extension)."
|
|
46
|
+
},
|
|
47
|
+
"data": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"runId": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1,
|
|
53
|
+
"maxLength": 128,
|
|
54
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
55
|
+
},
|
|
56
|
+
"workItemId": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"maxLength": 128,
|
|
60
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
61
|
+
},
|
|
62
|
+
"stage": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
65
|
+
"description": "A lowercase name: letters, digits and hyphens, starting with a letter. Agents, stages, adapters, sources."
|
|
66
|
+
},
|
|
67
|
+
"factoryVersion": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^[0-9a-f]{7,40}$",
|
|
70
|
+
"description": "A Git commit hash, abbreviated (7+) or full. The factory version is the commit of the factory definition."
|
|
71
|
+
},
|
|
72
|
+
"outcome": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"enum": [
|
|
75
|
+
"succeeded",
|
|
76
|
+
"failed",
|
|
77
|
+
"cancelled"
|
|
78
|
+
],
|
|
79
|
+
"description": "How a run ended."
|
|
80
|
+
},
|
|
81
|
+
"startedAt": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"format": "date-time"
|
|
84
|
+
},
|
|
85
|
+
"endedAt": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"format": "date-time"
|
|
88
|
+
},
|
|
89
|
+
"requester": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"kind": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"enum": [
|
|
95
|
+
"person",
|
|
96
|
+
"trigger"
|
|
97
|
+
],
|
|
98
|
+
"description": "Who caused something: a person, or an automated trigger such as a cron rule or an alert."
|
|
99
|
+
},
|
|
100
|
+
"id": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1,
|
|
103
|
+
"description": "Stable ID in the source system, prefixed with the source, for example \"slack:U024BE7LH\"."
|
|
104
|
+
},
|
|
105
|
+
"displayName": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "Shown to people, for example \"Varun\"."
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": [
|
|
111
|
+
"kind",
|
|
112
|
+
"id"
|
|
113
|
+
],
|
|
114
|
+
"description": "A person or trigger. RUNTIME-008: every run is attributed to one."
|
|
115
|
+
},
|
|
116
|
+
"source": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
119
|
+
"description": "A lowercase name: letters, digits and hyphens, starting with a letter. Agents, stages, adapters, sources."
|
|
120
|
+
},
|
|
121
|
+
"costUsd": {
|
|
122
|
+
"type": "number",
|
|
123
|
+
"minimum": 0
|
|
124
|
+
},
|
|
125
|
+
"traceId": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"pattern": "^[0-9a-f]{32}$",
|
|
128
|
+
"description": "An OpenTelemetry trace ID: 32 lowercase hex characters."
|
|
129
|
+
},
|
|
130
|
+
"pullRequests": {
|
|
131
|
+
"type": "array",
|
|
132
|
+
"items": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"format": "uri"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"evidenceBundle": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"format": "uri"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"runId",
|
|
144
|
+
"workItemId",
|
|
145
|
+
"factoryVersion",
|
|
146
|
+
"outcome",
|
|
147
|
+
"startedAt",
|
|
148
|
+
"endedAt",
|
|
149
|
+
"requester",
|
|
150
|
+
"source"
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": [
|
|
155
|
+
"specversion",
|
|
156
|
+
"id",
|
|
157
|
+
"source",
|
|
158
|
+
"type",
|
|
159
|
+
"time",
|
|
160
|
+
"data"
|
|
161
|
+
],
|
|
162
|
+
"description": "foreman: a run ended."
|
|
163
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/events/score-recorded/score-recorded.schema.json",
|
|
4
|
+
"title": "ScoreRecorded",
|
|
5
|
+
"$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"specversion": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"const": "1.0"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 128,
|
|
16
|
+
"description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
|
|
17
|
+
},
|
|
18
|
+
"source": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "The producing module, for example \"/osf/intake\"."
|
|
22
|
+
},
|
|
23
|
+
"type": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"const": "score.recorded@v1"
|
|
26
|
+
},
|
|
27
|
+
"time": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "date-time"
|
|
30
|
+
},
|
|
31
|
+
"subject": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
|
|
34
|
+
},
|
|
35
|
+
"datacontenttype": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"const": "application/json"
|
|
38
|
+
},
|
|
39
|
+
"dataschema": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": "uri"
|
|
42
|
+
},
|
|
43
|
+
"traceparent": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "W3C trace context (CloudEvents distributed tracing extension)."
|
|
46
|
+
},
|
|
47
|
+
"data": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"id": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1,
|
|
53
|
+
"maxLength": 128,
|
|
54
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
55
|
+
},
|
|
56
|
+
"name": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"description": "Scorer name, for example \"redundant-tests\"."
|
|
60
|
+
},
|
|
61
|
+
"value": {
|
|
62
|
+
"anyOf": [
|
|
63
|
+
{
|
|
64
|
+
"type": "number"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"description": "A number for NUMERIC, 0 or 1 for BOOLEAN, a string for CATEGORICAL."
|
|
71
|
+
},
|
|
72
|
+
"dataType": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"enum": [
|
|
75
|
+
"NUMERIC",
|
|
76
|
+
"BOOLEAN",
|
|
77
|
+
"CATEGORICAL"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"traceId": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"pattern": "^[0-9a-f]{32}$",
|
|
83
|
+
"description": "Trace of the run (the OTel trace ID)."
|
|
84
|
+
},
|
|
85
|
+
"observationId": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "Span the score is about, when it is not the whole run."
|
|
88
|
+
},
|
|
89
|
+
"sessionId": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
"comment": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "The reason."
|
|
95
|
+
},
|
|
96
|
+
"timestamp": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"format": "date-time"
|
|
99
|
+
},
|
|
100
|
+
"source": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"enum": [
|
|
103
|
+
"API",
|
|
104
|
+
"ANNOTATION"
|
|
105
|
+
],
|
|
106
|
+
"description": "API for scorers, ANNOTATION for scores a person reviews."
|
|
107
|
+
},
|
|
108
|
+
"configId": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"environment": {
|
|
112
|
+
"type": "string"
|
|
113
|
+
},
|
|
114
|
+
"metadata": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"osf.run.id": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"minLength": 1,
|
|
120
|
+
"maxLength": 128,
|
|
121
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
122
|
+
},
|
|
123
|
+
"osf.scorer.version": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
"osf.judge.model": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "Judge model of an LLM scorer."
|
|
129
|
+
},
|
|
130
|
+
"osf.judge.cost.usd": {
|
|
131
|
+
"type": "number",
|
|
132
|
+
"minimum": 0,
|
|
133
|
+
"description": "Cost of the judge call."
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"required": [
|
|
137
|
+
"osf.run.id"
|
|
138
|
+
],
|
|
139
|
+
"unevaluatedProperties": {}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"id",
|
|
144
|
+
"name",
|
|
145
|
+
"value",
|
|
146
|
+
"dataType",
|
|
147
|
+
"traceId",
|
|
148
|
+
"timestamp",
|
|
149
|
+
"metadata"
|
|
150
|
+
],
|
|
151
|
+
"description": "The result of one scorer on one run. The fields are a subset of Langfuse's create-score request\n(POST /api/public/scores), so a score can be sent to Langfuse as is. Factory fields live in `metadata`."
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": [
|
|
155
|
+
"specversion",
|
|
156
|
+
"id",
|
|
157
|
+
"source",
|
|
158
|
+
"type",
|
|
159
|
+
"time",
|
|
160
|
+
"data"
|
|
161
|
+
],
|
|
162
|
+
"description": "scorekit: a scorer scored a run."
|
|
163
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/events/work-received/work-received.schema.json",
|
|
4
|
+
"title": "WorkReceived",
|
|
5
|
+
"$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"specversion": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"const": "1.0"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 128,
|
|
16
|
+
"description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
|
|
17
|
+
},
|
|
18
|
+
"source": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "The producing module, for example \"/osf/intake\"."
|
|
22
|
+
},
|
|
23
|
+
"type": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"const": "work.received@v1"
|
|
26
|
+
},
|
|
27
|
+
"time": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "date-time"
|
|
30
|
+
},
|
|
31
|
+
"subject": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
|
|
34
|
+
},
|
|
35
|
+
"datacontenttype": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"const": "application/json"
|
|
38
|
+
},
|
|
39
|
+
"dataschema": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": "uri"
|
|
42
|
+
},
|
|
43
|
+
"traceparent": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "W3C trace context (CloudEvents distributed tracing extension)."
|
|
46
|
+
},
|
|
47
|
+
"data": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"id": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1,
|
|
53
|
+
"maxLength": 128,
|
|
54
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
55
|
+
},
|
|
56
|
+
"type": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"enum": [
|
|
59
|
+
"idea",
|
|
60
|
+
"bug",
|
|
61
|
+
"task",
|
|
62
|
+
"automation"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"title": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"minLength": 1,
|
|
68
|
+
"maxLength": 300
|
|
69
|
+
},
|
|
70
|
+
"description": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"requester": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {
|
|
76
|
+
"kind": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"enum": [
|
|
79
|
+
"person",
|
|
80
|
+
"trigger"
|
|
81
|
+
],
|
|
82
|
+
"description": "Who caused something: a person, or an automated trigger such as a cron rule or an alert."
|
|
83
|
+
},
|
|
84
|
+
"id": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"description": "Stable ID in the source system, prefixed with the source, for example \"slack:U024BE7LH\"."
|
|
88
|
+
},
|
|
89
|
+
"displayName": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "Shown to people, for example \"Varun\"."
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"required": [
|
|
95
|
+
"kind",
|
|
96
|
+
"id"
|
|
97
|
+
],
|
|
98
|
+
"description": "The person or trigger that asked for the work."
|
|
99
|
+
},
|
|
100
|
+
"origin": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"source": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
106
|
+
"description": "The channel or system, for example \"slack\", \"github\", \"sentry\", \"cron\", \"mcp\"."
|
|
107
|
+
},
|
|
108
|
+
"url": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"format": "uri",
|
|
111
|
+
"description": "Link back to the origin, for example the Slack thread. Absent for a schedule."
|
|
112
|
+
},
|
|
113
|
+
"externalId": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "ID in the source system."
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": [
|
|
119
|
+
"source"
|
|
120
|
+
],
|
|
121
|
+
"description": "Where the work came from."
|
|
122
|
+
},
|
|
123
|
+
"dedupeKey": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"minLength": 1,
|
|
126
|
+
"description": "Requests with the same key become one work item, for example \"github:acme/web#42\"."
|
|
127
|
+
},
|
|
128
|
+
"surface": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"description": "Product surface the work is about, for example \"checkout\"."
|
|
131
|
+
},
|
|
132
|
+
"priority": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"enum": [
|
|
135
|
+
"urgent",
|
|
136
|
+
"high",
|
|
137
|
+
"normal",
|
|
138
|
+
"low"
|
|
139
|
+
],
|
|
140
|
+
"description": "Set by triage."
|
|
141
|
+
},
|
|
142
|
+
"links": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"items": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"url": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"format": "uri"
|
|
150
|
+
},
|
|
151
|
+
"title": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"required": [
|
|
156
|
+
"url"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"description": "Related material: an error report, a change, a document."
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"required": [
|
|
163
|
+
"id",
|
|
164
|
+
"type",
|
|
165
|
+
"title",
|
|
166
|
+
"requester",
|
|
167
|
+
"origin",
|
|
168
|
+
"dedupeKey"
|
|
169
|
+
],
|
|
170
|
+
"description": "One unit of requested work: the `data` of a `work.received@v1` CloudEvent."
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"required": [
|
|
174
|
+
"specversion",
|
|
175
|
+
"id",
|
|
176
|
+
"source",
|
|
177
|
+
"type",
|
|
178
|
+
"time",
|
|
179
|
+
"data"
|
|
180
|
+
],
|
|
181
|
+
"description": "intake: a work item was accepted."
|
|
182
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/evidence-bundle/evidence-bundle.schema.json",
|
|
4
|
+
"title": "EvidenceManifest",
|
|
5
|
+
"$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"manifestVersion": {
|
|
9
|
+
"type": "integer",
|
|
10
|
+
"minimum": 1,
|
|
11
|
+
"maximum": 2147483647,
|
|
12
|
+
"description": "Version of this format.",
|
|
13
|
+
"const": 1
|
|
14
|
+
},
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1,
|
|
18
|
+
"maxLength": 128,
|
|
19
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
20
|
+
},
|
|
21
|
+
"createdAt": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"format": "date-time"
|
|
24
|
+
},
|
|
25
|
+
"subject": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"format": "uri"
|
|
31
|
+
},
|
|
32
|
+
"commit": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[0-9a-f]{7,40}$",
|
|
35
|
+
"description": "A Git commit hash, abbreviated (7+) or full. The factory version is the commit of the factory definition."
|
|
36
|
+
},
|
|
37
|
+
"pullRequest": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"format": "uri"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"repository",
|
|
44
|
+
"commit"
|
|
45
|
+
],
|
|
46
|
+
"description": "The change that was verified."
|
|
47
|
+
},
|
|
48
|
+
"runId": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 1,
|
|
51
|
+
"maxLength": 128,
|
|
52
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
53
|
+
},
|
|
54
|
+
"workItemId": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 128,
|
|
58
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
59
|
+
},
|
|
60
|
+
"producer": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"name": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1
|
|
66
|
+
},
|
|
67
|
+
"version": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": [
|
|
73
|
+
"name",
|
|
74
|
+
"version"
|
|
75
|
+
],
|
|
76
|
+
"description": "The tool that wrote the bundle, for example proof 1.2.0."
|
|
77
|
+
},
|
|
78
|
+
"result": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": [
|
|
81
|
+
"passed",
|
|
82
|
+
"failed"
|
|
83
|
+
],
|
|
84
|
+
"description": "Passed only when every scenario passed."
|
|
85
|
+
},
|
|
86
|
+
"scenarios": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"properties": {
|
|
91
|
+
"id": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"pattern": "^SCN-[A-Z][A-Z0-9]*(-[A-Z][A-Z0-9]*)*-[0-9]{3}$",
|
|
94
|
+
"description": "A scenario ID as checked by SPEC, for example SCN-PROOF-004."
|
|
95
|
+
},
|
|
96
|
+
"result": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"enum": [
|
|
99
|
+
"passed",
|
|
100
|
+
"failed",
|
|
101
|
+
"skipped"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"artifacts": {
|
|
105
|
+
"type": "array",
|
|
106
|
+
"items": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"pattern": "^(?!/)(?!.*(^|/)\\.\\.(/|$))[^\\\\]+$",
|
|
109
|
+
"description": "A path inside the bundle: relative, forward slashes, no \"..\"."
|
|
110
|
+
},
|
|
111
|
+
"description": "Paths of the artifacts in this bundle that prove the scenario."
|
|
112
|
+
},
|
|
113
|
+
"summary": {
|
|
114
|
+
"type": "string"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"required": [
|
|
118
|
+
"id",
|
|
119
|
+
"result",
|
|
120
|
+
"artifacts"
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"artifacts": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"items": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"properties": {
|
|
129
|
+
"path": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"pattern": "^(?!/)(?!.*(^|/)\\.\\.(/|$))[^\\\\]+$",
|
|
132
|
+
"description": "A path inside the bundle: relative, forward slashes, no \"..\"."
|
|
133
|
+
},
|
|
134
|
+
"kind": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"enum": [
|
|
137
|
+
"screenshot",
|
|
138
|
+
"video",
|
|
139
|
+
"playwright-trace",
|
|
140
|
+
"junit",
|
|
141
|
+
"log",
|
|
142
|
+
"report",
|
|
143
|
+
"other"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"mediaType": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"minLength": 1,
|
|
149
|
+
"description": "IANA media type, for example \"image/png\"."
|
|
150
|
+
},
|
|
151
|
+
"sha256": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
154
|
+
},
|
|
155
|
+
"bytes": {
|
|
156
|
+
"type": "integer",
|
|
157
|
+
"minimum": 0
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"required": [
|
|
161
|
+
"path",
|
|
162
|
+
"kind",
|
|
163
|
+
"mediaType",
|
|
164
|
+
"sha256"
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": [
|
|
170
|
+
"manifestVersion",
|
|
171
|
+
"id",
|
|
172
|
+
"createdAt",
|
|
173
|
+
"subject",
|
|
174
|
+
"producer",
|
|
175
|
+
"result",
|
|
176
|
+
"scenarios",
|
|
177
|
+
"artifacts"
|
|
178
|
+
],
|
|
179
|
+
"description": "`evidence.json` at the root of an evidence bundle: what was verified, against which scenario IDs, with which\nartifacts and result (P10)."
|
|
180
|
+
}
|