tamperward 2.17.1 → 2.19.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.
@@ -0,0 +1,508 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/hexrift/tamperward/main/schemas/run-v1.schema.json",
4
+ "title": "TamperWard run JSON output v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "verdict",
9
+ "exit_code",
10
+ "complete",
11
+ "base",
12
+ "agent",
13
+ "verifier_backend",
14
+ "dependency_environment"
15
+ ],
16
+ "properties": {
17
+ "schema_version": {
18
+ "const": 1
19
+ },
20
+ "verdict": {
21
+ "enum": [
22
+ "VERIFIED",
23
+ "AGENT_TIMEOUT",
24
+ "AGENT_FAILED",
25
+ "ENFORCEMENT_FAILED",
26
+ "CANNOT_ADJUDICATE",
27
+ "OBJECT_REWRITE",
28
+ "HISTORY_REWRITE",
29
+ "DEPENDENCY_DRIFT",
30
+ "NOT_QUIESCENT",
31
+ "TRANSIENT_OBSERVER_BLOCK"
32
+ ]
33
+ },
34
+ "exit_code": {
35
+ "type": "integer"
36
+ },
37
+ "complete": {
38
+ "type": "boolean",
39
+ "description": "true when both policy checks, verification and the quiescence boundary ran on the tree the agent left; false for early convictions (object/history rewrite, dependency drift before verification) and lifecycle refusals, which carry no `checks.verify`/`observer`."
40
+ },
41
+ "base": {
42
+ "type": "string"
43
+ },
44
+ "head": {
45
+ "type": "string"
46
+ },
47
+ "agent": {
48
+ "$ref": "#/$defs/agent"
49
+ },
50
+ "checks": {
51
+ "$ref": "#/$defs/checks"
52
+ },
53
+ "verifier_backend": {
54
+ "$ref": "#/$defs/backend"
55
+ },
56
+ "dependency_environment": {
57
+ "$ref": "#/$defs/dependency_environment"
58
+ },
59
+ "observer": {
60
+ "$ref": "#/$defs/observer"
61
+ },
62
+ "reason": {
63
+ "enum": [
64
+ "AGENT_LIFECYCLE_NOT_OWNED",
65
+ "VERIFY_CANNOT_VERIFY",
66
+ "CHECK_DIFF_UNJUDGEABLE",
67
+ "CHECK_WORKTREE_UNJUDGEABLE"
68
+ ],
69
+ "description": "Present exactly when verdict is CANNOT_ADJUDICATE: which layer could not judge."
70
+ }
71
+ },
72
+ "allOf": [
73
+ {
74
+ "if": {
75
+ "type": "object",
76
+ "properties": {
77
+ "complete": {
78
+ "const": true
79
+ }
80
+ },
81
+ "required": [
82
+ "complete"
83
+ ]
84
+ },
85
+ "then": {
86
+ "type": "object",
87
+ "required": [
88
+ "head",
89
+ "checks",
90
+ "observer"
91
+ ],
92
+ "properties": {
93
+ "head": {},
94
+ "checks": {
95
+ "allOf": [
96
+ {
97
+ "$ref": "#/$defs/checks"
98
+ },
99
+ {
100
+ "type": "object",
101
+ "required": [
102
+ "diff",
103
+ "worktree",
104
+ "verify"
105
+ ],
106
+ "properties": {
107
+ "diff": {},
108
+ "worktree": {},
109
+ "verify": {}
110
+ }
111
+ }
112
+ ]
113
+ },
114
+ "observer": {}
115
+ }
116
+ }
117
+ },
118
+ {
119
+ "if": {
120
+ "type": "object",
121
+ "properties": {
122
+ "verdict": {
123
+ "const": "CANNOT_ADJUDICATE"
124
+ }
125
+ },
126
+ "required": [
127
+ "verdict"
128
+ ]
129
+ },
130
+ "then": {
131
+ "type": "object",
132
+ "required": [
133
+ "reason"
134
+ ],
135
+ "properties": {
136
+ "reason": {},
137
+ "exit_code": {
138
+ "const": 2
139
+ }
140
+ }
141
+ },
142
+ "else": {
143
+ "not": {
144
+ "type": "object",
145
+ "required": [
146
+ "reason"
147
+ ],
148
+ "properties": {
149
+ "reason": {}
150
+ }
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "if": {
156
+ "type": "object",
157
+ "properties": {
158
+ "verdict": {
159
+ "enum": [
160
+ "VERIFIED",
161
+ "AGENT_FAILED",
162
+ "AGENT_TIMEOUT",
163
+ "ENFORCEMENT_FAILED",
164
+ "NOT_QUIESCENT",
165
+ "TRANSIENT_OBSERVER_BLOCK"
166
+ ]
167
+ }
168
+ },
169
+ "required": [
170
+ "verdict"
171
+ ]
172
+ },
173
+ "then": {
174
+ "type": "object",
175
+ "properties": {
176
+ "complete": {
177
+ "const": true
178
+ }
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "if": {
184
+ "properties": {
185
+ "verdict": {
186
+ "const": "VERIFIED"
187
+ }
188
+ },
189
+ "required": [
190
+ "verdict"
191
+ ],
192
+ "type": "object"
193
+ },
194
+ "then": {
195
+ "properties": {
196
+ "exit_code": {
197
+ "const": 0
198
+ },
199
+ "head": {},
200
+ "checks": {},
201
+ "observer": {}
202
+ },
203
+ "required": [
204
+ "head",
205
+ "checks",
206
+ "observer"
207
+ ],
208
+ "type": "object"
209
+ }
210
+ },
211
+ {
212
+ "if": {
213
+ "properties": {
214
+ "verdict": {
215
+ "const": "AGENT_TIMEOUT"
216
+ }
217
+ },
218
+ "required": [
219
+ "verdict"
220
+ ],
221
+ "type": "object"
222
+ },
223
+ "then": {
224
+ "properties": {
225
+ "exit_code": {
226
+ "const": 124
227
+ },
228
+ "agent": {
229
+ "allOf": [
230
+ {
231
+ "$ref": "#/$defs/agent"
232
+ },
233
+ {
234
+ "properties": {
235
+ "timed_out": {
236
+ "const": true
237
+ }
238
+ },
239
+ "required": [
240
+ "timed_out"
241
+ ],
242
+ "type": "object"
243
+ }
244
+ ]
245
+ },
246
+ "head": {},
247
+ "checks": {},
248
+ "observer": {}
249
+ },
250
+ "required": [
251
+ "head",
252
+ "checks",
253
+ "observer"
254
+ ],
255
+ "type": "object"
256
+ }
257
+ },
258
+ {
259
+ "if": {
260
+ "properties": {
261
+ "verdict": {
262
+ "enum": [
263
+ "ENFORCEMENT_FAILED",
264
+ "OBJECT_REWRITE",
265
+ "HISTORY_REWRITE",
266
+ "DEPENDENCY_DRIFT",
267
+ "NOT_QUIESCENT",
268
+ "TRANSIENT_OBSERVER_BLOCK"
269
+ ]
270
+ }
271
+ },
272
+ "required": [
273
+ "verdict"
274
+ ],
275
+ "type": "object"
276
+ },
277
+ "then": {
278
+ "properties": {
279
+ "exit_code": {
280
+ "const": 1
281
+ }
282
+ },
283
+ "type": "object"
284
+ }
285
+ },
286
+ {
287
+ "if": {
288
+ "properties": {
289
+ "verdict": {
290
+ "const": "CANNOT_ADJUDICATE"
291
+ }
292
+ },
293
+ "required": [
294
+ "verdict"
295
+ ],
296
+ "type": "object"
297
+ },
298
+ "then": {
299
+ "properties": {
300
+ "exit_code": {
301
+ "const": 2
302
+ }
303
+ },
304
+ "type": "object"
305
+ }
306
+ }
307
+ ],
308
+ "$defs": {
309
+ "agent": {
310
+ "type": "object",
311
+ "required": [
312
+ "exit_code",
313
+ "timed_out",
314
+ "lifecycle_owned"
315
+ ],
316
+ "properties": {
317
+ "exit_code": {
318
+ "type": "integer"
319
+ },
320
+ "timed_out": {
321
+ "type": "boolean"
322
+ },
323
+ "lifecycle_owned": {
324
+ "type": "boolean"
325
+ },
326
+ "budget_secs": {
327
+ "type": "number",
328
+ "exclusiveMinimum": 0
329
+ }
330
+ },
331
+ "additionalProperties": true
332
+ },
333
+ "checks": {
334
+ "type": "object",
335
+ "properties": {
336
+ "diff": {
337
+ "type": "integer",
338
+ "minimum": 0,
339
+ "maximum": 2
340
+ },
341
+ "worktree": {
342
+ "type": "integer",
343
+ "minimum": 0,
344
+ "maximum": 2
345
+ },
346
+ "verify": {
347
+ "type": "integer",
348
+ "minimum": 0,
349
+ "maximum": 2
350
+ }
351
+ },
352
+ "additionalProperties": true
353
+ },
354
+ "observer": {
355
+ "type": "object",
356
+ "required": [
357
+ "enabled",
358
+ "blocking"
359
+ ],
360
+ "properties": {
361
+ "enabled": {
362
+ "type": "boolean"
363
+ },
364
+ "blocking": {
365
+ "type": "boolean"
366
+ }
367
+ },
368
+ "additionalProperties": true
369
+ },
370
+ "backend": {
371
+ "type": "object",
372
+ "required": [
373
+ "kind",
374
+ "trust",
375
+ "available"
376
+ ],
377
+ "properties": {
378
+ "kind": {
379
+ "enum": [
380
+ "local",
381
+ "container"
382
+ ]
383
+ },
384
+ "trust": {
385
+ "enum": [
386
+ "checkpointed-local",
387
+ "isolated-container"
388
+ ]
389
+ },
390
+ "available": {
391
+ "type": "boolean"
392
+ },
393
+ "image": {
394
+ "type": "string"
395
+ },
396
+ "engine": {
397
+ "const": "docker"
398
+ },
399
+ "reason": {
400
+ "type": "string"
401
+ },
402
+ "resources": {
403
+ "type": "object",
404
+ "required": [
405
+ "memory_bytes",
406
+ "memory_swap_bytes",
407
+ "cpus",
408
+ "pids"
409
+ ],
410
+ "properties": {
411
+ "memory_bytes": {
412
+ "type": "integer",
413
+ "minimum": 1
414
+ },
415
+ "memory_swap_bytes": {
416
+ "type": "integer",
417
+ "minimum": 1
418
+ },
419
+ "cpus": {
420
+ "type": "number",
421
+ "exclusiveMinimum": 0
422
+ },
423
+ "pids": {
424
+ "type": "integer",
425
+ "minimum": 1
426
+ }
427
+ },
428
+ "additionalProperties": true
429
+ }
430
+ },
431
+ "additionalProperties": true
432
+ },
433
+ "dependency_environment": {
434
+ "type": "object",
435
+ "required": [
436
+ "status",
437
+ "roots"
438
+ ],
439
+ "properties": {
440
+ "status": {
441
+ "enum": [
442
+ "none",
443
+ "attested",
444
+ "unattestable",
445
+ "verifier-owned"
446
+ ]
447
+ },
448
+ "roots": {
449
+ "type": "array",
450
+ "items": {
451
+ "type": "object",
452
+ "required": [
453
+ "kind",
454
+ "path"
455
+ ],
456
+ "properties": {
457
+ "kind": {
458
+ "enum": [
459
+ "node_modules",
460
+ "python-venv"
461
+ ]
462
+ },
463
+ "path": {
464
+ "type": "string"
465
+ }
466
+ },
467
+ "additionalProperties": true
468
+ }
469
+ },
470
+ "fingerprint": {
471
+ "type": "string"
472
+ },
473
+ "reason": {
474
+ "type": "string"
475
+ },
476
+ "image": {
477
+ "type": "string"
478
+ },
479
+ "diagnostics": {
480
+ "type": "object",
481
+ "required": [
482
+ "full_snapshots",
483
+ "reused_snapshots",
484
+ "total_ms"
485
+ ],
486
+ "properties": {
487
+ "full_snapshots": {
488
+ "type": "integer",
489
+ "minimum": 0
490
+ },
491
+ "reused_snapshots": {
492
+ "type": "integer",
493
+ "minimum": 0
494
+ },
495
+ "total_ms": {
496
+ "type": "number",
497
+ "minimum": 0
498
+ }
499
+ },
500
+ "additionalProperties": true
501
+ }
502
+ },
503
+ "additionalProperties": true
504
+ }
505
+ },
506
+ "additionalProperties": true,
507
+ "description": "Emitted by `tamperward run --json` as the single stdout document once the wrapped agent has started; agent stdout is routed to stderr in this mode. Pre-agent failures emit no document (stderr + exit 2). Additive within schema major 1."
508
+ }