assertledger 1.0.0 → 1.1.1

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.
Files changed (93) hide show
  1. package/README.fr.md +3 -3
  2. package/README.md +3 -3
  3. package/SECURITY.md +11 -6
  4. package/conformance/schema-extensions.json +36 -0
  5. package/dist/build-info.d.ts +16 -0
  6. package/dist/build-info.d.ts.map +1 -0
  7. package/dist/build-info.js +18 -0
  8. package/dist/build-info.js.map +1 -0
  9. package/dist/build-info.json +7 -0
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +117 -19
  12. package/dist/cli.js.map +1 -1
  13. package/dist/contracts/index.d.ts +943 -0
  14. package/dist/contracts/index.d.ts.map +1 -1
  15. package/dist/contracts/index.js +561 -21
  16. package/dist/contracts/index.js.map +1 -1
  17. package/dist/core/index.d.ts +10 -1
  18. package/dist/core/index.d.ts.map +1 -1
  19. package/dist/core/index.js +484 -8
  20. package/dist/core/index.js.map +1 -1
  21. package/dist/diagnostics.d.ts.map +1 -1
  22. package/dist/diagnostics.js +42 -2
  23. package/dist/diagnostics.js.map +1 -1
  24. package/dist/engine/adapters/node-test-runtime.d.ts +17 -0
  25. package/dist/engine/adapters/node-test-runtime.d.ts.map +1 -1
  26. package/dist/engine/adapters/node-test-runtime.js +45 -23
  27. package/dist/engine/adapters/node-test-runtime.js.map +1 -1
  28. package/dist/engine/container.d.ts +54 -0
  29. package/dist/engine/container.d.ts.map +1 -0
  30. package/dist/engine/container.js +464 -0
  31. package/dist/engine/container.js.map +1 -0
  32. package/dist/engine/git-regression.d.ts +12 -2
  33. package/dist/engine/git-regression.d.ts.map +1 -1
  34. package/dist/engine/git-regression.js +63 -16
  35. package/dist/engine/git-regression.js.map +1 -1
  36. package/dist/engine/index.d.ts +7 -1
  37. package/dist/engine/index.d.ts.map +1 -1
  38. package/dist/engine/index.js +300 -74
  39. package/dist/engine/index.js.map +1 -1
  40. package/dist/mcp/index.d.ts.map +1 -1
  41. package/dist/mcp/index.js +53 -1
  42. package/dist/mcp/index.js.map +1 -1
  43. package/dist/proof-planner/carry-over.d.ts +21 -0
  44. package/dist/proof-planner/carry-over.d.ts.map +1 -0
  45. package/dist/proof-planner/carry-over.js +212 -0
  46. package/dist/proof-planner/carry-over.js.map +1 -0
  47. package/dist/proof-planner/index.d.ts +11 -0
  48. package/dist/proof-planner/index.d.ts.map +1 -0
  49. package/dist/proof-planner/index.js +11 -0
  50. package/dist/proof-planner/index.js.map +1 -0
  51. package/dist/proof-planner/model.d.ts +272 -0
  52. package/dist/proof-planner/model.d.ts.map +1 -0
  53. package/dist/proof-planner/model.js +215 -0
  54. package/dist/proof-planner/model.js.map +1 -0
  55. package/dist/proof-planner/plan.d.ts +140 -0
  56. package/dist/proof-planner/plan.d.ts.map +1 -0
  57. package/dist/proof-planner/plan.js +1124 -0
  58. package/dist/proof-planner/plan.js.map +1 -0
  59. package/dist/proof-planner/policy.d.ts +100 -0
  60. package/dist/proof-planner/policy.d.ts.map +1 -0
  61. package/dist/proof-planner/policy.js +407 -0
  62. package/dist/proof-planner/policy.js.map +1 -0
  63. package/dist/proof-planner/render.d.ts +4 -0
  64. package/dist/proof-planner/render.d.ts.map +1 -0
  65. package/dist/proof-planner/render.js +73 -0
  66. package/dist/proof-planner/render.js.map +1 -0
  67. package/dist/sdk/index.d.ts +16 -6
  68. package/dist/sdk/index.d.ts.map +1 -1
  69. package/dist/sdk/index.js +63 -5
  70. package/dist/sdk/index.js.map +1 -1
  71. package/docs/agentic-test-profile.md +5 -0
  72. package/docs/architecture.md +15 -3
  73. package/docs/ci.md +7 -1
  74. package/docs/conformance-v1.md +11 -2
  75. package/docs/container-isolation.md +156 -0
  76. package/docs/evidence-export.md +146 -0
  77. package/docs/git-regression.md +7 -3
  78. package/docs/migration-timeout-discovery-inconclusive.md +126 -0
  79. package/docs/migration-verification-v2.md +55 -0
  80. package/docs/project-intent.md +3 -2
  81. package/docs/proof-model.md +28 -6
  82. package/docs/proof-planner.md +368 -0
  83. package/docs/reference.md +59 -12
  84. package/docs/roadmap.md +12 -4
  85. package/examples/agentic-profile/profile-manifest.mjs +5 -1
  86. package/examples/evidence-export/consumer.mjs +35 -0
  87. package/package.json +5 -5
  88. package/schemas/evidence-export-replay-result.v1.json +49 -0
  89. package/schemas/evidence-export-request.v1.json +681 -0
  90. package/schemas/evidence-export.v1.json +1479 -0
  91. package/schemas/evidence-manifest.v2.json +886 -0
  92. package/schemas/evidence-provider-manifest.v1.json +269 -0
  93. package/schemas/verification-request.v2.json +457 -0
