devcontour-harness 0.1.0-alpha.35 → 0.1.0-alpha.37
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 +16 -2
- package/docs/contracts.md +261 -33
- package/docs/release-notes/0.1.0-alpha.36.md +26 -0
- package/docs/release-notes/0.1.0-alpha.37.md +40 -0
- package/docs/standalone.md +20 -0
- package/docs/toolchains.md +57 -2
- package/docs/upgrade.md +108 -0
- package/lib/agents/schemas.d.ts +84 -2
- package/lib/agents/schemas.js +49 -1
- package/lib/cli.js +149 -1
- package/lib/contracts/cli.d.ts +1495 -170
- package/lib/contracts/cli.js +232 -2
- package/lib/contracts/diagnosis.d.ts +8 -4
- package/lib/contracts/diagnosis.js +3 -0
- package/lib/contracts/errors.d.ts +7 -1
- package/lib/contracts/errors.js +6 -0
- package/lib/contracts/events.d.ts +453 -60
- package/lib/contracts/events.js +79 -0
- package/lib/contracts/execution.d.ts +270 -50
- package/lib/contracts/execution.js +41 -0
- package/lib/contracts/failure.d.ts +14 -1
- package/lib/contracts/failure.js +9 -1
- package/lib/contracts/handoff.d.ts +70 -20
- package/lib/contracts/handoff.js +42 -1
- package/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.js +1 -0
- package/lib/contracts/input-state.d.ts +13 -0
- package/lib/contracts/input-state.js +32 -0
- package/lib/contracts/input.d.ts +442 -0
- package/lib/contracts/input.js +321 -0
- package/lib/contracts/planning.d.ts +2 -0
- package/lib/contracts/policy.d.ts +17 -2
- package/lib/contracts/policy.js +31 -2
- package/lib/contracts/ports.d.ts +54 -0
- package/lib/contracts/project.d.ts +127 -0
- package/lib/contracts/project.js +99 -0
- package/lib/contracts/published.d.ts +603 -92
- package/lib/contracts/published.js +4 -1
- package/lib/contracts/repair-policy.d.ts +20 -0
- package/lib/contracts/repair-policy.js +34 -0
- package/lib/contracts/report.d.ts +53 -21
- package/lib/contracts/report.js +33 -2
- package/lib/contracts/result.d.ts +26 -24
- package/lib/contracts/review.d.ts +47 -8
- package/lib/contracts/review.js +21 -1
- package/lib/control/harness.d.ts +2555 -51
- package/lib/control/harness.js +112 -6
- package/lib/control/recovery.d.ts +2 -2
- package/lib/control/report.js +1 -0
- package/lib/control/status.d.ts +30 -22
- package/lib/control/status.js +11 -1
- package/lib/control/workflow.d.ts +8 -8
- package/lib/engine/budget.d.ts +86 -3
- package/lib/engine/budget.js +45 -10
- package/lib/engine/engine.d.ts +3091 -85
- package/lib/engine/engine.js +1206 -101
- package/lib/engine/input-policy.d.ts +68 -0
- package/lib/engine/input-policy.js +285 -0
- package/lib/engine/input-requests.d.ts +64 -0
- package/lib/engine/input-requests.js +187 -0
- package/lib/engine/measured.d.ts +6 -1
- package/lib/engine/measured.js +12 -1
- package/lib/engine/prompt.d.ts +4 -2
- package/lib/engine/prompt.js +3 -1
- package/lib/engine/property-recovery.js +2 -0
- package/lib/engine/repair.d.ts +2 -0
- package/lib/engine/repair.js +10 -3
- package/lib/engine/runner.d.ts +33 -4
- package/lib/engine/runner.js +266 -23
- package/lib/environment/lifecycle.d.ts +8 -0
- package/lib/environment/lifecycle.js +15 -2
- package/lib/explain/state.d.ts +16 -2
- package/lib/explain/state.js +254 -77
- package/lib/handoff/markdown.js +10 -0
- package/lib/handoff/pack.js +42 -1
- package/lib/index.d.ts +10 -0
- package/lib/index.js +10 -0
- package/lib/init/inspect.d.ts +34 -0
- package/lib/init/inspect.js +292 -0
- package/lib/init/project.js +14 -31
- package/lib/integrations/connector/commands.d.ts +12 -12
- package/lib/integrations/connector/config.d.ts +4 -4
- package/lib/integrations/connector/delivery.d.ts +1 -1
- package/lib/integrations/relay-v2/protocol.d.ts +4 -4
- package/lib/profiles/resolve.d.ts +2 -1
- package/lib/projections/enums.d.ts +1 -1
- package/lib/projections/enums.js +4 -0
- package/lib/projections/index.d.ts +1 -0
- package/lib/projections/index.js +1 -0
- package/lib/projections/input.d.ts +17 -0
- package/lib/projections/input.js +28 -0
- package/lib/projections/stop.d.ts +40 -1
- package/lib/projections/stop.js +87 -4
- package/lib/report/compute.d.ts +4 -1
- package/lib/report/compute.js +25 -0
- package/lib/report/document.js +1 -0
- package/lib/storage/document.d.ts +66 -28
- package/lib/testing/index.d.ts +1 -1
- package/lib/testing/index.js +1 -1
- package/lib/testing/store-contract.d.ts +8 -1
- package/lib/testing/store-contract.js +194 -1
- package/lib/verification/confirm.d.ts +3 -3
- package/lib/verification/corpus.d.ts +9 -9
- package/lib/verification/gates.d.ts +119 -0
- package/lib/verification/gates.js +311 -4
- package/package.json +1 -1
- package/schemas/execution-document.schema.json +130 -0
- package/schemas/execution-policy.schema.json +26 -0
- package/schemas/handoff-pack.schema.json +146 -4
- package/schemas/input-request.schema.json +665 -0
- package/schemas/project-facts.schema.json +393 -0
- package/schemas/result-envelope.schema.json +1 -0
- package/schemas/run-event.schema.json +625 -0
- package/schemas/run-result.schema.json +1 -0
- package/schemas/stop-diagnosis.schema.json +5 -1
- package/schemas/value-report.schema.json +78 -7
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "devcontour-harness/v1alpha1/project-facts.schema.json",
|
|
3
|
+
"title": "project-facts",
|
|
4
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"apiVersion": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"const": "devcontour-harness/v1alpha1"
|
|
10
|
+
},
|
|
11
|
+
"kind": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"const": "project-facts"
|
|
14
|
+
},
|
|
15
|
+
"path": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"minLength": 1
|
|
18
|
+
},
|
|
19
|
+
"git": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"root": {
|
|
23
|
+
"type": [
|
|
24
|
+
"string",
|
|
25
|
+
"null"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"worktree": {
|
|
29
|
+
"anyOf": [
|
|
30
|
+
{
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": [
|
|
33
|
+
"main",
|
|
34
|
+
"linked"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "null"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"baseSha": {
|
|
43
|
+
"anyOf": [
|
|
44
|
+
{
|
|
45
|
+
"type": "string",
|
|
46
|
+
"pattern": "^[0-9a-f]{40,64}$"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "null"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"branch": {
|
|
54
|
+
"type": [
|
|
55
|
+
"string",
|
|
56
|
+
"null"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"dirty": {
|
|
60
|
+
"type": [
|
|
61
|
+
"boolean",
|
|
62
|
+
"null"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"changes": {
|
|
66
|
+
"maxItems": 50,
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"changeCount": {
|
|
73
|
+
"anyOf": [
|
|
74
|
+
{
|
|
75
|
+
"type": "integer",
|
|
76
|
+
"minimum": 0,
|
|
77
|
+
"maximum": 9007199254740991
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "null"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"required": [
|
|
86
|
+
"root",
|
|
87
|
+
"worktree",
|
|
88
|
+
"baseSha",
|
|
89
|
+
"branch",
|
|
90
|
+
"dirty",
|
|
91
|
+
"changes",
|
|
92
|
+
"changeCount"
|
|
93
|
+
],
|
|
94
|
+
"additionalProperties": false
|
|
95
|
+
},
|
|
96
|
+
"lockfiles": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": {
|
|
99
|
+
"type": "string"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"packageManager": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"status": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"enum": [
|
|
108
|
+
"detected",
|
|
109
|
+
"ambiguous",
|
|
110
|
+
"none"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"name": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"enum": [
|
|
116
|
+
"npm",
|
|
117
|
+
"pnpm"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"lockfile": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"declared": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"name": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
"version": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": [
|
|
134
|
+
"name"
|
|
135
|
+
],
|
|
136
|
+
"additionalProperties": false
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"required": [
|
|
140
|
+
"status"
|
|
141
|
+
],
|
|
142
|
+
"additionalProperties": false
|
|
143
|
+
},
|
|
144
|
+
"profiles": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"items": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"properties": {
|
|
149
|
+
"id": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"pattern": "^[A-Za-z0-9_-]{1,80}$"
|
|
152
|
+
},
|
|
153
|
+
"version": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:-[A-Za-z0-9.-]+)?$"
|
|
156
|
+
},
|
|
157
|
+
"digest": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
160
|
+
},
|
|
161
|
+
"source": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"repositoryId": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"pattern": "^[A-Za-z0-9_-]{1,80}$"
|
|
167
|
+
},
|
|
168
|
+
"path": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"minLength": 1,
|
|
171
|
+
"maxLength": 500,
|
|
172
|
+
"pattern": "^(?!\\/)(?!.*[\\\\:*?\\[\\]\\x00])(?!(?:.*\\/)?\\.{1,2}(?:\\/|$))(?=.{1,500}$).+$"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"required": [
|
|
176
|
+
"repositoryId",
|
|
177
|
+
"path"
|
|
178
|
+
],
|
|
179
|
+
"additionalProperties": false
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"required": [
|
|
183
|
+
"id",
|
|
184
|
+
"version",
|
|
185
|
+
"digest"
|
|
186
|
+
],
|
|
187
|
+
"additionalProperties": false
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"scripts": {
|
|
191
|
+
"type": "array",
|
|
192
|
+
"items": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"properties": {
|
|
195
|
+
"name": {
|
|
196
|
+
"type": "string"
|
|
197
|
+
},
|
|
198
|
+
"command": {
|
|
199
|
+
"type": "string"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"required": [
|
|
203
|
+
"name",
|
|
204
|
+
"command"
|
|
205
|
+
],
|
|
206
|
+
"additionalProperties": false
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"checks": {
|
|
210
|
+
"type": "array",
|
|
211
|
+
"items": {
|
|
212
|
+
"type": "string"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"tools": {
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "object",
|
|
219
|
+
"properties": {
|
|
220
|
+
"name": {
|
|
221
|
+
"type": "string"
|
|
222
|
+
},
|
|
223
|
+
"status": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"enum": [
|
|
226
|
+
"ok",
|
|
227
|
+
"missing",
|
|
228
|
+
"version-error",
|
|
229
|
+
"mismatch"
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
"version": {
|
|
233
|
+
"type": "string"
|
|
234
|
+
},
|
|
235
|
+
"required": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"properties": {
|
|
238
|
+
"version": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
},
|
|
241
|
+
"source": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"required": [
|
|
246
|
+
"version",
|
|
247
|
+
"source"
|
|
248
|
+
],
|
|
249
|
+
"additionalProperties": false
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"required": [
|
|
253
|
+
"name",
|
|
254
|
+
"status"
|
|
255
|
+
],
|
|
256
|
+
"additionalProperties": false
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"runtimes": {
|
|
260
|
+
"type": "array",
|
|
261
|
+
"items": {
|
|
262
|
+
"type": "object",
|
|
263
|
+
"properties": {
|
|
264
|
+
"runtime": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"enum": [
|
|
267
|
+
"claude",
|
|
268
|
+
"codex"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"status": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"enum": [
|
|
274
|
+
"available",
|
|
275
|
+
"missing",
|
|
276
|
+
"version-error"
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
"version": {
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"auth": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"const": "unknown"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"required": [
|
|
288
|
+
"runtime",
|
|
289
|
+
"status",
|
|
290
|
+
"auth"
|
|
291
|
+
],
|
|
292
|
+
"additionalProperties": false
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"markers": {
|
|
296
|
+
"type": "object",
|
|
297
|
+
"properties": {
|
|
298
|
+
"devcontour": {
|
|
299
|
+
"type": "array",
|
|
300
|
+
"items": {
|
|
301
|
+
"type": "string"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"harnessProject": {
|
|
305
|
+
"type": "boolean"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"required": [
|
|
309
|
+
"devcontour",
|
|
310
|
+
"harnessProject"
|
|
311
|
+
],
|
|
312
|
+
"additionalProperties": false
|
|
313
|
+
},
|
|
314
|
+
"diagnostics": {
|
|
315
|
+
"type": "array",
|
|
316
|
+
"items": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"properties": {
|
|
319
|
+
"code": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"enum": [
|
|
322
|
+
"path-missing",
|
|
323
|
+
"not-directory",
|
|
324
|
+
"not-git-repository",
|
|
325
|
+
"inside-repository",
|
|
326
|
+
"git-worktree",
|
|
327
|
+
"no-commits",
|
|
328
|
+
"dirty-checkout",
|
|
329
|
+
"stack-ambiguous",
|
|
330
|
+
"stack-unsupported",
|
|
331
|
+
"profile-invalid",
|
|
332
|
+
"package-json-missing",
|
|
333
|
+
"package-json-invalid",
|
|
334
|
+
"manager-mismatch",
|
|
335
|
+
"no-check-scripts",
|
|
336
|
+
"tool-missing",
|
|
337
|
+
"tool-version-error",
|
|
338
|
+
"tool-version-mismatch",
|
|
339
|
+
"runtime-missing",
|
|
340
|
+
"runtime-version-error",
|
|
341
|
+
"devcontour-owned",
|
|
342
|
+
"harness-project"
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
"severity": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"enum": [
|
|
348
|
+
"blocker",
|
|
349
|
+
"warning",
|
|
350
|
+
"info"
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
"message": {
|
|
354
|
+
"type": "string"
|
|
355
|
+
},
|
|
356
|
+
"action": {
|
|
357
|
+
"type": "string"
|
|
358
|
+
},
|
|
359
|
+
"path": {
|
|
360
|
+
"type": "string"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"required": [
|
|
364
|
+
"code",
|
|
365
|
+
"severity",
|
|
366
|
+
"message",
|
|
367
|
+
"action"
|
|
368
|
+
],
|
|
369
|
+
"additionalProperties": false
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"ready": {
|
|
373
|
+
"type": "boolean"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"required": [
|
|
377
|
+
"apiVersion",
|
|
378
|
+
"kind",
|
|
379
|
+
"path",
|
|
380
|
+
"git",
|
|
381
|
+
"lockfiles",
|
|
382
|
+
"packageManager",
|
|
383
|
+
"profiles",
|
|
384
|
+
"scripts",
|
|
385
|
+
"checks",
|
|
386
|
+
"tools",
|
|
387
|
+
"runtimes",
|
|
388
|
+
"markers",
|
|
389
|
+
"diagnostics",
|
|
390
|
+
"ready"
|
|
391
|
+
],
|
|
392
|
+
"additionalProperties": false
|
|
393
|
+
}
|