@opensoftware/contracts 0.0.0-stage → 1.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/LICENSE +202 -0
- package/README.md +112 -2
- package/dist/breaking.d.ts +27 -0
- package/dist/breaking.js +157 -0
- package/dist/breaking.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +69 -0
- package/dist/cli.js.map +1 -0
- package/dist/formats.d.ts +10 -0
- package/dist/formats.js +21 -0
- package/dist/formats.js.map +1 -0
- package/dist/generated/types.d.ts +636 -0
- package/dist/generated/types.js +2 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -0
- package/dist/roundtrip.d.ts +3 -0
- package/dist/roundtrip.js +90 -0
- package/dist/roundtrip.js.map +1 -0
- package/dist/run-record.d.ts +18 -0
- package/dist/run-record.js +27 -0
- package/dist/run-record.js.map +1 -0
- package/events/asyncapi.yaml +186 -0
- package/events/gate-decided/gate-decided.schema.json +122 -0
- package/events/gate-requested/gate-requested.schema.json +135 -0
- package/events/pr-closed/pr-closed.schema.json +80 -0
- package/events/pr-opened/pr-opened.schema.json +138 -0
- package/events/pr-reviewed/pr-reviewed.schema.json +111 -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 +1715 -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 +168 -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,371 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/factory-definition/factory-definition.schema.json",
|
|
4
|
+
"title": "FactoryDefinition",
|
|
5
|
+
"$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Editors may point at this schema. Ignored by every tool."
|
|
11
|
+
},
|
|
12
|
+
"version": {
|
|
13
|
+
"type": "integer",
|
|
14
|
+
"minimum": 1,
|
|
15
|
+
"maximum": 2147483647,
|
|
16
|
+
"description": "Version of this format. A new major version of the format gets a new value.",
|
|
17
|
+
"const": 1
|
|
18
|
+
},
|
|
19
|
+
"factory": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
22
|
+
"description": "Name of the factory."
|
|
23
|
+
},
|
|
24
|
+
"description": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"providers": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"harness": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {},
|
|
33
|
+
"unevaluatedProperties": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"description": "A semver range of an adapter, for example \"^2\"."
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"sandbox": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {},
|
|
42
|
+
"unevaluatedProperties": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1,
|
|
45
|
+
"description": "A semver range of an adapter, for example \"^2\"."
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"channel": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {},
|
|
51
|
+
"unevaluatedProperties": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"minLength": 1,
|
|
54
|
+
"description": "A semver range of an adapter, for example \"^2\"."
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"tracker": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {},
|
|
60
|
+
"unevaluatedProperties": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1,
|
|
63
|
+
"description": "A semver range of an adapter, for example \"^2\"."
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"forge": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {},
|
|
69
|
+
"unevaluatedProperties": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"description": "A semver range of an adapter, for example \"^2\"."
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"inference": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"properties": {},
|
|
78
|
+
"unevaluatedProperties": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"minLength": 1,
|
|
81
|
+
"description": "A semver range of an adapter, for example \"^2\"."
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"secrets": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {},
|
|
87
|
+
"unevaluatedProperties": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"minLength": 1,
|
|
90
|
+
"description": "A semver range of an adapter, for example \"^2\"."
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"telemetry": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {},
|
|
96
|
+
"unevaluatedProperties": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"description": "A semver range of an adapter, for example \"^2\"."
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"policy": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {},
|
|
105
|
+
"unevaluatedProperties": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minLength": 1,
|
|
108
|
+
"description": "A semver range of an adapter, for example \"^2\"."
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"description": "Adapters per port with a version range, pinned in `factory.lock` by `factory plan`.",
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
},
|
|
115
|
+
"agents": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {},
|
|
118
|
+
"unevaluatedProperties": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"properties": {
|
|
121
|
+
"description": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
"harness": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
127
|
+
"description": "Harness adapter, declared under `providers.harness`, for example \"claude-code\"."
|
|
128
|
+
},
|
|
129
|
+
"model": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"minLength": 1,
|
|
132
|
+
"description": "A model ID or a routing alias of the inference gateway, for example \"routes/triage\"."
|
|
133
|
+
},
|
|
134
|
+
"prompt": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"minLength": 1,
|
|
137
|
+
"description": "Path to the Markdown prompt."
|
|
138
|
+
},
|
|
139
|
+
"repositories": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"items": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"description": "Repositories the agent operates on, as clone URLs or \"<owner>/<name>\"."
|
|
145
|
+
},
|
|
146
|
+
"mcp": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": {
|
|
149
|
+
"type": "string"
|
|
150
|
+
},
|
|
151
|
+
"description": "MCP servers: `registry:<name>@<version>` or `<name>@<version>`."
|
|
152
|
+
},
|
|
153
|
+
"skills": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "string"
|
|
157
|
+
},
|
|
158
|
+
"description": "Paths to skill folders."
|
|
159
|
+
},
|
|
160
|
+
"secrets": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"items": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"pattern": "^ref:[a-z][a-z0-9-]*/[A-Za-z0-9_./-]+$",
|
|
165
|
+
"description": "A reference to a secret, resolved at the egress proxy, never in the sandbox: \"ref:<provider>/<name>\"."
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"sandbox": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"properties": {
|
|
171
|
+
"template": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"minLength": 1,
|
|
174
|
+
"description": "Sandbox template name, for example \"node-24\"."
|
|
175
|
+
},
|
|
176
|
+
"cpu": {
|
|
177
|
+
"type": "number",
|
|
178
|
+
"minimum": 0.001,
|
|
179
|
+
"description": "CPU cores. The smallest unit is 0.001 (one millicore)."
|
|
180
|
+
},
|
|
181
|
+
"memory": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"pattern": "^[0-9]+(Ki|Mi|Gi|Ti)?$",
|
|
184
|
+
"description": "Kubernetes quantity, for example \"8Gi\"."
|
|
185
|
+
},
|
|
186
|
+
"egress": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"description": "Hostnames the sandbox may reach. Everything else is blocked."
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"required": [
|
|
195
|
+
"template"
|
|
196
|
+
],
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"description": "Runtime of the agent."
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"required": [
|
|
202
|
+
"harness",
|
|
203
|
+
"model",
|
|
204
|
+
"prompt"
|
|
205
|
+
],
|
|
206
|
+
"additionalProperties": false
|
|
207
|
+
},
|
|
208
|
+
"minProperties": 1,
|
|
209
|
+
"description": "Agents by name."
|
|
210
|
+
},
|
|
211
|
+
"workflow": {
|
|
212
|
+
"type": "array",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"properties": {
|
|
216
|
+
"stage": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
219
|
+
"description": "A lowercase name: letters, digits and hyphens, starting with a letter. Agents, stages, adapters, sources."
|
|
220
|
+
},
|
|
221
|
+
"agent": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
224
|
+
"description": "Agent that runs the stage. Defaults to the agent with the stage's name."
|
|
225
|
+
},
|
|
226
|
+
"gate": {
|
|
227
|
+
"type": "object",
|
|
228
|
+
"properties": {
|
|
229
|
+
"policy": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"minLength": 1,
|
|
232
|
+
"description": "Path to the Rego policy that decides or picks the approvers."
|
|
233
|
+
},
|
|
234
|
+
"approvers": {
|
|
235
|
+
"type": "array",
|
|
236
|
+
"items": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
239
|
+
"description": "A lowercase name: letters, digits and hyphens, starting with a letter. Agents, stages, adapters, sources."
|
|
240
|
+
},
|
|
241
|
+
"description": "Approver groups. The policy may narrow them."
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"required": [
|
|
245
|
+
"policy"
|
|
246
|
+
],
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"description": "The stage waits for a decision before it starts."
|
|
249
|
+
},
|
|
250
|
+
"evidence": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"enum": [
|
|
253
|
+
"required",
|
|
254
|
+
"optional"
|
|
255
|
+
],
|
|
256
|
+
"description": "Whether the stage must produce an evidence bundle."
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"required": [
|
|
260
|
+
"stage"
|
|
261
|
+
],
|
|
262
|
+
"additionalProperties": false
|
|
263
|
+
},
|
|
264
|
+
"description": "Stages in order. Each stage runs one agent; the agent defaults to the stage name."
|
|
265
|
+
},
|
|
266
|
+
"automations": {
|
|
267
|
+
"type": "array",
|
|
268
|
+
"items": {
|
|
269
|
+
"type": "object",
|
|
270
|
+
"properties": {
|
|
271
|
+
"on": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"minLength": 1,
|
|
274
|
+
"description": "Event filter, for example \"github.issue.labeled(auto-implement)\" or \"sentry.fatal\"."
|
|
275
|
+
},
|
|
276
|
+
"cron": {
|
|
277
|
+
"type": "string",
|
|
278
|
+
"minLength": 1,
|
|
279
|
+
"description": "Five-field cron expression in UTC."
|
|
280
|
+
},
|
|
281
|
+
"run": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
284
|
+
"description": "Job to run. Required with `cron`; without it an event starts the workflow."
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"description": "Starts the workflow, or the named job, on an event (`on`) or a schedule (`cron`). Exactly one of the two; a\nschedule names its job. One model rather than a union, so every generated client reads it without guessing.",
|
|
288
|
+
"oneOf": [
|
|
289
|
+
{
|
|
290
|
+
"required": [
|
|
291
|
+
"on"
|
|
292
|
+
],
|
|
293
|
+
"not": {
|
|
294
|
+
"required": [
|
|
295
|
+
"cron"
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"required": [
|
|
301
|
+
"cron",
|
|
302
|
+
"run"
|
|
303
|
+
],
|
|
304
|
+
"not": {
|
|
305
|
+
"required": [
|
|
306
|
+
"on"
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"additionalProperties": false
|
|
312
|
+
},
|
|
313
|
+
"description": "What starts work without a person asking."
|
|
314
|
+
},
|
|
315
|
+
"scorers": {
|
|
316
|
+
"type": "object",
|
|
317
|
+
"properties": {},
|
|
318
|
+
"unevaluatedProperties": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"properties": {
|
|
321
|
+
"judge": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"minLength": 1,
|
|
324
|
+
"description": "Path to the Markdown judge prompt."
|
|
325
|
+
},
|
|
326
|
+
"sample": {
|
|
327
|
+
"type": "number",
|
|
328
|
+
"minimum": 0,
|
|
329
|
+
"maximum": 1,
|
|
330
|
+
"description": "Share of runs to score, 0 to 1. Default 1."
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"required": [
|
|
334
|
+
"judge"
|
|
335
|
+
],
|
|
336
|
+
"additionalProperties": false
|
|
337
|
+
},
|
|
338
|
+
"description": "Scorers by name."
|
|
339
|
+
},
|
|
340
|
+
"benchmarks": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"properties": {},
|
|
343
|
+
"unevaluatedProperties": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"properties": {
|
|
346
|
+
"suite": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"minLength": 1,
|
|
349
|
+
"description": "Path to the Harbor task suite."
|
|
350
|
+
},
|
|
351
|
+
"schedule": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"description": "Five-field cron expression in UTC. Without it the suite runs on request."
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"required": [
|
|
357
|
+
"suite"
|
|
358
|
+
],
|
|
359
|
+
"additionalProperties": false
|
|
360
|
+
},
|
|
361
|
+
"description": "Benchmark suites by name."
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
"required": [
|
|
365
|
+
"version",
|
|
366
|
+
"factory",
|
|
367
|
+
"agents"
|
|
368
|
+
],
|
|
369
|
+
"description": "`factory.yaml`: the desired state of one factory (P3). Paths are relative to the file.\nRealizes SCN-FACTORY-CODE-001: agents and prompts; MCP servers, skills and secrets per agent;\nrepositories; model and runtime; automations; scorers and benchmarks.",
|
|
370
|
+
"additionalProperties": false
|
|
371
|
+
}
|