@@ -0,0 +1,681 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "$ref": "#/$defs/__schema0"
7
+ },
8
+ "manifest": {
9
+ "$ref": "#/$defs/__schema1"
10
+ },
11
+ "consumerRequest": {
12
+ "$ref": "#/$defs/__schema11"
13
+ }
14
+ },
15
+ "required": ["schemaVersion", "manifest", "consumerRequest"],
16
+ "additionalProperties": false,
17
+ "title": "AssertLedger evidence export request",
18
+ "description": "A replay-valid evidence manifest and optional consumer references and requested controls.",
19
+ "$defs": {
20
+ "__schema0": {
21
+ "type": "string",
22
+ "const": "1.0.0"
23
+ },
24
+ "__schema1": {
25
+ "type": "object",
26
+ "properties": {
27
+ "schemaVersion": {
28
+ "type": "string",
29
+ "const": "1.0.0"
30
+ },
31
+ "repositoryDigest": {
32
+ "anyOf": [
33
+ {
34
+ "$ref": "#/$defs/__schema2"
35
+ },
36
+ {
37
+ "type": "string",
38
+ "const": "invalid"
39
+ }
40
+ ]
41
+ },
42
+ "evidenceContext": {
43
+ "type": "object",
44
+ "properties": {
45
+ "engine": {
46
+ "type": "object",
47
+ "properties": {
48
+ "name": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "maxLength": 128
52
+ },
53
+ "version": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "maxLength": 128
57
+ }
58
+ },
59
+ "required": ["name", "version"],
60
+ "additionalProperties": false
61
+ },
62
+ "adapter": {
63
+ "type": "object",
64
+ "properties": {
65
+ "name": {
66
+ "type": "string",
67
+ "minLength": 1,
68
+ "maxLength": 128
69
+ },
70
+ "version": {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "maxLength": 128
74
+ },
75
+ "configuration": {
76
+ "$ref": "#/$defs/__schema3"
77
+ }
78
+ },
79
+ "required": ["name", "version", "configuration"],
80
+ "additionalProperties": false
81
+ },
82
+ "execution": {
83
+ "type": "object",
84
+ "properties": {
85
+ "isolation": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "maxLength": 128
89
+ },
90
+ "environmentAllowlist": {
91
+ "maxItems": 100,
92
+ "type": "array",
93
+ "items": {
94
+ "$ref": "#/$defs/__schema4"
95
+ }
96
+ },
97
+ "budgets": {
98
+ "$ref": "#/$defs/__schema5"
99
+ },
100
+ "candidateRoots": {
101
+ "maxItems": 100,
102
+ "type": "array",
103
+ "items": {
104
+ "$ref": "#/$defs/__schema6"
105
+ }
106
+ }
107
+ },
108
+ "required": ["isolation", "environmentAllowlist", "budgets", "candidateRoots"],
109
+ "additionalProperties": false
110
+ },
111
+ "worlds": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "object",
115
+ "properties": {
116
+ "id": {
117
+ "$ref": "#/$defs/__schema7"
118
+ },
119
+ "provenance": {
120
+ "type": "string",
121
+ "minLength": 1,
122
+ "maxLength": 1024
123
+ },
124
+ "digest": {
125
+ "$ref": "#/$defs/__schema2"
126
+ }
127
+ },
128
+ "required": ["id", "provenance", "digest"],
129
+ "additionalProperties": false
130
+ }
131
+ }
132
+ },
133
+ "required": ["engine", "adapter", "execution", "worlds"],
134
+ "additionalProperties": false
135
+ },
136
+ "policy": {
137
+ "anyOf": [
138
+ {
139
+ "type": "object",
140
+ "properties": {
141
+ "policyVersion": {
142
+ "type": "string",
143
+ "const": "1.0.0"
144
+ },
145
+ "requiredAttempts": {
146
+ "type": "integer",
147
+ "minimum": 1,
148
+ "maximum": 1000
149
+ },
150
+ "minimumTargetWeightPermille": {
151
+ "type": "integer",
152
+ "minimum": 1,
153
+ "maximum": 1000
154
+ },
155
+ "maximumSelectedCandidates": {
156
+ "type": "integer",
157
+ "minimum": 1,
158
+ "maximum": 1000
159
+ },
160
+ "acceptedTargetOutcomes": {
161
+ "minItems": 1,
162
+ "maxItems": 1,
163
+ "type": "array",
164
+ "items": {
165
+ "$ref": "#/$defs/__schema8"
166
+ }
167
+ }
168
+ },
169
+ "required": [
170
+ "policyVersion",
171
+ "requiredAttempts",
172
+ "minimumTargetWeightPermille",
173
+ "maximumSelectedCandidates",
174
+ "acceptedTargetOutcomes"
175
+ ],
176
+ "additionalProperties": false
177
+ },
178
+ {
179
+ "type": "object",
180
+ "properties": {
181
+ "policyVersion": {
182
+ "type": "string",
183
+ "const": "invalid"
184
+ },
185
+ "requiredAttempts": {
186
+ "type": "number",
187
+ "const": 1
188
+ },
189
+ "minimumTargetWeightPermille": {
190
+ "type": "number",
191
+ "const": 1000
192
+ },
193
+ "maximumSelectedCandidates": {
194
+ "type": "number",
195
+ "const": 0
196
+ },
197
+ "acceptedTargetOutcomes": {
198
+ "maxItems": 0,
199
+ "type": "array",
200
+ "items": {
201
+ "$ref": "#/$defs/__schema9"
202
+ }
203
+ }
204
+ },
205
+ "required": [
206
+ "policyVersion",
207
+ "requiredAttempts",
208
+ "minimumTargetWeightPermille",
209
+ "maximumSelectedCandidates",
210
+ "acceptedTargetOutcomes"
211
+ ],
212
+ "additionalProperties": false
213
+ }
214
+ ]
215
+ },
216
+ "worlds": {
217
+ "type": "array",
218
+ "items": {
219
+ "type": "object",
220
+ "properties": {
221
+ "id": {
222
+ "$ref": "#/$defs/__schema7"
223
+ },
224
+ "kind": {
225
+ "type": "string",
226
+ "enum": ["REFERENCE", "TARGET", "NEUTRAL"]
227
+ },
228
+ "required": {
229
+ "type": "boolean"
230
+ },
231
+ "weight": {
232
+ "type": "integer",
233
+ "minimum": 0,
234
+ "maximum": 1000000
235
+ }
236
+ },
237
+ "required": ["id", "kind", "required", "weight"],
238
+ "additionalProperties": false
239
+ }
240
+ },
241
+ "candidates": {
242
+ "type": "array",
243
+ "items": {
244
+ "type": "object",
245
+ "properties": {
246
+ "id": {
247
+ "$ref": "#/$defs/__schema7"
248
+ },
249
+ "digest": {
250
+ "$ref": "#/$defs/__schema2"
251
+ },
252
+ "sizeBytes": {
253
+ "type": "integer",
254
+ "minimum": 0,
255
+ "maximum": 9007199254740991
256
+ },
257
+ "status": {
258
+ "type": "string",
259
+ "enum": ["ELIGIBLE", "UNSTABLE", "INCONCLUSIVE", "INVALID", "WEAK_ORACLE"]
260
+ },
261
+ "killedTargetIds": {
262
+ "type": "array",
263
+ "items": {
264
+ "$ref": "#/$defs/__schema7"
265
+ }
266
+ },
267
+ "targetWeightKilled": {
268
+ "type": "integer",
269
+ "minimum": 0,
270
+ "maximum": 9007199254740991
271
+ },
272
+ "gates": {
273
+ "type": "array",
274
+ "items": {
275
+ "type": "object",
276
+ "properties": {
277
+ "name": {
278
+ "type": "string",
279
+ "enum": [
280
+ "COMPLETENESS",
281
+ "STABILITY",
282
+ "DISCOVERY",
283
+ "REFERENCE",
284
+ "NEUTRAL",
285
+ "TARGET_STRENGTH"
286
+ ]
287
+ },
288
+ "status": {
289
+ "type": "string",
290
+ "enum": ["PASSED", "FAILED", "NOT_RUN"]
291
+ },
292
+ "evidenceRunIds": {
293
+ "type": "array",
294
+ "items": {
295
+ "type": "string",
296
+ "minLength": 1,
297
+ "maxLength": 512
298
+ }
299
+ },
300
+ "reasonCodes": {
301
+ "type": "array",
302
+ "items": {
303
+ "$ref": "#/$defs/__schema10"
304
+ }
305
+ }
306
+ },
307
+ "required": ["name", "status", "evidenceRunIds", "reasonCodes"],
308
+ "additionalProperties": false
309
+ }
310
+ },
311
+ "reasonCodes": {
312
+ "type": "array",
313
+ "items": {
314
+ "$ref": "#/$defs/__schema10"
315
+ }
316
+ }
317
+ },
318
+ "required": [
319
+ "id",
320
+ "digest",
321
+ "sizeBytes",
322
+ "status",
323
+ "killedTargetIds",
324
+ "targetWeightKilled",
325
+ "gates",
326
+ "reasonCodes"
327
+ ],
328
+ "additionalProperties": false
329
+ }
330
+ },
331
+ "observations": {
332
+ "type": "array",
333
+ "items": {
334
+ "type": "object",
335
+ "properties": {
336
+ "runId": {
337
+ "type": "string",
338
+ "minLength": 1,
339
+ "maxLength": 512
340
+ },
341
+ "candidateId": {
342
+ "anyOf": [
343
+ {
344
+ "$ref": "#/$defs/__schema7"
345
+ },
346
+ {
347
+ "type": "null"
348
+ }
349
+ ]
350
+ },
351
+ "worldId": {
352
+ "$ref": "#/$defs/__schema7"
353
+ },
354
+ "attempt": {
355
+ "type": "integer",
356
+ "minimum": 1,
357
+ "maximum": 9007199254740991
358
+ },
359
+ "outcome": {
360
+ "type": "string",
361
+ "enum": [
362
+ "PASS",
363
+ "ASSERTION_FAILURE",
364
+ "COLLECTION_FAILURE",
365
+ "COMPILE_FAILURE",
366
+ "PROCESS_CRASH",
367
+ "TIMEOUT",
368
+ "INFRA_ERROR",
369
+ "NO_TEST_DISCOVERED"
370
+ ]
371
+ },
372
+ "testsDiscovered": {
373
+ "type": "integer",
374
+ "minimum": 0,
375
+ "maximum": 9007199254740991
376
+ },
377
+ "candidateTestsDiscovered": {
378
+ "type": "integer",
379
+ "minimum": 0,
380
+ "maximum": 9007199254740991
381
+ },
382
+ "attributed": {
383
+ "type": "boolean"
384
+ },
385
+ "durationMs": {
386
+ "type": "number",
387
+ "minimum": 0
388
+ },
389
+ "exitCode": {
390
+ "anyOf": [
391
+ {
392
+ "type": "integer",
393
+ "minimum": 0,
394
+ "maximum": 9007199254740991
395
+ },
396
+ {
397
+ "type": "null"
398
+ }
399
+ ]
400
+ },
401
+ "stdoutDigest": {
402
+ "$ref": "#/$defs/__schema2"
403
+ },
404
+ "stderrDigest": {
405
+ "$ref": "#/$defs/__schema2"
406
+ }
407
+ },
408
+ "required": [
409
+ "runId",
410
+ "candidateId",
411
+ "worldId",
412
+ "attempt",
413
+ "outcome",
414
+ "testsDiscovered",
415
+ "candidateTestsDiscovered",
416
+ "attributed"
417
+ ],
418
+ "additionalProperties": false
419
+ }
420
+ },
421
+ "decision": {
422
+ "type": "object",
423
+ "properties": {
424
+ "status": {
425
+ "type": "string",
426
+ "enum": ["VERIFIED", "REJECTED", "INCONCLUSIVE", "ENGINE_ERROR"]
427
+ },
428
+ "selectedCandidateIds": {
429
+ "type": "array",
430
+ "items": {
431
+ "$ref": "#/$defs/__schema7"
432
+ }
433
+ },
434
+ "reasonCodes": {
435
+ "type": "array",
436
+ "items": {
437
+ "$ref": "#/$defs/__schema10"
438
+ }
439
+ }
440
+ },
441
+ "required": ["status", "selectedCandidateIds", "reasonCodes"],
442
+ "additionalProperties": false
443
+ },
444
+ "decisionDigest": {
445
+ "$ref": "#/$defs/__schema2"
446
+ },
447
+ "artifactDigest": {
448
+ "$ref": "#/$defs/__schema2"
449
+ },
450
+ "adapter": {
451
+ "oneOf": [
452
+ {
453
+ "type": "object",
454
+ "properties": {
455
+ "kind": {
456
+ "type": "string",
457
+ "const": "node-test"
458
+ }
459
+ },
460
+ "required": ["kind"],
461
+ "additionalProperties": false
462
+ },
463
+ {
464
+ "type": "object",
465
+ "properties": {
466
+ "kind": {
467
+ "type": "string",
468
+ "const": "testforge-command"
469
+ },
470
+ "protocolVersion": {
471
+ "type": "string",
472
+ "const": "1.0.0"
473
+ }
474
+ },
475
+ "required": ["kind", "protocolVersion"],
476
+ "additionalProperties": false
477
+ }
478
+ ]
479
+ },
480
+ "isolation": {
481
+ "type": "object",
482
+ "properties": {
483
+ "kind": {
484
+ "type": "string",
485
+ "const": "trusted-local"
486
+ },
487
+ "level": {
488
+ "type": "string",
489
+ "const": "UNSANDBOXED"
490
+ },
491
+ "acknowledgedUnsafeExecution": {
492
+ "type": "boolean",
493
+ "const": true
494
+ }
495
+ },
496
+ "required": ["kind", "level", "acknowledgedUnsafeExecution"],
497
+ "additionalProperties": false
498
+ },
499
+ "limitations": {
500
+ "type": "array",
501
+ "items": {
502
+ "type": "string",
503
+ "minLength": 1,
504
+ "maxLength": 2048
505
+ }
506
+ }
507
+ },
508
+ "required": [
509
+ "schemaVersion",
510
+ "repositoryDigest",
511
+ "evidenceContext",
512
+ "policy",
513
+ "worlds",
514
+ "candidates",
515
+ "observations",
516
+ "decision",
517
+ "decisionDigest",
518
+ "artifactDigest",
519
+ "adapter",
520
+ "isolation",
521
+ "limitations"
522
+ ],
523
+ "additionalProperties": false
524
+ },
525
+ "__schema2": {
526
+ "type": "string",
527
+ "pattern": "^sha256:[a-f0-9]{64}$"
528
+ },
529
+ "__schema3": {
530
+ "anyOf": [
531
+ {
532
+ "type": "string"
533
+ },
534
+ {
535
+ "type": "number"
536
+ },
537
+ {
538
+ "type": "boolean"
539
+ },
540
+ {
541
+ "type": "null"
542
+ },
543
+ {
544
+ "type": "array",
545
+ "items": {
546
+ "$ref": "#/$defs/__schema3"
547
+ }
548
+ },
549
+ {
550
+ "type": "object",
551
+ "propertyNames": {
552
+ "type": "string"
553
+ },
554
+ "additionalProperties": {
555
+ "$ref": "#/$defs/__schema3"
556
+ }
557
+ }
558
+ ]
559
+ },
560
+ "__schema4": {
561
+ "type": "string",
562
+ "minLength": 1,
563
+ "maxLength": 128
564
+ },
565
+ "__schema5": {
566
+ "anyOf": [
567
+ {
568
+ "type": "string"
569
+ },
570
+ {
571
+ "type": "number"
572
+ },
573
+ {
574
+ "type": "boolean"
575
+ },
576
+ {
577
+ "type": "null"
578
+ },
579
+ {
580
+ "type": "array",
581
+ "items": {
582
+ "$ref": "#/$defs/__schema5"
583
+ }
584
+ },
585
+ {
586
+ "type": "object",
587
+ "propertyNames": {
588
+ "type": "string"
589
+ },
590
+ "additionalProperties": {
591
+ "$ref": "#/$defs/__schema5"
592
+ }
593
+ }
594
+ ]
595
+ },
596
+ "__schema6": {
597
+ "type": "string",
598
+ "minLength": 1,
599
+ "maxLength": 512
600
+ },
601
+ "__schema7": {
602
+ "type": "string",
603
+ "minLength": 1,
604
+ "maxLength": 128,
605
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
606
+ },
607
+ "__schema8": {
608
+ "type": "string",
609
+ "const": "ASSERTION_FAILURE"
610
+ },
611
+ "__schema9": {
612
+ "type": "string",
613
+ "const": "ASSERTION_FAILURE"
614
+ },
615
+ "__schema10": {
616
+ "type": "string",
617
+ "minLength": 1,
618
+ "maxLength": 128,
619
+ "pattern": "^[A-Z][A-Z0-9_]*$"
620
+ },
621
+ "__schema11": {
622
+ "anyOf": [
623
+ {
624
+ "type": "object",
625
+ "properties": {
626
+ "reference": {
627
+ "anyOf": [
628
+ {
629
+ "type": "string",
630
+ "minLength": 1,
631
+ "maxLength": 256
632
+ },
633
+ {
634
+ "type": "null"
635
+ }
636
+ ]
637
+ },
638
+ "profileId": {
639
+ "anyOf": [
640
+ {
641
+ "type": "string",
642
+ "minLength": 1,
643
+ "maxLength": 256
644
+ },
645
+ {
646
+ "type": "null"
647
+ }
648
+ ]
649
+ },
650
+ "obligations": {
651
+ "maxItems": 100,
652
+ "type": "array",
653
+ "items": {
654
+ "$ref": "#/$defs/__schema12"
655
+ }
656
+ }
657
+ },
658
+ "required": ["reference", "profileId", "obligations"],
659
+ "additionalProperties": false
660
+ },
661
+ {
662
+ "type": "null"
663
+ }
664
+ ]
665
+ },
666
+ "__schema12": {
667
+ "type": "object",
668
+ "properties": {
669
+ "id": {
670
+ "$ref": "#/$defs/__schema7"
671
+ },
672
+ "control": {
673
+ "$ref": "#/$defs/__schema10"
674
+ }
675
+ },
676
+ "required": ["id", "control"],
677
+ "additionalProperties": false
678
+ }
679
+ },
680
+ "$id": "https://testforge.dev/schemas/evidence-export-request.v1.json"
681
+ }